/* Web pages: request form, viewer calendar (and the officer web version in stage 3). */
:root {
  --bg: #f4f5f7; --card: #fff; --ink: #1d2330; --muted: #5f6776; --line: #dde1e7;
  --brand: #002C1B; --on-brand: #fff; --good: #1f7a3a; --bad: #b3261e; --warn-bg: #fff4d6; --warn-ink: #6b4e00;
  --clash: #fdecea; --radius: 8px;
  --s-sched-bg: #e3f4e8; --s-sched-ink: #134d25; --s-stand-bg: #fff4d6; --s-stand-ink: #6b4e00;
  --s-quote-bg: #e3ecfb; --s-quote-ink: #1b4aa0; --s-done-bg: #eceef1; --s-done-ink: #4a5160;
  --s-canc-bg: #fdecea; --s-canc-ink: #b3261e;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #14171c; --card: #1d2128; --ink: #e6e8eb; --muted: #9aa3af; --line: #313743;
    --brand: #3fb68b; --on-brand: #0b1a13; --good: #4cc26b; --bad: #ff6b60; --warn-bg: #3a3014; --warn-ink: #f3d98a; --clash: #3b1f1d;
    --s-sched-bg: #173a24; --s-sched-ink: #9fe0b3; --s-stand-bg: #3a3014; --s-stand-ink: #f3d98a;
    --s-quote-bg: #1b2b4a; --s-quote-ink: #a9c3f5; --s-done-bg: #2a2f38; --s-done-ink: #b5bcc7;
    --s-canc-bg: #3b1f1d; --s-canc-ink: #ff9b92; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--brand); }
main { max-width: 1200px; margin: 0 auto; padding: 16px; }
h1 { font-size: 1.4rem; margin: 0 0 8px; } h2 { font-size: 1.1rem; margin: 18px 0 8px; }
.top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; justify-content: space-between; padding: 10px 16px; background: var(--brand); color: var(--on-brand); }
.top a, .top button.link { color: var(--on-brand); text-decoration: none; }
.brand { font-weight: 700; }
.top nav { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.narrow { max-width: 420px; margin: 24px auto; }
.wide-form { max-width: 640px; margin: 8px auto; }
.head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 8px; }
.head h1 { margin: 0; }
.muted { color: var(--muted); } .small { font-size: 13px; } .nowrap { white-space: nowrap; }
.flash { padding: 10px 12px; border-radius: var(--radius); margin: 0 0 12px; background: var(--s-sched-bg); color: var(--s-sched-ink); }
.flash.bad { background: var(--clash); color: var(--bad); }
label { display: block; margin: 0 0 12px; font-weight: 600; font-size: 14px; }
input, select, textarea { display: block; width: 100%; margin-top: 4px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--ink); font: inherit; font-weight: 400; }
/* Safari on Apple phones and tablets gives date boxes its own look: a minimum width that pushes them past the card, centred text
   and a different height. Plain box, left-aligned, same height as the text boxes (3.2.3). */
input[type="date"] { -webkit-appearance: none; appearance: none; min-width: 0; min-height: calc(1.2em + 20px); min-height: calc(1lh + 20px); text-align: left; }
input[type="date"]::-webkit-date-and-time-value { text-align: left; margin: 0; }
.invalid input, .invalid select { border-color: var(--bad); }
fieldset.invalid { border-color: var(--bad); }
label.chk { display: flex; gap: 8px; align-items: center; font-weight: 400; }
label.chk input { width: auto; margin: 0; }
fieldset { border: 1px solid var(--line); border-radius: 6px; margin: 0 0 12px; padding: 8px 12px; }
fieldset legend { font-weight: 600; font-size: 14px; }
fieldset label.chk { display: inline-flex; margin: 4px 20px 4px 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0 14px; }
button, .btn { display: inline-block; padding: 8px 14px; border-radius: 6px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; cursor: pointer; text-decoration: none; }
button.primary, .btn.primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
button.link { background: none; border: 0; padding: 0; text-decoration: underline; }
form.inline { display: inline; margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 12px; flex-wrap: wrap; }
.tabs a { padding: 8px 14px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--brand); font-weight: 600; }
table { border-collapse: collapse; width: 100%; }
.list th, .list td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.list th { font-size: 13px; color: var(--muted); font-weight: 600; }
.kv th { text-align: left; width: 38%; padding: 5px 8px; color: var(--muted); font-weight: 600; vertical-align: top; }
.kv td { padding: 5px 8px; }
tr.dim { opacity: .6; }
.day-short { display: none; }
.with-btn { display: flex; gap: 6px; align-items: stretch; } .with-btn input { flex: 1 1 auto; min-width: 0; } .with-btn .btn { margin-top: 4px; white-space: nowrap; }
.view-toggle { display: none; }
/* Back to top on every page (top.js): bottom corner, shown once the page is scrolled about a screen down. */
.to-top { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 50;
  padding: 10px 16px; border-radius: 999px; background: var(--brand); color: var(--on-brand); border: 1px solid var(--brand);
  font-weight: 600; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); cursor: pointer; }
