/* A.I.C. R80: scoped UI changes. Loaded after shared/route styles. */
/* The shared exit is rendered only when the authenticated proxy session is active. */
:where(html.aic-layout-refactor) .r80-impersonation-exit { width:100%; flex:0 0 auto; margin-top:auto; padding:10px 0 4px; border-top:1px solid #e2e8f0; }
:where(html.aic-layout-refactor) .r80-impersonation-exit__form { width:100%; margin:0; }
:where(html.aic-layout-refactor) .r80-impersonation-exit__button { width:100%; min-width:0; min-height:44px; padding:8px; display:flex; align-items:center; justify-content:center; gap:7px; border:1px solid #cbd5e1; border-radius:10px; background:#fff; color:#374151; font:inherit; font-size:12px; font-weight:700; cursor:pointer; }
:where(html.aic-layout-refactor) .r80-impersonation-exit__button:hover { background:#f8fafc; border-color:#94a3b8; }
:where(html.aic-layout-refactor) .r80-impersonation-exit__button:focus-visible { outline:2px solid #476a92; outline-offset:2px; }
:where(html.aic-layout-refactor) .app-sidebar__inner > .r80-impersonation-exit { margin-top:0; }
:where(html.aic-layout-refactor) .app-sidebar__inner:has(> .r80-impersonation-exit) > .app-sidebar__bottom { margin-top:0; }
:where(html.aic-layout-refactor) .dashboard-mini-sidebar__inner > .r80-impersonation-exit { margin-top:auto; width:100%; }
@media (min-width:1025px) {
  :where(html.aic-layout-refactor) body.sidebar-collapsed .app-sidebar__inner > .r80-impersonation-exit { padding:7px 0; }
  :where(html.aic-layout-refactor) body.sidebar-collapsed .app-sidebar__inner > .r80-impersonation-exit .r80-impersonation-exit__text { display:none; }
  :where(html.aic-layout-refactor) body.sidebar-collapsed .app-sidebar__inner > .r80-impersonation-exit .r80-impersonation-exit__button { width:44px; max-width:100%; padding:8px; }
  :where(html.aic-layout-refactor) body.aic-my-pc-sidebar #myDesktopSidebar .dashboard-mini-sidebar__inner { display:flex; flex-direction:column; }
  :where(html.aic-layout-refactor) body.aic-my-pc-sidebar #myDesktopSidebar .dashboard-mini-sidebar__nav { flex:1 1 auto; min-height:0; }
}
@media (max-width:1024px) {
  :where(html.aic-layout-refactor) .dashboard-mini-sidebar__inner > .r80-impersonation-exit { margin-top:4px; padding-bottom:max(8px,env(safe-area-inset-bottom,0px)); }
}
/* Report actions: same existing button system, no separate submit forms. */
:where(html.aic-layout-refactor) .reports-new-page .r80-report-hero-actions { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
:where(html.aic-layout-refactor) .reports-new-page .r80-report-desktop-menu { display:block; }
:where(html.aic-layout-refactor) .reports-new-page .r80-report-mobile-actions { display:none; }
:where(html.aic-layout-refactor) .reports-new-page .report-card,
:where(html.aic-layout-refactor) .reports-new-page .card,
:where(html.aic-layout-refactor) .reports-new-page .subcard,
:where(html.aic-layout-refactor) .reports-new-page .row,
:where(html.aic-layout-refactor) .reports-new-page .totals-wrap { background:#fff; }
:where(html.aic-layout-refactor) .reports-new-page .input:not(.input--plain-readonly),
:where(html.aic-layout-refactor) .reports-new-page select.input,
:where(html.aic-layout-refactor) .reports-new-page textarea.input,
:where(html.aic-layout-refactor) .reports-new-page .mini-input,
:where(html.aic-layout-refactor) .reports-new-page .mini-display,
:where(html.aic-layout-refactor) .reports-new-page .picker-trigger { background:#fff; }
@media (max-width:767px) {
  :where(html.aic-layout-refactor) .reports-new-page .r80-report-desktop-menu { display:none; }
  :where(html.aic-layout-refactor) .reports-new-page .r80-report-mobile-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-top:12px; padding-bottom:8px; }
  :where(html.aic-layout-refactor) .reports-new-page .r80-report-mobile-actions__button { display:flex; width:100%; min-width:0; min-height:44px; align-items:center; justify-content:center; gap:5px; padding:9px 5px; font-size:clamp(11px,3vw,13px); white-space:nowrap; }
  :where(html.aic-layout-refactor) .reports-new-page .repnew-vertical { padding-bottom:calc(12px + env(safe-area-inset-bottom,0px)); }
}
/* Detailed waybill only: remove hero shell without affecting global Hero. */
:where(html.aic-layout-refactor) .driver-detail-page .r80-detail-hero { background:transparent; border:0; box-shadow:none; padding:6px 0 10px; border-radius:0; margin-bottom:4px; }
:where(html.aic-layout-refactor) .driver-detail-page .r80-detail-hero .ui-hero__top { align-items:center; }
:where(html.aic-layout-refactor) .driver-detail-page .detail-section,
:where(html.aic-layout-refactor) .driver-detail-page .detail-section__header { background:#fff; }
/* New dispatch: no pills around count, no hidden mobile count. */
:where(html.aic-layout-refactor) .dashboard-page .card__count,
:where(html.aic-layout-refactor) .dashboard-page .dispatch-group__count { border:0; background:transparent; box-shadow:none; border-radius:0; min-height:0; height:auto; padding:0; display:inline; line-height:1.4; }
:where(html.aic-layout-refactor) .dashboard-page .r80-today-header-actions { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:8px; min-width:0; margin-left:auto; }
:where(html.aic-layout-refactor) .dashboard-page .r80-today-link { display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:38px; padding:7px 10px; white-space:nowrap; }
:where(html.aic-layout-refactor) .dashboard-page #today-driver-dispatches { scroll-margin-top:24px; min-width:0; }
:where(html.aic-layout-refactor) .dashboard-page .r80-today-dispatches__empty { padding:12px 4px; color:#64748b; font-size:12px; }
@media (max-width:375px) {
  :where(html.aic-layout-refactor) .dashboard-page .card__head { flex-wrap:wrap; }
  :where(html.aic-layout-refactor) .dashboard-page .r80-today-header-actions { width:100%; }
}
/* Auth/onboarding screens intentionally have no sidebar: keep audited exit reachable. */
:where(html.aic-layout-refactor) body.auth-shell .r80-impersonation-auth-exit { position:fixed; left:50%; bottom:calc(12px + env(safe-area-inset-bottom,0px)); transform:translateX(-50%); width:min(320px,calc(100vw - 24px)); z-index:1050; }
:where(html.aic-layout-refactor) body.auth-shell .r80-impersonation-auth-exit .r80-impersonation-exit { margin:0; padding:0; border:0; }
:where(html.aic-layout-refactor) body.auth-shell .r80-impersonation-auth-exit .r80-impersonation-exit__button { box-shadow:0 2px 14px rgba(15,23,42,.2); }
