/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* =============================================
   ENTERPRISE CARD — Clean operational foundation
   ============================================= */

.glass-card {
  position: relative;
  overflow: hidden;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(23, 32, 51, 0.06), 0 1px 2px rgba(23, 32, 51, 0.04);
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.glass-card:hover {
  box-shadow: 0 4px 12px rgba(23, 32, 51, 0.08);
  border-color: #CBD5E1;
}

.dark .glass-card {
  background: #1A2332;
  border-color: rgba(148, 163, 184, 0.18);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.24);
}

.dark .glass-card:hover {
  border-color: rgba(21, 101, 192, 0.45);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.32);
}

.glass-card-link:hover {
  border-color: rgba(21, 101, 192, 0.45);
  box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.08), 0 4px 12px rgba(23, 32, 51, 0.08);
}

.dark .glass-card-link:hover {
  border-color: rgba(66, 165, 245, 0.45);
  box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.15), 0 4px 16px rgba(0, 0, 0, 0.32);
}

.glass-panel {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(23, 32, 51, 0.04);
}

.dark .glass-panel {
  background: #1A2332;
  border-color: rgba(148, 163, 184, 0.18);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* =============================================
   MANAGEMENT SUMMARY PANEL
   ============================================= */
.management-summary__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.875rem;
  border-bottom: 1px solid rgba(14, 42, 92, 0.06);
}

.dark .management-summary__header {
  border-bottom-color: rgba(240, 215, 140, 0.1);
}

.management-summary__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0;
  background: linear-gradient(135deg, rgba(43, 111, 212, 0.14), rgba(26, 79, 156, 0.08));
  color: #2B6FD4;
  flex-shrink: 0;
}

.dark .management-summary__icon {
  background: linear-gradient(135deg, rgba(240, 215, 140, 0.16), rgba(43, 111, 212, 0.1));
  color: #F0D78C;
}

.management-summary__title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  color: #0E2A5C;
  letter-spacing: -0.01em;
}

.dark .management-summary__title {
  color: #ffffff;
}

.management-summary__subtitle {
  margin: 0.125rem 0 0;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
}

.dark .management-summary__subtitle {
  color: rgba(240, 215, 140, 0.65);
}

.management-summary__body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.management-summary--sidebar {
  padding: 0.625rem 0.75rem;
}

.management-summary--sidebar .management-summary__header {
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  gap: 0.5rem;
}

.management-summary--sidebar .management-summary__icon {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.375rem;
}

.management-summary--sidebar .management-summary__title {
  font-size: 0.75rem;
}

.management-summary--sidebar .management-summary__body {
  gap: 0.5rem;
}

.management-summary__hero {
  padding: 0.5rem 0.625rem;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, rgba(21, 101, 192, 0.08), rgba(21, 101, 192, 0.02));
  border: 1px solid rgba(21, 101, 192, 0.12);
}

.dark .management-summary__hero {
  background: linear-gradient(135deg, rgba(21, 101, 192, 0.18), rgba(21, 101, 192, 0.06));
  border-color: rgba(148, 163, 184, 0.15);
}

.management-summary__hero-value {
  margin: 0.125rem 0 0;
  font-size: 1.125rem;
  font-weight: 800;
  color: #172033;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.dark .management-summary__hero-value {
  color: #F8FAFC;
}

.management-summary__hero-unit {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1565C0;
  margin-left: 0.25rem;
}

.management-summary__hero-detail {
  margin: 0.125rem 0 0;
  font-size: 0.625rem;
  font-weight: 600;
  color: #64748B;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.management-summary--sidebar .management-summary__hero-value {
  font-size: 1rem;
}

.management-summary--sidebar .management-summary__section-label {
  margin-bottom: 0.25rem;
  font-size: 0.5625rem;
}

.management-summary--sidebar .management-summary__metric-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.3125rem;
}

.management-summary--sidebar .management-insight-stat {
  padding: 0.375rem 0.4375rem;
  border-radius: 0.375rem;
}

.management-summary--sidebar .management-insight-stat__label {
  font-size: 0.5rem;
  letter-spacing: 0.05em;
}

.management-summary--sidebar .management-insight-stat__value {
  margin-top: 0.125rem;
  font-size: 0.75rem;
}

.management-summary--sidebar .management-insight-stat__detail {
  margin-top: 0.0625rem;
  font-size: 0.5625rem;
  line-height: 1.2;
}

.management-summary--sidebar .management-summary__leaders {
  grid-template-columns: 1fr;
  gap: 0.3125rem;
}

.management-summary--sidebar .management-insight-leader {
  padding: 0.375rem 0.4375rem;
  border-radius: 0.375rem;
  flex-direction: row;
  align-items: center;
  gap: 0.375rem;
}

.management-summary--sidebar .management-insight-leader__label {
  font-size: 0.5rem;
  flex: 0 0 auto;
  min-width: 4.25rem;
}

.management-summary--sidebar .management-insight-leader__name {
  font-size: 0.6875rem;
  flex: 1 1 auto;
}

.management-summary--sidebar .management-insight-leader__metric {
  font-size: 0.5625rem;
  flex: 0 0 auto;
  white-space: nowrap;
}

.management-summary--sidebar .management-summary__alert {
  padding: 0.4375rem 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.management-summary--sidebar .management-summary__alert-label {
  margin: 0;
  font-size: 0.5rem;
}

.management-summary--sidebar .management-summary__alert-value {
  margin: 0;
  font-size: 0.8125rem;
}

.management-summary--full .management-summary__body {
  flex: 1;
  justify-content: center;
}

.management-summary--full .management-summary__metric-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 1280px) {
  .management-summary--full .management-summary__metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .management-summary--full .management-summary__leaders {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.management-summary--full {
  padding: 1rem;
}

.management-summary--full .management-summary__header {
  margin-bottom: 0.875rem;
  padding-bottom: 0.75rem;
}

.management-summary-card {
  overflow: visible !important;
}

/* Top agents + management summary row (1/2 · 1/2) */
.dashboard-sales-row {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 768px) {
  .dashboard-sales-row {
    flex-direction: row;
    align-items: flex-start;
  }

  .dashboard-sales-row__chart {
    flex: 1 1 0;
    min-width: 0;
  }

  .dashboard-sales-row__summary {
    flex: 1 1 0;
    min-width: 0;
  }

  .dashboard-sales-row > :only-child {
    flex: 1 1 100%;
  }
}

.management-summary__hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.625rem;
}

.management-summary__section-label {
  margin: 0 0 0.5rem;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #94a3b8;
}

.dark .management-summary__section-label {
  color: rgba(240, 215, 140, 0.55);
}

.management-summary__metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}

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

.management-insight-leader {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  min-width: 0;
  padding: 0.625rem;
  border-radius: 0;
  background: rgba(43, 111, 212, 0.05);
  border: 1px solid rgba(43, 111, 212, 0.1);
}

.dark .management-insight-leader {
  background: rgba(240, 215, 140, 0.06);
  border-color: rgba(240, 215, 140, 0.12);
}

.management-insight-leader__label {
  margin: 0;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}

.dark .management-insight-leader__label {
  color: rgba(240, 215, 140, 0.55);
}

.management-insight-leader__name {
  margin: 0;
  width: 100%;
  font-size: 0.75rem;
  font-weight: 700;
  color: #0E2A5C;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dark .management-insight-leader__name {
  color: #ffffff;
}

.management-insight-leader__metric {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #2B6FD4;
  font-variant-numeric: tabular-nums;
}

.dark .management-insight-leader__metric {
  color: #F0D78C;
}

.management-insight-stat {
  padding: 0.625rem 0.75rem;
  border-radius: 0;
  border: 1px solid rgba(14, 42, 92, 0.06);
  background: rgba(255, 255, 255, 0.45);
}

.dark .management-insight-stat {
  background: rgba(14, 42, 92, 0.28);
  border-color: rgba(240, 215, 140, 0.1);
}

