:root,
[data-bs-theme="light"] {
    --auth-bg: #050505;
    --auth-panel: rgba(14, 14, 14, 0.88);
    --auth-panel-strong: rgba(20, 20, 20, 0.96);
    --auth-border: rgba(255, 255, 255, 0.09);
    --auth-border-strong: rgba(255, 255, 255, 0.16);
    --auth-text: #f5f5f5;
    --auth-muted: #a1a1aa;
    --auth-soft: #6b7280;
    --auth-accent: #fafafa;
    --auth-accent-soft: rgba(255, 255, 255, 0.08);
    --auth-danger: #f87171;
    --auth-warning: #facc15;
    --auth-success: #86efac;
    --auth-shadow: 0 32px 80px rgba(0, 0, 0, 0.45);
}

html,
body {
    height: 100%;
    margin: 0;
}

body.auth-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.07), transparent 26%),
        radial-gradient(circle at 85% 18%, rgba(255, 255, 255, 0.05), transparent 22%),
        linear-gradient(135deg, #020202 0%, #070707 45%, #0b0b0b 100%);
    color: var(--auth-text);
    font-family: 'Inter', system-ui, sans-serif;
    overflow-x: hidden;
}

.auth-shell {
    position: relative;
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(360px, 460px);
    overflow: hidden;
}

.auth-shell::before,
.auth-shell::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.auth-shell::before {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: radial-gradient(circle at center, black 58%, transparent 100%);
    opacity: 0.55;
}

.auth-shell::after {
    background:
        repeating-linear-gradient(
            to bottom,
            rgba(255, 255, 255, 0.015),
            rgba(255, 255, 255, 0.015) 1px,
            transparent 1px,
            transparent 4px
        );
    opacity: 0.2;
}

.auth-hero {
    position: relative;
    padding: 42px 48px 36px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.auth-orb {
    position: absolute;
    border-radius: 999px;
    filter: blur(20px);
    opacity: 0.28;
    pointer-events: none;
}

.auth-orb--one {
    top: 64px;
    left: 50px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.24), transparent 72%);
}

.auth-orb--two {
    right: 110px;
    top: 140px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(134, 239, 172, 0.12), transparent 72%);
}

.auth-processing {
    position: relative;
    z-index: 1;
    margin-top: 42px;
    min-height: 420px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.015)),
        rgba(255, 255, 255, 0.02);
    overflow: hidden;
}

.auth-processing::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
    background-size: 36px 36px;
    opacity: 0.28;
}

.auth-processing-ring {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    animation: authPulse 4.6s ease-in-out infinite;
}

.auth-processing-ring--one {
    width: 220px;
    height: 220px;
    left: 80px;
    top: 94px;
}

.auth-processing-ring--two {
    width: 340px;
    height: 340px;
    left: 22px;
    top: 34px;
    animation-delay: -1.2s;
}

.auth-processing-ring--three {
    width: 460px;
    height: 460px;
    left: -42px;
    top: -24px;
    animation-delay: -2.4s;
}

.auth-processing-node {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 108px;
    height: 48px;
    padding: 0 16px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(10, 10, 10, 0.8);
    color: rgba(255,255,255,0.88);
    font-family: 'Share Tech Mono', 'Consolas', monospace;
    font-size: 0.78rem;
    letter-spacing: 0.03em;
    box-shadow: 0 12px 26px rgba(0,0,0,0.24);
}

.auth-processing-node--core {
    left: 102px;
    top: 178px;
    min-width: 156px;
    height: 58px;
    font-size: 0.94rem;
}

.auth-processing-node--a { left: 370px; top: 84px; }
.auth-processing-node--b { left: 470px; top: 178px; }
.auth-processing-node--c { left: 370px; top: 274px; }
.auth-processing-node--d { right: 82px; top: 178px; min-width: 134px; }

.auth-processing-path {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.18), rgba(255,255,255,0.04));
    overflow: hidden;
}

