/* ═══════════════════════════════════════════════════════════════
   CCARE KITCHEN — TASK MANAGEMENT (kanban.css)
   Integrated into the main app's light theme
   ═══════════════════════════════════════════════════════════════ */

/* ── STAGE COLOUR TOKENS ── */
:root {
  --kstage-todo:       #3a7abf;
  --kstage-prep:       #d4870a;
  --kstage-cooking:    #c0392b;
  --kstage-portioning: #7d3c98;
  --kstage-cleaning:   #117a65;
  --kstage-putaway:    #1a5c2a;
  --kstage-done:       #7f8c8d;
  --kpri-high: #c0392b;
  --kpri-med:  #d4870a;
  --kpri-low:  #1a5c2a;
}

/* ── TAB SUB-HEADER ── */
.tasks-sub-nav {
  display: flex;
  background: #fff;
  border-bottom: 1.5px solid var(--border);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.tasks-sub-tab {
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 3px solid transparent;
  transition: all .15s;
  white-space: nowrap;
  font-family: 'DM Sans', sans-serif;
}
.tasks-sub-tab:hover { color: var(--forest); }
.tasks-sub-tab.active { color: var(--forest); border-bottom-color: var(--forest); }

/* ── SHARED TASK CONTENT AREA ── */
.tasks-content { padding: 20px 24px; min-height: calc(100vh - 180px); }

/* ── SECTION HEADER ── */
.tk-sec-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 10px;
}
.tk-sec-hd h3 {
  font-family: 'Lora', serif;
  font-size: 20px;
  color: var(--forest);
  font-weight: 700;
}
.tk-sec-hd p { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ── TWO-PANEL LAYOUT (used by Templates and Assignments) ── */
.tk-two-panel {
  display: flex;
  gap: 0;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  min-height: calc(100vh - 230px);
}
.tk-sidebar {
  width: 220px;
  flex-shrink: 0;
  border-right: 1.5px solid var(--border);
  display: flex;
  flex-direction: column;
  background: #faf9f7;
}
.tk-sidebar-hd {
  padding: 12px 14px 10px;
  border-bottom: 1.5px solid var(--border);
}
.tk-sidebar-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: 6px;
}
.tk-sidebar-search {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  background: #fff;
  color: var(--text);
}
.tk-sidebar-search:focus { border-color: var(--moss); outline: none; }

.tk-list { overflow-y: auto; flex: 1; }
.tk-list-item {
  padding: 9px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: background .1s;
}
.tk-list-item:hover { background: #f0ede8; }
.tk-list-item.active { background: #edf7f1; border-left-color: var(--moss); color: var(--forest); }
.tk-list-item-count {
  margin-left: auto;
  font-size: 10px;
  color: var(--muted);
  background: #f0ede8;
  border-radius: 10px;
  padding: 1px 7px;
  font-weight: 600;
}

.tk-main-panel { flex: 1; overflow: auto; display: flex; flex-direction: column; }
.tk-main-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  flex-wrap: wrap;
  gap: 8px;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}
.tk-main-title {
  font-family: 'Lora', serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--forest);
  display: flex;
  align-items: center;
  gap: 8px;
}
.tk-panel-scroll { flex: 1; overflow-y: auto; padding: 18px 20px; }

/* ── STAGE GROUPS ── */
.tk-stage-section { margin-bottom: 12px; }

.tk-stage-hd {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  background: #f5f2ed;
  border: 1px solid var(--border);
  border-radius: 8px 8px 0 0;
  margin-bottom: 0;
}
/* When section has cards the header connects to them */
.tk-stage-section:has(.tk-card) .tk-stage-hd {
  border-bottom: none;
}
.tk-stage-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.tk-stage-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
}
.tk-stage-count {
  font-size: 10px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1px 6px;
  font-family: 'DM Mono', monospace;
  min-width: 18px;
  text-align: center;
}
.tk-stage-add-btn {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 5px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: all .15s;
}
.tk-stage-add-btn:hover { color: var(--moss); background: rgba(45,106,79,.08); }

/* Cards grouped inside the stage border */
.tk-stage-cards {
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 8px 8px;
  overflow: hidden;
}
.tk-stage-section:not(:has(.tk-card)) .tk-stage-hd {
  border-radius: 8px;
}

