/* Screen spacing only. No controls, form order, permissions or data are changed.
   The named layer is declared first so these sizing rules precede legacy !important layers. */
@layer compactWorkspace {
@media screen and (min-width:900px){
 body.zace-desktop{--document-work-top:max(var(--dt-panel-top,170px),calc(var(--document-chrome-bottom,0px) + 4px))!important}
 body.zace-desktop.vn-interface #modalBackdrop#modalBackdrop{top:var(--dt-panel-top,170px)!important}
 body.zace-desktop .topbar .user-chip>div:last-child{display:flex!important;align-items:baseline!important;gap:4px!important;flex-wrap:wrap!important}
 body.zace-desktop #content#content>.zace-desktop-alert-controls{padding:3px 8px!important;margin:0 0 3px!important;gap:4px!important}
 body.zace-desktop #content>.page-head{padding-block:6px!important;min-height:42px!important;margin-block:0 4px!important}
 body.zace-desktop #content>.page-head :is(.rwc-close,.window-size-control,.window-minimize-46){top:5px!important}
 body.zace-desktop #content>.page-head .rwc-pin{top:4px!important}
 body.zace-desktop #content>.page-head p:empty{display:none!important}
 body.zace-desktop #content .zace-important-popup{padding:3px 8px!important;margin-block:0!important}
 body.zace-desktop #content .zace-important-popup summary{min-height:28px!important}
 #movementBoard .ab-heading>div:first-child{display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:3px 10px!important;min-width:0!important}
 #movementBoard .ab-heading{flex-wrap:wrap!important;align-items:center!important}
 #movementBoard .ab-heading :is(h2,p,.mb-test-label){margin:0!important}
 #movementBoard .ab-toolbar label{flex-direction:row!important;align-items:center!important;gap:5px!important;flex-wrap:wrap!important}
 #movementBoard .ab-toolbar :is(.ab-filters,.ab-dates){flex-wrap:wrap!important;gap:6px!important;min-width:0!important}
 #movementBoard .ab-toolbar :is(input,select){max-width:150px!important}
 #movementBoard .ab-main{padding:6px 10px!important}
 #movementBoard .ab-heading{margin-bottom:6px!important;gap:8px!important}
 #movementBoard .mb-test-label{margin-bottom:3px!important;padding-block:2px!important}
 #movementBoard .ab-toolbar{padding:6px 8px!important;gap:6px!important}
 #movementBoard .ab-counts{padding:4px 2px!important}
 #movementBoard .ab-note{margin-top:4px!important}
}
}

/* Restore the existing small-screen navigation. Keep desktop, print and
   business form order unchanged; every toolbar action remains scrollable. */
