/*
 * =====================================================================
 *  STYLES.CSS — Shared stylesheet for Main & Activity dashboards
 * =====================================================================
 *
 *  TABLE OF CONTENTS
 *
 *  §1  GLOBAL TOKENS & BASE ................ :root vars, box-sizing, body
 *  §2  SHELL: SIDEBAR & CONTENT ............ sidebar nav, .content wrapper
 *  §3  HEADING BANNER ...................... .page-header, title, brand logos
 *  §4  CARDS ............................... .card base, .text-card-full, .chart-card
 *  §5  KPI COMPONENTS ...................... .kpi-row, .kpi-card, .kpi-block, .cfm-kpi-*
 *  §6  DATA TABLES ......................... .dt-wrap, dash-table overrides
 *  §7  TYPOGRAPHY .......................... .subtitle-small-bold, -semi, .subtext, .muted
 *  §8  LAYOUT GRIDS ........................ .two-col, .fill-col, .chart-flex
 *  §9  FILTERS & DROPDOWNS ................ .filter, .filters-row, .sm-filters-row
 *  §10 DATE PICKERS ........................ .date-compact, .date-range-inline
 *  §11 PAGE ROOT CLASSES ................... .dash-page, --panel, --profile, --activity
 *  §12 BAND LAYOUT (PANEL & PROFILE) ...... .band-top, .band-bottom, map-card sizing
 *  §13 SITE PROFILE SPECIFICS .............. .prop-row, .panel-title, chart-grid
 *  §14 SERVICE CARD (SVC) .................. .svc-card, .svc-title, .svc-body, .svc-icon
 *  §15 DATATABLE FEATURES .................. area bar-cells, UOA toggle, table-filters
 *  §16 PRINT / PDF ......................... @media print, body.printing overrides
 *  §17 RESPONSIVE .......................... @media breakpoints for mobile/tablet
 *  §18 PANEL PAGE: CRC CHART GRID ......... .crc-left-col, .crc-map-card, .crc-slot1-card
 *  §19 ACTIVITY PAGE OVERRIDES ............. .dash-page--activity filter/dropdown sizing
 *  §20 LANDING PAGE ........................ .landing-page, .landing-card, .landing-header
 *  §21 KPI DISPLAY OVERRIDES ............... .svc-card.kpi-card icon-left layout
 *  §22 GLOBAL TABLE FILTERS ................ .table-filters, .table-filters__actions
 *  §23 DROPDOWN UTILITIES .................. .dd-crowded, date-filter-inline
 *  §24 CLUSTER DASHBOARD ................... cluster toggle colours, filter bar, PDF
 *  §25 WEEK RANGE SLIDER ................... .rc-slider Zite-blue theming
 *  §26 WEEK TREE PICKER .................... .wtp-* tree navigation
 *  §27 CHART VIEW TOGGLE ................... weekly/monthly pill switch
 *  §28 CFM ABOUT BANNER .................... .cfm-about-banner, .cfm-about-label
 *  §29 CFM STAT CARDS ...................... .cfm-kpi-stat-card
 *
 * =====================================================================
 */

/* =============================================================
   §1  GLOBAL TOKENS & BASE
   :root custom properties, box-sizing, body font/colour
============================================================= */
:root {
  --bg: #f5f5f5;
  --text: #3a4552;
  --accent: #3f2b80;
  --sidebar-bg: #fff;
  --sidebar-w: 16rem;
  --gutter: 1rem;
  --radius: 12px;
  --filter-min: 180px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  --gap: 16px;
  --header-h: 50px; /* core banner/Logo height */
  --banner-pad-y: 10px; /* vertical padding inside banner */
  --banner-gap: 16px; /* space below banner before next row */
  --brand-h: var(--header-h);
  --brand-top: 1rem;
  --map-h: min(95vh, 700px);
  --zite-blue: #3f2b80;
  --zite-pink: #912478;
  --status-green: var(--status-green);

  .cfm--blue {
    --cfm-accent: var(--zite-blue);
  }
  .cfm--pink {
    --cfm-accent: var(--zite-pink);
  }
}

* {
  box-sizing: border-box;
  line-height: 1.5;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--bg);
}

.layout {
  min-height: 100vh;
}

/* =============================================================
   §2  SHELL: SIDEBAR & CONTENT
   Fixed sidebar nav, .content area offset, nav-link states
============================================================= */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  padding: 1rem;
  background: var(--sidebar-bg);
  border-right: 1px solid #e5e7eb;
  overflow: auto;
  display: flex;
  flex-direction: column;
}
.sidebar-title {
  font-size: 1rem;
  margin: 0 0 12px 6px;
  color: #303030;
}
.sidebar-links {
  display: none;
}
.nav-link {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
}
.nav-link:hover {
  background: #f3f4f6;
}
.nav-link.active {
  background: #e5e7eb;
  color: #0f172a;
  font-weight: 600;
}

.sidebar .sidebar-brand{
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.75rem 0 1rem;
}
.sidebar .sidebar-brand .logo{
  height: 95px;   /* alter size*/
  width: auto;
  object-fit: contain;
  display: block;
}
.sidebar .sidebar-brand{ padding-bottom: 1rem; } /* give breathing room before nav starts*/

/* Content */
.content {
  margin-left: calc(var(--sidebar-w) + var(--gutter));
  padding: 1rem;
  min-height: 100vh;
  background: var(--bg);
  position: relative; /* anchor for abs-pos brand if needed elsewhere */
}

/* Nav footer: last updated */
.nav-last-updated-overlay{
  position: fixed;
  left: 0;
  bottom: 0;
  width: var(--sidebar-w, 280px);
  padding: .35rem .75rem .75rem;
  background: transparent;
  border-top: none;
  font-size: .75rem;
  line-height: 1.05rem;
  color: #3a4552;
  z-index: 2000;
  pointer-events: none;
}

.nav-last-updated-label{
  opacity: .75;
  margin-right: .4rem;
}

.nav-last-updated-value{
  font-variant-numeric: tabular-nums;
  opacity: .45;
}

/* =============================================================
   §3  HEADING BANNER
   .page-header title bar, .page-brand logo area, responsive sizing
============================================================= */

.page-header {
  min-height: var(--header-h); /* core height (logo)  */
  padding-block: var(--banner-pad-y); /* extra space above/below heading */
  padding-top: 18px; /* slightly more breathing room above the title */
  margin: 0 0 var(--banner-gap); /* stops where nav/buttons begin */
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent; /* keep grey page bg visible */
  box-shadow: none;
  border-radius: 0;
}

/* Title inside banner */
.page-header .title {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
  font-weight: 700;
  color: var(--text);
}

/* Brand (logos) inside banner, right-aligned */
.page-header .page-brand {
  margin-left: auto;
  display: flex;
  align-items: center;
  /* stretch the brand area to the full visual banner height (core + padding) */
  height: calc(var(--header-h) + (var(--banner-pad-y) * 2));
}

/* Logo fills the brand area neatly */
.page-header .page-brand .brand-mark{
  height: 80px;          /* fixed logo height */
  width: auto;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

/* Hide any legacy top-right brand injected directly in .content */
.content > .page-brand {
  display: none !important;
}

/* Compact tweak */
@media (max-width: 560px) {
  :root {
    --header-h: 44px;
    --banner-pad-y: 6px;
    --banner-gap: 12px;
  }
  .page-header .title {
    font-size: 28px;
  }
}

/* =============================================================
   §4  CARDS
   .card base (white bg, radius, shadow), .text-card-full, .chart-card
============================================================= */
.card {
  background: #fff !important; /* ensure white card backgrounds everywhere */
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}


/* =============================================================
   §5  KPI COMPONENTS
   .kpi-row (auto-column grid), .kpi-card (vertical tile),
   .kpi-block/.kpi-big (CRC stat blocks), .cfm-kpi-card (accent variant),
   .cfm-kpi-grid (4-up grid)
   Used by: crc, incident_tracking, referral_mechanism, monitoring,
            service_mapping, sector_indicator, site_profile, cfm_global
============================================================= */
.kpi-row {
  --kpi-cols: 6; /* default cap */
  display: grid;
  gap: var(--gap);
  margin: 1rem 0 1.25rem;
  grid-template-columns: repeat(var(--kpi-cols), minmax(0, 1fr));
}

/* Set column count based on how many cards exist (desktop) */
.kpi-row:has(> :nth-child(6)) {
  --kpi-cols: 6;
}
.kpi-row:has(> :nth-child(5)):not(:has(> :nth-child(6))) {
  --kpi-cols: 5;
}
.kpi-row:has(> :nth-child(4)):not(:has(> :nth-child(5))) {
  --kpi-cols: 4;
}
.kpi-row:has(> :nth-child(3)):not(:has(> :nth-child(4))) {
  --kpi-cols: 3;
}
.kpi-row:has(> :nth-child(2)):not(:has(> :nth-child(3))) {
  --kpi-cols: 2;
} /* exactly 2 → half/half */
.kpi-row:not(:has(> :nth-child(2))) {
  --kpi-cols: 1;
} /* single card */

/* Responsive: let cards auto-fit nicely on narrower screens */
@media (max-width: 1200px) {
  .kpi-row {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}
@media (max-width: 640px) {
  .kpi-row {
    grid-template-columns: 1fr;
  }
}

/* Cards (unchanged from your current styles) */
.kpi-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  padding: 0.8rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 4px;
  overflow: hidden;
  min-width: 0;
}
.kpi-label {
  font-size: 12px;
  color: #303030;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-weight: 600;
  overflow-wrap: break-word;
  min-width: 0;
}
.kpi-value {
  font-size: 24px;
  font-weight: 600;
  color: #303030;
  line-height: 1.1;
  overflow-wrap: break-word;
  min-width: 0;
}

/* Secondary metric line beneath the main KPI value */
.kpi-sub {
  display: flex;
  align-items: baseline;
  gap: 0.15em;
  margin-top: auto;
}
.kpi-sub-value {
  font-size: 12px;
  font-weight: 600;
  color: #303030;
  overflow-wrap: break-word;
}
.kpi-sub-label {
  font-size: 12px;
  color: #303030;
  font-weight: 400;
  overflow-wrap: break-word;
}

/* CRC-style kpi-block: stat number + bar rows ─────────────────────────────── */
.kpi-block {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}
.kpi-big {
  font-size: 24px;
  font-weight: 700;
  color: #303030;
  line-height: 1.1;
  font-family: 'Inter', sans-serif;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
  overflow-wrap: break-word;
  min-width: 0;
}
.kpi-big--title {
  /* placeholder used when a card has bars but no single headline number */
  min-height: 1.6rem;
}

/* CFMM 4-up grid, falls back to 2 and 1 on narrow screens (match your pattern) */
.cfm-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
@media (max-width: 900px) {
  .cfm-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 520px) {
  .cfm-kpi-grid {
    grid-template-columns: 1fr;
  }
}

/* Accent variant that composes with your existing .kpi-card */
.cfm-kpi-card {
  position: relative;
  overflow: hidden; /* hides the accent’s rounded edge */
}
.cfm-kpi-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0; /* left edge */
  width: 6px; /* accent thickness */
  border-radius: 12px 0 0 12px; /* match .kpi-card radius */
  background: var(--cfm-accent, #3f2b80);
}
.kpi-pct{
  font-size: 0.85em;
  font-weight: 400;
}
.kpi-value .kpi-pct{
  font-size: 0.85em;
  font-weight: 400;
}

/* remove Markdown's default paragraph spacing */
.kpi-value p{ margin: 0; }
.kpi-value .dash-markdown{ display: inline; }

.indicator-page .kpi-card,
.dash-page--panel .kpi-card {
  padding: 0.5rem 0.75rem;
  gap: 0.35rem;
}



.chart-flex {
  display: flex;
  flex-direction: column;
  gap: 14px; /* space between hist and bar */
  height: 100%;
  min-height: 150px;
}
.chart-flex .pane {
  flex: 1 1 auto;
  min-height: 180px;
}
.chart-flex .pane > .dash-graph,
.chart-flex .pane .js-plotly-plot,
.chart-flex .pane .plot-container,
.chart-flex .pane .svg-container {
  min-height: 100%;
  width: 100% !important;
}
.chart-flex .pane .svg-container {
  padding: 0 !important;
}
.chart-flex .pane .main-svg {
  min-height: 100%;
}


/* =============================================================
   §6  DATA TABLES
   .dt-wrap (flex column wrapper), .dash-table-container overrides,
   .subtitle-small scoped title inside .card.dt-wrap
   Used by: all pages with dash_table.DataTable
============================================================= */
.card.dt-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  min-width: 0; /* allow grid/flex shrink */
}
.card.dt-wrap > .subtitle-small {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

/* =============================================================
   §7  TYPOGRAPHY
   .subtitle-small-bold (18px, section headings),
   .subtitle-small-semi (16px, chart/slot titles),
   .subtitle-sidebar (12px, filter labels),
   .subtext (explanatory/placeholder), .muted (no-data fallback)
   Used by: all pages
============================================================= */
.subtitle-small-bold {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 0.5rem;
}
/* for text summary card titles */
.subtitle-small-semi {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

/* filter / sidebar labels (used with subtitle-small) */
.subtitle-sidebar {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text);
  margin-bottom: 0.25rem;
}

/* explanatory / placeholder text */
.subtext {
  font-size: 0.9rem;
  color: #6b7280;
  line-height: 1.5;
}

/* empty-state / "no data" fallback text */
.muted {
  font-size: 0.85rem;
  color: #9ca3af;
  font-style: italic;
}

/* The Dash wrapper that controls table width */
.card.dt-wrap .dash-table-container {
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

/* Inner spreadsheet containers should not cap width */
.card.dt-wrap .dash-spreadsheet-container {
  width: 100% !important;
  max-width: none !important;
  background: #fff;
}

/* Make the inner grid stretch to the container width too */
.card.dt-wrap .dash-spreadsheet-inner {
  width: 100% !important;
}

/* In grid layouts, let the column shrink without overflow (kept here for safety) */
.band-top > *,
.band-bottom > * {
  min-width: 0;
}

/* =============================================================
   §8  LAYOUT GRIDS
   .two-col (50/50 grid), .fill-col (flex column),
   .chart-flex (flex column for stacked chart panes)
   Used by: crc, incident_tracking, referral_mechanism, cfm_global
============================================================= */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr; /* equal 50/50 split */
  gap: 1rem;
  align-items: stretch;
}
.two-col > * {
  min-width: 0;
}
.two-col .text-card {
  grid-column: 1;
}
.two-col .map-card {
  grid-column: 2;
}

.text-card.card {
  height: var(--map-h);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}
.fill-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: var(--map-h);
  min-height: 0;
}