/* Collapsed empty stages */
.tk-empty-stages-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 14px 2px 4px;
  border-top: 1px dashed var(--border);
  margin-top: 8px;
}
.tk-empty-stages-label {
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-right: 2px;
  white-space: nowrap;
}
.tk-empty-stage-pill {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px dashed var(--pill-col, var(--border));
  background: none;
  color: var(--pill-col, var(--muted));
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  opacity: .6;
  transition: all .15s;
  white-space: nowrap;
}
.tk-empty-stage-pill:hover { opacity: 1; background: #faf9f7; }

/* ── TEMPLATE TASK CARDS ── */
.tk-card {
  background: #fff;
  border: none;
  border-left: 3px solid var(--card-stage-col, var(--border));
  border-bottom: 1px solid #f0ede8;
  padding: 10px 14px 10px 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  transition: background .1s;
}
.tk-card:last-child { border-bottom: none; }
.tk-card:hover { background: #faf9f7; }
.tk-card-body { flex: 1; min-width: 0; }
.tk-card-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 5px; }
.tk-card-meta { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.tk-chip {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  background: #f5f2ed;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 2px 6px;
  color: var(--muted);
  font-weight: 500;
}
.tk-chip.high { background: #fdecea; border-color: #f5b5b0; color: #c0392b; }
.tk-chip.med  { background: #fef6e8; border-color: #f5dea0; color: #d4870a; }
.tk-chip.low  { background: #edf7f1; border-color: var(--mint); color: var(--forest); }
.tk-card-notes { font-size: 11px; color: var(--muted); margin-top: 5px; line-height: 1.5; }
.tk-card-tags { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.tk-tag {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 3px;
  background: #f0ede8;
  border: 1px solid var(--border);
  color: var(--muted);
}
.tk-tag.dep { background: #eef4fc; border-color: #b5c8f5; color: var(--blue); }
.tk-tag.res { background: #f5f0fa; border-color: #d7bee8; color: #6c3483; }
.tk-card-actions {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity .15s;
}
.tk-card:hover .tk-card-actions { opacity: 1; }

/* ── PLANNER PROJECTS VIEW ── */
.tk-week-sessions { display: flex; flex-direction: column; gap: 20px; }
.tk-day-block { }
.tk-day-hd {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 7px;
  border-bottom: 1.5px solid var(--border);
  margin-bottom: 8px;
}
.tk-day-name { font-size: 14px; font-weight: 700; color: var(--forest); }
.tk-day-date { font-size: 11px; color: var(--muted); font-family: 'DM Mono', monospace; }
.tk-day-count { font-size: 10px; color: var(--muted); background: #f0ede8; border: 1px solid var(--border); border-radius: 10px; padding: 2px 7px; }

.tk-session-row {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 11px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 7px;
  transition: border-color .15s;
}
.tk-session-row:hover { border-color: #bbb; }
.tk-session-row.is-corporate { border-left: 4px solid #d4870a; }
.tk-slot-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  background: #f5f2ed;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 8px;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: 'DM Mono', monospace;
}
.tk-session-row.is-corporate .tk-slot-badge { background: #fef6e8; border-color: #f5dea0; color: #8a5a00; }
.tk-session-info { flex: 1; min-width: 0; }
.tk-session-recipe { font-size: 14px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 7px; margin-bottom: 4px; }
.tk-corp-tag { font-size: 10px; background: #fef6e8; border: 1px solid #f5dea0; color: #8a5a00; border-radius: 10px; padding: 2px 7px; font-weight: 600; }
.tk-session-meta { display: flex; align-items: center; gap: 10px; font-size: 11px; color: var(--muted); flex-wrap: wrap; }
.tk-session-action { flex-shrink: 0; display: flex; align-items: center; gap: 8px; }

/* Project status badges */
.tk-proj-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 8px;
  border: 1.5px solid;
  cursor: pointer;
  transition: opacity .15s;
}
.tk-proj-badge:hover { opacity: .75; }
.tk-proj-badge.draft    { background: #f5f2ed; border-color: #ccc;           color: var(--muted); }
.tk-proj-badge.active   { background: #edf7f1; border-color: var(--mint);    color: var(--forest); }
.tk-proj-badge.complete { background: #eef4fc; border-color: #b5c8f5;        color: var(--blue); }

/* ── KANBAN BOARD ── */
.tk-board-header {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1.5px solid var(--border);
  background: #fff;
  gap: 12px;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 10;
}
.tk-proj-picker-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f5f2ed;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  transition: border-color .15s;
}
.tk-proj-picker-btn:hover { border-color: var(--moss); }
.tk-proj-picker-btn span:last-child { color: var(--muted); font-size: 11px; }

.tk-board-progress { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.tk-prog-bar { width: 100px; height: 6px; background: #e8e4de; border-radius: 10px; overflow: hidden; }
.tk-prog-fill { height: 100%; background: var(--moss); border-radius: 10px; transition: width .4s; }
.tk-prog-text { font-size: 11px; color: var(--muted); font-family: 'DM Mono', monospace; white-space: nowrap; }

/* Proj info bar */
.tk-proj-info-bar {
  background: #faf9f7;
  border-bottom: 1.5px solid var(--border);
  padding: 7px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--muted);
}
.tk-proj-status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1.5px solid;
  cursor: pointer;
  white-space: nowrap;
}
.tk-proj-status-badge.draft    { background: #f5f2ed; border-color: #ccc;        color: var(--muted); }
.tk-proj-status-badge.active   { background: #edf7f1; border-color: var(--mint); color: var(--forest); }
.tk-proj-status-badge.complete { background: #eef4fc; border-color: #b5c8f5;     color: var(--blue); }

/* Board scroll wrapper */
.tk-board-wrap {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 14px 16px 20px;
  align-items: flex-start;
  height: calc(100vh - 240px);
}

/* Board columns */
.tk-col {
  width: 205px;
  min-width: 205px;
  background: #faf9f7;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  max-height: 100%;
  flex-shrink: 0;
  transition: border-color .15s, background .15s;
}
.tk-col.drag-over { border-color: var(--moss); background: #edf7f1; }
.tk-col-head {
  padding: 9px 12px 8px;
  border-bottom: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  position: relative;
  border-radius: 11px 11px 0 0;
  background: #fff;
}
.tk-col-head::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--col-color);
  border-radius: 11px 11px 0 0;
}
.tk-col-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--col-color);
  display: flex;
  align-items: center;
  gap: 5px;
}
.tk-col-count {
  font-size: 10px;
  color: var(--muted);
  background: #f0ede8;
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 10px;
  font-family: 'DM Mono', monospace;
}
.tk-col-body {
  padding: 7px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 50px;
}
.tk-col-empty { font-size: 11px; color: var(--muted); text-align: center; padding: 12px; font-style: italic; pointer-events: none; }
.tk-col-add-btn {
  background: none;
  border: 1.5px dashed var(--border);
  color: var(--muted);
  font-size: 11px;
  padding: 5px;
  border-radius: 6px;
  cursor: pointer;
  width: 100%;
  font-family: 'DM Sans', sans-serif;
  transition: all .15s;
}
.tk-col-add-btn:hover { border-color: var(--moss); color: var(--moss); }

/* Kanban task cards */
.tk-bcard {
  background: #fff;
  border: 1.5px solid var(--border);
  border-left: 4px solid var(--col-color);
  border-radius: 8px;
  padding: 9px 10px;
  cursor: grab;
  transition: transform .1s, box-shadow .1s, border-color .1s;
}
.tk-bcard:hover { box-shadow: 0 3px 12px rgba(0,0,0,.12); transform: translateY(-1px); border-right-color: #ccc; }
.tk-bcard.dragging { opacity: .35; transform: rotate(1.5deg) scale(.97); }
.tk-bcard.blocked { opacity: .6; cursor: not-allowed; border-left-color: var(--border) !important; background: #f9f9f9; }

.tk-bcard-title { font-size: 12px; font-weight: 600; color: var(--text); line-height: 1.4; margin-bottom: 6px; }
.tk-bcard-blocked-msg {
  font-size: 10px;
  color: var(--muted);
  background: #f5f2ed;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 7px;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.tk-bcard-row { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-bottom: 4px; }
.tk-av-group { display: flex; }
.tk-av {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  border: 1.5px solid #fff;
  flex-shrink: 0;
  margin-left: -4px;
  text-transform: uppercase;
}
.tk-av:first-child { margin-left: 0; }
.tk-av-more {
  width: 20px; height: 20px; border-radius: 50%;
  background: #f0ede8; border: 1.5px solid #fff;
  font-size: 9px; color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  margin-left: -4px;
}
.tk-pri-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.tk-pri-high { background: var(--kpri-high); }
.tk-pri-med  { background: var(--kpri-med); }
.tk-pri-low  { background: var(--kpri-low); }
.tk-bcard-chip { font-size: 10px; color: var(--muted); background: #f5f2ed; border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; }
.tk-bcard-prog { margin-top: 5px; }
.tk-bcard-prog-bar { height: 3px; background: #e8e4de; border-radius: 10px; overflow: hidden; }
.tk-bcard-prog-fill { height: 100%; border-radius: 10px; transition: width .3s; }
.tk-bcard-prog-label { font-size: 9px; color: var(--muted); text-align: right; margin-top: 2px; font-family: 'DM Mono', monospace; }
.tk-bcard-actions { display: flex; gap: 3px; margin-top: 4px; opacity: 0; transition: opacity .15s; }
.tk-bcard:hover .tk-bcard-actions { opacity: 1; }
.tk-bcard-btn {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-size: 11px; padding: 3px 6px; border-radius: 4px;
  font-family: 'DM Sans', sans-serif; transition: all .1s;
}
.tk-bcard-btn:hover { color: var(--text); background: #f0ede8; }

/* ── DETAIL PANEL (slide-in drawer) ── */
.tk-detail-panel {
  position: fixed;
  right: 0; top: 112px; bottom: 0;
  width: 360px;
  background: #fff;
  border-left: 1.5px solid var(--border);
  z-index: 30;
  transform: translateX(100%);
  transition: transform .25s;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: -4px 0 24px rgba(0,0,0,.1);
}
.tk-detail-panel.open { transform: translateX(0); }
.tk-dp-head {
  padding: 14px 16px 12px;
  border-bottom: 1.5px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #faf9f7;
}
.tk-dp-title { font-size: 14px; font-weight: 700; color: var(--forest); flex: 1; line-height: 1.4; font-family: 'Lora', serif; }
.tk-dp-body { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 13px; }
.tk-dp-section-title { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.tk-dp-label { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 3px; }
.tk-dp-value { font-size: 13px; color: var(--text); line-height: 1.5; }

/* Status chips in detail panel */
.tk-status-row { display: flex; gap: 5px; flex-wrap: wrap; }
.tk-status-chip {
  font-size: 11px; padding: 4px 10px; border-radius: 5px;
  border: 1.5px solid; cursor: pointer; transition: all .15s;
  font-weight: 600; font-family: 'DM Sans', sans-serif;
}
.tk-status-chip.sel-blocked     { background: #f5f2ed; border-color: #bbb;        color: var(--muted); }
.tk-status-chip.sel-ready       { background: #eef4fc; border-color: #b5c8f5;     color: var(--blue); }
.tk-status-chip.sel-in_progress { background: #fef6e8; border-color: #f5dea0;     color: #8a5a00; }
.tk-status-chip.sel-complete    { background: #edf7f1; border-color: var(--mint); color: var(--forest); }
.tk-status-chip:not([class*="sel-"]):hover { border-color: var(--moss); color: var(--moss); }

/* Progress slider */
.tk-prog-slider-row { display: flex; align-items: center; gap: 10px; }
.tk-prog-slider {
  flex: 1; -webkit-appearance: none; appearance: none;
  height: 5px; border-radius: 10px; background: #e8e4de; outline: none; cursor: pointer;
}
.tk-prog-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--gold); cursor: pointer; border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.tk-prog-val { font-family: 'DM Mono', monospace; font-size: 12px; color: var(--gold); min-width: 32px; text-align: right; font-weight: 700; }

/* Dep/res chips in detail panel */
.tk-dep-chip {
  background: #eef4fc; border: 1px solid #b5c8f5; border-radius: 5px;
  padding: 4px 8px; font-size: 11px; color: var(--blue);
  display: flex; align-items: center; gap: 6px; margin-bottom: 4px;
}
.tk-dep-chip.ok { background: #edf7f1; border-color: var(--mint); color: var(--forest); }
.tk-res-chip {
  display: flex; align-items: center; gap: 7px;
  background: #f5f2ed; border: 1px solid var(--border); border-radius: 5px;
  padding: 5px 9px; font-size: 11px; color: var(--muted);
  margin-bottom: 4px; text-decoration: none; transition: all .15s;
}
.tk-res-chip:hover { border-color: var(--moss); color: var(--forest); }

/* Assignee rows in detail */
.tk-dp-assignee {
  background: #faf9f7; border: 1px solid var(--border); border-radius: 6px;
  padding: 6px 10px; display: flex; align-items: center; gap: 8px;
  font-size: 12px; margin-bottom: 4px;
}
.tk-dp-assignee-name { font-weight: 600; color: var(--text); }

/* ── ASSIGNMENT MANAGER ── */
.tk-assign-layout {
  display: flex;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  min-height: calc(100vh - 230px);
}
.tk-staff-panel {
  width: 220px;
  flex-shrink: 0;
  border-right: 1.5px solid var(--border);
  background: #faf9f7;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.tk-staff-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  margin: 0 8px 7px;
  transition: all .15s;
  user-select: none;
}
.tk-staff-card:hover { border-color: var(--moss); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.tk-staff-card.qa-active { border-color: var(--moss); background: #edf7f1; }

.tk-sc-top { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.tk-sc-avatar { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; text-transform: uppercase; }
.tk-sc-name { font-size: 13px; font-weight: 600; color: var(--text); }
.tk-sc-role { font-size: 10px; color: var(--muted); }
.tk-wl-bar { height: 4px; background: #e8e4de; border-radius: 10px; overflow: hidden; margin-top: 3px; }
.tk-wl-fill { height: 100%; border-radius: 10px; transition: width .4s; }
.tk-wl-low    { background: var(--moss); }
.tk-wl-medium { background: var(--gold); }
.tk-wl-high   { background: #c0392b; }
.tk-wl-meta { font-size: 10px; color: var(--muted); display: flex; justify-content: space-between; margin-bottom: 3px; }
.tk-task-dots { display: flex; gap: 3px; flex-wrap: wrap; margin-top: 5px; }
.tk-task-dot { width: 7px; height: 7px; border-radius: 2px; cursor: pointer; transition: transform .1s; }
.tk-task-dot:hover { transform: scale(1.5); }

/* Quick-assign banner */
.tk-qa-banner {
  background: #edf7f1;
  border-bottom: 1.5px solid var(--mint);
  padding: 7px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--forest);
  flex-shrink: 0;
}
.tk-qa-who { font-weight: 700; color: var(--moss); }

/* Assignment task table */
.tk-assign-main { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
.tk-assign-toolbar {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  border-bottom: 1.5px solid var(--border); flex-shrink: 0; flex-wrap: wrap;
  background: #fff;
}
.tk-filter-chip {
  padding: 4px 11px; border-radius: 20px; border: 1.5px solid var(--border);
  font-size: 11px; font-weight: 600; cursor: pointer;
  background: #fff; color: var(--muted); transition: all .15s; white-space: nowrap;
}
.tk-filter-chip:hover { border-color: var(--moss); color: var(--moss); }
.tk-filter-chip.active { background: #edf7f1; border-color: var(--moss); color: var(--forest); }
.tk-unassigned-pill {
  font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 20px;
  background: #fdecea; border: 1.5px solid #f5b5b0; color: var(--kpri-high);
  margin-left: auto;
}
.tk-saved-indicator { font-size: 11px; color: var(--moss); font-weight: 600; display: none; }
.tk-saved-indicator.show { display: flex; align-items: center; gap: 4px; }

.tk-assign-scroll { flex: 1; overflow-y: auto; padding: 12px 14px; }

/* Stage group in assignment view */
.tk-sg-hd {
  display: flex; align-items: center; gap: 8px;
  padding-bottom: 6px; border-bottom: 1.5px solid var(--border); margin-bottom: 7px;
}
.tk-sg-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.tk-sg-stats { margin-left: auto; font-size: 10px; color: var(--muted); font-family: 'DM Mono', monospace; }

.tk-task-row {
  display: grid;
  grid-template-columns: 1fr 80px 60px auto;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-left: 4px solid var(--row-stage-col, var(--border));
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: all .15s;
}
.tk-task-row:hover { border-right-color: #bbb; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.tk-task-row.qa-mode-active:hover:not(.done-row) { background: #edf7f1; border-top-color: var(--moss); border-right-color: var(--moss); border-bottom-color: var(--moss); }
.tk-task-row.qa-assigned { background: #edf7f1; }
.tk-task-row.drop-hl { background: #fef6e8 !important; border-color: var(--gold) !important; }
.tk-tr-title { font-size: 13px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 2px; }
.tk-tr-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.tk-tr-chip { font-size: 10px; color: var(--muted); background: #f5f2ed; border: 1px solid var(--border); border-radius: 3px; padding: 1px 5px; }
.tk-tr-duration { font-family: 'DM Mono', monospace; font-size: 11px; color: var(--muted); text-align: center; }
.tk-tr-assignees { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; justify-content: flex-end; min-height: 24px; }
.tk-unassigned-hint { font-size: 10px; color: var(--muted); font-style: italic; }

/* Swimlane view */
.tk-swimlane-view { display: flex; flex-direction: column; gap: 12px; }
.tk-swimlane {
  background: #fff; border: 1.5px solid var(--border); border-radius: 10px; overflow: hidden;
}
.tk-sl-head {
  display: flex; align-items: center; gap: 10px; padding: 9px 14px;
  border-bottom: 1.5px solid var(--border); background: #faf9f7;
}
.tk-sl-name { font-size: 13px; font-weight: 600; flex: 1; color: var(--text); }
.tk-sl-stats { font-size: 11px; color: var(--muted); font-family: 'DM Mono', monospace; }
.tk-sl-tasks { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px; min-height: 50px; }
.tk-sl-pill {
  display: flex; align-items: center; gap: 5px;
  background: #faf9f7; border: 1.5px solid var(--border);
  border-radius: 6px; padding: 5px 9px; font-size: 11px; font-weight: 500;
  border-left: 3px solid var(--pill-col, var(--border));
  cursor: pointer; transition: all .15s; white-space: nowrap;
  color: var(--text);
}
.tk-sl-pill:hover { border-right-color: #bbb; box-shadow: 0 2px 6px rgba(0,0,0,.07); }
.tk-sl-empty { font-size: 11px; color: var(--muted); font-style: italic; padding: 14px; }

/* mode toggle in assignment header */
.tk-mode-toggle { display: flex; background: #f5f2ed; border: 1.5px solid var(--border); border-radius: 6px; overflow: hidden; }
.tk-mode-btn { padding: 5px 12px; font-size: 11px; font-weight: 600; cursor: pointer; border: none; background: none; color: var(--muted); font-family: 'DM Sans', sans-serif; transition: all .15s; }
.tk-mode-btn.active { background: var(--forest); color: #fff; }

/* ── MODALS (reuse app's .modal-overlay/.modal-box but with additional scoped styles) ── */
.tk-modal-tabs { display: flex; border-bottom: 1.5px solid var(--border); margin-bottom: 16px; }
.tk-modal-tab {
  padding: 7px 14px; font-size: 12px; font-weight: 600; color: var(--muted);
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1.5px;
  transition: all .15s; background: none; border-top: none; border-left: none; border-right: none;
  font-family: 'DM Sans', sans-serif;
}
.tk-modal-tab:hover { color: var(--text); }
.tk-modal-tab.active { color: var(--forest); border-bottom-color: var(--forest); }
.tk-tab-pane { display: none; }
.tk-tab-pane.active { display: block; }

/* Priority toggle in modals */
.tk-pri-row { display: flex; gap: 6px; }
.tk-pri-btn {
  flex: 1; padding: 6px; border-radius: 6px;
  border: 1.5px solid var(--border); background: #f5f2ed;
  color: var(--muted); font-size: 11px; font-weight: 600;
  cursor: pointer; font-family: 'DM Sans', sans-serif; transition: all .15s; text-align: center;
}
.tk-pri-btn.sel-high { background: #fdecea; border-color: #f5b5b0; color: var(--kpri-high); }
.tk-pri-btn.sel-med  { background: #fef6e8; border-color: #f5dea0; color: var(--kpri-med); }
.tk-pri-btn.sel-low  { background: #edf7f1; border-color: var(--mint); color: var(--kpri-low); }

/* Dep/res list in modal */
.tk-dep-row {
  background: #faf9f7; border: 1.5px solid var(--border); border-radius: 6px;
  padding: 7px 11px; display: flex; align-items: center; gap: 8px;
  font-size: 12px; margin-bottom: 6px;
}
.tk-dep-pct-input {
  width: 52px; background: #fff; border: 1.5px solid var(--border);
  border-radius: 4px; padding: 4px 7px; font-size: 12px; color: var(--text);
  text-align: center; font-family: 'DM Mono', monospace; outline: none;
}
.tk-dep-pct-input:focus { border-color: var(--moss); }

/* Staff picker in modals */
.tk-staff-picker { display: flex; flex-direction: column; gap: 5px; max-height: 260px; overflow-y: auto; }
.tk-spo {
  background: #faf9f7; border: 1.5px solid var(--border); border-radius: 6px;
  padding: 8px 12px; cursor: pointer; transition: all .15s;
  display: flex; align-items: center; gap: 10px;
}
.tk-spo:hover { border-color: var(--moss); }
.tk-spo.sel { background: #edf7f1; border-color: var(--moss); }
.tk-spo-name { flex: 1; font-size: 13px; font-weight: 500; color: var(--text); }
.tk-spo-role { font-size: 10px; color: var(--muted); }
.tk-spo-check { color: var(--moss); font-size: 14px; font-weight: 700; }

/* Proj picker list */
.tk-pp-list { display: flex; flex-direction: column; gap: 6px; max-height: 380px; overflow-y: auto; }
.tk-pp-item {
  background: #faf9f7; border: 1.5px solid var(--border); border-radius: 8px;
  padding: 10px 14px; cursor: pointer; transition: all .15s;
}
.tk-pp-item:hover { border-color: var(--moss); }
.tk-pp-item.curr { border-color: var(--moss); background: #edf7f1; }
.tk-pp-name { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.tk-pp-meta { font-size: 11px; color: var(--muted); }
.tk-pp-status { display: inline; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 6px; border: 1px solid; margin-left: 6px; }
.tk-pp-status.draft    { border-color: #ccc;        color: var(--muted); }
.tk-pp-status.active   { border-color: var(--mint);  color: var(--forest); }
.tk-pp-status.complete { border-color: #b5c8f5;     color: var(--blue); }

/* Task preview in create-project modal */
.tk-task-preview {
  background: #faf9f7; border: 1.5px solid var(--border); border-radius: 8px;
  padding: 11px 14px; margin-bottom: 14px;
}
.tk-tp-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted); margin-bottom: 7px; display: flex; align-items: center; justify-content: space-between;
}
.tk-tp-list { display: flex; flex-direction: column; gap: 5px; max-height: 180px; overflow-y: auto; }
.tk-tp-row { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.tk-no-tmpl-warn {
  background: #fdecea; border: 1.5px solid #f5b5b0; border-radius: 8px;
  padding: 11px 14px; margin-bottom: 14px;
  font-size: 12px; color: #7b1d1d; display: flex; align-items: flex-start; gap: 8px; line-height: 1.5;
}

/* Success box */
.tk-success-box { text-align: center; padding: 10px 0; }
.tk-success-icon { font-size: 48px; margin-bottom: 10px; }
.tk-success-title { font-family: 'Lora', serif; font-size: 20px; color: var(--forest); margin-bottom: 7px; }
.tk-success-summary {
  background: #faf9f7; border: 1.5px solid var(--border); border-radius: 8px;
  padding: 11px; text-align: left; margin: 12px 0;
}
.tk-summary-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 5px; }

/* ── EMPTY / SPINNER ── */
.tk-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); gap: 10px; padding: 40px; text-align: center; min-height: 200px; }
.tk-empty-icon { font-size: 40px; opacity: .4; }
.tk-spinner { width: 20px; height: 20px; border: 2px solid var(--border); border-top-color: var(--moss); border-radius: 50%; animation: tk-spin .6s linear infinite; display: inline-block; }
@keyframes tk-spin { to { transform: rotate(360deg); } }

/* ── SCROLLBAR ── */
.tk-board-wrap::-webkit-scrollbar { height: 6px; }
.tk-board-wrap::-webkit-scrollbar-track { background: transparent; }
.tk-board-wrap::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
