/* ==========================================================================
   Scoutnet CRM - sign-in pages (layout Shared/AdminLTE/_Auth.cshtml)
   --------------------------------------------------------------------------
   Split screen: an illustrated brand panel (animated SVG, soft moving mesh) and
   a glass card with the form. Below 992px the panel becomes a compact band above
   the card; inside a cross-origin iframe (ViciDial, html.embedded-frame) and on
   short screens it shrinks further so the form fits a ~400x600 frame.
   Motion uses transform / opacity (plus one-off SVG stroke draws) and is switched
   off entirely for prefers-reduced-motion. Builds on the theme-modern tokens.
   ========================================================================== */

.auth-page {
    --auth-ease: cubic-bezier(.2, .8, .2, 1);
    --auth-bg: var(--tm-bg, #f3f6f9);
    --auth-card: rgba(255, 255, 255, .82);
    --auth-card-border: rgba(255, 255, 255, .7);
    --auth-input-bg: rgba(255, 255, 255, .92);
    --auth-text: var(--tm-text, #1e293b);
    --auth-muted: var(--tm-muted, #64748b);
    --auth-border: var(--tm-border-strong, #cbd5e1);
    --auth-primary: var(--tm-primary, #0e7490);
    --auth-ring: var(--tm-primary-ring, rgba(14, 116, 144, .28));
    --auth-danger: var(--tm-danger, #dc2626);
    margin: 0;
    min-height: 100vh;
    background: var(--auth-bg);
    color: var(--auth-text);
    font-family: var(--tm-font, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
    -webkit-font-smoothing: antialiased;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    min-height: 100vh;
}

/* --------------------------------------------------------------------------
   Brand panel
   -------------------------------------------------------------------------- */
.auth-brand {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 40px 48px;
    color: #e2e8f0;
    background: linear-gradient(150deg, #0b1d2c 0%, #0f2537 45%, #0c4a5e 100%);
    isolation: isolate;
}

.auth-mesh { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.auth-mesh__blob {
    position: absolute;
    border-radius: 50%;
    opacity: .55;
}
.auth-mesh__blob--1 { width: 520px; height: 520px; left: -140px; top: -160px; background: radial-gradient(closest-side, rgba(20, 184, 166, .55), transparent); }
.auth-mesh__blob--2 { width: 460px; height: 460px; right: -160px; top: 30%; background: radial-gradient(closest-side, rgba(34, 211, 238, .4), transparent); }
.auth-mesh__blob--3 { width: 420px; height: 420px; left: 20%; bottom: -200px; background: radial-gradient(closest-side, rgba(99, 102, 241, .35), transparent); }
/* faint dot grid over the gradient */
.auth-mesh::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1px);
    background-size: 22px 22px;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
    mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #fff !important;
    text-decoration: none !important;
    font-size: 1.3rem;
    letter-spacing: .01em;
    align-self: flex-start;
    border-radius: 10px;
}
.auth-logo:focus-visible { outline: 2px solid #5eead4; outline-offset: 4px; }
.auth-logo__text { font-weight: 500; }
.auth-logo__text strong { font-weight: 700; color: #5eead4; }

/* Logo tile (shared markup: Shared/_BrandMark.cshtml) */
.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, #14b8a6 0%, #0e7490 55%, #0b3b52 100%);
    box-shadow: 0 6px 18px rgba(20, 184, 166, .35), inset 0 0 0 1px rgba(255, 255, 255, .18);
}
.brand-mark svg { width: 64%; height: 64%; display: block; }

.auth-hero { max-width: 520px; }
.auth-tagline {
    margin: 18px 0 10px;
    font-size: clamp(1.7rem, 2.6vw, 2.5rem);
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -.02em;
    color: #fff;
}
.auth-tagline__accent {
    background: linear-gradient(90deg, #5eead4, #67e8f9);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.auth-lead { margin: 0; font-size: 1rem; line-height: 1.55; color: #cbd5e1; max-width: 440px; }

.auth-art { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; min-height: 0; }
.auth-art__svg { width: 100%; max-width: 560px; height: auto; max-height: 46vh; overflow: visible; }

.auth-points { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 0; padding: 0; font-size: .88rem; color: #cbd5e1; }
.auth-points li { display: inline-flex; align-items: center; gap: 8px; }
.auth-points i { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: rgba(94, 234, 212, .12); color: #5eead4; font-size: .8rem; }

/* SVG parts that animate (see Motion below) */
.ai-bar, .ai-node, .ai-ping, .ai-float, .ai-tile { transform-box: fill-box; }
.ai-bar { transform-origin: 50% 100%; }
.ai-node, .ai-ping { transform-origin: 50% 50%; }
.ai-link { opacity: .55; }

/* --------------------------------------------------------------------------
   Form side
   -------------------------------------------------------------------------- */
.auth-main {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px 24px;
    isolation: isolate;
    background:
        radial-gradient(900px 500px at 100% 0%, rgba(14, 116, 144, .10), transparent 60%),
        radial-gradient(700px 400px at 0% 100%, rgba(99, 102, 241, .07), transparent 60%),
        var(--auth-bg);
}

.auth-shapes { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.auth-shape { position: absolute; border-radius: 50%; }
.auth-shape--1 { width: 220px; height: 220px; right: -60px; top: 8%; background: linear-gradient(135deg, rgba(20, 184, 166, .22), rgba(14, 116, 144, .05)); }
.auth-shape--2 { width: 120px; height: 120px; left: 6%; bottom: 10%; background: linear-gradient(135deg, rgba(99, 102, 241, .18), rgba(99, 102, 241, .03)); }
.auth-shape--3 { width: 70px; height: 70px; left: 14%; top: 14%; border-radius: 20px; background: linear-gradient(135deg, rgba(34, 211, 238, .22), rgba(34, 211, 238, .04)); }

.auth-card {
    position: relative;
    width: 100%;
    max-width: 430px;
    padding: 34px 32px 28px;
    border-radius: 22px;
    background: var(--auth-card);
    border: 1px solid var(--auth-card-border);
    box-shadow: 0 24px 60px rgba(15, 37, 55, .16), 0 2px 8px rgba(15, 37, 55, .06);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    backdrop-filter: blur(16px) saturate(140%);
}

.auth-foot { margin: 18px 0 0; font-size: .78rem; color: var(--auth-muted); }

/* Page bodies keep their AdminLTE wrappers (container-fluid / card-body); flatten them here. */
.auth-card > .container-fluid,
.auth-card .auth-form { padding: 0; }
.auth-card .card-body,
.auth-card .login-card-body,
.auth-card .register-card-body { padding: 0; background: transparent; color: inherit; }
.auth-card .login-box-msg { padding: 0 0 14px; text-align: left; font-weight: 600; font-size: 1.1rem; color: var(--auth-text); }

.auth-head { text-align: left; margin-bottom: 20px; }
.auth-badge {
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    margin-bottom: 14px;
    color: #fff;
    background: linear-gradient(135deg, #14b8a6, #0e7490);
    box-shadow: 0 8px 20px rgba(14, 116, 144, .3);
}
.auth-title { margin: 0; font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; color: var(--auth-text); }
.auth-sub { margin: 6px 0 0; font-size: .92rem; color: var(--auth-muted); }

.auth-alert { border-radius: 12px; font-size: .88rem; }

/* Floating-label fields: <div.auth-field><input.auth-input placeholder=" "><label.auth-label><span.auth-icon> */
.auth-field { position: relative; margin-bottom: 14px; }
.auth-card .auth-input {
    height: 54px;
    padding: 22px 44px 6px 44px;
    border-radius: 12px;
    border: 1px solid var(--auth-border);
    background: var(--auth-input-bg);
    color: var(--auth-text);
    font-size: .95rem;
    box-shadow: none;
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.auth-card select.auth-input { padding-top: 20px; padding-bottom: 4px; -webkit-appearance: auto; appearance: auto; }
.auth-card .auth-field--pw .auth-input { padding-right: 52px; }
.auth-card .auth-input:hover { border-color: #94a3b8; }
.auth-card .auth-input:focus {
    outline: none;
    border-color: var(--auth-primary);
    background-color: #fff;
    box-shadow: 0 0 0 4px var(--auth-ring), 0 8px 22px rgba(14, 116, 144, .14);
}
.auth-label {
    position: absolute;
    left: 44px;
    top: 16px;
    margin: 0;
    max-width: calc(100% - 96px);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: .95rem;
    font-weight: 500;
    color: var(--auth-muted);
    pointer-events: none;
    transform-origin: 0 0;
    transition: transform .18s var(--auth-ease), color .18s ease;
}
.auth-input:focus + .auth-label,
.auth-input:not(:placeholder-shown) + .auth-label,
.auth-input:-webkit-autofill + .auth-label,
.auth-field--select .auth-label {
    transform: translateY(-10px) scale(.78);
}
.auth-input:focus + .auth-label { color: var(--auth-primary); }
.auth-icon {
    position: absolute;
    left: 17px;
    top: 19px;
    font-size: .95rem;
    color: #94a3b8;
    pointer-events: none;
    transition: color .18s ease, transform .18s var(--auth-ease);
}
.auth-input:focus ~ .auth-icon { color: var(--auth-primary); }

.auth-field.has-error .auth-input { border-color: var(--auth-danger); }
.auth-field.has-error .auth-input:focus { box-shadow: 0 0 0 4px rgba(220, 38, 38, .2); }
.auth-field.has-error .auth-icon,
.auth-field.has-error .auth-label { color: var(--auth-danger); }
.auth-error { display: block; margin: -8px 0 12px 4px; font-size: .8rem; font-weight: 500; }

.auth-eye {
    position: absolute;
    right: 7px;
    top: 7px;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--auth-muted);
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}
.auth-eye:hover { background: rgba(14, 116, 144, .08); color: var(--auth-primary); }
.auth-eye:focus-visible { outline: 2px solid var(--auth-primary); outline-offset: 1px; }

.auth-caps {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: -6px 0 12px;
    padding: 7px 11px;
    border-radius: 10px;
    font-size: .8rem;
    font-weight: 500;
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
}

.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 4px 0 18px; font-size: .88rem; }
.auth-row .icheck-primary { margin: 0; }
.auth-row .icheck-primary > label { font-weight: 500; color: var(--auth-text); }
.auth-link { font-weight: 600; color: var(--auth-primary); text-decoration: none; border-radius: 4px; }
.auth-link:hover { color: var(--tm-primary-hover, #155e75); text-decoration: underline; }
.auth-link:focus-visible { outline: 2px solid var(--auth-primary); outline-offset: 2px; }
.auth-alt { margin: 20px 0 0; text-align: center; font-size: .88rem; color: var(--auth-muted); }
.auth-alt + .auth-alt { margin-top: 6px; }

.auth-card .auth-submit {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 50px;
    border: 0;
    border-radius: 12px;
    font-size: .98rem;
    font-weight: 600;
    letter-spacing: .01em;
    color: #fff;
    background: linear-gradient(135deg, #0e7490 0%, #0891b2 100%);
    box-shadow: 0 10px 22px rgba(14, 116, 144, .28);
    transition: transform .15s var(--auth-ease), box-shadow .2s ease, filter .2s ease, background .3s ease;
}
.auth-card .auth-submit::after {
    content: "";
    position: absolute;
    top: 0;
    left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .32), transparent);
    transform: translateX(0) skewX(-18deg);
    pointer-events: none;
    opacity: 0;
}
.auth-card .auth-submit:hover:not(:disabled) { filter: brightness(1.06); box-shadow: 0 14px 28px rgba(14, 116, 144, .34); }
.auth-card .auth-submit:active:not(:disabled) { transform: scale(.985); }
.auth-card .auth-submit:focus-visible { outline: 3px solid var(--auth-ring); outline-offset: 2px; }
.auth-card .auth-submit:disabled { opacity: .9; cursor: progress; }
.auth-card .auth-submit.is-success { background: linear-gradient(135deg, #15803d, #16a34a); box-shadow: 0 10px 22px rgba(21, 128, 61, .3); opacity: 1; }

.auth-spinner {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2.5px solid rgba(255, 255, 255, .4);
    border-top-color: #fff;
}
.auth-check { width: 22px; height: 22px; }
.auth-check path { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

/* Secondary buttons on the other auth pages (social placeholders etc.) */
.auth-card .social-auth-links p { color: var(--auth-muted); font-size: .8rem; }
.auth-card .social-auth-links .btn { border-radius: 12px; }

/* Status pages (email confirm, reset in progress) */
.auth-status { text-align: center; padding: 6px 0 4px; }
.auth-status__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #fff;
    background: linear-gradient(135deg, #14b8a6, #0e7490);
    box-shadow: 0 10px 24px rgba(14, 116, 144, .3);
}
.auth-status p { color: var(--auth-muted); margin-bottom: 6px; }

/* --------------------------------------------------------------------------
   Responsive: compact brand band
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
    .auth-shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
    .auth-brand { padding: 22px 24px 54px; gap: 6px; }
    .auth-art, .auth-points { display: none; }
    .auth-tagline { margin: 12px 0 4px; font-size: 1.35rem; }
    .auth-lead { font-size: .88rem; }
    .auth-main { justify-content: flex-start; padding: 0 16px 20px; margin-top: -38px; background: transparent; }
    .auth-shapes { display: none; }
    .auth-card { box-shadow: 0 18px 44px rgba(15, 37, 55, .18); background: var(--auth-card-solid, rgba(255, 255, 255, .97)); }
}

@media (max-width: 480px) {
    .auth-brand { padding: 16px 16px 46px; }
    .auth-logo { font-size: 1.1rem; gap: 10px; }
    .brand-mark { width: 34px; height: 34px; border-radius: 10px; }
    .auth-lead { display: none; }
    .auth-tagline { font-size: 1.1rem; margin-top: 10px; }
    .auth-card { padding: 22px 18px 18px; border-radius: 18px; }
    .auth-title { font-size: 1.3rem; }
    .auth-badge { display: none; }
    .auth-head { margin-bottom: 14px; }
}

/* Short viewports (small iframes, landscape phones) and the ViciDial frame */
@media (max-height: 680px) and (max-width: 991.98px), (max-height: 560px) {
    .auth-hero { display: none; }
    .auth-brand { padding-top: 12px; padding-bottom: 42px; }
    .auth-badge { display: none; }
    .auth-sub { display: none; }
    .auth-head { margin-bottom: 12px; }
    .auth-foot { display: none; }
}
html.embedded-frame .auth-shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
html.embedded-frame .auth-brand { padding: 12px 16px 40px; gap: 4px; }
html.embedded-frame .auth-hero,
html.embedded-frame .auth-art,
html.embedded-frame .auth-points,
html.embedded-frame .auth-shapes,
html.embedded-frame .auth-foot,
html.embedded-frame .auth-badge,
html.embedded-frame .auth-sub { display: none; }
html.embedded-frame .auth-main { justify-content: flex-start; padding: 0 12px 12px; margin-top: -32px; background: transparent; }
html.embedded-frame .auth-card { padding: 20px 18px 16px; }

/* --------------------------------------------------------------------------
   Landing / lock page (Pages/Index.cshtml, layout Shared/_Layout.cshtml)
   -------------------------------------------------------------------------- */
.lock-overlay.auth-page {
    min-height: 0;
    overflow: hidden;
    isolation: isolate;
    gap: 34px;
    color: #e2e8f0;
    background: linear-gradient(150deg, #0b1d2c 0%, #0f2537 45%, #0c4a5e 100%) !important;
}
.lock-overlay .lock-brand { display: flex; flex-direction: column; align-items: center; text-align: center; }
.lock-overlay .brand-mark { width: 72px; height: 72px; border-radius: 22px; margin-bottom: 18px; }
.lock-overlay .lock-welcome { margin: 0; color: #fff; font-family: inherit; font-size: clamp(1.8rem, 5vw, 2.8rem); font-weight: 700; letter-spacing: -.02em; }
.lock-overlay .lock-tagline { margin: 8px 0 0; color: #cbd5e1; font-size: 1rem; }
.lock-overlay .lock-login {
    display: inline-flex; align-items: center; gap: 12px; padding: 12px 22px 12px 14px;
    border-radius: 16px; color: #fff; text-decoration: none; font-weight: 600;
    background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18);
    transition: background-color .2s ease, transform .2s var(--auth-ease);
}
.lock-overlay .lock-login:hover { background: rgba(255, 255, 255, .14); transform: translateY(-2px); }
.lock-overlay .lock-login:focus-visible { outline: 2px solid #5eead4; outline-offset: 3px; }
.lock-overlay .lock-icon { font-size: 1.1rem; padding: 10px; border: 0; border-radius: 12px; color: #fff; background: linear-gradient(135deg, #14b8a6, #0e7490); }
@media (prefers-reduced-motion: no-preference) {
    .lock-overlay .lock-brand { animation: auth-rise .7s var(--auth-ease) backwards; }
    .lock-overlay .lock-login { animation: auth-rise .7s var(--auth-ease) .2s backwards; }
}

/* --------------------------------------------------------------------------
   Dark mode (follows the OS; the rest of the app has no theme toggle)
   -------------------------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
    .auth-page {
        --auth-bg: #0b1220;
        --auth-card: rgba(15, 23, 42, .78);
        --auth-card-border: rgba(148, 163, 184, .18);
        --auth-input-bg: rgba(15, 23, 42, .85);
        --auth-text: #e2e8f0;
        --auth-muted: #94a3b8;
        --auth-border: #334155;
        --auth-primary: #2dd4bf;
        --auth-ring: rgba(45, 212, 191, .3);
        --auth-danger: #f87171;
        --auth-card-solid: rgba(15, 23, 42, .96);
    }
    .auth-main {
        background:
            radial-gradient(900px 500px at 100% 0%, rgba(45, 212, 191, .08), transparent 60%),
            var(--auth-bg);
    }
    .auth-card { box-shadow: 0 24px 60px rgba(0, 0, 0, .45); }
    .auth-card .auth-input:focus { background-color: #0f172a; }
    .auth-card .auth-input:hover { border-color: #475569; }
    .auth-card .text-danger { color: var(--auth-danger) !important; }
    .auth-caps { color: #fde68a; background: rgba(245, 158, 11, .12); border-color: rgba(245, 158, 11, .35); }
    .auth-link:hover { color: #5eead4; }
    .auth-eye:hover { background: rgba(45, 212, 191, .1); }
    .auth-row .icheck-primary > label { color: var(--auth-text); }
    .auth-card .auth-alert.alert-warning { background: rgba(245, 158, 11, .14); border-color: rgba(245, 158, 11, .35); color: #fde68a; }
    @media (max-width: 991.98px) { .auth-main { background: transparent; } }
}

/* --------------------------------------------------------------------------
   Motion (only when the user has not asked for reduced motion)
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
    .auth-mesh__blob--1 { animation: auth-drift-1 18s ease-in-out infinite alternate; }
    .auth-mesh__blob--2 { animation: auth-drift-2 22s ease-in-out infinite alternate; }
    .auth-mesh__blob--3 { animation: auth-drift-3 26s ease-in-out infinite alternate; }
    .auth-shape--1 { animation: auth-bob 9s ease-in-out infinite; }
    .auth-shape--2 { animation: auth-bob 11s ease-in-out -3s infinite; }
    .auth-shape--3 { animation: auth-spin-slow 24s linear infinite; }

    .auth-logo { animation: auth-rise .6s var(--auth-ease) backwards; }
    .auth-hero { animation: auth-rise .7s var(--auth-ease) .08s backwards; }
    .auth-art { animation: auth-fade .9s ease-out .15s backwards; }
    .auth-points li { animation: auth-rise .6s var(--auth-ease) backwards; }
    .auth-points li:nth-child(1) { animation-delay: .5s; }
    .auth-points li:nth-child(2) { animation-delay: .6s; }
    .auth-points li:nth-child(3) { animation-delay: .7s; }
    .brand-mark { animation: auth-pop .6s cubic-bezier(.2, .8, .3, 1.25) .1s backwards; }

    .auth-card { animation: auth-card-in .6s var(--auth-ease) backwards; }
    .auth-rise { animation: auth-rise .55s var(--auth-ease) calc(.12s + var(--d, 0) * 60ms) backwards; }
    .auth-alert, .auth-caps, .auth-error { animation: auth-pop-in .25s var(--auth-ease) backwards; }
    .auth-shake { animation: auth-shake .5s cubic-bezier(.36, .07, .19, .97) backwards; }
    .auth-spinner { animation: auth-spin .7s linear infinite; }
    .auth-check path { stroke-dasharray: 100; stroke-dashoffset: 100; animation: auth-draw .45s ease-out .05s forwards; }
    .auth-card .auth-submit.is-success { animation: auth-pulse-ok .6s ease-out; }
    .auth-card .auth-submit:hover:not(:disabled)::after { opacity: 1; animation: auth-shine .9s ease-out; }
    .auth-icon { transition: color .18s ease, transform .25s var(--auth-ease); }
    .auth-input:focus ~ .auth-icon { transform: scale(1.12); }

    /* illustration */
    .ai-card { animation: auth-fade .8s ease-out .2s backwards; }
    .ai-tile { animation: auth-pop .6s var(--auth-ease) .45s backwards; }
    .ai-tile--2 { animation-delay: .55s; }
    .ai-bar { animation: ai-grow .9s var(--auth-ease) .5s backwards, ai-breathe 3.6s ease-in-out 2.2s infinite alternate; }
    .ai-bar--2 { animation-delay: .6s, 2.5s; }
    .ai-bar--3 { animation-delay: .7s, 2.8s; }
    .ai-bar--4 { animation-delay: .8s, 3.1s; }
    .ai-bar--5 { animation-delay: .9s, 3.4s; }
    .ai-line { stroke-dasharray: 100; stroke-dashoffset: 100; animation: auth-draw 1.4s ease-out .9s forwards; }
    .ai-area { animation: auth-fade 1s ease-out 1.6s backwards; }
    .ai-ping { animation: ai-ping 2.4s ease-out 2s infinite; }
    .ai-check { stroke-dasharray: 100; stroke-dashoffset: 100; animation: auth-draw .7s ease-out 1.3s forwards; }
    .ai-float--a { animation: auth-bob 6s ease-in-out infinite; }
    .ai-float--b { animation: auth-pop .6s var(--auth-ease) 1.2s backwards, auth-bob 7s ease-in-out 1.8s infinite; }
    .ai-float--c { animation: auth-pop .6s var(--auth-ease) 1.5s backwards, auth-bob 8s ease-in-out 2.1s infinite; }
    .ai-node { animation: auth-pop .5s cubic-bezier(.2, .8, .3, 1.3) .7s backwards; }
    .ai-node--2 { animation-delay: .85s; }
    .ai-node--3 { animation-delay: 1s; }
    .ai-link { animation: ai-link 3s ease-in-out 1.2s infinite alternate; }
    .ai-link--2 { animation-delay: 1.6s; }
    .ai-link--3 { animation-delay: 2s; }
    .ai-link--4 { animation-delay: 2.4s; }
    .ai-spark { animation: ai-twinkle 3s ease-in-out infinite; }
    .ai-spark--2 { animation-delay: .8s; }
    .ai-spark--3 { animation-delay: 1.6s; }
    .ai-spark--4 { animation-delay: 2.3s; }
}

@media (prefers-reduced-motion: reduce) {
    .auth-page *, .auth-page *::before, .auth-page *::after {
        animation: none !important;
        transition: none !important;
    }
}

@keyframes auth-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes auth-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes auth-pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes auth-pop-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes auth-card-in { from { opacity: 0; transform: translateY(24px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes auth-shake {
    10%, 90% { transform: translateX(-2px); }
    20%, 80% { transform: translateX(4px); }
    30%, 50%, 70% { transform: translateX(-8px); }
    40%, 60% { transform: translateX(8px); }
}
@keyframes auth-spin { to { transform: rotate(360deg); } }
@keyframes auth-spin-slow { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes auth-draw { to { stroke-dashoffset: 0; } }
@keyframes auth-shine { from { transform: translateX(0) skewX(-18deg); } to { transform: translateX(420%) skewX(-18deg); } }
@keyframes auth-pulse-ok { 0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, .5); } 100% { box-shadow: 0 0 0 14px rgba(22, 163, 74, 0); } }
@keyframes auth-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes auth-drift-1 { to { transform: translate(90px, 60px) scale(1.1); } }
@keyframes auth-drift-2 { to { transform: translate(-80px, -50px) scale(1.15); } }
@keyframes auth-drift-3 { to { transform: translate(60px, -70px) scale(.9); } }
@keyframes ai-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes ai-breathe { from { transform: scaleY(1); } to { transform: scaleY(.86); } }
@keyframes ai-ping { 0% { transform: scale(1); opacity: .8; } 80%, 100% { transform: scale(3); opacity: 0; } }
@keyframes ai-link { from { opacity: .25; } to { opacity: .8; } }
@keyframes ai-twinkle { 0%, 100% { opacity: .15; } 50% { opacity: .9; } }
