:root {
  color-scheme: light;
  --ink: #18212f;
  --muted: #657084;
  --line: #d9e0ea;
  --panel: #ffffff;
  --page: #f5f7fb;
  --accent: #146c94;
  --accent-2: #2f8f67;
  --warn: #ad5f00;
  --soft: #eaf4f8;
  --soft-2: #eaf5ef;
  --store-1630: #f3f8fb;
  --store-7905: #f5fbf6;
  --total: #fff7e8;
  --store-1630-line: #8fb1c8;
  --store-7905-line: #8dbf9d;
  --total-line: #e3bd72;
  --customer-line: #cbd6e2;
  --chart-current: #0f6f9f;
  --chart-previous: #c45a2a;
  --shadow: 0 12px 28px rgba(28, 39, 57, 0.08);
  font-family: "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
}

.login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(420px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.login-card h1 {
  font-size: 30px;
}

.login-field {
  display: grid;
  gap: 6px;
  margin-top: 20px;
}

.login-field input {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #b8c4d4;
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
}

.login-card button {
  width: 100%;
  min-height: 42px;
  margin-top: 16px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.login-error {
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid #f0b3ad;
  border-radius: 6px;
  background: #fff1f0;
  color: #b42318;
  font-weight: 700;
}

.shell {
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.top-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.top-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.top-nav a.active {
  border-color: var(--accent);
  background: var(--soft);
  color: var(--accent);
}

.top-nav a.logout-link {
  margin-left: auto;
  border-color: #c9d4e2;
  background: #f9fbfd;
  color: #4d5b70;
}

.top-nav a.logout-link:hover {
  border-color: #aebdcd;
  background: #eef3f8;
  color: var(--ink);
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 24px;
  align-items: end;
  padding: 22px 0 18px;
}

.eyebrow,
.label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  margin-top: 4px;
  font-size: 34px;
  line-height: 1.1;
}

h2 {
  font-size: 18px;
}

.subtle {
  color: var(--muted);
  margin-top: 8px;
}

.meta,
.store-grid,
.filters {
  display: grid;
  gap: 12px;
}

.mailbox-filters {
  grid-template-columns: minmax(145px, 200px) auto;
}

.day-view-filters {
  grid-template-columns: repeat(2, minmax(160px, 220px)) repeat(2, minmax(130px, 170px));
}

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

.meta > div,
.store-card,
.table-section,
.chart-section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.meta > div {
  padding: 14px 16px;
}

.meta strong {
  display: block;
  margin-top: 7px;
  font-size: 22px;
}

.filters {
  grid-template-columns: repeat(2, minmax(145px, 200px)) minmax(140px, 180px) minmax(145px, 190px) auto;
  align-items: start;
  margin: 0 0 16px;
}

.filter-menu {
  position: relative;
}

.filter-menu summary,
.filters button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #b8c4d4;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.filter-menu summary::-webkit-details-marker {
  display: none;
}

.filter-menu summary::after {
  content: "v";
  color: var(--muted);
  font-size: 12px;
}

.option-list {
  position: absolute;
  z-index: 5;
  display: grid;
  gap: 6px;
  width: 100%;
  max-height: 280px;
  overflow: auto;
  margin-top: 6px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.option-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  color: #2c384b;
  font-size: 14px;
}

.select-field {
  display: grid;
  gap: 4px;
}

.select-field select {
  min-height: 38px;
  border: 1px solid #b8c4d4;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
}

.date-field {
  display: grid;
  gap: 4px;
}

.date-field input {
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid #b8c4d4;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
}

.month-options {
  grid-template-columns: repeat(2, 1fr);
}

.store-grid {
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  margin-bottom: 16px;
}

.store-card {
  padding: 16px;
}

.store-card h2 {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.metric {
  background: #f8fafc;
  border: 1px solid #e5ebf3;
  border-radius: 6px;
  padding: 10px;
}

.metric strong {
  display: block;
  margin-top: 5px;
  font-size: 18px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

button {
  min-height: 36px;
  border: 1px solid #b8c4d4;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.button-row {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.table-section,
.chart-section {
  overflow: hidden;
  margin-top: 16px;
}

.table-wrap {
  overflow-x: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
}

th,
td {
  padding: 8px 6px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  white-space: normal;
}

thead th.store-1630,
tbody td.store-1630,
tfoot td.store-1630 {
  background: var(--store-1630);
}

thead th.store-7905,
tbody td.store-7905,
tfoot td.store-7905 {
  background: var(--store-7905);
}

thead th.total-group,
tbody td.total-group,
tfoot td.total-group {
  background: var(--total);
}

thead th {
  background: #eef3f8;
  color: #334156;
  font-size: 11px;
  text-transform: uppercase;
}

thead tr:first-child th:first-child {
  background: #eef3f8;
}

tbody tr:hover td,
tbody tr:hover td:first-child {
  background: #f8fbfd;
}

tfoot td {
  background: #eef3f8;
  font-weight: 800;
}

tfoot td:first-child {
  background: #eef3f8;
}

.category-col {
  width: 13%;
  font-weight: 700;
  text-align: left;
  background: var(--panel);
}

.group-head {
  border-left: 2px solid #cad4e0;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.store-1630 {
  background: var(--store-1630);
  border-left: 1px solid var(--store-1630-line);
}

.store-7905 {
  background: var(--store-7905);
  border-left: 1px solid var(--store-7905-line);
}

.total-group {
  background: var(--total);
  border-left: 2px solid var(--total-line);
}

thead .store-1630,
thead .store-7905,
thead .total-group {
  color: #243246;
}

tbody td.store-1630,
tfoot td.store-1630 {
  border-left-color: var(--store-1630-line);
}

tbody td.store-7905,
tfoot td.store-7905 {
  border-left-color: var(--store-7905-line);
}

tbody td:nth-child(2),
tbody td:nth-child(6),
tbody td:nth-child(10),
tfoot td:nth-child(2),
tfoot td:nth-child(6),
tfoot td:nth-child(10) {
  border-left-width: 2px;
  border-left-style: solid;
}

tbody td:nth-child(2),
tfoot td:nth-child(2),
thead tr:nth-child(2) th:nth-child(1),
thead tr:first-child th:nth-child(2) {
  border-left-color: var(--store-1630-line);
}

tbody td:nth-child(6),
tfoot td:nth-child(6),
thead tr:nth-child(2) th:nth-child(5),
thead tr:first-child th:nth-child(3) {
  border-left-color: var(--store-7905-line);
}

tbody td:nth-child(10),
tfoot td:nth-child(10),
thead tr:nth-child(2) th:nth-child(9),
thead tr:first-child th:nth-child(4) {
  border-left-color: var(--total-line);
}

.positive {
  color: var(--accent-2);
}

.negative {
  color: #b33131;
}

.bars {
  display: grid;
  gap: 10px;
  padding: 16px 18px 20px;
}

.customer-tables {
  display: grid;
  gap: 16px;
  padding: 16px 18px 20px;
}

.customer-store-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.customer-store-table h3,
.chart-card h3 {
  margin: 0;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
  font-size: 15px;
}

.customer-store-table.store-card-1630 h3 {
  background: var(--store-1630);
  border-left: 1px solid var(--customer-line);
}

.customer-store-table.store-card-7905 h3 {
  background: var(--store-7905);
  border-left: 1px solid var(--customer-line);
}

.customer-table {
  min-width: 980px;
  border-collapse: collapse;
}

.customer-table th,
.customer-table td {
  font-size: 12px;
  border-right: 1px solid var(--customer-line);
  border-bottom: 1px solid var(--customer-line);
  border-left: 1px solid var(--customer-line) !important;
  background: #fff;
}

.customer-table th {
  background: #eef3f8;
}

.customer-table .category-col {
  background: #f8fafc;
}

.customer-table th:nth-child(n + 2):nth-child(-n + 8),
.customer-table td:nth-child(n + 2):nth-child(-n + 8) {
  background: #f7fafc;
}

.customer-table th:nth-child(n + 9):nth-child(-n + 10),
.customer-table td:nth-child(n + 9):nth-child(-n + 10) {
  background: #f4f8f5;
}

.customer-table th:nth-child(n + 11):nth-child(-n + 12),
.customer-table td:nth-child(n + 11):nth-child(-n + 12) {
  background: #fff9ec;
}

.customer-table th:nth-child(2),
.customer-table td:nth-child(2),
.customer-table th:nth-child(9),
.customer-table td:nth-child(9),
.customer-table th:nth-child(11),
.customer-table td:nth-child(11) {
  border-left-width: 2px !important;
}

.chart-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 16px 18px 20px;
}

.mailbox-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 16px 18px 20px;
}

.ups-analysis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  padding: 16px 18px 20px;
}

.ups-analysis .chart-card:nth-child(5n + 1),
.ups-analysis .chart-card:nth-child(5n + 2) {
  grid-column: span 3;
}

.ups-analysis .chart-card:nth-child(5n + 3) {
  grid-column: span 3;
}

.ups-analysis .chart-card:nth-child(5n + 4),
.ups-analysis .chart-card:nth-child(5n) {
  grid-column: span 3;
}

@media (min-width: 1320px) {
  .ups-analysis {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .ups-analysis .chart-card:nth-child(5n + 1),
  .ups-analysis .chart-card:nth-child(5n + 2) {
    grid-column: span 3;
  }

  .ups-analysis .chart-card:nth-child(5n + 3) {
    grid-column: span 3;
  }

  .ups-analysis .chart-card:nth-child(5n + 4),
  .ups-analysis .chart-card:nth-child(5n) {
    grid-column: span 2;
  }
}

@media (max-width: 1319px) {
  .ups-analysis .chart-card:nth-child(5n + 3),
  .ups-analysis .chart-card:nth-child(5n + 4),
  .ups-analysis .chart-card:nth-child(5n) {
    grid-column: span 2;
  }
}

.ups-analysis .chart-card:nth-child(5n + 3) .split-list {
  grid-template-columns: repeat(2, minmax(180px, 1fr));
}

.ups-analysis .chart-card:nth-child(5n + 3) .compact-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.ups-analysis .chart-card:nth-child(5n + 3) .compact-list li strong {
  float: none;
  margin-left: 0;
  white-space: nowrap;
}

.ups-analysis .chart-card:nth-child(5n + 3) .compact-list li span {
  min-width: 0;
}

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

.split-list h4 {
  margin: 0 0 8px;
  font-size: 13px;
}

.compact-list,
.anomaly-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 14px 18px 16px 32px;
}

.compact-list {
  padding: 0 0 0 20px;
}

.compact-list li,
.anomaly-list li {
  color: var(--muted);
}

.compact-list li span,
.anomaly-list li span {
  color: var(--ink);
}

.compact-list li strong,
.anomaly-list li strong {
  float: right;
  margin-left: 12px;
  color: var(--ink);
}

.mini-table {
  min-width: 420px;
}

.ups-usps-ratio {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 16px 18px 20px;
}

.shipping-ratio-card {
  min-width: 0;
}

.ratio-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
}

