/* ══════════════════════════════════════════════════════════════════
   dbn_v2.css —— 物料需求统计表 · 料号分类按使用频率分层
   V1.2.190 · 2026-10-29 · 二哥定（202 / 107 使用频率最高）
   ──────────────────────────────────────────────────────────────────
   只改观感，不碰业务逻辑。加载顺序：页面内联 <style> → dbn_clean.css → 本文件。
   ▸ 回滚：删掉 index.html / daban.html <head> 里 href="/dbn_v2.css" 那一行，1 秒恢复。
   ──────────────────────────────────────────────────────────────────
   1) 分类独立成一行卡片（.dbnTabsBar），不再挤在工具栏里换行
   2) 高频分类 202 / 107 → .tab.hot：加宽 + 左侧橙条 + 大号等宽料号
   3) 卡片内重排：料号与条数同行，名称第二行（纯 grid，不改 DOM）
   4) 交叉表：非 0 数字加重加深、0 值更淡、料号等宽、表头最小列宽
   ══════════════════════════════════════════════════════════════════ */

/* ── ① 分类行容器 ─────────────────────────────────────────────── */
#dbnRoot .dbnTabsBar{
  padding:0 0 2px;margin-bottom:10px;border-bottom:none;background:transparent;
}
#dbnRoot .dbnTabsBar .tgroup{gap:8px;align-items:stretch;flex-wrap:nowrap}
#dbnRoot #dbn_tabs{
  gap:8px;align-items:stretch;flex-wrap:nowrap;width:100%;
  overflow-x:auto;overflow-y:hidden;padding:1px 1px 4px;scrollbar-width:thin;
}
#dbnRoot #dbn_tabs::-webkit-scrollbar{height:6px}
#dbnRoot #dbn_tabs::-webkit-scrollbar-thumb{background:#dfe3e8;border-radius:6px}

/* ── ② 卡片本体 ───────────────────────────────────────────────── */
#dbnRoot #dbn_tabs .tab{
  position:relative;box-sizing:border-box;
  flex:0 0 auto;width:118px;height:62px;min-width:0;
  display:grid;grid-template-columns:1fr auto;grid-template-rows:auto auto;
  align-items:center;column-gap:8px;row-gap:1px;
  padding:8px 11px;background:#fff;
  border:1px solid var(--dbn-line);border-radius:10px;
  line-height:1.2;transition:border-color .15s,background .15s,box-shadow .15s;
}
#dbnRoot #dbn_tabs .tab:hover{background:#fbfcfd;border-color:#cfd6de}
#dbnRoot #dbn_tabs .tab.on{
  background:var(--dbn-brand);border-color:var(--dbn-brand);
  box-shadow:0 2px 8px rgba(27,40,56,.16);
}
#dbnRoot #dbn_tabs .tab .t1{
  grid-column:1;grid-row:1;font-size:15px;font-weight:700;line-height:1.15;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
#dbnRoot #dbn_tabs .tab .t2{
  grid-column:1/3;grid-row:2;font-size:11px;line-height:1.25;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
#dbnRoot #dbn_tabs .tab .t3{
  grid-column:2;grid-row:1;justify-self:end;align-self:center;
  font-size:11px;line-height:1;white-space:nowrap;
}
#dbnRoot #dbn_tabs .tab.on .t1{color:#fff}
#dbnRoot #dbn_tabs .tab.on .t2{color:#dbe7fb}
#dbnRoot #dbn_tabs .tab.on .t3{color:#cfe0fa}

/* ── ③ 高频分类 202 / 107 ─────────────────────────────────────── */
#dbnRoot #dbn_tabs .tab.hot{width:154px;padding-left:16px;border-color:#dbe1e8}
#dbnRoot #dbn_tabs .tab.hot::before{
  content:'';position:absolute;left:-1px;top:-1px;bottom:-1px;width:4px;
  border-radius:10px 0 0 10px;background:#E8952B;
}
#dbnRoot #dbn_tabs .tab.hot .t1{
  font-size:19px;letter-spacing:.3px;
  font-family:ui-monospace,"SF Mono",Menlo,Consolas,monospace;
  color:#14171C;
}
/* 高频卡：条数挪到第二行右侧，右上角留给「常用」角标 */
#dbnRoot #dbn_tabs .tab.hot .t2{grid-column:1;grid-row:2;color:#5B6472;font-weight:500}
#dbnRoot #dbn_tabs .tab.hot .t3{grid-column:2;grid-row:2;color:#8D95A2;align-self:end}
#dbnRoot #dbn_tabs .tab.hot .tabCommon{
  position:absolute;top:6px;right:8px;margin:0;
  font-size:8.5px;line-height:1;padding:2px 4px;border-radius:4px;
  background:#FDF0DF;color:#B4761A;font-weight:600;
}
#dbnRoot #dbn_tabs .tab.hot.on{border-color:var(--dbn-brand)}
#dbnRoot #dbn_tabs .tab.hot.on::before{background:#F5C078}
#dbnRoot #dbn_tabs .tab.hot.on .t1{color:#fff}
#dbnRoot #dbn_tabs .tab.hot.on .t2{color:#dfe8f5;font-weight:400}
#dbnRoot #dbn_tabs .tab.hot.on .t3{color:#c3cfdd}
#dbnRoot #dbn_tabs .tab.hot.on .tabCommon{background:rgba(255,255,255,.22);color:#FFE3B4}

/* 非高频未选中：料号收敛一点，让 202 / 107 更跳 */
#dbnRoot #dbn_tabs .tab:not(.hot) .t1{font-size:14px;color:#5B6472;font-weight:600}
#dbnRoot #dbn_tabs .tab:not(.hot) .t2{color:#9AA1AE}
#dbnRoot #dbn_tabs .tab:not(.hot) .t3{color:#A8B0BC}
#dbnRoot #dbn_tabs .tab:not(.hot).on .t1{color:#fff}
#dbnRoot #dbn_tabs .tab:not(.hot).on .t2{color:#dbe7fb}
#dbnRoot #dbn_tabs .tab:not(.hot).on .t3{color:#cfe0fa}

/* ── ④ 交叉表可读性 ───────────────────────────────────────────── */
#dbnRoot td.cell{font-variant-numeric:tabular-nums}
#dbnRoot td.cell:not(.zero):not(.ex):not(.nsd){font-weight:600;color:#14171C}
#dbnRoot td.zero{color:#cdd3db;font-weight:400}
/* 料号等宽，不再竖排断字 */
#dbnRoot th .mcd,#dbnRoot td.lft .mcd{
  font-family:ui-monospace,"SF Mono",Menlo,Consolas,monospace;
  letter-spacing:-.1px;font-size:10px;
}
/* 表头最小列宽：列多了横向滚动，但不至于挤成一条 */
#dbnRoot #dbn_cross th{min-width:96px}
#dbnRoot #dbn_cross th.corner{min-width:176px}
#dbnRoot #dbn_cross th.sum{min-width:100px}
#dbnRoot #dbn_cross td.lft .wname{white-space:nowrap}

/* ── ⑤ 窄屏 ───────────────────────────────────────────────────── */
@media (max-width:900px){
  #dbnRoot #dbn_tabs .tab{width:100px;height:54px;padding:6px 9px}
  #dbnRoot #dbn_tabs .tab.hot{width:132px;padding-left:13px}
  #dbnRoot #dbn_tabs .tab .t1{font-size:13px}
  #dbnRoot #dbn_tabs .tab.hot .t1{font-size:16px}
  #dbnRoot #dbn_tabs .tab .t2{font-size:10px}
}
