/* Shop Mode (Josh, 2026-11-26: "full shop mode ui edit ... professional easy to use").
   The floor's screens read like a traveler or a cut list: a band across the top
   says where your clock is, one action sits under it, and the work is ruled
   lines with the mark in heavy type. Colour means status and nothing else:
   green is go and on the clock, amber is waiting or held, red is stop. The
   brand rust marks WMK and the tab you are on, never a button.

   Two halves. The .fl-* parts are the floor's own pieces and work on any page
   that draws them (a foreman's clock outside Shop Mode too). The body.shopmode
   rules are the frame: the one-row bar, the tabs along the bottom, and the
   squared-off controls on every page a held employee opens. Every colour is a
   token from app.css (rule 32). */

@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("fonts/ibm-plex-sans-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans Condensed"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("fonts/ibm-plex-sans-condensed-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("fonts/ibm-plex-mono-latin-600-normal.woff2") format("woff2"); }

:root {
  --fl-sans: "IBM Plex Sans", system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --fl-cond: "IBM Plex Sans Condensed", "Arial Narrow", "IBM Plex Sans", system-ui, sans-serif;   /* marks and headings */
  --fl-mono: "IBM Plex Mono", ui-monospace, Consolas, "Courier New", monospace;   /* time, hours, heats: 0 and O, 1 and l differ */
  --fl-go: var(--tint-good-ink);   /* the green of the band and the one main button: white on it 7.6:1 */
  --fl-tabs-h: 64px;
}

/* ---------- the floor's pieces ---------- */

/* the band: where your clock is, read from across the bay */
.fl-band { display: flex; flex-direction: column; gap: 4px; padding: 14px 18px 16px; color: #fff;
  background: var(--muted); font-family: var(--fl-sans); }
.fl-band.task, .fl-band.onjob { background: var(--fl-go); }
.fl-band.lunch, .fl-band.break { background: var(--accent); }
.fl-band.available { background: var(--tint-warn); color: var(--ink); box-shadow: inset 0 -3px 0 var(--warn); }
.fl-band-lbl { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font: 600 13px/1.3 var(--fl-mono); letter-spacing: .06em; text-transform: uppercase; }
.fl-band-title { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 16px; flex-wrap: wrap;
  margin: 0; font: 700 34px/1.1 var(--fl-cond); letter-spacing: .005em; }
.fl-band-time { font: 600 28px/1 var(--fl-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fl-band-sub { margin: 0; font-size: 15px; line-height: 1.4; }
.fl-band a { color: inherit; text-decoration: underline; }
/* the same band, one line tall, on every other page */
.fl-band.slim { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 6px 14px; padding: 8px 18px;
  position: sticky; top: var(--hdr-h, 0px); z-index: 20; margin: 0 0 14px; }
.fl-band.slim .fl-band-lbl { font-size: 12px; }
.fl-band.slim .fl-band-title { font-size: 20px; }
.fl-band.slim .fl-band-time { font-size: 17px; }
.fl-band.slim .fl-band-acts { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.fl-band.slim .fl-band-acts form { margin: 0; }
.fl-band .fl-btn { border-color: #fff; background: transparent; color: #fff; }
.fl-band.available .fl-btn { border-color: var(--ink); color: var(--ink); }

/* buttons: one green one per screen, dark for the next step on a line, outlined for the rest */
.fl-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; box-sizing: border-box;
  min-height: 48px; padding: 8px 16px; border: 2px solid var(--ink); border-radius: 4px; background: var(--panel);
  color: var(--ink); font: 600 16px/1.2 var(--fl-sans); text-align: center; text-decoration: none; cursor: pointer; }
.fl-btn:hover { text-decoration: none; background: var(--bg); }
.fl-btn:active { transform: translateY(1px); }
.fl-btn.go { min-height: 64px; width: 100%; border-color: var(--fl-go); background: var(--fl-go); color: #fff; font-size: 21px; font-weight: 700; }
.fl-btn.go:hover { background: var(--fl-go); }
.fl-btn.ink { background: var(--ink); color: #fff; }
.fl-btn.ink:hover { background: var(--ink); }
.fl-btn.stop { border-color: var(--bad); color: var(--tint-bad-ink); }
.fl-btn.sm { min-height: 42px; padding: 6px 12px; font-size: 15px; }
.fl-btn.wide { width: 100%; }
.fl-btn small { font: 400 13px/1.2 var(--fl-sans); }
.fl-btn.go small { display: block; }
.fl-btn:disabled { opacity: .55; cursor: default; }

/* the action area under the band */
.fl-act { display: flex; flex-direction: column; gap: 10px; padding: 14px 18px; background: var(--panel);
  border-bottom: 1px solid var(--line); }
.fl-act form { margin: 0; }
.fl-act p { margin: 0; }
.fl-btnrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.fl-btnrow form { margin: 0; display: flex; }
.fl-btnrow .fl-btn { width: 100%; }
.fl-note { margin: 0; font-size: 14px; color: var(--muted); }

/* hours: three numbers on one strip */
.fl-hours { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--panel); border-bottom: 1px solid var(--line); }
.fl-hours > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 18px; border-right: 1px solid var(--line); min-width: 0; }
.fl-hours > div:last-child { border-right: 0; }
.fl-hours span { font-size: 13px; color: var(--muted); }
.fl-hours b { font: 600 19px/1.15 var(--fl-mono); font-variant-numeric: tabular-nums; }
.fl-hours small { font-size: 12px; color: var(--muted); }

/* a section of lines */
.fl-sec { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 0; padding: 18px 18px 7px;
  font: 600 13px/1.2 var(--fl-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.fl-sec a { font: 600 14px/1.2 var(--fl-sans); letter-spacing: 0; text-transform: none; }
.fl-list { background: var(--panel); border-top: 1px solid var(--line); }
.fl-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 14px; min-height: 60px;
  padding: 10px 18px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
a.fl-row:hover { background: var(--bg); text-decoration: none; }
.fl-row form { margin: 0; }
.fl-row.now { box-shadow: inset 4px 0 0 var(--fl-go); }
.fl-row.urgent { box-shadow: inset 4px 0 0 var(--bad); }
.fl-t1 { font: 600 17px/1.3 var(--fl-sans); overflow-wrap: anywhere; }
.fl-t2 { font-size: 14px; line-height: 1.4; color: var(--muted); overflow-wrap: anywhere; }
.fl-mark { font: 700 24px/1.1 var(--fl-cond); letter-spacing: .01em; overflow-wrap: anywhere; }
.fl-n { font: 600 20px/1 var(--fl-mono); font-variant-numeric: tabular-nums; }
.fl-go { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 76px; padding: 6px 14px;
  border: 2px solid var(--ink); border-radius: 4px; background: var(--panel); color: var(--ink);
  font: 600 15px/1.2 var(--fl-sans); text-decoration: none; cursor: pointer; white-space: nowrap; }
.fl-go.fill { background: var(--ink); color: #fff; }
a.fl-row .fl-go { pointer-events: none; }   /* the whole line is the link */
.fl-jobhd { margin: 0; padding: 9px 18px 7px; background: var(--bg); border-bottom: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.fl-jobhd b { font: 600 15px/1 var(--fl-mono); color: var(--ink); margin-right: 6px; }
.fl-empty { margin: 0; padding: 16px 18px; background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); }
.fl-row .badge, .fl-mark .badge { font-family: var(--fl-sans); vertical-align: 3px; }

/* a line that opens: the form or detail sits beneath it (rule 58) */
details.fl-fold { background: var(--panel); border-bottom: 1px solid var(--line); }
details.fl-fold > summary { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 18px; cursor: pointer;
  font: 600 17px/1.3 var(--fl-sans); }
details.fl-fold > summary::marker { color: var(--muted); }
details.fl-fold > summary .fl-t2 { font-weight: 400; }
details.fl-fold > summary .fl-n { margin-left: auto; }
details.fl-fold > .fl-fold-body { padding: 4px 18px 16px; }
.fl-list > details.fl-fold:last-child, .fl-list > .fl-row:last-child { border-bottom: 0; }
.fl-list { border-bottom: 1px solid var(--line); }

/* the clock page: one column on a small tablet held upright, two from 900px */
.fl-page { max-width: 1180px; margin: 0 auto; font-family: var(--fl-sans); }
.fl-page.narrow { max-width: 720px; }
.fl-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 22px; align-items: start; }
.fl-col { min-width: 0; }
@media (min-width: 900px) {
  .fl-cols { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .fl-cols.one { grid-template-columns: minmax(0, 1fr); }
  .fl-col > .fl-sec:first-child { padding-top: 4px; }
}
.fl-frame { border: 1px solid var(--line); background: var(--panel); }
.fl-who { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 12px; flex-wrap: wrap; margin: 0 0 8px;
  font-size: 14px; color: var(--muted); }
.fl-who strong { font: 700 20px/1.2 var(--fl-cond); color: var(--ink); margin-right: 6px; }

/* the scan box */
.fl-scan { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.fl-scan input, .fl-field input, .fl-field select, .fl-field textarea { min-height: 48px; padding: 8px 12px; border: 2px solid var(--line);
  border-radius: 4px; font: 400 17px/1.3 var(--fl-sans); width: 100%; max-width: none; box-sizing: border-box; background: var(--panel); color: var(--ink); }
.fl-field { display: block; margin: 0 0 10px; font: 600 14px/1.3 var(--fl-sans); }
.fl-field > span { font-weight: 400; color: var(--muted); }
.fl-field input, .fl-field select, .fl-field textarea { margin-top: 4px; }
.fl-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 10px; }

/* the mark's page */
.fl-markhd { padding: 16px 18px; background: var(--panel); border: 1px solid var(--line); border-bottom: 0; }
.fl-markhd .fl-mark { font-size: 44px; line-height: 1; }
.fl-markhd .fl-t2 { font-size: 15px; }
.fl-markhd .fl-at { margin: 8px 0 0; font-size: 17px; }
.fl-facts { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 8px 0 0; font-size: 15px; }
.fl-facts b { font-weight: 600; }
.fl-alert { padding: 12px 18px; background: var(--tint-warn); color: var(--ink); border: 1px solid var(--line); border-bottom: 0;
  box-shadow: inset 4px 0 0 var(--warn); font-size: 15px; }
.fl-alert.bad { background: var(--tint-bad); box-shadow: inset 4px 0 0 var(--bad); }
.fl-alert.good { background: var(--tint-good); box-shadow: inset 4px 0 0 var(--good); }
.fl-alert strong { display: block; font-size: 17px; }
.fl-alert form { margin: 8px 0 0; }
.fl-stepper { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fl-stepper input { width: 84px; min-height: 48px; text-align: center; font: 600 22px/1 var(--fl-mono); border: 2px solid var(--line); border-radius: 4px; }
.fl-stepper .fl-btn { min-width: 48px; }

html[data-text="large"] .fl-t1 { font-size: 19px; }
html[data-text="large"] .fl-t2, html[data-text="large"] .fl-note, html[data-text="large"] .fl-band-sub { font-size: 16px; }
html[data-text="large"] .fl-btn { font-size: 18px; }
html[data-text="large"] .fl-hours span, html[data-text="large"] .fl-sec { font-size: 14px; }

@media (max-width: 560px) {
  .fl-band, .fl-act, .fl-row, .fl-sec, .fl-jobhd, details.fl-fold > summary, .fl-markhd, .fl-alert { padding-left: 14px; padding-right: 14px; }
  .fl-hours > div { padding: 10px 12px; }
  .fl-band-title { font-size: 28px; }
  .fl-band-time { font-size: 24px; }
  details.fl-fold > .fl-fold-body { padding-left: 14px; padding-right: 14px; }
  .fl-markhd .fl-mark { font-size: 38px; }
}

/* ---------- the Shop Mode frame ---------- */

body.shopmode { font-family: var(--fl-sans); padding-bottom: calc(var(--fl-tabs-h) + env(safe-area-inset-bottom, 0px)); }
body.shopmode main { margin-top: 14px; padding: 0 16px; }
body.shopmode h1 { font: 700 30px/1.15 var(--fl-cond); }
body.shopmode h2 { font-family: var(--fl-cond); }

/* the bar: one row. The shop, then Messages, Alerts and your name. */
header.topbar.shop { position: sticky; top: 0; flex-wrap: nowrap; gap: 12px; min-height: 52px; padding: 0 16px; }
.topbar.shop nav { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; margin: 0; min-width: 0; }
.topbar.shop .brand { margin-right: 0; font: 700 17px/1 var(--fl-cond); letter-spacing: .04em; }
.topbar.shop .brand-logo { height: 30px; }
.topbar.shop .shop-loc { font: 600 15px/1.2 var(--fl-sans); color: #fff; opacity: .8; white-space: nowrap; }
.topbar.shop .shop-spacer { flex: 1 1 auto; }
.topbar.shop .bell { display: inline-flex; align-items: center; min-height: 44px; margin: 0; padding: 0 8px; font: 600 15px/1 var(--fl-sans); white-space: nowrap; }
.topbar.shop .shop-who { font: 600 15px/1.2 var(--fl-sans); color: #fff; text-align: right; overflow-wrap: anywhere; }
@media (max-width: 480px) { .topbar.shop .shop-who { display: none; } }

/* the tabs: four fixed places along the bottom, under the thumb */
.shoptabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 480; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: var(--panel); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); font-family: var(--fl-sans); }
.shoptabs > a, .shoptabs > details > summary { display: flex; align-items: center; justify-content: center; gap: 6px; box-sizing: border-box;
  height: var(--fl-tabs-h); padding: 0 6px; border-top: 4px solid transparent; margin-top: -1px;
  color: var(--muted); font: 600 17px/1.15 var(--fl-sans); text-align: center; text-decoration: none; cursor: pointer; }
.shoptabs > a.on, .shoptabs > details[open] > summary, .shoptabs > details.on > summary { color: var(--ink); border-top-color: var(--brand); }
.shoptabs > details > summary { list-style: none; }
.shoptabs > details > summary::-webkit-details-marker { display: none; }
.shoptabs .tab-n[hidden] { display: none; }
@media (max-width: 480px) { .shoptabs > a, .shoptabs > details > summary { font-size: 15px; padding: 0 2px; gap: 4px; } }
.shoptabs .tab-n { display: inline-block; min-width: 22px; padding: 2px 6px; border-radius: 3px; background: var(--bad); color: #fff;
  font: 600 13px/1.2 var(--fl-mono); text-align: center; }
/* More: every other page, as a sheet that opens up from the tabs */
.shopmenu { position: static; }
.shopmenu-list { position: fixed; left: 0; right: 0; bottom: calc(var(--fl-tabs-h) + env(safe-area-inset-bottom, 0px)); z-index: 479;
  max-height: calc(100vh - var(--fl-tabs-h) - 70px); overflow-y: auto; overscroll-behavior: contain;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); align-content: start;
  background: var(--panel); border-top: 2px solid var(--ink); padding: 0 0 10px; }
.shopmenu-who { grid-column: 1 / -1; padding: 12px 18px 4px; font-size: 14px; color: var(--muted); }
.shopmenu-sec { grid-column: 1 / -1; margin: 0; padding: 14px 18px 4px; font: 600 13px/1.2 var(--fl-mono); letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); }
.shopmenu-list hr { grid-column: 1 / -1; width: 100%; border: 0; border-top: 1px solid var(--line); margin: 8px 0 0; }
.shopmenu-list a { display: flex; align-items: center; min-height: 50px; padding: 6px 18px; color: var(--ink); font-size: 17px;
  text-decoration: none; border-bottom: 1px solid var(--line); }
.shopmenu-list a:hover { background: var(--bg); text-decoration: none; }
.shopmenu-list a.active { font-weight: 700; box-shadow: inset 4px 0 0 var(--brand); }

/* every page a held employee opens: square corners, flat panels, the floor's buttons */
body.shopmode .panel { border-radius: 4px; box-shadow: none; }
body.shopmode .btn { border-radius: 4px; min-height: 44px; font-family: var(--fl-sans); }
body.shopmode .btn.sm { min-height: 40px; }
body.shopmode .btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
body.shopmode .btn.primary:hover { background: var(--ink); }
body.shopmode .btn.go { background: var(--fl-go); border-color: var(--fl-go); }
body.shopmode .btn.ghost { border-color: var(--ink); border-width: 2px; }
body.shopmode input, body.shopmode select, body.shopmode textarea { border-radius: 4px; font-family: var(--fl-sans); }
body.shopmode .flashes li { border-radius: 0; border-left-width: 4px; font-size: 16px; }
body.shopmode .backrow { margin: 0 0 10px; }
body.shopmode .scan-wrap { max-width: 720px; }
body.shopmode .qaprompt { border-radius: 4px; }
body.shopmode table { font-family: var(--fl-sans); }

/* ---------- added with the clock ---------- */

/* three blocks: A the clock, B your work, C to do and other work. Sideways A and
   C sit left and B right; upright they stack A, B, C. */
@media (min-width: 900px) {
  .fl-cols:not(.one) { grid-template-areas: "a b" "c b"; grid-template-rows: auto 1fr; }
  .fl-cols:not(.one) > .fl-a { grid-area: a; }
  .fl-cols:not(.one) > .fl-b { grid-area: b; }
  .fl-cols:not(.one) > .fl-c { grid-area: c; }
  .fl-cols.one { max-width: 720px; margin: 0 auto; }
}
.fl-list, .fl-empty { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }

/* a work line: the mark and its facts are the link, the buttons sit at the right */
.fl-row > a:first-child, .fl-row > span:first-child { display: flex; flex-direction: column; gap: 3px; min-width: 0; color: var(--ink); text-decoration: none; }
.fl-row > a:first-child:hover { text-decoration: none; }
.fl-row-acts { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.fl-t1, .fl-t2, .fl-mark { display: block; }
.fl-busy { margin: 0; padding: 8px 18px; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.fl-chips { display: flex; gap: 6px; flex-wrap: wrap; padding: 8px 18px; border-bottom: 1px solid var(--line); }
@media (max-width: 520px) {
  .fl-row:has(> .fl-row-acts) { grid-template-columns: minmax(0, 1fr); }
  .fl-row-acts { justify-content: flex-start; }
}

/* hours */
.fl-hrs-hd { margin: 0; padding: 12px 18px 0; font: 600 13px/1.2 var(--fl-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.fl-hrs-hd span { font: 400 13px/1.2 var(--fl-sans); letter-spacing: 0; text-transform: none; }
.fl-hrs .fl-hours { border-bottom: 0; }
.fl-hrs > details.fl-fold { border-top: 1px solid var(--line); border-bottom: 0; }
.fl-today { width: 100%; border-collapse: collapse; }
.fl-today td { padding: 8px 0; border-top: 1px solid var(--line); font-size: 15px; }
.fl-today tr:first-child td { border-top: 0; }
.fl-today tr.now td { font-weight: 600; }
.fl-today td.num { text-align: right; font: 600 15px/1.3 var(--fl-mono); white-space: nowrap; }
/* outside the floor clock the strip stands alone */
.scan-wrap > .fl-hrs { margin-top: 14px; border: 1px solid var(--line); border-radius: 4px; background: var(--panel); }

/* the one-line band */
.fl-band.slim .fs-meta { font-size: 14px; }
.fl-band.slim .fl-band-title { display: inline; }

/* older floor buttons on pages not yet redrawn line by line */
body.shopmode .bigbtn { border-radius: 4px; padding: 14px 16px; font: 700 19px/1.2 var(--fl-sans); min-height: 56px; }
body.shopmode .bigbtn.go { background: var(--fl-go); }
body.shopmode .bigbtn.stop { background: var(--panel); color: var(--tint-bad-ink); border: 2px solid var(--bad); }
body.shopmode .bigbtn.cam, body.shopmode .bigbtn.find { background: var(--ink); }
.fl-btnrow .fl-btn { flex-direction: column; gap: 1px; }
.fl-btnrow .fl-btn small { color: var(--muted); }

/* the mark's page */
.scan-head.fl-markhd { text-align: left; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.scan-head.fl-markhd .scan-mark { font: 700 44px/1 var(--fl-cond); letter-spacing: .01em; overflow-wrap: anywhere; }
.fl-pcs { padding: 12px 18px; margin: 0 0 12px; background: var(--panel); border: 1px solid var(--line); }
.scan-secondary .fl-btn { flex-direction: column; gap: 1px; }
.scan-secondary .fl-btn small, .fl-btn.wide small { color: var(--muted); }
.fl-btn.go small { color: #fff; }
.scan-primary .fl-btn.go { min-height: 76px; font-size: 24px; }
.fl-btn.go { flex-direction: column; gap: 2px; }
main:has(#working) .floor-strip { display: none; }   /* the mark's own page already carries the band and Finish */
/* a plain button is outlined: rust is the brand, never a button */
body.shopmode .btn:not(.primary):not(.go):not(.danger):not(.ghost) { background: var(--panel); color: var(--ink); border: 2px solid var(--ink); }
body.shopmode .btn:not(.primary):not(.go):not(.danger):not(.ghost):hover { background: var(--bg); }
body.shopmode .fl-chips .btn:not(.ghost) { background: var(--ink); color: #fff; }
.shopmenu-list a { border-bottom: 0; }
