/* ops area styles: schedule, jobs, customers, crews, the crew phone app. Owned by the ops agent.
   Builds on base.css (DESIGN.md): the tokens, the job ticket (ui.js ticket()), status chips, segmented controls, tabs,
   sheets, .action-bar and .btn-crew / .btn-hivis. Only what is particular to the ops screens lives here: how tickets sit
   on the board, the tray, the week grid and the crew's phone; nothing here restyles a foundation piece's look. */
.ops-wide { max-width: 1440px; }
.ops-small { font-size: var(--fs-15); }
.ops-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ops-dot { width: 10px; height: 10px; }
.ops-nobody { display: inline-flex; align-items: flex-start; gap: 6px; color: var(--warn); font-weight: 600; }
.ops-nobody svg { flex: none; margin-top: 1px; color: var(--warn); }
.ops-prose { margin: 0 0 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ops-prose:last-child { margin-bottom: 0; }
.ops-callout-list { margin: 6px 0 0; padding-left: 20px; }
.ops-callout-list li + li { margin-top: 4px; }
.callout .ops-small { margin: 6px 0 0; }
.ops-lede { margin: -4px 0 16px; }
/* Facts that sit side by side ("970-555-0148", "karen@…"): spaced apart, never joined with a dot. */
.ops-meta { display: flex; flex-wrap: wrap; gap: 0 14px; min-width: 0; }
.ops-meta > span { overflow-wrap: anywhere; }
.ops-details { margin-top: 12px; }
.ops-details > summary { display: flex; align-items: center; gap: 6px; min-height: 44px; cursor: pointer; font-weight: 600; color: var(--ink-2); list-style: none; }
.ops-details > summary::-webkit-details-marker { display: none; }
.ops-details > summary svg { transition: transform .15s; }
.ops-details:not([open]) > summary svg { transform: rotate(-90deg); }
.ops-details[open] > summary { margin-bottom: 8px; }
.ops-section { margin: 24px 0; }
.ops-section-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ops-section-head h2, .ops-section-head h3 { margin: 0; }
/* A page's parts as white panels with a heading (photos, timeline, quotes and invoices, a customer's jobs). */
.ops-panel { margin: 0; }
.ops-panel > .card-head h2 { display: flex; align-items: center; gap: 8px; font-size: var(--fs-18); }
.ops-panel .ticket { --notch-bg: var(--surface); }
.ops-facts { margin-bottom: 16px; }
.ops-facts a { display: inline-block; padding: 3px 0; }
.ops-more { display: flex; justify-content: center; padding: 16px 0; }
.ops-more:empty { display: none; }
.ops-toolbar { align-items: center; gap: 12px; }
.ops-search { flex: 1 1 320px; }
.ops-inline-check { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; cursor: pointer; }
.ops-inline-check input { width: 22px; height: 22px; accent-color: var(--blue); }
.ops-filter { margin-bottom: 16px; }
.ops-who-sees { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 10px 0 0; color: var(--ink-2); font-size: var(--fs-13); }
.ops-who-sees svg { flex: none; }
.ops-who-sees .ops-tap-link { font-weight: 600; }

/* A ticket for a job that ended without ever having a time: the word (Done, Cancelled) on its stub, not "Needs a time". */
.ops-tk-word .ticket-time { font-family: var(--font-body); font-size: var(--fs-18); }

/* Access and site notes, one line each with an icon (a gate code, a dog, parking). */
.ops-access-list { list-style: none; margin: 0; padding: 0; }
.ops-access-list li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line); line-height: 1.35; overflow-wrap: anywhere; }
.ops-access-list li:first-child { border-top: 0; padding-top: 2px; }
.ops-access-list svg { flex: none; color: var(--ink-2); }
/* Instructions for the crew beside the office's own notes. */
.ops-notes-pair { display: grid; gap: 16px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.ops-notes-pair h3, .ops-access h3 { margin: 0 0 8px; font-size: var(--fs-16); }
.ops-access { margin: 16px 0 0; padding-top: 16px; border-top: 1px solid var(--line); }
.ops-notes-pair .ops-access { margin: 0; padding: 0; border: 0; }
.ops-office { padding: 12px 14px; border-radius: var(--radius-control); background: var(--surface-sunk); }
@media (min-width: 640px) { .ops-notes-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Forms */
.ops-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ops-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ops-grid-3 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.ops-fieldset { display: grid; gap: 16px; padding-top: 4px; border-top: 1px solid var(--line); }
.ops-fieldset > legend { float: left; width: 100%; margin: 16px 0 0; font-size: var(--fs-18); font-weight: 700; }
.ops-fieldset > legend + * { clear: both; }
.ops-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ops-chips-label { margin-right: 4px; color: var(--ink-2); font-size: var(--fs-15); font-weight: 600; }
.ops-checks { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); margin-top: 6px; }
/* A person (or a choice) as a card with its checkbox, like base .choice. */
.ops-check, .field .ops-check { display: flex; margin: 0; font-weight: 500; gap: 12px; align-items: center; min-height: 52px; padding: 8px 12px; border: 1px solid var(--line-firm);
  border-radius: var(--radius-control); background: var(--surface); cursor: pointer; transition: border-color .12s, background-color .12s; }
.ops-check:hover { border-color: var(--line-control); }
.ops-check input { width: 22px; height: 22px; flex: none; margin: 0; accent-color: var(--blue); }
.ops-check:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); box-shadow: inset 0 0 0 1px var(--blue); }
.ops-check:has(input:focus-visible) { outline: 3px solid var(--blue); outline-offset: 2px; }
.ops-check-text { display: grid; min-width: 0; line-height: 1.3; }
.ops-check-name { font-weight: 600; overflow-wrap: anywhere; }
.ops-check-sub { color: var(--ink-2); font-size: var(--fs-15); overflow-wrap: anywhere; }
.ops-booking { display: grid; gap: 16px; }
.ops-past:empty { display: none; }
.ops-past .callout { margin: 0; }
.ops-swatches { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.ops-swatch, .field .ops-swatch { position: relative; display: inline-flex; margin: 0; cursor: pointer; }
.ops-swatch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.ops-swatch-chip { width: 44px; height: 44px; border-radius: 50%; background: var(--swatch); box-shadow: inset 0 0 0 1px rgba(27, 36, 32, .15); }
.ops-swatch input:checked + .ops-swatch-chip { box-shadow: 0 0 0 3px var(--surface), 0 0 0 6px var(--ink); }
.ops-swatch input:focus-visible + .ops-swatch-chip { outline: 3px solid var(--blue); outline-offset: 5px; }
.ops-note-form { margin-bottom: 16px; }

/* Customer picker (new job) */
.ops-picker-label { margin: 0 0 6px; font-weight: 600; font-size: var(--fs-15); }
.ops-picked { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--blue-line); border-radius: var(--radius-control); background: var(--blue-soft); }
.ops-picked-text { flex: 1 1 auto; min-width: 0; }
.ops-picked-text p { margin: 2px 0 0; color: var(--ink-2); font-size: var(--fs-15); }
.ops-picker-results { list-style: none; margin: 6px 0 0; padding: 0; max-height: 300px; overflow: auto; border: 1px solid var(--line-firm); border-radius: var(--radius-control); background: var(--surface); }
.ops-picker-results:empty { display: none; }
.ops-picker-results > li.muted, .ops-picker-results .loading { padding: 10px 12px; justify-content: flex-start; }
.ops-picker-item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; min-height: 52px; padding: 8px 12px; border: 0;
  border-bottom: 1px solid var(--line); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.ops-picker-item .ops-meta { color: var(--ink-2); font-size: var(--fs-15); }
