/* ─── Orders page: Sales pulse (assets/js/sales-pulse.js) ─────────────── */
.sp { display: flex; flex-direction: column; gap: 12px; }
.sp .is-loading { opacity: .55; transition: opacity .2s; }
.sp-error { padding: 20px; color: var(--text-muted); }

/* filters: the Product Revenue card's, in one row */
.sp-filters {
  display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: flex-end;
  padding: 12px 16px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: 12px;
}
.sp-fgroup { display: flex; flex-direction: column; gap: 6px; }
.sp-flabel { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .03em; }
.sp-filters .multiselect-trigger { min-width: 170px; }
.sp-reset { align-self: flex-end; margin-bottom: 6px; }
/* the trend card's own filters, inside its body */
.sp-filters.is-inline { padding: 10px 12px; background: var(--bg-surface-2); border: 1px solid var(--border-subtle); border-radius: 10px; }

/* ── 1. month-to-date bands ── */
.sp-bands { display: flex; flex-direction: column; gap: 10px; }
.sp-band {
  --tone: var(--info);
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
}
.sp-band.tone-warning { --tone: var(--warning); }
.sp-band.tone-success { --tone: var(--success); }
.sp-band.tone-purple { --tone: var(--purple); }
.sp-band.is-skel { height: 128px; background: var(--bg-surface-2); }
.sp-band-h {
  display: flex; align-items: center; gap: 10px; padding: 11px 18px 10px;
  border-bottom: 1px solid var(--border-subtle);
}
.sp-band-h i { width: 8px; height: 8px; border-radius: 50%; background: var(--tone); flex-shrink: 0; }
.sp-band-h span { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); white-space: nowrap; }
.sp-band-h small { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.sp-band-h b { flex: 1; height: 2px; border-radius: 2px; background: var(--tone); opacity: .85; }

.sp-tiles { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); }
.sp-tile { padding: 12px 16px 13px; border-left: 1px solid var(--border-subtle); min-width: 0; }
.sp-tile:first-child { border-left: 0; }
/* revenue | orders | customers: a stronger line between the three groups */
.sp-tile.is-total:not(:first-child) { border-left: 1px solid var(--border); }
.sp-tile.is-total .sp-tile-v { font-size: 22px; }
.sp-band.is-cur .sp-tile.is-total .sp-tile-v { color: var(--tone); }
.sp-tile-l {
  display: flex; align-items: center; gap: 6px; min-height: 18px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: var(--text-muted);
}
.sp-tile-l > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: inline-flex; align-items: center; gap: 5px; }
.sp-tile-v { display: flex; align-items: baseline; gap: 7px; margin-top: 4px; font-size: 19px; font-weight: 800; color: var(--text-primary); letter-spacing: -0.01em; white-space: nowrap; }
.sp-tile-n { margin-top: 2px; font-size: 11.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sp-chip { flex-shrink: 0; font-size: 11px; font-weight: 800; letter-spacing: 0; }
.sp-chip.is-up { color: var(--success); }
.sp-chip.is-down { color: var(--danger); }
.sp-chip.is-flat { color: var(--text-muted); }

.sp-key, .sp-nr i { display: inline-block; width: 7px; height: 7px; border-radius: 2px; flex-shrink: 0; }
.sp-key.is-new, .sp-nr i.is-new { background: #2a78d6; }   /* the trend chart's new / repeat (sales-pulse.js PAL) */
.sp-key.is-repeat, .sp-nr i.is-repeat { background: #1baf7a; }
.sp-nr i { margin-right: 3px; vertical-align: 0; }

.sp-legend { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: -2px; font-size: 11.5px; color: var(--text-muted); }
.sp-legend span { display: inline-flex; align-items: center; gap: 5px; }

@media (max-width: 1500px) {
  .sp-tile { padding: 11px 12px 12px; }
  .sp-tile-v { font-size: 17px; }
  .sp-tile.is-total .sp-tile-v { font-size: 19px; }
  .sp-tile-v { flex-wrap: wrap; row-gap: 0; }
}
@media (max-width: 1100px) {
  .sp-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sp-tile.is-total { border-left: 0 !important; }
  .sp-tile:nth-child(n+4) { border-top: 1px solid var(--border-subtle); }
}

/* ── 2. trend card ── */
.sp-trend { margin: 0; }
.sp-trend.is-skel { height: 420px; background: var(--bg-surface-2); }
.sp-trend .card-body { display: flex; flex-direction: column; gap: 12px; }
.sp-tctrl { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: flex-end; }
.sp-range { margin-left: auto; }
.sp-chart { position: relative; height: 340px; }
.sp-chart.is-stale { opacity: .55; }
.sp-chart-wait { display: flex; align-items: center; justify-content: center; }
.sp-verdict { margin-left: 10px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; vertical-align: 1px; }
.sp-verdict.is-up { color: var(--success); background: var(--success-bg); }
.sp-verdict.is-down { color: var(--danger); background: var(--danger-bg); }

/* ── the bands inside the dark box (MTD view) ── */
.ov-hero .sp-bands { gap: 8px; }
.ov-hero .sp-band {
  --tone: #8FB8C2;
  background: rgba(255, 255, 255, 0.045);
  border-color: var(--hero-line);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.ov-hero .sp-band.tone-warning { --tone: #F0B341; }
.ov-hero .sp-band.tone-success { --tone: #5CD6B1; }
.ov-hero .sp-band.tone-purple { --tone: #B79CFF; }
.ov-hero .sp-band.is-skel { background: rgba(255, 255, 255, 0.06); }
.ov-hero .sp-band-h { border-bottom-color: var(--hero-line); }
.ov-hero .sp-band-h span { color: var(--hero-ink-2); }
.ov-hero .sp-band-h small { color: var(--hero-ink-3); }
.ov-hero .sp-tile { padding: 11px 12px 12px; border-left-color: var(--hero-line); }
.ov-hero .sp-tile.is-total:not(:first-child) { border-left-color: rgba(255, 255, 255, 0.2); }
.ov-hero .sp-tile-l { color: var(--hero-ink-3); }
.ov-hero .sp-tile-v { color: var(--hero-ink); }
.ov-hero .sp-band.is-cur .sp-tile.is-total .sp-tile-v { color: var(--tone); }
.ov-hero .sp-tile-n { color: var(--hero-ink-3); }
.ov-hero .sp-chip.is-up { color: #7FE3C6; }
.ov-hero .sp-chip.is-down { color: #FFA3A3; }
.ov-hero .sp-chip.is-flat { color: var(--hero-ink-3); }
.ov-hero .sp-key.is-new { background: #3987e5; }
.ov-hero .sp-key.is-repeat { background: #199e70; }
.ov-hero .sp-legend { margin-top: 10px; color: var(--hero-ink-3); }
.ov-hero .sp-error { color: var(--hero-ink-2); }
@media (max-width: 1100px) {
  .ov-hero .sp-tile:nth-child(n+4) { border-top-color: var(--hero-line); }
}
