/* Tracergram authentication screens — dashboard dark appearance */
:root {
    color-scheme: dark;
    --auth-bg: #0b1320;
    --auth-nav: #0d1726;
    --auth-panel: #111d2d;
    --auth-panel-raised: #152337;
    --auth-field: #0d1928;
    --auth-border: #2a3b50;
    --auth-border-strong: #344a63;
    --auth-text: #edf4fb;
    --auth-copy: #c7d3df;
    --auth-muted: #91a1b4;
    --auth-blue: #6366f1;
    --auth-blue-light: #818cf8;
    --auth-green: #10b981;
}

body.auth-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 12%, rgba(99, 102, 241, .14), transparent 30%),
        radial-gradient(circle at 88% 80%, rgba(29, 78, 216, .08), transparent 32%),
        var(--auth-bg);
    color: var(--auth-copy);
    overflow-x: hidden;
}

.auth-page .auth-root {
    width: min(1440px, 100%);
    min-height: 100vh;
    margin: 0 auto;
    padding: 28px;
    display: flex;
    gap: 24px;
    position: relative;
}

.auth-page .panel-left {
    flex: 1.08 1 0;
    min-width: 0;
    min-height: calc(100vh - 56px);
    padding: 32px 38px;
    border: 1px solid var(--auth-border);
    border-radius: 24px;
    background:
        radial-gradient(circle at 88% 9%, rgba(99, 102, 241, .18), transparent 34%),
        linear-gradient(145deg, #111d2d 0%, #102438 100%);
    box-shadow: 0 28px 70px -42px rgba(0, 0, 0, .9);
    overflow: hidden;
}

.auth-page .panel-left::before {
    inset: 0;
    background-image:
        linear-gradient(rgba(129, 140, 248, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(129, 140, 248, .035) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,.8), transparent 88%);
}

.auth-page .panel-left::after {
    top: auto;
    right: -190px;
    bottom: -270px;
    width: 620px;
    height: 620px;
    background: radial-gradient(circle, rgba(99, 102, 241, .14), transparent 65%);
}

.auth-page .brand {
    width: fit-content;
    gap: 11px;
}

.auth-page .brand-icon {
    width: 39px;
    height: 39px;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: none !important;
    box-shadow: none !important;
    overflow: visible;
}

.auth-page .brand-icon img {
    width: 39px;
    height: 39px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.auth-page .brand-name {
    font-size: 22px;
    letter-spacing: -.025em;
}

.auth-page .panel-body {
    padding: 72px 0 32px;
    justify-content: center;
}

.auth-page .panel-eyebrow {
    width: fit-content;
    margin-bottom: 20px;
    padding: 7px 10px;
    border: 1px solid rgba(129, 140, 248, .24);
    border-radius: 999px;
    background: rgba(99, 102, 241, .1);
    color: var(--auth-blue-light);
    font-size: 10.5px;
    letter-spacing: .1em;
}

.auth-page .panel-headline {
    max-width: 610px;
    margin-bottom: 17px;
    color: var(--auth-text);
    font-size: clamp(34px, 3.2vw, 48px);
    line-height: 1.08;
    letter-spacing: -.045em;
}

.auth-page .panel-headline .grad {
    background: linear-gradient(110deg, #a5b4fc 0%, #818cf8 48%, #c4b5fd 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.auth-page .panel-sub {
    max-width: 520px;
    margin-bottom: 34px;
    color: var(--auth-muted);
    font-size: 14.5px;
    line-height: 1.7;
}

.auth-page .feature-list {
    max-width: 570px;
    gap: 10px;
    margin-bottom: 28px;
}

.auth-page .feature-row {
    gap: 13px;
    padding: 12px 13px;
    border: 1px solid rgba(42, 59, 80, .78);
    border-radius: 13px;
    background: rgba(13, 25, 40, .5);
}

.auth-page .feature-icon-wrap {
    width: 37px;
    height: 37px;
    border-color: rgba(129, 140, 248, .22);
    background: rgba(99, 102, 241, .11);
}

.auth-page .feature-icon-wrap svg { color: var(--auth-blue-light); }
.auth-page .feature-copy strong { color: var(--auth-text); }
.auth-page .feature-copy span { color: var(--auth-muted); }

.auth-page .stats-card {
    max-width: 570px;
    padding: 18px 20px;
    border-color: var(--auth-border);
    border-radius: 14px;
    background: rgba(21, 35, 55, .82);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}

.auth-page .stats-card-label { color: var(--auth-muted); }
.auth-page .stats-grid { gap: 10px; }
.auth-page .stat-box {
    position: relative;
    padding: 13px 10px 10px;
    border: 1px solid #2a3b50;
    border-radius: 10px;
    background: #111d2d;
    overflow: hidden;
}
.auth-page .stat-box::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: var(--auth-blue);
}
.auth-page .stat-box:nth-child(2)::before { background: var(--auth-green); }
.auth-page .stat-box:nth-child(3)::before { background: #8b5cf6; }
.auth-page .stat-num { color: var(--auth-text); }
.auth-page .stat-lbl { color: var(--auth-muted); }

.auth-page .steps {
    max-width: 570px;
    gap: 10px;
    margin-bottom: 0;
}

.auth-page .step {
    gap: 14px;
    padding: 14px;
    border: 1px solid rgba(42, 59, 80, .78);
    border-radius: 13px;
    background: rgba(13, 25, 40, .5);
}

.auth-page .step:not(:last-child) .step-line { display: none; }
.auth-page .step-num {
    width: 34px;
    height: 34px;
    border-color: rgba(129, 140, 248, .24);
    background: rgba(99, 102, 241, .11);
    color: var(--auth-blue-light);
}
.auth-page .step-body { padding: 2px 0; }
.auth-page .step-body strong { color: var(--auth-text); }
.auth-page .step-body span { color: var(--auth-muted); }

.auth-page .panel-right {
    flex: .92 1 0;
    min-width: 0;
    padding: 48px 44px;
    border: 0;
    border-radius: 24px;
    background: transparent;
    overflow: visible;
}

.auth-page .panel-right::before {
    width: 620px;
    height: 620px;
    background: radial-gradient(circle, rgba(99, 102, 241, .11), transparent 65%);
}

.auth-page .form-box { max-width: 450px; }

.auth-page .form-card,
.auth-register .form-box {
    position: relative;
    z-index: 1;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    overflow: visible;
}

.auth-page .form-card::before,
.auth-register .form-box::before {
    display: none;
}

.auth-page .form-header { margin-bottom: 27px; }
.auth-page .form-header h1 {
    color: var(--auth-text);
    font-size: 27px;
    letter-spacing: -.03em;
}
.auth-page .form-header p { color: var(--auth-muted); font-size: 14px; }

.auth-page .form-group { margin-bottom: 18px; }
.auth-page .form-group label {
    color: #aebdcb;
    font-size: 11px;
    letter-spacing: .075em;
}
.auth-page .optional-badge,
.auth-page .form-help { color: #718399; }

.auth-page .form-group input {
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid #314258;
    border-radius: 10px;
    background: var(--auth-field);
    color: var(--auth-text);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.018);
}
.auth-page .form-group input::placeholder { color: #66778b; }
.auth-page .form-group input:hover { border-color: #3b5069; }
.auth-page .form-group input:focus {
    border-color: var(--auth-blue);
    background: #0d1d2d;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .16);
}

.auth-page .forgot-link,
.auth-page .form-footer a,
.auth-page .terms-row label a { color: var(--auth-blue-light); }
.auth-page .forgot-link:hover,
.auth-page .form-footer a:hover { color: #bae6fd; }

.auth-page .terms-row label,
.auth-page .form-footer { color: var(--auth-muted); }
.auth-page .terms-row input[type='checkbox'] { accent-color: var(--auth-blue); }

.auth-page .btn-submit {
    min-height: 48px;
    border: 1px solid rgba(129, 140, 248, .18);
    border-radius: 10px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    box-shadow: 0 12px 24px -16px rgba(99, 102, 241, .9), inset 0 1px 0 rgba(255,255,255,.18);
    font-size: 15px;
}
.auth-page .btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px -16px rgba(99, 102, 241, .95), inset 0 1px 0 rgba(255,255,255,.2);
}
.auth-page .btn-submit:focus-visible,
.auth-page a:focus-visible,
.auth-page input:focus-visible {
    outline: 2px solid var(--auth-blue-light);
    outline-offset: 3px;
}

.auth-page .trust-line { color: #718399; margin-top: 14px; }
.auth-page .alert-error {
    border-color: rgba(248, 113, 113, .3);
    background: rgba(127, 29, 29, .22);
    color: #fecaca;
}
.auth-page .form-footer { margin-top: 18px; }
.auth-page .back-home {
    width: fit-content;
    margin: 24px auto 0;
    color: #718399;
}
.auth-page .back-home:hover { color: var(--auth-copy); }

.auth-register .form-footer { margin-top: 20px; }
.auth-register .back-home { margin-top: 22px; }

@media (max-width: 1000px) {
    .auth-page .auth-root { padding: 20px; gap: 16px; }
    .auth-page .panel-left { padding: 28px; }
    .auth-page .panel-right { padding: 34px 20px; }
    .auth-page .form-card,
    .auth-register .form-box { padding: 0; }
}

@media (max-width: 860px) {
    .auth-page .auth-root {
        min-height: 100vh;
        flex-direction: column;
        justify-content: flex-start;
        padding: 20px;
    }
    .auth-page .panel-left {
        display: flex;
        flex: none;
        min-height: 0;
        padding: 0 2px;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        overflow: visible;
    }
    .auth-page .panel-left::before,
    .auth-page .panel-left::after,
    .auth-page .panel-body { display: none; }
    .auth-page .panel-inner { height: auto; }
    .auth-page .panel-right {
        flex: none;
        width: 100%;
        padding: 18px 0 30px;
    }
    .auth-page .form-box { max-width: 520px; }
}

@media (max-width: 520px) {
    .auth-page .auth-root { padding: 16px; }
    .auth-page .brand-icon { width: 35px; height: 35px; }
    .auth-page .brand-icon img { width: 35px; height: 35px; }
    .auth-page .brand-name { font-size: 20px; }
    .auth-page .form-card,
    .auth-register .form-box { padding: 0; }
    .auth-page .form-header h1 { font-size: 24px; }
}

/* Single-column authentication layout */
.auth-page .auth-root {
    width: 100%;
    max-width: none;
    padding: 0;
    justify-content: center;
}

.auth-page .panel-left { display: none !important; }

.auth-page .panel-right {
    flex: 1 1 auto;
    width: 100%;
    min-height: 100vh;
    padding: 48px 24px;
    border-radius: 0;
}

.auth-page .form-box { max-width: 480px; }

.auth-page .auth-form-brand {
    display: flex;
    width: fit-content;
    margin: 0 0 44px;
}

@media (max-width: 520px) {
    .auth-page .panel-right { padding: 30px 20px; }
    .auth-page .auth-form-brand { margin-bottom: 34px; }
}
