/* V17.21 每部件独立处理流程：样式覆盖（避免改动压缩主样式） */
.route-note { grid-column: 1 / -1; margin: 0; padding: 6px 2px 0; font-size: 12px; color: #64748b; }
.batch-item-row .item-route-field { min-width: 132px; }
.batch-item-row .item-route-field select,
.route-change-modal select,
.route-change-modal input { width: 100%; min-height: 30px; padding: 2px 6px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; font-size: 13px; }
.item-route-detail b { display: block; font-weight: 600; font-size: 13px; }
.item-route-detail small { display: block; color: #7b8799; font-size: 11px; margin-top: 2px; }
.route-change-link { margin-left: 6px; }
.detail-block .route-cell { min-width: 120px; }

/* V17.24/V17.25 新建配送批次弹窗：放大 + 批次信息三列 + 部件明细单行、补充框独立一行 */
.batch-create-modal {
  width: min(1480px, 98vw) !important;
  max-width: 98vw !important;
  max-height: 96vh !important;
  overflow: auto;
}
.batch-create-modal [hidden] { display: none !important; }

/* —— 批次信息三列 —— */
.batch-create-modal .batch-meta-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px 14px !important;
}
.batch-create-modal .batch-meta-grid > label {
  display: grid;
  gap: 3px;
  font-size: 12px;
  font-weight: 600;
  color: #33455a;
}
.batch-create-modal .batch-meta-grid input,
.batch-create-modal .batch-meta-grid select {
  width: 100%;
  box-sizing: border-box;
  min-height: 34px;
  padding: 4px 8px;
  border: 1px solid #c4d0d8;
  border-radius: 6px;
  font-size: 13px;
}

/* —— 部件明细区 —— */
.batch-create-modal .item-editor { margin-top: 12px; }
.batch-create-modal .item-rows {
  display: block !important;
  max-height: 56vh;
  overflow: auto;
  padding-right: 2px;
}
.batch-create-modal .item-rows .batch-item-row {
  margin: 0 0 12px;
}
.batch-create-modal .item-rows .batch-item-row:last-child { margin-bottom: 0; }

/* 部件行主网格：名称/代号/规格按比例、数量固定窄列、
   图纸与其他模块始终同一行（各宽度档都保持单行排满）、
   处理流程框约缩为原来一半、二次装配与删除加宽排在行尾 */
.batch-create-modal .batch-item-row {
  display: grid !important;
  grid-template-columns: minmax(120px, 1.35fr) minmax(104px, 1.1fr) minmax(96px, 1fr) 54px auto minmax(104px, 0.75fr) minmax(110px, 0.5fr) 92px !important;
  column-gap: 8px !important;
  row-gap: 0 !important;
  align-items: center !important;
  padding: 8px 4px 6px !important;
  border-bottom: 1px dashed #e4eaf1;
}
.batch-create-modal .item-rows .batch-item-row:last-child { border-bottom: none; }
/* 显式逐列摆放，保证无论补充框是否出现布局都不乱 */
.batch-create-modal .batch-item-row > *:nth-child(1) { grid-area: 1 / 1; }
.batch-create-modal .batch-item-row > *:nth-child(2) { grid-area: 1 / 2; }
.batch-create-modal .batch-item-row > *:nth-child(3) { grid-area: 1 / 3; }
.batch-create-modal .batch-item-row > *:nth-child(4) { grid-area: 1 / 4; }
.batch-create-modal .batch-item-row > *:nth-child(5) { grid-area: 1 / 5; }
.batch-create-modal .batch-item-row > *:nth-child(6) { grid-area: 1 / 6; }
.batch-create-modal .batch-item-extras { grid-area: 2 / 1 / 3 / 9; }
.batch-create-modal .batch-item-row .new-item-assembly-cell { grid-area: 1 / 7; }
.batch-create-modal .batch-item-row .batch-item-remove { grid-area: 1 / 8; }

.batch-create-modal .batch-item-row .batch-item-field {
  display: grid;
  gap: 3px;
  min-width: 0;
  margin: 0;
  padding: 0;
}
.batch-create-modal .batch-item-row .batch-item-field > span,
.batch-create-modal .batch-item-row .new-item-drawing-label,
.batch-create-modal .batch-item-row .new-item-assembly-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #5a6b7a;
}
.batch-create-modal .batch-item-row input,
.batch-create-modal .batch-item-row select {
  width: 100%;
  box-sizing: border-box;
  min-height: 30px;
  padding: 3px 7px;
  border: 1px solid #c4d0d8;
  border-radius: 6px;
  font-size: 13px;
}

