:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --border: #dfe1e6;
  --text: #172b4d;
  --muted: #6b778c;
  --accent: #0052cc;
  --danger: #bf2600;
}

* { box-sizing: border-box; }

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

header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

header h1 { font-size: 18px; margin: 0; flex: 1; }

button {
  font: inherit;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

button:hover { background: #ebecf0; }

button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

button.primary:hover { background: #0747a6; }

button.danger { color: var(--danger); border-color: #ffbdad; }
button.danger:hover { background: #ffebe6; }

.board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 20px;
  align-items: start;
}

.column {
  background: #ebecf0;
  border-radius: 6px;
  padding: 10px;
}

.column h2 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 2px 4px 10px;
}

.column h2 span { color: #a5adba; }

.card {
  background: var(--surface);
  border-radius: 4px;
  box-shadow: 0 1px 1px rgba(9, 30, 66, 0.25);
  padding: 10px;
  margin-bottom: 8px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  border: none;
}

.card:hover { background: #f4f5f7; }
.card .title { font-weight: 500; }

.card .meta {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

.chip {
  background: #dfe1e6;
  border-radius: 10px;
  padding: 1px 8px;
}

.chip.unassigned { background: transparent; border: 1px dashed #c1c7d0; }

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

.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(9, 30, 66, 0.5);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow: auto;
}

.modal {
  background: var(--surface);
  border-radius: 6px;
  width: 100%;
  max-width: 520px;
  padding: 20px;
}

.modal h2 { margin: 0 0 16px; font-size: 16px; }

label { display: block; margin-bottom: 12px; }
label span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }

input, textarea, select {
  font: inherit;
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
}

textarea { resize: vertical; min-height: 72px; }

.row { display: flex; gap: 12px; }
.row > label { flex: 1; }

.actions { display: flex; gap: 8px; margin-top: 4px; }
.actions .spacer { flex: 1; }

.comments { border-top: 1px solid var(--border); margin-top: 20px; padding-top: 12px; }
.comments h3 { font-size: 12px; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }

.comment { margin-bottom: 10px; }
.comment .who { font-size: 12px; color: var(--muted); }
.comment .body { white-space: pre-wrap; }

.error { color: var(--danger); margin: 0 0 12px; }
