/* Final completion fixes: preserve the approved reference UI and correct only spacing, stacking, empty states and flash feedback. */

/* Public flash feedback shared by marketing, search, booking and account pages. */
.siteFlashStack{
  position:fixed;
  z-index:1200;
  top:84px;
  left:50%;
  width:min(560px,calc(100% - 24px));
  transform:translateX(-50%);
  display:grid;
  gap:8px;
  pointer-events:none;
}
.siteFlash{
  pointer-events:auto;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  min-width:0;
  padding:12px 14px;
  border:1px solid var(--line);
  border-radius:20px;
  background:linear-gradient(180deg,var(--cardA),var(--cardB));
  color:var(--text);
  box-shadow:var(--shadow2);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
  transition:opacity .2s ease,transform .2s ease;
}
.siteFlash>div{min-width:0;display:grid;grid-template-columns:auto minmax(0,1fr);align-items:start;gap:9px}
.siteFlash i{margin-top:2px}.siteFlash span{font-size:12px;font-weight:850;line-height:1.45;overflow-wrap:anywhere}
.siteFlash.success{border-color:rgba(34,197,94,.34);background:rgba(34,197,94,.12)}
.siteFlash.error{border-color:rgba(239,68,68,.34);background:rgba(239,68,68,.12)}
.siteFlash.warning{border-color:rgba(245,158,11,.36);background:rgba(245,158,11,.12)}
.siteFlash.info{border-color:rgba(79,140,255,.34);background:rgba(79,140,255,.12)}
.siteFlash button{flex:0 0 auto;width:30px;height:30px;border:0;border-radius:999px;background:var(--field);color:var(--muted);display:grid;place-items:center;padding:0}

/* Empty marketplace states now have complete internal spacing and occupy their intended row. */
.homePage .marketplaceEmptyCard{
  grid-column:1/-1;
  min-width:0;
  min-height:132px;
  padding:20px;
  display:grid;
  align-content:center;
  justify-items:start;
  gap:8px;
  overflow-wrap:anywhere;
}
.homePage .marketplaceEmptyCard p{margin:0;line-height:1.5}
.homePage .marketplaceEmptyCard .btn{margin-top:2px}
.sitePage .empty{
  min-width:0;
  min-height:88px;
  margin-top:12px;
  padding:18px;
  display:grid;
  align-content:center;
  gap:6px;
  overflow-wrap:anywhere;
}

/* Keep marketing cards in their own grid cells and give sequential blocks a reliable gap. */
.sitePage main,.sitePage main>*,.sitePage .section,.sitePage .gridCards,.sitePage .detailGrid{min-width:0}
.sitePage .gridCards,.sitePage .detailGrid{align-items:stretch;grid-auto-rows:auto}
.sitePage .gridCards>*,.sitePage .detailGrid>*{min-width:0;position:relative;height:auto}
.sitePage .section+.section{margin-top:2px}
.sitePage .sectionHead{min-width:0}
.sitePage .sectionHead>div{min-width:0}

/* Dashboard cards and grids: no overlap and no extra nested phone gutter. */
.dashboardBody .app,.dashboardBody .main,.dashboardBody .section,.dashboardBody .section>*{min-width:0}
.dashboardBody .section.is-open>*{min-width:0;position:relative}
.dashboardBody :is(.card,.hero,.statCard,.miniStat,.financeKpi,.splitItem,.detailItem,.quickCard){min-width:0;overflow-wrap:anywhere}
.dashboardBody :is(.grid2,.grid3,.grid4,.statsGrid,.quickGrid,.reportGrid,.financeHeroGrid,.financeSubgrid,.adminPartnerNetworkGrid,.hotelOpsLayout,.hotelSetupJourney,.hotelOpsNudge,.seatEditorGrid,.busOpsGrid){min-width:0;align-items:stretch;grid-auto-rows:auto}
.dashboardBody .cardHead>*{min-width:0}
.dashboardBody .cardHead .cardTitle{flex:1 1 240px}
.dashboardBody .filterEmpty,.dashboardBody .emptyState,.dashboardBody .busManifestEmpty{
  min-width:0;
  padding:15px 16px;
  line-height:1.5;
  overflow-wrap:anywhere;
}
.dashboardBody .emptyTableState{min-width:0;padding:16px 18px;overflow-wrap:anywhere}

/* Auth panels: the last help/stat/notice cards no longer touch the previous card. */
.authPage .authShell,.authPage .panel,.authPage .formCard,.authPage .partnerFormCard,.authPage .partnerSteps,.authPage .miniDash,.authPage .faqList{min-width:0}
.authPage .panel.active{display:grid;gap:14px;align-content:start}
.authPage .panel.active>*{min-width:0;margin-top:0!important}
.authPage .partnerSteps{margin-top:14px}
.authPage .formCard .notice:last-child,.authPage .partnerFormCard .notice:last-child{margin-bottom:0}

/* Custom document pages remain contained on narrow screens. */
.standalonePage{overflow-x:hidden}
.standalonePage :is(main,.page,.sheet,.ticket,.receipt,.manifest,.voucher){max-width:100%;min-width:0}
.standalonePage :is(.tableWrap,.tableScroll){max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}

