/* ============================================================
   组价库平台 · 前端样式
   视觉基准：复刻原型 v0.2（GGJ 风格）
   蓝色顶栏 + 248px 左侧导航 + 工具栏 + 筛选栏 + 表格 + 状态栏
   ============================================================ */
:root{
  --blue:#2563eb;--blue-dk:#1d4ed8;--blue-lt:#eff6ff;
  --nav:#0f2f52;--nav2:#1a4a78;
  --yellow:#fbf0ce;--yellow-bd:#e2c56a;
  --bd:#e6ecf4;--bd-lt:#f1f5f9;
  --head1:#f8fafc;--head2:#f8fafc;
  --tx:#0f172a;--tx-2:#475569;--tx-3:#94a3b8;
  --bg:#f5f7fa;
  --ok:#16a34a;--warn:#d97706;--danger:#dc2626;
  --r:10px;--r-sm:8px;
  --sh-sm:0 1px 2px rgba(15,23,42,.05);
  --sh-md:0 4px 16px rgba(15,23,42,.08);
  --sh-lg:0 16px 48px rgba(15,23,42,.18);
}
*{box-sizing:border-box}
html,body{height:100%;margin:0}
body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
  font-size:13px;color:var(--tx);background:var(--bg);overflow:hidden;-webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility}
