[hidden] {
  display: none !important;
}

.shops-page {
  --dashboard-ink: #112f31;
  --dashboard-muted: #637a79;
  --dashboard-a: #14766f;
  --dashboard-b: #526db2;
  --dashboard-warm: #d79b3d;
  background:
    radial-gradient(circle at 86% 2%, rgba(20, 118, 111, 0.14), transparent 24rem),
    linear-gradient(180deg, #eef4f0 0, #f8f6f0 28rem, #fffdfa 58rem);
  color: var(--dashboard-ink);
  min-height: 100vh;
}

.shops-hero {
  padding: 98px 0 38px;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px 48px;
  align-items: center;
}

@media (min-width: 960px) {
  .hero-layout > div:first-child {
    min-width: 420px;
  }
}

.shops-hero h1 {
  margin: 3px 0 14px;
  max-width: 900px;
  font-size: clamp(2.35rem, 4.2vw, 3.7rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
  color: var(--dashboard-ink);
  writing-mode: horizontal-tb;
  white-space: normal;
  overflow-wrap: anywhere;
}

.shops-hero .lead {
  max-width: 900px;
  margin: 0 0 20px;
  color: #425b6c;
  font-size: clamp(1rem, 1.25vw, 1.1rem);
  line-height: 1.72;
  writing-mode: horizontal-tb;
  white-space: normal;
  overflow-wrap: anywhere;
}

.shops-hero .eyebrow {
  writing-mode: horizontal-tb;
  white-space: normal;
}

.eyebrow,
.section-kicker {
  margin: 0;
  color: var(--dashboard-a);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.meta {
  color: var(--dashboard-muted);
  font-size: 14px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(148px, 1fr));
  width: min(100%, 320px);
  border: 1px solid rgba(10, 35, 55, 0.09);
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 24px 70px rgba(7, 26, 43, 0.1);
  backdrop-filter: blur(16px);
}

.hero-stats div {
  min-height: 106px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 16px 18px;
  border-right: 1px solid rgba(10, 35, 55, 0.08);
  border-bottom: 1px solid rgba(10, 35, 55, 0.08);
}

.hero-stats div:nth-child(2n) {
  border-right: 0;
}

.hero-stats div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.hero-stats strong {
  color: var(--dashboard-ink);
  font-size: 1.65rem;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.hero-stats div.is-money strong {
  font-size: 1.28rem;
}

.hero-stats span {
  margin-top: 5px;
  color: var(--dashboard-muted);
  font-size: 14px;
}

.hero-stats-wrap {
  display: grid;
  gap: 10px;
  justify-self: end;
  width: min(100%, 320px);
}

.dashboard-controls {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 22px;
}

.shop-tabs,
.mode-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.shop-tab,
.mode-tab {
  border: 1px solid #cfdee5;
  background: rgba(255, 255, 255, 0.82);
  color: var(--dashboard-ink);
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  transition: transform 160ms ease, border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.shop-tab:hover,
.mode-tab:hover {
  border-color: #8fa9b7;
  transform: translateY(-1px);
}

.shop-tab.active {
  background: var(--dashboard-ink);
  color: #fff;
  border-color: var(--dashboard-ink);
}

.mode-tabs {
  padding: 4px;
  border-radius: 15px;
  background: #dfeaed;
}

.mode-tab {
  border: 0;
  background: transparent;
  border-radius: 11px;
  color: #617381;
}

.mode-tab span {
  margin-right: 7px;
  color: #8da0ac;
  font-size: 14px;
  letter-spacing: 0.08em;
}

.mode-tab.active {
  color: var(--dashboard-ink);
  background: #fff;
  box-shadow: 0 5px 16px rgba(10, 35, 55, 0.1);
}

.dashboard-shell {
  margin-bottom: 76px;
}

.mode-panel {
  display: none;
}

.mode-panel.active {
  display: block;
}

.section-heading,
.visual-heading,
.explorer-head {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  align-items: end;
}

.section-heading h2,
.visual-heading h2,
.explorer-head h2 {
  margin: 5px 0 0;
  color: var(--dashboard-ink);
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  letter-spacing: -0.035em;
}

.section-heading > p,
.visual-heading > p {
  max-width: 520px;
  margin: 0;
  color: var(--dashboard-muted);
  font-size: 14px;
  line-height: 1.55;
  text-align: right;
}

.source-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0 30px;
}

.source-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  gap: 7px 12px;
  align-items: center;
  min-height: 104px;
  padding: 16px;
  border: 1px solid #dce7ec;
  border-radius: 16px;
  background: #fff;
  color: var(--dashboard-ink);
  cursor: pointer;
  text-align: left;
  box-shadow: 0 12px 34px rgba(7, 26, 43, 0.045);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.source-card:hover {
  transform: translateY(-2px);
  border-color: #a8c0cb;
  box-shadow: 0 18px 42px rgba(7, 26, 43, 0.08);
}

.source-card.error {
  border-color: #f0d5d8;
  background: #fffafb;
}

.source-index {
  grid-column: 1;
  grid-row: 1 / 3;
  color: #9cafb9;
  font: 700 0.66rem/1 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.source-label {
  grid-column: 2;
  grid-row: 1;
  font-size: 14px;
  font-weight: 750;
}

.source-card > strong {
  grid-column: 3;
  grid-row: 1 / 3;
  color: var(--dashboard-ink);
  font-size: 1.6rem;
  letter-spacing: -0.05em;
}

.source-status {
  grid-column: 2;
  grid-row: 2;
  color: var(--dashboard-muted);
  font-size: 14px;
}

.source-status i {
  width: 6px;
  height: 6px;
  display: inline-block;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--dashboard-a);
}

.source-card.error .source-status i {
  background: #d85b67;
}

.data-explorer,
.api-status,
.comparison-table-card {
  border: 1px solid #dce7ec;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 20px 55px rgba(7, 26, 43, 0.07);
}

.data-explorer {
  padding: 22px;
}

.explorer-head {
  align-items: center;
}

.explorer-head .meta {
  margin: 5px 0 0;
}

.field-count {
  min-width: 112px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.field-count strong {
  color: var(--dashboard-a);
  font-size: 1.8rem;
  letter-spacing: -0.05em;
}

.field-count span {
  color: var(--dashboard-muted);
  font-size: 14px;
}

.raw-toolbar {
  display: grid;
  grid-template-columns: minmax(230px, 0.8fr) minmax(260px, 1.4fr) auto auto;
  gap: 10px;
  align-items: end;
  margin: 22px 0 12px;
}

.raw-toolbar label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--dashboard-muted);
  font-size: 14px;
  font-weight: 700;
}

.raw-toolbar select,
.raw-toolbar input {
  width: 100%;
  min-height: 42px;
  border: 1px solid #d4e1e7;
  border-radius: 11px;
  padding: 9px 11px;
  background: #f9fbfc;
  color: var(--dashboard-ink);
  font: inherit;
  font-size: 14px;
  outline: none;
}

.raw-toolbar select:focus,
.raw-toolbar input:focus {
  border-color: var(--dashboard-a);
  box-shadow: 0 0 0 3px rgba(15, 158, 149, 0.1);
}

.raw-toolbar > .meta {
  align-self: center;
  white-space: nowrap;
}

.field-catalog {
  margin: 0 0 12px;
  border: 1px solid #e2ebef;
  border-radius: 12px;
  background: #f8fbfc;
}

.field-catalog summary,
.api-status > summary {
  padding: 12px 14px;
  cursor: pointer;
  color: #3c5667;
  font-size: 14px;
  font-weight: 750;
}

#field-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 220px;
  overflow: auto;
  padding: 2px 14px 14px;
}

#field-list code,
.capability-table code {
  border: 1px solid #e2e9ed;
  border-radius: 6px;
  background: #fff;
  color: #3b5868;
  font-size: 14px;
  overflow-wrap: anywhere;
}

#field-list code {
  padding: 5px 7px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid #e1eaee;
  border-radius: 14px;
  background: #fff;
}

