/* ProofFlow master polish overlay
   Purpose: final visual/UX optimisation layer for the shell, header, control layer, cards, tables and responsive behaviour.
   Safe scope: presentation only. No API routes, calculations or data model contracts are changed. */

:root {
  --pf-polish-sidebar: 276px;
  --pf-polish-sidebar-collapsed: 76px;
  --pf-polish-pad: clamp(14px, 1.45vw, 28px);
  --pf-polish-gap: 14px;
  --pf-polish-bg: #f6f8fc;
  --pf-polish-surface: rgba(255, 255, 255, 0.96);
  --pf-polish-surface-solid: #ffffff;
  --pf-polish-soft: #f8fafc;
  --pf-polish-line: rgba(203, 213, 225, 0.78);
  --pf-polish-line-soft: rgba(226, 232, 240, 0.86);
  --pf-polish-text: #0f172a;
  --pf-polish-muted: #64748b;
  --pf-polish-faint: #94a3b8;
  --pf-polish-blue: #2563eb;
  --pf-polish-blue-dark: #1d4ed8;
  --pf-polish-blue-soft: #eff6ff;
  --pf-polish-green: #10b981;
  --pf-polish-amber: #f59e0b;
  --pf-polish-red: #ef4444;
  --pf-polish-radius: 16px;
  --pf-polish-radius-lg: 22px;
  --pf-polish-shadow: 0 14px 38px rgba(15, 23, 42, 0.065);
  --pf-polish-shadow-soft: 0 8px 22px rgba(15, 23, 42, 0.045);
}

html,
body,
#root {
  width: 100% !important;
  min-height: 100vh !important;
  background: var(--pf-polish-bg) !important;
  overflow-x: hidden !important;
}

body {
  color: var(--pf-polish-text) !important;
  text-rendering: optimizeLegibility !important;
  -webkit-font-smoothing: antialiased !important;
}

html body .pf-shell,
html body .pf-shell.is-sidebar-expanded {
  min-height: 100vh !important;
  display: grid !important;
  grid-template-columns: var(--pf-polish-sidebar) minmax(0, 1fr) !important;
  background:
    radial-gradient(circle at 14% -12%, rgba(37, 99, 235, 0.07), transparent 34rem),
    radial-gradient(circle at 88% 0%, rgba(14, 165, 233, 0.055), transparent 32rem),
    linear-gradient(180deg, #f8fafc 0%, #f5f7fb 100%) !important;
  overflow-x: hidden !important;
}

html body .pf-shell.is-sidebar-collapsed {
  grid-template-columns: var(--pf-polish-sidebar-collapsed) minmax(0, 1fr) !important;
}

html body .pf-main {
  width: 100% !important;
  min-width: 0 !important;
  overflow-x: clip !important;
}

/* Sidebar: cleaner rail, less visual weight, consistent hit areas. */
html body .pf-sidebar,
html body .pf-sidebar.is-expanded,
html body .pf-sidebar.is-collapsed {
  width: auto !important;
  height: 100vh !important;
  padding: 12px !important;
  gap: 10px !important;
  border-right: 1px solid var(--pf-polish-line-soft) !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96)) !important;
  box-shadow: 8px 0 26px rgba(15, 23, 42, 0.04) !important;
  overflow: hidden !important;
}

html body .pf-sidebar.is-collapsed {
  padding-inline: 10px !important;
}

html body .pf-sidebar-brand {
  min-height: 50px !important;
  padding-bottom: 10px !important;
  border-bottom: 1px solid var(--pf-polish-line-soft) !important;
}

