/* LastStop redesign: ops area styles (stage 3). Uses only the role tokens from tokens.css and the components from components.css.
   The Operations screens (src/modules/ops/index.mjs, src/modules/trucks/*.mjs, app.js fedexDetail): Overview, Schedule,
   Defects, Fleet, Employees, Expiring, Bulk upload, Import, Safety and Metrics. Markup blocks: src/modules/ops/ui.mjs.
   Nothing here names a color: every value is a role (both themes), so JCruz dark and Kept Staffed light read alike. */

/* ---------- the list column ---------- */
.ops-list { padding: 20px 16px 8px; }
@media (min-width: 1024px) { .ops-list { padding: 40px 0 8px; } }
.ops-list-head { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.ops-title { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; }
.ops-title h1 { margin: 0; font-size: var(--fs-5); letter-spacing: -.02em; line-height: 1.1; overflow-wrap: anywhere; }
.ops-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ops-actions .btn-primary { min-height: 48px; padding: 0 22px; }
.ops-inline-form { display: inline-flex; margin: 0; }

/* the rows: the most urgent first; a quiet glow only on the one opened */
.ops-rows .row { min-height: 60px; }
.ops-rows .row-name { font-size: 16.5px; }
.ops-rows .row .pill { max-width: 66%; }
html[data-theme="dark"] .ops-rows .row[aria-current], html[data-theme="dark"] .ops-rows .row.is-open { box-shadow: inset 3px 0 0 var(--accent), 0 0 28px -12px var(--accent-glow); }
.ops-empty { padding: 20px 4px; }

/* item 16 (Sarah 10/13/2026): Fleet rows stack the status pill over a compact VIN/plate line (truckRowMeta,
   src/modules/trucks/index.mjs); it truncates on a narrow phone rather than push the row's height up. */
.ops-row-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex: none; max-width: 60%; }
.ops-row-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
/* J54 send-back (Grok Bot on a 393 px phone, 10/14/2026): a Fleet row keeps its status pill on the truck number's line. The
   J53 phone rule (hiring.css: .row wraps, the name takes at least 55%) is for rows of loose pills; a truck row's one
   pill + VIN line is a single block, so it stays beside the name and the name gives way instead. */
@media (max-width: 759px) {
  .ops-rows .row:has(> .ops-row-meta) { flex-wrap: nowrap; }
  .ops-rows .row:has(> .ops-row-meta) > .row-name { min-width: 0; flex: 1 1 auto; }
  .ops-row-meta .pill { white-space: nowrap; }
}

/* the Overview: the location that most needs action, opened in place */
.ops-locs > li.ops-top { border-radius: var(--r-3); background: var(--surface); border: 1px solid var(--line); margin-bottom: 6px; }
html[data-theme="light"] .ops-locs > li.ops-top { border-color: transparent; box-shadow: 0 1px 0 rgba(0, 0, 0, .04), 0 10px 28px -16px var(--accent-glow); }
.ops-locs > li.ops-top > .row { box-shadow: none; background: transparent; }
.ops-x { display: flex; flex-direction: column; gap: 14px; padding: 2px 14px 16px; }
.ops-x .ml .line .v { font-size: 16px; }