.data-table-wrap {
  max-height: 700px;
}

#raw-table,
#comparison-table,
.capability-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}

#raw-table th,
#raw-table td,
#comparison-table th,
#comparison-table td,
.capability-table th,
.capability-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #e7eef1;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

#raw-table th,
#comparison-table th,
.capability-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f3f7f8;
  color: #637987;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.035em;
}

#raw-table tbody tr:hover,
#comparison-table tbody tr:hover,
.capability-table tbody tr:hover {
  background: #fbfdfd;
}

#raw-table .wrap-cell,
.capability-table .wrap-cell {
  max-width: 380px;
  white-space: normal;
  line-height: 1.55;
}

.object-pill,
.redacted,
.coverage-badge,
.method {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 14px;
  font-weight: 800;
}

.object-pill {
  background: #edf4f6;
  color: #4f6877;
}

.redacted {
  background: #f6efe4;
  color: #98621c;
}

.empty-value {
  color: #a3b2ba;
}

.record-details {
  min-width: 132px;
}

.record-details summary {
  color: var(--dashboard-a);
  cursor: pointer;
  font-weight: 750;
}

.record-details[open] {
  width: min(720px, 70vw);
}

.record-details dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  max-height: 480px;
  margin: 10px 0 0;
  overflow: auto;
  border: 1px solid #e3ecef;
  border-radius: 10px;
  background: #fbfdfd;
}

.record-details dl div {
  min-width: 0;
  padding: 9px 10px;
  border-right: 1px solid #e6edef;
  border-bottom: 1px solid #e6edef;
}

.record-details dt,
.record-details dd {
  margin: 0;
}

.record-details dt code {
  color: #6d7f8a;
  font-size: 14px;
  overflow-wrap: anywhere;
  white-space: normal;
}

.record-details dd {
  margin-top: 5px;
  color: #18374a;
  overflow-wrap: anywhere;
  white-space: normal;
}

.empty-table {
  height: 180px;
  text-align: center !important;
  vertical-align: middle !important;
  white-space: normal !important;
}

.empty-table strong,
.empty-table span {
  display: block;
}

.empty-table span {
  max-width: 680px;
  margin: 7px auto 0;
  color: var(--dashboard-muted);
  line-height: 1.5;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  margin-top: 14px;
}

.pagination button {
  min-width: 34px;
  min-height: 32px;
  border: 1px solid #dbe6ea;
  border-radius: 8px;
  background: #fff;
  color: var(--dashboard-ink);
  cursor: pointer;
  font-size: 14px;
}

.pagination button.active {
  background: var(--dashboard-ink);
  border-color: var(--dashboard-ink);
  color: #fff;
}

.pagination button:disabled {
  cursor: default;
  opacity: 0.4;
}

.api-status {
  margin-top: 22px;
  overflow: hidden;
}

.api-status > summary {
  padding: 17px 20px;
  color: var(--dashboard-ink);
  font-size: 0.9rem;
}

.api-status-summary {
  padding: 0 20px 20px;
}

.coverage-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid #e0e9ed;
  border-radius: 12px;
  background: #e0e9ed;
}

.coverage-strip div {
  display: flex;
  flex-direction: column;
  padding: 13px;
  background: #f8fbfc;
}

.coverage-strip strong {
  font-size: 1.2rem;
}

.coverage-strip span {
  margin-top: 2px;
  color: var(--dashboard-muted);
  font-size: 14px;
}

.coverage-strip .warning strong {
  color: #b84d58;
}

.error-list {
  margin: 0 0 14px;
  padding: 11px 13px;
  border: 1px solid #f0d9db;
  border-radius: 10px;
  background: #fff8f9;
}

.error-list p {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 10px;
  margin: 0;
  color: #83555a;
  font-size: 14px;
  line-height: 1.5;
}

.capability-table-wrap {
  max-height: 580px;
}

.capability-table td:nth-child(2) {
  white-space: normal;
}

.capability-table td:nth-child(2) code,
.capability-table td:nth-child(2) .method {
  display: block;
  width: fit-content;
  margin-bottom: 5px;
}

.method {
  background: #e9f7f5;
  color: #0d7770;
}

.coverage-badge {
  background: #eef3ff;
  color: #4263be;
}

.visual-heading {
  margin-bottom: 16px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.kpi-card {
  min-height: 128px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
  border: 1px solid #dce7ec;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 35px rgba(7, 26, 43, 0.05);
}

.kpi-card > span {
  color: var(--dashboard-muted);
  font-size: 14px;
  font-weight: 750;
}

.kpi-card > strong {
  color: var(--dashboard-ink);
  font-size: clamp(1.2rem, 2.3vw, 1.75rem);
  letter-spacing: -0.045em;
}

.kpi-card > small {
  color: #82949f;
  font-size: 14px;
}

.compare-kpi > strong {
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
}

.compare-kpi > strong i {
  color: #a9b7bf;
  font-style: normal;
  font-weight: 400;
}

.positive {
  color: #0a8a74 !important;
}

.negative {
  color: #c44f5b !important;
}

.compare-scoreboard {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 24px;
  margin: 0 0 16px;
  padding: 17px 18px;
  border: 1px solid #dce7ec;
  border-radius: 16px;
  background: #fff;
}

.score-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 11px;
  align-items: center;
}

.score-label {
  display: flex;
  flex-direction: column;
}

.score-label span {
  color: #40596a;
  font-size: 14px;
  font-weight: 750;
}

.score-label small {
  color: #8da0ab;
  font-size: 14px;
}

.score-bars {
  display: grid;
  gap: 4px;
}

.score-bars i {
  display: block;
  min-width: 2px;
  height: 6px;
  border-radius: 99px;
}

.bar-a {
  background: var(--dashboard-a);
}

.bar-b {
  background: var(--dashboard-b);
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.chart-card {
  min-width: 0;
  min-height: 390px;
  display: flex;
  flex-direction: column;
  padding: 17px;
  border: 1px solid #dce7ec;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 40px rgba(7, 26, 43, 0.05);
}

.chart-wide {
  grid-column: 1 / -1;
  min-height: 440px;
}

.chart-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 12px;
}

.chart-head > div {
  display: flex;
  gap: 9px;
  align-items: center;
}

.chart-head h3 {
  margin: 0;
  color: var(--dashboard-ink);
  font-size: 0.93rem;
}

.chart-head p {
  margin: 0;
  color: #8899a3;
  font-size: 14px;
}

