:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #eef0f3;
  --text: #14171c;
  --muted: #5b6370;
  --border: #dde1e6;
  --brand: #1f5fbf;
  --brand-ink: #ffffff;
  --ok: #1a7f4b;
  --ok-bg: #e6f4ec;
  --warn: #a35f00;
  --warn-bg: #fff3dd;
  --alert: #bf3328;
  --alert-bg: #fdeae8;
  --shadow: 0 1px 2px rgb(16 24 40 / 6%), 0 2px 8px rgb(16 24 40 / 6%);
  --radius: 14px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111418;
    --surface: #1a1e24;
    --surface-2: #232830;
    --text: #eef0f3;
    --muted: #9aa3af;
    --border: #2e343d;
    --ok: #4cc98a;
    --ok-bg: #16301f;
    --warn: #f0b04a;
    --warn-bg: #33270f;
    --alert: #ff7b70;
    --alert-bg: #3a1714;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select { font: inherit; color: inherit; }

button { cursor: pointer; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
  white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand); filter: brightness(1.08); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-danger { color: var(--alert); }

.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--muted); }
.input {
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.input:focus, .btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 35%, transparent); outline-offset: 1px; }
textarea.input { resize: vertical; min-height: 80px; }

.error-text { color: var(--alert); font-weight: 600; }
.muted { color: var(--muted); }

/* Centered sign-in card used by the board and settings pages */
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
}
.login-card {
  width: min(380px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  display: grid;
  gap: 16px;
}
.login-card h1 { margin: 0; font-size: 22px; }
.login-card p { margin: 0; }
.pin-input { font-size: 28px; letter-spacing: .3em; text-align: center; }