html body .pf-brand-mark {
  width: 38px !important;
  height: 38px !important;
  flex-basis: 38px !important;
  border-radius: 13px !important;
  background: linear-gradient(135deg, #0f2f75, #2563eb) !important;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22) !important;
}

html body .pf-brand-copy h1 {
  font-size: 1.05rem !important;
  letter-spacing: -0.04em !important;
}

html body .pf-brand-kicker,
html body .pf-sidebar-current span,
html body .pf-nav-label span,
html body .pf-title-card__meta span,
html body .pf-topbar-card span,
html body .pf-control-layer__title span,
html body .pf-control-field > span,
html body .section-header small {
  color: var(--pf-polish-faint) !important;
  font-size: 0.61rem !important;
  font-weight: 950 !important;
  letter-spacing: 0.105em !important;
  line-height: 1.1 !important;
  text-transform: uppercase !important;
}

html body .pf-sidebar-current {
  padding: 10px !important;
  border-radius: 14px !important;
  border-color: var(--pf-polish-line-soft) !important;
  background: var(--pf-polish-surface-solid) !important;
  box-shadow: none !important;
}

html body .pf-sidebar-current strong {
  font-size: 0.92rem !important;
}

html body .pf-sidebar-current small {
  font-size: 0.7rem !important;
}

html body .pf-nav {
  gap: 8px !important;
  padding-block: 0 6px !important;
}

html body .pf-nav-group {
  gap: 3px !important;
  padding-block: 2px !important;
}

html body .pf-nav-group + .pf-nav-group {
  margin-top: 1px !important;
  padding-top: 8px !important;
}

html body .pf-nav-label {
  padding: 5px 9px 3px !important;
}

html body .pf-nav-items {
  gap: 3px !important;
}

html body .pf-nav-item,
html body .pf-nav-item.is-expanded,
html body .pf-nav-item.is-collapsed {
  min-height: 40px !important;
  gap: 9px !important;
  padding: 7px 9px !important;
  border-radius: 13px !important;
  color: #334155 !important;
}

html body .pf-sidebar.is-collapsed .pf-nav-item,
html body .pf-sidebar.is-collapsed .pf-nav-item.is-collapsed {
  width: 42px !important;
  min-height: 42px !important;
  padding: 7px !important;
}

html body .pf-nav-icon,
html body .pf-nav-item.is-collapsed .pf-nav-icon {
  width: 29px !important;
  height: 29px !important;
  flex-basis: 29px !important;
  border-radius: 10px !important;
  border-color: var(--pf-polish-line-soft) !important;
}

html body .pf-nav-text strong {
  font-size: 0.83rem !important;
  font-weight: 900 !important;
}

html body .pf-nav-text small {
  font-size: 0.65rem !important;
}

html body .pf-nav-item.is-active {
  color: var(--pf-polish-blue-dark) !important;
  background: var(--pf-polish-blue-soft) !important;
  border-color: rgba(37, 99, 235, 0.22) !important;
  box-shadow: inset 3px 0 0 var(--pf-polish-blue), 0 7px 18px rgba(37, 99, 235, 0.09) !important;
}

html body .pf-sidebar-footer {
  gap: 8px !important;
  padding-top: 8px !important;
}

html body .pf-api-status,
html body .pf-last-pull {
  border-color: var(--pf-polish-line-soft) !important;
  border-radius: 14px !important;
  box-shadow: none !important;
}

html body .pf-sidebar-toggle,
html body .pf-ghost-button,
html body .pf-control-button,
html body .button,
html body .button.secondary,
html body .panel-collapse-button {
  min-height: 38px !important;
  border-radius: 12px !important;
  font-size: 0.8rem !important;
}

/* Global layout rail: equal margins across header, controls, intelligence strips and body. */
html body .pf-topbar,
html body .pf-control-layer,
html body .pf-content,
html body .pf-decision-pathway,
html body .pf-insight-guide,
html body .pf-decision-intel {
  width: calc(100% - (var(--pf-polish-pad) * 2)) !important;
  max-width: none !important;
  box-sizing: border-box !important;
  margin-left: var(--pf-polish-pad) !important;
  margin-right: var(--pf-polish-pad) !important;
}

html body .pf-topbar {
  padding: var(--pf-polish-pad) 0 10px !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

html body .pf-topbar__inner {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 12px !important;
}

html body .pf-title-card {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 500px) !important;
  gap: 14px !important;
  align-items: stretch !important;
  padding: clamp(16px, 1.4vw, 22px) !important;
  border: 1px solid var(--pf-polish-line) !important;
  border-radius: var(--pf-polish-radius-lg) !important;
  background:
    radial-gradient(circle at 100% 0%, rgba(37, 99, 235, 0.085), transparent 22rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.985), rgba(248, 250, 252, 0.92)) !important;
  box-shadow: var(--pf-polish-shadow) !important;
  overflow: hidden !important;
}