.chart-index {
  color: var(--dashboard-a);
  font: 800 0.62rem/1 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.chart-card canvas {
  width: 100% !important;
  height: 320px !important;
  min-height: 320px;
  max-height: 320px;
  flex: none;
}

.chart-wide canvas {
  height: 360px !important;
  min-height: 360px;
  max-height: 360px;
}

.compare-trend-grid {
  grid-template-columns: 1fr;
}

.comparison-table-card {
  margin-top: 14px;
  padding: 18px;
}

.comparison-table-card .table-wrap {
  max-height: 560px;
}

.load-error {
  padding: 80px 24px;
  border: 1px solid #efd6d9;
  border-radius: 18px;
  background: #fff8f9;
  text-align: center;
}

.site-footer {
  padding: 58px 0 26px;
  color: var(--paper);
  font-size: 1rem;
}

@media (max-width: 1080px) {
  .hero-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-stats-wrap {
    justify-self: stretch;
    width: 100%;
  }

  .hero-stats {
    width: 100%;
    grid-template-columns: repeat(4, 1fr);
  }

  .hero-stats div,
  .hero-stats div:nth-child(2n) {
    min-height: 84px;
    border-right: 1px solid rgba(10, 35, 55, 0.08);
    border-bottom: 0;
  }

  .hero-stats div:last-child {
    border-right: 0;
  }

  .source-grid,
  .kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .raw-toolbar {
    grid-template-columns: 1fr 1.4fr auto;
  }

  .raw-toolbar > .meta {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .shops-hero {
    padding-top: 98px;
  }

  .dashboard-controls,
  .section-heading,
  .visual-heading,
  .explorer-head {
    align-items: stretch;
    flex-direction: column;
  }

  .section-heading > p,
  .visual-heading > p {
    text-align: left;
  }

  .mode-tabs {
    width: 100%;
  }

  .mode-tab {
    flex: 1;
  }

  .source-grid,
  .kpi-grid,
  .chart-grid,
  .compare-scoreboard {
    grid-template-columns: 1fr;
  }

  .chart-wide {
    grid-column: auto;
  }

  .raw-toolbar {
    grid-template-columns: 1fr;
  }

  .raw-toolbar > .meta {
    grid-column: auto;
  }

  .coverage-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .error-list p {
    grid-template-columns: 1fr;
  }

  .record-details[open] {
    width: 72vw;
  }

  .record-details dl {
    grid-template-columns: 1fr;
  }

  .chart-card,
  .chart-wide {
    min-height: 350px;
  }

  .chart-card canvas,
  .chart-wide canvas {
    height: 280px !important;
    min-height: 280px;
    max-height: 280px;
  }
}

@media (max-width: 520px) {
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-stats div,
  .hero-stats div:nth-child(2n) {
    border-bottom: 1px solid rgba(10, 35, 55, 0.08);
  }

  .hero-stats div:nth-child(2n) {
    border-right: 0;
  }

  .hero-stats div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .data-explorer,
  .api-status-summary,
  .comparison-table-card {
    padding-left: 13px;
    padding-right: 13px;
  }

  .chart-head {
    align-items: flex-start;
  }

  .chart-head p {
    max-width: 120px;
    text-align: right;
  }
}

/* Complete-data layout: the raw tables stay first and the charts follow them. */
.section-jumps {
  display: flex;
  gap: 8px;
  padding: 4px;
  border-radius: 15px;
  background: #dfeaed;
}

.section-jumps a {
  padding: 9px 13px;
  border-radius: 11px;
  color: #506774;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.section-jumps a:hover,
.section-jumps a:focus-visible {
  color: var(--dashboard-ink);
  background: #fff;
  box-shadow: 0 5px 16px rgba(10, 35, 55, 0.1);
}

.data-section,
.visual-section {
  scroll-margin-top: 92px;
}

.dataset-shortcuts {
  display: flex;
  gap: 8px;
  margin: 17px 0 22px;
  padding: 4px 0 8px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.dataset-chip {
  min-width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border: 1px solid #d7e4e9;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.84);
  color: #45606e;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
}

.dataset-chip strong {
  min-width: 24px;
  padding: 3px 6px;
  border-radius: 999px;
  background: #e8f0f3;
  color: #607783;
  font-size: 14px;
  text-align: center;
}

.dataset-chip:hover,
.dataset-chip.active {
  border-color: var(--dashboard-a);
  color: #08766f;
  background: #ebfaf7;
}

.dataset-chip.active strong {
  color: #fff;
  background: var(--dashboard-a);
}

.table-stat-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(82px, auto));
  gap: 8px;
}

.table-stat-group div {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 9px 12px;
  border-radius: 12px;
  background: #f1f7f8;
}

.table-stat-group strong {
  color: var(--dashboard-a);
  font-size: 1.35rem;
  line-height: 1;
  letter-spacing: -0.04em;
}

.table-stat-group span {
  margin-top: 5px;
  color: var(--dashboard-muted);
  font-size: 14px;
}

.raw-toolbar {
  grid-template-columns: minmax(240px, 0.9fr) minmax(280px, 1.5fr) minmax(116px, 0.35fr);
}

.table-guide {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 0 2px 8px;
  color: #6b7f8b;
  font-size: 14px;
}

.data-table-wrap {
  max-height: min(76vh, 820px);
  overscroll-behavior-inline: contain;
}

#raw-table {
  width: max-content;
  min-width: 100%;
}

#raw-table th,
#raw-table td {
  max-width: 420px;
  padding: 9px 10px;
  line-height: 1.45;
}

#raw-table td {
  min-width: 112px;
  white-space: normal;
  overflow-wrap: anywhere;
}

#raw-table th {
  top: 0;
  white-space: normal;
  min-width: 108px;
  max-width: 220px;
  box-shadow: inset 0 -1px #dce7eb;
}

#raw-table .index-column {
  width: 58px;
  min-width: 58px;
  max-width: 58px;
  position: sticky;
  left: 0;
  z-index: 3;
  background: #f3f7f8;
  text-align: center;
}

#raw-table tbody .index-column {
  z-index: 1;
  background: #fafcfd;
  color: #8a9ba4;
  font-variant-numeric: tabular-nums;
}

#raw-table tbody tr:hover .index-column {
  background: #f1f8f8;
}

#raw-table .store-column {
  min-width: 92px;
  color: #096f69;
  font-weight: 750;
}

.translated-value {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  font-weight: 700;
}

.order-kind {
  display: inline-flex;
  align-items: center;
  min-width: max-content;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
}

.order-kind.product {
  color: #08766f;
  background: #e7f7f4;
}

.order-kind.sample {
  color: #a85b12;
  background: #fff1dc;
}

.translated-value small {
  color: #95a5ad;
  font: 500 0.61rem/1.2 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.raw-json {
  width: min(390px, 40vw);
  max-height: 150px;
  margin: 0;
  padding: 8px;
  overflow: auto;
  border: 1px solid #e5edef;
  border-radius: 8px;
  background: #f8fafb;
  color: #405764;
  font: 0.66rem/1.5 ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.image-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #087d76;
  text-decoration: none;
  font-weight: 750;
}

.image-link img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
  background: #eef3f5;
}

.visual-section {
  margin-top: 58px;
  padding-top: 42px;
  border-top: 1px solid #dce7eb;
}

.data-section > .visual-section {
  margin: 24px 0 42px;
  padding: 26px 0 38px;
  border-top: 1px solid #dce7eb;
  border-bottom: 1px solid #dce7eb;
}

.visual-heading {
  margin-bottom: 20px;
}

@media (max-width: 760px) {
  .section-jumps {
    width: 100%;
  }

  .section-jumps a {
    flex: 1;
    text-align: center;
  }

  .raw-toolbar {
    grid-template-columns: 1fr;
  }

  .table-stat-group {
    width: 100%;
  }

  .table-stat-group div {
    align-items: flex-start;
  }

  .raw-json {
    width: 72vw;
  }

  .data-table-wrap {
    max-height: 70vh;
  }
}

/* Decision-first summary and human-readable business data. */
.executive-section,
.data-section,
.visual-section {
  scroll-margin-top: 92px;
}

.executive-section {
  margin: 22px 0 42px;
  padding: 24px;
  border: 1px solid #cfe1df;
  border-radius: 22px;
  background:
    radial-gradient(circle at 92% 0, rgba(46, 202, 183, 0.14), transparent 32%),
    linear-gradient(145deg, #f8fdfc 0%, #fff 62%);
  box-shadow: 0 20px 55px rgba(7, 48, 54, 0.08);
}

.executive-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 18px;
}

.executive-heading h2 {
  margin: 3px 0 0;
  color: var(--dashboard-ink);
  font-size: clamp(1.45rem, 2.4vw, 2.05rem);
  letter-spacing: -0.04em;
}

.executive-heading-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.executive-date-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.executive-range-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.executive-range-buttons button {
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid #cfe1df;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  color: #506b75;
  font: inherit;
  font-size: 14px;
  font-weight: 720;
  cursor: pointer;
}

.executive-range-buttons button:hover,
.executive-range-buttons button:focus-visible {
  border-color: #74bdb5;
  color: #0b6f69;
}

.executive-range-buttons button.active {
  border-color: #0b6f69;
  background: #0b6f69;
  color: #fff;
}

.executive-custom-range {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  color: #72858f;
  font-size: 14px;
}

.executive-custom-range[hidden] {
  display: none;
}

.executive-custom-range label {
  display: grid;
  gap: 4px;
}

