/* =============================================================================
   auth.css — Login + Access pages (GST Verification System)
   Split screen: animated GST illustration (aside) + form card. Light / dark aware.
   ============================================================================= */
:root {
    --a-primary: #0074FF;
    --a-primary-2: #4da3ff;
    --a-primary-ink: #ffffff;
    --a-ink: #1C2430;
    --a-muted: #66758a;
    --a-bg: #f3f6fb;
    --a-card: #ffffff;
    --a-line: #e1e8f2;
    --a-field: #f7f9fc;
    --a-ok: #16a34a;
    --a-bad: #e5484d;
    --a-warn-bg: #fff6e5;
    --a-warn-ink: #8a5a00;
    --a-gold: #f5a524;
    --a-navy-1: #08142b;
    --a-navy-2: #0d2552;
    --a-shadow: 0 24px 60px -24px rgba(16, 42, 92, .28), 0 2px 6px rgba(16, 42, 92, .06);
    --a-ease: cubic-bezier(.2, .8, .2, 1);
    --a-thumb: #c5d2e6;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --a-ink: #e8eefa;
        --a-muted: #95a6c3;
        --a-bg: #081227;
        --a-card: #0f1d3a;
        --a-line: #20335a;
        --a-field: #0a1630;
        --a-warn-bg: #2b2414;
        --a-warn-ink: #f3c46b;
        --a-thumb: #2a4272;
        --a-shadow: 0 30px 70px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(77, 163, 255, .06);
    }
}
:root[data-theme="dark"] {
    --a-ink: #e8eefa;
    --a-muted: #95a6c3;
    --a-bg: #081227;
    --a-card: #0f1d3a;
    --a-line: #20335a;
    --a-field: #0a1630;
    --a-warn-bg: #2b2414;
    --a-warn-ink: #f3c46b;
    --a-thumb: #2a4272;
    --a-shadow: 0 30px 70px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(77, 163, 255, .06);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }

/* slim scrollbars */
html, .auth-main { scrollbar-width: thin; scrollbar-color: var(--a-thumb) transparent; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--a-thumb); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--a-primary); }
body.auth {
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--a-bg);
    color: var(--a-ink);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
