:root {
    --bg: #0a0907;
    --surface: #100f0d;
    --card: #161412;
    --accent: #d4a03c;
    --accent-bright: #e8b84e;
    --border-subtle: rgba(255, 248, 230, 0.07);
    --border-medium: rgba(255, 248, 230, 0.13);
    --border-accent: rgba(212, 160, 60, 0.55);
    --text-primary: #f0ebe0;
    --text-muted: #5a544a;
    --text-body: #8a8070;
    --text-tertiary: #5a544a;
    --success: #3d9e5c;
    --error: #b83c38;
    --shadow-card: inset 0 1px 0 rgba(255, 248, 230, 0.08), 0 4px 24px rgba(0, 0, 0, 0.45);
    --shadow-card-hover: inset 0 1px 0 rgba(255, 248, 230, 0.1), 0 12px 40px rgba(0, 0, 0, 0.55);
    --mono: "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

body.auth-shell {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    color: var(--text-body);
    color-scheme: dark;
    background:
        radial-gradient(900px 500px at 64% 16%, rgba(212, 160, 60, 0.12), transparent 70%),
        var(--bg);
    font-family: var(--sans);
}

body.auth-shell::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.04;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

svg {
    display: block;
    width: 1.2rem;
    height: 1.2rem;
}

.auth-layout {
    display: grid;
    grid-template-columns: minmax(20rem, 34rem) minmax(24rem, 1fr);
    gap: clamp(2rem, 6vw, 5rem);
    align-items: center;
    width: min(1200px, calc(100% - 80px));
    flex: 1;
    margin: 0 auto;
    padding: clamp(4rem, 8vw, 7rem) 0;
}

.auth-panel,
.product-stage,
.auth-tabs,
.auth-status {
    background: var(--card);
    box-shadow: var(--shadow-card);
}

.auth-panel {
    padding: clamp(1.5rem, 4vw, 2rem);
    border-radius: 20px;
}

.brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    color: inherit;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border-medium);
    border-radius: 10px;
    color: var(--accent);
    background: rgba(212, 160, 60, 0.08);
}

.brand-lockup strong,
.brand-lockup small {
    display: block;
}

.brand-lockup strong {
    color: var(--text-primary);
    font-weight: 800;
}

.brand-lockup small,
.eyebrow,
.metric-card small {
    color: var(--text-tertiary);
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.auth-copy {
    margin: 3rem 0 1.35rem;
}

.eyebrow {
    margin: 0 0 0.7rem;
    color: var(--accent);
}

.auth-copy h1 {
    max-width: 9ch;
    margin: 0;
    color: var(--text-primary);
    font-size: clamp(2.8rem, 6vw, 5.4rem);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -0.03em;
}

.auth-copy p:last-child {
    max-width: 31rem;
    margin: 1rem 0 0;
    color: var(--text-body);
    line-height: 1.65;
}

.auth-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.35rem;
    width: 100%;
    margin-bottom: 1rem;
    padding: 0.35rem;
    border-radius: 14px;
}

.auth-tabs a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-width: 0;
    min-height: 42px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--text-body);
    font-size: 0.88rem;
    font-weight: 800;
    text-decoration: none;
}

.auth-tabs a.active {
    border-color: var(--border-accent);
    color: var(--text-primary);
    background: rgba(212, 160, 60, 0.08);
}

.auth-tabs svg {
    color: var(--accent);
}

.auth-status {
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border-accent);
    border-radius: 12px;
    color: var(--accent-bright);
    font-weight: 700;
}

.auth-status.error,
.promo-status.error {
    border-color: rgba(184, 60, 56, 0.45);
    color: #f0a09c;
    background: rgba(184, 60, 56, 0.08);
}

.auth-status.success,
.promo-status.success {
    border-color: rgba(61, 158, 92, 0.45);
    color: #8bd0a3;
    background: rgba(61, 158, 92, 0.08);
}

.auth-form {
    display: grid;
    gap: 0.95rem;
}

.oauth-button,
.auth-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    min-height: 48px;
    border-radius: 10px;
    color: var(--text-primary);
    background: rgba(16, 15, 13, 0.88);
    border: 1px solid var(--border-medium);
    font-weight: 800;
    text-decoration: none;
}

.auth-form button {
    box-sizing: border-box;
    margin-inline: 0;
    padding-inline: 1rem;
    inline-size: 100%;
    max-inline-size: 100%;
    border-color: var(--border-accent);
    box-shadow:
        0 0 8px rgba(212, 160, 60, 0.55),
        0 0 20px rgba(212, 160, 60, 0.25),
        0 0 40px rgba(212, 160, 60, 0.1);
    animation: buttonPulse 3.8s ease-in-out infinite alternate;
}

.oauth-button:hover,
.auth-form button:hover {
    border-color: var(--accent-bright);
    transform: translateY(-1px);
}

