﻿/* ===== Operator Tab ===== */

/* Full-viewport layout comes from .is-fullbleed (shared.css) — only the row direction and the
   zero inset are this tab's own, since the operator view bleeds to the edge rather than insetting */
#tab-console.active {
  display: flex;
  padding: 0;
  /* the console switcher floats over whichever face is open */
  position: relative;
}

.operator-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
}

.op-top-actions {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: var(--z-local-badge);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.op-top-center {
  position: absolute;
  top: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-local-badge);
  /* reviews and stashed points side by side */
  display: flex;
  gap: 0.5rem;
}

/* ─── What did not count ─────────────────────────────────────────────────────── */

.op-excluded {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin: 0.5rem 0;
}
.op-excluded-line {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem 0.55rem;
  font-size: 0.78rem;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.op-excluded-line svg { flex-shrink: 0; }
/* Flagged work really is excused from both clocks, so it reads as relief · unstandardized work still drags the figure, so it stays neutral and only explains */
.op-excluded-line--flagged { background: color-mix(in srgb, var(--success) 8%, transparent); }
.op-excluded-line--flagged > svg { color: var(--success); }
.op-excluded-line--unstandardized { background: var(--surface-deep); }
.op-excluded-line--unstandardized > svg { color: var(--text-muted); }
.op-excluded-muted { color: var(--text-muted); }

/* ─── Announcement banner ────────────────────────────────────────────────────── */

.op-announce-slot {
  position: absolute;
  top: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-local-badge);
  width: min(560px, calc(100vw - 2rem));
  /* the floor-wide banner and a machine's own stack, never overlap */
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.op-announce-slot:empty { display: none; }

/* Banner card itself is the shared .tone-banner archetype (shared.css) — nothing operator-specific
   to style here beyond the slot's positioning above. */

.op-review-alert-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: none;
  border: 1px solid var(--warning);
  border-radius: 6px;
  color: var(--warning);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.op-review-alert-btn:hover { background: color-mix(in srgb, var(--warning) 10%, transparent); }
.op-review-alert-count { font-weight: 700; }
.op-review-alert-bang {
  font-size: 1.1rem;
  font-weight: 900;
  display: inline-block;
  animation: op-bang-dance 3.2s ease-in-out infinite;
}
@keyframes op-bang-dance {
  0%        { transform: translateY(0) rotate(0deg); }
  10%       { transform: translateY(-4px) rotate(-12deg); }
  20%       { transform: translateY(0)    rotate(10deg); }
  30%       { transform: translateY(-3px) rotate(-8deg); }
  40%       { transform: translateY(0)    rotate(6deg); }
  48%       { transform: translateY(-1px) rotate(-3deg); }
  55%, 100% { transform: translateY(0) rotate(0deg); }
}

/* Both open something rather than report a state, so they share one look — the tone-coloured
   buttons beside them are live indicators, which these are not */
.op-sw-feedback-btn,
.op-announce-post-btn,
.op-spectate-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 0.82rem;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.op-sw-feedback-btn:hover,
.op-announce-post-btn:hover,
.op-spectate-btn:hover {
  color: var(--text);
  background: var(--surface);
  border-color: var(--border);
}

/* ─── Announcement reopen button — mirrors .op-review-alert-btn's shape (icon + count on a
   tone-colored transparent fill), not .op-sw-feedback-btn's muted link look, since it's a
   live-status indicator ─────────────────────────────────────────────────────── */

.op-announce-reopen-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: none;
  border: 1px solid var(--success);
  border-radius: 6px;
  color: var(--success);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.op-announce-reopen-btn:hover { background: color-mix(in srgb, var(--success) 10%, transparent); }
.op-announce-reopen-btn.tone-warning { border-color: var(--warning); color: var(--warning); }
.op-announce-reopen-btn.tone-danger  { border-color: var(--danger);  color: var(--danger); }
.op-announce-reopen-count { font-weight: 700; }

/* ─── Spectate bar ────────────────────────────────────────────────────────────
   The strip an admin watching somebody else's console sits under. Accent, not a
   tone colour, because Active/Idle/Offline already own green, grey and red on this
   screen and a warning-tinted bar would read as a machine state.
   ─────────────────────────────────────────────────────────────────────────── */

.op-spectate-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem 0.7rem;
  /* the dashboard's own width and zoom, so the bar sits flush over the columns at any screen size */
  zoom: var(--console-zoom, 1);
  width: calc(80vw / var(--console-zoom, 1));
  box-sizing: border-box;
  padding: 0.4rem 0.75rem;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border-radius: 8px;
}
.op-spectate-eye { display: inline-flex; color: var(--accent); }
.op-spectate-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent);
}
.op-spectate-machine { font-size: 0.88rem; font-weight: 600; color: var(--text); }
.op-spectate-ops { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.op-spectate-readonly { font-size: 0.72rem; color: var(--text-muted); }
.op-spectate-unattended { font-size: 0.78rem; font-style: italic; color: var(--text-faint); }
.op-spectate-actions { margin-left: auto; display: flex; gap: 0.4rem; }
.op-spectate-actions .btn-secondary { font-size: 0.78rem; padding: 0.25rem 0.65rem; }

/* The second signal · a ring the live dashboard never wears, for when the eye is on the far column */
.op-columns-wrap.spectating {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: 10px;
}

.operator-view {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 1.5rem;
  flex-wrap: wrap;
}

/* a column, since the spectate bar stacks above the dashboard rather than beside it */
#op-view-active { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }

/* ─── Column layout ──────────────────────────────────────────────────────────── */

.op-columns-wrap {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: center;
  gap: 1rem;
  /* js/console/index.js shrinks the whole console on a short screen · the box divides by the zoom so it still fills the same space */
  zoom: var(--console-zoom, 1);
  width: calc(80vw / var(--console-zoom, 1));
  height: calc((100vh - var(--navbar-h)) * 0.80 / var(--console-zoom, 1));
  max-height: calc((100vh - var(--navbar-h)) * 0.80 / var(--console-zoom, 1));
  min-height: 380px;
}

.op-col-left {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  /* wide enough for each tile line, "Std. 40.1h / Adj. 80.0h", to stay on one row · the supervisor's column matches */
  width: 380px;
  min-width: 280px;
  flex-shrink: 0;
}
.op-col-left .operator-card {
  width: 100%;
  padding: 1.1rem 1.5rem;
  /* tighter than the login cards, so the pace and both clocks fit the fixed-height column without it scrolling */
  gap: 0.4rem;
}
.op-col-left #op-util-widget {
  width: 100%;
  /* a little less air than the other widgets, so the tiles and the ladder fit a 1080p window without scrolling */
  padding: 0.75rem 1.25rem;
  flex: 1;
  min-height: 160px;
  overflow-y: auto;
}

.op-col-right {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
  min-width: 0;
  min-height: 0;
}

/* The stage · one widget holding the cycle sheet, the nest and the activity chart */
#op-stage-widget {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
#op-stage-tools { margin-left: auto; align-self: center; }

.op-stage-panel {
  display: none;
  flex: 1;
  min-height: 0;
  flex-direction: column;
}
.op-stage-panel.active { display: flex; }

#op-mini-events-chart,
#op-mini-perf-chart {
  display: block;
  width: 100%;
  flex: 1;
  min-height: 0;
}

/* The nest stage draws into the space it is given, so its facts row sizes to its own text */
.op-nest-stage { flex: 1; min-height: 0; }
.op-nest-facts {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0 1rem;
  padding-top: 0.35rem;
  font-size: 0.68rem;
  color: var(--text-muted);
}
.op-nest-facts b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.op-nest-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  font-size: 0.74rem;
  color: var(--text-faint);
}

.op-mid-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.op-mid-col #op-machine-status {
  flex-shrink: 0;
  min-height: 160px;
}
.op-mid-col #op-file-details {
  flex: 1;
  min-height: 160px;
  overflow-y: auto;
}


/* ─── Cycle sheet panel ──────────────────────────────────────────────────────── */

#op-stage-cycle #op-cycle-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
#op-stage-cycle #op-btn-start { flex: none; margin-top: 0.75rem; }

/* ─── Machine status panel ───────────────────────────────────────────────────── */

.op-machine-status {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  min-width: 280px;
  box-shadow: 0 2px 12px var(--shadow-md);
}

.op-status-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-light);
}

.op-status-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.op-status-state {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.1rem 0.45rem;
  border-radius: 10px;
  /* --surface-deep, not --surface — this badge sits directly on .op-machine-status, which
     is also --surface, and has no border of its own to separate it. */
  background: var(--surface-deep);
  color: var(--text-muted);
}
.op-status-state.state-active  { background: var(--success-bg);  color: var(--success); }
.op-status-state.state-idle    { background: var(--surface-deep); color: var(--text-muted); }
.op-status-state.state-offline { background: var(--offline-bg);  color: var(--type-offline); }

.op-status-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.3rem 0;
  font-size: 0.8rem;
}
.op-status-key { color: var(--text-muted); white-space: nowrap; flex-shrink: 0; }
.op-status-val { color: var(--text); font-weight: 500; text-align: right; }

