/* Industrial console (palette carried over from the hrs_demo, which got this right).
 *
 * TWO colours with a rule, and the rule is the whole thing:
 *   --brand (blue)  = structure, primary actions, anything chrome.
 *   --signal (amber) = ONE meaning only — live / active / needs attention, like an HMI indicator lamp.
 * Making everything amber (as this file used to) removes the signal's meaning and is what made the
 * screen feel like it was shouting.
 *
 * The background is LAYERED, not flat: a soft radial wash plus faint instrument rules. Flat near-black
 * under bright text is what actually strains the eye; depth is what makes a dark UI comfortable.
 */
:root {
  --bg: #090e16;
  --panel: #111a27;
  --panel-2: #162131;
  --panel-3: #1e2b3d;
  --line: #263650;
  --line-soft: #1a2534;
  --text: #eef3fa;
  --text-dim: #c3cee0;
  --muted: #8394ad;
  --brand: #4d90ff;
  --brand-2: #2f6fe0;
  --brand-dim: rgba(77, 144, 255, .12);
  --brand-line: rgba(77, 144, 255, .40);
  --signal: #f6a623;
  --signal-dim: rgba(246, 166, 35, .14);
  --signal-line: rgba(246, 166, 35, .45);
  --accent: #f6a623;                      /* alias kept so existing rules keep working */
  --ok: #35d17f;
  --bad: #f4556a;
  --warn: #f6a623;
  /* One radius scale, used deliberately: chips/pills round, controls medium, panels large. */
  --r-pill: 999px;
  --r-sm: 8px;
  --r-md: 11px;
  --radius: 16px;
  --shadow: 0 20px 50px -12px rgba(0, 0, 0, .55);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .28);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "IBM Plex Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--text);
  min-height: 100vh;
  font: 14px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1100px 520px at 82% -12%, #16233d 0%, rgba(11, 17, 27, 0) 60%),
    linear-gradient(var(--line-soft) 1px, transparent 1px) 0 0 / 100% 46px,
    var(--bg);
  background-attachment: fixed;
}
/* Faint vertical rules — texture, not noise. Masked out before it reaches the content. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .5;
  background: linear-gradient(90deg, var(--line-soft) 1px, transparent 1px) 0 0 / 46px 100%;
  mask: linear-gradient(#000, transparent 70%);
}
main, .topbar { position: relative; z-index: 1; }

/* ── topbar ─────────────────────────────────────────────── */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 13px 28px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel), rgba(9, 14, 22, .86));
  backdrop-filter: blur(6px);
  position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 12px; }
/* The mark is a gauge — the subject is measuring and reporting time, not a generic logo tile. */
.mark {
  width: 34px; height: 34px; border-radius: var(--r-md); flex: none;
  display: grid; place-items: center;
  background: radial-gradient(120% 120% at 30% 20%, var(--panel-3), var(--panel));
  border: 1px solid var(--signal-line); box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.mark svg {
  width: 20px; height: 20px; fill: none; stroke: var(--signal);
  stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}
.mark circle { fill: var(--signal); stroke: none; }
.brand h1 { margin: 0; font-size: 16px; font-weight: 650; letter-spacing: -.01em; }
.brand p {
  margin: 1px 0 0; font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted);
}

.stepper { display: flex; gap: 6px; flex-wrap: wrap; }
.step {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 500; color: var(--muted);
  padding: 6px 13px 6px 8px; border: 1px solid var(--line); border-radius: var(--r-pill);
  transition: color .15s, border-color .15s, background .15s;
}
.step b {
  width: 19px; height: 19px; border-radius: 50%; background: var(--panel-3);
  display: grid; place-items: center; font-size: 11px; font-weight: 600;
  color: var(--muted); font-variant-numeric: tabular-nums;
}
/* Steps already passed read as done (green tick colour), the current one is amber (the one signal). */
.step.on { color: var(--text); border-color: var(--signal-line); background: var(--signal-dim); }
.step.on b { background: var(--signal); color: #1a1206; }
/* A passed step: quiet green, so exactly one step (the current) carries the amber signal. */
.step.done { color: var(--text-dim); border-color: rgba(53,209,127,.4); }
.step.done b { background: var(--ok); color: #06231a; }

/* ── layout ─────────────────────────────────────────────── */
/* Wider than before so the editable Review table has room; Capture/Post keep their own narrower card
   max-widths, so only Review actually uses the extra width. */
main { max-width: min(1520px, 96vw); margin: 0 auto; padding: 30px 20px 90px; }
.screen { display: none; }
.screen.on { display: block; animation: rise .2s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

.card {
  background:
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0) 120px),
    linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line); box-shadow: var(--shadow);
  border-radius: var(--radius); padding: 28px 30px;
}
/* Capture, queue-record and post are single-column reading tasks — a focused panel, not a slab of
   content pinned to the left of a 1180px void. Review keeps the full width for its wide tables. */
