/* GC Check-In — Gamer's Choice brand: black, white, signal blue (#50A2DA).
   Display type: Oswald (self-hosted). Body: the device's system font.
   Light/dark follow the device setting. */

@font-face { font-family: 'Oswald'; font-weight: 500; font-display: swap; src: url('fonts/oswald-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Oswald'; font-weight: 600; font-display: swap; src: url('fonts/oswald-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Oswald'; font-weight: 700; font-display: swap; src: url('fonts/oswald-latin-700-normal.woff2') format('woff2'); }

:root {
  color-scheme: light dark;
  --brand: #50A2DA;          /* logo blue — fills, rings, dots */
  --brand-ink: #1F6FA8;      /* blue that reads as text on white */
  --on-brand: #06121B;       /* text on a blue fill */
  --bg: #F4F5F7;
  --surface: #FFFFFF;
  --surface-2: #F0F2F5;
  --line: #E4E7EC;
  --ink: #0B0B0C;
  --muted: #5E6672;
  --faint: #8C939E;
  --solid: #0B0B0C;          /* black button */
  --on-solid: #FFFFFF;
  --success: #15803D; --success-bg: #E8F5EC;
  --warn: #9A5B00;    --warn-bg: #FFF3DD;
  --danger: #B42318;  --danger-bg: #FDECEA;
  --info-bg: #E7F2FA;
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 4px 16px rgba(16,24,40,.06);
  --shadow-lg: 0 12px 40px rgba(16,24,40,.18);
  --r: 16px; --r-sm: 12px;
  --display: 'Oswald', 'Arial Narrow', Impact, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --brand-ink: #7BBDE8;
    --bg: #0A0A0B;
    --surface: #151517;
    --surface-2: #1D1D20;
    --line: #2A2A2F;
    --ink: #F4F4F5;
    --muted: #A1A1AA;
    --faint: #71717A;
    --solid: #F4F4F5;
    --on-solid: #0A0A0B;
    --success: #4ADE80; --success-bg: #12271A;
    --warn: #FBBF24;    --warn-bg: #2A2110;
    --danger: #F87171;  --danger-bg: #2C1414;
    --info-bg: #10222F;
    --shadow: 0 1px 2px rgba(0,0,0,.4);
    --shadow-lg: 0 12px 40px rgba(0,0,0,.6);
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 var(--body); -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; overscroll-behavior: none; }
[hidden]:not(.hdr-btn) { display: none !important; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- header ---------- */
header { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) 14px 10px; background: #000; color: #fff; }
#logo { width: 38px; height: 38px; border-radius: 50%; flex: 0 0 auto; display: block; box-shadow: 0 0 0 1.5px rgba(255,255,255,.28); }
#title { flex: 1; font-family: var(--display); font-weight: 600; font-size: 19px; letter-spacing: .03em; text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hdr-btn { width: 40px; height: 40px; border: 0; border-radius: 12px; background: rgba(255,255,255,.08); color: #fff; font-size: 19px; cursor: pointer; flex: 0 0 auto; }
.hdr-btn:active { background: rgba(255,255,255,.18); }
.hdr-btn[hidden] { display: none; }
#netbar { background: var(--warn-bg); color: var(--warn); text-align: center; font-size: 13px; font-weight: 600; padding: 7px 12px; }

main { max-width: 720px; margin: 0 auto; padding: 18px 16px 48px; }
h2 { font-family: var(--display); font-weight: 500; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 26px 2px 10px; }
h2:first-child { margin-top: 4px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .center { text-align: center; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow); }

/* ---------- sign-in ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tile { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 12px; font-size: 16px; font-weight: 600; color: var(--ink); text-align: left; cursor: pointer; min-height: 64px; box-shadow: var(--shadow);
  transition: transform .06s ease, border-color .15s ease; }
.tile:hover { border-color: var(--brand); }
.tile:active { transform: scale(.98); }
.avatar { width: 38px; height: 38px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center;
  background: var(--info-bg); color: var(--brand-ink); font-family: var(--display); font-weight: 600; font-size: 15px; letter-spacing: .02em; }
.pin-who { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 8px 0 4px; }
.pin-who .avatar { width: 64px; height: 64px; font-size: 24px; }
.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 320px; margin: 0 auto; }
.pinpad button { font-family: var(--display); font-size: 28px; font-weight: 500; height: 68px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); cursor: pointer; box-shadow: var(--shadow); width: 68px; justify-self: center; }
.pinpad button:active { background: var(--surface-2); transform: scale(.96); }
.pinpad button.small { font-family: var(--body); font-size: 13px; font-weight: 600; color: var(--muted); box-shadow: none; border-color: transparent; background: transparent; }
.dots { display: flex; justify-content: center; gap: 16px; margin: 18px 0 24px; }
.dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--faint); display: block; transition: all .12s ease; }
.dots i.on { background: var(--brand); border-color: var(--brand); transform: scale(1.1); }

/* ---------- inputs ---------- */
input, select, textarea { width: 100%; font: inherit; font-size: 17px; padding: 13px 14px; border: 1px solid var(--line);
  border-radius: var(--r-sm); background: var(--surface); color: var(--ink); margin-bottom: 12px; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 25%, transparent); }
input[type=search] { background: var(--surface-2); border-color: transparent; }
label.field { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 0 0 6px 2px; }
label.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
input[type=checkbox] { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--brand); flex: 0 0 auto; }

/* ---------- buttons ---------- */
.btn { display: block; width: 100%; border: 0; border-radius: var(--r); padding: 15px 16px; font-family: var(--display); font-size: 18px;
  font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--on-solid); background: var(--solid); cursor: pointer;
  margin-bottom: 10px; transition: transform .06s ease, filter .15s ease; }
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: scale(.985); } .btn:disabled { opacity: .45; }
.btn .sub { display: block; font-family: var(--body); text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 600; opacity: .85; margin-top: 4px; }
.btn.big { padding: 22px 14px; font-size: 22px; border-radius: 20px; }
.btn.primary, .btn.blue { background: var(--brand); color: var(--on-brand); }
.btn.green { background: var(--success); color: #fff; }
@media (prefers-color-scheme: dark) { .btn.green { color: #06200F; } }
.btn.gray { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
.btn.stop { background: var(--solid); color: var(--on-solid); }
.btn.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); font-family: var(--body); text-transform: none; letter-spacing: 0; font-size: 15px; }
.btn.sm { display: inline-block; width: auto; padding: 8px 14px; font-size: 13px; margin: 0 6px 6px 0; border-radius: 10px; letter-spacing: .04em; }
.btn.sm.ghost { font-size: 13px; }
.row { display: flex; gap: 10px; } .row > * { flex: 1; min-width: 0; }
.link { background: none; border: 0; color: var(--brand-ink); font-weight: 600; padding: 12px; cursor: pointer; display: block; margin: 0 auto; }

/* ---------- associate home ---------- */
.task-line { font-family: var(--display); font-weight: 600; font-size: 20px; letter-spacing: .02em; text-transform: uppercase; color: var(--ink); }
.label { color: var(--muted); font-size: 14px; margin-top: 2px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.badge.on { background: var(--success-bg); color: var(--success); }
.badge.on::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.badge.idle { background: var(--surface-2); color: var(--muted); }
.badge.warn { background: var(--warn-bg); color: var(--warn); } .badge.bad { background: var(--danger-bg); color: var(--danger); }
.active-card { border-top: 4px solid var(--brand); }
.timer { font-family: var(--display); font-size: 64px; font-weight: 500; line-height: 1.05; color: var(--ink); text-align: center; font-variant-numeric: tabular-nums; margin: 12px 0 2px; letter-spacing: .01em; }
.scanbox { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-2); border-radius: var(--r-sm); margin: 16px 0 10px; overflow: hidden; }
.scanbox > div { padding: 12px 8px; text-align: center; }
.scanbox > div + div { border-left: 1px solid var(--line); }
.scanbox b { display: block; font-family: var(--display); font-weight: 600; font-size: 32px; color: var(--ink); line-height: 1.1; }
.scanbox span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); margin-top: 2px; }
.scan-flash { animation: flash .4s ease-out; } @keyframes flash { from { background: color-mix(in srgb, var(--brand) 35%, var(--surface-2)); } }
.scan-dup { animation: dup .6s ease-out; } @keyframes dup { from { background: color-mix(in srgb, var(--danger) 30%, var(--surface-2)); } }
.empty { text-align: center; padding: 34px 16px; }
.empty .ico { width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--faint); font-size: 26px; }

