/* ===== Auth Views ===== */
.auth-wrapper {
    --auth-bg: #fdfdfc;
    --auth-bg-end: #ffffff;
    --auth-panel: rgba(255, 255, 255, 0.85);
    --auth-panel-strong: #ffffff;
    --auth-line: rgba(17, 22, 26, 0.12);
    --auth-ink: #11161a;
    --auth-muted: #5f676d;
    --auth-soft: #8c969f;
    --auth-accent: #0070f3;
    --auth-accent-strong: #0060df;
    --auth-accent-soft: rgba(0, 112, 243, 0.12);
    --auth-warm: #0070f3;
    --auth-warm-soft: rgba(0, 112, 243, 0.12);
    --auth-shadow-lg: 0 28px 90px rgba(33, 35, 38, 0.14);
    --auth-shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.08);
    --text: var(--auth-ink);
    --text-secondary: var(--auth-muted);
    --text-tertiary: var(--auth-soft);
    --border: var(--auth-line);
    --bg-card: var(--auth-panel-strong);
    --bg-tertiary: rgba(17, 22, 26, 0.06);
    --glass: var(--auth-panel);
    --accent: var(--auth-accent);
    --accent-hover: var(--auth-accent-strong);
    --accent-light: var(--auth-accent-soft);
    --shadow-lg: var(--auth-shadow-lg);
    --shadow-sm: var(--auth-shadow-sm);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 24px;
    padding: 22px 24px 34px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, var(--auth-bg) 0%, var(--auth-bg-end) 100%);
}

[data-theme="dark"] .auth-wrapper {
    --auth-bg: #000000;
    --auth-bg-end: #0a0a0a;
    --auth-panel: rgba(20, 20, 20, 0.85);
    --auth-panel-strong: #141414;
    --auth-line: rgba(255, 255, 255, 0.12);
    --auth-ink: #ffffff;
    --auth-muted: #a0a0a0;
    --auth-soft: #666666;
    --auth-accent: #3291ff;
    --auth-accent-strong: #0070f3;
    --auth-accent-soft: rgba(50, 145, 255, 0.15);
    --auth-warm: #3291ff;
    --auth-warm-soft: rgba(50, 145, 255, 0.15);
    --auth-shadow-lg: 0 28px 90px rgba(0, 0, 0, 0.45);
    --auth-shadow-sm: 0 8px 18px rgba(0, 0, 0, 0.28);
    --bg-tertiary: rgba(255, 255, 255, 0.07);
}

@media (prefers-color-scheme: dark) {
    [data-theme="auto"] .auth-wrapper {
        --auth-bg: #000000;
        --auth-bg-end: #0a0a0a;
        --auth-panel: rgba(20, 20, 20, 0.85);
        --auth-panel-strong: #141414;
        --auth-line: rgba(255, 255, 255, 0.12);
        --auth-ink: #ffffff;
        --auth-muted: #a0a0a0;
        --auth-soft: #666666;
        --auth-accent: #3291ff;
        --auth-accent-strong: #0070f3;
        --auth-accent-soft: rgba(50, 145, 255, 0.16);
        --auth-warm: #3291ff;
        --auth-warm-soft: rgba(50, 145, 255, 0.16);
        --auth-shadow-lg: 0 28px 90px rgba(0, 0, 0, 0.45);
        --auth-shadow-sm: 0 8px 18px rgba(0, 0, 0, 0.28);
        --bg-tertiary: rgba(255, 255, 255, 0.07);
    }
}

.auth-wrapper::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 32px 32px;
    opacity: 0.3;
}

.auth-wrapper::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.92' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.08'/%3E%3C/svg%3E");
    mix-blend-mode: soft-light;
    opacity: 0.35;
}

.auth-topbar {
    width: min(1240px, 100%);
    position: relative;
    z-index: 2;
}

.auth-topbar-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 0 28px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.46);
    background: rgba(255, 255, 255, 0.56);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
}

[data-theme="dark"] .auth-topbar-inner {
    background: rgba(0, 0, 0, 0.68);
    border-color: rgba(255, 255, 255, 0.08);
}

@media (prefers-color-scheme: dark) {
    [data-theme="auto"] .auth-topbar-inner {
        background: rgba(0, 0, 0, 0.68);
        border-color: rgba(255, 255, 255, 0.08);
    }
}

.auth-topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.auth-top-link {
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
}

.auth-top-link:hover {
    color: var(--text);
    opacity: 1;
}

.auth-shell {
    width: min(1120px, 100%);
    display: grid;
    grid-template-columns: minmax(320px, 0.94fr) minmax(380px, 0.88fr);
    gap: 22px;
    align-items: stretch;
    position: relative;
    z-index: 1;
    margin-top: 4px;
}

