/* Merchant overview: one metric rhythm and shared card boundaries. */
.overview-section {
  --overview-ink: #183a42;
  --overview-teal: #14967d;
  --overview-teal-soft: #eff8f5;
  --overview-line: #e1eae7;
  --overview-muted: #758887;
  --overview-columns: minmax(0, 2fr) minmax(280px, 1fr);
  color: var(--overview-ink);
}
.overview-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.overview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-bottom: 16px;
}
.overview-range,
.overview-metric-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--overview-line);
  border-radius: 10px;
  background: #edf3f0;
}
.overview-range-btn {
  min-height: 32px;
  padding: 6px 16px;
  border-radius: 6px;
  background: transparent;
  color: #657b78;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.overview-range-btn:hover { background: #f6faf8; }
.overview-range-btn.active {
  background: #fff;
  color: #17755f;
  box-shadow: 0 1px 4px rgba(23, 59, 46, .08);
}
.overview-sync-time {
  color: var(--overview-muted);
  font-size: 11px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
.overview-coverage-note {
  margin: 0 0 16px;
  border: 1px solid #dceae4;
  border-radius: 10px;
  background: #f3f8f5;
  color: #4c6e60;
  font-size: 12px;
  line-height: 1.65;
}
.overview-coverage-note[hidden] { display: none; }
.overview-coverage-note[data-tone="warning"] {
  border-color: #eddfbb;
  background: #fcf9ef;
  color: #8b6b2b;
}
.overview-coverage-note[data-tone="error"] {
  border-color: #edcfc9;
  background: #fcf3f1;
  color: #a3483e;
}
.overview-coverage-note > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  list-style: none;
}
.overview-coverage-note > summary::-webkit-details-marker { display: none; }
.overview-coverage-note > summary > span { min-width: 0; overflow-wrap: anywhere; }
.overview-coverage-chevron {
  width: 15px;
  height: 15px;
  flex: none;
  transition: transform .15s ease;
}
.overview-coverage-note[open] .overview-coverage-chevron { transform: rotate(180deg); }
.overview-coverage-note[open] > summary { border-bottom: 1px solid rgba(128, 119, 83, .14); }
.overview-coverage-detail { padding: 12px 14px 0; overflow-wrap: anywhere; }
.overview-coverage-source { margin: 5px 14px 12px; font-size: 11px; opacity: .85; overflow-wrap: anywhere; }
.overview-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.overview-kpi {
  display: grid;
  grid-template-rows: 22px minmax(38px, auto) minmax(18px, auto);
  align-content: start;
  gap: 9px;
  min-width: 0;
  min-height: 140px;
  padding: 20px;
  border: 1px solid var(--overview-line);
  border-radius: 12px;
  background: #fff;
}
.overview-kpi-primary { background: #f2f8f5; border-color: #d2e5db; }
.overview-kpi-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #637c75;
  font-size: 12px;
  font-weight: 600;
}
.overview-kpi-badge {
  flex: none;
  padding: 2px 6px;
  border-radius: 5px;
  background: #e2efe7;
  color: #58816a;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.6;
}
.overview-kpi > strong {
  display: block;
  align-self: center;
  margin: 0;
  color: var(--overview-ink);
  font-size: 30px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.04em;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.overview-kpi-primary > strong { color: #20775c; }
.overview-kpi > small { color: var(--overview-muted); font-size: 11px; line-height: 1.65; }
.overview-kpi > small b { font-weight: 500; }
.overview-main-grid,
.overview-lower-grid {
  display: grid;
  grid-template-columns: var(--overview-columns);
  align-items: stretch;
  gap: 16px;
  margin-top: 16px;
}
.overview-section .overview-main-grid > .panel,
.overview-section .overview-lower-grid > .panel {
  min-width: 0;
  margin: 0;
  padding: 20px;
  border-color: var(--overview-line);
  border-radius: 12px;
  box-shadow: none;
}
.overview-section .panel > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
}
.overview-section .panel > header h3 { margin: 0 0 5px; color: var(--overview-ink); font-size: 15px; line-height: 1.4; }
.overview-section .panel > header small { display: block; color: var(--overview-muted); font-size: 11px; line-height: 1.5; }
.overview-section .overview-metric-toggle { flex: none; border-radius: 7px; padding: 3px; gap: 2px; }
.overview-section .overview-metric-toggle button {
  min-height: 27px;
  padding: 4px 9px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #70847d;
  font-size: 11px;
}
.overview-section .overview-metric-toggle button.active { background: #fff; color: #1b765f; font-weight: 600; box-shadow: 0 1px 3px rgba(23, 59, 46, .06); }
.overview-trend-panel { position: relative; }
.overview-chart-wrap { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 8px; height: 208px; margin-top: 18px; }
.overview-chart-y { display: flex; flex-direction: column; justify-content: space-between; padding: 4px 0 5px; color: #8b9b95; font-size: 10px; line-height: 1; font-variant-numeric: tabular-nums; text-align: right; }
.overview-chart { position: relative; min-width: 0; }
.overview-chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.overview-grid-lines line { stroke: #e9efeb; stroke-width: 1; stroke-dasharray: 3 5; }
.overview-trend-area { fill: url(#overview-chart-fill); }
.overview-trend-line { fill: none; stroke: var(--overview-teal); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.overview-trend-points circle { fill: #fff; stroke: var(--overview-teal); stroke-width: 2; vector-effect: non-scaling-stroke; cursor: pointer; transition: r .15s ease; }
.overview-trend-points circle:hover,
.overview-trend-points circle:focus { r: 6; stroke-width: 3; outline: none; }
.overview-chart-labels { display: flex; justify-content: space-between; gap: 6px; margin: 8px 0 0 52px; color: #8b9b95; font-size: 10px; }
.overview-chart-labels span { min-width: 0; max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.overview-chart-labels [aria-hidden="true"] { display: none; }
.overview-chart-tooltip { position: absolute; z-index: 2; max-width: 200px; padding: 8px 10px; border: 1px solid #244a41; border-radius: 7px; background: #244a41; color: #fff; box-shadow: 0 4px 12px rgba(24, 58, 45, .12); font-size: 11px; white-space: nowrap; pointer-events: none; transform: translate(-50%, -115%); }
.overview-chart-tooltip strong { display: block; margin-bottom: 3px; font-size: 11px; }
.overview-chart-tooltip[hidden],
.overview-trend-empty[hidden] { display: none; }
.overview-trend-empty { position: absolute; inset: 145px 24px auto 76px; margin: 0; text-align: center; color: var(--overview-muted); font-size: 12px; }
.overview-channel-total { flex: none; padding-top: 3px; color: #617a70; font-size: 12px; font-variant-numeric: tabular-nums; }
.overview-donut { position: relative; display: grid; place-items: center; width: 142px; height: 142px; margin: 20px auto; border-radius: 50%; background: conic-gradient(#e5eeec 0 100%); }
.overview-donut::after { content: ""; position: absolute; inset: 20px; border-radius: 50%; background: #fff; }
.overview-donut > div { position: relative; z-index: 1; text-align: center; }
.overview-donut strong { display: block; color: var(--overview-ink); font-size: 25px; font-variant-numeric: tabular-nums; letter-spacing: -.025em; }
.overview-donut small { display: block; margin-top: 2px; color: var(--overview-muted); font-size: 10px; }
.overview-channel-list { display: grid; gap: 11px; border-top: 1px solid #edf1ee; padding-top: 14px; }
.overview-channel-list > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: #697f76; font-size: 12px; }
.overview-channel-list span { display: inline-flex; align-items: center; gap: 8px; }
.overview-channel-list i { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }
.overview-channel-list i.z { background: #8e80f8; }
.overview-channel-list b { color: var(--overview-ink); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.overview-section .overview-lower-grid > .overview-recent-panel { padding: 20px 0 0; overflow: hidden; }
.overview-recent-panel > header { padding: 0 20px; }
.overview-view-all { flex: none; padding-top: 2px; color: #2f8067; font-size: 12px; font-weight: 600; white-space: nowrap; }
.overview-view-all span { margin-left: 4px; }
.overview-recent-panel .table-scroll { max-width: 100%; margin-top: 12px; overflow-x: auto; }
.overview-recent-panel table { width: 100%; min-width: 680px; margin: 0; }
.overview-recent-panel th { background: #f8faf8; color: #84938c; font-weight: 500; }
.overview-recent-panel th,
.overview-recent-panel td { padding-top: 13px; padding-bottom: 13px; border-bottom-color: #edf1ee; font-size: 11px; }
.overview-recent-panel th:first-child,
.overview-recent-panel td:first-child { padding-left: 20px; }
.overview-recent-panel th:last-child,
.overview-recent-panel td:last-child { padding-right: 20px; }
.overview-recent-panel .empty-state { padding: 30px 20px; text-align: center; }
.overview-quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.overview-quick-grid button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-width: 0; min-height: 94px; padding: 16px 8px; border: 1px solid #e4ece7; border-radius: 9px; background: #fafcf9; color: #486c5c; font-size: 12px; font-weight: 600; text-align: center; transition: background .15s ease, border-color .15s ease; }
.overview-quick-grid button:hover { border-color: #bad7c6; background: #f0f7f1; }
.overview-quick-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: #edf4ee; color: #6d907a; }
.overview-quick-icon svg { width: 20px; height: 20px; }
.overview-quick-grid b { font-size: 12px; font-weight: 600; line-height: 1.4; }
.overview-ticket-panel { display: none; }
.overview-section :is(button, a, summary):focus-visible { outline: 2px solid var(--overview-teal); outline-offset: 3px; }
@media (max-width: 1180px) {
  .overview-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-section { --overview-columns: minmax(0, 1fr); }
  .overview-channel-panel { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 8px 24px; align-items: center; }
  .overview-channel-panel > header { grid-column: 1 / -1; }
  .overview-channel-panel .overview-donut { margin: 12px auto 0; }
  .overview-channel-list { border-top: 0; padding-top: 0; }
  .overview-quick-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .overview-toolbar { align-items: flex-start; gap: 10px; }
  .overview-range { width: 100%; }
  .overview-range-btn { flex: 1; min-width: 0; padding: 6px 8px; }
  .overview-sync-time { width: 100%; }
  .overview-kpi { min-height: 132px; padding: 16px; gap: 8px; }
  .overview-kpi > strong { font-size: 26px; }
  .overview-kpi-label { gap: 4px; font-size: 11px; }
  .overview-kpi-badge { font-size: 9px; padding: 1px 4px; }
  .overview-section .overview-main-grid > .panel,
  .overview-section .overview-lower-grid > .panel { padding: 16px; }
  .overview-chart-wrap { height: 188px; margin-top: 14px; }
  .overview-section .overview-lower-grid > .overview-recent-panel { padding: 16px 0 0; }
  .overview-recent-panel > header { padding: 0 16px; }
  .overview-channel-panel { grid-template-columns: 130px minmax(0, 1fr); gap: 8px 16px; }
  .overview-channel-panel .overview-donut { width: 122px; height: 122px; }
  .overview-donut::after { inset: 17px; }
  .overview-donut strong { font-size: 23px; }
  .overview-channel-list > div { font-size: 11px; }
  .overview-quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .overview-kpi { min-height: 132px; padding: 14px; }
  .overview-kpi > strong { font-size: 24px; }
  .overview-channel-panel { grid-template-columns: minmax(0, 1fr); }
  .overview-channel-panel .overview-donut { margin: 12px auto; }
  .overview-channel-list { border-top: 1px solid #edf1ee; padding-top: 14px; }
}
@media (max-width: 350px) {
  .overview-kpis { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .overview-range-btn,
  .overview-quick-grid button,
  .overview-coverage-chevron,
  .overview-trend-points circle { transition: none; }
}
