/* =============================================================
   Global tokens & base
============================================================= */
: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;

  .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', Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

.layout {
  min-height: 100vh;
}

/* Sidebar */
.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: #111827;
}
.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;
}

/* =============================================================
   Heading banner (title bar) + logos
============================================================= */

.page-header {
  min-height: var(--header-h); /* core height (logo)  */
  padding-block: var(--banner-pad-y); /* extra space above/below heading */
  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;
  }
}

/* =============================================================
   Cards
============================================================= */
.card {
  background: #fff !important; /* ensure white card backgrounds everywhere */
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}


/* =============================================================
   KPI strip (shared) — dynamic columns by card count
============================================================= */
.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: center;
  gap: 4px;
}
.kpi-label {
  font-size: 12px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-weight: 500;
}
.kpi-value {
  font-size: 24px;
  font-weight: 600;
  color: #111827;
  line-height: 1.1;
}

/* 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; }

/* Optional indicator page tweaks remain the same */
.indicator-page .kpi-row .kpi-label {
  font-size: 12px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-weight: 500;
}
.indicator-page .kpi-row .kpi-value {
  font-size: 24px;
  font-weight: 600;
  color: #111827;
  line-height: 1.1;
}
.indicator-page .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 0; /* split available height evenly */
  min-height: 180px;
}
.chart-flex .pane > .dash-graph,
.chart-flex .pane .js-plotly-plot,
.chart-flex .pane .plot-container,
.chart-flex .pane .svg-container {
  height: 100% !important;
  width: 100% !important;
}
.chart-flex .pane .svg-container {
  padding: 0 !important;
}
.chart-flex .pane .main-svg {
  height: 100% !important;
}


/* --- Site List: force table to fill the white card width --- */
.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;
}

.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;
}



/* 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;
}

/* =============================================================
   SERVICE MAPPING / CONTACT LIST (UNCHANGED)
============================================================= */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1.2fr; /* left | right */
  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 0;
  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 {
  height: 100% !important;
  width: 100% !important;
}
.text-card .chart-flex .pane .svg-container {
  padding: 0 !important;
}
.text-card .chart-flex .pane .main-svg {
  height: 100% !important;
}

/* 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;
}
.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;
}



/* Filters & actions (Service Mapping) */
/* =======================
   Service Mapping: filters row (scoped)
   ======================= */
.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: 11px;
}

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

/* allow children to shrink properly (prevents overflow) */
.sm-filters-row > .filter{ min-width: 0; }

/* 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;
}

/* 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; }
}


/* ---------------- Date picker: compact structure + full theming ---------------- */

/* 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, system-ui, -apple-system, BlinkMacSystemFont, 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', Arial, 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', Arial, 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;
}
.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;
}

/* =============================================================
   NEW "BAND" PAGES (Monitoring/Indicator & Site Profile only)
============================================================= */
.page--two-col,
.page--three-col {
  --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);
}

/* Monitoring/Indicator: top = 2 equal columns */
.page--two-col .band-top {
  grid-template-columns: 1fr 1fr;
}

/* Site Profile: top = 3 equal columns */
.page--three-col .band-top {
  grid-template-columns: repeat(3, 1fr);
}
.page--three-col .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 */
.page--two-col .map-card,
.page--three-col .map-card {
  height: 100%;
  max-height: var(--map-h);
  display: flex;
  flex-direction: column;
}
.page--two-col .map-card .map-wrap,
.page--three-col .map-card .map-wrap {
  flex: 1 1 auto;
  min-height: 0;
}
.page--two-col .map-card .dash-graph,
.page--two-col .map-card .js-plotly-plot,
.page--two-col .map-card .plot-container,
.page--two-col .map-card .svg-container,
.page--three-col .map-card .dash-graph,
.page--three-col .map-card .js-plotly-plot,
.page--three-col .map-card .plot-container,
.page--three-col .map-card .svg-container {
  height: 100% !important;
  width: 100% !important;
}
.page--three-col .band-bottom {
  margin-top: calc(var(--gap) + 6px);
}
/* Site Profile: shrink ONLY the first (left) card using existing classes */
.site-profile-page.page--three-col .band-top > :first-child > .card {
  font-size: 20px;
  line-height: 1.35;
}

.site-profile-page.page--three-col
  .band-top
  > :first-child
  > .card
  .panel-title {
  font-size: 13px;
  margin-bottom: 6px;
}

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

.site-profile-page.page--three-col
  .band-top
  > :first-child
  > .card
  .prop-row
  dt,
.site-profile-page.page--three-col
  .band-top
  > :first-child
  > .card
  .prop-row
  dd {
  font-size: 13px;
}


/* 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;
}
/* =============================================================
   Site Profile specifics
============================================================= */
.site-profile-page .panel-title {
  font-weight: 700;
  margin-bottom: 8px;
}

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

/* Property list */
.prop-list dl {
  margin: 0;
}
.prop-row {
  display: grid;
  grid-template-columns: 140px 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;
}
.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: 13px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #303030;
  line-height: 1.2;
}
.svc-value {
  margin-top: 2px;
  font-size: 12px;
  color: #6c6968;
  line-height: 1.2;
  white-space: normal;
}