/* 图纸：只留一个小按钮；标签占位（不可见）让按钮与数量/处理流程的输入框对齐同一行 */
.batch-create-modal .batch-item-row .new-item-drawing-label { display: block !important; visibility: hidden; }
.batch-create-modal .batch-item-row .new-item-drawing-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
  max-width: 190px;
}
.batch-create-modal .batch-item-row .new-item-drawing-button {
  width: auto !important;
  min-width: 0 !important;
  min-height: 28px;
  padding: 3px 10px;
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid #b9c6d2;
  border-radius: 6px;
  background: #f4f7fa;
  color: #33455a;
}
.batch-create-modal .new-item-drawing-summary { display: none; }
.batch-create-modal .new-item-drawing-summary.has-drawing {
  display: block;
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 10px;
  color: #7b8799;
}

/* 处理流程给足宽度 */
.batch-create-modal .item-route-field { min-width: 0 !important; }

/* 二次装配：整块可点的勾选区域加宽，勾选后出现的方案按钮放其下 */
.batch-create-modal .batch-item-row .new-item-assembly-label { display: none !important; }
.batch-create-modal .batch-item-row .new-item-assembly-cell {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  min-width: 0;
  width: 100%;
}
.batch-create-modal .batch-item-row .assembly-enable {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: auto;
  min-height: 34px;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 8px 6px;
  border: 1px solid #c9d6e0;
  border-radius: 7px;
  background: #fbfcfd;
  font-size: 12px;
  font-weight: 500;
  color: #33455a;
  white-space: nowrap;
  cursor: pointer;
}
.batch-create-modal .batch-item-row .assembly-enable:hover { background: #f1f6fa; }
.batch-create-modal .batch-item-row .assembly-enable input {
  width: 16px;
  height: 16px;
  min-height: auto;
  margin: 0;
  flex: none;
}
.batch-create-modal .batch-item-row .assembly-setup-button {
  align-self: center;
  width: auto;
  margin: 0;
  padding: 4px 10px;
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid #b9c6d2;
  border-radius: 6px;
  background: #f4f7fa;
  color: #33455a;
}
.batch-create-modal .batch-item-row .assembly-setup-button.configured {
  border-color: #86b8d6;
  background: #eaf4fb;
  color: #1e6091;
}
.batch-create-modal .batch-item-row .assembly-summary {
  display: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  font-size: 10px;
  color: #7b8799;
}
.batch-create-modal .batch-item-row .assembly-enable input:checked ~ .assembly-summary { display: block; }

/* 删除按钮列：加宽更好点按 */
.batch-create-modal .batch-item-remove {
  justify-self: center;
  width: 100%;
  min-height: 34px;
  padding: 5px 8px;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
}

/* 镀锌/涂装单位：选择流程后出现在本行下方的一行，紧凑、带合适间距 */
.batch-create-modal .batch-item-extras {
  display: flex;
  align-items: center;
  gap: 8px 22px;
  margin-top: 8px;
}
.batch-create-modal .batch-item-extras .batch-item-field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.batch-create-modal .batch-item-extras .batch-item-field > span {
  font-size: 12px;
  font-weight: 600;
  color: #5a6b7a;
  flex: none;
}
.batch-create-modal .batch-item-extras select {
  width: clamp(210px, 26vw, 340px);
  min-height: 30px;
  padding: 3px 7px;
  border: 1px solid #c4d0d8;
  border-radius: 6px;
  font-size: 13px;
}

/* —— 修改批次信息弹窗 —— */
.batch-edit-modal .edit-item-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.6fr) minmax(120px, 1.2fr) minmax(120px, 1.2fr) 80px minmax(160px, 1.4fr) 76px;
  gap: 8px;
  align-items: end;
  padding: 8px 0;
  border-bottom: 1px dashed #e4eaf1;
}
.batch-edit-modal .edit-item-row:last-child { border-bottom: none; }
.batch-edit-modal .edit-item-row label {
  display: grid;
  gap: 3px;
  margin: 0;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
  color: #33455a;
}
.batch-edit-modal .edit-item-row input,
.batch-edit-modal .edit-item-row select {
  width: 100%;
  box-sizing: border-box;
  min-height: 32px;
  padding: 4px 8px;
  border: 1px solid #c4d0d8;
  border-radius: 6px;
  font-size: 13px;
}
.batch-edit-modal .edit-item-remove {
  min-height: 32px;
  border: 1px solid #e2b7b7;
  border-radius: 6px;
  background: #fff6f6;
  color: #c0392b;
  font-size: 13px;
  cursor: pointer;
}

