/* 湛庐渠道库存周转看板 v3.1 · 视觉（参考出版计划看板 pubops） */
:root{
  --ink:#1f2a37;--paper:#f3f5f8;--panel:#fff;
  --line:#e2e6ec;--line-dark:#c3cad4;--muted:#64748b;
  --red:#dc2626;--red-soft:#fef2f2;
  --amber:#d97706;--amber-soft:#fffbeb;
  --green:#059669;--green-soft:#ecfdf5;
  --blue:#2563eb;--blue-soft:#eff6ff;
  --purple:#7c3aed;--purple-soft:#f5f3ff;
  --orange:#ea580c;
  --font:-apple-system,BlinkMacSystemFont,"SF Pro Text","PingFang SC","Microsoft YaHei",sans-serif;
  /* 模块主色（出版计划看板青蓝系） */
  --c-central:#1e3a5f;--c-central-soft:#eef2f7;
  --c-total:#0f766e;--c-total-soft:#f0fdfa;
  --c-jd:#e11d48;--c-jd-soft:#fff1f2;
  --c-dd:#ea580c;--c-dd-soft:#fff7ed;
  --c-wx:#0d9488;--c-wx-soft:#f0fdfa;
  --c-xh:#7c3aed;--c-xh-soft:#f5f3ff;
  --c-bk:#2563eb;--c-bk-soft:#eff6ff;
  --gray:#94a3b8;
}
*{margin:0;padding:0;box-sizing:border-box}
body{font:13px/1.6 var(--font);background:var(--paper);color:var(--ink);-webkit-font-smoothing:antialiased}
.hidden{display:none!important}