.auth-processing-path::after {
    content: "";
    position: absolute;
    top: -1px;
    left: -22%;
    width: 22%;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.92), transparent);
    animation: authFlow 2.4s linear infinite;
}

.auth-processing-path--one { left: 258px; top: 124px; width: 126px; transform: rotate(-28deg); transform-origin: left center; }
.auth-processing-path--two { left: 258px; top: 204px; width: 220px; }
.auth-processing-path--three { left: 258px; top: 286px; width: 126px; transform: rotate(28deg); transform-origin: left center; }
.auth-processing-path--four { left: 578px; top: 202px; width: 118px; }

.auth-processing-stack {
    position: absolute;
    right: 42px;
    bottom: 32px;
    display: grid;
    gap: 10px;
}

.auth-processing-bar {
    width: 180px;
    height: 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    overflow: hidden;
}

.auth-processing-bar::after {
    content: "";
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(255,255,255,0.18), rgba(255,255,255,0.82), rgba(255,255,255,0.18));
    animation: authSweep 3.2s ease-in-out infinite;
}

.auth-processing-bar:nth-child(2)::after { animation-delay: -1s; }
.auth-processing-bar:nth-child(3)::after { animation-delay: -2s; }

.auth-brandbar,
.auth-panel-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.auth-logo-mark,
.auth-logo-name {
    font-family: 'Share Tech Mono', 'Consolas', monospace;
    line-height: 1;
}

.auth-logo-mark {
    display: inline-flex;
    align-items: baseline;
    color: var(--auth-accent);
    font-size: 1.4rem;
    letter-spacing: -0.04em;
}

.auth-logo-arrow {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.48);
    margin-left: 0.04em;
}

.auth-logo-name {
    font-size: 1.5rem;
    letter-spacing: -0.03em;
}

.auth-logo-code {
    color: var(--auth-accent);
}

.auth-logo-spot {
    color: rgba(255, 255, 255, 0.46);
}

