/* BST portal rule: compact actions, one heading, only the opened view. */
.portal-focused > :not(.portal-focus-target):not(.portal-backbar) {display:none!important}
.portal-backbar {display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;margin:0 0 16px;padding:0;min-width:0}
body.portal-detail > .access-header, body.portal-detail main > .hero,
body.portal-detail .dash-head .eyebrow, body.portal-detail main > section > header .eyebrow,
body.portal-detail main > .eyebrow, body.portal-detail .page-header .eyebrow,
.portal-view-open > .hero, .portal-view-open > .access-header,
.portal-view-open #dashboard .admin-drawer-head > button {display:none!important}
.portal-detail .dash-head {margin:0 0 16px;padding:0;min-height:0;display:block}
.portal-detail .dash-head h1 {margin:0;line-height:1.25;font-size:clamp(1.35rem,3vw,1.9rem)}
.portal-detail .manage-shell {margin-top:16px}
.portal-detail .manage-head {gap:10px;margin-bottom:16px}
.portal-detail .manage-head h1 {margin:0}
body .driver-action-grid,body .admin-quick-actions {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,170px),1fr));gap:8px;align-items:stretch;margin:16px 0}
body .driver-action-grid > *,body .admin-quick-actions > * {width:100%;min-width:0;min-height:48px;margin:0;display:flex;align-items:center;justify-content:center;white-space:normal;overflow-wrap:anywhere;text-align:center;line-height:1.3;padding:12px}
body .inline-actions,body .inline-buttons,body .row-actions,body .dialog-actions,body .admin-data-toolbar {gap:8px;flex-wrap:wrap}
body .inline-actions > button,body .inline-actions > a {margin:0;flex:0 1 auto;min-height:44px;width:auto;max-width:100%;white-space:normal;overflow-wrap:anywhere}
.portal-backbar a,.portal-backbar button {min-height:44px;max-width:100%;white-space:normal;overflow-wrap:anywhere}
body .dash-head {gap:10px;flex-wrap:wrap}
body .dash-head > div {min-width:0}
body .dash-head h1,body .dash-head h2 {overflow-wrap:anywhere}
.portal-focused .admin-drawer {margin:0}
body .portal-backbar [hidden],body .portal-backbar.hidden {display:none!important}
@media(max-width:640px){
 body .driver-action-grid,body .admin-quick-actions {grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 body .driver-action-grid > *,body .admin-quick-actions > * {font-size:inherit;padding:10px 8px}
 body .dash-head {margin-bottom:12px}
 body .inline-buttons > * {max-width:100%}
 .portal-detail .manage-head {align-items:start}
}
@media(max-width:359px){body .driver-action-grid,body .admin-quick-actions {grid-template-columns:minmax(0,1fr)}}

body.bst-internal-page .bst-global-language,body.bst-inner-view .bst-global-language,
body.bst-internal-page .bst-nav-language,body.bst-inner-view .bst-nav-language,
body.bst-internal-page .language-switcher,body.bst-inner-view .language-switcher {display:none!important}
body.portal-detail .dash-head > div:first-child {display:block}
body .data-tabs a.data-tab {display:flex;align-items:center;justify-content:center;text-align:center;text-decoration:none;min-height:44px;white-space:normal}
body.portal-view-open > .bst-support-contact {display:none!important}
body.portal-view-open .hero-blue,body.portal-view-open .hero {display:none!important}
body .admin-data-shell h1 {font-size:clamp(1.35rem,3vw,1.9rem);overflow-wrap:anywhere}


.ticket-scan-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.ticket-scan-actions button{min-width:0;white-space:normal}#offlineControlPanel .trip-search-form{display:grid;grid-template-columns:minmax(0,2fr) minmax(100px,1fr);gap:10px}#offlineControlPanel select{max-width:100%;min-width:0}#offlineControlPanel details{margin-top:14px}#offlineControlPanel video{width:100%;max-height:55vh;background:#111}

body :is(.admin-data-pagination,.blacklist-pages,.trip-search-pagination,.bst-route-pagination,#pendingPager,#adminPendingPager) button{width:auto;min-height:44px;padding:8px 14px;margin:0}
body :is(#tripSearchPage,#roadSearchMessage):empty{display:none}