/* === 登录 === */
.login-wrap{max-width:400px;margin:80px auto;padding:0 16px}
.login-card{background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:36px;box-shadow:0 10px 40px rgba(31,42,55,.08)}
.login-card h1{font-size:22px;margin-bottom:4px;letter-spacing:-.03em}
.login-card .tip{color:var(--muted);font-size:12px;margin-bottom:20px}
.field{margin-bottom:14px}
.field label{display:block;font-size:11px;color:var(--muted);margin-bottom:5px}
.field input{width:100%;padding:10px 14px;border:1px solid var(--line);border-radius:10px;font-size:14px;background:var(--panel)}
.field input:focus{outline:0;border-color:var(--c-central);box-shadow:0 0 0 3px rgba(30,58,95,.08)}
.btn-primary{width:100%;background:var(--ink);color:#fff;border:none;padding:12px;border-radius:10px;font-size:15px;cursor:pointer;margin-top:8px;transition:.15s}
.btn-primary:hover{background:#2b3a4a}
.error-msg{color:var(--red);font-size:13px;margin-top:10px}

/* === 顶部导航（深色顶栏） === */
.app-shell{width:100%;max-width:1720px;margin:0 auto}
.topbar{position:sticky;z-index:10;top:0;height:60px;padding:0 32px;display:flex;align-items:center;gap:24px;color:#fff;background:#1e3a5f;border-bottom:1px solid rgba(255,255,255,.08);box-shadow:0 1px 10px rgba(0,0,0,.15)}
.topbar .logo{font-size:16px;font-weight:700;letter-spacing:-.01em;display:flex;align-items:center;gap:10px}
.topbar .logo::before{content:'';display:inline-block;width:5px;height:20px;background:#38bdf8;border-radius:2px}
.data-badge{font-size:12px;font-weight:600;color:#7dd3fc;background:rgba(56,189,248,.12);border:1px solid rgba(56,189,248,.3);border-radius:999px;padding:5px 14px;white-space:nowrap;display:flex;align-items:center;gap:6px}
.data-badge.empty{color:#fca5a5;background:rgba(248,113,113,.1);border-color:rgba(248,113,113,.3)}
.viewswitch{display:flex;gap:4px}
.viewswitch button{border:0;border-radius:8px;padding:6px 14px;background:transparent;color:#9999a8;font-size:13px;cursor:pointer;transition:.15s}
.viewswitch button:hover{color:#fff;background:rgba(255,255,255,.08)}
.viewswitch button.on{color:#fff;background:rgba(255,255,255,.12);box-shadow:inset 0 -2px var(--orange)}
.topbar .who{margin-left:auto;color:#8a8a9a;font-size:12px}
.btn-exit{background:rgba(255,255,255,.11);border:0;border-radius:8px;padding:6px 14px;color:#fff;font-size:12px;cursor:pointer}
.btn-exit:hover{background:rgba(255,255,255,.17)}
.btn-refresh{background:rgba(56,189,248,.18);border:1px solid rgba(56,189,248,.4);border-radius:8px;padding:6px 14px;color:#7dd3fc;font-size:12px;cursor:pointer;transition:.15s;min-width:76px}
.btn-refresh:hover{background:rgba(56,189,248,.32);color:#fff}

/* === 主体 === */
main{padding:0 28px 80px;min-width:0}

/* === 总览行 === */
.overview-row{display:flex;flex-direction:column;gap:20px;margin:24px 0}

/* === 通用模块卡片（带顶部色条） === */
.module{background:var(--panel);border:1.5px solid var(--line);border-radius:16px;box-shadow:0 4px 16px rgba(0,0,0,.06);overflow:hidden}
.module-title{font-size:15px;font-weight:700;display:flex;align-items:center;justify-content:space-between;padding:14px 24px 10px}
.module-title .mt-label{display:flex;align-items:center;gap:8px}
.module-title .color-dot{width:10px;height:10px;border-radius:50%}
.module-title .asof{font-size:11px;color:var(--muted);font-weight:400}


/* === 中央库存大模块（方案B：整行在上） === */
.central-module{padding:0;background:var(--panel);border:1px solid var(--line);border-radius:16px;box-shadow:0 4px 20px rgba(31,42,55,.06);overflow:hidden}
.central-module .cm-header{padding:20px 28px 4px}
.central-module .cm-title{font-size:18px;font-weight:700;display:flex;align-items:center;gap:8px}
.central-module .cm-title .color-dot{width:10px;height:10px;border-radius:50%;display:inline-block}
.central-module .cm-asof{font-size:11px;color:var(--muted);font-weight:400;margin-left:auto}
.central-module .cm-body{padding:6px 28px 24px;display:flex;gap:40px;align-items:center;cursor:pointer}

/* 中央可销月数大圆圈（左） */
.sell-months-wrap{flex-shrink:0;text-align:center;padding:12px 8px;min-width:170px}
.sell-months-circle{width:130px;height:130px;border-radius:50%;display:flex;align-items:center;justify-content:center;border:6px solid var(--c-central);background:var(--c-central-soft);box-shadow:inset 0 3px 10px rgba(0,0,0,.06),0 4px 16px rgba(30,58,95,.12);margin:0 auto}
.sell-months-circle .num{font-size:40px;font-weight:800;font-variant-numeric:tabular-nums;line-height:1;letter-spacing:-.04em;color:var(--c-central)}
.sell-months-circle.warn{border-color:var(--red);background:var(--red-soft)}
.sell-months-circle.warn .num{color:var(--red)}
.sell-months-circle.amber{border-color:var(--amber);background:var(--amber-soft)}
.sell-months-circle.amber .num{color:var(--amber)}
.sell-months-circle.purple{border-color:var(--purple);background:var(--purple-soft)}
.sell-months-circle.purple .num{color:var(--purple)}
.sell-months-label{margin-top:12px;font-size:14px;color:var(--muted);font-weight:500}

/* hero 数字区（兼容旧类，保留） */
.hero-months{flex-shrink:0;text-align:center;padding:12px 8px;min-width:180px}
.hero-months .hero-num{font-size:64px;font-weight:800;font-variant-numeric:tabular-nums;line-height:1;letter-spacing:-.03em;color:var(--c-central)}
.hero-months .hero-num.warn{color:var(--red)}
.hero-months .hero-num.amber{color:var(--amber)}
.hero-months .hero-num.purple{color:var(--purple)}
.hero-months .hero-label{margin-top:8px;font-size:14px;color:var(--muted);font-weight:500}
.hero-months .hero-unit{font-size:16px;color:var(--muted)}

/* 中央指标网格 4列×3行（占整行宽度） */
.central-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:1px;background:var(--line);border-radius:12px;overflow:hidden;flex:1}
.central-grid .cg-item{background:var(--panel);text-align:center;padding:14px 8px}
.central-grid .cg-item:hover{background:#f8fafc}
.central-grid .cg-item .k{font-size:12px;color:var(--muted);margin-bottom:5px;letter-spacing:.02em}
.central-grid .cg-item .v{font-size:22px;font-weight:700;font-variant-numeric:tabular-nums;letter-spacing:-.02em}
.central-grid .cg-item .v small{font-size:12px;color:var(--muted);font-weight:400;margin-left:2px}
.central-grid .cg-item .v.warn{color:var(--red)}
.central-grid .cg-item .v.good{color:var(--green)}
.central-grid .cg-item .v.amber{color:var(--amber)}
.central-grid .cg-item .v.purple{color:var(--purple)}

/* === 渠道卡片（方案B：整行在下，5等宽） === */
.chan-cards-row{display:grid;grid-template-columns:repeat(5,1fr);gap:16px}
@media(max-width:1200px){.chan-cards-row{grid-template-columns:repeat(3,1fr)}}
@media(max-width:700px){.chan-cards-row{grid-template-columns:repeat(2,1fr)}}
.chan-card{background:var(--panel);border:1px solid var(--line);border-radius:14px;cursor:pointer;transition:.18s;overflow:hidden;box-shadow:0 2px 12px rgba(31,42,55,.05);position:relative}
.chan-card:hover{box-shadow:0 8px 24px rgba(31,42,55,.1);transform:translateY(-3px)}
.chan-card .cc-body{padding:18px 16px 14px;display:flex;flex-direction:column;align-items:center}
.chan-card .cc-name{font-weight:700;font-size:14px;margin-bottom:12px;display:flex;align-items:center;gap:6px}
.chan-card .cc-name .color-dot{width:8px;height:8px;border-radius:50%}
.chan-card .cc-months{width:76px;height:76px;border-radius:50%;display:flex;align-items:center;justify-content:center;border:4px solid var(--cc-color);background:var(--cc-color-soft)}
.chan-card .cc-months .num{font-size:24px;font-weight:800;font-variant-numeric:tabular-nums;line-height:1;letter-spacing:-.04em;color:var(--cc-color)}
.chan-card .cc-months-label{font-size:11px;color:var(--muted);margin-top:6px}
.chan-card .cc-grid{display:grid;grid-template-columns:1fr 1fr;gap:1px;background:var(--line);width:100%;margin-top:10px;border-radius:10px;overflow:hidden}
.chan-card .cc-grid .cc-item{background:var(--panel);text-align:center;padding:7px 2px}
.chan-card .cc-grid .cc-item .k{font-size:10px;color:var(--muted)}
.chan-card .cc-grid .cc-item .v{font-size:13px;font-weight:700;font-variant-numeric:tabular-nums}
.chan-card .cc-grid .cc-item .v small{font-size:10px;color:var(--muted);font-weight:400}
.chan-card .cc-grid .cc-item .v.warn{color:var(--red)}
/* 销量进度格：7列 */
.chan-card .cc-grid-sales{grid-template-columns:repeat(7,1fr)}
.chan-card .cc-grid-sales .cc-item .k{font-size:9px}
.chan-card .cc-grid-sales .cc-item .v{font-size:11px}
@media(max-width:1200px){.chan-card .cc-grid-sales{grid-template-columns:repeat(4,1fr)}}
.chan-card .cc-warn{margin-top:10px;display:flex;gap:6px;justify-content:center}
.chan-card .cc-est{font-size:10px;background:var(--amber-soft);color:var(--amber);padding:2px 8px;border-radius:4px;margin-top:6px}
.chan-card.jd{--cc-color:var(--c-jd);--cc-color-soft:var(--c-jd-soft)}
.chan-card.dangdang{--cc-color:var(--c-dd);--cc-color-soft:var(--c-dd-soft)}
.chan-card.wenxuan{--cc-color:var(--c-wx);--cc-color-soft:var(--c-wx-soft)}
.chan-card.xinhua{--cc-color:var(--c-xh);--cc-color-soft:var(--c-xh-soft)}
.chan-card.boku{--cc-color:var(--c-bk);--cc-color-soft:var(--c-bk-soft)}

/* === 标签 === */
.pill{display:inline-block;padding:3px 12px;border-radius:999px;font-size:11px;font-weight:600;letter-spacing:.02em}
.clickable{cursor:pointer}
.clickable:hover{text-decoration:underline}
.pill.red{background:var(--red-soft);color:var(--red)}
.pill.amber{background:var(--amber-soft);color:var(--amber)}
.pill.green{background:var(--green-soft);color:var(--green)}
.pill.blue{background:var(--blue-soft);color:var(--blue)}
.pill.purple{background:var(--purple-soft);color:var(--purple)}
.pill.gray{background:#f1f5f9;color:var(--muted)}

/* === 区块标题 === */
.section-title{display:flex;align-items:baseline;gap:10px;margin:32px 0 14px}
.section-title h2{font-size:17px;font-weight:700;letter-spacing:-.02em}
.section-title .note{font-size:12px;color:var(--muted)}

/* === 表格 === */
.table-card{background:var(--panel);border:1px solid var(--line);border-radius:14px;overflow:hidden;box-shadow:0 4px 20px rgba(31,42,55,.06);margin-top:6px}
.toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding:14px 18px;border-bottom:1px solid var(--line)}
.toolbar input{padding:8px 14px;border:1.5px solid var(--line);border-radius:10px;width:260px;font-size:13px;background:var(--panel);transition:.15s}
.toolbar input:focus{outline:0;border-color:var(--c-central);box-shadow:0 0 0 3px rgba(30,58,95,.1)}
.chips{display:flex;gap:6px;flex-wrap:wrap}
.chip{border:1.5px solid var(--line);background:#fafbfc;border-radius:18px;padding:5px 14px;font-size:12px;cursor:pointer;color:var(--muted);transition:.15s}
.chip:hover{border-color:var(--line-dark)}
.chip.on{background:var(--ink);border-color:var(--ink);color:#fff}
.toolbar select{padding:7px 10px;border:1.5px solid var(--line);border-radius:8px;font-size:12px;color:var(--muted)}
.toolbar .count{margin-left:auto;font-size:12px;color:var(--muted)}
.tbl-wrap{overflow-x:auto}
table{width:100%;border-collapse:collapse;font-size:12px;min-width:900px}
th{background:#f5f6f8;color:var(--muted);font-weight:600;text-align:left;padding:10px 12px;border-bottom:2px solid var(--line);white-space:nowrap;user-select:none}
th.num-h{text-align:right}
th.sortable{cursor:pointer;transition:background .12s}
th.sortable:hover{background:#eef1f5}
th.sortable.sort-on{color:var(--ink);background:#e8eef5}
.sort-arr{font-size:9px;margin-left:3px;color:var(--c-central);vertical-align:1px}

/* ===== 周转趋势热力图 ===== */
.heat-grid{display:grid;gap:3px;margin-top:10px}
.heat-cell{padding:9px 6px;border-radius:6px;text-align:center;font-size:13px;font-weight:700;font-variant-numeric:tabular-nums}
.heat-h{background:var(--panel);color:var(--muted);font-weight:600;font-size:11px;border:1px solid var(--line)}
.heat-row{background:#f5f6f8;color:var(--ink);font-weight:600;font-size:12px;display:flex;align-items:center;justify-content:center;border:1px solid var(--line)}
.heat-unit{font-size:9px;font-weight:400;margin-left:2px;opacity:.65}
.heat-legend{display:flex;gap:8px;flex-wrap:wrap;font-size:10px;color:var(--muted);margin-top:8px}
.heat-legend i{display:inline-block;width:12px;height:12px;border-radius:3px;margin-right:3px;vertical-align:-1px}

/* ===== 趋势复盘折叠区（季度/半年度/年度复盘，点击展开，不占首页主要视觉）===== */
.trend-review{margin:16px 0 0;border:1px solid var(--line);border-radius:14px;background:var(--panel);overflow:hidden;box-shadow:0 4px 20px rgba(31,42,55,.05)}
.trend-review-head{display:flex;align-items:center;justify-content:space-between;padding:13px 20px;cursor:pointer;user-select:none;transition:background .12s}
.trend-review-head:hover{background:#fafbfc}
.trend-review-title{font-size:14px;font-weight:700;display:flex;align-items:center;gap:8px}
.trend-review-title small{font-size:11px;color:var(--muted);font-weight:400}
.trend-review-arrow{font-size:12px;color:var(--muted)}
.trend-review-body{padding:4px 20px 16px;border-top:1px solid var(--line)}
.trend-review-body .trend-module{margin:14px 0 0;box-shadow:none}
.trend-period{display:flex;align-items:center;gap:8px;margin:12px 0 2px;flex-wrap:wrap}
.tp-label{font-size:12px;color:var(--muted)}
.tp-chip{padding:4px 13px;border:1px solid var(--line-dark);border-radius:16px;font-size:12px;cursor:pointer;transition:.15s;background:var(--panel)}
.tp-chip:hover{border-color:var(--ink)}
.tp-chip.on{background:var(--c-central);border-color:var(--c-central);color:#fff}

/* ===== 趋势比较（季度/半年/年度横向对比）===== */
.tc-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:10px}
.tc-col{border:1px solid var(--line);border-radius:12px;padding:12px 16px;background:var(--panel)}
.tc-col h4{font-size:13px;font-weight:700;margin:0 0 8px;display:flex;justify-content:space-between;align-items:center}
.tc-sub{font-size:10px;color:var(--muted);font-weight:400}
.tc-item{display:flex;justify-content:space-between;align-items:baseline;gap:8px;padding:7px 0;border-top:1px dashed var(--line)}
.tc-item:first-of-type{border-top:none}
.tc-name{font-size:12px;color:var(--ink);white-space:nowrap}
.tc-name small{font-size:10px;color:var(--muted);margin-left:4px}
.tc-val{font-size:15px;font-weight:700;white-space:nowrap;font-variant-numeric:tabular-nums}
.tc-chg{font-size:11px;font-weight:600;margin-left:2px}
.tc-lack{font-size:10px;color:var(--amber);font-weight:400;margin-left:2px}
@media(max-width:1000px){.tc-grid{grid-template-columns:1fr}}

/* 趋势模块内 渠道/中央 分区小标题 */
.trend-subsec{display:flex;align-items:center;gap:8px;margin:16px 0 2px;font-size:13px;font-weight:700;color:var(--ink)}
.trend-subsec::before{content:'';flex:0 0 4px;height:14px;border-radius:2px;background:var(--c-central)}
.trend-subsec:first-child{margin-top:10px}
.trend-compare-block{margin-top:2px}
td{padding:9px 12px;border-bottom:1px solid #eceef0;white-space:nowrap;font-variant-numeric:tabular-nums}
tr:hover td{background:#fafbfc}
.num{text-align:right}
.muted{color:var(--muted)}
.title-cell{max-width:220px;overflow:hidden;text-overflow:ellipsis}
.title-cell b{display:block;font-weight:600}
.title-cell span{font-size:11px;color:var(--muted)}

/* === 上传 === */
.upload-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:12px}
.upload-slot{background:var(--panel);border:1.5px solid var(--line);border-radius:14px;padding:14px 16px;box-shadow:0 2px 10px rgba(0,0,0,.04)}
.upload-slot .label{font-weight:600;font-size:14px;margin-bottom:4px}
.upload-slot .hint{font-size:12px;color:var(--muted);margin-bottom:8px}
.upload-slot .status{font-size:12px;margin-bottom:6px}
.upload-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:4px}
.btn-small{display:inline-block;background:var(--panel);color:var(--ink);border:1.5px solid var(--line-dark);padding:5px 12px;border-radius:8px;font-size:11px;cursor:pointer;transition:.15s}
.btn-small:hover{border-color:var(--ink);background:var(--ink);color:#fff}
.baseline-btn{color:var(--amber);border-color:var(--amber)}
.baseline-btn:hover{background:var(--amber);color:#fff}

/* === 书详情卡 === */
.book-detail{background:var(--panel);border:2px solid var(--c-central);border-radius:12px;padding:18px;margin:10px 0}
.book-detail h3{font-size:18px;margin-bottom:4px}
.book-detail .isbn{color:var(--muted);font-size:13px;margin-bottom:14px}
.book-detail .chan-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px}
.book-detail .chan-item{background:#fafbfc;border:1px solid var(--line);border-radius:8px;padding:10px 12px}
.book-detail .chan-item .chan-name{font-weight:600;font-size:13px;margin-bottom:4px}
.book-detail .chan-item .chan-row{display:flex;justify-content:space-between;font-size:13px;padding:2px 0}

/* === 中央详情页 === */
.detail-metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:16px}
.detail-metrics .dm-card{background:var(--panel);border:1.5px solid var(--line);border-radius:14px;padding:18px;box-shadow:0 2px 10px rgba(0,0,0,.04)}
.detail-metrics .dm-card:first-child{border-color:var(--c-central);border-width:2px;background:var(--c-central-soft)}
.detail-metrics .dm-card .dk{font-size:12px;color:var(--muted);margin-bottom:6px}
.detail-metrics .dm-card .dv{font-size:28px;font-weight:800;font-variant-numeric:tabular-nums;letter-spacing:-.02em}
.detail-metrics .dm-card .dv small{font-size:13px;color:var(--muted);font-weight:400;margin-left:3px}

/* === 进度区 === */
.progress-section{background:var(--panel);border:1.5px solid var(--line);border-radius:14px;padding:18px;margin-bottom:16px;box-shadow:0 2px 10px rgba(0,0,0,.04)}
.progress-section h3{font-size:14px;font-weight:700;margin-bottom:14px;display:flex;align-items:center;gap:8px}
.progress-section h3 .color-dot{width:8px;height:8px;border-radius:50%}
.progress-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:12px}
.progress-grid .pg-item{text-align:center;padding:8px 4px}
.progress-grid .pg-item .k{font-size:11px;color:var(--muted);margin-bottom:4px}
.progress-grid .pg-item .v{font-size:18px;font-weight:700;font-variant-numeric:tabular-nums}

/* === 旧版指标卡（渠道详情页兼容） === */
.metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:14px;margin-bottom:14px}
.metric{background:var(--panel);border:1.5px solid var(--line);border-radius:14px;padding:14px 16px;box-shadow:0 2px 10px rgba(0,0,0,.04)}
.metric .k{font-size:12px;color:var(--muted)}
.metric .v{font-size:24px;font-weight:700;margin-top:4px;font-variant-numeric:tabular-nums}
.metric .v small{font-size:12px;color:var(--muted);font-weight:400;margin-left:3px}
.metric.warn{cursor:pointer}
.metric.warn:hover{border-color:var(--red)}
.metric.warn .v{color:var(--red)}

/* === 旧版渠道大卡片（兼容） === */
.channels{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;margin-bottom:8px}
.chan{background:var(--panel);border:1.5px solid var(--line);border-radius:14px;padding:14px 16px;cursor:pointer;transition:.15s;box-shadow:0 2px 10px rgba(0,0,0,.04)}
.chan:hover{box-shadow:0 6px 20px rgba(0,0,0,.08)}
.chan .head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
.chan .name{font-weight:600}
.chan .freq{font-size:11px;padding:2px 8px;border-radius:8px;background:var(--blue-soft);color:var(--blue)}
.chan .row{display:flex;justify-content:space-between;font-size:13px;padding:3px 0;font-variant-numeric:tabular-nums}
.chan .row span:first-child{color:var(--muted)}
.est-flag{font-size:10px;background:var(--amber-soft);color:var(--amber);padding:1px 5px;border-radius:4px;margin-left:4px}

/* === 中央详情旧版兼容 === */
.central-detail{background:var(--panel);border:1.5px solid var(--line);border-radius:14px;padding:24px;box-shadow:0 2px 10px rgba(0,0,0,.04)}
.central-detail h3{font-size:16px;margin-bottom:14px;color:var(--c-central)}
.central-detail .detail-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:14px}
.central-detail .detail-item{background:#fafbfc;border:1px solid var(--line);border-radius:10px;padding:14px}
.central-detail .detail-item .dk{font-size:12px;color:var(--muted);margin-bottom:4px}
.central-detail .detail-item .dv{font-size:22px;font-weight:700;font-variant-numeric:tabular-nums}

footer{padding:16px 32px 40px;font-size:12px;color:var(--muted)}

/* ===== V1.1 渠道合计周转（第一层，置顶大卡）===== */
.ct-module{background:linear-gradient(180deg,#fff,var(--c-total-soft));border:2px solid var(--c-total);border-radius:18px;padding:22px 28px;margin:20px 0 0;box-shadow:0 8px 30px rgba(15,118,110,.12)}
.ct-module .ct-header{display:flex;align-items:center;gap:12px;margin-bottom:14px}
.ct-module .ct-title{font-size:20px;font-weight:800;display:flex;align-items:center;gap:8px;color:var(--ink)}
.ct-module .ct-target{margin-left:auto;font-size:12px;color:var(--muted);background:#fff;border:1px dashed var(--c-total);border-radius:20px;padding:4px 14px}
.ct-module .ct-body{display:flex;gap:32px;align-items:center}
.ct-module .ct-hero{flex:0 0 150px;text-align:center}
.ct-module .ct-months{font-size:46px;font-weight:800;line-height:1}
.ct-module .ct-months small{font-size:16px;font-weight:600;color:var(--muted)}
.ct-module .ct-months.green{color:var(--green)}
.ct-module .ct-months.amber{color:var(--amber)}
.ct-module .ct-months.red{color:var(--red)}
.ct-module .ct-months.purple{color:var(--purple)}
.ct-module .ct-hero-label{font-size:12px;color:var(--muted);margin-top:6px}
.ct-module .ct-grid{flex:1;display:grid;grid-template-columns:repeat(3,1fr);gap:14px 24px}
.ct-module .ct-item .k{font-size:11px;color:var(--muted);margin-bottom:2px}
.ct-module .ct-item .v{font-size:18px;font-weight:700}
.ct-module .ct-item .v small{font-size:11px;color:var(--muted);font-weight:400}
.ct-module .ct-item .v.warn{color:var(--red);cursor:pointer}
.ct-module .ct-item .v.amber{color:var(--amber);cursor:pointer}

/* 库存结构横向条 */
.struct-bar{display:flex;width:100%;height:14px;border-radius:7px;overflow:hidden;background:var(--line);margin:4px 0 6px}
.struct-bar .seg{height:100%;min-width:2px}
.struct-legend{display:flex;flex-wrap:wrap;gap:8px 14px;font-size:10px;color:var(--muted)}
.struct-legend i{display:inline-block;width:8px;height:8px;border-radius:2px;margin-right:3px}

/* ===== 渠道周转监控排行榜（第二层）===== */
.chan-board{background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:18px 24px;margin:20px 0 0;box-shadow:0 4px 20px rgba(31,42,55,.05)}
.chan-board .board-header{display:flex;align-items:center;gap:10px;margin-bottom:12px}
.chan-board .board-title{font-size:18px;font-weight:700;display:flex;align-items:center;gap:8px}
.chan-board .board-note{margin-left:auto;font-size:11px;color:var(--muted)}
.chan-board .board-table{width:100%;border-collapse:collapse}
.chan-board .board-table th{font-size:11px;color:var(--muted);font-weight:600;text-align:right;padding:8px 10px;border-bottom:1px solid var(--line);white-space:nowrap}
.chan-board .board-table th:first-child,.chan-board .board-table td:first-child{text-align:left}
.chan-board .board-table td{font-size:14px;padding:10px;border-bottom:1px solid var(--line-soft,#eef1f5);text-align:right;white-space:nowrap}
.chan-board .chan-board-row{cursor:pointer;transition:background .12s}
.chan-board .chan-board-row:hover{background:var(--c-total-soft)}

/* 月份数字 */
.mono{font-variant-numeric:tabular-nums}

/* 中央模块紧凑版（替代大圆圈） */
.central-module .cm-hero{flex:0 0 120px;text-align:center}
.central-module .cm-months{font-size:40px;font-weight:800;line-height:1;color:var(--c-central)}
.central-module .cm-months.warn{color:var(--red)}
.central-module .cm-months.amber{color:var(--amber)}
.central-module .cm-months.purple{color:var(--purple)}
.central-module .cm-months small{font-size:14px;font-weight:600;color:var(--muted)}
.central-module .cm-hero-label{font-size:12px;color:var(--muted);margin-top:6px}

/* 中央模块主题色（复用渠道合计卡布局，中央用深蓝） */
.ct-module.central{background:linear-gradient(180deg,#fff,var(--c-central-soft));border-color:var(--c-central);box-shadow:0 8px 30px rgba(30,58,95,.12)}
.ct-module.central .ct-months{color:var(--c-central)}

/* ===== 近12个月销售趋势 ===== */
.trend-module{background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:16px 24px;margin:16px 0 0;box-shadow:0 4px 20px rgba(31,42,55,.05)}
.trend-module .trend-header{display:flex;align-items:center;gap:12px;margin-bottom:12px}
.trend-module .trend-title{font-size:15px;font-weight:700;display:flex;align-items:center;gap:8px}
.trend-module .trend-sub{font-size:11px;color:var(--muted);font-weight:400}
.trend-module .trend-legend{margin-left:auto;font-size:11px;color:var(--muted);display:flex;gap:10px}
.trend-module .trend-lg i{display:inline-block;width:8px;height:8px;border-radius:2px;margin-right:3px}
.trend-module .trend-chart{display:flex;align-items:flex-end;gap:6px;height:140px;padding:4px 2px 0}
.trend-module .trend-col{flex:1;display:flex;flex-direction:column;align-items:center;height:100%;min-width:0}
.trend-module .trend-bar{display:flex;flex-direction:column;justify-content:flex-end;width:100%;height:118px;background:var(--paper);border-radius:4px;overflow:hidden;border:1px solid var(--line-soft,#eef1f5)}
.trend-module .trend-seg{width:100%;transition:opacity .15s}
.trend-module .trend-seg:hover{opacity:.8}
.trend-module .trend-lbl{font-size:10px;color:var(--muted);margin-top:4px;white-space:nowrap}
.trend-module .trend-cur{color:var(--amber);font-weight:700}

/* 中央库存表格版（同渠道周转监控样式，中央深蓝主题） */
.central-board{border-color:var(--c-central)}
.central-board .board-title{color:var(--c-central)}
.central-board .chan-board-row:hover{background:var(--c-central-soft)}
.central-struct-wrap{margin-top:12px;padding:0 4px}

/* ===== 渠道二级页 库存周转分布图 ===== */
.tr-chart-head{font-size:14px;font-weight:700;margin:6px 0 8px;display:flex;align-items:center;gap:8px}
.tr-chart-head .tr-sub{font-size:11px;color:var(--muted);font-weight:400}
.tr-chart{display:flex;flex-direction:column;gap:5px;margin-bottom:12px}
.tr-bucket{display:flex;align-items:center;gap:10px;padding:4px 8px;border-radius:6px;cursor:pointer;border:1px solid transparent;transition:background .12s}
.tr-bucket:hover{background:var(--paper)}
.tr-bucket.active{background:var(--c-total-soft);border-color:var(--c-total)}
.tr-label{flex:0 0 52px;font-size:12px;font-weight:700;text-align:right}
.tr-bar-wrap{flex:1;height:16px;background:var(--line-soft,#eef1f5);border-radius:4px;overflow:hidden}
.tr-bar{height:100%;border-radius:4px;min-width:2px;transition:width .2s}
.tr-num{flex:0 0 150px;font-size:11px;color:var(--muted);text-align:right;white-space:nowrap}
.filter-chip{display:inline-block;background:var(--c-total-soft);border:1px solid var(--c-total);color:var(--c-total);border-radius:16px;padding:4px 12px;font-size:12px;margin-bottom:8px}
.filter-chip .x{cursor:pointer;margin-left:6px;font-weight:700}

/* ===== 账号管理 ===== */
.acct-form-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px 18px}
.acct-form-grid .field{min-width:0}
.acct-form-grid label,.field label{font-size:11px;color:var(--muted);display:block;margin-bottom:3px}
.acct-form-grid input,.acct-form-grid select,.field input,.field select{width:100%;padding:7px 10px;border:1px solid var(--line);border-radius:8px;font-size:13px}
.chan-checks{display:flex;flex-wrap:wrap;gap:8px 16px}
.chan-check{font-size:12px;display:inline-flex;align-items:center;gap:4px;cursor:pointer}