/* ─── Cycle sheet inside panel ───────────────────────────────────────────────── */

.op-cycle-sheet {
  margin-top: 0.75rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border-light);
}

.op-cycle-title {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.op-cycle-entry {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.18rem 0.3rem;
  border-radius: 3px;
  font-size: 0.75rem;
}
.op-cycle-entry.active {
  background: var(--row-selected);
  font-weight: 700;
  color: var(--text);
}
.op-cycle-entry.selectable { cursor: pointer; }
.op-cycle-entry.selectable:hover { background: var(--row-hover); border-radius: 3px; }
.op-cycle-entry.selected {
  background: var(--row-selected) !important;
  font-weight: 700;
  color: var(--text);
  border-radius: 3px;
}

.op-cycle-num {
  color: var(--text-faint);
  font-size: 0.65rem;
  width: 1.2rem;
  flex-shrink: 0;
  text-align: right;
}
.op-cycle-file { color: var(--text-sub); }
.op-no-cycle { font-size: 0.75rem; color: var(--text-faint); text-align: center; padding: 0.5rem 0; margin: 0; }

.op-cycle-note {
  font-size: 0.68rem;
  color: var(--text-muted);
  padding: 0 0.3rem 0.2rem 1.6rem;
  font-style: italic;
}
.op-cycle-note.special { color: var(--warning); font-style: normal; font-weight: 600; }
.op-cycle-material {
  font-size: 0.65rem;
  color: var(--text-faint);
  padding: 0 0.3rem 0.2rem 1.6rem;
}

/* Stats info button + popover — chrome shared with .btn-edit/.btn-info family in shared.css */
.op-stats-info-popover {
  position: absolute;
  top: 2rem;
  right: 0;
  left: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.6rem 0.75rem;
  z-index: var(--z-popover);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  max-height: 260px;
  overflow-y: auto;
}
.op-stats-info-row {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  margin-bottom: 0.55rem;
}
.op-stats-info-row:last-child { margin-bottom: 0; }
.op-stats-info-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text);
}
.op-stats-info-desc {
  font-size: 0.65rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ── Widget tabs ──────────────────────────────────────────────────────────────
   The in-widget tab strip, for any operator widget that holds more than one
   panel. The compact scale of the app-wide .subtab-bar, since these strips sit
   inside a card rather than across a page. Add --even where the tabs should
   share the width equally instead of sizing to their labels.
   ─────────────────────────────────────────────────────────────────────────── */
.op-widget-tabs {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 0.5rem;
  flex-shrink: 0;
}
.op-widget-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.3rem 0.7rem;
  font-size: 0.7rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-muted);
  margin-bottom: -1px;
  white-space: nowrap;
  transition: color 0.1s, border-color 0.1s;
}
.op-widget-tabs--even .op-widget-tab { flex: 1; padding-inline: 0.25rem; }
.op-widget-tab:hover:not(:disabled) { color: var(--text); }
.op-widget-tab.active { color: var(--text); border-bottom-color: var(--primary); }
.op-widget-tab:disabled { color: var(--text-faint); cursor: default; }

.op-cycle-context {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.5rem 0.35rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.25rem;
}
.op-cycle-context-val { font-size: 0.7rem; color: var(--text-sub); font-weight: 600; }
.op-cycle-context-sep { font-size: 0.65rem; color: var(--text-muted); }

/* Section divider label */
.op-detail-section-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin: 0.6rem 0 0;
}
.op-detail-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-light);
}
.op-machine-status > .op-detail-section-label:first-of-type { margin-top: 0.1rem; }

/* Details toggles — clickable rows that expand hidden stats */
.op-stat-toggle { cursor: pointer; }
.op-stat-toggle:hover .op-status-key { color: var(--text); }
.op-detail-row { padding-left: 0.5rem; }

/* Permission-gated stat rows — distinct from .hidden (collapse state) so the two don't clobber each other */
.perm-hidden { display: none; }

/* ─── Flag button ────────────────────────────────────────────────────────────── */

.op-flag-btn {
  margin-left: auto;
  background: none;
  border: none;
  border-radius: 6px;
  color: var(--text-faint);
  font-size: 1.1rem;
  line-height: 1;
  padding: 0.3rem 0.5rem;
  min-width: 2.5rem;
  min-height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.op-flag-btn:hover,
.op-flag-btn:active { color: var(--danger); background: var(--danger-bg); }

/* ─── Feedback overlay ───────────────────────────────────────────────────────── */

/* The kiosk modals are createModal derivatives · header, padding and chrome come from .modal, and these only stack the body's controls in a column */
.op-feedback-modal > .modal-body,
.op-review-modal > .modal-body,
.op-card-modal > .modal-body,
.op-event-panel > .modal-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.op-feedback-version { font-size: 0.7rem; font-weight: 400; color: var(--text-muted); }

.op-feedback-select,
.op-feedback-input {
  width: 100%;
  background: var(--surface);
}
.op-feedback-select:focus { outline: none; border-color: var(--primary); }
.op-feedback-input {
  padding: 0.5rem 0.6rem;
  background: var(--bg);
  font-size: 0.85rem;
  resize: vertical;
}
.op-feedback-input:focus { outline: none; border-color: var(--primary); }

.op-feedback-flag-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-sub);
  cursor: pointer;
}
.op-feedback-flag-row input { cursor: pointer; accent-color: var(--danger); }
.op-feedback-error { font-size: 0.75rem; color: var(--type-offline); min-height: 1em; }
.op-feedback-actions { display: flex; justify-content: flex-end; gap: 0.5rem; }

/* ─── Metrics report card ─────────────────────────────────────────────────────
   Raised an hour before a shift ends. The idle review's overlay, dressed for a
   report rather than a question — same header row, same dismiss, one size wider
   because it carries figures rather than a single choice.
   ─────────────────────────────────────────────────────────────────────────── */

/* one size wider than the review, and scrolls rather than overflowing a short kiosk screen */
.op-card-modal {
  width: min(520px, calc(100vw - 2rem));
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
}
/* the queue pill from .op-review-queue, carrying the one fact that makes this worth reading now */
.op-card-left {
  font-size: 0.72rem;
  color: var(--text-sub);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.15rem 0.5rem;
}
.op-card-who { font-size: 0.78rem; color: var(--text-sub); margin: -0.5rem 0 0; }