.auth-badge {
    padding: 7px 11px;
    border-radius: 999px;
    border: 1px solid var(--auth-border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--auth-soft);
    font-size: 0.74rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.auth-headline {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin-top: 62px;
}

.auth-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    color: var(--auth-muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.auth-kicker::before {
    content: "";
    width: 36px;
    height: 1px;
    background: rgba(255, 255, 255, 0.28);
}

.auth-headline h1 {
    margin: 0;
    font-size: clamp(2.8rem, 5vw, 5.2rem);
    line-height: 0.95;
    letter-spacing: -0.06em;
    font-weight: 700;
    max-width: 10ch;
}

.auth-headline p {
    margin: 22px 0 0;
    max-width: 54ch;
    color: var(--auth-muted);
    font-size: 1rem;
    line-height: 1.7;
}

@keyframes authPulse {
    0%, 100% { opacity: 0.28; transform: scale(0.98); }
    50% { opacity: 0.7; transform: scale(1.02); }
}

@keyframes authFlow {
    0% { left: -22%; }
    100% { left: 100%; }
}

@keyframes authSweep {
    0%, 100% { width: 28%; transform: translateX(-10%); opacity: 0.55; }
    50% { width: 72%; transform: translateX(38%); opacity: 1; }
}

.auth-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 18px;
    margin-top: 36px;
}

.auth-card {
    border: 1px solid var(--auth-border);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.auth-card--terminal {
    grid-column: span 7;
    min-height: 260px;
    padding: 18px 18px 20px;
}

.auth-card--stats {
    grid-column: span 5;
    display: grid;
    gap: 16px;
    padding: 18px;
}

.auth-card--wide {
    grid-column: span 12;
    padding: 18px;
}

.auth-terminal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    color: var(--auth-soft);
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.auth-terminal-dots {
    display: inline-flex;
    gap: 7px;
}

.auth-terminal-dots span {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
}

.auth-code {
    display: grid;
    gap: 10px;
    font-family: 'Share Tech Mono', 'Consolas', monospace;
    font-size: 0.9rem;
}

.auth-code-line {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.auth-code-line strong {
    font-weight: 400;
    color: rgba(255, 255, 255, 0.34);
}

.auth-code-line em {
    font-style: normal;
    color: #86efac;
}

.auth-code-line .warn {
    color: #facc15;
}

.auth-code-line .quiet {
    color: rgba(255, 255, 255, 0.48);
}

.auth-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.auth-chip {
    padding: 9px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.035);
    color: var(--auth-muted);
    font-size: 0.78rem;
    letter-spacing: 0.05em;
}

.auth-stat {
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
}

.auth-stat-value {
    font-family: 'Share Tech Mono', 'Consolas', monospace;
    font-size: 1.8rem;
    color: var(--auth-accent);
    letter-spacing: -0.04em;
}

.auth-stat-label {
    margin-top: 8px;
    color: var(--auth-soft);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.auth-signal-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.auth-signal {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.025);
}

.auth-signal h3 {
    margin: 0 0 8px;
    color: var(--auth-accent);
    font-size: 0.88rem;
    letter-spacing: -0.02em;
}

.auth-signal p {
    margin: 0;
    color: var(--auth-muted);
    font-size: 0.82rem;
    line-height: 1.6;
}

.auth-panel {
    position: relative;
    z-index: 1;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 20%),
        var(--auth-panel);
    backdrop-filter: blur(18px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
}

.auth-panel-card {
    width: 100%;
    max-width: 380px;
    padding: 28px;
    border-radius: 28px;
    border: 1px solid var(--auth-border);
    background: var(--auth-panel-strong);
    box-shadow: var(--auth-shadow);
}

.auth-panel-badge {
    padding: 8px 11px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.025);
    color: var(--auth-soft);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.auth-panel-copy {
    margin-top: 20px;
}

.auth-panel-copy h2 {
    margin: 0;
    font-size: 1.8rem;
    letter-spacing: -0.04em;
}

.auth-panel-copy p {
    margin: 12px 0 0;
    color: var(--auth-muted);
    font-size: 0.94rem;
    line-height: 1.7;
}

.auth-form {
    margin-top: 22px;
}

.auth-alert {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 0.86rem;
    line-height: 1.5;
}

.auth-alert a {
    color: var(--auth-accent);
}

.auth-alert--error {
    background: rgba(248, 113, 113, 0.09);
    border: 1px solid rgba(248, 113, 113, 0.24);
    color: #fca5a5;
}

.auth-alert--warning {
    background: rgba(250, 204, 21, 0.08);
    border: 1px solid rgba(250, 204, 21, 0.24);
    color: #fde68a;
}

.auth-field {
    position: relative;
    margin-bottom: 22px;
}

.auth-label {
    display: block;
    margin-bottom: 7px;
    color: var(--auth-soft);
    font-size: 0.73rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.auth-input {
    width: 100%;
    min-height: 52px;
    padding: 0 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: var(--auth-text);
    font-size: 0.96rem;
    font-family: 'Inter', system-ui, sans-serif;
    outline: none;
    transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}

.auth-input::placeholder {
    color: rgba(255, 255, 255, 0.28);
}

.auth-input:focus {
    border-color: var(--auth-border-strong);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.05);
}

.auth-button {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    width: 100%;
    min-height: 50px;
    margin-top: 8px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.98), rgba(216,216,219,0.96));
    color: #09090b;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow:
        0 14px 30px rgba(255, 255, 255, 0.08),
        0 9px 24px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255,255,255,0.9),
        inset 0 -1px 0 rgba(0,0,0,0.08);
    transition: transform 0.14s, box-shadow 0.14s, filter 0.14s, border-color 0.14s;
}

.auth-button::before {
    content: "";
    position: absolute;
    inset: 1px;
    z-index: -1;
    border-radius: 12px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.62), transparent);
    transform: translateX(-120%);
    transition: transform 0.55s ease;
}

