/* ============================================================
   关澜ERP v2 · 设计系统
   对齐 Ardot「v2 源码对齐版」七屏：
   背景 #FAFAFA / 卡片 #FFFFFF / 主文本 #0A0A0B / 次文本 #52525B
   边框 #E4E4E7 / 强调 #3B82F6 / 成功 #10B981 / 警告 #F59E0B / 错误 #EF4444
   圆角：卡片 8 / 按钮 6
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #FAFAFA;
  --card: #FFFFFF;
  --text: #0A0A0B;
  --muted: #52525B;
  --sub: #71717A;
  --line: #E4E4E7;
  --line-soft: #EFEFF1;
  --primary: #3B82F6;
  --primary-d: #2563EB;
  --primary-soft: #EFF6FF;
  --ok: #10B981;
  --ok-soft: #ECFDF5;
  --warn: #F59E0B;
  --warn-soft: #FFFBEB;
  --danger: #EF4444;
  --danger-soft: #FEF2F2;
  --purple: #8B5CF6;
  --purple-soft: #F5F3FF;
  --radius: 8px;
  --radius-btn: 6px;
  --sidebar-w: 210px;
  --topbar-h: 52px;
}

html, body { height: 100%; }
body {
  font-family: "Inter", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
.num { font-family: "Inter", "Noto Sans SC", sans-serif; font-variant-numeric: tabular-nums; }
a { color: var(--primary); text-decoration: none; }

/* ============ 登录 ============ */
.login-wrap {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0A0A0B 0%, #1E293B 55%, #1E40AF 100%);
}
.login-box { background: #fff; border-radius: 12px; padding: 40px 36px; width: 348px; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.login-brand { font-size: 25px; font-weight: 700; text-align: center; letter-spacing: .5px; }
.login-brand span { color: var(--primary); }
.login-sub { text-align: center; color: var(--muted); margin: 6px 0 26px; font-size: 12.5px; }
.login-input { width: 100%; padding: 11px 13px; margin-bottom: 13px; border: 1px solid var(--line); border-radius: var(--radius-btn); font-size: 14px; font-family: inherit; }
.login-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.login-btn { width: 100%; padding: 11px; background: var(--primary); color: #fff; border: none; border-radius: var(--radius-btn); font-size: 14.5px; font-weight: 600; cursor: pointer; }
.login-btn:hover { background: var(--primary-d); }
.login-msg { color: var(--danger); text-align: center; margin-top: 11px; min-height: 18px; font-size: 12.5px; }

/* ============ 布局 ============ */
.app { display: flex; height: 100vh; overflow: hidden; }

.sidebar {
  width: var(--sidebar-w); background: var(--card); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; flex-shrink: 0;
}
.brand { height: var(--topbar-h); display: flex; align-items: center; gap: 8px; padding: 0 16px; font-size: 15px; font-weight: 700; border-bottom: 1px solid var(--line-soft); }
.brand-mark { width: 22px; height: 22px; border-radius: 5px; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.menu { flex: 1; overflow-y: auto; padding: 12px 0 20px; }
.menu-group { padding: 14px 16px 5px; font-size: 11px; color: var(--sub); font-weight: 500; letter-spacing: .3px; }
.menu-item {
  display: flex; align-items: center; gap: 9px; padding: 8px 16px; cursor: pointer;
  color: var(--muted); font-size: 13.5px; border-left: 2px solid transparent; user-select: none;
}
.menu-item:hover { background: #FAFAFA; color: var(--text); }
.menu-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; border-left-color: var(--primary); }
.menu-icon { width: 17px; text-align: center; font-size: 13.5px; opacity: .85; }
.sidebar-foot { padding: 12px 16px; border-top: 1px solid var(--line-soft); }
.sf-line { font-size: 11px; color: var(--muted); }
.sf-line.dim { color: var(--sub); }

.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.topbar {
  height: var(--topbar-h); background: var(--card); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px; padding: 0 18px; flex-shrink: 0;
}
.menu-btn { display: none; font-size: 18px; background: none; border: none; cursor: pointer; color: var(--text); }
.page-title { font-size: 14px; color: var(--muted); font-weight: 500; }
.topbar-search { position: relative; margin-left: auto; }
.ts-icon { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: var(--sub); font-size: 13px; }
.topbar-search input { width: 250px; padding: 6px 10px 6px 26px; border: 1px solid var(--line); border-radius: var(--radius-btn); font-size: 12.5px; font-family: inherit; background: var(--bg); }
.topbar-search input:focus { outline: none; border-color: var(--primary); background: #fff; }
.topbar-right { display: flex; align-items: center; gap: 9px; }
.icon-btn { position: relative; background: none; border: none; cursor: pointer; font-size: 15px; color: var(--muted); padding: 4px 6px; border-radius: var(--radius-btn); }
.icon-btn:hover { background: var(--bg); }
.bell-dot { position: absolute; top: 3px; right: 3px; width: 6px; height: 6px; border-radius: 50%; background: var(--danger); }
.avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 600; }
.user-name { font-size: 13px; font-weight: 500; }
.user-role { font-size: 11.5px; background: var(--primary-soft); color: var(--primary); padding: 2px 9px; border-radius: 20px; }

.content { flex: 1; overflow-y: auto; padding: 20px 24px 40px; }

/* ============ 页头 ============ */
.page-head { margin-bottom: 18px; position: relative; }
.page-title-lg { font-size: 20px; font-weight: 700; letter-spacing: -.2px; }
.page-sub { color: var(--muted); font-size: 12.5px; margin-top: 5px; }
.page-sub b { color: var(--text); font-weight: 600; }
/* 第 24 轮：页头右上角操作区（设计/生产管理页的「新建耗材 / 采购申请」入口） */
.page-act { position: absolute; right: 0; top: 0; display: flex; align-items: center; gap: 8px; }
.page-act .btn { white-space: nowrap; }

/* ============ 卡片 ============ */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.card + .card { margin-top: 14px; }
.card-head { display: flex; align-items: center; gap: 9px; padding: 13px 16px; border-bottom: 1px solid var(--line-soft); }
.card-title { font-size: 13.5px; font-weight: 600; }
.card-body { padding: 16px; }
.card-link { margin-left: auto; font-size: 12.5px; color: var(--primary); cursor: pointer; }
.card-link:hover { text-decoration: underline; }

/* ============ KPI ============ */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 14px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 17px; }
.kpi-label { font-size: 12px; color: var(--muted); }
.kpi-value { font-size: 25px; font-weight: 700; margin: 6px 0 5px; letter-spacing: -.5px; }
.kpi-note { font-size: 11.5px; color: var(--sub); }
.kpi-note.up { color: var(--ok); }
.kpi-note.warn { color: var(--warn); }
.kpi-note.danger { color: var(--danger); }

/* ============ 三栏 / 两栏 ============ */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-2-32 { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 14px; align-items: start; }

/* ============ 第 9 轮 · 四档看板 ============ */
.kpi-grid-4 { grid-template-columns: repeat(4, 1fr); }
.kpi-grid-5 { grid-template-columns: repeat(5, 1fr); }
.dash-row { margin-top: 14px; }
.dash-row .card + .card { margin-top: 0; }
.dash-row > .card { margin-top: 0; }

/* admin 科技感 hero */
.dash-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 22px 26px; margin-bottom: 16px; border-radius: 14px;
  /* 墨青深色：比原来的纯蓝黑更沉稳，光晕收敛为左上青 + 右下靛 */
  background:
    radial-gradient(1000px 260px at 4% -60%, rgba(45,212,191,.16), transparent 62%),
    radial-gradient(820px 300px at 102% -60%, rgba(99,102,241,.20), transparent 64%),
    linear-gradient(135deg, #0E1A24 0%, #0A1520 52%, #101C2B 100%);
  color: #E8EEF6; position: relative; overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.dash-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(148,180,210,.07) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(148,180,210,.07) 1px, transparent 1px);
  background-size: 36px 36px; mask-image: linear-gradient(180deg, rgba(0,0,0,.42), transparent 80%);
}
.dash-hero-l { position: relative; z-index: 1; min-width: 0; }
/* 标题：26px / 真粗体
   字体优先用「微软雅黑」—— 它有独立的 Bold 字重文件（msyhbd.ttc），
   渲染出的粗体是真正的黑度；Noto Sans SC 是可变字体，800 权重在部分
   浏览器里会被渲染成细字重，所以放在雅黑之后兜底。
   不用 text-shadow 模拟粗体 —— 描边会让中文笔画边缘发毛。 */
.dash-hero .page-title-lg {
  color: #FFFFFF; font-size: 26px; font-weight: 700;
  letter-spacing: 1.5px; line-height: 1.25;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Inter", sans-serif;
  -webkit-font-smoothing: antialiased;
}
/* 副标题：提亮 + 加大字距，避免小字糊在深底上 */
.dash-hero .page-sub {
  color: #A7B8CC; font-size: 13px; line-height: 1.7;
  letter-spacing: .3px; margin-top: 8px;
}
.dash-hero .page-sub b { color: #DCE7F3; font-weight: 700; }
.dash-hero-r { position: relative; z-index: 1; }
.dash-ring { display: flex; align-items: center; gap: 14px; }
.dash-ring svg { display: block; }

/* SVG 图形容器 */
.viz { display: block; max-width: 100%; }
.dwrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.dlegend { flex: 1; min-width: 160px; }
.dlegend-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 12.5px; }
.dlegend-dot { width: 9px; height: 9px; border-radius: 2px; flex: none; }
.dlegend-name { color: var(--muted); }
.dlegend-val { margin-left: auto; font-weight: 700; }
.dlegend-pct { width: 52px; text-align: right; color: var(--sub); font-size: 11.5px; }

/* 小统计行 */
.mini-stat { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--line-soft); font-size: 12.5px; color: var(--muted); }
.mini-stat:last-of-type { border-bottom: none; }
.mini-stat b { font-size: 17px; font-weight: 700; color: var(--text); }
.sub-title { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }

/* 受阻 / 超期列表 */
.blist-row { display: flex; align-items: center; gap: 9px; padding: 7px 0; border-bottom: 1px dashed var(--line-soft); font-size: 12.5px; }
.blist-row:last-child { border-bottom: none; }
.blist-id { color: var(--sub); font-weight: 700; flex: none; }
.blist-no { color: var(--primary); font-weight: 600; flex: none; }
.blist-pd { color: var(--text); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blist-tag { color: var(--warn); font-size: 11.5px; flex: none; }

/* 16 步流程热力 */
.heat { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; }
.heat-cell { border: 1px solid var(--line); border-radius: 9px; padding: 9px 9px 8px; background: #FBFCFE; }
.heat-ic { font-size: 15px; line-height: 1; }
.heat-nm { font-size: 11px; color: var(--muted); margin: 5px 0 6px; height: 26px; line-height: 1.3; overflow: hidden; }
.heat-bar { height: 6px; border-radius: 3px; background: #F4F4F5; overflow: hidden; display: flex; }
.heat-bar > i.ok { background: var(--ok); }
.heat-bar > i.now { background: var(--primary); }
.heat-vl { font-size: 10.5px; color: var(--sub); margin-top: 4px; font-weight: 600; }

@media (max-width: 1280px) {
  .kpi-grid-5 { grid-template-columns: repeat(3, 1fr); }
  .heat { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .kpi-grid-4, .kpi-grid-5 { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .heat { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ============ 分布条 ============ */
.dist-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.dist-label { width: 58px; font-size: 12px; color: var(--muted); flex-shrink: 0; }
.dist-track { flex: 1; height: 10px; background: #F4F4F5; border-radius: 5px; overflow: hidden; }
.dist-fill { height: 100%; border-radius: 5px; background: var(--primary); }
.dist-fill.ok { background: var(--ok); }
.dist-val { width: 34px; text-align: right; font-weight: 600; font-size: 12.5px; }

/* ============ 待办 ============ */
.todo-item { display: flex; align-items: center; gap: 9px; padding: 7px 0; font-size: 13px; }
.todo-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.todo-count { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ============ 库存预警 ============ */
.stock-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 12.5px; }
.stock-name { width: 78px; color: var(--muted); flex-shrink: 0; }
.stock-bar { flex: 1; height: 6px; background: #F4F4F5; border-radius: 3px; overflow: hidden; }
.stock-fill { height: 100%; background: var(--ok); border-radius: 3px; }
.stock-fill.low { background: var(--danger); }
.stock-val { font-size: 11.5px; color: var(--danger); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ============ 表格 ============ */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line-soft); white-space: nowrap; font-size: 12.5px; }
th { background: #FAFAFA; color: var(--muted); font-weight: 500; font-size: 12px; }
tbody tr:hover td { background: #FAFAFA; }
tbody tr:last-child td { border-bottom: none; }
.td-amount { font-weight: 600; font-variant-numeric: tabular-nums; }
.td-sub { font-size: 11px; color: var(--sub); font-weight: 400; }
.td-order-no { color: var(--primary); font-weight: 500; cursor: pointer; }
.td-order-no:hover { text-decoration: underline; }
.empty { text-align: center; color: var(--sub); padding: 44px 20px; font-size: 13px; }
.empty-icon { font-size: 26px; opacity: .35; display: block; margin-bottom: 8px; }

/* ============ 徽标 ============ */
.badge { display: inline-block; padding: 1.5px 9px; border-radius: 20px; font-size: 11.5px; line-height: 1.5; }
.badge-gray { background: #F4F4F5; color: #52525B; }
.badge-blue { background: var(--primary-soft); color: var(--primary-d); }
.badge-green { background: var(--ok-soft); color: #047857; }
.badge-yellow { background: var(--warn-soft); color: #B45309; }
.badge-red { background: var(--danger-soft); color: #B91C1C; }
.badge-purple { background: var(--purple-soft); color: #6D28D9; }

/* ============ 按钮 ============ */
.btn { padding: 7px 14px; border: none; border-radius: var(--radius-btn); cursor: pointer; font-size: 12.5px; font-family: inherit; font-weight: 500; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-d); }
.btn-ghost { background: #fff; border: 1px solid var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-xs { padding: 4px 10px; font-size: 12px; }
.btn-sm { padding: 4.5px 11px; font-size: 12px; white-space: nowrap; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #DC2626; }
.btn-soft-danger { background: var(--danger-soft); color: #B91C1C; }
.btn-soft-ok { background: var(--ok-soft); color: #047857; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-link { background: none; border: none; color: var(--primary); cursor: pointer; padding: 0; font-size: 12.5px; }
.btn-link:hover { text-decoration: underline; }
.btn-link.muted { color: var(--sub); }
.btn-link.danger { color: var(--danger); }
/* 不可点的操作（如内置 admin 不可删除）—— 灰掉 + 不显示手型光标 */
.btn-link.btn-link-off { color: var(--sub); opacity: .55; cursor: not-allowed; }
.btn-link.btn-link-off:hover { text-decoration: none; }

/* ============ 筛选栏 ============ */
.filter-bar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 14px; }
.filter-bar select, .filter-bar input {
  padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--radius-btn);
  font-size: 12.5px; font-family: inherit; background: #fff; color: var(--text);
}
.filter-bar select:focus, .filter-bar input:focus { outline: none; border-color: var(--primary); }
.filter-spacer { margin-left: auto; }

/* ============ 分页条 ============ */
.pager { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line-soft); }
.pager-info { font-size: 12px; color: var(--muted); }
.pager-btns { margin-left: auto; display: flex; gap: 5px; }
.pg-btn { min-width: 28px; height: 28px; padding: 0 8px; border: 1px solid var(--line); background: #fff; border-radius: var(--radius-btn); cursor: pointer; font-size: 12px; color: var(--text); }
.pg-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.pg-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pg-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ============ 流程条 ============ */
.flow-strip { display: flex; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 22px; margin-bottom: 14px; }
.flow-step { display: flex; align-items: center; gap: 9px; flex: 1; position: relative; }
.flow-num { width: 24px; height: 24px; border-radius: 50%; background: #F4F4F5; color: var(--sub); display: inline-flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 700; flex-shrink: 0; }
.flow-step.done .flow-num { background: var(--ok); color: #fff; }
.flow-step.active .flow-num { background: var(--primary); color: #fff; }
.flow-label { font-size: 13px; color: var(--muted); }
.flow-step.done .flow-label, .flow-step.active .flow-label { color: var(--text); font-weight: 500; }
.flow-line { flex: 1; height: 1px; background: var(--line); margin: 0 14px; }

/* ============ 设计管理：列表 + 深化流程 ============ */
/* 左列表加宽到 620px：7 列一屏看完，不需要横向右拉 */
.design-layout {
  display: grid;
  grid-template-columns: 620px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  height: calc(100vh - 250px);
  min-height: 560px;
}
/* 两栏各自内部滚动，左侧列表与右侧流程互不牵走 */
.design-layout > .card { display: flex; flex-direction: column; overflow: hidden; }
.design-layout > .card > .card-head { flex-shrink: 0; }
.design-list-card .pager, .design-list-card .pager-wrap { flex-shrink: 0; }
.design-list-card .table-wrap { overflow-x: hidden; overflow-y: auto; flex: 1; min-height: 0; }
#dPanel { min-height: 0; }
#dPanel .card-body { overflow-y: auto; flex: 1; min-height: 0; }
.design-list-table { table-layout: fixed; }
.design-list-table th, .design-list-table td {
  padding: 9px 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.design-list-table th:nth-child(1) { width: 168px; }
.design-list-table th:nth-child(2) { width: 78px; }
.design-list-table th:nth-child(3) { width: 84px; }
.design-list-table th:nth-child(4) { width: 78px; }
.design-list-table th:nth-child(5) { width: auto; }
.design-list-table th:nth-child(6) { width: 66px; }
.design-list-table th:nth-child(7) { width: 62px; }
.design-list-table td.td-num { text-align: right; font-variant-numeric: tabular-nums; }
.design-list-table tr.row-sel td { background: var(--primary-soft); }
.design-list-table tr.row-sel .td-order-no { font-weight: 600; }

/* 深化面板头部 */
.dpanel-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.dpanel-title { font-size: 15px; font-weight: 700; letter-spacing: -.2px; }
.dpanel-badge { margin-left: auto; }

/* 步骤卡片 */
.dsteps { display: flex; flex-direction: column; gap: 12px; }
.dstep {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #FCFCFD;
  overflow: hidden;
}
.dstep.todo { opacity: .72; }
.dstep.active { border-color: #BFDBFE; background: #fff; box-shadow: 0 0 0 3px var(--primary-soft); }
.dstep.done { background: #fff; }
.dstep-head { display: flex; align-items: center; gap: 11px; padding: 12px 15px; border-bottom: 1px solid var(--line-soft); }
.dstep-num {
  width: 24px; height: 24px; border-radius: 50%;
  background: #F4F4F5; color: var(--sub);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 700; flex-shrink: 0;
}
.dstep.done .dstep-num { background: var(--ok); color: #fff; }
.dstep.active .dstep-num { background: var(--primary); color: #fff; }
.dstep-titles { flex: 1; min-width: 0; }
.dstep-title { font-size: 13.5px; font-weight: 600; }
.dstep-desc { font-size: 11.5px; color: var(--sub); margin-top: 2px; line-height: 1.5; }
.dstep-state { font-size: 11.5px; color: var(--sub); flex-shrink: 0; }
.dstep.done .dstep-state { color: var(--ok); }
.dstep.active .dstep-state { color: var(--primary); font-weight: 600; }
.dstep-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 13px 15px 15px;
}
.dstep-col { min-width: 0; }
.dstep-col-full { grid-column: 1 / -1; }
.dstep-label { font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 7px; }
.dstep-count {
  display: inline-block; margin-left: 5px; padding: 0 6px;
  background: #F4F4F5; color: var(--sub); border-radius: 10px;
  font-size: 11px; font-weight: 500;
}
.att-empty {
  font-size: 11.5px; color: var(--sub);
  padding: 10px 11px; border: 1px dashed var(--line);
  border-radius: var(--radius-btn); margin-bottom: 7px;
}
.dstep-col .att-item { padding: 7px 10px; margin-bottom: 6px; }
.dstep-tip { font-size: 11.5px; color: var(--sub); margin-top: 7px; line-height: 1.6; }
.dstep-acts {
  grid-column: 1 / -1;
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  padding-top: 12px; margin-top: 4px;
  border-top: 1px dashed var(--line-soft);
}

/* ============ 生产状态通栏（11 步） ============ */
/* 第 14 轮：通栏卡片头部的工单选择器 */
.pflow-picker { display: inline-flex; align-items: center; margin-left: 14px; }
.pflow-picker select { min-width: 220px; max-width: 340px; }
.pflow-head {
  display: flex; align-items: center; gap: 14px; margin-bottom: 14px;
}
.pflow-head .kpi-note { white-space: nowrap; }
.pflow-track {
  flex: 1; height: 7px; background: #F4F4F5; border-radius: 4px; overflow: hidden;
}
.pflow-track > i { display: block; height: 100%; background: var(--ok); border-radius: 4px; transition: width .25s; }
.pflow-bar {
  display: grid;
  /* 第 16 轮：通栏共 12 步（原 11 步 + 新增「订单结束」）—— 之前硬编码 14 导致右侧空一格 */
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 6px;
}
.pflow-node {
  min-width: 0; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius-btn);
  background: #FCFCFD; padding: 9px 7px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  transition: border-color .15s, background .15s, box-shadow .15s;
  position: relative;
}
.pflow-node:hover { border-color: var(--primary); background: #fff; }
.pflow-node.sel { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 2px rgba(10,10,11,.05); }
.pflow-node.done { background: #F0FDF4; border-color: #BBF7D0; }
.pflow-node.active { border-color: var(--primary); }
.pflow-idx {
  position: absolute; top: 5px; left: 6px;
  font-size: 10px; color: var(--sub); font-weight: 600;
}
.pflow-node.done .pflow-idx { color: var(--ok); }
.pflow-icon { font-size: 17px; line-height: 1.2; margin-top: 8px; }
.pflow-name {
  font-size: 11.5px; color: var(--text); font-weight: 600; text-align: center;
  line-height: 1.3; word-break: break-word;
}
.pflow-people {
  font-size: 10.5px; color: var(--primary); text-align: center;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pflow-files { font-size: 10.5px; color: var(--sub); }
.pflow-warn {
  font-size: 10px; color: var(--warn); background: #FEF9C3;
  border-radius: 8px; padding: 0 5px; line-height: 15px;
}
.pflow-detail {
  margin-top: 14px; border: 1px solid var(--line);
  border-radius: var(--radius-btn); background: #FCFCFD; overflow: hidden;
}
.pflow-dhead {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 14px; border-bottom: 1px solid var(--line-soft); background: #fff;
}
.pflow-dicon { font-size: 20px; }
.pflow-dtitle { font-size: 14px; font-weight: 700; }
.pflow-dstate { margin-left: auto; }
.pflow-dbody {
  padding: 14px; display: flex; flex-direction: column; gap: 13px;
}
.pflow-files-box {
  border: 1px dashed var(--line); border-radius: var(--radius-btn);
  padding: 10px 11px; background: #fff;
}
.pflow-files-box .att-item { margin-bottom: 6px; }
.pflow-acts { display: flex; gap: 8px; flex-wrap: wrap; }
/* 发货类节点的业务动作块 */
.pflow-ship {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-btn); background: #fff;
}
.pflow-ship-state { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; }
.sign-preview {
  max-width: 100%; border-radius: var(--radius-btn);
  border: 1px solid var(--line); margin: 4px 0 9px; display: block;
}
.dpanel-actions {
  display: flex; gap: 8px; margin-top: 12px;
  padding-top: 13px; border-top: 1px solid var(--line-soft); flex-wrap: wrap;
}

/* 第 13 轮：设计面板底部的「分派车间」区块 —— 一次性确认下发并进入生产 */
.dpanel-dispatch {
  margin-top: 16px; padding: 16px 18px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, #F8FAFF 0%, #FFFFFF 100%);
}
.dpanel-dispatch-row { display: flex; gap: 14px; flex-wrap: wrap; }
.dpanel-dispatch-row .form-item { display: flex; flex-direction: column; gap: 6px; }
.dpanel-dispatch-row select, .dpanel-dispatch-row input { width: 100%; }
.dpanel-dispatch .dstep-tip { margin-top: 8px; }

/* ============ 详情页 ============ */
/* 订单详情：按 1080p（1920×1080）屏幕设计 —— 内容整体居中，
   不再贴着浏览器右边缘，两侧留白对称，视觉重心落在中间。 */
.detail-shell { max-width: 1320px; margin: 0 auto; width: 100%; }
.detail-shell .detail-grid { grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; }
.detail-shell .card + .card { margin-top: 20px; }
.detail-shell .card-head { padding: 16px 20px; }
.detail-shell .card-body { padding: 20px; }

.detail-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.detail-back { color: var(--primary); cursor: pointer; font-size: 13px; }
.detail-back:hover { text-decoration: underline; }
.detail-no { font-size: 19px; font-weight: 700; letter-spacing: -.2px; }
.detail-actions { margin-left: auto; display: flex; gap: 8px; }

/* ============ 键值表 ============ */
.kv-list { display: flex; flex-direction: column; gap: 9px; }
.kv-row { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; font-size: 12.5px; }
.kv-k { color: var(--muted); flex-shrink: 0; }
.kv-v { font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.kv-v.ok { color: var(--ok); }
.kv-v.warn { color: var(--warn); }
.kv-sep { border-top: 1px dashed var(--line); margin: 5px 0; }

/* ============ 状态流 ============ */
.status-flow { display: flex; flex-direction: column; gap: 0; margin-top: 4px; }
.sf-item { display: flex; align-items: center; gap: 9px; padding: 5px 0; font-size: 12.5px; position: relative; }
.sf-dot { width: 9px; height: 9px; border-radius: 50%; background: #E4E4E7; flex-shrink: 0; z-index: 1; }
.sf-item.reached .sf-dot { background: var(--ok); }
.sf-item.current .sf-dot { background: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.sf-name { color: var(--sub); }
.sf-item.reached .sf-name, .sf-item.current .sf-name { color: var(--text); }
.sf-item.current .sf-name { font-weight: 600; }
.sf-note { margin-top: 8px; font-size: 11.5px; color: var(--sub); line-height: 1.6; padding-top: 9px; border-top: 1px dashed var(--line); }

/* ============ 工序 / 时间线 ============ */
.tl-group { margin-bottom: 14px; }
.tl-group-title { font-size: 12.5px; color: var(--primary-d); font-weight: 600; margin-bottom: 7px; }
.tl-item { display: flex; align-items: flex-start; gap: 8px; padding: 3.5px 0; font-size: 12.5px; }
.tl-dot { width: 6px; height: 6px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.tl-meta { color: var(--sub); font-size: 11.5px; margin-left: 6px; }

/* ============ 勾选框 ============ */
.ck { width: 14px; height: 14px; accent-color: var(--primary); cursor: pointer; }

/* ============ 弹窗 ============ */
.mask { position: fixed; inset: 0; background: rgba(10,10,11,.45); z-index: 50; }
.modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 18px; }
.modal-box { background: #fff; border-radius: 10px; width: 560px; max-width: 100%; max-height: 90vh; display: flex; flex-direction: column; box-shadow: 0 24px 64px rgba(0,0,0,.22); }
.modal-box.modal-sm { width: 420px; }
.modal-box.modal-lg { width: 760px; }
.modal-box.modal-xl { width: 1080px; max-width: 100%; }
.modal-box.modal-xxl { width: 1320px; max-width: 100%; }
.modal-box.modal-xxl .modal-body { padding: 22px 26px; }
.modal-box.modal-xl .form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.modal-box.modal-xl .form-grid.modal-xl-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* 全局弹窗底部按钮加大（所有尺寸的弹窗统一） */
.modal-box .modal-foot .btn-ghost,
.modal-box .modal-foot .btn-primary,
.modal-box .modal-foot .btn-danger { padding: 11px 32px; font-size: 15px; border-radius: 8px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); }
.modal-title { font-size: 14.5px; font-weight: 600; }
.modal-x { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--sub); line-height: 1; }
.modal-body { padding: 18px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 9px; padding: 13px 18px; border-top: 1px solid var(--line-soft); }

/* ============ 表单 ============ */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 15px; }
.form-item { display: flex; flex-direction: column; gap: 5px; }
.form-item.full { grid-column: 1 / -1; }
.form-item label { font-size: 12px; color: var(--muted); }
.form-item input, .form-item select, .form-item textarea {
  padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-btn);
  font-size: 13px; font-family: inherit; color: var(--text); background: #fff;
}
.form-item input:focus, .form-item select:focus, .form-item textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.form-item textarea { resize: vertical; min-height: 62px; }
.form-item .hint { font-size: 11px; color: var(--sub); }
.required::after { content: " *"; color: var(--danger); }
.form-note { background: var(--primary-soft); border-left: 2px solid var(--primary); padding: 9px 12px; border-radius: 0 var(--radius-btn) var(--radius-btn) 0; font-size: 12px; color: var(--primary-d); margin-bottom: 14px; line-height: 1.6; }
.form-note.warn { background: var(--warn-soft); border-color: var(--warn); color: #B45309; }
.form-note.danger { background: var(--danger-soft); border-color: var(--danger); color: #B91C1C; }

/* ============ 明细编辑 ============ */
.item-rows { border: 1px solid var(--line); border-radius: var(--radius-btn); overflow: auto; }
.item-row { display: grid; grid-template-columns: 1.5fr 1fr .6fr .9fr .9fr 28px; gap: 6px; padding: 7px 8px; border-bottom: 1px solid var(--line-soft); align-items: center; }
.item-row.head { background: #FAFAFA; font-weight: 500; font-size: 11.5px; color: var(--muted); }
.item-row input { padding: 6px 8px; border: 1px solid var(--line); border-radius: 5px; font-size: 12.5px; width: 100%; font-family: inherit; }
.item-remove { background: none; border: none; color: var(--danger); cursor: pointer; font-size: 15px; }
.item-total { text-align: right; padding: 9px 12px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ============ 提示 ============ */
.toast { position: fixed; top: 66px; left: 50%; transform: translateX(-50%); background: var(--text); color: #fff; padding: 9px 20px; border-radius: var(--radius-btn); z-index: 100; font-size: 13px; box-shadow: 0 8px 24px rgba(0,0,0,.2); max-width: 70vw; }
.toast.ok { background: var(--ok); }
.toast.err { background: var(--danger); }

/* ============ 附件 / 签名 ============ */
.att-item { display: flex; align-items: center; gap: 10px; padding: 8px 11px; border: 1px solid var(--line-soft); border-radius: var(--radius-btn); margin-bottom: 7px; font-size: 12.5px; }
.att-thumb { width: 34px; height: 34px; border-radius: 5px; background: #F4F4F5; display: flex; align-items: center; justify-content: center; color: var(--sub); font-size: 15px; flex-shrink: 0; }
.att-name { flex: 1; word-break: break-all; }
.att-meta { color: var(--sub); font-size: 11.5px; }
.sign-box { border: 1.5px dashed var(--line); border-radius: var(--radius); min-height: 96px; display: flex; align-items: center; justify-content: center; background: #FCFCFD; margin-bottom: 10px; }
.sign-box-empty, .sign-box-done { cursor: pointer; transition: border-color .15s, background .15s; }
.sign-box-empty { border-color: var(--primary); background: var(--primary-soft); }
.sign-box-empty:hover { border-style: solid; background: #E8EEFC; }
.sign-box-done { border-style: solid; background: #fff; flex-direction: column; padding: 10px; }
.sign-box-done:hover { border-color: var(--primary); }
.sign-placeholder { font-size: 14px; color: var(--primary); font-weight: 500; }
.sign-meta { font-size: 12px; color: var(--ok); margin-top: 6px; }
.sign-box-done .sign-preview { margin: 0 0 4px; }
.sign-canvas { border: 1.5px dashed var(--line); border-radius: var(--radius); background: #fff; touch-action: none; cursor: crosshair; display: block; margin: 0 auto; }
.sign-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }

/* ============ 权限矩阵 ============ */
.perm-layout { display: flex; gap: 14px; align-items: flex-start; }
.perm-roles { flex: 0 0 168px; display: flex; flex-direction: column; gap: 5px; }
.perm-role { padding: 9px 13px; border: 1px solid var(--line); border-radius: var(--radius-btn); cursor: pointer; background: #fff; font-size: 13px; }
.perm-role.active { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); font-weight: 600; }
.perm-panel { flex: 1; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.perm-group { margin-bottom: 14px; }
.perm-group-title { font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 7px; padding-bottom: 5px; border-bottom: 1px dashed var(--line); }
.perm-items { display: flex; flex-wrap: wrap; gap: 7px; }
.perm-item { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line); border-radius: var(--radius-btn); background: #FAFAFA; font-size: 12.5px; cursor: pointer; }
.perm-item input { accent-color: var(--primary); }

/* ============ 生产：发货协同 ============ */
.gate-list { display: flex; flex-direction: column; gap: 8px; }
.gate { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-btn); border: 1px solid var(--line); font-size: 12.5px; }
.gate.ok { border-color: #A7F3D0; background: var(--ok-soft); }
.gate.wait { border-color: #FDE68A; background: var(--warn-soft); }
.gate-icon { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.gate.ok .gate-icon { background: var(--ok); color: #fff; }
.gate.wait .gate-icon { background: var(--warn); color: #fff; }
.gate-label { flex: 1; }
.gate-state { font-weight: 600; font-size: 12px; }
.gate.ok .gate-state { color: #047857; }
.gate.wait .gate-state { color: #B45309; }
/* 加宽弹窗内的关卡横向排布 */
.gate-list-h { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.gate-list-h .gate { flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px 14px; }
.gate-list-h .gate-icon { width: 24px; height: 24px; font-size: 12px; }
.gate-list-h .gate-label { flex: none; font-weight: 600; }
.gate-list-h .gate-state { font-size: 11.5px; }

/* ============ 工单详情 · 16 步流程状态摘要 ============ */
.pdlg-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.pdlg-head-stat { text-align: right; flex-shrink: 0; }
.pdlg-hs-num { font-size: 30px; font-weight: 800; line-height: 1; color: var(--primary); letter-spacing: -.5px; }
.pdlg-hs-num span { font-size: 15px; font-weight: 600; color: var(--sub); }
.pdlg-hs-lab { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.pstat { margin-top: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: linear-gradient(180deg, #FBFCFE 0%, #F6F8FB 100%); }
.pstat-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pstat-title { font-size: 13px; font-weight: 700; }
.pstat-cur { font-size: 12px; color: var(--primary-d); font-weight: 600; }
.pstat-bar { height: 8px; border-radius: 4px; background: var(--line-soft); overflow: hidden; margin: 10px 0 12px; }
.pstat-bar > i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--primary) 0%, #22D3EE 100%); transition: width .3s ease; }
.pstat-dots { display: flex; gap: 4px; flex-wrap: wrap; }
.fsdot { width: 100%; flex: 1 1 0; min-width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.fsdot.ok { background: var(--ok); }
.fsdot.now { background: var(--primary); }
.fsdot.todo { background: #E4E4E7; }
.pstat-legend { display: flex; align-items: center; gap: 16px; margin-top: 12px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.pstat-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.pstat-legend .fsdot { width: 9px; height: 9px; flex: none; }
.pstat-total { margin-left: auto; font-weight: 700; color: var(--text); }

/* ============ 进度条 ============ */
.bar { height: 7px; background: #F4F4F5; border-radius: 4px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--primary); border-radius: 4px; }
.bar > i.ok { background: var(--ok); }
.bar > i.warn { background: var(--warn); }
.bar > i.danger { background: var(--danger); }

/* ============ Tab ============ */
.tabs { display: flex; gap: 3px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tab { padding: 9px 16px; cursor: pointer; font-size: 13px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

/* ============ 响应式 ============ */
@media (max-width: 1180px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2-32 { grid-template-columns: 1fr; }
  .pflow-bar { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .menu-btn { display: block; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 60; transform: translateX(-100%); transition: transform .22s ease; width: 220px; }
  .sidebar.open { transform: translateX(0); }
  .content { padding: 14px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .topbar-search input { width: 130px; }
  .grid-2 { grid-template-columns: 1fr; }
}

/* ---------- 数据新鲜度提示 / 表单内说明 ---------- */
.auto-refresh-tip { color: var(--text-3, #8A8F99); font-size: 12px; margin-left: 8px; }
.form-tip { font-size: 11.5px; color: var(--text-3, #8A8F99); line-height: 1.6; }

/* ============================================================
   订单流程导航（v2.2）
   解决「新建订单走流程看着蒙蔽」：把 6 个关卡、每关责任岗位、
   当前卡点、我能做的动作，全都显式画出来。
   ============================================================ */

/* 横向 6 关流程条（建单前的全貌预览 / 列表页复用） */
.flow-track { display: flex; align-items: stretch; gap: 0; margin: 0; padding: 0; list-style: none; }
.flow-node {
  flex: 1 1 0; min-width: 0; position: relative;
  padding: 10px 8px 10px 16px; background: #FAFAFA;
  border: 1px solid var(--line); border-right-width: 0;
  font-size: 12px; color: var(--sub);
}
.flow-node:first-child { border-radius: var(--radius-btn) 0 0 var(--radius-btn); padding-left: 12px; }
.flow-node:last-child { border-right-width: 1px; border-radius: 0 var(--radius-btn) var(--radius-btn) 0; }
.flow-node::after {
  content: ""; position: absolute; right: -9px; top: 50%; z-index: 2;
  width: 16px; height: 16px; margin-top: -8px;
  background: #FAFAFA; border-top: 1px solid var(--line); border-right: 1px solid var(--line);
  transform: rotate(45deg);
}
.flow-node:last-child::after { display: none; }
.flow-node.done { background: var(--ok-soft); border-color: #A7F3D0; color: #047857; }
.flow-node.done::after { background: var(--ok-soft); border-color: #A7F3D0; }
.flow-node.current {
  background: var(--primary-soft); border-color: #93C5FD; color: var(--primary-d);
  box-shadow: inset 0 -2px 0 var(--primary);
}
.flow-node.current::after { background: var(--primary-soft); border-color: #93C5FD; }
.flow-node-idx {
  display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px; border-radius: 50%; margin-right: 5px;
  background: var(--line); color: var(--sub); font-size: 10px; font-weight: 600;
  vertical-align: -2px;
}
.flow-node.done .flow-node-idx { background: var(--ok); color: #fff; }
.flow-node.current .flow-node-idx { background: var(--primary); color: #fff; }
.flow-node-name { font-weight: 600; font-size: 12.5px; }
.flow-node-owner { display: block; margin-top: 3px; font-size: 11px; opacity: .82; }

/* 当前关卡卡点（谁该做 / 卡在哪） */
.flow-now {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px; border-radius: var(--radius-btn);
  background: var(--primary-soft); border: 1px solid #BFDBFE;
}
.flow-now-ico {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700;
}
.flow-now-body { flex: 1 1 220px; min-width: 0; }
.flow-now-title { font-size: 12.5px; font-weight: 600; color: var(--primary-d); }
.flow-now-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; line-height: 1.5; }
.flow-now-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.flow-now-acts .btn { padding: 5px 12px; font-size: 12px; }

/* 列表页「下一步」单元格 */
.next-cell { display: flex; flex-direction: column; gap: 3px; }
.next-cell-main { font-size: 12.5px; color: var(--text); font-weight: 500; }
.next-cell-sub { font-size: 11px; color: var(--sub); line-height: 1.45; }
.next-cell-act { font-size: 11.5px; color: var(--primary-d); cursor: pointer; }
.next-cell-act:hover { text-decoration: underline; }
.next-cell.none { color: var(--sub); font-size: 12px; }

/* 表单分区标题（建单三段式） */
.form-sec {
  grid-column: 1 / -1; display: flex; align-items: baseline; gap: 8px;
  margin-top: 4px; padding-bottom: 6px; border-bottom: 1px solid var(--line-soft);
}
.form-sec:first-child { margin-top: 0; }
.form-sec-t { font-size: 12.5px; font-weight: 600; color: var(--text); }
/* 表单字段下方的一行小字说明（第 24 轮：新建耗材提示） */
.form-hint { font-size: 11.5px; color: var(--muted); line-height: 1.6; margin-top: 5px; }
.form-hint b { color: var(--primary-d); font-weight: 600; }
.form-sec-d { font-size: 11.5px; color: var(--sub); }

/* 详情页纵向流程轨（替代旧的 6 点 status-flow） */
.flow-rail { display: flex; flex-direction: column; }
.flow-rail-node { display: flex; gap: 10px; position: relative; padding-bottom: 14px; }
.flow-rail-node:last-child { padding-bottom: 0; }
.flow-rail-node::before {
  content: ""; position: absolute; left: 10px; top: 22px; bottom: 0;
  width: 2px; background: var(--line);
}
.flow-rail-node:last-child::before { display: none; }
.flow-rail-node.done::before { background: var(--ok); }
.flow-rail-dot {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; z-index: 1;
  background: var(--card); border: 2px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--sub); font-weight: 600;
}
.flow-rail-node.done .flow-rail-dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.flow-rail-node.current .flow-rail-dot {
  background: var(--primary); border-color: var(--primary); color: #fff;
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.flow-rail-body { flex: 1 1 auto; min-width: 0; padding-top: 1px; }
.flow-rail-title { font-size: 13px; font-weight: 600; color: var(--text); }
.flow-rail-node:not(.current):not(.done) .flow-rail-title { color: var(--sub); font-weight: 500; }
.flow-rail-meta { font-size: 11.5px; color: var(--sub); margin-top: 2px; line-height: 1.5; }
.flow-rail-block { font-size: 11.5px; color: #B45309; margin-top: 3px; }
.flow-rail-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.flow-rail-acts .btn { padding: 4px 11px; font-size: 11.5px; }

/* 建单成功后的行动卡 */
.flow-done-card {
  text-align: center; padding: 6px 0 2px;
}
.flow-done-ico {
  width: 40px; height: 40px; border-radius: 50%; margin: 0 auto 10px;
  background: var(--ok-soft); color: var(--ok);
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.flow-done-title { font-size: 15px; font-weight: 600; color: var(--text); }
.flow-done-no { font-size: 12px; color: var(--sub); margin-top: 3px; font-family: ui-monospace, monospace; }
.flow-done-next {
  margin: 14px 0 4px; padding: 12px; text-align: left;
  background: var(--primary-soft); border: 1px solid #BFDBFE; border-radius: var(--radius-btn);
}
.flow-done-next-t { font-size: 12.5px; font-weight: 600; color: var(--primary-d); margin-bottom: 7px; }
.flow-done-next-list { display: flex; flex-direction: column; gap: 5px; }
.flow-done-next-item { font-size: 12px; color: var(--muted); display: flex; gap: 7px; align-items: flex-start; }
.flow-done-next-item b { color: var(--text); font-weight: 600; }
.flow-done-next-idx {
  width: 16px; height: 16px; border-radius: 50%; background: #DBEAFE; color: var(--primary-d);
  font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
}

/* ============ 报价器会员管理（2026-10-25 新增） ============ */
/* 6 列统计卡（kpi-grid 默认 4 列，这里按会员统计需要扩展） */
.kpi-grid.kpi-grid-6 { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 1200px) { .kpi-grid.kpi-grid-6 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px)  { .kpi-grid.kpi-grid-6 { grid-template-columns: repeat(2, 1fr); } }

/* 筛选栏右侧说明文字 */
.filter-note { font-size: 12px; color: var(--muted); align-self: center; }

/* 表格单元格内的次要说明 */
.td-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* 弹窗内嵌表格（凭证查看 / 流水） */
.modal-body .table-wrap { max-height: 60vh; overflow-y: auto; }
.modal-body .table-wrap table { font-size: 12.5px; }

/* 文件选择框（会员申请材料上传） */
input[type="file"].file-input,
.file-input {
  width: 100%;
  padding: 8px 10px;
  font-size: 12.5px;
  font-family: inherit;
  border: 1px dashed var(--line);
  border-radius: var(--radius-btn);
  background: #FAFAFA;
  cursor: pointer;
}
.file-input::file-selector-button {
  margin-right: 10px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  background: #fff;
  font-family: inherit;
  font-size: 12px;
  color: var(--text);
  cursor: pointer;
}
