/* Acquisitions shifts panel on the Stats tab (fulfillment-acquisition-shifts.js).
   Uses the portal tokens from fulfillment.css; owns only .acqs-* classes. */
.acqs {
  --acqs-during: var(--accent, #2563eb);
  --acqs-outside: #e3672f;
  --acqs-noshift: #a1a1aa;
  --acqs-band: rgba(37, 99, 235, 0.11);
  --acqs-out: rgba(227, 103, 47, 0.18);
  margin: 0 0 20px; padding: 16px 18px 14px; background: var(--surface, #fff);
  border: 1px solid var(--border, rgba(0,0,0,0.08)); border-radius: 10px; box-shadow: var(--shadow);
}
.acqs-muted, .acqs .muted { color: var(--text-faint, #71717a); }
.acqs-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px 20px; flex-wrap: wrap; }
.acqs-title { margin: 2px 0 0; font-size: 18px; font-weight: 700; color: var(--text); }
.acqs-sub { margin: 3px 0 0; font-size: 13px; color: var(--text-muted); }
.acqs-kpis { display: flex; gap: 24px; flex-wrap: wrap; }
.acqs-kpi .v { font-size: 22px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--text); }
.acqs-kpi .l { margin-top: 3px; font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }

.acqs-controls, .acqs-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 14px; }
.acqs-toolbar { padding: 8px 10px; background: var(--surface-2, #f1f3f5); border-radius: 8px; }
.acqs-spacer { flex: 1 1 auto; }
.acqs-datenav { display: flex; align-items: center; gap: 6px; }
.acqs-date { height: 30px; padding: 0 8px; border: 1px solid var(--border); border-radius: 6px; font: inherit; font-size: 13px; background: var(--surface); color: var(--text); }
.acqs-select { height: 30px; padding: 0 8px; border: 1px solid var(--border); border-radius: 6px; font: inherit; font-size: 13px; background: var(--surface); color: var(--text); }
.acqs-toggle { display: inline-flex; align-items: center; gap: 8px; }
.acqs-toggle-l { font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); white-space: nowrap; }
.acqs-seg { display: inline-flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; background: var(--surface); }
.acqs-seg button { height: 28px; padding: 0 10px; border: 0; background: transparent; color: var(--text-muted); font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; }
.acqs-seg button + button { border-left: 1px solid var(--border); }
.acqs-seg button:hover { background: var(--surface-2); }
.acqs-seg button[aria-pressed="true"] { background: var(--text, #1a1a2e); color: #fff; font-weight: 600; }
.acqs-viewonly { font-size: 12px; font-weight: 600; color: var(--text-muted); padding: 3px 10px; border-radius: 999px; background: var(--surface-2); }

.acqs-keys { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: 12.5px; color: var(--text-muted); }
.acqs-keys span { display: inline-flex; align-items: center; gap: 6px; }
.acqs-keys .sw { display: inline-block; width: 20px; height: 14px; border: 1px solid var(--border); border-radius: 2px; font-style: normal; }
.acqs-keys .sw.band { background: var(--acqs-band); }
.acqs-keys .sw.out { background: var(--acqs-out); }
.acqs-keys .sw.bar { width: 10px; height: 10px; border: 0; }
.acqs-keys .sw.during { background: var(--acqs-during); }
.acqs-keys .sw.outside { background: var(--acqs-outside); }
.acqs-keys .sw.noshift { background: var(--acqs-noshift); }
.acqs-keys .sw.flag { width: auto; padding: 0 4px; font-size: 11px; font-weight: 700; line-height: 14px; color: var(--amber-ink); background: var(--amber-bg); border-color: var(--amber-border); }

.acqs-verdict { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; font-size: 13px; color: var(--text-muted); min-height: 22px; }
.acqs-verdict b { color: var(--text); }
.acqs-empty-note { color: var(--amber-ink); }
.acqs-link { border: 0; background: none; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.acqs-status { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.acqs-status.ok { color: var(--green-ink); background: var(--green-bg); }
.acqs-status.warn { color: var(--amber-ink); background: var(--amber-bg); }
.acqs-status.bad { color: var(--red-ink); background: var(--red-bg); }
.acqs-status.none, .acqs-status.off { color: var(--text-muted); background: var(--surface-2); }

/* the grid */
.acqs-grid-wrap { margin-top: 10px; overflow-x: auto; }
.acqs-grid { border-collapse: collapse; table-layout: fixed; width: 100%; min-width: 1120px; font-size: 13px; }
.acqs-grid th, .acqs-grid td { border: 1px solid var(--border); height: 32px; padding: 0 3px; }
.acqs-grid th:nth-child(1), .acqs-grid td:nth-child(1) { width: 104px; }
.acqs-grid .shiftcol { width: 112px; }
.acqs-grid th.tot, .acqs-grid td.tot { width: 54px; border-left: 2px solid rgba(0,0,0,0.14); }
.acqs-grid th.dur, .acqs-grid td.dur { width: 82px; }
.acqs-grid .num { text-align: center; font-variant-numeric: tabular-nums; }
.acqs-grid td.tot, .acqs-grid td.dur, .acqs-grid th.tot, .acqs-grid th.dur { text-align: right; padding-right: 8px; font-weight: 700; }
.acqs-grid thead th { font-size: 11.5px; font-weight: 600; color: var(--text-muted); text-align: center; background: var(--surface-2); cursor: pointer; white-space: nowrap; }
.acqs-grid thead th.l { text-align: left; padding-left: 8px; cursor: default; }
.acqs-grid thead th.later { color: var(--text-faint); font-weight: 400; }
.acqs-grid thead th.tot, .acqs-grid thead th.dur { white-space: normal; line-height: 1.15; }
.acqs-grid .name { position: sticky; left: 0; z-index: 2; background: var(--surface); box-shadow: -6px 0 0 var(--surface); }
.acqs-grid thead th.name, .acqs-grid tr.onshift td.name { background: var(--surface-2); box-shadow: -6px 0 0 var(--surface-2); }
.acqs-grid .rowlbl { padding-left: 8px; font-size: 12.5px; font-weight: 600; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acqs-grid .rowlbl.muted { font-weight: 400; }
.acqs-grid tr.bars td { height: 82px; vertical-align: bottom; padding: 0 3px 3px; border-bottom: 0; cursor: pointer; }
.acqs-grid tr.bars td.rowlbl, .acqs-grid tr.bars td.tot, .acqs-grid tr.bars td.dur { vertical-align: middle; cursor: default; }
.acqs .bw { display: flex; flex-direction: column; justify-content: flex-end; height: 76px; }
.acqs .bw .bn { text-align: center; font-size: 11px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.acqs .bw .sg:first-of-type { border-radius: 3px 3px 0 0; }
.acqs .bw .sg + .sg { margin-top: 1px; }
.acqs .sg.during { background: var(--acqs-during); }
.acqs .sg.outside { background: var(--acqs-outside); }
.acqs .sg.noshift { background: var(--acqs-noshift); }
.acqs-grid tr.onshift td { background: var(--surface-2); font-weight: 700; border-bottom: 2px solid rgba(0,0,0,0.14); cursor: pointer; }
.acqs-grid tr.onshift td.rowlbl { cursor: default; }
.acqs-grid tr.onshift td.zero { color: var(--text-faint); font-weight: 400; }
.acqs-grid tr.onshift td.later { opacity: 0.55; }
.acqs-grid td.h { font-weight: 600; cursor: pointer; }
.acqs-grid td.h.band { background: var(--acqs-band); }
.acqs-grid td.h.out { background: var(--acqs-out); }
.acqs-grid td.h .z { color: var(--text-faint); font-weight: 400; }
.acqs-grid td.h.flag { background: var(--amber-bg); color: var(--amber-ink); font-weight: 700; }
.acqs-grid td.h.flag i { font-style: normal; font-size: 10px; margin-left: 1px; vertical-align: 2px; }
.acqs-grid td.shiftcol { font-size: 12.5px; color: var(--text-muted); padding-left: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acqs-grid td.shiftcol small { display: block; font-size: 11.5px; color: var(--text-faint); line-height: 1.1; }
.acqs-grid td.name { padding: 0; }
.acqs-grid .nm { display: block; width: 100%; min-height: 30px; border: 0; background: none; padding: 0 8px; font: inherit; font-weight: 600; color: var(--text); text-align: left; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acqs-grid .nm:hover span { text-decoration: underline; text-underline-offset: 2px; }
.acqs-grid .nm small { display: none; }
.acqs-grid .nm .fc { margin-left: 6px; font-size: 11px; font-weight: 700; color: var(--amber-ink); }
.acqs-grid tbody.people tr.sel td { border-top: 2px solid var(--text); border-bottom: 2px solid var(--text); }
.acqs-grid tbody.people tr.sel td.name { box-shadow: inset 3px 0 0 var(--text); }
.acqs-grid.has-sel tbody.people tr:not(.sel) td:not(.name) { opacity: 0.5; }
.acqs-grid .csel { box-shadow: inset 2px 0 0 var(--text), inset -2px 0 0 var(--text); }
.acqs-grid thead th.csel { background: var(--text); color: #fff; box-shadow: none; }
.acqs-grid tbody.people tr:last-child td.csel { box-shadow: inset 2px 0 0 var(--text), inset -2px 0 0 var(--text), inset 0 -2px 0 var(--text); }
.acqs-grid td.h:hover, .acqs-grid tr.onshift td.num:hover, .acqs-grid tr.bars td.b:hover { outline: 2px solid var(--text-muted); outline-offset: -2px; }
.acqs-grid td.nobody { padding: 16px 10px; color: var(--text-muted); text-align: center; }
.acqs-hidden-note { margin: 8px 0 0; font-size: 12.5px; color: var(--text-muted); }

/* the hour panel */
.acqs-hour { margin-top: 12px; padding: 12px 14px 14px; background: var(--surface-2); border-radius: 8px; }
.acqs-hour-t { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 14px; flex-wrap: wrap; font-size: 12.5px; }
.acqs-hour-t h3 { margin: 0; font-size: 15px; font-weight: 700; color: var(--text); }
.acqs-hour-t h3 span { color: var(--text-muted); font-weight: 600; }
.acqs-hour-g { display: grid; grid-template-columns: minmax(110px, max-content) 1fr; gap: 8px 14px; margin-top: 10px; align-items: start; }
.acqs-hour-g .gl { font-size: 13px; color: var(--text-muted); padding-top: 5px; }
.acqs-hour-g .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.acqs-chip { display: inline-flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 104px; padding: 4px 11px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: 13px; white-space: nowrap; }
.acqs-chip .nm { display: inline-flex; align-items: center; gap: 6px; }
.acqs-chip .dot { width: 8px; height: 8px; border-radius: 2px; }
.acqs-chip .dot.during { background: var(--acqs-during); }
.acqs-chip .dot.outside { background: var(--acqs-outside); }
.acqs-chip .dot.noshift { background: var(--acqs-noshift); }
.acqs-chip b { font-variant-numeric: tabular-nums; }
.acqs-chip.warn { color: var(--amber-ink); background: var(--amber-bg); border-color: var(--amber-border); }
.acqs-foot { margin: 10px 0 0; font-size: 12px; color: var(--text-faint); }

/* "Set shifts" side sheet */
.acqs-backdrop { position: fixed; inset: 0; z-index: 900; background: rgba(15, 23, 42, 0.32); }
.acqs-sheet { position: fixed; top: 0; right: 0; bottom: 0; z-index: 901; width: min(640px, 100%); display: flex; flex-direction: column; background: var(--surface); box-shadow: var(--shadow-lg); }
.acqs-sheet-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.acqs-sheet-top h2 { margin: 0; font-size: 17px; }
.acqs-sheet-body { flex: 1 1 auto; overflow-y: auto; padding: 4px 18px 24px; }
.acqs-sheet-intro { font-size: 13px; color: var(--text-muted); margin: 12px 0 8px; }
.acqs-sheet-tz { margin-bottom: 4px; }
.acqs-sheet-group { margin-top: 16px; font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.acqs-shiftrow { display: grid; grid-template-columns: 116px 1fr auto; gap: 6px 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.acqs-shiftrow.focus { background: var(--blue-bg); box-shadow: inset 3px 0 0 var(--accent); padding-left: 8px; }
.acqs-shiftrow .who b { display: block; font-size: 14px; }
.acqs-shiftrow .who small { font-size: 12px; color: var(--text-faint); }
.acqs-shiftrow .ed { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.acqs-shiftrow select { height: 30px; padding: 0 6px; border: 1px solid var(--border); border-radius: 6px; font: inherit; font-size: 13px; background: var(--surface); color: var(--text); }
.acqs-shiftrow .act { display: flex; gap: 6px; }
.acqs-shiftrow .err { grid-column: 1 / -1; margin: 0; font-size: 12.5px; color: var(--red-ink); }
.acqs-days { display: inline-flex; gap: 3px; }
.acqs-days button { width: 26px; height: 26px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text-muted); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.acqs-days button[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: #fff; }

@media (max-width: 720px) {
  .acqs { padding: 12px 10px; }
  .acqs-grid { min-width: 1000px; }
  .acqs-grid .shiftcol { display: none; }
  .acqs-grid .nm small { display: block; font-size: 11px; font-weight: 400; color: var(--text-faint); line-height: 1.1; }
  .acqs-grid td, .acqs-grid th { height: 38px; }
  .acqs-grid tr.bars td { height: 82px; }
  .acqs-hour-g { grid-template-columns: 1fr; gap: 6px; }
  .acqs-chip { min-width: 0; }
  .acqs-shiftrow { grid-template-columns: 1fr; }
  .acqs-toggle { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { .acqs * { transition: none !important; } }