.single-ratio-metric {
  grid-template-columns: 1fr;
}

.ratio-metrics div {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  padding: 10px;
}

.ratio-metrics strong {
  display: block;
  margin-top: 5px;
  font-size: 20px;
}

.ratio-metrics small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 700;
}

.ratio-bars {
  display: grid;
  gap: 12px;
  padding: 0 14px 14px;
}

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

.ratio-bar-label,
.ratio-bar-values {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.ratio-bar-label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.ratio-bar-label strong {
  font-size: 11px;
}

.ratio-bar-values {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  text-transform: none;
}

.ratio-bar-track {
  position: relative;
  display: flex;
  width: 100%;
  height: 14px;
  overflow: hidden;
  border: 1px solid #cbd6e2;
  border-radius: 999px;
  background: #eef3f8;
}

.ratio-ups {
  background: #146c94;
}

.ratio-usps {
  background: #d99a36;
}

.ratio-target {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 4px;
  border-radius: 999px;
  transform: translateX(-2px);
  box-shadow: 0 0 0 2px #fff;
}

.target-good {
  color: #087f5b;
}

.target-alert {
  color: #b42318;
}

.ratio-target.target-good {
  background: #087f5b;
}

.ratio-target.target-alert {
  background: #d92d20;
}

.ratio-table-wrap {
  padding: 0 14px 14px;
}

.shipping-ratio-table {
  min-width: 0;
}

.ratio-impact {
  margin: 0 14px 14px;
  padding: 10px;
  border: 1px solid currentColor;
  border-radius: 6px;
  background: #f8fafc;
}

.ratio-impact strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 18px;
}