.auth-button::after {
    content: "";
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 7px;
    height: 1px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.32), transparent);
    opacity: 0.55;
}

.auth-button:hover {
    transform: translateY(-1px);
    border-color: #ffffff;
    filter: brightness(1.04);
    box-shadow:
        0 18px 38px rgba(255, 255, 255, 0.12),
        0 13px 30px rgba(0, 0, 0, 0.42),
        inset 0 1px 0 rgba(255,255,255,1),
        inset 0 -1px 0 rgba(0,0,0,0.1);
}

.auth-button:hover::before {
    transform: translateX(120%);
}

.auth-button:active {
    transform: translateY(0);
    filter: brightness(0.96);
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.32),
        inset 0 2px 7px rgba(0,0,0,0.16);
}

.auth-panel-foot {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--auth-soft);
    font-size: 0.8rem;
    line-height: 1.6;
}

.auth-panel-foot strong {
    color: var(--auth-accent);
    font-weight: 600;
}

.auth-mini-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.auth-mini-cell {
    padding: 10px 8px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
    text-align: center;
}

.auth-mini-cell strong {
    display: block;
    color: var(--auth-accent);
    font-family: 'Share Tech Mono', 'Consolas', monospace;
    font-size: 0.96rem;
}

.auth-mini-cell span {
    display: block;
    margin-top: 6px;
    color: var(--auth-soft);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

@media (max-width: 1120px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-hero {
        min-height: auto;
        padding-bottom: 16px;
    }

    .auth-panel {
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }
}

@media (max-width: 720px) {
    .auth-hero {
        padding: 28px 18px 10px;
    }

    .auth-headline {
        margin-top: 30px;
    }

    .auth-processing {
        min-height: 340px;
    }

    .auth-processing-node--core { left: 44px; top: 144px; }
    .auth-processing-node--a { left: 250px; top: 56px; }
    .auth-processing-node--b { left: 302px; top: 144px; }
    .auth-processing-node--c { left: 250px; top: 234px; }
    .auth-processing-node--d { right: 24px; top: 144px; }
    .auth-processing-path--one { left: 196px; top: 102px; width: 76px; }
    .auth-processing-path--two { left: 196px; top: 172px; width: 116px; }
    .auth-processing-path--three { left: 196px; top: 244px; width: 76px; }
    .auth-processing-path--four { left: 412px; top: 170px; width: 72px; }

    .auth-grid {
        grid-template-columns: 1fr;
    }

    .auth-card--terminal,
    .auth-card--stats,
    .auth-card--wide {
        grid-column: span 1;
    }

    .auth-signal-list {
        grid-template-columns: 1fr;
    }

    .auth-processing-node,
    .auth-processing-path,
    .auth-processing-stack {
        transform: scale(0.92);
        transform-origin: top left;
    }

    .auth-panel {
        padding: 18px;
    }

    .auth-panel-card {
        padding: 22px 18px;
        border-radius: 22px;
    }
}

/* Focused login screen */
.login-stage {
    position: relative;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.08), transparent 26%),
        linear-gradient(180deg, #030303 0%, #080808 46%, #020202 100%);
}

.login-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: radial-gradient(circle at center, black 48%, transparent 84%);
    opacity: 0.45;
}

.login-noise {
    position: absolute;
    inset: 0;
    background-image:
        repeating-radial-gradient(circle at 12% 18%, rgba(255,255,255,0.08) 0 1px, transparent 1px 7px),
        repeating-radial-gradient(circle at 82% 72%, rgba(255,255,255,0.05) 0 1px, transparent 1px 9px);
    opacity: 0.16;
    animation: loginNoise 6s steps(4) infinite;
}

.login-scanline {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,0.08) 50%, transparent 100%);
    height: 18%;
    transform: translateY(-120%);
    animation: loginScan 6s linear infinite;
    opacity: 0.22;
}