html body .pf-title-card__main {
  justify-content: center !important;
  min-width: 0 !important;
}

html body .pf-title-kicker-row {
  gap: 8px !important;
}

html body .pf-eyebrow {
  color: var(--pf-polish-blue-dark) !important;
  font-size: 0.68rem !important;
  letter-spacing: 0.13em !important;
}

html body .pf-title-live {
  min-height: 26px !important;
  padding: 5px 10px !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  border-color: var(--pf-polish-line-soft) !important;
  font-size: 0.64rem !important;
}

html body .pf-page-heading h2 {
  max-width: 980px !important;
  margin: 9px 0 7px !important;
  color: var(--pf-polish-text) !important;
  font-size: clamp(2rem, 2.65vw, 3.12rem) !important;
  font-weight: 950 !important;
  line-height: 0.99 !important;
  letter-spacing: -0.072em !important;
  text-wrap: balance !important;
}

html body .pf-page-heading p {
  max-width: 960px !important;
  color: var(--pf-polish-muted) !important;
  font-size: 0.94rem !important;
  line-height: 1.48 !important;
}

html body .pf-title-card__meta {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 9px !important;
}

html body .pf-title-card__meta > div {
  min-height: 98px !important;
  padding: 12px !important;
  border: 1px solid var(--pf-polish-line-soft) !important;
  border-radius: 15px !important;
  background: rgba(248, 250, 252, 0.88) !important;
  box-shadow: none !important;
}

html body .pf-title-card__meta strong {
  margin-top: 7px !important;
  color: var(--pf-polish-text) !important;
  font-size: 0.9rem !important;
  font-weight: 950 !important;
  line-height: 1.12 !important;
}

html body .pf-title-card__meta small {
  color: var(--pf-polish-muted) !important;
  font-size: 0.7rem !important;
}

html body .pf-topbar-cards {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(150px, 1fr)) !important;
  gap: 10px !important;
  padding: 0 !important;
  overflow: visible !important;
}

html body .pf-topbar-card {
  min-width: 0 !important;
  min-height: 96px !important;
  padding: 13px !important;
  border: 1px solid var(--pf-polish-line) !important;
  border-radius: 16px !important;
  background: var(--pf-polish-surface) !important;
  box-shadow: var(--pf-polish-shadow-soft) !important;
  overflow: hidden !important;
}

html body .pf-topbar-card strong {
  color: var(--pf-polish-text) !important;
  font-size: clamp(1.04rem, 1.28vw, 1.52rem) !important;
  line-height: 1 !important;
  letter-spacing: -0.055em !important;
}

html body .pf-topbar-card small {
  color: var(--pf-polish-muted) !important;
  font-size: 0.7rem !important;
}

/* Control layer: non-intrusive, universal, tidy and easy to scan. */
html body .pf-control-layer,
html body .filter-bar {
  position: relative !important;
  top: auto !important;
  z-index: 30 !important;
  margin-top: 0 !important;
  margin-bottom: var(--pf-polish-gap) !important;
  padding: 0 !important;
  border: 1px solid var(--pf-polish-line) !important;
  border-radius: var(--pf-polish-radius) !important;
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: var(--pf-polish-shadow-soft) !important;
  backdrop-filter: blur(14px) !important;
  overflow: visible !important;
}

html body .pf-control-layer__summary {
  min-height: 58px !important;
  display: grid !important;
  grid-template-columns: minmax(240px, 0.74fr) minmax(300px, 1fr) auto !important;
  gap: 10px !important;
  align-items: center !important;
  padding: 10px 12px !important;
}

html body .pf-control-layer__title strong {
  font-size: 0.88rem !important;
}

html body .pf-control-layer__title small {
  color: var(--pf-polish-muted) !important;
  font-size: 0.68rem !important;
}