.ops-picker-results li:last-child .ops-picker-item { border-bottom: 0; }
.ops-picker-item:hover, .ops-picker-item:focus-visible { background: var(--blue-soft); outline: none; }
.ops-picker-new { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }

/* Dialogs (a sheet from the bottom on phones: base .dialog) */
.dialog.ops-dialog { width: min(94vw, 580px); }
.dialog.ops-dialog.dialog-wide { width: min(94vw, 880px); }
.ops-dialog .dialog-head { margin-bottom: 12px; }
.ops-dialog-job { display: grid; gap: 2px; padding: 10px 12px; border-left: 4px solid var(--warn); border-radius: var(--radius-control); background: var(--surface-sunk); }
.ops-dialog-job p { margin: 0; }
.ops-dialog-job-title { font-weight: 700; font-size: var(--fs-16); overflow-wrap: anywhere; }
.ops-dialog-job-sub { color: var(--ink-2); font-size: var(--fs-15); }
.ops-dialog-link { justify-self: start; font-weight: 600; }
.ops-viewer img { display: block; max-width: 100%; max-height: 68vh; margin: 0 auto 12px; border-radius: var(--radius-control); background: var(--surface-press); }
.ops-viewer .ops-refused-why { color: var(--danger); font-weight: 600; }
@media (max-width: 559px) { .dialog.ops-dialog, .dialog.ops-dialog.dialog-wide { width: 100%; } }

/* ---------- Schedule ---------- */
.ops-day-nav { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; margin-bottom: 12px; }
.ops-day-title { display: flex; align-items: center; gap: 4px; min-width: 0; }
.ops-day-label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; margin: 0; padding: 0 8px; font-size: var(--fs-22); }
.ops-today-word { color: var(--blue); font-size: var(--fs-15); font-weight: 600; letter-spacing: 0; }
.ops-step svg { width: 22px; height: 22px; }
.ops-day-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ops-date { min-height: 44px; padding: 0 10px; border: 1px solid var(--line-control); border-radius: var(--radius-control); background: var(--surface); color: var(--ink); font: inherit; }
.ops-date:focus { outline: none; border-color: var(--blue); box-shadow: var(--ring); }
.ops-views { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.ops-schedule { display: grid; gap: 24px; align-items: start; }
.ops-board { min-width: 0; }
.ops-board-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; margin: 0 0 12px; color: var(--ink-2); font-size: var(--fs-15); }
.ops-clocks, .ops-to-tray-wrap { display: inline-flex; align-items: center; gap: 6px; }
.ops-to-tray-wrap { color: var(--warn); }
.ops-to-tray-wrap svg, .ops-clocks svg { flex: none; }
.ops-to-tray { color: var(--warn); }
/* Day board: a column per crew (or "Booked to people"), its tickets in time order. */
.ops-columns { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 1fr); gap: 20px; overflow-x: auto; padding-bottom: 6px; }
.ops-col { min-width: 0; }
.ops-col-head, .ops-lane-head { margin-bottom: 12px; padding-bottom: 10px; border-bottom: 3px solid var(--crew, var(--line-firm)); }
.ops-col-head h3, .ops-lane-head h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; font-size: var(--fs-18); }
.ops-col-icon { flex: none; color: var(--ink-2); }
.ops-col-sub { margin: 2px 0 0; color: var(--ink-2); font-size: var(--fs-15); overflow-wrap: anywhere; }
.ops-count { flex: none; }
.ops-cards { gap: 10px; }
.ops-free { margin: 0; padding: 16px 12px; border: 1px dashed var(--line-firm); border-radius: var(--radius-ticket); color: var(--ink-2); text-align: center; }
/* A ticket and its own button: the ticket is one link to the job; the button sits on top of its corner. */
.ops-slot { position: relative; min-width: 0; }
.ops-slot > .ticket { height: 100%; }
.ops-change { position: absolute; z-index: 2; top: 6px; right: 6px; color: var(--ink-2); }
.ops-slot-change > .ticket .ticket-body { padding-right: 52px; }
.ops-board-ticket .ticket-line svg { color: var(--ink-3); }
.ops-repeat-mark svg { width: 14px; height: 14px; }
.ops-people-board { display: grid; gap: 24px; }
.ops-lane .ops-cards { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
/* The tray: jobs that still need a time. Docked beside the day board on a wide screen. */
.ops-tray { padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-ticket); }
.ops-tray .ticket { --notch-bg: var(--surface); }
.ops-tray-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.ops-tray-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: var(--fs-18); }
.ops-tray .count-warn { background: var(--warn-soft); color: var(--warn); }
.ops-tray-lede { margin: 6px 0 14px; color: var(--ink-2); font-size: var(--fs-15); }
.ops-tray-list { gap: 10px; }
.ops-tray-item { min-height: 44px; }
.ops-tray .ops-tray-all { display: none; }
/* Phones: the first 3 waiting jobs and "Show all N", so a long import does not push the day off the screen (final polish).
   Wider screens show every job and no button. */
@media (max-width: 720px) {
  .ops-tray-short:not(.is-open) > .ops-tray-more { display: none; }
  .ops-tray .ops-tray-all { display: flex; width: 100%; margin-top: 10px; }
  .ops-tray-first.ops-tray-long:not(.ops-schedule-week) > .ops-board { order: -1; } /* the (empty) day first, the tray right under it */
}
.ops-slot-book > .ticket .ticket-body { padding-bottom: 64px; }
.ops-book { position: absolute; z-index: 2; left: calc(104px + 16px); right: 12px; bottom: 12px; }
.ops-wanted { color: var(--warn); font-weight: 600; }
.ops-notice { margin-bottom: 16px; }
.ops-notice:empty { display: none; }
.ops-booked .callout > div { flex: 1; }
.ops-booked .callout p + p, .ops-booked .callout p + div { margin-top: 8px; }
.ops-booked-ask { font-weight: 700; }
.ops-booked-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ops-booked-text { color: var(--ink-2); overflow-wrap: anywhere; }
.ops-booked-close { margin-top: 6px; }
@media (min-width: 1200px) {
  .ops-schedule:not(.ops-schedule-week) { grid-template-columns: minmax(0, 1fr) 300px; }
  .ops-schedule:not(.ops-schedule-week) > .ops-tray { position: sticky; top: 16px; }
  .ops-tray-first:not(.ops-schedule-week) > .ops-tray { order: 2; }
}
@media (min-width: 1640px) {
  .ops-schedule-week { grid-template-columns: minmax(0, 1fr) 300px; }
  .ops-schedule-week > .ops-tray { position: sticky; top: 16px; }
  .ops-tray-first.ops-schedule-week > .ops-tray { order: 2; }
}
/* Docked beside the board, a long tray scrolls inside itself, so the board stays on screen to drag a waiting job onto. */
@media (min-width: 1200px) { .ops-schedule:not(.ops-schedule-week) > .ops-tray { max-height: calc(100vh - 32px); overflow-y: auto; overscroll-behavior: contain; } }
@media (min-width: 1640px) { .ops-schedule-week > .ops-tray { max-height: calc(100vh - 32px); overflow-y: auto; overscroll-behavior: contain; } }
/* Below the board (not docked): the waiting tickets side by side. */
@media (min-width: 721px) and (max-width: 1199px) { .ops-tray-list { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); } }
@media (min-width: 1200px) and (max-width: 1639px) { .ops-schedule-week .ops-tray-list { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); } }

/* Day board, wider than a phone: a column per crew (or person) and a row per hour, the same rows across the board
   (subgrid), the hours down the left. A ticket dragged onto an hour lands on the quarter hour under the pointer. */
