/* ===========================================================
   浙弘模具管理系统 - 现代化 UI 样式表
   设计语言：玻璃拟态 + 渐变 + 圆角 + 微动效
   =========================================================== */

/* ==================== 设计变量 ==================== */
:root {
  /* 主色 - 蓝紫渐变 */
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --primary-soft: rgba(99, 102, 241, 0.08);
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-cool: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  --gradient-warm: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --gradient-bg: linear-gradient(135deg, #f5f7ff 0%, #faf5ff 50%, #fef6f0 100%);

  /* 状态色 */
  --success: #10b981;
  --success-soft: rgba(16, 185, 129, 0.1);
  --warning: #f59e0b;
  --warning-soft: rgba(245, 158, 11, 0.1);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.1);
  --info: #3b82f6;
  --info-soft: rgba(59, 130, 246, 0.1);

  /* 中性色 */
  --text: #1f2937;
  --text-secondary: #4b5563;
  --text-light: #9ca3af;
  --bg: #f8f9fc;
  --card: #ffffff;
  --border: #e5e7eb;
  --border-light: #f3f4f6;

  /* 阴影 */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.08);
  --shadow-primary: 0 8px 24px rgba(99, 102, 241, 0.25);

  /* 圆角 */
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* 过渡 */
  --t-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --t: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --t-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== 基础重置 ==================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

/* V2.2.23（方案C）：html 兜底背景 —— 手机端「双指放大」时外壳可能矮于布局视口，
   露出的就是 html 的底（未设背景 = 浏览器默认纯白）。补上与 body 同款渐变，杜绝「放大露白」。 */
html { background: var(--gradient-bg); background-attachment: fixed; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: var(--gradient-bg);
  background-attachment: fixed;
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

input, select, textarea, button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

.hidden { display: none !important; }
img { max-width: 100%; display: block; }

/* 滚动条美化 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(99, 102, 241, 0.2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(99, 102, 241, 0.4); }

/* ==================== 登录页 ==================== */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--gradient-primary);
  position: relative;
  overflow: hidden;
}
.login-wrap::before,
.login-wrap::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  pointer-events: none;
}
.login-wrap::before {
  width: 400px; height: 400px;
  top: -100px; left: -100px;
  animation: float 8s ease-in-out infinite;
}
.login-wrap::after {
  width: 300px; height: 300px;
  bottom: -80px; right: -80px;
  animation: float 10s ease-in-out infinite reverse;
}
@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(30px, -30px); }
}

.login-card {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  padding: 40px 32px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 1;
}
/* 登录页 LOGO（img 标签 - 用户提供的透明背景图） */
.login-logo {
  display: block;
  width: 200px;
  max-width: 80%;
  height: auto;
  margin: 0 auto 16px;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  object-fit: contain;
}
/* emoji 兜底：img 加载失败时 onerror 替换为 div */
.login-logo:not(img) {
  width: 64px;
  height: 64px;
  background: var(--gradient-primary);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #fff;
  box-shadow: var(--shadow-primary);
}
.login-card h1 {
  font-size: 24px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 6px;
  background: var(--gradient-cool);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.login-card .subtitle {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 28px;
  font-size: 13px;
}

/* ==================== 表单 ==================== */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-secondary);
}
.form-label .required { color: var(--danger); margin-left: 2px; }

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  transition: all var(--t-fast);
  font-size: 14px;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}
.form-textarea { resize: vertical; min-height: 80px; }
.form-row { display: flex; gap: 12px; }
.form-row > * { flex: 1; min-width: 0; } /* ★min-width:0：flex 子项默认 min-width:auto，input/select 的内在宽度会把行撑爆（手机端横向溢出） */

/* ==================== 按钮 ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all var(--t-fast);
  white-space: nowrap;
  user-select: none;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: var(--shadow-primary);
}
.btn-primary:hover { box-shadow: 0 12px 28px rgba(99, 102, 241, 0.35); transform: translateY(-1px); }

.btn-success { background: var(--gradient-success); color: #fff; box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25); }
.btn-danger { background: var(--gradient-warm); color: #fff; box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25); }
.btn-warning { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #fff; }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { background: var(--bg); border-color: var(--primary); color: var(--primary); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover { background: var(--border-light); color: var(--primary); }

.btn-block { width: 100%; }
.btn-lg { padding: 14px 28px; font-size: 16px; border-radius: 14px; }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 8px; }

/* ==================== App 头部 ==================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--gradient-primary);
  color: #fff;
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.2);
}
.app-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  pointer-events: none;
}
.app-header > * { position: relative; z-index: 1; }

.app-header h1 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.app-header h1 .logo-icon {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  backdrop-filter: blur(10px);
}

.header-user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.header-user .role-tag {
  background: rgba(255, 255, 255, 0.2);
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  backdrop-filter: blur(10px);
}
.header-user .btn-logout {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 6px 14px;
  font-size: 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--t-fast);
}
.header-user .btn-logout:hover { background: rgba(255, 255, 255, 0.25); }

/* ==================== Tab 栏 ==================== */
.tab-bar {
  display: flex;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  position: sticky;
  top: 60px;
  z-index: 99;
  padding: 0 8px;
}
.tab-bar::-webkit-scrollbar { display: none; }

.tab-item {
  flex: 1;
  min-width: 90px;
  padding: 14px 12px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  position: relative;
  transition: all var(--t-fast);
}
.tab-item:hover { color: var(--primary); }
.tab-item.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.tab-badge {
  position: absolute;
  top: 6px;
  right: 15%;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

/* ==================== 内容区 ==================== */
.tab-content {
  padding: 16px;
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 100px;
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text);
}
.section-title .icon { margin-right: 8px; }

/* ==================== Dashboard 数据看板 ==================== */
.dashboard {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)); /* ★minmax(0,1fr)：轨道可收缩到内容宽度以下，长金额/长名称不再把右列撑出屏幕 */
  gap: 12px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 18px;
  min-width: 0;                 /* ★覆盖 flex/grid 子项默认 min-width:auto（内容超长会撑爆容器 → 右侧溢出） */
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  display: flex;                /* 统计条内部紧凑自适应：标签(可换行) + 数字(不被撑大)，顶部对齐 */
  flex-direction: column;
  align-items: flex-start;
  box-shadow: var(--shadow);
  transition: all var(--t);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat-card::before {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  opacity: 0.08;
  background: var(--gradient-cool);
}
// 补13追加六：超期红数字卡已删（.stat-card.danger 规则清理）
.stat-card.warning::before { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.stat-card.success::before { background: var(--gradient-success); }
/* ★V3.4.12：进度跟踪第二排第四格 = 登记按钮框（新增登记 + 上传主图；仅「允许登记」权限渲染；.stat-card 变体，不可点击故禁 hover 位移） */
.reg-btn-box { cursor: default; }
.reg-btn-box:hover { transform: none; box-shadow: var(--shadow); }
.reg-btn-row { display: flex; gap: 8px; width: 100%; margin-top: 2px; }
.reg-btn-row .btn { flex: 1 1 0; min-width: 0; white-space: nowrap; font-size: 12px; padding: 7px 6px; }

.stat-card .stat-label {
  font-size: 12px;
  color: var(--text-light);
  font-weight: 500;
  margin-bottom: 6px;
  max-width: 100%;
  white-space: normal;          /* 长标签（如客户单位名称）允许换行往下走，不撑破一行 */
  word-break: break-word;
  overflow-wrap: anywhere;
}
.stat-card .stat-value {
  font-size: 28px;
  font-weight: 800;
  background: var(--gradient-cool);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
  flex-shrink: 0;               /* 短字段（数量/数字）紧贴标签、不被撑大/挤压 */
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.stat-card.warning .stat-value { background: linear-gradient(135deg, #fbbf24, #f59e0b); -webkit-background-clip: text; }
.stat-card.success .stat-value { background: var(--gradient-success); -webkit-background-clip: text; }

/* ==================== 需求四：客户统计顶部统计框 4 → 6（一行 4 + 一行 2，框6 更宽）==================== */
.stat-card .stat-sub { margin-top: 6px; font-size: 12px; font-weight: 500; color: var(--text-light); }
/* 移动端（默认 2 列）：框5 / 框6 各占满一行，避免半宽留白 */
.dashboard.dash-6 .stat-span-wide { grid-column: 1 / -1; }
.dashboard.dash-6 .stat-span-narrow { grid-column: 1 / -1; }
@media (min-width: 768px) {
  /* 桌面端（4 列）：框5 占 1 列（窄），框6 占 3 列（更宽） */
  .dashboard.dash-6 .stat-span-narrow { grid-column: auto; }
  .dashboard.dash-6 .stat-span-wide { grid-column: auto / span 3; }
}

/* ==================== 统计条（手机端）：一行两个不溢出 + 内部紧凑自适应 ====================
   外层容器改 flex：gap 10px / width 100%；两个统计框 flex 平分 + box-sizing:border-box。
   ★ min-width:0 是关键 —— flex 子项默认 min-width:auto，长金额/长客户名称会把框撑爆 → 右侧溢出屏幕。 */
@media (max-width: 767px) {
  .dashboard {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
  }
  .dashboard > .stat-card {
    flex: 1 1 calc(50% - 5px); /* 一行两个：两个 50%-5px + 10px gap = 100%，不折行 */
    min-width: 0;
    box-sizing: border-box;
  }
  /* 奇数个时最后一项独占半行（与 grid 两列观感一致，不被 flex-grow 撑满整行） */
  .dashboard > .stat-card:not(.stat-span-wide):not(.stat-span-narrow):last-child:nth-child(odd) {
    flex-grow: 0;
  }
  /* dash-6 的全宽统计框在 flex 容器下改为整行 */
  .dashboard.dash-6 > .stat-span-wide,
  .dashboard.dash-6 > .stat-span-narrow { flex: 1 1 100%; }
  /* 长金额（如 ¥6,919,474.09）在窄卡内按视口等比缩小 → 保证「一行显示完」，
     避免金额数字被从中间折断（保留 28px 上限，宽屏/平板不缩小）。
     ★下限 18px → 15px（本轮 P2 修复）：390 视口 4.9vw≈19.1px 仍高于下限 → 390 完全不受影响。 */
  .dashboard .stat-value { font-size: clamp(15px, 4.9vw, 28px); }
}
/* ★320~389 极窄屏补充（本轮 P2 修复）：
   390 已是 4.9vw 的安全极限（实测 390 一行刚好放下、≤340 三张金额卡折两行），
   故再窄必须用更缓的斜率。本规则只作用于 ≤389px，390 及以上不进入 → 主流机型字号 19.1px 零改动。 */
@media (max-width: 389px) {
  .dashboard .stat-value { font-size: clamp(11px, 4.5vw, 28px); }
}

/* ==================== 卡片 ==================== */
.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  transition: all var(--t);
  border: 1px solid var(--border-light);
}
.card:hover { box-shadow: var(--shadow-lg); }

.card.overdue {
  border-left: 4px solid var(--danger);
  background: linear-gradient(135deg, #fef2f2 0%, #fff 50%);
}

/* ==================== 进度列表项 ==================== */
.mold-item {
  display: flex;
  align-items: center;
  gap: 12px;
}
.mold-item .mold-info { flex: 1; min-width: 0; }
.mold-item .mold-number {
  font-weight: 700;
  font-size: 16px;
  color: var(--primary);
  margin-bottom: 4px;
}
.mold-item .mold-name {
  font-size: 13px;
  color: var(--text);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mold-item .mold-meta {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.mold-item .mold-stage-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  margin-top: 6px;
}
.mold-item .mold-stage-tag.done {
  background: var(--success-soft);
  color: #047857;
}
.mold-item .mold-stage-tag.overdue {
  background: var(--danger-soft);
  color: #b91c1c;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* ==================== 进度条 ==================== */
.progress-bar {
  display: flex;
  gap: 2px;
  margin-top: 8px;
  width: 140px;
}
.progress-seg {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: var(--border-light);
  transition: all var(--t);
}
.progress-seg.done {
  background: var(--gradient-success);
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}
.progress-seg.active {
  background: var(--gradient-warm);
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
  animation: shimmer 2s infinite;
}
@keyframes shimmer {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}
.progress-percent {
  text-align: right;
  font-size: 11px;
  color: var(--text-light);
  margin-top: 4px;
  font-weight: 700;
}

/* ==================== 状态标签 ==================== */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
}
.status-未开始 { background: var(--border-light); color: var(--text-light); }
.status-进行中 { background: var(--warning-soft); color: #b45309; }
.status-已完成 { background: var(--success-soft); color: #047857; }

/* ==================== 详情页 ==================== */
.detail-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}
.detail-header h2 {
  font-size: 19px;
  flex: 1;
  font-weight: 800;
  color: var(--text);
}
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 16px;
}
.info-item {
  padding: 10px 14px;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
}
.info-grid .info-label {
  color: var(--text-light);
  font-size: 11px;
  margin-bottom: 4px;
  font-weight: 500;
}
.info-grid .info-value {
  font-weight: 600;
  font-size: 14px;
  word-break: break-all;
}
.info-full { grid-column: 1 / -1; }

/* ==================== 图片区域 ==================== */
.image-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 6px 2px;
  -webkit-overflow-scrolling: touch;
}
.image-scroll::-webkit-scrollbar { height: 4px; }
.thumb {
  width: 88px;
  height: 88px;
  border-radius: 10px;
  object-fit: cover;
  cursor: pointer;
  flex-shrink: 0;
  background: var(--border-light);
  border: 2px solid transparent;
  transition: all var(--t-fast);
}
.thumb:hover { border-color: var(--primary); transform: scale(1.05); }

/* ==================== 阶段卡片 ==================== */
.stage-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 14px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: all var(--t);
  position: relative;
}
.stage-card:hover { box-shadow: var(--shadow); }

.stage-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--gradient-cool);
}

.stage-card .stage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
/* v8.70：工序卡片「🏭 外协加工」入口按钮（仅操作人被标为外协时显示） */
.stage-card .zxos-btn {
  margin-left: 10px; padding: 4px 10px; font-size: 12px; font-weight: 600;
  border: 1px solid #E0A03C; border-radius: 999px; cursor: pointer; white-space: nowrap;
  background: #FFF6E5; color: #8A5A12; line-height: 1.6; vertical-align: middle;
}
.stage-card .zxos-btn:hover { background: #FDE8C4; border-color: #C8862B; }
@media (max-width: 768px) { .stage-card .zxos-btn { padding: 3px 8px; font-size: 11px; margin-left: 6px; } }
/* v8.70：工序卡片「🏭 外协加工」入口按钮（仅操作人被标为外协时显示） */
.stage-card .zxos-btn {
  margin-left: 10px; padding: 4px 10px; font-size: 12px; font-weight: 600;
  border: 1px solid #E0A03C; border-radius: 999px; cursor: pointer; white-space: nowrap;
  background: #FFF6E5; color: #8A5A12; line-height: 1.6; vertical-align: middle;
}
.stage-card .zxos-btn:hover { background: #FDE8C4; border-color: #C8862B; }
@media (max-width: 768px) { .stage-card .zxos-btn { padding: 3px 8px; font-size: 11px; margin-left: 6px; } }
.stage-card .stage-title {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}
.stage-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gradient-cool);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  box-shadow: var(--shadow-primary);
}
.stage-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.stage-fields .full { grid-column: 1 / -1; }
.stage-field label {
  font-size: 11px;
  color: var(--text-light);
  margin-bottom: 4px;
  display: block;
  font-weight: 500;
}
.stage-field input,
.stage-field select,
.stage-field textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  background: var(--card);
  transition: all var(--t-fast);
}
.stage-field input:focus,
.stage-field select:focus,
.stage-field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.stage-images { margin-top: 14px; }
.stage-images .img-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.stage-images .img-item {
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.stage-images .img-item img {
  width: 76px;
  height: 76px;
  object-fit: cover;
  cursor: pointer;
  transition: transform var(--t);
}
.stage-images .img-item:hover img { transform: scale(1.1); }
.stage-images .img-item .del-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  background: var(--danger);
  color: #fff;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 12px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
  opacity: 0;
  transition: opacity var(--t-fast);
}
.stage-images .img-item:hover .del-btn { opacity: 1; }

.upload-area {
  margin-top: 10px;
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  color: var(--text-light);
  font-size: 13px;
  font-weight: 500;
  transition: all var(--t-fast);
  background: var(--bg);
}
.upload-area:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

/* ==================== 提醒列表 ==================== */
.reminder-section { margin-bottom: 24px; }
.reminder-section h3 {
  font-size: 16px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.reminder-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--card);
  border-radius: var(--radius-lg);
  margin-bottom: 10px;
  border-left: 4px solid var(--warning);
  box-shadow: var(--shadow-sm);
  transition: all var(--t);
  cursor: pointer;
}
.reminder-item:hover { transform: translateX(4px); box-shadow: var(--shadow); }
.reminder-item.urgent {
  border-left-color: var(--danger);
  background: linear-gradient(135deg, #fef2f2 0%, #fff 60%);
}
.reminder-item .ri-info { flex: 1; min-width: 0; }
.reminder-item .ri-title { font-weight: 700; font-size: 14px; }
.reminder-item .ri-desc {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 4px;
}
.reminder-item .ri-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 12px;
  white-space: nowrap;
}
.ri-badge.overdue { background: var(--danger-soft); color: #b91c1c; }
.ri-badge.warning { background: var(--warning-soft); color: #b45309; }
.ri-badge.info { background: var(--info-soft); color: #1e40af; }

/* ==================== 员工管理 ==================== */
.user-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--card);
  border-radius: var(--radius-lg);
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  transition: all var(--t);
}
.user-item:hover { box-shadow: var(--shadow); }
.user-item .ui-info { flex: 1; min-width: 0; }
.user-item .ui-name {
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;   /* ★手机端：标签（超管/工种/可见价格/启用…）过多时换行，不再溢出到屏幕外 */
  gap: 8px;
  min-width: 0;
}
.user-item .ui-meta {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 4px;
}
.user-status {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 600;
}
.user-status.active { background: var(--success-soft); color: #047857; }
.user-status.disabled { background: var(--danger-soft); color: #b91c1c; }
.user-status.admin { background: var(--primary-soft); color: var(--primary-dark); }

.user-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.perm-group { margin-bottom: 18px; }
/* v7.50：编辑技术人员弹窗内时间设置行（常规打卡 / 机床时间） */
.att-time-row { margin-bottom: 8px; font-size: 13px; color: var(--text-secondary); }
.att-time-row input[type="time"] { font-size: 13px; padding: 6px 10px; }
.perm-group .perm-title {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 8px;
  color: var(--text-secondary);
}
.perm-checks { display: flex; flex-wrap: wrap; gap: 10px; }
.perm-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
  padding: 6px 12px;
  background: var(--bg);
  border-radius: 10px;
  transition: all var(--t-fast);
  border: 1.5px solid transparent;
}
.perm-check:hover { border-color: var(--primary-soft); }
.perm-check:has(input:checked) {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary-dark);
  font-weight: 600;
}
.perm-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}
/* v7.18：环节权限子选项（已完成内容/进行中内容） */
.perm-stage-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  width: 100%;
}
.perm-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  padding-left: 20px;
  width: 100%;
}
.perm-sub .perm-check {
  padding: 3px 10px;
  font-size: 12px;
}
.perm-sub .perm-check:has(input:checked) {
  background: var(--primary-soft);
  border-color: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 500;
}

/* ==================== 模态框 ==================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  animation: modalBgIn 0.2s;
}
@keyframes modalBgIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--card);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 580px;
  margin: 20px auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-light);
}
.modal-header h3 {
  font-size: 17px;
  font-weight: 700;
}
.modal-close {
  background: var(--border-light);
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t-fast);
}
.modal-close:hover { background: var(--danger-soft); color: var(--danger); }
.modal-body { padding: 24px; max-height: 70vh; overflow-y: auto; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  background: var(--bg);
}

/* ==================== 确认对话框 ==================== */
/* ★ V4.3.5 B1+B2：关键确认框层级档位（仅新增专属类，不动 .modal-overlay 原规则）——
   z-index 档位约定：200 基类模态 / 9600 机床遮罩 / 9700 料块&照片&更改确认浮层 /
   9750 关键确认框(本例 confirmDialog) / 9999 顶层遮罩。confirmDialog 取 9750，压过 9700 普通浮层，
   避免被遮挡（与 .block-bypass-modal 同档，沿用本文件既有约定）。 */
.modal-overlay.confirm-modal { z-index: 9750; }
.confirm-modal .modal { max-width: 400px; }
.confirm-modal .confirm-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}
.confirm-modal.danger .confirm-icon {
  background: var(--danger-soft);
  color: var(--danger);
}
.confirm-modal.warning .confirm-icon {
  background: var(--warning-soft);
  color: var(--warning);
}
.confirm-modal .confirm-title {
  font-size: 17px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
}
.confirm-modal .confirm-message {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.6;
}

/* V2.2.77 补13追加十二·补丁B + 十四：新建/修模登记 编号查重提示（失焦实时提醒） */
#mold-form-modal #mf-moldno-dup {
  color: #e53935;
  font-weight: 500;
}

/* ==================== V2.2.77 补13追加十三：副数矛盾待确认 ==================== */
.mc-modal { max-width: 620px; }
.mc-detail-modal { max-width: 560px; }
.mc-hint-modal { max-width: 520px; }
.mc-item {
  border: 1px solid var(--border, #e3e8ef);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.mc-item:hover { background: #fff8f6; border-color: #ffb4a2; }
.mc-item-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.mc-type-tag {
  font-size: 11px; padding: 1px 7px; border-radius: 10px;
  background: #ffe9e3; color: #c0392b; white-space: nowrap;
}
.mc-item-sub { font-size: 12px; color: var(--text-secondary, #667085); margin-bottom: 3px; }
.mc-item-detail { font-size: 12px; color: #c0392b; line-height: 1.5; }
.mc-item-time { font-size: 11px; color: var(--text-light, #9aa3ad); margin-top: 3px; }
.mc-d-mold { font-size: 14px; margin-bottom: 6px; }
.mc-d-tag {
  display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 10px;
  background: #ffe9e3; color: #c0392b; margin-bottom: 8px;
}
.mc-d-desc {
  font-size: 13px; color: #c0392b; line-height: 1.6;
  background: #fff6f4; border-left: 3px solid #e74c3c;
  padding: 8px 10px; border-radius: 4px; margin-bottom: 12px;
}
.mc-d-sec { font-size: 12px; color: var(--text-light, #9aa3ad); margin: 12px 0 5px; }
.mc-d-qty { font-size: 20px; font-weight: 600; color: var(--primary, #1a3a5c); }
.mc-d-empty { color: #e53935; font-size: 15px; }
.mc-d-blocks { display: flex; gap: 8px; flex-wrap: wrap; }
.mc-d-bk {
  border: 1px solid var(--border, #e3e8ef); border-radius: 6px;
  padding: 8px 12px; text-align: center; min-width: 72px;
}
.mc-d-bk span { display: block; font-size: 11px; color: var(--text-light, #9aa3ad); margin-bottom: 3px; }
.mc-d-bk b { font-size: 16px; color: var(--primary, #1a3a5c); }
.mc-d-calc {
  font-size: 13px; background: var(--bg-gray, #f7f8fa);
  padding: 8px 10px; border-radius: 5px; line-height: 1.6;
}
.mc-d-ops { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.mc-hint-tip { font-size: 13px; line-height: 1.6; margin-bottom: 12px; }
.mc-hint-row {
  border: 1px solid #ffd4c8; background: #fff8f6;
  border-radius: 6px; padding: 8px 10px; margin-bottom: 8px;
}
.mc-hint-d { font-size: 12px; color: #c0392b; margin-top: 3px; line-height: 1.5; }
.mc-split-row .form-group { min-width: 160px; }
@media (max-width: 640px) {
  .mc-d-blocks { display: grid; grid-template-columns: 1fr 1fr; }
  .mc-modal, .mc-detail-modal, .mc-hint-modal { max-width: 94vw; }
}

/* ==================== 灯箱 ==================== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.lightbox img {
  max-width: 90vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  transform: none;
  image-orientation: from-image;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
  cursor: zoom-out;
}
/* 放大查看带坐标系：stage 相对定位随 img 尺寸收缩，canvas 绝对铺满覆盖 img（与 img 同容器、随其缩放） */
.lightbox-stage { position: relative; }
.lightbox-stage img { display: block; }
.lightbox-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* ==================== Toast ==================== */
#toast-container {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.toast {
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  animation: toastIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 90vw;
}
.toast.success { background: var(--gradient-success); }
.toast.error { background: var(--gradient-warm); }
.toast.info { background: var(--gradient-primary); }
.toast.warning { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-12px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ==================== 空状态 ==================== */
.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
}
.empty .empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}
.empty .empty-text {
  font-size: 14px;
  margin-bottom: 16px;
}

/* ==================== 搜索框 ==================== */
.search-box {
  width: 100%;
  padding: 12px 18px 12px 42px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  margin-bottom: 14px;
  font-size: 14px;
  background: var(--card) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'><circle cx='11' cy='11' r='8'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>") no-repeat 14px center;
  background-size: 18px;
  transition: all var(--t-fast);
}
.search-box:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}

/* ==================== FAB ==================== */
.fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: #fff;
  border: none;
  font-size: 28px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t);
}
.fab:hover { transform: scale(1.1) rotate(90deg); box-shadow: 0 12px 32px rgba(99, 102, 241, 0.5); }
.fab:active { transform: scale(0.95); }

/* ==================== Loading ==================== */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--text-light);
  gap: 12px;
}
.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ==================== 响应式 ==================== */
@media (min-width: 768px) {
  .stage-fields { grid-template-columns: 1fr 1fr 1fr; }
  .info-grid { grid-template-columns: 1fr 1fr 1fr; }
  .tab-content { padding: 24px; }
  .dashboard { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .info-grid { grid-template-columns: 1fr 1fr 1fr 1fr; }
}
@media (max-width: 480px) {
  .stage-fields { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .app-header { padding: 0 12px; }
  .app-header h1 { font-size: 15px; }
}

/* ==================== v3.0 新增样式 ==================== */

/* ---------- 字体大小缩放（全系统同步，每人独立） ---------- */
html[data-fs="s"]  body { zoom: 0.875; }
html[data-fs="l"]  body { zoom: 1.25; }
html[data-fs="xl"] body { zoom: 1.5; }
/* Firefox 不支持 zoom，用 transform 兜底 */
@supports not (zoom: 1) {
  html[data-fs="s"]  body { transform: scale(0.875); transform-origin: top center; }
  html[data-fs="l"]  body { transform: scale(1.25); transform-origin: top center; }
  html[data-fs="xl"] body { transform: scale(1.5); transform-origin: top center; }
}

/* ---------- 断网提示横幅 ---------- */
.net-error-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  padding: 14px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(239, 68, 68, 0.06));
  border: 1.5px solid rgba(239, 68, 68, 0.3);
  color: #b91c1c;
  font-size: 14px;
  animation: nebPulse 2s ease-in-out infinite;
}
@keyframes nebPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.15); }
  50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}
.net-error-banner .neb-icon { font-size: 24px; line-height: 1; flex-shrink: 0; }
.net-error-banner .neb-text { flex: 1; line-height: 1.5; }
.net-error-banner .neb-text strong { display: block; font-size: 15px; margin-bottom: 2px; }
.net-error-banner .neb-text .neb-hint { font-size: 12.5px; opacity: 0.85; }
.net-error-banner .neb-retry {
  flex-shrink: 0;
  padding: 7px 16px;
  border-radius: 10px;
  background: var(--danger);
  color: #fff;
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast);
}
.net-error-banner .neb-retry:hover { background: #dc2626; transform: scale(1.05); }

/* ---------- 员工待办横幅 ---------- */
.staff-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  margin-bottom: 16px;
  border-radius: 16px;
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.25);
}
.staff-banner .sb-title { font-size: 17px; font-weight: 700; white-space: nowrap; }
.staff-banner .sb-desc { font-size: 13px; opacity: 0.9; line-height: 1.4; }

/* ---------- 待办徽章 ---------- */
.pending-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  background: var(--primary-soft);
  color: var(--primary-dark);
  margin-right: 6px;
  margin-top: 4px;
}
.pending-badge.danger { background: var(--danger-soft); color: #b91c1c; }
.pending-badge.warning { background: var(--warning-soft); color: #b45309; }
.pending-row { margin-top: 6px; display: flex; flex-wrap: wrap; align-items: center; }

/* ---------- 待办/已完成卡片 ---------- */
.todo-card, .done-card {
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all var(--t);
}
.todo-card:hover, .done-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
.todo-card.overdue { border-left: 4px solid var(--danger); }
.todo-card .mold-info, .done-card .mold-info { flex: 1; min-width: 0; }
.todo-card .mold-number, .done-card .mold-number {
  font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 2px;
}
.todo-card .mold-name, .done-card .mold-name {
  font-size: 13px; color: var(--text-secondary); margin-bottom: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.todo-card .mold-meta, .done-card .mold-meta {
  font-size: 12px; color: var(--text-light);
}
.todo-arrow {
  font-size: 24px; color: var(--text-light); flex-shrink: 0;
  transition: all var(--t-fast); line-height: 1;
}
.todo-card:hover .todo-arrow, .done-card:hover .todo-arrow { color: var(--primary); transform: translateX(3px); }

/* ---------- 已完成折叠区 ---------- */
.completed-fold { margin-top: 20px; }
.completed-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 12px;
  background: var(--border-light);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast);
  user-select: none;
  margin-bottom: 4px;
}
.completed-toggle:hover { background: var(--primary-soft); color: var(--primary-dark); }
.completed-toggle .ct-icon { font-size: 12px; transition: transform var(--t-fast); }
.completed-toggle.open { background: var(--primary-soft); color: var(--primary-dark); }

/* ---------- 照片网格（约160px 缩略图，弹性布局） ---------- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.photo-item {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  background: var(--border-light);
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: all var(--t-fast);
}
.photo-item:hover { border-color: var(--primary); box-shadow: 0 4px 12px rgba(0,0,0,0.12); }
.photo-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--t);
}
.photo-item:hover img { transform: scale(1.06); }
.photo-del {
  position: absolute;
  top: 6px; right: 6px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.92);
  color: #fff;
  border: 2px solid #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t-fast);
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.photo-del:hover { background: var(--danger); transform: scale(1.15); }
.photo-count {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 8px;
  font-weight: 500;
}
.photo-count.full { color: var(--warning); font-weight: 700; }

/* ---------- 环节照片区 ---------- */
.stage-photos { margin-top: 10px; }
.stage-card.stage-done {
  border-left: 4px solid var(--success);
  background: linear-gradient(135deg, rgba(16,185,129,0.03), transparent);
}
.stage-card.stage-done .stage-title { color: var(--success); }
.stage-card.stage-done::before { background: var(--success); }

/* ---------- 已结清徽章 ---------- */
.settled-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  background: var(--success-soft);
  color: #047857;
}

/* ---------- 字体大小选择器 ---------- */
.fs-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.fs-btn {
  flex: 1;
  min-width: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 12px;
  border-radius: 14px;
  border: 2px solid var(--border);
  background: var(--card);
  cursor: pointer;
  transition: all var(--t-fast);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}
.fs-btn:hover { border-color: var(--primary-light); background: var(--primary-soft); }
.fs-btn.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-dark);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.fs-btn .fs-preview {
  display: inline-block;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

/* ---------- 重置密码模态框 ---------- */
#reset-pw-modal .modal-box { max-width: 420px; }
#reset-pw-modal .reset-hint {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 14px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--warning-soft);
  color: #b45309;
  line-height: 1.5;
}

/* ---------- 待改密状态徽章已在 employees 渲染中内联 ---------- */

/* ---------- 详情页价格区 ---------- */
.detail-payment {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--border-light);
  margin-top: 8px;
}
.detail-payment .dp-label { font-size: 13px; color: var(--text-light); }
.detail-payment .dp-val { font-size: 15px; font-weight: 700; color: var(--text); }

/* ---------- 预付款输入提示 ---------- */
.mf-advance-hint {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 4px;
  line-height: 1.4;
}

/* ---------- 环节编辑表单内照片上传区 ---------- */
.stage-upload-area {
  margin-top: 10px;
  padding: 14px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px dashed var(--border);
}

/* ---------- 收款提醒项金额行 ---------- */
.reminder-pay-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  margin-top: 6px;
}
.reminder-pay-row .rp-label { color: var(--text-light); }
.reminder-pay-row .rp-paid { color: var(--success); font-weight: 700; }
.reminder-pay-row .rp-unpaid { color: var(--danger); font-weight: 800; }

/* ---------- v3 响应式补充 ---------- */
@media (max-width: 480px) {
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
  .fs-btn { min-width: 80px; padding: 12px 8px; }
  .staff-banner { flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px 16px; }
  .net-error-banner { flex-direction: column; text-align: center; gap: 8px; }
  .todo-card, .done-card { padding: 12px 14px; }
}

/* ==============================================================
   v4.0 新增样式
   ============================================================== */

/* ---------- 优先级徽章 ---------- */
.priority-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  margin-left: 6px;
  vertical-align: middle;
}
.priority-badge.priority-urgent {
  background: var(--danger-soft);
  color: #b91c1c;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.priority-badge.priority-high {
  background: var(--warning-soft);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.priority-badge.priority-normal {
  background: var(--success-soft);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* ---------- 编程环节双区块（铝板/铁料） ---------- */
.prog-block {
  margin-top: 12px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--border-light);
}
.prog-block-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.prog-block .stage-fields {
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ---------- 优先级单选组 ---------- */
.prio-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.prio-radio {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: var(--card);
  border: 1.5px solid var(--border);
  transition: all var(--t-fast);
  user-select: none;
}
.prio-radio:hover { border-color: var(--primary-light); }
.prio-radio:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-dark);
}
.prio-radio input {
  width: 14px;
  height: 14px;
  accent-color: var(--primary);
  cursor: pointer;
  margin: 0;
}

/* ---------- 机床加工动态料块卡片 ---------- */
.machine-record-card {
  margin-top: 12px;
  padding: 14px;
  border-radius: var(--radius-lg);
  background: var(--bg);
  border: 1.5px solid var(--border-light);
  transition: all var(--t-fast);
}
.machine-record-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-sm);
}
.machine-record-header {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}
.machine-record-header .form-input {
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
}

/* ---------- 付款方标签 ---------- */
.pay-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  background: var(--info-soft);
  color: #1e40af;
  margin-right: 6px;
  margin-bottom: 2px;
}

/* ---------- 数据表格（会计/导入预览/期初欠款） ---------- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 8px;
}
.data-table thead th {
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 700;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 2px solid var(--primary-light);
  white-space: nowrap;
}
.data-table tbody td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}
.data-table tbody tr:hover {
  background: var(--primary-soft);
}
.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* ---------- 客户详情展开区 ---------- */
.customer-detail {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  overflow-x: auto;
}
.customer-detail .data-table {
  min-width: 500px;
}

/* ---------- 备份历史项 ---------- */
.backup-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--border-light);
  margin-bottom: 6px;
  font-size: 13px;
  transition: all var(--t-fast);
}
.backup-item:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-sm);
}
.backup-item > span:first-child {
  flex: 1;
  font-weight: 600;
  color: var(--text);
  word-break: break-all;
}
.backup-item > span:nth-child(2) {
  color: var(--success);
  font-weight: 700;
  white-space: nowrap;
}
.backup-item > span:last-child {
  color: var(--text-light);
  font-size: 12px;
  white-space: nowrap;
}

/* ---------- v4.0 响应式补充 ---------- */
@media (max-width: 480px) {
  .prog-block .stage-fields { grid-template-columns: 1fr; }
  .prio-group { flex-direction: column; gap: 6px; }
  .machine-record-header { flex-direction: column; align-items: stretch; }
  .data-table { font-size: 12px; }
  .data-table thead th { padding: 8px 6px; }
  .data-table tbody td { padding: 6px; }
  .backup-item { flex-direction: column; align-items: flex-start; gap: 4px; }
}
/* ===========================================================
   v5.0 全局UI视觉升级（轻拟物风格 + 六环节配色 + FA图标）
   =========================================================== */

/* ---------- 品牌色升级：藏青蓝 ---------- */
:root {
  --primary: #1a3a5c;
  --primary-dark: #12293f;
  --primary-light: #2d5a8a;
  --primary-soft: rgba(26, 58, 92, 0.08);
  --gradient-primary: linear-gradient(135deg, #1a3a5c 0%, #2d5a8a 100%);
  --gradient-bg: linear-gradient(160deg, #f0f2f5 0%, #e8ecf1 100%);
  --shadow-primary: 0 8px 24px rgba(26, 58, 92, 0.28);
}
body {
  background: linear-gradient(160deg, #f0f2f5 0%, #e8ecf1 100%);
  min-height: 100vh;
}

/* ---------- 顶部导航：藏青渐变 + 白字 ---------- */
.topbar, .app-header, .header, nav.tabs-top {
  background: linear-gradient(135deg, #1a3a5c 0%, #2d5a8a 100%) !important;
  color: #fff !important;
}
.topbar .title, .app-header h1 { color: #fff; }

/* ---------- 卡片：顶部3px环节色条 ---------- */
.card {
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(15, 35, 60, 0.08), 0 1px 2px rgba(15, 35, 60, 0.04);
  border-top: 3px solid var(--primary-light);
  overflow: hidden;
}
.stage-card {
  border-top: 3px solid var(--primary-light) !important;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(15, 35, 60, 0.08);
  position: relative;
  overflow: hidden;
}
.stage-card.st-zaoxing   { border-top-color: #2d7dd2 !important; }
.stage-card.st-biancheng { border-top-color: #7c4dff !important; }
.stage-card.st-jichuang  { border-top-color: #f57c00 !important; }
.stage-card.st-shougong  { border-top-color: #795548 !important; }
.stage-card.st-tiemo     { border-top-color: #00897b !important; }
.stage-card.st-fahuo     { border-top-color: #43a047 !important; }

/* 列表卡片左侧色条（按当前环节着色由JS内联，默认藏青） */
.card .mold-item { position: relative; }
.card .mold-item::before {
  content: ''; position: absolute; left: 0; top: 6px; bottom: 6px;
  width: 4px; border-radius: 4px; background: var(--primary-light); opacity: .7;
}

/* ---------- 环节卡片标题中的模具编号 ---------- */
.stage-mold-num {
  font-size: 13px; font-weight: 600; color: var(--text-light);
  background: var(--bg); border: 1px solid var(--border);
  padding: 1px 8px; border-radius: 10px; margin-left: 4px;
}

/* ---------- 造型尺寸区块（3区块 × 4数字框） ---------- */
.zx-block {
  background: #f8fafd; border: 1px solid #e3eaf3; border-left: 4px solid #2d7dd2;
  border-radius: 10px; padding: 10px 12px; margin: 10px 0;
}
.zx-block:nth-of-type(2) { border-left-color: #795548; }
.zx-block:nth-of-type(3) { border-left-color: #00897b; }
.zx-block-title {
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 700; font-size: 14px; color: var(--primary);
  margin-bottom: 8px;
}
.zx-size-row {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.zx-size-cell { flex: 1; min-width: 74px; }
.zx-size-cell label {
  display: block; font-size: 11px; color: var(--text-light); margin-bottom: 2px; text-align: center;
}
.zx-size-cell input {
  width: 100%; min-width: 0; padding: 8px 4px; text-align: center;
  border: 1px solid var(--border); border-radius: 6px;
  background: #fff; font-size: 14px; min-height: 38px;
}
.zx-size-cell input:focus { outline: none; border-color: var(--primary-light); box-shadow: 0 0 0 3px var(--primary-soft); }
.zx-size-summary { margin-top: 6px; font-size: 12px; color: var(--text-secondary); text-align: right; }

/* ---------- 列表页产品缩略图（80×80 圆角） ---------- */
.mold-thumb {
  width: 80px; height: 80px; border-radius: 12px; overflow: hidden;
  flex-shrink: 0; background: #eef1f5; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(15, 35, 60, 0.10); cursor: zoom-in;
  transition: transform var(--t-fast);
}
.mold-thumb:hover { transform: scale(1.05); }
.mold-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mold-thumb.thumb-empty { color: #b6c0cc; font-size: 26px; cursor: default; }
.mold-thumb.thumb-empty:hover { transform: none; }

/* ---------- 优先级徽章加大加立体（18px pill） ---------- */
.priority-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 15px; font-weight: 800; line-height: 1;
  padding: 6px 14px; border-radius: 18px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.35);
  letter-spacing: 1px; vertical-align: middle;
}
.priority-badge.priority-urgent  { background: linear-gradient(135deg, #e53935, #b71c1c); color: #fff; }
.priority-badge.priority-high    { background: linear-gradient(135deg, #fb8c00, #ef6c00); color: #fff; }
.priority-badge.priority-normal  { background: linear-gradient(135deg, #43a047, #2e7d32); color: #fff; }

/* ---------- 进度条渐变填充圆角 ---------- */
.progress-bar { width: 130px; gap: 3px; }
.progress-seg {
  flex: 1; height: 10px; border-radius: 5px;
  background: #dde3ea; transition: background var(--t);
}
.progress-seg.done {
  background: linear-gradient(90deg, #1a3a5c, #2d7dd2);
  box-shadow: 0 1px 3px rgba(26, 58, 92, 0.35);
}
.progress-seg.active {
  background: linear-gradient(90deg, #ffd54f, #ffb300);
  animation: pulse-seg 1.4s ease-in-out infinite;
}
@keyframes pulse-seg { 0%,100% { opacity: 1; } 50% { opacity: .55; } }

/* ---------- v8.15 列表行内工序方格（恢复+改造） ---------- */
/* 右上角一排方形格：勾几个工序排几个；三态=照片/完成字样/灰色序号占位；完成格按工序着色 */
.stage-cells {
  display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end;
  margin-bottom: 6px; max-width: 240px;
}
.stage-cell {
  position: relative;
  width: 44px; height: 44px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
  background: #eef1f5; border: 1px solid #dde3ea;
  overflow: hidden; cursor: default;
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.stage-cell:hover { transform: translateY(-1px); box-shadow: 0 2px 6px rgba(15,35,60,.15); }
.stage-cell .stage-cell-img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.stage-cell .stage-cell-done { font-size: 11px; font-weight: 800; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.stage-cell .stage-cell-num { font-size: 13px; font-weight: 700; color: #b6c0cc; }
.stage-cell .stage-cell-name {
  position: absolute; left: 0; right: 0; bottom: 0;
  font-size: 9px; line-height: 1.3; text-align: center;
  color: #fff; background: rgba(15,35,60,.55); padding: 0 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stage-cell:not(.stage-cell-done-bg) .stage-cell-name { background: rgba(15,35,60,.28); }
.stage-cell-done-bg { border-color: transparent; box-shadow: 0 2px 5px rgba(26,58,92,.28); }
.stage-cell-cur { outline: 2px solid #ffb300; outline-offset: 1px; }

/* ---------- 按钮渐变 + 上浮 ---------- */
.btn {
  border-radius: 8px; font-weight: 600;
  transition: transform var(--t-fast), box-shadow var(--t-fast), filter var(--t-fast);
  min-height: 40px;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(135deg, #1a3a5c 0%, #2d5a8a 100%);
  box-shadow: 0 4px 12px rgba(26, 58, 92, 0.30);
}
.btn-primary:hover { box-shadow: 0 6px 18px rgba(26, 58, 92, 0.40); }
.btn-danger {
  background: linear-gradient(135deg, #e53935, #c62828);
  box-shadow: 0 4px 10px rgba(198, 40, 40, 0.28);
}

/* ---------- 输入框 ---------- */
.form-input, .stage-field input, .stage-field select, .stage-field textarea,
.search-box, .zx-size-cell input {
  border-radius: 6px; background: #f6f8fa; border: 1px solid #e0e6ed;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.form-input:focus, .stage-field input:focus, .stage-field select:focus,
.stage-field textarea:focus, .search-box:focus {
  outline: none; background: #fff; border-color: var(--primary-light);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

/* ---------- 底部Tab：图标+文字+选中放大 ---------- */
.tab-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-height: 44px; padding: 6px 0;
  transition: transform var(--t-fast);
}
.tab-item i { font-size: 20px; }
.tab-item.active { color: var(--primary); transform: translateY(-3px) scale(1.08); font-weight: 700; }
.tab-item.active::after {
  content: ''; width: 22px; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, #1a3a5c, #2d7dd2); margin-top: 1px;
}

/* ---------- 照片缩略图圆角+阴影+hover放大 ---------- */
.photo-item {
  border-radius: 10px; overflow: hidden;
  box-shadow: 0 2px 8px rgba(15, 35, 60, 0.12);
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.photo-item:hover { transform: scale(1.06); box-shadow: 0 6px 16px rgba(15, 35, 60, 0.22); z-index: 2; position: relative; }

/* ---------- 已发货记录条目 ---------- */
.shipped-item {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 12px; margin: 8px 0; border-radius: 10px;
}
.shipped-detail { width: 100%; margin-top: 4px; }
.shipped-detail .data-table { margin-top: 6px; }

/* ---------- 移动端触控目标 ≥44px ---------- */
@media (max-width: 768px) {
  .btn { min-height: 44px; padding: 10px 16px; }
  .form-input, .stage-field input, .stage-field select, .zx-size-cell input { min-height: 44px; font-size: 16px; }
  .tab-item { min-height: 48px; }
  .mold-thumb { width: 64px; height: 64px; border-radius: 10px; }
  .priority-badge { font-size: 14px; padding: 5px 12px; }
  .zx-size-cell { min-width: 72px; }
  .zx-size-row { gap: 6px; }
}

/* ===========================================================
   v6.0 新增组件样式
   =========================================================== */

/* ---------- 超级管理员红色横幅 + 角色标签 ---------- */
.super-banner {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: #fff; text-align: center; padding: 8px 16px;
  font-size: 13px; font-weight: 600; letter-spacing: 1px;
  border-radius: 10px; margin-bottom: 12px;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.3);
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.role-super {
  background: linear-gradient(135deg, #dc2626, #ef4444) !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.35);
}

/* ---------- 首页统计卡片：可点击 + 选中高亮 ---------- */
.stat-card.clickable { cursor: pointer; user-select: none; }
.stat-card.dash-active {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  box-shadow: var(--shadow-primary);
  transform: translateY(-2px);
}
.dash-filter-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--primary-soft); border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 10px; padding: 8px 14px; margin: 0 0 12px;
  font-size: 14px; color: var(--primary-dark); font-weight: 600;
}
.dash-filter-bar .btn { padding: 4px 12px; min-height: 32px; font-size: 13px; }
/* V3.4.33：财务进度跟踪筛选条「导出记录」按钮贴右（dash-filter-bar 为 flex + space-between，margin-left:auto 强制定边） */
.eo-filter-export { margin-left: auto; }

/* ---------- 模具卡片第三行：当前环节现场图 ---------- */
.stage-live {
  position: relative; width: 100%; height: 170px; border-radius: 8px;
  overflow: hidden; margin-top: 8px; background: #f1f5f9; cursor: pointer;
  border: 1px solid var(--border-light);
}
.stage-live img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform var(--t); }
.stage-live:hover img { transform: scale(1.04); }
.stage-live .stage-live-tag {
  position: absolute; left: 8px; bottom: 8px;
  background: rgba(15, 23, 42, 0.78); color: #fff;
  padding: 3px 10px; border-radius: 6px; font-size: 12px; font-weight: 600;
  backdrop-filter: blur(4px);
}
.stage-live .stage-live-empty {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--text-light); font-size: 13px; gap: 6px;
}

/* ---------- 确认完成：48px 大绿按钮 ---------- */
.btn-complete-lg {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 48px; padding: 12px 20px;
  font-size: 18px; font-weight: 700; color: #fff;
  background: var(--gradient-success); border: none; border-radius: 12px;
  cursor: pointer; box-shadow: 0 6px 18px rgba(16, 185, 129, 0.35);
  transition: transform var(--t-fast), box-shadow var(--t-fast), filter var(--t-fast);
  letter-spacing: 2px;
}
.btn-complete-lg:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(16, 185, 129, 0.45); filter: brightness(1.05); }
.btn-complete-lg:active { transform: translateY(1px) scale(0.99); }
.btn-complete-lg i { font-size: 20px; }

/* ---------- 小号完成按钮 ---------- */
.btn-complete-sm {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 38px; padding: 8px 16px; font-size: 14px; font-weight: 600;
  color: #fff; background: var(--gradient-success); border: none; border-radius: 8px;
  cursor: pointer; box-shadow: 0 3px 10px rgba(16, 185, 129, 0.3);
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.btn-complete-sm:hover { transform: translateY(-1px); box-shadow: 0 5px 14px rgba(16, 185, 129, 0.4); }
.btn-complete-sm:active { transform: translateY(1px); }
.btn-complete-sm i { font-size: 14px; }

/* ---------- 环节完成横幅 ---------- */
.complete-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  flex-wrap: wrap; padding: 12px 16px; border-radius: 10px;
  background: var(--success-soft); border: 1px solid rgba(16, 185, 129, 0.35);
  color: #047857; font-weight: 600; font-size: 14px; margin-bottom: 12px;
}
.complete-banner .cb-time { font-size: 13px; color: #059669; }
.complete-banner .btn { min-height: 34px; padding: 6px 12px; font-size: 13px; }

/* ---------- 等待提示条 ---------- */
.wait-tip {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 10px; margin-bottom: 12px;
  background: var(--warning-soft); border: 1px dashed rgba(245, 158, 11, 0.5);
  color: #b45309; font-size: 13px; font-weight: 500;
}
.wait-tip i { font-size: 15px; }
.wait-tip.tip-auto { background: var(--info-soft); border-color: rgba(59, 130, 246, 0.4); color: #1d4ed8; }

/* ---------- 造型：多组砂箱 / 铸铁料 ---------- */
.zx-groups-wrap { display: flex; flex-direction: column; gap: 10px; }
.zx-group-card {
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px; box-shadow: var(--shadow-sm);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.zx-group-card:hover { border-color: var(--primary-light); box-shadow: var(--shadow); }
.zx-group-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px; gap: 8px;
}
.zx-group-name {
  font-size: 14px; font-weight: 700; color: var(--primary-dark);
  display: inline-flex; align-items: center; gap: 6px;
}
.zx-group-name .badge-n {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 6px;
  background: var(--primary-soft); color: var(--primary-dark); font-size: 12px; font-weight: 700;
}
.zx-add-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 44px; margin-top: 4px;
  border: 2px dashed var(--primary-light); border-radius: 12px;
  background: var(--primary-soft); color: var(--primary-dark);
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.zx-add-btn:hover { background: rgba(99, 102, 241, 0.15); border-color: var(--primary); }
.zx-copy-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }

/* ---------- 编程：料块卡片 ---------- */
.plates-summary {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px; border-radius: 10px; margin-bottom: 12px;
  background: var(--info-soft); border: 1px solid rgba(59, 130, 246, 0.3);
  font-size: 14px; font-weight: 600; color: #1e40af;
}
.plates-summary .plates-progress {
  flex: 1; min-width: 120px; height: 8px; border-radius: 4px;
  background: #e0e7ff; overflow: hidden;
}
.plates-summary .plates-progress > span {
  display: block; height: 100%; border-radius: 4px;
  background: var(--gradient-success); transition: width var(--t-slow);
}
.plate-card {
  background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--info);
  border-radius: 12px; padding: 12px 14px; margin-bottom: 12px;
  box-shadow: var(--shadow-sm); transition: box-shadow var(--t-fast), border-color var(--t-fast);
}
.plate-card:hover { box-shadow: var(--shadow); }
.plate-card.plate-done {
  border-left-color: var(--success);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.04), #fff 40%);
}
.plate-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px dashed var(--border);
}
.plate-name-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 8px; font-size: 14px; font-weight: 700; color: #fff;
}
.plate-name-tag i { font-size: 13px; }
.plate-name-tag.mat-al { background: linear-gradient(135deg, #3b82f6, #2563eb); box-shadow: 0 3px 8px rgba(37, 99, 235, 0.3); }
.plate-name-tag.mat-iron { background: linear-gradient(135deg, #78716c, #57534e); box-shadow: 0 3px 8px rgba(87, 83, 78, 0.3); }
.plate-prefix {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 26px; padding: 0 8px; border-radius: 6px;
  background: #f1f5f9; border: 1px solid var(--border);
  font-size: 13px; font-weight: 700; color: var(--text-secondary);
}
.plate-name-edit { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 15px; color: var(--text); }
.plate-num-input {
  width: 90px; min-height: 38px; padding: 6px 10px;
  border-radius: 8px; border: 1px solid #e0e6ed; background: #f6f8fa;
  font-weight: 600; text-align: center;
}
.plate-num-input:focus { outline: none; border-color: var(--primary-light); background: #fff; box-shadow: 0 0 0 3px var(--primary-soft); }
.plate-num-input:disabled { opacity: 0.65; }
.plate-prefix-input {
  width: 56px; min-height: 38px; padding: 6px 8px;
  border-radius: 8px; border: 1px solid #e0e6ed; background: #f6f8fa;
  font-weight: 700; text-align: center; text-transform: uppercase;
}
.plate-prefix-input:focus { outline: none; border-color: var(--primary-light); background: #fff; box-shadow: 0 0 0 3px var(--primary-soft); }
.plate-prefix-input:disabled { opacity: 0.65; }

/* ---------- 优先级大徽章 ---------- */
.prio-big {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 16px; border-radius: 999px;
  font-size: 15px; font-weight: 800; letter-spacing: 1px; color: #fff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}
.prio-big i { font-size: 14px; }
.prio-big.priority-urgent { background: linear-gradient(135deg, #ef4444, #dc2626); box-shadow: 0 3px 12px rgba(220, 38, 38, 0.4); animation: prioPulse 1.8s infinite; }
.prio-big.priority-high { background: linear-gradient(135deg, #f59e0b, #d97706); box-shadow: 0 3px 10px rgba(217, 119, 6, 0.35); }
.prio-big.priority-normal { background: linear-gradient(135deg, #64748b, #475569); }
@keyframes prioPulse {
  0%, 100% { box-shadow: 0 3px 12px rgba(220, 38, 38, 0.4); }
  50% { box-shadow: 0 3px 20px rgba(220, 38, 38, 0.7); }
}

/* ==================== v7.65 优先级标签（选用面板勾选后生效） ==================== */
/* 卡片右上角优先级标签：🔴 加急 / 🟡 优先（普通不显示） */
.prio-tag {
  position: absolute; top: 4px; right: 4px; z-index: 5;
  font-size: 12px; font-weight: 800; letter-spacing: 0.5px;
  padding: 3px 9px; border-radius: 8px; color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18); pointer-events: none;
  white-space: nowrap;
}
.prio-tag.prio-urgent { background: linear-gradient(135deg, #ef4444, #dc2626); }
.prio-tag.prio-high { background: linear-gradient(135deg, #f59e0b, #d97706); }
/* 带优先级标签的卡片容器：提供绝对定位基准 */
.zx-prio-card { position: relative; }
/* 机加工加急：淡红左边框 + 淡红渐变背景 + 「要紧先做」提醒条 */
.plate-card.mc-card.mc-urgent {
  border-left: 4px solid #f87171;
  background: linear-gradient(135deg, #fef2f2, #ffffff 45%);
}
.mc-urgent-tip {
  margin: -2px 14px 10px; padding: 5px 10px; border-radius: 8px;
  background: #fef2f2; border: 1px dashed #fca5a5;
  color: #b91c1c; font-size: 12px; font-weight: 800; letter-spacing: 0.5px;
}
@media (max-width: 768px) {
  .prio-tag { font-size: 11px; padding: 2px 7px; top: 2px; right: 2px; }
  .mc-urgent-tip { font-size: 11px; padding: 4px 8px; }
}

/* ==================== v7.75：料块卡片导航条行内优先级标签（从右上角absolute移到中间位） ==================== */
/* 显示实际值：🔴 加急 / 🟡 优先 / 普通灰；空值不渲染（JS 层控制）。配色沿用 prio-tag 现有风格 */
.prio-inline {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 800; letter-spacing: 0.5px;
  padding: 3px 10px; border-radius: 8px; color: #fff;
  white-space: nowrap; flex-shrink: 0; align-self: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}
.prio-inline.prio-urgent { background: linear-gradient(135deg, #ef4444, #dc2626); }
.prio-inline.prio-high { background: linear-gradient(135deg, #f59e0b, #d97706); }
.prio-inline.prio-normal { background: linear-gradient(135deg, #94a3b8, #64748b); }
@media (max-width: 768px) {
  .prio-inline { font-size: 11px; padding: 2px 8px; }
}

/* ---------- 辅料配件卡片 ---------- */
.fitting-card {
  background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--warning);
  border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; box-shadow: var(--shadow-sm);
  transition: box-shadow var(--t-fast);
}
.fitting-card:hover { box-shadow: var(--shadow); }
.fitting-card.plate-done {
  border-left-color: var(--success);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.04), #fff 40%);
}
.fitting-card .plate-head { border-bottom: 1px dashed var(--border); }

/* ---------- CAD 三维文件列表 ---------- */
.cad-file-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; margin-bottom: 8px; border-radius: 10px;
  background: #f8fafc; border: 1px solid var(--border);
  transition: background var(--t-fast), border-color var(--t-fast);
}
.cad-file-item:hover { background: #f1f5f9; border-color: var(--primary-light); }
.cad-file-item > i { color: var(--primary); font-size: 18px; }
.cad-file-name {
  flex: 1; min-width: 0; font-size: 13px; font-weight: 600;
  color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cad-file-size { font-size: 12px; color: var(--text-light); white-space: nowrap; }
.cad-file-item .btn { min-height: 32px; padding: 4px 10px; font-size: 12px; }
.cad-preview-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }

/* ---------- v7.15 任务四：三维文件 / 产品视频 小方块按钮与缩略图 ---------- */
.file-tile-grid {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px;
}
.file-tile {
  position: relative;
  width: 100px; height: 100px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; text-align: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
  box-sizing: border-box;
}
.file-tile:hover { border-color: var(--primary-light); box-shadow: var(--shadow-sm); }
.file-tile-thumb {
  width: 100%; flex: 1; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  background: #f8fafc;
  overflow: hidden;
}
.file-tile-thumb > i { font-size: 26px; color: var(--primary); }
.file-tile-cad { background: linear-gradient(180deg, #f8fafc, #eef4ff); }
.file-tile-video video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.file-tile-name {
  width: 100%;
  padding: 0 4px;
  font-size: 11px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.4;
}
.file-tile-size { font-size: 10px; color: var(--text-light); line-height: 1; margin-bottom: 4px; }
.file-tile-actions {
  position: absolute; top: 4px; right: 4px;
  display: flex; gap: 4px;
  opacity: 0;
  transition: opacity var(--t-fast);
}
.file-tile:hover .file-tile-actions { opacity: 1; }
.ft-btn {
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  border: none; border-radius: 6px; cursor: pointer;
  background: rgba(15, 23, 42, .55); color: #fff; font-size: 11px;
  line-height: 1; padding: 0;
}
.ft-btn:hover { background: rgba(15, 23, 42, .8); }
.ft-del { background: rgba(220, 38, 38, .85); }
.ft-del:hover { background: #dc2626; }
.file-tile-add {
  cursor: pointer;
  border: 2px dashed var(--border);
  background: var(--bg);
}
.file-tile-add:hover { border-color: var(--primary); background: var(--primary-soft); }
.file-tile-add .file-tile-thumb { background: transparent; }
.file-tile-add .file-tile-thumb > i { color: var(--primary); font-size: 30px; }

/* ---------- 产品视频网格 ---------- */
.video-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px; margin-top: 8px;
}
.video-item {
  background: #0f172a; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--border); box-shadow: var(--shadow-sm); position: relative;
}
.video-item video { width: 100%; height: 150px; object-fit: contain; background: #000; display: block; }
.video-name {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 6px 10px; font-size: 12px; color: #cbd5e1;
  white-space: nowrap; overflow: hidden;
}
.video-name span { overflow: hidden; text-overflow: ellipsis; }
.video-name .btn { min-height: 28px; padding: 2px 8px; font-size: 12px; }

/* ---------- 会计两步导出向导 ---------- */
.wizard-search {
  width: 280px; max-width: 100%; min-height: 42px; padding: 8px 14px;
  border-radius: 10px; border: 1px solid #e0e6ed; background: #f6f8fa;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.wizard-search:focus { outline: none; background: #fff; border-color: var(--primary-light); box-shadow: 0 0 0 3px var(--primary-soft); }
.wizard-list {
  max-height: 320px; overflow-y: auto; margin-top: 10px;
  border: 1px solid var(--border-light); border-radius: 10px;
  display: flex; flex-direction: column;
}
.wizard-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid var(--border-light);
  cursor: pointer; transition: background var(--t-fast);
}
.wizard-item:last-child { border-bottom: none; }
.wizard-item:hover { background: var(--primary-soft); }
.wiz-name { flex: 1; font-size: 14px; font-weight: 600; color: var(--text); }
.wiz-meta { font-size: 12px; color: var(--text-light); white-space: nowrap; }
.wiz-meta .unpaid { color: var(--danger); font-weight: 700; }
.wizard-item input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }
.ew-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.ew-toolbar input[type="date"] {
  min-height: 38px; padding: 6px 10px; border-radius: 8px;
  border: 1px solid #e0e6ed; background: #f6f8fa;
}
.ew-summary {
  padding: 8px 12px; border-radius: 8px; background: var(--warning-soft);
  color: #b45309; font-size: 13px; font-weight: 600; margin-bottom: 8px;
}
#ew-count { font-weight: 700; color: var(--primary-dark); }

/* ---------- 设置页：授权 / 系统更新 ---------- */
.lic-status-box {
  padding: 12px 14px; border-radius: 10px; margin-bottom: 10px;
  background: var(--info-soft); border: 1px solid rgba(59, 130, 246, 0.3);
  font-size: 13px; line-height: 2;
}
.lic-status-box.lic-ok { background: var(--success-soft); border-color: rgba(16, 185, 129, 0.3); }
.lic-status-box.lic-expired { background: var(--danger-soft); border-color: rgba(239, 68, 68, 0.3); }
.lic-code {
  display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px;
}
.lic-code input {
  flex: 1; min-width: 220px; min-height: 40px; padding: 8px 12px;
  border-radius: 8px; border: 1px solid #e0e6ed; background: #f6f8fa;
  font-family: Consolas, monospace; font-size: 13px;
}
.lic-code input:focus { outline: none; border-color: var(--primary-light); background: #fff; box-shadow: 0 0 0 3px var(--primary-soft); }
.machine-code {
  font-family: Consolas, monospace; background: #f1f5f9; border-radius: 6px;
  padding: 2px 8px; user-select: all;
}
#upd-result { margin-top: 10px; font-size: 13px; line-height: 1.8; }
.changelog-box { font-size: 13px; }
.changelog-box .cl-version {
  font-weight: 700; color: var(--primary-dark);
  display: flex; align-items: center; gap: 8px; margin-top: 10px;
}
.changelog-box .cl-date { font-size: 12px; color: var(--text-light); font-weight: 400; }
.changelog-box ul { margin: 4px 0 8px 20px; color: var(--text-secondary); }

/* ---------- 登记表单：材质下拉 ---------- */
.mf-steps-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px; margin-top: 6px;
}
.mf-steps-grid label {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  border: 1px solid var(--border); border-radius: 8px; background: #f8fafc;
  font-size: 14px; cursor: pointer; transition: all var(--t-fast);
}
.mf-steps-grid label:hover { border-color: var(--primary-light); background: var(--primary-soft); }
.mf-steps-grid input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--primary); cursor: pointer; }
.upload-preview {
  display: flex; flex-direction: column; gap: 4px; margin-top: 6px;
  font-size: 12px; color: var(--text-secondary);
}
.upload-preview .up-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 4px 10px; border-radius: 6px; background: #f1f5f9;
}
.upload-preview .up-item .up-del {
  color: var(--danger); cursor: pointer; font-weight: 700; padding: 0 4px;
}

/* ---------- v6.0 移动端适配 ---------- */
@media (max-width: 768px) {
  .stage-live { height: 120px; }
  .btn-complete-lg { min-height: 48px; font-size: 17px; }
  .prio-big { font-size: 14px; padding: 5px 12px; }
  .plate-num-input { width: 76px; }
  .plate-prefix-input { width: 48px; }
  .wizard-search { width: 100%; }
  .wizard-list { max-height: 260px; }
  .video-grid { grid-template-columns: 1fr; }
  .video-item video { height: 180px; }
  .mf-steps-grid { grid-template-columns: 1fr 1fr; }
  .cad-file-name { font-size: 12px; }
  .super-banner { font-size: 12px; padding: 6px 10px; }
  .dash-filter-bar { flex-wrap: wrap; font-size: 13px; }
}

/* ==================== v6.1 新增组件样式 ==================== */

/* ---------- 横向六格进度卡片 ---------- */
.six-cells-row {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
}
.six-cell {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  padding: 8px 5px 10px;
  border-radius: 8px;
  background: #f8f9fc;
  transition: all 0.2s;
}
.six-cell.cell-disabled { opacity: 0.4; }
.six-cell:not(.cell-disabled):hover { background: var(--primary-soft); }
.cell-bar {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: #e5e7eb;
}
.cell-bar.cell-pending { background: #e5e7eb; }
.cell-name {
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.cell-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  overflow: hidden;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.cell-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cell-photo:hover { box-shadow: 0 0 0 2px var(--primary-light); }
.cell-photo:hover img { transform: scale(1.08); }
.cell-no-photo { font-size: 11px; color: #b6c0cc; }

/* ==================== v7.98 工艺流程进度条（详情页，数据源=登记勾选 process_steps） ==================== */
.pf-card { margin-top: 12px; }
.pf-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.pf-title { font-size: 14px; font-weight: 800; color: var(--text-dark, #1f2937); }
.pf-count { font-size: 12px; font-weight: 700; color: var(--primary); background: var(--primary-soft); padding: 2px 10px; border-radius: 10px; }
.pf-bar { display: flex; align-items: flex-start; overflow-x: auto; padding-bottom: 4px; }
.pf-node { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 62px; }
.pf-dot {
  width: 34px; height: 34px; border-radius: 50%;
  background: #f1f3f7; color: #9aa5b1;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; border: 2px solid #e5e7eb; z-index: 1;
}
.pf-node.pf-done .pf-dot { background: var(--success); border-color: var(--success); color: #fff; }
.pf-node.pf-cur .pf-dot {
  border-color: var(--primary); color: var(--primary); background: var(--primary-soft);
  animation: pfPulse 1.8s infinite;
}
.pf-label { font-size: 12px; font-weight: 700; color: var(--text-light); white-space: nowrap; }
.pf-node.pf-done .pf-label { color: #047857; }
.pf-node.pf-cur .pf-label { color: var(--primary); }
.pf-tag { font-size: 10px; font-weight: 800; color: var(--primary); background: var(--primary-soft); border-radius: 8px; padding: 1px 8px; }
.pf-line { flex: 1; min-width: 22px; height: 3px; border-radius: 2px; background: #e5e7eb; margin-top: 16px; }
/* v8.11：工艺流程节点上方照片框（无照片显示占位图标） */
.pf-photo {
  width: 52px; height: 40px; border-radius: 8px; overflow: hidden;
  background: #f6f8fb; border: 1px solid #e5e7eb; cursor: pointer;
}
.pf-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-photo-empty {
  display: flex; align-items: center; justify-content: center;
  color: #c3ccd8; font-size: 14px; cursor: default;
}
@keyframes pfPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12); }
  50% { box-shadow: 0 0 0 7px rgba(37, 99, 235, 0.04); }
}

/* ==================== v8.12 编程料块图片「旋转90°」 ==================== */
.prog-photo { position: relative; }
.zx-rot-btn {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 700; color: var(--primary);
  background: var(--primary-soft); border: 1px solid var(--primary-light, #bfd8ff);
  border-radius: 8px; padding: 3px 10px; margin-bottom: 6px; cursor: pointer;
}
.zx-rot-btn:hover { filter: brightness(0.95); }
.zx-rot-img { transition: transform 0.25s ease; max-width: 100%; cursor: zoom-in; }
/* 登记表单：工艺流程多选 */
.mf-flow-row { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 8px 0 2px; }
.mf-flow-item { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; }

/* ==================== v7.7 一键加急（老板插队） ==================== */
/* 加急模具卡片：红色边框 + 左上角红色「加急」标签 */
.card.urgent {
  position: relative;
  border: 2px solid #ef4444;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.16);
}
.urgent-tag {
  position: absolute;
  top: -1px;
  left: -1px;
  z-index: 5;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: 0 0 10px 0;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.35);
  pointer-events: none;
}
/* 工序条（六格）+ 一键加急按钮：并行排布，按钮位于条左侧 */
.six-row-wrap {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.six-row-wrap .six-cells-row {
  flex: 1;
  min-width: 0;
}
.six-row-urgent-btn {
  display: flex;
  align-items: center;
}
.btn-urgent {
  background: #fff;
  border: 1.5px solid #ef4444;
  color: #ef4444;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 9px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.btn-urgent:hover { background: #ef4444; color: #fff; box-shadow: 0 2px 8px rgba(239, 68, 68, 0.35); }
.btn-urgent.active {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.35);
}
/* v8.90 主账号「一键发货」：导航条最右（rail-c8），与「一键加急」同类；绿系表发货/闭环 */
.btn-quickship {
  background: #fff;
  border: 1.5px solid #16a34a;
  color: #16a34a;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 9px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.btn-quickship:hover { background: #16a34a; color: #fff; box-shadow: 0 2px 8px rgba(22, 163, 74, 0.35); }
/* v7.9：移除加急时第一个未完成工序条的红/橙红样式 + ⚡ —— 仅保留卡片级红边框/标签/按钮 */
/* v7.13：加急恢复上线（增强版）—— 全工序节点贯穿显示：浅红底 + 红边框 + ⚡，已完成/当前/待处理一视同仁 */
.six-cell.cell-urgent {
  background: #fff5f5;
  border: 1.5px solid #ef4444;
  border-radius: 8px;
}
.six-cell.cell-urgent.cell-disabled {
  background: #fffafa;
  border: 1px dashed #fca5a5;
  opacity: 0.75;
}
.cell-urgent-flash {
  color: #ef4444;
  font-weight: 900;
  margin-right: 2px;
}
/* 员工待办列表里的加急徽标 */
.pending-badge.urgent-badge {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
}
/* 详情页：部分工序未签、因发货自动计为完成的提示条 */
.auto-complete-tip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff7ed;
  border: 1px solid #fdba74;
  color: #9a3412;
  border-radius: 10px;
  padding: 10px 14px;
  margin: 12px 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}
.auto-complete-tip .act-icon { font-size: 15px; }


/* ---------- 上传按钮缩小 ---------- */
.upload-btns-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.upload-btn-sm {
  height: 32px;
  padding: 0 12px;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  background: var(--card);
  font-family: '宋体', SimSun, serif;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.upload-btn-sm:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

/* ---------- 操作人只读输入框 ---------- */
.operator-readonly {
  background: #f0f0f0 !important;
  color: var(--text-secondary) !important;
  cursor: default;
  opacity: 0.85;
}

/* ---------- 备份历史条目 ---------- */
.backup-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #f8f9fc;
  margin-bottom: 6px;
  font-size: 13px;
}
.backup-item span:first-child { flex: 1; font-weight: 600; color: var(--text); }
.backup-item span:nth-child(2) { color: var(--text-light); white-space: nowrap; }
.backup-item span:nth-child(3) { color: var(--text-light); font-size: 12px; white-space: nowrap; }

/* ---------- 导出向导 radio 筛选 ---------- */
.wizard-radio-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.wizard-radio-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  cursor: pointer;
  padding: 5px 12px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  transition: all 0.2s;
}
.wizard-radio-item:hover {
  border-color: var(--primary-light);
  background: var(--primary-soft);
}
.wizard-radio-item input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
  margin: 0;
}

/* ---------- v6.1 移动端适配 ---------- */
@media (max-width: 768px) {
  .six-cells-row { gap: 3px; }
  .six-cell { padding: 5px 3px 7px; gap: 3px; }
  .cell-name { font-size: 10px; }
  .upload-btns-row { flex-wrap: wrap; }
  .upload-btn-sm { font-size: 12px; padding: 0 8px; }
  .wizard-radio-group { flex-direction: column; gap: 8px; }
  .backup-item { flex-wrap: wrap; gap: 6px; }
}

/* ---------- 含税标签 ---------- */
.tax-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  background: #e8f5e9;
  color: #2e7d32;
  margin-left: 4px;
  vertical-align: middle;
}
.tax-tag.tax-excl {
  background: #fff3e0;
  color: #e65100;
}

/* 付款方类型标签（客户统计-按付款方视图） */
.payer-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  background: #e3f2fd;
  color: #1565c0;
  margin-left: 6px;
  vertical-align: middle;
}
.payer-tag.payer-casting {
  background: #ede7f6;
  color: #5e35b1;
}
.payer-tag.payer-both {
  background: #fce4ec;
  color: #c2185b;
}

/* v6.5c: 采购类型徽章 */
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  vertical-align: middle;
  white-space: nowrap;
}
.badge-cash {
  background: #e8f3eb;
  color: #2d6a4f;
  border: 1px solid #b7d9c2;
}
.badge-inv {
  background: #e3eef9;
  color: #1e4a80;
  border: 1px solid #b6cce6;
}

/* ============================================================
   v6.6: 全局按钮立体阴影 + 手机上传 + 发货表单 + 扫码
   ============================================================ */

/* ---------- 全局按钮立体阴影 ---------- */
button,
.btn,
input[type="button"],
input[type="submit"],
.btn-primary,
.btn-success,
.btn-danger,
.btn-warning,
.btn-outline,
.btn-ghost,
.btn-complete-lg,
.btn-complete-sm,
.btn-mobile-upload {
  border-radius: 6px !important;
  transition: box-shadow 0.2s ease, transform 0.2s ease, filter 0.2s ease, background 0.2s ease !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12) !important;
}

/* 同色系阴影 */
.btn-primary,
.btn-primary:not(:disabled) {
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.20) !important;
}
.btn-success {
  box-shadow: 0 2px 6px rgba(34, 197, 94, 0.20) !important;
}
.btn-danger {
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.20) !important;
}
.btn-warning {
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.20) !important;
}
.btn-outline,
.btn-ghost {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12) !important;
}

/* hover：上浮 + 大阴影（仅支持 hover 的设备） */
@media (hover: hover) {
  button:hover:not(:disabled),
  .btn:hover:not(:disabled),
  input[type="button"]:hover:not(:disabled),
  input[type="submit"]:hover:not(:disabled),
  .btn-primary:hover:not(:disabled),
  .btn-success:hover:not(:disabled),
  .btn-danger:hover:not(:disabled),
  .btn-warning:hover:not(:disabled),
  .btn-outline:hover:not(:disabled),
  .btn-ghost:hover:not(:disabled),
  .btn-complete-lg:hover:not(:disabled),
  .btn-complete-sm:hover:not(:disabled),
  .btn-mobile-upload:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.20) !important;
  }
  .btn-primary:hover:not(:disabled) {
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.20) !important;
  }
  .btn-success:hover:not(:disabled) {
    box-shadow: 0 6px 16px rgba(34, 197, 94, 0.20) !important;
  }
  .btn-danger:hover:not(:disabled) {
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.20) !important;
  }
  .btn-warning:hover:not(:disabled) {
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.20) !important;
  }
}

/* active：下沉 + 小阴影 */
button:active:not(:disabled),
.btn:active:not(:disabled),
input[type="button"]:active:not(:disabled),
input[type="submit"]:active:not(:disabled),
.btn-primary:active:not(:disabled),
.btn-success:active:not(:disabled),
.btn-danger:active:not(:disabled),
.btn-warning:active:not(:disabled),
.btn-outline:active:not(:disabled),
.btn-complete-lg:active:not(:disabled),
.btn-complete-sm:active:not(:disabled),
.btn-mobile-upload:active {
  transform: translateY(0) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15) !important;
}

/* 手机端阴影减轻 */
@media (max-width: 768px) {
  button,
  .btn,
  input[type="button"],
  input[type="submit"],
  .btn-primary,
  .btn-success,
  .btn-danger,
  .btn-warning,
  .btn-outline,
  .btn-ghost,
  .btn-complete-lg,
  .btn-complete-sm,
  .btn-mobile-upload {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.10) !important;
  }
}

/* ---------- 手机上传双按钮 ---------- */
.mobile-upload-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.btn-mobile-upload {
  flex: 1;
  height: 48px;
  border: 2px dashed var(--primary);
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
  user-select: none;
}
.btn-mobile-upload:active {
  background: var(--primary-soft);
  transform: scale(0.98);
}
.btn-mobile-upload i {
  font-size: 18px;
}
.btn-mobile-album {
  border-color: var(--success);
  background: var(--success-soft);
  color: var(--success);
}
.btn-mobile-album:active {
  background: var(--success-soft);
}
@media (hover: hover) {
  .btn-mobile-upload:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  }
}

/* ---------- 上传进度条 ---------- */
.upload-progress-bar {
  margin-top: 6px;
  height: 28px;
  background: #f0f0f0;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
}
.upload-progress-bar.hidden {
  display: none;
}
.upload-progress-bar .prog-inner {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  transition: width 0.3s ease;
  border-radius: 6px 0 0 6px;
}
.upload-progress-bar .prog-text {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

/* ---------- 发货两步确认 ---------- */
.shipping-confirmed-banner {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  margin: 8px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}
.shipping-draft-tip {
  background: #e3f2fd;
  color: #1565c0;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  margin: 6px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.draft-saved-tag {
  margin-left: auto;
  font-size: 12px;
  color: #4caf50;
  font-weight: 600;
}
.shipping-subform {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 12px;
  margin: 8px 0;
}
.subform-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e9ecef;
}
.shipping-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.btn-confirm-shipping {
  flex: 1;
  min-width: 200px;
  height: 52px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.30);
  transition: all 0.2s ease;
}
.btn-confirm-shipping:active {
  transform: scale(0.98);
}
.btn-confirm-shipping.disabled {
  background: #d1d5db;
  color: #9ca3af;
  cursor: not-allowed;
  box-shadow: none;
}
@media (hover: hover) {
  .btn-confirm-shipping:hover:not(.disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.35);
  }
}
.shipping-hint {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 8px;
  padding: 8px 12px;
  background: #fff3cd;
  border-radius: 6px;
  border: 1px solid #ffeaa7;
}
.scan-btn {
  height: 100%;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ---------- 物流扫码全屏层 ---------- */
.qr-scan-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.qr-scan-header {
  width: 100%;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.8);
}
.qr-reader {
  width: 100%;
  max-width: 500px;
  flex: 1;
  overflow: hidden;
}
.qr-reader video {
  width: 100% !important;
  height: auto !important;
  object-fit: cover;
}
.qr-scan-hint {
  color: #fff;
  font-size: 14px;
  padding: 12px;
  text-align: center;
}
.qr-scan-manual {
  width: 100%;
  max-width: 500px;
  padding: 12px 16px 24px;
  display: flex;
  gap: 8px;
}

/* ---------- 必填星号 ---------- */
.required {
  color: #e53935;
  font-weight: 700;
}

/* ==================== v6.9 新增样式 ==================== */

/* ① 搜索框容器 + ✕ 清除按钮 */
.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.search-wrap .search-box {
  width: 100%;
  padding-right: 68px; /* v9.xx：右侧容纳「放大镜提交按钮 + 清空按钮」两枚图标 */
}
.search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.08);
  color: var(--text-secondary, #666);
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  align-items: center;
  transition: background 0.15s, color 0.15s;
}
.search-clear:hover {
  background: rgba(0, 0, 0, 0.16);
  color: var(--text, #222);
}

/* ① 登记页行内展开预览 */
.reg-row-card.reg-row-open {
  border-left: 3px solid var(--primary, #4A6FA5);
}
.reg-preview {
  margin-top: 10px;
  padding: 12px;
  background: var(--bg-alt, #f7f5f0);
  border-radius: 8px;
  border: 1px dashed var(--border, #e0dbd2);
  cursor: default;
}
.reg-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}
.rp-item .rp-label {
  font-size: 11px;
  color: var(--text-light, #999);
  margin-bottom: 2px;
}
.rp-item .rp-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text, #333);
}
.rp-progress {
  margin: 8px 0;
}
.rp-photos {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0;
}
.rp-photo {
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border, #e0dbd2);
  background: #fff;
}
.rp-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.rp-photo span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  font-size: 10px;
  text-align: center;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  padding: 1px 0;
}
.rp-remark {
  font-size: 12px;
  color: var(--text-secondary, #666);
  line-height: 1.7;
  border-top: 1px dashed var(--border, #e0dbd2);
  padding-top: 8px;
  margin-top: 8px;
}

/* ⑥ 标题栏版本标签（11px 圆角小标签，浅蓝底深蓝字） */
.version-tag {
  display: inline-block;
  margin-left: 10px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 10px;
  background: #dbeafe;
  color: #1e40af;
  vertical-align: middle;
  letter-spacing: 0.3px;
  box-shadow: 0 1px 3px rgba(30, 64, 175, 0.12);
}

/* V2.2.23：原「自动部署计数」次级标签（v1.2.x）已彻底移除 —— 全站只保留唯一人工版本号 Vx.y.z */

/* ⑦ 设置页危险操作区 */
.danger-zone {
  border: 2px solid var(--danger, #e53935);
  background: #fff5f5;
}
.reset-warn-box {
  background: #fdecea;
  border: 1px solid #f5c6cb;
  border-left: 4px solid var(--danger, #e53935);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 13px;
  color: #842029;
  line-height: 1.8;
  margin-bottom: 12px;
}

/* ==================== v7.1 新组件样式 ==================== */

/* ③ 编程环节：三个添加按钮（默认只显示按钮，点击追加输入区） */
.bc-add-btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 10px 0;
}
.bc-add-btn {
  flex: 1;
  min-width: 160px;
  height: 48px;
  font-size: 15px;
  font-weight: 700;
  justify-content: center;
}

/* ③ 料块总重自动计算显示 */
.plate-total-weight {
  min-height: 38px;
  display: flex;
  align-items: center;
  font-weight: 800;
  color: var(--primary, #1d4ed8);
  font-size: 15px;
  padding: 0 10px;
  background: linear-gradient(135deg, #eef4ff, #e0ecff);
  border-radius: 8px;
  border: 1px solid #c7d9f7;
}

/* ③ 辅料配件卡片 */
.accessory-card {
  background: #fafcff;
  border: 1px solid #dbe6f5;
  border-radius: 10px;
  padding: 10px 12px;
  margin: 8px 0;
}
.accessory-card .acc-name {
  flex: 1;
  min-width: 160px;
  font-weight: 700;
}

/* ③ 编程环节底部固定区（编程员/完成日期/备注/确认完成） */
.bc-bottom-bar {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 2px dashed #d5e2f3;
}

/* ② 机加工视角：上料/下料照片分栏 */
.machine-io-row {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}
.machine-io-col {
  flex: 1;
  min-width: 0;
  background: #fafcff;
  border: 1px solid #dbe6f5;
  border-radius: 10px;
  padding: 8px 10px;
}
.machine-io-col.machine-io-readonly {
  background: #f5f6f8;
  border: 1px dashed #cbd5e1;
  opacity: 0.92;
}
.machine-io-col.machine-io-readonly .machine-io-title {
  color: #64748b;
}
.machine-io-readonly-tag {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  background: #e2e8f0;
  border-radius: 6px;
  padding: 1px 6px;
  margin-left: 4px;
}
.machine-io-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-secondary, #475569);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 料块删除按钮（未确认前可删） */
.plate-del-btn {
  white-space: nowrap;
}

/* 手机端适配：v7.1 */
@media (max-width: 768px) {
  .bc-add-btns {
    flex-direction: column;
    gap: 8px;
  }
  .bc-add-btn {
    width: 100%;
    min-width: 0;
    height: 48px;
    font-size: 15px;
  }
  .machine-io-row {
    flex-direction: column;
    gap: 8px;
  }
  .machine-io-col {
    width: 100%;
  }
  .plate-head {
    flex-wrap: wrap;
    gap: 6px;
  }
  .plate-head .btn,
  .plate-head .btn-complete-sm {
    min-height: 44px;
    min-width: 44px;
  }
  .mobile-upload-row {
    display: flex;
    gap: 8px;
    margin: 6px 0;
  }
  .mobile-upload-row .btn-mobile-upload {
    flex: 1;
    height: 48px;
    font-size: 14px;
  }
}

/* ==================== v7.17：编程料块左右分栏 + 三入口图片区 ==================== */
/* 电脑端左右分栏：左=参数竖排（紧凑），右=图片区；手机端上下排列 */
.plate-split {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-top: 10px;
}
.plate-params {
  flex: 0 0 220px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.plate-media {
  flex: 1;
  min-width: 0;
}
/* 左侧参数行：label 右对齐固定宽 + 输入框统一紧凑宽度 100px */
.pp-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pp-row > label {
  flex: 0 0 68px;
  text-align: right;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-light, #6b7280);
  white-space: nowrap;
}
.pp-input {
  width: 100px;
  padding: 7px 10px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  background: var(--card);
  transition: all var(--t-fast);
  box-sizing: border-box;
}
.pp-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.pp-input:disabled {
  background: var(--border-light);
  color: var(--text-light, #9ca3af);
}
/* 右侧缩略图：80×80 小方块横向排列，右上角删除按钮 */
.plate-thumb-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 80px;
}
.plate-thumb {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--border-light);
}
.plate-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer;
}
.plate-thumb:hover { border-color: var(--primary); }
.plate-thumb-del {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.92);
  color: #fff;
  border: 1.5px solid #fff;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
/* 三入口按钮行：拍照 / 从相册选择 / 从造型导入 */
.plate-upload-btns {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.plate-upload-btns .btn-mobile-upload {
  flex: 1;
  min-width: 100px;
}
.btn-mobile-import {
  border-color: var(--warning, #f59e0b);
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning, #b45309);
}
.btn-mobile-import:active {
  background: rgba(245, 158, 11, 0.1);
}
/* 「从造型导入」弹窗：造型照片平铺 + 勾选 */
.import-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.import-thumb {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2.5px solid var(--border);
  transition: all var(--t-fast);
  box-sizing: border-box;
}
.import-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.import-thumb:hover { border-color: var(--primary-light); }
.import-thumb.checked {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.import-thumb .it-check {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-light, #9ca3af);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}
.import-thumb.checked .it-check {
  background: var(--primary);
  color: #fff;
}
/* 手机端：左右分栏改为上下排列 */
@media (max-width: 640px) {
  .plate-split {
    flex-direction: column;
    gap: 10px;
  }
  .plate-params {
    flex: none;
    width: 100%;
  }
  .plate-media { width: 100%; }
}

/* ==================== v7.18：料块/辅料备注框统一（撑满宽度 + 卡片底部） ==================== */
.pp-remark-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  width: 100%;
  box-sizing: border-box;
}
.pp-remark-row label {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-light, #6b7280);
  line-height: 32px;
  white-space: nowrap;
}
.pp-remark-input {
  flex: 1;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: var(--card);
  resize: vertical;
  transition: all var(--t-fast);
}
.pp-remark-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.pp-remark-input:disabled {
  background: var(--border-light);
  color: var(--text-light, #9ca3af);
}
.pp-remark-readonly {
  border-top: none;
  margin-top: 4px;
  padding-top: 4px;
}
.pp-remark-value {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
}
@media (max-width: 640px) {
  .pp-remark-row label { line-height: 34px; }
  .pp-remark-input { width: 100%; }
}

/* ==================== v7.18：机加工操作人/机床号显示（任务三） ==================== */
.io-operator {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 3px 4px;
  font-size: 10px;
  color: #fff;
  line-height: 1.3;
  text-align: center;
  background: rgba(0, 0, 0, 0.55);
  word-break: break-all;
  z-index: 1;
}
.io-machine-no {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 2px;
  font-size: 13px;
}
.io-machine-no label {
  flex: 0 0 auto;
  font-weight: 600;
  color: var(--text);
}
.io-machine-no .pp-input {
  width: auto;
  min-width: 110px;
  max-width: 180px;
}
@media (max-width: 640px) {
  .io-machine-no { flex-wrap: wrap; }
  .io-machine-no .pp-input { flex: 1; min-width: 0; max-width: none; }
}

/* ==================== v7.19：授权管理 ==================== */
.btn-mini {
  padding: 2px 10px;
  font-size: 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--t-fast);
}
.btn-mini:hover { border-color: var(--primary); color: var(--primary); }
.lic-modules { display: flex; flex-wrap: wrap; gap: 6px; }
.lic-module-chip {
  display: inline-block;
  padding: 3px 10px;
  font-size: 12px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 999px;
}

/* ==================== v7.20：机加工上料/下料独立确认（两步流程） ==================== */
/* 区域内确认按钮（上料确认 / 下料确认） */
.btn-io-confirm {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.15s;
}
.btn-io-confirm:hover { opacity: 0.9; }
.btn-io-confirm:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.btn-io-confirm-green { background: var(--success, #059669); }
/* 确认人信息行（上料人：xxx 时间 / 下料人：xxx 时间） */
.io-confirm-line {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 5px 0;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
  color: #047857;
  background: var(--success-soft, #ecfdf5);
  border-radius: 6px;
}
/* 下料区域状态行（未上料 / 加工中 / 已完成） */
.io-status-line {
  margin: 5px 0;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  border-radius: 6px;
}

/* ==================== v7.21：下料类型分流 + 已完成列表 + 发货分区 ==================== */
/* 料块类型徽章（铝板/铁模） */
.type-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 6px;
  white-space: nowrap;
}
.type-badge.type-al { color: #b45309; background: #fef3c7; }
.type-badge.type-iron { color: #334155; background: #e2e8f0; }
.type-badge.type-unknown { color: #6b7280; background: #f1f5f9; }
/* 已完成料块列表（机加工视角：筛选 + 明细行 + 转入按钮） */
.mc-done-list {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1.5px dashed var(--border);
  border-radius: 10px;
  background: var(--card);
}
.mc-done-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 8px;
}
.mc-filter-check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}
.mc-done-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px 8px;
  font-size: 13px;
  border-bottom: 1px solid var(--border-light, #f1f5f9);
}
.mc-done-row:last-child { border-bottom: none; }
.mc-done-name { font-weight: 800; min-width: 48px; }
.mc-done-persons { color: #475569; }
.mc-done-time { color: var(--text-light, #6b7280); font-size: 12px; }
.mc-done-state { margin-left: auto; font-size: 12px; font-weight: 600; color: #047857; }
/* 发货分区（铁模/铝板动态显示） */
.ship-zones { margin: 10px 0; }
.ship-order-status {
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  border-radius: 8px;
  margin-bottom: 8px;
}
.ship-zone {
  padding: 12px;
  margin-bottom: 10px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--card);
}
.ship-zone-done { border-color: #a7f3d0; background: #f0fdf4; }
.ship-zone-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.ship-zone-title { font-size: 15px; font-weight: 800; }
/* 下料确认类型选择弹窗（铝板→手工 / 铁模→铁模装配） */
.plate-type-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.plate-type-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all var(--t-fast);
}
.plate-type-opt:hover { border-color: var(--primary); }
.plate-type-opt:has(input:checked) { border-color: var(--primary); background: var(--primary-soft, #eff6ff); }
.plate-type-opt input { display: none; }
.plate-type-text { display: flex; flex-direction: column; gap: 2px; }
.plate-type-text small { color: var(--text-light, #6b7280); font-size: 12px; }

/* ===== v7.22 任务六：手工/铁模装配 按副（分组）确认卡片 ===== */
.pg-card { border: 1.5px solid var(--border); border-radius: 12px; padding: 12px 14px; margin: 10px 0; background: #fff; transition: border-color .2s; }
.pg-card-done { border-color: var(--success); background: var(--success-soft); }
.pg-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.pg-title { font-weight: 800; font-size: 15px; }
.pg-plates { display: flex; flex-direction: column; gap: 5px; margin: 8px 0; }
.pg-plate-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: 13px; background: rgba(0,0,0,0.02); border-radius: 8px; padding: 6px 10px; }
.pg-p-name { font-weight: 700; }
.pg-p-meta { color: var(--text-secondary); font-size: 12px; }
.pg-p-remark { color: var(--text-light); font-size: 12px; flex-basis: 100%; }
.pg-ref { margin: 8px 0; }
.pg-ref-title { font-weight: 700; font-size: 13px; margin: 4px 0; color: var(--text-secondary); }
.pg-plate-photos { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 4px 0; }
.pg-pp-label { font-size: 12px; color: var(--text-light); min-width: 60px; }
.pg-plate-photos img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 1px solid var(--border); }
.pg-done-zone { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border); }
.pg-done-img { width: 100%; max-width: 260px; border-radius: 10px; cursor: pointer; border: 1px solid var(--border); margin: 6px 0; }
/* v7.22 任务七：登录页 记住密码 勾选框 */
.login-remember { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-secondary); margin: 2px 0 12px; cursor: pointer; user-select: none; }
.login-remember input { width: 16px; height: 16px; cursor: pointer; }

/* ===== v7.23 模块一：历史 Excel 导入弹窗 ===== */
.imp-spec { border: 1.5px solid var(--border); border-radius: 12px; padding: 10px 12px; background: rgba(0,0,0,0.015); }
.imp-spec-title { font-weight: 800; font-size: 13px; margin-bottom: 6px; }
.imp-spec-scroll { max-height: 240px; overflow: auto; }
.imp-tbl-wrap { max-height: 46vh; overflow: auto; border: 1px solid var(--border); border-radius: 10px; }
.imp-tbl { margin: 0; font-size: 12.5px; }
.imp-tbl thead th { position: sticky; top: 0; background: var(--primary-soft, #eff6ff); z-index: 2; white-space: nowrap; }
.imp-tbl td { white-space: nowrap; }
.imp-summary { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; padding: 8px 12px; border: 1.5px solid var(--border); border-radius: 10px; margin-bottom: 10px; background: rgba(0,0,0,0.015); }
.imp-badge { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.imp-badge-new { background: var(--success-soft, #ecfdf5); color: var(--success); }
.imp-badge-update { background: var(--primary-soft, #eff6ff); color: var(--primary); }
.imp-badge-pending { background: var(--warning-soft, #fffbeb); color: #b45309; }
.imp-badge-error { background: var(--danger-soft, #fef2f2); color: var(--danger); }
.imp-row-pending { background: var(--warning-soft, #fffbeb); }
.imp-row-error { background: var(--danger-soft, #fef2f2); opacity: .85; }
.imp-payer { min-width: 96px; padding: 4px 8px; font-size: 12.5px; }
.imp-req { color: var(--danger); font-weight: 700; }

/* ===== v7.23 模块二：外协厂工作台任务卡 + 派工区 ===== */
.ot-card { padding: 14px 16px; margin-bottom: 12px; }
.ot-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.ot-title { font-weight: 800; font-size: 16px; }
.ot-sub { color: var(--text-secondary); font-size: 13px; margin: 4px 0; }
.ot-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--text-secondary); margin: 6px 0; }
.ot-photos { margin: 8px 0; padding: 8px 0; border-top: 1px dashed var(--border); }
.ot-photo-grid { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.ot-photo-grid img { width: 76px; height: 76px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 1px solid var(--border); }
.os-assign-zone { margin-top: 10px; padding: 10px 12px; border: 1.5px dashed var(--primary); border-radius: 12px; background: var(--primary-soft, #f5f9ff); }
.os-photo-link { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; cursor: pointer; border: 1px solid var(--border); margin-right: 4px; vertical-align: middle; }

/* ===== v7.24 模块一：导入弹窗 照片文件夹挂载区 ===== */
.imp-photo-zone { border: 1.5px dashed var(--primary); border-radius: 12px; padding: 10px 12px; margin: 10px 0; background: var(--primary-soft, #f5f9ff); }
.imp-photo-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.imp-photo-count { font-weight: 700; color: var(--primary); }
.imp-photo-tip { font-size: 12px; color: var(--text-light); margin-top: 6px; line-height: 1.6; }
.imp-photo-cell { font-size: 12.5px; white-space: nowrap; }
.imp-photo-ok { color: var(--success); font-weight: 700; }
.imp-photo-none { color: var(--text-light); }
/* v7.24 预览徽标：已有进度跳过 */
.imp-badge-skip { background: #f1f5f9; color: #475569; }

/* ==================== V2.2.7：配件老账批量导入（纯追加） ==================== */
.pimp-note { margin: 10px 0; padding: 8px 12px; border-radius: 10px; border: 1.5px dashed var(--warning); background: var(--warning-soft); font-size: 12px; color: var(--text-secondary); line-height: 1.7; }
.pimp-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; font-size: 12.5px; }
.pimp-row-err { background: var(--danger-soft, #fef2f2); }
.pimp-units { margin-top: 14px; padding-top: 10px; border-top: 1.5px dashed var(--border); }
.pimp-ledger { height: 28px; padding: 2px 8px; font-size: 12.5px; text-align: right; }
.pimp-sum-row { font-weight: 800; background: var(--primary-soft, #eff6ff); }
.pimp-sum-row td { color: var(--text-secondary); }
@media (max-width: 760px) {
  .pimp-toolbar { gap: 6px; }
  .pimp-ledger { width: 100%; }
}

/* ===== v7.24 模块三：发货管理页 ===== */
.ship-mgmt-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.ship-mgmt-tab { border: 1.5px solid var(--border); background: #fff; color: var(--text-secondary); border-radius: 999px; padding: 6px 16px; font-size: 13.5px; font-weight: 700; cursor: pointer; transition: all .15s; }
.ship-mgmt-tab:hover { border-color: var(--primary); color: var(--primary); }
.ship-mgmt-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.ship-mgmt-tab .cnt { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 999px; background: rgba(0,0,0,0.08); font-size: 11.5px; text-align: center; }
.ship-mgmt-tab.active .cnt { background: rgba(255,255,255,0.25); }

/* ===== v8.6x 批量简单发货：工具栏 + 复选框列 + 弹框 ===== */
.ship-mgmt-toolbar { display: flex; align-items: center; justify-content: flex-end; margin: 0 0 12px; }
.ship-mgmt-check-col { width: 36px; text-align: center; }
.ship-mgmt-check-col input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; accent-color: var(--primary); }
.simple-ship-overlay {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(8px); z-index: 400; display: flex;
  align-items: flex-start; justify-content: center; padding: 20px; overflow-y: auto;
  animation: modalBgIn 0.2s;
}
.simple-ship-box {
  background: var(--card); border-radius: var(--radius-xl); width: 100%; max-width: 440px;
  margin: 60px auto 20px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); overflow: hidden;
  animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.simple-ship-head {
  padding: 18px 24px; font-size: 16px; font-weight: 700; color: var(--text-primary);
  border-bottom: 1px solid var(--border-light);
}
.simple-ship-nos {
  padding: 12px 24px 0; font-size: 13px; color: var(--text-secondary); line-height: 1.6;
  word-break: break-all;
}
.simple-ship-label { padding: 14px 24px 8px; font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.simple-ship-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 24px 18px; }
.simple-ship-method {
  border: 1.5px solid var(--border); background: #fff; color: var(--text-primary);
  border-radius: 12px; padding: 14px 10px; font-size: 14px; font-weight: 700; cursor: pointer;
  transition: all .15s;
}
.simple-ship-method:hover { border-color: var(--primary); color: var(--primary); }
.simple-ship-method.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.simple-ship-actions { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 24px; border-top: 1px solid var(--border-light); background: var(--bg); }

/* ===== v7.24 模块四：手工确认按钮移到底部 ===== */
.pg-confirm-bar { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); display: flex; justify-content: flex-end; }
.pg-confirm-bar .btn-io-confirm { width: auto; min-width: 220px; }
.pg-confirm-bar .btn-io-confirm-green { width: auto; min-width: 220px; }
@media (max-width: 768px) {
  .pg-confirm-bar { position: sticky; bottom: 0; background: #fff; padding: 10px 0 12px; border-top: 1px solid var(--border); box-shadow: 0 -4px 12px rgba(0,0,0,0.06); z-index: 5; }
  .pg-confirm-bar .btn-io-confirm, .pg-confirm-bar .btn-io-confirm-green { width: 100%; min-width: 0; min-height: 46px; font-size: 15px; }
}

/* ===== v7.25 模块二：主界面底部「激活」按钮（始终可见） ===== */
.app-footer-bar { display: flex; justify-content: center; padding: 14px 0 18px; margin-top: auto; }
.btn-footer-activate { border: 1.5px solid var(--border); background: var(--bg-alt, #f8fafc); color: var(--text-secondary); border-radius: 999px; padding: 8px 26px; font-size: 13.5px; font-weight: 700; cursor: pointer; transition: all .15s; display: inline-flex; align-items: center; gap: 6px; }
.btn-footer-activate:hover { border-color: var(--primary); color: var(--primary); }
@media (max-width: 768px) {
  .btn-footer-activate { width: 100%; max-width: 360px; justify-content: center; min-height: 44px; font-size: 14.5px; }
}

/* ===== v7.25 模块二：注册机（授权管理）页面 ===== */
.kg-code-box { border: 1.5px dashed var(--border); border-radius: 10px; background: var(--bg-alt, #f8fafc); padding: 12px 14px; word-break: break-all; }
.kg-code-text { font-family: monospace; font-size: 15px; font-weight: 700; color: var(--primary); letter-spacing: .5px; }

/* ===== v7.26 模块六 6.2：采购统计页子页签（外协采购并入） ===== */
.subtab-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.subtab-item { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--border); background: var(--card); color: var(--text-secondary); border-radius: 999px; padding: 7px 18px; font-size: 13.5px; font-weight: 700; cursor: pointer; transition: all .15s; }
.subtab-item:hover { border-color: var(--primary); color: var(--primary); }
.subtab-item.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ===== v7.26 模块六 6.4：设置页「技术人员管理」入口卡片 ===== */
.settings-entry-card { cursor: pointer; transition: all .15s; }
.settings-entry-card:hover { border-color: var(--primary); box-shadow: 0 4px 14px rgba(99, 102, 241, 0.12); transform: translateY(-1px); }

/* ===== v7.26 模块六 6.5：设置页紧凑化（作用域样式，不影响其他页面） ===== */
.settings-compact .section-title { font-size: 14px; }
.settings-compact .form-label { font-size: 13px; }
.settings-compact .info-label { font-size: 12px; }
.settings-compact .info-value { font-size: 13px; }
.settings-compact .form-input { font-size: 13px; padding: 7px 10px; }
.settings-compact .btn { font-size: 13px; padding: 6px 14px; min-height: 30px; }
.settings-compact .btn-mini { min-height: 24px; padding: 3px 10px; font-size: 12px; }
.settings-compact .fs-btn { font-size: 13px; }
/* 「危险操作」区块（6.6 完全不改）：恢复原有大按钮与标题尺寸 */
.settings-compact .danger-zone .section-title { font-size: 17px; }
.settings-compact .danger-zone .btn { font-size: 14px; padding: 10px 20px; min-height: 0; }

/* ===== v7.27 模块十四：绩效钻取视图（仅超级管理员） ===== */
.stat-perf { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #fff; border: none; }
.stat-perf .stat-label, .stat-perf .stat-value { color: #fff; }

.perf-wrap { max-width: 900px; margin: 0 auto; }
.perf-topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.perf-crumb { font-size: 14px; color: var(--text-secondary); }
.perf-crumb b { color: var(--text); }

.perf-range { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.perf-range .form-input { width: 140px; padding: 5px 8px; font-size: 13px; }

.perf-groups { display: flex; flex-direction: column; gap: 12px; }
.perf-stage-card { padding: 12px 16px; }
.perf-stage-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.perf-stage-name { font-weight: 700; font-size: 15px; }
.perf-stage-total { font-size: 12.5px; color: var(--text-light); }
.perf-op-list { display: flex; flex-direction: column; gap: 4px; }
.perf-op-row { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; cursor: pointer; transition: background .15s; }
.perf-op-row:hover { background: var(--bg-alt, #f0f4ff); }
.perf-op-name { flex: 1; font-size: 13.5px; font-weight: 500; }
.perf-op-sets { font-size: 13px; color: var(--text-light); white-space: nowrap; }

.perf-table { font-size: 13px; }
.perf-table th { white-space: nowrap; }
.perf-photo { width: 50px; height: 50px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); cursor: zoom-in; transition: transform .15s; }
.perf-photo:hover { transform: scale(1.1); border-color: var(--primary); }

/* ===== v7.28 模块B：登记页四上传按钮紧凑化（照片/3D/视频/图纸 一行排列） ===== */
.mf-upload-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btn-mf-upload {
  display: inline-flex; align-items: center; gap: 5px;
  height: 30px; padding: 0 12px; font-size: 13px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg-alt, #f0f4ff); color: var(--text);
  cursor: pointer; white-space: nowrap; transition: all .15s;
}
.btn-mf-upload:hover { border-color: var(--primary); color: var(--primary); background: #fff; }
.btn-mf-upload:active { transform: scale(.96); }
.mf-badge {
  display: inline-flex; align-items: center;
  padding: 1px 7px; font-size: 11px; font-weight: 600;
  border-radius: 10px; background: var(--primary); color: #fff;
}
@media (max-width: 640px) {
  .btn-mf-upload { height: 32px; padding: 0 10px; }
}

/* ===== v7.28 模块C：详情页文件卡紧凑化（三维/视频/图纸一行式，无数据不留空框） ===== */
.zx-file-list { display: flex; flex-direction: column; gap: 6px; }
.zx-file-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg-alt, #f8fafd); font-size: 13px;
}
.zx-file-row:hover { border-color: var(--primary); }
.zx-file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.zx-file-size { font-size: 11.5px; color: var(--text-light); white-space: nowrap; }
.zx-video-thumb { width: 36px; height: 36px; object-fit: cover; border-radius: 6px; background: #000; flex: none; }
.btn-ft-mini {
  display: inline-flex; align-items: center; gap: 4px;
  height: 26px; padding: 0 9px; font-size: 12px;
  border: 1px solid var(--border); border-radius: 6px;
  background: #fff; color: var(--text); cursor: pointer; white-space: nowrap;
}
.btn-ft-mini:hover { border-color: var(--primary); color: var(--primary); }
.btn-ft-mini.danger { color: var(--danger); }
.btn-ft-mini.danger:hover { border-color: var(--danger); background: var(--danger); color: #fff; }

/* ===== v7.28 模块E：员工打卡系统（温暖配色 + 大按钮 + 愉悦文案） ===== */
.att-wrap { max-width: 980px; margin: 0 auto; }
.att-hero { background: linear-gradient(135deg, #fff8f0 0%, #f0f9ff 100%); }
.att-hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.att-hero-hi { font-size: 20px; font-weight: 800; color: #b45309; }
.att-hero-date { font-size: 12.5px; color: var(--text-light); margin-top: 4px; }
.att-nodes { display: flex; flex-wrap: wrap; gap: 12px; margin: 10px 0 16px; }
.att-node {
  width: 150px; min-height: 96px; padding: 12px 10px; text-align: center;
  border-radius: 14px; border: 2px solid var(--border); background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.att-node-emoji { font-size: 26px; }
.att-node-label { font-size: 14px; font-weight: 600; }
.att-node-time { font-size: 13px; color: var(--text-light); }
.att-node-done { background: #ecfdf3; border-color: #b7e4c7; }
.att-node-done .att-node-time { color: #1b7a4a; font-weight: 700; }
.att-node-next { border-color: var(--primary); background: #fff; cursor: pointer; box-shadow: 0 4px 14px rgba(45,125,210,.18); transition: transform .12s; }
.att-node-next:hover { transform: translateY(-2px); }
.att-node-next .att-node-time { color: var(--primary); font-weight: 700; }
.att-punch-btn {
  min-width: 180px; height: 54px; font-size: 17px; font-weight: 700;
  border-radius: 14px; box-shadow: 0 4px 14px rgba(45,125,210,.25);
}
.att-punch-btn:active { transform: scale(.97); }
.att-all-done { font-size: 15px; font-weight: 700; color: #1b7a4a; padding: 10px 0; }
.att-th-tip { font-size: 12px; color: var(--text-light); margin-top: 10px; }
.att-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.att-table { font-size: 13px; }
.att-month-input { width: 130px; padding: 4px 8px; font-size: 12.5px; margin-left: 8px; }
.att-hours { font-size: 13px; margin-top: 8px; color: var(--text-secondary); }
.att-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.att-stat { flex: 1; min-width: 74px; text-align: center; padding: 10px 6px; border-radius: 10px; background: var(--bg-alt, #f0f4ff); }
.att-stat-v { font-size: 20px; font-weight: 800; }
.att-stat-v.warn { color: #d97706; }
.att-stat-v.ot { color: #7c4dff; }
.att-stat-l { font-size: 11.5px; color: var(--text-light); margin-top: 2px; }
.att-recent { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.att-recent-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; padding: 4px 8px; border-radius: 8px; background: var(--bg-alt, #f8fafd); }
.att-recent-span { flex: 1; color: var(--text-secondary); }
.att-ok { color: #1b7a4a; font-weight: 700; }
.att-admin-table-wrap { overflow-x: auto; }
@media (max-width: 720px) {
  .att-grid { grid-template-columns: 1fr; }
  .att-node { width: calc(50% - 6px); min-height: 88px; }
  .att-punch-btn { width: 100%; }
}

/* ===== v7.28 模块F：工资系统 ===== */
.salary-wrap { max-width: 1200px; margin: 0 auto; }
.salary-table { font-size: 12.5px; }
.salary-table th { white-space: nowrap; }
.salary-table td { white-space: nowrap; }
.salary-table-wrap { overflow-x: auto; }
.salary-pos { color: #0e9f8a; font-weight: 700; }
.salary-neg { color: #e0592a; font-weight: 700; }
.salary-sum-row { background: var(--bg-alt, #f0f4ff); font-weight: 600; }

/* ==================== v7.33 造型主框重建（生产同步） ==================== */
.zx732-info-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  margin: 10px 0 12px;
  background: #f8fafc;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
}
.zx732-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main, #1f2937);
}
.zx732-moldno {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary, #2563eb);
  letter-spacing: 0.5px;
}
.zx732-signer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-label, #6b7280);
  white-space: nowrap;
}
.zx732-sign-input {
  width: 90px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--border, #d7dbe3);
  border-radius: 6px;
  font-size: 13px;
  color: #333;
  outline: none;
}
.zx732-sign-input:focus { border-color: var(--primary, #2563eb); }
/* v7.37 签字框只读态：系统自动填入，灰底表意不可编辑 */
.zx732-sign-readonly {
  background: #f1f5f9;
  cursor: default;
  text-align: center;
  font-weight: 600;
  color: #334155;
}
.zx732-sign-readonly:focus { border-color: var(--border, #d7dbe3); }
.zx732-date {
  font-size: 12px;
  color: var(--text-label, #6b7280);
  white-space: nowrap;
}
/* [+ 选料] 按钮与 7 项弹出面板 */
.zx-pick-wrap {
  position: relative;
  margin: 0 0 14px;
}
/* v7.38 选料区按钮升级：加高 42px、渐变实底白字、明显阴影、▾ 箭头 */
.zx-pick-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 42px;
  padding: 0 24px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #3c8cff 0%, #1677ff 60%, #0e5fd8 100%);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all .15s ease;
  user-select: none;
  box-shadow: 0 4px 14px rgba(22, 119, 255, .38), 0 1px 3px rgba(15, 23, 42, .12);
  letter-spacing: .5px;
}
.zx-pick-btn::after { content: '▾'; font-size: 14px; font-weight: 700; margin-left: 2px; }
.zx-pick-btn:hover {
  background: linear-gradient(135deg, #5a9bff 0%, #3c8cff 60%, #1677ff 100%);
  box-shadow: 0 6px 18px rgba(22, 119, 255, .48), 0 2px 5px rgba(15, 23, 42, .14);
}
.zx-pick-btn:active { transform: translateY(1px); }
.zx-pick-panel {
  display: none;
  margin-top: 8px;
  background: #fff;
  border: 1px solid var(--border, #d7dbe3);
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, .10);
  overflow: hidden;
}
.zx-pick-panel.open { display: block; }
.zx-pick-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  font-size: 14px;
  color: var(--text-main, #1f2937);
  cursor: pointer;
  transition: all .12s ease;
  user-select: none;
  border-bottom: 1px solid #f1f5f9;
}
.zx-pick-item:last-child { border-bottom: none; }
.zx-pick-item:hover { background: #f0f6ff; }
.zx-pick-item.active {
  background: #e8f1ff;
  color: var(--primary, #2563eb);
  font-weight: 600;
}
.zx-pick-item.active::after { content: '✓'; margin-left: auto; font-weight: 700; }
.zx-pick-idx {
  flex: 0 0 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef1f6;
  border-radius: 50%;
  font-size: 12px;
  color: #64748b;
}
.zx-pick-item.active .zx-pick-idx { background: var(--primary, #2563eb); color: #fff; }
/* 手机端：选料按钮满宽、面板项加大点击区 */
@media (max-width: 600px) {
  .zx732-info-row { gap: 8px; padding: 8px 10px; }
  .zx732-sign-input { width: 110px; height: 34px; font-size: 15px; }
  .zx-pick-btn { width: 100%; height: 44px; }
  .zx-pick-item { padding: 13px 14px; font-size: 15px; }
  .zx-pick-idx { flex-basis: 26px; height: 26px; }
}

/* ==================== v9.ak 造型「产品造型 / 工艺设计 / 工艺造型通道」 ==================== */
.molding-mode-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary, #2563eb);
  background: #fff;
  border: 1px solid var(--primary, #2563eb);
  border-radius: 8px;
  cursor: pointer;
  transition: all .15s ease;
  white-space: nowrap;
}
.molding-mode-btn:hover { background: #eef4ff; }
.molding-mode-btn.active { background: var(--primary, #2563eb); color: #fff; box-shadow: 0 2px 8px rgba(37, 99, 235, .28); }

/* ==================== V2.2.16 造型「开始制作」流程锁 ====================
   未开工（holder 空）或被他人占用时：三按钮 / 分类项 / 工艺设计 灰化禁用；admin/manager/超管 豁免不受限。
   本节全部为【新增】规则，既有规则一行未改。 */
.molding-mode-btn:disabled {
  cursor: not-allowed;
  color: #9ca3af;
  background: #f3f4f6;
  border-color: #e5e7eb;
  box-shadow: none;
  opacity: .8;
}
.molding-mode-btn:disabled:hover { background: #f3f4f6; }
.molding-mode-btn:disabled.active { background: #f3f4f6; color: #9ca3af; box-shadow: none; }
.zx-pick-btn:disabled {
  cursor: not-allowed;
  color: #fff;
  background: #c5cbd3;
  box-shadow: none;
  opacity: .85;
}
.zx-pick-btn:disabled:hover { background: #c5cbd3; box-shadow: none; }
.zx-pick-btn:disabled::after { opacity: .55; }
.zx-pick-item.disabled {
  cursor: not-allowed;
  color: #9ca3af;
  background: #fafafa;
  pointer-events: none;
}
.zx-pick-item.disabled:hover { background: #fafafa; }
.zx-lock-hint {
  display: inline-block;
  font-size: 12px; font-weight: 700;
  color: #b45309;
  background: rgba(245, 158, 11, .12);
  border: 1px solid rgba(245, 158, 11, .55);
  border-radius: 6px;
  padding: 3px 10px;
  white-space: nowrap;
}

.molding-product-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 12px;
  margin: 0 0 12px;
  background: #f6f9ff;
  border: 1px solid #dbe6ff;
  border-radius: 10px;
}
.molding-img-box {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 56px;
  flex: 0 0 64px;
  border: 1px dashed #b8c8e8;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
}
.molding-img-box input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.molding-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.molding-thumb-empty { font-size: 12px; color: #94a3b8; }
.molding-info { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 6px; }
.molding-info-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--text-main, #1f2937); }
.molding-3d-name { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #334155; }
.molding-3d-dl { color: var(--primary, #2563eb); text-decoration: none; font-weight: 600; }
.molding-3d-dl:hover { text-decoration: underline; }
/* V2.2.63：造型三维文件「删除」——风格与左侧「下载」完全一致（同字重/无下划线/hover 下划线），仅换成危险色 */
.molding-3d-del { color: var(--danger, #dc2626); text-decoration: none; font-weight: 600; cursor: pointer; }
.molding-3d-del:hover { text-decoration: underline; }
.molding-3d-empty { color: #94a3b8; }
.molding-3d-up {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary, #2563eb);
  background: #fff;
  border: 1px solid var(--primary, #2563eb);
  border-radius: 6px;
  cursor: pointer;
  overflow: hidden;
}
.molding-3d-up input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.molding-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.molding-confirm-btn {
  height: 36px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(22, 163, 74, .32);
}
.molding-confirm-btn:hover { filter: brightness(1.06); }
.molding-edit-btn {
  height: 36px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary, #2563eb);
  background: #fff;
  border: 1px solid var(--primary, #2563eb);
  border-radius: 8px;
  cursor: pointer;
}
.molding-edit-btn:hover { background: #eef4ff; }
.molding-process-btn {
  height: 42px;
  padding: 0 22px;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  letter-spacing: 1px;
  box-shadow: 0 4px 14px rgba(234, 88, 12, .36);
}
.molding-process-btn:hover { filter: brightness(1.06); }
.molding-process-btn:disabled { background: #cbd5e1; color: #94a3b8; cursor: not-allowed; box-shadow: none; letter-spacing: 1px; }

@media (max-width: 600px) {
  .molding-product-bar { flex-direction: column; align-items: stretch; }
  .molding-img-box { align-self: center; }
  .molding-info { min-width: 0; }
  .molding-actions { justify-content: flex-end; }
  .molding-3d-name { max-width: 140px; }
}

/* ==================== v7.34 造型「铝模上」四方框面板 ==================== */
.zx-alumup-wrap { display: none; margin-top: 10px; }
.zx-alumup-wrap.open { display: block; }
.zx-alumup-card {
  border: 1px solid var(--border, #d7dbe3);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(15, 23, 42, .10);
  overflow: hidden;
}
.zx-alumup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #f1f5f9;
  border-bottom: 1px solid var(--border, #d7dbe3);
}
.zx-alumup-title { font-size: 14px; font-weight: 700; color: #333; }
.zx-alumup-title em { font-style: normal; color: #333; margin-left: 8px; }
.zx-alumup-close { border: none; background: transparent; font-size: 20px; line-height: 1; color: #64748b; cursor: pointer; padding: 0 4px; }
.zx-alumup-close:hover { color: #ef4444; }
.zx-alumup-body { display: flex; gap: 14px; padding: 14px; }
.zx-alumup-left { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.zx-alumup-field { display: flex; align-items: center; gap: 8px; }
.zx-alumup-field label { flex: 0 0 62px; font-size: 13px; color: var(--text-label, #6b7280); }
.zx-alumup-field input {
  flex: 0 0 90px; width: 90px; height: 34px; padding: 0 6px;
  border: 1px solid var(--border, #d7dbe3); border-radius: 6px;
  font-size: 14px; font-weight: 600; color: #333; outline: none;
  text-align: center;
}
.zx-alumup-field input:focus { border-color: var(--primary, #2563eb); }
.zx-alumup-field input:disabled { background: #f8fafc; color: #94a3b8; }
/* 数量步进器：- 数字 + 三连一体 */
.zxau-qty { display: flex; align-items: center; flex: 1; min-width: 0; }
.zxau-qty button {
  flex: 0 0 34px; height: 34px;
  border: 1px solid var(--border, #d7dbe3); background: #f8fafc;
  font-size: 16px; line-height: 1; color: var(--text-main, #1f2937); cursor: pointer;
}
.zxau-qty button:first-child { border-radius: 6px 0 0 6px; }
.zxau-qty button:last-child { border-radius: 0 6px 6px 0; }
.zxau-qty button:hover:not(:disabled) { background: #e2e8f0; }
.zxau-qty button:disabled { cursor: not-allowed; opacity: .6; }
.zxau-qty input { border-radius: 0; border-left: none; border-right: none; text-align: center; }
/* 工具条按钮：统一 34px 高、圆角 6px、主色填充、等宽排布 */
.zx-alumup-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.zxau-btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 34px; min-width: 116px; padding: 0 12px;
  font-size: 13px; font-weight: 600; white-space: nowrap;
  border: 1px solid transparent; border-radius: 6px; cursor: pointer;
  transition: all .15s ease; user-select: none;
}
.zxau-btn-primary, .zxau-btn-ok { background: #1677ff; color: #fff; }
.zxau-btn-primary:hover, .zxau-btn-ok:hover { background: #3c8cff; }
.zxau-btn-del { background: #fff; color: #dc2626; border-color: #fecaca; }
.zxau-btn-del:hover { background: #fef2f2; }
.zxau-tag { margin-top: 2px; font-size: 12px; font-weight: 600; color: var(--text-label, #6b7280); }
/* 右侧大四方框照片预览区：明显大于输入框、带边框+轻微阴影 */
.zx-alumup-right { flex: 0 0 200px; }
.zxau-photo {
  position: relative;
  width: 200px; height: 170px;
  border: 1px solid var(--border, #d7dbe3); border-radius: 8px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .08);
  overflow: hidden; display: flex; align-items: center; justify-content: center;
  background: #f1f5f9;
}
.zxau-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.zxau-photo-empty { color: #94a3b8; font-size: 13px; text-align: center; padding: 0 10px; line-height: 1.6; }
/* v7.38 照片右上角 ✕ 删除钮：半透明圆形浮层 */
.zxau-photo-del {
  position: absolute; top: 6px; right: 6px;
  width: 26px; height: 26px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: none; border-radius: 50%;
  background: rgba(15, 23, 42, .60); color: #fff;
  font-size: 14px; line-height: 1; cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .30);
  transition: background .15s ease;
}
.zxau-photo-del:hover { background: #ef4444; }
/* v7.38 照片框下方按钮区：拍照/相册/更换照片 一行并排等宽 */
.zxau-photo-actions {
  display: flex; gap: 6px; margin-top: 8px; width: 200px;
}
.zxau-photo-actions .zxau-btn {
  flex: 1 1 0; min-width: 0; height: 32px; padding: 0 4px; font-size: 12px;
}
.zxau-photo-actions .zxau-btn:disabled {
  background: #e2e8f0; color: #94a3b8; cursor: not-allowed; opacity: .7;
}
.zxau-photo-actions .zxau-btn:disabled:hover { background: #e2e8f0; }
/* 按钮禁用通用态 */
.zxau-btn:disabled { cursor: not-allowed; opacity: .6; }
/* 底部确认/删除：v7.38 复制尺寸/确认/删除 三按钮并排均分、紧凑无空格 */
.zx-alumup-foot {
  display: flex; justify-content: flex-start; gap: 8px;
  padding: 12px 14px; border-top: 1px solid #f1f5f9; background: #fafbfc;
}
.zx-alumup-foot .zxau-btn { flex: 1 1 0; min-width: 0; }
/* 手机端：只读卡竖向堆叠；v7.39 编辑卡（.zxau-edit）保持与电脑端相同的
   「左输入框区 + 右照片框」两栏并排，不换行，等比缩小 */
@media (max-width: 600px) {
  .zx-alumup-body { flex-direction: column; }
  .zx-alumup-right { flex: 1 1 auto; }
  .zxau-photo { width: 100%; height: 220px; }
  .zx-alumup-field label { flex-basis: 54px; }
  .zxau-photo-actions { width: 100%; }
  .zxau-btn { min-width: 0; }
  .zx-alumup-foot .zxau-btn { flex: 1 1 0; }
  /* ---- v7.39 编辑卡：两栏并排（row + nowrap），紧凑等比缩小 ---- */
  .zxau-edit .zx-alumup-body { flex-direction: row; flex-wrap: nowrap; gap: 8px; padding: 10px; }
  .zxau-edit .zx-alumup-left { flex: 1 1 auto; min-width: 0; gap: 6px; }
  .zxau-edit .zx-alumup-field label { flex: 0 0 40px; font-size: 10px; }
  .zxau-edit .zx-alumup-field input { flex: 0 0 62px; width: 62px; height: 32px; font-size: 12px; padding: 0 4px; }
  .zxau-edit .zx-alumup-right { flex: 0 0 46%; }
  .zxau-edit .zxau-photo { width: 100%; height: 118px; }
  .zxau-edit .zxau-photo-actions { width: 100%; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
  .zxau-edit .zxau-photo-actions .zxau-btn { height: 28px; font-size: 11px; padding: 0 2px; flex: 1 1 0; }
}

/* v7.53：选料区详情卡按位置三栏（左/中/右）——左栏=位置左字段（图片模块默认此栏第一行）、
   中栏=位置中字段、右栏=位置右字段；每栏按已选列表顺序渲染「字段名：值」；手机端三栏竖排（左→中→右） */
/* v7.61：三栏容器统一父容器样式 —— display:flex; flex-wrap:wrap; gap:8px; align-items:flex-start */
.zx-cols, .mc-cols, .prog-cols { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.zx-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; }

/* ==================== v7.61：栏位排布（2rows 2排左右 / 3rows 3排左中右） ==================== */
/* 适用于 .zx-cols / .mc-cols / .prog-cols 三种三栏容器，控制子栏 .zx-col / .mc-col / .prog-col 的排布 */
/* 2rows：左/右各 calc(50% - 4px) 并排（父容器 gap 8px 均分各扣 4px，正好排满一行；位置"中"的字段已由 JS 归入右栏） */
.cols-2rows > .zx-col,
.cols-2rows > .mc-col,
.cols-2rows > .prog-col { flex: 1 1 calc(50% - 4px); min-width: 0; }
/* 3rows：左/中/右 各 100% 独占一行竖排 */
.cols-3rows > .zx-col,
.cols-3rows > .mc-col,
.cols-3rows > .prog-col { flex: 1 1 100%; min-width: 0; }
/* 栏内图片自适应：max-width:100% + height:auto，不超出栏宽 */
.zx-col img, .mc-col img, .prog-col img,
.zxau-photo img, .mc-photo img, .prog-photo img,
.photo-grid img, .photo-preview img,
.zx-field-photo img { max-width: 100%; height: auto; display: block; }
/* 图片模块容器不超出栏宽 */
.zxau-photo, .mc-photo, .prog-photo, .zx-field-photo { min-width: 0; max-width: 100%; }
/* 照片网格：flex wrap 自适应 */
.photo-grid { display: flex; flex-wrap: wrap; gap: 4px; }
.photo-grid .photo-item { max-width: calc(50% - 2px); }
/* 文本/输入框不溢出 */
.zx-col input, .mc-col input, .prog-col input,
.zx-col textarea, .mc-col textarea, .prog-col textarea { max-width: 100%; }
.zx-col, .mc-col, .prog-col { overflow-wrap: break-word; word-break: break-all; }
/* v7.61：手机端（<600px）——所有排布方式强制单列全宽竖排（不管选 2 排还是 3 排），图片仍自适应 */
@media (max-width: 600px) {
  .cols-2rows, .cols-3rows { flex-wrap: wrap; flex-direction: column; }
  .cols-2rows > .zx-col, .cols-2rows > .mc-col, .cols-2rows > .prog-col,
  .cols-3rows > .zx-col, .cols-3rows > .mc-col, .cols-3rows > .prog-col { flex: 1 1 100% !important; width: 100%; }
}
/* 编辑卡内延伸资料（src='mold'）只读展示样式 */
.zxau-mold-read { display: flex; align-items: baseline; gap: 6px; padding: 3px 0; }
.zxau-mold-read span { flex: 0 0 62px; font-size: 12px; color: var(--text-label, #6b7280); }
.zxau-mold-read b { font-size: 13px; font-weight: 600; color: var(--text-main, #1f2937); }
/* v7.54：详情页图片模块标题（显示名 display_name，空回退「图片模块」） */
.zxau-photo-wrap { display: flex; flex-direction: column; gap: 3px; }
.zxau-photo-title { font-size: 12px; font-weight: 700; color: #475569; }
@media (max-width: 600px) {
  .zx-alumup-body.zx-cols, .zxau-edit .zx-alumup-body.zx-cols { flex-direction: column; }
  .zx-col { width: 100%; flex: 1 1 auto; }
}

/* ==================== v7.36 造型选料 7 项面板网格 ==================== */
/* v7.59：父容器改 flex 并排布局 —— 每块料宽度由 page_width 决定（卡片级内联 width），
   超出自动换行、顶部对齐不等高拉伸；两个 1/2 并排一行、三个 1/3 一排、混合宽度自适应 */
.zx-pick-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
  margin-top: 10px;
}
.zx-pick-cell { min-width: 0; box-sizing: border-box; }
/* 编辑态卡片内联紧凑 */
.zxau-edit .zx-alumup-body { padding: 12px; gap: 8px; }
.zxau-edit .zx-alumup-left { gap: 8px; }
/* 只读预览卡：标签灰色小字、值深色、照片缩略图带边框 */
.zxau-readonly { box-shadow: 0 2px 8px rgba(15, 23, 42, .06); }
.zxau-readonly .zx-alumup-head { background: #f8fafc; }
.zxau-read-actions { display: flex; align-items: center; gap: 8px; }
.zxau-btn-sm { min-width: 0; height: 30px; padding: 0 12px; font-size: 12px; }
.zxau-read-field { display: flex; align-items: baseline; gap: 6px; padding: 3px 0; }
.zxau-read-field span { flex: 0 0 70px; font-size: 12px; color: var(--text-label, #6b7280); }
.zxau-read-field b { font-size: 13px; font-weight: 600; color: var(--text-main, #1f2937); }
/* 工具条按钮等宽自适应：高度统一 34px、圆角 6px、主色填充，相互宽度差最小 */
.zx-alumup-toolbar .zxau-btn { flex: 1 1 auto; min-width: 0; }
/* 手机端：面板单栏满宽 */
@media (max-width: 600px) {
  .zx-pick-grid { flex-direction: column; }
  .zx-pick-cell { width: 100% !important; }
  .zxau-read-field span { flex-basis: 62px; }
}

/* ==================== v7.40 详情页：基本信息 hero 区 + 上传文件卡片网格 ==================== */
/* 第1行模具编号大字 */
.bd-mold-no {
  font-size: 18px;
  font-weight: 700;
  color: var(--text, #1f2937);
  margin: 2px 0 12px;
  line-height: 1.3;
}
.bd-mold-no b { font-size: 20px; font-weight: 800; color: var(--primary, #2563eb); letter-spacing: .5px; }

/* hero 两栏：左图片框（纵向跨两排）+ 右信息卡两排，不换行 */
.bd-hero {
  display: flex;
  align-items: stretch;      /* 左框高度 = 右侧两排卡片总高度（含间距） */
  gap: 12px;
  flex-wrap: nowrap;
}
.bd-hero-img {
  flex: 0 0 27%;             /* 约占容器宽度 25%~30% */
  min-width: 150px;
  max-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bd-photo {
  flex: 1 1 auto;
  position: relative;
  min-height: 150px;
  background: #f1f5f9;
  border: 1px solid var(--border-light, #e5e7eb);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .06);
}
.bd-photo img { width: 100%; height: 100%; object-fit: contain; display: block; } /* 等比缩放不裁切 */
.bd-photo-empty { color: #94a3b8; font-size: 13px; }
.bd-photo-del {
  position: absolute; top: 6px; right: 6px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: rgba(15, 23, 42, .55); color: #fff;
  font-size: 13px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.bd-photo-del:hover { background: var(--danger, #dc2626); }

/* 图片框下方拍照/相册小按钮（高 28~32px） */
.bd-photo-btns { display: flex; gap: 6px; }
.bd-photo-btns button {
  flex: 1 1 0; min-width: 0;
  height: 30px;
  border: 1px solid var(--primary, #2563eb);
  background: var(--primary, #2563eb);
  color: #fff;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
}
.bd-photo-btns button:hover { opacity: .88; }
.bd-photo-btns .bd-photo-album { background: #fff; color: var(--primary, #2563eb); }
.bd-photo-btns .bd-photo-album:hover { background: #eff6ff; }

/* 多图缩略条（仅 >1 张时出现） */
.bd-thumbs { display: flex; gap: 4px; flex-wrap: wrap; }
.bd-thumb {
  position: relative; width: 34px; height: 34px;
  border-radius: 4px; overflow: hidden;
  border: 1px solid var(--border-light, #e5e7eb);
  cursor: pointer; flex: 0 0 auto;
}
.bd-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bd-thumb-del {
  position: absolute; top: 0; right: 0;
  width: 14px; height: 14px; border: none; border-radius: 0 0 0 4px;
  background: rgba(15, 23, 42, .55); color: #fff;
  font-size: 10px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.bd-thumb-del:hover { background: var(--danger, #dc2626); }

/* 右侧信息卡两排：第1排3等分、第2排4等分（权限隐藏后自适应均分） */
.bd-hero-info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.bd-row { display: flex; gap: 10px; flex-wrap: nowrap; }
.bd-row .bd-cell { flex: 1 1 0; min-width: 0; }
.bd-cell {
  background: #f9f9f9;
  border: 1px solid var(--border-light, #e5e7eb);
  border-radius: 6px;
  padding: 8px;
  overflow: hidden;
}
.bd-cell-label { color: #999; font-size: 11px; line-height: 1.4; margin-bottom: 2px; }
.bd-cell-val { color: #333; font-size: 13px; font-weight: 600; word-break: break-all; }

/* hero 下方其余字段沿用原 info-grid */
.bd-extra { margin-top: 14px; }

/* ==================== v7.40 上传文件区：按钮横排 + 文件卡片网格 ==================== */
.bd-up-btns { display: flex; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.bd-up-btn {
  flex: 1 1 0; min-width: 110px;
  height: 38px;
  border: 1px solid var(--primary, #2563eb);
  background: #fff;
  color: var(--primary, #2563eb);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: all .15s ease;
}
.bd-up-btn:hover { background: var(--primary, #2563eb); color: #fff; }

/* 文件卡片网格：≥1024px 一行4个 */
.bd-file-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.bd-file {
  position: relative;
  border: 1px solid var(--border-light, #e5e7eb);
  border-radius: 6px;
  padding: 8px;
  background: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 66px;
  overflow: hidden;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.bd-file:hover { border-color: var(--primary, #2563eb); box-shadow: 0 2px 8px rgba(37, 99, 235, .12); }
.bd-file > i { font-size: 16px; margin-bottom: 2px; }
.bd-file-name {
  font-size: 12px; color: #333; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; /* 文件名超长截断 */
}
.bd-file-meta { font-size: 10px; color: #999; margin-top: auto; }
.bd-file-del {
  position: absolute; top: 4px; right: 4px;
  width: 18px; height: 18px; border-radius: 50%;
  border: none; background: rgba(15, 23, 42, .08); color: #64748b;
  font-size: 11px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.bd-file-del:hover { background: var(--danger, #dc2626); color: #fff; }
/* 「+ 未上传」虚线占位卡 */
.bd-file-empty {
  border-style: dashed;
  background: var(--bg, #f9f9f9);
  align-items: center; justify-content: center; text-align: center;
  color: #94a3b8;
}
.bd-file-empty > i { color: #b6c2d1; }
.bd-file-empty .bd-file-name { color: #94a3b8; font-weight: 500; }
.bd-file-empty:hover { border-color: var(--primary, #2563eb); color: var(--primary, #2563eb); }

/* v7.40 响应式：600~1023px 一行3个 */
@media (max-width: 1023px) {
  .bd-file-grid { grid-template-columns: repeat(3, 1fr); }
}
/* v7.40 响应式：<600px 一行2个；hero 区等比缩小仍两栏并排不换行堆叠 */
@media (max-width: 600px) {
  .bd-mold-no { font-size: 16px; }
  .bd-mold-no b { font-size: 17px; }
  .bd-hero { gap: 8px; flex-direction: column; align-items: stretch; }   /* v9.ar：手机端上下排列（图片在上、信息在下） */
  .bd-hero-img { flex: 0 0 auto; width: 100%; min-width: 0; max-width: none; }
  .bd-photo { min-height: 0; flex: 0 0 auto; }
  .bd-photo img { height: auto; max-height: 60vh; }                      /* v9.ar：按原比例显示，不裁成窄长条 */
  .bd-hero-info { width: 100%; }
  .bd-photo-btns button { height: 28px; font-size: 11px; }
  .bd-thumbs .bd-thumb { width: 28px; height: 28px; }
  .bd-row { gap: 6px; }
  .bd-cell { padding: 6px; }
  .bd-cell-label { font-size: 10px; }
  .bd-cell-val { font-size: 12px; }
  .bd-up-btns { gap: 6px; }
  .bd-up-btn { min-width: 0; height: 34px; font-size: 12px; }
  .bd-file-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

/* ==================== v7.41 铝模下镜像布局：照片左 + 字段右 ==================== */
/* 仅铝模下（.zxau-mirror）把字段区与照片区左右对调，其余 6 项不动。
   特异性 0,3,0：桌面端覆盖 .zx-alumup-body(0,1,0)，
   手机端覆盖 .zxau-edit .zx-alumup-body(0,2,0) 的 row —— 保持各自左右布局 */
.zx-alumup-card.zxau-mirror .zx-alumup-body { flex-direction: row-reverse; }

/* ==================== v7.42 铝模上/下面板调整 ==================== */
/* 照片框下方仅两按钮（拍照/相册）：适当拉大、平均分摊各约 50% */
.zxau-photo-actions .zxau-btn { height: 34px; font-size: 13px; padding: 0 6px; }

/* 底部按钮严格排列：🗑删除(最左·短小，宽度<确认的1/2) → 📋复制尺寸(中·偏长) → ✅确认(最右·偏长) */
.zx-alumup-foot .zxau-btn.zxau-btn-del { flex: 0 0 auto; min-width: 0; padding: 0 10px; }

/* 模具分类下拉：与输入框同风格、居中 */
.zx-alumup-field select {
  flex: 1; min-width: 0; height: 34px; padding: 0 6px;
  border: 1px solid var(--border, #d7dbe3); border-radius: 6px;
  font-size: 13px; font-weight: 600; color: #333; outline: none;
  background: #fff; text-align: center; text-align-last: center;
  cursor: pointer;
}
.zx-alumup-field select:disabled { background: #f8fafc; color: #94a3b8; cursor: not-allowed; }
.zx-alumup-field select:focus { border-color: var(--primary, #2563eb); }

/* 只读预览卡：模具分类显示为标签 */
.zxau-cat-tag {
  display: inline-block; padding: 1px 8px; border-radius: 4px;
  background: #eff6ff; border: 1px solid #bfdbfe; color: #1d4ed8;
  font-size: 12px; font-weight: 600; font-style: normal; line-height: 1.5;
}

/* 手机端补充：分类下拉紧凑拉满剩余宽度 */
@media (max-width: 600px) {
  .zxau-edit .zx-alumup-field select { flex: 1 1 auto; height: 32px; font-size: 11px; padding: 0 2px; }
}

/* ==================== v7.43 铁模下：模具类型手填 + 历史记录下拉 ==================== */
/* 手填输入框沿用 .zx-alumup-field input（90px，可容纳 5~6 个汉字）；历史下拉为字段下方浮层 */
.zx-alumup-field.zxau-cat-field { position: relative; }
.zxau-cat-drop { display: none; position: absolute; top: calc(100% + 3px); left: 0; min-width: 132px; z-index: 60; }
.zxau-cat-drop.open { display: block; }
.zxau-cat-list, .zxau-cat-empty {
  background: #fff; border: 1px solid #d7dce3; border-radius: 8px;
  box-shadow: 0 8px 20px rgba(15, 35, 70, .16); overflow: hidden;
}
.zxau-cat-empty { padding: 8px 10px; font-size: 11px; color: #9aa3af; white-space: nowrap; }
.zxau-cat-opt { padding: 7px 10px; font-size: 12px; font-weight: 600; color: #333; cursor: pointer; white-space: nowrap; }
.zxau-cat-opt:hover { background: #eef4ff; color: #1c5fd6; }

/* ==================== v7.63 输入框宽度自适应栏宽（废除 v7.45 固定 132px） ==================== */
/* 模具类型 .mold-type-input / 尺寸输入框 .size-input：宽度 = 所在栏宽，不超出栏；
   box-sizing:border-box 保证 padding/border 计入宽度；文字到栏边换行 */
.mold-type-input,
.size-input {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
  box-sizing: border-box !important;
  overflow-wrap: break-word;
}
/* 多行文本域：可竖向拉伸、不小于 32px、内容自动换行 */
textarea.size-input,
.mc-f textarea.size-input {
  resize: vertical;
  min-height: 32px;
  white-space: pre-wrap;
  word-break: break-all;
}

/* ==================== v7.46 修改2：技术人员管理 —— 角色条 + 字段权限弹窗 ==================== */
/* 角色条：全部人员 + 7 个技术角色，横向排列可换行；每个角色带人数徽标和 ⚙ 字段权限按钮 */
.emp-role-chips {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px;
}
.emp-role-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 20px; cursor: pointer; user-select: none;
  background: #fff; border: 1.5px solid #d7dce3;
  font-size: 13px; font-weight: 700; color: #475569;
  transition: all .15s;
}
.emp-role-chip:hover { border-color: var(--primary, #1c5fd6); color: var(--primary, #1c5fd6); }
.emp-role-chip.active {
  background: var(--primary-soft, #eef4ff); border-color: var(--primary, #1c5fd6);
  color: var(--primary, #1c5fd6);
}
.emp-role-cnt {
  display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px;
  background: #f1f5f9; font-size: 11px; font-weight: 800; color: #64748b; text-align: center;
  line-height: 17px;
}
.emp-role-chip.active .emp-role-cnt { background: rgba(28, 95, 214, .16); color: var(--primary, #1c5fd6); }
.emp-role-cog {
  width: 22px; height: 22px; border-radius: 50%; border: none; cursor: pointer;
  background: #f1f5f9; color: #64748b; font-size: 13px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.emp-role-cog:hover { background: var(--primary, #1c5fd6); color: #fff; transform: rotate(45deg); }
/* 人员卡技术角色标签 */
.user-status.tech-role-tag { background: #fdf2e3; color: #b45309; }

/* 字段权限设置弹窗：分组勾选面板 */
.zxperm-tip {
  font-size: 12px; color: #64748b; background: #f8fafc;
  border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 10px; margin-bottom: 12px;
}
.zxperm-group {
  border: 1px solid #e2e8f0; border-radius: 10px; padding: 8px 10px; margin-bottom: 8px;
  background: #fff;
}
.zxperm-gname {
  font-size: 13px; font-weight: 800; color: #334155; margin-bottom: 6px;
  padding-left: 8px; border-left: 3px solid var(--primary, #1c5fd6);
}
.zxperm-chks {
  display: flex; flex-wrap: wrap; gap: 6px 14px;
}
.zxperm-chk {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; font-weight: 600; color: #475569; cursor: pointer;
}
.zxperm-chk input { width: 15px; height: 15px; cursor: pointer; }
.zxperm-todo { background: #fafafa; border-style: dashed; }

/* ==================== v7.46 修改3：编程环节料块卡（照片左 + 参数右 + 底部操作栏） ==================== */
/* v7.59：父容器 flex 并排布局 —— 每块料宽度由该分类 page_width 决定（卡片级内联 width） */
.zx-prog-wrap {
  margin: 10px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
}
.zx-prog-title {
  font-size: 14px; font-weight: 800; color: #334155; margin-bottom: 8px;
  flex: 0 0 100%;
}
.zx-prog-empty {
  font-size: 13px; color: #94a3b8; background: #f8fafc;
  border: 1.5px dashed #d7dce3; border-radius: 10px; padding: 14px 16px; margin: 10px 0;
  text-align: center;
}
.zx-prog-card {
  border: 1.5px solid #d7dce3; border-radius: 12px; background: #fff;
  margin-bottom: 0; overflow: hidden; box-sizing: border-box;
}
.zx-prog-card.zx-prog-done { border-color: #86d99f; background: #fbfefc; }
.zx-prog-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 12px; background: #f8fafc; border-bottom: 1px solid #e2e8f0;
}
.zx-prog-name { font-size: 14px; font-weight: 800; color: #1e293b; }
/* v7.58 修改1：导航条 = 料类型 + 模具编号 + 文件名输入框（不再显示签字人与签字时间） */
.zx-prog-moldno { font-size: 13px; font-weight: 700; color: #475569; }
.zx-prog-fn {
  height: 30px; min-width: 130px; max-width: 240px; padding: 0 9px;
  border: 1px solid #d7dbe3; border-radius: 6px;
  font-size: 13px; font-weight: 600; color: #1e293b; outline: none; background: #fff;
}
.zx-prog-fn:focus { border-color: var(--primary, #2563eb); box-shadow: 0 0 0 2px rgba(37,99,235,.12); }
.zx-prog-fn-ro { font-size: 13px; font-weight: 600; color: #334155; }
.zx-prog-badge {
  font-size: 11px; font-weight: 700; color: #b45309;
  background: #fdf2e3; border-radius: 10px; padding: 2px 9px;
}
.zx-prog-badge.ok { color: #15803d; background: #e8f8ee; }
.zx-prog-body {
  display: flex; gap: 14px; padding: 12px; align-items: flex-start;
}
.zx-prog-photo {
  width: 150px; min-width: 150px; aspect-ratio: 1 / 1;
  border: 1.5px solid #d7dce3; border-radius: 10px; overflow: hidden;
  background: #f1f5f9; display: flex; align-items: center; justify-content: center;
}
.zx-prog-photo img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; display: block; }
.zx-prog-photo-empty { font-size: 12px; color: #94a3b8; text-align: center; padding: 8px; }
.zx-prog-params { flex: 1; min-width: 0; }
.zx-prog-params-note {
  font-size: 11px; font-weight: 700; color: #9a3412; background: #fef7ee;
  border: 1px dashed #fbd7ae; border-radius: 8px; padding: 5px 9px; margin-bottom: 8px;
}
.zx-prog-field { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.zx-prog-field label { font-size: 12px; font-weight: 700; color: #64748b; min-width: 74px; }
.zx-prog-field b { font-size: 13px; color: #1e293b; }
.zx-prog-todo {
  font-size: 10px; font-weight: 700; color: #b45309;
  background: #fdf2e3; border-radius: 8px; padding: 1px 6px;
}
.zx-prog-foot {
  display: flex; gap: 8px; justify-content: flex-end;
  padding: 8px 12px; border-top: 1px solid #e2e8f0; background: #fafbfc;
}
/* 手机端(<600px)：料块卡照片/参数上下排列，照片居中缩小 */
@media (max-width: 600px) {
  .zx-prog-body { flex-direction: column; align-items: stretch; }
  .zx-prog-photo { width: 100%; min-width: 0; max-width: 220px; margin: 0 auto; }
  .zx-prog-foot { justify-content: center; flex-wrap: wrap; }
  .emp-role-chips { gap: 6px; }
  .emp-role-chip { padding: 5px 10px; font-size: 12px; }
  .zxperm-chks { gap: 5px 10px; }
}

/* ==================== v7.55 编程选料区设置：料块详情三栏 + ⚙入口 + 弹窗分组 ==================== */
/* 详情页三栏（左/中/右）：每栏按已选列表顺序渲染「字段名：值」；手机端竖排（左→中→右） */
.prog-cols { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; width: 100%; }
.prog-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.prog-col + .prog-col { border-left: 1px dashed #e2e8f0; padding-left: 14px; }
.prog-fld { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.prog-fld-name { flex: 0 0 auto; font-size: 12px; font-weight: 700; color: #64748b; min-width: 60px; }
.prog-fld-val { font-size: 13px; font-weight: 600; color: #1e293b; word-break: break-all; white-space: pre-wrap; }
.prog-fld-popup { color: #1c5fd6; text-decoration: underline dotted; cursor: pointer; }
.prog-fld-input { flex: 1 1 auto; min-width: 90px; }
/* v7.62：编程自定义字段下拉类型（select 渲染 + 勾选弹出模式） */
.prog-fld-select { flex: 1 1 auto; min-width: 90px; }
.prog-fld-sel-hidden { display: none; }
.prog-fld-popbtn { color: #1c5fd6; text-decoration: underline dotted; cursor: pointer; }
.prog-fld-popval { color: #1c5fd6; cursor: pointer; text-decoration: underline dotted; }
#progfld-selpop-sel { padding: 8px 10px; font-size: 14px; }
/* 图片模块（照片预览 + 显示名标题） */
.prog-photo-wrap { display: flex; flex-direction: column; gap: 3px; margin-bottom: 2px; }
.prog-photo-title { font-size: 12px; font-weight: 700; color: #475569; }
.prog-photo {
  width: 100%; max-width: 220px; aspect-ratio: 1 / 1;
  border: 1.5px solid #d7dce3; border-radius: 10px; overflow: hidden;
  background: #f1f5f9; display: flex; align-items: center; justify-content: center;
}
.prog-photo img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; display: block; }
.prog-photo-empty { font-size: 12px; color: #94a3b8; text-align: center; padding: 8px; }

/* ---------- v8.16 料块图片模块：右上角迷你按钮 + 坐标水印底印 ---------- */
/* 标题行：左标题 + 右迷你按钮组（按钮高度 ≤ 标题文字 12px 行高，做小） */
.prog-photo-title { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.prog-photo-btns { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; }
.prog-photo-mini {
  height: 15px; padding: 0 4px; font-size: 9px; line-height: 1; font-weight: 700;
  color: #475569; background: #fff; border: 1px solid #cbd5e1; border-radius: 4px;
  cursor: pointer; white-space: nowrap; transition: all .15s ease;
}
.prog-photo-mini:hover { color: var(--primary, #1c5fd6); border-color: var(--primary, #1c5fd6); background: #f0f6ff; }
/* 坐标水印（canvas 代码绘制，纯白 X/Y 箭头 + 黑描边）：绝对定位铺满整个图片框；箭头永远最上层，盖图片之上 */
.prog-photo { position: relative; }
.prog-photo-axis {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 2;  /* v8.29：箭头层 z-index 最高，永远盖在图片之上（pointer-events:none 不挡图片点击） */
}
/* v8.28：canvas 透明背景，禁设 opacity（否则描边一起变透明）；整层不透明度保持 1 */
.prog-photo-axis .prog-axis-canvas { width: 100%; height: 100%; display: block; opacity: 1; }
/* 图片层在下（z-index 1 < 箭头 2）；更换图片只替换/重绘此层，箭头层不重建、位置不变 */
.prog-photo img { position: relative; z-index: 1; }
/* 无图空态：箭头仍最上层居中完整显示；占位文字下移避开箭头中心，不被箭头遮挡 */
.prog-photo-axis-wrap .prog-photo-empty-txt { position: relative; z-index: 1; transform: translateY(30px); }

/* 料块卡片头部 ⚙ 选料区设置按钮（管理员） */
.zxau-btn-gear {
  display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px;
  font-size: 12px; font-weight: 700; color: #475569; background: #fff;
  border: 1.5px solid #cbd5e1; border-radius: 8px; cursor: pointer; transition: all .15s ease;
}
.zxau-btn-gear:hover { border-color: var(--primary, #1c5fd6); color: var(--primary, #1c5fd6); background: #f0f6ff; }
/* 设置弹窗分组标题（选用上面资料 / 自定义字段）+ 必显标记 + popup 弹窗 */
.prog-tpl-sec { margin-top: 6px; color: #1c5fd6; }
.zxtpl-locked { font-size: 10px; font-weight: 700; color: #b45309; background: #fdf2e3; border-radius: 8px; padding: 1px 6px; }
.prog-popup-modal { max-width: 480px; }
@media (max-width: 600px) {
  .prog-cols { flex-direction: column; }
  .prog-col + .prog-col { border-left: none; padding-left: 0; border-top: 1px dashed #e2e8f0; padding-top: 10px; }
  .prog-photo { max-width: 100%; }
  /* v7.59：手机端详情框强制单列全宽（覆盖 page_width 内联 width） */
  .zx-prog-wrap { flex-direction: column; }
  .zx-prog-card { width: 100% !important; }
}

/* ==================== v7.47 选料区字段全局模板（⚙ 选料区设置） ==================== */
/* 修改2：设置入口 —— 造型「选料区」按钮旁（仅管理员可见） */
.zx-pick-btns { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.zx-tpl-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  height: 42px; padding: 0 16px; font-size: 13px; font-weight: 700;
  color: #475569; background: #fff; border: 1.5px solid #cbd5e1; border-radius: 10px;
  cursor: pointer; transition: all .15s ease; user-select: none;
}
.zx-tpl-btn:hover { border-color: var(--primary, #1c5fd6); color: var(--primary, #1c5fd6); background: #f0f6ff; }
.zx-tpl-btn:active { transform: translateY(1px); }

/* 设置弹窗：左分类列表 + 右字段管理（☰拖拽 / 字段名 / 类型 / 框宽 / ☑显示 / ×删除） */
.zxtpl-modal { max-width: 880px; }
.zxtpl-body { display: flex; gap: 14px; padding: 16px; }
.zxtpl-cats { flex: 0 0 118px; display: flex; flex-direction: column; gap: 6px; }
.zxtpl-cat {
  padding: 8px 10px; border-radius: 8px; cursor: pointer; user-select: none;
  background: #fff; border: 1.5px solid #d7dce3;
  font-size: 13px; font-weight: 700; color: #475569; text-align: center;
  transition: all .15s;
}
.zxtpl-cat:hover { border-color: var(--primary, #1c5fd6); color: var(--primary, #1c5fd6); }
.zxtpl-cat.active {
  background: var(--primary-soft, #eef4ff); border-color: var(--primary, #1c5fd6);
  color: var(--primary, #1c5fd6);
}

/* ==================== v8.xx：装配选料区「副」层级树 + 参数总汇面板 ==================== */
.zxtpl-tree { flex: 0 0 176px; display: flex; flex-direction: column; gap: 8px; }
.zxtpl-tree-set { border: 1.5px solid #d7dce3; border-radius: 10px; padding: 8px 10px; background: #f8fafc; }
.zxtpl-tree-set-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 6px; }
.zxtpl-tree-set-name { font-size: 13px; font-weight: 800; color: #1e293b; }
.zxtpl-tree-set-tip { font-size: 11px; color: #94a3b8; }
.zxtpl-tree-all { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: #475569; cursor: pointer; }
.zxtpl-tree-all input { width: 15px; height: 15px; cursor: pointer; }
.zxtpl-tree-children { display: flex; flex-direction: column; gap: 5px; padding-left: 8px; border-left: 2px solid #eef2f7; }
.zxtpl-tree-node {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 7px 9px; border-radius: 8px; cursor: pointer; user-select: none;
  background: #fff; border: 1.5px solid #d7dce3; font-size: 12px; font-weight: 700; color: #475569;
  transition: all .15s;
}
.zxtpl-tree-node:hover { border-color: var(--primary, #1c5fd6); color: var(--primary, #1c5fd6); }
.zxtpl-tree-node.active { background: var(--primary-soft, #eef4ff); border-color: var(--primary, #1c5fd6); color: var(--primary, #1c5fd6); }
.zxtpl-tree-node-label { flex: 0 0 auto; }
.zxtpl-tree-node-hint { flex: 1; text-align: right; font-size: 10px; font-weight: 600; color: #94a3b8; }
.zxtpl-tree-node input[type="checkbox"] { flex: 0 0 auto; width: 15px; height: 15px; margin: 0; cursor: pointer; accent-color: var(--primary, #1c5fd6); }
.zxtpl-tree-summary { border-style: dashed; }
/* v9.xx：装配选料区「拼副」模板级规则（上/下副号下拉 + 小件归副勾选） */
.zxtpl-tree-pair { border: 1.5px dashed #cbd5e1; border-radius: 10px; padding: 8px 10px; background: #fbfcfe; display: flex; flex-direction: column; gap: 6px; }
.zxtpl-tree-pair-head { font-size: 12px; font-weight: 800; color: #1e293b; }
.zxtpl-tree-pair-tip { font-size: 10px; color: #94a3b8; line-height: 1.4; }
.zxtpl-pair-row { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: #475569; }
.zxtpl-pair-label { flex: 0 0 auto; }
.zxtpl-pair-arrow { flex: 0 0 auto; color: #94a3b8; font-weight: 600; }
.zxtpl-pair-check { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; font-weight: 700; }
.zxtpl-pair-check input { width: 15px; height: 15px; margin: 0; cursor: pointer; accent-color: var(--primary, #1c5fd6); }
.zxtpl-pair-sel { flex: 1 1 auto; min-width: 0; height: 28px; padding: 0 6px; border: 1.5px solid #d7dce3; border-radius: 7px; background: #fff; font-size: 12px; font-weight: 700; color: #1e293b; }
.zxtpl-pair-sel:disabled { opacity: .5; }

.zxtpl-summary-panel { display: flex; flex-direction: column; gap: 10px; }
.zxtpl-summary-title { font-size: 13px; font-weight: 800; color: #334155; padding-left: 8px; border-left: 3px solid var(--primary, #1c5fd6); }
.zxtpl-sum-section { border: 1.5px solid #e2e8f0; border-radius: 10px; background: #fff; }
.zxtpl-sum-section.off { opacity: .55; }
.zxtpl-sum-section-head { padding: 8px 12px; border-bottom: 1px solid #f1f5f9; }
.zxtpl-sum-show { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: #1e293b; cursor: pointer; }
.zxtpl-sum-show input { width: 15px; height: 15px; cursor: pointer; }
.zxtpl-sum-section-body { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; }
.zxtpl-sum-group { border: 1px solid #f1f5f9; border-radius: 8px; background: #fbfcfe; padding: 8px 10px; }
.zxtpl-sum-group-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.zxtpl-sum-group-name { font-size: 12px; font-weight: 800; color: #475569; }
.zxtpl-sum-group-all { font-size: 11px; font-weight: 700; color: var(--primary, #1c5fd6); background: none; border: none; cursor: pointer; padding: 0; }
.zxtpl-sum-group-all:hover { text-decoration: underline; }
.zxtpl-sum-fields { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.zxtpl-sum-field { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: #334155; cursor: pointer; }
.zxtpl-sum-field input { width: 14px; height: 14px; cursor: pointer; }
.zxtpl-sum-empty { font-size: 12px; color: #94a3b8; }

.zxtpl-main { flex: 1; min-width: 0; }
.zxtpl-gtitle {
  font-size: 13px; font-weight: 800; color: #334155; margin-bottom: 8px;
  padding-left: 8px; border-left: 3px solid var(--primary, #1c5fd6);
}
.zxtpl-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.zxtpl-row {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px;
  background: #fff; border: 1.5px solid #e2e8f0; border-radius: 10px;
}
.zxtpl-row.dragging { opacity: .4; }
.zxtpl-row.over { border-color: var(--primary, #1c5fd6); box-shadow: 0 0 0 2px rgba(28, 95, 214, .15); }
.zxtpl-row-img { background: #f6fbff; border-color: #bcd9f7; }
.zxtpl-drag { cursor: grab; color: #94a3b8; font-size: 15px; line-height: 1; flex: 0 0 auto; }
.zxtpl-drag:active { cursor: grabbing; }
.zxtpl-idx { flex: 0 0 auto; min-width: 16px; font-size: 11px; font-weight: 800; color: #94a3b8; text-align: center; }
.zxtpl-name {
  flex: 1 1 0; min-width: 0; font-size: 13px; font-weight: 700; color: #1e293b;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* v7.54：字段名「点击编辑显示文字」——可点击（虚线下划线）+ 编辑态单行输入框 */
.zxtpl-name-edit { cursor: pointer; border-bottom: 1px dashed #94a3b8; }
.zxtpl-name-edit:hover { color: #1c5fd6; border-bottom-color: #1c5fd6; background: #f0f6ff; border-radius: 3px; }
.zxtpl-name-input {
  flex: 1 1 0; min-width: 0; height: 28px; padding: 0 6px;
  border: 1.5px solid #1c5fd6; border-radius: 6px; font-size: 13px; font-weight: 700; color: #1e293b;
  outline: none; box-shadow: 0 0 0 2px rgba(28, 95, 214, .15);
}
.zxtpl-type {
  flex: 0 0 auto; font-size: 11px; font-weight: 700; color: #334155;
  background: #f1f5f9; border-radius: 10px; padding: 2px 9px; white-space: nowrap;
}
.zxtpl-row-img .zxtpl-type { color: #15803d; background: #e8f8ee; }
.zxtpl-width {
  flex: 0 0 auto; width: 92px; height: 30px; padding: 0 4px;
  border: 1px solid #d7dbe3; border-radius: 6px;
  font-size: 12px; font-weight: 600; color: #333; background: #fff;
  outline: none; cursor: pointer;
}
.zxtpl-width-na { flex: 0 0 auto; width: 92px; text-align: center; font-size: 12px; color: #94a3b8; }
.zxtpl-show {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600; color: #475569; cursor: pointer; white-space: nowrap;
}
.zxtpl-show input { width: 15px; height: 15px; cursor: pointer; }
.zxtpl-del {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; border: none; cursor: pointer;
  background: #fee2e2; color: #dc2626; font-size: 15px; font-weight: 700; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; transition: all .15s;
}
.zxtpl-del:hover { background: #dc2626; color: #fff; }
.zxtpl-empty {
  font-size: 13px; color: #94a3b8; background: #f8fafc;
  border: 1.5px dashed #d7dce3; border-radius: 10px; padding: 16px;
  text-align: center; margin-bottom: 10px;
}

/* ＋ 添加自定义字段（折叠展开表单：字段名 / 类型 / 框宽 / 下拉选项值） */
.zxtpl-add { border: 1.5px dashed #b9cdf0; border-radius: 10px; padding: 10px; background: #fbfdff; }
.zxtpl-add-title { font-size: 13px; font-weight: 800; color: var(--primary, #1c5fd6); cursor: pointer; user-select: none; }
.zxtpl-add-title:hover { text-decoration: underline; }
.zxtpl-form { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.zxtpl-form.open { max-height: 440px; }
/* v7.58 修改2：添加自定义字段表单 —— 中间内容区滚动，[确认添加] 按钮 sticky 固定底部始终可见 */
.zxtpl-form-scroll { max-height: 330px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.zxtpl-form-foot {
  position: sticky; bottom: 0; z-index: 2;
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 8px 0 2px; margin-top: 4px;
  background: #fff; border-top: 1px solid #eef2f6;
}
.zxtpl-form-foot .btn { margin-top: 0; }
/* v7.58 修改2：下拉选项多输入框（默认 1 个 + [＋ 添加选项] 逐个加，✕ 删除至少留 1 个） */
.zxtpl-opts-box { flex: 1 1 100%; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.zxtpl-opts-list { display: flex; flex-direction: column; gap: 6px; }
.zxtpl-opt-row { display: flex; align-items: center; gap: 6px; }
.zxtpl-opt-row input[type="text"] { flex: 1 1 0; scroll-margin-bottom: 70px; }
.zxtpl-opt-del {
  flex: 0 0 30px; height: 30px; line-height: 1;
  border: 1px solid #fca5a5; border-radius: 6px; background: #fef2f2;
  color: #dc2626; font-size: 15px; font-weight: 700; cursor: pointer;
}
.zxtpl-opt-del:hover { background: #fee2e2; }
.zxtpl-opts-add {
  align-self: flex-start;
  height: 28px; padding: 0 12px;
  border: 1px dashed #93b4f2; border-radius: 6px; background: #f5f8ff;
  color: var(--primary, #2563eb); font-size: 12px; font-weight: 700; cursor: pointer;
}
.zxtpl-opts-add:hover { background: #e8efff; }
.zxtpl-form-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.zxtpl-form-row label { flex: 0 0 44px; font-size: 12px; font-weight: 700; color: #64748b; }
.zxtpl-form input[type="text"] {
  flex: 1 1 0; min-width: 0; height: 34px; padding: 0 8px;
  border: 1px solid #d7dbe3; border-radius: 6px; font-size: 13px; color: #333; outline: none;
}
.zxtpl-form input[type="text"]:focus { border-color: var(--primary, #2563eb); }
.zxtpl-form select {
  height: 34px; padding: 0 6px; border: 1px solid #d7dbe3; border-radius: 6px;
  font-size: 13px; font-weight: 600; color: #333; background: #fff; outline: none; cursor: pointer;
}
.zxtpl-fw { font-size: 12px; font-weight: 700; color: #64748b; }
.zxtpl-form .btn { margin-top: 10px; }

/* 底部：提示文字靠左，取消 / 保存按钮靠右 */
.zxtpl-tip { margin-right: auto; font-size: 12px; color: #94a3b8; align-self: center; }

/* 修改3：模板字段新类型 —— 长文本（编辑卡 textarea / 只读卡换行保留） */
.zx-tf-field { align-items: flex-start; }
.zx-tf-field label { padding-top: 7px; }
.zx-tf-input {
  width: 100%; max-width: 100%; box-sizing: border-box;
  height: auto; min-height: 52px; padding: 6px 8px;
  border: 1px solid var(--border, #d7dbe3); border-radius: 6px;
  font-size: 13px; font-weight: 500; color: #333; outline: none;
  line-height: 1.5; resize: vertical; text-align: left; background: #fff;
  white-space: pre-wrap; word-break: break-all;
}
.zx-tf-input:focus { border-color: var(--primary, #2563eb); }
.zx-tf-input:disabled { background: #f8fafc; color: #94a3b8; }
.zxau-read-field.zx-tf-read { align-items: flex-start; }
.zx-tf-read b { white-space: pre-wrap; word-break: break-all; font-weight: 500; }

/* 手机端(<600px)：设置弹窗改上下布局，字段行允许换行 */
@media (max-width: 600px) {
  .zx-pick-btns { flex-direction: column; align-items: stretch; }
  .zx-tpl-btn { width: 100%; }
  .zxtpl-modal { max-width: 96vw; margin: 12px auto; }
  .zxtpl-body { flex-direction: column; padding: 12px; gap: 10px; }
  .zxtpl-cats { flex: 0 0 auto; flex-direction: row; flex-wrap: wrap; }
  .zxtpl-cat { padding: 6px 10px; font-size: 12px; }
  .zxtpl-tree { flex: 0 0 auto; }
  .zxtpl-tree-children { flex-direction: row; flex-wrap: wrap; padding-left: 0; border-left: none; }
  .zxtpl-tree-node { flex: 1 1 auto; min-width: 88px; }
  .zxtpl-row { flex-wrap: wrap; gap: 6px; }
  .zxtpl-name { flex: 1 1 100%; }
  .zxtpl-width { width: 84px; }
  .zxtpl-tip { display: none; }
  .zxtpl-form.open { max-height: 480px; }
  /* v7.58：手机端选项输入不被键盘遮挡（滚动区高度自适应 + 聚焦元素预留底部空间） */
  .zxtpl-form-scroll { max-height: 46vh; }
  .zxtpl-opt-row input[type="text"] { min-width: 0; }
  .zx-prog-fn { flex: 1 1 130px; max-width: none; }
}

/* ==================== v7.51 修改4：机加工料块详情页统一结构 ==================== */
.mc-card { border: 1px solid var(--border, #d7dbe3); border-radius: 10px; background: #fff; box-shadow: 0 6px 20px rgba(15,23,42,.10); overflow: hidden; }
/* v7.59：机加工料块卡父容器 flex 并排 —— 每块料宽度由该分类 page_width 决定（卡片级内联 width） */
.mc-plates-flex { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; }
.mc-plates-flex > .plate-card.mc-card { margin: 0; box-sizing: border-box; }
.mc-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 14px; background: #f1f5f9; border-bottom: 1px solid var(--border, #d7dbe3);
}
.mc-title { font-size: 15px; font-weight: 800; color: #1f2937; }
/* v9.98 → v9.99：机加工员工精简视角「编程延伸原图」大方块 —— 跟电脑端 .mc-block-refphoto 一致（1:1 大图）
   手机端竖屏窄 → max-height: 60vh 避免占满整屏；标签左上角浮在图上 */
.mc-prog-ref {
  position: relative; display: block; margin: 6px 14px 0;
  width: calc(100% - 28px); aspect-ratio: 1 / 1; max-height: 60vh;
  background: #f8fafc; border: 1px solid var(--border, #d7dbe3); border-radius: 8px; overflow: hidden; cursor: zoom-in;
}
.mc-prog-ref img { width: 100%; height: 100%; object-fit: contain; display: block; }
/* iOS<15/旧 WebView 兜底：aspect-ratio 不生效时用 padding-top 撑 1:1 高度 */
.mc-prog-ref { min-height: 160px; }
@supports not (aspect-ratio: 1 / 1) {
  .mc-prog-ref { aspect-ratio: auto; padding-top: 100%; position: relative; }
  .mc-prog-ref img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
}
.mc-prog-ref-tag {
  position: absolute; left: 6px; top: 6px; padding: 2px 8px; font-size: 11px; font-weight: 700;
  color: #fff; background: rgba(22, 119, 255, 0.85); border-radius: 10px; pointer-events: none;
}
/* v7.52：按位置排三栏 —— 左栏(图片模块+选左字段) / 中栏(延伸资料) / 右栏(自定义字段+加工操作)
   flex 布局：有内容的栏均分宽度，空栏不占位；手机端竖排（左→中→右 从上到下） */
.mc-cols { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px; align-items: flex-start; }
.mc-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
/* 图片模块（上料/下料照片区）：默认左栏第一行，位置/显示由设置控制 */
.mc-photo { min-width: 0; width: 100%; }
.mc-photo .photo-grid { grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); }
.mc-photo .photo-item img { height: 86px; object-fit: cover; }
.mc-sec-title {
  font-size: 12px; font-weight: 700; color: #64748b;
  padding: 4px 8px; border-radius: 6px; background: #f8fafc;
  border-left: 3px solid #1677ff; margin-bottom: 6px;
}
.mc-upstream { grid-template-columns: 1fr 1fr; gap: 4px 12px; }
.mc-upstream .rp-item { padding: 3px 0; border-bottom: 1px dashed #eef2f7; }
.mc-upstream .rp-item:last-child { border-bottom: none; }
/* 本工序自定义字段：模板字段网格（框宽由模板 zxWidthStyle 控制） */
.mc-fields-grid { display: flex; flex-wrap: wrap; gap: 8px 12px; padding: 0 0 2px; }
.mc-f { display: flex; align-items: center; gap: 6px; }
.mc-f label { font-size: 12px; color: #6b7280; white-space: nowrap; flex: 0 0 auto; }
.mc-f b { font-size: 13px; font-weight: 700; color: #1f2937; white-space: pre-wrap; word-break: break-all; }
.mc-f .size-input { height: 32px; padding: 0 6px; font-size: 13px; text-align: center; }
.mc-f textarea.size-input { height: auto; text-align: left; padding: 5px 6px; }
.mc-f-img img { width: 100%; height: 92px; object-fit: cover; border-radius: 6px; border: 1px solid #e2e8f0; }
.mc-img-empty {
  min-width: 120px; height: 92px; display: flex; align-items: center; justify-content: center;
  border: 1px dashed #cbd5e1; border-radius: 6px; color: #94a3b8; font-size: 12px; background: #f8fafc;
}
/* 底部按钮：确认 / 编辑 / 删除 / 已转工序 */
.mc-foot {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px 14px; border-top: 1px solid #f1f5f9; background: #fafbfc;
}
.mc-foot .btn-io-confirm { margin: 0; }
.btn-io-blue { background: #1677ff; color: #fff; }
.btn-io-blue:hover { background: #3c8cff; }
.btn-io-red { background: #fff; color: #dc2626; border-color: #fecaca; }
.btn-io-red:hover { background: #fef2f2; }
/* 机加工字段设置弹窗：上游延伸信息勾选区 + v7.52 位置下拉（左/中/右） */
.mctpl-sec { font-size: 12px; font-weight: 700; color: #64748b; margin: 10px 0 6px; }
.mctpl-ups { display: flex; flex-wrap: wrap; gap: 6px; }
.mctpl-up {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 8px; border: 1px solid #d7dbe3; border-radius: 6px;
  font-size: 12px; background: #fff; user-select: none;
}
.mctpl-up-chk { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.mctpl-up input { accent-color: #1677ff; }
.mctpl-up em { font-style: normal; color: #1677ff; font-size: 11px; }
.mctpl-up.mctpl-up-locked { background: #f8fafc; border-style: dashed; }
/* v8.10：上下移动按钮（▲▼，设置弹窗行内通用）+ 机加工模块排序列表 */
.zxtpl-mv {
  flex: 0 0 auto; width: 20px; height: 20px; padding: 0; margin: 0;
  border: 1px solid #d7dbe3; border-radius: 4px; background: #fff;
  color: #475569; font-size: 9px; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.zxtpl-mv:hover:not(:disabled) { border-color: #1677ff; color: #1677ff; background: #f0f7ff; }
.zxtpl-mv:disabled { opacity: 0.35; cursor: not-allowed; }
/* 补丁一：四向控件 ☐左/☐右 文字勾选（替代 ←→ 箭头）—— 勾左落左栏 / 勾右落右栏，选中态高亮 */
.mctpl-dir {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 7px; border: 1px solid #d7dbe3; border-radius: 6px;
  font-size: 11px; font-weight: 700; color: #64748b; background: #fff;
  cursor: pointer; user-select: none; white-space: nowrap;
}
.mctpl-dir input { accent-color: #1677ff; margin: 0; }
.mctpl-dir.on { border-color: #1677ff; color: #1677ff; background: #f0f7ff; }
.zxtpl-io-list { display: flex; flex-direction: column; gap: 5px; }
.zxtpl-row-io { display: flex; align-items: center; gap: 8px; padding: 5px 8px; }
.zxtpl-row-io .zxtpl-name { flex: 1 1 auto; }
/* v7.52：字段位置下拉（设置弹窗行内） */
.zxtpl-pos {
  flex: 0 0 auto; height: 26px; padding: 0 4px; font-size: 12px;
  border: 1px solid #d7dbe3; border-radius: 6px; background: #fff; color: #1f2937; cursor: pointer;
}
.zxtpl-pos:focus { outline: none; border-color: #1677ff; }
/* v7.52：图片模块设置区（位置 + 显示/隐藏） */
.mctpl-photo {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 10px; border: 1px solid #bcd9f7; border-radius: 6px;
  background: #f6fbff; font-size: 12px;
}
.mctpl-photo > label:first-child { font-weight: 700; color: #475569; }
.mctpl-photo-tip { font-size: 11px; color: #94a3b8; flex: 1 1 100%; }
/* v7.53：选料区设置弹窗 —— 选用上面资料面板（两组候选）+ 图片模块设置区 */
.zxtpl-up { margin-top: 8px; border: 1px solid #d7dbe3; border-radius: 8px; background: #fff; padding: 8px 10px; }
.zxtpl-up-sec { font-size: 12px; font-weight: 700; color: #64748b; margin: 4px 0 6px; }
.zxtpl-up-items { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.zxtpl-up-chk { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border: 1px solid #d7dbe3; border-radius: 6px; font-size: 12px; background: #fff; cursor: pointer; user-select: none; }
.zxtpl-up-chk input { accent-color: #1677ff; }
.zxtpl-up-chk.locked { background: #f8fafc; border-style: dashed; }
.zxtpl-up-chk em { font-style: normal; color: #1677ff; font-size: 11px; }
.zxtpl-up-foot { text-align: right; }
.zxtpl-photo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding: 8px 10px; border: 1px solid #bcd9f7; border-radius: 6px; background: #f6fbff; font-size: 12px; }
.zxtpl-photo-title { font-weight: 700; color: #475569; flex: 1 1 100%; }
/* v7.56 造型选料区设置弹窗「流转设置」区块（下一步流向 + 作用范围三选一） */
.zxtpl-flow { margin-top: 10px; padding: 10px 12px; border: 1px solid #fbbf24; border-radius: 6px; background: #fffbeb; font-size: 12px; }
.zxtpl-flow-title { display: block; font-weight: 700; color: #92400e; margin-bottom: 6px; }
.zxtpl-flow-row { display: flex; align-items: flex-start; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.zxtpl-flow-row > label:first-child { min-width: 72px; color: #475569; padding-top: 4px; }
.zxtpl-flow-next { padding: 4px 8px; border: 1px solid #cbd5e1; border-radius: 4px; font-size: 12px; min-width: 132px; background: #fff; }
.zxtpl-flow-scopes { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.zxtpl-flow-scope { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid #e5e7eb; border-radius: 4px; cursor: pointer; background: #fff; transition: border-color .15s, background .15s; }
.zxtpl-flow-scope:hover { border-color: #f59e0b; }
.zxtpl-flow-scope.active { border-color: #f59e0b; background: #fffbeb; }
.zxtpl-flow-scope.disabled { opacity: .5; cursor: not-allowed; }
.zxtpl-flow-scope input[type=radio] { margin: 0; }
.zxtpl-flow-scope-name { font-weight: 600; color: #334155; }
.zxtpl-flow-scope-desc { color: #94a3b8; font-style: normal; font-size: 11px; margin-left: 4px; }
.zxtpl-flow-tip { margin-top: 6px; color: #94a3b8; font-size: 11px; }
@media (max-width: 600px) { .zxtpl-flow-row { flex-direction: column; align-items: stretch; } .zxtpl-flow-row > label:first-child { min-width: 0; padding-top: 0; } }
/* v7.90 任务5：「沿用上面资料」分组勾选区块（选料区设置弹窗内；蓝色系与流转设置的黄色区分） */
.zxtpl-carry { margin-top: 10px; padding: 10px 12px; border: 1px solid #93c5fd; border-radius: 6px; background: #eff6ff; font-size: 12px; }
.zxtpl-carry-title { display: block; font-weight: 700; color: #1e40af; margin-bottom: 4px; }
.zxtpl-carry-sub { color: #64748b; font-size: 11px; margin-bottom: 8px; line-height: 1.5; }
.zxtpl-carry-groups { display: flex; flex-direction: column; gap: 8px; }
.zxtpl-carry-group { border: 1px solid #dbeafe; border-radius: 6px; background: #fff; padding: 6px 8px; }
.zxtpl-carry-group.carry-last { border-color: #60a5fa; }
.zxtpl-carry-src { font-weight: 600; color: #334155; margin-bottom: 5px; }
.zxtpl-carry-last-tag { font-style: normal; font-size: 10px; color: #1d4ed8; background: #dbeafe; border-radius: 4px; padding: 1px 5px; margin-left: 4px; }
.zxtpl-carry-items { display: flex; flex-wrap: wrap; gap: 6px; }
.zxtpl-carry-foot { margin-top: 8px; text-align: right; }
/* ==================== v7.98：选料区设置弹窗「引用上一步资料」区块（橙系区分沿用蓝系） ==================== */
.zxtpl-ref { margin-top: 10px; padding: 10px 12px; border: 1px solid #fdba74; border-radius: 6px; background: #fff7ed; font-size: 12px; }
.zxtpl-ref-title { display: block; font-weight: 700; color: #c2410c; margin-bottom: 4px; }
.zxtpl-ref-sub { color: #64748b; font-size: 11px; margin-bottom: 8px; line-height: 1.5; }
.zxtpl-ref-mods { display: flex; flex-direction: column; gap: 8px; }
.zxtpl-ref-mod { border: 1px solid #fed7aa; border-radius: 6px; background: #fff; padding: 6px 8px; }
.zxtpl-ref-mod-head { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.zxtpl-ref-mod-all { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; user-select: none; }
.zxtpl-ref-mod-all input { accent-color: #ea580c; }
.zxtpl-ref-mod-name { font-weight: 600; color: #9a3412; }
.zxtpl-ref-mod-cnt { color: #94a3b8; font-size: 11px; }
.zxtpl-ref-items { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.zxtpl-ref-chk { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; cursor: pointer; user-select: none; color: #334155; }
.zxtpl-ref-chk input { accent-color: #ea580c; }
.zxtpl-ref-foot { margin-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.zxtpl-ref-cnt { color: #9a3412; font-size: 11px; }
@media (max-width: 600px) { .zxtpl-ref-mods { gap: 6px; } .zxtpl-ref-items { gap: 4px 10px; } .zxtpl-ref-foot { flex-direction: column; align-items: stretch; } }
/* v7.98：料块面板「引用上一步资料」字段行（只读引用，橙系与模板字段区分） */
.prog-fld-ref .prog-fld-name { color: #b45309; }
.prog-fld-ref .prog-fld-val { color: #7c2d12; }
.stdtpl-tip { margin-top: 10px; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 6px; background: #f8fafc; color: #64748b; font-size: 12px; line-height: 1.6; }
@media (max-width: 600px) { .zxtpl-carry-groups { gap: 6px; } .zxtpl-carry-sub { font-size: 10px; } }
/* ==================== v7.57 修改5：选料区设置弹窗「详情页显示大小」区块 ==================== */
.zxtpl-pw { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding: 8px 10px; border: 1px solid #a7d8c4; border-radius: 6px; background: #f2fbf7; font-size: 12px; }
.zxtpl-pw-title { font-weight: 700; color: #0f766e; flex: 1 1 100%; }
.zxtpl-pw > label { color: #475569; }
.zxtpl-pw-sel { padding: 4px 8px; border: 1px solid #cbd5e1; border-radius: 4px; font-size: 12px; min-width: 140px; background: #fff; }

/* ==================== v7.57 修改1：自定义字段「图片模块」照片区（详情页） ==================== */
/* 结构：.zxfp-wrap（标题 + 三操作按钮 + 缩略图网格；每张右上角 ✕ 删除；支持多张） */
.zxfp-wrap { border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; padding: 8px 10px; }
.zxfp-title { font-size: 12px; font-weight: 700; color: #475569; margin-bottom: 6px; }
.zxfp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; }
.zxfp-thumb { position: relative; aspect-ratio: 1 / 1; border-radius: 6px; overflow: hidden; border: 1px solid #e2e8f0; background: #f8fafc; }
.zxfp-thumb img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; display: block; }
.zxfp-thumb-del { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%; border: none; background: rgba(220, 38, 38, .88); color: #fff; font-size: 12px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.zxfp-thumb-del:hover { background: #dc2626; }
.zxfp-empty { grid-column: 1 / -1; padding: 14px 0; text-align: center; font-size: 12px; color: #94a3b8; border: 1px dashed #e2e8f0; border-radius: 6px; background: #fafbfc; }
.zxfp-actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.zxfp-btn { flex: 1 1 0; min-width: 0; height: 28px; font-size: 11px; padding: 0 4px; }

/* v7.57 修改1：从系统照片引用弹窗（本模具已有照片网格，点击引用存引用关系不复制文件） */
.zxfp-ref-modal { max-width: 640px; }
.zxfp-ref-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.zxfp-ref-item { border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; cursor: pointer; background: #fff; transition: border-color .15s, box-shadow .15s; }
.zxfp-ref-item:hover { border-color: #1677ff; box-shadow: 0 2px 8px rgba(22, 119, 255, .18); }
.zxfp-ref-item img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
.zxfp-ref-name { font-size: 11px; color: #64748b; text-align: center; padding: 4px 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* v7.57 修改5：手机端（<600px）——详情页容器强制 100% 单列全宽（覆盖 page_width 内联 max-width） */
/* v7.59：卡片级 width 内联覆盖 —— 机加工料块卡同规则单列全宽（造型/编程见各自媒体查询区） */
@media (max-width: 600px) {
  .zx-cols, .prog-cols, .mc-cols { max-width: 100% !important; }
  .mc-plates-flex { flex-direction: column; }
  .mc-plates-flex > .plate-card.mc-card { width: 100% !important; }
  .zxfp-grid { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
  .zxfp-actions { gap: 4px; }
  .zxfp-btn { flex: 1 1 30%; }
  .zxfp-ref-grid { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); }
}

/* ==================== v7.66：手机端（≤600px）整体 1/2 并排 + 基本信息区均衡分栏 ==================== */
/* 电脑端 2 排（左50%+右50%）保持不变；手机端覆盖 v7.61「强制单列」旧规则，改为左右 1/2 并排占满屏幕。
   三栏容器 = 选料区详情卡（造型 .zx-cols / 机加工 .mc-cols / 编程 .prog-cols），
   子栏 = .zx-col/.mc-col/.prog-col；2rows 两栏各 50%，3rows 三栏各 33.33% */
@media (max-width: 600px) {
  /* 整体：1/2 并排（覆盖 v7.61 单列 column 规则） */
  .zx-cols, .mc-cols, .prog-cols {
    display: flex !important;
    flex-wrap: nowrap !important;
    flex-direction: row !important;
    width: 100%;
    gap: 4px;
  }
  /* 2 排：左右各 50% 并排占满屏幕 */
  .cols-2rows > .zx-col, .cols-2rows > .mc-col, .cols-2rows > .prog-col {
    flex: 1 1 auto !important;
    width: 50% !important;
    min-width: 0;
    flex-shrink: 1;
    box-sizing: border-box;
  }
  /* 3 排：三栏各 33.33% 并排 */
  .cols-3rows > .zx-col, .cols-3rows > .mc-col, .cols-3rows > .prog-col {
    flex: 1 1 auto !important;
    width: 33.33% !important;
    min-width: 0;
    flex-shrink: 1;
    box-sizing: border-box;
  }
  /* 栏内图片：不超出栏宽、不变形 */
  .zx-col img, .mc-col img, .prog-col img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  /* 字段：12px 可见，长文本不超出栏宽不截断（覆盖 .zx-col 默认 100% 宽度带来的溢出） */
  .zx-alumup-field, .zxau-read-field, .mc-f, .prog-fld {
    font-size: 12px;
    line-height: 1.4;
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-all;
    white-space: pre-wrap;
  }
  /* 字段标签：11px 紧凑 */
  .zx-alumup-field > label, .zxau-read-field > span, .mc-f > label, .prog-fld-name {
    font-size: 11px;
    margin-bottom: 2px;
  }
}
/* ========== 基本信息区（模具详情页 viewMold 的「📋 基本信息」卡）均衡分栏 ==========
   字段长短不一，硬分左右会高低参差 —— 用 CSS 多列 column-count 自动分配字段块，
   浏览器自动平衡左右两列高度（column-fill:balance）。不新增 HTML 类，直接映射现有容器：
   .bd-hero-info = 3+4 信息卡区（bd-row > bd-cell）；.info-grid.bd-extra = 其余字段（info-item） */
@media (max-width: 600px) {
  /* hero 3+4 卡：行改块级（不再一行硬排），字段卡由 columns 自动分两列均衡 */
  .bd-hero-info {
    column-count: 2 !important;
    column-gap: 8px !important;
    width: 100%;
  }
  .bd-hero-info .bd-row {
    display: block;
    width: 100%;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }
  .bd-hero-info .bd-row .bd-cell {
    width: 100%;
    display: block;
    margin-bottom: 4px;
    box-sizing: border-box;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }
  /* 其余字段（登记日期/数量/交货日期/收款日期等）：自动分两列均衡 */
  .info-grid.bd-extra {
    display: block;
    column-count: 2 !important;
    column-gap: 8px !important;
    width: 100%;
  }
  .info-grid.bd-extra .info-item {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
    margin-bottom: 4px;
    width: 100%;
    box-sizing: border-box;
  }
  /* 3 排模式（页面存在 .cols-3rows 详情卡）：普通区域三栏 33.33% 并排（见上方），基本信息区三列均衡 */
  body:has(.cols-3rows) .bd-hero-info,
  body:has(.cols-3rows) .info-grid.bd-extra {
    column-count: 3 !important;
    column-gap: 6px !important;
  }
}

/* ===== v7.72：设置页「功能入口」统一 1/4 等宽等高小方块按钮 ===== */
/* 数据备份/系统名称/服务器地址/系统更新（弹窗化）+ 模板/一键隐藏/保存为模板（v7.71 三控件自选料区设置弹窗 footer 移入） */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: 100%;
}
/* 小方块卡片：图标在上 + 文字在下，水平垂直居中，等宽等高（grid stretch + min-height 保底） */
.settings-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 72px;
  padding: 10px 6px;
  background: var(--bg-alt, #f0f4ff);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all .15s;
  text-align: center;
}
.settings-tile:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.12);
}
.settings-tile:active { transform: translateY(1px); }
.settings-tile-icon { font-size: 20px; line-height: 1; }
.settings-tile-label { line-height: 1.3; word-break: keep-all; }
/* 窄屏自适应：≤480px 改每行 3 个，避免按钮过窄（手机端设置面板同样可访问可点） */
@media (max-width: 480px) {
  .settings-grid { grid-template-columns: repeat(3, 1fr); }
  .settings-tile { min-height: 64px; font-size: 12.5px; gap: 4px; padding: 8px 4px; }
  .settings-tile-icon { font-size: 18px; }
}

/* ===== v7.74：选料区设置弹窗「📋 复制到其他模块」 ===== */
/* 弹窗内按钮区块（与栏位排布/字段列表同级，虚线分隔视觉） */
.zxtpl-copy {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  margin-top: 12px; padding: 10px 12px;
  border: 1px dashed var(--border); border-radius: var(--radius);
  background: var(--bg-alt, #f8faff);
}
.zxtpl-copy-tip { font-size: 12px; color: var(--text-light, #8a94a6); flex: 1; min-width: 180px; }
/* 复制选择弹窗 */
.copytpl-modal { max-width: 560px; }
.copytpl-body { max-height: 62vh; overflow: auto; }
.copytpl-cur { font-size: 13px; color: var(--text-secondary); background: var(--primary-soft); border-radius: var(--radius); padding: 8px 12px; margin-bottom: 10px; line-height: 1.5; }
.copytpl-all { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; color: var(--text-secondary); padding: 4px 0; cursor: pointer; border-bottom: 1px solid var(--border); }
.copytpl-group { margin-top: 10px; }
.copytpl-group-title { font-size: 12px; font-weight: 700; color: var(--text-light, #8a94a6); padding-bottom: 4px; margin-bottom: 6px; }
.copytpl-group-items { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 10px; }
.copytpl-item { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-secondary); cursor: pointer; }
.copytpl-item:hover { color: var(--primary); }
.copytpl-warn { margin-top: 12px; font-size: 12px; color: var(--warning, #b45309); background: rgba(217, 119, 6, 0.07); border-radius: var(--radius); padding: 8px 10px; line-height: 1.5; }
/* v8.01：复制弹窗「同时复制字段数据」选项（仅造型显示） */
.copytpl-data { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--text-secondary); background: var(--primary-soft); border-radius: var(--radius); padding: 8px 10px; margin-top: 10px; line-height: 1.5; cursor: pointer; }
.copytpl-data input { margin-top: 3px; flex: none; }
.copytpl-data b { color: var(--primary); }
.copytpl-data i { font-style: normal; color: var(--text-light, #8a94a6); font-size: 12px; }
@media (max-width: 480px) {
  .copytpl-group-items { grid-template-columns: repeat(2, 1fr); }
  .copytpl-modal { max-width: 94vw; }
}

/* ==================== v7.76 新增：按类型设流转路径（造型选料区设置弹窗底部小入口 + 独立配置弹窗） ==================== */
/* 入口：选料区设置弹窗 footer 内与「取消/保存」同排的小字链接按钮（体积小、不撑大原弹窗） */
.zxtpl-flowrule-entry {
  height: 30px; padding: 0 10px; margin-left: auto;
  font-size: 12px; font-weight: 600; color: var(--primary, #1c5fd6);
  background: transparent; border: none; border-radius: 6px;
  cursor: pointer; white-space: nowrap; transition: all .15s ease;
}
.zxtpl-flowrule-entry:hover { background: #f0f6ff; text-decoration: underline; }
/* 独立配置弹窗（可稍大：多行规则） */
.zxflowrule-modal { max-width: 780px; }
.zxflowrule-body { display: flex; flex-direction: column; gap: 10px; }
.zxflowrule-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.zxflowrule-bar-tip { flex: 1; min-width: 260px; font-size: 12px; color: var(--text-light, #64748b); line-height: 1.6; }
.zxflowrule-list { display: flex; flex-direction: column; gap: 10px; }
.zxflowrule-row { border: 1.5px solid #d7dce3; border-radius: 10px; padding: 10px 12px; background: #fff; }
.zxflowrule-row.off { opacity: .62; background: #f8fafc; }
.zxflowrule-rowhead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.zxflowrule-rowlabel { font-size: 12px; font-weight: 700; color: #475569; flex-shrink: 0; }
.zxflowrule-type {
  flex: 1; min-width: 200px; height: 32px; padding: 0 10px;
  font-size: 13px; color: var(--text, #1e293b);
  border: 1.5px solid #cbd5e1; border-radius: 8px; background: #fff; outline: none;
}
.zxflowrule-type:focus { border-color: var(--primary, #1c5fd6); }
.zxflowrule-en { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: #475569; white-space: nowrap; cursor: pointer; }
.zxflowrule-delrow {
  height: 28px; padding: 0 10px; font-size: 12px; font-weight: 700; color: #dc2626;
  background: #fff; border: 1.5px solid #fecaca; border-radius: 8px; cursor: pointer; transition: all .15s ease; white-space: nowrap;
}
.zxflowrule-delrow:hover { background: #fef2f2; border-color: #dc2626; }
.zxflowrule-rowsub { font-size: 12px; color: var(--text-light, #64748b); margin-top: 8px; }
.zxflowrule-steps { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.zxflowrule-step {
  display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 8px 0 6px;
  font-size: 12px; font-weight: 700; color: #1e40af; background: #eff6ff;
  border: 1.5px solid #bfdbfe; border-radius: 8px; cursor: grab; user-select: none; white-space: nowrap;
}
.zxflowrule-step:hover { border-color: var(--primary, #1c5fd6); }
.zxflowrule-step.dragging { opacity: .45; border-style: dashed; }
.zxflowrule-step.over { border-color: var(--primary, #1c5fd6); box-shadow: 0 0 0 2px rgba(28, 95, 214, .15); }
.zxflowrule-step-h { font-style: normal; color: #93a4bd; font-size: 11px; cursor: grab; }
.zxflowrule-step-x {
  font-style: normal; font-weight: 700; color: #94a3b8; cursor: pointer;
  width: 16px; height: 16px; line-height: 14px; text-align: center; border-radius: 4px;
}
.zxflowrule-step-x:hover { color: #fff; background: #dc2626; }
.zxflowrule-addstep {
  height: 30px; padding: 0 10px; font-size: 12px; font-weight: 700; color: var(--primary, #1c5fd6);
  background: #fff; border: 1.5px dashed #93b4f5; border-radius: 8px; cursor: pointer; white-space: nowrap;
}
.zxflowrule-addstep:hover { background: #f0f6ff; }
.zxflowrule-empty { font-size: 12px; color: #94a3b8; }
/* 添加环节多选浮层 */
.zxflowrule-picker { margin-top: 8px; padding: 8px 10px; background: #f8fafc; border: 1.5px dashed #cbd5e1; border-radius: 8px; }
.zxflowrule-picker-title { font-size: 12px; color: var(--text-light, #64748b); margin-bottom: 6px; }
.zxflowrule-picker-items { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.zxflowrule-picker-item { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: #334155; cursor: pointer; }
.zxflowrule-picker-item.off { color: #b6c2d2; cursor: not-allowed; }
.zxflowrule-picker-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
@media (max-width: 768px) {
  .zxflowrule-modal { max-width: 96vw; }
  .zxflowrule-type { min-width: 140px; }
  .zxtpl-flowrule-entry { margin-left: 0; }
}

/* ===== v7.77：设置页布局压缩（使用提示+危险区 并排 / 软件激活+注册机 并排 / 更新日志收起为入口按钮+弹窗） ===== */
/* 两列 1/2 并排容器：宽屏 grid 两列；卡片垂直间距沿用 .card 自身 margin-bottom:12px，水平间距 12px 与之统一 */
.settings-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; align-items: start; }
.settings-duo .card { min-width: 0; } /* 防止内部长文本撑破列宽 */
/* 更新日志入口卡片：收成一行小按钮，不占空间 */
.changelog-entry-card { display: flex; align-items: center; padding: 10px 18px; }
.changelog-entry-btn {
  border: none; background: transparent; color: var(--primary); font-size: 13px; font-weight: 700;
  cursor: pointer; padding: 4px 2px; min-height: 0; line-height: 1.5; text-align: left;
  border-radius: 6px; transition: background .15s;
}
.changelog-entry-btn:hover { background: rgba(99, 102, 241, 0.08); text-decoration: underline; }
/* 更新日志弹窗：稍大 + 正文区独立滚动，版本条目沿用现有 details 折叠样式 */
.changelog-modal { max-width: 640px; }
.changelog-modal .modal-body { max-height: 60vh; overflow-y: auto; padding-top: 6px; }
@media (max-width: 768px) {
  /* 窄屏：并排容器堆叠为上下排列，每模块占满宽 */
  .settings-duo { grid-template-columns: 1fr; }
  .changelog-modal { max-width: 96vw; }
}

/* ===== v7.78：手机端（≤768px）模具详情页工序料块卡片一行一个满宽 ===== */
/* 电脑端（>768px）不动：继续按 page_width（1/2=两列并排、1/3、1/4）flex 换行排列；
   手机端把原 ≤600px 单列断点扩到 ≤768px，覆盖 page_width 内联 width，一行一个占满屏宽；
   卡片内部布局（左右分栏/栏位排布/字号）零接触，随容器等比自适应缩放，不变形不溢出；
   窄屏（≤480px）同样命中本规则。 */
@media (max-width: 768px) {
  /* 造型选料区：料块卡单列满宽 */
  .zx-pick-grid { flex-direction: column; }
  .zx-pick-cell { width: 100% !important; }
  /* 编程：料块卡单列满宽 */
  .zx-prog-wrap { flex-direction: column; }
  .zx-prog-card { width: 100% !important; }
  /* v8.23：手工/机加工对称卡手机端恢复满宽（覆盖电脑端 50% 外轮廓） */
  .sg-block-card, .mc-block-card { max-width: 100% !important; margin: 0; }
  /* 机加工：料块卡单列满宽 */
  .mc-plates-flex { flex-direction: column; }
  .mc-plates-flex > .plate-card.mc-card { width: 100% !important; }
  /* 卡内多列容器不超出屏宽（防横向滚动；内部左右分栏比例不变） */
  .zx-cols, .prog-cols, .mc-cols { max-width: 100% !important; }
}

/* v8.62 的「手机端重排单列」规则已整体移除 —— 由文件末尾 v8.63「等比缩放」方案取代：
   手机端不再重排布局，改为按电脑端设计宽度渲染后整体 zoom 缩小铺满屏宽（详见 v8.63 注释）。 */

/* ==================== v8.04 ②A：机加工「上料/下料」拍照计时模块（固定显示，右侧框架列） ==================== */
/* 每块料右侧一个大框，分上料/下料两区上下叠放；总高与左栏 flex 等高对齐（align-self:stretch） */
.mc-photoio { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 0 0 216px; align-self: stretch; justify-content: center; }
/* 2rows（默认两栏）：拍照列与左右栏并排一行（其余栏收窄均分剩余宽度） */
.mc-cols.has-photoio.cols-2rows { flex-wrap: nowrap; }
.mc-cols.has-photoio.cols-2rows > .mc-col { flex: 1 1 0; }
/* 3rows（三栏竖排）：拍照列跟随堆叠，占满一行（位于底部） */
.cols-3rows > .mc-photoio { flex: 1 1 100%; }
/* 单区（上料 / 下料）：左右排列 —— 左照片框、右（时间+打卡人+确认） */
.mc-photoio-zone { display: flex; flex-direction: row; align-items: stretch; gap: 8px; padding: 8px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; }
.mc-photoio-zone.mc-photoio-disabled { opacity: .55; background: #f8fafc; border-style: dashed; }
.mc-photoio-lock-tip { font-size: 11px; color: #94a3b8; }
/* 右侧信息列：标题 + 锁提示 + 人/时间 + 确认按钮 */
.mc-photoio-side { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; justify-content: center; }
/* 照片框：无照片=虚线占位（点击调相机）；有照片=最新一张+数量角标；锁定后只读可点开放大 */
.mc-photoio-frame { position: relative; flex: 0 0 88px; width: 88px; min-height: 96px; border: 2px dashed #cbd5e1; border-radius: 8px; background: #f8fafc; display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: pointer; transition: border-color .15s, background .15s; }
.mc-photoio-frame:hover { border-color: #1677ff; background: #f0f7ff; }
.mc-photoio-frame.mc-photoio-frame-off { cursor: default; border-style: solid; border-color: #e2e8f0; }
.mc-photoio-frame.mc-photoio-frame-off:hover { border-color: #e2e8f0; background: #f8fafc; }
.mc-photoio-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.mc-photoio-count { position: absolute; right: 4px; bottom: 4px; font-size: 10px; color: #fff; background: rgba(15, 23, 42, .65); border-radius: 4px; padding: 1px 5px; }
.mc-photoio-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; color: #94a3b8; font-size: 11px; text-align: center; padding: 0 4px; }
.mc-photoio-empty i { font-size: 20px; }
/* 照片框右上角「相册」小按钮：点框直接相机，点此按钮走相册导入 */
.mc-photoio-album { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border: none; border-radius: 6px; background: rgba(15, 23, 42, .55); color: #fff; font-size: 11px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 2; }
.mc-photoio-album:hover { background: #1677ff; }
/* 信息行：人 + 时间；下料区再加用时 */
.mc-photoio-info { font-size: 11px; color: #475569; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.mc-photoio-info i { color: #1677ff; }
.mc-photoio-info.mc-photoio-dim { color: #94a3b8; }
.mc-photoio-btn { margin: 0; }
/* 手机端（≤600px 并排模式）：拍照列收窄为窄列跟排；≤480px 进一步紧凑 */
@media (max-width: 600px) {
  .mc-cols > .mc-photoio { flex: 0 0 108px !important; width: 108px !important; }
}
@media (max-width: 480px) {
  .mc-cols > .mc-photoio { flex: 0 0 96px !important; width: 96px !important; }
}

/* ==================== v8.05 ②B：手工制作料块「单个拍照确认」模块（固定显示） ==================== */
/* 手工 zx-prog-card 内部：单拍照框（不分上料/下料）—— 左照片框 + 右（拍照时间+打卡人+确认） */
.sg-photoio { display: flex; flex-direction: column; gap: 6px; margin: 4px 12px 10px; padding: 8px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; }
.sg-photoio.sg-photoio-done { background: #f0fdf4; border-color: #bbf7d0; }
.sg-photoio-title { font-size: 12px; font-weight: 600; color: #334155; display: flex; align-items: center; gap: 6px; }
.sg-photoio-badge { font-size: 11px; font-weight: 400; color: #16a34a; }
.sg-photoio-row { display: flex; flex-direction: row; align-items: stretch; gap: 8px; }
.sg-photoio-frame { flex: 0 0 88px; width: 88px; }
.sg-photoio-side .mc-photoio-info { font-size: 11px; }
.sg-photoio-btn { margin: 0; padding: 4px 10px; font-size: 12px; align-self: flex-start; }
.sg-photoio-btn:disabled { opacity: .5; cursor: not-allowed; }
/* 相册小按钮（复用 mc-photoio-album 位置样式） */
.sg-photoio .mc-photoio-album { position: absolute; top: 4px; right: 4px; }
/* 手机端紧凑 */
@media (max-width: 480px) {
  .sg-photoio-frame { flex: 0 0 76px; width: 76px; }
}

/* ==================== v8.09 ①：机加工料块右侧「上料/下料」直显模块（详情页面板） ==================== */
/* 大框（mc-io）纵向两小框（上料/下料 zone），右侧区撑满卡片剩余宽度自适应 */
.zx-prog-body { position: relative; }
.sg-photoio.mc-io { display: flex; flex-direction: column; gap: 8px; margin: 8px 12px 10px; padding: 10px; border: 1.5px solid #bfdbfe; border-radius: 10px; background: #f8fbff; }
.sg-photoio.mc-io .mc-photoio-zone { display: flex; flex-direction: row; align-items: stretch; gap: 10px; padding: 8px; border: 1px solid #dbeafe; border-radius: 8px; background: #fff; }
.sg-photoio.mc-io .mc-photoio-zone.mc-photoio-disabled { opacity: .55; background: #f8fafc; border-style: dashed; }
.sg-photoio.mc-io .mc-photoio-frame { flex: 0 0 128px; width: 128px; min-height: 72px; height: 72px; }  /* 长方形图片框 */
.sg-photoio.mc-io .mc-photoio-side { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; justify-content: center; }
.sg-photoio.mc-io .mc-photoio-btn { align-self: flex-start; margin: 2px 0 0; padding: 4px 14px; font-size: 12px; }
.sg-photoio.mc-io .machine-io-title { font-size: 12px; font-weight: 600; color: #334155; }
.sg-photoio.mc-io.sg-photoio-done { background: #f0fdf4; border-color: #bbf7d0; }
.sg-photoio.mc-io .mc-photoio-info { font-size: 11px; }
@media (max-width: 480px) {
  .sg-photoio.mc-io .mc-photoio-frame { flex: 0 0 96px; width: 96px; height: 64px; }
}

/* ==================== v8.17：选料区设置整体重排 —— 第一排入口 + 设计区（标注来源/拖拽排序） ==================== */
/* 第一排两入口（沿用上面资料选择区 + 自定义），并排常驻 */
.zxtpl-topbar { display: flex; gap: 8px; margin-bottom: 10px; }
.zxtpl-entry-btn {
  flex: 1 1 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 8px 12px; border: 1.5px dashed #b9cdf0; border-radius: 10px;
  background: #fbfdff; cursor: pointer; text-align: left; font-size: 13px; font-weight: 700; color: #1c5fd6;
  transition: all .15s;
}
.zxtpl-entry-btn em { font-style: normal; font-size: 11px; font-weight: 600; color: #94a3b8; }
.zxtpl-entry-btn:hover { border-color: var(--primary, #1c5fd6); background: #f0f6ff; }
/* 设计区主体 */
.zxtpl-design { border: 1.5px solid #e2e8f0; border-radius: 12px; padding: 10px; background: #fcfdff; margin-bottom: 10px; }
.zxtpl-design-foot { text-align: right; margin-top: 10px; }
/* 补丁一：排版区内联预览（左右双列 · 与详情页同一套网格 · 电脑双列/手机同双列不降级） */
.mctpl-preview {
  margin-top: 10px; border: 1.5px dashed #cbd5e1; border-radius: 10px;
  padding: 10px; background: #f8fafc;
}
.mctpl-pv-title { font-size: 12px; font-weight: 700; color: #64748b; margin-bottom: 8px; }
.mctpl-pv-cols { display: flex; flex-direction: row; gap: 10px; align-items: stretch; }
.mctpl-pv-col {
  flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 6px;
  border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px; background: #fff;
}
.mctpl-pv-item {
  padding: 5px 8px; border: 1px solid #eef2f7; border-radius: 6px;
  background: #fbfcfe; font-size: 12px; color: #1e293b;
}
.mctpl-pv-empty { font-size: 11px; color: #94a3b8; text-align: center; padding: 6px; }
/* 补丁一通：内联预览上下纵向流（top 置顶 / bottom 置底） */
.mctpl-pv-vflow { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.mctpl-pv-vflow:last-child { margin-bottom: 0; }
.mctpl-pv-vtag { font-size: 10px; font-weight: 700; color: #94a3b8; }
/* 来源标注 */
.zxtpl-srctag { flex: 0 0 auto; font-size: 11px; font-weight: 700; border-radius: 10px; padding: 2px 8px; white-space: nowrap; }
.zxtpl-srctag-carry { color: #1d4ed8; background: #dbeafe; }
.zxtpl-srctag-custom { color: #15803d; background: #dcfce7; }
.zxtpl-srctag-mold { color: #9333ea; background: #f3e8ff; }
.zxtpl-srctag-mc { color: #0e7490; background: #cffafe; }
.zxtpl-srctag-prog { color: #1d4ed8; background: #dbeafe; }
/* 机加工：上游延伸字段拼入设计区 */
.zxtpl-ups-inline { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }

/* ==================== v8.18：进行中列表·8 区横条进度条（③~⑦连成一条 + 分支位⑥上下叠放） ==================== */
/* 一行卡：整行 8 区（①照片+键 ②参数 ③~⑦进度条 ⑧加急标识）；flex 百分比宽，窄屏整条等比缩放不换行不滚动 */
.mold-rail {
  display: flex; align-items: flex-start; gap: 12px; width: 100%;
}
/* ① 照片 + 一键加急（原按钮原功能原 onclick，仅容器归位） */
.rail-c1 { flex: 0 0 72px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.rail-c1 .mold-thumb { width: 64px; height: 64px; }
.rail-c1 .cell1-urgent { display: flex; }
.rail-c1 .btn-urgent { font-size: 11px; padding: 3px 8px; white-space: nowrap; }
/* ② 基本参数（编号/优先级/产品/客户/交期/环节标签）——顶对齐不塌陷 */
.rail-c2 { flex: 0 0 30%; min-width: 180px; display: flex; flex-direction: column; gap: 3px; min-height: 64px; }
.rail-c2 .mold-name, .rail-c2 .mold-meta { font-size: clamp(11px, 1vw, 13px); }
/* v8.74 提示词四：待发货横条副数行「铝模 X 副 · 铁模 Y 副」（仅 toship 筛选显示，只读） */
.mold-shipsets {
  margin-top: 3px; align-self: flex-start; white-space: nowrap;
  font-size: clamp(11px, 1vw, 13px); font-weight: 800; color: #0f2f5f;
  background: #eef5ff; border: 1px solid #cfe0fb; border-radius: 6px; padding: 2px 8px;
}
/* ③~⑦ 进度条区：一条横向进度条，整体居中、横向约占 1/3 */
.rail-c3 { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; min-width: 0; }
.progress-rail { display: flex; align-items: center; gap: 4px; max-width: 46%; min-width: 260px; }
.rail-node { display: flex; align-items: center; justify-content: center; }
/* 工序格：圆角 + 轻阴影立体感；格尺寸自适应（宽屏舒展/窄屏等比缩） */
.rail-c3 .stage-cell {
  width: clamp(38px, 4.2vw, 52px); height: clamp(38px, 4.2vw, 52px);
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(15, 35, 60, .16), 0 1px 2px rgba(15, 35, 60, .10);
}
.rail-c3 .stage-cell:hover { box-shadow: 0 3px 9px rgba(15, 35, 60, .22); }
/* 连接线：进度条贯通感 */
.rail-line { flex: 0 1 22px; min-width: 8px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, #c9d4e0, #dde3ea); }
/* 分支位⑥：铁模装配/手工制作 同格上下叠放、整体垂直居中 */
.rail-branch { flex-direction: column; gap: 4px; }
/* 发货格⑦：格内下方百分比（已完成/总工序） */
.rail-fh { flex-direction: column; gap: 2px; }
.rail-pct { font-size: clamp(10px, 0.95vw, 12px); font-weight: 800; color: var(--primary, #1c5fd6); white-space: nowrap; }
/* ⑧ 行末区 = 价格含税（保留）+ 加急显示区（仅标识非按钮）——纵向叠放，不满留空 */
.rail-c8 {
  flex: 0 0 76px; display: flex; flex-direction: column; align-items: flex-end; justify-content: flex-start;
  gap: 6px; min-height: 64px;
}
.rail-c8 .btn-quickship { font-size: 11px; padding: 3px 8px; white-space: nowrap; }
.rail-price {
  font-size: clamp(11px, 1vw, 13px); font-weight: 800; color: var(--primary, #1c5fd6);
  white-space: nowrap; text-align: right;
}
.rail-tax {
  font-size: 10px; font-weight: 700; color: #047857; background: #d1fae5;
  border-radius: 8px; padding: 1px 6px; margin-left: 4px; white-space: nowrap;
}
.urgent-mark {
  font-size: 12px; font-weight: 800; color: #ef4444;
  background: #fff5f5; border: 1.5px solid #fecaca; border-radius: 8px; padding: 3px 9px;
  white-space: nowrap;
}
/* 手机窄屏：整条等比缩成一行、不换行不横向滚动；间距宽松→紧凑但不密集 */
@media (max-width: 720px) {
  .mold-rail { gap: 8px; flex-wrap: nowrap; align-items: center; }
  .rail-c1 { flex: 0 0 54px; }
  .rail-c1 .mold-thumb { width: 48px; height: 48px; }
  .rail-c2 { flex: 1 1 34%; min-width: 0; min-height: 48px; }
  .rail-c2 .mold-number { font-size: 13px; }
  .rail-c2 .mold-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .rail-c2 .mold-meta { display: none; }
  .progress-rail { max-width: none; min-width: 0; flex: 1 1 auto; gap: 3px; }
  .rail-line { flex: 0 1 10px; min-width: 4px; }
  .rail-c3 .stage-cell { width: clamp(30px, 8.5vw, 40px); height: clamp(30px, 8.5vw, 40px); border-radius: 8px; }
  .rail-c8 { flex: 0 0 auto; }
  .rail-c8 .urgent-mark { font-size: 10px; padding: 2px 6px; }
  .rail-c8 .btn-quickship { font-size: 10px; padding: 2px 6px; }
}

/* ==================== v8.20：造型「✏️ 自定义」独立弹窗（与沿用资料展开面板完全分离） ==================== */
.zxtpl-custom-dialog { max-width: 430px; width: 92%; }
.zxtpl-custom-dialog .modal-body { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; }
.zxtpl-custom-dialog .zxtpl-form-row { display: flex; align-items: flex-start; gap: 10px; }
.zxtpl-custom-dialog .zxtpl-form-row > label { flex: 0 0 58px; padding-top: 7px; font-size: 13px; font-weight: 700; color: #334155; }
.zxtpl-custom-dialog .zxtpl-form-row input[type="text"],
.zxtpl-custom-dialog .zxtpl-form-row select {
  flex: 1 1 0; min-width: 0; padding: 7px 10px; border: 1.5px solid #dbe3ee; border-radius: 8px; font-size: 13px;
}
.zxtpl-custom-dialog .zxtpl-form-row input[type="text"]:focus,
.zxtpl-custom-dialog .zxtpl-form-row select:focus { border-color: var(--primary, #1c5fd6); outline: none; }
.zxtpl-custom-tip { font-size: 12px; color: #94a3b8; line-height: 1.5; padding-top: 2px; }

/* ==================== v8.24：沿用上面资料 —— 树形选择器（类型 → 子项 → 参数勾选页） ==================== */
/* 内嵌于选料区设置弹窗入口按钮下方；蓝系（与「沿用上面资料」蓝系一致） */
.zxcp { margin-bottom: 10px; border: 1.5px solid #93c5fd; border-radius: 10px; background: #f6faff; overflow: hidden; }
.zxcp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; background: #eff6ff; border-bottom: 1px solid #dbeafe; }
.zxcp-crumb { font-size: 12px; font-weight: 700; color: #1e40af; }
.zxcp-close { border: none; background: none; font-size: 20px; line-height: 1; color: #64748b; cursor: pointer; padding: 0 4px; }
.zxcp-close:hover { color: #dc2626; }
.zxcp-body { padding: 8px 12px 12px; }
.zxcp-list { display: flex; flex-direction: column; gap: 6px; }
.zxcp-item { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid #dbeafe; border-radius: 8px; background: #fff; cursor: pointer; text-align: left; transition: all .15s; }
.zxcp-item:hover { border-color: #1c5fd6; background: #f0f6ff; }
.zxcp-item-name { flex: 0 0 auto; font-size: 14px; font-weight: 700; color: #1e3a8a; }
.zxcp-sub-hint { flex: 1 1 auto; min-width: 0; font-style: normal; font-size: 11px; color: #94a3b8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zxcp-arrow { flex: 0 0 auto; font-size: 18px; font-weight: 800; color: #1c5fd6; }
.zxcp-back { display: inline-flex; align-items: center; gap: 2px; border: none; background: none; color: #1c5fd6; font-size: 13px; font-weight: 700; cursor: pointer; padding: 0 0 6px; }
.zxcp-back:hover { text-decoration: underline; }
.zxcp-params-title { font-size: 12px; font-weight: 700; color: #334155; margin: 2px 0 6px; }
.zxcp-params { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px; }
.zxcp-chk { display: flex; align-items: center; gap: 6px; padding: 7px 10px; border: 1px solid #dbeafe; border-radius: 8px; background: #fff; font-size: 12px; color: #334155; cursor: pointer; user-select: none; }
.zxcp-chk:hover { border-color: #93c5fd; background: #f8fbff; }
.zxcp-chk input { accent-color: #1c5fd6; margin: 0; }
.zxcp-chk.locked { background: #f1f5f9; cursor: not-allowed; }
.zxcp-chk em { font-style: normal; font-size: 10px; color: #1d4ed8; background: #dbeafe; border-radius: 4px; padding: 1px 5px; }
.zxcp-empty { color: #94a3b8; font-size: 12px; padding: 10px 0; text-align: center; }
.zxcp-foot { margin-top: 10px; text-align: right; }
@media (max-width: 600px) {
  .zxcp-params { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}

/* ==================== v8.21：手工制作料块「左右对称」排版 ==================== */
/* 左右两图等大对称：左=原照片引用，右=单拍照片；下方各自信息区 */
.sg-block-card .zx-prog-body { padding: 10px; }
/* v8.23：外轮廓=满屏1/2（非满屏）+ 居中；内容撑满外轮廓（grid 占满 body） */
.sg-block-card { max-width: 50%; margin: 0 auto; }
.sg-block-grid { display: flex; flex-direction: row; gap: 10px; align-items: stretch; width: 100%; flex: 1 1 0; }
.sg-block-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
/* 左右照片框：等高、等宽（各占 50%）、等比 */
.sg-block-photo {
  position: relative; width: 100%; aspect-ratio: 1 / 1; min-height: 0;
  border: 2px dashed #cbd5e1; border-radius: 10px; background: #f8fafc;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  cursor: pointer; transition: border-color .15s, background .15s;
}
.sg-block-photo:hover { border-color: #1677ff; background: #f0f7ff; }
.sg-block-photo.mc-photoio-frame-off { cursor: default; border-style: solid; border-color: #e2e8f0; }
.sg-block-photo.mc-photoio-frame-off:hover { border-color: #e2e8f0; background: #f8fafc; }
.sg-block-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.sg-refphoto-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; color: #94a3b8; font-size: 11px; text-align: center; padding: 0 4px; }
.sg-refphoto-empty i { font-size: 20px; }
/* 左图下方：沿用参数（两个，紧凑只读行） */
.sg-block-refs { display: flex; flex-direction: column; gap: 6px; min-height: 58px; }
.sg-block-refs .prog-fld { margin: 0; padding: 5px 8px; border: 1px solid #eef2f7; border-radius: 6px; background: #fbfcfe; }
.sg-block-ref-empty { font-size: 11px; color: #cbd5e1; padding: 4px 2px; }
/* 右图下方：拍照时间 + 打卡人 + 确认 */
.sg-block-side { display: flex; flex-direction: column; gap: 6px; min-height: 58px; justify-content: center; }
.sg-block-side .mc-photoio-info { font-size: 12px; }
.sg-block-badge { font-size: 11px; font-weight: 600; color: #16a34a; }
/* 脚上单个删除（右对齐角落） */
.sg-block-foot { justify-content: flex-end; padding-top: 0; }
/* 手机端：保持左右并排、等比缩放、不换行不滚动 */
@media (max-width: 720px) {
  .sg-block-grid { flex-wrap: nowrap; gap: 8px; }
  .sg-block-col { min-width: 0; }
  .sg-block-photo { aspect-ratio: 1 / 1; }
}

/* ==================== v8.30：手工模制作（铝模上/下）照片布局最终定稿 ==================== */
/* 拍照框右下角「上传本地图片」文字按钮（stopPropagation 与点空白拍照互不冲突） */
.sg-block-shot .sg-block-upload {
  position: absolute; right: 6px; bottom: 6px; z-index: 3;
  height: 24px; padding: 0 9px; font-size: 11px; font-weight: 600; line-height: 1;
  color: #fff; background: rgba(15, 23, 42, .62); border: none; border-radius: 6px;
  cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center;
}
.sg-block-shot .sg-block-upload:hover { background: #1677ff; }
/* 拍照框下方第一行：拍照时间 + 打卡人 并排同一行，自适应占满 */
.sg-block-meta { display: flex; flex-direction: row; align-items: center; gap: 14px; flex-wrap: wrap; min-height: 20px; }
.sg-block-meta .mc-photoio-info { font-size: 12px; white-space: nowrap; }
/* 最底行导航条：删除最左 + 确认最右（分处两端防误触） */
.sg-block-nav { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 2px; }
.sg-block-nav .sg-photoio-btn { align-self: center; }

/* ==================== v8.37：手工模小件/小配件「仅确认」卡片 ==================== */
/* 右栏无拍照框：块名 + 提示 + 单一确认按钮，垂直居中，左图保持原照片引用+沿用参数 */
.sg-small-shot { justify-content: center; align-items: stretch; gap: 10px; padding: 10px 2px; }
.sg-small-name { font-size: 14px; font-weight: 600; color: #1e293b; text-align: center; }
.sg-small-tip { font-size: 12px; color: #94a3b8; text-align: center; }
.sg-small-shot .sg-photoio-btn { width: 100%; }

/* ==================== 阶段D：机加工料块卡「主图 + 字段 + 上料左/下料右双格 + 底栏」 ==================== */
/* 卡片纵向流：主图区 → 字段区(左/中/右) → 拍照区(上料左/下料右) → 底栏逐块明细 */
.mc-block-card .zx-prog-body { padding: 10px; }
.mc-block-card { max-width: 50%; margin: 0 auto; }
.mc-block-card .zx-prog-body { flex-direction: column; align-items: stretch; }
.mc-block-grid { display: flex; flex-direction: column; gap: 10px; width: 100%; }
/* 主图区：原照片引用整宽等比（容器 width:100%/height:auto + object-fit:contain，不裁切不留白） */
.mc-block-main { width: 100%; }
.mc-block-refphoto {
  position: relative; width: 100%; height: auto;
  border: 2px dashed #cbd5e1; border-radius: 10px; background: #f8fafc;
  overflow: hidden;
}
.mc-block-refphoto img { display: block; width: 100%; height: auto; object-fit: contain; cursor: zoom-in; }
.mc-block-refphoto .sg-refphoto-empty { min-height: 120px; display: flex; align-items: center; justify-content: center; }
/* 字段区：左/中/右三栏（B/C 设计区排版），2rows 中归右、3rows 三栏 */
.mc-block-fields { display: flex; flex-direction: row; gap: 10px; align-items: stretch; width: 100%; }
.mc-block-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.mc-block-refs { display: flex; flex-direction: column; gap: 6px; }
.mc-block-col .prog-fld { margin: 0; padding: 5px 8px; border: 1px solid #eef2f7; border-radius: 6px; background: #fbfcfe; }
/* 补丁一通：机加工排版配置 —— 上/下纵向流（top 置顶 / bottom 置底，整宽竖排，不进双栏） */
.mc-block-vflow { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.mc-block-vflow .prog-fld { margin: 0; padding: 5px 8px; border: 1px solid #eef2f7; border-radius: 6px; background: #fbfcfe; }
/* 拍照区：上料左/下料右双格横向并排，两端同网格不重排不堆叠 */
.mc-block-io-row { display: flex; flex-direction: row; gap: 10px; align-items: stretch; width: 100%; }
.mc-block-zone { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; padding: 8px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; }
.mc-block-zone-disabled { opacity: .55; background: #f8fafc; border-style: dashed; }
.mc-block-zone-locked { border-color: #bbf7d0; background: #fbfefc; }
.mc-block-zone-photo {
  position: relative; width: 100%; height: auto;
  border: 2px dashed #cbd5e1; border-radius: 8px; background: #f8fafc;
  display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.mc-block-zone-photo:hover { border-color: #1677ff; background: #f0f7ff; }
.mc-block-zone-photo.mc-photoio-frame-off { cursor: default; border-style: solid; border-color: #e2e8f0; }
.mc-block-zone-photo.mc-photoio-frame-off:hover { border-color: #e2e8f0; background: #f8fafc; }
.mc-block-zone-photo img { display: block; width: 100%; height: auto; object-fit: contain; }
.mc-block-zone-photo .mc-photoio-empty { min-height: 96px; justify-content: center; }
.mc-block-zone-side { display: flex; flex-direction: column; gap: 5px; }
.mc-block-zone-side .mc-photoio-info { font-size: 12px; }
/* 照片框左上角：删除小按钮（右上角为相册按钮） */
.mc-photoio-del {
  position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .92); border: 1px solid #e2e8f0; border-radius: 6px;
  font-size: 12px; color: #dc2626; cursor: pointer; line-height: 1;
}
/* 删除/保存按钮 */
.mc-block-del { margin-left: 6px; }
.mc-block-save { margin-left: 6px; }
.mc-block-card .zx-prog-head { align-items: center; }
/* 本模具总用时 */
.mc-mold-total { font-size: 12px; color: #1d4ed8; white-space: nowrap; }
.mc-mold-total b { font-weight: 700; }
.mc-mold-total-frozen { color: #16a34a; }
/* 底栏：逐块明细 */
.mc-block-foot-detail {
  display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center;
  padding: 8px 10px; border: 1px solid #e2e8f0; border-radius: 8px; background: #f8fafc;
  font-size: 12px;
}
.mc-block-foot-detail .mc-fd-name { font-weight: 600; color: #1f2937; }
.mc-block-foot-detail .mc-fd-item { color: #475569; }
/* 多轮循环：轮次分组（开粗下料循环） */
.mc-round-list { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.mc-round { border: 1px solid #dbeafe; border-radius: 10px; padding: 8px 10px; background: #f8fbff; }
.mc-round-title { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: #334155; margin-bottom: 8px; }
.mc-round-badge { font-size: 11px; font-weight: 600; color: #16a34a; }
.mc-round-badge.mc-round-active { color: #d46b08; }
.mc-fd-total { font-weight: 700; color: #1d4ed8; border-left: 1px solid #e2e8f0; padding-left: 12px; margin-left: 4px; }
/* 半透明遮罩预览（二次确认） */
.modal-overlay.mc-io-preview { background: rgba(15, 23, 42, .55); }
.mc-io-preview-modal { max-width: 420px; width: 92vw; }
.mc-io-preview-title { font-size: 15px; font-weight: 700; color: #1f2937; margin-bottom: 10px; }
.mc-io-preview-img { border-radius: 10px; overflow: hidden; background: #0f172a; display: flex; align-items: center; justify-content: center; }
.mc-io-preview-img img { max-width: 100%; max-height: 60vh; object-fit: contain; display: block; }
.mc-io-preview-tip { font-size: 12px; color: #64748b; text-align: center; margin: 10px 0; }
.mc-io-preview-actions { display: flex; gap: 10px; justify-content: center; }
/* 手机端：同一套网格等比缩放（zoom 由 .zx-prog-wrap 引擎承担），拍照双格仍左右并排不堆叠 */
@media (max-width: 720px) {
  .mc-block-io-row { flex-wrap: nowrap; gap: 8px; }
  .mc-block-zone { min-width: 0; }
}

/* ==================== v8.33：铁模装配「一副排列 / 配对 / 参数沿用」 ==================== */
/* v8.50：框架 width:100% + max-width:50%（电脑端 1/2），手机端满屏；去掉 margin 居中，锁死不再收缩 */
/* v8.xx：修模料卡 / 小件卡复用 .zx-tm-set-card 宽度基类，确认态不变宽（避免 ¼ 长条回归） */
.zx-tm-set-card, .zx-asm-fix-card, .zx-asm-small-card { width: 100% !important; max-width: 50%; margin: 0; }
.zx-tm-grid { display: flex; flex-direction: row; gap: 10px; align-items: stretch; }
.zx-tm-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.zx-tm-col-title { font-size: 13px; font-weight: 600; color: var(--text, #1f2937); padding: 0 2px; }
/* 半副占位：缺上模/下模时留空占位（虚线框 + 提示） */
.zx-tm-col-empty { border: 2px dashed #e2e8f0; border-radius: 10px; background: #fafbfc; align-items: center; justify-content: center; min-height: 150px; }
.zx-tm-empty-txt { font-size: 12px; color: #94a3b8; padding: 10px; }
/* 块照片框：1:1 大图（上游引用图，只读可放大） */
.zx-tm-photo {
  position: relative; width: 100%; aspect-ratio: 1 / 1; min-height: 0;
  border: 2px dashed #cbd5e1; border-radius: 10px; background: #f8fafc;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.zx-tm-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.zx-tm-photo-empty { font-size: 12px; color: #94a3b8; }
/* 字段列表：紧凑只读/可编辑行 */
.zx-tm-flds { display: flex; flex-direction: column; gap: 6px; }
.zx-tm-flds .prog-fld { margin: 0; padding: 5px 8px; border: 1px solid #eef2f7; border-radius: 6px; background: #fbfcfe; }
/* 小件铁：整宽一行（图 + 字段横排） */
.zx-tm-small { margin-top: 10px; padding-top: 10px; border-top: 1px solid #eef2f7; display: flex; flex-direction: column; gap: 6px; }
.zx-tm-small-body { display: flex; flex-direction: row; gap: 10px; align-items: stretch; }
.zx-tm-small-body .zx-tm-photo-sm { flex: 0 0 34%; max-width: 130px; }
.zx-tm-small-body .zx-tm-flds { flex: 1 1 auto; min-width: 0; }
/* 底部按副按钮条：删除左 + 确认右 */
.zx-tm-foot { justify-content: space-between; }
/* 手机端：保持上/下左右并排、等比缩放、不换行 */
@media (max-width: 720px) {
  .zx-tm-grid { flex-wrap: nowrap; gap: 8px; }
  .zx-tm-col { min-width: 0; }
  .zx-tm-small-body .zx-tm-photo-sm { flex: 0 0 32%; max-width: 100px; }
}

/* ==================== v8.34：铁模装配「金额输入 / 账号确认 / 锁定」 ==================== */
/* 金额行：一副下方，编辑态=标签+数字输入框，确认后=只读金额+操作人 */
.zx-tm-amount { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 8px 10px; border: 1px solid #eef2f7; border-radius: 8px; background: #fffdf5; }
.zx-tm-amount-label { font-size: 13px; font-weight: 600; color: var(--text, #1f2937); white-space: nowrap; }
.zx-tm-amount-req { font-style: normal; font-size: 11px; color: #ef4444; margin-left: 2px; }
.zx-tm-amount-input { flex: 1 1 auto; min-width: 0; padding: 6px 10px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px; }
.zx-tm-amount-input:focus { border-color: #3b82f6; outline: none; box-shadow: 0 0 0 3px rgba(59, 130, 246, .12); }
.zx-tm-amount-done { justify-content: space-between; background: #f0fdf4; border-color: #bbf7d0; font-size: 14px; }
.zx-tm-amount-done strong { color: #16a34a; font-size: 16px; }
.zx-tm-amount-op { font-size: 12px; color: #64748b; }
/* Task#21：应发面板「另有小件 N 块，不计入发货」弱化灰字 */
.zx-tm-stats-note { color: var(--text-light); font-size: 12px; margin-left: 4px; }

/* ==================== v8.38：铁模装配「三排堆叠（铁模上 → 铁模下 → 小件/参数汇总）」 ==================== */
/* 三排上下堆叠，每排 = 左图（原照片引用）+ 右操作；间距统一，卡片圆角 12px */
.zx-tm-rows { display: flex; flex-direction: column; gap: 14px; align-items: stretch; width: 100%; }
.zx-tm-row { border: 1px solid #eef2f7; border-radius: 12px; padding: 12px; background: #fff; display: flex; flex-direction: column; gap: 8px; width: 100%; box-sizing: border-box; }
.zx-tm-row-title { font-size: 14px; font-weight: 600; color: var(--text, #1f2937); display: flex; align-items: center; gap: 6px; }
.zx-tm-row-body { display: flex; flex-direction: row; gap: 12px; align-items: stretch; width: 100%; }
.zx-tm-row-left { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.zx-tm-row-right { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; justify-content: center; }
/* 右区拍照框（现场拍，点空白调相机；复用 .zx-tm-photo 1:1） */
.zx-tm-photo-shot { cursor: pointer; transition: border-color .15s, background .15s; }
.zx-tm-photo-shot:hover { border-color: #1677ff; background: #f0f7ff; }
.zx-tm-photo-shot.mc-photoio-frame-off { cursor: default; border-style: solid; border-color: #e2e8f0; }
.zx-tm-photo-shot.mc-photoio-frame-off:hover { border-color: #e2e8f0; background: #f8fafc; }
/* v8.51：右区拍照框右上角「上传」小图标按钮（叠在照片角落，可重新上传替换） */
.zx-tm-photo-shot .sg-block-upload {
  position: absolute; right: 6px; top: 6px; z-index: 3;
  height: 24px; padding: 0 9px; font-size: 11px; font-weight: 600; line-height: 1;
  color: #fff; background: rgba(15, 23, 42, .62); border: none; border-radius: 6px;
  cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center;
}
.zx-tm-photo-shot .sg-block-upload:hover { background: #1677ff; }
/* 半副占位行（缺上模/下模） */
.zx-tm-row-empty { border-style: dashed; border-color: #e2e8f0; background: #fafbfc; }
/* 第3排参数汇总：金额（第一位）+ 各块只读参数 + 确定按钮 */
.zx-tm-sum .zx-tm-amount { margin-top: 0; }
.zx-tm-sum-block { display: flex; flex-direction: column; gap: 4px; }
.zx-tm-sum-label { font-size: 12px; font-weight: 600; color: #64748b; }
.zx-tm-sum-block .prog-fld { margin: 0; padding: 4px 8px; border: 1px solid #eef2f7; border-radius: 6px; background: #fbfcfe; font-size: 12px; }
/* v8.xx：参数总汇四向分组（上/下纵向流 + 左右双列），与机加工 previewHtml 同网格语义 */
.zx-asm-sum-flow { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.zx-asm-sum-cols { display: flex; flex-direction: row; gap: 10px; align-items: stretch; width: 100%; }
.zx-asm-sum-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.zx-asm-sum-empty { font-size: 11px; color: #94a3b8; text-align: center; padding: 6px; }
.zx-tm-confirm-btn { align-self: stretch; margin-top: 2px; padding: 10px; font-size: 14px; }
/* ==================== v8.xx：装配区「修模料卡 / 小件卡 / 金额编辑」专属样式 ==================== */
/* 修模料卡：第2排参数可编辑区（整宽，虚线分隔） */
.zx-asm-fix-card .zx-asm-fix-params { border-style: dashed; border-color: #e2e8f0; }
/* 小件卡：右侧参数只读 + 确认/撤销按钮 */
.zx-asm-small-card .zx-asm-small-btn { align-self: stretch; margin-top: 6px; padding: 10px 12px; font-size: 13px; }
/* v9.xx：归副小件行（并入副卡）+「归入第 N 副」徽标 */
.zx-asm-pair-badge { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--primary-soft, #eef4ff); color: var(--primary, #1c5fd6); font-size: 11px; font-weight: 700; }
.zx-asm-small-row { border-style: dashed; border-color: #e2e8f0; }
.zx-asm-small-row .zx-asm-small-btn { align-self: stretch; margin-top: 6px; padding: 8px 12px; font-size: 12px; }
/* 金额编辑（确认态，仅填写人本人可见）：编辑按钮靠右不撑满；保存/取消小按钮 */
.zx-tm-amount-edit-btn { min-width: 0 !important; height: 28px; padding: 0 10px; margin-left: auto; flex: none; font-size: 12px; }
.zx-tm-amount-save-btn { min-width: 0 !important; height: 30px; padding: 0 12px; flex: none; font-size: 12px; }
.zx-tm-amount-cancel-btn { min-width: 0 !important; height: 30px; padding: 0 12px; flex: none; font-size: 12px; background: #fff; color: #475569; border-color: #e2e8f0; }
.zx-tm-amount-cancel-btn:hover { background: #f1f5f9; }
/* 手机端：卡片满宽；卡内左图+右操作保持左右并排不堆叠（v8.xx 显示比例修复） */
@media (max-width: 720px) {
  .zx-tm-set-card, .zx-asm-fix-card, .zx-asm-small-card { max-width: 100% !important; margin: 0; }
}

/* ==================== v8.35：铁模装配统计筛选 / 导出对账单 ==================== */
/* 模块内顶部统计条 */
.zx-tm-stats { margin: 0 0 12px; padding: 10px 14px; border: 1px solid #dbeafe; border-radius: 10px; background: linear-gradient(135deg, #eff6ff, #fdf2f8); font-size: 13px; color: #1e3a8a; }
.zx-tm-stats b { font-size: 15px; color: #16a34a; }
/* 装配统计页：筛选条（grid 自适应） */
.tm-filter { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; align-items: end; padding: 14px; border: 1px solid var(--border, #e5e7eb); border-radius: 10px; background: #fff; }
.tm-f-item { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-light, #6b7280); }
.tm-f-item .form-input { width: 100%; padding: 7px 9px; font-size: 13px; box-sizing: border-box; }
.tm-f-search { grid-column: span 2; }
.tm-filter .btn { height: 34px; }
/* 明细照片缩略图 */
.tm-photo { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border, #e5e7eb); cursor: zoom-in; transition: transform .15s; }
.tm-photo:hover { transform: scale(1.12); border-color: var(--primary, #3b82f6); }
.tm-table td, .tm-table th { white-space: nowrap; }
@media (max-width: 720px) {
  .tm-f-search { grid-column: span 1; }
  .tm-filter { grid-template-columns: 1fr 1fr; }
}

/* ==================== v8.40：机加工详情页「图片预览框」（编程分料总览） ==================== */
.mc-tpl-preview { margin-top: 4px; }
.mc-tpl-preview-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.mc-tpl-cell { display: flex; flex-direction: column; gap: 6px; }
.mc-tpl-cell-name { font-size: 13px; font-weight: 700; color: #334155; display: flex; align-items: center; gap: 6px; }
.mc-tpl-cell-count { font-size: 11px; font-weight: 600; color: #64748b; background: #f1f5f9; border-radius: 999px; padding: 1px 7px; }
.mc-tpl-cell-photo { width: 120px; height: 120px; border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden; background: #fff; display: flex; align-items: center; justify-content: center; }
.mc-tpl-cell-photo img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; transition: transform .15s; }
.mc-tpl-cell-photo img:hover { transform: scale(1.05); }
.mc-tpl-cell-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: #94a3b8; font-size: 11px; width: calc(100% - 14px); height: calc(100% - 14px); border: 1px dashed #e2e8f0; border-radius: 9px; }
.mc-tpl-cell-empty i { font-size: 20px; }
@media (max-width: 720px) {
  .mc-tpl-cell-photo { width: 92px; height: 92px; }
  .mc-tpl-preview-grid { gap: 10px; }
}

/* ==================== v8.41：进度列表「长横条」（机加工待办） ==================== */
.mc-bar { display: flex; flex-direction: row; align-items: center; gap: 12px; padding: 10px 12px; }
.mc-bar-cover { width: 64px; height: 64px; flex: none; border-radius: 10px; overflow: hidden; border: 1px solid #e2e8f0; background: #fff; display: flex; align-items: center; justify-content: center; }
.mc-bar-cover img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.mc-bar-cover-empty { color: #cbd5e1; font-size: 22px; border-style: dashed; }
.mc-bar-info { flex: none; min-width: 110px; max-width: 170px; display: flex; flex-direction: column; gap: 3px; }
.mc-bar-info .mold-number { font-size: 14px; }
.mc-bar-info .pending-row { margin-top: 2px; }
.mc-bar-items { flex: 1 1 auto; display: flex; flex-direction: row; align-items: center; gap: 10px; overflow-x: auto; padding: 2px 0; }
.mc-bar-item { flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.mc-bar-item-photo { width: 52px; height: 52px; border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden; background: #fff; display: flex; align-items: center; justify-content: center; }
.mc-bar-item-photo img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.mc-bar-item-empty { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #cbd5e1; font-size: 16px; border: 1px dashed #e2e8f0; border-radius: 9px; }
.mc-bar-item-label { font-size: 11px; color: #475569; white-space: nowrap; }
.mc-bar-item-label em { font-style: normal; color: #94a3b8; margin-left: 2px; }
.mc-bar-none { color: #94a3b8; font-size: 12px; }
@media (max-width: 720px) {
  .mc-bar { gap: 8px; padding: 8px; }
  .mc-bar-cover { width: 52px; height: 52px; }
  .mc-bar-info { min-width: 88px; max-width: 118px; }
  .mc-bar-item-photo { width: 44px; height: 44px; }
  .mc-bar-items { gap: 8px; }
}

/* ==================== v8.47：图片加载失败 → 空白框（onerror 兜底，不显示破图） ==================== */
.mc-bar-cover.img-failed,
.mc-bar-item-photo.img-failed,
.mc-tpl-cell-photo.img-failed {
  border-style: dashed;
  border-color: #e2e8f0;
  background: #fafbfc;
  color: #cbd5e1;
  font-size: 18px;
}

/* ==================== v8.5x：发货区双入口骨架（简单发货 / 出库单发货，默认收起） ==================== */
/* 顶部两个主按钮，并排常驻 */
.fahuo-entry { display: flex; gap: 8px; margin-bottom: 10px; }
.fahuo-tab {
  flex: 1 1 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 10px 12px; border: 1.5px dashed #b9cdf0; border-radius: 10px;
  background: #fbfdff; cursor: pointer; text-align: left; font-size: 14px; font-weight: 700; color: #1c5fd6;
  transition: all .15s;
}
.fahuo-tab i { font-size: 16px; }
.fahuo-tab em { font-style: normal; font-size: 11px; font-weight: 600; color: #94a3b8; }
.fahuo-tab:hover { border-color: var(--primary, #1c5fd6); background: #f0f6ff; }
.fahuo-tab.active { border-style: solid; border-color: var(--primary, #1c5fd6); background: #eef5ff; box-shadow: 0 0 0 2px rgba(28, 95, 214, .12); }

/* 展开面板主体 */
.fahuo-panel { border: 1.5px solid #e2e8f0; border-radius: 12px; padding: 10px; background: #fcfdff; margin-bottom: 10px; }
.fahuo-panel-head { font-size: 13px; font-weight: 800; color: #0f2f5f; margin-bottom: 8px; }
.fahuo-panel-head i { color: #1c5fd6; margin-right: 4px; }

/* 步骤标签 */
.fahuo-step-label { font-size: 12px; font-weight: 700; color: #475569; margin: 10px 0 6px; }

/* 四宫格发货方式 */
.fahuo-methods { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.fahuo-method {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 4px;
  border: 1.5px solid #e2e8f0; border-radius: 10px; background: #fff; cursor: pointer;
  font-size: 13px; font-weight: 700; color: #334155; transition: all .15s;
}
.fahuo-method:hover { border-color: var(--primary, #1c5fd6); background: #f8fbff; }
.fahuo-method.active { border-color: var(--primary, #1c5fd6); background: #eef5ff; color: #1c5fd6; }
.fahuo-method-name { font-size: 14px; }
.fahuo-method-doc { font-size: 10px; font-weight: 600; color: #94a3b8; line-height: 1.2; text-align: center; }

/* v8.75 发货类型选择弹层（复用 .modal-overlay .modal，对齐 .fahuo-dosage-modal） */
.fahuo-type-picker-modal .modal { max-width: 420px; }
.fahuo-type-title { font-size: 17px; font-weight: 800; text-align: center; color: #0f2f5f; margin-bottom: 6px; }
.fahuo-type-hint { font-size: 12px; color: #94a3b8; text-align: center; margin-bottom: 16px; line-height: 1.5; }
.fahuo-type-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 20px; }
.fahuo-type-opt {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 6px;
  border: 1.5px solid #e2e8f0; border-radius: 12px; background: #fff; cursor: pointer;
  font-weight: 700; color: #334155; transition: all .15s;
}
.fahuo-type-opt:hover { border-color: var(--primary, #1c5fd6); background: #f8fbff; }
.fahuo-type-opt.active { border-color: var(--primary, #1c5fd6); background: #eef5ff; color: #1c5fd6; }
.fahuo-type-name { font-size: 16px; }
.fahuo-type-doc { font-size: 10px; font-weight: 600; color: #94a3b8; line-height: 1.2; text-align: center; }
.fahuo-type-actions { display: flex; justify-content: center; }

/* v8.75 method 步「已选：XX + 返回改选」回显条 */
.fahuo-method-chosen {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 12px; border: 1.5px solid #e2e8f0; border-radius: 10px; background: #f8fbff; margin-bottom: 8px;
}
.fahuo-method-chosen-label { font-size: 14px; color: #475569; }
.fahuo-method-chosen-label strong { color: #1c5fd6; font-size: 15px; }

/* 拍照/拼付占位框 */
.fahuo-photo-slot {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 96px; border: 1.5px dashed #cbd5e1; border-radius: 10px; background: #f8fafc;
  color: #94a3b8; cursor: pointer; font-size: 12px; font-weight: 600;
}
.fahuo-photo-slot i { font-size: 22px; }
.fahuo-photo-slot:hover { border-color: var(--primary, #1c5fd6); color: #1c5fd6; background: #f0f6ff; }
.fahuo-slot-dim { min-height: 64px; }

/* 物流信息占位 */
.fahuo-logistics { display: flex; flex-direction: column; gap: 8px; }
.fahuo-input {
  width: 100%; padding: 8px 10px; border: 1.5px solid #e2e8f0; border-radius: 8px;
  font-size: 13px; background: #f8fafc; color: #94a3b8;
}

/* 待发货清单 */
.fahuo-pending { margin-bottom: 4px; }
.fahuo-pending-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.fahuo-pending-item { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.fahuo-thumb {
  width: 100%; height: 56px; border: 1px solid #e2e8f0; border-radius: 8px;
  background-size: cover; background-position: center; background-color: #f1f5f9;
}
.fahuo-thumb-empty { display: flex; align-items: center; justify-content: center; font-size: 20px; color: #cbd5e1; }
.fahuo-pending-name { font-size: 11px; color: #475569; text-align: center; }
.fahuo-empty { color: #94a3b8; font-size: 12px; padding: 8px 0; }

/* v8.57 拼付（跨编号勾选合并一副） */
.fahuo-pin-refresh { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: #1c5fd6; cursor: pointer; font-weight: 600; margin-bottom: 4px; }
.fahuo-pin-refresh:hover { text-decoration: underline; }
.fahuo-pin-empty { color: #94a3b8; font-size: 12px; padding: 10px 0; text-align: center; }
.fahuo-pin-list { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; }
.fahuo-pin-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  border: 1.5px solid #e2e8f0; border-radius: 10px; background: #fff; cursor: pointer; transition: all .15s;
}
.fahuo-pin-item:hover { border-color: #bcd4f7; }
.fahuo-pin-item.active { border-color: var(--primary, #1c5fd6); background: #eef5ff; }
.fahuo-pin-check { font-size: 18px; color: #94a3b8; flex-shrink: 0; }
.fahuo-pin-item.active .fahuo-pin-check { color: #1c5fd6; }
.fahuo-pin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fahuo-pin-no { font-size: 13px; font-weight: 700; color: #0f2f5f; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fahuo-pin-type { font-style: normal; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 6px; }
.fahuo-pin-type.aluminum { background: #e0f2fe; color: #0369a1; }
.fahuo-pin-type.iron_mold { background: #fef3c7; color: #b45309; }
.fahuo-pin-sub { font-size: 11px; color: #64748b; }
.fahuo-pin-half {
  font-size: 11px; font-weight: 700; color: #1c5fd6; background: #eef5ff;
  border: 1px solid #bcd4f7; border-radius: 8px; padding: 3px 8px; white-space: nowrap; cursor: pointer; flex-shrink: 0;
}
.fahuo-pin-half i { font-size: 10px; margin-left: 2px; }
.fahuo-pin-half-tag { font-size: 10px; font-weight: 700; color: #64748b; background: #f1f5f9; border-radius: 6px; padding: 2px 8px; white-space: nowrap; flex-shrink: 0; }
.fahuo-unit { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.fahuo-unit label { font-size: 11px; font-weight: 700; color: #475569; }
.fahuo-unit-opts { display: flex; gap: 6px; flex-wrap: wrap; }
.fahuo-unit-btn {
  padding: 6px 14px; border: 1.5px solid #e2e8f0; border-radius: 8px; background: #fff;
  font-size: 13px; font-weight: 700; color: #334155; cursor: pointer; transition: all .15s;
}
.fahuo-unit-btn:hover { border-color: #bcd4f7; }
.fahuo-unit-btn.active { border-color: var(--primary, #1c5fd6); background: #eef5ff; color: #1c5fd6; }
.fahuo-unit .fahuo-input { color: #0f172a; background: #fff; }
.btn-complete-lg:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; transform: none; }

/* v8.58 出库单记录（每个编号页面留一份完整副本，可回看） */
.fahuo-batch-block { margin-top: 10px; }
.fahuo-batch-loading { color: #94a3b8; font-size: 12px; padding: 10px 0; }
.fahuo-batch-list { display: flex; flex-direction: column; gap: 8px; }
.fahuo-batch-card { border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px 12px; background: #fbfdff; }
.fahuo-batch-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.fahuo-batch-bno { font-size: 13px; font-weight: 700; color: #0f2f5f; }
.fahuo-batch-meta { font-size: 11px; color: #94a3b8; }
.fahuo-batch-sub { font-size: 11px; color: #64748b; margin-top: 3px; }
.fahuo-batch-items { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.fahuo-batch-items li { display: flex; align-items: center; gap: 8px; font-size: 12px; flex-wrap: wrap; }
.fahuo-batch-no { font-weight: 600; color: #0f172a; }
.fahuo-batch-type { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 6px; }
.fahuo-batch-type.aluminum { background: #e0f2fe; color: #0369a1; }
.fahuo-batch-type.iron_mold { background: #fef3c7; color: #b45309; }
.fahuo-batch-half { font-style: normal; font-size: 10px; font-weight: 700; color: #b45309; background: #fef3c7; border-radius: 6px; padding: 1px 6px; }
.fahuo-batch-full { font-style: normal; font-size: 10px; font-weight: 700; color: #047857; background: #d1fae5; border-radius: 6px; padding: 1px 6px; }
.fahuo-batch-self { font-size: 10px; font-weight: 700; color: #1c5fd6; background: #eef5ff; border-radius: 6px; padding: 1px 6px; }

/* v8.59 物流与拍照 */
.fahuo-input-edit { color: #0f172a; background: #fff; }
.fahuo-select {
  width: 100%; padding: 8px 10px; border: 1.5px solid #e2e8f0; border-radius: 8px;
  font-size: 13px; background: #fff; color: #0f172a;
}
.fahuo-logistics { display: flex; flex-direction: column; gap: 10px; }
.fahuo-logistics-row { display: flex; flex-direction: column; gap: 6px; }
.fahuo-logistics-row label { font-size: 11px; font-weight: 700; color: #475569; }
.fahuo-track-modes { display: flex; gap: 6px; flex-wrap: wrap; }
.fahuo-scan-box { display: flex; flex-direction: column; gap: 4px; }
.fahuo-scan-hint { font-size: 11px; color: #94a3b8; display: flex; align-items: center; gap: 4px; }

.fahuo-photo-box { display: flex; flex-direction: column; gap: 8px; }
.fahuo-photo-preview {
  display: flex; justify-content: center; border: 1.5px solid #e2e8f0; border-radius: 10px;
  padding: 6px; background: #f8fafc;
}
.fahuo-photo-thumb { max-width: 100%; max-height: 200px; border-radius: 8px; cursor: pointer; object-fit: contain; }
.fahuo-photo-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.fahuo-unit-btn-danger { color: #dc2626; }
.fahuo-unit-btn-danger:hover { border-color: #dc2626; background: #fef2f2; }

.fahuo-batch-logline { display: flex; align-items: center; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.fahuo-batch-logistics { font-size: 11px; color: #475569; }
.fahuo-batch-photo img {
  width: 48px; height: 48px; object-fit: cover; border-radius: 6px; border: 1px solid #e2e8f0; cursor: pointer;
}
/* v9.y：出库单记录改按「出库单预览」同版式渲染（六列表格 + 页脚）；「复制」改为生成同版式图片 → 弹窗看图 */
.fahuo-batch-card .fahuo-outbound-preview { margin-top: 8px; border-radius: 10px; }
/* 卡片内的出库单文字色与预览对齐（避免继承外层链接色/主题色） */
.fahuo-batch-card .fahuo-outbound-preview-table td { color: #0f172a; }
.fahuo-batch-card .fahuo-outbound-preview-title,
.fahuo-batch-card .fahuo-outbound-preview-anchor strong,
.fahuo-batch-card .fahuo-op-foot-item strong { color: #0f2f5f; }
.fahuo-batch-tag {
  font-style: normal; font-size: 10px; font-weight: 700; color: #6d28d9;
  background: #ede9fe; border-radius: 6px; padding: 1px 5px; margin-left: 5px; white-space: nowrap;
}
.fahuo-batch-img-modal .modal { max-width: min(940px, 94vw); }
.fahuo-batch-img-modal .modal-body { text-align: center; overflow: auto; }
.fahuo-batch-img-modal .modal-body img {
  max-width: 100%; height: auto; display: block; margin: 0 auto;
  border: 1px solid #e2e8f0; border-radius: 8px; background: #fff;
}
.fahuo-batch-img-hint { margin-right: auto; font-size: 11px; color: #94a3b8; }
@media (max-width: 640px) {
  .fahuo-batch-img-hint { display: none; }
}
.fahuo-ship-photos { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.fahuo-ship-photos img {
  width: 56px; height: 56px; object-fit: cover; border-radius: 6px; border: 1px solid #e2e8f0; cursor: pointer;
}

/* v8.60 镶块/活块下拉 + 收货方 + 一键复制 */
.fahuo-pin-block { flex-shrink: 0; display: flex; align-items: center; }
.fahuo-block-select {
  padding: 4px 6px; border: 1.5px solid #e2e8f0; border-radius: 8px;
  font-size: 11px; font-weight: 600; color: #334155; background: #fff; cursor: pointer; max-width: 92px;
}
.fahuo-block-select:focus { border-color: #1c5fd6; outline: none; }
.fahuo-batch-block { font-style: normal; font-size: 10px; font-weight: 700; color: #6d28d9; background: #ede9fe; border-radius: 6px; padding: 1px 6px; }
.fahuo-batch-copy {
  margin-left: auto; padding: 3px 10px; border: 1.5px solid #e2e8f0; border-radius: 8px;
  background: #fff; color: #1c5fd6; font-size: 11px; font-weight: 700; cursor: pointer; transition: all .15s;
  display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0;
}
.fahuo-batch-copy:hover { border-color: #1c5fd6; background: #eef5ff; }

/* ==================== 出库单发货流程改造：选客户 → 卡片清单 → 逐副选副数 ==================== */
.fahuo-outbound-customer { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.fahuo-outbound-customer label { font-size: 11px; font-weight: 700; color: #475569; }
.fahuo-outbound-customer-select { width: 100%; }
.fahuo-outbound-customer-hint { font-size: 11px; color: #64748b; }
.fahuo-outbound-empty { color: #94a3b8; font-size: 12px; padding: 12px 0; text-align: center; }

/* 正方形卡片网格：上图（多张左右并排等大 contain）下文（W编号 + 铝模[▾] + 铁模[▾]） */
.fahuo-outbound-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; margin-bottom: 10px;
}
.fahuo-outbound-card {
  aspect-ratio: 1 / 1; display: flex; flex-direction: column; background: #fff;
  border: 1.5px solid #e2e8f0; border-radius: 12px; overflow: hidden;
}
.fahuo-outbound-photos { display: flex; flex: 1; min-height: 0; background: #f8fafc; border-bottom: 1px solid #eef2f7; }
.fahuo-outbound-photos img {
  flex: 1 1 0; min-width: 0; object-fit: contain; cursor: pointer; padding: 2px; transition: background .15s;
}
.fahuo-outbound-photos img:hover { background: #eef5ff; }
.fahuo-outbound-photos-empty { align-items: center; justify-content: center; color: #cbd5e1; font-size: 12px; }
.fahuo-outbound-body { padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.fahuo-outbound-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; align-items: center; }
.fahuo-outbound-no {
  font-size: 12px; font-weight: 800; color: #0f2f5f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fahuo-outbound-mat-cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fahuo-outbound-mat-cell.shipped { align-items: center; }
.fahuo-outbound-mat-label {
  font-style: normal; font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 5px; align-self: flex-start;
}
.fahuo-outbound-mat-label.aluminum { background: #e0f2fe; color: #0369a1; }
.fahuo-outbound-mat-label.iron_mold { background: #fef3c7; color: #b45309; }
.fahuo-outbound-mat-done { font-size: 12px; font-weight: 800; color: #047857; }
.fahuo-outbound-select {
  width: 100%; padding: 4px 6px; border: 1.5px solid #e2e8f0; border-radius: 8px;
  font-size: 12px; font-weight: 600; color: #0f172a; background: #fff; cursor: pointer;
}
.fahuo-outbound-select:focus { border-color: #1c5fd6; outline: none; }

/* 拆半副折叠区 */
.fahuo-outbound-split-block { display: flex; flex-direction: column; gap: 4px; }
.fahuo-outbound-split-toggle {
  align-self: flex-start; padding: 3px 8px; border: 1px solid #e2e8f0; border-radius: 8px;
  background: #f8fafc; color: #475569; font-size: 11px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 4px;
}
.fahuo-outbound-split-toggle:hover { border-color: #bcd4f7; color: #1c5fd6; }
.fahuo-outbound-split-list { display: flex; flex-direction: column; gap: 4px; max-height: 132px; overflow-y: auto; }
.fahuo-outbound-split-item { display: flex; align-items: center; gap: 8px; font-size: 11px; color: #334155; flex-wrap: wrap; }
.fahuo-outbound-split-name { font-weight: 600; color: #0f2f5f; min-width: 48px; }
.fahuo-outbound-check { display: inline-flex; align-items: center; gap: 3px; cursor: pointer; }
.fahuo-outbound-check input { accent-color: #1c5fd6; cursor: pointer; }
.fahuo-outbound-check.disabled { color: #cbd5e1; cursor: not-allowed; }

/* 发货单位行（底部全局显示 + 内联编辑） */
.fahuo-outbound-unit-row { display: flex; align-items: center; gap: 8px; margin: 4px 0 10px; flex-wrap: wrap; }
.fahuo-outbound-unit-label { font-size: 11px; font-weight: 700; color: #475569; }
.fahuo-outbound-unit-value { font-size: 13px; font-weight: 800; color: #0f2f5f; }
.fahuo-outbound-unit-input { width: 140px; }

.fahuo-outbound-confirm { border-top: 1px dashed #e2e8f0; padding-top: 10px; }

/* ==================== v8.72：出库单发货「长横条预览框」+ 副数弹窗 ==================== */
/* 有货客户下拉：红字(#d00) + 红框 */
.fahuo-outbound-customer-red {
  border: 1.5px solid #d00 !important;
  border-radius: 8px;
  box-shadow: 0 0 0 2px rgba(221, 0, 0, .10);
}
/* 长横条容器：竖排堆叠（每个 W 编号一条） */
.fahuo-outbound-bars { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.fahuo-outbound-bar { padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.fahuo-outbound-bar-main { display: flex; flex-direction: row; align-items: center; gap: 12px; }
/* 图框一排：屏窄左右滑动（复用 mc-bar-items 的 overflow-x） */
.fahuo-outbound-bar-main .mc-bar-items { scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.fahuo-outbound-bar-main .mc-bar-items .mc-bar-item { scroll-snap-align: start; }
/* 勾选区（整副 / 单块） */
.fahuo-outbound-sel { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 8px; border-top: 1px dashed #e2e8f0; }
.fahuo-outbound-sel-mat { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; color: #334155; }
/* preview 顶部补选客户 */
.fahuo-outbound-preview-picker { margin-bottom: 12px; }

/* 副数弹窗 */
.fahuo-dosage-modal .modal { max-width: 360px; }
.fahuo-dosage-title { font-size: 17px; font-weight: 800; text-align: center; color: #0f2f5f; margin-bottom: 6px; }
.fahuo-dosage-hint { font-size: 12px; color: #94a3b8; text-align: center; margin-bottom: 16px; }
.fahuo-dosage-rows { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.fahuo-dosage-row { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 15px; font-weight: 700; color: #0f2f5f; }
.fahuo-dosage-label { min-width: 52px; text-align: right; }
.fahuo-dosage-input {
  width: 96px; padding: 8px 10px; border: 1.5px solid #cbd5e1; border-radius: 8px;
  font-family: inherit; font-size: 16px; font-weight: 700; text-align: center; color: #0f172a;
}
.fahuo-dosage-input:focus { border-color: #1c5fd6; outline: none; }
.fahuo-dosage-unit { font-size: 14px; color: #475569; }
.fahuo-dosage-actions { display: flex; gap: 10px; justify-content: center; }

/* 手机适配：图框横滑 / 勾选 / 弹窗 */
@media (max-width: 600px) {
  .fahuo-outbound-bar-main { gap: 8px; }
  .fahuo-outbound-sel { gap: 8px; }
  .fahuo-dosage-input { width: 84px; }
}

/* 手机端：四宫格改两列，按钮副标题收紧 */
@media (max-width: 480px) {
  .fahuo-methods { grid-template-columns: repeat(2, 1fr); }
  .fahuo-tab { padding: 8px 10px; }
  .fahuo-pending-grid { grid-template-columns: repeat(3, 1fr); }
  .fahuo-outbound-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ==================== v8.63：机加工卡片手机端 = 电脑端等比缩放（≤767px） ====================
   目标：手机端「铝模上」卡片 = 电脑端原样等比缩小并铺满一屏；手机端只显示电脑端有的内容，
   凡是手机端多出来的排版/项全部去掉（v8.62 的重排规则已整块移除）。
   做法：手机端按电脑端设计宽度（由 JS 写入 --mc-fit-w）渲染卡片，再整体 zoom 缩到屏宽；
   卡内布局（左右分栏 / 栏位排布 / 字号 / 图片定高 / 按钮横排）与电脑端完全一致，不拆不改结构。
   为达成等比，需中和历史版本窄屏规则对 .mc-plates-flex 子树的重排
   （v7.59 单列 column / v7.66 强制 50% 并排+12px 字号 / v8.04 拍照列 108px / v8.49 满宽）。
   作用域严格限定 .mc-plates-flex 子树；电脑端（>767px）与其它工序零影响。 */
@media (max-width: 767px) {
  /* ① 容器：v8.65 flex 竖排（order 由 JS 按分类标准顺序写入，实现「铝模上→铝模下→铁模上→铁模下→小件」）；
     卡片按设计宽渲染后整体 zoom 到【满屏宽】（--mc-fit-w / --mc-fit-z 由 JS 写入）；
     容器负 margin 吃掉外层左右留白，宽高由 JS 精确设为 100% 屏宽 → 整框满屏宽、不贴边留缝。
     gap 8px 与电脑端 .mc-plates-flex 一致。 */
  .mc-plates-flex {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px;
    width: 100%;
  }
  .mc-plates-flex > .plate-card.mc-card {
    width: var(--mc-fit-w, 100%) !important;
    max-width: none !important;
    margin: 0;
    zoom: var(--mc-fit-z, 1);
  }
  /* ② 卡内多栏容器：恢复电脑端横排（中和 v7.59 的 column / v7.66 的 gap:4px+padding 变化） */
  .mc-plates-flex .mc-cols {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 8px !important;
    padding: 14px !important;
    align-items: flex-start !important;
  }
  .mc-plates-flex .mc-cols.has-photoio.cols-2rows { flex-wrap: nowrap !important; }
  .mc-plates-flex .mc-cols.cols-3rows { flex-wrap: wrap !important; }
  /* ③ 子栏：恢复电脑端 flex:1 1 0 均分（中和 v7.66 的 width:50%/33.33%） */
  .mc-plates-flex .mc-cols > .mc-col { flex: 1 1 0 !important; width: auto !important; min-width: 0 !important; }
  /* ④ 栏内图片：恢复电脑端定高裁切（中和 v7.66 的 height:auto / max-width:100%） */
  .mc-plates-flex .mc-col img { max-width: none !important; }
  .mc-plates-flex .mc-col .mc-f-img img { height: 92px !important; }
  /* ⑤ 字段：恢复电脑端字号（中和 v7.66 的 .mc-f 12px / label 11px） */
  .mc-plates-flex .mc-f { font-size: inherit !important; }
  .mc-plates-flex .mc-f > label { font-size: 12px !important; margin-bottom: 0 !important; }
  /* ⑥ 拍照计时列：恢复电脑端宽度（中和 v8.04 的 108px/96px、v8.62 的 100%） */
  .mc-plates-flex .mc-cols.cols-2rows > .mc-photoio { flex: 0 0 216px !important; width: 216px !important; }
  .mc-plates-flex .mc-cols.cols-3rows > .mc-photoio { flex: 1 1 100% !important; width: 100% !important; }
  /* ⑦ 上料/下料区：恢复电脑端左右排列（中和 v8.62 的 column 堆叠） */
  .mc-plates-flex .mc-photoio-zone { flex-direction: row !important; align-items: stretch !important; gap: 8px !important; }
  .mc-plates-flex .mc-photoio-frame { flex: 0 0 88px !important; width: 88px !important; min-height: 96px !important; height: auto !important; }
  .mc-plates-flex .mc-photoio-side { width: auto !important; justify-content: center !important; }
  .mc-plates-flex .mc-photoio-side .mc-photoio-btn { width: auto !important; margin-top: 0 !important; }
  /* ⑧ 底部按钮：恢复电脑端横排自适应（中和 v8.62 的 column、v7.59 的 flex:1 1 auto） */
  .mc-plates-flex .mc-foot { display: flex !important; flex-direction: row !important; flex-wrap: wrap !important; align-items: center !important; }
  .mc-plates-flex .mc-foot .btn-io-confirm { flex: 0 0 auto !important; width: auto !important; }
}


/* ==================== v8.66：全模块手机端 = 电脑端原样 · 等比缩放满屏宽（≤767px） ====================
   把 v8.63/v8.65 机加工方案泛化到「造型选料区 / 编程 / 手工 / 铁模」料块卡。
   ① 容器（.zx-pick-grid / .zx-prog-wrap）吃掉外层左右留白 → 满屏宽（负 margin / width 由 JS 精确写入）；
   ② 卡片按电脑端设计宽渲染（--zx-fit-w）后整体 zoom（--zx-fit-z）缩到满屏宽；
   ③ 卡内布局一律还原电脑端 —— 中和历史版本窄屏重排规则
      （v7.59 单列 column / v7.61 强制单列 / v7.66 强制 50% 并排 + 12px 字号 / v8.23 max-width:100%）。
   作用域严格限定 .zx-pick-grid / .zx-prog-wrap 子树；电脑端（>767px）与 v8.65 机加工子树零影响。 */
@media (max-width: 767px) {
  /* ① 容器：竖排 + 满屏宽（中和 v7.59 的 flex-direction:column，改由 JS 控制宽与负 margin） */
  .zx-pick-grid, .zx-prog-wrap {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
    gap: 8px !important;
    /* 注意：此条 width 绝不能加 !important —— 容器实际宽度（吃掉外层左右留白后 = 100% 屏宽）
       由 JS 写成内联 style.width；若本条带 !important 会压过内联值，容器被压回 100% 父宽（仅占屏 81%）。 */
    width: 100%;
  }
  /* 区块标题不参与缩放、不被拉满 */
  .zx-prog-wrap > .zx-prog-title {
    flex: 0 0 auto !important; width: auto !important; align-self: flex-start !important;
    zoom: 1 !important; margin-bottom: 0 !important;
  }
  /* ② 卡片：按设计宽渲染 + zoom 等比缩到满屏宽（中和 v7.59/v8.23 的 width:100%!important / max-width:100%） */
  .zx-pick-grid > .zx-pick-cell,
  .zx-prog-wrap > .zx-prog-card:not(.sg-block-card):not(.mc-block-card):not(.zx-tm-set-card):not(.zx-sgm-card):not(.zx-tm-manual-card) {
    width: var(--zx-fit-w, 100%) !important;
    max-width: none !important;
    margin: 0 !important;
    zoom: var(--zx-fit-z, 1);
  }
  /* v8.98 兜底：Firefox/旧 WebView 不支持 zoom，用 transform:scale 等比缩放（编程料块卡） */
  @supports not (zoom:1){.zx-prog-wrap>.zx-prog-card:not(.sg-block-card):not(.mc-block-card):not(.zx-tm-set-card):not(.zx-sgm-card):not(.zx-tm-manual-card){transform:scale(var(--zx-fit-z,1));transform-origin:top left;zoom:normal;}}
  /* ③ 中和 v7.61/v7.66：栏容器恢复电脑端「横排 wrap + gap 8px」 */
  .zx-pick-cell .zx-cols, .zx-prog-card .zx-cols,
  .zx-pick-cell .prog-cols, .zx-prog-card .prog-cols {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .zx-pick-cell .cols-2rows > .zx-col, .zx-pick-cell .cols-2rows > .prog-col,
  .zx-prog-card .cols-2rows > .zx-col, .zx-prog-card .cols-2rows > .prog-col {
    flex: 1 1 calc(50% - 4px) !important; width: auto !important; min-width: 0 !important;
  }
  .zx-pick-cell .cols-3rows > .zx-col, .zx-pick-cell .cols-3rows > .prog-col,
  .zx-prog-card .cols-3rows > .zx-col, .zx-prog-card .cols-3rows > .prog-col {
    flex: 1 1 100% !important; width: auto !important; min-width: 0 !important;
  }
  .zx-pick-cell .zx-col, .zx-prog-card .zx-col,
  .zx-prog-card .prog-col { flex: 1 1 0 !important; width: auto !important; min-width: 0 !important; }
  .zx-prog-card .prog-col + .prog-col {
    border-left: 1px dashed #e2e8f0 !important; border-top: none !important;
    padding-left: 14px !important; padding-top: 0 !important;
  }
  /* ④ 中和 v7.61：栏内图片恢复电脑端（不强制 100% / height:auto） */
  .zx-pick-cell .zx-col img, .zx-prog-card .prog-col img { max-width: none !important; }
  .zx-prog-card .prog-photo img { width: 100% !important; height: 100% !important; }
  /* ⑤ 中和 v7.66：字段字号/标签宽度恢复电脑端 */
  .zx-pick-cell .zx-alumup-field, .zx-pick-cell .zxau-read-field,
  .zx-prog-card .prog-fld, .zx-prog-card .mc-f { font-size: inherit !important; }
  .zx-pick-cell .zx-alumup-field > label {
    flex: 0 0 62px !important; font-size: 13px !important; margin-bottom: 0 !important;
  }
  .zx-pick-cell .zxau-read-field > span {
    flex: 0 0 70px !important; font-size: 12px !important; margin-bottom: 0 !important;
  }
  .zx-prog-card .prog-fld-name {
    flex: 0 0 auto !important; font-size: 12px !important; min-width: 60px !important; margin-bottom: 0 !important;
  }
  /* ⑥ 中和 v7.59：编程料块卡恢复电脑端「照片左 + 参数右」。
     排除 手工(.sg-block-card) / 机加工(.mc-block-card) / 铁模(.zx-tm-set-card) ——
     这三类卡电脑端自带 body padding 与 foot 排布（.sg-block-card .zx-prog-body{padding:10px}、
     .zx-tm-rows{flex-direction:column}、.zx-tm-foot{justify-content:space-between}），
     若被本条强行改成 row/12px/flex-end 就会与电脑端不一致（v8.66 首轮验证踩到的坑）。 */
  .zx-prog-card:not(.sg-block-card):not(.mc-block-card):not(.zx-tm-set-card) > .zx-prog-body {
    display: flex !important; flex-direction: row !important;
    align-items: flex-start !important; gap: 14px !important; padding: 12px !important;
  }
  .zx-prog-card:not(.sg-block-card):not(.mc-block-card):not(.zx-tm-set-card) > .zx-prog-body > .zx-prog-photo {
    width: 150px !important; min-width: 150px !important; max-width: none !important;
    margin: 0 !important; aspect-ratio: 1 / 1 !important;
  }
  .zx-prog-card > .zx-prog-body > .zx-prog-params { flex: 1 !important; min-width: 0 !important; }
  .zx-prog-card:not(.sg-block-card):not(.mc-block-card):not(.zx-tm-set-card) > .zx-prog-foot {
    justify-content: flex-end !important; flex-wrap: nowrap !important;
  }
  .zx-prog-card .zx-prog-fn { flex: 0 0 auto !important; min-width: 130px !important; max-width: 240px !important; }
  /* ⑦ 中和 v7.59：造型选料卡恢复电脑端「字段左 + 照片右 200px」 */
  /* gap 必须是 8px 不是 14px：4230 行 .zx-alumup-body{gap:14px} 被后定义的 4335 行
     .zx-cols,.mc-cols,.prog-cols{gap:8px} 覆盖（同特异性、后者胜），电脑端实际生效的是 8px。
     v8.66 首版照抄了 14px，导致 2×(50%-4px)+14px 溢出 → 左右两列 wrap 成上下，卡高从 218 涨到 256。 */
  .zx-pick-cell .zx-alumup-body {
    display: flex !important; flex-direction: row !important; gap: 8px !important; padding: 14px !important;
  }
  .zx-pick-cell .zx-alumup-left { flex: 1 !important; min-width: 0 !important; }
  .zx-pick-cell .zx-alumup-right { flex: 0 0 200px !important; width: auto !important; }
  .zx-pick-cell .zxau-photo { width: 200px !important; height: 170px !important; }
  .zx-pick-cell .zxau-photo-actions {
    width: 200px !important; margin-top: 8px !important; flex-wrap: nowrap !important;
  }
  .zx-pick-cell .zxau-photo-actions .zxau-btn {
    flex: 1 1 0 !important; height: 34px !important; font-size: 13px !important; padding: 0 6px !important;
  }
  .zx-pick-cell .zx-alumup-foot .zxau-btn { flex: 1 1 0 !important; min-width: 0 !important; }
  .zx-pick-cell .zx-alumup-foot .zxau-btn.zxau-btn-del { flex: 0 0 auto !important; }
  /* ⑧ 手工/机加工料块卡：中和 v8.23 的 max-width:100%!important，栅格恢复电脑端布局 */
  .sg-block-card .sg-block-grid {
    flex-direction: row !important; flex-wrap: nowrap !important; gap: 10px !important; align-items: stretch !important;
  }
  .sg-block-card .sg-block-col { flex: 1 1 0 !important; min-width: 0 !important; }
  .sg-block-card .sg-block-photo { aspect-ratio: 1 / 1 !important; }
  /* 机加工卡：阶段D纵向流 —— 主图整宽 contain / 字段三栏 / 拍照双格并排 / 底栏（与电脑端同一套网格） */
  .mc-block-card .mc-block-grid { flex-direction: column !important; gap: 10px !important; align-items: stretch !important; }
  .mc-block-card .mc-block-fields { flex-direction: row !important; flex-wrap: nowrap !important; gap: 10px !important; align-items: stretch !important; }
  .mc-block-card .mc-block-col { flex: 1 1 0 !important; min-width: 0 !important; }
  .mc-block-card .mc-block-io-row { flex-direction: row !important; flex-wrap: nowrap !important; gap: 10px !important; align-items: stretch !important; }
  .mc-block-card .mc-block-zone { flex-direction: column !important; align-items: stretch !important; flex: 1 1 0 !important; }
  .mc-block-card .mc-block-refphoto { aspect-ratio: auto !important; height: auto !important; }
  .mc-block-card .mc-block-refphoto img { width: 100% !important; height: auto !important; object-fit: contain !important; }
  .mc-block-card .mc-block-zone-photo { aspect-ratio: auto !important; width: 100% !important; height: auto !important; }
  .mc-block-card .mc-block-zone-photo img { width: 100% !important; height: auto !important; object-fit: contain !important; }
  /* 手工卡 body 保持电脑端 row；机加工卡 body 阶段D为 column */
  .sg-block-card > .zx-prog-body { flex-direction: row !important; align-items: flex-start !important; }
  .mc-block-card > .zx-prog-body { flex-direction: column !important; align-items: stretch !important; }
  /* ⑨ 铁模装配卡：恢复电脑端横排（中和 ≤720px 的 nowrap 挤压 / ≤600px 的 column） */
  .zx-tm-set-card .zx-tm-grid {
    flex-direction: row !important; flex-wrap: nowrap !important; gap: 10px !important; align-items: stretch !important;
  }
  .zx-tm-set-card .zx-tm-col { flex: 1 1 0 !important; min-width: 0 !important; }
  .zx-tm-set-card .zx-tm-row-body {
    flex-direction: row !important; gap: 12px !important; align-items: stretch !important; width: 100% !important;
  }
  .zx-tm-set-card .zx-tm-row-left, .zx-tm-set-card .zx-tm-row-right {
    flex: 1 1 0 !important; width: auto !important; min-width: 0 !important;
  }
  .zx-tm-set-card .zx-tm-small-body { flex-direction: row !important; gap: 10px !important; align-items: stretch !important; }
  .zx-tm-set-card .zx-tm-small-body .zx-tm-photo-sm { flex: 0 0 34% !important; max-width: 130px !important; }
  .zx-tm-set-card .zx-tm-small-body .zx-tm-flds { flex: 1 1 auto !important; min-width: 0 !important; }
}

/* 补丁C·三工序手机单列（≤767px）：手工/铁模上下堆叠、机加工左右双列、≤380px 单列 */
@media (max-width: 767px) {
  /* 手工：左右两组上下堆叠 */
  .sg-block-card .sg-block-grid { flex-direction: column !important; }
  .sg-block-card .sg-block-col  { width:100% !important; max-width:100% !important; min-width:0; box-sizing:border-box; }

  /* 铁模：左右两组上下堆叠 */
  .zx-tm-set-card .zx-tm-row-body { flex-direction: column !important; }
  .zx-tm-set-card .zx-tm-row-left,
  .zx-tm-set-card .zx-tm-row-right { width:100% !important; max-width:100% !important; min-width:0; box-sizing:border-box; }

  /* 第四步：装配详情页「一排两栏」——左图|右操作手机端左右并排（覆盖上面铁模上下堆叠） */
  .zx-tm-set-card .zx-tm-row-body { flex-direction: row !important; }
  .zx-tm-set-card .zx-tm-row-left,
  .zx-tm-set-card .zx-tm-row-right { width: auto !important; max-width: none !important; flex: 1 1 0 !important; min-width: 0; }

  /* 机加工·字段区：左右两列并排 */
  .mc-block-card .mc-block-fields { display:flex !important; flex-wrap:wrap; flex-direction:row !important; }
  .mc-block-card .mc-block-col    { flex:1 1 50% !important; max-width:50% !important; min-width:0; box-sizing:border-box; }

  /* 机加工·上料/下料照片：左右并排对照 */
  .mc-block-card .mc-block-io-row { display:flex !important; flex-wrap:wrap; flex-direction:row !important; }
  .mc-block-card .mc-block-zone   { flex:1 1 50% !important; max-width:50% !important; min-width:0; box-sizing:border-box; }

  @media (max-width:380px){
    .mc-block-card .mc-block-col,
    .mc-block-card .mc-block-zone { flex:1 1 100% !important; max-width:100% !important; }
  }

  .mc-block-card .prog-fld,
  .zx-tm-set-card .prog-fld { overflow-wrap:anywhere; white-space:normal; }

  /* 手工·字号三档自适应：仅 font-size 缩放，禁 white-space:nowrap / 固定 em 撑出 100vw */
  .sg-block-card .prog-fld,
  .sg-block-card .sg-block-col span,
  .sg-block-card .sg-block-col div { overflow-wrap:anywhere !important; word-break:break-word !important; white-space:normal !important; min-width:0; }
}

/* ==================== v8.68 人员面板重构（新增 / 编辑 共用同一面板） ====================
   全部使用新增类名（.uf-* / .wt-* / .os-*），不改动任何既有类，零扩散风险。 */
.uf-sec { border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; margin-bottom: 12px; }
.uf-sec-title { font-weight: 600; font-size: 14px; margin-bottom: 10px; }
.uf-sub-sec { border: 1px dashed var(--border); border-radius: 6px; padding: 10px 12px; margin-bottom: 10px; }
.uf-sub-sec:last-child { margin-bottom: 0; }
.uf-sub-title { font-weight: 600; font-size: 13px; margin-bottom: 8px; color: var(--text-secondary); }
.uf-sec-hint { font-size: 12px; color: var(--text-light); margin-top: 8px; line-height: 1.6; }
/* ① 基本账户：用户名 + 密码同一行 */
.uf-acct-row { display: flex; gap: 12px; }
.uf-acct-row > * { flex: 1; min-width: 0; }
/* v8.70 ⑥ 外协：每工种一行 —— 工种名 + 是否外协（单位/价格不再于此录入） */
.wt-row { border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; margin-bottom: 8px; }
.wt-row-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.wt-name { font-size: 14px; font-weight: 600; min-width: 64px; }
@media (max-width: 768px) {
  .uf-acct-row { flex-direction: column; gap: 0; }
  .wt-name { min-width: 0; }
}

/* ==================== v8.71 设计区中转弹窗（纯前端：造型→设计→编程三区继承） ==================== */
.zx-design-modal-box { max-width: 640px; }
.zx-design-body { padding: 18px 24px; }
.zx-design-mold { font-size: 13px; font-weight: 700; color: var(--text-secondary); margin-bottom: 14px; }
.zx-design-field { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.zx-design-field label { flex: 0 0 110px; font-size: 13px; color: var(--text-secondary); text-align: right; }
.zx-design-field input,
.zx-design-field select,
.zx-design-field textarea {
  flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid var(--border);
  border-radius: 6px; font-size: 14px; background: var(--card); color: var(--text);
  box-sizing: border-box;
}
.zx-design-field textarea { resize: vertical; }
.zx-design-ro { flex: 1; font-size: 14px; color: var(--text-light); }
.zx-design-remark label { align-self: flex-start; }
/* v8.72：下拉「当前值不在选项里」的原值 option 标黄，提示值来源为上游、当前模板选项已不包含 */
.zx-opt-stale { background: #fff8e1; color: #b45309; font-weight: 600; }
@media (max-width: 768px) {
  .zx-design-field { flex-direction: column; align-items: stretch; gap: 4px; }
  .zx-design-field label { flex: none; text-align: left; }
}

/* ==================== v8.90：设置页结构重构 ==================== */
/* ① 账号信息三区横排 flex（左窄=用户名+角色 / 中=修改密码 / 右=工资管理密码） */
.acct-3col {
  display: flex;
  gap: 16px;
  align-items: stretch;
}
.acct-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.acct-col-id {
  flex: 0 0 160px;
  border-right: 1px dashed var(--border);
  padding-right: 16px;
}
.acct-col-pw { flex: 1 1 0; }
.acct-col-wage {
  flex: 1 1 0;
  border-left: 1px dashed var(--border);
  padding-left: 16px;
}
.acct-sub-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.acct-field-row { display: flex; align-items: center; gap: 10px; }
.acct-label { flex: 0 0 76px; font-size: 13px; color: var(--text-secondary); text-align: right; }
.acct-field-row .form-input { flex: 1; min-width: 0; }
.acct-col-wage .form-input { width: 100%; box-sizing: border-box; }
.acct-col-pw .btn,
.acct-col-wage .btn { align-self: flex-start; }

/* ② 两栏等高容器（技术人员管理|字体大小 / 软件激活|注册机+高危） */
.settings-duo.settings-duo-eq { align-items: stretch; }

/* ③ 字体大小内部选项等比缩小（置于 1/2 栏） */
.fs-options-sm { gap: 8px; }
.fs-options-sm .fs-btn { min-width: 56px; padding: 10px 4px; gap: 6px; font-size: 13px; border-radius: 10px; }

/* ④ 软件激活左栏撑满整高 */
.settings-col-fill { height: 100%; }

/* ⑤ 右列上下两区（注册机上 / 高危操作区下）各 1/2 高 */
.settings-col-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  margin-bottom: 12px;
  height: 100%; /* v8.94：右列撑满网格行高，配合左栏 .settings-col-fill 实现左右等高 */
}
/* v8.94：卡片改为内容驱动高度（原 flex:1 强制各占 1/2，导致高危区内容超出被裁切） */
.settings-col-stack .card { flex: 0 0 auto; margin-bottom: 0; min-width: 0; }
/* v8.94：高危操作区吃掉右列剩余高度 → 撑满整列且内容（含按钮）完整显示 */
.settings-col-stack .danger-zone { flex: 1 1 auto; }

/* ⑥ 高危操作区一键清零按钮缩小 */
.settings-col-stack .danger-zone .btn-danger { width: auto; padding: 8px 16px; font-size: 13px; }

@media (max-width: 768px) {
  .acct-3col { flex-direction: column; gap: 14px; }
  .acct-col-id { flex: none; border-right: none; padding-right: 0; border-bottom: 1px dashed var(--border); padding-bottom: 12px; }
  .acct-col-wage { border-left: none; padding-left: 0; border-top: 1px dashed var(--border); padding-top: 12px; }
}

/* ==================== 机加工机床选择/配置弹窗（上料拍照选机床） ==================== */
.mc-mach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.mc-mach-btn {
  padding: 10px 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
}
.mc-mach-btn:hover { border-color: var(--primary); color: var(--primary); }
.mc-mach-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.mc-mach-other {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 13px;
  cursor: pointer;
}
.mc-mach-other input { accent-color: var(--primary); }

/* v8.74 提示词四：待发区外层包装 + 标题条（方案 A：仅外层加标题，待发区内部零改动） */
.pending-wrap { margin: 0 0 12px; }
.pending-wrap-title {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 800; color: #0f2f5f;
  background: linear-gradient(180deg, #f3f8ff, #eaf2ff);
  border: 1.5px solid #dbe4f2; border-bottom: 0;
  border-radius: 12px 12px 0 0; padding: 8px 12px; margin-bottom: -1.5px;
}
.pending-wrap #pending-area { margin: 0; }

// 补13追加六：三格栏手机端媒体查询随栏删除

/* ==================== v8.71 待发区（选货暂存，紧贴三格栏下方） ==================== */
#pending-area { margin: 0 0 12px; }
#pending-area:empty { display: none; }
.pending-area { border: 1.5px solid #dbe4f2; border-radius: 12px; background: #fff; overflow: hidden; }
.pending-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px; background: linear-gradient(180deg, #f3f8ff, #eaf2ff); border-bottom: 1px solid #e2e8f0;
}
.pending-head-main { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; font-weight: 800; color: #0f2f5f; }
.pending-star { color: #f59e0b; }
.pending-sum {
  font-size: 12px; font-weight: 700; color: #1c5fd6; background: #fff;
  border: 1px solid #cfe0fb; border-radius: 999px; padding: 2px 10px;
}
.pending-head-actions { display: inline-flex; gap: 8px; }
.pending-btn {
  border: 1px solid #cbd5e1; background: #fff; color: #334155; font-family: inherit;
  font-size: 13px; font-weight: 700; border-radius: 8px; padding: 7px 14px; cursor: pointer; transition: all .15s;
}
.pending-btn:hover:not(:disabled) { background: #f1f5f9; }
.pending-btn:disabled { opacity: .5; cursor: not-allowed; }
.pending-btn-add { border-color: #1c5fd6; background: #1c5fd6; color: #fff; }
.pending-btn-add:hover:not(:disabled) { background: #1750b8; }
.pending-btn-clear { color: #b91c1c; border-color: #fecaca; }
.pending-btn-clear:hover:not(:disabled) { background: #fef2f2; }
.pending-btn-next { border-color: #16a34a; background: #16a34a; color: #fff; }
.pending-btn-next:hover:not(:disabled) { background: #15803d; }
.pending-list { display: grid; gap: 8px; grid-template-columns: repeat(3, 1fr); padding: 10px 12px; }
@media (min-width: 768px) { .pending-list { grid-template-columns: repeat(6, 1fr); } }
/* v8.73 卡片：一个 W 编号 = 一张卡（上=缩略图整副拼一张 / 下=编号 + 铝X 铁Y）；手机 3 列、桌面 6 列 */
.pending-card {
  position: relative; display: flex; flex-direction: column;
  border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden; background: #fff;
}
.pending-card-thumbwrap { width: 100%; aspect-ratio: 1 / 1; background: #f1f5f9; }
.pending-thumb { display: grid; grid-template-columns: repeat(2, 1fr); grid-auto-rows: 1fr; width: 100%; height: 100%; }
.pending-thumb:not(.pending-thumb-multi) { grid-template-columns: 1fr; }
.pending-thumb > img { width: 100%; height: 100%; object-fit: cover; display: block; background: #f8fafc; cursor: pointer; }
.pending-thumb-empty, .pending-thumb.img-failed {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; color: #94a3b8; font-size: 22px; background: #f1f5f9;
}
.pending-card-info { padding: 5px 6px 6px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pending-card-no { font-size: 12px; font-weight: 800; color: #0f2f5f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pending-card-mats { font-size: 11px; font-weight: 700; color: #475569; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pending-card-del {
  position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; line-height: 1;
  display: flex; align-items: center; justify-content: center; padding: 0;
  border: 0; border-radius: 50%; background: rgba(15,47,95,.55); color: #fff; font-size: 14px; cursor: pointer;
}
.pending-card-del:hover { background: #dc2626; }
.pending-empty { padding: 14px 12px; font-size: 13px; color: #94a3b8; }
.pending-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-top: 1px dashed #e8edf5; font-size: 13px; }
.pending-item:first-child { border-top: 0; }
.pending-item-no { font-weight: 800; color: #0f2f5f; white-space: nowrap; }
.pending-item-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #334155; }
.pending-mat-badge { font-size: 11px; font-weight: 800; border-radius: 6px; padding: 2px 8px; white-space: nowrap; }
.pending-mat-badge.aluminum { color: #1d4ed8; background: #dbeafe; }
.pending-mat-badge.iron_mold { color: #b91c1c; background: #fee2e2; }
.pending-item-sel { color: #475569; font-weight: 700; white-space: nowrap; }
.pending-item-qty { color: #16a34a; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pending-item-del { border: 0; background: transparent; color: #94a3b8; font-size: 18px; line-height: 1; cursor: pointer; padding: 0 4px; }
.pending-item-del:hover { color: #dc2626; }

/* 选货区工具条 + 行内勾选/展开 */
.pending-list-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  margin: 0 0 10px; padding: 8px 12px; background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 10px;
}
.pending-list-bar-info { font-size: 13px; color: #475569; }
.pending-list-bar-count { color: #1c5fd6; font-weight: 800; margin-left: 6px; }
.rail-c0 { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 2px; }
.mold-sel-check { width: 18px; height: 18px; cursor: pointer; accent-color: #1c5fd6; }
.mold-inline-toggle {
  border: 1px solid #cbd5e1; background: #fff; color: #1c5fd6; font-family: inherit;
  font-size: 11px; font-weight: 700; border-radius: 6px; padding: 2px 6px; cursor: pointer; white-space: nowrap;
}
.mold-inline-toggle:hover { background: #f1f5f9; }
.mold-inline-panel {
  margin-top: 8px; padding: 10px; border: 1px dashed #cbd5e1; border-radius: 10px;
  background: #fbfdff; display: flex; flex-direction: column; gap: 8px;
}
.mold-inline-mat { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: #334155; }
.mold-inline-field { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.mold-inline-num { width: 56px; padding: 4px 6px; border: 1px solid #cbd5e1; border-radius: 6px; font-family: inherit; font-size: 13px; }
.mold-inline-check { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.mold-inline-check input { accent-color: #1c5fd6; }
.mold-inline-hint { font-size: 11px; color: #94a3b8; }
/* ==================== v9.x 分件发货：行内展开面板（件级勾选区 + 待发区精调区） ==================== */
.ship-piece-block, .mold-inline-block { display: flex; flex-direction: column; gap: 6px; }
.mold-inline-block { margin-top: 8px; padding-top: 8px; border-top: 1px dashed #e2e8f0; }
.ship-piece-title, .mold-inline-title { font-size: 12px; font-weight: 800; color: #0f2f5f; }
.ship-piece-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: #334155; }
.ship-piece-row-off { opacity: .55; }
.ship-piece-check { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; cursor: pointer; color: #1c5fd6; white-space: nowrap; }
.ship-piece-box { width: 16px; height: 16px; accent-color: #1c5fd6; cursor: pointer; }
.ship-piece-box:disabled { cursor: not-allowed; }
.ship-piece-state { font-size: 11px; font-weight: 800; border-radius: 6px; padding: 2px 8px; white-space: nowrap; }
.ship-piece-state.ready { color: #15803d; background: #dcfce7; }
.ship-piece-state.undone { color: #64748b; background: #eef1f5; }
.ship-piece-state.shipped { color: #0f766e; background: #ccfbf1; }
/* 卡片「部分发货」警示标签（橙/警示色） */
.mold-shippartial-tag {
  font-size: 11px; font-weight: 800; color: #b45309; background: #fef3c7;
  border: 1.5px solid #fde68a; border-radius: 8px; padding: 3px 9px; white-space: nowrap;
}
/* 进度条「发货」格状态色：部分发货=橙、全发完=绿（未发=默认灰）；手机端同样生效 */
.stage-cell.ship-cell-partial { background: #f59e0b !important; border-color: transparent; box-shadow: 0 2px 5px rgba(180, 83, 9, .35); }
.stage-cell.ship-cell-partial .stage-cell-num, .stage-cell.ship-cell-partial .stage-cell-done { color: #fff; }
.stage-cell.ship-cell-partial .stage-cell-name { background: rgba(120, 53, 15, .55); }
.stage-cell.ship-cell-full { background: #43a047 !important; border-color: transparent; }
.stage-cell.ship-cell-full .stage-cell-num, .stage-cell.ship-cell-full .stage-cell-done { color: #fff; }
@media (max-width: 768px) {
  /* 手机端：行首勾选/展开收起控件更紧凑，避免挤压整行 */
  .rail-c0 { gap: 4px; }
  .mold-inline-toggle { font-size: 10px; padding: 2px 4px; }
  .pending-head { align-items: flex-start; }
  .pending-head-actions { width: 100%; justify-content: flex-end; }
}

/* 出库单预览（三栏：抬头 / 六列明细 / 页脚） */
/* v9.y（Task#51）：预览卡整体精致化 —— 柔和投影与系统视觉语言一致（#e2e8f0 边框 / #f8fafc 表头 / #0f2f5f 主色） */
.fahuo-outbound-preview {
  border: 1.5px solid #e2e8f0; border-radius: 12px; overflow: hidden; background: #fff;
  box-shadow: 0 1px 3px rgba(15, 47, 95, 0.06), 0 4px 14px rgba(15, 47, 95, 0.05);
}
.fahuo-outbound-preview-title {
  text-align: center; font-size: 15px; font-weight: 800; color: #0f2f5f;
  padding: 10px; background: #f3f8ff; border-bottom: 1px solid #e2e8f0;
}
.fahuo-outbound-preview-anchor { font-size: 13px; color: #334155; padding: 10px 12px; border-bottom: 1px dashed #e2e8f0; }
.fahuo-outbound-preview-anchor strong { color: #0f2f5f; }
.fahuo-outbound-preview-tablewrap { overflow-x: auto; }
.fahuo-outbound-preview-table { width: 100%; border-collapse: collapse; font-size: 12px; min-width: 560px; }
/* v9.y（Task#51）：行高/单元格 padding 加大，给放大后的产品图留空间；表头底色/行分隔/hover 精致化 */
.fahuo-outbound-preview-table th,
.fahuo-outbound-preview-table td { border: 1px solid #e8edf5; padding: 8px 10px; text-align: center; vertical-align: middle; }
.fahuo-outbound-preview-table thead th {
  background: #f8fafc; color: #475569; font-weight: 700; white-space: nowrap;
  border-bottom: 1.5px solid #e2e8f0; letter-spacing: 0.3px;
}
.fahuo-outbound-preview-table tbody tr:nth-child(even) { background: #fcfdff; }
.fahuo-outbound-preview-table tbody tr { transition: background 0.15s ease; }
.fahuo-outbound-preview-table tbody tr:hover { background: #f4f8fe; }
.fahuo-op-num { font-variant-numeric: tabular-nums; font-weight: 700; color: #0f2f5f; }
/* v9.y（Task#51）：产品图 44→88 满格放大 + 圆角/柔和阴影/hover·active 微效果（点击开灯箱，cursor 用 zoom-in 表意）
   v9.z（Task#52）：88×88 方格 → 高 96、宽按原图比例自适应（contain，不裁方；最宽 150px）
   v9.aa（Task#53）：高度减 1/3（96→64）整体紧凑；td 收缩贴身图片（width:1px + nowrap + 收紧 padding）→ 右侧不留白 */
.fahuo-op-img { background: #f8fafc; }
.fahuo-outbound-preview-table td.fahuo-op-img { width: 1px; white-space: nowrap; padding: 4px 6px; }
.fahuo-op-img img {
  height: 64px; width: auto; max-width: 110px; object-fit: contain; border-radius: 10px; cursor: zoom-in;
  border: 1px solid #e2e8f0; background: #fff;
  box-shadow: 0 1px 2px rgba(15, 47, 95, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.fahuo-op-img img:hover { transform: translateY(-1px) scale(1.02); box-shadow: 0 4px 12px rgba(15, 47, 95, 0.16); border-color: #c7d4e8; }
.fahuo-op-img img:active { transform: scale(0.98); box-shadow: 0 1px 3px rgba(15, 47, 95, 0.12); }
.fahuo-op-empty { color: #94a3b8; padding: 14px 0 !important; }
.fahuo-outbound-preview-foot {
  display: flex; flex-wrap: wrap; gap: 8px 24px;
  padding: 10px 12px; border-top: 1px solid #e2e8f0; background: #fbfdff;
}
.fahuo-op-foot-item { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.fahuo-op-foot-item span { color: #64748b; font-weight: 700; }
.fahuo-op-foot-item strong { color: #0f2f5f; }
.fahuo-outbound-preview-actions {
  display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap;
  margin-top: 10px; padding-top: 10px; border-top: 1px dashed #e2e8f0;
}
.fahuo-outbound-preview-actions .btn-complete-lg { width: auto; min-width: 220px; }

@media (max-width: 480px) {
  .fahuo-outbound-preview-actions { flex-direction: column-reverse; }
  .fahuo-outbound-preview-actions .btn-complete-lg,
  .fahuo-outbound-preview-actions .fahuo-unit-btn { width: 100%; min-width: 0; }
}

/* v9.ab：list 步统一操作框（发货单位 + 取消/直接发货 上移到编号网格之前，左右分布） */
.fahuo-op-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.fahuo-op-box .fahuo-outbound-unit-row { margin: 0; flex: 0 0 auto; }
.fahuo-op-box .fahuo-outbound-preview-actions {
  margin-top: 0; padding-top: 0; border-top: none;
  flex: 1 1 auto; justify-content: flex-end;
}
@media (max-width: 480px) {
  .fahuo-op-box { flex-direction: column; align-items: stretch; gap: 10px; padding: 10px 12px; }
  .fahuo-op-box .fahuo-outbound-preview-actions { flex-direction: column-reverse; }
  .fahuo-op-box .fahuo-outbound-preview-actions .btn-complete-lg,
  .fahuo-op-box .fahuo-outbound-preview-actions .fahuo-unit-btn { width: 100%; min-width: 0; }
}

/* v9.ab：确认发货二选一弹窗 */
.fahuo-finish-picker-modal .modal { max-width: 460px; }
.fahuo-finish-hint { font-size: 14px; color: #334155; margin-bottom: 10px; }
.fahuo-finish-summary {
  font-size: 13px; font-weight: 700; color: #0f2f5f;
  background: #f1f5f9; border-radius: 10px; padding: 10px 12px; line-height: 1.6;
}
.fahuo-finish-picker-modal .modal-footer { flex-wrap: wrap; }
.fahuo-finish-picker-modal .modal-footer .btn { flex: 1 1 auto; }
@media (max-width: 480px) {
  .fahuo-finish-picker-modal .modal-footer { flex-direction: column; }
  .fahuo-finish-picker-modal .modal-footer .btn { width: 100%; }
}

/* 简单发货弹框：W 编号多选区 */
.simple-ship-pickbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px 24px 4px;
}
.simple-ship-pickhint { font-size: 12px; color: #94a3b8; }
.simple-ship-picklist {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 6px; padding: 8px 24px 6px; max-height: 240px; overflow-y: auto;
}
.simple-ship-pick {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #334155;
  cursor: pointer; padding: 6px 8px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff;
}
.simple-ship-pick:hover { border-color: var(--primary, #1c5fd6); }
.simple-ship-pick input { accent-color: var(--primary, #1c5fd6); cursor: pointer; }
.simple-ship-pickno { font-weight: 700; color: #0f2f5f; }
.simple-ship-picktype { font-size: 10px; font-weight: 700; color: #64748b; background: #f1f5f9; border-radius: 6px; padding: 1px 6px; }

/* ==================== v8.76 出库单发货线重构：选客户弹窗 + 发往 chip + 行内展开细选 + 卡片三要素 ==================== */
/* 选客户弹窗（复用 .modal-overlay .modal） */
.fahuo-customer-modal .modal { max-width: 400px; }
.fahuo-customer-title { font-size: 17px; font-weight: 800; text-align: center; color: #0f2f5f; margin-bottom: 6px; }
.fahuo-customer-hint { font-size: 12px; color: #94a3b8; text-align: center; margin-bottom: 14px; line-height: 1.5; }
.fahuo-customer-field { margin-bottom: 10px; }
.fahuo-customer-tip { font-size: 11px; color: #94a3b8; text-align: center; margin-bottom: 18px; }
.fahuo-customer-actions { display: flex; gap: 10px; justify-content: center; }

/* 主面板顶部「发往 chip +【重选】」 */
.fahuo-customer-chip {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 12px; margin-bottom: 8px; background: #f3f8ff;
  border: 1.5px solid #cfe0fb; border-radius: 10px; font-size: 13px;
}
.fahuo-customer-chip-label { color: #64748b; font-weight: 700; }
.fahuo-customer-chip-value { color: #0f2f5f; font-weight: 800; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fahuo-customer-chip-reselect {
  margin-left: auto; padding: 4px 12px; border: 1px solid #1c5fd6; border-radius: 8px;
  background: #fff; color: #1c5fd6; font-family: inherit; font-size: 12px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px;
}
.fahuo-customer-chip-reselect:hover { background: #eef5ff; }

/* 【第一步】模具行「导航条」：左侧靠左排列 [拆分发货] [整副发货] */
.fahuo-rowbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 8px; border-bottom: 1px solid #eef2f7; }
.fahuo-rowbar-left { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fahuo-rowbar-btn {
  padding: 5px 14px; border: 1px solid #cbd5e1; border-radius: 8px;
  background: #f8fafc; color: #1c5fd6; font-family: inherit; font-size: 12px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px;
}
.fahuo-rowbar-btn:hover { border-color: #bcd4f7; background: #eef5ff; }
.fahuo-rowbar-btn-full { background: #eef5ff; border-color: #bcd4f7; }
.fahuo-rowbar-right { font-size: 12px; font-weight: 700; color: #64748b; white-space: nowrap; }

/* 行内分块勾选（常显）面板 */
.fahuo-outbound-ex { margin-top: 8px; padding-top: 8px; border-top: 1px dashed #e2e8f0; }
.fahuo-outbound-ex-panel { margin-top: 8px; padding: 10px; border: 1px dashed #cbd5e1; border-radius: 10px; background: #fbfdff; display: flex; flex-direction: column; gap: 8px; }
.fahuo-outbound-ex-mat { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: #334155; }
.fahuo-outbound-ex-select { width: auto; min-width: 84px; }
.fahuo-outbound-ex-fix { color: #b45309; font-weight: 700; }
.fahuo-outbound-ex-actions { display: flex; justify-content: flex-end; }
.fahuo-outbound-ex-actions .btn-complete-lg { width: auto; min-width: 160px; }

/* 待发区卡片下排：单行三要素（编号 + 副数 + 客户/铸造单位） */
.pending-card-info { flex-direction: row; align-items: center; gap: 5px; }
.pending-card-info .pending-card-no { flex: 0 0 auto; max-width: 45%; }
.pending-card-info .pending-card-mats { flex: 0 0 auto; }
.pending-card-dest { flex: 1 1 auto; min-width: 0; font-size: 11px; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 600px) {
  .fahuo-outbound-ex-select { min-width: 72px; }
  .fahuo-outbound-ex-actions .btn-complete-lg { width: 100%; min-width: 0; }
  .fahuo-rowbar-btn { padding: 5px 10px; }
  .fahuo-rowbar-right { display: none; }
  .pending-card-info .pending-card-no { max-width: 55%; }
}

/* ==================== v9.07 手工模专属页（仅手工模账号） ==================== */
.manual-mold { margin-bottom: 14px; }
.manual-mold-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-bottom: 10px; border-bottom: 1px solid #eef2f7; }
.manual-mold-title { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; min-width: 0; }
.manual-mold-no { font-size: 15px; font-weight: 700; color: #1a3a5c; }
.manual-mold-sub { font-size: 12px; color: #64748b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.manual-mold-tools { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.manual-mold-count { font-size: 12px; font-weight: 700; color: #0369a1; }
.manual-btn {
  padding: 5px 12px; border: 1px solid #cbd5e1; border-radius: 8px; background: #f8fafc;
  color: #1c5fd6; font-family: inherit; font-size: 12px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px;
}
.manual-btn:hover { border-color: #bcd4f7; background: #eef5ff; }
.manual-btn:disabled { opacity: .45; cursor: not-allowed; }
.manual-btn-go { background: #eef5ff; border-color: #bcd4f7; }
/* 一块一卡：图 → 图下方勾选框 → 状态 */
.manual-blocks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; padding: 12px 0; }
.manual-block { border: 1px solid #e2e8f0; border-radius: 10px; background: #fbfdff; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.manual-block-done { background: #f4fbf6; border-color: #cfe9d8; }
.manual-block-img { width: 100%; aspect-ratio: 1 / 1; border-radius: 8px; overflow: hidden; background: #f1f5f9; display: flex; align-items: center; justify-content: center; }
.manual-block-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.manual-block-img-tap { cursor: pointer; }
.manual-block-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; color: #94a3b8; font-size: 12px; }
.manual-block-pick { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: #1a3a5c; cursor: pointer; user-select: none; }
.manual-block-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.manual-ok { font-size: 11px; color: #16a34a; font-weight: 700; }
.manual-todo { font-size: 11px; color: #b45309; font-weight: 700; }
.manual-mini-btn { padding: 3px 8px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; color: #1c5fd6; font-family: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
.manual-mini-btn:disabled { opacity: .4; cursor: not-allowed; }
.manual-empty { grid-column: 1 / -1; padding: 18px; text-align: center; color: #94a3b8; font-size: 13px; }
/* 流转设置（只读展示） */
.manual-flow { margin-top: 4px; padding: 10px; border: 1px dashed #cbd5e1; border-radius: 10px; background: #f8fbff; }
.manual-flow-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.manual-flow-title { font-size: 13px; font-weight: 700; color: #1a3a5c; }
.manual-flow-lock { font-size: 11px; color: #94a3b8; font-weight: 700; }
.manual-flow-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.manual-flow-item { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #64748b; }
.manual-flow-item strong { color: #1a3a5c; font-weight: 700; }
.manual-flow-tip { margin-top: 8px; font-size: 11px; color: #94a3b8; line-height: 1.6; }
@media (max-width: 600px) {
  .manual-blocks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .manual-mold-tools { width: 100%; justify-content: flex-start; }
}

/* ==================== v9.06 发货账号全链路：待发区勾选 + 发货区汇总 + 导航高亮 ==================== */
/* D10：待发区卡片勾选框（区别于列表行勾选） */
.pending-card-pick {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 6px; font-size: 11px; font-weight: 700; color: #1c5fd6;
  background: #f3f8ff; border-bottom: 1px solid #e2e8f0; cursor: pointer; user-select: none;
}
.pending-card-pick input { width: 15px; height: 15px; margin: 0; cursor: pointer; accent-color: #1c5fd6; }
.pending-card:has(.pending-card-pick input:checked) { border-color: #1c5fd6; box-shadow: 0 0 0 1px #1c5fd6 inset; }
/* D10：[全选 / 取消全选]（头部动作区追加，不替换既有按钮） */
.pending-pick-all { border-color: #cfe0fb; background: #f3f8ff; color: #1c5fd6; }
.pending-pick-all:hover:not(:disabled) { background: #e6f0ff; }

/* D8：多块缩略图网格 + 无图灰底占位块（仍占一个块位） */
.pending-thumb-ph {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; color: #cbd5e1; font-size: 14px;
  background: #eef2f7; border: 1px dashed #dbe4f2;
}
.pending-thumb-many { grid-template-columns: repeat(3, 1fr); }
.pending-thumb-many > img { object-fit: cover; }

/* D10-b：发货区汇总（只读核对，复用出库单预览表风格） */
.fahuo-shiparea { border: 1.5px solid #dbe4f2; border-radius: 12px; overflow: hidden; background: #fff; }
.fahuo-shiparea-title {
  text-align: center; font-size: 15px; font-weight: 800; color: #0f2f5f;
  padding: 10px; background: #f3f8ff; border-bottom: 1px solid #e2e8f0;
}
.fahuo-shiparea-anchor { font-size: 13px; color: #334155; padding: 10px 12px; border-bottom: 1px dashed #e2e8f0; }
.fahuo-shiparea-anchor strong { color: #0f2f5f; }
.fahuo-shiparea-tablewrap { overflow-x: auto; padding: 0 12px; }
.fahuo-shiparea-table { width: 100%; border-collapse: collapse; font-size: 12px; min-width: 480px; margin-top: 10px; }
.fahuo-shiparea-table th,
.fahuo-shiparea-table td { border: 1px solid #e8edf5; padding: 6px 8px; text-align: center; vertical-align: middle; }
.fahuo-shiparea-table thead th { background: #f8fafc; color: #475569; font-weight: 700; white-space: nowrap; }
.fahuo-shiparea-table tbody tr:nth-child(even) { background: #fcfdff; }
.fahuo-shiparea-sum { padding: 10px 12px; font-size: 13px; font-weight: 800; color: #0f2f5f; }
.fahuo-shiparea .fahuo-outbound-preview-actions { margin: 0 12px 12px; }

/* P1-2：导航条当前模式高亮 */
.fahuo-rowbar-btn.active { border-color: #1c5fd6; background: #1c5fd6; color: #fff; }
.fahuo-rowbar-btn.active:hover { border-color: #1750b8; background: #1750b8; }

@media (max-width: 600px) {
  .pending-thumb-many { grid-template-columns: repeat(3, 1fr); }
  .fahuo-shiparea-table { min-width: 420px; }
  .pending-card-pick { font-size: 10px; padding: 2px 5px; }
}

/* ==================== v9.xx：手工模整体调整（他→它 / 分类条加宽 / 详情页新版式） ==================== */
/* 【2】手工模选料区专属：左侧分类条加宽 150px + 分类名不换行；
   仅命中带 .manualtpl-modal 根类的手工模弹窗，不改共用 .zxtpl-cats / .zxtpl-cat（造型/机加工/编程不受影响） */
.manualtpl-modal .zxtpl-cats { flex: 0 0 150px; }
.manualtpl-modal .zxtpl-cat  { white-space: nowrap; }

/* 【5】手工模详情页新版式（左=编程沿用图 / 右=拍照上传 / 下=基本信息分左右 / 底=[确认]）
   —— 纯新增，仅作用于 zxSgManual* 渲染，不影响任何既有选择器 */
.zx-sgm-wrap { display: flex; flex-direction: column; gap: 10px; }
/* 手工模详情页专属：单块卡 = 电脑全屏 1/2（父 .zx-prog-wrap gap=8px，扣 4px）；窄屏回退见下 */
.zx-sgm-card { flex: 0 0 calc(50% - 4px); max-width: calc(50% - 4px); box-sizing: border-box; }
.zx-sgm-head .zx-sgm-idx { font-size: 12px; font-weight: 700; color: #64748b; }
/* 卡片主体：图片区在上、文字区在下（两块物理分离，互不影响） */
.zx-sgm-body { flex-direction: column !important; align-items: stretch !important; gap: 14px; }

/* ===== 【一】图片区（.zx-sgm-shot）：独立容器，只放两张图 =====
   定死左右并排：display:flex + flex-direction:row + flex-wrap:nowrap + width:100%。
   用 !important 强制覆盖 —— 任何 @media、任何全局规则、任何字体档位（html[data-fs] body{zoom}）
   都不可能把它改成 column / block / 换行。作用域仅 .zx-sgm-*（手工模详情页），
   铁模 .zx-tm-manual-* / 机加工 / 编程 / 发货 零影响。 */
.zx-sgm-shot {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  width: 100% !important;
  align-items: flex-start;
  gap: 12px;
}
/* 两个子项：等宽（flex:1 1 0）、可收缩（min-width:0 → 图片再大也只缩小、绝不换行） */
.zx-sgm-left, .zx-sgm-right {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  max-width: none !important;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
}
.zx-sgm-shot-label { font-size: 12px; font-weight: 700; color: #64748b; display: flex; align-items: center; gap: 6px; }
.zx-sgm-refphoto { cursor: default; }
/* 图片铺满各自半区（沿用共用 .zx-tm-photo 的 1:1 方框 + img{object-fit:cover} 填满，不改共用定义） */
.zx-sgm-left .zx-tm-photo, .zx-sgm-right .zx-tm-photo { width: 100%; max-width: 220px; }
.zx-sgm-left .zx-tm-photo img, .zx-sgm-right .zx-tm-photo img { width: 100%; object-fit: cover; }

/* ===== 【二】文字区（.zx-sgm-info）：独立容器，放基本信息 =====
   自适应：宽度 = 卡片宽（手机端 = 满屏宽）；文字过长自动换行（overflow-wrap），不参与图片区布局。 */
.zx-sgm-info {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-wrap: anywhere;
  border: 1px solid #eef2f7;
  border-radius: 12px;
  padding: 12px;
  background: #fbfcfe;
}
.zx-sgm-info-title { font-size: 13px; font-weight: 800; color: #334155; margin-bottom: 8px; }
.zx-sgm-foot { gap: 10px; }
.zx-sgm-foot .zx-tm-confirm-btn { min-width: 150px; }
/* 【手机端正】原此处把 .zx-sgm-shot 改成 flex-direction:column，导致手机端（<600px）
   左「沿用图」/ 右「拍照上传」变成上下两行 —— 已删除该覆盖，窄屏同样保持左右并排。
   两列宽度由 .zx-sgm-left/.zx-sgm-right 的 flex:1 1 0 决定（等宽）；图片 max-width:100% 自适应不撑破。 */
@media (max-width: 600px) {
  .zx-sgm-left .zx-tm-photo, .zx-sgm-right .zx-tm-photo { max-width: 100%; }
}

/* 【Q4】手工模卡片：≤767px 图片自适应卡片宽（原生满宽，不缩放）—— 纯新增，仅 .zx-sgm-* 子树 */
@media (max-width: 767px) {
  .zx-sgm-left .zx-tm-photo, .zx-sgm-right .zx-tm-photo { max-width: 100%; }
}
/* 【Q2】小件资料编辑态字段区（纯新增类，仅由 zxSgmSmallFieldsHtml 产出，复用 .zx-sgm-info 外观） */
.zx-sgm-edit-fields { display: flex; flex-direction: column; gap: 8px; }
.zx-sgm-edit-fields .prog-fld { margin: 0; }

/* ==================== v9.xx：手工模「单块卡片完整流程」 —— 窄屏回退 + 横屏满屏预览确认层 ==================== */
/* 【A】窄屏单列回退：与既有 .zx-prog-wrap 竖排断点（@media max-width:768px，L5603/L5608 .zx-prog-wrap{flex-direction:column}）对齐，
   避免恰好 768px（iPad 竖屏常见宽度）时容器已竖排、卡片仍 1/2 宽 → 半宽卡竖着堆、右侧留空白；≤600px 上排左右堆叠沿用上一段 */
@media (max-width: 768px) {
  .zx-sgm-card { flex: 0 0 100%; max-width: 100%; }
}
/* 【B】横屏满屏预览确认层（全新增类，仅由 zxSgmPreviewOpen 生成、直挂 document.body；不影响任何既有选择器）
   —— position:fixed;inset:0 本身即「全屏观感」，不依赖 Fullscreen API；桌面/不支持者静默降级为全屏大图浮层 */
.zx-sgm-preview {
  position: fixed; inset: 0; z-index: 99999;
  background: #000; color: #fff;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.zx-sgm-preview img {
  max-width: 100%; max-height: 100%;
  object-fit: contain; display: block; margin: 0 auto;
  pointer-events: none; /* 大图纯展示：绝不拦截右下角按钮的点击 */
}
.zx-sgm-preview-loading {
  font-size: 18px; color: #cbd5e1; letter-spacing: 2px;
}
.zx-sgm-preview-tip {
  position: absolute; left: 50%; top: 14px; transform: translateX(-50%);
  font-size: 13px; color: #cbd5e1; background: rgba(255,255,255,.08);
  padding: 4px 12px; border-radius: 999px; pointer-events: none; white-space: nowrap;
}
.zx-sgm-preview-close {
  position: absolute; left: 16px; top: 16px;
  font-size: 15px; padding: 10px 18px;
  border: 1px solid rgba(255,255,255,.5); border-radius: 10px;
  background: rgba(0,0,0,.4); color: #fff; cursor: pointer;
  pointer-events: auto; z-index: 3;
}
.zx-sgm-preview-confirm {
  position: absolute; right: 24px; bottom: 24px;
  font-size: 18px; font-weight: 800; padding: 16px 28px;
  border: none; border-radius: 12px; cursor: pointer;
  background: #16a34a; color: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.5);
  pointer-events: auto; z-index: 3; /* 保证永远可点：不被大图层拦截、不被同级元素盖住 */
  touch-action: manipulation;
}
.zx-sgm-preview-confirm[disabled] { opacity: .6; cursor: not-allowed; }
/* 【反馈可见性】浮层内联提示：全屏时 #toast-container 在浮层之外、非全屏时其 z-index(500) 又被本浮层(99999)盖住，
   → 原有 toast 提示用户完全看不到（表现为「点按钮无任何反应」）。拦截/失败提示一律在这里就地显示。 */
.zx-sgm-preview-msg {
  position: absolute; left: 50%; bottom: 100px; transform: translateX(-50%);
  display: none; max-width: 92%; text-align: center;
  font-size: 15px; font-weight: 700; line-height: 1.5;
  padding: 10px 18px; border-radius: 12px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.32); color: #fff;
  pointer-events: none; z-index: 3;
}
.zx-sgm-preview-msg[data-type="warn"] { background: rgba(245,158,11,.24); border-color: rgba(245,158,11,.65); }
.zx-sgm-preview-msg[data-type="err"]  { background: rgba(239,68,68,.24);  border-color: rgba(239,68,68,.65); }
.zx-sgm-preview-msg[data-type="ok"]   { background: rgba(22,163,74,.28);  border-color: rgba(22,163,74,.65); }
@media (max-width: 600px) {
  .zx-sgm-preview-close { left: 10px; top: 10px; padding: 8px 14px; }
  .zx-sgm-preview-confirm { right: 14px; bottom: 14px; font-size: 16px; padding: 14px 20px; }
}

/* ==================== v9.xx：铁模装配详情页新版式（照搬手工模 · 单块卡「一款一卡」） ==================== */
/* 纯新增，仅作用于 zxTmManual* 渲染（zx-tm-manual-* / zx-tm-preview-* 类名），不影响任何既有选择器
   （.zx-sgm-* / .zx-sgm-preview* / .zx-prog-card / .zx-tm-set-card / .zxtpl-* 一字未改） */
.zx-tm-manual-wrap { display: flex; flex-direction: column; gap: 10px; }
/* 铁模详情页专属：单块卡 = 电脑全屏 1/2（父 .zx-prog-wrap gap=8px，扣 4px）；窄屏回退见下 */
.zx-tm-manual-card { flex: 0 0 calc(50% - 4px); max-width: calc(50% - 4px); box-sizing: border-box; }
.zx-tm-manual-head .zx-tm-manual-idx { font-size: 12px; font-weight: 700; color: #64748b; }
/* 卡片主体：图片区在上、文字区在下（两块物理分离，互不影响） */
.zx-tm-manual-body { flex-direction: column !important; align-items: stretch !important; gap: 14px; }

/* ===== 【一】图片区（.zx-tm-manual-shot）：独立容器，只放两张图（沿用图 / 拍照上传） =====
   定死左右并排：display:flex + flex-direction:row + flex-wrap:nowrap + width:100%。
   用 !important 强制覆盖 —— 任何 @media、任何全局规则、任何字体档位（html[data-fs] body{zoom}）
   都不可能把它改成 column / block / 换行。作用域仅 .zx-tm-manual-*（铁模装配详情页），
   手工模 .zx-sgm-* / 机加工 / 编程 / 发货 零影响。 */
.zx-tm-manual-shot {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  width: 100% !important;
  align-items: flex-start;
  gap: 12px;
}
/* 两个子项：等宽（flex:1 1 0）、可收缩（min-width:0 → 图片再大也只缩小、绝不换行） */
.zx-tm-manual-left, .zx-tm-manual-right {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  max-width: none !important;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
}
.zx-tm-manual-shot-label { font-size: 12px; font-weight: 700; color: #64748b; display: flex; align-items: center; gap: 6px; }
.zx-tm-manual-refphoto { cursor: default; }
/* 图片铺满各自半区（沿用共用 .zx-tm-photo 的 1:1 方框 + img{object-fit:cover} 填满，不改共用定义） */
.zx-tm-manual-left .zx-tm-photo, .zx-tm-manual-right .zx-tm-photo { width: 100%; max-width: 220px; }
.zx-tm-manual-left .zx-tm-photo img, .zx-tm-manual-right .zx-tm-photo img { width: 100%; object-fit: cover; }

/* ===== 【二】文字区（.zx-tm-manual-info）：独立容器，放原有基本信息 =====
   ⚠️ 文字内容一律沿用原渲染（zxAsmSummaryRows），本处只做「自适应」样式，不改任何业务文案。
   宽度 = 卡片宽（手机端 = 满屏宽）；文字过长自动换行；不参与图片区布局。 */
.zx-tm-manual-info {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-wrap: anywhere;
  border: 1px solid #eef2f7;
  border-radius: 12px;
  padding: 12px;
  background: #fbfcfe;
}
.zx-tm-manual-info-title { font-size: 13px; font-weight: 800; color: #334155; margin-bottom: 8px; }
.zx-tm-manual-foot { gap: 10px; }
.zx-tm-manual-foot .zx-tm-confirm-btn { min-width: 150px; }
/* 【手机端正】原此处把 .zx-tm-manual-shot 改成 flex-direction:column，导致手机端（<600px）
   左「沿用图」/ 右「拍照上传」变成上下两行 —— 已删除该覆盖，窄屏同样保持左右并排。 */

/* ≤767px 铁模卡片图片自适应卡片宽（原生满宽，不缩放）—— 纯新增，仅 .zx-tm-manual-* 子树 */
@media (max-width: 767px) {
  .zx-tm-manual-left .zx-tm-photo, .zx-tm-manual-right .zx-tm-photo { max-width: 100%; }
}
/* 小件资料编辑态字段区（纯新增类，仅由 zxTmSmallFieldsHtml 产出，复用 .zx-tm-manual-info 外观） */
.zx-tm-edit-fields { display: flex; flex-direction: column; gap: 8px; }
.zx-tm-edit-fields .prog-fld { margin: 0; }

/* 【A】窄屏单列回退：与既有 .zx-prog-wrap 竖排断点（@media max-width:768px）对齐，避免 768px 半宽卡竖排留白；≤600px 上排左右堆叠沿用上一段 */
@media (max-width: 768px) {
  .zx-tm-manual-card { flex: 0 0 100%; max-width: 100%; }
}
/* 【B】横屏满屏预览确认层（全新增类，仅由 zxTmPreviewOpen 生成、直挂 document.body；不影响任何既有选择器）
   —— position:fixed;inset:0 本身即「全屏观感」，不依赖 Fullscreen API；桌面/不支持者静默降级为全屏大图浮层 */
.zx-tm-preview {
  position: fixed; inset: 0; z-index: 99999;
  background: #000; color: #fff;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.zx-tm-preview img {
  max-width: 100%; max-height: 100%;
  object-fit: contain; display: block; margin: 0 auto;
  pointer-events: none; /* 大图纯展示：绝不拦截右下角按钮的点击 */
}
.zx-tm-preview-loading {
  font-size: 18px; color: #cbd5e1; letter-spacing: 2px;
}
.zx-tm-preview-tip {
  position: absolute; left: 50%; top: 14px; transform: translateX(-50%);
  font-size: 13px; color: #cbd5e1; background: rgba(255,255,255,.08);
  padding: 4px 12px; border-radius: 999px; pointer-events: none; white-space: nowrap;
}
.zx-tm-preview-close {
  position: absolute; left: 16px; top: 16px;
  font-size: 15px; padding: 10px 18px;
  border: 1px solid rgba(255,255,255,.5); border-radius: 10px;
  background: rgba(0,0,0,.4); color: #fff; cursor: pointer;
  pointer-events: auto; z-index: 3;
}
.zx-tm-preview-confirm {
  position: absolute; right: 24px; bottom: 24px;
  font-size: 18px; font-weight: 800; padding: 16px 28px;
  border: none; border-radius: 12px; cursor: pointer;
  background: #16a34a; color: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.5);
  pointer-events: auto; z-index: 3; /* 保证永远可点：不被大图层拦截、不被同级元素盖住 */
  touch-action: manipulation;
}
.zx-tm-preview-confirm[disabled] { opacity: .6; cursor: not-allowed; }
/* 【反馈可见性】浮层内联提示：全屏时 #toast-container 在浮层之外、非全屏时其 z-index(500) 又被本浮层(99999)盖住，
   → 原有 toast 提示用户完全看不到（表现为「点按钮无任何反应」）。拦截/失败提示一律在这里就地显示。 */
.zx-tm-preview-msg {
  position: absolute; left: 50%; bottom: 100px; transform: translateX(-50%);
  display: none; max-width: 92%; text-align: center;
  font-size: 15px; font-weight: 700; line-height: 1.5;
  padding: 10px 18px; border-radius: 12px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.32); color: #fff;
  pointer-events: none; z-index: 3;
}
.zx-tm-preview-msg[data-type="warn"] { background: rgba(245,158,11,.24); border-color: rgba(245,158,11,.65); }
.zx-tm-preview-msg[data-type="err"]  { background: rgba(239,68,68,.24);  border-color: rgba(239,68,68,.65); }
.zx-tm-preview-msg[data-type="ok"]   { background: rgba(22,163,74,.28);  border-color: rgba(22,163,74,.65); }
@media (max-width: 600px) {
  .zx-tm-preview-close { left: 10px; top: 10px; padding: 8px 14px; }
  .zx-tm-preview-confirm { right: 14px; bottom: 14px; font-size: 16px; padding: 14px 20px; }
}

/* ==================== v9.xx 修复：手工模/铁模装配卡片「下排资料」窄屏不再被挤压（≤767px） ====================
   根因：既有泛化规则（L6611 `...> .zx-prog-body`、L6615、L6620）在 ≤767px 用 !important 把
        .zx-prog-body 强制 flex-direction:row，其 :not(...) 列表未排除本轮新增的 .zx-sgm-card /
        .zx-tm-manual-card。两张新卡 base 为 column（.zx-sgm-body / .zx-tm-manual-body），
        被 row 覆盖后「基本信息」区被挤到卡片约一半宽，其内两列 .zx-asm-sum-cols 进一步缩到 ~80px/列
        → 字段值逐字换行（"2026-09-11" 竖成 8 行）＝「下排资料字段显示不全」。
   影响面：以下选择器均为「.zx-prog-card 与 .zx-sgm-card/.zx-tm-manual-card 复合」，
        必须同时命中两个类才生效 → 仅作用于这两类新卡片自身子树，不会命中通用 .zx-prog-card，
        也不影响造型/编程/机加工/发货/主账号页面。与 L6611 同特异度(0,4,0)但更靠后 → 仅对这两类卡
        恢复 column；电脑端(>767px)零影响（本块仅在 ≤767px 生效）。原规则一字未改（纯新增）。 */
@media (max-width: 767px) {
  /* ① 恢复新卡「上排图 / 下排资料」上下结构（= 电脑端与 base 的 column 口径）。
        选择器含 5 个类（.zx-prog-wrap .zx-prog-card .zx-sgm-card .zx-prog-body .zx-sgm-body）
        特异度 0,5,0，与 L6611 泛化规则相等且更靠后 → 覆盖成功（原 0,4,0 会被 L6611 压过）。 */
  .zx-prog-wrap .zx-prog-card.zx-sgm-card > .zx-prog-body.zx-sgm-body,
  .zx-prog-wrap .zx-prog-card.zx-tm-manual-card > .zx-prog-body.zx-tm-manual-body {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }
  /* ② 资料两列：窄屏允许自然换行、并给列设最小宽，避免塌成 ~80px/列后逐字换行 */
  .zx-prog-wrap .zx-prog-card.zx-sgm-card .zx-sgm-info .zx-asm-sum-cols,
  .zx-prog-wrap .zx-prog-card.zx-tm-manual-card .zx-tm-manual-info .zx-asm-sum-cols {
    flex-wrap: wrap !important;
  }
  .zx-prog-wrap .zx-prog-card.zx-sgm-card .zx-sgm-info .zx-asm-sum-col,
  .zx-prog-wrap .zx-prog-card.zx-tm-manual-card .zx-tm-manual-info .zx-asm-sum-col {
    flex: 1 1 45% !important;
    min-width: 130px !important;
  }
}

/* ==================== v9.xx 铁模装配：页面级【模具登记待发货】按钮条 + 模具加工登记表单（纯新增，仅铁模专属类，不改任何既有选择器） ==================== */
/* 页面级底部按钮条：仅在全部料块确认完成后显示（随卡片流布局，不覆盖既有规则） */
.zx-tm-ship-bar { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 8px; }
.zx-tm-ship-bar .zx-tm-ship-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 48px; padding: 12px 20px;
  font-size: 18px; font-weight: 700; color: #fff;
  background: var(--gradient-success, linear-gradient(135deg, #10b981, #059669)); border: none; border-radius: 12px;
  cursor: pointer; box-shadow: 0 6px 18px rgba(16, 185, 129, 0.35);
  transition: transform var(--t-fast, .15s), box-shadow var(--t-fast, .15s), filter var(--t-fast, .15s);
  letter-spacing: 2px; font-family: inherit;
}
.zx-tm-ship-bar .zx-tm-ship-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(16, 185, 129, 0.45); filter: brightness(1.05); }
.zx-tm-ship-bar .zx-tm-ship-btn:active { transform: translateY(1px) scale(0.99); }
.zx-tm-ship-hint { font-size: 12px; color: #64748b; }
/* 表单内只读缩略图（沿用「铁模上」已上传照片） */
.zx-tm-ship-thumb { max-width: 140px; max-height: 100px; border: 1px solid #cbd5e1; border-radius: 8px; cursor: zoom-in; object-fit: cover; }
.zx-tm-ship-thumb-empty { display: flex; align-items: center; justify-content: center; width: 120px; height: 80px; font-size: 12px; color: #94a3b8; background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 8px; }

/* ==================== v9.xx 采购入库登记：登记单入口 + 统一列表 + 登记弹窗照片 ==================== */
.reg-entry-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.reg-entry-btn { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--border, #e5e7eb); background: var(--card, #fff); color: var(--text-secondary, #475569); border-radius: 10px; padding: 14px 22px; font-size: 14px; font-weight: 700; cursor: pointer; transition: all .15s; }
.reg-entry-btn:hover { border-color: var(--primary, #3b82f6); color: var(--primary, #3b82f6); }
.reg-entry-btn i { font-size: 16px; }
.unified-table { text-align: center; }
.unified-photo-cell { width: 46px; height: 46px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border, #e5e7eb); cursor: zoom-in; transition: transform .15s; }
.unified-photo-cell:hover { transform: scale(1.1); border-color: var(--primary, #3b82f6); }
.reg-photo-strip { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.reg-photo-item { position: relative; display: inline-block; }
.reg-photo-item img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border, #e5e7eb); cursor: zoom-in; }
.reg-photo-del { position: absolute; top: -8px; right: -8px; width: 18px; height: 18px; border-radius: 50%; border: none; background: var(--danger, #B83A3A); color: #fff; font-size: 12px; line-height: 1; cursor: pointer; padding: 0; }

/* ==================== 新增登记弹窗 footer 加固（仅 #mold-form-modal，不影响其它弹窗） ====================
   修复：保存/取消按钮逃出弹窗（桌面挤到弹窗右侧、手机看不见）。
   做法：.modal 用列向 flex + 限高，字段区(.modal-body)内部滚动，footer 常驻弹窗下沿。 */
#mold-form-modal .modal {
  max-height: 90vh;
  max-height: 90dvh;
  display: flex;
  flex-direction: column;
}
#mold-form-modal .modal-body {
  flex: 1 1 auto;
  max-height: none;      /* 覆盖全局 .modal-body 的 70vh，改由 .modal 统一限高 */
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
#mold-form-modal .modal-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  flex: 0 0 auto;
  background: var(--card);                    /* 与 .modal 同色（全局 .modal-footer 用的是 var(--bg)） */
  border-top: 1px solid var(--border-light);
  padding: 16px 24px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
#mold-form-modal .modal-footer .btn {
  flex: 0 1 auto;
  min-width: 0;
  white-space: nowrap;
}

@media (max-width: 768px) {
  #mold-form-modal { padding: 12px; }
  #mold-form-modal .modal {
    width: 92vw;
    max-width: 92vw;
    margin: 12px auto;
    max-height: 92vh;
    max-height: 92dvh;
  }
  #mold-form-modal .modal-footer { padding: 12px 14px; }
  /* 小屏：按钮横向并排（保存为主、取消为次）；放不下则换行，始终在弹窗可视区内 */
  #mold-form-modal .modal-footer .btn { flex: 1 1 45%; }
}

/* ==================== 登记弹窗：时间 / 材质 紧凑自适应密排（仅 #mold-form-modal，不动全局） ====================
   需求：传统 ERP 式高效紧凑，不要手机 App 大按钮风。
   要点：不写死每行数量与百分比；宽度由内容基准 + 容器宽度自适应（时间条 flex-wrap，
        放不下时按内容自然换行）；时间控件按内容自适应，目标 = 刚好放下「年/月/日」不被截断；
        控件统一紧凑高度 36px（≥ 32px 触控目标）。 */
#mold-form-modal .form-label { margin-bottom: 4px; }
#mold-form-modal .form-group { margin-bottom: 10px; }
#mold-form-modal .form-row { gap: 10px; }
/* 统一控件高度：时间、材质与其它输入同高、紧凑；box-sizing 防 date/number 超框 */
#mold-form-modal .form-input {
  height: 36px;
  padding: 0 10px;
  font-size: 13px;
  line-height: 34px;
  box-sizing: border-box;
}
/* 时间条：登记时间 + 交模时间 自适应密排，一行放不下自动换行 */
#mold-form-modal .mf-time-strip { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
/* 时间项：不写死宽度，按内容自适应（宽度由 date 控件固有宽度 + 标签决定） */
#mold-form-modal .mf-time-item { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; }
#mold-form-modal .mf-time-cap { font-size: 13px; color: var(--text-secondary); font-weight: 600; white-space: nowrap; }
/* 关键：时间控件不拉满、不写死百分比，避免被撑成半行/大按钮 */
#mold-form-modal .mf-time-item .form-input { width: auto; min-width: 0; }
/* 材质文本框宽度由基础规则 .form-input{width:100%} 提供，此处无需重复声明（令新增块内无 % 声明） */
@media (max-width: 768px) {
  #mold-form-modal .mf-time-strip { gap: 6px 8px; }
  /* 窄屏：标签移到输入框上方（纵向）→ 两项按内容宽度并排（flex:1 1 auto = 内容基准，
     不写死百分比/不写死每行数量）；放不下时按内容自然换行；靠 grow 填满整行 */
  #mold-form-modal .mf-time-item { flex: 1 1 auto; flex-direction: column; align-items: stretch; gap: 4px; }
  #mold-form-modal .mf-time-cap { font-size: 12px; }
}

/* ==================== v9.x 选料区：分类「加一副」入口 + 新增卡高亮 ==================== */
/* 面板分类项尾部「已有副数」——小字、灰字、右对齐 */
.zx-pick-item .zx-pick-cnt { margin-left: auto; font-style: normal; font-size: 12px; color: #94a3b8; font-weight: 600; }
/* 点「+ 分类名」后，未确认的新增块编辑卡短暂高亮；作用域限定在选料网格内，避免污染全局 */
#zxPickGrid .zx-pick-flash { border-radius: 10px; animation: zxPickFlash .6s ease; }
@keyframes zxPickFlash {
  0%   { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);   background: rgba(37, 99, 235, .14); }
  35%  { box-shadow: 0 0 0 4px rgba(37, 99, 235, .35); background: rgba(37, 99, 235, .10); }
  100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);   background: transparent; }
}

/* ==================== v9.x 终极版：进度跟踪列表手机端——工序条独占一整行 ====================
   现象：手机窄屏 .mold-rail 四列不换行，进度条区(rail-c3)被照片/参数/价格挤到约 90px，
   而工序节点内容需约 206px → 节点与右侧价格/百分比相互重叠遮挡。
   修法：≤720px 时 .mold-rail 允许换行，.rail-c3（order 最后）独占 100% 宽成第二行，
   工序节点在一整行内完整横向显示；照片/编号/当前工序/价格仍在第一行。 */
@media (max-width: 720px) {
  .mold-rail { flex-wrap: wrap; }
  .rail-c3 { flex: 1 1 100%; order: 10; }
  .rail-c2 { flex: 1 1 auto; }
  .progress-rail { justify-content: center; }
}

/* ==================== v9.af（Task#64）：扫码识别 + 拍照OCR 弹窗 ==================== */
.fahuo-qr-reader { width: 100%; min-height: 260px; border-radius: 10px; overflow: hidden; background: #0f172a; }
.fahuo-qr-reader video { width: 100%; border-radius: 10px; display: block; }
.fahuo-ocr-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.fahuo-ocr-status { font-size: 13px; color: #2563eb; padding: 10px 0; }
.fahuo-ocr-candidates { display: flex; flex-direction: column; gap: 8px; max-height: 260px; overflow-y: auto; margin-top: 8px; }
.fahuo-ocr-cand { text-align: left; padding: 10px 14px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; font-size: 14px; cursor: pointer; color: #1e293b; }
.fahuo-ocr-cand:hover { border-color: #2563eb; background: #f0f6ff; }

/* ==================== v9.am（Task#71）拍照 OCR 手动拉框识别层 ==================== */
.fahuo-crop-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;                     /* 高于 .modal-overlay(200)，覆盖在 OCR 弹窗之上 */
  background: rgba(15, 23, 42, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 14px;
  animation: modalBgIn 0.2s;
  touch-action: none;
  overflow: hidden;
}
.fahuo-crop-tip {
  color: #e2e8f0;
  font-size: 13px;
  text-align: center;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.4;
}
.fahuo-crop-stage {
  position: relative;
  max-width: 100%;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  line-height: 0;
}
.fahuo-crop-img {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  -webkit-user-drag: none;
}
/* 半透明识别框：白色描边 2px；box-shadow 大扩散把框外压暗（框内亮、框外暗） */
.fahuo-crop-box {
  position: absolute;
  box-sizing: border-box;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.34);
  cursor: move;
  touch-action: none;
  will-change: left, top, width, height;
}
.fahuo-crop-box::after {
  content: '';
  position: absolute;
  inset: -2px;
  border: 1px dashed rgba(255, 255, 255, 0.55);
  pointer-events: none;
}
.fahuo-crop-actions { display: flex; gap: 10px; }
.fahuo-crop-actions .btn { min-width: 110px; }
.fahuo-crop-overlay .fahuo-ocr-status { color: #93c5fd; }

/* ==================== v9.av：登记页字段输入联想下拉（客户/铸造单位/产品名称/模具类型） ==================== */
.field-suggest-list {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 300;
  background: #fff; border: 1px solid var(--border-light, #e5e7eb); border-radius: 8px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, .12); max-height: 240px; overflow-y: auto; margin-top: 2px;
}
.field-suggest-item {
  padding: 8px 12px; font-size: 14px; cursor: pointer; color: var(--text, #1e293b);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.field-suggest-item:hover, .field-suggest-item.active { background: #eff6ff; color: var(--primary, #2563eb); }


/* ==================== v9.bb：客户统计页顶部下拉按钮 ==================== */
.acc-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.acc-dropdown { position: relative; }
.acc-dropdown > summary { list-style: none; cursor: pointer; user-select: none; }
.acc-dropdown > summary::-webkit-details-marker { display: none; }
.acc-dropdown > summary::marker { display: none; content: ''; }
.acc-dropdown[open] > summary { filter: brightness(0.95); }
.acc-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 60;
  min-width: 190px; display: flex; flex-direction: column; padding: 6px;
  background: var(--card, #fff); border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
}
.acc-menu a {
  display: block; padding: 9px 12px; border-radius: 7px; cursor: pointer;
  color: var(--text-secondary, #4b5563); font-size: 13px; white-space: nowrap;
}
.acc-menu a:hover { background: var(--primary-soft, rgba(99, 102, 241, 0.08)); color: var(--primary, #6366f1); }

/* ==================== v9.xx：客户统计顶部下拉 → Portal 浮层（挂 <html>，fixed 定位） ====================
   动机（实测）：① .acc-menu 原 z-index:60 < 吸附顶栏 .tab-bar(99)/.app-header(100)，滚动到按钮顶进吸附栏时
   菜单靠前项被盖；② 手机端 .tab-content{overflow:auto} + #app.gs-shell{overflow:hidden} 会把绝对定位菜单裁切。
   做法：展开时把 .acc-menu 移出 <details>、挂到 document.documentElement（规避 body{zoom}），改 position:fixed；
   z-index:130 —— 压过吸附栏 100/99，仍低于 .gs-dropdown(150) 与 .modal-overlay(200)，保证弹窗仍能盖住菜单。
   仅覆盖定位，视觉（背景/边框/圆角/阴影/内边距/a 样式）全部复用原 .acc-menu。 */
.acc-menu-float {
  position: fixed;
  z-index: 130;
}

/* ==================== 需求二：客户统计 · 公司搜索条 ==================== */
.acc-co-bar { margin: -4px 0 14px; }
.acc-co-input-box { position: relative; display: flex; align-items: center; max-width: 420px; }
.acc-co-icon { position: absolute; left: 11px; color: var(--text-light, #9ca3af); font-size: 13px; pointer-events: none; }
.acc-co-input { padding-left: 32px; padding-right: 34px; }
.acc-co-clear {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 24px; height: 24px; line-height: 1; border: none; border-radius: 50%;
  background: var(--border, #e5e7eb); color: var(--text-secondary, #4b5563);
  font-size: 15px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.acc-co-clear:hover { background: var(--danger, #ef4444); color: #fff; }
.acc-co-drop {
  display: none; position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 60;
  max-height: 260px; overflow-y: auto; padding: 4px;
  background: var(--card, #fff); border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
}
.acc-co-item { padding: 8px 12px; border-radius: 7px; cursor: pointer; font-size: 13px; color: var(--text-secondary, #4b5563); }
.acc-co-item:hover { background: var(--primary-soft, rgba(99, 102, 241, 0.08)); color: var(--primary, #6366f1); }
.acc-co-empty { padding: 8px 12px; font-size: 12px; color: var(--text-light, #9ca3af); }
.acc-co-count { margin-top: 6px; font-size: 12px; color: var(--text-light, #9ca3af); }
.acc-co-count strong { color: var(--primary, #6366f1); }

/* ==================== 需求四/五：客户明细 · 发货状态列 & 勾选计数 ==================== */
.mold-ship-tag {
  display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; white-space: nowrap;
  background: #eef1f5; color: #9aa4b2;
}
.mold-ship-tag.shipped { background: #16a34a; color: #fff; }
.cust-sel-count { margin-left: 6px; color: var(--primary, #6366f1); font-weight: 700; }

/* ==================== 需求三：进度跟踪 · 发货节点操作 ==================== */
.rail-fh > .rail-ship-btn { margin-top: 2px; }
.rail-ship-btn { font-size: 10px; padding: 1px 6px; min-height: 0; line-height: 1.5; white-space: nowrap; }
.ship-done-mark { font-size: 10px; font-weight: 700; color: #16a34a; white-space: nowrap; }

/* ==================== v9.bs 全局搜索改版（电脑端下拉面板 + 手机端底部输入栏） ==================== */
/* 原框内：放大镜提交按钮（保持原输入框/清空按钮位置不变，仅右侧内边距略增以容纳两枚图标） */
.search-icon-btn {
  position: absolute;
  right: 36px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-secondary, #666);
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.15s;
}
.search-icon-btn:hover { color: var(--primary, #1a3a5c); }

/* 电脑端：搜索框「正下方」下拉面板（不弹窗）——绝对定位于 .search-wrap，宽度与搜索框一致或略宽
   z-index:150 高于页面内容、低于 .modal-overlay(200) → 任何弹窗都盖在下拉之上 */
.gs-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 150;
  max-height: min(440px, 72vh);  /* V3.4.29：随视口收敛 + 滚动，避免小屏压住列表 */
  overflow-y: auto;
  background: var(--card, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
  padding: 8px 10px;
  animation: gsDropIn 0.14s ease;
}
@keyframes gsDropIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.gs-dropdown-head {
  font-size: 13px; font-weight: 700; color: var(--text-secondary, #4b5563);
  padding: 4px 6px 8px; border-bottom: 1px solid var(--border-light, #f3f4f6); margin-bottom: 8px;
}
.gs-dropdown-body { padding-bottom: 2px; }

/* 分组 & 条目（电脑端下拉 / 手机端结果区共用） */
.gs-group { margin-bottom: 14px; }
.gs-group:last-child { margin-bottom: 0; }
.gs-group-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 700; color: var(--text, #222);
  padding-bottom: 6px; margin-bottom: 8px;
  border-bottom: 1px solid var(--border-light, #f3f4f6);
}
.gs-badge {
  background: var(--primary-soft, rgba(26, 58, 92, 0.1));
  color: var(--primary, #1a3a5c);
  border-radius: 10px; padding: 1px 8px; font-size: 12px; font-weight: 700;
}
.gs-item {
  padding: 8px 10px; border-radius: 10px; margin-bottom: 6px;
  background: var(--card, #fff); border: 1px solid var(--border-light, #f3f4f6);
}
.gs-item:last-child { margin-bottom: 0; }
.gs-item:hover { background: var(--border-light, #f3f4f6); }   /* 每条悬停高亮（可点击条目再叠加蓝色高亮） */
.gs-item-link { cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.gs-item-link:hover,
.gs-item-link.active { background: var(--primary-soft, rgba(26, 58, 92, 0.08)); border-color: var(--primary, #1a3a5c); }
.gs-item-title { font-size: 13.5px; font-weight: 600; color: var(--text, #222); }
.gs-item-sub { font-size: 12px; color: var(--text-light, #888); margin-top: 2px; }
.gs-tag { display: inline-block; font-size: 11px; border-radius: 8px; padding: 0 6px; margin-left: 4px; font-weight: 600; }
.gs-tag-ship { background: #e8f5e9; color: #2e7d32; }
.gs-tag-customer { background: #e3f2fd; color: #1565c0; }
.gs-tag-casting { background: #fff3e0; color: #ef6c00; }
.gs-tag-type { background: var(--border-light, #f3f4f6); color: var(--text-secondary, #4b5563); }
/* 需求五：搜索结果历年归档标签 + 缩略图占位 */
.gs-tag-year { background: #ede7f6; color: #5e35b1; }
.gs-tag-archived { background: #eceff1; color: #546e7a; }
.gs-thumb { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; float: left; margin: 0 8px 2px 0; }
.gs-money-amt { font-weight: 700; color: #b45309; }
.gs-empty { text-align: center; color: var(--text-light, #999); padding: 28px 0; font-size: 14px; }

/* 手机端结果浮层内部结构（结果卡片白底）——外层浮层见 ≤600px 的 .gs-mobile-sheet */
.gs-mobile-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; font-size: 14px; font-weight: 700;
  background: var(--primary-soft, rgba(26, 58, 92, 0.08)); color: var(--primary, #1a3a5c);
}
.gs-mobile-close {
  border: none; background: rgba(0, 0, 0, 0.08); border-radius: 50%;
  width: 26px; height: 26px; font-size: 16px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.gs-mobile-body { padding: 12px; }

/* 手机端底部「输入栏」：默认隐藏（桌面端不出现），≤600px 时显示；已去掉语音按钮 */
.gs-search-bar { display: none; }
/* v9.bv：底部停靠区 / 结果浮层——默认任何断点都隐藏（把「隐藏」提到媒体查询之外，
   >600px 时即便残留 .show 也不会显示，杜绝 resize/orientation 后浮层泄漏铺底）。 */
/* V2.2.22：底部栏会被挂到 <html> 下（已不在 #app 内），故这两条隐藏规则改用 id 直接命中，
   保证「跨回桌面断点后即便残留 .show 也不会显示」的安全网依旧有效（移动端规则在下方媒体查询里，后出现者胜）。 */
#gs-bottom-dock { display: none; }
#gs-mobile-sheet { display: none; }
.gvb-row { display: flex; gap: 8px; align-items: center; }
.gvb-input {
  flex: 1; min-width: 0; padding: 10px 14px;
  border: 1.5px solid var(--border, #e5e7eb); border-radius: 10px;
  font-size: 15px; background: var(--card, #fff); color: var(--text, #222);
}
.gvb-input:focus { outline: none; border-color: var(--primary, #1a3a5c); }
.gvb-search-btn {
  flex: 0 0 auto; padding: 10px 18px; border: none; border-radius: 10px;
  background: var(--gradient-primary, linear-gradient(135deg, #1a3a5c 0%, #2d5a8a 100%));
  color: #fff; font-size: 15px; font-weight: 600; cursor: pointer;
}

/* ==================== v9.bs 手机端三段式布局（头部不动 / 中间结果区滚动 / 底部输入栏） ====================
   关键：不用 position:fixed —— 底部栏在文档流内贴底，规避 iOS 键盘弹出把 fixed 元素顶飞。 */
@media (max-width: 600px) {
  #app.gs-shell {
    display: flex; flex-direction: column;
    height: 100vh;   /* 回退①：无 JS 且不支持 dvh 时兜底 */
    /* v9.bx：优先用 JS 实测的「可视高度」--app-h（微信 X5/XWeb 等 WebView 里最准），
       拿不到时退化到 dvh（现代浏览器动态视口）。不依赖 vh —— 微信里 vh 是大视口语义，会偏大。 */
    height: var(--app-h, 100dvh);
    /* ★放开横向滚动：原 overflow:hidden 会同时把 overflow-x 锁死（阻止横向滚动）。
       改为 overflow-x:auto + overflow-y:hidden —— 纵向三段式布局（头部/中间滚动/底部输入栏）保持不变，
       横向可滚动（内容不溢出时不会出现滚动条，零回归）。 */
    overflow-x: auto;
    overflow-y: hidden;
  }
  /* v9.bx-2：手机端 body 必须与外壳「同高」——两步缺一不可：
     ① 解除 html,body{height:100%}（本文件顶部 59 行）。它把 body 钉死在视口高（=100vh 语义），
        而 body{min-height} 只能抬高、不能压低 —— 在 --app-h < 视口高的微信 WebView 里，
        外壳被压矮、body 仍是视口高，差额就是搜索栏下方露出的 body 灰带。放开 height 为 auto 后
        body 高 = max(内容高, min-height) = --app-h，与外壳一致 → 灰带消失。
     ② body 的 min-height 锚定到同一个 --app-h（dvh/--app-h 都不支持时本行声明无效，
        自动回落全局 body{min-height:100vh}，与回落后的外壳 100vh 仍一致）。
     ★仅 ≤600px 生效；桌面端 html,body{height:100%} 原样不动。 */
  html, body { height: auto; }
  body {
    min-height: var(--app-h, 100dvh);
  }
  #app.gs-shell .super-banner { flex: 0 0 auto; }
  #app.gs-shell .app-header { flex: 0 0 auto; }
  #app.gs-shell .tab-bar { flex: 0 0 auto; position: static; top: auto; }
  #app.gs-shell .tab-content {
    flex: 1 1 auto; min-height: 0;
    min-width: 0;   /* ★关键：column-flex 子项默认 min-width:auto，会被内部长内容（下拉/长数字）撑到超出视口；归零后可收缩 */
    width: 100%;    /* ★锁定为视口宽（否则 stretch 仍会被内容撑宽），内部横向 overflow-x 自行滚动 */
    max-width: 100%;
    overflow-y: auto; -webkit-overflow-scrolling: touch;
  }
  /* 底部输入栏：较旧版高度增加约 1/3（输入框约 50px）→ 圆角 10px、浅灰底；整体上移约 20px（底部留 20px 间距） */
  .gs-search-bar {
    display: flex; flex-direction: column;
    flex: 0 0 auto;
    padding: 10px 12px 12px;
    margin-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    background: var(--border-light, #f3f4f6);
    border-top: 1px solid var(--border, #e5e7eb);
    z-index: 10;
  }
  .gs-search-bar .gvb-input { padding: 14px 16px; font-size: 16px; border-radius: 10px; }
  .gs-search-bar .gvb-search-btn { padding: 14px 20px; font-size: 16px; border-radius: 10px; }
  /* 手机端隐藏内容区原搜索框，统一由底部输入栏承担（避免出现两个搜索入口） */
  .search-wrap { display: none !important; }

  /* ==================== V2.2.22：内容区底部预留空间（防固定搜索栏遮住列表最后几条） ====================
     仅「本页有底部搜索栏」时生效（render() 里 zxMountMobileDock() 会给 <html> 加 .gs-has-dock）。
     预留 = 搜索栏自身(~70px) + 其上间距(20px) + 底部安全区 + 余量；放大档位下 px 会再被 zoom 放大，只多不少。 */
  html.gs-has-dock #app.gs-shell .tab-content {
    padding-bottom: calc(130px + env(safe-area-inset-bottom, 0px));
  }

  /* ==================== v9.bu + V2.2.22 手机端「底部上拉浮层」结果面板 ====================
     结果面板从底部输入栏正上方「向上展开」，覆盖页面内容，视线不必离开底部；
     ★V2.2.22：底部栏改 position:fixed 钉在屏幕底部（由 render() 挂到 <html> 下 → 避开 body{zoom} 的连带缩放），
       已彻底不参与滚动 —— 内容怎么滚、字号怎么放大都不会「往上跑」或遮住列表。 */
  #gs-bottom-dock {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 120;
    display: flex; flex-direction: column;
  }
  #gs-mobile-sheet {
    position: absolute; left: 0; right: 0; bottom: 100%;   /* ★紧挨输入栏上沿、向上展开 */
    /* 高度：约屏幕 1/2（内容多时向上长，但不超过 52vh → 保证 top 始终 > 视口 35%，不侵占上半屏） */
    max-height: 75vh;            /* V3.4.29：去 min-height:45vh，空结果自动收缩，不再大白板遮挡 */
    overflow-y: auto; -webkit-overflow-scrolling: touch;
    background: var(--card, #fff);
    border-top-left-radius: 14px; border-top-right-radius: 14px;
    box-shadow: 0 -6px 24px rgba(0, 0, 0, .14);
    border: 1px solid var(--border, #e5e7eb); border-bottom: none;
    display: none;                                         /* 默认隐藏；有内容时加 .show */
  }
  #gs-mobile-sheet.show { display: block; }
}

/* ==================== v9.bt（本轮追加）统一「标签 + 数字」紧凑自适应（4 组） ====================
   统一口径：长文本换行往下走（white-space:normal / word-break:break-word / overflow-wrap:anywhere）、
   数字/值 flex-shrink:0（不被撑大也不被挤压）、容器 align-items:flex-start 顶部对齐、
   容器及 flex/grid 子项 min-width:0（★根因：min-width:auto 会撑爆容器 → 横向溢出）。
   置于文件末尾以稳定覆盖前文同名规则；不触碰上一轮已完成的
   .dashboard / .stat-card / .stat-label / .stat-value / .stat-sub 一整套。 */

/* --- 1) 铁模装配 / 手工制作 模块内顶部统计条（块级内联文案 + <b> 数字 + note） ---
   注意：本容器内部是「文本节点 + <b> + <span>」的内联混排，不能改成 display:flex，
   否则文本会被拆成多个匿名 flex 项并因字号不同而顶部错位 → 保持块级，仅放开换行与 min-width。 */
.zx-tm-stats {
  min-width: 0; box-sizing: border-box;
  white-space: normal;                                        /* 长文案换行往下走 */
  word-break: break-word; overflow-wrap: anywhere;
}
.zx-tm-stats b { white-space: nowrap; }                       /* 数字紧贴、不被拆行 */
.zx-tm-stats-note { min-width: 0; white-space: normal; word-break: break-word; overflow-wrap: anywhere; }

/* --- 2) 打卡 · 考勤统计条 --- */
.att-stat {
  flex: 1 1 0; min-width: 0; box-sizing: border-box;          /* 去掉 min-width:74px 硬宽，子项 min-width:0 */
  display: flex; flex-direction: column; align-items: flex-start;
}
.att-stat-v { flex-shrink: 0; max-width: 100%; }              /* 数字不被挤压/撑大 */
.att-stat-l { min-width: 0; max-width: 100%; white-space: normal; word-break: break-word; overflow-wrap: anywhere; }

/* --- 3) 详情页「标签 + 值」字段行 ---
   注：不动 flex-wrap（保持 nowrap），真实数据下标签与值稳定同排、top 对齐；
   「值 flex-shrink:0」在极端场景（值的 max-content 超过整行可用宽）会让标签让位收窄——
   详情页实测 79 个 .prog-fld 标签宽 24~48px、0 内部溢出、最长值 183px，不触发该极端场景。 */
.prog-fld { align-items: flex-start; min-width: 0; }
.prog-fld-name { flex: 0 1 auto; min-width: 0; white-space: normal; word-break: break-word; overflow-wrap: anywhere; }
.prog-fld-val { flex-shrink: 0; max-width: 100%; white-space: normal; word-break: break-word; overflow-wrap: anywhere; }
/* 3b) 移动端 .zx-prog-card（编程料块卡「按设计宽渲染 + zoom 缩放」）内，v7.66 中和规则
   以 !important 把标签 min-width 钉在 60px（style.css:6809）；此处同特异性(0,2,0) + 同 !important
   且位于文件末尾 → 归零，与全局「flex 子项 min-width:0 / 不写死 px 宽度」口径一致。
   注意：只归零 min-width，不动该卡 flex-basis 基准与 zoom-fit 布局，标签列仍按内容排布。 */
.zx-prog-card .prog-fld-name { min-width: 0 !important; }

/* --- 4) 选料只读字段行（.zxau-read-field / .zxau-mold-read）--- */
.zxau-read-field, .zxau-mold-read { align-items: flex-start; min-width: 0; }
.zxau-read-field > span, .zxau-mold-read > span { min-width: 0; white-space: normal; word-break: break-word; overflow-wrap: anywhere; }
.zxau-read-field > b, .zxau-mold-read > b { flex-shrink: 0; max-width: 100%; white-space: normal; word-break: break-word; overflow-wrap: anywhere; }

/* ==================== v9.xy（本轮）手机端自适应推广：员工管理行 / 登记卡片产品名 ====================
   口径：窄屏（≤600px）自然换行/纵向堆叠，不再靠横向滚动；桌面端（>600px）零改动。
   ★导入弹窗「表头格式说明」表（.imp-tbl）刻意不改：加换行规则要么不加 @media 全局生效、破坏桌面零影响，要么限定 ≤600px 反把说明列压到 ~54px 更差；
     该表容器本就是「宽表=容器内横向滚动」口径、页面级横向溢出本就为 0px，故保持原样，勿再改。 */
/* 1) 员工管理行 —— ≤600px 改单列：姓名占满整行、操作按钮换行到下方（配合上方 .ui-name{flex-wrap:wrap} 标签换行） */
@media (max-width: 600px) {
  .user-item { flex-direction: column; align-items: stretch; gap: 8px; }
  .user-item .ui-info { width: 100%; min-width: 0; }
  .user-item .user-actions { justify-content: flex-start; flex-wrap: wrap; }
}
/* 2) 登记列表卡片「产品名 · 客户」—— ≤600px 最多两行，避免单行被硬截断（line-clamp 多行省略） */
@media (max-width: 600px) {
  .mold-item .mold-name {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

/* --- v9.xz（本轮）采购统计「筛选行」.up-filter-row ----------------------------
   桌面口径 = 改动前基线：搜索组 flex:2 + min-width:200px，其余组吃 .form-row>*{flex:1}（无 inline 覆盖）。
   窄屏（≤600px）才启用「各组最小 140px / 搜索组 200px」，让控件换行时不塌成一两个字宽。
   ★桌面必须逐像素还原（QA 实测基线：搜索 283.4 / 各组 141.7 / 搜索按钮 181.7）。 */
.up-filter-row > .form-group:first-child { flex: 2 1 0%; min-width: 200px; }
@media (max-width: 600px) {
  .up-filter-row > .form-group { flex: 1 1 140px; min-width: 140px; }
  .up-filter-row > .form-group:first-child { flex: 2 1 200px; min-width: 200px; }
}


/* ==================== v2.2.2 造型区「待开模」占用与换人 ====================
   规则（用户拍板）：零动画，仅 120ms 颜色过渡；橙锁 = 可见占用（不做灰化、不做呼吸光）。
   本节全部为【新增】规则，既有规则一行未改。 */
.zx-card-act { flex-shrink: 0; display: flex; align-items: center; justify-content: flex-end; min-width: 96px; }
.zx-btn-start {
  appearance: none; border: 0; cursor: pointer;
  background: var(--warning); color: #fff;
  font-size: 13px; font-weight: 700; letter-spacing: 1px;
  padding: 9px 16px; border-radius: 10px; line-height: 1;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.28);
  transition: background-color 120ms linear, color 120ms linear, box-shadow 120ms linear;
}
.zx-btn-start:hover { background: #d97706; }
.zx-btn-start:active { background: #b45309; }
/* V2.2.47：铁模装配「开始装配」按钮（对标造型「开始制作」，独立类，不动 .zx-* 既有规则） */
.tm-start-btn {
  appearance: none; border: 0; cursor: pointer;
  background: var(--warning); color: #fff;
  font-size: 12px; font-weight: 700; letter-spacing: .5px;
  padding: 7px 12px; border-radius: 8px; line-height: 1;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.28);
  transition: background-color 120ms linear, color 120ms linear;
}
.tm-start-btn:hover { background: #d97706; }
.tm-start-btn:active { background: #b45309; }
.zx-state-idle {
  display: inline-block; font-size: 12px; font-weight: 700;
  color: var(--text-light); background: rgba(156, 163, 175, 0.14);
  border-radius: 6px; padding: 3px 8px;
  transition: color 120ms linear, background-color 120ms linear;
}
.zx-lock-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 700;
  color: var(--warning); background: rgba(245, 158, 11, 0.10);
  border: 1px solid rgba(245, 158, 11, 0.55);
  border-radius: 6px; padding: 2px 8px;
  transition: color 120ms linear, border-color 120ms linear;
}
.todo-card.zx-locked { border-left: 4px solid var(--warning); background: rgba(245, 158, 11, 0.05); }
.todo-card.zx-locked .mold-number { color: #b45309; }
.zx-main-frame.zx-locked { border-left: 4px solid var(--warning); }
.zx-more-wrap { position: relative; display: inline-block; flex-shrink: 0; }
.zx-more-btn {
  appearance: none; cursor: pointer;
  width: 30px; height: 30px; line-height: 1;
  border: 1px solid #e5e7eb; border-radius: 8px;
  background: #fff; color: var(--text-secondary);
  font-size: 16px; font-weight: 700; padding: 0;
  transition: color 120ms linear, border-color 120ms linear;
}
.zx-more-btn:hover { color: var(--warning); border-color: var(--warning); }
.zx-menu {
  display: none; position: absolute; right: 0; top: 34px; z-index: 60;
  min-width: 116px; background: #fff; border: 1px solid #e5e7eb;
  border-radius: 10px; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12); overflow: hidden;
}
.zx-more-wrap.open .zx-menu { display: block; }
.zx-menu-item {
  display: block; width: 100%; text-align: left; cursor: pointer;
  appearance: none; border: 0; background: transparent;
  font-size: 13px; color: var(--text); padding: 9px 12px;
  transition: background-color 120ms linear, color 120ms linear;
}
.zx-menu-item:hover { background: rgba(245, 158, 11, 0.10); color: #b45309; }
.rail-zx-holding {
  display: block; margin-top: 3px; font-size: 11px; font-weight: 700;
  color: var(--warning); white-space: nowrap;
  transition: color 120ms linear;
}
@media (max-width: 600px) {
  .zx-card-act { min-width: 0; }
  .zx-btn-start { padding: 8px 12px; font-size: 12px; letter-spacing: 0; }
}

/* ==================== v2.2.4 打卡全链路：三段卡片 · 蓝绿灰黄 · 120ms 不缩放 ==================== */
.att-seg-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin: 12px 0 14px; }
.att-seg-card {
  border: 1px solid var(--border, #e5e7eb); border-radius: 12px; padding: 12px;
  background: #fff; display: flex; flex-direction: column; gap: 10px;
  transition: background-color 120ms linear, border-color 120ms linear;
}
.att-seg-card.is-done { background: #f7f8fa; }
.att-seg-card.is-missing { border-color: #e6c200; background: #fffdf2; }
.att-seg-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.att-seg-name { font-size: 15px; font-weight: 700; color: var(--text, #1f2937); }
.att-seg-time { font-size: 12.5px; color: #6b7280; }
.att-seg-warn { font-size: 12px; font-weight: 700; color: #8a6d00; background: #FFE9A8; padding: 1px 8px; border-radius: 6px; }
.att-seg-btns { display: flex; gap: 8px; }
.att-btn {
  flex: 1; height: 52px; border: none; border-radius: 8px; cursor: pointer;
  font-size: 17px; font-weight: 600; color: #fff; letter-spacing: .3px;
  transition: background-color 120ms linear, color 120ms linear, filter 120ms linear;
  -webkit-tap-highlight-color: transparent;
}
.att-btn-in { background: #2F6BFF; }
.att-btn-out { background: #1F9D6B; }
/* 按压仅 120ms 加深，不缩放、不弹跳 */
.att-btn-in:active, .att-btn-out:active { filter: brightness(.88); }
.att-btn.is-done,
.att-btn:disabled {
  background: #E8EAED !important; color: #9AA0A6 !important; cursor: default;
  filter: none !important;
}
.att-btn-ok { background: #1F9D6B; flex: 0 0 auto; height: 40px; font-size: 14px; padding: 0 16px; border-radius: 8px; }
.att-btn-no { background: #C0392B; flex: 0 0 auto; height: 40px; font-size: 14px; padding: 0 16px; border-radius: 8px; }
.att-rest {
  text-align: center; padding: 26px 12px; margin: 12px 0 14px;
  background: #f1f3f5; color: #9AA0A6; font-size: 17px; font-weight: 600; border-radius: 12px;
}
.att-unit-bar { font-size: 14px; color: var(--text-secondary, #4b5563); margin-top: 4px; }
.att-unit-bar b { color: #b45309; font-size: 16px; }

/* 员工端「我的打卡统计」—— 迟到置顶红 */
.att-mystat { margin-top: 14px; }
.att-mystat-late {
  background: #FFE3E3; color: #C0392B; font-size: 18px; font-weight: 800;
  padding: 12px 14px; border-radius: 10px; margin-bottom: 8px;
}
.att-mystat-late b { font-size: 24px; }
.att-mystat-row {
  font-size: 15px; color: var(--text, #1f2937); padding: 9px 14px;
  border-radius: 8px; background: var(--bg-alt, #f8fafd); margin-bottom: 6px;
}
.att-mystat-row b { font-size: 17px; color: #2F6BFF; }
.att-mystat-sub { font-size: 12.5px; color: #9AA0A6; margin-left: 4px; }
.att-fix-link { text-align: right; margin-top: 8px; }
.att-fix-link a { color: #2F6BFF; font-size: 14px; font-weight: 600; cursor: pointer; transition: color 120ms linear; }
.att-fix-link a:active { color: #1b4fd0; }

/* 管理员看板 */
.att-board-list { display: flex; flex-direction: column; gap: 6px; }
.att-board-late-row, .att-board-rank-row, .att-board-unit-row {
  display: flex; align-items: center; gap: 10px; font-size: 14px;
  padding: 9px 12px; border-radius: 8px; background: var(--bg-alt, #f8fafd);
  transition: background-color 120ms linear;
}
.att-board-late-row b { color: #C0392B; }
.att-board-seg { font-size: 12px; font-weight: 700; color: #8a6d00; background: #FFE9A8; padding: 1px 8px; border-radius: 6px; }
.att-board-min { color: #C0392B; font-weight: 700; margin-left: auto; }
.att-board-at { color: #9AA0A6; font-size: 12.5px; }
.att-board-rank-row.is-top { background: #FFE3E3; }
.att-board-rank-row.is-top b { color: #C0392B; font-weight: 800; }
.att-board-rank-row .att-board-min { color: #6b7280; font-weight: 600; }
.att-board-rank-row.is-top .att-board-min { color: #C0392B; font-weight: 800; }
.att-board-no {
  width: 22px; height: 22px; line-height: 22px; text-align: center; border-radius: 50%;
  background: #e5e7eb; color: #4b5563; font-size: 12px; font-weight: 700; flex: 0 0 auto;
}
.att-board-rank-row.is-top .att-board-no { background: #C0392B; color: #fff; }
.att-board-units { margin-left: auto; font-weight: 700; color: #b45309; }
.att-board-fix-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; background: var(--bg-alt, #f8fafd); }
.att-board-fix-main { flex: 1; font-size: 14px; }
.att-board-fix-reason { font-size: 12.5px; color: #9AA0A6; margin-top: 3px; }
.att-board-fix-btns { display: flex; gap: 8px; flex: 0 0 auto; }
.att-board-ref { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.att-ref-cell { text-align: center; padding: 12px 6px; border-radius: 10px; background: var(--bg-alt, #f0f4ff); }
.att-ref-v { font-size: 20px; font-weight: 800; color: #2F6BFF; }
.att-ref-v.warn { color: #C0392B; }
.att-ref-l { font-size: 11.5px; color: var(--text-light, #9AA0A6); margin-top: 3px; }
.att-board-top3 { margin-top: 12px; font-size: 13.5px; color: var(--text-secondary, #4b5563); display: flex; gap: 14px; flex-wrap: wrap; }
.att-top3-item { font-weight: 700; color: #b45309; }
@media (max-width: 600px) {
  .att-seg-row { grid-template-columns: 1fr; }
  .att-btn { height: 52px; font-size: 17px; }
  .att-board-ref { grid-template-columns: repeat(2, 1fr); }
  .att-board-fix-row { flex-wrap: wrap; }
}

/* ==================== V2.2.5：配件记账（模具登记页·登记类型切换 + 配件字段组） ==================== */
/* 说明：本段为纯追加，不修改上方任何既有规则；选择器全部限定在 #mold-form-modal 内，避免污染其它页面 */
#mold-form-modal .mf-regtype-group { margin-bottom: 14px; }
#mold-form-modal .mf-regtype-switch { display: flex; gap: 8px; flex-wrap: wrap; }
#mold-form-modal .mf-type-opt {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border: 1px solid #d5d9e0; border-radius: 8px;
  background: #fff; cursor: pointer; font-size: 14px; color: #4a5568;
  transition: border-color .12s ease, background-color .12s ease, color .12s ease;
  user-select: none;
}
#mold-form-modal .mf-type-opt input { margin: 0; cursor: pointer; }
#mold-form-modal .mf-type-opt.active {
  border-color: var(--primary, #2F6BFF); color: var(--primary, #2F6BFF);
  background: rgba(47, 107, 255, .06); font-weight: 600;
}
/* 配件模式：价格属性（含税 / 不含税）互斥勾选 */
#mold-form-modal .mf-tax-switch { display: flex; gap: 16px; padding: 8px 0; flex-wrap: wrap; }
/* 配件模式：付款方 = 类型下拉 + 单位名（窄屏自动换行，不撑破表单） */
#mold-form-modal .mf-payer-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
#mold-form-modal .mf-payer-row select { flex: 0 0 auto; width: auto; min-width: 132px; }
#mold-form-modal .mf-payer-row input { flex: 1 1 160px; min-width: 0; }
/* 配件模式：底部灰字提示 */
#mold-form-modal .mf-parts-tip {
  margin-top: 14px; padding: 8px 12px; border-radius: 8px;
  background: #f5f6f8; color: #8a93a0; font-size: 13px;
}
/* 配件区显隐：仅 120ms 淡入淡出，无位移/无缩放动画 */
#mold-form-modal #mf-parts-area { transition: opacity .12s ease; }
@media (max-width: 768px) {
  #mold-form-modal .mf-type-opt { flex: 1 1 auto; justify-content: center; }
  #mold-form-modal .mf-payer-row select { min-width: 110px; }
}

/* ==================== V2.2.8：客户统计三行面板（年度 / 历史累计 / 客户概览+开票）—— 纯追加 ==================== */
.cs-panel { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.cs-row { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px 12px; background: var(--card); }
.cs-row-tag { font-size: 13px; font-weight: 700; color: var(--text-secondary); margin-bottom: 8px; letter-spacing: .4px; }
.cs-row-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 12px; align-items: stretch;
}
.cs-row-cards .stat-card { padding: 14px 16px; }
.cs-row-cards .stat-card .stat-value { font-size: 24px; }
.cs-row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; align-content: center; }
.cs-row-actions .acc-dropdown summary { white-space: nowrap; }
/* 空值筛查弹窗页签 */
.cs-empty-tabs { display: flex; gap: 8px; margin-bottom: 10px; }
.cs-empty-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.cs-empty-tab { background: var(--card); color: var(--text-secondary); }
.cs-col-cust, .cs-col-cast { white-space: nowrap; }
.cs-col-act { white-space: nowrap; }
.cs-col-act .btn { margin-right: 4px; }
@media (max-width: 720px) {
  .cs-row-cards { grid-template-columns: 1fr 1fr; }
  .cs-row-actions { grid-column: 1 / -1; }
}

/* ==================== V2.2.9：待处理卡片 + 补全编辑（纯追加） ==================== */
#cs-pending-modal .modal { max-width: 1280px; }
#cs-pending-modal .data-table { min-width: 1080px; }
.pend-col-date, .pend-col-party, .pend-col-payer, .pend-col-act { white-space: nowrap; }
.pend-col-act .btn { margin-right: 4px; }
.pend-col-payer .mold-meta { display: inline; }
#cs-pending-modal .pend-in-cust, #cs-pending-modal .pend-in-cast,
#cs-pending-modal .pend-in-unit, #cs-pending-modal .pend-in-type,
#cs-pending-modal .pend-in-date { font-size: 12px; padding: 4px 6px; }
/* 待处理卡片数值略小，四卡一行更紧凑 */
.cs-row .stat-card .stat-value { font-size: 24px; }
@media (max-width: 720px) {
  #cs-pending-modal .data-table { min-width: 900px; }
}

/* ==================== V2.2.10：客户统计 · 全字段搜索框（纯追加；去掉下拉，改纯筛选） ==================== */
/* 输入框撑满容器：原 .acc-co-input-box 只设了 max-width，靠内容自适应；全字段搜索需要更宽 */
.acc-co-input-box { width: 100%; }
.acc-co-bar .acc-co-input-box { max-width: 620px; }
/* ⚠待处理弹窗内的搜索框：占满弹窗宽度 */
.pend-search-bar { max-width: none; margin-bottom: 8px; }
.pend-search-bar .acc-co-input { width: 100%; }
/* 客户明细行 / 收款开票记录行的过滤提示（由 JS 内联样式控制，此处仅兜底） */
.cust-detail-search-hint { font-size: 12px; }
@media (max-width: 720px) {
  .acc-co-bar .acc-co-input-box { max-width: none; }
}

/* ==================== V2.2.11：对账单「未付余额」条（纯追加） ==================== */
.cs-bal-strip {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  padding: 8px 12px; margin: 0 0 10px;
  border: 1px solid var(--border, #e5e7eb); border-left: 4px solid var(--primary, #2563eb);
  border-radius: 6px; background: var(--bg-secondary, #f8fafc);
  font-size: 13px;
}
.cs-bal-strip.cs-bal-over { border-left-color: var(--danger, #dc2626); background: #fef2f2; }
.cs-bal-strip .cs-bal-title { font-weight: 700; }
.cs-bal-strip .cs-bal-formula { color: var(--text-secondary, #475569); }
.cs-bal-strip .cs-bal-value { font-weight: 800; font-size: 15px; }

/* ==================== V2.2.12：重复待复核 + 作废打标（纯追加，不动任何既有规则） ==================== */
/* ⚠待处理 第⑥类「🧹 重复待复核」操作列：两个按钮并排，窄屏自动换行 */
tr[data-src="quarantine"] .pend-col-act { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
/* 重复行淡紫底，与普通待处理行区分 */
tr[data-src="quarantine"] { background: #faf8ff; }
tr[data-src="quarantine"]:hover { background: #f5f3ff; }
/* 作废流水管理弹窗 */
#cs-voided-modal .modal-body { max-height: 62vh; overflow: auto; }
#cs-voided-modal .data-table td { vertical-align: middle; }
/* 导入预览「⚠ 库中重复」徽标 */
.imp-badge-dup { background: #fee2e2; color: #991b1b; }

/* ==================== V2.2.13：汇总卡片下钻（纯追加，不动任何既有规则） ==================== */
/* 卡片左上角的「▾ 可下钻」提示 */
.cs-drill-cue { display: inline-block; margin-left: 6px; font-size: 11px; color: var(--primary); opacity: .75; transition: transform .15s; }
.stat-card.clickable:hover .cs-drill-cue { transform: translateY(1px); opacity: 1; }
/* 可下钻卡片 hover 强化（与全局 .stat-card:hover 叠加，不覆盖） */
.stat-card.clickable[data-drill] { position: relative; }
.stat-card.clickable[data-drill]:hover { border-color: var(--primary); }
/* 下钻明细卡片 */
.cs-drill-card { padding: 12px 14px; animation: csDrillIn .18s ease-out; }
@keyframes csDrillIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.cs-drill-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.cs-drill-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cs-drill-foot td { font-weight: 700; background: var(--primary-soft); }
/* 分段小计（合计待收 / 已开票未开票） */
.cs-drill-sum { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.cs-drill-sum-item { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 8px; padding: 5px 12px; font-size: 13px; color: var(--text-secondary); }
.cs-drill-sum-item strong { color: var(--text-primary); font-variant-numeric: tabular-nums; }
.cs-drill-sum-item.strong { background: var(--primary-soft); border-color: rgba(99, 102, 241, .25); color: var(--primary-dark); font-weight: 700; }

/* ==================== V2.2.18：造型账号「我的待办」统计卡 + 一键折叠 + 已完成按钮加大 ==================== */
/* 作用域：全部只出现在造型账号的「我的待办」页（.zx-* 专属类名），其他角色页面零影响 */

/* 四张统计卡：横排一行等宽 */
.zx-stat-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.zx-stat-card {
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 14px 16px;
  text-align: center;
  cursor: pointer;
  user-select: none;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
}
.zx-stat-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(99, 102, 241, .16);
  transform: translateY(-1px);
}
.zx-stat-card.on {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, .18);
}
.zx-stat-ico { font-size: 17px; line-height: 1; }
.zx-stat-num {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.15;
  margin: 6px 0 2px;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.zx-stat-card.on .zx-stat-num { color: var(--primary-dark); }
.zx-stat-label { font-size: 13px; font-weight: 600; color: var(--text-secondary); }

/* 标题栏右侧「折叠」按钮（仅造型账号渲染） */
.zx-fold-btn {
  margin-left: auto;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 10px;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.zx-fold-btn:hover { background: rgba(255, 255, 255, .34); border-color: #fff; }

/* 已完成区展开/折叠按钮：加大点击尺寸（仅造型账号，其余角色保持原样） */
.completed-toggle.zx-big {
  padding: 16px 28px;
  font-size: 17px;
  border-radius: 14px;
  gap: 10px;
}
.completed-toggle.zx-big .ct-icon { font-size: 15px; }

/* 手机端：统计卡两列 */
@media (max-width: 640px) {
  .zx-stat-bar { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .zx-stat-num { font-size: 22px; }
  .zx-fold-btn { padding: 7px 12px; font-size: 12px; }
}

/* ==================== V2.2.25：🧹 重复组卡片（客户统计 → ⚠待处理 下钻） ==================== */
/*   仅新增选择器，不改任何既有规则；卡片只出现在「待处理」弹窗内，不参与主页面布局。 */
.dup-row-cell { padding: 6px 8px !important; }
.dup-group { border: 1px solid #ddd6fe; border-radius: 10px; background: #faf9ff; padding: 10px 12px; }
.dup-group-done { border-color: #cfe9dd; background: #f7fdfa; }
.dup-group-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dup-badge { background: #6d28d9; color: #fff; border-radius: 6px; padding: 2px 8px; font-size: 12px; white-space: nowrap; }
.dup-badge-done { background: #0f7b52; }
.dup-title { font-weight: 600; font-size: 13px; }
.dup-count { color: var(--text-light); font-size: 12px; }
.dup-btn-group { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.dup-group-body { margin-top: 10px; border-top: 1px dashed #ddd6fe; padding-top: 10px; }
.dup-cmp { width: 100%; border-collapse: collapse; font-size: 12.5px; table-layout: fixed; }
.dup-cmp th, .dup-cmp td { border: 1px solid #ece9fb; padding: 5px 8px; text-align: left; vertical-align: top; word-break: break-word; }
.dup-cmp thead th { background: #f1eefe; white-space: normal; }
.dup-cmp col.dup-col-f { width: 96px; }
.dup-cmp tbody th { background: #fbfaff; font-weight: 400; color: var(--text-light); white-space: nowrap; }
.dup-cmp tr.dup-diff td, .dup-cmp tr.dup-diff th { background: #fffbeb; }
.dup-cmp .dup-empty { color: var(--text-light); }
.dup-pick { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; cursor: pointer; }
.dup-foot { margin-top: 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dup-hint { color: var(--text-light); font-size: 12px; line-height: 1.6; flex: 1 1 240px; }
.pend-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 10px; }
.pend-tool-chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
@media (max-width: 640px) {
  .dup-cmp { font-size: 12px; }
  /* 手机端：把卡宽度与「外层宽表」解耦 —— 否则 colspan 单元格会被撑到整表宽度，
     导致「隔离副本」列被挤到横向滚动区外；限宽后两列并排完整可见。 */
  .dup-group { max-width: calc(100vw - 92px); }
  .dup-cmp col.dup-col-f { width: 72px; }
  .dup-btn-group { margin-left: 0; width: 100%; }
  .dup-cmp th, .dup-cmp td { padding: 4px 6px; }
}

/* ==================== V2.2.27：导出前区块勾选弹窗（.expblocks-modal） ====================
   说明：本段为**纯追加**，选择器全部限定在 .expblocks-modal 作用域内，不改动上方任何既有规则、
   不触碰全局 .modal / .modal-overlay（手机端适配沿用其 width:100% + overlay padding:20px）。 */
.expblocks-modal .modal { max-width: min(560px, 92vw); }
.expblocks-modal .expblocks-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px; margin-bottom: 8px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px; background: var(--card, #fff);
  cursor: pointer; user-select: none;
  transition: border-color .12s ease, background-color .12s ease;
}
.expblocks-modal .expblocks-row:hover { border-color: var(--primary, #2F6BFF); }
.expblocks-modal .expblocks-row.locked { background: #f5f7fa; cursor: default; }
.expblocks-modal .expblocks-row.locked:hover { border-color: var(--border, #e5e7eb); }
.expblocks-modal .expblocks-row input[type="checkbox"] { width: 18px; height: 18px; flex: 0 0 auto; cursor: pointer; }
.expblocks-modal .expblocks-row.locked input[type="checkbox"] { cursor: not-allowed; }
.expblocks-modal .expblocks-name { font-weight: 600; font-size: 14px; }
.expblocks-modal .expblocks-row.nodata .expblocks-name { font-weight: 500; color: var(--text-light, #8a93a0); }
.expblocks-modal .expblocks-lock {
  font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 6px;
  background: #e8eefc; color: var(--primary, #2F6BFF); white-space: nowrap;
}
.expblocks-modal .expblocks-meta { margin-left: auto; font-size: 12px; color: var(--text-light, #8a93a0); white-space: nowrap; }
@media (max-width: 600px) {
  .expblocks-modal .modal-body { padding: 14px 14px 4px; }
  .expblocks-modal .expblocks-row { padding: 10px; gap: 8px; }
  .expblocks-modal .expblocks-meta { font-size: 11px; }
}

/* ==================== V2.2.29 「标记完成」开关 + 按钮 + 确认弹窗（纯追加，不改任何既有规则） ==================== */
/* ① 三格栏扩容：最左新增「👁」开关列（auto 宽、按内容自适应），原「待发货 | 简单发货 | 出库单发货」
      三格仍等分剩余空间。
      ★ 只对带 .has-eye 的实例生效（非管理员不渲染开关、不加该类）→ 发货管理页 / 其它调用点布局零回归。 */
// 补13追加六：三格栏已删，has-eye 扩容规则清理
// 补13追加六：👁 开关本体规则清理
/* ③ 卡片操作区「✓ 标记完成」（浅绿填充，与「⚡ 一键发货」同尺寸风格） */
.btn-markcomplete {
  background: #dcfce7; border: 1.5px solid #86efac; color: #15803d;
  border-radius: 8px; font-size: 12px; font-weight: 700; padding: 5px 9px;
  cursor: pointer; white-space: nowrap; transition: all .2s;
}
.btn-markcomplete:hover { background: #bbf7d0; border-color: #4ade80; color: #166534; }
.rail-c8 .btn-markcomplete { font-size: 11px; padding: 3px 8px; white-space: nowrap; }
/* ④ 确认弹窗（模具编号 + 名称 + 日期选择器 + 取消/确认） */
.markcomplete-modal .modal { max-width: 400px; width: calc(100% - 32px); }
.markcomplete-modal .mc-head { font-size: 16px; font-weight: 800; color: #0f2f5f; margin-bottom: 10px; }
.markcomplete-modal .mc-sub { font-size: 13px; color: #475569; line-height: 1.6; }
.markcomplete-modal .mc-name { color: #0f2f5f; font-weight: 700; margin-bottom: 14px; }
.markcomplete-modal .mc-label { display: block; font-size: 13px; font-weight: 700; color: #334155; margin-bottom: 6px; }
.markcomplete-modal .mc-date {
  width: 100%; box-sizing: border-box; padding: 10px 12px;
  border: 1.5px solid #dbe4f2; border-radius: 8px;
  font-size: 14px; font-family: inherit; color: #0f2f5f; background: #fff;
}
.markcomplete-modal .mc-date:focus { outline: none; border-color: #1c5fd6; box-shadow: 0 0 0 3px rgba(28, 95, 214, .12); }
.markcomplete-modal .mc-tip { font-size: 12px; color: #8a93a0; line-height: 1.6; margin-top: 10px; }
@media (max-width: 768px) {
  .rail-c8 .btn-markcomplete { font-size: 10px; padding: 2px 6px; }
}

/* ==================== V2.2.77 补13追加十三：强制越级 ==================== */
/* ① 卡片操作区「⏩ 强制越级」（橙色警示，与浅绿「标记完成」区分） */
.force-jump-btn {
  background: #ffedd5; border: 1.5px solid #fdba74; color: #c2410c;
  border-radius: 8px; font-size: 12px; font-weight: 700; padding: 5px 9px;
  cursor: pointer; white-space: nowrap; transition: all .2s;
}
.force-jump-btn:hover { background: #fed7aa; border-color: #fb923c; color: #9a3412; }
.rail-c8 .force-jump-btn { font-size: 11px; padding: 3px 8px; white-space: nowrap; }
/* ② 跳转弹窗 */
.force-jump-modal .modal { max-width: 460px; width: calc(100% - 32px); }
.force-jump-modal .fj-cur {
  font-size: 13px; color: #475569; line-height: 1.6; margin-bottom: 12px;
  padding: 8px 10px; background: #f8fafc; border-radius: 6px;
}
.force-jump-modal .fj-cur b { color: #0f2f5f; font-size: 15px; }
.force-jump-modal .fj-label { display: block; font-size: 13px; font-weight: 700; color: #334155; margin-bottom: 8px; }
.force-jump-modal .fj-opts {
  display: flex; flex-direction: column; gap: 6px;
  max-height: 240px; overflow-y: auto; margin-bottom: 12px;
}
.force-jump-modal .fj-opt {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 11px; border: 1.5px solid #dbe4f2; border-radius: 8px;
  cursor: pointer; font-size: 14px; color: #1e293b; transition: all .15s;
}
.force-jump-modal .fj-opt:hover { border-color: #fdba74; background: #fff7ed; }
.force-jump-modal .fj-opt input { accent-color: #ea580c; width: 16px; height: 16px; }
.force-jump-modal .fj-tip { font-size: 12px; color: #8a93a0; line-height: 1.6; margin-top: 4px; }
.force-jump-modal .fj-ops { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
@media (max-width: 768px) {
  .rail-c8 .force-jump-btn { font-size: 10px; padding: 2px 6px; }
  .force-jump-modal .modal { max-width: 94vw; }
}

/* ==================== V2.2.30 机加工员工首页看板（纯追加，不改任何既有规则） ==================== */
/* 一、4 张统计卡（矮版，高度 ≈ 造型页 .zx-stat-card 的 2/3） */
.mc-stat-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.mc-stat-card {
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 6px 6px;
  text-align: center;
  cursor: pointer;
  user-select: none;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.mc-stat-card:hover { border-color: var(--primary); box-shadow: 0 3px 10px rgba(99, 102, 241, .16); transform: translateY(-1px); }
.mc-stat-ico { font-size: 12px; line-height: 1; }
.mc-stat-num {
  font-size: 18px; font-weight: 800; line-height: 1.1; margin: 2px 0 1px;
  color: var(--text-primary); font-variant-numeric: tabular-nums;
}
.mc-stat-slash { font-size: 14px; }
.mc-stat-label { font-size: 11px; font-weight: 600; color: var(--text-secondary); white-space: nowrap; }
.mc-board-loading {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 16px; margin-bottom: 14px; font-size: 13px; color: var(--text-secondary);
}

/* ==================== V2.2.46（DEV-009）铁模装配「进度跟踪」看板（纯追加独立类，不改任何机加工 .mc-* 规则） ==================== */
/* 4 张统计卡 + 每月统计（点击展开）。风格对齐「数据统计」模块（配色/圆角/字体/阴影一致）。 */
.tm-stat-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.tm-stat-card {
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 8px 6px;
  text-align: center;
  cursor: pointer;
  user-select: none;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.tm-stat-card:hover { border-color: var(--primary); box-shadow: 0 3px 10px rgba(99, 102, 241, .16); transform: translateY(-1px); }
.tm-stat-ico { font-size: 13px; line-height: 1; }
.tm-stat-num {
  font-size: 19px; font-weight: 800; line-height: 1.1; margin: 3px 0 2px;
  color: var(--text-primary); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.tm-stat-label { font-size: 11px; font-weight: 600; color: var(--text-secondary); white-space: nowrap; }
/* 每月统计（展开表） */
.tm-month-wrap { margin-bottom: 12px; overflow-x: auto; }
.tm-month-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tm-month-table th, .tm-month-table td { padding: 7px 10px; border-bottom: 1px solid var(--border-light); text-align: center; }
.tm-month-table th { background: #f8fafc; color: var(--text-secondary); font-weight: 700; font-size: 12px; }
.tm-month-table td { color: var(--text-primary); font-variant-numeric: tabular-nums; }
.tm-month-table tr:last-child td { border-bottom: none; }

/* 手机端优先：一排两个卡片（用户要求）+ 更紧凑 */
@media (max-width: 600px) {
  .tm-stat-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .tm-stat-card { padding: 7px 6px; border-radius: 9px; }
  .tm-stat-num { font-size: 18px; }
  .tm-stat-label { font-size: 11px; }
  .tm-month-table th, .tm-month-table td { padding: 6px 8px; }
}

/* 二、机床状态长条（PC 一排 4 个 / 手机一排 3 个；每块「加工中」料块各占一条） */
.mc-mach-wrap { margin-bottom: 14px; }
.mc-mach-title { font-size: 12px; font-weight: 600; color: var(--text-secondary); margin: 0 0 6px 2px; }
.mc-mach-title em { font-style: normal; font-weight: 400; margin-left: 6px; }
.mc-mach-bar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.mc-mach-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  column-gap: 6px; row-gap: 1px;
  align-items: center;
  padding: 6px 8px;
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  overflow: hidden;
}
.mc-mach-card.busy { background: #7ED957; color: #1B5E20; }
.mc-mach-card.idle { background: #E8EAED; color: #5F6368; }
.mc-mach-no { grid-row: 1 / span 2; grid-column: 1; font-size: 17px; font-weight: 800; line-height: 1.05; letter-spacing: .5px; }
.mc-mach-mold { grid-row: 1; grid-column: 2 / span 2; font-size: 12px; font-weight: 700; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-mach-status { grid-row: 2; grid-column: 2; font-size: 11px; font-weight: 600; white-space: nowrap; }
.mc-mach-dur { grid-row: 2; grid-column: 3; font-size: 11px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mc-mach-card.busy .mc-mach-mold,
.mc-mach-card.busy .mc-mach-status,
.mc-mach-card.busy .mc-mach-dur { color: #1B5E20; font-weight: 700; }

/* V2.2.38：机加工个人首页机床卡片 —— 配色「全端」对齐数据总汇（灰系）；布局 3 列仅手机端（见下方窄屏媒体查询）。
   用 .mc-mach-bar 后代限定 → 不触碰数据总汇页的 .ds-mach-bar，也不触碰弹窗内 .mc-pill */
.mc-mach-bar .mc-mach-card.idle {
  background: #B8BEC8;                          /* 待机中：中灰 + 边框 + 阴影 → 轮廓清晰不糊 */
  border: 1px solid #A0A8B4;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}
.mc-mach-bar .mc-mach-card.busy {
  background: #5C6B7A;                          /* 加工中：深蓝灰（同色系），一眼分辨「在干活」 */
  color: #FFFFFF;
  border: 1px solid #4A5568;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}
.mc-mach-bar .mc-mach-card.busy .mc-mach-no,
.mc-mach-bar .mc-mach-card.busy .mc-mach-mold,
.mc-mach-bar .mc-mach-card.busy .mc-mach-status,
.mc-mach-bar .mc-mach-card.busy .mc-mach-dur {
  color: #FFFFFF;                               /* 加工中：文字纯白，与深底强对比 */
}

/* 三、弹窗（白色圆角卡 + 轻阴影 + 半透明遮罩；点遮罩或 × 关闭） */
.mc-modal-mask {
  position: fixed; inset: 0; z-index: 9600;
  background: rgba(15, 23, 42, .45);
  display: flex; align-items: center; justify-content: center;
  padding: 18px;
}
.mc-modal-card {
  background: #fff; border-radius: 16px; width: 100%; max-width: 420px; max-height: 82vh;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 16px 44px rgba(15, 23, 42, .24);
}
.mc-modal-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px 10px; border-bottom: 1px solid var(--border-light);
}
.mc-modal-title { flex: 1; font-size: 15px; font-weight: 700; color: var(--text-primary); }
.mc-modal-x {
  width: 30px; height: 30px; flex: 0 0 auto; border-radius: 8px;
  border: 1px solid var(--border-light); background: #fff;
  color: var(--text-secondary); font-size: 14px; line-height: 1;
  cursor: pointer; font-family: inherit;
}
.mc-modal-x:hover { background: #f3f4f6; }
.mc-modal-body { padding: 12px 16px 16px; overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* 四、明细列表 */
.mc-dl { list-style: none; margin: 0; padding: 0; }
.mc-dl li {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 2px; border-bottom: 1px dashed var(--border-light);
}
.mc-dl li:last-child { border-bottom: none; }
.mc-dl-l { display: flex; flex-direction: column; min-width: 0; }
.mc-dl-l b { font-size: 14px; color: var(--text-primary); }
.mc-dl-l span { font-size: 11px; color: var(--text-secondary); }
.mc-dl-r { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.mc-dl > li > em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--primary-dark, var(--primary)); flex-shrink: 0; }
.mc-dl-kind { font-style: normal; font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 6px; }
.mc-dl-kind.load { background: #e0f2fe; color: #0369a1; }
.mc-dl-kind.unload { background: #dcfce7; color: #15803d; }
.mc-dl-time { font-size: 12px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.mc-dl-op { font-size: 12px; color: var(--text-primary); }
.mc-dl-empty { padding: 26px 0; text-align: center; font-size: 13px; color: var(--text-secondary); }

/* 五、机床详情弹窗 */
.mc-mm-img {
  display: block; width: 100%; max-height: 190px; object-fit: contain;
  background: #f8fafc; border-radius: 12px; margin-bottom: 12px;
}
.mc-mm-noimg {
  display: flex; align-items: center; justify-content: center; height: 110px;
  border: 1px dashed var(--border-light); font-size: 12px; color: var(--text-secondary);
}
.mc-mm-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.mc-mm-no { font-size: 22px; font-weight: 800; color: var(--text-primary); }
.mc-pill { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.mc-pill.busy { background: #7ED957; color: #1B5E20; }
.mc-pill.idle { background: #E8EAED; color: #5F6368; }
.mc-mm-kv {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 7px 0; border-bottom: 1px dashed var(--border-light); font-size: 13px;
}
.mc-mm-kv:last-child { border-bottom: none; }
.mc-mm-kv > span { flex: 0 0 84px; color: var(--text-secondary); }
.mc-mm-kv > b { flex: 1; min-width: 0; color: var(--text-primary); font-weight: 700; word-break: break-all; }
.mc-mm-hint {
  margin-top: 10px; padding: 8px 10px; border-radius: 8px;
  background: #f8fafc; font-size: 12px; color: var(--text-secondary); line-height: 1.6;
}

/* 六、窄屏（手机）微调：更紧凑，但字号不再缩到看不清 */
@media (max-width: 600px) {
  .mc-stat-bar { gap: 6px; }
  .mc-stat-card { padding: 5px 4px; border-radius: 9px; }
  .mc-stat-num { font-size: 16px; }
  .mc-stat-slash { font-size: 13px; }
  .mc-stat-label { font-size: 10px; }
  .mc-mach-bar { gap: 6px; grid-template-columns: repeat(3, minmax(0, 1fr)); }   /* V2.2.38：手机端 4 列 → 3 列 */
  .mc-mach-card { grid-template-columns: auto minmax(0, 1fr); padding: 5px 6px; column-gap: 4px; border-radius: 9px; }
  .mc-mach-no { grid-row: 1; grid-column: 1; font-size: 15px; letter-spacing: 0; }
  .mc-mach-mold { grid-row: 1; grid-column: 2; font-size: 10px; }
  .mc-mach-status { grid-row: 2; grid-column: 1; font-size: 10px; }
  .mc-mach-dur { grid-row: 2; grid-column: 2; font-size: 10px; }
  .mc-mach-dur .mc-dur-prefix { display: none; }
  .mc-modal-mask { padding: 12px; }
  .mc-modal-card { max-height: 86vh; }
}

/* ==================== v2.2.31：员工个人班次时间（4 打卡规则 → 个人上下班时间） ==================== */
#uf-att-personal { margin-top: 10px; padding: 9px 11px; border: 1px dashed #d7dbe3; border-radius: 8px; background: #f8fafc; }
#uf-att-personal .att-time-row { font-size: 13px; }
#uf-att-personal .uf-sec-hint { margin-top: 6px; }
.att-th-personal { font-style: normal; color: #2563eb; font-size: 12px; }
/* 打卡页顶部「今日休息」软提示（v2.2.31 起不再阻断打卡，仅作提示颜色） */
.att-hero-hi .att-rest-tip { color: #6b7280; }

/* ==================== v2.2.32：选料区字段「默认值」控件（造型选料设置弹窗字段行） ==================== */
.zxtpl-def {
  flex: 0 0 auto; width: 108px; height: 30px; padding: 0 6px;
  border: 1px solid #d7dbe3; border-radius: 6px;
  font-size: 12px; font-weight: 600; color: #333; background: #fff;
  outline: none;
}
select.zxtpl-def { cursor: pointer; padding: 0 4px; }
.zxtpl-def:focus { border-color: var(--primary, #1c5fd6); }
.zxtpl-def-na { flex: 0 0 auto; width: 108px; text-align: center; font-size: 12px; color: #94a3b8; }
@media (max-width: 600px) { .zxtpl-def, .zxtpl-def-na { width: 88px; } }

/* ==================== V2.2.35：数据汇总页（原「提醒」tab）—— 全部新增类，不改任何既有规则 ==================== */
.ds-sec { margin-bottom: 18px; }
.ds-sec-title { font-size: 15px; font-weight: 700; color: var(--text-primary); margin: 0 0 10px 2px; }
/* 一、待做区：一条 = 环节名称 + 血条 + 数值（全屏宽） */
.ds-bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.ds-bar-label { flex: 0 0 80px; font-size: 13px; color: var(--text-secondary); white-space: nowrap; }
.ds-bar-track { flex: 1; min-width: 0; height: 14px; background: #eef0f4; border-radius: 7px; overflow: hidden; }
.ds-bar-fill { height: 100%; background: var(--primary); border-radius: 7px; transition: width .3s ease; }
.ds-bar-num { flex: 0 0 34px; text-align: right; font-size: 14px; font-weight: 700; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.ds-bar-base .ds-bar-label { font-weight: 700; color: var(--text-primary); }
.ds-bar-base .ds-bar-fill { background: var(--primary-dark, var(--primary)); }
/* 二、机加工区：顶部两个字大数统计 */
.ds-big { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.ds-big-card { background: var(--card); border: 1px solid var(--border-light); border-radius: 12px; padding: 12px 14px; text-align: center; }
.ds-big-label { font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 4px; }
.ds-big-num { font-size: 34px; font-weight: 800; line-height: 1.05; color: var(--primary); font-variant-numeric: tabular-nums; }
/* 三、机床状态长条：一排 3 个自动换行（12 台 = 4 排，15 台 = 5 排）；卡片样式复用 .mc-mach-card */
.ds-mach-bar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ds-sec .mc-mach-wrap { margin-bottom: 0; }
/* V2.2.37：数据汇总页机床卡片配色 —— 用后代选择器覆盖，仅作用于 .ds-mach-bar 内，
   不触碰机加工个人首页共用的 .mc-mach-card 原规则（那条是 4 列、嫩绿/浅灰） */
.ds-mach-bar .mc-mach-card.idle {
  background: #B8BEC8;                          /* 待机中：中灰，加边框+阴影 → 轮廓清晰不糊 */
  border: 1px solid #A0A8B4;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}
.ds-mach-bar .mc-mach-card.busy {
  background: #5C6B7A;                          /* 加工中：深蓝灰（同色系），一眼分辨「在干活」 */
  color: #FFFFFF;
  border: 1px solid #4A5568;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}
.ds-mach-bar .mc-mach-card.busy .mc-mach-no,
.ds-mach-bar .mc-mach-card.busy .mc-mach-mold,
.ds-mach-bar .mc-mach-card.busy .mc-mach-status,
.ds-mach-bar .mc-mach-card.busy .mc-mach-dur {
  color: #FFFFFF;                               /* 加工中：文字纯白，与深底强对比 */
}
@media (max-width: 600px) {
  .ds-bar-row { gap: 8px; }
  .ds-bar-label { flex: 0 0 68px; font-size: 12px; }
  .ds-bar-num { flex: 0 0 30px; font-size: 13px; }
  .ds-mach-bar { gap: 6px; }
  .ds-big-num { font-size: 30px; }
}

/* ==================== V2.2.39：机加工区「两个大数」改按钮 + 料块列表弹窗 ====================
   全部为纯追加（不删改上方任何既有规则）；类名统一 ds- 前缀，仅作用于数据汇总页与其弹窗。 */
/* 一、顶部两个大字 → 按钮（保留原大数视觉，增加可点感） */
.ds-big-btn {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  width: 100%; padding: 12px 14px; cursor: pointer; font-family: inherit;
  background: var(--card); border: 1px solid var(--border-light); border-radius: 12px;
  transition: box-shadow .15s, transform .08s, border-color .15s;
  -webkit-tap-highlight-color: transparent;
}
.ds-big-btn:active { transform: scale(.985); }
.ds-big-btn:hover { border-color: var(--primary); box-shadow: 0 3px 12px rgba(15, 23, 42, .10); }
.ds-big-btn .ds-big-label { font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.ds-big-pair {
  display: flex; align-items: baseline; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--text-secondary); font-variant-numeric: tabular-nums;
}
.ds-big-pair b { font-size: 30px; font-weight: 800; line-height: 1.05; color: var(--primary); }
.ds-big-sep { color: var(--border-light); font-weight: 400; }
.ds-big-busy .ds-big-pair b { color: #2E7D32; }          /* 加工中：绿系（对齐原 #7ED957 语义） */
.ds-big-go { font-size: 11px; font-weight: 600; color: var(--primary); opacity: .85; }
.ds-big-busy .ds-big-go { color: #2E7D32; }

/* 二、料块弹窗：列表滚动区 + 底部固定筛选栏 */
.ds-blk-body { flex: 1 1 auto; min-height: 0; padding: 10px 12px 12px; }
.ds-blk-empty { padding: 28px 8px; text-align: center; color: var(--text-secondary); font-size: 13px; }
.ds-blk-group { margin-bottom: 12px; }
.ds-blk-group-head {
  display: flex; align-items: center; gap: 8px; margin: 0 2px 6px;
  font-size: 13px; font-weight: 700; color: var(--text-primary);
}
.ds-blk-group-head::before { content: ''; width: 3px; height: 13px; border-radius: 2px; background: var(--primary); }
.ds-blk-group-head em { font-style: normal; font-size: 11px; font-weight: 600; color: var(--text-secondary); }
.ds-blk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }   /* 组内一排 2 个 */
.ds-blk-grid.ds-blk-flat { display: flex; flex-wrap: wrap; }   /* ★ V4.3.6：全部tab 单件并入同行横向流 */
.ds-blk-grid.ds-blk-flat .ds-blk-card { width: calc(50% - 4px); }
.ds-blk-pairs { display: flex; flex-direction: column; gap: 8px; }   /* v1145：按副配对，一行一副 */
.ds-blk-pairs > .ds-blk-grid { margin-bottom: 0; }
.ds-blk-unpair { display: inline-block; margin-left: 5px; padding: 0 5px; border-radius: 6px; font-size: 10px; font-weight: 600; line-height: 15px; color: var(--text-secondary); background: rgba(127,127,127,.12); vertical-align: middle; }
.ds-blk-card {
  position: relative; display: flex; flex-direction: column; gap: 6px; padding: 8px;
  background: var(--card); border: 1px solid var(--border-light); border-radius: 10px;
}
/* ★ V4.3.6：编程天数标签（卡片右上角，绝对定位不挡按钮）—— 0绿/1蓝/2-3橙/4+红 */
.ds-prog-day {
  position: absolute; top: 6px; right: 6px; z-index: 2;
  padding: 1px 7px; border-radius: 6px; font-size: 10px; font-weight: 700; line-height: 17px;
  color: #fff; pointer-events: none; white-space: nowrap;
}
.ds-prog-day.pd-0 { background: #16a34a; }
.ds-prog-day.pd-1 { background: #2563eb; }
.ds-prog-day.pd-2 { background: #ea580c; }
.ds-prog-day.pd-3 { background: #dc2626; }
.ds-blk-card.busy { border-color: #7ED957; box-shadow: 0 0 0 1px rgba(126, 217, 87, .35); }
.ds-blk-info { display: flex; flex-direction: column; gap: 1px; }
.ds-blk-mold { font-size: 13px; font-weight: 800; color: var(--text-primary); line-height: 1.25; }
.ds-blk-file { font-size: 11px; font-weight: 700; color: var(--primary); letter-spacing: .3px; }
.ds-blk-cat { font-size: 11px; font-weight: 600; color: var(--text-secondary); }
.ds-blk-line { font-size: 10px; color: var(--text-secondary); }
.ds-blk-machine { font-weight: 600; color: #2E7D32; }
.ds-blk-wait { font-weight: 600; color: #B26A00; }
.ds-blk-photo {
  position: relative; width: 100%; aspect-ratio: 4 / 3; overflow: hidden;
  border-radius: 8px; background: #F1F3F5; display: flex; align-items: center; justify-content: center;
}
.ds-blk-photo img { width: 100%; height: 100%; object-fit: contain; cursor: zoom-in; display: block; }
.ds-blk-nophoto span { font-size: 11px; color: var(--text-secondary); }
.ds-blk-zoom {
  position: absolute; right: 4px; bottom: 4px; padding: 1px 5px; border-radius: 5px;
  font-size: 10px; color: #fff; background: rgba(15, 23, 42, .55); pointer-events: none;
}
.ds-blk-btn {
  width: 100%; padding: 7px 8px; border: none; border-radius: 8px; cursor: pointer;
  font-family: inherit; font-size: 12px; font-weight: 700; color: #fff; background: var(--primary);
  -webkit-tap-highlight-color: transparent;
}
.ds-blk-btn:active { opacity: .85; }
.ds-blk-btn.busy { background: #2E7D32; }
/* v1146：手工模待做卡 底部双按钮（拍照可选｜确认完成）*/
.ds-blk-act { display: flex; justify-content: flex-end; gap: 6px; margin-top: 12px; width: 100%; }
.ds-blk-act .ds-blk-btn { flex: 0 0 auto; width: auto; }
.ds-blk-btn-photo { background: #6b7785; }   /* 中性灰：拍照可选 */
.ds-blk-btn-ok { background: #2E7D32; }       /* 绿：确认完成 */
.ds-blk-card.done { opacity: .6; }
/* ★ v1148：大件「拍照 / 上传图片」二选一弹层 */
.sg-big-dlg-mask { position: fixed; inset: 0; background: rgba(15, 23, 42, .55); display: flex; align-items: center; justify-content: center; z-index: 99999; padding: 16px; }
.sg-big-dlg { background: #fff; border-radius: 14px; padding: 20px 18px; width: 100%; max-width: 340px; box-shadow: 0 12px 40px rgba(0, 0, 0, .28); }
.sg-big-dlg-title { font-size: 16px; font-weight: 700; color: #1f2937; margin-bottom: 6px; }
.sg-big-dlg-sub { font-size: 12px; color: #6b7280; margin-bottom: 16px; word-break: break-all; }
.sg-big-dlg-btns { display: flex; flex-direction: column; gap: 10px; }
.sg-big-dlg-btn { width: 100%; padding: 11px 14px; border: 1px solid #d1d5db; background: #f9fafb; color: #374151; border-radius: 9px; font-size: 14px; font-weight: 600; cursor: pointer; }
.sg-big-dlg-btn.alt { background: #6b7785; border-color: #6b7785; color: #fff; }
.sg-big-dlg-btn.primary { background: #2E7D32; border-color: #2E7D32; color: #fff; }
.sg-big-dlg-btn:active { opacity: .85; }
/* 员工端手工模待做卡（点开弹窗列料块） */
.manual-staff-todo { display: flex; flex-direction: column; gap: 10px; }
.manual-staff-card .mold-thumb.thumb-empty { display: flex; align-items: center; justify-content: center; font-size: 20px; color: #94a3b8; }


/* 三、弹窗底部固定筛选：一排 chip 单选（横向可滑） */
.ds-blk-filter {
  flex: 0 0 auto; padding: 8px 10px; border-top: 1px solid var(--border-light); background: #FAFBFC;
}
.ds-chip-row { display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
.ds-chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
  padding: 5px 10px; border: 1px solid var(--border-light); border-radius: 999px;
  background: #fff; color: var(--text-secondary); font-family: inherit; font-size: 12px; font-weight: 600;
  white-space: nowrap; -webkit-tap-highlight-color: transparent;
}
.ds-chip i { font-style: normal; font-size: 10px; font-weight: 700; opacity: .75; }
.ds-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.ds-chip.active i { opacity: .95; }

/* 四、弹窗内点图放大：灯箱层级必须高于 .mc-modal-mask(9600)，否则被弹窗盖住 */
.lightbox.ds-zoom-up { z-index: 9700; }
/* 五、「加工登记」跳转后，目标料块卡片高亮闪烁 + 常驻描边（详情页重渲染时靠 JS 持续补类）
   描边用 outline-offset 负值画在卡片「内侧」→ 不会被容器裁掉，也不压到相邻卡片 */
.mc-block-card.ds-focus-flash {
  animation: dsFocusFlash 1.3s ease-in-out 3;
  border-radius: 12px;
  outline: 3px solid rgba(37, 99, 235, .9);
  outline-offset: -3px;
}
@keyframes dsFocusFlash {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
  35%      { box-shadow: 0 0 0 5px rgba(37, 99, 235, .55); }
}

/* ==================== V2.2.40：进度跟踪页「待加工 / 加工中」大按钮 + 料块明细弹窗 + 上料/下料面板（纯追加） ==================== */
/* 一、顶部两个大按钮（一排 2 个：待加工=蓝 / 加工中=绿） */
.pt-big-wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0 0 12px; }
.pt-big-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  width: 100%; padding: 11px 13px; text-align: left; cursor: pointer; font-family: inherit;
  border: 1px solid #bfdbfe; border-radius: 12px;
  background: linear-gradient(180deg, #eff6ff, #dbeafe); color: #1e3a8a;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .08);
}
.pt-big-btn:active { transform: translateY(1px); }
.pt-big-btn.pt-big-busy { border-color: #bbf7d0; background: linear-gradient(180deg, #f0fdf4, #dcfce7); color: #14532d; }
.pt-big-label { font-size: 13px; font-weight: 700; }
.pt-big-pair { display: flex; align-items: baseline; gap: 5px; font-size: 12px; opacity: .95; }
.pt-big-pair b { font-size: 19px; font-weight: 800; line-height: 1.1; }
.pt-big-sep { opacity: .45; }
.pt-big-go { font-size: 11px; opacity: .78; }

/* ★② 代加工料块入口改造：上料区 / 下料区 双按钮（只显块数，不显副数；文字左、数量右、大字号） */
.pt-zone-wrap{display:flex;gap:12px;margin:10px 0}
.pt-zone-btn{flex:1;display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border:none;border-radius:10px;cursor:pointer;background:#e8f0fe;color:#1a3a6b;box-shadow:0 2px 6px rgba(26,58,107,.12);transition:transform .08s}
.pt-zone-btn:hover{transform:translateY(-2px)}
.pt-zone-btn.pt-zone-busy{background:#fff3e0;color:#8a4b00}
.pt-zone-label{font-size:17px;font-weight:600}
.pt-zone-count{font-size:34px;font-weight:800;line-height:1;margin-left:14px}

/* 二、料块弹窗外壳（标题 / 可滚动内容 / 底部固定筛选栏） */
.mc-modal-card.pt-blk-shell { max-width: 560px; max-height: 88vh; }
.pt-blk-body { padding: 10px 12px; }
.pt-blk-empty { padding: 28px 12px; text-align: center; color: var(--text-secondary); font-size: 13px; }
.pt-blk-group { margin-bottom: 14px; }
.pt-blk-group-head {
  display: flex; align-items: center; gap: 6px; margin: 0 0 7px;
  padding-left: 8px; font-size: 13px; font-weight: 700; color: var(--text-primary);
  border-left: 3px solid var(--primary);
}
.pt-blk-group-head em { font-style: normal; font-size: 11px; font-weight: 500; color: var(--text-secondary); }
.pt-blk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pt-blk-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.pt-blk-card.busy { border-color: #bbf7d0; }
.pt-blk-info { padding: 7px 8px 6px; }
.pt-blk-mold { font-size: 13px; font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-blk-file { font-size: 11px; color: var(--text-secondary); margin-top: 1px; }
.pt-blk-cat { font-size: 11px; color: var(--primary); font-weight: 600; margin-top: 1px; }
.pt-blk-line { font-size: 11px; color: #15803d; margin-top: 1px; }
.pt-blk-photo { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #f1f5f9; cursor: zoom-in; }
.pt-blk-noimg { display: flex; align-items: center; justify-content: center; color: #94a3b8; font-size: 11px; }
.pt-blk-btn { width: 100%; padding: 8px 0; border: none; border-radius: 0 0 9px 9px; background: var(--primary); color: #fff; font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit; }
.pt-blk-btn:active { filter: brightness(.94); }

/* 三、底部固定筛选栏（4 个 chip：铝模 / 铁模 / 修模 / 小件；单选 + 可反选，无选中 = 全部） */
.pt-blk-filter { display: flex; gap: 8px; flex: 0 0 auto; padding: 9px 12px; border-top: 1px solid var(--border-light); background: #fff; }
.pt-chip { flex: 1 1 0; padding: 7px 0; border: 1px solid var(--border); border-radius: 999px; background: #f8fafc; color: var(--text-secondary); font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit; }
.pt-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* 四、上料 / 下料照片预览浮层（挂在 body；靠 body.pt-modal-open 抬到料块弹窗之上） */
.pt-photo-preview .pt-photo-preview-modal { max-width: 420px; }
.pt-photo-preview-title { font-size: 15px; font-weight: 700; text-align: center; margin-bottom: 10px; }
.pt-photo-preview-img { text-align: center; }
.pt-photo-preview-img img { max-width: 100%; max-height: 46vh; border-radius: 10px; }
.pt-photo-preview-tip { margin-top: 10px; font-size: 12px; color: var(--text-secondary); text-align: center; line-height: 1.7; }
.pt-photo-preview-actions { margin-top: 14px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.pt-photo-preview-actions .btn { min-width: 84px; }

/* 五、机床卡片弹窗内「下料」区 */
.pt-unload-box { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border-light); }
.pt-unload-head { font-size: 12px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.pt-unload-head em { font-style: normal; font-weight: 500; color: var(--text-secondary); margin-left: 4px; }
.pt-unload-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 0; border-bottom: 1px solid #f1f5f9; }
.pt-unload-row:last-child { border-bottom: none; }
.pt-unload-l { display: flex; flex-direction: column; min-width: 0; }
.pt-unload-l b { font-size: 13px; color: var(--text-primary); }
.pt-unload-l span { font-size: 11px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-unload-btn { flex: 0 0 auto; padding: 6px 14px; font-size: 12px; }

/* 六、层级修复（V2.2.39 同类坑）：料块弹窗 .mc-modal-mask = 9600，
   而选机床 / 下料预览 / 下料类型选择弹窗 .modal-overlay 只有 200 → 会被完全盖住看不见。
   开料块弹窗时 JS 给 body 挂 .pt-modal-open → 把 .modal-overlay 抬到 9700。
   ⚠️ 只改层级、不动 .modal-overlay 原规则，且只在料块弹窗开启期间生效 → 其它场景行为不变。 */
body.pt-modal-open .modal-overlay { z-index: 9700; }

/* 七、层级修复补丁（隔离实测发现）：下料是从「机床详情弹窗」(.mc-modal-mask = 9600) 内发起的，
   此时 body 上没有 .pt-modal-open → .modal-overlay 仍是 200 → 照片预览面板会被机床弹窗整个盖住（只露出标题条）。
   → 给本版自建的照片预览浮层直接钉死 9700（只影响 .pt-photo-preview 这一个类，不碰任何公共函数/原规则）。 */
.modal-overlay.pt-photo-preview { z-index: 9700; }

/* ==================== V2.2.41（DEV-003）：编程料块编号「同步至同类」按钮（纯追加） ====================
   仅出现在「铝模上 / 铁模上」的编号框右侧（app.js 的 zxProgBlocksHtml 内条件渲染，catKey 判定）。
   外层 .zx-prog-head 本身已是 display:flex + flex-wrap:wrap（见 style.css:5028），
   故窄屏/手机端按钮会自动换行，无横向溢出风险。
   ⚠️ 本段只新增 .zx-sync-no-btn 一个类，不覆盖 .zx-prog-fn / .zx-prog-head 任何既有规则。 */
.zx-sync-no-btn {
  flex: 0 0 auto;
  height: 30px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 700;
  line-height: 30px;
  white-space: nowrap;
  color: #fff;
  background: var(--primary, #2563eb);
  border: 1px solid var(--primary, #2563eb);
  border-radius: 6px;
  cursor: pointer;
  transition: filter .15s, transform .06s;
}
.zx-sync-no-btn:hover { filter: brightness(1.08); }
.zx-sync-no-btn:active { transform: translateY(1px); }

/* ==================== V2.2.42（DEV-002 + DEV-005）==================== */
/* DEV-002：编程料块「编号输入框」收窄至 6 字符（约 66px，含内边距），右侧留 9px 间距；
   铁模上/铝模上行的「同步至同类」按钮本就紧随其后；其余子类行仅保留输入框；
   PC/手机一致 —— 电脑端一行放下不换行（外层 .zx-prog-head 已 flex-wrap）。
   仅覆盖 .zx-prog-fn 的尺寸，不新增/不修改其它任何既有规则。 */
.zx-prog-head .zx-prog-fn,
.zx-prog-card .zx-prog-fn {
  width: 66px !important;
  min-width: 66px !important;
  max-width: 66px !important;
  flex: 0 0 auto !important;
  margin-right: 9px;
}

/* DEV-005：选料设置页「下拉选项」第 1 项的灰色提示（此选项将作为默认值自动显示） */
.zxtpl-opt-defhint {
  color: #94a3b8;
  font-size: 11px;
  margin-left: 8px;
  white-space: nowrap;
  flex: 0 0 auto;
}

/* DEV-005：下拉旁「★」按钮（点开可把任一选项设为默认 = 移到第一位） */
.zx-optstar-wrap { position: relative; display: flex; align-items: center; flex: 1 1 auto; min-width: 0; }
.zx-optstar-btn {
  margin-left: 5px;
  width: 22px; height: 22px; line-height: 1;
  padding: 0; flex: 0 0 auto;
  border: 1px solid #cbd5e1; border-radius: 6px;
  background: #f8fafc; color: #f59e0b;
  font-size: 12px; cursor: pointer;
}
.zx-optstar-btn:hover { background: #fef3c7; border-color: #f59e0b; }
.zx-optstar-btn:active { transform: translateY(1px); }

/* DEV-005：「★ 默认项」浮层（挂在 documentElement，层级高于弹窗/灯箱） */
.zx-optstar-menu {
  position: fixed; z-index: 9999;
  min-width: 160px; max-width: 300px; max-height: 260px; overflow: auto;
  background: #fff; border: 1px solid #d7dbe3; border-radius: 8px;
  box-shadow: 0 10px 28px rgba(15,23,42,.18); padding: 4px;
}
.zx-optstar-hd { font-size: 11px; color: #94a3b8; padding: 4px 8px 6px; }
.zx-optstar-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 8px; border-radius: 6px; cursor: pointer;
  font-size: 13px; color: #1e293b;
}
.zx-optstar-item:hover { background: #f1f5f9; }
.zx-optstar-item.active { background: #fff7e6; }
.zx-optstar-txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zx-optstar-ic { color: #cbd5e1; font-style: normal; flex: 0 0 auto; }
.zx-optstar-item:hover .zx-optstar-ic,
.zx-optstar-item.active .zx-optstar-ic { color: #f59e0b; }

/* ==================== V2.2.43：编程区「图片模块」按钮 UI 优化 ==================== */
/* 作用域：仅「编程环节 → 图片模块」标题行右上角的按钮组（.prog-photo-title > .prog-photo-btns）。
   只覆盖 .prog-photo-mini / .prog-photo-btns 两个专用类（全站仅此处使用），
   不触碰任何公共按钮类，其他页面/模块零影响。原规则保留在 5114 行，回退只需删掉本区块。 */
.prog-photo-btns { gap: 8px; }                         /* 按钮间距 8px（原 4px） */

.prog-photo-mini {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  height: 28px;                                        /* 与同卡片「⚙ 选料区设置」按钮同高，视觉协调 */
  min-width: 56px;                                     /* 最小宽度兜底：窄到「旋转」也能完整容纳 */
  padding: 0 10px;                                     /* 宽度随文字自适应（“旋转”2 字 / “更换图片”4 字） */
  font-size: 12px;                                     /* 9px → 12px：文字清晰可辨 */
  line-height: 1; font-weight: 600; letter-spacing: .2px;
  color: #334155;                                      /* 加深文字色（原 #475569 偏淡） */
  background: #f1f5f9;                                 /* 背景加深，与白卡片区分 */
  border: 1.5px solid #94a3b8;                         /* 边框加深（原 #cbd5e1 过浅） */
  border-radius: 6px;
  cursor: pointer; white-space: nowrap;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .06);
  transition: background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .1s ease;
}
.prog-photo-mini:hover {
  color: #fff; background: var(--primary, #1c5fd6); border-color: var(--primary, #1c5fd6);
  box-shadow: 0 2px 8px rgba(28, 95, 214, .30);
}
.prog-photo-mini:active { transform: translateY(1px); box-shadow: 0 1px 2px rgba(15, 23, 42, .12); }
.prog-photo-mini:focus-visible { outline: 2px solid var(--primary, #1c5fd6); outline-offset: 1px; }
.prog-photo-mini:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }

/* ==================== V2.2.48（DEV-010）：编程详情页「选料区」（新建料块入口） ==================== */
/* 作用域：仅编程详情页 renderBianchengStage 新插入的 .prog-pick-* 独立类。
   与造型 .zx-pick-* / 机加工 .mc-* / 装配 .tm-* 零共用；原页面/原规则零影响，回退只需删本区块。 */
.prog-pick-wrap { margin: 10px 0 2px; }
.prog-pick-title { font-size: 13px; font-weight: 700; color: #1e293b; margin: 0 0 6px; }
.prog-pick-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.prog-pick-sel {
  flex: 0 1 auto; min-width: 132px; height: 38px;
  padding: 0 10px; border: 1.5px solid #cbd5e1; border-radius: 8px;
  background: #fff; color: #1e293b; font-size: 14px; line-height: 1; cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.prog-pick-sel:hover { border-color: #94a3b8; }
.prog-pick-sel:focus { outline: none; border-color: var(--primary, #1c5fd6); box-shadow: 0 0 0 3px rgba(28, 95, 214, .16); }
.prog-pick-add {
  appearance: none; -webkit-appearance: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  flex: 0 0 auto; height: 38px; padding: 0 16px; border-radius: 8px;
  background: var(--primary, #1c5fd6); color: #fff;
  font-size: 14px; font-weight: 700; letter-spacing: .3px; line-height: 1; white-space: nowrap;
  box-shadow: 0 2px 8px rgba(28, 95, 214, .28);
  transition: background .15s ease, box-shadow .15s ease, transform .1s ease;
}
.prog-pick-add:hover { background: #1a54c0; box-shadow: 0 3px 12px rgba(28, 95, 214, .36); }
.prog-pick-add:active { transform: translateY(1px); box-shadow: 0 1px 4px rgba(28, 95, 214, .24); }
.prog-pick-add:focus-visible { outline: 2px solid var(--primary, #1c5fd6); outline-offset: 2px; }

/* 新建料块后短暂高亮描边（内侧 outline，不撑开布局；动画结束自动褪去） */
.zx-prog-card.prog-pick-flash { outline: 3px solid var(--primary, #1c5fd6); outline-offset: -3px; animation: progPickFlash .9s ease-out 2; }
@keyframes progPickFlash {
  0% { outline-color: rgba(28, 95, 214, .95); }
  100% { outline-color: rgba(28, 95, 214, .25); }
}

@media (max-width: 767px) {
  .prog-pick-bar { gap: 6px; }
  .prog-pick-sel { flex: 1 1 auto; min-width: 0; }
  .prog-pick-add { padding: 0 14px; }
}


/* ==================== V2.2.49（DEV-011·改动四）：编程详情页字段排版对齐（PC 风格） ====================
   作用域：仅「编程环节详情卡」——.st-biancheng 由 renderBianchengStage() 输出，编程页专属
   （机加工 .st-jichuang / 造型 .st-zaoxing / 发货 .st-fahuo / 员工视图均不含此类）→ 只覆盖编程页。
   .prog-fld* 是公共类（机加工/手工/铁模全复用），此处用后代选择器限定 .st-biancheng .zx-prog-card，
   其它页面原样不变。实现：CSS Grid —— 标签列固定宽（左对齐、长标签整行不半截换行），值列 1fr；
   输入框/下拉/多行 width:100% → 右边界成一条竖线；控件高度/圆角/间距统一。纯追加，原规则一行未改。 */
.st-biancheng .zx-prog-card .prog-fld {
  display: grid;
  /* 第3列固定 20px 专供「★」星标：无论该行有没有★都预留同宽 →
     所有输入框/下拉/多行的右边界严格落在同一条竖线上（★ 不挤占输入框宽度） */
  grid-template-columns: 88px minmax(0, 1fr) 20px;
  align-items: center;
  column-gap: 10px;
  row-gap: 0;
  min-width: 0;
  margin: 0;
  min-height: 36px;
  padding: 2px 0;
  box-sizing: border-box;
}
.st-biancheng .zx-prog-card .prog-fld > .prog-fld-name {
  grid-column: 1;
  justify-self: start;
  align-self: center;
  width: 88px;
  max-width: 88px;
  min-width: 0;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  line-height: 1.35;
  white-space: normal;      /* 长标签整行显示，不半截换行 */
  word-break: keep-all;
  overflow-wrap: normal;
}
/* 值列：所有非标签子项统一落在第 2 列（多行/文本控件右边界对齐成竖线） */
.st-biancheng .zx-prog-card .prog-fld > :not(.prog-fld-name):not(.zx-optstar-btn) {
  grid-column: 2;
  min-width: 0;
}
/* ★ 星标包裹层用 display:contents 透明化 → 下拉进第2列、★ 进第3列，
   避免★把下拉挤窄（否则带★的行输入框右边界会比别的行短一截） */
.st-biancheng .zx-prog-card .prog-fld .zx-optstar-wrap { display: contents; }
.st-biancheng .zx-prog-card .prog-fld .zx-optstar-wrap > select { grid-column: 2; min-width: 0; width: 100%; }
.st-biancheng .zx-prog-card .prog-fld .zx-optstar-btn {
  grid-column: 3;
  justify-self: center;
  align-self: center;
  width: 20px; height: 24px; padding: 0; line-height: 1;
  font-size: 14px; color: #b45309; background: #fff;
  border: 1px solid #f1e0bf; border-radius: 6px; cursor: pointer;
}
.st-biancheng .zx-prog-card .prog-fld .zx-optstar-btn:hover { background: #fdf6e8; border-color: #e0b866; }
.st-biancheng .zx-prog-card .prog-fld .prog-fld-val {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.5;
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
/* 控件统一口径：高度 / 圆角 / 内边距 / 字号一致；右边界对齐成竖线 */
.st-biancheng .zx-prog-card .prog-fld-input,
.st-biancheng .zx-prog-card .prog-fld-select {
  width: 100%;
  box-sizing: border-box;
  height: 34px;
  padding: 0 10px;
  font-size: 13px;
  line-height: 1;
  color: #1e293b;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.st-biancheng .zx-prog-card textarea.prog-fld-input {
  height: auto;
  min-height: 62px;
  padding: 6px 10px;
  line-height: 1.5;
  resize: vertical;
}
.st-biancheng .zx-prog-card .prog-fld-input:hover,
.st-biancheng .zx-prog-card .prog-fld-select:hover { border-color: #94a3b8; }
.st-biancheng .zx-prog-card .prog-fld-input:focus,
.st-biancheng .zx-prog-card .prog-fld-select:focus {
  outline: none;
  border-color: var(--primary, #1c5fd6);
  box-shadow: 0 0 0 3px rgba(28, 95, 214, .16);
}
/* 有图态新增的「✕ 删除图片」按钮：弱红区分于旋转/更换（不改原 .prog-photo-mini，仅编程页内叠加弱红） */
.st-biancheng .zx-prog-card .prog-photo-del { color: #b91c1c; border-color: #f1c4c4; }
.st-biancheng .zx-prog-card .prog-photo-del:hover { color: #fff; background: #dc2626; border-color: #dc2626; }
/* 手机端：卡片已全宽，标签列适当收窄；桌面（>600px）保持 88px 不变 */
@media (max-width: 600px) {
  .st-biancheng .zx-prog-card .prog-fld { grid-template-columns: 76px minmax(0, 1fr) 20px; column-gap: 8px; }
  .st-biancheng .zx-prog-card .prog-fld > .prog-fld-name { width: 76px; max-width: 76px; }
}

/* ==================== V2.2.50（DEV-012）：料块图片右下角「上料 / 下料」悬浮按钮（纯追加） ====================
   作用域：① .mc-mm-imgwrap —— 机床详情弹窗（mcShowMachine）的料块图容器
          ② .pt-blk-imgwrap —— 待加工料块卡（ptCardHtml）的料块图容器
   设计：图片容器 position:relative，按钮绝对定位到右下角；不改任何既有选择器（回退只需删本区块）。
   ⚠️ 层级：照片预览浮层 .modal-overlay.pt-photo-preview 已由既有规则钉在 9700（> .mc-modal-mask 9600），
      故从机床弹窗内点「下料」弹预览不会被盖住 —— 本区块不再动层级。 */
.mc-mm-imgwrap { position: relative; display: block; min-height: 96px; }
.mc-mm-imgwrap .mc-mm-img { margin-bottom: 12px; }
.pt-blk-imgwrap { position: relative; display: block; }
.pt-blk-imgwrap .pt-blk-photo { display: block; }

.mc-mm-img-act,
.pt-blk-img-act {
  position: absolute; right: 8px; bottom: 8px; z-index: 2;
  padding: 7px 16px; font-size: 13px; font-weight: 700; line-height: 1;
  color: #fff; background: var(--primary, #1c5fd6);
  border: none; border-radius: 9px; cursor: pointer; font-family: inherit;
  box-shadow: 0 2px 10px rgba(15, 23, 42, .35);
  -webkit-tap-highlight-color: transparent;
}
.mc-mm-img-act:hover,
.pt-blk-img-act:hover { background: #1749a8; }
.mc-mm-img-act:active,
.pt-blk-img-act:active { transform: translateY(1px); filter: brightness(.96); }
/* 待加工卡图像比例 4/3（aspect-ratio），按钮固定在图像右下角 → 与卡片底部留 8px 内边距 */
.pt-blk-imgwrap .pt-blk-photo { border-radius: 0; }

/* ==================== V2.2.51（DEV-012·改动二）：机加工「更改机床号 / 释放机床」（纯追加） ====================
   作用域：① .mc-mm-img-acts —— 机床详情弹窗（mcShowMachine）料块图右下角两按钮容器（下料 + 更改）
          ② .pt-unload-acts —— 该机床「其余加工中料块」紧凑行内的按钮组（下料 + 更改）
          ③ .pt-chg-* —— 「更改」二级菜单 / 机床选择器 / 确认框（自建浮层）
   ⚠️ 层级：②③ 均在「机床详情弹窗」.mc-modal-mask(9600) 之内发起 → 通用 .modal-overlay(200) 会被整个盖住；
      故一律给自己的类钉死 z-index:9700（> 9600，< 9999 顶层遮罩）。既有选择器一行未改，回退只需删本区块。 */
.mc-mm-imgwrap .mc-mm-img-acts {
  position: absolute; right: 8px; bottom: 8px; z-index: 2;
  display: flex; align-items: center; gap: 12px;      /* 12px：与「下料」拉开距离，防误触 */
}
.mc-mm-img-acts .mc-mm-img-act { position: static; right: auto; bottom: auto; }
/* 「更改」用中性灰蓝，与主色「下料」明确区分（避免误点） */
.mc-mm-img-act.mc-mm-img-chg { background: #475569; }
.mc-mm-img-act.mc-mm-img-chg:hover { background: #334155; }
/* 该机床其余料块的紧凑行：下料 + 更改 并排 */
.pt-unload-acts { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.pt-unload-chg { min-height: 44px; }

/* —— 「更改」二级菜单（上下两个按钮，垂直间距 ≥12px） —— */
.modal-overlay.pt-chg-menu { z-index: 9700; }
.pt-chg-menu-modal { max-width: 420px; }
.pt-chg-opt {
  display: block; width: 100%; text-align: left; cursor: pointer; font-family: inherit;
  min-height: 56px; padding: 14px 16px; border: 1.5px solid #cbd5e1; border-radius: 12px;
  background: #fff; -webkit-tap-highlight-color: transparent;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.pt-chg-opt + .pt-chg-opt { margin-top: 12px; }        /* ★ 手机防误触：两键垂直间距 12px */
.pt-chg-opt-t { display: block; font-size: 16px; font-weight: 700; color: #1e293b; line-height: 1.3; }
.pt-chg-opt-s { display: block; margin-top: 4px; font-size: 12px; color: #64748b; line-height: 1.5; }
.pt-chg-opt:hover { border-color: var(--primary, #1c5fd6); box-shadow: 0 0 0 3px rgba(28, 95, 214, .12); }
.pt-chg-opt:active { transform: translateY(1px); }
.pt-chg-opt-danger .pt-chg-opt-t { color: #d92d20; }
.pt-chg-opt-danger:hover { border-color: #d92d20; box-shadow: 0 0 0 3px rgba(217, 45, 32, .12); }

/* —— 机床选择器（带占用提示；允许选已占用，仅提示不拦截） —— */
.modal-overlay.pt-chg-pick { z-index: 9700; }
.pt-chg-pick-modal { max-width: 520px; }
.pt-chg-pick-tip { font-size: 13px; color: #64748b; line-height: 1.7; margin-bottom: 12px; }
.pt-chg-pick-hint { margin-top: 12px; min-height: 18px; font-size: 13px; font-weight: 700; color: var(--primary, #1c5fd6); }
.pt-chg-pick-hint.warn { color: #d92d20; }
#pt-chg-pick-grid .mc-mach-btn.busy { border-color: #f0a020; background: #fff7e6; color: #b45309; }
#pt-chg-pick-grid .mc-mach-btn.busy em { display: block; margin-top: 2px; font-size: 10px; font-style: normal; font-weight: 700; }
#pt-chg-pick-grid .mc-mach-btn.busy.active { background: var(--primary, #1c5fd6); border-color: var(--primary, #1c5fd6); color: #fff; }

/* —— 释放/更改确认框（沿用 .confirm-modal 外观，仅抬高层级） —— */
.modal-overlay.pt-chg-confirm { z-index: 9700; }

/* —— 详情页操作痕迹（更改机床号 / 释放机床） —— */
.mc-block-foot-detail .mc-fd-item.mc-fd-log { color: #7c3aed; }

@media (max-width: 767px) {
  .mc-mm-imgwrap .mc-mm-img-acts { gap: 10px; }
  .pt-chg-opt { min-height: 60px; }                     /* 手机端再加高，触控更稳 */
}

/* ==================== V2.2.53：机床详情弹窗「底部操作栏」（更改 + 下料）—— 纯追加 ====================
   作用域：只认本区块新类 .mc-mm-foot / .mc-mm-foot-btn / .mc-mm-foot-unload / .mc-mm-foot-chg，
           ★ 绝不触碰全站共用类 .btn-primary / .btn-outline / .modal-footer（多处页面在用）。
   定位：.mc-modal-card 已是 display:flex + flex-direction:column → 本 footer 作为其最后一个子元素，
         配合 margin-top:auto 即钉在弹窗最底部；上方 .mc-modal-body 独立滚动，二者绝对隔开。
   回退：删本区块 + 还原 app.js 的 mcShowMachine 两处标记即可（旧 .mc-mm-img-acts 规则一行未删）。
   ⚠️ 层级：本区块不动 z-index（footer 是普通流内元素，不开浮层）。 */
.mc-mm-foot {
  margin-top: auto;                       /* 内容不足时也压到弹窗底部 */
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;              /* 靠右对齐 */
  align-items: center;
  gap: 24px;                              /* ★「更改」与「下料」间距，拉开防误触 */
  padding: 16px 24px 24px;                /* 底部舒适留白，与上方内容隔开 */
  background: #fff;
  border-top: 1px solid var(--border-light, #f3f4f6);
}
.mc-mm-foot-btn {
  height: 36px; padding: 0 24px;
  font-size: 14px; font-weight: 600; font-family: inherit; line-height: 1;
  border-radius: 8px; cursor: pointer;
  transition: all .2s ease;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}
/* —— 主操作「下料」：系统主题色（藏青蓝，--primary #1a3a5c）+ 白字 + 无边框 + 轻微阴影 —— */
.mc-mm-foot-unload {
  color: #fff; border: none;
  background: linear-gradient(135deg, var(--primary, #1a3a5c) 0%, var(--primary-light, #2d5a8a) 100%);
  box-shadow: 0 2px 6px rgba(26, 58, 92, .28);
}
.mc-mm-foot-unload:hover {
  background: linear-gradient(135deg, var(--primary-dark, #12293f) 0%, var(--primary, #1a3a5c) 100%);
  box-shadow: 0 4px 12px rgba(26, 58, 92, .38);
  transform: translateY(-1px);            /* 上浮 1px */
}
.mc-mm-foot-unload:active { transform: translateY(0); box-shadow: 0 1px 4px rgba(26, 58, 92, .30); }
/* —— 次操作「更改」：极浅灰底 + 深灰字 + 浅灰细边框（弱化，与主操作明确区分） —— */
.mc-mm-foot-chg {
  background: #F4F5F7; color: #606266; border: 1px solid #DCDFE6;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .05);
}
.mc-mm-foot-chg:hover {
  background: #E4E7ED; color: #303133;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .08);
  transform: translateY(-1px);
}
.mc-mm-foot-chg:active { transform: translateY(0); background: #DCDFE6; }

/* 手机端：按钮加高到 44px（沿用本项目「手机触控 ≥44px」铁律），间距收到 16px 防窄屏溢出 */
@media (max-width: 767px) {
  .mc-mm-foot { gap: 16px; padding: 14px 16px 20px; }
  .mc-mm-foot-btn { height: 44px; padding: 0 20px; }
}

/* ==================== V2.2.77（补7）：机床详情弹窗「多块料 = 多张独立详情卡」 ====================
   结构：.mc-mm-blk（每块料一张完整卡：头部行 + 参考图 + 详情 5 行 + 卡内底部按钮组），多张上下排（body 原生滚动）。
   按钮组 .mc-mm-blk-foot：两端对齐 —— 「更改」最左、「下料」最右（用户指定布局）；按钮复用 .mc-mm-foot-btn 系列
   （含手机端 ≥44px 媒体查询，零重复定义）。作用域只认本区块新类 .mc-mm-blk / .mc-mm-blk-foot，不碰共用类。 */
.mc-mm-blk { border: 1px solid var(--border-light, #eef0f3); border-radius: 12px; padding: 12px; background: #fff; }
.mc-mm-blk + .mc-mm-blk { margin-top: 12px; }
.mc-mm-blk .mc-mm-imgwrap { margin-top: 8px; }
.mc-mm-blk .mc-mm-imgwrap .mc-mm-img { margin-bottom: 4px; }
.mc-mm-blk-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin-top: 12px; padding-top: 12px;
  border-top: 1px dashed var(--border-light, #f3f4f6);
}
@media (max-width: 767px) {
  .mc-mm-blk-foot { gap: 10px; }
  .mc-mm-blk-foot .mc-mm-foot-btn { flex: 1 1 0; padding: 0 10px; }   /* 手机端两按钮平分卡宽，触控面最大 */
}

/* ==================== V2.2.54（R5）：铁模装配「已完成（本人）」折叠区 ====================
   骨架复用既有 .completed-fold / .completed-toggle（零覆盖，一行未改），本区块只新增内部列表行样式（纯追加）。 */
.tm-asm-fold { margin-top: 12px; }
.tm-asm-list { display: flex; flex-direction: column; gap: 8px; padding: 10px 4px 4px; }
.tm-asm-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; border: 1px solid var(--border-light, #e8ecf1); border-radius: 8px;
  background: var(--card, #fff);
}
.tm-asm-l { min-width: 0; flex: 1 1 auto; }
.tm-asm-no { font-weight: 700; color: var(--success, #16a34a); }
.tm-asm-meta { font-size: 12px; color: var(--text-light, #8b93a1); margin-top: 2px; }
.tm-asm-r { display: flex; align-items: baseline; gap: 14px; flex: 0 0 auto; white-space: nowrap; }
.tm-asm-set { font-weight: 700; color: var(--text-primary, #1f2937); }
.tm-asm-pu { font-size: 12px; color: var(--text-light, #8b93a1); }
.tm-asm-amt { font-weight: 700; color: var(--primary, #1a3a5c); }
@media (max-width: 767px) {
  .tm-asm-row { flex-direction: column; align-items: flex-start; gap: 6px; }
  .tm-asm-r { gap: 10px; }
}

/* ==================== V2.2.55：铁模装配「UI 调整 + 交互补全」（纯追加，零覆盖既有规则） ====================
   ① .mc-bar-act    —— 长横条右侧「操作位」（铁模待办「开始装配」按钮右移；默认不传参 → 其他调用方零影响）
   ② .tm-bill-*     —— 装配对账单行（合计金额 / 今年已装配 / 每月统计 三处弹窗共用，含照片与尺寸）
   ③ 手机端适配     —— 点击区 ≥44px；弹窗沿用既有 .mc-modal-body 滚动（不改共用 .mc-modal-* 规则）
   ========================================================================================== */

/* ① 长横条右侧操作位：靠右、垂直居中、不参与压缩（窄屏也保证按钮可见可点） */
.mc-bar-act {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: flex-end;
  margin-left: 2px;
}
.mc-bar-act .tm-start-btn { padding: 9px 16px; font-size: 13px; border-radius: 10px; }
.mc-bar-act .zx-lock-tag { white-space: nowrap; }

/* ② 对账单：月份胶囊（每月统计弹窗内的「月份切换」） */
.tm-bill-chips {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 2px 0 10px; margin-bottom: 10px;
  border-bottom: 1px dashed var(--border-light, #e8ecf1);
}
.tm-bill-chip {
  appearance: none; cursor: pointer; font-family: inherit;
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 7px 12px; border-radius: 10px;
  border: 1px solid var(--border-light, #e8ecf1); background: #fff;
  color: var(--text-primary, #1f2937); font-size: 12px; font-weight: 700; line-height: 1.2;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.tm-bill-chip em { font-style: normal; font-size: 11px; font-weight: 600; color: var(--text-light, #8b93a1); }
.tm-bill-chip:hover { border-color: var(--primary, #1a3a5c); }
.tm-bill-chip.on { background: var(--primary, #1a3a5c); border-color: var(--primary, #1a3a5c); color: #fff; }
.tm-bill-chip.on em { color: rgba(255, 255, 255, .85); }

/* ② 对账单：合计行 */
.tm-bill-tot { font-size: 12px; color: var(--text-secondary, #6b7280); padding: 2px 2px 10px; }
.tm-bill-tot b { color: var(--primary, #1a3a5c); font-size: 14px; font-variant-numeric: tabular-nums; }

/* ② 对账单：明细行（日期 / 副数 / 金额 / 尺寸 / 外协单位 / 照片） */
.tm-bill-list { display: flex; flex-direction: column; gap: 8px; }
.tm-bill-row {
  display: flex; flex-direction: column; gap: 7px;
  padding: 10px 12px; border: 1px solid var(--border-light, #e8ecf1); border-radius: 10px;
  background: var(--card, #fff);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.tm-bill-row:hover { border-color: var(--primary, #1a3a5c); box-shadow: 0 3px 10px rgba(26, 58, 92, .10); }
.tm-bill-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.tm-bill-main { min-width: 0; flex: 1 1 auto; }
.tm-bill-no { font-size: 14px; font-weight: 700; color: var(--text-primary, #1f2937); }
.tm-bill-size {
  display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 6px;
  font-size: 11px; font-weight: 700; color: #0369a1; background: #e0f2fe;
  font-variant-numeric: tabular-nums;
}
.tm-bill-meta { font-size: 12px; color: var(--text-light, #8b93a1); margin-top: 3px; }
.tm-bill-r { display: flex; align-items: baseline; gap: 12px; flex: 0 0 auto; white-space: nowrap; }
.tm-bill-set { font-weight: 700; color: var(--text-primary, #1f2937); }
.tm-bill-pu { font-size: 12px; color: var(--text-light, #8b93a1); }
.tm-bill-amt { font-weight: 800; color: var(--primary, #1a3a5c); font-variant-numeric: tabular-nums; }
.tm-bill-photos { display: flex; flex-wrap: wrap; gap: 6px; }
.tm-bill-photo {
  width: 46px; height: 46px; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--border-light, #e8ecf1); cursor: zoom-in; background: #f8fafc;
}
.tm-bill-nophoto { font-size: 12px; color: var(--text-light, #8b93a1); }

/* ② 已完成区改长横条后：条与条之间的间距（.tm-asm-list 骨架复用，此处仅收紧间距） */
.tm-asm-list { gap: 10px; }

/* ③ 手机端：点击区放大到 ≥44px（沿用本项目「手机触控 ≥44px」铁律） */
@media (max-width: 767px) {
  .mc-bar-act .tm-start-btn { padding: 11px 14px; font-size: 13px; min-height: 44px; }
  .tm-bill-chip { padding: 9px 12px; min-height: 44px; justify-content: center; }
  .tm-bill-photo { width: 52px; height: 52px; }
  .tm-bill-row { padding: 10px; }
  .tm-bill-top { flex-direction: column; gap: 4px; }
  .tm-bill-r { gap: 10px; }
}

/* ==================== V2.2.57：机加工料块弹窗「分类统一三大类 + 卡片加宽变短」（纯追加） ==================== */
/* 背景：机加工页(.pt) 与数据汇总页(.ds) 的料块卡原图 4/3 → 卡片偏高；弹窗宽 560px → 两列每卡仅 ~264px。
   本段把两页统一为「铝模 / 铁模 / 修模小件」三大类（JS 侧单一数据源 MC_CATS3），并加宽弹窗、收扁图片：
   ① 电脑端弹窗 560 → 660px（每卡约 320px，协调不夸张）
   ② 图片 4/3 → 16/10（卡片更宽更短）
   ③ 手机端趋满屏（mask 内边距 18 → 8px）+ 内距收紧 + chip 字号微缩防挤压
   ★ 全部为「覆盖式追加」，不改原行 → 回退 = 删掉本段（.pt-blk-photo/.ds-blk-photo 原 4/3 自动复原）。 */

/* ① 卡片图片收扁：4/3（高=75%宽）→ 16/10（高=62.5%宽）→ 卡片更宽更短（两页同款） */
.ds-blk-photo { aspect-ratio: 16 / 10; }
.pt-blk-photo { aspect-ratio: 16 / 10; }

/* ② 机加工料块弹窗加宽（原 .mc-modal-card.pt-blk-shell = 560px） */
.mc-modal-card.pt-blk-shell { max-width: 660px; }

/* ③ 筛选栏 4 个 chip（全部 + 三大类）：等宽不改（仍 flex:1 1 0），只防折行、微收间距 */
.pt-blk-filter { gap: 6px; }
.pt-chip { white-space: nowrap; }

/* ④ 手机端：弹窗趋满屏 + 内距收紧 → 卡片更宽更短（:has 精确限定，只影响料块弹窗） */
@media (max-width: 767px) {
  .mc-modal-mask:has(> .mc-modal-card.pt-blk-shell),
  .mc-modal-mask:has(.ds-blk-body) { padding: 8px; }
  .mc-modal-card.pt-blk-shell { max-width: 100%; }
  .pt-blk-body { padding: 8px 8px; }
  .ds-blk-body { padding: 8px 8px 10px; }
  .pt-blk-grid, .ds-blk-grid { gap: 6px; }
  .pt-blk-info { padding: 6px 7px 5px; }
  .ds-blk-card { padding: 7px; gap: 5px; }
  .pt-chip { font-size: 11.5px; }
  .ds-chip { padding: 5px 9px; }
}

/* ==================== V2.2.58：造型/编程「选料区」样式统一 + 机加工机床长条 3 列 ====================
   ① 造型「选料区」按钮：原蓝色渐变实底（太突兀）→ 浅色/边框风格（白底 + 主色边框 + 主色字）；
      选中「工艺造型通道」→ .active 主色实底高亮；未选通道 / 「产品造型」→ :disabled 灰化。
   ② 编程「选料区」直接复用 .zx-pick-* 全套（按钮/面板/分类项）→ 与造型 100% 同款，零新增样式类。
   ③ .mc-mach-bar 桌面端 4 列 → 3 列（与数据汇总 .ds-mach-bar 一致；手机端本就 3 列，V2.2.38）。
   ⚠️ 本区块全部为【追加覆盖】—— 既有 .zx-pick-btn（渐变实底）与 .mc-mach-bar（4 列）
      原规则**一字未删**，回退只需删除本区块即可完整还原。
   ⚠️ 只覆盖颜色/边框/阴影，**不重复声明 height / padding / font-size / width** ——
      避免压掉手机端媒体查询里的 .zx-pick-btn { width:100%; height:44px }（媒体查询不提升优先级，靠源码顺序决胜）。 */
.zx-pick-btn {
  color: var(--primary, #2563eb);
  background: #fff;
  border: 1px solid var(--primary, #2563eb);
  box-shadow: none;
}
.zx-pick-btn:hover {
  background: #eef4ff;
  box-shadow: none;
}
.zx-pick-btn.active {
  color: var(--primary, #2563eb);
  background: #eef4ff;
  box-shadow: 0 0 0 3px rgba(26, 58, 92, .12);
}
.zx-pick-btn.active:hover { background: #e0edff; }
.zx-pick-btn:disabled {
  color: #9ca3af;
  background: #f3f4f6;
  border-color: #e5e7eb;
  box-shadow: none;
  opacity: .85;
}
.zx-pick-btn:disabled:hover { background: #f3f4f6; box-shadow: none; }
.zx-pick-btn:disabled::after { opacity: .55; }

/* 机加工个人首页「机床状态」长条：一排 4 → 3（自适应换行，与数据汇总页一致）。
   本类仅机加工员工「进度跟踪」页的 mcMachineBoardHtml 使用（全站唯一渲染点），
   数据汇总页用的是 .ds-mach-bar（本就是 3 列），两者互不影响。 */
.mc-mach-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ==================== V2.2.60：数据汇总页「工序流程」看板（纯追加） ====================
   作用域：仅 .ds-wrap 内的新类（ds-flow-* / ds-stagebar* / ds-stagefocus-*），不触碰任何既有规则。
   工序色一律由 JS 行内 --sc 传入（取 STAGE_META，非 STAGE_CELL_COLORS）；浅底色用 6 个 ds-flow-k-* 类写死，避免 color-mix 兼容问题。 */
/* 一、流程排布（V2.2.61：容器 100% 撑满 + 六卡等宽）：造型→编程→机加工 ─┬─ 铁模装配 ─┬─ 发货
                                                                           └─ 手工      ┘
   【配比 3.2 : 1 : 1】桌面端「分支」是「铁模装配/手工」上下两卡的竖列 → 列宽 = 1 张卡宽；
   「主线」3 卡横排 + 2 个箭头，「发货」1 卡。主线的两个箭头要吃掉 2×22px，
   故主线系数取 3.2（= 3 + 2×22 ÷ 单卡约 220）→ **六卡实测等宽**（实测极差 < 1px）；
   若写 3:1:1，主卡会比其余 4 卡**窄约 15px**（箭头宽度挤占）；写 3:2:1 则分支卡变成 2 倍宽。
   ⚠️ 手机端箭头整体隐藏 → 配比回到精确 3:2:1（见文件末尾 @media）。 */
.ds-flow-sec .ds-flow { display: flex; align-items: center; gap: 0; width: 100%; min-width: 0; padding: 2px 0 4px; }
.ds-flow-main { display: flex; align-items: center; flex: 3.2 1 0; min-width: 0; }
.ds-flow-branch { display: flex; flex-direction: column; justify-content: space-between; gap: 12px; flex: 1 1 0; min-width: 0; }
.ds-flow-ship { display: flex; align-items: center; flex: 1 1 0; min-width: 0; }
/* 二、卡片（V2.2.61：配色统一到数据汇总页「机加工区」机床色；flex 撑满；min-height 保比例）
   边框 / 强调色 / 数字 = 机床「加工中」深蓝灰 #5C6B7A；底色 = 极浅灰；工序名 = 近黑保对比。 */
.ds-flow-card {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; padding: 10px 8px;
  flex: 1 1 0; min-width: 0; min-height: 74px;
  border: 1.5px solid #5C6B7A;
  border-radius: 12px;
  background: #f7f9fc;
  color: #5C6B7A;
  font-family: inherit; cursor: pointer; text-align: center; -webkit-tap-highlight-color: transparent;
  transition: box-shadow .15s, transform .08s;
}
.ds-flow-ship .ds-flow-card { flex: 1 1 auto; }   /* 发货区只有 1 卡 → 撑满该区 */
.ds-flow-card:hover { box-shadow: 0 2px 10px rgba(92, 107, 122, .22); }
.ds-flow-card:active { transform: scale(.97); }
/* V2.2.65：「可点击」未勾 → 卡片灰色、无悬停/按下反馈。
   ⚠️ 只靠样式不算数 —— dsStageGoto() 函数入口另有守卫（点了完全没反应，不弹提示）。 */
.ds-flow-card.ds-flow-off {
  background: #eef1f5; border-color: #c7ced8; color: #9aa4b2;
  cursor: default; filter: saturate(.2);
}
.ds-flow-card.ds-flow-off:hover { box-shadow: none; }
.ds-flow-card.ds-flow-off:active { transform: none; }
.ds-flow-card.ds-flow-off .ds-flow-name,
.ds-flow-card.ds-flow-off .ds-flow-num,
.ds-flow-card.ds-flow-off .ds-flow-sub { color: #9aa4b2; }
.ds-flow-name { font-size: 12px; font-weight: 700; line-height: 1.2; color: #2b3440; }
.ds-flow-num { font-size: 21px; font-weight: 800; line-height: 1.1; color: #5C6B7A; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ds-flow-num em { font-style: normal; font-size: 13px; font-weight: 600; opacity: .72; }
/* V2.2.70：铁模装配卡「待 X / 派 Y」的第二段数字略加重，与「待」区分 */
.ds-flow-num .ds-em-asg { font-weight: 800; opacity: .85; }
.ds-flow-sub { font-size: 10px; opacity: .68; line-height: 1.2; color: #5C6B7A; }
.ds-flow-badge { position: absolute; top: 3px; right: 7px; font-size: 11px; font-weight: 700; line-height: 1; }
/* V2.2.61：废弃原六工序浅底色（.ds-flow-k-zx/-prog/-mc/-asm/-manual/-ship 六色已整体移除），
   卡片底色统一由上面的 .ds-flow-card{background:#f7f9fc} 一处决定 —— 风格对齐机加工区。
   JS 仍会输出 ds-flow-k-* 类名与 --sc 变量，但已无任何样式引用（零视觉影响，便于一键回退）。 */
/* 三、连接线：直箭头 → / 分叉 ┬ / 汇合 ┴ */
.ds-flow-arrow { position: relative; flex: 0 0 auto; width: 22px; height: 2px; background: #5C6B7A; }
.ds-flow-arrow::after {
  content: ''; position: absolute; right: -1px; top: 50%; transform: translateY(-50%);
  border-left: 6px solid #5C6B7A; border-top: 4px solid transparent; border-bottom: 4px solid transparent;
}
.ds-flow-fork, .ds-flow-merge { position: relative; flex: 0 0 auto; width: 34px; align-self: stretch; min-height: 80px; }
.fork-line { position: absolute; left: 0; top: 25%; bottom: 25%; width: 2px; background: #5C6B7A; }
.fork-top, .fork-bot { position: absolute; left: 0; right: 0; height: 2px; background: #5C6B7A; }
.fork-top { top: 25%; }
.fork-bot { bottom: 25%; }
.fork-top::after, .fork-bot::after {
  content: ''; position: absolute; right: -1px; top: 50%; transform: translateY(-50%);
  border-left: 6px solid #5C6B7A; border-top: 4px solid transparent; border-bottom: 4px solid transparent;
}
/* 四、进度条区（紧凑，V2.2.61 满宽）：工序名（定宽右对齐）+ 待做/进行中 + 条
   条底 = 机床「待机」色 #B8BEC8（浅中灰）；填充 = 机床「加工中」色 #5C6B7A（由 JS 行内写入）；条高 20px 圆角。 */
.ds-stagebars { display: block; width: 100%; }
.ds-stagebar { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.ds-stagebar.ds-bar-row { margin-bottom: 8px; }
.ds-stagebar .ds-stagebar-label { flex: 0 0 76px; text-align: right; font-size: 13px; font-weight: 600; color: var(--text-secondary); white-space: nowrap; }
.ds-stagebar-num { flex: 0 0 82px; text-align: right; font-size: 13px; font-weight: 700; color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ds-stagebar-sep { opacity: .45; font-weight: 500; }
.ds-stagebar-track { flex: 1 1 auto; min-width: 0; height: 20px; background: #B8BEC8; border-radius: 10px; overflow: hidden; }
.ds-stagebar-fill { display: block; height: 100%; background: #5C6B7A; border-radius: 10px; transition: width .3s ease; }
/* 五、工序聚焦提示条（进度跟踪页） */
.ds-stagefocus-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ds-stagefocus-x {
  flex: 0 0 auto; border: 1px solid var(--border); background: var(--card); border-radius: 999px;
  padding: 3px 12px; font-size: 12px; font-family: inherit; color: var(--text-secondary); cursor: pointer;
}
.ds-stagefocus-x:active { transform: scale(.96); }
/* 六、手机端（≤768px）V2.2.61：6 张流程卡**必须一行横排**、等比缩放塞满屏宽（不竖排、不横滑）；
   进度条每行 100% 满宽。
   做法：把「主线 / 分支 / 发货」三个分组用 display:contents 打散 → 6 张卡成为 .ds-flow 的直接子项，
   各 flex:1 1 0 + .ds-flow 的 gap → **严格等宽**（不再受分组配比影响）。
   ⚠️ 兼容：display:contents 需 Chrome/Edge 65+、Safari 11.1+、Firefox 37+（现代手机均满足）；
      若不支持则自动回落到分组 flex（仍是一行、仍不横滑，仅宽度略有差异）。 */
@media (max-width: 768px) {
  .ds-flow-sec .ds-flow { flex-wrap: nowrap; align-items: stretch; gap: 4px; padding: 2px 0; }
  .ds-flow-main, .ds-flow-branch, .ds-flow-ship { display: contents; }
  /* 连接线在手机端整体隐藏 —— 一行内 6 卡优先保宽度（否则线宽会把卡挤到不可读） */
  .ds-flow-arrow, .ds-flow-fork, .ds-flow-merge { display: none; }
  .ds-flow-card {
    padding: 5px 2px; gap: 1px; min-height: 52px; flex: 1 1 0; min-width: 0;
    border-width: 1px; border-radius: 8px;
  }
  /* ⚠️ 必须覆写桌面端的 `.ds-flow-ship .ds-flow-card{flex:1 1 auto}`（auto 会按内容宽 → 发货卡比其余宽 20px） */
  .ds-flow-ship .ds-flow-card { flex: 1 1 0; }
  /* 等比缩放：字号随屏宽走（390px 屏 ≈ 工序名 10px / 数字 15px；360px 屏 ≈ 9.4 / 14） */
  .ds-flow-name { font-size: clamp(9px, 2.6vw, 12px); line-height: 1.15; }
  .ds-flow-num { font-size: clamp(12px, 3.9vw, 21px); line-height: 1.1; }
  .ds-flow-num em { display: none; }        /* V2.2.61 手机端「数字精简」：只留待做数，隐藏「/ 分母」 */
  /* V2.2.70：白名单例外 —— 铁模装配卡的「派:Y」是**独立信息**（不是分母），必须留着，
     否则手机端只剩「待:X」→ 已派工数看不见。同理 .ds-flow-sub 也保持隐藏（空间不够）。 */
  .ds-flow-num em.ds-em-keep { display: inline; }
  .ds-flow-sub { display: none; }
  .ds-stagebar .ds-stagebar-label { flex: 0 0 62px; font-size: 12px; }
  .ds-stagebar-num { flex: 0 0 68px; font-size: 12px; }
  .ds-stagebar-track { height: 18px; }
}

/* ==================== V2.2.77（补8）：员工绩效看板（数据汇总页 · 仅管理员） ==================== */
/* 骨架完全复用「工序进度条」(.ds-stagebar)，只追加岗位配色 / 分组头 / 堆叠总条 / 明细表 */
.ds-perf .ds-sec-title { display: flex; align-items: baseline; gap: 8px; }
.ds-perf-day { font-size: 12px; font-weight: 500; color: var(--text-light); font-style: normal; }
/* 顶部总条：一条 track 内按岗位占比分段堆叠（配色区分岗位） */
.ds-perf-total { margin-bottom: 6px; }
.ds-perf-track-stack { display: flex; background: #B8BEC8; }
.ds-perf-seg { display: block; height: 100%; transition: width .3s ease; }
.ds-perf-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 12px 88px; font-size: 12px; color: var(--text-secondary); }
.ds-perf-lg { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.ds-perf-lg i { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 auto; }
.ds-perf-lg b { color: var(--text); font-variant-numeric: tabular-nums; }
/* 岗位分组：图标 + 名称 + 今日小计 */
.ds-perf-sec { margin: 12px 0 0; padding: 10px 12px 12px; background: var(--bg-secondary, #f7f8fa); border-radius: 10px; }
.ds-perf-head { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.ds-perf-ico { font-size: 15px; line-height: 1; }
.ds-perf-head em { font-size: 11px; font-weight: 500; color: var(--text-light); font-style: normal; margin-left: auto; }
/* 每人一行：可点（整行 = 点击区域，手机端够大） */
.ds-perf-bar { cursor: pointer; border-radius: 6px; padding: 2px 4px; margin: 0 -4px 4px; transition: background .15s ease; }
.ds-perf-bar:hover { background: rgba(0, 0, 0, .045); }
.ds-perf-bar:active { background: rgba(0, 0, 0, .08); }
.ds-perf-name { overflow: hidden; text-overflow: ellipsis; }
.ds-perf-none { font-size: 12px; color: var(--text-light); padding: 4px 0; }
/* 补12：绩效行走廊的姓名+岗位列加宽，避免「（造型）」被截断成「（造…）」 */
.ds-perf-bar .ds-stagebar-label { flex: 0 0 104px; }
.ds-perf-note { margin-top: 8px; font-size: 11px; line-height: 1.6; color: var(--text-light); }
.ds-perf-note u { text-decoration-color: var(--text-light); }
/* V2.2.77（补12）：分区压缩看板 —— 按岗位分区卡片（浅底=岗位主色 10%、左侧主色描边） */
.ds-perf-zone { margin: 12px 0 0; padding: 10px 12px 12px; border-radius: 10px; border-left: 4px solid #ccc; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.ds-perf-zone-head { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.ds-perf-zone-head .ds-perf-ico { font-size: 18px; }
.ds-perf-zone-head em { margin-left: auto; font-style: normal; font-weight: 500; font-size: 12px; color: var(--text-light); }
.ds-perf-role { font-weight: 400; font-size: 12px; color: var(--text-light); }
.ds-perf-tags { display: inline-flex; gap: 4px; margin-left: 6px; vertical-align: middle; flex-wrap: wrap; }
.ds-perf-tag { display: inline-block; font-size: 11px; line-height: 16px; padding: 0 6px; border: 1px solid; border-radius: 10px; cursor: pointer; white-space: nowrap; background: rgba(255,255,255,.6); }
.ds-perf-tag:hover { filter: brightness(.96); }
.ds-perf-zone-zero { margin-top: 6px; font-size: 12px; color: var(--text-light); cursor: pointer; user-select: none; }
.ds-perf-zone-zero-h { display: inline-block; padding: 4px 0; }
.ds-perf-zone-zero-list { padding: 4px 0 0 4px; }
.ds-perf-zone-zero-row { padding: 2px 0; color: var(--text-light); }
.ds-perf-outsource { margin: 8px 0 0; padding: 8px 10px 10px; border-radius: 9px; background: rgba(155,89,182,.07); border-left: 4px solid #9b59b6; }
.ds-perf-outsource .ds-perf-zone-head { color: #9b59b6; }
.ds-perf-outsource-tag { display: inline-block; margin-left: 6px; font-size: 11px; line-height: 16px; padding: 0 6px; border-radius: 10px; background: #888; color: #fff; font-weight: 500; }
.ds-perf-outsource-list { margin-top: 6px; display: flex; flex-direction: column; gap: 6px; }
.ds-perf-outsource-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: #fff; border: 1px solid rgba(155,89,182,.25); border-radius: 8px; }
.ds-perf-outsource-thumbs { display: flex; flex-wrap: wrap; gap: 4px; flex-shrink: 0; align-items: center; max-width: 210px; }
.ds-perf-outsource-thumb { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; cursor: pointer; background: #eee; }
.ds-perf-outsource-thumb-empty { display: inline-flex; align-items: center; justify-content: center; font-size: 18px; color: #bbb; border: 1px dashed #ccc; }
.ds-perf-outsource-sub { font-size: 10px; color: var(--text-light); margin-left: 5px; font-weight: 400; }
@media (max-width: 640px) {
  .ds-perf-outsource-thumbs { max-width: 150px; }
  .ds-perf-outsource-thumb { width: 34px; height: 34px; }
}
.ds-perf-outsource-info { flex: 1; min-width: 0; }
.ds-perf-outsource-mold { font-weight: 600; color: var(--text-primary); font-size: 13px; }
.ds-perf-outsource-prod { font-weight: 400; color: var(--text-light); margin-left: 4px; }
.ds-perf-outsource-meta { font-size: 11px; color: var(--text-light); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) {
  .ds-perf-zone { padding: 10px; }
  .ds-perf-bar { min-height: 46px; padding: 4px; margin: 0 -4px 2px; }
  .ds-perf-zone-head { font-size: 14px; }
  .ds-perf-tag { line-height: 18px; }
}
/* 明细弹窗表格 */
.ds-perf-tbl { width: 100%; font-size: 12px; }
.ds-perf-tbl th, .ds-perf-tbl td { padding: 7px 8px; vertical-align: top; }
.ds-perf-sub { font-size: 11px; color: var(--text-light); margin-top: 2px; }
@media (max-width: 767px) {
  /* 手机端：进度条全宽、点击区 ≥44px、图例换行且左对齐 */
  .ds-perf-legend { margin-left: 0; gap: 4px 12px; }
  .ds-perf-sec { padding: 10px; }
  .ds-perf-bar { min-height: 44px; padding: 4px; margin: 0 -4px 2px; }
  .ds-perf-bar .ds-stagebar-label { flex: 0 0 86px; text-align: left; }
  .ds-perf-tbl th, .ds-perf-tbl td { padding: 6px 5px; font-size: 11px; }
}

/* ==================== V2.2.65：铁模装配「派工分配页」 + 人员面板「D. 数据汇总分区」 ==================== */
/* 一、分配页头部：标题 + 统计栏（今日 / 本月派工副数） */
.tm-asg-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.tm-asg-title { font-size: 15px; font-weight: 700; color: var(--text); }
.tm-asg-view { font-size: 12px; font-weight: 400; color: var(--text-light); margin-left: 6px; }
.tm-asg-stats { font-size: 13px; color: var(--text-secondary); }
.tm-asg-stats b { color: var(--primary); font-size: 15px; }
.tm-asg-sep { margin: 0 8px; opacity: .5; }
/* 二、三卡（待装配 / 已派工 / 已完成）—— 点击切换下方列表 */
.tm-asg-cards { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.tm-asg-card {
  flex: 1 1 0; min-width: 108px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 12px 10px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--card);
  font-family: inherit; cursor: pointer; transition: box-shadow .15s, transform .08s;
}
.tm-asg-card:hover { box-shadow: 0 2px 10px rgba(92, 107, 122, .18); }
.tm-asg-card:active { transform: scale(.97); }
.tm-asg-card.active { border-color: var(--primary); background: #eef4fb; }
.tm-asg-ico { font-size: 18px; line-height: 1; }
.tm-asg-num { font-size: 22px; font-weight: 800; color: var(--primary); line-height: 1.1; font-variant-numeric: tabular-nums; }
.tm-asg-label { font-size: 12px; color: var(--text-secondary); }
/* 三、列表内标签 / 操作列 */
.tm-asg-ops { white-space: nowrap; text-align: center; }
.tm-asg-ops .btn + .btn { margin-left: 6px; }
.tm-asg-tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; background: #e8eef6; color: #35506b; }
.tm-asg-tag-pend { background: #fdf1dd; color: #b45309; }
.tm-asg-tag-done { background: #e6f4ee; color: #14735a; }

/* ==================== V2.2.73 铁模装配两子区（待装配全池口径，专属类不动共用类） ==================== */
.tm-asg-tag-block { background: #f3f4f6; color: #9ca3af; }                  /* 「机床加工未完成」灰标 */
.tm-block-hint { margin: 0 0 8px; padding: 8px 12px; border-radius: 8px; background: #f9fafb; border: 1px dashed #d1d5db; font-size: 12px; color: #6b7280; }
.ds-asm-subhead { margin: 12px 0 8px; padding: 8px 12px; border-radius: 8px; background: #f0fdf4; border: 1px solid #bbf7d0; font-weight: 700; font-size: 13px; color: #166534; }
.ds-asm-subhead.ds-asm-wait { background: #f3f4f6; border: 1px solid #e5e7eb; color: #6b7280; }
.ds-asm-note-top { margin: 0 0 8px; font-size: 12px; color: #9ca3af; }
.tm-asg-tag-out { background: #f1ecfb; color: #573fa8; }
/* 四、派工弹窗 */
.tm-asg-pick { display: flex; flex-direction: column; gap: 6px; max-height: 46vh; overflow-y: auto; padding-right: 4px; }
.tm-asg-opt { display: flex; align-items: center; gap: 6px; width: 100%; padding: 6px 8px; border-radius: 8px; }
.tm-asg-opt:hover { background: #f5f7fa; }
.tm-asg-opt > span:first-of-type { flex: 1 1 auto; }
.tm-asg-cnt { font-size: 12px; color: var(--text-light); }
.tm-asg-hint { margin-left: 6px; font-size: 11px; font-style: normal; color: var(--primary); background: #e8eef6; border-radius: 999px; padding: 0 6px; }
.tm-asg-opt-other .tm-asg-name { flex: 1 1 auto; min-width: 120px; }
.tm-asg-hist { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; color: var(--text-light); }
/* 五、人员面板「D. 数据汇总分区」工序行 */
.tm-sum-grid { margin-top: 6px; display: flex; flex-direction: column; gap: 4px; }
.tm-sum-row { display: flex; align-items: center; gap: 14px; padding: 3px 2px; }
.tm-sum-name { flex: 0 0 76px; font-size: 13px; color: var(--text-secondary); }
/* 六、V2.2.67 铁模装配二期：模具缩略图 + 派工弹窗顶部模具预览 */
.tm-thumb { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; display: inline-block; vertical-align: middle; background: #f1f3f6; border: 1px solid var(--border); }
.tm-thumb-none { display: inline-flex; align-items: center; justify-content: center; font-size: 18px; line-height: 1; color: #b8bfc9; }
.tm-asg-preview { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin-bottom: 12px; border-radius: 10px; background: #f6f8fb; border: 1px solid var(--border); }
.tm-asg-preview-img { flex: 0 0 auto; }
.tm-asg-preview-img .tm-thumb { width: 56px; height: 56px; border-radius: 10px; }
.tm-asg-preview-meta { flex: 1 1 auto; min-width: 0; }
.tm-asg-preview-no { font-size: 15px; font-weight: 700; color: var(--text); }
.tm-asg-preview-name { margin-top: 2px; font-size: 13px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-asg-preview-sets { margin-top: 4px; font-size: 13px; color: var(--text-secondary); }
.tm-asg-preview-sets b { color: var(--primary); }
.tm-asg-preview-size { margin-left: 10px; font-size: 12px; color: var(--text-light); }
@media (max-width: 767px) {
  .tm-asg-card { min-width: 84px; padding: 9px 6px; }
  .tm-asg-num { font-size: 18px; }
  .tm-asg-ops { white-space: normal; }
  .tm-sum-name { flex: 0 0 62px; font-size: 12px; }
  .tm-thumb { width: 34px; height: 34px; border-radius: 7px; }
  .tm-asg-preview-img .tm-thumb { width: 48px; height: 48px; }
}

/* ==================== V2.2.71：工序互转「转派」按钮（专属类，不复用公共类 · 铁律 30） ==================== */
/* 挂在 .stage-card 头部的按钮行里（与「⚙ 选料区设置」同级），仅 admin/manager 且独立开关打开时渲染 */
.transfer-btn {
  display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px;
  font-size: 12px; font-weight: 700; color: #7c3aed; background: #f5f3ff;
  border: 1.5px solid #ddd6fe; border-radius: 8px; cursor: pointer; transition: all .15s ease;
}
.transfer-btn:hover { border-color: #7c3aed; color: #fff; background: #7c3aed; }
.transfer-btn:active { transform: translateY(1px); }
/* 手机端：与齿轮按钮同字号档，不撑破工序头部 */
@media (max-width: 768px) {
  .transfer-btn { height: 26px; padding: 0 8px; font-size: 11px; }
}

/* ==================== V2.2.72 造型待做分区卡片视图（六分区，专属类，不动共用类） ==================== */
.zx-zone { margin-bottom: 10px; }
.zx-zone-head {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  background: #fff; border: 1px solid var(--border-color, #e5e7eb); border-radius: 10px;
  cursor: pointer; user-select: none; transition: border-color .15s;
}
.zx-zone-head:hover { border-color: #a78bfa; }
.zx-regrec-head {
  background: var(--gradient-primary);
  border: 1px solid var(--primary-dark);
  color: #fff;
  border-radius: 10px;
  padding: 8px 14px;
}
.zx-regrec-head:hover { border-color: var(--primary-light); }
.zx-regrec-head .zx-zone-caret { color: #fff; }
.zx-regrec-head .zx-zone-title { color: #fff; }
.zx-regrec-head .zx-zone-title em { color: rgba(255,255,255,0.82); font-style: normal; font-weight: 600; }
.zx-zone-caret { display: inline-block; transition: transform .15s; color: #9ca3af; font-size: 12px; }
.zx-zone-caret.open { transform: rotate(90deg); }
.zx-zone-title { font-weight: 700; font-size: 14px; color: var(--text-color, #1f2937); }
.zx-zone-title em { font-style: normal; font-weight: 600; color: #6b7280; font-size: 13px; }
.zx-zone-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px; margin-top: 10px;
}
.zx-zone-card {
  position: relative; background: #fff; border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 12px; overflow: hidden; cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.zx-zone-card:hover { border-color: #7c3aed; box-shadow: 0 2px 8px rgba(124, 58, 237, .12); }
/* ★ V4.3.7 最终版：手工模「到手工第几天」标签（编号右侧行内 span，非绝对定位；颜色统一 #6B8EAE，字号同编号 14px） */
.sg-mc-day {
  display: inline-block;
  font-size: 14px; font-weight: 500; color: #6B8EAE;
  white-space: nowrap;
}
.zx-zone-overdue { border-color: #fecaca; }
.zx-zone-img { height: 150px; background: #f3f4f6; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.zx-zone-img img { width: 100%; height: auto; aspect-ratio: auto; object-fit: contain; display: block; }
.zx-zone-img-empty i { font-size: 30px; color: #d1d5db; }
.zx-zone-urgent-tag {
  position: absolute; top: 8px; right: 8px; background: #dc2626; color: #fff;
  font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}
.zx-zone-body { padding: 10px 12px 12px; }
.zx-zone-no { font-weight: 700; font-size: 14px; color: var(--text-color, #1f2937); }
.zx-zone-name { color: #6b7280; font-size: 12px; margin: 2px 0 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zx-cd { font-size: 12px; font-weight: 600; display: inline-block; }
.zx-cd-danger { color: #dc2626; }
.zx-cd-warn { color: #ea580c; }
.zx-cd-ok { color: #6b7280; }
.zx-cd-none { color: #9ca3af; }
.zx-zone-act { margin-top: 8px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-height: 30px; }
.zx-zone-doing {
  display: inline-block; padding: 4px 10px; border-radius: 6px; background: #f3f4f6;
  color: #9ca3af; font-size: 12px; cursor: default;
}
.zx-zone-start { height: 28px; }
/* 窄屏（≤768px，含 iPhone SE 375px）：分区卡片一排 2 个、缩间距缩图高，防溢出不变形 */
@media (max-width: 768px) {
  .zx-zone-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .zx-zone-img { height: 90px; }
  .zx-zone-body { padding: 10px; }
  .zx-zone-no { font-size: 13px; }
  .zx-zone-start { font-size: 13px; height: 28px; }
  .zx-zone-doing { font-size: 12px; padding: 3px 8px; }
  .zx-zone-urgent-tag { font-size: 11px; top: 6px; right: 6px; padding: 1px 7px; }
}

/* V2.2.74：机加工同机床重叠均摊标记（⚖ 均·N / ⚖ 均摊）—— 跟随用时文案的小灰标，悬停出说明 */
.mc-adj-badge {
  display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 999px;
  font-size: 11px; line-height: 16px; background: #eef2f7; color: #6b7a90;
  cursor: help; vertical-align: middle; white-space: nowrap;
}
@media (max-width: 768px) {
  .mc-adj-badge { font-size: 10px; padding: 0 5px; }
}

/* ==================== V2.2.75：六大模块独立页（造型/编程/机加工/手工/发货 骨架版） ====================
   全部为新增专属类（.sm-*），不与任何既有 .mc-* / .tm-* / .zx-* / .ds-* 规则重叠，零回归。
   风格对齐机加工统计卡（.mc-stat-*）：同圆角 / 同字号 / 同阴影层级。 */
.sm-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 0 0 12px; padding: 10px 14px;
  background: var(--card); border: 1px solid var(--border-light); border-radius: 12px;
}
.sm-head-title { font-size: 16px; font-weight: 800; color: var(--text-primary); letter-spacing: .5px; }
.sm-head-right { display: flex; align-items: center; gap: 8px; }
.sm-back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 8px; cursor: pointer;
  background: var(--card); border: 1px solid var(--border-light);
  color: var(--text-secondary); font-size: 13px; font-weight: 600;
  transition: border-color .15s ease, color .15s ease;
}
.sm-back-btn:hover { border-color: var(--primary); color: var(--primary); }

/* 顶部三卡：待处理 / 进行中 / 已完成（发货页 = 待发货 / 已发货 / 总模具数，同一套类） */
.sm-stat-bar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.sm-stat-card {
  background: var(--card); border: 1px solid var(--border-light); border-radius: 10px;
  padding: 10px 6px; text-align: center; user-select: none;
}
.sm-stat-num {
  font-size: 22px; font-weight: 800; line-height: 1.1; margin-bottom: 3px;
  color: var(--text-primary); font-variant-numeric: tabular-nums;
}
.sm-stat-label { font-size: 12px; font-weight: 600; color: var(--text-secondary); white-space: nowrap; }
.sm-stat-todo  .sm-stat-num { color: #b45309; }   /* 待处理 / 待发货 —— 橙（与「待发货」状态徽标同色系） */
.sm-stat-doing .sm-stat-num { color: var(--primary); }
.sm-stat-done  .sm-stat-num { color: var(--success); }
.sm-stat-total .sm-stat-num { color: var(--text-primary); }
/* v1150.11：造型区顶部四卡（一排4个 + 可点击筛选/跳转 + 激活高亮） */
.zx-stat-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sm-stat-click { cursor: pointer; transition: transform .12s, box-shadow .12s; }
.sm-stat-click:hover { transform: translateY(-1px); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.sm-stat-active { outline: 2px solid var(--primary, #2563eb); outline-offset: -2px; }
.sm-stat-tm .sm-stat-num, .sm-stat-repair .sm-stat-num { font-size: 14px; }
.sm-stat-tm .sm-stat-num b { color: var(--primary, #2563eb); }
/* v1150.11 补充：造型「已完成 / 本月完成」卡片网格（PC 一排 4 / 手机一排 2） */
.zx-done-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 768px) { .zx-done-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.zx-done-card { border: 1px solid var(--border-light, #e5e7eb); border-radius: 10px; overflow: hidden; background: var(--bg-card, #fff); cursor: pointer; display: flex; flex-direction: column; transition: box-shadow .12s, transform .12s; }
.zx-done-card:hover { box-shadow: 0 3px 12px rgba(0,0,0,.12); transform: translateY(-1px); }
.zx-done-img { width: 100%; height: 108px; background: #f3f4f6; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.zx-done-img img { width: 100%; height: 100%; object-fit: cover; }
.zx-done-info { padding: 8px 10px; }
.zx-done-no { font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.zx-done-name { font-size: 12px; color: var(--text-secondary, #555); margin-top: 3px; }
.zx-done-meta { font-size: 11px; color: var(--text-light, #999); margin-top: 3px; }
/* v1150.11 补充：修模独立链路创建条 */
.zx-repair-create-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px dashed var(--border-light, #e5e7eb); }
/* v1150.12：造型区顶部四卡（加高 + 阴影 + 大数字上标签下 + 垂直水平居中，风格对齐数据总汇） */
.zx-stat-bar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.zx-card { background: var(--card, #fff); border-radius: var(--radius-lg, 12px); padding: 18px 12px; min-height: 108px; box-sizing: border-box; box-shadow: 0 4px 16px rgba(0,0,0,.12); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; cursor: pointer; text-align: center; transition: transform .18s, box-shadow .18s; }
.zx-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.zx-card-num { font-size: 32px; font-weight: 800; line-height: 1; color: var(--text-primary, #1f2937); }
.zx-card-num em { font-size: 13px; font-weight: 700; font-style: normal; margin-left: 3px; color: var(--text-secondary, #6b7280); }
.zx-card-label { font-size: 13px; font-weight: 600; color: var(--text-secondary, #6b7280); }
.zx-card-active { outline: 2px solid var(--primary, #2563eb); outline-offset: -2px; }
.zx-card-todo  .zx-card-num { color: #b45309; }
.zx-card-done  .zx-card-num { color: var(--success, #15803d); }
.zx-card-repair .zx-card-num { color: #6b4ba3; }
.zx-card-tm { justify-content: center; gap: 10px; }
.zx-card-tm .zx-card-num { color: var(--primary, #2563eb); font-size: 24px; }
.zx-card-row { display: flex; align-items: baseline; gap: 7px; }
.zx-card-lab { font-size: 12px; font-weight: 600; color: var(--text-secondary, #6b7280); }
/* v1150.12：🔧已修模 标记 + 已完成丰富卡文字间距 */
.rp-tag-repair { background: #fef3c7; color: #92400e; }
.zx-done-rich .zx-done-info { padding: 10px 12px; }
.zx-done-rich .zx-done-meta { margin-top: 5px; line-height: 1.5; }

/* 发货页两区 */
.sm-sec { margin-bottom: 18px; }
.sm-sec-title {
  font-size: 14px; font-weight: 800; color: var(--text-primary);
  margin: 0 0 8px; padding-left: 8px; border-left: 3px solid var(--primary);
}
.sm-ship-acts { white-space: nowrap; }
.sm-ship-acts .btn + .btn { margin-left: 6px; }
.sm-stat-note {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  padding: 8px 12px; margin-bottom: 8px;
  background: var(--card); border: 1px solid var(--border-light); border-radius: 10px;
  font-size: 12px; color: var(--text-secondary);
}
.sm-chip {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  background: #f1f5f9; color: var(--text-secondary); font-size: 12px;
}
.sm-chip b { color: var(--text-primary); margin-left: 2px; }
/* 机加工模块页：机床板外裹层（内部 #mc-board-slot 复用机加工页走秒） */
.sm-mc-wrap { margin-bottom: 14px; }
@media (max-width: 768px) {
  .sm-head { padding: 8px 12px; }
  .sm-head-title { font-size: 15px; }
  .sm-stat-num { font-size: 19px; }
  .sm-stat-label { font-size: 11px; }
  .sm-ship-acts .btn { padding: 4px 8px; font-size: 12px; }
}

/* ==================== V2.2.76 发货统一入口（详情页大按钮 + 单弹窗全流程） ====================
   全部 .sf-* 专属类，不动任何共用类；z-index 9700（> 9600 通用层，< 9999 顶层遮罩），
   与既有 .pt-* 弹窗同档，避免与 lightbox / 顶层 toast 打架（铁律 15/16）。 */
.sf-open-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 132px; padding: 12px 22px; margin-top: 10px;
  background: var(--primary); color: #fff; border: none; border-radius: 12px;
  font-size: 16px; font-weight: 600; cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, .28);
  transition: transform .12s ease, box-shadow .12s ease;
}
.sf-open-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(37, 99, 235, .34); }
.sf-open-btn:active { transform: translateY(0); }

.sf-overlay { position: fixed; inset: 0; z-index: 9700; background: rgba(15, 23, 42, .55);
  display: flex; align-items: center; justify-content: center; padding: 24px 12px; overflow: auto; }
.sf-box {
  width: 100%; max-width: 760px; max-height: 85vh; background: var(--card); border-radius: 14px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, .28); display: flex; flex-direction: column; overflow: hidden;
}
.sf-head {
  display: flex; align-items: center; gap: 8px; padding: 14px 16px;
  border-bottom: 1px solid var(--border-light); font-size: 16px; font-weight: 700; color: var(--text-primary);
}
.sf-head .sf-x { margin-left: auto; background: none; border: none; font-size: 22px; line-height: 1;
  color: var(--text-light); cursor: pointer; padding: 0 4px; }
.sf-body { padding: 12px 16px; overflow: auto; flex: 1 1 auto; min-height: 0; }
.sf-foot {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  border-top: 1px solid var(--border-light); background: var(--bg-soft, #f8fafc);
}
.sf-sum { font-size: 13px; color: var(--text-secondary); }
.sf-sum b { color: var(--primary); font-size: 16px; }
.sf-foot-btns { margin-left: auto; display: flex; gap: 8px; }

.sf-step { padding: 10px 0; border-bottom: 1px dashed var(--border-light); }
#sf-step-method, #sf-step-logistics { scroll-margin-top: 20px; }
.sf-step:last-child { border-bottom: none; }
.sf-step-t { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700;
  color: var(--text-primary); margin-bottom: 8px; }
.sf-step-opt { margin-left: auto; display: flex; gap: 8px; }
.sf-link { background: none; border: none; color: var(--primary); font-size: 12px; cursor: pointer; padding: 0; }
.sf-select, .sf-input {
  width: 100%; max-width: 320px; padding: 8px 10px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--card); color: var(--text-primary); font-size: 14px;
}
.sf-anchor-only { padding: 6px 10px; background: #f1f5f9; border-radius: 8px; font-size: 14px; color: var(--text-primary); display: inline-block; }
.sf-hint { font-size: 13px; color: var(--text-light); padding: 8px 0; }
.sf-hint.sf-err { color: #b91c1c; }
.sf-hint.sf-dim { color: var(--text-secondary); }

.sf-mat { margin-bottom: 10px; }
.sf-mat-t { font-size: 13px; font-weight: 700; color: var(--text-secondary); margin-bottom: 6px; }
.sf-group { margin-bottom: 10px; border: 1px solid var(--border-light); border-radius: 10px; padding: 8px; }
.sf-group-head { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700;
  color: var(--text-primary); margin-bottom: 6px; }
.sf-group-sub { font-weight: 400; font-size: 12px; color: var(--text-light); }
.sf-group-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.sf-card {
  position: relative; border: 2px solid var(--border-light); border-radius: 10px; padding: 6px;
  background: var(--card); cursor: pointer; transition: border-color .12s ease, box-shadow .12s ease;
}
.sf-card.on { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.sf-card-img { height: 92px; border-radius: 8px; overflow: hidden; background: #f1f5f9;
  display: flex; align-items: center; justify-content: center; color: var(--text-light); }
.sf-card-img img { width: 100%; height: 100%; object-fit: cover; }
.sf-card-no { font-size: 13px; font-weight: 700; color: var(--text-primary); margin-top: 4px; }
.sf-card-role { font-size: 12px; color: var(--text-secondary); }
.sf-card-tick { position: absolute; top: 6px; right: 8px; font-size: 14px; font-weight: 700; color: var(--primary); }
.sf-confirm-row { margin-top: 8px; text-align: right; }

.sf-methods { display: flex; flex-wrap: wrap; gap: 8px; }
.sf-method { padding: 10px 16px; border: 2px solid var(--border-light); border-radius: 10px;
  background: var(--card); color: var(--text-primary); font-size: 14px; cursor: pointer; }
.sf-method.on { border-color: var(--primary); background: rgba(37, 99, 235, .08); font-weight: 700; }
.sf-form { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.sf-label { font-size: 12px; color: var(--text-secondary); }

.sf-photo-box { margin-top: 6px; }
.sf-photo-slot { height: 120px; border: 2px dashed var(--border); border-radius: 10px; background: #f8fafc;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  color: var(--text-light); cursor: pointer; }
.sf-photo-preview { height: 160px; border-radius: 10px; overflow: hidden; background: #f1f5f9; }
.sf-photo-preview img { width: 100%; height: 100%; object-fit: contain; cursor: zoom-in; }
.sf-photo-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }

.sf-btn { padding: 8px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--card);
  color: var(--text-primary); font-size: 13px; cursor: pointer; }
.sf-btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.sf-btn-ok { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.sf-btn-danger { color: #b91c1c; }
.sf-hl { outline: 2px solid var(--primary) !important; background: rgba(37, 99, 235, .08) !important; transition: outline .3s ease, background .3s ease; }
.sf-live-frame { position: relative; width: 100%; aspect-ratio: 4 / 1; background: #0b1220; border-radius: 10px; overflow: hidden; }
.sf-live-frame video { width: 100%; height: 100%; object-fit: cover; }
.sf-btn[disabled] { opacity: .5; cursor: not-allowed; }
@media (max-width: 768px) {
  .sf-overlay { padding: 12px 8px; }
  .sf-box { max-width: 100%; border-radius: 12px; }
  .sf-body { padding: 10px 12px; }
  .sf-group-cards { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .sf-card-img { height: 74px; }
  .sf-card-no { font-size: 12px; }
  .sf-card-role { font-size: 11px; }
  .sf-method { padding: 8px 12px; font-size: 13px; min-height: 44px; }
  .sf-btn { min-height: 44px; }
  .sf-open-btn { width: 100%; min-width: 0; }
}

/* ===== V2.2.77：发货页 UI 大改 + 设置页三等宽按钮 ===== */
/* 发货页：区标题行（左=标题 / 右=大发货按钮 或 搜索框） */
.s277-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.s277-sec-head .sm-sec-title { margin-bottom: 0; }
.s277-big-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 26px; font-size: 16px; font-weight: 700;
  color: #fff; background: var(--primary); border: none; border-radius: 12px; cursor: pointer;
  box-shadow: 0 2px 8px rgba(37, 99, 235, .25);
}
.s277-big-btn:active { transform: translateY(1px); }
.s277-toggle { cursor: pointer; user-select: none; display: inline-flex; align-items: center; gap: 6px; }
.s277-fold-tip { font-size: 12px; font-weight: 400; color: var(--text-light); }
.s277-search {
  flex: 0 1 260px; min-width: 160px; padding: 7px 10px; font-size: 13px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text-primary);
}
/* V2.2.77（补）：发货页顶部汇总由三卡改两卡（模具总副数 / 已完成副数）—— 覆写 .sm-stat-bar 的 3 列网格。
   用后代选择器叠加（不碰 .sm-stat-bar 本体），手机端沿用既有 .sm-stat-num 字号缩放（铁律 15）。 */
.s277-stat-bar2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.s277-stat-bar2 .sm-stat-card { cursor: default; }
.s277-stat-bar2 .sm-stat-label { font-size: 12px; }

/* 设置页：一排三个等大小按钮（机床配置 / 隐藏·显示「标记完成」/ 隐藏·显示转派），仅管理员可见 */
.set-tri { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.set-tri-in { display: flex; align-items: center; gap: 10px; height: 100%; }
.set-tri-ico { font-size: 20px; color: var(--primary); flex: 0 0 auto; }
.set-tri-txt { flex: 1; min-width: 0; }
.set-tri-t { font-weight: 700; font-size: 14px; color: var(--text-primary); }
.set-tri-d { font-size: 12px; color: var(--text-light); margin-top: 2px; }
.set-tri-go { color: var(--text-light); flex: 0 0 auto; }

/* shipFlow：客户级多模具分组（一组 = 一副；组头 = 真实后缀序号，与后端 pair_seq 配对同口径） */
.sf-mold { margin-bottom: 12px; border: 1px solid var(--border-light); border-radius: 10px; padding: 8px 10px; }
.sf-mold-t { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.sf-mold-sub { font-size: 12px; font-weight: 400; color: var(--text-light); margin-left: 6px; }

@media (max-width: 768px) {
  .s277-sec-head { flex-wrap: wrap; }
  .s277-big-btn { width: 100%; justify-content: center; }
  .s277-search { flex: 1 1 100%; }
  .set-tri { grid-template-columns: 1fr; }
  .sf-mold { padding: 6px 8px; }
}

/* ==================== V2.2.77（三）：机床卡「一块一卡」 ====================
   同机床上了 N 块料 → 渲 N 张独立卡（原按机床号去重合并成一格）。
   每张 busy 卡多出第 3 行：左侧「料块名 · 料号」、右侧角落「更改 / 下料」（只对这一块生效）。
   ★ 只用新类 + 后代选择器，不碰 .mc-mach-card 原有 4 个字段的布局（铁律 15）。 */
.mc-mach-card.mc-mach-split { grid-template-rows: auto auto auto; row-gap: 2px; }
.mc-mach-sub {
  grid-row: 3; grid-column: 1 / span 2;
  font-size: 10px; font-weight: 600; opacity: .85;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mc-mach-acts { grid-row: 3; grid-column: 3; justify-self: end; display: flex; gap: 4px; }
.mc-mach-act {
  font-size: 10px; line-height: 1; font-weight: 700; padding: 3px 6px;
  border: 1px solid rgba(0, 0, 0, .22); border-radius: 6px;
  background: rgba(255, 255, 255, .82); color: #1B5E20; cursor: pointer;
}
.mc-mach-act-ul { background: #FFFFFF; }
.mc-mach-act:active { transform: translateY(1px); }
/* 机加工个人页 busy 卡是深蓝灰底（.mc-mach-bar 后代限定）→ 按钮保持白底深字，不用继承白色文字 */
.mc-mach-bar .mc-mach-card.busy .mc-mach-act { color: #374151; }
/* V2.2.77（补5）：无按钮的 busy 卡（数据汇总页机床状态板）→ 「料块名·料号」副行占满整行，不留右侧空档。
   ★ 只用新类 + 后代选择器，不碰 .mc-mach-sub 原布局（铁律 15）。 */
.mc-mach-card.mc-mach-noact .mc-mach-sub { grid-column: 1 / -1; }

@media (max-width: 768px) {
  /* 手机端卡片是 2 列：row1 机床号/编号、row2 状态/时长 → row3 料块名/按钮 */
  .mc-mach-sub { grid-row: 3; grid-column: 1; font-size: 9px; }
  .mc-mach-acts { grid-row: 3; grid-column: 2; justify-self: end; gap: 3px; }
  .mc-mach-act { font-size: 10px; padding: 5px 8px; }   /* 触摸目标放大，防误触 */
  .mc-mach-card.mc-mach-noact .mc-mach-sub { grid-column: 1 / -1; }
}

/* ==================== V2.2.77（补4）：发货页待发货区卡片化 + 模板预览弹窗 ====================
   ① 一行 = 一个模具（编号 + 品名），下方铺开该模具「已完工模板」的图片小卡片（铝/铁分列，完成度一眼可见）；
   ② 点卡片 → 弹窗「两图一行」小卡（手机竖屏天然适配）；
   ③ 图片取不到时用占位图标，绝不输出 src=""（杜绝裂图）。
   ★ 全部新类，不复用/不改写既有类（铁律 15）。 */
.sf-noimg { font-size: 20px; color: var(--text-light); opacity: .6; }

/* 待发货模具卡 */
.sp-card {
  border: 1px solid var(--border-light); border-radius: 12px; background: var(--card);
  padding: 10px 12px; margin-bottom: 10px; cursor: pointer;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.sp-card:hover { border-color: var(--primary); box-shadow: 0 2px 10px rgba(37, 99, 235, .12); }
.sp-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sp-card-l { min-width: 0; flex: 1; }
.sp-card-no { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.sp-card-name { font-size: 12px; color: var(--text-light); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-card-r { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.sp-card-unit { font-size: 12px; color: var(--text-secondary); }
.sp-card-sets { font-size: 13px; font-weight: 700; color: var(--primary); }
.sp-card-go { font-size: 12px; color: var(--text-light); }
.sp-loading, .sp-empty { font-size: 12px; color: var(--text-light); padding: 10px 2px 2px; }
.sp-mat { margin-top: 8px; }
.sp-mat-t { font-size: 12px; font-weight: 700; color: var(--text-secondary); margin-bottom: 6px; }
.sp-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.sp-thumb {
  position: relative; border: 1px solid var(--border-light); border-radius: 8px; overflow: hidden;
  background: #f1f5f9;
}
.sp-thumb-img, .sp-thumb img { display: block; width: 100%; height: 78px; object-fit: cover; }
.sp-thumb > .sf-noimg { display: flex; align-items: center; justify-content: center; height: 78px; }
.sp-thumb-tag {
  display: block; font-size: 11px; font-weight: 700; color: var(--text-primary);
  padding: 3px 5px; background: var(--card); text-align: center;
}
.sp-thumb-seq {
  position: absolute; top: 3px; left: 3px; font-size: 10px; font-weight: 700; color: #fff;
  background: rgba(0, 0, 0, .55); border-radius: 5px; padding: 1px 4px;
}

/* 模具模板预览弹窗（两图一行） */
.spv-overlay {
  position: fixed; inset: 0; z-index: 9999; background: rgba(0, 0, 0, .45);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.spv-box {
  width: 100%; max-width: 520px; max-height: 88vh; display: flex; flex-direction: column;
  background: var(--card); border-radius: 14px; overflow: hidden;
}
.spv-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px 14px; border-bottom: 1px solid var(--border-light);
  font-size: 15px; font-weight: 700; color: var(--text-primary);
}
.spv-sub { font-size: 12px; font-weight: 400; color: var(--text-light); }
.spv-cnt { margin-left: auto; font-size: 12px; font-weight: 400; color: var(--text-secondary); }
.spv-body { flex: 1; overflow-y: auto; padding: 12px 14px; }
.spv-mat { margin-bottom: 12px; }
.spv-mat-t { font-size: 13px; font-weight: 700; color: var(--text-secondary); margin-bottom: 6px; }
.spv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }  /* 两图一行 */
.spv-card { border: 1px solid var(--border-light); border-radius: 10px; overflow: hidden; background: #f1f5f9; }
.spv-card-img { height: 132px; display: flex; align-items: center; justify-content: center; background: #f1f5f9; }
.spv-card-img img { width: 100%; height: 100%; object-fit: cover; }
.spv-card-t { font-size: 12px; font-weight: 700; color: var(--text-primary); background: var(--card); padding: 4px 6px; text-align: center; }
.spv-card-s { font-size: 11px; color: var(--text-light); background: var(--card); padding: 0 6px 5px; text-align: center; }
.spv-empty { padding: 24px 0; text-align: center; font-size: 13px; color: var(--text-light); }
.spv-foot { padding: 10px 14px; border-top: 1px solid var(--border-light); display: flex; justify-content: flex-end; }

@media (max-width: 768px) {
  /* 手机竖屏：弹窗贴满宽、两图一行不变（正合适）；缩略图略放大便于点看 */
  .spv-overlay { padding: 10px 8px; }
  .spv-box { max-width: 100%; border-radius: 12px; }
  .spv-card-img { height: 118px; }
  .sp-thumbs { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
  .sp-thumb-img, .sp-thumb img { height: 68px; }
  .sp-thumb > .sf-noimg { height: 68px; }
  .sp-card-no { font-size: 15px; }
}

/* ==================== V2.2.77（补9）：绩效看板·账号过滤 + 两级点击明细 ==================== */
/* 一、两级点击：第一级明细表里的模具编号可点 */
.ds-perf-tbl b.ds-perf-mold {
  color: var(--primary, #2563EB); cursor: pointer; text-decoration: underline;
  text-underline-offset: 3px; text-decoration-color: rgba(37, 99, 235, .35);
}
.ds-perf-tbl b.ds-perf-mold:hover { opacity: .75; }
/* 二、第二层弹窗（覆盖在第一级 #mc-modal 上方；z-index：第一层 9600 < 本层 9650 < 灯箱 9700） */
.ds-perf-m2 { z-index: 9650; }
.ds-perf-m2 .ds-perf-m2-card { max-width: 560px; max-height: 86vh; }
.ds-perf-m2-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ds-perf-m2-title span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-perf-m2-back {
  width: 30px; height: 30px; flex: 0 0 auto; border-radius: 8px;
  border: 1px solid var(--border-light, #e5e7eb); background: #fff;
  color: var(--text-secondary, #6b7280); font-size: 13px; line-height: 1; cursor: pointer; font-family: inherit;
}
.ds-perf-m2-back:hover { background: #f3f4f6; }
/* 三、详情内容件（键值行 / 区块头 / 记录卡 / 照片网格） */
.ds-perf-kvs { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px 12px; padding: 8px 0 4px; }
.ds-perf-kv { display: flex; align-items: baseline; gap: 8px; font-size: 13px; min-width: 0; }
.ds-perf-kv span { color: var(--text-light, #9ca3af); flex: 0 0 auto; font-size: 12px; }
.ds-perf-kv b { color: var(--text-primary, #111827); font-weight: 600; word-break: break-all; }
.ds-perf-dh {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin: 14px 0 6px; padding: 7px 10px; border-radius: 8px;
  background: rgba(37, 99, 235, .07); font-size: 13px; font-weight: 700; color: var(--primary, #2563EB);
}
.ds-perf-dh em { font-style: normal; font-weight: 500; font-size: 12px; color: var(--text-light, #9ca3af); }
.ds-perf-subh { margin: 8px 0 4px; font-size: 12px; font-weight: 700; color: var(--text-secondary, #6b7280); }
.ds-perf-rec { border: 1px solid var(--border-light, #e5e7eb); border-radius: 10px; padding: 9px 11px; margin-bottom: 8px; background: #fff; }
.ds-perf-rec-t { font-size: 13px; font-weight: 700; color: var(--text-primary, #111827); margin-bottom: 3px; }
.ds-perf-rec-r { font-size: 12px; color: var(--text-secondary, #6b7280); line-height: 1.7; word-break: break-all; }
.ds-perf-imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin: 6px 0 2px; }
.ds-perf-fig { margin: 0; }
.ds-perf-fig img {
  width: 100%; height: 84px; object-fit: cover; border-radius: 8px; cursor: zoom-in;
  border: 1px solid var(--border-light, #e5e7eb); background: #f3f4f6; display: block;
}
.ds-perf-fig figcaption { font-size: 11px; color: var(--text-light, #9ca3af); margin-top: 3px; text-align: center; }
.ds-perf-noimg, .ds-perf-empty, .ds-perf-loading { padding: 14px 0; text-align: center; font-size: 13px; color: var(--text-light, #9ca3af); }
.ds-perf-loading i { margin-right: 6px; color: var(--primary, #2563EB); }
.ds-perf-note2 { margin: 6px 0; padding: 7px 10px; border-radius: 8px; background: rgba(245, 158, 11, .1); font-size: 12px; color: #b45309; }
.ds-perf-tbl-img { width: 46px; height: 36px; object-fit: cover; border-radius: 6px; cursor: zoom-in; border: 1px solid var(--border-light, #e5e7eb); }
/* 四、设置页「绩效看板员工管理」弹窗 */
.ds-perf-st-tip { padding: 4px 0 10px; font-size: 12px; line-height: 1.7; color: var(--text-secondary, #6b7280); }
.ds-perf-st-acts { display: flex; gap: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--border-light, #e5e7eb); }
.ds-perf-st-btn {
  padding: 6px 14px; border-radius: 8px; border: 1px solid var(--border-light, #e5e7eb);
  background: #fff; color: var(--text-secondary, #6b7280); font-size: 12px; cursor: pointer; font-family: inherit;
}
.ds-perf-st-btn:hover { border-color: var(--primary, #2563EB); color: var(--primary, #2563EB); }
.ds-perf-st-list { max-height: 52vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.ds-perf-st-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 2px; border-bottom: 1px dashed var(--border-light, #e5e7eb); }
.ds-perf-st-row:last-child { border-bottom: none; }
.ds-perf-st-info { display: flex; flex-direction: column; min-width: 0; }
.ds-perf-st-info b { font-size: 14px; color: var(--text-primary, #111827); }
.ds-perf-st-info span { font-size: 11px; color: var(--text-secondary, #6b7280); margin-top: 1px; }
.ds-perf-st-off { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 6px; background: #fee2e2; color: #dc2626; font-size: 11px; font-style: normal; }
/* 开关：左滑轨 + 右文字（默认开=绿） */
.ds-perf-sw {
  display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto;
  border: none; background: transparent; cursor: pointer; font-family: inherit; padding: 4px 2px;
}
.ds-perf-sw i {
  position: relative; width: 38px; height: 20px; border-radius: 999px; background: #d1d5db; transition: background .18s;
}
.ds-perf-sw i::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, .3); transition: left .18s;
}
.ds-perf-sw.on i { background: #10b981; }
.ds-perf-sw.on i::after { left: 20px; }
.ds-perf-sw em { font-style: normal; font-size: 12px; color: var(--text-secondary, #6b7280); }
.ds-perf-sw.on em { color: #047857; }
/* 五、手机端：第二层接近全屏；开关触控目标 ≥44px */
@media (max-width: 640px) {
  .ds-perf-m2 { padding: 8px; }
  .ds-perf-m2 .ds-perf-m2-card { max-width: none; width: 100%; max-height: 94vh; border-radius: 12px; }
  .ds-perf-m2 .mc-modal-body { padding: 10px 12px 14px; }
  .ds-perf-m2-back { width: 34px; height: 34px; font-size: 14px; }
  .ds-perf-sw { padding: 8px 4px; }
  .ds-perf-sw i { width: 46px; height: 28px; }
  .ds-perf-sw i::after { width: 22px; height: 22px; top: 3px; }
  .ds-perf-sw.on i::after { left: 22px; }
  .ds-perf-kvs { grid-template-columns: 1fr 1fr; }
  .ds-perf-imgs { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
  .ds-perf-fig img { height: 68px; }
}

/* ==================== V2.2.77（补11）：自定义下拉「选项编辑」 ==================== */
/* 一、入口按钮（挂在既有 ★ 右侧；沿用 .zx-optstar-wrap 的 inline-flex 行） */
.zx-optedit-btn {
  width: 26px; height: 26px; flex: 0 0 auto; border-radius: 8px;
  border: 1px solid var(--border-light, #e5e7eb); background: #fff;
  color: var(--text-secondary, #6b7280); font-size: 15px; line-height: 1; cursor: pointer;
  font-family: inherit; margin-left: 4px; padding: 0; align-self: center;
}
.zx-optedit-btn:hover { border-color: var(--primary, #2563EB); color: var(--primary, #2563EB); background: rgba(37, 99, 235, .06); }
/* 二、浮层遮罩 + 卡片（挂 documentElement；position:fixed 避开 body zoom 连带缩放 —— 铁律 6/11） */
.zx-optedit-mask {
  position: fixed; inset: 0; z-index: 9660;                 /* 第一层 #mc-modal 9600 < 本层 < 灯箱 9700 */
  background: rgba(15, 23, 42, .45); display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.zx-optedit-card {
  background: #fff; border-radius: 12px; width: 100%; max-width: 480px;
  max-height: 86vh; display: flex; flex-direction: column;
  box-shadow: 0 18px 48px rgba(15, 23, 42, .28); overflow: hidden;
}
.zx-optedit-hd {
  display: flex; align-items: center; gap: 10px; padding: 13px 14px 9px;
  border-bottom: 1px solid var(--border-light, #e5e7eb);
}
.zx-optedit-title { flex: 1; min-width: 0; font-size: 15px; font-weight: 700; color: var(--text-primary, #111827); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zx-optedit-x {
  width: 30px; height: 30px; flex: 0 0 auto; border-radius: 8px; border: none; background: transparent;
  color: var(--text-light, #9ca3af); font-size: 20px; line-height: 1; cursor: pointer; font-family: inherit;
}
.zx-optedit-x:hover { background: #f3f4f6; }
.zx-optedit-tip { padding: 8px 14px; font-size: 11px; line-height: 1.7; color: var(--text-secondary, #6b7280); border-bottom: 1px solid var(--border-light, #e5e7eb); }
.zx-optedit-tip b { color: var(--primary, #2563EB); }
/* 三、选项列表（过长可滚动） */
.zx-optedit-list { flex: 1 1 auto; min-height: 80px; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 6px 10px; }
.zx-optedit-row {
  display: flex; align-items: center; gap: 6px; padding: 6px 4px; min-height: 40px;
  border-bottom: 1px dashed var(--border-light, #e5e7eb);
}
.zx-optedit-row:last-child { border-bottom: none; }
.zx-optedit-row.editing { background: rgba(37, 99, 235, .06); border-radius: 8px; }
.zx-optedit-ord {
  flex: 0 0 auto; width: 20px; height: 20px; border-radius: 6px; background: #f3f4f6;
  color: var(--text-light, #9ca3af); font-size: 11px; line-height: 20px; text-align: center;
}
.zx-optedit-txt { flex: 1 1 auto; min-width: 0; font-size: 13px; color: var(--text-primary, #111827); word-break: break-all; padding: 4px 2px; cursor: text; }
.zx-optedit-inp {
  flex: 1 1 auto; min-width: 0; padding: 6px 8px; font-size: 13px; font-family: inherit;
  border: 1px solid var(--primary, #2563EB); border-radius: 6px; background: #fff; color: var(--text-primary, #111827);
}
.zx-optedit-mini {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 7px; padding: 0;
  border: 1px solid var(--border-light, #e5e7eb); background: #fff;
  color: var(--text-secondary, #6b7280); font-size: 12px; line-height: 1; cursor: pointer; font-family: inherit;
}
.zx-optedit-mini:hover:not(:disabled) { border-color: var(--primary, #2563EB); color: var(--primary, #2563EB); }
.zx-optedit-mini:disabled { opacity: .35; cursor: not-allowed; }
.zx-optedit-del {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 7px; padding: 0;
  border: 1px solid #fecaca; background: #fff; color: #dc2626; font-size: 13px; line-height: 1; cursor: pointer; font-family: inherit;
}
.zx-optedit-del:hover { background: #fee2e2; }
.zx-optedit-empty { padding: 18px 0; text-align: center; font-size: 13px; color: var(--text-light, #9ca3af); }
/* 四、新增行 */
.zx-optedit-add { display: flex; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--border-light, #e5e7eb); }
.zx-optedit-add-inp {
  flex: 1 1 auto; min-width: 0; padding: 8px 10px; font-size: 13px; font-family: inherit;
  border: 1px solid var(--border-light, #e5e7eb); border-radius: 8px; background: #fff; color: var(--text-primary, #111827);
}
.zx-optedit-add-inp:focus { outline: none; border-color: var(--primary, #2563EB); }
.zx-optedit-add-btn {
  flex: 0 0 auto; padding: 8px 14px; border-radius: 8px; border: none; background: var(--primary, #2563EB);
  color: #fff; font-size: 13px; cursor: pointer; font-family: inherit; white-space: nowrap;
}
.zx-optedit-add-btn:hover { opacity: .9; }
/* 五、底部（模式不同按钮不同：live 有「保存」，draft 无 —— 随既有底部整体保存） */
.zx-optedit-foot { display: flex; align-items: center; gap: 8px; padding: 10px 14px 13px; border-top: 1px solid var(--border-light, #e5e7eb); }
.zx-optedit-note { flex: 1 1 auto; min-width: 0; font-size: 11px; line-height: 1.6; color: var(--text-light, #9ca3af); }
/* 六、（历史值失效兜底 .zx-opt-stale 沿用 v8.73 既有定义，此处不重复声明）
   七、手机端：接近全屏 + 触控目标 ≥44px */
@media (max-width: 640px) {
  .zx-optedit-mask { padding: 8px; align-items: flex-end; }
  .zx-optedit-card { max-width: none; max-height: 92vh; border-radius: 12px; }
  .zx-optedit-row { min-height: 46px; gap: 7px; }
  .zx-optedit-btn { width: 34px; height: 34px; font-size: 17px; }
  .zx-optedit-mini, .zx-optedit-del { width: 34px; height: 34px; font-size: 14px; }
  .zx-optedit-x { width: 34px; height: 34px; }
  .zx-optedit-ord { width: 24px; height: 24px; line-height: 24px; font-size: 12px; }
  .zx-optedit-add-inp, .zx-optedit-add-btn { padding: 10px 12px; }
  .zx-optedit-foot { flex-wrap: wrap; }
  .zx-optedit-note { flex: 1 0 100%; order: 3; }
}

/* ==================== 补13追加五：已发货详情弹窗（sdt-*；z-index 9650 档，勿复用 mc-modal 类） ==================== */
.sdt-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 9650; display: flex; align-items: center; justify-content: center; padding: 16px; }
.sdt-modal { background: var(--card-bg, #fff); border-radius: 12px; width: min(680px, 96vw); max-height: 86vh; display: flex; flex-direction: column; box-shadow: 0 12px 40px rgba(0,0,0,.25); overflow: hidden; }
.sdt-head { display: flex; align-items: flex-start; gap: 8px; padding: 14px 16px 8px; }
.sdt-title { flex: 1; font-size: 16px; font-weight: 700; }
.sdt-sub { font-size: 12px; font-weight: 400; color: var(--text-light, #888); margin-left: 6px; }
.sdt-x { border: 0; background: transparent; font-size: 22px; line-height: 1; cursor: pointer; color: var(--text-light, #888); padding: 0 4px; }
.sdt-pills { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 8px; }
.sdt-pill { border: 1px solid var(--border, #ddd); background: transparent; border-radius: 999px; padding: 3px 12px; font-size: 12px; cursor: pointer; }
.sdt-pill.on { background: var(--primary, #2563eb); border-color: var(--primary, #2563eb); color: #fff; }
.sdt-body { flex: 1; overflow-y: auto; padding: 4px 16px 12px; }
.sdt-meta { font-size: 12.5px; color: var(--text-light, #666); padding: 6px 0 10px; line-height: 1.7; }
.sdt-meta b { color: var(--text, #222); }
.sdt-items { width: 100%; font-size: 13px; }
.sdt-items th, .sdt-items td { padding: 7px 8px; text-align: left; }
.sdt-dim { font-size: 11px; color: var(--text-light, #888); }
.sdt-role { font-size: 11px; color: var(--primary, #2563eb); }
.sdt-sec { font-size: 12.5px; font-weight: 600; margin: 12px 0 6px; }
.sdt-photos { display: flex; flex-wrap: wrap; gap: 8px; }
.sdt-photo { width: 88px; height: 88px; border-radius: 8px; overflow: hidden; background: var(--bg, #f2f2f2); display: flex; align-items: center; justify-content: center; cursor: zoom-in; }
.sdt-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sdt-empty { padding: 24px 0; text-align: center; color: var(--text-light, #888); font-size: 13px; }
.sdt-foot { padding: 10px 16px 14px; display: flex; justify-content: flex-end; }
/* 已发货行可点击（详情弹窗入口） */
tr.sdt-row { cursor: pointer; }
tr.sdt-row:hover td { background: rgba(37, 99, 235, .06); }
@media (max-width: 640px) {
  .sdt-modal { width: 96vw; max-height: 88vh; }
  .sdt-photo { width: 64px; height: 64px; }
  .sdt-meta { font-size: 12px; }
}

/* ==================== 补13追加六：修模收费登记链路（rp-*；弹窗挂 documentElement、z-index 9650 档，勿复用 mc-modal 类） ==================== */
.rp-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 9650; display: flex; align-items: center; justify-content: center; padding: 16px; }
.rp-modal { background: var(--card-bg, #fff); border-radius: 12px; width: min(560px, 96vw); max-height: 86vh; display: flex; flex-direction: column; box-shadow: 0 12px 40px rgba(0,0,0,.25); overflow: hidden; }
.rp-head { display: flex; align-items: center; gap: 8px; padding: 14px 16px 10px; border-bottom: 1px solid var(--border-light, #eef0f3); }
.rp-title { flex: 1; font-size: 16px; font-weight: 700; }
.rp-sub { font-size: 12px; font-weight: 400; color: var(--text-light, #888); margin-left: 4px; }
.rp-x { border: 0; background: transparent; font-size: 22px; line-height: 1; cursor: pointer; color: var(--text-light, #888); padding: 0 4px; }
.rp-body { flex: 1; overflow-y: auto; padding: 12px 16px; }
.rp-foot { padding: 10px 16px 14px; display: flex; justify-content: flex-end; gap: 8px; }
.rp-form-row { margin-bottom: 12px; }
.rp-form-row > label { display: block; font-size: 13px; font-weight: 600; color: var(--text, #333); margin-bottom: 6px; }
.rp-form-row textarea, .rp-form-row input[type="number"] { width: 100%; box-sizing: border-box; padding: 9px 11px; border: 1.5px solid var(--border, #dbe4f2); border-radius: 8px; font-size: 13.5px; font-family: inherit; resize: vertical; }
.rp-form-row textarea:focus, .rp-form-row input[type="number"]:focus { outline: none; border-color: var(--primary, #1c5fd6); }
.rp-req { color: var(--danger, #e0483e); }
.rp-hint { font-size: 11.5px; font-weight: 400; color: var(--text-light, #999); }
.rp-seg { display: flex; gap: 6px; flex-wrap: wrap; }
.rp-seg-btn { border: 1.5px solid var(--border, #dbe4f2); background: #fff; border-radius: 8px; padding: 7px 16px; font-size: 13px; cursor: pointer; font-family: inherit; }
.rp-seg-btn.on { background: var(--primary, #1c5fd6); border-color: var(--primary, #1c5fd6); color: #fff; }
.rp-mine-btn { border: 1px solid var(--border, #dbe4f2); background: #fff; border-radius: 8px; padding: 4px 10px; font-size: 12px; cursor: pointer; white-space: nowrap; }
/* 详情/列表条目 */
.rp-detail > div { margin-bottom: 9px; font-size: 13.5px; line-height: 1.6; }
.rp-dl { display: inline-block; min-width: 72px; color: var(--text-light, #777); font-size: 12.5px; }
.rp-todo-card { background: var(--card-bg, #fff); border: 1.5px solid var(--border, #dbe4f2); border-radius: 12px; padding: 10px 12px; margin: 0 0 12px; }
.rp-todo-title { font-size: 14px; font-weight: 800; color: #0f2f5f; margin-bottom: 8px; }
.rp-todo-title em { font-style: normal; font-size: 12px; color: var(--text-light, #888); font-weight: 400; }
.rp-todo-item { padding: 9px 10px; border: 1px solid var(--border-light, #eef0f3); border-radius: 9px; margin-bottom: 8px; background: #fbfcfe; }
.rp-todo-item.clickable { cursor: pointer; }
.rp-todo-item.clickable:hover { border-color: var(--primary, #1c5fd6); background: #f6f9ff; }
.rp-todo-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13.5px; }
.rp-todo-desc { font-size: 12.5px; color: var(--text, #444); margin-top: 4px; line-height: 1.6; word-break: break-all; }
.rp-todo-meta { font-size: 11.5px; color: var(--text-light, #999); margin-top: 4px; }
.rp-todo-time { font-size: 11px; color: var(--text-light, #aaa); margin-left: auto; }
.rp-reject-reason { font-size: 12px; color: var(--danger, #e0483e); background: #fdf1f0; border-radius: 6px; padding: 5px 8px; margin-top: 5px; }
.rp-empty { padding: 28px 0; text-align: center; color: var(--text-light, #999); font-size: 13px; }
/* 标签 */
.rp-tag { display: inline-block; font-size: 11px; border-radius: 999px; padding: 1.5px 8px; background: #eef2f7; color: #475569; white-space: nowrap; }
.rp-tag-urgent { background: #fee2e2; color: #b91c1c; }
.rp-tag-money { background: #fef3c7; color: #92400e; }
.rp-tag-ok { background: #dcfce7; color: #15803d; }
.rp-tag-rej { background: #fee2e2; color: #b91c1c; }
/* 数据总汇卡角标 */
.rp-dash-card .stat-value { color: #b45309; }
.rp-badge-hot { animation: rpPulse 1.6s ease-in-out infinite; }
@keyframes rpPulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }
/* v1150.6：修模待确认卡片红底白字数字 + 红边框醒目提醒 */
#rp-dash-count.rp-badge-hot { display: inline-block; min-width: 22px; padding: 1px 7px; border-radius: 11px; background: #e53935; color: #fff; font-weight: 800; }
.rp-dash-card.rp-dash-hot { border: 2px solid #e53935 !important; box-shadow: 0 0 0 3px rgba(229,57,53,.12); }
/* v1150.6：造型区双 tab（造型工艺 / 修模） */
.zx-tab-sep { display: inline-block; width: 1px; height: 18px; background: var(--border-light, #e5e7eb); margin: 0 4px; vertical-align: middle; }
.zx-repair-tab { position: relative; }
.zx-repair-badge { display: inline-block; min-width: 16px; margin-left: 4px; padding: 0 4px; border-radius: 9px; background: #e53935; color: #fff; font-size: 10px; font-style: normal; font-weight: 800; line-height: 16px; text-align: center; vertical-align: middle; }
.zx-repair-panel { padding: 4px 2px; }
.rp-hist-typesum { font-size: 12px; color: var(--text-secondary, #666); margin: 0 0 6px; }
/* v1150.6：修模向导进行中隐藏原造型内容（关闭/提交后还原） */
body.rpw-hide-zx .zx-main-frame { display: none !important; }
/* v1150.6：汇总页编号行 + 审批端料块明细 */
.rpw-no-line { font-size: 13px; margin: 0 0 10px; padding: 8px 10px; background: #fff7e6; border: 1px solid #f0c36d; border-radius: 8px; }
.rpw-no-line b { color: #c0431c; }
.rp-conf-block { border: 1px solid var(--border-light, #e5e7eb); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; background: var(--bg-card, #fff); }
.rp-conf-block-head { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.rp-conf-photos { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
/* v1150.9：修模记录查询 + 详情 + 金额留痕 */
.rp-hist-click { cursor: pointer; transition: box-shadow .15s; }
.rp-hist-click:hover { box-shadow: 0 2px 10px rgba(0,0,0,.10); }
.rp-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px dashed var(--border-light, #e5e7eb); }
.rp-filters select, .rp-filters input { border: 1px solid var(--border-light, #e5e7eb); border-radius: 8px; padding: 6px 8px; font-size: 13px; font-family: inherit; background: var(--bg-card, #fff); color: var(--text-color, #2c3e50); }
.rp-filters input[type=text] { min-width: 180px; }
.rp-flow { display: flex; flex-direction: column; gap: 6px; }
.rp-flow-item { display: flex; align-items: baseline; gap: 10px; font-size: 12.5px; padding: 6px 10px; border-left: 3px solid #c9b8e8; background: var(--bg-card, #fff); border-radius: 0 8px 8px 0; }
.rp-flow-item b { min-width: 92px; color: var(--text-color, #2c3e50); }
.rp-flow-item span { color: var(--text-secondary, #666); }
.rp-flow-item.rp-flow-cur { border-left-color: #e8743b; }
.rp-flow-item.rp-flow-rej { border-left-color: #e53935; }
.rp-adj-log { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.rp-adj-log th, .rp-adj-log td { border: 1px solid var(--border-light, #e5e7eb); padding: 6px 8px; text-align: left; }
.rp-adj-log th { background: var(--bg-hover, #f5f5f5); font-weight: 700; }
/* v1150.10：图片放大关闭按钮 + 记录卡操作行 */
.rp-zoom-x { position: absolute; top: 14px; right: 18px; width: 38px; height: 38px; border: none; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; z-index: 2; }
.rp-zoom-x:hover { background: rgba(0,0,0,.82); }
.rp-rec-acts { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
/* 造型详情创建按钮 */
.rp-create-btn { border: 1.5px solid #f2c078; background: #fff8ec; color: #9a6a1f; border-radius: 8px; padding: 5px 10px; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; font-family: inherit; }
.rp-create-btn:hover { background: #fdf0d5; }
/* v1150：造型页顶部「🔧 创建修模单」入口（最左，强调色） */
.rp-create-top-btn { border: 1.5px solid #e8743b; background: #fff1ea; color: #c0431c; border-radius: 8px; padding: 5px 12px; font-size: 12px; font-weight: 800; cursor: pointer; white-space: nowrap; font-family: inherit; }
.rp-create-top-btn:hover { background: #ffe2d6; }
.rp-hist-btn { border: 1.5px solid #c9b8e8; background: #f6f1fd; color: #6b4ba3; border-radius: 8px; padding: 5px 10px; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; font-family: inherit; }
.rp-hist-btn:hover { background: #ece2fa; }
/* v1150.4：基本信息区「修模历史」条件入口占位行 */
.rp-hist-entry-wrap { display: inline-block; margin: 4px 0 0; }
/* 修模历史图片可放大 */
.rpw-thumb-zoom { cursor: zoom-in; }
.rp-todo-op { font-size: 11px; color: var(--text-secondary, #888); margin-left: 6px; }
.rp-zoom-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.82); z-index: 9999; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; cursor: zoom-out; }
.rp-zoom-overlay img { max-width: 92vw; max-height: 84vh; border-radius: 8px; box-shadow: 0 8px 40px rgba(0,0,0,.5); background: #fff; }
.rp-zoom-tip { color: #ddd; font-size: 12px; }
/* v1150：修模单向导 */
.rpw-pick { padding: 4px 2px; }
.rpw-pick-tip { font-size: 13px; color: var(--text-secondary, #555); margin-bottom: 12px; }
.rpw-pick-row { display: flex; gap: 14px; }
.rpw-pick-big { flex: 1; border: 1.5px dashed #e8743b; background: #fff8f4; color: #c0431c; border-radius: 12px; padding: 22px 10px; font-size: 16px; font-weight: 800; cursor: pointer; font-family: inherit; }
.rpw-pick-big:hover { background: #ffeee6; }
.rpw-added { margin-top: 16px; border-top: 1px dashed var(--border-light, #e5e7eb); padding-top: 12px; }
.rpw-added-title { font-size: 12px; color: var(--text-light, #999); margin-bottom: 8px; }
.rpw-added-item, .rpw-sum-item, .rpw-hist-item { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border: 1px solid var(--border-light, #e5e7eb); border-radius: 8px; margin-bottom: 7px; background: var(--bg-card, #fff); }
.rpw-tag { font-size: 11px; font-weight: 700; color: #c0431c; background: #fde7dd; border-radius: 5px; padding: 2px 7px; white-space: nowrap; }
.rpw-thumb { width: 38px; height: 38px; border-radius: 6px; object-fit: cover; border: 1px solid var(--border-light, #e5e7eb); flex-shrink: 0; }
.rpw-desc { font-size: 13px; color: var(--text-color, #2c3e50); flex: 1; word-break: break-all; }
.rpw-del, .rpw-photo-del { border: none; background: #f3a89a; color: #fff; border-radius: 50%; width: 20px; height: 20px; line-height: 18px; font-size: 13px; cursor: pointer; flex-shrink: 0; }
.rpw-detail-type { font-size: 13px; margin-bottom: 12px; }
/* v1150.5：修模向导详情页直接复用选料区真实卡片（zxPickEditCard），此处仅做容器约束 */
.rpw-real-grid { overflow-x: auto; padding-bottom: 4px; }
.rpw-real-grid .zx-alumup-card { margin: 0; }
.rpw-real-grid .zx-alumup-card.zxau-edit { box-shadow: none; }
.rpw-photos { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.rpw-photo { position: relative; }
.rpw-photo-del { position: absolute; top: -6px; right: -6px; }
.rpw-photo-empty { font-size: 12px; color: var(--text-light, #999); }
.rpw-photo-btn { border: 1.5px solid #c9b8e8; background: #f6f1fd; color: #6b4ba3; border-radius: 8px; padding: 7px 14px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit; }
.rpw-ask { text-align: center; padding: 22px 10px; }
.rpw-ask-icon { font-size: 34px; }
.rpw-ask-text { font-size: 16px; font-weight: 700; margin: 10px 0 4px; color: var(--text-color, #2c3e50); }
.rpw-ask-sub { font-size: 12px; color: var(--text-light, #999); }
.rpw-summary { padding: 2px; }
.rpw-sum-title { font-size: 13px; font-weight: 700; margin-bottom: 10px; color: var(--text-color, #2c3e50); }
.rpw-sum-list { max-height: 220px; overflow-y: auto; margin-bottom: 12px; }
/* v1150：修模历史弹窗 */
.rp-hist-group { border: 1px solid var(--border-light, #e5e7eb); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; background: var(--bg-card, #fff); }
.rp-hist-ghead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; font-size: 13px; }
.rp-hist-item { margin-bottom: 6px; }
/* v1150：设置页审批权限 */
.rp-appr-list { display: flex; flex-direction: column; gap: 8px; }
.rp-appr-item { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.rp-appr-un { font-size: 11px; color: var(--text-light, #999); margin-left: auto; font-family: monospace; }
.rp-appr-note { font-size: 12px; color: var(--text-light, #999); }
/* 对账单配件行修模缩略图 */
.rp-bill-thumb { width: 34px; height: 34px; border-radius: 6px; object-fit: cover; vertical-align: middle; margin-right: 6px; cursor: zoom-in; border: 1px solid var(--border-light, #e5e7eb); }
.rp-bill-remark { font-size: 11px; color: var(--text-light, #999); margin-top: 2px; word-break: break-all; }
@media (max-width: 640px) {
  .rp-modal { width: 96vw; max-height: 88vh; }
  .rp-todo-time { margin-left: 0; }
}

/* ============ V2.2.77 补13·八：全员双杠（本月累计 + 今日） ============ */
/* 需求 3 拍板点：① 横向进度条 ② 上下两根独立条（不堆叠）③ 本月条按组内最长比例缩放（机加工同） */
.ds-dual { margin: 10px 0 4px; padding: 10px 12px 12px; border: 1px solid var(--border-light, #e5e7eb); border-radius: 10px; background: var(--bg-card, #fff); }
.ds-dual-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px dashed var(--border-light, #e5e7eb); }
.ds-dual-title { font-size: 13px; font-weight: 700; color: var(--text-color, #2c3e50); }
.ds-dual-month { font-size: 12px; font-weight: 700; color: #5C6B7A; background: rgba(92,107,122,0.10); border-radius: 6px; padding: 1px 7px; }
.ds-dual-tip { font-size: 11px; color: var(--text-light, #999); display: inline-flex; align-items: center; gap: 4px; margin-left: auto; }
.ds-dual-key { display: inline-block; width: 14px; height: 8px; border-radius: 3px; }
.ds-dual-key-m { background: #5C6B7A; margin-left: 6px; }
.ds-dual-key-t { background: #f0ad4e; }
.ds-dual-zone { border-radius: 8px; padding: 7px 9px 9px; margin-bottom: 8px; }
.ds-dual-zone:last-child { margin-bottom: 0; }
.ds-dual-zone-head { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--text-color, #2c3e50); border-left: 3px solid #ccc; padding-left: 7px; margin-bottom: 6px; }
.ds-dual-zone-head em { font-style: normal; font-weight: 500; font-size: 11px; color: var(--text-light, #999); margin-left: auto; }
/* 每人一行：姓名 | 双杠（上下两根独立） | 数字摘要 —— 不折叠、不点开，全部摊开 */
.ds-dual-row { display: grid; grid-template-columns: 116px 1fr auto; align-items: center; gap: 8px; padding: 4px 0; }
.ds-dual-row + .ds-dual-row { border-top: 1px solid rgba(0,0,0,0.04); }
.ds-dual-name { font-size: 12.5px; font-weight: 600; color: var(--text-color, #2c3e50); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-dual-bars { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
/* ② 上下两根独立条：每行 = 标签 + 数字 + 横向轨道（互不堆叠、各自独立成行） */
.ds-dual-line { display: flex; align-items: center; gap: 6px; }
.ds-dual-tag { flex: 0 0 30px; font-size: 10px; font-weight: 700; color: #5C6B7A; text-align: right; }
.ds-dual-tag-t { color: #f0ad4e; }
.ds-dual-num { flex: 0 0 42px; font-size: 11.5px; font-weight: 700; color: var(--text-color, #2c3e50); text-align: right; white-space: nowrap; }
/* ★V2.2.77 补13追加十四：并列「/ N只」后数字区需自适应加宽（42px 固定宽会把「件/ 只」挤到换行） */
.ds-dual-num-p { flex: 0 0 auto; min-width: 42px; padding-right: 4px; }
.ds-dual-unit { font-size: 10px; font-weight: 500; color: var(--text-light, #999); margin-left: 1px; }
/* ★V2.2.77 补13追加十四：产品造型「只」单位（与「件/副」用色区分，一眼分辨两种量纲） */
.ds-dual-unit-p { font-size: 10px; font-weight: 700; color: #d35400; margin-left: 3px; }
.ds-dual-p-sum { color: #d35400; font-weight: 700; }
.ds-dual-track { flex: 1 1 auto; min-width: 40px; height: 9px; border-radius: 5px; background: rgba(0,0,0,0.06); overflow: hidden; }
/* 满条 = 组内最长者（宽度由行内 style 给出）；0 值 → .zero 灰色空条占位（不隐藏该行） */
.ds-dual-fill { display: block; height: 100%; border-radius: 5px; min-width: 0; }
/* ① 本月条深色：压暗+略降饱和，视觉上明显比今日亮条更沉（用户拍板「本月深色」；
   ⚠️ 曾用 opacity:0.55 —— 会让条变「浅」而非「深」，与拍板点方向相反，已改为 brightness 压暗） */
.ds-dual-fill-m { filter: brightness(0.6) saturate(0.85); }
/* ② 今日条亮色：满饱和微提亮，与本月条同刻度（组内本月最长者）可直接横向对比 */
.ds-dual-fill-t { filter: brightness(1.08); }
.ds-dual-fill.zero { background: rgba(0,0,0,0.10) !important; }
.ds-dual-sum { font-size: 11px; color: var(--text-light, #999); white-space: nowrap; text-align: right; }
@media (max-width: 640px) {
  .ds-dual { padding: 8px 9px 10px; }
  .ds-dual-row { grid-template-columns: 78px 1fr; gap: 4px 6px; }
  .ds-dual-sum { grid-column: 1 / -1; text-align: left; font-size: 10.5px; }
  .ds-dual-tip { margin-left: 0; }
}

/* ============ V2.2.77 补13·十：双杠可点击展开 + 明细列表 + 设置页分组多选 ============ */
/* ① 双杠可点击：cursor + hover 高亮 + 展开动画（max-height + transition） */
.ds-dual-click { cursor: pointer; border-radius: 5px; padding: 1px 3px; margin: -1px -3px; transition: background .15s ease; }
.ds-dual-click:hover { background: rgba(255,255,255,0.55); }
.ds-dual-click.open { background: rgba(255,255,255,0.75); }
.ds-dual-caret { flex: 0 0 12px; font-size: 9px; color: #8a94a6; transition: transform .18s ease; text-align: center; }
.ds-dual-caret.open { transform: rotate(180deg); color: #f0ad4e; }
/* 展开区：手风琴（max-height 动画） */
.ds-dual-detail { max-height: 0; overflow: hidden; transition: max-height .28s ease, opacity .2s ease; opacity: 0; margin: 0 0 0 122px; }
/* ★ v1149【3.3】：展开态改为「自适应高度 + 独立滚动」——
   原 max-height:1400px 固定值 + overflow:hidden → 内容超 1400px 被裁切且容器不能滚（拖不动）。
   现 max-height 取视口自适应（min(72vh, 3000px)），overflow-y:auto → 明细区自己滚到底。 */
.ds-dual-detail.open { max-height: min(80vh, 3000px); overflow-y: auto; -webkit-overflow-scrolling: touch; opacity: 1; margin: 2px 0 6px 122px; }
.ds-dual-detail.open::-webkit-scrollbar { width: 6px; }
.ds-dual-detail.open::-webkit-scrollbar-thumb { background: rgba(92, 107, 122, .35); border-radius: 3px; }
/* ★ v1149：机加工明细 —— 料块卡片网格（1 块 = 1 张卡，卡片数 = 统计数字） */
.ds-perf-mc-tip { font-size: 11.5px; color: var(--text-light, #999); padding: 2px 2px 4px; }
.ds-perf-mc-tip b { color: var(--text-color, #2c3e50); }
.v1140-perf-body .v1140-mc-grid .zx-card-img { aspect-ratio: 4 / 3; }
/* ★ v1149：手工模待做料块区（工序模块页顶部） */
.sg-manual-zone .ds-blk-body { max-height: none; }
.sg-manual-zone .ds-blk-group { margin-bottom: 12px; }
/* ★ v1149【3】：手工模工序页唯一入口卡（待做料块 XX副/XX块，点开展开详情） */
.sg-manual-entry { margin-bottom: 12px; }
.sg-manual-entry-btn { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; }
.sg-manual-entry-btn .ds-big-label { flex: 0 0 auto; font-weight: 700; }
.sg-manual-entry-btn .ds-big-pair { flex: 1 1 auto; }
.sg-manual-entry-btn .ds-big-go { flex: 0 0 auto; }
.ds-blk-btn-force { background: #b45309; white-space: nowrap; }
.ds-blk-btn-force:active { opacity: .85; }
/* ★ 手工模：卡片式切换按钮（参考进度跟踪 .zx-zone-card，加厚+数量+选中高亮） */
.sg-tab-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0 8px; }
.sg-tab-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 96px; padding: 14px 10px; border: 1px solid var(--border-light, #e3e6ea); border-radius: 12px;
  background: #fff; color: #475569; font-family: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .06); transition: all .12s; }
.sg-tab-card .sg-tab-label { font-size: 15px; font-weight: 700; }
.sg-tab-card .sg-tab-num { font-size: 24px; font-weight: 800; line-height: 1.1; color: var(--primary, #2E7D32); }
.sg-tab-card.on { background: var(--primary, #2E7D32); border-color: var(--primary, #2E7D32); color: #fff; box-shadow: 0 3px 10px rgba(46, 125, 50, .22); border-left: 4px solid #1b5e20; }
.sg-tab-card.on .sg-tab-num { color: #fff; }
.sg-tab-card:active { transform: scale(.985); }
/* ★ 手工模区卡片网格对齐进度跟踪（桌面多列、手机 2 列） */
.sg-manual-zone .ds-blk-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 768px) { .sg-manual-zone .ds-blk-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
/* ★ 手工模料块卡复用 .zx-zone-card，补充手工专属样式 + 放开溢出供「完成方式」下拉 */
.sg-blk-card { overflow: visible; display: flex; flex-direction: column; }
.sg-blk-card:hover { border-color: var(--primary, #2E7D32); box-shadow: 0 2px 8px rgba(46, 125, 50, .12); }
.sg-blk-card.done { opacity: 1; /* V4.3.7fix：去雾——已完成卡不再整卡透明，避免料块图发白 */ }
/* ★ V4.3.7 补丁：图片统一 200px 高（横图 cover/竖图 contain）+ 编号行左右分栏（收敛 .sg-blk-card 作用域，进度跟踪页零影响） */
.sg-blk-card .zx-zone-img { width: 100%; height: 260px; overflow: hidden; }
.sg-blk-card .zx-zone-img img { width: 100%; height: 100%; object-fit: contain; image-orientation: from-image; display: block; }
.sg-blk-card .zx-zone-img img.sg-img-land { width: 100%; height: 100%; object-fit: cover; display: block; }
.sg-blk-card .zx-zone-img img.sg-img-port { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block; }
@media (max-width: 768px) { .sg-blk-card .zx-zone-img { height: 200px; } }
.sg-blk-card .zx-zone-no.sg-blk-no-row { display: flex; justify-content: space-between; align-items: center; }
.sg-blk-cat { font-size: 11px; font-weight: 600; color: var(--text-secondary); margin: 2px 0 0; }
.sg-blk-state { font-size: 11px; font-weight: 600; margin-top: 4px; }
.sg-blk-state.wait { color: #B26A00; }
.sg-blk-state.done { color: #2E7D32; }
/* ★ 手工模视图本地搜索框（切换按钮下方、列表上方） */
.sg-manual-search { margin: 0 0 8px; }
.sg-manual-search-input { width: 100%; box-sizing: border-box; padding: 8px 12px; border: 1px solid var(--border-light, #e3e6ea); border-radius: 10px; font-family: inherit; font-size: 14px; }
/* ★V3.4.17：手工模「完成方式 ▼」下拉（原位替换原「⚡越级完成」按钮） */
.ds-blk-finish-wrap { position: relative; display: flex; flex-direction: row; align-items: center; }
.ds-blk-finish-menu {
  position: absolute; right: 0; bottom: 100%; margin-bottom: 5px;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 9px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .22); z-index: 60; min-width: 124px; overflow: hidden;
}
.ds-blk-finish-item {
  display: block; padding: 9px 12px; font-size: 12.5px; font-weight: 600; color: #1f2937;
  cursor: pointer; white-space: nowrap; border-top: 1px solid #f1f5f9;
}
.ds-blk-finish-item:first-child { border-top: none; }
.ds-blk-finish-item:hover { background: #f1f5f9; }
/* ★V3.4.17：机加工「今日/本月块数」统计条 */
.mc-perf-stats {
  margin: 8px 0 2px; padding: 8px 12px; font-size: 13px; color: #1f2937;
  background: #eef2f7; border: 1px solid #dbe3ec; border-radius: 9px;
}
.mc-perf-stats b { color: #b45309; font-size: 15px; }
/* ★V3.4.17：发货待发货池料块图条（按模具号聚合，一块一图动态追加） */
.fahuo-blk-strip-title { margin: 10px 0 4px; font-size: 13px; font-weight: 700; color: #1f2937; }
.fahuo-blk-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.fahuo-blk {
  width: 84px; border: 1px solid #e2e8f0; border-radius: 9px; overflow: hidden; background: #fff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, .08);
}
.fahuo-blk img { width: 100%; height: 84px; object-fit: cover; display: block; cursor: pointer; }
.fahuo-blk-name {
  display: block; font-size: 10.5px; color: #475569; padding: 3px 4px; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* ★V3.4.18：手工模详情页「越级▼」下拉（原位替换原「⏩ 越级」按钮）——仅管理员 */
.zx-sgm-bb-wrap { position: relative; display: inline-block; }
.zx-sgm-bb-menu {
  position: absolute; left: 0; bottom: 100%; margin-bottom: 5px;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 9px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .22); z-index: 60; min-width: 116px; overflow: hidden;
}
.zx-sgm-bb-item {
  display: block; padding: 9px 12px; font-size: 12.5px; font-weight: 600; color: #1f2937;
  cursor: pointer; white-space: nowrap; border-top: 1px solid #f1f5f9;
}
.zx-sgm-bb-item:first-child { border-top: none; }
.zx-sgm-bb-item:hover { background: #f1f5f9; }
.ds-dual-detail-body { border-left: 2px solid rgba(92,107,122,0.22); padding: 3px 0 3px 8px; }
.ds-dual-detail-loading, .ds-dual-detail-empty { font-size: 11.5px; color: var(--text-light, #999); padding: 4px 2px; }
/* ★ v1149.3：明细加载失败态 + 重试按钮（功能性，非动画掩盖） */
.ds-dual-detail-err { font-size: 12px; color: #e53935; padding: 8px 4px; line-height: 1.6; }
.ds-dual-retry { margin-top: 6px; padding: 4px 12px; font-size: 12px; border: 1px solid #e53935; color: #e53935; background: #fff; border-radius: 4px; cursor: pointer; }
.ds-dual-retry:hover { background: #e53935; color: #fff; }
/* ② 明细行：模具编号(粗) + 工序 + 时间 + 缩略图(40x40)，可点进详情页 */
.ds-dual-dr { display: grid; grid-template-columns: 92px 78px 1fr 40px; align-items: center; gap: 6px; padding: 3px 4px; border-radius: 5px; cursor: pointer; transition: background .12s ease; }
.ds-dual-dr:hover { background: rgba(255,255,255,0.7); }
.ds-dual-dr-no { font-size: 12px; font-weight: 700; color: #2c6fb5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-dual-dr-st { font-size: 11px; color: #5C6B7A; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-dual-dr-tm { font-size: 11px; color: var(--text-light, #999); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-dual-dr-thumb { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; border: 1px solid var(--border-light, #e5e7eb); background: #fff; }
.ds-dual-dr-empty { display: flex; align-items: center; justify-content: center; font-size: 16px; background: rgba(0,0,0,0.04); color: #b6bec9; }
/* ③ 设置页「绩效显示人员配置」分组多选：tag 组件，已选高亮 / 未选灰 */
.ds-pcfg-list { display: flex; flex-direction: column; gap: 10px; max-height: 62vh; overflow-y: auto; }
.ds-pcfg-block { border: 1px solid var(--border-light, #e5e7eb); border-radius: 8px; padding: 8px 10px 9px; background: #fbfcfd; }
.ds-pcfg-head { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--text-color, #2c3e50); margin-bottom: 6px; }
.ds-pcfg-head em { font-style: normal; font-weight: 500; font-size: 11px; color: var(--text-light, #999); }
.ds-pcfg-all { margin-left: 4px; font-size: 10.5px; font-weight: 500; color: #5C6B7A; background: rgba(92,107,122,0.10); border: none; border-radius: 5px; padding: 2px 7px; cursor: pointer; font-family: inherit; }
.ds-pcfg-all:hover { background: rgba(92,107,122,0.20); }
.ds-pcfg-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.ds-pcfg-tag { display: inline-flex; align-items: center; font-size: 12px; padding: 3px 9px; border-radius: 12px; border: 1px solid var(--border-light, #dfe3e8); background: rgba(0,0,0,0.03); color: #98a1b0; cursor: pointer; user-select: none; transition: all .14s ease; }
.ds-pcfg-tag:hover { border-color: #b9c2cd; }
.ds-pcfg-tag.on { background: rgba(92,184,92,0.14); border-color: rgba(92,184,92,0.55); color: #3d7d3d; font-weight: 600; }
@media (max-width: 640px) {
  .ds-dual-detail { margin-left: 0; }
  .ds-dual-detail.open { margin-left: 0; }
  .ds-dual-dr { grid-template-columns: 78px 1fr 34px; }
  .ds-dual-dr-tm { display: none; }
  .ds-dual-dr-thumb { width: 34px; height: 34px; }
}

/* ============ V2.2.77 补13·十二：进度跟踪页排序下拉 ============ */
/* 贴筛选条右侧（.dash-filter-bar 已是 flex + space-between → 放进去自动贴右） */
.dash-sort-sel {
  margin-left: auto; font-family: inherit; font-size: 13px; font-weight: 500;
  color: var(--text-color, #2c3e50); background: #fff;
  border: 1px solid rgba(99, 102, 241, 0.30); border-radius: 8px;
  padding: 5px 8px; min-height: 30px; cursor: pointer; max-width: 46%;
  outline: none; transition: border-color .14s ease, box-shadow .14s ease;
}
.dash-sort-sel:hover { border-color: rgba(99, 102, 241, 0.60); }
.dash-sort-sel:focus { border-color: rgba(99, 102, 241, 0.75); box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.14); }
.dash-sort-sel option { font-size: 13px; color: var(--text-color, #2c3e50); }
/* 补13追加十二·补丁 A.3：下拉右侧小灰字「当前排序：XXX」 */
.mold-sort-cur { font-size: 12px; color: #9aa3ad; margin-left: 10px; white-space: nowrap; align-self: center; }
/* V2.2.77 补13追加十四：单块料级越级（橙色警示，与「确认/编辑」区分） */
.zxau-btn-bypass {
  background: #ffedd5; border: 1.5px solid #fdba74; color: #c2410c;
  border-radius: 8px; font-size: 12px; font-weight: 700; padding: 4px 9px;
  cursor: pointer; white-space: nowrap; transition: all .2s;
}
.zxau-btn-bypass:hover { background: #fed7aa; border-color: #fb923c; color: #9a3412; }
/* 机加工待加工弹窗内的越级按钮 */
.pt-blk-bypass {
  margin-top: 6px; font-size: 11px; padding: 3px 9px; cursor: pointer;
  border: 1.5px solid #fdba74; border-radius: 8px;
  background: #ffedd5; color: #c2410c; font-weight: 700; white-space: nowrap;
}
.pt-blk-bypass:hover { background: #fed7aa; border-color: #fb923c; color: #9a3412; }
/* 越级弹窗 */
.block-bypass-modal .modal { max-width: 440px; width: calc(100% - 32px); }
/* ★补13追加十四·补丁2（问题1 修复）：越级弹窗必须盖住「数据总汇料块弹窗」(.mc-modal-mask = 9600)。
   .modal-overlay 基础 z-index 只有 200 → 从料块弹窗内点开的越级弹窗会被完全盖住（现场反馈「弹窗被遮挡」）。
   实测既有层级：.modal-overlay=200 | .mc-modal-mask=9600 | .pt-* 浮层=9700 | 顶层遮罩=9999
   → 本弹窗取 9750（> 9700，< 9999）。仅新增专属类，**共用 .modal-overlay 规则一行未改**。 */
.modal-overlay.block-bypass-modal { z-index: 9750; }
.block-bypass-modal .bb-cur {
  font-size: 13px; color: #475569; line-height: 1.6; margin-bottom: 12px;
  padding: 8px 10px; background: #f8fafc; border-radius: 6px;
}
.block-bypass-modal .bb-cur b { color: #0f2f5f; font-size: 15px; }
.block-bypass-modal .bb-label { display: block; font-size: 13px; font-weight: 700; color: #334155; margin-bottom: 6px; }
.block-bypass-modal .bb-tip { font-size: 12px; color: #8a93a0; line-height: 1.6; margin-top: 10px; }
.block-bypass-modal .bb-ops { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
@media (max-width: 768px) {
  .block-bypass-modal .modal { max-width: 94vw; }
}
/* V2.2.77 补13追加十四：登记页「清除筛选」小按钮 */
.reg-filter-clear {
  margin-left: 8px; font-size: 11px; padding: 3px 8px; cursor: pointer;
  border: 1px solid #dbe4f2; border-radius: 8px; background: #fff; color: #64748b;
  white-space: nowrap; align-self: center; transition: all .2s;
}
.reg-filter-clear:hover { border-color: #94a3b8; color: #334155; background: #f8fafc; }
/* 窄屏：下拉独占一行（不挤压筛选文案），宽度放开 */
@media (max-width: 640px) {
  .dash-filter-bar { flex-wrap: wrap; }
  .dash-sort-sel { margin-left: 0; width: 100%; max-width: 100%; }
  .mold-sort-cur { margin-left: 0; }
}

/* ==================== v1140：通用卡片组件（全线卡片化复用） ==================== */
.zx-card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 8px 0; }
@media (max-width: 1024px) { .zx-card-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px)  { .zx-card-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
@media (max-width: 420px)  { .zx-card-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; } }

.zx-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--border, #e2e8f0); border-radius: 12px; overflow: hidden;
  background: var(--card-bg, #fff); cursor: pointer;
  transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
  min-width: 0;
}
.zx-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.10); border-color: var(--primary, #2d7dd2); }
.zx-card:active { transform: scale(.985); }
.zx-card-imgwrap { display: flex; flex-direction: column; }
.zx-card-img {
  width: 100%; height: 132px; object-fit: cover; display: block;
  background: #eef1f5; border-bottom: 1px solid var(--border, #e2e8f0);
}
.zx-card-img-top { height: 118px; }
.zx-card-img-bottom { height: 96px; }
.zx-card-img-empty {
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; color: #b6bfca; background: #eef1f5;
}
.zx-card-body { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.zx-card-mold { font-weight: 700; font-size: 14px; color: var(--text, #1e293b); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zx-card-prod { font-size: 12px; color: var(--text-light, #64748b); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zx-card-cust { font-size: 12px; color: var(--text-light, #64748b); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zx-card-tag {
  display: inline-block; margin-top: 4px; align-self: flex-start;
  font-size: 11px; padding: 2px 8px; border-radius: 999px;
  background: rgba(45,125,210,.10); color: var(--primary, #2d7dd2);
}
.zx-card-detail { display: none; padding: 0 10px 10px; font-size: 12px; color: var(--text-light, #64748b); border-top: 1px dashed var(--border, #e2e8f0); margin-top: 4px; }
.zx-card.open .zx-card-detail { display: block; }
.zx-card.open { border-color: var(--primary, #2d7dd2); }
.zx-card.open .zx-card-img { border-bottom-color: var(--primary, #2d7dd2); }

.zx-card-link {
  margin-top: 6px; align-self: flex-start;
  font-size: 11px; padding: 3px 10px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--primary, #2d7dd2); background: transparent; color: var(--primary, #2d7dd2);
}
.zx-card-link:hover { background: var(--primary, #2d7dd2); color: #fff; }
.v1140-perf-body { display: block; }
.v1140-perf-grid, .v1140-mc-grid, .v1140-asm-grid, .v1140-manual-grid, .v1140-ship-grid { margin: 6px 0 10px; }

/* v1142：铁模装配「无铁料」灰色占位（中性，不冒充铁模/铝模图） */
.zx-card-img-noiron { font-size: 13px; font-weight: 700; color: #9aa4b2; background: #eef1f5; }
.zx-card-tag.zx-card-tag-noiron { background: rgba(154,164,178,.14); color: #6b7686; }

/* ==================== v1143：装配区卡片（沿用系统配色 + zx-card-grid 断点） ==================== */
.tm-card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 8px 0; }
@media (max-width: 1024px) { .tm-card-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px)  { .tm-card-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
@media (max-width: 420px)  { .tm-card-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; } }

.tm-card {
  display: flex; flex-direction: column; overflow: hidden; min-width: 0;
  background: var(--card); border: 1px solid var(--border-light);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
  transition: box-shadow var(--t-fast), border-color var(--t-fast);
}
.tm-card:hover { border-color: var(--primary-light); box-shadow: var(--shadow-lg); }

/* ① 主图：占满卡片宽度 */
.tm-card-main { position: relative; height: 132px; background: var(--bg); flex: 0 0 auto; }
.tm-card-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tm-card-main.is-none { display: flex; align-items: center; justify-content: center; font-size: 28px; color: #b6bfca; background: var(--bg); }

/* ② 两张块图并排：铁模上|铁模下（无铁料 → 铝模上|铝模下） */
.tm-card-blocks { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 6px; }
.tm-card-blk { position: relative; height: 66px; border-radius: 8px; overflow: hidden; background: var(--bg); border: 1px solid var(--border-light); }
.tm-card-blk img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tm-card-blk span {
  position: absolute; left: 4px; bottom: 3px;
  font-size: 11px; line-height: 1.4; padding: 1px 6px; border-radius: 999px;
  background: rgba(31, 41, 55, .62); color: #fff;
}

/* ③ 基本信息 */
.tm-card-body { padding: 4px 10px 8px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tm-card-no { font-size: 14px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-card-prod { font-size: 12px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-card-meta { font-size: 12px; color: var(--text-light); }
.tm-card-sub { font-size: 11px; color: var(--text-light); }

/* 状态标签：轻量，不抢主视觉（沿用 tm-asg-tag 配色） */
.tm-card-tag {
  align-self: flex-start; margin-top: 4px; font-weight: 400;
  display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px;
  background: var(--primary-soft); color: var(--primary);
}
.tm-card-tag-done  { background: #e6f4ee; color: #14735a; }
.tm-card-tag-pend  { background: #fdf1dd; color: #b45309; }
.tm-card-tag-block { background: #f3f4f6; color: #9ca3af; }
.tm-card-tag-out   { background: #f1ecfb; color: #573fa8; }

/* ④ 底部按钮：描边款，不抢眼 */
.tm-card-ops { display: flex; gap: 6px; padding: 0 8px 10px; }
.tm-card-ops .btn { flex: 1 1 0; min-width: 0; padding: 5px 4px; font-size: 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 768px) { .tm-card-ops .btn { font-size: 11px; padding: 5px 2px; } }

/* 外协卡：拍照区 */
.tm-card-photo { padding: 0 8px 6px; }
.tm-card-photo-t { font-size: 11px; color: var(--text-light); margin-bottom: 4px; }
.tm-card-photo-grid { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 4px; }
.tm-card-photo-grid img { width: 46px; height: 46px; object-fit: cover; border-radius: 6px; cursor: pointer; border: 1px solid var(--border-light); }
.tm-card-photo-btns { display: flex; gap: 6px; }
.tm-card-photo-btns .btn { flex: 1 1 0; padding: 4px; font-size: 12px; }

/* 视图切换按钮（卡片 ⇄ 表格） */
.tm-view-toggle {
  padding: 5px 12px; font-size: 12px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--border); background: var(--card); color: var(--text-secondary);
  transition: all var(--t-fast);
}
.tm-view-toggle:hover { border-color: var(--primary-light); color: var(--primary); }
.tm-view-toggle.on { background: var(--primary-soft); border-color: var(--primary-light); color: var(--primary); }
.tm-ot-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }

/* ===== v1150.15：编程区卡片式（待制作/进行中/已完成） ===== */
.prog-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.prog-card { display: flex; gap: 10px; background: var(--card-bg, #fff); border: 1px solid var(--border); border-radius: 10px; padding: 10px; transition: box-shadow .15s, transform .1s; }
.prog-card:hover { box-shadow: 0 3px 12px rgba(0,0,0,.10); }
.prog-card-img { flex: 0 0 84px; width: 84px; height: 84px; border-radius: 8px; overflow: hidden; background: #f1f3f6; display: flex; align-items: center; justify-content: center; color: #c7ccd4; }
.prog-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prog-card-img i { font-size: 28px; }
.prog-card-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.prog-card-no { font-size: 18px; font-weight: 700; line-height: 1.2; }
.prog-card-meta { font-size: 12px; color: var(--text-light); }
.prog-card-status { align-self: flex-start; font-size: 12px; padding: 1px 9px; border-radius: 10px; margin-top: 2px; }
.prog-card-status.st-todo { background: #eef1f5; color: #6b7280; }
.prog-card-status.st-doing { background: #e6f0ff; color: #2563eb; }
.prog-card-status.st-done { background: #e7f7ec; color: #16a34a; }
/* v3.4.3：卡片料块预览（prog-cblk，避开详情页 .prog-block 同名冲突）—— object-fit:contain 完整不裁切、横图横显、标签完整、容器不写死高度 */
.prog-blocks { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border); align-items: flex-start; }
.prog-cblk { width: 76px; text-align: center; flex: 0 0 auto; }
.prog-cblk img { display: block; width: 76px; height: auto; max-height: 96px; object-fit: contain; border-radius: 6px; border: 1px solid var(--border); background: #fff; cursor: pointer; }
.prog-cblk-empty { display: inline-flex; width: 76px; height: 60px; align-items: center; justify-content: center; border-radius: 6px; background: #f1f3f6; color: #c7ccd4; border: 1px solid var(--border); }
.prog-cblk-label { font-size: 11px; color: var(--text); margin-top: 4px; line-height: 1.25; word-break: break-all; }
/* v3.4.3：编程三卡片分组标题（待制作/进行中/已完成） */
.prog-sec { margin-bottom: 16px; }
.prog-sec-title { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--text); margin: 4px 0 10px; }
.prog-sec-count { font-size: 12px; font-weight: 600; color: var(--text-light); background: var(--bg); border: 1px solid var(--border-light); border-radius: 10px; padding: 0 8px; }

/* ===== ★V3.4.15 模块B：模具总数卡片（两列信息 + 全部料块缩略图 + 加急右上） ===== */
.total-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.total-card { background: var(--card-bg, #fff); border: 1px solid var(--border); border-radius: 10px; padding: 12px; position: relative; transition: box-shadow .15s; }
.total-card:hover { box-shadow: 0 3px 12px rgba(0,0,0,.10); }
.total-card .urgent-tag { left: auto; right: -1px; border-radius: 0 10px 0 8px; }
.total-card-no { font-size: 18px; font-weight: 400; line-height: 1.3; margin-bottom: 8px; padding-right: 58px; }
.tc-no-num { font-weight: 400; }
.tc-no-model { font-weight: 700; }
.total-card-info { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 14px; }
.tci-row { display: flex; gap: 6px; font-size: 12.5px; line-height: 1.5; min-width: 0; }
.tci-k { flex: 0 0 60px; color: var(--text-light); }
.tci-v { flex: 1 1 auto; color: var(--text); font-weight: 400; word-break: break-all; }
.total-card-imgs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.total-card-img { width: 72px; text-align: center; }
.total-card-img img { width: 72px; height: 54px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); background: #f1f3f6; cursor: pointer; }
.total-card-img-empty { display: inline-flex; width: 72px; height: 54px; align-items: center; justify-content: center; border-radius: 6px; background: #f1f3f6; color: #c7ccd4; border: 1px solid var(--border); }
.total-card-img-label { font-size: 10px; color: var(--text-light); margin-top: 3px; line-height: 1.2; word-break: break-all; }

/* ===== ★V3.4.16 模块B/C：进行中卡片工序色块（动态显隐 + 三态同色系[石板灰]深浅·无彩 + 全局无粗体 + 可点击跳转） ===== */
.flow-nodes { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.flow-node { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 400; padding: 3px 12px; border-radius: 999px; white-space: nowrap; cursor: pointer; }
.flow-card-info { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 3px; font-size: 12px; line-height: 1.5; }
.fci-item { color: var(--text); }
.fci-k { color: var(--text-light); margin-right: 3px; }
.flow-mark { font-weight: 400; }
/* 模块B：全局取消加粗 —— 编号黑字不加粗（仅作用进行中卡，避免影响其它 prog-card）*/
.inprogress-flow-card .prog-card-no { font-weight: 400; color: #111; }
/* 三态色块 = 同色系(石板灰)仅深浅、无红/绿/彩：已完成最深实色 #5C6B7A(白字) / 进行中中等 #B8BEC8(深字) / 未开始最淡 #F0F1F3(灰字)；取意数据总汇机床状态灰系(style.css:9060-9066) */
.flow-done { background: #5C6B7A; color: #FFFFFF; }
.flow-cur { background: #B8BEC8; color: #262b33; }
.flow-todo { background: #F0F1F3; color: #5F6368; }

/* ===== ★V3.4.14 P5：导出外账弹窗 ===== */
.export-outer-hint { font-size: 12px; color: var(--text-light); margin-bottom: 10px; }
.export-outer-list { max-height: 46vh; overflow: auto; border: 1px solid var(--border); border-radius: 8px; }
.eo-row { display: grid; grid-template-columns: 22px 1.2fr 1.4fr 1fr 1fr; gap: 6px; align-items: center; padding: 6px 10px; border-bottom: 1px solid var(--border-light); font-size: 13px; cursor: pointer; }
.eo-row:nth-child(even) { background: var(--bg); }
.eo-row input { margin: 0; }
/* ★V3.4.15 导出外账：时间范围切换（近一星期/近一月） */
.eo-range-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.eo-range-label { font-size: 13px; color: var(--text-light); }
.eo-range-btn { font-size: 13px; padding: 4px 14px; border: 1px solid var(--border); background: var(--bg); color: var(--text); border-radius: 16px; cursor: pointer; transition: all var(--t-fast, .15s); }
.eo-range-btn:hover { border-color: var(--primary, #2563eb); }
.eo-range-btn.active { background: var(--primary, #2563eb); color: #fff; border-color: var(--primary, #2563eb); font-weight: 600; }
.eo-range-count { font-size: 12px; color: var(--text-light); margin-left: auto; }
@media (max-width: 640px) {
  .prog-card-grid { grid-template-columns: 1fr; }
  .prog-card-img { flex-basis: 72px; width: 72px; height: 72px; }
}
/* ★V3.4.21：手机端「模具总数」卡片一行一卡（≤767px）；桌面端 ≥768px 保持 .total-card-grid 默认 repeat(2,minmax(0,1fr)) 两列不变 */
@media (max-width: 767px) {
  .total-card-grid { grid-template-columns: 1fr; }
}
/* v1150.15：空框治理——无照片的料块缩略图不画边框空框，仅边框图标占位（修复 W6429 铝模上/下/小件空框） */
.mc-bar-item-photo:has(.mc-bar-item-empty) { border: 0; background: transparent; }
.mc-bar-item-empty { border: 0; background: transparent; color: #c7ccd4; }

/* ===== v3.4.5：编程工序模块页顶部四张筛选卡（待制作/已完成/待修模/修模完成） ===== */
.sm-prog-bar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.sm-prog-card { background: var(--card, #fff); border-radius: var(--radius-lg, 12px); padding: 16px 12px; min-height: 96px; box-sizing: border-box; box-shadow: 0 4px 16px rgba(0,0,0,.12); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer; text-align: center; transition: transform .18s, box-shadow .18s; border: 2px solid transparent; }
.sm-prog-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.sm-prog-card.on { border-color: var(--primary, #2563eb); }
.sm-prog-num { font-size: 30px; font-weight: 800; line-height: 1; color: var(--text-primary, #1f2937); font-variant-numeric: tabular-nums; }
.sm-prog-num em { font-size: 13px; font-weight: 700; font-style: normal; margin-left: 3px; color: var(--text-secondary, #6b7280); }
.sm-prog-label { font-size: 13px; font-weight: 600; color: var(--text-secondary, #6b7280); }
.sm-prog-todo    .sm-prog-num { color: #b45309; }
.sm-prog-done    .sm-prog-num { color: var(--success, #15803d); }
.sm-prog-rep     .sm-prog-num { color: #6b4ba3; }
.sm-prog-repdone .sm-prog-num { color: #0e7490; }
.sm-prog-hint { text-align: center; color: var(--text-light, #94a3b8); font-size: 13px; padding: 28px 0; }
@media (max-width: 640px) {
  .sm-prog-bar { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .sm-prog-num { font-size: 24px; }
}

/* ===== v3.4.5：数据中心首页四张统计卡（.zx-stat-bar/.zx-card）—— 手机端一排两张（两行），电脑端仍一排四张 ===== */
/*   10399 的 repeat(4) 会覆盖 8816 的手机端 repeat(2)，故在此（文件末尾）再加一次，确保移动端两列胜出 */
@media (max-width: 640px) {
  .zx-stat-bar { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
  .zx-stat-bar .zx-card { min-height: 116px; box-shadow: 0 6px 20px rgba(0,0,0,.14); }
  .zx-stat-bar .zx-card-num { font-size: 28px; }
}


/* v3.4.7：机加工未上料料块 → 只文字卡（不画空预览框、不裂图、无图不占布局） */
.zx-card-notext { background: var(--card-bg, #fff); border: 1px solid var(--border, #e2e8f0); border-radius: 12px; padding: 10px 10px 12px; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.10); transition: box-shadow .15s ease, border-color .15s ease; }
.zx-card-notext:hover { box-shadow: 0 6px 18px rgba(0,0,0,.14); border-color: var(--primary, #2d7dd2); }
.zx-card-notext .zx-card-mold { font-size: 15px; }
.zx-card-notext .zx-card-detail { display: block; }
.zx-card-notext .zx-card-tag { background: #eef1f5; color: #6b7280; }

/* ===== v3.4.8：发货页卡片视图（待发货 / 已发货 可切换；电脑 2 列 / 手机 1 列） ===== */
.ship-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 8px 0; }
.ship-card { background: var(--card-bg, #fff); border: 1px solid var(--border, #e2e8f0); border-radius: 12px; padding: 10px; cursor: pointer; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 2px 10px rgba(0,0,0,.06); transition: box-shadow .15s, transform .12s; }
.ship-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,.12); transform: translateY(-2px); }
.ship-card-top { display: flex; gap: 10px; align-items: flex-start; }
.ship-card-info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ship-card-no { font-size: 17px; font-weight: 700; color: var(--text, #1e293b); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ship-card-meta { font-size: 12px; color: var(--text-light, #64748b); word-break: break-word; }
.ship-card-blocks { font-size: 12px; color: var(--text-light, #64748b); }
.ship-card-sets { font-size: 12px; color: var(--text-light, #64748b); }
.ship-card-status { align-self: flex-start; font-size: 12px; padding: 2px 9px; border-radius: 999px; background: #eef1f5; color: #6b7280; white-space: nowrap; }
.ship-card-status.done { background: #e7f7ec; color: #16a34a; }
/* v3.4.8：机加工料块「无图」规范占位（不裂图、不占图片布局） */
.zx-card-noimg { display: inline-block; align-self: flex-start; margin-top: 4px; font-size: 11px; padding: 2px 8px; border-radius: 999px; background: #f1f3f6; color: #9aa3af; border: 1px dashed #cbd5e1; }
@media (max-width: 640px) {
  .ship-card-grid { grid-template-columns: 1fr; gap: 10px; }
}

/* ===== v3.4.9：① 移动端登录页居中修复 =====
   现象：手机端登录页不在居中、整体偏到旁边/变形。
   根因：.login-wrap 用 min-height:100vh + overflow:hidden + align-items:center
        → ① 移动端 100vh 大于可视高度（地址栏占位）→ 居中基准线被推低，页面整体偏下；
           ② 卡片内容高于视口时被 overflow:hidden 裁切 → 变形且无法滚动。
   修复：min-height 追加 100dvh（动态视口，随地址栏收放实时变化）；overflow 改纵向可滚动；
        .login-card 用 margin:auto 居中（内容超高时也不会被裁）；小屏收紧内边距。 */
.login-wrap { min-height: 100vh; min-height: 100dvh; overflow-x: hidden; overflow-y: auto; align-items: center; justify-content: center; }
.login-card { margin: auto; }
/* ★V3.4.12：登录卡片与页脚改竖排 —— 根因是 .login-wrap 默认 flex-direction:row，把无样式的 .login-footer
   挤到登录卡右侧，窄屏（手机）直接溢出截断→「变形/页脚串到旁边」。改 column 让卡片在上、页脚在下并居中。 */
.login-wrap { flex-direction: column; }
.login-footer { width: 100%; text-align: center; margin-top: 14px; font-size: 12px; color: rgba(255, 255, 255, 0.9); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15); }
@media (max-width: 480px) {
  .login-wrap { padding: 12px; }
  .login-card { padding: 24px 18px; }
  .login-logo { width: 150px; max-width: 72%; }
}

/* ===== v3.4.9：② 编程卡片加急角标（右上角红色，电脑/手机均可见） ===== */
.prog-card { position: relative; }
.prog-card-urgent { position: absolute; top: 0; right: 0; z-index: 3; background: #e5484d; color: #fff; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 0 10px 0 10px; box-shadow: 0 2px 6px rgba(229,72,77,.35); letter-spacing: .5px; pointer-events: none; }

/* ===== v3.4.9：③ 发货页顶部卡副标题 / 部分已发状态 ===== */
.sm-prog-sub { font-size: 11px; font-weight: 400; color: var(--text-light, #64748b); margin-top: 3px; line-height: 1.3; }
.ship-card-status.part { background: #fff7e6; color: #d46b08; }

/* ===== V4.2.4：发货卡片信息增强 + 「纠正副数」纯前端临时调整 ===== */
/* 客户名：紧随编号的大字（重于 meta）；铸造单位 / 登记拆分 / 已发待发进度各自独立成行 */
.ship-card-customer { font-size: 15px; font-weight: 700; color: var(--primary, #2d7dd2); word-break: break-word; line-height: 1.25; }
.ship-card-cast { font-size: 12px; color: var(--text-light, #64748b); word-break: break-word; }
.ship-card-reg { font-size: 12px; font-weight: 600; color: var(--text, #1e293b); }
.ship-card-progress { font-size: 12px; color: var(--text-light, #64748b); }
.ship-card-adj { font-style: normal; color: #d46b08; font-weight: 600; }
.ship-card-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ship-card-adj-btn { font-size: 12px; }

/* 「纠正副数」轻量弹窗（复用 .modal-overlay / .modal 体系，仅补文案与输入区） */
.ship-adj-title { font-size: 16px; font-weight: 700; color: var(--text, #1e293b); margin-bottom: 10px; }
.ship-adj-hint { font-size: 13px; line-height: 1.6; color: var(--text-light, #64748b); margin-bottom: 14px; }
.ship-adj-field { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ship-adj-field label { font-size: 13px; color: var(--text, #1e293b); white-space: nowrap; }
.ship-adj-field input { flex: 1 1 auto; min-width: 120px; padding: 7px 10px; border: 1px solid var(--border, #e2e8f0); border-radius: 8px; font-size: 14px; }
.ship-adj-tip { font-size: 12px; line-height: 1.5; color: #d46b08; background: #fff7e6; border-radius: 8px; padding: 8px 10px; }
.ship-adj-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }

/* V4.2.4：选中发往单位后「关联该单位的待发模具」只读展示（口径 = 待发节点去重） */
.fahuo-pend-unit-box { margin: 8px 0; padding: 10px 12px; border: 1px solid var(--border, #e2e8f0); border-radius: 10px; background: var(--card-bg, #fff); }
.fahuo-pend-unit-title { font-size: 12px; font-weight: 600; color: var(--text, #1e293b); margin-bottom: 8px; }
.fahuo-pend-unit-list { display: flex; flex-wrap: wrap; gap: 6px; }
.fahuo-pend-unit-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 4px 9px; border-radius: 999px; background: #eef4ff; color: #1e293b; border: 1px solid #dbe7ff; }
.fahuo-pend-unit-chip em { font-style: normal; color: #d46b08; font-weight: 600; }
.fahuo-pend-unit-empty { font-size: 12px; color: var(--text-light, #64748b); }

/* ===== v3.4.9：① 造型区「今日 / 本月」双数字颜色区分 =====
   旧问题：.zx-card-tm .zx-card-num 两个数字同色（primary 蓝）→ 看不出哪是今天、哪是本月。
   新规则：今日 = 高亮橙红 + 加粗 + 略大；本月 = 常规蓝灰。手机端两行上下排、各占一行。 */
.zx-card-tm .zx-row-today { justify-content: flex-start; }
.zx-card-tm .zx-row-month { justify-content: flex-start; }
.zx-card-tm .zx-num-today { color: #e5484d !important; font-size: 30px !important; font-weight: 900 !important; text-shadow: 0 1px 0 rgba(255,255,255,.6); }
.zx-card-tm .zx-num-month { color: #2563eb !important; font-size: 24px !important; font-weight: 700 !important; }
.zx-card-tm .zx-lab-today { color: #e5484d; font-weight: 800; }
.zx-card-tm .zx-lab-month { color: #2563eb; font-weight: 600; }
.zx-card-tm .zx-row-today, .zx-card-tm .zx-row-month { width: 100%; }
@media (max-width: 640px) {
  .zx-card-tm .zx-card-row { flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; }
  .zx-card-tm .zx-num-today { font-size: 28px !important; }
  .zx-card-tm .zx-num-month { font-size: 22px !important; }
}

/* ===== v3.4.9：② 造型卡「造型人姓名」徽标（右上角） ===== */
.zx-done-maker { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; font-size: 12px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #6366f1, #8b5cf6); border-radius: 999px; padding: 1px 9px; white-space: nowrap; }

/* ===== V3.4.23：客户明细→开票 ① 勾选合计行 ② 开票记录按票分组 ===== */
.inv-sel-summary { margin:8px 0 6px; padding:8px 12px; background:linear-gradient(135deg,#eef4ff,#f5f9ff); border:1px solid #d6e4ff; border-radius:10px; font-size:14px; color:#1f3a5f; }
.inv-sel-summary #invoice-selected-total,
.inv-sel-summary #invoice-selected-count { color:#b45309; font-variant-numeric:tabular-nums; }
/* V3.4.23b：开票全选按钮（toggler）+ 历史结转行 */
.inv-sel-summary { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; }
.inv-sel-summary .inv-sel-total-txt { font-weight:600; }
#invoice-select-all-btn { white-space:nowrap; }
.inv-carry-row { background:#f1f5f9; }
.inv-carry-row td { color:#475569; }
.inv-carry-tag { display:inline-block; font-size:12px; padding:1px 8px; border-radius:999px; background:#e2e8f0; color:#64748b; font-weight:600; }
.inv-carry-row .inv-amt { background:#f8fafc; color:#475569; }
.inv-groups { display:flex; flex-direction:column; gap:10px; }
.inv-group { background:#f5f7fa; border:1px solid #e3e8ef; border-left:3px solid #2563eb; border-radius:10px; overflow:hidden; }
.inv-group.inv-group-alt { background:#f3f0fb; border-left-color:#8b5cf6; }
.inv-group-head { display:flex; flex-wrap:wrap; gap:8px 18px; align-items:center; padding:8px 12px; background:rgba(37,99,235,.07); font-size:13px; font-weight:600; color:#334155; border-bottom:1px solid rgba(0,0,0,.05); }
.inv-group-alt .inv-group-head { background:rgba(139,92,246,.07); }
.inv-g-sum { margin-left:auto; color:#0f172a; }
.inv-g-sum strong { color:#b45309; font-variant-numeric:tabular-nums; }
.inv-group .imp-tbl-wrap { margin:0; }
.inv-group-tbl { margin:0; border:0; border-radius:0; }
.inv-group-tbl thead th { background:#fff; font-size:12px; }
@media (max-width:767px){
  .inv-group-head { font-size:12px; gap:6px 12px; }
}

/* ===== V3.4.26 开票记录：发票图片 缩略图 / 上传按钮 / 筛选栏 / 放大预览 ===== */
.inv-g-ctrl { display:flex; gap:6px; align-items:center; flex-wrap:wrap; margin-left:auto; }
/* 缩略图：40×40 圆角；有图绿框，无图灰框 */
.inv-thumb { width:40px; height:40px; border-radius:8px; border:2px solid #cbd5e1; background:#f1f5f9; display:inline-flex; align-items:center; justify-content:center; overflow:hidden; font-size:20px; color:#64748b; cursor:default; flex:0 0 auto; }
.inv-thumb.has { border-color:#16a34a; background:#ecfdf5; color:#16a34a; cursor:pointer; }
.inv-thumb img { width:100%; height:100%; object-fit:cover; display:block; }
/* 上传 / 操作按钮（手机端够大好点） */
.inv-up-btn { font-size:13px; line-height:1; padding:7px 10px; border:1px solid #cbd5e1; background:#fff; color:#334155; border-radius:8px; cursor:pointer; white-space:nowrap; }
.inv-up-btn:hover { background:#f1f5f9; border-color:#94a3b8; }
.inv-up-btn.inv-del { color:#dc2626; border-color:#fecaca; background:#fef2f2; }
.inv-up-btn.inv-del:hover { background:#fee2e2; }
/* 筛选栏 */
.inv-filter-bar { display:flex; flex-wrap:wrap; gap:10px 14px; align-items:center; padding:10px 12px; margin-bottom:10px; background:#f8fafc; border:1px solid #e3e8ef; border-radius:10px; }
.inv-f-label { font-size:13px; color:#475569; display:inline-flex; align-items:center; gap:6px; font-weight:600; }
.inv-f-sel { font-size:13px; padding:6px 8px; border:1px solid #cbd5e1; border-radius:8px; background:#fff; color:#334155; }
.inv-f-kw-wrap { flex:1 1 160px; }
.inv-f-kw { width:100%; font-size:13px; padding:7px 10px; border:1px solid #cbd5e1; border-radius:8px; background:#fff; color:#334155; box-sizing:border-box; }
/* 放大预览遮罩：居中、深色半透明、点外关闭 */
.inv-preview-overlay { position:fixed; inset:0; background:rgba(15,23,42,.82); display:none; align-items:center; justify-content:center; z-index:9999; padding:16px; }
.inv-prev-wrap { width:min(960px,100%); max-height:92vh; display:flex; flex-direction:column; background:#0f172a; border-radius:12px; overflow:hidden; }
.inv-prev-bar { display:flex; align-items:center; gap:10px; padding:10px 14px; background:#1e293b; color:#e2e8f0; }
.inv-prev-info { flex:1; font-size:13px; color:#cbd5e1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.inv-prev-nav, .inv-prev-close { flex:0 0 auto; width:38px; height:38px; border:1px solid #334155; background:#0f172a; color:#e2e8f0; border-radius:8px; font-size:18px; cursor:pointer; }
.inv-prev-close { width:auto; padding:0 14px; }
.inv-prev-nav:hover, .inv-prev-close:hover { background:#334155; }
.inv-prev-stage { flex:1; min-height:0; display:flex; align-items:center; justify-content:center; overflow:auto; background:#0b1220; padding:10px; }
.inv-prev-img { max-width:100%; max-height:100%; width:auto; height:auto; object-fit:contain; touch-action:auto; cursor:zoom-in; }
.inv-prev-pdf { width:100%; height:78vh; border:0; background:#fff; }
.inv-prev-tip { position:absolute; bottom:14px; left:50%; transform:translateX(-50%); background:rgba(15,23,42,.7); color:#e2e8f0; font-size:12px; padding:6px 12px; border-radius:999px; }
@media (max-width:767px){
  .inv-up-btn { padding:11px 14px; font-size:14px; }   /* 手机端按钮 ≥44px 高，好点 */
  .inv-g-ctrl { width:100%; margin-left:0; }
  .inv-prev-pdf { height:70vh; }
}
/* ===== V3.4.27 发票操作下拉 + 缩略图点击 ===== */
.inv-thumb-wrap { display:inline-flex; cursor:pointer; flex:0 0 auto; }
.inv-op { position:relative; display:inline-flex; align-items:center; flex:0 0 auto; }
.inv-op-btn { font-size:13px; line-height:1; padding:7px 10px; border:1px solid #cbd5e1; background:#fff; color:#334155; border-radius:8px; cursor:pointer; white-space:nowrap; }
.inv-op-btn:hover { background:#f1f5f9; border-color:#94a3b8; }
.inv-op-menu { position:absolute; top:calc(100% + 6px); right:0; min-width:168px; background:#fff; border:1px solid #e3e8ef; border-radius:10px; box-shadow:0 10px 28px rgba(15,23,42,.18); padding:6px; z-index:80; display:none; flex-direction:column; }
.inv-op-menu.open { display:flex; }
.inv-op-item { display:block; padding:9px 12px; font-size:13px; color:#334155; border-radius:7px; cursor:pointer; white-space:nowrap; }
.inv-op-item:hover { background:#f1f5f9; }
.inv-op-item.inv-op-del { color:#dc2626; font-weight:600; }
.inv-op-item.inv-op-del:hover { background:#fef2f2; }

/* ==================== V3.4.27 优化⑥：机加工区料块「🔥加急」标识 ==================== */
/* 卡片容器加急高亮（左红边 + 浅红底），与「🔥加急」标签呼应；数据汇总页(.ds-blk-card) / 进度跟踪页(.pt-blk-card) 共用 */
.ds-blk-card.blk-urgent,
.pt-blk-card.blk-urgent { border-color:#f87171; background:#fff7f6; box-shadow:0 2px 10px rgba(239,68,68,.10); }
/* 醒目红色标签：手机端 ≥44px 高，好点；字号偏大、红底白字、圆角微凸 */
.blk-urgent-tag {
  display:inline-block; vertical-align:middle; margin-left:6px; padding:2px 9px;
  font-size:12px; font-weight:700; line-height:18px; letter-spacing:.5px;
  color:#fff; background:#ef4444; border-radius:999px; box-shadow:0 1px 4px rgba(239,68,68,.35);
}
@media (max-width:767px){
  .blk-urgent-tag { padding:4px 12px; font-size:13px; line-height:20px; margin-left:8px; }  /* 手机端 ≥44px 点按区 */
}
@media (max-width:767px){
  .inv-op-btn { padding:11px 14px; font-size:14px; }     /* 手机端 ≥44px 高，好点 */
  .inv-op-item { padding:12px 14px; font-size:14px; }
  .inv-op-menu { min-width:184px; right:0; }
}

/* ==================== V3.4.28：客户统计页「对账单发送状态」 ==================== */
.stmt-sent {
  border-left: 4px solid var(--success);
  background: linear-gradient(135deg, #f0fdf4 0%, #fff 60%);
}
.stmt-sent-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  background: #dcfce7;
  color: #15803d;
  margin-left: 6px;
  vertical-align: middle;
}
.stmt-chk-row {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}
.stmt-chk {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--success);
}
.stmt-toggled {
  background: #dcfce7;
  color: #15803d;
  border-color: #86efac;
}
.stmt-toggled:hover { background: #bbf7d0; }
/* 顶部筛选 + 批量工具条 */
.acc-stmt-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin: 10px 0 6px;
  padding: 8px 10px;
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: 10px;
}
.acc-stmt-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.acc-chip {
  border: 1px solid var(--border-light);
  background: var(--bg);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  transition: all var(--t);
}
.acc-chip:hover { border-color: var(--primary); color: var(--primary); }
.acc-chip.on {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 700;
}
.acc-stmt-summary { margin-left: 8px; font-size: 13px; color: var(--text-light); }
.acc-stmt-summary strong { color: var(--text); }
.acc-stmt-batch { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
@media (max-width:767px){
  .stmt-chk { width: 22px; height: 22px; }            /* 手机端 ≥44px 点按区 */
  .acc-stmt-bar { flex-direction: column; align-items: stretch; }
  .acc-chip { padding: 9px 16px; font-size: 14px; }     /* 手机端好点 */
}
/* V3.4.30：数据总汇综合下拉筛选条（与全局搜索框无关） */
.acc-filter-bar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin: 6px 0 10px; padding: 8px 10px;
  background: var(--card); border: 1px solid var(--border-light); border-radius: 10px;
}
.acc-filter-sel { width: auto; min-width: 134px; padding: 6px 10px; font-size: 13px; cursor: pointer; }
@media (max-width:767px){
  .acc-filter-sel { flex: 1 1 calc(50% - 8px); min-width: 0; }
}
/* V3.4.31：进度跟踪顶部红点（待确认统一入口；纯红圆+数字，0 隐藏，不写死不缓存） */
.pt-confirm-dot {
  position: absolute; top: -8px; right: -8px; z-index: 1100;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: #e53935; color: #fff; border-radius: 9px;
  display: none; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; line-height: 1;
  box-shadow: 0 2px 6px rgba(0,0,0,.25); cursor: pointer;
}
.pt-confirm-dot:empty { display: none; }
.tab-item { position: relative; }
/* V3.4.33：待确认区三子项 + 修模记录只读标记 */
.rp-zone-items { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.rp-zone-item { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 600; cursor: pointer; padding: 3px 8px; border-radius: 7px; background: rgba(99,102,241,.08); }
.rp-zone-item:hover { background: rgba(99,102,241,.16); }
.rp-zone-item b { color: #e53935; font-size: 14px; }
.rp-readonly-tag { color: var(--text-light); font-size: 12px; }
/* V3.4.31：待确认中心 Modal（独立于 rp modal，避免覆盖冲突） */
.cc-modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: none; align-items: center; justify-content: center; z-index: 1102; }
.cc-modal-box { background: var(--card, #fff); border-radius: 12px; width: min(680px, 94vw); max-height: 86vh; overflow: auto; box-shadow: 0 10px 40px rgba(0,0,0,.3); }
.cc-tabs { display: flex; gap: 8px; padding: 12px 16px 0; }
.cc-tab { flex: 1; padding: 10px; border: 1px solid var(--border-light, #ddd); background: #f5f5f5; border-radius: 8px 8px 0 0; cursor: pointer; font-weight: 600; color: #666; }
.cc-tab.on { background: var(--card, #fff); color: #c0431c; border-bottom-color: var(--card, #fff); }
.cc-tab-body { padding: 12px 16px 16px; }
.cc-pc-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border-light, #f0f0f0); font-size: 13px; flex-wrap: wrap; }
.cc-pc-field { font-weight: 600; min-width: 72px; }
.cc-pc-old { color: #999; text-decoration: line-through; }
.cc-pc-arrow { color: #c0431c; font-weight: 700; }
.cc-pc-new { color: #1a7f37; font-weight: 600; }
.rp-center-btns { display: flex; flex-direction: column; gap: 12px; padding: 8px 0; }


/* v1149【4】手工模账号页：待做/已完成 双切换按钮 */
.manual-view-tabs { display: flex; gap: 10px; margin: 10px 0 6px; }
.manual-tab { flex: 1; padding: 11px 12px; border: 1px solid var(--border-light, #e3e6ea); border-radius: 11px; background: #fff; color: #475569; font-family: inherit; font-size: 15px; font-weight: 700; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: all .12s; }
.manual-tab.on { background: var(--primary, #2E7D32); border-color: var(--primary, #2E7D32); color: #fff; box-shadow: 0 2px 8px rgba(46,125,50,.22); }
.manual-tab:active { transform: scale(.985); }
