/* R3 slice 4/14 (15-dashboard.css) — extracted VERBATIM from styles.css lines 2312-3552.
   KPI cards, bento layouts, panels, settings rows, chart cards, donuts, bars, rate rings, progress/severity, pulse metrics, coverage grid.
   Link order in index.html is load-bearing: cascade tie-breaks depend on it. Do not reorder. */

.kpi-strip,
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  flex-shrink: 0;
}

.kpi-card {
  position: relative;
  min-height: 122px;
  padding: 22px 24px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: transform 0.4s cubic-bezier(.2,.7,.2,1), box-shadow 0.4s cubic-bezier(.2,.7,.2,1);
}

/* KPI card icon chip (top-right) */
.kpi-icon {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-ink);
  pointer-events: none;
}

.kpi-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.kpi-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

@media (prefers-reduced-motion: reduce) {
  .kpi-card {
    transition: none;
  }
  .kpi-card:hover {
    transform: none;
  }
}

/*
.kpi-card:first-child,
.kpi-focus {
  background: linear-gradient(160deg, rgba(0, 162, 99, .06), rgba(0, 162, 99, .01));
}
*/

/*
body.dark .kpi-card:first-child,
body.dark .kpi-focus {
  background: linear-gradient(160deg, rgba(0, 196, 86, .07), rgba(0, 196, 86, .02));
}
*/  

/*
.kpi-card:first-child::after,
.kpi-focus::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 18px;
  background: radial-gradient(280px 70px at 80% 0%, rgba(0, 162, 99, .1), transparent 60%);
  pointer-events: none;
}
*/


.kpi-label-sm,
.kpi-label {
  font-family: var(--font-display-new);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  margin-bottom: 10px;
  text-wrap: balance;
  max-width: 14ch;
}

.kpi-value {
  font-family: var(--font-display-new);
  font-size: 44px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.kpi-sub,
.kpi-delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  font-size: 11px;
  font-weight: 500;
  margin-top: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--muted);
}

.kpi-delta.up {
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-color: var(--accent-soft);
}

.kpi-delta.dn {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: var(--danger-border);
}

.bento,
.two-col {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 12px;
}

.dashboard-bento {
  display: grid;
  gap: 18px;
  min-height: 0;
}

/* ── Task 4: Bottom row redesign ─────────────────────────────────────────── */
/* Two-column layout: delivery card (left) + stacked right column (rings/mix).
   The markup has 3 flat children — we grid-place them to form 2 visual columns
   with equal height via align-items:stretch on the parent. */
.dashboard-bento-primary {
  grid-template-columns: 1.5fr 1fr;
  gap: 18px;
  align-items: stretch;
  min-height: 0;
}

/* Delivery card spans both rows → left column */
.dashboard-bento-primary > .delivery-card {
  grid-column: 1;
  grid-row: 1 / 3;
}

/* Rate rings card → right column, top */
.dashboard-bento-primary > .chart-card:not(.delivery-card):not(.delivery-mix-card) {
  grid-column: 2;
  grid-row: 1;
}

/* Confirmation mix card → right column, bottom */
.dashboard-bento-primary > .delivery-mix-card {
  grid-column: 2;
  grid-row: 2;
}

.dashboard-bento-secondary {
  grid-template-columns: minmax(0, .95fr) minmax(340px, .9fr) minmax(260px, .58fr);
  min-height: 198px;
}

.dashboard-bento-tertiary {
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  align-items: stretch;
  min-height: 0;
}

/* ── Insights / leaderboard cards (Task 3 redesign) ── */
.mini-chart-card {
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
}

.mini-chart-card .section-header {
  padding: 0;
  margin-bottom: 22px;
  flex-shrink: 0;
}

.mini-chart-card .section-title {
  font-family: var(--font-display-new);
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.2;
}

.mini-chart-card .section-sub {
  font-family: ui-monospace, "SF Mono", "Geist Mono", monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--muted);
  margin-top: 4px;
}

.mini-bars {
  display: grid;
  gap: 15px;
  flex: 1;
  min-height: 0;
  counter-reset: rank;
  align-content: start;
}