.management-insight-stat--teal { border-left: 3px solid #2B6FD4; }
.management-insight-stat--amber { border-left: 3px solid #E0B12A; }
.management-insight-stat--rust { border-left: 3px solid #ae2012; }
.management-insight-stat--navy { border-left: 3px solid #1A4F9C; }

.management-insight-stat__label {
  margin: 0;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

.dark .management-insight-stat__label {
  color: rgba(240, 215, 140, 0.6);
}

.management-insight-stat__value {
  margin: 0.2rem 0 0;
  font-size: 0.9375rem;
  font-weight: 800;
  color: #0E2A5C;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.dark .management-insight-stat__value {
  color: #F7E9C2;
}

.management-insight-stat__detail {
  margin: 0.2rem 0 0;
  font-size: 0.6875rem;
  font-weight: 500;
  color: #64748b;
  line-height: 1.35;
}

.dark .management-insight-stat__detail {
  color: rgba(240, 215, 140, 0.75);
}

.management-summary__alert {
  padding: 0.75rem;
  border-radius: 0;
  background: linear-gradient(135deg, rgba(174, 32, 18, 0.08), rgba(238, 155, 0, 0.06));
  border: 1px solid rgba(174, 32, 18, 0.15);
}

.dark .management-summary__alert {
  background: linear-gradient(135deg, rgba(174, 32, 18, 0.18), rgba(238, 155, 0, 0.08));
  border-color: rgba(238, 155, 0, 0.2);
}

.management-summary__alert-label {
  margin: 0;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ae2012;
}

.dark .management-summary__alert-label {
  color: #E0B12A;
}

.management-summary__alert-value {
  margin: 0.25rem 0 0;
  font-size: 1.125rem;
  font-weight: 800;
  color: #0E2A5C;
  font-variant-numeric: tabular-nums;
}

.dark .management-summary__alert-value {
  color: #F7E9C2;
}

.management-summary__alert-detail {
  margin: 0.2rem 0 0;
  font-size: 0.6875rem;
  color: #64748b;
}

.dark .management-summary__alert-detail {
  color: rgba(240, 215, 140, 0.7);
}

/* =============================================
   KPI METRIC VALUE — liquid number treatment
   ============================================= */
.kpi-value-text {
  background: linear-gradient(135deg, #0E2A5C 0%, #1A4F9C 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.dark .kpi-value-text {
  background: linear-gradient(135deg, #F7E9C2 0%, #F0D78C 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Section divider line */
.section-rule {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(43,111,212,0.25), transparent);
  margin: 0;
}
.dark .section-rule {
  background: linear-gradient(90deg, transparent, rgba(148,210,189,0.18), transparent);
}

/* =============================================
   APEXCHARTS — Theme-reactive overrides
   ============================================= */

/* Light mode */
.apexcharts-canvas .apexcharts-text.apexcharts-datalabel-value {
  fill: #0E2A5C !important;
}
.apexcharts-canvas .apexcharts-text.apexcharts-gauge-tick-label {
  fill: #475569 !important;
}
.apexcharts-canvas .apexcharts-text.apexcharts-xaxis-label,
.apexcharts-canvas .apexcharts-text.apexcharts-yaxis-label {
  fill: #475569 !important;
}
.apexcharts-canvas .apexcharts-legend-text {
  color: #334155 !important;
  font-size: 11px !important;
}
.apexcharts-canvas .apexcharts-tooltip {
  background: rgba(255,255,255,0.88) !important;
  backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(43,111,212,0.18) !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 24px rgba(14,42,92,0.14) !important;
  color: #0E2A5C !important;
}
.apexcharts-canvas .apexcharts-tooltip-title {
  background: transparent !important;
  border-bottom: 1px solid rgba(43,111,212,0.1) !important;
  font-weight: 600 !important;
  color: #1A4F9C !important;
  font-size: 11px !important;
}
.apexcharts-canvas .apexcharts-tooltip-text-y-value {
  font-weight: 700 !important;
}

/* Dark mode */
.dark .apexcharts-canvas .apexcharts-text.apexcharts-datalabel-value {
  fill: #f8fafc !important;
}
.dark .apexcharts-canvas .apexcharts-text.apexcharts-gauge-tick-label {
  fill: #94a3b8 !important;
}
.dark .apexcharts-canvas .apexcharts-text.apexcharts-xaxis-label,
.dark .apexcharts-canvas .apexcharts-text.apexcharts-yaxis-label {
  fill: #F0D78C !important;
}
.dark .apexcharts-canvas .apexcharts-legend-text {
  color: #F0D78C !important;
  font-size: 11px !important;
}
.dark .apexcharts-canvas .apexcharts-tooltip {
  background: rgba(14, 42, 92, 0.88) !important;
  backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(240, 215, 140, 0.22) !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4) !important;
  color: #F7E9C2 !important;
}
.dark .apexcharts-canvas .apexcharts-tooltip-title {
  background: transparent !important;
  border-bottom: 1px solid rgba(148,210,189,0.12) !important;
  font-weight: 600 !important;
  color: #F0D78C !important;
  font-size: 11px !important;
}

/* Grid lines — subtle */
.apexcharts-gridline {
  stroke: rgba(14,42,92,0.06) !important;
}
.dark .apexcharts-gridline {
  stroke: rgba(148,210,189,0.08) !important;
}

/* =============================================
   CHART CONTAINER HEIGHTS
   ============================================= */

/* =============================================
   CHART CONTAINER — overflow containment
   ============================================= */

/*
  .dashboard-chart is overflow:hidden to contain the ApexCharts legend HTML div
  (which is position:absolute inside .apexcharts-canvas).
  x-axis labels are SVG text elements within grid.padding.bottom space inside
  the SVG viewport — they do not need overflow:visible on the wrapper.
*/
.dashboard-chart {
  position: relative;
  overflow: visible;
  height: var(--chart-h-md);
  min-height: var(--chart-h-md);
  width: 100%;
  flex: 1 1 auto;
}

.dashboard-chart--hero {
  height: var(--chart-h-lg);
  min-height: var(--chart-h-lg);
  overflow: visible !important;
}

.dashboard-chart--paired,
.dashboard-chart--wide,
.dashboard-chart--full {
  height: var(--chart-h-md);
  min-height: var(--chart-h-md);
  overflow: visible !important;
}

.dashboard-chart--needle {
  height: var(--chart-h-gauge);
  min-height: var(--chart-h-gauge);
  overflow: visible !important;
}

.dashboard-chart--pie,
.dashboard-chart--with-legend {
  height: var(--chart-h-sm);
  min-height: var(--chart-h-sm);
  overflow: visible !important;
}

.dashboard-chart--own-damage {
  height: auto;
  min-height: 0;
}

.chart-card:has(.dashboard-chart--own-damage) {
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(43, 111, 212, 0.06), transparent 55%),
    var(--glass-card-bg, transparent);
}

.dark .chart-card:has(.dashboard-chart--own-damage) {
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(240, 215, 140, 0.08), transparent 55%),
    var(--glass-card-bg, transparent);
}

.od-clusters {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  height: 100%;
  min-height: 0;
  padding: 0.15rem 0.15rem 0;
}

.od-clusters__empty {
  margin: 0;
  padding: 0.75rem;
  text-align: center;
  font-size: 0.75rem;
  color: #94a3b8;
}

.od-clusters__row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  flex: 1;
}

.od-cluster {
  flex: none;
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 0.25rem 0;
  position: relative;
  background: transparent;
}

.od-cluster__label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.25rem;
  text-align: left;
  min-width: 8rem;
  flex: none;
}

.od-cluster__name {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--od-color);
  letter-spacing: 0.02em;
}

.od-cluster__count {
  font-size: 0.85rem;
  font-weight: 900;
  color: #0E2A5C;
  font-variant-numeric: tabular-nums;
}

.dark .od-cluster__count {
  color: #F7E9C2;
}

.od-cluster__dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-content: center;
  gap: 0.25rem;
  flex: 1;
  min-height: 2.75rem;
  max-height: 4rem;
  overflow: visible;
  padding: 0.4rem 0.6rem;
  background: transparent;
  transition: transform 0.3s ease;
}

.dark .od-cluster__dots {
  background: transparent;
}

.od-cluster:hover .od-cluster__dots {
  transform: scale(1.02);
}

.dark .od-cluster:hover .od-cluster__dots {
  transform: scale(1.02);
}

.od-dot {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 999px;
  background: var(--od-color);
  box-shadow: 0 1px 2px rgba(14, 42, 92, 0.16);
}

.dark .od-dot {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.od-cluster__share {
  margin: 0;
  font-size: 0.625rem;
  font-weight: 700;
  color: #64748b;
}

.dark .od-cluster__share {
  color: #94a3b8;
}

.od-clusters__scale {
  margin: 0;
  text-align: center;
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}

.od-clusters__legend {
  display: none;
}

/* Compact Recovery vs Paid + Own Damage pair row */
.dashboard-chart-grid--pair {
  align-items: stretch;
}

.dashboard-chart-grid--pair > * {
  min-height: 0;
}

.dashboard-chart-grid--pair .chart-card-header {
  margin-bottom: 0.15rem;
}

.dashboard-chart-grid--pair .chart-card-header p {
  display: none;
}

.dashboard-chart-grid--pair > div.w-full {
  padding: 0.65rem 0.75rem !important;
}

.dashboard-chart-grid--pair > div.w-full .mt-3 {
  margin-top: 0.5rem !important;
  min-height: 3.25rem !important;
}

.dashboard-chart-grid--pair > div.w-full .text-2xl {
  font-size: 1.15rem !important;
  line-height: 1.1 !important;
}

.dashboard-chart-grid--pair > div.w-full .py-3 {
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
}

.dashboard-chart-grid--pair > div.w-full .mt-2\.5 {
  margin-top: 0.4rem !important;
}

.dashboard-chart-grid--pair > div.w-full .py-1\.5 {
  padding-top: 0.25rem !important;
  padding-bottom: 0.25rem !important;
}

/* Third Party / multi-slice pies — taller card, smaller plot vs legend */
.dashboard-chart--pie-legend {
  height: 300px;
  min-height: 300px;
}

/* Semi-donut + status donuts — tighter plot-to-legend spacing */
.dashboard-chart--tight-legend {
  height: 240px;
  min-height: 240px;
}

.dashboard-chart--tight-legend .apexcharts-legend {
  margin-top: -28px !important;
  padding-top: 0 !important;
}

.dashboard-chart--tight-legend .apexcharts-inner {
  transform: translateY(-10px);
}

.dashboard-chart--usage-legend .apexcharts-legend {
  margin-top: -6px !important;
  padding-top: 0 !important;
  gap: 0 !important;
}

.dashboard-chart--usage-legend .apexcharts-legend-series {
  margin: 0 4px !important;
}

.chart-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: var(--dashboard-card-padding);
  min-height: 0;
}

.chart-card__body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin-top: 4px;
}

.chart-card--sm  { min-height: calc(var(--chart-h-sm) + 56px); }
.chart-card--md  { min-height: calc(var(--chart-h-md) + 56px); }
.chart-card--lg  { min-height: calc(var(--chart-h-lg) + 56px); }
.chart-card--wide { grid-column: 1 / -1; min-height: calc(var(--chart-h-md) + 56px); }
.chart-card--gauge { min-height: calc(var(--chart-h-gauge) + 56px); }

/* Standard 12-column chart grids */
.dashboard-chart-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--dashboard-gap);
  align-items: stretch;
}

@media (min-width: 768px) {
  .dashboard-chart-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .dashboard-chart-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-chart-grid--dense {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.dashboard-chart-grid--pair {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--dashboard-gap);
}

@media (min-width: 768px) {
  .dashboard-chart-grid--pair {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.dashboard-chart-grid--triple {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--dashboard-gap);
}

@media (min-width: 768px) {
  .dashboard-chart-grid--triple {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .dashboard-chart-grid--triple {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.dashboard-chart-grid--quad {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--dashboard-gap);
  align-items: stretch;
}

@media (min-width: 1024px) {
  .dashboard-chart-grid--quad {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Operations section — 3 columns per row; reporting lag + claim types stacked in col 3 */
.dashboard-operations-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.375rem;
  align-items: stretch;
}

@media (min-width: 768px) {
  .dashboard-operations-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .dashboard-operations-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
  }
}

.dashboard-operations-stack {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-height: 0;
  min-width: 0;
  justify-content: flex-start;
  align-self: start;
}

.dashboard-operations-stack > * {
  flex: 0 0 auto;
  min-height: 0;
}

.dashboard-operations-section {
  --ops-chart-h: 168px;
  --ops-stack-chart-h: 84px;
}

.dashboard-operations-section .chart-card--ops-stack {
  min-height: 0;
  padding: 0.4375rem 0.5rem 0.375rem;
}

.dashboard-operations-section .chart-card--ops-stack .chart-card-header {
  padding-bottom: 0.125rem;
}

.dashboard-operations-section .chart-card--ops-stack .chart-card__body {
  margin-top: 0;
}

.dashboard-operations-section .dashboard-chart--ops-stack {
  height: var(--ops-stack-chart-h);
  min-height: var(--ops-stack-chart-h);
}

.dashboard-operations-section .dashboard-operations-stack .split-metric-card--compact {
  padding: 0.4375rem 0.5rem !important;
  min-height: 0;
}

.dashboard-operations-section .dashboard-operations-stack .split-metric-card--compact > div:first-child {
  padding-bottom: 0.125rem !important;
}

.dashboard-operations-section .dashboard-operations-stack .split-metric-card--compact > div:nth-child(2) {
  margin-top: 0.25rem !important;
  min-height: 2.25rem !important;
}

.dashboard-operations-section .dashboard-operations-stack .split-metric-card--compact > div:nth-child(2) .py-2 {
  padding-top: 0.3125rem !important;
  padding-bottom: 0.3125rem !important;
}

.dashboard-operations-section .dashboard-operations-stack .split-metric-card--compact > div:last-child {
  margin-top: 0.25rem !important;
  padding-top: 0.25rem !important;
  padding-bottom: 0.25rem !important;
}

.dashboard-operations-section .dashboard-operations-stack .split-metric-card--compact .text-xl {
  font-size: 0.875rem;
  line-height: 1;
}

.dashboard-operations-section .chart-card {
  padding: 0.5rem 0.625rem;
  min-height: calc(var(--ops-chart-h) + 1.75rem);
}

.dashboard-operations-section .chart-card--md,
.dashboard-operations-section .chart-card--sm {
  min-height: calc(var(--ops-chart-h) + 1.75rem);
}

.dashboard-operations-section .chart-card-header {
  padding-bottom: 0.125rem;
  border-bottom: none;
}

.dashboard-operations-section .chart-card-header__title {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.15;
}

.dashboard-operations-section .chart-card-header__subtitle {
  font-size: 0.5rem;
  margin-top: 0;
  line-height: 1.15;
}

.dashboard-operations-section .chart-card__body {
  margin-top: 0;
}

.dashboard-operations-section .dashboard-chart--paired,
.dashboard-operations-section .dashboard-chart--with-legend {
  height: var(--ops-chart-h);
  min-height: var(--ops-chart-h);
}

.dashboard-operations-section .apexcharts-legend {
  padding: 0 !important;
  margin-top: -4px !important;
}

.dashboard-operations-section .apexcharts-legend-text {
  font-size: 9px !important;
}

.dashboard-operations-section .split-metric-card--compact {
  padding: 0.4375rem 0.5rem !important;
  min-height: calc(var(--ops-chart-h) + 1.75rem);
}

.dashboard-operations-section .split-metric-card--compact > div:first-child {
  padding-bottom: 0.125rem !important;
}

.dashboard-operations-section .split-metric-card--compact > div:nth-child(2) {
  margin-top: 0.375rem !important;
  min-height: 2.5rem !important;
}

.dashboard-operations-section .split-metric-card--compact > div:nth-child(2) .py-2 {
  padding-top: 0.3125rem !important;
  padding-bottom: 0.3125rem !important;
}

.dashboard-operations-section .split-metric-card--compact > div:last-child {
  margin-top: 0.375rem !important;
  padding-top: 0.25rem !important;
  padding-bottom: 0.25rem !important;
}

.dashboard-operations-section .split-metric-card--compact .text-xl {
  font-size: 0.875rem;
  line-height: 1;
}

/* Workload & Agents — compact ranked bar charts */
.dashboard-workload-section {
  --workload-chart-h: auto;
}

.dashboard-workload-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.375rem;
  align-items: stretch;
}

@media (min-width: 768px) {
  .dashboard-workload-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }
}

.dashboard-workload-section .chart-card {
  padding: 0.5rem 0.625rem;
  min-height: 0;
}

.dashboard-workload-section .chart-card--sm,
.dashboard-workload-section .chart-card--md {
  min-height: 0;
}

.dashboard-workload-section .chart-card-header {
  padding-bottom: 0.125rem;
  border-bottom: none;
}

.dashboard-workload-section .chart-card-header__title {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.dashboard-workload-section .chart-card-header__subtitle {
  font-size: 0.5625rem;
  margin-top: 0.0625rem;
  line-height: 1.2;
  color: #64748B;
}

.dark .dashboard-workload-section .chart-card-header__subtitle {
  color: #94A3B8;
}

.dashboard-workload-section .chart-card__body {
  margin-top: 0;
}

.dashboard-workload-section .dashboard-chart--ranked-bar {
  height: auto;
  min-height: 120px;
  max-height: 280px;
  overflow: visible;
}

.dashboard-workload-section .dashboard-chart--ranked-bar .apexcharts-canvas,
.dashboard-workload-section .dashboard-chart--ranked-bar .apexcharts-svg {
  max-height: none;
}

.dashboard-workload-section .dashboard-chart--ranked-bar .apexcharts-yaxis-label {
  font-weight: 700 !important;
}

/* Recent claims + management summary — 2/3 · 1/3 row */
.dashboard-bottom-row__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  align-items: stretch;
}

@media (min-width: 1024px) {
  .dashboard-bottom-row__grid {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
    gap: 0.625rem;
  }

  .dashboard-bottom-row__grid > :only-child {
    grid-column: 1 / -1;
  }
}

.dashboard-bottom-row__claims {
  min-height: 0;
}

.dashboard-bottom-row__summary {
  min-height: 0;
  max-width: 280px;
  width: 100%;
  justify-self: end;
}

.dashboard-bottom-row__summary .management-summary--sidebar {
  height: 100%;
  overflow: auto;
}

.dashboard-bottom-row .enterprise-table th,
.dashboard-bottom-row .enterprise-table td {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.dashboard-chart-grid--hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--dashboard-gap);
  align-items: stretch;
}

@media (min-width: 1024px) {
  .dashboard-chart-grid--hero {
    grid-template-columns: 2fr 1fr;
  }

  .dashboard-chart-grid--hero.is-single {
    grid-template-columns: 1fr;
  }
}

.chart-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 8px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--enterprise-border, #E2E8F0);
  flex-shrink: 0;
}