@media(max-width:760px){
  .siteFlashStack{top:70px;width:calc(100% - 16px);gap:7px}
  .siteFlash{padding:11px 12px;border-radius:18px}

  /* Public pages use a modest 8px edge gutter without changing their approved layout. */
  .sitePage .container,.homePage .container{width:min(100% - 16px,1220px)}
  .sitePage main.container{padding-left:0!important;padding-right:0!important}
  .sitePage .section{margin-bottom:14px}
  .sitePage .sectionHead{margin-left:2px;margin-right:2px;gap:9px}
  .sitePage .gridCards,.sitePage .detailGrid{grid-template-columns:1fr!important;gap:12px!important}
  .sitePage .gridCards>*,.sitePage .detailGrid>*{margin:0!important}
  .sitePage .empty{margin-top:10px;padding:16px;min-height:82px;border-radius:22px}
  .homePage .marketplaceEmptyCard{padding:17px;min-height:118px;border-radius:22px}

  /* Dashboard phone content aligns close to the same edge as the open menu. */
  .dashboardBody .app{width:calc(100% - 12px);padding:8px 0 16px}
  .dashboardBody .main{gap:8px!important}
  .dashboardBody .topbar{top:6px}
  .dashboardBody .sidebar{width:calc(100vw - 12px)}
  .dashboardBody .section.is-open{display:grid;gap:10px;align-content:start}
  .dashboardBody .section.is-open>*{margin-top:0!important;margin-bottom:0!important}
  .dashboardBody .section.is-open>:is(.grid2,.grid3,.grid4,.statsGrid,.quickGrid,.reportGrid,.financeHeroGrid,.financeSubgrid,.adminPartnerNetworkGrid,.hotelOpsLayout,.hotelSetupJourney,.hotelOpsNudge,.seatEditorGrid,.busOpsGrid){gap:10px!important}
  .dashboardBody .cardHead{gap:10px;flex-wrap:wrap}
  .dashboardBody .cardHead .btn,.dashboardBody .cardHead .badge{max-width:100%}
  .dashboardBody .actionFlashStack{margin-bottom:8px!important}
  .dashboardBody .filterEmpty,.dashboardBody .emptyState,.dashboardBody .busManifestEmpty{padding:14px}
  .dashboardBody .formPanel,.dashboardBody .splitGrid,.dashboardBody .metricList{min-width:0}

  /* Auth phone cards receive the same edge gutter and reliable vertical spacing. */
  .authPage{overflow-x:hidden}
  .authPage .container,.authPage .nav,.authPage .authFooter{width:calc(100% - 16px)!important}
  .authPage .main{padding:8px 0 20px}
  .authPage .grid{gap:12px}
  .authPage .authShell{gap:12px}
  .authPage .panel.active{gap:12px}
  .authPage .partnerSteps{gap:10px;margin-top:12px}
}

@media(max-width:520px){
  /* Preserve two compact KPI cards per row, but collapse content-heavy dashboard grids. */
  .dashboardBody :is(.grid2,.grid3,.reportGrid,.financeHeroGrid,.financeSubgrid,.adminPartnerNetworkGrid,.hotelOpsLayout,.hotelSetupJourney,.seatEditorGrid,.busOpsGrid){grid-template-columns:1fr!important}
  .dashboardBody :is(.statsGrid,.grid4,.quickGrid,.seatPageStats,.hotelManifestKpis,.busManifestKpis){grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .dashboardBody :is(.statCard,.miniStat,.financeKpi){padding-left:11px;padding-right:11px}
  .dashboardBody :is(.statNumber,.financeKpi strong){overflow-wrap:anywhere}
  .authPage .partnerSteps,.authPage .miniDash{grid-template-columns:1fr!important}
}

@media(max-width:360px){
  .dashboardBody .app{width:calc(100% - 8px)}
  .dashboardBody .sidebar{width:calc(100vw - 8px)}
  .sitePage .container,.homePage .container,.authPage .container,.authPage .nav,.authPage .authFooter{width:calc(100% - 12px)!important}
}

@media print{.siteFlashStack{display:none!important}}


/* Deep final cleanup: dashboard geometry, focus state, dark contrast, partner stacking. */
/* An old print rule in the reference dashboard stylesheet leaked into screen mode.
   Restore the actual dashboard body without changing the approved component design. */
body.dashboardBody{
  margin:0!important;
  color:var(--text)!important;
  background:
    radial-gradient(700px 440px at 10% -10%,rgba(79,140,255,.012),transparent 72%),
    radial-gradient(660px 420px at 92% -8%,rgba(255,183,3,.008),transparent 74%),
    linear-gradient(180deg,var(--bg0),var(--bg1))!important;
}
html[data-theme="light"] body.dashboardBody{background:#fff!important;color:var(--text)!important}
html[data-theme="dark"] body.dashboardBody{color:var(--text)!important}
html[data-theme="dark"] .dashboardBody :is(.brand,.brandText,.card,.hero,.section,.detailGroup,.detailItem,.splitItem,.liveItem,.quickCard,.formPanel,.tableWrap,table,th,td,button,a,label,strong,h1,h2,h3,h4,h5,h6,span,p,i,small){color:inherit}
html[data-theme="dark"] .dashboardBody .detailGroup h4{color:var(--text)!important}
html[data-theme="dark"] .dashboardBody .detailItem{border-color:var(--line2)!important;background:var(--soft)!important}
html[data-theme="dark"] .dashboardBody .detailItem span{color:var(--muted)!important}
html[data-theme="dark"] .dashboardBody .detailItem b{color:var(--text)!important}
html[data-theme="dark"] .dashboardBody :is(.cardTitle p,.welcome p,.profileMeta span,.liveItem span:first-child,.quickCard span,.field label,.muted,small){color:var(--muted)!important}
html[data-theme="dark"] .dashboardBody :is(.navBtn i,.dashboardHomeIcon,.control>i,.searchBox>i,.topSearch>i){color:var(--muted)!important}
html[data-theme="dark"] .dashboardBody :is(.navBtn.is-active,.navBtn.is-active i){color:var(--accent)!important}

/* Partner Network cards must occupy separate grid rows and never overlap. */
.dashboardBody #partners>.grid2{
  display:grid!important;
  grid-template-columns:minmax(0,1.15fr) minmax(300px,.85fr)!important;
  gap:14px!important;
  align-items:start!important;
  margin-top:0!important;
}
.dashboardBody #partners>.grid2>.card{
  position:relative!important;
  inset:auto!important;
  transform:none!important;
  min-width:0!important;
  width:auto!important;
  height:auto!important;
  margin:0!important;
  align-self:start!important;
}
.dashboardBody #partners .splitGrid{display:grid!important;gap:10px!important;grid-auto-rows:auto!important}
.dashboardBody #partners .splitItem{position:relative!important;inset:auto!important;transform:none!important;min-height:0!important;height:auto!important;margin:0!important}


