/* ─────────────────────────────────────────────────────────────
   ERP 样式表 — 一套代码同时适配 PC 与手机
   PC：左侧导航 + 顶部工具条 + 表格
   手机：底部 Tab + 卡片式列表（表格自动转卡片）
   ───────────────────────────────────────────────────────────── */
:root {
  --brand: #1d5fd8;
  /* v2.28 修正：`--primary` 此前从未定义，`.qc-bar-f`（v2.27 质量分布条）底色一直落空 → 别名补齐 */
  --primary: #1d5fd8;
  --brand-dark: #17489f;
  --brand-light: #eaf1fe;
  --ink: #1b2431;
  --ink-2: #46536a;
  --muted: #8593a8;
  --line: #e3e8f0;
  --bg: #f4f6fa;
  --card: #ffffff;
  --ok: #17a34a;
  --ok-bg: #e8f7ee;
  --warn: #d97706;
  --warn-bg: #fef4e6;
  --danger: #dc2626;
  --danger-bg: #fdeaea;
  --info: #0891b2;
  --info-bg: #e5f6fa;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 30, 54, .06), 0 6px 18px rgba(16, 30, 54, .05);
  --sidebar-w: 210px;
  --topbar-h: 56px;
  --tabbar-h: 58px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px; /* v2.107 字号全部不动 */
  line-height: 1.45;
}
a { color: var(--brand); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
button, input, select, textarea { font-family: inherit; font-size: 14px; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

/* ── 登录页 ───────────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(140deg, #17489f 0%, #1d5fd8 45%, #23a0c9 100%);
  padding: 20px;
}
.login-card {
  width: 100%; max-width: 400px; background: #fff; border-radius: 16px;
  padding: 30px 26px; box-shadow: 0 20px 50px rgba(9, 24, 51, .28);
}
.login-logo { font-size: 22px; font-weight: 700; color: var(--brand-dark); letter-spacing: .5px; }
.login-sub { color: var(--muted); margin: 6px 0 22px; font-size: 13px; }
.login-member {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--radius);
  margin-bottom: 8px; cursor: pointer; transition: .15s;
}
.login-member:hover { border-color: var(--brand); background: var(--brand-light); }
.login-member .nm { font-weight: 600; }
.login-member .rl { font-size: 12px; color: var(--muted); }
/* v2.78：演示登录名单横向卡片网格（账号多不再竖排一列） */
.login-card.wide { max-width: 1140px; }
.login-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.login-grid .login-member { margin-bottom: 0; }
.login-member.dim { opacity: .55; }
.login-member .lg-badge {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 9px;
  font-size: 11px; font-weight: 600; vertical-align: 1px;
  background: var(--brand-light, #e8f0fe); color: var(--brand-dark, #17489f);
}
.login-member .lg-badge.gray { background: #eef1f5; color: #8a94a3; }
.login-tip {
  margin-top: 16px; padding: 10px 12px; background: var(--warn-bg); color: #92400e;
  border-radius: 8px; font-size: 12.5px; line-height: 1.6;
}

/* ── 框架 ─────────────────────────────────────────────────── */
.app { display: none; }
.app.on { display: block; }
.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.sidebar {
  background: #10203a; color: #c7d3e6; padding: 0 0 20px; position: sticky; top: 0;
  height: 100vh; overflow-y: auto;
}
.side-brand { padding: 16px 18px 14px; border-bottom: 1px solid rgba(255,255,255,.08); position: sticky; top: 0; z-index: 2; background: #10203a; }
.side-brand .t { color: #fff; font-weight: 700; font-size: 15.5px; letter-spacing: .3px; }
.side-brand .s { font-size: 11.5px; color: #7d90ad; margin-top: 2px; }
.side-group { padding: 14px 18px 6px; font-size: 11px; color: #62748f; letter-spacing: 1px; }
.nav-item {
  display: flex; align-items: center; gap: 9px; padding: 9px 18px; cursor: pointer;
  color: #c7d3e6; font-size: 13.5px; border-left: 3px solid transparent;
}
.nav-item:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav-item.on { background: rgba(29,95,216,.28); color: #fff; border-left-color: #4d8ef7; font-weight: 600; }
.nav-item .ic { width: 18px; text-align: center; font-size: 15px; }
/* v2.126 库存台账子菜单：两级缩进（一级 32px / 二级 48px），字号与对比度略降，视觉上从属父项 */
.nav-item.nav-sub { padding: 7px 18px 7px 32px; font-size: 12.5px; color: #a9b8cf; }
.nav-item.nav-sub.nav-sub2 { padding-left: 48px; }
.nav-item.nav-sub .ic { width: 12px; font-size: 12px; opacity: .6; }
.nav-item.nav-sub.on { color: #fff; }
.nav-badge {
  margin-left: auto; background: var(--danger); color: #fff; font-size: 11px;
  padding: 1px 6px; border-radius: 9px; min-width: 18px; text-align: center;
}
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: var(--topbar-h); background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px; padding: 0 18px; position: sticky; top: 0; z-index: 20;
}
.topbar .page-title { font-size: 16px; font-weight: 600; }
.topbar .spacer { flex: 1; }
.user-chip {
  display: flex; align-items: center; gap: 8px; padding: 5px 10px; border-radius: 20px;
  background: var(--bg); cursor: pointer; font-size: 13px;
}
.user-chip .av {
  width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600;
}
.content { padding: 14px; flex: 1; max-width: 1400px; width: 100%; }

/* ── 通用组件 ─────────────────────────────────────────────── */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 10px; }
.card-head {
  padding: 9px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center;
  gap: 8px; flex-wrap: wrap;
}
.card-head .ttl { font-weight: 600; font-size: 14.5px; }
.card-head .spacer { flex: 1; }
.card-body { padding: 10px 14px; }
.card-body.tight { padding: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 14px; border-radius: 7px; border: 1px solid var(--line); background: #fff;
  color: var(--ink-2); cursor: pointer; white-space: nowrap; transition: .15s; font-size: 13.5px;
}
.btn:hover { border-color: #c3cede; background: #fbfcfe; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn.danger { color: var(--danger); border-color: #f3c9c9; }
.btn.danger:hover { background: var(--danger-bg); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--brand); padding: 6px 8px; }
.btn.sm { padding: 4px 9px; font-size: 12.5px; border-radius: 6px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.tag { display: inline-block; padding: 1.5px 8px; border-radius: 20px; font-size: 12px; line-height: 1.7; white-space: nowrap; }
.tag.gray { background: #eef1f6; color: #5b6779; }
.tag.blue { background: var(--brand-light); color: var(--brand-dark); }
.tag.green { background: var(--ok-bg); color: #12693a; }
.tag.orange { background: var(--warn-bg); color: #92510a; }
.tag.red { background: var(--danger-bg); color: #a52020; }
.tag.cyan { background: var(--info-bg); color: #0b6b82; }
/* v2.11：权限变更分类专用色（审计页用） */
.tag.purple { background: #efe9ff; color: #5b3bb5; }
/* v2.49：`.tag.ok` 此前**从未定义过** —— 全站 28 处「已完成 / 已通过 / 已闭环」写的都是
   `<span class="tag ok">`，浏览器拿不到任何底色，看起来和正文一样，等于「完不成都不显眼」。
   补成绿色（与 .tag.green 同色），老代码不用逐处改。 */
.tag.ok { background: var(--ok-bg); color: #12693a; }

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.field { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.field label { font-size: 12px; color: var(--muted); }
input[type=text], input[type=number], input[type=date], input[type=password], select, textarea {
  padding: 6px 9px; border: 1px solid var(--line); border-radius: 7px; background: #fff;
  outline: none; width: 100%; color: var(--ink); min-width: 0;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(29,95,216,.1); }
textarea { min-height: 54px; resize: vertical; }
/* v2.107 紧凑化：表单一行 3 项（此前 auto-fill 宽屏会铺 5-6 列，一行塞太满）；
   字号全部不动。长字段（备注 / 说明类 textarea）独占一行；
   .full 与 :has(textarea) 双保险（旧内核浏览器走 .full）。 */
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px 12px; }
.form-grid.wide { grid-template-columns: repeat(3, 1fr); }
.form-grid > *, .detail-grid > * { min-width: 0; max-width: 100%; }
/* v2.130：必填校验命中时把「是哪一格没填」直接标出来 —— 只弹一句 toast，用户还得自己找 */
.field.err input, .field.err select, .field.err textarea {
  border-color: var(--danger); box-shadow: 0 0 0 3px rgba(214, 49, 49, .10);
}
.field.err > label { color: var(--danger); }
.form-grid .field:has(textarea), .form-grid .field.full { grid-column: 1 / -1; }
.form-grid .field.span2 { grid-column: span 2; }
/* ── v2.200 搜索框内嵌搜索按钮 ─────────────────────────────
   根因：.field 是 flex-direction:column，工具栏里「input+按钮」内联 display:flex
   改不了方向 → 按钮掉到输入框下面单独占一行（用户 2026-11-01）。
   统一改成 .searchbox：按钮绝对定位在输入框内右侧，不再占行。所有纯图标搜索按钮都用这个。 */
.searchbox { position: relative; display: block; min-width: 0; }
.searchbox input { padding-right: 34px; }
.searchbox .sb-btn {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; cursor: pointer; font-size: 15px; line-height: 1;
  padding: 3px 5px; border-radius: 6px; color: var(--muted);
}
.searchbox .sb-btn:hover { background: #eef1f6; color: var(--ink); }

/* ── 表格 ─────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
/* v2.143 列多时按内容宽度铺开，超出页面出横向滑杆（否则列会被挤压换行） */
.table-wrap.scroll-x > table.data { min-width: max-content; }
/* v2.153 台账「详细指标」限定宽度直接可见（不折叠不点击）：原材料最多 3 行、成品不限行数 */
.spec-clamp153 { max-width: 260px; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th {
  text-align: left; padding: 7px 10px; background: #f8fafc; color: var(--ink-2);
  font-weight: 600; font-size: 12.5px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.data td { padding: 7px 10px; border-bottom: 1px solid #f0f3f8; vertical-align: middle; }
table.data td { overflow-wrap: anywhere; }
table.data tbody tr:hover { background: #fafcff; }
table.data tr.clickable { cursor: pointer; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }
.empty { text-align: center; color: var(--muted); padding: 40px 10px; font-size: 13.5px; }

/* ── 统计卡 ───────────────────────────────────────────────── */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 8px; margin-bottom: 10px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; box-shadow: var(--shadow); }
.kpi .k { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.kpi .v { font-size: 24px; font-weight: 700; margin-top: 5px; font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.kpi .u { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 3px; }
.kpi.b .v { color: var(--brand); }
.kpi.g .v { color: var(--ok); }
.kpi.o .v { color: var(--warn); }
.kpi.r .v { color: var(--danger); }

/* ── v2.12 综合经营看板（KPI 卡片 + 零依赖 SVG 图表）───────── */
.bd-bar { flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.bd-title { font-weight: 700; font-size: 15px; }
.bd-note { font-size: 12.5px; color: var(--muted); }
.bd-sel {
  padding: 5px 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
  color: var(--ink); font-size: 13px;
}
.bd-auto { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.kpi-grid.bd-kpis { grid-template-columns: repeat(auto-fit, minmax(196px, 1fr)); }
.bd-sub {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 6px; font-size: 12px; color: var(--muted);
}
.bd-sub > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-mom {
  flex: none; font-weight: 600; font-size: 11.5px; padding: 0 6px; border-radius: 20px;
  background: #eef1f6; color: #5b6779;
}
.bd-mom.up { background: var(--ok-bg); color: #12693a; }
.bd-mom.down { background: var(--danger-bg); color: #a52020; }
.bd-mom.flat { background: #eef1f6; color: var(--muted); }
.bd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; margin-bottom: 14px; }
.bd-grid .card { margin-bottom: 0; }
.bd-donut { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.bd-legend { flex: 1; min-width: 140px; }
.bd-lg-row { display: flex; align-items: center; gap: 7px; padding: 3px 0; font-size: 12.5px; }
.bd-lg-row i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.bd-lg-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-lg-row b { font-variant-numeric: tabular-nums; }
.bd-lg-pct { color: var(--muted); width: 46px; text-align: right; font-variant-numeric: tabular-nums; }
.bd-lg-empty { color: var(--muted); font-size: 12.5px; }
.bd-gauges { display: flex; align-items: center; justify-content: space-around; gap: 12px; flex-wrap: wrap; }
.bd-gauge { text-align: center; }
.bd-gauge-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
@media (max-width: 720px) {
  .bd-grid { grid-template-columns: 1fr; }
  .bd-donut { justify-content: center; }
}

/* ── 进度条 ───────────────────────────────────────────────── */
.bar { height: 6px; background: #eef1f6; border-radius: 4px; overflow: hidden; min-width: 60px; }
.bar > i { display: block; height: 100%; background: var(--brand); border-radius: 4px; transition: width .3s; }
.bar > i.done { background: var(--ok); }

/* ── 详情页 ───────────────────────────────────────────────── */
/* v2.107：详情网格一行 3 项；长文本不遮字（可断行换行） */
.detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 18px; }
.detail-grid .item .lb { font-size: 12px; color: var(--muted); }
.detail-grid .item .vl { font-weight: 500; margin-top: 1px; overflow-wrap: anywhere; word-break: break-word; }
.detail-grid .item.full { grid-column: 1 / -1; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 10px 18px; border-left: 2px solid var(--line); }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before {
  content: ''; position: absolute; left: -6px; top: 5px; width: 10px; height: 10px;
  border-radius: 50%; background: #fff; border: 2px solid var(--brand);
}
.timeline .tm { font-size: 12px; color: var(--muted); }
.timeline .tx { font-size: 13.5px; }

/* ── v2.17 客户跟进时间线 ─────────────────────────────────── */
.fu-timeline { border-left: 2px solid var(--line); margin-left: 4px; padding-left: 0; }
.fu-item { position: relative; padding: 0 0 12px 18px; }
.fu-item:last-child { padding-bottom: 0; }
.fu-dot {
  position: absolute; left: -6px; top: 4px; width: 10px; height: 10px;
  border-radius: 50%; background: #fff; border: 2px solid var(--brand);
}
.fu-body { font-size: 13px; }
.fu-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fu-content { margin-top: 4px; color: var(--ink-2, var(--ink)); line-height: 1.5; white-space: pre-wrap; }
.fu-next { margin-top: 4px; font-size: 12px; color: var(--muted); }

/* ── v2.17 订单进度卡（生产 / 发货 / 回款）──────────────────── */
.op-stages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.op-stage { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.op-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.op-lb { font-size: 13px; font-weight: 600; }
.op-detail { margin-top: 6px; font-size: 12px; color: var(--muted); }
.op-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 14px; }
.op-kpi { background: var(--bg); border-radius: 8px; padding: 8px 10px; }
.op-kpi .k-lb { font-size: 12px; color: var(--muted); }
.op-kpi .k-vl { font-size: 15px; font-weight: 600; margin-top: 2px; }

/* ── 模态 / 提示 ──────────────────────────────────────────── */
.mask {
  position: fixed; inset: 0; background: rgba(15, 25, 42, .45); display: flex; align-items: center;
  justify-content: center; z-index: 100; padding: 16px;
}
.modal { background: #fff; border-radius: 12px; width: 100%; max-width: 640px; max-height: 88vh; display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(9,24,51,.3); }
/* v2.41 订单弹窗加大：宽屏近全幅（96vw），表单三列铺开，滚动余量更足 */
.modal.wide { max-width: min(1150px, 96vw); max-height: 92vh; }
.modal.wide .modal-body { padding: 14px 18px; }
.modal-head { padding: 10px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.modal-head .ttl { font-weight: 600; font-size: 15px; }
.modal-body { padding: 12px 16px; overflow-y: auto; }
.modal-foot { padding: 10px 16px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; }

/* ── v2.53 整页表单（订单 / 报价单不再弹窗，#content 内直接填写）────────── */
.page-form { background: var(--bg, #fff); border: 1px solid var(--line); border-radius: 12px; max-width: min(1150px, 100%); margin: 0 auto; }
.page-form-head { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.page-form-head .ttl { font-weight: 600; font-size: 15px; }
/* 复用 .modal-body 的内边距排版（表单内部选择器按 .modal-body [name=…] 定位，不能改名），但去掉弹窗的滚动约束 */
.page-form .modal-body { padding: 18px 22px; overflow: visible; }
/* ── v2.56 内嵌形态：订单详情页「订单信息」卡内直接编辑（不再点「编辑」跳整页）── */
.page-form.inline { border: 0; border-radius: 0; max-width: none; margin: 0; background: transparent; }
.page-form.inline .modal-body { padding: 0; }
.page-form-foot { display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding: 12px 0 2px; border-top: 1px dashed var(--line); margin-top: 12px; }
#toast-box { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: #1b2431; color: #fff; padding: 9px 16px; border-radius: 8px; font-size: 13.5px;
  box-shadow: 0 8px 24px rgba(0,0,0,.25); animation: tin .2s ease; max-width: 88vw;
}
.toast.ok { background: #146c39; }
.toast.err { background: #b32020; }
.toast.warn { background: #9a5b00; }
@keyframes tin { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.alert-line { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.alert-line:last-child { border-bottom: none; }

/* ── 移动端底部 Tab ───────────────────────────────────────── */
.tabbar { display: none; }
.mobile-only { display: none; }
.desktop-only { display: initial; }

/* ── 响应式：手机 / 窄屏 ──────────────────────────────────── */
@media (max-width: 860px) {
  .shell { display: block; }
  .sidebar { display: none; }
  .desktop-only { display: none !important; }
  .mobile-only { display: initial; }
  .content { padding: 12px 12px calc(var(--tabbar-h) + 18px); }
  .topbar { padding: 0 12px; }
  .topbar .page-title { font-size: 15px; }
  .tabbar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; height: var(--tabbar-h);
    background: #fff; border-top: 1px solid var(--line); z-index: 60;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar .tab {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; color: var(--muted); font-size: 11px; cursor: pointer;
  }
  .tabbar .tab .ic { font-size: 19px; line-height: 1; }
  .tabbar .tab.on { color: var(--brand); font-weight: 600; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .kpi .v { font-size: 20px; }
  .form-grid, .form-grid.wide { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: repeat(2, 1fr); }
  .op-stages { grid-template-columns: 1fr; gap: 10px; }
  .op-kpis { grid-template-columns: repeat(2, 1fr); }
  .modal { max-height: 92vh; border-radius: 12px; }
  .modal-foot .btn { flex: 1; }

  /* 表格 → 卡片 */
  table.data.responsive thead { display: none; }
  table.data.responsive tbody tr {
    display: block; border: 1px solid var(--line); border-radius: 10px;
    margin-bottom: 10px; padding: 10px 12px; background: #fff; box-shadow: var(--shadow);
  }
  table.data.responsive tbody tr:hover { background: #fff; }
  table.data.responsive td {
    display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
    border: none; padding: 3px 0; text-align: left !important;
  }
  table.data.responsive td::before {
    content: attr(data-label); color: var(--muted); font-size: 12px; flex: 0 0 auto;
  }
  table.data.responsive td.primary-cell {
    font-weight: 600; font-size: 14.5px; padding-bottom: 6px; margin-bottom: 4px;
    border-bottom: 1px dashed var(--line);
  }
  table.data.responsive td.primary-cell::before { content: none; }
  table.data.responsive td.act-cell { justify-content: flex-end; padding-top: 8px; }
  table.data.responsive td.act-cell::before { content: none; }
  table.data.responsive td.hide-mobile { display: none; }
}

/* 人员多选（审批人 / 团队成员） */
.picker {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 4px 12px; max-height: 200px; overflow-y: auto;
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; background: #fff;
}
.picker-item { display: flex; align-items: center; gap: 7px; font-size: 13px; padding: 3px 0; cursor: pointer; }
.picker-item input { width: auto; flex: none; }
.picker-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 打印 */
@media print {
  .sidebar, .topbar, .tabbar, .toolbar, .btn { display: none !important; }
  .shell { display: block; }
}

/* ── v1.9.1 应用图标 ─────────────────────────────── */
.login-logo-img { width: 72px; height: 72px; border-radius: 16px; display: block; margin: 0 auto 10px; box-shadow: 0 4px 14px rgba(29,95,216,.18); }
.side-brand { display: flex; align-items: center; gap: 10px; }
.side-brand .side-logo { width: 34px; height: 34px; border-radius: 8px; flex: 0 0 auto; background: #fff; object-fit: cover; }

/* ── v2.0 研发五环节阶段条 ───────────────────────────── */
.rd-stages { display: flex; gap: 8px; flex-wrap: wrap; }
.rd-stage { display: flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px;
  background: #f1f4f9; color: #62748c; font-size: 12.5px; border: 1px solid #e3e9f2; }
.rd-stage .dot { width: 18px; height: 18px; border-radius: 50%; background: #cdd7e5; color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 11px; flex: 0 0 auto; }
.rd-stage.done { background: #eaf6ee; border-color: #cbe8d6; color: #1d7a45; }
.rd-stage.done .dot { background: #2fa36b; }
.rd-stage.cur { background: #e8f0fd; border-color: #bcd4f8; color: #1d5fd8; font-weight: 600; box-shadow: 0 1px 4px rgba(29,95,216,.14); }
.rd-stage.cur .dot { background: #1d5fd8; }
.rd-stage.off .dot { background: #d98b2b; }
.rd-stages.sm .rd-stage { padding: 3px 8px; font-size: 11.5px; }
.rd-stages.sm .rd-stage .dot { width: 15px; height: 15px; font-size: 10px; }

/* ══════════════════════════════════════════════════════════════
   v2.22 设备终身追溯页（#/trace）——对外公开，未登录时「无壳」渲染
   ══════════════════════════════════════════════════════════════ */
body.trace-only .shell { display: block; }
body.trace-only .sidebar,
body.trace-only .topbar,
body.trace-only .tabbar { display: none !important; }
body.trace-only { background: #eef2f9; }
body.trace-only .content { max-width: 880px; margin: 0 auto; padding: 0 14px 48px; }

.tr-page { padding-top: 0; }
.tr-brand {
  display: flex; align-items: center; gap: 9px; padding: 18px 2px 14px;
  font-weight: 700; font-size: 15px; color: #1d3a6b; letter-spacing: .3px;
}
.tr-brand .tr-logo { font-size: 19px; }

.tr-hero {
  background: linear-gradient(135deg, #1d5fd8 0%, #2f7ae5 55%, #37a0e0 100%);
  border-radius: 14px; color: #fff; padding: 20px 22px; margin-bottom: 14px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  box-shadow: 0 8px 24px rgba(29,95,216,.22);
}
.tr-hero-l { min-width: 0; flex: 1; }
.tr-hero .tr-label { font-size: 11.5px; letter-spacing: 2px; color: rgba(255,255,255,.78); }
.tr-hero .tr-sn {
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 25px; font-weight: 700;
  letter-spacing: 1.1px; margin: 5px 0 10px; word-break: break-all;
}
.tr-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.tr-badge {
  display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 12px;
  background: rgba(255,255,255,.22); border: 1px solid rgba(255,255,255,.35);
}
.tr-badge.ghost { background: rgba(255,255,255,.10); }
.tr-hero-r { text-align: center; flex: 0 0 auto; }
.tr-hero .tr-prog { font-size: 34px; font-weight: 800; line-height: 1.1; }
.tr-hero .tr-prog-t { font-size: 11.5px; color: rgba(255,255,255,.82); }

.tr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1px; background: var(--line); }
.tr-cell { background: var(--card); padding: 11px 14px; }
.tr-k { font-size: 11.5px; color: var(--muted); margin-bottom: 3px; }
.tr-v { font-size: 13.5px; color: var(--ink); font-weight: 600; word-break: break-all; }

/* 六段时间轴 */
.tr-timeline { position: relative; padding-left: 6px; }
.tr-step { position: relative; display: flex; gap: 12px; padding: 0 0 16px 0; }
.tr-step:last-child { padding-bottom: 0; }
.tr-step::before {
  content: ''; position: absolute; left: 15px; top: 30px; bottom: 0;
  width: 2px; background: var(--line);
}
.tr-step:last-child::before { display: none; }
.tr-dot {
  width: 32px; height: 32px; border-radius: 50%; flex: 0 0 auto; z-index: 1;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
  background: #eef2f8; border: 2px solid var(--line); filter: grayscale(1); opacity: .6;
}
.tr-step.done .tr-dot { background: var(--ok-bg); border-color: #b9e3c9; filter: none; opacity: 1; }
.tr-step-b { min-width: 0; padding-top: 3px; }
.tr-step-h { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.tr-step-t { font-weight: 600; font-size: 14px; color: var(--ink); }
.tr-step.todo .tr-step-t { color: var(--muted); }
.tr-step-at { font-size: 11.5px; color: var(--muted); font-family: ui-monospace, Menlo, Consolas, monospace; }
.tr-step-s { font-size: 12.8px; color: var(--ink-2); margin-top: 2px; }
.tr-step-d { font-size: 12px; color: var(--muted); margin-top: 3px; white-space: pre-wrap; }

/* 定制要素四段 */
.tr-cp { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; padding: 12px 14px; border-top: 1px solid var(--line); background: #fafcff; }
.tr-cp-c .tr-cp-v { font-size: 12.8px; color: var(--ink-2); white-space: pre-wrap; line-height: 1.5; }

.tr-note {
  background: var(--info-bg); border: 1px solid #c8e9f2; color: #0b6a80;
  border-radius: var(--radius); padding: 11px 14px; font-size: 12.8px; line-height: 1.7; margin-bottom: 14px;
}
.tr-empty { text-align: center; color: var(--muted); padding: 26px 14px; font-size: 13.5px; }
.tr-pre {
  margin: 0; padding: 12px 14px; background: #0f1b2d; color: #cfe1ff; border-radius: 8px;
  font-size: 11.8px; line-height: 1.6; overflow: auto; max-height: 460px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}

/* SN 查询 */
.tr-query { margin-top: 14px; }
.tr-q-t { font-weight: 600; font-size: 14px; }
.tr-q-s { font-size: 12px; color: var(--muted); margin: 3px 0 10px; }
.tr-q-form { display: flex; gap: 8px; }
.tr-q-form input {
  flex: 1; min-width: 0; padding: 9px 12px; border: 1px solid var(--line);
  border-radius: 8px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13.5px;
}
.tr-q-form input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(29,95,216,.12); }

.tr-foot { text-align: center; color: var(--muted); font-size: 11.5px; padding: 22px 8px 8px; }

@media (max-width: 620px) {
  .tr-hero .tr-sn { font-size: 19px; }
  .tr-hero .tr-prog { font-size: 27px; }
  .tr-hero { padding: 16px; gap: 12px; }
  body.trace-only .content { padding: 0 10px 40px; }
}

/* ══════════════════════════════════════════════════════════════
   v2.23 激光器序列号标签批量打印页（#/labels）—— 内部页，"无壳"版式
   ══════════════════════════════════════════════════════════════ */
body.labels-only .shell { display: block; }
body.labels-only .sidebar,
body.labels-only .topbar,
body.labels-only .tabbar { display: none !important; }
body.labels-only { background: #f2f4f8; }
body.labels-only .content { max-width: 1020px; margin: 0 auto; padding: 0 14px 44px; }

.lb-page { padding-top: 0; }
.lb-brand {
  display: flex; align-items: center; gap: 8px; padding: 18px 2px 12px;
  font-weight: 700; font-size: 15px; color: #1d3a6b;
}
.lb-toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 14px; margin-bottom: 12px;
}
.lb-tb-l { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; flex: 1; min-width: 0; }
.lb-tb-r { display: flex; gap: 8px; flex-wrap: wrap; }
.lb-f { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); }
.lb-f select { padding: 6px 9px; border: 1px solid var(--line); border-radius: 7px; font-size: 12.5px; background: #fff; }
.lb-stat { font-size: 12.5px; color: var(--ink-2); }
.lb-stat b { color: var(--brand); }

.lb-tip {
  background: var(--info-bg); border: 1px solid #c8e9f2; color: #0b6a80;
  border-radius: 9px; padding: 9px 13px; font-size: 12.3px; line-height: 1.65; margin-bottom: 14px;
}

.lb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.lb-item {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: 9px;
  padding: 11px 9px 9px; text-align: center;
}
.lb-item.off { opacity: .38; }
.lb-chk {
  position: absolute; top: 6px; left: 8px; display: flex; align-items: center; gap: 3px;
  font-size: 11px; color: var(--muted); cursor: pointer;
}
/* v2.199：不再把二维码硬压到 98px（45 模块的码会被压成 2 像素/格 + 非整数倍模糊，
   手机扫屏幕必然「无法识别」）。改由 SVG 自身尺寸决定，容器只做上限约束。 */
.lb-qr { display: flex; align-items: center; justify-content: center; }
.lb-qr svg { max-width: 100%; height: auto; }
.lb-sn {
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; font-weight: 700;
  margin-top: 5px; word-break: break-all; color: var(--ink);
}
.lb-lines { margin-top: 5px; text-align: left; }
.lb-line { display: flex; gap: 6px; font-size: 11px; line-height: 1.5; }
.lb-line .k { color: var(--muted); flex: 0 0 auto; }
.lb-line .v { color: var(--ink-2); word-break: break-all; }
.lb-foot { text-align: center; color: var(--muted); font-size: 11.5px; padding: 20px 8px 4px; }

/* v2.199：可点击放大的二维码（手机扫屏幕时先点开大图再扫） */
.qr-zoom { display: inline-block; line-height: 0; cursor: zoom-in; background: #fff; }
.qr-zoom:hover { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.qr-zoom-big { text-align: center; background: #fff; padding: 10px; border-radius: 8px; line-height: 0; }
.qr-zoom-big svg { max-width: 100%; height: auto; }
.qr-zoom-tip { margin-top: 9px; font-size: 12.5px; color: var(--ink-2); text-align: center; line-height: 1.7; }

/* 打印：工具栏 / 提示条 / 勾选框 / 页脚一律不上纸；未勾选的标签整张不印 */
@media print {
  body.labels-only { background: #fff; }
  body.labels-only .shell { display: block; }
  body.labels-only .content { max-width: none; padding: 0; margin: 0; }
  .lb-brand, .lb-toolbar, .lb-tip, .lb-foot, .lb-chk { display: none !important; }
  .lb-page { padding: 0; }
  .lb-grid { gap: 3mm; }
  .lb-item { border: 1px dashed #999; border-radius: 3px; page-break-inside: avoid; break-inside: avoid; }
  .lb-item.off { display: none !important; }
  .lb-item .lb-qr { height: auto; }
}

/* ══════════════════════════════════════════════════════════════
   v2.25 激光器生产制造核心
   ① 扫码汇报（无壳移动页 #/scan）② 车间排产 ③ 车间实时 ④ 损耗分析
   ══════════════════════════════════════════════════════════════ */
body.scan-only .shell { display: block; }
body.scan-only .sidebar,
body.scan-only .topbar,
body.scan-only .tabbar { display: none !important; }
body.scan-only { background: #eef2f9; }
body.scan-only .content { max-width: 620px; margin: 0 auto; padding: 0 12px 44px; }

.scan-wrap { padding-top: 10px; }
.scan-head { padding: 14px 4px 10px; }
.scan-title { font-size: 19px; font-weight: 700; color: #1d3a6b; }
.scan-sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.scan-input { display: flex; gap: 8px; margin-bottom: 14px; }
.scan-input input {
  flex: 1; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 14px; background: #fff; min-width: 0;
}
.scan-dev { padding: 4px 2px; }
.scan-dev .sn {
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 17px; font-weight: 700;
  color: var(--brand); word-break: break-all;
}
.scan-dev .meta { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.scan-meta { font-size: 13px; color: var(--ink-2); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.scan-proc {
  display: flex; flex-direction: column; gap: 3px; padding: 11px 12px;
  border-bottom: 1px solid var(--line); cursor: pointer; border-radius: 8px;
}
.scan-proc:last-child { border-bottom: none; }
.scan-proc:hover { background: var(--hover, #f5f8ff); }
.scan-proc .pf { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.scan-proc .pf .seq {
  display: inline-flex; width: 20px; height: 20px; align-items: center; justify-content: center;
  background: var(--brand); color: #fff; border-radius: 50%; font-size: 11.5px; flex: 0 0 auto;
}
.scan-proc .ps { font-size: 12.3px; color: var(--muted); padding-left: 27px; }
.scan-proc.done .pf .seq { background: var(--ok, #1a9c6b); }
.scan-proc.done { opacity: 0.78; }
.scan-proc.doing { background: #fff8ec; }
/* v2.31 P6-F4：扫码上报的调试记录附件（现场拍照上传） */
.scan-files { margin-top: 7px; display: flex; flex-direction: column; gap: 4px; }
.scan-file {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--hover, #f5f8ff); border: 1px solid var(--line); border-radius: 7px;
  padding: 5px 9px; font-size: 12.5px; color: var(--ink-2);
}
.scan-file a { color: var(--danger); font-size: 12px; text-decoration: none; }
.scan-foot { text-align: center; color: var(--muted); font-size: 11.5px; padding: 16px 10px 4px; line-height: 1.7; }

/* 车间排产行 */
.sched-row {
  display: flex; align-items: flex-start; gap: 10px; padding: 11px 4px;
  border-bottom: 1px solid var(--line);
}
.sched-row:last-child { border-bottom: none; }
.sched-seq {
  flex: 0 0 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  background: var(--brand); color: #fff; border-radius: 8px; font-weight: 700; font-size: 13px;
}
.sched-main { flex: 1; min-width: 0; }
.sched-sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.sched-why { margin-top: 5px; display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  display: inline-block; padding: 1px 8px; border-radius: 20px; font-size: 11.5px;
  background: #eef3ff; color: #28527a; border: 1px solid #d8e4fb;
}
.chip.score { background: #f3f0ff; color: #5b3ea8; border-color: #e2dbfb; }
.sched-ops { display: flex; gap: 5px; flex: 0 0 auto; }

/* 损耗分析 */
.loss-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 6px 9px; border-radius: 7px; background: #f7f9fc; margin-bottom: 4px; font-size: 12.8px;
}
.loss-row .lr-v { color: var(--ink-2); }
.muted { color: var(--muted); }

/* ── v2.26 部门业务看板（总经理视角：所有部门的业务数据） ── */
.chip-r { background: #fff1f0; color: #a8071a; border-color: #ffccc7; }
.chip-g { background: #f0fbf4; color: #0f7b3f; border-color: #c8eeda; }
.chip-soft { background: #f6f7f9; color: #5c6470; border-color: #e6e8ec; }
.chip b { font-weight: 700; }
.dept-card .card-head .ttl { display: inline-block; }
.dept-card.orph { border-left: 3px solid #ffccc7; }
.dept-metrics { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.dept-mini-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(176px, 1fr)); gap: 8px; }
.dept-mini {
  display: block; padding: 8px 10px; border-radius: 9px; background: #f7f9fc;
  border: 1px solid #e8edf6; color: inherit; text-decoration: none;
}
.dept-mini:hover { background: #eef3ff; border-color: #d8e4fb; }
.dept-mini .dm-name { font-weight: 700; font-size: 13px; }
.dept-mini .dm-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.dept-mini .dm-kpis { margin-top: 5px; font-size: 11.5px; color: var(--ink-2); display: flex; gap: 8px; flex-wrap: wrap; }
.dept-mini .dm-kpis .dm-ovd { color: var(--danger); font-weight: 700; }

/* ── v2.27 质检核心：强制质检节点 / 参数达标 / 质检校准报告 / 缺陷占比 ── */

/* 整机质检校准报告打印页（无壳版式） */
body.qcr-only .shell { display: block; }
body.qcr-only .sidebar,
body.qcr-only .topbar,
body.qcr-only .tabbar { display: none !important; }
body.qcr-only { background: #f2f4f8; }
body.qcr-only .content { max-width: 860px; margin: 0 auto; padding: 0 14px 44px; }
.qcr-page { padding-top: 0; }
.qcr-brand { display: flex; align-items: center; gap: 8px; padding: 18px 2px 12px; font-weight: 700; font-size: 15px; color: #1d3a6b; }
.qcr-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 0 0 10px; }
.qcr-stat { font-size: 13px; color: var(--ink-2); }
.qcr-tip { font-size: 12px; color: var(--muted); padding: 0 2px 12px; line-height: 1.6; }
.qcr-doc { background: #fff; border: 1px solid #e6e8ec; border-radius: 12px; padding: 22px 24px 18px; }
.qcr-title { font-size: 19px; font-weight: 700; text-align: center; letter-spacing: 2px; color: #16233a; }
.qcr-sub { text-align: center; font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.qcr-head { display: flex; gap: 16px; align-items: flex-start; margin: 14px 0 6px; flex-wrap: wrap; }
.qcr-qr { text-align: center; flex: 0 0 auto; }
.qcr-qr svg { display: block; }
.qcr-qr-t { font-size: 11px; color: var(--muted); margin-top: 2px; }
.qcr-meta { flex: 1; min-width: 260px; border-collapse: collapse; font-size: 12.5px; }
.qcr-meta th { text-align: left; font-weight: 400; color: var(--muted); padding: 4px 8px 4px 0; white-space: nowrap; width: 78px; }
.qcr-meta td { padding: 4px 12px 4px 0; color: var(--ink); border-bottom: 1px dotted #eceef2; }
.qcr-sec { font-size: 13.5px; font-weight: 700; color: #16233a; margin: 16px 0 7px; padding-left: 8px; border-left: 3px solid var(--primary); }
.qcr-tb { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.qcr-tb th, .qcr-tb td { border: 1px solid #e6e8ec; padding: 5px 8px; text-align: left; }
.qcr-tb thead th { background: #f6f8fb; font-weight: 500; color: var(--ink-2); }
.qcr-sum { font-size: 12px; color: var(--muted); margin-top: 6px; }
.qcr-empty { font-size: 12.5px; color: var(--muted); padding: 8px 0; }
.qcr-text { font-size: 12.5px; line-height: 1.7; color: var(--ink); }
.qcr-v { font-size: 12px; font-weight: 700; }
.qcr-v.ok { color: #0f7b3f; } .qcr-v.bad { color: #a8071a; } .qcr-v.pend { color: #ad6800; } .qcr-v.rec { color: #6b7280; }
.qcr-c-ok { color: #0f7b3f; } .qcr-c-bad { color: #a8071a; } .qcr-c-pend { color: #ad6800; }
.qcr-sign { display: flex; gap: 22px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink); margin-top: 18px; padding-top: 12px; border-top: 1px dashed #dfe3ea; }
.qcr-warn { margin-top: 10px; font-size: 12.5px; color: #a8071a; background: #fff1f0; border: 1px solid #ffccc7; border-radius: 8px; padding: 8px 10px; }
.qcr-foot { text-align: center; font-size: 11.5px; color: var(--muted); padding: 14px 0 0; }

/* 质量分析：问题分布 / 物料缺陷占比 */
.qc-2col { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.qc-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.qc-bar-k { min-width: 104px; font-size: 13px; }
.qc-bar-t { flex: 1; height: 10px; background: var(--bg-2); border-radius: 5px; overflow: hidden; }
.qc-bar-f { height: 100%; background: var(--primary); }
.qc-bar-f.danger { background: var(--danger); }
.qc-bar-v { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* ── v2.28 仓储核心：预警中心 Tab / 环形图图例 / 库存分析 ── */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 0; }
.tabs .tab {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 14px; cursor: pointer; text-align: left; font: inherit; color: var(--ink);
  min-width: 108px; line-height: 1.35;
}
.tabs .tab:hover { border-color: var(--brand); }
.tabs .tab.active { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: var(--brand-light); }
.tabs .tab .tag { vertical-align: middle; font-size: 11.5px; }
.qc-bar-row { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; font-size: 13px; }
.qc-bar-row i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.qc-bar-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qc-bar-pct { color: var(--muted); font-size: 12px; min-width: 46px; text-align: right; }
.qc-2col .card { margin: 0; }
.qc-2col { margin-top: 12px; }

@media print {
  body.qcr-only { background: #fff; }
  body.qcr-only .shell { display: block; }
  body.qcr-only .content { max-width: none; padding: 0; margin: 0; }
  .qcr-brand, .qcr-toolbar, .qcr-tip, .qcr-foot { display: none !important; }
  .qcr-doc { border: 0; border-radius: 0; padding: 0; }
}

/* ══════════════════════════════════════════════════════════════
   v2.74 单据打印页（#/doc-print?type=so|quote|po|pr|mv&id=…）
   无壳版式 + A4 单据版面：打印时侧栏/顶栏/工具栏不上纸
   ══════════════════════════════════════════════════════════════ */
body.docprint-only .shell { display: block; }
body.docprint-only .sidebar,
body.docprint-only .topbar,
body.docprint-only .tabbar { display: none !important; }
body.docprint-only { background: #f2f4f8; }
body.docprint-only .content { max-width: 860px; margin: 0 auto; padding: 0 14px 44px; }
.dp-bar { display: flex; align-items: center; gap: 8px; padding: 12px 2px; }
.dp-sheet {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 28px 34px; margin-bottom: 20px;
}
.dp-head { text-align: center; border-bottom: 2px solid #333; padding-bottom: 12px; }
.dp-company { font-size: 16px; font-weight: 700; letter-spacing: 2px; color: #1d2b4a; }
.dp-title { font-size: 21px; font-weight: 700; letter-spacing: 8px; margin-top: 6px; color: #111; }
.dp-no { font-size: 12.5px; color: #555; margin-top: 6px; }
.dp-info {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 24px;
  padding: 12px 0 14px; border-bottom: 1px solid #ccc;
}
.dp-info-cell { display: flex; font-size: 13px; line-height: 1.7; }
.dp-info-cell .lb { color: #555; flex: 0 0 auto; margin-right: 6px; }
.dp-info-cell .lb::after { content: '：'; }
.dp-info-cell .vl { color: #111; word-break: break-all; }
.dp-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 12.5px; }
.dp-table th, .dp-table td { border: 1px solid #999; padding: 6px 8px; vertical-align: top; }
.dp-table th { background: #f3f4f6; font-weight: 600; text-align: center; white-space: nowrap; }
.dp-table td.num, .dp-table th.num { text-align: right; }
.dp-spec { font-size: 11.5px; color: #777; }
.dp-total { display: flex; align-items: baseline; gap: 12px; padding: 12px 2px 4px; font-size: 13.5px; flex-wrap: wrap; }
.dp-total .dp-amt { font-size: 16px; color: #111; }
.dp-total .dp-words { color: #333; }
.dp-sign {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin-top: 34px; padding-top: 10px; font-size: 13px;
}
.dp-sign-cell .lb { color: #555; }
.dp-sign-cell .vl { display: inline-block; min-width: 90px; border-bottom: 1px solid #999; min-height: 18px; padding: 0 8px; }

@media print {
  body.docprint-only { background: #fff; }
  body.docprint-only .shell { display: block; }
  body.docprint-only .content { max-width: none; padding: 0; margin: 0; }
  .dp-bar { display: none !important; }
  .dp-sheet { border: 0; border-radius: 0; padding: 0; }
}

/* ══════════════════════════════════════════════════════════════
   v2.76 岗位横向排布
   ① 岗位设置页：部门内岗位卡片网格（横向自适应换行，空缺红标）
   ② 岗位工作台：顶部岗位切换按钮条（当前岗位高亮）
   ══════════════════════════════════════════════════════════════ */
.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.pos-card {
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
  background: var(--bg, #fff); display: flex; flex-direction: column; justify-content: space-between;
}
.wb-postbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