.chart-card-header__title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: #172033;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.dark .chart-card-header__title {
  color: #F1F5F9;
}

.chart-card-header__subtitle {
  margin: 2px 0 0;
  font-size: 0.75rem;
  color: #64748B;
  line-height: 1.3;
}

.dark .chart-card-header__subtitle {
  color: #94A3B8;
}

/* canvas may clip legends if height is too small — allow legend charts to show overflow */
.dashboard-chart .apexcharts-canvas {
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
}

.dashboard-chart--pie .apexcharts-canvas,
.dashboard-chart--with-legend .apexcharts-canvas {
  overflow: visible !important;
}

/* SVG overflow:visible allows x-axis text labels to render in grid.padding.bottom zone */
.dashboard-chart .apexcharts-svg {
  max-width: 100% !important;
  overflow: visible !important;
}

/* Constrain inner chart wrapper — allow slight overflow for top labels */
.dashboard-chart .apexcharts-inner {
  overflow: visible !important;
}

.dashboard-chart .apexcharts-legend {
  max-width: 100%;
  padding: 0 6px 2px !important;
  margin-top: -12px !important;
  box-sizing: border-box !important;
}

.dashboard-chart .apexcharts-legend-series {
  margin: 1px 4px !important;
  display: inline-flex !important;
  align-items: center !important;
}

.dashboard-chart .apexcharts-legend-text {
  font-size: 11px !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
  white-space: nowrap !important;
  /* no overflow:hidden, no max-width — let ApexCharts manage layout */
}

.dashboard-chart .apexcharts-datalabel-label {
  font-size: 11px !important;
  font-weight: 600 !important;
}

.dashboard-chart .apexcharts-datalabel-value {
  font-size: 28px !important;
  font-weight: 800 !important;
}

.dashboard-chart .apexcharts-pie-series .apexcharts-datalabel {
  font-size: 12px !important;
  font-weight: 700 !important;
}

.dashboard-chart .apexcharts-xaxis-label tspan,
.dashboard-chart .apexcharts-yaxis-label tspan {
  font-size: 9px !important;
}

/* =============================================
   DASHBOARD PAGE — compact density overrides
   ============================================= */
.dashboard-page .glass-card {
  border-radius: 12px;
}

.dashboard-page .glass-panel {
  border-radius: 12px;
}

/* chart-card-header typography defined with chart-card styles above */

/* =============================================
   CHART CARD HEADER — title + icon row
   ============================================= */
/* header styles defined with chart heights above */

/* =============================================
   TABLE — glass table rows
   ============================================= */
.glass-table tbody tr {
  transition: background 0.15s ease;
}
.glass-table tbody tr:hover {
  background: rgba(43, 111, 212, 0.05);
}
.dark .glass-table tbody tr:hover {
  background: rgba(240, 215, 140, 0.06);
}

/* =============================================
   STATUS BADGE — rounded pill
   ============================================= */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* =============================================
   MICRO-ANIMATION — entrance fade-up for cards
   ============================================= */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-card {
  animation: fadeSlideUp 0.45s cubic-bezier(0.16,1,0.3,1) both;
}

/* Tom Select Custom Overrides */
.ts-control {
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
  min-height: auto !important;
  box-shadow: none !important;
}

.ts-control > input {
  color: inherit !important;
  font-family: inherit !important;
  font-size: 14px !important;
}

.dark .ts-control > input {
  color: #f1f5f9 !important;
}

.dark .ts-control {
  color: #f1f5f9 !important;
}

.ts-dropdown {
  border-radius: 0.5rem;
  border: 1px solid rgba(0,0,0,0.1);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  font-family: Inter, sans-serif;
  font-size: 13px;
}

.dark .ts-dropdown {
  background-color: #0f172a !important; /* Tailwind slate-900 */
  border-color: rgba(255,255,255,0.1) !important;
  color: #f1f5f9;
}

.ts-dropdown .active {
  background-color: #f1f5f9 !important;
  color: #0f172a !important;
}

.dark .ts-dropdown .active {
  background-color: #1e293b !important;
  color: #ffffff !important;
}

.ts-wrapper.single .ts-control:after {
  border-color: #94a3b8 transparent transparent transparent !important;
}

/* =============================================
   APP SHELL — PWA + mobile layout
   ============================================= */
:root {
  --app-nav-height: 3.5rem;
  --app-tab-bar-height: 4rem;
}

@media (min-width: 768px) {
  :root {
    --app-nav-height: 4rem;
    --app-tab-bar-height: 0px;
  }
}

.app-shell {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.app-top-nav {
  padding-top: env(safe-area-inset-top);
}

.app-main {
  padding-left: max(0.25rem, env(safe-area-inset-left));
  padding-right: max(0.25rem, env(safe-area-inset-right));
  max-width: none;
  width: 100%;
}

.dashboard-page {
  width: 100%;
  max-width: none;
}

.pwa-install-banner {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid rgba(43, 111, 212, 0.18);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.dark .pwa-install-banner {
  background: rgba(14, 42, 92, 0.92);
  border-bottom-color: rgba(240, 215, 140, 0.16);
}

.mobile-tab-bar,
.app-tab-bar {
  display: none;
}

@media (max-width: 767px) {
  .mobile-tab-bar,
  .app-tab-bar {
    display: grid;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.25rem;
    padding: 0.4rem 0.65rem calc(0.4rem + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(14, 42, 92, 0.08);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    box-shadow: 0 -8px 28px rgba(14, 42, 92, 0.06);
  }

  .dark .mobile-tab-bar,
  .dark .app-tab-bar {
    background: rgba(14, 42, 92, 0.94);
    border-top-color: rgba(240, 215, 140, 0.12);
    box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.28);
  }

  .app-main {
    padding-bottom: calc(var(--app-tab-bar-height) + 0.75rem + env(safe-area-inset-bottom));
  }

  .app-top-nav .max-w-full {
    padding-left: max(0.75rem, env(safe-area-inset-left));
    padding-right: max(0.75rem, env(safe-area-inset-right));
  }
}

.mobile-tab-bar__link,
.app-tab-bar__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-height: 3.15rem;
  border-radius: 0.75rem;
  text-decoration: none;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  transition: background 0.15s ease, color 0.15s ease;
}

.dark .mobile-tab-bar__link,
.dark .app-tab-bar__link {
  color: #94a3b8;
}

.mobile-tab-bar__link--active,
.app-tab-bar__link--active {
  color: #2B6FD4;
  background: rgba(43, 111, 212, 0.1);
}

.dark .mobile-tab-bar__link--active,
.dark .app-tab-bar__link--active {
  color: #F0D78C;
  background: rgba(240, 215, 140, 0.12);
}

.dashboard-date-filter {
  padding: 0.5rem 0.75rem;
}

/* Combined dashboard header bar */
.dashboard-header-bar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  padding: 0.75rem;
  align-items: stretch;
}

.dashboard-header__brand {
  min-width: 0;
  display: flex;
  align-items: center;
}

.dashboard-header__brand-copy {
  min-width: 0;
  padding-left: 0.75rem;
  border-left: 3px solid #2B6FD4;
}

.dashboard-header__eyebrow {
  display: none;
  margin: 0 0 0.2rem;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #2B6FD4;
  line-height: 1.2;
}

.dark .dashboard-header__eyebrow {
  color: #60a5fa;
}

.dashboard-header__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dark .dashboard-header__title {
  color: #ffffff;
}

.dashboard-header__title--signage {
  font-size: 1.875rem;
}

.dashboard-header__subtitle {
  display: none;
  margin: 0.2rem 0 0;
  font-size: 0.6875rem;
  line-height: 1.35;
  color: #64748b;
}

.dark .dashboard-header__subtitle {
  color: #94a3b8;
}

.dashboard-header__snapshot {
  margin: 0.2rem 0 0;
  font-size: 0.625rem;
  line-height: 1.3;
  color: #94a3b8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dark .dashboard-header__snapshot {
  color: #64748b;
}

