/* ============================================================================
   Sales reports (owner dashboard) — shared styles for /reports/sales/*
   Builds on report.css (cards, stat tiles, sections). Pill buttons + card lists
   are the house style (small text, minimal). Breakpoints: mobile <768,
   tablet 768–1199, desktop ≥1200 (site.css convention).
   ============================================================================ */

.sr-page { display: flex; flex-direction: column; gap: 1rem; }
.sr-page > .page-hero-header, .sds-page > .page-hero-header { margin-bottom: .25rem; } /* the flex gap already spaces it */

/* ---- Title row + sub-navigation pills ---- */
.sr-title { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.sr-title h4 { margin: 0; font-weight: 700; }
/* Info chips inside the photo hero (PageHeader ChildContent) — translucent over the picture */
.page-hero-header .sr-hero-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.page-hero-inner .row .col > .sr-hero-chips, .page-hero-inner > .sr-hero-chips { margin-top: .7rem; }
.page-hero-header .sr-chip {
    background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.28); backdrop-filter: blur(6px); text-shadow: 0 1px 4px rgba(0,0,0,.5);
}
.page-hero-header .sr-chip.live { background: rgba(25,135,84,.45); }
.sr-chip {
    display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .65rem; border-radius: 999px;
    font-size: .74rem; font-weight: 600; background: rgba(108,117,125,.12); color: var(--text-secondary, #6c757d);
    white-space: nowrap;
}
.sr-chip.good { background: rgba(25,135,84,.12); color: #198754; }
.sr-chip.bad { background: rgba(220,53,69,.12); color: #dc3545; }

.sr-nav { display: flex; flex-wrap: wrap; gap: .4rem; }
.sr-nav a, .sr-nav span.soon {
    display: inline-flex; align-items: center; gap: .35rem; min-height: 34px; padding: .3rem .9rem; border-radius: 999px;
    border: 1px solid var(--surface-border, #dee2e6); background: transparent; color: var(--text-secondary, #6c757d);
    font-size: .78rem; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background .15s, color .15s;
}
.sr-nav a:hover { background: rgba(108,117,125,.1); color: var(--text-primary, #212529); }
.sr-nav a.active { background: rgba(33,37,41,.92); border-color: transparent; color: #fff; }
.sr-nav span.soon { opacity: .5; cursor: default; }
.sr-nav .sr-nav-right { margin-left: auto; }
[data-theme="dark"] .sr-nav a { border-color: rgba(255,255,255,.18); color: rgba(255,255,255,.75); }
[data-theme="dark"] .sr-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
[data-theme="dark"] .sr-nav a.active { background: rgba(255,255,255,.9); color: #111; }

/* ---- Pill buttons (same recipe as SalesDataSettings .sds-btn) ---- */
.sr-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
    min-height: 40px; padding: .35rem 1rem; border-radius: 999px;
    border: 1px solid var(--surface-border, #dee2e6); background: transparent;
    color: var(--text-secondary, #6c757d); font-size: .8rem; font-weight: 600; line-height: 1;
    white-space: nowrap; cursor: pointer; transition: background .15s, color .15s, border-color .15s; text-decoration: none;
}
.sr-btn:hover:not(:disabled) { background: rgba(108,117,125,.1); color: var(--text-primary, #212529); }
.sr-btn:disabled { opacity: .45; cursor: not-allowed; }
.sr-btn.primary { background: rgba(33,37,41,.92); border-color: transparent; color: #fff; }
.sr-btn.primary:hover:not(:disabled) { background: rgba(33,37,41,1); color: #fff; }
.sr-btn.active { background: rgba(33,37,41,.92); border-color: transparent; color: #fff; }
.sr-btn.icon { width: 40px; padding: 0; }
.sr-btn.sm { min-height: 30px; padding: .25rem .8rem; font-size: .74rem; }
[data-theme="dark"] .sr-btn { border-color: rgba(255,255,255,.18); color: rgba(255,255,255,.75); }
[data-theme="dark"] .sr-btn:hover:not(:disabled) { background: rgba(255,255,255,.08); color: #fff; }
[data-theme="dark"] .sr-btn.primary, [data-theme="dark"] .sr-btn.active { background: rgba(255,255,255,.9); color: #111; }

/* ---- Control rows (period pickers): every control on the same 40px rhythm ---- */
.sr-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .75rem 1rem; }
.sr-field { display: flex; flex-direction: column; gap: .3rem; }
.sr-field > label { margin: 0; font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-secondary, #6c757d); white-space: nowrap; }
.sr-field .form-control, .sr-field .form-select { min-height: 40px; width: 170px; }
.sr-field.actions > label { visibility: hidden; }
.sr-btns { display: flex; flex-wrap: wrap; gap: .4rem; }
.sr-controls .sr-right { margin-left: auto; display: flex; gap: .5rem; flex-wrap: wrap; align-items: flex-end; }
.sr-period { font-size: .85rem; color: var(--text-secondary, #6c757d); display: inline-flex; align-items: center; min-height: 40px; }

/* ---- Wide content scrolls inside its container, never the page ---- */
.sr-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.sr-scroll > table { min-width: max-content; }

/* (Stat-tile icon/label rules moved to report.css — global for every report, 2026-09-10.) */

/* ---- Comparison tables ---- */
.sr-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .86rem; }
.sr-table th, .sr-table td { padding: .55rem .75rem; white-space: nowrap; vertical-align: middle; border-bottom: 1px solid var(--surface-border, #e9ecef); }
.sr-table th { font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-secondary, #6c757d); font-weight: 600; }
.sr-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.sr-table tr.total td { font-weight: 700; border-top: 2px solid var(--surface-border, #dee2e6); }
.sr-table tr.muted td { color: var(--text-secondary, #6c757d); }
.sr-table tr.current td { background: rgba(25,135,84,.06); }
.sr-table tr.actual td { font-weight: 700; }
.sr-table tbody tr:last-child td { border-bottom: 0; }
.sr-pos { color: #198754; font-weight: 600; }
.sr-neg { color: #dc3545; font-weight: 600; }
.sr-dim { color: var(--text-secondary, #6c757d); }
.sr-src { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-left: .35rem; vertical-align: middle; background: #2f855a; }
.sr-src.excel { background: #a87b0b; }
.sr-src.none { background: rgba(108,117,125,.35); }
.sr-legend { display: flex; flex-wrap: wrap; gap: .35rem 1rem; font-size: .74rem; color: var(--text-secondary, #6c757d); }

/* ---- Card rows (replace tables): title · stat grid · actions, hairline dividers ---- */
.sr-rows { display: flex; flex-direction: column; }
.sr-row {
    display: grid; grid-template-columns: minmax(170px, 1.2fr) minmax(0, 4.2fr) auto; align-items: center;
    gap: .35rem 1rem; padding: .6rem 1.25rem; border-top: 1px solid var(--surface-border, #e9ecef);
}
.sr-row:first-child { border-top: 0; }
.sr-row.divider { border-top: 2px solid var(--surface-border, #dee2e6); }
.sr-row.total { border-top: 2px solid var(--surface-border, #dee2e6); background: rgba(108,117,125,.06); }
.sr-row.total .sr-stat strong, .sr-row.total .sr-row-title .t { font-weight: 800; }
.sr-row.current { background: rgba(25,135,84,.06); }
.sr-row.muted .sr-row-title, .sr-row.muted .sr-stat strong { color: var(--text-secondary, #6c757d); font-weight: 500; }
.sr-row.actual .sr-row-title .t { font-weight: 800; }
.sr-row-title { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.sr-row-title .t { font-weight: 700; line-height: 1.3; }
.sr-row-title .t .sr-chip, .sr-row-title .t .sr-src { vertical-align: middle; margin-left: .4rem; }
.sr-row-title .t .sr-chip { vertical-align: 1px; }
.sr-row-title .s { font-size: .74rem; color: var(--text-secondary, #6c757d); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-row-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: .35rem .8rem; min-width: 0; }
.sr-row-stats.n6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.sr-row-stats.n7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.sr-row-stats.n8 { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.sr-stat { display: flex; flex-direction: column; align-items: flex-end; min-width: 0; }
.sr-stat span { font-size: .6rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-secondary, #6c757d); white-space: nowrap; }
.sr-stat strong { font-size: .88rem; font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.sr-stat strong.sr-pos { color: #198754; } .sr-stat strong.sr-neg { color: #dc3545; } .sr-stat strong.sr-dim { color: var(--text-secondary, #6c757d); font-weight: 500; }
.sr-row-actions { display: flex; gap: .35rem; justify-content: flex-end; }
.sr-row-inline { grid-column: 1 / -1; }
.sr-rows .report-empty { padding: 1.5rem; }

/* ---- Chart grid ---- */
.sr-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.sr-charts .span-2 { grid-column: 1 / -1; }
.sr-chart-note { font-size: .74rem; color: var(--text-secondary, #6c757d); margin: .25rem 0 0; }

/* ---- Insights card ---- */
/* Flat rows with hairline dividers — never a box inside the card. */
.sr-insights { display: flex; flex-direction: column; }
.sr-insight { display: flex; align-items: flex-start; gap: .65rem; padding: .55rem 0; font-size: .86rem; border-top: 1px solid var(--surface-border, #e9ecef); }
.sr-insight:first-child { border-top: 0; padding-top: 0; }
.sr-insight:last-child { padding-bottom: 0; }
.sr-insight i { font-size: 1rem; margin-top: .05rem; color: var(--text-secondary, #6c757d); }
.sr-insight.good i { color: #198754; }
.sr-insight.bad i { color: #dc3545; }

/* ---- Flat KPIs inside a section (SrKpi) — no tiles, no nested cards ---- */
.sr-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .9rem 1.5rem; }
.sr-kpi { display: flex; gap: .6rem; align-items: flex-start; min-width: 0; }
.sr-kpi > i { font-size: 1.15rem; line-height: 1.2; color: var(--text-secondary, #6c757d); margin-top: .1rem; }
.sr-kpi > i.sr-pos { color: #198754; } .sr-kpi > i.sr-neg { color: #dc3545; }
.sr-kpi-body { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.sr-kpi-body strong { font-size: 1.35rem; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.sr-kpi-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-secondary, #6c757d); line-height: 1.25; }
.sr-kpi-sub { font-size: .74rem; color: var(--text-secondary, #6c757d); }
.sr-kpi-delta { font-size: .76rem; font-weight: 700; display: inline-flex; align-items: center; }
.sr-kpi-delta.sr-pos { color: #198754; } .sr-kpi-delta.sr-neg { color: #dc3545; }
@media (max-width: 767.98px) { .sr-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem .9rem; } .sr-kpi-body strong { font-size: 1.05rem; } .sr-kpi-label { font-size: .62rem; } .sr-kpi-sub, .sr-kpi-delta { font-size: .68rem; } }

/* ---- Two-up split (weekday / weekend, etc.) ---- */
.sr-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.sr-split.stack { grid-template-columns: 1fr; gap: .25rem; }
.sr-split .sr-rows { align-self: center; }
.sr-split .sr-row { padding-left: 0; padding-right: 0; grid-template-columns: minmax(110px, 1fr) minmax(0, 2fr); }

/* ---- Overview hero infographic ---- */
.sr-hero { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.sr-hcard {
    background: var(--surface-card, #fff); border: 1px solid var(--surface-border, #e9ecef); border-radius: var(--radius-lg, 16px);
    box-shadow: var(--shadow-xs, 0 1px 2px rgba(0,0,0,.04)); padding: 1rem 1.25rem; display: flex; flex-direction: column; gap: .55rem; min-width: 0;
}
.sr-hcard.span-2 { grid-column: span 2; }
.sr-hcard.year { grid-column: 1 / -1; }
.sr-hcard.year .sr-hero-row { align-items: center; }
.sr-hcard.center { align-items: center; text-align: center; }
.sr-hcard-head { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.sr-hlabel { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-secondary, #6c757d); }
.sr-hsub { font-size: .76rem; color: var(--text-secondary, #6c757d); }
.sr-hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.sr-hero-num { font-size: 3rem; font-weight: 700; line-height: 1; letter-spacing: -.02em; }
.sr-big { font-size: 1.7rem; font-weight: 700; line-height: 1.1; letter-spacing: -.01em; }
.sr-big.xl { font-size: 2.4rem; }
.sr-hero-deltas { display: flex; flex-direction: column; align-items: flex-end; gap: .2rem; text-align: right; }
.sr-delta { display: inline-flex; align-items: center; gap: .3rem; font-weight: 700; font-size: .95rem; }
.sr-delta small { font-weight: 500; font-size: .74rem; color: var(--text-secondary, #6c757d); }
.sr-delta.up { color: #198754; }
.sr-delta.down { color: #dc3545; }
/* meters: same-ramp track (light green under green); "behind" swaps the ramp to amber */
.sr-meter-wrap { display: flex; flex-direction: column; gap: .35rem; }
.sr-meter-labels { display: flex; justify-content: space-between; gap: .75rem; font-size: .8rem; flex-wrap: wrap; }
.sr-meter { position: relative; height: 12px; border-radius: 999px; background: rgba(47,133,90,.16); overflow: visible; }
.sr-meter-fill { height: 100%; border-radius: 999px; background: #2f855a; transition: width .4s ease; }
.sr-meter.behind { background: rgba(168,123,11,.16); }
.sr-meter.behind .sr-meter-fill { background: #a87b0b; }
.sr-meter-tick { position: absolute; top: -4px; width: 2px; height: 20px; border-radius: 1px; transform: translateX(-1px); }
.sr-meter-tick.pace { background: rgba(33,37,41,.85); }
.sr-meter-tick.proj { background: #3d8bfd; }
.sr-meter-tick.goal { background: rgba(33,37,41,.85); }
.sr-meter-legend { display: flex; flex-wrap: wrap; gap: .35rem 1rem; font-size: .72rem; color: var(--text-secondary, #6c757d); }
.sr-meter-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.sr-key { display: inline-block; width: 12px; height: 8px; border-radius: 999px; background: #2f855a; }
.sr-key.tick { width: 2px; height: 12px; border-radius: 1px; }
.sr-key.tick.pace, .sr-key.tick.goal { background: rgba(33,37,41,.85); }
.sr-key.tick.proj { background: #3d8bfd; }
/* bullet (projection vs goal) */
.sr-bullet { position: relative; height: 10px; border-radius: 999px; background: rgba(61,139,253,.16); margin-top: .25rem; }
.sr-bullet-fill { height: 100%; border-radius: 999px; background: #3d8bfd; }
.sr-bullet-fill.short { background: #a87b0b; }
.sr-bullet + .sr-meter-legend { justify-content: space-between; }
/* radial meter */
.sr-ring { position: relative; width: 150px; height: 150px; }
.sr-ring svg { width: 100%; height: 100%; }
.sr-ring circle { fill: none; stroke-width: 11; }
.sr-ring circle.track { stroke: rgba(47,133,90,.16); }
.sr-ring circle.fill { stroke: #2f855a; stroke-linecap: round; transition: stroke-dasharray .5s ease; }
.sr-ring.behind circle.track { stroke: rgba(168,123,11,.16); }
.sr-ring.behind circle.fill { stroke: #a87b0b; }
.sr-ring.done circle.fill { stroke: #198754; }
.sr-ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem; }
.sr-ring-num { font-size: 1.75rem; font-weight: 700; line-height: 1; letter-spacing: -.01em; }
/* pace bars */
.sr-pace { display: flex; flex-direction: column; gap: .5rem; }
.sr-pace-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: .6rem; font-size: .8rem; }
.sr-pace-row strong { font-variant-numeric: tabular-nums; }
.sr-pace-bar { height: 10px; border-radius: 999px; background: rgba(108,117,125,.14); overflow: hidden; }
.sr-pace-fill { height: 100%; border-radius: 999px; }
.sr-pace-fill.req { background: rgba(33,37,41,.6); }
.sr-pace-fill.cur { background: #2f855a; }
.sr-pace-fill.cur.short { background: #a87b0b; }
/* mini bars + sparkline */
.sr-minibars { display: flex; align-items: flex-end; gap: 4px; height: 40px; margin-top: .25rem; }
.sr-minibar { flex: 1 1 0; min-width: 6px; border-radius: 3px 3px 0 0; background: rgba(47,133,90,.35); }
.sr-minibar.last { background: #2f855a; }
.sr-spark { width: 100%; height: 40px; margin-top: .25rem; }
.sr-spark polyline { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.sr-spark polyline.cur { stroke: #2f855a; }
.sr-spark polyline.ly { stroke: #3d8bfd; opacity: .7; }
.sr-year-facts { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.sr-year-facts div { display: flex; flex-direction: column; gap: .1rem; }
.sr-year-facts strong { font-size: 1rem; }
[data-theme="dark"] .sr-hcard { background: var(--surface-card, #23262a); border-color: rgba(255,255,255,.1); }
[data-theme="dark"] .sr-meter-tick.pace, [data-theme="dark"] .sr-meter-tick.goal, [data-theme="dark"] .sr-key.tick.pace, [data-theme="dark"] .sr-key.tick.goal { background: rgba(255,255,255,.8); }
[data-theme="dark"] .sr-pace-fill.req { background: rgba(255,255,255,.45); }

/* ---- Monthly hero extras: horizontal comparison bars, stacked bullet, facts, month pills ---- */
.sr-hbars { display: flex; flex-direction: column; gap: .55rem; }
.sr-hbar-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: .6rem; font-size: .82rem; }
.sr-hbar-row .lbl { color: var(--text-secondary, #6c757d); font-weight: 600; }
.sr-hbar-row .bar { position: relative; height: 14px; border-radius: 999px; background: rgba(108,117,125,.12); }
.sr-hbar-row .fill { height: 100%; border-radius: 999px; background: rgba(61,139,253,.55); }
.sr-hbar-row.cur .fill { background: #2f855a; }
.sr-hbar-row strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.sr-bullet.stacked { height: 14px; background: rgba(47,133,90,.12); }
.sr-bullet.stacked .sr-bullet-fill { position: absolute; left: 0; top: 0; }
.sr-bullet.stacked .sr-bullet-fill.proj { background: rgba(47,133,90,.35); }
.sr-bullet.stacked .sr-bullet-fill.actual { background: #2f855a; }
.sr-key.fill.light { background: rgba(47,133,90,.35); }
.sr-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem 1rem; }
.sr-fact { display: flex; align-items: flex-start; gap: .6rem; }
.sr-fact i { font-size: 1.05rem; color: var(--text-secondary, #6c757d); margin-top: .1rem; }
.sr-fact div { display: flex; flex-direction: column; gap: .05rem; min-width: 0; }
.sr-fact strong { font-size: .92rem; }
.sr-months { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .25rem; }
.sr-month-pill { display: inline-flex; align-items: center; min-height: 26px; padding: .15rem .6rem; border-radius: 999px; font-size: .72rem; font-weight: 600; background: rgba(108,117,125,.12); color: var(--text-secondary, #6c757d); }
.sr-month-pill.hit { background: rgba(47,133,90,.16); color: #2f855a; }
.sr-month-pill.miss { background: rgba(168,123,11,.16); color: #a87b0b; }
.sr-month-pill.cur { background: rgba(33,37,41,.85); color: #fff; }
.sr-key.pill { width: 12px; height: 12px; border-radius: 50%; }
.sr-key.pill.hit { background: rgba(47,133,90,.6); }
.sr-key.pill.miss { background: rgba(168,123,11,.6); }
.sr-key.pill.cur { background: rgba(33,37,41,.85); }
@media (max-width: 767.98px) { .sr-facts { grid-template-columns: 1fr; } }

/* ---- Breakpoints ---- */
@media (max-width: 767.98px) {
    .sr-charts, .sr-split { grid-template-columns: 1fr; }
    .sr-row { grid-template-columns: 1fr; }
    .sr-row-stats, .sr-row-stats.n6, .sr-row-stats.n7, .sr-row-stats.n8 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .sr-stat { align-items: flex-start; }
    .sr-row-actions { justify-content: flex-start; }
    /* Buttons stay on one line: smaller text + padding, never wrapped text */
    .sr-btn, .sr-nav a, .sr-nav span.soon { font-size: .72rem; padding: .3rem .75rem; min-height: 36px; }
    .sr-btn.sm { min-height: 28px; padding: .2rem .6rem; font-size: .7rem; }
    .sr-btn.icon { width: 36px; }
    .sr-field, .sr-field.actions { width: 100%; }
    .sr-btns { width: 100%; }
    .sr-title h4 { font-size: 1.15rem; }
    /* Type scale: everything one step smaller than desktop */
    .sr-row { padding: .5rem .9rem; gap: .3rem .6rem; }
    .sr-row-title .t { font-size: .88rem; }
    .sr-row-title .s { font-size: .68rem; }
    .sr-row-stats { gap: .3rem .6rem; }
    .sr-stat span { font-size: .54rem; letter-spacing: .04em; }
    .sr-stat strong { font-size: .8rem; }
    .sr-chip { font-size: .64rem; padding: .12rem .45rem; }
    .sr-field label { font-size: .6rem; }
    .sr-field .form-control, .sr-field .form-select { font-size: .88rem; }
    .sr-controls .sr-period, .sr-legend, .sr-chart-note { font-size: .7rem; }
    .sr-insight { font-size: .8rem; }
    .sr-big { font-size: 1.4rem; }
    .sr-big.xl { font-size: 1.9rem; }
    .sr-hcard { padding: .85rem 1rem; }
    .sr-hero { grid-template-columns: 1fr; }
    .sr-hcard.span-2, .sr-hcard.year { grid-column: span 1; }
    .sr-hero-num { font-size: 1.9rem; }
    .sr-field .form-control, .sr-field .form-select { width: 100%; }
    .sr-controls .sr-right { margin-left: 0; width: 100%; }
    .sr-nav .sr-nav-right { margin-left: 0; }
}
@media (min-width: 768px) and (max-width: 1199.98px) {
    .sr-charts { grid-template-columns: 1fr; }
    .sr-row-stats.n6, .sr-row-stats.n7, .sr-row-stats.n8 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .sr-hero { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ════ Overview hero (2026-09-26 redesign) — `ov-*`, used only by SalesOverviewHero ════
   Row 1: Month to date (3 cols) + Daily pace.  Row 2: Latest day · Last 7 days · Year to date (2 cols).
   Flat cards (solid + hairline), thick goal bars with a hatched projection run-up and a labeled
   "expected today" pin; deltas are chips; status = icon + label. */
.ov-hero {
    --ov-green: #2f855a;
    --ov-green-soft: rgba(47, 133, 90, 0.14);
    --ov-amber: #b45309;
    --ov-track: rgba(15, 23, 42, 0.07);
    --ov-divider: rgba(15, 23, 42, 0.08);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}
[data-theme="dark"] .ov-hero {
    --ov-green: #3aa46e;
    --ov-green-soft: rgba(58, 164, 110, 0.18);
    --ov-amber: #f0a752;
    --ov-track: rgba(255, 255, 255, 0.08);
    --ov-divider: rgba(255, 255, 255, 0.08);
}
.ov-card {
    background: var(--surface-card, #fff);
    border: 1px solid var(--surface-border, #e5e7eb);
    border-radius: 0.9rem;
    padding: 1.15rem 1.3rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    min-width: 0;
}
.ov-mtd { grid-column: span 3; }
.ov-ytd { grid-column: span 2; }

.ov-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; }
.ov-label { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase; color: var(--text-secondary, #6b7280); }
.ov-context { font-size: 0.8rem; color: var(--text-muted, #9ca3af); font-variant-numeric: tabular-nums; }

.ov-figure-row { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem 0.9rem; }
.ov-figure-row.tight { margin-top: -0.25rem; }
.ov-figure { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.025em; line-height: 1.05; color: var(--text-heading); font-variant-numeric: tabular-nums; }
.ov-figure.lg { font-size: 2.3rem; }
.ov-figure.xl { font-size: 2.9rem; }

.ov-chip {
    display: inline-flex; align-items: center; gap: 0.3rem;
    padding: 0.2rem 0.65rem; border-radius: 999px;
    font-size: 0.85rem; font-weight: 800; font-variant-numeric: tabular-nums;
    background: var(--ov-track); color: var(--text-secondary);
}
.ov-chip small { font-size: 0.74rem; font-weight: 600; opacity: 0.8; }
.ov-chip i { font-size: 0.7rem; }
.ov-chip.up { background: rgba(25, 135, 84, 0.12); color: #157347; }
.ov-chip.down { background: rgba(220, 53, 69, 0.11); color: #c0392b; }
[data-theme="dark"] .ov-chip.up { background: rgba(74, 222, 128, 0.14); color: #4ade80; }
[data-theme="dark"] .ov-chip.down { background: rgba(248, 113, 113, 0.14); color: #f87171; }

/* Thick goal bar */
.ov-goal { position: relative; padding-top: 1.75rem; }
.ov-goalbar { position: relative; height: 26px; border-radius: 5px; background: var(--ov-track); overflow: hidden; }
.ov-goal-fill, .ov-goal-proj { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px 0 0 5px; }
.ov-goal-fill {
    background: var(--ov-green);
    display: flex; align-items: center; justify-content: flex-end; padding-right: 8px;
    z-index: 1;
}
.ov-goal-val { color: #fff; font-size: 0.74rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
/* Quarter ticks: faint notches so the eye can measure 25/50/75% */
.ov-goal-q { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--surface-card, #fff); opacity: 0.7; z-index: 2; }
.ov-goal-proj {
    background: repeating-linear-gradient(135deg, var(--ov-green-soft) 0 6px, transparent 6px 11px), var(--ov-green-soft);
}
.ov-goal-mark {
    position: absolute; top: 3px; bottom: 3px; width: 4px; margin-left: -2px;
    border-radius: 2px; background: var(--text-heading); z-index: 3;
    box-shadow: 0 0 0 2px var(--surface-card, #fff);
}
.ov-pin { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; pointer-events: none; }
.ov-pin span {
    position: relative; display: inline-block; padding: 0.1rem 0.5rem; border-radius: 4px;
    background: var(--text-heading); color: var(--surface-card, #fff);
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0.02em;
}
.ov-pin span::after {
    content: ""; position: absolute; left: 50%; bottom: -4px; margin-left: -4px;
    border: 4px solid transparent; border-top-color: var(--text-heading); border-bottom: 0;
}
.ov-scale { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; margin-top: 0.45rem; font-size: 0.74rem; color: var(--text-muted, #9ca3af); font-variant-numeric: tabular-nums; }
.ov-scale > span:last-child { font-weight: 700; color: var(--text-secondary); }
.ov-scale-legend { display: inline-flex; gap: 0.9rem; }
.ov-scale-legend > span { display: inline-flex; align-items: center; gap: 0.35rem; }
.ov-key { display: inline-block; width: 14px; height: 9px; border-radius: 2px; }
.ov-key.fill { background: var(--ov-green); }
.ov-key.proj { background: repeating-linear-gradient(135deg, rgba(47, 133, 90, 0.45) 0 3px, transparent 3px 5px), var(--ov-green-soft); }

/* Stat row under a meter: divided columns, no boxes */
.ov-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ov-divider); padding-top: 0.85rem; margin-top: 0.15rem; }
.ov-stat { display: flex; flex-direction: column; gap: 0.2rem; padding: 0 1rem; min-width: 0; }
.ov-stat:first-child { padding-left: 0; }
.ov-stat + .ov-stat { border-left: 1px solid var(--ov-divider); }
.ov-stat-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted, #9ca3af); }
.ov-stat-value { font-size: 1.2rem; font-weight: 800; color: var(--text-heading); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.ov-stat-note { font-size: 0.78rem; color: var(--text-secondary); font-weight: 600; }
.ov-stat-note.pos { color: #157347; }
.ov-stat-note.neg { color: #c0392b; }
[data-theme="dark"] .ov-stat-note.pos { color: #4ade80; }
[data-theme="dark"] .ov-stat-note.neg { color: #f87171; }
.ov-status { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.76rem; font-weight: 700; }
.ov-status.good { color: #157347; }
.ov-status.warn { color: var(--ov-amber); }
[data-theme="dark"] .ov-status.good { color: #4ade80; }

/* Daily pace */
.ov-pace-row { display: flex; flex-direction: column; gap: 0.4rem; }
.ov-pace-top { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; }
.ov-pace-num { font-size: 1.35rem; font-weight: 800; color: var(--text-heading); font-variant-numeric: tabular-nums; }
.ov-pace-num.warn { color: var(--ov-amber); }
.ov-track { height: 14px; border-radius: 4px; background: var(--ov-track); overflow: hidden; }
.ov-fill { height: 100%; border-radius: 4px 0 0 4px; background: var(--ov-green); }
.ov-fill.neutral { background: var(--text-secondary, #6b7280); opacity: 0.55; }
.ov-fill.warn { background: var(--ov-amber); }
.ov-foot { margin-top: auto; padding-top: 0.6rem; border-top: 1px solid var(--ov-divider); font-size: 0.8rem; color: var(--text-secondary); }
.ov-foot strong { color: var(--text-heading); }

/* Latest day: 7 labeled bars */
.ov-bars { display: flex; gap: 6px; height: 84px; margin-top: auto; }
.ov-bar-col { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.ov-bar-area { flex: 1; width: 100%; display: flex; align-items: flex-end; }
.ov-bar { width: 100%; border-radius: 5px 5px 2px 2px; background: var(--ov-green-soft); transition: background 0.15s ease; }
.ov-bar-col:hover .ov-bar { background: rgba(47, 133, 90, 0.35); }
.ov-bar.last, .ov-bar-col:hover .ov-bar.last { background: var(--ov-green); }
.ov-bar-lbl { font-size: 0.66rem; font-weight: 700; color: var(--text-muted, #9ca3af); text-transform: uppercase; }

/* Last 7 days: 12-week sparkline */
.ov-spark { width: 100%; height: 64px; margin-top: auto; overflow: visible; }
.ov-spark polyline { fill: none; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.ov-spark polyline.cur { stroke: var(--ov-green); stroke-width: 1.75; }
.ov-spark polyline.ly { stroke: #3d8bfd; stroke-width: 1.25; stroke-dasharray: 4 4; opacity: 0.8; }
.ov-legend { display: flex; gap: 1rem; font-size: 0.72rem; color: var(--text-muted, #9ca3af); }
.ov-legend span { display: inline-flex; align-items: center; gap: 0.35rem; }
.ov-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.ov-dot.cur { background: var(--ov-green); }
.ov-dot.ly { background: #3d8bfd; }

@media (min-width: 768px) and (max-width: 1199.98px) {
    .ov-hero { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ov-mtd { grid-column: 1 / -1; }
    .ov-ytd { grid-column: 1 / -1; }
}
@media (max-width: 767.98px) {
    .ov-hero { grid-template-columns: 1fr; }
    .ov-mtd, .ov-ytd { grid-column: auto; }
    .ov-figure.xl { font-size: 2.3rem; }
    .ov-figure.lg { font-size: 1.9rem; }
    .ov-stats { grid-template-columns: 1fr; gap: 0.75rem; }
    .ov-stat { padding: 0; }
    .ov-stat + .ov-stat { border-left: 0; border-top: 1px solid var(--ov-divider); padding-top: 0.75rem; }
    .ov-scale-legend { display: none; }
}

/* ════ Measured meters (2026-09-26) — restyles the shared `sr-*` hero pieces used by the
   Monthly / YTD / Weekly / Daily cards to match the Overview hero: flat cards, square-cornered
   thicker bars (not pills), fills always green (status is carried by labels, not by turning the
   whole bar amber), and reference ticks drawn as the outlined rounded "expected today" marker
   instead of hairlines. Declared last so it wins over the older rules above. ════ */
.sr-hcard { box-shadow: none; border-radius: 0.9rem; }

.sr-meter { height: 20px; border-radius: 5px; background: rgba(15, 23, 42, 0.07); overflow: visible; }
.sr-meter-fill { border-radius: 5px 0 0 5px; background: #2f855a; }
.sr-meter.behind { background: rgba(15, 23, 42, 0.07); }
.sr-meter.behind .sr-meter-fill { background: #2f855a; }

.sr-meter-tick {
    top: 3px; bottom: 3px; height: auto; width: 4px; margin-left: -2px; transform: none;
    border-radius: 2px; box-shadow: 0 0 0 2px var(--surface-card, #fff);
}
.sr-meter-tick.pace, .sr-meter-tick.goal { background: var(--text-heading, #1f2937); }
.sr-meter-tick.proj { background: #3d8bfd; }

.sr-key { width: 14px; height: 9px; border-radius: 2px; }
.sr-key.tick { width: 4px; height: 12px; border-radius: 2px; }
.sr-key.tick.pace, .sr-key.tick.goal { background: var(--text-heading, #1f2937); }

.sr-bullet { height: 20px; border-radius: 5px; background: rgba(15, 23, 42, 0.07); }
.sr-bullet-fill { border-radius: 5px 0 0 5px; }
.sr-bullet-fill.short { background: #2f855a; }
.sr-bullet.stacked { height: 20px; background: rgba(15, 23, 42, 0.07); }
.sr-bullet.stacked .sr-bullet-fill.proj {
    background: repeating-linear-gradient(135deg, rgba(47, 133, 90, 0.22) 0 6px, transparent 6px 11px), rgba(47, 133, 90, 0.16);
}
.sr-key.fill.light { background: repeating-linear-gradient(135deg, rgba(47, 133, 90, 0.45) 0 3px, transparent 3px 5px), rgba(47, 133, 90, 0.16); }

.sr-hbar-row .bar { height: 16px; border-radius: 4px; background: rgba(15, 23, 42, 0.07); }
.sr-hbar-row .fill { border-radius: 4px 0 0 4px; background: #3d8bfd; }
.sr-hbar-row.cur .fill { background: #2f855a; }

.sr-pace-bar { height: 12px; border-radius: 4px; }
.sr-pace-fill { border-radius: 4px 0 0 4px; }

.sr-month-pill { border-radius: 6px; }
.sr-month-pill.miss { background: rgba(15, 23, 42, 0.06); color: var(--text-secondary, #6b7280); }
.sr-key.pill { border-radius: 3px; }
.sr-key.pill.miss { background: rgba(108, 117, 125, 0.45); }

[data-theme="dark"] .sr-meter,
[data-theme="dark"] .sr-meter.behind,
[data-theme="dark"] .sr-bullet,
[data-theme="dark"] .sr-bullet.stacked,
[data-theme="dark"] .sr-hbar-row .bar { background: rgba(255, 255, 255, 0.08); }
[data-theme="dark"] .sr-meter-tick.pace,
[data-theme="dark"] .sr-meter-tick.goal,
[data-theme="dark"] .sr-key.tick.pace,
[data-theme="dark"] .sr-key.tick.goal { background: #e5e7eb; }
[data-theme="dark"] .sr-month-pill.miss { background: rgba(255, 255, 255, 0.07); color: #9ca3af; }

/* Year comparison: the "same months" marker sits on the BLUE last-year bar — draw it in ink so it doesn't read as a "0". */
.sr-hbar-row .sr-meter-tick.proj { background: var(--text-heading, #1f2937); }
.sr-hbars + .sr-meter-legend .sr-key.tick.proj { background: var(--text-heading, #1f2937); }
[data-theme="dark"] .sr-hbar-row .sr-meter-tick.proj,
[data-theme="dark"] .sr-hbars + .sr-meter-legend .sr-key.tick.proj { background: #e5e7eb; }

/* SrKpi (weekday/weekend etc.): label → value → change chip, same language as the KPI tiles. */
.sr-kpi-label { order: -1; font-weight: 800; letter-spacing: .08em; }
.sr-kpi-delta { width: fit-content; padding: .1rem .5rem; border-radius: 999px; font-weight: 800; margin-top: .15rem; }
.sr-kpi-delta.sr-pos { background: rgba(25, 135, 84, .12); }
.sr-kpi-delta.sr-neg { background: rgba(220, 53, 69, .11); }
[data-theme="dark"] .sr-kpi-delta.sr-pos { color: #4ade80; background: rgba(74, 222, 128, .14); }
[data-theme="dark"] .sr-kpi-delta.sr-neg { color: #f87171; background: rgba(248, 113, 113, .14); }
