/* Order table module: isolated final rules for the shared order/workbench table surface. */
.order-amount-guidance {
  margin: 0 0 8px;
  padding: 7px 10px;
  border: 1px solid rgba(57, 125, 170, 0.18);
  border-left: 3px solid #397daa;
  border-radius: 5px;
  background: #f7fbfe;
  color: #4b6072;
  font-size: 11px;
  line-height: 1.55;
}

.settlement-pending {
  color: #778898;
  font-size: 10px;
  line-height: 1.25;
}

.order-column-sync-status {
  margin-top: 4px !important;
  color: #45627e !important;
  font-weight: 780 !important;
}

/* Final customer-type fit: keep customer labels readable in one horizontal chip. */
#ordersWorkspace .order-grid-cell[data-order-column="customerType"],
.workbench-grid-cell[data-order-column="customerType"] {
  justify-content: center;
  text-align: center;
  white-space: nowrap;
}

#ordersWorkspace .order-grid-cell[data-order-column="customerType"] .customer-type-chip,
.workbench-grid-cell[data-order-column="customerType"] .customer-type-chip {
  width: auto;
  max-width: 100%;
  min-height: 24px;
  padding: 0 9px;
  line-height: 1;
  white-space: nowrap;
  word-break: keep-all;
}

/* Final order table layout guard: draw each wide row as a stable div grid inside the horizontal scroller. */
#ordersWorkspace .order-grid-table,
#ordersWorkspace .order-grid-head,
#ordersWorkspace .order-grid-body {
  min-width: 100%;
}

#ordersWorkspace .order-grid-table {
  display: block;
  width: max-content;
  font-size: 10.8px;
}

#ordersWorkspace .order-grid-head,
#ordersWorkspace .order-grid-body {
  display: grid;
  min-width: 0;
}

#ordersWorkspace .order-grid-row {
  position: static;
  top: auto;
  z-index: auto;
  display: grid;
  width: 100%;
  min-width: 100%;
  column-gap: 1px;
  align-items: stretch;
  background: var(--line);
}

#ordersWorkspace .order-grid-cell {
  display: block;
  width: auto;
  min-width: 0;
  max-width: none;
  padding: 5px 6px;
  border-right: 0;
  border-bottom: 0;
  overflow: visible;
  overflow-wrap: normal;
  color: inherit;
  font-size: 10.4px;
  line-height: 1.35;
  text-align: center;
  text-overflow: clip;
  white-space: normal;
  word-break: keep-all;
}

#ordersWorkspace .orders-panel .order-grid-cell[data-order-column] {
  width: auto;
  min-width: 0;
}

#ordersWorkspace .order-grid-header-cell {
  display: grid;
  min-height: 38px;
  align-items: center;
  gap: 4px;
  padding-top: 9px;
  padding-bottom: 9px;
  border-bottom: 2px solid rgba(57, 125, 170, 0.26);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(238, 248, 255, 0.99));
  color: #203a54;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
  box-shadow: 0 12px 22px rgba(45, 62, 90, 0.1);
}

#ordersWorkspace .order-grid-header-cell:first-child {
  border-top-left-radius: 8px;
}

#ordersWorkspace .order-grid-header-cell:last-child {
  border-top-right-radius: 8px;
}

#ordersWorkspace .order-grid-body-cell {
  min-height: 35px;
  background: #ffffff;
}

#ordersWorkspace .order-grid-body-cell[data-order-inline-edit] {
  position: relative;
  cursor: default;
}

#ordersWorkspace .order-grid-body-cell[data-order-inline-edit]:hover,
.workbench-grid-body-cell[data-order-inline-edit]:hover {
  box-shadow: inset 0 0 0 1px rgba(57, 125, 170, 0.2);
  background: #ffffff;
}

#ordersWorkspace .order-grid-body-cell[data-order-inline-edit]:focus,
.workbench-grid-body-cell[data-order-inline-edit]:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(109, 168, 206, 0.32);
}

#ordersWorkspace .order-grid-body-cell.is-editing,
.workbench-grid-body-cell.is-editing {
  background: #ffffff;
  box-shadow: inset 0 0 0 2px rgba(109, 168, 206, 0.32);
}

.workbench-grid-body-cell[data-order-inline-edit] {
  position: relative;
  cursor: default;
}

