/* Scheduled & Unscheduled Revenue (testing) — js/views/sched_rev.js.
   DESIGN ported from the standalone Franks_Revenue_Tracker report
   (build_html_v3.py CSS), re-expressed on the portal design tokens
   (css/tokens.css) wherever a token exists:
     surfaces  -> --row-store-bg / --table-header-bg / --light-bg
     ink       -> --navy
     borders   -> --table-border
     accent    -> --ashley-orange (warn), --primary-blue (delivered/bars)
     signal    -> --success-green / --danger-red / --signal-yellow-*
   Report-specific constants with NO portal token (chart series 3+4,
   secondary ink shades, axis grey) are declared as component-local
   --sr-* vars ON #schedrevView so they never leak into other views.
   tokens.css currently defines light values only, so this view is
   light-theme (same as the rest of the portal chrome). */

#schedrevView {
  /* token-mapped palette */
  --sr-surface: var(--row-store-bg);        /* card background */
  --sr-band:    var(--table-header-bg);     /* week bands / zebra / day rows */
  --sr-ink:     var(--navy);                /* primary text */
  --sr-brand:   var(--navy);                /* title bar */
  --sr-grid:    var(--table-border);        /* chart grid + row rules */
  --sr-ring:    var(--table-border);        /* card hairlines */
  --sr-s1:      var(--primary-blue);        /* delivered */
  --sr-s2:      var(--success-green);       /* backlog — delivery scheduled */
  --sr-low:     var(--danger-red);          /* attainment < 85% */
  /* component-local (no portal token exists) */
  --sr-ink2: #52616B;                       /* secondary text */
  --sr-mut:  #7C8792;                       /* muted / labels */
  --sr-axis: #B7C1CA;                       /* chart baseline, heavy rules */
  --sr-s3:   #DD9C00;                       /* backlog — delivery estimated */
  --sr-s4:   #6D5BD0;                       /* backlog — pickup */

  display: block;
  color: var(--sr-ink);
  font-family: var(--font-stack);
  font-size: var(--text-body);
  line-height: 1.45;
}
#schedrevView[style*="display:none"], #schedrevView[style*="display: none"] { display: none; }
#schedrevView * { box-sizing: border-box; }

/* ── Title bar + sub line (standalone h1/.sub) ── */
#schedrevView .sr-h1 {
  background: var(--sr-brand); color: #fff;
  padding: 13px 20px; margin: 0;
  font-size: var(--text-heading); font-weight: 600;
  border-radius: var(--radius) var(--radius) 0 0;
}
#schedrevView .sr-h1 .sr-testing { font-weight: 400; opacity: .75; }
#schedrevView .sr-sub {
  font-size: var(--text-eyebrow); color: var(--sr-ink2);
  padding: 7px 20px; background: var(--sr-surface);
  border: 1px solid var(--sr-ring); border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  margin-bottom: 16px;
}

/* "Scheduled, not loaded" click-through (on-the-road tile caption). */
#schedrevView .sr-nl-link {
  color: inherit; text-decoration: underline; cursor: pointer;
}
#schedrevView .sr-nl-link:hover { color: var(--primary-blue); }
#schedrevView .sr-nl-chev {
  display: inline-block; transition: transform .15s; text-decoration: none;
}
#schedrevView .sr-nl-chev.open { transform: rotate(90deg); }
#schedrevView .sr-nl-nores { color: var(--danger-red); font-weight: 600; }
#schedrevView .sr-nl-orow { cursor: pointer; }
#schedrevView .sr-nl-orow:hover td { background: var(--table-header-bg); }
#schedrevView .sr-nl-items > td { background: var(--table-header-bg); padding: 6px 10px 10px 26px; }
#schedrevView .sr-nl-itemtbl { width: 100%; border-collapse: collapse; }
#schedrevView .sr-nl-itemtbl th, #schedrevView .sr-nl-itemtbl td {
  padding: 4px 8px; font-size: var(--text-eyebrow); text-align: right;
  border-bottom: 1px solid var(--table-border); white-space: nowrap;
}
#schedrevView .sr-nl-itemtbl .sr-lbl { text-align: left; }
#schedrevView .sr-nl-desc { white-space: normal; min-width: 240px; }
#schedrevView .sr-nl-short td:first-child { border-left: 3px solid var(--danger-red); }
#schedrevView .sr-nl-short .sr-lbl { color: var(--danger-red); }