.ai-field {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.ai-core {
    position: absolute;
    left: 50%;
    top: 47%;
    width: 520px;
    height: 520px;
    transform: translate(-50%, -50%);
}

.ai-core-ring {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 50%;
    animation: aiRing 5.5s ease-in-out infinite;
}

.ai-core-ring--two {
    inset: 72px;
    animation-delay: -1.4s;
}

.ai-core-ring--three {
    inset: 150px;
    animation-delay: -2.8s;
}

.ai-core-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,0.92);
    box-shadow: 0 0 34px rgba(255,255,255,0.55);
    transform: translate(-50%, -50%);
}

.ai-trace {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.34), transparent);
    overflow: hidden;
}

.ai-trace::after {
    content: "";
    position: absolute;
    top: -2px;
    left: -20%;
    width: 20%;
    height: 5px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.9), transparent);
    animation: aiTrace 2.6s linear infinite;
}

.ai-trace--one { left: 7%; top: 24%; width: 34%; transform: rotate(8deg); }
.ai-trace--two { right: 8%; top: 30%; width: 30%; transform: rotate(-10deg); animation-delay: -0.7s; }
.ai-trace--three { left: 10%; bottom: 24%; width: 32%; transform: rotate(-9deg); }
.ai-trace--four { right: 10%; bottom: 27%; width: 31%; transform: rotate(9deg); }
.ai-trace--two::after { animation-delay: -0.7s; }
.ai-trace--three::after { animation-delay: -1.4s; }
.ai-trace--four::after { animation-delay: -2.1s; }

.code-stream {
    position: absolute;
    display: grid;
    gap: 11px;
    width: min(34vw, 460px);
    font-family: 'Share Tech Mono', 'Consolas', monospace;
    font-size: 0.82rem;
    line-height: 1.3;
    color: rgba(255,255,255,0.42);
    opacity: 0.8;
}

.code-stream span {
    display: block;
    width: max-content;
    max-width: 100%;
    padding: 7px 10px;
    border: 1px solid rgba(255,255,255,0.055);
    border-radius: 8px;
    background: rgba(0,0,0,0.34);
    animation: codeBlink 4s ease-in-out infinite;
}

.code-stream--one {
    left: 5vw;
    top: 14vh;
}

.code-stream--two {
    right: 5vw;
    top: 18vh;
}