/* ---------- label-value lines that wrap (a note, a long name) ---------- */
.ops-d .ml, .ops-x .ml, .ops-list .ml { gap: 10px; }
.ops-d .ml .line, .ops-list .ml .line { align-items: center; }
.ops-d .ml .line .k, .ops-list .ml .line .k { flex: 0 1 auto; min-width: 0; }
.ops-d .ml .line .v, .ops-list .ml .line .v { white-space: normal; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.ops-d .ml .line .v .pill { white-space: nowrap; }
.ml .line .v.pend { color: var(--pend); }

/* ---------- the panel (desktop) / sheet (phone) ---------- */
.ops-d { display: flex; flex-direction: column; gap: 16px; padding-bottom: 24px; }
.ops-d > * { margin: 0; }
.ops-sec-b { display: flex; flex-direction: column; gap: 14px; }

.ops-archived { padding: 12px 14px; border-radius: var(--r-2); background: var(--neu-soft); color: var(--ink-2); font-size: 14px; line-height: 1.45; }
.ops-archived p { margin: 0; }
.ops-archived p + p { margin-top: 4px; }

/* a form or one document opened over the record */
.ops-mode-t { font-size: var(--fs-4); margin: 0; letter-spacing: -.01em; }
.ops-note { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.ops-note a { color: var(--accent-text); font-weight: 600; }
.ops-lead { margin: 0; font-size: var(--fs-3); line-height: 1.45; color: var(--ink-2); max-width: 60ch; }
.ops-form { display: flex; flex-direction: column; gap: 14px; }
.ops-form-t { margin: 8px 0 0; font-size: 15px; color: var(--heading); }
.ops-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .ops-grid2 { grid-template-columns: 1fr; } }
.ops-d .form-actions .btn-primary { min-width: 180px; }


/* one document */
.ops-doc { display: flex; flex-direction: column; gap: 14px; }
.ops-copy { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: 0; }
.ops-copy small { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.ops-older { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; color: var(--ink-2); }
.ops-older a { color: var(--accent-text); }

/* the change history, newest first */
.ops-history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ops-history li { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--ink); overflow-wrap: anywhere; }
.ops-history li:last-child { border-bottom: 0; }
.ops-when { font-size: 12.5px; color: var(--muted); }

/* the held reminders (Expiring) */
.ops-held { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ops-held li { padding: 12px 14px; border-radius: var(--r-3); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.ops-held p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); overflow-wrap: anywhere; }
.ops-held p strong { color: var(--heading); }

/* blocks of lines in a panel or a page (Overview's location, Metrics) */
.ops-block { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
/* J54 (Sarah 10/14/2026 9:24 AM ET, item e): the Overview's section headings in the Dashboard's section heading style
   (.dash-bh h3, hiring.css: the heading font at --fs-3, heading color, not small grey capitals) */
.ops-block-t { margin: 0 0 10px; font-family: var(--font-head); font-size: var(--fs-3); letter-spacing: -.01em; text-transform: none; color: var(--heading); }
.ops-measures { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.ops-measures li { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 2px; border-bottom: 1px solid var(--line); font-family: var(--font-head); font-weight: 600; font-size: 15.5px; color: var(--heading); }
.ops-measures li:last-child { border-bottom: 0; }
.ops-measures li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
html[data-theme="dark"] .ops-measures li::before { box-shadow: 0 0 10px var(--accent-glow); }

/* the Overview's tiles (stage 3 follow-up, 10/13/2026): a few numbers from Schedule, Employees, Fleet, Safety and
   Metrics, over the locations the login covers, above the location row list. Reuses .ops-block; only the stacking and
   the gap before the rows below are new here. */
.ops-tiles { display: flex; flex-direction: column; gap: 4px; margin-bottom: 22px; }
.ops-tiles .ops-block:first-child { padding-top: 0; border-top: 0; }

/* a page with no list (Safety, Metrics, Bulk upload, Import) */
.ops-page { display: flex; flex-direction: column; gap: 18px; }
.ls-shell[data-pane="page"] .ops-d { padding-top: 8px; }
@media (min-width: 1024px) { .ls-shell[data-pane="page"] .ops-d { padding-top: 24px; } }
.ops-steps { margin: 0 0 10px; padding-left: 20px; display: grid; gap: 6px; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.ops-tool { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ops-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.ops-card-t { margin: 0; font-size: var(--fs-3); }
.ops-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.ops-tabs .chip { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--heading); font-family: var(--font-head); font-weight: 600; font-size: 14px; text-decoration: none; }
.ops-tabs .chip.is-cur { border-color: var(--accent); color: var(--accent-text); }

/* ---------- Bulk upload (public/assets/trucks-bulk.js draws the rows) ---------- */
.bulk-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.bulk-pick { cursor: pointer; }
.bulk-rows { display: grid; gap: 12px; }
.bulk-rows:empty { display: none; }
.bulk-row.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3); padding: 14px 16px; color: var(--ink); }
.bulk-row.is-saved { border-color: var(--ok); background: var(--ok-soft); }
.bulk-row.is-error { border: 2px solid var(--bad); background: var(--bad-soft); }
.bulk-bar .btn:disabled, .imp-bar .btn:disabled { opacity: .55; cursor: not-allowed; }
.bulk-head { display: flex; gap: 12px; align-items: center; }
.bulk-name { flex: 1; min-width: 0; display: grid; color: var(--ink); }
.bulk-name strong { overflow-wrap: anywhere; color: var(--heading); }
.bulk-name small { color: var(--muted); }
.bulk-thumb { width: 56px; height: 56px; flex: none; border-radius: var(--r-2); background: var(--surface-2); color: var(--ink-2); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; overflow: hidden; }
.bulk-thumb img { width: 100%; height: 100%; object-fit: cover; }
.bulk-msg { margin: 8px 0 0; font-size: 14px; color: var(--ink-2); }
.bulk-msg.is-ok { color: var(--ok); font-weight: 600; }
.bulk-msg.is-error { color: var(--bad); font-weight: 600; }
.bulk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; margin-top: 10px; }
.bulk-wide { grid-column: 1 / -1; }
.bulk-locs { margin-top: 6px; }
.bulk-bar, .imp-bar { position: sticky; bottom: 0; z-index: 3; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px 0; background: var(--bg); border-top: 1px solid var(--line); color: var(--ink-2); }
.bulk-all-row { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.bulk-all-row .field { margin: 0; }
@media (max-width: 640px) {
  .bulk-grid { grid-template-columns: 1fr; }
  .bulk-bar .btn, .imp-bar .btn { width: 100%; justify-content: center; }
  .bulk-rows, .imp-rows { margin-bottom: 32px; }
  .bulk-bar, .imp-bar { padding: 14px 0; box-shadow: 0 -8px 16px -8px var(--scrim); }
}

/* ---------- Import (the preview's rows and their filter; public/assets/fleet-import.js) ---------- */
.imp-tpl { display: flex; gap: 8px; flex-wrap: wrap; }
.imp-guide td:first-child { white-space: nowrap; font-weight: 600; }
.imp-sum { display: flex; gap: 6px; flex-wrap: wrap; }
.ops-filter { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink-2); font-family: var(--font-head); font-weight: 600; font-size: 13.5px; cursor: pointer; }
.ops-filter::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--neu); }
.ops-filter.ok::before { background: var(--ok); } .ops-filter.pend::before { background: var(--pend); } .ops-filter.bad::before { background: var(--bad); }
.ops-filter.is-selected { border-color: var(--accent); color: var(--heading); background: var(--accent-soft); }
.imp-rows { display: grid; gap: 10px; }
.imp-row { border: 1px solid var(--line); border-radius: var(--r-3); padding: 12px 14px; background: var(--surface); color: var(--ink); }
.imp-row.is-error { border: 2px solid var(--bad); background: var(--bad-soft); }
.imp-row.is-saved { border-color: var(--ok); background: var(--ok-soft); }
.imp-row .ops-note { margin-top: 6px; }
.imp-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.imp-head strong { overflow-wrap: anywhere; color: var(--heading); }
.imp-n { font-size: 12px; color: var(--muted); min-width: 44px; }
.imp-list { margin: 6px 0 0; padding-left: 18px; font-size: 14px; display: grid; gap: 2px; }
.imp-list li { overflow-wrap: anywhere; }
.imp-errors { color: var(--bad); font-weight: 600; }
.imp-msg { margin: 6px 0 0; font-size: 14px; font-weight: 600; }
.imp-msg.is-ok { color: var(--ok); }
.imp-msg.is-error { color: var(--bad); }
.imp-file { display: block; margin: 8px 0; max-width: 100%; }
@media (max-width: 640px) { .imp-guide td:first-child { white-space: normal; } }

