:root {
  color-scheme: light;
  --ink: #191a1f;
  --muted: #666972;
  --line: #ddd6cd;
  --page: #f4f0ea;
  --surface: #fffdfa;
  --surface-soft: #f8f1e9;
  --brand: #ff6200;
  --brand-dark: #1f2026;
  --brand-soft: #fff0e4;
  --accent: #2e3138;
  --accent-soft: #ece7df;
  --success: #2f7d5b;
  --warning: #b57a18;
  --shadow: 0 18px 44px rgba(22, 16, 10, 0.08);
  --shadow-strong: 0 24px 54px rgba(22, 16, 10, 0.14);
  --body-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display-font: "Avenir Next Condensed", "Avenir Next", "Helvetica Neue", "Arial Narrow", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--page);
  color: var(--ink);
  font-family: var(--body-font);
}

button,
input,
select {
  font: inherit;
}

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 24px clamp(18px, 4vw, 56px) 20px;
  background:
    radial-gradient(circle at top left, rgba(255, 98, 0, 0.22), transparent 26%),
    linear-gradient(135deg, #131418 0%, #1d1f25 48%, #24262e 100%);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-strong);
}

.hero__content {
  max-width: 900px;
  min-width: 0;
}

.hero__brand {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 10px;
}

.hero__logo {
  width: clamp(180px, 17vw, 245px);
  max-width: 100%;
  height: auto;
  opacity: 0.96;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.16));
}

.hero__brand-copy {
  display: grid;
  gap: 3px;
}

.hero__client {
  display: inline-flex;
  align-items: baseline;
  gap: 0.48em;
  flex-wrap: wrap;
  color: rgba(255, 194, 151, 0.92);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.client-wordmark {
  color: #fff;
  font-size: 1.22rem;
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 1;
  text-transform: lowercase;
}

.client-wordmark span {
  color: var(--brand);
}

.hero h1,
.section-heading h2,
.data-note h2 {
  margin: 0;
  letter-spacing: 0;
  font-family: var(--display-font);
  font-weight: 700;
}

.hero h1 {
  max-width: 18ch;
  font-size: clamp(1.72rem, 3vw, 2.62rem);
  line-height: 0.98;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.hero__meta {
  display: grid;
  gap: 6px;
  min-width: min(250px, 100%);
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.92);
  text-align: right;
  font-size: 0.88rem;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero .eyebrow {
  margin: 0;
  color: #ffb178;
}

main {
  display: grid;
  gap: 18px;
  padding: 24px clamp(16px, 4vw, 56px) 48px;
  overflow-x: hidden;
}

.dashboard-view {
  display: grid;
  gap: 18px;
}

.dashboard-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 253, 250, 0.78);
}

.dashboard-tab {
  min-height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.dashboard-tab[aria-pressed="true"] {
  background: var(--brand-soft);
  color: var(--brand-dark);
  box-shadow: inset 0 0 0 1px rgba(255, 98, 0, 0.18);
}

.dashboard-tab:hover {
  background: var(--surface-soft);
  color: var(--brand-dark);
}

.dashboard-tab[aria-pressed="true"]:hover {
  background: var(--brand-soft);
}

.dashboard-band--insights {
  gap: 20px;
}

.insights-controls {
  display: inline-flex;
  gap: 4px;
  flex-wrap: wrap;
  width: fit-content;
  max-width: 100%;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 253, 250, 0.78);
}

.insights-mode {
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.insights-mode[aria-pressed="true"] {
  background: var(--brand-soft);
  color: var(--brand-dark);
  box-shadow: inset 0 0 0 1px rgba(255, 98, 0, 0.18);
}

.insights-mode:hover {
  background: var(--surface-soft);
  color: var(--brand-dark);
}

.insights-mode[aria-pressed="true"]:hover {
  background: var(--brand-soft);
}

.insights-compare-picker {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 36px;
  padding: 3px 8px 3px 3px;
  border-left: 1px solid rgba(221, 214, 205, 0.75);
  background: var(--surface);
}

.insights-compare-picker__label {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 6px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  box-shadow: inset 0 0 0 1px rgba(255, 98, 0, 0.18);
  font-size: 0.82rem;
  font-weight: 850;
}

.insights-compare-picker label {
  display: inline-flex;
  align-items: center;
}

.insights-compare-picker select {
  min-height: 30px;
  padding: 0 24px 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--brand-dark);
  font-size: 0.84rem;
  font-weight: 850;
}

.insights-compare-picker__arrow {
  color: rgba(31, 32, 38, 0.42);
  font-weight: 900;
}

