/**
 * SAMP v4.8.2 — Enterprise compact density system
 * Loaded last. This file is the single authority for information density.
 * It intentionally replaces legacy card minimums without changing workflows.
 */

:root {
  --samp-sidebar-width: 216px;
  --samp-mobile-nav-height: 64px;
  --samp-content-pad: clamp(6px, .55vw, 10px);
  --samp-section-gap: clamp(6px, .45vw, 9px);
  --samp-card-gap: clamp(5px, .38vw, 7px);
  --samp-panel-pad: clamp(7px, .5vw, 10px);
  --samp-radius-sm: 7px;
  --samp-radius-md: 10px;
  --samp-radius-lg: 13px;
  --samp-shadow: 0 3px 12px rgba(17, 55, 73, .045);
}

html { font-size: 14px; }
body { font-size: 13px; line-height: 1.45; }

/* Application shell */
.sidebar {
  width: var(--samp-sidebar-width);
  padding: 12px 10px;
}
.sidebar .brand {
  gap: 8px;
  padding: 0 2px 12px;
}
.sidebar .brand-mark { width: 36px; height: 36px; border-radius: 10px; font-size: 19px; }
.sidebar .brand strong { font-size: 12px; line-height: 1.35; }
.sidebar .brand small { font-size: 9px; line-height: 1.4; }
.sidebar nav { margin-top: 10px; gap: 3px; }
.sidebar .nav {
  min-height: 38px;
  padding: 7px 8px;
  gap: 7px;
  border-radius: 8px;
  font-size: 12.5px;
  line-height: 1.25;
}
.sidebar .side-note,
.sidebar .side-account { padding: 9px; border-radius: 9px; font-size: 10.5px; }
.sidebar .side-account button { min-height: 32px; padding: 6px 8px; }

.topbar {
  min-height: 60px;
  padding: 8px var(--samp-content-pad);
  gap: 8px;
}
.topbar h1 { font-size: clamp(18px, 1.35vw, 23px); line-height: 1.25; }
.topbar p { font-size: 10px; }
.top-actions { gap: 5px; }
main > section.view,
#command-center-view.command-center-view { padding: var(--samp-content-pad); }

/* Shared controls and panels */
.panel,
.metric,
.team-card,
.cc-kpi,
.scouting-metric,
.shelter-metric,
.cc-field-care-metric,
.cc-chart-card,
.period-bar {
  border-radius: var(--samp-radius-md);
  box-shadow: var(--samp-shadow);
}
.panel { padding: var(--samp-panel-pad); }
.panel-title,
.section-actions,
.table-summary,
.cc-chart-head,
.scouting-page-head,
.shelter-page-head {
  gap: 7px;
  margin-bottom: 7px;
}
.panel h2,
.section-actions h2,
.cc-chart-head h3 {
  margin: 0 0 2px;
  font-size: 14px;
  line-height: 1.3;
}
.panel p,
.section-actions p,
.cc-chart-head p { font-size: 10px; line-height: 1.45; }

.primary,
.secondary,
.link-btn {
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 7px;
  font-size: 11.5px;
  line-height: 1.2;
}
main input:not([type="checkbox"]):not([type="radio"]),
main select,
main textarea {
  min-height: 34px;
  padding: 6px 8px;
  border-radius: 7px;
  font-size: 11.5px;
}
.filters,
.reports-filters,
.scouting-filters,
.shelter-filters,
.cc-filter-grid,
.map-filters,
.compact-map-filters { gap: 6px; }

/* Uniform compact KPI language */
.metric,
.cc-kpi,
.shelter-metric,
.cc-field-care-metric,
.scouting-metric {
  min-height: 72px;
  height: 100%;
  padding: 7px 8px;
  border-radius: 9px;
}
.metric .icon,
.cc-kpi-icon,
.shelter-metric > span,
.cc-field-care-icon,
.scouting-metric .icon {
  inset-block-start: 8px;
  inset-inline-start: 8px;
  width: 29px;
  height: 29px;
  flex-basis: 29px;
  border-radius: 8px;
  font-size: 14px;
}
.metric > div:not(.icon),
.cc-kpi-copy,
.shelter-metric > div,
.cc-field-care-copy,
.scouting-metric > div:not(.icon) {
  min-height: 56px;
  grid-template-rows: auto minmax(22px, auto) auto;
  gap: 1px;
}
.metric > div:not(.icon) > span:first-child,
.cc-kpi-copy > small:first-child,
.shelter-metric > div > small:first-child,
.cc-field-care-copy > small:first-child,
.scouting-metric > div:not(.icon) > span:first-child {
  min-height: 17px;
  padding-inline-start: 35px;
  font-size: clamp(9.5px, .62rem + .08vw, 11px);
  line-height: 1.25;
}
.metric b,
.cc-kpi b,
.shelter-metric b,
.cc-field-care-metric b,
.scouting-metric b {
  font-size: clamp(19px, 1.28vw, 24px);
  line-height: 1;
}
.metric .metric-note,
.cc-kpi em,
.cc-field-care-metric em,
.shelter-metric small:last-child,
.scouting-metric small:last-child { font-size: 8px; line-height: 1.25; }