.d-none { display: none !important; }
a { color: var(--a-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- shell */
.auth-shell { display: flex; height: 100vh; height: 100dvh; overflow: hidden; }

.auth-aside {
    position: relative;
    flex: 0 0 46%;
    max-width: 680px;
    display: flex;
    flex-direction: column;
    padding: clamp(20px, 4vh, 40px) clamp(24px, 3.5vw, 48px) clamp(18px, 3.5vh, 32px);
    color: #fff;
    background:
        radial-gradient(900px 500px at 110% -10%, rgba(0, 116, 255, .45), transparent 60%),
        radial-gradient(700px 500px at -20% 110%, rgba(77, 163, 255, .25), transparent 60%),
        linear-gradient(160deg, var(--a-navy-1), var(--a-navy-2));
    overflow: hidden;
}
.auth-aside::before {   /* faint dot grid */
    content: "";
    position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: linear-gradient(180deg, transparent, #000 25%, #000 75%, transparent);
    pointer-events: none;
}
.auth-brand { position: relative; display: flex; align-items: center; gap: 12px; animation: aFadeDown .7s var(--a-ease) both; }
.auth-brand img { height: 38px; width: auto; background: #fff; border-radius: 10px; padding: 4px 8px; }
.auth-brand span { font-weight: 700; letter-spacing: .2px; opacity: .92; }

.auth-aside h1 {
    position: relative;
    font-size: clamp(26px, 2.6vw, 36px);
    line-height: 1.15;
    margin: clamp(14px, 4vh, 36px) 0 8px;
    font-weight: 800;
    animation: aFadeUp .8s .1s var(--a-ease) both;
}
.auth-aside h1 em {
    font-style: normal;
    background: linear-gradient(90deg, #8cc4ff, #ffffff 60%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.auth-aside > p { position: relative; margin: 0; max-width: 440px; color: rgba(255, 255, 255, .72); line-height: 1.6; animation: aFadeUp .8s .2s var(--a-ease) both; }

.auth-art { position: relative; flex: 1 1 0; display: flex; align-items: center; justify-content: center; min-height: 0; margin: clamp(8px, 2vh, 18px) 0; animation: aZoomIn 1s .25s var(--a-ease) both; }
.auth-art svg { width: auto; height: 100%; max-width: 100%; max-height: 100%; overflow: visible; }

.auth-pills { position: relative; display: flex; flex-wrap: wrap; gap: 10px; }
.auth-pills span {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 14px; border-radius: 999px;
    background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14);
    font-size: 13px; color: rgba(255, 255, 255, .9);
    backdrop-filter: blur(6px);
    animation: aFadeUp .7s var(--a-ease) both;
}
.auth-pills span:nth-child(1) { animation-delay: .45s; }
.auth-pills span:nth-child(2) { animation-delay: .55s; }
.auth-pills span:nth-child(3) { animation-delay: .65s; }
.auth-pills i { width: 8px; height: 8px; border-radius: 50%; background: var(--a-primary-2); box-shadow: 0 0 0 4px rgba(77, 163, 255, .2); }
.auth-pills span:nth-child(2) i { background: #34d399; box-shadow: 0 0 0 4px rgba(52, 211, 153, .2); }
.auth-pills span:nth-child(3) i { background: var(--a-gold); box-shadow: 0 0 0 4px rgba(245, 165, 36, .2); }

/* ---------------------------------------------------------------- main + card */
.auth-main {
    flex: 1;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 24px 16px;
    position: relative;
    overflow-y: auto;
}
.auth-main::before {   /* soft glow behind the card */
    content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%;
    background: radial-gradient(closest-side, rgba(0, 116, 255, .12), transparent);
    animation: aGlow 8s ease-in-out infinite alternate;
    pointer-events: none;
}
.auth-card {
    position: relative;
    width: 100%; max-width: 420px;
    background: var(--a-card);
    border: 1px solid var(--a-line);
    border-radius: 22px;
    box-shadow: var(--a-shadow);
    padding: 36px 32px 28px;
    animation: aCardIn .8s .15s var(--a-ease) both;
}
.auth-mobile-brand { display: none; text-align: center; margin-bottom: 18px; }
.auth-mobile-brand img { height: 40px; }
.auth-mobile-brand svg { display: block; width: 64px; height: 64px; margin: 14px auto 0; }

.auth-card h2 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.3px; }
.auth-card .auth-sub { margin: 6px 0 24px; color: var(--a-muted); font-size: 14.5px; }

.auth-alert {
    display: flex; gap: 10px; align-items: flex-start;
    background: var(--a-warn-bg); color: var(--a-warn-ink);
    border-radius: 12px; padding: 10px 14px; margin-bottom: 18px; font-size: 14px;
    animation: aShake .5s .6s both;
}

/* ---------------------------------------------------------------- fields */
.auth-step { animation: aStepIn .5s var(--a-ease) both; }
.auth-field { margin-bottom: 16px; }
.auth-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; color: var(--a-ink); }
.auth-input { position: relative; }
.auth-input > svg {
    position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%);
    stroke: var(--a-muted); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
    transition: stroke .2s;
    pointer-events: none;
}
.auth-input input {
    width: 100%; height: 50px;
    padding: 0 46px 0 44px;
    font: inherit; font-size: 15px; color: var(--a-ink);
    background: var(--a-field);
    border: 1.5px solid var(--a-line);
    border-radius: 13px;
    outline: none;
    transition: border-color .2s, box-shadow .25s, background .2s;
}
.auth-input input::placeholder { color: var(--a-muted); opacity: .75; }
.auth-input input:focus { border-color: var(--a-primary); background: var(--a-card); box-shadow: 0 0 0 4px rgba(0, 116, 255, .14); }
.auth-input:focus-within > svg { stroke: var(--a-primary); }
.auth-eye {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    width: 38px; height: 38px; border: 0; border-radius: 10px; background: transparent; cursor: pointer;
    display: grid; place-items: center; color: var(--a-muted);
}
.auth-eye:hover { background: rgba(0, 116, 255, .08); color: var(--a-primary); }
.auth-eye svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.auth-eye .slash { transition: stroke-dashoffset .25s var(--a-ease); stroke-dasharray: 24; stroke-dashoffset: 24; }
.auth-eye.is-on .slash { stroke-dashoffset: 0; }

.auth-otp input { text-align: center; letter-spacing: 12px; font-size: 22px; font-weight: 700; padding: 0 16px; }
.auth-otp-note { text-align: center; color: var(--a-muted); font-size: 14px; margin: 0 0 18px; }
.auth-otp-note b { color: var(--a-ink); }
.auth-otp-icon { display: block; width: 74px; height: 74px; margin: 0 auto 14px; }

/* ---------------------------------------------------------------- button */
.auth-btn {
    position: relative; overflow: hidden;
    width: 100%; height: 50px; margin-top: 8px;
    border: 0; border-radius: 13px; cursor: pointer;
    font: inherit; font-weight: 700; font-size: 15.5px; letter-spacing: .2px;
    color: var(--a-primary-ink);
    background: linear-gradient(135deg, var(--a-primary), #2e8cff);
    box-shadow: 0 12px 24px -12px rgba(0, 116, 255, .7);
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    transition: transform .2s var(--a-ease), box-shadow .25s, filter .2s;
}
.auth-btn::after {   /* shimmer */
    content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent);
    transform: skewX(-20deg);
    transition: left .7s var(--a-ease);
}
.auth-btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 16px 30px -12px rgba(0, 116, 255, .8); }
.auth-btn:hover::after { left: 120%; }
.auth-btn:active { transform: translateY(1px) scale(.99); }
.auth-btn:focus-visible { outline: 3px solid rgba(0, 116, 255, .35); outline-offset: 2px; }
.auth-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--a-ease); }
.auth-btn:hover svg { transform: translateX(3px); }
.auth-btn.ghost { background: transparent; color: var(--a-primary); border: 1.5px solid var(--a-line); box-shadow: none; }
.auth-btn.ghost:hover { border-color: var(--a-primary); }

