/* Dark only: there is no light mode */
:root {
  color-scheme: dark;
  --bg: #0f1115;
  --card: #181b21;
  --text: #e8eaed;
  --muted: #9aa1ab;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --error: #f87171;
  --border: #2a2f37;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.card {
  width: 100%;
  max-width: 420px;
  padding: 32px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 8px 30px rgb(0 0 0 / 0.06);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

h1 {
  margin: 0;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
}

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

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

form {
  display: grid;
  gap: 8px;
  margin-top: 24px;
}

label {
  font-weight: 600;
  font-size: 0.9rem;
}

input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

code,
pre {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.85rem;
}

pre {
  margin: 16px 0 0;
  padding: 14px;
  border-radius: 10px;
  background: var(--bg);
  white-space: pre-wrap;
  word-break: break-word;
}

button {
  width: 100%;
  padding: 12px 16px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

button:hover {
  background: var(--accent-hover);
}

.button-link {
  display: block;
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}

.button-link:hover {
  background: var(--accent-hover);
}

/* "A new version is available · Reload" (auth.js), shown while reloading would interrupt something */
.update-bar {
  position: fixed;
  top: 12px;
  left: 50%;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 8px 16px;
  border: 1px solid rgb(96 165 250 / 0.5);
  border-radius: 999px;
  background: #16213a;
  color: var(--text);
  font-size: 0.9rem;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.5);
  transform: translateX(-50%);
}

.update-bar button {
  width: auto;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
}

button.secondary {
  margin-top: 24px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
}

button.secondary:hover {
  background: var(--bg);
}
