/* A named important layer takes precedence over legacy unlayered !important fixes. */
@layer clbvMobileWorkspace {
 @media screen and (max-width:900px) {
  html:has(#admin:not(.hidden)),body:has(#admin:not(.hidden)){width:100%!important;max-width:100%!important;margin:0!important;overflow:hidden!important;height:var(--portal-mobile-height,100dvh)!important;scrollbar-gutter:auto!important;}
  body>.wrap:has(>#admin:not(.hidden)){width:100%!important;max-width:none!important;padding:0!important;margin:0!important;min-height:0!important;height:100%!important;overflow:hidden!important;}
  #admin:not(.hidden){position:fixed!important;inset:0!important;top:var(--portal-mobile-top,0px)!important;width:100%!important;max-width:none!important;min-width:0!important;height:var(--portal-mobile-height,100dvh)!important;min-height:0!important;padding:env(safe-area-inset-top,0px) 0 env(safe-area-inset-bottom,0px)!important;display:flex!important;flex-direction:column!important;gap:0!important;overflow:hidden!important;box-sizing:border-box!important;}
  #admin>.top{position:relative!important;inset:auto!important;transform:none!important;flex:0 0 auto!important;width:100%!important;max-width:none!important;height:auto!important;min-height:0!important;margin:0!important;padding:6px 8px!important;gap:5px!important;border-radius:0!important;display:flex!important;flex-wrap:wrap!important;align-items:center!important;}
  #admin>.top .proposalHeaderActions{display:flex!important;flex-wrap:wrap!important;gap:5px!important;margin:0!important;min-width:0!important;}
  #admin>.top .proposalHistoryActions{display:flex!important;flex-direction:row!important;gap:5px!important;}
  #admin>.top #proposalPageTitle{font-size:16px!important;line-height:1.2!important;margin:0!important;flex:1 1 100%!important;order:3!important;}
  #admin:not(:has(>#officeHome.active))>.top>.brand{display:none!important;}
  #admin>.top .proposalHeaderActions{margin-left:auto!important;}
  #admin>.tab.active{flex:1 1 0!important;min-height:0!important;height:auto!important;max-height:none!important;min-width:0!important;width:100%!important;margin:0!important;padding:8px!important;overflow:auto!important;overscroll-behavior:contain!important;scroll-padding:8px 8px 72px!important;box-sizing:border-box!important;}
  #admin>.officeScreenBar{flex:none!important;margin:0!important;padding:4px 8px!important;}
  #admin>.officeHeaderSpacer{display:none!important;}
  #admin>.officeNotificationGroups{flex:none!important;max-height:80px!important;overflow:auto!important;margin:0!important;padding:4px 8px!important;}
  #admin .mobileAdminBottom{position:static!important;flex:none!important;margin:0!important;}
  /* All office dialogs become full-height work screens, including nested editors. */
  body:has(#admin:not(.hidden)) dialog[open]{position:fixed!important;inset:0!important;top:var(--portal-mobile-top,0px)!important;width:100%!important;max-width:100%!important;height:var(--portal-mobile-height,100dvh)!important;max-height:var(--portal-mobile-height,100dvh)!important;min-height:0!important;margin:0!important;padding:8px!important;border:0!important;border-radius:0!important;box-sizing:border-box!important;overflow:auto!important;overscroll-behavior:contain!important;scroll-padding-bottom:64px!important;}
  body:has(#admin:not(.hidden)) dialog[open]>:is(header,.detailHead,.portalBackHeader){position:sticky!important;top:-8px!important;z-index:12!important;flex:none!important;margin:0 0 8px!important;padding:8px!important;min-height:44px!important;gap:6px!important;flex-wrap:wrap!important;background:#f5f8fc!important;color:#17344e!important;box-sizing:border-box!important;}
  body:has(#admin:not(.hidden)) dialog[open]>:is(header,.detailHead,.portalBackHeader) h2{font-size:17px!important;line-height:1.25!important;margin:0!important;min-width:0!important;flex:1 1 120px!important;}
  body:has(#admin:not(.hidden)) dialog[open]>:is(.dialogBody,.rotBody,.agendaBody,.restOverviewContent,.assignmentBody,.personnelWorkspaceBody,.receiptOverviewContent){min-height:0!important;height:auto!important;max-height:none!important;flex:1 1 auto!important;overflow:auto!important;padding:4px!important;}
  :is(#admin,body:has(#admin:not(.hidden)) dialog) :is(.card,.field,.grid,.row,.filters,.toolbar,.financeHead,.driverOverviewHead,.costRegistrationGrid,.trackingMapCard,.messageInbox,.messageComposer,.messagesLayout){min-width:0!important;max-width:100%!important;box-sizing:border-box!important;}
  #admin>.tab:not(#officeHome):not(#dash) :is(.card,.entryCard,.overviewCard){padding:10px!important;margin:0 0 8px!important;min-height:0!important;height:auto!important;max-height:none!important;border-radius:10px!important;}
  :is(#admin>.tab:not(#officeHome):not(#dash),body:has(#admin:not(.hidden)) dialog) :is(.grid,.formGrid,.form-grid,.fineUploadGrid,.assignmentGrid,.rotGrid,.invoiceFormGrid,.costRegistrationGrid,.messagesLayout){grid-template-columns:minmax(0,1fr)!important;gap:10px!important;}
  :is(#admin,body:has(#admin:not(.hidden)) dialog) :is(input:not([type=checkbox]):not([type=radio]),select,textarea){box-sizing:border-box!important;min-width:0!important;max-width:100%!important;font-size:16px!important;min-height:44px!important;}
  :is(#admin,body:has(#admin:not(.hidden)) dialog) :is(.field,label)>:is(input:not([type=checkbox]):not([type=radio]),select,textarea){width:100%!important;}
  :is(#admin,body:has(#admin:not(.hidden)) dialog) textarea{resize:vertical!important;min-height:112px!important;}
  :is(#admin>.tab:not(#officeHome):not(#dash),body:has(#admin:not(.hidden)) dialog) :is(.actions,.toolbar,.financeHead,.driverOverviewHead,.driverHubNav,.rotActions,.advanceRequestActions,.trackingUnifiedActions,.costViewNav,.costImportActions,.receiptActions,.personnelActions){display:flex!important;flex-wrap:wrap!important;gap:6px!important;align-items:center!important;min-width:0!important;max-width:100%!important;overflow:visible!important;}
  :is(#admin>.tab:not(#officeHome):not(#dash),body:has(#admin:not(.hidden)) dialog) :is(button.btn,.actions button,.toolbar button,.rotActions button){height:auto!important;min-height:44px!important;max-height:none!important;max-width:100%!important;min-width:0!important;padding:8px 10px!important;line-height:1.2!important;font-size:14px!important;white-space:normal!important;overflow-wrap:anywhere!important;flex:0 1 auto!important;margin:0!important;}
  :is(#admin,body:has(#admin:not(.hidden)) dialog) :is(.table,.tableScroll,.table-scroll){width:100%!important;min-width:0!important;max-width:100%!important;max-height:none!important;height:auto!important;overflow:auto!important;overscroll-behavior:auto!important;box-sizing:border-box!important;}
  #admin #costViewRegistrations>.costKpis{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important;overflow:visible!important;}
  #admin #costViewRegistrations>.costKpis>.card{padding:8px!important;margin:0!important;}
  #admin :is(.financeHead,.financePeriodPanel){flex-direction:row!important;align-content:flex-start!important;align-items:center!important;justify-content:flex-start!important;}
  #admin .financePeriodPanel{flex:1 1 100%!important;min-height:0!important;height:auto!important;margin:0!important;}
  #admin .financePeriodPanel>*{flex:1 1 140px!important;}
  #admin .financePeriodModes{flex:1 1 100%!important;flex-wrap:wrap!important;}
  #admin #tracking .officeTrackingSplit{display:flex!important;flex-direction:column!important;height:auto!important;min-height:0!important;gap:8px!important;}
  #admin #tracking .trackingMapCard{height:60dvh!important;min-height:240px!important;}
  #admin #tracking #trackingMap{min-height:220px!important;}
  #admin #tracking .officeTrackingDetails{max-height:none!important;height:auto!important;overflow:visible!important;}
  #admin #messages :is(.messagesLayout,.grid){display:grid!important;grid-template-columns:minmax(0,1fr)!important;width:100%!important;height:auto!important;max-height:none!important;}
  #admin #messages :is(.messageInbox,.messageComposer,.messageList,.officeGroupReadonly,.mediaWorkspace){width:100%!important;min-width:0!important;height:auto!important;max-height:none!important;overflow:visible!important;}
  #admin #messages :is(.messageBubble,.messageBody){min-width:0!important;max-width:100%!important;overflow-wrap:anywhere!important;}
  #admin .mobileWorkExpand{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:40px!important;padding:7px 10px!important;margin:0 0 8px!important;font:600 13px system-ui!important;background:#eaf2ff!important;color:#1756ad!important;border:1px solid #bad1f4!important;border-radius:8px!important;}
  #admin>.tab:not(#officeHome):not(#dash) .card.mobileWorkFocused{position:fixed!important;inset:0!important;top:var(--portal-mobile-top,0px)!important;z-index:15000!important;width:100%!important;max-width:100%!important;height:var(--portal-mobile-height,100dvh)!important;max-height:var(--portal-mobile-height,100dvh)!important;margin:0!important;padding:8px!important;border:0!important;border-radius:0!important;background:#fff!important;overflow:auto!important;box-sizing:border-box!important;}
  #admin .mobileWorkFocused>.mobileWorkExpand{position:sticky!important;top:0!important;z-index:15!important;background:#1762e8!important;color:white!important;}
  #admin .mobileWorkFocused :is(.table,.tableScroll){max-height:none!important;}
  #admin #officeHeaderSearch{position:relative!important;inset:auto!important;flex:1 1 100%!important;width:100%!important;max-width:none!important;margin:0!important;}
  #admin #officeHeaderSearch input{height:44px!important;}
  #admin #officeHeaderSearchResults{position:absolute!important;inset:100% 0 auto!important;max-height:55dvh!important;z-index:16000!important;}
  :is(#admin,body:has(#admin:not(.hidden)) dialog) :is([hidden],.hidden){display:none!important;}
  #admin .mobileWorkFocused .mobileWorkExpand[hidden]{display:none!important;}
  body:has(#admin:not(.hidden)) dialog :is(.advanceForm,.payForm,.salaryGrid,.bulkFields,.accountFacts,.accountTools,.advanceActions,.payActions){min-width:0!important;max-width:100%!important;gap:8px!important;}
  body:has(#admin:not(.hidden)) dialog :is(.advanceForm,.payForm,.bulkFields){grid-template-columns:minmax(0,1fr)!important;}
  body:has(#admin:not(.hidden)) dialog :is(.accountTools,.advanceActions,.payActions,.billingActions,.bulkActions){display:flex!important;flex-wrap:wrap!important;overflow:visible!important;}
  body:has(#admin:not(.hidden)) dialog :is(.accountBody,.expenseBody,.payBody){min-height:0!important;max-height:none!important;padding:8px!important;}
  :is(#admin>.tab:not(#officeHome):not(#dash),body:has(#admin:not(.hidden)) dialog) :is([class$="Actions"],[class$="Buttons"],.payToolbar,.payRowButtons){display:flex!important;flex-direction:row!important;flex-wrap:wrap!important;gap:6px!important;min-width:0!important;max-width:100%!important;overflow:visible!important;}
  :is(#admin>.tab:not(#officeHome):not(#dash),body:has(#admin:not(.hidden)) dialog) :is([class$="Actions"],[class$="Buttons"],.payRowButtons,.payToolbar)>button{flex:1 1 130px!important;min-width:0!important;width:auto!important;word-break:normal!important;overflow-wrap:normal!important;}
 }
}
.mobileWorkExpand{display:none!important;}