.insights-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.insight-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 18px 18px 16px;
  border: 1px solid rgba(255, 98, 0, 0.12);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 250, 246, 0.98), rgba(255, 253, 250, 1));
  box-shadow: var(--shadow);
}

.insight-card--primary {
  background:
    radial-gradient(circle at top right, rgba(255, 98, 0, 0.12), transparent 36%),
    linear-gradient(180deg, rgba(255, 246, 238, 0.98), rgba(255, 253, 250, 1));
}

.insight-card span,
.insight-card small {
  color: var(--muted);
}

.insight-card strong {
  align-self: end;
  font-size: clamp(1.8rem, 2.4vw, 2.5rem);
  font-family: var(--display-font);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.insight-card strong.insight-compare-metric {
  align-self: stretch;
  font-size: 1rem;
  font-family: var(--body-font);
  font-weight: 800;
  line-height: 1.2;
}

.insight-compare-values {
  display: grid;
  gap: 8px;
}

.insight-compare-values span {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: baseline;
  color: var(--brand-dark);
}

.insight-compare-values em {
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0;
}

.insight-business-panel {
  margin: 0;
}

.chart-panel--insight {
  padding: 22px;
}

.chart--insight {
  min-height: 360px;
}

.insight-table table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
}

.panel-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin: -2px 0 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(221, 214, 205, 0.9);
}

.panel-title-row h3 {
  margin: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
}

.panel-link-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
}

.insight-table-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 12px;
}

.insight-table-controls input {
  width: min(320px, 100%);
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
}

.insight-table-controls span {
  font-size: 0.82rem;
  font-weight: 700;
}

.insight-table__scroll {
  max-height: 360px;
  overflow: auto;
  border: 1px solid rgba(221, 214, 205, 0.9);
  border-radius: 14px;
}

.insight-table__scroll--expanded {
  max-height: 680px;
}

.insight-table th,
.insight-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(221, 214, 205, 0.9);
  text-align: left;
}

.insight-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface);
}

.insight-table th:last-child,
.insight-table td:last-child {
  text-align: right;
}

.insight-list {
  display: grid;
  gap: 10px;
}

.insight-list__row {
  display: grid;
  gap: 6px;
}

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

.insight-list__label {
  font-weight: 700;
}

.insight-list__value,
.insight-delta {
  font-variant-numeric: tabular-nums;
}

.insight-list__value {
  color: var(--brand-dark);
  font-weight: 800;
}

.insight-list__track {
  height: 10px;
  border-radius: 999px;
  background: #eee5db;
  overflow: hidden;
}

.insight-list__fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff6200, #ff9b58);
}

.insight-delta {
  font-size: 0.84rem;
  font-weight: 700;
}

.insight-delta--up {
  color: var(--success);
}

.insight-delta--down {
  color: #9b2f2f;
}

.insight-chart-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.insight-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.insight-chart-legend i {
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

.year-bar {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0;
}

.toolbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  position: relative;
  overflow: visible;
}

