/* 79ECOM order details — isolated final layer */
:root {
  --od-ink: #182230;
  --od-text: #475467;
  --od-muted: #667085;
  --od-line: #e4e7ec;
  --od-soft: #f8fafc;
  --od-blue: #2563eb;
  --od-blue-soft: #eff6ff;
  --od-orange: #d97706;
}

.order-expand {
  width: 30px !important;
  height: 30px !important;
  display: inline-grid !important;
  place-items: center !important;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: #64748b !important;
  font-size: 17px !important;
  transition: background .16s ease, color .16s ease, transform .16s ease !important;
}
.order-expand:hover { background: #f1f5f9 !important; color: var(--od-blue) !important; }
.order-row-expanded .order-expand {
  transform: rotate(180deg) !important;
  border-color: #bfdbfe !important;
  background: var(--od-blue-soft) !important;
  color: var(--od-blue) !important;
}

.order-detail-row > td {
  padding: 0 !important;
  overflow: visible !important;
  border: 0 !important;
  background: #f6f8fb !important;
}
.order-detail-panel {
  position: sticky !important;
  left: 0 !important;
  width: calc(100vw - 336px) !important;
  max-width: calc(100vw - 336px) !important;
  margin: 10px 14px 16px !important;
  padding: 0 !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  border: 1px solid #dfe4eb !important;
  border-radius: 12px !important;
  background: #fff !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .06) !important;
  scrollbar-color: #b8c2d1 #f1f4f8;
  scrollbar-width: thin;
}
.order-detail-panel::-webkit-scrollbar { height: 10px; }
.order-detail-panel::-webkit-scrollbar-track { background: #f1f4f8; border-radius: 0 0 12px 12px; }
.order-detail-panel::-webkit-scrollbar-thumb { background: #b8c2d1; border: 2px solid #f1f4f8; border-radius: 99px; }

.order-detail-panel table {
  width: 1480px !important;
  min-width: 1480px !important;
  max-width: 1480px !important;
  table-layout: fixed !important;
  border: 0 !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  font-family: "DM Sans", Inter, system-ui, sans-serif !important;
}
.order-detail-panel thead {
  display: table-header-group !important;
  visibility: visible !important;
  position: relative !important;
  z-index: 2 !important;
}
.order-detail-panel thead th {
  height: 42px !important;
  padding: 0 14px !important;
  overflow: visible !important;
  border: 0 !important;
  border-right: 1px solid #e7ebf0 !important;
  border-bottom: 1px solid #dfe4eb !important;
  background: linear-gradient(180deg, #fbfcfe 0%, #f4f6f9 100%) !important;
  color: #5f6c80 !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  letter-spacing: .035em !important;
  text-align: left !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
}
.order-detail-panel thead th:last-child { border-right: 0 !important; }
.order-detail-panel thead th:nth-child(1) { width: 260px !important; }
.order-detail-panel thead th:nth-child(2) { width: 225px !important; }
.order-detail-panel thead th:nth-child(3) { width: 265px !important; }
.order-detail-panel thead th:nth-child(4) { width: 125px !important; text-align: center !important; }
.order-detail-panel thead th:nth-child(5) { width: 325px !important; }
.order-detail-panel thead th:nth-child(6) { width: 280px !important; }

.order-detail-panel tbody td {
  height: auto !important;
  min-height: 168px !important;
  padding: 14px !important;
  overflow: visible !important;
  border: 0 !important;
  border-right: 1px solid #edf0f4 !important;
  border-bottom: 1px solid #edf0f4 !important;
  background: #fff !important;
  color: var(--od-text) !important;
  font-size: 12px !important;
  line-height: 1.45 !important;
  text-align: left !important;
  white-space: normal !important;
  vertical-align: top !important;
}
.order-detail-panel tbody td:last-child { border-right: 0 !important; }
.order-detail-panel tbody tr:last-child td { border-bottom: 0 !important; }
.order-detail-panel tbody tr:hover td { background: #fcfdff !important; }

.detail-product {
  display: grid !important;
  grid-template-columns: 76px minmax(0, 1fr) !important;
  gap: 12px !important;
  min-width: 0 !important;
}
.detail-image-button,
.detail-image-empty {
  width: 76px !important;
  height: 76px !important;
  display: grid !important;
  place-items: center !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 1px solid #d8dee8 !important;
  border-radius: 9px !important;
  background: linear-gradient(145deg, #f8fafc, #eef2f7) !important;
  color: #536176 !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.65) !important;
}
.detail-image-button { cursor: zoom-in !important; }
.detail-image-button:hover { border-color: #93c5fd !important; box-shadow: 0 0 0 3px #dbeafe !important; }
.detail-image-button img { width: 100% !important; height: 100% !important; object-fit: cover !important; }
.detail-product-meta { min-width: 0 !important; }
.detail-product-meta > b {
  display: block !important;
  overflow: visible !important;
  color: var(--od-ink) !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
}
.detail-product-meta dl { display: grid !important; gap: 4px !important; margin: 10px 0 0 !important; }
.detail-product-meta dl > div { display: grid !important; grid-template-columns: 72px minmax(0,1fr) !important; gap: 5px !important; }
.detail-product-meta dt { color: var(--od-muted) !important; font-weight: 600 !important; }
.detail-product-meta dd { margin: 0 !important; color: var(--od-text) !important; }
.detail-state { justify-self: start !important; padding: 1px 7px !important; border-radius: 999px !important; font-size: 10px !important; font-weight: 700 !important; line-height: 18px !important; }
.detail-state.pending { background: #fff7ed !important; color: #c2410c !important; }
.detail-state.need-scale { background: #fffbeb !important; color: #b45309 !important; }

.detail-stack { display: grid !important; gap: 7px !important; min-width: 0 !important; color: var(--od-text) !important; font-size: 12px !important; line-height: 1.45 !important; }
.detail-stack > div { display: block !important; }
.detail-stack b { margin-right: 4px !important; color: #344054 !important; font-weight: 700 !important; }
.detail-stack strong { color: var(--od-ink) !important; font-weight: 700 !important; }
.detail-stack strong,
.detail-stack span { word-break: normal !important; overflow-wrap: break-word !important; }
.detail-customization a { color: var(--od-blue) !important; font-weight: 700 !important; text-underline-offset: 2px !important; }
.detail-missing { color: #dc2626 !important; font-weight: 700 !important; }

.detail-qty { display: grid !important; gap: 9px !important; color: var(--od-muted) !important; font-size: 11px !important; }
.detail-qty label { display: grid !important; gap: 5px !important; }
.detail-qty input,
.qty-step,
.qty-ok {
  height: 34px !important;
  border: 1px solid #d0d5dd !important;
  background: #fff !important;
  color: #344054 !important;
  font: 600 12px "DM Sans", sans-serif !important;
}
.detail-qty input { width: 100% !important; padding: 0 7px !important; border-radius: 6px !important; text-align: center !important; }
.detail-qty input:disabled { background: #f8fafc !important; color: #667085 !important; }
.qty-stepper { display: grid !important; grid-template-columns: 32px minmax(42px, 1fr) 32px !important; }
.qty-stepper input { border-radius: 0 !important; border-left: 0 !important; border-right: 0 !important; }
.qty-step { padding: 0 !important; cursor: pointer !important; font-size: 16px !important; }
.qty-step:first-child { border-radius: 6px 0 0 6px !important; }
.qty-step:last-child { border-radius: 0 6px 6px 0 !important; }
.qty-step:hover { background: var(--od-blue-soft) !important; color: var(--od-blue) !important; }
.qty-ok { border-radius: 6px !important; cursor: pointer !important; }
.qty-ok:not(:disabled) { border-color: var(--od-blue) !important; background: var(--od-blue) !important; color: #fff !important; }
.qty-ok:disabled { background: #f2f4f7 !important; color: #98a2b3 !important; cursor: default !important; }

.cost-center-fields { display: grid !important; gap: 9px !important; }
.cost-center-fields label { display: grid !important; grid-template-columns: 92px minmax(0,1fr) !important; align-items: center !important; gap: 8px !important; }
.cost-center-fields label > span,
.fulfill-name b { color: #344054 !important; font-weight: 700 !important; }
.cost-center-fields select,
.detail-tracking input,
.detail-tracking select,
.detail-tracking textarea {
  width: 100% !important;
  border: 1px solid #d0d5dd !important;
  border-radius: 7px !important;
  background: #fff !important;
  color: #344054 !important;
  font: 12px "DM Sans", sans-serif !important;
  outline: none !important;
  transition: border-color .15s ease, box-shadow .15s ease !important;
}
.cost-center-fields select,
.detail-tracking input,
.detail-tracking select { height: 36px !important; padding: 0 10px !important; }
.cost-center-fields select:focus,
.detail-tracking input:focus,
.detail-tracking select:focus,
.detail-tracking textarea:focus { border-color: #60a5fa !important; box-shadow: 0 0 0 3px #dbeafe !important; }
.fulfill-name { display: flex !important; align-items: center !important; gap: 8px !important; }
.fulfill-name > span { display: grid !important; grid-template-columns: 92px minmax(0,1fr) !important; align-items: center !important; width: 100% !important; min-width: 0 !important; }
.fulfill-name em { color: #475467 !important; font-style: normal !important; overflow-wrap: anywhere !important; }
.copy-fulfill { height: 30px !important; padding: 0 10px !important; border: 1px solid #cbd5e1 !important; border-radius: 6px !important; background: #fff !important; color: #475569 !important; font: 700 10px "DM Sans", sans-serif !important; cursor: pointer !important; }
.copy-fulfill:hover { border-color: #93c5fd !important; background: var(--od-blue-soft) !important; color: var(--od-blue) !important; }

.detail-tracking { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 8px !important; min-width: 0 !important; }
.detail-tracking select,
.detail-tracking textarea,
.detail-update { grid-column: 1 / -1 !important; }
.detail-tracking textarea { height: 60px !important; min-height: 60px !important; padding: 9px 10px !important; line-height: 1.45 !important; resize: vertical !important; }
.detail-update { height: 36px !important; border: 1px solid #1d4ed8 !important; border-radius: 7px !important; background: linear-gradient(180deg, #3478ee 0%, #2563eb 100%) !important; color: #fff !important; font: 700 12px "DM Sans", sans-serif !important; box-shadow: 0 1px 2px rgba(37,99,235,.2) !important; cursor: pointer !important; }
.detail-update:hover { background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%) !important; box-shadow: 0 4px 10px rgba(37,99,235,.24) !important; }
.detail-update:active { transform: translateY(1px) !important; }

@media (max-width: 900px) {
  .order-detail-panel {
    width: calc(100vw - 86px) !important;
    max-width: calc(100vw - 86px) !important;
    margin: 8px 8px 12px !important;
  }
}