.inline-edit-trigger {
  position: absolute;
  top: 3px;
  right: 3px;
  z-index: 2;
  min-width: 22px;
  min-height: 20px;
  padding: 0 5px;
  border: 1px solid rgba(57, 125, 170, 0.24);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--blue-strong);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  opacity: 0;
  box-shadow: 0 4px 10px rgba(31, 54, 82, 0.08);
  cursor: pointer;
  pointer-events: none;
  transition: opacity 0.14s ease, transform 0.14s ease;
}

[data-order-inline-edit]:hover > .inline-edit-trigger,
[data-order-inline-edit]:focus > .inline-edit-trigger,
[data-order-inline-edit]:focus-within > .inline-edit-trigger {
  opacity: 1;
  pointer-events: auto;
}

[data-order-inline-edit].is-active-cell > .inline-edit-trigger {
  opacity: 1;
  pointer-events: auto;
}

#ordersWorkspace .order-grid-body-cell.is-active-cell,
.workbench-grid-body-cell.is-active-cell,
.order-table-wrap .order-grid-body-cell.is-active-cell {
  background: #f2f9ff;
  box-shadow: inset 0 0 0 2px rgba(57, 125, 170, 0.42);
}

.inline-edit-trigger:focus {
  opacity: 1;
  outline: 2px solid rgba(109, 168, 206, 0.32);
  outline-offset: 1px;
}

.order-inline-editor {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 4px;
}

.inline-editor-drawer {
  position: fixed;
  z-index: 900;
  display: grid;
  width: max(148px, min(260px, calc(100% + 84px)));
  max-width: min(280px, 78vw);
  overflow: auto;
  padding: 6px;
  border: 1px solid rgba(57, 125, 170, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.99);
  box-shadow: 0 16px 36px rgba(31, 54, 82, 0.18);
  transform-origin: top left;
  animation: inlineDrawerOpen 0.14s ease-out;
}

body > [data-inline-editor-drawer].inline-editor-drawer {
  display: grid !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.inline-editor-drawer.opens-up {
  transform-origin: bottom left;
}

.inline-editor-drawer .order-inline-editor {
  width: 100%;
}

@keyframes inlineDrawerOpen {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.order-inline-editor input,
.order-inline-editor textarea,
.order-inline-editor select {
  width: 100%;
  min-width: 0;
  padding: 5px 6px;
  border: 1px solid rgba(57, 125, 170, 0.28);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  text-align: center;
}

.order-inline-editor textarea {
  text-align: left;
  white-space: normal;
  resize: vertical;
}

.order-inline-editor button {
  min-height: 24px;
  border: 1px solid rgba(57, 125, 170, 0.24);
  border-radius: 6px;
  background: var(--blue-soft);
  color: var(--blue-strong);
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
}

.order-inline-menu-editor {
  min-width: 118px;
  max-width: min(240px, 72vw);
}

.inline-option-list {
  display: grid;
  gap: 4px;
  max-height: 220px;
  overflow-y: auto;
}

.inline-option-item {
  display: grid;
  min-height: 28px;
  align-items: center;
  justify-items: start;
  padding: 5px 8px;
  border: 1px solid rgba(57, 125, 170, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
}

.inline-option-item:hover,
.inline-option-item:focus,
.inline-option-item.is-selected {
  border-color: rgba(57, 125, 170, 0.34);
  background: rgba(235, 248, 255, 0.98);
  color: var(--blue-strong);
}

.order-inline-image-editor {
  grid-template-columns: minmax(0, 1fr);
}

.order-inline-image-editor input[type="file"] {
  padding: 4px;
  font-size: 10px;
}

.order-inline-choice-editor {
  gap: 6px;
  text-align: left;
}

.order-inline-extra-editor {
  min-width: 176px;
  max-width: min(260px, 78vw);
}

.inline-extra-list {
  max-height: 238px;
}

.inline-extra-option {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.inline-extra-option span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inline-extra-option small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}

.inline-choice-list {
  display: grid;
  gap: 4px;
  max-height: 148px;
  overflow-y: auto;
}

.inline-choice-row,
.inline-custom-extra {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) 54px;
  gap: 5px;
  align-items: center;
}

.inline-choice-row {
  font-size: 10px;
  font-weight: 750;
}

.inline-choice-row input[type="checkbox"] {
  width: 14px;
  height: 14px;
  padding: 0;
}

.inline-choice-row input[type="number"],
.inline-custom-extra input {
  padding: 4px 5px;
  text-align: left;
}

.inline-custom-extra {
  grid-template-columns: minmax(0, 1fr) 58px;
}

#ordersWorkspace .order-grid-body .order-grid-row:nth-child(even) .order-grid-body-cell {
  background: #ffffff;
}

#ordersWorkspace .order-grid-row:hover .order-grid-body-cell,
#ordersWorkspace .order-grid-row.selected .order-grid-body-cell {
  background: #ffffff;
}

