/* shared by login.html + setup.html */
:root {
  color-scheme: light;
  --bg: #f6f7f9; --panel: #ffffff; --ink: #1c2128;
  --muted: #6b7280; --line: #e4e7eb; --accent: #2563eb;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0f1216; --panel: #171b21; --ink: #e6e8eb;
    --muted: #9aa4b2; --line: #2a2f37; --accent: #5b9bff;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1216; --panel: #171b21; --ink: #e6e8eb;
  --muted: #9aa4b2; --line: #2a2f37; --accent: #5b9bff;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; display: flex; align-items: center; justify-content: center;
  font: 14px/1.45 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink); background: var(--bg);
}
.card {
  width: 320px; max-width: calc(100vw - 2rem);
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; padding: 1.6rem 1.4rem;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .06);
}
h1 {
  margin: 0 0 1.2rem; font-size: 1.15rem; letter-spacing: .02em;
  display: flex; align-items: center; gap: .5rem;
}
h1 .logo { width: 1.6rem; height: 1.6rem; flex: none; }
.sub { margin: -.4rem 0 1rem; color: var(--muted); font-size: .8rem; }
label { display: block; margin: .7rem 0 .2rem; color: var(--muted); font-size: .82rem; }
input[type=text], input[type=password] {
  width: 100%; font: inherit; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 6px; padding: .5rem .6rem;
}
input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
button {
  font: inherit; cursor: pointer; border-radius: 6px;
  padding: .55rem .8rem; border: 1px solid var(--line);
}
.primary {
  width: 100%; margin-top: 1.1rem;
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.passkey {
  width: 100%; margin-top: .6rem;
  background: var(--panel); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
}
.passkey:hover { border-color: var(--accent); }
.passkey[hidden] { display: none; }
.err {
  margin: 0 0 .8rem; padding: .5rem .6rem; font-size: .85rem;
  color: #b91c1c; background: #fef2f2; border: 1px solid #fecaca; border-radius: 6px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .err { color: #fca5a5; background: #2a1414; border-color: #5c2323; }
}
:root[data-theme="dark"] .err { color: #fca5a5; background: #2a1414; border-color: #5c2323; }
.foot { margin: 1rem 0 0; text-align: center; font-size: .8rem; }
.foot[hidden] { display: none; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--accent); text-decoration: underline; }
