/* ════════════════════════════════════════════════════════════
   auth.css  —  Bitnexu · Login & Register
   Professional, industry-standard auth layout.
   Mobile-first. Full dark-mode. Logo image ready.
════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────
   1. TOKENS
───────────────────────────────────────────────────────── */
:root {
    --green:          #4ade80;
    --green-mid:      #22c55e;
    --green-dark:     #16a34a;
    --green-dim:      rgba(74, 222, 128, .15);
    --green-glow:     rgba(74, 222, 128, .35);

    /* Dark surfaces (mobile + left panel + dark mode) */
    --surface-900:    #0c0e14;
    --surface-800:    #11141c;
    --surface-700:    #181c26;
    --surface-600:    #1f2433;
    --surface-500:    #2a3042;
    --surface-border: rgba(255,255,255,.08);
    --surface-text:   #f1f5f9;
    --surface-muted:  #8892a4;

    /* Light surfaces (desktop right panel) */
    --light-bg:       #f0f4f8;
    --light-card:     #ffffff;
    --light-border:   #e2e8f0;
    --light-text:     #0f172a;
    --light-muted:    #64748b;

    /* Dark-mode right panel */
    --dark-right-bg:  #0f1117;
    --dark-card:      #161a24;
    --dark-border:    rgba(255,255,255,.07);

    /* Inputs */
    --inp-h:          54px;
    --inp-r:          12px;
    --inp-pad-l:      48px;
    --inp-pad-r:      48px;

    /* Topbar */
    --bar-h:          64px;

    /* Radii */
    --r-card:         20px;
    --r-btn:          12px;

    /* Fonts */
    --f-display:      'Barlow Condensed', sans-serif;
    --f-body:         'Inter', system-ui, -apple-system, sans-serif;

    /* Easing */
    --t:              .2s ease;
}

/* ─────────────────────────────────────────────────────────
   2. GLOBAL RESET
───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

.auth-page {
    font-family: var(--f-body);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    background: var(--surface-900);
    color: var(--surface-text);
}

/* ─────────────────────────────────────────────────────────
   3. SKIP LINK
───────────────────────────────────────────────────────── */
.skip-link {
    position: absolute;
    top: -100%;
    left: 12px;
    z-index: 9999;
    padding: 8px 16px;
    background: var(--green-mid);
    color: #fff;
    border-radius: 6px;
    font-size: .875rem;
    font-weight: 600;
    text-decoration: none;
    transition: top .1s;
}
.skip-link:focus { top: 12px; }

/* ─────────────────────────────────────────────────────────
   4. MOBILE TOPBAR
   Fixed header on phones with logo + nav + theme toggle.
───────────────────────────────────────────────────────── */
.auth-topbar {
    position: fixed;
    inset: 0 0 auto 0;
    height: var(--bar-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background: var(--surface-800);
    border-bottom: 1px solid var(--surface-border);
    z-index: 200;
}

/* Logo image in topbar */
.auth-topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.auth-topbar-brand img {
    height: 36px;
    width: auto;
    display: block;
}
/* Fallback text logo if image not found */
.auth-topbar-brand .brand-text {
    font-family: var(--f-display);
    font-size: 1.6rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: -.3px;
    line-height: 1;
}
.auth-topbar-brand .brand-text em {
    font-style: normal;
    color: var(--green);
}

.auth-topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Home button — mobile topbar */
.auth-home-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px;
    height: 36px;
    background: transparent;
    border: 1px solid var(--surface-border);
    border-radius: 8px;
    color: var(--surface-muted);
    font-size: .8rem;
    font-weight: 600;
    font-family: var(--f-body);
    text-decoration: none;
    cursor: pointer;
    transition: all var(--t);
    white-space: nowrap;
}
.auth-home-btn:hover {
    border-color: var(--green);
    color: var(--green);
    background: var(--green-dim);
}

/* Theme toggle button — works on both mobile and desktop */
.theme-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--surface-700);
    border: 1px solid var(--surface-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all var(--t);
    color: var(--surface-muted);
    flex-shrink: 0;
}
.theme-btn:hover {
    background: var(--green-dim);
    border-color: var(--green);
    color: var(--green);
}

/* Light mode overrides for desktop theme button */
.auth-page.light-mode .theme-btn {
    background: #fff;
    border-color: var(--light-border);
    color: var(--light-muted);
}
.auth-page.light-mode .theme-btn:hover {
    background: var(--green-dim);
    border-color: var(--green-mid);
    color: var(--green-dark);
}

/* ─────────────────────────────────────────────────────────
   5. ROOT — mobile column → desktop grid
───────────────────────────────────────────────────────── */
.auth-root {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: var(--bar-h);  /* space for fixed topbar */
}

@media (min-width: 960px) {
    .auth-root {
        display: grid;
        grid-template-columns: 44% 56%;
        padding-top: 0;
    }
}

@media (min-width: 1280px) {
    .auth-root { grid-template-columns: 40% 60%; }
}

