@charset "UTF-8";
/* FlexVPN auth pages — stylesheet shared by signin, signup, password-only
   admin login. Loads landing/tokens.css for design tokens (colors, fonts,
   shadows, spring transitions) so the auth screens feel like a continuation
   of the landing, not a separate product.

   Why a dedicated file (not landing.css): auth pages don't need scroll-stack,
   sticky CTAs, FAQ, pricing — pulling 60kB of landing CSS just for a single
   form would tank LCP on /signin. This file weighs ~10kB and only carries
   what auth screens use.

   PR-18a, 2026-05-06.
*/

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    overscroll-behavior-y: none;       /* PR-165: no rubber-band bounce */
}

body.auth-page {
    font-family: var(--font-body);
    font-size: var(--text-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Atmospheric backdrop — subtle radial wash so the auth card has something
   to sit against. Liquid Glass polish (2026-05-16): dropped opacity 0.7 →
   0.32 — was washing the deep canvas pink, now reads as ambient hint.
   No grain noise (PR-9 lesson: it competed with the card surface). */
body.auth-page::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(900px 600px at 80% -10%, var(--aurora-1), transparent 60%),
        radial-gradient(700px 500px at 0% 100%, var(--aurora-2), transparent 60%);
    opacity: 0.32;
}

a { color: inherit; text-decoration: none; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

/* Skip-link — same affordance as landing.html (WCAG / PR-17 a11y) */
.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    background: var(--accent);
    color: var(--accent-ink);
    padding: 10px 16px;
    border-radius: var(--r-sm);
    font-weight: 600;
    font-size: 14px;
    z-index: 100;
    transition: top var(--t);
}
.skip-link:focus { top: 16px; }

/* ─────────────────────────────────────────────────────────────────────── */
/* Top nav — slim variant of landing nav. Wordmark + accent dot + back link. */
/* ─────────────────────────────────────────────────────────────────────── */

/* Apple Liquid Glass — clean edge (2026-05-17): top specular only,
   no border-bottom stroke, no outer drop shadow. Separation from
   content via blur + canvas darkness. Matches landing nav recipe. */
.auth-nav {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.025);
    backdrop-filter: blur(12px) saturate(120%);
    -webkit-backdrop-filter: blur(12px) saturate(120%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    padding: 18px var(--container-pad);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-4);
}
@media (prefers-reduced-transparency: reduce) {
    .auth-nav {
        background: var(--bg-elev-1);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}
@supports not (backdrop-filter: blur(1px)) {
    .auth-nav {
        background: var(--bg-elev-1);
    }
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.02em;
    color: var(--text);
    transition: color var(--t-fast);
    touch-action: manipulation;
}
.auth-brand:hover { color: var(--accent); }
.auth-brand-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 14px var(--accent-glow);
}

.auth-back {
    font-family: var(--font-mono);
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    transition: color var(--t-fast);
    touch-action: manipulation;
}
.auth-back:hover { color: var(--text); }

/* ─────────────────────────────────────────────────────────────────────── */
/* Centred card — sole anchor on the page, sits over the radial backdrop. */
/* ─────────────────────────────────────────────────────────────────────── */

.auth-main {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-7) var(--container-pad);
}

/* Apple Liquid Glass — the focal element on the page.
   Mirror landing's .final-cta-inner recipe with magenta-tinted top specular
   (brand refraction baked into material edge, no perimeter outline).
   Sits over the subtle body aurora — material refracts the magenta wash. */
.auth-card {
    width: 100%;
    max-width: 460px;
    background: rgba(255, 255, 255, 0.025);
    backdrop-filter: blur(14px) saturate(120%);
    -webkit-backdrop-filter: blur(14px) saturate(120%);
    border: none;
    border-radius: var(--r-xl);
    padding: var(--space-7) var(--space-7);
    box-shadow:
        inset 0 1px 0 rgba(233, 66, 153, 0.12),
        inset 0 -1px 0 rgba(255, 255, 255, 0.02),
        0 16px 40px -10px rgba(0, 0, 0, 0.38),
        0 2px 10px -1px rgba(0, 0, 0, 0.22);
    position: relative;
}
@media (prefers-reduced-transparency: reduce) {
    .auth-card {
        background: var(--bg-elev-1);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border: 1px solid var(--border-bright);
    }
}
@supports not (backdrop-filter: blur(1px)) {
    .auth-card {
        background: var(--bg-elev-1);
    }
}

/* Tiny accent rail above the card — one small magenta tab for brand recall.
   Sits 12px above the card border, top-left aligned with content padding. */
.auth-card::before {
    content: "";
    position: absolute;
    top: -2px;
    left: var(--space-6);
    width: 56px;
    height: 4px;
    background: var(--accent);
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 14px var(--accent-glow);
}

.auth-kicker {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 14px;
}

.auth-card h1 {
    font-family: var(--font-display);
    font-size: clamp(28px, 3.6vw, 34px);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.025em;
    color: var(--text);
    margin-bottom: 10px;
    text-wrap: balance;
}

.auth-subtitle {
    font-size: 15px;
    line-height: 1.55;
    color: var(--text-muted);
    margin-bottom: var(--space-6);
    text-wrap: pretty;
}

