/* Inventory desktop: one document scroll instead of a hidden page and table viewport. */
@media (min-width: 901px) {
  html:has(.ic-page .ic-material-table),
  body:has(.ic-page .ic-material-table) {
    overflow-x: clip !important;
    overflow-y: auto !important;
  }

  .ic-page:has(.ic-material-table) {
    display: block !important;
    height: auto !important;
    min-height: 100dvh !important;
    overflow: visible !important;
    padding-bottom: 36px !important;
  }

  .ic-page:has(.ic-material-table) > .iw-layout {
    align-items: start !important;
  }

  .ic-page:has(.ic-material-table) .iw-content {
    display: block !important;
    min-height: 0 !important;
  }

  .ic-page:has(.ic-material-table) .iw-sidebar {
    position: sticky !important;
    top: 12px !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  .ic-page .ic-material-table {
    flex: none !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  /* Once the sheet scrolls with the document, a stack of sticky helper,
     material and column rows would recreate the same visual obstruction.
     Keep just the compact column labels in view while entering a long list. */
  .ic-page .ic-table-help {
    position: static !important;
    top: auto !important;
    z-index: auto !important;
  }

  .ic-page .ic-material-heading {
    position: static !important;
    top: auto !important;
    z-index: auto !important;
    height: auto !important;
    min-height: 44px !important;
    flex-wrap: wrap !important;
  }

  .ic-page .ic-count-columns {
    position: sticky !important;
    top: 0 !important;
    z-index: 3 !important;
    box-shadow: 0 1px 0 #d8e2d2;
  }

  .ic-page .iw-workspace-top {
    min-height: 22px;
    margin-bottom: 2px;
  }

  .ic-page .iw-header {
    margin: 4px auto 8px;
  }

  .ic-page .iw-header h1 {
    font-size: 24px;
  }

  .ic-page .iw-header p {
    margin-top: 2px;
    font-size: 12px;
  }

  .ic-page .iv-toolbar {
    min-height: 32px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    gap: 10px;
  }

  /* Zones remain available, but no longer push the material sheet below the fold. */
  .ic-page .ic-zone-overview {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    padding: 0 0 8px;
  }

  .ic-page .ic-zone-overview > h2,
  .ic-page .ic-zone-overview > p {
    display: none;
  }

  .ic-page .ic-zone-overview .ic-zone-tabs {
    flex: 1 1 auto;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0;
  }

  .ic-page .ic-zone-overview .ic-zone-tabs button {
    min-height: 34px;
    padding: 4px 8px;
  }

  .ic-page .ic-zone-overview .ic-zone-tabs small {
    display: none;
  }

  .ic-page .ic-zone-overview .ic-zone-settings {
    flex: none;
    margin: 0;
  }
}