.op-card-headline { display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; }
.op-card-fig { font-size: 2.4rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.op-card-word { font-size: 1rem; font-weight: 600; padding: 0.15rem 0.6rem; border-radius: 12px; }
.op-card-sub { font-size: 0.75rem; color: var(--text-muted); width: 100%; }
.op-card-delta { font-weight: 600; }
.op-card-delta.up { color: var(--success); }
.op-card-delta.down { color: var(--danger); }

/* The ladder, with the operator pinned on it · bands are equal width, so the pin says which band */
.op-card-ladder { display: flex; height: 8px; border-radius: 4px; overflow: hidden; }
.op-card-ladder span { flex: 1; }
.op-card-ladder-scale { position: relative; height: 1.15rem; }
.op-card-ladder-pin {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font-size: 0.62rem;
  color: var(--text-sub);
  white-space: nowrap;
}
.op-card-ladder-pin::before { content: "\25B2"; display: block; text-align: center; font-size: 0.5rem; line-height: 0.7; }
.op-card-ladder-ends { display: flex; font-size: 0.62rem; color: var(--text-faint); }
.op-card-ladder-ends span { flex: 1; text-align: center; }

.op-card-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.82rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--border-light);
}
.op-card-row:last-child { border-bottom: none; }
.op-card-key { color: var(--text-muted); flex: 1; }
.op-card-val { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.op-card-of { color: var(--text-faint); font-size: 0.72rem; text-align: right; font-variant-numeric: tabular-nums; }

.op-card-facts { display: flex; flex-wrap: wrap; gap: 0 0.9rem; font-size: 0.7rem; color: var(--text-muted); }
.op-card-facts b { color: var(--text-sub); font-weight: 600; font-variant-numeric: tabular-nums; }

/* Mirrors .op-announce-reopen-btn — a dismissed card goes to the corner rather than away */
.op-card-reopen-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: 1px solid var(--primary);
  border-radius: 6px;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.op-card-reopen-btn:hover { background: color-mix(in srgb, var(--primary) 10%, transparent); }

/* ─── Idle review overlay ────────────────────────────────────────────────────── */

/* a single choice, so narrower than the default modal */
.op-review-modal {
  width: 420px;
  max-width: calc(100vw - 2rem);
}
.op-review-close {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 0 0.1rem;
  line-height: 1;
  transition: color 0.15s;
}
.op-review-close:hover { color: var(--text); }
.op-review-close.op-review-close-armed { color: var(--danger); font-weight: 700; }
.op-review-queue  {
  font-size: 0.72rem;
  color: var(--text-sub);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.15rem 0.5rem;
}
.op-review-reason  { font-size: 0.78rem; color: var(--text-sub); font-style: italic; }
/* somebody else is typing this one · the form says whose answer it becomes */
.op-review-onbehalf {
  font-size: 0.74rem;
  color: var(--text-sub);
  background: var(--row-stripe);
  border-left: 3px solid var(--warning);
  border-radius: 4px;
  padding: 0.35rem 0.5rem;
}
.op-review-onbehalf b { color: var(--text); font-weight: 650; }
.op-review-context { font-size: 0.78rem; color: var(--text-sub); }

.op-review-report-step {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.6rem 0.75rem;
  background: var(--surface);
  border-radius: 4px;
  border: 1px solid var(--border);
}
.op-review-report-step.hidden { display: none; }
.op-review-report-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.op-review-error {
  font-size: 0.8rem;
  color: var(--danger);
  padding: 0.25rem 0;
}
.op-review-error.hidden { display: none; }

.op-review-actions { display: flex; gap: 0.5rem; }
.op-review-actions #op-review-no-reason { flex: 1; }

/* ─── Clock-in questions · the idle review's layout, asking about other machines and whoever is already on this one ─── */
.op-clockin-modal .op-review-actions > .op-enter { flex: 1 1 0; width: auto; }

/* Out of tolerance · one row per part, its dimensions on the right */
.op-point-out { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.6rem 0.75rem; margin-top: 0.4rem; background: var(--warning-bg); border: 1px solid var(--warning-highlight); border-radius: 6px; }
.op-point-out span { color: var(--warning); }
.op-point-out-modal .op-review-actions { margin-top: 0.9rem; justify-content: flex-end; }
.op-clockin-move,
.op-clockin-person {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
}
.op-clockin-move small { margin-left: auto; font-size: 0.74rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.op-clockin-arrow { color: var(--text-faint); }
.op-clockin-who { display: grid; line-height: 1.25; min-width: 0; }
.op-clockin-who small { font-size: 0.74rem; color: var(--text-muted); }
.op-clockin-crew { display: grid; gap: 0.4rem; }
.op-clockin-pick { margin-left: auto; display: flex; gap: 0.3rem; }
.op-clockin-chip {
  font-size: 0.74rem;
  font-weight: 650;
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-sub);
  cursor: pointer;
}
.op-clockin-chip.is-on { border-color: var(--primary); color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.op-clockin-full { font-size: 0.78rem; color: var(--warning); margin: 0; }

/* ─── File parts list ────────────────────────────────────────────────────────── */

.op-file-parts-list { display: flex; flex-direction: column; gap: 0.15rem; padding: 0.15rem 0; }
.op-file-part-row   { display: flex; align-items: center; justify-content: space-between; font-size: 0.8rem; }
.op-file-part-name  { color: var(--text-sub); }
.op-file-part-qty   { color: var(--text-muted); font-weight: 600; }

/* ─── Supervisor console ──────────────────────────────────────────────────────
   The other face of this tab. Not a kiosk: whoever is looking is already signed
   in as themselves, so there is no PIN and no session — the scope comes from
   their own shift, and an admin without one gets a picker instead.
   ─────────────────────────────────────────────────────────────────────────── */

/* the switcher sits over both faces, so either can get to the other */
.console-switch {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: var(--z-local-badge);
  display: flex;
  gap: 0.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.15rem;
}
.console-face {
  background: none;
  border: none;
  border-radius: 4px;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.25rem 0.7rem;
  color: var(--text-muted);
  cursor: pointer;
  /* the glyph sits on the text's own line rather than above it */
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.console-face .icon-slot { display: inline-flex; }
.console-face:hover { color: var(--text); }
.console-face.active { background: var(--row-selected); color: var(--text); }

/* Centred and clipped, exactly as .operator-wrap is · the two faces are one console, so they sit the same */
.sup-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
}


.sup-cols {
  display: flex;
  gap: 1rem;
  align-items: stretch;
  /* the dashboard's own box and zoom, the same ones .op-columns-wrap takes */
  zoom: var(--console-zoom, 1);
  width: calc(80vw / var(--console-zoom, 1));
  height: calc((100vh - var(--navbar-h)) * 0.80 / var(--console-zoom, 1));
  max-height: calc((100vh - var(--navbar-h)) * 0.80 / var(--console-zoom, 1));
  min-height: 380px;
}
.sup-col { display: flex; flex-direction: column; gap: 1rem; min-width: 0; min-height: 0; }
/* wide enough for the two clocks to sit side by side, as the operator's do */
.sup-col--left { width: 380px; flex-shrink: 0; }
/* the same sizing the kiosk's own column gives it, since this column is no wider */
.sup-col--left .operator-card { width: 100%; padding: 1.25rem 1.5rem; }

/* The shift's window is the picker's button · plain text while disabled, a bordered date with a caret once it can open */
.sup-card { position: relative; }
.sup-shift-when { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.2rem 0.55rem; border: 1px solid transparent; border-radius: 7px; background: none; font-family: inherit; font-variant-numeric: tabular-nums; }
.sup-shift-when:disabled { cursor: default; }
.sup-shift-when:not(:disabled) { cursor: pointer; border-color: var(--border); }
.sup-shift-when:not(:disabled)::after { content: ""; width: 0.36rem; height: 0.36rem; margin-left: 0.15rem; border-right: 1.5px solid var(--text-muted); border-bottom: 1.5px solid var(--text-muted); transform: rotate(45deg) translate(-2px, -2px); }
.sup-shift-when:not(:disabled):hover, .sup-shift-when[aria-expanded="true"] { background: var(--bg); border-color: var(--primary); }
.sup-shift-chip { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; border-radius: 99px; padding: 0.16rem 0.55rem; }
.sup-shift-chip.is-live { color: var(--success); background: var(--success-bg); }
.sup-shift-chip.is-live::before { content: ""; width: 0.42rem; height: 0.42rem; border-radius: 50%; background: var(--success); }
.sup-shift-chip.is-frozen { color: var(--text-sub); background: var(--surface-deep); }
/* the calendar hangs under the card, over whatever sits below it */
.sup-shift-cal { position: absolute; top: calc(100% - 0.5rem); left: 50%; transform: translateX(-50%); width: 300px; z-index: var(--z-popover); padding: 0.6rem 0.65rem 0.65rem; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 32px var(--shadow-md); }
/* the floor and the right card share what the left column leaves, the floor a little more, so a wide screen gets the floor two cards across */
.sup-col--main { flex: 1.4 1 0; width: auto; }
#sup-stats { flex: 1; min-height: 0; overflow-y: auto; }

/* stacked, nothing has a column to fill, so every card takes the height it needs */
@media (max-width: 960px) {
  /* stacked, the face scrolls and every card takes the height it needs, as the operator's does */
  #tab-console.active { overflow-y: auto; height: auto; }
  .sup-wrap { height: auto; overflow: visible; justify-content: flex-start; padding: 3rem 0 1rem; box-sizing: border-box; }
  .sup-cols { flex-direction: column; width: 100%; height: auto; max-height: none; min-height: 0; }
  .sup-col--left { width: 100%; }
  .sup-floor-card { min-height: 20rem; }
  .sup-crew-card { min-height: 22rem; }
  #sup-stats { flex: none; overflow-y: visible; }
}

.sup-floor-card { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.sup-floor-count { margin-left: auto; font-size: 0.7rem; color: var(--text-faint); }

/* every machine a block, filling the canvas rather than sitting in a corner of it */
.sup-floor {
  flex: 1;
  min-height: 0;
  /* the blocks keep their size when the detail takes its share, and scroll rather than spill */
  overflow-y: auto;
  display: grid;
  /* the cards read the floor's width, to stack their lines when it is narrow */
  container: floor / inline-size;
  /* two cards across whenever each can be at least 12rem, else one · the min is half the floor, so it never runs to three, and a card's height follows its width */
  grid-template-columns: repeat(auto-fill, minmax(max(12rem, calc((100% - 0.35rem) / 2)), 1fr));
  grid-auto-rows: auto;
  align-content: start;
  gap: 0.35rem;
  padding: 0.6rem;
  border-radius: 8px;
  background: var(--table-surface);
  border: 1px dashed var(--border);
}
/* one row a machine · its name over its state, then performance and pace, with who under them, so the card stays two lines at any width */
.sup-machine {
  /* the card is its own container, so every label below scales with the card's width rather than sitting small in a big card */
  container-type: inline-size;
  display: grid;
  /* the type's glyph, the name over its state, then performance and pace with who under them */
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: baseline;
  /* width and height in one proportion, so a card grows and shrinks as a shape · its two lines sit in the middle */
  aspect-ratio: 4 / 1;
  align-content: center;
  gap: 0 clamp(0.4rem, 3cqw, 0.9rem);
  text-align: left;
  font: inherit;
  padding: 0.3rem clamp(0.5rem, 3cqw, 0.9rem);
  min-width: 0;
  cursor: pointer;
  border-radius: 6px;
  background: color-mix(in srgb, var(--state) 12%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--state) 40%, transparent);
  border-left: 4px solid var(--state);
  position: relative;
}
/* The machine's type, a glyph to the left of its name in the state's colour, the height of both lines */
.sup-machine-mark { grid-row: span 2; align-self: center; color: var(--state); opacity: 0.75; pointer-events: none; }
.sup-machine-mark svg { display: block; width: clamp(18px, 10cqw, 36px); height: clamp(18px, 10cqw, 36px); }
.sup-machine:hover { background: color-mix(in srgb, var(--state) 20%, var(--surface)); }
.sup-machine.selected { box-shadow: 0 0 0 2px var(--primary); }
/* the name with its state word under it, so the state is a word as well as the stripe */
.sup-machine-id { grid-row: span 2; align-self: center; display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.sup-machine-name { min-width: 0; font-size: clamp(0.86rem, 6.5cqw, 1.45rem); font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sup-machine-perf { font-size: clamp(0.72rem, 4.6cqw, 1.05rem); color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Perf over Pace, each behind its own small caption, so the two figures never read as one · the column sizes to them, so the name truncates first */
.sup-machine-stats { grid-row: span 2; align-self: center; display: grid; grid-template-columns: auto auto; align-items: baseline; gap: 0.1rem 0.45rem; justify-items: end; padding-right: clamp(1.1rem, 7cqw, 1.6rem); }
.sup-machine-k { justify-self: start; font-size: clamp(0.56rem, 3cqw, 0.72rem); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-faint); }
/* the corner button speaks to this machine's kiosk · small and quiet until hovered, so the card still reads as one thing */
.sup-machine-announce { position: absolute; top: 0.25rem; right: 0.25rem; display: inline-flex; padding: 0.15rem; border: none; border-radius: 4px; background: transparent; color: var(--text-faint); cursor: pointer; }
.sup-machine-announce svg { width: clamp(12px, 6cqw, 16px); height: clamp(12px, 6cqw, 16px); }
.sup-machine-announce:hover, .sup-machine-announce:focus-visible { color: var(--text); background: color-mix(in srgb, var(--state) 25%, var(--surface)); }
.sup-machine:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
/* the state is a word as well as a colour, so a block never rests on hue alone */
.sup-machine-state { font-size: clamp(0.64rem, 3.6cqw, 0.85rem); font-weight: 700; color: var(--state); text-transform: uppercase; letter-spacing: 0.06em; }
/* the last 30 minutes, coloured by the same ladder as the operator's dial · the word says the band without a hover */
.sup-machine-pace { font-size: clamp(0.72rem, 4.6cqw, 1.05rem); color: var(--tone, var(--text-muted)); white-space: nowrap; }
.sup-machine-pace b { font-weight: 700; }
.sup-machine-pace--none { color: var(--text-faint); }
/* who sits under performance and pace */
.sup-machine-who { grid-column: 1 / -1; font-size: clamp(0.72rem, 4.4cqw, 1rem); color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* a narrow floor's cards stack · name over state beside performance over pace, with who across the bottom, in a 2:1 shape that holds three lines */
@container floor (max-width: 27rem) {
  .sup-machine { aspect-ratio: 2 / 1; }
  .sup-machine-mark, .sup-machine-id, .sup-machine-stats { grid-row: 1 / 3; }
  .sup-machine-who { grid-row: 3; }
}
/* a robot reports what it is · an operator machine with nobody on it reports a finding */
.sup-machine-who--none { color: var(--text-faint); font-style: italic; }
.sup-machine-who--nobody { color: var(--warning); font-weight: 650; }

/* The picked machine · the crew card's Machine tab, filling the pane */
.sup-detail {
  flex: 1;
  min-height: 0;
  /* the head, then the strip, then whichever view is up */
  display: flex;
  flex-direction: column;
  min-width: 0;
}
/* the head names the machine for both views, so it stays put while they change under it */
.sup-detail-main { flex: none; min-width: 0; }
.sup-detail-tabs { margin-bottom: 0.4rem; }
/* whichever view is up takes the rest of the pane, and scrolls inside it */
.sup-detail-body { flex: 1; min-height: 0; min-width: 0; overflow-y: auto; }
.sup-detail-chart {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  /* the canvas sizes itself to this, so the pane must not scroll it */
  overflow: hidden;
}
.sup-detail-chart-tabs { display: flex; justify-content: flex-end; align-items: center; gap: 0.35rem; }

/* nobody assigned reads as a gap to fill, not as a name */
.sup-supervisor--none { font-style: italic; color: var(--text-faint); }

/* the blocks and the picked machine's pane side by side inside the Floor card · the blocks give up width and scroll */
.sup-floor-row { flex: 1; min-height: 0; display: flex; gap: 0.75rem; }
.sup-floor-row > .sup-floor { flex: 1; min-width: 0; }
.sup-floor-row > .sup-detail { flex: 0 0 clamp(300px, 46%, 440px); border-left: 1px solid var(--border-light); padding-left: 0.75rem; overflow-y: auto; }
/* a narrow console's picked machine · the Floor card's strip switches between the blocks and the pane, each taking the whole card */
.sup-floor-tabs { display: none; margin-bottom: 0; border-bottom: none; }
.sup-floor-card.is-tabbed.has-pick .sup-floor-tabs { display: flex; }
.sup-floor-card.is-tabbed.has-pick .sup-floor-label { display: none; }
.sup-floor-card.is-tabbed.has-pick[data-floor-view="machine"] .sup-floor-count { display: none; }
.sup-floor-card.is-tabbed .sup-floor-row > .sup-detail { flex: 1; border-left: none; padding-left: 0; }
.sup-floor-card.is-tabbed.has-pick[data-floor-view="machine"] .sup-floor-row > .sup-floor { display: none; }
.sup-floor-card.is-tabbed:not([data-floor-view="machine"]) .sup-floor-row > .sup-detail { display: none; }
@media (max-width: 960px) {
  .sup-floor-row { flex-direction: column; }
  .sup-floor-row > .sup-detail { flex: none; border-left: none; padding-left: 0; border-top: 1px solid var(--border-light); padding-top: 0.6rem; }
}

/* The pane's body · two tiles, the operator's status rows, then where the gross went */
.sup-mach { display: flex; flex-direction: column; gap: 0.6rem; min-width: 0; }
.sup-mach-since { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; }
.sup-mach-rows .op-status-val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.sup-mach-rows .op-status-val small { color: var(--text-faint); font-weight: 500; margin-left: 0.35rem; }
/* one bar the length of the gross, cut into what performance takes out of it, a key under it */
.sup-gross { display: flex; flex-direction: column; gap: 0.4rem; padding: 0.55rem 0.65rem; border-radius: 8px; background: var(--table-surface); border: 1px solid var(--border-light); font-variant-numeric: tabular-nums; }
.sup-gross-head { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }
.sup-gross-head b { font-size: 0.95rem; color: var(--text); letter-spacing: 0; text-transform: none; margin-left: 0.3rem; }
.sup-gross-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--surface-deep); gap: 2px; }
.sup-gross-bar i { display: block; height: 100%; }
.sup-gross-key { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: 0.25rem 0.9rem; font-size: 0.74rem; color: var(--text-muted); }
.sup-gross-key span { display: flex; align-items: center; gap: 0.35rem; }
.sup-gross-key span i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.sup-gross-key b { margin-left: auto; color: var(--text); font-weight: 650; }
/* a canvas has no height of its own, so the pane is what gives it one */
.sup-detail-canvas { position: relative; flex: 1; min-height: 7rem; }
.sup-detail-canvas canvas { width: 100%; height: 100%; display: block; }

.sup-detail-head { display: flex; align-items: baseline; gap: 0.6rem; margin-bottom: 0.25rem; }
/* read from a step back, the way the machine blocks above it are */
.sup-detail-name { font-size: 1.2rem; font-weight: 700; color: var(--text); line-height: 1.1; }
.sup-detail-icon { display: inline-flex; align-self: center; color: var(--text-muted); }
.sup-detail-icon svg { width: 1.2rem; height: 1.2rem; }
.sup-detail-state { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--state); }
/* the action sits at the far end of the head, so the name and state keep reading as one phrase */
.sup-detail-act {
  margin-left: auto;
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
/* four to a row · the pane is the card's full width now rather than the 381px it had beside the chart */
.sup-detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 1rem; min-width: 0; }
/* each section says what its figures are · a rule above it, except the first */
.sup-detail-grid .op-detail-section-label {
  grid-column: 1 / -1;
  margin: 0.5rem 0 0.1rem;
  border-top: 1px solid var(--border-light);
  padding-top: 0.4rem;
}
.sup-detail-grid .op-detail-section-label:first-child { margin-top: 0; border-top: none; padding-top: 0; }
.sup-detail-grid > * { min-width: 0; }
/* the value leads and the key labels it, kept tight so the panel's share of the card holds all of it */
.sup-detail-grid .op-status-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  padding: 0.15rem 0;
}
.sup-detail-grid .op-status-key {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  /* 0.6rem no longer · the column is wide enough for the words to read at a step back */
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
}
/* a figure that is context rather than a reading · offline time and the module's id */
.sup-detail-grid .op-status-val.sup-detail-faint { color: var(--text-faint); font-weight: 500; }
.sup-detail-grid .op-status-val {
  font-size: 1.02rem;
  font-weight: 650;
  text-align: left;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── The right column · what is waiting on this person, and who is on the floor ── */

/* a share beside the floor's larger one · the reviews and the names all read in it */
.sup-col--right { flex: 1 1 0; width: auto; min-width: 27rem; }  /* the Workers table's five columns need this much, so the floor narrows first */
@media (max-width: 960px) { .sup-col--main, .sup-col--right { flex: none; width: 100%; } }

/* one card holding all three · no label row, so the strip is the title and the scroller gets that 41px too */
.sup-crew-card { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.op-widget-tabs--title { margin-bottom: 0.75rem; }
/* the same count shared.css gives .tab-btn · dimmer than the label, so the strip still reads as words first */
.op-widget-tab .count { font-size: 0.66rem; font-weight: 600; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.op-widget-tab.active .count { color: var(--text-muted); }
/* except while there is work behind it · the review backlog wears the nav bell's badge, so it reads from whichever tab is open */
.op-widget-tab .count.has-work {
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: var(--danger);
  color: var(--on-primary);
  font-weight: 700;
  line-height: 1.1rem;
  text-align: center;
}
.sup-scroller { flex: 1; min-height: 0; overflow-y: auto; }

/* Two lines a review · who and where on top, then the whole story clipped rather than wrapped */
.sup-review {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0 0.5rem;
  padding: 0.35rem 0.45rem;
  border-radius: 5px;
  border-left: 3px solid var(--primary);
  background: var(--row-stripe);
}
.sup-review + .sup-review { margin-top: 0.25rem; }
.sup-review-line { display: flex; align-items: baseline; gap: 0.35rem; min-width: 0; }
.sup-review-machine { font-size: 0.78rem; font-weight: 650; color: var(--text); flex-shrink: 0; }
.sup-review-who { font-size: 0.74rem; color: var(--text-sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sup-review-age { margin-left: auto; font-size: 0.68rem; color: var(--text-faint); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.sup-review-detail {
  grid-column: 1;
  font-size: 0.7rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sup-review-detail b { color: var(--text-sub); font-weight: 600; }
/* clipped for scanning · a click opens the operator's whole answer, since that is what is being judged */
.sup-review[data-review] { cursor: pointer; }
.sup-review.open .sup-review-detail { white-space: normal; overflow: visible; text-overflow: clip; }
.sup-review-acts { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: 0.25rem; }
/* still the operator's move · one line, no fill, and it steps back until it is hovered */
.sup-review--waiting { opacity: 0.72; border-left-color: var(--text-faint); background: none; }
.sup-review--waiting:hover { opacity: 1; }
/* the pencil is an offer, not a prompt · it only shows when the row is being looked at */
.sup-review--waiting .sup-review-acts { opacity: 0; transition: opacity 0.12s ease; }
.sup-review--waiting:hover .sup-review-acts,
.sup-review--waiting:focus-within .sup-review-acts { opacity: 1; }

.sup-review-group {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin: 0.7rem 0 0.25rem;
}
.sup-review-group:first-child { margin-top: 0; }
.sup-review-group b { color: var(--text-faint); }

/* .btn-accept / .btn-reject / .btn-icon come from shared.css · the marks already have a house style */
.sup-review-acts .btn-accept,
.sup-review-acts .btn-reject,
.sup-review-acts .btn-icon {
  font-size: 0.85rem;
  line-height: 1;
  font-weight: 700;
  width: 1.75rem;
  height: 1.6rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* ── Workers · the three figures the Metrics workers table reports, for whoever is clocked in ── */
.sup-workers { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 0.72rem; }  /* fixed, so a long name clips instead of scrolling the pane sideways */
.sup-workers col.is-pick { width: 1.8rem; }
.sup-workers col.is-assigned { width: 5.4rem; }
.sup-workers col.is-pace { width: 3.6rem; }
.sup-workers col.is-perf { width: 3.8rem; }
.sup-workers td { overflow: hidden; text-overflow: ellipsis; }
.sup-workers th {
  text-align: right;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  padding: 0 0 0.25rem;
  white-space: nowrap;
}
.sup-workers th:first-child { text-align: left; }
/* one Performance header over the two clocks, so Machine and Timecard read as two bases of one figure */
.sup-workers-group th { text-align: center; padding: 0 0 0.1rem; }
/* each figure under its own labelled rule, a gap between rules, so the four never read as one run */
.sup-workers-grp { display: block; margin: 0 0.25rem; border-bottom: 1px solid var(--border-light); }
.sup-workers tr[data-worker] td:nth-last-child(-n+4), .sup-workers thead tr:last-child th:nth-last-child(-n+4) { text-align: center; }
.sup-worker-pace { color: var(--tone); font-weight: 700; font-variant-numeric: tabular-nums; }
.sup-workers td { padding: 0.24rem 0; text-align: right; vertical-align: middle; }
.sup-workers tr + tr td { border-top: 1px solid var(--border-light); }
.sup-worker-name {
  text-align: left;
  color: var(--text);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sup-workers .num { color: var(--text-sub); font-variant-numeric: tabular-nums; }
.sup-workers td + td { padding-left: 0.5rem; }
/* the name column reads left whatever sits before it · the table's own td rule would otherwise win */
.sup-workers td.sup-worker-name, .sup-workers th.sup-worker-pick + th { text-align: left; }

/* what they are on now, under their name · red while on nothing */
.sup-worker-now { display: block; font-size: 0.64rem; font-weight: 500; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; }
.sup-worker-now b { font-weight: 650; color: var(--text-sub); }
.sup-worker-now.is-idle { color: var(--danger); font-weight: 700; }
.sup-workers tr.is-idle td { background: color-mix(in srgb, var(--danger) 6%, transparent); }
.op-widget-tab .count .sup-workers-idle { color: var(--danger); font-weight: 700; }

/* the group rows, set the way the Reviews pane heads its own groups */
.sup-workers tr.sup-workers-band td { border-top: none; padding: 0.55rem 0 0.15rem; text-align: left; font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); }
.sup-workers tr.sup-workers-band td b { color: var(--text-faint); margin-left: 0.35rem; }
.sup-workers tr.sup-workers-band.is-idle td, .sup-workers tr.sup-workers-band.is-idle td b { color: var(--danger); }
.sup-workers tr.sup-workers-band + tr td { border-top: none; }

/* The Floor panel's people · the Workers table's own shape, with its name header reading left and a tag on whoever is on it now */
.sup-mach-crew thead tr:last-child th:first-child, .sup-mach-crew tr[data-worker] td.sup-worker-name { text-align: left; }
.sup-mach > .op-detail-section-label { margin: 0; }
.sup-mach-crew-now { margin-left: 0.35rem; font-size: 0.55rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--success); }

/* Assigned · the strip's three colours as one small bar, then the share */
.sup-worker-asg { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--text-sub); font-variant-numeric: tabular-nums; }
.sup-worker-asg.is-low { color: var(--danger); font-weight: 700; }
.sup-worker-asg-bar { display: inline-flex; width: 2.2rem; height: 6px; border-radius: 2px; overflow: hidden; background: var(--surface-deep); }
.sup-worker-asg-bar .span-lane-seg { position: static; display: block; height: 100%; background: var(--seg); }
/* the floor card's pace line sizes itself off the card, so in a table it takes the table's size */
.sup-workers .sup-machine-pace { font-size: inherit; }

/* Machines · one Performance column where Workers has two clocks, so it takes their width and the header fits */
.sup-machines col.is-perf { width: 7.6rem; }
/* Machines strips have no gap column, so the shared axis runs to the pane's edge */
#sup-machines .sup-workers-axis { margin-right: 0; }

/* Loss panel · where a machine's time over standard went: label, time, a bar scaled to the worst row */
.sup-loss { padding: 0.4rem 0.6rem 0.2rem; text-align: left; }
.sup-loss .op-detail-section-label { margin: 0.35rem 0 0.2rem; }
.sup-loss .op-detail-section-label:first-child { margin-top: 0; }
.sup-loss-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 5rem; align-items: center; gap: 0.6rem; padding: 0.18rem 0.3rem; border-radius: 4px; font-size: 0.7rem; color: var(--text-sub); }
.sup-loss-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sup-loss-time { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--text); }
.sup-loss-bar { height: 6px; border-radius: 2px; overflow: hidden; background: var(--surface-deep); }
.sup-loss-bar i { display: block; height: 100%; background: var(--danger); }
.sup-loss-row.is-ahead .sup-loss-bar i { background: var(--chart-running); }
.sup-loss-row.is-ahead .sup-loss-time { color: var(--success); }
.sup-loss-row.is-down .sup-loss-bar i { background: var(--chart-offline); }
.sup-loss-row.is-link { cursor: pointer; }
/* an event row · when, what, the time and the bar, with its review's buttons on a line of their own */
.sup-loss-row.sup-event-row { grid-template-columns: 5.4rem minmax(0, 1fr) auto 5rem; row-gap: 0.2rem; }
.sup-event-row .sup-loss-time { white-space: nowrap; }
/* the buttons sit under the label so they never squeeze it */
.sup-event-row .sup-event-acts { grid-column: 2 / -1; grid-row: 2; justify-self: start; }
.sup-event-row .sup-event-acts:empty { display: none; }
/* the same marks the review queue uses */
.sup-event-acts .btn-accept,
.sup-event-acts .btn-reject { font-size: 0.85rem; line-height: 1; font-weight: 700; width: 1.75rem; height: 1.6rem; border: none; border-radius: 4px; cursor: pointer; }
/* Enter Response stays a compact button */
.sup-event-acts .btn-secondary { padding: 0.15rem 0.5rem; font-size: 0.7rem; line-height: 1.3; }
/* the stage word takes a quiet tone */
.sup-event-stage.is-pending_response,
.sup-event-stage.is-pending_resolution { color: var(--warning); }
.sup-event-stage.is-accepted { color: var(--success); }
.sup-event-stage.is-rejected { color: var(--danger); }
.sup-event-when { font-variant-numeric: tabular-nums; color: var(--text-muted); white-space: nowrap; }
.sup-event-acts { display: inline-flex; gap: 0.25rem; }

/* bulk assign · the strip above the table, the pick boxes and the form under it */
.sup-workers-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin-bottom: 0.4rem; font-size: 0.68rem; color: var(--text-muted); }
.sup-workers-bar > :last-child { margin-left: auto; }
.sup-workers-bar .btn-secondary { padding: 0.2rem 0.6rem; font-size: 0.7rem; }
.sup-workers-bar .chip { border: none; cursor: pointer; font: inherit; }
.sup-workers-bar .chip:hover { color: var(--text); }
.sup-workers .sup-worker-pick { width: 1.2rem; padding-right: 0.25rem; text-align: left; }
.sup-workers .sup-worker-pick + td { padding-left: 0; }
.sup-workers .sup-worker-pick input { margin: 0; accent-color: var(--primary); }
.sup-workers--bulk tr[data-worker] { cursor: pointer; }
.sup-workers tr.is-bulk-picked td { background: color-mix(in srgb, var(--primary) 7%, transparent); }
.sup-bulk { position: sticky; bottom: 0; margin-top: 0.5rem; padding: 0.55rem 0.6rem; border: 1px solid var(--primary); border-radius: 8px; background: var(--surface); display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.72rem; }
.sup-bulk-head { display: flex; align-items: baseline; gap: 0.5rem; color: var(--text-muted); }
.sup-bulk-head b { font-size: 0.8rem; color: var(--text); }
.sup-bulk .tle-edge .btn-secondary.active { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.sup-bulk .tle-notes { margin-bottom: 0; }
.sup-bulk-foot { display: flex; align-items: center; gap: 0.6rem; }
.sup-bulk-impact { color: var(--text-sub); }
.sup-bulk-impact .sup-bulk-cut { color: var(--warning); }
.sup-bulk-impact .tle-bad { color: var(--danger); }
.sup-bulk-impact .sup-bulk-empty { color: var(--text-faint); font-style: italic; }
.sup-bulk-foot .btn-primary { margin-left: auto; padding: 0.25rem 0.8rem; font-size: 0.72rem; }


/* ─── Pace · the column's hero, the one reading an operator can still act on · --tone comes from the ladder in js/shared/pace.js ─── */

.op-pace {
  width: 100%;
  flex-shrink: 0;          /* the stats widget below it takes the leftover column, not this */
  box-sizing: border-box;
  padding: 0.6rem 1rem 0.55rem;
  background: var(--tone-bg, var(--surface));
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 2px 12px var(--shadow-md);
  /* the card is its own container, so the dial and the word size to it and the rocket keeps its room whatever the band's word */
  container-type: inline-size;
}

/* Above standard, and Good below it, are the bands worth chasing · only they shout */
.op-pace--rewarded {
  background: linear-gradient(120deg, color-mix(in srgb, var(--tone) 22%, transparent) 0%, var(--tone-bg) 45%, var(--tone-bg) 100%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) 35%, transparent);
}

.op-pace-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--tone, var(--text-muted));
}
.op-pace-window { margin-left: auto; text-transform: none; letter-spacing: 0.04em; color: var(--text-faint); }

/* the dial beside the reading rather than above it, so the hero stays loud without eating the column */
.op-pace-body { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.25rem; }
.op-pace-dial { flex: 0 0 auto; width: clamp(84px, 26cqw, 124px); height: auto; color: var(--tone, var(--text-muted)); }
.op-pace-figure { flex: 1 1 auto; display: flex; flex-direction: column; align-items: flex-start; gap: 0.2rem; min-width: 0; }
/* the points to the next word, under the word itself */
.op-pace-next { margin-top: 0.15rem; font-size: 0.78rem; color: var(--text-sub); font-variant-numeric: tabular-nums; }
.op-pace-next b { color: var(--tone, var(--text)); font-weight: 700; }
/* sized off the card, so the longest band's word ("Developing") still leaves the rocket its room */
.op-pace-word {
  font-size: clamp(1.2rem, 6.2cqw, 2rem);
  font-weight: 750;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--tone, var(--text-muted));
}

/* the two terms the rate divides, so the dial always has its working shown */
.op-pace-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 0.3rem;
  padding-top: 0.3rem;
  border-top: 1px solid color-mix(in srgb, var(--tone, var(--border)) 25%, transparent);
  font-size: 0.72rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.op-pace-foot b { color: var(--text); font-weight: 600; }

/* The earned chip · it does not render below the bands worth chasing, so seeing it means something */
.op-pace-badge {
  align-self: flex-start;
  padding: 0.12rem 0.55rem;
  border-radius: var(--radius-pill, 999px);
  background: var(--tone);
  color: var(--surface);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* The rocket's sky · in the band's colour, its exhaust growing with --heat (0 to 1, set by renderPace), and pace_battle.js sending a saucer per running file · clipped, so the zoom onto the rocket hides the rest */
.op-pace-rocket { --heat: 0; flex: 0 0 auto; width: clamp(80px, 30cqw, 170px); aspect-ratio: 14 / 15; height: auto; margin-left: auto; overflow: hidden; border-radius: 6px; }
.op-pace-rocket * { transform-box: view-box; }
/* at rest the world is zoomed onto the rocket, its middle (70, 76) lifted to the sky's (70, 50) · a running file pulls back to the whole sky */
.op-pace-rocket-world { transform-origin: 70px 76px; scale: 2.05; translate: 0 -26px; transition: scale 0.8s cubic-bezier(.6, 0, .3, 1), translate 0.8s cubic-bezier(.6, 0, .3, 1); }
.op-pace-rocket.is-wide .op-pace-rocket-world { scale: 1; translate: 0 0; }
.op-pace-rocket-body { fill: var(--tone, var(--text-muted)); }
.op-pace-rocket-mid { fill: color-mix(in srgb, var(--tone, var(--text-muted)) 55%, var(--surface)); }
.op-pace-rocket-core { fill: color-mix(in srgb, var(--tone, var(--text-muted)) 15%, var(--surface)); }
/* the ship hums harder the faster it goes */
.op-pace-rocket-ship { animation: op-pace-hum calc(0.5s - var(--heat) * 0.3s) ease-in-out infinite alternate; }
@keyframes op-pace-hum { from { translate: calc(var(--heat) * -0.6px) 0; } to { translate: calc(var(--heat) * 0.6px) calc(var(--heat) * -1px); } }
/* a puff when behind, a long burn at Good, each layer flickering on its own beat */
.op-pace-rocket-exhaust { transform-origin: 70px 88px; scale: calc(0.75 + var(--heat) * 0.25) calc(0.15 + var(--heat) * 0.95); }
.op-pace-rocket-exhaust path { transform-origin: 70px 88px; animation: op-pace-thrust calc(0.6s - var(--heat) * 0.42s) ease-in-out infinite alternate; }
.op-pace-rocket-exhaust path + path { animation-delay: -0.1s; }
@keyframes op-pace-thrust { from { transform: scaleY(0.88); } to { transform: scaleY(1.08); } }
.op-pace-rocket-streak { stroke: var(--tone, var(--text-muted)); stroke-width: 2; stroke-linecap: round; opacity: 0; animation: op-pace-rush 0.7s linear infinite; }
.op-pace-rocket-streak + .op-pace-rocket-streak { animation-delay: -0.35s; }
@keyframes op-pace-rush { 0% { opacity: 0; translate: 0 -10px; } 30% { opacity: 0.8; } 100% { opacity: 0; translate: 0 26px; } }
.op-pace-rocket:not(.is-hot) .op-pace-rocket-streak { display: none; }
/* a saucer per running file · it drifts in, bobs while the file runs, and wears its name in the card's caption style */
.op-pace-enemy { transform-box: fill-box; transform-origin: center; animation: op-pace-arrive 0.6s ease-out both, op-pace-bob 2.4s ease-in-out 0.6s infinite alternate; }
.op-pace-enemy.is-settled { animation: op-pace-bob 2.4s ease-in-out infinite alternate; }
.op-pace-enemy-hull { fill: var(--text-muted); }
.op-pace-enemy-dome { fill: color-mix(in srgb, var(--text-muted) 45%, var(--surface)); }
.op-pace-enemy text { fill: var(--text-muted); font-family: inherit; font-size: 4.6px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; text-anchor: middle; }
@keyframes op-pace-arrive { from { opacity: 0; translate: 0 -14px; } to { opacity: 1; translate: 0 0; } }
@keyframes op-pace-bob { from { translate: 0 0; } to { translate: 0 2px; } }
/* a finished file · a beam from the nose, then the saucer bursts */
.op-pace-beam { stroke: var(--danger); stroke-width: 2.2; stroke-linecap: round; animation: op-pace-zap 0.35s ease-out forwards; }
@keyframes op-pace-zap { 0% { opacity: 0; stroke-width: 0.5; } 30% { opacity: 1; stroke-width: 3; } 100% { opacity: 0; stroke-width: 1; } }
.op-pace-burst circle { fill: none; stroke: var(--danger); stroke-width: 1.5; transform-box: fill-box; transform-origin: center; animation: op-pace-pop 0.5s ease-out forwards; }
.op-pace-burst line { stroke: var(--tone, var(--text-muted)); stroke-width: 1.6; stroke-linecap: round; animation: op-pace-shards 0.55s ease-out forwards; }
@keyframes op-pace-pop { from { opacity: 1; scale: 0.3; } to { opacity: 0; scale: 2.2; } }
@keyframes op-pace-shards { from { opacity: 1; } to { opacity: 0; translate: var(--dx) var(--dy); } }
.op-pace-enemy.is-hit { animation: op-pace-hit 0.35s ease-in forwards; }
@keyframes op-pace-hit { to { opacity: 0; scale: 0.4; } }
@media (prefers-reduced-motion: reduce) {
  .op-pace-rocket * { animation: none !important; transition: none !important; }
  .op-pace-rocket-streak, .op-pace-beam, .op-pace-burst { display: none; }
  .op-pace-enemy.is-hit { opacity: 0; }
}

/* ─── Performance tiles · the two clocks side by side, filled by js/shared/perf_tile.js from the same ladder ─── */

.op-perf-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 0.45rem; }
.op-perf-tile {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0.35rem 0.55rem 0.4rem;
  border-radius: 6px;
  /* no reading keeps the tile neutral · a dash is not a bottom-band score */
  background: var(--tone-bg, var(--table-surface));
}
.op-perf-tile-label { font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }
.op-perf-tile-cap { font-size: 0.64rem; line-height: 1.2; color: var(--text-faint); }
.op-perf-tile-figure {
  font-size: 1.75rem;
  font-weight: 750;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--tone, var(--text-muted));
  font-variant-numeric: tabular-nums;
}
/* 0-200% like the pace dial, so parity is the mark in the middle */
.op-perf-tile-bar { position: relative; height: 5px; margin: 0.15rem 0; border-radius: 999px; background: var(--surface-deep); }
.op-perf-tile-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--tone, transparent); }
.op-perf-tile-bar::after { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 2px; background: var(--text-sub); }
/* each line holds its own row · a term never breaks away from the one it is paired with */
.op-perf-tile-sub { font-size: 0.7rem; line-height: 1.35; color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.op-perf-tile-sub b { color: var(--text); font-weight: 600; }
.op-perf-tile[data-tt] { cursor: help; }

/* ─── Scope ladder · the same two figures for everyone on the machine and the whole shift ─── */

.op-scope-ladder { width: 100%; margin-top: 0.25rem; border-collapse: collapse; font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.op-scope-ladder th {
  padding: 0.1rem 0.2rem;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: right;
  color: var(--text-faint);
}
.op-scope-ladder th:first-child, .op-scope-ladder td:first-child { text-align: left; }
.op-scope-ladder td { padding: 0.14rem 0.2rem; border-top: 1px solid var(--border-light); text-align: right; font-weight: 600; }
.op-scope-ladder td:first-child { font-weight: 500; color: var(--text-sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 9rem; }
.op-scope-ladder td[data-tt] { cursor: help; }
.op-scope-dot { display: inline-block; width: 0.5rem; height: 0.5rem; margin-right: 0.35rem; border-radius: 999px; vertical-align: 0.05em; }
.op-scope-dot--machine { background: var(--type-active); }
.op-scope-dot--shift { background: var(--primary); }

/* ─── Cycle mode toggle ──────────────────────────────────────────────────────── */

.op-cycle-mode-btns { display: flex; gap: 0.25rem; margin-left: auto; }
.op-mode-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 0.68rem;
  padding: 0.1rem 0.5rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: background 0.1s, color 0.1s;
}
.op-mode-btn.active {
  background: var(--navbar-bg);
  color: var(--navbar-text);
  border-color: var(--navbar-bg);
}

/* ─── Login / clock-in card ──────────────────────────────────────────────────── */

.operator-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem 2.5rem;
  width: 320px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 2px 12px var(--shadow-md);
}

.operator-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  margin: 0;
}