/* Capture is sized to its form (720px stack + padding) so it fills the panel instead of leaving a
   right-hand gutter; Post is a little wider for its result table. Review stays full width. */
#screen-capture .card { max-width: 800px; margin-inline: auto; }
#screen-push .card { max-width: 940px; margin-inline: auto; }
.fieldstack { width: 100%; }
h2 {
  font-size: 15px; font-weight: 650; margin: 28px 0 6px; letter-spacing: -.01em;
}
h2:first-child { margin-top: 0; }
h3 { font-size: 13px; font-weight: 600; margin: 22px 0 6px; }
.hint { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 0 0 16px; max-width: 68ch; }
.muted { color: var(--muted); }

/* ── dropzone ───────────────────────────────────────────── */
.dropzone {
  display: grid; place-items: center; gap: 6px;
  padding: 40px 24px; cursor: pointer;
  border: 1.5px dashed var(--line); border-radius: var(--radius);
  background:
    radial-gradient(140% 120% at 50% -20%, var(--brand-dim), transparent 60%),
    var(--panel-2);
  transition: border-color .15s, background .15s, transform .05s;
}
.dropzone:hover, .dropzone:focus-visible, .dropzone.over {
  border-color: var(--brand); background:
    radial-gradient(140% 120% at 50% -20%, rgba(77,144,255,.2), transparent 60%), #17233a;
  outline: none;
}
.dropzone:active { transform: translateY(1px); }
.dropzone.busy { opacity: .55; pointer-events: none; }
.dropzone svg {
  width: 30px; height: 30px; margin-bottom: 2px; fill: none; stroke: var(--brand);
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.dropzone strong { font-size: 14.5px; }
.dropzone span { font-size: 12.5px; color: var(--muted); }

/* ── detected panel ─────────────────────────────────────── */
.detected { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 18px; }
.detected-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.badge {
  font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .6px;
  background: rgba(246,166,35,.13); color: var(--accent);
  border: 1px solid rgba(246,166,35,.35); border-radius: 5px; padding: 2px 8px;
}
.detail { color: var(--muted); font-size: 13px; margin: 0 0 16px; }

.field { display: block; margin-bottom: 14px; }
.field > label, .field > span {
  display: block; font-family: var(--mono); font-size: 10.5px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 7px;
}
.field em { font-style: normal; opacity: .7; }
/* Date and number were omitted here, so the two most safety-critical fields on the capture form fell
   back to the UA's light-scheme widget on a dark page, at the browser's own font size. */
select, textarea,
input[type="text"], input[type="date"], input[type="number"], input[type="search"] {
  width: 100%; max-width: 380px; padding: 10px 12px;
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--r-md); font-size: 14px; font-family: inherit;
  transition: border-color .13s, box-shadow .13s, background .13s;
  color-scheme: dark;                 /* makes the native date picker + spinners match the page */
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .65; }
/* A single-operation dept: the operation is shown, not asked. Read as a settled value, not a greyed-out
   broken control — full text colour, no dropdown affordance, default cursor. */
