/* Board lanes and cards use the shared palette and spacing tokens. */
.board-page { min-width: 0; }
.board-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-4); }
.board-page-head h1 { margin: 0 0 var(--sp-1); }
.board-page-head p { margin: 0; }
.board-group-switch { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: var(--sp-1); }
.board-group-label { margin-right: var(--sp-1); color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
.board-group-link { display: inline-flex; align-items: center; min-height: var(--touch); padding: 0 var(--sp-3); border: 1px solid var(--border); border-radius: var(--radius); color: var(--link); font-size: var(--fs-sm); font-weight: 600; text-decoration: none; }
.board-group-link:hover { background: var(--bg); }
.board-group-current { background: var(--nav-active); color: var(--accent-text); border-color: var(--border-strong); }
.board-loading { display: inline-flex; align-items: center; min-height: var(--touch); color: var(--muted); font-size: var(--fs-sm); }
.board-page .filter-bar-slot { min-height: 52px; margin-bottom: var(--sp-3); }
.board-view-body { min-width: 0; }
.board-mobile-tabs { display: none; }
.board-scroll { max-width: 100%; overflow-x: auto; padding: var(--sp-1); padding-bottom: var(--sp-3); }
.board-lanes { display: flex; align-items: flex-start; gap: var(--sp-3); width: max-content; min-width: 100%; }
.board-lane { flex: 0 0 280px; min-width: 0; overflow: visible; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }
.board-lane-collapsed { flex-basis: 176px; }
.board-lane-collapsed:has(.board-collapse[open]) { flex-basis: 280px; }
.board-lane-header { display: flex; align-items: center; gap: var(--sp-2); min-height: 52px; padding: var(--sp-2) var(--sp-3); border-bottom: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0; }
.board-lane-header h2 { flex: 1; margin: 0; font-size: var(--fs-sm); line-height: 1.3; }
.board-lane-count, .board-tab-count { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; min-height: 24px; padding: 0 var(--sp-1); border-radius: var(--radius); background: var(--surface); color: var(--fg); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.board-collapse-summary { cursor: pointer; list-style: none; }
.board-collapse-summary::-webkit-details-marker, .board-move-summary::-webkit-details-marker, .board-move-lane > summary::-webkit-details-marker { display: none; }
.board-collapse-summary > span:first-child { flex: 1; font-size: var(--fs-sm); font-weight: 700; }
.board-collapse-hint { color: var(--accent-text); font-size: var(--fs-xs); }
.board-collapse[open] .board-collapse-hint { display: none; }
.board-card-list { display: grid; gap: var(--sp-2); min-height: 72px; padding: var(--sp-2); }
.board-lane-content[aria-busy="true"] { min-height: 120px; }
.board-lane-empty { margin: var(--sp-2) var(--sp-1); font-size: var(--fs-sm); line-height: 1.4; }
.board-card { position: relative; min-width: 0; padding: var(--sp-3); overflow: visible; border-radius: var(--radius); box-shadow: none; color: var(--text); transition: opacity var(--dur), outline-color var(--dur); }
.board-card[data-board-draggable="true"] { cursor: grab; }
.board-card[data-board-draggable="true"]:active { cursor: grabbing; }
.board-card[aria-busy="true"] { opacity: .65; }
.board-dragging { opacity: .5; }
.board-drop-active { outline: 2px dashed var(--border-strong); outline-offset: 2px; }
.board-highlight-yellow { border-left: 4px solid var(--st-action-text); }
.board-highlight-red { border-left: 4px solid var(--destructive); }
.board-card-topline { display: flex; align-items: center; gap: var(--sp-2); min-height: 28px; }
.board-card-brand { flex: 1; min-width: 0; overflow: hidden; color: var(--muted); font-size: var(--fs-xs); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.board-drag-handle { display: inline-flex; align-items: center; justify-content: center; width: 24px; color: var(--muted); }
.board-card-title { display: -webkit-box; width: 100%; min-height: var(--touch); margin: var(--sp-1) 0; padding: 0; overflow: hidden; border: 0; background: transparent; color: var(--fg); font: 700 var(--fs-sm)/1.4 var(--font); text-align: left; cursor: pointer; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.board-card-title:hover { color: var(--link); text-decoration: underline; }
.board-card-meta, .board-card-flight, .board-card-footer { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); min-width: 0; font-size: var(--fs-xs); }
.board-card-meta { color: var(--muted); }
.board-card-meta > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-card-meta > span:first-child { flex: 1; }
.board-card-flight { justify-content: flex-start; min-height: 32px; font-variant-numeric: tabular-nums; }
.board-date-flag { display: inline-flex; align-items: center; min-height: 24px; padding: 0 var(--sp-1); border-radius: var(--radius); background: var(--st-action); color: var(--st-action-text); font-size: var(--fs-xs); }
.board-card-badges { display: flex; flex-wrap: wrap; gap: var(--sp-1); margin: var(--sp-1) 0 var(--sp-2); }
.board-card-badges .badge { min-height: 26px; }
.board-card-badges .icon { width: 14px; height: 14px; }
.board-card-footer { justify-content: flex-end; min-height: var(--touch); margin-top: var(--sp-1); }
.board-card-budget { margin-right: auto; color: var(--fg); font-weight: 700; font-variant-numeric: tabular-nums; }
.board-card-trader { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; min-height: 28px; border: 1px solid var(--border); border-radius: 50%; color: var(--muted); font-weight: 700; }
.board-move { position: relative; }
.board-move-summary { display: inline-flex; align-items: center; justify-content: center; min-width: var(--touch); min-height: var(--touch); padding: 0 var(--sp-2); border: 1px solid var(--border-strong); border-radius: var(--radius); color: var(--fg); font-size: var(--fs-xs); font-weight: 650; cursor: pointer; list-style: none; }
.board-move-summary:hover { background: var(--bg); }
.board-move-menu { right: 0; bottom: calc(100% + var(--sp-2)); width: min(280px, calc(100vw - 32px)); max-height: 60vh; overflow-y: auto; }
.board-move-title, .board-status-question, .board-ended-question { margin: 0 0 var(--sp-2); color: var(--muted); font-size: var(--fs-xs); font-weight: 650; overflow-wrap: anywhere; }
.board-move-menu form { margin: 0; }
.board-move-menu .menu-item { font-size: var(--fs-xs); }
.board-move-lane > summary { display: flex; align-items: center; min-height: var(--touch); padding: 0 var(--sp-3); border-radius: var(--radius); font-size: var(--fs-sm); font-weight: 600; cursor: pointer; list-style: none; }
.board-move-lane > summary:hover { background: var(--bg); }
.board-move-lane > summary::after { margin-left: auto; content: "+"; }
.board-move-lane[open] > summary::after { content: "−"; }
.board-move-statuses { padding: 0 0 var(--sp-2) var(--sp-2); }
.board-status-question, .board-ended-question { padding: 0 var(--sp-3); }
.board-older-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); padding: var(--sp-2); border-top: 1px solid var(--border); }
.board-older-actions .btn { flex: 1; padding: 0 var(--sp-2); font-size: var(--fs-xs); }
.board-empty-action { margin-top: calc(-1 * var(--sp-5)); padding-bottom: var(--sp-6); }

@media (max-width: 720px) {
  .board-page-head { display: block; }
  .board-group-switch { justify-content: flex-start; margin-top: var(--sp-3); }
  .board-group-label { width: 100%; }
  .board-mobile-tabs { display: flex; gap: var(--sp-2); max-width: 100%; margin-bottom: var(--sp-3); padding: var(--sp-1); overflow-x: auto; border-bottom: 1px solid var(--border); }
  .board-tab { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: var(--sp-1); min-height: var(--touch); padding: 0 var(--sp-3); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--muted); font: 600 var(--fs-sm) var(--font); cursor: pointer; }
  .board-tab[aria-selected="true"] { background: var(--board-header); color: var(--accent-text); border-color: var(--border-strong); }
  .board-scroll { overflow: visible; padding: 0; }
  .board-lanes { display: block; width: 100%; min-width: 0; }
  .board-lane { display: none; width: 100%; min-width: 0; }
  .board-lane-collapsed, .board-lane-collapsed:has(.board-collapse[open]) { width: 100%; min-width: 0; }
  .board-lane.board-mobile-active { display: block; }
  .board-card { width: 100%; box-sizing: border-box; }
  .board-card[data-board-draggable="true"] { cursor: default; }
  .board-drag-handle { display: none; }
  .board-move-menu { position: fixed; right: var(--sp-4); bottom: 80px; left: var(--sp-4); width: auto; max-height: 60vh; }
}

@media (prefers-reduced-motion: reduce) {
  .board-card { transition: none; }
}

/* Group-by choice on the board-header pink. */
.board-group-current { background: var(--board-header); color: #44363b; border-color: var(--board-header); }

/* Card: plain mocha campaign name; things still to do as yellow dots. */
.board-card .board-card-title { background-color: transparent !important; border-color: transparent !important; color: #44363b !important; text-align: left; }
.board-card-pending { list-style: none; margin: var(--sp-1) 0 0; padding: 0; display: grid; gap: .15rem; font-size: var(--fs-xs); }
.board-card-pending li { display: flex; align-items: center; gap: .4rem; }
.board-pending-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #f2c230; }
.board-move-error { margin: var(--sp-1) 0 0; }

/* Board heading: smaller group-by buttons, centred on the headline. */
.board-page-head { align-items: center; }
.board-group-link { min-height: 30px; padding: 0 .65rem; font-size: .8rem; }
.board-group-label { font-size: .8rem; }
@media (pointer: coarse) { .board-group-link { min-height: 44px; } }
.board-group-link, .board-group-link:hover { color: var(--accent-text); }
.board-card-trader.avatar { width: 28px; height: 28px; border: 0; font-size: 12px; }