.toolbar > * {
  position: relative;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.multi-filter {
  position: relative;
  display: grid;
  gap: 6px;
  min-width: 0;
  z-index: 1;
}

.year-filter {
  display: grid;
  gap: 6px;
  min-width: min(260px, 100%);
  max-width: 320px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.year-filter--secondary {
  min-width: min(220px, 100%);
  max-width: 280px;
}

.year-filter label {
  color: var(--brand-dark);
}

.year-filter select {
  min-height: 42px;
  font-weight: 800;
  background: #fff;
}

.multi-filter:focus-within {
  z-index: 40;
}

.date-filter {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  align-items: end;
  min-width: 0;
}

.date-filter--with-fields {
  grid-column: span 2;
  grid-template-columns: minmax(160px, 0.85fr) minmax(240px, 1.15fr);
}

.date-filter label {
  grid-column: 1 / -1;
}

.date-filter__fields {
  display: grid;
  gap: 6px;
  margin-top: 0;
}

.date-filter__fields--range {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.date-filter__fields[hidden] {
  display: none;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdfa;
  color: var(--ink);
  padding: 0 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 38px;
  background-image:
    linear-gradient(45deg, transparent 50%, #6f7a84 50%),
    linear-gradient(135deg, #6f7a84 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

input:focus,
select:focus {
  outline: none;
  border-color: rgba(255, 98, 0, 0.5);
  box-shadow: 0 0 0 4px rgba(255, 98, 0, 0.12);
}

input::placeholder {
  color: #6f7a84;
  opacity: 1;
}

.multi-filter__input--selected {
  color: var(--brand-dark);
  font-weight: 800;
}

.filter-chips {
  display: none;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.filter-chip span:first-child,
.filter-chip {
  overflow-wrap: anywhere;
}

.multi-filter__options {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 30;
  display: grid;
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffdfa;
  box-shadow: 0 16px 36px rgba(22, 16, 10, 0.1);
}

.multi-filter__options:empty {
  display: none;
}

.multi-filter__clear {
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--brand-dark);
  padding: 10px;
  text-align: left;
  font-size: 0.82rem;
  font-weight: 850;
  cursor: pointer;
}

.multi-filter__clear:hover {
  background: var(--brand-soft);
}

.multi-filter__option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 9px 10px;
  text-align: left;
  cursor: pointer;
}

.multi-filter__option:last-child {
  border-bottom: 0;
}

.multi-filter__option:hover,
.multi-filter__option[aria-pressed="true"] {
  background: var(--surface-soft);
}

.multi-filter__check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--brand-dark);
  font-size: 0.72rem;
  font-weight: 900;
}

.multi-filter__empty {
  padding: 12px;
  color: var(--muted);
  font-size: 0.84rem;
  text-transform: none;
}

.reset-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 250, 0.86);
  color: var(--muted);
  padding: 0 12px;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  align-self: end;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.reset-button:hover {
  border-color: rgba(255, 98, 0, 0.24);
  background: var(--surface-soft);
  color: var(--brand-dark);
}

.download-workbook-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  max-width: 100%;
  padding: 0 12px;
  border: 1px solid rgba(25, 26, 31, 0.16);
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.download-workbook-button:hover:not(:disabled) {
  background: #2e3138;
  box-shadow: 0 8px 16px rgba(22, 16, 10, 0.08);
}

.download-workbook-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.kpi-card,
.breakdown-panel,
.progress-panel,
.table-panel,
.insight-panel,
.chart-panel,
.data-note {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.kpi-card {
  display: grid;
  gap: 8px;
  min-height: 126px;
  min-width: 0;
  padding: 20px 18px 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(252, 247, 242, 0.98)),
    var(--surface);
}

.kpi-card--primary {
  background:
    linear-gradient(180deg, rgba(255, 251, 247, 0.98), rgba(255, 254, 252, 0.98)),
    var(--surface);
  border-color: rgba(255, 98, 0, 0.1);
  box-shadow: 0 18px 36px rgba(22, 16, 10, 0.08);
}

.kpi-card span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.kpi-card strong {
  align-self: end;
  font-size: 1.72rem;
  font-family: var(--display-font);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  max-width: 100%;
}

.kpi-card small {
  font-size: 0.8rem;
  line-height: 1.2;
}

.kpi-card small,
.muted,
.section-heading p {
  color: var(--muted);
}

.section-note {
  margin: 0 0 12px;
}

.dashboard-band {
  display: grid;
  gap: 18px;
  padding: 14px 0;
}

.dashboard-band--supporting {
  gap: 14px;
}

.dashboard-band--supporting .section-heading {
  align-items: center;
}

.dashboard-band--supporting .section-heading h2 {
  font-size: 1.55rem;
}

.dashboard-band--supporting .progress-panel,
.dashboard-band--supporting .tab-detail {
  border-color: var(--line);
  background: var(--surface);
}

.detail-table__sort {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.detail-table__sort:hover {
  border-color: rgba(255, 98, 0, 0.24);
  background: var(--surface-soft);
}

.reporting-workflow {
  display: grid;
  gap: 10px;
  padding: 4px 0 18px;
}

.reporting-table-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.workflow-section-heading {
  display: grid;
  gap: 2px;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
}

.workflow-section-heading h2 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.05;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  padding-bottom: 2px;
}

.section-heading > div {
  position: relative;
  padding-left: 16px;
}

.section-heading > div::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 6px;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--brand) 0%, rgba(255, 98, 0, 0.2) 100%);
}

.section-heading h2 {
  font-size: 1.9rem;
  line-height: 0.98;
}

.section-heading p:last-child {
  max-width: 560px;
  margin: 0;
  line-height: 1.35;
  text-align: right;
}

.section-heading p:last-child:empty {
  display: none;
}

.chart-layout,
.comparison-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
}

.chart-panel,
.insight-panel,
.progress-panel,
.table-panel,
.breakdown-panel,
.data-note {
  padding: 22px;
  background: var(--surface);
}

.table-panel,
.breakdown-panel--wide {
  overflow-x: auto;
}