#ordersWorkspace .order-grid-row.customer-member-row .order-grid-body-cell {
  background: #ffffff;
}

#ordersWorkspace .order-grid-row.customer-member-row:hover .order-grid-body-cell,
#ordersWorkspace .order-grid-row.customer-member-row.selected .order-grid-body-cell {
  background: #ffffff;
}

.status-chip.abnormal {
  color: #b42318;
  background: #fee4e2;
  border-color: #fda29b;
}

#ordersWorkspace .order-grid-header-cell .table-sort-button {
  align-self: stretch;
}

#ordersWorkspace .order-grid-header-cell.is-filterable {
  min-height: 58px;
  padding: 7px 6px;
}

#ordersWorkspace .order-header-filter {
  width: 100%;
  min-width: 0;
  height: 24px;
  padding: 2px 18px 2px 6px;
  border: 1px solid rgba(57, 125, 170, 0.2);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.94);
  color: #30465f;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.2;
}

#ordersWorkspace .order-header-filter.is-active {
  border-color: rgba(219, 76, 118, 0.42);
  background: #fff6fa;
  color: #8f2f55;
}

#ordersWorkspace .order-header-filter:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(219, 76, 118, 0.16);
}

#ordersWorkspace .order-utility-drawer {
  margin: 10px 20px 0;
  border: 1px solid rgba(111, 169, 216, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

#ordersWorkspace .order-utility-drawer summary {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  color: #30465f;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

#ordersWorkspace .order-utility-drawer .filter-bar,
#ordersWorkspace .order-utility-drawer .import-preview-panel,
#ordersWorkspace .order-utility-drawer .service-consult-panel {
  margin: 0;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

#ordersWorkspace .order-grid-header-cell,
.workbench-grid-header-cell {
  place-items: center;
  text-align: center;
}

#ordersWorkspace .order-grid-header-cell .table-sort-button,
.workbench-grid-header-cell .table-sort-button {
  justify-content: center;
  justify-items: center;
  text-align: center;
}

#ordersWorkspace .table-wrap {
  overflow-x: auto;
  overflow-y: visible;
}

#ordersWorkspace .order-month-filter,
#ordersWorkspace .order-exact-date-filter { display: inline-grid; grid-template-columns: auto minmax(112px, 128px); align-items: center; gap: 6px; min-height: 30px; padding: 0 8px; border: 1px solid rgba(111, 169, 216, .18); border-radius: 8px; background: rgba(255, 255, 255, .78); color: var(--muted); font-size: 11px; font-weight: 850; }
#ordersWorkspace .order-month-filter input,
#ordersWorkspace .order-exact-date-filter input { min-height: 24px; padding: 0 4px; border: 0; background: transparent; color: var(--text); font: inherit; }
#ordersWorkspace #showAllOrders.is-active { border-color: rgba(232, 135, 155, .42); background: var(--pink-soft); color: var(--pink-strong); }
#ordersWorkspace .order-filter-state[hidden] { display: none !important; }

/* Responsive readable table guard: compress spare width, but keep labels horizontal before wrapping long notes. */
#ordersWorkspace .order-grid-cell > *,
.workbench-grid-cell > * {
  min-width: 0;
  max-width: 100%;
  word-break: keep-all;
}

