/* Bound the document workspace to the remaining page height. The list and
   detail scroll independently; flex children must not shrink their controls. */
.retail-accounting > .retail-accounting-header { flex: none; }
@media (min-width: 901px) {
  .retail-accounting > div:has(> .finance-workspace):not([hidden]) {
    display: flex; flex: 1 1 0; min-height: 0; min-width: 0; overflow: hidden;
  }
  .retail-accounting > div > .finance-workspace {
    display: flex; flex-direction: column; flex: 1 1 0; min-height: 0; min-width: 0;
  }
  .retail-accounting .finance-workspace > :not(.finance-layout) { flex: none; }
  .retail-accounting .finance-layout {
    flex: 1 1 0; min-height: 0; grid-template-rows: minmax(0, 1fr); overflow: hidden;
  }
  .retail-accounting .finance-layout > .finance-list,
  .retail-accounting .finance-layout > .finance-detail {
    height: 100%; min-height: 0; max-height: none; overflow-y: auto;
    overscroll-behavior: contain; scrollbar-gutter: stable;
  }
  .retail-accounting .finance-detail { padding-bottom: var(--space-4); }
  .retail-accounting .finance-detail > * { flex-shrink: 0; }
  .retail-accounting .finance-summary { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .retail-accounting > div:has(> .finance-workspace):not([hidden]) { flex: none; min-width: 0; }
  .retail-accounting .finance-detail { overflow: visible; height: auto; max-height: none; }
  .retail-accounting .finance-detail > * { flex-shrink: 0; }
}