/* Partner Network pages share one stable page and data-card contract. */
.dashboardBody .adminNetworkPage.is-open{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  align-content:start!important;
  gap:12px!important;
  isolation:isolate;
}
.dashboardBody .adminNetworkPage>.adminNetworkHero,
.dashboardBody .adminNetworkPage>.adminNetworkDataCard{
  position:relative!important;
  inset:auto!important;
  float:none!important;
  clear:both!important;
  transform:none!important;
  width:100%!important;
  min-width:0!important;
  height:auto!important;
  margin:0!important;
  z-index:auto!important;
}
.dashboardBody .adminNetworkPage .adminNetworkHero{overflow:hidden}
.dashboardBody .adminNetworkPage .heroGrid{min-width:0;align-items:stretch}
.dashboardBody .adminNetworkPage .welcome,
.dashboardBody .adminNetworkPage .adminNetworkSummary{min-width:0;height:100%}
.dashboardBody .adminNetworkPage .adminNetworkDataCard{
  display:grid!important;
  grid-template-rows:auto minmax(0,1fr)!important;
  overflow:hidden!important;
}
.dashboardBody .adminNetworkPage .adminNetworkCardHead{
  min-height:72px;
  padding:15px 16px 13px!important;
  border-bottom:1px solid var(--line2);
  align-items:center;
}
.dashboardBody .adminNetworkPage .adminNetworkCardHead .cardTitle{min-width:0}
.dashboardBody .adminNetworkPage .adminNetworkCardHead h3{margin:0}
.dashboardBody .adminNetworkPage .adminNetworkCardHead p{margin:4px 0 0;line-height:1.45}
.dashboardBody .adminNetworkPage .adminNetworkTableWrap{
  min-width:0;
  min-height:188px;
  margin:0!important;
  padding:12px 16px 16px!important;
  overflow-x:auto!important;
  overflow-y:visible!important;
  -webkit-overflow-scrolling:touch;
}
.dashboardBody .adminNetworkPage .adminNetworkTable{width:100%;min-width:820px}
.dashboardBody .adminNetworkPage .adminNetworkEmpty{
  min-height:132px;
  padding:20px!important;
  justify-content:center;
}
.dashboardBody .adminNetworkPage .adminNetworkEmpty>i{
  width:38px;height:38px;flex:0 0 38px;border-radius:14px;
  display:grid;place-items:center;background:var(--soft);color:var(--muted);
}
.dashboardBody .adminNetworkPage .adminNetworkReviewForm{
  display:grid!important;
  grid-template-columns:minmax(120px,1fr) minmax(150px,1.2fr) minmax(170px,1.5fr) 36px!important;
  gap:7px!important;
  align-items:center!important;
  min-width:500px;
}
.dashboardBody #mobility-vehicles .adminNetworkReviewForm{
  grid-template-columns:minmax(120px,1fr) minmax(180px,1.5fr) 36px!important;
  min-width:380px;
}

/* Restore the approved neutral input state; do not add a blue typing border. */
:is(.sitePage,.homePage,.authPage,.dashboardBody) :is(.control,.searchBox,.topSearch):focus-within{
  border-color:var(--line2,var(--line))!important;
  background:var(--input,var(--field))!important;
  box-shadow:none!important;
}
:is(.sitePage,.homePage,.authPage,.dashboardBody) :is(.control,.searchBox,.topSearch):focus-within>i{
  color:inherit!important;
}
:is(.sitePage,.homePage,.authPage,.dashboardBody) :is(input,select,textarea):focus,
:is(.sitePage,.homePage,.authPage,.dashboardBody) :is(input,select,textarea):focus-visible{
  outline:none!important;
  box-shadow:none!important;
  border-color:inherit!important;
}

