
*{box-sizing:border-box} body{margin:0;font-family:-apple-system,'Segoe UI','Microsoft YaHei',sans-serif;background:#f4f6fa;color:#243044}
.topbar{background:#1f2d3d;color:#fff;padding:10px 18px;display:flex;align-items:center;gap:14px}
.topbar h1{font-size:17px;margin:0}
.topbar .sp{flex:1}
.topbar a,.topbar span{color:#cdd6e4;font-size:14px;text-decoration:none}
.tabs{display:flex;gap:4px;background:#fff;border-bottom:1px solid #e3e8f0;padding:0 14px;flex-wrap:wrap}
.tabs button{background:none;border:none;padding:12px 14px;cursor:pointer;font-size:14px;color:#5b6b80;border-bottom:2px solid transparent}
.tabs button.active{color:#1f6feb;border-bottom-color:#1f6feb;font-weight:600}
.matimg{width:34px;height:34px;object-fit:cover;border-radius:4px;cursor:zoom-in;vertical-align:middle;margin-right:6px;border:1px solid #e3e6ea;background:#fff}
.matimg-lg{max-width:420px;max-height:420px;border:1px solid #e3e6ea;border-radius:6px}
.lk{color:#1f6feb;cursor:pointer;text-decoration:underline;text-underline-offset:2px}
.lk:hover{color:#0b4fb8}
.dlg-tbl{border-collapse:collapse;width:100%;margin:6px 0;font-size:13px}
.dlg-tbl td{padding:6px 10px;border:1px solid #eef1f5;vertical-align:top}
.dlg-tbl td.muted{background:#fafbfc;white-space:nowrap}
.tabs .tgroup{display:inline-flex;align-items:center;padding:0 12px;margin:0 2px;font-size:12px;font-weight:700;color:#1f6feb;border-left:2px solid #dbe2ec;letter-spacing:1px}
/* 两级主菜单（v20261031.18 UI 优化）：一级分类行 + 二级模块行 */
.navwrap{position:sticky;top:0;z-index:40;background:#fff;box-shadow:0 2px 10px rgba(20,40,80,.09)}
.navrow{display:flex;align-items:stretch;gap:4px;overflow-x:auto;scrollbar-width:thin;
  scroll-behavior:smooth;-webkit-overflow-scrolling:touch}
.navrow::-webkit-scrollbar{height:4px}
.navrow::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:2px}
.navrow::-webkit-scrollbar-track{background:transparent}
/* 一级分类行：深色渐变，图标 + 文字，选中态高亮 */
.navrow1{background:linear-gradient(180deg,#243449 0%,#1f2d3d 100%);padding:0 14px;gap:2px;
  border-bottom:1px solid #16202e}
.navrow1 .navg{background:none;border:none;position:relative;padding:11px 18px;cursor:pointer;
  font-size:14.5px;font-weight:600;color:#b9c6d8;white-space:nowrap;letter-spacing:.3px;
  border-bottom:3px solid transparent;transition:color .16s,background .16s;display:inline-flex;
  align-items:center;gap:7px}
.navrow1 .navg .gi{font-size:15px;line-height:1;opacity:.9}
.navrow1 .navg:hover{color:#fff;background:rgba(255,255,255,.08)}
.navrow1 .navg.active{color:#fff;background:rgba(31,111,235,.28);border-bottom-color:#3b82f6}
.navrow1 .navg.active:after{content:"";position:absolute;left:14%;right:14%;bottom:0;height:3px;
  border-radius:3px 3px 0 0;background:linear-gradient(90deg,transparent,#60a5fa,transparent)}
/* 二级模块行：浅色胶囊，选中态实心渐变 */
.navrow2{background:#fff;padding:9px 14px;border-bottom:1px solid #e3e8f0;min-height:46px;gap:6px;align-items:center}
.navrow2 button{background:#f4f7fb;border:1px solid #e6ecf5;border-radius:16px;padding:6px 15px;
  cursor:pointer;font-size:13.5px;color:#4a5a70;white-space:nowrap;transition:all .16s}
.navrow2 button:hover{background:#e8f0fe;border-color:#bfd6fb;color:#1f6feb}
.navrow2 button.active{background:linear-gradient(135deg,#1f6feb,#3b82f6);border-color:#1f6feb;
  color:#fff;font-weight:600;box-shadow:0 2px 8px rgba(31,111,235,.28)}
.navrow2 button .bi{font-size:13px;margin-right:5px;opacity:.9}
/* 菜单右侧工具区（全局搜索） */
.navtools{margin-left:auto;display:flex;align-items:center;gap:8px;padding-left:12px;flex:0 0 auto}
.navtools input{border:1px solid #dbe3ee;border-radius:16px;padding:6px 14px;font-size:13px;
  width:min(190px,40vw);background:#f8fafc;outline:none;transition:all .16s}
.navtools input:focus{border-color:#93b8f7;background:#fff;box-shadow:0 0 0 3px rgba(31,111,235,.12)}
.navtools .nsearch{background:#fff;border:1px solid #dbe3ee;border-radius:16px;padding:6px 14px;
  cursor:pointer;font-size:13px;color:#4a5a70;white-space:nowrap}
.navtools .nsearch:hover{border-color:#93b8f7;color:#1f6feb}
/* 全局搜索按钮（Ctrl+K 呼出，带快捷键角标提示） */
.navtools .ngsearch{display:inline-flex;align-items:center;gap:6px;background:#fff;border:1px solid #dbe3ee;
  border-radius:16px;padding:6px 12px;cursor:pointer;font-size:13px;color:#4a5a70;white-space:nowrap;transition:all .16s}
.navtools .ngsearch:hover{border-color:#93b8f7;color:#1f6feb;box-shadow:0 0 0 3px rgba(31,111,235,.08)}
.navtools .ngsearch .fs-kbd{margin-left:2px}
@media (max-width:992px){.navtools .ngsearch .fs-kbd{display:none}}
@media (max-width:768px){.navtools .ngsearch{padding:6px 10px}}
/* 多窗口标签栏（参考ERP）：已打开的模块标签，可切换 / 关闭 */
.wtabbar{display:flex;align-items:center;gap:4px;background:#f7f9fc;border-bottom:1px solid #e3e8f0;
  padding:6px 12px 0;overflow-x:auto;scrollbar-width:thin}
.wtabbar::-webkit-scrollbar{height:4px}
.wtabbar::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:2px}
.wtabbar .wt{padding:6px 10px 7px 12px;margin-bottom:-1px;border:1px solid #e3e8f0;border-bottom-color:transparent;
  border-radius:8px 8px 0 0;background:#eef2f8;color:#5b6b80;font-size:13px;cursor:pointer;white-space:nowrap;
  display:inline-flex;align-items:center;gap:6px;flex:0 0 auto;transition:background .14s,color .14s}
.wtabbar .wt:hover{background:#e2ecff;color:#1f6feb}
.wtabbar .wt.active{background:#fff;color:#1f6feb;font-weight:600;box-shadow:0 -2px 6px rgba(31,111,235,.08)}
.wtabbar .wt .wi{font-size:13px;line-height:1}
.wtabbar .wt .x{width:16px;height:16px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;
  font-size:13px;line-height:1;color:#9aa7b8}
.wtabbar .wt .x:hover{background:#e11d48;color:#fff}
.wtabbar .wt.active .x{color:#7f8ea3}
/* 标签右键菜单：关闭左/右/全部 */
#tabCtxMenu{position:fixed;z-index:9999;min-width:148px;background:#fff;border:1px solid #d6dde8;border-radius:8px;
  box-shadow:0 6px 22px rgba(20,40,80,.18);padding:5px;display:none;font-size:13px}
#tabCtxMenu .mi{padding:7px 12px;border-radius:6px;cursor:pointer;color:#2b3a4d;white-space:nowrap}
#tabCtxMenu .mi:hover{background:#eef4ff;color:#1f6feb}
#tabCtxMenu .mi.dim{opacity:.4;cursor:default}
#tabCtxMenu .mi.dim:hover{background:transparent;color:#2b3a4d}
#tabCtxMenu .sep{height:1px;background:#eef1f6;margin:4px 2px}
@media (max-width:820px){
  .wtabbar{padding:5px 8px 0}
  .wtabbar .wt{font-size:12.5px;padding:5px 8px 6px 10px}
  .navrow1 .navg{padding:9px 13px;font-size:13.5px;gap:5px}
  .navrow1 .navg .gi{display:none}
  .navrow2{padding:7px 10px;min-height:42px}
  .navrow2 button{padding:5px 12px;font-size:12.5px}
  .navtools input{width:120px}
}
.wrap{max-width:1680px;margin:18px auto;padding:0 16px}
.card{background:#fff;border:1px solid #e3e8f0;border-radius:10px;padding:16px;margin-bottom:16px;box-shadow:0 1px 3px rgba(20,40,80,.04)}
/* 首页概况：分模块统计卡片 */
.ov-card{padding:14px 16px}
.ov-head{display:flex;align-items:center;gap:8px;margin-bottom:12px}
.ov-head h3{margin:0;font-size:15px}
.ov-head .ov-ico{font-size:18px;line-height:1}
.ov-head .muted{font-size:12.5px;margin-left:auto}
.ov-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(168px,1fr));gap:10px}
.ov-stat{border:1px solid #e8edf5;border-radius:9px;padding:11px 13px;background:linear-gradient(180deg,#fbfdff,#f6f9fe);cursor:pointer;transition:all .16s}
.ov-stat:hover{border-color:#bfd6fb;box-shadow:0 4px 12px rgba(31,111,235,.1);transform:translateY(-1px)}
.ov-lbl{font-size:12.5px;color:#7a8aa0;margin-bottom:5px}
.ov-val{font-size:20px;font-weight:700;line-height:1.25;color:#22334a;word-break:break-all}
.ov-val.clr{color:#e5484d}
.ov-val.ok{color:#1a8a4f}
.ov-sub{font-size:11.5px;color:#94a3b8;margin-top:3px}
.ov-stat:hover .ov-sub{color:#5b7ba6}
@media (max-width:820px){.ov-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.ov-val{font-size:17px}}
.ov-panel{padding:14px 16px;margin-top:12px}
.ovtbl{width:100%;border-collapse:collapse;font-size:13.5px}
.ovtbl td{padding:7px 8px;border-bottom:1px solid #f0f3f8;vertical-align:middle}
.ovtbl tr{cursor:default}
.ovtbl tr[onclick]{cursor:pointer}
.ovtbl tr[onclick]:hover{background:#f5f8ff}
.ov-wsec{margin-bottom:12px}
.ov-wsec:last-child{margin-bottom:0}
.ov-wtitle{font-size:12.5px;font-weight:600;color:#5b6b82;margin:6px 0 4px}
.tag{display:inline-block;padding:1px 8px;border-radius:10px;font-size:11.5px;line-height:1.7;white-space:nowrap}
.tag.info{background:#e8f0fe;color:#1f6feb}
.tag.warn{background:#fff3da;color:#a05a00}
.tag.rej{background:#fdecec;color:#c0392b}
.tag.ok{background:#e6f6ec;color:#1a8a4f}
table{width:100%;border-collapse:collapse;font-size:14px}
/* 【r44ui2 #606】明细/列表列项易看错：全局表格加浅灰竖线分列（首列无左边线），行线/条纹/悬停保留 */
th,td{padding:9px 10px;border-bottom:1px solid #eef1f6;border-left:1px solid #e5e7eb;text-align:left}
th:first-child,td:first-child{border-left:none}
th{color:#7a8aa0;font-weight:600;background:#fafbfd;white-space:nowrap}
/* 【R173 2026-11-28 用户钦定】列表美观易读统一规则：
   ① 列宽随内容自适应（table-layout:auto 默认；长文本自动换行不挤爆、短列自然收窄）；
   ② 数字列等宽数字右对齐不换行（对齐易比对）；③ 金额/数量列 .num 全站统一；
   ④ 表头字色加深一点提高对比度；⑤ 长备注列 .note-col 换行显示（已有） */
td{word-break:break-word;vertical-align:middle}
td.num,th.num{font-variant-numeric:tabular-nums}
td.num{white-space:nowrap;text-align:right}
th{color:#5d7089}
.tbl-wrap table{min-width:0}
/* 序号列恒窄且居中，防长内容把它挤宽 */
th.rownum,td.rownum{width:46px;min-width:46px;text-align:center;color:#94a3b8}
button.btn{background:#1f6feb;color:#fff;border:none;border-radius:6px;padding:8px 14px;cursor:pointer;font-size:14px}
button.btn.gray{background:#eef1f6;color:#36465c}
button.btn.red{background:#e5484d;color:#fff}
button.btn.ok{background:#1a8a4f;color:#fff}  /* 审核等确认动作（与 tag.ok 色系一致） */
button.btn.sm{padding:5px 10px;font-size:13px}
button.btn:disabled{opacity:.5;cursor:not-allowed}
.right{text-align:right}
.muted{color:#94a3b8}
.badge{display:inline-block;padding:1px 7px;border-radius:10px;font-size:12px;background:#eef1f6;color:#475569}
.badge.rw{background:#e7f0ff;color:#1f6feb}
.badge.ro{background:#fdecec;color:#e5484d}
input,select,textarea{padding:7px 9px;border:1px solid #d4dbe6;border-radius:6px;font-size:14px;font-family:inherit}
.dialog{position:fixed;inset:0;background:rgba(15,25,45,.45);display:none;align-items:flex-start;justify-content:center;overflow:auto;z-index:80}
.dialog.show{display:flex}
/* 第二层对话框（在表单弹窗之上再弹选择列表，如收款选客户/出库单） */
/* 【R133 2026-11-25】80/90 > 报价详情弹窗 #qembed(70)/预览浮层(75)：在报价详情里点「AI 生成合同」等
 * 由 iframe 调父窗口 showDlg 的弹窗，原先 z-index 50/60 被压在 70 的报价弹窗后面（看起来像没反应/被遮挡）。
 * 报价弹窗全屏遮罩挡住主页面，不存在"主页面弹窗需要压在报价弹窗下"的场景，故整体抬高。 */
#dlg2{z-index:90;background:rgba(15,25,45,.55)}
.dlgbox{background:#fff;width:min(900px,94vw);margin:40px 0;border-radius:12px;padding:20px;position:relative;max-height:min(88vh,900px);display:flex;flex-direction:column}
/* 【R53 弹窗单层滚动】非底部区不再各自滚动，统一交给 .dlgbox，消除多层滚动条割裂 */
.dlgbox > *:not(.dlgfoot){overflow:visible;min-height:0;flex:0 0 auto}
/* 弹窗正文滚动层：table 上 overflow 不生效，统一用 .dlgbody 包裹滚动；padding-top 避开右上快捷键提示 */
.dlgbox .dlgbody{overflow:visible;min-height:0;flex:0 0 auto;padding-top:18px}
#dlg2 .dlgbox{width:min(680px,92vw)}
/* 【UI-FIX M3 / R53 P2-3】取消所有弹窗内嵌滚动封顶：不再对 .dlgbody 与 [style*=overflow:auto] 子元素强制 max-height，
   纵向滚动统一交给 .dlgbox 单层处理，彻底消除双层/三层滚动条割裂。
   #dlg 与 #dlg2 均带 .dialog 类，故选择器由 #dlg2 扩展到 .dialog，覆盖单层弹窗内的明细容器
   （crm_print_templates.js:1420/1510、crm_sales_order.js:939、crm_purchase.js:446 等 <div style="...overflow:auto">）。
   注意：.dlgbox 自身由 class 控制（无内联 style），不匹配 [style*=] 规则，
   :367 的 max-height:90vh/overflow:auto 与 :423 窄屏 94vh 保留，仍是唯一纵向滚动层；
   弹窗内表格横向滚动（.tbl-wrap{overflow-x:auto}）不受影响 */
.dialog .dlgbody{max-height:none}
.dialog [style*="overflow:auto"],.dialog [style*="overflow: auto"]{max-height:none !important}

/* 【R130 弹窗纵向节奏】裸 <div> 直排字段（如申请客户佣金）此前无间距全挤在一起；
   .row 自带 margin-bottom:10px，但不用 .row 的弹窗（crm_ai newIntroFee / modalFields 的 .form>.field）
   一律 0 间距。这里给 .dlgbody 直接子 div 与 .form>.field 统一 10px 默认节奏：
   - .row 本身就是 .dlgbody>div，值相同无视觉变化（规则叠加不冲突）；
   - 带内联 style="margin:…" 的元素内联样式优先，不受影响；
   - 末行归零，避免与底部按钮区产生双倍空隙。 */
.dlgbody > div,
.dlgbody .form > .field{margin-bottom:10px}
.dlgbody > div:last-child{margin-bottom:0}
.dlgbox .dlgfoot{margin-top:14px;padding-top:12px;border-top:1px solid #eef1f6;display:flex;gap:8px;flex-wrap:wrap;align-items:center;justify-content:flex-end;flex-shrink:0}
.dlgbox .dlgfoot .muted{margin-right:auto}
.dlgbox h3{margin-top:0}
/* 快捷条：对话框内的顶部提示（键盘快捷键） */
.dlg-hint{position:absolute;top:8px;right:40px;font-size:11px;color:#a9b6c7;pointer-events:none}
/* 【R53】弹窗统一右上角关闭按钮：所有弹窗（含纯详情类）都可点 × / Esc / 点遮罩关闭；移动端加大点击区 */
.dlg-x{position:absolute;top:6px;right:8px;width:28px;height:28px;line-height:26px;text-align:center;
  border:none;border-radius:8px;background:transparent;color:#8b95a3;font-size:22px;cursor:pointer;
  padding:0;transition:background .15s,color .15s;z-index:2}
.dlg-x:hover{background:#f0f3f9;color:#e5484d}
@media(max-width:720px){.dlg-x{width:36px;height:36px;line-height:34px;right:4px;top:4px;font-size:26px}.dlg-hint{display:none}}
/* 列表行快捷：鼠标悬停显示编辑高亮 */
tr.tbl-row-editable:hover{outline:1px dashed #bfd6fb;outline-offset:-1px;cursor:pointer}
tr.tbl-row-editable:focus-within{background:#eef4ff !important}
/* 焦点描边统一 */
input:focus,select:focus,textarea:focus{outline:2px solid #93b8f7;outline-offset:-1px}
/* 保存中按钮态 */
.btn.is-saving{opacity:.6;pointer-events:none}
.section h3{margin:18px 0 8px;font-size:15px;border-left:3px solid #1f6feb;padding-left:8px}
.row{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:10px}
.row>div{flex:1;min-width:160px}
.row label{display:block;font-size:12px;color:#7a8aa0;margin-bottom:3px}
.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:#1f2d3d;color:#fff;padding:10px 18px;border-radius:8px;display:none;z-index:99}
.toast.show{display:block}
.tag{display:inline-block;padding:1px 7px;border-radius:10px;font-size:12px;margin-left:6px}
.tag.ok{background:#e6f7ec;color:#1a8a4f}.tag.pend{background:#fff4e0;color:#b5791a}.tag.rej{background:#fdecec;color:#e5484d}
.clr{color:#e5484d}

/* ===== 录单易用性 / 美观统一补充（v20261107 管家改造）===== */
.field{display:flex;flex-direction:column;gap:3px}
.field>label{font-size:12px;color:#7a8aa0;margin-bottom:0}
.field.req>label:after{content:" *";color:#e5484d;font-weight:700}
input.is-invalid,select.is-invalid,textarea.is-invalid{border-color:#e5484d!important;box-shadow:0 0 0 2px rgba(229,72,77,.15)}
.form-hint{font-size:11.5px;color:#94a3b8;margin-top:2px}
.empty{padding:22px;text-align:center;color:#94a3b8;font-size:13.5px;background:#fafbfc;border:1px dashed #e3e8f0;border-radius:8px;margin:8px 0}
.num{text-align:right;font-variant-numeric:tabular-nums}
input[type=number].num{padding-right:8px}

/* ===== UI 交互与动效（v20261031.19）===== */
@keyframes fsFadeUp{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes fsFadeIn{from{opacity:0}to{opacity:1}}
@keyframes fsSpin{to{transform:rotate(360deg)}}
@keyframes fsPulse{0%,100%{opacity:.5}50%{opacity:.9}}
@keyframes fsShimmer{0%{background-position:-420px 0}100%{background-position:420px 0}}
@keyframes fsSlideDown{from{opacity:0;transform:translateY(-10px) scale(.98)}to{opacity:1;transform:none}}
@keyframes fsBarGrow{from{transform:scaleX(0)}to{transform:scaleX(1)}}
/* 卡片入场：视图渲染后逐个上浮 */
#view>.card{animation:fsFadeUp .34s cubic-bezier(.22,.9,.34,1) both}
#view>.card:nth-child(1){animation-delay:0s}
#view>.card:nth-child(2){animation-delay:.045s}
#view>.card:nth-child(3){animation-delay:.09s}
#view>.card:nth-child(4){animation-delay:.135s}
#view>.card:nth-child(5){animation-delay:.18s}
#view>.card:nth-child(6){animation-delay:.225s}
#view>.card:nth-child(n+7){animation-delay:.27s}
/* 骨架屏 */
.fs-skel{background:linear-gradient(90deg,#eef2f7 25%,#f8fafc 50%,#eef2f7 75%);
  background-size:840px 100%;animation:fsShimmer 1.25s linear infinite;border-radius:6px;height:14px;margin:8px 0}
.fs-skel.w40{width:40%}.fs-skel.w60{width:60%}.fs-skel.w80{width:80%}.fs-skel.w100{width:100%}
.fs-skel.w25{width:25%}.fs-skel.w78{width:78%}.fs-skel.w88{width:88%}.fs-skel.w92{width:92%}.fs-skel.w94{width:94%}.fs-skel.w96{width:96%}
.fs-skel-row{display:flex;gap:10px;margin-bottom:10px}
.fs-skel-box{border-radius:8px;height:64px;flex:1}
/* 加载指示 */
.fs-loading{display:inline-flex;align-items:center;gap:7px;color:#64748b;font-size:13px}
.fs-spin{width:13px;height:13px;border:2px solid #cbd5e1;border-top-color:#1f6feb;border-radius:50%;
  animation:fsSpin .7s linear infinite;display:inline-block}
.fs-pulse{animation:fsPulse 1.4s ease-in-out infinite}
/* 按钮反馈 */
.btn{transition:transform .12s ease,box-shadow .18s ease,background .18s ease,opacity .18s ease;position:relative;overflow:hidden}
.btn:active{transform:translateY(1px) scale(.985)}
.btn:disabled{opacity:.55;cursor:not-allowed;transform:none}
.btn.busy{pointer-events:none;color:transparent!important}
.btn.busy:after{content:"";position:absolute;left:50%;top:50%;width:13px;height:13px;margin:-7px 0 0 -7px;
  border:2px solid rgba(255,255,255,.45);border-top-color:#fff;border-radius:50%;animation:fsSpin .7s linear infinite}
.btn.sm.busy:after{width:11px;height:11px;margin:-6px 0 0 -6px}
.btn.pulse{animation:fsPulse 1.6s ease-in-out infinite}
/* 表格行悬浮 + 斑马纹 */
table tbody tr{transition:background .15s ease,box-shadow .15s ease}
table tbody tr:hover{background:#f6f9ff;box-shadow:inset 3px 0 0 #1f6feb}
table tbody tr.clicked{animation:fsFadeIn .3s ease}
/* 标签徽章 */
.tag,.badge{transition:transform .14s ease,box-shadow .14s ease;cursor:default}
.tag:hover,.badge:hover{transform:translateY(-1px);box-shadow:0 2px 6px rgba(20,40,80,.14)}
/* 统计卡片 */
.stat{transition:transform .18s ease,box-shadow .18s ease}
.stat:hover{transform:translateY(-2px);box-shadow:0 6px 16px rgba(20,40,80,.1)}
/* 全局搜索面板 */
.fs-search{position:fixed;inset:0;background:rgba(15,23,42,.42);backdrop-filter:blur(3px);z-index:900;
  display:none;justify-content:center;align-items:flex-start;padding-top:12vh;animation:fsFadeIn .18s ease}
.fs-search.on{display:flex}
.fs-search-box{width:min(760px,92vw);background:#fff;border-radius:14px;box-shadow:0 24px 60px rgba(15,23,42,.28);
  overflow:hidden;animation:fsSlideDown .24s cubic-bezier(.22,.9,.34,1);display:flex;flex-direction:column;max-height:74vh}
.fs-search-in{display:flex;align-items:center;gap:10px;padding:14px 18px;border-bottom:1px solid #e8edf4}
.fs-search-in input{flex:1;border:none;outline:none;font-size:16px;background:none;color:#1e293b}
.fs-search-in input::placeholder{color:#94a3b8}
.fs-search-hint{font-size:12px;color:#94a3b8;background:#f1f5f9;padding:3px 7px;border-radius:5px}
.fs-search-body{overflow-y:auto;padding:8px 0}
.fs-sg-title{display:flex;align-items:center;gap:7px;padding:8px 18px 4px;font-size:12px;color:#64748b;font-weight:600}
.fs-sg-title .cnt{margin-left:auto;background:#eef2f7;border-radius:9px;padding:1px 7px;font-weight:500}
.fs-sr{display:flex;align-items:center;gap:11px;padding:9px 18px;cursor:pointer;transition:background .13s ease}
.fs-sr:hover,.fs-sr.on{background:#f1f6ff}
.fs-sr .ic{width:26px;height:26px;border-radius:7px;background:#eef4ff;display:flex;align-items:center;
  justify-content:center;font-size:13px;flex:0 0 auto}
.fs-sr .tt{flex:1;min-width:0}
.fs-sr .tt b{display:block;font-weight:600;font-size:13.5px;color:#1e293b;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fs-sr .tt span{display:block;font-size:12px;color:#94a3b8;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fs-sr .mt{font-size:12.5px;color:#64748b;flex:0 0 auto}
.fs-sr .tg{font-size:11px;background:#f1f5f9;color:#64748b;padding:1px 6px;border-radius:5px;flex:0 0 auto}
.fs-search-empty{padding:36px 18px;text-align:center;color:#94a3b8;font-size:13px}
.fs-search-empty .em{font-size:30px;display:block;margin-bottom:8px;opacity:.55}
.fs-kbd{font-size:11px;background:#f1f5f9;border:1px solid #e2e8f0;border-bottom-width:2px;border-radius:4px;padding:1px 5px;color:#64748b}
/* 风险/评分条 */
.fs-meter{height:6px;border-radius:4px;background:#eef2f7;overflow:hidden;min-width:70px}
.fs-meter i{display:block;height:100%;border-radius:4px;background:linear-gradient(90deg,#22c55e,#84cc16);transform-origin:left;animation:fsBarGrow .55s ease both}
.fs-meter.mid i{background:linear-gradient(90deg,#f59e0b,#fbbf24)}
.fs-meter.high i{background:linear-gradient(90deg,#ef4444,#f87171)}
/* 行业标签色 */
.ind-chip{display:inline-block;padding:1px 8px;border-radius:10px;font-size:11.5px;background:#eef4ff;color:#1f6feb;white-space:nowrap}
.ind-chip.c1{background:#f3e8ff;color:#7c3aed}.ind-chip.c2{background:#ecfdf5;color:#047857}
.ind-chip.c3{background:#fff7ed;color:#c2410c}.ind-chip.c4{background:#fef2f2;color:#b91c1c}
.ind-chip.c5{background:#eff6ff;color:#1d4ed8}.ind-chip.c6{background:#fdf4ff;color:#a21caf}
.ind-chip.c0{background:#f1f5f9;color:#64748b}
/* 空状态 */
.fs-empty{text-align:center;padding:36px 16px;color:#94a3b8}
.fs-empty .em{font-size:34px;display:block;margin-bottom:10px;opacity:.5}
@media (prefers-reduced-motion:reduce){
  *{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
}
/* 动效优化（v20261103）：交互反馈更顺滑，受上方 reduced-motion 媒体查询约束 */
.card{transition:box-shadow .2s ease, transform .2s ease}
.card:hover{box-shadow:0 6px 22px rgba(20,40,80,.10)}
.btn{transition:background-color .15s ease, box-shadow .15s ease, transform .08s ease}
.btn:active{transform:translateY(1px)}
#dlg,#dlg2{animation:fsFadeIn .18s ease both}
@keyframes fsFadeIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.tabbtn{transition:color .15s ease, border-color .15s ease}
.pp-row,.tr-clickable{transition:background-color .12s ease}
.stat-card{transition:transform .15s ease, box-shadow .15s ease}
.stat-card:hover{transform:translateY(-2px);box-shadow:0 6px 18px rgba(20,40,80,.12)}
.kpi{flex:1 1 160px;min-width:0}
.opcell{display:flex;flex-wrap:wrap;gap:4px;min-width:200px}
.tbl-wrap{overflow-x:auto}
.tbl-wrap .note-col{word-break:break-word;vertical-align:top}
/* 列表：全宽响应式 + 列宽可调（作用于 table.resizable：收款 #payTbl、物料库存 #matTbl 等） */
table.resizable{table-layout:auto;width:100%}
/* 默认允许换行：内容完整显示，杜绝 overflow:hidden 把数字/文字裁掉（修复"数量/名称显示不全"回归） */
table.resizable th,table.resizable td{white-space:normal;word-break:break-word;overflow-wrap:anywhere;overflow:visible}
/* 备注等长文本列：保留换行可见；如需单行省略可给该列加 .clip 类（并设 title 显示全文） */
table.resizable th.note-col,table.resizable td.note-col{white-space:normal;overflow:visible;text-overflow:clip;word-break:break-word}
table.resizable th.clip,table.resizable td.clip{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
table.resizable th{position:relative}
.col-resizer{position:absolute;top:0;right:-2px;width:9px;height:100%;cursor:col-resize;z-index:3;touch-action:none}
.col-resizer::after{content:'';position:absolute;top:0;bottom:0;right:3px;width:2px;background:transparent}
.col-resizer:hover::after,.col-resizer.dragging::after{background:#1f6feb}
.td-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:12px;margin-top:12px}
.td-card{padding:0;overflow:hidden}
.td-head{display:flex;align-items:center;gap:8px;padding:12px 14px;background:#f7f9fc;border-bottom:1px solid #e8eef6}
.td-head h3{margin:0;font-size:14.5px}
.td-ico{font-size:15px}
.td-total{margin-left:auto;background:#1f6feb;color:#fff;border-radius:10px;padding:1px 9px;font-size:12.5px}
.td-row{display:flex;align-items:center;gap:8px;padding:10px 14px;border-bottom:1px solid #f1f4f9;cursor:pointer;font-size:13.5px}
.td-row:last-child{border-bottom:none}
.td-row:hover{background:#f4f8ff}
.td-lbl{flex:1;color:#33415c;display:flex;align-items:center;gap:6px}
.td-dot{width:6px;height:6px;border-radius:50%;background:#e11d48;display:inline-block}
.td-amt{color:#7c8899;font-size:12.5px}
.td-cnt{min-width:44px;text-align:right;font-weight:600;color:#1f6feb}
.td-go{color:#b6c2d2;font-size:16px}
/* 易特式功能导航图：0 笔项仍显示、标灰项只说明不跳转 */
.td-item{border-bottom:1px solid #f1f4f9}
.td-item:last-child{border-bottom:none}
.td-item .td-row{border-bottom:none}
.td-note{padding:0 14px 9px 34px;font-size:11.5px;color:#98a2b3;line-height:1.5}
.td-modnote{padding:8px 14px;background:#fbfcfe;border-bottom:1px solid #eef2f8;font-size:11.5px;color:#8490a3;line-height:1.5}
.td-zero .td-cnt{color:#aeb8c6;font-weight:500}
.td-zero .td-go{color:#d7dee8}
.td-na .td-lbl{color:#98a2b3}
.td-na .td-row{cursor:default}
.td-na .td-row:hover{background:transparent}
.td-na .td-note{color:#a9b2c0}

/* ===== 视觉打磨（v20261106.02）：全局质感统一，只追加不覆盖既有规则 ===== */
body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility}
::selection{background:rgba(31,111,235,.16)}
/* 全局滚动条：细圆角胶囊，悬浮加深 */
::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-thumb{background:#c5d0e0;border-radius:6px;border:2px solid transparent;background-clip:padding-box}
::-webkit-scrollbar-thumb:hover{background:#a5b6cd;border:2px solid transparent;background-clip:padding-box}
::-webkit-scrollbar-track,.navrow::-webkit-scrollbar-track,.wtabbar::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-corner{background:transparent}
/* 顶栏：深色渐变 + 标题微光 */
.topbar{background:linear-gradient(90deg,#151f2c 0%,#1f2d3d 52%,#27405f 100%)}
.topbar h1{letter-spacing:.4px}
/* 卡片：双层柔和阴影，hover 轻微上浮 */
.card{border-radius:12px;border-color:#e7ecf3;box-shadow:0 1px 2px rgba(20,40,80,.05),0 3px 10px rgba(20,40,80,.05)}
#view>.card:hover{transform:translateY(-1px);box-shadow:0 3px 8px rgba(20,40,80,.07),0 12px 30px rgba(20,40,80,.09)}
/* 按钮：补齐 hover 态 + 主按钮渐变（gray/red/ok 原背景色优先级更高，不受影响） */
button.btn{background:linear-gradient(135deg,#2b6ef0,#1f6feb);box-shadow:0 1px 2px rgba(20,40,80,.14),0 1px 5px rgba(31,111,235,.20)}
button.btn:hover:not(:disabled){filter:brightness(1.06);box-shadow:0 2px 6px rgba(20,40,80,.16),0 3px 11px rgba(31,111,235,.32)}
button.btn:active:not(:disabled){filter:brightness(.97)}
button.btn.gray{box-shadow:0 1px 2px rgba(20,40,80,.08)}
button.btn.gray:hover:not(:disabled){filter:none;box-shadow:0 1px 5px rgba(20,40,80,.12)}
button.btn.red{background:linear-gradient(135deg,#ea5a5f,#e5484d)}
button.btn.red:hover:not(:disabled){box-shadow:0 2px 9px rgba(229,72,77,.34);filter:none}
button.btn.ok{background:linear-gradient(135deg,#23a25a,#1a8a4f)}
button.btn.ok:hover:not(:disabled){box-shadow:0 2px 9px rgba(26,138,79,.32);filter:none}
/* 输入控件 hover 反馈 */
input:hover,select:hover,textarea:hover{border-color:#b9c7db}
/* 表头：细腻渐变底 */
th{background:linear-gradient(180deg,#fbfcfe,#f4f7fb);letter-spacing:.15px}
/* 对话框：景深阴影 + 背景轻模糊 */
.dialog{background:rgba(13,22,40,.46);backdrop-filter:blur(2px)}
.dlgbox{border-radius:14px;border:1px solid #eef2f8;box-shadow:0 10px 24px rgba(10,25,60,.14),0 28px 70px rgba(10,25,60,.26)}
/* 徽章 / 标签：全圆角胶囊 */
.tag,.badge{border-radius:999px}
/* 右键菜单 / toast：景深统一 */
#tabCtxMenu{box-shadow:0 10px 34px rgba(15,30,60,.20)}
.toast{box-shadow:0 8px 26px rgba(10,25,60,.30)}
/* 二级导航胶囊与搜索框：全圆角 */
.navrow2 button{border-radius:999px}
.navtools input,.navtools .nsearch{border-radius:999px}
/* 多窗口标签：active 微光 */
.wtabbar .wt.active{box-shadow:0 -2px 8px rgba(31,111,235,.10)}
/* ===== [UI-FIX Req5] 显示完整性兜底（只追加，不覆盖既有规则）===== */
/* [R53] 唯一纵向滚动层：.dlgbox 自身滚动；overscroll-behavior 防止滚动穿透到背景页 */
.dlgbox{max-height:90vh;overflow:auto;overscroll-behavior:contain}
.dlgbody{max-height:none}
/* 【R53 响应式-列表按内容自适应】长表工具类：改用 auto 布局让列宽按内容分配，
   消除 fixed 等分导致的"内容多的列被挤、内容少的列空旷"；数据单元格允许换行完整显示，
   不再 overflow:hidden 截断（修复数量/名称显示不全）；表头仍 nowrap 不折行；
   超宽表仍由已有 .tbl-wrap{overflow-x:auto} 横向滚动兜底（JS 层 autoResizeViewTables 自动包裹） */
table.tbl-fixed{table-layout:auto;width:100%}
table.tbl-fixed th,table.tbl-fixed td{white-space:normal;word-break:break-word;overflow-wrap:anywhere;overflow:visible}
table.tbl-fixed th{white-space:nowrap}
table.tbl-fixed td.note,table.tbl-fixed th.note,
table.tbl-fixed td.relax,table.tbl-fixed th.relax{white-space:normal;overflow:visible;text-overflow:clip;word-break:break-word}
.ov-val{word-break:break-word}
@media (max-width:1024px){
  .wrap{max-width:100%}
  .navtools input{width:min(190px,40vw)}
  .td-grid{grid-template-columns:repeat(auto-fill,minmax(240px,1fr))}
}
@media (max-width:768px){
  .wrap{padding:8px;margin:8px auto}
  .navtools{width:100%;order:-1}
  .navtools input{width:100%}
  .row{flex-direction:column;align-items:stretch}
  .row>div{flex:1 1 auto !important;min-width:0 !important}
  .card{padding:12px}
  .ov-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .opcell{min-width:0}
  .td-grid{grid-template-columns:repeat(auto-fill,minmax(160px,1fr))}
  .dlgbox{width:96vw !important}
  table.tbl-fixed{table-layout:auto}
  /* 【R53】窄屏数据单元格允许换行完整显示，表头保持 nowrap 不折行，避免撑宽变形 */
  table.so-list td,table.so-list .opcell,
  .md-tbl td{white-space:normal;word-break:break-word;overflow-wrap:anywhere}
  table.so-list .opcell{flex-wrap:wrap}
}
/* ===== [R53 响应式] 480px 超窄屏（手机竖屏）专项：进一步压缩间距/字号，杜绝横向溢出 ===== */
@media (max-width:480px){
  .topbar{padding:8px 10px;gap:6px 10px;flex-wrap:wrap;min-height:0}
  .topbar h1{font-size:15px;white-space:nowrap}
  /* 窄屏顶栏：标题/当前用户/铃铛各保持单行，低价值版本号隐藏，问答与返回自然折到第二行 */
  .topbar>span,.topbar>a{white-space:nowrap}
  .topbar>span.muted{display:none}
  .wrap{padding:0 8px;margin:8px auto}
  .row{flex-direction:column;gap:8px}
  .row>div,.row>.field{flex:1 1 auto !important;width:100% !important;min-width:0 !important}
  .card{padding:10px}
  .ov-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  /* 导航/标签栏在 820px 已压缩，480px 下继续缩小字号与 padding，不横向溢出 */
  .navrow1{padding:0 8px}
  .navrow1 .navg{padding:8px 9px;font-size:12.5px;gap:4px}
  .navrow2{padding:6px 8px;min-height:38px;gap:4px}
  .navrow2 button{padding:5px 10px;font-size:12px}
  .wtabbar{padding:4px 6px 0}
  .wtabbar .wt{font-size:12px;padding:4px 7px 5px 8px}
  .tabs{padding:0 8px}
  .tabs button{padding:10px 9px;font-size:12.5px}
  /* 数据单元格换行、表头仍 nowrap；去掉 tbl-fixed 的 240px 上限避免超窄屏挤压 */
  table.tbl-fixed td,table.so-list td,.md-tbl td{white-space:normal;word-break:break-word;overflow-wrap:anywhere}
  table.tbl-fixed td{max-width:none}
  /* 弹窗贴近全屏，仍由 .dlgbox 单层滚动 */
  .dlgbox{width:98vw !important;margin:8px 0;padding:12px;max-height:94vh}
  .dlgbody{padding:10px}
}
/* 标签栏常驻操作按钮（关闭其他 / 全部关闭），随横向滚动固定在右侧 */
.wtab-actions{position:sticky;right:0;display:inline-flex;gap:4px;align-items:center;margin-left:6px;background:#f7f9fc;padding-left:6px;flex:0 0 auto}
.wtab-act{border:1px solid #dbe3ee;background:#fff;color:#5b6b80;border-radius:7px;padding:4px 9px;font-size:12px;cursor:pointer;white-space:nowrap}
.wtab-act:hover{border-color:#93b8f7;color:#1f6feb;background:#eef4ff}
.docPage{display:flex;flex-direction:column;height:100%;min-height:calc(100vh - 120px)}
.docTopBar{display:flex;align-items:center;gap:10px;padding:10px 14px;border-bottom:1px solid #e6e8eb;background:#fff;position:sticky;top:0;z-index:5;flex-wrap:wrap}
.docTitle{font-weight:600;font-size:15px}
.docTabBar{display:flex;gap:6px;flex-wrap:wrap;margin-left:auto}
.docTab{display:inline-flex;align-items:center;gap:6px;padding:5px 10px;border:1px solid #d8dce0;border-radius:8px;background:#f6f7f9;font-size:13px;cursor:pointer}
.docTab.active{background:#e8f0fe;border-color:#9bbcf6;color:#1a56c4}
.docTab .x{color:#a0a4a8;font-size:11px}
.docTab .x:hover{color:#e5484d}
.docPageBody{padding:14px 16px;overflow:auto;flex:1}
/* 【r45 修复波A】销售订单列表：首列单号冻结（横向滚动防半截裁切）；全局 th,td 竖线/行线/条纹/悬停规则保留。
   表内紧凑 padding；【R53 P1-1】nowrap 只保留在表头 th（标题不折行），数据 td 不再设 nowrap，
   否则会以同等特异性(0,1,2)+更靠后的源顺序反转媒体查询内的 td{white-space:normal}，导致窄屏换行失效 */
table.so-list th{padding:7px 8px;white-space:nowrap}
table.so-list td{padding:7px 8px}
table.so-list th:first-child,table.so-list td:first-child{position:sticky;left:0;z-index:2;background:#fff;box-shadow:2px 0 0 #e5e7eb}
table.so-list thead th:first-child{background:#fafbfd;z-index:3}
table.so-list tbody tr:hover td:first-child{background:#f6f9ff}
/* 【R53 P1-1】操作按钮组允许换行，避免反转媒体查询内的 flex-wrap:wrap */
table.so-list .opcell{min-width:0;flex-wrap:wrap}
/* 【r45 修复波A】行内「更多」下拉（soRowMore；风格对齐 #tabCtxMenu） */
.rowmenu{position:fixed;z-index:9999;min-width:148px;background:#fff;border:1px solid #d6dde8;border-radius:8px;box-shadow:0 8px 24px rgba(20,40,80,.14);padding:4px}
.rowmenu button{display:block;width:100%;text-align:left;padding:7px 12px;border:none;background:none;border-radius:6px;cursor:pointer;font-size:13.5px;color:#2b3a4d}
.rowmenu button:hover{background:#eef4ff}
/* 【r45 修复波A】销售订单详情明细合计行（滚动容器底部常驻） */
tr.so-sum td{position:sticky;bottom:0;background:#fff;font-weight:600;border-top:2px solid #e5e7eb}

/* =============================================================================
   主从明细面板（R51，对齐易特 ERP：选中列表行 → 列表下方显示该单据明细）
   配套 crm_master_detail.js。面板不占位：没有内容时 :empty 直接隐藏，列表高度不变。
   ============================================================================= */
.detail-panel{margin-top:12px}
.detail-panel:empty{display:none;margin:0}
/* 【R126】明细手风琴内联展开行：面板插在所点行正下方（全宽随表头列数 colspan） */
tr.md-inline-row>td{padding:0 4px 10px;background:transparent;border-bottom:none}
tr.md-inline-row .detail-panel{margin-top:6px;box-shadow:0 6px 18px rgba(20,40,80,.08)}
tr.md-inline-row.row-unapproved>td{background:transparent}

/* 未审核行标红：只染文字，不动背景，避免整表花掉；.tag 自带 color 不受影响 */
tr.row-unapproved>td{color:#e5484d}
tr.row-unapproved>td .muted{color:#e5484d;opacity:.78}
tr.row-unapproved>td .tag{color:inherit}
/* 已驳回/已取消这类本身是红 tag 的，让它保持原色（有底色，不清洗） */
tr.row-unapproved>td .tag.rej{color:#c0392b}

/* 选中行：左侧色条 + 淡蓝底，和 hover 区分开 */
tr.md-sel>td{background:#e8f1ff}
tr.md-sel>td:first-child{box-shadow:inset 3px 0 0 #1f6feb}
tbody tr[data-md-id]{cursor:pointer}

/* 面板本体 */
.md-panel{border:1px solid #e3e8f0;border-radius:8px;background:#fbfcfe;overflow:hidden}
.md-hd{display:flex;align-items:center;gap:8px;padding:8px 12px;background:#f4f7fb;border-bottom:1px solid #e8edf5;font-size:13.5px;color:#2b3a4d}
.md-hd b{font-weight:600}
.md-hd .muted{font-size:12.5px}
.md-tbl-wrap{max-height:34vh;overflow:auto}
.md-tbl{width:100%;border-collapse:collapse;font-size:13px}
.md-tbl th{position:sticky;top:0;z-index:1;background:#eef3fa;color:#42546b;font-weight:600;text-align:left;
  padding:7px 10px;white-space:nowrap;border-bottom:1px solid #dde5f0}
/* 【R53 P1-1】数据 td 去掉 nowrap（表头 :480 已保留 nowrap），使媒体查询内 td{white-space:normal} 生效 */
.md-tbl td{padding:6px 10px;border-bottom:1px solid #eef1f6;color:#2b3a4d}
.md-tbl tbody tr:hover>td{background:#f0f6ff}
.md-tbl tbody tr:last-child>td{border-bottom:none}
.md-tbl .num{text-align:right;font-variant-numeric:tabular-nums}
.md-tbl tr.md-empty>td{text-align:center;color:#8a93a3;padding:22px 10px;white-space:normal}
.md-foot{display:flex;gap:22px;flex-wrap:wrap;padding:8px 12px;border-top:1px solid #e8edf5;background:#fff;font-size:13px;color:#42546b}
.md-foot b{color:#2b3a4d;font-variant-numeric:tabular-nums}
.md-err{padding:12px;color:#e5484d;font-size:13px}
/* 窄屏：面板高度收一点，别把列表挤没 */
@media (max-width:1100px){.md-tbl-wrap{max-height:28vh}}

/* 【R56】序号列：按内容自适应宽度（1位/2位/3位数字自然不同宽），右对齐、等宽数字、不可选中/复制。
   历史两坑：① colgroup 曾给本列硬写百分比内联宽度（enableColResize 均分）→ 已在 enableColResize 排除；
   ② 【R56 根因】table.resizable td{white-space:normal}(特异性0,1,2) 压过 td.rownum(0,1,1)，
      导致 nowrap 失效→列被挤到 26px→多位数字换行。故此处用 table.resizable td.rownum + !important
      把 nowrap 提到最高特异性，列宽交回 auto 布局按内容（实测 ~49px，不再换行、不过宽）。
   未完成单据的序号单独标红：td.rownum .rownum-red 优先级高于 tr.row-unapproved>td，互不干扰。 */
th.rownum, td.rownum,
table.resizable th.rownum, table.resizable td.rownum,
table.tbl-fixed th.rownum, table.tbl-fixed td.rownum,
table.so-list th.rownum, table.so-list td.rownum{
  width:auto; min-width:0; max-width:none;
  padding-left:6px; padding-right:6px;
  text-align:right; font-variant-numeric:tabular-nums;
  color:#8b95a3; user-select:none; white-space:nowrap !important;
}
td.rownum .rownum-red{ color:#e5484d; font-weight:600; }

/* 【R174】勾选列（表头「选择」/多选）：全局样式，只放一个复选框。
   【R174b 用户钦定】不用 px 写死——width:1% 收缩法让列宽=内容最小宽（复选框≈28px、「—」更窄），
   随内容自适应、永不被 colgroup 均分撑宽（配合 crm_warehouse.js enableColResize 的 .chkcol 排除）。
   复用入口：BOM 管理（crm_purchase bomL-chk）；后续列表加勾选列直接套 th/td.chkcol 即可。 */
th.chkcol, td.chkcol,
table.resizable th.chkcol, table.resizable td.chkcol,
table.tbl-fixed th.chkcol, table.tbl-fixed td.chkcol{
  width:1%; min-width:0; max-width:none;
  padding-left:4px; padding-right:4px;
  text-align:center; white-space:nowrap !important;
}

/* 【R52】弹窗内 .row > .field 默认均分并保底宽度，防止长拼接里漏写 flex 导致输入框被压扁
   弹窗容器真实类名：#dlg / #dlg2（外层遮罩）+ #dlgbox/#dlg2box + .dlgbody（滚动包裹层），
   项目没有 .dlg / .modal 类，故按实际 id 作用域写，避免波及页面里的 .row。 */
#dlg .dlgbody .row > .field,
#dlg2 .dlgbody .row > .field{flex:1 1 0;min-width:120px}

/* 【客户档案 UI-FIX】联系人行 / 邮箱·行业·来源行的输入框粘连修复：
   根因=全局 input 无 width:100%（仅供货表单独设过），浏览器默认 input 宽 ~179px 大于
   flex 分配给父 .row>div 的宽度(min-width:160px)，input 溢出父格把 gap:10px 吃成负间距。
   这里让目标行 input/select 填满各自父格(box-sizing 含边框)，并把列间距加大到 16px，
   仅作用于联系人行与 .cust-field-row，不影响其它表单行。 */
#contacts_box .ct_row > div > input,
#contacts_box .ct_row .row input,
.cust-field-row > div > input,
.cust-field-row > div > select{width:100%;box-sizing:border-box}
#contacts_box .ct_row,
#contacts_box .ct_row .row,
.cust-field-row{column-gap:16px}

/* 【R165h 档案布局统一】弹窗内所有 .row>div 的 input/select/textarea 填满父格：
   全局 input 无 width:100%（默认 ~179px），整行 div 里输入框只占一小段——
   「地址框不是整行」的真正根因。行内 inline style 优先级更高不受影响。 */
#dlg .dlgbody .row > div > input,
#dlg .dlgbody .row > div > select,
#dlg .dlgbody .row > div > textarea,
#dlg2 .dlgbody .row > div > input,
#dlg2 .dlgbody .row > div > select,
#dlg2 .dlgbody .row > div > textarea{width:100%;box-sizing:border-box}

/* 【R52 签章与回传】合同详情里的状态行与签字版图片预览 */
.seal-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:8px 0;font-size:13px}
.seal-row .seal-lbl{min-width:96px}
.sig-preview{display:block;max-width:100%;height:auto;margin:6px 0}

/* 【R52】手工建合同：供货内容明细表（输入铺满单元格、窄内边距、数字列右对齐不换行）
   【列宽修复】固定布局 + 百分比列宽，收窄单位/数量/单价；采购(#pcf_items)与销售(#nc_items)对称 */
#nc_items,#pcf_items{table-layout:fixed;width:100%}
#nc_items input,#pcf_items input{width:100%;box-sizing:border-box}
#nc_items th,#nc_items td,#pcf_items th,#pcf_items td{padding:4px 6px;vertical-align:middle}
#nc_items thead th,#pcf_items thead th{white-space:nowrap;background:#f4f7fb}
#nc_items td.num,#nc_items th.num,#pcf_items td.num,#pcf_items th.num{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}

/* 【对称选择器】选择报价单/采购订单生成合同弹窗：紧凑行高，让分页条在常见屏幕内可见 */
.srcpick-tbl{width:100%;border-collapse:collapse;font-size:13px}
.srcpick-tbl th,.srcpick-tbl td{padding:5px 8px;vertical-align:middle;line-height:1.3;border-bottom:1px solid #eef1f6}
.srcpick-tbl thead th{position:sticky;top:0;background:#f4f7fb;z-index:1;white-space:nowrap}
.srcpick-tbl th.num,.srcpick-tbl td.num{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.srcpick-tbl .btn.sm{padding:3px 10px}

/* ===== 系统设置·选项列表可视化标签编辑器（明亮主题） =====
   组件用 .opt-* / .tag-editor 独立命名，避免与既有 .tag.ok/.tag.pend 等状态标签冲突。
   内部 hidden input 保留 CSV 值，saveSettings() 直接读 $('#set_xx').value，保存链路不变。 */
.opt-field{margin:10px 0}
.opt-field>label{display:block;margin-bottom:5px;font-weight:600;color:#3b4a5f}
.tag-editor{border:1px solid #dbe3ee;border-radius:8px;background:#fff;padding:8px 10px;min-height:46px;transition:border-color .16s}
.tag-editor:focus-within{border-color:#93b8f7;box-shadow:0 0 0 3px rgba(31,111,235,.10)}
.opt-chips{display:flex;flex-wrap:wrap;gap:6px}
.opt-chip{display:inline-flex;align-items:center;gap:4px;background:#eaf1fe;color:#1f4f9c;border:1px solid #cfe0fb;border-radius:14px;padding:3px 5px 3px 10px;font-size:12.5px;line-height:1.5;white-space:nowrap}
.opt-chip-txt{max-width:260px;overflow:hidden;text-overflow:ellipsis}
.opt-chip-x{border:none;background:transparent;color:#6f8ab5;font-size:15px;line-height:1;cursor:pointer;padding:0 4px;border-radius:50%}
.opt-chip-x:hover{background:#d4e4fb;color:#c0392b}
.tag-add{display:flex;gap:6px;margin-top:8px}
.tag-add .opt-add-input{flex:1;min-width:0;min-height:32px;max-height:96px;resize:vertical;display:block;font-family:inherit;line-height:1.4;border:1px solid #dbe3ee;border-radius:6px;padding:5px 9px;font-size:12.5px;color:#243044;background:#f8fafc;outline:none;transition:all .16s}
.tag-add .opt-add-input:focus{border-color:#93b8f7;background:#fff;box-shadow:0 0 0 3px rgba(31,111,235,.12)}
.tag-add .opt-add-input::placeholder{color:#9aa8ba}
.tag-add .btn{flex:0 0 auto;white-space:nowrap}
.tag-add .opt-copy{background:#eef4ff;color:#1f4f9c;border:1px solid #cfe0fb}
.tag-add .opt-copy:hover{background:#dceaff;border-color:#93b8f7}


/* 【2026-11-21】长列表返回顶部按钮（右侧悬浮，滚动后出现） */
.back-top{position:fixed;right:22px;bottom:78px;z-index:40;width:44px;height:44px;border-radius:50%;
  border:1px solid #cfdae8;background:rgba(255,255,255,.96);color:#2c3e55;cursor:pointer;
  display:none;align-items:center;justify-content:center;padding:0;
  box-shadow:0 6px 20px rgba(20,40,80,.18);backdrop-filter:blur(4px);
  transition:transform .15s ease,background .15s ease,box-shadow .15s ease}
.back-top:hover{background:#fff;transform:translateY(-2px);box-shadow:0 10px 26px rgba(20,40,80,.24)}
.back-top:active{transform:translateY(0)}
.back-top.show{display:flex}
.back-top:focus-visible{outline:2px solid #2f6fed;outline-offset:2px}
@media(max-width:768px){.back-top{right:12px;bottom:70px;width:42px;height:42px}}
@media(prefers-reduced-motion:reduce){.back-top{transition:none}}