select.locked {
  opacity: 1; color: var(--text); cursor: default; border-color: var(--line-soft);
  background: var(--panel-3); background-image: none; padding-right: 12px;
}
select:hover, input:hover:not(:focus) { border-color: #32476690; }
select.locked:hover { border-color: var(--line-soft); }
select:focus, textarea:focus,
input[type="text"]:focus, input[type="date"]:focus, input[type="number"]:focus {
  outline: none; border-color: var(--brand); background: var(--panel);
  box-shadow: 0 0 0 3px var(--brand-dim);
}
.row { display: flex; gap: 26px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 16px; }
.field.inline { margin-bottom: 0; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }
.check input { accent-color: var(--accent); width: 15px; height: 15px; }
.check em { font-style: normal; color: var(--muted); }

/* ── buttons ────────────────────────────────────────────── */
button {
  font: inherit; cursor: pointer; border-radius: var(--r-sm); padding: 10px 18px;
  border: 1px solid transparent; transition: filter .13s, background .13s, border-color .13s, transform .05s;
}
button:active { transform: translateY(1px); }
.primary {
  background: linear-gradient(180deg, var(--brand), var(--brand-2)); color: #fff; font-weight: 600;
  border-color: var(--brand-2); box-shadow: var(--shadow-sm);
}
.primary:hover { filter: brightness(1.08); }
.primary:disabled { opacity: .4; cursor: not-allowed; filter: none; box-shadow: none; }
.ghost { background: transparent; color: var(--text-dim); border-color: var(--line); }
.ghost:hover { color: var(--text); border-color: var(--muted); background: rgba(255,255,255,.03); }
.actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; }
/* Quality floor: a visible keyboard focus on everything interactive, not just inputs. */
button:focus-visible, .tab:focus-visible, .dropzone:focus-visible,
.queue-link:focus-visible, .wz-chip:focus-visible {
  outline: none; box-shadow: 0 0 0 3px var(--brand-dim); border-color: var(--brand);
}

/* ── progress ───────────────────────────────────────────── */
.progress { padding: 26px 0; }
.bar { height: 5px; background: var(--panel-2); border-radius: 3px; overflow: hidden; }
.bar-fill { height: 100%; width: 0; background: var(--accent); transition: width .3s ease; }
.progress p { color: var(--muted); font-size: 13px; margin: 10px 0 0; }

/* ── counts ─────────────────────────────────────────────── */
.counts { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.count {
  flex: 1; min-width: 130px; padding: 15px 18px;
  background: var(--panel-2); border: 1px solid var(--line);
  border-left-width: 3px; border-radius: var(--r-sm);
}
.count b {
  display: block; font-family: var(--mono); font-size: 27px; font-weight: 600; line-height: 1.1;
  font-variant-numeric: tabular-nums; letter-spacing: -.01em;
}
.count span {
  display: block; margin-top: 3px; font-size: 11px; letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted);
}
.count.ok  { border-left-color: var(--ok); }
.count.ok b  { color: var(--ok); }
.count.warn { border-left-color: var(--warn); }
.count.warn b { color: var(--warn); }
.count.bad { border-left-color: var(--bad); }
.count.bad b { color: var(--bad); }