/* Authentication feedback must remain visible and readable in both themes. */
.authPage .flashStack{display:grid!important;gap:9px!important;margin:0 0 2px!important}
.authPage .flashMessage{display:flex;align-items:flex-start;gap:9px;line-height:1.45;overflow-wrap:anywhere}
.authPage .flashMessage.error{color:#ff8f8f!important;background:rgba(239,68,68,.12)!important;border-color:rgba(239,68,68,.32)!important}
html[data-theme="light"] .authPage .flashMessage.error{color:#b91c1c!important;background:#fef2f2!important;border-color:#fecaca!important}

@media(max-width:980px){
  .dashboardBody #partners>.grid2{grid-template-columns:1fr!important;gap:12px!important}
}

@media(max-width:760px){
  /* Four-pixel outer gutter: visually aligned with the opened dashboard menu. */
  body.dashboardBody{margin:0!important;padding:0!important}
  .dashboardBody .app{width:calc(100% - 8px)!important;margin:0 auto!important;padding:6px 0 12px!important;gap:6px!important}
  .dashboardBody .main{gap:6px!important}
  .dashboardBody .sidebar{width:calc(100vw - 8px)!important}
  .dashboardBody .topbar{top:4px!important}
  .dashboardBody .section.is-open{gap:8px!important}
  .dashboardBody #partners>.grid2{gap:10px!important}
  .dashboardBody #partners .cardHead{padding:12px 12px 0!important}
  .dashboardBody #partners .innerTabs{padding:10px 12px 0!important;gap:7px!important;flex-wrap:nowrap!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch}
  .dashboardBody #partners .tableWrap{padding:10px 12px 12px!important}
  .dashboardBody #partners .splitGrid{padding:12px!important;gap:9px!important}
  .dashboardBody #partners .notice{margin:10px 12px 12px!important}
  .dashboardBody :is(.hero,.card){max-width:100%!important}
  .dashboardBody .hero{padding:12px!important}
  .dashboardBody .cardHead{padding-left:12px!important;padding-right:12px!important}
  .dashboardBody .formPanel{padding:12px!important}
  .dashboardBody .tableWrap{padding-left:12px;padding-right:12px}
}

@media(max-width:420px){
  .dashboardBody .app{width:calc(100% - 6px)!important}
  .dashboardBody .sidebar{width:calc(100vw - 6px)!important}
  .dashboardBody #partners>.grid2{gap:8px!important}
  .dashboardBody #partners .splitGrid{padding:10px!important}
}

@media(max-width:980px){
  .dashboardBody .adminNetworkPage .heroGrid{grid-template-columns:1fr!important}
  .dashboardBody .adminNetworkPage .welcome{min-height:0!important}
  .dashboardBody .adminNetworkPage .adminNetworkSummary{min-height:0!important}
}
@media(max-width:760px){
  .dashboardBody .adminNetworkPage.is-open{gap:9px!important}
  .dashboardBody .adminNetworkPage .adminNetworkHero{padding:12px!important}
  .dashboardBody .adminNetworkPage .adminNetworkHero .heroGrid{gap:10px!important}
  .dashboardBody .adminNetworkPage .welcome,
  .dashboardBody .adminNetworkPage .adminNetworkSummary{padding:13px!important;border-radius:22px!important}
  .dashboardBody .adminNetworkPage .heroActions{display:grid!important;grid-template-columns:1fr!important;gap:8px!important}
  .dashboardBody .adminNetworkPage .heroActions .btn{width:100%!important;justify-content:center!important}
  .dashboardBody .adminNetworkPage .adminNetworkCardHead{min-height:0;padding:13px 13px 11px!important;gap:8px!important}
  .dashboardBody .adminNetworkPage .adminNetworkCardHead>.badge{justify-self:start}
  .dashboardBody .adminNetworkPage .adminNetworkTableWrap{min-height:160px;padding:10px 12px 12px!important}
  .dashboardBody .adminNetworkPage .adminNetworkEmpty{min-height:112px;padding:16px!important}
}


/* Final Super Admin phone-flow repair: these six destinations share one stable vertical page contract. */
.dashboardBody .dashboardFlowPage.is-open{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  align-content:start!important;
  gap:14px!important;
  isolation:isolate;
}
.dashboardBody .dashboardFlowPage.is-open>*{
  position:relative!important;
  inset:auto!important;
  float:none!important;
  clear:both!important;
  transform:none!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  height:auto!important;
  margin:0!important;
  align-self:start!important;
  z-index:auto!important;
}
.dashboardBody .dashboardFlowPage :is(.heroGrid,.grid2,.grid3,.grid4,.statsGrid,.quickGrid,.splitGrid,.metricList){min-width:0}
.dashboardBody .dashboardFlowPage :is(.card,.hero,.welcome,.livePanel,.statCard,.splitItem,.metricRow){position:relative!important;inset:auto!important;transform:none!important;min-width:0!important;height:auto!important}
.dashboardBody .dashboardFlowPage .tableWrap{max-width:100%;min-width:0;overflow-x:auto;-webkit-overflow-scrolling:touch}
.dashboardBody .dashboardFlowPage .rowActions{min-width:0;align-items:stretch}
.dashboardBody .serviceDashboardPage>.grid2{margin-top:0!important}
.dashboardBody .serviceDashboardPage>.card{margin-top:0!important}
.dashboardBody .dashboardSchedulePage>.grid2,
.dashboardBody .dashboardSchedulePage>.card{margin-top:0!important}

/* Standalone authentication flash messages use the same close behaviour as public pages. */
.authPage .flashMessage{justify-content:space-between;min-width:0;transition:opacity .2s ease,transform .2s ease}
.authPage .flashMessageBody{display:flex;align-items:flex-start;gap:9px;min-width:0;flex:1 1 auto}
.authPage .flashMessageBody span{min-width:0;overflow-wrap:anywhere}
.authPage .flashDismiss{flex:0 0 30px;width:30px;height:30px;padding:0;border:0;border-radius:999px;background:var(--input);color:var(--muted);display:grid;place-items:center}

@media(max-width:760px){
  .dashboardBody .dashboardFlowPage.is-open{gap:10px!important}
  .dashboardBody .dashboardFlowPage .heroGrid{grid-template-columns:minmax(0,1fr)!important;gap:10px!important}
  .dashboardBody .dashboardFlowPage .welcome,
  .dashboardBody .dashboardFlowPage .livePanel{min-height:0!important;padding:13px!important}
  .dashboardBody .dashboardOverviewPage .statsGrid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .dashboardBody .dashboardOverviewPage .quickGrid{grid-template-columns:minmax(0,1fr)!important;gap:8px!important}
  .dashboardBody .dashboardSchedulePage>.grid2,
  .dashboardBody .serviceDashboardPage>.grid2{grid-template-columns:minmax(0,1fr)!important;gap:10px!important}
  .dashboardBody .dashboardSchedulePage .rowActions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;width:100%!important}
  .dashboardBody .dashboardSchedulePage .rowActions .btn{width:100%!important;min-width:0!important;justify-content:center!important;white-space:normal!important;text-align:center!important}
  .dashboardBody .serviceDashboardPage .heroActions{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:8px!important;width:100%!important}
  .dashboardBody .serviceDashboardPage .heroActions :is(.btn,a){width:100%!important;min-width:0!important;justify-content:center!important}
  .dashboardBody .serviceDashboardPage .splitGrid{grid-template-columns:minmax(0,1fr)!important;gap:8px!important}
  .dashboardBody .serviceDashboardPage .metricRow{align-items:flex-start!important;gap:8px!important}
}
@media(max-width:420px){
  .dashboardBody .dashboardOverviewPage .statsGrid{grid-template-columns:minmax(0,1fr)!important}
  .dashboardBody .dashboardSchedulePage .rowActions{grid-template-columns:minmax(0,1fr)!important}
}

/* One dashboard layout contract: every destination follows the same card rhythm,
   natural action wrapping, and table scrolling used by the established pages. */
.dashboardBody .section.is-open{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  align-content:start!important;
  gap:14px!important;
}
.dashboardBody .section.is-open>*{
  position:relative;
  min-width:0!important;
  max-width:100%!important;
  width:100%;
  margin-top:0!important;
  margin-bottom:0!important;
}
.dashboardBody .section :is(.card,.hero,.grid2,.grid3,.grid4,.splitGrid,.statsGrid,.quickGrid,.financeTableGrid,.financeSubgrid,.reportGrid){
  min-width:0;
  max-width:100%;
}
.dashboardBody .section .card{
  overflow:hidden;
}
.dashboardBody .section .cardHead,
.dashboardBody .section .financeHeroTop,
.dashboardBody .section .seatOpsHeader{
  min-width:0;
}
.dashboardBody .section :is(.cardTitle,.cardTitle h3,.cardTitle p,.financeHeroTop>div,.seatOpsHeader>div){
  min-width:0;
  overflow-wrap:anywhere;
}
.dashboardBody .section .rowActions,
.dashboardBody .section .financeActions,
.dashboardBody .section .documentActions{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  gap:8px!important;
  width:auto!important;
  min-width:0!important;
}
.dashboardBody .section .rowActions :is(.btn,a),
.dashboardBody .section .financeActions :is(.btn,a){
  flex:0 1 auto!important;
  width:auto!important;
  min-width:0!important;
  max-width:100%;
}
.dashboardBody .section .tableWrap{
  width:100%;
  min-width:0;
  max-width:100%;
  overflow-x:auto!important;
  overflow-y:hidden;
  -webkit-overflow-scrolling:touch;
}
.dashboardBody .section .tableWrap table{
  width:100%;
}
.dashboardBody .seatMapFilterGrid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin-bottom:16px;
  min-width:0;
}

