/* Company portal only. All overrides stop at 760px; desktop styles remain unchanged. */
@media(max-width:760px),(max-width:950px) and (pointer:coarse){
 body[data-portal=company]{min-width:0}body[data-portal=company] #app{width:100%;min-width:0}
 body[data-portal=company] #app>header{margin-left:0!important;width:100%;height:auto!important;min-height:64px;padding:10px 12px!important;display:flex;flex-wrap:wrap;gap:8px;position:relative;box-sizing:border-box}
 body[data-portal=company] #app>header>div:first-of-type{flex:1;min-width:0}body[data-portal=company] .brand{font-size:18px!important;overflow-wrap:anywhere}body[data-portal=company] .header-logo{max-height:30px;max-width:40px}
 body[data-portal=company] #app>header .toolbar{margin:0;gap:6px}body[data-portal=company] .header-account summary>span:nth-child(2){display:none}body[data-portal=company] .header-search{order:5;flex:1 1 100%;width:100%;max-width:none!important;margin:0!important;display:flex}body[data-portal=company] .header-search input{width:0;min-width:0;flex:1}
 body[data-portal=company] #main{margin-left:0!important;max-width:100%!important;width:100%;padding:14px 12px 28px!important;min-width:0;box-sizing:border-box}
 body[data-portal=company] .workspace-nav{display:none!important}body[data-portal=company].fleet-menu-open{overflow:hidden}body[data-portal=company].fleet-menu-open .workspace-nav{display:flex!important;position:fixed!important;inset:0 auto 0 0!important;width:min(300px,86vw)!important;height:100dvh!important;max-height:none!important;overflow-y:auto;z-index:101;padding:12px 0!important;box-shadow:10px 0 30px #0008}body[data-portal=company] .nav-brand{min-height:90px;padding:12px}.fleet-mobile-nav-close{margin:0 12px 8px!important}.fleet-mobile-shade{display:none}.fleet-menu-open .fleet-mobile-shade{display:block;position:fixed;inset:0;z-index:100;background:#0008;border:0;border-radius:0;padding:0}
 body[data-portal=company] main :is(section,article,form,.card,.grid,.row,.toolbar){min-width:0;max-width:100%;box-sizing:border-box}body[data-portal=company] main :is(.grid,.pro-grid,.pro-upgrade-bottom,.company-detail-grid,.company-work-grid,.company-shortcuts,.nameboard-editor,.booking-editor .grid,.driver-feature-editor .grid,.payroll-summary,.dispatch-facts){grid-template-columns:minmax(0,1fr)!important}
 body[data-portal=company] main :is(.metric-grid,.vehicle-metrics,.driver-stats,.regions-summary){display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}body[data-portal=company] main :is(.metric-grid>*,.vehicle-metric,.regions-summary article){min-width:0!important;padding:12px!important}
 body[data-portal=company] main :is(.welcome,.vehicle-hero,.vehicle-list-heading,.row){flex-wrap:wrap;gap:10px}body[data-portal=company] main :is(h1,h2,h3,p,small,summary){overflow-wrap:anywhere}body[data-portal=company] main h1{font-size:25px!important;line-height:1.35}body[data-portal=company] main h2{font-size:19px!important}
 body[data-portal=company] main :is(.filter-panel,.order-filters,.driver-filters,.vehicle-filters,.toolbar){display:flex!important;flex-wrap:wrap;gap:10px;align-items:end}body[data-portal=company] main :is(.filter-panel,.order-filters,.driver-filters,.vehicle-filters)>label{flex:1 1 150px!important;width:auto!important;min-width:0!important;margin:0}body[data-portal=company] main :is(input:not([type=checkbox]):not([type=radio]),select,textarea){min-width:0!important;max-width:100%!important;box-sizing:border-box;font-size:16px!important}body[data-portal=company] main label> :is(input:not([type=checkbox]),select,textarea){width:100%!important}body[data-portal=company] main button,body[data-portal=company] main .button{min-height:42px;white-space:normal}
 body[data-portal=company] main :is(.table-wrap,.team-table,.billing-table,.report-table-wrap){width:100%;min-width:0;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}body[data-portal=company] main .table-wrap table{max-width:none;min-width:650px}body[data-portal=company] main .table-wrap :is(td,th){overflow-wrap:normal}body[data-portal=company] main .card{padding:16px!important}
 body[data-portal=company] .vehicle-link-panel{display:flex!important;flex-direction:column;gap:14px}.vehicle-share-row{display:flex;flex-wrap:wrap;gap:8px}.vehicle-share-row input{flex:1 1 100%}.vehicle-link-panel aside{max-width:100%;flex-wrap:wrap}.vehicle-link-panel aside img{width:110px!important;height:110px!important}
 body[data-portal=company] .analytics-reference{width:100%}.analytics-banner-controls{position:static!important;display:flex;flex-wrap:wrap;gap:6px;margin-top:16px;max-width:100%}.analytics-banner-controls :is(input,select){flex:1 1 120px!important;width:auto!important}.analytics-banner{height:auto!important;min-height:220px;padding:16px!important;margin:-14px -12px 0!important}.analytics-page-title{margin:12px 0!important}.analytics-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important}.analytics-dashboard-grid{grid-template-columns:minmax(0,1fr)!important}.analytics-panel{grid-column:auto!important;min-width:0!important}.analytics-subnav,.analytics-tabs{max-width:100%;overflow-x:auto;flex-wrap:nowrap!important}.analytics-subnav button,.analytics-tabs button{flex-shrink:0;white-space:nowrap!important}.analytics-kpi{display:block!important}.analytics-kpi strong{font-size:22px!important}.analytics-kpi .kpi-icon{display:none}.analytics-panel canvas{max-width:100%}.analytics-filters{flex-wrap:wrap}
 body[data-portal=company] .billing-workspace{display:flex!important;flex-direction:column;gap:14px}.billing-list,.billing-detail{width:100%!important;min-width:0!important;position:static!important}.billing-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important}.billing-kpi{min-width:0!important;padding:12px!important}.billing-kpi-icon{display:none}.billing-tabs,.billing-status-tabs,.billing-detail-tabs{display:flex;flex-wrap:nowrap!important;overflow-x:auto;max-width:100%}.billing-tabs button,.billing-status-tabs button,.billing-detail-tabs button{flex-shrink:0;white-space:nowrap!important}.billing-filters{flex-wrap:wrap!important}.billing-filters input[name=q]{flex:1 1 100%!important;width:100%!important}.billing-filters label,.billing-filters select{flex:1 1 120px!important;width:auto!important}.billing-pdf-controls{flex-wrap:wrap;gap:8px;padding:10px}.billing-pdf-controls label{margin-left:0}.billing-pdf-dialog{width:calc(100vw - 16px);max-width:none;height:92dvh}.billing-pdf-pages{height:calc(100% - 100px);padding:8px}
 body[data-portal=company] .team-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.team-tabs{overflow-x:auto;justify-content:flex-start;gap:8px}.team-tabs button{flex:0 0 auto!important;white-space:nowrap!important}.team-drawer{top:10px!important;bottom:10px!important;height:calc(100dvh - 20px)!important;width:calc(100vw - 20px)!important}.team-drawer-body{overflow-y:auto}.team-reference .team-fields{grid-template-columns:1fr!important}.team-reference .team-phone select{width:120px!important}.team-reference .team-phone input{width:0!important}.team-title-row{align-items:flex-start;flex-wrap:wrap}.team-quick>div{grid-template-columns:1fr!important}.team-reference .team-filters{grid-template-columns:1fr!important}.team-reference .team-switch-row{padding-right:40px}.team-reference .team-drawer-footer button{min-height:44px!important}.team-reference .team-role-cards button{padding:8px!important;gap:6px}.team-reference .team-role-cards small{white-space:normal}.team-reference .team-period input{font-size:12px!important}.team-more[open]{position:relative!important;top:auto!important;right:auto!important}
 body[data-portal=company] main .pro-comparison-table{min-width:540px!important}.pro-price strong{font-size:24px!important}.nameboard-preview{position:static!important}.nameboard-preview img{max-width:100%;height:auto}
 body[data-portal=company] dialog{max-width:calc(100vw - 20px)!important;max-height:92dvh;overflow:auto;padding:16px;box-sizing:border-box}body[data-portal=company] dialog :is(.grid,.toolbar){flex-wrap:wrap;grid-template-columns:1fr!important}body[data-portal=company] #notice{max-width:calc(100vw - 24px);left:12px;right:12px;bottom:12px;box-sizing:border-box}
}
@media(max-width:760px),(max-width:950px) and (pointer:coarse){body[data-portal=company] .welcome{margin:0 0 16px!important;width:100%!important;padding:20px 16px!important}.fleet-mobile-nav-close{min-height:44px}.fleet-menu-open .workspace-nav button{min-height:46px}}
@media(max-width:760px),(max-width:950px) and (pointer:coarse){body[data-portal=company] main [hidden]{display:none!important}.analytics-kpi .kpi-icon{display:none!important}.billing-table table{min-width:1000px!important}body[data-portal=company] main .table-wrap td button{white-space:nowrap!important;min-width:max-content}.billing-table :is(td,th){white-space:nowrap!important}.billing-table td{height:auto!important;padding:10px 8px!important}.analytics-mini-metrics{grid-template-columns:repeat(2,minmax(0,1fr))!important}.analytics-mini-metric{min-width:0}.team-reference .team-drawer-footer{height:auto;min-height:76px;padding:14px 12px}.team-reference .team-drawer-footer>button:first-child{width:90px}.team-reference .team-drawer-head{min-height:48px}}

