/* store-profit - future enhancements (1-5) and labs (6-14) components.
 * Ported verbatim from the v2 handoff's F-*.html / L-*.html boards (the design's
 * own <style> additions), minus the magenta annotation markers. Loaded after
 * store-profit.css and the shell adapters. */
.chips{display:flex;gap:6px;flex-wrap:nowrap}
.chip{height:30px;padding:0 10px;border-radius:15px;border:1px solid var(--line-2);background:var(--surface);font:inherit;font-size:12.5px;font-weight:500;color:var(--ink-2);cursor:pointer;white-space:nowrap}
.chip.on{background:var(--ink);border-color:var(--ink);color:#fff}
.srch{display:flex;align-items:center;gap:8px;height:34px;width:320px;padding:0 10px;border:1px solid var(--line-2);border-radius:var(--r-sm);background:var(--subtle);color:var(--muted);font-size:13px}
.srch input{border:0;outline:0;background:transparent;font:inherit;color:var(--ink);flex-grow:1}
.pager{display:flex;align-items:center;gap:6px}
.pg{min-width:30px;height:30px;padding:0 8px;border-radius:6px;border:1px solid var(--line-2);background:var(--surface);font:inherit;font-size:12.5px;font-weight:500;color:var(--ink-2);display:flex;align-items:center;justify-content:center;cursor:pointer}
.pg.on{background:var(--ink);border-color:var(--ink);color:#fff}
.delta{display:inline-flex;align-items:center;gap:3px;font-size:12px;font-weight:500;font-variant-numeric:tabular-nums}
.delta.up{color:var(--pos)}
.delta.down{color:var(--neg)}
.syncchip{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 10px;border-radius:14px;border:1px solid var(--line);background:var(--surface);font-size:12px;color:var(--ink-2);white-space:nowrap}
.syncchip .dot{width:7px;height:7px;border-radius:50%;background:var(--pos)}
.tabs2 a{padding:10px 14px;font-size:13.5px;font-weight:500;color:var(--muted);border-bottom:2px solid transparent;margin-bottom:-1px;text-decoration:none}
.tabs2 a.on{color:var(--ink);border-color:var(--ink)}
.drawer{background:var(--surface);height:100%;box-shadow:-24px 0 64px rgba(20,21,24,.22);display:flex;flex-direction:column}
.dh{padding:20px 24px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.db{padding:20px 24px;display:flex;flex-direction:column;gap:18px;flex-grow:1}
.df{padding:14px 24px;border-top:1px solid var(--line);background:var(--subtle);display:flex;justify-content:space-between;align-items:center;gap:12px}
.tlx{display:flex;flex-direction:column}
.tli{display:grid;grid-template-columns:20px minmax(0,1fr);gap:14px;padding-bottom:22px;position:relative}
.tli::before{content:"";position:absolute;left:9px;top:20px;bottom:0;width:2px;background:var(--line)}
.tli:last-child::before{display:none}
.tdot{width:20px;height:20px;border-radius:50%;border:2px solid var(--line-2);background:#fff;margin-top:1px}
.tdot.cur{border-color:var(--ink);background:var(--ink);box-shadow:inset 0 0 0 3px #fff}
.mbar{height:6px;border-radius:3px;background:var(--sunk);width:72px;overflow:hidden;display:inline-block;vertical-align:middle}
.mbar i{display:block;height:100%;background:var(--ink-2);border-radius:3px}
.runs{display:flex;gap:3px;align-items:flex-end}
.runs span{width:14px;border-radius:3px}

/* ---- app glue for the ported components (not in the boards) ---- */
.gsearch { position: relative; }
.sr-list { position: absolute; right: 0; top: 40px; width: 420px; max-height: 420px; overflow: auto; z-index: 50;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 12px 32px rgba(20,21,24,.14); padding: 4px; }
.sr-item { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 6px; color: inherit; text-decoration: none; }
.sr-item .t { font-weight: 500; color: var(--ink); }
.sr-item .s { font-size: 12px; color: var(--muted); }
.sr-item.on, .sr-item:hover { background: var(--subtle); text-decoration: none; }
.sr-empty { padding: 10px; color: var(--muted); font-size: 13px; }
@media (max-width: 1279.98px) { .srch { width: 240px; } }
.dr input[type="date"] { min-width: 124px; }
.drawer .affix > span:last-child { white-space: nowrap; }
.scrim[data-qs-scrim] { background: rgba(20,21,24,.36); }
@media (max-width: 1023.98px) { .prof-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }

/* date presets on narrow screens: one swipeable row; the range fills the width */
@media (max-width: 1023.98px) {
  form[data-testid="date-filter"], .filter-bar { width: 100%; align-items: stretch !important; }
  form[data-testid="date-filter"] > .row, .filter-bar .col > .row { width: 100%; }
  form[data-testid="date-filter"] .dr, .filter-bar .dr { flex: 1; min-width: 0; }
  form[data-testid="date-filter"] .dr input[type="date"], .filter-bar .dr input[type="date"] { min-width: 0; width: 100%; }
  .row.between:has(> form[data-testid="date-filter"]) { flex-wrap: wrap; gap: 12px; }
}

/* Day chips: one left-aligned carousel on every screen. The row never widens
   its form (width:0 + min-width:100% takes the width the date range sets);
   chips that don't fit run off the right edge under a short fade, the left
   edge fades once scrolled. Swipe, trackpad, mouse wheel or drag to scroll;
   no scrollbar. labs.js sets --fl / --fr from the scroll position. */
@property --fl { syntax: "<length>"; inherits: false; initial-value: 0px; }
@property --fr { syntax: "<length>"; inherits: false; initial-value: 0px; }
[data-date-presets] {
  flex-wrap: nowrap !important; justify-content: flex-start;
  width: 0; min-width: 100%; align-self: stretch;
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
  overscroll-behavior-x: contain; scroll-behavior: smooth;
  padding: 1px 0;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--fl), #000 calc(100% - var(--fr)), transparent 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 var(--fl), #000 calc(100% - var(--fr)), transparent 100%);
  transition: --fl .18s ease, --fr .18s ease;
}
[data-date-presets]::-webkit-scrollbar { display: none; }
[data-date-presets].fade-l { --fl: 28px; }
[data-date-presets].fade-r { --fr: 28px; }
[data-date-presets].can-scroll { cursor: grab; }
[data-date-presets].dragging { cursor: grabbing; scroll-behavior: auto; user-select: none; }
[data-date-presets].dragging .chip { pointer-events: none; }
[data-date-presets] .chip { flex: none; }
/* phones and tablets: the row floats off the screen's right edge */
@media (max-width: 1023.98px) {
  [data-date-presets] { min-width: calc(100% + var(--chip-bleed, 16px)); margin-right: calc(-1 * var(--chip-bleed, 16px)); padding-right: var(--chip-bleed, 16px); }
}

/* phone tab bar: four destinations + "More" (design E2: Dashboard, Orders,
   Products, Costs, More - Shopify lives in More) */
.tabs { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tab.on, .tabs button.tab.on { color: var(--accent-ink); }
.tabs button.tab { border: 0; background: none; font: inherit; font-size: 10.5px; font-weight: 500; color: var(--muted); cursor: pointer; padding: 0; }
.tabs button.tab.on { color: var(--ink); }

/* notifications: the ghost "Mark as read" lines up with the text above it */
.nrow [data-action="mark-read"]:first-child { margin-left: -10px; }
/* phones: the unread dot stays beside the first line of the title; the state pill wraps below */
@media (max-width: 1023.98px) {
  .nrow .row.gap8:has(> .ntitle) { align-items: flex-start; }
  .nrow .ntitle { flex: 1 1 calc(100% - 20px); min-width: 0; }
  .nrow .udot { margin-top: 7px; }
}

/* ---- polish pass (UI audit) ------------------------------------------- */
/* segmented switches never break a label across two lines */
.seg button { white-space: nowrap; }
/* "By day": on narrow screens the measure switch gets its own line */
@media (max-width: 1023.98px) {
  :has(> [data-trend-measure]) { flex-wrap: wrap; row-gap: 10px; }
}
/* phones: the date range takes the full width and Apply sits under it */
@media (max-width: 599.98px) {
  form[data-testid="date-filter"] > .row, .filter-bar .col > .row { flex-wrap: wrap; }
  form[data-testid="date-filter"] .dr, .filter-bar .dr { flex: 1 1 100%; height: 44px; }
  form[data-testid="date-filter"] > .row > .btn, .filter-bar .col > .row > .btn { flex: 1 1 0; height: 44px; }
}
/* table hover tint: never on touch screens (it sticks after a tap), never on
   the editable cost ladder (a form, not a list to scan) */
@media (hover: none) { .tbl tbody tr:hover td { background: transparent; } }
[data-testid="tier-table"] tbody tr:hover td { background: transparent; }
/* cost cards below desktop: ladder and preview each take the full width;
   the add-tier hint sits under its centred button */
@media (max-width: 1023.98px) {
  .cost-card > .row.wrap > [data-cost-ladder] { flex: 1 1 100%; }
  .cost-card > .row.wrap > .preview { flex: 1 1 100% !important; }
  [data-cost-addrow] { justify-content: center; text-align: center; }
}
/* page tabs (Hermes access, notifications): one line, swipe if they don't fit */
.tabs2 { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.tabs2::-webkit-scrollbar { display: none; }
.tabs2 a { white-space: nowrap; flex: none; }
/* alert rules: switch | text | threshold + channel; on phones the controls
   sit under the text */
.rulerow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px 16px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.rulectl { justify-content: flex-end; }
@media (max-width: 767.98px) {
  .rulerow { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
  .rulerow > .rulectl { grid-column: 2; justify-content: flex-start; }
  .rulerow > .sw2 { margin-top: 1px; }
}

/* ---- email: store mailboxes + activity ---------------------------------- */
.mbrow { display: grid; grid-template-columns: minmax(0, 1.6fr) auto minmax(0, 1fr) auto; gap: 10px 20px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.mbrow:last-child { border-bottom: 0; }
.mbstatus .help { display: inline-flex; gap: 6px; align-items: center; overflow-wrap: anywhere; }
.mbstatus svg { flex: none; }
@media (max-width: 1023.98px) {
  .mbrow { grid-template-columns: minmax(0, 1fr) auto; padding: 14px 16px; }
  .mbrow > .mbcaps, .mbrow > .mbstatus { grid-column: 1 / -1; }
  .mbrow > .mbactions { grid-column: 2; grid-row: 1; align-self: start; }
}
.evrow { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.evrow:last-child { border-bottom: 0; }
.evic { width: 28px; height: 28px; border-radius: 7px; display: flex; align-items: center; justify-content: center; background: var(--sunk); color: var(--ink-2); }
.evic.bad { background: var(--neg-soft); color: var(--neg); }
@media (max-width: 1023.98px) { .evrow { padding: 12px 16px; } }
[data-drawer] .seg button.on { color: var(--ink); }


/* ---- Sync all data (sidebar logo row, dashboard header, phone top bar) ---- */
.syncbtn { display: inline-flex; align-items: center; justify-content: center; flex: none; padding: 0; border: 0; border-radius: 8px; background: var(--accent-btn, var(--accent)); color: #fff; cursor: pointer; }
/* dark: the default accent (#8594FF) is for text; a filled button uses the lifted blue so the white icon keeps 4.5:1 */
:root[data-theme="dark"] { --accent-btn: #5D6BD6; }
@media (prefers-color-scheme: dark) { :root[data-theme="system"] { --accent-btn: #5D6BD6; } }
.syncbtn svg { stroke-width: 2.4; }
.syncbtn.sz32 { width: 32px; height: 32px; } .syncbtn.sz32 svg { width: 16px; height: 16px; }
.syncbtn.sz38 { width: 38px; height: 38px; } .syncbtn.sz38 svg { width: 18px; height: 18px; }
.syncbtn.sz44 { width: 44px; height: 44px; } .syncbtn.sz44 svg { width: 20px; height: 20px; }
.syncbtn:hover { filter: brightness(1.08); }
.syncbtn[disabled] { cursor: progress; }
.syncbtn.busy svg { animation: dspin 1s linear infinite; }
@keyframes dspin { to { transform: rotate(360deg); } }
/* .side is position: sticky on desktop (adapters §l) - that already anchors
   the absolute Sync button; restating position: relative here broke the
   sticky sidebar */
.side-sync { position: absolute; top: 18px; right: 12px; }
.top-sync { margin-left: 10px; }
.mtop .mbell { margin-left: auto; }
[data-sync-style="regular"] .syncbtn { background: var(--surface); border: 1px solid var(--line-2); color: var(--ink-2); }
[data-sync-style="regular"] .syncbtn svg { stroke-width: 1.75; }
[data-sync-style="regular"] .syncbtn:hover { background: var(--subtle); filter: none; }
.sync-toast { position: fixed; z-index: 90; left: 50%; bottom: 24px; transform: translateX(-50%); max-width: min(520px, calc(100vw - 32px)); display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; background: var(--ink); color: var(--surface); font-size: 13.5px; box-shadow: 0 12px 32px rgba(0,0,0,.25); }
.sync-toast a { color: inherit; text-decoration: underline; }
.sync-toast button { border: 0; background: none; color: inherit; opacity: .7; cursor: pointer; padding: 0 0 0 6px; font: inherit; }
.sync-toast > span { flex: 1; min-width: 0; }
@media (max-width: 1023.98px) {
  .sync-toast { bottom: 96px; left: 12px; right: 12px; transform: none; max-width: none; }
  body:has(.sync-panel.on) .sync-toast { bottom: 164px; }
}

/* Settings: accent swatches */
.swatch { width: 30px; height: 30px; border-radius: 8px; border: 2px solid var(--surface); background: var(--sw); box-shadow: 0 0 0 1px var(--line-2); cursor: pointer; padding: 0; }
.swatch.on { box-shadow: 0 0 0 2px var(--ink); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* phone/tablet top bar (design E2): logo mark, store switcher, boxed bell, sync */
.mlogo { display: inline-flex; flex: none; text-decoration: none; }
.mlogo .mark { width: 32px; height: 32px; border-radius: 8px; }
.mtop .mstore { margin-right: auto; }
.mtop .mbell { margin-left: auto; border: 1px solid var(--line); border-radius: 10px; }
.mstore.allsw { padding: 6px 12px; gap: 8px; }
.storesw.allsw { padding: 10px 12px; }

/* cost import: how-to, template downloads, per-cell notes */
.imp-rules { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; }
.imp-dl { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--subtle); }
.imp-pick { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.imp-pick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 6px 14px; font-size: 13px; }
.imp-warn { white-space: normal; max-width: 320px; margin-top: 4px; font-size: 11.5px; line-height: 1.35; color: var(--warn); font-weight: 400; }

/* costs: sort + search */
.cost-sort { display: inline-flex; align-items: center; gap: 8px; }
.cost-sort .select { height: 34px; width: auto; min-width: 200px; }
@media (max-width: 599.98px) {
  .cost-tools { width: 100%; }
  .cost-tools .cost-sort, .cost-tools .search { flex: 1 1 100%; min-width: 0 !important; }
  .cost-sort .select { flex: 1; min-width: 0; }
}

/* Sync all data: progress (top bar + panel) */
.sync-topbar { position: fixed; z-index: 95; top: 0; left: 0; right: 0; height: 3px; pointer-events: none; opacity: 0; transition: opacity .3s; }
.sync-topbar.on { opacity: 1; }
.sync-topbar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .6s ease; box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 50%, transparent); }
.sync-panel { position: fixed; z-index: 90; right: 20px; bottom: 20px; width: min(340px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 16px 40px rgba(20,21,24,.18); overflow: hidden; transform: translateY(12px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.sync-panel.on { opacity: 1; transform: none; pointer-events: auto; }
.sync-panel-top { display: flex; align-items: center; }
.sync-panel { display: flex; align-items: stretch; }
.sync-panel-body { flex: 1; min-width: 0; }
.sync-panel-x { flex: none; width: 44px; display: flex; align-items: center; justify-content: center; margin: 0; padding: 0; border: 0; border-left: 1px solid var(--line); background: var(--sunk); color: var(--muted); font: inherit; cursor: pointer; }
.sync-panel-x span { font-size: 20px; line-height: 1; }
.sync-panel.collapsed { cursor: pointer; }
.sync-panel-x:hover { background: var(--subtle); color: var(--ink); }
.sync-panel-foot { display: none; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 14px 12px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); }
.sync-panel.is-sync:not(.collapsed) .sync-panel-foot { display: flex; }
.sync-panel-stop { flex: none; height: 28px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 7px; background: var(--surface); color: var(--ink); font: inherit; font-size: 12px; font-weight: 500; cursor: pointer; }
.sync-panel-head { flex: 1; min-width: 0; width: 100%; display: flex; align-items: center; gap: 10px; padding: 12px 14px 8px; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.sync-panel-title { font-weight: 600; font-size: 13.5px; flex: 1; }
.sync-panel-count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sync-panel-chev { width: 8px; height: 8px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); margin: -3px 2px 0; transition: transform .2s; }
.sync-panel.collapsed .sync-panel-chev { transform: rotate(-135deg); margin-top: 3px; }
.sync-panel-bar { margin: 0 14px 10px; height: 6px; border-radius: 3px; background: var(--sunk); overflow: hidden; }
.sync-panel-bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 3px; transition: width .6s ease; }
.sync-panel-list { list-style: none; margin: 0; padding: 0 6px 8px; max-height: 240px; overflow: auto; }
.sync-panel.collapsed .sync-panel-list { display: none; }
.sync-panel-list li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; font-size: 12.5px; border-radius: 6px; }
.sync-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sync-state { font-size: 11.5px; color: var(--muted); }
.sync-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); flex: none; }
.st-running .sync-dot, .st-retrying .sync-dot { background: var(--accent); animation: syncpulse 1s ease-in-out infinite; }
.st-running .sync-state { color: var(--accent-ink); }
.st-completed .sync-dot { background: var(--pos); }
.st-completed .sync-state { color: var(--pos); }
.st-failed .sync-dot, .st-cancelled .sync-dot { background: var(--neg); }
.st-failed .sync-state { color: var(--neg); }
@keyframes syncpulse { 50% { opacity: .35; } }
@media (max-width: 1023.98px) { .sync-panel { right: 16px; left: 16px; width: auto; bottom: 96px; } }
@media (prefers-reduced-motion: reduce) { .sync-topbar i, .sync-panel-bar i { transition: none; } .st-running .sync-dot { animation: none; } }

/* notifications page: category chips */
.ncats { margin-top: -6px; flex-wrap: wrap; }
.ncats .chip { text-decoration: none; display: inline-flex; align-items: center; }

/* Notifications drawer (static/notices.js). Desktop: a panel beside the
   sidebar. Phone / tablet (.sheet): an iOS-style sheet from the top. */
.notices { position: fixed; inset: 0; z-index: 120; }
.notices[hidden] { display: none; }
.notices-scrim { position: absolute; inset: 0; background: rgba(20,21,24,.18); opacity: 0; transition: opacity .2s; }
.notices.on .notices-scrim { opacity: 1; }
.notices-panel { position: absolute; left: 252px; top: 12px; width: min(420px, calc(100vw - 264px)); max-height: calc(100vh - 24px); display: flex; flex-direction: column; background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: 0 24px 60px rgba(20,21,24,.22); overflow: hidden; opacity: 0; transform: translateX(-8px); transition: opacity .2s, transform .2s; }
.notices.on .notices-panel { opacity: 1; transform: none; }
.notices-grab { display: none; }
.notices-head, .notices-filters, .notices-all { flex: none; }
.notices-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 8px 18px; }
.notices-head h2 { margin: 0; font-size: 16px; font-weight: 650; flex: 1; letter-spacing: -.01em; }
.notices-link { border: 0; background: none; color: var(--accent-ink); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; padding: 6px 4px; }
.notices-x { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 8px; background: var(--sunk); color: var(--ink-2); cursor: pointer; }
.notices-filters { display: flex; align-items: center; min-height: 42px; gap: 6px; padding: 4px 14px 10px 18px; overflow-x: auto; scrollbar-width: none; }
.notices-filters::-webkit-scrollbar { display: none; }
.notices-chip { flex: none; height: 28px; padding: 0 11px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer; }
.notices-chip.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.notices-list { flex: 1; overflow-y: auto; padding: 0 10px 10px; overscroll-behavior: contain; }
.notices-group { padding: 10px 8px 6px; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.notice { position: relative; padding: 12px 14px; margin-bottom: 8px; border-radius: 12px; background: var(--subtle); border: 1px solid var(--line); cursor: pointer; }
.notice.unread { background: color-mix(in srgb, var(--accent) 6%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 22%, var(--line)); }
.notice-top { display: flex; align-items: center; gap: 8px; }
.notice-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--pos); }
.t-warn .notice-dot { background: var(--warn-icon, var(--warn)); }
.t-bad .notice-dot { background: var(--neg); }
.t-run .notice-dot { background: var(--accent); }
.notice-meta { flex: 1; min-width: 0; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notice-read { border: 0; background: none; padding: 2px 0; font: inherit; font-size: 11.5px; color: var(--muted); cursor: pointer; opacity: 0; transition: opacity .15s; }
.notice:hover .notice-read, .notice:focus-within .notice-read { opacity: 1; }
.notice-title { margin: 6px 0 0; font-size: 14px; font-weight: 600; line-height: 1.35; }
.notice.unread::before { content: ""; position: absolute; left: -1px; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
/* the card's rail, tint and main button follow its tone: red for losses and failures */
.notice.t-bad.unread { background: color-mix(in srgb, var(--neg) 7%, var(--surface)); border-color: var(--neg-line); }
.notice.t-bad.unread::before { background: var(--neg); }
.notice.t-bad .notice-btn.pri { background: var(--neg); color: var(--surface); }
.notice.t-warn.unread { background: color-mix(in srgb, var(--warn-icon, var(--warn)) 6%, var(--surface)); border-color: var(--warn-line); }
.notice.t-warn.unread::before { background: var(--warn-icon, var(--warn)); }
.notice.unread .notice-meta { color: var(--ink-2); font-weight: 600; }
.notice-body { margin: 4px 0 0; font-size: 13px; line-height: 1.45; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.notice.open .notice-body { -webkit-line-clamp: unset; display: block; }
.notice-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.notice-btn { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: inherit; font-size: 12.5px; font-weight: 600; text-decoration: none; cursor: pointer; }
.notice-btn:hover { text-decoration: none; border-color: var(--ink-2); }
.notice-btn.pri { background: var(--accent-btn, var(--accent)); border-color: transparent; color: #fff; }
.notice-err { margin: 8px 0 0; font-size: 12px; color: var(--neg); }
.notices-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 40px 16px; text-align: center; color: var(--muted); font-size: 13px; }
.notices-empty b { color: var(--ink); font-size: 14px; }
.notices-loading { display: flex; justify-content: center; gap: 6px; padding: 36px 0; }
.notices-loading span { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); animation: noticesdot 1s infinite ease-in-out; }
.notices-loading span:nth-child(2) { animation-delay: .15s; } .notices-loading span:nth-child(3) { animation-delay: .3s; }
@keyframes noticesdot { 50% { opacity: .3; transform: translateY(-2px); } }
.notices-all { display: block; text-align: center; padding: 13px; border-top: 1px solid var(--line); font-size: 13.5px; font-weight: 600; color: var(--accent-ink); text-decoration: none; background: var(--surface); }
.notices-all:hover { background: var(--subtle); text-decoration: none; }

/* the sheet: phones and tablets (or opened from the top bar) */
.notices.sheet .notices-scrim { background: rgba(10,11,13,.32); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.notices.sheet .notices-panel { left: 8px; right: 8px; top: 8px; width: auto; max-height: calc(100dvh - 96px); border-radius: 20px; transform: translateY(-24px); }
.notices.sheet.on .notices-panel { transform: none; }
.notices.sheet .notices-grab { display: block; order: 99; width: 40px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 6px auto 8px; }
.notices.sheet .notice-read { opacity: 1; }
.notices.sheet .notice-btn { height: 36px; padding: 0 14px; }
@media (min-width: 600px) { .notices.sheet .notices-panel { left: auto; right: 16px; width: 420px; } }
html.notices-lock { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .notices-panel, .notices-scrim { transition: none; } }

/* Dashboard: opt-in "compare to previous period" switch and the deltas */
.dcompare { display: inline-flex; align-items: center; gap: 10px; margin: 2px 0 14px; font-size: 13px; color: var(--muted); text-decoration: none; min-height: 32px; }
.dcompare:hover { color: var(--ink, inherit); }
.dcompare-sw { position: relative; width: 30px; height: 18px; border-radius: 999px; background: var(--line-2); flex: 0 0 auto; transition: background .15s; }
.dcompare-sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.dcompare.on { color: var(--ink, inherit); }
.dcompare.on .dcompare-sw { background: var(--accent-btn, var(--accent, #3446CC)); }
.dcompare.on .dcompare-sw::after { transform: translateX(12px); }
.ddelta { display: flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 12px; font-variant-numeric: tabular-nums; font-weight: 600; }
.ddelta-a { font-size: 9px; }
.ddelta.good { color: var(--pos); }
.ddelta.bad { color: var(--neg); }
.ddelta.neu { color: var(--muted); }
.ddelta .faint { font-weight: 400; }
@media (prefers-reduced-motion: reduce) { .dcompare-sw, .dcompare-sw::after { transition: none; } }
@media (min-width: 1024px) { .dcompare { display: flex; width: max-content; margin: 12px 0 0; } }
/* phone bell: the count sits on the corner of the button, never over the bell */
.mtop .mbell .bdg { top: -6px; right: -6px; min-width: 18px; height: 18px; border-radius: 9px; font-size: 10.5px; line-height: 1; }
/* cost import: "Undo last import" strip */
.imp-undo { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px 10px 14px; border: 1px solid var(--line); border-radius: var(--r, 10px); background: var(--subtle); font-size: 13px; color: var(--ink-2); }
.imp-undo[hidden] { display: none; }
@media (max-width: 599.98px) { .imp-undo .btn { width: 100%; justify-content: center; } }
@media (max-width: 599.98px) {
  [data-import-scrim] { padding: 8px !important; }
  [data-import-scrim] .mh { display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 16px 16px 8px !important; }
  [data-import-scrim] .mh > .row.between { flex-wrap: nowrap; }
  [data-import-scrim] [data-imp-steps] { gap: 12px; margin-top: 2px !important; }
  [data-import-scrim] .mb { padding: 8px 16px 16px !important; }
}
/* store page, phone: the four figures as a 2 x 2 */
.mquad { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; }
.mquad > div { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; min-width: 0; }
.mquad > div:nth-child(odd) { border-right: 1px solid var(--line); }
.mquad > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
.mquad b { font-size: 19px; font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mquad b.faint { color: var(--faint); }
.mquad small { font-size: 12px; color: var(--muted); }
.mquad .mlabel { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
/* net profit: green above zero, red below (dashboard, store page) */
.post { color: var(--pos); }
.mval.post, .mval.post .cur { color: var(--pos); }
.mval.negt, .mval.negt .cur { color: var(--neg); }
.mval.post .dec, .mval.negt .dec { color: inherit; opacity: .7; }
.dhero.post, .dhero.post .pt, .dbig.post, .dkv-big.post, .dcard-mini b.post, .drank-v b.post { color: var(--pos); }
.dmv.post, .dpick-list .vl.post { color: var(--pos); }
.dmv.negt, .dpick-list .vl.negt { color: var(--neg); }
.dpick > .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; }
.dpick > .seg::-webkit-scrollbar { display: none; }
.dpick > .seg > button { flex: 0 0 auto; white-space: nowrap; }
/* compare switch, phones and tablets: right of the Dashboard heading, a bit
   larger, its label centred underneath */
.dcompare-m { display: none; }
@media (max-width: 1023.98px) {
  .dcompare { display: none !important; }
  .dhead { position: relative; }
  .dcompare-m { display: flex; flex-direction: column; align-items: center; gap: 5px; position: absolute; right: 0; top: 4px; z-index: 1; text-decoration: none; color: var(--muted); min-width: 56px; padding: 4px; }
  .dcompare-m .dcompare-sw { width: 44px; height: 26px; }
  .dcompare-m .dcompare-sw::after { top: 3px; left: 3px; width: 20px; height: 20px; }
  .dcompare-m.on .dcompare-sw { background: var(--accent-btn, var(--accent)); }
  .dcompare-m.on .dcompare-sw::after { transform: translateX(18px); }
  .dcompare-m .dcompare-l { font-size: 11.5px; font-weight: 500; line-height: 1; text-align: center; }
  .dcompare-m.on .dcompare-l { color: var(--ink); }
  .dcompare-m:hover { text-decoration: none; }
}
@media (min-width: 600px) and (max-width: 1023.98px) { .dhead-ctl { padding-top: 58px; } }

/* Settings › Date chips: the editor's chips and the preview line up like the real ones */
[data-chips-builtins], [data-chips-preview] { display: flex; flex-wrap: wrap; gap: 6px; }
[data-chips-builtins] .chip, [data-chips-preview] .chip { display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
[data-chips-preview] .chip { cursor: default; }
.chipsed { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.chipsed-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; border-bottom: 1px solid var(--line); min-height: 52px; flex-wrap: wrap; }
.chipsed-row:last-child { border-bottom: 0; }
.chipsed-row.off .chipsed-name { color: var(--faint); text-decoration: line-through; }
.chipsed-arrows { display: inline-flex; gap: 2px; flex: none; }
.chipsed-arrow { width: 32px; height: 32px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); color: var(--ink-2); font: inherit; font-size: 14px; cursor: pointer; }
.chipsed-arrow:disabled { opacity: .35; cursor: default; }
.chipsed-name { font-weight: 500; font-size: 14px; flex: 1; min-width: 0; }
.chipsed-kind { flex: none; }
.chipsed-fields { display: flex; gap: 8px; flex: 1; min-width: 0; flex-wrap: wrap; }
.chipsed-fields .input { width: 180px; flex: 1 1 140px; }
.chipsed-fields .chipsed-days { width: 76px; flex: 0 0 76px; }
.chipsed-fields .chipsed-ends { height: 32px; width: auto; flex: 0 1 auto; }

/* the Meta mark (Settings › Meta icon): our "Ad" tile, or the official file */
.metamark{width:16px;height:16px;flex-shrink:0;display:inline-block;vertical-align:-3px}
.metamark.s12{width:12px;height:12px}.metamark.s14{width:14px;height:14px}.metamark.s16{width:16px;height:16px}.metamark.s20{width:20px;height:20px}
img.metamark{object-fit:contain}

/* the campaign strip on product cards: the same no-scrollbar carousel */
[data-carousel]{overflow-x:auto;overflow-y:hidden;scrollbar-width:none;overscroll-behavior-x:contain;scroll-behavior:smooth;
  -webkit-mask-image:linear-gradient(to right,transparent 0,#000 var(--fl),#000 calc(100% - var(--fr)),transparent 100%);
          mask-image:linear-gradient(to right,transparent 0,#000 var(--fl),#000 calc(100% - var(--fr)),transparent 100%);
  transition:--fl .18s ease,--fr .18s ease}
[data-carousel]::-webkit-scrollbar{display:none}
[data-carousel].fade-l{--fl:20px}
[data-carousel].fade-r{--fr:24px}
[data-carousel].can-scroll{cursor:grab}
[data-carousel].dragging{cursor:grabbing;scroll-behavior:auto;user-select:none}
[data-carousel].dragging > *{pointer-events:none}

/* All stores views: store chips narrow a page to one store (?only=<id>) */
.schips{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;margin:0;padding:1px;flex-wrap:nowrap;max-width:100%}
.schips::-webkit-scrollbar{display:none}
.schip{flex:none;display:inline-flex;align-items:center;gap:7px;height:30px;padding:0 11px 0 6px;border:1px solid var(--line);border-radius:999px;background:var(--surface);font-size:13px;color:var(--ink-2);text-decoration:none;white-space:nowrap}
.schip.all{padding-left:12px}
.schip:hover{border-color:var(--line-2);text-decoration:none;color:var(--ink)}
.schip.on{background:var(--ink);border-color:var(--ink);color:var(--surface)}
.schip .c{color:var(--faint);font-variant-numeric:tabular-nums;font-size:12px}
.schip.on .c{color:inherit;opacity:.7}
.av.xs{width:18px;height:18px;font-size:9.5px;border-radius:5px}
.stag{display:inline-flex;align-items:center;gap:7px;min-width:0;max-width:180px;font-weight:500;color:var(--ink);text-decoration:none}
.stag > span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
a.stag:hover{text-decoration:none;color:var(--accent-ink)}
@media (max-width:1023.98px){.schips{margin:0 -16px;padding:1px 16px;width:calc(100% + 32px);max-width:none}}
.seg a{display:inline-flex;align-items:center;font-size:12.5px;font-weight:500;color:var(--muted);height:26px;padding:0 10px;border-radius:5px;text-decoration:none}
.seg a:hover{text-decoration:none;color:var(--ink)}
.seg a.on{background:var(--surface);color:var(--ink);box-shadow:0 1px 2px rgba(20,21,24,.08),0 0 0 1px var(--line)}
/* Costs › All stores: the needs-a-cost queue */
.cq-list{display:flex;flex-direction:column}
.cq-row{display:grid;grid-template-columns:40px minmax(0,1fr) auto auto;gap:14px;align-items:center;padding:12px 20px;border-top:1px solid var(--line);color:var(--ink);text-decoration:none}
.cq-row:first-child{border-top:0}
.cq-row:hover{background:var(--subtle);text-decoration:none}
.cq-t{font-weight:600;font-size:13.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cq-n{display:flex;flex-direction:column;align-items:flex-end;font-variant-numeric:tabular-nums;min-width:90px}
.cq-n b{font-size:15px;color:var(--warn)}
.mval.warnv{color:var(--warn)}
@media (max-width:599px){
  .cq-row{grid-template-columns:40px minmax(0,1fr) auto;padding:12px 16px}
  .cq-go{display:none}
  .cq-n{min-width:0}
}
.cq-row .thumb{width:40px;height:40px;border-radius:9px;background:var(--sunk);border:1px solid var(--line);display:flex;align-items:center;justify-content:center;font-weight:600;font-size:12px;color:var(--ink-2);overflow:hidden}
.cq-row .thumb img{width:100%;height:100%;object-fit:cover}
@media (max-width:599px){
  [data-testid="costs-all-summary"]{grid-template-columns:minmax(0,1fr)!important}
  [data-testid="costs-all-summary"] .metric{border-right:0;border-bottom:1px solid var(--line);padding:12px 16px}
  [data-testid="costs-all-summary"] .metric:last-child{border-bottom:0}
}
@media (max-width:599px){
  .shp-sum{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .shp-sum .metric{padding:12px}
  .shp-sum .mval{font-size:20px;line-height:26px}
  .shp-sum .msub{display:none}
}
/* Email › All stores */
a.mball{color:inherit;text-decoration:none}
a.mball:hover{background:var(--subtle);text-decoration:none}
.mb-missing{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:12px 20px;border-top:1px solid var(--line)}

/* ---- profit chart panel (static/profit-chart.js) ----------------------- */
.pch{display:flex;flex-direction:column;min-width:0}
.pch-h{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:14px 18px 6px;flex-wrap:wrap}
.pch-insight{max-width:62ch}
.pch-ctl{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.pch-store select{height:32px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink);font:inherit;font-size:13px;padding:0 28px 0 10px;max-width:180px}
.pch-views{display:inline-flex;gap:2px;padding:2px;background:var(--sunk);border:1px solid var(--line);border-radius:9px}
.pch-views button{width:34px;height:30px;border:0;border-radius:7px;background:transparent;color:var(--muted);cursor:pointer;display:inline-flex;align-items:center;justify-content:center}
.pch-views button svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.pch-views button:hover{color:var(--ink)}
.pch-views button.on{background:var(--surface);color:var(--ink);box-shadow:0 0 0 1px var(--line)}
.pch-views button:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
.pch-plot{position:relative;padding:4px 10px 0 4px;min-height:200px}
.pch-svg{display:block;overflow:visible}
.pch-grid{stroke:var(--line);stroke-width:1}
.pch-zero{stroke:var(--line-2);stroke-width:1.2}
.pch-tick{fill:var(--faint);font-size:10.5px;font-variant-numeric:tabular-nums}
.pch-pos{fill:var(--pos)} .pch-neg{fill:var(--neg)}
.pch-ghost{fill:none;stroke:var(--faint);stroke-dasharray:3 2;stroke-width:1}
.pch-cogs{fill:color-mix(in srgb,var(--accent) 55%,var(--surface))}
.pch-ads{fill:color-mix(in srgb,var(--warn-icon,#C27500) 75%,var(--surface))}
.pch-ref{fill:color-mix(in srgb,var(--ink-2) 35%,var(--surface))}
.pch-unk,.pch-part{stroke:none}
.pch-hatch-bg{fill:transparent} .pch-hatch-ln{stroke:color-mix(in srgb,var(--warn-icon,#C27500) 70%,transparent);stroke-width:2}
.pch-line{fill:none;stroke:var(--accent);stroke-width:2;stroke-linejoin:round}
.pch-be{stroke:var(--ink-2);stroke-width:1.4;stroke-dasharray:5 4}
.pch-be-t{fill:var(--ink-2);font-size:11px;font-weight:600}
.pch-cap{fill:none;stroke:var(--surface);stroke-width:1.6}
.pch-run{fill:none;stroke:var(--pos);stroke-width:2.4;stroke-linejoin:round} .pch-run.neg{stroke:var(--neg)}
.pch-prev{fill:none;stroke:var(--faint);stroke-width:1.6;stroke-dasharray:4 4}
.pch-area{fill:color-mix(in srgb,var(--pos) 14%,transparent)} .pch-area.neg{fill:color-mix(in srgb,var(--neg) 14%,transparent)}
.pch-dot{fill:var(--pos);stroke:var(--surface);stroke-width:2} .pch-dot.neg{fill:var(--neg)}
.pch-hover{fill:color-mix(in srgb,var(--ink) 6%,transparent);pointer-events:none}
.pch-tip{position:absolute;top:6px;z-index:2;min-width:170px;max-width:240px;padding:8px 10px;border-radius:10px;background:var(--surface);border:1px solid var(--line-2);box-shadow:0 8px 24px rgba(20,21,24,.18);font-size:12px;pointer-events:none;display:flex;flex-direction:column;gap:3px}
.pch-tip b{font-size:12.5px;margin-bottom:2px}
.pch-tip-r{display:flex;justify-content:space-between;gap:12px;color:var(--muted)}
.pch-tip-r span:last-child{color:var(--ink);font-weight:600;font-variant-numeric:tabular-nums}
.pch-tip-r.pos span:last-child{color:var(--pos)} .pch-tip-r.neg span:last-child{color:var(--neg)} .pch-tip-r.warn span:last-child{color:var(--warn)}
.pch-legend{display:flex;flex-wrap:wrap;gap:6px 16px;padding:8px 18px 0;font-size:12px;color:var(--muted)}
.pch-key{display:inline-flex;align-items:center;gap:6px}
.pch-sw{width:10px;height:10px;border-radius:3px;display:inline-block}
.pch-sw.pos{background:var(--pos)} .pch-sw.neg{background:var(--neg)} .pch-sw.cogs{background:color-mix(in srgb,var(--accent) 55%,var(--surface))}
.pch-sw.ads{background:color-mix(in srgb,var(--warn-icon,#C27500) 75%,var(--surface))} .pch-sw.ref{background:color-mix(in srgb,var(--ink-2) 35%,var(--surface))}
.pch-sw.ghost{border:1px dashed var(--faint)} .pch-sw.line{height:2px;border-radius:1px;background:var(--accent)}
.pch-sw.unk,.pch-sw.part{background:repeating-linear-gradient(135deg,transparent 0 3px,color-mix(in srgb,var(--warn-icon,#C27500) 70%,transparent) 3px 5px);border:1px solid var(--warn-line)}
.pch-sw.be{height:0;border-top:2px dashed var(--ink-2);border-radius:0}
.pch-sw.run{height:3px;background:var(--pos)} .pch-sw.prev{height:0;border-top:2px dashed var(--faint);border-radius:0}
.pch-note{margin:0;padding:8px 18px 14px;font-size:12px}
.pch-note:empty{display:none}
.pch-empty{display:flex;align-items:center;justify-content:center;min-height:180px;color:var(--muted);font-size:13px}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
@media (max-width:599px){
  .pch-h{padding:12px 14px 4px}
  .pch-ctl{width:100%;justify-content:space-between}
  .pch-store select{max-width:150px}
  .pch-legend{padding:8px 14px 0}
  .pch-note{padding:8px 14px 12px}
}
/* drawer: a sheet on phones, a side panel on wide screens */
.pch-drawer{position:fixed;inset:0;z-index:80;background:rgba(20,21,24,.4);display:flex;justify-content:flex-end}
.pch-drawer-card{width:min(760px,100%);height:100%;background:var(--bg);border-left:1px solid var(--line-2);display:flex;flex-direction:column;transform:translateX(16px);opacity:.6;transition:transform .18s ease,opacity .18s ease;overflow:auto}
.pch-drawer.on .pch-drawer-card{transform:none;opacity:1}
.pch-drawer-h{display:flex;justify-content:flex-end;align-items:center;padding:10px 12px 0}
.pch-grab{display:none}
.pch-drawer-b{padding:4px 16px 20px}
@media (max-width:767.98px){
  .pch-drawer{align-items:flex-end}
  .pch-drawer-card{height:auto;max-height:90dvh;border-left:0;border-top:1px solid var(--line-2);border-radius:18px 18px 0 0;transform:translateY(24px);padding-bottom:env(safe-area-inset-bottom)}
  .pch-drawer-h{justify-content:space-between}
  .pch-grab{display:block;width:40px;height:4px;border-radius:2px;background:var(--line-2);margin:0 auto}
  .pch-drawer-b{padding:4px 8px 16px}
}
@media (prefers-reduced-motion:reduce){.pch-drawer-card{transition:none}}
.pch-open{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;border-radius:7px;border:1px solid var(--line);background:var(--surface);color:var(--muted);cursor:pointer;padding:0}
.pch-open:hover{color:var(--ink);border-color:var(--line-2)}
.pch-open svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* ---- Overview: KPIs + product carousels -------------------------------- */
.ov-kpis{grid-template-columns:repeat(4,minmax(0,1fr))}
.ov-kpis .mval .pos{color:var(--pos)} .ov-kpis .mval .neg{color:var(--neg)}
@media (max-width:767.98px){
  .ov-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ov-kpis .metric{padding:12px 14px;border-bottom:1px solid var(--line)}
  .ov-kpis .metric:nth-child(2n){border-right:0}
  .ov-kpis .metric:nth-child(n+3){border-bottom:0}
  .ov-kpis .mval{font-size:20px;line-height:26px}
}
.ocar-wrap{display:flex;flex-direction:column;gap:10px;min-width:0}
.ocar-h{display:flex;align-items:flex-end;justify-content:space-between;gap:12px}
.ocar-nav{display:flex;gap:4px}
.ocar-nav .iconbtn{border-color:var(--line);background:var(--surface)}
.ocar-nav .iconbtn:disabled{opacity:.35;cursor:default}
/* desktop: one row of four, snap card by card */
.ocar{--gap:12px;display:grid;grid-auto-flow:column;grid-auto-columns:calc((100% - 3 * var(--gap)) / 4);gap:var(--gap);overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;overscroll-behavior-x:contain;padding:1px;outline:none}
.ocar::-webkit-scrollbar{display:none}
.ocar > .oc{scroll-snap-align:start}
.ocar-empty{padding:18px 20px}
.ocar-dots{display:none;justify-content:center;gap:6px}
.ocar-dots i{width:6px;height:6px;border-radius:50%;background:var(--line-2)}
.ocar-dots i.on{background:var(--ink-2);width:16px;border-radius:3px}
.oc{position:relative;background:var(--surface);border:1px solid var(--line);border-radius:12px;min-width:0;display:flex}
.oc.lossy{border-color:var(--neg-line)}
.oc-main{display:flex;flex-direction:column;gap:8px;padding:10px;color:inherit;text-decoration:none;min-width:0;width:100%}
.oc-main:hover{text-decoration:none}
.oc:hover{border-color:var(--line-2)}
.oc-img{aspect-ratio:16/10;border-radius:8px;background:var(--sunk);overflow:hidden;display:flex;align-items:center;justify-content:center;font-weight:600;color:var(--ink-2);max-width:100%}
.oc-img img{width:100%;height:100%;object-fit:cover}
.oc-t{display:flex;flex-direction:column;gap:3px;min-width:0}
.oc-t b{font-size:13px;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:34px}
.oc-chip{align-self:flex-start;max-width:100%;font-size:11.5px;font-weight:500;padding:2px 7px;border-radius:6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border:1px solid transparent}
.oc-chip.bad{background:var(--neg-soft);color:var(--neg);border-color:var(--neg-line)}
.oc-chip.warn{background:var(--warn-soft);color:var(--warn);border-color:var(--warn-line)}
.oc-chip.good{background:var(--pos-soft);color:var(--pos);border-color:var(--pos-line)}
.oc-kv{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;background:var(--line);border:1px solid var(--line);border-radius:8px;overflow:hidden;margin-top:auto}
.oc-kv > span{display:flex;flex-direction:column;gap:1px;padding:5px 8px;background:var(--surface);min-width:0}
.oc-kv i{font-style:normal;font-size:10.5px;color:var(--muted);white-space:nowrap}
.oc-kv b{font-size:12.5px;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.oc-kv b.pos{color:var(--pos)} .oc-kv b.neg{color:var(--neg)} .oc-kv b.faint{color:var(--faint)}
.oc-chart{position:absolute;top:16px;right:16px;background:color-mix(in srgb,var(--surface) 88%,transparent)}
@media (max-width:767.98px){
  /* phone: pages of 2x2, swipe a page at a time */
  .ocar{--gap:8px;grid-auto-flow:column;grid-template-rows:repeat(2,auto);grid-auto-columns:calc((100% - var(--gap)) / 2)}
  .ocar > .oc{scroll-snap-align:none}
  .ocar > .oc:nth-child(4n+1){scroll-snap-align:start}
  .ocar-nav{display:none}
  .ocar-dots{display:flex}
  .oc-img{aspect-ratio:1/1}
  .oc-chart{top:14px;right:14px}
}
@media (max-width:767.98px){.ocar.ocar-short{grid-template-rows:auto}}
.dfoot-r{display:inline-flex;align-items:center;gap:8px}
/* product filter tabs, shared (Products, Overview): one line, scroll + fade */
.fchips{display:flex;gap:6px;flex-wrap:nowrap}
.fchip{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 12px;border-radius:16px;border:1px solid var(--line-2);background:var(--surface);font:inherit;font-size:13px;font-weight:500;color:var(--ink-2);cursor:pointer;text-decoration:none;white-space:nowrap;flex:none}
.fchip b{font-weight:600;color:var(--muted);font-size:12px}
.fchip:hover{border-color:var(--ink-2);text-decoration:none}
.fchip.on{background:var(--ink);border-color:var(--ink);color:var(--surface)}.fchip.on b{color:var(--surface);opacity:.75}
.livedot{width:7px;height:7px;border-radius:50%;background:var(--pos);box-shadow:0 0 0 3px color-mix(in srgb,var(--pos) 22%,transparent);flex:none}
.pill.live{background:var(--pos-soft);color:var(--pos);border-color:var(--pos-line);font-variant-numeric:tabular-nums}
.pill.live::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}
.ov-tabs{margin-bottom:-10px}
.oc-live{align-self:flex-start;height:20px;font-size:11px;padding:0 6px}
.ocar-empty button.lnk{border:0;background:none;padding:0;font:inherit;color:var(--accent-ink);cursor:pointer}
/* phones: both dates fit whole ("10/07/2026", not "10/07/202") */
@media (max-width:599px){
  .dr label{padding:0 8px;gap:4px;min-width:0}
  .dr input[type="date"]{min-width:0;width:100%;letter-spacing:-.01em}
  .dr input[type="date"]::-webkit-calendar-picker-indicator{display:none}
  .dr input[type="date"]::-webkit-date-and-time-value{text-align:left}
}

/* ---- money tone: profit values and margin percentages, green / red ---- */
.mpct{font-weight:700;font-variant-numeric:tabular-nums}
.mpct.pos,.post,b.post,.dval.post,.dpaa b.post,.dkv-big.post{color:var(--pos)}
.mpct.neg,.negt,b.negt,.dval.negt,.dpaa b.negt,.dkv-big.negt{color:var(--neg)}
.dpaa b.post .pt,.dpaa b.negt .pt{color:inherit}
/* dashboard store card footer: rank | cost check | chart + Open store, one line each */
.dcard-foot{grid-template-columns:minmax(0,1fr) auto auto!important;column-gap:12px}
.dcard-foot > .dfoot-r{white-space:nowrap;gap:8px}
.dcard-foot > .dfoot-r .lnk{white-space:nowrap}
.dcard-foot > .dfoot-c{justify-self:end}

/* ---- Sync all data wearing the data status ------------------------------
   idle: the status icon (green check / orange warning deepening with age /
   red stop); busy: back to the refresh button, spinning */
.syncbtn .ss-ok,.syncbtn .ss-warn,.syncbtn .ss-bad{display:none;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.syncbtn.sstat:not(.busy) .ss-rf{display:none}
.syncbtn.sstat.ok:not(.busy) .ss-ok,.syncbtn.sstat.warn:not(.busy) .ss-warn,.syncbtn.sstat.bad:not(.busy) .ss-bad{display:block}
.syncbtn.sstat:not(.busy){--age:0;background:var(--surface);border:1px solid var(--line-2)}
.syncbtn.sstat.sz32:not(.busy) svg{width:17px;height:17px}
.syncbtn.sstat.sz44:not(.busy) svg{width:21px;height:21px}
.syncbtn.sz44{border-radius:10px}
.syncbtn.sstat.ok:not(.busy){color:var(--pos);border-color:var(--pos-line)}
.syncbtn.sstat.warn:not(.busy){color:var(--warn-icon,var(--warn));
  border-color:color-mix(in srgb,var(--warn-icon,var(--warn)) calc(35% + 65% * var(--age)),var(--line-2));
  background:color-mix(in srgb,var(--warn-icon,var(--warn)) calc(22% * var(--age)),var(--surface))}
.syncbtn.sstat.warn:not(.busy) svg{opacity:calc(.55 + .45 * var(--age))}
.syncbtn.sstat.bad:not(.busy){color:var(--neg);border-color:var(--neg);background:var(--neg-soft)}
.syncbtn.sstat:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
/* phone/tablet top bar: logo · store · bell · dates ... sync */
.mtop{position:sticky;top:0;z-index:40;gap:10px}
.mtop .mstore{margin-right:0;min-width:0;max-width:46vw;flex:0 1 auto}
.mtop .mstore > span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.mtop .mbell{margin-left:0;flex:none}
.mtop .top-sync{margin-left:auto}
/* the More / switch-store sheet on phones and tablets: centred on screen,
   stores as a two-column grid with room to tap */
@media (max-width:1023.98px){
  .sheet{align-items:center;padding:24px 16px}
  .sheet-card{padding:10px 12px 12px}
  .sheet-stores{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:8px}
  .sheet-stores .sheet-item{min-height:46px;padding:8px 10px;gap:10px;border:1px solid var(--line)}
  .sheet-stores .sheet-item .av{width:24px;height:24px;font-size:11px;border-radius:6px}
  .sheet-stores .sheet-item .faint.mono,.sheet-stores .sheet-item .pill{display:none}
  .sheet-stores .sheet-item span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}
  .sheet-stores .sheet-item.on{border-color:var(--ink-2)}
  [data-testid="sheet-all-stores"]{min-height:52px;padding:10px 12px}
  [data-testid="sheet-all-stores"] .av{width:28px;height:28px}
  .sheet-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 8px;margin-top:12px;padding-top:12px}
  .sheet-links .nav{min-height:46px;font-size:14px}
}

/* ---- Profitability: KPI tiles, call-outs, phone cards ----------------- */
.prof-kpis{grid-template-columns:repeat(4,minmax(0,1fr))}
.prof-kpis .metric.warnm{background:var(--warn-soft)}
.prof-kpis .metric.warnm .msub{color:var(--warn)}
.prof-notes{display:flex;flex-wrap:wrap;gap:8px}
.prof-notes > span{display:inline-flex;align-items:baseline;gap:6px;padding:7px 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface);font-size:13px;min-width:0;max-width:100%}
.prof-notes i{font-style:normal;color:var(--muted);font-size:12px;white-space:nowrap}
.prof-notes b{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.prof-cards .pc-l{font-size:11px;color:var(--muted)}
.prof-cards .pc-big b{font-size:17px}
.pgrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px 10px;margin-top:4px}
.pgrid > div{display:flex;flex-direction:column;gap:2px;min-width:0}
.pgrid .l{font-size:11px;color:var(--muted);white-space:nowrap}
.pgrid .v{font-size:13.5px;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media (max-width:1023.98px){
  .prof-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .prof-kpis .metric{padding:14px 16px;border-right:1px solid var(--line);border-bottom:1px solid var(--line)}
  .prof-kpis .metric:nth-child(2n){border-right:0}
  .prof-kpis .metric:nth-last-child(-n+2){border-bottom:0}
  .prof-kpis .mval{font-size:21px;line-height:28px}
  .prof-notes{flex-direction:column}
  .prof-notes > span{width:100%}
}
/* page rhythm on phones: one gap between the stacked blocks */
@media (max-width:1023.98px){
  [data-testid="prof-view"]{margin-top:-4px}
  .mlist.prof-cards .mli,.mlist[data-testid="profitability-cards"] .mli{padding:14px 16px}
}
[data-testid="prof-by-store"]{overflow-x:auto}
[data-testid="prof-by-store"] .tbl{min-width:1040px}
/* Overview cards: square image on the left half, store / name / alerts on the right */
.oc-top{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;align-items:start}
.oc-top .oc-img{aspect-ratio:1/1;width:100%}
.oc-side{display:flex;flex-direction:column;gap:5px;min-width:0}
.oc-name{font-size:13px;line-height:1.3;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.oc-side .oc-chip{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;line-height:1.3}
.oc-chart{top:14px;left:14px;right:auto}
@media (max-width:767.98px){
  .oc-top{gap:8px}
  .oc-top .oc-img{aspect-ratio:1/1}
  .oc-name{font-size:12.5px}
  .oc-side .oc-chip{font-size:11px;padding:2px 6px}
  .oc-chart{top:12px;left:12px}
}
.oc-side .oc-live{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex-shrink:1}
.oc-name,.oc-main:visited .oc-name{color:var(--ink)}
.oc-main:hover .oc-name{text-decoration:underline}
@media (max-width:767.98px){.oc-side .oc-live{font-size:10.5px;padding:0 5px;gap:4px}.oc-side .oc-live::before{width:5px;height:5px}}
/* banners: full width, one per row, under the image + store + name */
.oc-tags{display:flex;flex-direction:column;gap:5px;min-width:0}
.oc-tags:empty{display:none}
.oc-tags .oc-chip,.oc-tags .oc-live{align-self:stretch;max-width:none;white-space:normal;display:block;-webkit-line-clamp:unset;line-height:1.35;padding:4px 8px}
.oc-tags .oc-live{display:flex;height:auto}

/* ---- product cards: Detailed (Settings › Product cards) -------------- */
.cardset{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border:1px solid var(--line-2);border-radius:8px;color:var(--muted);background:var(--surface);flex:none}
.cardset svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.cardset:hover{color:var(--ink);border-color:var(--ink-2)}
.ov-tabrow{display:flex;align-items:center;gap:10px;min-width:0;margin-bottom:-10px}
.ov-tabrow .ov-tabs{flex:1;min-width:0;margin-bottom:0}
/* the store tag (top left) and banners (from the bottom) on the image */
.pc-media,.oc-media{position:relative;aspect-ratio:1/1;width:100%;border-radius:10px;overflow:hidden;background:var(--sunk);display:flex;align-items:center;justify-content:center}
.pc-media img,.oc-media img{width:100%;height:100%;object-fit:cover;display:block}
.pc-init{font-weight:600;font-size:22px;color:var(--ink-2)}
.pc-ov-store{position:absolute;top:8px;left:8px;display:flex;align-items:center;gap:5px;max-width:calc(100% - 16px)}
.ov-store{display:inline-flex;align-items:center;gap:6px;height:24px;padding:0 8px 0 3px;border-radius:7px;background:color-mix(in srgb,var(--surface) 88%,transparent);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);font-size:12px;font-weight:600;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;box-shadow:0 1px 3px rgba(0,0,0,.18)}
.pc-ov-st{height:22px;display:inline-flex;align-items:center;padding:0 7px;border-radius:7px;font-size:11px;font-weight:600;background:color-mix(in srgb,var(--surface) 88%,transparent);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);color:var(--ink-2)}
.pc-ov-st.ok{color:var(--pos)}
.pc-ov-flags{position:absolute;top:8px;right:8px;display:flex;gap:4px}
.pc-ov-flags .flag{background-color:var(--surface)}
.ov-banners{position:absolute;left:8px;right:8px;bottom:8px;display:flex;flex-direction:column;gap:4px}
.ov-b{display:block;padding:4px 8px;border-radius:7px;font-size:12px;font-weight:600;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);box-shadow:0 1px 3px rgba(0,0,0,.2)}
.ov-b.bad{background:color-mix(in srgb,var(--neg) 88%,#000);color:#fff}
.ov-b.warn{background:color-mix(in srgb,var(--warn-icon,#C27500) 90%,#000);color:#fff}
.ov-b.live,.ov-b.good{background:color-mix(in srgb,var(--pos) 88%,#000);color:#fff}
.ov-b.live::before{content:"";display:inline-block;width:6px;height:6px;border-radius:50%;background:#fff;margin-right:6px;vertical-align:1px}
/* the name: one row under the image, cut off with … */
.pc-t1,.oc-name1,.mc-t1{display:block!important;-webkit-line-clamp:unset!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-height:0!important}
/* Products page card in Detailed */
.pc-hd{flex-direction:column;align-items:stretch;gap:10px;padding:14px 14px 0}
.pc-hd .pc-t1{font-size:14.5px;font-weight:600}
[data-card-view="detailed"] .pc-al:empty{padding-top:0}
/* Overview card in Detailed */
.oc-media{border-radius:8px}
.oc-name1{font-size:13.5px;font-weight:600;color:var(--ink)}
/* phone Products card in Detailed */
.mc-img .pc-ov-store{top:6px;left:6px}
.mc-img .ov-store{height:20px;font-size:11px;padding:0 6px 0 2px}
.mc-img .ov-store .av{width:16px;height:16px;font-size:9px;border-radius:5px}
.mc-img .ov-banners{left:6px;right:6px;bottom:6px;gap:3px}
.mc-img .ov-b{font-size:10.5px;padding:3px 6px}
@media (max-width:767.98px){
  .oc-media .ov-b{font-size:10.5px;padding:3px 6px}
  .oc-media .ov-store{height:20px;font-size:11px}
  .oc-chart{top:12px;right:12px;left:auto}
}
[data-card-view="detailed"] .oc-chart{top:18px;right:18px;left:auto}
/* Detailed: the image runs edge to edge across the card's top */
.pc-hd{padding:0;gap:12px}
.pc-hd .pc-media{border-radius:calc(var(--r-lg) - 1px) calc(var(--r-lg) - 1px) 0 0}
.pc-hd .pc-t1{padding:0 14px}
[data-card-view="detailed"] .oc-media{margin:-10px -10px 0;width:calc(100% + 20px);border-radius:11px 11px 0 0}
[data-card-view="detailed"] .oc-chart{top:10px;right:10px}
@media (max-width:767.98px){
  [data-card-view="detailed"] .mc-img{margin:-10px -10px 0;border-radius:11px 11px 0 0}
  [data-card-view="detailed"] .mc-img .flags{top:6px;right:6px}
}
@media (max-width:359px){
  [data-card-view="detailed"] .mc-img{margin:-8px -8px 0}
}

/* ---- phones: dates behind a header button (Settings › Dates on phones) -- */
.mtop .mdates{flex:none}
.mtop .mdates.on{color:var(--ink);border-color:var(--line-2);background:var(--subtle)}
.mtop .mdates[hidden]{display:none}
@media (max-width:1023.98px){
  [data-compact-dates="on"]:not([data-keep-date-inputs="on"]):has(.mdates:not([hidden])) .main .dsel{display:none!important}
  [data-compact-dates="on"]:not([data-keep-date-chips="on"]):has(.mdates:not([hidden])) .main [data-date-presets]{display:none!important}
  /* Products header: the date column is empty then, drop it and its space */
  [data-compact-dates="on"]:not([data-keep-date-inputs="on"]):not([data-keep-date-chips="on"]):has(.mdates:not([hidden])) .main .pxdate{display:none!important}
  [data-compact-dates="on"]:not([data-keep-date-inputs="on"]):not([data-keep-date-chips="on"]):has(.mdates:not([hidden])) .main .px-head .right:not(:has(> :not(.pxdate))){display:none!important}
  /* a header slot that only held the date form: drop it and its space */
  [data-compact-dates="on"]:not([data-keep-date-inputs="on"]):not([data-keep-date-chips="on"]):has(.mdates:not([hidden])) .main [data-date-slot]:not(:has(> :not(form))){display:none!important}
  /* the dashboard header's control column is empty then: drop it and its space */
  [data-compact-dates="on"]:not([data-keep-date-inputs="on"]):has(.mdates:not([hidden])) .main .dhead-ctl{display:none!important}
}
.dpop-scrim{position:fixed;inset:0;z-index:60;background:rgba(0,0,0,.28)}
.dpop{position:fixed;z-index:61;left:10px;right:10px;max-width:520px;margin:0 auto;padding:10px;display:flex;flex-direction:column;gap:10px;
  background:var(--surface);border:1px solid var(--line-2);border-radius:12px;box-shadow:0 16px 40px rgba(0,0,0,.35)}
.dpop[hidden],.dpop-scrim[hidden]{display:none}
.dpop > form{width:100%;align-items:stretch!important;margin:0}
.dpop .dsel{display:flex}
/* one row: From | To share the space, Apply takes 20-25% */
.dpop .dr2form,.dpop .dsel{display:flex!important;flex-wrap:nowrap!important;gap:8px;width:100%;align-items:stretch}
.dpop .dr2,.dpop .dsel > .dr{flex:1 1 auto!important;min-width:0;width:auto!important}
.dpop .dr2form .dr2-go,.dpop .dsel > .btn{flex:0 0 20%!important;max-width:25%;min-width:0;width:auto!important;padding:0 8px}
.dpop .dr2 label,.dpop .dsel .dr label{flex:1 1 0;min-width:0}
.dpop .dr2-ic{display:none!important}
.dpop .dr2-f,.dpop .dr2 b{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* the chips: 10px under the dates, scrolling inside the popover's padding */
.dpop [data-date-presets]{min-width:0!important;margin:10px 0 0!important;padding:0!important;width:100%!important;max-width:100%!important;box-sizing:border-box}
.dpop [data-date-presets] .chip:first-child{margin-left:0!important}
.dpop{gap:0!important}
.dpop form:not(.dr2form){display:flex!important;flex-direction:column;gap:0!important}
.dpop form .dsel{order:1}
.dpop form [data-date-presets]{order:2}
@media (min-width:1024px){.dpop,.dpop-scrim{display:none!important}}
.stog{display:flex;align-items:flex-start;gap:10px;padding:0;border:0;background:none;color:var(--ink);font:inherit;font-size:13.5px;text-align:left;cursor:pointer;width:max-content;max-width:100%}
.stog .dcompare-sw{margin-top:1px}
.stog.on .dcompare-sw{background:var(--accent-btn,var(--accent,#3446CC))}
.stog.on .dcompare-sw::after{transform:translateX(12px)}
.stog-sub{padding-left:40px}
.stog-sub[hidden]{display:none}
/* the store's badge beside its name, everywhere a store is listed */
.sname{display:inline-flex;align-items:center;gap:6px;min-width:0}
.sname > span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.dmini-n{display:inline-flex;align-items:center;gap:6px;min-width:0}
.dmini-n .dcard-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.av.dsel-av{color:#fff;border-color:transparent}
.nstore{vertical-align:-4px;gap:5px}
.ov-sn{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.mc-img .pc-ov-store{max-width:calc(100% - 40px)}
/* Settings › Date chips: drag to reorder, tidier rows */
.chipsed-row{gap:10px;padding:8px 12px 8px 6px;background:var(--surface);flex-wrap:nowrap}
.chipsed-grip{flex:none;align-self:stretch;width:28px;min-height:36px;display:flex;align-items:center;justify-content:center;padding:0;border:0;border-radius:6px;background:none;color:var(--faint);cursor:grab;touch-action:none}
.chipsed-grip svg{width:18px;height:18px;fill:currentColor}
.chipsed-grip:hover,.chipsed-grip:focus-visible{color:var(--ink-2);background:var(--subtle)}
.chipsed.sorting{cursor:grabbing;user-select:none;-webkit-user-select:none}
.chipsed-row.dragging{position:relative;z-index:2;background:var(--sunk);box-shadow:0 8px 24px rgba(0,0,0,.25);outline:1px solid var(--line-2)}
.chipsed-row.dragging .chipsed-grip{cursor:grabbing;color:var(--ink)}
.chipsed-fields{display:grid;grid-template-columns:minmax(0,1fr) 40px minmax(0,98px);gap:6px;flex:1;min-width:0}
@media (max-width:599.98px){.chipsed-fields .input,.chipsed-fields .select{font-size:13px}}
.chipsed-fields .input,.chipsed-fields .select{padding-left:8px;width:100%;min-width:0;flex:none;height:32px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}
.chipsed-fields .chipsed-days{padding-left:8px;padding-right:4px;-moz-appearance:textfield}
.chipsed-fields .chipsed-days::-webkit-inner-spin-button,.chipsed-fields .chipsed-days::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.chipsed-fields .chipsed-ends{padding-right:22px;background-position:right 6px center}
.chipsed-x{flex:none;width:32px;height:32px;border:1px solid var(--line-2);border-radius:8px;background:var(--surface);color:var(--muted);font-size:18px;line-height:1;cursor:pointer}
.chipsed-x:hover{color:var(--neg);border-color:var(--neg)}
@media (min-width:600px){.chipsed-fields{grid-template-columns:minmax(0,1fr) 64px minmax(0,180px)}}
/* dashboard hero: net margin left, "▲ 125% vs prev" right, same row */
.dmargin-row{display:flex;align-items:baseline;justify-content:space-between;gap:10px;flex-wrap:nowrap;min-width:0}
.dmargin-row .dmargin{flex:1 1 auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dmargin-row .ddelta{flex:none;margin-top:0;white-space:nowrap}
@media (max-width:599.98px){.chipsed-x{width:30px;height:30px}.chipsed-row{gap:8px}}
/* phones/tablets: icon toggle groups a touch bigger, centred on and as tall
   as the text beside them */
@media (max-width:1023.98px){
  .dsec-head{align-items:stretch}
  .dsec-head > .dviewsw{display:inline-flex;align-items:stretch;align-self:stretch;min-height:40px;max-height:52px}
  .dsec-head > .dviewsw button{width:44px;height:auto;min-height:34px}
  .dsec-head > .dviewsw button svg{width:18px;height:18px}
  .ptools .pctl{align-self:center}
  .ptools .vsw{height:36px;align-items:stretch}
  .ptools .vsw a{width:40px;height:auto}
  .ptools .vsw a svg{width:17px;height:17px}
  .ptools .cardset{width:36px;height:36px}
  .ptools .fchip{height:36px}
  .ov-tabrow .cardset{width:36px;height:36px}
}
/* Detailed cards: the name, then net profit as a coloured badge on its right */
.npb-row{display:flex;align-items:center;gap:8px;min-width:0;width:100%;box-sizing:border-box}
.npb-row > :first-child{flex:1 1 auto;min-width:0}
.npb{flex:0 0 auto;max-width:33%;min-width:25%;display:flex;flex-direction:column;align-items:center;text-align:center;justify-content:center;gap:1px;padding:4px 8px;border-radius:8px;border:1px solid var(--line-2);background:var(--sunk);line-height:1.15;overflow:hidden}
.npb i{font-style:normal;font-size:10px;font-weight:500;opacity:.8;white-space:nowrap}
.npb b{font-size:13px;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.npb.pos{background:color-mix(in srgb,var(--pos) 16%,var(--surface));border-color:color-mix(in srgb,var(--pos) 45%,transparent);color:var(--pos)}
.npb.neg{background:color-mix(in srgb,var(--neg) 16%,var(--surface));border-color:color-mix(in srgb,var(--neg) 45%,transparent);color:var(--neg)}
.npb.zero,.npb.faint{color:var(--muted)}
.pc-np-d{justify-content:flex-end}
@media (max-width:767.98px){
  .npb{flex:0 0 33%;padding:3px 3px;border-radius:7px}
  .npb i{font-size:8.5px}
  .npb b{font-size:11px;letter-spacing:-.02em}
}
.pc-hd .npb-row{padding:0}
.pc-hd .npb-row .pc-t1{padding:0}
.pc-np-d{display:flex;justify-content:flex-end}
.pc-np-d .roas{display:flex;flex-direction:row-reverse;align-items:baseline;gap:6px}
.pc-hd,.pc-hd .pc-media{min-width:0}
.pc > .pc-hd{min-width:0;max-width:100%;overflow:hidden}
/* info "i" buttons: centred on the text they sit beside, everywhere */
.dtip{display:none;align-items:center;vertical-align:middle;line-height:1;align-self:center}
@media (max-width:1023.98px){.dtip{display:inline-flex}}
.dtip.all{display:inline-flex}
.dtip-btn{width:24px!important;height:24px!important;margin:-6px -2px!important;vertical-align:middle}
.dtip-btn svg{display:block}
.h2 .dtip,.dlabel .dtip,.mlabel .dtip{position:relative;top:0}
.dmargin-row .dtip{flex:none;align-self:center}
.dmargin-row .dtip-card{left:auto;right:-6px}
/* Stores header: the view toggle sits on the text block's baseline row */
@media (max-width:1023.98px){
  .dsec-head{align-items:flex-end!important}
  .dsec-head > .dviewsw{align-self:flex-end!important;min-height:0!important;height:40px}
  .dsec-head > .dviewsw button{height:auto}
}
/* Detailed cards: the name may wrap once, then "…" */
.pc-t1,.oc-name1,.mc-t1{display:-webkit-box!important;-webkit-box-orient:vertical;-webkit-line-clamp:2!important;line-clamp:2;white-space:normal!important;overflow:hidden;text-overflow:ellipsis;word-break:break-word}
/* every dropdown: our own chevron, inset 12px from the edge */
select:not([multiple]):not([size]){-webkit-appearance:none;-moz-appearance:none;appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238A8F98' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")!important;
  background-repeat:no-repeat!important;background-position:right 12px center!important;background-size:14px 14px!important;padding-right:36px!important}
.ssel select{padding-right:22px!important;background-position:right 0 center!important}
.ssel{padding-right:12px}
.chipsed-fields .chipsed-ends{padding-right:32px!important;background-position:right 10px center!important}
/* phone/tablet header: more room above and below (not at the sides) */
.mtop{height:auto;min-height:68px;padding-top:12px;padding-bottom:12px}
/* ---- phones/tablets: header store dropdown + sidebar drawer ---------- */
.smenu{position:fixed;z-index:70;width:min(280px,calc(100vw - 16px));max-height:min(70vh,520px);overflow:auto;padding:6px;
  background:var(--surface);border:1px solid var(--line-2);border-radius:12px;box-shadow:0 16px 40px rgba(0,0,0,.35)}
.smenu[hidden]{display:none}
.smenu-item{display:flex;align-items:center;gap:10px;min-height:44px;padding:6px 10px;border-radius:8px;color:var(--ink);text-decoration:none;font-size:14px;font-weight:500}
.smenu-item:hover,.smenu-item:focus-visible{background:var(--subtle);text-decoration:none;outline:0}
.smenu-item.on{background:var(--sunk)}
.smenu-item .grow{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.smenu-all{width:20px;height:20px;border-radius:5px;background:var(--ink)!important;color:var(--surface)}
.smenu-check{color:var(--accent-ink);font-weight:700}
.smenu-sep{height:1px;background:var(--line);margin:4px 2px}
@media (min-width:1024px){.smenu{display:none!important}}
.drawer-scrim{position:fixed;inset:0;z-index:79;background:rgba(0,0,0,.45)}
.drawer-scrim[hidden]{display:none}
@media (max-width:1023.98px){
  .app > .side{display:flex!important;position:fixed;z-index:80;top:0;bottom:0;left:0;width:min(300px,86vw);height:100dvh;overflow-y:auto;
    transform:translateX(-102%);transition:transform .22s ease,visibility 0s linear .22s;visibility:hidden;box-shadow:12px 0 40px rgba(0,0,0,.35)}
  .drawer-open .app > .side{transform:none;visibility:visible;transition:transform .22s ease,visibility 0s}
  .drawer-open body{overflow:hidden}
}
@media (prefers-reduced-motion:reduce){.app > .side{transition:none}}
@media (min-width:1024px){.drawer-scrim{display:none!important}}
/* phones/tablets: the page itself never scrolls sideways (inner carousels,
   charts and tables keep their own horizontal scroll) */
@media (max-width:1023.98px){html,body{overflow-x:clip;max-width:100%}}
.dpop .dr2 label{padding-left:8px!important;gap:4px!important}
.dpop .dr2 label > span:first-child{font-size:10.5px}
.dpop .dr2-f b{padding:0 2px 0 4px!important;font-size:12.5px!important;letter-spacing:-.05em}
/* phone/tablet header: product alerts, just left of the sync/status button */
.malerts{position:relative;flex:none;display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:10px;border:1px solid var(--line-2);background:var(--surface);color:var(--muted);text-decoration:none;align-self:center;margin-left:auto}
.malerts svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.malerts.bad{color:var(--neg);border-color:color-mix(in srgb,var(--neg) 50%,transparent);background:color-mix(in srgb,var(--neg) 10%,var(--surface))}
.malerts.good{color:var(--pos);border-color:var(--pos-line)}
.malerts:hover{text-decoration:none;filter:brightness(1.1)}
.malerts-n{position:absolute;top:-6px;right:-6px;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:var(--neg);color:#fff;font-size:10.5px;font-weight:700;line-height:18px;text-align:center;font-variant-numeric:tabular-nums}
.mtop .malerts + .top-sync{margin-left:0}
/* trend alerts: a thick white up/down arrow before the text */
.ov-b .ov-arr{width:11px;height:11px;margin:-1px 5px 0 0;vertical-align:-1px;color:#fff;flex:none}
/* Detailed cards: the name gets a little more room and air */
.pc-t1,.oc-name1,.mc-t1{line-height:1.25!important}
.npb-row{padding-top:4px;padding-bottom:4px}
/* Profitability phone store cards: header row centred; the six figures in an
   even, bordered 3 x 2 grid */
.prof-cards .mli{display:flex;flex-direction:column;gap:12px}
.prof-cards .mli > .row.between{align-items:center}
.prof-cards .mli .stag{font-size:14px;font-weight:600}
.prof-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:0!important;margin-top:0!important;border:1px solid var(--line);border-radius:10px;overflow:hidden;background:var(--sunk)}
.prof-grid > div{padding:9px 10px;gap:3px!important;border-right:1px solid var(--line);border-bottom:1px solid var(--line)}
.prof-grid > div:nth-child(3n){border-right:0}
.prof-grid > div:nth-last-child(-n+3){border-bottom:0}
.prof-grid .l{font-size:11px}
.prof-grid .v{font-size:14px}
.prof-cards .miss{align-self:flex-start}
.prof-cards a.mli,.prof-cards a.mli:hover{color:var(--ink);text-decoration:none}
/* ---- phones/tablets: compact page headers, like the dashboard's ----------
   eyebrow + title only (descriptions dropped), header buttons become icons */
.ph-short{display:none}
@media (max-width:1023.98px){
  .ph-long{display:none}.ph-short{display:inline}
  .main .col:has(> .eyebrow + .h1) > .sub,
  .main .col:has(> .eyebrow + .h1) > .help,
  .main .col:has(> .eyebrow + .h1) > .px-counts{display:none!important}
  .main .col:has(> .eyebrow + .h1){gap:2px!important}
  .main .col:has(> .eyebrow + .h1) > .eyebrow{text-transform:uppercase;letter-spacing:.06em;font-size:11.5px;font-weight:600}
  .main .row.between:has(> .col > .eyebrow + .h1){flex-direction:row!important;align-items:center!important;justify-content:space-between!important;flex-wrap:wrap!important;gap:12px}
  .main .row.between:has(> .col > .eyebrow + .h1) > .col{align-items:flex-start!important;text-align:left}
  .main .row.between:has(> .col > .eyebrow + .h1) > .col{flex:1 1 0;min-width:0}
  .main .row.between:has(> .col > .eyebrow + .h1) > a.btn{flex:none;width:44px;height:44px;padding:0;font-size:0;gap:0;justify-content:center;border-radius:10px}
  .main .row.between:has(> .col > .eyebrow + .h1) > a.btn svg{width:18px;height:18px;margin:0}
  .main .row.between:has(> .col > .eyebrow + .h1) > :not(.col):not(a.btn){flex:1 1 100%}
  /* store page: back link, then the avatar + name; the domain line goes */
  .narrow-only > .row.gap12 .help.mono{display:none}
}
/* Costs › All stores: the three figures stay one row on phones */
@media (max-width:1023.98px){
  [data-testid="costs-all-summary"]{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important}
  [data-testid="costs-all-summary"] > .metric{padding:12px 10px;border-right:1px solid var(--line);border-bottom:0!important;min-width:0}
  [data-testid="costs-all-summary"] > .metric:last-child{border-right:0}
  [data-testid="costs-all-summary"] .mlabel{font-size:11px;line-height:1.25;min-height:2.5em}
  [data-testid="costs-all-summary"] .mval{font-size:20px}
  [data-testid="costs-all-summary"] .msub{font-size:11px;line-height:1.3}
}
/* phone header: six controls fit at 390px */
@media (max-width:1023.98px){
  .mtop{gap:6px!important}
  .mtop .mbell{width:40px;height:40px}
  .mtop .mstore{font-size:14px;padding-left:10px;padding-right:8px;gap:6px}
}
/* phones: Overview carousels run to the page edges, not the content edge */
@media (max-width:767.98px){
  .ocar{margin:0 -16px;padding:1px 16px;scroll-padding-inline:16px}
}
/* image banners: every row has the same icon slot, so the text lines up */
.ov-b{display:flex!important;align-items:center;gap:6px}
.ov-b.live::before{content:none!important}
.ov-ic{flex:none;width:12px;height:12px;display:inline-flex;align-items:center;justify-content:center}
.ov-ic .ov-arr{width:12px;height:12px;margin:0!important;vertical-align:0;color:#fff}
.ov-dot{width:7px;height:7px;border-radius:50%;background:#fff;display:block}
.ov-tx{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* phone Overview cards: the four figures on one row */
@media (max-width:767.98px){
  .oc-kv{grid-template-columns:repeat(4,minmax(0,1fr))!important}
  .oc-kv > span{padding:6px 5px!important}
  .oc-kv i{font-size:10px;overflow:hidden;text-overflow:ellipsis}
  .oc-kv b{font-size:12px!important;letter-spacing:-.02em}
}
@media (max-width:767.98px){
  .oc-kv > span{padding:5px 4px!important}
  .oc-kv b{font-size:11.5px!important;letter-spacing:-.03em}
  .oc-kv .mc-l,.oc-kv i{font-size:9.5px!important}
}
@media (max-width:767.98px){
  [data-card-view="compact"] .oc-side > .stag{margin-right:30px;max-width:calc(100% - 30px)}
}
/* Overview cards: tidy — no link underline or link colour on the card text,
   figures in ink, compact chips one line each */
.oc-main,.oc-main:hover,.oc-main:visited{color:var(--ink);text-decoration:none!important}
.oc-main .oc-name,.oc-main:hover .oc-name{text-decoration:none!important;color:var(--ink)}
.oc-kv b{color:var(--ink)}
.oc-kv b.pos{color:var(--pos)} .oc-kv b.neg{color:var(--neg)} .oc-kv b.faint{color:var(--faint)}
.oc-tags .oc-chip,.oc-tags .oc-live{white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis;display:block!important}
.oc-tags .oc-live{display:flex!important}
.oc-side .oc-name{-webkit-line-clamp:3}
@media (max-width:767.98px){
  .oc-kv b{font-size:11px!important;letter-spacing:-.04em}
  .oc-kv > span{padding:5px 3px 5px 5px!important}
}
@media (max-width:767.98px){
  /* compact Overview card: the store shows as its badge only beside the chart button */
  [data-card-view="compact"] .oc-side > .stag > span:not(.av){display:none}
  [data-card-view="compact"] .oc-kv{grid-template-columns:minmax(0,.85fr) minmax(0,1.2fr) minmax(0,1fr) minmax(0,1fr)!important}
  [data-card-view="compact"] .oc-side .oc-name{overflow-wrap:anywhere}
}

/* Retire / archive a store (store_lifecycle.html, store_archive.html) */
.slc{max-width:760px;width:100%;margin-left:auto;margin-right:auto}
.slc-store,.slc-opt{padding:18px;display:flex;flex-direction:column;gap:14px}
.slc-opt .h2{display:flex;align-items:center;gap:8px}
.slc-list{margin:0;padding-left:18px;display:flex;flex-direction:column;gap:6px;color:var(--muted);font-size:13.5px}
.slc-figs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.slc-figs .mval{font-size:18px}
.slc-choice{border:0;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.slc-radio{display:flex;gap:10px;align-items:flex-start;padding:12px;border:1px solid var(--line);border-radius:var(--r-sm);cursor:pointer}
.slc-radio:has(input:checked){border-color:var(--accent);background:var(--accent-soft)}
.slc-radio input{margin-top:3px}
.slc-radio > span{display:flex;flex-direction:column;gap:2px}
.slc-row{display:flex;flex-direction:column;gap:12px;padding:14px 16px;text-decoration:none;color:inherit;}
.slc-row:hover{border-color:var(--line-2)}
@media (max-width:599.98px){.slc-figs .mval{font-size:15px}.slc-figs{gap:8px}}
.spx-life{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;border-top:1px solid var(--line)}
.spx-life .btn{flex:none}
@media (max-width:599.98px){.spx-life{flex-direction:column;align-items:stretch}.spx-life .btn{justify-content:center}}
