:root {
    color-scheme: light;
    --font-ui: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    --bg: oklch(0.982 0.006 205);
    --surface: oklch(1 0 0);
    --surface-muted: oklch(0.962 0.008 205);
    --border: oklch(0.905 0.01 205);
    --border-strong: oklch(0.66 0.018 210);
    --text: oklch(0.25 0.02 220);
    --text-muted: oklch(0.5 0.018 220);
    --accent: oklch(0.47 0.09 195);
    --accent-strong: oklch(0.4 0.085 195);
    --accent-soft: oklch(0.95 0.028 195);
    --accent-contrast: oklch(1 0 0);
    --danger: oklch(0.5 0.17 25);
    --danger-soft: oklch(0.95 0.04 25);
    --focus: oklch(0.5 0.13 200);
    --radius-lg: 12px;
    --radius-md: 8px;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 48px;
}

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

html {
    font-size: 100%;
}

body {
    min-height: 100dvh;
    margin: 0;
    background:
        radial-gradient(60rem 32rem at 50% 0%, oklch(0.955 0.03 195 / 0.8), transparent 70%),
        var(--bg);
    color: var(--text);
    font-family: var(--font-ui);
    font-size: 1rem;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1,
p {
    margin: 0;
}

button,
input {
    font: inherit;
    color: inherit;
}

:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

.auth-shell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-5);
    width: min(100% - 32px, 420px);
    min-height: 100dvh;
    margin: 0 auto;
    padding: var(--space-7) 0;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    width: 100%;
    padding: 0 var(--space-6);
}

.brand-mark {
    display: grid;
    flex: none;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--accent);
    color: var(--accent-contrast);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.auth-brand div {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.auth-brand strong {
    font-size: 0.9375rem;
    font-weight: 650;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.auth-brand div span {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.auth-card {
    width: 100%;
    padding: var(--space-6);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.auth-head {
    margin-bottom: var(--space-5);
}

h1 {
    font-size: 1.5rem;
    font-weight: 650;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.auth-head p {
    margin-top: var(--space-2);
    color: var(--text-muted);
    font-size: 0.875rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.field {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

label {
    font-size: 0.8125rem;
    font-weight: 600;
}

input {
    width: 100%;
    min-height: 44px;
    padding: 0 var(--space-3);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    background: var(--bg);
    font-size: 1rem;
}

input:hover {
    border-color: var(--text-muted);
}

input:focus-visible {
    border-color: var(--focus);
    outline: 2px solid var(--focus);
    outline-offset: 1px;
}

.form-error {
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--danger);
    border-radius: var(--radius-md);
    background: var(--danger-soft);
    color: var(--danger);
    font-size: 0.8125rem;
    font-weight: 550;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    padding: 0 var(--space-4);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    cursor: pointer;
}

.btn-primary {
    background: var(--accent);
    color: var(--accent-contrast);
}

.btn-primary:hover:not(:disabled) {
    background: var(--accent-strong);
}

.btn:disabled {
    cursor: progress;
    opacity: 0.7;
}

.auth-foot {
    color: var(--text-muted);
    font-size: 0.75rem;
    text-align: center;
}

[hidden] {
    display: none !important;
}

@media (max-width: 480px) {
    .auth-shell {
        justify-content: flex-start;
        padding-top: var(--space-7);
    }

    .auth-card {
        padding: var(--space-5);
    }

    .auth-brand {
        padding: 0 var(--space-5);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
