/* 2026-07-17 selected UI direction: ledger control room + warehouse task surface. */
:root {
  --bg: #eef2f4;
  --surface: #ffffff;
  --surface-2: #f4f6f7;
  --surface-3: #f8fafb;
  --ink: #24313a;
  --text: #24313a;
  --muted: #6f7d86;
  --line: #d9e0e5;
  --accent: #2e6f9e;
  --accent-2: #2e6f9e;
  --brand: #2f6b4f;
  --brand-strong: #24563f;
  --brand-soft: #e8f1ec;
  --warn: #9e6a1c;
  --danger: #b94739;
  --ok: #2f6b4f;
  --sidebar: #102a3a;
  --sidebar-2: #18384b;
  --focus-ring: 0 0 0 3px rgba(46, 111, 158, 0.18);
  --shadow: 0 12px 28px rgba(25, 43, 54, 0.1);
  --shadow-soft: 0 6px 16px rgba(25, 43, 54, 0.07);
}

.order-whatsapp-phone-line {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

#ordersView .orders-inspector-buyer-section .orders-inspector-person .order-whatsapp-phone-line {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  overflow: visible;
  -webkit-line-clamp: unset;
}

#ordersView .orders-inspector-buyer-section .orders-inspector-person .order-whatsapp-phone-line > span {
  display: inline;
  overflow: visible;
  -webkit-line-clamp: unset;
}

.order-whatsapp-link {
  position: relative;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border: 1px solid #9ecdb9;
  border-radius: 6px;
  background: #f1faf6;
  color: #13795b;
  text-decoration: none;
  touch-action: manipulation;
}

.order-whatsapp-link:hover {
  border-color: #128c7e;
  background: #dff6ea;
  color: #075e54;
}

.order-whatsapp-link:focus-visible {
  outline: 2px solid #128c7e;
  outline-offset: 2px;
}

.order-whatsapp-link svg {
  display: block;
  width: 13px;
  height: 13px;
}

.sidebar {
  background: linear-gradient(180deg, #102a3a 0%, #0d2432 100%);
}

.nav-item:hover,
.nav-utility:hover,
.nav-item.active {
  background: rgba(109, 154, 184, 0.24);
  box-shadow: inset 3px 0 0 #78a8c8;
}

.primary-btn {
  border-color: #2e6f9e;
  background: #2e6f9e;
}

.row-btn.ok {
  border-color: #2e6f9e;
  background: #eef5fa;
  color: #225b84;
}

.topbar-system {
  display: none;
  flex: 0 1 auto;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: #c9d8df;
  font-size: 12px;
  white-space: nowrap;
}

.topbar-health {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.topbar-health i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #20b75a;
  box-shadow: 0 0 0 3px rgba(32, 183, 90, 0.09);
}

#topbarClock {
  padding-left: 18px;
  border-left: 1px solid rgba(174, 200, 215, 0.16);
  font-variant-numeric: tabular-nums;
}

