.warehouse-flow-stepper {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.warehouse-flow-stepper li {
  display: grid;
  grid-template-columns: 34px 1fr;
  column-gap: 9px;
  align-items: center;
  min-height: 66px;
  padding: 12px;
  border: 1px solid var(--line);
  background: #fff;
}

.warehouse-flow-stepper li span {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e8f0ff;
  color: #2563eb;
  font-weight: 900;
}

.warehouse-flow-stepper li strong { font-size: 11px; }
.warehouse-flow-stepper li small { font-size: 9px; color: var(--muted); }
.warehouse-flow-stepper li.active { border-color: #8eb2ff; box-shadow: inset 0 3px 0 #2563eb; }

.reference-import-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  margin: 12px 0;
  padding: 14px;
  border: 1px solid #cddbf1;
  background: #f8fbff;
}

.reference-import-box label { display: grid; gap: 7px; font-weight: 800; }
.reference-import-box textarea { min-height: 72px; }
.reference-import-box span { grid-column: 1 / -1; color: var(--muted); font-size: 10px; }
.overseas-filter-setting { min-height: 42px; padding: 0 12px; border: 1px solid var(--line); background: #f8fafc; }
.overseas-filter-setting input { width: auto; }

.warehouse-stage-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.warehouse-stage-card {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 10px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  background: #fff;
}

.warehouse-stage-card strong { grid-row: 1 / 3; font-size: 28px; line-height: 1; }
.warehouse-stage-card span { font-size: 11px; font-weight: 900; }
.warehouse-stage-card small { font-size: 9px; color: var(--muted); }
.warehouse-stage-card.pending_generation { border-top: 3px solid #f59e0b; }
.warehouse-stage-card.pending_review { border-top: 3px solid #2563eb; }
.warehouse-stage-card.completed { border-top: 3px solid #10b981; }
.warehouse-task-status.pending_generation { background: #fff4dd; color: #9a5a08; }
.warehouse-task-status.generating,
.warehouse-task-status.pending_review,
.warehouse-task-status.completing { background: #e8f0ff; color: #2359c4; }
.warehouse-task-status.completed { background: #e8f7f0; color: #16875f; }
.warehouse-task-status.source_closed,
.warehouse-task-status.bridge-source_closed { background: #edf0f4; color: #667085; }
.overseas-stage-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.overseas-stage-actions span { font-size: 10px; color: var(--muted); }
.xmf-bridge-card { display: flex; justify-content: space-between; gap: 24px; align-items: center; padding: 20px; margin-bottom: 12px; border: 1px solid #b9cffc; border-radius: 14px; background: linear-gradient(135deg, #f5f8ff 0%, #eefaf7 100%); }
.xmf-bridge-card h2 { margin: 2px 0 6px; }
.xmf-bridge-card p { margin: 0; max-width: 720px; color: var(--muted); line-height: 1.6; }
.xmf-bridge-actions { min-width: 250px; display: grid; gap: 8px; }
.xmf-bridge-actions .chip { justify-content: center; }
.warehouse-task-status.bridge-queued { background: #fff4d7; color: #8a5b00; }
.warehouse-task-status.bridge-processing { background: #e8f0ff; color: #175cd3; }
.warehouse-task-status.bridge-failed { background: #ffe8e8; color: #b42318; }

@media (max-width: 900px) {
  .warehouse-flow-stepper,
  .reference-import-box,
  .warehouse-stage-cards { grid-template-columns: 1fr; }
  .overseas-stage-actions .btn { width: 100%; }
  .xmf-bridge-card { align-items: stretch; flex-direction: column; }
  .xmf-bridge-actions { min-width: 0; }
}
.wb-order-warehouse-workflow {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

body:not([data-workspace="wb"]) .wb-order-warehouse-workflow {
  display: none;
}