.cards,
.team-grid,
.scouting-metrics,
.shelter-metrics,
.cc-kpi-grid,
.cc-scouting-kpis,
.cc-field-care-metrics { gap: var(--samp-card-gap); margin-bottom: var(--samp-section-gap); }
.grid-two { gap: var(--samp-card-gap); margin-bottom: var(--samp-section-gap); align-items: start; }

/* Main information dashboard */
#command-center-view .cc-hero-compact {
  min-height: 62px;
  margin-bottom: 7px;
  padding: 10px 16px;
  border-radius: 12px;
}
#command-center-view .cc-hero-compact .cc-hero-copy h2 {
  margin: 0;
  font-size: clamp(21px, 2vw, 29px);
  line-height: 1.15;
}
#command-center-view .cc-hero-actions { min-width: 0; gap: 5px; }
#command-center-view .cc-action-row { gap: 5px; }
#command-center-view .cc-export-menu { width: 200px; }

#command-center-view .cc-filter-dock {
  top: 5px;
  margin-bottom: 7px;
  padding: 7px 8px;
  border-radius: 10px;
  box-shadow: 0 5px 16px rgba(17, 55, 73, .08);
}
#command-center-view .cc-filter-toolbar { gap: 6px; }
#command-center-view .cc-filter-heading { gap: 6px; }
#command-center-view .cc-filter-heading span { padding: 3px 6px; font-size: 8.5px; }
#command-center-view .cc-filter-heading b { font-size: 10px; }
#command-center-view .cc-quick-periods { padding: 2px; border-radius: 7px; }
#command-center-view .cc-quick-periods button,
#command-center-view .cc-filter-collapse { padding: 4px 7px; border-radius: 6px; font-size: 9px; }
#command-center-view .cc-filter-content {
  gap: 6px;
  margin-top: 6px;
  padding-top: 6px;
}
#command-center-view.cc-dashboard-2026 .cc-filter-grid { gap: 5px; }
#command-center-view.cc-dashboard-2026 .cc-filter-grid input,
#command-center-view.cc-dashboard-2026 .cc-filter-grid select,
#command-center-view.cc-dashboard-2026 .cc-filter-actions button {
  height: 32px;
  min-height: 32px;
  padding: 5px 7px;
  font-size: 10px;
}
#command-center-view.cc-dashboard-2026 .cc-filter-actions { gap: 4px; }

#command-center-view .cc-zone {
  margin: var(--samp-section-gap) 0;
  padding: 7px;
  border-radius: 12px;
  box-shadow: none;
}
#command-center-view .cc-zone::before { height: 2px; }
#command-center-view .cc-zone-header { margin-bottom: 5px; gap: 7px; }
#command-center-view .cc-zone-title { gap: 6px; }
#command-center-view .cc-zone-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 15px;
}
#command-center-view .cc-zone-title h3 { margin: 0; font-size: 15px; line-height: 1.2; }
#command-center-view .cc-zone-title small { font-size: 8px; }
#command-center-view .cc-zone-meta { gap: 4px; }
#command-center-view .cc-zone-meta span,
#command-center-view .cc-zone-meta strong { padding: 3px 6px; font-size: 8.5px; }

#command-center-view.cc-dashboard-2026 .cc-kpi-grid,
#command-center-view.cc-dashboard-2026 .cc-scouting-kpis {
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: var(--samp-card-gap);
  margin-bottom: 6px;
}
#command-center-view.cc-dashboard-2026 .cc-kpi-grid > .cc-kpi:nth-child(n),
#command-center-view.cc-dashboard-2026 .cc-scouting-kpis > .cc-kpi:nth-child(n) { grid-column: auto; }
#command-center-view.cc-dashboard-2026 .cc-kpi {
  min-height: 72px;
  padding: 7px 8px;
  border-radius: 9px;
}
#command-center-view.cc-dashboard-2026 .cc-kpi-icon { width: 29px; height: 29px; flex-basis: 29px; }
#command-center-view.cc-dashboard-2026 .cc-kpi b { font-size: clamp(19px, 1.28vw, 24px); }