@media (min-width: 761px) {
  :root {
    --sidebar-collapsed-width: 154px;
    --sidebar-expanded-width: 154px;
  }

  .sidebar,
  .sidebar:hover,
  .sidebar:focus-within,
  .sidebar.force-collapsed,
  .sidebar.force-collapsed:hover,
  .sidebar.force-collapsed:focus-within {
    width: var(--sidebar-expanded-width);
    padding: 14px 8px;
    box-shadow: none;
  }

  .sidebar .brand,
  .sidebar:hover .brand,
  .sidebar:focus-within .brand,
  .sidebar.force-collapsed .brand {
    justify-content: flex-start;
    padding: 0 8px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .sidebar .brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 6px;
  }

  .sidebar .brand > div:last-child,
  .sidebar:hover .brand > div:last-child,
  .sidebar:focus-within .brand > div:last-child,
  .sidebar.force-collapsed .brand > div:last-child {
    max-width: 106px;
    opacity: 1;
    transform: none;
  }

  .sidebar .current-account {
    display: none;
  }

  .sidebar .nav {
    gap: 2px;
    padding-top: 8px;
  }

  .sidebar .nav-item,
  .sidebar .nav-utility,
  .sidebar:hover .nav-item,
  .sidebar:hover .nav-utility,
  .sidebar:focus-within .nav-item,
  .sidebar:focus-within .nav-utility,
  .sidebar.force-collapsed .nav-item,
  .sidebar.force-collapsed .nav-utility {
    width: 100%;
    height: auto;
    min-height: 38px;
    grid-template-columns: 24px minmax(0, 1fr);
    grid-template-rows: none;
    justify-items: stretch;
    gap: 8px;
    padding: 0 10px;
    border-radius: 5px;
  }

  .sidebar .nav-item > .lucide,
  .sidebar .nav-item > span,
  .sidebar .nav-utility > .lucide,
  .sidebar .nav-utility > span,
  .sidebar.force-collapsed .nav-item > .lucide,
  .sidebar.force-collapsed .nav-item > span,
  .sidebar.force-collapsed .nav-utility > .lucide,
  .sidebar.force-collapsed .nav-utility > span {
    grid-column: auto;
    grid-row: auto;
    justify-self: auto;
  }

  .sidebar .nav-item span,
  .sidebar .nav-utility span,
  .sidebar.force-collapsed .nav-item span,
  .sidebar.force-collapsed .nav-utility span {
    max-width: 104px;
    opacity: 1;
    transform: none;
    font-size: 13px;
    font-weight: 750;
  }

  .workspace.view-orders-active {
    padding: 0;
    background: #eef2f4;
  }

  .workspace.view-orders-active > .topbar {
    display: flex;
    min-height: 56px;
    margin: 0;
    padding: 0 18px;
    border-bottom: 1px solid rgba(174, 200, 215, 0.16);
    background: #102a3a;
    color: #dfe9ee;
  }

  .workspace.view-orders-active > .topbar .topbar-title {
    flex: 1 1 34%;
  }

  .workspace.view-orders-active > .topbar .topbar-title .eyebrow {
    display: inline-flex !important;
    min-height: 34px;
    margin: 0;
    padding: 0 12px;
    border-color: rgba(174, 200, 215, 0.16);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.025);
    color: #d5e1e7;
    font-size: 12.5px;
  }

  .workspace.view-orders-active > .topbar #pageTitle,
  .workspace.view-orders-active > .topbar #syncStatus {
    display: none;
  }

  .workspace.view-orders-active > .topbar .top-actions {
    flex: 1 1 34%;
    justify-content: flex-end;
    gap: 7px;
  }

  .workspace.view-orders-active > .topbar .topbar-system {
    display: flex;
  }

  .workspace.view-orders-active > .topbar .user-badge,
  .workspace.view-orders-active > .topbar .icon-btn {
    color: #d5e1e7;
  }

  .workspace.view-orders-active > .topbar .icon-btn {
    border-color: transparent;
    background: transparent;
  }

  #ordersView.view.active {
    padding: 0;
  }
}

/* Order task surface. Business logic remains in the existing order workflow. */
#ordersView .orders-erp-shell {
  display: block;
}

#ordersView .orders-erp-sidebar {
  display: none !important;
}

#ordersView .orders-erp-main {
  display: grid;
  gap: 0;
}

#ordersView .orders-command-band {
  order: 1;
  display: grid !important;
  grid-template-columns: 126px minmax(0, 1fr) 250px;
  align-items: center;
  margin: 0;
  padding: 0 18px;
  border: 0;
  border-bottom: 1px solid rgba(174, 200, 215, 0.16);
  border-radius: 0;
  background: #102a3a;
  color: #eef5f8;
  box-shadow: none;
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}

#ordersView .orders-command-band .panel-head {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 0;
  border: 0;
}

#ordersView .orders-command-band h2 {
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

#ordersView .orders-risk-scope {
  color: #9fb2bd;
  font-size: 10.5px;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
}

#ordersView .orders-command-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  min-height: 64px;
}

#ordersView .orders-command-kpis article {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 64px;
  padding: 0 12px;
  border: 0;
  border-right: 1px solid rgba(174, 200, 215, 0.18);
  border-radius: 0;
  background: transparent;
}

#ordersView .orders-command-kpis article:last-child {
  border-right: 0;
}

#ordersView .orders-command-kpis span {
  color: #aebfca;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

#ordersView .orders-command-kpis strong {
  color: #6f8593;
  font-size: 21px;
  font-variant-numeric: tabular-nums;
}

#ordersView .orders-command-kpis article.has-risk strong {
  color: #e7b74d;
}

#ordersView .orders-command-kpis article:first-child.has-risk strong {
  color: #ef6658;
}

#ordersView .orders-risk-next {
  display: grid;
  gap: 5px;
  min-height: 48px;
  margin-left: 26px;
  padding: 5px 12px;
  border: 1px solid #8a6a24;
  border-radius: 5px;
  background: rgba(151, 104, 22, 0.14);
  color: #efbd42;
  text-align: left;
}

#ordersView .orders-risk-next > span {
  color: #aebfca;
  font-size: 10.5px;
  font-weight: 700;
}

#ordersView .orders-risk-next strong {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

#ordersView .orders-risk-next strong > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#ordersView .orders-risk-next b {
  font: inherit;
}

