/* Owner: W2-WEEK.  This week (.week-page), the Slides list (.slides-page), the week
   dialogs (.new-slide-dialog, .week-export-dialog, .add-store-dialog) and the tiles
   built by ui/tiles.js (.tile-set, also used on the Campaigns list).
   Tokens only; no colour literals. */

/* =====================================================================
   Tiles from tiles.js — one line each for title + state, so the grids stay even.
   ===================================================================== */
.tile-set .thumb-wrap { position: relative; }
/* The state badge on the thumbnail's bottom-left corner, ringed so it reads on any artwork. */
.tile-set .thumb-badge {
  position: absolute; left: 6px; bottom: 6px; max-width: calc(100% - 12px);
  box-shadow: 0 0 0 2px var(--surface), var(--shadow-1);
}
.tile-set .title-row { align-items: center; flex-wrap: nowrap; }
.tile-set .tile-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-set .tile-foot .sub { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-set .tile-more { flex: 0 0 auto; }
.tile-set .tile-more:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* =====================================================================
   This week
   ===================================================================== */
.week-page .page-head { align-items: center; margin-bottom: 12px; }
.week-page .page-head .hint { font-variant-numeric: tabular-nums; }
.week-page .back-chip { text-decoration: none; }

.week-page .week-switch {
  display: inline-flex; align-items: center; gap: 2px; padding: 2px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-pill);
}
.week-page .week-switch .btn { border-radius: var(--r-pill); padding: 0 10px; }
.week-page .week-switch select {
  width: auto; height: 28px; min-height: 28px; padding: 0 6px; border: 0; border-radius: var(--r-sm);
  background: transparent; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer;
}
.week-page .week-switch select:focus { box-shadow: none; }
.week-page .week-switch select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ---- Empty week ---- */
.week-page .week-hero { padding: 40px 32px; }
.week-page .week-hero .empty-body { max-width: 600px; }
.week-page .last-week { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 12px 16px; border-radius: var(--r-lg); }
.week-page .last-week-icon { display: inline-flex; color: var(--accent-ink); flex: 0 0 auto; }
.week-page .last-week.tone-ok .last-week-icon { color: var(--ok-ink); }
.week-page .last-week-text { flex: 1 1 auto; min-width: 0; color: var(--ink-2); }
.week-page .last-week-text strong { color: var(--ink); }
.week-page .last-week-link { font-weight: 600; color: var(--accent-ink); text-decoration: none; }
.week-page .last-week-link:hover { text-decoration: underline; }

/* ---- Import banner ---- */
.week-page > .callout { margin-bottom: 12px; }
.week-page .import-lines {
  list-style: none; margin: 4px 0 0; padding: 0; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 2px 16px;
}
.week-page .import-lines strong { color: var(--ink); }

