:root {
    color-scheme: light dark;

    --background: #f1f5f9;
    --surface: #ffffff;
    --text: #1e293b;
    --muted: #64748b;
    --border: #cbd5e1;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --error-background: #fef2f2;
    --error-text: #b91c1c;
    --error-border: #fecaca;
}

@media (prefers-color-scheme: dark) {
    :root {
        --background: #0f172a;
        --surface: #1e293b;
        --text: #f1f5f9;
        --muted: #94a3b8;
        --border: #475569;
        --primary: #2563eb;
        --primary-hover: #1d4ed8;
        --error-background: #450a0a;
        --error-text: #fca5a5;
        --error-border: #991b1b;
    }
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--background);
    color: var(--text);
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 32px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgb(0 0 0 / 8%);
}

h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    text-align: center;
}

.subtitle {
    margin: 8px 0 28px;
    color: var(--muted);
    text-align: center;
}

form {
    display: flex;
    flex-direction: column;
}

label {
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
}

input {
    width: 100%;
    min-height: 46px;
    margin-bottom: 20px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
}

input:focus {
    border-color: var(--primary);
    outline: 2px solid var(--primary);
    outline-offset: 1px;
}

button {
    min-height: 46px;
    padding: 12px;
    border: none;
    border-radius: 6px;
    background: var(--primary);
    color: #ffffff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

button:hover {
    background: var(--primary-hover);
}

button:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

.error {
    margin-bottom: 20px;
    padding: 12px;
    border: 1px solid var(--error-border);
    border-radius: 6px;
    background: var(--error-background);
    color: var(--error-text);
    font-size: 14px;
}

@media (max-width: 480px) {
    .login-container {
        padding: 24px;
    }
}