#ordersWorkspace .order-grid-cell[data-order-column="customerRemark"],
#ordersWorkspace .order-grid-cell[data-order-column="executionRemark"],
#ordersWorkspace .order-grid-cell[data-order-column="nextStep"],
#ordersWorkspace .order-grid-cell[data-order-column="latestLog"],
#ordersWorkspace .order-grid-cell[data-order-column="manualExtraItems"],
#ordersWorkspace .order-grid-cell[data-order-column="tags"],
.workbench-grid-cell[data-order-column="customerRemark"],
.workbench-grid-cell[data-order-column="executionRemark"],
.workbench-grid-cell[data-order-column="nextStep"],
.workbench-grid-cell[data-order-column="latestLog"],
.workbench-grid-cell[data-order-column="manualExtraItems"],
.workbench-grid-cell[data-order-column="tags"] {
  display: block;
  align-items: flex-start;
  overflow: visible;
  overflow-wrap: break-word;
  text-align: center;
  white-space: normal;
  word-break: normal;
}

#ordersWorkspace .order-grid-cell[data-order-column="customer"],
#ordersWorkspace .order-grid-cell[data-order-column="phone"],
.workbench-grid-cell[data-order-column="customer"],
.workbench-grid-cell[data-order-column="phone"] {
  display: block;
  overflow-wrap: break-word;
  text-align: center;
  white-space: normal;
  word-break: normal;
}

#ordersWorkspace .order-grid-cell[data-order-column="customer"] .cell-main,
#ordersWorkspace .order-grid-cell[data-order-column="customer"] .cell-sub,
#ordersWorkspace .order-grid-cell[data-order-column="phone"] .cell-main,
#ordersWorkspace .order-grid-cell[data-order-column="phone"] .cell-sub,
.workbench-grid-cell[data-order-column="customer"] .cell-main,
.workbench-grid-cell[data-order-column="customer"] .cell-sub,
.workbench-grid-cell[data-order-column="phone"] .cell-main,
.workbench-grid-cell[data-order-column="phone"] .cell-sub {
  overflow: visible;
  overflow-wrap: break-word;
  text-overflow: clip;
  text-align: center;
  white-space: normal;
  word-break: normal;
}

#ordersWorkspace .order-grid-cell:is([data-order-column="customerRemark"], [data-order-column="executionRemark"], [data-order-column="nextStep"], [data-order-column="latestLog"], [data-order-column="manualExtraItems"]) .cell-main,
.workbench-grid-cell:is([data-order-column="customerRemark"], [data-order-column="executionRemark"], [data-order-column="nextStep"], [data-order-column="latestLog"], [data-order-column="manualExtraItems"]) .cell-main {
  display: -webkit-box;
  max-width: none;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow-wrap: break-word;
  text-align: center;
  text-overflow: ellipsis;
  white-space: normal;
  word-break: normal;
}

#ordersWorkspace .order-grid-cell[data-order-column="customerType"],
#ordersWorkspace .order-grid-cell[data-order-column="shootingType"],
#ordersWorkspace .order-grid-cell[data-order-column="date"],
#ordersWorkspace .order-grid-cell[data-order-column="time"],
#ordersWorkspace .order-grid-cell[data-order-column="unitPrice"],
#ordersWorkspace .order-grid-cell[data-order-column="duration"],
#ordersWorkspace .order-grid-cell[data-order-column="serviceName"],
#ordersWorkspace .order-grid-cell[data-order-column="stagingImage"],
#ordersWorkspace .order-grid-cell[data-order-column="stagingFee"],
#ordersWorkspace .order-grid-cell[data-order-column="extraPaid"],
#ordersWorkspace .order-grid-cell[data-order-column="overtimeFee"],
#ordersWorkspace .order-grid-cell[data-order-column="deposit"],
#ordersWorkspace .order-grid-cell[data-order-column="finalPayment"],
#ordersWorkspace .order-grid-cell[data-order-column="total"],
#ordersWorkspace .order-grid-cell[data-order-column="status"],
#ordersWorkspace .order-grid-cell[data-order-column="scheduleState"],
#ordersWorkspace .order-grid-cell[data-order-column="dataStatus"],
#ordersWorkspace .order-grid-cell[data-order-column="headcount"],
.workbench-grid-cell[data-order-column="customerType"],
.workbench-grid-cell[data-order-column="shootingType"],
.workbench-grid-cell[data-order-column="date"],
.workbench-grid-cell[data-order-column="time"],
.workbench-grid-cell[data-order-column="unitPrice"],
.workbench-grid-cell[data-order-column="duration"],
.workbench-grid-cell[data-order-column="serviceName"],
.workbench-grid-cell[data-order-column="stagingImage"],
.workbench-grid-cell[data-order-column="stagingFee"],
.workbench-grid-cell[data-order-column="extraPaid"],
.workbench-grid-cell[data-order-column="overtimeFee"],
.workbench-grid-cell[data-order-column="deposit"],
.workbench-grid-cell[data-order-column="finalPayment"],
.workbench-grid-cell[data-order-column="total"],
.workbench-grid-cell[data-order-column="status"],
.workbench-grid-cell[data-order-column="scheduleState"],
.workbench-grid-cell[data-order-column="dataStatus"],
.workbench-grid-cell[data-order-column="headcount"] {
  justify-content: center;
  overflow-wrap: normal;
  text-align: center;
  white-space: nowrap;
  word-break: keep-all;
}

