/* =============================================================================
   Auth pages (login, change / forgot / reset password, access denied).

   Colour is driven by the --brand-* CSS variables emitted per-request from
   BrandingOptions, so re-theming stays a config change.

   Every auth page sits over a cane-field backdrop (the login poster + a green
   scrim) for a cohesive feel. The login page adds a looping cane-field video on
   top of that still, behind a frosted sign-in card.
   ============================================================================= */

:root {
    --brand-1: #1C5333;             /* overridden inline from config */
    --brand-2: #2E8A56;             /* overridden inline from config */
    --brand-deep: #0E2E1B;
    --green-050: #E4F5EB;
    --green-200: #85D6A8;
    --auth-card: #ffffff;
    --auth-text: #16231C;
    --auth-muted: #6b7280;
    --auth-border: #e3e7e4;
    --auth-field-border: #d3d9d5;
    --auth-error-bg: #fdecec;
    --auth-error-text: #b3261e;
    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }

.gfv-auth-body {
    position: relative;
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    font-family: var(--font-body);
    color: var(--auth-text);
    overflow: hidden;
    /* Cohesive cane-field backdrop for every auth page (login paints video over). */
    background:
        linear-gradient(135deg, rgba(14, 46, 27, .88) 0%, rgba(28, 83, 51, .66) 55%, rgba(14, 46, 27, .82) 100%),
        url('/media/login-bg-poster.jpg') center / cover no-repeat fixed;
}

/* ---- login: full-bleed looping video --------------------------------------*/
.gfv-auth-stage { position: fixed; inset: 0; overflow: hidden; z-index: 0; }
.gfv-auth-video {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover;
    /* very slow drift so it reads as ambient, not busy */
    animation: gfv-kenburns 38s ease-in-out infinite alternate;
}
@keyframes gfv-kenburns {
    from { transform: scale(1.04); }
    to { transform: scale(1.12); }
}
.gfv-auth-scrim {
    position: absolute; inset: 0;
    background:
        radial-gradient(120% 90% at 30% 40%, transparent 0%, rgba(9, 30, 18, .28) 70%, rgba(9, 30, 18, .55) 100%),
        linear-gradient(120deg, rgba(9, 30, 18, .62) 0%, rgba(14, 46, 27, .30) 45%, rgba(9, 30, 18, .55) 100%);
}

/* ---- card -----------------------------------------------------------------*/
.gfv-auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 432px;
    background: rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: blur(14px) saturate(120%);
    backdrop-filter: blur(14px) saturate(120%);
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(6, 22, 13, .45), 0 2px 0 rgba(255, 255, 255, .6) inset;
    animation: gfv-card-in .7s cubic-bezier(.16, .84, .32, 1) both;
}
@keyframes gfv-card-in {
    from { opacity: 0; transform: translateY(18px) scale(.985); }
    to { opacity: 1; transform: none; }
}
/* brand accent line under the logo banner */
.gfv-auth-card::after {
    content: ""; display: block; height: 3px;
    background: linear-gradient(90deg, var(--brand-1), var(--brand-2), var(--brand-1));
    position: absolute; left: 0; right: 0; top: 0; opacity: 0;
}

.gfv-auth-banner { display: block; width: 100%; height: auto; }

.gfv-auth-inner { padding: 26px 36px 30px; }

.gfv-auth-title { text-align: center; margin-bottom: 24px; }
.gfv-auth-title h1 {
    font-family: var(--font-display);
    font-size: 30px; font-weight: 600; line-height: 1.08;
    margin: 0 0 5px; letter-spacing: -0.01em;
    color: var(--brand-1);
}
.gfv-auth-title p { font-size: 13.5px; color: var(--auth-muted); margin: 0; }

.gfv-auth-form label { display: block; font-size: 13px; font-weight: 600; margin: 0 0 6px; }

.gfv-auth-form input[type="email"],
.gfv-auth-form input[type="password"] {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    margin-bottom: 18px;
    font-size: 15px;
    color: var(--auth-text);
    background: #fff;
    border: 1px solid var(--auth-field-border);
    border-radius: 11px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.gfv-auth-form input::placeholder { color: #9aa39c; }
.gfv-auth-form input:focus {
    border-color: var(--brand-2);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-2) 22%, transparent);
}

.gfv-auth-btn {
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: 11px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .01em;
    cursor: pointer;
    background: linear-gradient(100deg, var(--brand-1), var(--brand-2));
    box-shadow: 0 8px 20px rgba(28, 83, 51, .28);
    transition: filter .15s, transform .06s, box-shadow .15s;
}
.gfv-auth-btn:hover { filter: brightness(1.07); box-shadow: 0 10px 26px rgba(28, 83, 51, .34); }
.gfv-auth-btn:active { transform: translateY(1px) scale(.995); }

.gfv-auth-links { margin-top: 18px; text-align: center; font-size: 14px; }
.gfv-auth-links a { color: var(--brand-2); font-weight: 600; text-decoration: none; }
.gfv-auth-links a:hover { text-decoration: underline; }

.gfv-auth-error {
    background: var(--auth-error-bg); color: var(--auth-error-text);
    border-radius: 10px; padding: 10px 14px; font-size: 14px; margin-bottom: 18px;
}
.gfv-auth-info {
    background: var(--green-050); color: var(--brand-1);
    border-radius: 10px; padding: 12px 14px; font-size: 14px; line-height: 1.5; margin-bottom: 18px;
}
.gfv-auth-note { font-size: 13px; color: var(--auth-muted); margin: 0 0 18px; line-height: 1.5; }

.gfv-auth-footer {
    margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--auth-border);
    text-align: center; font-size: 12px; color: var(--auth-muted);
}

@media (prefers-reduced-motion: reduce) {
    .gfv-auth-video, .gfv-auth-card { animation: none !important; }
}