#ordersView .orders-risk-next .lucide {
  width: 15px;
  height: 15px;
}

#ordersView .orders-pipeline-stages {
  order: 2;
  display: grid;
  grid-template-columns: 126px repeat(4, minmax(0, 1fr));
  align-items: center;
  margin: 0;
  padding: 0 18px;
  border: 0;
  border-bottom: 1px solid #c7d2d9;
  border-radius: 0;
  background: #e8eef2;
  box-shadow: none;
}

#ordersView .orders-pipeline-stages::before {
  content: "作业进度";
  color: #2d404c;
  font-size: 13.5px;
  font-weight: 780;
}

#ordersView .orders-pipeline-stages button,
#ordersView .orders-pipeline-stages button.active {
  position: relative;
  display: grid;
  grid-template-columns: 24px auto;
  justify-content: center;
  align-items: center;
  gap: 7px;
  min-height: 56px;
  padding: 0 28px 0 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #3f525e;
  text-align: left;
  box-shadow: none;
}

#ordersView .orders-pipeline-stages button:hover {
  background: rgba(255, 255, 255, 0.52);
  color: #214f6d;
}

#ordersView .orders-pipeline-stages button::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -4px !important;
  left: auto !important;
  display: block !important;
  width: 58px !important;
  height: 1px !important;
  border: 0 !important;
  background: #9eafb9 !important;
  transform: translateY(-50%) !important;
}

#ordersView .orders-pipeline-stages button::before {
  content: none !important;
  display: none !important;
}

#ordersView .orders-pipeline-stages button:last-child::after {
  display: none !important;
}

#ordersView .orders-pipeline-stages button.active {
  background: #ffffff;
  color: #225f88;
  box-shadow: inset 0 -3px 0 #2e6f9e;
}

#ordersView .orders-pipeline-stages b {
  grid-column: 1;
  grid-row: 1;
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 5px;
  border-radius: 999px;
  background: #d3dee4;
  color: #314b5a;
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

#ordersView .orders-pipeline-stages button.active b {
  background: #2e6f9e;
  color: #ffffff;
}

#ordersView .orders-pipeline-stages strong {
  grid-column: 2;
  grid-row: 1;
  font-size: 14.5px;
  font-weight: 760;
  line-height: 1.15;
  letter-spacing: 0;
  white-space: nowrap;
}

#ordersView .orders-pipeline-stages small {
  display: none;
}

#ordersView #ordersResultCount {
  display: none !important;
}

#ordersView .orders-page-head {
  order: 3;
  min-height: 50px;
  margin: 0;
  padding: 9px 14px;
  border-bottom: 1px solid #d9e0e5;
  background: #ffffff;
}

#ordersView .orders-page-head h1 {
  font-size: 18px;
}

#ordersView .orders-auto-sync-pill {
  border-color: #cbd7de;
  background: #f3f6f8;
  color: #4e6574;
}

#ordersView .orders-head-actions .orders-utility-btn {
  width: auto;
  min-width: 68px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #334752;
}

#ordersView .orders-head-actions .orders-utility-btn .lucide {
  display: block;
  color: currentColor;
  stroke: currentColor;
  opacity: 1;
}

#ordersView .orders-utility-label {
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
}

/* Icon-only controls stay readable when the external icon runtime is unavailable. */
.icon-fallback-label,
.copy-inline-fallback {
  display: inline;
  color: currentColor;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.copy-inline-fallback {
  font-size: 9px;
  letter-spacing: -0.5px;
}

html.anju-icons-ready .icon-fallback-label,
html.anju-icons-ready .copy-inline-fallback {
  display: none;
}

html:not(.anju-icons-ready) .copy-inline-btn {
  width: 28px;
}

#ordersView .platform-order-inbox-panel {
  order: 4;
  margin: 10px 12px;
}

#ordersView .orders-mobile-filter-toggle,
#ordersView .orders-mobile-actions {
  order: 5;
}

#ordersView .orders-filter-panel {
  order: 6;
  margin: 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid #d9e0e5;
  border-radius: 0;
  background: #f7f9fa;
  box-shadow: none;
}

#ordersView .orders-platform-chips {
  margin: 0;
  padding: 0 12px;
  border-bottom: 1px solid #d9e0e5;
  background: #ffffff;
}

#ordersView .orders-platform-chips button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 13px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #62717b;
  font-size: 13px;
  font-weight: 800;
}

#ordersView .orders-platform-chips button b {
  min-width: 21px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #eef2f4;
  color: #53646f;
  font-size: 11px;
  line-height: 1.2;
}

