/*
 * datahub-reports.css (V1.60): the report pages of Filon (prefix dhr-; Client\Apps\DataHub\Reports: DhReportView,
 * DhVisualHost, DhSlicer and the visuals of Visuals\). The Power BI look in OneStop's frame: Segoe UI, Power BI's default
 * theme for the series, white tiles on a grey canvas. Like the simulated Power BI reports (.pbi, portal.css), a report stays
 * light in the dark theme on purpose (the light tokens are set again inside .dhr, end of this file), and prints light.
 * The colours of the report are the tokens below (--dhr-*), set once on .dhr; the page frame around it uses :root's tokens.
 * Grid: 12 columns, rows of 62 px with 10 px gaps (the visual's X, Y, W, H as --x, --y, --w, --h); 6 columns on a tablet and
 * 2 on a phone (a card takes 2 of 6, 1 of 2; the others 3 or 6, then 2), the rows in the order of the page.
 * Copyright (c) 2026 Toupin Technologies Inc. All rights reserved.
 */

.dhr {
  --dhr-ink: #252423;
  --dhr-muted: #605e5c;
  --dhr-faint: #8a8886;
  --dhr-line: #edebe9;
  --dhr-border: #d2d0ce;
  --dhr-canvas: #eaeaea;
  --dhr-tile: #ffffff;
  --dhr-chrome: #252423;
  --dhr-blue: #118dff;
  --dhr-navy: #12239e;
  --dhr-good: #107c10;
  --dhr-bad: #c4314b;
  --dhr-warn: #d98f00;
  --dhr-gold: #e0bf3f;
  --dhr-olive: #8d7f56;
  --dhr-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--dhr-border);
  border-radius: 8px;
  background: var(--dhr-canvas);
  box-shadow: var(--shadow);
  color: var(--dhr-ink);
  font-family: "Segoe UI", "Segoe UI Web", Roboto, Arial, sans-serif;
}
.dhr.compact { border-radius: 6px; box-shadow: none; }

