* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --primary: #2563eb; --primary-dark: #1d4ed8; --bg: #f4f6fa; --card: #fff;
  --text: #1f2937; --muted: #6b7280; --border: #e5e7eb; --danger: #dc2626;
  --green: #16a34a; --orange: #ea580c; --sidebar: #101828;
}
html, body { height: 100%; }
body { font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif; background: var(--bg); color: var(--text); font-size: 14px; }
.hidden { display: none !important; }

/* ---------- 登录 ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #3b82f6 100%); }
.login-card { background: #fff; border-radius: 16px; padding: 40px 44px; width: 400px; box-shadow: 0 24px 60px rgba(0,0,0,.28); text-align: center; }
.login-logo { font-size: 48px; }
.login-card h1 { font-size: 22px; margin: 8px 0 4px; }
.login-sub { color: var(--muted); font-size: 13px; margin-bottom: 26px; }
.login-card form input { width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 14px; font-size: 14px; outline: none; }
.login-card form input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.login-msg { color: var(--danger); font-size: 13px; min-height: 18px; margin-top: 6px; }
.login-tip { margin-top: 18px; font-size: 12px; color: var(--muted); text-align: left; line-height: 1.8; background: #f9fafb; border-radius: 8px; padding: 10px 12px; }
/* v2.168 登录页忘记密码 / 修改密码链接 + 切换面板 */
.login-links { margin-top: 14px; font-size: 13px; }
.login-links a { color: var(--primary); cursor: pointer; text-decoration: none; }
.login-links a:hover { text-decoration: underline; }
.login-panel { text-align: left; }
.login-panel.hidden, .login-links.hidden { display: none; }
.login-panel h3 { color: #1f2937; }
.login-panel p { color: #94a3b8; }

/* ---------- 布局 ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 210px; background: var(--sidebar); color: #d0d5dd; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 8px; padding: 18px 20px; font-size: 17px; color: #fff; font-weight: bold; }
.brand i { font-style: normal; color: #93c5fd; font-size: 12px; margin-left: 2px; }
#nav { flex: 1; padding: 8px 10px; }
#nav a { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 8px; cursor: pointer; margin-bottom: 2px; transition: all .15s; }
#nav a .nav-icon { display: inline-flex; align-items: center; justify-content: center; width: 22px; flex-shrink: 0; font-size: 15px; line-height: 1; }
#nav a .nav-label { flex: 1; line-height: 1; }
#nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
#nav a.active { background: var(--primary); color: #fff; }
/* v2.354 侧边栏未读角标（展会留资提醒） */
#nav a .nav-dot { flex-shrink: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #ef4444; color: #fff; font-size: 11px; font-weight: bold; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px rgba(239,68,68,.25); }
.sidebar-foot { padding: 18px 14px 16px; border-top: 1px solid rgba(255,255,255,.08); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.cur-user { text-align: center; font-size: 12px; color: #9ca3af; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.cu-name { line-height: 1.6; }
.cu-badge { line-height: 1; }
/* min-width:0 是关键——flex 子项默认 min-width:auto 会被宽表格撑开导致内容溢出页面；加它后超宽表格在主区域内横向滚动 */
.main { flex: 1; min-width: 0; padding: 22px 26px; overflow-x: auto; }
/* 宽表格滚动容器（贴在表格底部滚动条，不撑破卡片） */
.tbl-scroll { overflow-x: auto; }

/* ---------- 通用 ---------- */
.page-title { font-size: 20px; font-weight: bold; margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.page-title small { font-size: 13px; color: var(--muted); font-weight: normal; }
.card { background: var(--card); border-radius: 12px; padding: 18px; box-shadow: 0 1px 3px rgba(16,24,40,.06); margin-bottom: 16px; }
.card h3 { font-size: 15px; margin-bottom: 12px; }
.btn { border: none; border-radius: 8px; padding: 8px 16px; font-size: 14px; cursor: pointer; background: #eef2f7; color: var(--text); transition: all .15s; font-family: inherit; }
.btn:hover { filter: brightness(.96); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); filter: none; }
.btn-danger { background: #fee2e2; color: var(--danger); }
.btn-ghost { background: transparent; color: #9ca3af; border: 1px solid rgba(255,255,255,.15); }
.btn-sm { padding: 4px 10px; font-size: 12px; border-radius: 6px; }
/* v2.485 日记账：已核对用绿色描边（不抢主按钮），一眼区分「待核对 / 已核对」；
   操作列改成「核对」一行 +「修改 / 删除」一行，三按钮横排会把 10 列表格撑到右边缘裁字 */
.btn.jr-okbtn { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.btn.jr-okbtn:hover { background: #d1fae5; }
.jr-op { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.jr-op1 { display: flex; gap: 4px; align-items: center; }
.jr-op2 { display: flex; gap: 4px; }
.jr-op .btn { white-space: nowrap; }
/* v2.522 日记账 ↑↓ 顺序调整：做窄一点，和「核对」并排不挤 */
.jr-mv { padding: 1px 5px; min-width: 24px; line-height: 1.5; font-size: 12px; }
.jr-mv:hover { border-color: var(--primary); color: var(--primary); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.toolbar { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.toolbar input, .toolbar select { padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; outline: none; background: #fff; }

table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 9px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 10px; border-bottom: 1px solid #f2f4f7; vertical-align: middle; }
.tbl tr:hover td { background: #f8faff; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .actions { display: flex; gap: 6px; flex-wrap: wrap; }
/* v2.435：列多被挤压时按钮文字会被拆成竖排单字（客户列表 16 列尤其明显），按钮内一律不换行，
   放不下时整颗按钮换到下一行（.actions 已是 wrap） */
.tbl .actions .btn { flex: 0 0 auto; white-space: nowrap; }
/* v2.501 员工档案 → 领用资产：弹窗改宽版后日期、操作按钮不必再换行，一屏看完 10 列 */
.tbl.emp-item-tbl td:nth-child(6), .tbl.emp-item-tbl td:nth-child(8) { white-space: nowrap; }
.tbl.emp-item-tbl .actions { flex-wrap: nowrap; }
/* v2.556 仓库列表（全部仓库 / 单仓）13~14 列，1280 屏加「删除」后总宽 1041 > 982 会把操作列挤成竖排单字，
   这里只收紧本表的左右内边距（省约 78px），其他表格不受影响 */
/* v2.556 列多的表（产品列表 14 列 / 仓库列表 13~14 列）：只对本表收紧左右留白，
   不牵动全站表格的其他列；配合表头缩写，1280 屏才放得下操作列 */
.tbl.tbl-tight th, .tbl.tbl-tight td { padding-left: 5px; padding-right: 5px; }
.tbl.tbl-tight td .actions { gap: 4px; }
/* 操作列按钮收紧左右内边距：一列只有 100~150px，宽松的 padding 会让每颗按钮独占一行 */
.tbl.tbl-tight td .actions .btn { padding-left: 6px; padding-right: 6px; }
/* v2.452 分段标签（生产工单：进行中 / 已完成 / 已取消；v2.453 内部订单：全部 + 各状态）
   ——代替表内分组横条（wo-grp / po-grp 均已废弃），页面不再被几段说明文字拉长 */
.seg { display: inline-flex; gap: 4px; background: #eef2f7; border-radius: 10px; padding: 4px; margin-bottom: 12px; max-width: 100%; overflow-x: auto; }
.seg button { border: none; background: none; font-family: inherit; font-size: 13px; color: var(--muted); padding: 7px 14px; border-radius: 8px; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.seg button b { font-weight: 600; background: rgba(15, 23, 42, .08); border-radius: 999px; padding: 0 7px; font-size: 12px; line-height: 18px; min-width: 20px; text-align: center; }
.seg button.active { background: #fff; color: var(--primary); font-weight: 600; box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.seg button.active b { background: var(--primary); color: #fff; }

/* v2.422 员工档案列多（15 列），桌面端保证列宽不挤压成竖排文字，窄屏交给 .tbl 自身横向滚动 */
.emp-tbl { min-width: 1400px; }
.emp-tbl td { white-space: nowrap; }
@media (max-width: 760px) { .emp-tbl { min-width: 1080px; } }

/* v2.225 手机端卡片列表：宽表格在 ≤760px 改为竖排卡片（桌面显示表格隐藏卡片，手机反之） */
.m-cards { display: none; }
/* v2.457：只在手机显示（桌面隐藏）——用于把状态提示挂到首列，避免手机上要横滑才能看到 */
.m-only { display: none; }
.m-card { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; background: #fff; }
.m-card .m-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.m-card .m-title { font-weight: 600; font-size: 13px; word-break: break-word; }
.m-card .m-sub { font-size: 12px; color: var(--muted); margin-top: 3px; word-break: break-all; line-height: 1.6; }
.m-card .m-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.m-card .m-rows { margin-top: 8px; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 12px; align-items: baseline; }
.m-card .m-rows .k { color: var(--muted); white-space: nowrap; }
.m-card .m-rows .v { text-align: right; word-break: break-all; }
.m-card .m-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); }

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; white-space: nowrap; }
.b-gray { background: #f3f4f6; color: #4b5563; }
.b-blue { background: #dbeafe; color: #1d4ed8; }
.b-green { background: #dcfce7; color: #15803d; }
.b-orange { background: #ffedd5; color: #c2410c; }
.b-red { background: #fee2e2; color: #b91c1c; }
.b-purple { background: #ede9fe; color: #6d28d9; }

/* ---------- v2.327 审批流程节点（费用报销每个节点显示审批通过时间） ---------- */
.exp-flow { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.exp-flow .exp-node { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.35; padding: 2px 9px; }
.exp-flow .exp-node .exp-node-t { white-space: nowrap; }
.exp-flow .exp-node .exp-node-tm { font-size: 10px; opacity: .78; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- v2.516 办公用品完整流程时间轴（提交 → 审批 → 采购完成 → 付款 / 报销 → 结清） ---------- */
.os-tl { position: relative; margin: 4px 0 0 6px; padding-left: 16px; border-left: 2px dashed var(--border, #e5e7eb); }
.os-tl-i { position: relative; padding: 5px 0 7px 0; }
.os-tl-i .os-tl-dot { position: absolute; left: -23px; top: 9px; width: 10px; height: 10px; border-radius: 50%; background: #cbd5e1; box-shadow: 0 0 0 3px #fff; }
.os-tl-i.done .os-tl-dot { background: #16a34a; }
.os-tl-i.cur .os-tl-dot { background: #f59e0b; }
.os-tl-i.fail .os-tl-dot { background: #dc2626; }
.os-tl-i .os-tl-t { font-size: 13px; font-weight: 600; color: var(--text, #111827); }
.os-tl-i.wait .os-tl-t { color: var(--muted, #9ca3af); font-weight: 500; }
.os-tl-i.fail .os-tl-t { color: #b91c1c; }
.os-tl-i .os-tl-s { font-size: 11px; color: var(--muted, #6b7280); line-height: 1.6; }

.empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* ---------- 工作台 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 16px; }
/* v2.536 经营数据：4 张一行的结论卡（毛利 / 净利 / 进销项），窄屏折成 2 列、手机 1 列 */
.stat-grid.sg-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1180px) { .stat-grid.sg-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .stat-grid.sg-4 { grid-template-columns: 1fr; } }
/* v2.580 弹窗内的 4 项概览：手机端固定两列——全局 .stat-grid 在 560 以下会切成 1 列，
   4 张卡竖排把下面的表格挤出首屏（返工/报废处理记录窗实测） */
@media (max-width: 560px) {
  .stat-grid.sg-m2 { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat-grid.sg-m2 .stat { padding: 9px 10px; }
  .stat-grid.sg-m2 .stat .value { font-size: 16px; }
}
/* 分段切换按钮（收支分析：按月 / 按年） */
.biz-seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #fff; }
.biz-seg button { border: 0; background: transparent; padding: 5px 15px; font-size: 12.5px; cursor: pointer; color: var(--muted); font-family: inherit; }
.biz-seg button:hover { background: #f1f5f9; }
.biz-seg button.on { background: var(--primary); color: #fff; font-weight: 600; }
.stat { background: var(--card); border-radius: 12px; padding: 18px 20px; box-shadow: 0 1px 3px rgba(16,24,40,.06); }
.stat .label { color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.stat .value { font-size: 18px; font-weight: bold; font-variant-numeric: tabular-nums; color: var(--primary); }
.stat .value small { font-size: 10px; color: var(--muted); font-weight: normal; margin-left: 4px; }
.stat .sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.dash-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
/* v2.536：dash-cols 的两列里常放表格，grid 子项默认 min-width:auto 会被表格撑宽、溢出卡片；
   置 0 后由内层 overflow-x:auto 正常产生横向滚动条（手机端尤为重要） */
.dash-cols > div { min-width: 0; }
@media (max-width: 1100px) { .dash-cols { grid-template-columns: 1fr; } }
.mini-list { list-style: none; }
.mini-list li { display: flex; justify-content: space-between; align-items: center; padding: 9px 4px; border-bottom: 1px solid #f2f4f7; font-size: 13px; gap: 8px; }
.mini-list li:last-child { border-bottom: none; }
.mini-list .muted { color: var(--muted); }

/* ---------- 弹窗 / 表单 ---------- */
.modal-mask { position: fixed; inset: 0; background: rgba(16,24,40,.5); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal { background: #fff; border-radius: 14px; width: 640px; max-width: 100%; max-height: 88vh; display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(0,0,0,.25); }
.modal.wide { width: min(1280px, 94vw); }
/* v2.429：标题栏作为拖动手柄（.modal-head 上加 cursor/禁止选字，touch-action 交给 JS 的 pointer 事件） */
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 22px; border-bottom: 1px solid var(--border); font-size: 16px; font-weight: bold; cursor: move; user-select: none; -webkit-user-select: none; touch-action: none; }
.modal-head.grabbing { cursor: grabbing; }
.modal-head #modalTitle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-head .modal-close { cursor: pointer; flex: 0 0 auto; margin-left: 10px; touch-action: auto; }
/* 拖动后不再受 flex 居中影响：绝对定位由 JS 写 left/top，弹窗本身仍保留 max-height 与内部滚动 */
.modal.modal-dragged { position: absolute; max-height: 88vh; }
.modal-close { border: none; background: none; font-size: 16px; cursor: pointer; color: var(--muted); padding: 4px 8px; border-radius: 6px; }
.modal-close:hover { background: #f3f4f6; }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
/* v2.501 宽版弹窗里的表单用三列（员工档案「基本信息」1280px 下两列会拉得很空）；窄屏仍走下面的单列 */
@media (min-width: 1100px) { .form-grid.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; }
.field input, .field select, .field textarea { width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; outline: none; font-family: inherit; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.field textarea { resize: vertical; min-height: 60px; }
.form-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.form-err { color: var(--danger); font-size: 13px; margin-top: 10px; min-height: 16px; }
/* v2.245 报价单默认商务条款提醒 */
.default-tip { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 8px 12px; border-radius: 8px; background: #fffbeb; border: 1px solid #fcd34d; color: #92400e; font-size: 13px; }
.default-tip::before { content: '⚠️'; }
.field input.input-default, .field textarea.input-default, .field select.input-default { border-color: #f59e0b; background: #fffbeb; }
.field input.input-default:focus, .field textarea.input-default:focus, .field select.input-default:focus { border-color: #d97706; box-shadow: 0 0 0 3px rgba(245,158,11,.15); }

/* 订单明细行 */
.item-row { display: grid; grid-template-columns: 2fr 90px 110px 100px 34px; gap: 8px; margin-bottom: 8px; align-items: center; }
.item-row input, .item-row select { padding: 8px 8px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; }
.item-total { text-align: right; color: var(--muted); font-size: 13px; }
/* v2.220 商品选择器：自绘可搜索下拉（原生 datalist 在移动端 / Safari 不支持，改为自有实现） */
.prod-picker, .cust-picker, .ent-picker { position: relative; }
.prod-picker .prod-search, .cust-picker .cust-search, .ent-picker .ent-q { width: 100%; }
.prod-picker .prod-search:focus, .cust-picker .cust-search:focus, .ent-picker .ent-q:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); outline: none; }
/* v2.446 通用可搜索选择器：供应商 / 产品 / 人员 / 客户共用一套候选面板 */
.ent-picker .ent-q { padding: 8px 8px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; background: #fff; }
.ent-picker .ent-q:disabled { background: #f4f6fa; color: var(--muted); }
/* v2.450 多选变体（产品「供应商」）：已选项以 chip 展示，搜索框继续追加 */
.ent-multi .ent-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ent-multi .ent-chips:not(:empty) { margin-bottom: 6px; }
.ent-chip { display: inline-flex; align-items: center; gap: 2px; max-width: 100%;
  background: #eef2ff; border: 1px solid #c7d2fe; color: #3730a3; border-radius: 999px;
  padding: 2px 2px 2px 10px; font-size: 12px; line-height: 18px; overflow-wrap: anywhere; }
.ent-chip button { flex: 0 0 auto; border: 0; background: transparent; color: #4338ca; cursor: pointer;
  font-size: 12px; line-height: 1; padding: 3px 5px; border-radius: 999px; }
.ent-chip button:hover { background: #c7d2fe; }
.ent-drop { position: absolute; left: 0; right: auto; top: calc(100% + 4px); z-index: 60; background: #fff;
  border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 32px rgba(16,24,40,.16);
  max-height: 260px; overflow-y: auto; -webkit-overflow-scrolling: touch;
  min-width: 100%; width: max-content; max-width: min(520px, 92vw); }
.ent-drop.drop-up { top: auto; bottom: calc(100% + 4px); }
/* v2.483：多选（产品档案供应商）常在窄字段里，候选面板给个最小宽度，免得「＋ 新建供应商」那行被挤成两行 */
.ent-multi .ent-drop { min-width: min(320px, 92vw); }
.ent-drop .pd-t b { font-weight: 500; }
/* v2.473 选择器内嵌「新建供应商」：下拉里直接摊开一张小表单，不叠弹窗（避免顶掉填了一半的采购单）
   v2.480：候选多时列表要滚动，这一行 sticky 吸在面板底部，保证「随时看得到入口」 */
.pd-item.pd-new { position: sticky; bottom: 0; z-index: 1; border-top: 1px dashed var(--border); background: #f8fafc; }
.pd-item.pd-new .pd-t b { color: var(--primary); }
.ent-drop.creating { max-height: none; overflow: visible; width: min(430px, 92vw); }
/* v2.484 商品下拉里内嵌「让仓库建档」表单：同样脱离候选列表的滚动/裁切 */
.prod-drop.creating { right: auto; max-height: none; overflow: visible; width: min(430px, 92vw); }
/* v2.482 客户下拉里的同一套内嵌建档表单（报价单 / 供货合同） */
.cust-drop.creating { max-height: none; overflow: visible; padding: 0; width: min(430px, 92vw); max-width: none; }
.ent-new { padding: 10px 12px; }
.ent-new-t { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.ent-new-t small { display: block; font-weight: 400; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.ent-new label { display: block; font-size: 11.5px; color: var(--muted); margin: 6px 0 3px; }
.ent-new input, .ent-new select { width: 100%; padding: 6px 8px; border: 1px solid var(--border); border-radius: 7px; font-size: 12.5px; background: #fff; }
.ent-new input:focus, .ent-new select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); outline: none; }
.ent-new-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ent-new-f { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.ent-new-err { color: var(--danger); font-size: 12px; margin-top: 6px; }
.ent-new-err:empty { display: none; }
/* v2.486 快速建档：负责销售员说明（只在总经理 / 财务的表单里出现） */
.ent-new-tip { font-size: 11.5px; color: var(--muted); margin-top: 4px; line-height: 1.55; }
.prod-drop, .cust-drop { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 60; background: #fff;
  border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 32px rgba(16,24,40,.16);
  max-height: 260px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.prod-drop.drop-up, .cust-drop.drop-up { top: auto; bottom: calc(100% + 4px); }
/* v2.436 客户下拉：客户名普遍比字段长，面板按内容放宽（仍限制在视口内） */
.cust-drop { right: auto; min-width: 100%; width: max-content; max-width: min(420px, 90vw); }
.pd-item { padding: 8px 10px; cursor: pointer; border-bottom: 1px solid #f2f4f7; font-size: 13px; }
.pd-item:last-child { border-bottom: none; }
.pd-item:hover, .pd-item.active { background: #eff6ff; }
.pd-item .pd-t { color: var(--text); }
.pd-item .pd-s { color: var(--muted); font-size: 12px; margin-top: 2px; }
.pd-item .pd-stock { color: var(--primary); }
/* v2.441 候选行第二行：库存 · 供应商（销售员据此判断这单向谁采购） */
.pd-item .pd-sep { color: #d0d5dd; margin: 0 2px; }
.pd-item .pd-nosup { color: var(--danger); opacity: .8; }
.pd-item .pd-paused { color: var(--orange); }
.pd-item .pd-int { margin-left: 5px; padding: 0 5px; border-radius: 6px; border: 1px solid #fdba74; background: #fff7ed; color: #9a3412; font-size: 11px; line-height: 16px; display: inline-block; }
/* v2.455 销售单据候选里直接标出售价（渠道价 / 终端价 / 参考价，随客户类型变） */
.pd-item .pd-price { color: var(--primary); font-weight: 600; }
/* v2.455 销售单据商品行的价格提示：最近调价 + 该客户上次成交价；无内容时不占位 */
.item-row .item-price-hint { grid-column: 1 / -1; order: 3; display: none; font-size: 12px; line-height: 1.7; color: var(--muted); padding: 0 2px; }
.item-row .item-price-hint.on { display: block; }
.item-price-hint .ph-chg { color: #8a5a00; }
.item-price-hint .ph-up { color: var(--danger); }
.item-price-hint .ph-down { color: var(--green); }
.item-price-hint .ph-sep { color: #cbd5e1; }
/* 只绑 1 家供应商时行内是只读展示（v2.441），禁用态不要看起来像坏了 */
.item-row select[data-item-supplier]:disabled { background: #f8fafc; color: var(--text); opacity: 1; cursor: default; }
/* v2.441 行内供应商单独占一行：.item-row 只有 5 列，塞进去会被挤成 30px 只剩一个箭头；
   order:1 让它排在 ✕ 之后，否则 ✕ 会被挤到第三行拉成一条空条 */
.item-row > [data-item-supplier] { order: 1; grid-column: 1 / -1; width: auto; max-width: 300px; margin-top: -2px; }
/* v2.568 未绑供应商的产品改为「可选全部供应商」后，选项 ≥8 会被全局 selEnhance 接管成按钮。
   按钮才是真正的 grid item（.sel-pick 是 display:contents），上一行的整行占位规则要照抄给它，
   否则会被塞进第一列 2fr 里压成一条；禁用态也沿用只读样式，别看起来像坏了 */
.item-row > .sel-pick > .sel-btn.item-sup { order: 1; grid-column: 1 / -1; width: auto; max-width: 300px; margin-top: -2px; }
.item-row > .sel-pick > .sel-btn.item-sup:disabled { background: #f8fafc; color: var(--text); opacity: 1; cursor: default; }
.pd-empty { padding: 12px; color: var(--muted); font-size: 13px; text-align: center; }
/* v2.569 销售单据候选顶部提示：被过滤掉的技术部仓库商品（这些仓的货不参与销售）。
   放在候选列表最前面，打开面板第一眼就能看到「有些商品被藏了」，也不压住底部「让仓库建档」入口 */
.pd-note { padding: 7px 10px; border-bottom: 1px solid #f2f4f7; background: #fff7ed; color: #9a3412; font-size: 12px; line-height: 1.6; }
/* v2.569 单据列表「商品 / 型号」列：型号灰字，非销售仓商品红字提示 */
.item-spec { color: var(--muted); }
.item-warn { color: var(--danger); font-size: 11px; line-height: 1.5; margin-top: 2px; }
.order-summary { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 20px; padding: 12px 4px; font-size: 15px; }
/* v2.467 合计三段（不含税金额 / 税额 / 价税合计）各成一块：窄屏靠 flex-direction:column 变 3 行，
   若继续用「　·　」文字分隔符，手机端会被拆成 8 行碎片。
   ★标签必须整体包在 .os-k 里：.os-i 是 flex，裸露的文字节点会被当成独立弹性项，
     手机端「税额（13%）：」就会被 space-between 拉成「税额（  13%  ）：」三段 */
.order-summary .os-i { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.order-summary .os-k { white-space: nowrap; }
.order-summary b { color: var(--primary); font-size: 18px; }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 16px; flex-wrap: wrap; }
.tabs button { border: none; background: none; padding: 9px 16px; font-size: 14px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -2px; font-family: inherit; }
.tabs button.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: bold; }
.tabs .pill { padding: 7px 16px; font-size: 14px; cursor: pointer; color: var(--muted); border-radius: 16px; background: var(--bg); border: 1px solid var(--border); transition: all .15s; }
.tabs .pill:hover { color: var(--primary); border-color: var(--primary); }
.tabs .pill.active { color: #fff; background: var(--primary); border-color: var(--primary); font-weight: 600; }

/* 研发 */
.prog-wrap { background: #f3f4f6; border-radius: 999px; height: 8px; width: 120px; overflow: hidden; display: inline-block; vertical-align: middle; margin-right: 6px; }
/* ★必须 display:block：span 默认 inline，width/height 全被忽略 → 进度条只剩灰底槽、填充永远不可见 */
.prog-bar { display: block; height: 100%; background: var(--primary); border-radius: 999px; }
.task-item { display: flex; align-items: center; gap: 10px; padding: 9px 6px; border-bottom: 1px solid #f2f4f7; }
.task-item:last-child { border-bottom: none; }
.task-item input[type=checkbox] { width: 17px; height: 17px; cursor: pointer; }
.task-item .tname { flex: 1; }
.task-item.done .tname { color: var(--muted); text-decoration: line-through; }

/* 客户详情 */
.timeline { list-style: none; }
.timeline li { padding: 10px 0 10px 14px; border-left: 2px solid #dbeafe; position: relative; }
.timeline li::before { content: ''; position: absolute; left: -6px; top: 16px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.timeline .t-date { font-size: 12px; color: var(--muted); }
.timeline .t-op { font-size: 12px; color: var(--primary); margin-left: 8px; }

/* Toast */
.toast { position: fixed; top: 22px; left: 50%; transform: translateX(-50%); background: #101828; color: #fff; padding: 11px 22px; border-radius: 10px; z-index: 200; box-shadow: 0 10px 30px rgba(0,0,0,.25); font-size: 14px; max-width: 90vw; }
.toast.err { background: var(--danger); }

/* v2.216 移动端 UI 适配：侧边栏转顶栏 / 表格 / 弹窗 / 表单 / stat / toolbar / 登录页全宽 */
@media (max-width: 760px) {
  /* 整体：顶栏 + 主区纵向，避免水平溢出 */
  body { font-size: 13px; }
  .app { flex-direction: column; min-height: 100vh; }
  .main { padding: 14px 14px 28px; }

  /* 侧边栏 → 顶部条：横向 nav 滚动 */
  .sidebar {
    width: 100%;
    height: auto;
    position: sticky;
    top: 0;
    z-index: 50;
    flex-direction: column;
    align-items: stretch;
  }
  .brand {
    padding: 10px 14px;
    font-size: 14px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    gap: 6px;
  }
  .brand-icon { width: 26px !important; height: 26px !important; }
  #nav {
    flex: 0;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 6px 8px 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    gap: 2px;
  }
  #nav a {
    flex: 0 0 auto;
    padding: 7px 12px;
    margin-bottom: 0;
    font-size: 13px;
    white-space: nowrap;
  }

  /* 顶栏底部：账号信息 + 退出 + 版本号 → 横排一行 */
  .sidebar-foot {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-top: 1px solid rgba(255,255,255,.08);
  }
  .cur-user {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    font-size: 12px;
  }
  .cu-name { font-size: 12px; }
  .sidebar-foot .btn { width: auto !important; padding: 4px 12px !important; font-size: 12px !important; }
  .sidebar-foot > div:last-child { display: none; }

  /* 页面标题：标题与说明换行垂直堆叠 */
  .page-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    font-size: 17px;
    margin-bottom: 12px;
  }
  .page-title small { font-size: 12px; line-height: 1.5; }

  /* 卡片：缩小 padding */
  .card { padding: 14px; border-radius: 10px; margin-bottom: 12px; }
  .card h3 { font-size: 14px; margin-bottom: 10px; }

  /* 工作台统计：1 列，缩小 padding 和字号 */
  .stat-grid { grid-template-columns: 1fr; gap: 10px; }
  .stat { padding: 12px 14px; }
  .stat .value { font-size: 16px; }
  .stat .value small { font-size: 10px; }

  /* 工作台双栏 → 单栏 */
  .dash-cols { grid-template-columns: 1fr; gap: 12px; }

  /* 工具条：搜索 / 筛选 / 按钮列向堆叠 */
  .toolbar { flex-direction: column; align-items: stretch; gap: 8px; }
  .toolbar > * { width: 100% !important; max-width: none !important; }
  .toolbar input, .toolbar select { width: 100%; font-size: 14px; padding: 10px 12px; }
  .toolbar .btn { width: auto; align-self: flex-start; }

  /* tabs：横向滚动不换行 */
  .tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tabs button { flex: 0 0 auto; padding: 8px 12px; font-size: 13px; }

  /* ---------- v2.413 移动端横向溢出治理 ----------
     ★旧写法只按 100% 宽度挤压表格，全站 189 处列表页里只有 20 处套了 .tbl-scroll，
     其余表格把 .main 一起撑开 → 手机上整页被推出屏幕：卡片/工具栏右侧被切、
     左侧文字（如单据提示语）看不见，必须左右拖动整页才能看到内容。
     改为「表格自己横向滚动」：卡片、工具栏、按钮始终留在屏幕内，只有表格内容左右滑。 */
  .main { overflow-x: hidden; }
  .tbl {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    font-size: 12.5px;
    /* 左右边缘阴影：提示「这一侧还有内容」，滑到边界自动消失 */
    background-color: #fff;
    background-image:
      linear-gradient(to right, #fff 40%, rgba(255,255,255,0)),
      linear-gradient(to left, #fff 40%, rgba(255,255,255,0)),
      radial-gradient(farthest-side at 0% 50%, rgba(16,24,40,.16), rgba(16,24,40,0)),
      radial-gradient(farthest-side at 100% 50%, rgba(16,24,40,.16), rgba(16,24,40,0));
    background-position: left center, right center, left center, right center;
    background-repeat: no-repeat;
    background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%;
    background-attachment: local, local, scroll, scroll;
  }
  .tbl th, .tbl td { padding: 7px 6px; word-break: break-word; }
  .tbl th { white-space: nowrap; }
  /* 单元格不换行、超长内容用省略号收口（完整的在「详情」里看），否则一列文字会被压成一字一行 */
  .tbl td { white-space: nowrap; max-width: 70vw; overflow: hidden; text-overflow: ellipsis; }
  /* 最后一列通常是「操作」按钮：不设宽度上限、按钮不换行，否则被裁掉一半点不到 */
  .tbl td:last-child { max-width: none; }
  .tbl td .actions { flex-wrap: nowrap; }
  .tbl td input, .tbl td select, .tbl td textarea { max-width: 100%; box-sizing: border-box; }
  /* 首列（单号 / 客户名）横向滚动时钉在左侧，滑到后面列也能知道在看哪一行 */
  .tbl th:first-child, .tbl td:first-child {
    position: sticky; left: 0; z-index: 1; background: #fff;
    box-shadow: 1px 0 0 #eef1f6;
  }
  .tbl th:first-child { z-index: 2; }
  /* v2.452 分段标签在手机上占满一行，超出可横向滑动（分组横条 wo-grp / po-grp 已于 v2.453 全部废弃） */
  .seg { display: flex; width: 100%; }
  .seg button { flex: 0 0 auto; padding: 7px 11px; }
  /* v2.449 跨列单元格（分组提示「暂无…」、说明行）在手机上同样要能换行整段显示，不被 nowrap 裁成半句；
     左对齐是因为手机端表格本身宽 700+px 可横向滚动，居中文案会落在首屏之外只露半句 */
  .tbl td[colspan], .tbl td[colspan]:first-child {
    white-space: normal; max-width: none; overflow: visible; text-overflow: clip;
    position: static; box-shadow: none; text-align: left !important;
  }
  /* 空状态文案在大屏用 40px 上下留白，手机上太占高度 */
  .empty { padding: 20px 0; }
  /* 已有 .tbl-scroll 包裹层时交给内层滚动，避免出现双层滚动条 */
  .tbl-scroll { overflow-x: visible; }
  /* 图片/图表类内容兜底，不撑破卡片 */
  .card img, .card video, .card canvas, .rt-content img { max-width: 100%; height: auto; }

  /* v2.225：宽表格列表 → 手机竖排卡片（桌面表格隐藏） */
  .m-cards { display: block; }
  .m-only { display: block; }
  .m-hide { display: none !important; }
  .m-card { padding: 9px 11px; margin-bottom: 9px; }

  /* 弹窗：几乎全屏，外边距收缩 */
  .modal-mask { padding: 8px; align-items: flex-end; }
  .modal { width: 100% !important; max-width: 100% !important; max-height: 92vh; border-radius: 12px 12px 0 0; }
  .modal.wide { width: 100% !important; }
  .modal-head { padding: 12px 14px; font-size: 15px; cursor: default; touch-action: auto; }
  .modal-body { padding: 14px; }
  /* v2.429：手机端弹窗为底部全宽抽屉，不启用拖动，恢复内部滚动与手势 */
  .modal.modal-dragged { position: static; }

  /* 表单：单列 */
  .form-grid { grid-template-columns: 1fr; gap: 12px; }
  .form-foot { flex-direction: column-reverse; gap: 8px; }
  .form-foot .btn { width: 100%; }

  /* 订单明细行：两行 */
  .item-row { grid-template-columns: 1fr 1fr; gap: 6px; }
  .item-row > * { font-size: 13px; }
  /* 商品选择器占满整行 + 下拉限高（手机输入时不被键盘遮挡） */
  .item-row .prod-picker { grid-column: 1 / -1; }
  .prod-drop { max-height: 220px; }
  .order-summary { flex-direction: column; align-items: stretch; gap: 2px; padding: 10px 4px; font-size: 14px; }
  /* 手机端三段各占一行：标签靠左、金额靠右，比整行右对齐更好扫读 */
  .order-summary .os-i { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
  .order-summary b { font-size: 16px; }

  /* 登录页：全宽 */
  .login-card { width: 100%; max-width: 360px; padding: 28px 22px; border-radius: 12px; }
  .login-card h1 { font-size: 18px; }
  .login-sub { font-size: 12px; margin-bottom: 18px; }
  .login-logo img { width: 60px !important; height: 60px !important; }

  /* Toast 收紧 */
  .toast { font-size: 13px; padding: 9px 16px; max-width: 86vw; }
}

/* v2.216 极窄屏（<= 380px）兜底：进一步收缩字号与 padding */
@media (max-width: 380px) {
  body { font-size: 12px; }
  .main { padding: 10px 10px 24px; }
  .card { padding: 12px; }
  .stat .value { font-size: 15px; }
  .brand { font-size: 13px; }
  #nav a { padding: 6px 10px; font-size: 12px; }
}

/* ---------- v2.253 知识库 / 解决方案：富文本编辑器与正文渲染 ---------- */
.rt-toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; background: var(--bg); border: 1px solid var(--border); border-bottom: none; border-radius: 8px 8px 0 0; }
.rt-toolbar button { min-width: 34px; height: 30px; padding: 0 8px; border: 1px solid var(--border); background: #fff; border-radius: 6px; cursor: pointer; font-size: 13px; line-height: 1; color: var(--text); }
.rt-toolbar button:hover { border-color: var(--primary); color: var(--primary); background: #f0f6ff; }
.rt-editor { min-height: 200px; max-height: 46vh; overflow-y: auto; padding: 10px 12px; border: 1px solid var(--border); border-radius: 0 0 8px 8px; background: #fff; outline: none; line-height: 1.75; }
.rt-editor:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .10); }
.rt-content { line-height: 1.8; word-break: break-word; }
.rt-content h1, .rt-content h2, .rt-content h3, .rt-content h4 { margin: 12px 0 6px; line-height: 1.4; }
.rt-content h1 { font-size: 19px; } .rt-content h2 { font-size: 17px; }
.rt-content h3 { font-size: 15.5px; } .rt-content h4 { font-size: 14.5px; }
.rt-content p { margin: 6px 0; }
.rt-content ul, .rt-content ol { margin: 6px 0 6px 22px; }
.rt-content li { margin: 3px 0; }
.rt-content blockquote { margin: 8px 0; padding: 6px 12px; border-left: 3px solid var(--primary); background: var(--bg); color: var(--muted); border-radius: 0 6px 6px 0; }
.rt-content code { background: #f3f4f6; padding: 1px 5px; border-radius: 4px; font-family: Consolas, Monaco, monospace; font-size: 13px; }
.rt-content pre { background: #f3f4f6; padding: 10px 12px; border-radius: 8px; overflow-x: auto; font-family: Consolas, Monaco, monospace; font-size: 13px; }
.rt-content a { color: var(--primary); }
.rt-content table { border-collapse: collapse; margin: 8px 0; }
.rt-content td, .rt-content th { border: 1px solid var(--border); padding: 5px 9px; }
.rt-content hr { border: none; border-top: 1px solid var(--border); margin: 10px 0; }

/* v2.257：入库检验报告单 —— 公司 LOGO + 公司名 + 检验单 + 检验结论 */
.inspect-report { font-size: 14px; color: #1e293b; background: #fff; }
.inspect-report .ir-header { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border: 2px solid #1e293b; border-radius: 10px; margin-bottom: 14px; background: linear-gradient(180deg, #fff 0%, #f8fafc 100%); }
.inspect-report .ir-logo { width: 64px; height: 64px; object-fit: contain; flex-shrink: 0; }
.inspect-report .ir-company { flex: 1; }
.inspect-report .ir-company-name { font-size: 18px; font-weight: 700; color: #0f172a; letter-spacing: 0.5px; }
.inspect-report .ir-company-sub { font-size: 12px; color: #64748b; margin-top: 3px; }
.inspect-report .ir-title-block { text-align: right; }
.inspect-report .ir-title { font-size: 17px; font-weight: 700; color: #1e40af; letter-spacing: 1px; }
.inspect-report .ir-no { font-size: 12px; color: #475569; margin-top: 4px; }
.inspect-report .ir-status { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; margin-left: 6px; background: #e2e8f0; color: #475569; vertical-align: middle; }
.inspect-report .ir-status-待检验 { background: #fef3c7; color: #92400e; }
.inspect-report .ir-status-已合格 { background: #d1fae5; color: #065f46; }
.inspect-report .ir-status-已不合格 { background: #fee2e2; color: #991b1b; }
.inspect-report .ir-status-已入库 { background: #dbeafe; color: #1e40af; }
.inspect-report .ir-section { margin-bottom: 14px; }
.inspect-report .ir-section-title { font-size: 13px; font-weight: 700; color: #1e40af; border-left: 4px solid #3b82f6; padding-left: 10px; margin-bottom: 6px; background: linear-gradient(90deg, #eff6ff 0%, transparent 100%); padding-top: 4px; padding-bottom: 4px; }
.inspect-report .ir-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; padding: 10px 14px; background: #f8fafc; border-radius: 8px; border: 1px solid #e2e8f0; }
.inspect-report .ir-meta-k { display: inline-block; min-width: 70px; color: #64748b; font-size: 12px; }
.inspect-report .ir-meta-v { color: #1e293b; font-weight: 500; }
.inspect-report .ir-meta-full { grid-column: 1 / -1; }
.inspect-report .ir-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.inspect-report .ir-table th, .inspect-report .ir-table td { border: 1px solid #cbd5e1; padding: 8px 12px; }
.inspect-report .ir-table thead th { background: #eff6ff; color: #1e40af; font-weight: 600; text-align: left; }
.inspect-report .ir-table td.num, .inspect-report .ir-table th.num { text-align: right; }
.inspect-report .ir-empty { text-align: center; color: #94a3b8; padding: 16px; }
.inspect-report .ir-cell-name { padding-left: 14px; }
.inspect-report .ir-cell-result { text-align: center; }
.inspect-report .ir-pill { display: inline-block; padding: 3px 12px; border-radius: 12px; font-size: 12px; font-weight: 600; min-width: 60px; text-align: center; }
.inspect-report .ir-pill-ok { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.inspect-report .ir-pill-ng { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.inspect-report .ir-pill-na { background: #f1f5f9; color: #64748b; border: 1px solid #cbd5e1; }
/* v2.460：部分合格——合格件可入库、不合格件待处理 */
.inspect-report .ir-pill-mid { background: #fef3c7; color: #b45309; border: 1px solid #fcd34d; }
.inspect-report .ir-pill-xl { font-size: 22px; padding: 14px 32px; border-radius: 16px; letter-spacing: 2px; min-width: 140px; }
.inspect-report .ir-section-conclusion { background: linear-gradient(135deg, #fef9c3 0%, #fef3c7 100%); padding: 18px 20px; border-radius: 10px; border: 2px dashed #f59e0b; margin-top: 18px; }
.inspect-report .ir-conclusion { text-align: center; }
.inspect-report .ir-conclusion-label { font-size: 13px; color: #92400e; letter-spacing: 4px; margin-bottom: 10px; font-weight: 600; }
.inspect-report .ir-conclusion-pill { display: inline-block; margin-bottom: 12px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); }
.inspect-report .ir-conclusion-meta { font-size: 13px; color: #475569; }
.inspect-report .ir-conclusion-note { font-size: 13px; color: #92400e; margin-top: 8px; padding: 8px 12px; background: rgba(255, 255, 255, 0.6); border-radius: 6px; text-align: left; }
.inspect-report .ir-edit-conclusion { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.inspect-report .ir-edit-field { display: flex; flex-direction: column; }
.inspect-report .ir-edit-field:first-child { grid-column: 1 / -1; }
.inspect-report .ir-edit-field:last-child { grid-column: 1 / -1; }
.inspect-report .ir-edit-field label { font-size: 12px; color: #475569; margin-bottom: 4px; font-weight: 600; }
.inspect-report .ir-required { color: #ef4444; font-weight: 400; font-size: 11px; margin-left: 4px; }
.inspect-report .ir-input, .inspect-report .ir-select, .inspect-report .ir-textarea { padding: 6px 10px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 14px; font-family: inherit; width: 100%; box-sizing: border-box; background: #fff; }
.inspect-report .ir-select-lg { font-size: 16px; padding: 8px 12px; font-weight: 600; }
/* v2.460：合格 / 不合格数量拆分 */
.inspect-report .ir-qty-input { width: 100%; max-width: 120px; padding: 5px 8px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 14px; font-weight: 600; text-align: right; font-family: inherit; background: #fff; }
.inspect-report .ir-qty-input:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37, 99, 235, .15); }
.inspect-report .ir-qty-tip { margin-top: 8px; font-size: 12px; color: #64748b; line-height: 1.6; }
.inspect-report .ir-verdict { padding: 9px 14px; border-radius: 8px; font-size: 15px; font-weight: 700; border: 1px solid; }
.inspect-report .ir-verdict-ok { background: #d1fae5; color: #065f46; border-color: #6ee7b7; }
.inspect-report .ir-verdict-mid { background: #fef3c7; color: #b45309; border-color: #fcd34d; }
.inspect-report .ir-verdict-ng { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.inspect-report .ir-textarea { resize: vertical; }
.inspect-report .ir-signatures { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-top: 22px; padding-top: 16px; border-top: 1px dashed #94a3b8; }
.inspect-report .ir-sig { text-align: center; }
.inspect-report .ir-sig-label { font-size: 12px; color: #64748b; margin-bottom: 26px; }
.inspect-report .ir-sig-name { font-size: 14px; font-weight: 600; color: #1e293b; border-bottom: 1px solid #475569; padding: 0 12px 4px; min-height: 24px; }
.inspect-report .ir-sig-date { font-size: 11px; color: #94a3b8; margin-top: 4px; min-height: 14px; }
.inspect-report .ir-foot { display: flex; justify-content: space-between; font-size: 11px; color: #94a3b8; padding-top: 12px; margin-top: 16px; border-top: 1px solid #e2e8f0; }

/* v2.460：手机端报告单抬头——公司名不再被标题块挤成竖排 */
@media (max-width: 560px) {
  .inspect-report .ir-header { flex-wrap: wrap; row-gap: 8px; }
  .inspect-report .ir-company { min-width: 0; }
  .inspect-report .ir-company-name { font-size: 15px; letter-spacing: 0; }
  .inspect-report .ir-company-sub { font-size: 11px; }
  .inspect-report .ir-title-block { flex: 1 0 100%; text-align: right; border-top: 1px dashed #cbd5e1; padding-top: 8px; }
  .inspect-report .ir-title { font-size: 15px; letter-spacing: 0; }
  .inspect-report .ir-edit-conclusion { grid-template-columns: 1fr; }
}

/* ---------- v2.286：采购入库单（复用检验报告单版式，绿色主题） ---------- */
.goods-receipt .ir-header { border-color: #065f46; background: linear-gradient(180deg, #fff 0%, #f0fdf4 100%); }
.goods-receipt .ir-title { color: #047857; }
.goods-receipt .ir-section-title { color: #047857; border-left-color: #10b981; background: linear-gradient(90deg, #ecfdf5 0%, transparent 100%); }
.goods-receipt .ir-table thead th { background: #ecfdf5; color: #047857; }
.goods-receipt .ir-table tfoot td { background: #f0fdf4; font-weight: 700; color: #065f46; }
.goods-receipt .gr-tf-label { text-align: right; padding-right: 14px; }
.goods-receipt .gr-qty-section { background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%); padding: 16px 20px; border-radius: 10px; border: 2px dashed #10b981; }
.goods-receipt .gr-qty-box { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.goods-receipt .gr-qty-label { font-size: 14px; font-weight: 700; color: #065f46; }
.goods-receipt .gr-qty-input { width: 160px; padding: 8px 12px; font-size: 18px; font-weight: 700; color: #065f46; border: 2px solid #10b981; border-radius: 8px; text-align: center; font-family: inherit; background: #fff; }
.goods-receipt .gr-qty-hint { flex: 1 1 100%; font-size: 12px; color: #047857; }
@media print {
  body { background: #fff !important; }
  /* v2.284：打印 / 另存为 PDF 只输出弹窗内的检验报告单——隐藏底下整页界面（列表、统计卡等）
     （全项目仅检验报告单走当前页 window.print()，其余打印均为新窗口，不受影响） */
  #app, #toast { display: none !important; }
  /* 隐藏弹窗头部 ✕ / 底部按钮 */
  .form-foot, .modal-close, .modal-head, button { display: none !important; }
  .modal-mask { position: static !important; background: #fff !important; padding: 0 !important; }
  .modal { box-shadow: none !important; border: none !important; max-width: 100% !important; width: 100% !important; }
  .modal-body { padding: 0 !important; overflow: visible !important; }
  .inspect-report .ir-header { border: 2px solid #000 !important; background: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .inspect-report .ir-section-conclusion { border: 2px dashed #000 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .inspect-report .ir-pill, .inspect-report .ir-status, .inspect-report .ir-table thead th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .inspect-report .ir-input, .inspect-report .ir-select, .inspect-report .ir-textarea { border: none !important; background: transparent !important; padding: 0 !important; }
  details { display: none !important; }
}

/* v2.266：入库检验列表已统一使用全局 stat-grid / toolbar / tbl / actions / badge 组件，
   此处不再保留列表专用样式；.inspect-report 相关样式保留在上方。 */

/* v2.268：申请入库检验弹窗优化 —— 步骤条 + 紧凑信息卡 + 数量编辑 */
.info-card { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 12px 14px; margin-bottom: 12px; }
.ira-steps { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; padding: 10px 12px; background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 8px; font-size: 12px; }
.ira-step { display: flex; align-items: center; gap: 6px; color: #64748b; }
.ira-step-dot { width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: #e2e8f0; color: #475569; font-size: 11px; font-weight: 600; }
.ira-step.active { color: #1e40af; font-weight: 600; }
.ira-step.active .ira-step-dot { background: #3b82f6; color: #fff; }
.ira-step.done { color: #065f46; }
.ira-step.done .ira-step-dot { background: #10b981; color: #fff; }
.ira-step-arrow { color: #94a3b8; font-size: 12px; }
.ira-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; }
.ira-no { font-size: 15px; font-weight: 600; }
.ira-ro { min-height: 34px; padding: 8px 10px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 13px; }
.ira-qty-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ira-items input[type="number"] { padding: 6px 8px; border: 1px solid #cbd5e1; border-radius: 6px; text-align: right; }
.ira-items input[type="number"]:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); outline: none; }

/* ============ v2.311 网页一键更新（系统设置 → 版本更新） ============ */
#updCard .upd-row { display: flex; gap: 10px; font-size: 13px; margin: 5px 0; line-height: 1.6; }
#updCard .upd-row .k { color: var(--muted); min-width: 76px; flex: none; }
#updCard .upd-row .v { word-break: break-all; }
.upd-alert { border-radius: 8px; padding: 10px 12px; font-size: 13px; line-height: 1.75; margin: 10px 0; }
.upd-alert.info { background: #eff6ff; color: #1d4ed8; }
.upd-alert.warn { background: #fffbeb; color: #b45309; }
.upd-alert.err { background: #fef2f2; color: #b91c1c; }
.upd-alert.ok { background: #f0fdf4; color: #15803d; }
.upd-src { display: flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin: 10px 0; }
.upd-src > div { flex: 1; padding: 10px 14px; text-align: center; background: #f8fafc; }
.upd-src > div + div { border-left: 1px solid var(--border); }
.upd-src .t { font-size: 12px; color: var(--muted); }
.upd-src .v { font-size: 19px; font-weight: 700; margin-top: 3px; }
.upd-tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.upd-tag { font-size: 12px; border-radius: 999px; padding: 4px 10px; background: #f1f5f9; color: #334155; }
.upd-tag.add { background: #eef2ff; color: #4338ca; }
.upd-tag.chg { background: #fff7ed; color: #c2410c; }
.upd-list { max-height: 180px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-size: 12px; line-height: 1.9; background: #fcfcfd; }
.upd-list .s-missing { color: #4338ca; }
.upd-list .s-changed { color: #c2410c; }
.upd-list .s-target-only { color: #64748b; }
.upd-bar { height: 8px; border-radius: 999px; background: #e2e8f0; overflow: hidden; margin: 10px 0; }
.upd-bar > i { display: block; height: 100%; background: var(--primary); transition: width .2s; }
.upd-spin { display: inline-block; width: 13px; height: 13px; border: 2px solid #cbd5e1; border-top-color: var(--primary); border-radius: 50%; animation: updspin .8s linear infinite; vertical-align: -2px; margin-right: 6px; }
@keyframes updspin { to { transform: rotate(360deg); } }
.upd-steps { font-size: 13px; line-height: 1.9; }
.upd-steps .ok::before { content: "✓ "; color: var(--green); font-weight: 700; }
.upd-steps .fail::before { content: "✕ "; color: var(--danger); font-weight: 700; }
.upd-chk { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; margin: 8px 0; line-height: 1.6; }
.upd-chk input { margin-top: 3px; flex: none; }
.upd-file { display: none; }
.upd-hist { font-size: 12px; color: var(--muted); line-height: 1.9; margin-top: 8px; }

/* ================= v2.330 统一工作台（我的待办 / 我的申请 / 角色数据） =================
   v2.336：欢迎 + 待办 + 我发起的申请 合成一张面板（.wb-panel）：
   顶部蓝色欢迎横条，下方左右 1:1 等宽两栏，内容底部对齐后整块收口，
   不再出现「欢迎条通栏 / 双栏限宽 / 窄屏单列空荡」的割裂与空白 */
   v2.337：面板去掉 1240/1360 限宽，随窗口通栏自适应（与下方经营数据等区块同宽），
   两栏仍严格 1:1，任何分辨率下都不再出现「面板浮在中间、两侧大留白」 */
.wb-panel { border-radius: 14px; overflow: hidden; background: #fff; border: 1px solid #e6eaf2; box-shadow: 0 4px 16px -8px rgba(15, 23, 42, .12); }

/* 欢迎横条：面板顶栏（圆角由面板统一裁切） */
.wb-hello { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; background: linear-gradient(115deg, #1d4ed8 0%, #2563eb 55%, #3b82f6 100%); padding: 16px 24px; color: #fff; position: relative; overflow: hidden; }
.wb-hello::after { content: ''; position: absolute; right: -60px; top: -80px; width: 240px; height: 240px; border-radius: 50%; background: rgba(255, 255, 255, .08); pointer-events: none; }
.wb-hello::before { content: ''; position: absolute; right: 90px; bottom: -110px; width: 180px; height: 180px; border-radius: 50%; background: rgba(255, 255, 255, .06); pointer-events: none; }
.wb-hello .hi-ava { width: 48px; height: 48px; border-radius: 50%; background: rgba(255, 255, 255, .18); border: 2px solid rgba(255, 255, 255, .55); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; flex: none; position: relative; z-index: 1; }
.wb-hello .hi-txt { flex: 1; min-width: 200px; position: relative; z-index: 1; }
.wb-hello .hi-name { font-size: 17px; font-weight: 700; color: #fff; letter-spacing: .3px; }
.wb-hello .hi-sub { font-size: 12.5px; color: rgba(255, 255, 255, .82); margin-top: 3px; line-height: 1.8; }
.wb-hello .hi-badge { font-size: 12px; border-radius: 999px; padding: 3px 11px; background: rgba(255, 255, 255, .16); color: #fff; white-space: nowrap; }
/* 右侧待办统计块：白底圆角卡，数字大字 + 说明小字 */
.wb-hello .hi-todo { position: relative; z-index: 1; background: #fff; color: var(--text); border-radius: 12px; padding: 9px 18px; display: flex; align-items: center; gap: 12px; box-shadow: 0 2px 8px rgba(15, 23, 42, .15); flex: none; }
.wb-hello .hi-todo .n { font-size: 24px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.wb-hello .hi-todo .n.zero { color: #16a34a; }
.wb-hello .hi-todo .n.warn { color: #d97706; }
.wb-hello .hi-todo .d { font-size: 12px; color: var(--muted); line-height: 1.5; }

/* 两栏：严格 1:1 等宽（minmax(0,1fr)），栏间距用中缝分隔线，行首尾留白一致 */
.wb-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.wb-body .wb-sec { padding: 14px 18px 6px; margin-bottom: 0; min-width: 0; }
.wb-body .wb-sec:first-child { border-right: 1px solid #eef1f6; }
.wb-body .wb-sec .wb-group, .wb-body .wb-sec .wb-card-list, .wb-body .wb-sec .wb-empty { border-color: #eef1f6; }
@media (max-width: 1100px) {
  .wb-body { grid-template-columns: 1fr; }
  .wb-body .wb-sec:first-child { border-right: none; border-bottom: 1px solid #eef1f6; }
}

.wb-sec { margin-bottom: 18px; }
.wb-sec-hd { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.wb-sec-hd h3 { font-size: 14.5px; font-weight: 700; margin: 0; }
.wb-sec-hd .cnt { font-size: 12px; font-weight: 700; color: #fff; background: var(--danger); border-radius: 999px; padding: 2px 9px; }
.wb-sec-hd .cnt.zero { background: #cbd5e1; }
.wb-sec-hd .tip { font-size: 12px; color: var(--muted); margin-left: auto; }

.wb-group { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px; overflow: hidden; background: #fff; }
.wb-group-hd { display: flex; align-items: center; gap: 8px; padding: 9px 14px; background: #f8fafc; font-size: 13px; font-weight: 700; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.wb-group-hd .n { font-size: 11.5px; font-weight: 700; color: #b45309; background: #fef3c7; border-radius: 999px; padding: 1px 8px; }
/* v2.487：队列型待办（产品建档申请）0 条时仍显示入口，用虚线框 + 灰色「暂无」区分，避免被误当成有待办 */
.wb-group-empty { border-style: dashed; }
.wb-group-hd .n.zero { color: var(--muted); background: #f1f5f9; }
.wb-item-empty, .wb-item-empty:hover { background: transparent; }
/* 空态是整句说明，允许换行（默认 .it-s 单行省略，手机上会被截成「…」）
   ★选择器必须写到 .wb-item 同级，否则比后面 .wb-item .it-s 的优先级低，nowrap 仍然生效 */
.wb-item.wb-item-empty .it-s { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.7; }
.wb-group-hd .go { margin-left: auto; font-size: 12px; font-weight: 400; }
.wb-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid #f2f4f7; font-size: 13px; }
.wb-item:last-child { border-bottom: none; }
.wb-item:hover { background: #fafbfc; }
/* v2.333：标题簇不再拉伸占满整行（flex:1 会在宽屏把金额挤到最右、中间留大洞）；
   金额 / 环节 / 按钮全部紧随其后紧凑排列，多余空间留在行尾 */
.wb-item .it-main { flex: 0 1 auto; min-width: 0; max-width: 46%; }
.wb-item .it-t { font-weight: 600; color: var(--text); }
.wb-item .it-t .no { font-family: ui-monospace, monospace; font-size: 12px; color: var(--primary); margin-right: 6px; }
.wb-item .it-s { font-size: 12px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-item .it-amt { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.wb-item .it-step { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.wb-item .it-step b { color: #b45309; }
.wb-item .it-act { white-space: nowrap; }

/* v2.576 待办行「审批流程」条：整条链一行铺满（flex:1 0 100% 强制换行到第二行），
   已过绿 / 当前橙 / 未到灰；窄屏自动折行，不撑破卡片 */
/* 只有带流程条的待办行才允许整行换行（我发起的申请行不加，避免徽章/按钮被挤到下一行）
   ★选择器写 .has-flow，不写全局 .wb-item，否则「我发起的申请」列表会跟着换行 */
.wb-item.has-flow { flex-wrap: wrap; }
.wb-flow { flex: 1 0 100%; display: flex; align-items: center; gap: 3px; flex-wrap: wrap; margin-top: 1px; }
.wb-flow .fl { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; line-height: 1.5;
  padding: 1px 8px 1px 3px; border-radius: 999px; border: 1px solid #e2e8f0; background: #fff; color: #94a3b8; white-space: nowrap; }
.wb-flow .fl i { font-style: normal; width: 14px; height: 14px; border-radius: 50%; background: #e2e8f0; color: #fff;
  font-size: 9px; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; }
.wb-flow .fl.done { color: #047857; border-color: #a7f3d0; background: #ecfdf5; }
.wb-flow .fl.done i { background: #10b981; }
.wb-flow .fl.cur { color: #b45309; border-color: #fcd34d; background: #fffbeb; font-weight: 600; }
.wb-flow .fl.cur i { background: #f59e0b; }
.wb-flow .ar { color: #cbd5e1; font-size: 11px; }

.wb-prog { display: inline-flex; align-items: center; gap: 3px; }
.wb-prog i { width: 13px; height: 5px; border-radius: 999px; background: #e2e8f0; display: inline-block; }
.wb-prog i.on { background: var(--green); }
.wb-prog i.cur { background: #f59e0b; }
.wb-prog i.no { background: #fca5a5; }

.wb-card-list .wb-item { align-items: flex-start; }
.wb-empty { text-align: center; padding: 26px 16px; color: var(--muted); font-size: 13px; line-height: 2; }
.wb-empty .big { font-size: 26px; display: block; margin-bottom: 4px; }
.wb-more { padding: 9px 14px; text-align: center; border-top: 1px solid #f2f4f7; }

@media (max-width: 760px) {
  .wb-item { flex-wrap: wrap; gap: 6px 10px; }
  .wb-item .it-amt, .wb-item .it-step { font-size: 12px; }
  .wb-hello { padding: 13px 16px; gap: 12px; }
  .wb-hello .hi-name { font-size: 15px; }
  .wb-hello .hi-todo { padding: 8px 14px; }
  .wb-hello .hi-todo .n { font-size: 21px; }
  .wb-body .wb-sec { padding: 12px 14px 4px; }
}

/* ================= v2.345 绩效考核 ================= */
/* 考核表弹窗头部的信息条：被考核人 / 部门 / 周期 / 模板 / 状态 / 总分 */
.pf-hd { display: flex; flex-wrap: wrap; gap: 8px 22px; background: #f8fafc; border: 1px solid #eef1f6; border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; font-size: 13px; }
.pf-hd > div { display: flex; align-items: center; gap: 6px; }
.pf-hd .muted { font-size: 12px; }
/* 考核表表格：指标列左对齐，分数列窄且居中，便于逐项填分 */
.pf-tbl th, .pf-tbl td { vertical-align: middle; }
.pf-tbl td input[type=number] { text-align: center; }
.pf-tbl td input[type=text], .pf-tbl td input:not([type]) { padding: 4px 7px; font-size: 12.5px; }
/* 模板指标编辑器：序号 / 名称 / 说明 / 权重 / 不考核 / 删除 一行六列 */
.pf-items { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; max-height: 46vh; overflow: auto; }
.pf-item-row { display: grid; grid-template-columns: 22px minmax(120px, 1.1fr) minmax(150px, 1.7fr) 62px 72px 22px; gap: 6px; align-items: center; }
.pf-item-row > input { padding: 4px 7px; font-size: 12.5px; min-width: 0; }
.pf-in-w { text-align: center; }
.pf-in-ex { display: flex; align-items: center; gap: 3px; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.pf-in-ex input { width: 13px; height: 13px; }
.pf-ix { font-size: 11.5px; color: var(--muted); text-align: center; }
.pf-del { color: var(--danger); font-weight: 700; cursor: pointer; text-align: center; font-size: 15px; line-height: 1; }
@media (max-width: 760px) {
  .pf-item-row { grid-template-columns: 20px 1fr 54px 66px 20px; }
  .pf-in-detail { display: none; }
}

/* ================= v2.344 个人待办 ================= */
/* 工作台区块：整块卡片，内容两列排布 */
.td-sec { background: #fff; border: 1px solid #e6eaf2; border-radius: 14px; padding: 14px 18px 12px; box-shadow: 0 4px 16px -8px rgba(15, 23, 42, .12); }
.td-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.td-segs { display: inline-flex; background: #f1f5f9; border-radius: 9px; padding: 2px; gap: 2px; }
.td-seg { border: none; background: transparent; color: #475569; font-size: 12.5px; padding: 5px 11px; border-radius: 7px; cursor: pointer; }
.td-seg:hover { background: rgba(255, 255, 255, .7); }
.td-seg.on { background: #fff; color: var(--primary); font-weight: 700; box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.td-search { width: 190px; margin-left: auto; padding: 6px 10px; font-size: 12.5px; }
/* 卡片 */
.td-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 12px; }
.td-sec .td-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.td-card { border: 1px solid #e6eaf2; border-radius: 11px; padding: 11px 13px; background: #fff; display: flex; flex-direction: column; gap: 7px; }
.td-card.overdue { border-color: #fecaca; background: #fffbfb; }
.td-card.finished { opacity: .72; background: #fafcfa; }
.td-hd { display: flex; align-items: center; gap: 8px; }
.td-pri { font-size: 10.5px; font-weight: 700; border-radius: 5px; padding: 1px 7px; color: #fff; }
.td-pri.b-red { background: #dc2626; }
.td-pri.b-orange { background: #f59e0b; }
.td-pri.b-gray { background: #94a3b8; }
.td-title { font-size: 13.5px; font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-title.done { text-decoration: line-through; color: var(--muted); }
.td-pct { font-size: 12.5px; font-weight: 700; color: var(--primary); flex: none; }
/* 进度条 */
.td-bar { height: 6px; border-radius: 999px; background: #eef1f6; overflow: hidden; }
.td-bar i { display: block; height: 100%; border-radius: 999px; background: var(--primary); transition: width .25s; }
.td-bar i.ok { background: #16a34a; }
.td-bar i.warn { background: #f59e0b; }
.td-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 11.5px; color: #475569; }
.td-late { color: var(--danger); font-weight: 700; }
.td-note { font-size: 12px; color: var(--muted); background: #f8fafc; border-radius: 7px; padding: 6px 9px; }
/* 子任务 */
.td-subs { display: flex; flex-direction: column; gap: 3px; }
.td-sub { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 400; padding: 2px 0; }
.td-sub input[type=checkbox] { width: 14px; height: 14px; flex: none; }
.td-sub.done > span { text-decoration: line-through; color: var(--muted); }
.td-sub-del { color: var(--danger); cursor: pointer; font-weight: 700; padding: 0 4px; flex: none; }
.td-sub-add { display: flex; gap: 6px; align-items: center; }
.td-sub-add input { flex: 1; padding: 4px 8px; font-size: 12px; }
.td-ops { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding-top: 2px; }
.td-prog-quick { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.td-prog-quick input[type=range] { width: 96px; }
/* 弹窗里的子任务草稿 */
.td-draft { border: 1px solid var(--border); border-radius: 8px; padding: 8px; max-height: 150px; overflow: auto; font-size: 12.5px; }
.td-draft-row { display: flex; align-items: center; gap: 6px; padding: 2px 0; }
.td-draft-row > span { color: var(--muted); flex: none; width: 18px; }
.td-draft-row > input { flex: 1; padding: 3px 7px; font-size: 12.5px; }
.td-draft-row > a { color: var(--danger); cursor: pointer; font-weight: 700; padding: 0 4px; }
@media (max-width: 760px) { .td-grid, .td-sec .td-grid { grid-template-columns: 1fr; } .td-search { margin-left: 0; width: 100%; } }

/* ================= v2.341 工作台日历 / 日程 ================= */
.wb-cal { margin: 0 auto 18px; }
.wb-cal h3 { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.wb-cal h3 > div { display: flex; gap: 6px; align-items: center; }
.wb-cal .cal-invite { font-size: 12.5px; background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; border-radius: 8px; padding: 7px 12px; margin-bottom: 10px; }
/* v2.343：月历占卡片一半宽度（随屏幕自适应），右侧当日日程面板占另一半 */
.cal-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 1000px) { .cal-wrap { grid-template-columns: 1fr; } }
.cal-member { width: auto; font-size: 12.5px; padding: 4px 8px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-head { text-align: center; font-size: 11.5px; color: var(--muted); font-weight: 700; padding: 3px 0; }
.cal-head.sun { color: #dc2626; }
.cal-cell { min-height: 68px; border-radius: 8px; border: 1px solid transparent; padding: 4px 5px; cursor: pointer; font-size: 12.5px; display: flex; flex-direction: column; gap: 2px; align-items: stretch; background: #fff; overflow: hidden; }
.cal-cell:hover { background: #f1f5f9; }
.cal-cell.today { border-color: var(--primary); }
.cal-cell.sel { background: #eff6ff; border-color: var(--primary); }
.cal-cell .d { font-weight: 600; }
.cal-cell .dots { display: flex; gap: 2px; }
.cal-cell .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); display: inline-block; }
/* v2.343：日历格内日程条 */
.cal-ev { display: block; font-size: 11px; line-height: 1.35; background: #eff6ff; color: #1e40af; border-left: 3px solid var(--primary); border-radius: 4px; padding: 1px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.cal-ev b { margin-right: 3px; font-weight: 700; }
.cal-ev.more { background: transparent; border-left-color: transparent; color: var(--muted); text-align: center; }
.cal-cell.today .cal-ev { background: #dbeafe; }
.cal-cell.sel .cal-ev { background: #dbeafe; }
.cal-day-panel { border-left: 1px solid #eef1f6; padding-left: 18px; min-width: 0; }
@media (max-width: 1000px) { .cal-day-panel { border-left: none; padding-left: 0; border-top: 1px solid #eef1f6; padding-top: 12px; } }
.cal-day-hd { font-size: 14px; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.ev-row { border: 1px solid #eef1f6; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; background: #fff; }
.ev-row .ev-t { font-size: 13.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ev-row .ev-title { font-weight: 700; }
.ev-row .ev-s { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.ev-row .ev-ops { margin-top: 6px; display: flex; gap: 6px; }
.ev-empty { color: var(--muted); font-size: 13px; padding: 22px 0; text-align: center; }

/* ================= v2.332 招聘：候选人阶段标签 =================
   阶段标签用自绘小胶囊（比 .badge 更紧凑，便于在表格行内与阶段选择器并排） */
.st-gray, .st-blue, .st-purple, .st-orange, .st-green, .st-dim {
  display: inline-block; font-size: 11.5px; font-weight: 600; line-height: 18px;
  padding: 0 8px; border-radius: 999px; white-space: nowrap;
}
.st-gray { background: #f3f4f6; color: #4b5563; }
.st-blue { background: #dbeafe; color: #1d4ed8; }
.st-purple { background: #ede9fe; color: #6d28d9; }
.st-orange { background: #ffedd5; color: #c2410c; }
.st-green { background: #dcfce7; color: #15803d; }
.st-dim { background: #f8fafc; color: #94a3b8; border: 1px dashed #e2e8f0; }
/* 招聘需求卡片的 h3 里带操作按钮，窄屏时换行显示 */
@media (max-width: 900px) {
  .card > h3 > span[style*="float:right"] { float: none !important; display: block; margin-top: 6px; }
}

/* ================= v2.416 我的笔记（含语音输入） ================= */
.card h3.note-hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.note-hd-ops { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.note-search { width: 210px; padding: 7px 11px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; outline: none; font-family: inherit; color: var(--text); }
.note-search:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.note-info { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.note-info .muted { color: #9ca3af; }
.note-tagbar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.note-tag { border: 1px solid var(--border); background: #fff; color: var(--text); border-radius: 999px; padding: 4px 12px; font-size: 12.5px; cursor: pointer; font-family: inherit; transition: all .15s; }
.note-tag:hover { border-color: #c7d2fe; background: #f5f8ff; }
.note-tag.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.note-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(256px, 1fr)); gap: 12px; }
.note-card { border: 1px solid var(--border); border-radius: 12px; padding: 13px 14px 10px; cursor: pointer; background: #fff;
  display: flex; flex-direction: column; min-height: 130px; transition: box-shadow .15s, transform .15s, border-color .15s; }
.note-card:hover { box-shadow: 0 6px 20px rgba(16,24,40,.09); transform: translateY(-1px); border-color: #c7d2fe; }
.note-card.pinned { box-shadow: inset 3px 0 0 #f59e0b; }
.note-card.pinned:hover { box-shadow: inset 3px 0 0 #f59e0b, 0 6px 20px rgba(16,24,40,.09); }
.note-card.c-yellow { background: #fffbeb; border-color: #fde68a; }
.note-card.c-green { background: #f2fcf5; border-color: #bbf7d0; }
.note-card.c-blue { background: #f2f7ff; border-color: #bfdbfe; }
.note-card.c-pink { background: #fff5f8; border-color: #fbcfe8; }
.note-card.c-purple { background: #f8f5ff; border-color: #ddd6fe; }
.note-card.c-gray { background: #f7f8fa; border-color: #e2e8f0; }
.note-card-hd { display: flex; gap: 5px; align-items: flex-start; }
.note-pin { font-size: 12px; line-height: 1.5; flex-shrink: 0; }
.note-card-title { font-weight: 600; font-size: 14px; line-height: 1.45; flex: 1; word-break: break-word;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.note-card-body { flex: 1; margin: 7px 0 8px; font-size: 13px; line-height: 1.62; color: #475467; white-space: pre-wrap; word-break: break-word;
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.note-card-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 8px; }
.note-tag-pill { font-size: 11px; color: #1d4ed8; background: rgba(37,99,235,.08); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.note-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px dashed #eef1f6; padding-top: 7px; margin-top: auto; }
.note-time { font-size: 11.5px; color: #9ca3af; white-space: nowrap; }
.note-card-ops { display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.note-card:hover .note-card-ops { opacity: 1; }
.note-card-ops .btn { padding: 3px 8px; font-size: 11.5px; }
/* 编辑器 */
.note-edit { display: flex; flex-direction: column; gap: 10px; }
.note-title-in { width: 100%; border: none; border-bottom: 1px solid var(--border); padding: 6px 2px 9px; font-size: 17px; font-weight: 600;
  outline: none; font-family: inherit; color: var(--text); background: transparent; }
.note-title-in:focus { border-bottom-color: var(--primary); }
.note-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.note-mic-btn { border: 1px solid var(--border); background: #fff; }
.note-mic-btn.on { background: #dc2626; border-color: #dc2626; color: #fff; animation: notePulse 1.5s ease-out infinite; }
@keyframes notePulse {
  0% { box-shadow: 0 0 0 0 rgba(220,38,38,.5); }
  70% { box-shadow: 0 0 0 8px rgba(220,38,38,0); }
  100% { box-shadow: 0 0 0 0 rgba(220,38,38,0); }
}
.note-mic-state { font-size: 12.5px; color: var(--muted); flex: 1; min-width: 130px; line-height: 1.55; }
.note-mic-state.on { color: #dc2626; }
.note-mic-state.err { color: var(--orange); }
.note-count { font-size: 12px; color: #9ca3af; white-space: nowrap; margin-left: auto; }
.note-interim { background: #fff7ed; border: 1px dashed #fdba74; color: #9a3412; border-radius: 8px; padding: 7px 11px; font-size: 12.5px; line-height: 1.6; }
.note-textarea { width: 100%; min-height: 340px; max-height: 52vh; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px;
  font-size: 14.5px; line-height: 1.85; font-family: inherit; color: var(--text); resize: vertical; outline: none; }
.note-textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.note-meta-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.note-meta-row > label { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.note-meta-row input:not([type=checkbox]) { flex: 1; min-width: 180px; padding: 8px 11px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 13px; outline: none; font-family: inherit; color: var(--text); }
.note-meta-row input:not([type=checkbox]):focus { border-color: var(--primary); }
.note-colors { display: flex; gap: 7px; align-items: center; }
.note-color { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #e5e7eb; background: #fff; cursor: pointer; padding: 0; }
.note-color[data-c="yellow"] { background: #fde68a; border-color: #fde68a; }
.note-color[data-c="green"] { background: #bbf7d0; border-color: #bbf7d0; }
.note-color[data-c="blue"] { background: #bfdbfe; border-color: #bfdbfe; }
.note-color[data-c="pink"] { background: #fbcfe8; border-color: #fbcfe8; }
.note-color[data-c="purple"] { background: #ddd6fe; border-color: #ddd6fe; }
.note-color[data-c="gray"] { background: #e2e8f0; border-color: #e2e8f0; }
.note-color.on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--primary); }
.note-pin-ck { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; white-space: nowrap; margin-left: 4px; }
/* v2.425 从笔记生成待办：笔记弹窗内联确认面板 */
.note-todo-btn { border: 1px solid var(--border); background: #fff; }
.note-todo-btn:hover { border-color: #c7d2fe; background: #f5f8ff; }
.ntt-box { border: 1px solid #c7d2fe; background: #f8faff; border-radius: 10px; padding: 11px 12px; display: flex; flex-direction: column; gap: 8px; }
.ntt-box.hidden { display: none; }
.ntt-hd { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #1d4ed8; }
.ntt-hd .muted { font-weight: 400; font-size: 11.5px; color: #64748b; }
.ntt-x { margin-left: auto; cursor: pointer; color: #94a3b8; font-size: 17px; line-height: 1; text-decoration: none; }
.ntt-x:hover { color: var(--danger); }
.ntt-quote { font-size: 12.5px; color: #475467; background: #fff; border: 1px dashed #c7d2fe; border-radius: 8px; padding: 7px 10px; white-space: pre-wrap; max-height: 84px; overflow: auto; line-height: 1.6; }
.ntt-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; }
.ntt-row > label { color: var(--muted); white-space: nowrap; }
.ntt-row input:not([type=checkbox]), .ntt-row select { padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 13px; font-family: inherit; color: var(--text); outline: none; background: #fff; }
.ntt-row input:not([type=checkbox]) { flex: 1; min-width: 160px; }
.ntt-row input:focus, .ntt-row select:focus { border-color: var(--primary); }
.ntt-share { display: flex; flex-wrap: wrap; gap: 4px 10px; max-height: 76px; overflow: auto; flex: 1; }
.ntt-share label { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; white-space: nowrap; }
.ntt-ops { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ntt-hint { font-size: 12.5px; color: #92400e; background: #fffbeb; border: 1px dashed #fcd34d; border-radius: 8px; padding: 9px 11px; line-height: 1.65; }
.ntt-ok { font-size: 13px; color: #166534; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 8px; padding: 9px 11px; line-height: 1.6; }
.ntt-ok a { color: var(--primary); cursor: pointer; margin-left: 8px; font-size: 12.5px; white-space: nowrap; }
.note-todo-pill { font-size: 11px; color: #b45309; background: rgba(245,158,11,.12); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.td-src { color: #1d4ed8; cursor: pointer; font-size: 11.5px; text-decoration: none; }
.td-src:hover { text-decoration: underline; }
@media (max-width: 760px) {
  .card h3.note-hd { flex-direction: column; align-items: stretch; gap: 8px; }
  /* 搜索框独占一行，两个按钮各占一半——避免搜索框被挤成「搜索标…」 */
  .note-hd-ops { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .note-search { grid-column: 1 / -1; width: 100%; min-width: 0; font-size: 14px; padding: 9px 11px; }
  .note-hd-ops .btn { width: 100%; padding: 9px 8px; font-size: 13px; }
  .note-grid { grid-template-columns: 1fr; }
  .note-card-ops { opacity: 1; }
  .note-card { min-height: 0; }
  .note-textarea { min-height: 220px; max-height: none; font-size: 15px; }
  .note-count { margin-left: 0; }
  .note-meta-row input:not([type=checkbox]) { min-width: 0; }
  .note-meta-row > .muted { display: none; }
  /* v2.425 生成待办面板：手机上标题独占一行，优先级/日期各占一半，避免挤成一条 */
  .ntt-row input:not([type=checkbox]) { min-width: 0; width: 100%; }
  .ntt-row > label { flex-shrink: 0; }
  .ntt-row select { flex: 1; }
  .ntt-ops { gap: 6px; }
  .ntt-ops .btn { flex: 1; padding: 9px 8px; }
  .ntt-ops > .muted { flex-basis: 100%; }
}

/* v2.420 固定资产折旧：资产表单里的实时测算条与说明 */
.dep-hint {
  margin-top: 6px; padding: 8px 10px; border-radius: 6px;
  background: var(--bg-soft, #f8fafc); border: 1px dashed var(--border);
  font-size: 12px; line-height: 1.7; color: var(--text);
}
.dep-note {
  margin-top: 6px; font-size: 12px; line-height: 1.75; color: var(--muted);
}
@media (max-width: 760px) {
  .dep-hint { font-size: 12px; }
  .dep-note { font-size: 11px; }
}

/* v2.428 物料清单 BOM：列表形式，点产品行才展开该产品的物料清单 */
.bom-tbl tr.bom-main > td { cursor: pointer; }
.bom-tbl tr.bom-main:hover > td { background: #fafbfc; }
.bom-tbl tr.bom-main.open > td { background: var(--bg-soft, #f8fafc); border-bottom-color: transparent; }
.bom-caret { color: var(--muted); font-size: 12px; user-select: none; width: 32px; }
.bom-tbl tr.bom-main > td:last-child { white-space: nowrap; }
.bom-tbl tr.bom-main .actions { flex-wrap: nowrap; }
tr.bom-detail > td { background: var(--bg-soft, #f8fafc); padding: 0 12px 12px; cursor: default; }
.bom-detail-box { padding: 10px 12px; background: #fff; border: 1px solid var(--border); border-radius: 8px; }
.bom-detail-hd { font-size: 13px; line-height: 1.6; margin-bottom: 8px; }
.bom-detail-hd .muted { font-size: 12px; }
.bom-sib { font-size: 12px; color: var(--muted); line-height: 1.7; margin-top: 6px; }
.bom-items th { background: #fbfcfd; }
.bom-unconf { margin-top: 14px; border: 1px dashed var(--border); border-radius: 8px; overflow: hidden; }
.bom-unconf-hd { display: flex; align-items: center; gap: 8px; padding: 10px 12px; cursor: pointer; font-size: 13px; flex-wrap: wrap; background: #fff; }
.bom-unconf-hd:hover { background: #fafbfc; }
.bom-unconf-hd .muted { font-size: 12px; }
.bom-unconf-hd .btn { margin-left: auto; }
/* v2.561：未配置 BOM 成品搜索框（常驻，收起时也能搜，一输入自动展开） */
.bom-unconf-srch { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--border); background: #fff; flex-wrap: wrap; }
.bom-unconf-srch input { flex: 1 1 200px; max-width: 360px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; outline: none; background: #fff; -webkit-appearance: none; appearance: none; }
.bom-unconf-srch input:focus { border-color: var(--primary); }
.bom-unconf-srch .muted { font-size: 12px; }
.bom-unconf .tbl { border-top: 0; }
@media (max-width: 760px) {
  /* 手机上收起次要列（规格 / 仓库 / 成本），否则「操作」按钮被挤出屏幕要横向拖 */
  .bom-tbl th.c-spec, .bom-tbl td.c-spec,
  .bom-tbl th.c-wh, .bom-tbl td.c-wh,
  .bom-tbl th.c-cost, .bom-tbl td.c-cost { display: none; }
  .bom-hint { white-space: normal !important; line-height: 1.6; max-width: 100%; }
  /* 明细表同理收起规格 / 单位 / 单价；合计行隐藏（单台物料成本已写在明细标题里） */
  .bom-items th.d-spec, .bom-items td.d-spec,
  .bom-items th.d-unit, .bom-items td.d-unit,
  .bom-items th.d-price, .bom-items td.d-price,
  .bom-items th.d-sub, .bom-items td.d-sub { display: none; }
  .bom-items tr.total-row { display: none; }
  /* 全局手机规则给 .tbl td 加了 nowrap，展开区标题会被裁掉 → 这里放开换行 */
  .bom-tbl tr.bom-detail > td { white-space: normal; }
  .bom-detail-box { padding: 8px; }
  .bom-detail-hd { font-size: 12px; }
  .bom-unconf-hd { font-size: 12px; gap: 6px; }
  .bom-unconf-hd .btn { margin-left: 0; }
  .bom-unconf-hd > .muted { flex-basis: 100%; }
}

/* ---------- v2.430 生产工时 ---------- */
.ph-warn { font-size: 12px; color: #92400e; background: #fffbeb; border-left: 3px solid #f59e0b; padding: 8px 12px; border-radius: 6px; margin: 0 0 12px; line-height: 1.7; }
.ph-tbl td { vertical-align: middle; }
.ph-tbl input.ph-input { padding: 5px 8px; border: 1px solid var(--border); border-radius: 6px; font: inherit; }
.ph-tbl input.ph-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(37,99,235,.12); }
.ph-tbl input.ph-input:disabled { background: #f9fafb; color: var(--muted); }
@media (max-width: 760px) {
  .ph-tbl th, .ph-tbl td { font-size: 12px; }
  .ph-tbl input.ph-input { width: 78px !important; }
  .ph-warn { font-size: 11px; }
}

/* ---------- v2.431 售后维修内容：配件下拉 ---------- */
.as-box { background: #f9fafb; border: 1px solid var(--border); border-radius: 8px; padding: 12px; }
.as-tip { font-size: 12.5px; color: #4b5563; line-height: 1.8; margin-bottom: 10px; }
.as-tip b { color: #1f2937; }
.as-item { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; background: #fff; }
.as-item-main { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.as-item-manual { margin-top: 8px; padding-left: 30px; }
.as-no { width: 22px; text-align: center; color: var(--muted); font-size: 13px; flex: 0 0 auto; }
.as-pick { flex: 1 1 320px; min-width: 220px; height: 40px; padding: 0 12px; border: 1px solid #cbd5e1; border-radius: 8px;
  font-size: 14px; font-family: inherit; color: var(--text); background: #fff; cursor: pointer; }
.as-pick:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.as-qty { flex: 0 0 72px; width: 72px; height: 40px; padding: 0 10px; border: 1px solid #cbd5e1; border-radius: 8px;
  font-size: 14px; font-family: inherit; color: var(--text); text-align: right; }
.as-qty:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.as-item-sub { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 8px; padding-left: 30px; }
.as-hint { flex: 1 1 100%; font-size: 12.5px; color: #6b7280; margin-bottom: 2px; }
.as-lb { font-size: 12.5px; color: #6b7280; }
.as-in { height: 34px; padding: 0 10px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 13px; font-family: inherit; color: var(--text); background: #fff; }
.as-in:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(37,99,235,.12); }
.as-num { flex: 0 0 96px; width: 96px; text-align: right; }
.as-item-manual .as-in { flex: 1 1 160px; }
@media (max-width: 760px) {
  .as-box { padding: 10px; }
  .as-tip { font-size: 11.5px; }
  .as-item { padding: 9px 10px; }
  .as-item-main { align-items: flex-start; }
  .as-no { width: 18px; margin-top: 11px; }
  .as-pick { flex: 1 1 calc(100% - 26px); min-width: 0; }
  .as-qty { flex: 0 0 62px; width: 62px; height: 38px; margin-top: 1px; }
  .as-item-sub, .as-item-manual { padding-left: 0; }
  .as-num { flex: 1 1 78px; width: auto; }
  .as-hint { font-size: 11.5px; }
  .as-lb { font-size: 12px; }
}

/* ---------- v2.432 工单产品下拉：型号与库存提示 ---------- */
.wo-pick-hint { margin-top: 6px; font-size: 12.5px; line-height: 1.7; color: #4b5563;
  background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 6px; padding: 6px 10px; }
.wo-pick-hint b { color: #1f2937; }
.wo-pick-hint.muted { color: var(--muted); background: #fafafa; }
#modal .field.full select#f_product { font-size: 14px; height: 40px; }
@media (max-width: 760px) {
  .wo-pick-hint { font-size: 11.5px; padding: 6px 8px; }
  #modal .field.full select#f_product { font-size: 13px; height: 38px; }
}

/* ---------- v2.433 生产管理看板 ---------- */
.pb-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 2px 0 14px; flex-wrap: wrap; }
.pb-title { font-size: 16px; font-weight: 700; }
.pb-title small { font-size: 12px; color: var(--muted); font-weight: normal; margin-left: 6px; }
.pb-tools { display: flex; align-items: center; gap: 10px; }
.pb-stamp { font-size: 12px; color: var(--muted); }
.pb-kpi { margin-bottom: 14px; }
.pb-kpi .stat { padding: 14px 16px; }
.pb-kpi-card.pb-kpi-alert { box-shadow: 0 0 0 2px #fecaca inset; }
.pb-dist { background: var(--card); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; box-shadow: 0 1px 3px rgba(16,24,40,.06); }
.pb-dist-bar { display: flex; height: 10px; border-radius: 6px; overflow: hidden; background: #f1f5f9; }
.pb-dist-bar i { display: block; height: 100%; }
.pb-dist-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 9px; font-size: 12px; color: var(--muted); }
.pb-dist-legend span { display: inline-flex; align-items: center; gap: 5px; }
.pb-dist-legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.pb-dist-legend b { color: #1f2937; }
.pb-cols { display: grid; grid-template-columns: minmax(0, 2.05fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.pb-col-main, .pb-col-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.pb-card { margin: 0; }
.pb-card-hd { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.pb-card-hd h3 { margin: 0; }
.pb-hint { font-size: 12px; color: var(--muted); }
.pb-progcell { min-width: 132px; }
.pb-prog { display: flex; height: 8px; border-radius: 5px; background: #eef2f7; overflow: hidden; }
.pb-prog i { display: block; height: 100%; }
.pb-prog-ok { background: #2563eb; }
.pb-prog-bad { background: #ef4444; }
.pb-prog-txt { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.pb-prog-txt b { color: #1f2937; }
.pb-bad-txt { color: var(--danger); }
.pb-late { font-size: 11px; color: #b91c1c; background: #fee2e2; border-radius: 4px; padding: 1px 5px; white-space: nowrap; }
.pb-short-tag { font-size: 11px; color: #b45309; background: #fef3c7; border-radius: 4px; padding: 1px 5px; white-space: nowrap; }
.pb-link { color: var(--primary); cursor: pointer; font-weight: 600; }
.pb-todo { list-style: none; margin: 0; padding: 0; }
.pb-todo li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; cursor: pointer; border: 1px solid var(--border); margin-bottom: 8px; transition: background .15s; }
.pb-todo li:hover { background: #f8fafc; }
.pb-todo li b { font-size: 18px; min-width: 28px; text-align: right; font-variant-numeric: tabular-nums; }
.pb-todo li span { flex: 1; font-size: 13px; line-height: 1.5; }
.pb-todo li i { color: var(--muted); font-style: normal; }
.pb-todo-warn b { color: #b45309; }
.pb-todo-bad b { color: var(--danger); }
.pb-todo-info b { color: var(--primary); }
.pb-steps { margin: 0; padding-left: 16px; font-size: 12.5px; color: #4b5563; line-height: 1.95; }
.pb-steps b { color: #1f2937; }
.pb-note, .pb-more { font-size: 12px; color: var(--muted); margin: 8px 0 0; line-height: 1.7; }
@media (max-width: 1180px) { .pb-cols { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .pb-title { font-size: 15px; }
  .pb-title small { display: block; margin: 2px 0 0; }
  .pb-stamp { display: none; }
  .pb-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pb-kpi .stat { padding: 11px 12px; }
  .pb-kpi .value { font-size: 17px !important; }
  .pb-dist { padding: 12px; }
  .pb-dist-legend { gap: 10px; font-size: 11.5px; }
  .pb-progcell { min-width: 104px; }
  .pb-steps { font-size: 12px; }
}

/* v2.433 补充：KPI 六列对齐 + 手机端卡片化（表格在 375px 会被裁掉进度列） */
.pb-kpi { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.pb-mob-only { display: none; }
.pb-mcard { border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px; margin-bottom: 9px; background: #fff; }
.pb-mcard:last-child { margin-bottom: 0; }
.pb-mcard-hd { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; }
.pb-mcard-hd b { font-size: 13px; }
.pb-mcard-hd > span { font-size: 12px; color: var(--muted); }
.pb-mcard-prod { margin-top: 4px; font-size: 13px; line-height: 1.5; }
.pb-mcard-prog { margin-top: 8px; }
.pb-mcard-ft { margin-top: 7px; font-size: 12px; color: var(--muted); line-height: 1.7; }
@media (max-width: 1280px) { .pb-kpi { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .pb-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* 手机上窄卡片放不下副标题：隐藏，只留数字，六张卡高度一致 */
  .pb-kpi .sub { display: none; }
  .pb-kpi .label { margin-bottom: 3px; }
  .pb-pc-only { display: none; }
  .pb-mob-only { display: block; }
  .pb-mcard { padding: 9px 11px; }
}

/* v2.459 发货申请：审批进度小胶囊（仓库 › 财务 › 总经理） */
.sf-step { display: inline-block; padding: 1px 6px; border-radius: 999px; border: 1px solid var(--border); background: #fff; color: var(--muted); font-size: 11px; line-height: 18px; white-space: nowrap; }
.sf-step.ok { background: #ecfdf5; border-color: #a7f3d0; color: #047857; font-weight: 600; }
.sf-step.cur { background: #fff7ed; border-color: #fed7aa; color: #c2410c; font-weight: 600; }
.sf-step.rej { background: #fef2f2; border-color: #fecaca; color: #b91c1c; font-weight: 600; }
.sf-arrow { color: #cbd5e1; font-size: 11px; margin: 0 1px; }
@media (max-width: 760px) { .sf-step { font-size: 10px; padding: 1px 5px; } }

/* v2.464 日记账列表：列数多，桌面端也容易横向溢出——操作列吸附在右侧，
   保证任何宽度下「修改 / 删除」都能直接点到，不必先横滑找按钮。
   ★只在宽屏启用：手机端表格是 display:block 横滑 + 首列 sticky，再叠一个右侧 sticky
   会把中间列挤到只剩一条缝（实测「类型 / 分类」被操作列盖住） */
@media (min-width: 761px) {
  .jr-tbl th:last-child, .jr-tbl td:last-child { position: sticky; right: 0; background: #fff; box-shadow: -8px 0 10px -8px rgba(16,24,40,.18); }
  .jr-tbl tr:hover td:last-child { background: #f8faff; }
  .jr-tbl th:last-child { z-index: 2; background: #fff; }
}

/* v2.467 报价单 / 合同：税率输入行（商品明细下方、合计之前）
   ★input 必须放在 .item-row 之外——calcOrderTotal 按 .item-row 内 input[type=number]
     的顺序取「数量 / 单价」，多一个数字框会把单价读成税率 */
.tax-box { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 10px 0 0; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; background: #f8faff; }
.tax-box .tax-lbl { font-weight: 600; font-size: 13px; color: var(--text); }
.tax-box input[type="number"] { width: 92px; height: 32px; padding: 0 8px; text-align: right;
  border: 1px solid #d5dbe6; border-radius: 6px; font-size: 14px; outline: none; }
.tax-box input[type="number"]:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.tax-box .tax-pct { font-weight: 600; color: var(--muted); }
.tax-box .tax-hint { font-size: 12px; flex: 1 1 280px; min-width: 200px; line-height: 1.5; }
@media (max-width: 760px) {
  .tax-box input[type="number"] { width: 78px; }
  .tax-box .tax-hint { flex: 1 1 100%; min-width: 0; }
}

/* v2.485 核对清单：固定布局，列宽写在 th 上，否则「操作」列被弹窗右边缘裁掉半个按钮 */
#jr_chk_tbl { table-layout: fixed; width: 100%; }
#jr_chk_tbl td { overflow: hidden; text-overflow: ellipsis; }
#jr_chk_tbl td:last-child { overflow: visible; }
@media (max-width: 760px) {
  #jr_chk_tbl { table-layout: auto; }
}

/* v2.485 日记账列表：固定布局 + 百分比列宽，避免 10 列抢空间把「操作」列压成竖排
   （手机端走全局 .tbl display:block 横滑，不套这套） */
@media (min-width: 761px) {
  .jr-tbl { table-layout: fixed; }
  .jr-tbl td { overflow: hidden; text-overflow: ellipsis; }
  .jr-tbl td:last-child { overflow: visible; }
}

/* v2.485 手机端：日记账「当前筛选」合计条换行显示，否则三项金额顶出屏幕右边缘 */
@media (max-width: 760px) {
  .jr-sum { white-space: normal; align-self: stretch; text-align: left; line-height: 1.7; }
}

/* v2.489 企业微信账号绑定表：桌面 5 列表格在手机上会把「企业微信账号 / 状态」挤到屏幕外，
   管理员在手机上根本没法绑人 → ≤760px 改成每行一张小卡（全局 .tbl 的横滚在这里被覆盖） */
@media (max-width: 760px) {
  .tbl.wx-bind { display: block; overflow: visible; }
  .tbl.wx-bind tr:first-child { display: none; }
  .tbl.wx-bind tr { display: block; position: relative; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin: 0 0 8px; background: #fff; }
  .tbl.wx-bind td { display: block; border: 0; padding: 2px 0; max-width: none; white-space: normal; text-align: left; position: static; }
  .tbl.wx-bind td:nth-child(1) { font-weight: 700; font-size: 14px; padding-right: 76px; }
  .tbl.wx-bind td:nth-child(2) { display: inline-block; font-size: 12px; color: var(--muted); margin-right: 8px; }
  .tbl.wx-bind td:nth-child(3) { display: inline-block; font-size: 12px; color: var(--muted); }
  .tbl.wx-bind td:nth-child(4) { margin-top: 8px; }
  .tbl.wx-bind td:nth-child(4) > div { min-width: 0 !important; }
  .tbl.wx-bind td:nth-child(4) input { flex: 1 1 auto; width: auto; min-width: 0; height: 34px; }
  .tbl.wx-bind td:nth-child(4) .btn { flex: 0 0 auto; }
  .tbl.wx-bind td:nth-child(5) { position: absolute; right: 10px; top: 10px; padding: 0; }
  .tbl.wx-bind td:nth-child(5) .badge { font-size: 11px; }
}

/* ============ v2.491 企业微信「审批·待办」轻页面 ============
   企业微信消息卡片点开（/?token=..&wx=1）时 body 加 .wx-mode：隐藏侧边栏，
   只留「待我审批 / 待处理事项 / 我的待办」三块内容，手机上一条一行。 */
body.wx-mode { background: #f5f7fa; }
body.wx-mode .sidebar { display: none !important; }
body.wx-mode .app { display: block !important; }
body.wx-mode .main { max-width: 760px; margin: 0 auto; padding: 12px 14px 30px; overflow-x: hidden; }
.wxt-top { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.wxt-hi { font-size: 15px; font-weight: 700; color: #111827; }
.wxt-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.wxt-topbtns { display: flex; gap: 6px; flex: 0 0 auto; }
.wxt-sec { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px 4px; margin-bottom: 10px; }
.wxt-h { font-size: 14px; font-weight: 700; margin: 2px 0 6px; display: flex; align-items: center; gap: 6px; }
.wxt-grp { font-size: 12px; color: var(--muted); margin: 8px 0 2px; padding-top: 6px; border-top: 1px dashed var(--line); }
.wxt-grp i { font-style: normal; margin-left: 6px; color: var(--primary); }
.wxt-row { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid #f1f5f9; }
.wxt-row:last-child { border-bottom: 0; }
.wxt-ico { flex: 0 0 20px; text-align: center; font-size: 15px; }
.wxt-main { flex: 1; min-width: 0; }
.wxt-t { font-size: 14px; font-weight: 600; color: #111827; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wxt-no { font-family: ui-monospace, Consolas, monospace; font-size: 12px; color: var(--primary); margin-right: 6px; }
.wxt-s { font-size: 12px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wxt-amt { flex: 0 0 auto; font-size: 13px; font-weight: 600; color: #b45309; white-space: nowrap; }
.wxt-btn { flex: 0 0 auto; white-space: nowrap; }
.wxt-empty { font-size: 13px; color: var(--muted); padding: 10px 0 12px; text-align: center; }
.wxt-foot { text-align: center; font-size: 12px; color: var(--muted); padding: 4px 0 18px; }
.wxt-foot a { color: var(--primary); cursor: pointer; }
@media (max-width: 520px) {
  body.wx-mode .main { padding: 8px 8px 24px; }
  .wxt-top { padding: 10px 12px; }
  .wxt-hi { font-size: 14px; }
  .wxt-row { gap: 6px; padding: 10px 0; }
  .wxt-t { font-size: 13.5px; }
  .wxt-amt { font-size: 12px; }
  .wxt-topbtns .btn { padding: 0 8px; font-size: 12px; height: 28px; }
}

/* ===== v2.496 批量仓库调拨明细行（div 网格，不用 table——避免下拉被表格层叠裁剪） ===== */
.tb-head { display: flex; align-items: center; gap: 10px; margin: 16px 0 8px; }
.tb-head b { font-size: 13px; }
.tb-head .muted { font-size: 12px; }
.tb-wrap { }
.tb-tbl { border: 1px solid var(--border); border-radius: 8px; }
.tb-hd, .tb-row { display: grid; grid-template-columns: minmax(210px, 1fr) 92px 78px 108px 38px; gap: 8px; align-items: center; }
.tb-hd { padding: 8px 10px; background: var(--bg); border-bottom: 1px solid var(--border); font-size: 12px; color: var(--muted); border-radius: 8px 8px 0 0; }
.tb-row { padding: 6px 10px; border-bottom: 1px dashed var(--border); }
.tb-row:last-child { border-bottom: 0; }
.tb-row .tb-code, .tb-row .tb-stock { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-row .tb-qty { width: 100%; padding: 8px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; }
.tb-row .tb-qty:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); outline: none; }
@media (max-width: 640px) {
  .tb-hd { display: none; }
  .tb-tbl { min-width: 0; border: 0; }
  .tb-row { grid-template-columns: 1fr 82px 72px; grid-template-areas: "prod prod del" "code stock qty"; row-gap: 6px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; }
  .tb-row > div:nth-child(1) { grid-area: prod; }
  .tb-row > .tb-code { grid-area: code; }
  .tb-row > .tb-stock { grid-area: stock; }
  .tb-row > .tb-qty { grid-area: qty; }
  .tb-row > button { grid-area: del; }
}

/* ===== v2.497 批量调拨：行内序列号提示与勾选面板 ===== */
.tb-ser { font-size: 11.5px; line-height: 1.6; color: var(--muted); margin-top: 4px; word-break: break-all; }
.tb-ser.hidden { display: none; }
.tb-ser b { color: var(--text); font-weight: 500; font-family: ui-monospace, monospace; }
.tb-ser a { font-size: 12px; margin-left: 6px; }
.tb-serbox { border: 1px solid var(--primary); border-radius: 8px; padding: 8px 10px; margin: 2px 0 8px; background: var(--bg); }
.tb-serbox-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; margin-bottom: 6px; }
.tb-serbox-h b { font-size: 12.5px; }
.tb-serbox-h a { font-size: 12px; }
.tb-serbox-l { max-height: 150px; overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 2px 12px; }
.tb-serbox-l label { display: flex; align-items: center; gap: 5px; font-weight: 400; font-size: 12px; cursor: pointer; font-family: ui-monospace, monospace; }
.tb-serbox-f { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }

/* ===== v2.498 日程批量导入（预览弹窗） ===== */
.ev-imp-tip { font-size: 12.5px; line-height: 1.7; color: var(--muted); background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; margin-bottom: 10px; }
.ev-imp-tip b { color: var(--text); }
#ev_imp_text { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; line-height: 1.6; resize: vertical; }
#ev_imp_text:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); outline: none; }
.ev-imp-stat { font-size: 12.5px; margin: 12px 0 6px; }
.ev-imp-list { max-height: 40vh; overflow: auto; border-top: 1px dashed var(--border); border-bottom: 1px dashed var(--border); }
.ev-imp-list table.tbl { margin: 0; }
.ev-imp-list table.tbl td { vertical-align: top; }
.ev-imp-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 12px 0 6px; }
.ev-imp-bar .ev-imp-stat { margin: 0; }
.ev-imp-acts { display: flex; gap: 8px; flex-shrink: 0; }
@media (max-width: 640px) {
  .ev-imp-bar { align-items: stretch; }
  .ev-imp-acts { width: 100%; }
  .ev-imp-acts .btn { flex: 1; }
  .ev-imp-tip { font-size: 12px; padding: 7px 9px; }
}

/* ===== v2.499 固定资产批量删除 ===== */
.adm-sel-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 8px; font-size: 13px; }
.adm-sel-bar:empty { display: none; }
.adm-sel-col { width: 34px; text-align: center; padding-left: 6px !important; padding-right: 4px !important; }
.adm-sel-col input[type="checkbox"] { width: 15px; height: 15px; cursor: pointer; accent-color: var(--primary); }
.adm-bulk-tip { font-size: 12.5px; line-height: 1.75; color: var(--muted); background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; }
.adm-bulk-tip b { color: var(--text); }
.adm-bulk-warn { font-size: 12.5px; line-height: 1.7; color: #b45309; background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 8px 10px; margin-top: 8px; }
.adm-bulk-list { max-height: 42vh; overflow: auto; margin-top: 10px; border-top: 1px dashed var(--border); border-bottom: 1px dashed var(--border); }
.adm-bulk-list table.tbl { margin: 0; }
.adm-bulk-ok { display: flex; align-items: center; gap: 7px; font-size: 13px; margin: 12px 0 4px; }
.adm-bulk-ok input[type="checkbox"] { width: auto; }
.adm-bulk-go { background: var(--danger); border-color: var(--danger); color: #fff; }
.adm-bulk-go:hover { filter: brightness(.94); }
.adm-bulk-go:disabled { opacity: .6; }
@media (max-width: 640px) {
  /* 窄屏：第一行只放「已选 N 项」，按钮独占第二行平分，避免文字被挤成两行 */
  .adm-sel-bar { justify-content: space-between; }
  .adm-sel-bar > span:first-child { flex: 1 1 100%; }
  .adm-sel-bar .muted { display: none; }
  .adm-sel-bar .btn { flex: 1; white-space: nowrap; }
  .adm-bulk-list { max-height: 30vh; }
  /* 手机上只留「编号 / 名称 / 原值」三列（保管人在上方警告里已列出），固定列宽不横向滚动 */
  .adm-bulk-list table.tbl { table-layout: fixed; width: 100%; }
  .adm-bulk-list table.tbl th:nth-child(3), .adm-bulk-list table.tbl td:nth-child(3),
  .adm-bulk-list table.tbl th:nth-child(5), .adm-bulk-list table.tbl td:nth-child(5),
  .adm-bulk-list table.tbl th:nth-child(6), .adm-bulk-list table.tbl td:nth-child(6) { display: none; }
  .adm-bulk-list table.tbl th:nth-child(1), .adm-bulk-list table.tbl td:nth-child(1) { width: 36%; }
  .adm-bulk-list table.tbl th:nth-child(4), .adm-bulk-list table.tbl td:nth-child(4) { width: 26%; }
  .adm-bulk-list table.tbl td { word-break: break-word; }
}

/* ===== v2.507 固定资产批量修改 ===== */
.adm-bfields { margin-top: 10px; border-top: 1px dashed var(--border); }
.adm-bf { display: grid; grid-template-columns: 78px 96px minmax(0, 1fr); gap: 8px; align-items: center; padding: 8px 2px; border-bottom: 1px dashed var(--border); }
.adm-bf-k { font-size: 13px; font-weight: 600; color: var(--text); }
.adm-bf-in { display: flex; gap: 8px; align-items: center; min-width: 0; }
.adm-bf-in > input, .adm-bf-in > select { min-width: 0; }
.adm-bf-in > input { flex: 1 1 auto; }
.adm-bf-in input[type="number"] { max-width: 160px; }
.adm-bf .adm-b-mode { padding: 6px 8px; font-size: 12.5px; }
.adm-bf-in .ent-picker { flex: 1; min-width: 0; }
#adm_bf_dep { gap: 6px; }
#adm_bf_dep > select { flex: 1 1 44%; }
#adm_bf_dep .adm-bf-grp { display: flex; align-items: center; gap: 4px; flex: 1 1 26%; min-width: 0; }
#adm_bf_dep .adm-bf-grp input { flex: 1 1 auto; min-width: 0; max-width: none; }
#adm_bf_dep .adm-bf-grp small { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
@media (max-width: 640px) {
  .adm-bf { grid-template-columns: 1fr 1fr; gap: 6px; padding: 7px 0; }
  .adm-bf-k { grid-column: 1 / -1; }
  .adm-bf-in { grid-column: 1 / -1; flex-wrap: wrap; }
  .adm-bf-in > input, .adm-bf-in > select { flex: 1 1 100%; }
  .adm-bf-in input[type="number"] { max-width: none; }
  #adm_bf_dep > select { flex: 1 1 100%; }
  #adm_bf_dep .adm-bf-grp { flex: 1 1 46%; }
}
/* ===== v2.503 固定资产：使用部门列 + 部门资产统计 ===== */
.adm-dept-card { background: var(--card); border-radius: 12px; box-shadow: 0 1px 3px rgba(16,24,40,.06); padding: 14px 18px; margin-bottom: 16px; }
.adm-dept-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; margin-bottom: 8px; }
.adm-dept-head .muted { font-size: 12px; }
.adm-dept-sp { flex: 1; }
.adm-dept-tbl { margin: 0; }
.adm-dept-tbl td { padding: 8px 10px; }
.adm-dept-row { cursor: pointer; }
.adm-dept-row.on td { background: #eff6ff; }
.adm-dept-go { color: var(--primary); font-size: 12px; white-space: nowrap; }
.adm-dept-bar { height: 7px; background: #eef2f7; border-radius: 999px; overflow: hidden; margin-bottom: 3px; }
.adm-dept-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), #7aa7ff); border-radius: 999px; }
.adm-dept-note { font-size: 12px; color: var(--muted); margin-top: 8px; line-height: 1.7; }
.adm-dept-clear { border-color: var(--primary); color: var(--primary); white-space: nowrap; }
.adm-dept-list { max-height: 42vh; overflow: auto; margin-top: 10px; border-top: 1px dashed var(--border); border-bottom: 1px dashed var(--border); }
.adm-dept-list table.tbl { margin: 0; }
@media (max-width: 760px) {
  /* 资产清单列多：窄屏交给内层横向滚动（全局 .tbl-scroll 在手机是 visible） */
  .adm-asset-wrap { overflow-x: auto; }
  .adm-dept-card { padding: 12px 12px; }
  .adm-dept-head .muted { display: none; }
  .adm-dept-head .btn { margin-left: auto; }
}

/* ===== v2.504 人事管理：组织机构（部门树） ===== */
.org-tbl td { vertical-align: top; }
.org-name b { font-weight: 600; }
.org-branch { color: #cbd5e1; margin-right: 4px; }
.org-note { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.org-link { color: var(--primary); cursor: pointer; text-decoration: underline dotted; }
.org-orphan { background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; font-size: 12.5px; color: #92400e; display: flex; flex-direction: column; gap: 8px; }
.org-orphan-list { display: flex; flex-wrap: wrap; gap: 6px; }
.org-orphan .btn { align-self: flex-end; }
.org-tip { font-size: 12px; color: var(--muted); line-height: 1.75; margin-top: 10px; }
@media (max-width: 760px) {
  .org-tbl { min-width: 720px; }
  .org-orphan .btn { align-self: stretch; }
}

/* ===== v2.500 BOM 物料行：可搜索选择器（窄屏给物料框多留点宽度） ===== */
@media (max-width: 640px) {
  .item-row.bom-row { grid-template-columns: 1fr 66px 30px !important; gap: 6px; }
  .item-row.bom-row .ent-q { font-size: 12.5px; padding: 8px 7px; }
  .item-row.bom-row input[type="number"] { padding: 8px 6px; }
  .item-row.bom-row > .btn { padding: 8px 0; }
}

/* ===== v2.508 人事管理 → 工资表编制 ===== */
.pay-tip { font-size: 12px; color: var(--muted); margin: 0 0 10px; line-height: 1.85; }
.pay-tip b { color: var(--text); }
.pay-sum { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 24px; padding: 10px 14px; margin: 0 0 12px;
  background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; font-size: 13px; color: var(--muted); }
.pay-sum b { color: var(--text); font-size: 14px; }
.pay-sum .pay-sum-net { color: #b42318; }
/* v2.533 30 列宽表：字号整体收一档（td 继承 body 的 14px 会显得臃肿、也更难一屏多列），
   数字列用 tabular-nums 保证小数点对齐；行高同步收紧，避免每行 40px 高 */
.pay-tbl th { font-size: 11.5px; }
.pay-tbl th, .pay-tbl td { white-space: nowrap; padding-left: 6px; padding-right: 6px; }
.pay-tbl td { font-size: 12.5px; padding-top: 7px; padding-bottom: 7px; line-height: 1.5; }
.pay-tbl td b { font-size: 12.5px; }
.pay-tbl .pay-in { width: 54px; padding: 4px 3px; text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; }
/* 发放 / 操作列里的状态徽标也一起收，否则比同列按钮高出一截 */
.pay-tbl .badge { font-size: 11px; padding: 1px 7px; line-height: 1.6; }
/* 隐藏数字输入框的上下箭头，否则 5 位金额会被挤到看不见 */
.pay-tbl .pay-in::-webkit-outer-spin-button, .pay-tbl .pay-in::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pay-tbl .pay-in { -moz-appearance: textfield; appearance: textfield; }
.pay-tbl .pay-sub { font-size: 10.5px; color: var(--muted); font-weight: 400; margin-top: 1px; }
.pay-tbl .pay-act { display: flex; align-items: center; gap: 6px; }
.pay-tbl .pay-act .btn { padding: 3px 8px; font-size: 12px; }
.pay-tbl .pay-in:disabled { background: #f3f4f6; color: var(--muted); }
.pay-tbl td.pay-gross { background: #f4faf6; }
.pay-tbl td.pay-net { background: #fdf6f5; }
.pay-tbl th.pay-col-gross { color: #0b7a3b; }
.pay-tbl th.pay-col-net { color: #b42318; }
/* ===== v2.510 工资表列扩容（提成 / 缴费基数 / 社保五项明细 / 专项附加扣除七项） =====
   30 列必须横向滚动：分组行定色块，专项附加扣除整组浅色底，提示「税前抵扣、不影响实发」 */
.pay-tbl thead .pay-hd-grp th { background: #f7f9fc; font-size: 11.5px; font-weight: 600; line-height: 1.35; }
.pay-tbl th.pay-grp { border-bottom: 1px solid var(--border); }
.pay-tbl th.pay-spcol, .pay-tbl td.pay-spcol { background: #fbf7ff; }
.pay-tbl thead .pay-hd-grp th.pay-spcol { background: #f2eaff; }
.pay-tbl th.pay-basecol, .pay-tbl td.pay-basecol { background: #fdfaef; }
.pay-tbl td.pay-ss { background: #f4faf6; }
.pay-tbl td.pay-ded { background: #fdf7f4; }
.pay-tbl th.pay-col-ss { color: #0b7a3b; }
.pay-tbl th.pay-col-ded { color: #b42318; }
/* v2.530 个税计税基数：浅蓝底 + 可点（点开看本月 / 累计两套口径的推导） */
.pay-tbl th.pay-taxbase-col, .pay-tbl td.pay-taxbase-col { background: #f2f7ff; }
.pay-tbl td.pay-taxbase-col:hover { background: #e3edff; }
.pay-tbl th.pay-taxbase-col { color: #1d4ed8; }
/* 工资条弹窗里的社保明细行与「基数 / 专项」补充说明 */
.ps-tbl .ps-sub td { color: var(--muted); font-size: 12px; padding-left: 18px; }
.ps-extra { margin-top: 8px; font-size: 12.5px; color: var(--text); }
.ps-extra b { color: #b42318; }
@media (max-width: 760px) {
  .pay-tbl .pay-in { width: 52px; padding: 4px 3px; font-size: 12px; }
  .pay-sum { gap: 6px 16px; font-size: 12px; }
  .pay-sum b { font-size: 13px; }
  /* ★工资表 30 列：手机端不能沿用全局的 `.tbl{display:block}`（thead/tbody 会被拆成两个匿名表格，
     列宽各自计算 → 表头与数字错位），这里恢复成真正的表格，横向滚动交给外层 .pay-scroll */
  .tbl-scroll.pay-scroll { overflow-x: auto !important; -webkit-overflow-scrolling: touch; }
  .tbl.pay-tbl { display: table; width: auto; max-width: none; overflow: visible; background-image: none; }
  .pay-tbl th, .pay-tbl td { max-width: none; }
}

/* 窄屏下工资表工具栏改为「按需换行」，不要每个控件各占一整行（否则一进页面全是按钮） */
@media (max-width: 760px) {
  .pay-bar { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; }
  .pay-bar > input, .pay-bar > select { flex: 1 1 120px; width: auto !important; max-width: none !important; padding: 9px 10px; }
  .pay-bar #pay_month { flex: 1 1 130px; }
  .pay-bar .btn { width: auto !important; align-self: center; padding: 8px 11px; font-size: 12.5px; }
  .pay-bar .pay-sp { display: none; }
}

/* ===== v2.509 工资表审批流程条 / 我的工资条 ===== */
.pay-flow { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin: 0 0 12px; background: #fbfcfe; }
.pay-flow-hd { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; margin-bottom: 12px; }
.pay-flow-hd b { font-size: 14px; }
.pay-chain { display: flex; align-items: center; gap: 0; overflow-x: auto; padding-bottom: 2px; }
.pay-step { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.pay-step-dot { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; background: #eef1f5; color: #94a3b8; border: 1px solid var(--border); flex: 0 0 auto; }
.pay-step.done .pay-step-dot { background: #e7f7ee; color: #0b7a3b; border-color: #b7e4c9; }
.pay-step.cur .pay-step-dot { background: #fff5e6; color: #b45309; border-color: #f6d29b; box-shadow: 0 0 0 3px rgba(246, 210, 155, .28); }
.pay-step-tx { display: flex; flex-direction: column; line-height: 1.35; min-width: 76px; }
.pay-step-tx b { font-size: 12.5px; }
.pay-step-tx span { font-size: 11px; color: var(--muted); }
.pay-step-tx i { font-size: 10.5px; color: #a0aec0; font-style: normal; }
.pay-step-line { flex: 1 1 26px; min-width: 18px; height: 1px; background: var(--border); margin: 0 8px; }
.pay-rej { margin-top: 10px; padding: 8px 10px; border-radius: 8px; background: #fef2f2; border: 1px solid #fecaca; color: #b42318; font-size: 12.5px; }
.pay-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border); }
.pay-acts .btn { padding: 6px 11px; }
.pay-mine-hd { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.pay-mine-hd b { font-size: 15px; margin-right: 8px; }
.ps-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 12px; background: #f8fafc;
  border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px; font-size: 13px; }
.ps-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ps-tbl th, .ps-tbl td { padding: 6px 8px; font-size: 12.5px; }
.ps-tbl .ps-sum td { background: #f8fafc; font-weight: 700; }
.ps-net { margin-top: 10px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px;
  display: flex; align-items: baseline; justify-content: space-between; background: #f4faf6; }
.ps-net b { font-size: 20px; color: #b42318; }
@media (max-width: 760px) {
  .ps-cols { grid-template-columns: 1fr; }
  .pay-chain { flex-wrap: wrap; row-gap: 8px; }
  .pay-step-line { display: none; }
  .pay-step { min-width: 46%; }
  .pay-acts .btn { flex: 1 1 auto; }
}

/* ===== v2.538 期初建账向导（财务管理 → 期初建账） ===== */
.op-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 0 10px; }
.op-date { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.op-date input { width: 150px; }
.op-intro { font-size: 12.5px; line-height: 1.7; color: var(--muted); background: #f8fafc; border-left: 3px solid var(--primary); padding: 8px 12px; border-radius: 0 6px 6px 0; margin-bottom: 10px; }
.op-eq { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; padding: 9px 10px; background: #f8fafc; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 10px; }
.op-pill { flex: 0 0 auto; min-width: 84px; padding: 5px 8px; background: #fff; border: 1px solid var(--border); border-radius: 6px; }
.op-pill small { display: block; font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.op-pill b { font-size: 13px; white-space: nowrap; }
.op-pill-main { border-color: var(--primary); }
.op-pill-eq { background: #fff7ed; border-color: #fdba74; }
.op-op { flex: 0 0 auto; color: var(--muted); font-weight: 700; font-size: 12px; padding: 0 1px; }
.op-warn { font-size: 12.5px; color: #b45309; background: #fffbeb; border: 1px solid #fde68a; padding: 6px 10px; border-radius: 6px; margin-bottom: 8px; }
.op-sec { border: 1px solid var(--border); border-radius: 8px; margin-bottom: 10px; background: #fff; }
.op-sec > summary { cursor: pointer; padding: 9px 12px; display: flex; align-items: center; gap: 8px; font-size: 13.5px; list-style: none; }
.op-sec > summary::-webkit-details-marker { display: none; }
.op-sec > summary::before { content: '▸'; color: var(--muted); font-size: 11px; }
.op-sec[open] > summary::before { content: '▾'; }
.op-num { display: inline-flex; width: 20px; height: 20px; align-items: center; justify-content: center; border-radius: 50%; background: var(--primary); color: #fff; font-size: 11.5px; flex: none; }
.op-tip { font-weight: 400; }
.op-sec-b { padding: 0 12px 12px; }
.op-kv { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 6px 0; font-size: 12.5px; }
.op-kv span { color: var(--muted); }
.op-tbl th { font-size: 11.5px; padding: 5px 6px; }
.op-tbl td { font-size: 12.5px; padding: 4px 6px; }
.op-in { width: 100%; min-width: 64px; font-size: 12px; padding: 4px 6px; }
.op-in.num { text-align: right; max-width: 132px; }
.op-hint { font-size: 12px; line-height: 1.7; color: var(--muted); padding: 6px 0 0; }
.op-tax { display: flex; gap: 16px; flex-wrap: wrap; }
.op-tax-col { flex: 1 1 240px; border: 1px dashed var(--border); border-radius: 6px; padding: 8px 10px; }
.op-tax-h { font-size: 12.5px; font-weight: 600; margin-bottom: 6px; }
.op-tax-col label { display: flex; align-items: center; gap: 8px; font-size: 12.5px; margin-bottom: 6px; }
.op-tax-col label .op-in { width: 130px; flex: none; }
.op-foot { font-size: 12px; color: var(--muted); padding: 6px 0 16px; }
@media (max-width: 760px) {
  .op-eq { gap: 4px; }
  .op-pill { min-width: calc(50% - 4px); flex: 1 1 calc(50% - 4px); }
  .op-op { display: none; }
  .op-tax { flex-direction: column; }
  .op-sec-b { padding: 0 8px 10px; overflow-x: auto; }
  .op-tbl { min-width: 560px; }
}

/* ===== v2.539 客户统计卡 + 客户省份分布图 ===== */
.stat-grid.sg-3 { grid-template-columns: repeat(3, 1fr); }
/* 三张卡在手机上仍排一行（数字短、分两行反而更占屏），只把内边距和字号收一档 */
@media (max-width: 560px) {
  .stat-grid.sg-3 { gap: 7px; margin-bottom: 12px; }
  .stat-grid.sg-3 .stat { padding: 10px 9px; border-radius: 10px; }
  .stat-grid.sg-3 .stat .label { font-size: 11.5px; margin-bottom: 3px; }
  .stat-grid.sg-3 .stat .value { font-size: 19px; }
  .stat-grid.sg-3 .stat .sub { font-size: 10.5px; line-height: 1.45; margin-top: 3px; }
}

.cmap-flex { display: flex; gap: 16px; align-items: stretch; }
.cmap-canvas { flex: 1 1 auto; min-width: 0; }
.cmap-side { flex: 0 0 320px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.cmap-svg { width: 100%; height: auto; display: block; background: #fbfdff; border-radius: 8px; }
.cmap-p { transition: fill .15s; cursor: default; }
.cmap-p:hover { fill: #f59e0b !important; }
/* v2.560：有客户的省份可点击 → 手型光标；右侧省份行同样可点 */
.cmap-p-on { cursor: pointer; }
.cmap-row { cursor: pointer; }
.cmap-row:hover td { background: #eff6ff; }
.cmap-t { font-size: 15px; font-weight: 600; pointer-events: none; paint-order: stroke; stroke: rgba(255,255,255,.85); stroke-width: 2.6px; }
.cmap-t2 { font-size: 13px; fill: #64748b; }
/* v2.564 世界地图：视图切换条 + 世界图上的国家标签（字号比中国图小一号） */
.cmap-vbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--text); padding: 0 2px 8px; }
.cmap-vbar a { color: var(--primary); cursor: pointer; white-space: nowrap; }
.cmap-vbar a:hover { text-decoration: underline; }
.cmap-vbar .on { color: var(--text); }
.cmap-vbar .muted { font-size: 12px; }
.cmap-tw { font-size: 12px; font-weight: 600; pointer-events: none; paint-order: stroke; stroke: rgba(255,255,255,.92); stroke-width: 2.4px; }
/* 世界图：海洋底色浅蓝；无客户的国家用近白陆地 + 灰描边（仍可点、仍有 hover 高亮，
   与中国地图的空省份一致——v2.565 起不再用 .cmap-p0 关掉鼠标事件） */
.cmap-svg-world { background: #e2edf8; }
.cmap-legend { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); padding: 8px 2px 0; }
.cmap-legend span { display: inline-flex; align-items: center; gap: 5px; }
.cmap-legend i { width: 13px; height: 13px; border-radius: 3px; border: 1px solid rgba(15,23,42,.10); }
.cmap-kpi { font-size: 13px; color: var(--muted); padding: 2px 0 2px; }
.cmap-kpi b { font-size: 22px; color: var(--primary); margin-right: 2px; }
.cmap-tbl th { font-size: 12px; padding: 5px 6px; }
.cmap-tbl td { font-size: 12.5px; padding: 4px 6px; }
.cmap-bar { display: block; height: 7px; border-radius: 4px; background: linear-gradient(90deg, #93c5fd, #1d4ed8); }
.cmap-warn { font-size: 12px; line-height: 1.7; color: #b45309; background: #fffbeb; border: 1px solid #fde68a; border-radius: 6px; padding: 7px 9px; }
.cmap-warn a { color: var(--primary); cursor: pointer; }
.cmap-src { font-size: 11.5px; line-height: 1.7; color: var(--muted); }
@media (max-width: 1180px) {
  .cmap-flex { flex-direction: column; }
  .cmap-side { flex: 1 1 auto; }
}
/* v2.539 客户分布：已定位客户的终端 / 渠道构成条 */
.cmap-split { display: flex; height: 22px; border-radius: 5px; overflow: hidden; font-size: 11.5px; color: #fff; margin: 2px 0 4px; }
.cmap-split span { display: flex; align-items: center; justify-content: center; white-space: nowrap; overflow: hidden; }
.cmap-split-t { background: #3b82f6; }
.cmap-split-c { background: #f59e0b; }
/* v2.539：手机上地图缩到 360 宽后，省级标注只剩 5px 高（糊成一团），直接隐去，
   靠色块 + 图例 + 下方排行表表达分布 */
@media (max-width: 760px) {
  .cmap-t, .cmap-mk { display: none; }
  /* v2.564：世界地图缩到 334px 后国家小到看不清、标签全叠在一起，给底图一个宽度下限，卡片内横向滑动 */
  .cmap-scroll { overflow-x: auto; }
  .cmap-svg { min-width: 620px; }
}

/* ===== v2.540 客户新增统计（5 卡）+ 各销售员客户统计 ===== */
.stat-grid.sg-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1280px) { .stat-grid.sg-5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) {
  .stat-grid.sg-5 { grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 12px; }
  .stat-grid.sg-5 .stat { padding: 10px 9px; border-radius: 10px; }
  .stat-grid.sg-5 .stat .label { font-size: 11.5px; margin-bottom: 3px; }
  .stat-grid.sg-5 .stat .value { font-size: 19px; }
  .stat-grid.sg-5 .stat .sub { font-size: 10.5px; line-height: 1.45; margin-top: 3px; }
}

.cust-own { border: 1px solid var(--border); border-radius: 8px; margin-bottom: 10px; background: #fff; }
.cust-own > summary { cursor: pointer; padding: 8px 12px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 13px; font-weight: 600; list-style: none; }
.cust-own > summary::-webkit-details-marker { display: none; }
.cust-own > summary::before { content: '▸'; color: var(--muted); font-size: 11px; font-weight: 400; }
.cust-own[open] > summary::before { content: '▾'; }
.cust-own-tbl { margin: 0; }
.cust-own-tbl th { font-size: 11.5px; padding: 5px 8px; }
.cust-own-tbl td { font-size: 12.5px; padding: 4px 8px; }
.cust-own-tbl tr.clk { cursor: pointer; }
.cust-own-tbl tr.clk:hover { background: #f1f5f9; }
.cust-own-tbl tr.on { background: #eff6ff; }
.cust-own-tbl tr.on td:first-child { box-shadow: inset 3px 0 0 var(--primary); }
.cust-own-tbl tr.sum { background: #f8fafc; }
.cust-own-tbl tr.sum td { border-top: 2px solid var(--border); }
.cust-own-pct { display: flex; align-items: center; gap: 7px; min-width: 104px; }
.cust-own-pct > span { flex: 1 1 auto; height: 7px; border-radius: 4px; background: #e8eef7; overflow: hidden; }
.cust-own-pct i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #93c5fd, #1d4ed8); }
.cust-own-pct small { flex: none; width: 32px; text-align: right; font-size: 11px; color: var(--muted); }
.cust-own-note { font-size: 11.5px; line-height: 1.7; color: var(--muted); padding: 6px 12px 9px; }
/* 手机上 5 张卡排 2 列会剩半行空位，让最后一张（本年新增）独占一行补齐 */
@media (max-width: 760px) {
  .stat-grid.sg-5 > .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
  /* 占比条是辅助视觉，手机上先藏起来，6 列数字一屏能看完，不必左右拖 */
  .cust-own-tbl { min-width: 0; }
  .cust-own-tbl th, .cust-own-tbl td { padding: 4px 5px; }
  /* 表头仍不换行（否则「终端」会被拆成竖排单字），靠缩字号和内边距压进一屏 */
  .cust-own-tbl th { font-size: 11px; }
  .cust-own-tbl th:nth-child(5), .cust-own-tbl td:nth-child(5) { display: none; }
  .cust-own > summary { font-size: 12.5px; padding: 8px 10px; }
}

/* ---------- v2.548 研发管理：KPI 在窄屏用 2 列（4 个指标单列堆叠会占掉半屏） ---------- */
@media (max-width: 768px) {
  .stat-grid.rd-stats { grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .stat-grid.rd-stats .stat { padding: 10px 11px; }
  .stat-grid.rd-stats .stat .value { font-size: 18px; }
  .stat-grid.rd-stats .stat .sub { font-size: 11px; line-height: 1.4; }
  /* 台账/费用卡片里的进度条铺满整行，避免 120px 固定宽在手机上显得断掉 */
  .m-cards .prog-wrap { width: 100%; margin-right: 0; }
  .m-cards .m-tags { display: flex; align-items: center; gap: 8px; }
}

/* ---------- v2.550 研发过程管控：二级页签 / 甘特图 ---------- */
.tabs.rd-subtabs { gap: 2px; border-bottom-width: 1px; margin-bottom: 12px; padding-left: 2px; }
.tabs.rd-subtabs button { padding: 6px 12px; font-size: 13px; }
@media (max-width: 768px) {
  .tabs.rd-subtabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tabs.rd-subtabs button { white-space: nowrap; flex: 0 0 auto; }
}
.gantt { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; position: relative; background: #fff; }
.gantt-row { display: flex; align-items: center; gap: 0; min-height: 28px; }
.gantt-name { width: 200px; flex: 0 0 200px; font-size: 12px; color: #374151; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 10px; }
.gantt-track { flex: 1; min-width: 0; position: relative; height: 22px; border-left: 1px dashed #eef0f4; }
.gantt-bar { position: absolute; top: 4px; height: 14px; border-radius: 7px; background: #93c5fd; display: flex; align-items: center; min-width: 6px; }
.gantt-bar span { font-size: 10px; color: #1e3a8a; padding: 0 6px; white-space: nowrap; overflow: hidden; }
.gantt-bar.is-done { background: #86efac; }
.gantt-bar.is-done span { color: #14532d; }
.gantt-bar.is-late { background: #fca5a5; }
.gantt-bar.is-late span { color: #7f1d1d; }
.gantt-today { position: absolute; top: 6px; bottom: 6px; width: 1px; background: #ef4444; pointer-events: none; }
@media (max-width: 768px) {
  .gantt-name { width: 110px; flex: 0 0 110px; font-size: 11px; }
  .gantt-bar span { display: none; }
}

/* ---------- v2.552 原生下拉「可搜索」化（app.js selEnhanceInit） ----------
   原生 select 被 display:none，前面替一个同尺寸按钮；浮层挂 body，定位用 fixed，
   因此不受 .modal-body / .tbl-scroll 的 overflow 裁切。 */
.sel-pick { display: contents; }
.sel-native { display: none !important; }
.sel-btn { width: 100%; min-width: 0; box-sizing: border-box; display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text);
  font-size: 14px; font-family: inherit; line-height: 1.4; text-align: left; cursor: pointer; }
.sel-btn:hover { border-color: #cbd5e1; }
.sel-btn:focus-visible { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.sel-btn:disabled { background: #f4f6fa; color: var(--muted); cursor: not-allowed; }
.sel-btn > .sel-txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sel-btn::after { content: '▾'; flex: 0 0 auto; color: var(--muted); font-size: 11px; }
.sel-pick.is-empty > .sel-btn > .sel-txt { color: var(--muted); }
.sel-drop { position: fixed; z-index: 300; background: #fff; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 16px 40px rgba(16,24,40,.18); display: flex; flex-direction: column; overflow: hidden; }
.sel-q { margin: 8px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 13px; font-family: inherit; outline: none; background: #fff; }
.sel-q:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.sel-list { overflow-y: auto; flex: 1; min-height: 0; padding: 0 4px 6px; -webkit-overflow-scrolling: touch; }
.sel-item { padding: 8px 10px; border-radius: 7px; font-size: 13px; color: var(--text); cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sel-item:hover, .sel-item.active { background: #eff6ff; color: #1d4ed8; }
.sel-item.disabled { color: var(--muted); cursor: default; }
.sel-empty { padding: 12px; text-align: center; color: var(--muted); font-size: 12.5px; }
/* 遗留的「只能选一个」的原生排版规则：select 换成按钮后这些 > 选择器接不上，补一份等价的 */
.toolbar > .sel-pick > .sel-btn { flex: 0 1 auto; }
#adm_bf_dep > .sel-pick > .sel-btn { flex: 1 1 44%; }
.adm-bf-in > .sel-pick > .sel-btn { min-width: 0; }
.pay-bar > .sel-pick > .sel-btn { flex: 1 1 120px; width: auto; }
.item-row > .sel-pick > .sel-btn { padding: 8px; font-size: 13px; }
.ntt-row > .sel-pick > .sel-btn { padding: 7px 10px; }
.tbl td .sel-btn { max-width: 100%; }
@media (max-width: 768px) {
  .sel-item { padding: 11px 10px; font-size: 14px; }
  .sel-q { font-size: 16px; }   /* ≥16px 才不会被 iOS 自动放大 */
}
@media print { .sel-btn { border: none; box-shadow: none; } }
.sel-grp { padding: 8px 10px 4px; font-size: 11px; color: var(--muted); letter-spacing: .02em; }

/* ---------- v2.553 自动记账 ---------- */
/* 4 张结论卡：桌面 4 列、窄屏 2 列（全局窄屏规则会把 .stat-grid 压成 1 列，四张竖排太长） */
.stat-grid.acc-stats { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .stat-grid.acc-stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- v2.556 宽表操作列 ---------- */
/* v2.564：客户列表加了「国别」共 17 列，1440 下会把地址 / 邮箱压成竖排单字（行高 165）。
   固定一个下限走横向滚动，地址 / 邮箱改成单行省略（悬停看全文）。 */
.tbl-cust { min-width: 1820px; }
.tbl-cust td.c-addr, .tbl-cust td.c-mail { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbl-cust td.c-addr { width: 190px; max-width: none; }
.tbl-cust td.c-mail { width: 160px; max-width: none; }
/* v2.555 曾把操作列 position:sticky 钉在右侧，1280 以下它就是一块盖住价格/库存的白方块，观感很差。
   v2.556 起取消钉住：操作列回到表格真正的最后一列，窄屏由 .tbl-scroll 横向滚动过去看。
   为了少滚动，产品列表与仓库列表这两类宽表用 .tbl-tight 收紧留白、价格表头缩写。 */
.tbl-scroll .tbl th.ops-col, .tbl-scroll .tbl td.ops-col { min-width: 140px; }
.tbl-scroll .tbl td.ops-col .actions { gap: 4px; }
.tbl-scroll .tbl td.ops-col .actions .btn { padding-left: 6px; padding-right: 6px; }
/* v2.563：产品列表一行有 4 颗按钮（申请生产 / 编辑 / 停用 / 删除），140px 时「删除」被挤到第二行，
   行高参差不齐。★只在 ≥1400 的宽屏放宽（那里名称列还有余量）；1260 左右是用户常用窗口，
   放宽会把名称列压到 86px、行高翻倍，所以窄屏维持 140，靠 .tbl-scroll 横滑看。 */
@media (min-width: 1400px) {
  .tbl-scroll .tbl.tbl-prod th.ops-col, .tbl-scroll .tbl.tbl-prod td.ops-col { min-width: 194px; }
}

/* ================= v2.586 代理商 P1 弹窗通用块（报价 / 要货 / 结算） =================
   这几类弹窗都要「小标题 + 处理记录 + 提示条」，原先全用 inline style 写散在各处，
   这里收敛成 4 个类，后续同类弹窗直接用，别再复制一长串 style。 */
.sec-title { margin: 14px 0 6px; font-size: 13px; font-weight: 600; }
.hist-list { font-size: 12px; color: var(--muted); }
.hist-list > div { padding: 3px 0; border-bottom: 1px dashed var(--line); }
.hist-list > div:last-child { border-bottom: 0; }
.tip-warn { margin: 10px 0; padding: 9px 12px; border-radius: 8px; background: #fff7ed; border: 1px solid #fed7aa; font-size: 12.5px; }
.tip-note { margin: 10px 0; padding: 9px 12px; border-radius: 8px; background: #f8fafc; border: 1px solid var(--line); font-size: 12.5px; color: #475569; }
.hint { margin-top: 6px; font-size: 12px; color: var(--muted); }

/* ---------- v2.621 领料单（仓库发料 / 生产领料单列表）----------
   ★ 手机端 .tbl 是 display:block + overflow-x:auto，表格自身写 inline min-width 会
     把它撑成 900 宽、整页被推出屏幕（实测 390 宽溢出 538px）。
     宽表的最小宽度只在桌面生效，手机交给表格自身横向滚动。 */
@media (min-width: 721px) {
  .pick-tbl { min-width: 880px; }
  .pick-tbl-sm { min-width: 720px; }
}