#command-center-view .cc-report-analytics-grid,
#command-center-view .cc-field-analytics-grid {
  gap: var(--samp-card-gap);
  margin-top: 6px;
  align-items: start;
}
#command-center-view .cc-report-trend-card { grid-column: span 8; }
#command-center-view .cc-report-mix-card { grid-column: span 4; }
#command-center-view .cc-hourly-card { grid-column: 1 / -1; }
#command-center-view .cc-sector-reports-card,
#command-center-view .cc-top-areas-card,
#command-center-view .cc-period-comparison-card { grid-column: span 4; }
#command-center-view .cc-field-analytics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#command-center-view .cc-field-analytics-column {
  display: grid;
  align-content: start;
  gap: var(--samp-card-gap);
}
#command-center-view .cc-report-analytics-grid > .cc-chart-card,
#command-center-view .cc-field-analytics-grid .cc-chart-card,
#command-center-view .cc-chart-card {
  min-height: 0;
  height: auto;
  padding: 7px 8px;
  border-radius: 10px;
  align-self: start;
  box-shadow: var(--samp-shadow);
}
#command-center-view .cc-chart-head {
  margin-bottom: 4px;
  padding-bottom: 0;
  gap: 5px;
}
#command-center-view .cc-chart-head h3 { font-size: 13px; }
#command-center-view .cc-chart-head p { margin-top: 2px; font-size: 9px; }
#command-center-view .cc-chart-card > .cc-chart-body {
  min-height: 0;
  height: auto;
  align-content: start;
}
#command-center-view .cc-report-trend-card .cc-chart-body { min-height: 158px; }
#command-center-view .cc-report-mix-card .cc-chart-body { min-height: 150px; }
#command-center-view .cc-hourly-card .cc-chart-body { min-height: 174px; }
#command-center-view .cc-svg-chart > svg { max-height: 165px; }
#command-center-view .cc-hourly-scroll > svg { max-height: 160px; }
#command-center-view .cc-trend-summary { gap: 4px; margin-bottom: 2px; }
#command-center-view .cc-trend-summary > span { padding: 3px 6px; font-size: 8px; }
#command-center-view .cc-hourly-activity,
#command-center-view .cc-hourly-insights { gap: 4px; }
#command-center-view .cc-hourly-insights > div { padding: 4px 6px; border-radius: 7px; }
#command-center-view .cc-hourly-insights small { font-size: 7.5px; }
#command-center-view .cc-hourly-insights b { font-size: 12px; }

#command-center-view .cc-bar-list { gap: 3px; }
#command-center-view .cc-bar-row {
  min-height: 16px;
  gap: 5px;
  grid-template-columns: minmax(76px, 1.15fr) minmax(88px, 3fr) 45px;
}
#command-center-view .cc-bar-row.interactive { padding: 1px 2px; border-radius: 5px; }
#command-center-view .cc-bar-row > span,
#command-center-view .cc-bar-row b { font-size: 9px; }
#command-center-view .cc-bar-row > div { height: 6px; }
#command-center-view .cc-comparison-list { gap: 4px; }
#command-center-view .cc-comparison-list > div {
  gap: 4px 6px;
  padding: 5px 6px;
  border-radius: 7px;
}
#command-center-view .cc-comparison-list span { font-size: 9px; }
#command-center-view .cc-comparison-list b { font-size: 15px; }
#command-center-view .cc-comparison-list em { padding: 2px 5px; font-size: 8px; }
#command-center-view .cc-comparison-list small { font-size: 7.5px; }
#command-center-view .cc-empty { min-height: 70px; padding: 8px; }

#command-center-view .cc-report-mix {
  gap: 7px;
  grid-template-columns: minmax(92px, .65fr) minmax(130px, 1.35fr);
}
#command-center-view .cc-report-mix .cc-donut { width: min(118px, 100%); }
#command-center-view .cc-report-mix .cc-donut b { font-size: 18px; }
#command-center-view .cc-mix-list { gap: 3px; }
#command-center-view .cc-mix-item { gap: 5px; padding: 4px 5px; border-radius: 7px; }
#command-center-view .cc-mix-item span { font-size: 8.5px; }
#command-center-view .cc-mix-item b { font-size: 11px; }

