/* LastStop style kit (J369, Joshua 10/27/2026 8:56 PM ET: "I like it so much i want it to match across the whole redesign").
   The JCruz Home's look after J363 and J367, pulled into one layer loaded LAST on every page (src/pages/common.mjs
   LS_LAYERS) but scoped to html[data-kit], which only the JCruz space carries (Joshua 8:59 PM ET: "keep it to JCruz";
   common.mjs KIT_COMPANIES / kitAttr), so each page reads like the Home without any layout, data, route or menu change. Colors come only from the
   role tokens, which brandStyle (src/pages/brand.mjs) fills from the company: JCruz red, Kept Staffed, JCruz Motors and
   JP's RV each keep their own accent; light and dark both work because every value here is a token or a theme shadow.

   The kit's own classes (new markup uses these; the Home keeps its .ov-* names, which these mirror):
     .k-head / .k-h / .k-h-i / .k-link  section header: icon chip, title, "Open ..." link on the right
     .k-card (a.k-card lifts on hover)  16 px corners, very soft shadow
     .k-num / .k-label                  big number in the display font, muted label
     .k-chip.is-bad / .is-warn          a number that needs attention, on a soft tint
     .k-dot.is-good / .is-warn / .is-bad health dot
     .k-pill.is-good / .is-gold / .is-bad goal pill (green at or above goal, gold, red under)
     .k-none                            "No data yet" in muted grey (never a bare dash)
     .k-sub                             the quiet line under a page title (date or count)
     .k-tbl                             the Metrics table's style
   Below them, the existing shared surfaces (cards, panels, tables, stat tiles, empty states) are mapped onto the same look. */

html[data-kit] {
  --k-r: 16px;
  --k-shadow: 0 1px 2px rgba(22, 24, 29, .04), 0 6px 18px rgba(22, 24, 29, .05);
  --k-shadow-up: 0 2px 4px rgba(22, 24, 29, .06), 0 12px 28px rgba(22, 24, 29, .09);
}
html[data-kit][data-theme="dark"] {
  --k-shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 6px 18px rgba(0, 0, 0, .22);
  --k-shadow-up: 0 2px 6px rgba(0, 0, 0, .45), 0 14px 32px rgba(0, 0, 0, .35);
}

/* ---------- the kit's own pieces ---------- */
/* the gold tier (pills, chips, dots, bars, keys, edges) reads --gold / --gold-soft / --gold-bar, the kit's brighter gold
   from brandStyle (J389, src/pages/brand.mjs GOLD and DARK), never the app-wide review --rev */
html[data-kit] .k-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; margin: 0 0 6px; }
html[data-kit] .k-h { display: inline-flex; align-items: center; gap: 10px; margin: 0; font-family: var(--font-head); font-size: var(--fs-3); font-weight: 600; letter-spacing: -.01em; color: var(--heading, var(--ink)); }
html[data-kit] .k-h-i { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 30px; height: 30px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-text); }
html[data-kit] .k-h-i .icon { width: 17px; height: 17px; }
html[data-kit] .k-link { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; font-weight: 600; font-size: 14px; color: var(--accent-text); text-decoration: none; white-space: nowrap; }
html[data-kit] .k-link .icon { width: 16px; height: 16px; }
html[data-kit] .k-link:hover span { text-decoration: underline; text-underline-offset: 3px; }
html[data-kit] .k-link:focus-visible, html[data-kit] a.k-card:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
html[data-kit] .k-card { padding: 16px 18px; border-radius: var(--k-r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--k-shadow); }
html[data-kit] a.k-card { display: block; color: inherit; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
html[data-kit] a.k-card:hover { transform: translateY(-2px); box-shadow: var(--k-shadow-up); }
html[data-kit] .k-num { font-family: var(--font-head); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; color: var(--heading, var(--ink)); }
html[data-kit] .k-label { color: var(--muted); }
html[data-kit] .k-chip { display: inline-block; padding: 2px 9px; border-radius: 10px; font-weight: 600; }
html[data-kit] .k-chip.is-bad { background: var(--bad-soft); color: var(--bad); }
html[data-kit] .k-chip.is-warn { background: var(--gold-soft); color: var(--gold); }
html[data-kit] .k-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--neu); vertical-align: middle; }
html[data-kit] .k-dot.is-good { background: var(--ok); } html[data-kit] .k-dot.is-warn { background: var(--gold-bar); } html[data-kit] .k-dot.is-bad { background: var(--bad); }
html[data-kit] .k-pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-weight: 600; line-height: 1.35; white-space: nowrap; }
html[data-kit] .k-pill.is-good { background: var(--ok-soft); color: var(--ok); }
html[data-kit] .k-pill.is-gold, html[data-kit] .ov-pill.is-gold { background: var(--gold-soft); color: var(--gold); }
html[data-kit] .ov-loc.is-warn { box-shadow: inset 0 var(--stripe-w, 3px) 0 var(--gold-bar), var(--ov-shadow); }
html[data-kit] .ov-loc.is-warn:hover { box-shadow: inset 0 var(--stripe-w, 3px) 0 var(--gold-bar), var(--ov-shadow-up); }
html[data-kit] .k-pill.is-bad { background: var(--bad-soft); color: var(--bad); }
html[data-kit] .k-none { font-family: var(--font-body, inherit); font-size: 12.5px; font-weight: 500; color: var(--muted); white-space: nowrap; }
html[data-kit] .k-sub { flex-basis: 100%; margin: 0; font-size: 14px; font-weight: 500; color: var(--muted); }
html[data-kit] .k-tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
html[data-kit] .k-tbl th, html[data-kit] .k-tbl td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
html[data-kit] .k-tbl th { font-size: 12px; font-weight: 600; color: var(--muted); }
html[data-kit] .k-tbl .num { text-align: right; font-family: var(--font-head); font-variant-numeric: tabular-nums; }
html[data-kit] .k-tbl tr:last-child td { border-bottom: 0; }