/* Indicator Results table */
.ind-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.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;
}
.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: #0f766e;
}
.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 */
.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) */
.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) */
.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 */
.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) {
  .site-profile-page .chart-grid {
    grid-template-columns: 1fr !important;
  }
}

.area-profile-table td.hl-green  { background-color: #0f766e; 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: #0f766e;
}
.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: #6b7280;
  font-weight: 700;
}

.indicator-page .kpi-card.insight .kpi-text {
  font-size: 16px;
  line-height: 1.3;
  font-weight: 700;
  color: #0f172a;
  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: 11px;
  font-weight: 600;
  line-height: 1;
}
.indicator-page .badge.red {
  background: #fee2e2;
  color: #e4225f;
}
.indicator-page .badge.green {
  background: #dcfce7;
  color: #0f766e;
}
.indicator-page .badge.yellow {
  background: #fef9c3;
  color: #febd33;
}

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

/* === Area bar-cells in DataTable === */
/* === Area bar-cells in DataTable === */
.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:#111827;
  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:#0F766E; }
.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:11px;
  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;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  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 the Site Profile content, hide app chrome */
/* Print only Site Profile content; hide app chrome */
@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 */
  .site-profile-page,
  .site-profile-page * {
    visibility: visible !important;
  }

  /* Remove grey backgrounds / shadows / width clamps */
  .app-sidebar,
  .sidebar,
  .topnav,
  .navbar,
  .footer,
  .dash-debug-menu,
  .dash-undo-redo,
  .filters-row,
  .btn {
    display: none !important;
  }

  .page,
  .content,
  .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;
  }

  /* 4 KPIs in a single row (full width) */
  .kpi-row {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 8px !important;
  }
  .kpi-card {
    break-inside: avoid;
  }

  /* Top band: 3 columns (Site Details, Services, Map) */
  .band-top {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 12px !important;
  }

  /* Middle chart grid: 3 cards per row */
  #siteprof-chart-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 12px !important;
  }

  /* Bottom: table spans full width */
  .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,
  .ind-table th {
    overflow: hidden;
  }
  table,
  tr,
  td,
  th {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  /* Tidy Map for print and hide controls */
  .mapboxgl-ctrl-top-right,
  .mapboxgl-ctrl-bottom-right {
    display: none !important;
  }
  .map-wrap {
    height: 110mm !important;
  } /* adjust if needed */
}

/* Optional: when you trigger print, we add a .printing class in JS for preview */
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 {
  display: none !important;
}

/* ------------ 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: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
    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;
}

/* =============================================================
   Responsive
============================================================= */

/* 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;
  }

  .page--two-col .band-top {
    grid-template-columns: 1fr;
  }
  .page--three-col .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; }

/* CRC shorter map and chart sizing */
/* CRC only: shared top-band height */
.crc-visits-page{
  --map-h: min(50vh, 700px);
}

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

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

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

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

/* Pane (chart container) grows inside slot1 card */
.crc-visits-page .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 */
.crc-visits-page .crc-slot1-card .pane .dash-graph,
.crc-visits-page .crc-slot1-card .pane .js-plotly-plot,
.crc-visits-page .crc-slot1-card .pane .plot-container{
  height: 100% !important;
  width: 100% !important;
}

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

/* Map fills remaining height inside map card */
.crc-visits-page .crc


/* TEMP STYLING FOR ACTIVITY DEMO*/
.activity-demo-page .filters-row{
  display:flex;
  flex-wrap:nowrap;
  min-width: 200px; /* 👈 prevents wrapping */
  gap: var(--gutter);
  align-items:flex-end;
}

/* make date filter not ridiculously wide */
.filters-row .filter.date-filter-inline{
  flex: 0 0 auto;
  min-width: 220px;          /* tune if needed */
}

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

.date-range-inline .DateInput{
  width:80px;               /* compact input width */
}

.date-range-inline .DateInput_input{
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size:12px;
  padding:4px 6px;
  height:35px;
  line-height:1.1;
  border-radius:6px;
  border:1px solid #ddd;
  background:#fff;
  color: var(--text);
  width:100%;
  box-sizing:border-box;
}

.date-range-inline .DateRangePickerInput_arrow{
  padding:0 4px;
}


/* =========================
   KPI overrides (force icon-left + bigger icon)
   Only applies when BOTH classes exist
========================= */

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

.kpi-subline{
  font-size: 12px;
  color: #6B7280;
  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: center !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;
}

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

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

.kpi-card .kpi-mainvalue{
  font-size: 20px;      /* or whatever your main size is */
  font-weight: 700;
    color: #111827;
  margin-bottom: 0;
  line-height: 1.1;
}

/* smaller second line */
.kpi-card .kpi-subvalue{
  font-size: 12px;
  font-weight: 500;
  color: #111827;
  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: hidden;
}

.grid.two-col.summary-band .chart-wrap{
  min-height: 280px !important;
  min-width: 0 !important;
}

/* Plotly internals follow wrapper height */
.grid.two-col.summary-band .chart-wrap .js-plotly-plot,
.grid.two-col.summary-band .chart-wrap .plot-container,
.grid.two-col.summary-band .chart-wrap .svg-container{
  height: 100% !important;
  width: 100% !important;
}


/* =======================
   Global table filter rows (1–3 filters)
   ======================= */
/* ===== Standard table filters row + actions pinned right (single block) ===== */

.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;
  }
}