/* Let the charts card expand to fill remaining space */
.grow {
  flex: 1 1 auto;
  min-height: 0;
}

.text-card .subtext {
  margin-top: 2px;
}
.text-card .chart-flex {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1 1 auto;
  min-height: 0;
}
.text-card .chart-flex .pane {
  flex: 1 1 auto;
  min-height: 0;
}

.text-card .chart-flex .pane .dash-graph,
.text-card .chart-flex .pane .js-plotly-plot,
.text-card .chart-flex .pane .plot-container,
.text-card .chart-flex .pane .svg-container {
  min-height: 100%;
  width: 100% !important;
}
.text-card .chart-flex .pane .svg-container {
  padding: 0 !important;
}
.text-card .chart-flex .pane .main-svg {
  min-height: 100%;
}

/* Map card (Service Mapping) */
.card.map-card {
  height: var(--map-h);
  display: flex;
  flex-direction: column;
}
.map-card .map-wrap {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.map-card .dash-graph,
.card.map-card .js-plotly-plot,
.card.map-card .plot-container,
.card.map-card .svg-container {
  height: 100% !important;
  width: 100% !important;
}
.card.map-card .svg-container {
  padding: 0 !important;
}
.card.map-card .main-svg {
  height: 100% !important;
}



/* =============================================================
   §9  FILTERS & DROPDOWNS
   .filter (base item, min-width:0), .filters-row (flex wrap),
   .sm-filters-row (service_mapping 6-col grid),
   .search-input, responsive breakpoints
   Used by: all pages with dropdown/date filters
============================================================= */
.sm-filters-row{
  display: grid;
  width: 100%;
  /* 3 wide filters + date + actions */
  grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(260px, 300px) max-content;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  align-items: end;
}

.sm-filters-row .Select,
.sm-filters-row .Select-control,
.sm-filters-row .Select-menu-outer{
  font-size: 12px;
}

/* keep labels slightly smaller too (optional) */
.sm-filters-row .filter label{
  font-size: 14px;
}

/* (min-width: 0 now in base .filter rule) */

/* KEEP date as-is: do NOT pin it to -2 */
.sm-filters-row .filter.date-filter-inline{
  min-width: 200px; /* your existing intent */
  grid-column: auto;
}

/* actions always last column, hard right */
.sm-filters-row .filter.sm-actions{
  grid-column: -1;
  justify-self: end;
}

.sm-filters-row .sm-actions-btns{
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  white-space: nowrap;
}
/* responsive */
@media (max-width: 1200px){
  .sm-filters-row{ grid-template-columns: repeat(2, 1fr); }
  .sm-filters-row .filter.date-filter-inline,
  .sm-filters-row .filter.sm-actions{
    grid-column: auto;
    justify-self: start;
  }
}
@media (max-width: 640px){
  .sm-filters-row{ grid-template-columns: 1fr; }
}


/* Search input (if used) */
.search-input{
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}

/* Base filter item — always allow shrink in flex/grid contexts */
.filter { min-width: 0; }

/* Base filter row — flex with wrap */
.filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gutter, 12px);
  align-items: flex-end;
  width: 100%;
}

/* Responsive (optional) */
@media (max-width: 1200px){
  .filters-row{ grid-template-columns: repeat(2, 1fr); }
  .filters-row .filter.date-filter-inline,
  .filters-row .filter.sm-actions{ grid-column: auto; justify-self: start; }
}
@media (max-width: 640px){
  .filters-row{ grid-template-columns: 1fr; }
  .filters-row .filter.date-filter-inline,
  .filters-row .filter.sm-actions{ grid-column: auto; justify-self: start; }
}


/* =============================================================
   §10  DATE PICKERS
   .date-compact (compact DateRangePicker), .date-range-inline,
   CalendarDay theming (Zite blue), DateInput styling
   Used by: activity pages, service_mapping, landing_global
============================================================= */

/* keep overall width behaviour */
.date-compact .DateRangePicker,
.date-compact .DateRangePickerInput {
  width: 100%;
}

/* inline + compact container (replaces the bigger “boxed” input) */
.date-compact .DateRangePickerInput{
  display: flex;
  align-items: center;
  gap: 3px;
  width: 100%;
  background: transparent;
  border: 0;                /* remove big outer box */
  padding: 0;               /* tight layout */
  border-radius: 0;
}

/* compact individual input widths */
.date-compact .DateInput{
  width: 80px;              /* compact input width */
  min-width: 80px;
}

/* compact input styling, but keep colour vars */
.date-compact .DateInput_input{
  font-family: 'Inter', sans-serif;
  font-size: 12px;          /* tighter than big version */
  color: var(--text);
  padding: 4px 6px;         /* tighter than big version */
  height: 35px;
  line-height: 1.1;
  width: 100%;
  box-sizing: border-box;

  background: #fff;
  border-radius: 6px;
  border: 1px solid #e5e7eb;   /* from big section, slightly cleaner */
}

/* tighten arrow spacing */
.date-compact .DateRangePickerInput_arrow{
  padding: 0 4px;
}

/* keep picker above other UI */
.date-compact .DateRangePicker_picker {
  z-index: 2000 !important;
}

/* --------- colour/theming date picker --------- */
.date-compact .CalendarDay__selected,
.date-compact .CalendarDay__selected:active,
.date-compact .CalendarDay__selected:hover,
.date-compact .CalendarDay__selected_start,
.date-compact .CalendarDay__selected_end {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #fff;
}

.date-compact .CalendarDay__selected_span {
  background: rgba(63, 43, 128, 0.12);
  border: 1px solid rgba(63, 43, 128, 0.12);
}

.date-compact .CalendarDay__hovered_span,
.date-compact .DateInput_input__focused {
  border: 1px solid var(--accent) !important;
  box-shadow: 0 0 0 2px rgba(63, 43, 128, 0.12);
}

.date-compact .DateRangePickerInput_arrow_svg,
.date-compact .DayPickerNavigation_svg__horizontal,
.date-compact .DayPickerNavigation_svg__vertical {
  fill: var(--accent);
}

.date-compact .CalendarMonth_caption {
  color: var(--accent);
  font-weight: 600;
}

/* DataTable */
.dt-wrap {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}
.dt-wrap .dash-table-container,
.dt-wrap .dash-spreadsheet-container {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}
.dt-wrap .dash-spreadsheet-container {
  border: none;
  background: #fff;
}
.dt-wrap .dash-spreadsheet-inner th,
.dt-wrap .dash-spreadsheet-inner td {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: var(--text);
  border-color: #e5e7eb;
}
.dt-wrap .dash-spreadsheet-inner th {
  font-weight: 600;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}