/* ---------- the existing shared surfaces, mapped onto the kit ---------- */
/* cards: 16 px corners and the Home's very soft shadow (Operations charts and schedule cards, Metrics, Safety, Time off,
   Attendance, the attention cards, Settings, the applicant card's First Advantage box, every table frame) */
html[data-kit] .cc, html[data-kit] .sched-card, html[data-kit] .mx-card, html[data-kit] .mx-tablewrap, html[data-kit] .sf-stat, html[data-kit] .sf-sample, html[data-kit] section.panel, html[data-kit] .acard, html[data-kit] .card-facts, html[data-kit] .fx-card, html[data-kit] .pay-scroll, html[data-kit] .hz-scroll, html[data-kit] .grid-wrap, html[data-kit] .dash-card, html[data-kit] .stat-card {
  border-radius: var(--k-r); border-color: var(--line); box-shadow: var(--k-shadow);
}
html[data-kit] .fx-card { background: var(--surface); }
/* clickable cards lift gently on hover (no other motion) */
html[data-kit] a.sched-card, html[data-kit] a.sf-stat, html[data-kit] a.acard, html[data-kit] a.cc-g {
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
}
html[data-kit] a.sched-card:hover, html[data-kit] a.sf-stat:hover, html[data-kit] a.acard:hover { transform: translateY(-2px); box-shadow: var(--k-shadow-up); }
@media (prefers-reduced-motion: reduce) { html[data-kit] a.sched-card, html[data-kit] a.sf-stat, html[data-kit] a.acard, html[data-kit] a.k-card { transition: none; } html[data-kit] a.sched-card:hover, html[data-kit] a.sf-stat:hover, html[data-kit] a.acard:hover, html[data-kit] a.k-card:hover { transform: none; } }

/* Operations' section headers read like the Home's (icon chip, title, Open link on the right) */
html[data-kit] .ops-block .k-head { margin-bottom: 4px; }
html[data-kit] .ops-block .k-h .ops-block-t { margin: 0; font-size: inherit; }

