/* QILI-A-20260817 shadow order execution */
#qili-order-execution-shadow {
  box-sizing: border-box;
  width: 100%;
  min-height: calc(100vh - 112px);
  padding: 14px 16px 24px;
  background: #f5f7fa;
  color: #172033;
  font-size: 13px;
}
#qili-order-execution-shadow * { box-sizing: border-box; }
#qili-order-execution-shadow button,
#qili-order-execution-shadow input,
#qili-order-execution-shadow select,
#qili-order-execution-shadow textarea { font: inherit; letter-spacing: 0; }
#qili-order-execution-shadow button {
  min-height: 32px;
  border: 1px solid #cbd3df;
  border-radius: 4px;
  padding: 0 11px;
  background: #fff;
  color: #263449;
  cursor: pointer;
}
#qili-order-execution-shadow button:hover { border-color: #5b7fa8; background: #f7faff; }
#qili-order-execution-shadow button:disabled { opacity: .5; cursor: not-allowed; }
#qili-order-execution-shadow .oes-primary { border-color: #1769aa; background: #1769aa; color: #fff; }
#qili-order-execution-shadow .oes-primary:hover { border-color: #12588f; background: #12588f; }
#qili-order-execution-shadow .oes-success { border-color: #2f7d4a; background: #2f7d4a; color: #fff; }
#qili-order-execution-shadow .oes-danger { border-color: #c63f3f; color: #a32626; background: #fff; }
#qili-order-execution-shadow .oes-icon {
  width: 32px;
  min-width: 32px;
  padding: 0;
  font-size: 19px;
  line-height: 30px;
}
#qili-order-execution-shadow input,
#qili-order-execution-shadow select,
#qili-order-execution-shadow textarea {
  width: 100%;
  border: 1px solid #cbd3df;
  border-radius: 4px;
  background: #fff;
  color: #172033;
}
#qili-order-execution-shadow input,
#qili-order-execution-shadow select { height: 32px; padding: 0 9px; }
#qili-order-execution-shadow textarea { min-height: 68px; padding: 8px 9px; resize: vertical; }
#qili-order-execution-shadow input:focus,
#qili-order-execution-shadow select:focus,
#qili-order-execution-shadow textarea:focus { outline: 2px solid rgba(23,105,170,.15); border-color: #1769aa; }
#qili-order-execution-shadow .oes-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  margin-bottom: 10px;
}
#qili-order-execution-shadow .oes-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
#qili-order-execution-shadow h1 { margin: 0; font-size: 20px; line-height: 28px; font-weight: 700; letter-spacing: 0; }
#qili-order-execution-shadow h2 { margin: 0; font-size: 15px; line-height: 22px; font-weight: 700; letter-spacing: 0; }
#qili-order-execution-shadow .oes-mode {
  display: inline-flex;
  align-items: center;
  height: 23px;
  border: 1px solid #c58a25;
  border-radius: 4px;
  padding: 0 7px;
  background: #fff8e8;
  color: #855514;
  font-size: 12px;
  white-space: nowrap;
}
#qili-order-execution-shadow .oes-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
#qili-order-execution-shadow .oes-band {
  width: 100%;
  border-top: 1px solid #dbe1e9;
  border-bottom: 1px solid #dbe1e9;
  background: #fff;
  padding: 10px 12px;
  margin-bottom: 10px;
}
#qili-order-execution-shadow .oes-search { display: grid; grid-template-columns: minmax(240px, 520px) auto 1fr; gap: 8px; align-items: center; }
#qili-order-execution-shadow .oes-message { min-height: 20px; color: #667287; }
#qili-order-execution-shadow .oes-message.error { color: #b42318; }
#qili-order-execution-shadow .oes-message.success { color: #287346; }
#qili-order-execution-shadow .oes-table-wrap { width: 100%; overflow: auto; border: 1px solid #dbe1e9; background: #fff; }
#qili-order-execution-shadow table { width: 100%; border-collapse: collapse; table-layout: fixed; }
#qili-order-execution-shadow th {
  height: 35px;
  padding: 7px 8px;
  border-bottom: 1px solid #d4dbe5;
  background: #edf1f5;
  color: #3d4a5d;
  text-align: left;
  font-weight: 700;
  white-space: nowrap;
}
#qili-order-execution-shadow td {
  min-height: 36px;
  padding: 7px 8px;
  border-bottom: 1px solid #edf0f4;
  color: #263449;
  vertical-align: middle;
  word-break: break-word;
}
#qili-order-execution-shadow tbody tr:hover td { background: #f8fbff; }
#qili-order-execution-shadow tbody tr:last-child td { border-bottom: 0; }
#qili-order-execution-shadow .oes-num { text-align: right; font-variant-numeric: tabular-nums; }
#qili-order-execution-shadow .oes-center { text-align: center; }
#qili-order-execution-shadow .oes-muted { color: #748095; }
#qili-order-execution-shadow .oes-empty { padding: 34px 14px; text-align: center; color: #748095; }
#qili-order-execution-shadow .oes-order-head {
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) repeat(4, minmax(110px, .8fr));
  gap: 14px;
  align-items: end;
}
#qili-order-execution-shadow .oes-kv span { display: block; margin-bottom: 4px; color: #748095; font-size: 12px; }
#qili-order-execution-shadow .oes-kv strong { display: block; overflow: hidden; color: #172033; text-overflow: ellipsis; white-space: nowrap; }
#qili-order-execution-shadow .oes-workspace { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 10px; align-items: start; }
#qili-order-execution-shadow .oes-sidebar {
  position: sticky;
  top: 8px;
  border: 1px solid #dbe1e9;
  background: #fff;
}
#qili-order-execution-shadow .oes-sidebar-head { display: flex; align-items: center; justify-content: space-between; min-height: 40px; padding: 6px 9px; border-bottom: 1px solid #dbe1e9; }
#qili-order-execution-shadow .oes-version-list { display: flex; flex-direction: column; max-height: calc(100vh - 300px); overflow: auto; }
#qili-order-execution-shadow .oes-version {
  width: 100%;
  min-height: 55px;
  border: 0;
  border-bottom: 1px solid #edf0f4;
  border-radius: 0;
  padding: 8px 9px;
  text-align: left;
}
#qili-order-execution-shadow .oes-version.active { background: #eaf3fb; box-shadow: inset 3px 0 #1769aa; }
#qili-order-execution-shadow .oes-version strong,
#qili-order-execution-shadow .oes-version span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#qili-order-execution-shadow .oes-version span { margin-top: 3px; color: #748095; font-size: 12px; }
#qili-order-execution-shadow .oes-main { min-width: 0; }
#qili-order-execution-shadow .oes-plan-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
#qili-order-execution-shadow .oes-plan-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 5px; }
#qili-order-execution-shadow .oes-status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 1px solid #b9c4d2;
  border-radius: 4px;
  padding: 1px 7px;
  background: #f6f8fa;
  color: #4b586d;
  font-size: 12px;
}
#qili-order-execution-shadow .oes-status.active,
#qili-order-execution-shadow .oes-status.completed { border-color: #7aad8a; background: #edf9f1; color: #28643c; }
#qili-order-execution-shadow .oes-status.blocked,
#qili-order-execution-shadow .oes-status.cancelled { border-color: #db9994; background: #fff1f0; color: #a5322b; }
#qili-order-execution-shadow .oes-status.submitted,
#qili-order-execution-shadow .oes-status.approved { border-color: #d5ad62; background: #fff8e8; color: #855514; }
#qili-order-execution-shadow .oes-tabs { display: inline-flex; border: 1px solid #cbd3df; border-radius: 4px; overflow: hidden; margin-bottom: 10px; }
#qili-order-execution-shadow .oes-tabs button { border: 0; border-right: 1px solid #cbd3df; border-radius: 0; min-width: 90px; }
#qili-order-execution-shadow .oes-tabs button:last-child { border-right: 0; }
#qili-order-execution-shadow .oes-tabs button.active { background: #263449; color: #fff; }
#qili-order-execution-shadow .oes-section { margin-bottom: 12px; }
#qili-order-execution-shadow .oes-section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 38px; padding: 4px 0; }
#qili-order-execution-shadow .oes-form-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; }
#qili-order-execution-shadow .oes-field { min-width: 0; }
#qili-order-execution-shadow .oes-field label { display: block; min-height: 18px; margin-bottom: 4px; color: #667287; font-size: 12px; }
#qili-order-execution-shadow .oes-field.full { grid-column: 1 / -1; }
#qili-order-execution-shadow .oes-node-name { font-weight: 700; color: #172033; }
#qili-order-execution-shadow .oes-deps { color: #667287; font-size: 12px; }
#qili-order-execution-shadow .oes-progress { display: flex; align-items: center; gap: 8px; }
#qili-order-execution-shadow .oes-progress-track { flex: 1 1 auto; min-width: 80px; height: 7px; overflow: hidden; border-radius: 4px; background: #dfe5ec; }
#qili-order-execution-shadow .oes-progress-bar { height: 100%; background: #2f7d4a; }
#qili-order-execution-shadow .oes-progress strong { min-width: 35px; text-align: right; font-size: 12px; }
#qili-order-execution-shadow .oes-row-actions { display: flex; align-items: center; justify-content: center; gap: 5px; flex-wrap: wrap; }
#qili-order-execution-shadow .oes-row-actions button { min-height: 28px; padding: 0 8px; font-size: 12px; }
#qili-order-execution-shadow .oes-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 6000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(20, 29, 43, .42);
}
#qili-order-execution-shadow .oes-modal {
  display: flex;
  flex-direction: column;
  width: min(920px, 100%);
  max-height: 92vh;
  overflow: hidden;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(20, 29, 43, .28);
}
#qili-order-execution-shadow .oes-modal.narrow { width: min(560px, 100%); }
#qili-order-execution-shadow .oes-modal-head,
#qili-order-execution-shadow .oes-modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-bottom: 1px solid #dbe1e9; }
#qili-order-execution-shadow .oes-modal-foot { justify-content: flex-end; border-top: 1px solid #dbe1e9; border-bottom: 0; background: #f7f9fb; }
#qili-order-execution-shadow .oes-modal-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 12px; }
#qili-order-execution-shadow .oes-modal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
#qili-order-execution-shadow .oes-checks { display: flex; flex-wrap: wrap; gap: 6px; min-height: 32px; padding: 5px; border: 1px solid #cbd3df; border-radius: 4px; }
#qili-order-execution-shadow .oes-check { display: inline-flex; align-items: center; gap: 5px; min-height: 24px; padding: 0 6px; border: 1px solid #dbe1e9; border-radius: 4px; background: #f8fafc; }
#qili-order-execution-shadow .oes-check input { width: auto; height: auto; }
#qili-order-execution-shadow .oes-line-head,
#qili-order-execution-shadow .oes-line-grid { display: grid; grid-template-columns: 1fr 1.5fr .65fr .5fr .75fr 1fr .7fr .75fr auto; gap: 6px; align-items: center; }
#qili-order-execution-shadow .oes-line-head { margin-bottom: 4px; color: #748095; font-size: 12px; }
#qili-order-execution-shadow .oes-line-grid { margin-bottom: 6px; }
#qili-order-execution-shadow .oes-event-data { color: #667287; font-size: 12px; line-height: 18px; }
#qili-order-execution-shadow .oes-loading { opacity: .58; pointer-events: none; }
@media (max-width: 1100px) {
  #qili-order-execution-shadow .oes-order-head { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #qili-order-execution-shadow .oes-modal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  #qili-order-execution-shadow { padding: 10px 8px 18px; }
  #qili-order-execution-shadow .oes-topbar,
  #qili-order-execution-shadow .oes-plan-head { align-items: stretch; flex-direction: column; }
  #qili-order-execution-shadow .oes-search { grid-template-columns: 1fr auto; }
  #qili-order-execution-shadow .oes-search .oes-message { grid-column: 1 / -1; }
  #qili-order-execution-shadow .oes-workspace { grid-template-columns: 1fr; }
  #qili-order-execution-shadow .oes-sidebar { position: static; }
  #qili-order-execution-shadow .oes-version-list { max-height: 180px; }
  #qili-order-execution-shadow .oes-form-grid,
  #qili-order-execution-shadow .oes-modal-grid { grid-template-columns: 1fr; }
  #qili-order-execution-shadow .oes-line-grid { grid-template-columns: 1fr 1fr; border-bottom: 1px solid #dbe1e9; padding-bottom: 8px; }
  #qili-order-execution-shadow .oes-line-head { display: none; }
  #qili-order-execution-shadow .oes-line-grid button { width: 100%; }
}
@media (max-width: 560px) {
  #qili-order-execution-shadow .oes-order-head { grid-template-columns: 1fr 1fr; }
  #qili-order-execution-shadow .oes-tabs { display: flex; width: 100%; }
  #qili-order-execution-shadow .oes-tabs button { flex: 1 1 0; min-width: 0; }
}