/* Warning bar: staleness / missing morning snapshots (refresh-computed). */
#schedrevView .sr-warnbar {
  background: var(--sr-surface);
  border: 1px solid var(--ashley-orange); color: var(--sr-ink);
  border-left: 6px solid var(--ashley-orange);
  border-radius: var(--radius); padding: 9px 14px;
  font-size: var(--text-eyebrow); margin: 10px 0 0;
}

/* ── Filter bar (shared .filters idiom, scoped like dc.css) ── */
#schedrevView .sr-filters {
  background: var(--sr-surface); border: 1px solid var(--sr-ring);
  border-radius: var(--radius); padding: 12px 16px;
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  margin-bottom: 16px;
}
#schedrevView .select {
  background: var(--sr-surface); border: 1px solid var(--sr-ring);
  padding: 6px 10px; font-size: var(--text-eyebrow); color: var(--sr-ink);
  border-radius: 4px; font-family: inherit; cursor: pointer; min-width: 140px;
}
#schedrevView .range-label {
  margin-left: auto; color: var(--sr-ink2);
  font-size: var(--text-eyebrow); font-weight: 500;
}
#schedrevView .range-label .asof { color: var(--sr-mut); font-weight: 500; }

/* ── KPI tiles ── */
#schedrevView .sr-tiles {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px; margin-bottom: 16px;
}
#schedrevView .sr-tile {
  background: var(--sr-surface); border: 1px solid var(--sr-ring);
  border-radius: var(--radius); padding: var(--pad-card);
}
#schedrevView .sr-tile .sr-v {
  font-size: var(--text-display); font-weight: 700; letter-spacing: -.3px;
  font-variant-numeric: tabular-nums;
}
#schedrevView .sr-tile .sr-k {
  font-size: var(--text-caption); color: var(--sr-mut);
  text-transform: uppercase; letter-spacing: .5px; margin-bottom: 3px;
}
#schedrevView .sr-tile .sr-c { font-size: 11.5px; color: var(--sr-ink2); margin-top: 3px; }
#schedrevView .sr-tile.sr-hot .sr-v { color: var(--sr-s1); }

/* ── Past-due flag line ── */
#schedrevView .sr-pastdue {
  font-size: var(--text-eyebrow); color: var(--sr-ink2);
  margin: -4px 0 14px 2px;
}

/* ── Cards ── */
#schedrevView .sr-card {
  background: var(--sr-surface); border: 1px solid var(--sr-ring);
  border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px;
  overflow-x: auto;   /* wide chart/tables scroll inside the card */
}
#schedrevView .sr-card h2 { font-size: 13.5px; margin: 0 0 2px; font-weight: 600; }
#schedrevView .sr-card .sr-cap {
  font-size: 11.5px; color: var(--sr-mut); margin-bottom: 10px; max-width: 980px;
}

/* ── Chart legend + SVG ── */
#schedrevView .sr-legend {
  display: flex; gap: 16px; font-size: var(--text-eyebrow);
  color: var(--sr-ink2); margin-bottom: 6px; flex-wrap: wrap;
}
#schedrevView .sr-legend span { display: inline-flex; align-items: center; gap: 6px; }
#schedrevView .sr-sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
#schedrevView svg { min-width: 900px; }   /* keep bars readable; card scrolls */
#schedrevView svg text { font-family: inherit; }
#schedrevView .sr-grid { stroke: var(--sr-grid); stroke-width: 1; }
#schedrevView .sr-axis { stroke: var(--sr-axis); stroke-width: 1; }
#schedrevView .sr-ylab, #schedrevView .sr-xlab { font-size: 11px; fill: var(--sr-mut); }
#schedrevView .sr-wkcap {
  font-size: 11px; fill: var(--sr-ink2); font-weight: 600; letter-spacing: .3px;
}
#schedrevView .sr-today { stroke: var(--sr-mut); stroke-width: 1; stroke-dasharray: 3 3; }
#schedrevView .sr-todaylab { font-size: 10px; fill: var(--sr-mut); }
#schedrevView .sr-bar:hover path,
#schedrevView .sr-bar:hover rect:not(:first-child) { opacity: .85; }