/* big numbers in the display font, labels muted; a number that needs attention sits on a soft tint */
html[data-kit] .sf-stat b, html[data-kit] .mx-card-h b, html[data-kit] .dd-fig, html[data-kit] .acard-n, html[data-kit] .sched-n { font-family: var(--font-head); font-variant-numeric: tabular-nums; }
html[data-kit] .sf-stat b { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
html[data-kit] .sf-stat.is-bad b, html[data-kit] .mx-card-h b.is-bad { align-self: flex-start; padding: 2px 9px; margin-left: -2px; border-radius: 10px; background: var(--bad-soft); color: var(--bad); }
html[data-kit] .mx-card-h b.is-bad { align-self: auto; }
html[data-kit] .sf-stat.is-bad span { color: var(--muted); }
html[data-kit] .dd-chip.is-due .dd-n { padding: 0 7px; border-radius: 8px; background: var(--bad-soft); color: var(--bad); }

/* tables in the Metrics table's style: muted 12 px headers (no capitals), row lines, numbers right-aligned in the
   display font; the Applicants and Payroll grids keep their own columns and cell colors */
html[data-kit] .pay-grid th, html[data-kit] .grid-table th { font-size: 12px; letter-spacing: 0; text-transform: none; color: var(--muted); font-weight: 600; }
html[data-kit] .pay-grid th { background: var(--surface); }
html[data-kit] .pay-scroll, html[data-kit] .hz-scroll { background: var(--surface); }
html[data-kit] .grid-table td.num, html[data-kit] .grid-table th.num, html[data-kit] .pay-grid td.num, html[data-kit] .pay-grid th.num { text-align: right; font-variant-numeric: tabular-nums; }
html[data-kit] .mx-table td.num, html[data-kit] .sf-ki td.num { font-family: var(--font-head); }
html[data-kit] .mx-table td.is-none, html[data-kit] .mx-table td .k-none { font-family: var(--font-body, inherit); }
html[data-kit] .mx-table td .k-pill { padding: 1px 8px; }
html[data-kit] .mx-table td.is-bad .k-pill { color: var(--bad); }

/* empty states: quiet, rounded like the cards */
html[data-kit] .empty { border-radius: var(--k-r); background: color-mix(in srgb, var(--surface) 55%, transparent); }
html[data-kit] .list-empty, html[data-kit] .mx-empty { color: var(--muted); }

/* page header: the title with a quiet date line under it (ops/ui.mjs title) */
html[data-kit] .ops-title .k-sub { margin-top: -2px; }

@media (max-width: 759px) {
  html[data-kit] .k-h-i { width: 26px; height: 26px; border-radius: 8px; }
  html[data-kit] .k-h-i .icon { width: 15px; height: 15px; }
}

/* the Metrics drivers table keeps every column in its pane on a 1366 laptop (J364) with the pills and "No data yet" */
html[data-kit] .mx-table td .k-none { font-size: 11.5px; }
@media (min-width: 1024px) and (max-width: 1599px) {
  html[data-kit] .mx-table td, html[data-kit] .mx-table .mx-sort { padding-left: 6px; padding-right: 6px; }
  html[data-kit] .mx-table td .k-pill { padding: 1px 5px; }
}

/* J380 (Joshua 10/27/2026 11:38 and 11:40 PM ET, "center the columns", "widen the page"): Metrics takes the Home's
   1480 px column from 1024 px; every number column of the Drivers table is centered, header and cell on one line, the
   header's words centered with the sort arrow balanced by an empty twin on the left; the Driver column stays left and
   fixed when the table scrolls sideways. 1200 px and up: the seven number columns share 77% evenly and names stay on
   one line (a longer name widens the Driver column, never wraps). Under 1200 px: fixed even widths and the table
   scrolls sideways under the fixed Driver column (names may take two lines there, as before). */
@media (min-width: 1024px) { html[data-kit] .ls-shell:has(.mx-page) { --col: 1480px; } }
@media (min-width: 1200px) and (max-width: 1599px) { html[data-kit] .mx-charts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1600px) { html[data-kit] .mx-charts { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); } }
html[data-kit] .mx-table th.num, html[data-kit] .mx-table td.num { text-align: center; }
html[data-kit] .mx-table th.num .mx-sort { justify-content: center; text-align: center; white-space: normal; }
html[data-kit] .mx-table th.num .mx-sort::before { content: ''; flex: none; width: 10px; }
html[data-kit] .mx-table .mx-sort-i { flex: none; width: 10px; min-width: 0; text-align: center; }
html[data-kit] .mx-table .mx-sort-t { min-width: 0; }
html[data-kit] .mx-table .mx-sort-sub { display: block; font-weight: 500; font-size: 11px; }
html[data-kit] .mx-table th { vertical-align: middle; }
@media (min-width: 1200px) {
  html[data-kit] .mx-table th.num { width: 11%; }
  html[data-kit] .mx-table td:first-child { white-space: nowrap; max-width: none; }
}
@media (max-width: 1199px) {
  html[data-kit] .mx-table { table-layout: fixed; width: max(100%, 860px); }
  html[data-kit] .mx-table th:first-child { width: 160px; }
  html[data-kit] .mx-table td:first-child { min-width: 0; max-width: none; overflow-wrap: anywhere; }
  html[data-kit] .mx-table th:first-child, html[data-kit] .mx-table td:first-child { box-shadow: inset -1px 0 0 var(--line); }
  html[data-kit] .mx-table td, html[data-kit] .mx-table .mx-sort { padding-left: 6px; padding-right: 6px; }
  html[data-kit] .mx-table td .k-pill { padding: 1px 6px; }
}