.chart {
  min-height: 330px;
}

.chart svg {
  display: block;
  width: 100%;
  height: auto;
}

.chart .axis-label {
  fill: var(--muted);
  font-size: 11px;
  letter-spacing: 0.02em;
}

.chart .bar {
  fill: url(#dailyBarGradient);
  opacity: 0.9;
}

.chart .bar:hover {
  fill: #ff7a29;
}

.chart .grid-line {
  stroke: rgba(46, 49, 56, 0.1);
  stroke-dasharray: 4 6;
}

.chart .axis-line {
  stroke: rgba(46, 49, 56, 0.16);
}

.chart .actual-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.single-day-delivery {
  display: grid;
  align-content: center;
  min-height: 330px;
  gap: 10px;
}

.single-day-delivery > span,
.single-day-delivery__grid span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.single-day-delivery > strong {
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  font-family: var(--display-font);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.single-day-delivery > small {
  color: var(--muted);
  font-size: 1rem;
}

.single-day-delivery__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.single-day-delivery__grid div {
  display: grid;
  gap: 6px;
  min-width: 0;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.single-day-delivery__grid strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1rem;
}

.insight-panel h3,
.breakdown-panel h3 {
  margin: -2px 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(221, 214, 205, 0.9);
  color: var(--brand-dark);
  font-size: 0.95rem;
  font-family: var(--display-font);
  font-weight: 700;
  letter-spacing: 0;
}

.insight-panel dl {
  display: grid;
  gap: 14px;
  margin: 0;
}

.insight-panel dl div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: baseline;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.insight-panel dl div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

dt {
  color: var(--muted);
  font-size: 0.84rem;
}

dd {
  margin: 0;
  font-family: var(--display-font);
  font-weight: 850;
  letter-spacing: -0.01em;
  text-align: right;
}

.progress-panel {
  display: grid;
  align-content: center;
  gap: 14px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.snapshot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.snapshot-grid--compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.snapshot-grid div {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.snapshot-grid span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.snapshot-grid strong {
  color: var(--ink);
  font-size: 1.65rem;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.live-pacing-section {
  padding-top: 4px;
}

.live-pacing-controls {
  max-width: 360px;
}

.live-pacing-controls input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  min-height: 40px;
  padding: 9px 12px;
}

.live-pacing-controls input:focus {
  border-color: rgba(255, 98, 0, 0.34);
  box-shadow: 0 0 0 3px rgba(255, 98, 0, 0.12);
  outline: 0;
}

.live-pacing-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.live-pacing-table__scroll {
  max-height: 420px;
  overflow: auto;
}

.live-pacing-table table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1120px;
}

.live-pacing-table th,
.live-pacing-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.live-pacing-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
}

.live-pacing-table__sort {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  padding: 0;
  text-align: left;
  text-transform: inherit;
}

.live-pacing-table__sort:hover {
  color: var(--ink);
}

.live-pacing-table__sort span {
  min-width: 8px;
  color: var(--brand);
}

.live-pacing-table td {
  color: var(--ink);
  font-size: 0.88rem;
}

.live-pacing-table tr:last-child td {
  border-bottom: 0;
}

.live-pacing-table__metric {
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.breakdown-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.breakdown-panel--wide {
  grid-column: 1 / -1;
}

.bar-list {
  display: grid;
  gap: 14px;
}

.bar-list__toggle {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--muted);
  padding: 0;
  font-size: 1rem;
  font-weight: 850;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.bar-list__toggle:hover {
  background: var(--surface-soft);
  border-color: rgba(255, 98, 0, 0.24);
  color: var(--brand-dark);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(21, 32, 43, 0.42);
}

.modal[hidden] {
  display: none;
}

.modal__panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 16px;
  width: min(980px, 100%);
  max-height: min(760px, calc(100vh - 56px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 24px 80px rgba(22, 39, 54, 0.24);
  padding: 20px;
}

.modal__header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.modal__header h2 {
  margin: 0;
  font-size: 1.35rem;
}

.modal__close {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--muted);
  padding: 0 12px;
  font-size: 0.82rem;
  font-weight: 850;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.modal__close:hover {
  background: var(--surface-soft);
  border-color: rgba(255, 98, 0, 0.24);
  color: var(--brand-dark);
}

.bar-list--modal {
  max-height: 100%;
  overflow-y: auto;
  padding-right: 6px;
}

.bar-row {
  display: grid;
  gap: 6px;
}

.bar-row__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: baseline;
  font-size: 0.92rem;
}

.bar-row__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-row__value {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

.bar-row__track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(236, 231, 223, 0.9), rgba(248, 241, 233, 0.9));
}

.bar-row__fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff6200 0%, #ff8d47 100%);
}

table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--brand-dark);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: linear-gradient(180deg, rgba(255, 245, 238, 0.95), rgba(248, 241, 233, 0.98));
}