.executive-custom-range input {
  min-height: 36px;
  padding: 6px 8px;
  border: 1px solid #cfe1df;
  border-radius: 9px;
  background: #fff;
  color: #17384a;
  font: inherit;
  font-size: 14px;
}

.executive-scope {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  padding: 10px 13px;
  border: 1px solid #d6e7e6;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
}

.executive-scope strong {
  color: #0b6f69;
  font-size: 14px;
}

.executive-scope span {
  color: #72858f;
  font-size: 14px;
}

.executive-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.executive-kpi {
  min-width: 0;
  min-height: 126px;
  display: flex;
  flex-direction: column;
  padding: 15px;
  border: 1px solid #deeaed;
  border-radius: 15px;
  background: #fff;
}

.executive-kpi > span {
  color: #617783;
  font-size: 14px;
  font-weight: 760;
}

.executive-kpi > strong {
  margin: 12px 0 7px;
  color: #102f42;
  font-size: clamp(1.15rem, 2vw, 1.65rem);
  line-height: 1;
  letter-spacing: -0.045em;
  overflow-wrap: anywhere;
}

.executive-kpi > small {
  margin-top: auto;
  color: #8a9ba4;
  font-size: 14px;
  line-height: 1.45;
}

.executive-kpi.risk,
.executive-kpi.attention {
  border-color: #f0d7bd;
  background: #fffaf4;
}

.executive-kpi.risk > strong,
.executive-kpi.attention > strong {
  color: #b95e17;
}

.executive-kpi.good {
  border-color: #cce8df;
  background: #f5fcf9;
}

.executive-kpi-button {
  position: relative;
  width: 100%;
  font: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.executive-kpi-button::after {
  content: "→";
  position: absolute;
  top: 14px;
  right: 14px;
  color: #b95e17;
  font-weight: 800;
}

.executive-kpi-button:hover,
.executive-kpi-button:focus-visible {
  transform: translateY(-2px);
  border-color: #dfa96f;
  box-shadow: 0 12px 24px rgba(69, 79, 78, 0.1);
  outline: none;
}

.executive-kpi-button:disabled {
  cursor: progress;
  transform: none;
  box-shadow: none;
}

.urgent-order-modal {
  position: fixed;
  inset: 0;
  z-index: 2400;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(11, 35, 40, 0.58);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 160ms ease, visibility 160ms ease;
}

.urgent-order-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

body.urgent-order-modal-open {
  overflow: hidden;
}

.urgent-order-modal-card {
  width: min(820px, 100%);
  max-height: min(78vh, 760px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #ead7bd;
  border-radius: 22px;
  background: #fffdf9;
  box-shadow: 0 28px 80px rgba(7, 32, 36, 0.3);
  transform: translateY(12px) scale(0.985);
  transition: transform 160ms ease;
}

.urgent-order-modal.is-open .urgent-order-modal-card {
  transform: translateY(0) scale(1);
}

.urgent-order-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid #eee2d3;
  background: #fff8ef;
}

.urgent-order-modal-head span {
  color: #9a641f;
  font-size: 13px;
  font-weight: 760;
}

.urgent-order-modal-head h2 {
  margin: 2px 0 0;
  color: #102f42;
  font-size: 1.2rem;
}

.urgent-order-modal-head small {
  display: block;
  margin-top: 3px;
  color: #768a93;
  font-size: 13px;
}

.urgent-order-modal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.urgent-order-modal-actions button {
  padding: 7px 12px;
  border: 1px solid #dfc49f;
  border-radius: 999px;
  background: #fff;
  color: #71532f;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.urgent-order-copy {
  background: #0f6f68 !important;
  border-color: #0f6f68 !important;
  color: #fff !important;
}

.urgent-order-copy:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.urgent-order-close {
  width: 34px;
  height: 34px;
  padding: 0 !important;
  font-size: 21px !important;
  line-height: 1;
}

.urgent-order-modal-body {
  min-height: 120px;
  overflow-y: auto;
  padding: 14px 16px 18px;
}

.urgent-order-list {
  display: grid;
  gap: 8px;
}

.urgent-order-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.8fr);
  align-items: center;
  gap: 14px;
  padding: 12px 13px;
  border: 1px solid #eadfce;
  border-radius: 12px;
  background: #fff;
}

.urgent-order-row-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 4px 9px;
  min-width: 0;
}

.urgent-order-row-main strong {
  min-width: 0;
  color: #173846;
  overflow-wrap: anywhere;
}

.urgent-order-row-main small {
  grid-column: 2;
  color: #71838d;
  font-size: 13px;
}

.urgent-order-badge {
  grid-row: 1 / span 2;
  padding: 5px 8px;
  border-radius: 999px;
  background: #eef6f4;
  color: #0d786e;
  font-size: 12px;
  font-weight: 780;
  white-space: nowrap;
}

.urgent-order-row p,
.urgent-order-empty {
  margin: 0;
  color: #536a75;
  font-size: 13px;
  line-height: 1.5;
}

.urgent-order-empty {
  padding: 32px 12px;
  text-align: center;
}

.executive-insights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.executive-insight {
  display: flex;
  gap: 11px;
  padding: 13px 14px;
  border-radius: 13px;
  background: #edf5f6;
}

.executive-insight > span {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  margin-top: 5px;
  border-radius: 50%;
  background: #3f7fc2;
  box-shadow: 0 0 0 5px rgba(63, 127, 194, 0.12);
}

.executive-insight.attention > span {
  background: #d57c25;
  box-shadow: 0 0 0 5px rgba(213, 124, 37, 0.12);
}

.executive-insight.good > span {
  background: #15977f;
  box-shadow: 0 0 0 5px rgba(21, 151, 127, 0.12);
}

.executive-insight strong {
  color: #17384a;
  font-size: 14px;
}

.executive-insight p {
  margin: 4px 0 0;
  color: #687e89;
  font-size: 14px;
  line-height: 1.55;
}

.dataset-shortcuts {
  display: grid;
  gap: 9px;
  overflow: visible;
}