.dt-wrap .dash-filter input {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: var(--text);
}
.dt-wrap .dash-spreadsheet-container a {
  color: var(--accent) !important;
  text-decoration-color: var(--accent) !important;
}
.dt-wrap .dash-spreadsheet-container a:hover {
  text-decoration: underline;
}
.dt-wrap .dash-spreadsheet-inner td.focused,
.dt-wrap .dash-spreadsheet-inner td.cell--selected,
.dt-wrap .dash-spreadsheet-inner td[aria-selected='true'] {
  border-color: var(--accent) !important;
  box-shadow: inset 0 0 0 1.5px var(--accent) !important;
}
.dt-wrap .dash-spreadsheet-inner td:focus {
  outline: 2px solid var(--accent) !important;
  outline-offset: -1px;
}
.dt-wrap .dash-header .column-header--sort .column-header-name svg,
.dt-wrap .dash-header .column-header--filter .column-header-name svg {
  fill: var(--accent) !important;
}
.dt-wrap .dash-filter input:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 2px rgba(63, 43, 128, 0.12) !important;
}
/* Vertically centre placeholder + selected value in all dropdowns */
.Select-control {
  display: flex !important;
  align-items: center !important;
}
.Select-multi-value-wrapper {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
}
.Select-arrow-zone {
  flex: 0 0 auto !important;
  align-self: center !important;
}
.Select-placeholder,
.Select-value {
  display: flex !important;
  align-items: center !important;
  top: 0 !important;
  bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  line-height: normal !important;
}
.Select-input {
  display: flex !important;
  align-items: center !important;
  height: 100% !important;
}

.Select.is-focused > .Select-control,
.Select.is-open > .Select-control {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 2px rgba(63, 43, 128, 0.12) !important;
}
.Select .Select-arrow {
  border-top-color: var(--accent) !important;
}
.Select-menu-outer {
  border-color: var(--accent) !important;
}
.Select-option.is-focused {
  background: rgba(63, 43, 128, 0.06) !important;
}
.Select-option.is-selected {
  background: rgba(63, 43, 128, 0.12) !important;
  color: var(--accent) !important;
}

/* Responsive wrap width for all cell contents */
.dt-wrap .dash-spreadsheet .dash-cell > div,
.dt-wrap .dash-spreadsheet .dash-header .column-header-name {
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* =============================================================
   §11  PAGE ROOT CLASSES
   dash-page            — shared base for every dashboard page
   dash-page--activity   — activity dashboard filter/dropdown sizing
   dash-page--panel      — two-col top band + chart-grid + bottom table
   dash-page--profile    — three-col band layout + responsive chart-grid
============================================================= */
.dash-page {
  width: 100%;
}

/* =============================================================
   §12  BAND LAYOUT (PANEL & PROFILE)
   .band-top/.band-bottom grid containers, --top-h/--map-h vars,
   map-card full-height, Plotly graph fill rules
   Used by: crc, incident_tracking, referral_mechanism, site_profile,
            cfm_global (any page with .dash-page--panel or --profile)
============================================================= */
.dash-page--panel,
.dash-page--profile {
  --top-h: min(50vh, 800px);
  --map-h: var(--top-h);
}

/* Band containers */
.band-top {
  display: grid;
  gap: var(--gap);
  height: var(--top-h);
  align-items: stretch;
}
.band-bottom {
  display: grid;
  gap: var(--gap);
  margin-top: var(--gap);
}

/* Site Profile: top = 3 equal columns */
.dash-page--profile .band-top {
  grid-template-columns: repeat(3, 1fr);
}
.dash-page--profile .band-top {
  align-items: stretch;
  grid-auto-rows: 1fr;
}

/* Bottom band variants */
.band-bottom.one-col {
  grid-template-columns: 1fr;
} /* Monitoring bottom: single table */
.band-bottom.two-col {
  grid-template-columns: 1fr 1fr;
} /* Site Profile bottom: two tables */

/* Make top-band cards fill height */
.band-top > * {
  min-width: 320px;
  min-height: 0;
}
.band-top > * > .card {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: auto;
}

/* Map inside band pages */
.dash-page--panel .map-card,
.dash-page--profile .map-card {
  height: 100%;
  max-height: var(--map-h);
  display: flex;
  flex-direction: column;
}
.dash-page--panel .map-card .map-wrap,
.dash-page--profile .map-card .map-wrap {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.dash-page--panel .map-card .dash-graph,
.dash-page--panel .map-card .js-plotly-plot,
.dash-page--panel .map-card .plot-container,
.dash-page--panel .map-card .svg-container,
.dash-page--profile .map-card .dash-graph,
.dash-page--profile .map-card .js-plotly-plot,
.dash-page--profile .map-card .plot-container,
.dash-page--profile .map-card .svg-container {
  height: 100% !important;
  width: 100% !important;
}
.dash-page--profile .band-bottom {
  margin-top: calc(var(--gap) + 6px);
}
/* Site Profile: shrink ONLY the first (left) card using existing classes */
.dash-page--profile .band-top > :first-child > .card {
  font-size: 20px;
  line-height: 1.35;
}

.dash-page--profile .band-top > :first-child > .card .panel-title {
  font-size: 12px;
  margin-bottom: 6px;
}

.dash-page--profile .band-top > :first-child > .card .prop-row {
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
  padding: 4px 0;
}

.dash-page--profile .band-top > :first-child > .card .prop-row dt,
.dash-page--profile .band-top > :first-child > .card .prop-row dd {
  font-size: 12px;
}


/* Bigger text + taller/thicker control (react-select v1 styles used by dcc.Dropdown) */
.secind-sector-dd .Select-control{
  min-height: 40px;      /* taller */
  height: 40px;
  border-radius: 10px;
}

.secind-sector-dd .Select-placeholder,
.secind-sector-dd .Select-value-label{
  font-size: 14px;       /* bigger */
  line-height: 38px;     /* vertically center within 40px */
  font-weight: 600;      /* a bit thicker text */
}

.secind-sector-dd .Select-input > input{
  font-size: 14px;
  line-height: 38px !important;
}

/* Dropdown menu items */
.secind-sector-dd .Select-menu-outer{
  font-size: 14px;
}
/* =============================================================
   §13  SITE PROFILE SPECIFICS
   .panel-title, .prop-row (key-value grid), .prop-list,
   .chart-grid (responsive 1/2/3 col via :has), .secind-sector-dd
   Used by: site_profile, sector_indicator
============================================================= */
.dash-page--profile .panel-title,
.site-profile-page .panel-title {
  font-weight: 700;
  margin-bottom: 8px;
}

.dash-page--profile {
  --top-h: min(60vh, 780px);
}

/* Property list */
.prop-list dl {
  margin: 0;
}
.prop-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  padding: 6px 0;
}
.prop-row dt {
  color: #6b7280;
  font-weight: 600;
}
.prop-row dd {
  margin: 0;
}

/* Services */
.services-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* =============================================================
   §14  SERVICE CARD (SVC)
   .svc-card (horizontal icon+text card), .svc-title (label),
   .svc-body (text column), .svc-icon (left icon),
   .svc-value (metric number)
   Used by: site_profile, crc, incident_tracking, cfm_global
============================================================= */
.svc-card {
  margin: 0;
}
.svc-card {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-left-width: 6px;
  border-radius: 8px;
  background: #fff;
  border-left-color: #3f2b80;
}
.svc-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  margin-top: 2px;
}
.svc-body {
  display: flex;
  flex-direction: column;
}
.svc-title {
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #303030;
  line-height: 1.2;
}
.svc-value {
  margin-top: 2px;
  font-size: 12px;
  color: #303030;
  line-height: 1.2;
  white-space: normal;
}

/* Indicator Results table */
.ind-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.ind-table th,
.ind-table td {
  padding: 8px 10px;
  border-top: 1px solid #e5e7eb;
  vertical-align: top;
}
.ind-table thead th {
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #6b7280;
  border-top: none;
  white-space: normal;
  overflow-wrap: break-word;
}
.ind-table .indicator-col {
  width: 35%;
}
.ind-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #9ca3af;
  flex: 0 0 10px;
}
.status-dot.green {
  background: #26A870;
}
.status-dot.yellow {
  background: #febd33;
}
.status-dot.red {
  background: #E4225F;
}
.status-label {
  font-size: 12px;
  color: #374151;
}

/* middle band for the moment
/* Site Profile middle grid: 1/2/3 columns based on child count */
.dash-page--profile .chart-grid,
.site-profile-page .chart-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr; /* default: 1 col */
  align-items: stretch;
}

