/* ── Duty roster — the tasks/057 + tasks/058 redesign ─────────────────────
   Restored from 33ae7f10 (branch claude/hotelos-transport-pages-17e3e3). The
   design shipped on that branch, then merge f9ad6414 ("Merge origin/main into
   front-office-card-design") resolved the transport paths to the OTHER side and
   silently deleted the five picker partials, this stylesheet's ancestor, and the
   crew-picker Stimulus controller — reinstating the older tasks/029 "Edit crew"
   page. Nothing chose that; a merge did.

   Ported forward onto os-ds v1.3.0: the popover, option rows, entity chips and
   avatars are now GEM components (.os-pop / .os-opt / .os-chip--entity /
   .os-avatar) — the originals were written against the pre-burndown .dv-* names.
   What lives here is only the arena-side layout the gem does not own. */

/* One-row day/shift toolbar: toggle · date nav · shift · spacer · clock. The
   pre-redesign markup stacked these, which is what opened the gutter above the
   boat list. */
.hos-duty-toolbar { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.hos-duty-toolbar__nav { display: flex; align-items: center; gap: var(--space-2); }
.hos-duty-toolbar__date { min-width: 110px; text-align: center; font-weight: 600; color: var(--ink); font-size: var(--text-sm); }
.hos-duty-toolbar__spacer { flex: 1 1 auto; }

.hos-duty-banner {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm); font-weight: 600;
}
.hos-duty-banner--warn { background: var(--status-briefing-bg); color: var(--status-briefing-fg); }
.hos-duty-banner--ok { background: var(--status-confirmed-bg); color: var(--status-confirmed-fg); }

.hos-duty-body { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: var(--space-6); align-items: start; }
@media (max-width: 1100px) { .hos-duty-body { grid-template-columns: minmax(0, 1fr); } }
.hos-duty-boats { display: flex; flex-direction: column; gap: var(--space-2); }

/* Boat card. `overflow: visible` is load-bearing — the .os-pop picker is
   absolutely positioned inside the card and must escape it. */
.hos-dutycard {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-4) var(--space-4) var(--space-5);
  overflow: visible;
}
.hos-dutycard--down { opacity: 0.6; }
.hos-dutycard__ico { width: 36px; height: 36px; flex: none; }
.hos-dutycard__body { flex: 1; min-width: 0; }
.hos-dutycard__top { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.hos-dutycard__name { font-size: var(--text-sm); font-weight: 700; color: var(--ink); }
.hos-dutycard__seats { font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--muted); }
.hos-dutycard__crew {
  font-family: var(--font-mono); font-size: var(--text-2xs); font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted-2);
  margin-top: var(--space-2); display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap;
}

/* The status anchor bar (.hos-runanchor + tones) is shared with the Timeline
   Spine's run card and lives in components/transport_board.css — one colour
   vocabulary across both boards. */

/* One role-group (Captain | Crew): its label, its chips, its picker trigger. */
.hos-duty-group { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-3); }

/* Read-only skipper slot (non-dispatch viewers). */
.hos-skipslot {
  display: inline-flex; align-items: center; gap: var(--space-2);
  margin-top: var(--space-2); padding: 3px var(--space-3);
  border: 1px dashed var(--hairline-strong); border-radius: var(--radius-pill);
  background: var(--surface-alt); font-size: var(--text-xs); font-weight: 600; color: var(--muted);
}
.hos-skipslot svg { color: var(--muted-2); }
.hos-skipslot--set { border-style: solid; color: var(--ink); }
.hos-skipslot--set svg { color: var(--accent); }

/* Chips + "Add …" trigger on one wrapping line. __chips is display:contents so the
   chips are flex items of the guides row, not a nested box — that keeps the trigger
   flowing inline after the last chip instead of dropping to its own line. */
.hos-duty-guides { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.hos-duty-guides__chips { display: contents; }
.hos-duty-guides__empty { font-size: var(--text-xs); color: var(--muted-2); }

/* The gem's .os-pop sizes itself to its anchor (min-width: max(100%, 12rem)) and
   caps its own height, which stretches this picker to the card's full width and
   clips the Done foot once the list is long. Re-assert the design's intent at
   higher specificity: a fixed 320px shell that lets .os-pop__list own the scroll,
   so the foot stays visible. */
.hos-duty-guides .os-pop {
  width: 320px; min-width: 320px; max-width: min(320px, calc(100vw - 48px));
  max-height: none; overflow: visible;
}
.hos-duty-guides .hos-pop--up { top: auto; bottom: calc(100% + var(--space-2)); }

/* Crew rail — two cards on the gem's card anatomy (__head + __body). Rows are
   avatar · name · ONE right-aligned value; the role word lives in the card head,
   not on every line. */
.hos-crewrail { position: sticky; top: 84px; display: flex; flex-direction: column; gap: var(--space-4); }
@media (max-width: 1100px) { .hos-crewrail { position: static; } }
.hos-crewrail__body { display: flex; flex-direction: column; gap: var(--space-1); padding-top: var(--space-3); }
.hos-crewrail__row {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-2) 0; min-width: 0;
}
.hos-crewrail__row--off { opacity: 0.6; }
.hos-crewrail__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.hos-crewrail__nm { font-size: var(--text-sm); font-weight: 600; color: var(--ink); line-height: 1.2; }
/* Placement line. The boat is an attribute, so it reads as meta with a ship
   glyph — no badge. Free / On leave are states and carry a dot + colour. */
.hos-crewrail__val {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: var(--text-xs); line-height: 1.2; min-width: 0;
}
.hos-crewrail__val .os-dot { width: 6px; height: 6px; }
.hos-crewrail__val--on { color: var(--slate-700); font-weight: 600; }
.hos-crewrail__val--on svg { color: var(--muted-2); }
.hos-crewrail__val--free { color: var(--status-confirmed-fg); font-weight: 600; }
.hos-crewrail__val--free .os-dot { background: var(--status-confirmed-fg); }
.hos-crewrail__val--off { color: var(--muted-2); }
.hos-crewrail__val--off .os-dot { background: var(--hairline-strong); }

/* Jetty cash custody — same card anatomy, figures on a right-aligned column so
   the amounts stack column-true down the card. */
.hos-cashcard__body { display: flex; flex-direction: column; gap: var(--space-1); padding-top: var(--space-3); }
.hos-cashcard__row { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) 0; min-width: 0; }
.hos-cashcard__who {
  flex: 1 1 auto; min-width: 0;
  font-size: var(--text-sm); font-weight: 600; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hos-cashcard__amt { flex: none; min-width: 88px; text-align: right; }