.auth-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 14px; margin-top: 22px; font-size: 13.5px; color: var(--a-muted); }
.auth-back { display: block; text-align: center; margin-top: 16px; font-size: 14px; }
.auth-foot { position: relative; margin-top: 22px; font-size: 12.5px; color: var(--a-muted); text-align: center; animation: aFadeUp .7s .5s var(--a-ease) both; }

/* ---------------------------------------------------------------- art: shared SVG parts */
.art-card { filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .35)); }
.art-line { transform-box: fill-box; transform-origin: left center; animation: aGrowX 1s .8s var(--a-ease) both; }
.art-line:nth-of-type(2) { animation-delay: .9s; } .art-line:nth-of-type(3) { animation-delay: 1s; }
.art-line:nth-of-type(4) { animation-delay: 1.1s; } .art-line:nth-of-type(5) { animation-delay: 1.2s; }
.art-line:nth-of-type(6) { animation-delay: 1.3s; } .art-line:nth-of-type(7) { animation-delay: 1.4s; }
.art-scan { animation: aScan 3.6s 1.2s ease-in-out infinite; }
.art-lens { animation: aLens 6s 1.2s ease-in-out infinite; }
.art-flow { stroke-dasharray: 4 10; animation: aDash 1.2s linear infinite; }
.art-flow.slow { animation-duration: 1.8s; }
.art-float { transform-box: fill-box; transform-origin: center; animation: aBob 5s ease-in-out infinite; }
.art-float.d1 { animation-delay: -1.5s; animation-duration: 6s; }
.art-float.d2 { animation-delay: -3s; animation-duration: 5.5s; }
.art-float.d3 { animation-delay: -.7s; animation-duration: 7s; }
.art-pulse { transform-box: fill-box; transform-origin: center; animation: aPulse 2.4s 2.2s ease-out infinite; }
.art-check { stroke-dasharray: 1; stroke-dashoffset: 1; animation: aDraw .7s 2s var(--a-ease) forwards; }
.art-badge { transform-box: fill-box; transform-origin: center; animation: aPop .6s 1.8s var(--a-ease) both; }
.art-type { animation: aType 1.4s 1.4s steps(15) both; }
.art-blink { animation: aBlink 1.2s steps(2) infinite; }
.art-node { transform-box: fill-box; transform-origin: center; animation: aPop .6s var(--a-ease) both; }
.art-spin { transform-box: fill-box; transform-origin: center; animation: aSpin 14s linear infinite; }
.art-spin.rev { animation-direction: reverse; animation-duration: 20s; }