/* ≥2 charts → 2 columns (each half width) */
.dash-page--profile .chart-grid:has(> :nth-child(2)),
.site-profile-page .chart-grid:has(> :nth-child(2)) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* ≥3 charts → 3 columns (match top band’s thirds) */
.dash-page--profile .chart-grid:has(> :nth-child(3)),
.site-profile-page .chart-grid:has(> :nth-child(3)) {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Optional: ensure card fills its grid cell nicely */
.dash-page--profile .chart-grid > .card,
.site-profile-page .chart-grid > .card {
  display: flex;
  flex-direction: column;
  min-height: 270px; /* same feel as current slots */
}

/* Mobile: stack to single column */
@media (max-width: 900px) {
  .dash-page--profile .chart-grid,
  .site-profile-page .chart-grid {
    grid-template-columns: 1fr !important;
  }
}

.area-profile-table td.hl-green  { background-color: #26A870; color: #fff; font-weight: 700; }
.area-profile-table td.hl-yellow { background-color: #febd33; color: #fff; font-weight: 700; }
.area-profile-table td.hl-red    { background-color: #E4225F; color: #fff; font-weight: 700; }



/* Indicator page: text insight KPIs */
.indicator-page .kpi-card.insight {
  padding: 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-left: 6px solid #e5e7eb; /* subtle anchor */
}
.indicator-page .kpi-card.insight.is-red {
  border-left-color: #E4225F;
}
.indicator-page .kpi-card.insight.is-green {
  border-left-color: #26A870;
}
.indicator-page .kpi-card.insight.is-muted {
  border-left-color: #e5e7eb;
}

.indicator-page .kpi-card.insight .kpi-head {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #303030;
  font-weight: 700;
}

.indicator-page .kpi-card.insight .kpi-text {
  font-size: 16px;
  line-height: 1.3;
  font-weight: 700;
  color: #303030;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden; /* clamp to 3 lines */
}

.indicator-page .kpi-card.insight .kpi-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

/* Badges for “(11 red)” etc. */
.indicator-page .badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}
.indicator-page .badge.red {
  background: #fee2e2;
  color: #E4225F;
}
.indicator-page .badge.green {
  background: #dcfce7;
  color: #26A870;
}
.indicator-page .badge.yellow {
  background: #fef9c3;
  color: #febd33;
}

/* Optional: dim unavailable insights */
.indicator-page .kpi-card.insight .kpi-text.is-na {
  color: #303030;
  font-weight: 600;
}

/* =============================================================
   §15  DATATABLE FEATURES
   Area bar-cells (.hbar-wrap), UOA toggle (.uoa-toggle),
   table-filters row, sort buttons
   Used by: site_profile, monitoring, sector_indicator
============================================================= */
.hbar-wrap{
  display:flex;
  flex-direction:column;
  gap:0px;              /* was 4px */
  min-width:120px;
}
.hbar-row{
  display:flex;
  align-items:center;
  gap:6px;
}
.hbar-track{
  flex:1 1 auto;
  height:16px;          /* was 8px */
  border-radius:4px;    /* was 999px */
  overflow:hidden;
}
.hbar-fill{
  height:100%;
  border-radius:0px;    /* was 999px */
}
.hbar-label{
  font-size:10px;
  white-space:nowrap;
  color:#303030;
  line-height:1;
}

/* 3-line bar cell */
.cell-bars-3{
  display:flex;
  flex-direction:column;
  gap:0px;              /* was 4px */
}

.cell-bar-row{
  display:flex;
  align-items:center;
  gap:6px;
  font-size:10.5px;
  line-height:1;
  margin:0;             /* add */
  padding:0;            /* add */
}

.cell-bar-row .bar-track{
  flex:1;
  height:16px;          /* was 8px */
  background:#f1f3f5;
  border-radius:4px;    /* was 999px */
  overflow:hidden;
}

.cell-bar-row .bar{
  display:block;
  height:100%;
  border-radius:0px;    /* was 999px */
}

/* use your existing palette */
.cell-bar-row .bar.green{ background:#26A870; }
.cell-bar-row .bar.yellow{ background:#FEBD33; }
.cell-bar-row .bar.red{ background:#E4225F; }

.cell-bar-row .bar-label{
  min-width:58px;
  text-align:right;
  font-weight:600;
}

/* --- UOA toggle switch --- */
.uoa-toggle { display:flex; flex-direction:column; gap: 4px; }

.uoa-switch{
  position: relative;
  width: 132px;
  height: 28px;
}

/* track */
.uoa-switch::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius: 999px;
  background:#e5e7eb;
  box-shadow: inset 0 0 0 1px #d1d5db;
  z-index: 0;
}

/* thumb */
.uoa-switch::after{
  content:"";
  position:absolute;
  top:4px;
  left:4px;
  width:20px;
  height:20px;
  border-radius:999px;
  background:#3f2b80;
  transition: transform 160ms ease;
  z-index: 1;
}

/* overlay radio click zones */
.uoa-toggle-input{
  position:absolute;
  inset:0;
  display:flex;
  z-index: 2;
  margin:0;
}

.uoa-toggle-input label{
  flex: 1;
  margin: 0;
  cursor: pointer;
  display:flex;
  align-items:center;
  justify-content:center;
}

/* hide actual radio + hide built-in label text to avoid duplicates */
.uoa-toggle-input input{
  opacity: 0;
  position:absolute;
  pointer-events:none;
}

/* Dash renders label text in a span: hide it completely */
.uoa-toggle-input label > span{
  display:none !important;
}

/* MOVE THUMB when second (Areas) radio is selected */
.uoa-switch:has(.uoa-toggle-input label:last-child input:checked)::after{
  transform: translateX(104px); /* 132 - 4 - 4 - 20 = 104 */
}

/* labels under the switch */
.uoa-toggle-labels{
  width:132px;
  display:flex;
  justify-content:space-between;
  font-size:12px;
  line-height:1;
  color:#6b7280;
  padding: 0 2px;
}

/* highlight active label */
.uoa-switch:has(.uoa-toggle-input label:first-child input:checked) + .uoa-toggle-labels .uoa-left,
.uoa-switch:has(.uoa-toggle-input label:last-child  input:checked) + .uoa-toggle-labels .uoa-right{
  color:#3f2b80;
  font-weight:700;
}


/* CFM styling *\
/* Filters row: 4 equal columns, responsive */
.filter-row {
  display: grid;
  /* 3 equal dropdowns + date picker at natural width */
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: var(--gap);
}

/* Ensure children stretch to full cell width */
.filter-row .filter-item {
  width: 100%;
}

/* Dash Dropdown (react-select) and DatePicker should fill width */
.filter-row .filter-item .Select,
.filter-row .filter-item .Select-control,
.filter-row .filter-item .DateRangePicker,
.filter-row .filter-item .DateRangePickerInput,
.filter-row .filter-item .DateInput,
.filter-row .filter-item input {
  width: 100%;
}

/* Make inputs a comfy height to match your cards’ look */
.filter-row .Select-control,
.filter-row .DateRangePickerInput {
  min-height: 40px;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Responsive: stack to 2 columns on tablets, 1 on phones */
@media (max-width: 1100px) {
  .filter-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .filter-row {
    grid-template-columns: 1fr;
  }
}

/* Keep DatePickerRange on one line */
.filter-row .DateRangePickerInput {
  display: flex;
  flex-wrap: nowrap; /* prevent line break */
  align-items: center;
  gap: 6px;
  width: 100%;
  white-space: nowrap;
}

.filter-row .DateRangePickerInput__withBorder {
  display: flex; /* react-dates adds this class; keep it flex too */
}

.filter-row .DateInput {
  flex: 1 1 0; /* both Start and End share the row */
  min-width: 0; /* allow shrinking so they don’t wrap */
}

.filter-row .DateInput_input {
  width: 100%;
  box-sizing: border-box;
}

/* Optional: make the arrow narrow so it doesn’t force wrapping */
.filter-row .DateRangePickerInput_arrow {
  flex: 0 0 auto;
  padding: 0 2px;
}

.col-left .card + .card {
  margin-top: 1rem;
}

/* Minimal EXPORT CSV MINIMUM Zite-blue button */
.btn {
  background: var(--zite-blue);
  color: #fff;
  border: none; /* remove border */
  border-radius: 0.3rem;
  padding: 0.45rem 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

/* Hover/active feedback without changing the brand color too much */
.btn:hover {
  filter: brightness(0.95);
}
.btn:active {
  filter: brightness(0.9);
}

/* Focus ring for accessibility */
.btn:focus-visible {
  outline: 2px solid #fff; /* inner contrast ring */
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.25); /* outer halo; adjust as needed */
}

/* Disabled state */
.btn:disabled,
.btn[aria-disabled='true'] {
  opacity: 0.55;
  cursor: not-allowed;
  filter: none;
}

/* Print-only elements: hidden on screen */
.siteprof-pdf-header,
.siteprof-pdf-footer {
  display: none;
}

/* siteprof-pdf-lower is rendered off-screen (not display:none) so that any
   Plotly charts inside it initialize properly and are ready when print fires */
.siteprof-pdf-lower {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 700px;
  pointer-events: none;
  z-index: -1;
}

/* =============================================================
   §16  PRINT / PDF
   @media print rules for Site Profile A4 export,
   body.printing live-preview overrides, hidden UI chrome,
   forced colours, page breaks, font sizing
   Used by: site_profile PDF export, cluster CCPM PDF
============================================================= */
@media print {
  @page {
    size: A4 portrait;
    margin: 10mm;
  }
  html,
  body {
    background: #fff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Hide everything by default… */
  body * {
    visibility: hidden !important;
  }
  /* …except the Site Profile page and its children */
  .dash-page--profile,
  .dash-page--profile *,
  .site-profile-page,
  .site-profile-page * {
    visibility: visible !important;
  }

  /* Hide app chrome */
  .app-sidebar,
  .sidebar,
  .topnav,
  .navbar,
  .footer,
  .dash-debug-menu,
  .dash-undo-redo,
  .filters-row,
  .btn,
  .page-header,
  .dash-page--profile .filter,
  .dash-page--profile .sm-filters-row,
  .site-profile-page .filter,
  .site-profile-page .sm-filters-row,
  .cfm-about-banner {
    display: none !important;
  }

  .page,
  .content,
  .dash-page--profile,
  .site-profile-page {
    position: static !important;
    max-width: none !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
    border: 0 !important;
  }
  .card {
    background: #fff !important;
    box-shadow: none !important;
    border: 0 !important;
  }

  /* ── PDF header: logo row + title + subheading ── */
  .siteprof-pdf-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding-bottom: 8px !important;
    margin-bottom: 10px !important;
    border-bottom: 2px solid #3f2b80 !important;
  }
  .siteprof-pdf-header-left {
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
  }
  .siteprof-pdf-title {
    font-size: 18pt !important;
    font-weight: 700 !important;
    color: #000 !important;
    line-height: 1.2 !important;
    margin: 0 !important;
  }
  .siteprof-pdf-subheading {
    font-size: 8.5pt !important;
    color: #666 !important;
    margin: 0 !important;
  }
  .siteprof-pdf-header-logos {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
  }
  .siteprof-pdf-logo {
    height: 44px !important;
    width: auto !important;
    object-fit: contain !important;
  }

  /* ── KPI row: 3 cards (hide Last Updated — it's in the subheading) ── */
  .kpi-row {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
  }
  .kpi-last-updated {
    display: none !important;
  }
  .kpi-card {
    break-inside: avoid;
  }
  .site-profile-page .svc-card.kpi-card {
    padding: 4px 8px !important;
    gap: 6px !important;
    justify-content: flex-start !important;
    box-shadow: none !important;
    background: #fff !important;
  }
  .site-profile-page .svc-card.kpi-card .svc-body {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    gap: 4px !important;
  }
  .site-profile-page .svc-card.kpi-card .svc-icon {
    width: 20px !important;
    height: 20px !important;
    flex: 0 0 20px !important;
  }
  .site-profile-page .svc-card.kpi-card .svc-title {
    font-size: 10pt !important;
    line-height: 1.3 !important;
  }
  .site-profile-page .svc-card.kpi-card .svc-value,
  .site-profile-page .svc-card.kpi-card .kpi-breakdown,
  .site-profile-page .svc-card.kpi-card .kpi-mainvalue {
    font-size: 10pt !important;
    line-height: 1.3 !important;
  }
  .site-profile-page .svc-card.kpi-card .kpi-subvalue {
    font-size: 9pt !important;
  }
  .site-profile-page .svc-card.kpi-card .kpi-breakdown div {
    font-size: 9pt !important;
  }

  /* ── Page 1 wrapper: flex-col so footer always at page bottom ── */
  .siteprof-pdf-page1 {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
  }
  .siteprof-pdf-page1 .siteprof-pdf-footer {
    margin-top: auto !important;
  }

  /* ── band-top: 2 columns (Site Details + Map; About the Site hidden) ── */
  .band-top {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    height: 90mm !important;
    grid-auto-rows: 90mm !important;
    overflow: hidden !important;
  }
  .band-top-about-col {
    display: none !important;
  }
  .band-top > * {
    min-width: 0 !important;
    overflow: hidden !important;
  }
  .band-top > * > .card {
    overflow: hidden !important;
  }
  .site-profile-page .band-top {
    font-size: 10pt !important;
    line-height: 1.4 !important;
  }
  .site-profile-page .band-top .subtitle-small-bold {
    font-size: 12pt !important;
    font-weight: 700 !important;
    margin-bottom: 4px !important;
  }
  .site-profile-page .band-top .prop-row {
    padding: 2px 0 !important;
  }
  .site-profile-page .band-top .prop-row dt,
  .site-profile-page .band-top .prop-row dd {
    font-size: 9pt !important;
  }
  .site-profile-page.dash-page--profile .band-top > :first-child > .card {
    font-size: 9pt !important;
  }
  .site-profile-page.dash-page--profile .band-top > :first-child > .card .prop-row dt,
  .site-profile-page.dash-page--profile .band-top > :first-child > .card .prop-row dd {
    font-size: 9pt !important;
  }
  .map-wrap {
    height: 100% !important;
  }
  .mapboxgl-ctrl,
  .mapboxgl-ctrl-group,
  .mapboxgl-ctrl-logo,
  .mapboxgl-ctrl-attrib,
  .mapboxgl-ctrl-attrib-inner,
  .modebar,
  .modebar-container {
    display: none !important;
  }

  /* ── Hide screen chart grid; show print-only 2-col lower band ── */
  #siteprof-chart-grid {
    display: none !important;
  }
  .siteprof-pdf-lower {
    position: static !important;
    left: auto !important;
    width: auto !important;
    z-index: auto !important;
    pointer-events: auto !important;
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    margin-top: 4px !important;
    margin-bottom: 0 !important;
  }
  .siteprof-pdf-lower > .card {
    break-inside: avoid;
    overflow: hidden !important;
  }
  .siteprof-pdf-lower .subtitle-small-bold,
  .siteprof-pdf-lower .subtitle-small-semi {
    font-size: 12pt !important;
    font-weight: 700 !important;
    margin-bottom: 4px !important;
  }
  .siteprof-pdf-lower .svc-card .svc-icon {
    width: 16px !important;
    height: 16px !important;
    flex: 0 0 16px !important;
  }
  .siteprof-pdf-lower .svc-card .svc-title {
    font-size: 9pt !important;
    line-height: 1.4 !important;
  }
  .siteprof-pdf-lower .svc-card .svc-value {
    font-size: 8pt !important;
    line-height: 1.4 !important;
  }
  /* Clip Plotly chart in the PDF chart slot */
  #siteprof-pdf-chart .js-plotly-plot,
  #siteprof-pdf-chart .plot-container,
  #siteprof-pdf-chart .svg-container {
    height: 100% !important;
    width: 100% !important;
  }

  /* ── Page 1 footer ── */
  .siteprof-pdf-footer {
    display: block !important;
    margin-top: 1px !important;
    padding-top: 2px !important;
    border-top: 1px solid #ccc !important;
    font-size: 6.5pt !important;
    color: #888 !important;
    line-height: 1 !important;
    break-after: avoid;
  }
  .siteprof-pdf-footer-url {
    word-break: break-all;
  }

  /* ── Page 2: Indicator Results table ── */
  .site-profile-page .band-bottom {
    break-before: page;
    page-break-before: always;
  }
  .site-profile-page .band-bottom .subtitle-small-bold {
    break-after: avoid;
    page-break-after: avoid;
  }
  .site-profile-page .band-bottom .ind-table {
    break-before: avoid;
    page-break-before: avoid;
  }
  .band-bottom.one-col,
  .band-bottom.one-col .card,
  .ind-table,
  .ind-table table,
  .ind-table .dash-table-container {
    width: 100% !important;
  }
  .ind-table table {
    table-layout: fixed;
  }
  .ind-table td {
    overflow: hidden;
  }
  .ind-table th {
    overflow: visible;
    white-space: normal;
    overflow-wrap: break-word;
  }
  table,
  tr,
  td,
  th {
    page-break-inside: avoid;
    break-inside: avoid;
  }
}

/* ─── body.printing — live preview when Export PDF is clicked ────────────── */
body.printing * {
  visibility: hidden !important;
}
body.printing .site-profile-page,
body.printing .site-profile-page * {
  visibility: visible !important;
}
body.printing .app-sidebar,
body.printing .sidebar,
body.printing .topnav,
body.printing .navbar,
body.printing .footer,
body.printing .page-header,
body.printing .site-profile-page .filter,
body.printing .site-profile-page .sm-filters-row,
body.printing .btn,
body.printing #siteprof-chart-grid,
body.printing .cfm-about-banner {
  display: none !important;
}

/* PDF header */
body.printing .siteprof-pdf-header {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding-bottom: 8px !important;
  margin-bottom: 10px !important;
  border-bottom: 2px solid #3f2b80 !important;
}
body.printing .siteprof-pdf-header-left {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
}
body.printing .siteprof-pdf-title {
  font-size: 18pt !important;
  font-weight: 700 !important;
  color: #000 !important;
  line-height: 1.2 !important;
  margin: 0 !important;
}
body.printing .siteprof-pdf-subheading {
  font-size: 8.5pt !important;
  color: #666 !important;
  margin: 0 !important;
}
body.printing .siteprof-pdf-header-logos {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 12px !important;
}
body.printing .siteprof-pdf-logo {
  height: 44px !important;
  width: auto !important;
  object-fit: contain !important;
}

/* PDF footer */
body.printing .siteprof-pdf-footer {
  display: block !important;
  margin-top: 3px !important;
  padding-top: 2px !important;
  border-top: 1px solid #ccc !important;
  font-size: 7.5pt !important;
  color: #888 !important;
}
body.printing .siteprof-pdf-footer-url {
  word-break: break-all;
}

/* KPI row: 3 cards */
body.printing .kpi-last-updated {
  display: none !important;
}
body.printing .site-profile-page .svc-card.kpi-card {
  padding: 4px 8px !important;
  gap: 6px !important;
  justify-content: flex-start !important;
  box-shadow: none !important;
  background: #fff !important;
}
body.printing .site-profile-page .svc-card.kpi-card .svc-body {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  gap: 4px !important;
}
body.printing .site-profile-page .svc-card.kpi-card .svc-icon {
  width: 20px !important;
  height: 20px !important;
  flex: 0 0 20px !important;
}
body.printing .site-profile-page .svc-card.kpi-card .svc-title {
  font-size: 9pt !important;
  line-height: 1.3 !important;
}
body.printing .site-profile-page .svc-card.kpi-card .svc-value,
body.printing .site-profile-page .svc-card.kpi-card .kpi-breakdown,
body.printing .site-profile-page .svc-card.kpi-card .kpi-mainvalue {
  font-size: 9pt !important;
  line-height: 1.3 !important;
}
body.printing .site-profile-page .svc-card.kpi-card .kpi-subvalue {
  font-size: 8pt !important;
}
body.printing .site-profile-page .svc-card.kpi-card .kpi-breakdown div {
  font-size: 8pt !important;
}

/* Page 1 wrapper: flex-col so footer always at page bottom */
body.printing .siteprof-pdf-page1 {
  display: flex !important;
  flex-direction: column !important;
  min-height: 100vh !important;
}
body.printing .siteprof-pdf-page1 .siteprof-pdf-footer {
  margin-top: auto !important;
}

/* band-top: 2-col, hide About the Site */
body.printing .band-top {
  height: 90mm !important;
  grid-template-columns: repeat(2, 1fr) !important;
  grid-auto-rows: 90mm !important;
  overflow: hidden !important;
}
body.printing .band-top-about-col {
  display: none !important;
}
body.printing .band-top > * {
  min-width: 0 !important;
  overflow: hidden !important;
}
body.printing .band-top > * > .card {
  overflow: hidden !important;
}
body.printing .site-profile-page .band-top {
  font-size: 10pt !important;
  line-height: 1.4 !important;
}
body.printing .site-profile-page .band-top .subtitle-small-bold {
  font-size: 12pt !important;
  font-weight: 700 !important;
  margin-bottom: 4px !important;
}
body.printing .site-profile-page .band-top .prop-row {
  padding: 2px 0 !important;
}
body.printing .site-profile-page .band-top .prop-row dt,
body.printing .site-profile-page .band-top .prop-row dd {
  font-size: 10pt !important;
}

/* PDF lower 2-col band: restore from off-screen position to normal flow */
body.printing .siteprof-pdf-lower {
  position: static !important;
  left: auto !important;
  width: auto !important;
  z-index: auto !important;
  pointer-events: auto !important;
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 12px !important;
  margin-top: 8px !important;
}
body.printing .siteprof-pdf-lower > .card {
  overflow: hidden !important;
}
body.printing .siteprof-pdf-lower .subtitle-small-bold,
body.printing .siteprof-pdf-lower .subtitle-small-semi {
  font-size: 12pt !important;
  font-weight: 700 !important;
  margin-bottom: 4px !important;
}
body.printing .siteprof-pdf-lower .svc-card .svc-icon {
  width: 16px !important;
  height: 16px !important;
  flex: 0 0 16px !important;
}
body.printing .siteprof-pdf-lower .svc-card .svc-title {
  font-size: 9pt !important;
  line-height: 1.4 !important;
}
body.printing .siteprof-pdf-lower .svc-card .svc-value {
  font-size: 9pt !important;
  line-height: 1.4 !important;
}
body.printing #siteprof-pdf-chart .js-plotly-plot,
body.printing #siteprof-pdf-chart .plot-container,
body.printing #siteprof-pdf-chart .svg-container {
  height: 100% !important;
  width: 100% !important;
}

/* Hide all map controls and Plotly toolbar */
body.printing .mapboxgl-ctrl,
body.printing .mapboxgl-ctrl-group,
body.printing .mapboxgl-ctrl-logo,
body.printing .mapboxgl-ctrl-attrib,
body.printing .mapboxgl-ctrl-attrib-inner,
body.printing .modebar,
body.printing .modebar-container {
  display: none !important;
}

/* Keep table title attached to table */
body.printing .site-profile-page .band-bottom .subtitle-small-bold {
  break-after: avoid;
  page-break-after: avoid;
}
body.printing .site-profile-page .band-bottom .ind-table {
  break-before: avoid;
  page-break-before: avoid;
}

/* --- About page: exact-fit cards, no stretching --- */
.about-page .band-top {
  /* Let content define height; don't stretch */
  height: auto !important;
  grid-auto-rows: min-content !important;
  align-items: start !important;
  /* columns sized to content: ~72ch text + ~540px square SVG */
  grid-template-columns: minmax(0, 72ch) minmax(0, 540px) !important;
  justify-content: start; /* don't space-out to full width */
  gap: var(--gap);
}

/* Cards on this page should size to content exactly */
.about-page .card.text-card,
.about-page .card.media-card {
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
  display: block !important; /* disable flex fill behaviors */
  padding: 1rem; /* keep your standard padding */
}

/* Comfortable reading width for the intro paragraph */
.about-page .card.text-card .dash-markdown {
  max-width: 72ch;
}

/* Images: render at natural size (up to their column) */
.about-page .card.media-card img {
  display: block;
  width: 100%;
  height: auto;
  max-width: none; /* column already limits width */
}

/* Optional: make the bottom full-width graphic constrained nicely */
.about-page .card.media-card.is-full {
  /* center and cap width so it doesn't feel too wide on 4k screens */
  max-width: 1200px;
  margin: var(--gap) auto 0 auto;
}

/* loading screen

/* Full-screen white overlay, centered content */
.bootstrap-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: #ffffff;
  font-family: 'Inter', sans-serif;
}

/* Simple bar loader */
.bootstrap-spinner {
  width: 56px;
  height: 6px;
  border-radius: 999px;
  background: #3f2b80;
  animation: bootstrap-wave 0.9s infinite ease-in-out;
  transform-origin: center;
}

@keyframes bootstrap-wave {
  0%,
  100% {
    transform: scaleX(0.4);
    opacity: 0.4;
  }
  50% {
    transform: scaleX(1);
    opacity: 1;
  }
}

/* Centered label text */
.bootstrap-label {
  max-width: 360px;
  text-align: center;
  font-size: 0.9rem;
  line-height: 1.4;
  color: #4b5563;
}

.bootstrap-wheel{
  height: 72px;          /* adjust */
  width: 72px;
  object-fit: contain;
  margin-bottom: 14px;
  animation: zm-spin 1.1s linear infinite;
}

@keyframes zm-spin{
  from{ transform: rotate(0deg); }
  to{ transform: rotate(360deg); }
}
/* hamburger icon */
.hamburger-icon {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
}

.hamburger-icon .line {
  height: 2px;
  width: 100%;
  background: #333;
  border-radius: 2px;
}

.mobile-sidebar-links {
  display: block;
  max-height: 0;
  overflow: hidden;
  background: var(--sidebar-bg, #fff);
  transition: max-height 0.4s ease;
}

.mobile-sidebar-links.show {
  max-height: 500px;
}

.mobile-sidebar-links .nav-link {
  border-radius: 0px !important;
}

.three-col {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.overflow-x-auto {
  overflow-x: auto;
}

/* =============================================================
   §17  RESPONSIVE
   Sidebar collapse, content full-width, band/grid 1-col fallbacks,
   hamburger menu, 560px / 768px / 900px / 1200px breakpoints
============================================================= */

/* Responsive: collapse to 2 cols on tablets, 1 col on phones */
@media (max-width: 1024px) {
  .logo {
    height: 42px;
  }
  .two-col {
    grid-template-columns: 1fr;
  }
  .two-col .map-card {
    grid-column: 1;
  }
  .site-profile-page .band-top {
    grid-template-columns: 2fr;
  }
  .chart-grid:has(> :nth-child(3)) {
    grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
  }
  .three-col {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  .content {
    margin-left: 0;
  }

  .dash-page--profile .band-top {
    grid-template-columns: 1fr;
  }
  .band-top {
    grid-template-columns: 1fr;
  }
  .three-col {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .page-header {
    min-height: 44px;
  }
  .page-header .title {
    font-size: 20px;
  }
  .page-header .page-brand {
    height: 40px;
  }
  .page-header .page-brand .brand-mark {
    height: 36px;
  }
}

@media (min-width: 900px) {
  .hamburger-icon {
    display: none !important;
  }
  .sidebar-links-mobile {
    display: none !important;
  }
  .sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 14px;
  }
  .mobile-sidebar-links {
    height: 0 !important;
    overflow: hidden !important;
    transition: height 0.3s ease, opacity 0.3s ease;
  }
  .mobile-sidebar-links {
    display: none !important;
  }
}

/* LOGOS FOR DONORS AND PARNTERS */

/* Exactly 6 per row */
.logo-row{
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  align-items: center;
}

/* Slightly larger logos */
.logo-img{
  width: 100%;
  height: 80px;        /* increase size */
  object-fit: contain;
  display: block;
}

.logo-img{ margin: 0 auto; }

/* =============================================================
   §18  PANEL PAGE: CRC CHART GRID
   --map-h, --cfm-slot-h vars, .crc-left-col, .crc-map-card,
   .crc-slot1-card, chart-grid fixed-height cards, Plotly fill
   Used by: crc, incident_tracking, referral_mechanism, cfm_global
============================================================= */
.dash-page--panel {
  --map-h: min(70vh, 700px);
}

/* Force BOTH sides to the same fixed height */
.dash-page--panel .crc-left-col,
.dash-page--panel .crc-map-card {
  height: var(--map-h);
}

/* LEFT column = vertical flex stack */
.dash-page--panel .crc-left-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 0;
}

/* IMPORTANT: remove default .card margins inside the fixed-height column */
.dash-page--panel .crc-left-col > .card {
  margin: 0 !important;
}

/* Slot1 chart card must fill remaining left height */
.dash-page--panel .crc-slot1-card {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Pane (chart container) grows inside slot1 card */
.dash-page--panel .crc-slot1-card .pane {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;}

/* If your slot content is a dcc.Graph, make it fill */
.dash-page--panel .crc-slot1-card .pane .dash-graph,
.dash-page--panel .crc-slot1-card .pane .js-plotly-plot,
.dash-page--panel .crc-slot1-card .pane .plot-container {
  min-height: 100%;
  width: 100% !important;
}

/* RIGHT map card must be a flex column too (so map-wrap can stretch) */
.dash-page--panel .crc-map-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Map-slot div (replaces dcc.Graph when show_map: false) — must fill map-wrap */
.map-card .map-wrap > div {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* ── CFM / referral-mechanism chart grid rows (slots 2-7) ───────────
   Cards must be a fixed size. Charts fill the card; they never drive
   the card size. This prevents cards from resizing when filter data
   changes the chart's autosize height.
─────────────────────────────────────────────────────────────────── */
.dash-page--panel {
  --cfm-slot-h: 340px;   /* change this one value to resize all slot cards */
}

/* Grid items must not expand beyond their column */
.dash-page--panel .chart-grid > div {
  min-width: 0;
}

/* Card: fixed height, flex column so title + chart divide the space */
.dash-page--panel .chart-grid .card {
  height: var(--cfm-slot-h);
  display: flex;
  flex-direction: column;
  overflow: hidden;      /* clip chart if it exceeds the fixed height */
}

/* Title row: fixed, does not flex */
.dash-page--panel .chart-grid .card > .subtitle-small-semi {
  flex: 0 0 auto;
}

/* Chart container: fills all remaining card height */
.dash-page--panel .chart-grid .card > div:last-child {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

/* Force every Plotly container layer to fill the chart container */
.dash-page--panel .chart-grid .card .dash-graph,
.dash-page--panel .chart-grid .card .js-plotly-plot,
.dash-page--panel .chart-grid .card .plot-container,
.dash-page--panel .chart-grid .card .svg-container {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
}
.dash-page--panel .chart-grid .card .main-svg {
  width: 100% !important;
  height: 100% !important;
}


/* =============================================================
   §19  ACTIVITY PAGE OVERRIDES
   .dash-page--activity .filters-row (nowrap flex),
   11px dropdown font, multi-select tag wrapping,
   .summary-band chart card sizing, date-filter-inline
   Used by: act_tracking, act_tracking_bysite, cfm_directory,
            indicator_report, project_summary, landing_global
============================================================= */
.dash-page--activity .filters-row {
  display:flex;
  flex-wrap:nowrap;
  min-width: 200px; /* 👈 prevents wrapping */
  gap: var(--gutter);
  align-items:flex-end;
}

/* 11px font for all dropdown filters on activity pages */
.dash-page--activity .filter .Select-control,
.dash-page--activity .filter .Select-placeholder,
.dash-page--activity .filter .Select-value-label,
.dash-page--activity .filter .Select-input > input,
.dash-page--activity .filter .Select-option,
.dash-page--activity .filter .VirtualizedSelectOption,
.dash-page--activity .filter .Select--multi .Select-value {
  font-size: 11px !important;
}

/* =============================================================
   §20  LANDING PAGE
   .landing-page (full-viewport flex column), .landing-header,
   .landing-card (hover-lift), .landing-card-grid, .landing-section
   Used by: landing.py (app root)
============================================================= */
.landing-page {
  position: relative;
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem 1.5rem 5rem;
}

/* Header */
.landing-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 3rem;
}

.landing-logo {
  height: 100px;
  width: auto;
  object-fit: contain;
  margin-bottom: 1rem;
}

.landing-subtitle {
  font-size: 0.95rem;
  color: #303030;
  max-width: 800px;
  text-align: center;
  line-height: 1.6;
  margin: 0;
}

.landing-link {
  color: var(--accent, #3f2b80);
  text-decoration: underline;
}

.landing-link:hover {
  color: #912478;
}

.landing-iom-logo {
  position: fixed;
  bottom: 1.25rem;
  right: 1.5rem;
  height: 72px;
  width: auto;
  object-fit: contain;
}

/* Sections */
.landing-sections {
  width: 100%;
  max-width: 860px;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.landing-section-heading {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #303030;
  margin: 0 0 0.75rem;
}

/* Card grid */
.landing-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

/* Individual card */
.landing-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.85rem 1.25rem;
  border-left: 5px solid #3f2b80;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.landing-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.landing-card-icon {
  width: 52px;
  height: 52px;
  object-fit: contain;
  flex-shrink: 0;
  opacity: 0.75;
}

.landing-card:hover .landing-card-icon {
  opacity: 1;
}

.landing-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.landing-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #303030;
}

.landing-card-desc {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.4;
}

/* Responsive */
@media (max-width: 640px) {
  .landing-title {
    font-size: 1.5rem;
  }
  .landing-card-grid {
    grid-template-columns: 1fr;
  }
}

/* spacing between multi-select tags so they don't overlap */
.dash-page--activity .filter .Select--multi .Select-value {
  margin: 2px 3px 2px 0;
  padding: 1px 4px;
  line-height: 1.4;
}

/* give the control enough min-height to wrap tags cleanly */
.dash-page--activity .filter .Select-control {
  height: auto !important;
  min-height: 36px;
}

/* let the multi-value container wrap onto multiple lines */
.dash-page--activity .filter .Select--multi .Select-value-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  padding: 2px 4px;
}

/* make date filter not ridiculously wide */
.filters-row .filter.date-filter-inline,
.filters-row-2 .filter.date-filter-inline{
  flex: 0 0 auto;
  min-width: 280px;
}

/* Label → picker spacing for date filters */
.filter.date-filter-inline label{
  display: block;
  margin-bottom: 5px;
}

/* DatePickerRange internals: inline + compact */
.date-range-inline .DateRangePickerInput{
  display:flex;
  align-items:center;
  gap:6px;
  width:100%;
  background:transparent;
  border:0;
  padding:0;
}

.date-range-inline .DateInput{
  width:108px;              /* wide enough for YYYY-MM-DD with breathing room */
}

.date-range-inline .DateInput_input{
  font-family: 'Inter', sans-serif;
  font-size:12px;
  padding:5px 8px;
  height:36px;
  line-height:1.1;
  border-radius:6px;
  border:1px solid #F2F2F2;
  background:#fff;
  color: var(--text);
  width:100%;
  box-sizing:border-box;
}

.date-range-inline .DateRangePickerInput_arrow{
  padding:0 2px;
  color: #888;
}


/* =============================================================
   §21  KPI DISPLAY OVERRIDES
   .svc-card.kpi-card (icon-left horizontal layout),
   Only applies when BOTH classes exist
========================= */

.svc-card.kpi-card{
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  padding: 12px 14px !important;
  min-height: 74px !important;
  gap: 12px !important;
}

.kpi-subline{
  font-size: 12px;
  color: #303030;
  margin-top: 4px;
  white-space: nowrap;
}
/* make sure the icon can’t center itself or shrink */
.svc-card.kpi-card .svc-icon{
  width: 34px !important;
  height: 34px !important;
  flex: 0 0 34px !important;
  margin: 0 !important;
  align-self: flex-start !important;
  display: block !important;
}

/* body fills remaining space */
.svc-card.kpi-card .svc-body{
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  min-width: 0;
  gap: 2px !important;
}

/* label + value tune */
.svc-card.kpi-card .svc-title{
  line-height: 1.15 !important;
  margin: 0 !important;
}

.svc-card.kpi-card .svc-value{
  font-size: 24px !important;
  font-weight: 700 !important;
  line-height: 1.05 !important;
  color: #303030;
  margin-top: 2px !important;
  white-space: wrap;
}

.kpi-card .kpi-mainvalue{
  font-size: 24px;
  font-weight: 600;
  color: #303030;
  margin-bottom: 0;
  line-height: 1.1;
}

/* smaller second line */
.kpi-card .kpi-subvalue{
  font-size: 12px;
  font-weight: 600;
  color: #303030;
  line-height: 1.05;
  display: inline-block;
  margin-top: 0px;
}


/* override any global two-col fixed heights */
.grid.two-col.summary-band > .card{
  min-height: 0 !important;
  min-width: 0 !important;
  overflow: visible;
}

.grid.two-col.summary-band .chart-wrap{
  min-height: 280px !important;
  min-width: 0 !important;
  max-height: 700px;
  overflow-y: auto;
  overflow-x: hidden;
}


/* =============================================================
   §22  GLOBAL TABLE FILTERS
   .table-filters (flex row), .table-filters__filters (grid),
   .table-filters__actions (pinned right), responsive collapse
   Used by: monitoring site list, sector_indicator
============================================================= */

.table-filters{
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  width: 100%;
  margin: 0 0 0.75rem 0;
}

/* left group (filters) */
.table-filters__filters{
  flex: 0 1 auto;
  max-width: 66.666%;
  min-width: 0;
}

/* IMPORTANT:
   Your injected filters are usually wrapped in ONE extra div.
   Force that wrapper to be the horizontal row. */
.table-filters__filters > div{
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 0.75rem;
  min-width: 0;
}

/* Now size the actual filter blocks (direct children of that wrapper) */
.table-filters__filters > div > *{
  display: flex;
  flex-direction: column;        /* title above */
  gap: 0.25rem;

  width: clamp(260px, 18vw, 420px);  /* wide, but not ridiculous */
}

/* If there is NO extra wrapper div, still work */
.table-filters__filters > *:not(div){
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  width: clamp(260px, 18vw, 420px);
}

/* Make dropdown/date controls fill the filter width (fixes tiny arrow box) */
.table-filters__filters .Select,
.table-filters__filters .Select-control,
.table-filters__filters .DatePickerRange,
.table-filters__filters .DateInput{
  width: 100% !important;
}

/* Remove any default label spacing that can create vertical gaps */
.table-filters__filters label{ margin: 0 !important; }

/* right group (actions) pinned hard right */
.table-filters__actions{
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

/* smaller text inside dropdown values */
.table-filters__filters .Select,
.table-filters__filters .Select-control,
.table-filters__filters .Select-menu-outer,
.table-filters__filters .Select-value-label,
.table-filters__filters .Select-placeholder{
  font-size: 12px !important;
}

/* small screens: allow wrap */
@media (max-width: 900px){
  .table-filters{ flex-wrap: wrap; }
  .table-filters__filters{ max-width: 100%; }
  .table-filters__filters > div{ flex-wrap: wrap; }
  .table-filters__actions{
    width: 100%;
    justify-content: flex-end;
    margin-left: 0;
  }
}

/* =============================================================
   §23  DROPDOWN UTILITIES
   .dd-crowded (smaller font for dense dropdowns),
   .date-filter-inline sizing, label spacing
   Used by: site_profile, act_tracking (site dropdown)
============================================================= */

/* Control (closed state) + placeholder + typed text */
.dd-crowded .Select-control,
.dd-crowded .Select-placeholder,
.dd-crowded .Select-input,
.dd-crowded .Select-value-label,
.dd-crowded .Select--multi .Select-value {
  font-size: 12px;
  line-height: 1.2;
}

/* Menu options (open list) */
.dd-crowded .Select-option,
.dd-crowded .VirtualizedSelectOption {
  font-size: 12px;
  line-height: 1.25;
  padding-top: 8px;
  padding-bottom: 8px;
}

/* Optional: a little more space between multi-selected “tags” */
.dd-crowded .Select--multi .Select-value {
  margin-top: 2px;
  margin-bottom: 2px;
}

/* =============================================================
   §24  CLUSTER DASHBOARD
   Toggle colour overrides (blue_saph palette),
============================================================= */

/* thumb: cluster blue_saph instead of Zite purple */
.clus-toggle .uoa-switch::after {
  background: #1B657C;
}

/* active label text: cluster blue_saph */
.clus-toggle .uoa-switch:has(.uoa-toggle-input label:first-child input:checked) + .uoa-toggle-labels .uoa-left,
.clus-toggle .uoa-switch:has(.uoa-toggle-input label:last-child  input:checked) + .uoa-toggle-labels .uoa-right {
  color: #1B657C;
}


/* --- Cluster: filter bar dropdown options
   Smaller font + extra line-height so long org-type labels
   don't overlap when the menu is open.
   Use [id^=] attribute selector so the rules apply inside each
   dcc.Dropdown's own wrapper div regardless of nesting depth.
============================================================= */

/* Option items in the open dropdown list */
[id^="clus_landing-filter"] .Select-option,
[id^="clus_landing-country"] .Select-option {
  font-size:   0.72rem !important;
  line-height: 1.45   !important;
  padding:     7px 10px !important;
  white-space: normal  !important;
  word-break:  break-word !important;
}

/* Control area: placeholder, selected value text, tags, search input */
[id^="clus_landing-filter"] .Select-placeholder,
[id^="clus_landing-filter"] .Select-value-label,
[id^="clus_landing-filter"] .Select--multi .Select-value,
[id^="clus_landing-filter"] .Select--multi .Select-value-label,
[id^="clus_landing-filter"] .Select--multi .Select-value-icon,
[id^="clus_landing-filter"] .Select-input > input,
[id^="clus_landing-country"] .Select-placeholder,
[id^="clus_landing-country"] .Select-value-label,
[id^="clus_landing-country"] .Select-input > input {
  font-size:   0.72rem !important;
  line-height: 1.3     !important;
}

/* --- Cluster: PDF export (clus_pdf.py)
   Screen: hide print-only elements.
   @media print / body.printing: reveal them, hide UI chrome. */

/* ── Screen: hide print-only elements ── */
.clus-pdf-header,
.clus-pdf-footer,
.clus-pdf-about-card {
  display: none;
}


/* ══════════════════════════════════════════════════════════════════════════════
   @media print — Cluster CCPM PDF page 1 layout
   ══════════════════════════════════════════════════════════════════════════════

   DOM order inside #clus_landing-root:
     1. .clus-pdf-header       → print-only — page title + logos
     2. .clus-about-banner     → screen-only — hidden in print
     3. .clus-filter-bar       → screen-only — hidden in print
     4. #clus_landing-pdf-wrap → main content grid in print
          ├─ .clus-pdf-about-card     → print-only About card
          ├─ #clus_landing-summary-row  (display:contents in print)
          │    └─ .clus-pdf-summary-grid (display:contents in print)
          │         ├─ .clus-pdf-col-respondents   → grid-area: respondents
          │         ├─ .clus-pdf-col-ratings-a     → grid-area: ratings-a
          │         └─ .clus-pdf-col-ratings-b     → grid-area: ratings-b
          ├─ #clus_landing-table      → breakdown tables (page 2+)
          └─ #clus_landing-table-r2   → sub-rating tables (page 2+)
     5. .clus-pdf-footer       → print-only footer

   Page 1 visual layout:
     ┌─────────────────── PDF header ──────────────────────┐
     │ CCPM — Country Name               [logos]           │
     ├──────────────────────┬──────────────────────────────┤
     │  About the Dashboard │  Respondents card            │
     ├──────────────────────┼──────────────────────────────┤
     │  Core Ratings (1–4)  │  Core Ratings (5–7)          │
     ├──────────────────────┴──────────────────────────────┤
     │  Tables ...                                          │
   ══════════════════════════════════════════════════════════════════════════════ */

@media print {
  /* Force colour rendering */
  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* ── Override the site-profile blanket "body * { visibility: hidden }" ──
     That rule hides everything; we restore the cluster root and all its
     descendants here so the cluster PDF content is actually visible. */
  #clus_landing-root,
  #clus_landing-root * {
    visibility: visible !important;
  }

  /* ── Hide all app chrome ── */
  .app-sidebar, .sidebar, .topnav, .navbar, .footer,
  .page-header, .clus-filter-bar, .clus-about-banner,
  #clus_landing-pdf-btn-wrap {
    display: none !important;
    visibility: hidden !important;
  }

  /* ── Page 1 header ── */
  .clus-pdf-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 0 10px 0 !important;
    margin-bottom: 14px !important;
    border-bottom: 2.5px solid #1B657C !important;
  }
  .clus-pdf-header-left {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
  }
  .clus-pdf-title {
    font-size: 15pt !important;
    font-weight: 700 !important;
    color: #1B657C !important;
    line-height: 1.2 !important;
  }
  .clus-pdf-subheading {
    font-size: 8pt !important;
    color: #64748b !important;
  }
  .clus-pdf-header-logos {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
  }
  .clus-pdf-logo {
    height: 40px !important;
    width: auto !important;
    object-fit: contain !important;
  }

  /* ── Main content: 2-column grid ── */
  #clus_landing-pdf-wrap {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    grid-template-rows: auto auto auto !important;
    grid-template-areas:
      "about      respondents"
      "ratings-a  ratings-b"
      "r2         r2" !important;
    column-gap: 16px !important;
    row-gap: 14px !important;
    width: 100% !important;
  }

  /* ── Print-only About card ── */
  .clus-pdf-about-card {
    display: block !important;
    grid-area: about !important;
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    border-left: 4px solid #1B657C !important;
    border-radius: 8px !important;
    padding: 10px 12px !important;
    align-self: start !important;
  }
  .clus-pdf-about-heading {
    font-size: 7pt !important;
    font-weight: 700 !important;
    color: #1B657C !important;
    text-transform: uppercase !important;
    letter-spacing: 0.06em !important;
    margin-bottom: 5px !important;
  }
  .clus-pdf-about-body {
    font-size: 7.5pt !important;
    color: #475569 !important;
    line-height: 1.4 !important;
    margin: 0 0 5px 0 !important;
  }

  /* ── Make summary-row and its inner grid transparent to the outer grid ──
     display:contents removes their boxes so their children become direct
     participants in the #clus_landing-pdf-wrap grid. */
  #clus_landing-summary-row,
  .clus-pdf-summary-grid {
    display: contents !important;
  }

  /* ── Card column placement in the outer grid ── */
  .clus-pdf-col-respondents {
    grid-area: respondents !important;
    align-self: start !important;
  }
  .clus-pdf-col-ratings-a {
    grid-area: ratings-a !important;
    align-self: start !important;
  }
  .clus-pdf-col-ratings-b {
    grid-area: ratings-b !important;
    align-self: start !important;
  }

  /* ── Breakdown tables — hidden in PDF (too wide, low value in print) ── */
  #clus_landing-table {
    display: none !important;
    visibility: hidden !important;
  }

  /* ── Sub-rating tables — full width ── */
  #clus_landing-table-r2 {
    grid-area: r2 !important;
  }

  /* ── SAG section: single column in print (pie above, table below) ── */
  .clus-sag-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .clus-sag-table-wrap {
    height: auto !important;
    overflow-y: visible !important;
  }

  /* ── TWIG section: single column in print (pie above, bar below) ── */
  .clus-twigs-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  /* ── Explicit page breaks ── */
  .clus-pdf-break {
    page-break-before: always !important;
    break-before: page !important;
  }

  /* ── Card typography scale-down for print ── */
  .clus-rating-card,
  .dash-spreadsheet-container {
    page-break-inside: avoid !important;
    font-size: 8pt !important;
  }

  /* ── Avoid breaking charts across pages ── */
  #clus_landing-pdf-wrap .js-plotly-plot {
    page-break-inside: avoid !important;
  }

  /* ── Footer — fixed at bottom of every page ── */
  .clus-pdf-footer {
    display: block !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    border-top: 1px solid #e2e8f0 !important;
    padding: 4px 10px !important;
    font-size: 7pt !important;
    color: #94a3b8 !important;
    background: #fff !important;
  }
  .clus-pdf-footer-url {
    font-size: 6pt !important;
    color: #94a3b8 !important;
    word-break: break-all !important;
  }
}