/* Field impact cards */
#command-center-view .cc-field-care-card { margin-bottom: 6px; padding: 7px 8px; }
#command-center-view .cc-field-care-card .cc-chart-head { margin-bottom: 5px; padding-bottom: 5px; }
#command-center-view .cc-field-care-card .cc-chart-head h3 { font-size: 13px; }
#command-center-view .cc-field-care-dashboard { gap: 6px; }
#command-center-view .cc-field-care-metrics { gap: 5px; }
#command-center-view .cc-field-care-metric {
  min-height: 66px;
  padding: 6px 7px;
  gap: 7px;
  border-radius: 8px;
}
#command-center-view .cc-field-care-metric::before { width: 3px; }
#command-center-view .cc-field-care-copy { gap: 2px; }
#command-center-view .cc-field-care-metric small { font-size: 9px; line-height: 1.25; }
#command-center-view .cc-field-care-metric b { font-size: 20px; }
#command-center-view .cc-field-care-metric em { font-size: 7.5px; }
#command-center-view .cc-field-care-open { display: none; }
#command-center-view .cc-sterilization-distribution {
  min-height: 62px;
  padding: 6px 8px;
  gap: 5px 10px;
  border-radius: 8px;
  grid-template-columns: minmax(125px, .25fr) minmax(0, 1fr);
}
#command-center-view .cc-sterilization-distribution-head { gap: 2px; padding-inline-end: 8px; }
#command-center-view .cc-sterilization-distribution-head span { font-size: 9px; }
#command-center-view .cc-sterilization-distribution-head b strong { font-size: 17px; }
#command-center-view .cc-sterilization-stack { height: 10px; }
#command-center-view .cc-sterilization-legend { gap: 4px; }
#command-center-view .cc-sterilization-legend button {
  min-height: 28px;
  padding: 4px 6px;
  gap: 5px;
  border-radius: 6px;
}
#command-center-view .cc-sterilization-legend span { font-size: 8px; }
#command-center-view .cc-sterilization-legend b { font-size: 12px; }

#command-center-view .cc-control-radial {
  min-height: 168px;
  gap: 7px;
  grid-template-columns: minmax(160px, .68fr) minmax(230px, 1.32fr);
}
#command-center-view .cc-control-radial-stage { min-height: 168px; }
#command-center-view .cc-control-radial-stage::before { width: 144px; height: 144px; }
#command-center-view .cc-control-radial-svg { width: min(168px, 100%); }
#command-center-view .cc-control-radial-center { width: 88px; min-height: 70px; }
#command-center-view .cc-control-radial-center span { font-size: 8px; }
#command-center-view .cc-control-radial-center b { margin: 2px 0; font-size: 27px; }
#command-center-view .cc-control-radial-center small { font-size: 7px; }
#command-center-view .cc-control-radial-list { gap: 4px; }
#command-center-view .cc-control-radial-item {
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 6px;
  padding: 5px 7px;
  border-radius: 8px;
}
#command-center-view .cc-control-radial-item-icon { width: 28px; height: 28px; border-radius: 7px; }
#command-center-view .cc-control-radial-item-icon::before { width: 11px; height: 11px; border-width: 3px; }
#command-center-view .cc-control-radial-item-head b { font-size: 10px; }
#command-center-view .cc-control-radial-item-head em { padding: 2px 4px; font-size: 7px; }
#command-center-view .cc-control-radial-item-copy > strong { font-size: 18px; }
#command-center-view .cc-control-radial-item-copy > small { font-size: 7px; }
#command-center-view .cc-control-source-track { height: 5px; }
#command-center-view .cc-control-radial-note { padding: 3px 5px; font-size: 7px; }

#command-center-view .cc-sector-executive { gap: 5px; }
#command-center-view .cc-sector-executive-top {
  grid-template-columns: minmax(150px, .55fr) minmax(0, 1.45fr);
  gap: 5px;
}
#command-center-view .cc-sector-leader { min-height: 66px; padding: 7px 9px; border-radius: 8px; }
#command-center-view .cc-sector-leader-kicker { font-size: 8px; }
#command-center-view .cc-sector-leader strong { font-size: 17px; }
#command-center-view .cc-sector-leader > div { gap: 4px; font-size: 8px; }
#command-center-view .cc-sector-overview-metrics { gap: 4px; }
#command-center-view .cc-sector-overview-metrics > div { gap: 4px; padding: 5px; border-radius: 7px; }
#command-center-view .cc-sector-overview-metrics > div > span { width: 25px; height: 25px; flex-basis: 25px; }
#command-center-view .cc-sector-overview-metrics small { min-height: 17px; font-size: 7.5px; }
#command-center-view .cc-sector-overview-metrics b { font-size: 14px; }
#command-center-view .cc-sector-ranking-head { gap: 5px; padding: 0 1px; }
#command-center-view .cc-sector-ranking-head > div:first-child { gap: 1px; }
#command-center-view .cc-sector-ranking-head b { font-size: 10px; }
#command-center-view .cc-sector-ranking-head small,
#command-center-view .cc-sector-ranking-legend { font-size: 7px; }
#command-center-view .cc-sector-ranking-legend { gap: 6px; }
#command-center-view .cc-sector-ranking-list { gap: 3px; }
#command-center-view .cc-sector-rank-row {
  grid-template-columns: 26px minmax(80px, .8fr) auto minmax(100px, 1.45fr) minmax(145px, 1.1fr) 15px;
  gap: 4px;
  padding: 3px 4px;
  border-radius: 7px;
}
#command-center-view .cc-sector-rank-index { width: 22px; height: 22px; border-radius: 6px; font-size: 8px; }
#command-center-view .cc-sector-rank-name { gap: 0; }
#command-center-view .cc-sector-rank-name b { font-size: 9px; }
#command-center-view .cc-sector-rank-name small { font-size: 7px; }
#command-center-view .cc-sector-intensity { padding: 2px 4px; font-size: 6.5px; }
#command-center-view .cc-sector-dual-bars { gap: 2px; }
#command-center-view .cc-sector-dual-bars i { height: 5px; }
#command-center-view .cc-sector-rank-stats { gap: 2px; }
#command-center-view .cc-sector-rank-stats > span {
  min-height: 21px;
  padding: 1px;
  gap: 0;
  border-radius: 5px;
}
#command-center-view .cc-sector-rank-stats small { font-size: 6px; }
#command-center-view .cc-sector-rank-stats b { font-size: 9px; }
#command-center-view .cc-sector-row-action { font-size: 12px; }