/* a [hidden] part of a tool (Bulk upload's "Same for every row" and Save bar before a file is picked) stays hidden */
.ops-d [hidden], .ops-list [hidden] { display: none !important; }
@media (min-width: 1024px) {
  .ls-shell[data-pane="detail"] .ops-d { padding: 0 12px 32px; }
}

/* the "..." sits beside the primary on the left of the column: its menu opens from the row's left edge, inside the screen */
.ops-actions { position: relative; }
/* item 18 (Sarah, 10/13/2026): the Employees search sits above the list, beside nothing, full width on a phone */
.ops-search { display: flex; gap: 8px; align-items: center; margin: 0 0 10px; }
.ops-search .input { flex: 1; min-width: 0; }
/* phone (Sarah 10/14/2026): the Search button is its icon only, so the placeholder has room */
@media (max-width: 640px) { .ops-search .btn > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }

/* ---------- J54 (Sarah 10/14/2026): the Operations overview's Schedule cards, column charts and defects due ---------- */
.sched-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 760px) { .sched-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.sched-card { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 92px; padding: 14px; border-radius: var(--r-3); background: var(--surface); border: 1px solid var(--line); color: inherit; text-decoration: none; transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.sched-card .icon { width: 20px; height: 20px; color: var(--accent-text); margin-bottom: 4px; }
.sched-n { font-family: var(--font-head); font-weight: 600; font-size: 16px; color: var(--heading); overflow-wrap: anywhere; }
.sched-h { font-size: 13px; font-weight: 600; color: var(--accent-text); }
a.sched-card:hover { background: var(--surface-2); border-color: var(--line-2); }
a.sched-card:focus-visible, .cc-g:focus-visible, .dd-chip:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sched-card.is-off { opacity: .7; }
.sched-card.is-off .icon, .sched-card.is-off .sched-h { color: var(--muted); }
.sched-card.is-soon .sched-h { color: var(--muted); } /* J54 send-back: Schedule not live here yet; the card opens the coming-soon page */

/* the chart palette: fixed slots 1-3 (blue, aqua, violet; no orange in the design system), validated for color-blind
   separation on light and dark surfaces; every column carries its value as text, so the aqua's lower contrast on light
   is relieved. A status series (Fleet's Down) wears the status color instead (.cc-bad), named in the legend. */
.cc { --cc-1: #2a78d6; --cc-2: #1baf7a; --cc-3: #4a3aa7; display: flex; flex-direction: column; gap: 10px; padding: 14px 14px 10px; border-radius: var(--r-3); background: var(--surface); border: 1px solid var(--line); }
html[data-theme="dark"] .cc { --cc-1: #3987e5; --cc-2: #199e70; --cc-3: #9085e9; }
.cc-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 0; list-style: none; font-size: 13px; color: var(--ink-2); }
.cc-legend li { display: inline-flex; align-items: center; gap: 6px; }
.cc-sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.cc-s1 { background: var(--cc-1); } .cc-s2 { background: var(--cc-2); } .cc-s3 { background: var(--cc-3); } .cc-bad { background: var(--bad); }
.cc-plot { display: flex; gap: 8px; }
.cc-g { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding: 4px 2px 2px; border-radius: var(--r-2); color: inherit; text-decoration: none; }
a.cc-g:hover { background: var(--surface-2); }
.cc-cols { display: flex; align-items: flex-end; justify-content: center; gap: 2px; height: 130px; padding-top: 20px; border-bottom: 1px solid var(--line-2); }
.cc-col { display: flex; align-items: flex-end; height: 100%; flex: 0 1 26px; min-width: 10px; }
.cc-bar { position: relative; width: 100%; border-radius: 4px 4px 0 0; min-height: 2px; }
.cc-bar.is-zero { height: 2px; opacity: .45; }
.cc-v { position: absolute; bottom: calc(100% + 3px); left: 50%; transform: translateX(-50%); font-family: var(--font-head); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.cc-x { font-size: 12px; font-weight: 600; line-height: 1.25; text-align: center; color: var(--ink-2); overflow-wrap: break-word; hyphens: manual; }
@media (max-width: 420px) { .cc-plot { gap: 4px; } .cc-x { font-size: 11px; } }
.cc-g:hover .cc-bar { filter: brightness(1.08); }
.cc-bar.h-0 { height: 0%; } .cc-bar.h-5 { height: 5%; } .cc-bar.h-10 { height: 10%; } .cc-bar.h-15 { height: 15%; } .cc-bar.h-20 { height: 20%; } .cc-bar.h-25 { height: 25%; } .cc-bar.h-30 { height: 30%; } .cc-bar.h-35 { height: 35%; } .cc-bar.h-40 { height: 40%; } .cc-bar.h-45 { height: 45%; } .cc-bar.h-50 { height: 50%; } .cc-bar.h-55 { height: 55%; } .cc-bar.h-60 { height: 60%; } .cc-bar.h-65 { height: 65%; } .cc-bar.h-70 { height: 70%; } .cc-bar.h-75 { height: 75%; } .cc-bar.h-80 { height: 80%; } .cc-bar.h-85 { height: 85%; } .cc-bar.h-90 { height: 90%; } .cc-bar.h-95 { height: 95%; } .cc-bar.h-100 { height: 100%; }
.cc-bar.is-zero { height: 2px; }

/* defects due: one figure and a chip per location, each opening that location's tickets */
.dd { display: flex; flex-direction: column; gap: 10px; }
.dd-total { display: flex; align-items: center; gap: 12px; margin: 0; }
.dd-fig { font-family: var(--font-head); font-size: 40px; font-weight: 700; line-height: 1; color: var(--heading); }
.dd-fig.bad { color: var(--bad); }
.dd-w { display: flex; flex-direction: column; font-family: var(--font-head); font-weight: 600; font-size: 17px; color: var(--heading); }
.dd-sub { font-family: var(--font-body); font-weight: 400; font-size: 13px; color: var(--muted); }
.dd-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.dd-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font-size: 14px; text-decoration: none; }
.dd-chip:hover { background: var(--surface-2); }
.dd-n { font-family: var(--font-head); font-weight: 700; color: var(--ink); }
.dd-chip.is-due .dd-n { color: var(--bad); }
.ops-locs-t { margin: 6px 0 8px; }

/* J360: Operations > Metrics (src/modules/metrics): location tabs, four 30-day charts, the drivers' week, uploads */
.mx-page { display: flex; flex-direction: column; gap: 16px; }
.mx-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.mx-tabs a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); color: inherit; text-decoration: none; font-size: 14px; }
.mx-tabs a.is-cur { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--accent-ink); font-weight: 600; }
.mx-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.mx-card { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-3); background: var(--surface); min-width: 0; }
.mx-card-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.mx-card-h b { font-family: var(--font-head); font-size: 22px; color: var(--ink); }
.mx-chart { display: block; width: 100%; height: 96px; overflow: visible; }
.mx-chart rect { fill: var(--accent); opacity: .85; }
.mx-chart rect:hover { opacity: 1; }
.mx-chart .mx-axis { stroke: var(--line-2); stroke-width: 1; }
.mx-chart text { font-size: 10px; fill: var(--muted); }
.mx-sec { display: flex; flex-direction: column; gap: 8px; }
.mx-sec-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.mx-sec-h .ops-block-t { margin: 0; }
.mx-week { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.mx-week a { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 8px; color: inherit; text-decoration: none; font-size: 18px; }
.mx-tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-3); }
.mx-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.mx-table th, .mx-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.mx-table th { font-size: 12px; color: var(--muted); font-weight: 600; background: var(--surface); }
.mx-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.mx-table tr:last-child td { border-bottom: 0; }
.mx-uploads { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.mx-uploads li { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-2, 8px); font-size: 14px; }
.mx-u-who { color: var(--muted); font-size: 13px; }
.mx-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; align-items: end; }
.mx-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.mx-form select, .mx-form input, .mx-erase input { font: inherit; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); color: var(--ink); min-height: 40px; }
.mx-msg { grid-column: 1 / -1; margin: 0; font-size: 14px; }
.mx-msg.is-bad { color: var(--bad, #b42318); }
.mx-erase { border-top: 1px solid var(--line); padding-top: 12px; }
.mx-erase summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.mx-erase form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.btn-danger { background: var(--bad, #b42318); border-color: var(--bad, #b42318); color: #fff; }
/* J360 layout: header above the chart inside each card; form fields never spill out of their column */
.mx-page .mx-card { display: flex; flex-direction: column; align-items: stretch; overflow: hidden; }
.mx-page .mx-card > .mx-chart { flex: none; width: 100%; max-width: 100%; height: 96px; }
.mx-page .mx-card-h { width: 100%; }
.mx-form label { min-width: 0; }
.mx-form input[type="file"] { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; font-size: 13px; }
.mx-msg:empty { display: none; }
/* J364: Metrics follow-up. ILS goal line and red under goal; "No data yet" in grey; sortable headers (a full-size tap target
   that keeps working while the table scrolls sideways on a phone). */
.mx-chart rect.is-bad { fill: var(--bad); }
.mx-chart .mx-goal { stroke: var(--bad); stroke-width: 1; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.mx-chart .mx-goal-t { fill: var(--bad); font-size: 9px; }
.mx-chart .mx-empty { font-size: 12px; fill: var(--muted); }
.mx-card-h b.is-bad, .mx-table td.is-bad { color: var(--bad); }
.mx-card-h b.is-none { font-family: inherit; font-size: 13px; font-weight: 500; color: var(--muted); }
.mx-card-h b small { margin-left: 4px; font-family: var(--font-body, inherit); font-size: 12px; font-weight: 500; color: var(--muted); }
.mx-table th[data-sort-key] { padding: 0; }
.mx-sort { display: flex; align-items: center; gap: 4px; width: 100%; min-height: 40px; padding: 8px 10px; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; white-space: nowrap; }
.mx-table th.num .mx-sort { justify-content: flex-end; }
.mx-sort:hover { color: var(--ink); }
.mx-sort:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.mx-table th[aria-sort="ascending"], .mx-table th[aria-sort="descending"] { color: var(--ink); }
.mx-sort-i { display: inline-block; min-width: 10px; font-size: 10px; }
.mx-foot { margin: 0; font-size: 12.5px; }
.mx-table th:first-child, .mx-table td:first-child { position: sticky; left: 0; background: var(--surface); z-index: 1; }
/* J364 after the screenshots: one surface behind the whole table (the sticky Driver column matched it); names may wrap so
   all 8 columns fit a desktop pane; ILS bars at or over the goal are a quiet grey, so the red ones under 99% stand out on
   a red-accent company; the goal label keeps a halo over the bars */
.mx-tablewrap { background: var(--surface); }
.mx-table td:first-child { white-space: normal; min-width: 130px; max-width: 190px; }
.mx-table td, .mx-table .mx-sort { padding-left: 8px; padding-right: 8px; }
.mx-card[data-mx="ils"] .mx-chart rect { fill: var(--muted); opacity: .4; }
.mx-card[data-mx="ils"] .mx-chart rect.is-bad { fill: var(--bad); opacity: 1; }
.mx-chart .mx-goal-t { paint-order: stroke; stroke: var(--surface); stroke-width: 3px; }

/* J365: Operations > Safety (src/modules/safety): status counts, events, the event detail, repeats, KI pass or fail */
.sf-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.sf-stat { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-3); background: var(--surface); color: inherit; text-decoration: none; }
.sf-stat b { font-family: var(--font-head); font-size: 22px; }
.sf-stat span { font-size: 12px; color: var(--muted); }
.sf-stat.is-bad b, .sf-ki td.is-bad .sf-n, .sf-stat.is-bad span { color: var(--bad); }
.sf-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.sf-filters label, .sf-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.sf-filters select, .sf-form input, .sf-form select, .sf-form textarea, .sf-act input { font: inherit; font-size: 14px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg, #fff); color: var(--ink); }
.sf-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.sf-form .sf-wide { flex: 1 1 100%; }
.sf-st { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--line); color: var(--ink); }
.sf-st-overdue { background: var(--bad); color: #fff; }
.sf-st-logged { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.sf-st-listed, .sf-st-linked { background: transparent; border: 1px solid var(--line); color: var(--muted); font-weight: 500; }
.sf-tag { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 4px; font-size: 11px; color: var(--muted); border: 1px solid var(--line); }
.sf-tag-live { color: var(--accent-ink, var(--ink)); background: var(--accent-fill); border-color: var(--accent-fill); }
.sf-by, .sf-sub { display: block; font-size: 11px; color: var(--muted); font-weight: 400; }
.sf-none { color: var(--muted); font-style: italic; }
.sf-step { font-size: 12px; font-weight: 600; }
.sf-step-tell_sarah { color: var(--ink); }
.sf-step-writeup { color: var(--bad); }
.sf-detail { padding: 14px; border: 1px solid var(--line); border-radius: var(--r-3); background: var(--surface); }
.sf-close { margin-left: auto; font-size: 14px; }
.sf-dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; font-size: 14px; }
.sf-dl dt { color: var(--muted); }
.sf-dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.sf-writeup { display: block; color: var(--bad); }
.sf-act { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.sf-act label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); flex: 1 1 220px; }
.sf-fold > summary { cursor: pointer; }
.sf-trucks { margin: 0; padding-left: 18px; font-size: 14px; }
.sf-events td:first-child a { white-space: nowrap; }
@media (max-width: 600px) { .sf-dl { grid-template-columns: 1fr; } .sf-dl dt { margin-top: 6px; } }
.sf-sample { margin: 0; padding: 10px 12px; border: 1px dashed var(--line-2); border-radius: var(--r-3); font-size: 14px; }
.sf-events th, .sf-events td, .sf-repeats td { white-space: normal; }
.sf-events td:first-child, .sf-events td:nth-child(3) { white-space: nowrap; }
.sf-events .sf-tag { margin: 2px 0 0; }
.sf-events .sf-st { white-space: normal; line-height: 1.3; }

/* J373: the SPOTlight Signature period card and the upload's confirm step */
.mx-sigp-range { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.mx-sigp-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; margin: 0; }
.mx-sigp-facts div { display: flex; flex-direction: column; }
.mx-sigp-facts dt { font-size: 12px; color: var(--muted); }
.mx-sigp-facts dd { margin: 0; font-family: var(--font-head); font-size: 17px; color: var(--ink); font-variant-numeric: tabular-nums; }
.mx-sigp-alc { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.mx-confirm { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); }
.mx-confirm h3 { margin: 0 0 6px; font-size: 16px; color: var(--heading, var(--ink)); }
.mx-confirm p { margin: 4px 0; font-size: 14px; }
.mx-confirm .mx-form { margin-top: 8px; }
.mx-confirm .is-bad { color: var(--bad, #b42318); }
.mx-confirm .is-good { color: var(--good, #067647); }
.mx-confirm ul { margin: 4px 0 0; padding-left: 20px; font-size: 14px; }
.mx-confirm .mx-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