/* ---------------------------------------------------------------- keyframes */
@keyframes aFadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes aFadeDown { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
@keyframes aZoomIn { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@keyframes aCardIn { from { opacity: 0; transform: translateY(26px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes aStepIn { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: none; } }
@keyframes aShake { 0%, 100% { transform: none; } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(3px); } }
@keyframes aGlow { from { transform: translate(-40px, -30px) scale(1); } to { transform: translate(40px, 30px) scale(1.15); } }
@keyframes aGrowX { from { transform: scaleX(0); opacity: 0; } to { transform: scaleX(1); opacity: 1; } }
@keyframes aScan { 0% { transform: translateY(0); opacity: 0; } 10% { opacity: 1; } 50% { transform: translateY(196px); opacity: 1; } 60% { opacity: 0; } 100% { transform: translateY(0); opacity: 0; } }
@keyframes aLens { 0%, 100% { transform: translate(0, 0); } 30% { transform: translate(96px, 0); } 55% { transform: translate(60px, 62px); } 80% { transform: translate(0, 40px); } }
@keyframes aDash { to { stroke-dashoffset: -28; } }
@keyframes aBob { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-10px) rotate(4deg); } }
@keyframes aPulse { 0% { transform: scale(.85); opacity: .7; } 100% { transform: scale(1.8); opacity: 0; } }
@keyframes aDraw { to { stroke-dashoffset: 0; } }
@keyframes aPop { 0% { transform: scale(0); opacity: 0; } 70% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes aType { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes aBlink { 50% { opacity: 0; } }
@keyframes aSpin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- access page */
.ax-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px; position: relative; overflow: hidden; }
.ax-wrap::before, .ax-wrap::after {
    content: ""; position: absolute; border-radius: 50%; pointer-events: none;
    background: radial-gradient(closest-side, rgba(0, 116, 255, .16), transparent);
}
.ax-wrap::before { width: 620px; height: 620px; top: -220px; right: -180px; animation: aGlow 9s ease-in-out infinite alternate; }
.ax-wrap::after { width: 520px; height: 520px; bottom: -220px; left: -160px; animation: aGlow 11s ease-in-out infinite alternate-reverse; }
.ax-card { max-width: 460px; text-align: center; transition: transform .4s var(--a-ease), opacity .4s; }
.ax-card .auth-brand { justify-content: center; margin-bottom: 8px; color: var(--a-ink); }
.ax-card .auth-brand img { box-shadow: 0 0 0 1px var(--a-line); }
.ax-art { display: block; width: 100%; max-width: 330px; height: auto; margin: 4px auto 6px; overflow: visible; }
.ax-eyebrow { margin: 0; color: var(--a-primary); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.4px; }
.ax-card h2 { margin: 6px 0 6px; }
.ax-card .auth-sub { margin-bottom: 4px; }
.ax-card h2, .ax-card .auth-sub, .ax-eyebrow { transition: color .3s; }
.ax-swap { animation: aFadeUp .45s var(--a-ease) both; }

.ax-steps { list-style: none; padding: 0; margin: 22px 0 0; text-align: left; }
.ax-steps li {
    position: relative; display: flex; gap: 14px; align-items: flex-start;
    padding: 10px 12px; border-radius: 12px;
    opacity: .45; transform: translateX(-4px);
    transition: opacity .35s, transform .35s var(--a-ease), background .35s;
}
.ax-steps li + li::before {   /* connector */
    content: ""; position: absolute; left: 24px; top: -10px; width: 2px; height: 20px;
    background: var(--a-line); transition: background .4s;
}
.ax-steps li.is-ok + li::before { background: var(--a-ok); }
.ax-steps li.is-active, .ax-steps li.is-ok, .ax-steps li.is-bad { opacity: 1; transform: none; }
.ax-steps li.is-active { background: rgba(0, 116, 255, .07); }
.ax-steps b { display: block; font-size: 14.5px; }
.ax-steps small { display: block; color: var(--a-muted); font-size: 12.5px; margin-top: 2px; }
.ax-dot {
    flex: none; position: relative; width: 26px; height: 26px; border-radius: 50%;
    border: 2px solid var(--a-line); background: var(--a-card);
    display: grid; place-items: center;
    transition: background .3s, border-color .3s, transform .3s var(--a-ease);
}
.ax-dot svg { position: absolute; width: 14px; height: 14px; stroke: #fff; fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.ax-dot path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.ax-steps li.is-active .ax-dot { border-color: var(--a-primary); border-right-color: transparent; animation: aSpin .8s linear infinite; }
.ax-steps li.is-ok .ax-dot { background: var(--a-ok); border-color: var(--a-ok); animation: aPop .45s var(--a-ease); }
.ax-steps li.is-bad .ax-dot { background: var(--a-bad); border-color: var(--a-bad); animation: aPop .45s var(--a-ease); }
.ax-steps li.is-ok .ax-dot .i-ok, .ax-steps li.is-bad .ax-dot .i-bad { opacity: 1; }
.ax-steps li.is-ok .ax-dot .i-ok path, .ax-steps li.is-bad .ax-dot .i-bad path { animation: aDraw .4s .1s var(--a-ease) forwards; }

.ax-problem { margin-top: 18px; animation: aFadeUp .5s var(--a-ease) both; }
.ax-problem p { background: rgba(229, 72, 77, .1); color: var(--a-bad); border-radius: 12px; padding: 10px 14px; font-size: 14px; margin: 0 0 14px; }
.ax-actions { display: flex; flex-direction: column; gap: 10px; }
.ax-actions .auth-btn { margin: 0; text-decoration: none; }

/* states of the access art */
.ax-ring { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 2.4s var(--a-ease), stroke .4s; }
.ax-root[data-phase="pass"] .ax-ring { stroke-dashoffset: .66; }
.ax-root[data-phase="role"] .ax-ring { stroke-dashoffset: .33; }
.ax-root[data-phase="open"] .ax-ring, .ax-root.is-done .ax-ring { stroke-dashoffset: 0; }
.ax-root.is-done .ax-ring { stroke: var(--a-ok); }
.ax-root.is-failed .ax-ring { stroke: var(--a-bad); stroke-dashoffset: 0; }
.ax-mark-ok, .ax-mark-bad { stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; }
.ax-root.is-done .ax-mark-ok { opacity: 1; animation: aDraw .6s .2s var(--a-ease) forwards; }
.ax-root.is-failed .ax-mark-bad { opacity: 1; animation: aDraw .5s .1s var(--a-ease) forwards; }
.ax-root.is-done .ax-key, .ax-root.is-failed .ax-key { opacity: 0; transform: scale(.6); }
.ax-key { transform-box: fill-box; transform-origin: center; transition: opacity .3s, transform .4s var(--a-ease); }
.ax-root.is-failed .art-flow { animation-play-state: paused; stroke: var(--a-bad); }
.ax-root.is-done .art-flow { stroke: var(--a-ok); }
.ax-root.is-leaving .ax-card { animation: aLeave .4s var(--a-ease) forwards; }
@keyframes aLeave { to { opacity: 0; transform: translateY(-14px) scale(.98); } }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 991.98px) {
    .auth-aside { flex-basis: 42%; padding: 32px 28px; }
    .auth-pills { display: none; }
}
@media (max-width: 767.98px) {
    .auth-aside { display: none; }
    .auth-mobile-brand { display: block; }
    .auth-card { padding: 28px 22px 24px; border-radius: 18px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .art-scan { display: none; }
}

/* ---------------------------------------------------------------- fit + colour fixes */
.auth-main { overflow-x: hidden; justify-content: safe center; }
.auth-main > * { flex-shrink: 0; }

/* the browser's autofill paints inputs light blue: keep our field colours */
.auth-input input:-webkit-autofill,
.auth-input input:-webkit-autofill:hover,
.auth-input input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--a-ink);
    caret-color: var(--a-ink);
    -webkit-box-shadow: 0 0 0 1000px var(--a-field) inset;
    transition: background-color 9999s ease-out 0s;
}
.auth-input input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px var(--a-card) inset, 0 0 0 4px rgba(0, 116, 255, .14);
}

