.packaging-direction-placeholders {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  margin: 12px 0 16px;
}

.packaging-label-direction .packaging-direction-placeholders {
  display: none;
}

.packaging-direction-placeholder {
  padding: 18px;
  border: 1px dashed #b9c9e8;
  border-radius: 16px;
  background: #f8fbff;
}

.packaging-direction-placeholder h3 {
  margin: 0 0 8px;
  color: #172033;
}

.box-design-panel {
  display: grid;
  gap: 12px;
}

.box-workflow-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #c7d8f3;
  border-radius: 10px;
  background: #fff;
}

.box-workflow-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.box-workflow-head > div {
  display: grid;
  gap: 3px;
}

.box-workflow-head strong {
  color: #12366f;
}

.box-workflow-head span {
  color: #52657f;
  font-size: 12px;
  line-height: 1.45;
}

.box-actions-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.box-quality-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.box-quality-row label {
  display: grid;
  gap: 5px;
  min-width: min(220px, 100%);
  margin: 0;
  color: #12366f;
  font-weight: 700;
}

.box-quality-row select {
  height: 34px;
  border: 1px solid #b9c9e8;
  border-radius: 8px;
  background: #fff;
  color: #172033;
}

.box-upload-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
}

.box-upload-slot {
  position: relative;
  display: grid;
  min-height: 138px;
  place-items: center;
  align-content: center;
  gap: 6px;
  padding: 14px;
  border: 1px dashed #8fb3ff;
  border-radius: 10px;
  background: #f8fbff;
  color: #1b4f9f;
  cursor: pointer;
  text-align: center;
}

.box-upload-slot:hover,
.box-upload-slot:focus,
.box-upload-slot.drag-over {
  border-color: #2563eb;
  background: #eef5ff;
  outline: none;
}

.box-upload-slot.has-file {
  justify-items: start;
  grid-template-columns: 96px 1fr;
  place-items: center start;
  padding-right: 78px;
  text-align: left;
}

.box-upload-slot strong,
.box-upload-slot small,
.box-upload-slot em {
  display: block;
}

.box-upload-slot small,
.box-upload-slot em {
  color: #52657f;
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.box-upload-plus {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #dce9ff;
  font-size: 30px;
  line-height: 1;
}

.box-upload-preview {
  grid-row: span 3;
  width: 88px;
  height: 88px;
  overflow: hidden;
  border: 1px solid #c7d8f3;
  border-radius: 8px;
  background: #fff;
}

.box-upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.box-upload-remove {
  position: absolute;
  top: 10px;
  right: 10px;
  min-width: 52px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid #f2b8b8;
  border-radius: 7px;
  background: #fff5f5;
  color: #b42318;
  cursor: pointer;
  font-weight: 700;
}

.box-upload-remove:hover,
.box-upload-remove:focus {
  border-color: #dc2626;
  background: #fee2e2;
  outline: none;
}

.box-field-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 10px;
}

.box-dimension-grid {
  grid-template-columns: repeat(5, minmax(120px, 1fr));
}

.box-required-note {
  padding: 8px 10px;
  border: 1px solid #f2d18b;
  border-radius: 8px;
  background: #fff8e8;
  color: #73520b;
  font-size: 12px;
  line-height: 1.5;
}

.box-wide-field {
  display: grid;
  gap: 6px;
}

.box-wide-field textarea {
  min-height: 58px;
}

.box-final-prompt-field textarea {
  min-height: 170px;
  font-family: Consolas, "Microsoft YaHei", monospace;
  line-height: 1.55;
  background: #fffdf4;
}

.box-actions-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.box-design-panel .muted {
  margin: 0;
}

@media (max-width: 900px) {
  .box-workflow-head,
  .box-actions-row,
  .box-actions-inline {
    align-items: stretch;
    flex-direction: column;
  }

  .box-field-grid,
  .box-upload-pair {
    grid-template-columns: 1fr;
  }
}

.packaging-direction-placeholder[hidden],
.packaging-placeholder-direction .flat-label-panel,
.packaging-placeholder-direction .flat-label-size-panel {
  display: none !important;
}
