/* ===== 设计令牌（2026-11-02 S1/S2/S3）：全站颜色/圆角收口于此 =====
 * 主题切换：html[data-theme=teal|navy] 覆盖主色族与侧栏/页面底色；状态语义色全主题一致。 */
:root {
  --pri: #2563eb; --pri-deep: #1d4ed8; --pri-light: #dbeafe; --pri-bg: #eff6ff; --pri-sky: #38bdf8; --pri-rgb: 37,99,235; --pri-deep-rgb: 29,78,216;
  --side-bg: #0f172a; --side-item: #cbd5e1;
  --page: #f1f5f9; --ink: #1e293b; --ink-2: #64748b; --line: #e2e8f0;
  --ok: #16a34a; --ok-deep: #15803d; --ok-bg: #dcfce7;
  --warn: #ea580c; --warn-deep: #c2410c; --warn-bg: #ffedd5;
  --danger: #dc2626; --danger-deep: #b91c1c; --danger-bg: #fee2e2;
  --purple: #7c3aed; --purple-deep: #6b21a8; --purple-bg: #f3e8ff;
  --sky-deep: #0e7490; --pri-ink: color-mix(in srgb, var(--pri) 50%, #000); --pri-soft: color-mix(in srgb, var(--pri) 62%, #fff);
  --radius: 12px;
}
html[data-theme='teal'] { --pri: #0F6E56; --pri-deep: #085041; --pri-light: #E1F5EE; --pri-bg: #eef6f2; --pri-sky: #5DCAA5; --sky-deep: #2F7A62; --side-bg: #04342c; --page: #eef6f2; --pri-rgb: 15,110,86; --pri-deep-rgb: 8,80,65; }
html[data-theme='navy'] { --pri: #534AB7; --pri-deep: #3C3489; --pri-light: #EEEDFE; --pri-bg: #f2f1f8; --pri-sky: #AFA9EC; --sky-deep: #57509E; --side-bg: #26215C; --page: #f2f1f8; --pri-rgb: 83,74,183; --pri-deep-rgb: 60,52,137; }
/* 深咖（2026-11-04 袁华明新增主题）：主色 #6F4E37（咖啡棕），暖调侧栏与米色页面底 */
html[data-theme='coffee'] { --pri: #6F4E37; --pri-deep: #533A28; --pri-light: #EADFD4; --pri-bg: #f5efe9; --pri-sky: #B08968; --sky-deep: #7A5C43; --side-bg: #2E2018; --page: #f5efe9; --pri-rgb: 111,78,55; --pri-deep-rgb: 83,58,40; }

* { box-sizing: border-box; margin: 0; padding: 0; }
/* hidden 属性必须压过组件自身的 display（否则 .quick-login 这类设了 display 的元素藏不住） */
[hidden] { display: none !important; }
/* 手机端字体放大防护（2026-11-16 袁华明反馈"放大情况右侧超出"）：禁止系统/浏览器字体放大劫持页面文字，
 * 否则微信内置浏览器/安卓系统字体放大时 nowrap 文字（人员 chip、按钮）会被撑出容器右缘。
 * 不影响用户主动捏合缩放（那走视觉缩放，不改布局）。 */
html, body, * { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif; background: var(--page); color: var(--ink); font-size: 14px; font-variant-numeric: tabular-nums; }

/* 登录 */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg,var(--pri-deep),var(--pri-sky)); }
.login-card { background: #fff; padding: 36px 32px; border-radius: 14px; width: 360px; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.login-card h1 { font-size: 22px; color: var(--pri-deep); text-align: center; }
.login-card .subtitle { text-align:center; color:#64748b; margin:6px 0 22px; }
.field { margin-bottom: 14px; }
.remember { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #475569; margin: -4px 0 14px; cursor: pointer; user-select: none; }
.remember input { width: auto; margin: 0; }
.field input { width: 100%; padding: 11px 12px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px; }
/* 超时升级设置里的阈值输入（与 .field-row 同款视觉） */
.fld { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #475569; }
.fld .ipt, .fld input { padding: 9px 11px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px; font-family: inherit; }
.btn { padding: 9px 16px; border: none; border-radius: 8px; cursor: pointer; font-size: 14px; }
.btn.primary { background: var(--pri); color: #fff; width: 100%; padding: 11px; font-size: 15px; }
.btn.primary:hover { background: var(--pri-deep); }
.btn.tiny { padding: 4px 10px; font-size: 12px; background: #e2e8f0; color: #334155; }
.btn.sm { padding: 5px 10px; font-size: 12px; background: var(--pri); color: #fff; }
.btn.sm.green { background: #16a34a; }
.btn.sm.red { background: #dc2626; }
.btn.sm.gray { background: #64748b; }
.btn.sm.orange { background: #ea580c; }
/* 搜索放大镜：嵌在搜索框内部右侧，无边框无底色，仅图标 */
.search-wrap { position: relative; display: inline-flex; align-items: center; }
.search-wrap .btn-icon-search { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }
.btn-icon-search { border: none; background: none; cursor: pointer; font-size: 15px; padding: 2px 4px; line-height: 1; border-radius: 6px; }
.btn-icon-search:hover { background: #e2e8f0; }
.hint { color: #94a3b8; font-size: 12px; margin-top: 14px; line-height: 1.5; }
.linkbtn { color: var(--pri); font-size: 13px; margin: 10px 0 0; cursor: pointer; text-align: center; }
.linkbtn:hover { text-decoration: underline; }
/* 登录页「忘记密码 / 注册账号」同一排横向布局 */
.login-links { display: flex; justify-content: center; gap: 22px; margin-top: 10px; }
.login-links .linkbtn { margin: 0; }
.hint-warn { color: #b45309; display: inline-block; margin-top: 6px; }
.err { color: #dc2626; font-size: 13px; margin-top: 8px; min-height: 16px; }

/* 布局 */
.app-page { display: flex; min-height: 100vh; position: relative; }
/* flex: 0 0 220px —— 必须禁止收缩：业务流程导览等宽内容页会把 .main 撑开，
 * 侧栏若保持默认 flex-shrink:1 就会被挤成一条窄条（2026-09-06 修） */
.sidebar { flex: 0 0 220px; width: 220px; background: var(--side-bg); color: #e2e8f0; display: flex; flex-direction: column; padding: 18px 0; transition: transform .2s ease; }
.brand { font-size: 18px; font-weight: 700; color: #fff; text-align: center; line-height: 1.3; padding: 0 10px 18px; border-bottom: 1px solid #1e293b; }
.brand span { font-size: 12px; color: var(--pri-sky); font-weight: 400; }
.sidebar nav { flex: 1; padding: 12px 0; }
.nav-item { padding: 11px 20px; cursor: pointer; color: #cbd5e1; border-left: 3px solid transparent; }
.nav-item:hover { background: #1e293b; color: #fff; }
.nav-item.active { background: #1e293b; color: #fff; border-left-color: var(--pri-sky); }
.userbox { padding: 14px 20px; border-top: 1px solid #1e293b; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.userbox .un { font-weight: 600; width: 100%; }
.userbox .ur { font-size: 12px; color: #94a3b8; width: 100%; margin: 0 0 4px; }
.userbox .btn.tiny { display: inline-block; }

/* 2026-11-02 手机端统一桌面布局：.main 固有最小宽度 960px，窄视口（手机横/竖屏）整页
 * 横向滚动查看完整桌面版面（侧栏 220 + 内容 960），内容不再被压扁重叠；
 * 更宽内容（大表格）由 .content 的 overflow-x:auto 内部横向滚动兜底 */
.main { flex: 1; min-width: 960px; display: flex; flex-direction: column; }
.topbar { height: 56px; background: #fff; border-bottom: 1px solid #e2e8f0; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; }
.pt { font-size: 18px; font-weight: 600; color: #0f172a; }
.bell { position: relative; cursor: pointer; font-size: 20px; }
.badge { position: absolute; top: -6px; right: -8px; background: #dc2626; color: #fff; border-radius: 10px; padding: 0 5px; font-size: 11px; }
.bell-panel { position: absolute; right: 0; top: 30px; width: 340px; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.15); max-height: 420px; overflow: auto; z-index: 50; }
.bell-item { padding: 11px 14px; border-bottom: 1px solid #f1f5f9; cursor: pointer; }
.bell-item.unread { background: var(--pri-bg); }
.bell-item .bt { font-weight: 600; font-size: 13px; }
.bell-item .bb { color: #64748b; font-size: 12px; margin-top: 3px; }
.content { padding: 22px; flex: 1; overflow-x: auto; }

/* 卡片/表格 */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; box-shadow: 0 1px 3px rgba(0,0,0,.04); transition: border-color .15s; }
.card:hover { border-color: #d4dce6; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.card-h label { margin: 0 4px 0 0; color: #5f5e5a; font-size: 13px; }
.card-h .ipt { width: auto; }
.card h3 { font-size: 15px; margin-bottom: 14px; color: #0f172a; }
.grid { display: grid; gap: 16px; }
.grid.cols4 { grid-template-columns: repeat(4,1fr); }
.grid.cols5 { grid-template-columns: repeat(5,1fr); }
/* 仪表盘四框必须严格等宽：1fr 的默认最小值是 auto（=min-content），而框 1 的四格、
 * 框 4 的三格 min-content 较大，会撑住自己不缩、反过来挤压其余框——实测 1152px 下四框
 * 宽度变成 274/178/178/167，视觉上错乱。minmax(0,1fr) 强制均分，内容溢出由框内自行消化。
 * 注意选择器要写成 .grid.dash-top（与 .grid.cols4 同权重、靠后定义才生效）。 */
.grid.dash-top { grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* 框内小格：默认 .stat 的 16px 内边距 + 16px 间距，会让内容区只剩 30px 左右，
 * 而「试用单」3 字×13px=39px、「3 天内到期」6 字≈78px 都放不下 → 中文自动折行，
 * 表现为「变成两行 / 几个字大小看着不一样」。这里收紧内边距与间距并禁止折行。
 * 标签字号固定 13px（2026-09-06 用户指定）。 */
/* 框内分项可单独点击（点分项只看该分项，点框空白处看整框），给手型光标提示 */
.dash-top .stat[data-kind], .dash-top .stat[data-level], .dash-top .stat[data-group], .dash-top .stat-row[data-group] { cursor: pointer; }
.dash-top .stat[data-kind]:hover, .dash-top .stat[data-level]:hover, .dash-top .stat[data-group]:hover { border-color: var(--pri-light); border-color: color-mix(in srgb, var(--pri) 45%, #fff); box-shadow: 0 2px 10px color-mix(in srgb, var(--pri) 14%, transparent); filter: brightness(.97); }
.dash-top .stat-box .grid { gap: 8px; }
.dash-top .stat { padding: 10px 4px; text-align: center; border-radius: 10px; transition: border-color .15s, box-shadow .15s, filter .15s; }
/* 分项小格软色底（与数字颜色同色系）：只染色不加彩边（2026-09-06 用户要求去掉边框颜色） */
.dash-top .stat[data-kind="order"], .dash-top .stat[data-level="watch"] { background: var(--pri-bg); }
.dash-top .stat[data-kind="trial"] { background: #f5f3ff; }
.dash-top .stat[data-kind="stock"] { background: #ecfdf5; }
.dash-top .stat[data-kind="aftersales"], .dash-top .stat[data-level="soon"] { background: #fff7ed; }
.dash-top .stat[data-level="overdue"] { background: #fef2f2; }
/* 完成进度列：迷你进度条 + 百分比 */
.prog-cell { display: flex; align-items: center; gap: 6px; }
.prog-cell .prog-bar { flex: 1; min-width: 34px; height: 8px; background: #e2e8f0; border-radius: 4px; overflow: hidden; }
.prog-cell .prog-bar i { display: block; height: 100%; border-radius: 4px; }
.prog-cell .prog-num { font-size: 12px; font-weight: 600; white-space: nowrap; }
.sf-cell { display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.sf-prog { font-size: 12px; font-weight: 600; color: #64748b; white-space: nowrap; }
.dash-top .stat .num { font-size: 22px; font-weight: 800; letter-spacing: .5px; }
.dash-top .stat .lbl { font-size: 13px; white-space: nowrap; }
.grid.cols3 { grid-template-columns: repeat(3,1fr); }
.grid.cols2 { grid-template-columns: repeat(2,1fr); }
.stat { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 16px; }
.stat .num { font-size: 26px; font-weight: 700; color: var(--pri); }
.stat .lbl { color: #64748b; margin-top: 4px; font-size: 13px; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid #eef2f7; }
th { background: #f8fafc; color: #475569; font-weight: 600; }
/* 统一业务表格（订单/备货/售后/异常）：表头与单元格居中，表头不换行 */
.tbl th, .tbl td, .ex-tbl th, .ex-tbl td { text-align: center; vertical-align: middle; }
.tbl th, .ex-tbl th { white-space: nowrap; }
/* 2026-11-09 用户管理「操作」列：编辑/重置密码/删除 三个按钮保持单行不折行（否则列窄会挤成两行显得错乱） */
.tbl td.ops { white-space: nowrap; }
.tbl td.ops .btn.sm { margin: 2px 3px; }
.tbl tbody tr:nth-child(even) td { background: #f8fafc; }
/* 个人工作汇总：列标题悬停口径说明（平时不显示，悬停带 ⓘ 的标题才浮出解释） */
.pw-th.has-tip { cursor: help; }
.pw-th .pw-tip-icon { display: inline-block; margin-left: 4px; color: var(--pri); font-size: 11px; vertical-align: middle; }
.tbl tbody tr:hover td { background: #eef2f7; }
tr:hover td { background: #eef2f7; }
/* 顶栏两段式布局：左（折叠按钮 + 页面标题）/ 右（励志语句 + 铃铛） */
.topbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar-right { display: flex; align-items: center; gap: 16px; min-width: 0; }
/* 右上角「铃铛左侧」的随机励志/向上语句（2026-09-16 袁华明）：右对齐、过长省略号截断 */
.topbar-quote {
  max-width: 46vw;
  color: #64748b;
  font-size: 13px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
}
.topbar-quote::before { content: "🌿 "; }
/* 侧栏左下角姓名下不再显示职位/角色（2026-09-16 袁华明） */
#userRole { display: none; }
/* 成品库三张清单固定列宽：保证「产品编号/型号/产品名称/来源/入库/状态」纵向对齐（2026-09-16） */
.fin-tbl { table-layout: fixed; }
.fin-tbl th, .fin-tbl td { overflow-wrap: anywhere; word-break: break-word; vertical-align: middle; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 12px; background: #e2e8f0; color: #334155; }
.tag.blue { background: var(--pri-light); color: var(--pri-deep); }
.tag.green { background: #dcfce7; color: #15803d; }
.tag.orange { background: #ffedd5; color: #c2410c; }
.tag.red { background: #fee2e2; color: #b91c1c; }
.tag.gray { background: #f1f5f9; color: #475569; }
.tag.purple { background: #f3e8ff; color: #6b21a8; }
/* 3001 三大板块状态色 */
.tag.doing { background: var(--pri-light); color: var(--pri-deep); }
.tag.done { background: #dcfce7; color: #15803d; }
.tag.closed { background: #f1f5f9; color: #475569; }
.tag.todo { background: #f1f5f9; color: #475569; }
.tag.approved { background: #dcfce7; color: #15803d; }
.tag.submitted { background: #ffedd5; color: #c2410c; }
.tag.rejected { background: #fee2e2; color: #b91c1c; }
.tag.draft { background: #f1f5f9; color: #475569; }
.tag.open { background: #fee2e2; color: #b91c1c; }

/* (N-2) 仪表盘未闭环单据表：列表风格与加待办标注前完全一致（不改行底色、不加左侧色条），
 *   仅对「当前账号」有待办的行，在序号格前贴一枚 .todo-badge 标注框。 */
.todo-badge { display: inline-block; margin-right: 4px; padding: 1px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; background: #fed7aa; color: #9a3412; vertical-align: middle; }
.todo-badge.mine { background: #dc2626; color: #fff; }
.todo-badge.urgent { box-shadow: 0 0 0 2px #fbbf24; }
/* 「我的待办」行整行底色加深：与红色 .todo-badge 同色系（暖橙），让待办单据一眼可见；
 * 列表行加在 td 上（避免污染 tr 的 box-shadow），平铺卡片加在卡片本体上。 */
#openTbl tbody tr.has-my-todo > td { background: #fff7ed !important; }
#openTbl tbody tr.has-my-todo:hover > td { background: #ffedd5 !important; }
#openTbl tbody tr.has-my-todo.has-urgent > td { background: #fde68a !important; }
#openTbl tbody tr.has-my-todo.has-urgent:hover > td { background: #fcd34d !important; }
.open-card.has-my-todo { background: #fff7ed; border-color: #fdba74; }
.open-card.has-my-todo:hover { background: #ffedd5; border-color: #fb923c; }
.open-card.has-my-todo.has-urgent { background: #fde68a; border-color: #f59e0b; }
.open-card.has-my-todo.has-urgent:hover { background: #fcd34d; border-color: #d97706; }

/* 仪表盘统计框：各账号待办 / 各小组未闭环单据 / 预警单据 */
.stat-box h3 { margin-bottom: 10px; }
.stat-box { cursor: pointer; transition: box-shadow .15s; }
/* 边框保持默认灰、不变色（2026-09-06 用户要求四框不要边框颜色）：悬停/激活只用投影与底纹区分 */
.stat-box:hover { box-shadow: 0 4px 14px rgba(15,23,42,.07); }
/* 统计框标题底纹蓝色 · 柔和版（2026-09-06 用户反馈 var(--pri) 饱和度太强）：
 * 改浅蓝渐变底 + 深蓝字，视觉柔和不刺眼；负外边距铺满卡片宽度、贴合顶部分色条。
 * 点击高亮态标题略深一档，与边框/浅蓝卡底共同区分激活。 */
.stat-box h3 {
  background: linear-gradient(135deg, var(--pri-light), color-mix(in srgb, var(--pri) 18%, #fff)); color: var(--pri-deep); font-size: 15px; font-weight: 700;
  margin: -18px -18px 12px; padding: 12px 18px;
  border-radius: 12px 12px 0 0;
  border-bottom: 1px solid color-mix(in srgb, var(--pri) 25%, #fff);
}
.stat-box.active h3 { background: linear-gradient(135deg, color-mix(in srgb, var(--pri) 18%, #fff), color-mix(in srgb, var(--pri) 28%, #fff)); }
/* 高亮态：只保留边框变色 + 浅蓝底，去掉外发光光晕（2026-09-06 用户要求轮播不要刺眼的光晕） */
.stat-box.active { background: var(--pri-bg); }
/* 激活态加强（2026-09-06）：点击统计框/分项后，框体用蓝描边明显标示，
 * 让「列表里哪些行被高亮」与「上方哪个框在起作用」一眼对应。 */
.dash-top .stat-box.active { outline: 2px solid var(--pri); outline-offset: -2px; box-shadow: 0 6px 18px color-mix(in srgb, var(--pri) 18%, transparent); }
/* 被点击的分项（类型格 / 小组格 / 预警档位格）：蓝圈 + 加粗，标示当前高亮来源 */
.dash-top .stat.active-sub { box-shadow: inset 0 0 0 2px var(--pri); }
.dash-top .stat-row.active-sub { box-shadow: inset 0 0 0 2px var(--pri); }
.dash-top .stat.active-sub .lbl, .dash-top .stat-row.active-sub .sr-name { font-weight: 700; }
.stat-list { max-height: 232px; overflow-y: auto; }
.stat-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; }
.stat-row:nth-child(odd) { background: #f8fafc; }
.stat-row:hover { background: var(--pri-bg); }
.stat-row.me { background: var(--pri-bg); }
.stat-row .sr-name { flex: 1; min-width: 0; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-row .sr-sub { flex: 0 0 auto; color: #94a3b8; font-size: 12px; }
.stat-row .sr-num { flex: 0 0 auto; font-weight: 700; color: var(--pri-deep); background: var(--pri-bg); border: 1px solid var(--pri-light); border-radius: 12px; padding: 1px 10px; font-size: 12px; white-space: nowrap; }
/* 「我的待办事项」筛选框：放在「全部未闭环单据」标题行右侧；点击只看本人待办单据 */
.dash-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.dash-title-row h3 { margin-bottom: 0; }
/* 业务流转页清单标题行：左侧标题、右侧「我的待办/全部/我发起的范围切换」，位于搜索框上方 */
.list-head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.list-head-row h3 { margin-bottom: 0; }
.list-head-row .scope-seg { flex: 0 0 auto; }
.mine-filter-box { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; padding: 3px 12px; margin-bottom: 0; border: 1px dashed #c7d2fe; border-radius: 10px; background: #f5f8ff; cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s; }
.mine-filter-box:hover { border-color: #818cf8; background: #eef2ff; }
.mine-filter-box.active { border-style: solid; border-color: #4f46e5; background: #e0e7ff; box-shadow: 0 4px 14px rgba(79,70,229,.16); }
.mine-filter-box .mf-ico { font-size: 15px; }
.mine-filter-box .mf-label { font-weight: 700; color: #312e81; }
.mine-filter-box .mf-num { font-weight: 800; font-size: 16px; color: #4f46e5; background: #e0e7ff; border: 1px solid #c7d2fe; border-radius: 12px; padding: 1px 12px; }
/* 仪表盘表格行高亮：点击统计框后命中的单据行加主题色底纹（2026-11-04 袁华明：高亮色与主题色一致，
 * 随默认蓝/teal/navy 三主题联动；与现有 .has-todo/.todo-mine 不冲突） */
#openTbl tbody tr.hl-blue { background: var(--pri-light) !important; }
/* 2026-11-04 修复斑马条盖住高亮：斑马纹把底色打在 td 上（.tbl tbody tr:nth-child(even) td），
 * td 底色永远盖住 tr 底色 → 偶数行高亮完全看不见。高亮必须同层打到 td 上才能压过斑马纹。 */
#openTbl tbody tr.hl-blue td { background: var(--pri-light) !important; }
/* hover 用主色中调（比 pri-light 深一档，主题内同色系），td/tr 同层避免层叠互盖 */
#openTbl tbody tr.hl-blue:hover,
#openTbl tbody tr.hl-blue:hover td { background: color-mix(in srgb, var(--pri) 22%, #fff) !important; }
/* 「待办公屏」点击某人跳转过来时的提示条（2026-09-17 袁华明）：
 * 说明「正在高亮谁 / 共几笔 / 本页亮了几笔」，并提供「取消高亮」；配色与 .hl-blue 蓝色高亮同一色系。 */
.hl-user-bar {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 12px; padding: 9px 12px;
  background: var(--pri-bg); border: 1px solid color-mix(in srgb, var(--pri) 30%, #fff); border-radius: 10px;
  color: var(--pri-deep); font-size: 13.5px; line-height: 1.55;
}
.hl-user-bar b { color: var(--pri-deep); }
.hl-user-bar .hu-ico { flex: none; font-size: 15px; }
.hl-user-bar .btn { margin-left: auto; flex: none; }
/* ====== 单据清单「列表 / 平铺」双模式样式（移植自版本2） ====== */
.seg { display: inline-flex; border: 1px solid var(--pri-light); border-radius: 8px; overflow: hidden; }
.seg-btn { border: none; background: #fff; padding: 5px 12px; font-size: 13px; cursor: pointer; color: #64748b; transition: background .15s, color .15s; }
.seg-btn.on { background: var(--pri); color: #fff; }
.seg-btn:not(.on):hover { background: var(--pri-bg); color: var(--pri); }
.seg-btn + .seg-btn { border-left: 1px solid var(--pri-light); }
.open-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.open-card { border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px 12px; cursor: pointer; background: #fff; transition: border-color .15s, box-shadow .15s; }
.open-card:hover { border-color: var(--pri); box-shadow: 0 2px 10px rgba(var(--pri-rgb), .12); }
.open-card.hl-blue { outline: 2px solid var(--pri); outline-offset: -2px; background: var(--pri-bg); }
.oc-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.oc-name { font-weight: 600; margin-bottom: 2px; }
.oc-sub { color: #94a3b8; font-size: 12px; margin-bottom: 6px; }
.oc-row { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-top: 3px; }
.oc-lbl { flex: 0 0 62px; color: #94a3b8; font-size: 12px; }
/* 当前打开详情的单据行高亮（2026-11-04 袁华明：改主题色系、比统计高亮稍深一档以示区分）：
 * 底色=主题主色 30% 混白（比 hl-blue 的 --pri-light 深），左侧条=主题主色 */
#content tbody tr.row-active > td { background: color-mix(in srgb, var(--pri) 30%, #fff) !important; }
#content tbody tr.row-active { box-shadow: inset 4px 0 0 var(--pri); }
#content tbody tr.row-active:hover > td { background: color-mix(in srgb, var(--pri) 42%, #fff) !important; }
#content tbody tr.row-active td { font-weight: 600; color: var(--pri-deep); }
/* 平铺模式下「正在查看此单」的卡片高亮：与列表行同主题色系 */
.open-card.row-active { outline: 2px solid var(--pri); outline-offset: -2px; background: color-mix(in srgb, var(--pri) 14%, #fff); box-shadow: 0 2px 10px color-mix(in srgb, var(--pri) 22%, transparent); }
.open-card.row-active .oc-head { font-weight: 600; color: var(--pri-deep); }
/* 成品库「点行 → 对应生产单据详情」（2026-09-12 袁华明）：有对应备货单（生产单据）的行 / 卡片整行可点，
 * 用手型光标 + 淡蓝悬停提示可点；正在查看高亮（row-active）优先级更高，故 hover 规则不加 !important。 */
.row-jump { cursor: pointer; }
#content tbody tr.row-jump > td { transition: background .12s; }
#content tbody tr.row-jump:hover > td { background: var(--pri-bg); }
.open-card.row-jump:hover { border-color: var(--pri); box-shadow: 0 2px 10px rgba(var(--pri-rgb), .12); }
/* 详情基础信息条（订单编号 / 仪器名称 / 是否溯源） */
.dp-info { display:flex; flex-wrap:wrap; gap:10px 18px; padding:10px 14px; margin:10px 0; background:#f8fafc; border:1px solid #e2e8f0; border-radius:8px; }
.dp-info .kv { display:flex; flex-direction:column; gap:3px; flex:1 1 0; min-width:130px; text-align:center; align-items:center; }
.dp-info .kv b { font-size:12px; color:#64748b; font-weight:600; text-align:center; }
.dp-info .kv span { font-size:14px; color:#0f172a; text-align:center; }
.dp-info .kv.trace-link { cursor:pointer; }
.dp-info .kv .trace-link { color:var(--pri); font-weight:600; text-decoration:underline; text-underline-offset:2px; }
.dp-info .kv .trace-link:hover { color:var(--pri-deep); }
.dp-info .kv b { font-size:12px; color:#64748b; font-weight:600; }
.dp-info .kv span { font-size:14px; color:#0f172a; }
/* 剩余交货天数 预警配色 */
.dp-info .kv span.lvl-overdue { color:#dc2626; font-weight:700; }
.dp-info .kv span.lvl-soon { color:#ea580c; font-weight:700; }
.dp-info .kv span.lvl-watch { color:#ca8a04; font-weight:600; }
.dp-info .kv span.lvl-normal { color:#16a34a; }
.dp-info .kv span.lvl-none { color:#64748b; }
/* 详情头部第二行「单列」：标题「N台（件）产品编号」、内容全部产品编号；整列占满宽度、居中显示（2026-09-08 袁华明要求产品编号列居中） */
.dp-info.dp-sum2 { margin-top: 0; }
.dp-info.dp-sum2 .kv.kv-sum { flex: 1 1 100%; min-width: 0; text-align: center; align-items: center; justify-content: center; }
.dp-info.dp-sum2 .kv.kv-sum b { display: block; text-align: center; margin-bottom: 2px; }
.dp-info.dp-sum2 .kv.kv-sum span { display: block; text-align: center; }
.dp-info.dp-sum2 .kv.kv-sum .dp-nos { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; line-height: 1.5; }
.dp-info.dp-sum2 .kv.kv-sum .dp-nos .no-chip { display: inline-block; padding: 2px 9px; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 6px; font-size: 12px; line-height: 1.7; white-space: nowrap; color: #334155; }
/* 生产排产「批量生成编号」：固定编号 + 起始编号 + 数量 一键生成连续编号 */
.su-gen { margin: 4px 0 8px; padding: 8px 10px; background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 8px; }
.su-gen-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.su-gen-lbl { font-weight: 600; color: #334155; }
.su-gen-row > span { font-size: 12px; color: #64748b; }
.su-gen-lbl-block { flex-basis: 100%; }
.su-gen-in { width: 150px; padding: 4px 8px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 13px; }
/* 单据详情信息区：非加急单蓝色底、加急单淡红底（与加急原因呼应） */
/* 仪器名称行（.dp-info）不做高亮：统一中性灰底，加急/非加急的高亮只体现在标题行。
 * 历史版本曾用 .dp-info.non-urgent / .dp-info.urgent 给本行染色，已按用户要求移除。 */

.field-row { margin-bottom: 12px; }
.field-row label { display: block; margin-bottom: 5px; color: #475569; font-size: 13px; }
.field-row input:not([type="checkbox"]):not([type="radio"]), .field-row select, .field-row textarea { width: 100%; padding: 9px 11px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px; font-family: inherit; }
.field-row textarea { resize: vertical; min-height: 60px; }
/* 智能粘贴（2026-09-11 袁华明）：标签与按钮同一行显示，按钮不再独占整行、文案精简以免折行 */
.field-row.smart-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.field-row.smart-line > label { display: inline-block; margin-bottom: 0; white-space: nowrap; }
.field-row.smart-line .smart-paste-btn { width: auto; flex: 0 0 auto; }
/* 维修报告弹窗：只读框、费用明细表、按钮区 */
.field-row .ro { background: #f1f5f9; color: #334155; padding: 9px 11px; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 14px; min-height: 38px; white-space: pre-wrap; }
table.cost-edit { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 4px; }
table.cost-edit th, table.cost-edit td { border: 1px solid #e2e8f0; padding: 5px 6px; text-align: left; }
table.cost-edit input { width: 100%; padding: 6px 7px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 13px; font-family: inherit; box-sizing: border-box; }
table.cost-edit .c-del { border: none; background: #fee2e2; color: #b91c1c; width: 24px; height: 24px; border-radius: 6px; cursor: pointer; line-height: 1; font-size: 15px; }
table.cost-edit tfoot td { background: #f8fafc; padding: 7px 6px; }
/* 维修费用合计行（2026-09-11 袁华明）：原在费用明细表页脚，现排在「工时」行之后 */
.cost-sum { margin-top: 10px; padding: 8px 10px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 13px; color: #334155; }
.cost-sum b { color: #0f172a; }
.modal-btns { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }
/* 维修照片采集：缩略图列表 + 删除按钮 + 复选框标签 */
.photo-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.photo-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.photo-list .ph-item { position: relative; display: inline-block; }
.photo-list .ph-item img { width: 78px; height: 78px; object-fit: cover; border: 1px solid #cbd5e1; border-radius: 8px; display: block; }
.photo-list .ph-item .ph-del { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; padding: 0; margin: 0; border-radius: 50%; border: none; background: #dc2626; color: #fff; font-size: 13px; line-height: 1; cursor: pointer; }
.field-row label.ck { display: flex; align-items: center; gap: 6px; font-weight: 500; color: #334155; margin-bottom: 0; cursor: pointer; }
.field-row label.ck input { width: auto; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
/* 复合输入：数字 + 单位下拉 同行（左数字、右下拉），如试用天数=数字+自然日/工作日 */
.combo-days { display: flex; gap: 8px; align-items: stretch; }
.combo-days input[type=number] { flex: 1 1 auto; min-width: 0; width: auto; }
.combo-days select { flex: 0 0 92px; width: auto; }
/* 试用单弹框：期望交期 / 试用天数 同列，各自的「单位」下拉同列（纵向对齐），
 * 右侧长格留给「其他需求 / 试用原因」——天数与单位框尽量窄（2026-09-09 袁华明要求） */
/* 试用单日期行（2026-11-04 袁华明）：两字段 1/2 + 1/2 布局（日期与后面输入框各占一半），占满整行 */
.row-trial { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
/* 下单弹框客户行：左列（客户单位）加宽以完整显示公司名，右列（联系电话）略宽，中间（联系人）保持窄 */
/* 客户名称 / 联系人 / 联系电话：把更多宽度留给客户名称（2026-09-09 袁华明要求） */
/* 客户三件套（2026-11-04 袁华明）：客户名称占 1/2，联系人与联系电话各占 1/4（合计 1/2） */
.row3-cust { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
/* 详情页操作区重排：当前环节标题 + 本环节 / 转单·流转 / 其他 三区分组，逻辑更清晰 */
.act-panel { background:#f8fafc; border:1px solid #e2e8f0; border-radius:10px; padding:12px 14px; margin-top:10px; }
.act-head { display:flex; align-items:center; gap:8px; padding-bottom:9px; margin-bottom:10px; border-bottom:1px dashed #cbd5e1; }
.act-k { font-size:12px; color:#475569; background:#eef2f7; padding:2px 9px; border-radius:6px; font-weight:600; }
.act-v { font-size:15px; color:#0f172a; font-weight:700; }
.act-hint { font-size:12px; color:#64748b; margin-left:auto; text-align:right; max-width:60%; }
.act-grp { margin-bottom:9px; }
.act-grp:last-child { margin-bottom:0; }
/* 订单详情：左侧竖向流程 + 右侧工作内容（可折叠） */
.dp-flow { margin:10px 0 4px; }
.dp-flow-tools { display:flex; align-items:center; justify-content:flex-end; gap:10px; margin:2px 2px 10px; }
.dp-flow-cur { font-size:12px; color:#64748b; margin-right:auto; }
.dp-flow-cur b { color:#0f172a; }
.dp-flow-steps { display:flex; flex-direction:column; gap:12px; }
.flow-step { display:grid; grid-template-columns:218px 1fr; border:1px solid #e2e8f0; border-radius:10px; overflow:hidden; background:#fff; position:relative; }
.flow-step.done { border-left:4px solid #16a34a; }
.flow-step.current { border-left:4px solid #ea580c; }
.flow-step.todo { border-left:4px solid #cbd5e1; }
.flow-step .fs-left { background:#f8fafc; border-right:1px solid #e2e8f0; padding:13px 14px; display:flex; flex-direction:column; gap:9px; cursor:pointer; user-select:none; position:relative; }
.flow-step .fs-left:hover { background:#f1f5f9; }
.fs-top { display:flex; align-items:center; gap:8px; }
.fs-caret { font-size:11px; color:#94a3b8; width:12px; text-align:center; }
.fs-dot { width:10px; height:10px; border-radius:50%; flex:0 0 auto; }
.fs-dot.done { background:#16a34a; }
.fs-dot.current { background:#ea580c; box-shadow:0 0 0 3px #fed7aa; }
.fs-dot.todo { background:#cbd5e1; }
.fs-name { font-size:14px; font-weight:600; color:#0f172a; line-height:1.3; }
.fs-state { align-self:flex-start; font-size:12px; }
.fs-meta { margin-top:1px; }
.fs-meta .fs-by { font-size:12px; color:#475569; line-height:1.4; }
.fs-meta .fs-by.cur { color:#ea580c; font-weight:600; }
.fs-meta .fs-by.dim { color:#94a3b8; }
.fs-meta-row { font-size:12px; color:#475569; line-height:1.55; }
.fs-meta-row .fs-ico { margin-right:3px; }
/* 每步「展开/收起」文字按钮：置于左侧流程列右侧中部（紧贴分隔线、竖直居中），折叠/展开均可见，不遮挡步骤名/状态/时间 */
.fs-toggle { position:absolute; right:12px; top:50%; transform:translateY(-50%); font-size:12px; color:var(--pri); cursor:pointer; user-select:none; border:1px solid var(--pri-light); background:var(--pri-bg); border-radius:6px; padding:2px 10px; white-space:nowrap; z-index:2; }
.fs-toggle:hover { background:var(--pri-light); }
.flow-step .fs-right { padding:13px 64px 13px 16px; min-width:0; }
/* 折叠：仅隐藏右列内容，保留提示条；展开：内容显示、提示条显示"双击收起" */
.flow-step.collapsed .fs-right .fs-body { display:none; }
.flow-step .fs-right .fs-hint { display:none; margin-top:8px; font-size:12px; line-height:1.5; color:#111; cursor:pointer; user-select:none; }
.flow-step.collapsed .fs-right .fs-hint { display:block; }
.flow-step .fs-right > .row2:first-child,
.flow-step .fs-right > .field-row:first-child,
.flow-step .fs-right > .card:first-child,
.flow-step .fs-right > .fs-body > .row2:first-child,
.flow-step .fs-right > .fs-body > .field-row:first-child,
.flow-step .fs-right > .fs-body > .card:first-child { margin-top:0; }
.act-grp-h { font-size:12px; font-weight:700; margin-bottom:6px; display:flex; align-items:center; gap:6px; }
.act-grp-h::before { content:''; width:8px; height:8px; border-radius:2px; display:inline-block; }
.act-grp.primary .act-grp-h { color:#15803d; }
.act-grp.primary .act-grp-h::before { background:#16a34a; }
.act-grp.transfer .act-grp-h { color:#b45309; }
.act-grp.transfer .act-grp-h::before { background:#d97706; }
.act-grp.other .act-grp-h { color:#475569; }
.act-grp.other .act-grp-h::before { background:#94a3b8; }
/* 本环节「多选一」路径：横向卡片 + 「或」分隔 + 场景小字，避免被误读成每项都要做一遍 */
.act-choices { margin-bottom:10px; background:#fff; border:1px solid #e2e8f0; border-radius:8px; padding:9px 11px; }
.act-choices-h { font-size:12px; font-weight:700; color:#15803d; display:flex; align-items:center; gap:6px; margin-bottom:6px; }
.act-choices-h::before { content:''; width:8px; height:8px; border-radius:2px; background:#16a34a; display:inline-block; }
.act-choices-tip { font-size:12px; color:#475569; background:#f8fafc; border:1px dashed #cbd5e1; border-radius:6px; padding:5px 9px; margin:0 0 9px; line-height:1.65; }
.act-choices-tip b { color:#b45309; }
.act-choices-row { display:flex; align-items:stretch; flex-wrap:wrap; }
.act-choice { display:flex; flex-direction:column; gap:5px; max-width:200px; padding:0 11px; border-right:1px dashed #e2e8f0; }
.act-choice:first-child { padding-left:0; }
.act-choice:last-child { border-right:0; padding-right:0; }
.act-choice .btn { width:100%; justify-content:center; }
.act-choice-sub { font-size:11px; color:#64748b; line-height:1.5; }
.act-or { display:flex; align-items:center; padding:0 3px; font-size:11px; font-weight:700; color:#94a3b8; }
.btn[data-tip] { border-bottom:none; cursor:help; }
.empty { color: #94a3b8; text-align: center; padding: 30px 0; }
.timeline { border-left: 2px solid #e2e8f0; padding-left: 16px; margin-left: 6px; }
.timeline .tl { position: relative; margin-bottom: 12px; }
.timeline .tl::before { content: ''; position: absolute; left: -22px; top: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--pri); }
.sub { color:#64748b; font-size:12px; margin-top:4px; }
.step-pill { display:inline-block; padding:2px 8px; border-radius:6px; background:#f1f5f9; margin:2px 4px 2px 0; font-size:12px; }
.step-pill.done { background:#dcfce7; color:#15803d; }
/* 仪表盘「状态流程」弹窗：完整链路横向铺开，当前节点高亮加粗，当前节点之后的置灰 */
.flow-chain { display:flex; flex-wrap:wrap; align-items:center; gap:2px; background:#f8fafc; border:1px solid #e2e8f0; border-radius:10px; padding:10px 12px; }
.flow-chain .step-pill { margin:3px 0; }
.flow-chain .step-pill.cur { background:var(--pri); color:#fff; font-weight:600; box-shadow:0 0 0 3px rgba(37,99,235,.18); }
.flow-arrow { color:#94a3b8; font-size:12px; margin:0 2px; }
/* 流程详情页步骤串联箭头 */
.step-arrow { display:inline-flex; align-items:center; justify-content:center; color:#94a3b8; font-size:15px; font-weight:600; margin:0 5px; vertical-align:middle; }
/* (M) 流程弹窗：每个步骤下方挂「操作人 · 时间」副标题；当前步骤显示「进行中」 */
.step-pill { display: inline-flex; flex-direction: column; align-items: center; padding: 4px 10px; line-height: 1.3; }
.step-by { font-size: 11px; color: #475569; margin-top: 2px; font-weight: normal; }
.step-by.cur { color: #fff; opacity: 0.9; }
.step-pill.done .step-by { color: #15803d; }
/* 仪表盘未闭环表格的筛选框 */
.inp { padding:6px 10px; border:1px solid #cbd5e1; border-radius:6px; font-size:13px; font-family:inherit; }
/* 仪表盘总览：生产中 / 待签收格里按单据号横向分块，每块一张单据 + 该单的产品编号 */
.dash-top { align-items: stretch; }
.dash-top .ov-card { margin: 0; padding: 12px 14px; }
.dash-top .ov-card h3 { margin-bottom: 8px; }
/* 仪表盘顶部四个统计框等宽等高（水平一行排列）：
 * 1) 删掉原有的 align-items:start（已被 stretch 替代）；
 * 2) 每个 .stat-box 内部用 flex 列向，让说明文字始终贴底，stat-list 自动撑满中间；
 * 3) 去掉 stat-list 的 max-height 上限，让它在列拉伸时正常跟随（多数据时仍可滚：min-height:0 + overflow-y:auto）。 */
.dash-top .stat-box { display: flex; flex-direction: column; }
.dash-top .stat-box > .stat-list { flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; }
.dash-top .stat-box > p.sub { margin-top: auto; padding-top: 6px; }
/* ===== 顶部四框：悬浮投影（2026-09-06 用户要求去掉顶部分色条，只留投影） ===== */
.dash-top .stat-box { border-radius: 14px; }
.dash-top .stat-box:hover { box-shadow: 0 6px 18px rgba(15,23,42,.09); }
.dash-top .stat-box.active { box-shadow: 0 6px 18px color-mix(in srgb, var(--pri) 15%, transparent); }
.ov-groups { display: flex; flex-wrap: wrap; gap: 6px; max-height: 168px; overflow: auto; }
.ov-no { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 4px 8px; font-size: 12px; font-weight: 600; }
.ov-no:hover { background: var(--pri-bg); border-color: var(--pri-light); }
.modal-mask { position: fixed; inset: 0; background: rgba(15,23,42,.45); display:flex; align-items:center; justify-content:center; z-index: 100; }
/* 下单类弹窗较长（表单 14 行），加高到 94vh 并压缩内边距与行距，让默认打开即可看全、无需滚动 */
.modal { background:#fff; border-radius:12px; padding:18px; width: 560px; max-width: 92vw; max-height: 94vh; overflow:auto; }
.modal h3 { margin-bottom: 10px; }
/* 下单类弹窗：左侧表单 + 右侧「下单参数」展示列，两栏等宽（原右栏仅 300px，参数名/值挤成竖行） */
.modal.wide { width: 1120px; }
.modal-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.modal-main { min-width: 0; }
.modal-side { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 12px 14px; font-size: 13px; }
.modal-side h4 { margin: 0 0 8px; font-size: 13px; color: #1e293b; }
.param-kv { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px dashed #e2e8f0; }
.param-kv:last-of-type { border-bottom: none; }
.param-kv b { color: #0f172a; font-weight: 600; }
.param-kv span { color: #475569; text-align: right; word-break: break-all; }
.radio-row { display: flex; flex-wrap: wrap; gap: 12px; padding: 4px 0; }
.radio-row label { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: #334155; cursor: pointer; }
.btnrow2 { display: flex; gap: 10px; margin-top: 6px; }
.btnrow2 .btn { flex: 1; }
/* 三按钮行（销售复核·再次下单：返回 / 修改订单并下单 / 按照生产反馈直接下单） */
.btnrow3 { display: flex; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.btnrow3 .btn { flex: 1; min-width: 132px; }
/* 弹窗必填项未填写时的高亮（2026-09-09 袁华明要求：必填未填须高亮提醒且不能提交） */
.req-miss { border: 2px solid #dc2626 !important; background: #fef2f2 !important; box-shadow: 0 0 0 3px rgba(220, 38, 38, .14) !important; }
.req-miss-label { color: #dc2626 !important; font-weight: 600; }
.req-miss-label .req { color: #dc2626 !important; }
/* 必填项悬停提示气泡（2026-09-09 袁华明要求：下单弹窗必填项鼠标悬停说明填写要求） */
[data-tip] { position: relative; cursor: help; border-bottom: 1px dashed #94a3b8; }
/* 提示气泡改为 JS 浮动渲染（见 app.js initFloatTip），避免被父级 overflow 裁切导致「看不全」（2026-09-12 袁华明反馈）。
   纯 CSS ::after/::before 提示已停用，避免与 JS 浮动气泡重复出现。 */
.js-tip-pop {
  position: fixed; z-index: 10000; max-width: 340px; padding: 8px 10px;
  background: #1e293b; color: #fff; font-size: 12px; font-weight: 400; line-height: 1.6;
  border-radius: 6px; box-shadow: 0 6px 18px rgba(0, 0, 0, .22); text-align: left;
  display: none; pointer-events: none; white-space: normal;
}
/* 未选加急时「加急原因」置灰不可输入 */
.field-row input:disabled, .field-row select:disabled, .field-row textarea:disabled { background: #f1f5f9; color: #94a3b8; cursor: not-allowed; }
/* 禁用按钮统一样式：原先 .btn 无 :disabled 规则，禁用态与可用态视觉完全相同，
   点了没反应易被误判为故障（如三步盖章弹窗的 ② ③、未满足前置的「维修后发货」） */
.btn:disabled, .btn[disabled] { opacity: .45; cursor: not-allowed; filter: grayscale(.35); }
.btn:disabled:hover, .btn[disabled]:hover { opacity: .45; }
.req { color: #dc2626; display: none; } /* 不再单独标注 ※：所有可见填写项均为必填（2026-09-09 袁华明要求） */
/* 导入本地参数文件后的「预览 / 转为参数并编辑 / 重新选择」操作区与内嵌预览 */
.sf-ops { margin-top: 10px; }
.sf-preview { margin-top: 10px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; padding: 10px; max-height: 320px; overflow: auto; font-size: 13px; line-height: 1.65; }
.sf-preview h4 { margin: 6px 0; font-size: 13px; color: #1e293b; }
.sf-preview table { border-collapse: collapse; width: 100%; font-size: 12px; }
.sf-preview th, .sf-preview td { border: 1px solid #e2e8f0; padding: 4px 6px; text-align: left; word-break: break-all; }
.sf-preview p { margin: 4px 0; }
.sf-frame { width: 100%; height: 400px; border: none; }
/* 右侧「下单参数」列的参数编辑行（参数名 / 参数值 / 删除） */
.spec-row { display: grid; grid-template-columns: 1fr 1fr 28px; gap: 6px; margin-bottom: 6px; }
.spec-row input { width: 100%; padding: 6px 8px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 13px; font-family: inherit; }
.spec-row .btn { padding: 4px 0; font-size: 13px; line-height: 1; }
/* 下单参数整段录入框：一个框搞定，等宽字体便于对齐「参数名:参数值」 */
.spec-ta { width: 100%; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 13px; line-height: 1.7; resize: vertical; box-sizing: border-box; font-family: Consolas, 'Courier New', monospace; }
.spec-ta:focus { outline: none; border-color: var(--pri); box-shadow: 0 0 0 3px rgba(var(--pri-rgb), .12); }
/* 未填项不在 .field-row 内时（如右侧参数列）用虚线框标出 */
.miss-box { outline: 2px dashed #dc2626; outline-offset: 3px; border-radius: 8px; }
/* 提交时未填写的必填项：整行标红并自动滚动定位到第一处 */
.field-row.miss > input, .field-row.miss > select, .field-row.miss > textarea,
.field-row.miss .radio-row { border-color: #dc2626; background: #fef2f2; }
.field-row.miss > label { color: #dc2626; }
.field-row.miss .radio-row { border: 1px dashed #dc2626; border-radius: 8px; padding: 4px 8px; }
/* row2 双列行的半列标红：只染未填的那一列，不殃及隔壁列 */
.miss-cell > input, .miss-cell > select, .miss-cell > textarea { border-color: #dc2626; background: #fef2f2; }
.miss-cell > label { color: #dc2626; }
.miss-cell { border-radius: 8px; }
/* 下单弹窗表单区行距收紧，为「打开即看全」腾高度 */
.modal-main .field-row { margin-bottom: 9px; }
.modal-main .field-row label { margin-bottom: 4px; }
.modal-main .field-row input, .modal-main .field-row select { padding: 8px 10px; }
.modal-main .field-row textarea { min-height: 54px; }
.modal-main .field-row p.sub { margin: 4px 0 0; }
.close-x { float:right; cursor:pointer; color:#94a3b8; font-size:20px; }
img.qr { border:1px solid #e2e8f0; border-radius:8px; }
/* 产品编号：右键可生成二维码 */
.inst-no { cursor: pointer; color: var(--pri); border-bottom: 1px dotted var(--pri-light); }
.inst-no:hover { color: var(--pri-deep); border-bottom-color: var(--pri); }
.ctx-menu { position: fixed; z-index: 200; background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; box-shadow: 0 6px 20px rgba(15,23,42,.18); min-width: 156px; overflow: hidden; }
.ctx-item { padding: 9px 14px; font-size: 13px; cursor: pointer; }
.ctx-item:hover { background: var(--pri-bg); }
.ctx-item.disabled { opacity: .5; cursor: not-allowed; }
.ctx-hint { padding: 8px 12px; font-size: 12px; line-height: 1.5; color: #b45309; background: #fffbeb; white-space: normal; max-width: 210px; border-top: 1px solid #fde68a; }
a.link { color:var(--pri); cursor:pointer; text-decoration: underline; }

/* 分组导航 + 待办角标 */
/* 图标与文字间距：在原有 8px 基础上再加「一个汉字」的宽度（2026-09-12 袁华明要求）
 * —— 1em = 当前字号（14px），即 8 + 14 = 22px；用 calc 写保证字号变化时间距自动跟随。 */
.nav-item { display: flex; align-items: center; justify-content: flex-start; gap: calc(8px + 1em); }
/* 导航项图标（2026-09-12 袁华明：左侧菜单最左边配简约图标）：
 * 线性 SVG、无填充，常态 #94a3b8；悬停 / 选中转 var(--pri-sky)（与左侧选中条同色），因此不用另配一套高亮样式。 */
.nav-ico { flex: 0 0 17px; width: 17px; height: 17px; display: inline-flex; align-items: center; justify-content: center; color: #94a3b8; transition: color .15s; }
.nav-ico svg { width: 17px; height: 17px; display: block; }
/* 导航文字不换行（2026-11-04 袁华明：如「生产接单确认」被折成两行）——
 * 放不下自动收缩省略号，绝不折行；超长标题用 title 提示完整名称。 */
.nav-txt { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-item:hover .nav-ico, .nav-item.active .nav-ico { color: var(--pri-sky); }
.nav-group { padding: 14px 20px 6px; font-size: 11px; letter-spacing: 1px; color: #64748b; text-transform: uppercase; }
.nav-badge { margin-left: auto; background: #dc2626; color: #fff; border-radius: 10px; padding: 0 6px; font-size: 11px; line-height: 17px; min-width: 18px; text-align: center; }

/* 顶层折叠分组（生产全链数字化管理）：点击标题折叠 / 展开其下的子分组 */
.nav-super-h { display: flex; align-items: center; gap: 8px; padding: 13px 20px 11px; cursor: pointer; color: #e2e8f0; font-size: 13px; font-weight: 700; border-left: 3px solid transparent; user-select: none; }
.nav-super-h:hover { background: #1e293b; }
.nav-super-h .nav-ico { color: var(--pri-sky); flex: 0 0 auto; }
.nav-super-txt { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-super-caret { color: #64748b; font-size: 11px; transition: transform .18s ease; margin-left: auto; flex: 0 0 auto; }
.nav-super-badge { margin-left: 8px; background: #dc2626; color: #fff; border-radius: 10px; padding: 0 6px; font-size: 11px; line-height: 17px; min-width: 18px; text-align: center; flex: 0 0 auto; }
.nav-super.collapsed .nav-super-caret { transform: rotate(-90deg); }
.nav-super-body .nav-item { padding-left: 34px; }
.nav-super.collapsed .nav-super-body { display: none; }
/* 报表中心管理下的子分组标题（生产单据统计 / 个人工作统计） */
.nav-subgroup { padding: 10px 20px 4px 34px; font-size: 11px; letter-spacing: .5px; color: #94a3b8; border-top: 1px solid #1e293b; margin-top: 4px; }
.nav-subgroup:first-child { border-top: none; margin-top: 0; }

/* 状态筛选 chip */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.chip { cursor: pointer; padding: 4px 11px; border-radius: 20px; font-size: 12px; background: #f1f5f9; color: #475569; border: 1px solid transparent; }
.chip:hover { background: #e2e8f0; }
.chip.active { background: var(--pri-light); color: var(--pri-deep); border-color: var(--pri-light); font-weight: 600; }

/* 下一步提示条 */
.next-step { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  background: #f8fafc; border-left: 4px solid #94a3b8; border-radius: 8px; padding: 10px 14px; margin: 4px 0 14px; }
.next-step .ns-label { font-size: 14px; color: #334155; }
.next-step .who { font-size: 12px; color: #64748b; white-space: nowrap; }
.next-step.mine { background: var(--pri-bg); border-left-color: var(--pri); }
.next-step.mine .who { color: var(--pri-deep); font-weight: 600; }

/* 待办中心条目 */
.pending-list { display: flex; flex-direction: column; gap: 8px; }
.pending-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px 14px; cursor: pointer; background: #fff; }
.pending-item:hover { border-color: var(--pri-light); background: var(--pri-bg); }
.pending-item .pi-main { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pending-item .pi-main b { font-size: 14px; }
.pending-item .pi-act { font-size: 12px; color: var(--pri); white-space: nowrap; }
/* 待办中心的加急条目：与列表卡片同一套红色视觉，保持全系统一致 */
.pending-item.urgent { border-left: 4px solid #dc2626; background: #fff7f7; }
.pending-item.urgent:hover { border-color: #dc2626; background: #fff1f1; }
/* 待办项上的当前责任人 + 改派入口 */
.pending-item .pi-owner { font-size: 12px; color: #475569; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.pending-item .pi-reassign { font-size: 12px; color: var(--pri); cursor: pointer; }
.pending-item .pi-reassign:hover { text-decoration: underline; }
/* 待办项上的派单来源标签：把"责任矩阵/改派/角色默认"变透明，消除双轨派单的困惑 */
.pending-item .pi-src { font-size: 11px; color: #64748b; background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 999px; padding: 1px 8px; white-space: nowrap; }

/* 演示：角色一键登录 */
.quick-login { margin-top: 14px; padding-top: 12px; border-top: 1px dashed #e2e8f0; }
.ql-t { display: block; font-size: 11px; color: #94a3b8; margin-bottom: 6px; }
.ql-btn { padding: 5px 10px; margin: 3px 5px 0 0; border: 1px solid #cbd5e1; background: #fff; border-radius: 6px; font-size: 12px; cursor: pointer; color: #475569; }
.ql-btn:hover { background: var(--pri-bg); border-color: var(--pri-light); color: var(--pri-deep); }

/* 空状态引导 */
.empty-state { text-align: center; color: #94a3b8; padding: 26px 0; }
.empty-state button { margin-left: 10px; }

/* 流程环节：环节说明 + 流转提示 */
.stage-head { border-left: 4px solid var(--pri); }
.stage-head h3 { font-size: 17px; }
.next-tip { margin-top: 8px; color: var(--pri-deep); font-size: 13px; background: var(--pri-bg); border-radius: 6px; padding: 6px 10px; display: inline-block; }
.next-tip b { color: var(--pri-deep); }

/* 流程进度条 */
.flow-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; margin: 8px 0; }
.flow-bar .fs { font-size: 11px; padding: 3px 8px; border-radius: 20px; background: #f1f5f9; color: #94a3b8; white-space: nowrap; }
.flow-bar .fs.done { background: #dcfce7; color: #15803d; }
.flow-bar .fs.cur { background: var(--pri); color: #fff; font-weight: 600; }
.flow-bar .fs-arw { color: #cbd5e1; font-size: 12px; }

/* 环节内的单据卡片 */
.stage-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.stage-card { border: 1px solid #e2e8f0; border-radius: 10px; padding: 12px 14px; cursor: pointer; background: #fff; }
.stage-card:hover { border-color: var(--pri-light); box-shadow: 0 2px 10px rgba(var(--pri-rgb), .08); }
/* 加急单据：左侧红色竖条 + 淡红底，与列表置顶配合，保证一眼可见 */
.stage-card.urgent { border-left: 4px solid #dc2626; background: #fff7f7; }
.stage-card.urgent:hover { border-color: #dc2626; box-shadow: 0 2px 10px rgba(220, 38, 38, .12); }
/* 详情页顶部的加急提示条 */
.urgent-banner { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; border-radius: 8px; padding: 8px 12px; margin: 8px 0; font-size: 13px; font-weight: 600; }
.stage-card .sc-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stage-card .sc-no { font-size: 14px; }
.stage-card .sc-cust { color: #475569; font-size: 13px; }
.stage-card .sc-meta { color: #64748b; font-size: 12px; margin: 4px 0 2px; }
.stage-card .sc-status { margin: 4px 0; }
.stage-card .sc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.stage-card .sc-next { font-size: 12px; color: var(--pri); }
/* 退回销售复核的订单：卡片左侧橙色竖条 + 待办提醒条，与加急区分（橙 vs 红） */
.stage-card.has-remind { border-left: 4px solid #ea580c; background: #fff8f1; }
.stage-card.has-remind:hover { border-color: #ea580c; box-shadow: 0 2px 10px rgba(234, 88, 12, .12); }
.stage-card .sc-remind { background: #ffedd5; color: #c2410c; border: 1px solid #fed7aa; border-radius: 8px; padding: 7px 12px; margin: 8px 0 4px; font-size: 12.5px; font-weight: 600; line-height: 1.5; }
/* 详情页：销售下单页打开「退回销售复核」单时的待办提醒横幅 */
.remind-banner { background: #fff7ed; color: #9a3412; border: 1px solid #fdba74; border-left: 4px solid #ea580c; border-radius: 8px; padding: 10px 14px; margin: 8px 0; font-size: 13px; line-height: 1.6; }
.remind-banner b { color: #c2410c; }

/* 下单入口卡片 */
.entry-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.entry-card { border: 1px dashed var(--pri-light); background: var(--pri-bg); border-radius: 10px; padding: 16px; cursor: pointer; text-align: center; }
.entry-card:hover { background: var(--pri-bg); border-color: var(--pri); }
.entry-card .ec-t { font-size: 15px; font-weight: 700; color: var(--pri-deep); }
.entry-card .ec-d { font-size: 12px; color: #64748b; margin-top: 6px; }

/* 详情面板头部 */
.dp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dp-head h3 { margin-bottom: 0; }
/* 订单详情标题行的「加急」标签：仅加急时显示，白底红字红框 */
.dp-urgent { display:inline-block; margin-left:8px; padding:1px 9px; font-size:13px; font-weight:700; color:#dc2626; background:#fff; border:1px solid #dc2626; border-radius:10px; vertical-align:middle; }
/* 订单详情标题行：非加急→整行蓝色高亮；加急→整行红色高亮（含右侧收起按钮）。
 * 高亮只作用于「单据详情」标题行，下方仪器名称行（.dp-info）保持中性灰底不做高亮。 */
.dp-head.non-urgent { background:var(--pri-bg); border:1px solid var(--pri-light); border-left:4px solid var(--pri); border-radius:6px; padding:6px 10px; }
.dp-head.non-urgent h3 { color:var(--pri-deep); }
.dp-head.non-urgent #dpClose { color:var(--pri-deep); border-color:var(--pri-light); background:#fff; }
.dp-head.urgent { background:#fef2f2; border:1px solid #fecaca; border-left:4px solid #dc2626; border-radius:6px; padding:6px 10px; }
.dp-head.urgent h3 { color:#b91c1c; }
.dp-head.urgent #dpClose { color:#b91c1c; border-color:#fecaca; background:#fff; }
/* 订单详情标题行的「单据状态」徽标：按业务流程导览 FG_* 环节名显示 */
  .dp-status { display:inline-block; margin-left:8px; padding:1px 9px; font-size:13px; font-weight:600; color:var(--pri-deep); background:var(--pri-light); border-radius:10px; vertical-align:middle; }
/* 单据详情标题行：原因徽章（加急红 / 试用·备货蓝） */
.dp-reason-badge { display:inline-block; margin-left:12px; font-size:13px; font-weight:500; color:var(--pri-deep); white-space:nowrap; }
  .dp-reason-badge.urgent { color:#dc2626; }
  /* 标准下单参数弹框：下单参数/配置清单 导入条 + 产线选择 */
  .sp-imp-hint { font-size:12px; color:#94a3b8; font-weight:400; margin-left:6px; }
  .sp-imp-bar { display:flex; gap:8px; align-items:center; margin-bottom:6px; flex-wrap:wrap; }
  .sp-imp-bar select { flex:1 1 220px; min-width:180px; padding:8px 10px; border:1px solid #cbd5e1; border-radius:8px; font-size:14px; font-family:inherit; background:#fff; }
  .imp-std-list { max-height:320px; overflow:auto; display:flex; flex-direction:column; gap:6px; }
  .imp-std-item { padding:8px 10px; border:1px solid #e2e8f0; border-radius:8px; cursor:pointer; font-size:13px; }
  .imp-std-item:hover { background:#f1f5f9; border-color:#cbd5e1; }
  .imp-std-item .muted { color:#94a3b8; font-weight:400; margin-left:4px; }
/* 订单详情标题下一行：客户名称 + 是否溯源 */
.dp-subline { display:flex; flex-wrap:wrap; gap:18px; padding:6px 14px 10px; font-size:13px; color:#334155; }
.dp-subline b { color:#64748b; font-weight:600; margin-right:6px; }

/* 权限提示 */
.perm-note { background: #fff7ed; border-left: 4px solid #ea580c; border-radius: 8px; padding: 12px 14px; color: #7c2d12; font-size: 13px; line-height: 1.7; }
.perm-h { margin: 16px 0 8px; font-size: 14px; }
.perm-h.ok { color: #15803d; }
.perm-h.no { color: #b91c1c; }

/* 分项进度明细（详情页逐环节展示负责人/说明/问题） */
.step-list { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.step-item { border: 1px solid #e2e8f0; border-radius: 8px; padding: 10px 12px; background: #fff; }
.step-item.done { border-color: #86efac; background: #f0fdf4; }
.step-item .si-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.step-item .si-owner { font-size: 12px; color: #475569; }
.step-item .si-row { font-size: 12px; color: #475569; margin-top: 4px; }
.step-item .si-row.si-issue { color: #b45309; }
.step-item .si-img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; border: 1px solid #cbd5e1; margin-right: 6px; }

/* 消息跳转提示 */
.bell-item .bb.goto { color: var(--pri); font-size: 11px; margin-top: 4px; }

/* ============ 移动端响应式（仅 ≤820px 生效，桌面端零影响） ============ */
/* 桌面端：汉堡按钮与遮罩默认隐藏，不占用任何布局 */
#menuToggle { display: none; }
.nav-mask { display: none; }

@media (max-width: 0px) { /* mobile-block-off */
  /* 汉堡按钮：窄屏显示 */
  #menuToggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; margin-right: 8px; flex: 0 0 auto;
    font-size: 22px; line-height: 1; border: none; background: transparent;
    color: #0f172a; cursor: pointer;
  }
  .topbar { padding: 0 12px; }
  .content { padding: 14px; }
  /* 窄屏：励志语句收窄，避免与标题/铃铛抢位 */
  .topbar-quote { max-width: 34vw; font-size: 12px; }

  /* 侧栏 → 抽屉（固定定位、默认移出屏幕，.nav-open 时滑入） */
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: 240px; z-index: 90;
    transform: translateX(-100%); transition: transform .22s ease;
    box-shadow: 2px 0 18px rgba(0,0,0,.2);
  }
  #appPage.nav-open .sidebar { transform: translateX(0); }

  /* 抽屉内的导航列表超出视口时可滚动（窄屏项多时最后几项不能被截断） */
  .sidebar nav { overflow-y: auto; min-height: 0; -webkit-overflow-scrolling: touch; }

  /* 抽屉遮罩 */
  #appPage.nav-open .nav-mask {
    display: block; position: fixed; inset: 0;
    background: rgba(15,23,42,.45); z-index: 80;
  }

  /* 主区占满屏宽 */
  .main { width: 100%; }

  /* 多列栅格堆叠为单列（.row3-cust 为定制列宽，不在此堆叠；2026-09-11 补 .row3，供维修工时三列在窄屏折行） */
  .grid.cols4, .grid.cols3, .grid.cols2,
  .dash-top, .row2, .row3:not(.row3-cust), .modal-cols, .stage-list, .entry-grid {
    grid-template-columns: 1fr;
  }

  /* 表格横向滚动（窄屏不再挤压变形） */
  table { display: block; width: 100%; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
  .sf-preview table { display: table; width: 100%; }

  /* 触控目标放大 + 输入框 16px 防 iOS 聚焦缩放 */
  .nav-item { min-height: 46px; }
  .btn, .btn.tiny, .chip, .ql-btn { min-height: 40px; line-height: 1.2; }
  .field input, .field-row input:not([type="checkbox"]):not([type="radio"]), .field-row select, .field-row textarea,
  .fld .ipt, .fld input, .inp, .spec-ta { font-size: 16px; padding: 11px 12px; }

  /* 弹窗全宽 */
  .modal, .modal.wide { width: 100%; max-width: 100%; }
  .bell-panel { width: 86vw; right: 6px; }

  /* 业务流程导览：窄屏堆叠 + 连接箭头转向下 */
  .fg-track { flex-direction: column; align-items: stretch; overflow-x: visible; padding: 4px 0 6px; }
  .fg-step { width: 100%; min-width: 0; }
  .fg-step .fg-desc { min-height: 0; }
  .fg-arw { transform: rotate(90deg); padding: 0; align-self: center; }
  .fg-branch-grid { grid-template-columns: 1fr; }
}

/* ============================================================
 * 业务流程导览（flowguide）专用样式 —— 仅作用于新页面，桌面端零影响
 * ============================================================ */
.flowguide-hero { background: linear-gradient(135deg, var(--pri-deep), var(--pri-sky)); border: none; color: #fff; }
.flowguide-hero h2 { color: #fff; font-size: 22px; margin-bottom: 8px; }
.flowguide-hero p { color: var(--pri-bg); font-size: 13px; line-height: 1.7; }
.flowguide-hero b { color: #fff; }

.fg-track { display: flex; align-items: stretch; gap: 0; overflow-x: auto; padding: 6px 2px 16px; }
.fg-step { position: relative; flex: 1 1 0; min-width: 168px; background: #fff; border: 1px solid #e2e8f0; border-top: 4px solid var(--ph, var(--pri)); border-radius: 10px; padding: 14px 14px 12px; transition: box-shadow .15s, transform .15s; }
.fg-step[data-go] { cursor: pointer; }
.fg-step[data-go]:hover { box-shadow: 0 6px 20px rgba(var(--pri-rgb), .16); transform: translateY(-3px); border-top-color: var(--ph, var(--pri)); }
/* 2026-09-05：流程步骤去掉序号圆点（.fg-dot 已随编号一并移除，此处仅保留历史说明） */
.fg-bd { display: flex; flex-direction: column; }
.fg-name { font-size: 14px; font-weight: 600; color: #0f172a; }
.fg-desc { font-size: 12px; color: #64748b; line-height: 1.55; margin: 6px 0 11px; min-height: 56px; }
.fg-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fg-count { font-size: 12px; color: #475569; }
.fg-count b { color: var(--ph, var(--pri)); font-size: 15px; }
.fg-arw { color: #94a3b8; font-size: 22px; font-weight: 700; padding: 0 3px; align-self: center; flex: 0 0 auto; }
.fg-track-trial .fg-step { border-top-color: var(--ph, #7c3aed); }

/* 环节阶段配色 */
.fg-ph-order { --ph: var(--pri); }
.fg-ph-confirm { --ph: #4f46e5; }
.fg-ph-prep { --ph: #0d9488; }
.fg-ph-produce { --ph: #16a34a; }
.fg-ph-test { --ph: #d97706; }
.fg-ph-ship { --ph: #ea580c; }
.fg-ph-dest { --ph: #0891b2; }
.fg-ph-sign { --ph: #15803d; }
.fg-ph-trial { --ph: #7c3aed; }
.fg-ph-close { --ph: #059669; }
.fg-ph-err { --ph: #dc2626; }
.fg-ph-as { --ph: #db2777; }
.fg-ph-store { --ph: #15803d; }

/* 生产过程管理节点内的「生产异常并入」说明小条 */
.fg-note { font-size: 11.5px; color: #b45309; line-height: 1.5; margin: 7px 0 2px; background: #fffbeb; border: 1px solid #fde68a; border-radius: 7px; padding: 6px 9px; }

/* 备货 / 售后两条并行流程的步骤条底色（与主链路蓝、试用紫区分） */
.fg-track-stock { background: linear-gradient(180deg, #f0fdf4, #ffffff); border-radius: 10px; }
.fg-track-as { background: linear-gradient(180deg, #fdf2f8, #ffffff); border-radius: 10px; }

/* 并行 / 分叉支线卡 */
.fg-branch { border-left: 4px solid var(--ph, #ea580c); cursor: default; }
.fg-branch[data-go] { cursor: pointer; }
.fg-branch[data-go]:hover { box-shadow: 0 4px 16px rgba(0, 0, 0, .1); }
.fg-branch h4 { font-size: 15px; color: #0f172a; margin-bottom: 6px; }
.fg-bdesc { font-size: 12px; color: #475569; line-height: 1.55; }
.fg-rel { font-size: 12px; color: #64748b; line-height: 1.55; margin-top: 9px; background: #f8fafc; border: 1px solid #eef2f7; border-radius: 8px; padding: 9px 11px; }
.fg-branch .fg-meta { margin-top: 10px; }

/* 角色图例 */
.fg-legend { display: flex; gap: 10px; flex-wrap: wrap; }
.fg-legend .lg { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: #475569; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 20px; padding: 6px 13px; }
.fg-legend .lg i { width: 10px; height: 10px; border-radius: 50%; background: var(--ph, #94a3b8); display: inline-block; }

/* ===== 生产线配置页（原责任矩阵）：部门一级目录 + 多人选择器 ===== */
.sc-tab { padding: 6px 16px; border: 1px solid var(--bd, #d0d7de); border-radius: 6px; cursor: pointer; user-select: none; font-size: 13px; }
.sc-tab.on { background: #1a73e8; color: #fff; border-color: #1a73e8; }
.mp { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.mp-chip { display: inline-flex; align-items: center; gap: 4px; background: #eef3fb; border: 1px solid #c9d7ee; border-radius: 12px; padding: 1px 8px; font-size: 12px; white-space: nowrap; }
.mp-chip .mp-x { cursor: pointer; font-weight: 700; margin-left: 2px; }
.mp-add { max-width: 140px; font-size: 12px; }

/* ===== 生产线配置（小组→产品→产线→工序）折叠层级 ===== */
.sc-group, .sc-prd { border: 1px solid #e2e8f0; border-radius: 8px; margin: 8px 0; background: #fff; }
.sc-group > summary, .sc-prd > summary { cursor: pointer; padding: 10px 12px; font-size: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; list-style: none; user-select: none; }
.sc-group > summary::-webkit-details-marker, .sc-prd > summary::-webkit-details-marker { display: none; }
.sc-group > summary::before, .sc-prd > summary::before { content: '▸'; color: #94a3b8; transition: transform .15s; }
.sc-group[open] > summary::before, .sc-prd[open] > summary::before { transform: rotate(90deg); }
.sc-tag { flex: 0 0 auto; font-size: 11px; color: #1a73e8; background: #e8f0fe; border: 1px solid #c6dafc; border-radius: 4px; padding: 1px 6px; }
.sc-prd { margin: 6px 0 6px 12px; background: #f8fafc; }
.sc-line { border: 1px dashed #cbd5e1; border-radius: 8px; padding: 10px 12px; margin: 8px 12px; background: #fff; }
.sc-line-hd { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.sc-steps-tbl td { vertical-align: top; }

/* ===== 生产线配置页移动端触控优化（≤820px） ===== */
@media (max-width: 0px) { /* mobile-block-off */
  .sc-tab { min-height: 40px; display: inline-flex; align-items: center; font-size: 14px; }
  .mp-add { font-size: 16px; max-width: 150px; }   /* 16px 防 iOS 聚焦自动放大 */
  .sc-group > summary, .sc-prd > summary { padding: 12px 10px; }
  .sc-line-hd .ipt { font-size: 16px; }
}

/* ===== 销售复核弹窗：原值 vs 改后值对照 ===== */
.diff-block { border:1px solid #e4e7ec; border-radius:8px; overflow:hidden; margin:10px 0; }
.diff-row { display:flex; align-items:stretch; border-bottom:1px solid #f0f1f3; }
.diff-row:last-child { border-bottom:0; }
.diff-label { flex:0 0 110px; background:#f7f8fa; padding:10px 12px; font-weight:600; color:#374151; border-right:1px solid #e4e7ec; display:flex; align-items:center; box-sizing:border-box; }
.diff-old, .diff-new { flex:1; padding:10px 12px; font-size:13px; line-height:1.5; word-break:break-word; min-width:0; }
.diff-old { color:#6b7280; background:#fafafa; }
.diff-new { color:#111827; }
.diff-arrow { flex:0 0 28px; display:flex; align-items:center; justify-content:center; color:#9ca3af; font-weight:700; }
.diff-changed { border:2px solid #ef4444; background:#fff5f5; color:#b91c1c; font-weight:700; border-radius:4px; }
.diff-tag { display:inline-block; padding:0 6px; border:1px solid #ef4444; color:#ef4444; border-radius:4px; font-size:12px; }
.diff-note { padding:10px 12px; background:#fffbeb; border:1px solid #fde68a; border-radius:6px; color:#92400e; font-size:13px; line-height:1.6; white-space:pre-wrap; }

/* 变更痕迹：产销往复修改留痕，红框区分改动项 */
.changelog { display:flex; flex-direction:column; gap:6px; }
.cl-row { display:flex; align-items:center; flex-wrap:wrap; gap:6px; padding:7px 10px; border:1px solid #fde68a; background:#fffdf5; border-radius:6px; font-size:13px; line-height:1.5; }
.cl-side { flex:0 0 auto; padding:1px 8px; border-radius:10px; font-size:12px; font-weight:700; color:#fff; }
.cl-sales { background:var(--pri); }
.cl-production { background:#c2410c; }
.cl-field { flex:0 0 auto; font-weight:700; color:#374151; }
.cl-old { color:#6b7280; background:#f3f4f6; padding:1px 6px; border-radius:4px; word-break:break-word; max-width:38%; }
.cl-arrow { color:#9ca3af; font-weight:700; }
.cl-new { color:#b91c1c; background:#fff5f5; border:1px solid #fca5a5; padding:1px 6px; border-radius:4px; font-weight:700; word-break:break-word; max-width:38%; }
.cl-meta { flex:1 1 100%; color:#9ca3af; font-size:12px; margin-top:-2px; }

/* 报表中心增强：月度/年度趋势 · 多维比较 · 历史检索 */
.rp-controls { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin:6px 0 12px; }
.rp-legend { display:flex; gap:16px; flex-wrap:wrap; margin-bottom:8px; font-size:12px; color:#475569; }
.rp-leg { display:inline-flex; align-items:center; gap:6px; }
.rp-leg i { width:12px; height:12px; border-radius:3px; display:inline-block; }
.rp-chart { display:flex; gap:10px; align-items:flex-end; overflow-x:auto; padding:6px 2px 2px; border-bottom:1px solid #e2e8f0; }
.rp-col { display:flex; flex-direction:column; align-items:center; min-width:44px; }
.rp-bars { width:30px; height:150px; display:flex; flex-direction:column-reverse; background:#f8fafc; border-radius:4px 4px 0 0; }
.rp-seg { width:100%; }
.rp-x { font-size:11px; color:#64748b; margin-top:5px; white-space:nowrap; }
.rp-tbl { margin-top:12px; }
.rp-hchart { display:flex; flex-direction:column; gap:7px; margin-bottom:12px; }
.rp-hrow { display:grid; grid-template-columns:170px 1fr 46px; align-items:center; gap:10px; }
.rp-hk { font-size:12px; color:#334155; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rp-hbar { height:18px; background:#f1f5f9; border-radius:4px; overflow:hidden; display:flex; }
.rp-hseg { height:100%; display:inline-block; }
.rp-hn { font-size:12px; color:#0f172a; text-align:right; font-weight:600; }
.rp-srow { cursor:pointer; }
.rp-srow:hover { background:#f1f5f9; }
.rp-srow.closed { color:#94a3b8; }
.inp { padding:6px 10px; border:1px solid #cbd5e1; border-radius:6px; font-size:13px; }
/* 标准下单参数库表格：长文本字段单行省略（title 显示全文） */
.sp-cell { max-width:190px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; vertical-align:top; }
/* 下单参数面板：多行字段（下单参数/配置清单/生产流程）保留换行 */
.param-kv span.pre { white-space:pre-wrap; line-height:1.55; display:inline-block; max-width:340px; }

/* 列表「序号」列：加急标紧贴序号前，普通单仅序号 */
#openTbl.tbl td.seq-cell{white-space:nowrap;vertical-align:middle;position:relative;padding-left:46px;text-align:left}
/* 「加急」绝对定位到序号格最左侧：定宽 46px 与数字起点（padding-left）严丝合缝，与序号零间距；
 * 数字左对齐固定从 46px 起排，加急与否都不影响序号纵向对齐 */
#openTbl.tbl td.seq-cell .urg-flag{position:absolute;left:0;top:50%;transform:translateY(-50%);width:46px;box-sizing:border-box;padding:2px 0;text-align:center;margin-right:0}
/* 列表「单据」列：类型标签固定 3 汉字宽度，编号从同一水平位置起排，避免前缀字数不一挤压 */
#openTbl.tbl td .kind-cell{display:inline-block;width:auto;text-align:left;vertical-align:middle;margin-right:0}
#openTbl.tbl td .no-cell{vertical-align:middle}

/* 桌面端（≥769px）：侧栏可向左收起，主内容区随之占满整行 */
#sidebarToggle { display: none; }
@media (min-width: 769px) {
  #sidebarToggle { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; margin-right: 8px; border: 1px solid #e2e8f0; background: #fff; border-radius: 8px; cursor: pointer; font-size: 18px; line-height: 1; color: #475569; }
  #sidebarToggle:hover { background: #f1f5f9; }
  /* 收起态：侧栏移出文档流并左移出屏，.main(flex:1) 自动占满整行 */
  .app-page.sidebar-collapsed .sidebar { position: absolute; top: 0; bottom: 0; left: 0; transform: translateX(-100%); z-index: 40; box-shadow: 2px 0 12px rgba(0,0,0,.18); }
}

/* 详情页「修改 / 删除」操作条：仅生产确认接单前出现 */
.dp-editbar { display:flex; align-items:center; gap:8px; margin:10px 0 0 2px; padding:8px 10px; background:#f8fafc; border:1px solid #e2e8f0; border-radius:8px; }
.dp-editbar .sub { font-size:12px; }

/* ---------------- 详情页「下单信息」分组排版（2026-09-08） ----------------
 * 分组标题 + 两列网格：短字段并排、长文本（地址/需求/技术指标）整行展开不挤压；
 * 移动端退化为单列。配合 .dp-full（跨两列）与 .dp-val（多行文本换行）使用。 */
.dp-info-t { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: #64748b; letter-spacing: .5px; margin: 12px 0 6px; }
.dp-info-t::after { content: ''; flex: 1; height: 1px; background: #e2e8f0; }
.dp-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 24px; align-items: start; }
.dp-info-grid .field-row { margin: 3px 0; }
.dp-info-grid .dp-full { grid-column: 1 / -1; }
.dp-val { white-space: pre-wrap; word-break: break-word; min-width: 0; }

/* —— 分组排版 V2（.dp-groups，2026-09-08 袁华明反馈「还是非常乱」后重构）——
 * 根因：.dp-info 基类是横向 flex 流（服务详情头部的 kv 行），分组标题与网格被当成 flex item
 * 挤进同一行流里，标题穿插在字段之间。V2：分组容器改块级流——
 * 分组标题独占整行；字段网格两列；短字段「label：值」同行基线对齐（参数表式阅读）；
 * 长文本（dp-full/dp-val）label 独立一行、值整行展开。 */
.dp-info.dp-groups { display: block; padding: 12px 16px; }
.dp-groups .dp-info-t { margin: 16px 0 8px; }
.dp-groups .dp-info-t:first-child { margin-top: 2px; }
.dp-groups .dp-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 40px; align-items: start; }
.dp-groups .dp-info-grid .field-row { margin: 0; }
.dp-groups .dp-info-grid .field-row:not(.dp-full) { display: flex; align-items: baseline; flex-wrap: wrap; gap: 1px 8px; }
.dp-groups .field-row label { display: inline; margin: 0; color: #64748b; font-size: 13px; flex: none; }
.dp-groups .field-row:not(.dp-full) label::after { content: '：'; }
.dp-groups .dp-full { grid-column: 1 / -1; }
.dp-groups .dp-full label { display: block; margin-bottom: 3px; }
.dp-groups .dp-val { display: block; color: #0f172a; }
@media (max-width: 0px) { /* mobile-block-off */ .dp-groups .dp-info-grid { grid-template-columns: 1fr; } }
@media (max-width: 0px) { /* mobile-block-off */ .dp-info-grid { grid-template-columns: 1fr; } }

/* ================= 逐台填报组件（2026-09-09 袁华明需求） =================
 * 台号胶囊切换 / 套用到其余台 / 批量二维码 / 出厂测试逐台判定
 * 设计要点：胶囊一眼看到每台完成度；50 台时靠搜索框秒定位，不做下拉（避免丢失进度概览）。 */
.unit-tabs-wrap { margin: 4px 0 10px; }
.unit-search {
  width: 100%; box-sizing: border-box; margin-bottom: 6px; padding: 7px 10px;
  border: 1px solid #cbd5e1; border-radius: 8px; font-size: 13px; color: #0f172a; background: #fff;
}
.unit-search:focus { outline: none; border-color: var(--pri); box-shadow: 0 0 0 3px rgba(var(--pri-rgb), .12); }
.unit-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.unit-chip {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px 5px 10px; border: 1px solid #cbd5e1; border-radius: 999px;
  background: #fff; color: #334155; font-size: 12.5px; line-height: 1.4; cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
  max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.unit-chip i { font-style: normal; font-size: 11px; color: #64748b; background: #f1f5f9; border-radius: 999px; padding: 0 6px; }
.unit-chip:hover { border-color: #94a3b8; background: #f8fafc; }
.unit-chip.all-done { border-color: #86efac; background: #f0fdf4; color: #166534; }
.unit-chip.all-done i { background: #dcfce7; color: #15803d; }
.unit-chip.on { border-color: var(--pri); background: var(--pri); color: #fff; box-shadow: 0 1px 4px rgba(var(--pri-rgb), .25); }
.unit-chip.on i { background: rgba(255, 255, 255, .22); color: #fff; }
.unit-chip.on.all-done { border-color: #16a34a; background: #16a34a; }

.unit-tools {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-top: 10px; padding: 9px 12px; background: #f8fafc;
  border: 1px dashed #cbd5e1; border-radius: 8px;
}
.unit-tools .sub { flex: 1 1 240px; min-width: 180px; }
.unit-src-tag {
  display: inline-block; padding: 2px 10px; border-radius: 6px;
  background: var(--pri-bg); border: 1px solid var(--pri-light); color: var(--pri-deep); font-weight: 600; font-size: 13px;
}
.cp-targets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 18px; max-height: 240px; overflow: auto; border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 12px; background: #fff; }
.cp-targets label { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; line-height: 22px; white-space: nowrap; overflow: hidden; }
.cp-targets label input[type="checkbox"] { width: 14px; height: 14px; min-width: 14px; padding: 0; margin: 0; flex: none; accent-color: var(--pri); cursor: pointer; }
.cp-targets .cp-all { grid-column: 1 / -1; border-bottom: 1px dashed #e2e8f0; padding-bottom: 6px; margin-bottom: 4px; }

.qr-gen-mask { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); display: flex; align-items: center; justify-content: center; z-index: 9999; }
.qr-gen-box {
  background: #fff; border-radius: 10px; padding: 20px 32px; text-align: center;
  font-size: 14px; color: #334155; box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
}
.qr-gen-box b { display: inline-block; margin-top: 6px; font-size: 18px; color: var(--pri); }

/* 出厂测试逐台判定 */
.ft-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 10px; }
.ft-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ft-table th, .ft-table td { border: 1px solid #e2e8f0; padding: 6px 8px; text-align: left; vertical-align: middle; }
.ft-table th { background: #f8fafc; color: #475569; font-weight: 600; }
.ft-table td select, .ft-table td input { width: 100%; box-sizing: border-box; padding: 6px 8px; border: 1px solid #cbd5e1; border-radius: 6px; }
.ft-table td select:focus, .ft-table td input:focus { outline: none; border-color: var(--pri); box-shadow: 0 0 0 3px rgba(var(--pri-rgb), .12); }
.ft-table select[value="fail"], .ft-table select.fail { color: #b91c1c; font-weight: 600; }
.ft-result-list { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.ft-r {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 5px 10px; border-radius: 6px; background: #fff; font-size: 13px;
}
.ft-r.ok { border-left: 3px solid #16a34a; }
.ft-r.ng { border-left: 3px solid #dc2626; }
.ft-r b { font-weight: 600; }
/* 表格长文本换行兜底（2026-09-13）：单个超长单元格（如报表中心「所处流程」）会把表格
 * 撑到 11920px，导致整页横向滚动上万像素。限制单元格换行后列宽回归正常。 */
.tbl td, .tbl th { overflow-wrap: anywhere; word-break: break-word; }

@media (max-width: 0px) { /* mobile-block-off */
  .unit-chip { max-width: 150px; font-size: 12px; }
  .unit-tools { flex-direction: column; align-items: stretch; }
}

/* ============================================================
 * 移动端适配（第二轮，2026-09-13）——触控目标 / 弹窗 / 顶栏
 * 全部包在 ≤820px 媒体查询内，桌面端渲染零影响。
 * 目标：手机上「点得准、看得全、不误触」，与桌面端共用一套 DOM 与逻辑。
 * ============================================================ */
@media (max-width: 0px) { /* mobile-block-off */
  /* —— 1. 触控目标：所有可点元素不小于 38~40px（苹果 HIG / Material 建议 44px，
   *     考虑系统内按钮密集，取 38px 保底、输入框 40px） —— */
  .seg-btn, .seg, .seg-btn.on {
    min-height: 38px; padding: 8px 11px; font-size: 13.5px; line-height: 1.2;
    display: inline-flex; align-items: center; justify-content: center;
  }
  /* 范围切换（我的待办/我发起的/全部单据）三项在 375px 下必然超宽 → 允许换行，
   * 否则 flex-nowrap 会把 layout viewport 撑到 400+，整页出现横向滚动 */
  /* 注意：.list-head-row .scope-seg 在桌面端是 flex:0 0 auto（不收缩），窄屏必须放开，
   * 否则「我的待办/我发起的/全部单据」按 max-content 撑到 390+，整页横向滚动 */
  .seg, .scope-seg, .list-head-row .scope-seg {
    flex-wrap: wrap; row-gap: 6px; max-width: 100%; flex: 1 1 100%; min-width: 0;
  }
  /* 下拉框：默认 19~21px 高，手指点不准；统一 40px + 16px 字号（同时防 iOS 聚焦缩放） */
  select, select.inp, .sc-step-sel, .mp-add, #rpYear, #rpDim, .ft-table td select {
    min-height: 40px; font-size: 16px; padding: 8px 10px; box-sizing: border-box;
  }
  /* 复选框 / 单选：13~14px 太小，放大到 20px 并给足点击行高 */
  input[type="checkbox"], input[type="radio"] { width: 22px; height: 22px; min-width: 22px; }
  .cp-targets label input[type="checkbox"] { width: 22px; height: 22px; min-width: 22px; }
  .cp-targets label { line-height: 32px; font-size: 14px; }
  .mp-chip { padding: 3px 10px; font-size: 13px; }
  .mp-chip .mp-x { font-size: 16px; padding: 0 2px; }

  /* —— 2. 弹窗：改为底部抽屉（贴近手机操作习惯），底部操作栏吸底 —— */
  .modal-mask { align-items: flex-end; padding: 0; }
  .modal, .modal.wide {
    width: 100%; max-width: 100%; max-height: 92vh;
    border-radius: 16px 16px 0 0; padding: 16px 14px calc(14px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -8px 28px rgba(15, 23, 42, .22);
  }
  .modal h3 { font-size: 17px; padding-right: 30px; }
  /* 长表单滚到底才看得到按钮 → 操作栏吸底常驻 */
  .modal-btns {
    position: sticky; bottom: calc(-1 * (14px + env(safe-area-inset-bottom, 0px)));
    background: #fff; margin: 12px -14px 0; padding: 10px 14px calc(12px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #eef2f7; justify-content: stretch; gap: 8px;
  }
  .modal-btns .btn { flex: 1 1 0; min-width: 0; }
  /* 二维码生成提示框同样贴底 */
  .qr-gen-mask { align-items: flex-end; }
  .qr-gen-box { width: 100%; border-radius: 14px 14px 0 0; padding: 18px 20px calc(20px + env(safe-area-inset-bottom, 0px)); }

  /* —— 3. 顶栏：标题过长省略，铃铛面板不越界 —— */
  .topbar .pt { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  #bellCount { font-size: 11px; }

  /* —— 4. 表格：横向滚动时给右侧渐隐提示，避免「内容被截断却看不出来」 —— */
  .tbl-wrap { position: relative; }
  .tbl-wrap::after {
    content: '‹ 左右滑动查看 ›'; position: sticky; left: 0; display: block;
    font-size: 11px; color: #94a3b8; text-align: center; padding: 4px 0 2px;
  }
  /* 长文本单元格在窄屏换行，减少横向滚动距离 */
  .tbl td, .tbl th { white-space: normal; word-break: break-word; }

  /* —— 5. 登录页 —— */
  .login-card { width: 92vw; max-width: 92vw; padding: 24px 18px; box-sizing: border-box; }
  .login-card h1 { font-size: 21px; }
  /* 手机端「登录」按钮加大到 48px：手机上大拇指点击，40px 偏小易点空（2026-09-13 袁华明「手机端登录」） */
  #loginBtn { min-height: 48px; font-size: 17px; }
  /* 账号提示/演示区在手机上字号略放大，方便车间师傅看清 */
  .login-card .hint { font-size: 12.5px; }
}

/* 手机窄屏（≤480px）：.row3-cust（客户名称/联系人/联系电话 三列，minmax(220px…) 定制列宽）
 * 在 375px 下必然溢出（452px > 可用 347px）→ 强制堆叠单列。平板（481~820px）保留三列。 */
/* —— 产品铭牌配置编辑器（2026-09-14 扩展：模板 / 内容行 / 排版）—— */
.np-tpl-list { border: 1px solid #e2e8f0; border-radius: 8px; padding: 10px 12px; margin: 10px 0; background: #f8fafc; }
.np-tpl-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.np-tpl-head b { font-size: 13px; }
.np-tpl-list #npAddTpl { margin-left: auto; }
.np-tpl-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid #e2e8f0; border-radius: 6px; margin-bottom: 6px; cursor: pointer; background: #fff; }
.np-tpl-item.on { border-color: var(--pri-sky); background: #f0f9ff; }
.np-tpl-item .np-tpl-name { font-weight: 600; flex: 1; }
.np-tpl-item .tag { font-size: 11px; color: var(--pri); background: var(--pri-bg); border-radius: 4px; padding: 1px 6px; }
.np-edit { margin-top: 8px; }
.np-rows-head { display: flex; align-items: center; gap: 10px; margin: 10px 0 6px; }
.np-rows-head b { font-size: 13px; }
.np-rows-head #npAddRow { margin-left: auto; }
.np-row { border: 1px solid #e2e8f0; border-radius: 6px; padding: 8px 10px; margin-bottom: 8px; background: #fff; }
.np-row-1 { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.np-row-1 .np-src { min-width: 110px; }
.np-row-1 input { flex: 1; min-width: 120px; }
.np-row-2 { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.np-row-2 .sub { font-size: 12px; }
.np-row-2 input[type=number] { width: 56px; }

/* ---------------- 来源单据详情页内嵌「生产异常记录」区块（2026-09-17 袁华明要求） ----------------
 * 位置：原单据详情主体（流程链 / 变更痕迹 / 维修记录）下方、流转记录上方。
 * 每条异常＝关键项一行（编号 · 严重程度 · 状态 · 发生环节 · 登记人时间）+ 可折叠的异常流程链。 */
/* 内嵌「生产异常记录」块：与单据主体（白色卡片）明显区分 —— 橙色描边 + 浅橙底 + 阴影，并带标题栏 */
.card.ex-embed {
  border: 2px solid #f59e0b;
  border-left: 6px solid #f59e0b;
  background: #fffaf0;
  box-shadow: 0 2px 10px rgba(245, 158, 11, .14);
  border-radius: 8px;
}
.card.ex-embed > h3 {
  color: #b45309;
  border-bottom: 1px solid #fde68a;
  padding-bottom: 8px;
  margin-bottom: 4px;
}
/* 从异常清单点「来源单据」跳转到原单时，定位并高亮内嵌的「生产异常记录」块 */
.card.ex-embed.hl-flash { outline: 3px solid #ff9800; outline-offset: 3px; box-shadow: 0 0 0 5px rgba(255, 152, 0, .18); transition: outline-color .3s, box-shadow .3s; }
/* 同一单据的多个异常：每个独立卡片化，块间明显分隔 */
.ex-embed-item {
  border: 1.5px solid #fcd34d;
  background: #fffdf7;
  border-radius: 6px;
  padding: 12px 14px;
  margin-top: 14px;
  box-shadow: 0 1px 4px rgba(245, 158, 11, .08);
}
.ex-embed-item:first-of-type { margin-top: 8px; }
.ex-embed-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ex-embed-no { font-weight: 700; color: #0f172a; font-size: 14px; }
.ex-embed-head .ex-embed-meta { flex: 1 1 auto; min-width: 200px; }
.ex-embed-body { margin-top: 8px; }
.ex-embed-item.folded .ex-embed-body { display: none; }
.ex-embed-body .dp-info { background: #fbfdff; }
.ex-embed-body .card { box-shadow: none; background: #fcfdff; }

@media (max-width: 0px) { /* mobile-block-off */
  .row3-cust { grid-template-columns: 1fr; gap: 0; }
}

/* ---------------- 科研 / 新品：阶段时间轴 + 质量门 + 泳道（C 档） ---------------- */
.tag.pass { background: #dcfce7; color: #15803d; }
.tag.conditional { background: #fef9c3; color: #a16207; }
.tag.reject { background: #fee2e2; color: #b91c1c; }
.tag.urgent { background: #fee2e2; color: #b91c1c; font-weight: 700; }
.phase-timeline { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 12px; }
.phase-node { border: 1px solid #e2e8f0; border-radius: 8px; padding: 10px 12px; background: #f8fafc; }
.phase-node.active { border-color: var(--pri); background: var(--pri-bg); box-shadow: 0 1px 6px rgba(var(--pri-rgb), .12); }
.phase-node.done { opacity: .95; background: #f6fef9; border-color: #bbf7d0; }
.phase-node.pending { opacity: .72; background: #f8fafc; }
.ph-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.ph-idx { width: 20px; height: 20px; line-height: 20px; text-align: center; border-radius: 50%; background: var(--pri); color: #fff; font-size: 12px; }
.phase-node.done .ph-idx { background: #16a34a; }
.phase-node.pending .ph-idx { background: #94a3b8; }
.ph-name { font-size: 14px; }
.ph-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 6px; }
.ph-grid small, .ph-deliver small, .ph-review small { display: block; color: #64748b; font-size: 11px; margin-bottom: 2px; }
.ph-grid .ipt, .ph-deliver .ipt { width: 100%; font-size: 12px; }
.ph-deliver { margin-bottom: 6px; }
.ph-review { margin-bottom: 6px; }
.ph-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.phase-conv { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 4px 0 8px; }
.lane { border: 1px solid #eef2f7; border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; background: #fff; }
.lane-h { font-weight: 700; color: #334155; margin-bottom: 8px; border-left: 4px solid var(--pri); padding-left: 8px; }
.lane-h small { color: #94a3b8; font-weight: 400; }
/* 科研/新品详情页（列表 → 详情页 → 按流程开展工作） */
.detail-page { padding: 4px 2px 40px; }
.dp-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.dp-bar .dp-t { margin: 0; font-size: 16px; color: #1e293b; }
.dp-bar #tBack { flex: 0 0 auto; }
.detail-page .card { max-width: 1080px; margin: 0 auto; }
.detail-page .phase-timeline { margin: 14px 0; }
.detail-page .phase-node { box-shadow: 0 1px 3px rgba(15,23,42,.06); }

/* 权限管理页矩阵（2026-11-02）：窄屏横向滚动 + 触屏勾选框放大到易点尺寸 */
.perm-tbl input[type="checkbox"] { width: 17px; height: 17px; cursor: pointer; }
/* ============ 仪表盘顶部统计「胶囊徽章」风格（2026-11-02 袁华明，按参考截图） ============
 * 四个大框数量、内容、点击高亮逻辑全部不变，仅框内分项小格改为胶囊形式：
 * 白底细边圆角、彩色粗体数字 + 灰名同行显示（小组框灰底）。覆盖旧软彩底格子样式。 */
.dash-top .stat {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  border-color: color-mix(in srgb, var(--pri) 16%, #fff);
  padding: 5px 10px; text-align: left;
}
.dash-top .stat[data-kind], .dash-top .stat[data-level],
.dash-top .stat[data-urg], .dash-top .stat[data-spec] { background: #fff; }
.dash-top .stat[data-group] { background: color-mix(in srgb, var(--pri) 5%, #fff); }
.dash-top .stat .num { font-size: 15px; }
.dash-top .stat .lbl { font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.dash-top .stat[data-kind]:hover, .dash-top .stat[data-level]:hover,
.dash-top .stat[data-group]:hover { background: color-mix(in srgb, var(--pri) 6%, #fff); border-color: color-mix(in srgb, var(--pri) 40%, #fff); }
.dash-top .stat[data-group]:hover { background: color-mix(in srgb, var(--pri) 6%, #fff); }
.dash-top .stat.active-sub { border-color: var(--pri); background: var(--pri-bg); }

/* 手机端与桌面同构（2026-11-02 袁华明）：框内小格恢复等宽列网格——
 * 关键差异是用 minmax(0,1fr) 强制格子可收缩（原 1fr 的最小值=min-content，
 * 窄屏下宁溢出也不缩，导致撑破大框）。桌面宽屏分到宽度充足、外观与原先完全一致；
 * 手机窄屏同样一行 4/3 格等宽，胶囊内文字自动换行，不再撑破。 */
.dash-top .stat-box .grid { display: grid; gap: 6px; }
.dash-top .stat-box .grid.cols4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dash-top .stat-box .grid.cols3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* 胶囊锁死两行模式（2026-11-02 袁华明）：第一行数字、第二行文字，两端固定不变——
 * 不随宽度自动换行/改排；文字过长时省略号截断，桌面与手机外观完全一致。 */
.dash-top .stat { min-width: 0; padding: 5px 4px; gap: 1px; flex-direction: column; }
.dash-top .stat .num { font-size: 15px; flex: 0 0 auto; line-height: 1.15; }
.dash-top .stat .lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; font-size: 11px; line-height: 1.2; }


/* ===== 主题切换点（2026-11-02 S3） ===== */
.theme-dots { display: inline-flex; align-items: center; gap: 7px; padding: 0 4px; }
.tdot { width: 15px; height: 15px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #cbd5e1; cursor: pointer; padding: 0; }
.tdot-blue { background: #2563eb; } .tdot-teal { background: #0F6E56; } .tdot-navy { background: #534AB7; } .tdot-coffee { background: #6F4E37; }
.tdot.on { box-shadow: 0 0 0 2px var(--ink-2); }

/* ===== 生产线配置界面优化（2026-11-06 袁华明：界面操作更友好） ===== */
/* 小组卡：白底卡片 + 展开时头部渐变描边 */
.sc-group { border: 1px solid var(--line); border-radius: var(--radius); margin: 10px 0; background: #fff; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.sc-group > summary { gap: 10px; }
.sc-group[open] > summary { border-bottom: 1px dashed var(--line); background: linear-gradient(180deg, var(--pri-bg), #fff); border-radius: var(--radius) var(--radius) 0 0; }
/* 产品卡：浅色底 + 左侧主色竖条，视觉上从属于小组 */
.sc-prd { margin: 10px 0 10px 14px; background: #fbfdff; border: 1px solid var(--line); border-left: 3px solid var(--pri); border-radius: 10px; }
.sc-prd[open] > summary { border-bottom: 1px dashed var(--line); }
/* summary 内名称输入：去框融入卡片，悬停/聚焦才亮边 */
.sc-group .sc-gname, .sc-prd .sc-pname { flex: 1 1 180px; min-width: 130px; padding: 7px 10px; border: 1px solid transparent; background: transparent; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--ink); }
.sc-group .sc-gname:hover, .sc-prd .sc-pname:hover { border-color: var(--line); background: #fff; }
.sc-group .sc-gname:focus, .sc-prd .sc-pname:focus { outline: none; border-color: var(--pri); background: #fff; box-shadow: 0 0 0 3px var(--pri-light); }
.sc-group .sc-gname-disp { flex: 1 1 180px; min-width: 130px; padding: 7px 10px; border: 1px solid transparent; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer; user-select: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-group .sc-gname-disp:hover { border-color: var(--line); background: #fff; }
.sc-group summary .sc-gremark { flex: 0 1 220px; min-width: 120px; padding: 5px 10px; border: 1px solid var(--line); background: #fff; border-radius: 8px; font-size: 13px; color: var(--ink); }
.sc-group summary .sc-gremark:focus { outline: none; border-color: var(--pri); box-shadow: 0 0 0 3px var(--pri-light); }
.sc-group summary .sc-gremark::placeholder { color: var(--ink-3, #94a3b8); }
/* 备注：默认隐藏，点右侧画笔图标才展开编辑（2026-11-10 袁华明：改回画笔图标触发方式） */
.sc-group .sc-gremark-btn { flex: 0 0 auto; margin-left: auto; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); cursor: pointer; transition: color .12s, border-color .12s, background .12s; }
.sc-group .sc-gremark-btn:hover { color: var(--pri); border-color: var(--pri-light); background: var(--pri-bg); }
.sc-group .sc-gremark-btn.filled { color: var(--pri); border-color: var(--pri-light); background: var(--pri-bg); }
.sc-group .sc-gremark-btn:disabled { opacity: .45; cursor: not-allowed; }
/* 通用列表操作图标按钮（2026-11-10 袁华明：与生产线删除图标同风格 —— 删除红/编辑中性/重置密码橙） */
.act-ico { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); cursor: pointer; transition: color .12s, border-color .12s, background .12s; padding: 0; }
.act-ico:hover { color: var(--pri); border-color: var(--pri-light); background: var(--pri-bg); }
.act-ico:disabled { opacity: .45; cursor: not-allowed; }
.act-ico.danger { color: var(--danger); }
.act-ico.danger:hover { color: var(--danger); border-color: #fecaca; background: var(--danger-bg); }
.act-ico.pw { color: #d97706; }
.act-ico.pw:hover { color: #b45309; border-color: #fde68a; background: #fffbeb; }
/* 密码框「眼睛」切换（2026-11-10 袁华明）：包裹 input 浮出右侧切换按钮 */
.pw-eye-wrap { position: relative; display: block; }
.pw-eye { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; padding: 0; margin: 0; border: none; background: none; color: var(--ink-2); cursor: pointer; z-index: 2; }
.pw-eye:hover { color: var(--pri); }
.pw-eye svg { width: 17px; height: 17px; display: block; }
input.has-eye { padding-right: 34px; }
.sc-group .sc-gname-edit { flex: 0 0 auto; margin-left: 2px; padding: 3px 7px; font-size: 12px; line-height: 1.2; }
/* 统计徽标：产品数 / 环节数 / 未配提醒 / 流程名 */
.sc-badge { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; border-radius: 999px; padding: 2px 9px; background: var(--pri-bg); color: var(--pri-deep); border: 1px solid var(--pri-light); white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.sc-badge.warn { background: var(--warn-bg); color: var(--warn-deep); border-color: #fed7aa; }
.sc-badge.gray { background: #f1f5f9; color: var(--ink-2); border-color: var(--line); }
.sc-badges { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; flex-wrap: wrap; }
/* summary 删除按钮：幽灵化，悬停才显红（降低视觉噪音 + 防误点） */
.sc-group .sc-gdel, .sc-prd .sc-pdel { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 1px solid transparent; color: var(--danger); font-size: 12px; padding: 4px 8px; border-radius: 6px; }
.sc-group .sc-gdel:hover, .sc-prd .sc-pdel:hover { background: var(--danger-bg); color: var(--danger); border-color: #fecaca; }
/* 产品内容区统一内边距；测试流程行下拉加宽 */
.sc-prd > *:not(summary) { margin-left: 12px; margin-right: 12px; }
.sc-prd .sc-add-step { margin-bottom: 10px; margin-top: 2px; }
.sc-flow-row { margin: 10px 0 2px; }
.sc-flow-row select { width: 100%; max-width: 460px; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 13.5px; background: #fff; }
/* 工序表：浅色表头 + 行悬浮 + 底部细线 */
.sc-steps-tbl { width: 100%; border-collapse: collapse; margin: 8px 0 4px; }
.sc-steps-tbl th { background: #f8fafc; color: var(--ink-2); font-size: 12px; font-weight: 600; text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); }
.sc-steps-tbl td { padding: 8px 10px; border-bottom: 1px solid #f1f5f9; vertical-align: top; }
.sc-steps-tbl tbody tr:hover { background: #f6faff; }
.sc-steps-tbl .sc-step-sel { max-width: 240px; }
/* 一个环节一行（2026-11-06 袁华明）：人员 chips 横排、行内可换行，但绝不允许把一行拆成多行记录 */
.sc-steps-tbl .c-u { min-width: 260px; }
.sc-steps-tbl .c-u .mp { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; row-gap: 4px; }
.sc-steps-tbl .c-u .mp-chip { white-space: nowrap; }
.sc-steps-tbl .c-u .mp-add { width: auto; }
/* 新增类按钮：虚线幽灵风，弱化存在感、悬停亮起 */
.sc-add-step, .sc-add-prd, #scAddGroup { background: #fff; color: var(--pri-deep); border: 1px dashed var(--pri-light); }
.sc-add-step:hover, .sc-add-prd:hover, #scAddGroup:hover { border-color: var(--pri); background: var(--pri-bg); }
/* 自动保存状态：吸底浮条，常驻可见 */
#scAutoStatus { position: sticky; bottom: 8px; z-index: 5; display: inline-block; background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px; font-size: 12px; color: var(--ink-2); box-shadow: 0 4px 14px rgba(15,23,42,.08); }
/* 空状态引导 */
.sc-empty { padding: 22px 16px; text-align: center; color: var(--ink-2); font-size: 13px; border: 1px dashed var(--line); border-radius: 10px; background: #fff; }
/* 流程链分组头（2026-11-06 二次优化：27 个环节按 订单/试用/备货/售后 四链分组） */
.sc-chain-hd td { background: linear-gradient(90deg, var(--pri-bg), #fff); font-weight: 700; font-size: 12.5px; color: var(--pri-deep); padding: 7px 10px; border-top: 1px solid var(--line); }
.sc-chain-hd .sub { font-weight: 400; margin-left: 6px; }
/* 未配人环节淡化（仍可操作，只是视觉降级） */
.sc-empty-step { opacity: .58; }
.sc-empty-step td .sc-step-sel { color: var(--ink-2); }
/* 生产线配置·产品行（2026-11-08 袁华明：点击行→弹窗，不再内联展开） */
.sc-prd-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; margin: 6px 0; background: var(--pri-bg); border: 1px solid var(--pri-light); border-left: 3px solid var(--pri); border-radius: var(--radius); cursor: pointer; }
.sc-prd-row:hover { border-color: var(--pri); background: var(--pri-light); }
.sc-prd-row .sc-tag { flex: 0 0 auto; }
.sc-prd-row .sc-pname-disp { font-weight: 600; color: var(--ink); }
.sc-prd-row .sc-badges { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.sc-prd-row .sc-prd-row-status { margin-left: auto; }
.sc-prd-row .sc-pdel { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 1px solid transparent; color: var(--danger); font-size: 12px; padding: 4px 8px; border-radius: 6px; }
.sc-prd-row .sc-pdel:hover { background: var(--danger-bg); color: var(--danger); border-color: #fecaca; }
/* 生产线配置·产品弹窗 */
.sc-modal-mask { position: fixed; inset: 0; background: rgba(15,23,42,.5); display: none; align-items: flex-start; justify-content: flex-start; z-index: 1000; padding: 40px 16px; overflow: auto; }
.sc-modal-box { background: #fff; border-radius: 14px; width: 960px; max-width: none; flex: 0 0 auto; margin: 0 auto; box-shadow: 0 20px 60px rgba(0,0,0,.3); display: flex; flex-direction: column; max-height: calc(100vh - 80px); }
.sc-modal-bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; border-radius: 14px 14px 0 0; z-index: 2; flex: 0 0 auto; }
.sc-modal-title { font-weight: 700; font-size: 16px; color: var(--ink); }
.sc-modal-body { padding: 18px; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.sc-modal-body details.sc-prd { margin: 0; }

/* 行式流程列表编辑器（2026-11-08 袁华明）：生产过程流程/出厂测试流程逐行 上移/下移/删除 */
.ll-list { display: flex; flex-direction: column; gap: 6px; }
.ll-row { display: flex; align-items: center; gap: 6px; }
.ll-idx { flex: 0 0 22px; text-align: center; font-size: 12px; color: var(--ink-2, #64748b); background: var(--pri-bg, #eff6ff); border-radius: 8px; padding: 4px 0; }
.ll-txt { flex: 1; min-width: 0; padding: 7px 10px; border: 1px solid var(--line, #e2e8f0); border-radius: 8px; font-size: 13px; }
.ll-txt:focus { outline: none; border-color: var(--pri, #2563eb); box-shadow: 0 0 0 3px var(--pri-light, #dbeafe); }
.ll-mv, .ll-del { flex: 0 0 auto; }

/* 审批流箭头指示 + 驳回原因（2026-11-09 袁华明）：三级链 → 连接，当前级高亮，被驳回级标红 */
.wf-flow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; line-height: 1.4; }
.wf-flow.compact { gap: 4px; }
.wf-step { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 12px; border: 1px solid var(--line, #e2e8f0); background: var(--page, #f8fafc); color: var(--ink-2, #64748b); white-space: nowrap; }
.wf-step .wf-idx { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; font-style: normal; font-size: 10px; background: var(--line, #e2e8f0); color: var(--ink-2, #64748b); }
.wf-step em { font-style: normal; font-size: 10px; padding: 1px 5px; border-radius: 8px; background: var(--pri, #2563eb); color: #fff; }
.wf-step.done { border-color: var(--ok, #16a34a); background: rgba(22,163,74,.10); color: var(--ok, #16a34a); }
.wf-step.done .wf-idx { background: var(--ok, #16a34a); color: #fff; }
.wf-step.current { border-color: var(--pri, #2563eb); background: var(--pri-bg, #eff6ff); color: var(--pri-deep, #1d4ed8); font-weight: 600; }
.wf-step.current .wf-idx { background: var(--pri, #2563eb); color: #fff; }
.wf-step.rejected { border-color: var(--danger, #dc2626); background: rgba(220,38,38,.08); color: var(--danger, #dc2626); font-weight: 600; }
.wf-step.rejected .wf-idx { background: var(--danger, #dc2626); color: #fff; }
.wf-step.rejected em { background: var(--danger, #dc2626); }
.wf-step.todo { opacity: .7; }
.wf-arrow { color: var(--ink-2, #94a3b8); font-weight: 700; }
.wf-cur { font-size: 11px; color: var(--pri-deep, #1d4ed8); background: var(--pri-bg, #eff6ff); border-radius: 8px; padding: 2px 8px; white-space: nowrap; }
.wf-reject { margin-top: 6px; font-size: 12px; line-height: 1.6; color: var(--danger, #dc2626); background: rgba(220,38,38,.06); border-left: 2px solid var(--danger, #dc2626); padding: 4px 8px; border-radius: 4px; max-width: 460px; white-space: normal; word-break: break-word; }
.wf-reject-meta { color: var(--ink-2, #64748b); font-size: 11px; margin-left: 4px; }
/* 详情弹窗底部审批面板（与生产线配置产品弹窗审批卡同形态，2026-11-09） */
.wf-apr-card { background: var(--page, #f8fafc); padding: 12px 14px; }
.wf-apr-card h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
/* 配置页顶部「待您审批」提醒（页面级入口；列表行内仍只显示状态，2026-11-09） */
.cfg-apr-notice { margin-bottom: 12px; padding: 10px 14px; background: var(--warn-bg); border: 1px solid var(--warn); border-radius: 10px; color: var(--warn-deep); font-size: 13px; }
.cfg-apr-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.cfg-apr-head .sub { color: var(--ink-2, #64748b); font-size: 12px; }
.cfg-apr-list { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.cfg-apr-item { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--warn); color: var(--warn-deep); border-radius: 14px; padding: 3px 8px 3px 10px; cursor: pointer; font-size: 12px; line-height: 1.5; }
.cfg-apr-item:hover { background: var(--warn-bg); }
.cfg-apr-name { font-weight: 600; }
.cfg-apr-meta { color: var(--ink-2, #64748b); }
.cfg-apr-go { color: var(--pri); font-weight: 600; }
.cfg-apr-more { font-size: 12px; color: var(--ink-2, #64748b); }
.cfg-apr-expand { font-size: 12px; color: var(--pri); background: #fff; border: 1px dashed var(--warn); border-radius: 14px; padding: 3px 10px; cursor: pointer; }
.cfg-apr-expand:hover { background: var(--warn-bg); }