.ratio-impact small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-weight: 700;
}

.mailbox-chart-grid .chart-card:nth-child(3n) {
  grid-column: 1 / -1;
}

.chart-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.svg-chart {
  padding: 8px 10px 4px;
}

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

.axis {
  stroke: #9aa8b8;
  stroke-width: 1;
}

.grid-line {
  stroke: #e4ebf2;
  stroke-width: 1;
}

.current-week-line {
  stroke: #ef9a9a;
  stroke-width: 2;
  opacity: 0.65;
}

.current-week-label {
  fill: #b84242;
  font-size: 11px;
  font-weight: 700;
}

.line {
  fill: none;
  stroke-width: 2;
}

.year-line {
  stroke-linejoin: round;
  stroke-linecap: round;
}

.selected-year-line {
  stroke-width: 2.4;
}

.historical-year-line {
  stroke-width: 1.6;
  stroke-dasharray: 5 5;
  opacity: 0.9;
}

.current-line {
  stroke: var(--chart-current);
}

.previous-line {
  stroke: var(--chart-previous);
  stroke-dasharray: 7 6;
}

.dot {
  fill: var(--chart-current);
}

.year-dot {
  stroke: #fff;
  stroke-width: 1;
}

.previous-dot {
  fill: var(--chart-previous);
}

