*, *::before, *::after { box-sizing: border-box; }

:root {
    --bg: #fafafa;
    --card-bg: #ffffff;
    --card-border: #e4e4e7;
    --fg: #18181b;
    --fg-muted: #71717a;
    --input-bg: #ffffff;
    --input-border: #e4e4e7;
    --input-ring: #18181b;
    --btn-bg: #18181b;
    --btn-fg: #ffffff;
    --divider: #e4e4e7;
    --error-bg: #fef2f2;
    --error-fg: #dc2626;
    --error-border: #fecaca;
    --success-bg: #f0fdf4;
    --success-fg: #16a34a;
    --success-border: #bbf7d0;
    --radius: 0.5rem;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / .06), 0 1px 2px -1px rgb(0 0 0 / .06);
}

.dark {
    --bg: #09090b;
    --card-bg: #18181b;
    --card-border: #27272a;
    --fg: #fafafa;
    --fg-muted: #a1a1aa;
    --input-bg: #09090b;
    --input-border: #27272a;
    --input-ring: #fafafa;
    --btn-bg: #fafafa;
    --btn-fg: #18181b;
    --divider: #27272a;
    --error-bg: #2a1215;
    --error-fg: #f87171;
    --error-border: #451a1d;
    --success-bg: #052e16;
    --success-fg: #4ade80;
    --success-border: #14532d;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--fg);
    font-family: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 0.875rem;
    -webkit-font-smoothing: antialiased;
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    padding: 2rem;
}

.auth-header { text-align: center; margin-bottom: 1.75rem; }

.auth-logo {
    width: 44px;
    height: 44px;
    margin: 0 auto 1rem;
    border-radius: 0.625rem;
    background: var(--btn-bg);
    color: var(--btn-fg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-logo svg { width: 22px; height: 22px; }

.auth-header h1 { margin: 0 0 0.375rem; font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; }
.auth-header p { margin: 0; font-size: 0.8125rem; color: var(--fg-muted); }

.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem;
    border-radius: var(--radius);
    font-size: 0.8125rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.auth-alert svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.auth-alert-error { background: var(--error-bg); color: var(--error-fg); border: 1px solid var(--error-border); }
.auth-alert-success { background: var(--success-bg); color: var(--success-fg); border: 1px solid var(--success-border); }

.auth-field { margin-bottom: 1rem; }

.auth-field label {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
}

.auth-field input {
    width: 100%;
    height: 2.5rem;
    padding: 0 0.75rem;
    border: 1px solid var(--input-border);
    border-radius: var(--radius);
    background: var(--input-bg);
    color: var(--fg);
    font-size: 0.875rem;
    font-family: inherit;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.auth-field input:focus {
    border-color: var(--input-ring);
    box-shadow: 0 0 0 3px rgb(24 24 27 / .08);
}

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.8125rem;
}

.auth-checkbox { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; }
.auth-checkbox input { width: 0.875rem; height: 0.875rem; accent-color: var(--btn-bg); cursor: pointer; }

.auth-link { color: var(--fg); text-decoration: none; font-weight: 500; }
.auth-link:hover { text-decoration: underline; }

.auth-submit {
    width: 100%;
    height: 2.5rem;
    border: none;
    border-radius: var(--radius);
    background: var(--btn-bg);
    color: var(--btn-fg);
    font-size: 0.875rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: opacity .15s;
}

.auth-submit:hover { opacity: .9; }
.auth-submit:disabled { opacity: .5; cursor: not-allowed; }

.auth-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.8125rem;
    color: var(--fg-muted);
}

.auth-hint {
    margin: 0.375rem 0 0;
    font-size: 0.75rem;
    color: var(--fg-muted);
}