/* batch 2, Hiring: the dashboard's stage and First Advantage tiles are kit cards that lift on hover; each section header
   carries the Home's icon chip (app.js dashBlock) */
html[data-kit] a.stage-tile, html[data-kit] a.stat-tile { border-radius: var(--k-r); box-shadow: var(--k-shadow); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease; }
html[data-kit] a.stage-tile:hover, html[data-kit] a.stat-tile:hover { transform: translateY(-2px); box-shadow: var(--k-shadow-up); }
html[data-kit] .dash-bh { align-items: center; }
html[data-kit] .dash-bh .k-h h3 { margin: 0; font-size: inherit; }
html[data-kit] .stage-tile .num, html[data-kit] .stat-tile .num { font-family: var(--font-head); font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { html[data-kit] a.stage-tile, html[data-kit] a.stat-tile { transition: none; } html[data-kit] a.stage-tile:hover, html[data-kit] a.stat-tile:hover { transform: none; } }


/* J385 (Joshua 10/28/2026 7:59 AM ET, "the same colors for the charts above"): Metrics chart bars wear their own value's
   goal tier with the table pills' tokens (green --ok, gold --gold-bar since J389, red --bad), a chart with no goal (Stops) is neutral grey
   so red always means under goal, goal lines are faint dashes, the latest number sits on its pill, one small legend, and a
   hover/tap tip with the day, the value and the tier in words (metrics.js) */
html[data-kit] .mx-card .mx-chart rect { fill: var(--muted); opacity: .5; }
html[data-kit] .mx-card .mx-chart rect.is-good { fill: var(--ok); opacity: .9; }
html[data-kit] .mx-card .mx-chart rect.is-gold { fill: var(--gold-bar); opacity: 1; }
html[data-kit] .mx-card .mx-chart rect.is-bad { fill: var(--bad); opacity: .9; }
html[data-kit] .mx-card .mx-chart rect.is-hot { opacity: 1; stroke: var(--ink); stroke-width: 1.5px; vector-effect: non-scaling-stroke; }
html[data-kit] .mx-card .mx-chart .mx-goal { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; opacity: .65; vector-effect: non-scaling-stroke; }
html[data-kit] .mx-card .mx-chart .mx-goal-t { fill: var(--muted); font-size: 9px; }
html[data-kit] .mx-card-h b .k-pill { font-size: inherit; line-height: 1.2; }
html[data-kit] .mx-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: -2px 0 12px; font-size: 12px; color: var(--muted); }
html[data-kit] .mx-legend span { display: inline-flex; align-items: center; gap: 6px; }
html[data-kit] .mx-legend .mx-legend-tip { margin-left: auto; }
html[data-kit] .mx-key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--muted); opacity: .5; }
html[data-kit] .mx-key.is-good { background: var(--ok); opacity: .9; }
html[data-kit] .mx-key.is-gold { background: var(--gold-bar); opacity: 1; }
html[data-kit] .mx-key.is-bad { background: var(--bad); opacity: .9; }
html[data-kit] .mx-tip { position: fixed; z-index: 80; pointer-events: none; width: max-content; max-width: min(320px, calc(100vw - 16px)); padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink); box-shadow: var(--k-shadow-up); font-size: 12px; line-height: 1.35; transform: translate(-50%, calc(-100% - 8px)); }
html[data-kit] .mx-tip[hidden] { display: none; }
html[data-kit] .mx-tip b { display: block; font-weight: 600; }
@media (max-width: 599px) { html[data-kit] .mx-legend .mx-legend-tip { margin-left: 0; flex-basis: 100%; } }

/* outside the JCruz space (no data-kit) the kit's small markup additions stay hidden, so those pages look exactly as
   before: the icon chips beside section titles and the date line under page titles */
html:not([data-kit]) .k-h-i, html:not([data-kit]) .k-sub { display: none; }
html:not([data-kit]) .k-head .k-h, html:not([data-kit]) .dash-bh .k-h { display: contents; }

/* J387 (Joshua 10/28/2026): attendance on each shift in the Schedule week (src/modules/attendance/week.mjs shiftStatus),
   the check-ins of people not on a route, and the 90-day attendance card on the Employees panel. Times only, never where. */
