:root {
  --bg:#f2f7fb; --panel:#ffffff; --text:#172c43; --muted:#52667c;
  --line:#d8e4ef; --control-line:#70869d;
  --accent:#ce2430; --accent-hover:#b51c27; --on-accent:#ffffff;
  --blue:#245da8; --focus:#356fc0;
  --error-bg:#fff0f3; --error-line:#e5b5c0; --error-text:#a52c42;
  --message-bg:#e0f5ed; --message-line:#9ccfbd; --message-text:#176653;
  --shadow:0 10px 30px #17334f0c;
  color-scheme:light; font-family:system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
  color:var(--text); background:var(--bg);
}
:root[data-theme="dark"] {
  --bg:#101e2d; --panel:#182b3d; --text:#e9f2fa; --muted:#a9bdce;
  --line:#314b62; --control-line:#7895ad;
  --accent:#d33440; --accent-hover:#bf2935;
  --blue:#b3d4ff; --focus:#a8ceff;
  --error-bg:#452433; --error-line:#b05b71; --error-text:#faabb6;
  --message-bg:#183f37; --message-line:#3f8b76; --message-text:#a3e5cf;
  --shadow:0 10px 30px #0003;
  color-scheme:dark;
}
@media(prefers-color-scheme:dark) {
  :root:not([data-theme="light"]) {
    --bg:#101e2d; --panel:#182b3d; --text:#e9f2fa; --muted:#a9bdce;
    --line:#314b62; --control-line:#7895ad;
    --accent:#d33440; --accent-hover:#bf2935;
    --blue:#b3d4ff; --focus:#a8ceff;
    --error-bg:#452433; --error-line:#b05b71; --error-text:#faabb6;
    --message-bg:#183f37; --message-line:#3f8b76; --message-text:#a3e5cf;
    --shadow:0 10px 30px #0003;
    color-scheme:dark;
  }
}
* { box-sizing:border-box; }
body { margin:0; min-height:100dvh; padding:32px 20px; display:grid; place-items:center; }
.auth-card { width:100%; max-width:460px; padding:32px; background:var(--panel); border:1px solid var(--line); border-radius:16px; box-shadow:var(--shadow); }
.brand { display:flex; align-items:center; gap:10px; font-size:19px; font-weight:700; color:var(--text); text-decoration:none; }
.brand span { display:grid; place-items:center; width:40px; height:40px; color:var(--on-accent); background:var(--accent); border-radius:10px; font-size:16px; }
h1 { font-size:27px; line-height:1.2; margin:28px 0 20px; }
p { font-size:14px; line-height:1.6; color:var(--muted); }
form { display:grid; gap:18px; margin-top:24px; }
label { display:grid; gap:8px; font-size:14px; font-weight:600; }
input { min-width:0; width:100%; min-height:46px; padding:10px 12px; border:1px solid var(--control-line); border-radius:8px; background:var(--panel); color:var(--text); font:inherit; font-weight:400; }
input:focus-visible,button:focus-visible,a:focus-visible { outline:3px solid var(--focus); outline-offset:3px; }
button { min-height:46px; padding:10px 16px; border:1px solid var(--accent); border-radius:8px; font:inherit; font-weight:600; color:var(--on-accent); background:var(--accent); cursor:pointer; }
button:hover { background:var(--accent-hover); border-color:var(--accent-hover); }
nav { display:flex; flex-wrap:wrap; gap:16px; margin-top:24px; font-size:14px; }
a { color:var(--blue); text-underline-offset:3px; }
.error,.message { padding:12px; border:1px solid var(--error-line); border-radius:8px; background:var(--error-bg); color:var(--error-text); overflow-wrap:anywhere; }
.message { border-color:var(--message-line); background:var(--message-bg); color:var(--message-text); }
.hint { font-size:13px; margin:0; }
form .hint { margin-top:-10px; }
nav + .hint { margin-top:16px; }
@media(max-width:480px) { body { padding:20px 12px; } .auth-card { padding:24px 20px; } }