#command-center-view .cc-field-impact { gap: 7px; }
#command-center-view .cc-impact-gauge { width: min(120px, 100%); }
#command-center-view .cc-impact-gauge b { font-size: 18px; }
#command-center-view .cc-impact-copy { gap: 4px; }
#command-center-view .cc-impact-total { padding-bottom: 4px; }
#command-center-view .cc-impact-total b { font-size: 17px; }
#command-center-view .cc-impact-lane { gap: 5px; padding: 4px 5px; border-radius: 7px; }
#command-center-view .cc-impact-label span,
#command-center-view .cc-impact-lane em { font-size: 8px; }
#command-center-view .cc-impact-label b { font-size: 10px; }
#command-center-view .cc-impact-track { height: 6px; }

#command-center-view .cc-decision-zone { margin-top: 7px; }
#command-center-view .cc-decision-zone > .panel { border-radius: 10px; }
#command-center-view .cc-executive-summary { padding: 7px; border-radius: 8px; }
#command-center-view .cc-executive-summary ul { gap: 4px; }
#command-center-view .cc-executive-summary li { font-size: 9px; line-height: 1.45; }

/* Dashboard */
#dashboard-view .period-bar {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: end;
  gap: 6px;
  margin-bottom: var(--samp-section-gap);
  padding: 7px;
}
#dashboard-view .period-title { align-self: center; }
#dashboard-view .period-title b { font-size: 11px; }
#dashboard-view .period-title span { font-size: 9px; }
#dashboard-view .period-inputs { gap: 5px; }
#dashboard-view .period-inputs label { font-size: 9px; }
#dashboard-view .period-presets { gap: 3px; }
#dashboard-view .period-presets button { padding: 4px 6px; font-size: 9px; }
#dashboard-view .cards { grid-template-columns: repeat(7, minmax(0, 1fr)); }
#dashboard-view .cards > .metric,
#dashboard-view .cards > .metric:nth-child(n + 5) { grid-column: auto; }
#dashboard-view .bars { height: 165px; padding-top: 12px; gap: 8px; }
#dashboard-view .grouped-bars { height: 112px; }
#dashboard-view .donut-wrap { height: 165px; }
#dashboard-view .donut { width: 118px; height: 118px; }
#dashboard-view .donut::after { width: 80px; height: 80px; }
#dashboard-view .donut b { font-size: 19px; }