.auth-stage,
.auth-card {
    border-radius: 16px;
    border: 1px solid var(--border);
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.auth-stage {
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 28px;
    min-height: 640px;
    background: var(--glass);
}

.auth-stage::before {
    content: "";
    position: absolute;
    inset: 18px;
    border-radius: 12px;
    background-image:
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: radial-gradient(circle at center, #000 44%, transparent 86%);
    -webkit-mask-image: radial-gradient(circle at center, #000 44%, transparent 86%);
    opacity: 0.42;
}

.auth-stage>*,
.auth-card>* {
    position: relative;
    z-index: 1;
}

.auth-stage-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text);
}

.auth-brand-mark {
    width: 26px;
    height: 26px;
    object-fit: contain;
    flex: 0 0 auto;
}

.auth-brand-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.auth-brand-copy strong {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.auth-brand-copy small {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
}

.auth-stage-surface,
.auth-stage-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg-card) 72%, transparent);
    font-size: 11px;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.auth-stage-surface {
    color: var(--accent);
}

.auth-stage-status {
    color: var(--text-secondary);
}

.auth-stage-main {
    max-width: 440px;
}

.auth-stage-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg-card) 76%, transparent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 18px;
}

.auth-stage-kicker::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--auth-warm);
    box-shadow: 0 0 0 6px var(--auth-warm-soft);
}

.auth-stage-title {
    font-size: clamp(38px, 4.8vw, 62px);
    line-height: 0.98;
    letter-spacing: -0.06em;
    margin-bottom: 14px;
}

.auth-stage-desc {
    font-size: 16px;
    line-height: 1.78;
    color: var(--text-secondary);
    margin-bottom: 22px;
}

.auth-stage-pills {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.auth-stage-pill {
    display: inline-flex;
    align-items: center;
    padding: 9px 12px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--bg-card) 68%, transparent);
    border: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-secondary);
}

.auth-stage-board {
    padding: 22px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--bg-card) 74%, transparent);
    border: 1px solid var(--border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.auth-stage-board-top {
    margin-bottom: 18px;
}

.auth-stage-board-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 8px;
}

.auth-stage-board-top strong {
    display: block;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.04em;
    margin-bottom: 8px;
}

.auth-stage-board-top p {
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-secondary);
}

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

.auth-stage-mini {
    padding: 14px;
    border-radius: 18px;
    background: color-mix(in srgb, var(--bg-card) 52%, transparent);
    border: 1px solid var(--border);
}

.auth-stage-mini strong {
    display: block;
    font-size: 17px;
    letter-spacing: -0.04em;
    margin-bottom: 6px;
}

.auth-stage-mini span {
    font-size: 12px;
    line-height: 1.65;
    color: var(--text-secondary);
}

.auth-stage-list {
    list-style: none;
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
}

.auth-stage-list li {
    position: relative;
    padding-left: 18px;
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.auth-stage-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
}

.auth-topbar .theme-switcher {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg-card) 72%, transparent);
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
}

.auth-topbar .theme-switcher button {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: none;
    background: none;
    color: var(--text-tertiary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.auth-topbar .theme-switcher button:hover {
    color: var(--text);
}

.auth-topbar .theme-switcher button.active {
    background: var(--bg-card);
    color: var(--text);
    box-shadow: var(--shadow-sm);
}

.auth-card {
    width: 100%;
    max-width: none;
    padding: 34px;
    background: var(--glass);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 46%);
    pointer-events: none;
}

.auth-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg-card) 76%, transparent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 18px;
}

.auth-badge::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--auth-warm);
    box-shadow: 0 0 0 6px var(--auth-warm-soft);
}

.auth-card h1 {
    font-size: 38px;
    font-weight: 700;
    color: var(--text);
    text-align: left;
    margin-bottom: 8px;
    letter-spacing: -0.045em;
    line-height: 0.96;
}

.auth-card .subtitle {
    text-align: left;
    color: var(--text-secondary);
    margin-bottom: 18px;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.7;
}

.auth-note {
    margin-bottom: 26px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg-card) 68%, transparent);
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.65;
    text-align: left;
}

.auth-note code {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--accent);
}

.auth-toggle {
    text-align: left;
    margin-top: 22px;
    font-size: 13px;
    color: var(--text-tertiary);
}

.auth-toggle a {
    color: var(--accent);
    cursor: pointer;
}

.auth-footer-note {
    position: relative;
    z-index: 1;
    font-size: 12px;
    line-height: 1.8;
    color: var(--text-secondary);
    text-align: center;
}

.auth-footer-note strong,
.auth-footer-note a {
    color: var(--text);
    text-decoration: none;
}

.auth-wrapper .nav {
    max-width: 1120px;
    padding: 0;
    margin: 0 auto;
}
