/* Server-rendered pages (sign-in, sign-in problems). Light or dark follows the system unless the
   person chose one in the app (theme.js sets data-theme from the same localStorage key). */
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --border: #cbd5e1;
  --accent: #0369a1;
  --accent-text: #ffffff;
  --danger: #b91c1c;
}
:root {
  color-scheme: light dark;
}
:root[data-theme='light'] {
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #0f172a;
    --surface: #1e293b;
    --text: #f1f5f9;
    --muted: #94a3b8;
    --border: #475569;
    --accent: #38bdf8;
    --accent-text: #0f172a;
    --danger: #fca5a5;
  }
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0f172a;
  --surface: #1e293b;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --border: #475569;
  --accent: #38bdf8;
  --accent-text: #0f172a;
  --danger: #fca5a5;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, sans-serif;
}
.card {
  width: 100%;
  max-width: 26rem;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}
h1 { margin: 0 0 16px; font-size: 1.5rem; }
a { color: var(--accent); }
.muted { color: var(--muted); font-size: .875rem; }
.error { color: var(--danger); }
.button, button {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}
.button.primary, button[type="submit"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}
label { display: block; margin-top: 12px; font-size: .875rem; }
input[type="text"], input[type="password"] {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
form button { margin-top: 16px; }
summary { cursor: pointer; margin-top: 16px; }
