:root {
  --bg: #eef1f6;
  --card: #ffffff;
  --ink: #1a2332;
  --ink-2: #5c6a7b;
  --ink-3: #8a96a6;
  --line: #e6eaf1;
  --header-a: #1e3a5f;
  --header-b: #2a5a92;
  --primary: #2f6fed;
  --primary-soft: #eaf1ff;
  --green: #1fb6a6;
  --orange: #f5a623;
  --red: #ef6666;
  --purple: #9b6dff;
  --cyan: #3ec1d3;
  --shadow: 0 1px 2px rgba(20,30,60,.04), 0 8px 24px rgba(20,30,60,.07);
  --shadow-hover: 0 4px 10px rgba(20,30,60,.08), 0 16px 40px rgba(20,30,60,.12);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ---------- header ---------- */
.header {
  background: linear-gradient(100deg, var(--header-a) 0%, var(--header-b) 100%);
  color: #fff;
  box-shadow: 0 2px 10px rgba(20,40,70,.20);
  position: sticky; top: 0; z-index: 20;
}
.header-inner {
  max-width: 1360px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-dot { width: 10px; height: 10px; border-radius: 50%; background: #5ad1c4; box-shadow: 0 0 0 4px rgba(90,209,196,.22); flex: none; }
.header h1 { margin: 0; font-size: 19px; font-weight: 650; letter-spacing: .4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-date { font-size: 13px; font-weight: 500; opacity: .92; white-space: nowrap; padding: 5px 12px; background: rgba(255,255,255,.12); border-radius: 20px; }

.wrap { max-width: 1360px; margin: 0 auto; padding: 20px 24px 48px; }

/* ---------- dropzone / empty ---------- */
.dropzone {
  border: 1px solid var(--line); border-radius: 12px; background: var(--card);
  padding: 11px 18px; text-align: center; color: var(--ink-2); margin-bottom: 16px;
  transition: .15s; cursor: pointer; box-shadow: var(--shadow); font-size: 13px;
  display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap;
}
.dropzone strong { color: var(--ink); }
.dropzone-tip { font-size: 12px; opacity: .8; }
.dropzone .dz-ico { color: var(--primary); font-size: 15px; font-weight: 700; }
.dropzone.hover { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.dz-status { font-size: 12px; }
.dz-status.busy { color: var(--primary); }
.dz-status.ok { color: #1d9e75; }
.dz-status.err { color: #d93025; }

/* 解析进度条（大文件后台解析时反馈，避免误以为卡死） */
.parse-progress { height: 6px; background: var(--line); border-radius: 4px; overflow: hidden; margin: 0 0 16px; }
.parse-progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, #2f6fed, #1fb6a6); border-radius: 4px; transition: width .2s ease; }
.parse-progress.indeterminate .parse-progress-fill { width: 35% !important; animation: dz-indet 1.1s ease-in-out infinite; }
@keyframes dz-indet { 0% { margin-left: -35%; } 100% { margin-left: 100%; } }

.empty { text-align: center; color: var(--ink-2); padding: 64px 16px; font-size: 15px; }

/* ---------- controls ---------- */
.controls {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 18px; margin-bottom: 18px; box-shadow: var(--shadow);
}
.date-grp { display: flex; align-items: center; gap: 8px; }
.date-grp label { font-size: 12px; color: var(--ink-2); }
.date-grp input[type=date] { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 13px; color: var(--ink); background: #fff; }
.quick-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.quick-btns button {
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  padding: 6px 14px; border-radius: 8px; font-size: 12.5px; cursor: pointer; transition: .12s;
}
.quick-btns button:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.quick-btns button.active { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 4px 10px rgba(47,111,237,.28); }
.controls .meta { margin-left: auto; font-size: 12px; color: var(--ink-2); text-align: right; }
.filter-grp { display: flex; align-items: center; gap: 8px; }
.filter-grp label { font-size: 12px; color: var(--ink-2); }
.chk-changed { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink-2); cursor: pointer; user-select: none; padding: 4px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.chk-changed input { accent-color: var(--primary); width: 14px; height: 14px; cursor: pointer; }
.filter-grp select { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 13px; color: var(--ink); background: #fff; max-width: 220px; cursor: pointer; }
.filter-grp select:focus { outline: none; border-color: var(--primary); }

/* ---------- 多选下拉（问题类型） ---------- */
.msel { position: relative; }
.msel-btn {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px;
  font-size: 13px; color: var(--ink); background: #fff; cursor: pointer;
  min-width: 132px; max-width: 240px; text-align: left;
  font-family: inherit; line-height: 1.5;
}
.msel-btn:hover { border-color: var(--primary); }
.msel.open .msel-btn { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47,111,237,.12); }
.msel-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msel-arrow { flex: none; font-size: 10px; color: var(--ink-3); transition: transform .15s ease; }
.msel.open .msel-arrow { transform: rotate(180deg); }
.msel-panel {
  display: none; position: absolute; z-index: 30; top: calc(100% + 6px); left: 0;
  width: 248px; max-width: 78vw;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 8px 28px rgba(20,30,60,.16); padding: 8px;
}
.msel.open .msel-panel { display: block; }
.msel-actions { display: flex; gap: 8px; padding: 0 2px 8px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.msel-actions button {
  flex: 1; border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  padding: 5px 8px; border-radius: 6px; font-size: 12px; cursor: pointer; font-family: inherit;
}
.msel-actions button:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.msel-list { max-height: 280px; overflow: auto; }
.msel-item {
  display: flex; align-items: center; gap: 8px; padding: 6px 6px; border-radius: 6px; cursor: pointer;
}
.msel-item:hover { background: var(--primary-soft); }
.msel-item input { flex: none; width: 14px; height: 14px; accent-color: var(--primary); cursor: pointer; margin: 0; }
.msel-name { flex: 1; min-width: 0; font-size: 12.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msel-item em { flex: none; font-style: normal; font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ---------- kpi / 五大类归并小卡（一行平铺） ---------- */
.kpis { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: nowrap; }
.kpi {
  flex: 1 1 0; min-width: 0;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px 9px; box-shadow: var(--shadow); position: relative; overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
  display: flex; flex-direction: column;
}
.kpi.k-blue { justify-content: center; }
.kpi:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--primary); }
.kpi.k-blue::before { background: var(--primary); }
.kpi.k-green::before { background: var(--green); }
.kpi.k-orange::before { background: var(--orange); }
.kpi.k-purple::before { background: var(--purple); }
.kpi.k-cyan::before { background: var(--cyan); }
.kpi.k-red::before { background: #ef6666; }
.kpi.k-gray::before { background: #b0b8c4; }
.kpi .k-label { font-size: 12px; color: var(--ink-2); line-height: 1.35; white-space: normal; }
.kpi .k-top { position: absolute; top: 7px; right: 9px; font-size: 9.5px; font-weight: 800; color: #fff; background: var(--primary); padding: 1px 6px; border-radius: 9px; letter-spacing: .5px; line-height: 1.5; }
.kpi .k-main { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.kpi .k-value { font-size: 21px; font-weight: 750; letter-spacing: .3px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .k-unit { font-size: 11px; font-weight: 500; margin-left: 3px; color: var(--ink-2); }
.kpi .k-sub { font-size: 11px; color: var(--ink-3); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .k-sub2 { font-size: 11px; color: var(--ink-2); font-weight: 600; white-space: normal; line-height: 1.35; }
.kpi .k-sub3 { font-size: 11px; color: #b3521b; font-weight: 600; white-space: normal; line-height: 1.45; margin-top: 2px; }
.kpi .k-t2-line { color: #b3521b; font-weight: 600; white-space: normal; }
.kpi .k-t2-line b { color: #b3521b; font-weight: 700; }
.kpi .k-note { font-size: 10px; color: var(--ink-3); line-height: 1.3; margin-top: 3px; }
.kpi .k-delta { font-size: 11px; font-weight: 600; white-space: nowrap; }
.k-cats-head { font-size: 14px; font-weight: 650; color: var(--ink); margin-bottom: 12px; padding-left: 11px; position: relative; }
.k-cats-head::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 4px; height: 14px; border-radius: 2px; background: var(--primary); }
.k-cats-head em { font-style: normal; font-weight: 400; font-size: 12px; color: var(--ink-3); margin-left: 10px; }
.k-cat {
  display: grid; grid-template-columns: minmax(190px, 1.1fr) 1fr 96px 58px;
  align-items: center; gap: 10px 14px; padding: 6px 0;
}
.k-cat + .k-cat { border-top: 1px solid #f1f4f9; }
.k-cat-name { font-size: 13px; font-weight: 600; color: var(--ink); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-cat-name em { font-style: normal; font-weight: 400; font-size: 11.5px; color: var(--ink-3); }
.k-cat-bar { height: 8px; background: #f1f4f9; border-radius: 20px; overflow: hidden; min-width: 0; }
.k-cat-bar i { display: block; height: 100%; border-radius: 20px; }
.k-cat-cnt { text-align: right; font-size: 13.5px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.k-cat-cnt em { font-style: normal; font-size: 11px; font-weight: 500; color: var(--ink-3); margin-left: 3px; }
.k-cat-pct { text-align: right; font-size: 12.5px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.k-cats-note { margin-top: 10px; font-size: 11.5px; color: var(--ink-3); line-height: 1.6; }
/* ---------- panels ---------- */
.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 18px 18px; box-shadow: var(--shadow); transition: box-shadow .15s ease;
}
.panel:hover { box-shadow: var(--shadow-hover); }
.panel-head { display: flex; align-items: baseline; flex-wrap: wrap; margin-bottom: 6px; gap: 6px 8px; }
.panel-head h3 { margin: 0; font-size: 15px; font-weight: 650; color: var(--ink); position: relative; padding-left: 11px; }
.panel-head h3::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 4px; height: 14px; border-radius: 2px; background: var(--primary); }
.panel-sub { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; margin-right: auto; }

/* ---------- 覆盖率徽章（数据完整度提示） ---------- */
.cov {
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px;
  white-space: nowrap; cursor: help; line-height: 1.6;
}
.cov.ok { color: #6b7787; background: #f1f4f9; }
.cov.warn { color: #a35a00; background: #fff3e0; }
.cov.bad { color: #c0392b; background: #fdecea; }

.chart { width: 100%; height: 300px; }
.chart.dist { height: 360px; }
.chart.dist.mod { height: 460px; }
.chart.trend { height: 380px; }

/* ---------- 明细表区 / 可视化图区（问题类型 & 分布模块 拆分展示） ---------- */
.table-row .dist-table { margin-top: 4px; max-height: 360px; }
.chart-row .chart.dist, .chart-row .chart.dist.mod { height: 420px; }
.chart.dist.ten { height: 300px; }

/* ---------- 问题类型下钻（点击明细表行展开 TOP3 模块/渠道/来源） ---------- */
tr.dt-row.drillable { cursor: pointer; }
tr.dt-row.drillable:hover { background: var(--primary-soft); }
tr.dt-row.sel { background: var(--primary-soft); }
tr.dt-row.sel td:first-child { color: var(--primary); font-weight: 600; }
.drill { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 12px; }
.drill[hidden] { display: none; }
.drill-head { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--primary); margin-bottom: 10px; }
.drill-close { border: 1px solid var(--line); background: #fff; color: var(--ink-2); border-radius: 7px; padding: 3px 10px; cursor: pointer; font-size: 12px; }
.drill-close:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.drill-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.drill-col h4 { margin: 0 0 8px; font-size: 13px; color: var(--ink); font-weight: 600; }
.drill-list { list-style: none; margin: 0; padding: 0; }
.drill-list li { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; font-size: 12px; }
.dl-name { flex: 0 0 88px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-bar { flex: 1 1 auto; height: 8px; background: #eef1f6; border-radius: 4px; overflow: hidden; }
.dl-bar i { display: block; height: 100%; background: var(--primary); border-radius: 4px; }
.dl-val { flex: 0 0 auto; color: var(--ink); font-variant-numeric: tabular-nums; }
.drill-empty { color: var(--ink-3); font-size: 12px; }
.drill-gy td.na, .dist-table.drill-gy td.na { color: var(--ink-3); font-style: normal; }
.drill-tip { margin-top: 8px; font-size: 12px; color: var(--ink-3); background: #f7f9fc; border: 1px dashed var(--line); border-radius: 8px; padding: 7px 11px; line-height: 1.7; }

/* ---------- 账管实施失败（运营工作台账·账管数据，随日期筛选） ---------- */
.zg-sec { margin-top: 18px; }
.zg-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 4px 0 10px; }
.zg-reconcile { font-size: 12.5px; color: var(--ink-2); background: #f5f8ff; border: 1px dashed #c9d6ee; border-radius: 8px; padding: 7px 11px; margin: 2px 0 10px; }
.zg-reconcile b { color: var(--blue); font-variant-numeric: tabular-nums; }
.zg-empty {
  grid-column: 1 / -1; padding: 26px 14px; text-align: center;
  font-size: 13px; color: var(--ink-3); background: #fbfcfe;
  border: 1px dashed var(--line); border-radius: 10px; line-height: 1.9;
}
.zg-empty span { font-size: 11.5px; color: #9aa5b4; }
.zg-chip {
  background: #fbfcfe; border: 1px solid var(--line); border-left: 3px solid var(--primary);
  border-radius: 10px; padding: 10px 12px;
}
.zg-chip.op { border-left-color: var(--orange); }
.zg-chip.sys { border-left-color: var(--red); }
.zg-chip.done { border-left-color: #7bc96f; }
.zg-chip.done .zg-chip-val { color: #4ea05a; }
.zg-chip.cancel { border-left-color: #b0b8c4; }
.zg-chip.cancel .zg-chip-val { color: #8a93a3; }
.zg-chip.wait { border-left-color: var(--cyan); background: #f1fbfb; }
.zg-chip.wait .zg-chip-val { color: var(--cyan); }
.zg-chip-val { font-size: 22px; font-weight: 750; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.1; }
.zg-chip.op .zg-chip-val { color: var(--orange); }
.zg-chip.sys .zg-chip-val { color: var(--red); }
.zg-chip-lab { font-size: 12px; color: var(--ink-2); margin-top: 3px; display: flex; align-items: baseline; gap: 5px; }
.zg-chip-lab em { font-style: normal; font-size: 10.5px; color: var(--ink-3); }
.zg-pie { height: 300px; }
.zg-detail { height: 300px; }
.zg-daily-head { font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin: 14px 0 6px; display: flex; align-items: baseline; gap: 8px; }
.zg-daily-head span { font-weight: 400; font-size: 11px; color: var(--ink-3); }
.zg-daily { height: 230px; }
/* ---------- 处理结果（处理进展 + 待跟踪明细） ---------- */
.zg-result { margin: 2px 0 8px; }
.zg-result-head { font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin: 12px 0 8px; }
.zg-result-head em { font-style: normal; font-weight: 400; font-size: 11px; color: var(--ink-3); margin-left: 8px; }
.zg-result .zg-summary { grid-template-columns: repeat(4, 1fr); }
.zg-track { margin-top: 12px; border: 1px solid var(--line); border-left: 3px solid var(--cyan); border-radius: 10px; background: #f7fcfc; padding: 10px 12px; }
.zg-track-head { font-size: 12.5px; font-weight: 700; color: var(--cyan); margin-bottom: 6px; }
.zg-track-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.zg-track-item { display: flex; flex-direction: column; gap: 3px; padding: 6px 0; border-top: 1px dashed #dce8e8; }
.zg-track-item:first-child { border-top: none; padding-top: 0; }
.zg-track-order { font-size: 12px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; word-break: break-all; }
.zg-track-reason { font-size: 12px; color: var(--ink-2); line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.dist-table .zg-ind { color: var(--ink-3); font-weight: 400; padding-left: 6px; }
.dist-table .zg-ratio { text-align: right; padding-right: 14px; font-weight: 600; color: var(--ink-2); }

/* ---------- distribution grid ---------- */
.grid-dist { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 18px; }
.span-2 { grid-column: 1 / -1; }

/* ---------- 操作咨询 模块+细分 可视化 ---------- */
.op-sec { margin-top: 18px; grid-template-columns: 1fr; }
.op-span2 { grid-column: 1 / -1; }
.op-mod-filter { margin-left: auto; font-size: 12px; padding: 4px 10px; border: 1px solid #e3e8f0; border-radius: 8px; background: #fff; color: #34404f; cursor: pointer; max-width: 220px; }
.op-mod-filter:hover { border-color: var(--primary); }
/* 操作咨询明细：按模块分组（一个模块下挂其细分问题），可按模块筛选查看 */
.dist-table .op-detail { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 560px; }
.dist-table .op-detail thead th { position: sticky; top: 0; z-index: 2; background: linear-gradient(180deg, #3161ab, #2a5494); color: #fff; font-weight: 600; padding: 8px 10px; text-align: center; white-space: nowrap; }
.dist-table .op-detail thead th:first-child { text-align: left; padding-left: 14px; }
.dist-table .op-detail tbody td { padding: 6px 10px; border-top: 1px solid var(--line); text-align: center; color: #34404f; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dist-table .op-detail tbody td:first-child { text-align: left; padding-left: 14px; }
.dist-table .op-detail tr.op-mod-head td { background: #eef3fb; border-top: 2px solid #c8d2e0; font-weight: 700; color: #1f3a63; padding: 7px 10px; }
.dist-table .op-detail .op-mod-name { margin-right: 10px; }
.dist-table .op-detail .op-mod-badge { font-size: 11px; font-weight: 600; color: #5b6678; background: #fff; border: 1px solid #d6deea; border-radius: 10px; padding: 1px 9px; }
.dist-table .op-detail tr.op-sub-row td.op-sub-name { padding-left: 28px; font-weight: 500; }
/* 知识库闭环面板：台账未填占位 + 维护说明 */
.dist-table .kb-na { color: #b3bccb; font-style: normal; }
.dist-table .kb-tip { margin-top: 10px; font-size: 11.5px; color: var(--ink-3); line-height: 1.6; }
.dist-table .kb-tip::before { content: "维护说明："; font-weight: 600; color: #5b6678; }
/* 操作咨询 · 细分 TOP 排名 */
.dist-table.op-top { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 760px; }
.dist-table.op-top thead th { position: sticky; top: 0; z-index: 2; background: linear-gradient(180deg, #3161ab, #2a5494); color: #fff; font-weight: 600; padding: 8px 12px; text-align: left; white-space: nowrap; }
.dist-table.op-top thead th:first-child { text-align: center; width: 56px; }
.dist-table.op-top thead th:nth-child(4), .dist-table.op-top thead th:nth-child(5),
.dist-table.op-top thead th:nth-child(6), .dist-table.op-top thead th:nth-child(7), .dist-table.op-top thead th:nth-child(8) { text-align: right; }
.dist-table.op-top tbody td { padding: 7px 12px; border-top: 1px solid var(--line); color: #34404f; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dist-table.op-top tbody td.op-rank { text-align: center; font-weight: 700; color: #8a94a6; }
.dist-table.op-top tbody td.op-rank.rank1 { color: #c9881f; }
.dist-table.op-top tbody td.op-rank.rank2 { color: #6b7785; }
.dist-table.op-top tbody td.op-rank.rank3 { color: #a9712f; }
.dist-table.op-top tbody td.op-sub-name { font-weight: 500; }
.dist-table.op-top tbody td.op-mod-dim { color: #9aa4b4; font-size: 11.5px; }
.dist-table.op-top tbody td.op-qty { text-align: right; position: relative; padding-right: 14px; }
.dist-table.op-top tbody td.op-qty .op-bar { display: inline-block; vertical-align: middle; margin-left: 8px; width: 70px; height: 7px; border-radius: 4px; background: #eef2f7; overflow: hidden; }
.dist-table.op-top tbody td.op-qty .op-bar i { display: block; height: 100%; background: linear-gradient(90deg, #4d8bd6, #2a5494); border-radius: 4px; }
.dist-table.op-top tbody td.op-qty2 { text-align: right; color: #8a94a6; font-variant-numeric: tabular-nums; }
.dist-table.op-top tbody td.op-diff { text-align: right; font-weight: 600; }
.dist-table.op-top tbody td.op-share { text-align: right; color: #5a6678; }
.dist-table.op-top tbody td.op-delta { text-align: right; font-weight: 600; }
.dist-table.op-top .d-up { color: #d9534f; }   /* 涨(红) */
.dist-table.op-top .d-down { color: #2e9e5b; }   /* 跌(绿) */
.dist-table.op-top .d-flat { color: #9aa4b4; }
.dist-table .op-detail tbody tr.op-sub-row:nth-child(even) { background: #f7f9fc; }
.dist-table .op-detail tbody tr.op-sub-row:hover { background: var(--primary-soft); }
.op-summary { font-size: 12.5px; color: #5b6678; margin: 0 0 8px; }
.op-summary b { color: #1a2332; font-weight: 700; }
.chart.dist.op-main { height: 440px; }
.chart.dist.op-pie { height: 360px; }
.chart.dist.op-delta { height: 420px; }


/* ---------- dist data table ---------- */
.dist-table {
  margin-top: 12px; border: 1px solid var(--line); border-radius: 10px;
  max-height: 320px; overflow: auto; background: #fff;
}
.dist-table table { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 560px; }
.dist-table thead th {
  position: sticky; top: 0; z-index: 2;
  background: linear-gradient(180deg, #3161ab, #2a5494); color: #fff;
  font-weight: 600; padding: 8px 10px; text-align: center; white-space: nowrap;
}
.dist-table thead th:first-child { text-align: left; padding-left: 14px; }
.dist-table tbody td {
  padding: 7px 10px; border-top: 1px solid var(--line); text-align: center;
  color: #34404f; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.dist-table tbody td:first-child {
  text-align: left; padding-left: 14px; font-weight: 500;
  max-width: 200px; overflow: hidden; text-overflow: ellipsis;
}
.dist-table tbody tr:nth-child(even) { background: #f7f9fc; }
.dist-table tbody tr:hover { background: var(--primary-soft); }
/* 置底行（如「转二线登记」）：与上方分类用分隔线区隔，并弱化底色以示口径独立 */
.dist-table tbody tr.dt-pinned td { border-top: 2px solid #c8d2e0; }
.dist-table tbody tr.dt-pinned td:first-child { font-weight: 600; }
.dist-table tbody tr.dt-pinned { background: #fbfcfe; }
/* 明细表附加列「其中转二线」：显示该类别中转二线的记录数，不参与排序 */
.dist-table td.dt-zx { color: #b45309; font-weight: 600; white-space: nowrap; }
.dist-table td.dt-zx .zx-pct { display: inline-block; margin-left: 6px; font-weight: 400; font-size: 11px; color: #8a7a63; }
.dist-table td.dt-zx.zx-none { color: #b9c0c9; font-weight: 400; }
/* 合计行：全列汇总，置底加粗 */
.dist-table tbody tr.dt-total td { border-top: 2px solid #c8d2e0; font-weight: 700; background: #f6f8fc; }
.dist-table tbody tr.dt-total td:first-child { font-weight: 700; letter-spacing: 1px; }
/* 降量监控：重复度条 + 高频原话列 */
.reduce-tip { font-size: 11px; color: var(--ink-3); line-height: 1.5; margin: 0 0 8px; }
.reduce-tip .rp-hl { color: #b3521b; font-weight: 600; }
.reduce-table td.rp-txt { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); font-size: 11px; }
.reduce-table td.rp-txt.zx-none { color: #b9c0c9; }
.rp { display: inline-flex; align-items: center; gap: 6px; }
.rp-num { font-variant-numeric: tabular-nums; font-size: 11px; color: var(--ink-2); min-width: 38px; text-align: right; }
.rp-warn .rp-num { color: #e23c3c; font-weight: 600; }
.rp-bar { display: inline-block; width: 54px; height: 6px; background: #eef1f7; border-radius: 3px; overflow: hidden; }
.rp-bar i { display: block; height: 100%; background: #7fb0e8; border-radius: 3px; }
.rp-warn .rp-bar i { background: #e23c3c; }
.dist-table .dt-empty { text-align: center; color: var(--ink-3); padding: 18px 10px; }
/* 涨跌配色：上升红色，下降绿色（与截图示例一致） */
.d-up { color: #e23c3c; font-weight: 600; }
.d-down { color: #1c8a4e; font-weight: 600; }
.d-flat { color: var(--ink-3); }
.d-cell { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
/* 增减情况：趋势箭头图 */
.d-arr { vertical-align: middle; }
.d-star { color: #f0a020; font-size: 13px; line-height: 1; }
.d-num { font-variant-numeric: tabular-nums; font-weight: 600; }

.foot { text-align: center; color: var(--ink-3); font-size: 12px; margin-top: 32px; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .kpis { gap: 8px; }
  .kpi .k-value { font-size: 19px; }
  .grid-dist { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .controls .meta { width: 100%; text-align: left; margin-left: 0; }
  .chart.dist.mod { height: 420px; }
  .chart-row .chart.dist, .chart-row .chart.dist.mod { height: 380px; }
  .chart.dist.ten { height: 280px; }
  .zg-summary { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 640px) {
  .wrap { padding: 14px 14px 40px; }
  .header-inner { flex-direction: column; align-items: flex-start; gap: 8px; }
  .header h1 { font-size: 17px; }
  .header-date { align-self: flex-start; }
  .kpis { flex-wrap: wrap; gap: 8px; }
  .kpi { flex: 1 1 30%; padding: 10px 12px 9px; }
  .kpi .k-value { font-size: 20px; }
  .drill-cols { grid-template-columns: 1fr; gap: 10px; }
  .kpi .k-main { margin-top: 4px; }
  .kpi .k-sub { margin-top: 4px; }
  .kpi.k-blue .k-value { font-size: 22px; }
  .msel-btn { min-width: 0; width: 100%; }
  .controls { gap: 10px; }
  .date-grp { width: 100%; justify-content: space-between; }
  .quick-btns { width: 100%; }
  .quick-btns button { flex: 1 1 auto; padding: 8px 6px; }
  .chart.dist { height: 300px; }
  .chart.dist.op-delta { height: 380px; }
  .chart.dist.mod { height: 360px; }
  .chart-row .chart.dist, .chart-row .chart.dist.mod { height: 300px; }
  .chart.dist.ten { height: 260px; }
  .chart.trend { height: 300px; }
  .zg-pie, .zg-detail { height: 260px; }
  .zg-summary { grid-template-columns: repeat(2, 1fr); }
  .dist-table { max-height: 260px; }
  .dist-table table { font-size: 12px; }
  .dist-table tbody td:first-child { max-width: 140px; }
}

/* 解析中全屏遮罩（大文件冻结期间提示，避免误以为崩溃） */
.overlay {
  position: fixed; inset: 0; z-index: 9999;
  display: none; align-items: center; justify-content: center;
  background: rgba(238,241,246,.94);
}
.overlay-box { text-align: center; padding: 24px; }
.overlay-spinner {
  width: 40px; height: 40px; margin: 0 auto 16px;
  border: 4px solid #d7deea; border-top-color: var(--primary);
  border-radius: 50%; animation: ov-spin .9s linear infinite;
}
@keyframes ov-spin { to { transform: rotate(360deg); } }
.overlay-text { font-size: 14px; color: var(--ink); white-space: pre-line; line-height: 1.7; max-width: 360px; }

/* 操作咨询统一下钻视图 */
.op-view-tabs { display: inline-flex; gap: 6px; margin-left: auto; }
.op-view-tabs button { font: inherit; font-size: 12px; padding: 3px 10px; border: 1px solid #d9dee7; background: #fff; border-radius: 14px; cursor: pointer; color: #5b6678; }
.op-view-tabs button.active { background: #2f6bff; color: #fff; border-color: #2f6bff; }
/* 操作咨询统一下钻视图：控制栏（模块筛选 + 视图切换） */
.op-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 2px 0 8px; }
.op-mod-sel-wrap { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: #5b6678; }
.op-mod-sel { font: inherit; font-size: 12.5px; padding: 4px 10px; border: 1px solid #d9dee7; border-radius: 8px; background: #fff; color: #34404f; cursor: pointer; max-width: 280px; }
.op-mod-sel:hover { border-color: var(--primary); }
.op-mod-sel:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(47,107,255,.12); }
.op-body { min-height: 120px; max-height: 560px; overflow: auto; border: 1px solid #eff2f7; border-radius: 8px; padding: 4px; }
.op-click { cursor: pointer; }
.op-click:hover { background: rgba(47,107,255,.06); }
.op-top .op-rank.rank1 { color: #e6a700; font-weight: 700; }
.op-top .op-rank.rank2 { color: #9aa3b2; font-weight: 700; }
.op-top .op-rank.rank3 { color: #cd7f32; font-weight: 700; }
.op-drill { margin-top: 10px; }
.op-drill[hidden] { display: none; }
.drill-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.op-back { font: inherit; font-size: 12px; padding: 3px 10px; border: 1px solid #d9dee7; background: #fff; border-radius: 6px; cursor: pointer; }
.op-back:hover { background: #f2f5fb; }
.drill-title { font-weight: 600; font-size: 14px; }
.drill-sub { color: #8a93a3; font-size: 12px; }
.drill-cols { display: flex; flex-wrap: wrap; gap: 12px; }
.drill-card { flex: 1 1 200px; border: 1px solid #e6eaf1; border-radius: 8px; padding: 10px 12px; background: #fafbfd; }
.drill-card h4 { margin: 0 0 8px; font-size: 13px; color: #2f3a4d; }
.drill-row { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; font-size: 12.5px; border-bottom: 1px dashed #eef1f6; }
.drill-row:last-child { border-bottom: none; }
.drill-row span:first-child { color: #8a93a3; }
.drill-row b { color: #2f3a4d; }
.drill-empty { padding: 16px; color: #8a93a3; text-align: center; }
