/* REV unified white/blue app shell – phase 1.
   Visual-only layer: no HTML selectors are used to hide features or intercept touches.
   Loaded last to harmonize legacy per-page styles. */
:root{
  color-scheme:light;
  --rev-ui-blue:#2563eb;--rev-ui-blue-pressed:#1d4ed8;
  --rev-ui-ink:#172b4d;--rev-ui-muted:#64748b;--rev-ui-border:#dce5f2;
  --rev-ui-surface:#fff;--rev-ui-subtle:#f5f8fd;
  --rev-ui-shadow:0 8px 28px rgba(23,43,77,.08);
  --teal:#2563eb;--teal-dark:#1d4ed8;--teal-deep:#1744a0;
  --teal-soft:#eff6ff;--teal-softer:#f5f8ff;
}
html{color-scheme:light;background:#fff}
body{background:#fff;color:var(--rev-ui-ink);font-family:Vazirmatn,Vazir,Tahoma,sans-serif}
button,input,select,textarea{font-family:inherit}
:where(button,a,input,select,textarea):focus-visible{outline:3px solid rgba(37,99,235,.45);outline-offset:2px}
:where(.card,.panel,.list-card,.metric,.metric-card,.ob-card,.dp-tabs,.map-shell,.evp-card){
  background:var(--rev-ui-surface);border-color:var(--rev-ui-border);
  border-radius:18px;box-shadow:var(--rev-ui-shadow);
}
:where(input:not([type=checkbox]):not([type=radio]),select,textarea){
  border-radius:12px;border-color:var(--rev-ui-border);color:var(--rev-ui-ink);
}
:where(.btn-primary,.primary-btn,button.primary,.btn.primary,.route-submit,#planGo,#obSend,#obVerify){
  background:var(--rev-ui-blue);border-color:var(--rev-ui-blue);color:#fff;
}
:where(.btn-primary,.primary-btn,button.primary,.btn.primary,.route-submit,#planGo,#obSend,#obVerify):hover{
  background:var(--rev-ui-blue-pressed);border-color:var(--rev-ui-blue-pressed);
}
:where(.bottom-nav,.dp-tabs){background:#fff;border-color:var(--rev-ui-border)}
:where(.bottom-nav a.active,.bottom-nav a[aria-current=page],.dp-tabs button.active){
  color:var(--rev-ui-blue);background:#eff6ff;
}
:where(.avatar,.user-avatar,.icon-btn,.quick-card .ico,.row-item .ico){
  border-color:#dbeafe;
}
:where(.service-tabs a.active,.detail-tab[aria-selected=true],.chip.active){
  color:var(--rev-ui-blue);border-color:#bfdbfe;background:#eff6ff;
}
:where(.actions button,.actions select,.filter-btn){min-height:42px}
:where(.btn,.btn-primary,.btn-light,.btn-danger,.primary-btn){min-height:44px}
:where(.head,.app-header){background:rgba(255,255,255,.97);border-color:var(--rev-ui-border)}
:where(.title,.page-title,.head-title){color:var(--rev-ui-ink)}
:where(.muted,.page-sub,.sub){color:var(--rev-ui-muted)}
/* Preserve emergency red, charging connector statuses, and station pin semantic colors. */
@media(max-width:700px){
  :where(.wrap){max-width:560px}
  :where(.card,.panel,.evp-card){border-radius:16px}
  :where(.bottom-nav a){min-height:52px}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

/* REV visibly redesigned 2026-10-27: navigation-first, white/blue surfaces.
   Preserve existing handlers, accessible labels and semantic status markers. */
body:has(#hybHomeCard) main.wrap{display:flex;flex-direction:column;gap:16px}
body:has(#hybHomeCard) #hybHomeCard{order:-5;background:#f5f8ff!important;border:1px solid #dbe7ff!important;border-radius:28px!important;padding:18px!important;box-shadow:0 18px 34px rgba(37,99,235,.1)!important}
body:has(#hybHomeCard) main.wrap>.hero-card{order:15;background:#fff!important;color:#172b4d!important;border:1px solid #e1e9f5!important;border-radius:24px!important;box-shadow:0 8px 26px rgba(23,43,77,.06)!important}
body:has(#hybHomeCard) main.wrap>.hero-card :is(h1,h2,p,.eyebrow){color:#172b4d!important}
body:has(#hybHomeCard) .hyb-go{background:#2563eb!important;color:#fff!important;border:0!important;border-radius:16px!important;min-height:52px!important}
body:has(#hybHomeCard) .hyb-ring{box-shadow:0 0 0 5px #e8f0ff}
body:has(#hybHomeCard) .quick-grid{gap:12px}
body:has(#hybHomeCard) .quick-card{border:1px solid #dbe7f4!important;border-radius:20px!important;box-shadow:0 8px 24px rgba(23,43,77,.06)!important;padding:16px 8px!important}
body:has(#hybHomeCard) .quick-card .ico{background:#eff6ff!important;color:#2563eb!important;border-radius:16px!important}
.bottom-nav .tabs{max-width:520px}
.bottom-nav .tabs>a{font-size:0!important;line-height:0!important;gap:0!important;min-height:56px!important;border-radius:16px!important}
.bottom-nav .tabs>a svg{width:25px!important;height:25px!important;flex:none}
.bottom-nav .tabs>a.active,.bottom-nav .tabs>a[aria-current=page]{background:#eaf1ff!important;color:#2563eb!important}
.bottom-nav{background:#fff!important;border-top:1px solid #dbe5f2!important;box-shadow:0 -8px 24px rgba(23,43,77,.07)!important}
#routePanel,.map-search-form,#details-panel:not([hidden]){border-radius:24px!important;box-shadow:0 16px 40px rgba(23,43,77,.13)!important}
@media(max-width:480px){
 body:has(#hybHomeCard) main.wrap{gap:12px}
 body:has(#hybHomeCard) #hybHomeCard{margin-top:6px!important}
 .bottom-nav .tabs>a{min-height:52px!important}
}