.code-stream--three {
    left: 50%;
    bottom: 9vh;
    width: min(44vw, 560px);
    transform: translateX(-50%);
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.code-stream--one span:nth-child(2),
.code-stream--two span:nth-child(3),
.code-stream--three span:nth-child(1) {
    animation-delay: -1s;
}

.code-stream--one span:nth-child(4),
.code-stream--two span:nth-child(1),
.code-stream--three span:nth-child(3) {
    animation-delay: -2.2s;
}

.login-card-modern {
    position: relative;
    z-index: 5;
    width: min(100%, 390px);
    padding: 32px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 24px;
    background: rgba(12, 12, 12, 0.86);
    backdrop-filter: blur(22px);
    box-shadow: 0 34px 90px rgba(0,0,0,0.48), inset 0 1px 0 rgba(255,255,255,0.06);
}

.login-brand {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.login-logo-line {
    display: inline-flex;
    align-items: baseline;
    font-family: 'Share Tech Mono', 'Consolas', monospace;
    line-height: 1;
}

.login-logo-name {
    color: #f5f5f5;
    font-size: 2rem;
    letter-spacing: 0;
}

.login-logo-name em {
    color: rgba(255,255,255,0.5);
    font-style: normal;
}

.login-form {
    margin: 0;
    display: grid;
    gap: 0;
}

.login-blocked-message {
    min-height: 112px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    background: rgba(255,255,255,0.025);
    color: rgba(255,255,255,0.72);
    text-align: center;
    font-size: 0.94rem;
    line-height: 1.6;
}

@keyframes loginNoise {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(1%, -1%); }
    50% { transform: translate(-1%, 1%); }
    75% { transform: translate(1%, 1%); }
}

@keyframes loginScan {
    0% { transform: translateY(-120%); }
    100% { transform: translateY(620%); }
}

@keyframes aiRing {
    0%, 100% { opacity: 0.24; transform: scale(0.94); }
    50% { opacity: 0.7; transform: scale(1.04); }
}

@keyframes aiTrace {
    0% { left: -20%; }
    100% { left: 100%; }
}

@keyframes codeBlink {
    0%, 100% { opacity: 0.28; transform: translateY(0); }
    45% { opacity: 0.82; transform: translateY(-2px); }
}

@media (max-width: 920px) {
    .code-stream {
        display: none;
    }

    .ai-core {
        width: 420px;
        height: 420px;
    }
}

@media (max-width: 520px) {
    .login-stage {
        padding: 18px;
    }

    .login-card-modern {
        padding: 26px 20px;
        border-radius: 20px;
    }

    .login-logo-name {
        font-size: 1.72rem;
    }
}

/* Login visual override */
:root,
[data-bs-theme="light"] {
    --auth-panel: rgba(11, 11, 12, 0.84);
    --auth-panel-strong: rgba(12, 12, 14, 0.95);
    --auth-border: rgba(255, 255, 255, 0.09);
    --auth-border-strong: rgba(255, 255, 255, 0.22);
    --auth-text: #f3f3f4;
    --auth-muted: #9a9aa1;
    --auth-soft: #666670;
    --auth-accent: #f4f4f5;
    --auth-accent-soft: rgba(255, 255, 255, 0.08);
    --auth-shadow: 0 38px 120px rgba(0, 0, 0, 0.58);
}

body.auth-body {
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.03), transparent 24%),
        radial-gradient(circle at 85% 18%, rgba(255, 255, 255, 0.025), transparent 22%),
        linear-gradient(135deg, #050505 0%, #0a0a0b 45%, #030303 100%);
}

.login-stage {
    background:
        radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.05), transparent 24%),
        radial-gradient(circle at 18% 16%, rgba(255, 255, 255, 0.025), transparent 26%),
        radial-gradient(circle at 84% 76%, rgba(255, 255, 255, 0.03), transparent 22%),
        linear-gradient(180deg, #040404 0%, #090909 46%, #020202 100%);
}

.login-stage::before {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    opacity: 0.34;
}

.login-noise {
    background-image:
        repeating-radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 7px),
        repeating-radial-gradient(circle at 82% 72%, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 9px);
    opacity: 0.14;
}

.login-scanline {
    background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,0.06) 50%, transparent 100%);
}

.ai-core-ring {
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 34px rgba(255, 255, 255, 0.02);
}

.ai-core-dot {
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 0 22px rgba(255, 255, 255, 0.3), 0 0 60px rgba(255, 255, 255, 0.08);
}

.ai-trace {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
}

.ai-trace::after {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
}

.code-stream {
    color: rgba(255, 255, 255, 0.26);
}

.code-stream span {
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: linear-gradient(180deg, rgba(14, 14, 15, 0.76), rgba(8, 8, 9, 0.55));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.code-stream-line {
    min-height: 34px;
    transition:
        opacity 0.28s ease,
        transform 0.28s ease,
        border-color 0.28s ease,
        box-shadow 0.28s ease,
        background 0.28s ease;
}

.code-stream-line.is-typing,
.code-stream-line.is-complete {
    opacity: 1;
}

.code-stream-line.is-retrieving {
    opacity: 0.96;
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.11);
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015), rgba(255, 255, 255, 0.06)),
        linear-gradient(180deg, rgba(18, 18, 19, 0.82), rgba(9, 9, 10, 0.58));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.03),
        0 0 0 1px rgba(255, 255, 255, 0.03),
        0 0 18px rgba(255, 255, 255, 0.05);
    animation: codeRetrieve 1.1s ease-in-out infinite;
}