.mini-bar-row {
  display: grid;
  grid-template-columns: 22px minmax(82px, .32fr) minmax(100px, 1fr) auto;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--ink);
  counter-increment: rank;
}

/* Wide charts carry short 3-letter month labels; pin the label column narrow so
   the bar starts right beside the month instead of across a wide empty gap.
   A fixed width keeps every row's bar aligned on the same left edge. */
.mini-chart-card.bento-chart-wide .mini-bar-row {
  grid-template-columns: 22px 44px minmax(160px, 1fr) auto;
}

/* Rank chip via CSS counter — rendered as the first grid cell */
.mini-bar-row::before {
  content: counter(rank);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--chip);
  font-family: var(--font-display-new);
  font-size: 13px;
  font-weight: 800;
  color: var(--accent-ink);
  line-height: 1;
  flex-shrink: 0;
}

/* Label column */
.mini-bar-row > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-bar-row > div {
  height: 11px;
  border-radius: 999px;
  background: var(--bar-track);
  overflow: hidden;
}

.mini-bar-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.mini-bar-row i.green {
  background: var(--accent);
}

.mini-bar-row i.violet {
  background: #6E62D6;
}

.mini-bar-row i.amber {
  background: #EBA433;
}

.mini-bar-row strong {
  font-family: var(--font-display-new);
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  text-align: right;
  white-space: nowrap;
}

.bento-col {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.panel {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.two-col {
  align-items: start;
}

.settings-grid {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(420px, .85fr);
  gap: 12px;
  align-items: start;
}

.settings-row {
  display: grid;
  grid-template-columns: minmax(120px, .35fr) minmax(0, 1fr);
  align-items: center;
}

.settings-row > span:last-child {
  justify-self: end;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-form,
.modal-form {
  display: grid;
  gap: 12px;
  padding: 0 20px 20px;
}

.settings-form label,
.modal-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-family: "Geist Mono", monospace;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.alert-rules-list {
  max-height: 192px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: 0;
}

.alert-rules-list::-webkit-scrollbar {
  width: 3px;
}

.alert-rules-list::-webkit-scrollbar-thumb {
  background: var(--hairline);
  border-radius: 2px;
}

.alert-rule-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 86px auto;
  align-items: center;
  gap: 12px;
}

.alert-rule-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.alert-rule-value {
  justify-self: end;
  text-align: right;
}

.rule-input {
  min-width: 0;
  width: 86px;
  min-height: 34px;
  height: 34px;
  padding: 0 10px;
  text-align: right;
  font-family: "Geist Mono", monospace;
}

.toggle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0 20px 20px;
}

.toggle-row {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--hover-bg);
  padding: 0 12px;
  color: var(--ink-mid);
  font-size: 13px;
}

.toggle-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.chart-card {
  min-height: 0;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.dashboard-bento-primary .chart-card {
  height: 100%;
}

/* Scoped section-header/title/sub overrides for chart-card (bottom row) */
.chart-card .section-header {
  padding: 0;
  margin-bottom: 22px;
  flex-shrink: 0;
}

.chart-card .section-title {
  font-family: var(--font-display-new);
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.2;
}

.chart-card .section-sub {
  font-family: ui-monospace, "SF Mono", "Geist Mono", monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--muted);
  margin-top: 4px;
}

.delivery-card {
  min-height: 260px;
}

.delivery-mix-card {
  display: flex;
  flex-direction: column;
}

.delivery-mix-card .pulse-grid {
  grid-template-columns: 1fr;
  padding-top: 0;
  padding: 0;
  gap: 6px;
  flex: 1;
}

/* Confirmation-mix donut (SVG) + legend — dashboard bottom row */
.mix-donut-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 4px 20px 18px;
}

