/* ==========================================================================
   PM POSHAN (PMP) Custom Styles: Module Selector, Timeline & Grievance Badges
   Fully theme-aware with CSS variables for Light & Dark mode compatibility.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Theme Variables & Token System
   -------------------------------------------------------------------------- */
:root {
  /* Text Tokens */
  --pmp-text-primary: var(--md-sys-color-on-surface, #1e293b);
  --pmp-text-secondary: var(--md-sys-color-on-surface-variant, #475569);
  --pmp-text-muted: #64748b;
  --pmp-text-subtle: #94a3b8;

  /* Surfaces & Containers */
  --pmp-surface-page: var(--md-sys-color-background, #f8fafc);
  --pmp-surface-card: var(--md-sys-color-surface-container-low, #ffffff);
  --pmp-surface-header: var(--md-sys-color-surface-container, #f8fafc);
  --pmp-surface-hover: var(--md-sys-color-surface-container-highest, #f1f5f9);
  --pmp-surface-chip: #f1f5f9;

  /* Borders & Dividers */
  --pmp-border: var(--md-sys-color-outline-variant, #e2e8f0);
  --pmp-border-subtle: #f1f5f9;

  /* Brand / Primary Palette (Sky / Blue) */
  --pmp-brand: #0284c7;
  --pmp-brand-hover: #0369a1;
  --pmp-brand-container: #e0f2fe;
  --pmp-on-brand-container: #0369a1;
  --pmp-brand-border: #bae6fd;

  /* Status & Semantic Colors */
  --pmp-success: #15803d;
  --pmp-success-hover: #166534;
  --pmp-success-container: #dcfce7;
  --pmp-on-success-container: #14532d;
  --pmp-success-border: #86efac;

  --pmp-warning: #b45309;
  --pmp-warning-hover: #92400e;
  --pmp-warning-container: #fef3c7;
  --pmp-on-warning-container: #78350f;
  --pmp-warning-border: #fde68a;

  --pmp-danger: #dc2626;
  --pmp-danger-hover: #b91c1c;
  --pmp-danger-container: #fee2e2;
  --pmp-on-danger-container: #7f1d1d;
  --pmp-danger-border: #fca5a5;

  --pmp-info: #0284c7;
  --pmp-info-hover: #0369a1;
  --pmp-info-container: #e0f2fe;
  --pmp-on-info-container: #0369a1;
  --pmp-info-border: #bae6fd;

  /* Purple (Super Admin & System Tokens) */
  --pmp-purple: #7c3aed;
  --pmp-purple-hover: #6d28d9;
  --pmp-purple-container: #ede9fe;
  --pmp-on-purple-container: #5b21b6;
  --pmp-purple-border: #ddd6fe;

  /* Indigo (Admin Role Tokens) */
  --pmp-indigo: #4f46e5;
  --pmp-indigo-hover: #4338ca;
  --pmp-indigo-container: #e0e7ff;
  --pmp-on-indigo-container: #3730a3;
  --pmp-indigo-border: #c7d2fe;

  --pmp-neutral-container: #f1f5f9;
  --pmp-neutral-text: #475569;
  --pmp-neutral-border: #e2e8f0;

  /* Shadows */
  --pmp-shadow-sm: 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05);
  --pmp-shadow-md: 0 0.625rem 1.5625rem -0.3125rem rgba(0, 0, 0, 0.08), 0 0.5rem 0.625rem -0.375rem rgba(0, 0, 0, 0.04);
  --pmp-shadow-lg: 0 1.25rem 1.5625rem -0.3125rem rgba(0, 0, 0, 0.15);

  /* Gradients */
  --pmp-hero-gradient: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
}

/* Dark Mode Overrides */
:root[data-theme-resolved="dark"],
:root[data-theme="dark"],
:root.theme-dark {
  /* Text Tokens */
  --pmp-text-primary: var(--md-sys-color-on-surface, #e2e8f0);
  --pmp-text-secondary: var(--md-sys-color-on-surface-variant, #cbd5e1);
  --pmp-text-muted: #94a3b8;
  --pmp-text-subtle: #64748b;

  /* Surfaces & Containers */
  --pmp-surface-page: var(--md-sys-color-background, #0f172a);
  --pmp-surface-card: var(--md-sys-color-surface-container-low, #1e293b);
  --pmp-surface-header: var(--md-sys-color-surface-container, #1e293b);
  --pmp-surface-hover: var(--md-sys-color-surface-container-highest, #334155);
  --pmp-surface-chip: #334155;

  /* Borders & Dividers */
  --pmp-border: var(--md-sys-color-outline-variant, #334155);
  --pmp-border-subtle: #1e293b;

  /* Brand / Primary Palette (High contrast in dark mode) */
  --pmp-brand: #38bdf8;
  --pmp-brand-hover: #7dd3fc;
  --pmp-brand-container: #0c4a6e;
  --pmp-on-brand-container: #bae6fd;
  --pmp-brand-border: #0369a1;

  /* Status & Semantic Colors */
  --pmp-success: #4ade80;
  --pmp-success-hover: #22c55e;
  --pmp-success-container: #14532d;
  --pmp-on-success-container: #bbf7d0;
  --pmp-success-border: #166534;

  --pmp-warning: #fbbf24;
  --pmp-warning-hover: #f59e0b;
  --pmp-warning-container: #78350f;
  --pmp-on-warning-container: #fef3c7;
  --pmp-warning-border: #92400e;

  --pmp-danger: #f87171;
  --pmp-danger-hover: #ef4444;
  --pmp-danger-container: #7f1d1d;
  --pmp-on-danger-container: #fee2e2;
  --pmp-danger-border: #991b1b;

  --pmp-info: #38bdf8;
  --pmp-info-hover: #7dd3fc;
  --pmp-info-container: #0c4a6e;
  --pmp-on-info-container: #bae6fd;
  --pmp-info-border: #0369a1;

  /* Purple */
  --pmp-purple: #c084fc;
  --pmp-purple-hover: #d8b4fe;
  --pmp-purple-container: #581c87;
  --pmp-on-purple-container: #f3e8ff;
  --pmp-purple-border: #7e22ce;

  /* Indigo */
  --pmp-indigo: #818cf8;
  --pmp-indigo-hover: #a5b4fc;
  --pmp-indigo-container: #312e81;
  --pmp-on-indigo-container: #e0e7ff;
  --pmp-indigo-border: #4338ca;

  --pmp-neutral-container: #1e293b;
  --pmp-neutral-text: #cbd5e1;
  --pmp-neutral-border: #334155;

  /* Shadows */
  --pmp-shadow-sm: 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.4);
  --pmp-shadow-md: 0 0.625rem 1.5625rem -0.3125rem rgba(0, 0, 0, 0.5);
  --pmp-shadow-lg: 0 1.25rem 1.5625rem -0.3125rem rgba(0, 0, 0, 0.6);

  /* Gradients */
  --pmp-hero-gradient: linear-gradient(135deg, #0369a1 0%, #0f172a 100%);
}

/* --------------------------------------------------------------------------
   2. Main Container & Page Layout
   -------------------------------------------------------------------------- */
.pmp-container {
  width: clamp(0rem, 100%, 82rem);
  margin: 1.5rem auto;
  padding: 0 1rem;
}

.pmp-container-narrow {
  max-width: 56.25rem;
}

.pmp-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.pmp-page-header> :first-child {
  flex: 1;
}

.pmp-header-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.pmp-page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--pmp-text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pmp-page-subtitle {
  font-size: 0.875rem;
  color: var(--pmp-text-muted);
  margin-top: 0.25rem;
}

/* --------------------------------------------------------------------------
   3. Top Header, Navigation & Brand
   -------------------------------------------------------------------------- */
.brand-icon {
  font-size: 1.85rem;
  color: var(--pmp-brand);
}

.brand-title {
  display: flex;
  flex-direction: column;
}

.brand-subtitle {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--pmp-text-muted);
  margin-top: -0.1875rem;
}

.nav-link-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: var(--pmp-text-secondary);
  transition: all 0.2s ease;
  text-decoration: none;
}

.nav-link-btn:hover {
  background: var(--pmp-surface-chip);
  color: var(--pmp-text-primary);
}

.nav-link-btn.active {
  background: var(--pmp-brand-container);
  color: var(--pmp-on-brand-container);
  font-weight: 600;
}

.profile-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--pmp-brand-container);
  color: var(--pmp-on-brand-container);
  padding: 0.15rem 0.5rem;
  border-radius: 9999rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.drawer-theme-icon {
  color: var(--pmp-brand);
}

.pmp-footer {
  margin-top: auto;
  border-top: 0.0625rem solid var(--pmp-border);
  background: var(--pmp-surface-header);
  padding: 1.25rem 0;
  color: var(--pmp-text-muted);
  font-size: 0.825rem;
}

/* --------------------------------------------------------------------------
   4. Executive Command-Center Dashboard Components
   -------------------------------------------------------------------------- */
.dashboard-container {
  width: 100%;
}

/* Dashboard Hero Card */
.dashboard-hero {
  background: var(--pmp-surface-card);
  border: 0.0625rem solid var(--pmp-border);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--pmp-shadow-sm);
}

.dashboard-hero-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.dashboard-hero-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--pmp-text-primary);
  margin: 0.25rem 0;
}

.dashboard-hero-subtitle {
  font-size: 0.875rem;
  color: var(--pmp-text-secondary);
  margin: 0;
}

.dashboard-hero-meta {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-wrap: wrap;
}

.dashboard-badge-role {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.75rem;
  border-radius: 2rem;
  background: var(--pmp-surface-variant);
  color: var(--pmp-text-primary);
  border: 0.0625rem solid var(--pmp-border);
}

.dashboard-badge-period {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: 2rem;
  background: var(--pmp-brand-container, #e0f2fe);
  color: var(--pmp-brand, #0284c7);
  border: 0.0625rem solid rgba(2, 132, 199, 0.2);
}

/* Top District Pulse Grid (Hero KPIs) */
.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.dashboard-kpi-card {
  background: var(--pmp-surface-card);
  border: 0.0625rem solid var(--pmp-border);
  border-radius: 0.75rem;
  padding: 1rem;
  display: flex;
  gap: 0.875rem;
  align-items: center;
  box-shadow: var(--pmp-shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.dashboard-kpi-card:hover {
  transform: translateY(-0.125rem);
  box-shadow: var(--pmp-shadow-md);
}

.dashboard-kpi-card.brand {
  border-left: 0.25rem solid var(--pmp-brand);
}

.dashboard-kpi-card.purple {
  border-left: 0.25rem solid var(--pmp-purple, #7c3aed);
}

.dashboard-kpi-card.success {
  border-left: 0.25rem solid var(--pmp-success);
}

.dashboard-kpi-card.warning {
  border-left: 0.25rem solid var(--pmp-warning);
}

.dashboard-kpi-card.danger {
  border-left: 0.25rem solid var(--pmp-danger);
}

.dashboard-kpi-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--pmp-surface-variant);
  color: var(--pmp-brand);
}

.dashboard-kpi-icon.purple {
  color: var(--pmp-purple, #7c3aed);
}

.dashboard-kpi-icon.success {
  color: var(--pmp-success);
}

.dashboard-kpi-icon.warning {
  color: var(--pmp-warning);
}

.dashboard-kpi-content {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dashboard-kpi-val {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--pmp-text-primary);
}

.dashboard-kpi-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--pmp-text-secondary);
  margin-top: 0.125rem;
}

.dashboard-kpi-sub {
  font-size: 0.75rem;
  color: var(--pmp-text-muted);
  margin-top: 0.125rem;
}

/* Critical Attention Deck */
.attention-deck-section {
  margin-bottom: 1.5rem;
}

.attention-deck-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.attention-deck-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--pmp-text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.attention-badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--pmp-danger);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.125rem 0.5rem;
  border-radius: 1rem;
}

.attention-deck-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.75rem;
}

.attention-card {
  border-radius: 0.75rem;
  padding: 1rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 7.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 0.0625rem solid transparent;
}

.attention-card:hover {
  transform: translateY(-0.125rem);
  box-shadow: var(--pmp-shadow-md);
}

.attention-card.danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.attention-card.warning {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.attention-card.vip {
  background: #faf5ff;
  border-color: #e9d5ff;
  color: #6b21a8;
}

.attention-card.info {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

.attention-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.attention-pulse-dot {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7);
  animation: attentionPulse 2s infinite;
}

@keyframes attentionPulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 0.5rem rgba(220, 38, 38, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
  }
}

.attention-card-count {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.attention-card-title {
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.3;
}

.attention-card-desc {
  font-size: 0.75rem;
  opacity: 0.85;
  margin-top: 0.25rem;
}

.attention-card-action {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  margin-top: 0.5rem;
}

/* Domain Deep-Dive Cards (2 Columns) */
.domain-deck-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(24rem, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.domain-card {
  background: var(--pmp-surface-card);
  border: 0.0625rem solid var(--pmp-border);
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: var(--pmp-shadow-sm);
}

.domain-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.75rem;
  border-bottom: 0.0625rem solid var(--pmp-border);
  margin-bottom: 1rem;
}

.domain-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--pmp-text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.domain-card-link {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--pmp-brand);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.domain-card-link:hover {
  text-decoration: underline;
}

.progress-track {
  height: 0.625rem;
  background: var(--pmp-surface-variant);
  border-radius: 1rem;
  overflow: hidden;
  display: flex;
  margin: 0.75rem 0;
}

.progress-segment {
  height: 100%;
  transition: width 0.3s ease;
}

.progress-segment.resolved {
  background: var(--pmp-success);
}

.progress-segment.processing {
  background: var(--pmp-warning);
}

.progress-segment.received {
  background: var(--pmp-danger);
}

.progress-segment.other {
  background: var(--pmp-text-muted);
}

.metric-kv-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.metric-kv-item {
  background: var(--pmp-surface-variant);
  border-radius: 0.5rem;
  padding: 0.625rem;
}

.metric-kv-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--pmp-text-secondary);
}

.metric-kv-val {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--pmp-text-primary);
  margin-top: 0.125rem;
}

/* Quick Action Launchpad */
.launchpad-section {
  margin-bottom: 1.5rem;
}

.launchpad-header {
  font-size: 1rem;
  font-weight: 700;
  color: var(--pmp-text-primary);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.launchpad-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.launchpad-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.125rem;
  background: var(--pmp-surface-card);
  border: 0.0625rem solid var(--pmp-border);
  border-radius: 2rem;
  color: var(--pmp-text-primary);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--pmp-shadow-sm);
  transition: all 0.2s ease;
}

.launchpad-pill:hover {
  border-color: var(--pmp-brand);
  color: var(--pmp-brand);
  transform: translateY(-0.125rem);
  box-shadow: var(--pmp-shadow-md);
}

.launchpad-pill .material-symbols-rounded {
  font-size: 1.125rem;
  color: var(--pmp-brand);
}

/* Recent Activity Tables */
.activity-feed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.activity-card {
  background: var(--pmp-surface-card);
  border: 0.0625rem solid var(--pmp-border);
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: var(--pmp-shadow-sm);
}

.activity-table-wrapper {
  overflow-x: auto;
}

.activity-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.activity-table th {
  text-align: left;
  padding: 0.5rem 0.625rem;
  border-bottom: 0.0625rem solid var(--pmp-border);
  color: var(--pmp-text-secondary);
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
}

.activity-table td {
  padding: 0.625rem;
  border-bottom: 0.0625rem solid var(--pmp-border);
  color: var(--pmp-text-primary);
  vertical-align: middle;
}

.activity-table tr:last-child td {
  border-bottom: none;
}

.card-header,
.card-content,
.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.card-content {
  flex-direction: column;
  gap: 0.5rem;
}

.center-content {
  display: flex;
  align-content: center;
  justify-content: space-evenly;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.module-icon-wrap {
  /*   width: 3.5rem;
  height: 3.5rem; */
  border-radius: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.module-icon-wrap.grievance {
  background: var(--pmp-danger-container);
  color: var(--pmp-danger);
}

.module-icon-wrap.mis {
  background: var(--pmp-brand-container);
  color: var(--pmp-brand);
}

.module-icon-wrap.schools {
  background: var(--pmp-warning-container);
  color: var(--pmp-warning);
}

.module-icon-wrap.profile {
  background: var(--pmp-brand-container);
  color: var(--pmp-brand);
}

.module-icon-wrap.admin {
  background: var(--pmp-purple-container);
  color: var(--pmp-purple);
}

.module-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--pmp-text-primary);
  display: flex;
  gap: 1rem;
}

.module-desc {
  font-size: 0.9rem;
  color: var(--pmp-text-muted);
  line-height: 1.45;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.module-action-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--pmp-brand);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.module-action-link.is-muted {
  color: var(--pmp-text-muted);
}

/* --------------------------------------------------------------------------
   5. Hero & Welcome Header
   -------------------------------------------------------------------------- */
.welcome-hero-card {
  background: var(--pmp-hero-gradient);
  color: #ffffff;
  border: none;
  padding: 2rem;
  border-radius: 1rem;
  margin-bottom: 2rem;
  box-shadow: var(--pmp-shadow-md);
}

.welcome-hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.25rem 0.75rem;
  border-radius: 9999rem;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.welcome-hero-title {
  font-size: 1.85rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
  color: #ffffff;
}

.welcome-hero-desc {
  opacity: 0.9;
  font-size: 0.95rem;
  max-width: 40.625rem;
  color: #ffffff;
}

.welcome-hero-role-box {
  text-align: right;
  background: rgba(255, 255, 255, 0.15);
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
  backdrop-filter: blur(0.25rem);
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   6. Status Badges & Chips
   -------------------------------------------------------------------------- */
.status-badge,
.status-badge-resolved,
.status-badge-pending,
.status-badge-action-required,
.status-badge-draft {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 9999rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.status-badge.received {
  background-color: var(--pmp-warning-container);
  color: var(--pmp-on-warning-container);
}

.status-badge.processing {
  background-color: var(--pmp-brand-container);
  color: var(--pmp-on-brand-container);
}

.status-badge.resolved,
.status-badge-resolved {
  background-color: var(--pmp-success-container);
  color: var(--pmp-on-success-container);
}

.status-badge.out-of-jurisdiction {
  background-color: var(--pmp-surface-chip);
  color: var(--pmp-text-secondary);
}

.status-badge.attention-over {
  background-color: var(--pmp-purple-container);
  color: var(--pmp-on-purple-container);
  border: 0.0625rem solid var(--pmp-purple-border);
}

.status-badge.pending,
.status-badge-pending {
  background-color: var(--pmp-warning-container);
  color: var(--pmp-on-warning-container);
}

.status-badge.action-required,
.status-badge-action-required {
  background-color: var(--pmp-danger-container);
  color: var(--pmp-on-danger-container);
}

.status-badge.draft,
.status-badge-draft {
  background-color: var(--pmp-surface-chip);
  color: var(--pmp-text-muted);
}

.mis-stage-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 0.0625rem solid var(--pmp-border);
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.mis-stage-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--pmp-text-muted);
  border-bottom: 0.125rem solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.mis-stage-tab.active {
  color: var(--pmp-brand);
  border-bottom-color: var(--pmp-brand);
}

.pmp-chip {
  font-size: 0.8rem;
  background: var(--pmp-surface-chip);
  color: var(--pmp-text-secondary);
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   7. KPI Summary Cards
   -------------------------------------------------------------------------- */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.kpi-card>div:last-child {
  min-width: 0;
  flex: 1;
  width: 100%;
}

.kpi-card {
  background: var(--pmp-surface-card);
  border: 0.0625rem solid var(--pmp-border);
  border-radius: 0.75rem;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--pmp-shadow-sm);
}

.kpi-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.kpi-card.total .kpi-icon {
  background: var(--pmp-surface-chip);
  color: var(--pmp-text-secondary);
}

.kpi-card.received .kpi-icon {
  background: var(--pmp-warning-container);
  color: var(--pmp-warning);
}

.kpi-card.processing .kpi-icon {
  background: var(--pmp-brand-container);
  color: var(--pmp-brand);
}

.kpi-card.resolved .kpi-icon {
  background: var(--pmp-success-container);
  color: var(--pmp-success);
}

.kpi-card.attention .kpi-icon {
  background: var(--pmp-purple-container);
  color: var(--pmp-purple);
}

.kpi-card.critical .kpi-icon {
  background: var(--pmp-danger-container);
  color: var(--pmp-danger);
}

.kpi-card.zero .kpi-icon {
  background: var(--pmp-surface-chip);
  color: var(--pmp-text-muted);
}

a.kpi-card {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

a.kpi-card:hover {
  transform: translateY(-0.125rem);
  box-shadow: var(--pmp-shadow-md);
}

.kpi-card.active {
  border-width: 0.125rem;
  box-shadow: var(--pmp-shadow-md);
}

.kpi-card.attention.active {
  border-color: var(--pmp-purple);
  background: var(--pmp-purple-container);
}

.kpi-card.resolved.active {
  border-color: var(--pmp-success);
  background: var(--pmp-success-container);
}

.kpi-card.received.active {
  border-color: var(--pmp-warning);
  background: var(--pmp-warning-container);
}

.kpi-card.critical.active {
  border-color: var(--pmp-danger);
  background: var(--pmp-danger-container);
}

.kpi-card.zero.active {
  border-color: var(--pmp-border);
  background: var(--pmp-surface-chip);
}

.kpi-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--pmp-text-primary);
  line-height: 1;
}

.kpi-label {
  font-size: 0.8rem;
  color: var(--pmp-text-muted);
  margin-top: 0.25rem;
}

.kpi-sub {
  font-size: 0.75rem;
  color: var(--pmp-text-muted);
  margin-top: 0.2rem;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
  line-height: 1.35;
}

/* --------------------------------------------------------------------------
   8. Cards & Tables
   -------------------------------------------------------------------------- */
.pmp-card {
  background: var(--pmp-surface-card);
  border: 0.0625rem solid var(--pmp-border);
  border-radius: 0.75rem;
  box-shadow: var(--pmp-shadow-sm);
  overflow: hidden;
  margin-bottom: 1.5rem;
  padding: 1.25rem 1.5rem;
}

.pmp-card.filter-card,
.pmp-card.has-dropdowns,
.pmp-card:has(.md3-select-wrapper) {
  overflow: visible;
}


.pmp-card-header {
  padding: 1rem 1.25rem;
  border-bottom: 0.0625rem solid var(--pmp-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--pmp-surface-header);
  color: var(--accent-iris-dark);
}

.pmp-card-header-title {
  font-weight: 700;
  color: var(--pmp-text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pmp-card-body {
  padding: 1.25rem;
}

.pmp-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

.pmp-table th {
  background: var(--pmp-surface-header);
  color: var(--pmp-text-secondary);
  font-weight: 600;
  padding: 0.75rem 1rem;
  border-bottom: 0.0625rem solid var(--pmp-border);
}

.pmp-table td {
  padding: 0.85rem 1rem;
  border-bottom: 0.0625rem solid var(--pmp-border);
  color: var(--pmp-text-primary);
  vertical-align: middle;
}

.pmp-table tbody tr:hover {
  background: var(--pmp-surface-hover);
}

.pmp-table tfoot {
  background: var(--pmp-surface-header);
  border-top: 0.125rem solid var(--pmp-border);
}

.pmp-table tfoot td {
  padding: 0.85rem 1rem;
  border-top: 0.125rem solid var(--pmp-border);
  border-bottom: none;
  font-weight: 700;
  vertical-align: middle;
}


.empty-state-cell {
  text-align: center;
  padding: 2.5rem;
  color: var(--pmp-text-subtle);
}

/* --------------------------------------------------------------------------
   9. Timeline Components
   -------------------------------------------------------------------------- */
.timeline-list {
  position: relative;
  padding-left: 2rem;
  margin: 1.5rem 0;
}

.timeline-list::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0.85rem;
  width: 0.125rem;
  background: var(--pmp-border);
}

.timeline-item {
  position: relative;
  margin-bottom: 1.75rem;
}

.timeline-dot {
  position: absolute;
  left: -2rem;
  top: 0.25rem;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--pmp-brand);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  box-shadow: 0 0 0 0.25rem var(--pmp-surface-card);
}

.timeline-dot.brand {
  background: var(--brand-grad);
}

.timeline-dot.success {
  background: var(--pmp-success);
}

.timeline-dot.resolved {
  background: var(--pmp-success);
}

.timeline-dot.warning {
  background: var(--pmp-warning);
}

.timeline-content {
  background: var(--pmp-surface-header);
  border: 0.0625rem solid var(--pmp-border);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.timeline-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--pmp-text-primary);
}

.timeline-meta {
  font-size: 0.8rem;
  color: var(--pmp-text-muted);
}

.timeline-body {
  font-size: 0.875rem;
  color: var(--pmp-text-secondary);
  line-height: 1.5;
}

.memo-tag {
  display: inline-block;
  background: var(--pmp-surface-chip);
  color: var(--pmp-text-primary);
  padding: 0.15rem 0.5rem;
  border-radius: 0.25rem;
  font-family: monospace;
  font-weight: 600;
  font-size: 0.8rem;
}

/* --------------------------------------------------------------------------
   10. Forms & Input Controls (Streamlined, Unified Heights & Responsive Units)
   -------------------------------------------------------------------------- */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17.5rem, 1fr));
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--pmp-text-secondary);
}