button,input,select,textarea{font:inherit;color:inherit}
a{color:var(--blue);text-decoration:none}
.hidden{display:none!important}
.ic{width:16px;height:16px;flex:none;color:currentColor}
.mono{font-family:"SF Mono",Consolas,"Courier New",monospace;font-size:12px;color:#475569}
.mute{color:var(--tx-3)}
.ell{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block}
/* 单元格内截断：必须保持 table-cell，否则 td 脱离表格布局导致列宽错乱 */
.cell-ell{max-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* ================= 登录 ================= */
#login{position:fixed;inset:0;z-index:300;display:flex;align-items:center;
  background:#0b1f38 url('/login-bg.png') center/cover no-repeat}
#login::before{content:"";position:absolute;inset:0;
  background:linear-gradient(100deg,rgba(7,20,37,.96) 0%,rgba(9,26,46,.88) 40%,rgba(10,28,50,.5) 100%)}
.login-card{position:relative;margin-left:8vw;width:404px;background:#fff;border-radius:18px;
  overflow:hidden;box-shadow:0 28px 80px rgba(0,0,0,.45)}
.login-hd{padding:36px 36px 20px}
.login-hd .mark{width:44px;height:44px;border-radius:12px;margin-bottom:20px;
  background:linear-gradient(135deg,#3b82f6,#1d4ed8);display:flex;align-items:center;justify-content:center;
  box-shadow:0 8px 20px rgba(37,99,235,.35)}
.login-hd .mark svg{width:24px;height:24px}
.login-hd b{display:block;font-size:21px;font-weight:700;color:#0f172a;letter-spacing:.2px}
.login-hd i{display:block;font-size:12px;font-style:normal;color:#94a3b8;margin-top:8px;letter-spacing:2.4px}
.login-bd{padding:6px 36px 36px}
.login-field{margin-bottom:18px}
.login-field label{display:block;font-size:12.5px;color:#64748b;margin-bottom:8px;font-weight:500}
.login-field input{width:100%;height:44px;border:1px solid #dbe3ec;border-radius:10px;padding:0 14px;
  font:inherit;font-size:14px;outline:none;background:#fbfcfe;transition:all .14s;color:#0f172a}
.login-field input:focus{border-color:#93b4f7;background:#fff;box-shadow:0 0 0 3px rgba(37,99,235,.12)}
.login-btn{width:100%;height:46px;margin-top:10px;border:0;border-radius:10px;
  background:#2563eb;color:#fff;font:inherit;font-size:14.5px;font-weight:600;letter-spacing:4px;
  cursor:pointer;transition:all .16s;box-shadow:0 6px 18px rgba(37,99,235,.34)}
.login-btn:hover{background:#1d4ed8;box-shadow:0 8px 24px rgba(37,99,235,.42)}
.login-tip{margin-top:20px;font-size:12px;color:#94a3b8;line-height:1.9;text-align:center}
.err{color:var(--danger);font-size:12.5px;min-height:18px;margin:6px 0 2px}
.pw-tip{font-size:11.5px;color:#8a97a6;line-height:1.8}
.pw-tip span{display:inline-block;margin-right:14px}
.pw-tip span.ok{color:#1D9E75}

/* ================= 主框架 ================= */
.app{display:flex;flex-direction:column;height:100vh}
.app-header{height:58px;flex:none;display:flex;align-items:center;gap:14px;padding:0 20px;
  background:linear-gradient(120deg,#0f2f52,#1a4a78 55%,#1d5589);color:#fff;
  border-bottom:1px solid rgba(255,255,255,.06);position:relative;z-index:20}
.logo{width:34px;height:34px;border-radius:9px;flex:none;
  background:linear-gradient(135deg,#3b82f6,#1d4ed8);
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 4px 12px rgba(37,99,235,.35),inset 0 1px 0 rgba(255,255,255,.25)}
.logo svg{width:19px;height:19px}
.brand b{display:block;font-size:15px;font-weight:600;letter-spacing:.3px;line-height:1.2}
.brand i{display:block;font-size:10.5px;font-style:normal;color:rgba(255,255,255,.5);
  letter-spacing:2.4px;margin-top:3px}
.hdr-right{margin-left:auto;display:flex;align-items:center;gap:16px;font-size:12.5px;color:rgba(255,255,255,.72)}
.hdr-right .env{display:inline-flex;align-items:center;gap:7px;padding:5px 11px;border-radius:20px;
  background:rgba(255,255,255,.09);border:1px solid rgba(255,255,255,.13);font-size:11.5px}
.hdr-right .env::before{content:"";width:6px;height:6px;border-radius:50%;background:#34d399;
  box-shadow:0 0 0 3px rgba(52,211,153,.18)}
.hdr-right .u{display:flex;align-items:center;gap:8px;color:#fff;font-size:12.5px}
.avatar{width:28px;height:28px;border-radius:50%;background:linear-gradient(135deg,#fbbf24,#f59e0b);
  color:#78350f;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:600;
  box-shadow:0 2px 6px rgba(0,0,0,.16)}
.hdr-right .sep{width:1px;height:18px;background:rgba(255,255,255,.14)}
.hdr-right .quit{cursor:pointer;padding:5px 9px;border-radius:6px;background:none;border:0;
  color:rgba(255,255,255,.72);font-size:12.5px}
.hdr-right .quit:hover{background:rgba(255,255,255,.1);color:#fff}

.main{display:flex;flex:1;min-height:0;background:var(--bg)}
/* 侧栏：三段竖排 —— 折叠按钮 / 可滚动的菜单区 / 固定在最底部的版本号
   ★ 原来是 overflow:auto + .tree-foot{position:absolute;bottom:14px}。
   菜单项一多，滚动时版本号会浮在菜单上面压住文字（用户反馈"重叠"）。
   现在用 flex 列布局把版本号挤到底部独立一行，菜单区自己滚，永远不会压到。 */
.tree{width:248px;flex:none;background:#fff;border-right:1px solid var(--bd);
  padding:10px 12px 0;position:relative;
  display:flex;flex-direction:column;min-height:0}
.tree-scroll{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;padding-bottom:8px}
.tree-scroll::-webkit-scrollbar{width:8px}
.tree-scroll::-webkit-scrollbar-thumb{background:#dbe3ec;border-radius:4px;border:2px solid #fff}
.tree-scroll::-webkit-scrollbar-track{background:transparent}
/* 分组标题：整行可点（点击折叠/展开），右侧一个 caret */
.tree-title{padding:14px 6px 6px;margin:0;width:100%;border:0;background:transparent;
  font-size:11px;font-weight:600;color:#94a3b8;letter-spacing:1.2px;
  display:flex;align-items:center;justify-content:space-between;min-height:28px;
  cursor:pointer;border-radius:6px;transition:color .14s,background .14s;text-align:left}
.tree-title:hover{color:#64748b;background:#f8fafc}
.tree-title .tw-caret{font-style:normal;font-size:10px;color:#cbd5e1;
  transition:transform .14s;line-height:1}
.tree-title:hover .tw-caret{color:#94a3b8}
/* 第一个分组标题要给右上角折叠按钮让位 */
.tree-grp:first-of-type > .tree-title{padding-top:34px}
/* 收起的分组：隐藏子项，caret 指向右 */
.tree-grp.fold > .tree-items{display:none}
.tree-item{display:flex;align-items:center;gap:12px;width:100%;text-align:left;
  padding:0 12px;height:42px;margin-bottom:2px;border:0;border-radius:10px;background:transparent;
  font:inherit;font-size:13.5px;color:#334155;cursor:pointer;
  transition:background .14s,color .14s}
.tree-item .ic{width:18px;height:18px;color:#64748b;transition:color .14s}
.tree-item:hover{background:#f1f5f9;color:#0f172a}
.tree-item:hover .ic{color:#334155}
.tree-item.active{background:#eff6ff;color:#1d4ed8;font-weight:600}
.tree-item.active .ic{color:#2563eb}
/* 版本号：固定在菜单区下方，不参与滚动、不压菜单 */
.tree-foot{flex:none;padding:9px 10px;margin-top:0;border-top:1px solid #eef2f7;
  font-size:11px;color:#cbd5e1;letter-spacing:.3px;white-space:nowrap}

/* 侧栏折叠：折叠后只留图标，文字隐藏；hover 用 title 提示 */
.tree-toggle{position:absolute;top:12px;right:10px;width:24px;height:24px;flex:none;
  border:1px solid var(--bd);background:#fff;border-radius:6px;cursor:pointer;
  color:#94a3b8;font-size:9px;display:flex;align-items:center;justify-content:center;
  transition:all .14s;z-index:2}
.tree-toggle:hover{background:#f1f5f9;color:#2563eb;border-color:#93b4f7}
.tree-toggle .tw2{line-height:1}
.tree{transition:width .16s ease}
.tree.collapsed{width:64px;padding-left:8px;padding-right:8px}
.tree.collapsed .tree-scroll{overflow-x:hidden}
.tree.collapsed .tree-toggle{right:50%;transform:translateX(50%);top:8px;width:28px;height:28px}
/* 整体收起（只剩图标）时：分组标题变成一条细分隔线，caret 与文字都藏掉；
   此时分组折叠无意义，JS 里已经强制平铺。 */
.tree.collapsed .tree-title{padding:0;min-height:0;text-align:center;overflow:hidden;
  display:block;height:0;border-top:1px solid #eef2f7;margin:10px 8px 8px;cursor:default}
.tree.collapsed .tree-grp:first-of-type > .tree-title{margin-top:42px;border-top:0;height:auto;padding-bottom:2px}
.tree.collapsed .tree-title span,
.tree.collapsed .tree-title .tw-caret{display:none}
.tree.collapsed .tree-grp.fold > .tree-items{display:block}
.tree.collapsed .tree-item{justify-content:center;align-items:center;padding:0;gap:0;
  height:44px;width:100%;margin-bottom:4px}
.tree.collapsed .tree-item .ti-label{display:none}
.tree.collapsed .tree-item .ic{width:19px;height:19px}
.tree.collapsed .tree-foot{padding:9px 0;text-align:center}
.tree.collapsed .tree-foot span{display:none}
.tree.collapsed .tree-foot::after{content:"v1.0";font-size:10px;color:#e2e8f0}
/* 折叠态补一个顶部空位，避免第一个分组标题贴住按钮 */
.tree.collapsed .tree-scroll{scrollbar-width:none}
.tree.collapsed .tree-scroll::-webkit-scrollbar{width:0}

.content{flex:1;display:flex;flex-direction:column;min-width:0;background:#fff}

/* ================= 工具栏 ================= */
.toolbar{flex:none;display:flex;flex-wrap:wrap;align-items:center;padding:6px 14px;gap:2px;
  background:#fff;border-bottom:1px solid var(--bd)}
.tgroup{display:flex;align-items:center;gap:4px;padding:0 10px}
.tgroup:first-child{padding-left:0}
.tgroup:not(:last-child){border-right:1px solid #edf1f6;margin-right:6px}
.tbtn{display:flex;align-items:center;gap:7px;height:32px;padding:0 11px;border-radius:8px;
  border:1px solid transparent;background:transparent;font:inherit;font-size:13px;color:#334155;
  cursor:pointer;white-space:nowrap;transition:background .14s,color .14s,border-color .14s}
.tbtn .ic{width:15px;height:15px;color:#64748b;transition:color .14s}
.tbtn:hover{background:#f1f5f9;color:#0f172a}
.tbtn:hover .ic{color:#334155}
.tbtn:active{background:#e2e8f0}
.tbtn.pri{background:#2563eb;border-color:#2563eb;color:#fff;box-shadow:0 1px 2px rgba(37,99,235,.25)}
.tbtn.pri .ic{color:#fff}
.tbtn.pri:hover{background:#1d4ed8;border-color:#1d4ed8;color:#fff}
.tbtn:disabled,.tbtn.dis{opacity:.45;cursor:not-allowed}
.tspacer{margin-left:auto;display:flex;align-items:center;gap:8px}

/* ================= 筛选栏 ================= */
.filter-bar{flex:none;display:flex;flex-wrap:wrap;align-items:center;gap:6px 9px;
  padding:7px 14px;background:#fbfcfe;border-bottom:1px solid var(--bd)}
.fb{display:flex;align-items:center;align-content:center;gap:6px;height:30px;min-height:30px}
.fb label{font-size:12.5px;color:#64748b;white-space:nowrap}
.fb select,.fb input{height:30px;border:1px solid #dbe3ec;border-radius:7px;padding:0 9px;
  font:inherit;font-size:13px;background:#fff;color:var(--tx);outline:none;
  transition:border-color .14s,box-shadow .14s}
.fb select:hover,.fb input:hover{border-color:#c8d2de}
.fb select:focus,.fb input:focus{border-color:#93b4f7;box-shadow:0 0 0 3px rgba(37,99,235,.12)}
.fb select{min-width:84px;cursor:pointer}
.fb input[type=date]{width:124px;color:#475569}
.fb .tilde{color:#cbd5e1;font-size:12px}
.fb .sbox{display:flex;align-items:center;background:#fff;border:1px solid #dbe3ec;
  border-radius:7px;height:30px;padding-left:8px;transition:border-color .14s,box-shadow .14s}
.fb .sbox:focus-within{border-color:#93b4f7;box-shadow:0 0 0 3px rgba(37,99,235,.12)}
.fb .sbox .ic{color:#94a3b8}
.fb .sbox input{border:0;height:28px;width:150px;background:transparent}
.fb .sbox input:focus{box-shadow:none}
.fdiv{width:1px;height:18px;background:#edf1f6;margin:0 1px}
.fbtn{height:30px;padding:0 14px;border:1px solid #dbe3ec;border-radius:7px;background:#fff;
  font:inherit;font-size:13px;color:#334155;cursor:pointer;transition:all .14s}
.fbtn:hover{background:#f8fafc;border-color:#c8d2de}
.fbtn.pri{background:#2563eb;border-color:#2563eb;color:#fff;box-shadow:0 1px 2px rgba(37,99,235,.25)}
.fbtn.pri:hover{background:#1d4ed8;border-color:#1d4ed8}

/* ================= 表格 ================= */
.viewport{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden;background:#fff}
.grid-wrap{flex:1;overflow:auto;min-height:0;background:#fff}

/* ---------- 迁移页专用容器（销售订单 / 广告 / 补丁 / 操作日志 等）----------
   这些页面是对着老 CRM 的 Element Plus 页面复刻的，布局是
   「筛选区卡片 + 表格区卡片 + 分页」三段竖排。

   ★ 为什么必须单独定义 tbl-wrap：
   之前新页面里写了 class="tbl-wrap"，但样式表里从来没有这个类 ——
   于是这个 div 就是一个普通块级元素：既没有 flex:1 撑满剩余高度，
   也没有 overflow:auto。结果：
     · table 有多高它就多高，超出 .viewport（overflow:hidden）的部分被直接裁掉
     · 容器自身不滚动 → 鼠标滚轮滚不动，右侧纵向滚动条也不出现
   .grid-wrap 本来就有 flex:1 + overflow:auto，但它的直接子元素必须是
   table；这几个页面外面还套了一层卡片边框，所以独立一份。 */
.tbl-wrap{
  flex:1;min-height:0;overflow:auto;background:#fff;
  display:flex;flex-direction:column;
  /* 滚到底/滚到顶时不要把手势传给外层，否则整页会跟着弹 */
  overscroll-behavior:contain;
}
/* 卡片内边距版本：与老 CRM 的 .table-container{padding:20px} 对齐，
   但表格的 sticky 表头要贴住卡片顶部，所以 padding 放在内层而不用外层留白 */
.tbl-wrap.card{padding:0 0 0 0}
/* 组价库列表：固定布局，列宽只认表头上的 width。
   不设 fixed 时表格按内容自动分配列宽，清单名称（特征串很长）会把名称列
   撑到极宽，把 单位 / 专业 / 地区 这些窄列一路挤到视区右侧外面，
   用户必须先横向滚动才能看到 —— 看起来就像"列被推到最右边去了"。
   fixed 之后超出宽度的内容按 ellipsis 截断，列宽恒定。 */
table.grid.lib-tbl{table-layout:fixed;min-width:1020px}
table.grid.lib-tbl tbody td{overflow:hidden;text-overflow:ellipsis}
/* 名称列可被截断，但保留完整内容的 title 提示（见 app.js 里的 title 属性） */
table.grid.lib-tbl tbody td.ln{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

table.grid{border-collapse:separate;border-spacing:0;width:100%;font-size:13px}
table.grid thead th{position:sticky;top:0;z-index:3;background:#f8fafc;
  border-bottom:1px solid var(--bd);border-right:0;padding:11px 12px;text-align:left;
  font-weight:600;font-size:12.5px;color:#64748b;white-space:nowrap;letter-spacing:.2px}
table.grid thead th:first-child{padding-left:16px}
table.grid tbody td{border-bottom:1px solid #f1f5f9;border-right:0;padding:10px 12px;
  white-space:nowrap;vertical-align:middle;color:#334155}
table.grid tbody td:first-child{padding-left:16px}
table.grid tbody tr:nth-child(even){background:#fcfdfe}
table.grid tbody tr:hover{background:#f8fafc}
table.grid tbody tr.sel{background:#eff6ff}
table.grid tbody tr.sel td{border-bottom-color:#dbeafe}
table.grid th:last-child{position:sticky;right:0;top:0;z-index:5;background:#f8fafc;
  box-shadow:-8px 0 12px -8px rgba(15,23,42,.12)}
table.grid td:last-child{position:sticky;right:0;z-index:1;background:#fff;
  box-shadow:-8px 0 12px -8px rgba(15,23,42,.07)}
table.grid tbody tr:nth-child(even) td:last-child{background:#fcfdfe}
table.grid tbody tr:hover td:last-child{background:#f8fafc}
table.grid tbody tr.sel td:last-child{background:#eff6ff}
td.num,th.num{text-align:right;font-variant-numeric:tabular-nums}
td.r{text-align:right;font-variant-numeric:tabular-nums}
td.name{max-width:280px;overflow:hidden;text-overflow:ellipsis;color:#0f172a;font-weight:500}
.lnk{color:#2563eb;cursor:pointer;text-decoration:none;transition:color .12s}
.lnk:hover{color:#1d4ed8;text-decoration:underline}
.lnk.danger{color:#dc2626}
.lnk.danger:hover{color:#b91c1c}
.lnk + .lnk{margin-left:12px}
.empty{padding:48px 20px;text-align:center;color:#94a3b8;font-size:13px;white-space:normal}

.badge{display:inline-flex;align-items:center;padding:2px 9px;border-radius:6px;font-size:11.5px;
  line-height:18px;border:1px solid;white-space:nowrap;font-weight:500}
.b-ok{background:#f0fdf4;border-color:#bbf7d0;color:#15803d}
.b-run{background:#eff6ff;border-color:#bfdbfe;color:#1d4ed8}
.b-err{background:#fef2f2;border-color:#fecaca;color:#b91c1c}
.b-wait{background:#f8fafc;border-color:#e2e8f0;color:#64748b}
.b-price{background:#fffbeb;border-color:#fde68a;color:#b45309}
.b-purple{background:#f5f3ff;border-color:#ddd6fe;color:#6d28d9}

/* ================= 状态栏 / 分页 ================= */
.statusbar{flex:none;height:40px;display:flex;align-items:center;justify-content:space-between;
  gap:16px;padding:0 16px;background:#fff;border-top:1px solid var(--bd);font-size:12px;color:#64748b}
.statusbar > div:first-child{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pager{display:flex;align-items:center;gap:6px;flex:none}
.pg{display:inline-block;min-width:28px;height:26px;line-height:24px;padding:0 9px;
  border:1px solid #e2e8f0;background:#fff;border-radius:7px;font-size:12px;
  color:#475569;cursor:pointer;white-space:nowrap;flex:none;text-align:center;
  transition:all .12s;user-select:none}
.pg:hover{border-color:#93b4f7;color:#2563eb;background:#f8fbff}
.pg.cur{background:#2563eb;border-color:#2563eb;color:#fff;font-weight:600}
.pg.dis{opacity:.45;cursor:not-allowed;border-color:#eef2f7;color:#cbd5e1;background:#fcfdfe}
.pg.dis:hover{border-color:#eef2f7;color:#cbd5e1;background:#fcfdfe}
.pgbar{display:flex;align-items:center;gap:10px}
.psel{height:26px;border:1px solid #e2e8f0;background:#fff;border-radius:7px;
  font:inherit;font-size:12px;color:#475569;padding:0 6px;outline:none;cursor:pointer}
.psel:hover{border-color:#93b4f7}
.psel:focus{border-color:#2563eb;box-shadow:0 0 0 2px #dbeafe}
.psel-lb{font-size:11.5px;color:#94a3b8;margin-left:-4px}

/* ================= 定额组成表（左栏）================= */
.q-tbl{table-layout:fixed}
.q-tbl th,.q-tbl td{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.q-tbl td.qname{max-width:0}
.q-tbl td.qfee{color:#64748b;font-size:12px}
/* 名称后的人材机项数徽标 */
.q-tbl .qrc{display:inline-block;margin-left:6px;padding:0 5px;border-radius:4px;
  font-size:10.5px;line-height:15px;font-weight:400;background:#eff6ff;
  border:1px solid #dbeafe;color:#3b82f6;vertical-align:1px}

/* ================= 人材机表（右栏）================= */
.r-tbl{table-layout:fixed}
.r-tbl th,.r-tbl td{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.r-tbl td.rname{max-width:0}
/* 可分解机械：父行可点，展开箭头 */
.r-tbl tr.rgrp{cursor:pointer}
.r-tbl tr.rgrp:hover td{background:#f8fbff}
.r-tbl tr.rgrp .rname{color:#0f172a}
.r-tbl .rtw{display:inline-flex;width:14px;justify-content:center;color:#94a3b8;
  font-size:9px;margin-right:6px;transition:transform .14s;vertical-align:-1px}
.r-tbl .rtw.open{transform:rotate(90deg)}
.r-tbl .rsub-tag{display:inline-block;margin-left:6px;padding:0 5px;border-radius:4px;
  font-size:10.5px;line-height:15px;background:#f1f5f9;border:1px solid #e2e8f0;color:#94a3b8}
/* 类别列不参与截断，避免“机械”显示成“机械…” */
.r-tbl th:first-child,.r-tbl td:first-child{overflow:visible}
/* 子行：浅底 + 左侧缩进线 */
.r-tbl tr.sub-r td{background:#fafcff;color:#64748b;font-size:11.5px}
.r-tbl tr.sub-r td{padding-top:6px;padding-bottom:6px}
.r-tbl tr.sub-r td.rname{padding-left:26px;position:relative}
.r-tbl tr.sub-r td.rname::before{content:"";position:absolute;left:13px;top:0;bottom:0;
  width:1px;background:#e6ecf4}

/* ================= 组价库：五层树 + 右栏 ================= */
.pricing-view{display:flex;flex-direction:column;flex:1;min-height:0}
tr.lv1{cursor:pointer}
tr.lv1.exp{background:#eff6ff}
tr.lv1.exp td{border-bottom-color:#dbeafe}
table.grid tbody tr.exp td:last-child{background:#eff6ff}
table.grid tbody tr.exp:hover td:last-child{background:#e8f1ff}
.tw{display:inline-flex;width:16px;height:16px;align-items:center;justify-content:center;
  color:#94a3b8;font-size:9px;flex:none;transition:transform .14s}
.tw.open{transform:rotate(90deg)}
tr.subrow > td{padding:0 !important;background:#fcfdff;border-bottom:1px solid #e8eef7}
.tree-box{padding:6px 14px 10px 24px}
.feat{margin:2px 0}
.feat-hd{display:flex;align-items:center;gap:8px;padding:7px 10px;border-radius:8px;cursor:pointer;
  font-size:13px;color:#334155;background:#f8fafc;transition:background .14s}
.feat-hd:hover{background:#f1f5f9}
.feat-txt{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.scheme{display:flex;align-items:center;gap:10px;padding:6px 10px 6px 30px;border-radius:8px;
  cursor:pointer;font-size:12.5px;color:#334155;transition:background .14s}
.scheme:hover{background:#f8fafc}
.scheme.on{background:#eff6ff;color:#1d4ed8}
.scheme.on .pj{color:#3b82f6}
.scheme .pj{max-width:320px;overflow:hidden;text-overflow:ellipsis;color:#64748b}
.scheme .idx{color:#94a3b8;font-size:11.5px;width:52px;flex:0 0 auto}
.scheme .price{width:88px;flex:0 0 auto;text-align:right;font-variant-numeric:tabular-nums;color:#183b5c}
.scheme .yr{width:80px;flex:0 0 auto;text-align:right;font-size:11.5px}
.scheme .sdel{opacity:0;transition:.15s;flex:0 0 auto}
.scheme:hover .sdel{opacity:1}
.tag{display:inline-block;padding:1px 8px;border-radius:6px;font-size:11px;line-height:17px;
  background:#f1f5f9;border:1px solid #e2e8f0;color:#64748b}
.tag.src{cursor:pointer;background:#fff;white-space:nowrap}
.tag.src:hover{background:#eff6ff;border-color:#93b4f7;color:#2563eb}
.tag.src.multi{background:#eff6ff;border-color:#bfdbfe;color:#2563eb}
.tag.main{background:#f0fdf4;border-color:#bbf7d0;color:#15803d}
.mini{font-size:11.5px;color:#94a3b8;text-decoration:none;cursor:pointer;transition:color .12s}
.mini:hover{color:#2563eb;text-decoration:underline}
.mini.danger:hover{color:#dc2626}

.split{flex:none;height:232px;display:flex;border-top:1px solid var(--bd);background:#fff}
.split.empty-split{align-items:center;justify-content:center}
.split-l{flex:1.45;min-width:0;display:flex;flex-direction:column;border-right:1px solid var(--bd)}
.split-r{flex:1;min-width:0;display:flex;flex-direction:column}
.pane-hd{flex:none;height:38px;display:flex;align-items:center;gap:8px;padding:0 14px;
  background:#fff;border-bottom:1px solid var(--bd);font-size:13px;color:#0f172a;font-weight:600}
.pane-hd .sub{font-weight:400;color:#94a3b8;font-size:11.5px;margin-left:auto;
  max-width:64%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pane-bd{flex:1;overflow:auto}
.pane-bd table{width:100%;border-collapse:collapse;font-size:12.5px}
.pane-bd th{background:#f8fafc;border-bottom:1px solid var(--bd);padding:8px 12px;text-align:left;
  font-weight:600;color:#64748b;font-size:12px;white-space:nowrap;position:sticky;top:0;z-index:1}
.pane-bd td{border-bottom:1px solid #f1f5f9;padding:8px 12px;white-space:nowrap;color:#334155}
.pane-bd tbody tr:hover td{background:#f8fafc}
.pane-bd tbody tr.on td{background:#eff6ff}
.pane-bd tbody tr.q{cursor:pointer}
.pane-ft{flex:none;height:38px;display:flex;align-items:center;justify-content:flex-end;gap:10px;
  padding:0 14px;border-top:1px solid var(--bd);background:#fafbfc;font-size:12px;color:#64748b}
.pane-ft b{color:#183b5c;font-size:13px}

/* ================= 弹窗 ================= */
.mask{position:fixed;inset:0;background:rgba(15,23,42,.45);z-index:80;display:flex;
  align-items:center;justify-content:center;padding:28px}
.dialog{background:#fff;border:1px solid rgba(226,232,240,.9);border-radius:14px;overflow:hidden;
  box-shadow:var(--sh-lg);display:flex;flex-direction:column;max-height:88vh;width:560px;max-width:100%}
.dialog.wide{width:900px}
.dialog-hd{height:56px;flex:none;display:flex;align-items:center;justify-content:space-between;
  padding:0 20px;background:#fff;color:#0f172a;font-size:15px;font-weight:600;
  border-bottom:1px solid var(--bd)}
.dialog-hd .x{width:30px;height:30px;border:0;background:transparent;color:#94a3b8;cursor:pointer;
  font-size:19px;line-height:1;border-radius:8px;display:flex;align-items:center;justify-content:center}
.dialog-hd .x:hover{background:#f1f5f9;color:#475569}
.dialog-bd{padding:18px 20px;overflow:auto;overscroll-behavior:contain}
.dialog-bd.nopad{padding:0}
.dialog-ft{flex:none;display:flex;justify-content:flex-end;gap:10px;padding:14px 20px;
  border-top:1px solid var(--bd);background:#fafbfc}
.btn{height:36px;padding:0 18px;border-radius:9px;border:1px solid #dbe3ec;background:#fff;
  font:inherit;font-size:13px;color:#334155;cursor:pointer;transition:all .14s;
  display:inline-flex;align-items:center;justify-content:center}
.btn:hover{background:#f8fafc;border-color:#c8d2de}
.btn.primary{background:#2563eb;border-color:#2563eb;color:#fff;box-shadow:0 1px 2px rgba(37,99,235,.25)}
.btn.primary:hover{background:#1d4ed8;border-color:#1d4ed8}
.btn.danger{background:#fff;border-color:#fecaca;color:#dc2626}
.btn.danger:hover{background:#fef2f2;border-color:#fca5a5}
.btn:disabled{opacity:.5;cursor:not-allowed}

.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px 18px}
/* 12 栏栅格：同一行里放 3 / 4 个字段时用，按 span 分宽度。
   为什么不用若干套固定列数的 class：标讯表单一行里混着 3等分、1:2、4等分，
   一套 12 栏能全覆盖，增减字段只改 span，不用重排列数。 */
.form-grid.g12{grid-template-columns:repeat(12,minmax(0,1fr));gap:14px 16px}
.g12 > .c2{grid-column:span 2}
.g12 > .c3{grid-column:span 3}
.g12 > .c4{grid-column:span 4}
.g12 > .c6{grid-column:span 6}
.g12 > .c8{grid-column:span 8}
.g12 > .c12{grid-column:span 12}
/* 复选框字段：包一层和输入框同高同边的盒子，勾选框落在里面 —
   这样它和同一行的下拉/输入框基线一致，不会浮在半空中 */
.chk{display:flex;align-items:center;gap:8px;height:38px;padding:0 11px;cursor:pointer;
  border:1px solid #dbe3ec;border-radius:9px;background:#fff;
  font-size:13px;color:#334155;transition:border-color .14s,box-shadow .14s}
.chk:hover{border-color:#c8d2de}
.chk:has(input:checked){border-color:#93b4f7;background:#f5f9ff;color:#1d4ed8}
.chk input[type=checkbox]{width:15px;height:15px;margin:0;accent-color:#2563eb;cursor:pointer;flex:none}
.chk:has(input:disabled){background:#f8fafc;color:#94a3b8;cursor:not-allowed}
.field{display:flex;flex-direction:column;gap:7px}
.field.full{grid-column:1/-1}
.field label{font-size:12.5px;color:#64748b;font-weight:500}
.field label em{color:#ef4444;font-style:normal;margin-right:2px}
.field input,.field select,.field textarea{height:38px;border:1px solid #dbe3ec;border-radius:9px;
  padding:0 11px;font:inherit;font-size:13px;background:#fff;color:var(--tx);outline:none;width:100%;
  transition:border-color .14s,box-shadow .14s}
.field textarea{height:auto;padding:9px 11px;resize:vertical;min-height:64px;line-height:1.6}
.field input:focus,.field select:focus,.field textarea:focus{
  border-color:#93b4f7;box-shadow:0 0 0 3px rgba(37,99,235,.12)}
.field input[readonly]{background:#f8fafc;color:#64748b}
/* 禁用态要一眼看出来：单次价格在「年费」下是禁用的，不能让人以为还能填 */
.field input:disabled,.field select:disabled{background:#f8fafc;color:#94a3b8;cursor:not-allowed}
.hint{font-size:11.5px;color:#94a3b8;line-height:1.6;margin-top:2px}
.sec-title{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:600;color:#0f172a;
  margin:20px 0 12px}
.sec-title::before{content:"";width:3px;height:14px;border-radius:2px;background:#2563eb}
.sec-title:first-child{margin-top:0}
.dialog.wide .form-grid{gap:12px 18px}
.dialog.wide .field{gap:6px}
.dialog.wide .field label{font-size:12.5px}
.dialog.wide .field input,.dialog.wide .field select{height:34px;font-size:13px}
.dialog.wide .field textarea{padding:8px 11px;min-height:56px}
.dialog.wide .sec-title{margin:16px 0 10px}
/* 弹窗高度受限时，表单区独立滚动，标题与按钮固定 */
.dialog-bd{min-height:0}

/* ================= 模板维护 ================= */
/* 顶部：省份 / 地级市 / 专业 三个筛选 + 两个按钮 */
.tpl-bar{display:flex;align-items:flex-end;gap:14px;flex-wrap:wrap;margin-bottom:14px}
.tpl-bar .field{min-width:150px;flex:none}
.tpl-bar .field select{height:34px;border:1px solid #dbe3ec;border-radius:9px;padding:0 11px;
  font:inherit;font-size:13px;background:#fff;color:var(--tx);outline:none}
.tpl-bar .field select:focus{border-color:#93b4f7;box-shadow:0 0 0 3px rgba(37,99,235,.12)}
.tpl-btns{margin-left:auto;display:flex;gap:10px}
.tpl-btns .btn{height:34px;padding:0 16px}
/* 表格：固定表头，行内输入框无边（聚焦时才显边），保证行高整齐 */
.tpl-wrap{max-height:46vh;overflow:auto;border:1px solid var(--bd);border-radius:10px}
table.grid.tpl-grid{min-width:auto}
table.grid.tpl-grid thead th:last-child,table.grid.tpl-grid tbody td:last-child{position:static;box-shadow:none}
.tin{width:100%;height:32px;border:1px solid transparent;border-radius:7px;padding:0 8px;
  font:inherit;font-size:13px;color:var(--tx);background:transparent;outline:none;transition:.14s}
.tin:hover{border-color:#e2e8f0;background:#fff}
.tin:focus{border-color:#93b4f7;background:#fff;box-shadow:0 0 0 3px rgba(37,99,235,.12)}
.tin.mono{font-family:ui-monospace,Consolas,monospace;letter-spacing:.4px}
/* 列表里模板名做成浅色标签，跟普通文本列区分开 */
.tpl-tag{display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;
  vertical-align:middle;padding:2px 8px;border-radius:6px;background:#eff6ff;
  border:1px solid #dbeafe;color:#1d4ed8;font-size:12px}

.kv{display:grid;grid-template-columns:118px 1fr;gap:10px 14px;font-size:13px}
.kv .k{color:#94a3b8}
.detail-box{background:#f8fafc;border:1px solid var(--bd-lt);border-radius:9px;padding:12px;
  font:12px/1.7 ui-monospace,Consolas,monospace;overflow:auto;max-height:280px;
  white-space:pre-wrap;word-break:break-all;color:#475569}
.code-box{background:#0f172a;color:#e2e8f0;border-radius:9px;padding:12px 14px;
  font:12px/1.65 ui-monospace,Consolas,monospace;max-height:280px;overflow:auto;
  white-space:pre-wrap;word-break:break-all}
.code-box::-webkit-scrollbar{width:8px;height:8px}
.code-box::-webkit-scrollbar-thumb{background:#334155;border-radius:4px}

/* ================= 上传 ================= */
.dropzone{border:1.5px dashed #dbe3ec;border-radius:12px;background:#fbfcfe;padding:28px 20px;
  text-align:center;color:#64748b;cursor:pointer;transition:all .16s}
.dropzone:hover{border-color:#93b4f7;background:#f8fbff}
.dropzone.hover{border-color:#2563eb;background:#eff6ff;border-style:solid}
.dropzone .big{font-size:14px;color:#0f172a;margin-bottom:6px;font-weight:600}
.dropzone .ic{width:28px;height:28px;color:#94a3b8;margin-bottom:8px}
.uplist{display:none;margin-top:12px;border:1px solid var(--bd);border-radius:10px;overflow:hidden}
.uplist.show{display:block}
.uplist table{width:100%;border-collapse:collapse;font-size:12.5px}
.uplist th{background:#f8fafc;padding:9px 12px;text-align:left;color:#64748b;font-weight:600;
  font-size:12px;border-bottom:1px solid var(--bd);white-space:nowrap}
.uplist td{padding:9px 12px;border-bottom:1px solid #f1f5f9;white-space:nowrap;color:#334155}
.uplist tr:last-child td{border-bottom:0}
.uplist .md5{font-family:"SF Mono",Consolas,monospace;font-size:11px;color:#475569}

.pick-wrap{position:relative}
.pick-wrap input{cursor:pointer}
.pick-panel{display:none;position:absolute;left:0;right:0;top:calc(100% + 6px);z-index:40;
  background:#fff;border:1px solid var(--bd);border-radius:12px;
  box-shadow:var(--sh-md);max-height:252px;overflow:auto}
.pick-panel.show{display:block}
.pick-row{display:grid;grid-template-columns:132px 1fr 72px;gap:10px;padding:9px 14px;
  cursor:pointer;font-size:12.5px;border-bottom:1px solid #f1f5f9;align-items:center}
.pick-row.hd{background:#f8fafc;color:#64748b;font-weight:600;font-size:12px;
  position:sticky;top:0;z-index:1;cursor:default}
.pick-row:not(.hd):hover{background:#f8fbff}
.pick-row.done{color:#cbd5e1}
.pick-row .nm{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pick-empty{padding:26px;text-align:center;color:#94a3b8;font-size:12.5px}

/* ================= 标讯导入 ================= */
.imp-wrap{display:flex;flex-direction:column;height:520px}
.imp-bar{flex:none;display:flex;align-items:center;gap:14px;padding:12px 16px;
  border-bottom:1px solid var(--bd);background:#fbfcfe;font-size:12.5px;color:#64748b}
.imp-preview{flex:1;overflow:auto;background:#fff}
.imp-stat{flex:none;padding:11px 16px;border-top:1px solid var(--bd);background:#fafbfc;
  font-size:12px;color:#64748b;display:flex;align-items:center;gap:18px}
.imp-preview table{width:100%;border-collapse:collapse;font-size:12px;table-layout:fixed}
.imp-preview th{position:sticky;top:0;z-index:1;background:#f8fafc;padding:9px 10px;
  text-align:left;color:#64748b;font-weight:600;font-size:12px;white-space:nowrap;
  border-bottom:1px solid var(--bd)}
.imp-preview td{padding:6px 10px;border-bottom:1px solid #f1f5f9;white-space:nowrap;
  overflow:hidden;text-overflow:ellipsis;outline:none;color:#334155}
td.cell-err{background:#fef2f2!important;color:#b91c1c}
td.cell-warn{background:#fffbeb!important;color:#b45309}

/* ================= 用户与角色 ================= */
.role-tabs{flex:none;display:flex;gap:4px;padding:12px 16px;background:#fff;border-bottom:1px solid var(--bd)}
.rtab{height:34px;padding:0 18px;border:1px solid transparent;border-radius:9px;background:transparent;
  font:inherit;font-size:13px;color:#64748b;cursor:pointer;transition:all .14s}
.rtab:hover{background:#f1f5f9;color:#334155}
.rtab.on{background:#eff6ff;border-color:#dbeafe;color:#1d4ed8;font-weight:600}
.role-body{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}
.role-body > .grid-wrap{flex:1}
.matrix{border-collapse:separate;border-spacing:0;width:100%;font-size:12.5px}
.matrix th{position:sticky;top:0;z-index:2;background:#f8fafc;color:#64748b;font-weight:600;
  font-size:12px;padding:10px 14px;text-align:center;border-bottom:1px solid var(--bd);white-space:nowrap}
.matrix th:first-child{text-align:left;padding-left:16px}
.matrix td{border-bottom:1px solid #f1f5f9;padding:9px 14px;text-align:center;color:#334155}
.matrix td:first-child{text-align:left;padding-left:16px}
.matrix tbody tr:nth-child(even) td{background:#fcfdfe}
.matrix td.grp{background:#f8fafc!important;font-weight:600;color:#334155;text-align:left}
.matrix input[type=checkbox]{width:15px;height:15px;accent-color:#2563eb;cursor:pointer}

/* ================= toast ================= */
.toast{position:fixed;right:24px;bottom:56px;z-index:200;background:#0f172a;color:#f8fafc;
  padding:12px 18px;border-radius:10px;font-size:13px;opacity:0;transform:translateY(10px);
  transition:all .2s;pointer-events:none;box-shadow:0 8px 24px rgba(15,23,42,.28);
  border-left:3px solid #3b82f6;max-width:420px}
.toast.show{opacity:1;transform:translateY(0)}
.toast.err{border-left-color:#ef4444}
.toast.ok{border-left-color:#22c55e}

/* 日志行 */
.logrow{cursor:pointer}
.logrow:hover td{background:#f8fafc}

/* 滚动条 */
::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-thumb{background:#d8e0ea;border-radius:6px;border:2px solid #fff}
::-webkit-scrollbar-thumb:hover{background:#c2ccd9}
::-webkit-scrollbar-track{background:transparent}
/* 清单名称：深蓝加粗，与原型一致 */
.lib-tbl td.ln{font-weight:600;color:#183b5c;max-width:300px;overflow:hidden;
  text-overflow:ellipsis;white-space:nowrap}
/* 地区 / 年份：中间用间隔点，避免"浙江 2013/2013"粘在一起 */
.lib-tbl .yr{white-space:nowrap;font-size:12px}
.lib-tbl .yr .sep{color:#cbd5e1;margin:0 4px}

/* ================= 开标时间：日期 + 15 分钟下拉 ================= */
.dt-pair{display:flex;gap:8px;align-items:center}
.dt-pair input[type=date]{flex:1;min-width:0}
.dt-pair .dt-time{width:96px;flex:none;text-align:center;cursor:pointer;
  appearance:none;-webkit-appearance:none;padding-right:24px;
  background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2394a3b8' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 8px center}

/* ================= 日期输入：统一 yyyy/mm/dd =================
   原生 <input type=date> 的文字<b>一律透明</b>，显示层由 .dwrap::after 自己画。
   ------------------------------------------------------------
   为什么不靠原生渲染：Chrome 会按浏览器语言画出「年/月/日」，而且段占位符
   （::-webkit-datetime-edit-*-field）的显隐随聚焦状态变化。之前用
   `...-field:not(:focus){color:transparent}` 去藏，结果「有值但失焦」时三个字段
   全部命中 :not(:focus) → 选完日期整格变空白；只在光标还在里面时才看得见。
   现在的做法跨浏览器/跨语言包都一致：input 只管弹日历和存值，文字完全归 CSS 画。 */
/* 日期框容器：定高 + 定宽，显示层绝对定位铺满 */
.dwrap{position:relative;display:block;flex:0 0 124px;width:124px;max-height:30px;height:30px;
  line-height:30px;padding:0;margin:0}
.fb .dwrap input[type=date],.dt-pair .dwrap input[type=date],.dwrap input[type=date]{
  position:absolute;left:0;top:0;width:100%;height:30px;display:block;
  margin:0;box-sizing:border-box;padding:0 8px;font-size:13px}
/* 原生文字全程透明（含聚焦/悬停），连光标也藏掉——反正键盘输入已被屏蔽 */
.dwrap input[type=date]{color:transparent!important;-webkit-text-fill-color:transparent!important;
  caret-color:transparent}
.dwrap input[type=date]::-webkit-datetime-edit,
.dwrap input[type=date]::-webkit-datetime-edit-fields-wrapper,
.dwrap input[type=date]::-webkit-datetime-edit-text,
.dwrap input[type=date]::-webkit-datetime-edit-year-field,
.dwrap input[type=date]::-webkit-datetime-edit-month-field,
.dwrap input[type=date]::-webkit-datetime-edit-day-field{
  color:transparent!important;-webkit-text-fill-color:transparent!important}
/* 自绘显示层：内容来自 data-v（有值 = 2026/11/14，空值 = yyyy/mm/dd） */
.dwrap::after{content:attr(data-v);position:absolute;left:0;top:0;right:0;bottom:0;
  display:flex;align-items:center;padding-left:8px;
  color:#475569;font-size:13px;pointer-events:none;
  font-variant-numeric:tabular-nums;letter-spacing:.2px;z-index:1}
/* 空值：灰色占位符 */
.dwrap.is-ph::after{color:#b6c0cd}
/* 日历图标要保留，方便点击 */
.dwrap input[type=date]::-webkit-calendar-picker-indicator{cursor:pointer;opacity:.55}
.dwrap input[type=date]::-webkit-calendar-picker-indicator:hover{opacity:.9}
.dt-pair .dwrap{flex:1;min-width:0;width:auto}
.dt-pair .dwrap input[type=date]{width:100%}
/* 弹窗里日期框稍高一点，与 38px 的输入框对齐 */
.dialog .dt-pair .dwrap{height:34px}
.dialog .dt-pair .dwrap input[type=date]{height:34px}
/* 表单字段里的单日期框（如「延期日期」）：占满字段宽度、与 38px 输入框同高，
   否则会沿用筛选栏那套 124×30 的固定尺寸，看起来比旁边窄一圈 */
.field .dwrap{width:100%;flex:1 1 auto;height:38px;max-height:38px}
.field .dwrap input[type=date]{height:38px}
.dialog .dt-pair .dwrap.is-ph::after{font-size:13px}

/* 筛选栏里的勾选框（显示未开标项目等） */
.fb.chk-fb{cursor:pointer;user-select:none;gap:6px;padding:0 2px;line-height:30px}
.fb.chk-fb .chk{width:15px;height:15px;accent-color:#2563eb;cursor:pointer;flex:none;margin:0}
.fb.chk-fb span{font-size:12.5px;color:#334155;white-space:nowrap}
.fb.chk-fb:hover span{color:#0f172a}

/* ============ 批量停用/恢复：行内勾选框 + 底部操作条 ============ */
.grid input.chk{width:14px;height:14px;accent-color:#2563eb;cursor:pointer;margin:0;vertical-align:middle}
.grid th.c,.grid td.c{text-align:center}
/* 底部这排按钮与翻页器同高，靠左；「已选 N 项」是唯一的进度反馈，别省 */
.pgbar .bstat{font-size:12px;color:#64748b;margin-right:4px;white-space:nowrap}
.fbtn.danger{color:#b91c1c;border-color:#f3cfcf;background:#fff}
.fbtn.danger:hover{background:#fef2f2;border-color:#eab3b3}
.fbtn:disabled{opacity:.45;cursor:not-allowed}

/* ================= 工程列表：固定列宽 + 操作列单行 =================
   操作列要在同一行放下「下载工程 下载招标 详情 删除」四个入口，
   靠 table-layout:fixed 把列宽钉死（auto 布局下浏览器会把操作列压扁导致换行）。 */
/* 各列 th 宽度之和 1580，min-width 取同值：容器更窄时横向滚动，不再挤压列宽 */
.p-tbl{table-layout:fixed;min-width:1580px}
/* 固定布局下列宽由 th 决定，长文本必须自带截断，否则会溢出压到相邻列 */
.p-tbl td.name{max-width:none;overflow:hidden;text-overflow:ellipsis}
/* MD5 列：32 位定长十六进制，字号压到 11px 让列更窄 */
.p-tbl td.code{overflow:hidden;text-overflow:ellipsis;font-size:11px;letter-spacing:-.15px}
/* 四个入口一行排开，间距用 gap，必须清掉 .lnk+.lnk 的 margin-left，否则叠加变宽 */
.op-line{display:flex;align-items:center;gap:12px;white-space:nowrap;font-size:12.5px}
.op-line .lnk{flex:none;-webkit-tap-highlight-color:transparent}
.op-line .lnk + .lnk{margin-left:0}
/* 没有文件时置灰：不可点，hover 仍显示 title 说明缺什么 */
.lnk.dis{color:#cbd5e1;cursor:not-allowed;text-decoration:none}
.lnk.dis:hover{color:#cbd5e1;text-decoration:none}

/* ================= 上传弹窗：文件列表汇总与告警 ================= */
.uplist-sum{font-size:12px;color:#64748b;padding:2px 2px 6px}
.uplist-tip{font-size:12px;padding:6px 10px;border-radius:7px;margin-bottom:6px}
.uplist-tip.err{background:#fef2f2;border:1px solid #fecaca;color:#b91c1c}

/* ================= 多版本：当前版 / 历史版 ================= */
.ver-tag{display:inline-block;margin-left:6px;padding:0 5px;border-radius:4px;
  font-size:10.5px;line-height:15px;font-weight:400;vertical-align:1px;white-space:nowrap}
/* 当前版：蓝色，表示对外接口取这一份 */
.ver-tag.cur{background:#eff6ff;border:1px solid #dbeafe;color:#2563eb}
/* 历史版：灰色，表示已被替代、已退出组价库 */
.ver-tag.hist{background:#f1f5f9;border:1px solid #e2e8f0;color:#94a3b8}
/* 历史版整行降饱和，一眼能区分出不是当前数据 */
#pBody tr.hist td{color:#94a3b8}
#pBody tr.hist td.name{color:#94a3b8;font-weight:500}
#pBody tr.hist td .lnk:not(.dis){color:#94a3b8}
#pBody tr.hist td .lnk:not(.dis):hover{color:#2563eb}

/* ================= 查看小库弹窗 =================
   结构与大库一致：上方清单+方案，下方定额/人材机。
   左侧是清单列表（一条清单一行），右侧是该清单的 N 套候选组价。 */
/* 弹窗整体高度：让 .snapv 吃掉 dialog-bd 的全部可用高度。
   不能给固定 px —— 弹窗上下还有 56px 标题栏和底栏，
   写死高度会把下方定额/人材机压扁（实测只露出一行定额）。 */
.snapv{display:flex;flex-direction:column;height:calc(88vh - 120px);min-height:420px}
.snapv-hd{flex:none;display:flex;align-items:center;gap:14px;padding:9px 14px;
  border-bottom:1px solid var(--bd);background:#f8fafc}
.snapv-kw{width:200px;height:28px;padding:0 9px;border:1px solid var(--bd);border-radius:5px;
  font-size:12.5px;outline:none}
.snapv-kw:focus{border-color:#2563eb;box-shadow:0 0 0 2px rgba(37,99,235,.12)}
.snapv-ck{display:flex;align-items:center;gap:5px;font-size:12.5px;color:#475569;cursor:pointer;user-select:none}
.snapv-tip{margin-left:auto;font-size:12px;color:#64748b}
.snapv-tip b{color:#183b5c}
.snapv-bd{flex:1;display:flex;min-height:0;overflow-x:auto}
/* 左侧清单栏加宽：清单名称 + 工程量标签 + 特征摘要三行信息，
   360px 时特征摘要基本被挤成省略号，看不出同编码两行的区别。 */
.snapv-l{width:460px;flex:none;border-right:1px solid var(--bd);display:flex;flex-direction:column;min-height:0}
/* 右侧不要 overflow:auto：滚动容器不会给内部 flex:1 分配高度，
   结果是 split 收缩、定额表被压扁。滚动交给 pane-bd 自己处理。 */
.snapv-r{flex:1;min-width:0;display:flex;flex-direction:column;min-height:0}

/* 左侧清单表：固定表头 + 可滚动体 */
#svListWrap{flex:1;overflow:auto}
.snapv-tbl{font-size:12.5px}
.snapv-tbl thead th{position:sticky;top:0;z-index:2}
.snapv-tbl td{padding:5px 8px}
#svListWrap .sv-row{cursor:pointer}
#svListWrap .sv-row:hover td{background:#f1f5f9}
#svListWrap .sv-row.on td{background:#e0edff}
#svListWrap .sv-row.on td:first-child{box-shadow:inset 3px 0 0 #2563eb}
/* 没匹配到候选的行，弱化处理，但仍可点（要看它为什么没匹配） */
#svListWrap .sv-row.nocand td{color:#94a3b8}

/* 右侧头部：候选切换 + 质量信息 */
.snapv-info{flex:none;display:flex;align-items:center;gap:16px;flex-wrap:wrap;
  padding:9px 14px;border-bottom:1px solid var(--bd);background:#fff}
.snapv-pick{display:flex;align-items:center;gap:6px;font-size:12px}
.sv-pill{display:inline-flex;align-items:center;justify-content:center;min-width:28px;height:22px;
  padding:0 7px;border:1px solid var(--bd);border-radius:4px;background:#fff;
  font-size:11.5px;color:#475569;cursor:pointer;text-decoration:none}
.sv-pill:hover{border-color:#93c5fd;color:#2563eb}
.sv-pill.on{background:#2563eb;border-color:#2563eb;color:#fff}
/* 候选 pill 上的"删除这套候选"按钮：平时淡入、hover 变红，避免误点 */
.sv-pill .sv-del{display:inline-flex;align-items:center;justify-content:center;
  width:13px;height:13px;margin-left:5px;border-radius:50%;
  font-size:11px;line-height:1;font-weight:700;font-style:normal;
  color:#94a3b8;background:transparent;cursor:pointer}
.sv-pill .sv-del:hover{color:#fff;background:#dc2626}
.sv-pill.on .sv-del{color:rgba(255,255,255,.75)}
.sv-pill.on .sv-del:hover{color:#fff;background:#b91c1c}
.snapv-meta{margin-left:auto;display:flex;gap:14px;font-size:12px;color:#64748b}
.snapv-meta b{color:#183b5c}

/* 右侧改为上下分栏：定额组成在上、人材机在下。
   ------------------------------------------------------------
   原来左右分栏，两栏各约 500px：定额表 5 列尚可，但人材机表 6 列
   （类别/名称规格/单位/含量/定额价/市场价）挤不下，表头会竖排变形。
   改上下之后两者都吃满右侧整宽（约 1100px），列宽充裕。
   高度按 3:2 分 —— 定额是核对主体，给更多空间。 */
.snapv-r .splitv{flex:1;display:flex;flex-direction:column;min-height:0}
.snapv-r .splitv-q{flex:3;min-height:0;display:flex;flex-direction:column;border-bottom:1px solid var(--bd)}
.snapv-r .splitv-r{flex:2;min-height:0;display:flex;flex-direction:column}

/* 上下分栏后右侧整宽约 1200px，如果让名称列吃掉全部剩余空间，
   它会被撑到 780~860px —— 定额名称通常只有十来个字，结果中间大片空白，
   数值列被推到最右边，很难横向对照。给名称列定个上限，多余宽度留给
   其余列按比例分摊。 */
.snapv-r .r-tbl,.snapv-r .q-tbl{table-layout:fixed}
.snapv-r .q-tbl th:nth-child(2){width:38%}
.snapv-r .r-tbl th:nth-child(2){width:38%}
/* 名称超长时省略，悬停看全文（title 已在渲染时挂上） */
.snapv-r .q-tbl td.qname,.snapv-r .r-tbl td.rname{max-width:none}
/* 表格区允许滚动，窄屏时不挤压列 */
.snapv-r .pane-bd{overflow:auto}

/* 小库清单列表：同一编码+单位可能有多条不同清单（特征/工程量不同），
   把特征摘要和工程量带出来，否则列表上看起来是一模一样的两行。 */
.snapv-tbl td.ln{line-height:1.35;padding-top:6px;padding-bottom:6px}
.sv-qty{display:inline-block;margin-left:6px;padding:0 5px;border-radius:3px;
  background:#f1f5f9;color:#64748b;font-size:11px;vertical-align:1px}
.sv-feat{margin-top:2px;color:#94a3b8;font-size:11px;overflow:hidden;
  text-overflow:ellipsis;white-space:nowrap}

/* ---------- 会员 / 订单（2026-11-16） ---------- */
/* 顶部统计卡：运营每天第一眼看成交额 */
.stat-row{display:flex;gap:12px;padding:10px 12px 2px;flex-wrap:wrap}
.stat-card{flex:1;min-width:180px;max-width:320px;background:#fff;border:1px solid var(--bd);
  border-radius:6px;padding:10px 14px}
.stat-card .sc-lb{color:#8296ac;font-size:12px;margin-bottom:6px}
.stat-card .sc-v{color:#183b5c;font-size:19px;font-weight:600;letter-spacing:.3px}
.stat-card .sc-v i{font-style:normal;font-size:12px;font-weight:400;color:#8296ac}

/* 权限/脱敏提示条：不打断操作，只说明「你看到的是脱敏数据」 */
.hint-bar{margin:8px 12px 0;padding:7px 12px;background:#fdf6e7;border:1px solid #f4dfae;
  border-radius:5px;color:#96650b;font-size:12.5px;line-height:1.5}

/* 会员 / 订单表：固定列宽
   ------------------------------------------------------------
   这两张表列多、单号长（19 位订单号）、项目名更长。用自动布局时
   浏览器会把宽度往长文本列倾斜，把「支付金额」「状态」这种窄列压到
   表头都显示不全（实测「支付金额(元)」被截成「支付金额(」）。
   改成 fixed：列宽只认表头 width，内容超长按省略号截断，title 里有全文。 */
table.grid.fixed-tbl{table-layout:fixed}
table.grid.fixed-tbl tbody td{overflow:hidden;text-overflow:ellipsis}
/* fixed-tbl 的选择器比 td.num 更强，会把右对齐盖掉 —— 这里补回同强度规则 */
table.grid.fixed-tbl tbody td.num,
table.grid.fixed-tbl thead th.num,
table.grid thead th.num{text-align:right}
/* 订单页筛选栏元素多，搜索框不给最小宽度会被挤成摆设 */
.filter-bar .sbox.grow{min-width:210px}

/* ---------- v23 前端改造：Tab / 合计行 / 余额色 / 模板分区 / 收银台 ---------- */

/* 页面级 Tab（订单列表 / 统计分析）：与角色页 .role-tabs 同款，但去掉白底分隔线 */
.page-tabs{padding:10px 12px 0;background:transparent;border:0}
/* 操作列放不下时换行，而不是被 fixed-tbl 截断成"看不见的按钮" */
.op-line.op-wrap{flex-wrap:wrap;white-space:normal;gap:5px 12px}
/* 金额着色：正数（可抵扣余额）青绿、负数红 */
.bal-pos{color:#0f766e}
.bal-neg{color:#dc2626}
/* 已停用订单徽章：灰蓝，与"待支付/已关闭"区分开 */
.badge.b-void{background:#eef2f7;border-color:#cbd5e1;color:#475569}

/* 表格底部合计行：粘在表底、与表头同底色，滚动时始终可见 */
table.grid tfoot td{background:#f8fafc;font-weight:600;color:#0f172a;padding:9px 12px;
  border-top:1px solid var(--bd);white-space:nowrap}
table.grid tfoot tr.sum-row td{border-top:2px solid #dbeafe}
table.grid tfoot td:last-child{position:sticky;right:0;z-index:2;background:#f8fafc;
  box-shadow:-1px 0 0 #e6ecf4}

/* 弹窗内的筛选条（消费明细 / 下载记录 / 开票资料） */
.mdl-bar{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;
  padding:10px 12px;border-bottom:1px solid var(--bd)}
.mdl-bar .fb{height:30px}

/* 订单统计的维度切换 */
.otabs{display:flex;flex-wrap:wrap;gap:4px}
.otab{height:30px;padding:0 13px;border:1px solid transparent;border-radius:8px;background:transparent;
  color:#475569;font-size:12.5px;cursor:pointer;transition:all .12s}
.otab:hover{background:#f1f5f9;color:#0f172a}
.otab.on{background:#eff6ff;border-color:#dbeafe;color:#1d4ed8;font-weight:600}
#osBody tr.drill{cursor:pointer}

/* 收费模板编辑：折叠分区（用 details，切分区不丢输入） */
.tpl-sec{margin:12px 0 0;border:1px solid var(--bd);border-radius:10px;padding:0 12px 12px;background:#fff}
.tpl-sec>summary{cursor:pointer;list-style:none;padding:11px 0 9px;font-size:13px;font-weight:600;color:#0f172a;
  display:flex;align-items:center;gap:8px;user-select:none}
.tpl-sec>summary::-webkit-details-marker{display:none}
.tpl-sec>summary::before{content:"▸";color:#94a3b8;font-size:12px;transition:transform .12s}
.tpl-sec[open]>summary::before{transform:rotate(90deg)}
.tpl-sec>summary:hover{color:#1d4ed8}
table.grid.pt-grid{width:100%}
table.grid.pt-grid th:last-child,table.grid.pt-grid td:last-child{position:static;box-shadow:none}
table.grid.pt-grid td{padding:6px 8px}
table.grid.pt-grid input.tin,table.grid.pt-grid select{width:100%;height:28px}
.btn.xs{height:26px;padding:0 10px;font-size:12px}

/* 数据范围多选面板（省 + 市） */
.scope-box{border:1px solid #dbe3ec;border-radius:9px;background:#fff;max-height:230px;overflow:auto;padding:6px 10px}
.sc-prov{display:flex;align-items:flex-start;gap:10px;padding:5px 0;border-bottom:1px dashed #eef2f7}
.sc-prov:last-child{border-bottom:0}
.sc-prov-lb{flex:none;min-width:120px;font-weight:600}
.sc-cities{display:flex;flex-wrap:wrap;gap:4px 12px}
.sc-city{font-size:12.5px;color:#475569}
.sc-extra{flex:none;color:#94a3b8;font-size:12.5px}
.scope-sum{margin-top:6px;font-size:12.5px;color:#64748b}
.scope-sum b{color:#0f172a}

/* 余额调整预览框 */
.preview-box{border:1px dashed #cbd5e1;border-radius:8px;background:#f8fafc;padding:9px 12px;font-size:13px}

/* 收银台（pay.html）：蓝顶栏 + 白卡片，移动端单列 */
.pay-body{background:var(--bg);min-height:100vh;margin:0}
.pay-hd{background:linear-gradient(135deg,var(--nav),var(--nav2));color:#fff;padding:16px 20px;
  display:flex;align-items:center;gap:10px}
.pay-hd .mark{width:30px;height:30px;border-radius:8px;background:rgba(255,255,255,.16);
  display:flex;align-items:center;justify-content:center}
.pay-hd .mark svg{width:18px;height:18px}
.pay-hd b{font-size:15px;font-weight:600;letter-spacing:.3px}
.pay-hd i{font-style:normal;font-size:11.5px;opacity:.75;margin-left:auto}
.pay-wrap{max-width:520px;margin:0 auto;padding:18px 14px 40px}
.pay-card{background:#fff;border:1px solid var(--bd);border-radius:14px;box-shadow:var(--sh-md);
  padding:20px 18px;margin-bottom:14px}
.pay-card .pc-lb{color:#94a3b8;font-size:12px;margin-bottom:4px}
.pay-amount{font-size:38px;font-weight:700;color:#0f172a;letter-spacing:.5px;line-height:1.15}
.pay-amount small{font-size:17px;font-weight:600;color:#475569;margin-right:3px}
.pay-meta{display:grid;grid-template-columns:76px 1fr;gap:8px 10px;font-size:13px;margin-top:12px}
.pay-meta .k{color:#94a3b8}
.pay-meta .v{color:#0f172a;word-break:break-all}
.pay-badge{display:inline-flex;align-items:center;padding:3px 10px;border-radius:7px;font-size:12px;font-weight:600}
.pay-badge.wait{background:#fffbeb;border:1px solid #fde68a;color:#b45309}
.pay-badge.ok{background:#ecfdf3;border:1px solid #bbf7d0;color:#15803d}
.pay-badge.off{background:#f1f5f9;border:1px solid #cbd5e1;color:#475569}
.pay-qr{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;
  min-height:220px;background:#fbfdff;border:1px dashed #dbe3ec;border-radius:12px;padding:14px;margin-top:6px}
.pay-qr img{width:220px;height:220px;object-fit:contain;background:#fff;border-radius:8px}
.pay-qr pre{max-width:100%;max-height:200px;overflow:auto;font-size:11px;color:#475569;
  background:#fff;border:1px solid #e6ecf4;border-radius:8px;padding:10px;margin:0;white-space:pre-wrap;word-break:break-all}
.pay-countdown{text-align:center;color:#475569;font-size:13px;margin-top:12px}
.pay-countdown b{color:#b45309;font-variant-numeric:tabular-nums;font-size:15px}
.pay-actions{display:flex;flex-direction:column;gap:10px;margin-top:14px}
.pay-btn{height:46px;border:1px solid #dbe3ec;border-radius:11px;background:#fff;color:#334155;
  font-size:15px;cursor:pointer;transition:all .12s}
.pay-btn:hover{background:#f8fafc;border-color:#c8d2de}
.pay-btn.pri{background:var(--blue);border-color:var(--blue);color:#fff;font-weight:600;
  box-shadow:0 4px 14px rgba(37,99,235,.25)}
.pay-btn.pri:hover{background:var(--blue-dk);border-color:var(--blue-dk)}
.pay-btn:disabled{opacity:.55;cursor:not-allowed}
/* 模拟支付：刻意做成"非主色 + 虚线"，让人一眼看出这不是真支付按钮 */
.pay-btn.sim{background:#fff7e6;border:1px dashed #f0b429;color:#a16207;font-weight:600}
.pay-btn.sim:hover{background:#fef3c7;border-color:#d97706}
/* 联调控制台的"渠道侧 vs 本地"两列对比，用等宽数字便于对齐看差异 */
.mock-cmp{font-family:ui-monospace,Consolas,monospace;font-size:12px}
.pay-tip{color:#94a3b8;font-size:12px;line-height:1.6;text-align:center;margin-top:10px}
.pay-empty{text-align:center;color:#94a3b8;padding:30px 10px;line-height:1.8}
@media(max-width:520px){
  .pay-amount{font-size:32px}
  .pay-wrap{padding:12px 10px 32px}
  .pay-card{padding:16px 14px}
  .pay-qr img{width:190px;height:190px}
}

/* 预估价格：「¥20.00 起」与预估说明——条数未知时后端按最低档算，不能当最终价 */
.est-suffix{font-size:15px;font-weight:600;color:#b45309;margin-left:2px}
.pay-est-tip{margin-top:6px;padding:6px 10px;border-radius:7px;background:#fffbeb;
  border:1px solid #fde68a;color:#b45309;font-size:12px;line-height:1.5}

/* 手动开票：抬头单选列表 */
.title-list{display:flex;flex-direction:column;gap:8px;max-height:240px;overflow:auto}
.title-item{display:grid;grid-template-columns:20px 1fr;grid-template-rows:auto auto;gap:2px 8px;
  border:1px solid #dbe3ec;border-radius:9px;padding:9px 11px;cursor:pointer;background:#fff}
.title-item:hover{border-color:#93b4f7;background:#fbfdff}
.title-item input[type=radio]{grid-row:1 / span 2;margin-top:3px}
.title-item .ti-main{display:flex;align-items:baseline;gap:8px;min-width:0}
.title-item .ti-main b{font-size:13.5px;color:#0f172a;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.title-item .ti-main i{font-style:normal;font-size:11.5px;color:#2563eb;background:#eff6ff;
  border:1px solid #dbeafe;border-radius:5px;padding:1px 6px}
.title-item .ti-sub{font-size:11.5px;color:#64748b;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* 支付二维码浮层：点击订单操作列后就地弹出，贴鼠标定位由 JS 算 */
.qr-float {
  position: fixed; z-index: 9999; background: #fff; padding: 12px;
  border: 1px solid #e2e8f0; border-radius: 10px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, .18);
}
.qr-float img { display: block; border: 1px solid #eef2f7; border-radius: 4px; }
.qrf-top { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 8px; }
.qrf-no { font-family: Consolas, monospace; font-size: 11px; color: #94a3b8; }
.qrf-x { margin-left: auto; cursor: pointer; font-size: 18px; line-height: 1; color: #94a3b8; }
.qrf-x:hover { color: #ef4444; }
.qrf-amt { text-align: center; font-size: 16px; font-weight: 700; color: #b42318; margin-top: 8px; }
.qrf-tip { text-align: center; font-size: 11px; color: #94a3b8; margin-top: 4px; }

/* 小库弹窗的多工程插页：一个招标项目常有多个工程文件（标段/多次上传） */
.snapv-tabs{display:flex;gap:2px;padding:8px 12px 0;border-bottom:1px solid var(--bd);
  overflow-x:auto;background:#f8fafc}
.snapv-tab{border:1px solid transparent;border-bottom:none;background:transparent;cursor:pointer;
  padding:7px 14px;border-radius:6px 6px 0 0;font-size:12.5px;color:#475569;white-space:nowrap;
  display:flex;flex-direction:column;align-items:flex-start;gap:1px;line-height:1.25}
.snapv-tab i{font-style:normal;font-size:11px;color:#94a3b8}
.snapv-tab:hover{background:#eef2f7}
.snapv-tab.on{background:#fff;border-color:var(--bd);color:#1e40af;font-weight:600;
  margin-bottom:-1px;padding-bottom:8px}
.snapv-tab.on i{color:#64748b}

/* ---------- 金额与行级着色（业务要求：钱用红字） ---------- */
.money-total{color:#c0392b;font-weight:700}
.money-sub{color:#d4756b;font-size:12px}
.money-refund{color:#c0392b;font-weight:600}
.danger-th{color:#c0392b}
.danger-cell{color:#c0392b;font-variant-numeric:tabular-nums}

/* 已退款：整行偏灰，钱已退回，视觉后退一步。
   但**状态徽标保持原色** —— 整行都灰掉的话，"已退款"三个字自己也灰了，
   一眼扫过去分不清到底是退款还是别的状态。 */
table.grid tbody tr.row-refunded td{color:#94a3b8}
table.grid tbody tr.row-refunded td .mono{color:#a8b3c2}
table.grid tbody tr.row-refunded td .badge{opacity:1}

/* 已停用：暗红，提醒但不用刺眼的纯红 */
table.grid tbody tr.row-void td{color:#a94442}
table.grid tbody tr.row-void td .mono{color:#b96560}

/* 导入预览：单元格可直接编辑 */
.imp-ed{appearance:none;-webkit-appearance:none;background:transparent;border:0;
  font:inherit;color:inherit;padding:2px 3px;width:100%;outline:none;border-radius:3px}
.imp-ed:hover{background:#f1f5f9}
.imp-ed:focus{background:#fff;box-shadow:inset 0 0 0 2px #3b82f6;border-radius:3px}
td select.imp-ed{cursor:pointer}
td select.imp-ed option{color:#0f172a;background:#fff}
td.cell-err .imp-ed:hover{background:transparent}

/* ============================================================================
   老 CRM 迁移页的版式（订单中心 / 广告 / 补丁 / 操作日志 / 项目收费）

   老系统是 Vue + Element Plus，页面骨架是固定的三段：
     .search-area  顶部白色卡片，左侧筛选项、右侧「查询 / 重置」按钮
     .table-container  白色卡片，内部 overflow:auto，表格撑满
     .pagination-container  右下角「共 N 条 + 每页条数 + 页码」
   卡片统一 padding:10~20px、border-radius:4px、box-shadow:0 2px 12px #0000001a。
   下面按同一口径实现，让迁移过来的页面和老系统长得一样，用户不用重新学。
   ============================================================================ */

/* 页面外框：卡片之间 10px 间距，四周留 5px（老 .system-page{padding:5px}） */
.page-pad{flex:1;min-height:0;display:flex;flex-direction:column;gap:10px;padding:8px 10px 10px;background:var(--bg)}

.search-area{
  flex:none;display:flex;align-items:center;justify-content:space-between;
  flex-wrap:wrap;gap:8px 10px;padding:10px 12px;background:#fff;
  border:1px solid var(--bd);border-radius:4px;box-shadow:0 2px 12px rgba(0,0,0,.06);
}
.search-group{display:flex;align-items:center;flex-wrap:wrap;gap:8px 10px}
.button-group{display:flex;align-items:center;gap:8px}

.pagination-container{
  flex:none;display:flex;align-items:center;justify-content:flex-end;gap:10px;
  padding:8px 12px;background:#fff;border:1px solid var(--bd);border-radius:4px;
  box-shadow:0 2px 12px rgba(0,0,0,.06);
}
.pagination-container > span{color:#64748b;font-size:12.5px}
.pagination-container .pgbar{display:flex;align-items:center;gap:6px}

/* 弹窗里的分区标题（客户信息 / 实名信息 / 授权信息 / 订单信息） */
.form-sec{
  display:flex;align-items:center;margin:14px 0 8px;padding-bottom:6px;
  border-bottom:1px solid #eef2f7;font-size:13px;font-weight:600;color:#1e3a5f;
}
.form-sec:first-child{margin-top:0}
.form-sec::before{
  content:'';width:3px;height:13px;margin-right:7px;border-radius:2px;background:#409eff;
}
.req{color:#e54d42;font-style:normal;margin-left:2px}

/* 授权模块编辑表：输入框铺满单元格，去掉边框只留聚焦态 */
table.mi-tbl tbody td{padding:5px 6px}
table.mi-tbl input,table.mi-tbl select{
  width:100%;height:28px;border:1px solid transparent;border-radius:4px;padding:0 6px;
  font:inherit;font-size:12.5px;background:transparent;color:var(--tx);outline:none;
}
table.mi-tbl input:hover,table.mi-tbl select:hover{background:#f8fafc}
table.mi-tbl input:focus,table.mi-tbl select:focus{
  background:#fff;border-color:#409eff;box-shadow:0 0 0 2px rgba(64,158,255,.15);
}
table.mi-tbl input.r{text-align:right}

/* ---------- 弹窗滚动的可见性 ----------
   Windows 的 Chromium 默认用 overlay 滚动条：不滚动时不占位、也不显示，
   于是"弹窗比视口高"时用户看到的是一个被齐刷刷裁掉的表单，
   既看不到滚动条也想不到能滚 —— 报障就是"保存按钮不见了"。
   这里给弹窗正文强制常显一条滚动条槽，并在底部留一点内边距，
   让最后一行（订单备注/商务备注）不会被圆角挡住。 */
.dialog-bd{scrollbar-gutter:stable;padding-bottom:20px}
.dialog-bd::-webkit-scrollbar{width:10px}
.dialog-bd::-webkit-scrollbar-thumb{background:#c8d2de;border-radius:6px;border:2px solid #fff}
.dialog-bd::-webkit-scrollbar-thumb:hover{background:#aebbcb}
.dialog-bd::-webkit-scrollbar-track{background:#f6f8fb;border-radius:6px}

/* ---------- 宽表：左右两列锚定 ----------
   订单中心 17 列，在 1440 屏幕上必然横向滚。老 CRM 的做法是纯横滚，
   滚到右边就看不到订单号、滚回左边又看不到操作按钮，改一单要来回拖。
   这里把「序号+订单号」钉在左边、「操作」钉在右边（position:sticky），
   中间列横向滚动时两端不动 —— 与 Excel 冻结窗格同一个意思。
   注意：table.grid 是 border-collapse:separate，sticky 才能生效；
   td 自身的背景必须给实色，否则滚动时下面的内容会透出来。 */
table.grid.sticky-lr thead th.sticky-l,
table.grid.sticky-lr tbody td.sticky-l{
  position:sticky;left:0;z-index:6;background:#fff;
  box-shadow:1px 0 0 #e8eef5;
}
table.grid.sticky-lr thead th.sticky-l{background:#f8fafc;z-index:8}
/* 第二列（订单号）紧贴第一列右侧 */
table.grid.sticky-lr thead th.sticky-l2,
table.grid.sticky-lr tbody td.sticky-l2{
  position:sticky;z-index:6;background:#fff;
  box-shadow:1px 0 0 #e8eef5;
}
table.grid.sticky-lr thead th.sticky-l2{background:#f8fafc;z-index:8}
/* 选中行：钉住的格子也要跟着变色，否则高亮会断成两截 */
table.grid.sticky-lr tbody tr.sel td.sticky-l,
table.grid.sticky-lr tbody tr.sel td.sticky-l2,
table.grid.sticky-lr tbody tr.sel td.sticky-r{background:#eef6ff}
table.grid.sticky-lr tbody tr:hover td.sticky-l,
table.grid.sticky-lr tbody tr:hover td.sticky-l2,
table.grid.sticky-lr tbody tr:hover td.sticky-r{background:#f8fafc}

/* ============================================================================
   软件模块配置：左软件列表 + 右模块表格
   ----------------------------------------------------------------------------
   和系统里其它「左树右表」的页面（角色权限、组价库）保持同一手感：
   左侧固定宽、选中项高亮，右侧表格撑满剩余宽度。
   ============================================================================ */
.softmod-wrap{flex:1;min-height:0;display:flex;gap:10px;overflow:hidden}
.softmod-l{
  width:230px;flex:none;background:#fff;border:1px solid var(--bd);border-radius:4px;
  box-shadow:0 2px 12px rgba(0,0,0,.06);display:flex;flex-direction:column;min-height:0;
}
.softmod-l-hd{flex:none;padding:10px 12px;border-bottom:1px solid #eef2f7;
  font-size:12px;font-weight:600;color:#64748b;letter-spacing:.3px}
.softmod-l{overflow-y:auto}
.softmod-litem{display:flex;align-items:center;gap:8px;width:100%;padding:9px 12px;
  border:0;border-left:3px solid transparent;background:transparent;
  font:inherit;font-size:13px;color:#334155;cursor:pointer;text-align:left;
  transition:background .12s,color .12s}
.softmod-litem:hover{background:#f8fafc}
.softmod-litem.on{background:#eff6ff;border-left-color:#2563eb;color:#1d4ed8;font-weight:600}
.softmod-litem .sl-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.softmod-litem .sl-cnt{flex:none;min-width:22px;height:18px;line-height:18px;padding:0 5px;
  border-radius:9px;background:#eef2f7;color:#64748b;font-size:11px;text-align:center;font-weight:400}
.softmod-litem.on .sl-cnt{background:#dbeafe;color:#1d4ed8}
.softmod-r{
  flex:1;min-width:0;background:#fff;border:1px solid var(--bd);border-radius:4px;
  box-shadow:0 2px 12px rgba(0,0,0,.06);display:flex;flex-direction:column;min-height:0;
}
.softmod-r-hd{flex:none;display:flex;align-items:center;gap:10px;
  padding:10px 14px;border-bottom:1px solid #eef2f7}
.softmod-r-hd b{font-size:13.5px;color:#1e3a5f}
.softmod-r-hd .mute{font-size:12px}
.softmod-r .tbl-wrap{border:0;border-radius:0;box-shadow:none}