/* ── Chart tooltip (fixed, follows cursor) ── */
#srTip {
  position: fixed; pointer-events: none; display: none; z-index: 9;
  background: var(--row-store-bg); color: var(--navy);
  border: 1px solid var(--table-border); border-radius: 6px;
  box-shadow: var(--shadow-md); padding: 8px 11px; font-size: 12px;
}
#srTip b { display: block; margin-bottom: 3px; }

/* ── Tables (weekly summary + all months) ── */
#schedrevView .sr-table {
  border-collapse: collapse; width: 100%; font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
#schedrevView .sr-table th, #schedrevView .sr-table td {
  padding: var(--pad-row); text-align: right;
  border-bottom: 1px solid var(--sr-grid); white-space: nowrap;
}
#schedrevView .sr-table th {
  color: var(--sr-mut); font-size: 10.5px; text-transform: uppercase;
  letter-spacing: .3px; font-weight: 600; border-bottom: 1px solid var(--sr-axis);
}
#schedrevView .sr-table td.sr-lbl, #schedrevView .sr-table th.sr-lbl {
  text-align: left; font-weight: 600;
}
#schedrevView .sr-rng { color: var(--sr-mut); font-weight: 400; font-size: 11px; }
#schedrevView td .sr-res-sub { font-size: 11px; color: var(--sr-mut); font-weight: 400; }
#schedrevView td.sr-tot { font-weight: 700; }
#schedrevView tr.sr-month td {
  border-top: 2px solid var(--sr-axis); font-weight: 700; background: var(--sr-band);
}
#schedrevView tr.sr-month td .sr-res-sub { font-weight: 400; }

/* week rows expand/collapse */
#schedrevView tr.sr-wkrow { cursor: pointer; }
#schedrevView tr.sr-wkrow:hover td { background: var(--sr-band); }
#schedrevView .sr-chev {
  display: inline-block; color: var(--sr-mut);
  transition: transform .15s; margin-right: 2px;
}
#schedrevView .sr-chev.open { transform: rotate(90deg); }
#schedrevView tr.sr-dayrow td {
  background: var(--sr-band); font-size: var(--text-eyebrow);
  color: var(--sr-ink2); border-bottom: 1px solid var(--sr-grid);
}
#schedrevView tr.sr-dayrow td.sr-day {
  font-weight: 400; padding-left: 30px; color: var(--sr-ink2);
}
#schedrevView tr.sr-dayrow td .sr-res-sub { font-size: 10.5px; }

/* attainment mini bar + low flag */
#schedrevView .sr-pctbar {
  display: inline-block; width: 40px; height: 7px; background: var(--sr-grid);
  border-radius: 4px; overflow: hidden; vertical-align: middle; margin-right: 4px;
}
#schedrevView .sr-pctbar i {
  display: block; height: 100%; background: var(--sr-s1); border-radius: 4px;
}
#schedrevView td.sr-low { color: var(--sr-low); font-weight: 600; }
#schedrevView td.sr-low .sr-pctbar i { background: var(--sr-low); }

/* ── Footnote ── */
#schedrevView .sr-note {
  font-size: 11.5px; color: var(--sr-mut); line-height: 1.55; max-width: 920px;
}

/* ── Empty / error states (dc.js retry-strip pattern) ── */
#schedrevView .sr-empty {
  background: var(--sr-surface); border: 1px solid var(--sr-ring);
  border-radius: var(--radius); padding: 40px 20px; text-align: center;
  color: var(--sr-ink2); font-size: var(--text-body);
}
#schedrevView .sr-retry-btn {
  background: var(--primary-blue); color: #fff; border: 0; border-radius: 4px;
  padding: 6px 14px; font-size: var(--text-eyebrow); font-weight: 600;
  cursor: pointer; font-family: inherit;
}
#schedrevView .sr-retry-btn:hover { background: var(--navy-hover); }
/* == Landing summary: the goal + the three drivers =======================
   One band, two halves: the goal on the left (attainment, the same snapshot
   records the weekly table scores) and the three reasons on the right, each a
   click-through into its own view. Built on the same tokens as the tiles and
   cards below it so it reads as the top of one page, not a bolted-on widget. */
