:root {
  /* Dark theme (default) — DaisyUI-style OKLCH. base-100/200/300 + accent
     supplied; border/muted/error/success/shadow derived to fit the same hues. */
  color-scheme: dark;
  --bg: oklch(21.15% 0.012 254.09); /* base-300 — page background */
  --card: oklch(25.33% 0.016 252.42); /* base-100 — card surface */
  --surface-2: oklch(23.26% 0.014 253.1); /* base-200 — inputs, secondary, code */
  --border: oklch(33% 0.018 254); /* subtle divider on dark surfaces */
  --accent: oklch(77% 0.152 181.912);
  --accent-content: oklch(38% 0.063 188.416); /* text/icon color on --accent */
  --text: oklch(97.807% 0.029 256.847); /* base-content */
  --muted: oklch(72% 0.03 256.847); /* dimmed base-content */
  --error: oklch(68% 0.19 25);
  --success: oklch(76% 0.15 165);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

:root[data-theme="light"] {
  /* Light theme — same slate/teal hue family, tuned for contrast on a light
     surface: accent darkened so buttons/links read on white, text inverted. */
  color-scheme: light;
  --bg: oklch(96.5% 0.006 254);
  --card: oklch(99.5% 0.002 254);
  --surface-2: oklch(94% 0.008 254);
  --border: oklch(89% 0.012 254);
  --accent: oklch(58% 0.12 181.912);
  --accent-content: oklch(99% 0.01 181); /* near-white text on --accent */
  --text: oklch(25% 0.02 256.847);
  --muted: oklch(50% 0.02 256.847);
  --error: oklch(55% 0.2 25);
  --success: oklch(52% 0.13 165);
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: linear-gradient(135deg, var(--surface-2), var(--bg));
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
}

.card {
  background: var(--card);
  width: min(92vw, 400px);
  padding: 2rem;
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.theme-toggle {
  width: auto;
  margin: 0;
  padding: 0.3rem 0.5rem;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  line-height: 1;
}

h1 { font-size: 1.4rem; margin: 0 0 1rem; }
p { color: var(--muted); line-height: 1.5; }

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.9rem;
  color: var(--text);
}

input {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  background: var(--surface-2);
  color: var(--text);
}

input:focus { outline: 2px solid var(--accent); border-color: var(--accent); }

button {
  width: 100%;
  padding: 0.75rem;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-content);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 0.25rem;
}

button:hover { filter: brightness(1.05); }
button.secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  margin-top: 1rem;
}

.alt-methods {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1.25rem;
  text-align: center;
}

.alt-methods a { color: var(--accent); text-decoration: none; font-size: 0.9rem; }
.alt-methods a:hover { text-decoration: underline; }

.error { color: var(--error); font-weight: 600; }
.success { color: var(--success); }

.account { list-style: none; padding: 0; color: var(--muted); }
.account li { padding: 0.3rem 0; border-bottom: 1px solid var(--border); }

code {
  background: var(--surface-2);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.85em;
}

.methods {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.method {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}

.method:hover { border-color: var(--accent); background: var(--surface-2); }
.method-title { font-weight: 700; color: var(--text); }
.method-desc { font-size: 0.85rem; color: var(--muted); }

.demo-note { color: var(--muted); font-size: 0.8rem; }

.muted { color: var(--muted); }

/* Passwordless push / number matching */
.match-number {
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-align: center;
  margin: 1rem 0;
  color: var(--accent);
}

.push-request {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 1rem;
}

.number-choices {
  display: flex;
  gap: 0.6rem;
}

.number-choices form { flex: 1; margin: 0; }

.number-choice {
  width: 100%;
  margin: 0;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  font-size: 1.1rem;
  font-weight: 700;
}

.number-choice:hover { background: var(--accent); color: var(--accent-content); }
