  :root {
    --bg: #f4f5f7; --panel: #ffffff; --panel2: #f9fafb; --line: #e3e6ea; --text: #1d2228; --muted: #6b7480;
    --accent: #2f6fde; --accent-text: #fff; --ok: #1f9d55; --bad: #d64545;
  }
  @media (prefers-color-scheme: dark) {
    :root { --bg: #14171b; --panel: #1c2025; --panel2: #22272d; --line: #2e343b; --text: #e6e9ed; --muted: #8e98a3; --accent: #4a86ee; }
  }
  * { box-sizing: border-box; }
  body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font: 14px/1.45 "Segoe UI", system-ui, sans-serif;
         display: flex; align-items: center; justify-content: center; padding: 16px; }
  .card { width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
  h1 { font-size: 18px; margin: 0 0 4px; }
  .sub { color: var(--muted); margin: 0 0 18px; font-size: 13px; }
  label { display: block; font-size: 12px; color: var(--muted); margin: 12px 0 4px; }
  input[type=email], input[type=password], input[type=text] { width: 100%; font: inherit; color: inherit; background: var(--panel2);
         border: 1px solid var(--line); border-radius: 6px; padding: 9px 10px; }
  input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
  .check { display: flex; gap: 8px; align-items: flex-start; margin-top: 14px; font-size: 13px; }
  .check input { margin-top: 3px; }
  button { width: 100%; margin-top: 18px; font: inherit; padding: 10px; border-radius: 6px; border: 1px solid var(--accent);
           background: var(--accent); color: var(--accent-text); cursor: pointer; }
  button:disabled { opacity: .6; cursor: default; }
  .links { margin-top: 14px; display: flex; justify-content: space-between; font-size: 13px; }
  a { color: var(--accent); text-decoration: none; cursor: pointer; }
  a:hover { text-decoration: underline; }
  .msg { margin-top: 14px; font-size: 13px; padding: 9px 10px; border-radius: 6px; display: none; }
  .msg.err { display: block; color: var(--bad); border: 1px solid var(--bad); }
  .msg.ok { display: block; color: var(--ok); border: 1px solid var(--ok); }
  .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
  .foot { margin-top: 18px; text-align: center; font-size: 12px; color: var(--muted); }
  form[hidden], div[hidden] { display: none; }