.dataset-group {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.dataset-group-label {
  color: #6f838e;
  font-size: 14px;
  font-weight: 800;
}

.dataset-group > div {
  display: flex;
  gap: 7px;
  padding: 2px 0 5px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.value-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.value-tags i {
  padding: 4px 7px;
  border-radius: 999px;
  background: #edf7f5;
  color: #18776f;
  font-size: 14px;
  font-style: normal;
  font-weight: 750;
}

.structured-value {
  width: min(380px, 38vw);
}

.structured-value > summary,
.source-json > summary {
  width: max-content;
  cursor: pointer;
  color: #0b8178;
  font-size: 14px;
  font-weight: 800;
}

.structured-list {
  display: grid;
  gap: 7px;
  margin: 8px 0;
}

.structured-card {
  padding: 9px;
  border: 1px solid #e1ebee;
  border-radius: 10px;
  background: #f9fbfc;
}

.structured-card > strong,
.structured-row {
  display: block;
  margin-bottom: 6px;
  color: #607682;
  font-size: 14px;
}

.structured-card dl {
  display: grid;
  gap: 5px;
  margin: 0;
}

.structured-card dl > div {
  display: grid;
  grid-template-columns: minmax(78px, 0.75fr) minmax(110px, 1.25fr);
  gap: 9px;
}

.structured-card dt {
  color: #83949d;
  font-size: 14px;
}

.structured-card dd {
  margin: 0;
  color: #2d4654;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.structure-count {
  color: #4c6774;
  font-size: 14px;
}

.source-json {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px dashed #dbe6e9;
}

.source-json > summary {
  color: #82949d;
  font-weight: 650;
}

.business-time {
  color: #27495a;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.id-value {
  color: #607783;
  font: 0.68rem/1.45 ui-monospace, SFMono-Regular, Consolas, monospace;
}

#raw-table td {
  vertical-align: middle;
}

.mobile-row-list {
  display: none;
}

.chart-head h3 {
  font-size: 1rem;
}

.chart-head p {
  font-size: 14px;
}

@media (max-width: 1120px) {
  .executive-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .executive-section {
    margin: 14px 0 32px;
    padding: 17px;
    border-radius: 18px;
  }

  .executive-heading {
    flex-direction: column;
  }

  .executive-heading-side,
  .executive-date-controls {
    width: 100%;
    align-items: stretch;
  }

  .executive-range-buttons {
    justify-content: flex-start;
  }

  .executive-custom-range {
    align-items: center;
    flex-wrap: wrap;
  }

  .executive-custom-range label {
    flex: 1 1 138px;
  }

  .executive-scope {
    width: 100%;
    align-items: flex-start;
  }

  .executive-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .executive-kpi {
    min-height: 118px;
    padding: 13px;
  }

  .executive-insights {
    grid-template-columns: 1fr;
  }

  .urgent-order-row {
    grid-template-columns: 1fr;
  }

  .dataset-group {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .section-jumps {
    overflow-x: auto;
  }

  .section-jumps a {
    min-width: max-content;
  }

  .table-guide span:first-child {
    max-width: 72%;
  }

  .mobile-row-list {
    display: grid;
    gap: 10px;
  }

  .data-table-wrap {
    display: none;
  }

  .mobile-data-card {
    padding: 14px;
    border: 1px solid #dce8eb;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 9px 25px rgba(11, 45, 59, 0.05);
  }

  .mobile-data-card-head {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding-bottom: 11px;
    border-bottom: 1px solid #e7eef0;
  }

  .mobile-data-card-head > span {
    color: #8798a1;
    font-size: 14px;
  }

  .mobile-data-card-head > strong {
    color: #12364a;
    font-size: 0.9rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }

  .mobile-data-card dl {
    display: grid;
    gap: 0;
    margin: 5px 0 0;
  }

  .mobile-data-card dl > div {
    display: grid;
    grid-template-columns: minmax(92px, 0.8fr) minmax(0, 1.2fr);
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid #eef3f4;
  }

  .mobile-data-card dt {
    color: #748891;
    font-size: 14px;
  }

  .mobile-data-card dd {
    min-width: 0;
    margin: 0;
    color: #294654;
    font-size: 14px;
    text-align: right;
    overflow-wrap: anywhere;
  }

  .mobile-data-card > details {
    margin-top: 10px;
  }

  .mobile-data-card > details > summary {
    cursor: pointer;
    color: #087d76;
    font-size: 14px;
    font-weight: 800;
  }

  .mobile-data-card .structured-value {
    width: 100%;
  }

  .mobile-data-card .structured-card dl > div {
    grid-template-columns: 1fr;
  }

  .mobile-empty {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 30px 20px;
    border: 1px dashed #d5e2e6;
    border-radius: 14px;
    color: #6f838e;
    text-align: center;
  }
}

@media (max-width: 430px) {
  .executive-kpis {
    grid-template-columns: 1fr 1fr;
  }

  .executive-kpi > strong {
    font-size: 1.12rem;
  }
}

/* Internal dashboard typography: compact hierarchy, readable working text. */
.eyebrow,
.section-kicker {
  font-size: 14px;
  letter-spacing: 0.11em;
}

.meta,
.shop-tab,
.mode-tab,
.source-label {
  font-size: 0.9rem;
}

.hero-stats span,
.source-status,
.field-count span,
.raw-toolbar label,
.table-guide,
.kpi-card > span,
.executive-scope span,
.dataset-group-label {
  font-size: 14px;
}

.section-heading h2,
.visual-heading h2,
.explorer-head h2,
.executive-heading h2 {
  font-size: clamp(1.55rem, 2.2vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.section-heading > p,
.visual-heading > p,
.field-catalog summary,
.api-status > summary {
  font-size: 0.88rem;
  line-height: 1.65;
}

.source-index,
.mode-tab span,
.chart-index {
  font-size: 14px;
}

.raw-toolbar select,
.raw-toolbar input,
#raw-table,
#comparison-table,
.capability-table {
  font-size: 0.875rem;
}

#raw-table th,
#comparison-table th,
.capability-table th,
#field-list code,
.capability-table code,
.object-pill,
.redacted,
.coverage-badge,
.method,
.pagination button {
  font-size: 14px;
}

.record-details dt code,
.coverage-strip span,
.error-list p,
.score-label small,
.executive-kpi > small,
.structured-card dt {
  font-size: 14px;
}

.kpi-card > small,
.executive-insight p,
.structured-value > summary,
.source-json > summary,
.structured-card > strong,
.structured-row,
.structured-card dd,
.structure-count,
.value-tags i {
  font-size: 14px;
}

.chart-head h3 {
  font-size: 1.08rem;
}

.chart-head p,
.score-label span,
.executive-kpi > span,
.executive-insight strong,
.executive-scope strong {
  font-size: 14px;
}

.executive-kpi > strong {
  font-size: clamp(1.3rem, 1.8vw, 1.72rem);
}

.executive-insight p {
  line-height: 1.65;
}

@media (max-width: 700px) {
  .shops-hero {
    padding-top: 64px;
  }

  .shops-hero h1 {
    font-size: clamp(2.1rem, 10vw, 3rem);
  }

  .section-heading h2,
  .visual-heading h2,
  .explorer-head h2,
  .executive-heading h2 {
    font-size: 1.55rem;
  }

  .executive-kpi > strong {
    font-size: 1.3rem;
  }
}

/* CNY profit center: settlement truth and order-line estimates. */
.profit-section {
  scroll-margin-top: 92px;
  margin: 0 0 42px;
  padding: 26px;
  border: 1px solid #d8dfeb;
  border-radius: 24px;
  background:
    radial-gradient(circle at 8% 0, rgba(76, 104, 180, 0.12), transparent 30%),
    linear-gradient(145deg, #f8faff 0%, #fff 58%, #f8fdfb 100%);
  box-shadow: 0 22px 60px rgba(17, 47, 49, 0.08);
}

.profit-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
}

.profit-heading h2 {
  margin: 3px 0 8px;
  color: var(--dashboard-ink);
  font-size: clamp(1.55rem, 2.5vw, 2.15rem);
  letter-spacing: -0.045em;
}

.profit-heading p:not(.section-kicker) {
  max-width: 720px;
  margin: 0;
  color: #667985;
  line-height: 1.65;
}

.profit-meta {
  min-width: 245px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  padding: 11px 14px;
  border: 1px solid #dce3ed;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.85);
  color: #74848f;
  font-size: 14px;
}

.profit-meta strong {
  color: #405eaa;
  font-size: 0.88rem;
}

.profit-status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.profit-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid #dce5ec;
  border-radius: 999px;
  background: #fff;
  color: #687c87;
  font-size: 14px;
}

.profit-status b {
  color: #26485a;
}

.profit-status.good {
  border-color: #c9e7dd;
  background: #f3fbf7;
}

.profit-status.attention,
.profit-status.risk {
  border-color: #f0d9bd;
  background: #fff9f1;
}

.profit-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.profit-kpi {
  min-width: 0;
  min-height: 132px;
  display: flex;
  flex-direction: column;
  padding: 16px;
  border: 1px solid #dfe6ef;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
}

.profit-kpi > span {
  color: #667a87;
  font-size: 14px;
  font-weight: 750;
}

.profit-kpi > strong {
  margin: 13px 0 8px;
  color: #17384a;
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.profit-kpi > small {
  margin-top: auto;
  color: #84949d;
  line-height: 1.5;
}

.profit-kpi.good {
  border-color: #c6e7dc;
  background: #f4fcf8;
}

.profit-kpi.attention,
.profit-kpi.risk {
  border-color: #efd9bf;
  background: #fffaf3;
}

.profit-kpi.attention > strong,
.profit-kpi.risk > strong {
  color: #b45d1e;
}

.ads-balance-kpi .ads-balance-list {
  list-style: none;
  margin: 12px 0 8px;
  padding: 0;
  display: grid;
  gap: 6px;
  flex: 1;
}

.ads-balance-kpi .ads-balance-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  min-width: 0;
}

.ads-balance-kpi .ads-balance-list span {
  color: #667a87;
  font-size: 13px;
  font-weight: 650;
}

.ads-balance-kpi .ads-balance-list strong {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #17324d;
}

.ads-balance-kpi .ads-balance-list li.is-low strong {
  color: #c62828;
}

.profit-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
}

.profit-panel {
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid #e0e7ee;
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.94);
}

.profit-panel-wide {
  grid-column: 1 / -1;
}

.profit-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.profit-panel-head span {
  color: #82909a;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.profit-panel-head h3 {
  margin: 2px 0 0;
  color: #18384a;
  font-size: 1.02rem;
}

.profit-panel-head > strong {
  padding: 5px 8px;
  border-radius: 999px;
  background: #edf1fb;
  color: #4a64a9;
  font-size: 12px;
  white-space: nowrap;
}

.profit-panel-head > strong.risk {
  background: #fff0e4;
  color: #b45d1e;
}

.profit-panel-head > strong.good {
  background: #e9f8f2;
  color: #107a68;
}

.formula-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 7px 0;
  border-bottom: 1px solid #edf0f4;
}