.to-top[hidden] { display: none; }
@media print { .to-top { display: none; } }
.print-only { display: none; }
table.vehicle-report th { width: 40%; }
@media print {
  body.printing-part header.top, body.printing-part .warn, body.printing-part .flash, body.printing-part .site-foot,
  body.printing-part main > *:not(.printing) { display: none !important; }
  body.printing-part main > .printing > *:not(.print-target) { display: none !important; }
  body.printing-part .print-only { display: block; }
  body.printing-part .card { border: 0; box-shadow: none; }
}
fieldset.vehicle-only .grid { align-items: end; }
.flash.mailto { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.alert-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.alert-bar-btns { display: flex; flex-wrap: wrap; gap: 8px; }
@media print { .alert-bar { display: none !important; } }
.odo h2 { margin: 0 0 2px; }
.odo-form { display: flex; flex-wrap: wrap; align-items: end; gap: 8px 10px; }
.odo-form label { flex: 1 1 180px; max-width: 260px; margin: 0; }
.kind-locked { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 10px; }
[hidden] { display: none !important; }
.err { display: block; color: var(--bad); font-weight: 400; font-size: 13px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ref { font-size: 1.2rem; }
/* Bookings with no vehicle (radios or iPad only): a dashed label in the Vehicle column, and in Compact on the duty line. */
.no-veh { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 7px; border-radius: 10px; border: 1px dashed var(--muted);
  background: var(--card); color: var(--ink); white-space: nowrap; }
/* Service bookings (a vehicle's service or repair visit): a Service label before the duty. */
.service-centre { border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; margin: 0 0 12px; font-size: 14px; }
.service-centre div { margin-top: 2px; }
p.tight { margin-bottom: 0; }
.svc { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 7px; border-radius: 10px; background: var(--ink); color: var(--card); white-space: nowrap; }
fieldset.kind-choice { margin-bottom: 8px; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); white-space: nowrap; }
.s-scheduled { background: var(--s-sched-bg); color: var(--s-sched-ink); }
.s-standby { background: var(--s-stand-bg); color: var(--s-stand-ink); }
.s-toquote, .s-quoted { background: var(--s-quote-bg); color: var(--s-quote-ink); }
.s-completed { background: var(--s-done-bg); color: var(--s-done-ink); }
.s-cancelled { background: var(--s-canc-bg); color: var(--s-canc-ink); text-decoration: line-through; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal .dow { font-size: 12px; font-weight: 600; color: var(--muted); text-align: center; padding: 4px 0; }
.cal .day { background: var(--card); border: 1px solid var(--line); border-radius: 6px; min-height: 96px; padding: 4px; overflow: hidden; }
.cal .day.other { opacity: .5; } .cal .day.today { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.cal .num { font-size: 12px; font-weight: 700; margin-bottom: 2px; }
.cal .ev { font-size: 12px; line-height: 1.3; padding: 2px 4px; margin-bottom: 2px; border-radius: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal .ev-more, .mobile-only { display: none; }
@media (max-width: 640px) {
  .cal { grid-template-columns: 1fr; }
  .cal .dow, .cal .day.other, .cal .day.empty { display: none; }
  .cal .day { min-height: 0; }
  .cal .ev { white-space: normal; font-size: 14px; padding: 6px; }
  .cal .ev-more { display: block; }
  .mobile-only { display: inline; }
  .list thead { display: none; }
  .list tr { display: block; border-bottom: 1px solid var(--line); padding: 6px 0; }
  .list td { display: block; border: 0; padding: 2px 8px; }
}

/* ---- officer web version (stage 3) ---- */
body.officer main { max-width: 1500px; }
body.officer .top nav a.on { text-decoration: underline; text-underline-offset: 4px; }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--on-brand); color: var(--brand); font-size: 12px; font-weight: 700; text-align: center; }
.tabs .badge { background: var(--brand); color: var(--on-brand); }
.warn { background: var(--warn-bg); color: var(--warn-ink); padding: 8px 12px; border-radius: var(--radius); margin: 0 0 12px; }
.warn a { color: inherit; font-weight: 600; }
.warn.bad { background: var(--clash); color: var(--bad); }
.warn.readiness ul { margin: 4px 0 0; padding-left: 20px; }
fieldset.vehicle-only textarea { min-height: 70px; }
.scroll { overflow-x: auto; }
/* Bookings / Duties on a computer: the table scrolls in its own box with the headings kept in view, so the sideways
   scroll bar is always on screen (it used to sit below the last day). Phones and tablets show cards instead. */
.scroll.duties-box { overflow: auto; max-height: calc(100vh - 150px); min-height: 320px; }
.scroll.duties-box thead th { position: sticky; top: 0; z-index: 2; background: var(--card); box-shadow: inset 0 -1px 0 var(--line); }
table.sheet { font-size: 13px; }
table.sheet th, table.sheet td { padding: 5px 6px; white-space: nowrap; }
table.sheet td:nth-child(9), table.sheet td:nth-child(10) { white-space: normal; min-width: 160px; }
.list tbody tr[data-href] { cursor: pointer; }
.list tbody tr[data-href]:hover { background: var(--bg); }
tr.today td { border-top: 2px solid var(--brand); }
tr.past { color: var(--muted); }
tr.empty-day td { color: var(--muted); padding-top: 2px; padding-bottom: 2px; }
a.add { display: inline-block; width: 22px; height: 22px; line-height: 20px; text-align: center; border: 1px solid var(--line); border-radius: 50%; text-decoration: none; font-weight: 700; }
td.num { text-align: right; }
.gap-red { color: var(--bad); font-weight: 700; } .gap-ok { color: var(--good); font-weight: 700; }
.stat { display: flex; flex-direction: column; justify-content: center; margin-bottom: 12px; } .stat strong { font-size: 1.3rem; min-height: 1.5em; }
.split { display: grid; grid-template-columns: minmax(0, 3fr) minmax(260px, 2fr); gap: 16px; align-items: start; }
.conflicts { position: sticky; top: 8px; }
.conflicts h2 { margin-top: 0; }
ul.sameday { list-style: none; padding: 0; margin: 0; }
ul.sameday li { padding: 6px 8px; border-bottom: 1px solid var(--line); font-size: 14px; }
ul.sameday li.clash { background: var(--clash); }
.dim { opacity: .6; }
.grid.two { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.lists-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.lists-grid .card { margin: 0; }
.filters { margin-bottom: 10px; } .filters input, .filters select { width: auto; margin: 0; min-width: 140px; }
.filters input[name="q"] { min-width: 240px; flex: 1; }
.inline-label { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 400; } .inline-label input { margin: 0; }
textarea { resize: vertical; }
button.bad, .btn.bad { background: var(--bad); border-color: var(--bad); color: #fff; }
button[disabled] { opacity: .5; cursor: not-allowed; }
.bad-text, button.link.bad-text { color: var(--bad); }
.danger-zone { margin-top: 18px; text-align: right; }
.tag { font-size: 12px; padding: 2px 8px; border-radius: 10px; font-weight: 600; white-space: nowrap; }
.tag.mail { background: var(--s-quote-bg); color: var(--s-quote-ink); } .tag.req { background: var(--s-stand-bg); color: var(--s-stand-ink); }
.st { font-size: 13px; font-weight: 600; white-space: nowrap; }
.st-new, .st-pending, .st-queued, .st-submitted, .st-form_sent { color: var(--warn-ink); } .st-accepted, .st-sent { color: var(--good); }
.st-rejected, .st-failed { color: var(--bad); } .st-closed, .st-cancelled { color: var(--muted); }
pre.mail { white-space: pre-wrap; word-wrap: break-word; background: var(--bg); padding: 12px; border-radius: 6px; font: 14px/1.5 ui-monospace, Consolas, monospace; max-height: 50vh; overflow: auto; }
td.pre { white-space: pre-wrap; }
td.detail { font-size: 12px; color: var(--muted); word-break: break-word; }
code { background: var(--bg); padding: 1px 5px; border-radius: 4px; }
code.key { font-size: 1.05rem; letter-spacing: .05em; user-select: all; overflow-wrap: anywhere; }
.narrow-left { max-width: 560px; }
.form-link { margin-bottom: 12px; }
.site-foot { max-width: 1200px; margin: 0 auto; padding: 4px 16px 20px; text-align: center; font-size: 12px; color: var(--muted); }
.help details { border-top: 1px solid var(--line); padding: 10px 0; }
.help summary { font-weight: 600; font-size: 1.05rem; cursor: pointer; padding: 4px 0; }
.help details[open] summary { margin-bottom: 6px; }
.help li { margin-bottom: 4px; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .conflicts { position: static; } }
@media (max-width: 640px) {
  table.sheet thead { display: table-header-group; }
  table.sheet tr { display: table-row; } table.sheet td { display: table-cell; }
}

/* ---- officer pages on phones and tablets (28 Oct 2026): one touch layout up to 1024 px, and on any touch
   screen up to 1366 px so every tablet gets it in both orientations. Menu behind a button, table rows as cards
   (web.js labels each cell), larger tap targets. */
.nav-toggle { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.menu-btn { display: none; }
@media (max-width: 1024px), (pointer: coarse) and (max-width: 1366px) {
  body.officer input, body.officer select, body.officer textarea, body.officer button, body.officer .btn { font-size: 16px; }   /* smaller makes iOS zoom in */
  body.officer button, body.officer .btn { min-height: 44px; padding: 10px 16px; }
  body.officer button.link { min-height: 0; padding: 0; }
  body.officer .actions > button, body.officer .actions > .btn, body.officer .actions > form > button { flex: 1 1 140px; }
  body.officer a.add { width: 34px; height: 34px; line-height: 32px; }

  body.officer .menu-btn { display: inline-flex; align-items: center; margin: 0; padding: 8px 14px; border: 1px solid var(--on-brand); border-radius: 6px; font-size: 15px; cursor: pointer; }
  body.officer .nav-toggle:focus-visible + .menu-btn { outline: 2px solid var(--on-brand); outline-offset: 2px; }
  body.officer .top nav { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 0; }
  body.officer .nav-toggle:checked ~ nav { display: flex; }
  body.officer .top nav > a, body.officer .top nav > form { padding: 12px 4px; border-top: 1px solid rgba(255, 255, 255, .2); }
  body.officer .top nav button.link { font-size: 16px; }

  body.officer .scroll { overflow: visible; }
  body.officer .scroll.duties-box { max-height: none; min-height: 0; }
  body.officer .list thead { display: none; }
  body.officer .list, body.officer .list tbody { display: block; }
  body.officer .list tr { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); column-gap: 18px;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; margin-bottom: 8px; }
  body.officer .list td { display: flow-root; position: relative; border: 0; padding: 4px 0 4px 128px;
    white-space: normal; min-width: 0; text-align: left; font-size: 15px; overflow-wrap: anywhere; }
  /* The label floats in the left padding, so a two-line label (Members Requested) makes the cell taller instead of overlapping. */
  body.officer .list td::before { content: attr(data-label); float: left; width: 120px; margin: 2px 0 0 -128px; line-height: 1.3;
    color: var(--muted); font-size: 13px; font-weight: 600; overflow-wrap: normal; }
  body.officer .list td:not([data-label]) { grid-column: 1 / -1; padding-left: 0; }
  body.officer .list td:not([data-label])::before { content: none; }
  body.officer .list td:empty { display: none; }
  body.officer .list tr.today { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
  body.officer .list tr.today td { border-top: 0; }
  body.officer .list tr.empty-day { display: flex; gap: 12px; align-items: center; padding: 4px 12px; background: none; border-style: dashed; }
  body.officer .list tr.empty-day td { display: block; padding: 0; }
  body.officer .list tr.empty-day td::before { content: none; }

  /* Bookings / Duties cards: day, date, times and status as one heading line, + in the corner. */
  body.officer table.duties tr:not(.empty-day) { display: flex; flex-wrap: wrap; column-gap: 10px; position: relative; padding-right: 56px; }
  body.officer table.duties tr:not(.empty-day)::before { content: ''; flex-basis: 100%; order: 1; }
  body.officer table.duties tr:not(.empty-day) > td { flex: 1 1 260px; order: 2; padding-right: 18px; }
  body.officer table.duties tr:not(.empty-day) > td:first-child { position: absolute; top: 8px; right: 10px; padding: 0; }
  body.officer table.duties tr:not(.empty-day) > td:nth-child(n+2):nth-child(-n+6) { display: block; flex: 0 0 auto; order: 0; padding: 4px 0 8px;
    font-size: 16px; font-weight: 600; }
  body.officer table.duties tr:not(.empty-day) > td:nth-child(5)::before { float: none; width: auto; margin: 0; }
  body.officer table.duties tr:not(.empty-day) > td:nth-child(n+2):nth-child(-n+4)::before,
  body.officer table.duties tr:not(.empty-day) > td:nth-child(6)::before { content: none; }
  body.officer table.duties tr:not(.empty-day) > td:nth-child(5)::before { content: '– '; color: inherit; font-size: inherit; }

  /* Compact view (web.js, the default on phones): one coloured line per booking with the day, date, times,
     status and staff still needed, and the duty below; empty days, Completed bookings and past Cancelled ones are left out. Tap a booking
     to open it out. */
  body.officer .view-toggle { display: flex; gap: 6px; margin: 0 0 10px; }
  body.officer .view-toggle button { flex: 1 1 0; }
  body.officer .view-toggle button[aria-pressed="true"] { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
  body.officer .view-toggle button[hidden] { display: none; }
  /* Today (Full view): the button scrolls today into the middle of the screen and highlights it for a few seconds. */
  body.officer table.duties tr.today-flash { animation: today-flash 3s ease-out; }
  @keyframes today-flash { 0%, 60% { box-shadow: inset 0 0 0 3px var(--brand), 0 0 0 4px var(--s-sched-bg); } 100% { box-shadow: inset 0 0 0 1px var(--brand); } }
  body.officer table.duties.compact tr:not(.empty-day):not(.open) { display: grid; grid-template-columns: auto auto auto 1fr auto; align-items: center;
    column-gap: 6px; row-gap: 0; padding: 6px 10px; margin-bottom: 4px; border-left: 6px solid var(--line); cursor: pointer; }
  body.officer table.duties.compact tr:not(.empty-day):not(.open)::before { content: none; }
  body.officer table.duties.compact tr:not(.empty-day):not(.open) > td { display: none; padding: 0; font-size: 15px; font-weight: 600; }
  body.officer table.duties.compact tr:not(.empty-day):not(.open) > td::before { content: none; }
  body.officer table.duties.compact tr:not(.empty-day):not(.open) > td:nth-child(2) { display: block; grid-column: 1; grid-row: 1; }
  body.officer table.duties.compact tr:not(.empty-day):not(.open) > td:nth-child(3) { display: block; grid-column: 2; grid-row: 1; }
  body.officer table.duties.compact tr:not(.empty-day):not(.open) > td:nth-child(3) a { color: inherit; text-decoration: none; pointer-events: none; }
  body.officer table.duties.compact tr:not(.empty-day):not(.open) > td:nth-child(4) { display: block; grid-column: 3; grid-row: 1; }
  body.officer table.duties.compact tr:not(.empty-day):not(.open) > td:nth-child(5) { display: block; grid-column: 4; grid-row: 1; justify-self: start; margin-left: -4px; }
  body.officer table.duties.compact tr:not(.empty-day):not(.open) > td:nth-child(5):not(:empty)::before { content: '– '; float: none; width: auto; margin: 0; color: inherit; font-size: inherit; }
  body.officer table.duties.compact tr:not(.empty-day):not(.open) > td:nth-child(6) { display: block; grid-column: 5; grid-row: 1; justify-self: end; }
  /* 3.2.3: the day, date and times never break inside themselves (a phone wrapped the finish time under the dash), with a
     little more room for them: narrower gaps and status pill, and a 14 px top line on phones up to 400 px wide
     (13 px up to 380 px: the smallest phones). */
  body.officer table.duties.compact tr:not(.empty-day):not(.open) > td:nth-child(-n+5) { white-space: nowrap; }
  body.officer table.duties.compact tr:not(.empty-day):not(.open) > td:nth-child(6) .pill { padding: 2px 6px; }
  @media (max-width: 400px) {
    body.officer table.duties.compact tr:not(.empty-day):not(.open) > td:nth-child(-n+6) { font-size: 14px; }
  }
  @media (max-width: 380px) {
    body.officer table.duties.compact tr:not(.empty-day):not(.open) > td:nth-child(-n+6) { font-size: 13px; }
  }
  body.officer table.duties.compact tr:not(.empty-day):not(.open) > td:nth-child(9) { display: block; grid-column: 1 / 5; grid-row: 2; font-weight: 400;
    font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  body.officer table.duties.compact tr:not(.empty-day):not(.open) > td:nth-child(16) { display: block; grid-column: 5; grid-row: 2; justify-self: end; font-size: 13px; }
  body.officer table.duties.compact tr:not(.empty-day):not(.open) > td:nth-child(16).gap-ok::before { content: '✓ '; float: none; width: auto; margin: 0; color: inherit; font-size: inherit; }
  body.officer table.duties.compact tr:not(.empty-day):not(.open) .day-long { display: none; }
  body.officer table.duties.compact tr:not(.empty-day):not(.open) .day-short { display: inline; }
  body.officer table.duties.compact tr.empty-day, body.officer table.duties.compact tr.st-completed:not(.empty-day),
    body.officer table.duties.compact tr.past.st-cancelled:not(.empty-day) { display: none; }
  body.officer table.duties.compact tr.open { margin: 8px 0 12px; }
  body.officer table.duties tr[class*="st-"] { border-left-width: 6px; }
  body.officer table.duties tr.st-scheduled { border-left-color: var(--s-sched-ink); }
  body.officer table.duties tr.st-standby { border-left-color: var(--s-stand-ink); }
  body.officer table.duties tr.st-toquote, body.officer table.duties tr.st-quoted { border-left-color: var(--s-quote-ink); }
  body.officer table.duties tr.st-completed { border-left-color: var(--s-done-ink); }
  body.officer table.duties tr.st-cancelled { border-left-color: var(--s-canc-ink); }
  /* No vehicle booked (radios or iPad only): a dashed left edge in Compact and Full, and a No vehicle label before the duty in Compact. */
  body.officer table.duties tr.no-vehicle[class*="st-"] { border-left-style: dashed; }
  body.officer table.duties.compact tr.no-vehicle:not(.empty-day):not(.open) { border-left-style: dashed; border-left-color: var(--muted); }
  body.officer table.duties.compact tr.no-vehicle:not(.empty-day):not(.open) > td:nth-child(9)::before { content: attr(data-veh); display: inline-block;
    float: none; width: auto; margin: 0 6px 0 0; padding: 0 7px; border: 1px dashed currentColor; border-radius: 10px; font-size: 12px; font-weight: 600;
    color: var(--ink); background: var(--card); }
  body.officer table.duties.compact tr.st-scheduled:not(.open) { background: var(--s-sched-bg); }
  body.officer table.duties.compact tr.st-standby:not(.open) { background: var(--s-stand-bg); }
  body.officer table.duties.compact tr.st-toquote:not(.open), body.officer table.duties.compact tr.st-quoted:not(.open) { background: var(--s-quote-bg); }
  body.officer table.duties.compact tr.st-cancelled:not(.open) { background: var(--s-canc-bg); }
}
@media (max-width: 640px) {
  body.officer .filters input, body.officer .filters select, body.officer .filters input[name="q"] { flex: 1 1 100%; min-width: 0; }
  body.officer .filters button, body.officer .filters .btn { flex: 1 1 120px; }
  body.officer .list td[data-label] { padding-left: 106px; }
  body.officer .list td::before { width: 98px; margin-left: -106px; }
  body.officer .more-days { display: none; }   /* Show another month is for desktops and tablets */
}
