:root { --app-topbar-height: 52px; }

.sticky-filter-region {
  position: sticky;
  top: var(--app-topbar-height);
  z-index: 16;
  min-width: 0;
  background: var(--surface, #fff);
}

.sticky-filter-region:focus-within { z-index: 18; }

.orders-workspace .order-list-toolbar { display: grid; gap: 6px; }
.orders-workspace .order-list-toolbar .order-heading-search { width: 100%; margin-left: 0; }
.orders-workspace .order-list-toolbar .order-heading-search > input { flex: 1 1 auto; width: auto; min-width: 0; }
.orders-workspace .order-list-toolbar .order-quick-filters { overflow-x: auto; }
.orders-workspace #order-results { overflow-x: visible; overflow-y: visible; }
.schedule-workspace.workflow-workspace > .schedule-date-navigator-controls { margin-bottom: -6px; }

.progress-sticky-controls {
  padding-bottom: 3px;
  border-bottom: 1px solid var(--line, #e2e8f0);
}

.progress-sticky-controls + #progress-results .progress-matrix-sticky-head {
  top: calc(var(--app-topbar-height) + var(--sticky-controls-height, 0px));
}

.table-pan-scope,
.progress-matrix-shell,
.personal-capacity-matrix-shell { min-width: 0; }

.viewport-pan-rail {
  position: sticky;
  bottom: 0;
  z-index: 8;
  width: 100%;
  height: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  border-top: 1px solid var(--line, #e2e8f0);
  background: var(--surface, #fff);
  scrollbar-gutter: stable;
}

.viewport-pan-rail[hidden] { display: none; }
.viewport-pan-spacer { height: 1px; }
.viewport-pan-rail:focus-visible { outline: 2px solid var(--primary, #2563eb); outline-offset: -2px; }

@media (max-width: 720px) {
  .sticky-filter-region { position: relative; top: auto; }
}
