:root {
  --graphite: #14161B;
  --paper: #FAFAF8;
  --ink: #1B1F27;
  --line: #E3E3DE;
  --blue: #3562E9;
  --violet: #7C4DFF;
  --muted: #767B87;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 14px;
}

/* ---------- topbar ---------- */

.topbar {
  background: var(--graphite);
  color: #fff;
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.topbar__identity {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.topbar__mark {
  color: var(--blue);
  font-size: 20px;
}

.topbar h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.topbar__sub {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: #9AA0AC;
}

.topbar__actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.input {
  font-family: inherit;
  font-size: 13px;
  padding: 9px 12px;
  border-radius: 4px;
  border: 1px solid #33363F;
  background: #1E2129;
  color: #fff;
  min-width: 260px;
}

.input::placeholder { color: #6C7180; }

.btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}

.btn--accent {
  background: var(--violet);
  color: #fff;
}
.btn--accent:hover { background: #6a3ff0; }
.btn--accent:disabled { background: #4d4560; cursor: wait; }

.btn--ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 5px 10px;
  font-size: 12px;
}
.btn--ghost:hover { border-color: var(--blue); color: var(--blue); }

.btn--danger { color: #C62828; }
.btn--danger:hover { border-color: #C62828; }

/* ---------- board ---------- */

.board { padding: 24px 32px 60px; }

.board__meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--muted);
}

.board__count--warn { color: #C77700; font-weight: 600; }

.board__status { color: var(--violet); font-weight: 500; }

.table-wrap {
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow-x: auto;
  background: #fff;
}

.issue-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 1080px;
}

.issue-table thead th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: #F3F3F0;
  position: sticky;
  top: 0;
}

.issue-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  vertical-align: top;
}

.issue-table tbody tr:hover { background: #FBFBF9; }

.cell-mono { font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; }

.due-date { font-family: 'IBM Plex Mono', monospace; }
.due-date--predicted {
  color: var(--violet);
  font-style: italic;
}
.due-date--empty { color: #B9BCC4; }

.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 3px;
  font-size: 11.5px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}

.badge--outline {
  background: transparent;
  border: 1px dashed #B9BCC4;
  color: var(--muted);
}

.title-cell { max-width: 320px; }
.title-cell a { color: var(--ink); text-decoration: none; }
.title-cell a:hover { text-decoration: underline; }

.link-icon { color: var(--blue); text-decoration: none; font-size: 12px; }

.row-actions { display: flex; gap: 6px; white-space: nowrap; }

.reason-note {
  display: block;
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--muted);
  max-width: 280px;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.board__legend {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-dot {
  width: 9px; height: 9px; border-radius: 50%;
  display: inline-block;
}
.legend-dot--ai { background: var(--violet); }

@media (max-width: 720px) {
  .topbar { flex-direction: column; align-items: stretch; }
  .input { min-width: 0; width: 100%; }
  .board { padding: 16px; }
}