.op-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  text-align: center;
}

.op-clock-in {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  margin: 0;
}

/* The payroll clock sits under the machine one, quieter — it is context, not the session they are in */
.op-clock-timecard {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  margin: 0;
}

/* Flex + gap, not letter-spacing — letter-spacing adds a trailing gap after the last char, shifting text-align: center off true center */
.op-pin-dots {
  display: flex;
  justify-content: center;
  gap: 0.6rem; /* between dot spans — see operator/index.js's _pinDotsHtml */
  font-size: 1.5rem;
  color: var(--text); /* --border is too faint to read at this glyph size */
  min-height: 2rem;
}

.op-numpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  width: 100%;
}

/* Fill/hover match .btn-secondary's standardized colors, not the operator-card's own --surface (which blended keys into the card) */
.op-key {
  padding: 0.75rem;
  font-size: 1.1rem;
  font-weight: 500;
  background: var(--surface-deep);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  color: var(--text);
  transition: background 0.1s;
  text-align: center;
}
.op-key:hover  { background: var(--row-selected); }
.op-key-clear, .op-key-back { font-size: 0.8rem; color: var(--text-muted); }

/* width:100% left icon+label at flex-start since the base btn classes set no justify-content */
.op-enter { width: 100%; padding: 0.65rem; font-size: 0.95rem; justify-content: center; }
.op-back  { width: 100%; font-size: 0.85rem; }

