/* ============================================================
   生产管理系统 · 组件与布局样式
   严格还原设计稿：布局结构 / 配色 / 圆角 / 间距
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: var(--font-sans);
  font-size: var(--size-body);
  color: var(--text-primary);
  background: var(--bg-canvas);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }

/* ---------------- 应用骨架 ---------------- */
.app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ---------------- 侧边栏 ---------------- */
.sidebar {
  width: 220px;
  flex: 0 0 220px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-default);
  display: flex;
  flex-direction: column;
  padding: var(--space-4) 0;
  overflow: hidden;
}
.sidebar__brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0 var(--space-5) var(--space-5);
  flex: 0 0 auto;
}
.sidebar__logo {
  width: 64px; height: 64px;
  object-fit: contain;
  display: block;
  flex: 0 0 auto;
}
.sidebar__title { font-size: var(--size-h4); font-weight: 700; }
.sidebar__subtitle { font-size: var(--size-caption); color: var(--text-tertiary); }

.nav { display: flex; flex-direction: column; gap: 2px; padding: 0 var(--space-3) 30px; margin-top: var(--space-2); flex: 1 1 auto; overflow-y: auto; min-height: 0; }
.nav::-webkit-scrollbar { width: 6px; }
.nav::-webkit-scrollbar-thumb { background: var(--border-default); border-radius: 3px; }
.nav__group-label {
  font-size: var(--size-caption); color: var(--text-disabled);
  padding: var(--space-4) var(--space-3) var(--space-2);
  text-transform: uppercase; letter-spacing: .04em;
}
.nav__item {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3);
  border-radius: 10px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: var(--size-body);
  user-select: none;
  transition: background .15s, color .15s;
}
.nav__item:hover { background: var(--bg-subtle); color: var(--text-primary); }
.nav__item[data-navc]:hover { box-shadow: inset 0 0 0 999px rgba(0,0,0,.05); }
.nav__item.is-active { background: var(--brand-50) !important; color: var(--brand-600) !important; font-weight: 600; }
.nav__item svg { width: 18px; height: 18px; flex: 0 0 18px; }
.nav__badge {
  margin-left: auto; font-size: var(--size-caption);
  background: var(--brand-600); color: #fff; border-radius: var(--radius-pill);
  padding: 1px 8px; font-family: var(--font-num);
}

/* ---------------- 主区 ---------------- */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.topbar {
  height: 56px; flex: 0 0 56px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-default);
  display: flex; align-items: center; gap: var(--space-4);
  padding: 0 var(--space-6);
}
.topbar__title { font-size: var(--size-h4); font-weight: 700; }
.topbar__crumb { color: var(--text-tertiary); font-size: var(--size-sm); }
.topbar__spacer { flex: 1; }
.topbar__user { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.topbar__uname { font-size: 13px; color: var(--text-secondary); cursor: pointer; }
.topbar__logout { cursor: pointer; font-size: 13px; color: var(--text-tertiary); }
.topbar__logout:hover { color: var(--brand-600); }
.topbar__avatar {
  width: 32px; height: 32px; border-radius: var(--radius-pill);
  background: var(--brand-100); color: var(--brand-700);
  display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: var(--size-sm);
}

.content { flex: 1; display: flex; flex-direction: column; overflow: hidden; padding: var(--space-6); }
.content__head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: var(--space-5); }
.content__title { font-size: var(--size-h2); font-weight: 700; }
.content__desc { color: var(--text-tertiary); font-size: var(--size-sm); margin-top: var(--space-1); }

/* ---------------- KPI 卡 ---------------- */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); margin-bottom: var(--space-4); flex-shrink: 0; }
.kpi {
  background: var(--bg-surface); border: 1px solid var(--border-default);
  border-radius: var(--radius-md); padding: var(--space-5);
  display: flex; flex-direction: column; gap: var(--space-2);
}
.kpi__label { font-size: var(--size-sm); color: var(--text-tertiary); }
.kpi__value { font-size: 30px; font-weight: 700; font-family: var(--font-num); letter-spacing: -0.5px; }
.kpi__trend { font-size: var(--size-sm); font-family: var(--font-num); }
.kpi__trend.up { color: var(--success); }
.kpi__trend.down { color: var(--danger); }
/* V2.0.4 未完成加工单 KPI 卡：内嵌工序筛选 */
.kpi--wo-undone { border-color: var(--danger, #fecaca); background: linear-gradient(180deg, #fff5f5, var(--bg-surface)); }
.kpi--wo-undone .kpi__top { display: flex; align-items: center; justify-content: space-between; gap: 6px; width: 100%; }
.kpi--wo-undone .kpi__label { white-space: nowrap; }
.kpi--wo-undone .kpi__value { color: var(--danger, #dc2626); }
.kpi--wo-undone .kpi__sub { font-size: var(--size-caption); color: var(--text-tertiary); }
.kpi-mini-sel { width: auto; max-width: 118px; font-size: 11px; height: 24px; padding: 0 4px; border: 1px solid var(--border-default); border-radius: 6px; background: var(--bg-surface); color: var(--text-primary); cursor: pointer; }
/* V2.0.4 销售订单 KPI：大卡(总数/今日/当月) + 小卡(金额类) 同行两段布局 */
.kpi--big { }
.kpi--big .kpi__head { display: flex; align-items: center; justify-content: space-between; gap: 6px; width: 100%; }
.kpi--big .kpi__value { font-size: 34px; }
.kpi--compact { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--space-2); padding: var(--space-2) var(--space-3); }
.kpi--compact .kpi__label { white-space: nowrap; }
.kpi--compact .kpi__value { font-size: 20px; }
/* 报工记录：各工序报工数量 chips */
.proc-stat-row{display:flex;flex-wrap:wrap;gap:8px;}
.proc-stat-chip{display:inline-flex;align-items:center;gap:6px;padding:5px 12px;border:1px solid var(--border-default);border-radius:999px;background:var(--bg-surface);font-size:var(--size-sm)}
.proc-stat-chip b{font-family:var(--font-num);font-size:16px;color:var(--brand-600,#174fe0)}
.proc-stat-name{font-weight:600;color:var(--text-primary)}

/* ---------------- 筛选栏 ---------------- */
.toolbar {
  display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap;
  background: var(--bg-surface); border: 1px solid var(--border-default);
  border-radius: var(--radius-md); padding: var(--space-4);
  margin-bottom: var(--space-4); flex-shrink: 0;
}
.toolbar__spacer { flex: 1; }

/* ---------------- 输入 / 选择 ---------------- */
.input, .select {
  height: 36px; border: 1px solid var(--border-default); border-radius: var(--radius-sm);
  padding: 0 var(--space-3); font-size: var(--size-sm); color: var(--text-primary);
  background: var(--bg-surface); font-family: var(--font-sans); outline: none;
}
.input:focus, .select:focus { border-color: var(--brand-500); }
.input::placeholder { color: var(--text-disabled); }
.select { min-width: 140px; cursor: pointer; }

/* ---------------- 按钮 ---------------- */
.btn {
  height: 36px; padding: 0 var(--space-4); border-radius: var(--radius-sm);
  font-size: var(--size-sm); font-weight: 600; cursor: pointer; border: 1px solid transparent;
  display: inline-flex; align-items: center; gap: var(--space-2); font-family: var(--font-sans);
}
.btn--primary { background: var(--brand-600); color: #fff; }
.btn--primary:hover { background: var(--brand-700); }
.btn--secondary { background: var(--bg-surface); color: var(--text-primary); border-color: var(--border-default); }
.btn--secondary:hover { background: var(--bg-subtle); }
.btn--ghost { background: transparent; color: var(--text-secondary); }
.btn--ghost:hover { background: var(--bg-subtle); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--sm { height: 30px; padding: 0 var(--space-3); font-size: var(--size-caption); }
.btn--icon { padding: 0; width: 36px; justify-content: center; }

/* ---------------- 表格 ---------------- */
.card {
  background: var(--bg-surface); border: 1px solid var(--border-default);
  border-radius: var(--radius-lg); overflow: hidden;
}
/* 列表页表格：铺满剩余高度，表头固定、表体滚动 */
.card--fill { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.card--fill .table-wrap { flex: 1; min-height: 0; overflow: auto; }
.card--fill table { table-layout: auto; } /* 取消 fixed，让列宽按 JS 测量值自适应，避免长内容截断 */
.card--fill thead th { position: sticky; top: 0; background: var(--bg-subtle); z-index: 1; }
.card--fill .pagination { flex-shrink: 0; }
.table { min-width: 100%; width: max-content; border-collapse: collapse; font-size: var(--size-sm); }
.table thead th {
  text-align: left; padding: var(--space-3) var(--space-4);
  background: var(--bg-subtle); color: var(--text-secondary); font-weight: 600;
  border-bottom: 1px solid var(--border-default); white-space: nowrap;
  position: relative; /* 列宽拖拽手柄定位基准 */
}
.table tbody td {
  padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border-default);
  color: var(--text-primary); vertical-align: middle;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; /* 内容不换行，超长才省略 */
  max-width: 520px;
}
/* 列宽拖拽手柄 */
.col-resizer {
  position: absolute; right: -3px; top: 0; width: 7px; height: 100%;
  cursor: col-resize; z-index: 3; user-select: none;
}
.col-resizer:hover, .col-resizer.is-dragging { background: rgba(23,79,224,.25); }
body.col-resizing, body.col-resizing * { cursor: col-resize !important; user-select: none; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--gray-25); }
.table .col-num { font-family: var(--font-num); }
.cell-strong { font-weight: 600; }
.cell-muted { color: var(--text-tertiary); }

/* ---------------- 徽标 / 标签 ---------------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 10px; border-radius: var(--radius-pill);
  font-size: var(--size-caption); font-weight: 600; line-height: 1.6;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--success { color: var(--success); background: var(--success-bg); }
.badge--warning { color: var(--warning); background: var(--warning-bg); }
.badge--danger  { color: var(--danger);  background: var(--danger-bg); }
.badge--info    { color: var(--info);    background: var(--info-bg); }
.badge--neutral { color: var(--text-secondary); background: var(--bg-subtle); }
.tag {
  display: inline-flex; padding: 1px 8px; border-radius: var(--radius-sm);
  font-size: var(--size-caption); background: var(--bg-subtle); color: var(--text-secondary);
}

/* ---------------- 分页 ---------------- */
.pagination {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-3) var(--space-4); border-top: 1px solid var(--border-default);
  font-size: var(--size-sm); color: var(--text-tertiary);
}
.pagination__pages { display: flex; gap: 4px; }
.pagination__page {
  min-width: 28px; height: 28px; padding: 0 6px; border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  color: var(--text-secondary); font-family: var(--font-num);
}
.pagination__page:hover { background: var(--bg-subtle); }
.pagination__page.is-active { background: var(--brand-600); color: #fff; }
.pagination__page.is-disabled { color: var(--text-disabled); cursor: default; pointer-events: none; }

/* ---------------- 标签页 ---------------- */
.tabs { display: flex; gap: var(--space-5); border-bottom: 1px solid var(--border-default); margin-bottom: var(--space-5); }
.tab {
  padding: var(--space-3) 0; cursor: pointer; color: var(--text-secondary);
  border-bottom: 2px solid transparent; font-size: var(--size-body); font-weight: 500;
}
.tab.is-active { color: var(--brand-600); border-bottom-color: var(--brand-600); font-weight: 600; }

/* ---------------- 抽屉 / 弹窗 ---------------- */
.overlay {
  position: fixed; inset: 0; background: rgba(20,26,38,.5);
  display: none; align-items: center; justify-content: center; z-index: 50;
  padding: var(--space-6);
}
.overlay.is-open { display: flex; }
.drawer {
  width: 960px; max-width: 96vw; max-height: 90vh; background: var(--bg-surface);
  display: flex; flex-direction: column; box-shadow: var(--shadow-lg);
  border-radius: var(--radius-lg); overflow: hidden;
  animation: modalIn .2s ease;
}
@keyframes modalIn { from { transform: translateY(14px) scale(.98); opacity: .5; } to { transform: none; opacity: 1; } }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--border-default); background: var(--bg-subtle); }
.drawer__title { font-size: var(--size-h4); font-weight: 700; }
.drawer__body { flex: 1; overflow: auto; padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-4); min-height: 220px; }
.drawer__foot { display: flex; gap: var(--space-3); justify-content: flex-end; padding: var(--space-4) var(--space-5); border-top: 1px solid var(--border-default); background: var(--bg-surface); }

.section-title { font-size: var(--size-sm); font-weight: 600; color: var(--text-secondary); margin-bottom: var(--space-3); }
.field { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-4); }
.field > label { font-size: var(--size-sm); color: var(--text-secondary); }
.field .input, .field .select { width: 100%; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }

/* ---------------- 公式编辑器弹窗 ---------------- */
#tier-editor-overlay { z-index: 80; }
.tier-editor {
  width: 720px; max-width: 96vw; max-height: 88vh; background: var(--bg-surface);
  display: flex; flex-direction: column; box-shadow: var(--shadow-lg);
  border-radius: var(--radius-lg); overflow: hidden; animation: modalIn .2s ease;
}
.tier-editor__head { display: flex; align-items: center; justify-content: space-between; padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--border-default); background: var(--bg-subtle); font-weight: 700; }
.tier-editor__body { flex: 1; overflow: auto; padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); }
.tier-editor__foot { display: flex; gap: var(--space-3); justify-content: flex-end; padding: var(--space-4) var(--space-5); border-top: 1px solid var(--border-default); }
.tier-editor__hint { font-size: var(--size-caption); color: var(--text-tertiary); }
.tier-editor__section { font-size: var(--size-sm); font-weight: 600; color: var(--text-secondary); margin-top: var(--space-2); }
.tier-var { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-2); flex-wrap: wrap; }
.tier-var-desc { font-size: var(--size-caption); color: var(--text-tertiary); flex: 1; min-width: 220px; }
.tier-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.tier-chip { font-size: var(--size-sm); }
.tier-row { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-3); flex-wrap: wrap; }
.tier-label { width: 52px; font-size: var(--size-sm); color: var(--text-secondary); flex: 0 0 52px; }
.tier-min, .tier-max { width: 90px; flex: 0 0 90px; }
.tier-sep { font-size: var(--size-sm); color: var(--text-tertiary); }
.tier-formula { flex: 1; min-width: 210px; font-family: var(--font-mono); }
.tier-del { flex: 0 0 auto; }
.tier-err { font-size: var(--size-caption); color: var(--danger); min-width: 120px; }
.tier-preview { }
.tier-preview__head { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr 1fr 72px; gap: var(--space-2); margin-bottom: 2px; }
.tier-preview__head span { font-size: var(--size-caption); color: var(--text-tertiary); text-align: center; }
.tier-preview__row { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr 1fr auto; gap: var(--space-2); }
.tier-preview .input { width: 100%; }
.tier-try-result { font-size: var(--size-sm); color: var(--text-primary); margin-top: var(--space-2); }