#schedrevView .sr-lead {
  display: grid; grid-template-columns: minmax(240px, 1fr) minmax(0, 2.4fr);
  gap: 12px; margin-bottom: 16px; align-items: stretch;
}
@media (max-width: 900px) {
  #schedrevView .sr-lead { grid-template-columns: 1fr; }
}
#schedrevView .sr-lead-goal,
#schedrevView .sr-lead-why {
  background: var(--sr-surface); border: 1px solid var(--sr-ring);
  border-radius: var(--radius); padding: var(--pad-card);
}
#schedrevView .sr-lead-goal { border-left: 4px solid var(--sr-axis); }
#schedrevView .sr-lead-goal.sr-lead-hit  { border-left-color: var(--sr-s2); }
#schedrevView .sr-lead-goal.sr-lead-miss { border-left-color: var(--sr-low); }
#schedrevView .sr-lead-q,
#schedrevView .sr-lead-whyq {
  font-size: var(--text-caption); color: var(--sr-mut);
  text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px;
}
#schedrevView .sr-lead-v {
  font-size: 34px; font-weight: 700; letter-spacing: -.5px; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
#schedrevView .sr-lead-goal.sr-lead-hit  .sr-lead-v { color: var(--sr-s2); }
#schedrevView .sr-lead-goal.sr-lead-miss .sr-lead-v { color: var(--sr-low); }
#schedrevView .sr-lead-sub {
  font-size: 11.5px; color: var(--sr-ink2); margin-top: 4px; line-height: 1.45;
}
#schedrevView .sr-lead-line {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: var(--text-eyebrow); color: var(--sr-ink2);
  border-top: 1px solid var(--sr-ring); margin-top: 8px; padding-top: 6px;
}
#schedrevView .sr-lead-line b { color: var(--sr-ink); font-variant-numeric: tabular-nums; }

/* the three driver tiles */
#schedrevView .sr-drvs {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px;
}
#schedrevView .sr-drv {
  background: var(--sr-band); border: 1px solid var(--sr-ring);
  border-radius: var(--radius); padding: 11px 13px;
  display: flex; flex-direction: column;
}
#schedrevView .sr-drv-link { cursor: pointer; transition: border-color .12s, box-shadow .12s; }
#schedrevView .sr-drv-link:hover,
#schedrevView .sr-drv-link:focus-visible {
  border-color: var(--primary-blue); box-shadow: 0 0 0 1px var(--primary-blue) inset; outline: none;
}
#schedrevView .sr-drv-q {
  font-size: var(--text-caption); color: var(--sr-mut);
  text-transform: uppercase; letter-spacing: .5px;
  display: flex; justify-content: space-between; align-items: baseline; gap: 6px;
}
#schedrevView .sr-drv-v {
  font-size: 19px; font-weight: 700; letter-spacing: -.2px; margin-top: 3px;
  font-variant-numeric: tabular-nums;
}
#schedrevView .sr-drv-v.sr-drv-bad  { color: var(--sr-low); }
#schedrevView .sr-drv-v.sr-drv-warn { color: var(--sr-s3); }
#schedrevView .sr-drv-v.sr-drv-na   { color: var(--sr-mut); font-size: 15px; font-weight: 600; }
#schedrevView .sr-drv-sub { font-size: 11.5px; color: var(--sr-ink2); margin-top: 3px; line-height: 1.4; }
#schedrevView .sr-drv-det { font-size: 11px; color: var(--sr-mut); margin-top: 4px; line-height: 1.4; }
#schedrevView .sr-drv-cta {
  font-size: var(--text-eyebrow); color: var(--primary-blue); font-weight: 600;
  margin-top: auto; padding-top: 8px;
}
#schedrevView .sr-drv-cta.sr-drv-nolink { color: var(--sr-mut); font-weight: 400; }
#schedrevView .sr-drv-arrow { font-weight: 700; }
#schedrevView .sr-drv-fresh { font-size: 10px; color: var(--sr-mut); text-transform: none; letter-spacing: 0; }
#schedrevView .sr-drv-stale {
  font-size: 10px; color: var(--sr-low); font-weight: 600;
  text-transform: none; letter-spacing: 0;
}
#schedrevView .sr-drv-up   { color: var(--sr-low); }
#schedrevView .sr-drv-down { color: var(--sr-s2); }
#schedrevView .sr-drv-wait {
  grid-column: 1 / -1; color: var(--sr-ink2); font-size: var(--text-eyebrow);
  justify-content: center; align-items: center; min-height: 64px;
}
#schedrevView .sr-lead-v.sr-lead-v-na { font-size: 21px; color: var(--sr-ink2); }

