.oa-table-shell { min-width: 0; max-width: 100%; }
.oa-table-viewport.oa-table-viewport {
  position: relative;
  isolation: isolate;
  min-width: 0;
  max-width: 100%;
  max-height: var(--oa-table-height, min(70dvh, 680px)) !important;
  overflow: auto;
  scrollbar-width: thin;
  scroll-padding-top: var(--oa-header-height, 48px);
}
.oa-table-viewport.mobile-ranking-scroll:not([hidden]) { display: block; }
.oa-table-passive.oa-table-passive { max-height: none !important; overflow: visible !important; }
/* Override legacy numeric alignment only on columnar lists, not full-width details. */
.oa-table-viewport .oa-freeze-table > thead > tr > :is(th, td),
.oa-table-viewport .oa-freeze-table > :is(tbody, tfoot) > tr > :is(th, td):not([colspan]:not([colspan="1"])) {
  text-align: center !important;
}
.oa-table-viewport .oa-freeze-table > thead > tr > :is(th, td) > :is(button, [role="button"]),
.mobile-record-scroll.oa-table-viewport .mobile-record-header .mobile-column-sort {
  justify-content: center;
  text-align: center;
}
.mobile-record-scroll.oa-table-viewport .mobile-record-cell { text-align: center; }
.oa-table-viewport .oa-freeze-table > :is(thead, tbody, tfoot) > tr > .oa-freeze-first,
.oa-table-viewport .mobile-record-cell.oa-freeze-first {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--surface, #fff);
  background-clip: padding-box;
  box-shadow: 2px 0 0 var(--line, #e2e7ed);
}
.oa-table-viewport .oa-freeze-table > thead > tr > .oa-freeze-first {
  z-index: 6;
  background: var(--surface-soft, #f7f8fa);
}
body[data-ui-surface="scm"] .oa-table-viewport :is(.data-table, .mobile-horizontal-records, .mobile-record-columns) .scm-frozen-sku:not(.oa-freeze-first) { left: var(--oa-sku-left, 0px); }
body[data-ui-surface] .mobile-record-scroll.oa-table-viewport :is(.oa-freeze-first, .scm-frozen-sku) {
  align-self: stretch;
  min-width: 0;
  white-space: nowrap;
  overflow-wrap: normal;
}
body[data-ui-surface] .mobile-record-scroll.oa-table-viewport .mobile-record > .mobile-record-cell.oa-freeze-first,
body[data-ui-surface] .mobile-record-scroll.oa-table-viewport .mobile-record > .mobile-record-cell.scm-frozen-sku { overflow: hidden; text-overflow: ellipsis; }
body[data-ui-surface] .mobile-record-scroll.oa-table-viewport :is(.oa-freeze-first, .scm-frozen-sku) .mobile-column-sort { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body[data-ui-surface] .mobile-record-scroll.oa-table-viewport .mobile-record > .mobile-record-cell.oa-freeze-first { background: #fff; background: var(--surface, #fff); }
body[data-ui-surface] .mobile-record-scroll.oa-table-viewport .mobile-record:hover > .mobile-record-cell.oa-freeze-first { background: var(--surface-soft, #f7f8fa); }
body[data-ui-surface] .mobile-record-scroll.oa-table-viewport .mobile-record-header > .mobile-record-cell.oa-freeze-first { z-index: 2; background: var(--surface-soft, #f7f8fa); }
@media (max-width: 760px), (max-width: 1024px) and (pointer: coarse) {
  .oa-table-viewport .oa-freeze-table.oa-mobile-sku-budget { table-layout: fixed !important; width: max(100%, calc(var(--oa-column-count, 1) * 112px)) !important; min-width: 100%; }
  .oa-table-viewport .oa-mobile-sku-budget > thead > tr > .oa-freeze-first { width: var(--oa-first-width) !important; min-width: 0 !important; max-width: var(--oa-first-width) !important; }
  body[data-ui-surface] .oa-table-viewport .oa-mobile-sku-budget > :is(thead,tbody,tfoot) > tr > .oa-freeze-first { width: var(--oa-first-width) !important; min-width: 0 !important; max-width: var(--oa-first-width) !important; padding-left: 4px; padding-right: 4px; }
  .oa-table-viewport .oa-mobile-separate-sku > thead > tr > .scm-frozen-sku:not(.oa-freeze-first) { width: var(--oa-sku-width) !important; min-width: 0 !important; max-width: var(--oa-sku-width) !important; }
  .oa-table-viewport .oa-mobile-sku-budget > :is(thead,tbody,tfoot) > tr > :is(.oa-freeze-first,.scm-frozen-sku) { white-space: nowrap !important; overflow-wrap: normal; }
  .oa-table-viewport .oa-mobile-sku-budget > :is(thead,tbody,tfoot) > tr > :is(.oa-freeze-first,.scm-frozen-sku):not(:has(input,select,textarea,button)) { overflow: hidden; text-overflow: ellipsis; }
}
.oa-table-viewport .oa-freeze-table > thead > tr > :is(th, td) {
  position: sticky;
  top: var(--oa-header-top, 0px);
  z-index: 4;
  background: var(--surface-soft, #f7f8fa);
  background-clip: padding-box;
  box-shadow: 0 1px 0 var(--line, #e2e7ed);
}
body .oa-table-viewport .oa-freeze-table > thead > tr > .scm-frozen-sku,
.oa-table-viewport .entity-metric-table > thead > tr > :first-child { z-index: 6; }
.oa-table-viewport > .mobile-record-columns > .mobile-record-header {
  position: sticky;
  top: 0;
  z-index: 4;
  background: var(--surface-soft, #f7f8fa);
  box-shadow: 0 1px 0 var(--line, #e2e7ed);
}
.oa-table-viewport:focus-visible { outline: 2px solid var(--primary, #d60032); outline-offset: -2px; }
@media print {
  .oa-table-viewport.oa-table-viewport { max-height: none !important; overflow: visible !important; }
  .oa-table-viewport .oa-freeze-table > thead > tr > :is(th, td),
  .oa-table-viewport > .mobile-record-columns > .mobile-record-header,
  .oa-table-viewport .scm-frozen-sku,
  .oa-table-viewport .oa-freeze-first,
  .oa-table-viewport .entity-metric-table tr > :first-child { position: static !important; box-shadow: none; }
}