/* Clock-out row: Clock Out + + Operator side by side */
.op-clockout-row {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}
.op-clockout-row .op-enter { flex: 1 1 0; width: auto; }
/* Match outlined style of + Operator — red instead of neutral */
.op-clockout-row .btn-danger { border-color: var(--danger-border, var(--danger)); }
.op-add-op-btn {
  flex: 0 0 auto;
  padding: 0.65rem 0.85rem;
  font-size: 0.85rem;
  white-space: nowrap;
}

/* A crew of two or more on the active card · the widget tab strip standing in for the name, so it takes the title's width and size */
.op-widget-tabs--crew { align-self: stretch; margin-bottom: 0.1rem; }
.op-widget-tabs--crew .op-widget-tab { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.95rem; }

/* Add Operator PIN modal — chrome comes from the shared .modal class */
.op-add-operator-modal {
  border: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  width: 280px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.op-add-op-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.op-add-op-title { font-size: 0.85rem; font-weight: 700; color: var(--text); }

.op-select {
  width: 100%;
  padding: 0.45rem 0.6rem;
}

.op-error  { color: var(--danger);  font-size: 0.8rem; text-align: center; margin: 0; }
.op-notice { color: var(--warning); font-size: 0.8rem; text-align: center; margin: 0; }

/* ─── Event info panel (mini chart click) ───────────────────────────────────── */

/* a small read-out over the chart, so narrower than the default modal */
.op-event-panel {
  width: 360px;
  max-width: calc(100vw - 2rem);
}
.op-event-panel-notes {
  font-size: 0.78rem;
  color: var(--text-sub);
  padding: 0.3rem 0 0.5rem;
  font-style: italic;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.op-event-panel .info-row { padding: 0.28rem 0; }
.op-event-panel .info-section-title { padding-top: 0.5rem; margin-bottom: 0; }
.op-event-unrelated-notice {
  color: var(--danger);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.5rem 0 0.25rem;
  line-height: 1.4;
}
.op-event-panel-loading {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0.75rem 0;
  text-align: center;
}

/* ─── Mobile layout ──────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  #tab-console.active {
    overflow-y: auto;
    height: auto;
  }
  .op-columns-wrap {
    flex-direction: column;
    width: auto;
    min-width: 100%;
    height: auto;
    max-height: none;
    min-height: 0;
    align-items: stretch;
    padding: 1rem;
    box-sizing: border-box;
  }
  .op-col-left,
  .op-mid-col {
    width: 100%;
    min-width: 0;
  }
  .op-col-left #op-util-widget,
  .op-mid-col #op-file-details {
    flex: none;
  }
  .op-machine-status,
  .operator-card,
  #op-stage-widget {
    min-width: 0;
    width: 100%;
  }
  /* stacked, the stage has no column to fill, so it takes a height of its own */
  #op-stage-widget {
    height: 380px;
    flex: none;
  }
}

