/* ============================================================
   TASK BOARD — the kanban inside a project.
============================================================ */
.tk-board-box {
  text-align: left;
  width: min(1180px, 96vw);
  max-width: none;
  max-height: 90vh;
  max-height: 90dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.tk-board-box #tkBoard { flex: 1; min-height: 0; overflow: auto; }

.tk-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 12px;
  align-items: start;
}
.tk-col {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  min-width: 0;
}
.tk-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 10px;
}
.tk-col-count {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 0.72rem;
}
.tk-col-body { display: flex; flex-direction: column; gap: 8px; }
.tk-col-empty {
  color: var(--text3);
  font-size: 0.82rem;
  text-align: center;
  padding: 16px 4px;
}

/* A card carries its priority on the left edge — visible at a glance while
   staying purely decorative, which is all priority ever does here. */
.tk-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  box-shadow: var(--shadow-sm);
}
.tk-pri--urgent    { border-left-color: var(--status-failed); }
.tk-pri--important { border-left-color: var(--status-draft); }
.tk-pri--normal    { border-left-color: var(--border-strong); }

.tk-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.tk-pri {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text3);
}
.tk-role {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid var(--border);
}
/* Primary is the one that gates project completion, so it reads as the
   stronger of the two. */
.tk-role--primary   { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.tk-role--secondary { background: var(--bg2); color: var(--text3); }

.tk-card-title { font-weight: 600; line-height: 1.35; }
.tk-card-desc {
  color: var(--text2);
  font-size: 0.84rem;
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tk-card-meta { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.tk-card-meta .chip { font-size: 0.72rem; }
.tk-overdue { color: var(--status-failed); border-color: currentColor; }

.tk-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

@media (max-width: 900px) {
  .tk-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .tk-board { grid-template-columns: 1fr; }
}

/* The task report sheet opens on top of the board, which is itself a
   .modal-overlay at z-index 9999 — without this the board would sit over the
   sheet and swallow its clicks. */
.modal-overlay--stacked { z-index: 10000; }

/* A card holding an unsent task report. The draft lives on the task, not in
   the composer's Drafts list, so the board is the only place it shows. */
.tk-draft-flag {
  margin-top: 8px;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg2);
  border-left: 2px solid var(--status-draft);
  color: var(--text2);
  font-size: 0.76rem;
}