/* QILI-A-20260818 shadow execution UX */
#qili-order-execution-shadow .oes-create-plan-compact {
  min-height: 28px;
  padding: 0 9px;
  border-color: #1769aa;
  color: #1769aa;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
#qili-order-execution-shadow .oes-plan-empty {
  display: flex;
  min-height: 150px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
  border-top: 1px solid #dbe1e9;
  border-bottom: 1px solid #dbe1e9;
  background: #fff;
  color: #667287;
}
#qili-order-execution-shadow .oes-plan-empty strong { color: #263449; font-size: 15px; }
#qili-order-execution-shadow .oes-plan-empty span { color: #748095; }
#qili-order-execution-shadow .oes-table-wrap table {
  min-width: 0 !important;
  max-width: 100%;
}
#qili-order-execution-shadow .oes-table-wrap th,
#qili-order-execution-shadow .oes-table-wrap td,
#qili-order-execution-shadow .oes-table-wrap input,
#qili-order-execution-shadow .oes-table-wrap select {
  min-width: 0 !important;
  max-width: 100%;
}
#qili-order-execution-shadow .oes-modal-head h2 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#qili-order-execution-shadow .oes-modal-body .oes-empty { padding: 22px 12px; }
@media (max-width: 1400px) and (min-width: 821px) {
  #qili-order-execution-shadow .oes-workspace { grid-template-columns: 200px minmax(0, 1fr); }
  #qili-order-execution-shadow th,
  #qili-order-execution-shadow td { padding-left: 6px; padding-right: 6px; }
}
#qili-order-execution-shadow .oes-create-plan-compact.is-disabled { color: #748095; border-color: #cbd3df; background: #f6f8fa; }
#qili-order-execution-shadow .oes-readiness { display: flex; align-items: center; gap: 10px; min-height: 34px; margin: -4px 0 10px; padding: 6px 10px; border-left: 3px solid #d5ad62; background: #fff8e8; color: #855514; }
#qili-order-execution-shadow .oes-readiness.ready { border-left-color: #7aad8a; background: #edf9f1; color: #28643c; }
#qili-order-execution-shadow .oes-readiness span { overflow: hidden; color: #667287; text-overflow: ellipsis; white-space: nowrap; }
# QILI-A-20260818 shadow inventory analysis
#qili-order-execution-shadow .oes-inventory-analysis .oes-section-head { margin-bottom: 4px; }
#qili-order-execution-shadow .oes-analysis-warehouse { line-height: 19px; color: #667287; font-size: 12px; }
#qili-order-execution-shadow .oes-inventory-analysis .oes-status { white-space: nowrap; }
# QILI-A-20260818 legacy AI inventory analysis
#qili-order-execution-shadow .oes-ai-summary { margin-top: 12px; padding-top: 10px; border-top: 1px solid #dbe1e9; }
#qili-order-execution-shadow .oes-ai-summary h3 { margin: 12px 0 6px; color: #3d4a5d; font-size: 13px; }
#qili-order-execution-shadow .oes-ai-suggestion { margin: 6px 0; color: #172033; line-height: 20px; }
#qili-order-execution-shadow .oes-ai-summary .oes-table-wrap { margin-bottom: 8px; }
#qili-order-execution-shadow .oes-match-tier { display: inline-block; min-width: 72px; color: #245b8a; font-weight: 600; }
#qili-order-execution-shadow .oes-ai-summary td { vertical-align: top; }
#qili-order-execution-shadow .oes-source-banner { margin: 4px 0 10px; padding: 8px 10px; color: #245b8a; background: #f0f7ff; border: 1px solid #cfe4f7; }
#qili-order-execution-shadow .oes-ai-summary .oes-table-wrap { overflow-x: auto; }
# QILI-A-20260818 shadow inventory reservation preview
#qili-order-execution-shadow .oes-reservation-preview .oes-section-head { margin-bottom: 4px; }
#qili-order-execution-shadow .oes-reservation-preview .oes-muted { line-height: 18px; }
# QILI-A-20260818 shadow inventory reservation reconciliation
#qili-order-execution-shadow .oes-reservation-reconciliation .oes-section-head { margin-bottom: 4px; }
#qili-order-execution-shadow .oes-reservation-reconciliation .oes-muted { line-height: 18px; }
# QILI-A-20260818 shadow reservation commit readiness
#qili-order-execution-shadow .oes-reservation-commit-readiness .oes-section-head { margin-bottom: 4px; }
#qili-order-execution-shadow .oes-idempotency-keys { margin-top: 10px; padding-top: 8px; border-top: 1px solid #e2e8f0; }
#qili-order-execution-shadow .oes-idempotency-keys code { display: inline-block; margin-top: 4px; font-size: 12px; word-break: break-all; }
# QILI-A-20260818 shadow formal reservation commit
#qili-order-execution-shadow .oes-reservation-commit-readiness .oes-section-head > button { margin-left: auto; }
# QILI-A-20260818 shadow reservation lifecycle
#qili-order-execution-shadow .oes-reservation-reconciliation .oes-table-wrap button { margin-right: 4px; }
# QILI-A-20260818 shadow reservation return
#qili-order-execution-shadow .oes-reservation-reconciliation .oes-table-wrap button { margin-right: 4px; margin-bottom: 3px; }
# QILI-A-20260818 shadow production receipt
#qili-order-execution-shadow .oes-section-head > button[data-action="production-receipt"] { margin-left: auto; }
# QILI-A-20260818 shadow production receipt batch
#qili-order-execution-shadow .oes-section-head > button[data-action="production-receipt-batch"] { margin-left: 4px; }
# QILI-A-20260818 shadow production adjustment
#qili-order-execution-shadow .oes-section-head > button[data-action="production-adjustment"] { margin-left: 4px; }
# QILI-A-20260818 shadow process cost ledger
#qili-order-execution-shadow .oes-section-head > button[data-action="process-cost"] { margin-left: 4px; }
# QILI-A-20260818 shadow inventory transfer
#qili-order-execution-shadow .oes-section-head > button[data-action="inventory-transfer"] { margin-left: 4px; }
# QILI-A-20260818 shadow outsourcing handoff
#qili-order-execution-shadow .oes-section-head > button[data-action="outsourcing-handoff"] { margin-left: 4px; }
# QILI-A-20260818 shadow purchase requirement
#qili-order-execution-shadow .oes-section-head > button[data-action="purchase-requirement"] { margin-left: 4px; }
# QILI-A-20260818 shadow purchase receipt
#qili-order-execution-shadow .oes-section-head > button[data-action="purchase-receipt"] { margin-left: 4px; }
# QILI-A-20260818 shadow shipping events
#qili-order-execution-shadow .oes-section-head > button[data-action="shipping-event"] { margin-left: 4px; }
# QILI-A-20260818 shadow outsourcing inventory
#qili-order-execution-shadow .oes-section-head > button[data-action="outsourcing-inventory"] { margin-left: 4px; }
# QILI-A-20260818 shadow finance settlement
#qili-order-execution-shadow .oes-section-head > button[data-action="finance-settlement"] { margin-left: 4px; }
# QILI-A-20260818 shadow labor evidence ledger
#qili-order-execution-shadow .oes-section-head > button[data-action="labor-evidence"] { margin-left: 4px; }