/* ── Timeline · span_lane_worker, a worker's day: the timecard frame, machine time, the activity that wins over it, and the gaps ── */
.span-lane-seg.is-clock     { --seg: color-mix(in srgb, var(--text-faint) 55%, transparent); }
.span-lane-seg.is-machine   { --seg: var(--chart-running); }
.span-lane-seg.is-activity   { --seg: var(--primary); }
/* running the shift · activity's own blue washed toward the panel, assigned time that is not a task */
.span-lane-seg.is-supervising { --seg: var(--chart-supervising); }
.span-lane-seg.is-gap       { --seg: var(--danger); }
.span-lane-seg.is-off_clock { --seg: transparent; outline: 1px dashed var(--text-faint); outline-offset: -1px; }
/* the bulk Assign's window before it is saved · hatched in the activity's colour, so it reads as about to be one */
.span-lane-seg.is-pending   { --seg: repeating-linear-gradient(135deg, var(--primary) 0 2px, transparent 2px 5px); outline: 1.5px solid var(--primary); outline-offset: -1.5px; }
/* two rows sharing time · hatched over the strip, since one band can't show both */
.span-lane-seg.is-stack     { --seg: repeating-linear-gradient(135deg, var(--warning) 0 2px, transparent 2px 5px); }
/* a machine or activity row still going · its last stretch fades toward now, so the running-green arrow at its end stands off it */
.span-lane-seg.is-ongoing { background: linear-gradient(90deg, var(--seg) calc(100% - 24px), color-mix(in srgb, var(--seg) 30%, transparent)); }
.span-lane-seg.is-ongoing::after { content: ""; position: absolute; top: 0; bottom: 0; right: -1px; width: 10px; background: var(--chart-running); clip-path: polygon(0 0, 100% 50%, 0 100%); animation: span-lane-ongoing 1.8s ease-in-out infinite; }
.tle-track .span-lane-seg.is-ongoing::after { top: -3px; bottom: -3px; right: -7px; width: 13px; }
@keyframes span-lane-ongoing { 50% { transform: translateX(2px); opacity: 0.65; } }
@media (prefers-reduced-motion: reduce) { .span-lane-seg.is-ongoing::after { animation: none; } }

