:root {
    --bg: #f5f7fb;
    --card: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --danger: #b91c1c;
    --border: #e5e7eb;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

.auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,.05);
    width: 100%;
    max-width: 380px;
    padding: 32px 28px;
}

.auth-card h1 {
    margin: 0 0 6px;
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
}

.auth-card .sub {
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.field {
    margin-bottom: 16px;
}

.field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

.field input {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}

.field input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}

.btn {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}

.btn:hover:not(:disabled) { background: var(--primary-hover); }
.btn:disabled { opacity: .6; cursor: not-allowed; }

.alert {
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 16px;
    display: none;
}

.alert.error {
    background: #fef2f2;
    color: var(--danger);
    border: 1px solid #fecaca;
    display: block;
}

.alert.info {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    display: block;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f172a;
        --card: #1e293b;
        --text: #003c8b;
        --muted: #94a3b8;
        --border: #334155;
    }
    .field input { background: #0f172a; color: var(--text); }
}