.formula-row span {
  color: #506879;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.formula-row code {
  color: #334a5b;
  font-family: inherit;
  font-size: 12.5px;
  line-height: 1.45;
}

.profit-formula-panel > div > p {
  margin: 8px 0 0;
  color: #758690;
  font-size: 12.5px;
  line-height: 1.5;
}

.ads-status-compact {
  display: grid;
  gap: 8px;
}

.ads-status-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  color: #5d727a;
  font-size: 12px;
  line-height: 1.35;
}

.ads-status-meta span {
  min-width: 0;
  padding: 4px 8px;
  border-radius: 8px;
  background: #f3f6f8;
}

.ads-status-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.ads-status-metrics > div {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 8px 9px;
  border-radius: 10px;
  background: #f5f7fa;
}

.ads-status-metrics span {
  color: #7a8a94;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.ads-status-metrics strong {
  color: #18384a;
  font-size: 13.5px;
  font-weight: 750;
  line-height: 1.25;
  word-break: break-word;
}

.ads-status-metrics > .is-deduction {
  background: #e9f8f2;
}

.ads-status-metrics > .is-deduction span {
  color: #0f766e;
}

.ads-status-metrics > .is-deduction strong {
  color: #0f766e;
}

.ads-status-metrics > .ads-status-span {
  grid-column: 1 / -1;
}

.ads-status-empty {
  margin: 0;
  color: #758690;
  font-size: 12.5px;
  line-height: 1.45;
}

.ads-status-note {
  margin: 0;
  color: #8a9aa3;
  font-size: 11.5px;
  line-height: 1.4;
}

.ads-panel-split {
  display: grid;
  grid-template-columns: minmax(240px, 0.85fr) minmax(320px, 1.25fr);
  gap: 12px;
  align-items: stretch;
}

.ads-trend-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 6px;
  min-width: 0;
  min-height: 210px;
  padding: 8px 10px 8px;
  border-radius: 12px;
  background: #f5f7fa;
}

.ads-trend-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.ads-trend-head span {
  color: #82909a;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ads-trend-head strong {
  color: #18384a;
  font-size: 13px;
}

.ads-trend-chart-wrap {
  position: relative;
  min-height: 168px;
  height: 168px;
}

.profit-formula-panel p,
.profit-ads-panel p,
.profit-ads-panel small {
  color: #758690;
  font-size: 12.5px;
  line-height: 1.5;
}

.profit-ads-panel p {
  margin: 0;
}

.profit-detail-button {
  padding: 7px 10px;
  border: 1px solid #d5deeb;
  border-radius: 9px;
  background: #fff;
  color: #4260a8;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
}

.profit-detail-button:hover,
.profit-detail-button:focus-visible {
  border-color: #8da3d7;
  background: #f4f7fd;
}

.profit-order-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.profit-load-all {
  height: 34px;
  padding: 0 12px;
  border: 1px solid #c5d0e4;
  border-radius: 9px;
  background: #f4f7fc;
  color: #24333b;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.profit-load-all:hover:not(:disabled) {
  background: #e8eef8;
  border-color: #8da3d7;
}

.profit-load-all:disabled {
  opacity: 0.72;
  cursor: default;
}

.profit-basis-filter,
.profit-order-search {
  display: block;
  min-width: min(160px, 100%);
}

.profit-order-search {
  min-width: min(280px, 100%);
}

.profit-basis-filter select,
.profit-order-search input {
  width: 100%;
  height: 34px;
  padding: 0 12px;
  border: 1px solid #d5deeb;
  border-radius: 9px;
  background: #fff;
  color: #24333b;
  font: inherit;
  font-size: 14px;
}

.profit-basis-filter select:focus,
.profit-order-search input:focus {
  outline: 2px solid rgba(66, 96, 168, 0.28);
  outline-offset: 1px;
  border-color: #8da3d7;
}

.profit-table-wrap {
  max-height: min(70vh, 720px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.profit-table {
  width: 100%;
  min-width: 1060px;
  border-collapse: collapse;
  font-size: 14px;
}

.profit-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 9px 8px;
  background: #eff3f8;
  color: #526a78;
  text-align: left;
  white-space: nowrap;
}

.profit-table td {
  padding: 9px 8px;
  border-bottom: 1px solid #edf0f3;
  color: #405866;
  vertical-align: middle;
}

.profit-table td strong,
.profit-table td small {
  display: block;
}

.profit-table td small {
  margin-top: 3px;
  color: #8a99a2;
}

.profit-number {
  font-weight: 850;
}

.profit-number.positive {
  color: #0f806b;
}

.profit-number.negative {
  color: #bd4f46;
}

.profit-row-status {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  background: #eef3f6;
  color: #647985;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.profit-row-status.good {
  background: #e7f7f1;
  color: #0f7d69;
}

.profit-row-status.attention,
.profit-row-status.risk {
  background: #fff0e3;
  color: #b45d1e;
}

.order-product-cell {
  min-width: 54px;
  display: grid;
  grid-template-columns: 54px;
  align-items: center;
  gap: 0;
}

.order-product-cell > span:last-child {
  color: #405866;
  line-height: 1.45;
}

.thumb-column {
  width: 62px;
  min-width: 62px;
  padding-right: 6px !important;
  overflow: visible;
}

.sku-column {
  min-width: 108px;
  max-width: 180px;
  white-space: normal;
}

.sku-column strong {
  display: block;
  color: var(--dashboard-ink);
  font-size: 14px;
  line-height: 1.35;
}

.sku-column small {
  display: block;
  margin-top: 4px;
  color: var(--dashboard-muted);
  font-size: 14px;
  line-height: 1.35;
}

.order-product-image-button,
.order-product-image-missing {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border-radius: 11px;
}

.order-product-image-button {
  position: relative;
  z-index: 2;
  display: block;
  padding: 0;
  overflow: hidden;
  border: 1px solid #dce5eb;
  background: #f4f7f8;
  cursor: zoom-in;
  transition: box-shadow 140ms ease, border-color 140ms ease;
}

.order-product-image-button:hover,
.order-product-image-button:focus,
.order-product-image-button:focus-visible {
  z-index: 3;
  border-color: #7188c2;
  outline: 3px solid rgba(82, 109, 178, 0.17);
  box-shadow: 0 4px 14px rgba(24, 55, 70, 0.16);
}

.order-product-image-thumb {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 10px;
  object-fit: cover;
}

.order-product-image-missing {
  display: grid;
  place-items: center;
  border: 1px dashed #ccd7de;
  background: #f6f8f9;
  color: #99a5ac;
  font-size: 14px;
  text-align: center;
}

.shop-image-preview {
  position: fixed;
  z-index: 1200;
  width: 300px;
  height: 300px;
  padding: 8px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  background: #fff;
  border: 1px solid rgba(45, 69, 83, 0.22);
  border-radius: 16px;
  box-shadow: 0 22px 60px rgba(24, 55, 70, 0.28);
  transform: translateY(4px) scale(0.98);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.shop-image-preview.visible {
  visibility: visible;
  opacity: 1;
  transform: none;
}

.shop-image-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #f4f7f8;
  border-radius: 12px;
}

@media (max-width: 720px) {
  .shop-image-preview {
    display: none;
  }
}

.profit-order-note {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.profit-order-note span {
  padding: 6px 9px;
  border-radius: 999px;
  background: #f3f6f8;
  color: #71838e;
  font-size: 14px;
}

.shop-sync-dot {
  width: 7px;
  height: 7px;
  display: inline-block;
  margin-left: 8px;
  border-radius: 50%;
  background: #a0adb4;
  box-shadow: 0 0 0 3px rgba(160, 173, 180, 0.16);
}

.shop-sync-dot.success {
  background: #18a68f;
  box-shadow: 0 0 0 3px rgba(24, 166, 143, 0.16);
}

.shop-sync-dot.stale,
.shop-sync-dot.partial {
  background: #d99a35;
  box-shadow: 0 0 0 3px rgba(217, 154, 53, 0.17);
}

.shop-sync-dot.error {
  background: #d85b67;
  box-shadow: 0 0 0 3px rgba(216, 91, 103, 0.16);
}

.sync-health {
  margin: 22px 0;
  padding: 20px;
  border: 1px solid #dce7ec;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 16px 44px rgba(7, 26, 43, 0.06);
}

.sync-health-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
}

.sync-health-head h3 {
  margin: 5px 0 0;
  color: var(--dashboard-ink);
  font-size: 1.2rem;
}

.sync-health-note {
  margin: 10px 0 14px;
  color: var(--dashboard-muted);
  font-size: 14px;
  line-height: 1.55;
}

.sync-health-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.sync-health-summary span,
.sync-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.sync-health-summary span.success,
.sync-status.success {
  background: #e7f7f3;
  color: #087866;
}

.sync-health-summary span.stale,
.sync-status.stale {
  background: #fff4df;
  color: #95620f;
}

.sync-health-summary span.error,
.sync-status.error {
  background: #fff0f2;
  color: #ac3f4b;
}

.sync-health-summary span.unknown,
.sync-status.unknown {
  background: #eef2f4;
  color: #667982;
}

.sync-health-table-wrap {
  max-height: 520px;
}

.sync-health-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}