/* ── tables ─────────────────────────────────────────────── */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-sm); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 10px 14px; text-align: left; white-space: nowrap; }
th {
  background: var(--panel-3); color: var(--text-dim); font-weight: 600;
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em;
  position: sticky; top: 0; border-bottom: 1px solid var(--line);
}
tbody tr { border-top: 1px solid var(--line-soft); }
tbody tr:nth-child(even) { background: rgba(255,255,255,.012); }
/* Editable Review cells: an input that reads as a cell until focused, so the table stays legible. */
input.line-edit {
  width: 9ch; max-width: 12ch; padding: 4px 7px; font-size: 13px;
  background: transparent; border: 1px solid transparent; border-radius: var(--r-sm); color: var(--text);
}
input.line-edit.num { width: 6ch; font-variant-numeric: tabular-nums; }
/* Employee codes run up to 9 chars (GLSPRAYER); the default 9ch clipped them behind the padding. */
input.line-edit[data-edit="employee"] { width: 11ch; max-width: 14ch; }
input.line-edit:hover:not(:focus) { border-color: var(--line); }
input.line-edit:focus { border-color: var(--brand); background: var(--panel); outline: none; }
input.line-edit:disabled { color: var(--muted); }
/* Pin the ⧉/✕ controls to the right edge so they're always visible even if the table scrolls sideways. */
td.row-ctl, #readyTable th:last-child {
  white-space: nowrap; position: sticky; right: 0;
  background: var(--panel-2); box-shadow: -8px 0 8px -6px rgba(0,0,0,.35);
}
#readyTable th:last-child { background: var(--panel-3); }
tbody tr:nth-child(even) td.row-ctl { background: #141d2b; }   /* match the striped row so it doesn't stand out */
.row-btn {
  border: 1px solid var(--line); background: var(--panel-2); color: var(--muted);
  border-radius: var(--r-sm); width: 26px; height: 26px; cursor: pointer; font-size: 13px; line-height: 1;
  margin-left: 4px;
}
.row-btn:hover { color: var(--text); border-color: var(--muted); }
tbody tr:hover { background: var(--brand-dim); }
td { font-family: var(--mono); font-size: 12.5px; color: var(--text-dim); }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Derived = came from the LN routing, not the operator's sheet. */
.derived { color: var(--muted); }
.derived-key { color: var(--muted); border-bottom: 1px dotted var(--muted); }
.reason { white-space: normal; min-width: 320px; color: var(--warn); font-family: inherit; }
.tag-labour, .tag-machine { font-size: 11px; letter-spacing: .4px; }
.tag-labour { color: #7fb2ff; }
.tag-machine { color: var(--accent); }
/* Routing-master checks in the Review table (warn-only — the row still posts). */
.check-head { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.warn-chip {
  display: inline-block; font-size: 11px; font-weight: 600; white-space: nowrap;
  padding: 1px 7px; border-radius: 999px; cursor: help;
  color: var(--warn); background: rgba(246,166,35,.14); border: 1px solid rgba(246,166,35,.35);
}
.ok-chip { color: var(--ok); opacity: .5; cursor: default; }
tr.row-warn > td { background: rgba(246,166,35,.06); }
.dot { text-align: center; font-size: 14px; }
.dot.ok { color: var(--ok); }
.dot.bad { color: var(--bad); }
/* Sent but unanswered — the line may be in LN. Never styled as a failure; a failure invites a retry. */
.dot.warn { color: var(--warn); font-weight: 700; }
.verify li.warn { color: var(--warn); }

/* ── post ───────────────────────────────────────────────── */
.postbar {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  flex-wrap: wrap; padding: 16px; margin-bottom: 4px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px;
}
.warn-note {
  color: var(--warn); font-size: 13px; margin: 12px 0 0;
  border-left: 3px solid var(--warn); padding-left: 12px;
}
.verify { list-style: none; padding: 0; margin: 0 0 18px; font-family: var(--mono); font-size: 12.5px; }
.verify li { padding: 5px 0; color: var(--muted); border-bottom: 1px solid var(--line); }

.error {
  color: var(--bad); font-size: 13.5px; margin: 16px 0 0;
  border-left: 3px solid var(--bad); padding-left: 12px; white-space: pre-wrap;
}

/* ── capture tabs ──────────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 4px; margin: 0 0 20px; border-bottom: 1px solid var(--line); }
.tab {
  background: none; border: 0; border-bottom: 2px solid transparent;
  color: var(--muted); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer;
  padding: 10px 15px; margin-bottom: -1px; transition: color .13s, border-color .13s;
}
.tab:hover { color: var(--text-dim); }
.tab.on { color: var(--text); border-bottom-color: var(--brand); font-weight: 600; }
.panel { display: none; }
.panel.on { display: block; }

/* ── queue link in the top bar ─────────────────────────────────────────────── */
.queue-link {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-pill);
  color: var(--text-dim); font: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer;
  padding: 6px 7px 6px 14px; display: flex; align-items: center; gap: 9px;
  transition: color .13s, border-color .13s;
}
.queue-link:hover { color: var(--text); border-color: var(--brand-line); }
.pill {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-pill);
  background: var(--brand-dim); color: var(--brand); border: 1px solid var(--brand-line);
  display: grid; place-items: center; font-size: 11px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ── manual entry form ─────────────────────────────────────────────────────── */
/* Two columns, fixed. `auto-fit` produced five ragged 206px columns on a wide screen, so neighbouring
   fields had no relationship to each other — that is what "fields are everywhere" looked like. */
/* The form is a STACK of modules, not one grid. `#entryFields` itself used to carry `.formgrid`, so its
   section headings were laid into a phantom second column beside the fields — the single biggest reason
   the form looked broken and half-empty. The stack owns the vertical rhythm; each inner grid is 2-col. */
.fieldstack { display: flex; flex-direction: column; gap: 2px; max-width: 720px; }
.formgrid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px 20px; margin: 14px 0 4px; align-items: start;
}
.formgrid .span2 { grid-column: 1 / -1; }
.formgrid input, .formgrid select { max-width: none; }   /* fill the column, don't float in it */

/* Each zone is a labelled instrument module, and the label encodes the one fact that matters most:
   does this reach LN? A mono eyebrow on a hairline, with a coloured tick — blue = derived from the LN
   routing, neutral = GMM's own record that never leaves the building. */
.auto-head, .ctx-head {
  display: flex; align-items: center; gap: 9px;
  margin: 26px 0 2px; padding-top: 18px; border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
}
.auto-head::before, .ctx-head::before {
  content: ""; width: 6px; height: 6px; border-radius: 2px; flex: none; background: var(--brand);
}
.ctx-head::before { background: var(--muted); }
/* The auto zone IS the data that reaches Infor LN. Give it a faint blue wash + an inset brand rail so
   "this posts to LN" reads at a glance, distinct from the neutral "our record only" block below. Inset
   box-shadow, not a border, so nothing shifts in the grid. */
.formgrid.auto {
  margin-top: 10px; padding: 12px 14px 8px; border-radius: var(--r-sm);
  background: var(--brand-dim);                       /* flat, subtle — covers BOTH columns evenly */
  box-shadow: inset 2px 0 0 var(--brand-line);
}
.formgrid.auto input, .formgrid.auto select { background: rgba(255,255,255,.015); }

/* The department's own record: their columns, never sent to LN. Visually a third, quieter block so it
   reads as "also worth writing down" rather than competing with the fields that actually post. */
.formgrid + .derived-note {
  margin: 10px 0 0; font-size: 12px; color: var(--signal); letter-spacing: .2px;
}
/* Corrects a sheet guide that describes something not built yet — must not read as ordinary help. */
.guide.caveat { color: var(--signal); opacity: 1; margin-top: 2px; }
.ctx-tag {
  margin-left: 6px; padding: 1px 6px; border-radius: 999px; font-size: 9.5px; letter-spacing: .3px;
  text-transform: uppercase; color: var(--muted); border: 1px solid var(--line);
  background: var(--panel-2);
}
/* PO verification hint under the Production Order field — LN's routing echoed back so the operator
   confirms the right order. Advisory, so it's quiet type; the ✓/⚠ colour carries the state. */
.po-hint { margin: 4px 0 0; font-size: 12px; line-height: 1.4; letter-spacing: .2px; }
.po-hint-loading { color: var(--muted); }
.po-hint-ok { color: var(--ok); }
.po-hint-warn { color: var(--signal); }

/* A minutes field (Glassing BAKING TIME) relocated into the LN block: it IS the posted hours, so it
   reads as a real input and its tag is affirmative (green), the opposite of the quiet "not posted yet". */
.field.mins-core > label { color: var(--text); }
.ctx-tag.posts { color: var(--ok); border-color: rgba(53,209,127,.4); background: rgba(53,209,127,.12); }
.formgrid > .derived-note {
  grid-column: 1 / -1; margin: 2px 0 6px; font-size: 12px; color: var(--signal); letter-spacing: .2px;
}

/* Download strip for the day's record sheet — a distinct utility area, set into a recessed panel so it
   reads as "also here" rather than competing with the queue it sits under. */
.record-strip {
  margin-top: 26px; padding: 18px 20px; border-radius: var(--r-sm);
  background: rgba(0,0,0,.16); border: 1px solid var(--line-soft);
}
.record-strip h3 { margin: 0 0 4px; font-size: 13px; }
.record-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.record-controls label {
  font-family: var(--mono); font-size: 10px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
}
.record-controls select, .record-controls input { max-width: 200px; }
.record-controls .ghost { margin-left: 4px; }

/* Hour type / set-up, as chips beside the operation instead of a duplicate summary card. */
.chips { margin: 2px 0 4px; }
/* The chips share a 2-col grid row with the OPERATION control, so by default they top-align with its
   LABEL and float up-detached. Push them down to sit level with the select — reading as its properties,
   not a stray badge row. (~label height + its margin.) */
.formgrid > .chips { align-self: start; padding-top: 25px; }
.chips-row { display: flex; gap: 6px; flex-wrap: wrap; }
.badge-chip {
  font-size: 11px; padding: 3px 9px; border-radius: 999px; letter-spacing: .3px;
  border: 1px solid var(--line); color: var(--muted); background: var(--panel-2);
}
.badge-chip.type-machine { color: #8fd0f0; border-color: #2d5470; }
.badge-chip.type-labour  { color: #9adcb8; border-color: #2c5a44; }
.badge-chip.setup        { color: var(--accent); border-color: #6b4d18; }
/* Read-only pooled employee (Parts Fab PARTSFTR…): shown as info, not asked. A person prefix marks it
   as the who, distinct from the hour-type/set-up chips. */
.badge-chip.emp          { color: var(--text-dim); border-color: var(--line); }
.badge-chip.emp::before  { content: "\1F464  "; opacity: .7; }
.formgrid .field[hidden] { display: none; }
.req { color: var(--accent); margin-left: 3px; }

/* A derived value is greyed until the operator types over it — same language as the review table. */
.formgrid input.derived, .formgrid select.derived { color: var(--muted); font-style: italic; }

.derived-box {
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 14px; margin-top: 4px;
}
.derived-box dl {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 4px 18px; margin: 8px 0 0;
}
.derived-box dt { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; }
.derived-box dd { margin: 0 0 6px; font-family: var(--mono); font-size: 13px; }

.ok-note { color: var(--ok); font-size: 13px; align-self: center; }
.link-btn {
  background: none; border: 0; color: var(--muted); font: inherit; font-size: 12.5px;
  cursor: pointer; text-decoration: underline;
}
.link-btn:hover { color: var(--bad); }

/* ── voice tab ─────────────────────────────────────────────────────────────── */
.miczone { display: flex; align-items: center; gap: 16px; margin: 18px 0; }
.mic {
  width: 56px; height: 56px; flex: none; border-radius: 50%;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  display: grid; place-items: center; cursor: pointer;
}
.mic svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7;
           stroke-linecap: round; stroke-linejoin: round; }
.mic:hover { border-color: var(--accent); }
.mic.recording { background: var(--bad); border-color: var(--bad); color: #fff; }
.mic.recording svg { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }
.micstate { display: flex; flex-direction: column; gap: 3px; }
.micstate strong { font-size: 14px; }
.micstate span { color: var(--muted); font-size: 12.5px; }

#voiceTranscript {
  width: 100%; resize: vertical; font: inherit; font-size: 14px;
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px;
}
#voiceTranscript:focus { outline: none; border-color: var(--accent); }
#extractBtn { margin-top: 10px; }

/* Field guide text — the sheet's own one-line guide, shown rather than hidden in a title tooltip.
   Full opacity (the .85 dip pushed it under the AA contrast floor); --muted alone clears it. */
.guide { margin: 4px 0 0; font-size: 11px; line-height: 1.4; color: var(--muted); }
.field > label { margin-bottom: 6px; }
.formgrid .field { min-height: 0; }
.pill.unknown { background: var(--warn); color: #1a1206; }

/* ── voice wizard ──────────────────────────────────────────────────────────────
   One question at a time, voice-first, with a typed fallback beside every prompt.
   Pattern + styling carried over from hrs_demo, which handled this better than a single
   "say it all" textarea: a floor worker gets one thing to answer, sees it read back, and can
   correct it before moving on. Amber is used here exactly as intended — it marks the LIVE step,
   the listening mic and the value being heard, and nothing else. */
.wz { max-width: 560px; margin: 0 auto; }

.wz-rail { list-style: none; display: flex; gap: 6px; margin: 4px 0 24px; padding: 0; }
.wz-rail li {
  flex: 1; display: flex; flex-direction: column; gap: 6px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); font-weight: 500;
}
.wz-rail li .bar { height: 4px; border-radius: 999px; background: var(--line); transition: background .25s; }
.wz-rail li.done { color: var(--ok); }
.wz-rail li.done .bar { background: var(--ok); }
.wz-rail li.now { color: var(--signal); }
.wz-rail li.now .bar { background: var(--signal); }

.wz-stage { text-align: center; }
.wz-eyebrow {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); font-weight: 500;
}
.wz-prompt { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin: 6px 0 20px; color: var(--text); }

.wz-mic {
  width: 92px; height: 92px; border-radius: 50%; margin: 0 auto; display: grid; place-items: center;
  cursor: pointer; color: var(--text); border: 1.5px solid var(--line); background: var(--panel-2);
  transition: border-color .15s, transform .1s, background .15s; padding: 0;
}
.wz-mic svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 1.6;
              stroke-linecap: round; stroke-linejoin: round; }
.wz-mic:hover { border-color: var(--signal); transform: translateY(-1px); }
.wz-mic:disabled { opacity: .4; cursor: not-allowed; }
.wz-mic.listening {
  border-color: var(--signal); background: var(--signal-dim); color: var(--signal);
  animation: micpulse 1.2s ease-out infinite;
}
@keyframes micpulse {
  0%   { box-shadow: 0 0 0 0 rgba(246,166,35,.5); }
  100% { box-shadow: 0 0 0 16px rgba(246,166,35,0); }
}
.wz-miclabel { margin-top: 10px; font-size: 12.5px; color: var(--muted); min-height: 16px; }
.wz-mic.listening + .wz-miclabel { color: var(--signal); }

.wz-options { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 18px 0 4px; }
.wz-chip {
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel);
  color: var(--text); font-size: 14px; font-weight: 600; cursor: pointer; transition: .12s;
}
.wz-chip:hover { border-color: var(--signal); background: var(--signal-dim); }
.wz-chip.picked { border-color: var(--signal); background: var(--signal-dim); color: var(--signal); }

