:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --text: #1f2933;
  --muted: #667085;
  --line: #dfe3e8;
  --accent: #3a4a8c;
  --accent-text: #ffffff;
  --error: #b42318;
  --radius: 8px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

button, input { font: inherit; }

/* ── login ─────────────────────────────────────────────────────────── */

.login {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 16px;
}

.login-card {
  width: 100%;
  max-width: 360px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
}

.login-card h1 { margin: 0 0 20px; font-size: 20px; }

.login-card label { display: block; margin-bottom: 14px; color: var(--muted); font-size: 13px; }

.login-card input {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 9px 10px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}

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

.btn {
  padding: 9px 16px;
  color: var(--accent-text);
  background: var(--accent);
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.btn:disabled { opacity: 0.6; cursor: default; }
.login-card .btn { width: 100%; margin-top: 6px; }

.btn-quiet {
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
}

.error { min-height: 1.4em; margin: 10px 0 0; color: var(--error); font-size: 13px; }

/* ── board ─────────────────────────────────────────────────────────── */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.topbar h1 { margin: 0; font-size: 18px; }

.board {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  overflow-x: auto;
}

.column {
  flex: 1 1 0;
  min-width: 220px;
  background: #eceef2;
  border-radius: var(--radius);
  padding: 10px;
}

.column h2 {
  display: flex;
  justify-content: space-between;
  margin: 2px 4px 10px;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.count { font-weight: 400; }

.card {
  display: block;
  width: 100%;
  margin: 0 0 8px;
  padding: 10px 12px;
  text-align: left;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
}

.card:hover { border-color: var(--accent); }
.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.empty { margin: 4px; color: var(--muted); font-size: 13px; }

.note { padding: 16px; color: var(--muted); }

dialog {
  width: min(520px, calc(100% - 32px));
  padding: 20px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

dialog::backdrop { background: rgba(15, 23, 42, 0.4); }

dialog h3 { margin: 0 0 4px; font-size: 17px; }
dialog .where { margin: 0 0 14px; color: var(--muted); font-size: 13px; }
dialog .desc { margin: 0 0 18px; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ── phone: columns stacked ────────────────────────────────────────── */

@media (max-width: 700px) {
  .board { flex-direction: column; align-items: stretch; overflow-x: visible; }
  .column { min-width: 0; flex: none; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171c;
    --surface: #1d2127;
    --text: #e6e9ee;
    --muted: #98a2b3;
    --line: #2f353e;
    --accent: #7c8ce0;
    --accent-text: #11151c;
    --error: #f97066;
  }
  .column { background: #181c22; }
}
