/*
 * Styles for the three pages the Go server renders itself: the sign-in
 * screen, the native-app setup hand-off, and the "admin only" page.
 *
 * They exist as a file rather than an inline <style> block so the app can run
 * under `style-src 'self'`. Everything the shell needs lives in the Vite
 * bundle; this is deliberately small and duplicated, because these pages must
 * render before -- or entirely without -- that bundle.
 */

:root {
  color-scheme: light;

  --bg: #f4f7fb;
  --card: rgba(255, 255, 255, 0.9);
  --line: #d8e0eb;
  --muted: #5f6f85;
  --text: #101827;
  --button-bg: #eaf1fb;
  --button-hover: #dfeaf8;
  --accent: #0f766e;
  --code: #1d4ed8;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --bg: #0b1220;
    --card: rgba(17, 25, 40, 0.86);
    --line: #243049;
    --muted: #a3b1c6;
    --text: #e6edf6;
    --button-bg: #1a2438;
    --button-hover: #243049;
    --accent: #2dd4bf;
    --code: #bfdbfe;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0b1220;
  --card: rgba(17, 25, 40, 0.86);
  --line: #243049;
  --muted: #a3b1c6;
  --text: #e6edf6;
  --button-bg: #1a2438;
  --button-hover: #243049;
  --accent: #2dd4bf;
  --code: #bfdbfe;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(800px 420px at 100% -10%, rgba(45, 212, 191, 0.18), transparent 60%),
    radial-gradient(800px 520px at -10% 120%, rgba(96, 165, 250, 0.12), transparent 62%),
    var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

main {
  width: 100%;
  max-width: 420px;
  text-align: center;
}

h1 {
  margin: 0 0 4px;
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.brand {
  margin: 0 0 28px;
  font-size: 40px;
  font-weight: 760;
  letter-spacing: -0.04em;
  color: var(--text);
}

.brand span {
  color: var(--accent);
}

.card {
  padding: 30px 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  text-align: left;
}

.lead,
p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.card p:last-child {
  margin-bottom: 0;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--button-bg);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.12s,
    border-color 0.12s,
    transform 0.12s;
}

.btn:hover {
  background: var(--button-hover);
  border-color: var(--muted);
  transform: translateY(-1px);
}

.btn + .btn {
  margin-top: 10px;
}

.btn-inline {
  display: inline-flex;
  width: auto;
  padding: 10px 18px;
}

.accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #ecfeff;
}

.theme-row {
  margin-top: 12px;
}

.empty {
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

footer {
  margin-top: 24px;
  font-size: 12px;
  color: var(--muted);
}

footer a {
  color: var(--muted);
  text-decoration: none;
}

code {
  color: var(--code);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  word-break: break-all;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
  }
}