.wz-typerow { display: flex; gap: 8px; max-width: 320px; margin: 16px auto 0; }
.wz-type {
  flex: 1; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel); color: var(--text); font-size: 14px; text-align: center;
  font-family: var(--mono); max-width: none;
}
.wz-type:focus { outline: none; border-color: var(--signal); box-shadow: none; }
.wz-typego {
  flex: 0 0 auto; width: 42px; padding: 0; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel); color: var(--text); font-size: 16px;
}
.wz-typego:hover { border-color: var(--signal); }

.wz-readback {
  font-family: var(--mono); font-size: 21px; font-weight: 500;
  margin: 18px 0 4px; min-height: 30px; color: var(--text);
}
.wz-readback.empty { color: var(--line); }
.wz-readback.live { color: var(--signal); }
.wz-readback.done { color: var(--ok); }
.wz-readback.warn { color: var(--warn); font-size: 15px; font-family: inherit; font-weight: 600; }

.wz-receipt {
  list-style: none; margin: 20px 0 0; padding: 14px 0 4px; border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 7px;
}
.wz-receipt li { display: flex; justify-content: space-between; gap: 14px; font-size: 13px; }
.wz-receipt .k {
  font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--muted);
}
.wz-receipt .v { font-family: var(--mono); color: var(--text-dim); }
.wz-receipt li.derived .v { color: var(--muted); font-style: italic; }