.dashboard-header__filter {
  min-width: 0;
}

.dashboard-header__filter.is-hidden {
  display: none;
}

.dashboard-header__actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: stretch;
  min-width: 0;
}

.dashboard-header__clock,
.dashboard-signage-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid #E2E8F0;
  background: #ffffff;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(23, 32, 51, 0.04);
}

.dark .dashboard-header__clock,
.dark .dashboard-signage-toggle {
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(26, 35, 50, 0.85);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.dashboard-header__clock {
  min-width: 0;
}

.dashboard-header__clock-icon {
  display: none;
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background: #2B6FD4;
  color: #ffffff;
}

.dashboard-header__clock-icon svg {
  width: 0.875rem;
  height: 0.875rem;
}

.dashboard-header__clock-copy {
  min-width: 0;
}

.dashboard-header__clock-label {
  display: block;
  margin-bottom: 0.15rem;
  font-size: 0.5625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  line-height: 1;
}

.dark .dashboard-header__clock-label {
  color: #94a3b8;
}

.dashboard-header__clock-value {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dark .dashboard-header__clock-value {
  color: #ffffff;
}

.dashboard-signage-toggle {
  justify-content: space-between;
  flex-shrink: 0;
  gap: 0.625rem;
}

.dashboard-signage-toggle__label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
}

.dark .dashboard-signage-toggle__label {
  color: #cbd5e1;
}

.dashboard-signage-toggle__switch {
  position: relative;
  display: inline-flex;
  width: 2.25rem;
  height: 1.25rem;
  align-items: center;
  border-radius: 9999px;
  background: #e2e8f0;
  transition: background-color 0.2s ease;
}

.dark .dashboard-signage-toggle__switch {
  background: #334155;
}

.dashboard-signage-toggle__knob {
  display: block;
  width: 1rem;
  height: 1rem;
  border-radius: 9999px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.2);
  transform: translateX(0.125rem);
  transition: transform 0.2s ease;
}

.dashboard-signage-toggle.is-on .dashboard-signage-toggle__switch {
  background: #2B6FD4;
}

.dashboard-signage-toggle.is-on .dashboard-signage-toggle__knob {
  transform: translateX(1rem);
}

.dashboard-signage-toggle__state {
  font-size: 0.75rem;
  font-weight: 700;
  color: #94a3b8;
}

.dashboard-signage-toggle.is-on .dashboard-signage-toggle__state {
  color: #2B6FD4;
}

.dark .dashboard-signage-toggle.is-on .dashboard-signage-toggle__state {
  color: #60a5fa;
}

.dashboard-date-filter--toolbar {
  padding: 0.5rem;
  border-radius: 0.75rem;
  border: 1px solid #E2E8F0;
  background: rgba(248, 250, 252, 0.9);
}

.dark .dashboard-date-filter--toolbar {
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.35);
}

.dashboard-date-filter__form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  align-items: center;
}

.dashboard-toolbar .dashboard-date-filter__form {
  width: 100%;
}

.dashboard-date-filter__label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
}

.dashboard-date-filter__label-icon {
  width: 0.875rem;
  height: 0.875rem;
  flex-shrink: 0;
  color: #2B6FD4;
}

.dark .dashboard-date-filter__label {
  color: #94a3b8;
}

.dark .dashboard-date-filter__label-icon {
  color: #60a5fa;
}

.dashboard-date-filter__field {
  min-width: 0;
}

.dashboard-date-filter__input {
  width: 100%;
  min-height: 40px;
  border-radius: 0.625rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.95);
  padding: 0.45rem 0.75rem;
  font-size: 0.8125rem;
  color: #0f172a;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dashboard-date-filter__input:focus {
  outline: none;
  border-color: rgba(43, 111, 212, 0.55);
  box-shadow: 0 0 0 3px rgba(43, 111, 212, 0.12);
}

.dark .dashboard-date-filter__input {
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(14, 42, 92, 0.55);
  color: #e2e8f0;
}

.dashboard-date-filter__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dashboard-date-filter__apply {
  min-height: 40px;
  border-radius: 0.625rem;
  border: 0;
  background: #2B6FD4;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.45rem 0.95rem;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.dashboard-date-filter__apply:hover {
  background: #1f5bb8;
}

.dashboard-date-filter__clear {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 0.55rem;
  border-radius: 0.625rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.dashboard-date-filter__clear:hover {
  color: #0f172a;
  background: rgba(148, 163, 184, 0.12);
}

.dark .dashboard-date-filter__clear {
  color: #94a3b8;
}

.dark .dashboard-date-filter__clear:hover {
  color: #e2e8f0;
  background: rgba(148, 163, 184, 0.12);
}

.dashboard-date-filter__field--range {
  grid-column: span 1;
}

.dashboard-date-filter__input--range,
.flatpickr-input.dashboard-date-filter__input {
  cursor: pointer;
}

@media (min-width: 640px) {
  .dashboard-header__clock-icon {
    display: inline-flex;
  }

  .dashboard-header__clock-label {
    display: none;
  }

  .dashboard-header__clock-value {
    font-size: 0.8125rem;
  }

  .dashboard-header__actions {
    display: flex;
    width: auto;
  }

  .dashboard-header__clock {
    flex: 0 1 auto;
  }
}

@media (min-width: 768px) {
  .dashboard-header-bar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand actions"
      "filter filter";
    gap: 0.75rem 1rem;
    padding: 0.875rem 1rem;
  }

  .dashboard-header__brand {
    grid-area: brand;
  }

  .dashboard-header__filter {
    grid-area: filter;
  }

  .dashboard-header__actions {
    grid-area: actions;
    justify-self: end;
  }

  .dashboard-header__eyebrow {
    display: block;
  }

  .dashboard-header__title {
    font-size: 1.5rem;
  }

  .dashboard-date-filter__form {
    grid-template-columns: auto minmax(220px, 1fr) auto;
    gap: 0.625rem;
  }

  .dashboard-date-filter__label {
    white-space: nowrap;
  }

  .dashboard-date-filter__actions {
    width: auto;
  }
}

@media (min-width: 1280px) {
  .dashboard-header-bar {
    grid-template-columns: minmax(18rem, 1fr) auto auto;
    grid-template-areas: "brand actions filter";
    align-items: center;
    gap: 1rem 1.25rem;
    padding: 0.75rem 1rem;
  }

  .dashboard-header__brand-copy {
    padding-left: 0.875rem;
  }

  .dashboard-header__title {
    font-size: 1.625rem;
  }

  .dashboard-header__title--signage {
    font-size: 2.25rem;
  }

  .dashboard-header__subtitle {
    display: block;
  }

  .dashboard-header__actions {
    justify-self: end;
    margin-left: auto;
    padding-left: 1rem;
    border-left: 1px solid rgba(148, 163, 184, 0.22);
  }

  .dark .dashboard-header__actions {
    border-left-color: rgba(148, 163, 184, 0.14);
  }

  .dashboard-header__filter {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    justify-self: end;
    padding-left: 1rem;
    border-left: 1px solid rgba(148, 163, 184, 0.22);
  }

  .dark .dashboard-header__filter {
    border-left-color: rgba(148, 163, 184, 0.14);
  }

  .dashboard-header__filter.is-hidden {
    display: none;
  }

  .dashboard-date-filter--toolbar {
    width: 100%;
    max-width: 36rem;
    margin: 0;
    padding: 0.4rem 0.5rem 0.4rem 0.75rem;
  }

  .dashboard-toolbar .dashboard-date-filter__form {
    grid-template-columns: auto minmax(12rem, 1fr) auto;
    justify-content: stretch;
    margin: 0;
  }

  .dashboard-date-filter__label {
    padding-right: 0.15rem;
  }

  .dashboard-date-filter__input {
    min-height: 38px;
  }

  .dashboard-date-filter__apply,
  .dashboard-date-filter__clear {
    min-height: 38px;
  }

  .dashboard-header__clock,
  .dashboard-signage-toggle {
    min-height: 42px;
  }

  .signage-dashboard .dashboard-header-bar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "brand actions";
  }

  .signage-dashboard .dashboard-header__filter {
    display: none;
  }

  .signage-dashboard .dashboard-header__actions {
    justify-self: end;
    margin-left: auto;
  }
}

/* Flatpickr — match dashboard glass / dark theme */
.flatpickr-calendar {
  border-radius: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
  font-family: Inter, "Noto Sans Myanmar", sans-serif;
  background: #ffffff;
}

.flatpickr-months,
.flatpickr-weekdays {
  background: #ffffff;
}

.flatpickr-months .flatpickr-month,
.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year {
  color: #0f172a;
  font-weight: 700;
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
  fill: #2B6FD4;
}

span.flatpickr-weekday {
  color: #64748b;
  font-weight: 600;
}

.flatpickr-day {
  color: #334155;
}

.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
  color: rgba(100, 116, 139, 0.45);
}

.flatpickr-day.today {
  border-color: #2B6FD4;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected.inRange,
.flatpickr-day.startRange.inRange,
.flatpickr-day.endRange.inRange {
  background: #2B6FD4;
  border-color: #2B6FD4;
  color: #ffffff;
}

.flatpickr-day.inRange {
  background: rgba(43, 111, 212, 0.12);
  border-color: transparent;
  box-shadow: none;
}

.flatpickr-day:hover,
.flatpickr-day:focus {
  background: rgba(43, 111, 212, 0.18);
  border-color: transparent;
}

.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
  color: rgba(100, 116, 139, 0.35);
  background: transparent;
}

.flatpickr-time {
  border-top: 1px solid rgba(148, 163, 184, 0.25);
}

.flatpickr-time input,
.flatpickr-time .flatpickr-time-separator,
.flatpickr-time .flatpickr-am-pm {
  color: #0f172a;
}

.flatpickr-time input:hover,
.flatpickr-time input:focus {
  background: rgba(43, 111, 212, 0.08);
}

.numInputWrapper span.arrowUp:after {
  border-bottom-color: #2B6FD4;
}

.numInputWrapper span.arrowDown:after {
  border-top-color: #2B6FD4;
}

/* Dark mode */
.dark .flatpickr-calendar {
  background: #0E2A5C;
  border-color: rgba(240, 215, 140, 0.2);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
  color: #e2e8f0;
}

.dark .flatpickr-calendar.arrowTop:before,
.dark .flatpickr-calendar.arrowTop:after {
  border-bottom-color: #0E2A5C;
}

.dark .flatpickr-calendar.arrowBottom:before,
.dark .flatpickr-calendar.arrowBottom:after {
  border-top-color: #0E2A5C;
}

.dark .flatpickr-months,
.dark .flatpickr-weekdays,
.dark .flatpickr-days {
  background: #0E2A5C;
}

.dark .flatpickr-months .flatpickr-month,
.dark .flatpickr-current-month .flatpickr-monthDropdown-months,
.dark .flatpickr-current-month input.cur-year {
  color: #e2e8f0;
  background: transparent;
}

.dark .flatpickr-current-month .flatpickr-monthDropdown-months option {
  background: #0E2A5C;
  color: #e2e8f0;
}

.dark .flatpickr-months .flatpickr-prev-month,
.dark .flatpickr-months .flatpickr-next-month,
.dark .flatpickr-months .flatpickr-prev-month svg,
.dark .flatpickr-months .flatpickr-next-month svg {
  fill: #F0D78C;
}

.dark span.flatpickr-weekday {
  color: #94a3b8;
  background: #0E2A5C;
}

.dark .flatpickr-day {
  color: #e2e8f0;
}

.dark .flatpickr-day.prevMonthDay,
.dark .flatpickr-day.nextMonthDay {
  color: rgba(148, 163, 184, 0.4);
}