/* Modern donut (renderModernDonut) — rounded segment caps, gaps, spin-in */
.md-donut {
  position: relative;
  width: 132px;
  height: 132px;
  flex-shrink: 0;
}
.md-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  animation: md-spin-in .7s cubic-bezier(.2, .7, .2, 1) both;
}
.md-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.md-center strong {
  font-family: var(--font-display-new);
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.md-center span {
  margin-top: 2px;
  color: var(--muted);
  font-family: ui-monospace, "Geist Mono", monospace;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}
/* Zone-distribution donut sits centred and larger */
.geo-zones-card .md-donut {
  width: 200px;
  height: 200px;
  margin: 4px auto 10px;
}
.geo-zones-card .md-center strong { font-size: 34px; }
@keyframes md-spin-in {
  from { opacity: 0; transform: rotate(-150deg) scale(.85); }
  to { opacity: 1; transform: rotate(-90deg) scale(1); }
}

/* Rate-ring staggered entry animation */
.rate-ring-item { animation: ring-pop .5s cubic-bezier(.2, .7, .2, 1) both; }
.rate-ring-item:nth-child(2) { animation-delay: .08s; }
.rate-ring-item:nth-child(3) { animation-delay: .16s; }
@keyframes ring-pop {
  from { opacity: 0; transform: translateY(10px) scale(.94); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .md-svg, .rate-ring-item { animation: none; }
}

.mix-donut {
  position: relative;
  width: 132px;
  height: 132px;
  flex-shrink: 0;
}

.mix-donut-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg); /* start the first segment at 12 o'clock */
}

.mix-arc {
  transition: stroke-dasharray .6s ease, stroke-dashoffset .6s ease;
}

@media (prefers-reduced-motion: reduce) {
  .mix-arc { transition: none; }
}