@media (min-width: 721px) {
  .ops-day-grid { grid-template-columns: 56px; grid-auto-columns: minmax(280px, 1fr); grid-template-rows: auto repeat(var(--rows), minmax(56px, auto)); column-gap: 16px; row-gap: 0; }
  .ops-day-grid > .ops-col, .ops-day-grid > .ops-gutter { display: grid; grid-row: 1 / -1; grid-template-rows: subgrid; }
  .ops-day-grid .ops-col-head { margin-bottom: 0; }
  .ops-day-grid .ops-free { display: none; }
  .ops-gutter { position: sticky; left: 0; z-index: 3; background: var(--ground); }
  .ops-gutter-hour { padding: 4px 4px 0 0; border-top: 1px solid var(--line); color: var(--ink-2); font-family: var(--font-num); font-size: var(--fs-13); font-weight: 600;
    font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
  .ops-hour { position: relative; min-width: 0; padding: 6px 0; border-top: 1px solid var(--line); }
}
/* Phones: only the hours with work, so a column reads as a list in time order (as before). */
@media (max-width: 720px) {
  .ops-gutter { display: none; }
  .ops-day-grid > .ops-col { display: grid; gap: 10px; align-content: start; }
  .ops-day-grid .ops-col-head { margin-bottom: 2px; }
  .ops-hour:empty { display: none; }
}

/* Moving a job: a drag (desktop), the Move button and sheet, Undo. Only the dragged ticket floats (one shadow). */
.ops-move { position: absolute; z-index: 2; right: 6px; bottom: 6px; padding: 0 8px; font-size: var(--fs-13); }
@media (min-width: 721px) and (pointer: fine) {
  .ops-move { opacity: 0; }
  .ops-slot:hover > .ops-move, .ops-slot:focus-within > .ops-move { opacity: 1; }
}
@media (max-width: 720px), (pointer: coarse) { .ops-slot-move > .ticket { min-height: 104px; } }
[data-move-id] { -webkit-touch-callout: none; }
[data-move-id] a, a[data-move-id], [data-move-id].ticket { -webkit-user-drag: none; }
[data-move-id].is-dragging { opacity: .4; }
[data-move-id].is-moving { opacity: .6; pointer-events: none; }
body.ops-dragging, body.ops-dragging * { cursor: grabbing !important; -webkit-user-select: none; user-select: none; }
.ops-ghost { position: fixed; left: 0; top: 0; z-index: 80; display: grid; gap: 6px; pointer-events: none; }
.ops-ghost > .ticket { border-color: var(--blue); box-shadow: var(--shadow-float); }
.ops-ghost-where { justify-self: start; white-space: nowrap; padding: 4px 10px; border-radius: var(--radius-full); background: var(--ink); color: #fff; font-size: var(--fs-15); font-weight: 600; }
.ops-ghost-where[hidden] { display: none; }
.ops-ghost.is-above > .ops-ghost-where { order: 1; } /* above the pointer: the words stay next to it */
.ops-ghost .ops-week-card .ticket-window { display: none; } /* as on the week board; the words say until when */
.ops-slot.is-dragging > .ops-move, .ops-slot.is-dragging > .ops-change { visibility: hidden; } /* the faded place it came from */
.ops-hour.is-drop-target, .ops-tray.is-drop-target { background: var(--blue-soft); box-shadow: inset 0 0 0 2px var(--blue); border-radius: var(--radius-control); }
.ops-week-table td.is-drop-target { --cell: var(--blue-soft); box-shadow: inset 0 0 0 2px var(--blue); }
.ops-drop-band { position: absolute; z-index: 1; left: 0; right: 0; height: 25%; min-height: 20px; display: flex; align-items: flex-start; padding: 0 6px;
  border-top: 2px solid var(--blue); background: rgba(31, 72, 196, .12); pointer-events: none; }
.ops-drop-time { margin-top: -1px; padding: 1px 8px 2px; border-radius: 0 0 var(--radius-control) var(--radius-control); background: var(--blue); color: var(--blue-ink);
  font-family: var(--font-num); font-size: var(--fs-13); font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.3; white-space: nowrap; }
/* The one motion: a ticket settling into place where it was put. None with reduced motion. */
@keyframes ops-settle { from { transform: translateY(-6px) scale(1.02); box-shadow: var(--shadow-float); } to { transform: none; box-shadow: 0 0 #0000; } }
.ops-settle { animation: ops-settle .3s cubic-bezier(.2, .8, .3, 1); }
@media (prefers-reduced-motion: reduce) { .ops-settle { animation: none; } }
.ops-move-sheet { display: grid; gap: 4px; }
.ops-move-ask p { margin: 0 0 8px; }
.ops-move-ask-actions { flex-wrap: wrap; justify-content: flex-end; margin-top: 20px; } /* as every dialog's buttons */
@media (max-width: 559px) { .ops-move-ask-actions { flex-direction: column-reverse; align-items: stretch; } }
.ops-move-toast { align-items: center; }
.ops-move-toast > span:first-child { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ops-move-toast-actions { display: flex; flex: none; gap: 8px; }
.ops-move-notices:empty { display: none; }
.ops-move-notices { position: relative; z-index: 1; margin: 0 0 12px; }
.ops-move-notices .ops-move-toast { width: 100%; min-height: 52px; align-items: center; }
.ops-move-notices .ops-move-toast-actions .btn { min-height: 44px; }
@media (max-width: 420px) {
  .ops-move-notices .ops-move-toast { flex-direction: column; align-items: stretch; }
  .ops-move-toast-actions { flex-wrap: wrap; }
}

/* Week: a row per crew (or person) and a column per day; small tickets in the cells. On phones a list of days. */
.ops-week-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-ticket); background: var(--surface); }
.ops-week-table { width: 100%; min-width: 860px; table-layout: fixed; border-collapse: collapse; }
.ops-week-table th, .ops-week-table td { --cell: var(--surface); padding: 4px; vertical-align: top; text-align: left; background: var(--cell); border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
.ops-week-table thead th { border-top: 0; }
.ops-week-table tr > :first-child { border-left: 0; }
.ops-week-table .ops-week-today { --cell: #F4F6FD; }
.ops-week-table .ticket { --notch-bg: var(--cell); }
.ops-week-corner { width: 100px; }
.ops-week-row { padding: 10px 8px 10px 12px !important; }
.ops-week-row-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 700; overflow-wrap: anywhere; }
.ops-week-row .ops-col-sub { display: block; margin-top: 4px; font-size: var(--fs-13); font-weight: 500; }
.ops-week-row { box-shadow: inset 4px 0 0 var(--crew, transparent); }
.ops-week-day { display: grid; gap: 0; min-height: 44px; padding: 4px 6px; border-radius: var(--radius-control); color: var(--ink); text-decoration: none; }
.ops-week-day:hover { background: var(--surface-sunk); color: var(--ink); }
.ops-week-dow { color: var(--ink-2); font-size: var(--fs-13); font-weight: 600; }
.ops-week-date { font-family: var(--font-num); font-size: var(--fs-22); font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
thead .ops-week-today .ops-week-day { box-shadow: inset 0 -3px 0 var(--blue); border-radius: var(--radius-control) var(--radius-control) 0 0; }
thead .ops-week-today .ops-week-dow, thead .ops-week-today .ops-week-date { color: var(--blue); }
.ops-week-cards { display: grid; gap: 6px; }
/* The week's ticket: a narrow stub (the time over AM/PM; the whole window is in its name) and the customer and work. */
.ops-week-card { --stub-w: 42px; min-height: 44px; }
.ops-week-card .ticket-stub { gap: 0; padding: 8px 2px 8px 6px; }
.ops-week-card .ticket-time { flex-wrap: wrap; row-gap: 0; font-size: 15px; }
.ops-week-card .ticket-mer { width: 100%; font-size: 10px; }
.ops-week-table .ops-week-card .ticket-window { display: none; }
.ops-week-card .ticket-body { gap: 1px; padding: 6px 7px 6px 9px; align-content: start; }
.ops-week-card .ticket-body > * { min-width: 0; }
.ops-week-card .ticket-title { font-size: var(--fs-13); line-height: 1.2; }
.ops-week-card .ticket-line { gap: 4px; font-size: 12px; line-height: 1.25; }
.ops-week-card .ticket-title, .ops-week-card .ticket-line { overflow-wrap: break-word; word-break: normal; }
.ops-week-card .ticket-line svg { width: 13px; height: 13px; }
.ops-week-card .ticket-badges { gap: 3px; margin-top: 3px; }
.ops-week-card .status, .ops-week-card .badge { padding: 0 5px 0 3px; font-size: 11px; }
.ops-week-card.ops-tk-word .ticket-time { font-size: 11px; }
/* In the grid's narrow cells the status chip shows its icon with the stub's colour; its word stays in the ticket's name. */
.ops-week-table .ops-week-card .status { gap: 0; padding: 3px 5px; font-size: 0; line-height: 0; }
.ops-week-agenda { display: none; list-style: none; margin: 0; padding: 0; }
.ops-agenda-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 8px; font-size: var(--fs-18); }
.ops-agenda-head a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); text-decoration: none; }
.ops-agenda-head a:hover { text-decoration: underline; }
.ops-agenda-free { margin: 0; padding: 14px 12px; border: 1px dashed var(--line-firm); border-radius: var(--radius-ticket); color: var(--ink-2); text-align: center; }
.ops-agenda-day .ops-week-card { --stub-w: 96px; min-height: 64px; }
.ops-agenda-day .ops-week-card .ticket-stub { gap: 3px; padding: 10px 6px 10px 12px; }
.ops-agenda-day .ops-week-card .ticket-body { padding: 10px 12px 10px 16px; gap: 2px; align-content: center; }
.ops-agenda-day .ops-week-card .ticket-time { font-size: var(--fs-22); }
.ops-agenda-day .ops-week-card .ticket-mer { width: auto; font-size: var(--fs-13); }
.ops-agenda-day .ops-week-card .ticket-title { font-size: var(--fs-16); }
.ops-agenda-day .ops-week-card .ticket-line { font-size: var(--fs-15); }

/* ---------- Jobs list and the job page ---------- */
.ops-job-list { gap: 10px; }
.ops-chip-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; color: var(--ink-2); }
.ops-chip-row:empty { display: none; }
/* The job page's header is the job's ticket, with the actions beside it. */
.ops-job-head { align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.ops-job-head > .ticket { flex: 1 1 560px; }
.ops-job-titles { display: grid; gap: 2px; }
.ops-job-number { color: var(--ink-2); font-size: var(--fs-15); font-weight: 500; }
.ops-job-titles h1 { margin: 0; font-size: var(--fs-28); }
.ops-job-ticket .ticket-body { padding-top: 16px; padding-bottom: 16px; gap: 6px; }
.ops-head-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; color: var(--ink-2); font-size: var(--fs-16); }
.ops-head-sub > a { font-weight: 600; }
.ops-head-when { font-size: var(--fs-15); }
.ops-job-head .page-actions { flex: 0 1 auto; padding-top: 4px; }
.ops-two { display: grid; gap: 16px; }
.ops-two > div { display: grid; gap: 16px; align-content: start; min-width: 0; }
.ops-two .card { margin: 0; }
@media (min-width: 1100px) { .ops-two { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 20px; } .ops-two > div { gap: 20px; } }
/* One column (phones, narrow windows): the panels in one list, with Time and crew (and its booking buttons) first. */
@media (max-width: 1099px) { .ops-two > div { display: contents; } .ops-two > div > .ops-when { order: -1; } }
.ops-job-details > h2, .ops-contact > h2 { margin: 0 0 14px; font-size: var(--fs-18); }
/* Time and crew */
.ops-when-main { display: grid; gap: 10px; }
.ops-when-main p { margin: 0; }
.ops-when-time { display: flex; gap: 8px; align-items: flex-start; font-size: var(--fs-18); font-weight: 700; }
.ops-when-time svg, .ops-when-crew > svg { flex: none; margin-top: 2px; color: var(--ink-2); }
.ops-when-crew { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ops-people-list { list-style: none; display: grid; gap: 8px; margin: 2px 0 0; padding: 0; }
.ops-people-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.ops-people-note { color: var(--ink-2); font-size: var(--fs-13); }
.ops-when-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.ops-series { display: grid; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.ops-series .ops-when-actions { margin-top: 6px; }
.ops-series-title { display: flex; align-items: center; gap: 8px; }
.ops-series-title svg { flex: none; color: var(--ink-2); }
.ops-series-next { color: var(--ink-2); font-size: var(--fs-15); }
.ops-repeat { display: grid; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--surface-sunk); }
.ops-repeat-preview { margin: 0; color: var(--ink-2); font-size: var(--fs-15); }
.ops-repeat-preview:empty { display: none; }
.ops-repeat-ends { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.ops-checks-2 { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.ops-check input[type=radio] { width: 22px; height: 22px; flex: none; margin: 0; accent-color: var(--blue); }
/* Quotes and invoices on a job or customer (the office sees money; the crew never get here). */
.ops-money { display: grid; gap: 18px; }
.ops-money-block .ops-section-head { margin-bottom: 4px; }
.ops-money-block h3 { font-size: var(--fs-16); }
.ops-money-rows .row { padding-left: 0; padding-right: 0; min-height: 56px; }
.ops-money-rows a.row:hover { background: none; }
.ops-money-rows a.row:hover .row-title { color: var(--blue); text-decoration: underline; }
.ops-money-end { flex-direction: column; align-items: flex-end; gap: 4px; }
.ops-money-end .money { font-size: var(--fs-18); }
/* Timeline: when on the left, what happened on the right. */
.ops-timeline { list-style: none; margin: 0; padding: 0; }
.ops-timeline li { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.ops-timeline li:first-child { border-top: 0; }
.ops-timeline p { margin: 0; overflow-wrap: anywhere; }
.ops-tl-when { display: grid; align-content: start; font-family: var(--font-num); font-size: var(--fs-15); font-weight: 600; line-height: 1.3; font-variant-numeric: tabular-nums; }
.ops-tl-when span + span { color: var(--ink-2); }
.ops-tl-what { display: grid; gap: 2px; min-width: 0; }
.ops-tl-note { color: var(--ink); }
.ops-tl-who { color: var(--ink-2); font-size: var(--fs-15); }
.ops-tl-waiting { display: flex; align-items: center; gap: 6px; color: var(--warn); font-size: var(--fs-15); font-weight: 600; }
.ops-timeline li.ops-note-waiting { margin: 2px -10px; padding: 10px; border-top-color: transparent; border-radius: var(--radius-control); background: var(--warn-soft); }

/* ---------- Photos ---------- */
.ops-upload { display: grid; gap: 12px; margin-bottom: 14px; }
.ops-kind { min-width: 0; }
.ops-upload-label { margin: 0; font-weight: 600; }
.ops-upload-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.ops-file-btn { position: relative; }
.ops-file-btn:focus-within { outline: 3px solid var(--blue); outline-offset: 2px; }
.ops-file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }
.ops-upload-status { display: flex; gap: 8px; align-items: center; color: var(--ink-2); }
.ops-upload-status:empty { display: none; }
.ops-storage { margin: 12px 0 0; }
.ops-storage-high { color: var(--warn); font-weight: 600; }
.ops-photo-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; margin: 0; padding: 0; }
.ops-photo { position: relative; display: block; width: 100%; aspect-ratio: 1; padding: 0; border: 0; border-radius: var(--radius-control); overflow: hidden; background: var(--surface-press); cursor: zoom-in; }
.ops-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ops-photo:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.ops-photo-kind { position: absolute; left: 6px; bottom: 6px; padding: 1px 8px; border-radius: var(--radius-full); background: var(--ink); color: #fff; font-size: var(--fs-13); font-weight: 600; }
.ops-kind-after { background: var(--done); } .ops-kind-before { background: var(--ink); }
.ops-photo-waiting { margin: 0 0 8px; color: var(--warn); font-weight: 600; }
.ops-photo-waiting:empty { display: none; }
.ops-photo-wait { position: absolute; right: 6px; top: 6px; padding: 1px 8px; border-radius: var(--radius-full); background: var(--warn-soft); color: var(--warn); font-size: var(--fs-13); font-weight: 700; }
.ops-photo-queued { outline: 2px dashed var(--warn); outline-offset: -2px; }
.ops-photo-refused { outline: 2px solid var(--danger); outline-offset: -2px; }
.ops-photo-refused .ops-photo-wait { background: var(--danger-soft); color: var(--danger); }
.ops-relabel-wrap { display: grid; gap: 6px; margin: 4px 0 12px; }
.ops-relabel { display: flex; flex-wrap: wrap; gap: 6px; }
.ops-relabel .ops-kind-btn { min-height: 44px; min-width: 88px; }
.ops-kind-btn[aria-pressed="true"] { border-color: var(--blue); background: var(--blue); color: var(--blue-ink); }

/* ---------- Customers ---------- */
.ops-customer-list { gap: 8px; }
.ops-customer-row .row-title { font-size: var(--fs-16); }
.ops-row-place { display: flex; align-items: flex-start; gap: 6px; }
.ops-row-place svg { flex: none; margin-top: 2px; color: var(--ink-3); }
.ops-person-head { align-items: center; }
.ops-person { display: flex; align-items: center; gap: 14px; min-width: 0; }
.ops-person h1 { margin: 0; }
.ops-person .lede { margin-top: 2px; }
.ops-contact { margin-bottom: 16px; }
.ops-detail > .ops-panel { margin-bottom: 16px; }
.ops-detail > .callout { margin-bottom: 16px; }

/* ---------- Crews ---------- */
.ops-crew-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.ops-crew { margin: 0; }
.ops-crew-archived { background: var(--surface-sunk); }
.ops-crew-head { display: flex; align-items: center; gap: 12px; }
.ops-crew-mark { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; border-radius: var(--radius-control); background: var(--crew, var(--ink-2)); color: #fff; }
.ops-crew-names { min-width: 0; }
.ops-crew-names h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; font-size: var(--fs-18); }
.ops-crew-upcoming { margin: 2px 0 0; color: var(--ink-2); font-size: var(--fs-15); }
.ops-members { list-style: none; display: grid; gap: 8px; margin: 16px 0; padding: 0; }
.ops-members li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.ops-member-off { color: var(--ink-2); }
.ops-member-note { color: var(--warn); font-size: var(--fs-13); font-weight: 600; }
.ops-crew .ops-nobody { margin: 16px 0; }
.ops-crew-new { margin-bottom: 16px; }

/* ---------- Crew phone app ---------- */
.ops-crew-app { max-width: 640px; }
.ops-crew-head { margin-bottom: 12px; }
.ops-crew-lede { margin: 0; color: var(--ink-2); font-size: var(--fs-16); font-weight: 500; }
.ops-crew-top { display: grid; gap: 8px; margin: 0 0 8px; }
.ops-crew-top:empty { display: none; }
/* "Updated 2:14 PM  Refresh" quietly; without signal a banner that says so, in words and with an icon. */
.ops-fresh { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; justify-content: space-between; margin: 0 0 12px; color: var(--ink-2); font-size: var(--fs-15); }
.ops-crew-top .ops-fresh { margin: 0; }
.ops-fresh-text { flex: 1 1 180px; min-width: 0; }
.ops-fresh-off { flex-wrap: nowrap; padding: 10px 10px 10px 14px; border: 1px solid var(--warn-line); border-radius: var(--radius-ticket); background: var(--warn-soft); color: var(--ink); font-size: var(--fs-16); font-weight: 600; }
.ops-fresh-off > svg { flex: none; color: var(--warn); }
.ops-fresh-off .ops-fresh-btn { flex: none; }
.ops-fresh-btn, .ops-fresh .btn-small { min-height: 44px; }
.ops-crew-banners { display: grid; gap: 8px; margin: 0 0 12px; }
.ops-crew-banners:empty { display: none; }
.ops-crew-banner { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-ticket); background: var(--surface); font-size: var(--fs-16); font-weight: 600; }
.ops-crew-banner > svg { flex: none; }
.ops-queued { border-color: var(--warn-line); background: var(--warn-soft); color: var(--ink); }
.ops-queued > svg, .ops-crew-unbooked > svg { color: var(--warn); }
.ops-ok { border-color: var(--done-line); background: var(--done-soft); color: var(--done); }
.ops-bad { border-color: var(--danger-line); background: var(--danger-soft); color: var(--danger); }
.ops-crew-queued { color: var(--warn); font-weight: 600; }
/* My jobs */
.ops-crew-h { margin: 20px 0 4px; font-size: var(--fs-22); }
.ops-crew-day:first-child .ops-crew-h { margin-top: 4px; }
.ops-crew-group h3 { margin: 14px 0 8px; color: var(--ink-2); font-size: var(--fs-16); font-weight: 600; }
.ops-crew-list { gap: 10px; }
.ops-crew-card .ticket-title { font-size: var(--fs-18); font-weight: 700; }
.ops-crew-card .ticket-line { font-size: var(--fs-16); }
.ops-crew-card .ticket-line svg { width: 18px; height: 18px; }
.ops-crew-now .ops-crew-card .ticket-line { color: var(--ink); font-weight: 500; }
.ops-crew-empty { display: flex; gap: 10px; align-items: center; padding: 16px; border: 1px dashed var(--line-firm); border-radius: var(--radius-ticket); background: var(--surface); color: var(--ink-2); }
.ops-crew-empty > svg { flex: none; }
.ops-crew-refresh { margin: 18px 0; }
/* One job */
.ops-crew-job-head { margin-bottom: 12px; }
.ops-crew-ticket .ticket-title h1 { margin: 0; font-size: var(--fs-22); }
.ops-crew-ticket .ticket-line { font-size: var(--fs-16); }
.ops-crew-block { padding: 16px; }
.ops-crew-block h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: var(--fs-18); }
.ops-crew-block h2 > svg { flex: none; color: var(--ink-2); }
.btn.ops-big { white-space: normal; }
.ops-crew-address-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ops-crew-address { flex: 1 1 180px; min-width: 0; }
.ops-crew-street { margin: 0; font-size: var(--fs-18); font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.ops-crew-town { margin: 2px 0 0; color: var(--ink-2); }
.ops-maps { flex: none; min-height: 52px; }
.ops-crew-contact { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 14px; }
.ops-crew-access .ops-access-list li { font-size: var(--fs-18); font-weight: 500; }
.ops-crew-access .ops-access-list svg { width: 22px; height: 22px; color: var(--ink); }
.ops-crew-mates { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; color: var(--ink-2); }
.ops-crew-mates svg { flex: none; }
.ops-crew-app .ops-upload-buttons .btn { flex: 1 1 160px; min-height: 52px; }
.ops-crew-app .ops-kind .seg-track { display: flex; width: 100%; }
.ops-crew-app .ops-kind .seg-track label { flex: 1 1 0; }
.ops-crew-app .ops-kind .seg-track span { justify-content: center; width: 100%; min-height: 48px; font-size: var(--fs-16); }
/* The fixed bar (base .action-bar): Start job (hi-vis) or Complete job, and Take photo. In thumb reach on a phone. */
.ops-crew-bar { margin: 0 0 12px; }
.ops-crew-bar:empty { display: none; }
.ops-crew-bar > .btn { margin: 0; padding: 0 12px; white-space: nowrap; }
.ops-crew-bar > .ops-main { flex: 2 1 0; }
.ops-crew-bar > .ops-camera { flex: 1 1 0; }
.ops-crew-bar > .btn svg { flex: none; }
/* Three in the bar (I'm here, Start job and the camera): the camera keeps its name for screen readers, shown as its icon. */
.ops-bar-3 > .ops-camera { flex: 0 0 56px; padding: 0; }
.ops-bar-3 .ops-camera-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ops-bar-3 > .ops-here { flex: 1 1 0; }
.ops-bar-3 > .ops-here svg { display: none; }
.ops-bar-3 > .ops-main { flex: 1.3 1 0; }
.ops-crew-where-now { display: inline-flex; align-items: center; gap: 6px; color: var(--blue); font-weight: 600; }
.ops-crew-where-now svg { color: var(--blue) !important; }
@media (max-width: 959px) {
  .ops-crew-bar { margin: 0; flex-wrap: nowrap; }
  .ops-crew-job:has(> .ops-crew-bar:not(:empty)) { padding-bottom: 92px; }
  body:has(.ops-crew-bar:not(:empty)) #toasts { bottom: calc(var(--tabbar-h) + 92px + var(--safe-bottom)); }
}
.ops-undo-toast { align-items: center; justify-content: space-between; }
.ops-undo { flex: none; min-height: 44px; border-color: #fff; background: #fff; color: var(--ink); }
/* "Could not send": work the office did not take, kept on the phone until the person removes it. */
.ops-refused { border-color: var(--danger-line); box-shadow: inset 4px 0 0 var(--danger); }
.ops-refused > h2 { color: var(--danger); }
.ops-refused > h2 > svg { color: var(--danger); }
.ops-refused-lede { margin: 0 0 12px; color: var(--ink-2); font-size: var(--fs-15); }
.ops-refused-list { list-style: none; display: grid; gap: 14px; margin: 0; padding: 0; }
.ops-refused-item { display: grid; gap: 6px; padding-top: 14px; border-top: 1px solid var(--line); }
.ops-refused-item:first-child { border-top: 0; padding-top: 0; }
.ops-refused-item p { margin: 0; }
.ops-refused-what { font-size: var(--fs-16); }
.ops-refused-job { color: var(--ink-2); }
.ops-refused-note { padding: 8px 12px; border-radius: var(--radius-control); background: var(--surface-sunk); }
.ops-refused-why { display: flex; gap: 6px; align-items: flex-start; color: var(--danger); font-weight: 600; }
.ops-refused-why svg { flex: none; margin-top: 1px; }
.ops-refused-at { color: var(--ink-2); font-size: var(--fs-15); }
.ops-refused-photo { width: 104px; height: 104px; object-fit: cover; border-radius: var(--radius-control); }
.ops-refused-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.ops-refused-actions .btn-small { min-height: 44px; }

/* Phones */
@media (max-width: 720px) {
  .ops-columns { grid-auto-flow: row; grid-auto-columns: auto; overflow: visible; gap: 24px; }
  .ops-lane .ops-cards { grid-template-columns: minmax(0, 1fr); }
  .ops-day-nav { gap: 10px; }
  .ops-day-title { width: 100%; justify-content: space-between; }
  .ops-day-label { flex-direction: column; align-items: center; gap: 0; text-align: center; font-size: var(--fs-18); }
  .ops-day-controls { width: 100%; }
  .ops-day-controls .ops-date { flex: 1 1 140px; }
  .ops-views { width: 100%; margin-left: 0; }
  .ops-view { flex: 1 1 100%; } .ops-view > a { flex: 1; justify-content: center; }
  .ops-job-head > .ticket { flex-basis: 100%; }
  .ops-job-head .page-actions { width: 100%; }
}
@media (max-width: 559px) {
  .ops-grid-2 { grid-template-columns: minmax(0, 1fr); }
  .ops-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ops-grid-3 > :first-child { grid-column: 1 / -1; }
  .page-head .page-actions { width: 100%; }
  .ops-job-titles h1 { font-size: var(--fs-22); }
  .ops-timeline li { grid-template-columns: 64px minmax(0, 1fr); gap: 10px; }
}
@media (max-width: 389px) {
  .ops-book { left: calc(90px + 14px); }
}
/* Touch screens get full-size targets, including the small buttons and segmented controls. */
@media (pointer: coarse) {
  :is(.ops-schedule, .ops-detail, .ops-photos, .ops-dialog, .ops-crew-app, .ops-crew-grid, .ops-tray, .ops-picked, .ops-money, .ops-booking) .btn-small { min-height: 44px; }
  .ops-filter > button, .ops-view > a { min-height: 44px; }
  .ops-slot-change > .ticket .ticket-body { padding-right: 56px; }
  .ops-slot-book > .ticket .ticket-body { padding-bottom: 68px; }
}
/* Precision dispatch: quiet controls frame the work, rather than competing with it.
   Job tickets retain their time stub, status word and keyboard/drag interactions. */
.ops-dispatch-page { --dispatch-line: #dce3eb; --dispatch-soft: #f5f7fb; --dispatch-ink: #172c45; }
.ops-dispatch-page .page-head { align-items: center; margin-bottom: 24px; }
.ops-dispatch-page .ops-day-nav { gap: 12px 20px; margin-bottom: 20px; padding: 16px 18px; border: 1px solid var(--dispatch-line); border-radius: 10px; background: var(--surface); }
.ops-dispatch-page .ops-day-title { gap: 8px; }
.ops-dispatch-page .ops-day-label { gap: 8px 12px; padding: 0 6px; font-size: 20px; font-weight: 700; letter-spacing: -.02em; color: var(--dispatch-ink); }
.ops-dispatch-page .ops-step { border-color: var(--dispatch-line); background: var(--surface); }
.ops-dispatch-page .ops-step:hover { background: var(--dispatch-soft); border-color: #aabbd2; }
.ops-dispatch-page .ops-today-word { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 8px; border-radius: 4px; background: #edf2ff; color: #234ba5; font-size: 12px; font-weight: 600; }
.ops-dispatch-page .ops-date { border-color: var(--dispatch-line); min-height: 40px; font-size: 13px; }
.ops-dispatch-page .ops-views { gap: 12px; }
.ops-dispatch-page .ops-view { padding: 3px; background: var(--dispatch-soft); border-color: var(--dispatch-line); border-radius: 6px; }
.ops-dispatch-page .ops-view > a { min-height: 34px; padding: 6px 12px; border-radius: 4px; font-size: 13px; font-weight: 600; }
.ops-dispatch-page .ops-view > a[aria-current="true"] { background: var(--blue); color: white; border-color: var(--blue); box-shadow: none; }
.ops-dispatch-page .ops-board-sum { gap: 10px 18px; min-height: 36px; margin: 0 0 12px; font-size: 13px; }
.ops-board-total { color: var(--dispatch-ink); font-weight: 600; }
.ops-board-crew-total { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.ops-dispatch-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-left: auto; font-size: 12px; }
.ops-legend-item { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.ops-legend-item strong { font-size: 12px; font-weight: 600; color: var(--dispatch-ink); font-variant-numeric: tabular-nums; }
.ops-legend-mark { width: 7px; height: 7px; border-radius: 2px; background: #5576bd; flex: none; }
.ops-legend-active .ops-legend-mark { background: #d46b1f; }
.ops-legend-completed .ops-legend-mark { background: #378461; }
.ops-dispatch-page .ops-to-tray-wrap { background: #fff3da; padding: 3px 8px; border-radius: 4px; }
.ops-dispatch-page .ops-to-tray { color: #805817; font-weight: 600; }
.ops-dispatch-page .ops-week-wrap { border-color: var(--dispatch-line); border-radius: 10px; scrollbar-color: #bcc9db #f5f7fb; }
.ops-dispatch-page .ops-week-table { min-width: 0; border-collapse: separate; border-spacing: 0; }
.ops-dispatch-page .ops-week-table th, .ops-dispatch-page .ops-week-table td { border-color: var(--dispatch-line); padding: 8px; }
.ops-dispatch-page .ops-week-table thead th { --cell: #f7f9fc; padding: 0; vertical-align: middle; }
.ops-dispatch-page .ops-week-table .ops-week-corner { width: 156px; padding: 16px; color: #53657c; font-size: 13px; font-weight: 600; }
.ops-dispatch-page .ops-week-table .ops-week-today { --cell: #f3f7ff; }
.ops-dispatch-page .ops-week-table thead .ops-week-today { --cell: #eaf1ff; }
.ops-dispatch-page .ops-week-day { display: grid; grid-template-columns: 1fr auto; column-gap: 6px; row-gap: 4px; padding: 14px 12px 12px; min-height: 86px; border-radius: 0; }
.ops-dispatch-page .ops-week-day:hover { background: #eaf0f8; }
.ops-dispatch-page .ops-week-dow { align-self: center; color: #53657c; font-size: 12px; font-weight: 600; }
.ops-dispatch-page .ops-week-date { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 28px; letter-spacing: -.02em; color: #263f60; }
.ops-week-day-load { grid-column: 1; font-size: 11px; font-weight: 400; color: #63758a; }
.ops-dispatch-page thead .ops-week-today .ops-week-day { box-shadow: inset 0 3px 0 var(--blue); border-radius: 0; }
.ops-dispatch-page thead .ops-week-today .ops-week-date, .ops-dispatch-page thead .ops-week-today .ops-week-dow { color: #234ba5; }
.ops-dispatch-page .ops-week-row { --cell: #fafbfd; position: sticky; left: 0; z-index: 2; padding: 20px 14px 18px 16px !important; box-shadow: inset 3px 0 0 var(--crew, #dce3eb), 1px 0 0 var(--dispatch-line); }
.ops-dispatch-page .ops-week-row-name { gap: 8px; color: var(--dispatch-ink); font-size: 14px; line-height: 1.35; }
.ops-dispatch-page .ops-week-row-name > svg { color: var(--crew, #526b87); }
.ops-dispatch-page .ops-week-row .ops-col-sub { margin-top: 10px; font-size: 12px; line-height: 1.5; color: #5c6f83; }
.ops-week-row-count { display: inline-flex; margin-top: 14px; padding: 3px 7px; border-radius: 4px; background: #edf1f7; color: #405b7b; font-size: 11px; font-weight: 600; }
.ops-dispatch-page .ops-week-table tbody td { height: 160px; }
.ops-dispatch-page .ops-week-table tbody tr:hover th { --cell: #f2f5fa; }
.ops-dispatch-page .ops-week-cards { gap: 8px; }
.ops-dispatch-page .ops-week-table .ops-week-card { --stub-w: 36px; border-color: #cfd9e8; border-radius: 6px; min-height: 92px; box-shadow: 0 1px 2px #1c365509; }
.ops-dispatch-page .ops-week-table .ops-week-card:hover, .ops-dispatch-page .ops-week-table .ops-week-card:focus-visible { border-color: #7d9dd6; box-shadow: 0 2px 5px #1c365515; }
.ops-dispatch-page .ops-week-card .ticket-stub { padding: 10px 3px; }
.ops-dispatch-page .ops-week-card .ticket-time { font-size: 14px; font-weight: 700; }
.ops-dispatch-page .ops-week-card .ticket-mer { font-size: 10px; }
.ops-dispatch-page .ops-week-card .ticket-body { padding: 10px 7px 10px 9px; gap: 4px; }
.ops-dispatch-page .ops-week-card .ticket-title { color: #1c3553; font-size: 12px; line-height: 1.35; font-weight: 700; }
.ops-dispatch-page .ops-week-card .ticket-line { color: #546982; font-size: 11px; line-height: 1.4; }
.ops-dispatch-page .ops-week-card .ticket-badges { margin-top: 5px; }
.ops-dispatch-page .ops-week-table .ops-week-card .status { font-size: 10px; line-height: 1.2; gap: 3px; padding: 3px 5px; white-space: normal; }
.ops-dispatch-page .ops-week-table .ops-week-card .status svg { display: none; }
.ops-dispatch-page .ops-tray { border-color: var(--dispatch-line); border-top: 3px solid #df9b37; border-radius: 10px; padding: 20px; }
.ops-dispatch-page .ops-tray-head h2 { color: var(--dispatch-ink); font-size: 17px; }
.ops-dispatch-page .ops-tray-lede { font-size: 13px; margin: 8px 0 18px; }
.ops-dispatch-page .ops-tray .ticket { border-color: var(--dispatch-line); }
.ops-dispatch-page .ops-tray .ops-book { background: #eef3ff; border-color: #cbd9f5; color: #234ba5; }
.ops-dispatch-page .ops-col-head { padding: 16px 12px; border-bottom-width: 3px; background: #f6f8fc; border-radius: 7px 7px 0 0; }
.ops-dispatch-page .ops-col-head h3 { font-size: 15px; color: var(--dispatch-ink); }
.ops-dispatch-page .ops-col-sub { font-size: 12px; }
.ops-dispatch-page .ops-day-grid { column-gap: 12px; }
.ops-dispatch-page .ops-gutter { background: var(--ground); }
.ops-dispatch-page .ops-gutter-hour { border-color: var(--dispatch-line); color: #5b7089; font-size: 12px; }
.ops-dispatch-page .ops-hour { border-color: var(--dispatch-line); }
.ops-dispatch-page .ops-hour:nth-child(even) { background: #f7f9fc; }
.ops-dispatch-page .ops-board-ticket { border-color: #cfd9e8; }
@media (max-width: 1100px) {
  .ops-dispatch-legend { width: 100%; margin-left: 0; padding: 5px 0; }
  .ops-dispatch-page .ops-day-nav { gap: 14px; }
  .ops-dispatch-page .ops-views { margin-left: 0; }
}
/* Office screens on a phone: agenda and full-size touch targets. */
@media (max-width: 720px) {
  .ops-week-wrap { display: none; }
  .ops-week-agenda { display: grid; gap: 20px; }
  :is(.ops-schedule, .ops-detail, .ops-tray, .ops-picked, .ops-money, .ops-booking, .ops-dialog, .ops-notice, .ops-chip-row, .ops-crew-grid, .ops-office-page) .btn-small { min-height: 44px; }
  .ops-filter > button, .ops-view > a { min-height: 44px; }
  .ops-office-page .back-link, .ops-tap-link, .ops-facts dd > a, .ops-head-sub > a, .ops-dialog-link, .ops-callout-list a, .row-title a { display: inline-flex; align-items: center; min-height: 44px; }
  :is(.ops-booking, .ops-office-page) .field-check label { align-items: center; min-height: 44px; }
  .ops-slot-change > .ticket .ticket-body { padding-right: 56px; }
  .ops-dispatch-page .page-head { margin-bottom: 18px; }
  .ops-dispatch-page .ops-day-nav { padding: 12px; margin-bottom: 16px; gap: 12px; border-radius: 8px; }
  .ops-dispatch-page .ops-day-label { font-size: 17px; gap: 4px; }
  .ops-dispatch-page .ops-views { width: 100%; gap: 8px; }
  .ops-dispatch-page .ops-view { flex: 1 1 auto; }
  .ops-dispatch-page .ops-view > a { min-height: 44px; padding: 8px 10px; }
  .ops-dispatch-page .ops-date { min-height: 44px; }
  .ops-dispatch-page .ops-board-sum { gap: 10px 14px; font-size: 12px; }
  .ops-dispatch-legend { gap: 13px; font-size: 11px; padding-top: 2px; }
  .ops-dispatch-page .ops-week-agenda { gap: 24px; }
  .ops-dispatch-page .ops-agenda-head { justify-content: space-between; padding-bottom: 8px; border-bottom: 1px solid var(--dispatch-line); margin-bottom: 12px; }
  .ops-dispatch-page .ops-agenda-head a { font-size: 16px; }
  .ops-dispatch-page .ops-agenda-day .ops-week-card { --stub-w: 80px; min-height: 86px; }
  .ops-dispatch-page .ops-agenda-day .ticket-stub { padding: 12px 7px; }
  .ops-dispatch-page .ops-agenda-day .ticket-time { font-size: 23px; }
  .ops-dispatch-page .ops-agenda-day .ticket-mer { font-size: 11px; }
  .ops-dispatch-page .ops-agenda-day .ticket-body { padding: 12px 14px; }
  .ops-dispatch-page .ops-agenda-day .ticket-title { font-size: 16px; }
  .ops-dispatch-page .ops-agenda-day .ticket-line { font-size: 13px; }
  .ops-dispatch-page .ops-tray { padding: 16px; }
}
@media (pointer: coarse) { .ops-dispatch-page .ops-view > a, .ops-dispatch-page .ops-date { min-height: 44px; } }

/* Week planning workspace: seven equal day columns, not an oversized ticket list.
   Desktop uses full-width appointment cards. Mobile retains the detailed agenda. */
@media (min-width: 721px) {
  .ops-dispatch-week .page-head { margin-bottom: 12px; }
  .ops-dispatch-week .ops-day-nav { padding: 8px 10px; gap: 8px 12px; margin-bottom: 8px; border-radius: 6px; }
  .ops-dispatch-week .ops-day-title { gap: 4px; }
  .ops-dispatch-week .ops-day-label { font-size: 16px; padding: 0 4px; }
  .ops-dispatch-week .ops-today-word { display: none; }
  .ops-dispatch-week .ops-step { width: 32px; min-height: 32px; height: 32px; }
  .ops-dispatch-week .ops-date { min-height: 34px; width: 133px; }
  .ops-dispatch-week .ops-views { margin-left: auto; gap: 6px; }
  .ops-dispatch-week .ops-view > a { min-height: 30px; padding: 4px 9px; font-size: 12px; }
  .ops-dispatch-week .ops-schedule-week { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .ops-dispatch-week .ops-board-sum { min-height: 28px; margin-bottom: 8px; gap: 8px 12px; font-size: 12px; }
  .ops-dispatch-week .ops-dispatch-legend { width: auto; margin-left: auto; padding: 0; gap: 10px; font-size: 11px; }
  .ops-dispatch-week .ops-week-wrap { border-radius: 6px; overflow: auto; }
  .ops-dispatch-week .ops-week-table { width: 100%; min-width: 0; table-layout: fixed; }
  .ops-dispatch-week .ops-week-table .ops-week-corner { width: 118px; padding: 10px; font-size: 11px; }
  .ops-dispatch-week .ops-week-table th, .ops-dispatch-week .ops-week-table td { padding: 4px; }
  .ops-dispatch-week .ops-week-day { min-height: 54px; padding: 7px 8px; gap: 2px 4px; }
  .ops-dispatch-week .ops-week-date { font-size: 22px; }
  .ops-dispatch-week .ops-week-dow { font-size: 10px; }
  .ops-dispatch-week .ops-week-day-load { font-size: 10px; }
  .ops-dispatch-week .ops-week-row { padding: 12px 9px !important; }
  .ops-dispatch-week .ops-week-row-name { display: block; font-size: 12px; line-height: 1.35; }
  .ops-dispatch-week .ops-week-row-name > svg { display: block; width: 16px; margin-bottom: 6px; }
  .ops-dispatch-week .ops-week-row .ops-col-sub { font-size: 10px; margin-top: 6px; line-height: 1.4; }
  .ops-dispatch-week .ops-week-row-count { font-size: 10px; margin-top: 8px; padding: 2px 5px; }
  .ops-dispatch-week .ops-week-table tbody td { height: 116px; }
  .ops-dispatch-week .ops-week-cards { gap: 4px; }
  .ops-dispatch-week .ops-week-table .ops-week-card { display: flex; flex-direction: column; min-height: 0; border-radius: 4px; border-left: 3px solid var(--crew, #7b91b3); box-shadow: none; overflow: hidden; }
  .ops-dispatch-week .ops-week-card::before, .ops-dispatch-week .ops-week-card::after { display: none; }
  .ops-dispatch-week .ops-week-card .ticket-stub { display: flex; align-items: center; padding: 4px 6px 3px; border: 0; border-radius: 0; min-height: 20px; }
  .ops-dispatch-week .ops-week-card .ticket-time { font-size: 11px; flex-wrap: nowrap; line-height: 1; gap: 3px; }
  .ops-dispatch-week .ops-week-card .ticket-mer { width: auto; font-size: 9px; }
  .ops-dispatch-week .ops-week-card .ticket-body { display: flex; flex-direction: column; padding: 5px 6px; gap: 3px; box-shadow: none; border-radius: 0; }
  .ops-dispatch-week .ops-week-card .ticket-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 11px; line-height: 1.2; font-weight: 750; overflow-wrap: normal; }
  .ops-dispatch-week .ops-week-card .ticket-line { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 10px; line-height: 1.2; }
  .ops-dispatch-week .ops-week-card .ticket-badges { margin: 0; gap: 2px; }
  .ops-dispatch-week .ops-week-card .status { padding: 1px 3px; font-size: 9px; white-space: nowrap; line-height: 1.2; }
  .ops-dispatch-week .ops-week-card .badge { font-size: 9px; }
  .ops-dispatch-week .ops-week-card:hover { box-shadow: 0 1px 5px #172c4520; }
  .ops-dispatch-week .ops-tray { position: static; padding: 12px 14px; }
  .ops-dispatch-week .ops-tray-list { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .ops-dispatch-week .ops-tray-lede { margin: 4px 0 10px; }
}
@media (min-width: 721px) and (max-width: 980px) {
  .ops-dispatch-week .ops-week-table .ops-week-corner { width: 96px; }
  .ops-dispatch-week .ops-day-controls { margin-left: auto; }
  .ops-dispatch-week .ops-views { margin-left: 0; }
}