/* ---- Steps: four cards, at most 100px tall ---- */
.week-page .steps {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.2fr); gap: 12px; margin-bottom: 12px;
}
.week-page .step {
  display: flex; flex-direction: column; gap: 5px; min-width: 0; max-height: 100px; padding: 9px 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1);
}
/* The current step: a 2px accent edge (1px border + 1px ring, so nothing moves). */
.week-page .step.current { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow-1); }
.week-page .step-top { display: flex; align-items: center; gap: 8px; height: 24px; min-width: 0; }
.week-page .step .num {
  width: 24px; height: 24px; border-radius: 50%; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; background: var(--accent-soft); color: var(--accent-ink); border: 1px solid var(--accent-line);
}
.week-page .step.done .num { background: var(--ok-soft); color: var(--ok-ink); border-color: var(--ok-line); }
.week-page .step.alert .num { background: var(--bad-soft); color: var(--bad-ink); border-color: var(--bad-line); }
.week-page .step-title { font-size: 14px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.week-page .step-tag {
  margin-left: auto; flex: 0 0 auto; display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 700; background: var(--accent); color: var(--surface);
}
.week-page .step-state {
  font-size: 13px; line-height: 18px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.week-page .step.alert .step-state { color: var(--bad-ink); }
.week-page .step-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 0; }
.week-page .step-actions .btn.ghost { padding: 0 8px; }
.week-page .step-actions .btn.ghost:not(.primary) { color: var(--accent-ink); }
@media (max-width: 1100px) {
  .week-page .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .week-page .step { max-height: none; }
}

/* ---- Needs attention (collapsed by default) ---- */
.week-page .group.attention { margin-bottom: 0; box-shadow: none; border-color: var(--warn-line); }
.week-page .attention .group-head { padding: 8px 12px; background: var(--warn-soft); }
.week-page .attention .group-head:hover { background: var(--warn-soft); filter: brightness(.98); }
.week-page .attn-head { display: inline-flex; align-items: center; gap: 8px; color: var(--warn-ink); }
.week-page .attn-icon { display: inline-flex; }
.week-page .attn-list { list-style: none; margin: 0; padding: 4px 0; }
.week-page .attn-row {
  display: flex; align-items: center; gap: 8px; padding: 6px 14px; color: var(--ink); text-decoration: none; font-size: 13px;
}
.week-page .attn-row:hover { background: var(--surface-hover); }
.week-page .attn-row:focus-visible { outline-offset: -2px; }
.week-page .attn-row-icon { display: inline-flex; color: var(--t-ink); flex: 0 0 auto; }
.week-page .attn-text { flex: 1 1 auto; min-width: 0; }
.week-page .attn-go { color: var(--muted); flex: 0 0 auto; }

/* ---- Sections and tile grids ---- */
.week-page .section-title { margin: 14px 0 8px; align-items: center; }
.week-page .section-side { display: inline-flex; align-items: center; gap: 10px; }
.week-page .tiles { gap: 12px; }
.week-page .slide-tiles { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.week-page .campaign-tiles { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
@media (min-width: 1600px) {
  .week-page .slide-tiles { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
  .week-page .campaign-tiles { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}
.week-page .tile.add { display: flex; flex-direction: column; gap: 4px; min-height: 0; font: inherit; }
.week-page .tile.add .add-name { font-weight: 700; font-size: 15px; }
.week-page .tile.add .hint { font-weight: 400; }
.week-page .tile.add:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* The sheet's other columns (not your stores): one quieter tile. */
.week-page .tile.add.quiet { background: transparent; border-color: var(--line); }
.week-page .tile.add.quiet .add-name { font-size: 14px; color: var(--ink-2); }
.week-page .tile.add.quiet:hover .add-name { color: var(--accent-ink); }
.week-page .tile.add .add-others {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; max-width: 100%;
}
/* Section empty states; the empty-week hero keeps its own, larger padding. */
.week-page .empty:not(.week-hero) { padding: 20px; }

/* =====================================================================
   Slides list
   ===================================================================== */
.slides-page .filters { gap: 12px; }
.slides-page .filters .field { flex-direction: row; align-items: center; gap: 8px; margin: 0; }
.slides-page .filters .field select { width: auto; min-width: 180px; }
.slides-page .filters-hint { margin-left: auto; }
/* clip (not hidden): rounded corners without making the group a scroller, so the
   table header sticks to the page as it scrolls. */
.slides-page .group { overflow: clip; }
.slides-page .group-head-main { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0; }
.slides-page .group-head-main .btn.small { height: 26px; }
.slides-page .group-hint { font-variant-numeric: tabular-nums; }

.slides-tbl { table-layout: fixed; }
.slides-tbl th, .slides-tbl td { vertical-align: middle; }
.slides-tbl td { padding-top: 8px; padding-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slides-tbl .col-store { width: 20%; }
.slides-tbl .col-state { width: 190px; }
.slides-tbl .col-checks { width: auto; }
.slides-tbl .col-deals { width: 72px; }
.slides-tbl .col-new { width: 17%; }
.slides-tbl .col-updated { width: 112px; }
.slides-tbl .col-menu { width: 52px; text-align: right; padding-left: 4px; padding-right: 10px; overflow: visible; }
.slides-tbl .cell-flex { display: flex; align-items: center; gap: 8px; min-width: 0; }
.slides-tbl .row-link { font-weight: 700; color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.slides-tbl .row-link:hover { text-decoration: underline; }
.slides-tbl .row-link:focus-visible { outline-offset: 2px; }
.slides-tbl .tag {
  flex: 0 1 auto; min-width: 0; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  display: inline-block; height: 20px; line-height: 18px; padding: 0 7px; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 600; color: var(--neutral-ink); background: var(--neutral-soft); border: 1px solid var(--neutral-line);
}
.slides-tbl .note-first { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); font-size: 13px; }
.slides-tbl .note-more {
  flex: 0 0 auto; font-size: 12px; font-weight: 700; color: var(--ink-2); padding: 0 6px; height: 20px; line-height: 18px;
  border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--line);
}
.slides-tbl .col-new, .slides-tbl .col-updated { font-size: 13px; color: var(--ink-2); }
.slides-tbl .col-deals { font-size: 13px; }

/* =====================================================================
   New weekly slide
   ===================================================================== */
.new-slide-dialog .date-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.new-slide-dialog .seg { align-self: flex-start; }
.new-slide-dialog .prev-box { margin: -4px 0 12px; padding: 12px 12px 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); }
.new-slide-dialog .copy-modes { display: flex; flex-direction: column; gap: 8px; }
.new-slide-dialog .copy-mode { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; }
.new-slide-dialog .copy-mode input { margin-top: 2px; }
.new-slide-dialog .copy-mode-text { display: flex; flex-direction: column; min-width: 0; }
.new-slide-dialog .copy-mode-label { font-weight: 600; }
.new-slide-dialog .form-error { margin-top: 4px; }

/* =====================================================================
   Export all stores
   ===================================================================== */
.week-export-dialog .export-fields { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(260px, 1.4fr) auto; gap: 16px; align-items: start; }
.week-export-dialog .file-types { gap: 14px; min-height: 34px; }
.week-export-dialog .export-intro { margin: 0 0 10px; font-size: 13px; }
.week-export-dialog .export-tbl td { vertical-align: middle; }
.week-export-dialog .export-tbl .col-tick { width: 44px; }
.week-export-dialog .export-tbl tr.is-failing td { background: var(--surface-2); }
.week-export-dialog .ready { display: inline-flex; align-items: center; gap: 4px; color: var(--ok-ink); font-weight: 600; }
.week-export-dialog .failing { color: var(--bad-ink); font-size: 13px; }
.week-export-dialog .failing a { color: var(--bad-ink); font-weight: 600; white-space: nowrap; }
.week-export-dialog .export-results h3 { margin: 16px 0 8px; color: var(--ink); }
.week-export-dialog .export-store { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-bottom: 6px; }
.week-export-dialog .export-results a.file-link { display: inline-flex; align-items: center; gap: 4px; padding: 0; color: var(--accent-ink); }
.week-export-dialog .export-save { gap: 10px; margin-top: 10px; }
.week-export-dialog .export-results a.open-files { display: inline-flex; align-items: center; gap: 4px; padding: 0; margin-left: auto; font-weight: 600; color: var(--accent-ink); }
.week-export-dialog .skipped { display: flex; align-items: flex-start; gap: 6px; margin-top: 10px; color: var(--bad-ink); font-size: 13px; }
.week-export-dialog .skipped .ico { flex: 0 0 auto; margin-top: 2px; }

/* =====================================================================
   Add a store from the deals sheet
   ===================================================================== */
.add-store-dialog .add-store-list { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.add-store-dialog .add-store-row { padding: 6px 0; }
.week-page .step-warn { display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--warn-ink); line-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.week-page .step-warn svg { flex: 0 0 auto; }
.week-page .step-warn span { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.week-page .step-state, .week-page .step-warn { flex: 0 0 auto; }

/* =====================================================================
   This week as a dashboard: summary numbers, then two columns (stores, campaigns and
   send out | To do, deals sheet, activity), the slide previews folded underneath.
   ===================================================================== */
.week-page .kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 4px 0 16px; }
.week-page .kpi {
  display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px 14px; color: inherit; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1);
}
.week-page a.kpi:hover { border-color: var(--accent-line); box-shadow: var(--shadow-2); }
.week-page .kpi.tone-bad, .week-page .kpi.tone-warn, .week-page .kpi.tone-info { background: var(--t-soft); border-color: var(--t-line); }
.week-page .kpi.tone-bad .kpi-value, .week-page .kpi.tone-warn .kpi-value, .week-page .kpi.tone-info .kpi-value { color: var(--t-ink); }
.week-page .kpi-text { display: flex; flex-direction: column; min-width: 0; }
.week-page .kpi-label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.week-page .kpi-value { font-size: 22px; font-weight: 700; line-height: 1.25; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.week-page .kpi-value small { font-size: 13px; font-weight: 500; color: var(--muted); }
.week-page .kpi-sub { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.week-page .kpi-ring {
  flex: 0 0 auto; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--ok-solid) var(--pct), var(--neutral-soft) 0);
}
.week-page .kpi-ring span {
  width: 38px; height: 38px; border-radius: 50%; background: var(--surface); display: grid; place-items: center;
  font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
}

.week-page .dash { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); gap: 16px; align-items: start; }
.week-page .dash-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.week-page .dash-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); min-width: 0; }
.week-page .dash-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.week-page .dash-head h2 { font-size: 15px; margin: 0; }
.week-page .dash-head .spacer { flex: 1; }
.week-page .dash-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.week-page .dash-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px 14px; }
.week-page .dash-body .dash-actions { padding: 0; }
.week-page .dash-empty { margin: 0; padding: 14px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.week-page .dash-foot { margin: 0; padding: 8px 14px 12px; }
.week-page .sheet-state { margin: 0; overflow-wrap: anywhere; }
.week-page .count-pill { min-width: 22px; padding: 0 7px; border-radius: var(--r-pill); background: var(--neutral-soft); color: var(--neutral-ink); font-size: 12px; font-weight: 700; text-align: center; }
.week-page .count-pill.tone-bad { background: var(--t-solid); color: var(--surface); }
.week-page .todo-panel .attn-list { padding: 2px 0 6px; }
.week-page .attn-more { margin: 4px 14px; }

.week-page .table-wrap { overflow-x: auto; }
.week-page .store-grid { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.week-page .store-grid th, .week-page .store-grid td { padding: 7px 14px; text-align: left; border-top: 1px solid var(--line); vertical-align: middle; }
.week-page .store-grid thead th { border-top: 0; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.week-page .store-grid tbody th a { color: var(--ink); font-weight: 700; text-decoration: none; }
.week-page .store-grid tbody th a:hover { text-decoration: underline; }
.week-page .store-grid tbody tr:hover { background: var(--surface-2); }
.week-page .store-grid .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.week-page .store-grid .muted { color: var(--muted); }
.week-page .grid-cell { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; text-decoration: none; color: inherit; max-width: 280px; }
.week-page .grid-note { font-size: 12px; color: var(--bad-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.week-page .grid-missing th { color: var(--muted); }

.week-page .camp-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; padding: 12px 14px; }
.week-page .camp-chip {
  display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 8px; align-items: center; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: var(--r-md); color: inherit; text-decoration: none; background: var(--surface);
}
.week-page .camp-chip:hover { border-color: var(--accent-line); background: var(--surface-hover); }
.week-page .camp-chip-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.week-page .camp-chip-state { grid-column: 2; font-size: 12px; color: var(--t-ink, var(--muted)); }

.week-page .act-list { list-style: none; margin: 0; padding: 6px 0; }
.week-page .act-list li { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px; padding: 5px 14px; font-size: 13px; }
.week-page .act-when { color: var(--muted); white-space: nowrap; }
.week-page .week-previews { margin-top: 16px; }

@media (max-width: 1240px) { .week-page .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1000px) { .week-page .dash { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .week-page .kpis { grid-template-columns: minmax(0, 1fr); } }

/* =====================================================================
   The Approve page (ui/approvepage.js): every picture of the week with a tick, one button.
   ===================================================================== */
.approve-page .approve-body { display: flex; flex-direction: column; gap: 18px; }
.approve-lead { margin: 0; max-width: 820px; font-weight: 700; color: var(--ink-2); }
.approve-group .section-title { margin-top: 0; }
.approve-grid { display: grid; gap: 18px; }
.approve-grid.is-slides { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.approve-grid.is-camps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.approve-card { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.approve-card .tile { width: 100%; }
.approve-card.is-blocked .tile { opacity: .75; box-shadow: none; border-style: dashed; }
.approve-tick { padding: 8px 12px; border: 2px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); font-weight: 800; }
.approve-tick input { width: 20px; height: 20px; flex: 0 0 auto; accent-color: var(--accent); }
.approve-card.is-ticked .approve-tick { border-color: var(--navy, var(--ink)); background: var(--accent-soft); }
.approve-card.is-blocked .approve-tick { color: var(--muted); border-style: dashed; cursor: not-allowed; }
.approve-why { display: flex; gap: 6px; align-items: flex-start; font-size: 13px; font-weight: 700; color: var(--bad-ink); }
.approve-why .ico { flex: 0 0 auto; margin-top: 2px; }
.approve-note { font-size: 12.5px; }
.approve-options { display: flex; flex-direction: column; gap: 10px; max-width: 820px; }
.approve-options .section-title { margin: 0; }
.approve-opt .check-line { align-items: flex-start; }
.approve-opt .check-line input { width: 18px; height: 18px; margin-top: 2px; flex: 0 0 auto; accent-color: var(--accent); }
.approve-opt > .hint { margin-left: 26px; }
.approve-opt > .ico { vertical-align: -3px; color: var(--ok-ink); }
.approve-size { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.approve-size select { max-width: 440px; }
.approve-opt > .approve-size-note { margin: 4px 0 0; }
/* How fresh the deals and stock are, and what is sold out at a store right now (ui/stockcheck.js). */
.approve-fresh .fresh-note { flex-wrap: wrap; white-space: normal; row-gap: 2px; }
.stock-check { max-width: 820px; }
.stock-check-none { margin: 0; }
.stock-check .callout-body > .hint { margin: 0; }
.stock-check-list { list-style: none; margin: 10px 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.stock-check-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: 8px 10px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-md); }
.stock-check-line { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; min-width: 0; }
.stock-check-text { font-weight: 800; color: var(--ink); overflow-wrap: anywhere; }
.stock-check-where { grid-column: 1; font-size: 13px; color: var(--ink-2); }
.stock-check-list li > .btn { grid-column: 2; grid-row: 1 / span 2; }
@media (max-width: 640px) {
  .stock-check-list li { grid-template-columns: minmax(0, 1fr); }
  .stock-check-list li > .btn { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 4px; }
}
.approve-bar {
  position: sticky; bottom: 0; z-index: var(--z-sticky); display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 18px; padding: 12px 16px;
  background: var(--surface); border: 2px solid var(--navy, var(--line-strong)); border-radius: var(--r-lg) var(--r-lg) 0 0; box-shadow: 0 -4px 0 var(--accent);
}
.approve-bar[hidden] { display: none; }
.approve-bar-text { margin-right: auto; display: flex; flex-direction: column; min-width: 0; }
.approve-results { display: flex; flex-direction: column; gap: 8px; max-width: 900px; }
.approve-failed { margin: 4px 0 0; padding-left: 18px; }
.approve-after { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
@media (max-width: 1100px) { .approve-grid.is-camps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .approve-grid.is-slides, .approve-grid.is-camps { grid-template-columns: minmax(0, 1fr); }
  .approve-bar .btn.large { flex: 1 1 100%; }
}

/* =====================================================================
   The all-stores deals table (ui/dealstable.js): a row per deal line, a column per store.
   ===================================================================== */
.deals-page .deals-tools { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; margin-bottom: 12px; }
.deals-find { flex: 1 1 280px; max-width: 420px; height: 36px; }
.deals-legend { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.deals-results { display: flex; flex-direction: column; gap: 8px; max-width: 900px; margin-bottom: 12px; }
.deals-results:empty { display: none; }
.deals-table-wrap { overflow-x: auto; border: 2px solid var(--navy, var(--line-strong)); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--pop, var(--shadow-1)); }
.deals-table-wrap:has(> .empty) { border: 0; box-shadow: none; background: none; }
.deals-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.deals-table thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); border-bottom: 2px solid var(--navy, var(--line-strong)); padding: 8px 6px; text-align: center; vertical-align: bottom; }
.deals-table thead .dt-word-head { text-align: left; padding-left: 12px; font-size: 12px; color: var(--muted); }
.dt-store a { display: inline-flex; align-items: center; gap: 5px; font-weight: 800; color: var(--ink); text-decoration: none; white-space: nowrap; }
.dt-store a:hover { text-decoration: underline; }
.dt-store-sub { display: block; min-height: 15px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.dt-cat th { text-align: left; padding: 8px 12px; background: var(--canvas); border-top: 2px solid var(--line); border-bottom: 1px solid var(--line); font-weight: 900; letter-spacing: .02em; }
.dt-cat-chip { display: inline-block; width: 10px; height: 18px; margin-right: 8px; border-radius: 3px; border: 1.5px solid var(--navy, var(--ink)); vertical-align: -4px; }
.dt-cat-n { color: var(--muted); font-weight: 700; }
.deals-table tbody tr:not(.dt-cat) > * { border-bottom: 1px solid var(--line); }
.deals-table tbody tr:not(.dt-cat):hover > * { background: var(--surface-hover); }
.deals-table tr.is-flash > * { background: var(--brand-yellow) !important; transition: background-color .4s; }
.dt-word { text-align: left; font-weight: 600; padding: 7px 10px 7px 12px; min-width: 260px; max-width: 460px; position: sticky; left: 0; background: var(--surface); z-index: 1; }
.dt-word .dt-text { overflow-wrap: anywhere; }
.dt-word .dt-was { display: block; font-size: 12px; font-weight: 600; color: var(--muted); }
.dt-word.is-pending { box-shadow: inset 4px 0 0 var(--warn-solid); background: var(--warn-soft); }
.dt-edit { border: 0; background: none; padding: 0; margin-left: 10px; font: inherit; font-size: 12px; font-weight: 700; color: var(--accent-ink); cursor: pointer; opacity: 0; white-space: nowrap; }
.deals-table tr:hover .dt-edit, .dt-edit:focus-visible, .dt-word.is-pending .dt-edit { opacity: 1; }
.dt-edit:hover { text-decoration: underline; }
.dt-input { width: 100%; font-weight: 600; }
.dt-cell { text-align: center; padding: 4px; min-width: 84px; }
.dt-tick { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 40px; height: 26px; padding: 0 8px; border-radius: 8px; border: 2px solid transparent;
  background: none; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.dt-tick.is-on { color: var(--ok-ink); }
.dt-tick.is-on:hover { background: var(--bad-soft); color: var(--bad-ink); border-color: var(--bad-line); }
.dt-tick.is-off { color: var(--muted); background: var(--neutral-soft); border-color: var(--neutral-line); border-style: dashed; }
.dt-tick.is-off:hover { background: var(--ok-soft); color: var(--ok-ink); border-color: var(--ok-line); }
.dt-cell.is-pending .dt-tick { border: 2px solid var(--navy, var(--ink)); border-style: solid; background: var(--brand-yellow); color: var(--navy, var(--ink)); box-shadow: var(--pop-sm, none); }
.dt-tick:disabled { opacity: .6; cursor: progress; }
.dt-own { border: 0; background: none; padding: 2px 4px; font: inherit; font-size: 11.5px; font-weight: 700; font-style: italic; color: var(--accent-ink); cursor: pointer; white-space: nowrap; }
.dt-own:hover { text-decoration: underline; }
.dt-dash { color: var(--ink-disabled); }
.deals-none { padding: 16px; margin: 0; }
.deals-bar {
  position: sticky; bottom: 0; z-index: var(--z-sticky); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; padding: 12px 16px;
  background: var(--brand-yellow); border: 2px solid var(--navy, var(--line-strong)); border-radius: var(--r-lg) var(--r-lg) 0 0; box-shadow: 0 -4px 0 var(--navy, var(--line-strong));
}
.deals-bar[hidden] { display: none; }
.deals-bar-text { margin-right: auto; display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13px; font-weight: 600; }
.deals-bar-text strong { font-size: 15px; }
@media (max-width: 700px) {
  .dt-word { min-width: 190px; max-width: 240px; }
  .dt-edit { opacity: 1; }
  .deals-bar .btn.large { flex: 1 1 100%; }
}
