:root {
    --auth-bg-top: #e6f5e9;
    --auth-bg-bottom: #f8fcf6;
    --auth-primary: #3a8452;
    --auth-secondary: #6bbf59;
    --auth-accent: #ffb347;
    --auth-text: #0f2f1f;
}

body {
    font-family: 'Inter', Arial, sans-serif;
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(160deg, var(--auth-bg-top) 0%, var(--auth-bg-bottom) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

body::before,
body::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.35;
    animation: float-bubble 14s infinite;
}

body::before {
    width: 420px;
    height: 420px;
    background: rgba(107, 191, 89, 0.4);
    top: -120px;
    right: -100px;
}

body::after {
    width: 360px;
    height: 360px;
    background: rgba(255, 179, 71, 0.35);
    bottom: -140px;
    left: -80px;
    animation-delay: 2.5s;
}

.auth-container {
    width: min(900px, 92vw);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 0;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 28px 60px rgba(33, 68, 41, 0.18);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.auth-visual {
    position: relative;
    background: linear-gradient(135deg, rgba(58, 132, 82, 0.95) 0%, rgba(40, 92, 64, 0.95) 100%);
    color: #ffffff;
    padding: 4rem 3.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.auth-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background: url('/vendors/images/fields-pattern.svg') center/cover no-repeat;
    opacity: 0.25;
}

.auth-visual h1 {
    font-size: 2.6rem;
    margin-bottom: 1rem;
    letter-spacing: 0.8px;
}

.auth-visual p {
    font-size: 1rem;
    line-height: 1.7;
    max-width: 360px;
    color: rgba(255, 255, 255, 0.85);
}

.auth-visual .visual-illustration {
    width: 280px;
    height: 200px;
    background: url('/vendors/images/tractor-illustration.svg') center/contain no-repeat;
    margin-top: 2.5rem;
    animation: sway 4s ease-in-out infinite;
}

.auth-form {
    padding: 4rem 3.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #ffffff;
}

.auth-form h2 {
    color: var(--auth-text);
    margin-bottom: 1.5rem;
    font-size: 1.9rem;
}

.auth-form p.helper {
    color: #506255;
    margin-bottom: 2rem;
}

.auth-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1.4rem;
}

.auth-form label {
    font-weight: 600;
    color: #1c3a2d;
}

.auth-form input[type="email"],
.auth-form input[type="password"] {
    border: 1px solid rgba(27, 73, 50, 0.2);
    border-radius: 12px;
    padding: 0.85rem 1.1rem;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-form input:focus {
    border-color: rgba(58, 132, 82, 0.6);
    outline: none;
    box-shadow: 0 0 0 4px rgba(107, 191, 89, 0.18);
}

.auth-btn {
    border: none;
    border-radius: 14px;
    padding: 0.9rem 1.25rem;
    background: linear-gradient(135deg, var(--auth-secondary) 0%, var(--auth-primary) 100%);
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 0.8rem;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(58, 132, 82, 0.25);
}

.auth-links {
    margin-top: 1.4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    color: #2d5a3f;
}

.auth-links a {
    color: #2d5a3f;
    text-decoration: none;
    font-weight: 600;
}

.alert {
    border-radius: 12px;
    padding: 0.9rem 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.alert-success {
    background: rgba(107, 191, 89, 0.12);
    color: #225836;
    border: 1px solid rgba(107, 191, 89, 0.35);
}

.alert-error {
    background: rgba(231, 76, 60, 0.12);
    color: #872b22;
    border: 1px solid rgba(231, 76, 60, 0.28);
}

.auth-form .has-error label {
    color: #872b22;
}

.auth-form input.is-invalid {
    border-color: rgba(231, 76, 60, 0.55);
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.12);
}

.auth-form .field-error {
    color: #872b22;
    font-size: 0.85rem;
    margin: -0.35rem 0 0;
}

.auth-form .status {
    min-height: 1.1rem;
    margin-top: -0.2rem;
    font-size: 0.85rem;
}

.auth-form .status.match {
    color: #2d7a42;
}

.auth-form .status.mismatch {
    color: #872b22;
}

.password-strength {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.4rem;
}

.password-strength span {
    flex: 1;
    height: 6px;
    border-radius: 999px;
    background: #e0e6e2;
    transition: background 0.3s ease;
}

.password-strength span.active {
    background: linear-gradient(135deg, var(--auth-secondary), var(--auth-primary));
}

.helper-text {
    font-size: 0.85rem;
    color: #58705f;
}

@keyframes sway {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-16px) rotate(3deg); }
}

@keyframes float-bubble {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-18px); }
}

@media (max-width: 840px) {
    .auth-visual {
        display: none;
    }

    .auth-container {
        max-width: 480px;
    }

    body::before,
    body::after {
        opacity: 0.2;
    }
}