.data-label {
  font-size: 10px;
  font-weight: 500;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 3px;
  stroke-linejoin: round;
}

.current-year-label {
  fill: #111827;
}

.current-label {
  fill: var(--chart-current);
}

.previous-label {
  fill: var(--chart-previous);
}

.tick {
  fill: var(--muted);
  font-size: 11px;
}

.month-tick {
  fill: #2f3b4f;
  font-size: 11px;
  font-weight: 800;
}

.legend {
  display: grid;
  gap: 7px;
  justify-content: start;
  padding: 0 12px 14px 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

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

.legend i {
  display: inline-block;
  width: 22px;
  height: 3px;
  border-radius: 999px;
}

.empty-chart {
  padding: 24px;
  color: var(--muted);
}

.current-swatch {
  background: var(--chart-current);
}

.previous-swatch {
  background: repeating-linear-gradient(90deg, var(--chart-previous) 0 6px, transparent 6px 10px);
}

.bar-row {
  display: grid;
  grid-template-columns: 180px 1fr 110px;
  gap: 12px;
  align-items: center;
}

.track {
  height: 12px;
  background: #e7edf5;
  border-radius: 999px;
  overflow: hidden;
}

.fill {
  height: 100%;
  width: var(--bar-width);
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.cams-theme {
  color-scheme: dark;
  --ink: #edf0f2;
  --muted: #b7bec6;
  --line: #56616d;
  --panel: #303942;
  --page: #242b33;
  --accent: #9fc4d6;
  --accent-2: #a8c3aa;
  --soft: #3a4650;
  --soft-2: #33413d;
  --store-1630: #34424c;
  --store-7905: #33463f;
  --shadow: 0 16px 30px rgba(10, 14, 18, 0.22);
}

.cams-theme .top-nav a,
.cams-theme .filter-menu summary,
.cams-theme .filters button,
.cams-theme button {
  background: #38424c;
  border-color: #64717e;
  color: #f1f4f6;
}

.cams-theme .top-nav a.active {
  background: #46535d;
  border-color: #9fc4d6;
  color: #f7fbfd;
}

.cams-theme .meta > div,
.cams-theme .store-card,
.cams-theme .table-section,
.cams-theme .chart-section,
.cams-theme .chart-card,
.cams-theme .metric {
  background: var(--panel);
  border-color: var(--line);
}

.cams-theme .store-card .metric {
  background: #3c4751;
  border-color: #73808c;
}

.cams-theme .store-card .metric .label {
  color: #cdd4da;
}

.cams-theme .option-list {
  background: #38424c;
  border-color: #64717e;
}

.cams-theme .option-list label {
  color: #edf0f2;
}

.cams-theme thead th,
.cams-theme tfoot td,
.cams-theme tfoot td:first-child,
.cams-theme thead tr:first-child th:first-child {
  background: #46535d;
  color: #f1f4f6;
}

.cams-theme .category-col {
  background: #343e47;
}

.cams-theme tbody tr:hover td,
.cams-theme tbody tr:hover td:first-child {
  background: #3f4b55;
}

.cams-theme .customer-store-table {
  background: #303942;
}

.cams-theme .customer-table th,
.cams-theme .customer-table td,
.cams-theme .customer-table .category-col,
.cams-theme .customer-table th:nth-child(n + 2):nth-child(-n + 8),
.cams-theme .customer-table td:nth-child(n + 2):nth-child(-n + 8),
.cams-theme .customer-table th:nth-child(n + 9):nth-child(-n + 10),
.cams-theme .customer-table td:nth-child(n + 9):nth-child(-n + 10),
.cams-theme .customer-table th:nth-child(n + 11):nth-child(-n + 12),
.cams-theme .customer-table td:nth-child(n + 11):nth-child(-n + 12) {
  background: #343e47;
  border-color: #5c6874;
  color: #edf0f2;
}

.cams-theme .customer-table th {
  background: #46535d;
  color: #f1f4f6;
}

.cams-theme .customer-table tbody tr:hover td,
.cams-theme .customer-table tbody tr:hover .category-col {
  background: #3f4b55;
}

.cams-theme .customer-store-table h3,
.cams-theme .chart-card h3 {
  background: #414d57;
  border-bottom-color: #64717e;
  color: #f7fbfd;
}

.cams-theme .customer-store-table.store-card-1630 h3,
.cams-theme .customer-store-table.store-card-7905 h3 {
  background: #414d57;
  border-left-color: #7d8a96;
}

.cams-theme .cams-mix-table {
  min-width: 0;
}

.cams-theme .cams-mix-table .category-col {
  width: auto;
}

.cams-theme .cams-mix-table th:nth-child(2),
.cams-theme .cams-mix-table td:nth-child(2),
.cams-theme .cams-mix-table th:nth-child(3),
.cams-theme .cams-mix-table td:nth-child(3),
.cams-theme .cams-mix-table th:nth-child(4),
.cams-theme .cams-mix-table td:nth-child(4) {
  width: 140px;
}

.cams-theme .grid-line {
  stroke: #4f5b66;
}

.cams-theme .axis {
  stroke: #87939e;
}

.cams-theme .tick,
.cams-theme .legend,
.cams-theme .compact-list li {
  color: #b7bec6;
  fill: #b7bec6;
}

.cams-theme .compact-list li span,
.cams-theme .compact-list li strong {
  color: #edf0f2;
}

.cams-analysis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 14px;
}

.cams-analysis .chart-card:nth-child(3n) {
  grid-column: 1 / -1;
}

.cams-mix-card {
  padding-bottom: 16px;
}

.cams-actual-table {
  min-width: 420px;
}

.printing-analysis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 14px;
}