/* ==== The bar on top ==== */
.dhr-chrome { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 12px; background: var(--dhr-chrome); color: #ffffff; font-size: 0.82rem; }
.dhr-logo { display: inline-flex; align-items: flex-end; gap: 2px; width: 20px; height: 18px; }
.dhr-logo i { display: block; width: 3.5px; border-radius: 1px; background: var(--dhr-gold); }
.dhr-logo i:nth-child(1) { height: 7px; opacity: 0.6; }
.dhr-logo i:nth-child(2) { height: 12px; opacity: 0.75; }
.dhr-logo i:nth-child(3) { height: 18px; }
.dhr-logo i:nth-child(4) { height: 10px; background: var(--dhr-blue); }
.dhr-chrome-app { font-weight: 700; letter-spacing: 0.01em; }
.dhr-chrome-sep { opacity: 0.4; }
.dhr-chrome-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dhr-chrome-spacer { flex: 1; }
.dhr-chrome-actions { display: inline-flex; gap: 4px; }
.dhr-chrome-btn { padding: 4px 10px; border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 4px; background: transparent; color: #ffffff; font: inherit; font-size: 0.78rem; cursor: pointer; white-space: nowrap; }
.dhr-chrome-btn:hover { background: rgba(255, 255, 255, 0.12); }
.dhr-chrome-btn.ai { border-color: var(--dhr-gold); color: var(--dhr-gold); font-weight: 600; }
.dhr-badge { padding: 2px 9px; border-radius: 999px; background: var(--dhr-gold); color: var(--dhr-ink); font-size: 0.7rem; font-weight: 700; white-space: nowrap; }

/* ==== The canvas and its header band ==== */
.dhr-canvas { display: flex; flex-direction: column; gap: 10px; padding: 14px; }
.dhr.compact .dhr-canvas { padding: 10px; }
.dhr-header {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 20px;
  padding: 14px 16px; border-radius: 6px; background: linear-gradient(100deg, var(--dhr-navy) 0%, var(--dhr-blue) 100%); color: #ffffff;
}
.dhr-header.skeleton { min-height: 76px; opacity: 0.4; }
.dhr-heading h2 { margin: 0; font-size: 1.4rem; font-weight: 600; letter-spacing: -0.01em; }
.dhr-sub { display: flex; flex-wrap: wrap; gap: 0 6px; margin-top: 3px; font-size: 0.78rem; opacity: 0.9; }
.dhr-slicers { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.dhr-slicer { position: relative; display: flex; min-width: 140px; max-width: 220px; flex-direction: column; gap: 2px; }
.dhr-slicer.narrow { min-width: 128px; }
.dhr-slicer-label { font-size: 0.68rem; font-weight: 600; opacity: 0.88; }
.dhr-slicer-value {
  display: flex; align-items: center; justify-content: space-between; gap: 6px; box-sizing: border-box; width: 100%; height: 30px; padding: 4px 9px;
  border: 1px solid rgba(255, 255, 255, 0.55); border-radius: 3px; background: #ffffff; color: var(--dhr-ink); font: inherit; font-size: 0.8rem; text-align: left; cursor: pointer;
}
.dhr-slicer-value span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dhr-slicer-value i { color: var(--dhr-muted); font-style: normal; font-size: 0.7rem; }
.dhr-slicer-value:disabled { cursor: default; opacity: 0.8; }
.dhr-slicer-backdrop { position: fixed; inset: 0; z-index: 30; }
.dhr-slicer-menu {
  position: absolute; top: 100%; right: 0; z-index: 31; display: flex; flex-direction: column; gap: 4px; width: 260px; max-height: 340px; margin-top: 4px; padding: 8px;
  border: 1px solid var(--dhr-border); border-radius: 4px; background: #ffffff; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); color: var(--dhr-ink);
}
.dhr-slicer-search { padding: 5px 8px; border: 1px solid var(--dhr-border); border-radius: 3px; font: inherit; font-size: 0.8rem; }
.dhr-slicer-actions { display: flex; justify-content: space-between; }
.dhr-slicer-actions button { padding: 2px 4px; border: 0; background: none; color: var(--dhr-blue); font: inherit; font-size: 0.76rem; cursor: pointer; }
.dhr-slicer-actions button:disabled { color: var(--dhr-faint); cursor: default; }
.dhr-slicer-list { overflow-y: auto; }
.dhr-slicer-item { display: flex; align-items: center; gap: 7px; padding: 4px; border-radius: 3px; font-size: 0.8rem; cursor: pointer; }
.dhr-slicer-item:hover { background: #f3f2f1; }
.dhr-slicer-item.on { font-weight: 600; }
.dhr-slicer-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dhr-slicer-item input { accent-color: var(--dhr-blue); }

/* ==== Chips, notices, notes ==== */
.dhr-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.dhr-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border: 1px solid var(--dhr-border); border-radius: 999px; background: #ffffff;
  color: var(--dhr-ink); font: inherit; font-size: 0.74rem; font-weight: 600; white-space: nowrap; cursor: pointer;
}
.dhr-chip:hover:not(:disabled) { border-color: var(--dhr-blue); }
.dhr-chip:disabled { opacity: 0.45; cursor: default; }
.dhr-chip.on { border-color: var(--dhr-navy); background: var(--dhr-navy); color: #ffffff; }
.dhr-chip.good { border-color: color-mix(in srgb, var(--dhr-good) 40%, transparent); background: color-mix(in srgb, var(--dhr-good) 10%, #ffffff); color: var(--dhr-good); }
.dhr-chip.bad { border-color: color-mix(in srgb, var(--dhr-bad) 40%, transparent); background: color-mix(in srgb, var(--dhr-bad) 9%, #ffffff); color: var(--dhr-bad); }
.dhr-chip small { font-weight: 400; opacity: 0.8; }
.dhr-rule { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 26px; margin-bottom: 4px; }
span.dhr-chip { cursor: default; }
.dhr-notice { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 12px 14px; border-left: 4px solid var(--dhr-blue); border-radius: 4px; background: #ffffff; box-shadow: var(--dhr-shadow); font-size: 0.86rem; }
.dhr-notice.bad { border-left-color: var(--dhr-bad); }
.dhr-note { margin-top: 2px; overflow: hidden; color: var(--dhr-faint); font-size: 0.7rem; text-overflow: ellipsis; white-space: nowrap; }
.dhr-foot { margin-top: 4px; color: var(--dhr-muted); font-size: 0.72rem; }
.dhr-page-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 18px; padding: 2px 2px 0; color: var(--dhr-muted); font-size: 0.72rem; }
.dhr-empty { display: flex; height: 100%; min-height: 40px; align-items: center; justify-content: center; color: var(--dhr-faint); font-size: 0.8rem; text-align: center; }
.dhr-empty.small { height: auto; min-height: 0; padding: 10px 0; }
.dhr-empty.good { color: var(--dhr-good); }
.dhr-error { display: flex; height: 100%; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--dhr-bad); font-size: 0.8rem; text-align: center; }
.dhr-error span { color: var(--dhr-muted); font-size: 0.74rem; }

/* ==== The grid and its tiles ==== */
.dhr-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: minmax(62px, auto); gap: 10px; }
.dhr-visual {
  position: relative; display: flex; flex-direction: column; min-width: 0; box-sizing: border-box; padding: 9px 12px 8px;
  border-radius: 6px; background: var(--dhr-tile); box-shadow: var(--dhr-shadow);
  grid-column: var(--x) / span var(--w); grid-row: var(--y) / span var(--h); transition: opacity 150ms ease;
}
.dhr-visual.refreshing { opacity: 0.6; }
.dhr-visual.type-text { background: transparent; box-shadow: none; }
.dhr-vhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; min-height: 22px; margin-bottom: 4px; }
.dhr-vhead h3 { display: flex; align-items: center; gap: 4px; min-width: 0; margin: 0; overflow: hidden; color: var(--dhr-ink); font-size: 0.86rem; font-weight: 600; line-height: 1.3; }
.dhr-vtitle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.type-card .dhr-vhead { margin-bottom: 0; }
.type-card .dhr-vhead h3 { color: var(--dhr-muted); font-size: 0.76rem; }
.dhr-crumb { color: var(--dhr-blue); font-size: 0.78rem; white-space: nowrap; }
.dhr-filtered { color: var(--dhr-blue); font-size: 0.9rem; }
.dhr-vtools { display: inline-flex; flex: none; gap: 2px; opacity: 0; transition: opacity 120ms ease; }
.dhr-visual:hover .dhr-vtools, .dhr-visual:focus-within .dhr-vtools { opacity: 1; }
.dhr-hint { padding: 0 4px; color: var(--dhr-faint); font-size: 0.8rem; }
.dhr-icon { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 3px; background: none; color: var(--dhr-muted); font: inherit; font-size: 0.86rem; cursor: pointer; }
.dhr-icon:hover { background: #f3f2f1; color: var(--dhr-ink); }
.dhr-vbody { position: relative; min-height: 0; flex: 1 1 auto; }
.type-shift_report .dhr-vbody { height: auto !important; }
.dhr-text p { margin: 0 0 6px; font-size: 0.84rem; line-height: 1.45; }

/* Skeletons while a visual loads */
.dhr-skeleton { display: flex; height: 100%; min-height: 40px; flex-direction: column; gap: 10px; padding-top: 4px; box-sizing: border-box; }
.dhr-skeleton i { display: block; height: 14px; border-radius: 3px; background: linear-gradient(90deg, #f3f2f1, #ffffff, #f3f2f1); background-size: 200% 100%; animation: dhr-shine 1.2s linear infinite; }
.dhr-skeleton i:nth-child(1) { width: 70%; }
.dhr-skeleton i:nth-child(2) { flex: 1; }
.dhr-skeleton i:nth-child(3) { width: 40%; }
.dhr-skeleton.card i:nth-child(1) { width: 55%; height: 26px; }
.dhr-skeleton.card i:nth-child(2) { flex: 0 0 12px; width: 80%; }
.dhr-skeleton.text i { flex: 0 0 12px; }
@keyframes dhr-shine { to { background-position: -200% 0; } }

/* ==== Cards ==== */
.dhr-card { display: flex; height: 100%; flex-direction: column; gap: 2px; min-width: 0; }
.dhr-card-value { color: var(--dhr-ink); font-size: 1.6rem; font-weight: 600; line-height: 1.15; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dhr-card-value.none { color: var(--dhr-faint); }
.dhr-card-unit { margin-left: 4px; color: var(--dhr-muted); font-size: 0.8rem; font-weight: 400; }
.dhr-card-plan { display: flex; flex-wrap: wrap; gap: 0 8px; font-size: 0.72rem; white-space: nowrap; }
.dhr-delta { font-weight: 700; }
.dhr-delta.good { color: var(--dhr-good); }
.dhr-delta.bad { color: var(--dhr-bad); }
.dhr-card-target { color: var(--dhr-faint); }
.dhr-card-sub { color: var(--dhr-faint); font-size: 0.7rem; }
.dhr-spark { width: 100%; height: 22px; margin-top: auto; }
.dhr-spark polyline { fill: none; stroke: var(--dhr-blue); stroke-width: 1.6; }
.dhr-spark polyline.plan { stroke: var(--dhr-faint); stroke-width: 1.1; stroke-dasharray: 3 2; }

/* ==== Charts (DhChart, DhWaterfall, DhScatter, DhPayload, DhControlChart) ==== */
.dhr-chart { display: flex; flex-direction: column; min-width: 0; }
.dhr-legend { display: flex; flex-wrap: wrap; gap: 2px 12px; min-height: 18px; max-height: 18px; margin-bottom: 4px; overflow: hidden; color: var(--dhr-muted); font-size: 0.72rem; }
.dhr-bars .dhr-legend { max-height: none; }
.dhr-legend-item { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.dhr-legend i, .dhr-tip i, .dhr-tl-legend i, .dhr-donut-legend i, .dhr-map-scale span i, .dhr-bars-foot i, .dhr-dotmark {
  display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 2px; background: var(--c);
}
.dhr-legend i.line { height: 3px; }
.dhr-legend i.dash, .dhr-tip i.dash, .dhr-bars-foot i.dash { height: 0; border-top: 2px dashed var(--c); border-radius: 0; background: none; }
.dhr-cbody { display: grid; min-width: 0; }
.dhr-yax { position: relative; color: var(--dhr-muted); font-size: 0.68rem; }
.dhr-yax span { position: absolute; right: 6px; transform: translateY(-50%); white-space: nowrap; font-variant-numeric: tabular-nums; }
.dhr-yax.right span { right: auto; left: 6px; }
.dhr-yax.labels span { font-weight: 600; }
.dhr-yunit { position: absolute; top: -12px; right: 6px; color: var(--dhr-faint); font-size: 0.62rem; font-style: normal; white-space: nowrap; }
.dhr-yax.right .dhr-yunit { right: auto; left: 6px; }
.dhr-plot { position: relative; min-width: 0; }
.dhr-svg { display: block; overflow: visible; }
.dhr-lines { position: absolute; top: 0; left: 0; pointer-events: none; }
.dhr-gridline { stroke: var(--dhr-line); stroke-width: 1; }
.dhr-base { stroke: #c8c6c4; stroke-width: 1; }
.dhr-bar { transition: opacity 120ms ease; }
.dhr-bar.dim, .dhr-dot.dim, .dhr-point.dim { opacity: 0.28; }
.dhr-hit { fill: transparent; cursor: pointer; }
.dhr-hoverband { fill: rgba(0, 0, 0, 0.035); }
.dhr-wf-link { stroke: #a19f9d; stroke-width: 1; stroke-dasharray: 2 2; }
.dhr-wf-values { position: absolute; top: 0; left: 0; right: 0; height: 0; }
.dhr-wf-values span { position: absolute; transform: translateX(-50%); color: var(--dhr-muted); font-size: 0.68rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dhr-wf-values span.total { color: var(--dhr-ink); font-weight: 600; }
.dhr-xax { position: relative; height: 20px; color: var(--dhr-muted); font-size: 0.68rem; }
.dhr-xax span { position: absolute; top: 4px; overflow: hidden; transform: translateX(-50%); text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.dhr-xname { position: absolute; right: 0; bottom: -14px; color: var(--dhr-faint); font-size: 0.64rem; }
.dhr-target-label { position: absolute; right: 2px; padding: 0 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.85); color: var(--dhr-bad); font-size: 0.66rem; font-weight: 600; pointer-events: none; }
.dhr-vline-label { position: absolute; top: 0; padding-left: 4px; font-size: 0.66rem; font-weight: 700; pointer-events: none; }
.dhr-tip {
  position: absolute; top: 4px; z-index: 6; min-width: 150px; max-width: 280px; padding: 7px 9px; transform: translateX(10px);
  border: 1px solid var(--dhr-border); border-radius: 4px; background: #ffffff; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
  color: var(--dhr-ink); font-size: 0.74rem; pointer-events: none;
}
.dhr-tip.left { transform: translateX(calc(-100% - 10px)); }
.dhr-tip-title { margin-bottom: 4px; font-weight: 700; }
.dhr-tip-row { display: flex; align-items: center; gap: 6px; line-height: 1.6; }
.dhr-tip-name { flex: 1; overflow: hidden; color: var(--dhr-muted); text-overflow: ellipsis; white-space: nowrap; }
.dhr-tip-row b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.dhr-tip-row small { color: var(--dhr-faint); font-weight: 400; }
.dhr-tip-var { margin-top: 3px; font-weight: 700; }
.dhr-tip-var.good { color: var(--dhr-good); }
.dhr-tip-var.bad { color: var(--dhr-bad); }
.dhr-tip-hint { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--dhr-line); color: var(--dhr-faint); font-size: 0.68rem; }

/* Horizontal bars */
.dhr-bars { display: flex; flex-direction: column; gap: 1px; overflow-y: auto; }
.dhr-bar-row { display: grid; grid-template-columns: minmax(70px, 36%) minmax(0, 1fr) 68px; align-items: center; gap: 8px; min-height: 22px; padding: 1px 2px; border-radius: 3px; font-size: 0.76rem; }
.dhr-bar-row.pick { cursor: pointer; }
.dhr-bar-row.pick:hover { background: #f3f2f1; }
.dhr-bar-row.dim { opacity: 0.35; }
.dhr-bar-label { overflow: hidden; color: var(--dhr-ink); text-overflow: ellipsis; white-space: nowrap; }
.dhr-bar-track { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 2px; height: 100%; min-height: 14px; }
.dhr-bar-fill { display: block; min-width: 1px; border-radius: 0 2px 2px 0; background: var(--c); }
.dhr-bar-fill.neg { opacity: 0.6; }
.dhr-bar-target { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px dashed var(--dhr-bad); }
.dhr-bar-value { color: var(--dhr-ink); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.dhr-bars-foot { display: flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--dhr-muted); font-size: 0.7rem; }

/* Donut */
.dhr-donut { position: relative; display: grid; grid-template-columns: minmax(110px, 46%) minmax(0, 1fr); align-items: center; gap: 10px; }
.dhr-donut-svg { width: 100%; max-height: 100%; }
.dhr-slice { cursor: pointer; transition: opacity 120ms ease; }
.dhr-slice.dim { opacity: 0.35; }
.dhr-donut-center { position: absolute; top: 50%; left: 23%; display: flex; width: 30%; flex-direction: column; align-items: center; transform: translate(-50%, -50%); pointer-events: none; text-align: center; }
.dhr-donut-center b { font-size: 1.05rem; font-weight: 600; white-space: nowrap; }
.dhr-donut-center span { overflow: hidden; max-width: 100%; color: var(--dhr-muted); font-size: 0.68rem; text-overflow: ellipsis; white-space: nowrap; }
.dhr-donut-legend { display: flex; flex-direction: column; gap: 3px; max-height: 100%; margin: 0; padding: 0; overflow-y: auto; list-style: none; font-size: 0.74rem; }
.dhr-donut-legend li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto 38px; align-items: center; gap: 6px; padding: 1px 3px; border-radius: 3px; cursor: pointer; }
.dhr-donut-legend li:hover { background: #f3f2f1; }
.dhr-donut-legend li.dim { opacity: 0.4; }
.dhr-donut-legend .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dhr-donut-legend .val { font-variant-numeric: tabular-nums; }
.dhr-donut-legend .pct { color: var(--dhr-muted); text-align: right; font-variant-numeric: tabular-nums; }

/* Gauge */
.dhr-gauge { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.dhr-gauge-svg { width: 100%; max-width: 300px; max-height: 72%; }
.dhr-gauge-track { fill: none; stroke: var(--dhr-line); stroke-width: 22; }
.dhr-gauge-value { fill: none; stroke-width: 22; }
.dhr-gauge-target { stroke: var(--dhr-ink); stroke-width: 3; }
.dhr-gauge-text { display: flex; flex-direction: column; align-items: center; margin-top: -34px; }
.dhr-gauge-text b { font-size: 1.6rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.dhr-gauge-text small { margin-left: 3px; color: var(--dhr-muted); font-size: 0.8rem; font-weight: 400; }
.dhr-gauge-text span { font-size: 0.74rem; font-weight: 600; }
.dhr-gauge-text .good { color: var(--dhr-good); }
.dhr-gauge-text .bad { color: var(--dhr-bad); }
.dhr-gauge-scale { display: flex; justify-content: space-between; width: 100%; max-width: 300px; color: var(--dhr-faint); font-size: 0.68rem; }

/* Tables and matrices */
.dhr-table-wrap { overflow: auto; }
.dhr-table { width: 100%; border-collapse: collapse; font-size: 0.78rem; font-variant-numeric: tabular-nums; }
.dhr-table th {
  position: sticky; top: 0; z-index: 1; padding: 5px 8px; border-bottom: 2px solid var(--dhr-ink); background: #ffffff;
  color: var(--dhr-ink); font-weight: 600; text-align: left; vertical-align: bottom; white-space: normal; line-height: 1.2;
}
.dhr-table th small { display: block; color: var(--dhr-faint); font-weight: 400; }
.dhr-table th.num { text-align: right; }
.dhr-table th.sortable { cursor: pointer; }
.dhr-table th.grp { border-bottom: 1px solid var(--dhr-border); text-align: center; }
.dhr-table thead tr + tr th { top: 24px; }
.dhr-table th.num { min-width: 56px; max-width: 120px; }
.dhr-table td { padding: 4px 8px; border-bottom: 1px solid var(--dhr-line); white-space: nowrap; }
.dhr-table tbody tr:nth-child(even) td { background-color: #faf9f8; }
.dhr-table tbody tr.pick { cursor: pointer; }
.dhr-table tbody tr.pick:hover td { background-color: #f3f2f1; }
.dhr-table tbody tr.dim td { opacity: 0.4; }
.dhr-table tfoot td { position: sticky; bottom: 0; border-top: 2px solid var(--dhr-ink); border-bottom: 0; background: #ffffff; font-weight: 700; }
.dhr-table .num { text-align: right; }
.dhr-table .sticky { position: sticky; left: 0; z-index: 1; }
.dhr-table th.sticky { z-index: 2; }
.dhr-table td.sticky { background: #ffffff; }
.dhr-table tbody tr:nth-child(even) td.sticky { background: #faf9f8; }
.dhr-row-label { max-width: 220px; overflow: hidden; font-weight: 600; text-overflow: ellipsis; }
.dhr-row-label small { color: var(--dhr-faint); font-weight: 400; }
.dhr-table .total { font-weight: 700; }
.dhr-table td.good { color: var(--dhr-good); font-weight: 600; }
.dhr-table td.warn { color: var(--dhr-warn); font-weight: 600; }
.dhr-table td.bad { color: var(--dhr-bad); font-weight: 600; }
.dhr-table .strong { font-weight: 600; }
.dhr-table .muted { color: var(--dhr-faint); }
.dhr-table.small { font-size: 0.74rem; }
.dhr-table.small td, .dhr-table.small th { padding: 3px 6px; }
.dhr-table-unit { margin-top: 3px; color: var(--dhr-faint); font-size: 0.68rem; }
.dhr-status { padding: 1px 6px; border-radius: 3px; background: #f3f2f1; color: var(--dhr-muted); font-size: 0.68rem; font-weight: 600; }
.dhr-select { height: 26px; padding: 2px 6px; border: 1px solid var(--dhr-border); border-radius: 3px; background: #ffffff; color: var(--dhr-ink); font: inherit; font-size: 0.76rem; }

/* Heat map */
.dhr-heat { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; }
.dhr-heat-grid { display: grid; gap: 2px; align-items: stretch; font-size: 0.66rem; }
.dhr-heat-col { overflow: hidden; color: var(--dhr-muted); text-align: center; white-space: nowrap; }
.dhr-heat-row { overflow: hidden; color: var(--dhr-muted); text-overflow: ellipsis; white-space: nowrap; }
.dhr-heat-cell { min-height: 14px; border-radius: 2px; }
.dhr-heat-scale { display: flex; align-items: center; justify-content: flex-end; gap: 6px; color: var(--dhr-muted); font-size: 0.68rem; }
.dhr-heat-scale i { width: 110px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, rgba(18, 35, 158, 0.08), rgba(18, 35, 158, 0.93)); }

/* Status timeline */
.dhr-tl-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 6px; }
.dhr-tl-day { margin-right: 4px; font-size: 0.8rem; font-weight: 700; }
.dhr-tl-legend { display: inline-flex; flex-wrap: wrap; gap: 4px 10px; margin-left: auto; color: var(--dhr-muted); font-size: 0.68rem; }
.dhr-tl-legend span { display: inline-flex; align-items: center; gap: 4px; }
.dhr-tl { position: relative; overflow-y: auto; }
.dhr-tl-axis, .dhr-tl-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: 8px; }
.dhr-tl-axis { position: sticky; top: 0; z-index: 2; height: 18px; background: #ffffff; }
.dhr-tl-row { height: 20px; }
.dhr-tl-row:nth-child(odd) { background: #faf9f8; }
.dhr-tl-name { overflow: hidden; font-size: 0.72rem; text-overflow: ellipsis; white-space: nowrap; }
.dhr-tl-name small { color: var(--dhr-faint); }
.dhr-tl-track { position: relative; height: 14px; }
.dhr-tl-axis .dhr-tl-track { height: 18px; }
.dhr-tl-tick { position: absolute; top: 2px; transform: translateX(-50%); color: var(--dhr-muted); font-size: 0.64rem; white-space: nowrap; }
.dhr-tl-shift { position: absolute; top: -3px; bottom: -3px; width: 0; border-left: 1px dashed #a19f9d; }
.dhr-tl-ev { position: absolute; top: 1px; bottom: 1px; border-radius: 1px; background: var(--c); }
.dhr-tl-ev:hover { z-index: 1; outline: 2px solid var(--dhr-ink); }
.dhr-tl-tip { position: sticky; bottom: 0; z-index: 3; padding: 6px 9px; border: 1px solid var(--dhr-border); border-radius: 4px; background: #ffffff; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14); font-size: 0.74rem; }
.dhr-tl-tip small { color: var(--dhr-muted); }

/* Block map */
.dhr-map-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 6px; }
.dhr-map-scale { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-left: auto; color: var(--dhr-muted); font-size: 0.68rem; }
.dhr-map-scale span { display: inline-flex; align-items: center; gap: 4px; }
.dhr-map-ramp { display: inline-block; width: 90px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #ffeda0, #c4314b); }
.dhr-map-ramp.mined { background: linear-gradient(90deg, #deebf7, #12239e); }
.dhr-map { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.dhr-map.with-loads { grid-template-columns: minmax(0, 1fr) minmax(220px, 40%); }
.dhr-map-svg { width: 100%; height: 100%; border-radius: 4px; background: #f6f5f3; }
.dhr-block { stroke: #ffffff; stroke-width: 0.8; vector-effect: non-scaling-stroke; cursor: pointer; transition: opacity 120ms ease; }
.dhr-block:hover { stroke: var(--dhr-ink); stroke-width: 1.6; }
.dhr-block.on { stroke: var(--dhr-ink); stroke-width: 2.4; }
.dhr-block.done { opacity: 0.55; }
.dhr-map-tip { position: absolute; top: 8px; left: 8px; z-index: 3; max-width: 300px; padding: 7px 9px; border: 1px solid var(--dhr-border); border-radius: 4px; background: rgba(255, 255, 255, 0.96); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14); font-size: 0.74rem; line-height: 1.5; pointer-events: none; }
.dhr-map-loads { display: flex; min-width: 0; flex-direction: column; overflow: auto; }
.dhr-map-loads-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; font-size: 0.8rem; }

/* Metal balance */
.dhr-split { display: flex; height: 22px; margin-bottom: 8px; overflow: hidden; border-radius: 4px; background: #f3f2f1; font-size: 0.68rem; font-weight: 600; }
.dhr-split span { display: flex; align-items: center; min-width: 0; padding: 0 6px; overflow: hidden; background: var(--c); color: #ffffff; text-overflow: ellipsis; white-space: nowrap; }
.dhr-table tr.type-feed td.dhr-row-label { color: var(--dhr-navy); }
.dhr-table tr.type-product td.dhr-row-label { color: var(--dhr-good); }

/* Reconciliation, period table */
.dhr-table.recon td.num, .dhr-table.periods td.num { min-width: 46px; }
.dhr-table.periods td.dhr-row-label small { margin-left: 4px; }

/* Shift report */
.dhr-shift { display: flex; flex-direction: column; gap: 12px; }
.dhr-shift-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 16px; padding-bottom: 8px; border-bottom: 2px solid var(--dhr-ink); }
.dhr-shift-head h3 { margin: 0; font-size: 1.2rem; font-weight: 700; }
.dhr-shift-sub { color: var(--dhr-muted); font-size: 0.8rem; }
.dhr-shift-nav { display: flex; flex-wrap: wrap; gap: 4px; }
.dhr-shift-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.dhr-shift-kpi { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border: 1px solid var(--dhr-line); border-radius: 4px; background: #faf9f8; }
.dhr-shift-kpi .name { overflow: hidden; color: var(--dhr-muted); font-size: 0.72rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.dhr-shift-kpi b { font-size: 1.15rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.dhr-shift-kpi small { color: var(--dhr-muted); font-size: 0.72rem; font-weight: 400; }
.dhr-shift-kpi .good { color: var(--dhr-good); font-size: 0.7rem; font-weight: 600; }
.dhr-shift-kpi .bad { color: var(--dhr-bad); font-size: 0.7rem; font-weight: 600; }
.dhr-shift-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.dhr-shift-cols h4, .dhr-shift-notes h4 { margin: 0 0 6px; padding-bottom: 3px; border-bottom: 1px solid var(--dhr-line); color: var(--dhr-ink); font-size: 0.82rem; font-weight: 700; }
.dhr-dotmark { margin-right: 5px; border-radius: 50%; vertical-align: -1px; }
.dhr-shift-notes .lines { display: flex; flex-direction: column; gap: 22px; padding: 14px 0 6px; }
.dhr-shift-notes .lines i { display: block; border-bottom: 1px solid var(--dhr-border); }
.dhr-shift-notes .signs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; padding-top: 30px; color: var(--dhr-muted); font-size: 0.74rem; }
.dhr-shift-notes .signs span { padding-top: 4px; border-top: 1px solid var(--dhr-ink); }

/* ==== Focus mode ("Show data") and the AI summary ==== */
.dhr-focus-backdrop { position: fixed; inset: 0; z-index: 1300; background: rgba(0, 0, 0, 0.35); }
.dhr-focus {
  position: fixed; top: 5vh; left: 50%; z-index: 1301; display: flex; width: min(1100px, 94vw); max-height: 90vh; flex-direction: column; gap: 10px; box-sizing: border-box;
  padding: 12px 14px; transform: translateX(-50%); border-radius: 8px; background: var(--dhr-canvas); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); overflow: hidden;
}
.dhr-focus-head { display: flex; align-items: center; gap: 6px; font-size: 0.95rem; }
.dhr-focus .dhr-visual { flex: none; }
.dhr-focus-data { display: flex; min-height: 0; flex: 1 1 auto; flex-direction: column; gap: 4px; padding: 8px 10px; border-radius: 6px; background: #ffffff; overflow: hidden; }
.dhr-focus-data .dhr-table-wrap { max-height: 32vh; }
.dhr-focus-sub { color: var(--dhr-muted); font-size: 0.74rem; font-weight: 600; }
.dhr-summary {
  position: absolute; top: 40px; right: 0; bottom: 0; z-index: 20; display: flex; width: min(420px, 92%); flex-direction: column; gap: 8px; box-sizing: border-box;
  padding: 14px 16px; border-left: 1px solid var(--dhr-border); background: #ffffff; box-shadow: -10px 0 30px rgba(0, 0, 0, 0.12); overflow-y: auto;
}
.dhr-summary-head { display: flex; align-items: center; gap: 6px; color: var(--dhr-ink); font-size: 1rem; }
.dhr-summary-head b { color: var(--dhr-olive); }
.dhr-summary-sub { color: var(--dhr-muted); font-size: 0.74rem; }
.dhr-summary-text { font-size: 0.86rem; line-height: 1.55; }
.dhr-summary-text p { margin: 0 0 8px; }
.dhr-summary-text p.bullet { position: relative; padding-left: 14px; }
.dhr-summary-text p.bullet::before { position: absolute; left: 2px; content: "•"; color: var(--dhr-blue); }
.dhr-summary-text h4 { margin: 10px 0 4px; font-size: 0.9rem; }
.dhr-summary-foot { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--dhr-line); color: var(--dhr-faint); font-size: 0.7rem; }

/* ==== Tablets and phones: 6 columns, then 2; the rows in the page's order ==== */
@media (max-width: 1100px) {
  .dhr-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .dhr-grid .dhr-visual { grid-column: auto / span 6; grid-row: auto / span var(--h); }
  .dhr-grid .dhr-visual.w-1, .dhr-grid .dhr-visual.w-2 { grid-column: auto / span 2; }
  .dhr-grid .dhr-visual.w-3, .dhr-grid .dhr-visual.w-4, .dhr-grid .dhr-visual.w-5 { grid-column: auto / span 3; }
  .dhr-map.with-loads { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .dhr-canvas { padding: 8px; }
  .dhr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .dhr-grid .dhr-visual, .dhr-grid .dhr-visual.w-3, .dhr-grid .dhr-visual.w-4, .dhr-grid .dhr-visual.w-5 { grid-column: auto / span 2; }
  .dhr-grid .dhr-visual.type-card { grid-column: auto / span 1; }
  .dhr-card-value { font-size: 1.25rem; }
  .dhr-chrome-app, .dhr-chrome-sep, .dhr-chrome-title { display: none; }
  .dhr-slicer { min-width: 0; max-width: none; flex: 1 1 45%; }
  .dhr-shift-cols { grid-template-columns: minmax(0, 1fr); }
  .dhr-donut { grid-template-columns: minmax(90px, 40%) minmax(0, 1fr); }
  .dhr-tl-axis, .dhr-tl-row { grid-template-columns: 90px minmax(0, 1fr); }
}

/* ==== Print (or save as PDF): the report alone, light, its tiles whole ==== */
@media print {
  body:has(.dhr) .os-shell, body:has(.dhr) .crumbs, body:has(.dhr) .apptabs, body:has(.dhr) .rp-depts, body:has(.dhr) .rp-head, body:has(.dhr) .rp-meta,
  .dhr .no-print, .dhr-vtools, .dhr-summary, .dhr-focus, .dhr-focus-backdrop, .dhr-slicer-menu { display: none !important; }
  html:has(.dhr), body:has(.dhr) { height: auto; background: #ffffff; }
  body:has(.dhr) .content { display: block; overflow: visible; padding: 0; }
  body:has(.dhr) .rp { display: block; }
  .dhr { border: 0; box-shadow: none; background: #ffffff; }
  .dhr-chrome { border-bottom: 2px solid var(--dhr-ink); background: #ffffff; color: var(--dhr-ink); }
  .dhr-canvas { padding: 0; }
  .dhr-header { padding: 6px 0; border-bottom: 1px solid var(--dhr-border); border-radius: 0; background: none; color: var(--dhr-ink); }
  .dhr-slicer-value { border-color: var(--dhr-border); }
  .dhr-visual { break-inside: avoid; border: 1px solid var(--dhr-line); box-shadow: none; }
  .dhr-table-wrap, .dhr-bars, .dhr-tl, .dhr-heat { max-height: none !important; overflow: visible; }
  .dhr-table th, .dhr-table tfoot td { position: static; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ==== Dark theme: the report keeps its light look (like .pbi); the light tokens again inside it ==== */
:root[data-theme="dark"] .dhr {
  --background: #f7f5ef;
  --panel: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --faint: #9ca3af;
  --border: rgba(0, 0, 0, 0.1);
  --rule: rgba(0, 0, 0, 0.07);
  --chip: #eaeaea;
  --field: #ffffff;
  color-scheme: light;
}

/* ==== The Reporting portal (Client\Apps\Portal\PortalPage.razor): the icon of a Filon tab ==== */
.rp-tab.kind-dh .mud-icon-root { color: #118dff; }
:root[data-theme="dark"] .rp-tab.kind-dh .mud-icon-root { color: #5bb0ff; }
.rp-tab.kind-dh.active .mud-icon-root { color: var(--os-on-accent-fill); }   /* on the gold fill of the active tab */
:root[data-theme="dark"] .rp-tab.kind-dh.active .mud-icon-root { color: var(--on-accent); }

/* Wide tables of figures in a narrow tile (F1/F2/F3, day/MTD/YTD): tighter */
.dhr-table.recon th.num, .dhr-table.periods th.num { min-width: 0; }
.dhr-table.recon td, .dhr-table.recon th { padding-right: 5px; padding-left: 5px; }
