/* Pipeline board (redesign Phase 4). Desktop: columns side by side in a strip that scrolls
   sideways inside itself, never the page. Phone: tabs, and only the current stage shows.
   Every tap target is at least 44px tall; stage colors come from config/stages.json. */

#screen-board { max-width: none; }
.board-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 12px; }
.board-title { font: 700 24px/1.25 var(--font-display); color: var(--text-bright); margin: 4px 0; }
.board-sub { font-size: 15px; color: var(--muted); max-width: 70ch; }

.board-tabs { display: none; }
.board { display: flex; gap: 12px; align-items: flex-start; overflow-x: auto; padding-bottom: 12px; }
.b-col {
  flex: 0 0 272px; min-width: 0; display: flex; flex-direction: column; gap: 8px;
  padding: 10px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px;
  transition: background 0.12s, border-color 0.12s;
}
.b-col.is-resolved { background: var(--panel); }
.b-col.is-target { border-color: var(--zv-blue); background: var(--zv-blue-wash); }
.b-head { display: grid; gap: 4px; padding: 2px 2px 6px; border-bottom: 1px solid var(--border); }
.b-h { margin: 0; font-size: inherit; }
.b-sum { font-size: 14px; color: var(--text-strong); }
.b-cards { list-style: none; display: grid; gap: 8px; }
.b-empty { font-size: 14px; color: var(--muted); padding: 8px 2px; }

.b-card {
  display: grid; gap: 4px; padding: 10px 12px; background: var(--panel); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: var(--shadow-sm); cursor: default;
}
.b-card[draggable="true"] { cursor: grab; }
.b-card.is-dragging { opacity: 0.45; }
.b-card:focus { outline: 2px solid var(--zv-blue); outline-offset: 2px; }
.b-card.just-moved { animation: just-moved 1.2s ease-out; }
@keyframes just-moved { from { box-shadow: 0 0 0 4px var(--zv-blue-wash); } to { box-shadow: var(--shadow-sm); } }
@media (prefers-reduced-motion: reduce) { .b-card.just-moved { animation: none; } }
.bc-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.bc-surgeon { font-size: 16px; font-weight: 700; color: var(--text-bright); overflow-wrap: anywhere; }
.bc-amount { font-size: 14px; color: var(--text-strong); white-space: nowrap; }
.bc-sub { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.bc-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; color: var(--muted); }
.bc-start.is-past { color: var(--zv-red-deep); font-weight: 600; }
.bc-start.is-missing { color: var(--accent-amber); font-weight: 600; }
.bc-days.is-stalled { color: var(--zv-red-deep); font-weight: 600; }
.bc-actions { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.b-move { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.b-move-opt {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; cursor: pointer;
  background: none; border: 1px solid var(--border); border-radius: 22px;
}
.b-move-opt:hover { border-color: var(--zv-blue); }
.b-move-opt:focus-visible { outline: 2px solid var(--zv-blue); outline-offset: 2px; }

@media (max-width: 767px) {
  .board-tabs {
    display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 12px; padding: 2px 16px 6px;
    scrollbar-width: none;
  }
  .board-tabs::-webkit-scrollbar { display: none; }
  .b-tab {
    flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 22px; cursor: pointer;
    border: 1px solid var(--border); background: var(--panel); color: var(--text-strong); font: 600 15px var(--font-body); white-space: nowrap;
  }
  .b-tab.is-on { background: var(--text-bright); border-color: var(--text-bright); color: #fff; }
  .b-tab.is-on .tab-n { background: rgba(255, 255, 255, 0.2); color: #fff; }
  .b-tab:focus-visible { outline: 2px solid var(--zv-blue); outline-offset: 2px; }
  .board { display: block; overflow: visible; }
  .b-col { display: none; }
  .b-col.is-current { display: flex; }
  .b-col { padding: 10px 8px; }
  .bc-surgeon { font-size: 17px; }
  .bc-sub, .bc-meta { font-size: 15px; }
}
