/* FarmLivo Auth — premium login/register shell */
.auth-container {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    min-height: 100vh;
    position: relative;
    background: linear-gradient(160deg, #f4f7ef 0%, #eef3e8 45%, #f8faf5 100%);
}

.auth-lang {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 3;
}

.auth-back {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(6px);
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.auth-back:hover {
    background: rgba(255, 255, 255, 0.26);
    border-color: rgba(255, 255, 255, 0.42);
    color: #fff;
    transform: translateY(-1px);
}

.auth-back-icon {
    font-size: 1.05rem;
    line-height: 1;
}

.auth-hero-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: clamp(2rem, 5vw, 3.5rem);
    background: linear-gradient(145deg, var(--fl-primary, #3d5c2e) 0%, #4a7340 42%, var(--fl-accent, #7cb342) 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.auth-hero-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.14), transparent 42%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.08), transparent 38%);
    pointer-events: none;
}

.auth-hero {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.85rem;
    max-width: 24rem;
}

.auth-hero-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
    color: inherit;
    border-radius: 1rem;
    transition: transform 0.15s ease;
}

.auth-hero-brand:hover {
    color: inherit;
    transform: translateY(-2px);
}

.login-logo-card {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    max-width: 100%;
    padding: 18px 26px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 22px;
    box-shadow:
        0 18px 45px rgba(16, 55, 39, 0.18),
        0 2px 8px rgba(16, 55, 39, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    position: relative;
    z-index: 2;
}

.login-logo-card img,
.login-logo-card .farmlivo-logo-login {
    display: block;
    width: 280px !important;
    max-width: min(280px, 70vw) !important;
    height: auto !important;
    margin: 0;
    object-fit: contain;
    background: transparent !important;
    border: 0;
    box-shadow: none;
}

.auth-hero-logo,
.farmlivo-logo-login {
    display: block;
    width: auto;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.auth-hero h1 {
    margin: 0;
    font-weight: 900;
    font-size: clamp(2rem, 4vw, 2.75rem);
    letter-spacing: -0.02em;
    line-height: 1.05;
}

.auth-hero-tagline {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    opacity: 0.96;
}

.auth-hero-subtitle {
    margin: 0;
    font-size: 0.95rem;
    opacity: 0.88;
    line-height: 1.5;
}

.auth-hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.5rem;
}

.auth-hero-badge {
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    font-size: 0.78rem;
    font-weight: 600;
}

.auth-form-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: clamp(1.5rem, 4vw, 3rem) 1rem;
}

.auth-form-inner {
    width: min(100%, 440px);
}

.auth-card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(61, 92, 46, 0.12);
    border-radius: var(--ds-radius-xl, 1.25rem);
    box-shadow: 0 24px 60px rgba(31, 41, 55, 0.08);
    padding: clamp(1.5rem, 3vw, 2rem);
}

.auth-card-head {
    margin-bottom: 1.35rem;
}

.auth-card-eyebrow {
    display: inline-block;
    margin-bottom: 0.35rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--fl-primary, #3d5c2e);
}

.auth-card-title {
    margin: 0;
    font-size: clamp(1.35rem, 2.5vw, 1.65rem);
    font-weight: 900;
    color: var(--ds-text, #1f2937);
    line-height: 1.15;
}

.auth-card-subtitle {
    margin: 0.45rem 0 0;
    color: var(--ds-text-muted, #6b7280);
    font-size: 0.92rem;
    line-height: 1.45;
}

.auth-field {
    margin-bottom: 1rem;
}

.password-policy-checklist {
    list-style: none;
    margin: 0.45rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.28rem;
    font-size: 0.8rem;
    color: var(--ds-text-muted, #6b7280);
}

.password-policy-checklist li {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.password-policy-checklist li.is-met {
    color: #166534;
    font-weight: 600;
}

.password-policy-mark {
    width: 1rem;
    text-align: center;
    flex: 0 0 auto;
}

.auth-field label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--ds-text, #374151);
}

.auth-input-wrap {
    position: relative;
}

.auth-input-wrap .form-control,
.auth-card .form-control {
    border-radius: 0.75rem;
    border-color: rgba(61, 92, 46, 0.18);
    padding: 0.7rem 0.85rem;
    min-height: 2.75rem;
}

.auth-input-wrap .form-control:focus,
.auth-card .form-control:focus {
    border-color: var(--fl-primary, #3d5c2e);
    box-shadow: 0 0 0 3px rgba(61, 92, 46, 0.12);
}

.auth-toggle-password {
    position: absolute;
    top: 50%;
    right: 0.55rem;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--ds-text-muted, #6b7280);
    padding: 0.25rem 0.45rem;
    font-size: 0.78rem;
    font-weight: 600;
}

.auth-alert {
    border-radius: 0.75rem;
    padding: 0.75rem 0.9rem;
    font-size: 0.88rem;
    margin-bottom: 1rem;
}

.auth-alert--error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.auth-alert--success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.auth-alert--info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.auth-submit {
    width: 100%;
    margin-top: 0.35rem;
}

.auth-links {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-top: 1.15rem;
    text-align: center;
    font-size: 0.9rem;
}

.auth-links a {
    color: var(--fl-primary, #3d5c2e);
    font-weight: 600;
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

.auth-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.78rem;
    color: var(--ds-text-muted, #9ca3af);
}

.auth-path-cards {
    display: grid;
    gap: 0.75rem;
    margin: 1rem 0 1.25rem;
}

.auth-path-card {
    display: block;
    padding: 0.85rem 1rem;
    border-radius: 0.85rem;
    border: 1px solid rgba(61, 92, 46, 0.14);
    background: #f8fbf4;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-path-card:hover {
    border-color: rgba(61, 92, 46, 0.35);
    box-shadow: 0 8px 20px rgba(61, 92, 46, 0.08);
}

.auth-path-card strong {
    display: block;
    color: var(--fl-primary, #3d5c2e);
    margin-bottom: 0.2rem;
}

.auth-path-card span {
    font-size: 0.84rem;
    color: var(--ds-text-muted, #6b7280);
}

.auth-invite-summary {
    padding: 0.9rem 1rem;
    border-radius: 0.85rem;
    background: #f3f7ee;
    border: 1px solid rgba(61, 92, 46, 0.14);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.auth-invite-summary dt {
    font-weight: 700;
    color: var(--fl-primary, #3d5c2e);
}

.auth-invite-summary dd {
    margin: 0 0 0.5rem;
    color: var(--ds-text, #374151);
}

@media (max-width: 900px) {
    .auth-container {
        grid-template-columns: 1fr;
    }

    .auth-back {
        color: var(--fl-primary, #3d5c2e);
        background: rgba(255, 255, 255, 0.92);
        border-color: rgba(61, 92, 46, 0.18);
        box-shadow: 0 6px 18px rgba(31, 41, 55, 0.08);
    }

    .auth-back:hover {
        color: var(--fl-primary, #3d5c2e);
        background: #fff;
        border-color: rgba(61, 92, 46, 0.3);
    }

    .auth-hero-panel {
        min-height: auto;
        padding: 2rem 1.25rem 1.5rem;
    }

    .login-logo-card {
        padding: 14px 18px;
        border-radius: 18px;
    }

    .login-logo-card img,
    .login-logo-card .farmlivo-logo-login {
        width: min(260px, 70vw) !important;
        max-width: min(260px, 70vw) !important;
        height: auto !important;
    }

    .auth-lang {
        position: static;
        padding: 0.85rem 1rem 0;
        display: flex;
        justify-content: flex-end;
        grid-row: 1;
    }

    .auth-container {
        grid-template-rows: auto auto 1fr;
    }

    .auth-hero-panel {
        grid-row: 2;
    }

    .auth-form-panel {
        grid-row: 3;
    }
}