/* ── Timeline · span_lane_machine, a machine's shift: each session type in the colour every other view gives it ── */
.span-lane-seg.is-running      { --seg: var(--chart-running); }
.span-lane-seg.is-standby      { --seg: var(--chart-standby); }
.span-lane-seg.is-dormant      { --seg: var(--chart-dormant); }
.span-lane-seg.is-offline      { --seg: var(--chart-offline); }
.span-lane-seg.is-disconnected { --seg: var(--chart-disconnected); }
.span-lane-seg.is-flagged      { --seg: var(--chart-flagged); }
.span-lane-seg.is-unknown      { --seg: var(--chart-unknown); }

/* the Workers table's own strip under each person, on one shared shift axis */
.sup-workers--timeline .sup-worker-timeline td,
.sup-workers--timeline .sup-worker-expand td { border-top: none; }
.sup-worker-timeline td { padding: 0 0 0.45rem; }
.sup-worker-timeline-row { display: flex; align-items: center; gap: 0.5rem; }
.sup-worker-timeline-row .span-lane { flex: 1; }
.sup-worker-gap { font-size: 0.66rem; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text-faint); min-width: 3.4rem; text-align: right; }
.sup-worker-gap.has-gap { color: var(--danger); font-weight: 700; }
.sup-workers--timeline tr[data-worker] { cursor: pointer; }
.sup-workers tr.is-picked td { background: color-mix(in srgb, var(--primary) 8%, transparent); }
.sup-workers-axis { position: relative; height: 0.9rem; margin: 0.2rem 3.9rem 0 0; font-size: 0.6rem; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.sup-workers-axis span { position: absolute; transform: translateX(-50%); }
.sup-worker-caret { font-size: 0.6rem; color: var(--text-faint); }

/* the picked worker, expanded under their own row */
.sup-worker-expand td { padding: 0 0 0.6rem; background: color-mix(in srgb, var(--primary) 5%, transparent); }
.sup-worker-expand-body { text-align: left; font-weight: 400; border: 1px solid var(--border-light); border-radius: 6px; padding: 0.5rem 0.6rem; background: var(--surface); }

/* the editor · one track, the picked stretch's card under it */
.tle-track { position: relative; height: 30px; border-radius: 4px; background: var(--surface-deep); margin-top: 0.3rem; touch-action: none; user-select: none; }
.tle-track .span-lane-seg { cursor: pointer; }
.tle-track .span-lane-seg.is-sel { box-shadow: 0 0 0 2px var(--text); z-index: 2; }
.tle-track .span-lane-seg:hover { filter: brightness(1.15); }
.tle-handle { position: absolute; top: -5px; bottom: -5px; width: 10px; margin-left: -5px; border-radius: 3px; background: var(--surface); border: 2px solid var(--text); box-sizing: border-box; cursor: ew-resize; z-index: 3; }
.tle-handle::after { content: ''; position: absolute; left: 2px; right: 2px; top: 35%; bottom: 35%; border-left: 1px solid var(--text-muted); border-right: 1px solid var(--text-muted); }
/* an ongoing row's end handle is its arrow · the grip stays for the pointer, drawn see-through */
.tle-handle.is-ongoing-end { background: transparent; border-color: transparent; }
.tle-handle.is-ongoing-end::after { display: none; }
/* the Ongoing word beside a row's kind, in the running green with the arrow's own mark */
.tle-ongoing { display: inline-flex; align-items: center; gap: 0.25rem; margin-left: 0.35rem; padding: 0 0.45rem; border-radius: 999px; font-size: 0.62rem; font-weight: 700;
  color: var(--chart-running); background: color-mix(in srgb, var(--chart-running) 14%, transparent); }
.tle-ongoing::before { content: ""; width: 6px; height: 8px; background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.sup-machine-clock-banner { box-shadow: none; padding: 0.45rem 0.7rem; margin-bottom: 0.45rem; }
.sup-worker-clock-chip { font-size: 0.58rem; padding: 0 0.35rem; vertical-align: 1px; }
.tle-sum { font-size: 0.68rem; color: var(--text-muted); margin-top: 0.15rem; font-variant-numeric: tabular-nums; }
.tle-sum b { color: var(--text); font-weight: 600; }
.tle-sum .tle-bad, .tle-sum .tle-bad b { color: var(--danger); }
.tle-inspect { margin-top: 0.5rem; border-top: 1px solid var(--border-light); padding-top: 0.45rem; font-size: 0.74rem; min-height: 2.2rem; }
.tle-head { display: flex; align-items: center; gap: 0.4rem; }
.tle-head .span-lane-seg { position: static; display: inline-block; width: 0.7rem; height: 0.55rem; border-radius: 2px; }
.tle-head b { color: var(--text); }
.tle-head select { font: inherit; font-weight: 700; }
.tle-sub { color: var(--text-faint); font-size: 0.68rem; }
.tle-x { margin-left: auto; background: none; border: none; color: var(--text-faint); font-size: 1rem; cursor: pointer; line-height: 1; }
.tle-when { color: var(--text-sub); font-variant-numeric: tabular-nums; margin: 0.2rem 0 0.35rem; }
.tle-note { color: var(--text-muted); font-style: italic; margin-bottom: 0.35rem; }
.tle-stack-line { color: var(--warning); font-size: 0.7rem; margin-bottom: 0.35rem; }
.tle-sum .tle-stacked, .tle-sum .tle-stacked b { color: var(--warning); }
.tle-now { margin-bottom: 0.45rem; }
.tle-notes { display: block; width: 100%; box-sizing: border-box; font: inherit; font-size: 0.72rem; padding: 0.2rem 0.4rem; margin-bottom: 0.4rem;
  border: 1px solid var(--border); border-radius: 4px; background: var(--surface); color: var(--text); }
.tle-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.6rem; }
.tle-actions--add { margin-top: 0.35rem; }
.tle-actions select { font: inherit; font-size: 0.72rem; }
.tle-actions .btn-secondary, .tle-actions .btn-danger { padding: 0.2rem 0.55rem; font-size: 0.7rem; }
/* the kind toggle in the editor's small type, its line icons sized to it */
.tle-actions .segmented-btn { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.7rem; padding: 0.2rem 0.6rem; }
.tle-actions .segmented-btn svg { width: 12px; height: 12px; }
.tle-actions .segmented-btn:disabled { opacity: 0.5; cursor: default; }
.tle-edge { display: inline-flex; align-items: center; gap: 0.3rem; color: var(--text-muted); }
.tle-nudge { display: inline-flex; }
.tle-nudge button { font: inherit; font-size: 0.66rem; padding: 0.1rem 0.35rem; border: 1px solid var(--border); background: var(--surface); color: var(--text-sub); cursor: pointer; }
.tle-nudge button:first-child { border-radius: 3px 0 0 3px; }
.tle-nudge button:last-child { border-radius: 0 3px 3px 0; border-left: none; }
.tle-remove { margin-left: auto; }
.is-busy .tle-track, .is-busy .tle-inspect { opacity: 0.6; pointer-events: none; }

/* the operator's stage tab, read only */
#op-stage-timeline { flex-direction: column; gap: 0.6rem; padding: 0.6rem 0.2rem; overflow-y: auto; }
.tle-op { padding: 0 0.2rem; }