/* Reports */
#reports-view .reports-workspace {
  grid-template-columns: minmax(300px, .7fr) minmax(0, 1.5fr);
  gap: var(--samp-card-gap);
}
#reports-view .reports-filter-panel { padding: 7px 8px; }
#reports-view .reports-filters {
  grid-template-columns: minmax(210px, 1.55fr) repeat(6, minmax(82px, 1fr)) repeat(2, minmax(102px, .9fr)) auto auto;
  gap: 5px;
}
#reports-view .reports-filters .report-search-box { min-width: 0; }
#reports-view .reports-map-content { gap: 6px; }
#reports-view .reports-map-pane,
#reports-view .reports-table-pane { min-height: 0; height: auto; align-self: start; }
#reports-view #pending-map { height: clamp(270px, 35dvh, 360px); min-height: 270px; }
#reports-view .map-summary { margin: 4px 0; gap: 4px; }
#reports-view .map-summary span { padding: 3px 5px; font-size: 8.5px; }
#reports-view .integrated-chart { min-height: 152px; margin-top: 5px; padding: 6px 7px 2px; }
#reports-view .integrated-chart .bars { height: 130px; min-height: 130px; padding-top: 28px; }
#reports-view .integrated-chart .grouped-bars { height: 88px; }
#reports-view .chart-head-inline h3 { font-size: 11px; }
#reports-view .chart-head-inline p { font-size: 8.5px; }
#reports-view .reports-table-pane #reports-table-wrap {
  height: auto;
  min-height: 138px;
  max-height: clamp(330px, 61dvh, 650px);
  flex: 0 1 auto;
}
.reports-pager { gap: 5px; margin: 5px 0; padding: 4px 6px; border-radius: 7px; }
.reports-pager .pager-size,
.reports-pager .pager-actions { gap: 4px; }
.reports-pager .pager-size label { font-size: 9px; }
.reports-pager .pager-size select,
.reports-pager .pager-actions button { min-height: 28px; padding: 4px 6px; font-size: 9px; }
.reports-pager .pager-actions span { min-width: 85px; font-size: 9px; }

/* Field scouting */
#scouting-view .scouting-page-head,
#teams-view > .section-actions { margin-bottom: 6px; }
#scouting-view .scouting-page-head > div:first-child { display: none; }
#scouting-view .scouting-page-head { justify-content: flex-start; }
#scouting-view .scouting-page-head h2 { margin-bottom: 2px; font-size: 17px; }
#scouting-view .scouting-page-head p { font-size: 10px; line-height: 1.4; }
#scouting-view .scouting-sync-state {
  gap: 6px;
  margin-bottom: 6px;
  padding: 5px 8px;
  border-radius: 7px;
  font-size: 9.5px;
}
#scouting-view .scouting-filter-panel { margin-bottom: 6px; padding: 7px 8px; }
#scouting-view .scouting-filters {
  grid-template-columns: minmax(220px, 1.8fr) repeat(6, minmax(82px, 1fr)) repeat(2, minmax(104px, .9fr)) auto;
  gap: 5px;
}
#scouting-view .scouting-filters .report-search-box { min-width: 0; grid-column: auto; }
#scouting-view .scouting-filter-hint { margin-top: 4px; font-size: 8.5px; }
#scouting-view .scouting-metrics {
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: var(--samp-card-gap);
  margin-bottom: 6px;
}
#scouting-view .scouting-analysis-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr);
  gap: var(--samp-card-gap);
  margin-bottom: 6px;
  align-items: start;
}
#scouting-view .scouting-map-panel,
#scouting-view .scouting-analysis-panel { min-height: 0; height: auto; align-self: start; }
#scouting-view #scouting-map { height: clamp(250px, 31dvh, 330px); min-height: 250px; }
#scouting-view .scouting-map-counts { gap: 4px; }
#scouting-view .scouting-map-counts span { padding: 3px 6px; font-size: 8.5px; }
#scouting-view .scouting-map-legend { gap: 7px; margin-top: 5px; font-size: 8.5px; }
#scouting-view .scouting-sector-chart {
  height: 170px;
  min-height: 170px;
  padding-top: 30px;
  gap: 6px;
}
#scouting-view .scouting-sector-chart .grouped-bars { height: 104px; }
#scouting-view .scouting-risk-summary { gap: 4px; margin-top: 5px; }
#scouting-view .scouting-risk-summary-item { gap: 2px; padding: 4px 2px; font-size: 8px; }
#scouting-view .scouting-risk-summary-item b { font-size: 13px; }
#scouting-view .scouting-table-wrap { max-height: clamp(410px, 62dvh, 680px); }
#scouting-view .scouting-pagination { gap: 5px; margin-top: 5px; }

/* Teams */
#teams-view .distribution-board { grid-template-columns: minmax(240px, 290px) minmax(0, 1fr); gap: 6px; }
#teams-view .area-bank-panel { top: 5px; max-height: calc(100dvh - 12px); }
#teams-view .team-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr)); gap: 6px; }
#teams-view .team-card { padding: 8px; border-radius: 10px; }
#teams-view .team-card .driver-item {
  grid-template-columns: minmax(68px, 1fr) minmax(92px, 1.15fr) 34px;
  gap: 4px;
  padding: 5px;
}
#teams-view .team-card .driver-item input,
#teams-view .team-card .driver-item select { min-height: 30px; padding: 4px 5px; font-size: 9px; }
#teams-view .team-card .driver-item .delete-driver { min-height: 30px; padding: 4px 3px; font-size: 8px; }
#teams-view .team-head h3 { margin-bottom: 2px; font-size: 13px; }
#teams-view .team-details { margin-top: 7px; gap: 5px; font-size: 10px; }
#teams-view .team-load { margin-top: 7px; padding-top: 6px; }
#teams-view .municipality-group summary { padding: 6px; font-size: 10px; }
#teams-view .neighborhood-drag { padding: 5px 6px; font-size: 9px; }

