:root {
  color-scheme: light;
  --ink: #17221f;
  --muted: #65716d;
  --line: #dce3e0;
  --surface: #ffffff;
  --surface-soft: #f4f7f5;
  --green: #176b5b;
  --green-soft: #e5f1ed;
  --gold: #a86b08;
  --gold-soft: #fff3d9;
  --blue: #315e94;
  --red: #a44848;
  --red-soft: #f8e8e8;
  --shadow: 0 10px 28px rgba(22, 45, 38, 0.07);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: #eef2f0;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  letter-spacing: 0;
}

button, select { font: inherit; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; padding: 28px clamp(20px, 4vw, 64px) 24px; color: #fff; background: #173f37; }
.eyebrow, .section-kicker { margin: 0 0 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; color: #9bc5b9; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 36px; font-weight: 750; }
h2 { margin-bottom: 0; font-size: 24px; }
h3 { margin-bottom: 0; font-size: 16px; }

.period-block { display: grid; grid-template-columns: auto auto; gap: 6px 12px; align-items: center; min-width: 320px; }
.period-block label { font-size: 12px; color: #bcd4cd; }
.period-block select { min-width: 210px; padding: 8px 32px 8px 10px; color: #fff; border: 1px solid #62877e; border-radius: 6px; background: #234f46; }
.comparison { grid-column: 2; color: #bcd4cd; font-size: 12px; }

.tabs { position: sticky; top: 0; z-index: 20; display: flex; gap: 4px; padding: 0 clamp(20px, 4vw, 64px); border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(12px); }
.tabs { scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { min-height: 48px; padding: 0 18px; color: var(--muted); border: 0; border-bottom: 3px solid transparent; background: transparent; cursor: pointer; }
.tab:hover, .tab.is-active { color: var(--green); }
.tab.is-active { border-bottom-color: var(--green); font-weight: 700; }

main { max-width: 1440px; margin: 0 auto; padding: 28px clamp(18px, 3.5vw, 52px) 48px; }
.view { display: none; }
.view.is-active { display: block; animation: appear .2s ease-out; }
@keyframes appear { from { opacity: .35; transform: translateY(4px); } }

.section-heading, .panel-heading, .channel-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.section-heading { margin-bottom: 18px; }
.section-heading .section-kicker { color: var(--green); }
.panel-heading { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.panel-heading span, .channel-title span { color: var(--muted); font-size: 12px; }
.status { padding: 6px 9px; border-radius: 4px; font-size: 12px; font-weight: 700; }
.status-good { color: var(--green); background: var(--green-soft); }
.status-info { color: var(--blue); background: #e7eef7; }
.status-warning { color: var(--gold); background: var(--gold-soft); }
.status-danger { color: var(--red); background: var(--red-soft); }

.kpi-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 28px; }
.kpi { min-height: 148px; padding: 18px; border: 1px solid var(--line); border-top: 3px solid #9aa9a4; border-radius: 6px; background: var(--surface); }
.kpi-primary { border-top-color: var(--green); }
.kpi-negative { border-top-color: var(--red); }
.kpi-warning { border-top-color: #d19a32; }
.kpi p { margin-bottom: 14px; color: var(--muted); font-size: 13px; }
.kpi strong { display: block; margin-bottom: 10px; overflow-wrap: anywhere; font-size: 24px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.kpi strong span { margin-left: 3px; font-size: 13px; font-weight: 600; color: var(--muted); }
.kpi strong.pending { font-size: 24px; color: var(--gold); }
.kpi small { color: var(--muted); font-size: 11px; }
.delta { margin-bottom: 5px; font-size: 12px; font-weight: 700; }
.delta.up { color: var(--green); }
.delta.down, .negative { color: var(--red); }
.positive { color: var(--green); }
.delta.neutral { color: var(--gold); }

.target-section { margin-bottom: 28px; padding: 24px 0 26px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.target-heading { margin-bottom: 16px; }
.target-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.target-summary article { min-height: 128px; padding: 18px; border: 1px solid var(--line); border-top: 3px solid var(--green); border-radius: 6px; background: var(--surface); }
.target-summary article.target-alert { border-top-color: var(--red); }
.target-summary p { margin-bottom: 12px; color: var(--muted); font-size: 12px; }
.target-summary strong { display: block; overflow-wrap: anywhere; font-size: 23px; line-height: 1.25; font-variant-numeric: tabular-nums; }
.target-summary small { display: block; margin-top: 8px; color: var(--muted); font-size: 11px; }
.target-table-wrap { overflow-x: auto; }
.target-table { min-width: 850px; border: 1px solid var(--line); background: var(--surface); }
.target-table th { cursor: default; }
.target-table th:hover { color: var(--muted); }
.target-table tfoot th, .target-table tfoot td { border-top: 2px solid var(--line); border-bottom: 0; background: var(--surface-soft); font-weight: 700; }
.formula-note { margin: 10px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }

.overview-layout, .analysis-columns { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, .8fr); gap: 18px; margin-bottom: 18px; }
.analysis-panel, .action-panel, .net-mix, .chart-panel, .analysis-columns > section, .product-table-panel, .product-summary > article, .quality-list article, .source-note, .channel-summary article { border: 1px solid var(--line); border-radius: 6px; background: var(--surface); box-shadow: var(--shadow); }
.analysis-panel, .action-panel, .net-mix, .chart-panel, .analysis-columns > section, .product-table-panel, .source-note { padding: 20px; }
.insight-list { margin: 18px 0 0; padding-left: 22px; }
.insight-list li { margin-bottom: 14px; padding-left: 6px; color: #3c4945; font-size: 14px; line-height: 1.75; }
.insight-list li:last-child { margin-bottom: 0; }
.insight-list b { color: var(--ink); }

.action-item { display: grid; grid-template-columns: 34px 1fr; gap: 11px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.action-item:last-child { border-bottom: 0; padding-bottom: 0; }
.action-item p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.priority { align-self: start; padding: 4px 0; text-align: center; border-radius: 4px; font-size: 11px; font-weight: 800; }
.priority.p1 { color: #fff; background: var(--green); }
.priority.p2 { color: var(--gold); background: var(--gold-soft); }

.stacked-bar { display: flex; height: 18px; margin: 20px 0 14px; overflow: hidden; border-radius: 3px; background: #e9eeec; }
.stacked-bar span { width: var(--w); background: var(--c); }
.legend { display: flex; flex-wrap: wrap; gap: 12px 22px; color: var(--muted); font-size: 12px; }
.legend i { display: inline-block; width: 9px; height: 9px; margin-right: 6px; background: var(--c); }
.legend-negative { color: var(--red); }
.mix-note { margin: 12px 0 0; color: var(--muted); font-size: 11px; }

.traffic-total { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.traffic-total article { padding: 18px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.traffic-total p { margin-bottom: 9px; color: var(--muted); font-size: 12px; }
.traffic-total strong { display: block; overflow-wrap: anywhere; font-size: 22px; }
.traffic-total span { display: block; margin-top: 7px; color: var(--muted); font-size: 11px; }

.channel-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.channel-summary article { padding: 20px; }
.channel-title { margin-bottom: 14px; }
.channel-summary dl { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; }
.channel-summary dl div { padding: 11px 14px; border-left: 1px solid var(--line); }
.channel-summary dl div:first-child { border-left: 0; padding-left: 0; }
.channel-summary dt { color: var(--muted); font-size: 12px; }
.channel-summary dd { margin: 6px 0 0; font-size: 18px; font-weight: 700; }
.channel-summary em { display: block; margin-top: 4px; color: var(--green); font-size: 11px; font-style: normal; }
.channel-summary em.down { color: var(--red); }
.channel-summary dl { grid-template-columns: repeat(4, 1fr); }
.channel-summary dl div { padding: 11px 14px; border-left: 1px solid var(--line); }
.channel-summary dl div:nth-child(4n + 1) { border-left: 0; padding-left: 0; }
.channel-summary dd small, .traffic-table small { display: block; margin-top: 3px; color: var(--green); font-size: 11px; font-weight: 500; }
.traffic-compare-grid, .traffic-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.traffic-compare-card, .traffic-detail-grid > div { min-width: 0; }
.traffic-compare-card h4, .traffic-detail-grid h4 { margin: 0 0 12px; color: var(--ink); font-size: 13px; }
.traffic-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 5px; }
.traffic-table { width: 100%; min-width: 650px; border-collapse: collapse; font-size: 12px; }
.traffic-table th, .traffic-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.traffic-table th { color: var(--muted); background: #f3f6f4; font-weight: 700; }
.traffic-table tr:last-child td { border-bottom: 0; }
.traffic-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.traffic-table td:first-child { max-width: 118px; overflow: hidden; text-overflow: ellipsis; }
.traffic-table small { color: var(--green); }
.chart-key .current { background: var(--green); }
.chart-key .previous { background: #b7c3bf; }

.chart-panel { margin-bottom: 18px; }
.bar-chart { margin-top: 18px; }
.bar-row { display: grid; grid-template-columns: 104px 1fr 112px; gap: 12px; align-items: center; margin-bottom: 12px; }
.bar-label { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; }
.bar-track { display: flex; flex-direction: column; gap: 3px; }
.bar { min-width: 2px; height: 9px; border-radius: 2px; }
.bar.current { background: var(--green); }
.bar.previous { background: #b7c3bf; }
.bar-value { text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; }
.chart-key { display: flex; justify-content: flex-end; gap: 15px; margin-top: 10px; color: var(--muted); font-size: 11px; }
.chart-key i { display: inline-block; width: 14px; height: 5px; margin-right: 5px; vertical-align: middle; }
.compact-list { margin: 16px 0 0; padding-left: 18px; }
.compact-list li { margin-bottom: 10px; color: #43504c; font-size: 13px; line-height: 1.6; }

.segmented { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 6px; background: #e9eeec; }
.segment { min-width: 72px; padding: 7px 12px; border: 0; border-radius: 4px; color: var(--muted); background: transparent; cursor: pointer; }
.segment.is-active { color: #fff; background: var(--green); font-weight: 700; }
.product-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.product-summary article { padding: 18px; box-shadow: none; }
.product-summary p { margin-bottom: 10px; color: var(--muted); font-size: 12px; }
.product-summary strong { display: block; overflow-wrap: anywhere; font-size: 21px; font-variant-numeric: tabular-nums; }
.product-summary small { display: block; margin-top: 6px; color: var(--green); }
.product-table-panel { margin-bottom: 18px; }
.table-wrap { overflow-x: auto; margin-top: 14px; }
table { width: 100%; min-width: 880px; border-collapse: collapse; }
th, td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; font-size: 12px; }
th { color: var(--muted); background: var(--surface-soft); cursor: pointer; user-select: none; }
th:hover { color: var(--green); }
.image-col { width: 88px; cursor: default; }
.image-col:hover { color: var(--muted); }
.product-thumb { display: grid; width: 72px; height: 72px; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.product-thumb img { display: block; width: 100%; height: 100%; object-fit: contain; }
.product-placeholder { padding: 8px; color: var(--muted); background: var(--surface-soft); text-align: center; }
.product-placeholder span { font-size: 11px; line-height: 1.35; }
#product-table tbody td { vertical-align: middle; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:hover { background: #f5f8f6; }
.empty-row td { padding: 42px 18px; text-align: center; color: var(--muted); }
.rank { display: inline-grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; color: var(--muted); background: #edf1ef; }
.rank.rank-top { color: #fff; background: var(--green); }

.structure-board-section { margin-bottom: 18px; padding: 20px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); box-shadow: var(--shadow); }
.structure-board-section > .panel-heading { margin-bottom: 14px; }
.product-quick-nav { position: sticky; top: 48px; z-index: 10; display: flex; align-items: center; gap: 7px; margin: 0 0 22px; padding: 10px 12px; overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; background: rgba(244, 247, 245, 0.97); box-shadow: 0 5px 14px rgba(22, 45, 38, 0.08); white-space: nowrap; scrollbar-width: thin; }
.product-quick-nav > span { flex: 0 0 auto; color: var(--muted); font-size: 12px; }
.product-quick-nav a { flex: 0 0 auto; padding: 6px 9px; border-radius: 4px; color: var(--ink); background: #e8edef; font-size: 12px; text-decoration: none; }
.product-quick-nav a:hover, .product-quick-nav a:focus-visible { color: #fff; background: var(--green); outline: none; }
.structure-board { margin-bottom: 30px; scroll-margin-top: 112px; }
.structure-board:last-child { margin-bottom: 0; }
.structure-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 10px; }
.structure-title h4 { margin: 0; padding-left: 10px; border-left: 4px solid #c7372f; font-size: 15px; }
.structure-title span, .structure-note { color: var(--muted); font-size: 11px; }
.structure-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 0 0 12px; padding: 10px 14px; border-radius: 6px; background: var(--surface-soft); }
.filter-field { display: flex; align-items: center; gap: 8px; }
.structure-filter label { color: var(--muted); font-size: 12px; }
.structure-filter select { min-width: 180px; padding: 7px 32px 7px 10px; border: 1px solid #bac8c3; border-radius: 5px; color: var(--ink); background: #fff; }
.structure-scroll { overflow-x: auto; border: 1px solid var(--line); }
.structure-table { min-width: 1900px; table-layout: fixed; }
.structure-table th, .structure-table td { padding: 9px 8px; border-right: 1px solid var(--line); font-size: 11px; white-space: nowrap; }
.structure-table thead th { text-align: center; cursor: default; }
.structure-table thead th:hover { color: var(--muted); }
.structure-table .dimension-head { position: sticky; left: 0; z-index: 4; width: 160px; background: #eef1f2; }
.structure-table tbody th { position: sticky; left: 0; z-index: 2; width: 160px; color: var(--ink); background: var(--surface); text-align: left; }
.structure-table .group-current { color: #174f92; background: #dfeef9; }
.structure-table .group-yoy { color: #bb3737; background: #f8e2e2; }
.structure-table .group-previous { color: #40505b; background: #e9edef; }
.table-season .structure-table .dimension-head,
.table-season .structure-table tbody th { width: 300px; }
.table-series .structure-table .dimension-head,
.table-series .structure-table tbody th,
.table-seriesPure .structure-table .dimension-head,
.table-seriesPure .structure-table tbody th { width: 240px; }
.table-short .structure-table .dimension-head,
.table-short .structure-table tbody th { width: 180px; }
.structure-total th, .structure-total td { font-weight: 800; background: #fff7d9; }
.structure-total th { z-index: 3; }
.delta-positive { color: #c93b36; }
.delta-negative { color: #15936e; }
.delta-flat { color: #88928f; }
.structure-note { margin: 14px 0 0; line-height: 1.6; }
.has-product-labels .structure-table { min-width: 1990px; }
.has-product-labels .structure-table .dimension-head,
.has-product-labels .structure-table tbody th { width: 250px; }
.product-label { display: flex; align-items: center; gap: 10px; }
.product-label > span:last-child { display: grid; gap: 3px; }
.product-label b { color: var(--ink); font-size: 11px; }
.product-label small { color: var(--muted); font-size: 11px; font-weight: 700; }
.product-thumb-small { flex: 0 0 52px; width: 52px; height: 52px; }
#gmv-product-placeholder .empty-row { padding: 42px 18px; color: var(--muted); text-align: center; }

.product-notes p { margin: 14px 0 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.sku-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.sku-chips span { padding: 6px 9px; border-radius: 4px; color: var(--green); background: var(--green-soft); font-weight: 700; font-size: 12px; }
.sku-chips.warning span { color: var(--gold); background: var(--gold-soft); }

.quality-list { display: grid; gap: 10px; }
.quality-list article { display: grid; grid-template-columns: 56px 1fr; gap: 16px; padding: 20px; box-shadow: none; }
.quality-index { color: #9aaba5; font-size: 22px; font-weight: 800; }
.quality-list h3 { margin-bottom: 7px; }
.quality-list p, .source-note p { margin-bottom: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.source-note { margin-top: 18px; background: #f8faf9; box-shadow: none; }
.source-note b { display: block; margin-bottom: 6px; }
footer { display: flex; justify-content: space-between; padding: 18px clamp(20px, 4vw, 64px); color: #81908b; border-top: 1px solid var(--line); font-size: 11px; }

@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .target-summary { grid-template-columns: repeat(2, 1fr); }
  .product-summary { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  h1 { font-size: 28px; }
  .topbar { align-items: flex-start; flex-direction: column; padding: 22px 18px; }
  .period-block { min-width: 0; width: 100%; grid-template-columns: 1fr; }
  .period-block select { width: 100%; }
  .comparison { grid-column: 1; }
  .tabs { padding: 0 10px; overflow-x: auto; }
  .tab { flex: 0 0 auto; padding: 0 13px; }
  main { padding: 22px 14px 36px; }
  .section-heading { align-items: flex-start; }
  .kpi-grid, .channel-summary, .overview-layout, .analysis-columns, .target-summary, .traffic-total { grid-template-columns: 1fr; }
  .product-summary { grid-template-columns: 1fr 1fr; }
  .channel-summary dl { grid-template-columns: 1fr; }
  .channel-summary dl div { padding: 10px 0; border-left: 0; border-top: 1px solid var(--line); }
  .bar-row { grid-template-columns: 82px 1fr 102px; gap: 8px; }
  .quality-list article { grid-template-columns: 40px 1fr; }
  .structure-title { align-items: flex-start; flex-direction: column; }
  .structure-filter { align-items: stretch; flex-direction: column; }
  .filter-field { align-items: stretch; flex-direction: column; }
  .structure-filter select { width: 100%; }
  footer { flex-direction: column; gap: 5px; }
}
@media (max-width: 420px) {
  .product-summary { grid-template-columns: 1fr; }
  .section-heading { flex-direction: column; }
  .segmented { align-self: stretch; }
  .segment { flex: 1; }
}

.gmv-source-note{padding:10px 14px;color:#53606b;font-size:12px;background:#f7f8f6;border-bottom:1px solid #e3e7e2}
.gmv-table-wrap{overflow:auto}
.gmv-table{width:100%;border-collapse:collapse;font-size:13px}
.gmv-table th,.gmv-table td{padding:10px 12px;border-bottom:1px solid #edf0ed;text-align:left;white-space:nowrap}
.gmv-table th{color:#65716b;background:#fafbf9;font-weight:600}
.gmv-table .num{text-align:right;font-variant-numeric:tabular-nums}