#ordersView .orders-platform-chips button.active {
  border-bottom-color: #2e6f9e;
  background: #f2f7fb;
  color: #255f89;
  box-shadow: none;
}

#ordersView .orders-platform-chips button.active b {
  background: #dceaf3;
  color: #255f89;
}

#ordersView .order-platform-mark.chip-mark {
  width: 25px;
  min-width: 25px;
  height: 25px;
  border-radius: 6px;
  opacity: 1;
}

#ordersView .order-platform-mark.chip-mark img,
#ordersView .order-platform-mark.chip-mark .lucide {
  width: 15px;
  height: 15px;
}

#ordersView .orders-filter-grid {
  display: grid;
  grid-template-columns: 0.75fr 0.8fr 0.85fr 0.75fr minmax(260px, 1.65fr) auto;
  gap: 8px;
  align-items: end;
  padding: 9px 12px;
}

#ordersView .orders-filter-grid label,
#ordersView .search-box label {
  color: #63727b;
  font-size: 12px;
  font-weight: 750;
}

#ordersView .orders-filter-grid input,
#ordersView .orders-filter-grid select,
#ordersView .orders-filter-grid button {
  min-height: 36px;
  border-radius: 4px;
  font-size: 13px;
}

#ordersView .order-daily-summary-panel {
  order: 10;
  margin: 10px 12px;
}

#ordersView .order-bulk-band {
  order: 8;
  margin: 0;
  border: 0;
  border-bottom: 1px solid #d9e0e5;
  border-radius: 0;
  background: #edf4f8;
}

#ordersView .orders-pipeline-workspace {
  order: 9;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 352px;
  gap: 0;
  align-items: stretch;
  min-width: 0;
  border-top: 0;
  background: #ffffff;
}

#ordersView .orders-pipeline-list {
  min-width: 0;
  border-right: 1px solid #d9e0e5;
}

#ordersView .orders-table-wrap {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

#ordersView .orders-pipeline-table .order-row-stock-hint {
  display: none !important;
}

#ordersView .orders-pipeline-table {
  min-width: 930px;
  table-layout: fixed;
}

#ordersView .orders-table.orders-pipeline-table th,
#ordersView .orders-table.orders-pipeline-table td {
  padding: 8px 8px;
  border-color: #e0e6ea;
  vertical-align: top;
}

#ordersView .orders-table.orders-pipeline-table th {
  height: 36px;
  background: #f4f6f7;
  color: #5b6b75;
  font-size: 12px;
  font-weight: 850;
}

#ordersView .orders-table.orders-pipeline-table td {
  height: 76px;
  background: #ffffff;
  font-size: 13px;
  line-height: 1.35;
}

#ordersView .order-task-info {
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
}

#ordersView .order-platform-mark:not(.chip-mark):not(.inspector-platform-mark) {
  width: 34px;
  min-width: 34px;
  height: 34px;
  border-radius: 7px;
  opacity: 1;
}

#ordersView .order-platform-mark:not(.chip-mark):not(.inspector-platform-mark) img,
#ordersView .order-platform-mark:not(.chip-mark):not(.inspector-platform-mark) .lucide {
  width: 20px;
  height: 20px;
}

#ordersView .order-platform-stack {
  gap: 4px;
}

#ordersView .order-platform-stack small {
  max-width: 46px;
  color: #53646f;
  font-size: 10.5px;
}

#ordersView .order-task-info strong,
#ordersView .order-task-product strong,
#ordersView .order-task-deadline strong,
#ordersView .order-task-preparation strong,
#ordersView .order-task-next strong {
  font-size: 12.5px;
}

#ordersView .order-task-info small,
#ordersView .order-task-product small,
#ordersView .order-task-deadline small,
#ordersView .order-task-preparation small {
  font-size: 11.5px;
}

#ordersView .order-task-info .order-task-logistics-inline {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #2e6f9e;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#ordersView .orders-table.orders-pipeline-table th:nth-child(1),
#ordersView .orders-table.orders-pipeline-table td:nth-child(1) { width: 34px; min-width: 34px; }
#ordersView .orders-table.orders-pipeline-table th:nth-child(2),
#ordersView .orders-table.orders-pipeline-table td:nth-child(2) { width: 142px; min-width: 142px; }
#ordersView .orders-table.orders-pipeline-table th:nth-child(3),
#ordersView .orders-table.orders-pipeline-table td:nth-child(3) { width: 188px; min-width: 188px; }
#ordersView .orders-table.orders-pipeline-table th:nth-child(4),
#ordersView .orders-table.orders-pipeline-table td:nth-child(4) { width: 160px; min-width: 160px; }
#ordersView .orders-table.orders-pipeline-table th:nth-child(5),
#ordersView .orders-table.orders-pipeline-table td:nth-child(5) { width: 118px; min-width: 118px; }
#ordersView .orders-table.orders-pipeline-table th:nth-child(6),
#ordersView .orders-table.orders-pipeline-table td:nth-child(6) { width: 102px; min-width: 102px; }
#ordersView .orders-table.orders-pipeline-table th:nth-child(7),
#ordersView .orders-table.orders-pipeline-table td:nth-child(7) { width: 90px; min-width: 90px; }
#ordersView .orders-table.orders-pipeline-table th:nth-child(8),
#ordersView .orders-table.orders-pipeline-table td:nth-child(8) { width: 92px; min-width: 92px; }

