:root {
    --auth-bg: #000101;
    --auth-hero-bg: #05070b;
    --auth-fg: #ecebe7;
    --auth-muted: #757168;
    --auth-input: rgba(236, 235, 231, 0.03);
    --auth-input-border: rgba(236, 235, 231, 0.1);
    --auth-accent: #eca8d6;
    --auth-accent-soft: rgba(236, 168, 214, 0.5);
    --auth-display: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
    --auth-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    min-height: 100%;
}

body.auth-page {
    min-height: 100vh;
    overflow-x: hidden;
    background: var(--auth-bg);
    color: var(--auth-fg);
    font-family: var(--auth-display);
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    background: var(--auth-bg);
}

.auth-hero {
    display: none;
    width: 45%;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px;
    background: var(--auth-hero-bg);
    color: var(--auth-fg);
}

.auth-hero-grid {
    position: absolute;
    inset: 0;
    opacity: 0.03;
    background-image: linear-gradient(var(--auth-fg) 1px, transparent 1px), linear-gradient(90deg, var(--auth-fg) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

.auth-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, rgba(236, 168, 214, 0.05), transparent 36%, rgba(167, 139, 250, 0.035));
    pointer-events: none;
}

.auth-hero-top,
.auth-hero-copy,
.auth-hero-stats {
    position: relative;
    z-index: 1;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--auth-fg);
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1;
}

.auth-brand-mark {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--auth-fg);
    color: var(--auth-bg);
    border: 1px solid rgba(236, 235, 231, 0.14);
    font-family: var(--auth-mono);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0;
}

.auth-hero-copy h2 {
    max-width: 520px;
    margin: 0 0 24px;
    color: var(--auth-fg);
    font-size: clamp(3rem, 5vw, 3.75rem);
    font-weight: 400;
    line-height: 0.95;
    letter-spacing: 0;
}

.auth-hero-copy h2 span {
    color: var(--auth-muted);
}

.auth-hero-copy p {
    max-width: 380px;
    color: var(--auth-muted);
    font-size: 1rem;
    line-height: 1.65;
}

.auth-hero-stats {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    color: var(--auth-muted);
    font-family: var(--auth-mono);
    font-size: 0.75rem;
}

.auth-hero-stats span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.auth-hero-stats i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--auth-accent);
}

.auth-panel {
    min-height: 100vh;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--auth-bg);
}

.auth-mobile-header {
    height: 64px;
    display: flex;
    align-items: center;
    padding: 0 24px;
}

.auth-mobile-header .auth-brand {
    gap: 8px;
    font-size: 1.125rem;
}

.auth-mobile-header .auth-brand-mark {
    width: 32px;
    height: 32px;
    font-size: 0.66rem;
}

.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-box {
    width: 100%;
    max-width: 384px;
}

.auth-heading {
    margin-bottom: 40px;
}

.auth-kicker {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    color: var(--auth-muted);
    font-family: var(--auth-mono);
    font-size: 0.75rem;
    line-height: 1.35;
}

.auth-kicker span {
    width: 24px;
    height: 1px;
    background: rgba(236, 235, 231, 0.2);
}

.auth-box h1 {
    margin: 0 0 8px;
    color: var(--auth-fg);
    font-size: 2.25rem;
    font-weight: 400;
    line-height: 1.12;
    letter-spacing: 0;
}

.auth-heading p {
    color: var(--auth-muted);
    font-size: 0.875rem;
}

.auth-form {
    display: grid;
    gap: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--auth-muted);
    font-family: var(--auth-mono);
    font-size: 0.75rem;
    font-weight: 400;
}

.form-control {
    width: 100%;
    min-height: 50px;
    padding: 14px 16px;
    border: 1px solid var(--auth-input-border);
    border-radius: 0;
    outline: none;
    background: var(--auth-input);
    color: var(--auth-fg);
    font-size: 0.875rem;
    transition: border-color 0.2s var(--ease-out), background 0.2s var(--ease-out);
}

.form-control:focus {
    border-color: var(--auth-accent-soft);
    background: rgba(236, 235, 231, 0.045);
}

.form-control::placeholder {
    color: rgba(117, 113, 104, 0.65);
}

.btn,
.auth-submit {
    border: 0;
    cursor: pointer;
}

.auth-submit {
    width: 100%;
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 16px;
    border-radius: 0;
    background: var(--auth-fg);
    color: var(--auth-bg);
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.2s var(--ease-out);
}

.auth-submit:hover {
    background: rgba(236, 235, 231, 0.9);
}

.auth-submit svg {
    width: 16px;
    height: 16px;
    display: block;
    flex: 0 0 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.2s var(--ease-out);
}

.auth-submit:hover svg {
    transform: translateX(2px);
}

.auth-switch {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--auth-input-border);
    text-align: center;
}

.auth-switch-compact {
    margin-top: 20px;
    padding-top: 0;
    border-top: none;
}

.auth-switch p {
    color: var(--auth-muted);
    font-size: 0.875rem;
}

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

.auth-switch a:hover {
    text-decoration: underline;
}

.auth-page-footer {
    padding: 16px 24px;
    text-align: center;
}

.auth-page-footer a {
    color: var(--auth-muted);
    font-size: 0.75rem;
}

.auth-page-footer a:hover {
    color: var(--auth-fg);
}

.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
    padding: 14px 16px;
    border: 1px solid rgba(236, 235, 231, 0.1);
    background: rgba(236, 235, 231, 0.03);
    color: var(--auth-fg);
    font-size: 0.875rem;
}

.alert::before {
    content: "";
    width: 7px;
    height: 7px;
    flex-shrink: 0;
    border-radius: 50%;
}

.alert-message {
    flex: 1;
}

.alert-error {
    border-color: rgba(248, 81, 73, 0.35);
}

.alert-error::before {
    background: #ff7b72;
}

.alert-success {
    border-color: rgba(236, 168, 214, 0.35);
}

.alert-success::before {
    background: var(--auth-accent);
}

.alert-close {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    border: 0;
    background: rgba(236, 235, 231, 0.08);
    color: var(--auth-muted);
    cursor: pointer;
    font-size: 1.15rem;
    line-height: 1;
}

.alert-close:hover {
    background: rgba(236, 235, 231, 0.14);
    color: var(--auth-fg);
}

.alert.alert-dismissed {
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}

@media (min-width: 1024px) {
    .auth-hero {
        display: flex;
    }

    .auth-mobile-header {
        display: none;
    }

    .auth-main {
        padding: 48px;
    }

    .auth-page-footer {
        text-align: right;
    }
}

@media (max-width: 640px) {
    .auth-mobile-header {
        padding: 0 20px;
    }

    .auth-main {
        align-items: flex-start;
        padding: 48px 24px 32px;
    }

    .auth-heading {
        margin-bottom: 34px;
    }

    .auth-box h1 {
        font-size: 2rem;
    }
}
