/* BPO MIS reports page (/reports/). Loaded only on reports.php. */
.page--reports{
  --r-surface: #fff;
  --r-plane: #f7f7f5;
  --r-ink: #14141c;
  --r-ink-2: #52514e;
  --r-muted: #6f6e69;
  --r-grid: #ecebe6;
  --r-base: #c3c2b7;
  --r-line: #e2e2ea;
  --r-accent: #9d2433;
  --r-good: #1e7f5c;
  --r-good-ink: #15634a;
  --r-warn: #b8860b;
  --r-warn-ink: #6e5300;
  --r-bad: #b83b3b;
  --r-bad-ink: #9b2f2f;
  --r-shadow: 0 1px 2px rgba(20, 20, 28, .04), 0 4px 14px rgba(20, 20, 28, .05);
  padding-top: clamp(28px, 4vw, 48px);
  font-variant-numeric: normal;
}
.rpt, .rpt + .rpt-intro{ transition: opacity .45s ease; }
/* until the reports are drawn, keep the page body hidden, then fade it in (the intro must not show first) */
.rpt:not(.is-ready), .rpt:not(.is-ready) + .rpt-intro{ opacity: 0; }
@media (prefers-reduced-motion: reduce){ .rpt, .rpt + .rpt-intro{ transition: none; } .rpt__mobile.is-open::before, html.rpt-lock .nav::after{ animation: none; } }
@keyframes rptDim{ from{ opacity: 0; } }
.rpt-intro{ max-width: none; margin: clamp(40px, 5vw, 64px) 0 0; padding-top: clamp(24px, 3vw, 32px); border-top: 3px solid #9d2433; }
.rpt-intro p{ margin: 0 0 10px; color: var(--text-muted); font-size: 14px; line-height: 23px; }
.rpt-intro p strong{ color: var(--r-ink); font-weight: 600; }
.rpt-intro .rpt-demo{ display: flex; gap: 8px; align-items: flex-start; padding: 10px 14px; border-radius: 8px; background: var(--r-plane); border: 1px solid var(--r-line); font-size: 13px; line-height: 20px; color: var(--r-ink-2); }
.rpt-intro .rpt-demo + .rpt-demo{ margin-top: 8px; }

/* shell */
.rpt{ position: relative; display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: clamp(20px, 2.6vw, 36px); align-items: start; }
.rpt__nav{ position: sticky; top: var(--nav-h, 65px); max-height: calc(100vh - var(--nav-h, 65px)); overflow-x: hidden; overflow-y: auto; scrollbar-width: none; -ms-overflow-style: none; }
.rpt__nav::-webkit-scrollbar{ display: none; }
.rpt__navin{ padding: 0 12px 16px 0; }
/* heading stays put while the report list scrolls inside the sidebar */
.rpt__nav > .rpt__navin > .rpt__ops:first-child{ padding-top: 16px; }
/* the heading of the open group stays frozen at the top of the sidebar; its reports scroll under it */
.rpt__ops.is-pin{ position: sticky; top: 0; z-index: 2; background: #fff; box-shadow: 0 6px 6px -6px rgba(0, 0, 0, .12); }
/* divider between the sidebar and the report, full height of the report */
.rpt::before{ content: ''; position: absolute; top: 0; bottom: 0; left: 272px; width: 1px; background: var(--r-line); pointer-events: none; }
/* report nav */
.rpt__ops, .rpt__mtab{ all: unset; box-sizing: border-box; }
.rpt__ops{ display: flex; align-items: center; gap: 8px; width: 100%; cursor: pointer; padding: 4px 0 8px; font-size: 11px; line-height: 16px; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; color: var(--r-muted); }
.rpt__ops:hover{ color: var(--r-ink); }
.rpt__ops:focus-visible, .rpt__mtab:focus-visible{ outline: 2px solid var(--r-accent); outline-offset: 1px; }
.rchev{ flex: none; transition: transform var(--dur-fast, .2s); }
.rpt__ops .rchev{ margin-left: auto; }
.rpt__ops[aria-expanded="false"] .rchev{ transform: rotate(-90deg); }
.rlink{ color: var(--r-accent); font-weight: 600; text-decoration: none; border-bottom: 1px solid rgba(157, 36, 51, .3); }
.rlink:hover{ border-bottom-color: var(--r-accent); }
.rpt__list{ list-style: none; margin: 0; padding: 0; }
.rpt__ops--next{ margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--r-line); }
.rpt__soon{ margin: 0; padding: 4px 10px 8px; font-size: 13px; color: var(--r-muted); }
.rpt__soon[hidden]{ display: none; }
.rpt__list a{ white-space: nowrap; display: flex; gap: 10px; align-items: baseline; padding: 7px 10px; border-radius: 6px; color: var(--r-ink-2); text-decoration: none; font-size: 13px; line-height: 18px; transition: background var(--dur-fast, .2s), color var(--dur-fast, .2s); }
.rpt__list a:hover{ background: var(--r-plane); color: var(--r-ink); }
.rpt__list a:focus-visible{ outline: 2px solid var(--r-accent); outline-offset: 1px; }
.rpt__list a.is-on{ background: #f8ecee; color: var(--r-accent); font-weight: 600; }
.rpt__num{ flex: none; font-size: 11px; color: var(--r-muted); font-variant-numeric: tabular-nums; }
.rpt__list a.is-on .rpt__num{ color: var(--r-accent); }
.rpt__mobile{ display: none; }
/* mobile: eCommerce / Operational group buttons; the tapped one opens its reports below */
.rpt__mtabs{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.rpt__mtab{ display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; padding: 10px 10px 10px 12px; border: 1px solid var(--r-line); border-radius: 8px; background: #fff; cursor: pointer; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--r-ink); white-space: nowrap; }
.rpt__mtab.is-cur{ color: var(--r-accent); }
.rpt__mtab[aria-expanded="true"]{ border-color: var(--r-accent); background: #f8ecee; color: var(--r-accent); }
.rpt__mtab[aria-expanded="true"] .rchev{ transform: rotate(180deg); }
@media (max-width: 360px){ .rpt__mtab-x{ display: none; } }
.rpt__mpanel{ position: absolute; left: var(--gutter); right: var(--gutter); top: calc(100% - 4px); max-height: min(70vh, 560px); overflow: auto; padding: 10px; border: 1px solid var(--r-line); border-radius: 10px; background: #fff; overscroll-behavior: contain; }
.rpt__main{ min-width: 0; }

.rpt__head{ margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--r-line); }
.rpt__title{ margin: 0 0 6px; font-size: clamp(1.35rem, 2.6vw, 1.85rem); line-height: 1.2; font-weight: 800; letter-spacing: -0.02em; color: var(--r-ink); }
.rpt__desc{ margin: 0; font-size: 14px; line-height: 23px; color: var(--text-muted); }

/* controls */
.rctls{ display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 12px; }
.rctl{ display: flex; flex-direction: column; gap: 5px; font-size: 11.5px; font-weight: 600; letter-spacing: .02em; color: var(--r-muted); }
.rctl select{ min-width: 200px; height: 40px; padding: 0 36px 0 12px; border: 1px solid var(--r-line); border-radius: 8px; background-color: #fff; color: var(--r-ink); font-size: 13.5px; font-weight: 500; font-family: inherit; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%239d2433' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 12px center; background-size: 14px 14px; background-repeat: no-repeat; cursor: pointer; box-shadow: var(--r-shadow); transition: border-color var(--dur-fast, .2s); }
.rctl select:hover{ border-color: var(--border-strong, #d4d4de); }
.rctl select:focus-visible{ outline: 2px solid var(--r-accent); outline-offset: 1px; }
.rctl input[type="date"]{ min-width: 160px; height: 40px; padding: 0 12px; border: 1px solid var(--r-line); border-radius: 8px; background: #fff; color: var(--r-ink); font-size: 13.5px; font-weight: 500; font-family: inherit; box-sizing: border-box; }
.rctl input[type="date"]:hover{ border-color: var(--border-strong, #d4d4de); }
.rctl input[type="date"]:focus-visible{ outline: 2px solid var(--r-accent); outline-offset: 1px; }
.rnote{ margin: 0 0 16px; font-size: 13px; line-height: 20px; color: var(--r-muted); }

/* KPI tiles */
.rkpis{ display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); grid-auto-rows: 1fr; gap: 10px; margin: 0 0 18px; }
.rkpis--4{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rkpi{ display: flex; flex-direction: column; gap: 4px; padding: 14px 14px 12px; border: 1px solid var(--r-line); border-radius: 8px; background: var(--r-surface); min-width: 0; box-shadow: var(--r-shadow); }
.rkpi__l{ margin: 0; font-size: 12px; line-height: 16px; color: var(--r-muted); }
.rkpi__v{ margin: 0; font-size: 22px; line-height: 28px; font-weight: 700; color: var(--r-ink); letter-spacing: -0.01em; overflow-wrap: anywhere; }
.rkpi__m{ display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 0; font-size: 12px; line-height: 16px; }
.rkpi__t{ color: var(--r-muted); }
.rkpi__d{ font-weight: 600; }
.rkpi__d--up{ color: var(--r-good-ink); }
.rkpi__d--down{ color: var(--r-bad-ink); }
.rkpi__d--flat{ color: var(--r-muted); }
.rkpi__top{ display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.rkpi__st{ flex: none; display: inline-grid; place-items: center; width: 20px; height: 20px; margin: -2px -2px 0 0; border-radius: 50%; font-size: 11px; font-weight: 700; line-height: 1; color: #fff; cursor: default; }
.rkpi__st--ok{ background: var(--r-good); }
.rkpi__st--no{ background: var(--r-bad); }
.rkpi__st--warn{ background: var(--r-warn); color: #0b0b0b; }
.rkpi__v[data-tip]{ cursor: help; align-self: flex-start; border-bottom: 1px dashed transparent; transition: border-color var(--dur-fast, .2s); }
.rkpi__v[data-tip]:hover, .rkpi__v[data-tip]:focus-visible{ border-bottom-color: var(--r-muted); outline: none; }
.rkpi__st:focus-visible{ outline: 2px solid var(--r-accent); outline-offset: 2px; }

/* status badge: icon + label, never color alone */
.rst{ display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px 2px 4px; border-radius: 999px; font-size: 11.5px; line-height: 16px; font-weight: 600; white-space: nowrap; }
.rst__i{ display: inline-grid; place-items: center; width: 14px; height: 14px; border-radius: 50%; font-size: 9px; line-height: 1; color: #fff; }
.rst--good{ background: #e9f3ee; color: var(--r-good-ink); }
.rst--good .rst__i{ background: var(--r-good); }
.rst--warn{ background: #f8f1df; color: var(--r-warn-ink); }
.rst--warn .rst__i{ background: var(--r-warn); color: #0b0b0b; }
.rst--bad{ background: #f7e9e8; color: var(--r-bad-ink); }
.rst--bad .rst__i{ background: var(--r-bad); }
.rst--none{ padding: 2px 8px; background: var(--r-plane); color: var(--r-ink-2); font-weight: 500; }
.rdot{ display: inline-grid; place-items: center; width: 14px; height: 14px; margin-right: 6px; border-radius: 50%; font-size: 9px; line-height: 1; color: #fff; vertical-align: -2px; }
.rdot--good{ background: var(--r-good); }
.rdot--warn{ background: var(--r-warn); color: #0b0b0b; }
.rdot--bad{ background: var(--r-bad); }

/* chart cards */
.rgrid{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 0 0 18px; }
.rc{ margin: 0; padding: 16px 16px 10px; border: 1px solid var(--r-line); border-radius: 8px; background: var(--r-surface); min-width: 0; box-shadow: var(--r-shadow); }
.rc--wide{ grid-column: 1 / -1; }
.rc__head{ margin-bottom: 8px; }
.rc__title{ margin: 0; font-size: 15px; line-height: 21px; font-weight: 700; color: var(--r-ink); }
.rc__sub{ margin: 2px 0 0; font-size: 12px; line-height: 17px; color: var(--r-muted); }
.rc__plot{ position: relative; display: flex; flex-direction: column; }
.rc__plot > .rc__svg{ order: 1; }
.rc__svg{ display: block; max-width: 100%; height: auto; overflow: visible; font-family: inherit; }
.rc__legend{ order: 2; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; list-style: none; margin: 10px 0 0; padding: 0; font-size: 12px; line-height: 16px; color: var(--r-ink-2); }
.rc__legend li{ display: inline-flex; align-items: center; gap: 6px; }
.rc__legend i{ width: 10px; height: 10px; border-radius: 3px; flex: none; }
.rc__base{ stroke: var(--r-base); stroke-width: 1; shape-rendering: crispEdges; }
.rc__yl{ fill: var(--r-muted); font-size: 11px; text-anchor: end; font-variant-numeric: tabular-nums; }
.rc__xl{ fill: var(--r-muted); font-size: 11px; text-anchor: middle; font-variant-numeric: tabular-nums; }
.rc__cl{ fill: var(--r-ink-2); font-size: 12px; text-anchor: end; }
.rc__vl{ fill: var(--r-ink-2); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.rc__end{ fill: var(--r-ink-2); font-size: 11.5px; }
.rc__ref{ stroke: #52514e; stroke-width: 1; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; pointer-events: none; }
.rc__line{ fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.rc__dot{ stroke: #fff; stroke-width: 2; }
.rc__bar{ shape-rendering: geometricPrecision; }
.rc__cross{ stroke: #898781; stroke-width: 1; opacity: 0; pointer-events: none; }
.rc__cross.is-on{ opacity: 1; }
.rc__hit{ fill: transparent; cursor: crosshair; }
.rc__mhit{ fill: transparent; }
.rc__cell{ stroke: none; }
.rc__cell:hover{ stroke: #0b0b0b; stroke-width: 1.5; }
.rc__hv{ font-size: 10.5px; font-weight: 600; text-anchor: middle; fill: var(--r-ink); pointer-events: none; font-variant-numeric: tabular-nums; }
.rc__hv--on{ fill: #fff; }
.rc__cl[data-tip], .rc__xl[data-tip]{ cursor: help; }
.rc__cl[data-tip]:hover{ fill: var(--r-accent); }
/* donut */
.rc__donut{ order: 1; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; padding: 4px 0; }
.rc__donut .rc__svg{ flex: none; }
.rc__slice{ stroke: #fff; stroke-width: 2; cursor: pointer; transition: opacity var(--dur-fast, .2s); }
.rc__slice:hover{ opacity: .82; }
.rc__dv{ text-anchor: middle; font-size: 18px; font-weight: 700; fill: var(--r-ink); }
.rc__dl{ text-anchor: middle; font-size: 11px; fill: var(--r-muted); }
.rc__dleg{ list-style: none; margin: 0; padding: 0; flex: 1; min-width: 200px; display: grid; gap: 7px; font-size: 12.5px; line-height: 17px; }
.rc__dleg li{ display: flex; align-items: center; gap: 8px; }
.rc__dleg i{ flex: none; width: 10px; height: 10px; border-radius: 2px; }
.rc__dleg span{ flex: 1; color: var(--r-ink-2); }
.rc__dleg em{ font-style: normal; color: var(--r-muted); font-variant-numeric: tabular-nums; }
.rc__dleg b{ min-width: 46px; text-align: right; font-variant-numeric: tabular-nums; color: var(--r-ink); }
/* scatter */
.rc__grid{ stroke: var(--r-grid); stroke-width: 1; }
.rc__pt{ fill-opacity: .72; stroke-width: 1; cursor: pointer; }
.rc__pt:hover{ fill-opacity: 1; stroke: #0b0b0b; }
.rc__trend{ stroke: var(--r-ink-2); stroke-width: 1.5; stroke-dasharray: 5 4; }
.rc__at{ font-size: 11px; font-weight: 600; fill: var(--r-muted); text-anchor: middle; }
.rc__pl{ font-size: 11px; fill: var(--r-ink-2); pointer-events: none; }
.rc__scale{ order: 2; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin: 10px 0 0; font-size: 11.5px; color: var(--r-muted); }
.rc__scale em{ font-style: normal; }
.rc__ramp{ display: inline-flex; gap: 2px; }
.rc__ramp i{ width: 18px; height: 10px; border-radius: 2px; }
.rc__data{ margin-top: 6px; border-top: 1px solid var(--r-grid); }
.rc__data summary{ padding: 8px 0 2px; font-size: 12px; color: var(--r-ink-2); cursor: pointer; list-style-position: inside; }
.rc__data summary:hover{ color: var(--r-accent); }
.rc__data .rtable-wrap{ max-height: 320px; margin-top: 6px; }
.rc__data .rtable thead th{ position: sticky; top: 0; }

/* tooltip */
.rtip{ position: fixed; left: 0; top: 0; z-index: 1000; min-width: 150px; max-width: 320px; padding: 8px 10px; border-radius: 6px; background: #14141c; color: #f4f4f8; font-size: 12px; line-height: 17px; box-shadow: 0 6px 24px rgba(0, 0, 0, .18); pointer-events: none; opacity: 0; transition: opacity .12s; }
.rtip.is-on{ opacity: 1; }
.rtip__t{ margin: 0 0 4px; font-weight: 700; color: #fff; }
.rtip__r{ display: flex; align-items: center; gap: 6px; margin: 0; }
.rtip__r i{ width: 8px; height: 8px; border-radius: 2px; flex: none; }
.rtip__r span{ flex: 1; color: #c3c2b7; }
.rtip__r b{ font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.rtip__d{ margin: 6px 0 0; padding-top: 6px; border-top: 1px solid rgba(255, 255, 255, .14); color: #c3c2b7; font-size: 11.5px; line-height: 16px; }

/* insights and definitions */
.rins{ margin: 0 0 18px; padding: 16px 18px; border-radius: 8px; background: var(--r-plane); border-left: 3px solid var(--r-accent); }
.rins__t{ margin: 0 0 8px; font-size: 14px; font-weight: 700; color: var(--r-ink); }
.rins ul{ margin: 0; padding-left: 18px; }
.rins li{ margin: 0 0 6px; font-size: 14px; line-height: 23px; color: var(--r-ink-2); }
.rins li:last-child{ margin-bottom: 0; }
.rins b{ color: var(--r-ink); font-weight: 600; }
.racts{ margin: 0 0 18px; padding: 16px 18px; border-radius: 8px; background: #f3f7fd; border-left: 3px solid #2a78d6; }
.racts__t{ margin: 0 0 10px; font-size: 14px; font-weight: 700; color: var(--r-ink); }
.racts ol{ margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.racts li{ display: flex; align-items: baseline; gap: 10px; font-size: 14px; line-height: 23px; color: var(--r-ink-2); }
.racts li b{ color: var(--r-ink); font-weight: 600; }
.racts__tag{ flex: none; min-width: 96px; padding: 1px 8px; border-radius: 999px; background: #fff; border: 1px solid #cde2fb; color: #1c5cab; font-size: 11.5px; line-height: 19px; font-weight: 600; text-align: center; }
@media (max-width: 560px){ .racts li{ flex-direction: column; gap: 2px; } .racts__tag{ min-width: 0; } }
.rdefs{ margin: 6px 0 0; border: 1px solid var(--r-line); border-radius: 8px; }
.rdefs summary{ padding: 12px 16px; font-size: 13px; font-weight: 600; color: var(--r-ink); cursor: pointer; }
.rdefs dl{ margin: 0; padding: 0 16px 14px; display: grid; grid-template-columns: minmax(150px, 220px) 1fr; gap: 8px 18px; }
.rdefs dt{ font-size: 13px; font-weight: 600; color: var(--r-ink); }
.rdefs dd{ margin: 0; font-size: 13px; line-height: 20px; color: var(--r-ink-2); }

/* tables */
.rtbl{ margin: 0 0 18px; border: 1px solid var(--r-line); border-radius: 8px; overflow: clip; background: var(--r-surface); }
/* while the header is pulled down, a white sheet above it hides the rows it has passed, so a fast flick never shows them (clipped to the table box) */
.rtbl__head.is-stuck::before{ content: ''; position: absolute; left: 0; right: 0; bottom: 100%; height: 100vh; background: var(--r-surface); }
.rtbl__head{ position: relative; z-index: 6; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 12px 14px; border-bottom: 1px solid var(--r-line); background: var(--r-surface); }
.rtbl__t{ margin: 0; flex: 1 1 auto; font-size: 15px; line-height: 21px; font-weight: 700; color: var(--r-ink); }
.rtbl__n{ margin: 0; font-size: 12px; color: var(--r-muted); }
.rbtn{ height: 30px; padding: 0 12px; border: 1px solid var(--r-line); border-radius: 6px; background: #fff; color: var(--r-ink); font-size: 12px; font-weight: 600; cursor: pointer; }
.rbtn:hover{ border-color: var(--r-accent); color: var(--r-accent); }
.rbtn:focus-visible{ outline: 2px solid var(--r-accent); outline-offset: 1px; }
.rbtn--ghost{ display: block; margin: 10px auto; border-style: dashed; }
.rtable-wrap{ overflow: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
/* Let a table hand the scroll back to the page at its top or bottom edge (style.css sets contain on [data-lenis-prevent]). */
.lenis.lenis-smooth .rtable-wrap[data-lenis-prevent]{ overscroll-behavior: auto; }
.rtable{ width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; line-height: 18px; color: var(--r-ink); }
.rtable th, .rtable td{ padding: 8px 10px; border-bottom: 1px solid var(--r-grid); text-align: left; white-space: nowrap; }
.rtable thead th{ position: relative; z-index: 2; background: #fafaf8; font-size: 11.5px; font-weight: 600; color: var(--r-ink-2); border-bottom: 1px solid var(--r-line); }
.rtable th button{ all: unset; cursor: pointer; }
.rtable th button:hover{ color: var(--r-accent); }
.rtable th button:focus-visible{ outline: 2px solid var(--r-accent); outline-offset: 2px; }
.rtable .rnil{ color: var(--r-ink); }
.rtable .num{ text-align: right; font-variant-numeric: tabular-nums; }
.rtable tbody tr:hover td{ background: #fbfbf9; }
.rtable tfoot td{ background: #f4f3ef; font-weight: 700; border-top: 1px solid var(--r-line); border-bottom: 0; }
.rtable td.rbad{ color: #b83b3b; font-weight: 700; }
.rtable tr.rrow--key td{ font-weight: 700; background: #fafaf8; }
.rtable--mini{ font-size: 12px; }
.rtable--mini th, .rtable--mini td{ padding: 5px 8px; }
/* Frozen leading columns on horizontal scroll */
.rtable .fz{ position: sticky; left: 0; z-index: 1; background: #fff; }
.rtable thead .fz{ position: sticky; z-index: 4; background: #fafaf8; }
.rtable tfoot .fz{ z-index: 3; background: #f4f3ef; }
.rtable tbody tr:hover td.fz{ background: #fbfbf9; }
.rtable--cal th.cal, .rtable--cal td.cal{ padding: 4px 1px; text-align: center; min-width: 22px; }
span.cal{ display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.cal--P{ background: #e6f0fb; color: #1c5cab; }
.cal--H{ background: #fdeee4; color: #a8461d; }
.cal--L{ background: #e3f5ee; color: #0d6e4b; }
.cal--U{ background: #fbe2e2; color: #b42b2b; }
.cal--T{ background: #fbeaf1; color: #a03564; }
.cal--O{ background: #f0efec; color: #6f6e69; }
.cal--x{ background: transparent; color: #c3c2b7; }
.rlegend{ display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 10px; font-size: 12px; color: var(--r-ink-2); }
.rlegend > span{ display: inline-flex; align-items: center; gap: 6px; }

/* team cards */
.rteams{ display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 0 0 18px; }
.rteam{ padding: 14px; border: 1px solid var(--r-line); border-radius: 8px; background: var(--r-surface); }
.rteam header{ display: flex; align-items: baseline; gap: 8px; }
.rteam h3{ margin: 0; font-size: 15px; font-weight: 700; color: var(--r-ink); }
.rteam__rank{ font-size: 12px; font-weight: 700; color: var(--r-accent); }
.rteam__tl{ margin-left: auto; font-size: 12px; color: var(--r-muted); }
.rteam__score{ margin: 6px 0 10px; font-size: 28px; line-height: 32px; font-weight: 800; color: var(--r-ink); }
.rteam__score span{ margin-left: 2px; font-size: 13px; font-weight: 500; color: var(--r-muted); }
.rteam dl{ margin: 0; display: grid; gap: 4px; }
.rteam dl div{ display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; line-height: 20px; }
.rteam dt{ color: var(--r-muted); }
.rteam dd{ margin: 0; font-weight: 600; color: var(--r-ink); font-variant-numeric: tabular-nums; }

.rpt-noscript{ padding: 16px; border: 1px solid var(--r-line); border-radius: 8px; }

@media (max-width: 900px){
  .rpt{ grid-template-columns: minmax(0, 1fr); }
  .rpt__nav{ display: none; }
  .rpt::before{ display: none; }
  .rpt__mobile{ display: block; position: sticky; top: var(--nav-h, 65px); z-index: 30; margin: 0 calc(-1 * var(--gutter)) 12px; padding: 10px var(--gutter); background: #fff; }
  /* open report picker: dim everything behind it (header included) so the focus is on the list */
  .rpt__mobile.is-open{ z-index: 101; }
  .rpt__mobile.is-open::before{ content: ""; position: fixed; inset: 0; z-index: -1; background: rgba(20, 20, 28, .5); animation: rptDim .18s ease; }
  html.rpt-lock{ overflow: hidden; }
  /* main is a stacking context (z-index 2) below the header (100), so the header gets its own matching dim */
  html.rpt-lock .nav::after{ content: ""; position: absolute; inset: 0; z-index: 3; background: rgba(20, 20, 28, .5); animation: rptDim .18s ease; }
  .rgrid{ grid-template-columns: minmax(0, 1fr); }
  .rdefs dl{ grid-template-columns: 1fr; gap: 2px; }
  .rdefs dd{ margin-bottom: 8px; }
  /* mobile: title bar and header copy stick under the report picker (set up in pinHeads) */
  .rtbl__head{ position: sticky; z-index: 7; }
  .rtbl__hx{ position: sticky; z-index: 6; overflow: hidden; background: #fafaf8; box-shadow: 0 1px 0 var(--r-line); }
  .rtbl__hx .rtable{ table-layout: fixed; }
}
@media (max-width: 560px){
  .rkpis{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rkpi__v{ font-size: 18px; line-height: 24px; }
  .rctl, .rctl select, .rctl input[type="date"]{ width: 100%; }
}
@media (prefers-reduced-motion: reduce){
  .rtip, .rpt__list a{ transition: none; }
}
@media (forced-colors: active){
  .rc__bar, .rc__cell{ forced-color-adjust: none; }
}
@media print{
  .rpt{ grid-template-columns: 1fr; }
  .rpt__nav, .rpt__mobile, .rctls, .rbtn{ display: none; }
  .rc, .rtbl{ break-inside: avoid; }
}
.rc__lref{ font-weight: 600; color: var(--r-ink); }
.rtable thead.is-stuck th{ box-shadow: 0 1px 0 var(--r-line), 0 6px 10px -8px rgba(20, 20, 28, .25); }

.rteam__tls{ margin: 10px 0 0; padding-top: 8px; border-top: 1px solid var(--r-grid); font-size: 12px; color: var(--r-muted); }

/* filter dropdown */
.rfil{ position: relative; }
.rfil__btn{ all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 10px; min-width: 240px; height: 40px; padding: 0 12px; border: 1px solid var(--r-line); border-radius: 8px; background: #fff; color: var(--r-ink); font-size: 13.5px; font-weight: 500; box-shadow: var(--r-shadow); cursor: pointer; }
.rfil__btn .rchev{ margin-left: auto; color: var(--r-accent); }
.rfil__btn[aria-expanded="true"] .rchev{ transform: rotate(180deg); }
.rfil__btn:focus-visible{ outline: 2px solid var(--r-accent); outline-offset: 1px; }
.rfil__sum{ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rfil__panel{ position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; width: min(720px, calc(100vw - 2 * var(--gutter))); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 14px; border: 1px solid var(--r-line); border-radius: 10px; background: #fff; box-shadow: 0 14px 36px rgba(20, 20, 28, .16); font-weight: 400; letter-spacing: 0; color: var(--r-ink); }
.rfil__panel[hidden]{ display: none; }
.rfil--all{ display: none; }
.rfil--one .rfil__btn{ min-width: 190px; }
.rfil--one .rfil__panel{ width: 300px; grid-template-columns: 1fr; }
.rfil--ag .rfil__panel{ width: 330px; }
.rfil__sec header{ display: flex; align-items: baseline; gap: 6px; margin-bottom: 6px; font-size: 12.5px; }
.rfil__sec header span{ color: var(--r-muted); font-size: 11.5px; }
.rfil__clr, .rfil__done{ all: unset; cursor: pointer; font-size: 12px; font-weight: 600; color: var(--r-accent); }
.rfil__sec .rfil__clr{ margin-left: auto; }
.rfil__list{ max-height: 230px; overflow: auto; scrollbar-width: thin; display: grid; gap: 2px; }
.rfil__opt{ display: flex; align-items: flex-start; gap: 8px; padding: 6px 6px; border-radius: 6px; cursor: pointer; font-size: 13px; line-height: 17px; }
.rfil__opt[hidden]{ display: none; }
.rfil__opt:hover{ background: var(--r-plane); }
.rfil__opt input{ margin: 2px 0 0; accent-color: var(--r-accent); width: 15px; height: 15px; flex: none; }
.rfil__txt small{ display: block; color: var(--r-muted); font-size: 11px; line-height: 15px; }
.rfil__search{ width: 100%; height: 32px; margin: 0 0 6px; padding: 0 10px; border: 1px solid var(--r-line); border-radius: 6px; font: inherit; font-size: 12.5px; }
.rfil__search:focus{ outline: 2px solid var(--r-accent); outline-offset: 0; }
.rfil__note{ grid-column: 1 / -1; margin: 0; font-size: 11.5px; line-height: 17px; color: var(--r-muted); }
.rfil__panel footer{ grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; padding-top: 8px; border-top: 1px solid var(--r-grid); }
.rfil__done{ padding: 6px 16px; border-radius: 6px; background: var(--r-accent); color: #fff; }
@media (max-width: 760px){
  .rfil__panel{ grid-template-columns: 1fr; width: calc(100vw - 2 * var(--gutter)); max-height: 70vh; overflow: auto; }
  .rfil__list{ max-height: 180px; }
  .rfil__btn{ min-width: 0; width: 100%; }
  .rfil--one{ display: none; }
  .rfil--all{ display: flex; }
}