.dark .flatpickr-day.today {
  border-color: #F0D78C;
}

.dark .flatpickr-day.selected,
.dark .flatpickr-day.startRange,
.dark .flatpickr-day.endRange,
.dark .flatpickr-day.selected.inRange,
.dark .flatpickr-day.startRange.inRange,
.dark .flatpickr-day.endRange.inRange {
  background: #F0D78C;
  border-color: #F0D78C;
  color: #0E2A5C;
}

.dark .flatpickr-day.inRange {
  background: rgba(240, 215, 140, 0.16);
  border-color: transparent;
  box-shadow: none;
  color: #e2e8f0;
}

.dark .flatpickr-day:hover,
.dark .flatpickr-day:focus {
  background: rgba(240, 215, 140, 0.22);
  border-color: transparent;
  color: #f8fafc;
}

.dark .flatpickr-day.flatpickr-disabled,
.dark .flatpickr-day.flatpickr-disabled:hover {
  color: rgba(148, 163, 184, 0.28);
  background: transparent;
}

.dark .flatpickr-time {
  border-top-color: rgba(240, 215, 140, 0.18);
}

.dark .flatpickr-time input,
.dark .flatpickr-time .flatpickr-time-separator,
.dark .flatpickr-time .flatpickr-am-pm {
  color: #e2e8f0;
}

.dark .flatpickr-time input:hover,
.dark .flatpickr-time input:focus {
  background: rgba(240, 215, 140, 0.1);
}

.dark .numInputWrapper span.arrowUp:after {
  border-bottom-color: #F0D78C;
}

.dark .numInputWrapper span.arrowDown:after {
  border-top-color: #F0D78C;
}

.dark input.flatpickr-input[readonly],
.dark input.flatpickr-input.form-control[readonly] {
  color: #e2e8f0;
}

input.flatpickr-input[readonly],
input.flatpickr-input.form-control[readonly] {
  cursor: pointer;
  background: inherit;
}

@media (max-width: 767px) {
  .dashboard-page {
    padding-left: 0;
    padding-right: 0;
  }

  .dashboard-page .glass-card:hover,
  .dashboard-page .glass-card-link:hover {
    transform: none;
  }

  .dashboard-chart:not(.dashboard-chart--needle):not(.dashboard-chart--map) {
    height: 240px;
    min-height: 240px;
  }

  .dashboard-chart--hero {
    height: 260px;
    min-height: 260px;
  }

  .dashboard-chart--paired,
  .dashboard-chart--wide,
  .dashboard-chart--full {
    height: 240px;
    min-height: 240px;
  }

  .dashboard-chart--needle {
    height: var(--chart-h-gauge);
    min-height: var(--chart-h-gauge);
  }

  .dashboard-chart--pie,
  .dashboard-chart--with-legend {
    height: 260px;
    min-height: 260px;
  }

  .dashboard-executive-row > .chart-card,
  .dashboard-executive-row > .health-score,
  .dashboard-executive-row > .alert-panel {
    min-height: auto;
  }

  .dashboard-chart--pie-legend {
    height: 280px;
    min-height: 280px;
  }

  .dashboard-chart--tight-legend {
    height: 220px;
    min-height: 220px;
  }

  .dashboard-chart .apexcharts-toolbar {
    display: none !important;
  }

  .dashboard-chart .apexcharts-xaxis-label tspan,
  .dashboard-chart .apexcharts-yaxis-label tspan {
    font-size: 8px !important;
  }

  .dashboard-chart-grid {
    gap: 0.45rem;
  }

  .settings-page .overflow-x-auto {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .settings-page table {
    font-size: 0.6875rem;
  }

  .settings-page .ts-wrapper .ts-control {
    min-height: 44px !important;
    padding: 0.5rem 0.75rem !important;
  }

  .settings-page .ts-wrapper.single .ts-control {
    align-items: center;
  }

  .settings-page input:not([type="checkbox"]):not([type="radio"]),
  .settings-page select,
  .settings-page textarea,
  .settings-page .ts-wrapper .ts-control {
    min-height: 44px;
  }

  .settings-page .settings-button-row {
    flex-direction: column;
    align-items: stretch;
  }
}

/* =============================================
   DASHBOARD — mobile / tablet / PWA polish
   ============================================= */

.dashboard-chart--map {
  /* Myanmar is taller than wide — give phones enough vertical room */
  height: min(72vh, 520px);
  min-height: 440px;
  overflow: hidden;
}

@media (min-width: 640px) {
  .dashboard-chart--map {
    height: min(68vh, 540px);
    min-height: 480px;
  }
}

@media (min-width: 1024px) {
  .dashboard-chart--map {
    height: 520px;
    min-height: 520px;
  }
}

/* Let gauge legends / map chrome sit fully inside the card */
.chart-card:has(.dashboard-chart--needle),
.chart-card:has(.dashboard-chart--map) {
  overflow: visible;
}

.dashboard-chart--needle .needle-gauge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 2px 6px 8px;
  overflow: visible;
}

.dashboard-chart--needle .needle-gauge__svg-wrap {
  flex: 1 1 auto;
  width: 100%;
  max-width: 320px;
  min-height: 0;
  display: flex;
  align-items: center;
}

.dashboard-chart--needle .needle-gauge__legend {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding-top: 4px;
  width: 100%;
}

.dashboard-sla-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .dashboard-sla-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Pipeline Duration vs SLA — 4 compact gauge cards (matches sla-strip grid) */
.dashboard-sla-gauge-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  align-items: stretch;
}

@media (min-width: 768px) {
  .dashboard-sla-gauge-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--dashboard-gap);
  }
}

.chart-card--sla-gauge {
  --sla-gauge-h: 188px;
  min-height: calc(var(--sla-gauge-h) + 3.25rem);
  padding: 0.625rem 0.75rem 0.5rem;
  justify-content: flex-start;
}

.chart-card--sla-gauge .chart-card__body {
  margin-top: 0;
  flex: 1 1 auto;
  min-height: 0;
}

.chart-card--sla-gauge .chart-card-header {
  padding-bottom: 0.25rem;
  margin-bottom: 0;
  border-bottom: none;
}

.chart-card--sla-gauge .chart-card-header__title {
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #94A3B8;
  line-height: 1.2;
}

.dark .chart-card--sla-gauge .chart-card-header__title {
  color: #64748B;
}

.chart-card--sla-gauge .chart-card-header__subtitle {
  margin: 0.125rem 0 0;
  font-size: 0.5625rem;
  font-weight: 500;
  color: #94A3B8;
  line-height: 1.2;
}

.chart-card--sla-gauge .dashboard-chart--needle {
  height: var(--sla-gauge-h);
  min-height: var(--sla-gauge-h);
}

.chart-card--sla-gauge .needle-gauge {
  padding: 0 2px 4px;
  justify-content: flex-end;
  gap: 0.25rem;
}

.chart-card--sla-gauge .needle-gauge > div:first-child {
  display: none;
}

.chart-card--sla-gauge .needle-gauge__svg-wrap {
  flex: 1 1 auto;
  max-width: none;
  align-items: flex-end;
}

.chart-card--sla-gauge .needle-gauge__svg-wrap svg {
  width: 100%;
  height: auto;
  max-height: calc(var(--sla-gauge-h) - 2.5rem);
}

.chart-card--sla-gauge .needle-gauge__legend {
  gap: 0.25rem;
  padding-top: 0.125rem;
}

.chart-card--sla-gauge .needle-gauge__legend > div {
  font-size: 0.5rem !important;
  padding: 0.125rem 0.375rem !important;
  border-radius: 4px !important;
}