#ordersView .orders-pipeline-table tbody tr:hover td {
  background: #f7fafc;
}

#ordersView .orders-pipeline-table tr.is-focused td {
  background: #edf5fb;
}

#ordersView .orders-pipeline-table tr.is-focused td:first-child {
  box-shadow: inset 3px 0 0 #2e6f9e;
}

.order-task-buyer,
.order-task-preparation {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.order-task-buyer strong {
  color: #24313a;
  font-size: 13px;
}

.order-task-buyer .order-task-phone {
  color: #4d606c;
  font-size: 12.5px;
  font-weight: 650;
}

.order-task-buyer .order-task-address {
  color: #667782;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  white-space: normal;
}

.order-task-preparation small {
  color: #6f7d86;
  font-size: 11.5px;
  line-height: 1.3;
}

.mini-pill.ok,
.task-status-pill.ok,
.task-status-pill.completed {
  border-color: #bcd7c9;
  background: #e9f4ee;
  color: #2f6b4f;
}

.task-status-pill.warn,
.task-status-pill.packed,
.task-status-pill.todo {
  border-color: #e5c58f;
  background: #fff6e7;
  color: #8d5c15;
}

.task-status-pill.transit {
  border-color: #bfd5e5;
  background: #edf5fa;
  color: #2e6f9e;
}

.order-task-next .row-btn.ok,
.orders-inspector-actions .row-btn.ok:first-child {
  border-color: #2e6f9e;
  background: #2e6f9e;
  color: #ffffff;
}

#ordersView .orders-pipeline-inspector {
  position: sticky;
  top: 0;
  display: grid;
  gap: 0;
  width: 352px;
  max-width: 352px;
  max-height: 100vh;
  overflow: auto;
  padding: 0 14px 78px;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
}

#ordersView .orders-inspector-head { order: 1; padding: 12px 0 10px; border-bottom: 1px solid #d9e0e5; }
#ordersView .orders-inspector-buyer-section { order: 2; }
#ordersView .delivery-remark-section { order: 3; }
#ordersView .orders-inspector-product-section { order: 4; }
#ordersView .orders-inspector-fulfillment-section { order: 5; }
#ordersView .orders-inspector-money-section { order: 6; }
#ordersView .orders-inspector-sku-details { order: 7; }
#ordersView .orders-inspector-actions { order: 8; }

#ordersView .orders-inspector-section {
  padding: 11px 0;
  border-bottom: 1px solid #e1e6e9;
}

#ordersView .orders-inspector-section h3 {
  color: #33434d;
  font-size: 13px;
}

#ordersView .orders-inspector-quick-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  margin-top: 4px;
}

#ordersView .orders-inspector-quick-summary > span:last-child {
  grid-column: 1 / -1;
  min-height: 42px;
}

#ordersView .orders-inspector-quick-summary > span {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 2px;
  min-height: 50px;
  padding: 7px;
  border: 1px solid #dbe3e8;
  border-radius: 5px;
  background: #f5f7f8;
}

#ordersView .orders-inspector-quick-summary small {
  color: #6b7a83;
  font-size: 10.5px;
  font-weight: 750;
}

#ordersView .orders-inspector-quick-summary strong {
  min-width: 0;
  color: #24343e;
  font-size: 11.5px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

#ordersView .orders-inspector-buyer-section {
  margin-top: 8px;
  padding: 10px 10px 10px 12px;
  border: 1px solid #cddfe9;
  border-left: 3px solid #2e6f9e;
  border-radius: 6px;
  background: #f5f9fc;
}

#ordersView .orders-inspector-buyer-section .orders-inspector-person {
  gap: 2px;
}

#ordersView .orders-inspector-buyer-section .orders-inspector-person strong {
  color: #20333f;
  font-size: 14px;
}

#ordersView .orders-inspector-buyer-section .orders-inspector-person span {
  color: #2e5e7d;
  font-size: 13px;
}