/* —— V17.26 配送批次：批次选择 + 配送单导出 —— */
/* 标题"配送批次"放大 */
.batches-title h2 { font-size: 22px !important; line-height: 1.2 !important; }
/* 工具栏纵向排列：导出在上、排序切换在下 */
.batch-tools { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.batch-tools .sort-switch { margin-left: 0; }
/* 配送单导出：红色、小字、框刚好包住文字 */
.batch-export {
  flex: none;
  width: auto;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1.5;
  white-space: nowrap;
  border: 1px solid #d93a2b;
  border-radius: 7px;
  background: #d93a2b;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
.batch-export:hover { background: #c2301f; border-color: #c2301f; }
/* 军工报验导出：黄色，样式与配送单导出一致 */
.batch-export.military-export { border-color: #e5a800; background: #e5a800; color: #fff; }
.batch-export.military-export:hover { background: #c98f00; border-color: #c98f00; }
/* 批次选择：绿色、框刚好包住四个字 */
.batch-pick-toggle {
  flex: none;
  width: auto;
  padding: 7px 10px;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  border: 1px solid #16a34a;
  border-radius: 8px;
  background: #16a34a;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
.batch-pick-toggle.chosen { background: #0f8a3c; border-color: #0f8a3c; color: #fff; }

/* 批次详情按钮区（V22.25）：左边一列竖排「完整流转记录 / 信息修改 / 流程回溯」，
   「返回列表」单独一列靠右并上下居中；标题与按钮区同一行，船号批号上下居中。 */
.detail-actions-grid {
  display: grid !important;
  grid-template-columns: auto auto;
  gap: 8px;
  justify-content: end;
  align-items: center !important;
  padding: 0 !important;
}
.detail-actions-grid > .outline {
  width: auto !important;
  margin: 0 !important;
  text-align: center;
  white-space: nowrap;
}
.detail-actions-grid .detail-back {
  /* 「返回列表」独占右列并跨满左侧三个按钮的行高，自然上下居中 */
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: center !important;
  justify-self: end;
  width: auto;
  padding: 10px 16px;
  font-size: 24px;
  line-height: 1.2;
  white-space: nowrap;
}
/* 船号 / 批号标题：与按钮区同一行并上下居中 */
.detail-head {
  align-items: center !important;
}
.detail-title-center {
  align-self: center !important;
}
.detail-head-left { flex: none; }
th.pick-col, td.pick-col { width: 44px; text-align: center; }
.batch-pick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: 1px solid #b9c6d2;
  border-radius: 5px;
  background: #fff;
  color: transparent;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  user-select: none;
}
.batch-pick:hover { border-color: #7aa7c7; }
.batch-pick.picked { border-color: #16a34a; background: #e9f7ef; color: #16a34a; }
tr.picked-row { background: #f3fbf7 !important; }

/* 小屏适配：任何宽度都保持"单行排满"，各列等比缩小，图纸不掉行 */
@media (max-width: 1380px) {
  .batch-create-modal .batch-item-row {
    grid-template-columns: minmax(100px, 1.2fr) minmax(90px, 1fr) minmax(84px, 0.92fr) 50px auto minmax(92px, 0.7fr) minmax(96px, 0.5fr) 80px !important;
    column-gap: 6px !important;
  }
}
@media (max-width: 1000px) {
  .batch-create-modal .batch-item-row {
    grid-template-columns: minmax(86px, 1.2fr) minmax(76px, 0.95fr) minmax(70px, 0.85fr) 46px auto minmax(86px, 0.62fr) minmax(90px, 0.5fr) 72px !important;
    column-gap: 5px !important;
  }
  .batch-create-modal .item-rows { overflow-x: auto; }
  .batch-create-modal .batch-meta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .batch-create-modal .batch-item-extras {
    flex-wrap: wrap;
    gap: 8px 14px;
  }
  .batch-create-modal .batch-item-extras select { width: min(320px, 100%); }
}

/* V17.31 restored: part card with index column + two rows + workflow strip (rollback of V17.32) */
.batch-create-modal{width:min(1780px,98vw)!important}
.item-rows,.item-editor{width:100%!important;max-width:100%!important}
.batch-item-row{display:grid!important;grid-template-columns:42px minmax(0,1fr)!important;column-gap:10px;width:100%!important;max-width:100%!important;margin:0 0 14px!important;padding:18px!important;border:1px solid #dde5ec!important;border-radius:12px;background:#ffffff;box-sizing:border-box}
.batch-create-modal .batch-item-row{grid-template-columns:42px minmax(0,1fr)!important;column-gap:10px}
.batch-item-row:hover{border-color:#b9cbd9!important}
/* 批次详情：二次装配件备注标签 */
.assembly-item-tag{display:inline-block;margin-left:6px;padding:1px 6px;border:1px solid #bcd7c6;border-radius:6px;background:#eef8f1;color:#087b46;font-size:11px;font-weight:600;line-height:1.6;white-space:nowrap;vertical-align:middle}
.batch-item-index{grid-column:1;width:28px;height:28px;min-width:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;justify-self:center;flex:none;margin:28px 0 0;padding:0;color:#ffffff;background:#16324f;font-size:12px;font-weight:700;line-height:1;box-sizing:border-box}
.item-card{grid-column:2;display:grid;gap:14px;width:100%;min-width:0;background:none;border:0;padding:0;box-sizing:border-box}
.batch-item-row>.item-card>.item-line-main{display:grid!important;grid-template-columns:minmax(160px,1.5fr) minmax(140px,1.2fr) minmax(125px,1fr) 80px 110px minmax(120px,1fr) 140px 70px!important;gap:12px!important;align-items:start!important;width:100%!important;min-width:0}
.item-line-main>.batch-item-field{display:grid;gap:6px;min-width:0}
.item-line-main>label>span{font-size:11px;font-weight:700;color:#33455a;line-height:1.4}
.item-line-main input:not([type="checkbox"]),.item-line-main select{width:100%;box-sizing:border-box;height:44px;min-height:44px}
.item-action-drawing{display:grid;gap:6px;justify-items:start;align-content:start;min-width:0}
.item-action-drawing .new-item-drawing-button{width:auto!important;height:44px;padding:0 14px;display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;border:1px solid #8fc8a9;background:#f2faf5;color:#087b46;border-radius:8px;font-size:12px;font-weight:800;cursor:pointer;box-sizing:border-box}
.item-action-drawing .new-item-drawing-summary{display:inline-block!important;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;color:#8a9590}
.item-action-drawing .new-item-drawing-summary.has-drawing{color:#087b46;font-weight:700}
.item-line-main>.remove-item{justify-self:end;width:auto!important;height:32px;padding:0 12px;display:inline-flex;align-items:center;justify-content:center;border:1px solid #f0c9c9;background:#fff;color:#c0392b;border-radius:8px;font-size:12px;font-weight:800;cursor:pointer;white-space:nowrap}
.item-workflow-row{display:flex!important;align-items:flex-end;gap:14px;flex-wrap:nowrap;width:100%;min-width:0;background:#f7f9fb;border:1px solid #e3e9ef;border-radius:10px;padding:12px 14px;box-sizing:border-box}
.item-action-assembly{display:grid;gap:6px;justify-items:start;flex:0 0 auto;min-width:0;background:none;border:0;padding:0;margin:0}
.item-assembly-group{display:flex;align-items:flex-end;gap:8px;flex:0 0 auto;min-width:0}
.item-assembly-group .assembly-enable{display:inline-flex;align-items:center;gap:8px;height:44px;padding:0 14px;margin:0;border:1px solid #dfe7e2;border-radius:10px;background:#fff;font-size:12px;font-weight:700;color:#33455a;white-space:nowrap;box-sizing:border-box}
.batch-item-row input[type="checkbox"],.item-workflow-row input[type="checkbox"]{width:18px!important;height:18px!important;min-height:auto!important;margin:0;flex:none}
.item-assembly-group .assembly-setup-button{height:44px;padding:0 12px;display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;border:1px solid #cfd8dc;background:#fff;color:#1e6091;border-radius:8px;font-size:12px;font-weight:700;cursor:pointer;flex:0 0 auto;box-sizing:border-box}
.item-action-assembly .assembly-summary{display:block!important;max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;color:#7b8799;margin:0;padding:0}
.item-workflow-row>.batch-item-field:not([hidden]){display:grid;gap:6px;min-width:0;flex:0 0 auto}
.item-workflow-row>.batch-item-field>span{font-size:11px;font-weight:700;color:#33455a;line-height:1.4}
.item-workflow-row input:not([type="checkbox"]),.item-workflow-row select{width:100%;box-sizing:border-box;height:44px;min-height:44px}
.item-workflow-row .item-route-field{width:280px;max-width:100%}
.item-workflow-row .item-galv-field{width:220px;max-width:100%}
.item-workflow-row .item-paint-field{width:220px;max-width:100%}
.item-workflow-row .item-paint-code-field{width:200px;max-width:100%}
.batch-item-extras:not([hidden]){display:flex!important;align-items:flex-end;gap:14px;flex-wrap:nowrap;min-width:0;margin:0;padding:0;border:0;background:none}
.batch-item-row input:not([type="checkbox"]){width:100%}
@media (max-width:1400px){
  .batch-item-row>.item-card>.item-line-main{grid-template-columns:repeat(5,minmax(0,1fr))!important}
  .item-workflow-row{flex-wrap:wrap!important}
  .batch-item-extras:not([hidden]){flex-wrap:wrap!important}
}
@media (max-width:1000px){.batch-item-row>.item-card>.item-line-main{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media (max-width:768px){
  .batch-item-row{grid-template-columns:minmax(0,1fr)!important}
  .batch-create-modal .batch-item-row{grid-template-columns:minmax(0,1fr)!important}
  .item-card{grid-column:1}
  .batch-item-index{margin-top:0}
  .batch-item-row>.item-card>.item-line-main{grid-template-columns:minmax(0,1fr)!important}
  .item-line-main>.remove-item{justify-self:start}
  .item-workflow-row>.item-route-field,.item-workflow-row .item-galv-field,.item-workflow-row .item-paint-field,.item-workflow-row .item-paint-code-field{width:100%}
  .batch-item-extras:not([hidden]){width:100%}
}
/* V17.33: alignment only - equal rows (label 28px / control 54px / note 20px) */
.item-line-main>.batch-item-field,
.item-line-main>.item-action-drawing,
.item-line-main>.batch-item-delete-cell{display:grid!important;grid-template-rows:28px 54px 20px!important;gap:0!important;align-items:start;min-width:0}
.item-line-main .batch-item-field>span,
.item-line-main .action-label-spacer{display:block;height:22px;line-height:22px;margin:0 0 6px;padding:0;font-size:11px;font-weight:700;color:#33455a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.item-line-main input:not([type="checkbox"]),
.item-line-main select,
.item-line-main .new-item-drawing-button,
.item-line-main .batch-item-delete-cell .remove-item{height:54px;min-height:54px;box-sizing:border-box;margin:0;align-self:stretch}
.item-line-main .new-item-drawing-button{width:auto;justify-self:start}
.item-line-main .batch-item-delete-cell .remove-item{width:auto;justify-self:end}
.item-line-main .new-item-drawing-summary{display:block;height:20px;line-height:20px;margin:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;color:#8a9590}
.item-workflow-row{align-items:flex-start!important}
.item-workflow-row>.batch-item-field:not([hidden]),
.item-workflow-row>.item-action-assembly{display:grid!important;grid-template-rows:22px 54px 20px!important;gap:0!important;align-items:start;min-width:0}
.batch-item-extras>.batch-item-field:not([hidden]){display:grid!important;grid-template-rows:22px 54px 20px!important;gap:0!important;align-items:start;min-width:0}
.item-workflow-row .batch-item-field>span,
.item-workflow-row .action-label-spacer{display:block;height:22px;line-height:22px;margin:0;padding:0;font-size:11px;font-weight:700;color:#33455a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.item-workflow-row input:not([type="checkbox"]),
.item-workflow-row select,
.item-workflow-row .assembly-enable,
.item-workflow-row .assembly-setup-button{height:54px;min-height:54px;box-sizing:border-box;margin:0}
.item-action-assembly .assembly-summary{display:block;height:20px;line-height:20px;margin:0;max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;color:#7b8799}
.item-assembly-group{align-items:stretch}
/* V17.34: delete button beside drawing + workflow row as explicit 5-column grid */
.item-line-main .batch-item-delete-cell .remove-item{width:auto!important;justify-self:start!important;margin-left:0!important;margin-right:0!important;position:static!important;right:auto!important}
.item-workflow-row{display:grid!important;grid-template-columns:minmax(130px,220px) minmax(220px,350px) minmax(190px,270px) minmax(190px,270px) minmax(170px,250px)!important;column-gap:18px;row-gap:12px;align-items:end!important;justify-content:start;width:100%!important;min-width:0;box-sizing:border-box}
.item-workflow-row>.item-action-assembly{grid-column:1}
.item-workflow-row>.item-route-field{grid-column:2;width:auto!important;max-width:none;position:static!important;left:auto!important;right:auto!important;transform:none!important}
.batch-item-extras:not([hidden]){display:contents!important;grid-area:auto!important;position:static!important;margin:0!important;padding:0!important;border:0!important;background:none!important}
.batch-item-extras>.item-galv-field{grid-column:3;width:auto!important;max-width:none;position:static!important;left:auto!important;right:auto!important;transform:none!important;margin:0!important}
.batch-item-extras>.item-paint-field{grid-column:4;width:auto!important;max-width:none;position:static!important;left:auto!important;right:auto!important;transform:none!important;margin:0!important}
.batch-item-extras>.item-paint-code-field{grid-column:5;width:auto!important;max-width:none;position:static!important;left:auto!important;right:auto!important;transform:none!important;margin:0!important}
.item-workflow-row .batch-item-field,
.batch-item-extras>.batch-item-field{min-width:0;box-sizing:border-box}
.item-workflow-row .batch-item-field>span{display:block;height:22px;line-height:22px;margin:0 0 7px;padding:0;font-size:11px;font-weight:700;color:#33455a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.item-workflow-row input:not([type="checkbox"]),.item-workflow-row select{display:block;width:100%;min-width:0;height:54px;box-sizing:border-box}
.item-assembly-group{flex-wrap:wrap}
@media (max-width:1200px){
  .item-workflow-row{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .item-workflow-row>.item-action-assembly{grid-column:1}
  .item-workflow-row>.item-route-field{grid-column:2}
  .batch-item-extras>.item-galv-field{grid-column:1}
  .batch-item-extras>.item-paint-field{grid-column:2}
  .batch-item-extras>.item-paint-code-field{grid-column:1}
}
@media (max-width:768px){
  .item-workflow-row{grid-template-columns:minmax(0,1fr)!important}
  .item-workflow-row>.item-action-assembly,
  .item-workflow-row>.item-route-field,
  .batch-item-extras>.item-galv-field,
  .batch-item-extras>.item-paint-field,
  .batch-item-extras>.item-paint-code-field{grid-column:1}
}
/* V17.35: first row actions - drawing + delete in one container, delete right beside drawing */
.batch-item-row>.item-card>.item-line-main{grid-template-columns:minmax(160px,1.5fr) minmax(140px,1.2fr) minmax(125px,1fr) 80px 110px minmax(120px,1fr) auto!important}
.batch-item-actions{display:flex!important;align-items:flex-start;gap:10px;width:max-content;max-width:100%;min-width:0}
.batch-item-actions>.item-action-drawing{display:grid!important;grid-template-rows:28px 54px 20px!important;gap:0!important;align-items:start;width:max-content;min-width:110px;max-width:none;flex:0 0 auto}
.batch-item-actions>.batch-item-delete{flex:0 0 auto;width:64px;height:54px;min-height:54px;margin:28px 0 0;padding:0;align-self:flex-start;display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;border:1px solid #f0c9c9;border-radius:8px;background:#fff7f7;color:#c0392b;font-size:12px;font-weight:800;cursor:pointer;box-sizing:border-box;position:static;right:auto}
.batch-item-actions>.batch-item-delete:hover{border-color:#dc5b62;background:#ffeded}
/* V17.37: insert "needs welding" control between assembly and process route */
.item-workflow-row{grid-template-columns:minmax(130px,220px) 110px minmax(220px,350px) minmax(190px,270px) minmax(190px,270px) minmax(170px,250px)!important;column-gap:12px!important}
.item-workflow-row>.item-action-assembly{grid-column:1}
.item-workflow-row>.welding-option{grid-column:2}
.item-workflow-row>.item-route-field{grid-column:3}
.batch-item-extras>.item-galv-field{grid-column:4}
.batch-item-extras>.item-paint-field{grid-column:5}
.batch-item-extras>.item-paint-code-field{grid-column:6}
.welding-option{display:inline-flex;align-items:center;justify-content:center;gap:8px;width:max-content;max-width:100%;min-width:0;height:54px;padding:0 12px;margin:0;border:1px solid #ccd8e3;border-radius:8px;background:#fff;font-size:12px;font-weight:700;color:#33455a;white-space:nowrap;box-sizing:border-box;align-self:start;margin-top:22px}
.welding-option input[type="checkbox"]{width:18px!important;height:18px!important;min-height:auto!important;margin:0;flex:0 0 auto}
@media (max-width:1200px){
  .item-workflow-row{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .item-workflow-row>.item-action-assembly{grid-column:1}
  .item-workflow-row>.welding-option{grid-column:2}
  .item-workflow-row>.item-route-field{grid-column:1}
  .batch-item-extras>.item-galv-field{grid-column:1}
  .batch-item-extras>.item-paint-field{grid-column:2}
  .batch-item-extras>.item-paint-code-field{grid-column:1}
}
@media (max-width:768px){
  .item-workflow-row>.welding-option{grid-column:1}
}
/* V17.38: unify assembly / welding / process route as 3-layer control items (22 + 66 + 20) */
.item-workflow-row{display:flex!important;align-items:flex-start!important;gap:14px;flex-wrap:nowrap;width:100%!important;min-width:0;box-sizing:border-box}
.workflow-control-item{display:grid;grid-template-rows:22px 66px 20px;row-gap:6px;align-items:start;min-width:0;margin:0;padding:0;box-sizing:border-box}
.workflow-label,.workflow-label-spacer{display:block;height:22px;line-height:22px;margin:0;padding:0;font-size:14px;font-weight:600;color:#33455a;white-space:nowrap;overflow:hidden}
.item-assembly-group{display:flex!important;align-items:stretch;gap:8px;height:66px;min-height:66px;margin:0;padding:0;box-sizing:border-box}
.item-assembly-group .assembly-enable{height:66px;min-height:66px;margin:0;box-sizing:border-box;display:inline-flex;align-items:center;gap:8px;padding:0 14px;white-space:nowrap;border:1px solid #dfe7e2;border-radius:10px;background:#fff;font-size:12px;font-weight:700;color:#33455a}
.item-assembly-group .assembly-setup-button{height:66px;min-height:66px;margin:0;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;padding:0 12px;white-space:nowrap;border:1px solid #cfd8dc;border-radius:8px;background:#fff;color:#1e6091;font-size:12px;font-weight:700;cursor:pointer}
.welding-option{height:66px;min-height:66px;margin:0!important;box-sizing:border-box;align-self:start;position:static;transform:none;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:0 12px;width:max-content;white-space:nowrap;border:1px solid #ccd8e3;border-radius:8px;background:#fff;font-size:12px;font-weight:700;color:#33455a}
.process-route-select{display:block;width:100%;height:66px;min-height:66px;margin:0;box-sizing:border-box;align-self:start}
.workflow-helper,.workflow-helper-spacer{display:block;height:20px;line-height:20px;margin:0;padding:0;overflow:hidden;white-space:nowrap;font-size:12px;color:#7b8799}
.item-action-assembly .assembly-summary{max-width:220px;text-overflow:ellipsis;font-size:12px;color:#7b8799}
.welding-option input[type="checkbox"],.item-assembly-group input[type="checkbox"]{width:18px!important;height:18px!important;min-height:auto!important;margin:0;flex:0 0 auto}
.batch-item-extras:not([hidden]){display:flex!important;align-items:flex-start;gap:14px;flex-wrap:nowrap;min-width:0;margin:0!important;padding:0!important;border:0!important;background:none!important;grid-area:auto!important;position:static}
.batch-item-extras>.batch-item-field:not([hidden]){display:grid!important;grid-template-rows:22px 66px 20px!important;row-gap:6px;column-gap:0;align-items:start;min-width:0}
.batch-item-extras input,.batch-item-extras select{height:66px;min-height:66px;box-sizing:border-box;margin:0}

/* V21.24 新建批次部件明细：名称/代号缩到 2/3、米数 1/3、材料一半；添加图纸与删除紧跟在材料后面并排 */
.batch-item-row>.item-card>.item-line-main{grid-template-columns:205fr 205fr 205fr 85fr 85fr 85fr 100fr 150fr!important}
.batch-item-row>.item-card>.item-line-main>.batch-item-actions{display:flex!important;align-items:flex-end!important;justify-content:flex-start!important;gap:10px!important;min-width:0!important}
.batch-item-row>.item-card>.item-line-main .new-item-drawing-cell{width:auto!important;min-width:0!important}
/* ===== V22.26 完整流转记录弹窗：记录内部复用「流程明细」的卡片排版 =====
   记录卡片被包在 .batch-detail-page 作用域里（让 .ff-* 样式生效），
   这里只去掉该作用域类自带的底部留白与裁剪，并给同节点内多条记录留出间距。 */
.record-modal .record-ff-scope {
  padding-bottom: 0 !important;
  overflow: visible !important;
}
.record-modal .record-ff-scope + .record-ff-scope {
  margin-top: 12px;
}
/* ===== V22.27 完整流转记录弹窗：改为整屏大小的弹窗 =====
   原来固定 820px 宽，记录改成「流程明细」那种表格排版后显得太窄。
   这里让弹窗铺满遮罩层可用区域（宽度上限 1680px，避免超宽屏被拉得太散），
   头部固定、记录列表内部滚动。 */
.record-modal {
  width: 100% !important;
  max-width: 1680px !important;
  height: 100% !important;
  max-height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}
.record-modal > .modal-head {
  flex: 0 0 auto;
}
.record-modal > .record-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

/* ===== V22.33 部件明细表格：列宽与列间距重新分配 =====
   原来 11 列由内容自动分配，序号/焊接等短列被撑宽，部件名与流程列反而被挤。
   改为固定表格布局 + 明确列宽：短列收紧、名称与流程列放宽、数字统一居中，
   窄屏时由 .table-wrap 横向滚动，保证每列都读得清。 */
.detail-block .items-table {
  table-layout: fixed;
  min-width: 1240px;
}
.detail-block .items-table th,
.detail-block .items-table td {
  padding: 12px;
  vertical-align: middle;
}
.detail-block .items-table th {
  text-align: center;
  letter-spacing: .2px;
}
.detail-block .items-table td {
  text-align: center;
  word-break: break-word;
}
/* V23.42 表格内容与表头统一居中：不再对部件 / 流程 / 图纸 / 绘图做左对齐特例 */
/* 列宽（合计 100%）：部件列收窄、托盘表编号砍半，图纸与绘图各占一列 */
.detail-block .items-table th:nth-child(1)  { width: 4%; }
.detail-block .items-table th:nth-child(2)  { width: 11%; }
.detail-block .items-table th:nth-child(3)  { width: 10%; }
.detail-block .items-table th:nth-child(4)  { width: 5%; }
.detail-block .items-table th:nth-child(5)  { width: 10%; }
.detail-block .items-table th:nth-child(6)  { width: 8%; }
.detail-block .items-table th:nth-child(7)  { width: 8%; }
.detail-block .items-table th:nth-child(8)  { width: 8%; }
.detail-block .items-table th:nth-child(9)  { width: 15%; }
.detail-block .items-table th:nth-child(10) { width: 10%; }
.detail-block .items-table th:nth-child(11) { width: 11%; }
/* 托盘表编号：表头固定拆成「托盘表 / 编号」两行，列窄时也不在词内断字 */
.detail-block .items-table th:nth-child(4) {
  padding-left: 4px;
  padding-right: 4px;
  word-break: keep-all;
  line-height: 1.25;
}
/* 数量列加粗突出 */
.detail-block .items-table td:nth-child(8) {
  font-weight: 800;
  color: #16232f;
}
/* 部件名与下方小字之间留出呼吸感 */
.detail-block .items-table td:nth-child(2) b {
  line-height: 1.45;
}