/* ─────────────────────────────────────────────────────────
   6. LEFT PANEL  (desktop only)
───────────────────────────────────────────────────────── */
.auth-left {
    display: none;
}

@media (min-width: 960px) {
    .auth-topbar  { display: none; }   /* hide mobile bar on desktop */

    .auth-left {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        background: var(--surface-800);
        position: sticky;
        top: 0;
        height: 100vh;
        overflow: hidden;
        padding: 48px 44px;
        z-index: 1;
    }
}

@media (min-width: 960px) and (max-width: 1200px) {
    .auth-left { padding: 40px 32px; }
}

/* Ambient glow circles */
.lp-circle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}
.lp-circle--tl {
    width: 400px; height: 400px;
    top: -120px; left: -100px;
    background: radial-gradient(circle, rgba(74,222,128,.12) 0%, transparent 68%);
}
.lp-circle--br {
    width: 480px; height: 480px;
    bottom: -140px; right: -120px;
    background: radial-gradient(circle, rgba(74,222,128,.08) 0%, transparent 68%);
}

/* Desktop logo — image with text fallback */
.lp-left-top { position: relative; z-index: 2; }
.lp-logo-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}
.lp-logo-img {
    height: 44px;
    width: auto;
}
.lp-logo-text {
    font-family: var(--f-display);
    font-size: 2.2rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: -.5px;
    line-height: 1;
}
.lp-logo-text em {
    font-style: normal;
    color: var(--green);
}

/* Feature cards */
.lp-left-mid {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    z-index: 2;
}

.lp-feat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255,255,255,.04);
    border: 1px solid var(--surface-border);
    border-radius: 14px;
    padding: 18px 20px;
    transition: background var(--t);
}
.lp-feat-card:hover { background: rgba(255,255,255,.07); }