#ordersView .orders-inspector-buyer-section .orders-inspector-person p {
  margin-top: 4px;
  color: #5b6b75;
  font-size: 11.5px;
  line-height: 1.4;
}

#ordersView .orders-inspector-buyer-section.is-unavailable {
  margin-top: 6px;
  padding: 8px 10px;
  border-left-width: 2px;
  background: #f7f9fa;
}

#ordersView .orders-inspector-buyer-section.is-unavailable .orders-inspector-section-head {
  margin-bottom: 3px;
}

#ordersView .orders-inspector-unavailable {
  margin: 0;
  color: #63737d;
  font-size: 11.5px;
  line-height: 1.35;
}

#ordersView .delivery-remark-section {
  margin-top: 8px;
  padding: 10px;
  border: 1px solid #ead6ae;
  border-left: 3px solid #9e6a1c;
  border-radius: 6px;
  background: #fffdf7;
}

#ordersView .orders-inspector-product-section .order-task-product {
  padding: 7px;
  border: 1px solid #e0e6ea;
  border-radius: 5px;
  background: #fafbfc;
}

#ordersView .orders-inspector-fulfillment-section .orders-inspector-facts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

#ordersView .orders-inspector-fulfillment-section .orders-inspector-facts div {
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 3px;
  min-height: 52px;
  padding: 7px;
  border: 1px solid #e0e6ea;
  border-radius: 5px;
  background: #f7f9fa;
}

#ordersView .orders-inspector-fulfillment-section .orders-inspector-facts dd {
  text-align: left;
  font-size: 11.5px;
}

#ordersView .orders-inspector-fulfillment-section .task-status-pill {
  justify-self: start;
}

#ordersView .orders-inspector-money-section > summary,
#ordersView .orders-inspector-sku-details > summary {
  min-height: 36px;
  color: #33434d;
  font-size: 12.5px;
  font-weight: 800;
}

#ordersView .orders-inspector-money-section > summary b,
#ordersView .orders-inspector-sku-details > summary b {
  margin-left: auto;
  margin-right: 4px;
}

#ordersView .orders-pipeline-inspector,
#ordersView .orders-pipeline-inspector dt,
#ordersView .orders-pipeline-inspector dd,
#ordersView .orders-pipeline-inspector p,
#ordersView .orders-pipeline-inspector span,
#ordersView .orders-pipeline-inspector small {
  font-size: 12px;
  line-height: 1.4;
}

#ordersView .orders-inspector-actions {
  position: sticky;
  bottom: 0;
  z-index: 3;
  margin: 0 -14px -78px;
  padding: 10px 14px 12px;
  border-top: 1px solid #d9e0e5;
  background: rgba(255, 255, 255, 0.97);
}

#ordersView .orders-inspector-actions .row-btn[data-action="ship"] {
  width: 100%;
  min-height: 42px;
  border-color: #2e6f9e;
  background: #2e6f9e;
  color: #ffffff;
}

.delivery-remark-summary span {
  border-color: #ead6ae;
  background: #fff9ee;
}

.delivery-remark-timeline li {
  border-left-color: #9e6a1c;
  background: #fffaf1;
}

.delivery-remark-timeline p {
  border-color: #ead6ae;
  background: #fff7e8;
  color: #6f4b16;
}

/* Manual outbound confirmation: explicit inventory effect, no scan control. */
.order-outbound-confirm-panel {
  max-width: 560px;
  border-radius: 7px;
}

.order-outbound-confirm-panel .eyebrow {
  min-height: 0;
  margin: 0 0 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #8f611f;
  font-size: 11px;
}

.order-outbound-confirm-content {
  display: grid;
  gap: 12px;
}

.outbound-confirm-order {
  display: grid;
  gap: 3px;
  padding: 12px;
  border-left: 3px solid #2e6f9e;
  background: #f3f7fa;
}

.outbound-confirm-order span,
.outbound-confirm-order small,
.outbound-confirm-metrics span,
.outbound-confirm-lines small,
.outbound-confirm-impact span {
  color: #6f7d86;
  font-size: 11px;
}

.outbound-confirm-order strong {
  font-size: 15px;
}

.outbound-confirm-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid #d9e0e5;
}

.outbound-confirm-metrics div {
  display: grid;
  gap: 3px;
  padding: 10px;
  border-right: 1px solid #d9e0e5;
}

.outbound-confirm-metrics div:last-child { border-right: 0; }
.outbound-confirm-metrics strong { font-size: 18px; }

.outbound-confirm-lines {
  display: grid;
  gap: 6px;
}

.outbound-confirm-lines > div {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 7px;
  border: 1px solid #e0e6ea;
}

