/* ============================================================================
   auth.css — Shared styling for all identity pages (login, register, forgot/
   reset password, confirm email, 2FA, access denied, lockout).

   Design: modern enterprise split-screen — polished light form panel + dark
   brand showcase that renders a LIVE PREVIEW of the real student dashboard,
   built with the same design vocabulary as student-dashboard-modern.css
   (glowing stat cards, streak card, progress ring, certificate, live pill).

   Colors come ONLY from the dynamic brand pipeline (_DynamicBrandColors injects
   --primary*, --secondary*, --bs-primary-rgb, --shadow-* over brand-identity.css
   defaults). Brand-derived tokens use color-mix() with a static fallback on the
   line above for old engines.

   RTL: CSS logical properties throughout so the split panel and controls mirror
   automatically under dir="rtl".
   ============================================================================ */

.auth-body {
    /* --- Auth surface tokens (mirror the dashboard's sdash-* system) --- */
    --auth-radius: 28px;
    --auth-field-radius: 16px;
    --auth-ease: cubic-bezier(0.16, 1, 0.3, 1);
    --auth-form-bg: #ffffff;
    --auth-text: #0f172a;
    --auth-text-muted: #64748b;
    --auth-border: #e6eaf3;
    --auth-danger: #dc2626;
    --auth-danger-soft: rgba(220, 38, 38, 0.08);
    --auth-success: #059669;
    --auth-warning: #d97706;
    --auth-info: #0284c7;

    /* --- Luxury metallic accents (warm gold pairs with any brand hue) --- */
    --auth-gold: #c9a24b;
    --auth-gold-hi: #e8cf8f;
    --auth-gold-soft: rgba(201, 162, 75, 0.14);
    --auth-gold-line: rgba(201, 162, 75, 0.4);

    /* Dark showcase: near-black tinted with the brand hue (fallback then mix). */
    --auth-showcase-bg: #0b0e16;
    --auth-showcase-bg: color-mix(in srgb, var(--primary-900, #071a33) 38%, #090c14);

    /* Primary CTA: a rich, saturated brand gradient (fallback then mix). */
    --auth-cta-bg: linear-gradient(135deg, #0a2a5e 0%, #0d1017 100%);
    --auth-cta-bg: linear-gradient(135deg,
        color-mix(in srgb, var(--primary, #004aad) 88%, #000) 0%,
        color-mix(in srgb, var(--primary-900, #071a33) 70%, #0b0e16) 100%);
    --auth-cta-glow: rgba(15, 23, 42, 0.28);
    --auth-cta-glow: color-mix(in srgb, var(--primary, #004aad) 40%, transparent);
    --auth-cta-text: #ffffff;

    margin: 0;
    min-height: 100vh;
    color: var(--auth-text);
    font-family: var(--font-family-primary, "Segoe UI", Tahoma, sans-serif);
    background: #eef2f7;
    background:
        radial-gradient(1100px 620px at 12% -12%,
            color-mix(in srgb, var(--primary-200, #bcd4f5) 55%, transparent) 0%, transparent 58%),
        radial-gradient(900px 560px at 104% 112%,
            color-mix(in srgb, var(--secondary-200, #cbd5e1) 48%, transparent) 0%, transparent 55%),
        linear-gradient(160deg,
            var(--primary-50, #eaf1fb) 0%,
            #ffffff 47%,
            var(--secondary-50, #f1f5f9) 100%);
    -webkit-font-smoothing: antialiased;
}

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

/* --- Shell + card ---------------------------------------------------------- */
.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1rem, 3vw, 2.5rem);
}

.auth-card {
    position: relative;
    width: 100%;
    max-width: 1120px;
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    background: var(--auth-form-bg);
    border-radius: var(--auth-radius);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.7) inset,
        0 2px 6px rgba(15, 23, 42, 0.04),
        0 40px 100px -20px rgba(15, 23, 42, 0.28);
    overflow: hidden;
    isolation: isolate;
    animation: authCardIn 0.6s var(--auth-ease) both;
}
/* fine metallic hairline frame — brand → gold → brand */
.auth-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 4;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--primary, #004aad) 45%, transparent) 0%,
        var(--auth-gold-line) 48%,
        color-mix(in srgb, var(--secondary, #64748b) 40%, transparent) 100%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            mask-composite: exclude;
    pointer-events: none;
}
.auth-card.auth-card--solo { max-width: 520px; grid-template-columns: 1fr; }

@keyframes authCardIn {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --- Form panel ------------------------------------------------------------ */
.auth-form-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: clamp(1.75rem, 4vw, 3.25rem);
    min-width: 0;
    background:
        radial-gradient(120% 90% at 100% 0%,
            color-mix(in srgb, var(--primary-50, #eaf1fb) 60%, transparent) 0%, transparent 42%),
        var(--auth-form-bg);
}

.auth-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}
.auth-brand__link { display: inline-flex; align-items: center; gap: 0.65rem; text-decoration: none; }
.auth-brand__logo {
    width: 44px; height: 44px; object-fit: contain;
    border-radius: 12px;
    padding: 4px;
    background: #fff;
    box-shadow: 0 0 0 1px var(--auth-border), 0 6px 16px -6px rgba(15, 23, 42, 0.25);
}
.auth-brand__name { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; color: var(--auth-text); }
.auth-brand__home {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--auth-text-muted);
    text-decoration: none;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--auth-border);
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.auth-brand__home:hover { color: var(--primary, #004aad); border-color: color-mix(in srgb, var(--primary, #004aad) 40%, var(--auth-border)); background: #f8fafc; }
.auth-brand__home svg { width: 15px; height: 15px; }
@media (max-width: 380px) { .auth-brand__home span { display: none; } }

.auth-heading {
    font-size: clamp(1.7rem, 3.6vw, 2.4rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.03em;
    margin: 0 0 0.55rem;
    color: var(--auth-text);
    background: linear-gradient(120deg,
        var(--auth-text) 0%,
        color-mix(in srgb, var(--primary, #004aad) 55%, var(--auth-text)) 100%);
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
}
.auth-subheading {
    font-size: 0.97rem;
    color: var(--auth-text-muted);
    margin: 0 0 1.75rem;
}

.auth-body-content { flex: 1; animation: authFieldsIn 0.6s var(--auth-ease) 0.05s both; }
@keyframes authFieldsIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.auth-footer {
    margin-top: 1.75rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--auth-text-muted);
}
.auth-footer a {
    color: var(--primary, #004aad);
    font-weight: 700;
    text-decoration: none;
    margin-inline-start: 0.35rem;
}
.auth-footer a:hover { text-decoration: underline; }

/* --- Trust strip ----------------------------------------------------------- */
.auth-trust {
    display: flex;
    align-items: center;
    gap: 1.15rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
    padding-top: 1.3rem;
    border-top: 1px solid transparent;
    border-image: linear-gradient(90deg,
        transparent, var(--auth-gold-line), var(--auth-border), transparent) 1;
}
.auth-trust__item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--auth-text-muted);
    position: relative;
}
.auth-trust__item + .auth-trust__item::before {
    content: "";
    position: absolute;
    inset-inline-start: -0.6rem;
    inset-block: 15%;
    width: 1px;
    background: var(--auth-gold-line);
}
.auth-trust__item svg {
    width: 16px; height: 16px;
    color: var(--primary, #004aad);
    color: color-mix(in srgb, var(--primary, #004aad) 80%, var(--auth-gold));
}

/* --- Mobile product strip (shown only ≤991px, above the form) -------------- */
.auth-mobile-strip { display: none; }

/* --- Fields ---------------------------------------------------------------- */
.auth-field { margin-bottom: 1.05rem; }
.auth-field__label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.4rem;
}
/* LTR wrapper: keeps the toggle button + its reserved padding on the SAME
   physical side (inline-end → right) as the field's LTR content, so the eye
   never overlaps the placeholder under dir="rtl". */
.auth-input-wrap { position: relative; direction: ltr; }

.auth-input {
    width: 100%;
    padding: 0.95rem 1.05rem;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--auth-text);
    background: #fbfcfe;
    border: 1.5px solid var(--auth-border);
    border-radius: var(--auth-field-radius);
    outline: none;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03) inset;
    transition: border-color 0.2s var(--auth-ease), box-shadow 0.2s var(--auth-ease), background 0.2s;
}
.auth-input--ltr { direction: ltr; text-align: start; }
.auth-input::placeholder { color: #94a3b8; }
.auth-input:hover:not(:focus) { border-color: color-mix(in srgb, var(--primary, #004aad) 28%, var(--auth-border)); }
.auth-input:focus {
    background: #fff;
    border-color: var(--primary, #004aad);
    box-shadow: 0 0 0 4px rgba(var(--bs-primary-rgb, 0, 74, 173), 0.14);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary, #004aad) 16%, transparent),
                0 6px 16px -8px color-mix(in srgb, var(--primary, #004aad) 45%, transparent);
}
.auth-input.input-validation-error,
.auth-input[aria-invalid="true"] {
    border-color: var(--auth-danger);
    box-shadow: 0 0 0 4px var(--auth-danger-soft);
}
.auth-input--with-toggle { padding-inline-end: 3rem; }

.auth-toggle {
    position: absolute;
    inset-block: 0;
    inset-inline-end: 0.5rem;
    margin-block: auto;
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}
.auth-toggle:hover { color: var(--primary, #004aad); background: rgba(15, 23, 42, 0.04); }
.auth-toggle svg { width: 20px; height: 20px; display: block; }
.auth-toggle .icon-hide { display: none; }
.auth-toggle[aria-pressed="true"] .icon-show { display: none; }
.auth-toggle[aria-pressed="true"] .icon-hide { display: block; }

.field-validation-error {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: var(--auth-danger);
}

/* --- Row: remember + forgot ------------------------------------------------ */
.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0.25rem 0 1.4rem;
}
.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    color: var(--auth-text-muted);
    cursor: pointer;
    user-select: none;
}
.auth-check input { width: 1.05rem; height: 1.05rem; accent-color: var(--primary, #004aad); cursor: pointer; }
.auth-link { font-size: 0.88rem; font-weight: 600; color: var(--primary, #004aad); text-decoration: none; }
.auth-link:hover { text-decoration: underline; }
.auth-link--end { margin-inline-start: auto; }

/* --- Buttons --------------------------------------------------------------- */
.btn-auth {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.98rem 1.25rem;
    font-size: 0.98rem;
    font-weight: 700;
    font-family: inherit;
    border-radius: var(--auth-field-radius);
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: transform 0.15s var(--auth-ease), box-shadow 0.2s, background 0.2s, opacity 0.2s;
}
.btn-auth:active { transform: translateY(1px); }
.btn-auth:focus-visible { outline: 3px solid var(--primary-300, #6699dd); outline-offset: 2px; }

.btn-auth-primary {
    position: relative;
    margin-top: 0.35rem;
    color: var(--auth-cta-text);
    background: var(--auth-cta-bg);
    border-color: transparent;
    letter-spacing: 0.01em;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.12) inset,
        0 14px 30px -10px var(--auth-cta-glow),
        0 6px 14px -8px rgba(15, 23, 42, 0.4);
    overflow: hidden;
}
/* fine gold highlight along the top edge */
.btn-auth-primary::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--auth-gold-hi), transparent);
    opacity: 0.7;
}
/* metallic sheen sweep on hover */
.btn-auth-primary::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg,
        transparent 28%,
        rgba(255, 255, 255, 0.16) 46%,
        color-mix(in srgb, var(--auth-gold-hi) 55%, transparent) 52%,
        transparent 72%);
    transform: translateX(-120%);
    transition: transform 0.7s var(--auth-ease);
}
.btn-auth-primary:hover {
    transform: translateY(-2px);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.14) inset,
        0 20px 40px -12px var(--auth-cta-glow),
        0 8px 18px -8px rgba(15, 23, 42, 0.45);
}
.btn-auth-primary:hover::after { transform: translateX(120%); }
.btn-auth-primary[disabled] { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-auth-outline { color: var(--auth-text); background: #fff; border-color: var(--auth-border); }
.btn-auth-outline:hover { border-color: #cbd5e1; background: #f8fafc; }
.btn-auth-outline svg { width: 18px; height: 18px; }

/* --- Divider --------------------------------------------------------------- */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: #94a3b8;
    font-size: 0.82rem;
}
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--auth-border); }

/* --- Alerts / banners ------------------------------------------------------ */
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1.1rem;
}
.auth-alert svg { flex-shrink: 0; width: 18px; height: 18px; margin-top: 1px; }
.auth-alert--error   { background: var(--auth-danger-soft); color: var(--auth-danger); border: 1px solid rgba(220, 38, 38, 0.18); }
.auth-alert--info    { background: rgba(var(--bs-primary-rgb, 0, 74, 173), 0.07); color: #1e40af; border: 1px solid rgba(var(--bs-primary-rgb, 0, 74, 173), 0.15); }
.auth-alert--success { background: rgba(5, 150, 105, 0.08); color: var(--auth-success); border: 1px solid rgba(5, 150, 105, 0.18); }
.auth-alert__content { flex: 1; min-width: 0; }
.auth-alert ul { margin: 0; padding-inline-start: 1.1rem; }

/* --- Password requirements checklist -------------------------------------- */
.auth-reqs {
    list-style: none;
    margin: 0 0 1.1rem;
    padding: 0.75rem 0.9rem;
    background: #f8fafc;
    border: 1px solid var(--auth-border);
    border-radius: 12px;
    display: grid;
    gap: 0.35rem;
}
.auth-reqs li { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; color: var(--auth-text-muted); transition: color 0.2s; }
.auth-reqs li::before {
    content: "";
    width: 14px; height: 14px;
    border-radius: 50%;
    border: 1.5px solid #cbd5e1;
    flex-shrink: 0;
    transition: background 0.2s, border-color 0.2s;
}
.auth-reqs li.ok { color: var(--auth-success); }
.auth-reqs li.ok::before { background: var(--auth-success); border-color: var(--auth-success); }

/* --- Field grid (name row on register) ------------------------------------ */
.auth-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }

/* ============================================================================
   SHOWCASE — live dashboard preview
   ============================================================================ */
.auth-showcase {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.1rem;
    padding: clamp(1.75rem, 3vw, 2.75rem);
    color: #fff;
    background:
        radial-gradient(90% 60% at 100% 0%,
            color-mix(in srgb, var(--primary, #004aad) 40%, transparent) 0%, transparent 55%),
        radial-gradient(80% 55% at 0% 100%,
            color-mix(in srgb, var(--auth-gold) 16%, transparent) 0%, transparent 50%),
        var(--auth-showcase-bg);
    overflow: hidden;
    isolation: isolate;

    --apv-card: rgba(255, 255, 255, 0.07);
    --apv-card-border: rgba(255, 255, 255, 0.13);
    --apv-muted: rgba(255, 255, 255, 0.62);
    --apv-success: #34d399;
    --apv-warning: #fbbf24;
    --apv-info: #38bdf8;
    --apv-accent: color-mix(in srgb, var(--primary-300, #6699dd) 75%, #ffffff);
}

/* brand glow orbs (echo the dashboard hero blobs) */
.auth-showcase__glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    z-index: -1;
    opacity: 0.5;
}
.auth-showcase__glow.glow-1 {
    width: 320px; height: 320px;
    top: -80px; inset-inline-end: -60px;
    background: color-mix(in srgb, var(--primary, #004aad) 70%, transparent);
}
.auth-showcase__glow.glow-2 {
    width: 260px; height: 260px;
    bottom: -60px; inset-inline-start: -50px;
    background: color-mix(in srgb, var(--secondary, #64748b) 55%, transparent);
}
.auth-showcase__pattern {
    position: absolute;
    inset: 0;
    z-index: -1;
    color: color-mix(in srgb, var(--primary-300, #6699dd) 40%, #ffffff);
    opacity: 0.05;
}
.auth-showcase__pattern svg { width: 100%; height: 100%; }

/* --- The floating dashboard preview --- */
.auth-preview {
    width: min(370px, 100%);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    transform: perspective(1600px) rotateY(-7deg) rotateX(3deg);
    transform-style: preserve-3d;
    animation: apvFloat 8s ease-in-out infinite;
}
[dir="rtl"] .auth-preview { transform: perspective(1600px) rotateY(7deg) rotateX(3deg); }
@keyframes apvFloat {
    0%, 100% { transform: perspective(1600px) rotateY(-7deg) rotateX(3deg) translateY(0); }
    50%      { transform: perspective(1600px) rotateY(-7deg) rotateX(3deg) translateY(-10px); }
}
[dir="rtl"] .auth-preview { animation-name: apvFloatRtl; }
@keyframes apvFloatRtl {
    0%, 100% { transform: perspective(1600px) rotateY(7deg) rotateX(3deg) translateY(0); }
    50%      { transform: perspective(1600px) rotateY(7deg) rotateX(3deg) translateY(-10px); }
}

.apv-card {
    background: var(--apv-card);
    border: 1px solid var(--apv-card-border);
    border-radius: 16px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: box-shadow 0.4s var(--auth-ease), transform 0.4s var(--auth-ease);
}

/* greeting */
.apv-greeting { display: flex; align-items: center; gap: 0.7rem; padding: 0.8rem 0.9rem; }
.apv-avatar {
    width: 40px; height: 40px;
    border-radius: 12px;
    display: grid; place-items: center;
    font-weight: 800; font-size: 1rem; color: #fff;
    background: linear-gradient(135deg, var(--primary, #004aad), var(--primary-600, #0055c0));
    box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--auth-gold) 55%, transparent),
                0 6px 16px -6px rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
}
.apv-greeting strong { display: block; font-size: 0.9rem; font-weight: 700; }
.apv-greeting span { font-size: 0.72rem; color: var(--apv-muted); }

/* stat cluster */
.apv-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.apv-stat { padding: 0.75rem; }
.apv-stat__icon {
    width: 30px; height: 30px;
    border-radius: 9px;
    display: grid; place-items: center;
    margin-bottom: 0.5rem;
}
.apv-stat__icon svg { width: 16px; height: 16px; }
.apv-stat--primary .apv-stat__icon { background: color-mix(in srgb, var(--primary, #004aad) 30%, transparent); color: var(--apv-accent); }
.apv-stat--success .apv-stat__icon { background: rgba(52, 211, 153, 0.18); color: var(--apv-success); }
.apv-stat--warning .apv-stat__icon { background: rgba(251, 191, 36, 0.18); color: var(--apv-warning); }
.apv-stat--info    .apv-stat__icon { background: rgba(56, 189, 248, 0.18); color: var(--apv-info); }
.apv-stat__value { font-size: 1.35rem; font-weight: 800; line-height: 1; }
.apv-stat__label { font-size: 0.66rem; color: var(--apv-muted); margin-top: 0.2rem; }

/* streak + ring row */
.apv-row { display: grid; grid-template-columns: 1.45fr 1fr; gap: 0.6rem; }
.apv-streak {
    padding: 0.8rem;
    border: none;
    color: #fff;
    background: linear-gradient(135deg, var(--primary, #004aad) 0%, var(--primary-600, #0055c0) 60%, var(--primary-light, #3a7bd5) 100%);
    box-shadow: 0 8px 24px rgba(var(--bs-primary-rgb, 0, 74, 173), 0.35);
    display: flex; flex-direction: column; gap: 0.4rem;
}
.apv-streak__top { display: flex; align-items: center; gap: 0.35rem; font-size: 0.72rem; font-weight: 700; opacity: 0.92; }
.apv-streak__top svg { width: 14px; height: 14px; flex-shrink: 0; }
.apv-streak__num { font-size: 1.6rem; font-weight: 900; line-height: 1; }
.apv-streak__num small { font-size: 0.7rem; font-weight: 600; opacity: 0.85; }
.apv-streak__bar { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.25); overflow: hidden; }
.apv-streak__bar > i { display: block; height: 100%; width: 72%; border-radius: 6px; background: #fff; }
.apv-streak__pts { font-size: 0.66rem; font-weight: 700; opacity: 0.92; display: inline-flex; align-items: center; gap: 0.25rem; }
.apv-ring { padding: 0.6rem; display: grid; place-items: center; }
.apv-ring__wrap { position: relative; width: 78px; height: 78px; }
.apv-ring__wrap svg { width: 78px; height: 78px; transform: rotate(-90deg); }
.apv-ring__label { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.05rem; font-weight: 800; }
.apv-ring__cap { font-size: 0.62rem; color: var(--apv-muted); margin-top: 0.3rem; text-align: center; }

/* continue learning */
.apv-continue { display: flex; align-items: center; gap: 0.6rem; padding: 0.65rem 0.75rem; }
.apv-continue__thumb {
    width: 42px; height: 32px; border-radius: 8px; flex-shrink: 0;
    background: color-mix(in srgb, var(--primary, #004aad) 35%, transparent);
    display: grid; place-items: center; color: #fff;
}
.apv-continue__thumb svg { width: 15px; height: 15px; }
.apv-continue__info { flex: 1; min-width: 0; }
.apv-continue__info b { display: block; font-size: 0.78rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.apv-continue__info span { font-size: 0.66rem; color: var(--apv-muted); }
.apv-continue__play {
    width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
    display: grid; place-items: center; color: #fff;
    background: var(--primary, #004aad);
    box-shadow: 0 4px 12px rgba(var(--bs-primary-rgb, 0, 74, 173), 0.5);
}
.apv-continue__play svg { width: 13px; height: 13px; }

/* live pill */
.apv-live {
    align-self: flex-start;
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.45rem 0.8rem;
    font-size: 0.72rem; font-weight: 700;
    border-radius: 999px;
    background: rgba(52, 211, 153, 0.16);
    border: 1px solid rgba(52, 211, 153, 0.3);
    color: #d1fae5;
}
.apv-live__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--apv-success); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6); animation: apvPulse 2s infinite; }
@keyframes apvPulse {
    0%   { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6); }
    70%  { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

/* scene highlight — active feature card gets a brand ring + lift */
.auth-preview [data-feat] { position: relative; }
.auth-preview[data-active-feat="learn"]   [data-feat="learn"],
.auth-preview[data-active-feat="achieve"] [data-feat="achieve"],
.auth-preview[data-active-feat="compete"] [data-feat="compete"] {
    box-shadow: 0 0 0 2px var(--apv-accent), 0 12px 30px rgba(0, 0, 0, 0.3);
    transform: translateY(-3px) scale(1.02);
    z-index: 1;
}

/* --- Scene captions + dots --- */
.auth-scenes { text-align: start; }
.auth-slide { display: none; animation: authSlideIn 0.5s var(--auth-ease); }
.auth-slide.is-active { display: block; }
.auth-slide__title { font-size: clamp(1.25rem, 2.1vw, 1.55rem); font-weight: 800; line-height: 1.2; margin: 0 0 0.4rem; }
.auth-slide__text { font-size: 0.88rem; color: var(--apv-muted); margin: 0; max-width: 36ch; }
@keyframes authSlideIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.auth-dots { display: flex; gap: 0.5rem; margin-top: 0.9rem; }
.auth-dot { width: 8px; height: 8px; padding: 0; border: none; border-radius: 50%; background: rgba(255, 255, 255, 0.28); cursor: pointer; transition: width 0.3s var(--auth-ease), background 0.3s; }
.auth-dot.is-active { width: 22px; border-radius: 5px; background: var(--apv-accent); }

/* --- Standalone state pages (confirm, lockout, access denied) -------------- */
.auth-state { text-align: center; padding-block: 1rem; }
.auth-state__icon {
    width: 84px; height: 84px;
    margin: 0 auto 1.25rem;
    display: grid; place-items: center;
    border-radius: 24px;
    background: rgba(var(--bs-primary-rgb, 0, 74, 173), 0.1);
    color: var(--primary, #004aad);
}
.auth-state__icon svg { width: 40px; height: 40px; }
.auth-state__icon--danger  { background: var(--auth-danger-soft); color: var(--auth-danger); }
.auth-state__icon--success { background: rgba(5, 150, 105, 0.1); color: var(--auth-success); }
.auth-state__title { font-size: 1.5rem; font-weight: 800; margin: 0 0 0.5rem; }
.auth-state__text { color: var(--auth-text-muted); margin: 0 auto 1.5rem; max-width: 42ch; }
.auth-state__email { font-weight: 700; color: var(--auth-text); }

/* OTP segmented input */
.auth-otp { display: flex; gap: 0.6rem; justify-content: center; margin-bottom: 1.25rem; direction: ltr; }
.auth-otp input {
    width: 3rem; height: 3.4rem;
    text-align: center;
    font-size: 1.4rem; font-weight: 700;
    border: 1.5px solid var(--auth-border);
    border-radius: 12px;
    background: #f8fafc;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.auth-otp input:focus {
    border-color: var(--primary, #004aad);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary, #004aad) 16%, transparent);
    background: #fff;
}
.auth-resend { font-size: 0.85rem; color: var(--auth-text-muted); text-align: center; margin-top: 1rem; }
.auth-resend button { background: none; border: none; font: inherit; font-weight: 700; color: var(--primary, #004aad); cursor: pointer; padding: 0; }
.auth-resend button[disabled] { color: #94a3b8; cursor: not-allowed; }

/* --- Responsive ------------------------------------------------------------ */
@media (max-width: 991px) {
    .auth-card { grid-template-columns: 1fr; max-width: 520px; }
    .auth-showcase { display: none; }
    /* Bring back a slim product teaser above the form on mobile. */
    .auth-mobile-strip {
        display: flex;
        align-items: center;
        gap: 0.55rem;
        margin-bottom: 1.5rem;
        padding: 0.7rem 0.9rem;
        border-radius: 14px;
        font-size: 0.8rem;
        font-weight: 600;
        color: #fff;
        background: linear-gradient(135deg, var(--primary, #004aad), var(--primary-600, #0055c0));
        box-shadow: 0 8px 20px rgba(var(--bs-primary-rgb, 0, 74, 173), 0.28);
    }
    .auth-mobile-strip svg { width: 18px; height: 18px; flex-shrink: 0; }
    .auth-mobile-strip strong { font-weight: 800; }
    .auth-mobile-strip span { opacity: 0.85; font-weight: 500; }
}
@media (max-width: 575px) {
    .auth-shell { padding: 0; align-items: stretch; }
    .auth-card { border-radius: 0; min-height: 100vh; box-shadow: none; }
    .auth-form-panel { justify-content: center; }
    .auth-grid-2 { grid-template-columns: 1fr; }
}

/* --- Motion / a11y --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .auth-card, .auth-body-content, .auth-slide, .auth-preview,
    .apv-live__dot { animation: none !important; }
    .btn-auth, .btn-auth-primary::after, .auth-input, .auth-dot, .apv-card { transition: none !important; }
    .auth-preview { transform: none !important; }
}