@media(max-width:980px){
  .dashboardBody .section>.grid2,
  .dashboardBody .section>.grid3,
  .dashboardBody .section>.grid4,
  .dashboardBody .section .financeSubgrid{
    grid-template-columns:minmax(0,1fr)!important;
  }
  .dashboardBody .seatMapFilterGrid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

/* Live Departure Seat Maps: the row contains two seat groups and one aisle.
   Let those three tracks keep their natural size and lock every seat square. */
.dashboardBody #seat-maps .busCabinDeck{
  overflow-x:auto!important;
  overflow-y:auto!important;
  justify-content:start!important;
}
.dashboardBody #seat-maps .busSeatRow{
  grid-template-columns:max-content 34px max-content!important;
  width:max-content!important;
  min-width:max-content!important;
  max-width:none!important;
  justify-content:start!important;
  align-items:center!important;
  margin-inline:auto!important;
}
.dashboardBody #seat-maps .busSeatGroup{
  display:grid!important;
  grid-auto-flow:column!important;
  grid-auto-columns:66px!important;
  gap:12px!important;
  width:max-content!important;
  min-width:max-content!important;
}
.dashboardBody #seat-maps .busSeatRow .seat{
  box-sizing:border-box!important;
  flex:0 0 66px!important;
  width:66px!important;
  min-width:66px!important;
  max-width:66px!important;
  height:66px!important;
  min-height:66px!important;
  max-height:66px!important;
  aspect-ratio:1 / 1!important;
  padding:0!important;
}
.dashboardBody #seat-maps .busAisle{
  width:34px!important;
  min-width:34px!important;
  height:66px!important;
  min-height:66px!important;
}

/* Manifest and shared dashboard filters stay in normal flow. Their own height
   grows with wrapped controls, so tables and cards always start below them. */
.dashboardBody .section :is(.dashboardFilters,.filterRow,.tableTools){
  position:static!important;
  inset:auto!important;
  transform:none!important;
  float:none!important;
  clear:both!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  z-index:auto!important;
  overflow:visible!important;
}
.dashboardBody #manifests .manifestLayout,
.dashboardBody #manifests .busManifestCard,
.dashboardBody #manifests .hotelManifestCard,
.dashboardBody #manifests .manifestPassengerBlock{
  position:relative!important;
  min-width:0!important;
  height:auto!important;
  overflow:visible!important;
}
.dashboardBody #manifests .busManifestFilters,
.dashboardBody #manifests .hotelManifestFilters{
  display:flex!important;
  flex-flow:row wrap!important;
  align-items:flex-end!important;
  gap:8px!important;
  margin:0 12px 12px!important;
  width:auto!important;
}
.dashboardBody #manifests .busManifestFilters .field,
.dashboardBody #manifests .hotelManifestFilters .field{
  flex:1 1 170px!important;
  width:auto!important;
  min-width:145px!important;
  max-width:280px!important;
}
.dashboardBody #manifests .filterActions{
  position:static!important;
  display:flex!important;
  flex:0 1 auto!important;
  flex-flow:row wrap!important;
  align-items:flex-end!important;
  justify-content:flex-start!important;
  gap:8px!important;
  width:auto!important;
  min-width:0!important;
  margin:0!important;
}
.dashboardBody #manifests .filterActions .btn{
  flex:0 0 auto!important;
  width:auto!important;
  min-width:0!important;
}
.dashboardBody #manifests :is(.busManifestTableWrap,.manifestPassengerBlock,.hotelManifestTabs){
  position:relative!important;
  clear:both!important;
  margin-top:0!important;
}

@media(max-width:760px){
  .dashboardBody #seat-maps .busSeatRow{
    grid-template-columns:max-content 22px max-content!important;
    gap:8px!important;
  }
  .dashboardBody #seat-maps .busSeatGroup{
    grid-auto-columns:56px!important;
    gap:8px!important;
  }
  .dashboardBody #seat-maps .busSeatRow .seat{
    flex-basis:56px!important;
    width:56px!important;
    min-width:56px!important;
    max-width:56px!important;
    height:56px!important;
    min-height:56px!important;
    max-height:56px!important;
  }
  .dashboardBody #seat-maps .busAisle{
    width:22px!important;
    min-width:22px!important;
    height:56px!important;
    min-height:56px!important;
  }
  .dashboardBody #manifests .busManifestFilters,
  .dashboardBody #manifests .hotelManifestFilters{
    margin:0 10px 10px!important;
  }
  .dashboardBody #manifests .busManifestFilters .field,
  .dashboardBody #manifests .hotelManifestFilters .field{
    flex:1 1 145px!important;
    min-width:135px!important;
    max-width:240px!important;
  }
}