.auth-divider {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.75rem;
    align-items: center;
    color: var(--text-tertiary);
    font-family: var(--mono);
    font-size: 0.78rem;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    height: 1px;
    background: var(--border-subtle);
}

.auth-form .auth-input-field {
    min-height: 4rem;
    border-color: var(--border-medium) !important;
    border-radius: 10px !important;
    background: rgba(10, 9, 7, 0.38);
}

.auth-form .auth-input-field > input {
    color: var(--text-primary) !important;
    padding-inline: 1rem !important;
}

.auth-form .auth-input-field > label {
    color: var(--text-tertiary) !important;
    inset-inline-start: 1rem !important;
    left: 1rem !important;
    max-width: calc(100% - 2rem);
}

.auth-form[hidden],
.auth-status[hidden],
.promo-status[hidden] {
    display: none;
}

.checkbox-row {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    color: var(--text-body);
}

.auth-form-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    justify-content: space-between;
    align-items: center;
    min-height: 1.5rem;
}

.auth-form-links a {
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 800;
    text-decoration: none;
}

.auth-form-links a:hover {
    color: var(--accent-bright);
}

.cf-turnstile {
    min-height: 65px;
}

.product-stage {
    position: relative;
    min-height: 38rem;
    overflow: hidden;
    border-radius: 20px;
    padding: clamp(1.25rem, 3vw, 2rem);
}

.product-stage::before {
    content: "01001101 01001111 01010000 01010011 00101111 01100001 01110101 01110100 01101000";
    position: absolute;
    inset: 2rem 2rem auto;
    color: rgba(255, 248, 230, 0.045);
    font-family: var(--mono);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    line-height: 1.8;
}

.stage-topline {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-tertiary);
    font-family: var(--mono);
}

.stage-topline strong {
    color: var(--accent);
    font-size: 2rem;
}

.ops-window {
    position: absolute;
    inset: auto 2rem 2rem 2rem;
    padding: 1rem;
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    background: rgba(10, 9, 7, 0.58);
}

.window-bar {
    display: flex;
    gap: 0.45rem;
    margin-bottom: 1rem;
}

.window-bar span {
    width: 0.72rem;
    height: 0.72rem;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.55;
}

.signal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
}

.metric-card {
    min-height: 9rem;
    padding: 1rem;
    border-radius: 14px;
    background: var(--card);
    box-shadow: var(--shadow-card);
}

.metric-card.alert {
    box-shadow:
        var(--shadow-card),
        0 0 0 1px var(--border-accent),
        0 0 30px rgba(212, 160, 60, 0.12);
}

.metric-card strong {
    display: block;
    margin: 1rem 0 0.75rem;
    color: var(--text-primary);
    font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.trend {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--accent);
    font-family: var(--mono);
    font-size: 0.78rem;
    font-weight: 800;
}

.trend.up {
    color: var(--success);
}

.trend svg {
    width: 0.95rem;
    height: 0.95rem;
}

.timeline {
    display: grid;
    gap: 0.7rem;
    margin-top: 1rem;
}

.timeline span {
    height: 0.85rem;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), rgba(255, 248, 230, 0.12));
}

.timeline span:nth-child(2) { width: 82%; }
.timeline span:nth-child(3) { width: 92%; }
.timeline span:nth-child(4) { width: 68%; }
.timeline span:nth-child(5) { width: 76%; }

.site-footer {
    width: min(1200px, calc(100% - 80px));
    margin: 0 auto;
    padding: 0 0 40px;
    color: var(--text-tertiary);
}

.site-footer a {
    color: var(--text-body);
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--accent);
}

.footer-panel {
    display: grid;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 20px;
    background: #141210;
    box-shadow: var(--shadow-card);
}

.footer-status,
.footer-comparisons {
    display: none;
}

@keyframes buttonPulse {
    from {
        box-shadow:
            0 0 8px rgba(212, 160, 60, 0.48),
            0 0 20px rgba(212, 160, 60, 0.22),
            0 0 40px rgba(212, 160, 60, 0.09);
    }
    to {
        box-shadow:
            0 0 9px rgba(212, 160, 60, 0.62),
            0 0 24px rgba(212, 160, 60, 0.28),
            0 0 48px rgba(212, 160, 60, 0.12);
    }
}

@media (max-width: 900px) {
    .auth-layout {
        grid-template-columns: 1fr;
        width: min(100% - 32px, 34rem);
    }

    .product-stage {
        min-height: 26rem;
        order: -1;
    }
}

@media (max-width: 620px) {
    .auth-layout {
        padding-block: 1rem 3rem;
    }

    .product-stage {
        min-height: 22rem;
    }

    .ops-window {
        inset: auto 0.8rem 0.8rem 0.8rem;
    }

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

    .metric-card {
        min-height: 6rem;
    }

    .metric-card strong {
        margin: 0.35rem 0;
    }

    .auth-tabs span {
        font-size: 0.82rem;
    }
}
