/* ============================================================
   Ace App — Reports redesign
   Lifted from /tmp/ace-design-handoff/design_handoff_reports/report-styles.css
   All tokens come from existing index.css / components.css.

   🔴 BLAST RADIUS (2026-09-10): the rp-* classes are the app's design system
   now, not a reports-only skin. Consumers: /reports/*, /dashboard, the
   rep-facing /territory/lcbo/:tm/op-accounts, every market flagship, and
   ~60 AB/BC/MB/SK/NS/NB pages via the market helpers (ab/bc/mb/sk/ns-
   helpers.js emit rp-band / rp-kpi / rp-card / rp-th / rp-td / rp-pill /
   rp-filter / rp-chip / rp-delta). Change a generic rule here and every one
   of those pages moves. Market-specific overrides go in the market's own
   stylesheet (ab/bc/mb/ns/nb-market.css, sk-dashboard.css), never here.
   ============================================================ */

.rp{
  font-family: 'Manrope', system-ui, sans-serif;
  color: var(--ace-text);
  background: var(--ace-surface-alt);
  min-height: 100%;
}
.rp *{ box-sizing:border-box; }

/* ---- Page header band (navy hero strip) ---- */
.rp-band{
  background: linear-gradient(180deg, var(--ace-navy) 0%, #012e47 100%);
  color:#fff;
  padding: 20px 28px 56px;
  position:relative;
  overflow:hidden;
}
.rp-band::after{
  content:""; position:absolute; right:-40px; bottom:-60px;
  width: 320px; height: 320px; border-radius:50%;
  background: radial-gradient(circle, rgba(90,200,242,0.18), transparent 60%);
  pointer-events:none;
}
.rp-crumbs{
  font-size: 11px; letter-spacing: .8px; text-transform: uppercase;
  color: rgba(255,255,255,0.55); font-weight: 700;
  display:flex; align-items:center; gap:8px;
}
.rp-crumbs .sep{ opacity:.4; }
.rp-crumbs a{ color: inherit; text-decoration: none; }
.rp-crumbs a:hover{ color: rgba(255,255,255,0.85); text-decoration: underline; }
.rp-title-row{
  display:flex; align-items:flex-end; justify-content:space-between; gap:24px;
  margin-top: 6px;
}
.rp-title{ font-size: 26px; font-weight: 900; letter-spacing:-.3px; line-height:1.15; }
.rp-sub{ font-size: 13px; color: rgba(255,255,255,0.7); margin-top: 4px; max-width: 720px; }
.rp-actions{ display:flex; align-items:center; gap:8px; position:relative; z-index:1; }
/* A small tag on the band: the channel of the store being viewed. */
.rp-band-tag{ display:inline-flex; align-items:center; padding:6px 12px; border-radius:999px; background:rgba(255,255,255,0.12); border:1px solid rgba(255,255,255,0.14); color:#fff; font-size:11px; font-weight:800; letter-spacing:.8px; text-transform:uppercase; }

.rp-period{
  display:inline-flex; background: rgba(255,255,255,0.08); border-radius: 10px; padding:3px;
  border:1px solid rgba(255,255,255,0.08);
}
.rp-period button{
  font-size:11px; font-weight:800; letter-spacing:.4px; text-transform:uppercase;
  padding: 6px 12px; border-radius: 7px; border:0; background:transparent; color:#cbd9e2; cursor:pointer;
  font-family:inherit;
}
.rp-period button.is-active{ background: var(--ace-blue); color: var(--ace-navy); }

/* ---- Content area pulls up over band ---- */
.rp-content{
  padding: 0 28px 40px;
  margin-top: -36px;
  position:relative; z-index:1;
}

/* ---- Filter bar (horizontal chips) ---- */
.rp-filter{
  background:#fff; border-radius: 14px;
  box-shadow: 0 4px 16px rgba(2,60,91,0.08), 0 1px 0 rgba(255,255,255,0.6) inset;
  border: 1px solid rgba(2,60,91,0.06);
  padding: 10px 12px;
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  margin-bottom: 16px;
}
.rp-flabel{
  font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase;
  color: var(--ace-text-muted); padding-right: 4px;
}
.rp-chip{
  font-size: 12px; font-weight: 700; letter-spacing:.2px;
  padding: 6px 12px; border-radius: 999px; cursor: pointer;
  background: var(--ace-surface-hover); color: var(--ace-text-secondary);
  border: 1px solid transparent;
  display:inline-flex; align-items:center; gap:6px;
  font-family:inherit;
}
.rp-chip:hover{ background: var(--ace-ice); color: var(--ace-navy); }
.rp-chip.is-active{ background: var(--ace-navy); color:#fff; }
.rp-chip.tone-blue.is-active{ background: var(--ace-blue); color: var(--ace-navy); }
.rp-chip.tone-warn{ background: var(--ace-peach); color:#7a4715; }
.rp-chip.tone-warn.is-active{ background: var(--ace-warning); color:#3f2406; }
.rp-chip-count{
  font-size:10px; font-weight: 800; padding: 1px 6px; border-radius: 999px;
  background: rgba(255,255,255,0.18);
}
.rp-chip:not(.is-active) .rp-chip-count{ background: rgba(2,60,91,0.08); color: var(--ace-text-secondary); }
.rp-divider{ width: 1px; height: 22px; background: var(--ace-border); }
.rp-search{
  flex:1; min-width: 220px;
  display:flex; align-items:center; gap:8px;
  padding: 6px 12px; background: var(--ace-surface-hover); border-radius: 8px;
  color: var(--ace-text-muted);
}
.rp-search input{
  flex:1; background:transparent; border:0; outline:0; font-size: 13px; color: var(--ace-text); font-family:inherit;
}
.rp-search kbd{
  font-family:'SF Mono', monospace; font-size: 10px; color: var(--ace-text-muted);
  background:#fff; padding: 1px 6px; border-radius: 4px; border:1px solid var(--ace-border);
}

/* ---- Section card ---- */
.rp-card{
  background:#fff; border-radius: 14px;
  border: 1px solid rgba(2,60,91,0.06);
  box-shadow: 0 4px 16px rgba(2,60,91,0.06);
  margin-bottom: 16px;
  overflow:hidden;
}
.rp-card-head{
  padding: 14px 18px;
  border-bottom: 1px solid var(--ace-border);
  display:flex; align-items:center; justify-content:space-between; gap:12px;
}
.rp-card-h{
  font-size: 14px; font-weight: 800; color: var(--ace-navy); letter-spacing:-.1px;
  display:flex; align-items:center; gap:10px;
}
.rp-card-h .num{
  font-size:11px; font-weight:800; letter-spacing:.4px;
  background: var(--ace-ice); color: var(--ace-navy);
  padding: 2px 8px; border-radius: 999px;
}
.rp-card-meta{ font-size: 11px; color: var(--ace-text-muted); font-weight:600; }
.rp-card-body{ padding: 16px 18px; }
.rp-card-body.flush{ padding: 0; }

/* ---- KPI tiles ---- */
.rp-kpi-row{ display:grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 12px; margin-bottom: 16px; }
.rp-kpi{
  background:#fff; border-radius: 14px; padding: 16px 18px;
  border:1px solid rgba(2,60,91,0.06); box-shadow: 0 4px 16px rgba(2,60,91,0.06);
  position:relative; overflow:hidden;
  display:flex; flex-direction:column; gap:8px;
}
.rp-kpi-label{
  font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase;
  color: var(--ace-text-muted);
  display:flex; align-items:center; justify-content:space-between; gap:8px;
}
.rp-kpi-val{
  font-size: 28px; font-weight: 900; color: var(--ace-navy);
  font-variant-numeric: tabular-nums; line-height: 1;
}
.rp-kpi-foot{
  display:flex; align-items:center; gap:8px; font-size: 11px; color: var(--ace-text-secondary);
}
.rp-kpi.is-hero{ background: linear-gradient(135deg, var(--ace-navy), #034b73); color:#fff; }
.rp-kpi.is-hero .rp-kpi-label{ color: rgba(255,255,255,0.65); }
.rp-kpi.is-hero .rp-kpi-val{ color:#fff; }
.rp-kpi.is-hero .rp-kpi-foot{ color: rgba(255,255,255,0.7); }
.rp-kpi-strip{
  position:absolute; left:0; top:0; bottom:0; width:4px; border-radius: 14px 0 0 14px;
}
.rp-kpi.tone-good .rp-kpi-strip{ background: var(--ace-positive); }
.rp-kpi.tone-warn .rp-kpi-strip{ background: var(--ace-warning); }
.rp-kpi.tone-crit .rp-kpi-strip{ background: var(--ace-negative); }
.rp-kpi.tone-info .rp-kpi-strip{ background: var(--ace-blue); }

.rp-spk{ display:inline-block; vertical-align: middle; }
.rp-kpi .rp-spk{ position:absolute; right: 12px; bottom: 10px; opacity: .6; }

/* delta chip */
.rp-delta{
  display:inline-flex; align-items:center; gap:3px;
  font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 999px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.rp-delta.up{ background: var(--ace-mint); color:#3a6e1c; }
.rp-delta.dn{ background: var(--ace-pink); color: var(--ace-critical); }
.rp-delta.flat{ background: var(--ace-light-gray); color: var(--ace-text-secondary); }
.rp-delta.up-light{ color:#3a8a25; background: transparent; padding:0; }
.rp-delta.dn-light{ color: var(--ace-critical); background: transparent; padding:0; }
.rp-delta.flat-light{ color: var(--ace-text-secondary); background: transparent; padding:0; }

/* ---- Table primitives ---- */
.rp-tw{ overflow:auto; }
.rp-tbl{ width:100%; border-collapse: collapse; font-size: 13px; }
.rp-tbl thead th{
  position: sticky; top:0; z-index: 1;
  background: linear-gradient(180deg, #f9fbfd, #eef3f8);
  color: var(--ace-text-secondary);
  text-align:left;
  font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase;
  padding: 11px 14px;
  border-bottom: 1px solid var(--ace-border);
}
.rp-tbl thead th.r{ text-align:right; }
.rp-tbl thead th.c{ text-align:center; }
.rp-tbl thead th.sortable{ cursor:pointer; user-select:none; }
.rp-tbl thead th.sortable:hover{ color: var(--ace-navy); }
.rp-tbl thead th.is-sorted{ color: var(--ace-navy); }
.rp-tbl tbody td{
  padding: 11px 14px; border-bottom: 1px solid var(--ace-border-soft); color: var(--ace-text);
  font-variant-numeric: tabular-nums;
}
.rp-tbl tbody td.r{ text-align:right; }
.rp-tbl tbody td.c{ text-align:center; }
.rp-tbl tbody tr:hover{ background: var(--ace-surface-alt); }
.rp-tbl tbody tr.is-clickable{ cursor: pointer; }
.rp-tbl tbody tr.is-tot{ background: #f7faff; }
.rp-tbl tbody tr.is-tot td{ font-weight: 800; color: var(--ace-navy); border-top: 1px solid var(--ace-border); border-bottom: 0; }
.rp-tbl tbody tr.is-tot td:first-child{ letter-spacing:.4px; text-transform: uppercase; font-size: 11px; }
.rp-tbl .rk{ font-size: 11px; color: var(--ace-text-muted); font-weight: 700; }
.rp-tbl .nm{ font-weight: 700; color: var(--ace-text); }
.rp-tbl .sub{ font-size: 11px; color: var(--ace-text-muted); margin-top: 1px; }

.rp-row-flex{ display:flex; align-items:center; gap:10px; }

.rp-av{
  width: 28px; height:28px; border-radius:50%; flex-shrink:0;
  background: var(--ace-ice); color: var(--ace-navy); font-weight: 800; font-size: 11px;
  display:grid; place-items:center;
}
.rp-av.warm{ background: var(--ace-peach); color: #7a4715; }
.rp-av.mint{ background: var(--ace-mint); color: #3a6e1c; }
.rp-av.pink{ background: var(--ace-pink); color: var(--ace-critical); }
.rp-av.navy{ background: var(--ace-navy); color: #fff; }

/* inline mini bar */
.rp-mb{
  width: 80px; height: 6px; background: var(--ace-surface-hover); border-radius: 999px; overflow:hidden;
  display:inline-block; vertical-align: middle;
}
.rp-mb > span{ display:block; height:100%; border-radius: 999px; }
.rp-mb.thin{ height: 4px; }
.rp-mb.tall{ height: 10px; }

/* status pill */
.rp-pill{
  font-size: 10px; font-weight: 800; letter-spacing:.6px; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px;
  display:inline-flex; align-items:center; gap:4px;
}
.rp-pill.good{ background: var(--ace-mint); color: #3a6e1c; }
.rp-pill.warn{ background: var(--ace-peach); color: #7a4715; }
.rp-pill.crit{ background: var(--ace-pink); color: var(--ace-critical); }
.rp-pill.info{ background: var(--ace-ice); color: var(--ace-navy); }
.rp-pill.neutral{ background: var(--ace-light-gray); color: var(--ace-text-secondary); }
.rp-pill .dot{ width:5px; height:5px; border-radius:50%; background: currentColor; }

/* heatmap cell */
.rp-hc{
  display:inline-block; padding: 3px 8px; border-radius: 6px;
  font-weight: 700; font-variant-numeric: tabular-nums;
}
.rp-hc.h0{ background: transparent; color: var(--ace-text-muted); }
.rp-hc.h1{ background: rgba(163,217,113,0.15); color: #3a8a25; }
.rp-hc.h2{ background: rgba(163,217,113,0.3); color: #2d6e1c; }
.rp-hc.h3{ background: rgba(163,217,113,0.5); color: #234712; }
.rp-hc.hn1{ background: rgba(255,113,130,0.12); color: var(--ace-critical); }
.rp-hc.hn2{ background: rgba(255,113,130,0.25); color: var(--ace-critical); }

/* small svg utility */
.rp svg{ flex-shrink:0; }

/* Generic container rows */
.rp-2col{ display:grid; grid-template-columns: 1.6fr 1fr; gap: 16px; }
.rp-2col-eq{ display:grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.rp-3col{ display:grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
/* A grid item defaults to min-width:auto, so a wide table inside a column
   (e.g. a Movers table in .rp-2col-eq) grows the track past the card body;
   .rp-card's overflow:hidden then clips the right-hand columns with no
   scroll. Zero it so the item's own .rp-tw{overflow:auto} handles overflow
   instead. */
.rp-2col > *, .rp-2col-eq > *, .rp-3col > * { min-width: 0; }

/* Channel swatch */
.rp-ch{
  display:inline-flex; align-items:center; gap:6px;
  font-size: 11px; font-weight: 700; color: var(--ace-text-secondary);
}
.rp-ch .sw{ width: 8px; height: 8px; border-radius: 2px; display:inline-block; }
.rp-ch .sw.lcbo{ background: var(--ace-channel-lcbo); }
.rp-ch .sw.groc{ background: var(--ace-channel-grocery); }
.rp-ch .sw.conv{ background: var(--ace-channel-conv); }
.rp-ch .sw.agcy{ background: var(--ace-channel-agency); }
.rp-ch .sw.kdp{ background: #C41230; }

/* Podium */
.rp-podium{
  display:grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 12px; align-items:end;
  margin-bottom: 16px;
}
.rp-stand{
  position:relative; padding: 16px 16px 18px; border-radius: 14px;
  box-shadow: 0 4px 16px rgba(2,60,91,0.08);
  border:1px solid rgba(2,60,91,0.06); background:#fff;
  display:flex; flex-direction:column; align-items:center; gap:6px;
  text-align:center;
}
.rp-stand.gold{ background: linear-gradient(180deg,#fff7e0,#fff); border-color:#f3d796; }
.rp-stand.silver{ background: linear-gradient(180deg,#f3f5f8,#fff); border-color:#d8dee6; }
.rp-stand.bronze{ background: linear-gradient(180deg,#fceadf,#fff); border-color:#e8c4a4; }
.rp-stand .medal{
  width:44px; height:44px; border-radius:50%; display:grid; place-items:center;
  font-size: 18px; font-weight: 900; color:#fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.rp-stand.gold .medal{ background: linear-gradient(135deg,#f6c544,#d8a127); }
.rp-stand.silver .medal{ background: linear-gradient(135deg,#cbd0d6,#9aa4af); }
.rp-stand.bronze .medal{ background: linear-gradient(135deg,#d39062,#a8693a); }
.rp-stand .nm{ font-size: 16px; font-weight: 900; color: var(--ace-navy); }
.rp-stand .role{ font-size: 11px; color: var(--ace-text-muted); letter-spacing:.4px; text-transform: uppercase; font-weight: 700; }
.rp-stand .stat{ font-size: 22px; font-weight: 900; color: var(--ace-navy); font-variant-numeric: tabular-nums; margin-top: 4px; }
.rp-stand .lbl{ font-size: 10px; color: var(--ace-text-muted); letter-spacing:.6px; text-transform: uppercase; font-weight: 800; }
.rp-stand.gold{ transform: translateY(-12px); }

/* Total Listings strip (Leaderboard) */
.rp-tl-strip{
  display:grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 24px; align-items:center;
  background:#fff; border-radius: 14px; padding: 18px 22px;
  border:1px solid rgba(2,60,91,0.06); box-shadow: 0 4px 16px rgba(2,60,91,0.06);
  margin-bottom: 16px;
}
.rp-tl-num{ font-size: 36px; font-weight: 900; color: var(--ace-navy); font-variant-numeric: tabular-nums; line-height: 1; }
.rp-tl-lbl{ font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--ace-text-muted); margin-top: 6px; }
.rp-tl-delta{ display:flex; flex-direction:column; gap:6px; }
.rp-tl-delta-num{ font-size: 24px; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1; color: #3a8a25; }
.rp-tl-delta-num.dn{ color: var(--ace-critical); }
.rp-tl-channels{ display:flex; flex-direction:column; gap:6px; }
.rp-tl-channel{ display:grid; grid-template-columns: 90px 1fr 50px; gap:10px; align-items:center; font-size:12px; }
.rp-tl-channel .lbl{ display:flex; align-items:center; gap:6px; font-weight:700; color: var(--ace-text-secondary); }
.rp-tl-channel .lbl .sw{ width:8px; height:8px; border-radius:2px; display:inline-block; }
.rp-tl-channel .v{ text-align:right; font-weight:800; color: var(--ace-navy); font-variant-numeric: tabular-nums; }

/* Stand-alone pills */
.rp-prio{
  display:inline-flex; align-items:center; gap: 6px;
  font-weight: 800; font-size: 11px; padding: 3px 8px; border-radius: 6px;
}
.rp-prio.high{ background: var(--ace-pink); color: var(--ace-critical); }
.rp-prio.med{ background: var(--ace-peach); color: #7a4715; }
.rp-prio.low{ background: var(--ace-light-gray); color: var(--ace-text-secondary); }

.rp-tbl tbody tr.has-flag td:first-child{ box-shadow: inset 3px 0 0 var(--ace-warning); }
.rp-tbl tbody tr.is-watch td:first-child{ box-shadow: inset 3px 0 0 var(--ace-negative); }
.rp-tbl tbody tr.has-flag{ background: rgba(255,113,130,0.04); }

/* Lapsed banner (Accounts view) */
.rp-lapsed-banner{
  display:flex; align-items:center; gap:14px;
  background: rgba(255,223,227,0.45);
  border: 1px solid #f7c2c8;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 14px;
}
.rp-lapsed-banner .icon{
  width:32px; height:32px; border-radius:50%; flex-shrink:0;
  background: var(--ace-pink); color: var(--ace-critical);
  display:grid; place-items:center; font-weight:800;
}
.rp-lapsed-banner .text{ flex:1; font-size:13px; color: var(--ace-text); }
.rp-lapsed-banner .text strong{ color: var(--ace-critical); font-weight:800; }
.rp-lapsed-banner button{
  font-size:12px; font-weight:700; padding:6px 14px; border-radius:8px;
  border:1px solid var(--ace-critical); background: var(--ace-critical); color:#fff; cursor:pointer;
  font-family: inherit;
}
.rp-lapsed-banner button:hover{ filter: brightness(1.05); }
.rp-lapsed-banner .dismiss{
  width:24px; height:24px; border-radius:6px; background:transparent; color: var(--ace-text-muted);
  border:0; cursor:pointer; display:grid; place-items:center; font-size:16px;
}

/* Segmented toggle (Accounts/Pipeline switcher in OnPremise) */
.rp-segmented{
  display:inline-flex; background:rgba(255,255,255,0.08); border-radius:10px; padding:3px;
  border:1px solid rgba(255,255,255,0.08);
}
.rp-segmented button{
  font-size:11px; font-weight:800; letter-spacing:.4px; text-transform:uppercase;
  padding:6px 14px; border-radius:7px; border:0; background:transparent; color:#cbd9e2; cursor:pointer;
  font-family:inherit;
}
.rp-segmented button.is-active{ background: var(--ace-blue); color: var(--ace-navy); }

/* Index landing card grid */
.rp-index-grid{
  display:grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap:16px;
  margin-bottom: 24px;
}
.rp-index-card{
  background:#fff; border-radius: 14px; padding: 22px 22px 20px;
  border:1px solid rgba(2,60,91,0.06); box-shadow: 0 4px 16px rgba(2,60,91,0.06);
  display:flex; flex-direction:column; gap:8px;
  text-decoration: none; color:inherit;
  transition: transform .12s ease, box-shadow .12s ease;
  cursor: pointer;
}
.rp-index-card:hover{ transform: translateY(-2px); box-shadow: 0 8px 22px rgba(2,60,91,0.12); }
.rp-index-card .icon{
  width:40px; height:40px; border-radius:10px;
  background: var(--ace-ice); color: var(--ace-navy);
  display:grid; place-items:center; margin-bottom: 4px;
}
.rp-index-card .ttl{ font-size: 16px; font-weight: 900; color: var(--ace-navy); letter-spacing:-.2px; }
.rp-index-card .desc{ font-size: 12px; color: var(--ace-text-secondary); line-height: 1.5; }
.rp-index-card .more{
  margin-top: 8px; font-size: 11px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase;
  color: var(--ace-blue); display:flex; align-items:center; gap:4px;
}

/* Empty state */
.rp-empty{
  text-align:center; padding: 48px 20px; color: var(--ace-text-secondary); font-size: 14px;
}

/* Loading skeleton */
@keyframes rp-pulse{ 0%,100%{opacity:1} 50%{opacity:.5} }
.rp-skeleton{
  background: var(--ace-surface-hover); border-radius: 8px;
  animation: rp-pulse 1.5s ease-in-out infinite;
}

/* Deviation bar (Territory Comparison) */
.rp-dev-row{
  display:grid; grid-template-columns: 90px 1fr 1fr 70px; gap: 8px; align-items:center;
  padding: 8px 4px; border-bottom: 1px solid var(--ace-border-soft);
}
.rp-dev-row:last-child{ border-bottom: 0; }
.rp-dev-half-l{
  height:18px; background: var(--ace-surface-hover); border-radius: 6px 0 0 6px;
  position:relative; display:flex; justify-content:flex-end; overflow:hidden;
}
.rp-dev-half-r{
  height:18px; background: var(--ace-surface-hover); border-radius: 0 6px 6px 0;
  position:relative; overflow:hidden;
}
.rp-dev-half-l > span, .rp-dev-half-r > span{ display:block; height:100%; }
.rp-dev-half-l > span{ background: var(--ace-negative); }
.rp-dev-half-r > span{ background: var(--ace-positive); }
.rp-dev-val{ text-align:right; font-size:13px; font-weight:800; font-variant-numeric: tabular-nums; }
.rp-dev-val.up{ color:#3a8a25; }
.rp-dev-val.dn{ color: var(--ace-critical); }

/* Two-col band (Stores Watchlist + Top contributors) */
.rp-watch-row{
  display:grid; grid-template-columns: auto 1fr auto auto; gap:10px; align-items:center;
  padding: 12px 16px; border-bottom: 1px solid var(--ace-border-soft);
}
.rp-watch-row:last-child{ border-bottom: 0; }

/* ---- Filter-bar controls beyond chips (added for /dashboard) ----
   A native <select> dressed as a chip, a plain button pair, and a flex spacer
   so Apply/Reset can sit at the right edge of an .rp-filter row. */
.rp-chip.rp-select{
  appearance:none; -webkit-appearance:none;
  padding: 6px 28px 6px 12px; min-width: 150px; line-height: 1.3;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat:no-repeat; background-position: right 10px center; background-size: 12px 12px;
  color: var(--ace-navy);
}
.rp-chip.rp-select:focus{ outline: 2px solid var(--ace-blue); outline-offset: 1px; }
.rp-spacer{ flex: 1 1 auto; }
/* Label + control that must wrap as one unit (otherwise a narrow bar strands
   the label at the end of one row and its control at the start of the next). */
.rp-fgroup{ display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rp-btn{
  font-size: 12px; font-weight: 800; letter-spacing: .3px;
  padding: 7px 14px; border-radius: 8px; cursor: pointer; font-family: inherit;
  border: 1px solid var(--ace-border); background: #fff; color: var(--ace-text-secondary);
  display: inline-flex; align-items: center; gap: 6px; line-height: 1.3;
}
.rp-btn:hover{ background: var(--ace-surface-hover); color: var(--ace-navy); }
.rp-btn.primary{ background: var(--ace-navy); border-color: var(--ace-navy); color: #fff; }
.rp-btn.primary:hover{ background: var(--ace-navy-mid); color: #fff; }

/* Tables whose rows are emitted without per-cell .r classes: everything after
   the first N text columns right-aligns. (0,2,1) beats `.rp-tbl thead th`. */
.rp-tbl.num-from-2 th:nth-child(n+2), .rp-tbl.num-from-2 td:nth-child(n+2),
.rp-tbl.num-from-3 th:nth-child(n+3), .rp-tbl.num-from-3 td:nth-child(n+3){ text-align: right; }
/* Totals can live in <tfoot> too. */
.rp-tbl tfoot tr.is-tot{ background: #f7faff; }
.rp-tbl tfoot tr.is-tot td{
  padding: 11px 14px; font-weight: 800; color: var(--ace-navy); font-variant-numeric: tabular-nums;
  border-top: 1px solid var(--ace-border);
}
.rp-tbl tfoot tr.is-tot td:first-child{ letter-spacing:.4px; text-transform: uppercase; font-size: 11px; }
/* rp-empty inside a table cell: keep it compact. */
.rp-tbl td > .rp-empty{ padding: 28px 16px; }

/* ---- Dense table, chip variants, callout note ----
   (added for /ab/dashboard + /ab/dashboard-monthly). All generic: a chip that
   is dimmed but still clickable, an amber active chip, an <input> dressed as a
   chip, a tighter rp-tbl for wide grids, and a bordered note for feed-lag /
   pairing / suppression callouts. The collapsible-card chrome those pages use
   (.rp-card.is-collapsible / .rp-card-head.is-clickable / .rp-toggle /
   .rp-pill-row) is the block right below, shared with /nb/sales. */
.rp-chip.is-dim{ opacity:.5; }
.rp-chip.tone-amber.is-active{ background: var(--ace-amber); color:#3f2406; }
.rp-chip.rp-input{
  width:132px; text-align:center; color: var(--ace-navy); outline:0; cursor:pointer;
}
.rp-chip.rp-input::placeholder{ color: var(--ace-text-muted); font-weight:600; }
.rp-chip.rp-input:focus{ outline:2px solid var(--ace-blue); outline-offset:1px; }
.rp-tbl.dense thead th{ padding: 8px 10px; font-size: 9.5px; }
.rp-tbl.dense tbody td{ padding: 6px 10px; font-size: 12px; }
.rp-na{ color: var(--ace-text-muted); }
.rp-note{
  border-radius: 12px; padding: 10px 14px 10px 16px; margin-bottom: 12px;
  font-size: 12.5px; line-height: 1.55; color: var(--ace-text);
  background:#fff; border:1px solid rgba(2,60,91,0.06);
  box-shadow: inset 3px 0 0 var(--ace-blue), 0 4px 16px rgba(2,60,91,0.06);
}
.rp-note strong{ color: var(--ace-navy); font-weight:800; }
.rp-note.info{ background:#f3fbfe; }
.rp-note.warn{ background:#fff8e6; box-shadow: inset 3px 0 0 var(--ace-amber), 0 4px 16px rgba(2,60,91,0.06); }
.rp-note.crit{ background:#fff5f6; box-shadow: inset 3px 0 0 var(--ace-negative), 0 4px 16px rgba(2,60,91,0.06); }

/* ---- Collapsible cards + in-card controls (added for /nb/sales) ----
   A card whose body is shown/hidden by a binder that flips body.style.display
   (bc-helpers bindBcSectionToggles, which also owns the +/− text on .rp-toggle).
   The rule between head and body sits on the BODY, so a collapsed card never
   shows a stray line under its head. */
.rp-card.is-collapsible > .rp-card-head{ border-bottom: 0; }
.rp-card.is-collapsible > .rp-card-body{ border-top: 1px solid var(--ace-border); }
.rp-card-head.is-clickable{ cursor: pointer; user-select: none; }
.rp-card-side{ display:flex; align-items:center; gap:10px; flex-shrink:0; }
.rp-toggle{
  width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--ace-border);
  background: var(--ace-surface-hover); color: var(--ace-text-secondary);
  font-family: inherit; font-size: 16px; font-weight: 800; line-height: 1;
  display: grid; place-items: center; cursor: pointer; flex: 0 0 auto;
}
.rp-toggle:hover{ background: var(--ace-ice); color: var(--ace-navy); }
/* Inside a .flush body: a padded block (KPI row), a tools strip (chips) that
   sits above an edge-to-edge table, and a footnote under it. */
.rp-card-pad{ padding: 16px 18px; }
.rp-card-pad > .rp-kpi-row:last-child{ margin-bottom: 0; }
.rp-card-tools{
  display:flex; flex-wrap:wrap; align-items:center; gap: 8px 10px;
  padding: 12px 18px; border-bottom: 1px solid var(--ace-border); background: #fff;
}
.rp-card-pad + .rp-card-tools{ border-top: 1px solid var(--ace-border); }
.rp-card-note{
  padding: 10px 18px 12px; font-size: 11px; line-height: 1.5; color: var(--ace-text-muted);
  border-top: 1px solid var(--ace-border-soft);
}
/* KPI tiles nested inside a card sit flat: the card already carries the shadow. */
.rp-kpi-row.is-nested .rp-kpi{ box-shadow: none; border-color: var(--ace-border); }
/* Pager row under a paginated table */
.rp-pager{
  display:flex; align-items:center; gap: 12px; flex-wrap: wrap;
  padding: 12px 18px; border-top: 1px solid var(--ace-border);
  font-size: 12px; color: var(--ace-text-secondary);
}
.rp-pager strong{ color: var(--ace-navy); font-variant-numeric: tabular-nums; }
.rp-btn[disabled]{ opacity: .45; cursor: not-allowed; }
.rp-btn[disabled]:hover{ background: #fff; color: var(--ace-text-secondary); }
/* Date-range input dressed for the filter bar (same look as the /dashboard
   picker, without the dash- prefix so any rp page can use it). */
.rp-daterange{
  display:flex; align-items:center; gap: 8px; min-width: 250px; padding: 0 12px;
  background: var(--ace-surface-hover); border: 1px solid transparent; border-radius: 8px;
  color: var(--ace-text-muted); cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.rp-daterange:hover, .rp-daterange:focus-within{
  background: #fff; border-color: var(--ace-blue); box-shadow: 0 0 0 3px rgba(90,200,242,0.22);
}
.rp-daterange input{
  flex: 1; min-width: 190px; padding: 7px 0; border: 0; background: transparent; outline: 0;
  font: inherit; font-size: 13px; font-weight: 700; color: var(--ace-navy); cursor: pointer;
}
.rp-daterange input::placeholder{ color: var(--ace-text-muted); font-weight: 600; }
/* Help text hanging under the filter bar */
.rp-filter-note{ margin: -8px 0 16px; padding: 0 6px; font-size: 11px; line-height: 1.5; color: var(--ace-text-muted); }
/* Row of status pills (window / definitions ribbon above the KPI row) */
.rp-pill-row{ display:flex; flex-wrap:wrap; gap: 6px; margin-bottom: 16px; }
/* Monospace id cell (item numbers) */
.rp-tbl .mono{ font-family: 'SF Mono', ui-monospace, Menlo, monospace; font-size: 11px; color: var(--ace-text-muted); }

/* ---- Shared-helper primitives (added 2026-09-10 for the market helper
   restyle: ab/bc/mb/sk-helpers.js emit these so ~60 non-flagship pages
   inherit the Reports look without a per-page rewrite). ----

   index.css sets body{text-align:center} and every SPA view inherits it; the
   report shell assumes a left default. Reset it once here instead of once per
   market skin (.dash-rp/.ab-rp/.bc-rp/.mb-rp/.ns-rp/.nb-rp all carried a copy). */
.rp{ text-align: left; }

/* .rp-page: a page whose getHtml() returns `<div class="rp rp-page">` with an
   xHero() band as a direct child, followed by plain content siblings. The band
   runs full-bleed; every other direct child gets the .rp-content gutter; the
   element right after the band pulls up over it like .rp-content does. This is
   what lets a helper-based page adopt the shell with a one-line root change. */
.rp-page{ padding: 0 0 40px; }
.rp-page > *:not(.rp-band){ margin-left: 28px; margin-right: 28px; }
.rp-page > .rp-band + *{ margin-top: -36px; position: relative; z-index: 1; }
@media(max-width: 640px){
  .rp-page{ padding-bottom: 32px; }
  .rp-page > *:not(.rp-band){ margin-left: 16px; margin-right: 16px; }
  .rp-page > .rp-band + *{ margin-top: -28px; }
}
/* A band that is not a direct child of .rp-page (nested inside a padded
   wrapper) renders as an inset card instead of a square-cornered strip. */
.rp-band.is-inset{ border-radius: 16px; padding: 24px 28px 26px; margin-bottom: 16px; }

/* Table cell classes for helpers that build <thead>/<td> without owning the
   <table> element (TH/THR/TD/TDR/TDB/THEAD in the market helpers). Same look
   as .rp-tbl, applied per cell so it works inside any table. */
.rp-thead th, th.rp-th{
  background: linear-gradient(180deg, #f9fbfd, #eef3f8);
  color: var(--ace-text-secondary); text-align:left;
  font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase;
  padding: 11px 14px; border-bottom: 1px solid var(--ace-border); white-space: nowrap;
}
.rp-thead th.r, th.rp-th.r{ text-align:right; }
td.rp-td{
  padding: 11px 14px; border-bottom: 1px solid var(--ace-border-soft); color: var(--ace-text);
  font-variant-numeric: tabular-nums;
}
td.rp-td.r{ text-align:right; }
td.rp-td.b{ font-weight: 700; color: var(--ace-navy); }

/* Brand name pill: a brand is a proper noun, never uppercase. Replaces the six
   per-market brandBadge()/.xx-brand variants. */
.rp-pill.brand{ text-transform: none; letter-spacing: .2px; font-size: 11px; background: var(--ace-ice); color: var(--ace-navy); }

/* Loading block emitted by xLoading(): two skeleton bars. */
.rp-loading{ padding: 4px 0; }

/* Hover affordance on a collapsible card head (was re-declared per market). */
.rp-card-head.is-clickable:hover .rp-card-h{ color: var(--ace-navy-mid); }
.rp-card-head.is-clickable:hover .rp-toggle{ background: var(--ace-ice); color: var(--ace-navy); }

/* A delta pill used AS the KPI value (KPI('YoY', yoyBadge(x)) on every market)
   reads at value scale, not the 11px table chip. :only-child so a pill sitting
   beside a number inside the value (reports/on-premise) keeps its size. */
.rp-kpi-val > .rp-delta:only-child{ font-size: 18px; padding: 4px 12px; gap: 6px; }

/* On helper-built pages a bare wide <table> dropped straight into a card body
   scrolls inside the body instead of being clipped by .rp-card{overflow:hidden}.
   Scoped to .rp-page so report pages with their own card internals keep
   HEAD's behaviour. */
.rp-page .rp-card-body{ overflow-x: auto; }

/* Mobile responsive */
@media(max-width: 900px){
  .rp-2col, .rp-2col-eq{ grid-template-columns: 1fr; }
  .rp-3col{ grid-template-columns: 1fr 1fr; }
  .rp-tl-strip{ grid-template-columns: 1fr; gap:14px; }
  .rp-podium{ grid-template-columns: 1fr; }
  .rp-stand.gold{ transform: none; }
}
@media(max-width: 640px){
  .rp-content{ padding: 0 16px 32px; margin-top: -28px; }
  .rp-band{ padding: 16px 16px 44px; }
  .rp-title{ font-size: 22px; }
  .rp-title-row{ flex-direction: column; align-items: flex-start; }
  .rp-actions{ width: 100%; flex-wrap: wrap; }
  .rp-filter{ padding: 8px 10px; }
  .rp-search{ min-width: 100%; }
  .rp-daterange{ min-width: 100%; }
  .rp-daterange input{ min-width: 0; width: 100%; }
  .rp-3col{ grid-template-columns: 1fr; }
  .rp-tl-num{ font-size: 28px; }
  .rp-kpi-val{ font-size: 22px; }
}

/* ============================================================
   Shared shell additions (2026-09-30), for moving the old dark-ground pages onto the
   report shell. Everything here is NEW and opt-in (a modifier class or a class nothing
   used before), except .rp-page min-height, which only extends the light ground to the
   bottom of the screen. No existing rule above changed, so no page that is on the shell
   today moves.
   ============================================================ */

/* Light ground to the bottom of the screen. The header is 60px (measured on the live app);
   it is hidden in embed mode (index.html sets html[data-embed]). */
html{ --ace-header-h: 60px; }
html[data-embed="1"]{ --ace-header-h: 0px; }
.rp-page{ min-height: calc(100vh - var(--ace-header-h)); }

/* Compact band: for utility pages (lists, logs, forms) where the hero is not the point.
   reportHeader({ compact: true }). Roughly 90px of chrome instead of 150. */
.rp-band.is-compact{ padding: 14px 24px 40px; }
.rp-band.is-compact .rp-title{ font-size: 20px; }
.rp-band.is-compact .rp-sub{ margin-top: 2px; }
.rp-page > .rp-band.is-compact + *{ margin-top: -24px; }
.rp-band.is-compact + .rp-content{ margin-top: -24px; }
@media(max-width: 640px){
  .rp-band.is-compact{ padding: 12px 16px 36px; }
  .rp-band.is-compact .rp-title{ font-size: 18px; }
  .rp-page > .rp-band.is-compact + *{ margin-top: -20px; }
  .rp-band.is-compact + .rp-content{ margin-top: -20px; }
}

/* A table wrapper that scrolls inside the page, so the sticky header row actually sticks
   (.rp-tw alone has no height, so its th{position:sticky} has nothing to stick to). */
.rp-tw.is-fixed{ max-height: min(70vh, 720px); }
/* First column pinned while a wide table scrolls sideways. */
.rp-tbl.sticky-col thead th:first-child,
.rp-tbl.sticky-col tbody td:first-child{ position: sticky; left: 0; z-index: 2; background: #fff; border-right: 1px solid var(--ace-border); }
.rp-tbl.sticky-col thead th:first-child{ z-index: 3; background: #eef3f8; }

/* A list row: store pickers, log entries, anything that was a stack of white cards on the
   dark ground. Left strip colour comes from --accent (default navy); use the
   --ace-channel-* tokens for channels. */
/* :not(tr) on purpose: <tr class="rp-row"> is already used as a plain hook on table rows (on-premise.js,
   op-chains.js, op-overview.js), and display:flex on a table row breaks its column alignment. */
.rp-row:not(tr){
  display:flex; align-items:center; gap:14px; padding:12px 16px; margin-bottom:6px;
  background:#fff; border:1px solid rgba(2,60,91,0.06); border-left:4px solid var(--accent, var(--ace-navy));
  border-radius:12px; box-shadow:0 2px 10px rgba(2,60,91,0.05);
  text-align:left; color:inherit; text-decoration:none;
}
a.rp-row{ cursor:pointer; transition: box-shadow .15s, transform .15s; }
a.rp-row:hover{ box-shadow:0 6px 18px rgba(2,60,91,0.12); transform: translateY(-1px); }
.rp-row-main{ flex:1; min-width:0; }
.rp-row-title{ font-size:14px; font-weight:800; color:var(--ace-navy); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rp-row-meta{ font-size:12px; color:var(--ace-text-muted); margin-top:1px; }

/* Form fields on the light ground (account, admin forms, log forms). */
.rp-field{ display:grid; gap:6px; margin-bottom:14px; text-align:left; }
.rp-field > label{ font-size:10px; font-weight:800; letter-spacing:1px; text-transform:uppercase; color:var(--ace-text-secondary); }
.rp-field input, .rp-field select, .rp-field textarea{
  font-family:inherit; font-size:13px; padding:9px 12px; border:1px solid var(--ace-border); border-radius:8px;
  background:#fff; color:var(--ace-text); box-sizing:border-box; width:100%;
}
.rp-field input:focus, .rp-field select:focus, .rp-field textarea:focus{ outline:none; border-color:var(--ace-blue); box-shadow:0 0 0 3px rgba(90,200,242,0.2); }
.rp-field .rp-field-hint{ font-size:11px; color:var(--ace-text-muted); }

/* Empty state with a title and a line (rp-empty alone stays a single centred line).
   empty(msg, { title, icon }) in _shared.js emits this. */
.rp-empty .rp-empty-ic{ display:inline-grid; place-items:center; width:44px; height:44px; border-radius:14px; background:var(--ace-ice); color:var(--ace-navy); margin-bottom:12px; }
.rp-empty .rp-empty-t{ font-size:16px; font-weight:800; color:var(--ace-navy); margin-bottom:4px; }
.rp-empty .rp-empty-s{ font-size:13px; color:var(--ace-text-secondary); }

/* ============================================================
   MB page skin (.mb-rp): Manitoba dashboards on the report shell.
   Everything is scoped under .mb-rp so no other page moves. Section cards
   are the shared .rp-card.is-collapsible chrome emitted by mb-helpers.js
   mbSection() and driven by mbBindSections(); nothing here redefines them.
   ============================================================ */

/* ---- Filter bars ---- */
.mb-rp .rp-filter + .rp-filter{ margin-top: -6px; }
.mb-rp .rp-chip:disabled{ opacity: .45; cursor: not-allowed; }
.mb-rp .rp-chip:disabled:hover{ background: var(--ace-surface-hover); color: var(--ace-text-secondary); }
.mb-rp .mb-filter-note{ font-size: 11px; font-weight: 600; color: var(--ace-text-muted); }
.mb-rp .mb-filter-note.warn{ color: #7a4715; }
/* KDP mode already hides the preset chips + brand opener (kdp-mode.js); this
   hides the "Portfolio" label and its divider with them so nothing is orphaned. */
body.kdp-mode .mb-rp [data-mb-portfolio-group]{ display: none; }

/* Brand picker panel (#mb-monthly-brand-picker; JS toggles its display) */
.mb-rp .mb-brand-picker{
  background: #fff; border-radius: 14px;
  border: 1px solid rgba(2,60,91,0.06);
  box-shadow: 0 8px 24px rgba(2,60,91,0.10);
  padding: 12px 16px 14px; margin: -6px 0 16px;
  max-height: 320px; overflow-y: auto;
}
.mb-rp .mb-brand-picker__head{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px; }
.mb-rp .mb-brand-picker__actions{ display:flex; gap:6px; }
.mb-rp .mb-brand-picker__opts{ display:flex; flex-wrap:wrap; gap:6px 14px; }
.mb-rp .mb-brand-opt{
  display:inline-flex; align-items:center; gap:6px;
  font-size:12px; font-weight:600; color: var(--ace-text); cursor:pointer;
  text-transform:none; letter-spacing:normal;
}
.mb-rp .mb-brand-opt input{ margin:0; accent-color: var(--ace-navy); cursor:pointer; }
.mb-rp .mb-brand-picker__loading{ font-size:12px; color: var(--ace-text-muted); }

/* ---- Callouts + meta strip ---- */
.mb-rp .mb-callout{
  background:#fff; border-radius: 12px;
  border: 1px solid rgba(2,60,91,0.06);
  box-shadow: inset 3px 0 0 var(--ace-navy), 0 4px 16px rgba(2,60,91,0.06);
  padding: 11px 16px; margin-bottom: 12px;
  font-size: 12px; line-height: 1.55; color: var(--ace-text-secondary);
}
.mb-rp .mb-callout strong{ color: var(--ace-navy); font-weight: 800; }
.mb-rp .mb-callout.warn{
  background: #fff8e6; color: #7a4715;
  box-shadow: inset 3px 0 0 var(--ace-amber), 0 4px 16px rgba(2,60,91,0.06);
}
.mb-rp .mb-callout.warn strong{ color: #7a4715; }
.mb-rp .mb-meta-strip{ display:flex; flex-wrap:wrap; align-items:center; gap: 8px; margin-bottom: 16px; }
.mb-rp .mb-stat{
  display:inline-flex; align-items:center; gap: 6px;
  font-size: 11px; font-weight: 600; color: var(--ace-text-secondary);
  background:#fff; border: 1px solid rgba(2,60,91,0.06); border-radius: 999px; padding: 4px 10px;
}
.mb-rp .mb-stat strong{ color: var(--ace-navy); font-weight: 800; font-variant-numeric: tabular-nums; }
.mb-rp .mb-foot{ font-size: 11px; line-height: 1.5; color: var(--ace-text-muted); margin: -6px 2px 16px; }
.mb-rp .mb-na{ color: var(--ace-text-muted); }

/* Controls strip / notes at the top of a section body, above its table */
.mb-rp .mb-sec-tools{
  display:flex; flex-wrap:wrap; align-items:center; gap: 8px 10px;
  padding: 12px 18px; border-bottom: 1px solid var(--ace-border); background:#fff;
}
.mb-rp .mb-sec-tools--chips{ gap: 6px; }
.mb-rp .mb-sec-note{
  padding: 9px 18px; font-size: 11px; font-weight: 600; color: var(--ace-text-muted);
  border-bottom: 1px solid var(--ace-border-soft);
}
.mb-rp .mb-pad{ padding: 16px 18px; }
.mb-rp .mb-sku-search{ flex: 1 1 260px; max-width: 420px; }
.mb-rp .rp-select.narrow{ min-width: 110px; }
.mb-rp .mb-sku-scroll{ max-height: 560px; }
.mb-rp .mb-sku-tbl{ min-width: 1080px; }

/* ---- Tables ---- */
.mb-rp .rp-tbl th, .mb-rp .rp-tbl td{ white-space: nowrap; }
.mb-rp .rp-tbl td.mb-strong{ font-weight: 800; color: var(--ace-navy); }
.mb-rp .rp-tbl td.mb-code{ font-family: var(--ace-font-mono); font-size: 12px; color: var(--ace-text-secondary); }
.mb-rp .rp-tbl tr.is-ours{ background: var(--ace-ice); }
.mb-rp .rp-tbl tr.is-ours:hover{ background: #d9f1fb; }
.mb-rp .rp-tbl tr.is-ours td{ color: var(--ace-navy); }
.mb-rp .rp-tbl tr.is-ours td:first-child{ box-shadow: inset 3px 0 0 var(--ace-blue); }
.mb-rp .mb-share{ display:inline-flex; align-items:center; justify-content:flex-end; gap: 8px; }
.mb-rp .mb-share .rp-mb{ width: 64px; }
.mb-rp .mb-share-v{ min-width: 44px; text-align: right; }

/* ---- Monthly trend (stacked bars) ---- */
.mb-rp .mb-trend{
  display:flex; align-items:flex-end; gap: 4px; height: 262px;
  padding: 14px 10px 0; background: var(--ace-surface-alt); border-radius: 12px;
}
.mb-rp .mb-trend .rp-empty{ flex: 1; }
.mb-rp .mb-trend-col{
  flex: 1 1 0; min-width: 0; height: 100%;
  display:flex; flex-direction:column; align-items:center; justify-content:flex-end;
}
.mb-rp .mb-trend-stack{
  width: 100%; max-width: 34px;
  display:flex; flex-direction:column; justify-content:flex-end;
  border-radius: 4px 4px 0 0; overflow: hidden;
}
.mb-rp .mb-trend-seg.str{ background: var(--ace-navy); }
.mb-rp .mb-trend-seg.cst{ background: var(--ace-blue); }
.mb-rp .mb-trend-seg.lic{ background: var(--ace-amber); }
.mb-rp .mb-trend-lbl{
  height: 30px; margin-top: 6px; text-align:center; line-height: 1.2;
  font-size: 10px; font-weight: 700; color: var(--ace-text-muted);
}
.mb-rp .mb-trend-lbl span{ display:block; font-weight: 600; opacity: .8; }
.mb-rp .mb-trend-legend{
  display:flex; flex-wrap:wrap; gap: 14px; margin-top: 12px;
  font-size: 11px; font-weight: 700; color: var(--ace-text-secondary);
}
.mb-rp .mb-trend-legend .sw{ display:inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: middle; margin-right: 5px; }
.mb-rp .mb-trend-legend .sw.str{ background: var(--ace-navy); }
.mb-rp .mb-trend-legend .sw.cst{ background: var(--ace-blue); }
.mb-rp .mb-trend-legend .sw.lic{ background: var(--ace-amber); }
.mb-rp .mb-trend-note{ margin-top: 6px; font-size: 11px; color: var(--ace-text-muted); }

@media(max-width: 640px){
  .mb-rp .rp-divider{ display: none; }
  .mb-rp .mb-sec-tools{ padding: 10px 14px; }
  .mb-rp .mb-sku-search{ max-width: 100%; }
  .mb-rp .mb-trend{ gap: 2px; padding: 12px 6px 0; }
}

/* ============================================================
   BC dashboards (/bc/dashboard, /bc/dashboard-monthly and their /kdp twins)
   Page skin on top of the shell above. The collapse behaviour is still
   bc-helpers' bindBcSectionToggles: a click on [data-bc-section-toggle] flips
   the inline display of [data-bc-section-body] and writes + / − into
   [data-bc-toggle-btn]. These rules only dress those hooks.
   ============================================================ */
.bc-rp .rp-filter{ row-gap: 10px; }
.bc-rp .rp-fgroup .rp-divider{ margin: 0 2px; }
/* Channel chip removed from the selection. */
.bc-rp .rp-chip.is-off{ color: var(--ace-text-muted); text-decoration: line-through; }
.bc-rp .rp-chip.is-off:hover{ text-decoration: none; }
.bc-rp .rp-select:disabled{ opacity: .5; cursor: default; }
.bc-rp .bc-rp-na{ color: var(--ace-text-muted); }

/* Week-range inputs. flatpickr binds to the two inputs directly (altInput
   off), so the inputs keep their ids and only the wrapper is dressed. */
.bc-rp .bc-rp-date{
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0 12px; border-radius: 8px;
  background: var(--ace-surface-hover); border: 1px solid transparent;
  color: var(--ace-text-muted);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.bc-rp .bc-rp-date:hover, .bc-rp .bc-rp-date:focus-within{
  background: #fff; border-color: var(--ace-blue); box-shadow: 0 0 0 3px rgba(90,200,242,.22);
}
.bc-rp .bc-rp-date input{
  width: 118px; padding: 7px 0; border: 0; background: transparent; outline: 0;
  font: inherit; font-size: 13px; font-weight: 700; color: var(--ace-navy); cursor: pointer;
}
.bc-rp .bc-rp-date input::placeholder{ color: var(--ace-text-muted); font-weight: 600; }
.bc-rp .bc-rp-date .arrow{ font-size: 12px; }

/* Checkbox dressed as a chip (Innovation only). */
.bc-rp .bc-rp-toggle{
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 9px; border-radius: 999px;
  background: var(--ace-surface-hover); color: var(--ace-text-secondary);
  font-size: 12px; font-weight: 700; cursor: pointer; user-select: none;
}
.bc-rp .bc-rp-toggle:hover{ color: var(--ace-navy); }
.bc-rp .bc-rp-toggle.is-on{ background: var(--ace-navy); color: #fff; }
.bc-rp .bc-rp-toggle input{ width: 14px; height: 14px; margin: 0; accent-color: var(--ace-navy); cursor: pointer; }
.bc-rp .bc-rp-toggle.is-on input{ accent-color: var(--ace-blue); }

/* Inline hints; --full takes its own line inside the filter bar. */
.bc-rp .bc-rp-hint{ font-size: 11px; line-height: 1.5; color: var(--ace-text-muted); }
.bc-rp .bc-rp-hint--full{ flex-basis: 100%; }

/* Brand multi-select panel. Its display is toggled inline by the view. */
.bc-rp .bc-rp-picker{
  background: #fff; border-radius: 14px; padding: 12px 16px; margin: -6px 0 16px;
  border: 1px solid rgba(2,60,91,0.06); box-shadow: 0 4px 16px rgba(2,60,91,0.06);
  max-height: 280px; overflow-y: auto;
}
.bc-rp .bc-rp-picker-head{ display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.bc-rp .bc-rp-picker-actions{ display: inline-flex; gap: 6px; }
.bc-rp .bc-rp-picker-list label{
  display: inline-flex; align-items: center; gap: 6px; margin: 3px 14px 3px 0;
  font-size: 12px; font-weight: 600; color: var(--ace-text); cursor: pointer;
}
.bc-rp .bc-rp-picker-list input{ margin: 0; accent-color: var(--ace-navy); cursor: pointer; }

/* Window pill above the KPI row. */
.bc-rp .bc-rp-window{ margin-bottom: 12px; }

/* Controls strip at the top of a flush card (Top Products search). */
.bc-rp .bc-rp-tools{
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  padding: 12px 18px; border-bottom: 1px solid var(--ace-border);
}
.bc-rp .bc-rp-tools .rp-search{ flex: 0 1 380px; }

/* Footnote and load-more under a flush table. */
.bc-rp .bc-rp-foot{ padding: 10px 18px 12px; font-size: 11px; line-height: 1.5; color: var(--ace-text-muted); border-top: 1px solid var(--ace-border-soft); }
.bc-rp .bc-rp-more{ text-align: center; padding: 12px 18px 4px; }

/* Movers: two tables side by side inside a padded body. */
.bc-rp .bc-rp-subh{ margin-bottom: 8px; }
.bc-rp .bc-rp-movers .rp-tw{ border: 1px solid var(--ace-border-soft); border-radius: 10px; }

/* Trend bars: one .bc-rp-bar per week or month, height set inline. */
.bc-rp .bc-rp-bars{
  display: flex; align-items: flex-end; padding: 8px 6px 0;
  background: var(--ace-surface-alt); border-radius: 10px; margin-bottom: 8px;
}
.bc-rp .bc-rp-bar{ flex: 1; min-width: 0; text-align: center; }
.bc-rp .bc-rp-bar > span{ display: block; margin: 0 1px; border-radius: 3px 3px 0 0; background: var(--ace-blue); }
.bc-rp .bc-rp-bar > span.in-window{ background: var(--ace-navy); }
.bc-rp .bc-rp-bar > span.is-out{ background: var(--ace-amber); }
.bc-rp .bc-rp-bar > span.is-strike{ background: var(--ace-critical); }
.bc-rp .bc-rp-bars--labeled .bc-rp-bar > span{ margin: 0 2px; }
.bc-rp .bc-rp-bar > b{
  display: block; height: 40px; margin-top: 4px;
  font-size: 9px; font-weight: 600; color: var(--ace-text-muted);
  writing-mode: vertical-rl; transform: rotate(180deg);
}

/* KDP portal: kdp-mode.js already hides the preset chips and the brand picker;
   this drops the Portfolio label and its divider with them. */
body.kdp-mode .bc-rp .bc-rp-portfolio{ display: none !important; }

@media (max-width: 640px){
  .bc-rp .bc-rp-date{ width: 100%; }
  .bc-rp .bc-rp-date input{ width: 0; flex: 1; }
  .bc-rp .bc-rp-tools .rp-search{ flex-basis: 100%; }
}


/* /volume-estimations page-scoped bits (2026-09-28).
   The page itself is plain rp-* (band / filter / kpi / card / tbl / note).
   Only these three have no shared equivalent. */
.volest-rp .volest-dim{ color: var(--ace-text-secondary); }
.volest-rp .volest-est{
  font-size: 9px; font-weight: 800; letter-spacing: .3px;
  color: #7a5c00; background: #fff8e6; border: 1px solid #f0d999;
  border-radius: 4px; padding: 0 4px; vertical-align: middle;
  cursor: help;
}
.volest-rp .rp-kpi .volest-est{ background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.3); color: inherit; }
.volest-rp .volest-total td{
  border-top: 2px solid var(--ace-navy);
  background: var(--ace-surface-hover);
  color: var(--ace-navy);
}
/* Wide tables scroll inside the card rather than blowing out the page. */
.volest-rp .rp-card-body{ overflow-x: auto; }

/* /territory/gc page-scoped bits (2026-09-28). Same port: the page is plain
   rp-*, and .dash-section stays alongside .rp-card because the collapse
   behaviour keys off .dash-section / .dash-toggle / .is-collapsed. */
.gc-rp .gc-scroll{ overflow-x: auto; }
.gc-rp .rp-card-body{ overflow-x: auto; }
