/* Production form fixes: stable column geometry and an actionable packaging gate. */
.production-image-entry{position:relative;display:block;width:72px;height:72px;max-width:100%;margin:0 auto;text-align:center;border-radius:8px;outline-offset:3px}
.production-image-entry.is-dragging{outline:2px dashed #246bfd;background:#edf3ff}
.production-image-preview{width:72px;height:72px;max-width:100%;min-width:0;display:flex;align-items:center;justify-content:center}
.production-image-entry .production-image-preview .line-photo{display:block;width:100%!important;height:100%!important;max-width:100%;margin:0;object-fit:contain!important;border-radius:8px}
.production-image-entry .production-image-add{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;width:100%!important;height:100%!important;min-width:0;min-height:0;margin:0;padding:0;border:1px dashed #cfdbeb;border-radius:8px;background:#fff;color:#809b98;cursor:pointer}
.production-image-entry .production-image-add:hover{border-color:#8ab9b1;background:#f7fbfa}
.production-image-plus{display:grid;place-items:center;width:28px;height:28px;border-radius:8px;background:#dcece8;color:#18796f;font-size:25px;font-weight:400;line-height:1}
.production-image-add-label{font-size:11px;font-weight:400;line-height:1.4}
.production-image-actions{position:absolute;left:1px;right:1px;bottom:2px;z-index:2;display:flex;justify-content:center;gap:2px;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .12s}
.production-image-entry:hover .production-image-actions,.production-image-entry:focus-within .production-image-actions{opacity:1;visibility:visible;pointer-events:auto}
.production-image-entry .production-image-actions button{display:grid;place-items:center;flex:none;width:22px;height:22px;min-width:22px;min-height:22px;margin:0;padding:0;border:1px solid #dce5ee;border-radius:5px;background:rgba(255,255,255,.97);color:#456479;cursor:pointer;line-height:1}
.production-image-actions button:hover{background:#edf4ff;color:#246bfd;border-color:#a6bfef}
.production-image-actions .production-image-remove:hover{background:#fff2f2;color:#bd4242;border-color:#efbcbc}
.production-image-actions svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.production-image-entry :is(button,img):focus-visible{outline:2px solid #81b2d9;outline-offset:2px}
.production-image-status{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.production-image-entry.is-processing:after{content:'处理中…';position:absolute;left:0;top:0;z-index:3;display:grid;place-items:center;width:72px;max-width:100%;height:72px;border:1px solid #dce5ee;border-radius:8px;background:rgba(255,255,255,.94);color:#456479;font-size:11px}
@media screen and (max-width:760px){
  #content .production-entry-table-v4.mobile-record-table td[data-mobile-label="图片"]{grid-column:1/-1}
  #content .production-image-entry{display:flex;align-items:center;gap:8px;width:max-content;height:72px;margin:0}
  #content .production-image-preview{flex:none}
  #content .production-image-actions{position:static;gap:4px;opacity:1;visibility:visible;pointer-events:auto}
  #content .production-image-actions button{min-height:44px;min-width:44px;width:44px;height:44px}
  #content .production-image-actions svg{width:17px;height:17px}
}
@media screen and (hover:none){.production-image-actions{opacity:1;visibility:visible;pointer-events:auto}}
@media(prefers-reduced-motion:reduce){.production-image-actions{transition:none}}
@media print{.production-image-add,.production-image-actions,.production-image-status{display:none!important}}
.production-entry-wrap-v4 {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
}

.production-entry-table-v4 {
  width: 100%;
  min-width: 1120px;
  table-layout: fixed;
}

.production-entry-table-v4 th,
.production-entry-table-v4 td {
  box-sizing: border-box;
  overflow: hidden;
  padding: 11px 9px;
}

.production-entry-table-v4 th:nth-child(1),
.production-entry-table-v4 td:nth-child(1) { width: 4%; text-align: center; }
.production-entry-table-v4 th:nth-child(2),
.production-entry-table-v4 td:nth-child(2) { width: 7%; text-align: center; padding-inline: 6px; }
@media screen and (min-width:761px){
  .production-sheet-v4.is-editing .production-entry-table-v4 th:nth-child(2),
  .production-sheet-v4.is-editing .production-entry-table-v4 td:nth-child(2){width:90px}
}
.production-entry-table-v4 th:nth-child(3),
.production-entry-table-v4 td:nth-child(3) { width: 12%; }
.production-entry-table-v4 th:nth-child(4),
.production-entry-table-v4 td:nth-child(4) { width: 9%; }
.production-entry-table-v4 th:nth-child(5),
.production-entry-table-v4 td:nth-child(5) { width: 8%; }
.production-entry-table-v4 th:nth-child(6),
.production-entry-table-v4 td:nth-child(6) { width: 10%; }
.production-entry-table-v4 th:nth-child(7),
.production-entry-table-v4 td:nth-child(7) { width: 6%; }
.production-entry-table-v4 th:nth-child(8),
.production-entry-table-v4 td:nth-child(8) { width: 9%; }
.production-entry-table-v4 th:nth-child(9),
.production-entry-table-v4 td:nth-child(9) { width: 9%; }
.production-entry-table-v4 th:nth-child(10),
.production-entry-table-v4 td:nth-child(10) { width: 7%; }
.production-entry-table-v4 th:nth-child(11),
.production-entry-table-v4 td:nth-child(11) { width: 19%; }

.production-entry-table-v4 input {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  padding-inline: 8px;
}

.production-entry-table-v4 .line-photo {
  display: block;
  width: min(72px, 100%);
  height: 64px;
  margin-inline: auto;
}

.production-entry-table-v4 .num,
.production-entry-table-v4 th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.production-entry-table-v4 .num input { text-align: right; font-variant-numeric: tabular-nums; }
.production-entry-table-v4 .req { min-width: 0; }
.production-entry-table-v4 tfoot td:first-child { text-align: left; }

.production-progress-blocker-v4 {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 18px 12px;
  padding: 12px 14px;
  border: 1px solid #f0d69b;
  border-radius: 10px;
  background: #fffaf0;
  color: #77551d;
  font-size: 13px;
  line-height: 1.6;
}

.production-progress-blocker-v4 b { flex: none; color: #8a5b12; }
.production-progress-blocker-v4 span { min-width: 0; overflow-wrap: anywhere; }

@media (max-width: 760px) {
  .production-progress-blocker-v4 { flex-direction: column; gap: 3px; margin-inline: 12px; }
}

/* V4.11 production entry: distinguish source, plan, execution requirements and progress. */
.production-sheet-v4.is-creating .production-sheet-head-v4 { padding: 18px 20px; }
.production-sheet-v4.is-creating .production-sheet-title-v4 h1 { font-size: 24px; }
.production-sheet-v4.is-creating .production-sheet-title-v4 p { display: none; }
.production-sheet-v4.is-creating .production-sheet-mark-v4 { width: 44px; height: 44px; }
.production-source-card-v411 {
  margin: 14px 0;
  overflow: hidden;
  border: 1px solid #cfe0ff;
  border-radius: 16px;
  background: linear-gradient(135deg, #f7faff 0%, #eef5ff 100%);
}

.production-source-heading-v411 {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 16px 18px 12px;
}

.production-source-heading-v411 > div { display: grid; gap: 3px; min-width: 0; }
.production-source-heading-v411 b { color: #1d3151; font-size: 15px; }
.production-source-heading-v411 small { color: #687995; overflow-wrap: anywhere; }
.production-source-badge-v411 {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #246bfd;
  color: #fff;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}
.production-source-badge-v411.stock { background: #238262; }

.production-source-stats-v411 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 18px 14px;
  overflow: hidden;
  border: 1px solid rgba(171, 195, 232, .68);
  border-radius: 12px;
  background: rgba(255, 255, 255, .82);
}
.production-source-stats-v411 > div { display: grid; gap: 4px; padding: 12px 14px; border-right: 1px solid #e4ebf7; }
.production-source-stats-v411 > div:last-child { border-right: 0; }
.production-source-stats-v411 small { color: #8290a5; font-size: 12px; }
.production-source-stats-v411 strong { color: #243653; font-size: 15px; overflow-wrap: anywhere; }

.production-entry-guide-v411 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding: 11px 18px;
  border-top: 1px solid rgba(171, 195, 232, .62);
  background: rgba(255, 255, 255, .58);
  color: #5d6f8b;
  font-size: 12px;
}
.production-entry-guide-v411 span { display: flex; align-items: center; gap: 7px; }
.production-entry-guide-v411 i {
  display: inline-grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 50%;
  background: #dce8ff;
  color: #246bfd;
  font-style: normal;
  font-weight: 800;
}

.production-static-field-v411 { justify-content: flex-start; }
.production-static-status-v411 { display: inline-flex; width: fit-content; min-height: 38px; align-items: center; padding-inline: 12px; }

.production-plan-note-v411 {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 18px 0;
  padding: 11px 13px;
  border: 1px solid #cde8dc;
  border-radius: 10px;
  background: #f3fbf7;
  color: #60786d;
  font-size: 13px;
  line-height: 1.55;
}
.production-plan-note-v411 b { flex: none; color: #237458; }

.production-sheet-v4.is-creating .production-progress-only-v411 { display: none!important; }
.production-sheet-v4.is-creating .production-entry-table-v4 { min-width: 920px; }
.production-sheet-v4.is-creating .production-entry-table-v4 th:nth-child(3),
.production-sheet-v4.is-creating .production-entry-table-v4 td:nth-child(3) { width: 15%; }
.production-sheet-v4.is-creating .production-entry-table-v4 th:nth-child(11),
.production-sheet-v4.is-creating .production-entry-table-v4 td:nth-child(11) { width: 25%; }

.production-requirements-v4 select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #dfe5ee;
  border-radius: 10px;
  background: #fff;
  padding: 9px 11px;
  color: #1d2a3f;
}
.production-requirements-v4 select:disabled { border-color: transparent; background: #f7f9fc; color: #28364c; opacity: 1; }

.production-stock-row-actions-v411 input { display: block; margin-bottom: 7px; }
.production-sheet-v4:not(.is-creating) .production-source-stats-v411 { display: none; }
.production-overall-requirement-v411 { grid-column: 1 / -1; }
.production-task-sheet .production-requirements > div { display: grid; }
.production-entry-table-v4 :is(input, textarea):focus { border-color: #6f9cff; outline: 2px solid #dce8ff; outline-offset: 1px; }
.production-block-head-v4 { gap: 12px; flex-wrap: wrap; }
.production-block-head-v4 > span { min-width: 0; }
.production-block-head-v4 > button { flex: none; margin-left: auto; }
.production-remove-line-v411 {
  justify-self: start;
  border: 0;
  background: transparent;
  color: #ca4f56;
  padding: 1px 0;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.production-remove-line-v411:disabled { color: #a7afbc; cursor: not-allowed; }

.production-form-footer-v411 {
  position: sticky;
  bottom: 10px;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 16px;
  padding: 13px 16px;
  border: 1px solid #d9e3f1;
  border-radius: 14px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 12px 32px rgba(31, 54, 88, .13);
  backdrop-filter: blur(10px);
}
.production-form-footer-v411 > span { color: #6b788d; font-size: 13px; }
.production-form-footer-v411 > div { display: flex; gap: 8px; flex: none; }

@media (max-width: 1050px) {
  .production-source-stats-v411 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .production-source-stats-v411 > div:nth-child(2) { border-right: 0; }
  .production-source-stats-v411 > div:nth-child(-n+2) { border-bottom: 1px solid #e4ebf7; }
}

@media screen and (max-width: 1250px) {
  .document-layout:has(.production-task-sheet) { grid-template-columns: minmax(0, 1fr); }
  .document-layout:has(.production-task-sheet) .document-list { display: flex; gap: 8px; max-height: 120px; }
  .document-layout:has(.production-task-sheet) .document-item { flex: 0 0 220px; }
  .document-preview-shell:has(.production-task-sheet) { overflow: auto; padding: 12px; }
  .document-preview-shell .production-task-sheet { min-width: 760px; }
}

@media (max-width: 760px) {
  .production-source-heading-v411 { grid-template-columns: 1fr; }
  .production-source-heading-v411 .outline-btn { justify-self: start; }
  .production-source-badge-v411 { width: fit-content; }
  .production-source-stats-v411 { grid-template-columns: 1fr; }
  .production-source-stats-v411 > div { border-right: 0; border-bottom: 1px solid #e4ebf7; }
  .production-source-stats-v411 > div:last-child { border-bottom: 0; }
  .production-entry-guide-v411 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .production-plan-note-v411 { flex-direction: column; gap: 3px; margin-inline: 12px; }
  .production-form-footer-v411 { position: static; align-items: stretch; flex-direction: column; }
  .production-form-footer-v411 > div { display: grid; grid-template-columns: 1fr 1fr; }
}