.chart-card--sla-gauge:nth-child(1) { border-top: 3px solid #1565C0; }
.chart-card--sla-gauge:nth-child(2) { border-top: 3px solid #ED6C02; }
.chart-card--sla-gauge:nth-child(3) { border-top: 3px solid #7B1FA2; }
.chart-card--sla-gauge:nth-child(4) { border-top: 3px solid #2E7D32; }

@media (min-width: 1280px) {
  .chart-card--sla-gauge {
    --sla-gauge-h: 200px;
  }
}

/* Claim Mix — compact chart cards */
.dashboard-claim-mix__body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dashboard-claim-mix__primary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  align-items: stretch;
}

.dashboard-claim-mix__col {
  min-width: 0;
  min-height: 0;
}

.dashboard-claim-mix__col--full {
  display: flex;
  flex-direction: column;
}

.dashboard-claim-mix__col--full > .chart-card {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.dashboard-claim-mix__col--full .chart-card__body {
  flex: 1 1 auto;
  min-height: 0;
}

.dashboard-claim-mix__col--stack {
  display: grid;
  grid-template-rows: auto;
  gap: 0.5rem;
}

.dashboard-claim-mix__slot {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.dashboard-claim-mix__slot > .chart-card,
.dashboard-claim-mix__slot > .split-metric-card {
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
}

.dashboard-claim-mix .dashboard-chart-grid,
.dashboard-claim-mix .dashboard-chart-grid--pair,
.dashboard-claim-mix .dashboard-chart-grid--triple {
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .dashboard-claim-mix .dashboard-chart-grid--triple {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-claim-mix__primary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-claim-mix__col--full {
    grid-column: 1 / -1;
  }

  .dashboard-claim-mix__col--stack {
    grid-template-rows: 3fr 1fr;
    min-height: 24rem;
  }

  .dashboard-claim-mix__col--stack:has(> :only-child) {
    grid-template-rows: 1fr;
  }
}

@media (min-width: 1280px) {
  .dashboard-claim-mix__primary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-height: 28rem;
  }

  .dashboard-claim-mix__col--full {
    grid-column: auto;
  }

  .dashboard-claim-mix__col--stack {
    grid-template-rows: 3fr 1fr;
    height: 100%;
  }

  .dashboard-claim-mix__col--stack:has(> :only-child) {
    grid-template-rows: 1fr;
  }

  .dashboard-claim-mix__slot--primary .dashboard-chart--with-legend {
    height: 100%;
    min-height: 14rem;
  }

  .dashboard-claim-mix__slot--primary .dashboard-chart--paired {
    height: 100%;
    min-height: 16rem;
  }

  .dashboard-claim-mix__slot--secondary .split-metric-card--compact {
    padding: 0.5rem 0.65rem;
  }

  .dashboard-claim-mix__slot--secondary .dashboard-chart--own-damage {
    max-height: 5.5rem;
    overflow: auto;
  }

  .dashboard-claim-mix__col--full .dashboard-chart--map {
    height: 100%;
    min-height: 22rem;
  }
}

.dashboard-claim-mix {
  --mix-chart-h-sm: 200px;
  --mix-chart-h-md: 220px;
  --mix-chart-h-map: 200px;
}

.dashboard-claim-mix .chart-card {
  padding: 0.625rem 0.75rem;
}

.dashboard-claim-mix .chart-card--sm {
  min-height: calc(var(--mix-chart-h-sm) + 2.5rem);
}

.dashboard-claim-mix .chart-card--md,
.dashboard-claim-mix .chart-card--wide {
  min-height: calc(var(--mix-chart-h-md) + 2.5rem);
}

.dashboard-claim-mix .chart-card-header {
  padding-bottom: 0.25rem;
  border-bottom: none;
}

.dashboard-claim-mix .chart-card-header__title {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.dashboard-claim-mix .chart-card-header__subtitle {
  font-size: 0.5625rem;
  margin-top: 0.0625rem;
  line-height: 1.2;
}

.dashboard-claim-mix .chart-card__body {
  margin-top: 0.125rem;
}

.dashboard-claim-mix .dashboard-chart--pie,
.dashboard-claim-mix .dashboard-chart--with-legend {
  height: var(--mix-chart-h-sm);
  min-height: var(--mix-chart-h-sm);
}

.dashboard-claim-mix .dashboard-chart--paired {
  height: var(--mix-chart-h-md);
  min-height: var(--mix-chart-h-md);
}

.dashboard-claim-mix .dashboard-chart--map {
  height: var(--mix-chart-h-map);
  min-height: 280px;
}

.dashboard-claim-mix .dashboard-chart--own-damage {
  min-height: 0;
}

.dashboard-claim-mix .chart-card:has(.dashboard-chart--own-damage) {
  min-height: 0;
}

.dashboard-claim-mix__slot--secondary .chart-card {
  min-height: 0;
  padding: 0.5rem 0.65rem;
}

.dashboard-claim-mix__slot--secondary .chart-card-header__subtitle {
  display: none;
}

.dashboard-claim-mix .od-clusters {
  gap: 0.25rem;
  padding: 0;
}

.dashboard-claim-mix .od-clusters__row {
  gap: 0.375rem;
}

.dashboard-claim-mix .od-cluster {
  gap: 0.625rem;
  padding: 0.125rem 0;
}

.dashboard-claim-mix .od-cluster__label {
  min-width: 5.5rem;
  gap: 0.125rem;
}

.dashboard-claim-mix .od-cluster__name {
  font-size: 0.625rem;
}

.dashboard-claim-mix .od-cluster__count {
  font-size: 0.6875rem;
}

.dashboard-claim-mix .od-cluster__dots {
  min-height: 1.5rem;
  max-height: 2rem;
  padding: 0.2rem 0.3rem;
  gap: 0.15rem;
}

.dashboard-claim-mix .od-dot {
  width: 0.375rem;
  height: 0.375rem;
}

.dashboard-claim-mix .split-metric-card--compact h3 {
  font-size: 0.625rem;
}

.dashboard-claim-mix .apexcharts-legend {
  padding: 0 !important;
}

.dashboard-claim-mix .apexcharts-legend-text {
  font-size: 10px !important;
}


/* Sticky filter bar under the top nav on phone + tablet */
@media (max-width: 1279px) {
  .dashboard-toolbar {
    position: sticky;
    top: calc(var(--app-nav-height) + env(safe-area-inset-top, 0px));
    z-index: 35;
    margin-left: -0.15rem;
    margin-right: -0.15rem;
    padding: 0.65rem 0.75rem !important;
    border: 1px solid rgba(14, 42, 92, 0.08);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    box-shadow: 0 8px 24px rgba(14, 42, 92, 0.06);
  }

  .dark .dashboard-toolbar {
    border-color: rgba(240, 215, 140, 0.12);
    background: rgba(14, 42, 92, 0.92);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  }

  .signage-dashboard .dashboard-toolbar {
    position: static;
    margin-left: 0;
    margin-right: 0;
    box-shadow: none;
  }

  .signage-dashboard .dashboard-header-bar {
    grid-template-areas: "brand actions";
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .dashboard-date-filter__input {
    min-height: 44px;
    font-size: 0.8125rem;
  }

  .dashboard-date-filter__apply {
    min-height: 44px;
    flex: 1;
  }

  .dashboard-date-filter__clear {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0 0.5rem;
  }

  .dashboard-date-filter__actions {
    width: 100%;
  }

  #pending-claims-queue {
    scroll-margin-top: calc(var(--app-nav-height) + env(safe-area-inset-top, 0px) + 5.5rem);
  }
}

/* Pending queue — touch chips + card list */
.pending-queue__chips {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 0.1rem;
  margin: 0 -0.15rem;
  padding-left: 0.15rem;
  padding-right: 0.15rem;
}

.pending-queue__chips::-webkit-scrollbar {
  display: none;
}

.pending-queue__chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0.4rem 0.85rem;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.85);
  color: #64748b;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.dark .pending-queue__chip {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: #94a3b8;
}

.pending-queue__chip--active {
  background: #0E2A5C;
  border-color: #0E2A5C;
  color: #E0B12A;
}

.dark .pending-queue__chip--active {
  background: #E0B12A;
  border-color: #E0B12A;
  color: #0E2A5C;
}

.pending-queue__chip--teal {
  background: rgba(43, 111, 212, 0.1);
  border-color: rgba(43, 111, 212, 0.3);
  color: #2B6FD4;
}

.dark .pending-queue__chip--teal {
  color: #F0D78C;
  border-color: rgba(240, 215, 140, 0.28);
  background: rgba(240, 215, 140, 0.1);
}

.pending-queue__edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  min-width: 56px;
  padding: 0.35rem 0.75rem;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: #2B6FD4;
  border: 1px solid rgba(43, 111, 212, 0.28);
  background: rgba(43, 111, 212, 0.08);
}

.dark .pending-queue__edit {
  color: #F0D78C;
  border-color: rgba(240, 215, 140, 0.24);
  background: rgba(240, 215, 140, 0.08);
}

.pending-queue__meta-label {
  font-size: 0.5625rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 0.15rem;
}

.pending-queue__meta-value {
  font-size: 0.75rem;
  font-weight: 800;
  color: #0E2A5C;
  line-height: 1.2;
}

.dark .pending-queue__meta-value {
  color: #f8fafc;
}

/* Overdue action strip */
.dashboard-action-strip {
  border: 1px solid rgba(225, 29, 72, 0.22);
  background: linear-gradient(90deg, rgba(225, 29, 72, 0.1), rgba(225, 29, 72, 0.04));
}

.dark .dashboard-action-strip {
  border-color: rgba(251, 113, 133, 0.28);
  background: linear-gradient(90deg, rgba(251, 113, 133, 0.14), rgba(251, 113, 133, 0.04));
}

.dashboard-action-strip__body {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
}

.dashboard-action-strip__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  color: #e11d48;
  background: rgba(225, 29, 72, 0.12);
}

.dark .dashboard-action-strip__icon {
  color: #fb7185;
  background: rgba(251, 113, 133, 0.14);
}

.dashboard-action-strip__title {
  font-size: 0.8125rem;
  font-weight: 800;
  color: #9f1239;
  line-height: 1.25;
}

.dark .dashboard-action-strip__title {
  color: #fecdd3;
}

.dashboard-action-strip__meta {
  margin-top: 0.15rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #be123c;
  opacity: 0.85;
}

.dark .dashboard-action-strip__meta {
  color: #fda4af;
}

.dashboard-action-strip__cta {
  flex-shrink: 0;
  padding: 0.45rem 0.75rem;
  min-height: 2.5rem;
  display: inline-flex;
  align-items: center;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  background: #e11d48;
}

.dashboard-action-strip__cta:hover {
  background: #be123c;
}

.dark .dashboard-action-strip__cta {
  background: #e11d48;
  color: #fff;
}

.pending-queue__summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.pending-queue__summary::-webkit-details-marker {
  display: none;
}

.pending-queue__summary-main {
  background: rgba(248, 250, 252, 0.5);
}

.dark .pending-queue__summary-main {
  background: rgba(255, 255, 255, 0.05);
}

.pending-queue__summary--alert .pending-queue__summary-main {
  background: linear-gradient(90deg, rgba(225, 29, 72, 0.12), rgba(225, 29, 72, 0.04));
  border-bottom-color: rgba(225, 29, 72, 0.18);
}

.dark .pending-queue__summary--alert .pending-queue__summary-main {
  background: linear-gradient(90deg, rgba(251, 113, 133, 0.16), rgba(251, 113, 133, 0.04));
  border-bottom-color: rgba(251, 113, 133, 0.22);
}

.pending-queue__summary-icon {
  background: linear-gradient(to bottom right, #0E7B7D, #1a3a6e);
  color: #fff;
}

.pending-queue__summary-icon.is-alert {
  background: rgba(225, 29, 72, 0.14);
  color: #e11d48;
}

.dark .pending-queue__summary-icon:not(.is-alert) {
  background: #F0D78C;
  color: #0E2A5C;
}

.dark .pending-queue__summary-icon.is-alert {
  background: rgba(251, 113, 133, 0.16);
  color: #fb7185;
}

.pending-queue__summary-alert {
  color: #be123c;
}

.dark .pending-queue__summary-alert {
  color: #fda4af;
}

.pending-queue__review-hint {
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #e11d48;
}

.dark .pending-queue__review-hint {
  color: #fb7185;
}

.pending-queue__chevron {
  transition: transform 0.18s ease;
  flex-shrink: 0;
}

.pending-queue[open] .pending-queue__chevron {
  transform: rotate(180deg);
}

.pending-queue[open] .pending-queue__review-hint {
  opacity: 0.55;
}

.pending-queue--alert {
  border-color: rgba(225, 29, 72, 0.28);
}

.dark .pending-queue--alert {
  border-color: rgba(251, 113, 133, 0.32);
}

@media (min-width: 768px) and (max-width: 1023px) {
  .dashboard-chart:not(.dashboard-chart--needle):not(.dashboard-chart--map) {
    height: 210px;
    min-height: 210px;
  }

  .dashboard-chart--hero {
    height: 230px;
    min-height: 230px;
  }

  .dashboard-chart--needle {
    height: 280px;
    min-height: 280px;
  }

  .dashboard-chart--pie,
  .dashboard-chart--with-legend {
    height: 260px;
    min-height: 260px;
  }

  .dashboard-chart-grid > * {
    flex: 1 1 calc(50% - 0.25rem);
    min-width: calc(50% - 0.25rem);
  }

  .dashboard-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (display-mode: standalone) {
  .app-top-nav {
    padding-top: max(env(safe-area-inset-top), 0.25rem);
  }

  .pwa-install-banner {
    display: none !important;
  }

  .app-shell {
    overscroll-behavior-y: contain;
    min-height: 100dvh;
  }

  /* Avoid double-counting tab bar padding already set for phones */
  @media (min-width: 768px) {
    .app-main {
      padding-bottom: max(1rem, env(safe-area-inset-bottom));
    }
  }
}

/* Keep flatpickr usable on phones / tablets */
@media (max-width: 767px) {
  .flatpickr-calendar {
    width: min(100vw - 1.25rem, 320px) !important;
    max-width: calc(100vw - 1.25rem);
  }

  .flatpickr-days {
    width: 100% !important;
  }

  .dayContainer {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
  }
}

/* =============================================
   ENTERPRISE DASHBOARD — Executive layout
   ============================================= */

:root {
  --dashboard-gap: 16px;
  --dashboard-card-padding: 16px;
  --chart-h-sm: 280px;
  --chart-h-md: 300px;
  --chart-h-lg: 340px;
  --chart-h-gauge: 270px;
  --kpi-min-h: 112px;
  --executive-row-h: calc(var(--chart-h-lg) + 56px);
}

.dashboard-page {
  background: transparent;
}

.dashboard-page .glass-card,
.dashboard-page .glass-panel {
  border-radius: 12px;
}

.dashboard-executive-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--dashboard-gap);
  align-items: stretch;
}

/* Tablet: chart full width, health + alerts share a row below */
@media (min-width: 768px) and (max-width: 1023px) {
  .dashboard-executive-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto auto;
  }

  .dashboard-executive-row > .chart-card,
  .dashboard-executive-row > .chart-card.glass-card {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .dashboard-executive-row > .health-score {
    grid-column: 1;
    grid-row: 2;
  }

  .dashboard-executive-row > .alert-panel {
    grid-column: 2;
    grid-row: 2;
  }
}

/* Desktop: Chart on left (spans 2 rows), Health and Alerts stacked on right */
@media (min-width: 1024px) {
  .dashboard-executive-row {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
    grid-template-rows: minmax(0, 1fr) auto;
    min-height: var(--executive-row-h);
  }

  .dashboard-executive-row > .health-score {
    height: 100%;
    min-height: 0;
    overflow: visible;
  }

  .dashboard-executive-row > .alert-panel {
    height: auto;
    align-self: start;
    min-height: 0;
    overflow: visible;
  }
  
  .dashboard-executive-row > .chart-card {
    grid-column: 1;
    grid-row: 1 / 3;
    min-height: var(--executive-row-h);
    height: 100%;
    max-height: var(--executive-row-h);
    overflow: hidden;
  }

  .dashboard-executive-row > .health-score {
    grid-column: 2;
    grid-row: 1;
  }

  .dashboard-executive-row > .alert-panel {
    grid-column: 2;
    grid-row: 2;
  }
}

.dashboard-kpi-grid {
  gap: var(--dashboard-gap) !important;
}

.dashboard-kpi-grid .dashboard-kpi-card {
  min-height: var(--kpi-min-h);
}

.dashboard-sla-strip {
  gap: var(--dashboard-gap);
}

.dashboard-sla-strip__item {
  min-height: 88px;
  padding: 12px 16px !important;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.dashboard-sla-strip__item p:first-child {
  font-size: 0.6875rem !important;
  letter-spacing: 0.06em !important;
}

.dashboard-sla-strip__item p:nth-child(2) {
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  margin-top: 4px;
}

/* Enterprise bullet gauge (replaces needle) */
.bullet-gauge {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  height: 100%;
  padding: 4px 0;
}

.bullet-gauge__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.bullet-gauge__value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #172033;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.dark .bullet-gauge__value {
  color: #F1F5F9;
}

.bullet-gauge__unit {
  font-size: 0.75rem;
  font-weight: 500;
  color: #64748B;
  margin-left: 4px;
}

.bullet-gauge__track {
  position: relative;
  height: 12px;
  border-radius: 6px;
  background: #E2E8F0;
  overflow: visible;
}

.dark .bullet-gauge__track {
  background: rgba(148, 163, 184, 0.2);
}

.bullet-gauge__fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.5s ease;
}

.bullet-gauge__fill--ok { background: #1565C0; }
.bullet-gauge__fill--warn { background: #ED6C02; }
.bullet-gauge__fill--critical { background: #C62828; }

.bullet-gauge__marker {
  position: absolute;
  top: -4px;
  width: 2px;
  height: 20px;
  background: #172033;
  border-radius: 1px;
  transform: translateX(-50%);
}

.dark .bullet-gauge__marker {
  background: #F1F5F9;
}

.bullet-gauge__marker-label {
  position: absolute;
  top: -22px;
  transform: translateX(-50%);
  font-size: 0.625rem;
  font-weight: 600;
  color: #64748B;
  white-space: nowrap;
}

.bullet-gauge__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.6875rem;
  color: #64748B;
}

.bullet-gauge__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.bullet-gauge__legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}

.bullet-gauge__status {
  font-size: 0.75rem;
  font-weight: 600;
}

.bullet-gauge__status--ok { color: #2E7D32; }
.bullet-gauge__status--warn { color: #ED6C02; }
.bullet-gauge__status--critical { color: #C62828; }

/* ApexCharts enterprise polish */
.dashboard-chart .apexcharts-toolbar {
  display: none !important;
}

.dashboard-chart .apexcharts-tooltip {
  border: 1px solid #E2E8F0 !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(23, 32, 51, 0.1) !important;
  background: #FFFFFF !important;
}

.dark .dashboard-chart .apexcharts-tooltip {
  border-color: rgba(148, 163, 184, 0.2) !important;
  background: #1A2332 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
}

.dashboard-chart .apexcharts-gridline {
  stroke: #E2E8F0 !important;
}

.dark .dashboard-chart .apexcharts-gridline {
  stroke: rgba(148, 163, 184, 0.15) !important;
}

.dashboard-chart .apexcharts-legend-text {
  font-size: 12px !important;
  font-weight: 500 !important;
  color: #64748B !important;
}

.dark .dashboard-chart .apexcharts-legend-text {
  color: #94A3B8 !important;
}

/* Health Score */
.health-score {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding: var(--dashboard-card-padding);
  height: 100%;
  width: 100%;
  min-height: 0;
  box-sizing: border-box;
  overflow: visible;
}

.health-score__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-shrink: 0;
}

.health-score__label {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748B;
}

.dark .health-score__label {
  color: #94A3B8;
}

.health-score__main {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.875rem;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow: visible;
}

/* Executive row: fill panel width & height */
.dashboard-executive-row .health-score {
  overflow: visible;
  justify-content: flex-start;
}

.dashboard-executive-row .health-score__main {
  flex-direction: row;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0.75rem;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}

.dashboard-executive-row .health-score__ring {
  flex: 0 0 auto;
  height: 100%;
  width: auto;
  max-width: 42%;
  aspect-ratio: 1;
  max-height: none;
  margin: 0;
  align-self: center;
}

.dashboard-executive-row .health-score__value {
  font-size: clamp(1.25rem, 4vw, 1.75rem);
}

.dashboard-executive-row .health-score__dimensions {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow: visible;
  justify-content: center;
  gap: 0.375rem;
}

.dashboard-executive-row .health-score__dimension {
  gap: 0.25rem 0.5rem;
}

.dashboard-executive-row .health-score__dimension-label {
  font-size: 0.6875rem;
}

.dashboard-executive-row .health-score__dimension-value {
  font-size: 0.75rem;
}

@media (max-width: 767px) {
  .health-score__main {
    flex-direction: column;
    align-items: center;
  }

  .health-score__dimensions {
    width: 100%;
  }
}

.health-score__ring {
  position: relative;
  width: 5.5rem;
  height: 5.5rem;
  flex-shrink: 0;
}

.health-score__ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.health-score__ring-bg {
  fill: none;
  stroke: #E2E8F0;
  stroke-width: 6;
}

.dark .health-score__ring-bg {
  stroke: rgba(148, 163, 184, 0.2);
}

.health-score__ring-fill {
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s ease;
}

.health-score__ring-fill--healthy { stroke: #2E7D32; }
.health-score__ring-fill--monitor { stroke: #ED6C02; }
.health-score__ring-fill--critical { stroke: #C62828; }
.health-score__ring-fill--neutral { stroke: #64748B; }

.health-score__value-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.health-score__value {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1;
  color: #172033;
  font-variant-numeric: tabular-nums;
}

.dark .health-score__value {
  color: #F8FAFC;
}

.health-score__status {
  margin: 0.25rem 0 0;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.health-score__status--inline {
  margin: 0;
  font-size: 0.625rem;
  letter-spacing: 0.08em;
}

.health-score__status--healthy { color: #2E7D32; }
.health-score__status--monitor { color: #ED6C02; }
.health-score__status--critical { color: #C62828; }
.health-score__status--neutral { color: #64748B; }

.health-score__dimensions {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  flex: 1;
}

.health-score__dimension {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.375rem 0.75rem;
  align-items: center;
}

.health-score__dimension-label {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748B;
}

.dark .health-score__dimension-label {
  color: #94A3B8;
}

.health-score__dimension-value {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #172033;
  font-variant-numeric: tabular-nums;
}

.dark .health-score__dimension-value {
  color: #F1F5F9;
}

.health-score__dimension-bar {
  grid-column: 1 / -1;
  height: 4px;
  border-radius: 999px;
  background: #E2E8F0;
  overflow: hidden;
}

.dark .health-score__dimension-bar {
  background: rgba(148, 163, 184, 0.2);
}

.health-score__dimension-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: #1565C0;
  transition: width 0.5s ease;
}

.health-score__dimension-bar-fill--warning { background: #ED6C02; }
.health-score__dimension-bar-fill--critical { background: #C62828; }

.health-score__tooltip-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  cursor: help;
  outline: none;
}

.health-score__tooltip-wrap--inline {
  margin-left: 0.25rem;
}

.health-score__info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.875rem;
  height: 0.875rem;
  margin-left: 0.25rem;
  color: #94A3B8;
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.health-score__info-icon svg {
  width: 100%;
  height: 100%;
}

.health-score__dimension--has-tooltip {
  position: relative;
  cursor: help;
  border-radius: 0.375rem;
  outline: none;
}

.health-score__dimension--has-tooltip:focus-visible {
  box-shadow: 0 0 0 2px rgba(21, 101, 192, 0.35);
}

.health-score__dimension-label .health-score__info-icon {
  vertical-align: -0.125em;
}

.health-score__tooltip-wrap:hover .health-score__info-icon,
.health-score__tooltip-wrap:focus-visible .health-score__info-icon,
.health-score__dimension--has-tooltip:hover .health-score__info-icon,
.health-score__dimension--has-tooltip:focus-visible .health-score__info-icon {
  color: #1565C0;
}

.dark .health-score__info-icon {
  color: #64748B;
}

.dark .health-score__tooltip-wrap:hover .health-score__info-icon,
.dark .health-score__tooltip-wrap:focus-visible .health-score__info-icon,
.dark .health-score__dimension--has-tooltip:hover .health-score__info-icon,
.dark .health-score__dimension--has-tooltip:focus-visible .health-score__info-icon {
  color: #60A5FA;
}

.health-score__tooltip {
  position: absolute;
  z-index: 60;
  left: 0;
  bottom: calc(100% + 0.375rem);
  min-width: 11rem;
  max-width: 15rem;
  padding: 0.5rem 0.625rem;
  border-radius: 0.5rem;
  background: #172033;
  color: #F8FAFC;
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: normal;
  text-transform: none;
  white-space: normal;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0.15s ease, transform 0.15s ease;
  transform: translateY(2px);
}

.health-score__tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0.75rem;
  border: 5px solid transparent;
  border-top-color: #172033;
}

.health-score__tooltip-wrap:hover .health-score__tooltip,
.health-score__tooltip-wrap:focus-visible .health-score__tooltip,
.health-score__dimension--has-tooltip:hover .health-score__tooltip,
.health-score__dimension--has-tooltip:focus-visible .health-score__tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.health-score__dimension .health-score__tooltip {
  left: 0;
  right: 0;
  max-width: none;
}

.dark .health-score__tooltip {
  background: #1E293B;
  color: #E2E8F0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.dark .health-score__tooltip::after {
  border-top-color: #1E293B;
}

/* Alert Panel */
.alert-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  padding: var(--dashboard-card-padding);
  overflow: hidden;
}

.alert-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.625rem;
  padding-bottom: 0.625rem;
  border-bottom: 1px solid #E2E8F0;
  flex-shrink: 0;
}

.dark .alert-panel__header {
  border-bottom-color: rgba(148, 163, 184, 0.18);
}

.alert-panel__title {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #172033;
}

.dark .alert-panel__title {
  color: #F8FAFC;
}

.alert-panel__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  background: rgba(198, 40, 40, 0.1);
  color: #C62828;
}

.alert-panel__list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

/* Executive row: compact alerts — panel shrinks to content */
.dashboard-executive-row .alert-panel {
  overflow: hidden;
  padding: 0.5rem 0.625rem;
  height: auto;
}

.dashboard-executive-row .alert-panel__header {
  margin-bottom: 0.25rem;
  padding-bottom: 0;
  border-bottom: none;
  gap: 0.375rem;
}

.dashboard-executive-row .alert-panel__title {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748B;
}

.dark .dashboard-executive-row .alert-panel__title {
  color: #94A3B8;
}

.dashboard-executive-row .alert-panel__count {
  min-width: 1.125rem;
  padding: 0 0.375rem;
  font-size: 0.5625rem;
  line-height: 1.25rem;
}

.dashboard-executive-row .alert-panel__list {
  overflow: hidden;
  gap: 0.1875rem;
  flex: 0 0 auto;
  justify-content: flex-start;
  align-content: flex-start;
}

.dashboard-executive-row .alert-item {
  flex: 0 0 auto;
  align-self: stretch;
  min-height: 0;
  padding: 0.25rem 0.375rem;
  gap: 0.25rem 0.375rem;
  align-items: center;
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.dashboard-executive-row .alert-item__severity {
  padding: 0;
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 999px;
  font-size: 0;
  line-height: 0;
  overflow: hidden;
  flex-shrink: 0;
}

.dashboard-executive-row .alert-item__severity--critical {
  background: #C62828;
  color: transparent;
}

.dashboard-executive-row .alert-item__severity--warning {
  background: #ED6C02;
  color: transparent;
}

.dashboard-executive-row .alert-item__severity--info {
  background: #1565C0;
  color: transparent;
}

.dashboard-executive-row .alert-item__title {
  font-size: 0.625rem;
  line-height: 1.15;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dashboard-executive-row .alert-item__meta {
  font-size: 0.5rem;
  margin-top: 0.0625rem;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-executive-row .alert-item__action {
  font-size: 0.5rem;
  padding: 0;
  align-self: center;
}

.dashboard-executive-row .alert-panel__empty {
  padding: 0.75rem 0.5rem;
}

.alert-panel__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.5rem 1rem;
  text-align: center;
  flex: 1 1 auto;
  min-height: 0;
}

/* Executive row: chart fills panel height */
.dashboard-executive-row .chart-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.dashboard-executive-row .chart-card--lg {
  min-height: var(--executive-row-h);
}

.dashboard-executive-row .chart-card__body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.dashboard-executive-row .dashboard-chart--hero,
.dashboard-executive-row .dashboard-chart--paired {
  flex: 1 1 auto;
  min-height: 0 !important;
  height: auto !important;
}

.alert-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.375rem 0.5rem;
  align-items: center;
  padding: 0.375rem 0.5rem;
  border-radius: 8px;
  border: 1px solid #E2E8F0;
  background: #FAFBFC;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.dark .alert-item {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(148, 163, 184, 0.15);
}

.alert-item:hover {
  background: #F5F7FA;
  border-color: #CBD5E1;
}

.dark .alert-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.alert-item__severity {
  display: inline-flex;
  align-items: center;
  gap: 0.125rem;
  padding: 0.0625rem 0.375rem;
  border-radius: 4px;
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1.3;
}

.alert-item__severity--critical {
  background: rgba(211, 47, 47, 0.12);
  color: #C62828;
}

.alert-item__severity--warning {
  background: rgba(237, 108, 2, 0.12);
  color: #ED6C02;
}

.alert-item__severity--info {
  background: rgba(21, 101, 192, 0.12);
  color: #1565C0;
}

.alert-item__severity--resolved {
  background: rgba(46, 125, 50, 0.12);
  color: #2E7D32;
}

.alert-item__body {
  min-width: 0;
}

.alert-item__title {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: #172033;
  line-height: 1.2;
}

.dark .alert-item__title {
  color: #F1F5F9;
}

.alert-item__meta {
  margin: 0.0625rem 0 0;
  font-size: 0.625rem;
  color: #64748B;
  line-height: 1.2;
}

.alert-item__action {
  font-size: 0.625rem;
  font-weight: 700;
  color: #1565C0;
  text-decoration: none;
  white-space: nowrap;
  padding: 0;
}

.alert-item__action:hover {
  text-decoration: underline;
}

.dark .alert-item__action {
  color: #42A5F5;
}

.alert-panel__empty-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background: rgba(46, 125, 50, 0.1);
  color: #2E7D32;
  display: flex;
  align-items: center;
  justify-content: center;
}

.alert-panel__empty-text {
  margin: 0;
  font-size: 0.8125rem;
  color: #64748B;
}

/* Enhanced KPI cards */
.dashboard-kpi-card--accent-blue {
  border-top: 3px solid #1565C0;
}

.dashboard-kpi-card--accent-red {
  border-top: 3px solid #C62828;
}

.dashboard-kpi-card--accent-success {
  border-top: 3px solid #2E7D32;
}

.dashboard-kpi-card--accent-warning {
  border-top: 3px solid #ED6C02;
}

.kpi-trend {
  display: inline-flex;
  align-items: center;
  gap: 0.125rem;
  font-size: 0.6875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.kpi-trend--up { color: #2E7D32; }
.kpi-trend--down { color: #C62828; }
.kpi-trend--neutral { color: #64748B; }

.kpi-progress {
  margin-top: 0.5rem;
  height: 4px;
  border-radius: 999px;
  background: #E2E8F0;
  overflow: hidden;
}

.dark .kpi-progress {
  background: rgba(148, 163, 184, 0.2);
}

.kpi-progress__fill {
  height: 100%;
  border-radius: 999px;
  background: #1565C0;
  transition: width 0.4s ease;
}

.kpi-progress__fill--warning { background: #ED6C02; }
.kpi-progress__fill--critical { background: #C62828; }

/* Data table enterprise */
.enterprise-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.enterprise-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.enterprise-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
}

.enterprise-table thead tr {
  background: #F5F7FA;
  border-bottom: 1px solid #E2E8F0;
}

.dark .enterprise-table thead tr {
  background: rgba(255, 255, 255, 0.05);
  border-bottom-color: rgba(148, 163, 184, 0.18);
}

.enterprise-table th {
  padding: 0.625rem 1rem;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748B;
  white-space: nowrap;
}

.enterprise-table td {
  padding: 0.625rem 1rem;
  font-size: 0.8125rem;
  color: #172033;
  border-bottom: 1px solid #F1F5F9;
}

.dark .enterprise-table td {
  color: #E2E8F0;
  border-bottom-color: rgba(148, 163, 184, 0.1);
}

.enterprise-table tbody tr {
  transition: background 0.12s ease;
}

.enterprise-table tbody tr:hover {
  background: #F5F7FA;
}

.dark .enterprise-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

.enterprise-table td.numeric,
.enterprise-table th.numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Recent Account Claims card */
.recent-claims-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #E2E8F0;
  background: #F8FAFC;
}

.dark .recent-claims-card__header {
  border-bottom-color: rgba(148, 163, 184, 0.15);
  background: rgba(255, 255, 255, 0.03);
}

.recent-claims-card__header-left {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 0;
}

.recent-claims-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  background: rgba(46, 125, 50, 0.1);
  color: #2E7D32;
  flex-shrink: 0;
}

.recent-claims-card__title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  color: #172033;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.dark .recent-claims-card__title {
  color: #F8FAFC;
}

.recent-claims-card__subtitle {
  margin: 0.125rem 0 0;
  font-size: 0.6875rem;
  color: #64748B;
}

.dark .recent-claims-card__subtitle {
  color: #94A3B8;
}

.recent-claims-card__header-right {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-shrink: 0;
}

.recent-claims-card__count {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #2E7D32;
  background: rgba(46, 125, 50, 0.08);
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
}

.recent-claims-card__view-all {
  font-size: 0.6875rem;
  font-weight: 700;
  color: #1565C0;
  text-decoration: none;
  white-space: nowrap;
}

.dark .recent-claims-card__view-all {
  color: #42A5F5;
}

.recent-claims-card__view-all:hover {
  text-decoration: underline;
}

.recent-claims-table.enterprise-table th {
  padding: 0.4375rem 0.75rem;
  font-size: 0.5625rem;
  letter-spacing: 0.1em;
  background: #F1F5F9;
}

.dark .recent-claims-table.enterprise-table thead tr {
  background: rgba(255, 255, 255, 0.04);
}

.recent-claims-table.enterprise-table td {
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  vertical-align: middle;
}

.recent-claims-row__claim {
  display: flex;
  flex-direction: column;
  gap: 0.1875rem;
}

.recent-claims-row__number {
  font-size: 0.6875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: #172033;
  line-height: 1.2;
}

.dark .recent-claims-row__number {
  color: #F1F5F9;
}

.recent-claims-row__badge {
  display: inline-block;
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2E7D32;
  background: rgba(46, 125, 50, 0.1);
  padding: 0 0.3rem;
  border-radius: 3px;
  line-height: 1.5;
  width: fit-content;
}

.recent-claims-row__customer {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #172033;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 14rem;
}

.dark .recent-claims-row__customer {
  color: #E2E8F0;
}

.recent-claims-row__type {
  display: inline-block;
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #1565C0;
  background: rgba(21, 101, 192, 0.08);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  white-space: nowrap;
}

.dark .recent-claims-row__type {
  color: #90CAF9;
  background: rgba(21, 101, 192, 0.18);
}

.recent-claims-row__surveyor {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #C62828;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 8rem;
}

.dark .recent-claims-row__surveyor {
  color: #EF9A9A;
}

.recent-claims-row__amount {
  font-size: 0.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #172033;
  white-space: nowrap;
}

.dark .recent-claims-row__amount {
  color: #F1F5F9;
}

.recent-claims-row__date {
  font-size: 0.6875rem;
  font-weight: 500;
  color: #64748B;
  white-space: nowrap;
}

.dark .recent-claims-row__date {
  color: #94A3B8;
}

/* Empty / skeleton states */
.dashboard-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2.5rem 1.5rem;
  text-align: center;
}

.dashboard-empty-state__icon {
  width: 3rem;
  height: 3rem;
  border-radius: 12px;
  background: rgba(21, 101, 192, 0.08);
  color: #1565C0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dashboard-empty-state__title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #172033;
}

.dark .dashboard-empty-state__title {
  color: #F8FAFC;
}

.dashboard-empty-state__text {
  margin: 0;
  font-size: 0.8125rem;
  color: #64748B;
  max-width: 24rem;
}

.dashboard-skeleton {
  background: linear-gradient(90deg, #E2E8F0 25%, #F1F5F9 50%, #E2E8F0 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.2s ease-in-out infinite;
  border-radius: 8px;
}

.dark .dashboard-skeleton {
  background: linear-gradient(90deg, rgba(148,163,184,0.15) 25%, rgba(148,163,184,0.25) 50%, rgba(148,163,184,0.15) 75%);
  background-size: 200% 100%;
}

@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Section title refresh */
.dashboard-section-title h2 {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #172033;
}

.dark .dashboard-section-title h2 {
  color: #E2E8F0;
}

.dashboard-section-title span:first-child {
  background: linear-gradient(to bottom, #1565C0, #0D47A1) !important;
}

/* Pending queue chip colors */
.pending-queue__chip--active {
  background: #1565C0;
  border-color: #1565C0;
  color: #FFFFFF;
}

.dark .pending-queue__chip--active {
  background: #1565C0;
  border-color: #1565C0;
  color: #FFFFFF;
}

.pending-queue__chip--teal {
  background: rgba(21, 101, 192, 0.08);
  border-color: rgba(21, 101, 192, 0.25);
  color: #1565C0;
}

/* App nav enterprise */
.app-top-nav {
  background: #FFFFFF;
  border-bottom: 1px solid #E2E8F0;
  backdrop-filter: none;
}

.dark .app-top-nav {
  background: #172033;
  border-bottom-color: rgba(148, 163, 184, 0.18);
}

.app-tab-bar__link--active {
  color: #1565C0;
  background: rgba(21, 101, 192, 0.08);
}

.dark .app-tab-bar__link--active {
  color: #42A5F5;
  background: rgba(21, 101, 192, 0.15);
}