#qili-order-execution-shadow .oes-line-grid [data-line-field="inventoryId"] { min-width: 0; }

#qili-order-execution-shadow .oes-workflow-collaboration { border-top: 2px solid #1769aa; }
#qili-order-execution-shadow .oes-workflow-note { margin: 0 0 8px; line-height: 20px; }
#qili-order-execution-shadow .oes-workflow-collaboration .oes-row-actions { justify-content: flex-start; }
#qili-order-execution-shadow .oes-workflow-collaboration .oes-row-actions button { min-width: 70px; }

#qili-order-execution-shadow .oes-pagination { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 8px 2px; color: #667287; }

#qili-order-execution-shadow .oes-task-board-note { padding-top: 8px; }
#qili-order-execution-shadow .oes-task-board table { min-width: 980px; }

#qili-order-execution-shadow .oes-readonly-action-note { color: #855514; padding: 0 6px; line-height: 32px; }
#qili-order-execution-shadow .oes-task-board .oes-primary { white-space: nowrap; }

#qili-order-execution-shadow .oes-task-card-actions { display: flex; flex-wrap: wrap; gap: 5px; min-width: 290px; }
#qili-order-execution-shadow .oes-task-board table { min-width: 1240px; }

#qili-order-execution-shadow .oes-formal-closure { border-top: 2px solid #2e7d32; }
#qili-order-execution-shadow .oes-formal-closure .oes-section-head { align-items: flex-start; }

#qili-order-execution-shadow .oes-formal-closure { border-top: 2px solid #2e7d32; }
#qili-order-execution-shadow .oes-formal-closure .oes-section-head { align-items: flex-start; }

#qili-order-execution-shadow .oes-unified-document-status { border-top: 2px solid #1565c0; }

#qili-order-execution-shadow .oes-section table input[data-field="allocation-contribution"] { min-width: 90px; }