/* ---------------- 自定义日期选择器 ---------------- */
.date-input-wrap { position: relative; }
.date-input-wrap .date-input { padding-right: 34px; cursor: pointer; }
.date-icon { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-tertiary); pointer-events: none; }
.date-picker {
  width: 300px; background: var(--bg-surface); border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.dp-head { display: flex; align-items: center; justify-content: space-between; padding: var(--space-3) var(--space-3); border-bottom: 1px solid var(--border-default); }
.dp-title { font-size: var(--size-sm); font-weight: 600; }
.dp-nav { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text-secondary); padding: 0 var(--space-2); }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; padding: var(--space-2); }
.dp-week span { text-align: center; font-size: var(--size-caption); color: var(--text-tertiary); padding: 4px 0; }
.dp-day { text-align: center; font-size: var(--size-sm); padding: 6px 0; cursor: pointer; border-radius: var(--radius-sm); }
.dp-day:hover { background: var(--gray-25); }
.dp-day.is-sel { background: var(--brand-600); color: #fff; font-weight: 600; }
.dp-empty { cursor: default; }

/* ---------------- 价格设置弹窗 ---------------- */
.ps-row { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-2); }
.ps-label { width: 110px; font-size: var(--size-sm); color: var(--text-secondary); flex: 0 0 110px; }
.ps-input { width: 110px; flex: 0 0 110px; }
.ps-sep { font-size: var(--size-caption); color: var(--text-tertiary); }

