/* The Board and Add a job (board/board.js). Loaded after styles.css, so a rule here wins over the same rule there.
   Design replica (Oct 23, 2026): the page is the design's /board, drawn with the shared .ds-* pieces in styles.css
   (page header, toolbar, segmented tabs, split layout, record rows, detail card). This file holds only the Hub's own
   extras: "Saving…" on a row, More options, Open job's buttons, and Add a job. Colours only from the tokens in styles.css. */

/* ---------- the Hub's lines under the toolbar ("Updated…", the banners, the red lines) ---------- */
[data-screen="board"] > .under.board-under { margin-top: 0; }
[data-screen="board"] .board-under .fresh { color: var(--text-3); }
[data-screen="board"] .board-list .empty-line { margin: 8px 12px; }
[data-screen="board"] .board-list .empty-line .btn.link { margin-left: 6px; }

/* ---------- a row: the day in the square at its start (THU over 10/1, TODAY, LATE; the calendar alone with no date),
   a save on its way says so after the name; 811's pill under the line ---------- */
[data-screen="board"] .ds-record-row .ds-record-icon.dsq { width: 50px; min-width: 50px; height: 48px; padding: 0 4px; gap: 2px; cursor: inherit; }
[data-screen="board"] .ds-record-row .ds-record-icon.dsq:not(.none):not(.late):not(.today) { background: color-mix(in srgb, var(--accent) 13%, var(--surface)); color: var(--link); }
[data-screen="board"] .ds-record-row .dsq-t { font-size: .7rem; }
[data-screen="board"] .ds-record-row .dsq-b { font-size: 1.05rem; }
[data-screen="board"] .ds-record-row.is-saving .row-name::after { content: " · Saving…"; color: var(--text-3); font-weight: 400; }
[data-screen="board"] .ds-record-row.is-failed .row-name::after { content: " · Didn't save"; color: var(--rt-bad); font-weight: 400; }
[data-screen="board"] .ds-record-row[hidden] { display: none; }
[data-screen="board"] .ds-record-row > span:nth-child(2) { min-width: 0; }
[data-screen="board"] .ds-record-row .pill[data-dig] { max-width: 220px; white-space: normal; }

/* ---------- More options: the design's ⋯, opening a small menu under it ---------- */
.board-more { position: relative; }
.board-menu { left: auto; right: 0; z-index: 30; background: var(--surface); display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--border-strong); border-radius: 14px; box-shadow: var(--sh-float); }
.board-menu:not([hidden]) { animation: cr-reveal var(--motion-fast) var(--ease-out); }
.board-menu button, .board-menu a { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 0 12px; border: 0; border-radius: 10px;
  background: none; color: var(--text); font: 600 .9375rem/1.2 var(--rt-body); text-decoration: none; cursor: pointer; }
.board-menu a:hover, .board-menu a:focus-visible { background: var(--surface-2); }
.board-menu .ic { width: 18px; height: 18px; color: var(--text-3); }
.board-menu .jb-del, .board-menu .jb-del .ic { color: var(--rt-bad); }

/* ---------- Open job: the job's own buttons under Open job / Edit details ---------- */
.board-job { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.board-job .ds-button-row { margin-top: 0; }
.board-job .jb-trees { margin: 0; font-size: .9375rem; font-weight: 600; color: var(--text); }
.jb-icons { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.jb-icons .crew-line { display: contents; }
.jb-icons .btn.small.crew-btn { min-height: 44px; padding: 0 14px; border: 0; border-radius: var(--r-pill); background: var(--surface-2); color: var(--text); font: 600 .875rem/1 var(--rt-body); }
.jb-icons .btn.small.crew-btn .ic { width: 18px; height: 18px; }
.jb-icons .crew-btn .av.sm { width: 1.375rem; height: 1.375rem; font-size: .75rem; }
.jb-more { margin: 0 -4px; }
.jb-more .kv.jb-facts { margin: 0; }
/* Details: one fact a line, the name on the left, the fact on the right, a thin line between (as the design's detail list). */
.board-job .kv.jb-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 12px; }
.board-job .kv.jb-facts > dt, .board-job .kv.jb-facts > dd { margin: 0; padding: 10px 0; border-top: 1px solid var(--border); }
.board-job .kv.jb-facts > dt { color: var(--text-3); }
.board-job .kv.jb-facts > dd { font-weight: 600; text-align: right; overflow-wrap: anywhere; }
/* The job's notes: the design's note, one paragraph each (its notes, then the crew's). */
[data-screen="board"] .ds-note p + p { margin-top: 6px; }

/* ---------- Add a job (a sheet from the sidebar or the + on any screen): its preview is a Board row ---------- */
.dsq .dsq-ic { display: none; }
.add-sheet .sheet-title { font: 800 1.5rem/1.1 var(--rt-cond); letter-spacing: -.03em; text-transform: none; }
.add-pv-h { font: 700 .6875rem/1.3 var(--rt-body); letter-spacing: .1em; color: var(--link); }
.add-sheet .add-foot .btn.cta { font: 700 1.0625rem/1 var(--rt-body); letter-spacing: 0; text-transform: none; }

/* ---------- Arrival: the time, or the window, in the date sheet and Add a job (docs/design-data.md) ---------- */
.arrive-pair { display: flex; align-items: center; gap: 10px; }
.arrive-pair input[type="time"] { flex: 1 1 0; min-width: 0; }
.arrive-pair input[type="time"]:disabled { opacity: .5; }
.arrive-to { color: var(--text-3); font-size: .875rem; }