.printing-analysis .chart-card:nth-child(5n + 3),
.printing-analysis .chart-card:nth-child(5n + 4),
.printing-analysis .chart-card:nth-child(5n + 5) {
  grid-column: span 1;
}

.insight-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 16px 22px 18px 34px;
  color: var(--muted);
}

.insight-list strong {
  color: var(--ink);
}

.daily-table-scroll {
  overflow-x: auto;
}

.daily-month-table {
  min-width: 1120px;
}

.daily-month-table thead tr:first-child th {
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.daily-month-table th,
.daily-month-table td {
  border-right: 1px solid var(--customer-line);
}

.daily-month-table th:nth-child(2n),
.daily-month-table td:nth-child(2n) {
  border-left: 2px solid #c5d2e0;
}

.daily-month-table .category-col {
  width: 150px;
}

.daily-month-table .day-label {
  padding-left: 24px;
  font-weight: 500;
}

.month-total-row td {
  background: #eef3f8;
  font-weight: 900;
}

.day-view-store-grid {
  grid-template-columns: repeat(3, minmax(240px, 1fr));
}

.day-view-table-scroll {
  overflow-x: auto;
}

.day-view-table {
  min-width: 980px;
}

.day-view-table th,
.day-view-table td {
  border-right: 1px solid var(--customer-line);
}

.day-view-table .pivot-label {
  width: 44%;
  text-align: left;
}

.day-view-table tbody tr.pivot-category td {
  background: #eef3f8;
  font-weight: 900;
}

.day-view-table tbody tr.pivot-subcategory td {
  background: #f8fafc;
  font-weight: 800;
}

.day-view-table tbody tr.pivot-subcategory .pivot-label {
  padding-left: 24px;
}

.day-view-table tbody tr.pivot-item .pivot-label {
  padding-left: 44px;
  font-weight: 500;
}

.day-view-table .pivot-empty {
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

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

.owner-goal-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.owner-goal-card h2 {
  align-items: flex-start;
}

.goal-card-body {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.goal-card-body div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  padding-top: 8px;
  border-top: 1px solid #e5ebf3;
}

.goal-card-body strong {
  font-size: 18px;
  text-align: right;
}

.owner-store-card .good,
.good {
  color: #087f5b;
}

.owner-store-card .warn,
.warn {
  color: #a15c00;
}

.owner-store-card .danger,
.danger {
  color: #b42318;
}

.owner-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.owner-card-grid small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

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

.owner-definitions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
}

.flag-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.flag-card h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.flag-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.flag-good {
  border-left: 5px solid #2f8f67;
}

.flag-warn {
  border-left: 5px solid #d99a36;
}

.flag-danger {
  border-left: 5px solid #d14c3f;
}

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

.owner-lever-list {
  display: grid;
  gap: 1px;
  background: var(--line);
}

.owner-lever-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: #fff;
}