.outbound-confirm-lines .sku-thumb-wrap,
.outbound-confirm-lines .sku-thumb,
.outbound-confirm-lines .sku-thumb-empty {
  width: 38px;
  min-width: 38px;
  height: 38px;
}

.outbound-confirm-lines > div > span { display: grid; gap: 2px; min-width: 0; }
.outbound-confirm-lines b { font-size: 12px; white-space: nowrap; }

.outbound-confirm-impact {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  padding: 10px 12px;
  border: 1px solid #ead6ae;
  background: #fff9ee;
}

.outbound-confirm-impact span::before {
  content: "✓";
  margin-right: 6px;
  color: #2f6b4f;
  font-weight: 900;
}

.order-outbound-confirm-actions {
  margin-top: 16px;
}

@media (max-width: 1180px) and (min-width: 761px) {
  #ordersView .orders-command-band {
    grid-template-columns: 104px minmax(0, 1fr) 210px;
    padding-inline: 12px;
  }

  #ordersView .orders-command-kpis article {
    gap: 5px;
    padding-inline: 6px;
  }

  #ordersView .orders-command-kpis span {
    font-size: 11px;
  }

  #ordersView .orders-risk-next {
    margin-left: 12px;
  }

  #ordersView .orders-pipeline-stages {
    grid-template-columns: 104px repeat(4, minmax(0, 1fr));
    padding-inline: 12px;
  }

  #ordersView .orders-pipeline-stages strong {
    font-size: 13.5px;
  }

  #ordersView .orders-head-actions .orders-utility-btn {
    min-width: 36px;
    width: 36px;
    padding: 0;
  }

  #ordersView .orders-head-actions .orders-utility-label {
    display: none;
  }

  #ordersView .orders-pipeline-workspace {
    grid-template-columns: minmax(0, 1fr) 326px;
  }

  #ordersView .orders-pipeline-inspector {
    width: 326px;
    max-width: 326px;
  }
}