.code-stream-line.is-typing::after {
    content: "";
    display: inline-block;
    width: 7px;
    height: 1em;
    margin-left: 4px;
    vertical-align: -0.15em;
    background: rgba(255, 255, 255, 0.5);
    animation: codeCursor 0.9s steps(1) infinite;
}

.code-stream-line.is-complete {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.02),
        0 0 12px rgba(255, 255, 255, 0.03);
}

.login-card-modern {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 32px 18px 32px 18px;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.09), transparent 26%),
        radial-gradient(circle at 18% 120%, rgba(255, 255, 255, 0.05), transparent 34%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.035), transparent 24%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012) 18%, transparent 30%),
        linear-gradient(145deg, rgba(10, 10, 12, 0.97), rgba(4, 4, 5, 0.95) 58%, rgba(8, 8, 10, 0.93));
    box-shadow:
        0 42px 120px rgba(0, 0, 0, 0.58),
        0 0 0 1px rgba(255, 255, 255, 0.035),
        0 0 60px rgba(255, 255, 255, 0.045),
        inset 0 1px 0 rgba(255, 255, 255, 0.07),
        inset 0 -24px 40px rgba(0, 0, 0, 0.22);
}

.login-card-modern::before,
.login-card-modern::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.login-card-modern::before {
    inset: 10px;
    border-radius: 24px 12px 24px 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.22), transparent 18%) top left / 96px 1px no-repeat,
        linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent 26%) top left / 1px 72px no-repeat,
        linear-gradient(270deg, rgba(255, 255, 255, 0.16), transparent 20%) bottom right / 86px 1px no-repeat,
        linear-gradient(0deg, rgba(255, 255, 255, 0.16), transparent 20%) bottom right / 1px 64px no-repeat;
    opacity: 0.92;
}

.login-card-modern::after {
    inset: 0;
    background:
        linear-gradient(125deg, transparent 0 16%, rgba(255, 255, 255, 0.09) 16.5%, transparent 17%) top right / 120px 120px no-repeat,
        linear-gradient(305deg, transparent 0 10%, rgba(255, 255, 255, 0.08) 10.5%, transparent 11%) bottom left / 128px 128px no-repeat;
    opacity: 0.7;
}

.login-brand {
    text-align: left;
    margin-bottom: 26px;
}

.login-brand-stack {
    display: grid;
    gap: 10px;
    justify-items: start;
}

.login-eyebrow {
    color: var(--auth-accent);
    font-family: 'Share Tech Mono', 'Consolas', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    text-shadow: none;
}

.login-logo-name {
    color: #f5fdff;
    font-size: 2rem;
    font-weight: 400;
    letter-spacing: -0.04em;
    text-transform: none;
    text-shadow: none;
}

.login-logo-line {
    align-items: center;
    position: relative;
    padding: 0 0 12px;
}

.login-logo-line::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 118px;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.08), transparent);
    opacity: 0.85;
}

.login-logo-name span {
    color: #fff;
}

.login-logo-name em {
    color: #666;
    font-style: normal;
}

.login-signal-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
}

.login-signal-pill {
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(20, 20, 21, 0.75);
    color: rgba(210, 210, 214, 0.76);
    font-family: 'Share Tech Mono', 'Consolas', monospace;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.login-console-head {
    display: grid;
    grid-template-columns: auto auto auto 1fr;
    align-items: center;
    gap: 9px;
    margin-bottom: 18px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(16, 16, 17, 0.92), rgba(9, 9, 10, 0.82));
}

.login-console-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    box-shadow: none;
}

