/* overview.css — the landing page (overview.js, #/overview; docs/app_v3_contract.md §4.3) and the shell's date bar (app.js
   dateBarRender, #datebar in index.html), which arrived with it and sits above every page.
   The page: four sections in Tom's order, each a row of side-by-side column cards (Company / the stores / the departments);
   a card = its head (tap to narrow), a big number, the one-line comparison, a 13-week chart, the parts under it. Desktop: the
   cards side by side (as many as fit, then the next row); phone (under 600 px): one card per row, Company first. Colours are the
   app's tokens (styles.css), so dark mode follows; red / green always carry an arrow and a word too (black-and-white print).
   Charts: this year / worked / shrink in the store red, last year / earned / markdowns in grey, 2 px lines, hairline grid. */

/* ---- the date bar (every page) --------------------------------------------------------------------------------------- */
.col { min-width: 0; }
.datebar { background: var(--surface); border-bottom: 1px solid var(--line); }
      /* U12 / U13: the one switch look, never white on dark red */

/* ---- the page ------------------------------------------------------------------------------------------------------------ */
.ov { --ov-s1: var(--red); --ov-s2: #8A8D96; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ov { --ov-s2: #9A9DA6; }
}
:root[data-theme="dark"] .ov { --ov-s2: #9A9DA6; }

/* weather: one slim line, 15601, today + 3 days */
.ov-wx.none { color: var(--muted); font-size: var(--fs-sm); }
.ov-wxd small.pc { color: var(--info); font-weight: 600; margin-left: 2px; }

/* the Store and Department boxes (074, Tom 2026-10-15): two big boxes across the top, each dropping its checklist */

/* the back chip (and the older chips' look) */
.ov-chips { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 0 0 6px; }
.ov-chipg { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ov-chipl { font-size: var(--fs-xs); font-weight: 700; color: var(--muted); margin-right: 2px; }   /* U12 / U13: the one switch look */

/* the sections and their columns */                 /* one column (a department manager): not a sliver */
.ov-card.total { background: var(--surface-2); border-color: var(--line-strong); }
.ov-unit { font-family: var(--body); font-size: var(--fs-sm); font-weight: 600; color: var(--muted); letter-spacing: 0; }
.ov-chg.good { color: var(--good); }
.ov-chg.bad { color: var(--red); }
.ov-neg { color: var(--red); font-weight: 700; }
.ov-stats.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }   /* the label (a value's own span keeps the value's size) */                      /* 073: GP 2+ points under its goal / its 13 weeks before */

/* the 13-week charts */
.ov-line.s1 { stroke: var(--ov-s1); }
.ov-line.s2 { stroke: var(--ov-s2); stroke-dasharray: 4 3; }
.ov-dot.s1 { fill: var(--ov-s1); }
.ov-dot.s2 { fill: var(--ov-s2); }
.ov-bar.s1 { fill: var(--ov-s1); }
.ov-bar.s2 { fill: var(--ov-s2); }
.ov-key.s2 { border-top: 2px dashed var(--ov-s2); }
.ov-key.bar { width: 9px; height: 9px; border: 0; border-radius: 4px; background: var(--ov-s1); }
.ov-key.bar.s2 { background: var(--ov-s2); }
.ov-cap { margin-left: auto; font-weight: 600; }

/* the charts (Tom 2026-10-16 Q3-Q6): bars per week; this year red, last year a thin grey line; shrink red beside markdowns blue;
   labor over (red, up) / under (green, down) earned with the 5% band; the month names, the newest week and the OT under the bars in
   HTML (they read at the page's text size); one line under each chart reads out a week, the newest at first, any bar on a tap */
.ov { --ov-md: #2F6FD6; --ov-over: var(--bad); --ov-under: var(--good); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ov { --ov-md: #6EA4F7; }
}
:root[data-theme="dark"] .ov { --ov-md: #6EA4F7; }
.ov-b.now, .ov-b.sel { opacity: 1; }
.ov-chart.picked .ov-b.now:not(.sel) { opacity: .5; }
.ov-b.ty, .ov-b.sh { fill: var(--ov-s1); }
.ov-b.md { fill: var(--ov-md); }
.ov-b.over { fill: var(--ov-over); }
.ov-b.under { fill: var(--ov-under); }
.ov-card.total .ov-lyl { stroke: var(--surface-2); }
.ov-card.total .ov-read { background: var(--surface); }
.ov-key.ly { width: 16px; border-top: 2px solid var(--ov-s2); }
.ov-key.bar.ty, .ov-key.bar.sh { background: var(--ov-s1); }
.ov-key.bar.md { background: var(--ov-md); }
.ov-key.bar.over { background: var(--ov-over); }
.ov-key.bar.under { background: var(--ov-under); }
.ov-key.band { width: 12px; height: 9px; border: 0; border-top: 1px dashed var(--muted); border-bottom: 1px dashed var(--muted); border-radius: 0; background: rgba(128, 128, 128, .25); }

/* one Departments card (Tom 2026-10-16 Q7 / Q8): a row per department, a tap drops open its details and chart */
.ov-drow .pn { grid-area: pn; font-weight: 700; font-size: var(--fs-md); overflow-wrap: anywhere; }
.ov-drow .pn::before { content: ""; display: inline-block; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); margin: 0 9px 2px 1px; transition: transform .15s; }
.ov-drow[open] > summary .pn::before { transform: rotate(45deg); }
div.ov-drow .pn::before { visibility: hidden; }
.ov-drow .pv { grid-area: pv; text-align: right; font-weight: 800; font-size: var(--fs-md); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ov-drow .pc { grid-area: pc; text-align: right; font-size: var(--fs-md); white-space: nowrap; }
.ov-drow .pl { grid-area: pl; font-size: var(--fs-sm); color: var(--muted); padding-left: 19px; overflow-wrap: anywhere; }
.ov-drow.off .pn, .ov-drow.off .pv { color: var(--muted); font-weight: 600; }
@media (hover: hover) { .ov-drow > summary:hover .pn { text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 3px; }
}
@media (max-width: 599px) { .ov-drow .pl { padding-left: 19px; }
}

/* the departments under Sales (and the folded lists under Shrink and Labor) */
.ov-parts li button:hover .pn, .ov-mlist li button:hover .pn { text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 3px; }
.ov-parts .pn, .ov-mlist .pn { grid-area: pn; font-weight: 700; font-size: var(--fs-md); overflow-wrap: anywhere; }
.ov-parts .pv, .ov-mlist .pv { grid-area: pv; text-align: right; font-weight: 700; font-size: var(--fs-md); font-variant-numeric: tabular-nums; }
.ov-parts .pl, .ov-mlist .pl { grid-area: pl; font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ov-parts .pc { grid-area: pc; text-align: right; font-size: var(--fs-xs); }
.ov-tag { display: inline-block; font-size: var(--fs-xs); background: var(--surface-2); border: 1px solid var(--line); border-radius: 99px; padding: 0 6px; margin-left: 2px; }
.ov-ltbl .n { text-align: right; white-space: nowrap; }

/* Money to act on: four small tiles linking to their pages */   /* 153: five tiles - Great Deals across the bottom */
/* 160: the tile's Download (that category's open lines of the column), a small round target in the corner */
.ov-mt.off { opacity: .7; }

/* the skeleton: the four headings at once, cards shimmering until the answer lands */

/* phone: one card per row (Company first), the big numbers a touch smaller */
@media (max-width: 599px) {
  .ov-chips { gap: 6px 10px; }
}

/* print: Letter, the cards two across, no chips / date buttons */
@media print {
  .ov-chips, .ov-go, .ov-ddp, .ov-ddc, .ov-back { display: none !important; }
  .datebar { border: 0; }
  .ov-chg.good, .ov-pos { color: #000; } .ov-chg.bad, .ov-neg { color: #000; }
}

/* Settings: the owner's "Show gross profit and purchases ÷ sales" switch (screens2.js SC.settings, v3 Q49) */
.gp-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.gp-switch .note { flex-basis: 100%; margin: 0; }

/* the UX audit of 2026-10-16: bars solid as the legend says (a tap outlines its week instead of fading the rest); ‹ › beside the read-out
   for a 44 px way through the weeks (a bar is narrower than a thumb); department rows in ink (the grey is for the lines with no goal);
   the departments over earned beside the net; a phone's toggles 44 px; the Departments card no wider than reads well on a desktop */
.ov-b, .ov-b.now, .ov-chart.picked .ov-b.now:not(.sel) { opacity: 1; }
.ov-b.sel { stroke: var(--ink); stroke-width: 1.4; paint-order: stroke; }
.ov-drow .pn, .ov-drow .pv { color: var(--ink); }
div.ov-drow.off .pn, div.ov-drow.off .pv { color: var(--muted); }
.ov-over.good { color: var(--good); }
details.ov-drow.zero .pn, details.ov-drow.zero .pv { color: var(--muted); font-weight: 600; }

/* ==== from budget.css (2026-10-24): budget.css loads with its page now (pages.js); these of its rules also style what the shell or other
   pages draw, so they load with the first paint, at the end of overview.css - where budget.css sat in the cascade ==== */
.bud .filters { margin-bottom: 4px; }
/* a dollar gap ("−$2,664") never splits its sign from the amount; the Store page's budget table uses it too */
.mini.nw, td .mini.nw, td.n .mini.nw { white-space: nowrap; }
@media (max-width: 599px) {
  .bud .tiles .tile .big { font-size: var(--fs-hero); }                     /* "$30,795,735" fits a half-width tile */
}
@media print {
  .bud .filters { display: none; }
}
/* the Incentive page's plan (screens2.js SC.incentive): the deck's four tiers per category, the one reached marked with ► and bold
   (not colour alone), the score equation above the table */
.inc-sum { margin: 0 0 12px; font-size: var(--fs-md); }
.inc-sum .mini { margin-top: 2px; }
.inc-tiers { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; min-width: 170px; font-size: var(--fs-sm); }
.inc-tiers li { display: flex; justify-content: space-between; gap: 10px; padding: 1px 6px; border-radius: 4px; color: var(--muted); }
.inc-tiers li b { font-weight: 600; }
.inc-tiers li.hit { color: var(--ink); font-weight: 700; background: var(--surface-2); outline: 1.5px solid var(--ink); }
.inc-tiers li.hit b { font-weight: 800; }
.inc-tbl tr.total td { font-weight: 700; }
@media print {
  .inc-tiers li.hit { outline-color: #000; background: none; }
}
