/* Dispatcher V25 — repairs only. Page markup and navigation stay page-owned. */
html,body{min-width:0;max-width:100%;overflow-x:hidden}
body{min-height:100dvh}
img,video,canvas,svg{max-width:100%}
input,select,textarea,button,.btn,.btn-outline{max-width:100%;min-width:0}
.table-wrapper,.table-container,[class*="table-wrapper"],[class*="table-container"]{max-width:100%;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}

/* Existing local page bars: align what the page already owns, add nothing. */
html body :is(.top-bar,.page-topbar,.nav){align-items:center;justify-content:flex-start!important;align-content:center;flex-wrap:wrap;gap:.5rem .85rem;max-width:100%}
html body :is(.top-bar,.page-topbar,.nav) :is(.nav-links,.page-topbar-main){display:flex;align-items:center;flex-wrap:wrap;gap:.35rem;min-width:0}
html body :is(.top-bar,.page-topbar,.nav)>:is(.current-time,time),
html body :is(.top-bar,.page-topbar,.nav) :is(.current-time,time){margin-left:auto!important;max-width:100%;white-space:normal;text-align:right}
html body :is(.top-bar,.page-topbar,.nav) a{white-space:nowrap}

/* Status semantics: ordinary counters follow the theme; overdue is always red. */
html body #quick-overdue,
html body .stat-card .value.overdue-value{color:#e94560!important;-webkit-text-fill-color:#e94560!important}
html[data-dispatcher-theme="kawaii"] body .stat-card .value:not(.overdue-value):not(#quick-overdue){color:#332a38!important;-webkit-text-fill-color:#332a38!important}

/* Calls stay cards rather than growing into full-width bands. */
body.create-call-page .grid,body.customers-page .grid{grid-template-columns:repeat(auto-fill,minmax(270px,320px));justify-content:start;align-items:stretch}
body.create-call-page .call-card,body.customers-page .dept-card{width:100%;max-width:320px;min-height:270px}
body.create-call-page .filters{display:flex;align-items:stretch;flex-wrap:wrap;gap:.65rem}
body.create-call-page .filters #search{flex:1 1 230px;min-width:190px;max-width:420px}
body.create-call-page .filters #create-call-button{display:inline-flex!important;flex:0 0 auto;width:auto!important;min-width:154px;margin:.3rem 0}

/* Native checkboxes must not inherit full-width text-input rules. */
body :is(input[type="checkbox"],input[type="radio"]){flex:0 0 auto;width:18px!important;min-width:18px!important;max-width:18px!important;height:18px!important;min-height:18px!important;padding:0!important;vertical-align:middle}

/* Dialogs use the viewport as a boundary, never as their requested width. */
html body .modal{box-sizing:border-box;padding:clamp(12px,2.5vw,32px)!important;overflow:hidden!important;align-items:center!important;justify-content:center!important}
html body .modal>.modal-content{box-sizing:border-box!important;width:min(920px,calc(100vw - clamp(24px,5vw,64px)))!important;max-width:920px!important;max-height:calc(100dvh - clamp(24px,5vw,64px))!important;margin:auto!important;overflow:auto!important;overscroll-behavior:contain;scrollbar-gutter:stable}
html body.garage-page #car-modal>.modal-content{width:min(1180px,calc(100vw - clamp(24px,5vw,64px)))!important;max-width:1180px!important}
html body.garage-page :is(#add-car-modal,#add-driver-modal)>.modal-content{width:min(430px,calc(100vw - 24px))!important;max-width:430px!important}
html body.garage-page #maintenance-plan-modal>.modal-content{width:min(620px,calc(100vw - 24px))!important;max-width:620px!important}
html body.garage-page #maintenance-modal>.modal-content{width:min(820px,calc(100vw - 24px))!important;max-width:820px!important}
html body .modal-content .table-wrapper{overflow:auto!important}

/* Garage card and maintenance details remain readable in every theme. */
body.garage-page .car-card .photo-container,body.garage-page .car-detail-photo{background:var(--card,var(--card-bg,rgba(128,128,128,.12)));border-color:var(--border,rgba(128,128,128,.25))}
body.garage-page .car-card .photo-container .no-photo,body.garage-page #modal-no-photo{color:var(--muted,var(--text-secondary,#687080))!important}
body.garage-page .section-title,body.garage-page .maintenance-subtitle{color:var(--text,var(--text-primary,inherit))!important;-webkit-text-fill-color:currentColor}
body.garage-page .top-notifications,body.garage-page .filters,body.garage-page .tech-grid,body.garage-page .maintenance-toolbar{display:flex;flex-wrap:wrap;gap:.55rem;min-width:0}
body.garage-page .car-detail-header{display:flex;align-items:flex-start;gap:1rem;flex-wrap:wrap}
body.garage-page .car-detail-info{flex:1 1 260px;min-width:0}
body.garage-page .tech-grid>div{flex:1 1 150px;min-width:0}
body.garage-page .tech-grid input{width:100%!important}
body.garage-page .maintenance-form-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:.75rem!important}
body.garage-page .maintenance-form-grid .wide{grid-column:1/-1!important}
body.garage-page .maintenance-form-grid :is(input,select,textarea){width:100%!important}
body.garage-page #plan-mileage{display:block!important;visibility:visible!important;opacity:1!important}
body.garage-page .maintenance-plan-table{min-width:760px!important}
body.garage-page .maintenance-table{min-width:1320px!important}

/* Preserve the original shift table geometry; scroll its wrapper only. */
body.schedule-page .table-wrapper{display:block!important;width:100%!important;max-width:100%!important;overflow:auto!important}
body.schedule-page .schedule-table{width:max(100%,1880px)!important;min-width:1880px!important;max-width:none!important;table-layout:fixed!important}
body.schedule-page .schedule-table :is(th,td){height:50px!important;padding:.35rem .3rem!important;color:var(--text,var(--text-primary,inherit))!important;border-color:var(--border,rgba(128,128,128,.35))!important}
body.schedule-page .schedule-table :is(th,.check-col,.driver-col,.car-col){background:var(--card,var(--card-bg,transparent))!important}

/* Wide operational data remains usable at normal browser zoom. */
body.active-rides-page table{min-width:1900px}
body.rides-page table{min-width:1200px}
body.garage-page .table-wrapper,body.active-rides-page .table-wrapper,body.rides-page .table-wrapper,body.waybills-page .table-wrapper,body.action-log-page .table-wrapper{max-width:100%;overflow:auto}

/* Manual distribution keeps its three work areas and line layer. */
body.manual-dispatch-page{height:auto!important;min-height:100dvh!important;overflow:auto!important}
body.manual-dispatch-page #dispatch-board,body.manual-dispatch-page .main{min-height:clamp(420px,calc(100dvh - 190px),780px)!important;height:auto!important;overflow:visible!important}
body.manual-dispatch-page #link-svg,body.manual-dispatch-page #temp-link-svg{pointer-events:none!important;overflow:visible!important}

/* Monitoring values stay words, not one-letter columns. */
body.settings-page .monitoring-grid{grid-template-columns:repeat(6,minmax(0,1fr))!important}
body.settings-page .page-title,body.settings-page .section-title,body.settings-page h3{background:none!important;color:var(--text,var(--text-primary,inherit))!important;-webkit-background-clip:initial!important;-webkit-text-fill-color:currentColor!important}

@media(max-width:1500px){body.settings-page .monitoring-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}}
@media(max-width:900px){
  body.settings-page .monitoring-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  html body :is(.top-bar,.page-topbar,.nav)>:is(.current-time,time),html body :is(.top-bar,.page-topbar,.nav) :is(.current-time,time){width:100%;margin-left:0!important;text-align:left}
  body.garage-page .maintenance-form-grid{grid-template-columns:1fr!important}
  body.garage-page .maintenance-form-grid .wide{grid-column:auto!important}
}
@media(max-width:720px){
  body.create-call-page .grid,body.customers-page .grid{grid-template-columns:minmax(0,1fr)}
  body.create-call-page .call-card,body.customers-page .dept-card{max-width:none;min-height:0}
  body.garage-page .car-detail-header{flex-direction:column}
}
@media(max-width:520px){
  html body .modal{padding:8px!important}
  html body .modal>.modal-content{width:calc(100vw - 16px)!important;max-height:calc(100dvh - 16px)!important;padding:1rem!important}
  .filters>*{flex:1 1 100%;width:100%!important}
  body.settings-page .monitoring-grid{grid-template-columns:1fr!important}
}


/* V26 unified page chrome. Button/link count and destinations stay page-owned. */
html body :is(.top-bar,.page-topbar,.warehouse-local-nav){
  box-sizing:border-box!important;display:flex!important;align-items:center!important;flex-wrap:wrap!important;gap:.42rem!important;
  width:auto!important;min-height:48px!important;margin:0 0 .8rem!important;padding:.4rem .5rem!important;
  border:1px solid var(--border,var(--wh-border,var(--line,#2d3946)))!important;border-radius:13px!important;
  background:color-mix(in srgb,var(--card-bg,var(--card,var(--wh-panel,var(--panel-bg,#161d25)))) 95%,transparent)!important;
  box-shadow:0 7px 22px rgba(0,0,0,.10)!important;overflow:visible!important
}
html body :is(.top-bar,.page-topbar,.warehouse-local-nav) :is(.nav-links,.page-topbar-main){
  display:flex!important;align-items:center!important;flex:0 1 auto!important;flex-wrap:wrap!important;gap:.28rem!important;min-width:0!important
}
html body :is(.top-bar,.page-topbar,.warehouse-local-nav)>a,
html body :is(.top-bar,.page-topbar,.warehouse-local-nav) .nav-links>a,
html body :is(.top-bar,.page-topbar,.warehouse-local-nav) .page-topbar-main>a,
html body :is(.top-bar,.page-topbar,.warehouse-local-nav) .nav-dropdown>.drop-title{
  box-sizing:border-box!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;
  min-height:34px!important;margin:0!important;padding:.38rem .62rem!important;border:1px solid transparent!important;border-radius:9px!important;
  background:transparent!important;color:var(--muted,var(--wh-muted,var(--page-muted,#9eabb8)))!important;font:750 .82rem/1.15 system-ui,-apple-system,"Segoe UI",sans-serif!important;
  text-decoration:none!important;white-space:nowrap!important;
  transition:background-color .18s ease,color .18s ease,border-color .18s ease,transform .18s ease!important
}
html body :is(.top-bar,.page-topbar,.warehouse-local-nav)>a:hover,
html body :is(.top-bar,.page-topbar,.warehouse-local-nav) .nav-links>a:hover,
html body :is(.top-bar,.page-topbar,.warehouse-local-nav) .page-topbar-main>a:hover,
html body :is(.top-bar,.page-topbar,.warehouse-local-nav) .nav-dropdown>.drop-title:hover{
  background:color-mix(in srgb,var(--accent,var(--wh-accent,var(--accent-local,#e85a72))) 12%,transparent)!important;border-color:color-mix(in srgb,var(--accent,var(--wh-accent,var(--accent-local,#e85a72))) 30%,var(--border,var(--wh-border,var(--line,#2d3946))))!important;
  color:var(--text,var(--wh-text,var(--page-text,#edf2f7)))!important;transform:translateY(-1px)
}
html body :is(.top-bar,.page-topbar,.warehouse-local-nav) .quick-metrics{
  margin-left:auto!important;display:flex!important;align-items:center!important;gap:.55rem!important;flex:0 1 auto!important;flex-wrap:wrap!important
}
html body :is(.top-bar,.page-topbar,.warehouse-local-nav) .theme-picker{margin-left:.1rem!important}
html body :is(.top-bar,.page-topbar,.warehouse-local-nav) :is(.current-time,[data-live-clock],time){
  box-sizing:border-box!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;
  min-height:34px!important;margin-left:auto!important;padding:.34rem .7rem!important;border:1px solid var(--border,var(--wh-border,var(--line,#2d3946)))!important;border-radius:999px!important;
  background:color-mix(in srgb,var(--card-bg,var(--card,var(--wh-panel,var(--panel-bg,#161d25)))) 88%,var(--bg,var(--page-bg,#0d1117)) 12%)!important;color:var(--muted,var(--wh-muted,var(--page-muted,#9eabb8)))!important;
  font:700 .78rem/1.15 system-ui,-apple-system,"Segoe UI",sans-serif!important;white-space:nowrap!important
}
html body :is(.top-bar,.page-topbar,.warehouse-local-nav)+:is(h1,.page-title){margin-top:.55rem!important}
@media(max-width:980px){
  html body :is(.top-bar,.page-topbar,.warehouse-local-nav) .quick-metrics{margin-left:0!important}
  html body :is(.top-bar,.page-topbar,.warehouse-local-nav) .nav-links{flex-basis:100%!important}
  html body :is(.top-bar,.page-topbar,.warehouse-local-nav) :is(.current-time,[data-live-clock],time){margin-left:0!important}
}

/* Smooth, restrained motion across admin pages. */
@keyframes dispatcher-v26-page-in{from{opacity:.76;transform:translateY(5px)}to{opacity:1;transform:none}}
body:not(.sora-tutorial-v25){animation:dispatcher-v26-page-in .28s ease both}
:is(button,.btn,a,input,select,textarea,.card,.section,.stat-card,.driver-card,.call-card,.modal-content,.dropdown-menu){transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease,background-color .2s ease,color .2s ease,opacity .2s ease!important}
:is(button,.btn):not(:disabled):hover{transform:translateY(-1px)}
.modal.active .modal-content{animation:dispatcher-v26-modal-in .24s cubic-bezier(.2,.75,.2,1) both}
@keyframes dispatcher-v26-modal-in{from{opacity:0;transform:translateY(8px) scale(.99)}to{opacity:1;transform:none}}
@media(max-width:980px){body > .top-bar .quick-metrics{margin-left:0!important}body > .top-bar .nav-links{flex-basis:100%!important}}
@media(prefers-reduced-motion:reduce){body:not(.sora-tutorial-v25),.modal.active .modal-content{animation:none!important}:is(button,.btn,a,input,select,textarea,.card,.section,.stat-card,.driver-card,.call-card,.modal-content,.dropdown-menu){transition:none!important}}

/* R3 — one navigation chrome on every operator page. */
html body:has(:is(.top-bar,.page-topbar,.nav,.warehouse-local-nav)){
  padding-top:0!important;
}
html body :is(.top-bar,.page-topbar,.warehouse-local-nav,nav.top-bar,div.nav.top-bar){
  box-sizing:border-box!important;
  width:100vw!important;
  max-width:none!important;
  min-height:52px!important;
  margin-top:0!important;
  margin-left:calc(50% - 50vw)!important;
  margin-right:calc(50% - 50vw)!important;
  margin-bottom:.65rem!important;
  padding:.48rem max(1rem,calc((100vw - min(100vw,1920px))/2 + 1rem))!important;
  border:1px solid var(--border,#30343d)!important;
  border-left-width:1px!important;
  border-right-width:1px!important;
  border-radius:0 0 12px 12px!important;
  background:var(--card-bg,var(--card,var(--bg-secondary,#17191f)))!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:.55rem .85rem!important;
  flex-wrap:wrap!important;
  box-shadow:none!important;
}
html body > :is(.top-bar,.page-topbar,.nav,.warehouse-local-nav) :is(a,button,.drop-title){
  min-height:34px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  box-sizing:border-box!important;
}
html body :is(.top-bar,.page-topbar,.warehouse-local-nav,nav.top-bar,div.nav.top-bar) :is(.current-time,#current-time,.page-clock){
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:32px!important;
  margin-left:auto!important;
  padding:.34rem .9rem!important;
  border:1px solid var(--border,#30343d)!important;
  border-radius:999px!important;
  background:var(--bg,var(--bg-primary,#111318))!important;
  color:var(--muted,var(--text-secondary,#9da4b3))!important;
  white-space:nowrap!important;
}
html body.schedule-page > .nav,
html body.driver-profile-page > .nav{
  margin-bottom:.65rem!important;
}
html body.driver-profile-page{
  --bg-primary:var(--bg)!important;
  --bg-secondary:var(--card-bg,var(--card))!important;
  --bg-card:var(--card-bg,var(--card))!important;
  --text-primary:var(--text)!important;
  --text-secondary:var(--muted)!important;
  background:var(--bg)!important;
  color:var(--text)!important;
}
html body.driver-profile-page :is(.profile-header,.section,.table-wrapper,.stats,.stat-item){
  background-color:var(--card-bg,var(--card))!important;
  color:var(--text)!important;
}
html body.driver-profile-page :is(.profile-info h1,.section h2,.section-title,th,td,label){
  color:var(--text)!important;
}
html body.driver-profile-page :is(.profile-meta,.profile-info p,.muted){
  color:var(--muted)!important;
}
@media(max-width:900px){
  html body :is(.top-bar,.page-topbar,.warehouse-local-nav,nav.top-bar,div.nav.top-bar){
    border-radius:0 0 10px 10px!important;
  }
}


/* R4 STRICT: one navigation design on every operator page */
html body.schedule-page,
html body.driver-profile-page,
html body.warehouse-page{
  padding-top:0!important;
}
html body :is(.top-bar,.page-topbar,.warehouse-local-nav,nav.top-bar,div.nav.top-bar){
  position:relative!important;
  left:calc(50% - 50vw)!important;
  right:auto!important;
  width:100vw!important;
  max-width:100vw!important;
  min-width:100vw!important;
  min-height:52px!important;
  box-sizing:border-box!important;
  margin-top:0!important;
  margin-left:0!important;
  margin-right:0!important;
  margin-bottom:.65rem!important;
  padding:.55rem clamp(.75rem,1.6vw,1.45rem)!important;
  border:1px solid var(--border,#30343d)!important;
  border-left:0!important;
  border-right:0!important;
  border-radius:0 0 12px 12px!important;
  background:var(--card-bg,var(--card,var(--bg-secondary,#181b22)))!important;
  color:var(--text,var(--text-primary,#f2f4f7))!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  flex-wrap:wrap!important;
  gap:.55rem .85rem!important;
  box-shadow:none!important;
}
html body :is(.top-bar,.page-topbar,.warehouse-local-nav,nav.top-bar,div.nav.top-bar) :is(.current-time,#current-time,.page-clock){
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  margin-left:auto!important;
  min-height:32px!important;
  padding:.34rem .9rem!important;
  border:1px solid var(--border,#30343d)!important;
  border-radius:999px!important;
  background:var(--bg,var(--bg-primary,#111318))!important;
  color:var(--muted,var(--text-secondary,#9da4b3))!important;
  box-shadow:none!important;
  white-space:nowrap!important;
}
html body.driver-profile-page{
  --bg-primary:var(--bg)!important;
  --bg-secondary:var(--card-bg,var(--card))!important;
  --bg-card:var(--card-bg,var(--card))!important;
  --text-primary:var(--text)!important;
  --text-secondary:var(--muted)!important;
  background:var(--bg)!important;
  background-image:none!important;
  color:var(--text)!important;
}
html body.driver-profile-page :is(.profile-header,.section,.table-wrapper,.stats,.stat-item){
  background:var(--card-bg,var(--card))!important;
  background-image:none!important;
  color:var(--text)!important;
}


/* R5 — pagination placement requested by operator */
html body .pagination,
html body #pagination.pagination,
html body #car-rides-pagination,
html body #orders-pagination.pagination,
html body #complaints-pagination.pagination{
  display:flex!important;
  justify-content:flex-end!important;
  align-items:center!important;
  width:100%!important;
  margin-left:auto!important;
}

/* R5 — vehicle card export selection and maintenance history usability */
body.garage-page #car-export-menu input[type="checkbox"],
body.garage-page .export-menu input[type="checkbox"]{
  appearance:auto!important;
  -webkit-appearance:checkbox!important;
  display:inline-block!important;
  visibility:visible!important;
  opacity:1!important;
  width:16px!important;
  min-width:16px!important;
  height:16px!important;
  min-height:16px!important;
  margin:0 .45rem 0 0!important;
  accent-color:var(--accent)!important;
}
body.garage-page #car-export-menu label{display:flex!important;align-items:center!important;gap:.35rem!important;white-space:normal!important;}
body.garage-page #maintenance-block{min-width:0!important;max-width:100%!important;overflow:hidden!important;}
body.garage-page #maintenance-block .table-wrapper{display:block!important;width:100%!important;max-width:100%!important;overflow-x:auto!important;overflow-y:visible!important;scrollbar-gutter:stable!important;}
body.garage-page #maintenance-block .maintenance-table{width:max(100%,1320px)!important;min-width:1320px!important;max-width:none!important;}


/* R6 — requested stable controls */
html body .maintenance-pagination,
html body #parts-pagination,
html body #moves-pagination,
html body #waybills-pagination,
html body #records-pagination{
  display:flex!important;justify-content:flex-end!important;align-items:center!important;width:100%!important;
}
body.garage-page .export-dropdown{position:relative!important}
body.garage-page #car-export-menu{
  position:absolute!important;right:0!important;left:auto!important;top:auto!important;bottom:calc(100% + 8px)!important;
  transform:none!important;margin:0!important;
}
body.garage-page #maintenance-block .maintenance-table{width:max(100%,1480px)!important;min-width:1480px!important;max-width:none!important}
body.garage-page #maintenance-block .maintenance-plan-table{width:max(100%,1050px)!important;min-width:1050px!important;max-width:none!important}


/* R6 — Aero corrections must come after common navigation rules. */
html[data-dispatcher-theme="aero"] body :is(.top-bar,.page-topbar,.warehouse-local-nav,nav.top-bar,div.nav.top-bar){
  background:linear-gradient(180deg,rgba(255,255,255,.76),rgba(213,240,253,.54) 42%,rgba(78,162,212,.39) 50%,rgba(224,247,255,.54))!important;
  border-color:rgba(255,255,255,.68)!important;
  box-shadow:0 8px 24px rgba(0,48,83,.28),inset 0 1px #fff!important;
  backdrop-filter:blur(30px) saturate(1.55)!important;
  -webkit-backdrop-filter:blur(30px) saturate(1.55)!important;
}
html[data-dispatcher-theme="aero"] body :is(.top-bar,.page-topbar,.warehouse-local-nav) :is(.current-time,#current-time,.page-clock){
  background:rgba(239,251,255,.56)!important;color:#244b64!important;border-color:rgba(255,255,255,.72)!important;
  backdrop-filter:blur(18px)!important;
}
html[data-dispatcher-theme="aero"] body .modal-content::before,
html[data-dispatcher-theme="aero"] body .dialog::before{display:none!important}
html[data-dispatcher-theme="aero"] body .modal-content,
html[data-dispatcher-theme="aero"] body .dialog{
  background:linear-gradient(180deg,rgba(247,253,255,.95),rgba(214,237,249,.91) 44%,rgba(192,224,242,.90))!important;
  color:#123049!important;
}


/* R7 — readable text in every theme + one page-pagination component. */
html[data-dispatcher-theme] body{color:var(--text)!important}
html[data-dispatcher-theme] body input,
html[data-dispatcher-theme] body select,
html[data-dispatcher-theme] body textarea{color:var(--text)!important}
html[data-dispatcher-theme] body input::placeholder,
html[data-dispatcher-theme] body textarea::placeholder{color:var(--muted)!important;opacity:.82!important}
html[data-dispatcher-theme] body :is(.section,.card,.panel,.tab-content,.modal-content,.table-wrapper,.table-card,.filters,.stats,.profile-info) :is(h1,h2,h3,h4,h5,h6,p,label,td,li,strong){color:var(--text)!important}
html[data-dispatcher-theme] body :is(.section,.card,.panel,.tab-content,.modal-content,.table-wrapper,.table-card,.filters,.stats,.profile-info) :is(small,.muted,.helper,.hint){color:var(--muted)!important}
html[data-dispatcher-theme="light"] body :is(.header h1,.month-title,.profile-info h1,.section-title){color:var(--text)!important;text-shadow:none!important}
html[data-dispatcher-theme="kawaii"] body :is(.header h1,.month-title,.profile-info h1,.section-title){color:var(--text)!important}
html[data-dispatcher-theme="light"] body option{background:#fff!important;color:#20242a!important}
html[data-dispatcher-theme="kawaii"] body option{background:#fffafd!important;color:#543a55!important}
html[data-dispatcher-theme="aero"] body option{background:#eff9ff!important;color:#15374f!important}

/* R8.5 — pagination appearance is owned by each page again.
   Do NOT restyle every .pagination globally: that broke previously correct pages. */


/* R8.5 — corrections from the supplied screenshots. */
/* The remaining Waybills vertical gap was the shell's own 16px top padding, not the topbar height. */
body.waybills-page .waybills-shell{padding-top:0!important}
body.waybills-page .page-topbar{min-height:38px!important;padding:.18rem clamp(.75rem,1.4vw,1.2rem)!important;margin-top:0!important;margin-bottom:.28rem!important}
body.waybills-page .page-topbar .nav-link{min-height:30px!important;padding:4px 9px!important}
body.waybills-page .page-topbar :is(.waybills-clock,[data-live-clock]){min-height:28px!important;padding:.2rem .7rem!important}




/* R8.7 RECOVERY — canonical Waybills pagination, page-scoped only.
   Garage and driver profile are intentionally excluded: their smart pagination stays untouched. */
body:is(.complaints-page,.rides-page,.medical-records-page,.warehouse-page,.action-log-page) .wb-pagination-card{
  overflow:hidden!important;border:1px solid var(--border,var(--line,#2d3946))!important;border-radius:14px!important;
  background:var(--card-bg,var(--card,#161d25))!important;box-shadow:none!important
}
body:is(.complaints-page,.rides-page,.medical-records-page,.action-log-page) .wb-pagination-card :is(.table-wrapper,.page-table-scroll,.action-log-table-wrap){
  overflow-x:auto!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important
}
body:is(.complaints-page,.rides-page,.medical-records-page,.warehouse-page,.action-log-page) .wb-pagination-card>.pagination{
  display:flex!important;justify-content:flex-end!important;align-items:center!important;gap:.5rem!important;
  width:100%!important;min-height:0!important;margin:0!important;padding:12px!important;
  border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important
}
body:is(.complaints-page,.rides-page,.medical-records-page,.warehouse-page,.action-log-page) .wb-pagination-card>.pagination button{
  min-width:36px!important;width:auto!important;min-height:34px!important;height:34px!important;padding:0 10px!important;
  border:1px solid var(--border,var(--line,#2d3946))!important;border-radius:8px!important;
  background:var(--bg,#0d1117)!important;color:var(--text,#edf2f7)!important;cursor:pointer!important
}
body:is(.complaints-page,.rides-page,.medical-records-page,.warehouse-page,.action-log-page) .wb-pagination-card>.pagination button:disabled{opacity:.4!important;cursor:default!important}
body:is(.complaints-page,.rides-page,.medical-records-page,.warehouse-page,.action-log-page) .wb-pagination-card>.pagination span{
  color:var(--muted,#9eabb8)!important;font-weight:700!important
}
body.action-log-page .wb-pagination-card>#pagination.pagination[hidden],
body.action-log-page .wb-pagination-card>#pagination.pagination:empty{display:none!important;padding:0!important}





/* DASHBOARD_FINAL_RESPONSIVE_20260814 */
html body.dashboard-page > .top-bar.dashboard-topbar{
  display:grid!important;
  grid-template-columns:auto minmax(0,1fr) auto!important;
  grid-template-areas:
    "brand nav metrics"
    ". . tools"!important;
  align-items:center!important;
  column-gap:.85rem!important;
  row-gap:.42rem!important;
  flex-wrap:nowrap!important;
  min-width:0!important;
}
body.dashboard-page .dashboard-brand{grid-area:brand!important;margin:0!important}
body.dashboard-page .dashboard-nav-wrap{
  grid-area:nav!important;min-width:0!important;max-width:100%!important;overflow:visible!important;
}
body.dashboard-page .dashboard-nav-wrap .nav-links{
  display:flex!important;align-items:center!important;flex-wrap:wrap!important;
  width:100%!important;min-width:0!important;max-width:100%!important;
  gap:.2rem .72rem!important;margin:0!important;padding:0!important;
}
body.dashboard-page .dashboard-nav-wrap .nav-links > a,
body.dashboard-page .dashboard-nav-wrap .nav-dropdown > .drop-title{font-size:.84rem!important}
body.dashboard-page > .top-bar.dashboard-topbar > .quick-metrics{
  grid-area:metrics!important;display:flex!important;align-items:center!important;justify-content:flex-end!important;
  flex-wrap:nowrap!important;gap:.48rem!important;margin:0!important;white-space:nowrap!important;
}
body.dashboard-page > .top-bar.dashboard-topbar > .quick-metrics .quick-metric{
  font-size:.76rem!important;gap:.16rem!important
}
body.dashboard-page > .top-bar.dashboard-topbar > .dashboard-tools{
  grid-area:tools!important;display:flex!important;align-items:center!important;justify-content:flex-end!important;
  flex-wrap:nowrap!important;gap:.5rem!important;margin:0!important;justify-self:end!important;white-space:nowrap!important;
}
body.dashboard-page > .top-bar.dashboard-topbar > .dashboard-tools .theme-picker{
  max-width:none!important;overflow:visible!important;gap:.18rem!important;padding:.23rem .28rem!important;
}
body.dashboard-page > .top-bar.dashboard-topbar > .dashboard-tools .theme-choice{
  padding:.32rem .5rem!important;font-size:.69rem!important
}
body.dashboard-page > .top-bar.dashboard-topbar > .dashboard-tools .current-time{
  margin:0!important;white-space:nowrap!important;font-size:.71rem!important;padding:.28rem .68rem!important;
}
html body.dashboard-page > .top-bar.dashboard-topbar > .dashboard-tools > #current-time.current-time{
  margin-left:0!important;
}

@media (max-width:1500px){
  html body.dashboard-page > .top-bar.dashboard-topbar{
    grid-template-columns:auto minmax(0,1fr)!important;
    grid-template-areas:
      "brand nav"
      "metrics metrics"
      "tools tools"!important;
  }
  body.dashboard-page > .top-bar.dashboard-topbar > .quick-metrics,
  body.dashboard-page > .top-bar.dashboard-topbar > .dashboard-tools{
    width:100%!important;justify-content:flex-end!important;justify-self:stretch!important;
  }
}
@media (max-width:1040px){
  body.dashboard-page .dashboard-nav-wrap .nav-links{
    flex-wrap:wrap!important;gap:.18rem .65rem!important;
  }
  body.dashboard-page > .top-bar.dashboard-topbar > .quick-metrics,
  body.dashboard-page > .top-bar.dashboard-topbar > .dashboard-tools{
    max-width:100%!important;overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:thin!important;
  }
}
@media (max-width:720px){
  html body.dashboard-page > .top-bar.dashboard-topbar{
    grid-template-columns:1fr!important;
    grid-template-areas:"brand" "nav" "metrics" "tools"!important;
  }
  body.dashboard-page .dashboard-brand{justify-self:start!important;width:38px!important;height:38px!important}
  body.dashboard-page .dashboard-brand img{max-width:36px!important;max-height:36px!important}
  body.dashboard-page > .top-bar.dashboard-topbar > .quick-metrics,
  body.dashboard-page > .top-bar.dashboard-topbar > .dashboard-tools{
    justify-content:flex-start!important;
  }
}
/* END_DASHBOARD_FINAL_RESPONSIVE_20260814 */

/* DASHBOARD_NAV_EXACT_V2_20260814_START */
/* Large screens: one physical row.
   Medium screens: remove the artificial spacer; navigation itself may wrap to two rows.
   Small screens: brand + two-row navigation first, service controls second. */
html body.dashboard-page .dashboard-topbar{
  box-sizing:border-box!important;display:flex!important;align-items:center!important;align-content:center!important;
  justify-content:flex-start!important;flex-wrap:nowrap!important;width:100vw!important;max-width:100vw!important;min-width:0!important;
  min-height:54px!important;margin-left:calc(50% - 50vw)!important;margin-right:calc(50% - 50vw)!important;
  padding:.48rem clamp(.65rem,1vw,1.15rem)!important;gap:.28rem!important;overflow:visible!important;
}
html body.dashboard-page .dashboard-topbar .dashboard-brand{
  flex:0 0 42px!important;width:42px!important;min-width:42px!important;max-width:42px!important;margin:0 .18rem 0 0!important;
}
html body.dashboard-page .dashboard-topbar .dashboard-nav-wrap{
  display:block!important;flex:0 0 auto!important;min-width:0!important;max-width:none!important;margin:0!important;padding:0!important;
}
html body.dashboard-page .dashboard-topbar .dashboard-nav-wrap>.nav-links{
  display:flex!important;align-items:center!important;align-content:center!important;flex-wrap:nowrap!important;gap:.04rem!important;min-width:0!important;margin:0!important;
}
html body.dashboard-page .dashboard-topbar .dashboard-nav-wrap .nav-links>a,
html body.dashboard-page .dashboard-topbar .dashboard-nav-wrap .nav-dropdown>.drop-title{
  box-sizing:border-box!important;min-height:32px!important;margin:0!important;padding:.34rem .40rem!important;
  font-size:.75rem!important;line-height:1.12!important;white-space:nowrap!important;
}
html body.dashboard-page .dashboard-topbar .quick-metrics{
  display:flex!important;align-items:center!important;flex:0 0 auto!important;flex-wrap:nowrap!important;gap:.24rem!important;
  margin:0 0 0 auto!important;padding:0!important;white-space:nowrap!important;
}
html body.dashboard-page .dashboard-topbar .quick-metric{white-space:nowrap!important;flex:0 0 auto!important}
html body.dashboard-page .dashboard-topbar .dashboard-tools{
  display:flex!important;align-items:center!important;align-content:center!important;justify-content:flex-end!important;
  flex:0 0 auto!important;flex-wrap:nowrap!important;gap:.30rem!important;margin:0!important;padding:0!important;min-width:0!important;
}
html body.dashboard-page .dashboard-topbar .dashboard-tools .theme-picker{
  display:flex!important;align-items:center!important;flex:0 0 auto!important;flex-wrap:nowrap!important;gap:.14rem!important;
  max-width:none!important;overflow:visible!important;padding:.23rem .28rem!important;margin:0!important;
}
html body.dashboard-page .dashboard-topbar .dashboard-tools .theme-picker-label{
  padding:0 .12rem!important;font-size:.67rem!important;white-space:nowrap!important;
}
html body.dashboard-page .dashboard-topbar .dashboard-tools .theme-choice{
  flex:0 0 auto!important;min-height:29px!important;padding:.31rem .43rem!important;font-size:.69rem!important;white-space:nowrap!important;
}
html body.dashboard-page .dashboard-topbar .dashboard-tools .current-time{
  display:inline-flex!important;flex:0 0 auto!important;width:auto!important;min-height:29px!important;margin:0!important;
  padding:.31rem .55rem!important;font-size:.69rem!important;line-height:1.1!important;white-space:nowrap!important;text-align:center!important;
}
html body.dashboard-page .dashboard-topbar .dashboard-tools .btn-outline{
  flex:0 0 auto!important;min-height:29px!important;padding:.31rem .55rem!important;font-size:.70rem!important;white-space:nowrap!important;
}

@media (max-width:1500px){
  html body.dashboard-page .dashboard-topbar{gap:.18rem!important;padding-left:.42rem!important;padding-right:.42rem!important}
  html body.dashboard-page .dashboard-topbar .dashboard-nav-wrap{flex:1 1 auto!important;min-width:250px!important}
  html body.dashboard-page .dashboard-topbar .dashboard-nav-wrap>.nav-links{
    flex-wrap:wrap!important;row-gap:.06rem!important;column-gap:.02rem!important;
  }
  html body.dashboard-page .dashboard-topbar .dashboard-nav-wrap .nav-links>a,
  html body.dashboard-page .dashboard-topbar .dashboard-nav-wrap .nav-dropdown>.drop-title{
    padding-left:.31rem!important;padding-right:.31rem!important;font-size:.71rem!important;
  }
  html body.dashboard-page .dashboard-topbar .quick-metrics{margin-left:0!important;gap:.14rem!important}
  html body.dashboard-page .dashboard-topbar .dashboard-tools{gap:.18rem!important}
  html body.dashboard-page .dashboard-topbar .dashboard-tools .theme-picker-label{display:none!important}
  html body.dashboard-page .dashboard-topbar .dashboard-tools .theme-choice{
    padding-left:.36rem!important;padding-right:.36rem!important;font-size:.67rem!important;
  }
  html body.dashboard-page .dashboard-topbar .dashboard-tools .current-time{
    padding-left:.45rem!important;padding-right:.45rem!important;font-size:.66rem!important;
  }
}

@media (max-width:1100px){
  html body.dashboard-page .dashboard-topbar{flex-wrap:wrap!important;row-gap:.20rem!important}
  html body.dashboard-page .dashboard-topbar .dashboard-brand{order:1!important}
  html body.dashboard-page .dashboard-topbar .dashboard-nav-wrap{
    order:2!important;flex:1 1 calc(100% - 48px)!important;min-width:0!important;
  }
  html body.dashboard-page .dashboard-topbar .dashboard-nav-wrap>.nav-links{flex-wrap:wrap!important}
  html body.dashboard-page .dashboard-topbar .quick-metrics{order:3!important;margin-left:auto!important}
  html body.dashboard-page .dashboard-topbar .dashboard-tools{order:4!important}
}

@media (max-width:680px){
  html body.dashboard-page .dashboard-topbar .quick-metrics{margin-left:0!important}
  html body.dashboard-page .dashboard-topbar .dashboard-tools{
    flex:1 1 auto!important;flex-wrap:wrap!important;justify-content:flex-end!important;
  }
  html body.dashboard-page .dashboard-topbar .dashboard-tools .theme-picker{max-width:100%!important;overflow:auto!important}
}
/* DASHBOARD_NAV_EXACT_V2_20260814_END */
