/* Keep refreshed content top-aligned and prevent scrollbar appearance from changing width. */
html body>main:has(>.screen){justify-content:flex-start;align-content:start;scrollbar-gutter:stable}
html body main>.screen.active{margin-block:0!important}
html body #expenses{margin-block:0!important;align-self:center}
html body>main:has(>#expenses.active){padding-top:8px}
/* Empty loading lines must occupy the same space as their one-line loading text. */
html body main :is(#spendings-status,#products-status,#message,#form-message,#biz-feedback,#ca-status,.screen>p[role="status"],.account-view>p[role="status"],.biz-box>p[role="status"],dialog>p[role="status"],.pf-status):not([hidden]){
 display:block;min-block-size:1.4em;line-height:1.4;margin-block:4px;
}
html body #spendings-status:empty,html body #products-status:empty{display:block!important;min-block-size:1.4em;margin-block:4px}
html body #expense-category-totals strong,html body .spendings-totals strong{font-variant-numeric:tabular-nums}
html body #expense-category-totals button{transition:none}

/* Equal card-heading space keeps the three entry actions aligned. */
html body main #home .home-portal h2{min-height:2.5em;display:flex;align-items:center;justify-content:center;margin-block:6px}

@media(min-width:651px){html body main #home .home-portal{grid-template-rows:42px minmax(40px,auto) 44px 44px}html body main #home .home-portal h2{min-height:40px;margin:0}}

/* Size the jobs region from the space actually left by the header and actions.
   Fixed viewport subtraction made the full dashboard scroll when cards loaded. */
html body>main>#business-dashboard.active:has([data-biz-view="home"]:not([hidden])),
html body>main>#business-dashboard.active:has([data-biz-view="home"]:not([hidden]))>.biz-shell,
html body #business-dashboard:has([data-biz-view="home"]:not([hidden])) .biz-body,
html body #business-dashboard [data-biz-view="home"]:not([hidden]){flex:1 1 0;min-height:0}
html body #business-dashboard .biz-login-row,
html body #business-dashboard [data-biz-view="home"]>.biz-alert,
html body #business-dashboard [data-biz-view="home"]>.biz-tiles{flex:none}
html body #business-dashboard #biz-job-list{height:auto;flex:1 1 120px;min-height:120px;overflow-anchor:none;scrollbar-gutter:stable}
html body #business-dashboard #biz-jobs-status{display:block;min-height:1.4em;line-height:1.4;margin:0;flex:none}
html body #business-dashboard #biz-jobs-status:empty{display:block;visibility:hidden}

html body main #home #home-customers-heading{flex-direction:column;gap:2px}
html body main #home #home-customers-heading small{font-size:12px;font-weight:500;line-height:1.2}
