:root {
  --bg: #f3f4f6;
  --panel: #fff;
  --line: #e6e8ee;
  --line-soft: #f1f2f5;
  --ink: #15181e;
  --muted: #6b7280;
  --brand: #2b59c3;
  --brand-soft: #eaf0ff;
  --good: #137a44;
  --good-soft: #e6f5ec;
  --bad: #b42318;
  --bad-soft: #fdecea;
  --warn: #b45309;
  --warn-soft: #fdf3e3;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; background: var(--bg); color: var(--ink);
  font-family: -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 13px; line-height: 1.5;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.small { font-size: 11px; }
.mono { font-variant-numeric: tabular-nums; }

.app { display: flex; min-height: 100vh; }

/* ---------- 侧栏 ---------- */
.side {
  width: 212px; flex: 0 0 212px; background: #fbfbfc; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; gap: 10px; align-items: center; padding: 18px 18px 14px; }
.brand .dot { width: 10px; height: 10px; border-radius: 3px; background: linear-gradient(135deg, #2b59c3, #7aa2ff); }
.brand b { display: block; font-size: 15px; letter-spacing: .2px; }
.brand small { color: var(--muted); font-size: 11px; }
.side nav { display: flex; flex-direction: column; padding: 6px 10px; gap: 2px; }
.side nav a { padding: 9px 12px; border-radius: 8px; color: #3b4250; }
.side nav a:hover { background: #f1f2f5; text-decoration: none; }
.side nav a.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.side-foot {
  margin-top: auto; padding: 14px 18px 18px; border-top: 1px solid var(--line-soft);
  font-size: 11.5px; color: var(--muted);
}
.side-foot .kv { display: flex; justify-content: space-between; padding: 2px 0; }
.side-foot b { color: #3b4250; font-weight: 500; }

/* ---------- 主区 ---------- */
.main { flex: 1; min-width: 0; padding: 16px 24px 60px; }

.filters {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; margin-bottom: 16px;
}
.fld { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--muted); min-width: 0; }
.fld > span.lbl { white-space: nowrap; }
.fld .hint { font-style: normal; color: #9aa1ad; }
.fld.grow { flex: 1; min-width: 240px; }
.fld.wide { min-width: 260px; }
.filters input, .filters select {
  font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line);
  border-radius: 7px; padding: 6px 9px; min-width: 120px;
}
.filters input[type="date"] { min-width: 138px; }
.filters input[type="checkbox"], .filters input[type="radio"] {
  min-width: 0; width: 14px; height: 14px; padding: 0; margin: 0; flex: 0 0 auto;
}
.filters .grow input { width: 100%; }
.filters input:focus, .filters select:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
.fbtns { display: flex; gap: 8px; margin-left: auto; }

.btn {
  font: inherit; border: 1px solid var(--brand); background: var(--brand); color: #fff;
  padding: 7px 16px; border-radius: 7px; cursor: pointer;
}
.btn:hover { filter: brightness(1.06); text-decoration: none; }
.btn.ghost { background: #fff; color: #414855; border-color: var(--line); }

/* 多选下拉*/
.ms { position: relative; }
.ms > summary {
  list-style: none; cursor: pointer; border: 1px solid var(--line); background: #fff;
  border-radius: 7px; padding: 6px 26px 6px 9px; min-width: 190px; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative;
}
.ms > summary::-webkit-details-marker { display: none; }
.ms > summary::after { content: "▾"; position: absolute; right: 9px; color: #9aa1ad; }
.ms .ms-body {
  position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; width: 420px; max-height: 380px;
  overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 10px 30px rgba(17, 24, 39, .12); padding: 10px 12px;
}
.ms-level { display: flex; gap: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line-soft); margin-bottom: 8px; }
.ms .pill { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; }
.ms-list { display: flex; flex-direction: column; gap: 3px; }
.ms-list.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 14px; }
.ck { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #3b4250; padding: 2px 0; }
.ck input { margin: 0; }
.ms-tip { margin-top: 8px; font-size: 11px; color: #9aa1ad; }
.ms-actions {
  display: flex; gap: 12px; padding: 0 2px 7px; border-bottom: 1px solid var(--line-soft);
  margin-bottom: 7px;
}
.ms-actions .lnk {
  border: 0; background: none; padding: 0; font: inherit; font-size: 12px;
  color: var(--brand); cursor: pointer;
}
.ms-actions .lnk:hover { text-decoration: underline; }

/* 店铺多选：店铺名 + 右侧 venderId / 停用标记 */
.st-fld .st-ms > summary { min-width: 150px; }
.st-ms .ms-body { width: 470px; }
.st-list .ck { justify-content: flex-start; min-width: 0; }
.st-list .ck > span {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px;
}
.st-list .st-id { margin-left: auto; font-style: normal; font-size: 10.5px; color: #9aa1ad; }
.st-list .st-off {
  font-style: normal; font-size: 10px; color: #b42318; background: #fef3f2;
  border-radius: 4px; padding: 0 4px; margin-left: 4px;
}

/* 类目：chips 触发器 + 搜索 + 多列树 */
.cat-pick { position: relative; }
.cat-trigger {
  display: flex; align-items: center; gap: 6px; cursor: pointer; user-select: none;
  border: 1px solid var(--line); background: #fff; border-radius: 7px;
  padding: 5px 26px 5px 7px; min-width: 210px; max-width: 280px; height: 32px;
  position: relative; overflow: hidden; white-space: nowrap;
}
.cat-trigger:focus-visible { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
.cat-pick.open .cat-trigger { border-color: var(--brand); }
.cat-trigger .ph { color: var(--muted); font-size: 12.5px; }
.cat-chips { display: flex; gap: 4px; align-items: center; overflow: hidden; flex: 1 1 auto; min-width: 0; }
.cat-chip {
  display: inline-flex; align-items: center; gap: 3px; background: #eef2fb; color: #3b4250;
  border-radius: 5px; padding: 2px 5px 2px 7px; font-size: 12px; max-width: 108px; flex: 0 1 auto;
}
.cat-chip .t { overflow: hidden; text-overflow: ellipsis; }
.cat-chip .x { color: #98a0ad; cursor: pointer; font-size: 13px; line-height: 1; padding: 0 1px; }
.cat-chip .x:hover { color: var(--bad); }
.cat-more { color: var(--muted); font-size: 12px; flex: 0 0 auto; }
.cat-count {
  flex: 0 0 auto; background: #e8eefc; color: var(--brand); font-size: 11px; font-weight: 600;
  border-radius: 9px; padding: 1px 6px; font-variant-numeric: tabular-nums;
}
.cat-caret { position: absolute; right: 9px; color: #9aa1ad; font-size: 11px; transition: transform .15s; }
.cat-pick.open .cat-caret { transform: rotate(180deg); }
.cat-panel {
  position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; background: #fff;
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 34px rgba(17, 24, 39, .14);
  width: max-content; min-width: 460px; max-width: min(880px, 90vw); overflow: hidden;
}
.cat-panel[hidden] { display: none; }
.cat-search {
  display: flex; align-items: center; gap: 8px; padding: 9px 12px;
  background: #f6f8fd; border-bottom: 1px solid var(--line-soft); color: #7b8494;
}
.cat-search svg { width: 15px; height: 15px; flex: 0 0 auto; }
.cat-search input {
  flex: 1; border: 0; background: transparent; font: inherit; color: var(--ink);
  outline: none; padding: 2px 0; min-width: 0; box-shadow: none;
}
.cat-search input:focus { outline: none; border: 0; }
.cat-body { max-height: 380px; overflow: auto; }
.cat-cols { display: flex; align-items: stretch; min-height: 120px; }
.cat-col { min-width: 196px; max-width: 300px; padding: 6px; border-right: 1px solid var(--line-soft); }
.cat-col:last-child { border-right: 0; }
.cat-row {
  display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 6px;
  font-size: 12.5px; color: #3b4250; cursor: pointer; white-space: nowrap; user-select: none;
}
.cat-row:hover { background: #f0f5ff; }
.cat-row.cur { background: #eef4ff; }
.cat-row .nm { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; }
.cat-row mark { background: #fff1b8; color: inherit; border-radius: 2px; padding: 0 1px; }
.cat-row .arrow { color: #b9bfca; font-size: 13px; flex: 0 0 auto; }
.cat-row .box {
  flex: 0 0 auto; width: 15px; height: 15px; border-radius: 3px; border: 1px solid #c4c9d3;
  background: #fff; position: relative;
}
.cat-row .box.on { background: var(--brand); border-color: var(--brand); }
.cat-row .box.on::after {
  content: ""; position: absolute; left: 3px; top: 2.5px; width: 4px; height: 8px;
  border: 2px solid #fff; border-top: 0; border-left: 0; transform: rotate(42deg);
}
.cat-row .box.part { background: var(--brand); border-color: var(--brand); }
.cat-row .box.part::after {
  content: ""; position: absolute; left: 3px; top: 6px; width: 7px; height: 2px;
  background: #fff; border-radius: 1px;
}
.cat-empty { padding: 26px 12px; color: #98a0ad; font-size: 12px; text-align: center; }
.cat-foot {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px;
  border-top: 1px solid var(--line-soft); background: #fafbfd;
}
.cat-foot .ms-tip { margin: 0; flex: 1; font-size: 11px; color: #98a0ad; }
.btn.sm { padding: 3px 10px; font-size: 12px; border-radius: 6px; }

/* SKU 链接 + 复制 */
.sku-cell { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.sku-link { color: var(--brand); text-decoration: none; }
.sku-link:hover { text-decoration: underline; }
.copy-sku {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; padding: 0; border: 0; background: transparent;
  color: #b3b9c4; border-radius: 4px; cursor: pointer; line-height: 0;
  transition: color .12s, background .12s;
}
.copy-sku svg { width: 12px; height: 12px; display: block; }
.copy-sku:hover { color: var(--brand); background: #eef4ff; }
.copy-sku.ok { color: #188a52; }
.copy-sku.err { color: #c0392b; }

/* 指标勾选：编号徽标 */
.ser-fld .ms-body { width: 340px; }
.ser-list .ck { justify-content: flex-start; gap: 7px; }
.ser-list .ck .ord {
  margin-left: auto; font-style: normal; font-size: 10.5px; line-height: 1; color: #fff;
  background: var(--brand); border-radius: 9px; padding: 3px 6px;
}
.ser-list .ck .ord[hidden] { display: none; }
.cmp-dates { display: inline-flex; gap: 12px; }
.cmp-dates[hidden] { display: none; }

/* ---------- 页头 ---------- */
.head { display: block; margin: 4px 0 14px; }
.head h1 { font-size: 21px; margin: 0 0 4px; letter-spacing: .2px; }
.head .sub { margin: 0; color: var(--muted); font-size: 12.5px; }
.crumbs { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.cmp-note { color: var(--brand); }

/* ---------- KPI ---------- */
.cards { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
@media (max-width: 1500px) { .cards { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 1200px) { .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  margin-bottom: 16px; overflow: hidden;
}
.cards .card { margin-bottom: 0; }
.kpi { padding: 11px 13px; min-width: 0; }
.kpi .k { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .v {
  font-size: 20px; font-weight: 600; margin: 3px 0 2px; font-variant-numeric: tabular-nums;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kpi.sm .v { font-size: 17px; }
.kpi .d { display: flex; align-items: center; gap: 6px; min-height: 18px; font-size: 11px; }

.chip { font-size: 11px; font-weight: 600; border-radius: 5px; padding: 1px 6px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chip.up { color: var(--good); background: var(--good-soft); }
.chip.down { color: var(--bad); background: var(--bad-soft); }
.chip.warn { color: var(--warn); background: var(--warn-soft); }

/* ---------- 卡片内容 ---------- */
.grid2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1280px) { .grid2 { grid-template-columns: 1fr; } }
.card-h {
  display: flex; align-items: baseline; gap: 10px; padding: 12px 16px 10px;
  border-bottom: 1px solid var(--line-soft); flex-wrap: wrap;
}
.card-h h2 { font-size: 13.5px; margin: 0; font-weight: 600; }
.card-h .muted { font-size: 11.5px; }
.card-h .more { margin-left: auto; font-size: 12px; }

/* ---------- 图表 ---------- */
.chart { width: 100%; height: 220px; display: block; padding: 8px 10px 0; }
.chart .grid { stroke: #eef0f4; stroke-width: 1; }
.chart .bar { fill: #9db4ef; }
.chart .bar:hover { fill: #7d9be8; }
.chart .line { fill: none; stroke-width: 2; }
.chart .axis { font-size: 11px; fill: #9aa1ad; }
.legend { display: flex; gap: 16px; padding: 6px 16px 12px; font-size: 11.5px; color: var(--muted); }
.legend .lg { display: inline-flex; align-items: center; gap: 6px; }
.legend .lg i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* ---------- 表格 ---------- */
.table-wrap { overflow: auto; }
.table-wrap.tall { max-height: 640px; }
.table-wrap.fit { padding: 0 0 2px; }
.table-wrap.fit table.grid { width: auto; min-width: 0; }
table.grid { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
table.grid.compact { width: auto; min-width: 58%; }
table.grid th {
  position: sticky; top: 0; z-index: 1; background: #fafbfc; color: var(--muted);
  font-weight: 600; font-size: 11.5px; text-align: left; padding: 8px 10px;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.grid td { padding: 7px 10px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
table.grid tbody tr:hover { background: #f8f9fc; }
table.grid tbody tr[data-href] { cursor: pointer; }
table.grid .r { text-align: right; }
table.grid.dense td { padding: 6px 9px; }
table.grid tfoot td { background: #f7f9ff; font-weight: 600; border-top: 1px solid var(--line); }
table.grid .sticky-l { position: sticky; left: 0; background: #fff; z-index: 2; border-right: 1px solid var(--line); }
table.grid .sticky-l2 { position: sticky; left: 46px; background: #fff; z-index: 2; }
table.grid thead .sticky-l, table.grid thead .sticky-l2 { background: #fafbfc; z-index: 3; }
table.grid thead .sticky-l { box-shadow: 6px 0 8px -6px rgba(17, 24, 39, .14); }
/* 横向滚动时，日期列右侧用同底色实心投影压掉露出的半截文字（::after 会被单元格裁掉） */
.table-wrap.hscroll table.grid .sticky-l {
  box-shadow: 28px 0 0 #fff, 6px 0 8px -6px rgba(17, 24, 39, .14);
}
.table-wrap.hscroll table.grid thead .sticky-l { box-shadow: 28px 0 0 #fafbfc, 6px 0 8px -6px rgba(17, 24, 39, .14); }
.table-wrap.hscroll table.grid tfoot .sticky-l { box-shadow: 28px 0 0 #f7f9ff; }
table.grid .name { max-width: 10em; overflow: hidden; text-overflow: ellipsis; }
table.grid th { position: sticky; }
table.grid th .col-grip {
  position: absolute; top: 0; right: -4px; width: 8px; height: 100%;
  cursor: col-resize; z-index: 4;
}
table.grid th .col-grip:hover, body.col-resizing table.grid th .col-grip { background: rgba(74, 127, 212, .28); }
body.col-resizing { cursor: col-resize; user-select: none; }
table.grid .cate { max-width: 200px; overflow: hidden; text-overflow: ellipsis; color: #4b5563; }
table.grid .detail { max-width: 520px; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
th.sortable { cursor: pointer; user-select: none; }
th.sortable a { color: inherit; }
th.sortable.on, th.sortable.on a { color: var(--brand); }
th.sortable .ar { font-style: normal; margin-left: 3px; }
.sku-title-link { color: var(--brand); text-decoration: none; }
.sku-title-link:hover { text-decoration: underline; }
table.grid.top td { vertical-align: top; }
.sku-line { max-width: 240px; overflow: hidden; text-overflow: ellipsis; }

.bar-cell {
  display: inline-block; width: 62px; height: 6px; border-radius: 3px; background: #eef0f4;
  vertical-align: middle; margin-right: 6px; overflow: hidden;
}
.bar-cell i { display: block; height: 100%; background: #9db4ec; border-radius: 3px; }

/* ---------- 质量 ---------- */
.qlist { padding: 6px 16px 12px; }
.qrow { display: grid; grid-template-columns: 76px 90px 1fr; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line-soft); font-size: 12px; }
.qrow:last-child { border-bottom: 0; }
.qday { color: var(--muted); }
.qsrc { color: #3b4250; }
.qrow.ok .qmsg { color: var(--good); }
.qrow.warn .qmsg { color: var(--warn); }
.qrow.bad .qmsg { color: var(--bad); font-weight: 600; }
.row-bad td { background: #fff7f6; }
.row-warn td { background: #fffdf6; }
.ibadge { font-size: 10.5px; padding: 1px 7px; border-radius: 5px; background: var(--warn-soft); color: var(--warn); font-weight: 600; }
.ibadge.error { background: var(--bad-soft); color: var(--bad); }

.empty-page { max-width: 620px; margin: 80px auto; text-align: center; }
.code { background: #11151c; color: #d7e2f4; padding: 14px 16px; border-radius: 10px; text-align: left; font-size: 12px; overflow: auto; }

/* ---------- 口径提示 / SPU 级投放 ---------- */
.note {
  background: #fffaf0; border: 1px solid #f0e0bf; border-left: 3px solid var(--warn);
  color: #6b4a1b; border-radius: 8px; padding: 10px 13px; margin: 0 0 14px;
  font-size: 12.3px; line-height: 1.65;
}
.card > .note { margin: 12px 16px; }
.note.tight { padding: 8px 11px; font-size: 12px; }
.note b { color: #7a4a0a; }
.note a { color: inherit; text-decoration: underline; }
.note u { text-decoration-color: #d8a75a; text-underline-offset: 2px; }

.tag {
  display: inline-block; font-size: 10.5px; line-height: 16px; padding: 0 6px;
  border-radius: 5px; font-weight: 600; vertical-align: 1px; margin-left: 2px;
}
.tag.spu { background: #f1e7ff; color: #6b3fb5; }
.tag.on { background: var(--good-soft); color: var(--good); }
.tag.off { background: #f1f2f5; color: #6b7280; }

details.spu {
  border: 1px solid var(--line); border-radius: 8px; margin: 0 16px 10px; background: #fff;
}
details.spu > summary {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  cursor: pointer; list-style: none; font-size: 12.5px;
}
details.spu > summary::-webkit-details-marker { display: none; }
details.spu .spu-id { font-weight: 600; color: #3b4250; }
details.spu .spu-meta { color: var(--muted); }
details.spu .spu-caret { margin-left: auto; color: #9aa1ad; transition: transform .15s; }
details.spu[open] .spu-caret { transform: rotate(180deg); }
details.spu .table-wrap { border-top: 1px solid var(--line-soft); }
details.spu table.grid th { background: #fbfbfd; }

/* ---------- 逐日明细：数据口径多选 ---------- */
.card-h .cols-ms { margin-left: auto; }
.cols-ms > summary { min-width: 0; padding: 4px 22px 4px 9px; font-size: 12px; }
/* 表格在页面底部：面板用 fixed 定位，打开时按触发器位置向上/向下摆（见 base.html 脚本） */
.cols-ms .ms-body { left: auto; right: auto; top: auto; bottom: auto; width: 500px; max-width: calc(100vw - 24px); }
.cg-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2px 7px; border-bottom: 1px solid var(--line-soft); margin-bottom: 8px;
}
.cg-acts { display: inline-flex; align-items: center; gap: 10px; }
.cg-act {
  border: 0; background: none; padding: 0; font: inherit; font-size: 11.5px;
  color: #2563eb; cursor: pointer; white-space: nowrap;
}
.cg-act:hover { text-decoration: underline; }
.cg-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 10px; }
.cg-col { min-width: 0; }
.cg-h {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  margin: 0 0 5px; padding: 0 2px 4px; border-bottom: 1px dashed var(--line-soft);
}
.cg-h b { font-size: 12px; color: #2c3442; }
.cg-h .cg-acts { gap: 7px; }
.cg-h .cg-act { font-size: 10.5px; color: #8a93a3; }
.cg-col .ck { padding: 3px 2px; white-space: nowrap; }
[data-col][hidden] { display: none !important; }

/* SKU 页的 SPU 逐日花费 */
.spu-daily { margin: 2px 16px 14px; }
.spu-daily .sub-h {
  font-size: 12.5px; font-weight: 600; margin: 12px 0 7px;
  display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap;
}
.spu-daily .sub-h .muted { font-weight: 400; font-size: 11.5px; }
.spu-daily table.grid { border: 1px solid var(--line-soft); border-radius: 8px; }
.spu-daily table.grid th { background: #fbfbfd; }

/* ---------- 实销实结 ---------- */
.head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.head-actions .btn { white-space: nowrap; }

.tip-i {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; border-radius: 50%; border: 1px solid #cfd6e2;
  color: #8a93a3; font-size: 9.5px; font-weight: 700; line-height: 1;
  cursor: help; vertical-align: 1px; margin-left: 4px; flex: none;
}
.tip-i:hover, .tip-i:focus { color: var(--brand); border-color: var(--brand); outline: none; }
.tip-pop {
  position: fixed; z-index: 9999; max-width: 340px; padding: 8px 10px;
  background: #1f2937; color: #fff; border-radius: 7px; font-size: 12px;
  line-height: 1.6; box-shadow: 0 8px 24px rgba(17, 24, 39, .24);
  pointer-events: none; white-space: pre-line;
}
table.grid th .tip-i { margin-left: 3px; }
.kpi .k .tip-i { margin-left: 5px; }

.tag.virtual { background: #e8f1ff; color: #2563eb; }
.tag.cost { background: #eef7ee; color: #2f7a3d; }

.table-wrap .spu-summary { margin-top: 4px; }
.spu-summary .tag.spu { margin-left: 0; }

details.glossary {
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
  margin: 0 0 14px; overflow: hidden;
}
details.glossary > summary {
  cursor: pointer; list-style: none; padding: 10px 14px;
  font-size: 12.5px; font-weight: 600; color: #2c3442;
}
details.glossary > summary::-webkit-details-marker { display: none; }
details.glossary > summary::after { content: "▾"; float: right; color: #9aa1ad; }
details.glossary[open] > summary::after { transform: rotate(180deg); }
.glossary-body { padding: 0 14px 12px; border-top: 1px solid var(--line-soft); }
.glossary-body h3 { font-size: 12px; margin: 12px 0 4px; color: #3b4250; }
.glossary-body p { margin: 0 0 4px; font-size: 12px; line-height: 1.65; color: #5b6472; }

.settle-kpis .k { overflow: visible; }
.settle-kpis .v { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 到手价覆盖（环图 + 解释） ---------- */
.pay-cover {
  display: flex; align-items: center; gap: 24px;
  padding: 16px 20px 16px 16px;
}
.pay-cover .pc-ring { position: relative; width: 132px; height: 132px; flex: 0 0 132px; }
.pay-cover .pc-ring svg { width: 132px; height: 132px; transform: rotate(-90deg); }
.pay-cover .pc-track { fill: none; stroke: #edf1f7; stroke-width: 9; }
.pay-cover .pc-fill {
  fill: none; stroke: var(--brand); stroke-width: 9; stroke-linecap: round;
  transition: stroke-dasharray .45s ease;
}
.pay-cover .pc-ring.is-off .pc-fill { stroke: #c9d0dc; }
.pay-cover .pc-ring-text {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px; text-align: center;
}
.pay-cover .pc-ring-text b { font-size: 21px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pay-cover .pc-ring-text span { font-size: 10.5px; color: var(--muted); }
.pay-cover .pc-main { flex: 1; min-width: 0; }
.pay-cover .pc-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 7px; }
.pay-cover .pc-head h2 { font-size: 13.5px; margin: 0; font-weight: 600; }
.pay-cover .pc-head .muted { font-size: 11.5px; }
.pay-cover .pc-perm { margin: 0 0 7px; font-size: 11.8px; color: #6b7280; }
.pay-cover .pc-perm b { font-weight: 600; color: #3b4250; }
.pay-cover .pc-lead { margin: 0 0 7px; font-size: 12.5px; line-height: 1.75; color: #2c3442; }
.pay-cover .pc-lead b { font-weight: 600; }
.pay-cover .pc-list { margin: 0; padding-left: 17px; font-size: 11.8px; line-height: 1.8; color: #5b6472; }
.pay-cover .pc-list b { font-weight: 600; color: #3b4250; }
@media (max-width: 900px) {
  .pay-cover { flex-direction: column; align-items: flex-start; gap: 14px; }
}

.cost-form, .settings-form { padding: 4px 16px 16px; }
.cost-form textarea {
  width: 100%; min-height: 170px; box-sizing: border-box; resize: vertical;
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
  font: 12px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace;
  color: #2c3442; background: #fcfcfd;
}
.cost-form textarea:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
.cost-form .hint { font-size: 11.8px; color: var(--muted); margin: 0 0 8px; line-height: 1.6; }
.cost-form .acts { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.settings-form .fld { display: block; margin: 0 0 16px; max-width: 680px; }
.settings-form .fld > b { display: block; font-size: 12.5px; color: #2c3442; margin-bottom: 3px; }
.settings-form .fld .hint { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 5px; line-height: 1.55; }
.settings-form .fld.wide { max-width: 760px; }
.radios { display: flex; flex-direction: column; gap: 7px; font-size: 12px; color: #3d4654; }
.radios label { display: flex; align-items: flex-start; gap: 7px; line-height: 1.55; cursor: pointer; }
.radios input[type="radio"] { margin: 3px 0 0; accent-color: var(--brand); }
.settings-form input[type="number"] {
  width: 220px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px;
  font-size: 13px; color: #2c3442; background: #fff;
}
.settings-form input[type="number"]:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
.settings-form .acts { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.flash { border-radius: 8px; padding: 9px 12px; margin: 0 0 12px; font-size: 12.3px; }
.flash.ok { background: var(--good-soft); color: var(--good); border: 1px solid #bfe3c8; }
.flash.bad { background: var(--bad-soft); color: var(--bad); border: 1px solid #f2c4c0; }
.flash ul { margin: 5px 0 0; padding-left: 18px; }
.flash.warn { background: #fff8e8; color: #8a5a00; border: 1px solid #f0d79a; }

/* 侧栏分组：结算口径与商智分开 */
.nav-group { display: flex; flex-direction: column; gap: 2px; margin: 0 0 6px; }
.nav-primary { margin-bottom: 4px; }
.nav-primary .nav-title { color: var(--brand); }
.nav-primary a { background: linear-gradient(100deg, #eef4ff, #f8fbff); border: 1px solid #cfdfff; font-weight: 600; color: #1e3a8a; }
.nav-primary a.on { background: linear-gradient(100deg, #2b59c3, #3f72d8); border-color: #2b59c3; color: #fff; box-shadow: 0 5px 14px rgba(43,89,195,.22); }
.nav-primary a.on .nav-new { background: rgba(255,255,255,.2); color: #fff; }
.nav-group + .nav-group { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.nav-title {
  padding: 0 12px 5px; font-size: 10.5px; letter-spacing: .08em;
  color: #9aa1ad; text-transform: uppercase;
}
.nav-settle .nav-title { color: #8a6a1f; }
.nav-settle a { background: #fbf6e9; border-left: 3px solid #d9b45b; border-radius: 0 7px 7px 0; }
.nav-settle a.on { background: #f6ecd2; color: #6b4d0b; }
.nav-note {
  padding: 6px 12px 0 15px; font-size: 10.5px; line-height: 1.55;
  color: #9aa1ad;
}

/* 表格工具区 */
.table-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-left: auto; }
.ck { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: #4b5563; cursor: pointer; }
.ck input { margin: 0; }
.table-foot-note { padding: 7px 16px 12px; font-size: 11.5px; color: var(--muted); }
.heat-legend { font-size: 11px; white-space: nowrap; }
.chart-wrap { padding: 4px 10px 10px; }

/* 表头浮框：长文本自动加宽，不再挤成一条 */
.tip-pop {
  width: max-content; max-width: min(560px, 92vw);
  white-space: normal; overflow-wrap: anywhere;
}

/* 设置大页 */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(260px, 1fr)); gap: 4px 28px; }
@media (max-width: 900px) { .form-grid { grid-template-columns: 1fr; } }
.input-wrap { position: relative; display: inline-flex; align-items: center; }
.input-wrap input[type="number"] { padding-right: 34px; }
.input-suffix {
  position: absolute; right: 11px; color: #8a93a3; font-size: 12px; pointer-events: none;
}
.inline-form { padding: 0 16px 8px; }
.btn.danger { color: var(--bad); border-color: #e7c1bd; }
.cost-history { font-size: 11.5px; }
.cost-history > summary { cursor: pointer; color: var(--brand); list-style: none; }
.cost-history > summary::-webkit-details-marker { display: none; }
.history-body { padding: 4px 0 0; line-height: 1.7; color: #5b6472; }
.history-body .mono { color: #2c3442; margin-right: 6px; }


/* ============================================================
   经营英雄页（/hero）
   ============================================================ */
.hero-page { max-width: 1440px; }

.hero-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 2px 0 11px; }
.hero-eyebrow { font-size: 10px; color: #9aa1ad; letter-spacing: .09em; text-transform: uppercase; }
.hero-title h1 { font-size: 24px; line-height: 1.2; margin: 2px 0 3px; letter-spacing: -.01em; }
.hero-sub { font-size: 11.8px; color: #3b4250; }
.hero-sub .muted { color: #9aa1ad; }
.hero-sub .dot-sep { color: #c3c8d2; margin: 0 3px; }

.hero-controls { display: flex; align-items: flex-end; gap: 7px; flex-wrap: wrap; }
.hfld { display: flex; flex-direction: column; gap: 3px; font-size: 10px; color: #9aa1ad; }
.hfld select { font: inherit; font-size: 11.5px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 5px 24px 5px 8px; min-width: 118px; height: 30px; }
.hfld select:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
.hero-controls .btn { height: 30px; padding: 0 11px; display: inline-flex; align-items: center; }

.live-badge { display: inline-block; font-size: 9px; line-height: 15px; padding: 0 5px; border-radius: 4px; background: #e9f7ef; color: #137a44; font-weight: 600; letter-spacing: 0; vertical-align: 1px; }
.data-strip { display: flex; align-items: center; gap: 8px; background: #f4f7ff; border: 1px solid #dfe7fb; border-radius: 8px; padding: 6px 10px; margin-bottom: 12px; font-size: 11.2px; line-height: 1.5; color: #4d5b75; }
.data-strip b { color: #2c3b57; }
.data-strip.warn { background: #fffaf2; border-color: #f0dfc0; color: #6b5636; }
.data-strip-i { flex: 0 0 auto; width: 17px; height: 17px; border-radius: 5px; background: #dfe8fb; color: #2b59c3; font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.data-strip.warn .data-strip-i { background: #f3e2c4; color: #8a5a12; }
.data-strip-meta { margin-left: auto; color: #8a93a3; font-size: 10px; white-space: nowrap; }
.data-warn { display: inline-block; margin-left: 4px; padding: 0 5px; border-radius: 4px; background: #fdecea; color: var(--bad); font-style: normal; font-weight: 600; }
.sample-pill { font-size: 9.5px; color: var(--bad); border: 1px solid #f3c9c4; border-radius: 999px; padding: 1px 7px; background: #fff6f5; font-weight: 600; }
.std-note { color: #137a44; }
.std-chip { display: inline-block; margin-left: 5px; font-size: 9.5px; line-height: 17px; padding: 0 7px; border-radius: 999px; background: #eaf7ef; color: #137a44; font-weight: 600; vertical-align: 1px; }
.hero-conclusion.under { border-left-color: var(--brand); background: linear-gradient(90deg, #fff 62%, #f7f9ff); }
.status-pill.under { background: var(--brand-soft); color: var(--brand); }

/* ---------- ① 结论 ---------- */
.hero-conclusion { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(360px, 1fr); border-left: 4px solid #d9dde5; border-radius: 12px; margin-bottom: 12px; padding: 0; background: #fff; }
.hero-conclusion.over { border-left-color: var(--bad); background: linear-gradient(90deg, #fff 62%, #fffafa); }
.hero-conclusion.warn { border-left-color: var(--warn); background: linear-gradient(90deg, #fff 62%, #fffcf6); }
.hero-conclusion.safe { border-left-color: var(--good); background: linear-gradient(90deg, #fff 62%, #f9fdfb); }
.concl-main { padding: 11px 16px 9px; min-width: 0; }
.concl-label { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.concl-kicker { font-size: 9.5px; letter-spacing: .1em; color: #9aa1ad; text-transform: uppercase; }
.status-pill { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 700; border-radius: 999px; padding: 1px 7px; background: #f1f2f5; color: #6b7280; }
.status-pill i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; display: inline-block; }
.status-pill.over { background: var(--bad-soft); color: var(--bad); }
.status-pill.warn { background: var(--warn-soft); color: var(--warn); }
.status-pill.safe { background: var(--good-soft); color: var(--good); }
.est-pill { font-size: 9.5px; color: #6b7280; border: 1px dashed #c7ccd6; border-radius: 999px; padding: 1px 7px; background: #fff; }
.concl-headline { font-size: 18.5px; font-weight: 650; line-height: 1.35; letter-spacing: -.01em; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.concl-sentence { margin: 0; font-size: 11.5px; line-height: 1.55; color: #5b6472; max-width: 720px; }
.concl-foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 5px; font-size: 10px; color: #9aa1ad; }
.concl-foot a { color: #5b6472; text-decoration: underline; text-decoration-color: #d5d9e1; text-underline-offset: 2px; }
.concl-foot-r { margin-left: auto; color: #b0b7c3; }

.concl-kpis { display: grid; grid-template-columns: 1fr 1fr; border-left: 1px solid var(--line-soft); background: rgba(252, 252, 253, .72); }
.ckpi { display: block; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); color: var(--ink); min-width: 0; }
.ckpi:nth-child(odd) { border-right: 1px solid var(--line-soft); }
.ckpi:nth-child(n+3) { border-bottom: 0; }
.ckpi:hover { background: #f6f8ff; text-decoration: none; }
.ckpi .k { display: flex; align-items: center; gap: 4px; font-size: 10px; color: #8a93a3; white-space: nowrap; }
.ckpi .v { display: block; margin-top: 2px; font-size: 17px; font-weight: 650; letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ckpi.bad .v { color: var(--bad); }
.ckpi.good .v { color: var(--good); }

/* ---------- 通用行栅格 ---------- */
.hero-grid { display: grid; gap: 12px; margin-bottom: 12px; }
.hero-grid-75 { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.hero-page .card { border-radius: 12px; margin-bottom: 0; }
.hero-page .card-h { padding: 10px 14px 9px; gap: 7px; align-items: center; }
.hero-page .card-h h2 { font-size: 13px; }
.hero-page .card-h .muted { font-size: 10.3px; }
.hero-page .card-h .more { font-size: 10.5px; }
.card-tag { display: inline-block; font-size: 9px; font-weight: 700; line-height: 16px; border-radius: 999px; padding: 0 6px; background: #f1f2f5; color: #6b7280; white-space: nowrap; }
.card-tag.over, .card-tag.bad { background: var(--bad-soft); color: var(--bad); }
.card-tag.warn { background: var(--warn-soft); color: var(--warn); }
.card-tag.good { background: var(--good-soft); color: var(--good); }
.card-tag button { border: 0; background: none; color: inherit; font: inherit; cursor: pointer; padding: 0 0 0 2px; }
.tone-over, .tone-bad { color: var(--bad); }
.tone-warn { color: var(--warn); }
.tone-safe, .tone-good { color: var(--good); }

/* ---------- ② 毛保仪表盘 ---------- */
.gauge-grid { display: block; padding: 2px 12px 10px; }
.gauge-main { min-width: 0; padding: 0 2px; }
.gauge { width: 100%; max-width: 440px; display: block; margin: 0 auto; }
.gauge-note { display: flex; flex-direction: column; align-items: center; gap: 3px; margin-top: -7px; font-size: 11.6px; color: #7c8698; text-align: center; }
.gauge-note b { font-size: 12.8px; font-weight: 650; line-height: 1.45; }
.gauge-legend { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 7px; font-size: 10.8px; color: #7c8698; }
.gauge-legend span { display: inline-flex; align-items: center; gap: 4px; }
.lg-band { width: 12px; height: 7px; border-radius: 3px; background: #9fd9b6; display: inline-block; }
.lg-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }
.lg-line { width: 2px; height: 10px; border-radius: 1px; background: #137a44; display: inline-block; }
.gauge-empty { padding: 42px 16px 54px; text-align: center; font-size: 12px; color: #8a93a3; }
.gauge-live .gauge-band { opacity: .95; }

/* ---------- ③ 到手价健康 ---------- */
.cov-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding: 8px 14px 7px; }
.cov-big { display: flex; align-items: baseline; gap: 8px; }
.cov-big b { font-size: 27px; line-height: 1.05; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.cov-big span { font-size: 9.9px; color: #9aa1ad; line-height: 1.35; }
.cov-money { text-align: right; font-size: 10.1px; color: #5b6472; display: flex; flex-direction: column; gap: 2px; }
.cov-money b { font-size: 11.4px; color: var(--ink); }
.cov-bar { display: flex; height: 12px; margin: 0 14px; border-radius: 4px; overflow: hidden; background: #f1f2f5; }
.cov-bar .seg { height: 100%; display: block; }
.cov-bar .seg.cap, .cov-legend i.cap { background: #2b59c3; }
.cov-bar .seg.est, .cov-legend i.est { background: repeating-linear-gradient(135deg, #9db4ef 0 5px, #c7d3ee 5px 10px); }
.cov-bar .seg.miss, .cov-legend i.miss { background: #e0e3e9; }
.cov-legend { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 5px 14px 0; font-size: 9.9px; color: #5b6472; }
.cov-legend span { display: inline-flex; align-items: center; gap: 3px; }
.cov-legend i { width: 7px; height: 7px; border-radius: 2px; display: inline-block; }
.cov-legend b { font-variant-numeric: tabular-nums; }
.cov-legend em { font-style: normal; color: #9aa1ad; }
.cov-facts { display: flex; gap: 6px; margin: 7px 14px 0; padding-top: 6px; border-top: 1px solid var(--line-soft); font-size: 9.9px; color: #5b6472; flex-wrap: wrap; }
.cov-facts span { background: #fafbfc; border: 1px solid var(--line-soft); border-radius: 5px; padding: 1px 6px; }
.cov-facts b { font-size: 10.8px; }
.cov-facts b.bad { color: var(--bad); }
.cov-hist { padding: 2px 7px 2px; }
.cov-hist-h { display: flex; justify-content: space-between; gap: 8px; font-size: 9.3px; color: #5b6472; padding: 0 7px; }
.cov-hist-h .muted { color: #a6adba; }
.hist { width: 100%; height: auto; display: block; }

/* ---------- ③ SKU 利润 ---------- */
.profit-tabs { display: inline-flex; gap: 2px; background: #f1f2f5; border-radius: 6px; padding: 2px; }
.profit-tab { border: 0; background: none; font: inherit; font-size: 9.6px; padding: 2px 8px; border-radius: 4px; color: #6b7280; cursor: pointer; white-space: nowrap; }
.profit-tab.on { background: #fff; color: var(--brand); font-weight: 600; box-shadow: 0 1px 2px rgba(17, 24, 39, .1); }
.hero-profit .card-h .more { margin-left: 0; }
.hero-profit .card-h .profit-tabs { margin-left: auto; }
.loss-tabs { background: #f1f2f5; }
.profit-top { display: grid; grid-template-columns: .8fr .8fr 1.4fr; gap: 8px; align-items: end; padding: 9px 14px 3px; }
.profit-kpi { min-width: 0; }
.profit-kpi span { display: block; font-size: 9.6px; color: #9aa1ad; }
.profit-kpi b { font-size: 27px; line-height: 1.05; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.profit-kpi.good b { color: var(--good); }
.profit-kpi.bad b { color: var(--bad); }
.profit-kpi em { display: block; margin-top: 1px; font-style: normal; font-size: 8.8px; color: #a6adba; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profit-bar { display: flex; height: 11px; margin: 7px 14px 0; border-radius: 4px; overflow: hidden; background: #f1f2f5; }
.profit-bar span { height: 100%; display: block; }
.profit-bar .p { background: #16a34a; }
.profit-bar .f { background: #d1d5db; }
.profit-bar .l { background: #dc2626; }
.profit-legend { display: flex; gap: 12px; align-items: center; padding: 5px 14px 0; font-size: 9.7px; color: #5b6472; }
.profit-legend span { display: inline-flex; align-items: center; gap: 4px; }
.profit-legend i { width: 7px; height: 7px; border-radius: 2px; display: inline-block; }
.profit-legend i.p { background: #16a34a; }
.profit-legend i.f { background: #d1d5db; }
.profit-legend i.l { background: #dc2626; }
.profit-legend b { font-variant-numeric: tabular-nums; }
.profit-totals { display: flex; gap: 10px; flex-wrap: wrap; margin: 8px 14px 0; padding-top: 7px; border-top: 1px solid var(--line-soft); font-size: 9.9px; color: #5b6472; }
.profit-totals b { font-variant-numeric: tabular-nums; }
.profit-totals b.good { color: var(--good); }
.profit-totals b.bad { color: var(--bad); }
.profit-totals .muted { margin-left: auto; font-size: 8.9px; color: #a6adba; }
.profit-extremes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 14px 0; }
.profit-extremes > div { min-width: 0; display: flex; align-items: baseline; gap: 5px; padding: 6px 8px; border: 1px solid var(--line-soft); border-radius: 7px; background: #fcfcfd; }
.profit-extremes span { flex: 0 0 auto; font-size: 8.8px; color: #9aa1ad; }
.profit-extremes b { flex: 1 1 auto; font-size: 10.4px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profit-extremes em { flex: 0 0 auto; font-style: normal; font-size: 10.2px; color: #5b6472; font-variant-numeric: tabular-nums; }
.profit-note { padding: 7px 14px 10px; font-size: 8.8px; line-height: 1.5; color: #a6adba; }
.profit-note b { color: #7b8494; }
.lg-promo { width: 12px; height: 7px; border-radius: 3px; background: #0e7490; display: inline-block; }

/* ---------- ④ 亏损排行 ---------- */
.loss-head { display: grid; grid-template-columns: 24px 36px minmax(0, 1fr) 70px 62px 50px 62px; gap: 8px; align-items: center; margin: 0 7px; padding: 4px 6px 3px; border-bottom: 1px solid var(--line); font-size: 9.5px; color: #9aa1ad; }
.loss-head span:nth-child(n+4) { text-align: right; }
.loss-list { padding: 0 7px; }
.loss-row { display: grid; grid-template-columns: 24px 36px minmax(0, 1fr) 70px 62px 50px 62px; gap: 8px; align-items: center; width: 100%; border: 0; border-bottom: 1px solid var(--line-soft); background: none; padding: 6px; font: inherit; text-align: left; cursor: pointer; }
.loss-row:hover { background: #f8f9fc; }
.rank { font-size: 9.8px; color: #b0b7c3; font-variant-numeric: tabular-nums; }
.thumb { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 13.5px; font-weight: 650; color: #fff; background: linear-gradient(135deg, #6d8ee8, #3f63c9); }
.thumb.tone-0 { background: linear-gradient(135deg, #6d8ee8, #3f63c9); }
.thumb.tone-1 { background: linear-gradient(135deg, #5cb8b1, #2d8a83); }
.thumb.tone-2 { background: linear-gradient(135deg, #e39a9f, #c05b67); }
.thumb.tone-3 { background: linear-gradient(135deg, #d8ad6b, #b07a2e); }
.thumb.tone-4 { background: linear-gradient(135deg, #a58bdc, #7357b5); }
.thumb.tone-5 { background: linear-gradient(135deg, #8b98ad, #586477); }
.loss-name { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.loss-name b { font-size: 12.2px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.loss-meta { font-size: 9.8px; color: #9aa1ad; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.loss-tags { display: flex; gap: 3px; margin-top: 2px; min-height: 13px; }
.mini-tag { font-style: normal; font-size: 9px; line-height: 13px; padding: 0 4px; border-radius: 3px; background: #f1f2f5; color: #6b7280; font-weight: 600; white-space: nowrap; }
.mini-tag.hot { background: var(--bad-soft); color: var(--bad); }
.loss-num { display: flex; flex-direction: column; justify-content: center; gap: 0; min-width: 0; text-align: right; }
.loss-num b { font-size: 11.8px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.loss-num.net-col b { font-size: 13px; color: var(--bad); }
.loss-spark { text-align: right; }
.spark { width: 62px; height: 20px; display: block; margin-left: auto; }
.loss-foot { display: flex; justify-content: space-between; gap: 10px; padding: 7px 13px; background: #fcfcfd; border-top: 1px solid var(--line-soft); font-size: 10px; color: #5b6472; }
.loss-foot b.bad { color: var(--bad); }
.hero-page [hidden] { display: none !important; }

/* ---------- ⑤ 流量质量 ---------- */
.flow-tabs { display: flex; gap: 2px; background: #f1f2f5; border-radius: 6px; padding: 2px; }
.flow-tab { border: 0; background: none; font: inherit; font-size: 9.8px; padding: 2px 7px; border-radius: 4px; color: #6b7280; cursor: pointer; }
.flow-tab.on { background: #fff; color: var(--brand); font-weight: 600; box-shadow: 0 1px 2px rgba(17, 24, 39, .1); }
.flow-kpis { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 7px 14px 0; font-size: 9.6px; color: #6b7280; }
.flow-kpis b { font-size: 12px; color: var(--ink); font-variant-numeric: tabular-nums; }
.flow-kpis em { font-style: normal; font-size: 8.5px; color: #a6adba; margin-left: 2px; }
.funnel { width: 100%; height: auto; display: block; padding: 0 4px; }
.quadrant { width: 100%; height: auto; display: block; padding: 3px 2px 0; }
.flow-note { padding: 0 14px 7px; font-size: 9.2px; color: #a6adba; line-height: 1.55; }
.flow-callout { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; padding: 7px 14px; border-top: 1px solid var(--line-soft); background: #fafbfe; font-size: 10px; color: #5b6472; }
.flow-callout b { color: var(--ink); }
.flow-callout-link { border: 0; background: none; padding: 0; color: var(--brand); font: inherit; font-size: 10px; cursor: pointer; white-space: nowrap; }
.flow-callout-link:hover { text-decoration: underline; }

/* ---------- ⑥ 推广与净利 ---------- */
.promo-top { display: grid; grid-template-columns: 1.45fr .72fr .72fr .9fr; gap: 6px; align-items: end; padding: 9px 14px 7px; }
.promo-big span { display: block; font-size: 9.2px; color: #9aa1ad; }
.promo-big b { font-size: 22px; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.promo-big b.bad { color: var(--bad); }
.promo-big b.good { color: var(--good); }
.promo-big em { display: block; font-style: normal; font-size: 9.2px; color: #9aa1ad; margin-top: 1px; }
.promo-stat { text-align: right; }
.promo-stat span { display: block; font-size: 9px; color: #9aa1ad; white-space: nowrap; }
.promo-stat b { font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stack-bar { display: flex; height: 15px; margin: 2px 14px 0; border-radius: 5px; overflow: hidden; background: #f1f2f5; }
.stack-bar .sb { height: 100%; display: block; }
.sb.cost, .stack-legend i.cost { background: #2b59c3; }
.sb.promo, .stack-legend i.promo { background: #7aa2ff; }
.sb.tax, .stack-legend i.tax { background: #c7d3ee; }
.sb.gap, .stack-legend i.gap { background: #dc2626; }
.stack-legend { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; padding: 5px 14px 0; font-size: 9.8px; color: #5b6472; }
.stack-legend i { width: 7px; height: 7px; border-radius: 2px; display: inline-block; margin-right: 3px; }
.stack-legend b { font-variant-numeric: tabular-nums; }
.stack-legend-r { margin-left: auto; color: #a6adba; }
.scene-table { margin: 6px 14px 0; padding-top: 4px; border-top: 1px solid var(--line-soft); }
.scene-h, .scene-row { display: grid; grid-template-columns: minmax(0, 1fr) 68px 34px; gap: 7px; align-items: center; padding: 2px 0; font-size: 10.2px; }
.scene-h { color: #a6adba; font-size: 9.2px; }
.scene-name { position: relative; height: 17px; display: flex; align-items: center; overflow: hidden; }
.scene-name i { position: absolute; left: 0; top: 3px; height: 11px; background: #e6edfc; border-radius: 3px; }
.scene-name b { position: relative; z-index: 1; font-size: 10.2px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scene-row .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.scene-row .num.good { color: var(--good); }
.scene-row .num.warn { color: var(--warn); }
.scene-row .num.bad { color: var(--bad); }
.scene-note { font-size: 9px; color: #a6adba; padding: 2px 0 0; }

/* ---------- ⑦ 库存 / 结算 ---------- */
.stock-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; padding: 5px 13px 0; }
.stock-col { min-width: 0; }
.stock-col + .stock-col { border-left: 1px solid var(--line-soft); padding-left: 10px; }
.stock-h { display: flex; align-items: baseline; justify-content: space-between; gap: 4px; padding: 3px 0 2px; font-size: 10.1px; font-weight: 600; color: #3b4250; }
.stock-h em { font-style: normal; font-size: 9px; color: #a6adba; font-weight: 400; white-space: nowrap; }
.stock-row { display: flex; align-items: center; justify-content: space-between; gap: 5px; padding: 5px 0; border-bottom: 1px dashed var(--line-soft); font-size: 10.1px; }
.stock-row:last-child { border-bottom: 0; }
.stock-name { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #3b4250; }
.stock-row b { flex: 0 0 auto; font-size: 9.9px; font-variant-numeric: tabular-nums; }
.stock-row b.warn { color: var(--warn); }
.stock-row b.bad { color: var(--bad); }
.settle-strip { display: grid; grid-template-columns: 1fr 1fr 1fr; margin-top: 6px; border-top: 1px solid var(--line-soft); background: #fcfcfd; }
.settle-item { padding: 7px 10px; border-right: 1px solid var(--line-soft); min-width: 0; }
.settle-item:last-child { border-right: 0; }
.settle-item span { display: block; font-size: 9px; color: #9aa1ad; }
.settle-item b { display: block; font-size: 13.4px; line-height: 1.25; font-variant-numeric: tabular-nums; }
.settle-item em { display: block; font-style: normal; font-size: 8.8px; color: #a6adba; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stock-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 13px 7px; font-size: 9.4px; color: #a6adba; }
.stock-foot a { color: var(--brand); }

/* ---------- ⑧ 动作 ---------- */
.hero-actions { margin-bottom: 12px; }
.action-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.action { position: relative; display: grid; grid-template-columns: 16px minmax(0, 1fr); column-gap: 6px; padding: 10px 12px 11px; border-right: 1px solid var(--line-soft); }
.action:last-child { border-right: 0; }
.action.primary { background: #f7f9ff; }
.action-no { font-size: 9.2px; font-weight: 700; color: #b0b7c3; padding-top: 1px; }
.action-body b { display: block; font-size: 11.7px; line-height: 1.35; }
.action-body p { margin: 2px 0 0; font-size: 9.9px; line-height: 1.45; color: #7b8494; }
.action-btn { grid-column: 2; justify-self: start; margin-top: 6px; border: 1px solid var(--line); background: #fff; color: var(--brand); font: inherit; font-size: 9.8px; padding: 2px 8px; border-radius: 5px; cursor: pointer; }
.action-btn:hover { border-color: var(--brand); background: var(--brand-soft); text-decoration: none; }
.action.primary .action-btn { background: var(--brand); border-color: var(--brand); color: #fff; }
.action.primary .action-btn:hover { filter: brightness(1.06); }

/* ---------- 数据维度对照 ---------- */
.hero-map { margin-top: 0; border-radius: 12px; background: #fff; }
.hero-map > summary { list-style: none; cursor: pointer; padding: 10px 14px; font-size: 11.5px; font-weight: 600; }
.hero-map > summary::-webkit-details-marker { display: none; }
.hero-map > summary::after { content: "▾"; float: right; color: #9aa1ad; }
.hero-map[open] > summary::after { transform: rotate(180deg); }
.hero-map > summary .muted { font-weight: 400; font-size: 10px; }
.map-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; border-top: 1px solid var(--line-soft); padding: 8px 16px 12px; }
.map-grid h4 { font-size: 10px; color: #5b6472; margin: 2px 0 3px; letter-spacing: .02em; }
.map-note { border-top: 1px solid var(--line-soft); padding: 0 16px 12px; }
.map-note p { font-size: 10.5px; line-height: 1.7; color: #6b7280; margin: 10px 0 0; }

/* SPU 维度没权限时的一行提示（settle 页） */
.spu-lock { font-size: 12px; color: #f5b547; text-decoration: none; margin-left: 10px; }
.spu-lock:hover { text-decoration: underline; }


/* ============================================================
   套餐与价格（独立页 /pricing、/pricing/plans）
   这两页不套数据看板侧栏，是单独打开的页面（桌面版会在系统浏览器里新开标签）。
   ============================================================ */
.pub-body { background: #f6f7fa; font-size: 13.5px; }
.pub-top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 22px;
  padding: 0 28px; height: 58px; background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(6px); border-bottom: 1px solid var(--line);
}
.pub-brand { display: flex; align-items: center; gap: 9px; color: var(--ink); }
.pub-brand:hover { text-decoration: none; }
.pub-brand .dot { width: 10px; height: 10px; border-radius: 3px; background: linear-gradient(135deg, #2b59c3, #7aa2ff); }
.pub-brand b { font-size: 15px; letter-spacing: .2px; }
.pub-nav { display: flex; gap: 4px; }
.pub-nav a { padding: 7px 12px; border-radius: 8px; color: #3b4250; font-size: 13px; }
.pub-nav a:hover { background: #f1f2f5; text-decoration: none; }
.pub-nav a.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.pub-right { margin-left: auto; }
.pub-main { max-width: 1180px; margin: 0 auto; padding: 26px 28px 64px; }
.pub-foot { border-top: 1px solid var(--line); background: #fff; }
.pub-foot-in {
  max-width: 1180px; margin: 0 auto; padding: 22px 28px; display: flex; gap: 24px;
  justify-content: space-between; font-size: 12px; color: var(--muted);
}
.pub-foot-in b { display: block; color: var(--ink); font-size: 13px; margin-bottom: 3px; }
.pub-foot-in p { margin: 0; max-width: 620px; line-height: 1.7; }
.pub-foot-links { display: flex; gap: 16px; flex-wrap: wrap; align-content: flex-start; }
@media (max-width: 820px) {
  .pub-top { flex-wrap: wrap; height: auto; padding: 10px 16px; gap: 10px; }
  .pub-main { padding: 20px 16px 48px; }
  .pub-foot-in { flex-direction: column; padding: 18px 16px; }
}

/* 当前版本徽标：侧栏和数据网页都有 */
.ver-badge {
  display: inline-block; font-size: 11.5px; font-weight: 600; padding: 4px 10px;
  border-radius: 999px; background: var(--brand-soft); color: var(--brand);
  border: 1px solid #d7e2ff; white-space: nowrap;
}
.ver-badge:hover { text-decoration: none; filter: brightness(.98); }
.ver-badge.warn { background: var(--warn-soft); color: var(--warn); border-color: #f3dcbc; }
.side .ver-badge {
  display: block; margin: 0 18px 12px; text-align: center;
  overflow: hidden; text-overflow: ellipsis;
}

.pg { max-width: 1120px; margin: 0 auto; }
.pg .btn, .pub-top .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn.lg { padding: 10px 22px; font-size: 14px; border-radius: 9px; }
.btn.sm { padding: 4px 11px; font-size: 12px; border-radius: 6px; }
.btn.ghost { background: #fff; }

/* 客户 2026-11-18：「全额计入」这类口径开关要一眼看出开还是关 */
.spu-sw { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 12px;
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.spu-sw.on { border-color: #b7d7c0; background: var(--good-soft); }
.spu-sw .st { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.spu-sw .blub { width: 9px; height: 9px; border-radius: 50%; background: #c9d3e6; }
.spu-sw.on .blub { background: var(--good); box-shadow: 0 0 0 3px rgba(19, 122, 68, .16); }
.spu-sw .hint { color: var(--muted); font-size: 12px; }
.spu-sw .sw { margin-left: auto; }
.btn.ghost:hover { border-color: #c9d3e6; }

.pg-head { padding: 4px 0 24px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.pg-kicker {
  font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--brand); font-weight: 700;
}
.pg-head h1 {
  font-size: 30px; line-height: 1.3; margin: 8px 0 12px;
  letter-spacing: -.02em; font-weight: 700;
}
.pg-head h1 em { font-style: normal; color: var(--brand); }
.pg-lede { max-width: 780px; font-size: 14px; line-height: 1.85; color: #414855; margin: 0 0 12px; }
.pg-note { font-size: 12px; color: var(--muted); }
.pg-head-acts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

/* ---------- 四张档位卡 ---------- */
.pg-tiers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 34px; }
@media (max-width: 1080px) { .pg-tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .pg-tiers { grid-template-columns: 1fr; } }
.tier {
  position: relative; display: flex; flex-direction: column; gap: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 20px 18px 18px; box-shadow: 0 1px 2px rgba(17, 24, 39, .03);
}
.tier.hot { border-color: var(--brand); box-shadow: 0 6px 24px -12px rgba(43, 89, 195, .45); }
.tier-hot {
  position: absolute; top: -11px; left: 18px; background: var(--brand); color: #fff;
  font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
}
.tier-name { font-size: 14px; font-weight: 700; color: #2a2f3a; }
.tier-price { display: flex; align-items: baseline; gap: 6px; }
.tier-price b { font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.tier-price span { font-size: 12px; color: var(--muted); }
.tier-tag { font-size: 12.5px; color: #3b4250; font-weight: 600; }
.tier-note { font-size: 11.5px; color: var(--muted); line-height: 1.6; min-height: 3.2em; }
.tier-list {
  list-style: none; margin: 4px 0 6px; padding: 0;
  display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; color: #3b4250;
}
.tier-list li { position: relative; padding-left: 16px; line-height: 1.6; }
.tier-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--good); font-size: 11px; font-weight: 700;
}
.tier .btn { margin-top: auto; }

/* ---------- 区块 ---------- */
.pg-block { margin-bottom: 34px; }
.pg-block-h { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.pg-block-h h2 { font-size: 18px; margin: 0; letter-spacing: -.01em; }
.pg-block-h .muted { font-size: 12px; }
.pg-fine { font-size: 11.5px; color: var(--muted); line-height: 1.75; margin: 10px 0 0; }
.pg-foot { text-align: center; margin-top: 30px; }

/* ---------- 功能对比表：第一行是版本 ---------- */
.cmp-table {
  width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
}
.cmp-table thead th {
  background: #f7f9fc; text-align: center; font-weight: 600; color: #3b4250;
  padding: 11px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.cmp-table thead th.cmp-feat { text-align: left; }
.cmp-table thead th.cmp-hot { color: var(--brand); background: #eef3ff; }
.cmp-table td {
  padding: 9px 12px; border-bottom: 1px solid var(--line-soft);
  text-align: center; color: #3b4250;
}
.cmp-table td.cmp-feat { text-align: left; color: var(--ink); }
.cmp-table tbody tr:hover td { background: #fafbff; }
.cmp-table tbody tr:last-child td { border-bottom: 0; }
.cmp-table tr.cmp-group td {
  background: #f2f4f9; color: #5b6472; font-weight: 600; font-size: 11.5px;
  letter-spacing: .03em; padding: 7px 12px; text-align: left;
}
.cmp-yes { color: var(--good); font-weight: 700; }
.cmp-no { color: #c3c8d2; }
.cmp-val { font-variant-numeric: tabular-nums; }
@media (max-width: 900px) {
  .cmp-table { font-size: 11.8px; }
  .cmp-table td, .cmp-table thead th { padding: 7px 8px; }
}

/* ---------- 适合谁 ---------- */
.pg-suits { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1080px) { .pg-suits { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .pg-suits { grid-template-columns: 1fr; } }
.suit {
  display: flex; flex-direction: column; gap: 8px; background: #fff;
  border: 1px solid var(--line); border-radius: 12px; padding: 16px;
}
.suit.hot { border-color: #b9caf5; }
.suit-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.suit-h b { font-size: 14px; }
.suit-h span { font-size: 12px; color: var(--brand); font-weight: 600; white-space: nowrap; }
.suit-who { margin: 0; font-size: 12.5px; line-height: 1.75; color: #3b4250; }
.suit-watch { margin: 0; font-size: 11.8px; line-height: 1.7; color: var(--muted); }
.suit-watch em { font-style: normal; font-weight: 600; color: #b45309; margin-right: 6px; }
.suit .btn { margin-top: auto; align-self: flex-start; }

/* ---------- 常见问题：点击展开 ---------- */
.pg-faq { display: flex; flex-direction: column; gap: 8px; }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.faq-item > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 9px;
  padding: 13px 16px; font-size: 13px; font-weight: 600; color: var(--ink);
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary:hover { background: #fafbff; }
.faq-tag {
  flex: 0 0 auto; font-size: 10.5px; font-weight: 600; color: #5b6472;
  background: #f1f2f5; border-radius: 5px; padding: 1px 6px;
}
.faq-q { flex: 1 1 auto; }
.faq-icon { flex: 0 0 auto; width: 10px; height: 10px; position: relative; }
.faq-icon::before, .faq-icon::after {
  content: ""; position: absolute; background: #8a93a3; border-radius: 1px;
  transition: transform .18s ease, opacity .18s ease;
}
.faq-icon::before { left: 0; top: 4.2px; width: 10px; height: 1.6px; }
.faq-icon::after { left: 4.2px; top: 0; width: 1.6px; height: 10px; }
.faq-item[open] .faq-icon::after { transform: rotate(90deg); opacity: 0; }
.faq-item[open] > summary { color: var(--brand); }
.faq-a {
  margin: 0 16px 14px; padding: 12px 0 0; border-top: 1px dashed var(--line-soft);
  font-size: 12.8px; line-height: 1.9; color: #414855;
}

/* ---------- 结尾 CTA ---------- */
.pg-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  background: linear-gradient(135deg, #eef3ff, #f7f9ff); border: 1px solid #dbe4fb;
  border-radius: 14px; padding: 20px 22px;
}
.pg-cta h2 { font-size: 18px; margin: 0 0 4px; }
.pg-cta p { margin: 0; font-size: 12.5px; color: #414855; }
.pg-cta-acts { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- 套餐明细卡 ---------- */
.pg-plans { display: flex; flex-direction: column; gap: 14px; margin-bottom: 34px; }
.plan-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.plan-card.hot { border-color: #b9caf5; }
.plan-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.plan-h-l { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.plan-h-l b { font-size: 16px; }
.plan-tag { font-size: 10.5px; font-weight: 700; color: #fff; background: var(--brand); border-radius: 5px; padding: 1px 7px; }
.plan-price { font-size: 15px; font-weight: 700; color: var(--brand); font-variant-numeric: tabular-nums; }
.plan-who { margin: 0 0 12px; font-size: 12.8px; line-height: 1.8; color: #3b4250; }
.plan-who em { font-style: normal; font-weight: 600; color: #5b6472; margin-right: 7px; }
.plan-dl { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 6px 12px; margin: 0; font-size: 12.5px; }
.plan-dl dt { color: var(--muted); }
.plan-dl dd { margin: 0; color: #3b4250; line-height: 1.7; }
.plan-note { margin: 10px 0 0; font-size: 11.8px; color: var(--muted); }
@media (max-width: 720px) { .plan-dl { grid-template-columns: 1fr; gap: 2px; } .plan-dl dd { margin-bottom: 6px; } }

/* ---------- 数据还在吗 / 购买步骤 / 收款 ---------- */
.pg-addons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .pg-addons { grid-template-columns: 1fr; } }
.pg-addon { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.pg-addon-h { margin-bottom: 6px; font-size: 13px; }
.pg-addon p { margin: 0; font-size: 12.5px; line-height: 1.8; color: #414855; }
.buy-steps { margin: 0 0 16px; padding-left: 22px; font-size: 12.8px; line-height: 2; color: #414855; }
.buy-steps li::marker { color: var(--brand); font-weight: 700; }
.pay-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .pay-grid { grid-template-columns: 1fr; } }
.pay-card {
  display: flex; flex-direction: column; gap: 10px; background: #fff;
  border: 1px solid var(--line); border-radius: 12px; padding: 16px;
}
.pay-card h3 { margin: 0; font-size: 13.5px; }
.pay-card img {
  width: 100%; max-width: 220px; align-self: flex-start;
  border: 1px solid var(--line-soft); border-radius: 8px; background: #fff;
}
.pay-card p { margin: 0; font-size: 12.5px; line-height: 1.75; color: #414855; }
.pay-empty {
  font-size: 12px; color: var(--muted); line-height: 1.8; background: #fafbfd;
  border: 1px dashed var(--line); border-radius: 8px; padding: 12px;
}
.pay-contact { color: var(--ink); }
.upgrade-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: var(--warn-soft); border: 1px solid #f3dcbc; border-radius: 12px;
  padding: 14px 16px; margin: 0 0 24px;
}
/* ---------- 导出权限弹窗（客户 2026-11-14） ---------- */
.jdm {
  position: fixed; inset: 0; display: none; align-items: center; justify-content: center;
  background: rgba(16, 22, 34, .45); z-index: 9998; padding: 24px;
}
.jdm.on { display: flex; }
.jdm-card {
  width: min(460px, 100%); background: #fff; border-radius: 14px; padding: 20px 22px;
  box-shadow: 0 18px 48px rgba(16, 22, 34, .22);
}
.jdm-t { margin: 0 0 8px; font-size: 15px; }
.jdm-p { margin: 0 0 10px; font-size: 12.8px; line-height: 1.85; color: #414855; }
.jdm-tip {
  margin: 0 0 16px; font-size: 12px; line-height: 1.7; color: var(--muted);
  background: #fafbfd; border: 1px dashed var(--line); border-radius: 8px; padding: 9px 11px;
}
.jdm-row { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* ---------- 到手价构成：两条同一比例尺的百分比条 ---------- */
/* 客户 2026-11-14：实销实结的单 SKU 明细 / 全店利润汇总「两个百分比条没了」。
   模板里 .comp-layers 这段标记一直在，但这些类在样式表里一条规则都没有，
   于是每个 div 都是没有高度、没有底色的空盒子 —— 页面上就只剩文字。
   下面把两层条、四类标记线、成本分段、图例、解释段一次补齐。 */
.comp-card { padding-bottom: 2px; }
.comp-layers { padding: 4px 16px 0; display: flex; flex-direction: column; gap: 16px; }
.layer-row { padding-top: 12px; border-top: 1px dashed var(--line); }
.layer-row:first-child { padding-top: 0; border-top: 0; }
.layer-head {
  display: flex; gap: 8px 14px; flex-wrap: wrap; align-items: baseline;
  font-size: 12.5px; color: #3f4756; margin-bottom: 18px;
}
.layer-title b { color: #1f2430; font-size: 13px; }
.layer-coef, .layer-meta { margin-left: auto; color: var(--muted); font-size: 11.8px; }
.layer-coef b, .layer-meta b { color: #1f2430; }
.layer-coef i { font-style: normal; color: #c6cbd4; margin: 0 2px; }
.layer-track { position: relative; height: 20px; border-radius: 4px; background: #eef1f6; }
.layer-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px 0 0 4px; }
.layer-actual { background: linear-gradient(180deg, #e7edfa, #dae3f6); }
.layer-payback { background: linear-gradient(180deg, #9db4ec, #86a2e5); }
.layer-negative {
  position: absolute; top: 0; bottom: 0;
  background: repeating-linear-gradient(45deg, #eeb06a, #eeb06a 5px, #f6cb93 5px, #f6cb93 10px);
}
.layer-rebate {
  position: absolute; top: 0; bottom: 0;
  background: repeating-linear-gradient(45deg, #4dbd97, #4dbd97 5px, #85d5b9 5px, #85d5b9 10px);
}
.layer-over { position: absolute; top: 0; bottom: 0; background: rgba(226, 74, 74, .82); }
.layer-net { position: absolute; top: 0; bottom: 0; background: rgba(94, 192, 143, .6); }
.layer-cap {
  position: absolute; top: -16px; transform: translateX(-50%);
  font-size: 11px; color: #3f4756; white-space: nowrap;
}
.layer-standard, .layer-effective, .layer-cut { position: absolute; top: 0; bottom: 0; width: 0; }
.layer-standard { border-left: 1px dashed #d19b32; }
.layer-effective { border-left: 1px dashed #2f7d5d; }
.layer-cut { border-left: 2px solid #fff; }
.layer-cost {
  position: absolute; left: 0; top: 0; bottom: 0; display: flex;
  overflow: hidden; border-radius: 4px 0 0 4px;
}
.layer-cost i { display: block; height: 100%; }
.fb-cost { background: #7f9ce0; }
.fb-promo { background: #f2a154; }
.fb-tax { background: #b58fd6; }
.fb-storage { background: #63b8c9; }
.fb-other { background: #a7b0bf; }
.layer-foot {
  display: flex; gap: 6px 16px; flex-wrap: wrap; justify-content: space-between;
  margin-top: 9px; font-size: 11.8px; color: var(--muted);
}
.comp-legend {
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  padding: 14px 16px 2px; font-size: 12px; color: #414855;
}
.comp-legend span { display: inline-flex; align-items: center; gap: 6px; }
.comp-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.comp-legend b { color: #1f2430; }
.comp-legend em { font-style: normal; color: var(--muted); font-size: 11.4px; }
.comp-explain { padding: 2px 16px 14px; font-size: 12.2px; line-height: 1.9; color: #414855; }
.comp-explain p { margin: 7px 0; }
.comp-table td:first-child { color: #414855; }

.upgrade-banner b { font-size: 13px; color: #7c3d05; }
.upgrade-banner p { margin: 4px 0 0; font-size: 12.3px; line-height: 1.7; color: #8a5a1e; }

/* ---------- 全店利润汇总的权限遮罩（客户 2026-11-14） ----------
   要求：顶部时间筛选照常点；下面的指标/构成条/走势/口径表整体盖一层「勉强能看到
   数字」的半透明遮罩，遮罩上写清需要哪一档；遮罩下垫的是随机示例数据。 */
.lock-wrap { position: relative; border-radius: 16px; overflow: hidden; }
.lock-wrap.is-locked > :not(.lock-veil) { pointer-events: none; user-select: none; }
.lock-veil {
  position: absolute; inset: 0; z-index: 6; display: flex; flex-direction: column;
  align-items: center; justify-content: flex-start; padding: 64px 22px 22px;
  background: rgba(243, 247, 252, .74);
  -webkit-backdrop-filter: blur(.8px) saturate(.75);
  backdrop-filter: blur(.8px) saturate(.75);
}
.lock-card {
  width: 100%; max-width: 560px; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; padding: 22px 24px; box-shadow: 0 18px 44px rgba(16, 26, 46, .16);
}
.lock-card h3 { margin: 0 0 8px; font-size: 17px; letter-spacing: .2px; }
.lock-card p { margin: 0 0 8px; font-size: 12.8px; line-height: 1.8; color: #414855; }
.lock-card p.muted { color: var(--muted); font-size: 12.2px; }
.lock-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* ---------- 采集中的小提示（客户 2026-11-14） ----------
   跑数据时页面右下角亮个点，告诉客户数字马上会跟上；不挡内容、不接收点击。 */
.live-chip {
  position: fixed; right: 16px; bottom: 16px; z-index: 9; display: flex;
  align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px;
  background: rgba(23, 32, 52, .86); color: #fff; font-size: 11.5px;
  letter-spacing: .2px; box-shadow: 0 10px 26px rgba(16, 26, 46, .22);
  pointer-events: none;
}
.live-chip[hidden] { display: none; }
.live-chip b { font-weight: 500; }
.live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #57d38c;
  animation: liveDot 1.6s ease-out infinite;
}
@keyframes liveDot {
  0% { box-shadow: 0 0 0 0 rgba(87, 211, 140, .65); }
  70% { box-shadow: 0 0 0 7px rgba(87, 211, 140, 0); }
  100% { box-shadow: 0 0 0 0 rgba(87, 211, 140, 0); }
}