/* Shelter */
#shelter-view .shelter-actions-only { margin-bottom: 6px; }
#shelter-view .shelter-page-actions { gap: 4px; }
#shelter-view .shelter-page-actions button { min-height: 34px; }
#shelter-view .shelter-section-panel { margin-bottom: 6px; }
#shelter-view .shelter-capacity { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
#shelter-view .capacity-item { gap: 5px; padding: 6px 8px; border-radius: 7px; }
#shelter-view .capacity-head { font-size: 10px; }
#shelter-view .capacity-track { height: 7px; }
#shelter-view .capacity-note { padding: 6px 8px; font-size: 8.5px; line-height: 1.4; }
#shelter-view .capacity-note { grid-column: 1 / -1; }
#shelter-view .shelter-batch-toolbar { gap: 5px; margin-bottom: 6px; padding: 5px 7px; }
#shelter-view .shelter-fifo-list { gap: 4px; }
#shelter-view .shelter-fifo-list > .empty-state { min-height: 48px; padding: 10px; }
#shelter-view .fifo-row { gap: 6px; padding: 6px; }
#shelter-view .shelter-filter-panel { padding: 7px 8px; }
#shelter-view .shelter-filter-hint { margin-top: 3px; font-size: 8.5px; }
#shelter-view .shelter-metrics { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
#shelter-view .shelter-metrics > .shelter-metric:nth-child(n) { grid-column: auto; }
#shelter-view .shelter-table-wrap { max-height: clamp(410px, 64dvh, 700px); }

/* Dense operational tables */
main table { font-size: 10.5px; }
main th,
main td { padding: 6px 7px; }
main .badge,
main .scouting-risk,
main .shelter-status,
main .shelter-route { padding: 3px 6px; font-size: 8.5px; }
.table-summary { margin-bottom: 4px; font-size: 9.5px; }
.table-summary small { font-size: 8.5px; }

/* Workspace-driven reflow */
@container samp-workspace (max-width: 1250px) {
  #command-center-view.cc-dashboard-2026 .cc-kpi-grid,
  #command-center-view.cc-dashboard-2026 .cc-scouting-kpis,
  #scouting-view .scouting-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  #dashboard-view .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  #shelter-view .shelter-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #scouting-view .scouting-analysis-grid { grid-template-columns: minmax(0, 1.3fr) minmax(270px, .7fr); }
}

@container samp-workspace (max-width: 950px) {
  #dashboard-view .period-bar { grid-template-columns: 1fr; }
  #reports-view .reports-workspace { grid-template-columns: 1fr; grid-template-areas: "filters" "map" "table"; }
  #reports-view .reports-filters,
  #scouting-view .scouting-filters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  #reports-view .reports-filters .report-search-box,
  #scouting-view .scouting-filters .report-search-box { grid-column: span 2; }
  #scouting-view .scouting-analysis-grid { grid-template-columns: 1fr; }
  #teams-view .distribution-board { grid-template-columns: 1fr; }
  #teams-view .area-bank-panel { position: static; max-height: none; }
  #command-center-view .cc-field-analytics-grid { grid-template-columns: 1fr; }
  #command-center-view .cc-field-analytics-column { display: contents; }
  #command-center-view .cc-control-outcomes-card { order: 1; }
  #command-center-view .cc-field-sector-card { order: 2; }
  #command-center-view .cc-observed-card { order: 3; }
  #command-center-view .cc-impact-indicator-card { order: 4; }
  #command-center-view .cc-control-radial { grid-template-columns: minmax(145px, .55fr) minmax(0, 1.45fr); }
}

@container samp-workspace (max-width: 720px) {
  #command-center-view.cc-dashboard-2026 .cc-kpi-grid,
  #command-center-view.cc-dashboard-2026 .cc-scouting-kpis,
  #dashboard-view .cards,
  #scouting-view .scouting-metrics,
  #shelter-view .shelter-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #command-center-view .cc-field-care-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #command-center-view .cc-control-radial,
  #command-center-view .cc-field-impact { grid-template-columns: 1fr; }
  #command-center-view .cc-control-radial-stage { min-height: 180px; }
  #dashboard-view .grid-two { grid-template-columns: 1fr; }
  #reports-view .reports-filters,
  #scouting-view .scouting-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #shelter-view .shelter-capacity { grid-template-columns: 1fr; }
  #shelter-view .capacity-note { grid-column: auto; }
}

