/* ================================================================
   Third Echelon Tech — Auth Pages
   Standalone CSS for login, register, forgot, reset
   Dark hero aesthetic matching the landing page
   ================================================================ */

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

:root {
    --accent:      #2563eb;
    --accent-dark: #1d4ed8;
    --accent-glow: rgba(37,99,235,.18);
    --purple:      #7c3aed;
    --bg:          #f8fafc;
    --surface:     #ffffff;
    --surface-2:   #f1f5f9;
    --t1:          #0f172a;
    --t2:          #64748b;
    --t3:          #94a3b8;
    --border:      #e2e8f0;
    --border-2:    #cbd5e1;
    --hero:        #080d1a;
    --hero-s:      rgba(255,255,255,.06);
    --hero-b:      rgba(255,255,255,.10);
    --sh:    0 4px 20px rgba(0,0,0,.08);
    --sh-lg: 0 20px 60px rgba(0,0,0,.14);
    --font:  'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --r:     8px; --r-lg: 12px; --r-xl: 18px;
}
html.dark {
    --bg:       #0d0d0d;
    --surface:  #161616;
    --surface-2:#1e1e1e;
    --t1:       #f1f5f9;
    --t2:       #94a3b8;
    --t3:       #475569;
    --border:   #282828;
    --border-2: #333333;
    --sh-lg:    0 20px 60px rgba(0,0,0,.5);
}

body {
    font-family: var(--font);
    background: var(--hero);
    color: var(--t1);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ── Dot grid ── */
body::before {
    content: '';
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 40%, black 20%, transparent 100%);
}