.lp-feat-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: rgba(74,222,128,.12);
    border: 1px solid rgba(74,222,128,.2);
    color: var(--green);
    font-size: 20px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.lp-feat-icon--purple { background: rgba(167,139,250,.12); border-color: rgba(167,139,250,.2); color: #a78bfa; }
.lp-feat-icon--blue   { background: rgba(96,165,250,.12);  border-color: rgba(96,165,250,.2);  color: #60a5fa; }

.lp-feat-body { flex: 1; min-width: 0; }
.lp-feat-title { font-size: .95rem; font-weight: 700; color: #e8edf3; margin-bottom: 3px; }
.lp-feat-sub   { font-size: .78rem; color: var(--surface-muted); line-height: 1.4; }

.lp-feat-badge {
    margin-left: auto;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: .6px;
    flex-shrink: 0;
    background: rgba(74,222,128,.12);
    color: var(--green);
    border: 1px solid rgba(74,222,128,.2);
}
.lp-feat-badge--blue { background: rgba(96,165,250,.12); color: #60a5fa; border-color: rgba(96,165,250,.2); }

/* Tagline + trust */
.lp-left-bottom { position: relative; z-index: 2; }
.lp-tagline {
    font-size: .875rem;
    color: #4a5568;
    line-height: 1.8;
    margin-bottom: 20px;
}
.lp-tagline strong { color: var(--green); font-weight: 700; }
.lp-trust { display: flex; gap: 18px; flex-wrap: wrap; }
.lp-trust-item {
    display: flex; align-items: center; gap: 7px;
    font-size: .775rem; color: #4a5568; font-weight: 500;
}
.lp-trust-item i { color: var(--green); font-size: 13px; }

/* Left panel fade-in */
@media (min-width: 960px) {
    .lp-left-top    { animation: fadeUp .5s ease .06s both; }
    .lp-left-mid    { animation: fadeUp .5s ease .16s both; }
    .lp-left-bottom { animation: fadeUp .5s ease .26s both; }
}

/* ─────────────────────────────────────────────────────────
   7. RIGHT PANEL
───────────────────────────────────────────────────────── */
.auth-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Mobile: always top-align so card is never clipped */
    justify-content: flex-start;
    padding: 32px 20px 48px;
    min-height: calc(100vh - var(--bar-h));
    position: relative;
    /* Subtle mobile bg gradient */
    background: var(--surface-800);
}

/* Mobile ambient glow */
.auth-right::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 45% at 50% 10%, rgba(74,222,128,.06) 0%, transparent 70%),
        radial-gradient(ellipse 50% 50% at 90% 90%, rgba(74,222,128,.04) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

@media (min-width: 960px) {
    .auth-right {
        background: var(--light-bg);
        padding: 60px 48px;
        min-height: 100vh;
        /* Center the card vertically on desktop login page */
        justify-content: center;
    }
    .auth-right::before { display: none; }
    .auth-page.dark-mode .auth-right { background: var(--dark-right-bg); }
}

@media (min-width: 960px) and (max-width: 1200px) {
    .auth-right { padding: 60px 36px; }
}

/* Register page: stay top-aligned (long form) */
.auth-right--top {
    justify-content: flex-start !important;
    padding-top: 32px;
}
@media (min-width: 960px) {
    .auth-right--top { padding-top: 48px; }
}

/* Desktop back-link */
.auth-back-link { display: none; }
@media (min-width: 960px) {
    .auth-back-link {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        position: absolute;
        top: 24px;
        left: 28px;
        font-size: .8rem;
        font-weight: 600;
        color: var(--light-muted);
        text-decoration: none;
        padding: 7px 14px;
        border-radius: 20px;
        border: 1px solid var(--light-border);
        background: rgba(255,255,255,.7);
        backdrop-filter: blur(8px);
        transition: all var(--t);
        z-index: 5;
    }
    .auth-back-link:hover {
        background: var(--green-dim);
        border-color: var(--green-mid);
        color: var(--green-dark);
    }
    .auth-page.dark-mode .auth-back-link {
        background: rgba(255,255,255,.04);
        border-color: var(--dark-border);
        color: var(--surface-muted);
    }
    .auth-page.dark-mode .auth-back-link:hover {
        background: var(--green-dim);
        border-color: var(--green);
        color: var(--green);
    }
}

/* Desktop theme button (inside right panel) */
.auth-desktop-theme {
    display: none;
}
@media (min-width: 960px) {
    .auth-desktop-theme {
        display: flex;
        position: absolute;
        top: 22px;
        right: 28px;
        z-index: 5;
    }
}

/* ─────────────────────────────────────────────────────────
   8. CARD
───────────────────────────────────────────────────────── */
.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--surface-700);
    border: 1px solid var(--surface-border);
    border-radius: var(--r-card);
    box-shadow: 0 2px 4px rgba(0,0,0,.3), 0 16px 48px rgba(0,0,0,.5);
    padding: 36px 28px 32px;
    position: relative;
    z-index: 1;
    animation: fadeUp .4s ease both;
}

@media (min-width: 960px) {
    .auth-card {
        background: var(--light-card);
        border-color: var(--light-border);
        box-shadow: 0 2px 4px rgba(0,0,0,.04), 0 16px 48px rgba(0,0,0,.1);
        padding: 48px 44px 44px;
        max-width: 460px;
    }
    .auth-page.dark-mode .auth-card {
        background: var(--dark-card);
        border-color: var(--dark-border);
        box-shadow: 0 2px 4px rgba(0,0,0,.3), 0 16px 48px rgba(0,0,0,.5);
    }
}

@media (min-width: 960px) and (max-width: 1200px) {
    .auth-card { padding: 40px 36px; }
}

/* Progress stepper */
.auth-steps {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 28px;
}
.auth-step {
    height: 4px;
    border-radius: 2px;
    background: var(--surface-500);
    transition: all .3s ease;
}
.auth-step:first-child  { width: 40px; background: var(--green); }
.auth-step:nth-child(2) { width: 24px; }
.auth-step:nth-child(3) { width: 24px; }

@media (min-width: 960px) {
    .auth-step { background: #e2e8f0; }
    .auth-step:first-child { background: var(--green-mid); }
    .auth-page.dark-mode .auth-step { background: #2a3042; }
    .auth-page.dark-mode .auth-step:first-child { background: var(--green); }
}

/* Headings */
.auth-title {
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--surface-text);
    margin-bottom: 6px;
    line-height: 1.2;
    letter-spacing: -.4px;
}
.auth-title-accent { color: var(--green); }
.auth-subtitle {
    font-size: .9rem;
    color: var(--surface-muted);
    margin-bottom: 28px;
    line-height: 1.5;
}

@media (min-width: 960px) {
    .auth-title { font-size: 2rem; color: var(--light-text); }
    .auth-page.dark-mode .auth-title { color: var(--surface-text); }
    .auth-subtitle { color: var(--light-muted); }
    .auth-page.dark-mode .auth-subtitle { color: var(--surface-muted); }
    .auth-title-accent { color: var(--green-mid); }
}

/* Register/login link at card bottom */
.auth-foot {
    text-align: center;
    font-size: .875rem;
    color: var(--surface-muted);
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--surface-border);
}
.auth-foot a {
    color: var(--green);
    font-weight: 700;
    text-decoration: none;
    margin-left: 4px;
}
.auth-foot a:hover { text-decoration: underline; }
@media (min-width: 960px) {
    .auth-foot {
        border-top-color: var(--light-border);
        color: var(--light-muted);
    }
    .auth-page.dark-mode .auth-foot {
        border-top-color: var(--dark-border);
        color: var(--surface-muted);
    }
    .auth-foot a { color: var(--green-mid); }
}

/* ─────────────────────────────────────────────────────────
   9. DJANGO MESSAGES (alerts)
───────────────────────────────────────────────────────── */
.auth-card .alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 16px;
    border-radius: 12px;
    font-size: .875rem;
    line-height: 1.5;
    margin-bottom: 20px;
    border-left: 4px solid;
    border-top: none;
    border-right: none;
    border-bottom: none;
}
.auth-card .alert i { flex-shrink: 0; margin-top: 2px; font-size: 1rem; }
/* Mobile dark-card variants */
.auth-card .alert-success { background: rgba(74,222,128,.1);  border-left-color: var(--green);        color: #86efac; }
.auth-card .alert-danger  { background: rgba(248,113,113,.1); border-left-color: #f87171;             color: #fca5a5; }
.auth-card .alert-warning { background: rgba(251,191,36,.1);  border-left-color: #fbbf24;             color: #fde68a; }
.auth-card .alert-info    { background: rgba(96,165,250,.1);  border-left-color: #60a5fa;             color: #93c5fd; }
/* Desktop light variants */
@media (min-width: 960px) {
    .auth-card .alert-success { background: #f0fdf4; border-left-color: #22c55e; color: #15803d; }
    .auth-card .alert-danger  { background: #fef2f2; border-left-color: #ef4444; color: #b91c1c; }
    .auth-card .alert-warning { background: #fffbeb; border-left-color: #f59e0b; color: #92400e; }
    .auth-card .alert-info    { background: #eff6ff; border-left-color: #3b82f6; color: #1d4ed8; }
    .auth-page.dark-mode .auth-card .alert-success { background: rgba(74,222,128,.08); color: #86efac; }
    .auth-page.dark-mode .auth-card .alert-danger  { background: rgba(248,113,113,.08); color: #fca5a5; }
    .auth-page.dark-mode .auth-card .alert-warning { background: rgba(251,191,36,.08); color: #fde68a; }
    .auth-page.dark-mode .auth-card .alert-info    { background: rgba(96,165,250,.08); color: #93c5fd; }
}
/* Dismiss animation */
.alert.lp-hide {
    opacity: 0; max-height: 0;
    padding-top: 0; padding-bottom: 0; margin-bottom: 0;
    overflow: hidden;
    transition: all .35s ease;
}

/* ─────────────────────────────────────────────────────────
   10. FORM LABELS & GROUPS
───────────────────────────────────────────────────────── */
.auth-label {
    display: block;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .3px;
    text-transform: uppercase;
    color: var(--surface-muted);
    margin-bottom: 8px;
}
@media (min-width: 960px) {
    .auth-label { color: #374151; text-transform: none; font-size: .875rem; letter-spacing: 0; }
    .auth-page.dark-mode .auth-label { color: #9ca3af; }
}
.auth-label .req { color: #f87171; margin-left: 2px; }

.auth-field { margin-bottom: 20px; }

/* Label + forgot link row */
.auth-label-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}
.auth-label-row .auth-label { margin-bottom: 0; }
.auth-forgot {
    font-size: .8rem;
    font-weight: 600;
    color: var(--green);
    text-decoration: none;
    transition: opacity var(--t);
    white-space: nowrap;
}
.auth-forgot:hover { opacity: .75; }
@media (min-width: 960px) {
    .auth-forgot { color: var(--green-mid); }
}

/* ─────────────────────────────────────────────────────────
   11. INPUTS
───────────────────────────────────────────────────────── */
.auth-input-wrap {
    position: relative;
    display: block;
}
.auth-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.15rem;
    color: var(--surface-muted);
    pointer-events: none;
    z-index: 2;
    display: flex;
    align-items: center;
    line-height: 1;
    transition: color var(--t);
}
.auth-input {
    display: block;
    width: 100%;
    height: var(--inp-h);
    padding: 0 var(--inp-pad-r) 0 var(--inp-pad-l);
    border: 1.5px solid var(--surface-500);
    border-radius: var(--inp-r);
    background: var(--surface-600);
    color: var(--surface-text);
    font-size: 1rem;
    font-family: var(--f-body);
    outline: none;
    transition: border-color var(--t), box-shadow var(--t), background var(--t);
    -webkit-appearance: none;
    touch-action: manipulation;
}
/* Prevent iOS zoom */
@media (max-width: 959px) { .auth-input { font-size: 16px; } }

.auth-input::placeholder { color: var(--surface-muted); opacity: .6; }

.auth-input:focus {
    border-color: var(--green);
    background: var(--surface-700);
    box-shadow: 0 0 0 3px var(--green-dim);
}
.auth-input:focus ~ .auth-input-icon,
.auth-input-wrap:focus-within .auth-input-icon {
    color: var(--green);
}

.auth-input.is-invalid          { border-color: #f87171; }
.auth-input.is-invalid:focus    { box-shadow: 0 0 0 3px rgba(248,113,113,.15); }

/* Desktop light mode */
@media (min-width: 960px) {
    .auth-input {
        background: #fff;
        border-color: var(--light-border);
        color: var(--light-text);
    }
    .auth-input::placeholder { color: #a0aec0; opacity: 1; }
    .auth-input:focus { background: #fff; border-color: var(--green-mid); box-shadow: 0 0 0 3px rgba(34,197,94,.12); }
    .auth-input-icon { color: #a0aec0; }
    .auth-input-wrap:focus-within .auth-input-icon { color: var(--green-mid); }

    .auth-page.dark-mode .auth-input { background: #1e2330; border-color: #2a3042; color: var(--surface-text); }
    .auth-page.dark-mode .auth-input:focus { background: #1e2330; border-color: var(--green); }
    .auth-page.dark-mode .auth-input-icon { color: var(--surface-muted); }
    .auth-page.dark-mode .auth-input-wrap:focus-within .auth-input-icon { color: var(--green); }
    .auth-page.dark-mode .auth-input.is-invalid { border-color: #f87171; }
}

/* Password toggle */
.auth-pw-btn {
    position: absolute;
    right: 0;
    top: 0;
    width: var(--inp-h);
    height: var(--inp-h);
    background: none;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--surface-muted);
    font-size: 1.1rem;
    z-index: 2;
    transition: color var(--t);
    border-radius: 0 var(--inp-r) var(--inp-r) 0;
}
.auth-pw-btn:hover { color: var(--green); }
@media (min-width: 960px) {
    .auth-pw-btn { color: #a0aec0; }
    .auth-pw-btn:hover { color: var(--green-mid); }
    .auth-page.dark-mode .auth-pw-btn { color: var(--surface-muted); }
    .auth-page.dark-mode .auth-pw-btn:hover { color: var(--green); }
}

/* Field-level error */
.auth-error {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: .8rem;
    color: #f87171;
    margin-top: 6px;
    line-height: 1.4;
}
.auth-error i { flex-shrink: 0; font-size: .85rem; }
/* Show Django server errors always; JS-driven errors via .show class */
.auth-error { display: none; }
.auth-error.show,
.auth-input.is-invalid ~ .auth-error { display: flex; }
@media (min-width: 960px) {
    .auth-error { color: #dc2626; }
}

/* ─────────────────────────────────────────────────────────
   12. CHECKBOX
───────────────────────────────────────────────────────── */
.auth-check-wrap {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}
.auth-check {
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 1.5px solid var(--surface-500);
    border-radius: 5px;
    background: var(--surface-600);
    cursor: pointer;
    accent-color: var(--green);
    margin-top: 1px;
    transition: border-color var(--t);
}
.auth-check:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
@media (min-width: 960px) {
    .auth-check { background: #fff; border-color: var(--light-border); }
    .auth-page.dark-mode .auth-check { background: #1e2330; border-color: #2a3042; }
}
.auth-check-label {
    font-size: .875rem;
    color: var(--surface-muted);
    line-height: 1.5;
}
@media (min-width: 960px) {
    .auth-check-label { color: var(--light-muted); }
    .auth-page.dark-mode .auth-check-label { color: var(--surface-muted); }
}
.auth-check-label a { color: var(--green); text-decoration: none; font-weight: 600; }
.auth-check-label a:hover { text-decoration: underline; }

/* ─────────────────────────────────────────────────────────
   13. LOGIN TABS
───────────────────────────────────────────────────────── */
.auth-tabs {
    display: flex;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--surface-500);
    gap: 0;
}
.auth-tab {
    flex: 1;
    padding: 11px 8px;
    border: none;
    background: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    font-size: .875rem;
    font-weight: 600;
    color: var(--surface-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-family: inherit;
    transition: color var(--t), border-color var(--t);
    white-space: nowrap;
    border-radius: 4px 4px 0 0;
}
.auth-tab:hover { color: var(--green); }
.auth-tab.active, .auth-tab[aria-selected="true"] {
    color: var(--green);
    border-bottom-color: var(--green);
}
@media (min-width: 960px) {
    .auth-tabs { border-bottom-color: var(--light-border); }
    .auth-tab  { color: #9ca3af; }
    .auth-tab:hover { color: var(--green-mid); }
    .auth-tab.active { color: var(--green-mid); border-bottom-color: var(--green-mid); }
    .auth-page.dark-mode .auth-tabs { border-bottom-color: var(--surface-500); }
    .auth-page.dark-mode .auth-tab  { color: var(--surface-muted); }
    .auth-page.dark-mode .auth-tab.active { color: var(--green); border-bottom-color: var(--green); }
}

/* ─────────────────────────────────────────────────────────
   14. BUTTONS
───────────────────────────────────────────────────────── */
.auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 54px;
    padding: 0 24px;
    border: none;
    border-radius: var(--r-btn);
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
    text-decoration: none;
    letter-spacing: .1px;
}
.auth-btn--primary {
    background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
    color: #021d09;
}
.auth-btn--primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 28px var(--green-glow);
    color: #021d09;
}
.auth-btn--primary:active:not(:disabled) { transform: translateY(0); }
.auth-btn--primary:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.auth-btn--primary:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

@media (min-width: 960px) {
    .auth-btn--primary {
        background: linear-gradient(135deg, var(--green-mid), var(--green-dark));
        color: #fff;
    }
    .auth-btn--primary:hover:not(:disabled) { color: #fff; }
}

.auth-btn--outline {
    height: 46px;
    background: var(--green-dim);
    border: 1.5px dashed var(--green);
    color: var(--green);
    font-size: .875rem;
}
.auth-btn--outline:hover { background: var(--green); color: #021d09; }

.auth-btn--ghost {
    height: 46px;
    background: none;
    border: 1.5px solid var(--surface-500);
    color: var(--surface-muted);
    font-size: .875rem;
}
.auth-btn--ghost:hover { border-color: #888; color: #ccc; }
@media (min-width: 960px) {
    .auth-btn--ghost { border-color: var(--light-border); color: #6b7280; }
    .auth-btn--ghost:hover { border-color: #9ca3af; color: #374151; background: rgba(0,0,0,.03); }
    .auth-page.dark-mode .auth-btn--ghost { border-color: #2a3042; color: var(--surface-muted); }
    .auth-page.dark-mode .auth-btn--ghost:hover { color: #e2e8f0; background: rgba(255,255,255,.04); }
}

/* Spinner */
.auth-spinner {
    display: none;
    width: 20px; height: 20px;
    border: 2.5px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .6s linear infinite;
    flex-shrink: 0;
}
.auth-btn--primary.loading .auth-spinner { display: inline-block; }
.auth-btn--primary.loading .btn-text     { display: none; }

/* ─────────────────────────────────────────────────────────
   15. PASSWORD STRENGTH
   Width from data-level — zero JS style mutations.
───────────────────────────────────────────────────────── */
.auth-strength {
    height: 5px;
    border-radius: 10px;
    background: var(--surface-500);
    overflow: hidden;
    margin-top: 10px;
}
.auth-strength-fill {
    height: 100%;
    width: 0;
    border-radius: 10px;
    transition: width .25s ease, background .25s ease;
}
.auth-strength-fill[data-level="weak"]   { width: 25%;  background: #f87171; }
.auth-strength-fill[data-level="fair"]   { width: 50%;  background: #fb923c; }
.auth-strength-fill[data-level="good"]   { width: 75%;  background: #facc15; }
.auth-strength-fill[data-level="strong"] { width: 100%; background: var(--green); }

.auth-strength-text {
    font-size: .775rem;
    color: var(--surface-muted);
    margin-top: 6px;
    line-height: 1.4;
}
@media (min-width: 960px) {
    .auth-strength  { background: #e2e8f0; }
    .auth-strength-text { color: #6b7280; }
    .auth-page.dark-mode .auth-strength { background: #2a3042; }
    .auth-page.dark-mode .auth-strength-text { color: var(--surface-muted); }
}

/* ─────────────────────────────────────────────────────────
   16. SEED PHRASE PANEL
───────────────────────────────────────────────────────── */
.auth-phrase-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(74,222,128,.08);
    border-left: 4px solid var(--green);
    margin-bottom: 16px;
    font-size: .875rem;
    color: var(--surface-muted);
    line-height: 1.5;
}
.auth-phrase-info i { color: var(--green); font-size: 1.2rem; flex-shrink: 0; margin-top: 1px; }

.seed-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
    margin-bottom: 16px;
}
.seed-cell {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--surface-500);
    border-radius: 9px;
    overflow: hidden;
    background: var(--surface-600);
    transition: border-color var(--t);
}
.seed-cell:focus-within {
    border-color: var(--green);
    box-shadow: 0 0 0 2px var(--green-dim);
}
@media (min-width: 960px) {
    .seed-cell { border-color: var(--light-border); background: #fff; }
    .auth-page.dark-mode .seed-cell { border-color: #2a3042; background: #1e2330; }
}
.seed-num {
    width: 26px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(74,222,128,.1);
    color: var(--green);
    font-size: 10px;
    font-weight: 800;
    flex-shrink: 0;
    letter-spacing: .3px;
}
.seed-cell input {
    flex: 1;
    height: 40px;
    padding: 0 7px;
    border: none;
    background: transparent;
    color: var(--surface-text);
    font-family: 'Courier New', monospace;
    font-size: 12.5px;
    min-width: 0;
    outline: none;
}
@media (min-width: 960px) {
    .seed-cell input { color: var(--light-text); font-size: 13px; }
    .auth-page.dark-mode .seed-cell input { color: var(--surface-text); }
}

/* ─────────────────────────────────────────────────────────
   17. TOAST NOTIFICATION
───────────────────────────────────────────────────────── */
.auth-toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--surface-900);
    color: #fff;
    padding: 13px 22px;
    border-radius: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .875rem;
    font-weight: 500;
    box-shadow: 0 8px 32px rgba(0,0,0,.45);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity .22s ease, visibility .22s ease;
    white-space: nowrap;
    backdrop-filter: blur(12px);
    border: 1px solid var(--surface-border);
    max-width: calc(100vw - 40px);
}
.auth-toast.active  { opacity: 1; visibility: visible; }
.auth-toast.success { background: rgba(22,101,52,.97);  border-color: rgba(74,222,128,.3); }
.auth-toast.error   { background: rgba(153,27,27,.97);  border-color: rgba(248,113,113,.3); }
.auth-toast.warning { background: rgba(120,53,15,.97);  border-color: rgba(251,191,36,.3); }
.auth-toast.info    { background: rgba(30,58,138,.97);  border-color: rgba(96,165,250,.3); }

/* ─────────────────────────────────────────────────────────
   18. SMALL PHONE  (≤ 414px)
───────────────────────────────────────────────────────── */
@media (max-width: 414px) {
    .auth-card       { padding: 28px 20px 24px; border-radius: 16px; }
    .auth-title      { font-size: 1.65rem; }
    .auth-subtitle   { font-size: .85rem; }
    .auth-tab        { font-size: .8rem; padding: 10px 4px; gap: 5px; }
    .seed-grid       { grid-template-columns: repeat(2, 1fr); gap: 6px; }
    .auth-right      { padding: 24px 16px 40px; }
}

/* ─────────────────────────────────────────────────────────
   19. LANDSCAPE PHONE
───────────────────────────────────────────────────────── */
@media (max-height: 600px) and (orientation: landscape) and (max-width: 959px) {
    .auth-right     { padding: 16px 16px 32px; }
    .auth-card      { padding: 22px 20px 20px; }
    .auth-subtitle  { margin-bottom: 16px; }
    .auth-field     { margin-bottom: 14px; }
    .auth-input     { height: 46px; }
    .auth-pw-btn    { height: 46px; }
    .auth-btn       { height: 46px; font-size: .9rem; }
    .auth-steps     { margin-bottom: 18px; }
}

/* ─────────────────────────────────────────────────────────
   20. REDUCED MOTION
───────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .lp-left-top, .lp-left-mid, .lp-left-bottom, .auth-card { animation: none !important; }
    .auth-input, .auth-btn, .auth-strength-fill               { transition: none !important; }
}

/* ─────────────────────────────────────────────────────────
   21. KEYFRAMES
───────────────────────────────────────────────────────── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0);    }
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ─────────────────────────────────────────────────────────
   22. STEP INDICATOR VARIANTS
   Step 1 active = default (first child green).
   Step 2 active — second bar green.
   Step 3 active — third bar green.
───────────────────────────────────────────────────────── */
.auth-steps.step-2 .auth-step:first-child  { background: var(--surface-500); }
.auth-steps.step-2 .auth-step:nth-child(2) { background: var(--green); width: 40px; }

.auth-steps.step-3 .auth-step:first-child  { background: var(--surface-500); }
.auth-steps.step-3 .auth-step:nth-child(2) { background: var(--surface-500); }
.auth-steps.step-3 .auth-step:last-child   { background: var(--green); width: 40px; }

@media (min-width: 960px) {
    .auth-steps.step-2 .auth-step:first-child  { background: #e2e8f0; }
    .auth-steps.step-2 .auth-step:nth-child(2) { background: var(--green-mid); }
    .auth-steps.step-3 .auth-step:first-child,
    .auth-steps.step-3 .auth-step:nth-child(2) { background: #e2e8f0; }
    .auth-steps.step-3 .auth-step:last-child   { background: var(--green-mid); }

    .auth-page.dark-mode .auth-steps.step-2 .auth-step:first-child  { background: #2a3042; }
    .auth-page.dark-mode .auth-steps.step-3 .auth-step:first-child,
    .auth-page.dark-mode .auth-steps.step-3 .auth-step:nth-child(2) { background: #2a3042; }
}

/* ─────────────────────────────────────────────────────────
   23. ICON BADGE  (large icon above card title)
───────────────────────────────────────────────────────── */
.auth-icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(74, 222, 128, .12);
    border: 1px solid rgba(74, 222, 128, .2);
    font-size: 1.5rem;
    color: var(--green);
    margin-bottom: 20px;
    flex-shrink: 0;
}
@media (min-width: 960px) {
    .auth-icon-badge { color: var(--green-mid); border-color: rgba(34,197,94,.25); background: rgba(34,197,94,.08); }
    .auth-page.dark-mode .auth-icon-badge { color: var(--green); background: rgba(74,222,128,.12); border-color: rgba(74,222,128,.2); }
}

/* ─────────────────────────────────────────────────────────
   24. OTP / VERIFICATION CODE INPUT
───────────────────────────────────────────────────────── */
.auth-input--otp {
    text-align: center;
    letter-spacing: 12px;
    font-size: 1.5rem !important;
    font-weight: 700;
    font-family: 'Courier New', 'Courier', monospace;
    padding-left: var(--inp-pad-l);
    padding-right: 16px;
}
/* iOS: must stay ≥16px to avoid zoom, but keep it readable */
@media (max-width: 959px) {
    .auth-input--otp { font-size: 1.25rem !important; letter-spacing: 10px; }
}

/* ─────────────────────────────────────────────────────────
   25. EMAIL PILL  (shows recipient address in OTP screens)
───────────────────────────────────────────────────────── */
.auth-email-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(74, 222, 128, .1);
    border: 1px solid rgba(74, 222, 128, .2);
    color: var(--green);
    font-weight: 600;
    font-size: .875rem;
    padding: 7px 16px;
    border-radius: 30px;
    word-break: break-all;
    max-width: 100%;
    margin-bottom: 6px;
}
@media (min-width: 960px) {
    .auth-email-pill { color: var(--green-dark); background: rgba(34,197,94,.08); border-color: rgba(34,197,94,.2); }
    .auth-page.dark-mode .auth-email-pill { color: var(--green); background: rgba(74,222,128,.1); border-color: rgba(74,222,128,.2); }
}

/* ─────────────────────────────────────────────────────────
   26. OTP EXPIRY COUNTDOWN
───────────────────────────────────────────────────────── */
.auth-expiry {
    font-size: .8rem;
    color: var(--surface-muted);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.auth-expiry strong { color: var(--surface-text); font-weight: 700; }
.auth-expiry.expiring { color: #f87171; }
.auth-expiry.expiring strong { color: #f87171; }

@media (min-width: 960px) {
    .auth-expiry { color: var(--light-muted); }
    .auth-expiry strong { color: var(--light-text); }
    .auth-page.dark-mode .auth-expiry { color: var(--surface-muted); }
    .auth-page.dark-mode .auth-expiry strong { color: var(--surface-text); }
}

/* ─────────────────────────────────────────────────────────
   27. RESEND SECTION
───────────────────────────────────────────────────────── */
.auth-resend {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--surface-border);
}
@media (min-width: 960px) {
    .auth-resend { border-top-color: var(--light-border); }
    .auth-page.dark-mode .auth-resend { border-top-color: var(--dark-border); }
}
.auth-resend-label {
    font-size: .8rem;
    color: var(--surface-muted);
    margin-bottom: 10px;
}
@media (min-width: 960px) {
    .auth-resend-label { color: var(--light-muted); }
    .auth-page.dark-mode .auth-resend-label { color: var(--surface-muted); }
}
.auth-resend-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--green);
    font-weight: 700;
    font-size: .9rem;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 8px;
    font-family: var(--f-body);
    transition: background var(--t), color var(--t);
}
.auth-resend-btn:hover:not(:disabled) {
    background: var(--green-dim);
}
.auth-resend-btn:disabled { opacity: .4; cursor: not-allowed; }
@media (min-width: 960px) {
    .auth-resend-btn { color: var(--green-mid); }
    .auth-page.dark-mode .auth-resend-btn { color: var(--green); }
}
.auth-resend-countdown {
    font-size: .78rem;
    color: var(--surface-muted);
    margin-top: 8px;
}
@media (min-width: 960px) {
    .auth-resend-countdown { color: var(--light-muted); }
    .auth-page.dark-mode .auth-resend-countdown { color: var(--surface-muted); }
}

/* ─────────────────────────────────────────────────────────
   28. INFO / NEXT-STEP BOX  (used on password reset request)
───────────────────────────────────────────────────────── */
.auth-info-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(96, 165, 250, .08);
    border-left: 4px solid #60a5fa;
    margin-bottom: 20px;
    font-size: .875rem;
    line-height: 1.55;
}
.auth-info-box i { color: #60a5fa; font-size: 1.15rem; flex-shrink: 0; margin-top: 1px; }
.auth-info-box-content { flex: 1; }
.auth-info-box strong { display: block; color: var(--surface-text); font-weight: 700; margin-bottom: 4px; }
.auth-info-box p { margin: 0; color: var(--surface-muted); }

@media (min-width: 960px) {
    .auth-info-box { background: #eff6ff; border-left-color: #3b82f6; }
    .auth-info-box i { color: #3b82f6; }
    .auth-info-box strong { color: var(--light-text); }
    .auth-info-box p { color: var(--light-muted); }
    .auth-page.dark-mode .auth-info-box { background: rgba(96,165,250,.08); border-left-color: #60a5fa; }
    .auth-page.dark-mode .auth-info-box i { color: #60a5fa; }
    .auth-page.dark-mode .auth-info-box strong { color: var(--surface-text); }
    .auth-page.dark-mode .auth-info-box p { color: var(--surface-muted); }
}

/* ─────────────────────────────────────────────────────────
   29. MULTIPLE AUTH-FOOT LINKS  (stacked)
───────────────────────────────────────────────────────── */
.auth-foot + .auth-foot {
    margin-top: 10px;
    padding-top: 0;
    border-top: none;
}