/* ══════════════════════════════════════════════════════════════════════════════
   body.printing — live preview applied before the dialog opens
   Mirrors the @media print rules so the page reflows the moment
   the button is clicked, giving the user a preview before saving.
   ══════════════════════════════════════════════════════════════════════════════ */
body.printing .app-sidebar, body.printing .sidebar,
body.printing .topnav,      body.printing .navbar,
body.printing .footer,      body.printing .page-header,
body.printing .clus-filter-bar,
body.printing .clus-about-banner,
body.printing #clus_landing-pdf-btn-wrap {
  display: none !important;
}

body.printing .clus-pdf-header {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0 0 10px 0 !important;
  margin-bottom: 14px !important;
  border-bottom: 2.5px solid #1B657C !important;
}
body.printing .clus-pdf-title {
  font-size: 15pt !important;
  font-weight: 700 !important;
  color: #1B657C !important;
}
body.printing .clus-pdf-subheading {
  font-size: 8pt !important;
  color: #64748b !important;
}
body.printing .clus-pdf-header-logos {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}
body.printing .clus-pdf-logo {
  height: 40px !important;
  width: auto !important;
  object-fit: contain !important;
}

body.printing #clus_landing-pdf-wrap {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  grid-template-areas:
    "about      respondents"
    "ratings-a  ratings-b"
    "r2         r2" !important;
  column-gap: 16px !important;
  row-gap: 14px !important;
}
body.printing .clus-pdf-about-card   { display: block !important; grid-area: about !important; border: 1px solid #e2e8f0 !important; border-left: 4px solid #1B657C !important; border-radius: 8px !important; padding: 10px 12px !important; align-self: start !important; }
body.printing .clus-pdf-about-heading { font-size: 7pt !important; font-weight: 700 !important; color: #1B657C !important; text-transform: uppercase !important; margin-bottom: 5px !important; }
body.printing .clus-pdf-about-body   { font-size: 7.5pt !important; color: #475569 !important; line-height: 1.4 !important; margin: 0 0 5px 0 !important; }
body.printing #clus_landing-summary-row,
body.printing .clus-pdf-summary-grid  { display: contents !important; }
body.printing .clus-pdf-col-respondents { grid-area: respondents !important; align-self: start !important; }
body.printing .clus-pdf-col-ratings-a  { grid-area: ratings-a !important;  align-self: start !important; }
body.printing .clus-pdf-col-ratings-b  { grid-area: ratings-b !important;  align-self: start !important; }
body.printing #clus_landing-table    { display: none !important; visibility: hidden !important; }
body.printing #clus_landing-table-r2 { grid-area: r2 !important; }
body.printing .clus-sag-grid         { grid-template-columns: 1fr !important; gap: 10px !important; }
body.printing .clus-sag-table-wrap   { height: auto !important; overflow-y: visible !important; }
body.printing .clus-twigs-grid       { grid-template-columns: 1fr !important; gap: 10px !important; }
body.printing .clus-pdf-break        { page-break-before: always !important; break-before: page !important; }

body.printing .clus-pdf-footer {
  display: block !important;
  border-top: 1px solid #e2e8f0 !important;
  padding: 4px 10px !important;
  font-size: 7pt !important;
  color: #94a3b8 !important;
  margin-top: 24px !important;
}

/* =============================================================
   §25  WEEK RANGE SLIDER
   .rc-slider Zite-blue theming,
============================================================= */
.week-filter .rc-slider-track {
  background-color: #3f2b80;
}
.week-filter .rc-slider-handle {
  border-color: #3f2b80;
  background-color: #3f2b80;
  opacity: 1;
}
.week-filter .rc-slider-handle:hover {
  border-color: #3f2b80;
}
.week-filter .rc-slider-handle-dragging.rc-slider-handle-dragging.rc-slider-handle-dragging {
  border-color: #3f2b80;
  box-shadow: 0 0 0 5px rgba(63, 43, 128, 0.2);
}
.week-filter .rc-slider-dot-active {
  border-color: #3f2b80;
}

/* =============================================================
   §26  WEEK TREE PICKER
   .wtp-* tree navigation (year/month/week hierarchy),
============================================================= */
.wtp {
  position: relative;
  display: inline-block;
}

/* Trigger — looks like a standard dropdown control */
.wtp-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #cccccc;
  border-radius: 4px;
  padding: 5px 8px;
  background: #fff;
  cursor: pointer;
  user-select: none;
  min-width: 110px;
  min-height: 36px;
  font-size: 13px;
  color: #333;
  transition: border-color 0.15s;
}
.wtp-trigger:hover {
  border-color: #aaaaaa;
}
.wtp-trigger.open {
  border-color: #3f2b80;
  box-shadow: 0 0 0 1px #3f2b80;
}

/* Floating panel */
.wtp-panel {
  position: absolute;
  top: calc(100% + 3px);
  left: 0;
  z-index: 9999;
  background: #fff;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.13);
  min-width: 190px;
  max-height: 320px;
  overflow-y: auto;
  padding: 4px 0 6px;
}

/* Year node */
.wtp-panel details {
  margin: 0;
}
.wtp-yr {
  list-style: none;
  cursor: pointer;
  user-select: none;
  padding: 6px 10px 4px 8px;
  font-size: 13px;
  font-weight: 700;
  color: #222;
  border-top: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  gap: 5px;
}
.wtp-yr::-webkit-details-marker { display: none; }
.wtp-yr::before { content: "▸"; font-size: 10px; color: #888; }
details[open] > .wtp-yr::before { content: "▾"; }

/* Month node */
.wtp-mo {
  list-style: none;
  cursor: pointer;
  user-select: none;
  padding: 4px 10px 3px 22px;
  font-size: 12px;
  font-weight: 600;
  color: #555;
  display: flex;
  align-items: center;
  gap: 4px;
}
.wtp-mo::-webkit-details-marker { display: none; }
.wtp-mo::before { content: "▸"; font-size: 9px; color: #aaa; }
details[open] > .wtp-mo::before { content: "▾"; }

/* Week leaf — selectable */
.wtp-leaf {
  padding: 3px 10px 3px 38px;
  font-size: 12px;
  cursor: pointer;
  color: #333;
  border-radius: 3px;
  margin: 1px 5px;
  transition: background 0.1s, color 0.1s;
}
.wtp-leaf:hover {
  background: rgba(63, 43, 128, 0.1);
  color: #3f2b80;
}
.wtp-leaf.wtp-active {
  background: rgba(63, 43, 128, 0.15);
  color: #3f2b80;
  font-weight: 600;
}

/* =============================================================
   §27  CHART VIEW TOGGLE
   Weekly / Monthly pill switch on CFM page, 
============================================================= */
.chart-view-toggle {
  display: flex;
  gap: 0;
  flex-shrink: 0;
}
.chart-view-toggle label {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid #d0d0d0;
  color: #666;
  background: #fff;
  transition: background 0.15s, color 0.15s;
  user-select: none;
  white-space: nowrap;
}
.chart-view-toggle label:first-of-type {
  border-radius: 10px 0 0 10px;
}
.chart-view-toggle label:last-of-type {
  border-radius: 0 10px 10px 0;
  border-left: none;
}
.chart-view-toggle input[type="radio"] {
  display: none;
}
.chart-view-toggle label:has(input:checked) {
  background: #3f2b80;
  border-color: #3f2b80;
  color: #fff;
  font-weight: 600;
}

/* =============================================================
   §28  CFM ABOUT BANNER
   .cfm-about-banner (accent-left card), .cfm-about-label, .cfm-about-body
============================================================= */
.cfm-about-banner {
  background: #fff;
  border-radius: var(--radius, 12px);
  border-left: 4px solid #3f2b80;
  box-shadow: var(--shadow, 0 2px 8px rgba(0,0,0,.06));
  padding: 14px 20px;
  margin-bottom: 1rem;
}
.cfm-about-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #3f2b80;
  margin-bottom: 6px;
}
.cfm-about-body p,
.cfm-about-body {
  font-size: 0.80rem;
  color: #475569;
  line-height: 1.6;
  margin: 0;
}

/* =============================================================
   §29  CFM STAT CARDS
   .cfm-kpi-stat-card (flex row with accent border),
============================================================= */
.cfm-kpi-stat-card {
  padding: 14px 16px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  min-height: 110px;
  border-radius: var(--radius, 12px);
  box-shadow: var(--shadow, 0 2px 8px rgba(0,0,0,.06));
}
.cfm-kpi-stat-label {
  font-size: 12px;
  color: #303030;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-weight: 600;
  overflow-wrap: break-word;
  min-width: 0;
}
.cfm-kpi-stat-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.cfm-kpi-big-num {
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.cfm-kpi-muted {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 4px;
}