.sync-health-table th,
.sync-health-table td {
  padding: 10px 11px;
  border-bottom: 1px solid #e7eef1;
  text-align: left;
  vertical-align: top;
}

.sync-health-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f3f7f8;
  color: #637987;
  font-size: 14px;
}

.sync-health-table td small {
  display: block;
  max-width: 340px;
  margin-top: 3px;
  color: #84949d;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.sync-health-table .sync-error {
  min-width: 260px;
  max-width: 460px;
  color: #6b7c84;
  white-space: normal;
  line-height: 1.45;
}

.sync-row-stale .sync-error,
.sync-row-error .sync-error {
  color: #9a4d50;
}

@media (max-width: 1080px) {
  .profit-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ads-panel-split {
    grid-template-columns: 1fr;
  }

  .profit-panel-wide {
    grid-column: auto;
  }
}

@media (max-width: 700px) {
  .sync-health {
    padding: 15px;
  }

  .sync-health-head {
    display: grid;
    align-items: start;
  }

  .sync-health-summary {
    justify-content: flex-start;
  }

  .profit-section {
    padding: 18px;
    border-radius: 18px;
  }

  .profit-heading {
    display: grid;
  }

  .profit-meta {
    min-width: 0;
    align-items: flex-start;
  }

  .profit-kpis {
    grid-template-columns: 1fr;
  }

  .profit-kpi {
    min-height: 116px;
  }

  .profit-panel {
    padding: 14px;
  }

  .profit-panel-head {
    align-items: flex-start;
  }
}

.missing-cost-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  min-width: 118px;
  border: 0;
  border-radius: 18px;
  padding: 12px 16px;
  color: #fff;
  box-shadow: 0 14px 36px rgba(17, 47, 49, 0.28);
  cursor: pointer;
  text-align: left;
  display: grid;
  gap: 2px;
}

.missing-cost-fab strong {
  font-size: 15px;
  line-height: 1.2;
}

.missing-cost-fab span {
  font-size: 13px;
  opacity: 0.92;
}

.missing-cost-fab.risk {
  background: linear-gradient(135deg, #d97706, #b45309);
}

.missing-cost-fab.good {
  background: linear-gradient(135deg, #0f766e, #115e59);
}

.missing-cost-panel {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 18px;
  background: rgba(10, 24, 26, 0.28);
}

.missing-cost-panel.open {
  display: flex;
}

.missing-cost-panel-card {
  width: min(520px, 100%);
  max-height: min(82vh, 760px);
  overflow: auto;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(17, 47, 49, 0.28);
  padding: 18px 18px 14px;
}

.missing-cost-panel-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.missing-cost-kicker {
  margin: 0 0 4px;
  color: #7a8d96;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.missing-cost-panel-card h3 {
  margin: 0;
  font-size: 22px;
  color: #123033;
}

.missing-cost-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: #eef3f5;
  color: #33555a;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.missing-cost-note {
  margin: 10px 0 14px;
  color: #5d727a;
  font-size: 14px;
  line-height: 1.5;
}

.missing-cost-list {
  display: grid;
  gap: 12px;
}

.missing-cost-empty {
  padding: 24px 12px;
  text-align: center;
  color: #7a8d96;
  background: #f6f9fa;
  border-radius: 14px;
}

.missing-cost-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e4ecef;
  border-radius: 16px;
  background: #fbfdfe;
}

.missing-cost-item-media .order-product-image-button,
.missing-cost-item-media .order-product-image-missing {
  width: 72px;
  height: 72px;
}

.missing-cost-item-head {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
}

.missing-cost-item-head strong {
  color: #123033;
  font-size: 15px;
}

.missing-cost-item-head small,
.missing-cost-order {
  color: #7a8d96;
  font-size: 12px;
}

.missing-cost-item-body p {
  margin: 4px 0 6px;
  color: #33555a;
  font-size: 13px;
  line-height: 1.4;
}

.missing-cost-fields {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  align-items: end;
  margin-top: 8px;
}

.missing-cost-fields label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: #5d727a;
}

.missing-cost-fields input {
  width: 100%;
  border: 1px solid #d5e0e4;
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  color: #123033;
  background: #fff;
}

.missing-cost-save {
  border: 0;
  border-radius: 10px;
  padding: 9px 12px;
  background: #115e59;
  color: #fff;
  font: inherit;
  cursor: pointer;
  white-space: nowrap;
}

.missing-cost-status {
  margin: 12px 0 0;
  min-height: 1.2em;
  color: #0f766e;
  font-size: 13px;
}

@media (max-width: 720px) {
  .missing-cost-fab {
    right: 14px;
    bottom: 14px;
  }

  .missing-cost-panel {
    padding: 0;
    align-items: stretch;
  }

  .missing-cost-panel-card {
    width: 100%;
    max-height: 92vh;
    border-radius: 18px 18px 0 0;
  }

  .missing-cost-fields {
    grid-template-columns: 1fr 1fr;
  }

  .missing-cost-save {
    grid-column: 1 / -1;
  }
}

.order-profit-row {
  cursor: pointer;
}

.order-profit-row:hover {
  background: #f3faf9;
}

.order-profit-row:focus-visible {
  outline: 2px solid #0f766e;
  outline-offset: -2px;
}

.profit-formula-panel {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(10, 24, 26, 0.34);
}

.profit-formula-panel.open {
  display: flex;
}

.profit-formula-card {
  width: min(560px, 100%);
  max-height: min(86vh, 820px);
  overflow: auto;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(17, 47, 49, 0.28);
  padding: 18px 18px 16px;
}

.profit-formula-card-visual {
  width: min(920px, 100%);
  max-height: min(92vh, 960px);
  padding: 20px 20px 18px;
  border: 1px solid #e4ece9;
}