tbody tr {
  transition: background 0.16s ease;
}

tbody tr:hover {
  background: rgba(255, 98, 0, 0.04);
}

.number {
  text-align: right;
  white-space: normal;
  overflow-wrap: anywhere;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.empty {
  padding: 24px 18px;
  border: 1px dashed rgba(46, 49, 56, 0.14);
  border-radius: 14px;
  background: rgba(248, 241, 233, 0.65);
  color: var(--muted);
  text-align: center;
}

.tab-detail {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: none;
  overflow: hidden;
}

.tab-detail summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 14px;
  background: var(--surface);
  color: var(--brand-dark);
  font-size: 0.92rem;
  font-weight: 820;
  cursor: pointer;
}

.tab-detail summary::after {
  content: "+";
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
}

.tab-detail[open] summary {
  border-bottom: 1px solid var(--line);
}

.tab-detail[open] summary::after {
  content: "-";
}

.detail-table {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  max-height: min(620px, calc(100vh - 180px));
  padding: 16px 18px 18px;
  overflow: hidden;
}

.detail-table__toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(221, 214, 205, 0.9);
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
}

.detail-table__controls {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-table__controls button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  padding: 0 10px;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.detail-table__controls button:hover:not(:disabled) {
  background: var(--surface-soft);
  border-color: rgba(255, 98, 0, 0.2);
}

.detail-table__icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 58px;
  justify-content: center;
}

.detail-table__icon span {
  font-size: 0.95rem;
  line-height: 1;
}

.detail-table__icon small {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
}

.detail-table__controls button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.detail-table__scroll {
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.detail-table__scroll th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: var(--surface);
  box-shadow: inset 0 -1px 0 var(--line);
}

.detail-table__sort {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  width: 100%;
  min-height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  text-transform: inherit;
}

.detail-table__sort span {
  min-width: 10px;
  color: var(--brand);
}

@media (max-width: 1180px) {
  .hero {
    display: grid;
    align-items: start;
  }

  .hero__meta {
    text-align: left;
  }

  .hero__brand {
    align-items: flex-start;
  }

  .toolbar {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }

  .date-filter {
    grid-column: 1 / -1;
  }

  .date-filter--with-fields {
    grid-template-columns: minmax(160px, 0.85fr) minmax(240px, 1.15fr);
  }

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

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

  .chart-layout,
  .comparison-grid {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 760px) {
  .hero,
  .section-heading {
    display: grid;
    align-items: start;
  }

  .hero__meta,
  .section-heading p:last-child {
    text-align: left;
  }

  .hero h1 {
    font-size: 2.25rem;
  }

  .hero__brand {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .hero__logo {
    width: min(240px, 68vw);
  }

  .hero__meta {
    min-width: 0;
    padding: 16px 18px;
  }

  .section-heading h2 {
    font-size: 1.55rem;
  }

  .toolbar,
  .kpi-grid,
  .insights-kpi-grid,
  .breakdown-grid,
  .single-day-delivery__grid,
  .snapshot-grid,
  .snapshot-grid--compact {
    grid-template-columns: 1fr;
  }

  .insights-compare-picker {
    width: 100%;
    justify-content: center;
    border-radius: 14px;
    flex-wrap: wrap;
  }

  .year-bar {
    display: block;
  }

  .year-filter {
    min-width: 0;
    max-width: none;
  }

  .dashboard-tabs {
    width: 100%;
  }

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

  .insights-controls {
    width: 100%;
  }

  .insights-mode {
    flex: 1 1 0;
    min-width: 0;
  }

  .date-filter {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .date-filter--with-fields {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .modal {
    padding: 14px;
  }

  .bar-row__top {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .bar-row__value {
    text-align: left;
    white-space: normal;
  }

  .kpi-card {
    min-height: 112px;
  }

  .kpi-card strong {
    font-size: 1.65rem;
  }

  .snapshot-grid strong {
    font-size: 1.35rem;
  }

  table {
    font-size: 0.82rem;
    min-width: 560px;
  }

  th,
  td {
    padding: 10px 6px;
  }
}

@media (max-width: 420px) {
  .hero h1 {
    font-size: 1.48rem;
  }
}