@media (max-width: 760px) {
  .workspace.view-orders-active {
    background: #eef2f4;
  }

  .workspace.view-orders-active > .topbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 20 !important;
    min-height: 52px;
    margin: 0 !important;
    padding: 8px 12px !important;
    border-bottom: 1px solid #18394a !important;
    background: #102a3a !important;
    color: #ffffff !important;
    backdrop-filter: none !important;
  }

  .workspace.view-orders-active .mobile-menu-btn {
    border-color: transparent;
    background: transparent;
    color: #ffffff;
  }

  #ordersView.view.active {
    padding: 0 8px 16px;
  }

  #ordersView .orders-command-band,
  #ordersView .orders-page-head,
  #ordersView .order-daily-summary-panel {
    display: none !important;
  }

  #ordersView .orders-pipeline-stages {
    position: sticky;
    top: 52px;
    z-index: 12;
    display: flex;
    gap: 0;
    margin: 0 -8px;
    padding: 0;
    overflow-x: auto;
    border-bottom: 1px solid #d2dce2;
    background: #ffffff;
  }

  #ordersView .orders-pipeline-stages::before {
    content: none;
    display: none;
  }

  #ordersView .orders-pipeline-stages button,
  #ordersView .orders-pipeline-stages button.active {
    flex: 1 1 0;
    grid-template-columns: minmax(0, auto) auto;
    column-gap: 3px;
    min-height: 48px;
    min-width: 0;
    padding: 8px 6px 6px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: #ffffff;
    color: #6f7d86;
  }

  #ordersView .orders-pipeline-stages button.active {
    border-bottom-color: #2e6f9e;
    color: #255f89;
  }

  #ordersView .orders-pipeline-stages b {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #edf1f3;
    color: #55656f;
    font-size: 10px;
  }

  #ordersView .orders-pipeline-stages strong {
    white-space: nowrap;
    font-size: 11px;
    line-height: 1;
  }

  #ordersView .orders-pipeline-stages small {
    display: none;
  }

  #ordersView .orders-mobile-actions {
    display: none !important;
  }

  #ordersView .orders-mobile-filter-toggle {
    margin: 8px 0;
    border-color: #d2dce2;
    border-radius: 5px;
    box-shadow: none;
  }

  #ordersView .orders-filter-panel {
    margin: 0 -8px 8px;
  }

  #ordersView .orders-platform-chips {
    overflow-x: auto;
  }

  #ordersView .orders-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 8px;
  }

  #ordersView .orders-pipeline-workspace {
    display: block;
    background: transparent;
  }

  #ordersView #ordersCards.mobile-data-list {
    display: grid;
    gap: 8px;
  }

  #ordersView .order-mobile-task-card {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid #d2dce2;
    border-radius: 5px;
    background: #ffffff;
    box-shadow: 0 3px 8px rgba(25, 43, 54, 0.06);
  }

  #ordersView .order-mobile-task-card.is-focused {
    border-color: #7fa9c6;
    box-shadow: inset 3px 0 0 #2e6f9e, 0 4px 12px rgba(46, 111, 158, 0.1);
  }

  #ordersView .mobile-task-head { order: 1; padding: 9px 10px; border-bottom: 1px solid #e1e6e9; }
  #ordersView .mobile-task-products { order: 2; padding: 10px; }
  #ordersView .mobile-task-footer { order: 3; padding: 0 10px 10px; }
  #ordersView .mobile-task-facts { order: 4; }
  #ordersView .mobile-task-primary-action { order: 5; }
  #ordersView .mobile-task-secondary-actions,
  #ordersView .order-photo-strip,
  #ordersView .driver-meta { display: none !important; }

  #ordersView .mobile-task-platform {
    width: 32px;
    min-width: 32px;
    height: 32px;
    opacity: 1;
  }

  #ordersView .mobile-task-platform img,
  #ordersView .mobile-task-platform .lucide {
    width: 19px;
    height: 19px;
  }

  #ordersView .mobile-task-logistics-inline {
    display: block;
    margin-top: 2px;
    color: #2e6f9e;
    font-size: 11.5px;
    font-weight: 750;
    line-height: 1.25;
  }

  #ordersView .mobile-task-product-line {
    padding: 0;
    background: transparent;
  }

  #ordersView .mobile-task-footer {
    display: block;
  }

  #ordersView .mobile-task-footer > div:first-child {
    display: grid;
    gap: 3px;
    padding: 9px 10px;
    border-left: 2px solid #2e6f9e;
    border-radius: 0;
    background: #f3f6f8;
  }

  #ordersView .mobile-task-footer > div:nth-child(2) {
    display: none;
  }

  #ordersView .mobile-task-footer strong {
    color: #263640;
    font-size: 13px;
  }

  #ordersView .mobile-task-footer .mobile-task-buyer-phone {
    color: #51636f;
    font-size: 12px;
    font-weight: 700;
  }

  #ordersView .mobile-task-footer small {
    color: #76858e;
    font-size: 11px;
    line-height: 1.35;
  }

  #ordersView .mobile-task-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid #e1e6e9;
  }

  #ordersView .mobile-task-facts > div {
    min-height: 70px;
    padding: 9px 10px;
    border-right: 1px solid #e1e6e9;
    border-radius: 0;
    background: #ffffff;
  }

  #ordersView .mobile-task-facts > div:nth-child(1) { order: 2; border-right: 0; }
  #ordersView .mobile-task-facts > div:nth-child(2),
  #ordersView .mobile-task-facts > div:nth-child(4) { display: none; }
  #ordersView .mobile-task-facts > div:nth-child(3) { order: 1; }

  #ordersView .mobile-task-primary-action .order-row-actions {
    display: flex;
    justify-content: flex-end;
    padding: 8px 10px;
    border-top: 1px solid #e1e6e9;
  }

  #ordersView .mobile-task-primary-action .row-btn {
    width: auto;
    min-height: 30px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #2e6f9e;
    font-size: 12px;
  }

  .orders-mobile-detail-panel {
    max-height: min(calc(var(--visual-height) - 10px), 92vh);
    border-radius: 10px 10px 0 0;
  }

  .orders-mobile-detail-content {
    overflow-x: hidden;
  }

  .orders-mobile-detail-head {
    background: #102a3a;
    color: #ffffff;
  }

  .orders-mobile-detail-content .orders-inspector-actions .order-row-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .orders-mobile-detail-content .orders-inspector-actions .mobile-sticky-primary-action {
    width: 100%;
    min-height: 46px;
    margin: 0;
    border-color: #2e6f9e;
    border-radius: 5px;
    background: #2e6f9e;
    color: #ffffff;
    font-size: 15px;
  }

  .orders-mobile-detail-content .orders-inspector-buyer-section {
    border-left: 2px solid #2e6f9e;
    padding-left: 10px;
  }

  .order-outbound-confirm-panel {
    align-self: center;
    justify-self: center;
    width: calc(100% - 20px) !important;
    height: auto !important;
    max-height: calc(100dvh - 20px) !important;
    padding: 14px !important;
    border-radius: 8px !important;
  }

  .outbound-confirm-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .outbound-confirm-lines > div {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .outbound-confirm-lines b {
    grid-column: 2;
  }

  .order-outbound-confirm-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}
