/* Mobile revision: paired actions and compact status cards. */
/* Only the office Home screen. No driver or shared dialog selectors. */
@layer portal-sticky-header {
 :root:has(#admin:not(.hidden)) #admin>.top{padding-top:8px!important;padding-bottom:8px!important;row-gap:4px!important;min-height:0!important;}
 :root:has(#admin:not(.hidden)) #admin>.top #proposalPageTitle{position:static!important;transform:none!important;grid-column:1/-1!important;width:100%!important;max-width:none!important;text-align:center!important;margin:0!important;padding:0!important;line-height:1.15!important;}

 @media screen and (max-width:900px) {
  #admin:not(.hidden):has(>#officeHome.active) {padding:6px!important;gap:6px!important;}
  :root:has(#admin:not(.hidden)) #admin>#officeHome.active {display:flex!important;flex-direction:column!important;min-height:0!important;height:auto!important;flex:1 0 auto!important;gap:6px!important;padding:0!important;}
  #admin #officeHomePrimary {flex:1 0 auto!important;min-height:0!important;height:auto!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:none!important;grid-auto-rows:minmax(48px,1fr)!important;gap:6px!important;}
  #admin #officeHomePrimary>button,#admin #officeHomePrimary>.homeFundingRow>button {height:auto!important;min-height:48px!important;max-height:none!important;padding:8px 6px!important;font-size:14px!important;line-height:1.2!important;aspect-ratio:auto!important;}
  #admin #officeHomePrimary>.homeFundingRow {min-height:0!important;height:auto!important;gap:6px!important;}
  #admin #officeHome .driverHubStats>* {min-height:48px!important;padding:5px!important;}
  #admin #officeHome .driverHubStats b {font-size:20px!important;line-height:1.1!important;}
  #admin #officeHome .driverHubNames>div {font-size:12px!important;padding:5px!important;}
  #admin #officeHome .fleetStatusBar {height:auto!important;min-height:0!important;margin:0!important;padding:0!important;}
  #admin #officeHome .fleetSync,#admin #officeHome .mobileAdminNotices>button {height:auto!important;min-height:40px!important;padding:6px!important;margin:0!important;font-size:13px!important;}
  #admin:has(>#officeHome.active)>.top {padding:8px!important;gap:5px!important;min-height:0!important;}
  #admin:has(>#officeHome.active) #proposalPageTitle {font-size:18px!important;line-height:1.2!important;margin:0!important;}
  html:has(#admin:not(.hidden)>#officeHome.active),body:has(#admin:not(.hidden)>#officeHome.active){min-height:100dvh!important;padding-bottom:0!important;}
  #admin:not(.hidden):has(>#officeHome.active){display:flex!important;flex-direction:column!important;box-sizing:border-box!important;min-height:100dvh!important;height:auto!important;padding-bottom:6px!important;}
  #admin #officeHomePrimary>.homeFundingRow{display:contents!important;}
  #admin #officeHomePrimary>button,#admin #officeHomePrimary>.homeFundingRow>button{grid-column:auto!important;grid-row:auto!important;min-width:0!important;width:100%!important;}
  #admin #officeHomePrimary>.portalHelpOpen{order:5!important;}
  #admin #officeHomePrimary>.homeFundingRow>button:nth-child(2){order:6!important;}
  #admin #officeHomePrimary>.homeFundingRow>button:nth-child(1){order:7!important;}
  #admin #officeHomePrimary>.homeFundingRow>button:nth-child(3){order:8!important;}
  #admin #officeHome .homeDriverSummary{height:auto!important;min-height:0!important;flex:0 0 auto!important;padding:6px!important;margin:0!important;}
  #admin #officeHome .driverHubStats{height:auto!important;min-height:0!important;grid-auto-rows:auto!important;gap:4px!important;}
  #admin #officeHome .driverHubStats>.driverHubStatCard{height:auto!important;min-height:44px!important;max-height:none!important;padding:4px!important;display:grid!important;grid-template-columns:1fr auto!important;align-items:center!important;gap:2px!important;aspect-ratio:auto!important;}
  #admin #officeHome .driverHubStats>.driverHubStatCard span{font-size:11px!important;line-height:1.15!important;}
  #admin #officeHome .driverHubStats>.driverHubStatCard b{font-size:18px!important;line-height:1!important;}
  #admin #officeHome .driverHubStats>.driverHubStatCard small{grid-column:1/-1!important;font-size:10px!important;line-height:1!important;}

  #admin #officeHome .driverHubNames>div,#admin #officeHome .driverHubNames>div>*{font-size:12px!important;line-height:1.2!important;}
  #admin #officeHome .driverHubNames>div{min-height:0!important;height:auto!important;}
  #admin>.top .proposalHeaderActions [data-header-layout],
  #admin:has(>#officeHome.active)>.top .proposalHeaderActions [data-header-destination="home"],
  #admin:not(:has(>#officeHome.active))>.top .proposalHeaderActions [data-header-destination="menu"]{display:none!important;}
  #admin>.top .proposalHeaderActions{display:flex!important;grid-template-columns:none!important;grid-auto-flow:row!important;gap:6px!important;justify-content:flex-end!important;width:auto!important;}
  #admin>.top .proposalHeaderActions button{flex:0 0 auto!important;width:auto!important;min-width:64px!important;padding:6px 10px!important;font-size:13px!important;}
  :root:has(#admin:not(.hidden)) #admin>.top{display:grid!important;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)!important;grid-template-rows:auto auto!important;padding:8px!important;gap:4px 6px!important;align-items:center!important;}
  #admin>.top>.brand{grid-column:1/-1!important;grid-row:1!important;min-width:0!important;margin:0!important;}
  :root:has(#admin:not(.hidden)) #admin>.top #proposalPageTitle{grid-column:2!important;grid-row:2!important;width:auto!important;font-size:18px!important;line-height:1.15!important;}
  #admin>.top #proposalHeaderBack{grid-column:1!important;grid-row:2!important;justify-self:start!important;min-height:36px!important;height:auto!important;width:auto!important;padding:6px!important;font-size:13px!important;margin:0!important;}
  #admin>.top .proposalHeaderActions{grid-column:3!important;grid-row:2!important;justify-self:end!important;gap:4px!important;margin:0!important;}
  #admin>.top .proposalHeaderActions button{min-width:0!important;min-height:36px!important;padding:6px!important;font-size:12px!important;}
  /* Prevent Chrome touch-to-search selection on office Home status/name text. */
  #admin #officeHome .homeDriverSummary,
  #admin #officeHome .homeDriverSummary *{-webkit-user-select:none!important;user-select:none!important;-webkit-touch-callout:none!important;}
 }
}

/* Preserve desktop; restore the morning mobile layout with room for current routes. */
@layer portal-sticky-header {
 @media(min-width:901px){#admin #officeHomePrimary:not(.arrangedHome){grid-template-columns:repeat(6,minmax(0,1fr))!important;}}
 @media(max-width:900px){
  #admin:not(.hidden):has(>#officeHome.active){height:100dvh!important;min-height:100dvh!important;}
  :root:has(#admin:not(.hidden)) #admin>#officeHome.active{flex:1 1 0!important;height:auto!important;min-height:0!important;}
  #admin #officeHomePrimary{flex:1 1 0!important;grid-auto-rows:minmax(44px,1fr)!important;}
  #admin #officeHomePrimary>button,#admin #officeHomePrimary>.homeFundingRow>button{min-height:44px!important;padding:5px 6px!important;gap:3px!important;flex-wrap:wrap!important;}
  #admin #officeHomePrimary .proposalPendingCount{font-size:10px!important;line-height:1.1!important;padding:3px 5px!important;min-height:0!important;}
 }
}

@layer portal-sticky-header {@media(max-width:900px){#admin #officeHomePrimary>[data-home-permission="dash"] .proposalPendingCount{display:none!important;}}}