/* ── Orbs ── */
.auth-orb {
    position: fixed; border-radius: 50%; pointer-events: none;
    filter: blur(80px); z-index: 0;
}
.auth-orb-1 { width: 500px; height: 500px; background: radial-gradient(#2563eb, transparent 70%); top: -100px; left: 30%; opacity: .22; }
.auth-orb-2 { width: 300px; height: 300px; background: radial-gradient(#7c3aed, transparent 70%); bottom: 0; right: 5%; opacity: .18; }

/* ════════════════════════════════════════════
   SPLIT LAYOUT  (login / register)
════════════════════════════════════════════ */
.auth-split {
    position: relative; z-index: 1;
    display: flex; min-height: 100vh;
}

/* ── Left brand panel ── */
.auth-panel {
    flex: 0 0 420px;
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 48px 52px;
    border-right: 1px solid var(--hero-b);
    position: relative; overflow: hidden;
}
.auth-panel::before {
    content: ''; position: absolute; top: -80px; right: -60px;
    width: 360px; height: 360px; border-radius: 50%;
    background: radial-gradient(rgba(37,99,235,.18), transparent 70%);
    pointer-events: none;
}
.auth-panel::after {
    content: ''; position: absolute; bottom: -80px; left: -60px;
    width: 280px; height: 280px; border-radius: 50%;
    background: radial-gradient(rgba(124,58,237,.14), transparent 70%);
    pointer-events: none;
}

/* Brand mark */
.auth-brand { position: relative; z-index: 1; }
.auth-brand__mark {
    width: 44px; height: 44px; border-radius: 12px;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 14px rgba(37,99,235,.4);
    margin-bottom: 20px;
}
.auth-brand__mark svg { color: #fff; width: 22px; height: 22px; }
.auth-brand__name {
    font-size: 22px; font-weight: 800; color: #fff; line-height: 1.2;
    letter-spacing: -.02em; margin-bottom: 10px;
}
.auth-brand__sub {
    font-size: 13.5px; color: rgba(255,255,255,.4); line-height: 1.7;
    max-width: 300px;
}

/* Feature list */
.auth-features {
    position: relative; z-index: 1;
    display: flex; flex-direction: column; gap: 14px;
    margin: auto 0;
    padding: 36px 0;
}
.auth-feat {
    display: flex; align-items: center; gap: 14px;
}
.auth-feat__icon {
    width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1);
}
.auth-feat__icon svg { width: 16px; height: 16px; color: #93c5fd; }
.auth-feat__text { font-size: 13.5px; color: rgba(255,255,255,.6); font-weight: 500; }

/* Stats row */
.auth-stats {
    position: relative; z-index: 1;
    display: grid; grid-template-columns: repeat(3,1fr);
    gap: 0;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px; overflow: hidden;
}
.auth-stat {
    padding: 14px 12px; text-align: center;
    border-right: 1px solid rgba(255,255,255,.08);
}
.auth-stat:last-child { border-right: none; }
.auth-stat__num { font-size: 20px; font-weight: 800; color: #fff; letter-spacing: -.02em; }
.auth-stat__lbl { font-size: 10px; color: rgba(255,255,255,.35); margin-top: 2px; text-transform: uppercase; letter-spacing: .4px; }

/* Back link */
.auth-back {
    position: relative; z-index: 1;
    display: inline-flex; align-items: center; gap: 7px;
    color: rgba(255,255,255,.35); font-size: 12.5px; text-decoration: none;
    transition: color .15s; margin-top: 28px;
}
.auth-back svg { width: 14px; height: 14px; }
.auth-back:hover { color: rgba(255,255,255,.65); }

/* ── Right form side ── */
.auth-form-side {
    flex: 1;
    display: flex; align-items: center; justify-content: center;
    padding: 48px 40px;
    overflow-y: auto;
}

.auth-card {
    width: 100%; max-width: 420px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 40px 38px;
    box-shadow: var(--sh-lg);
}
html.dark .auth-card {
    background: #111111;
    border-color: #252525;
    box-shadow: 0 20px 60px rgba(0,0,0,.6);
}

.auth-card__eyebrow {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase;
    color: var(--accent); margin-bottom: 10px;
}
.auth-card__eyebrow-dot { width: 5px; height: 5px; background: var(--accent); border-radius: 50%; }
.auth-card__title {
    font-size: 26px; font-weight: 800; color: var(--t1);
    letter-spacing: -.02em; margin-bottom: 6px;
}
.auth-card__sub {
    font-size: 14px; color: var(--t2); margin-bottom: 32px; line-height: 1.5;
}

/* ── Form fields with icons ── */
.afield { display: flex; flex-direction: column; gap: 0; }
.afield + .afield { margin-top: 16px; }
.afield__label {
    display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .4px;
    text-transform: uppercase; color: var(--t2); margin-bottom: 7px;
}
.afield__wrap { position: relative; }
.afield__ico {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    width: 16px; height: 16px; color: var(--t3); pointer-events: none; flex-shrink: 0;
}
.afield__input {
    width: 100%; padding: 13px 14px 13px 42px;
    background: var(--surface-2); border: 1.5px solid var(--border);
    border-radius: var(--r-lg); font-size: 14.5px; color: var(--t1);
    font-family: var(--font); outline: none; transition: all .15s;
    -webkit-appearance: none;
}
.afield__input::placeholder { color: var(--t3); }
.afield__input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: var(--surface);
}
html.dark .afield__input { background: #1a1a1a; border-color: #2a2a2a; color: var(--t1); }
html.dark .afield__input:focus { background: #1e1e1e; border-color: var(--accent); }

/* Password toggle */
.afield__toggle {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; padding: 4px;
    color: var(--t3); border-radius: 6px; transition: color .15s;
    display: flex; align-items: center;
}
.afield__toggle:hover { color: var(--t1); }
.afield__input--pw { padding-right: 44px; }

/* Alert */
.auth-alert {
    padding: 12px 14px; border-radius: var(--r-lg); font-size: 13.5px;
    display: flex; align-items: flex-start; gap: 9px; margin-bottom: 20px;
}
.auth-alert--error {
    background: rgba(220,38,38,.08); border: 1px solid rgba(220,38,38,.2); color: #dc2626;
}
.auth-alert--success {
    background: rgba(22,163,74,.08); border: 1px solid rgba(22,163,74,.2); color: #16a34a;
}
html.dark .auth-alert--error  { background: rgba(220,38,38,.12); color: #fca5a5; }
html.dark .auth-alert--success { background: rgba(22,163,74,.12); color: #86efac; }
.auth-alert svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 1px; }

/* Submit button */
.auth-submit {
    width: 100%; padding: 13px 20px; margin-top: 24px;
    background: var(--accent); color: #fff;
    border: none; border-radius: var(--r-lg);
    font-size: 15px; font-weight: 700; font-family: var(--font);
    cursor: pointer; transition: all .17s;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    box-shadow: 0 2px 8px rgba(37,99,235,.3);
}
.auth-submit:hover { background: var(--accent-dark); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(37,99,235,.4); }
.auth-submit:active { transform: translateY(0); }
.auth-submit svg { width: 16px; height: 16px; }

/* Links row */
.auth-links {
    display: flex; flex-direction: column; align-items: center;
    gap: 10px; margin-top: 20px;
}
.auth-link { font-size: 13px; color: var(--t2); text-align: center; }
.auth-link a { color: var(--accent); font-weight: 600; text-decoration: none; }
.auth-link a:hover { text-decoration: underline; }

/* Divider */
.auth-divider {
    display: flex; align-items: center; gap: 12px; margin: 24px 0;
}
.auth-divider::before, .auth-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--border);
}
.auth-divider span { font-size: 11px; color: var(--t3); white-space: nowrap; }

/* Fieldset (register) */
.auth-fieldset {
    border: 1px solid var(--border); border-radius: var(--r-lg);
    padding: 18px 20px 20px; margin-bottom: 20px;
}
.auth-fieldset__legend {
    font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
    color: var(--t3); padding: 0 6px; margin-left: 6px;
}

/* ════════════════════════════════════════════
   CENTERED  (forgot / reset / centered card)
════════════════════════════════════════════ */
.auth-center {
    position: relative; z-index: 1;
    min-height: 100vh;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 40px 24px;
}
.auth-center__back {
    position: fixed; top: 22px; left: 26px;
    display: flex; align-items: center; gap: 7px;
    color: rgba(255,255,255,.4); font-size: 13px; text-decoration: none;
    transition: color .15s; z-index: 10;
}
.auth-center__back svg { width: 15px; height: 15px; }
.auth-center__back:hover { color: rgba(255,255,255,.75); }
.auth-center__logo {
    display: flex; align-items: center; gap: 10px; margin-bottom: 32px;
    text-decoration: none;
}
.auth-center__mark {
    width: 38px; height: 38px; border-radius: 10px;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 3px 12px rgba(37,99,235,.4);
}
.auth-center__mark svg { color: #fff; width: 18px; height: 18px; }
.auth-center__name { font-size: 15px; font-weight: 800; color: #fff; letter-spacing: -.01em; }
.auth-center .auth-card { max-width: 400px; }

/* ── Responsive ── */
@media (max-width: 860px) {
    .auth-split { flex-direction: column; }
    .auth-panel {
        flex: none; padding: 32px 28px 24px;
        border-right: none; border-bottom: 1px solid var(--hero-b);
    }
    .auth-features { display: none; }
    .auth-stats { display: none; }
    .auth-panel::before, .auth-panel::after { display: none; }
    .auth-brand { display: flex; flex-direction: row; align-items: center; gap: 12px; }
    .auth-brand__mark { margin-bottom: 0; flex-shrink: 0; }
    .auth-brand__name { font-size: 17px; margin-bottom: 0; }
    .auth-brand__sub { display: none; }
    .auth-back { display: none; }
    .auth-form-side { padding: 32px 20px; }
    .auth-card { padding: 28px 24px; }
}
@media (max-width: 480px) {
    .auth-card { padding: 24px 20px; }
}