/* ─────────────────────────────────────────────────────────────────────── */
/* Form */
/* ─────────────────────────────────────────────────────────────────────── */

form.auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.field {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.field label {
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.field input,
.input {
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border-bright);
    border-radius: var(--r-md);
    padding: 13px 16px;
    width: 100%;
    transition: border-color var(--t-fast), background var(--t-fast),
        box-shadow var(--t-fast);
    appearance: none;
    -webkit-appearance: none;
}

.field input::placeholder,
.input::placeholder { color: var(--text-faint); }

.field input:hover,
.input:hover { border-color: rgba(255, 255, 255, 0.16); }

.field input:focus,
.input:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-elev-1);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.field-hint {
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--text-dim);
}

.auth-error {
    padding: 12px 14px;
    border: 1px solid rgba(248, 113, 113, 0.3);
    background: rgba(248, 113, 113, 0.08);
    color: var(--err);
    border-radius: var(--r-md);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: var(--space-4);
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

/* ─────────────────────────────────────────────────────────────────────── */
/* Primary submit — same magnetic-feel button family as landing .btn-primary,
   but lighter weight (no background-position animation). */
/* ─────────────────────────────────────────────────────────────────────── */

.btn-primary {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 15.5px;
    letter-spacing: -0.005em;
    color: var(--accent-ink);
    background: var(--accent);
    border: none;
    border-radius: var(--r-md);
    padding: 14px 20px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-magenta);
    transition: transform var(--spring), background var(--t-fast),
        box-shadow var(--t);
    touch-action: manipulation;
}

.btn-primary:hover {
    background: var(--accent-deep);
    transform: translateY(-1px);
    box-shadow: 0 14px 36px rgba(233, 66, 153, 0.34),
        0 4px 10px rgba(233, 66, 153, 0.22);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 4px 14px rgba(233, 66, 153, 0.22);
}

.btn-primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

/* ─────────────────────────────────────────────────────────────────────── */
/* Alt switch (signup ↔ signin) + legal footer */
/* ─────────────────────────────────────────────────────────────────────── */

.auth-alt {
    margin-top: var(--space-6);
    padding-top: var(--space-5);
    border-top: 1px solid var(--border);
    font-size: 14.5px;
    color: var(--text-muted);
    text-align: center;
}
.auth-alt a {
    color: var(--text);
    font-weight: 600;
    border-bottom: 1px solid var(--accent);
    padding-bottom: 1px;
    transition: color var(--t-fast), border-color var(--t-fast);
}
.auth-alt a:hover {
    color: var(--accent);
    border-bottom-color: var(--text);
}

.auth-legal {
    margin-top: var(--space-5);
    text-align: center;
    font-size: 12.5px;
    color: var(--text-dim);
    line-height: 1.7;
}
.auth-legal a {
    color: var(--text-muted);
    text-decoration: underline;
    text-decoration-color: var(--border-bright);
    text-underline-offset: 3px;
    transition: color var(--t-fast), text-decoration-color var(--t-fast);
}
.auth-legal a:hover {
    color: var(--text);
    text-decoration-color: var(--accent);
}

/* ─────────────────────────────────────────────────────────────────────── */
/* Password show/hide toggle (used by login.html admin password field) */
/* Icon-only square button — eye/eye-off SVGs swapped via [data-state] */
/* ─────────────────────────────────────────────────────────────────────── */

.pwd-wrap {
    position: relative;
}
.pwd-wrap input { padding-right: 52px; }    /* room for the 36px icon button + gutter */
.pwd-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border-bright);
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    border-radius: var(--r-sm);
    transition: color var(--t-fast), border-color var(--t-fast),
        background var(--t-fast);
    touch-action: manipulation;
}
.pwd-toggle:hover {
    color: var(--text);
    border-color: var(--accent);
    background: var(--accent-tint);
}
.pwd-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.pwd-icon {
    width: 18px;
    height: 18px;
    display: block;
}
/* Default state (password masked) → eye icon. After toggle (password
 * visible) the wrapper gets [data-state="visible"] and we flip to
 * eye-off. Two SVGs in DOM, CSS-only swap — keeps the script trivial. */
.pwd-icon-eye-off { display: none; }
.pwd-toggle[data-state="visible"] .pwd-icon-eye { display: none; }
.pwd-toggle[data-state="visible"] .pwd-icon-eye-off { display: block; }

/* ─────────────────────────────────────────────────────────────────────── */
/* Mobile */
/* ─────────────────────────────────────────────────────────────────────── */

@media (max-width: 480px) {
    .auth-nav { padding: 14px 20px; }
    .auth-card {
        padding: var(--space-6) var(--space-5);
        border-radius: var(--r-lg);
    }
    .auth-card::before { left: var(--space-5); }
}

/* Reduced motion — kill button transforms, keep colour transitions */
@media (prefers-reduced-motion: reduce) {
    .btn-primary,
    .field input,
    .input,
    .pwd-toggle,
    .auth-back,
    .auth-brand {
        transition: color var(--t-fast), background var(--t-fast),
            border-color var(--t-fast);
    }
    .btn-primary:hover { transform: none; }
    .skip-link { transition: none; }
}