@media(max-width:760px){
  .dashboardBody .section.is-open{
    gap:10px!important;
  }
  .dashboardBody .section .cardHead,
  .dashboardBody .section .financeHeroTop,
  .dashboardBody .section .seatOpsHeader{
    gap:10px!important;
  }
  .dashboardBody .section .rowActions,
  .dashboardBody .section .financeActions,
  .dashboardBody .section .documentActions{
    justify-content:flex-start!important;
  }
  .dashboardBody .section .rowActions :is(.btn,a),
  .dashboardBody .section .financeActions :is(.btn,a){
    flex:0 1 auto!important;
    width:auto!important;
    min-height:36px;
    padding-inline:11px;
    white-space:normal;
  }
  .dashboardBody .section .tableTools{
    display:flex!important;
    flex-wrap:wrap!important;
    gap:8px!important;
  }
  .dashboardBody .section .tableTools .control{
    flex:1 1 180px!important;
    width:auto!important;
    min-width:0!important;
    max-width:none!important;
  }
  .dashboardBody .section .tableTools .btn{
    flex:0 1 auto;
    width:auto;
  }
  .dashboardBody .seatMapFilterGrid{
    grid-template-columns:minmax(0,1fr);
    gap:8px;
    margin-bottom:12px;
  }
}

/* Keep dashboard tables free and straight: columns use their natural width and
   the table swipes horizontally instead of squeezing or becoming tall. */
.dashboardBody .section .tableWrap{
  display:block!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
}
.dashboardBody .section .tableWrap table{
  width:max-content!important;
  min-width:100%!important;
  max-width:none!important;
  table-layout:auto!important;
}
.dashboardBody .section .tableWrap :is(th,td){
  width:auto!important;
  min-width:0!important;
  max-width:none!important;
  height:auto!important;
  line-height:1.2!important;
  white-space:nowrap!important;
}
.dashboardBody .section .tableWrap th{
  padding:0 9px 2px!important;
}
.dashboardBody .section .tableWrap td{
  padding:9px 10px!important;
}
.dashboardBody .section .tableWrap .nameCell{
  min-height:32px!important;
}
.dashboardBody .section .tableWrap .miniLogo{
  width:32px!important;
  height:32px!important;
  border-radius:12px!important;
}
.dashboardBody .section .tableWrap .tinyBtn{
  width:31px!important;
  height:31px!important;
}

/* Filters are a normal sequence, never a forced grid. */
.dashboardBody .section .tableTools,
.dashboardBody .seatMapFilterGrid,
.dashboardBody .dashboardFilters,
.dashboardBody .filterRow{
  display:flex!important;
  flex-flow:row wrap!important;
  align-items:flex-end!important;
  justify-content:flex-start!important;
  gap:8px!important;
}
.dashboardBody .seatMapFilterGrid{
  margin-bottom:12px!important;
}
.dashboardBody .section .tableTools .control,
.dashboardBody .seatMapFilterGrid .field,
.dashboardBody .dashboardFilters .field,
.dashboardBody .filterRow .control{
  flex:0 1 220px!important;
  width:auto!important;
  min-width:170px!important;
  max-width:280px!important;
}
.dashboardBody .section .tableTools .btn,
.dashboardBody .dashboardFilters .btn,
.dashboardBody .filterRow .btn{
  flex:0 0 auto!important;
  width:auto!important;
}

@media(max-width:760px){
  .dashboardBody .section .tableWrap{
    padding:8px 10px 11px!important;
  }
  .dashboardBody .section .tableWrap table{
    width:max-content!important;
    min-width:100%!important;
  }
  .dashboardBody .section .tableWrap td{
    padding:9px 10px!important;
  }
  .dashboardBody .section .tableTools,
  .dashboardBody .seatMapFilterGrid,
  .dashboardBody .dashboardFilters,
  .dashboardBody .filterRow{
    display:flex!important;
    flex-direction:row!important;
    flex-wrap:wrap!important;
    align-items:flex-end!important;
  }
  .dashboardBody .section .tableTools .control,
  .dashboardBody .seatMapFilterGrid .field,
  .dashboardBody .dashboardFilters .field,
  .dashboardBody .filterRow .control{
    flex:1 1 150px!important;
    width:auto!important;
    min-width:135px!important;
    max-width:240px!important;
  }
  .dashboardBody .section .tableTools .btn,
  .dashboardBody .dashboardFilters .btn,
  .dashboardBody .filterRow .btn{
    flex:0 0 auto!important;
    align-self:flex-end!important;
    width:auto!important;
  }
}

