/* Reports tab (30). Built on styles.css and workshop.css: same tokens, the report page from 14. */
:root{ --s-rr:#1f6f8b; --rs-slate:#2E3D49; --rs-amber:#C8842A; --rs-teal:#1C6E61; --rs-teal-soft:#D8EBE7; --rs-clay:#9E4A26; --rs-clay-soft:#F2E0D5; --rs-paper:#FAF8F3; --rs-band-soft:#F6EBDD; }
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){ --s-rr:#4fa8c7; --rs-slate:#9fb3c4; --rs-teal:#5cc3ad; --rs-teal-soft:#1a3530; --rs-clay:#e3916c; --rs-clay-soft:#3a2620; --rs-paper:#1b222a; --rs-band-soft:#2a2418; }}
:root[data-theme="dark"]{ --s-rr:#4fa8c7; --rs-slate:#9fb3c4; --rs-teal:#5cc3ad; --rs-teal-soft:#1a3530; --rs-clay:#e3916c; --rs-clay-soft:#3a2620; --rs-paper:#1b222a; --rs-band-soft:#2a2418; }

/* 31: report pages in the RS Regal house style: Trebuchet MS, slate headings and table heads,
   amber section bands, teal for good, clay for flags and losses, paper background. */
.rpage{font-family:"Trebuchet MS",Trebuchet,var(--sans);background:var(--rs-paper)}
.rpage .rhead{border-bottom-color:var(--rs-slate)}
.rpage .rbrand{color:var(--rs-amber)}
.rpage .rhead h2{color:var(--rs-slate)}
.rpage h4{background:var(--rs-amber);color:#fff;padding:5px 10px;border-radius:5px;margin:20px 0 8px}
.rpage h4 .sub{color:rgba(255,255,255,.85)}
.rpage .rtable th{background:var(--rs-slate);color:#fff}
.rpage .rtile{background:var(--surface)}
.rpage .rtile.bad .v,.rpage td.worse,.rpage .worse{color:var(--rs-clay)}
.rpage .rtile.ok .v,.rpage td.better,.rpage .better{color:var(--rs-teal)}
.rpage .rflag.red{background:var(--rs-clay-soft);color:var(--rs-clay)}
.rpage .btdir.increasing{background:var(--rs-clay-soft);color:var(--rs-clay)} .rpage .btdir.decreasing{background:var(--rs-teal-soft);color:var(--rs-teal)}
.rpage .bttab[aria-selected="true"]{color:var(--rs-slate);border-bottom-color:var(--rs-amber)}
.rpage .btprint{border-bottom-color:var(--rs-amber);color:var(--rs-slate)}
.rpage .btnotes{border-left-color:var(--rs-amber)}
.wslhint{font-size:12.5px;color:var(--ink-2);margin:4px 0 2px;line-height:1.6}

/* the list of reports */
.rplist{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:12px;margin-bottom:6px}
.rpcard{display:flex;flex-direction:column;gap:6px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:14px 16px}
.rpcard.new{border-top:3px solid var(--accent)}
.rpcard-h{display:flex;align-items:center;gap:8px}
.rpcard-h h3{font-size:15px}
.rpcard p{margin:0;color:var(--ink-2);font-size:13px;line-height:1.5;flex:1}
.rpcard-f{display:flex;gap:8px;margin-top:4px}

/* shared on report pages */
.rsub{margin:4px 0 0}
.rtile.bad .v{color:var(--red)} .rtile.warn .v{color:var(--amber)} .rtile.ok .v{color:var(--afr)}
.rtable.rnarrow{width:auto;min-width:340px}
.wskpisub{display:block;text-transform:none;letter-spacing:0;font-size:11px;color:var(--ink-3);margin-top:2px;font-weight:500}
.wscbk{font-size:12.5px;min-width:210px}

/* Breakdown Trend */
.btper{border:1px solid var(--line);border-radius:9px;padding:10px 12px;margin:6px 0 10px;display:flex;flex-direction:column;gap:8px}
.btnotes{border-left:3px solid var(--amber);background:var(--amber-soft);border-radius:0 8px 8px 0;padding:8px 12px;font-size:12.5px;margin-bottom:12px}
.btkpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(330px,1fr));gap:12px;margin-bottom:14px}
.btkpis.two{grid-template-columns:1fr}
.btkpis.two .rtable th:first-child{width:34%}
.btser{border:1px solid var(--line);border-radius:9px;padding:8px 10px;border-top:3px solid var(--s-bd);min-width:0;overflow:hidden}
.btser.all{border-top-color:var(--rs-slate)} .btser.rr{border-top-color:var(--s-rr)} .btser.bt{border-top-color:var(--s-tj)}
.btser.total{background:var(--rs-band-soft)}
.btser h4{margin:2px 0 6px !important;display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;background:none !important;color:var(--ink) !important;padding:0 !important}
.btser .rtable th,.btser .rtable td{padding:4px 6px}
.rpage .btser h4 .sub{color:var(--ink-3)}
.btser .rtable td:first-child{white-space:normal}
.btkey{display:inline-block;width:10px;height:10px;border-radius:3px;background:var(--s-bd)}
.btkey.all{background:var(--rs-slate)} .btkey.rr{background:var(--s-rr)} .btkey.bt{background:var(--s-tj)}
.btdir{display:inline-block;font-size:10.5px;font-weight:750;letter-spacing:.04em;border-radius:10px;padding:1px 7px;background:var(--surface-2);color:var(--ink-2)}
.btdir.increasing{background:var(--red-soft);color:var(--red)} .btdir.decreasing{background:var(--afr-soft);color:var(--afr)}
.bttabs{display:flex;flex-wrap:wrap;gap:4px;border-bottom:1px solid var(--line);margin:4px 0 12px}
.bttab{font:inherit;font-size:13px;font-weight:600;border:0;background:none;color:var(--ink-2);padding:8px 12px;border-bottom:2px solid transparent;cursor:pointer;margin-bottom:-1px}
.bttab[aria-selected="true"]{color:var(--accent);border-bottom-color:var(--accent)}
.bttab:hover{color:var(--ink)}
.btprint{display:none}
.btchart{margin-bottom:2px}
.btbar{fill:var(--s-bd);opacity:.38} .btbar.all{fill:var(--rs-slate)} .btbar.rr{fill:var(--s-rr)} .btbar.bt{fill:var(--s-tj)}
.btline{fill:none;stroke:var(--s-bd);stroke-width:2.2;stroke-linejoin:round;stroke-linecap:round} .btline.all{stroke:var(--rs-slate)} .btline.rr{stroke:var(--s-rr)} .btline.bt{stroke:var(--s-tj)}
.btfit{stroke:var(--ink);stroke-width:1.4;stroke-dasharray:6 4;opacity:.7}
.btnod{fill:var(--surface-2);opacity:.9}
.btstat{font-size:12px;color:var(--ink-2);margin:0 0 14px}
.btnone{margin:4px 0 14px}
.btspark{width:120px;height:22px;display:block} .btspark rect{fill:var(--accent);opacity:.7}
.btsort{cursor:pointer !important;user-select:none} .btsort:hover{color:var(--accent)}
.btdaily td{padding:3px 8px}
@media (max-width:900px){.btkpis{grid-template-columns:1fr}}
@media print{
  .bttabs{display:none}
  .btpane{display:block !important}
  .btpane[hidden]{display:block !important}
  .btprint{display:block;font-size:15px;margin:18px 0 6px;border-bottom:2px solid var(--accent);padding-bottom:3px;break-after:avoid}
  .btpane{break-before:page}
  .btpane:first-of-type{break-before:auto}
  .btkpis:not(.two){grid-template-columns:repeat(3,1fr)}
  .rplist{display:none}
}