.wz-foot { display: flex; gap: 10px; justify-content: space-between; margin-top: 24px; }
.wz-foot .spacer { flex: 1; }

@media (prefers-reduced-motion: reduce) {
  .wz-mic.listening { animation: none; border-color: var(--signal); }
  .screen.on { animation: none; }
}

/* ── narrow screens (phone) ─────────────────────────────────────
   The top bar stacked into a broken multi-line header on a phone: the title wrapped, the subtitle took
   ~4 lines, and the 3 step pills wrapped. Collapse to essentials — drop the subtitle, and reduce each
   step to its number chip (the labels are self-evident in order) — so the header stays one tidy strip. */
@media (max-width: 640px) {
  .topbar { gap: 12px; padding: 10px 14px; flex-wrap: wrap; }
  .brand h1 { font-size: 15px; }
  .brand p { display: none; }
  .stepper { gap: 5px; }
  .step { padding: 5px; gap: 0; font-size: 0; }   /* hide the word label… */
  .step b { font-size: 11px; }                     /* …keep the number chip */
  .queue-link { padding: 5px 6px 5px 10px; }
  main { padding: 20px 12px 70px; }
  .card { padding: 20px 16px; }
  /* Stack the two-up form columns on a phone so fields aren't squeezed to ~150px. */
  .formgrid { grid-template-columns: 1fr; }
  .row { gap: 14px; }
}