/* ---------- count stepper ---------- */
.stepper { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.stepper button { width: 64px; height: 64px; font-size: 28px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; flex: 0 0 auto; }
.stepper button:active { background: var(--surface-2); }
.stepper input { margin: 0; text-align: center; font-family: var(--display); font-size: 36px; font-weight: 600; height: 64px; border-radius: 18px; }

/* ---------- messages ---------- */
.err { background: var(--danger-bg); color: var(--danger); padding: 12px 14px; border-radius: var(--r-sm); font-size: 14px; margin-bottom: 12px; font-weight: 600; }
.ok { background: var(--success-bg); color: var(--success); padding: 12px 14px; border-radius: var(--r-sm); font-size: 14px; margin-bottom: 12px; font-weight: 600; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 30;
  background: var(--solid); color: var(--on-solid); padding: 12px 18px; border-radius: 999px; font-weight: 600; font-size: 14px; max-width: 92vw;
  box-shadow: var(--shadow-lg); animation: rise .2s ease-out; }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ---------- bottom sheet ---------- */
.sheet { position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.5); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s ease-out; }
@keyframes fade { from { opacity: 0; } }
.sheet .panel { background: var(--bg); width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; border-radius: 24px 24px 0 0;
  padding: 10px 18px calc(20px + env(safe-area-inset-bottom)); box-shadow: var(--shadow-lg); animation: up .22s cubic-bezier(.2,.8,.2,1); }
