:root {
    --bg: #f3f5f8; --card: #fff; --text: #1d2330; --muted: #667085; --border: #d0d5dd;
    --accent: #1f5fbf; --accent-h: #184c99; --ok: #127a3d; --ok-bg: #e8f6ee; --err: #b42318; --err-bg: #fdecea;
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #12151b; --card: #1b2029; --text: #e6e9ef; --muted: #98a2b3; --border: #344054;
        --accent: #5b8def; --accent-h: #7aa3f2; --ok: #4ade80; --ok-bg: #12301f; --err: #f87171; --err-bg: #3a1717;
    }
}
* { box-sizing: border-box; }
body {
    margin: 0; min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: var(--bg); color: var(--text); padding: 16px;
    font: 15px/1.5 "Segoe UI", system-ui, -apple-system, sans-serif;
}
.card {
    width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--border);
    border-radius: 12px; padding: 28px; box-shadow: 0 4px 24px rgba(0,0,0,.06);
}
h1 { margin: 0; font-size: 22px; }
.sub { margin: 4px 0 20px; color: var(--muted); }
label { display: block; margin: 14px 0 6px; font-weight: 600; font-size: 14px; }
input[type=text], input[type=password], input:not([type]) {
    width: 100%; padding: 10px 12px; font: inherit; color: var(--text); background: var(--card);
    border: 1px solid var(--border); border-radius: 8px;
}
input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
label.show { font-weight: 400; display: flex; gap: 8px; align-items: center; color: var(--muted); }
.rules { margin: 14px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--muted); }
.rules li { padding-left: 20px; position: relative; margin: 3px 0; }
.rules li::before { content: "•"; position: absolute; left: 6px; }
.rules li.ok { color: var(--ok); } .rules li.ok::before { content: "✓"; left: 3px; }
.rules li.bad { color: var(--err); } .rules li.bad::before { content: "✗"; left: 3px; }
button {
    margin-top: 20px; width: 100%; padding: 11px; font: inherit; font-weight: 600; color: #fff;
    background: var(--accent); border: 0; border-radius: 8px; cursor: pointer;
}
button:hover { background: var(--accent-h); }
button:disabled { opacity: .6; cursor: wait; }
.alert { padding: 12px 14px; border-radius: 8px; margin-bottom: 8px; }
.alert.ok { background: var(--ok-bg); color: var(--ok); }
.alert.err { background: var(--err-bg); color: var(--err); }
.link { color: var(--accent); }
.hint { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