/* Final mobile navigation and install experience: scoped additions only. */
.bottomNav{transition:transform .22s ease,opacity .22s ease,visibility .22s ease!important;will-change:transform,opacity}
.bottomNav.is-scroll-hidden,.site-drawer-open .bottomNav,.site-input-active .bottomNav{transform:translate(-50%,calc(100% + 34px))!important;opacity:0!important;visibility:hidden!important;pointer-events:none!important}
.drawer.open .drawerPanel{padding-bottom:calc(20px + env(safe-area-inset-bottom))!important;scroll-padding-bottom:calc(24px + env(safe-area-inset-bottom))}
.drawer.open .drawerPanel>:last-child{margin-bottom:8px!important}
.drawerFinalActions,.pwaDrawerInstallAction{min-width:0}
.pwaDrawerInstallAction{width:100%;justify-content:flex-start;gap:10px;margin-top:10px}
.btnBlue:hover,.btnBlue:focus-visible,.btnBlue:active{color:#eef5ff!important}
.btnPrimary:hover,.btnPrimary:focus-visible,.btnPrimary:active{color:#091126!important}
.authPage .btnPrimary:hover,.authPage .btnPrimary:focus-visible,.authPage .btnPrimary:active{color:#061027!important}

.pwaInstallPrompt{position:fixed;right:20px;bottom:20px;z-index:180;width:min(390px,calc(100% - 24px));display:grid;gap:13px;padding:14px;border:1px solid var(--line,rgba(255,255,255,.14));border-radius:24px;background:linear-gradient(180deg,var(--cardA,#111827),var(--cardB,#0b1220));box-shadow:0 24px 70px rgba(0,0,0,.32);color:var(--text,#f8fafc);opacity:0;transform:translateY(18px) scale(.98);visibility:hidden;transition:opacity .2s ease,transform .2s ease,visibility .2s ease}
.pwaInstallPrompt.is-visible{opacity:1;transform:translateY(0) scale(1);visibility:visible}
.pwaInstallClose{position:absolute;top:9px;right:9px;width:32px;height:32px;border:1px solid var(--line,rgba(255,255,255,.14));border-radius:999px;background:var(--field,rgba(255,255,255,.06));color:var(--muted,#94a3b8);display:grid;place-items:center}
.pwaInstallIdentity{display:flex;align-items:center;gap:12px;min-width:0;padding-right:28px}
.pwaInstallLogo{width:66px;height:66px;flex:0 0 66px;display:grid;place-items:center;border-radius:20px;background:#070a12;border:1px solid rgba(255,255,255,.12);overflow:hidden}
.pwaInstallLogo img{width:56px;height:56px;object-fit:contain}
.pwaInstallCopy{display:grid;gap:2px;min-width:0}.pwaInstallCopy strong{font-size:17px;letter-spacing:-.3px}.pwaInstallCopy b{font-size:12px;color:var(--accent,#ffb703)}.pwaInstallCopy small{font-size:11px;line-height:1.45;color:var(--muted,#94a3b8);font-weight:750}
.pwaInstallActions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.pwaInstallActions .btn{width:100%;min-width:0}

@media(max-width:680px){
  .topTicketAction{display:none!important}
  .drawer.open{padding-bottom:calc(12px + env(safe-area-inset-bottom))!important}
  .pwaInstallPrompt{left:12px;right:12px;bottom:calc(78px + env(safe-area-inset-bottom));width:auto;border-radius:22px;padding:13px}
  .site-drawer-open .pwaInstallPrompt{bottom:12px}
  .authPage .toggle{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:4px!important;width:100%!important}
  .authPage .toggle button{min-width:0!important;padding:0 7px!important;font-size:12px!important;white-space:nowrap!important}
  .homePage .stats{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;margin-top:10px!important}
  .authPage .miniDash,.authPage .partnerSteps{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .dashboardBody :is(.statsGrid,.grid4,.quickGrid,.seatPageStats,.hotelManifestKpis,.busManifestKpis){grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

@media(max-width:380px){
  .pwaInstallIdentity{align-items:flex-start}.pwaInstallLogo{width:58px;height:58px;flex-basis:58px;border-radius:18px}.pwaInstallLogo img{width:50px;height:50px}
  .pwaInstallActions{grid-template-columns:1fr}.authPage .toggle button{font-size:11px!important;padding:0 5px!important}
  .dashboardBody .dashboardOverviewPage .statsGrid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

@media(prefers-reduced-motion:reduce){.bottomNav,.pwaInstallPrompt{transition:none!important}}

/* Final mobile statistics and blue-button text contract — loaded last. */
:is(a,button,input[type="submit"],input[type="button"]).btnBlue,
:is(a,button,input[type="submit"],input[type="button"]).btnBlue:link,
:is(a,button,input[type="submit"],input[type="button"]).btnBlue:visited,
:is(a,button,input[type="submit"],input[type="button"]).btnBlue:hover,
:is(a,button,input[type="submit"],input[type="button"]).btnBlue:focus,
:is(a,button,input[type="submit"],input[type="button"]).btnBlue:focus-visible,
:is(a,button,input[type="submit"],input[type="button"]).btnBlue:active{
  color:#eef5ff!important;
  -webkit-text-fill-color:#eef5ff!important;
}
:is(a,button,input[type="submit"],input[type="button"]).btnBlue :is(span,strong,b,small,i){
  color:inherit!important;
  -webkit-text-fill-color:inherit!important;
}

@media(max-width:680px){
  .homePage .stats,
  .authPage .miniDash,
  .authPage .partnerSteps,
  .dashboardBody .statsGrid,
  .dashboardBody .financeKpis,
  .dashboardBody .seatPageStats,
  .dashboardBody .hotelManifestKpis,
  .dashboardBody .busManifestKpis,
  .dashboardBody .hotelOpsNudge,
  .dashboardBody .heroMetricsRow,
  .safeRideMetrics{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
  }
  .homePage .stats>*,
  .authPage .miniDash>*,
  .authPage .partnerSteps>*,
  .dashboardBody .statsGrid>*,
  .dashboardBody .financeKpis>*,
  .dashboardBody .seatPageStats>*,
  .dashboardBody .hotelManifestKpis>*,
  .dashboardBody .busManifestKpis>*,
  .dashboardBody .hotelOpsNudge>*,
  .dashboardBody .heroMetricsRow>*,
  .safeRideMetrics>*{
    min-width:0!important;
    max-width:100%!important;
    overflow-wrap:anywhere;
  }
}


/* Final phone dashboard density and mobile profile-aside contract. */
.drawerFilters{display:grid;gap:10px;padding-top:12px;border-top:1px solid var(--line)}
.drawerFilterTitle{font-size:13px;font-weight:950}.drawerFilterHint{margin-top:2px;color:var(--muted);font-size:11px;font-weight:760;line-height:1.45}
.staticDrawerFilters .sideNav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.staticDrawerFilters .sideNav .btn{width:100%;min-width:0;justify-content:flex-start;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:680px){
  .dashboardBody .dashboardOverviewPage .statsGrid,
  .dashboardBody .statsGrid,
  .dashboardBody .financeKpis,
  .dashboardBody .seatPageStats,
  .dashboardBody .hotelManifestKpis,
  .dashboardBody .busManifestKpis,
  .dashboardBody .hotelOpsNudge,
  .dashboardBody .heroMetricsRow,
  .dashboardBody .safeRideMetrics{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
  }
}

/* Final manifest containment: every filter occupies its own measured flex row,
   and every following table/card is a separate vertical flex item. */
.dashboardBody #manifests .manifestLayout{
  display:grid!important;
  align-items:start!important;
  gap:14px!important;
  overflow:visible!important;
}
.dashboardBody #manifests :is(.busManifestCard,.hotelManifestCard){
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  gap:12px!important;
  min-width:0!important;
  height:auto!important;
  overflow:hidden!important;
  isolation:isolate;
}
.dashboardBody #manifests .manifestPassengerBlock{
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  gap:12px!important;
  min-width:0!important;
  height:auto!important;
  margin:0!important;
  padding:0!important;
  overflow:visible!important;
}
.dashboardBody #manifests :is(.busManifestFilters,.hotelManifestFilters){
  position:relative!important;
  display:flex!important;
  flex-flow:row wrap!important;
  align-items:flex-end!important;
  align-content:flex-start!important;
  gap:8px!important;
  box-sizing:border-box!important;
  flex:0 0 auto!important;
  width:calc(100% - 24px)!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  margin:0 12px!important;
  overflow:visible!important;
  z-index:0!important;
}
.dashboardBody #manifests :is(.busManifestFilters,.hotelManifestFilters)>.field{
  position:relative!important;
  flex:1 1 160px!important;
  width:auto!important;
  min-width:140px!important;
  max-width:260px!important;
  margin:0!important;
}
.dashboardBody #manifests :is(.busManifestFilters,.hotelManifestFilters)>.filterActions{
  position:relative!important;
  display:flex!important;
  flex:0 1 auto!important;
  flex-flow:row wrap!important;
  align-items:center!important;
  align-self:flex-end!important;
  gap:8px!important;
  width:auto!important;
  height:auto!important;
  min-width:0!important;
  margin:0!important;
  inset:auto!important;
  transform:none!important;
  z-index:0!important;
}
.dashboardBody #manifests :is(.busManifestFilters,.hotelManifestFilters)>.filterActions>.btn{
  position:relative!important;
  flex:0 0 auto!important;
  width:auto!important;
  margin:0!important;
  inset:auto!important;
  transform:none!important;
}
.dashboardBody #manifests :is(.busManifestTableWrap,.hotelManifestTabs,.manifestPassengerBlock,.filterEmpty){
  position:relative!important;
  flex:0 0 auto!important;
  clear:both!important;
  inset:auto!important;
  transform:none!important;
  z-index:0!important;
}

/* Wider clean cabin; seats retain the square dimensions defined above. */
.dashboardBody #seat-maps .busCabin{
  width:min(620px,100%)!important;
  max-width:620px!important;
  min-width:0!important;
  box-sizing:border-box!important;
}
.dashboardBody #seat-maps .busCabin[data-driver-position="left"] .busDoor{grid-column:3;}
.dashboardBody #seat-maps .busCabin[data-driver-position="left"] .busWindshield{grid-column:2;grid-row:1;}
.dashboardBody #seat-maps .busCabin[data-driver-position="left"] .driverPod{grid-column:1;grid-row:1;}

@media(max-width:760px){
  .dashboardBody #manifests :is(.busManifestCard,.hotelManifestCard,.manifestPassengerBlock){
    gap:10px!important;
  }
  .dashboardBody #manifests :is(.busManifestFilters,.hotelManifestFilters){
    width:calc(100% - 20px)!important;
    margin:0 10px!important;
  }
  .dashboardBody #manifests :is(.busManifestFilters,.hotelManifestFilters)>.field{
    flex:1 1 140px!important;
    min-width:130px!important;
    max-width:230px!important;
  }
  .dashboardBody #seat-maps .busCabin{
    width:100%!important;
    max-width:620px!important;
  }
  .dashboardBody #seat-maps .busCabin[data-driver-position] .busCabinFront>*{
    grid-column:auto!important;
    grid-row:auto!important;
  }
}

/* Support queue actions must remain inside their card at every dashboard width. */
.dashboardBody #support .grid2>.card{
  min-width:0!important;
  overflow:hidden!important;
}
.dashboardBody #support .grid2>.card>.btn{
  display:inline-flex!important;
  width:max-content!important;
  max-width:calc(100% - 32px)!important;
  margin:0 16px 16px!important;
  white-space:normal!important;
}