html body .pf-control-layer__chips {
  justify-content: flex-end !important;
  gap: 6px !important;
}

html body .pf-control-chip {
  min-height: 30px !important;
  padding: 6px 9px !important;
  border-color: var(--pf-polish-line-soft) !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  color: var(--pf-polish-muted) !important;
  font-size: 0.7rem !important;
  font-weight: 850 !important;
}

html body .pf-control-chip--count {
  color: var(--pf-polish-blue-dark) !important;
  background: var(--pf-polish-blue-soft) !important;
}

html body .pf-control-button,
html body .button {
  border-color: var(--pf-polish-blue) !important;
  background: var(--pf-polish-blue) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.16) !important;
}

html body .pf-control-button--secondary,
html body .pf-control-button--edit,
html body .button.secondary,
html body .panel-collapse-button {
  border-color: var(--pf-polish-line) !important;
  background: #ffffff !important;
  color: var(--pf-polish-blue-dark) !important;
  box-shadow: none !important;
}

html body .pf-control-button--edit {
  border-color: rgba(37, 99, 235, 0.26) !important;
  background: linear-gradient(180deg, #ffffff, #f8fbff) !important;
}

html body .pf-control-layer__drawer {
  padding: 12px !important;
  border-top: 1px solid var(--pf-polish-line-soft) !important;
  background: rgba(248, 250, 252, 0.78) !important;
}

html body .pf-control-grid,
html body .filter-bar__grid,
html body .filter-bar__grid--vendor {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 10px !important;
  align-items: end !important;
}

html body .pf-control-field--source,
html body .filter-group-wide {
  grid-column: span 2 !important;
}

html body .pf-control-field,
html body .filter-group {
  gap: 6px !important;
}

html body .pf-control-field select,
html body .pf-control-field input,
html body .pf-source-picker,
html body .filter-group input,
html body .filter-group select {
  min-height: 39px !important;
  border: 1px solid var(--pf-polish-line) !important;
  border-radius: 11px !important;
  background: #ffffff !important;
  color: var(--pf-polish-text) !important;
  padding: 9px 10px !important;
  font-size: 0.82rem !important;
}

html body .pf-source-menu {
  z-index: 90 !important;
  max-height: min(420px, 64vh) !important;
  overflow: hidden !important;
  border: 1px solid var(--pf-polish-line) !important;
  border-radius: 15px !important;
  background: #ffffff !important;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.14) !important;
}

html body .pf-source-menu__list {
  max-height: 300px !important;
  overflow: auto !important;
}

html body .pf-control-presets {
  gap: 8px !important;
}

html body .pf-control-presets button {
  min-height: 48px !important;
  border-radius: 13px !important;
  border-color: var(--pf-polish-line-soft) !important;
  background: #ffffff !important;
}

html body .pf-control-layer__footer {
  gap: 12px !important;
}

html body .pf-control-layer__freshness {
  padding: 7px 12px !important;
  border-top-color: var(--pf-polish-line-soft) !important;
  color: var(--pf-polish-muted) !important;
  font-size: 0.68rem !important;
}

/* Content: consistent panels, charts, cards and tables. */
html body .pf-content,
html body .content-shell {
  padding: 0 0 30px !important;
  container-type: inline-size !important;
}

html body .pf-content > .page-stack,
html body .pf-content .page-stack,
html body .pf-page-stack,
html body .content-shell .page-stack {
  width: 100% !important;
  min-width: 0 !important;
  gap: var(--pf-polish-gap) !important;
}

html body .pf-content :where(.panel, .metric-card, .decision-card, .action-card, .settings-card, .diagnostic-card, .stat-line, .progressive-tabs, .executive-digest, .decision-strip, .section-panel),
html body .content-shell :where(.panel, .metric-card, .decision-card, .action-card, .settings-card, .diagnostic-card, .stat-line, .progressive-tabs, .executive-digest, .decision-strip, .section-panel) {
  min-width: 0 !important;
  border: 1px solid var(--pf-polish-line) !important;
  border-radius: var(--pf-polish-radius) !important;
  background: var(--pf-polish-surface) !important;
  box-shadow: var(--pf-polish-shadow-soft) !important;
  overflow: clip !important;
}

html body .section-panel,
html body .pf-content :where(.panel),
html body .content-shell :where(.panel) {
  padding: 14px !important;
}

html body .section-header {
  min-width: 0 !important;
  gap: 12px !important;
  margin-bottom: 12px !important;
}

html body .section-header h3,
html body .section-header h4 {
  color: var(--pf-polish-text) !important;
  font-size: clamp(1rem, 1.1vw, 1.16rem) !important;
  line-height: 1.1 !important;
  letter-spacing: -0.04em !important;
}

html body .section-header p {
  color: var(--pf-polish-muted) !important;
  font-size: 0.82rem !important;
  line-height: 1.42 !important;
}

html body .metric-grid,
html body .kpi-grid,
html body .dashboard-grid,
html body .insight-grid,
html body .two-column-grid,
html body .three-column-grid {
  gap: var(--pf-polish-gap) !important;
  min-width: 0 !important;
}

html body .metric-card {
  min-height: 112px !important;
  padding: 13px !important;
}

html body .metric-value,
html body .stat-value,
html body .kpi-value,
html body .value-number {
  color: var(--pf-polish-text) !important;
  font-size: clamp(1.3rem, 1.7vw, 2.05rem) !important;
  line-height: 1 !important;
  letter-spacing: -0.06em !important;
}

html body .recharts-wrapper,
html body .recharts-responsive-container {
  max-width: 100% !important;
}

html body .chart-card,
html body .chart-panel,
html body .panel:has(.recharts-wrapper) {
  min-height: 320px !important;
}

html body .data-table-shell,
html body .table-scroll {
  max-width: 100% !important;
  overflow: auto !important;
  border-color: var(--pf-polish-line-soft) !important;
}

html body table,
html body .data-table {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

html body .data-table th,
html body .data-table td {
  padding: 10px 11px !important;
  font-size: 0.78rem !important;
  line-height: 1.3 !important;
  border-bottom: 1px solid var(--pf-polish-line-soft) !important;
}

html body .data-table th {
  position: sticky !important;
  top: 0 !important;
  z-index: 2 !important;
  background: #f8fafc !important;
  color: #475569 !important;
  font-size: 0.68rem !important;
  font-weight: 950 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
}

html body .data-table tbody tr:hover td {
  background: #f8fbff !important;
}

html body .pf-mobile-nav {
  display: none !important;
}

@media (max-width: 1480px) {
  html body .pf-title-card {
    grid-template-columns: 1fr !important;
  }

  html body .pf-title-card__meta {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  html body .pf-topbar-cards {
    grid-template-columns: repeat(5, minmax(154px, 1fr)) !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
  }

  html body .pf-topbar-cards::-webkit-scrollbar {
    display: none !important;
  }
}

@media (max-width: 1180px) {
  :root {
    --pf-polish-pad: 14px;
    --pf-polish-gap: 12px;
  }

  html body .pf-shell,
  html body .pf-shell.is-sidebar-expanded,
  html body .pf-shell.is-sidebar-collapsed {
    display: block !important;
    grid-template-columns: 1fr !important;
  }

  html body .pf-sidebar,
  html body .pf-sidebar.is-expanded,
  html body .pf-sidebar.is-collapsed {
    display: none !important;
  }

  html body .pf-main {
    min-height: 100vh !important;
  }

  html body .pf-topbar,
  html body .pf-control-layer,
  html body .pf-content,
  html body .pf-decision-pathway,
  html body .pf-insight-guide,
  html body .pf-decision-intel {
    width: calc(100% - (var(--pf-polish-pad) * 2)) !important;
    margin-left: var(--pf-polish-pad) !important;
    margin-right: var(--pf-polish-pad) !important;
  }

  html body .pf-title-card {
    padding: 14px !important;
    border-radius: 18px !important;
  }

  html body .pf-title-card__meta {
    display: none !important;
  }

  html body .pf-page-heading h2 {
    font-size: clamp(1.52rem, 5.2vw, 2.2rem) !important;
    letter-spacing: -0.055em !important;
  }

  html body .pf-page-heading p {
    font-size: 0.84rem !important;
  }

  html body .pf-topbar-cards {
    display: grid !important;
    grid-auto-flow: column !important;
    grid-auto-columns: minmax(150px, 1fr) !important;
    grid-template-columns: none !important;
    gap: 8px !important;
    overflow-x: auto !important;
    padding-bottom: 1px !important;
  }

  html body .pf-topbar-card {
    min-width: 150px !important;
    min-height: 88px !important;
    padding: 11px !important;
  }

  html body .pf-mobile-nav {
    width: 100% !important;
    display: grid !important;
    grid-auto-flow: column !important;
    grid-auto-columns: max-content !important;
    gap: 7px !important;
    overflow-x: auto !important;
    padding: 9px 0 2px !important;
    scrollbar-width: none !important;
  }

  html body .pf-mobile-nav::-webkit-scrollbar {
    display: none !important;
  }

  html body .pf-mobile-nav__item {
    min-height: 36px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 8px 10px !important;
    border: 1px solid var(--pf-polish-line) !important;
    border-radius: 999px !important;
    background: #ffffff !important;
    color: var(--pf-polish-muted) !important;
    font-size: 0.74rem !important;
    font-weight: 850 !important;
    white-space: nowrap !important;
  }

  html body .pf-mobile-nav__item.is-active {
    color: var(--pf-polish-blue-dark) !important;
    background: var(--pf-polish-blue-soft) !important;
    border-color: rgba(37, 99, 235, 0.25) !important;
  }

  html body .pf-control-layer__summary {
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 8px !important;
  }

  html body .pf-control-layer__chips {
    display: none !important;
  }

  html body .pf-control-grid,
  html body .filter-bar__grid,
  html body .filter-bar__grid--vendor {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  html body .pf-control-field--source,
  html body .filter-group-wide {
    grid-column: 1 / -1 !important;
  }

  html body .two-column-grid,
  html body .three-column-grid,
  html body .dashboard-grid,
  html body .insight-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 680px) {
  :root {
    --pf-polish-pad: 10px;
    --pf-polish-gap: 10px;
  }

  html body .pf-topbar {
    padding-top: 10px !important;
  }

  html body .pf-title-card {
    padding: 12px !important;
  }

  html body .pf-title-kicker-row {
    align-items: flex-start !important;
  }

  html body .pf-title-live {
    min-height: 24px !important;
    padding-inline: 8px !important;
    font-size: 0.6rem !important;
  }

  html body .pf-topbar-card {
    min-width: 142px !important;
  }

  html body .pf-control-layer__summary {
    grid-template-columns: 1fr !important;
    align-items: stretch !important;
  }

  html body .pf-control-layer__actions,
  html body .pf-control-footer-actions {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  html body .pf-control-button,
  html body .button,
  html body .button.secondary {
    width: 100% !important;
  }

  html body .pf-control-grid,
  html body .filter-bar__grid,
  html body .filter-bar__grid--vendor {
    grid-template-columns: 1fr !important;
  }

  html body .pf-control-layer__drawer {
    padding: 10px !important;
  }

  html body .pf-control-presets {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  html body .section-panel,
  html body .pf-content :where(.panel),
  html body .content-shell :where(.panel) {
    padding: 12px !important;
  }

  html body .section-header {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  html body .metric-card {
    min-height: 96px !important;
  }

  html body .chart-card,
  html body .chart-panel,
  html body .panel:has(.recharts-wrapper) {
    min-height: 280px !important;
  }
}

@media (max-width: 420px) {
  html body .pf-page-heading h2 {
    font-size: 1.45rem !important;
  }

  html body .pf-control-layer__actions,
  html body .pf-control-footer-actions,
  html body .pf-control-presets {
    grid-template-columns: 1fr !important;
  }

  html body .pf-topbar-card {
    min-width: 136px !important;
  }
}