.profit-formula-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.profit-formula-kicker {
  margin: 0 0 4px;
  color: #7a8d96;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.profit-formula-card h3 {
  margin: 0;
  font-size: 22px;
  color: #123033;
}

.profit-formula-meta {
  margin: 6px 0 0;
  color: #5d727a;
  font-size: 13px;
  line-height: 1.45;
}

.profit-formula-visual {
  display: grid;
  gap: 16px;
}

.pfv-hero {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid #e6eeeb;
  border-radius: 18px;
  background: #fbfdfc;
}

.pfv-hero-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #163f3a;
  color: #e8f6f1;
}

.pfv-hero-icon svg {
  width: 22px;
  height: 22px;
}

.pfv-hero-stack {
  min-width: 0;
}

.pfv-stack-bar {
  display: flex;
  overflow: hidden;
  border-radius: 999px;
  min-height: 34px;
  font-size: 12.5px;
  font-weight: 650;
}

.pfv-stack-top .pfv-stack-paid {
  background: #163f3a;
  color: #f3fbf8;
  display: grid;
  place-items: center;
  padding: 0 12px;
  white-space: nowrap;
}

.pfv-stack-top .pfv-stack-subsidy {
  background: #cfe9df;
  color: #163f3a;
  display: grid;
  place-items: center;
  padding: 0 12px;
  white-space: nowrap;
}

.pfv-stack-bottom {
  background: #163f3a;
  color: #f3fbf8;
  display: grid;
  place-items: center;
}

.pfv-stack-bridge {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: center;
  margin: 8px 0;
}

.pfv-bridge-line {
  border-top: 1px dashed #9bb8ae;
  height: 0;
}

.pfv-bridge-pill {
  font-size: 11.5px;
  color: #14766f;
  background: #e8f6f1;
  border: 1px solid #c7e5db;
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}

.pfv-hero-receipt {
  min-width: 148px;
  padding-left: 16px;
  border-left: 1px dashed #c9d8d2;
  text-align: right;
}

.pfv-hero-receipt span {
  display: block;
  color: #6a7f86;
  font-size: 12px;
  margin-bottom: 4px;
}

.pfv-hero-receipt strong {
  display: block;
  color: #123033;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.pfv-hero-fallback {
  margin: 0;
  color: #5d727a;
  font-size: 13px;
}

.pfv-composition,
.pfv-fees {
  padding: 4px 2px 0;
}

.pfv-composition header,
.pfv-fees header {
  margin-bottom: 10px;
}

.pfv-composition h4,
.pfv-fees h4 {
  margin: 0;
  font-size: 15px;
  color: #123033;
}

.pfv-composition header p {
  margin: 4px 0 0;
  color: #7a8d96;
  font-size: 12px;
}

.pfv-stack-track {
  display: flex;
  width: 100%;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: #edf2f0;
  gap: 1px;
}

.pfv-stack-seg {
  display: block;
  min-width: 0;
  height: 100%;
}

.pfv-stack-seg.is-cogs { background: #1b2423; }
.pfv-stack-seg.is-platform,
.pfv-stack-seg.is-commission { background: #4a6670; }
.pfv-stack-seg.is-creator { background: #2a8f7f; }
.pfv-stack-seg.is-shopAds { background: #c45c26; }
.pfv-stack-seg.is-partner { background: #6b5b95; }
.pfv-stack-seg.is-warehouse { background: #8a7a5c; }
.pfv-stack-seg.is-tax { background: #b07a4a; }
.pfv-stack-seg.is-shipping { background: #5c6b8a; }
.pfv-stack-seg.is-profit { background: #0f766e; }
.pfv-stack-seg.is-sfp { background: #3d7a8c; }
.pfv-stack-seg.is-fixed { background: #6b7280; }

.pfv-composition-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.pfv-comp-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  column-gap: 8px;
  row-gap: 2px;
  align-items: center;
}

.pfv-comp-swatch {
  grid-row: 1 / span 3;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #1b2423;
}

.pfv-comp-item.is-cogs .pfv-comp-swatch { background: #1b2423; }
.pfv-comp-item.is-platform .pfv-comp-swatch,
.pfv-comp-item.is-commission .pfv-comp-swatch { background: #4a6670; }
.pfv-comp-item.is-creator .pfv-comp-swatch { background: #2a8f7f; }
.pfv-comp-item.is-shopAds .pfv-comp-swatch { background: #c45c26; }
.pfv-comp-item.is-partner .pfv-comp-swatch { background: #6b5b95; }
.pfv-comp-item.is-warehouse .pfv-comp-swatch { background: #8a7a5c; }
.pfv-comp-item.is-tax .pfv-comp-swatch { background: #b07a4a; }
.pfv-comp-item.is-shipping .pfv-comp-swatch { background: #5c6b8a; }
.pfv-comp-item.is-profit .pfv-comp-swatch { background: #0f766e; }

.pfv-comp-label {
  color: #5d727a;
  font-size: 12px;
  font-weight: 600;
}

.pfv-comp-item strong {
  color: #123033;
  font-size: 15px;
  letter-spacing: -0.02em;
}

.pfv-comp-item small {
  color: #7a8d96;
  font-size: 12px;
}

.pfv-comp-item.is-profit .pfv-comp-label,
.pfv-comp-item.is-profit strong,
.pfv-comp-item.is-profit small {
  color: #0f766e;
}

.pfv-hero-receipt strong.is-negative {
  color: #b42318;
}

.pfv-fee-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.pfv-fee-card {
  display: grid;
  gap: 8px;
  justify-items: start;
  padding: 12px 12px 11px;
  border: 1px solid #e6eeeb;
  border-radius: 14px;
  background: #fff;
}

.pfv-fee-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #eef5f2;
  color: #163f3a;
}

.pfv-fee-icon svg {
  width: 15px;
  height: 15px;
}

.pfv-fee-label {
  color: #6a7f86;
  font-size: 12px;
}

.pfv-fee-card strong {
  color: #123033;
  font-size: 14px;
  letter-spacing: -0.02em;
}

.pfv-fee-card.is-creator {
  border-color: #cfe4dd;
  background: #f7fcfa;
}

.pfv-note {
  margin: 10px 0 0;
  color: #7a8d96;
  font-size: 12px;
  line-height: 1.45;
}

.profit-formula-raw {
  margin-top: 14px;
  border-top: 1px solid #e8efec;
  padding-top: 10px;
}

.profit-formula-raw summary {
  cursor: pointer;
  color: #5d727a;
  font-size: 13px;
  font-weight: 600;
  list-style: none;
}

.profit-formula-raw summary::-webkit-details-marker {
  display: none;
}

.profit-formula-steps {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.profit-formula-steps li {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f5f8f9;
}

.profit-formula-steps li.is-result {
  background: #e7f6f2;
  border: 1px solid #b7e2d7;
}

.profit-formula-steps span {
  color: #5d727a;
  font-size: 12px;
  font-weight: 600;
}

.profit-formula-steps code {
  display: block;
  white-space: pre-wrap;
  word-break: break-word;
  font: inherit;
  color: #123033;
  font-size: 13.5px;
  line-height: 1.45;
}

@media (max-width: 860px) {
  .pfv-composition-legend {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pfv-fee-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .profit-formula-panel {
    align-items: flex-end;
    padding: 0;
  }

  .profit-formula-card,
  .profit-formula-card-visual {
    width: 100%;
    max-height: 92vh;
    border-radius: 18px 18px 0 0;
  }

  .pfv-hero {
    grid-template-columns: auto 1fr;
  }

  .pfv-hero-receipt {
    grid-column: 1 / -1;
    border-left: 0;
    border-top: 1px dashed #c9d8d2;
    padding: 12px 0 0;
    text-align: left;
  }

  .pfv-composition-legend,
  .pfv-fee-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pfv-stack-top {
    flex-direction: column;
    border-radius: 12px;
  }

  .pfv-stack-top .pfv-stack-paid,
  .pfv-stack-top .pfv-stack-subsidy {
    min-height: 32px;
  }
}