.owner-lever-list span {
  color: var(--muted);
  font-weight: 700;
}

.owner-lever-list strong {
  text-align: right;
}

.owner-ratio-sections {
  display: grid;
  gap: 18px;
  padding: 16px 18px 20px;
}

.owner-ratio-group {
  display: grid;
  gap: 10px;
}

.owner-ratio-group > h3 {
  margin: 0;
  font-size: 16px;
}

.owner-ratio-group .ups-usps-ratio {
  padding: 0;
}

@media (max-width: 900px) {
  .toolbar,
  .store-grid,
  .owner-summary-grid,
  .owner-goal-grid,
  .meta,
  .filters,
  .day-view-filters,
  .day-view-store-grid {
    grid-template-columns: 1fr;
  }

  .table-wrap {
    overflow-x: auto;
  }

  table {
    min-width: 980px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .bar-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

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

  .mailbox-chart-grid {
    grid-template-columns: 1fr;
  }

  .ups-analysis,
  .ups-usps-ratio,
  .cams-analysis,
  .printing-analysis,
  .owner-flags,
  .owner-lever-grid,
  .owner-definitions,
  .split-list {
    grid-template-columns: 1fr;
  }

  .ups-analysis .chart-card:nth-child(n) {
    grid-column: 1;
  }

  .cams-analysis .chart-card:nth-child(n) {
    grid-column: 1;
  }

  .printing-analysis .chart-card:nth-child(n) {
    grid-column: 1;
  }
}
