/* Overview and reporting: compact field-operations surfaces, with SOS identity intact. */
.dash-figures { display: grid; grid-template-columns: repeat(4, minmax(125px, 1fr)); }
.dash-figures .figure { min-width: 0; border-bottom: 1px solid var(--line); }
.dash-figures .figure:nth-child(4n) { border-inline-end: 0; }
.dash-figures .figure:nth-child(n + 5) { background: #f5fafc; }
.last-count-panel { margin-bottom: 18px; border-inline-start: 4px solid var(--sos); }
.last-count-panel .panel-head { justify-content: space-between; }
.last-count-panel .eyebrow { margin: 0 0 3px; color: var(--muted); font-size: var(--step--1); }
.last-count-facts { display: grid; grid-template-columns: repeat(4, minmax(110px, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.last-count-fact { padding: 13px 14px 4px 0; }
.last-count-fact b { display: block; color: var(--navy); font-size: var(--step-2); font-variant-numeric: tabular-nums; }
.last-count-fact span { color: var(--muted); font-size: var(--step--1); }
.last-count-time { margin: 5px 0 0; color: var(--muted); font-size: var(--step--1); font-variant-numeric: tabular-nums; }
.last-count-review { grid-column: 1 / -1; display: flex; align-items: flex-start; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 7px; }
.last-count-review p { margin: 1px 0 0; color: var(--muted); font-size: var(--step--1); }
.count-review-badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 10px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.count-review-badge.approved { color: var(--sos-deep); background: var(--sos-tint); }
.count-review-badge.pending { color: var(--wait-ink); background: var(--wait-bg); }
.count-review-badge.rejected { color: var(--bad-ink); background: var(--bad-bg); }
.count-review-badge.legacy { color: #56626e; background: var(--stale-bg); }
.last-count-empty { border-inline-start-color: var(--line); }
.last-count-empty p:last-child { margin: 5px 0 0; }
.overview-charts { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 18px; }
.dash-chart { min-width: 0; padding: 16px 18px; }
.dash-chart h2 { margin-bottom: 10px; }
.chart-plot { min-width: 0; overflow-x: auto; }
.dash-svg { display: block; width: 100%; min-width: 360px; height: auto; overflow: visible; font-family: inherit; }
.chart-axis { stroke: #8498a8; stroke-width: 1.2; }
.chart-gridline { stroke: #e5edf2; stroke-width: 1; stroke-dasharray: 3 4; }
.chart-tick { fill: var(--muted); font-size: 11px; }
.chart-label { fill: var(--ink); font-size: 12px; }
.chart-value { fill: var(--navy); font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.chart-bar { fill: #61A9BD; }
.chart-empty { padding: 28px 8px; text-align: center; }
.chart-line { stroke: #0079ad; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart-point { fill: #fff; stroke: #0079ad; stroke-width: 3; }
.chart-bar-found { fill: #61A9BD; }
.chart-bar-missing { fill: #CED14E; }
.chart-unit { fill: var(--muted); font-size: 11px; font-weight: 600; }
.chart-footer { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.chart-legend { display: flex; gap: 12px; flex-wrap: wrap; margin-inline-start: auto; color: var(--muted); font-size: var(--step--1); }
.chart-legend span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.chart-legend .key-found { background: #61A9BD; }
.chart-legend .key-missing { background: #CED14E; }
.chart-key { margin-inline-start: auto; color: var(--muted); font-size: var(--step--1); white-space: nowrap; }
.chart-key i { display: inline-block; width: 9px; height: 9px; margin-inline-end: 6px; border-radius: 50%; background: #0079ad; }
.overview-lower { grid-template-columns: minmax(0, 1.6fr) minmax(270px, 1fr); align-items: start; }
.dashboard-map-head { align-items: flex-start; flex-wrap: wrap; }
.dashboard-map-controls { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-inline-start: auto; }
.dashboard-map-controls .field { min-width: min(250px, 100%); }
.dashboard-map-controls .field label { font-size: var(--step--1); }
.dashboard-map-controls select.input { width: 100% !important; }
.dashboard-map-site { color: var(--navy); font-size: var(--step--1); font-weight: 600; padding: 9px 0; }
.dashboard-scope-note { margin: 0 0 12px; padding: 8px 11px; border-inline-start: 3px solid var(--sos); background: #f1f8fb; color: var(--muted); font-size: var(--step--1); }
.recent-observation { display: grid; justify-items: end; gap: 4px; margin-inline-start: auto; }
.reports-shortcut { border-top: 3px solid var(--sos); }
.reporting-filters { margin-bottom: 16px; padding: 18px; }
.report-filter-grid { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 12px; }
.report-filter { min-width: 0; }
.report-search-filter { grid-column: span 2; }
.report-filter-actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; border-top: 1px solid var(--line); padding-top: 13px; margin-top: 12px; }
.date-semantics { margin: 12px 0 0; }
.report-result-head { justify-content: space-between; align-items: flex-start; }
.report-result-head h2 { margin-bottom: 3px; }
.report-result-head p { margin: 0; }
.reporting-results { min-width: 0; }
.report-table-host { min-width: 0; }
.reporting-table { min-width: 850px; }
.reporting-table td { white-space: nowrap; }
.report-empty { padding: 34px 16px; }
.report-empty b { display: block; color: var(--navy); margin-bottom: 3px; }
.report-error { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.report-skeleton { height: 48px; margin: 10px 0; }
.reporting-pager { justify-content: center; }
.reporting-pager .btn { min-height: 38px; }
.report-filter[hidden] { display: none; }
.assurance-shortcut { border-top: 3px solid var(--sos); }
.assurance-shortcut h2 { margin-bottom: 5px; }
.assurance-shortcut p { margin: 0 0 12px; }
.inventory-assurance { min-width: 0; }
.inventory-assurance > .page-head { margin-bottom: 15px; }
.assurance-filters { margin-bottom: 12px; padding: 16px 18px; }
.assurance-filter-grid { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)); gap: 12px; }
.assurance-filter-grid .field { min-width: 0; }
.assurance-filter-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 12px; margin-top: 10px; border-top: 1px solid var(--line); }
.assurance-filter-error { margin: 8px 0 0; color: var(--bad-ink); font-size: var(--step--1); }
.assurance-scope-note { margin: 0 0 12px; padding: 9px 12px; border-inline-start: 3px solid var(--sos); background: #f1f8fb; color: var(--navy); font-size: var(--step--1); font-variant-numeric: tabular-nums; }
.assurance-summary { margin-bottom: 14px; border-top: 3px solid var(--sos); }
.assurance-summary .panel-head { align-items: flex-start; }
.assurance-summary h2, .assurance-summary h3 { margin-bottom: 4px; }
.assurance-summary .eyebrow { margin: 0 0 3px; color: var(--muted); font-size: var(--step--1); }
.assurance-interval, .assurance-count { color: var(--navy); font-size: var(--step--1); font-weight: 700; white-space: nowrap; }
.assurance-metrics { display: grid; grid-template-columns: repeat(7, minmax(95px, 1fr)); border-block: 1px solid var(--line); }
.assurance-metric { min-width: 0; padding: 13px 10px; border-inline-end: 1px solid var(--line); }
.assurance-metric:last-child { border-inline-end: 0; }
.assurance-metric b { display: block; color: var(--navy); font-size: var(--step-2); font-variant-numeric: tabular-nums; }
.assurance-metric span { display: block; color: var(--muted); font-size: 12px; line-height: 1.35; }
.assurance-metric.positive b { color: var(--sos-deep); }
.assurance-metric.attention b { color: var(--wait-ink); }
.assurance-summary-lower { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 22px; padding-top: 14px; }
.assurance-summary-lower h3 { font-size: var(--step-0); }
.assurance-summary-lower p { margin: 2px 0 9px; }
.assurance-kind-totals { display: flex; flex-wrap: wrap; gap: 7px; }
.assurance-kind-total { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); background: #f5fafc; border-radius: 5px; padding: 6px 9px; font-size: var(--step--1); }
.assurance-kind-total b, .assurance-aging b { color: var(--navy); font-variant-numeric: tabular-nums; }
.assurance-aging { display: flex; flex-wrap: wrap; gap: 7px 14px; margin: 0; padding: 0; list-style: none; }
.assurance-aging li { display: flex; gap: 8px; align-items: baseline; font-size: var(--step--1); }
.assurance-caveats { margin-bottom: 14px; padding: 13px 17px; border-inline-start: 4px solid #d29b25; background: #fffaf0; }
.assurance-caveats summary { color: var(--navy); font-weight: 700; cursor: pointer; }
.assurance-caveats ul { margin: 9px 0 0; padding-inline-start: 20px; color: var(--ink); font-size: var(--step--1); line-height: 1.55; }
.assurance-caveats li + li { margin-top: 5px; }
.assurance-site-panel, .assurance-rooms, .assurance-exceptions { min-width: 0; margin-bottom: 14px; }
.assurance-site-panel .panel-head, .assurance-rooms .panel-head, .assurance-exceptions .panel-head { align-items: flex-start; justify-content: space-between; }
.assurance-site-panel h2, .assurance-rooms h2, .assurance-exceptions h2 { margin-bottom: 3px; }
.assurance-site-panel .panel-head p, .assurance-rooms .panel-head p, .assurance-exceptions .panel-head p { margin: 0; }
.assurance-table-scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; }
.assurance-table { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
.assurance-table th, .assurance-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
.assurance-table thead th { color: var(--muted); background: #f5fafc; font-size: 12px; font-weight: 700; white-space: nowrap; }
.assurance-table tbody th { color: var(--navy); font-weight: 700; }
.assurance-table td { font-variant-numeric: tabular-nums; }
.assurance-table td a, .assurance-table th a { text-underline-offset: 2px; }
.assurance-table tr:last-child > * { border-bottom: 0; }
.assurance-room-table { min-width: 1050px; }
.assurance-exception-table { min-width: 850px; }
.assurance-pager { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.assurance-pager .btn { min-height: 38px; }
.assurance-empty { padding: 26px 14px; border: 1px dashed var(--line); border-radius: 5px; background: #f8fbfc; text-align: center; }
.assurance-empty b { display: block; color: var(--navy); margin-bottom: 4px; }
.assurance-empty p { margin: 0; color: var(--muted); font-size: var(--step--1); }
.assurance-error { border-inline-start: 4px solid var(--bad-ink); }
.assurance-error p { margin: 5px 0 12px; color: var(--muted); }
.dashboard-section { min-width: 0; margin-bottom: 14px; }
.dashboard-section-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 12px; border-bottom: 1px solid var(--line); padding-bottom: 9px; margin-bottom: 12px; }
.dashboard-section-meta > span:first-child { color: var(--navy); font-size: var(--step-0); font-weight: 700; margin-inline-end: auto; }
.dashboard-data-status, .dashboard-asof { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.dashboard-data-status { border-radius: 999px; padding: 3px 8px; background: #edf5f7; }
.dashboard-section.is-stale { border-inline-start: 4px solid #c08b24; }
.dashboard-section.is-stale .dashboard-data-status { color: #795b1e; background: #fff4d7; }
.dashboard-refresh { min-height: 32px; padding: 5px 10px; font-size: 12px; }
.dashboard-section-error { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; padding: 9px 11px; border-inline-start: 3px solid #b57b1a; background: #fff8e9; color: var(--ink); font-size: var(--step--1); }
.dashboard-section-error[hidden] { display: none; }
.dashboard-section-error [role="alert"] { color: var(--bad-ink); }
.dashboard-section [data-testid="overview-analytics-metrics"] { margin: 0 0 14px; }
.dashboard-section [data-testid="overview-analytics-metrics"] .figure { min-width: 0; border-bottom: 1px solid var(--line); background: #f5fafc; }
.dashboard-map-panel { min-width: 0; }
.overview-charts.grid.two, .overview-lower.grid.two {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}
.dashboard-map-error { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 14px; color: var(--bad-ink); }
.dashboard-map-error p { margin: 0; }
.dashboard-map-error button { flex: 0 0 auto; }
.badge.is-stale { white-space: nowrap; background: #fff2d2; color: #73551b; border: 1px solid #dcc58e; }
.overview-metrics .dash-figures { margin-bottom: 12px; }
.dashboard-section-content > .last-count-panel { margin-bottom: 0; }
.dashboard-exceptions { display: grid; grid-template-columns: 1fr auto; gap: 3px 12px; align-items: center; padding: 10px 12px; border-inline-start: 3px solid #c08b24; background: #fff8e9; }
@media (max-width: 640px) {
  .dashboard-exceptions { grid-template-columns: minmax(0, 1fr); }
  .dashboard-exceptions .btn { min-width: 0; white-space: normal; text-align: start; }
}
.dashboard-exceptions h3, .dashboard-exceptions p { margin: 0; }
.dashboard-exceptions h3 { color: var(--navy); font-size: var(--step-0); }
.dashboard-exceptions p { grid-column: 1; }
.dashboard-exceptions .btn { grid-column: 2; grid-row: 1 / span 2; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 1000px) {
  .dash-figures { grid-template-columns: repeat(2, minmax(130px, 1fr)); }
  .dash-figures .figure:nth-child(2n) { border-inline-end: 0; }
  .dash-figures .figure:nth-child(4n) { border-inline-end: 0; }
  .overview-charts { grid-template-columns: 1fr; }
  .report-filter-grid { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
  .assurance-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .assurance-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .assurance-metric:nth-child(4n) { border-inline-end: 0; }
  .assurance-summary-lower { grid-template-columns: 1fr; gap: 14px; }
}
@media (max-width: 640px) {
  .dash-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-figures .figure { padding: 12px; }
  .dash-figures .figure b { font-size: 1.55rem; }
  .last-count-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .last-count-panel { padding: 15px; }
  .last-count-review { flex-direction: column; }
  .overview-lower { grid-template-columns: 1fr; }
  .dashboard-section-meta { align-items: flex-start; }
  .dashboard-section-meta > span:first-child { flex-basis: 100%; }
  .dashboard-section-meta .dashboard-refresh { margin-inline-start: auto; }
  .dashboard-exceptions { grid-template-columns: 1fr; }
  .dashboard-exceptions p, .dashboard-exceptions .btn { grid-column: auto; grid-row: auto; }
  .dashboard-map-controls { width: 100%; margin-inline-start: 0; align-items: stretch; }
  .dashboard-map-controls .field { flex: 1 1 100%; }
  .dashboard-map-site { padding: 0; }
  .room-list-copy { flex: 1; }
  .report-filter-grid { grid-template-columns: 1fr; }
  .report-search-filter { grid-column: auto; }
  .report-result-head { flex-direction: column; }
  .report-result-head .btn { width: 100%; }
  .report-error { align-items: flex-start; flex-direction: column; }
  .assurance-filter-grid { grid-template-columns: 1fr; }
  .assurance-filter-actions .btn { flex: 1 1 auto; }
  .assurance-summary .panel-head, .assurance-site-panel .panel-head, .assurance-rooms .panel-head, .assurance-exceptions .panel-head { flex-direction: column; }
  .assurance-interval, .assurance-count { white-space: normal; }
  .assurance-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .assurance-metric:nth-child(2n) { border-inline-end: 0; }
  .assurance-metric { border-bottom: 1px solid var(--line); }
  .assurance-pager { gap: 8px; }
  .assurance-pager .small { flex-basis: 100%; order: -1; text-align: center; }
}