.workbench-table-wrap {
  overflow-x: auto;
}

.headcount-summary {
  color: inherit;
  font-weight: 650;
}

.headcount-summary.over-standard {
  box-sizing: border-box;
  padding: 4px 7px;
  border: 1px solid rgba(211, 126, 42, 0.24);
  border-radius: 8px;
  color: #a45f1d;
  background: rgba(240, 164, 74, 0.14);
  line-height: 1.35;
  white-space: normal;
}

/* Single order-table surface: order management is the source table, workbench sections are filtered views. */
.order-table-wrap {
  overflow-x: auto;
  overflow-y: visible;
}

.order-table-wrap .order-grid-table {
  display: block;
  width: max-content;
  min-width: 100%;
  font-size: 10.8px;
}

.order-table-wrap .order-grid-head,
.order-table-wrap .order-grid-body {
  display: grid;
  min-width: 0;
}

.order-table-wrap .order-grid-row {
  position: static;
  top: auto;
  z-index: auto;
  display: grid;
  width: 100%;
  min-width: 100%;
  column-gap: 1px;
  align-items: stretch;
  background: var(--line);
}

.order-table-wrap .order-grid-cell {
  display: block;
  width: auto;
  min-width: 0;
  max-width: none;
  padding: 5px 6px;
  border-right: 0;
  border-bottom: 0;
  overflow: visible;
  overflow-wrap: normal;
  color: inherit;
  font-size: 10.4px;
  line-height: 1.35;
  text-align: center;
  text-overflow: clip;
  white-space: normal;
  word-break: keep-all;
}

.order-table-wrap .order-grid-cell[data-order-column] {
  width: auto;
  min-width: 0;
}

.order-table-wrap .order-grid-header-cell {
  display: grid;
  min-height: 38px;
  place-items: center;
  padding-top: 9px;
  padding-bottom: 9px;
  border-bottom: 2px solid rgba(57, 125, 170, 0.26);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(238, 248, 255, 0.99));
  color: #203a54;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
  box-shadow: 0 12px 22px rgba(45, 62, 90, 0.1);
}

.order-table-wrap .order-grid-body-cell {
  min-height: 35px;
  background: #ffffff;
}

.order-table-wrap .order-grid-body .order-grid-row:nth-child(even) .order-grid-body-cell {
  background: #ffffff;
}