.h5-plan{color:var(--danger,#dc2626);font-weight:800;font-size:16px;line-height:1.2}
/* 加工单交货倒计时:逾期红 / 今明到期蓝(仅交期相关列背景) */
.due-over{background:#fee2e2;color:#dc2626!important;font-weight:700;border-radius:4px}
.due-soon{background:#dbeafe;color:#2563eb!important;font-weight:700;border-radius:4px}
/* ---------------- 步骤条 ---------------- */
.steps { display: flex; gap: var(--space-2); margin-bottom: var(--space-5); }
.step { flex: 1; display: flex; align-items: center; gap: var(--space-2); padding: var(--space-3); border-radius: var(--radius-md); background: var(--bg-subtle); font-size: var(--size-sm); color: var(--text-tertiary); }
.step.is-active { background: var(--brand-50); color: var(--brand-600); font-weight: 600; }
.step__dot { width: 22px; height: 22px; border-radius: 50%; background: var(--gray-300); color: #fff; display: flex; align-items: center; justify-content: center; font-size: var(--size-caption); font-family: var(--font-num); flex: 0 0 22px; }
.step.is-active .step__dot { background: var(--brand-600); }

/* ---------------- 矩阵表 (绩效规则) ---------------- */
.matrix-wrap { overflow: auto; border: 1px solid var(--border-default); border-radius: var(--radius-lg); }
.matrix { border-collapse: collapse; font-size: var(--size-sm); width: 100%; }
.matrix th, .matrix td { border: 1px solid var(--border-default); padding: var(--space-2) var(--space-3); text-align: center; white-space: nowrap; }
.matrix thead th { background: var(--bg-subtle); color: var(--text-secondary); font-weight: 600; }
.matrix tbody th { background: var(--bg-subtle); text-align: left; color: var(--text-primary); font-weight: 600; }
.matrix .price { font-family: var(--font-num); font-weight: 600; }

/* ---------------- H5 移动端 ---------------- */
.h5-frame {
  width: 390px; margin: var(--space-6) auto; background: var(--bg-surface);
  border: 1px solid var(--border-default); border-radius: 28px; overflow: hidden;
  box-shadow: var(--shadow-md); position: relative;
}
.h5-statusbar { height: 28px; display: flex; align-items: center; justify-content: space-between; padding: 0 var(--space-5); font-size: var(--size-caption); color: var(--text-secondary); }
.h5-screen { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); min-height: 600px; background: var(--bg-canvas); }
.h5-title { font-size: var(--size-h4); font-weight: 700; }
.h5-search { display: flex; align-items: center; gap: var(--space-2); background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-pill); padding: var(--space-3) var(--space-4); color: var(--text-tertiary); font-size: var(--size-sm); }
.h5-card { background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-md); padding: var(--space-4); }
.h5-card.is-selected { border-color: var(--brand-600); background: var(--brand-50); }
.h5-row { display: flex; justify-content: space-between; font-size: var(--size-sm); padding: var(--space-2) 0; }
.h5-btn { background: var(--brand-600); color: #fff; border: none; border-radius: var(--radius-sm); padding: var(--space-3); font-size: var(--size-body); font-weight: 600; cursor: pointer; font-family: var(--font-sans); }

/* ---------------- 杂项 ---------------- */
.row { display: flex; align-items: center; gap: var(--space-3); }
.muted { color: var(--text-tertiary); }
.page { display: none; }
.page.is-active { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.section-gap { margin-bottom: var(--space-6); }
.empty { text-align: center; color: var(--text-disabled); padding: var(--space-10); }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%);
  background: var(--text-primary); color: #fff; padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm); font-size: var(--size-sm); box-shadow: var(--shadow-lg);
  z-index: 100; animation: toastIn .2s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- 商品工序 / 加工单工序 标签 ---------- */
.steps-cell{display:flex;flex-wrap:wrap;gap:4px;cursor:pointer}
.step-tag{display:inline-flex;align-items:center;gap:4px;padding:3px 10px;border-radius:14px;background:var(--brand-50);color:var(--brand-600);font-size:var(--size-sm);border:1px solid var(--brand-100);white-space:nowrap}
.step-empty{color:var(--text-tertiary);font-size:var(--size-sm)}
.post-tag{display:inline-flex;align-items:center;padding:3px 10px;border-radius:14px;background:var(--gray-100);color:var(--text-secondary);font-size:var(--size-sm);border:1px solid var(--border-default);white-space:nowrap}
.step-tag-del{background:none;border:none;color:var(--brand-400);cursor:pointer;font-size:12px;line-height:1;padding:0}
.steps-cfg-chosen{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:var(--space-4);align-items:center}
.steps-cfg-pool{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.step-opt{display:flex;align-items:center;gap:6px;padding:8px 10px;border:1px solid var(--border-default);border-radius:var(--radius-md);cursor:pointer;font-size:var(--size-sm)}
.step-opt.is-chosen{border-color:var(--brand-500);background:var(--brand-50);color:var(--brand-600)}
.steps-cfg-tip{font-size:var(--size-caption);color:var(--text-tertiary);margin-top:var(--space-3)}

/* ---------- H5 报工 ---------- */
.h5-sub { font-size: var(--size-caption); color: var(--text-tertiary); margin-top: 4px; }
.h5-task { background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-md); padding: var(--space-3); margin-bottom: var(--space-3); }
.h5-link { color: var(--brand-600); font-size: var(--size-sm); cursor: pointer; }

/* ---------- 登录页 ---------- */
.login-wrap{display:grid;grid-template-columns:1fr 1fr;min-height:100vh;font-family:var(--font-sans);}
/* 左侧彩色渐变(占1/2) */
.login-brand{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;
  background:linear-gradient(180deg,#2CCC6F 0%,#3CCF47 12%,#98C921 22%,#FFB905 32%,#FFAF03 40%,#FD890A 48%,#F75F28 56%,#EC2A56 66%,#BA228F 82%,#605BCF 92%,#4375DE 100%);
  color:#fff;padding:40px;}
.login-brand__logo{width:140px;height:140px;object-fit:contain;background:#fff;border-radius:16px;padding:10px;box-shadow:0 12px 30px rgba(0,0,0,.20);}
.login-brand__title{font-size:30px;font-weight:800;letter-spacing:1px;text-shadow:0 2px 12px rgba(0,0,0,.15);margin:8px 0 0;text-align:center;}
.login-brand__sub{font-size:15px;opacity:.92;margin:0;text-align:center;}
/* 右侧: 背景光晕装饰 + 登录卡片 */
.login-right{position:relative;display:flex;align-items:center;justify-content:center;background:#ECEFF6;overflow:hidden;}
.login-glow{position:absolute;border-radius:50%;filter:blur(60px);opacity:.7;pointer-events:none;}
.login-glow--green{width:420px;height:420px;background:#C6E9D9;left:-40px;top:32%;}
.login-glow--blue{width:360px;height:360px;background:#C3D5F7;right:-30px;top:-20px;}
.login-glow--purple{width:400px;height:400px;background:#D2CFF0;right:-40px;bottom:-40px;}
.login-ring{position:absolute;right:-60px;bottom:-70px;width:300px;height:300px;border:1px solid rgba(156,162,175,.35);border-radius:50%;pointer-events:none;}
.login-ring::before{content:'';position:absolute;inset:28px;border:1px solid rgba(156,162,175,.28);border-radius:50%;}
.login-ring::after{content:'';position:absolute;inset:58px;border:1px solid rgba(156,162,175,.2);border-radius:50%;}
.login-card{position:relative;z-index:2;width:420px;max-width:90vw;background:#fff;border-radius:20px;padding:40px 36px;box-shadow:0 24px 70px rgba(20,26,38,.16);}
.login-title{font-size:24px;font-weight:800;color:var(--text-primary);margin-bottom:6px;}
.login-sub{font-size:14px;color:var(--text-tertiary);margin-bottom:24px;}
.login-card .field{margin-bottom:16px;}
.login-card .field label{display:block;font-size:13px;font-weight:600;color:var(--text-secondary);margin-bottom:6px;}
.login-card .input{width:100%;height:44px;border:1px solid var(--border-default);border-radius:8px;
  background:#F5F6FA;padding:0 14px;font-size:14px;color:var(--text-primary);transition:border-color .15s, background .15s;}
.login-card .input:focus{outline:none;border-color:var(--brand-500);background:#fff;}
.login-card .input::placeholder{color:#C0C4CC;}
.login-opt{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px;}
.login-rem{font-size:13px;color:var(--text-secondary);display:flex;align-items:center;gap:6px;cursor:pointer;}
.login-forgot{font-size:13px;color:var(--brand-500);cursor:pointer;}
.btn--login{height:50px;border:none;border-radius:8px;font-size:16px;font-weight:700;color:#fff;width:100%;display:flex;align-items:center;justify-content:center;text-align:center;letter-spacing:4px;
  background:linear-gradient(90deg,#3382F0,#584EDF);cursor:pointer;transition:opacity .15s;box-shadow:0 6px 16px rgba(51,90,240,.25);}
.btn--login:hover{opacity:.92;}
.login-div{display:flex;align-items:center;gap:12px;margin:22px 0 16px;color:var(--text-tertiary);font-size:12px;}
.login-div::before,.login-div::after{content:'';flex:1;height:1px;background:var(--border-default);}
.login-others{display:flex;justify-content:center;gap:18px;}
.login-input-wrap{position:relative;}
.login-input-wrap .input{padding-right:36px;}
.login-input-ico{position:absolute;right:12px;top:50%;transform:translateY(-50%);display:flex;align-items:center;color:#A8B0BD;pointer-events:none;}
#login-pwd{padding-right:64px;}
#login-pwd + .login-input-ico{right:38px;}
.login-input-eye{position:absolute;right:12px;top:50%;transform:translateY(-50%);display:flex;align-items:center;color:#A8B0BD;cursor:pointer;transition:color .15s;}
.login-input-eye:hover{color:#3382F0;}
.login-ico{width:44px;height:44px;border:1.5px solid rgba(156,162,175,.5);border-radius:50%;display:flex;align-items:center;justify-content:center;color:#9CA2AF;cursor:pointer;background:#fff;}
.login-ico:hover{border-color:#3382F0;color:#3382F0;}
.login-foot{text-align:center;font-size:12px;color:var(--text-disabled);margin-top:24px;}
/* ---- H5 移动端登录页(设计稿第2页) ---- */
.h5-login{position:relative;flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;padding:44px 20px 20px;background:linear-gradient(135deg,#EAF2FF 0%,#F5F7FC 35%,#FDF3F7 68%,#F3F0FB 100%);min-height:100vh;overflow:hidden;}
.h5-login-logo{width:96px;height:96px;object-fit:contain;background:transparent;border:none;padding:0;box-shadow:none;margin-top:12px;}
.login-h5-title{font-size:24px;font-weight:800;color:#1F2937;letter-spacing:1px;margin-top:14px;}
.login-h5-sub{font-size:14px;color:#8D95A0;margin-top:6px;}
.login-h5-card{width:100%;max-width:340px;background:#fff;border-radius:20px;padding:28px 24px;margin-top:32px;box-shadow:0 16px 40px rgba(20,26,38,.10);}
.login-field{position:relative;margin-bottom:16px;}
.login-field .input{width:100%;height:48px;border:1px solid transparent;border-radius:10px;background:#F5F6FA;
  padding:0 40px 0 14px;font-size:14px;color:var(--text-primary);}
.login-field .input:focus{outline:none;border-color:var(--brand-500);background:#fff;}
.login-field .input::placeholder{color:#C0C4CC;}
.login-ico-field{position:absolute;right:14px;top:50%;transform:translateY(-50%);display:flex;align-items:center;font-style:normal;color:#A8B0BD;pointer-events:none;}
#h5-pwd{padding-right:68px;}
#h5-pwd + .login-ico-field{right:40px;}
.login-field-eye{position:absolute;right:14px;top:50%;transform:translateY(-50%);display:flex;align-items:center;color:#A8B0BD;cursor:pointer;transition:color .15s;}
.login-field-eye:hover{color:#3382F0;}
.login-h5-card .login-opt{display:flex;align-items:center;justify-content:space-between;margin:14px 0 18px;}
.login-h5-card .login-rem{font-size:13px;color:var(--text-secondary);display:flex;align-items:center;gap:6px;cursor:pointer;}
.login-h5-card .login-forgot{font-size:13px;color:var(--brand-500);cursor:pointer;}
.login-h5-btn{height:50px;border:none;border-radius:10px;font-size:16px;font-weight:700;color:#fff;width:100%;display:flex;align-items:center;justify-content:center;text-align:center;letter-spacing:4px;
  background:linear-gradient(90deg,#3D77F5,#584EDF);cursor:pointer;box-shadow:0 6px 16px rgba(51,90,240,.22);}
.login-h5-div{display:flex;align-items:center;gap:12px;margin:22px 0 14px;color:var(--text-tertiary, #7A8599);font-size:12px;}
.login-h5-div::before,.login-h5-div::after{content:'';flex:1;height:1px;background:var(--border-default, #E3E8ED);}
.login-h5-others{display:flex;justify-content:center;gap:18px;margin-top:0;}
/* H5 社交图标与桌面端统一的空心圆(继承 .login-ico) */
.login-h5-foot{text-align:center;font-size:12px;color:#B0B5C0;margin-top:22px;}
/* H5 移动端背景光晕 */
.h5-glow{position:absolute;border-radius:50%;filter:blur(70px);opacity:.55;pointer-events:none;z-index:0;}
.h5-glow--tl{width:220px;height:220px;background:#B9CBFA;left:-60px;top:-30px;}
.h5-glow--tr{width:220px;height:220px;background:#BEE3E6;right:-60px;top:10px;}
.h5-glow--bl{width:240px;height:240px;background:#F2C6E0;left:-60px;bottom:10px;}
.h5-glow--br{width:220px;height:220px;background:#C6E9D9;right:-50px;bottom:30px;}
.h5-login-logo,.login-h5-title,.login-h5-sub,.login-h5-card,.login-h5-foot{position:relative;z-index:1;}
/* H5 卡片内社交图标: 实心彩色(设计稿) */
.login-h5-others /* H5 社交图标统一使用桌面端空心圆 .login-ico */



.h5-workhead{padding:8px 0 4px;}
.h5-scroll{flex:1;overflow:auto;min-height:0;}
.h5-menu-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:8px;}
.h5-menu{background:var(--bg-surface);border:1px solid var(--border-default);border-radius:14px;padding:14px 8px;text-align:center;cursor:pointer;}
.h5-menu-ic{font-size:24px;}
.h5-menu-lb{font-size:13px;color:var(--text-secondary);margin-top:6px;}
.h5-menu-num{font-size:12px;color:var(--brand-600);margin-top:2px;}
.h5-sec{font-size:13px;font-weight:600;color:var(--text-secondary);margin:14px 0 8px;}
.h5-tabbar{display:flex;border-top:1px solid var(--border-default);margin-top:8px;}
.h5-tab{flex:1;text-align:center;padding:10px 0;font-size:13px;color:var(--text-tertiary);cursor:pointer;}
.h5-tab.is-active{color:var(--brand-600);font-weight:600;}
.h5-btn-ghost{background:var(--bg-surface);color:var(--brand-600);border:1px solid var(--brand-600);}
.h5-attend-card{background:var(--bg-surface);border:1px solid var(--border-default);border-radius:16px;padding:24px;text-align:center;margin-top:12px;}
.h5-attend-name{font-size:18px;font-weight:700;}
.h5-attend-status{font-size:14px;color:var(--brand-600);margin-top:6px;}
.h5-attend-times{display:flex;justify-content:space-around;margin:18px 0;}
.h5-attend-times .l{display:block;font-size:12px;color:var(--text-tertiary);}
.h5-attend-times .v{display:block;font-size:20px;font-weight:700;margin-top:4px;}
.h5-wage{background:var(--bg-surface);border:1px solid var(--border-default);border-radius:16px;padding:24px;text-align:center;}
.h5-wage .v{font-size:30px;font-weight:700;color:var(--brand-600);}
.h5-wage .l{font-size:13px;color:var(--text-tertiary);margin-top:6px;}

/* 手机端 H5 全屏 */
body.h5-full{margin:0;background:var(--bg-canvas);}
body.h5-full .h5-frame{width:100vw;max-width:100vw;margin:0;border:none;border-radius:0;min-height:100vh;box-shadow:none;}
body.h5-full .h5-screen{min-height:calc(100vh - 28px);padding:16px;}
body.h5-full #h5-host{margin:0;}

/* ===== 真实 H5 全屏布局（覆盖旧模拟样式） ===== */
body.h5-full{background:var(--bg-canvas);}
#h5-host{height:100vh;display:flex;flex-direction:column;overflow:hidden;}
.h5-app{height:100vh;display:flex;flex-direction:column;overflow:hidden;background:var(--bg-canvas);}
.h5-screen{height:100vh;display:flex;flex-direction:column;overflow:hidden;padding:0;background:var(--bg-canvas);}
.h5-topbar{flex:none;display:flex;align-items:center;justify-content:space-between;padding:14px 16px;background:var(--bg-surface);border-bottom:1px solid var(--border-default);}
.h5-topbar .h5-title{font-size:17px;}
.h5-topbar .h5-sub{font-size:12px;margin-top:2px;}
.h5-logout{font-size:13px;color:var(--brand-600);padding:6px 10px;border:1px solid var(--brand-600);border-radius:8px;cursor:pointer;}
.h5-scroll{flex:1 1 0;overflow-y:auto;padding:14px 16px;min-height:0;}
.h5-tabbar{flex:none;display:flex;border-top:1px solid var(--border-default);background:var(--bg-surface);padding-bottom:env(safe-area-inset-bottom);}
.h5-tab{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:8px 0;font-size:11px;color:var(--text-tertiary);cursor:pointer;}
.h5-tab svg{width:22px;height:22px;}
.h5-tab.is-active{color:var(--brand-600);}
.h5-tab.is-active svg{color:var(--brand-600);}
.h5-menu-ic svg{width:26px;height:26px;color:var(--brand-600);}
.h5-menu{display:flex;flex-direction:column;align-items:center;gap:6px;}
.h5-login{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:0 28px;}
.h5-login-logo svg{width:46px;height:46px;color:var(--brand-600);}
.h5-login .h5-title{margin-top:10px;}
.h5-login .h5-sub{margin-top:6px;}
.h5-login .h5-btn{width:100%;}
.h5-btn{display:block;width:100%;padding:12px;border-radius:10px;background:var(--brand-600);color:#fff;border:none;font-size:15px;font-weight:600;cursor:pointer;text-align:center;}
.h5-btn-ghost{background:var(--bg-surface);color:var(--brand-600);border:1px solid var(--brand-600);}

/* H5 任务详情行 + 进度条 */
.h5-task-line{display:flex;font-size:13px;color:var(--text-secondary);margin-top:4px;}
.h5-task-line .lb{flex:none;width:44px;color:var(--text-tertiary);}
.h5-progress{position:relative;margin-top:8px;height:8px;background:var(--gray-100);border-radius:4px;overflow:hidden;}
.h5-progress-bar{height:100%;background:var(--brand-600);border-radius:4px;}
.h5-progress-txt{position:absolute;right:0;top:-16px;font-size:11px;color:var(--brand-600);}

/* H5 任务搜索框 */
.h5-search{background:var(--bg-surface);border:1px solid var(--border-default);border-radius:10px;padding:2px 12px;}
.h5-search-input{width:100%;border:none;outline:none;background:transparent;font-size:14px;padding:10px 0;}
.h5-search-input::placeholder{color:var(--text-tertiary);}

/* H5 搜索按钮 */
.h5-search{display:flex;align-items:center;gap:8px;}
.h5-search-btn{flex:none;padding:8px 14px;background:var(--brand-600);color:#fff;border:none;border-radius:8px;font-size:14px;cursor:pointer;}

/* 移动端：禁缩放 */
body.h5-full, html.is-mobile body { touch-action: manipulation; -webkit-text-size-adjust: 100%; }

/* 圆形进度环（加工单商品工序） */
.circ-prog{position:relative;display:inline-block;width:62px;height:62px;}
.circ-prog-txt{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-weight:700;font-size:14px;color:var(--text-primary);}
.circ-prog-label{position:absolute;bottom:-2px;left:50%;transform:translateX(-50%);font-size:11px;color:var(--text-tertiary);white-space:nowrap;}

/* 加工单商品工序：每个工序一圈(内显百分比) + 工序名 + 完成/总需 */
.circ-steps{display:flex;flex-wrap:nowrap;gap:6px;justify-content:flex-start;}
.circ-step{display:flex;flex-direction:column;align-items:center;gap:3px;position:relative;min-width:44px;flex:0 0 auto;}
.circ-dot{width:14px;height:14px;border-radius:50%;display:inline-block;}
/* V3.4.4 工序圆圈:环形进度(按完成比例填充) + 圈内完成百分比,颜色=状态(绿已完成/橙进行中/灰未开始) */
.circ-ring{position:relative;width:38px;height:38px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:conic-gradient(var(--ring-c,#94a3b8) calc(var(--pct,0)*1%), #e9eef3 0);transition:all .15s;}
.circ-ring::before{content:'';position:absolute;inset:4px;border-radius:50%;background:#fff;}
.circ-ring__pct{position:relative;z-index:1;font-size:11px;font-weight:700;color:#475569;line-height:1;transform:scale(.92);}
.circ-step.is-doing .circ-ring{box-shadow:0 0 0 3px rgba(245,158,11,.13);}
.circ-step.is-doing .circ-ring__pct{color:#b45309;}
.circ-step.is-done .circ-ring__pct{color:#15803d;}
.circ-step-name{font-size:11px;color:var(--text-secondary);text-align:center;white-space:nowrap;max-width:64px;overflow:hidden;text-overflow:ellipsis;}
.circ-step-info{font-size:10px;color:var(--text-tertiary);white-space:nowrap;transform:scale(.95);}
.circ-step.is-done .circ-step-info{color:#16a34a;}
.circ-step.is-doing .circ-step-info{color:#b45309;}
.steps-legend__hint{color:#94a3b8;font-size:11px;margin-left:4px;}
/* V3.4.4 H5 工序汇总条 */
.h5-wo-summary{display:flex;flex-wrap:wrap;gap:6px 14px;margin:6px 0 2px;padding:9px 12px;background:#f8fafc;border:1px solid #eef2f6;border-radius:9px;font-size:12.5px;color:#475569;}
.h5-wo-summary b{color:#0f172a;}
.h5-wo-summary .ok{color:#16a34a;}
.h5-wo-summary .warn{color:#d97706;}
/* 移动端工序圆圈更紧凑 */
.h5-cust-main .circ-steps,.h5-main .circ-steps{gap:12px 4px;}
@media (max-width:560px){ .circ-ring{width:34px;height:34px;} .circ-ring__pct{font-size:10px;} .circ-step{min-width:40px;} }
/* ===== V1.3.3 加工单：工序状态图例 + 悬停生产详情 ===== */
.steps-legend{display:flex;align-items:center;flex-wrap:wrap;gap:4px 14px;padding:8px 14px;margin-bottom:12px;background:#fff;border:1px solid #e2e8f0;border-radius:10px;font-size:12px;color:#475569;}
.steps-legend__title{font-weight:700;color:#0f172a;margin-right:4px;}
.steps-legend__item{display:inline-flex;align-items:center;gap:5px;white-space:nowrap;}
.circ-step{position:relative;}
.circ-tip{position:absolute;bottom:calc(100% + 8px);left:50%;transform:translateX(-50%);display:none;min-width:210px;max-width:280px;background:#0f172a;color:#f1f5f9;border-radius:8px;padding:8px 10px;font-size:11px;line-height:1.8;box-shadow:0 8px 20px rgba(2,6,23,.35);z-index:80;white-space:normal;text-align:left;}
.circ-step:hover .circ-tip{display:block;}
.circ-step:hover{z-index:90;}
/* V1.3.3 fix: 工序列单元格允许溢出，避免裁剪悬浮提示；空间不足时提示向下弹出 */
.table tbody td:has(.circ-steps){overflow:visible;}
.circ-tip--down{top:calc(100% + 8px);bottom:auto;}
.circ-tip__title{font-weight:700;font-size:12px;margin-bottom:2px;color:#fff;}
.circ-tip__line{white-space:nowrap;}
.circ-tip__muted{color:#94a3b8;}
.circ-tip__divider{height:1px;background:#334155;margin:4px 0;}
/* ===== V1.3.3 商品工序勾选选择器 ===== */
.steps-pick-grid{display:flex;flex-wrap:wrap;gap:8px;}
.steps-pick-opt{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border:1px solid var(--border-default);border-radius:8px;font-size:var(--size-sm);cursor:pointer;background:#fff;}
.steps-pick-opt:has(input:checked){border-color:var(--brand-500);background:var(--brand-50);color:var(--brand-700);}
/* ===== V1.3.3 绩效/后道规则弹窗选择器 ===== */
.pr-modal-grid{display:flex;flex-wrap:wrap;gap:8px;max-height:180px;overflow:auto;padding:2px;}
.pr-modal-opt{display:inline-flex;align-items:center;gap:5px;padding:5px 10px;border:1px solid var(--border-default);border-radius:8px;font-size:var(--size-sm);cursor:pointer;background:#fff;}
.pr-modal-opt:has(input:checked){border-color:var(--brand-500);background:var(--brand-50);color:var(--brand-700);}
/* ===== V1.3.3 工序绩效 · 按人员批量配置 ===== */
.pf-batch-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;max-height:340px;overflow:auto;padding:2px;}
.pf-batch-row{display:flex;align-items:center;gap:8px;padding:7px 10px;border:1px solid var(--border-default);border-radius:8px;background:#fff;}
.pf-batch-row.is-on{border-color:var(--brand-500);background:var(--brand-50);}
.pf-batch-check{display:inline-flex;align-items:center;gap:6px;font-size:var(--size-sm);white-space:nowrap;flex:0 0 auto;}
.pf-batch-price{width:120px;margin-left:auto;}
/* ===== V1.3.3 工序绩效 · 人员行编辑（工序下拉） ===== */
.pf-line-row{display:flex;align-items:center;gap:8px;padding:6px 0;}
.pf-line-price{width:160px;}
/* ===== V1.3.3 后道绩效新增弹窗：下拉 + 已选集合 + 自定义后道 ===== */
.prm-sel-box{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px;min-height:26px;align-items:center;}
.prm-chip{display:inline-flex;align-items:center;gap:4px;padding:3px 8px 3px 10px;border-radius:14px;background:var(--brand-50);color:var(--brand-700);font-size:var(--size-sm);border:1px solid var(--brand-100);white-space:nowrap;}
.prm-chip-x{background:none;border:none;color:var(--brand-400);cursor:pointer;font-size:12px;line-height:1;padding:0;}
/* ===== V1.3.3 新增后道 · 二级弹窗 ===== */
.overlay--sub{z-index:80;background:rgba(15,20,34,.45);}
.post-name-modal{width:420px;max-width:92vw;background:#fff;border-radius:14px;overflow:hidden;box-shadow:0 18px 50px rgba(2,6,23,.3);animation:modalIn .18s ease;}
.post-name-modal__head{font-weight:700;font-size:15px;padding:14px 18px;border-bottom:1px solid var(--border-default);background:var(--bg-subtle);}
.post-name-modal__body{padding:16px 18px;}
.post-name-modal__foot{display:flex;justify-content:flex-end;gap:10px;padding:12px 18px;border-top:1px solid var(--border-default);}
/* ===== V1.3.3 后道绩效 · 后道行（独立单价） ===== */
.prm-post-row{display:flex;align-items:center;gap:8px;padding:5px 0;}


/* ===== V1.3.4 仓库模块：单据行 + 扫码 + H5 仓库 ===== */
.doc-line{display:flex;gap:8px;align-items:center;padding:6px 0;border-bottom:1px dashed var(--border-default);}
.doc-line-code{min-width:84px;}
.doc-line-name{flex:1;color:var(--text-secondary);font-size:var(--size-sm);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
/* H5 仓库 */
.h5-stock-tabs{display:flex;gap:6px;margin:6px 0 2px;}
.h5-stock-tab{flex:1;text-align:center;padding:8px 4px;font-size:13px;font-weight:600;border-radius:10px;background:rgba(148,163,184,.12);color:var(--text-secondary);cursor:pointer;}
.h5-stock-tab.is-active{background:var(--brand-600,#174fe0);color:#fff;}
.h5-stock-kpis{display:flex;gap:6px;margin-top:8px;}
.h5-stock-kpi{flex:1;background:#fff;border:1px solid var(--border-default);border-radius:10px;padding:8px 4px;text-align:center;}
.h5-stock-kpi b{display:block;font-size:16px;color:var(--brand-700,#174fe0);}
.h5-stock-kpi span{font-size:11px;color:var(--text-tertiary);}
.h5-stock-row{background:#fff;border:1px solid var(--border-default);border-radius:10px;padding:8px 10px;margin-bottom:6px;}
.h5-stock-line{display:flex;align-items:center;gap:8px;padding:6px 0;border-bottom:1px dashed var(--border-default);}
.h5-stock-del{color:var(--danger,#dc2626);font-size:12px;padding:4px 6px;flex:0 0 auto;}
.h5-scan-box{margin:10px 0 4px;padding:10px;background:var(--bg-subtle,#f6f7fb);border:1px dashed var(--border-default);border-radius:10px;}
/* V1.3.6 出入库选商品：扫码输入框 + 右侧摄像头扫码按钮 */
.h5-scan-row{display:flex;align-items:center;gap:8px;}
.h5-cam-btn{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:0 14px;height:40px;border:none;border-radius:10px;background:var(--brand-600,#174fe0);color:#fff;font-size:14px;font-weight:600;cursor:pointer;font-family:var(--font-sans);line-height:1;}
.h5-cam-btn:active{opacity:.85;}
.h5-cam-btn svg{flex:0 0 auto;}
/* H5 摄像头扫码全屏遮罩：相机实时识别 + 相册拍照兜底 */
.h5cam{position:fixed;inset:0;z-index:3000;background:#0b1020;display:flex;flex-direction:column;}
.h5cam__stage{flex:1;position:relative;overflow:hidden;background:#0b1020;}
.h5cam__stage video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;}
.h5cam__line{position:absolute;left:8%;right:8%;top:50%;height:2px;background:rgba(64,156,255,.95);box-shadow:0 0 14px rgba(94,140,250,.95);animation:h5camSweep 2.4s ease-in-out infinite;pointer-events:none;}
@keyframes h5camSweep{0%,100%{transform:translateY(-80px);opacity:.45}50%{transform:translateY(80px);opacity:1}}
.h5cam__tip{position:absolute;left:16px;right:16px;bottom:16px;text-align:center;color:#fff;font-size:13px;line-height:1.6;padding:10px 14px;background:rgba(2,6,23,.6);border-radius:10px;}
.h5cam__last{position:absolute;left:0;right:0;top:14px;text-align:center;color:#5eead4;font-size:14px;font-weight:600;text-shadow:0 1px 4px rgba(0,0,0,.7);pointer-events:none;}
.h5cam__bar{flex:none;display:flex;gap:12px;padding:14px 16px calc(14px + env(safe-area-inset-bottom));background:#0b1020;border-top:1px solid rgba(255,255,255,.08);}
.h5cam__btn{flex:1;padding:13px 0;border-radius:12px;border:1px solid rgba(255,255,255,.28);background:rgba(255,255,255,.1);color:#fff;font-size:15px;font-weight:600;cursor:pointer;font-family:var(--font-sans);}
.h5cam__btn--primary{background:var(--brand-600,#174fe0);border-color:var(--brand-600,#174fe0);}
.h5cam__btn:active{opacity:.85;}


/* ===== V1.3.4 单据商品选择弹窗（替代内联面板） ===== */
.doc-pick-modal{width:680px;max-width:94vw;}

/* ===== V2.0.1 商品工序按勾选顺序（chips） + 字典新增入口 ===== */
.step-order-wrap{display:flex;flex-direction:column;gap:4px}
.step-order-list{display:flex;flex-wrap:wrap;gap:6px;min-height:30px;padding:6px 8px;border:1px dashed var(--brand-200,#c7d7fe);border-radius:8px;background:var(--brand-50,#f2f6ff)}
.step-chip{display:inline-flex;align-items:center;gap:5px;background:#fff;border:1px solid var(--brand-300,#93b4fd);color:var(--brand-700,#0f3bbf);border-radius:14px;padding:2px 8px;font-size:13px;line-height:20px}
.step-chip b{display:inline-flex;align-items:center;justify-content:center;min-width:16px;height:16px;border-radius:50%;background:var(--brand-600,#174fe0);color:#fff;font-size:11px;padding:0 3px}
.step-chip i{font-style:normal;cursor:pointer;opacity:.55;padding:0 2px;font-weight:700}
.step-chip i:hover{opacity:1}
.step-chip .sc-x:hover{color:#dc2626}
.steps-pool{cursor:pointer;border:1px solid var(--line,#e2e8f0);background:#fff}
.steps-pool:hover{border-color:var(--brand-400,#4c7df9);color:var(--brand-600,#174fe0);background:var(--brand-50,#f2f6ff)}

/* ===== V2.0.1 菜单排序页 ===== */
.navmgr-group{margin-bottom:14px}
.navmgr-group-label{font-weight:700;color:var(--text-secondary,#475569);margin-bottom:6px;font-size:13px}
.navmgr-row{display:flex;align-items:center;gap:10px;padding:7px 10px;border:1px solid var(--line,#e2e8f0);border-radius:8px;margin-bottom:6px;background:#fff}
.navmgr-color{width:36px;height:26px;padding:0;border:1px solid var(--line,#e2e8f0);border-radius:6px;background:none;cursor:pointer;vertical-align:middle}
.navmgr-row.navmgr-dragging{opacity:.5}
.navmgr-row.navmgr-over{background:#eef4ff}
tr.navmgr-dragging{opacity:.5}
tr.navmgr-over{background:#eef4ff}
.navmgr-grip{color:#cbd5e1;cursor:grab;font-weight:700}
.navmgr-name{flex:1;font-weight:600}
.navmgr-ops button[disabled]{opacity:.4;cursor:not-allowed}

/* ===== V2.0.1 角色管理 ===== */
.role-card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:10px;margin-bottom:6px}
.role-card{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px 14px;border:1px solid var(--line,#e2e8f0);border-radius:10px;background:#fff}
.role-card__name{font-weight:700;font-size:15px}
.role-card__ops{flex:none}
.role-editor{width:min(720px,92vw);max-height:86vh;display:flex;flex-direction:column;background:#fff;border-radius:14px;overflow:hidden;box-shadow:0 18px 50px rgba(15,23,42,.25)}
.role-editor__head{display:flex;align-items:center;justify-content:space-between;padding:14px 18px;font-weight:700;border-bottom:1px solid var(--line,#e2e8f0)}
.role-editor__body{padding:14px 18px;overflow:auto;flex:1}
.role-editor__foot{display:flex;gap:8px;justify-content:flex-end;padding:12px 18px;border-top:1px solid var(--line,#e2e8f0)}
.badge--info{background:#e0f2fe;color:#0369a1}

/* ===== V2.0.2 菜单拖拽排序 ===== */
.navmgr-row{cursor:grab}
.navmgr-row.navmgr-dragging{opacity:.45;border-style:dashed}
.navmgr-row.navmgr-over{border-color:var(--brand-500,#2f6bff);background:var(--brand-50,#f2f6ff);box-shadow:0 0 0 1px var(--brand-500,#2f6bff)}

/* V2.1.9 combobox (input+datalist) */
.combo{min-width:0}
input.combo.flt-combo{width:130px}
input.combo.flt-combo + datalist{display:none}

/* ===== V2.4.0 印刷图片(销售订单/加工单/生产任务/H5) ===== */
.kd-thumbs{display:inline-flex;align-items:center;gap:4px;flex-wrap:nowrap;vertical-align:middle;max-width:100%}
.kd-thumb{width:34px;height:34px;object-fit:cover;border-radius:5px;border:1px solid var(--border-default,#e2e8f0);cursor:zoom-in;background:#fff;display:inline-block;flex:none;box-sizing:border-box}
.kd-thumb--sm{width:42px;height:42px}
.kd-thumb--lg{width:58px;height:58px;border-radius:7px}
.kd-thumbs .kd-thumb:hover{outline:2px solid var(--brand-400,#5e8cfa);outline-offset:0}
.kd-more{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:5px;background:var(--bg-subtle,#f0f2f5);color:var(--text-secondary,#596378);font-size:11px;font-weight:600;cursor:pointer;flex:none}
.kd-thumbs--form{gap:8px;flex-wrap:wrap}
.kd-form-img{position:relative;display:inline-block;line-height:0}
.kd-form-rm{position:absolute;top:-7px;right:-7px;width:19px;height:19px;border-radius:50%;background:var(--danger,#d92e21);color:#fff;font-size:10px;font-style:normal;line-height:19px;text-align:center;cursor:pointer;box-shadow:0 1px 4px rgba(15,23,42,.35);user-select:none}
.kd-form-rm:hover{background:#b91c1c}
.kd-empty{color:var(--text-tertiary,#7a8599);font-size:var(--size-sm,12px)}
/* 全屏放大查看(PC / H5 共用) */
.kd-viewer{position:fixed;inset:0;z-index:12000;display:none}
.kd-viewer.is-open{display:block}
.kd-viewer__mask{position:absolute;inset:0;background:rgba(8,12,20,.9)}
.kd-viewer__img{position:absolute;inset:0;margin:auto;max-width:94vw;max-height:90vh;object-fit:contain;border-radius:4px;box-shadow:0 12px 48px rgba(0,0,0,.55)}
.kd-viewer__close{position:absolute;top:12px;right:14px;width:38px;height:38px;border-radius:50%;border:none;background:rgba(255,255,255,.14);color:#fff;font-size:16px;cursor:pointer;z-index:2;line-height:1}
.kd-viewer__close:hover{background:rgba(255,255,255,.3)}
.kd-viewer__nav{position:absolute;top:50%;transform:translateY(-50%);width:44px;height:64px;border:none;border-radius:10px;background:rgba(255,255,255,.12);color:#fff;font-size:30px;cursor:pointer;z-index:2;line-height:1}
.kd-viewer__nav:hover{background:rgba(255,255,255,.3)}
.kd-viewer__prev{left:8px}
.kd-viewer__next{right:8px}
.kd-viewer__cnt{position:absolute;bottom:14px;left:50%;transform:translateX(-50%);color:#fff;background:rgba(15,23,42,.55);border-radius:999px;padding:4px 14px;font-size:13px;z-index:2}
@media (max-width:640px){
  .kd-viewer__nav{width:38px;height:56px;font-size:26px}
  .kd-thumb--sm{width:38px;height:38px}
}

/* V2.5.0 权限小问号 */
.perm-q{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;border-radius:50%;background:var(--border-default);color:var(--text-secondary);font-size:10px;font-weight:700;cursor:help;margin-left:4px;vertical-align:middle;line-height:1;user-select:none}.perm-q:hover{background:var(--brand-600);color:#fff}

/* ============ V2.6.0 拆分 KPI 大卡:左值 + 右商品明细(3张并排一行) ============ */
.kpi--split{display:flex;flex-direction:row;gap:0;padding:0;overflow:hidden;border-color:var(--border-default);min-width:0;}
.ksplit{display:flex;width:100%;min-height:0;}
.ksplit__lead{width:30%;min-width:96px;flex:0 0 auto;display:flex;flex-direction:column;gap:4px;padding:10px 12px;border-right:1px dashed var(--border-default);background:linear-gradient(180deg,var(--bg-surface),color-mix(in srgb,var(--brand-50,#eef4ff) 35%,var(--bg-surface)));justify-content:center;}
.ksplit__lead .kpi__head{display:flex;align-items:center;gap:5px;min-width:0;}
.ksplit__lead .kpi__label{font-size:12px;color:var(--text-secondary);font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.ksplit__lead .kpi__value{font-size:30px;font-weight:800;font-family:var(--font-num);letter-spacing:-.5px;color:var(--brand-700,#174fe0);line-height:1.05;}
.ksplit__lead-sub{margin-top:0;max-width:110px;}
.ksplit__lead-sub .kpi-mini-sel{max-width:100%;font-size:10px;height:20px;}
.kpi-q{display:inline-flex;align-items:center;justify-content:center;width:15px;height:15px;border-radius:50%;background:var(--brand-100,#dbe6ff);color:var(--brand-700,#174fe0);font-size:10px;font-weight:700;cursor:pointer;flex:0 0 auto;user-select:none;}
.kpi-q-wrap{position:relative;display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:50%;background:var(--brand-100,#dbe6ff);color:var(--brand-700,#174fe0);font-size:11px;font-weight:700;cursor:pointer;flex:0 0 auto;user-select:none;}
.kpi-q-wrap .kpi-q-tip{position:absolute;top:calc(100% + 6px);right:0;z-index:70;background:#0f172a;color:#f1f5f9;font-size:11px;line-height:1.5;padding:8px 10px;border-radius:8px;box-shadow:0 6px 18px rgba(15,23,42,.20);white-space:normal;width:220px;font-weight:400;opacity:0;visibility:hidden;transform:translateY(-4px);transition:opacity .15s,transform .15s,visibility .15s;pointer-events:none;}
.kpi-q-wrap:hover .kpi-q-tip,.kpi-q-wrap:focus .kpi-q-tip{opacity:1;visibility:visible;transform:translateY(0);}
.kpi-q-tip-global{position:fixed;z-index:9999;max-width:260px;background:#0f172a;color:#f1f5f9;font-size:12px;line-height:1.5;padding:8px 11px;border-radius:8px;box-shadow:0 8px 26px rgba(15,23,42,.28);white-space:normal;visibility:hidden;opacity:0;transition:opacity .12s;pointer-events:none;text-align:left;}


.kpi-q:hover{background:var(--brand-600,#174fe0);color:#fff;}
.kpi-tip{position:absolute;z-index:60;left:8px;right:8px;top:calc(100% + 4px);background:#0f172a;color:#f1f5f9;font-size:11px;line-height:1.5;padding:7px 9px;border-radius:8px;box-shadow:0 6px 18px rgba(15,23,42,.18);white-space:normal;}
.ksplit__body{flex:1;min-width:0;display:flex;flex-direction:column;padding:8px 10px;position:relative;}
.ksplit__thead{display:flex;justify-content:space-between;align-items:center;font-size:10px;color:var(--text-tertiary);padding:0 2px 4px;border-bottom:1px solid var(--border-default);margin-bottom:6px;font-weight:600;letter-spacing:.2px;}
.ksplit__grid{display:flex;flex-direction:column;gap:4px;flex:1;}
.ksplit__row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;flex:1;}
.ksplit__cell{display:flex;align-items:center;justify-content:space-between;gap:4px;background:var(--bg-surface);border:1px solid var(--border-default);border-radius:6px;padding:3px 7px;min-width:0;}
.ksplit__cell--empty{background:transparent;border-style:dashed;opacity:.5;}
.ksplit__p{font-size:11px;color:var(--text-secondary);font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.ksplit__v{font-size:14px;font-weight:700;font-family:var(--font-num);color:var(--brand-700,#174fe0);white-space:nowrap;}
.ksplit__cell--empty .ksplit__v{color:var(--text-tertiary);}
.kpi--wo-undone .ksplit__lead{background:linear-gradient(180deg,#fff5f5,var(--bg-surface));}
.kpi--wo-undone .ksplit__lead .kpi__value{color:var(--danger,#dc2626);}
.kpi--split{height:100%;}
/* V2.6.0 加工单状态卡:已完成卡独占整行、右侧一行平铺可换行 */
.kpi--wo-full{grid-column:1/-1;}
.ksplit__flow{display:flex;flex-wrap:wrap;gap:6px;align-content:flex-start;}
.ksplit__chip{display:inline-flex;align-items:center;justify-content:space-between;gap:10px;border:1px solid var(--border-default);border-radius:6px;padding:3px 10px;background:var(--bg-surface);min-width:90px;}
/* 金额小卡行 */
.kpi-money-row{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--space-4);}
/* V2.6.0 金额卡左右结构(左指标名右金额),高度约为拆分卡一半 */
.kpi--hbar{flex-direction:row;align-items:center;justify-content:space-between;gap:var(--space-2);padding:6px 14px;min-height:64px;border-color:var(--border-default);}
.kpi--hbar .kpi__label{white-space:nowrap;font-size:var(--size-sm);color:var(--text-secondary);font-weight:600;}
.kpi--hbar .kpi__value{font-size:22px;letter-spacing:-.3px;}
@media (max-width:1280px){
  .ksplit__lead{width:34%;}
}
@media (max-width:1100px){
  .kpi--split{flex-direction:column;}
  .ksplit__lead{width:100%;min-width:0;flex-direction:row;align-items:center;justify-content:space-between;border-right:none;border-bottom:1px dashed var(--border-default);}
  .ksplit__lead .kpi__head,.ksplit__lead .kpi__value{flex:0 0 auto;}
}

/* ---------------- V2.7.0 page-summary bar (above pagination, outside scroll area) ---------------- */
.sum-bar{display:flex;align-items:center;flex-wrap:wrap;gap:4px 22px;padding:8px 16px;border-top:1px solid var(--border-default);background:var(--bg-subtle);font-size:var(--size-sm);color:var(--text-secondary);flex-shrink:0;}
.sum-bar__label{font-weight:600;color:var(--text-secondary);margin-right:2px;}
.sum-bar__item{display:inline-flex;align-items:baseline;gap:6px;}
.sum-bar__name{color:var(--text-tertiary);font-size:var(--size-caption);}
.sum-bar__val{font-family:var(--font-num);font-weight:700;color:var(--text-primary);}
/* V2.7.0 sticky thead fix: .table thead th{position:relative} (drag handle base) overrides old sticky rule, re-declare with higher specificity so header freezes while scrolling inside .card--fill .table-wrap */
.card--fill .table-wrap thead th{position:sticky;top:0;z-index:3;background:var(--bg-subtle);}
/* ---------------- V2.7.0 Excel-like column header filter & frozen columns ---------------- */
/* 表头筛选/排序指示 */
.th-flt{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;margin-right:4px;font-size:9px;color:#fff;background:var(--brand-600);border-radius:3px;vertical-align:middle;}
.th-arr{display:inline-flex;align-items:center;justify-content:center;margin-left:4px;font-size:10px;color:var(--text-tertiary);opacity:.55;vertical-align:middle;}
.th-arr--on{opacity:1;color:var(--brand-600);}
/* 列头点击打开浮层:阻止列宽拖拽手柄触发 */
th[data-c]{cursor:pointer;}
th[data-c] .col-resizer{cursor:col-resize;}

/* 列筛选浮层 */
.colflt-pop{position:fixed;z-index:1200;min-width:240px;max-width:320px;background:var(--bg-surface);border:1px solid var(--border-default);border-radius:var(--radius-md);box-shadow:0 8px 28px rgba(20,26,38,.16);font-size:var(--size-sm);}
.colflt-pop__head{display:flex;align-items:center;gap:8px;padding:8px 12px;border-bottom:1px solid var(--border-default);font-weight:600;}
.colflt-pop__head b{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.colflt-pop__x{cursor:pointer;color:var(--text-tertiary);padding:2px 4px;border-radius:4px;}
.colflt-pop__x:hover{background:var(--bg-subtle);color:var(--text-primary);}
.colflt-pop__body{max-height:60vh;overflow:auto;padding:8px 12px 12px;}
.cf-chip{font-size:10px;color:var(--brand-600);background:var(--brand-50);border:1px solid var(--brand-100);border-radius:10px;padding:0 6px;}
.cf-sect{margin-top:10px;}
.cf-sect:first-child{margin-top:0;}
.cf-sect-l{font-size:11px;color:var(--text-tertiary);margin-bottom:6px;display:flex;align-items:center;gap:8px;}
.cf-sect-head{display:flex;align-items:center;gap:8px;}
.cf-sect-head .cf-sect-l{flex:1;margin-bottom:0;}
.cf-link{cursor:pointer;color:var(--brand-600);font-size:11px;}
.cf-sort{display:flex;gap:6px;flex-wrap:wrap;}
.cf-sortbtn{cursor:pointer;border:1px solid var(--border-default);border-radius:6px;padding:3px 8px;font-size:12px;color:var(--text-secondary);}
.cf-sortbtn.is-on{background:var(--brand-50);border-color:var(--brand-300);color:var(--brand-600);font-weight:600;}
.cf-vals{display:flex;flex-direction:column;gap:2px;max-height:180px;overflow:auto;border:1px solid var(--border-default);border-radius:6px;padding:4px;}
.cf-val{display:flex;align-items:center;gap:6px;padding:2px 4px;border-radius:4px;cursor:pointer;font-size:12px;}
.cf-val:hover{background:var(--bg-subtle);}
.cf-val input{accent-color:var(--brand-600);}
.cf-numrow{display:flex;align-items:center;gap:6px;}
.cf-numrow .cf-num{flex:1;min-width:0;}
.cf-actions{display:flex;gap:6px;margin-top:8px;justify-content:flex-end;}
.cf-actions .btn{margin:0;}

/* 冻结列:sticky + 不透明底 + 分隔阴影 */
.table .is-frozen{position:sticky;background:var(--bg-surface);}
.table .is-frozen--l{box-shadow:1px 0 0 var(--border-default);}
.table .is-frozen--r{box-shadow:-1px 0 0 var(--border-default);}
.table thead .is-frozen{background:var(--bg-subtle);}
.table tbody tr:hover .is-frozen{background:var(--bg-surface);}
.table tbody tr:hover .is-frozen--l,.table tbody tr:hover .is-frozen--r{background:var(--gray-25);}

/* ============================================================
   V3.0.0 工作台 (登录默认落地页 · 数据大屏下方)
   复用 tokens 变量,风格与业务模块一致
   ============================================================ */
.wb { flex: 1; min-height: 0; overflow-y: auto; padding-right: 2px; }
.wb-hello { display: flex; align-items: center; gap: 14px; background: linear-gradient(120deg, #0F338F, #3369F2 78%, #5E8CFA); color: #fff; border-radius: var(--radius-lg); padding: 16px 20px; margin-bottom: 14px; box-shadow: var(--shadow-sm); }
.wb-hello__av { width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.22); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; flex: 0 0 auto; border: 2px solid rgba(255,255,255,.45); }
.wb-hello__hi { font-size: 19px; font-weight: 700; }
.wb-hello__sub { font-size: 12.5px; opacity: .92; margin-top: 3px; display: flex; flex-wrap: wrap; gap: 4px; }
.wb-hello__sum { margin-left: auto; text-align: right; font-size: 12.5px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); padding: 6px 14px; border-radius: var(--radius-pill); max-width: 46%; line-height: 1.5; }
@media (max-width: 900px){ .wb-hello__sum { display: none; } }
.wb-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(196px, 1fr)); gap: 10px; margin-bottom: 14px; }
.wb-kpi { background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-lg); padding: 12px 14px; cursor: pointer; transition: .15s; box-shadow: 0 1px 2px rgba(20,26,38,.03); }
.wb-kpi:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); border-color: var(--brand-300); }
.wb-kpi__t { font-size: 12px; color: var(--text-tertiary); display: flex; justify-content: space-between; align-items: center; }
.wb-kpi__ic { width: 24px; height: 24px; border-radius: 7px; background: color-mix(in srgb, var(--acc) 12%, #fff); color: var(--acc); display: flex; align-items: center; justify-content: center; font-size: 13px; }
.wb-kpi__v { font-size: 25px; font-weight: 800; font-family: var(--font-num); margin-top: 2px; color: var(--acc); font-variant-numeric: tabular-nums; }
.wb-kpi__v small { font-size: 11.5px; color: var(--text-tertiary); font-weight: 500; }
.wb-kpi__d { font-size: 11px; color: var(--text-tertiary); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wb-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 14px; align-items: start; }
@media (max-width: 1100px){ .wb-grid { grid-template-columns: 1fr; } }
.wb-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.wb-card { background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-lg); padding: 13px 15px; box-shadow: 0 1px 2px rgba(20,26,38,.03); }
.wb-card__h { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; margin-bottom: 10px; }
.wb-card__h b { font-size: 13.5px; }
.wb-card__h .muted { font-size: 12px; }
.wb-todos { display: flex; flex-direction: column; gap: 8px; }
.wb-todo { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border-default); border-radius: 10px; padding: 8px 10px; cursor: pointer; background: #fff; transition: .12s; }
.wb-todo:hover { border-color: var(--brand-300); background: var(--brand-50); }
.wb-todo__id { font-weight: 700; font-size: 12.5px; color: var(--brand-600); white-space: nowrap; width: 118px; overflow: hidden; text-overflow: ellipsis; }
.wb-todo__nm { flex: 1; min-width: 0; }
.wb-todo__nm b { display: block; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wb-todo__nm span { font-size: 11px; color: var(--text-tertiary); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wb-todo__pg { width: 110px; display: flex; align-items: center; gap: 6px; }
.wb-todo__pg .wb-prog { flex: 1; }
.wb-todo__pg > span { font-size: 11px; color: var(--text-secondary); width: 34px; text-align: right; font-variant-numeric: tabular-nums; }
.wb-prog { height: 6px; border-radius: 4px; background: #E9EDF3; overflow: hidden; }
.wb-prog i { display: block; height: 100%; border-radius: 4px; background: var(--brand-500); }
.wb-prog i.wb-prog--bad { background: var(--danger); }
.wb-pill { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; background: #F0F2F5; color: var(--text-secondary); white-space: nowrap; }
.wb-pill--bad { background: var(--danger-bg); color: var(--danger); }
.wb-pill--warn { background: var(--warning-bg); color: var(--warning); }
.wb-pill--ok { background: var(--success-bg); color: var(--success); }
.wb-alert { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 9px; margin-bottom: 7px; font-size: 12px; cursor: pointer; border: 1px solid transparent; }
.wb-alert:hover { filter: brightness(.98); }
.wb-alert b { display: block; font-size: 12.5px; }
.wb-alert .muted { font-size: 11px; }
.wb-alert--bad { background: var(--danger-bg); border-color: #F5CCC7; color: #8c241c; }
.wb-alert--warn { background: var(--warning-bg); border-color: #F2E2BE; color: #7a4d00; }
.wb-alert .wb-go { margin-left: auto; font-size: 11.5px; white-space: nowrap; font-weight: 600; }
.wb-ok-line { text-align: center; color: var(--success); padding: 10px; font-size: 13px; }
.wb-mini { width: 100%; border-collapse: collapse; font-size: 12px; }
.wb-mini td { padding: 6px 4px; border-bottom: 1px dashed #EEF1F5; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wb-mini tr:last-child td { border-bottom: none; }
.wb-mini tr:hover td { background: var(--brand-50); }
.wb-mini td.wb-ord { color: var(--brand-600); font-weight: 700; }
.wb-mini td.wb-dim { color: var(--text-tertiary); max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.wb-mini td.wb-num { text-align: right; font-variant-numeric: tabular-nums; }
.wb-mini td.wb-num b { color: var(--text-primary); }
.wb-sal { display: flex; align-items: center; gap: 12px; }
.wb-sal__v { font-size: 22px; font-weight: 800; font-family: var(--font-num); color: var(--success); }
.wb-sal__m { font-size: 11.5px; color: var(--text-tertiary); }
.wb-sal__go { margin-left: auto; font-size: 12px; color: var(--brand-600); cursor: pointer; white-space: nowrap; }
.wb-bar { height: 118px; display: flex; align-items: flex-end; gap: 8px; padding-top: 4px; }
.wb-bar__c { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; cursor: pointer; font-size: 10.5px; color: var(--text-tertiary); }
.wb-bar__c i { width: 100%; max-width: 34px; border-radius: 4px 4px 0 0; background: #DCE6FA; display: block; transition: .12s; }
.wb-bar__c:hover i { background: var(--brand-400); }
.wb-bar__c--today i { background: var(--brand-600); }
.wb-bar__c em { font-style: normal; font-weight: 700; font-family: var(--font-num); color: var(--text-secondary); }
.wb-hbars { display: flex; flex-direction: column; gap: 7px; }
.wb-hbar { display: flex; align-items: center; gap: 9px; cursor: pointer; font-size: 12px; }
.wb-hbar__l { width: 92px; text-align: right; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wb-hbar__t { flex: 1; height: 16px; background: #EEF1F5; border-radius: 8px; overflow: hidden; }
.wb-hbar__t i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, #3369F2, #5E8CFA); }
.wb-hbar em { font-style: normal; font-weight: 700; width: 34px; text-align: left; font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.wb-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; }
.wb-tile { background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-lg); padding: 13px 8px; text-align: center; cursor: pointer; transition: .15s; }
.wb-tile:hover { border-color: var(--brand-500); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.wb-tile__em { font-size: 21px; }
.wb-tile b { display: block; font-size: 12.5px; margin-top: 4px; font-weight: 600; color: var(--text-primary); }
.wb-empty { text-align: center; color: var(--text-tertiary); padding: 22px 10px; }
.wb-empty__em { font-size: 30px; }
.wb-empty p { font-size: 12.5px; margin: 6px 0 2px; color: var(--text-secondary); }


/* ============ V3.0.0b 工作台:SVG 图标 + 组件流自动铺满 ============ */
.wb-ico { width: 16px; height: 16px; flex: 0 0 auto; display: inline-block; vertical-align: -3px; }
.wb-card__h b { display: inline-flex; align-items: center; gap: 7px; }
.wb-card__h b .wb-ico { color: var(--brand-600); }
.wb-kpi__ic .wb-ico { width: 15px; height: 15px; }
.wb-tile .wb-tile__ic { width: 22px; height: 22px; color: var(--text-tertiary); margin: 0 auto 2px; display: block; }
.wb-tile:hover .wb-tile__ic { color: var(--brand-600); }
.wb-tile b { display: block; }
.wb-alert .wb-alert__ic { width: 24px; height: 24px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.wb-alert--bad .wb-alert__ic { background: rgba(217,46,33,.1); color: var(--danger); }
.wb-alert--warn .wb-alert__ic { background: rgba(217,148,0,.13); color: var(--warning); }
.wb-alert:not(.wb-alert--bad):not(.wb-alert--warn) .wb-alert__ic { background: var(--brand-50); color: var(--brand-600); }
.wb-alert__ic .wb-ico { width: 14px; height: 14px; }
.wb-ok-line { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--success); padding: 12px 10px; font-size: 13px; }
.wb-ok-line .wb-ico { color: var(--success); }
.wb-empty .wb-empty__em .wb-ico { width: 30px; height: 30px; color: var(--text-disabled); }
/* 组件流:flex 自动折行;宽卡 1.75fr / 窄卡 1fr;行末自动拉伸铺满,无横向空白 */
.wb-flow { display: flex; flex-wrap: wrap; gap: 14px; align-items: stretch; }
.wb-flow .wb-card { margin: 0; }
.wb-flow .wb-card--wide { flex: 1.75 1 520px; min-width: min(100%, 520px); }
.wb-flow .wb-card--narrow { flex: 1 1 300px; min-width: min(100%, 300px); }
.wb-gap { height: 14px; }
.wb-foot { font-size: 12px; text-align: center; }
.wb-link { cursor: pointer; white-space: nowrap; }

/* ==================== V3.1.0 改版样式 ==================== */
/* 快捷搜索框条(销售订单/加工单) */
.list-qf{display:inline-flex;align-items:center;gap:6px;flex-wrap:wrap;margin-left:2px;}
.list-qf .input{height:30px;font-size:var(--size-sm);}
/* 销售订单合并卡:时间段筛选条(V3.1.1 移入卡片左侧筛选列) */
.so-range{display:flex;align-items:center;gap:6px;flex-wrap:wrap;}
.so-range .btn--sm{padding:2px 10px;font-size:12px;height:26px;}
.so-range-date{width:126px;height:26px;padding:2px 6px;font-size:12px;}
/* 商品名多指标网格(合并卡右侧/今日新订单共用) */
.so-mgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:5px;}
.so-mgrid .ksplit__cell{justify-content:space-between;padding:4px 9px;}
.ksplit__unit{font-style:normal;font-size:10px;color:var(--text-tertiary);margin-right:1px;}
/* V3.1.1 销售合并卡:左侧=标题+时间段筛选+统计值(筛选条件放最左边,与加工单总览卡一致),右侧纯商品拆分 */
.kpi--so-merg .so-merg-lead{width:31%;min-width:252px;gap:5px;justify-content:flex-start;}
.kpi--so-merg .so-merg-lead .kpi__value{font-size:30px;margin-top:2px;}
.kpi--so-merg .so-merg-lead .kpi__sub{margin-top:-2px;}
.so-filter-label{font-size:12px;font-weight:600;color:var(--text-secondary);margin-top:2px;line-height:1.3;}
.kpi--so-merg .ksplit__body{padding:10px 12px;}
/* 加工单合并卡:左侧筛选条件列 */
.kpi--wo-merg .wo-merg-lead{width:32%;min-width:300px;gap:4px;justify-content:flex-start;padding:12px 14px;}
.kpi--wo-merg .wo-merg-lead .kpi__value{font-size:30px;line-height:1.05;margin-top:2px;}
.kpi--wo-merg .wo-merg-lead .kpi__sub{margin:-2px 0 2px;}
/* V3.1.1 视图横向胶囊切换(替代旧竖排大按钮) */
.wo-vseg{display:flex;gap:4px;margin:2px 0 6px;}
.wo-vseg__b{flex:1;min-width:0;display:inline-flex;align-items:center;justify-content:center;gap:5px;height:27px;border-radius:8px;border:1px solid var(--border-default);background:var(--bg-surface);color:var(--text-secondary);font-size:12px;font-weight:600;cursor:pointer;padding:0 6px;white-space:nowrap;transition:all .12s;}
.wo-vseg__b em{font-style:normal;font-size:10.5px;font-family:var(--font-num);color:var(--text-tertiary);}
.wo-vseg__b:hover{border-color:var(--brand-400);color:var(--brand-600);}
.wo-vseg__b.is-on{background:var(--brand-600,#174fe0);border-color:var(--brand-600);color:#fff;box-shadow:0 1px 3px rgba(23,79,224,.25);}
.wo-vseg__b.is-on em{color:rgba(255,255,255,.78);}
.wo-vseg__b.is-on:hover{color:#fff;}
/* V3.1.1 工序/交期并排下拉行 */
.wo-f-row{display:flex;gap:6px;margin:2px 0 0;}
.wo-f-row .select{flex:1;min-width:0;height:27px;font-size:12px;padding:2px 6px;}
.kpi--wo-merg .ksplit__lead .muted{line-height:1.2;}
/* 移动端(H5):任务/报工 工序名加大变红 */
.h5-proc{color:var(--danger,#dc2626);font-size:18px;font-weight:800;line-height:1.2;letter-spacing:.2px;}
/* 工作台:今日新订单按商品拆分宽卡 */
.wb-today{display:flex;align-items:stretch;gap:14px;cursor:pointer;}
.wb-today__lead{flex:0 0 172px;border-right:1px dashed var(--border-default);padding-right:14px;display:flex;flex-direction:column;justify-content:center;gap:4px;}
.wb-today__val{font-size:30px;font-weight:800;font-family:var(--font-num);color:var(--brand-700,#174fe0);line-height:1.05;}
.wb-today__val small{font-size:13px;font-weight:600;}
.wb-today__body{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:center;}
.wb-today__body .ksplit__thead{margin-bottom:6px;}
/* 工作台:柱状图点击 → 当日订单明细弹窗 */
.wb-modal{position:fixed;inset:0;background:rgba(15,23,42,.42);z-index:200;display:flex;align-items:center;justify-content:center;padding:18px;}
.wb-modal__box{background:var(--bg-surface);border-radius:var(--radius-lg);box-shadow:0 18px 50px rgba(15,23,42,.25);width:min(880px,96vw);max-height:86vh;display:flex;flex-direction:column;overflow:hidden;}
.wb-modal__h{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;border-bottom:1px solid var(--border-default);font-size:15px;font-weight:600;}
.wb-modal__x{cursor:pointer;color:var(--text-tertiary);font-size:16px;padding:0 6px;}
.wb-modal__x:hover{color:var(--danger,#dc2626);}
.wb-modal__box .table-wrap,.wb-modal__box .muted{margin:0;}
.wb-modal__box .table{margin:0;font-size:13px;}
.wb-bar__c em{line-height:1.1;font-size:11px;}
/* 移动端窄屏:合并卡/今日卡降级为上下结构 */
@media (max-width:1100px){
  .kpi--so-merg .ksplit__lead,.kpi--wo-merg .wo-merg-lead{width:100%;min-width:0;flex-direction:row;flex-wrap:wrap;align-items:center;border-right:none;border-bottom:1px dashed var(--border-default);}
  .kpi--wo-merg .wo-merg-lead{flex-direction:column;align-items:stretch;}
  .wo-tabseg{flex-direction:row;}
  .wb-today{flex-direction:column;}
  .wb-today__lead{flex:0 0 auto;border-right:none;border-bottom:1px dashed var(--border-default);padding:0 0 10px;}
}

/* ============ V3.2.0 H5 工作台卡片 & 单据页 ============ */
.h5-wbcard{background:var(--surface,#fff);border:1px solid var(--border-default,#e5e7eb);border-radius:14px;padding:12px 14px;margin:10px 4px;box-shadow:0 1px 3px rgba(15,23,42,.04);}
.h5-wbcard--action{border-color:rgba(23,79,224,.35);}
.h5-wbcard-h{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;}
.h5-wbcard-h .h5-sec{margin:0;}
.h5-more{font-size:12px;color:var(--brand-600,#174fe0);cursor:pointer;padding:4px;white-space:nowrap;}
.h5-kpi3{display:flex;gap:8px;margin:6px 0 4px;}
.h5-kpi4{display:flex;gap:6px;margin:6px 0 4px;}
.h5-kpi{flex:1;background:rgba(148,163,184,.09);border-radius:10px;padding:8px 2px;text-align:center;min-width:0;}
.h5-kpi .v{font-size:18px;font-weight:700;color:var(--text-strong,#0f172a);line-height:1.2;}
.h5-kpi .v.bad{color:#dc2626;}
.h5-kpi .l{font-size:11px;color:var(--text-tertiary,#64748b);margin-top:2px;white-space:nowrap;}
.h5-doc-tabs{display:flex;gap:6px;padding:2px 2px 6px;}
.h5-doc-tab{flex:1;text-align:center;padding:9px 0;border-radius:10px;background:rgba(148,163,184,.1);color:#475569;font-size:14px;font-weight:600;cursor:pointer;}
.h5-doc-tab.is-active{background:var(--brand-600,#174fe0);color:#fff;}
.h5-doc-bar{padding:6px 4px 0;}
.h5-back{display:inline-block;color:var(--brand-600,#174fe0);font-size:13px;cursor:pointer;padding:6px 8px;}
.h5-doc-head{display:flex;justify-content:space-between;align-items:center;margin:8px 2px 4px;gap:8px;}
.h5-doc-title{font-size:17px;font-weight:700;color:var(--text-strong,#0f172a);}
.h5-fsec{font-size:13px;font-weight:700;color:#334155;margin:12px 2px 4px;padding-bottom:4px;border-bottom:1px dashed var(--border-default,#e5e7eb);}
.h5-f{display:flex;padding:6px 2px;border-bottom:1px solid rgba(148,163,184,.08);font-size:13px;line-height:1.5;}
.h5-f .h5-f-lb{flex:0 0 76px;color:var(--text-tertiary,#64748b);}
.h5-f .h5-f-v{flex:1;color:#1e293b;word-break:break-all;}
.h5-strong{font-weight:700;color:var(--text-strong,#0f172a);}
.h5-click{cursor:pointer;}
.h5-click:active{background:rgba(23,79,224,.06);}
.h5-link{color:var(--brand-600,#174fe0);cursor:pointer;}
.bad{color:#dc2626;font-weight:700;}
.ok{color:#16a34a;font-weight:600;}
.warn{color:#d97706;font-weight:600;}

/* ============ V3.2.0 H5 吸顶（单据切换/搜索/返回条常驻，滚动不淹没） ============ */
.h5-doc-fixed{position:sticky;top:0;z-index:30;margin:-14px -16px 0;padding:10px 16px 8px;background:var(--bg-canvas);box-shadow:0 3px 8px rgba(15,23,42,.05);}
.h5-doc-bar{position:sticky;top:0;z-index:30;margin:-14px -16px 0;padding:8px 16px 6px;background:var(--bg-canvas);box-shadow:0 2px 6px rgba(15,23,42,.04);}

/* ================= V3.4.0 客户自助门户(Web 宽版) ================= */
.cust-loading{min-height:60vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;color:#64748b;font-size:14px;}
.cust-loading-ic{font-size:34px;}
.cust-load-err{min-height:60vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;color:#64748b;text-align:center;padding:30px;font-size:14px;line-height:1.7;}
.cust-load-err-ic{font-size:34px;}
.cust-web{min-height:100vh;display:flex;flex-direction:column;background:#f4f6f9;color:#1e293b;}
.cust-top{height:60px;display:flex;align-items:center;justify-content:space-between;padding:0 22px;background:#0d2b3e;color:#fff;position:sticky;top:0;z-index:40;}
.cust-top-l{display:flex;align-items:baseline;gap:12px;}
.cust-logo{font-size:19px;font-weight:800;letter-spacing:1px;color:#fff;}
.cust-top-sub{font-size:13px;color:#9fb3c3;}
.cust-top-r{display:flex;align-items:center;gap:8px;}
.cust-btn{border:1px solid transparent;border-radius:10px;padding:9px 18px;font-size:14px;cursor:pointer;font-family:inherit;transition:all .15s;}
.cust-btn--primary{background:#0e9f6e;color:#fff;font-weight:600;}
.cust-btn--primary:hover{background:#0b855c;}
.cust-btn--ghost{background:transparent;color:#334155;border-color:#d3dbe3;}
.cust-btn--ghost:hover{background:#eef2f6;}
.cust-btn--lg{font-size:16px;padding:13px 26px;}
.cust-btn--block{width:100%;}
.cust-top .cust-btn--ghost{color:#dbe7ee;border-color:#33536a;}
.cust-top .cust-btn--ghost:hover{background:rgba(255,255,255,.08);}
.cust-wrap{flex:1;display:flex;max-width:1280px;width:100%;margin:0 auto;padding:22px 18px;gap:20px;align-items:flex-start;}
.cust-aside{flex:0 0 248px;position:sticky;top:84px;}
.cust-aside-user{display:flex;gap:12px;align-items:center;background:#fff;border:1px solid #e6ebf0;border-radius:14px;padding:14px;margin-bottom:12px;}
.cust-avatar{width:42px;height:42px;border-radius:50%;background:linear-gradient(135deg,#0e9f6e,#12b886);color:#fff;display:flex;align-items:center;justify-content:center;font-size:19px;font-weight:700;flex:0 0 auto;}
.cust-avatar--lg{width:58px;height:58px;font-size:26px;}
.cust-aside-meta{min-width:0;}
.cust-aside-name{font-size:16px;font-weight:700;color:#0f172a;}
.cust-aside-sub{font-size:12px;color:#7a8599;margin-top:2px;}
.cust-nav{background:#fff;border:1px solid #e6ebf0;border-radius:14px;padding:8px;display:flex;flex-direction:column;gap:2px;margin-bottom:12px;}
.cust-nav-it{border:0;background:transparent;text-align:left;font-size:14.5px;color:#334155;padding:11px 13px;border-radius:9px;cursor:pointer;font-family:inherit;display:flex;align-items:center;gap:10px;}
.cust-nav-it:hover{background:#f1f5f9;}
.cust-nav-it.is-on{background:#e6f7f0;color:#0b7d53;font-weight:700;}
.cust-nav-ic{font-size:17px;}
.cust-aside-card{background:#fff;border:1px solid #e6ebf0;border-radius:14px;padding:14px;}
.cust-aside-t{font-size:13px;color:#596378;line-height:1.6;margin-bottom:8px;}
.cust-tel{display:inline-flex;align-items:center;gap:8px;color:#0e9f6e;font-weight:700;text-decoration:none;font-size:15px;}
.cust-tel:hover{text-decoration:underline;}
.cust-main{flex:1;min-width:0;}
.cust-card{background:#fff;border:1px solid #e6ebf0;border-radius:14px;padding:18px;margin-bottom:14px;}
.cust-card-h{font-size:15px;font-weight:700;color:#0f172a;margin-bottom:10px;display:flex;align-items:center;justify-content:space-between;}
.cust-link{background:none;border:0;color:#174fe0;cursor:pointer;font-size:13px;padding:0;font-family:inherit;}
.cust-link:hover{text-decoration:underline;}
.cust-empty{color:#94a3b8;font-size:13.5px;text-align:center;padding:22px 8px;line-height:1.7;}
.cust-greet{margin:6px 2px 18px;}
.cust-greet h1{font-size:22px;color:#0f172a;margin:0 0 6px;}
.cust-greet p{color:#64748b;font-size:14px;margin:0;line-height:1.7;}
.cust-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:18px;}
.cust-kpi{background:#fff;border:1px solid #e6ebf0;border-radius:14px;padding:14px 16px;display:flex;flex-direction:column;gap:2px;border-top:3px solid #cbd5e1;}
.cust-kpi.is-todo{border-top-color:#f59e0b;}
.cust-kpi.is-wip{border-top-color:#174fe0;}
.cust-kpi.is-done{border-top-color:#0e9f6e;}
.cust-kpi-ic{font-size:18px;}
.cust-kpi-v{font-size:26px;font-weight:800;color:#0f172a;}
.cust-kpi-l{font-size:13px;color:#7a8599;}
.cust-grid2{display:grid;grid-template-columns:1.25fr .9fr;gap:14px;}
.cust-note{background:#fff8e6;border:1px solid #f3dfa8;color:#7a5b12;border-radius:10px;padding:9px 12px;font-size:13px;line-height:1.6;margin-top:10px;}
.cust-banner{background:linear-gradient(135deg,#eefbf5,#e8f1ff);border-color:#d8efe4;}
.cust-banner--q{background:linear-gradient(135deg,#eefbf5,#eef4ff);}
.cust-banner-t{font-size:18px;font-weight:800;color:#0f172a;margin-bottom:6px;}
.cust-banner-s{font-size:13.5px;color:#475569;line-height:1.8;}
.cust-st{display:inline-block;border-radius:20px;padding:3px 12px;font-size:12.5px;font-weight:700;}
.cust-st.is-todo{background:#fef3c7;color:#92400e;}
.cust-st.is-wip{background:#dbeafe;color:#1e40af;}
.cust-st.is-done{background:#d1fae5;color:#065f46;}
.cust-urgent{display:inline-block;border-radius:20px;padding:3px 10px;font-size:12px;font-weight:700;background:#fee2e2;color:#b91c1c;margin-left:8px;}
.cust-wo{border-left:4px solid #e2e8f0;}
.cust-wo-mini{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid #edf1f5;border-radius:11px;padding:10px 12px;margin-bottom:8px;cursor:pointer;}
.cust-wo-mini:hover{background:#f8fafc;}
.cust-wo-mini-l{min-width:0;}
.cust-wo-mini-r{flex:0 0 auto;text-align:right;display:flex;flex-direction:column;gap:5px;align-items:flex-end;}
.cust-wo-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;}
.cust-wo-code{color:#7a8599;font-size:12.5px;}
.cust-wo-main{display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap;}
.cust-wo-t1{font-size:15px;font-weight:700;color:#0f172a;}
.cust-wo-t2{font-size:13px;color:#64748b;margin-top:3px;line-height:1.6;}
.cust-wo-right{flex:0 0 200px;}
.cust-pct-txt{font-size:13px;color:#475569;text-align:right;margin-bottom:5px;}
.cust-bar{height:8px;border-radius:99px;background:#e9eef3;overflow:hidden;}
.cust-bar i{display:block;height:100%;border-radius:99px;background:linear-gradient(90deg,#0e9f6e,#12b886);}
.cust-bar--sm{height:5px;margin-top:5px;}
.cust-wo-steps{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px;}
.cust-step{display:flex;align-items:center;gap:8px;background:#f6f8fa;border-radius:9px;padding:7px 10px;font-size:12.5px;flex-wrap:wrap;}
.cust-step-st{color:#7a8599;}
.cust-step-n{color:#0f172a;font-weight:700;}
.cust-pending{display:flex;gap:12px;align-items:center;border-left:4px solid #f59e0b;}
.cust-pending-ic{font-size:22px;}
.cust-mask{position:fixed;inset:0;background:rgba(15,23,42,.45);display:flex;align-items:center;justify-content:center;z-index:500;padding:18px;}
.cust-modal{background:#fff;border-radius:16px;max-width:560px;width:100%;max-height:86vh;overflow:auto;}
.cust-modal-h{display:flex;align-items:center;justify-content:space-between;padding:16px 18px;border-bottom:1px solid #edf1f5;font-size:16px;font-weight:700;position:sticky;top:0;background:#fff;border-radius:16px 16px 0 0;}
.cust-modal-x{border:0;background:#f1f5f9;width:28px;height:28px;border-radius:50%;cursor:pointer;font-size:14px;}
.cust-modal-b{padding:16px 18px 20px;}
.cust-modal-info{background:#f8fafc;border-radius:12px;padding:12px 14px;font-size:13.5px;display:flex;flex-direction:column;gap:8px;margin-bottom:14px;}
.cust-modal-info div{display:flex;gap:10px;}
.cust-modal-info span{flex:0 0 82px;color:#7a8599;}
.cust-modal-t{font-weight:700;font-size:14px;margin:4px 0 8px;}
.cust-tasklist{display:flex;flex-direction:column;gap:8px;}
.cust-task{display:flex;justify-content:space-between;gap:14px;align-items:center;border:1px solid #edf1f5;border-radius:10px;padding:9px 12px;}
.cust-task-l{display:flex;flex-direction:column;gap:3px;min-width:0;}
.cust-task-l span{color:#7a8599;font-size:12px;}
.cust-task-r{flex:0 0 130px;}
.cust-task-r em{font-style:normal;font-size:12px;color:#475569;}
/* 报价 */
.cust-step-card{margin-bottom:14px;}
.cust-step-head{display:flex;align-items:center;gap:10px;margin-bottom:12px;}
.cust-step-no{width:26px;height:26px;border-radius:50%;background:#0e9f6e;color:#fff;font-weight:800;display:flex;align-items:center;justify-content:center;font-size:14px;}
.cust-step-title{font-size:15.5px;font-weight:800;color:#0f172a;}
.cust-step-tip{background:#f0faf6;border:1px dashed #b7e0cf;color:#0b7d53;border-radius:9px;padding:8px 11px;font-size:12.5px;line-height:1.7;margin-top:10px;}
.cust-f-label{font-size:13px;color:#596378;font-weight:600;margin:8px 0 7px;}
.cust-chips{display:flex;flex-wrap:wrap;gap:8px;}
.cust-chip{border:1.5px solid #d8e0e8;background:#fff;border-radius:20px;padding:7px 16px;font-size:13.5px;color:#334155;cursor:pointer;font-family:inherit;transition:all .12s;}
.cust-chip:hover{border-color:#94a3b8;}
.cust-chip.is-on{background:#0e9f6e;border-color:#0e9f6e;color:#fff;font-weight:700;}
.cust-dims{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px;margin-top:10px;}
.cust-dim label{display:block;font-size:12.5px;color:#596378;margin-bottom:5px;}
.cust-dim label em{font-style:normal;color:#a8b0bd;}
.cust-inp{width:100%;box-sizing:border-box;border:1.5px solid #d8e0e8;border-radius:10px;padding:10px 12px;font-size:15px;font-family:inherit;}
.cust-inp:focus{outline:none;border-color:#0e9f6e;box-shadow:0 0 0 3px rgba(14,159,110,.13);}
.cust-qtyrow{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:6px;}
.cust-inp--qty{width:150px;}
.cust-calc-btn{width:100%;margin-top:8px;}
.cust-calc-hint{color:#a8b0bd;font-size:12.5px;margin-top:8px;text-align:center;}
.cust-result{background:linear-gradient(160deg,#ffffff,#f3fbf7);border:1.5px solid #bce4d2;box-shadow:0 6px 18px rgba(14,159,110,.08);}
.cust-result-ok{padding:4px 2px;}
.cust-price-row{text-align:center;padding:8px 0 12px;}
.cust-price-lab{font-size:13px;color:#7a8599;}
.cust-price-val{font-size:34px;font-weight:800;color:#0b7d53;letter-spacing:.5px;}
.cust-price-val--lg{font-size:42px;color:#065f46;}
.cust-badge-row{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;margin:4px 0 6px;}
.cust-badge{border-radius:20px;padding:4px 13px;font-size:12.5px;font-weight:700;background:#eef2f6;color:#475569;}
.cust-badge--brand{background:#0e9f6e;color:#fff;}
.cust-result-t{font-size:16px;font-weight:800;margin-bottom:8px;}
.cust-err-txt{color:#b91c1c;font-size:14px;line-height:1.8;margin:6px 0 10px;}
.cust-result-foot{display:flex;gap:10px;flex-wrap:wrap;justify-content:center;margin-top:12px;text-decoration:none;}
.cust-result-foot a{text-decoration:none;}
/* 帮助/我的 */
.cust-faq summary{display:flex;justify-content:space-between;align-items:center;cursor:pointer;list-style:none;}
.cust-faq summary::-webkit-details-marker{display:none;}
.cust-faq-q{font-size:14.5px;font-weight:700;color:#0f172a;}
.cust-faq-arrow{color:#94a3b8;}
.cust-faq-a{margin-top:10px;color:#475569;font-size:13.5px;line-height:1.9;}
.cust-tips{font-size:13.5px;color:#475569;line-height:2;}
.role-cust-note{background:#eefbf5;border:1px solid #bce4d2;border-radius:12px;padding:14px 16px;font-size:13.5px;line-height:1.9;color:#1e293b;}
.role-cust-note b{color:#0b7d53;}
@media (max-width:900px){
  .cust-wrap{flex-direction:column;padding:14px;}
  .cust-aside{flex:auto;width:100%;position:static;}
  .cust-aside-user{display:none;}
  .cust-nav{flex-direction:row;flex-wrap:wrap;}
  .cust-nav-it{flex:1;min-width:110px;justify-content:center;}
  .cust-grid2{grid-template-columns:1fr;}
  .cust-kpis{grid-template-columns:repeat(2,1fr);}
}
@media (max-width:560px){
  .cust-top{padding:0 12px;height:54px;}
  .cust-top-sub{display:none;}
}
/* ================= V3.4.0 客户自助门户(H5) ================= */
.h5-cust{display:flex;flex-direction:column;height:100vh;background:#f4f6f9;}
.h5-cust-top{flex:0 0 52px;display:flex;align-items:center;justify-content:space-between;padding:0 14px;background:#0d2b3e;color:#fff;}
.h5-cust-brand{font-weight:800;font-size:15.5px;}
.h5-cust-brand em{font-style:normal;color:#9fb3c3;font-size:12px;margin-left:6px;}
.h5-cust-me{color:#cfe0ec;font-size:13px;max-width:38%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.h5-cust-out{color:#fca5a5;font-size:13px;text-decoration:none;}
.h5-cust-main{flex:1;overflow-y:auto;padding:12px 12px 20px;-webkit-overflow-scrolling:touch;}
.h5-cust-main .cust-card{margin-bottom:12px;border-radius:14px;}
.h5-cust-tabbar{flex:0 0 62px;display:flex;background:#fff;border-top:1px solid #e6ebf0;}
.h5-cust-tab{flex:1;border:0;background:transparent;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font-size:11.5px;color:#7a8599;font-family:inherit;}
.h5-cust-tab.is-on{color:#0e9f6e;font-weight:700;}
.h5-cust-tab-ic{font-size:20px;}
.h5-cust-loading{height:100vh;display:flex;align-items:center;justify-content:center;color:#64748b;font-size:14px;}
.h5-cust-loading{padding:30px;box-sizing:border-box;text-align:center;}
.h5-cust-main .cust-wo-right{flex:0 0 auto;width:100%;}
.h5-cust-main .cust-bar{width:100%;}
.h5-cust-main .cust-wo-main{flex-direction:column;gap:4px;}
.h5-cust-main .cust-pct-txt{text-align:left;}
.cust-mine .field{margin-bottom:10px;}
.cust-mine .input{width:100%;box-sizing:border-box;}
.cust-mine-head{display:flex;align-items:center;gap:14px;}
/* V3.6.4 加工单颜色标记:改为背景色标记(整行着色,含冻结列/悬停) */
.table tbody tr.kd-mark td { background: inherit; }
.table tbody tr.kd-mark:hover td { background: inherit; }

/* ============ V3.7.0 顶部多标签页签 ============ */
.tabsbar { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; padding: 6px var(--space-6) 0; background: #f5f7fa; border-bottom: 1px solid var(--border-default); overflow: hidden; }
.tabsbar:empty { display: none; }
.tabsbar__scroll { flex: 1 1 auto; display: flex; align-items: center; gap: 6px; overflow-x: auto; overflow-y: hidden; padding-bottom: 6px; scrollbar-width: thin; }
.tabsbar__scroll::-webkit-scrollbar { height: 4px; }
.tabsbar__scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.tab { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; max-width: 180px; padding: 5px 8px 5px 10px; border: 1px solid var(--border-default); border-radius: 8px; background: #fff; color: var(--text-secondary); font-size: var(--size-sm); line-height: 1.4; cursor: pointer; user-select: none; white-space: nowrap; transition: background .12s, border-color .12s, color .12s; }
.tab:hover { border-color: #c7d3e8; color: var(--text-primary); }
.tab.is-active { border-color: var(--brand-500); color: var(--brand-600); font-weight: 600; box-shadow: inset 0 -2px 0 var(--brand-500); }
.tab__dot { flex: 0 0 auto; width: 6px; height: 6px; border-radius: 50%; }
.tab__label { overflow: hidden; text-overflow: ellipsis; }
.tab__close { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; border-radius: 4px; color: var(--text-tertiary); font-size: 11px; }
.tab__close:hover { background: #fee2e2; color: #dc2626; }
.tab-menu { position: fixed; z-index: 9999; min-width: 130px; padding: 4px; background: #fff; border: 1px solid var(--border-default); border-radius: 8px; box-shadow: 0 8px 24px rgba(15,23,42,.12); font-size: var(--size-sm); }
.tab-menu > div { padding: 6px 10px; border-radius: 6px; cursor: pointer; color: var(--text-primary); }
.tab-menu > div:hover { background: var(--brand-50); color: var(--brand-600); }