.sheet .panel::before { content: ''; display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 14px; }
@keyframes up { from { transform: translateY(30px); opacity: .6; } }
@media (min-width: 700px) { .sheet { align-items: center; } .sheet .panel { border-radius: 24px; } .sheet .panel::before { display: none; } }

/* ---------- supervisor ---------- */
.tabs { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 16px; padding: 4px; background: var(--surface-2); border-radius: 14px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: 1 0 auto; border: 0; background: transparent; color: var(--muted); padding: 9px 14px; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.tabs button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 6px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; box-shadow: var(--shadow); }
.stat b { display: block; font-family: var(--display); font-size: 28px; font-weight: 600; line-height: 1.1; }
.stat span { font-size: 12px; color: var(--muted); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--faint); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 6px 8px; border-bottom: 1px solid var(--line); }
td { padding: 11px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
.people { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--surface-2); font-size: 13px; font-weight: 600; color: var(--ink); border: 1px solid var(--line); }
.chip.done { background: var(--info-bg); color: var(--brand-ink); border-color: transparent; }
.chip.work { background: var(--success-bg); color: var(--success); border-color: transparent; }
.chip button { border: 0; background: none; color: var(--faint); font-size: 16px; line-height: 1; padding: 0 0 0 2px; cursor: pointer; }
.stage-title { font-weight: 700; font-size: 15px; }
.stage-row { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.stage-row select, .stage-row input { margin: 0; }
.spinner { border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; width: 32px; height: 32px; animation: spin .8s linear infinite; margin: 70px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }

/* ---------- reports ---------- */
:root { --chart: #2E86C8; }
@media (prefers-color-scheme: dark) { :root { --chart: #4A9BD4; } }
.seg { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 12px; margin-bottom: 12px; }
.seg button { border: 0; background: transparent; color: var(--muted); padding: 7px 12px; border-radius: 9px; font-size: 13px; font-weight: 600; cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(124px, 1fr)); gap: 10px; margin-bottom: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; min-height: 108px; }
.kpi-l { font-size: 12px; color: var(--muted); font-weight: 600; }
.kpi b { font-size: 26px; font-weight: 700; letter-spacing: -.01em; line-height: 1.15; }
.delta { font-size: 12px; font-weight: 600; color: var(--faint); margin-top: auto; }
.delta.good { color: var(--success); } .delta.bad { color: var(--danger); }
.note { background: var(--info-bg); color: var(--ink); border-radius: var(--r-sm); padding: 12px 14px; font-size: 13px; margin-bottom: 8px; }
.charts { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.chart-card { margin: 0; padding: 14px 14px 8px; }
.chart-t { font-weight: 700; font-size: 15px; } .chart-s { font-size: 12px; color: var(--muted); }
.chart { position: relative; margin-top: 8px; min-height: 168px; }
.chart svg { display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--faint); font-size: 11px; }
.chart .val { fill: var(--ink); font-size: 12px; font-weight: 700; }
.chart .ln { fill: none; stroke: var(--chart); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: var(--chart); stroke: var(--surface); stroke-width: 2; transition: r .1s; }
.chart .dot.on { r: 6; }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); font-size: 13px; }
#bChan .chart-empty, #bStage .chart-empty { position: static; padding: 20px 0; }
.hb { display: grid; grid-template-columns: 112px 1fr; gap: 10px; align-items: center; padding: 5px 0; cursor: default; }
.hb-l { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-t { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hb-b { height: 14px; background: var(--chart); border-radius: 0 4px 4px 0; flex: 0 0 auto; }
.hb-v { font-size: 12px; font-weight: 700; white-space: nowrap; color: var(--ink); }
.hb:hover .hb-b { filter: brightness(1.12); }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
.tip { position: fixed; z-index: 40; pointer-events: none; background: var(--solid); color: var(--on-solid); font-size: 12px; line-height: 1.45;
  padding: 8px 10px; border-radius: 10px; box-shadow: var(--shadow-lg); max-width: 240px; }

/* ---------- floor: channel chips, batch rows ---------- */
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 8px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: 0 0 auto; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 7px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; cursor: pointer; }
.chips button span { color: var(--faint); font-weight: 700; margin-left: 2px; }
.chips button.on { background: var(--solid); color: var(--on-solid); border-color: var(--solid); }
.chips button.on span { color: inherit; opacity: .7; }
.ch-head { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--display); font-weight: 600; font-size: 16px; letter-spacing: .04em;
  text-transform: uppercase; margin: 18px 2px 8px; }
.ch-head span { font-family: var(--body); text-transform: none; letter-spacing: 0; font-size: 12px; color: var(--muted); font-weight: 600; }
.batch { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 8px; box-shadow: var(--shadow); overflow: hidden; }
.batch.open { border-color: var(--brand); }
.batch-row { display: flex; width: 100%; gap: 10px; align-items: center; background: none; border: 0; padding: 12px 14px; text-align: left; cursor: pointer; }
.batch-main { flex: 1; min-width: 0; }
.batch-t { font-weight: 700; font-size: 15px; }
.batch-stages { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; }
.bs { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.bs b { width: 72px; flex: 0 0 auto; font-weight: 600; }
.bs-n { color: var(--muted); font-size: 12px; margin-left: auto; white-space: nowrap; }
.chev { color: var(--faint); font-size: 14px; }
.batch-body { border-top: 1px solid var(--line); padding: 4px 14px 12px; background: var(--surface-2); }
.stage-block { padding: 12px 0; } .stage-block + .stage-block { border-top: 1px solid var(--line); }
.stage-h { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.stage-block select, .stage-block input { margin: 0; background: var(--surface); }
.stag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.st-np { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.st-pr { background: var(--info-bg); color: var(--brand-ink); }
.st-ip { background: var(--success-bg); color: var(--success); }
.st-oh { background: var(--warn-bg); color: var(--warn); }
.st-rn { background: var(--danger-bg); color: var(--danger); }
.st-done { background: var(--surface-2); color: var(--faint); }
.pchip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.pchip i { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: 0 0 auto; }
.pchip em { font-style: normal; font-weight: 500; font-size: 12px; color: var(--muted); }
.pchip button { border: 0; background: none; color: var(--faint); font-size: 16px; line-height: 1; padding: 0 0 0 2px; cursor: pointer; }
.ps-working i { background: var(--success); } .ps-paused i { background: var(--warn); } .ps-done i { background: var(--brand); }
.ps-working em { color: var(--success); } .ps-paused em { color: var(--warn); }

/* ---------- people: day bar, board, timelines, feed ---------- */
.daybar { display: flex; gap: 6px; align-items: center; margin-bottom: 12px; }
.daybar input { margin: 0; max-width: 190px; padding: 9px 12px; font-size: 15px; }
.daybar .btn.sm { margin: 0; min-width: 40px; font-size: 18px; padding: 7px 10px; }
.daybar .btn.sm.ghost { font-size: 13px; }
.stat-row.four { grid-template-columns: repeat(4, 1fr); }
.pboard { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.pcard { display: block; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; box-shadow: var(--shadow); cursor: pointer; }
.pcard:hover { border-color: var(--brand); }
.pcard-h { display: flex; gap: 10px; align-items: center; }
.pcard-n { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pcard-hrs { font-family: var(--display); font-weight: 600; font-size: 16px; color: var(--muted); }
.pcard-l { font-size: 12px; color: var(--muted); margin: 8px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pstat { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.pstat i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.pstat.ps-working { color: var(--success); } .pstat.ps-working i { background: var(--success); animation: pulse 1.6s ease-in-out infinite; }
.pstat.ps-paused { color: var(--warn); } .pstat.ps-paused i { background: var(--warn); }
.pstat.ps-idle i { background: var(--faint); }
.tl { position: relative; height: 10px; background: var(--surface-2); border-radius: 5px; margin-top: 10px; overflow: hidden; }
.tl.big { height: 26px; border-radius: 8px; margin-top: 14px; }
.tl-break { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, transparent 0 3px, var(--line) 3px 5px); }
.tl-b { position: absolute; top: 0; bottom: 0; background: var(--chart); border-radius: 3px; box-shadow: 0 0 0 1px var(--surface-2); }
.tl-b.fl { background: var(--warn); }
.tl-b.live { background: var(--success); }
.tl-ax { position: relative; height: 18px; margin-top: 4px; }
.tl-ax span { position: absolute; transform: translateX(-50%); font-size: 11px; color: var(--faint); }
.tl-key { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin: 6px 0 4px; }
.tl-key i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.k-w { background: var(--chart); } .k-f { background: var(--warn); } .k-b { background: repeating-linear-gradient(135deg, var(--surface-2) 0 3px, var(--line) 3px 5px); border: 1px solid var(--line); }
.feed { padding: 4px 14px; }
.ev { display: grid; grid-template-columns: 74px 96px 1fr; gap: 10px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.ev:last-child { border-bottom: 0; }
.ev-t { white-space: nowrap; font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 600; color: var(--muted); }
.evtype { justify-self: start; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.ev-started, .ev-resumed { background: var(--success-bg); color: var(--success); }
.ev-paused { background: var(--warn-bg); color: var(--warn); }
.ev-completed { background: var(--info-bg); color: var(--brand-ink); }
.ev-closed { background: var(--danger-bg); color: var(--danger); }
@media (max-width: 420px) { .ev { grid-template-columns: 74px 1fr; } .ev .ev-m { grid-column: 1 / -1; } .stat-row.four .stat b { font-size: 22px; } }
.away { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 12px; font-size: 13px; color: var(--muted); }
.away b { width: 100%; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); margin-bottom: 2px; }
.away span { padding: 4px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.panel .stat b { font-size: 22px; }

/* ---------- weekly trends tables ---------- */
.tt { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 12px; box-shadow: var(--shadow); }
.tt summary { cursor: pointer; padding: 12px 14px; font-weight: 700; font-size: 15px; list-style: none; display: flex; gap: 8px; align-items: baseline; }
.tt summary::-webkit-details-marker { display: none; }
.tt summary::before { content: '▸'; color: var(--faint); font-size: 12px; transition: transform .15s; }
.tt[open] summary::before { transform: rotate(90deg); }
.tt summary span { font-weight: 500; font-size: 12px; color: var(--muted); }
.tt-wrap { overflow-x: auto; border-top: 1px solid var(--line); max-height: 520px; overflow-y: auto; }
table.trend { font-size: 13px; border-collapse: separate; border-spacing: 0; min-width: 100%; }
table.trend th, table.trend td { padding: 7px 10px; white-space: nowrap; border-bottom: 1px solid var(--line); background: var(--surface); }
table.trend thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); }
table.trend thead tr:nth-child(2) th { top: 31px; }
table.trend .stick { position: sticky; left: 0; z-index: 1; border-right: 1px solid var(--line); }
table.trend thead .stick { z-index: 3; }
table.trend td.dl { color: var(--faint); font-size: 12px; }
table.trend td.up { background: var(--success-bg); color: var(--success); font-weight: 600; }
table.trend td.down { background: var(--danger-bg); color: var(--danger); font-weight: 600; }
table.trend sup { color: var(--brand-ink); font-size: 8px; margin-left: 2px; }

/* ---------- floor table + batches ---------- */
.h2row { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 26px 2px 8px; }
.h2row h2 { margin: 0; } .h2row .seg { margin: 0; }
.ft-card { padding: 0; overflow: hidden; }
table.ftable td { vertical-align: top; }
td.sc { cursor: pointer; min-width: 150px; }
td.sc:hover { background: var(--surface-2); }
.sc-p { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; max-width: 220px; }
.mini { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 1px 7px 1px 5px; border-radius: 999px; background: var(--surface-2); }
.mini i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.mini.ps-working i { background: var(--success); } .mini.ps-paused i { background: var(--warn); } .mini.ps-done i { background: var(--brand); }
.sc-h { font-size: 11px; color: var(--faint); margin-top: 4px; }
.filters .row > div { flex: 1; min-width: 0; }
.filters input, .filters select { padding: 10px 12px; font-size: 15px; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--ink); }
table.btable td.wrap { white-space: normal; min-width: 220px; max-width: 360px; }
body.wide main { max-width: 1240px; }
td.bcell { min-width: 150px; } td.bcell div { color: var(--muted); font-size: 12px; margin-top: 2px; white-space: normal; }

/* ---------- floor compact view ---------- */
.legend { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 11px; color: var(--muted); margin: 2px 2px 10px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.tile-sw { width: 14px; height: 10px; border-radius: 3px; display: inline-block; }
.dotk { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dotk.w { background: var(--success); } .dotk.p { background: var(--warn); }
.compact { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 4px 8px 8px; }
.crow { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(var(--n, 3), minmax(0, 1fr)); gap: 4px; align-items: stretch; padding: 2px 0; }
.chead { position: sticky; top: 60px; z-index: 2; background: var(--surface); padding: 6px 0 4px; }
.chead span { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); text-align: center; }
.cdate { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--display); font-weight: 600; font-size: 13px; letter-spacing: .05em;
  text-transform: uppercase; padding: 10px 2px 4px; border-top: 1px solid var(--line); margin-top: 4px; }
.cdate:first-of-type { border-top: 0; }
.cdate span { font-family: var(--body); text-transform: none; letter-spacing: 0; font-size: 11px; color: var(--faint); font-weight: 600; }
.clabel { font-size: 11px; line-height: 1.25; align-self: center; padding-right: 4px; color: var(--muted); min-width: 0; }
.clabel b, .clabel span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clabel b { color: var(--ink); font-weight: 700; font-size: 12px; }
.stile { display: flex; flex-direction: column; justify-content: space-between; gap: 2px; min-height: 40px; padding: 4px 6px; border-radius: 7px; border: 0;
  border-left: 3px solid var(--faint); text-align: left; cursor: pointer; color: var(--ink); font: inherit; min-width: 0; }
.stile:hover { filter: brightness(.96); } .stile:active { transform: scale(.97); }
.stile.empty { background: transparent; border: 1px dashed var(--line); cursor: default; }
.t-top { display: flex; justify-content: space-between; align-items: baseline; gap: 4px; }
.t-top b { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.t-top em { font-style: normal; font-size: 9px; font-weight: 800; letter-spacing: .04em; opacity: .75; }
.t-ppl { display: flex; flex-wrap: wrap; gap: 2px; min-height: 13px; }
.ini { font-size: 9px; font-weight: 700; line-height: 13px; padding: 0 3px; border-radius: 3px; background: color-mix(in srgb, var(--surface) 70%, transparent); }
.ini.w { background: var(--success); color: #fff; } .ini.p { background: var(--warn); color: #fff; } .ini.d { opacity: .55; text-decoration: line-through; }
@media (prefers-color-scheme: dark) { .ini.w, .ini.p { color: #0A0A0B; } }
.t-ppl .none { font-size: 10px; opacity: .5; }
/* status fills: tinted surface + solid left edge, so tiles read in light and dark */
.stile.st-np, .tile-sw.st-np { background: var(--surface-2); border-left-color: var(--faint); }
.stile.st-pr, .tile-sw.st-pr { background: color-mix(in srgb, var(--brand) 22%, var(--surface)); border-left-color: var(--brand); }
.stile.st-ip, .tile-sw.st-ip { background: color-mix(in srgb, var(--success) 22%, var(--surface)); border-left-color: var(--success); }
.stile.st-oh, .tile-sw.st-oh { background: color-mix(in srgb, var(--warn) 26%, var(--surface)); border-left-color: var(--warn); }
.stile.st-rn, .tile-sw.st-rn { background: color-mix(in srgb, var(--danger) 22%, var(--surface)); border-left-color: var(--danger); }
.stile.st-done, .tile-sw.st-done { background: var(--surface); border-left-color: var(--line); opacity: .6; }
.tile-sw { border-left: 3px solid; }
@media (min-width: 900px) { .crow { grid-template-columns: minmax(0, 1.6fr) repeat(var(--n, 3), minmax(0, 1fr)); gap: 6px; } .stile { min-height: 44px; } .clabel { font-size: 13px; } }

/* compact v2: status column, full names, fitted columns */
.h2tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.h2tools .btn.sm { margin: 0; padding: 8px 12px; }
.cscroll { overflow-x: auto; }
.crow { grid-template-columns: 112px minmax(130px, 190px) repeat(var(--n, 3), minmax(128px, 172px)) !important; justify-content: start; width: max-content; min-width: 100%; }
.chead span { text-align: left; padding-left: 2px; }
.cstat { display: flex; align-items: center; gap: 6px; align-self: stretch; padding: 4px 8px; border-radius: 7px; font-size: 11px; font-weight: 700; line-height: 1.2; }
.cstat i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.cstat.st-np { border: 1px solid var(--line); }
.cstat.st-done { background: var(--surface-2); color: var(--muted); }
.cdate { width: 100%; }
.stile { justify-content: flex-start; gap: 3px; padding: 5px 7px; }
.t-top { flex-direction: column; align-items: flex-start; gap: 0; }
.t-top b { font-size: 12px; }
.t-top em { font-size: 10px; font-weight: 700; opacity: .8; letter-spacing: 0; }
.ini { font-size: 11px; line-height: 16px; padding: 0 5px; font-weight: 600; }
.t-ppl { gap: 3px; margin-top: 2px; }
.t-ppl .none { font-size: 10px; opacity: .55; }
.chead { position: static !important; }
.narrow-only { display: none !important; }
@media (max-width: 700px) {
  .wide-only { display: none !important; }
  .narrow-only { display: inline-flex !important; margin-top: 4px; align-self: flex-start; padding: 2px 7px; font-size: 10px; }
  .crow { grid-template-columns: 132px repeat(var(--n, 3), minmax(112px, 140px)) !important; }
  .crow > .clabel { position: sticky; left: 0; z-index: 1; background: var(--surface); align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
  .chead > span:nth-child(2) { position: sticky; left: 0; z-index: 1; background: var(--surface); }
}
@media (max-width: 700px) { .h2row { flex-wrap: wrap; } .h2tools { width: 100%; justify-content: space-between; } }