html[data-kit] .sa-chip { display: inline-block; max-width: 100%; margin: .15rem .2rem 0 0; padding: 0 .35rem; border-radius: 999px; font-size: .72rem; font-weight: 600; line-height: 1.45; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; border: 1px solid transparent; }
html[data-kit] .sa-chip.is-arrived { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
html[data-kit] .sa-chip.is-late, html[data-kit] .sa-chip.is-not_in, html[data-kit] .sa-chip.is-left_early { color: var(--gold); background: var(--gold-soft); }
html[data-kit] .sa-chip.is-not_in { background: transparent; border-color: currentColor; border-style: dashed; }
html[data-kit] .sa-chip.is-no_show { color: var(--bad); background: color-mix(in srgb, var(--bad) 24%, transparent); font-weight: 800; }
html[data-kit] .sa-chip.is-callout { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); }
html[data-kit] .sa-ins { display: flex; flex-wrap: wrap; justify-content: center; gap: .1rem .2rem; margin-top: .2rem; }
html[data-kit] .sa-ins .sa-chip { display: inline-block; margin: 0; }
html[data-kit] .ed-att { margin-top: .8rem; }
html[data-kit] .ed-att-n { display: flex; flex-wrap: wrap; gap: .35rem; margin: .3rem 0 .5rem; }
html[data-kit] .ed-att-l { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; font-size: .9em; }
html[data-kit] .ed-att-l li { display: flex; flex-wrap: wrap; gap: .2rem .5rem; align-items: center; }

/* J390 (Joshua 10/28/2026, "just the color indicator; when hovering show the attendance, small and short"): in the Schedule
   week attendance is the name pill's coloured left edge, never a second line, so a row with attendance is as tall as one
   without. The pill keeps its role colour (Driver blue, BC teal, Trainee green, Helper purple); a thin surface-coloured line
   separates the edge from it so a green or purple edge reads on any role. Hover / tap line: public/assets/ls/sched-tip.js. The edge colours sit beside the role colours in payroll.css. */
html[data-kit] .att-arrived { --att: var(--att-arrived); } html[data-kit] .att-late { --att: var(--att-late); }
html[data-kit] .att-no_show { --att: var(--att-no_show); } html[data-kit] .att-callout { --att: var(--att-callout); }
html[data-kit] .att-left_early { --att: var(--att-left_early); } html[data-kit] .att-not_in { --att: var(--att-not_in); }
html[data-kit] .sched-page .sched-pill.is-in { background: var(--surface-2); border-color: var(--line-2); font-size: 12px; }
html[data-kit] .sched-page .sched-pill.is-in .sched-name { color: var(--ink-2); font-weight: 500; }
html[data-kit] .sched-page .sched-pill.has-att { border-left: 5px solid var(--att); border-top-left-radius: 6px; border-bottom-left-radius: 6px; padding-left: 7px; box-shadow: inset 2px 0 0 var(--surface); }
html[data-kit] .sched-page .sched-pill.has-att.att-not_in { position: relative; border-left-color: transparent; }
html[data-kit] .sched-page .sched-pill.has-att.att-not_in::before { content: ""; position: absolute; left: -5px; top: -1px; bottom: -1px; width: 5px; border-radius: 6px 0 0 6px; background: repeating-linear-gradient(180deg, var(--att) 0 4px, var(--surface) 4px 7px); }
html[data-kit] .sa-ins .sched-pill { height: 22px; max-width: 100%; }
html[data-kit] .sa-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html[data-kit] .sched-akeys { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding-left: 10px; border-left: 1px solid var(--line-2); }
html[data-kit] .sched-akey { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-2); }
html[data-kit] .sched-akey::before { content: ""; width: 5px; height: 13px; border-radius: 2px; background: var(--att); }
html[data-kit] .sched-akey.att-not_in::before { background: repeating-linear-gradient(180deg, var(--att) 0 4px, transparent 4px 7px); }
@media (max-width: 700px) { html[data-kit] .sched-akeys { padding-left: 0; border-left: 0; } }
html[data-kit] .sa-tip { position: fixed; z-index: 80; pointer-events: none; width: max-content; max-width: min(240px, calc(100vw - 12px)); padding: 4px 9px 4px 8px; border-radius: 8px; border: 1px solid var(--line-2); border-left: 4px solid var(--att, var(--line-2)); background: var(--surface-2); color: var(--ink); box-shadow: var(--k-shadow-up); font-size: 12px; font-weight: 600; line-height: 1.35; }
html[data-kit] .sa-tip[hidden] { display: none; }
html[data-kit] .sa-tip small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); }