.mix-donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.mix-donut-center strong {
  font-family: var(--font-display-new);
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.mix-donut-center span {
  margin-top: 2px;
  color: var(--muted);
  font-family: ui-monospace, "SF Mono", "Geist Mono", monospace;
  font-size: 10px;
  font-weight: 600;
}

.mix-legend {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mix-legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.mix-swatch {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  flex-shrink: 0;
}

.mix-legend-label {
  color: var(--ink-soft);
  font-family: var(--font-body-new);
}

.mix-legend-row strong {
  margin-left: auto;
  font-family: var(--font-display-new);
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.mix-legend-pct {
  color: var(--muted);
  font-family: ui-monospace, "SF Mono", "Geist Mono", monospace;
  font-size: 11px;
  min-width: 34px;
  text-align: right;
}

.panel-header,
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px 10px;
  flex-shrink: 0;
}

.panel-actions,
.row-actions,
.modal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.panel > .metric-list,
.panel > .table-card {
  min-height: 0;
}

.panel-title,
.section-title {
  font-family: var(--font-display-new);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: balance;
}

.panel-sub,
.section-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  font-family: "Geist Mono", monospace;
}

.bar-chart {
  min-height: 300px;
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 18px 20px 44px;
  position: relative;
}

.bar-chart::after {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 44px;
  height: 1px;
  background: var(--hairline);
}

.chart-body {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: stretch;
  gap: 20px;
  padding: 0 20px 18px;
}

.delivery-card .chart-body {
  padding: 0;
  min-height: 190px;
}

.chart-left {
  width: 160px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding-bottom: 8px;
}

/* Hero number — Archivo 900 ~62px */
.chart-big {
  font-family: var(--font-display-new);
  font-size: 62px;
  font-weight: 900;
  font-stretch: 118%;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.chart-big-sub {
  font-size: 12px;
  font-family: ui-monospace, "SF Mono", "Geist Mono", monospace;
  color: var(--muted);
  letter-spacing: .02em;
  margin-top: 6px;
  font-weight: 600;
}

.chart-left .mini-stat-row:first-of-type {
  margin-top: auto;
}

.mini-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  padding-bottom: 10px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  font-family: ui-monospace, "SF Mono", "Geist Mono", monospace;
  letter-spacing: .02em;
}

.mini-stat-row strong {
  color: var(--ink);
  font-family: var(--font-display-new);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.bars-area {
  flex: 1;
  min-width: 0;
  min-height: 160px;
  position: relative;
  display: flex;
  flex-direction: column;
}

.bars-baseline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 24px;
  height: 1px;
  background: var(--hairline);
}

.delivery-bars .bars-baseline {
  bottom: 0;
}

.bars-row {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 26px;
}

.delivery-bars .bars-row {
  padding-bottom: 0;
}

.bar-col {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-width: 0;
}

.bar-wrap {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

@keyframes barGrow {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

.bar,
.bar-fill {
  width: 60%;
  min-height: 3px;
  border-radius: 7px 7px 0 0;
  background: linear-gradient(180deg, var(--accent-soft) 0%, var(--accent) 100%);
  box-shadow: 0 0 18px rgba(0, 162, 75, .30);
  transform-origin: bottom;
  animation: barGrow .45s cubic-bezier(.2, .7, .2, 1) both;
}

/* Deliveries-by-supplier: hanging bars + gridlines + x/y axes (redesign) */
.bars-area.delivery-bars {
  flex-direction: row;
  gap: 10px;
  min-height: 290px;
}
.bars-yaxis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  padding-bottom: 22px; /* align bottom tick with the x-axis baseline */
  font-family: ui-monospace, "Geist Mono", monospace;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  flex-shrink: 0;
  min-width: 20px;
}
.bars-plot {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.bars-grid {
  position: absolute;
  inset: 0 0 22px 0; /* sit above the x-axis row */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}
.bars-gridline { height: 1px; background: var(--border); }
.delivery-bars .bars-row {
  position: relative;
  flex: 1;
  align-items: flex-end; /* bars grow up from the bottom baseline */
  gap: 12px;
  padding-bottom: 0;
}
.delivery-bars .bar-col {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-width: 0;
}
.delivery-bars .bar-fill {
  width: 95%;
  max-width: 76px;
  min-height: 4px;
  border-radius: 8px 8px 0 0; /* rounded top — bars rise from the bottom */
  background: linear-gradient(180deg, #018442 0%, #00A24B 52%, #62d6a0 100%); /* darker at top, lighter at the bottom */
  box-shadow: 0 12px 22px -8px rgba(0, 162, 75, .42);
  transform-origin: bottom;
  animation: barDrop .5s cubic-bezier(.2, .7, .2, 1) both;
}
.bars-xaxis {
  height: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.bars-xtick {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-family: ui-monospace, "Geist Mono", monospace;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
}
@keyframes barDrop { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .delivery-bars .bar-fill { animation: none; } }

.bar-label {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  font-size: 10.5px;
  color: var(--muted);
  font-family: "Geist Mono", monospace;
}

.bars-labels {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.bar-label.hi {
  color: var(--green);
  font-weight: 600;
}

.bar-label span {
  display: block;
  opacity: .55;
}

.rate-ring-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  align-items: start;
}

.rate-ring-item {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px 8px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

/* SVG-free conic progress ring: track = --bar-track, fill = green (#00A24B)
   inner cutout = ((radius - stroke)/radius)*100% */
.rate-ring {
  --value: 0;
  width: min(110px, 100%);
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, var(--surface-2) 0 83%, transparent 84%),
    conic-gradient(var(--ring-color, var(--accent)) calc(var(--value) * 1%), var(--bar-track) 0);
  box-shadow: 0 4px 20px -8px rgba(22, 32, 26, .22);
}

/* Center: Archivo 900 percentage */
.rate-ring strong {
  font-family: var(--font-display-new);
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.rate-ring span {
  color: var(--muted);
  font-family: ui-monospace, "SF Mono", "Geist Mono", monospace;
  font-size: 11px;
  font-weight: 600;
}

.rate-ring-label {
  margin-top: 10px;
  color: var(--ink-soft);
  font-family: var(--font-display-new);
  font-weight: 700;
  font-size: 12px;
  line-height: 1.3;
}

.rate-ring-sub {
  margin-top: 3px;
  color: var(--muted);
  font-family: ui-monospace, "SF Mono", "Geist Mono", monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .02em;
}

.progress-chart {
  display: grid;
  gap: 10px;
  padding: 6px 20px 16px;
}

.progress-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px;
  gap: 14px;
  align-items: center;
}

.progress-label {
  color: var(--ink-mid);
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 5px;
}

.progress-track,
.severity-track {
  height: 9px;
  border-radius: 999px;
  background: var(--hairline);
  overflow: hidden;
}

.progress-fill,
.severity-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green), var(--green-soft));
  box-shadow: 0 0 18px rgba(0, 162, 99, .22);
}

.progress-fill.violet {
  background: linear-gradient(90deg, #5f4bb6, #8f7bea);
  box-shadow: 0 0 18px rgba(95, 75, 182, .18);
}

.progress-fill.amber {
  background: linear-gradient(90deg, #d99b20, var(--amber));
  box-shadow: 0 0 18px rgba(232, 181, 84, .2);
}

.progress-value,
.severity-count {
  color: var(--ink);
  font-family: "Geist Mono", monospace;
  font-size: 12px;
  text-align: right;
}

.severity-chart {
  display: grid;
  gap: 10px;
  padding: 6px 20px 16px;
}

.severity-row {
  display: grid;
  grid-template-columns: 8px 72px minmax(0, 1fr) 34px;
  gap: 12px;
  align-items: center;
}

.severity-name {
  color: var(--ink-mid);
  font-family: "Geist Mono", monospace;
  font-size: 10.5px;
  font-weight: 600;
}

.severity-fill.critical,
.sev-dot.critical,
.feed-dot.is-alert {
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(216, 98, 81, .12);
}

.severity-fill.warning,
.sev-dot.warning {
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(232, 181, 84, .12);
}

.severity-fill.medium,
.sev-dot.medium {
  background: var(--violet);
  box-shadow: 0 0 0 4px rgba(95, 75, 182, .12);
}

.pulse-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 6px 20px 16px;
}

/* Legend-row style for confirmation-mix card specifically */
.delivery-mix-card .pulse-metric {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  min-height: 0;
  gap: 10px;
  border-radius: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.pulse-metric {
  min-height: 70px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 14px;
  border: 1px solid var(--hairline);
  background: var(--hover-bg);
  padding: 12px;
}

.pulse-metric span {
  color: var(--muted);
  font-family: "Geist Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.delivery-mix-card .pulse-metric span {
  font-size: 11px;
  text-transform: none;
  letter-spacing: .01em;
  font-weight: 600;
  color: var(--ink-soft);
}

.pulse-metric strong {
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
}

.delivery-mix-card .pulse-metric strong {
  font-family: var(--font-display-new);
  font-size: 16px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* Status swatch via tone class (11px square, radius 3px) */
.delivery-mix-card .pulse-metric::before {
  content: "";
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 3px;
  flex-shrink: 0;
}

.delivery-mix-card .pulse-metric.green::before  { background: #00A24B; }
.delivery-mix-card .pulse-metric.amber::before  { background: #EBA433; }
.delivery-mix-card .pulse-metric.red::before    { background: #D6453B; }
.delivery-mix-card .pulse-metric.violet::before { background: #6E62D6; }

.pulse-metric.green { box-shadow: inset 0 0 0 1px rgba(0, 162, 99, .04); }
.pulse-metric.amber { box-shadow: inset 0 0 0 1px rgba(232, 181, 84, .10); }
.pulse-metric.red { box-shadow: inset 0 0 0 1px rgba(216, 98, 81, .10); }
.pulse-metric.violet { box-shadow: inset 0 0 0 1px rgba(95, 75, 182, .10); }

.coverage-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  padding: 12px 20px 20px;
}

.coverage-cell {
  aspect-ratio: 1;
  border-radius: 10px;
  background: var(--green-soft);
}

.coverage-cell.level-1 { background: #dfeee6; }
.coverage-cell.level-2 { background: #bddfc9; }
.coverage-cell.level-3 { background: #8dccaa; }
.coverage-cell.level-4 { background: #4fb580; }
.coverage-cell.level-5 { background: #008751; }

body.dark .coverage-cell.level-1 { background: rgba(247, 255, 250, .07); }
body.dark .coverage-cell.level-2 { background: rgba(0, 196, 86, .18); }
body.dark .coverage-cell.level-3 { background: rgba(0, 196, 86, .28); }
body.dark .coverage-cell.level-4 { background: rgba(0, 196, 86, .42); }
body.dark .coverage-cell.level-5 { background: var(--green); }