.form-control,
.form-select,
input[type='text'],
input[type='date'],
input[type='email'],
input[type='password'],
input[type='number'],
input[type='search'],
input[type='tel'] {
  display: inline-flex;
  align-items: center;
  width: 100%;
  max-width: 100%;
  min-height: 2.375rem;
  height: 2.375rem;
  padding: 0.45rem 0.75rem;
  border: 0.0625rem solid var(--pmp-border);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.35;
  color: var(--pmp-text-primary);
  background-color: var(--pmp-surface-page);
  outline: none;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

/* Date inputs - normalized height and light/dark color scheme */
input[type='date'] {
  padding: 0.35rem 0.75rem;
  color-scheme: light dark;
}

.form-control:focus,
.form-select:focus,
input[type='text']:focus,
input[type='date']:focus,
input[type='email']:focus,
input[type='password']:focus,
input[type='number']:focus,
input[type='search']:focus,
input[type='tel']:focus,
.form-textarea:focus {
  border-color: var(--pmp-brand);
  box-shadow: 0 0 0 0.1875rem rgba(2, 132, 199, 0.2);
}

.form-textarea {
  width: 100%;
  min-height: 6.25rem;
  padding: 0.65rem 0.85rem;
  border: 0.0625rem solid var(--pmp-border);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--pmp-text-primary);
  background-color: var(--pmp-surface-page);
  outline: none;
  font-family: inherit;
  box-sizing: border-box;
  resize: vertical;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control-sm,
input[type='date'].form-control-sm,
.form-select.form-control-sm {
  min-height: 1.875rem;
  height: 1.875rem;
  padding: 0.2rem 0.5rem;
  font-size: 0.8125rem;
}

.form-select {
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: 100%;
}

.file-upload-box {
  background: var(--pmp-surface-header);
  border: 0.0625rem dashed var(--pmp-border);
  border-radius: 0.75rem;
  padding: 1.25rem;
}

/* Inputs with left/right inline icons */
.form-control-with-icon,
.form-control.form-control-with-icon,
input[type='text'].form-control-with-icon,
input[type='search'].form-control-with-icon,
input[type='email'].form-control-with-icon,
input[type='password'].form-control-with-icon,
input[type='number'].form-control-with-icon,
input[type='tel'].form-control-with-icon,
input.form-control-with-icon {
  width: 100%;
  box-sizing: border-box;
  padding-left: 2.375rem !important;
}

.input-icon-left {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--pmp-text-muted, var(--pmp-text-subtle));
  font-size: 1.2rem;
  line-height: 1;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.form-control-with-icon-right,
.form-control.form-control-with-icon-right,
input.form-control-with-icon-right {
  padding-right: 2.375rem !important;
}

.input-icon-right {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--pmp-text-muted, var(--pmp-text-subtle));
  font-size: 1.2rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

/* --------------------------------------------------------------------------
   11. Buttons (Streamlined Dimensions, Harmonious Icons, Back Links)
   -------------------------------------------------------------------------- */
.btn-primary,
.btn-secondary,
.btn-back,
.btn-outline,
.btn-danger-outline,
.btn-success {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.375rem;
  height: 2.375rem;
  padding: 0.45rem 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.35;
  gap: 0.4rem;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
  font-family: inherit;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

/* Ensure icons inside all buttons have identical, harmonious sizing */
.btn-primary .material-symbols-rounded,
.btn-secondary .material-symbols-rounded,
.btn-back .material-symbols-rounded,
.btn-outline .material-symbols-rounded,
.btn-danger-outline .material-symbols-rounded,
.btn-success .material-symbols-rounded {
  font-size: 1.125rem;
  width: 1.125rem;
  height: 1.125rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--pmp-brand);
  color: #ffffff;
  border: 0.0625rem solid transparent;
}

.btn-primary:hover {
  background: var(--pmp-brand-hover);
  color: #ffffff;
}

.btn-secondary,
.btn-back {
  background: var(--pmp-surface-chip);
  color: var(--pmp-text-secondary);
  border: 0.0625rem solid var(--pmp-border);
}

.btn-secondary:hover,
.btn-back:hover {
  background: var(--pmp-surface-hover);
  color: var(--pmp-text-primary);
  border-color: var(--pmp-brand);
}

.btn-danger-outline {
  background: transparent;
  color: var(--pmp-danger);
  border: 0.0625rem solid var(--pmp-danger-border);
}

.btn-danger-outline:hover {
  background: var(--pmp-danger-container);
  color: var(--pmp-on-danger-container);
}

.btn-success {
  background: var(--pmp-success);
  color: #ffffff;
  border: 0.0625rem solid transparent;
}

.btn-success:hover {
  background: var(--pmp-success-hover);
  color: #ffffff;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.btn-sm {
  min-height: 1.875rem;
  height: 1.875rem;
  padding: 0.25rem 0.625rem;
  font-size: 0.8125rem;
  gap: 0.3rem;
}

.btn-sm .material-symbols-rounded {
  font-size: 0.95rem;
  width: 0.95rem;
  height: 0.95rem;
}

/* --------------------------------------------------------------------------
   11b. Material Design 3 (M3) Reusable Split Button Component (Pure CSS)
   -------------------------------------------------------------------------- */
.m3-split-button {
  display: inline-flex;
  align-items: stretch;
  vertical-align: middle;
  position: relative;
  border-radius: var(--pmp-radius-full, 624.9375rem);
  box-shadow: var(--pmp-shadow-sm, 0 0.0625rem 0.125rem 0 rgba(0, 0, 0, 0.05));
  font-family: inherit;
  box-sizing: border-box;
}

/* Base button reset for split button segments */
.m3-split-button-main,
.m3-split-button-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.375rem;
  min-height: 2.375rem;
  background: var(--pmp-brand, #0284c7);
  color: #ffffff;
  border: none;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  box-sizing: border-box;
  text-decoration: none;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  user-select: none;
  -webkit-user-select: none;
}

/* Leading Main Action Button */
.m3-split-button-main {
  padding: 0 1rem 0 1.15rem;
  border-top-left-radius: var(--pmp-radius-full, 624.9375rem);
  border-bottom-left-radius: var(--pmp-radius-full, 624.9375rem);
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: 0.0625rem solid rgba(255, 255, 255, 0.28);
  gap: 0.45rem;
}

.m3-split-button-main .material-symbols-rounded {
  font-size: 1.15rem;
  width: 1.15rem;
  height: 1.15rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.m3-split-button-main:hover,
.m3-split-button-main:focus-visible {
  background: var(--pmp-brand-hover, #0369a1);
  outline: none;
}

/* Trailing Dropdown Anchor */
.m3-split-button-dropdown {
  position: relative;
  display: inline-flex;
  outline: none;
}

.m3-split-button-toggle {
  padding: 0 0.5rem;
  min-width: 2.25rem;
  border-top-right-radius: var(--pmp-radius-full, 624.9375rem);
  border-bottom-right-radius: var(--pmp-radius-full, 624.9375rem);
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  list-style: none;
  /* for <summary> */
}

/* Remove default summary marker in Safari / WebKit / Firefox */
.m3-split-button-toggle::-webkit-details-marker,
.m3-split-button-toggle::marker {
  display: none;
}

.m3-split-button-toggle:hover,
.m3-split-button-toggle:focus-visible,
.m3-split-button-dropdown:focus-within .m3-split-button-toggle,
details.m3-split-button-dropdown[open] .m3-split-button-toggle {
  background: var(--pmp-brand-hover, #0369a1);
  outline: none;
}

/* Trailing Chevron Icon with Smooth Rotation */
.m3-split-button-toggle .material-symbols-rounded {
  font-size: 1.25rem;
  width: 1.25rem;
  height: 1.25rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.m3-split-button-dropdown:focus-within .m3-split-button-toggle .material-symbols-rounded,
details.m3-split-button-dropdown[open] .m3-split-button-toggle .material-symbols-rounded {
  transform: rotate(180deg);
}

/* Invisible full-viewport backdrop to dismiss dropdown on outside click */
details.m3-split-button-dropdown[open]>.m3-split-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1045;
  background: transparent;
  cursor: default;
}

/* M3 Floating Menu (Click to Reveal) */
.m3-split-menu {
  position: absolute;
  top: calc(100% + 0.375rem);
  right: 0;
  min-width: 13.5rem;
  background: var(--pmp-surface-card, #ffffff);
  border: 0.0625rem solid var(--pmp-border, #e2e8f0);
  border-radius: 0.75rem;
  box-shadow: var(--pmp-shadow-lg, 0 0.625rem 0.9375rem -0.1875rem rgba(0, 0, 0, 0.1), 0 0.25rem 0.375rem -0.25rem rgba(0, 0, 0, 0.1));
  padding: 0.375rem;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-0.375rem) scale(0.97);
  pointer-events: none;
  transform-origin: top right;
  transition: opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.15s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0.15s;
}

/* Invisible bridge preventing cursor gap drop */
.m3-split-menu::before {
  content: '';
  position: absolute;
  top: -0.5rem;
  left: 0;
  right: 0;
  height: 0.5rem;
}

/* Click reveal via native <details open> or active :focus-within (never on hover) */
.m3-split-button-dropdown:focus-within .m3-split-menu,
details.m3-split-button-dropdown[open] .m3-split-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Menu Items */
.m3-split-menu-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  padding: 0.625rem 0.875rem;
  background: transparent;
  border: none;
  border-radius: 0.5rem;
  color: var(--pmp-text-primary, #0f172a);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
  transition: background-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.m3-split-menu-item .material-symbols-rounded {
  font-size: 1.15rem;
  width: 1.15rem;
  height: 1.15rem;
  line-height: 1;
  color: var(--pmp-brand, #0284c7);
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.m3-split-menu-item:hover,
.m3-split-menu-item:focus-visible {
  background: var(--pmp-surface-hover, #f1f5f9);
  color: var(--pmp-brand, #0284c7);
  outline: none;
}

/* M3 Split Button Variants: Tonal / Secondary */
.m3-split-button.tonal .m3-split-button-main,
.m3-split-button.tonal .m3-split-button-toggle {
  background: var(--pmp-brand-container, #e0f2fe);
  color: var(--pmp-on-brand-container, #0369a1);
}

.m3-split-button.tonal .m3-split-button-main {
  border-right-color: rgba(3, 105, 161, 0.2);
}

.m3-split-button.tonal .m3-split-button-main:hover,
.m3-split-button.tonal .m3-split-button-toggle:hover,
.m3-split-button.tonal .m3-split-button-dropdown:focus-within .m3-split-button-toggle,
.m3-split-button.tonal details.m3-split-button-dropdown[open] .m3-split-button-toggle {
  background: #bae6fd;
}

/* M3 Split Button Variants: Outlined */
.m3-split-button.outlined {
  box-shadow: none;
}

.m3-split-button.outlined .m3-split-button-main,
.m3-split-button.outlined .m3-split-button-toggle {
  background: var(--pmp-surface-card, #ffffff);
  color: var(--pmp-brand, #0284c7);
  border: 0.0625rem solid var(--pmp-border, #e2e8f0);
}

.m3-split-button.outlined .m3-split-button-main {
  border-right: none;
}

.m3-split-button.outlined .m3-split-button-main:hover,
.m3-split-button.outlined .m3-split-button-toggle:hover,
.m3-split-button.outlined .m3-split-button-dropdown:focus-within .m3-split-button-toggle,
.m3-split-button.outlined details.m3-split-button-dropdown[open] .m3-split-button-toggle {
  background: var(--pmp-surface-hover, #f1f5f9);
}

/* --------------------------------------------------------------------------
   12. Auth Components & Modals
   -------------------------------------------------------------------------- */
.auth-container {
  max-width: 27.5rem;
  margin: 3.5rem auto;
}

.auth-card {
  box-shadow: var(--pmp-shadow-md);
  border-radius: 1.25rem;
  background: var(--pmp-surface-card);
  border: 0.0625rem solid var(--pmp-border);
}

.auth-header {
  padding: 2rem 1.75rem 1.25rem;
  text-align: center;
  border-bottom: 0.0625rem solid var(--pmp-border);
}

.auth-avatar-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 1rem;
  background: var(--pmp-brand-container);
  color: var(--pmp-brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.auth-avatar-icon.large {
  width: 5rem;
  height: 5rem;
  border-radius: 1.25rem;
  margin-bottom: 1.5rem;
}

.auth-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--pmp-text-primary);
  margin-bottom: 0.25rem;
}

.auth-subtitle {
  font-size: 0.85rem;
  color: var(--pmp-text-muted);
}

.auth-body {
  padding: 1.75rem;
}

.auth-gis-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.auth-switch-text {
  font-size: 0.75rem;
  color: var(--pmp-text-muted);
}

.auth-divider {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
  width: 100%;
}

.auth-divider-line {
  flex: 1;
  height: 0.0625rem;
  background: var(--pmp-border);
}

.auth-divider-text {
  padding: 0 0.75rem;
  font-size: 0.75rem;
  color: var(--pmp-text-subtle);
  text-transform: uppercase;
}

.auth-demo-credentials {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 0.0625rem dashed var(--pmp-border);
  font-size: 0.8rem;
  color: var(--pmp-text-muted);
  text-align: center;
}

/* Modal Dialogs */
.auth-modal-dialog {
  max-width: 27.5rem;
  background: var(--pmp-surface-card);
  border-radius: 1.5rem;
  padding: 1.75rem;
  box-shadow: var(--pmp-shadow-lg);
  position: relative;
  border: 0.0625rem solid var(--pmp-border);
}

.auth-modal-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.auth-modal-icon.login {
  background: var(--pmp-brand-container);
  color: var(--pmp-brand);
}

.auth-modal-icon.logout {
  background: var(--pmp-danger-container);
  color: var(--pmp-danger);
}

.user-summary-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--pmp-surface-chip);
  border: 0.0625rem solid var(--pmp-border);
  border-radius: 0.75rem;
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
}

.user-summary-avatar {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  object-fit: cover;
  border: 0.125rem solid var(--pmp-brand);
}

.user-summary-avatar-fallback {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--pmp-brand);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.user-summary-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--pmp-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-summary-email {
  font-size: 0.8rem;
  color: var(--pmp-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-summary-role {
  font-size: 0.75rem;
  color: var(--pmp-brand);
  font-weight: 600;
  text-transform: uppercase;
  margin-top: 0.15rem;
}

/* --------------------------------------------------------------------------
   13. Semantic Utilities
   -------------------------------------------------------------------------- */
.text-primary {
  color: var(--pmp-text-primary);
}

.text-secondary {
  color: var(--pmp-text-secondary);
}

.text-muted {
  color: var(--pmp-text-muted);
}

.text-subtle {
  color: var(--pmp-text-subtle);
}

.text-brand {
  color: var(--pmp-brand);
}

.text-success {
  color: var(--pmp-success);
}

.text-warning {
  color: var(--pmp-warning);
}

.text-danger {
  color: var(--pmp-danger);
}

.icon-brand {
  color: var(--accent-iris-dark);
}

.icon-success {
  color: var(--pmp-success);
}

.icon-warning {
  color: var(--pmp-warning);
}

.icon-danger {
  color: var(--pmp-danger);
}

.icon-muted {
  color: var(--pmp-text-muted);
}

.text-mono {
  font-family: monospace;
  font-weight: 700;
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.cell-wrap {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
}

.pmp-table th.text-left,
.pmp-table td.text-left {
  text-align: left;
}

.pmp-table th.text-right,
.pmp-table td.text-right {
  text-align: right;
}

.pmp-table th.text-center,
.pmp-table td.text-center {
  text-align: center;
}

.pmp-table th.cell-wrap,
.pmp-table td.cell-wrap {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
}

/* Export Modal Option Card */
.export-option-card {
  display: flex;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border: 0.0625rem solid var(--pmp-border);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--pmp-surface-card);
}

.export-option-card:hover {
  border-color: var(--pmp-brand);
  background: var(--pmp-surface-hover);
}

.export-option-card input[type="radio"]:checked+div {
  color: var(--pmp-text-primary);
}


.text-right {
  text-align: right;
}

.font-semibold {
  font-weight: 600;
}

.font-bold {
  font-weight: 700;
}

.text-xs {
  font-size: 0.75rem;
}

.text-sm {
  font-size: 0.875rem;
}

.link-brand {
  color: var(--pmp-brand);
  font-weight: 600;
  text-decoration: none;
}

.link-brand:hover {
  text-decoration: underline;
}

code {
  background: var(--pmp-surface-chip);
  color: var(--pmp-brand);
  border: 0.0625rem solid var(--pmp-border);
  padding: 0.15rem 0.35rem;
  border-radius: 0.25rem;
  font-family: monospace;
}

/* --------------------------------------------------------------------------
   Drawer Navigation Active State (Light & Dark Mode) - Soft UI Palette
   -------------------------------------------------------------------------- */
.drawer-nav-item.is-active {
  background: var(--accent-iris-light, #ece7fd) !important;
  color: var(--accent-iris-deep, #7755e8) !important;
  font-weight: 700 !important;
  border-radius: 0.75rem !important;
  box-shadow: none !important;
  transform: translateX(0.1875rem);
}

.drawer-nav-item.is-active .nav-icon {
  color: var(--accent-iris-deep, #7755e8) !important;
  font-variation-settings: 'FILL' 1;
}

[data-theme="dark"] .drawer-nav-item.is-active,
.theme-dark .drawer-nav-item.is-active,
[data-theme-resolved="dark"] .drawer-nav-item.is-active {
  background: var(--accent-iris-light, rgba(167, 139, 250, 0.18)) !important;
  color: var(--accent-iris, #a78bfa) !important;
  box-shadow: none !important;
}

[data-theme="dark"] .drawer-nav-item.is-active .nav-icon,
.theme-dark .drawer-nav-item.is-active .nav-icon,
[data-theme-resolved="dark"] .drawer-nav-item.is-active .nav-icon {
  color: var(--accent-iris, #a78bfa) !important;
}

/* --------------------------------------------------------------------------
   Action Engine, Multi-Recipient Forwarding & Compliance Tracking Styles
   -------------------------------------------------------------------------- */
.action-group-banner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.85rem;
  border-radius: 0.5rem;
  font-size: 0.82rem;
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
  background: var(--pmp-surface-hover);
  border: 0.0625rem solid var(--pmp-border);
  color: var(--pmp-text-secondary);
}

.action-group-banner.group-forward {
  background: var(--pmp-brand-container);
  color: var(--pmp-on-brand-container);
  border-color: var(--pmp-brand);
}

.action-group-banner.group-response {
  background: var(--pmp-success-container);
  color: var(--pmp-on-success-container);
  border-color: var(--pmp-success);
}

.action-group-banner.group-final {
  background: var(--pmp-purple-container);
  color: var(--pmp-on-purple-container);
  border-color: var(--pmp-purple-border);
}

/* Multi-Recipient Container */
.recipients-wrapper {
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.85rem;
  background: var(--pmp-surface-hover);
  border: 0.0625rem solid var(--pmp-border);
  border-radius: 0.65rem;
}

.recipient-entry-card {
  background: var(--pmp-surface-card);
  border: 0.0625rem solid var(--pmp-border);
  border-radius: 0.5rem;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
  transition: box-shadow 0.15s ease;
}

.recipient-entry-card:last-child {
  margin-bottom: 0;
}

.recipient-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.recipient-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--pmp-brand);
  background: var(--pmp-brand-container);
  padding: 0.2rem 0.55rem;
  border-radius: 0.35rem;
}

.btn-icon-danger {
  background: transparent;
  border: none;
  color: var(--pmp-danger);
  cursor: pointer;
  padding: 0.2rem;
  border-radius: 0.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.btn-icon-danger:hover {
  background: var(--pmp-danger-container);
}

.form-label-xs {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--pmp-text-secondary);
  margin-bottom: 0.25rem;
}

.form-control-sm {
  font-size: 0.82rem;
  padding: 0.4rem 0.6rem;
}

.form-textarea-sm {
  font-size: 0.82rem;
  padding: 0.4rem 0.6rem;
  min-height: 3rem;
}

/* Offices Forwarded & Compliance Tracking Section */
.compliance-tracker-card {
  background: var(--pmp-surface-card);
  border: 0.0625rem solid var(--pmp-border);
  border-radius: 0.75rem;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.compliance-header {
  padding: 0.85rem 1.25rem;
  border-bottom: 0.0625rem solid var(--pmp-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.compliance-stats-row {
  display: flex;
  gap: 0.5rem;
}

.compliance-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 9999rem;
}

.compliance-stat-chip.total {
  background: var(--pmp-neutral-container);
  color: var(--pmp-neutral-text);
}

.compliance-stat-chip.pending {
  background: var(--pmp-warning-container);
  color: var(--pmp-on-warning-container);
}

.compliance-stat-chip.received {
  background: var(--pmp-success-container);
  color: var(--pmp-on-success-container);
}

.compliance-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
}

.compliance-table th {
  background: var(--pmp-surface-hover);
  color: var(--pmp-text-secondary);
  font-weight: 600;
  text-align: left;
  padding: 0.6rem 1rem;
  border-bottom: 0.0625rem solid var(--pmp-border);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.compliance-table td {
  padding: 0.75rem 1rem;
  border-bottom: 0.0625rem solid var(--pmp-border);
  vertical-align: top;
  color: var(--pmp-text-primary);
}

.compliance-table tr:last-child td {
  border-bottom: none;
}

/* Dedicated Out of Jurisdiction Card */
.out-of-jurisdiction-card {
  background: var(--pmp-surface-card);
  border: 0.0625rem solid rgba(220, 38, 38, 0.25);
  border-left: 0.25rem solid var(--pmp-danger);
  border-radius: 0.75rem;
  margin-bottom: 1.25rem;
  overflow: hidden;
}

.out-of-jurisdiction-header {
  padding: 0.85rem 1rem;
  background: var(--pmp-danger-container);
  color: var(--pmp-on-danger-container);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.out-of-jurisdiction-body {
  padding: 1rem;
}

/* Focus Pulse Animation */
@keyframes highlightGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(2, 132, 199, 0.5);
  }

  50% {
    box-shadow: 0 0 0 0.5rem rgba(2, 132, 199, 0.2);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(2, 132, 199, 0);
  }
}

.highlight-pulse {
  animation: highlightGlow 1.2s ease-in-out;
}

/* --------------------------------------------------------------------------
   School Searchbox & Autocomplete Component
   -------------------------------------------------------------------------- */
.school-search-wrapper {
  position: relative;
  width: 100%;
}

.school-search-input-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.school-search-input-box .search-icon {
  position: absolute;
  left: 0.75rem;
  color: var(--pmp-text-muted);
  pointer-events: none;
  font-size: 1.25rem;
}

.school-search-input {
  padding-left: 2.5rem !important;
  padding-right: 2.5rem !important;
  width: 100%;
}

.school-clear-btn {
  position: absolute;
  right: 0.75rem;
  background: transparent;
  border: none;
  color: var(--pmp-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem;
  border-radius: 50%;
  transition: all 0.15s ease;
}

.school-clear-btn:hover {
  background: var(--pmp-surface-hover);
  color: var(--pmp-text-primary);
}

.school-results-dropdown {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  background: var(--pmp-surface-card);
  border: 0.0625rem solid var(--pmp-border);
  border-radius: 0.65rem;
  box-shadow: var(--pmp-shadow-md);
  z-index: 100;
  max-height: 20rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.school-results-list {
  overflow-y: auto;
  max-height: 16.875rem;
}

.school-result-item {
  padding: 0.7rem 1rem;
  border-bottom: 0.0625rem solid var(--pmp-border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  transition: background-color 0.12s ease;
}

.school-result-item:last-child {
  border-bottom: none;
}

.school-result-item:hover,
.school-result-item.is-active-item {
  background-color: var(--pmp-surface-hover);
}

.school-result-name {
  font-weight: 600;
  color: var(--pmp-text-primary);
  font-size: 0.88rem;
  margin-bottom: 0.2rem;
}

.school-result-meta {
  font-size: 0.75rem;
  color: var(--pmp-text-secondary);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.school-result-dise-badge {
  font-family: monospace;
  font-weight: 700;
  background: var(--pmp-brand-container);
  color: var(--pmp-on-brand-container);
  padding: 0.15rem 0.45rem;
  border-radius: 0.3rem;
  font-size: 0.78rem;
  white-space: nowrap;
}

.search-highlight {
  background-color: var(--pmp-warning-container);
  color: var(--pmp-on-warning-container);
  border-radius: 0.15rem;
  padding: 0 0.15rem;
  font-weight: 700;
}

.school-results-footer {
  padding: 0.5rem 0.85rem;
  background: var(--pmp-surface-hover);
  border-top: 0.0625rem solid var(--pmp-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-text-sm {
  background: transparent;
  border: none;
  color: var(--pmp-brand);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
}

.btn-text-sm:hover {
  text-decoration: underline;
}

/* Selected School Display Card */
.selected-school-card {
  margin-top: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--pmp-surface-card);
  border: 0.0625rem solid var(--pmp-brand);
  border-left: 0.25rem solid var(--pmp-brand);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  animation: fadeIn 0.2s ease-in-out;
}

.selected-school-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.selected-school-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.92rem;
  color: var(--pmp-text-primary);
}

.selected-school-meta {
  font-size: 0.78rem;
  color: var(--pmp-text-secondary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-0.25rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --------------------------------------------------------------------------
   Central Generic Modal Dialog Service Styles
   -------------------------------------------------------------------------- */
.central-modal-container {
  background: var(--pmp-surface-card);
  border: 0.0625rem solid var(--pmp-border);
  border-radius: 1rem;
  box-shadow: var(--pmp-shadow-lg);
  width: 92%;
  max-width: 33.75rem;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalScaleUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleUp {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.central-modal-header {
  padding: 1.15rem 1.25rem;
  border-bottom: 0.0625rem solid var(--pmp-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--pmp-surface-header);
}

.central-modal-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.central-modal-icon-badge {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.central-modal-icon-badge.brand {
  background: var(--pmp-brand-container);
  color: var(--pmp-brand);
}

.central-modal-icon-badge.warning {
  background: var(--pmp-warning-container);
  color: var(--pmp-warning);
}

.central-modal-icon-badge.danger {
  background: var(--pmp-danger-container);
  color: var(--pmp-danger);
}

.central-modal-icon-badge.success {
  background: var(--pmp-success-container);
  color: var(--pmp-success);
}

.central-modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--pmp-text-primary);
  margin: 0;
  line-height: 1.3;
}

.central-modal-subtitle {
  font-size: 0.8rem;
  color: var(--pmp-text-secondary);
  margin: 0.15rem 0 0 0;
}

.central-modal-close-btn {
  background: transparent;
  border: none;
  color: var(--pmp-text-muted);
  cursor: pointer;
  padding: 0.35rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.central-modal-close-btn:hover {
  background: var(--pmp-surface-hover);
  color: var(--pmp-text-primary);
}

.central-modal-body {
  padding: 1.25rem;
  overflow-y: auto;
  flex: 1;
}

.central-modal-footer {
  padding: 0.85rem 1.25rem;
  border-top: 0.0625rem solid var(--pmp-border);
  background: var(--pmp-surface-header);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Complainant Profile Modal Content */
.complainant-modal-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.complainant-profile-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem;
  background: var(--pmp-surface-hover);
  border: 0.0625rem solid var(--pmp-border);
  border-radius: 0.75rem;
}

.complainant-avatar-box {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: var(--pmp-brand-container);
  color: var(--pmp-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  flex-shrink: 0;
}

.complainant-profile-details {
  flex: 1;
}

.complainant-profile-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--pmp-text-primary);
  margin: 0 0 0.25rem 0;
}

.complainant-profile-identity {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.complainant-identity-tag {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 0.35rem;
}

.complainant-identity-tag.badge-brand {
  background: var(--pmp-brand-container);
  color: var(--pmp-on-brand-container);
}

.complainant-identity-tag.badge-warning {
  background: var(--pmp-warning-container);
  color: var(--pmp-on-warning-container);
}

.complainant-identity-tag.badge-purple {
  background: var(--pmp-purple-container);
  color: var(--pmp-on-purple-container);
  border: 0.0625rem solid var(--pmp-purple-border);
}

.complainant-identity-tag.badge-success {
  background: var(--pmp-success-container);
  color: var(--pmp-on-success-container);
}

.complainant-identity-tag.badge-neutral {
  background: var(--pmp-neutral-container);
  color: var(--pmp-neutral-text);
}

/* Quick Action Call & Email Bar */
.complainant-actions-bar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.complainant-actions-bar a,
.complainant-actions-bar button {
  flex: 1 1 11.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
}

.complainant-no-contact-notice {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--pmp-surface-hover);
  border: 0.0625rem dashed var(--pmp-border);
  border-radius: 0.5rem;
  color: var(--pmp-text-muted);
  font-size: 0.82rem;
}

.complainant-details-list {
  background: var(--pmp-surface-card);
  border: 0.0625rem solid var(--pmp-border);
  border-radius: 0.65rem;
  overflow: hidden;
}

.complainant-detail-row {
  display: flex;
  padding: 0.65rem 0.85rem;
  border-bottom: 0.0625rem solid var(--pmp-border);
  align-items: flex-start;
  gap: 1rem;
  font-size: 0.85rem;
}

.complainant-detail-row:last-child {
  border-bottom: none;
}

.complainant-detail-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  width: 8.75rem;
  flex-shrink: 0;
  color: var(--pmp-text-muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.complainant-detail-label .material-symbols-rounded {
  font-size: 1rem;
}

.complainant-detail-value {
  flex: 1;
  color: var(--pmp-text-primary);
  word-break: break-word;
}

.complainant-grievance-snapshot {
  border: 0.0625rem solid var(--pmp-border);
  border-radius: 0.65rem;
  overflow: hidden;
}

.snapshot-header {
  padding: 0.5rem 0.85rem;
  background: var(--pmp-surface-hover);
  border-bottom: 0.0625rem solid var(--pmp-border);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--pmp-text-secondary);
}

.snapshot-body {
  padding: 0.65rem 0.85rem;
  font-size: 0.82rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  color: var(--pmp-text-primary);
}

/* Clickable Complainant Button in Table */
.complainant-click-btn {
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  padding: 0.2rem 0.35rem;
  margin: -0.2rem -0.35rem;
  border-radius: 0.35rem;
  display: flex;
  flex-direction: column;
  transition: all 0.15s ease;
  width: 100%;
}

.complainant-click-btn:hover {
  background: var(--pmp-brand-container);
}

.complainant-click-btn:hover .complainant-click-name {
  color: var(--pmp-brand);
  text-decoration: underline;
}

.complainant-click-name {
  color: var(--pmp-text-primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.complainant-click-name .material-symbols-rounded {
  font-size: 1rem;
  color: var(--pmp-brand);
}

.complainant-click-meta {
  font-size: 0.72rem;
  color: var(--pmp-text-muted);
  margin-top: 0.15rem;
}

/* Ensure MD3 select in-box search input maintains proper icon offset and height */
.md3-select-search-wrap input[type='text'].md3-select-search-input {
  min-height: 2.125rem;
  height: 2.125rem;
  padding: 0.35rem 0.75rem 0.35rem 2.35rem;
  padding-left: 2.35rem;
  font-size: 0.825rem;
}

/* ==========================================================================
   Universal Page Loading Animation (MD3 Top Progress & Backdrop)
   ========================================================================== */
#pmpTopProgressBar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 0.25rem;
  z-index: 9999999;
  background-color: transparent;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

#pmpTopProgressBar.is-active {
  opacity: 1;
  visibility: visible;
}

#pmpTopProgressBar .pmp-progress-track {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: var(--pmp-brand-container);
}

#pmpTopProgressBar .pmp-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  background: linear-gradient(90deg, var(--pmp-brand), var(--pmp-brand-hover), var(--pmp-brand));
  box-shadow: 0 0.0625rem 0.5rem var(--pmp-brand);
  animation: pmpProgressIndeterminate 1.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes pmpProgressIndeterminate {
  0% {
    left: -35%;
    width: 35%;
  }

  50% {
    left: 30%;
    width: 60%;
  }

  100% {
    left: 100%;
    width: 35%;
  }
}

#pmpPageLoaderOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(0.0625rem);
  z-index: 9999998;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

#pmpPageLoaderOverlay.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ==========================================================================
   Universal Offline Detection & Notification System
   ========================================================================== */
#pmpOfflineBanner {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 9999990;
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem 1.25rem;
  background: var(--pmp-danger-container);
  color: var(--pmp-on-danger-container);
  border-bottom: 0.0625rem solid var(--pmp-danger-border);
  box-shadow: var(--pmp-shadow-md);
  font-size: 0.875rem;
  transition: all 0.25s ease;
}

#pmpOfflineBanner.is-visible {
  display: flex;
}

#pmpOfflineBanner.is-reconnected {
  background: var(--pmp-success-container);
  color: var(--pmp-on-success-container);
  border-bottom-color: var(--pmp-success-border);
}

.pmp-offline-content {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 500;
}

.pmp-offline-icon {
  font-size: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pmp-offline-actions {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.pmp-offline-retry-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 600;
  background: var(--pmp-danger);
  color: var(--pmp-on-danger);
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pmp-offline-retry-btn:hover {
  filter: brightness(1.1);
}

#pmpOfflineBanner.is-reconnected .pmp-offline-retry-btn {
  display: none;
}

/* Shake animation for retry failure */
.pmp-shake {
  animation: pmpShakeKeyframes 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes pmpSpin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes pmpShakeKeyframes {

  10%,
  90% {
    transform: translate3d(-0.0625rem, 0, 0);
  }

  20%,
  80% {
    transform: translate3d(0.125rem, 0, 0);
  }

  30%,
  50%,
  70% {
    transform: translate3d(-0.25rem, 0, 0);
  }

  40%,
  60% {
    transform: translate3d(0.25rem, 0, 0);
  }
}

/* Floating Offline Action Toast */
#pmpOfflineToast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(1.5rem);
  background: var(--pmp-surface-card);
  color: var(--pmp-text-primary);
  border: 0.0625rem solid var(--pmp-danger-border);
  box-shadow: var(--pmp-shadow-lg);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 9999995;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 90vw;
}

#pmpOfflineToast.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}


/* --------------------------------------------------------------------------
   14. Visual Flow Nodes Timeline Component
   -------------------------------------------------------------------------- */
.visual-flow-container {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0.5rem 0.25rem;
  position: relative;
}

.flow-node-card {
  position: relative;
  background: var(--pmp-surface-card);
  border: 0.0625rem solid var(--pmp-border);
  border-left: 0.3125rem solid var(--pmp-border);
  border-radius: 0.75rem;
  padding: 1.125rem 1.25rem;
  box-shadow: var(--pmp-shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.flow-node-card:hover {
  box-shadow: var(--pmp-shadow-md);
  border-color: var(--pmp-brand-border);
}

.flow-node-card.node-brand {
  border-left-color: var(--accent-iris-dark);
}

.flow-node-card.node-success,
.flow-node-card.node-resolved {
  border-left-color: var(--pmp-success);
}

.flow-node-card.node-warning {
  border-left-color: var(--pmp-warning);
}

.flow-node-card.node-danger {
  border-left-color: var(--pmp-danger);
}

.flow-node-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin-bottom: 0.75rem;
}

.flow-node-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.flow-node-step-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05rem;
  padding: 0.25rem 0.625rem;
  border-radius: 624.9375rem;
  background: var(--pmp-surface-chip);
  color: var(--pmp-text-secondary);
  border: 0.0625rem solid var(--pmp-border);
}

.flow-node-icon {
  width: 2.125rem;
  height: 2.125rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.flow-node-icon.brand {
  background: var(--pmp-brand-container);
  color: var(--pmp-on-brand-container);
}

.flow-node-icon.success,
.flow-node-icon.resolved {
  background: var(--pmp-success-container);
  color: var(--pmp-on-success-container);
}

.flow-node-icon.warning {
  background: var(--pmp-warning-container);
  color: var(--pmp-on-warning-container);
}

.flow-node-icon.danger {
  background: var(--pmp-danger-container);
  color: var(--pmp-on-danger-container);
}

.flow-node-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--pmp-text-primary);
}

.flow-node-route {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  background: var(--pmp-surface-header);
  border: 0.0625rem solid var(--pmp-border);
  margin-bottom: 0.75rem;
  font-size: 0.8125rem;
}

.flow-route-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  color: var(--pmp-text-primary);
}

.flow-route-arrow {
  display: inline-flex;
  align-items: center;
  color: var(--pmp-brand);
  font-size: 1rem;
}

.flow-node-body {
  font-size: 0.875rem;
  color: var(--pmp-text-secondary);
  line-height: 1.5;
  margin-bottom: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--pmp-surface-page);
  border-radius: 0.375rem;
  border: 0.0625rem solid var(--pmp-border);
}

.flow-node-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--pmp-text-muted);
}

.flow-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 2.5rem;
  margin: -0.0625rem 0;
  z-index: 2;
}

.flow-connector-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 0.125rem;
  background: var(--pmp-border);
}

.flow-connector-badge {
  position: relative;
  z-index: 3;
  width: 1.625rem;
  height: 1.625rem;
  border-radius: 50%;
  background: var(--pmp-surface-card);
  border: 0.125rem solid var(--accent-iris-deep);
  color: var(--accent-iris-deep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--pmp-shadow-sm);
}

.flow-connector-badge .material-symbols-rounded {
  font-size: 1rem;
}

.flow-terminal-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  border: 0.0625rem solid var(--pmp-border);
  box-shadow: var(--pmp-shadow-sm);
}

.flow-terminal-card.resolved {
  background: var(--pmp-success-container);
  color: var(--pmp-on-success-container);
  border-color: var(--pmp-success-border);
}

.flow-terminal-card.danger {
  background: var(--pmp-danger-container);
  color: var(--pmp-on-danger-container);
  border-color: var(--pmp-danger-border);
}

.flow-terminal-card.active {
  background: var(--pmp-brand-container);
  color: var(--pmp-on-brand-container);
  border-color: var(--pmp-brand-border);
}


/* --------------------------------------------------------------------------
   15. Date Picker Input with Inline Overlay Calendar Trigger
   -------------------------------------------------------------------------- */
.date-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

.date-picker-input {
  cursor: pointer;
  position: relative;
  width: 100%;
  box-sizing: border-box;
  padding-right: 2.5rem !important;
}

/* Hide native webkit indicator so our inline overlay button is the single, clean icon */
.date-picker-input::-webkit-calendar-picker-indicator {
  display: none !important;
  -webkit-appearance: none;
}

.date-picker-icon-btn {
  position: absolute;
  right: 0.625rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  width: 1.5rem;
  height: 1.5rem;
  min-height: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--pmp-brand);
  z-index: 5;
  transition: color 0.15s ease, transform 0.15s ease;
}

.date-picker-icon-btn:hover {
  color: var(--pmp-brand-hover);
  transform: translateY(-50%) scale(1.08);
}

/* Drill-down Links & Clickable Badges */
a.status-badge {
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

a.status-badge:hover {
  filter: brightness(0.95);
  box-shadow: 0 0.125rem 0.375rem var(--pmp-focus-shadow);
  transform: translateY(-0.0625rem);
}

.drilldown-link {
  text-decoration: none;
  color: var(--pmp-brand);
  transition: color 0.15s ease;
}

.drilldown-link:hover {
  text-decoration: none;
  color: var(--pmp-brand-dark);
}

/* Drawer Accordion & Sub-Menus */
.drawer-accordion-group {
  display: flex;
  flex-direction: column;
}

.drawer-accordion-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-radius: 0.875rem;
  border: none;
  background: transparent;
  color: var(--pmp-text-primary);
  font-weight: 500;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.15s ease;
  width: 100%;
  text-align: left;
}

.drawer-accordion-btn:hover {
  background-color: var(--pmp-surface-chip);
}

.drawer-accordion-btn.is-active-parent {
  color: var(--pmp-brand);
  font-weight: 600;
}

.drawer-accordion-btn.is-active-parent .nav-icon {
  color: var(--pmp-brand);
  font-variation-settings: 'FILL' 1;
}

.drawer-accordion-label {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.drawer-accordion-label .nav-icon {
  font-size: 1.35rem;
  color: var(--pmp-text-secondary);
}

.accordion-arrow {
  font-size: 1.25rem;
  color: var(--pmp-text-secondary);
  transition: transform 0.25s ease;
}

.drawer-accordion-btn.is-open .accordion-arrow {
  transform: rotate(180deg);
}

.drawer-submenu {
  display: none;
  flex-direction: column;
  padding: 0.25rem 0 0.25rem 1.75rem;
  gap: 0.25rem;
}

.drawer-submenu.is-open {
  display: flex;
}

.drawer-submenu-category {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pmp-text-muted);
  padding: 0.5rem 0.85rem 0.15rem;
}

.drawer-subnav-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.85rem;
  border-radius: 0.625rem;
  color: var(--pmp-text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.15s ease;
}

.drawer-subnav-item:hover {
  background-color: var(--pmp-surface-chip);
  color: var(--pmp-brand);
}

.drawer-subnav-item .sub-icon {
  font-size: 1.15rem;
  color: var(--pmp-text-muted);
}

.drawer-subnav-item:hover .sub-icon {
  color: var(--pmp-brand);
}

.drawer-subnav-item.is-active {
  background: var(--accent-iris-light, #ece7fd) !important;
  color: var(--accent-iris-deep, #7755e8) !important;
  font-weight: 700 !important;
  border-radius: 0.625rem !important;
  box-shadow: none !important;
}

.drawer-subnav-item.is-active .sub-icon {
  color: var(--accent-iris-deep, #7755e8) !important;
  font-variation-settings: 'FILL' 1;
}

/* ==========================================================================
   Closing Balance Report Styles (Material Cost & Rice Stock)
   Zero inline styles compliant
   ========================================================================== */

/* Triage Status Pills */
.triage-pills-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.triage-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  background-color: var(--pmp-surface-card);
  border: 1px solid var(--pmp-border);
  color: var(--pmp-text-secondary);
  transition: all 0.15s ease;
}

.triage-pill:hover {
  background-color: var(--pmp-surface-hover);
  color: var(--pmp-text-primary);
}

.triage-pill.active {
  background-color: var(--pmp-brand-container);
  color: var(--pmp-on-brand-container);
  border-color: var(--pmp-brand);
}

.triage-pill.pill-surplus.active {
  background-color: var(--pmp-success-container);
  color: var(--pmp-on-success-container);
  border-color: var(--pmp-success);
}

.triage-pill.pill-deficit.active {
  background-color: var(--pmp-danger-container);
  color: var(--pmp-on-danger-container);
  border-color: var(--pmp-danger);
}

.triage-pill.pill-zero.active {
  background-color: var(--pmp-surface-chip);
  color: var(--pmp-text-primary);
  border-color: var(--pmp-text-muted);
}

.triage-pill .pill-count {
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
  font-size: 0.725rem;
  background-color: rgba(0, 0, 0, 0.06);
}

/* Status Badges */
.status-badge.surplus {
  background-color: var(--pmp-success-container);
  color: var(--pmp-on-success-container);
  border: 1px solid var(--pmp-success-border);
}

.status-badge.deficit {
  background-color: var(--pmp-danger-container);
  color: var(--pmp-on-danger-container);
  border: 1px solid var(--pmp-danger-border);
  font-weight: 700;
}

.status-badge.zero {
  background-color: var(--pmp-surface-chip);
  color: var(--pmp-text-muted);
  border: 1px solid var(--pmp-border);
}

/* Table Numeric Cells */
.cell-surplus {
  color: var(--pmp-success);
  font-weight: 600;
}

.cell-deficit {
  color: var(--pmp-danger);
  font-weight: 700;
}

.cell-zero {
  color: var(--pmp-text-muted);
}

.cell-mono {
  font-family: monospace;
  font-size: 0.8125rem;
}

/* Block Summary Accordion */
.block-summary-card {
  margin-bottom: 1.5rem;
}

.block-summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.block-summary-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  color: var(--pmp-text-primary);
}

/* =========================================================================
   Closing Balance Analysis & Statutory Backup Styles
   ========================================================================= */

.pmp-split-btn-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  text-decoration: none;
}

.pmp-split-menu-form {
  margin: 0;
  padding: 0;
  width: 100%;
}

.pmp-split-menu-submit {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5625rem 1rem;
  color: var(--pmp-text-primary);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: background-color 0.15s ease, color 0.15s ease;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.pmp-split-menu-submit:hover {
  background-color: var(--pmp-surface-hover);
  color: var(--pmp-brand);
}

.view-level-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding: 0.5rem 0.75rem;
  background: var(--pmp-surface-card);
  border: 0.0625rem solid var(--pmp-border);
  border-radius: 0.625rem;
}

.view-level-tabs {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-wrap: wrap;
}

.view-level-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.4375rem 0.875rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--pmp-text-secondary);
  background: transparent;
  border: 0.0625rem solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.view-level-tab:hover {
  color: var(--pmp-brand);
  background: var(--pmp-surface-hover);
}

.view-level-tab.active {
  color: #ffffff;
  background: var(--pmp-brand);
  border-color: var(--pmp-brand);
  box-shadow: 0 0.125rem 0.375rem rgba(37, 99, 235, 0.25);
}

.backup-mode-switch {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.backup-mode-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--pmp-text-muted);
}

.backup-mode-pill-group {
  display: inline-flex;
  background: var(--pmp-surface-hover);
  padding: 0.1875rem;
  border-radius: 0.5rem;
  border: 0.0625rem solid var(--pmp-border);
}

.backup-mode-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3125rem 0.625rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--pmp-text-secondary);
  background: transparent;
  border: none;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.backup-mode-pill:hover {
  color: var(--pmp-text-primary);
}

.backup-mode-pill.active {
  color: #ffffff;
  background: var(--pmp-brand);
  box-shadow: 0 0.0625rem 0.25rem rgba(0, 0, 0, 0.1);
}

.cb-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.cb-kpi-card {
  padding: 1.125rem 1.25rem;
  background: var(--pmp-surface-card);
  border: 0.0625rem solid var(--pmp-border);
  border-radius: 0.625rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cb-kpi-card-brand {
  border-left: 0.25rem solid var(--pmp-brand);
}

.cb-kpi-card-success {
  border-left: 0.25rem solid var(--pmp-success);
}

.cb-kpi-card-purple {
  border-left: 0.25rem solid var(--pmp-purple, #9333ea);
}

.cb-kpi-card-danger {
  border-left: 0.25rem solid var(--pmp-danger);
}

.cb-kpi-card-amber {
  border-left: 0.25rem solid var(--pmp-amber, #d97706);
}

.cb-kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.cb-kpi-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pmp-text-muted);
}

.cb-kpi-icon {
  font-size: 1.25rem;
  opacity: 0.8;
}

.cb-kpi-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--pmp-text-primary);
  line-height: 1.2;
}

.cb-kpi-subtext {
  font-size: 0.75rem;
  color: var(--pmp-text-muted);
  margin-top: 0.375rem;
}

.cb-badge-sufficient {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: #dcfce7;
  color: #15803d;
}

.cb-badge-insufficient {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: #fee2e2;
  color: #b91c1c;
}

.cb-badge-surplus {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.6875rem;
  font-weight: 700;
  background: rgba(22, 163, 74, 0.1);
  color: #15803d;
}

.cb-badge-deficit {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.6875rem;
  font-weight: 700;
  background: rgba(220, 38, 38, 0.1);
  color: #b91c1c;
}

.cb-badge-zero {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.6875rem;
  font-weight: 700;
  background: rgba(100, 116, 139, 0.1);
  color: #64748b;
}

.cb-val-surplus {
  color: #15803d;
  font-weight: 700;
}

.cb-val-deficit {
  color: #b91c1c;
  font-weight: 700;
}

.cb-val-zero {
  color: #64748b;
  font-weight: 600;
}

.cb-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--pmp-text-secondary);
}