@media(max-width:760px),(max-width:950px) and (pointer:coarse){.customer-columns,.leave-layout,.leave-workspace,.rota-controls{grid-template-columns:minmax(0,1fr)!important;display:grid!important}.customer-directory,.customer-editor-host{min-width:0!important;width:100%!important}.customer-search{display:flex;flex-wrap:wrap;gap:8px}.customer-search input{flex:1 1 100%}.customer-search select{flex:1}.calendar{grid-template-columns:repeat(7,minmax(0,1fr))!important;gap:3px!important;min-width:0!important}.calendar button{font-size:11px!important;padding:4px 2px!important;min-width:0!important;min-height:58px!important}.leave-calendar-panel,.rota-calendar-panel{min-width:0!important}.driver-card-grid,.driver-settings-grid,.profile-grid,.nameboard-editor{grid-template-columns:1fr!important}.vehicle-metric>span{min-width:0}.header-account .account-actions{right:0;left:auto;max-width:calc(100vw - 24px)}}
@media(max-width:760px),(max-width:950px) and (pointer:coarse){body[data-portal=company] :is(.crew-hero,.rota-hero,.profile-hero,.dispatch-hero){margin:0 0 16px!important;width:100%!important;max-width:100%!important;box-sizing:border-box;padding:20px 16px!important}.driver-onboarding-grid,.crew-instructions,.driver-settings-grid{grid-template-columns:1fr!important;min-width:0}.driver-onboarding-grid .card{min-width:0}}