/* Physical seat groups support asymmetric 2 + 3 and 3 + 2 cabins. */
:is(.homePage,.sitePage) .seatRow{
  display:grid!important;
  grid-template-columns:max-content 24px max-content!important;
  justify-content:center!important;
  align-items:center!important;
}
:is(.homePage,.sitePage) .seatGroup{
  display:grid!important;
  grid-auto-flow:column!important;
  grid-auto-columns:64px!important;
  gap:8px!important;
}

/* A confirmed/booked seat uses the same unmistakable red everywhere. */
:is(.homePage,.sitePage,.dashboardBody) :is(.seat,.returnSeat).booked,
:is(.homePage,.sitePage,.dashboardBody) :is(.seat,.returnSeat).taken,
:is(.homePage,.sitePage,.dashboardBody) :is(.seat,.returnSeat).sold,
:is(.homePage,.sitePage,.dashboardBody) :is(.seat,.returnSeat).checked_in,
:is(.homePage,.sitePage,.dashboardBody) :is(.seat,.returnSeat).checked-in{
  background:#ef4444!important;
  border-color:#dc2626!important;
  color:#fff!important;
}

@media(max-width:760px){
  .dashboardBody #seat-maps .seatPreviewCardHead{
    position:relative!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:flex-start!important;
    justify-content:flex-start!important;
    gap:10px!important;
    min-height:0!important;
    height:auto!important;
    padding-bottom:12px!important;
    margin-bottom:12px!important;
  }
  .dashboardBody #seat-maps .seatPreviewCardHead .seatLegend{
    position:static!important;
    display:flex!important;
    flex-flow:row wrap!important;
    justify-content:flex-start!important;
    align-items:center!important;
    width:100%!important;
    max-width:none!important;
    min-height:0!important;
    margin:0!important;
    padding:0!important;
    inset:auto!important;
    transform:none!important;
    gap:7px 12px!important;
  }
  :is(.homePage,.sitePage) .seatRow{
    grid-template-columns:max-content 18px max-content!important;
  }
  :is(.homePage,.sitePage) .seatGroup{
    grid-auto-columns:56px!important;
    gap:6px!important;
  }
}