/* One-page PvA section head (2026-07-23: sub-tabs removed, PvA stacks below
   the report). Mirrors .sr-card heading idiom. */
#schedrevWrap .sr-pvahead, .sr-pvahead { margin: 26px 0 8px; }
.sr-pvahead h2 { font-size: var(--text-heading); margin: 0 0 2px; color: var(--navy); }
.sr-pvahead .sr-cap { font-size: var(--text-eyebrow); color: #7C8792; }

/* ── Delivery calendar grid (2026-07-23: the page's opening element) ── */
.sr-cal { border-collapse: collapse; width: 100%; table-layout: fixed; }
.sr-cal th { background: var(--table-header-bg); color: var(--navy); font-size: var(--text-eyebrow);
  padding: 6px 8px; text-align: left; border: 1px solid var(--table-border); }
.sr-cal td.sr-cal-day { border: 1px solid var(--table-border); vertical-align: top;
  padding: 6px 8px; height: 72px; background: var(--row-store-bg); }
.sr-cal td.sr-cal-out { background: var(--light-bg); }
.sr-cal td.sr-cal-today { outline: 2px solid var(--ashley-orange); outline-offset: -2px; }
.sr-cal-num { font-size: var(--text-caption); color: #7C8792; text-align: right; }
.sr-cal-del { font-size: 15px; font-weight: 700; color: var(--navy); }
.sr-cal-bck { font-size: 15px; font-weight: 700; color: var(--primary-blue); }
.sr-cal-sub { font-size: var(--text-caption); color: #7C8792; margin-top: 1px; }

/* Calendar color pass (2026-07-23 PM, Wayne: "more color", plain words).
   Delivered days green-tinted, open days icy-blue, today orange ring +
   contest-soft fill; per-line color chips for Scheduled/Estimated/Pickup. */
.sr-cal td.sr-cal-done { background: var(--signal-green-bg-soft); }
.sr-cal td.sr-cal-done .sr-cal-del { color: var(--signal-green-text); font-size: 16px; }
.sr-cal td.sr-cal-open { background: var(--icy-blue); }
.sr-cal td.sr-cal-open .sr-cal-bck { color: var(--navy); font-size: 16px; }
.sr-cal td.sr-cal-today { background: var(--contest-soft); }
.sr-cal-line { font-size: var(--text-caption); margin-top: 2px; padding-left: 10px; position: relative; }
.sr-cal-line::before { content: ''; position: absolute; left: 0; top: 4px;
  width: 6px; height: 6px; border-radius: 2px; }
.sr-cal-s::before { background: var(--success-green); }
.sr-cal-e::before { background: #DD9C00; }
.sr-cal-p::before { background: #6D5BD0; }
.sr-cal td.sr-cal-day { height: 84px; }

/* Summary tiles: navy like the Hub's hero tiles, ONE row of six
   (2026-07-23 PM, Wayne). Overrides the base .sr-tile card look.
   Still six in the YTD era (2026-08-03 PM, Cory): the YTD card REPLACES
   Total Delivered as the lead card instead of joining it. */
#schedrevView .sr-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); }
#schedrevView .sr-tile { background: var(--navy); border-color: var(--navy-border); }
#schedrevView .sr-tile .sr-k { color: #AEC2CC; }
#schedrevView .sr-tile .sr-v { color: #fff; }
#schedrevView .sr-tile .sr-c { color: #C7D4DB; }
@media (max-width: 1400px) {
  #schedrevView .sr-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Erika-file color pass on the grids (2026-07-23 PM, Wayne: "orange, blue,
   like her file"). Her Summary sheet: navy header rows, blue-tinted body,
   solid ORANGE totals. Applied to the all-months + daily-counts tables. */
#schedrevView .sr-table tr:nth-child(even) td { background: var(--row-market-bg); }
#schedrevView .sr-table tr.sr-month td {
  background: var(--ashley-orange) !important; color: #fff; font-weight: 700;
  border-top: 2px solid #C96F16;
}
#schedrevView .sr-table th { background: var(--navy); color: #fff; }
#schedrevView .sr-table td.sr-lbl a, #schedrevView .sr-table td.sr-lbl { color: var(--primary-blue); }
/* calendar: give the week header the navy band + let Saturday/Sunday carry
   a soft gold tint like her weekend columns */
#schedrevView .sr-cal th { background: var(--navy); color: #fff; }
#schedrevView .sr-cal td.sr-cal-day:nth-child(6),
#schedrevView .sr-cal td.sr-cal-day:nth-child(7) { box-shadow: inset 0 3px 0 var(--contest-soft-border); }

/* scheduled-vs-delivered gap lines in closed calendar cells */
.sr-cal-miss { color: var(--danger-red); font-weight: 600; }
.sr-cal-miss::before { background: var(--danger-red); }
.sr-cal-hit { color: var(--signal-green-text); }
.sr-cal-hit::before { background: var(--success-green); }

/* tile titles never wrap (numbers align across the row); month tally line */
#schedrevView .sr-tile .sr-k { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#schedrevView .sr-cal-tally { margin-top: 8px; font-size: var(--text-body); color: var(--navy); }
#schedrevView .sr-cal-tally b { color: var(--danger-red); }

#schedrevView .sr-miss-cell { color: var(--danger-red); font-weight: 600; }

/* tiles borrow the Sales Performance kpi-card border family: 4px bright-blue
   left stripe, orange stripe on the Landing (lead) tile, kpi hover */
#schedrevView .sr-tile { border-left: 4px solid #5DA0C7; transition: box-shadow .15s, background .15s; }
#schedrevView .sr-tile:last-child { border-left-color: var(--ashley-orange); }
#schedrevView .sr-tile:hover { box-shadow: var(--shadow-md); background: var(--navy-hover); }
/* daily counts closed-day toggle row */
#schedrevView .sr-dc-toggle td { cursor: pointer; color: var(--primary-blue); font-weight: 600;
  background: var(--table-header-bg) !important; }

/* ── PDF export (print) ──────────────────────────────────────────────
   exportSchedRevPDF() in js/views/sched_rev.js adds .sr-print-mode to <body>
   for the duration of the print dialog (user saves as PDF) and removes it on
   afterprint. EVERY rule is scoped to that class on purpose: a plain Ctrl+P
   anywhere on the portal still prints exactly what it printed before.
   The @page landscape rule is NOT here — @page can't be scoped to a body
   class, so the exporter injects it as a temporary <style> instead. */
@media print {
  /* the report is the page: portal chrome, tooltips and controls go */
  body.sr-print-mode .sidebar,
  body.sr-print-mode .sticky-header-wrap,
  body.sr-print-mode #srTip,
  body.sr-print-mode #srMonthSel,
  body.sr-print-mode #srPdfBtn { display: none !important; }
  /* transition: none so the margin change is instant — .main animates
     margin-left on screen, and an animated value must never be what a
     print snapshot happens to catch mid-flight */
  body.sr-print-mode .main {
    margin-left: 0 !important; background: #fff; transition: none !important;
  }
  body.sr-print-mode .content { padding: 0; }
  /* the filter row shrinks to its as-of stamp — keep it, it's the data date */
  body.sr-print-mode #schedrevView .sr-filters {
    border: 0; background: none; padding: 4px 2px; margin-bottom: 8px;
  }
  /* cards must flow onto paper, not scroll; keep rows/cells whole and the
     tiles + calendar grid unsplit across page breaks */
  body.sr-print-mode #schedrevView .sr-card { overflow: visible; box-shadow: none; }
  body.sr-print-mode #schedrevView .sr-tiles,
  body.sr-print-mode #schedrevView .sr-cal tr,
  body.sr-print-mode #schedrevView .sr-table tr {
    break-inside: avoid; page-break-inside: avoid;
  }
  /* the navy tiles / navy table headers / orange totals / calendar tints ARE
     the report's look — keep that ink where browsers would strip backgrounds */
  body.sr-print-mode #schedrevView,
  body.sr-print-mode #schedrevView * {
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  body.sr-print-mode #schedrevView .sr-tile:hover {
    box-shadow: none; background: var(--navy);
  }
}