@media (min-width: 960px) and (max-width: 1279px) {
  :root { --samp-sidebar-width: 196px; }
  .sidebar { padding: 10px 8px; }
}

@media (min-width: 760px) and (max-width: 959px) {
  :root { --samp-sidebar-width: 76px; }
  .sidebar { padding: 9px 6px; }
  .sidebar .nav { min-height: 44px; padding: 6px; }
}

@media (max-width: 759px) {
  body { font-size: 13px; }
  .sidebar { height: var(--samp-mobile-nav-height); padding: 4px; }
  .sidebar nav { gap: 2px; }
  .sidebar .nav { min-height: 52px; padding: 4px 2px; font-size: 8px; }
  main > section.view,
  #command-center-view.command-center-view { padding: 6px; }
  .topbar { min-height: 56px; padding: 7px; }
  .primary,
  .secondary,
  .link-btn { min-height: 38px; }
  .metric,
  .cc-kpi,
  .shelter-metric,
  .cc-field-care-metric,
  .scouting-metric { min-height: 82px; }
  #command-center-view .cc-hero-compact {
    min-height: 56px;
    padding: 8px 9px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
  }
  #command-center-view .cc-hero-compact .cc-hero-copy h2 { font-size: 20px; }
  #command-center-view .cc-hero-actions,
  #command-center-view .cc-action-row { width: auto; }
  #command-center-view .cc-action-row { display: flex; flex-wrap: nowrap; }
  #command-center-view .cc-action-row > button,
  #command-center-view .cc-action-row > .cc-export { flex: 0 0 auto; }
  #command-center-view .cc-action-row .cc-export { grid-column: auto; }
  #command-center-view .cc-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #command-center-view.cc-dashboard-2026 .cc-kpi-grid,
  #command-center-view.cc-dashboard-2026 .cc-scouting-kpis,
  #shelter-view .shelter-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #command-center-view.cc-dashboard-2026 .cc-kpi-grid > .cc-kpi,
  #command-center-view.cc-dashboard-2026 .cc-scouting-kpis > .cc-kpi,
  #dashboard-view .cards > .metric,
  #scouting-view .scouting-metrics > .scouting-metric,
  #shelter-view .shelter-metrics > .shelter-metric,
  #shelter-view .shelter-metrics > .shelter-metric:nth-child(n) { grid-column: auto; }
  #command-center-view .cc-filter-dock { position: relative; top: auto; }
  #command-center-view .cc-report-trend-card .cc-chart-body { min-height: 150px; }
  #command-center-view .cc-hourly-card .cc-chart-body { min-height: 168px; }
  #command-center-view .cc-sector-overview-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  #command-center-view .cc-sector-rank-row {
    grid-template-columns: 22px minmax(0, 1fr) auto;
    gap: 3px;
    padding: 3px;
  }
  #command-center-view .cc-sector-dual-bars { grid-column: 2 / -1; }
  #command-center-view .cc-sector-rank-stats {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
  }
  #command-center-view .cc-sector-rank-stats > span {
    min-height: 17px;
    display: flex;
    flex: 1;
    flex-direction: row;
    gap: 2px;
  }
  #command-center-view .cc-sector-row-action { display: none; }
  #shelter-view .shelter-page-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #teams-view .team-card .driver-item {
    grid-template-columns: minmax(82px, 1fr) minmax(105px, 1fr) 38px;
  }
  #scouting-view #scouting-map,
  #reports-view #pending-map { height: clamp(270px, 47dvh, 340px); min-height: 270px; }
  #reports-view .reports-table-pane #reports-table-wrap {
    min-height: 128px;
    max-height: min(48dvh, 420px);
  }
}

@media (max-width: 359px) {
  #command-center-view.cc-dashboard-2026 .cc-kpi-grid,
  #command-center-view.cc-dashboard-2026 .cc-scouting-kpis,
  #dashboard-view .cards,
  #scouting-view .scouting-metrics,
  #shelter-view .shelter-metrics,
  #command-center-view .cc-field-care-metrics { grid-template-columns: 1fr; }
}

@media (max-width: 400px) {
  #command-center-view .cc-hero-compact { grid-template-columns: 1fr; }
  #command-center-view .cc-hero-actions,
  #command-center-view .cc-action-row { width: 100%; }
  #command-center-view .cc-action-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #command-center-view .cc-action-row > button,
  #command-center-view .cc-action-row > .cc-export,
  #command-center-view .cc-export > button { width: 100%; min-width: 0; }
}

@media print {
  :root { --samp-content-pad: 0; --samp-section-gap: 5px; --samp-card-gap: 4px; }
}