.order-table-wrap .order-grid-empty-state {
  grid-column: 1 / -1;
  min-height: 72px;
  display: grid;
  place-items: center;
  padding: 18px;
  background: #ffffff;
  color: #6a7d90;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.order-table-wrap .order-grid-row:hover .order-grid-body-cell,
.order-table-wrap .order-grid-row.selected .order-grid-body-cell {
  background: #ffffff;
}

.order-table-wrap .order-grid-row.customer-member-row .order-grid-body-cell {
  background: #ffffff;
}

.order-table-wrap .order-grid-row.customer-member-row:hover .order-grid-body-cell,
.order-table-wrap .order-grid-row.customer-member-row.selected .order-grid-body-cell {
  background: #ffffff;
}

.order-table-wrap .order-grid-body-cell[data-order-inline-edit] {
  cursor: default;
}

.order-table-wrap .order-grid-body-cell[data-order-inline-edit]:hover {
  box-shadow: inset 0 0 0 1px rgba(57, 125, 170, 0.2);
  background: #ffffff;
}

#ordersWorkspace .order-grid-body-cell[data-order-inline-edit].is-active-cell,
.workbench-grid-body-cell[data-order-inline-edit].is-active-cell,
.order-table-wrap .order-grid-body-cell[data-order-inline-edit].is-active-cell {
  background: #f2f9ff;
  box-shadow: inset 0 0 0 2px rgba(57, 125, 170, 0.42);
}

.order-table-wrap .order-grid-body-cell.is-editing {
  background: #ffffff;
  box-shadow: inset 0 0 0 2px rgba(109, 168, 206, 0.32);
}

.order-table-wrap .order-grid-row.order-abnormal-row .order-grid-body-cell.is-active-cell,
#ordersWorkspace .order-grid-row.order-abnormal-row .order-grid-body-cell.is-active-cell {
  background: #fff1f2 !important;
  box-shadow: inset 0 0 0 2px rgba(197, 70, 91, 0.42);
}

/* Final grid-line paint: expose one shared divider layer instead of per-cell borders. */
#ordersWorkspace .order-grid-head,
.order-table-wrap .order-grid-head {
  background: var(--line);
  border-bottom: 1px solid rgba(57, 125, 170, 0.18);
}

#ordersWorkspace .order-grid-body,
.order-table-wrap .order-grid-body {
  row-gap: 1px;
  background: var(--line);
}

#ordersWorkspace .order-grid-row,
.order-table-wrap .order-grid-row {
  column-gap: 1px;
  background: var(--line);
}

#ordersWorkspace .order-grid-cell,
.order-table-wrap .order-grid-cell {
  border-right: 0;
  border-bottom: 0;
}

#ordersWorkspace .order-grid-header-cell,
.order-table-wrap .order-grid-header-cell {
  border-bottom: 0;
}

/* Abnormal state must remain visible over hover, selection, and inline-edit paint. */
#ordersWorkspace .order-grid-row.order-abnormal-row .order-grid-body-cell,
#ordersWorkspace .order-grid-row.order-abnormal-row:hover .order-grid-body-cell,
#ordersWorkspace .order-grid-row.order-abnormal-row.selected .order-grid-body-cell,
.order-table-wrap .order-grid-row.order-abnormal-row .order-grid-body-cell,
.order-table-wrap .order-grid-row.order-abnormal-row:hover .order-grid-body-cell,
.order-table-wrap .order-grid-row.order-abnormal-row.selected .order-grid-body-cell {
  background: #fff1f2 !important;
}

/* Shared order tables keep one complete horizontal row; the wrapper owns overflow. */
#ordersWorkspace .table-wrap,
.order-table-wrap,
.workbench-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  overscroll-behavior-inline: contain;
  scrollbar-color: #829bb1 #edf3f7;
  scrollbar-width: auto;
}

/* Keep the shared horizontal order scrollbar easy to grab without changing table density. */
#ordersWorkspace .table-wrap::-webkit-scrollbar,
.order-table-wrap::-webkit-scrollbar,
.workbench-table-wrap::-webkit-scrollbar {
  height: 14px;
}

#ordersWorkspace .table-wrap::-webkit-scrollbar-track,
.order-table-wrap::-webkit-scrollbar-track,
.workbench-table-wrap::-webkit-scrollbar-track {
  border-radius: 999px;
  background: #edf3f7;
}

#ordersWorkspace .table-wrap::-webkit-scrollbar-thumb,
.order-table-wrap::-webkit-scrollbar-thumb,
.workbench-table-wrap::-webkit-scrollbar-thumb {
  border: 2px solid #edf3f7;
  border-radius: 999px;
  background: #829bb1;
}

#ordersWorkspace .table-wrap::-webkit-scrollbar-thumb:hover,
.order-table-wrap::-webkit-scrollbar-thumb:hover,
.workbench-table-wrap::-webkit-scrollbar-thumb:hover {
  background: #637f98;
}

#ordersWorkspace .table-wrap::-webkit-scrollbar-thumb:active,
.order-table-wrap::-webkit-scrollbar-thumb:active,
.workbench-table-wrap::-webkit-scrollbar-thumb:active {
  background: #4f6d87;
}