.login-console-text {
    min-width: 0;
    color: rgba(190, 190, 195, 0.62);
    font-family: 'Share Tech Mono', 'Consolas', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.07em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.login-blocked-message {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(16, 16, 18, 0.7);
    color: rgba(226, 226, 230, 0.78);
}

.auth-signal-zone {
    min-height: 42px;
    margin-top: 14px;
}

.auth-signal-zone--blocked {
    min-height: 112px;
    margin-top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-signal-zone--blocked .auth-signal-pill {
    max-width: 320px;
    justify-content: center;
    text-align: center;
}

.auth-signal-pill {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    max-width: 100%;
    padding: 7px 12px;
    border: 1px solid rgba(248, 113, 113, 0.12);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(34, 12, 14, 0.82), rgba(18, 7, 8, 0.72));
    color: rgba(255, 186, 186, 0.9);
    font-family: 'Share Tech Mono', 'Consolas', monospace;
    font-size: 0.78rem;
    line-height: 1.3;
    letter-spacing: 0.01em;
    opacity: 0;
    transform: translateY(5px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.02),
        0 0 0 1px rgba(248, 113, 113, 0.03);
    transition:
        opacity 0.38s ease,
        transform 0.38s ease,
        box-shadow 0.38s ease,
        border-color 0.38s ease;
    pointer-events: none;
}

.auth-signal-pill.is-visible {
    opacity: 1;
    transform: translateY(0);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.03),
        0 0 0 1px rgba(248, 113, 113, 0.05),
        0 0 18px rgba(248, 113, 113, 0.09);
}

.auth-signal-pill.is-typing::after {
    content: "";
    display: inline-block;
    width: 7px;
    height: 1em;
    margin-left: 4px;
    vertical-align: -0.15em;
    background: rgba(255, 205, 205, 0.68);
    animation: codeCursor 0.9s steps(1) infinite;
}

.auth-signal-pill.is-fading {
    opacity: 0;
    transform: translateY(-3px);
    box-shadow: none;
}

.auth-alert--error {
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.28);
    color: #ffc1c1;
}

.auth-label {
    color: rgba(168, 168, 174, 0.84);
}

.auth-input {
    min-height: 58px;
    padding: 14px 0 10px;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: rgba(245, 245, 246, 0.96);
    font-family: 'Share Tech Mono', 'Consolas', monospace;
    font-size: 1.02rem;
    line-height: 1.2;
    letter-spacing: 0;
    caret-color: transparent;
    transition:
        border-color 0.22s ease,
        box-shadow 0.22s ease,
        transform 0.22s ease;
}

.auth-input::placeholder {
    color: rgba(154, 154, 160, 0.56);
    font-family: 'Share Tech Mono', 'Consolas', monospace;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-input:focus {
    border-color: rgba(255, 255, 255, 0.42);
    background: transparent;
    box-shadow: none;
    transform: translateY(-1px);
}

.auth-input-caret {
    position: absolute;
    left: 0;
    bottom: 11px;
    width: 11px;
    height: 2px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.16);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.16s ease;
}

.auth-field.is-focused .auth-input-caret {
    opacity: 1;
    animation: authPromptCaret 1s steps(1) infinite;
}

.auth-submit-stealth {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    border: 0;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

@keyframes aiRing {
    0%, 100% { opacity: 0.22; transform: scale(0.94) rotate(0deg); }
    50% { opacity: 0.72; transform: scale(1.04) rotate(8deg); }
}

@keyframes codeBlink {
    0%, 100% { opacity: 0.3; transform: translateY(0); }
    45% { opacity: 0.82; transform: translateY(-2px); box-shadow: 0 0 12px rgba(255, 255, 255, 0.04); }
}

@keyframes codeCursor {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

@keyframes codeRetrieve {
    0%, 100% {
        opacity: 0.72;
        filter: brightness(0.96);
    }
    50% {
        opacity: 1;
        filter: brightness(1.08);
    }
}

@keyframes authPromptCaret {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

@media (max-width: 520px) {
    .login-brand-stack {
        gap: 10px;
    }

    .login-logo-name {
        font-size: 1.55rem;
    }

    .login-signal-row {
        gap: 6px;
    }
}