/* dark: the form side picks up the aside's navy so both halves read as one page */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .auth-main,
    :root:not([data-theme="light"]) .ax-wrap {
        background:
            radial-gradient(800px 500px at 0% 0%, rgba(0, 116, 255, .10), transparent 60%),
            radial-gradient(700px 500px at 100% 100%, rgba(77, 163, 255, .07), transparent 60%),
            var(--a-bg);
    }
    :root:not([data-theme="light"]) .auth-card { background: linear-gradient(180deg, #11213f, var(--a-card)); }
    :root:not([data-theme="light"]) .auth-btn.ghost { color: #8cc4ff; }
    :root:not([data-theme="light"]) a { color: #6fb2ff; }
}
:root[data-theme="dark"] .auth-main, :root[data-theme="dark"] .ax-wrap {
    background:
        radial-gradient(800px 500px at 0% 0%, rgba(0, 116, 255, .10), transparent 60%),
        radial-gradient(700px 500px at 100% 100%, rgba(77, 163, 255, .07), transparent 60%),
        var(--a-bg);
}
:root[data-theme="dark"] .auth-card { background: linear-gradient(180deg, #11213f, var(--a-card)); }
:root[data-theme="dark"] a { color: #6fb2ff; }

/* short screens: tighten so everything still fits without scrolling */
@media (max-height: 760px) and (min-width: 768px) {
    .auth-aside > p { font-size: 14px; line-height: 1.5; }
    .auth-pills span { padding: 6px 12px; font-size: 12px; }
    .auth-card { padding: 26px 28px 22px; }
    .auth-card .auth-sub { margin-bottom: 16px; }
    .auth-field { margin-bottom: 12px; }
    .auth-input input, .auth-btn { height: 46px; }
    .auth-foot { margin-top: 14px; }
}
@media (max-height: 620px) and (min-width: 768px) {
    .auth-pills, .auth-aside > p { display: none; }
}

/* phones: normal page scroll */
@media (max-width: 767.98px) {
    .auth-shell { height: auto; min-height: 100vh; min-height: 100dvh; overflow: visible; }
    .auth-main { overflow: visible; }
}

/* access page on shorter screens: keep the whole card in view */
@media (max-height: 860px) {
    .ax-wrap { padding: 16px; }
    .ax-card { padding: 22px 26px 20px; }
    .ax-art { max-width: 250px; margin: 0 auto; }
    .ax-card h2 { font-size: 22px; margin: 4px 0; }
    .ax-steps { margin-top: 12px; }
    .ax-steps li { padding: 6px 10px; }
    .ax-steps li + li::before { top: -6px; height: 12px; }
    .ax-problem { margin-top: 12px; }
    .ax-actions .auth-btn { height: 44px; }
    .ax-wrap .auth-foot { margin-top: 12px; }
}
@media (max-height: 680px) {
    .ax-art { max-width: 200px; }
    .ax-steps small { display: none; }
}

/* ---------------------------------------------------------------- custom alert (auth-alert.js) */
.aa-host { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; }
.aa-host[hidden] { display: none; }
.aa-backdrop {
    position: absolute; inset: 0;
    background: rgba(6, 14, 32, .48);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    animation: aaFade .25s ease both;
}
.aa-box {
    position: relative; overflow: hidden;
    width: 100%; max-width: 360px;
    background: var(--a-card);
    color: var(--a-ink);
    border: 1px solid var(--a-line);
    border-radius: 20px;
    box-shadow: var(--a-shadow), 0 30px 80px -20px rgba(0, 0, 0, .45);
    padding: 28px 26px 22px;
    text-align: center;
    isolation: isolate;
}
.aa-box.aa-in { animation: aaPop .42s var(--a-ease) both; }
.aa-host.is-closing .aa-backdrop { animation: aaFade .22s ease reverse forwards; }
.aa-host.is-closing .aa-box { animation: aaOut .22s ease forwards; }

.aa-icon { width: 64px; height: 64px; margin: 0 auto 14px; color: var(--a-primary); }
.aa-host[data-type="success"] .aa-icon { color: var(--a-ok); }
.aa-host[data-type="error"] .aa-icon { color: var(--a-bad); }
.aa-host[data-type="warning"] .aa-icon { color: var(--a-gold); }
.aa-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.aa-ring { stroke-dasharray: 1; stroke-dashoffset: 1; transform: rotate(-90deg); transform-origin: center; transform-box: fill-box; }
.aa-mark { stroke-dasharray: 1; stroke-dashoffset: 1; stroke-width: 4.5; }
.aa-dot { fill: currentColor; stroke: none; opacity: 0; transform-box: fill-box; transform-origin: center; }
.aa-in .aa-ring { animation: aDraw .5s .08s var(--a-ease) forwards; }
.aa-in .aa-mark { animation: aDraw .4s .45s var(--a-ease) forwards; }
.aa-in .aa-dot { animation: aPop .35s .55s var(--a-ease) forwards; }
.aa-host[data-type="error"] .aa-in .aa-icon svg { animation: aShake .45s .75s both; }
.aa-icon { position: relative; }
.aa-icon::after {   /* soft halo */
    content: ""; position: absolute; inset: -8px; border-radius: 50%;
    background: radial-gradient(closest-side, currentColor, transparent);
    opacity: .12; z-index: -1;
}
.aa-track { stroke: var(--a-line); stroke-width: 4.5; }
.aa-spin { stroke-width: 4.5; stroke-dasharray: .28 .72; transform-box: fill-box; transform-origin: center; animation: aSpin .9s linear infinite; }

.aa-title { margin: 0 0 6px; font-size: 19px; font-weight: 800; letter-spacing: -.2px; }
.aa-text { margin: 0; color: var(--a-muted); font-size: 14.5px; line-height: 1.55; }
.aa-text[hidden] { display: none; }
.aa-ok { margin-top: 20px; height: 46px; }
.aa-ok[hidden] { display: none; }
.aa-host[data-type="error"] .aa-ok { background: linear-gradient(135deg, #e5484d, #f06a6e); box-shadow: 0 12px 24px -12px rgba(229, 72, 77, .7); }
.aa-host[data-type="warning"] .aa-ok { background: linear-gradient(135deg, #e8930c, #f5a524); box-shadow: 0 12px 24px -12px rgba(245, 165, 36, .7); color: #2b1a00; }
.aa-host[data-type="success"] .aa-ok { background: linear-gradient(135deg, #16a34a, #22c55e); box-shadow: 0 12px 24px -12px rgba(22, 163, 74, .7); }

.aa-timer { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: transparent; }
.aa-timer[hidden] { display: none; }
.aa-timer span { display: block; height: 100%; width: 100%; background: currentColor; color: var(--a-primary); transform-origin: left; }
.aa-host[data-type="success"] .aa-timer span { background: var(--a-ok); }

@keyframes aaFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes aaPop { from { opacity: 0; transform: translateY(14px) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes aaOut { to { opacity: 0; transform: translateY(8px) scale(.96); } }
@keyframes aaTimer { from { transform: scaleX(1); } to { transform: scaleX(0); } }