@layer compactWorkspace {
@media screen and (max-width:899px){
 body.zace-desktop.zace-modern{--modern-side:0px!important}
 body.zace-desktop.zace-modern .main-shell{width:100%!important;margin:0!important;padding-inline:8px!important;min-width:0!important}
 body.zace-desktop.zace-modern #sidebar{inset:60px 0 28px auto!important;width:min(300px,85vw)!important;max-width:85vw!important;transform:translateX(110%)!important;visibility:hidden!important;z-index:100120!important;transition:none!important}
 body.zace-desktop.zace-modern #sidebar.open{transform:none!important;visibility:visible!important}
 html[dir=ltr] body.zace-desktop.zace-modern #sidebar{inset:60px auto 28px 0!important;transform:translateX(-110%)!important}
 html[dir=ltr] body.zace-desktop.zace-modern #sidebar.open{transform:none!important}
 body.zace-desktop.zace-modern .topbar{inset:0 0 auto!important;width:100%!important;box-sizing:border-box!important;padding:6px!important;height:60px!important;flex-wrap:nowrap!important;gap:6px!important;overflow-x:auto!important;overflow-y:hidden!important;z-index:100130!important}
 body.zace-desktop.zace-modern .topbar>#menuButton{display:inline-grid!important;place-items:center!important;flex:0 0 36px!important;min-width:36px!important;height:36px!important;position:sticky!important;inset-inline-start:0!important;z-index:2!important}
 body.zace-desktop.zace-modern .topbar>.company-control{flex:0 0 160px!important;min-width:0!important;margin:0!important}
 body.zace-desktop.zace-modern .topbar .company-control select{width:160px!important;min-width:0!important;max-width:160px!important}
 body.zace-desktop.zace-modern .topbar .company-control label{white-space:nowrap!important}
 body.zace-desktop.zace-modern .topbar>.zace-language-control{flex:0 0 100px!important}
 body.zace-desktop.zace-modern .topbar .zace-language-control select{min-width:100px!important;width:100px!important}
 body.zace-desktop.zace-modern .topbar>.vx-text-alignment{flex-shrink:0!important}
 body.zace-desktop.zace-modern #desktopToolbar{left:8px!important;right:8px!important;width:auto!important}
 body.zace-desktop.zace-modern #content{width:100%!important;min-width:0!important;margin-inline:0!important;box-sizing:border-box!important}
 body.zace-desktop.zace-modern :is(#content>.page-head,#modal .rwc-caption){display:flex!important;flex-flow:row wrap!important;align-items:center!important;gap:4px!important;padding:6px!important;margin-inline:0!important;width:100%!important;min-width:0!important;height:auto!important;line-height:1.35!important;box-sizing:border-box!important}
 body.zace-desktop.zace-modern :is(#content>.page-head,#modal .rwc-caption)>:is(.rwc-close,.window-size-control,.window-minimize-46,.rwc-pin){position:relative!important;inset:auto!important;transform:none!important;flex:0 0 32px!important;width:32px!important;height:32px!important;margin:0!important;order:0!important}
 body.zace-desktop.zace-modern :is(#content>.page-head,#modal .rwc-caption)>.window-size-control>button{position:relative!important;inset:auto!important;width:32px!important;height:32px!important;padding:0!important}
 body.zace-desktop.zace-modern #content>.page-head>div:not(.actions){flex:1 0 100%!important;min-width:0!important;order:2!important;padding:0!important}
 body.zace-desktop.zace-modern #content>.page-head>.actions{position:static!important;order:1!important;margin:0!important;flex:1 1 auto!important;min-width:0!important;flex-wrap:wrap!important}
 body.zace-desktop.zace-modern #content>.page-head :is(h1,p){margin:2px 0!important;white-space:normal!important;overflow-wrap:anywhere!important;line-height:1.35!important}
 body.zace-desktop.zace-modern #content>.page-head h1{font-size:20px!important}
 body.zace-desktop.zace-modern #content>.zace-desktop-alert-controls{flex-wrap:wrap!important;gap:4px!important;margin-block:3px!important;padding:3px!important}
 body.zace-desktop.zace-modern #content :is(.filters,.report-filter,.home-period){flex-wrap:wrap!important;min-width:0!important;max-width:100%!important;box-sizing:border-box!important}
 body.zace-desktop.zace-modern #content .filters label{display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:4px!important;min-width:0!important;white-space:normal!important}
 body.zace-desktop.zace-modern #content .filters input{max-width:100%!important;min-width:0!important}
 body.zace-desktop.zace-modern #content :is(.table-wrap,.table-container){max-width:100%!important;min-width:0!important;overflow-x:auto!important}
 body.zace-desktop.zace-modern #modalBackdrop:not(.hidden){top:var(--dt-panel-top,170px)!important;left:4px!important;right:4px!important;bottom:28px!important;padding:0!important;z-index:100110!important;display:block!important;overflow:hidden!important}
 body.zace-desktop.zace-modern #modal{position:relative!important;inset:auto!important;margin:0!important;width:100%!important;max-width:100%!important;min-width:0!important;height:100%!important;max-height:100%!important;overflow:auto!important;box-sizing:border-box!important}
 body.zace-desktop.zace-modern #modal .rwc-caption{font-size:18px!important;white-space:normal!important;overflow-wrap:anywhere!important}
 body.zace-desktop.zace-modern #modal .rwc-caption>.vx-text-alignment{position:static!important;inset:auto!important;flex:1 0 100%!important;order:3!important;margin:0!important}
 body.zace-desktop.zace-modern #tradeForm .trade-lines th{white-space:normal!important;overflow-wrap:anywhere!important;word-break:normal!important;line-height:1.35!important}
}
}

/* 2026-11-29: recover working height without changing table rows, colors or actions. */
@layer compactWorkspace {
 @media screen and (min-width:900px) {
  body.zace-desktop.zace-modern .topbar{height:42px!important;min-height:42px!important;padding:3px 10px!important;gap:7px!important;box-sizing:border-box!important}
  body.zace-desktop.zace-modern .topbar :is(input,select,.search-box,.user-avatar,.vx-text-alignment){height:32px!important;min-height:0!important;max-height:32px!important;margin-block:0!important;padding-block:2px!important;box-sizing:border-box!important}
  body.zace-desktop.zace-modern .topbar .user-chip{padding-block:0!important;gap:4px!important}
  body.zace-desktop.zace-modern #desktopToolbar{top:44px!important;height:44px!important;min-height:44px!important;max-height:44px!important;padding:2px 6px!important;gap:5px!important}
  body.zace-desktop #desktopToolbar>.vx-shortcut{height:34px!important;min-height:34px!important;max-height:34px!important}
  body.zace-desktop #desktopToolbar>.vx-shortcut>button{height:32px!important;min-height:32px!important;padding:3px 8px!important;flex-direction:row!important;gap:5px!important}
  body.zace-desktop #desktopToolbar .vn-classic-icon{width:18px!important;height:18px!important;min-width:18px!important;min-height:18px!important;flex:0 0 18px!important}
  body.zace-desktop #desktopToolbar .vx-toolbar-menu>summary{top:3px!important}
  body.zace-desktop #content#content>.zace-desktop-alert-controls{padding:1px 6px!important;margin:0!important;gap:4px!important;min-height:24px!important}
  body.zace-desktop #content>.page-head{padding-block:3px!important;min-height:36px!important;margin-block:0 2px!important}
  body.zace-desktop #content>.page-head :is(.rwc-close,.window-size-control,.window-minimize-46){top:2px!important}
  body.zace-desktop #content>.page-head .rwc-pin{top:2px!important}
  body.zace-desktop #content>.page-head h1{font-size:22px!important;line-height:28px!important;margin-block:0!important}
  body.zace-desktop #content>.page-head p{margin-block:0!important;line-height:1.3!important}
  body.zace-desktop #content :is(.report-amount-search,.report-export-tools,.table-export-tools,.vx-report-scroll-tools,.vp-report-pages){padding-block:2px!important;margin-block:1px!important;gap:4px!important;min-height:0!important}
  body.zace-desktop #content :is(.report-amount-search,.report-export-tools,.table-export-tools,.vx-report-scroll-tools,.vp-report-pages) :is(button,input,select,summary){padding-block:3px!important;min-height:26px!important;line-height:18px!important;box-sizing:border-box!important}
  body.zace-desktop #content .irv-views{padding:2px 6px!important;margin:0!important;min-height:0!important}
  body.zace-desktop #content .irv-workspace{padding:3px!important;gap:4px!important}
  body.zace-desktop #content .irv-heading{padding:1px 5px!important;min-height:20px!important;line-height:18px!important}
  body.zace-desktop #content .irv-sidebar{padding:5px!important;gap:5px!important}
  body.zace-desktop #content .irv-sidebar label :is(input:not([type=checkbox]),select){margin-top:2px!important}
  body.zace-desktop #content .irv-note-panel{margin:1px 3px!important;padding:0!important}
  body.zace-desktop #content .irv-note-panel>summary{padding:2px 4px!important;line-height:18px!important;min-height:22px!important}
  body.zace-desktop #content .irv-main>.report-top-totals{padding:2px 4px!important;margin:0!important}
 }
}

@layer compactWorkspace {
 @media screen and (min-width:900px){
  /* Inventory totals share one line; all measures remain horizontally scrollable. */
  body.zace-desktop #content .irv-main>.report-top-totals{display:flex!important;align-items:center!important;gap:6px!important;max-height:32px!important;min-height:30px!important;overflow:hidden!important}
  body.zace-desktop #content .irv-main>.report-top-totals>.rt-caption{flex:0 0 auto!important;white-space:nowrap!important;margin:0!important;padding:0!important}
  body.zace-desktop #content .irv-main>.report-top-totals>.rt-measures{display:flex!important;flex:1 1 auto!important;min-width:0!important;flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:thin;gap:4px!important;margin:0!important;padding:0!important}
  body.zace-desktop #content .irv-main>.report-top-totals .rt-measure{flex:0 0 auto!important;white-space:nowrap!important;padding-block:1px!important}
 }
}
@layer compactWorkspace {
 @media screen and (min-width:900px){
  body.zace-desktop #modal .rwc-caption{display:flex!important;flex-flow:row wrap!important;align-items:center!important;gap:4px!important;min-height:38px!important;height:auto!important;padding:3px 6px!important;line-height:30px!important;font-size:20px!important;box-sizing:border-box!important}
  body.zace-desktop #modal .rwc-caption>:is(.rwc-close,.window-size-control,.window-minimize-46,.rwc-pin){position:relative!important;inset:auto!important;transform:none!important;flex:0 0 30px!important;width:30px!important;height:30px!important;margin:0!important}
  body.zace-desktop #modal .rwc-caption>.window-size-control>button{position:relative!important;inset:auto!important;width:30px!important;height:30px!important;padding:0!important}
  body.zace-desktop #modal .rwc-caption>.vx-text-alignment{position:static!important;inset:auto!important;transform:none!important;flex:0 0 auto!important;height:30px!important;margin-block:0!important;margin-inline-start:auto!important}
  body.zace-desktop #modal .rwc-caption>.ml-reset{position:static!important;inset:auto!important;transform:none!important;width:auto!important;min-width:0!important;padding:2px 6px!important;margin:0!important;flex:0 0 auto!important;height:28px!important;line-height:22px!important}
  body.zace-desktop #modal .sales-workflow-bar{padding:3px 5px!important;margin:2px 0!important;gap:3px!important;min-height:0!important}
  body.zace-desktop #modal .sales-workflow-bar :is(button,output){margin:0!important;min-height:26px!important;line-height:20px!important;padding:2px 5px!important;flex:0 0 auto!important}
  body.zace-desktop #modal .sales-workflow-bar :is(output:empty,.sales-workflow-alternatives:empty){display:none!important}
  body.zace-desktop #modal #tradeForm>label:has([name=salesChannel]){display:flex!important;align-items:center!important;flex-wrap:wrap!important;gap:4px!important;padding:2px 6px!important;margin:2px 0!important;line-height:22px!important;min-height:28px!important}
  body.zace-desktop #modal :is(#tradeForm,#returnForm,#voucherForm)>.form-grid{padding-block:4px!important;row-gap:3px!important}
  body.zace-desktop #modal :is(#tradeForm,#returnForm)>.feedback5-line-tools{margin-block:1px!important;padding-block:2px!important;min-height:28px!important}
 }
}
@layer compactWorkspace {
 @media screen and (min-width:900px){
  body.zace-desktop #modal .sales-workflow-bar{flex:0 0 auto!important;min-height:32px!important;height:auto!important}
  body.zace-desktop #modal #tradeForm>label:has([name=salesChannel]){flex:0 0 auto!important}
 }
}
@layer compactWorkspace {
 @media screen and (min-width:900px){
  body.zace-desktop.zace-modern #content.vx-home:not([data-mouse-sized]):not(.vx-scroll-page){margin-top:max(0px,calc(var(--dt-panel-top,128px) - 32px))!important}
  body.zace-desktop #content>.ex-home-entry{height:auto!important;min-height:28px!important;padding:3px 10px!important;margin-block:2px!important;line-height:22px!important}
  body.zace-desktop #content>.ux-launcher{padding-block:3px!important;margin-block:2px!important;min-height:0!important}
  body.zace-desktop #content>:is(.mc-links,.home-actions){padding-block:3px!important;margin-block:2px!important;min-height:0!important;gap:5px!important}
  body.zace-desktop #content>.home-period{padding:4px 6px!important;margin-block:2px!important;gap:4px 8px!important}
  body.zace-desktop #content>.home-period>.form-group{display:flex!important;flex-direction:row!important;align-items:center!important;gap:4px!important;margin:0!important}
  body.zace-desktop #content>.home-period :is(label,strong){margin:0!important;line-height:22px!important}
 }
}

/* Invoice footer density: test-only, desktop screen layout; no financial logic. */
@layer compactWorkspace {
 @media screen and (min-width:900px){
  body.zace-desktop #modal #tradeForm:has(>.sales-workflow-bar){gap:1px!important}
  body.zace-desktop #modal #tradeForm:has(>.sales-workflow-bar)>.table-wrap{flex:1 0 clamp(260px,38vh,480px)!important;min-height:clamp(260px,38vh,480px)!important}
  body.zace-desktop #modal #tradeForm:has(>.sales-workflow-bar)>:is(.trade-tax-treatment,.purchase-total-adjust,.ir-payment-footer,.sales-workflow-payments){padding:1px 5px!important;margin-block:1px!important;gap:2px 6px!important;min-height:0!important;flex-shrink:0!important}
  body.zace-desktop #modal #tradeForm:has(>.sales-workflow-bar) :is(.trade-tax-treatment,.purchase-total-adjust)>label{display:flex!important;flex-flow:row wrap!important;align-items:center!important;gap:3px!important;margin:0!important;min-height:0!important;flex:0 1 auto!important}
  body.zace-desktop #modal #tradeForm:has(>.sales-workflow-bar) :is(.trade-tax-treatment,.purchase-total-adjust)>small{flex:1 1 260px!important;margin:0!important;line-height:1.3!important}
  body.zace-desktop #modal #tradeForm:has(>.sales-workflow-bar) :is(.trade-tax-treatment,.purchase-total-adjust,.ir-payment-footer) :is(input:not([type=checkbox]),select){height:26px!important;min-height:26px!important;max-width:200px!important;padding-block:1px!important;box-sizing:border-box!important}
  body.zace-desktop #modal #tradeForm:has(>.sales-workflow-bar)>.invoice-bottom-46{grid-template-columns:minmax(230px,1fr) minmax(130px,.6fr) minmax(300px,1.4fr)!important;gap:1px 5px!important;padding:1px 3px!important;align-items:start!important}
  body.zace-desktop #modal #tradeForm:has(>.sales-workflow-bar) .vp-invoice-totals{display:grid!important;grid-template-columns:1fr 1fr!important;gap:2px 5px!important;padding:2px!important;min-width:0!important}
  body.zace-desktop #modal #tradeForm:has(>.sales-workflow-bar) .vp-invoice-totals>div{display:flex!important;flex-wrap:wrap!important;align-items:center!important;justify-content:space-between!important;gap:2px!important;min-height:24px!important}
  body.zace-desktop #modal #tradeForm:has(>.sales-workflow-bar) .vp-invoice-totals output{min-width:70px!important;height:24px!important;min-height:24px!important;line-height:22px!important;padding:0 3px!important;max-width:100%!important}
  body.zace-desktop #modal #tradeForm:has(>.sales-workflow-bar) .vp-invoice-totals>p:not([hidden]){grid-column:1/-1!important;margin:0!important;line-height:18px!important}
  body.zace-desktop #modal #tradeForm:has(>.sales-workflow-bar) .invoice-bottom-46 :is(.vp-invoice-cash,.ir-account-strip){gap:2px!important;padding-block:0!important;margin-block:0!important;min-height:0!important}
  body.zace-desktop #modal #tradeForm:has(>.sales-workflow-bar) .vp-invoice-cash :is(input:not([type=hidden]),button){height:26px!important;min-height:26px!important;padding-block:1px!important}
  body.zace-desktop #modal #tradeForm:has(>.sales-workflow-bar) .invoice-bottom-46 #draftAnalysis{grid-column:2!important;grid-row:2!important;font-size:11px!important}
  body.zace-desktop #modal #tradeForm:has(>.sales-workflow-bar) .invoice-bottom-46>.pc-draft-note{grid-row:1!important}
  body.zace-desktop #modal #tradeForm:has(>.sales-workflow-bar) .invoice-bottom-46 .analysis-note{margin:0!important;line-height:1.3!important}
  body.zace-desktop #modal #tradeForm:has(>.sales-workflow-bar)>.actions{gap:2px 5px!important;padding-block:2px!important;margin-block:1px!important}
  body.zace-desktop #modal #tradeForm:has(>.sales-workflow-bar)>.actions .document-navigation{gap:3px!important;padding:1px!important;border-top:0!important;margin:0!important}
  body.zace-desktop #modal #tradeForm:has(>.sales-workflow-bar)>.actions .feedback5-totals{margin:0!important;padding:0!important;line-height:18px!important}
 }
}
@layer compactWorkspace {
 @media screen and (min-width:900px){
  body.zace-desktop #modal #tradeForm:has(>.sales-workflow-bar) .trade-tax-treatment>small{flex-basis:100%!important;order:10!important}
  body.zace-desktop #modal #tradeForm:has(>.sales-workflow-bar) .invoice-bottom-46>.vp-invoice-totals{grid-column:1!important;grid-row:1/3!important;width:100%!important;margin:0!important}
  body.zace-desktop #modal #tradeForm:has(>.sales-workflow-bar) .invoice-bottom-46>.pc-draft-note{grid-column:2!important;padding:0!important}
  body.zace-desktop #modal #tradeForm:has(>.sales-workflow-bar) .invoice-bottom-46>.ir-account-strip{grid-column:3!important;grid-row:1/3!important;display:grid!important;grid-template-columns:1fr 1fr!important;align-items:start!important}
  body.zace-desktop #modal #tradeForm:has(>.sales-workflow-bar) .invoice-bottom-46 .vp-invoice-cash{padding:0 3px!important;display:flex!important;flex-wrap:wrap!important;align-items:center!important;min-width:0!important}
  body.zace-desktop #modal #tradeForm:has(>.sales-workflow-bar) .invoice-bottom-46 .vp-invoice-cash input:not([type=hidden]){width:calc(100% - 35px)!important;min-width:0!important;flex:1 1 80px!important}
  body.zace-desktop #modal #tradeForm:has(>.sales-workflow-bar) .invoice-bottom-46 .vp-invoice-cash :is(span,output){font-size:inherit!important;min-width:0!important;margin:0!important;line-height:18px!important}
  body.zace-desktop #modal #tradeForm:has(>.sales-workflow-bar) .invoice-bottom-46 .vp-invoice-cash details{margin:0!important;padding:0!important}
 }
}

/* Trial: a collapsed alert must not retain a manually enlarged window height. */
@layer compactWorkspace {
 @media screen and (min-width:700px) {
  body.zace-desktop #modalBody>.return-editor{width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important}
  body.zace-desktop #unlinkedReturnForm{width:100%!important;max-width:100%!important;min-width:0!important}
  body.zace-desktop #unlinkedReturnForm>div:has(table){min-width:0!important;max-width:100%!important;overflow:auto!important}
  body.zace-desktop #unlinkedReturnForm {display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:4px 8px!important;padding:4px 8px 8px!important;align-items:start!important}
  body.zace-desktop #unlinkedReturnForm>:is(.form-group,label):nth-child(-n+8){margin:0!important;min-width:0!important;display:flex!important;flex-direction:column!important;gap:2px!important}
  body.zace-desktop #unlinkedReturnForm>:is(p,section,div:not(.form-group),label:nth-child(n+9)){grid-column:1/-1!important;margin-block:2px!important}
  body.zace-desktop #unlinkedReturnForm :is(input:not([type=checkbox]),select){min-width:0!important;max-width:100%!important;box-sizing:border-box!important}
  body.zace-desktop .return-editor>p{margin:4px 8px!important;line-height:1.35!important}
 }
}
@layer compactWorkspace {
@media screen {
 body.zace-desktop .zace-important-popup:not([open]){height:auto!important;min-height:0!important;max-height:none!important;padding-block:1px!important;margin-block:0!important;position:relative!important;inset:auto!important;transform:none!important;width:auto!important}
 body.zace-desktop .zace-important-popup:not([open])>summary{min-height:24px!important;padding-block:2px!important;line-height:20px!important}
 body.zace-desktop .zace-important-popup:not([open])>:not(summary){display:none!important}
 body.zace-desktop #tradeForm [data-active-stock]{font-size:12px!important;line-height:18px!important;white-space:normal!important;overflow-wrap:anywhere}
}
}

/* Workspace alignment: do not let a saved vertical offset consume document space. */
@layer compactWorkspace {
 @media screen and (min-width:900px){
  body.zace-desktop #content#content[data-mouse-sized="1"]:not(.hidden){top:var(--dt-panel-top,128px)!important;bottom:28px!important;height:auto!important;max-height:none!important}
  body.zace-desktop #content>.ex-home-entry{display:inline-flex!important;width:auto!important;max-width:100%!important;vertical-align:middle!important;margin:2px 4px!important}
  body.zace-desktop #content>.ux-launcher{display:inline-flex!important;width:auto!important;max-width:100%!important;vertical-align:middle!important;margin:2px 4px!important;gap:4px!important;flex-wrap:wrap!important}
  body.zace-desktop #content>.ux-launcher button{min-height:28px!important;height:auto!important;padding:2px 6px!important;display:inline-flex!important;align-items:center!important;gap:4px!important}
  body.zace-desktop #content>.ux-launcher button svg{width:18px!important;height:18px!important}
  body.zace-desktop #content .zace-important-popup[open]{height:auto!important;min-height:0!important;max-height:min(220px,30vh)!important;position:relative!important;inset:auto!important;transform:none!important;width:100%!important;overflow:auto!important}
 }
}
@layer compactWorkspace {
 @media screen and (min-width:900px){
  body.zace-desktop.zace-modern #content#content:not([data-mouse-sized]):not(.vx-scroll-page):not(.feedback5-page){margin-top:max(0px,calc(var(--dt-panel-top,128px) - 32px))!important}
  body.zace-desktop.zace-modern #content#content:is(.vx-scroll-page,.feedback5-page){margin-top:0!important}
  body.zace-desktop #content>.zace-desktop-alert-controls{align-content:flex-start!important;align-items:center!important;height:auto!important;min-height:0!important;flex:0 0 auto!important}
 }
}
/* Reports in normal flow must start below the fixed desktop tabs, like other pages. */
@layer compactWorkspace {
 @media screen and (min-width:900px){
  body.zace-desktop.zace-modern #content#content.vx-scroll-page:not([data-mouse-sized]):not(.feedback5-page){margin-top:max(0px,calc(var(--dt-panel-top,128px) - 32px))!important}
 }
}
/* Multiple report tables retain usable rows instead of flex-shrinking to a border. */
@layer compactWorkspace {
 @media screen {
  body.zace-modern #content#content.vx-scroll-page:has(>.table-wrap~.table-wrap)>.table-wrap{flex:0 0 auto!important;min-height:120px!important;max-height:min(420px,55vh)!important}
 }
}
/* Keep workflow actions accessible in one scrollable row on narrow screens. */
@layer compactWorkspace {
 @media screen and (max-width:899px){
  body.zace-modern #content#content:has(#newAdjustment)>.page-head.rwc-caption>.actions{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;max-width:100%!important;width:100%!important;min-width:0!important;gap:4px!important;grid-column:1/-1!important}
  body.zace-modern #content#content:has(#newAdjustment)>.page-head.rwc-caption>.actions>.btn{flex:0 0 auto!important;white-space:nowrap!important}
  body.zace-modern #content#content:has(#newAdjustment)>:is(.document-group-tabs,.zace-desktop-alert-controls){display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;min-width:0!important;max-width:100%!important;gap:4px!important}
  body.zace-modern #content#content:has(#newAdjustment)>:is(.document-group-tabs,.zace-desktop-alert-controls)>*{flex:0 0 auto!important;white-space:nowrap!important}
 }
}
/* Customer directory: bound the table to the available pane, not a second viewport. */
@layer compactWorkspace {
 @media screen and (min-width:900px){
  body.zace-modern #content .cd-workspace{align-content:start!important;grid-template-rows:minmax(0,1fr)!important;min-height:0!important;padding-top:0!important;overflow:hidden!important}
  body.zace-modern #content .cd-main{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;grid-template-rows:auto auto auto minmax(0,1fr) auto auto!important;gap:2px!important;min-height:0!important;overflow:hidden!important}
  body.zace-modern #content .cd-main>.cd-summary{grid-column:1/-1!important;margin:0!important;padding:2px!important;gap:8px!important}
  body.zace-modern #content .cd-main>.directory-column-nav{grid-column:1!important;margin:0!important}
  body.zace-modern #content .cd-main>.vp-universal-grid-tools{grid-column:2!important;margin:0!important}
  body.zace-modern #content .cd-main>.report-top-totals{grid-column:1/-1!important;display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:4px!important;margin:0!important;padding:2px!important}
  body.zace-modern #content .cd-main>.report-top-totals .rt-measures{display:flex!important;flex-wrap:wrap!important;gap:6px!important}
  body.zace-modern #content .cd-main>.cd-table-wrap{grid-column:1/-1!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:auto!important}
  body.zace-modern #content .cd-main>:is(.owner-report-pager,.cd-aging-note){grid-column:1/-1!important;margin:0!important;padding-block:1px!important}
 }
}
@layer compactWorkspace {
 @media screen and (min-width:900px){
  body.zace-modern #content .cd-main>.report-top-totals{flex-wrap:nowrap!important;overflow-x:auto!important;min-width:0!important}
  body.zace-modern #content .cd-main>.report-top-totals :is(.rt-caption,.rt-measures,.rt-measure){flex:0 0 auto!important;white-space:nowrap!important;min-width:0!important;width:auto!important;margin:0!important;flex-wrap:nowrap!important}
  body.zace-modern #content .cd-main>.report-top-totals .rt-measure{padding:2px 5px!important}
 }
}
/* Place directory data first; keep totals, column controls and paging accessible below it. */
@layer compactWorkspace {
 @media screen and (min-width:900px){
  body.zace-modern #content .cd-main{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr) auto auto auto auto!important}
  body.zace-modern #content .cd-main>.cd-table-wrap{grid-row:1!important}
  body.zace-modern #content .cd-main>.cd-summary{grid-row:2!important;grid-column:1!important;flex-wrap:nowrap!important;white-space:nowrap!important;overflow-x:auto!important;min-width:0!important}
  body.zace-modern #content .cd-main>.report-top-totals{grid-row:2!important;grid-column:2!important}
  body.zace-modern #content .cd-main>.directory-column-nav{grid-row:3!important}
  body.zace-modern #content .cd-main>.vp-universal-grid-tools{grid-row:3!important}
  body.zace-modern #content .cd-main>.owner-report-pager{grid-row:4!important}
  body.zace-modern #content .cd-main>.cd-aging-note{grid-row:5!important}
  body.zace-modern #content .cd-table tbody td{padding-block:1px!important;line-height:18px!important}
 }
}
@layer compactWorkspace {
 @media screen and (min-width:900px){
  .cd-mobile-controls>summary{display:none!important}
  .cd-mobile-controls>.cd-controls-body{display:block!important}
 }
 @media screen and (max-width:899px){
  body.zace-modern #content .cd-sidebar{max-height:none!important;overflow:visible!important;padding:4px!important}
  .cd-mobile-controls>summary{cursor:pointer;padding:6px;font-weight:bold}
  .cd-mobile-controls:not([open])>.cd-controls-body{display:none!important}
  .cd-mobile-controls[open]>.cd-controls-body{max-height:40vh;overflow:auto}
  body.zace-modern #content .cd-main .cd-summary{flex-wrap:nowrap!important;white-space:nowrap;overflow-x:auto;padding:2px!important}
  body.zace-modern #content .cd-main>.report-top-totals{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;margin:0!important;padding:2px!important}
  body.zace-modern #content .cd-main>.report-top-totals :is(.rt-caption,.rt-measures,.rt-measure){flex:0 0 auto!important;white-space:nowrap!important;flex-wrap:nowrap!important}
 }
}
/* Keep the alert disclosure in the toolbar; it is not a movable window. */
@layer compactWorkspace {
 @media screen and (min-width:900px){
  body.zace-modern #content .zace-alert-launcher{display:flex!important;flex-wrap:nowrap!important;align-items:center!important;gap:4px!important;margin:0!important;padding:0!important;min-height:28px!important}
  body.zace-modern #content .zace-alert-launcher>button{flex:0 0 auto!important;white-space:nowrap!important}
  body.zace-modern #content .zace-alert-launcher>.zace-important-popup:not([open]){flex:1 1 auto!important;min-width:0!important;border-width:0!important;padding:0!important}
  body.zace-modern #content .zace-alert-launcher>.zace-important-popup>summary{white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;min-height:22px!important;padding:1px 4px!important}
  body.zace-modern #content .zace-alert-launcher:has(.zace-important-popup[open]){flex-wrap:wrap!important}
  body.zace-modern #content .zace-alert-launcher>.zace-important-popup[open]{flex-basis:100%!important;max-height:30vh!important;overflow:auto!important}
 }
}
@layer compactWorkspace {
 @media screen and (max-width:899px){
  body.zace-modern #content:has(.cd-workspace)>.page-head{min-height:32px!important;height:auto!important;padding-block:2px!important;gap:3px!important}
  body.zace-modern #content:has(.cd-workspace)>.page-head h1{font-size:18px!important;line-height:24px!important;margin:0!important}
  body.zace-modern #content:has(.cd-workspace)>.zace-alert-launcher{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;gap:4px!important;min-height:28px!important;padding:0!important}
  body.zace-modern #content:has(.cd-workspace)>.zace-alert-launcher>button{flex:0 0 auto!important;white-space:nowrap!important}
  body.zace-modern #content:has(.cd-workspace)>.zace-alert-launcher:has(details[open]){flex-wrap:wrap!important}
  body.zace-modern #content:has(.cd-workspace) .zace-important-popup:not([open]){flex:0 0 auto!important;white-space:nowrap!important}
  body.zace-modern #content .cd-main{display:flex!important;flex-direction:column!important;gap:3px!important}
  body.zace-modern #content .cd-main>.cd-table-wrap{order:-1!important;flex:0 0 auto!important;max-height:55vh!important;overflow:auto!important}
 }
}
@layer compactWorkspace {
 @media screen and (min-width:900px){
  body.zace-modern #content .cd-main>.report-top-totals{display:flex!important;align-items:center!important;flex-wrap:nowrap!important;overflow-x:auto!important;max-height:32px!important}
  body.zace-modern #content .cd-main>.report-top-totals :is(.rt-caption,.rt-measures,.rt-measure){display:inline-flex!important;flex:0 0 auto!important;white-space:nowrap!important;flex-wrap:nowrap!important;margin:0!important;padding-block:0!important}
  body.zace-modern #content .cd-table tbody tr td{padding-block:0!important;line-height:16px!important;font-size:13px!important}
 }
 @media screen and (max-width:899px){
  body.zace-modern #content .cd-main>.table-wrap.cd-table-wrap{height:32vh!important;max-height:32vh!important;min-height:140px!important}
 }
}
