/* tabs.css */
/* assets/css/tabs.css - Navegación interna de página (estilo Vercel/Linear): texto, línea inferior que se desliza, sin píldoras.
   Un único componente para .section-tabs (sub-páginas de sección), .calc-tabs (calculadora, rankings) y .rutas-tabs. */
.section-tabs, .calc-tabs, .rutas-tabs {
  --fl: 0px; --fr: 0px;
  position: relative; display: flex; align-items: stretch; gap: clamp(1.1rem, 0.7rem + 1.6vw, 1.9rem);
  width: 100%; max-width: none; margin: 0.35rem 0 0 !important; padding: 0 !important;
  border: 0 !important; border-radius: 0 !important; background: none !important;
  box-shadow: inset 0 -1px 0 var(--border) !important;
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--fl), #000 calc(100% - var(--fr)), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 var(--fl), #000 calc(100% - var(--fr)), transparent 100%);
}
.section-tabs::-webkit-scrollbar, .calc-tabs::-webkit-scrollbar, .rutas-tabs::-webkit-scrollbar { display: none; }
/* Se coloca bajo el título al cargar; hasta entonces no ocupa sitio */
.section-tabs[data-relocate] { visibility: hidden; height: 0; min-height: 0; margin: 0 !important; }

.section-tabs a, .calc-tabs a, .rutas-tabs a {
  position: relative; z-index: 1; flex: none; display: inline-flex; flex-direction: row; align-items: center; gap: 0.4rem;
  min-height: 2.9rem; padding: 0 0.1rem !important; margin: 0;
  border: 0 !important; border-radius: 0 !important; background: none !important; box-shadow: none !important;
  font-family: var(--font-display); font-weight: 560; font-size: 0.92rem !important; letter-spacing: -0.005em; white-space: nowrap; text-decoration: none;
  color: var(--muted-foreground) !important;
  transition: color 0.22s var(--ease-out);
}
.section-tabs a svg:not(.nav-badge svg), .calc-tabs a svg, .rutas-tabs a svg, .calc-tabs a i { display: none; }
@media (hover: hover) {
  .section-tabs a:hover, .calc-tabs a:hover, .rutas-tabs a:hover { color: color-mix(in srgb, var(--foreground) 80%, var(--muted-foreground)) !important; }
}
.section-tabs a:active, .calc-tabs a:active, .rutas-tabs a:active { transform: none; }
.section-tabs a.is-active, .calc-tabs a.is-active, .rutas-tabs a.is-active { color: var(--foreground) !important; }
.section-tabs a:focus-visible, .calc-tabs a:focus-visible, .rutas-tabs a:focus-visible { outline: 2px solid rgb(var(--a-500)); outline-offset: -2px; border-radius: 0.4rem !important; }

/* Línea deslizante */
.section-tabs .tab-indicator, .calc-tabs .tab-indicator, .rutas-tabs .tab-indicator {
  position: absolute; left: 0; top: auto !important; bottom: 0; height: 2px; border-radius: 2px 2px 0 0 !important;
  background: var(--foreground) !important; box-shadow: none !important;
}
/* Sin JS: la pestaña activa lleva su propia línea */
.section-tabs:not(.has-indicator) a.is-active, .calc-tabs:not(.has-indicator) a.is-active, .rutas-tabs:not(.has-indicator) a.is-active { box-shadow: inset 0 -2px 0 var(--foreground) !important; }

.nav-badge { margin-left: 0.1rem; }
@media (prefers-reduced-motion: reduce) { .section-tabs a, .calc-tabs a, .rutas-tabs a { transition: none; } }
/* qa.css */
/* assets/css/qa.css - Correcciones de QA: zonas táctiles, apilado de desplegables y contraste. Se carga el último. */

/* Zonas táctiles: el elemento se queda igual de grande a la vista, pero el área pulsable llega a ~44px */
.hub-card-title a, .hub-inline-link, .dash-link, .fuel-more-types, .fuel-sim-btn, .dash-fuel-tag { position: relative; }
.hub-card-title a::after, .hub-inline-link::after, .dash-link::after, .fuel-more-types::after, .fuel-sim-btn::after, .dash-fuel-tag::after, .fuel-dot::after {
  content: ''; position: absolute; inset: 50% auto auto 50%; width: max(100%, 44px); height: 44px; transform: translate(-50%, -50%);
}
.fuel-dot::after { width: 44px; }
@media (pointer: coarse), (max-width: 47.99rem) {
  .dash-head select, select[data-autosubmit] { min-height: 2.75rem; }
  [data-view] { min-height: 2.75rem; min-width: 2.75rem; }
}

/* Pestañas: el área pulsable incluye un margen lateral (la línea sigue exactamente el ancho del enlace) */
.section-tabs a, .calc-tabs a, .rutas-tabs a { padding: 0 0.55rem !important; }
.section-tabs, .calc-tabs, .rutas-tabs { gap: 0.15rem; margin-left: -0.55rem !important; width: calc(100% + 0.55rem); }

/* Desplegables siempre por encima de lo que tienen debajo */
.rf-pick[open] { z-index: 45; }
.gv-card:has(.gv-menu[open]) { z-index: 30; }
.gv-menu[open] { z-index: 31; }

/* Cabeceras antiguas en móvil: en columna se alinean a la izquierda a todo el ancho (antes quedaban pegadas a la derecha) */
@media (max-width: 39.99rem) { .page-header, .page-header.card { align-items: stretch; } }

/* Las hojas de la página viven dentro de <main> (z-index 10): con una abierta, la barra inferior pasa por debajo */
html.fuel-sheet-lock .bottom-nav, body:has(.fuel-sheet:not([hidden])) .bottom-nav { z-index: 5; }
/* explore.css */
/* Vista pública de gasolineras (invitados): mapa + buscador/chips flotantes + lista compacta y ficha.
   Patrón de Google Maps / GasBuddy. Escritorio: panel a la izquierda. Móvil y tableta: cajón inferior con tres alturas. */

.is-explore .app-main { padding: 0; }
.is-explore .app-content { max-width: none; padding: 0; }

.ex { position: fixed; z-index: 1; inset: var(--mobile-bar-h, 3.5rem) 0 calc(4rem + env(safe-area-inset-bottom)) 0; overflow: hidden; }
@media (min-width: 48rem) { .ex { inset: 0 0 0 16rem; } }

/* ---------- Mapa ---------- */
.ex-map { position: absolute; inset: 0; z-index: 0; isolation: isolate; }
.ex-map #exMap { width: 100%; height: 100%; background: var(--card-sunken, #e9eef2); }
.dark .ex-map .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(0.9) contrast(0.9); }
.ex .leaflet-control-zoom { border: 0; border-radius: 0.9rem; overflow: hidden; margin: 0 1.1rem 1.2rem 0; box-shadow: 0 0 0 1px var(--border), 0 10px 26px -12px rgb(0 0 0 / 0.55); }
.ex .leaflet-control-zoom a { width: 2.4rem; height: 2.4rem; line-height: 2.4rem; border: 0; color: var(--foreground); background: color-mix(in srgb, var(--card) 86%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.ex .leaflet-control-attribution { background: color-mix(in srgb, var(--card) 72%, transparent); color: var(--muted-foreground); font-size: 0.62rem; border-radius: 0.5rem 0 0 0; }
.ex .leaflet-control-attribution a { color: inherit; }
@media (max-width: 63.99rem) { .ex .leaflet-control-zoom { display: none; } }

/* Marcadores: píldora blanca con el color de la marca y el precio; la elegida se agranda y toma el color de acento */
.is-explore .fuel-marker { display: inline-flex; align-items: center; gap: 0.36rem; padding: 0.3rem 0.62rem 0.3rem 0.48rem; border-radius: 999px; font: 800 0.8rem/1 var(--font-body); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; color: #11151a; background: rgb(255 255 255 / 0.95); border: 1px solid rgb(0 0 0 / 0.08); box-shadow: 0 1px 2px rgb(0 0 0 / 0.18), 0 6px 14px -4px rgb(0 0 0 / 0.4); transform: translate(-50%, -50%); transition: transform 0.22s var(--ease-out), background-color 0.2s, color 0.2s, box-shadow 0.2s; }
.is-explore .fuel-marker .fm-dot { flex: none; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--brand, #9aa3ad); box-shadow: 0 0 0 1.5px rgb(255 255 255 / 0.9), 0 0 0 2.5px rgb(0 0 0 / 0.08); }
.is-explore .fuel-marker.is-cheapest { box-shadow: 0 0 0 2px #1f8f5f, 0 6px 14px -4px rgb(0 0 0 / 0.4); }
.is-explore .fuel-marker.is-active { transform: translate(-50%, -50%) scale(1.1); color: #fff; background: rgb(var(--a-500)); border-color: transparent; box-shadow: 0 0 0 2px #fff, 0 12px 26px -6px rgb(var(--a-500) / 0.75); z-index: 2; }
.is-explore .fuel-marker.is-active .fm-dot { box-shadow: 0 0 0 1.5px #fff; }
@media (max-width: 63.99rem) { .is-explore .fuel-marker { padding: 0.26rem 0.55rem 0.26rem 0.42rem; font-size: 0.74rem; } }

/* ---------- Capa superior: buscador y chips ---------- */
.ex-col { display: contents; }
.ex-top { position: absolute; z-index: 7; top: 0.6rem; left: 0.6rem; right: 0.6rem; }
@media (min-width: 48rem) and (max-width: 63.99rem) { .ex-top { right: 17.25rem; } } /* deja libre el botón de acceso */

.ex-search { position: relative; z-index: 2; display: flex; align-items: center; gap: 0.25rem; height: 3rem; padding: 0 0.35rem 0 1rem; border-radius: 999px; background: color-mix(in srgb, var(--card) 94%, transparent); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); box-shadow: 0 0 0 1px var(--border), 0 12px 30px -14px rgb(0 0 0 / 0.5); transition: box-shadow 0.2s var(--ease-out); }
.ex-search:focus-within { box-shadow: 0 0 0 2px rgb(var(--a-500)), 0 14px 34px -14px rgb(0 0 0 / 0.55); }
.ex-search-ico { flex: none; width: 1.1rem; height: 1.1rem; color: var(--muted-foreground); margin-right: 0.35rem; }
.ex-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--foreground); font: 500 0.95rem/1 var(--font-body); }
.ex-search input::placeholder { color: var(--muted-foreground); }
.ex-search input::-webkit-search-cancel-button { display: none; }
.ex-locate { flex: none; width: 2.4rem; height: 2.4rem; display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer; background: transparent; color: rgb(var(--a-500)); transition: background-color 0.16s, scale 0.16s var(--ease-out); }
.ex-locate:hover { background: rgb(var(--a-500) / 0.12); } .ex-locate:active { scale: 0.92; }
.ex-locate.is-loading svg { animation: exSpin 0.9s linear infinite; }
@keyframes exSpin { to { transform: rotate(360deg); } }
.ex-search:focus-within .ex-search-ico { color: rgb(var(--a-500)); }

.ex-place-list { position: absolute; z-index: 9; top: calc(100% + 0.45rem); left: 0; right: 0; max-height: 17rem; overflow: auto; margin: 0; padding: 0.35rem; list-style: none; border-radius: 1.1rem; background: var(--card); box-shadow: 0 0 0 1px var(--border-strong), 0 24px 50px -20px rgb(0 0 0 / 0.55); }
.ex-place-list li { display: flex; align-items: center; gap: 0.7rem; padding: 0.6rem 0.7rem; border-radius: 0.75rem; cursor: pointer; outline: 0; }
.ex-place-list li:hover, .ex-place-list li:focus { background: var(--muted); }
.ex-place-list svg { flex: none; color: var(--muted-foreground); }
.ex-place-list strong { display: block; font-size: 0.92rem; } .ex-place-list small { color: var(--muted-foreground); font-size: 0.76rem; }
.ex-place-empty { color: var(--muted-foreground); font-size: 0.85rem; cursor: default !important; }

.ex-chips { display: flex; align-items: center; gap: 0.4rem; margin-top: 0.55rem; padding: 2px 2px 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.ex-chips::-webkit-scrollbar { display: none; }
.ex-chip { flex: none; display: inline-flex; align-items: center; gap: 0.3rem; height: 2.2rem; padding: 0 0.9rem; border: 0; border-radius: 999px; cursor: pointer; white-space: nowrap; font: 600 0.82rem/1 var(--font-body); color: var(--foreground); background: color-mix(in srgb, var(--card) 94%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 0 0 1px var(--border), 0 6px 16px -10px rgb(0 0 0 / 0.5); transition: background-color 0.16s, color 0.16s, box-shadow 0.16s, scale 0.16s var(--ease-out); }
.ex-chip:active { scale: 0.96; }
.ex-chip[aria-checked='true'] { background: rgb(var(--a-500)); color: #fff; box-shadow: 0 1px 2px rgb(var(--a-700) / 0.5), 0 8px 18px -8px rgb(var(--a-500) / 0.8); }
.ex-chip.is-set { box-shadow: 0 0 0 1.5px rgb(var(--a-500)); color: rgb(var(--a-500)); }
.ex-chip-menu svg { opacity: 0.6; transition: transform 0.2s var(--ease-out); }
.ex-chip-menu[aria-expanded='true'] svg { transform: rotate(180deg); }
.ex-chip-sep { flex: none; width: 1px; height: 1.2rem; background: var(--border-strong); margin: 0 0.1rem; }
@media (hover: hover) { .ex-chip:not([aria-checked='true']):hover { background: var(--card); box-shadow: 0 0 0 1px var(--border-strong), 0 8px 18px -10px rgb(0 0 0 / 0.55); } }
.ex-chip:focus-visible, .ex-btn:focus-visible, .ex-row:focus-visible, .ex-back:focus-visible, .ex-pop button:focus-visible, .ex-locate:focus-visible { outline: 2px solid rgb(var(--a-500)); outline-offset: 2px; }

.ex-pop { position: absolute; z-index: 10; max-height: 17rem; overflow: auto; padding: 0.3rem; border-radius: 1.1rem; background: var(--card); box-shadow: 0 0 0 1px var(--border-strong), 0 24px 50px -20px rgb(0 0 0 / 0.55); }
.ex-pop[hidden] { display: none; }
.ex-pop button { width: 100%; display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 0.7rem; border: 0; border-radius: 0.75rem; background: none; text-align: left; cursor: pointer; font: 500 0.88rem/1.2 var(--font-body); color: var(--foreground); }
.ex-pop button span { flex: 1; } .ex-pop button:hover { background: var(--muted); }
.ex-pop button[aria-checked='true'] { font-weight: 700; color: rgb(var(--a-500)); }

/* ---------- Cajón / panel ---------- */
.ex-sheet { position: absolute; z-index: 5; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; border-radius: 1.5rem 1.5rem 0 0; background: color-mix(in srgb, var(--card) 95%, transparent); -webkit-backdrop-filter: blur(22px) saturate(1.4); backdrop-filter: blur(22px) saturate(1.4); box-shadow: 0 -1px 0 var(--border), 0 -20px 50px -22px rgb(0 0 0 / 0.5); will-change: transform; }
/* Antes de que el JS mida y coloque el cajón (carga diferida) ocupa ya la altura de "medio": sin salto al arrancar */
@media (max-width: 63.99rem) { .ex-sheet:not([data-snap]) { height: 28%; } }
.ex-sheet-head { flex: none; padding: 0.15rem 1rem 0.7rem; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.ex-grab { display: block; width: 100%; height: 1.3rem; padding: 0; border: 0; background: none; cursor: grab; }
.ex-grab span { display: block; width: 2.6rem; height: 4px; margin: 0.55rem auto 0; border-radius: 4px; background: var(--border-strong); }
.ex-sum { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.35rem 0.7rem; min-height: 1.6rem; }
.ex-sum-main { font-size: 0.9rem; color: var(--muted-foreground); white-space: nowrap; } .ex-sum-main strong, .ex-sum-main b { color: var(--foreground); font-variant-numeric: tabular-nums; }
.ex-live { flex: none; display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.25rem 0.6rem; border-radius: 999px; font-size: 0.72rem; font-weight: 600; color: var(--muted-foreground); background: var(--muted); }
.ex-live { border: 0; cursor: pointer; font-family: inherit; transition: background-color 0.15s, scale 0.15s var(--ease-out); }
.ex-live:hover:not(:disabled) { background: var(--border-strong); } .ex-live:active:not(:disabled) { scale: 0.96; }
.ex-live:disabled { cursor: default; } .ex-live:focus-visible { outline: 2px solid rgb(var(--a-500)); outline-offset: 2px; }
.ex-live-ico { opacity: 0.6; } .ex-live.is-busy .ex-live-ico { animation: exSpin 0.8s linear infinite; }
.ex-live i { width: 0.45rem; height: 0.45rem; border-radius: 50%; background: #1f8f5f; }
.ex-live.is-old i { background: #d49a1c; } .ex-live.is-stale i { background: #d4493c; }
.ex-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 0.5rem calc(1rem + env(safe-area-inset-bottom)); scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }

/* Escritorio: panel docked a la izquierda con buscador arriba (como Google Maps) */
@media (min-width: 64rem) {
  .ex-col { position: absolute; z-index: 6; top: 0; left: 0; bottom: 0; width: clamp(22rem, 30vw, 26rem); display: flex; flex-direction: column; background: color-mix(in srgb, var(--card) 90%, transparent); -webkit-backdrop-filter: blur(24px) saturate(1.5); backdrop-filter: blur(24px) saturate(1.5); box-shadow: 1px 0 0 var(--border), 24px 0 60px -34px rgb(0 0 0 / 0.55); }
  .ex-top { position: relative; z-index: 7; top: auto; left: auto; right: auto; flex: none; padding: 1rem 1rem 0.35rem; }
  .ex-search { box-shadow: 0 0 0 1px var(--border-strong); background: var(--card); }
  .ex-sheet { position: relative; z-index: auto; flex: 1; min-height: 0; height: auto !important; transform: none !important; border-radius: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; will-change: auto; }
  .ex-sheet-head { padding: 0.35rem 1.2rem 0.6rem; cursor: default; touch-action: auto; }
  .ex-grab { display: none; }
  .ex-body { padding: 0 0.6rem 1rem; }
  .ex-chips { margin-top: 0.6rem; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 1.6rem), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 1.6rem), transparent); }
  .ex-chip { background: var(--card); backdrop-filter: none; -webkit-backdrop-filter: none; }
}

/* ---------- Lista compacta ---------- */
.ex-list { display: grid; }
.ex-row { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.8rem; padding: 0.75rem 0.6rem; border: 0; border-radius: 1rem; background: none; text-align: left; cursor: pointer; color: inherit; transition: background-color 0.15s, scale 0.15s var(--ease-out); }
.ex-row + .ex-row { box-shadow: 0 -1px 0 var(--border); }
.ex-row:active { scale: 0.99; }
@media (hover: hover) { .ex-row:hover { background: var(--muted); } }
.ex-row.is-selected { background: rgb(var(--a-500) / 0.1); }
.ex-row-main { min-width: 0; display: grid; gap: 0.1rem; }
.ex-row-main strong { font: 700 0.95rem/1.25 var(--font-display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-row-main small { color: var(--muted-foreground); font-size: 0.78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-best { justify-self: start; margin-top: 0.2rem; padding: 0.12rem 0.5rem; border-radius: 999px; font: 700 0.66rem/1.4 var(--font-body); font-style: normal; letter-spacing: 0.02em; color: #14633f; background: rgb(31 143 95 / 0.16); }
.dark .ex-best { color: #6fe0ac; }
.ex-row-price { display: grid; grid-template-columns: auto auto; align-items: baseline; justify-items: end; column-gap: 0.25rem; }
.ex-row-price b { font: 800 1.2rem/1 var(--font-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ex-row-price small { color: var(--muted-foreground); font-size: 0.7rem; }
.ex-dot { grid-column: 1 / -1; margin-top: 0.4rem; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: #d49a1c; }
.ex-dot.is-low { background: #1f8f5f; } .ex-dot.is-high { background: #d4493c; }
.ex-more { margin: 0.6rem auto 0.4rem; display: block; padding: 0.7rem 1.2rem; border: 0; border-radius: 999px; background: var(--muted); font: 600 0.86rem var(--font-body); color: var(--foreground); cursor: pointer; }
.ex-foot { margin: 0.9rem 0.7rem 0; font-size: 0.72rem; line-height: 1.45; color: var(--muted-foreground); }

/* ---------- Ficha de la estación ---------- */
.ex-detail { padding: 0.2rem 0.7rem 0.5rem; display: grid; gap: 1rem; }
.ex-back { justify-self: start; display: inline-flex; align-items: center; gap: 0.4rem; min-height: 2.5rem; padding: 0 0.6rem 0 0.3rem; border: 0; border-radius: 999px; background: none; cursor: pointer; font: 600 0.84rem var(--font-body); color: var(--muted-foreground); }
@media (hover: hover) { .ex-back:hover { color: var(--foreground); background: var(--muted); } }
.ex-d-head { display: flex; align-items: center; gap: 0.9rem; }
.ex-d-head h2 { margin: 0; font: 800 1.2rem/1.2 var(--font-display); letter-spacing: -0.02em; text-wrap: balance; }
.ex-d-head p { margin: 0.2rem 0 0; color: var(--muted-foreground); font-size: 0.84rem; }
.ex-d-price { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.ex-d-price b { font: 800 2.7rem/1 var(--font-display); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.ex-d-price span { margin-left: 0.3rem; color: var(--muted-foreground); font-weight: 600; } .ex-d-price small { display: block; margin-top: 0.25rem; color: var(--muted-foreground); font-size: 0.78rem; }
.ex-tier { padding: 0.3rem 0.75rem; border-radius: 999px; font: 700 0.76rem/1.2 var(--font-body); color: #8a5b00; background: rgb(212 154 28 / 0.18); }
.ex-tier.is-low { color: #14633f; background: rgb(31 143 95 / 0.16); } .ex-tier.is-high { color: #9c2f24; background: rgb(212 73 60 / 0.16); }
.dark .ex-tier { color: #f0c36b; } .dark .ex-tier.is-low { color: #6fe0ac; } .dark .ex-tier.is-high { color: #ff9a8f; }
.ex-d-delta { margin: -0.4rem 0 0; font-size: 0.84rem; color: var(--muted-foreground); } .ex-d-delta strong { color: #1f8f5f; }
.ex-d-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ex-d-meta span { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.3rem 0.7rem; border-radius: 999px; background: var(--muted); font-size: 0.78rem; color: var(--muted-foreground); }
.ex-d-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.ex-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 2.9rem; padding: 0 1rem; border: 0; border-radius: 999px; cursor: pointer; text-decoration: none; font: 700 0.88rem/1 var(--font-display); color: var(--foreground); background: var(--muted); box-shadow: 0 0 0 1px var(--border); transition: background-color 0.16s, box-shadow 0.16s, scale 0.16s var(--ease-out); }
.ex-btn:active { scale: 0.97; }
@media (hover: hover) { .ex-btn:hover { background: var(--card); box-shadow: 0 0 0 1px var(--border-strong); } }
.ex-btn-primary { color: #fff; background: linear-gradient(135deg, rgb(var(--a-500)), rgb(var(--a-400))); box-shadow: 0 1px 2px rgb(var(--a-700) / 0.5), 0 10px 22px -10px rgb(var(--a-500) / 0.8), inset 0 1px 0 rgb(255 255 255 / 0.25); }
@media (hover: hover) { .ex-btn-primary:hover { background: linear-gradient(135deg, rgb(var(--a-500)), rgb(var(--a-400))); filter: brightness(1.06); box-shadow: 0 1px 2px rgb(var(--a-700) / 0.5), 0 14px 28px -10px rgb(var(--a-500) / 0.9), inset 0 1px 0 rgb(255 255 255 / 0.3); } }
.ex-lock { opacity: 0.55; }
.ex-d-title { margin: 0.2rem 0 -0.3rem; font: 700 0.72rem/1 var(--font-body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-foreground); }
.ex-d-prices { list-style: none; margin: 0; padding: 0; border-radius: 1rem; box-shadow: 0 0 0 1px var(--border); overflow: hidden; }
.ex-d-prices li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.7rem 0.9rem; font-size: 0.88rem; }
.ex-d-prices li + li { box-shadow: 0 -1px 0 var(--border); }
.ex-d-prices li strong { font-variant-numeric: tabular-nums; } .ex-d-prices li.is-on { background: rgb(var(--a-500) / 0.1); font-weight: 700; }

/* ---------- Estados ---------- */
.ex-state { padding: 1.4rem 1rem 1rem; text-align: center; display: grid; justify-items: center; gap: 0.55rem; }
.ex-state[hidden] { display: none; }
.ex-state h2 { margin: 0.2rem 0 0; font: 800 1.15rem/1.2 var(--font-display); } .ex-state p { margin: 0 0 0.4rem; max-width: 22rem; color: var(--muted-foreground); font-size: 0.9rem; text-wrap: pretty; }
.ex-state-ico { width: 3rem; height: 3rem; display: grid; place-items: center; border-radius: 1rem; color: rgb(var(--a-500)); background: rgb(var(--a-500) / 0.12); }
.ex-state.is-loading { padding: 0.3rem 0.4rem; justify-items: stretch; }
.ex-skel { height: 4.2rem; margin: 0.4rem 0.2rem; border-radius: 1rem; background: linear-gradient(100deg, var(--muted) 30%, color-mix(in srgb, var(--muted) 40%, transparent) 50%, var(--muted) 70%); background-size: 200% 100%; animation: exShimmer 1.3s linear infinite; }
@keyframes exShimmer { to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
  .ex-skel, .ex-locate.is-loading svg { animation: none; }
  .ex-chip, .ex-row, .ex-btn, .is-explore .fuel-marker, .ex-chip-menu svg { transition: none; }
}

/* display:grid/flex de los bloques no debe anular el atributo hidden */
.ex [hidden] { display: none !important; }

/* ---------- Contenido SEO (renderizado en servidor): migas, títulos, tablas y enlaces internos ---------- */
a.ex-row { text-decoration: none; }
.ex-row-main h3 { margin: 0; font: 700 0.95rem/1.25 var(--font-display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-intro { padding: 0.35rem 0.7rem 0.2rem; }
.ex-crumbs ol { list-style: none; margin: 0 0 0.35rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.15rem 0.35rem; font-size: 0.72rem; color: var(--muted-foreground); }
.ex-crumbs li + li::before { content: '›'; margin-right: 0.35rem; opacity: 0.6; }
.ex-crumbs a { color: inherit; text-decoration: none; } .ex-crumbs a:hover { color: var(--foreground); text-decoration: underline; }
.ex-h1 { margin: 0 0 0.3rem; font: 800 1.3rem/1.2 var(--font-display); letter-spacing: -0.02em; text-wrap: balance; }
.ex-h2 { margin: 0.7rem 0.7rem 0.15rem; font: 700 0.72rem/1.3 var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-foreground); }
.ex-seo { margin: 1.4rem 0.7rem 1rem; padding-top: 1rem; border-top: 1px solid var(--border); font-size: 0.88rem; line-height: 1.55; color: var(--muted-foreground); }
.ex-seo h2 { margin: 1.2rem 0 0.5rem; font: 800 1.05rem/1.25 var(--font-display); color: var(--foreground); } .ex-seo h2:first-child { margin-top: 0; }
.ex-seo p { margin: 0.4rem 0; text-wrap: pretty; } .ex-seo a { color: rgb(var(--a-500)); }
.ex-stats { width: 100%; margin: 0.7rem 0; border-collapse: collapse; font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.ex-stats caption { padding-bottom: 0.35rem; text-align: left; font-weight: 700; color: var(--foreground); }
.ex-stats th, .ex-stats td { padding: 0.4rem 0.3rem; text-align: right; border-bottom: 1px solid var(--border); font-weight: 500; }
.ex-stats th:first-child, .ex-stats td:first-child { text-align: left; font-weight: 700; color: var(--foreground); }
.ex-stats thead th { font-size: 0.7rem; color: var(--muted-foreground); font-weight: 600; }
.ex-links { list-style: none; margin: 0.3rem 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.ex-links a { display: inline-block; padding: 0.35rem 0.7rem; border-radius: 999px; background: var(--muted); color: var(--foreground); text-decoration: none; font-size: 0.8rem; transition: background-color 0.15s; }
@media (hover: hover) { .ex-links a:hover { background: var(--card); box-shadow: 0 0 0 1px var(--border-strong); } }
.ex-updated { font-size: 0.74rem; }
.ex-list-static { display: grid; margin: 0.4rem -0.5rem; }

.ex-body { overflow-x: hidden; }

/* Filas añadidas con "Ver más": solo aparecen (opacidad), sin mover nada */
.ex-row.is-new { animation: ex-appear 0.28s ease-out both; }
@keyframes ex-appear { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ex-row.is-new { animation: none; } }

/* ---------- Parkings: interruptor del mapa, pines, tarjeta y avisos (assets/js/fuel/parking.js) ---------- */
.pk-toast[hidden], .pk-here[hidden], .pk-bar[hidden], .ex-fuelbar[hidden] { display: none; }

/* Los pines se animan con --s / --o (GSAP) para no pisar el transform con el que se colocan */
.is-explore .fuel-marker { scale: var(--s, 1); opacity: var(--o, 1); transform-origin: 50% 100%; }

.ex-mode { position: relative; display: grid; grid-template-columns: 1fr 1fr; height: 2.6rem; margin-bottom: 0.55rem; padding: 3px; border-radius: 999px; background: color-mix(in srgb, var(--card) 94%, transparent); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); box-shadow: 0 0 0 1px var(--border-strong), 0 10px 26px -14px rgb(0 0 0 / 0.5); }
.ex-mode-thumb { position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: 999px; background: linear-gradient(135deg, rgb(var(--a-500)), rgb(var(--a-600, var(--a-500)))); box-shadow: 0 6px 16px -6px rgb(var(--a-500) / 0.8), inset 0 1px 0 rgb(255 255 255 / 0.25); transition: transform 0.38s cubic-bezier(0.32, 0.72, 0, 1); }
.ex-mode[data-mode='parking'] .ex-mode-thumb { transform: translateX(100%); }
.ex-mode button { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; border: 0; border-radius: 999px; background: none; cursor: pointer; font: 650 0.86rem/1 var(--font-body); color: var(--muted-foreground); transition: color 0.2s var(--ease-out-expo), scale 0.16s var(--ease-out); }
.ex-mode button:active { scale: 0.96; }
.ex-mode button[aria-checked='true'] { color: #fff; }
.ex-mode button:focus-visible { outline: 2px solid rgb(var(--a-500)); outline-offset: 2px; }
@media (min-width: 64rem) { .ex-mode { background: var(--card); -webkit-backdrop-filter: none; backdrop-filter: none; } }

.pk-marker-wrap { background: none; border: 0; }
.pk-marker { white-space: nowrap; display: inline-flex; align-items: center; gap: 0.36rem; padding: 0.26rem 0.6rem 0.26rem 0.3rem; border-radius: 999px; font: 800 0.76rem/1 var(--font-body); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; color: #11151a; background: rgb(255 255 255 / 0.95); border: 1px solid rgb(0 0 0 / 0.08); box-shadow: 0 1px 2px rgb(0 0 0 / 0.18), 0 6px 14px -4px rgb(0 0 0 / 0.4); transform: translate(-50%, -50%); scale: var(--s, 1); opacity: var(--o, 1); cursor: pointer; transition: transform 0.22s var(--ease-out), background-color 0.2s, color 0.2s, box-shadow 0.2s; }
.pk-marker .pk-p { display: grid; place-items: center; width: 1.25rem; height: 1.25rem; border-radius: 50%; font: 800 0.72rem/1 var(--font-body); font-style: normal; color: #fff; background: linear-gradient(145deg, #3b82f6, #1d4ed8); }
.pk-marker.is-free { color: #15803d; box-shadow: 0 0 0 2px #22c55e, 0 6px 14px -4px rgb(0 0 0 / 0.4); }
.pk-marker.is-free .pk-p { background: linear-gradient(145deg, #34d399, #15803d); }
.pk-marker.is-active { transform: translate(-50%, -50%) scale(1.1); color: #fff; background: rgb(var(--a-500)); border-color: transparent; box-shadow: 0 0 0 2px #fff, 0 12px 26px -6px rgb(var(--a-500) / 0.75); z-index: 2; }
.pk-marker.is-active .pk-p { background: #fff; color: rgb(var(--a-500)); }
.fuel-cluster.is-park { background: #2563eb; box-shadow: 0 0 0 5px rgb(37 99 235 / 0.25), 0 8px 18px -6px rgb(0 0 0 / 0.55); }
.pk-ico.is-sm { width: 2.2rem; height: 2.2rem; border-radius: 0.7rem; font-size: 1.05rem; box-shadow: none; }
.pk-row { font-family: inherit; color: inherit; }

/* Modo parkings: el cajón (o panel lateral) cambia de contenido; el resumen y la lista de gasolineras se sustituyen por los de parkings */
.ex.is-parking #exSum, .ex.is-parking .ex-body:not(.pk-body) { display: none; }
.pk-sum[hidden], .pk-body[hidden] { display: none; }

.pk-ico { flex: none; display: grid; place-items: center; width: 2.8rem; height: 2.8rem; border-radius: 0.9rem; font: 800 1.4rem/1 var(--font-body); color: #fff; background: linear-gradient(145deg, #3b82f6, #1d4ed8); box-shadow: 0 8px 18px -8px rgb(29 78 216 / 0.8); }
.pk-tag { padding: 0.18rem 0.55rem; border-radius: 999px; font-size: 0.72rem; font-weight: 650; color: var(--muted-foreground); background: var(--muted); }
.pk-tag.is-free { color: #15803d; background: rgb(34 197 94 / 0.14); }
.pk-muted { color: var(--muted-foreground); font-size: 0.82rem; }

.pk-here { position: absolute; z-index: 8; top: 7.4rem; left: 50%; translate: -50% 0; display: inline-flex; align-items: center; gap: 0.45rem; height: 2.4rem; padding: 0 1rem; border: 0; border-radius: 999px; cursor: pointer; font: 650 0.84rem/1 var(--font-body); color: var(--foreground); background: var(--card); box-shadow: 0 0 0 1px var(--border-strong), 0 12px 28px -12px rgb(0 0 0 / 0.6); animation: pkIn 0.3s var(--ease-out); }
@media (min-width: 64rem) { .pk-here { top: 1rem; left: calc(50% + 6.5rem); } }
.pk-here:active { scale: 0.96; }
@keyframes pkIn { from { opacity: 0; translate: -50% -6px; } }

.pk-toast { position: absolute; z-index: 9; left: 50%; bottom: 1rem; translate: -50% 0; max-width: calc(100% - 1.4rem); display: flex; align-items: center; gap: 0.9rem; padding: 0.7rem 0.8rem 0.7rem 1.1rem; border-radius: 999px; font-size: 0.86rem; color: #f4f5f7; background: rgb(18 22 27 / 0.96); box-shadow: 0 0 0 1px rgb(255 255 255 / 0.1), 0 18px 40px -14px rgb(0 0 0 / 0.7); }
@media (min-width: 64rem) { .pk-toast { left: calc(50% + 6.5rem); } }
.pk-toast button { flex: none; height: 2rem; padding: 0 0.85rem; border: 0; border-radius: 999px; cursor: pointer; font: 700 0.8rem/1 var(--font-body); color: #fff; background: rgb(var(--a-500)); }
.pk-toast button:active { scale: 0.96; }

@media (prefers-reduced-motion: reduce) { .ex-mode-thumb, .pk-marker, .pk-primary, .pk-secondary { transition: none; } .pk-here { animation: none; } }

/* Móvil: controles flotantes compactos (menos alto robado al mapa) y tabla de precios con scroll propio */
.ex-stats-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0.7rem 0; }
.ex-stats-wrap .ex-stats { margin: 0; min-width: 21rem; }
.ex-stats th { text-transform: none; letter-spacing: 0; }
@media (max-width: 63.99rem) {
  .ex-mode { height: 2.25rem; margin-bottom: 0.4rem; }
  .ex-mode button { font-size: 0.8rem; }
  .ex-search { height: 2.65rem; }
  .ex-chips { margin-top: 0.4rem; padding-bottom: 4px; }
  .ex-chip { height: 2rem; padding: 0 0.8rem; }
  .pk-here { top: 6.2rem; }
}

/* Punto azul de "tu ubicación": marcador HTML de tamaño fijo (con SVG vectorial se agrandaba durante el zoom inicial) */
.ex-here-wrap { background: none; border: 0; }
.ex-here-dot { display: block; width: 16px; height: 16px; border-radius: 50%; background: #2e90fa; border: 3px solid #fff; box-shadow: 0 0 0 6px rgb(46 144 250 / 0.22), 0 2px 8px rgb(0 0 0 / 0.45); transform: translate(-50%, -50%); box-sizing: border-box; }


.ex-home[aria-pressed='true'] { color: #fff; background: rgb(var(--a-500)); }
.ex-home[aria-pressed='true']:hover { background: rgb(var(--a-500)); }

/* Móvil (< md): el mapa es el protagonista. Sin títulos largos (siguen para lectores de pantalla y buscadores), tarjetas ultra compactas y cajón con sombra hacia arriba */
@media (max-width: 47.99rem) {
  .ex-intro, .ex-h2 { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .ex-sheet { box-shadow: 0 -1px 0 var(--border-strong), 0 -18px 44px -18px rgb(0 0 0 / 0.55); }
  .ex-row { gap: 0.6rem; padding: 0.42rem 0.5rem; border-radius: 0.8rem; }
  .ex-row .fuel-logo.is-md { --s: 2.2rem; }
  .ex-row-main { gap: 0; }
  .ex-row-main h3 { font-size: 0.9rem; line-height: 1.2; }
  .ex-row-main small { font-size: 0.72rem; line-height: 1.25; }
  .ex-best { display: inline-block; margin: 0.12rem 0 0; padding: 0.05rem 0.42rem; font-size: 0.62rem; }
  .ex-row-price b { font-size: 1.45rem; }
  .ex-row-price small { font-size: 0.64rem; }
}
.ex-row.is-picked { background: rgb(var(--a-500) / 0.12); box-shadow: inset 0 0 0 1.5px rgb(var(--a-500) / 0.55); }
@media (max-width: 47.99rem) {
  .ex-row-price { grid-template-columns: auto auto auto; }
  .ex-row-price .ex-dot { grid-column: auto; margin: 0 0 0 0.2rem; align-self: center; }
}

/* Resumen y botón de actualizar siempre en una línea; la insignia "Más barata" junto al nombre; direcciones en una sola línea */
.ex-sum { flex-wrap: nowrap; }
.ex-sum-main { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 47.99rem) {
  .ex-live { padding: 0.2rem 0.55rem; font-size: 0.7rem; }
  .ex-row-main { grid-template-columns: minmax(0, 1fr) auto; column-gap: 0.4rem; }
  .ex-row-main h3, .ex-row-main small { grid-column: 1 / -1; }
  .ex-row-main h3 { grid-column: 1; }
  .ex-best { grid-column: 2; grid-row: 1; margin: 0; align-self: center; }
}

/* Grupos de gasolineras (Leaflet.markercluster): círculo con el número */
.fuel-cluster-wrap { background: none; border: 0; }
.fuel-cluster { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font: 800 0.9rem/1 var(--font-body); font-variant-numeric: tabular-nums; color: #fff; background: rgb(var(--a-500)); border: 3px solid #fff; box-shadow: 0 0 0 5px rgb(var(--a-500) / 0.25), 0 8px 18px -6px rgb(0 0 0 / 0.55); scale: var(--s, 1); opacity: var(--o, 1); cursor: pointer; transition: transform 0.2s var(--ease-out); }
.fuel-cluster:active { transform: scale(0.94); }
.leaflet-cluster-anim .leaflet-marker-icon, .leaflet-cluster-anim .leaflet-marker-shadow { transition: transform 0.3s ease-out, opacity 0.3s ease-in; }
.leaflet-cluster-spider-leg { transition: stroke-dashoffset 0.3s ease-out, stroke-opacity 0.3s ease-in; }

/* Ficha de la gasolinera en móvil: cabecera compacta (volver + logo + nombre), precio, acciones a la vista y datos secundarios debajo */
@media (max-width: 47.99rem) {
  .ex-sheet.is-detail .ex-sum { display: none; }
  .ex-sheet.is-detail .ex-sheet-head { padding-bottom: 0.25rem; }
  .ex-detail { grid-template-columns: auto minmax(0, 1fr); gap: 0.65rem 0.4rem; padding: 0 0.6rem 0.6rem; }
  .ex-detail > .ex-back { grid-area: 1 / 1; justify-self: start; width: 2.4rem; min-height: 2.4rem; padding: 0; justify-content: center; font-size: 0; gap: 0; background: var(--muted); }
  .ex-detail > .ex-d-head { grid-area: 1 / 2; gap: 0.65rem; min-width: 0; }
  .ex-detail > .ex-d-head > div { min-width: 0; }
  .ex-d-head .fuel-logo.is-lg { --s: 2.6rem; }
  .ex-d-head h2 { font-size: 1.02rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ex-d-head p { margin-top: 0.1rem; font-size: 0.76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ex-detail > .ex-d-price { grid-area: 2 / 1 / 3 / -1; align-items: center; padding: 0.15rem 0.2rem 0; }
  .ex-d-price b { font-size: 2.35rem; }
  .ex-d-price small { margin-top: 0.15rem; }
  .ex-detail > .ex-d-delta { grid-area: 3 / 1 / 4 / -1; margin: -0.25rem 0.2rem 0; font-size: 0.78rem; }
  .ex-detail > .ex-d-actions { grid-area: 4 / 1 / 5 / -1; gap: 0.5rem; }
  .ex-detail .ex-btn { min-height: 2.65rem; font-size: 0.84rem; }
  .ex-detail > .ex-d-meta { grid-area: 5 / 1 / 6 / -1; gap: 0.4rem; }
  .ex-d-meta span { padding: 0.22rem 0.6rem; font-size: 0.72rem; }
  .ex-detail > .ex-d-title { grid-area: 6 / 1 / 7 / -1; margin: 0.2rem 0.2rem -0.2rem; }
  .ex-detail > .ex-d-prices { grid-area: 7 / 1 / 8 / -1; }
  .ex-d-prices li { padding: 0.5rem 0.8rem; font-size: 0.82rem; }
}

@media (max-width: 47.99rem) { .pk-toast { bottom: auto; top: 7rem; } }

/* Tarifa orientativa de parkings (ver assets/js/fuel/parking-rates.js) */
.pk-rate { display: block; margin-top: 0.15rem; font-size: 0.78rem; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.pk-est { margin-left: 0.25rem; padding: 0.05rem 0.45rem; border-radius: 9999px; font-size: 0.7rem; font-style: normal; font-weight: 600; color: rgb(180 83 9); background: rgb(245 158 11 / 0.15); }
:root[data-theme="dark"] .pk-est, .dark .pk-est { color: rgb(252 211 77); }
.pk-est-note { display: block; margin-top: 0.2rem; line-height: 1.35; }
/* public.css */
/* Vista pública (sin sesión): mapa como héroe, navegación con candados y muro suave */

/* ---------- Botones de acceso ---------- */
.pub-topbar { position: fixed; top: 1rem; right: 1.25rem; z-index: 70; display: none; align-items: center; gap: 0.6rem; }
@media (min-width: 48rem) { .pub-topbar { display: flex; } }
.pub-login {
  display: inline-flex; align-items: center; min-height: 2.6rem; padding: 0 1.05rem; border-radius: 999px;
  font: 600 0.9rem/1 var(--font-display); color: var(--foreground); text-decoration: none;
  background: color-mix(in srgb, var(--card) 70%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 0 0 1px var(--border), 0 6px 18px -10px rgb(0 0 0 / 0.5);
  transition: background-color 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out), scale 0.18s var(--ease-out);
}
.pub-login:active { scale: 0.96; }
@media (hover: hover) { .pub-login:hover { background: color-mix(in srgb, var(--card) 92%, transparent); box-shadow: 0 0 0 1px var(--border-strong), 0 8px 22px -10px rgb(0 0 0 / 0.6); } }

.pub-cta {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 2.6rem; padding: 0 1.2rem; border-radius: 999px;
  font: 700 0.92rem/1 var(--font-display); color: #fff; text-decoration: none; white-space: nowrap;
  background: linear-gradient(135deg, rgb(var(--a-500)), rgb(var(--a-400)));
  box-shadow: 0 1px 2px rgb(var(--a-700) / 0.6), 0 10px 26px -10px rgb(var(--a-500) / 0.85), inset 0 1px 0 rgb(255 255 255 / 0.28);
  transition: box-shadow 0.25s var(--ease-out), scale 0.18s var(--ease-out);
  will-change: transform;
}
.pub-cta::after { /* destello que cruza el botón al pasar el ratón */
  content: ''; position: absolute; inset: 0; z-index: -1; transform: translateX(-120%);
  background: linear-gradient(105deg, transparent 30%, rgb(255 255 255 / 0.38) 50%, transparent 70%);
  transition: transform 0.7s var(--ease-out);
}
.pub-cta svg { transition: transform 0.25s var(--ease-out); }
.pub-cta:active { scale: 0.96; }
.pub-cta:focus-visible, .pub-login:focus-visible, .pw-secondary:focus-visible, .pw-back:focus-visible, .pw-close:focus-visible { outline: 2px solid rgb(var(--a-400)); outline-offset: 3px; }
@media (hover: hover) {
  .pub-cta:hover { box-shadow: 0 1px 2px rgb(var(--a-700) / 0.6), 0 14px 34px -8px rgb(var(--a-500) / 1), inset 0 1px 0 rgb(255 255 255 / 0.35); }
  .pub-cta:hover::after { transform: translateX(120%); }
  .pub-cta:hover svg { transform: translateX(3px); }
}
.pub-cta-sm { min-height: 2.25rem; padding: 0 0.95rem; font-size: 0.82rem; margin-right: 0.35rem; }
.pub-cta-block { width: 100%; min-height: 3rem; font-size: 1rem; }

/* ---------- Navegación: lo libre arriba, lo privado con candado ---------- */
.rail-caption { margin: 0.9rem 0 0.25rem; padding: 0 0.9rem; font: 700 0.64rem/1 var(--font-body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-foreground); opacity: 0.7; }
.rail-caption:first-of-type { margin-top: 0; }
.rail-link.is-locked { color: color-mix(in srgb, var(--muted-foreground) 82%, transparent); }
.rail-link.is-locked:hover { color: var(--foreground); }
.rail-link.is-viewing { background: var(--muted); color: var(--foreground); }
.rail-lock { margin-left: auto; display: inline-flex; opacity: 0.45; transition: opacity 0.18s var(--ease-out), transform 0.18s var(--ease-out); }
.rail-link.is-locked:hover .rail-lock { opacity: 0.9; transform: rotate(-8deg); }
.rail-lock svg { width: 0.85rem; height: 0.85rem; }
.rail-link.is-locked:hover svg:not(.rail-lock svg) { transform: translateX(2px); }

.bottom-nav-guest .bottom-nav-link.is-locked { color: #6f7a89; }
.bn-lock { position: absolute; top: 0.3rem; left: calc(50% + 0.55rem); opacity: 0.6; }

/* ---------- Muro suave ---------- */
.pw-stage { position: relative; min-height: calc(100dvh - 2 * var(--page-pad, 1.5rem)); display: grid; place-items: center; overflow: hidden; border-radius: 1.5rem; isolation: isolate; }
.pw-mock { position: absolute; inset: 0; padding: 1.25rem; filter: blur(7px) saturate(0.9); opacity: 0.9; transform: scale(1.03); pointer-events: none; user-select: none; }
.pw-scrim { position: absolute; inset: 0; z-index: 1; background: radial-gradient(70% 70% at 50% 45%, transparent 0%, rgb(0 0 0 / 0.38) 100%); }
.pw-card {
  position: relative; z-index: 2; width: min(29rem, calc(100% - 2rem)); margin: 2rem 0; padding: 2.1rem 1.75rem 1.5rem; text-align: center;
  border-radius: 1.6rem;
  background: color-mix(in srgb, var(--card) 88%, transparent);
  -webkit-backdrop-filter: blur(26px) saturate(1.5); backdrop-filter: blur(26px) saturate(1.5);
  box-shadow: 0 0 0 1px var(--border), 0 40px 90px -30px rgb(0 0 0 / 0.75), inset 0 1px 0 rgb(255 255 255 / 0.08);
}
.pw-close { position: absolute; top: 0.8rem; right: 0.8rem; width: 2.5rem; height: 2.5rem; display: grid; place-items: center; border-radius: 999px; color: var(--muted-foreground); transition: background-color 0.16s, color 0.16s; }
.pw-close:hover { background: var(--muted); color: var(--foreground); }
.pw-icon { width: 3.4rem; height: 3.4rem; margin: 0 auto 1rem; display: grid; place-items: center; border-radius: 1.1rem; color: rgb(var(--a-400)); background: rgb(var(--a-500) / 0.14); box-shadow: inset 0 0 0 1px rgb(var(--a-500) / 0.25); }
.pw-eyebrow { display: inline-flex; align-items: center; gap: 0.4rem; margin: 0 0 0.6rem; font: 700 0.7rem/1 var(--font-body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-foreground); }
.pw-card h1 { margin: 0 0 0.6rem; font: 800 clamp(1.5rem, 1.2rem + 1.2vw, 1.85rem)/1.12 var(--font-display); letter-spacing: -0.025em; text-wrap: balance; }
.pw-text { margin: 0 auto 1.3rem; max-width: 24rem; color: var(--muted-foreground); font-size: 0.95rem; line-height: 1.5; text-wrap: pretty; }
.pw-points { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: 0.6rem; text-align: left; }
.pw-points li { display: flex; align-items: flex-start; gap: 0.65rem; font-size: 0.9rem; line-height: 1.4; }
.pw-points svg { flex: none; margin-top: 0.1rem; color: rgb(var(--a-400)); }
.pw-actions { display: grid; gap: 0.75rem; justify-items: center; }
.pw-secondary { display: inline-flex; align-items: center; min-height: 2.5rem; padding: 0 0.6rem; font-size: 0.88rem; font-weight: 600; color: var(--muted-foreground); text-decoration: none; border-radius: 0.6rem; transition: color 0.16s; }
.pw-secondary:hover { color: var(--foreground); }
.pw-back { display: inline-flex; align-items: center; gap: 0.4rem; margin-top: 0.9rem; min-height: 2.5rem; font-size: 0.8rem; color: var(--muted-foreground); text-decoration: none; opacity: 0.85; }
.pw-back:hover { color: var(--foreground); opacity: 1; }

/* Maqueta decorativa (todo son bloques de relleno) */
.mk { max-width: 64rem; margin: 0 auto; display: grid; gap: 1rem; }
.mk-head { display: flex; align-items: center; justify-content: space-between; }
.mk-head b { width: 11rem; height: 1.5rem; border-radius: 0.5rem; background: var(--foreground); opacity: 0.85; }
.mk-head span { width: 7rem; height: 2.2rem; border-radius: 999px; background: rgb(var(--a-500)); }
.mk-grid { display: grid; gap: 1rem; }
.mk-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .mk-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .mk-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mk-card { padding: 1.1rem; border-radius: 1.1rem; background: var(--card); box-shadow: 0 0 0 1px var(--border); display: grid; gap: 0.7rem; align-content: start; }
.mk-card b { display: block; width: 45%; height: 0.7rem; border-radius: 0.4rem; background: var(--muted-foreground); opacity: 0.45; }
.mk-card strong { font: 800 1.6rem/1 var(--font-display); }
.mk-tall { min-height: 12rem; } .mk-hero { min-height: 13rem; position: relative; overflow: hidden; }
.mk-hero strong { font-size: 2.4rem; }
.mk-hero svg { position: absolute; inset: auto 0 0 0; width: 100%; height: 55%; } .mk-hero path { fill: rgb(var(--a-500) / 0.35); stroke: rgb(var(--a-400)); stroke-width: 2; }
.mk-bars { display: flex; align-items: flex-end; gap: 0.5rem; height: 8rem; } .mk-bars-s { height: 4.5rem; }
.mk-bars i { flex: 1; border-radius: 0.4rem 0.4rem 0 0; background: linear-gradient(rgb(var(--a-400)), rgb(var(--a-600, var(--a-500)))); }
.mk-row { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 0.8rem; padding: 0.55rem 0; border-bottom: 1px solid var(--border); }
.mk-row:last-child { border-bottom: 0; }
.mk-av { width: 2.2rem; height: 2.2rem; border-radius: 0.7rem; background: var(--muted); box-shadow: inset 0 0 0 1px var(--border); }
.mk-lines { display: grid; gap: 0.35rem; } .mk-lines b { height: 0.55rem; border-radius: 0.3rem; background: var(--muted-foreground); opacity: 0.4; } .mk-lines b:last-child { width: 55%; opacity: 0.25; }
.mk-row em { font: 700 0.95rem/1 var(--font-display); font-style: normal; } .mk-row u { text-decoration: none; font-size: 0.78rem; color: var(--muted-foreground); }
.mk-tabs { display: flex; gap: 1.4rem; } .mk-tabs span { width: 5.5rem; height: 0.85rem; border-radius: 0.4rem; background: var(--muted-foreground); opacity: 0.4; } .mk-tabs span:first-child { opacity: 0.9; background: rgb(var(--a-400)); }
.mk-photo { height: 7rem; border-radius: 0.8rem; background: linear-gradient(135deg, var(--muted), rgb(var(--a-500) / 0.25)); }
.mk-veh .mk-photo { height: 9rem; } .mk-feed b:last-child { width: 70%; }
@media (max-width: 47.99rem) { .mk-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mk-3 { grid-template-columns: minmax(0, 1fr); } .mk-2 { grid-template-columns: minmax(0, 1fr); } .pw-stage { min-height: calc(100dvh - 10rem); } }

@media (prefers-reduced-motion: reduce) {
}



.mk-card { background: color-mix(in srgb, var(--foreground) 6%, var(--card)); }
.pw-mock { filter: blur(5px) saturate(0.95); }

.bn-lock svg { width: 0.7rem; height: 0.7rem; }
/* touch.css */
/* Zonas táctiles: se carga la última para poder ajustar los estilos de cada pantalla.
   ---------- Zonas táctiles (móvil y pantallas táctiles): mínimo 44 px en lo que se pulsa ---------- */
@media (max-width: 63.99rem), (pointer: coarse) {
  .mobile-bar-brand, .pub-cta-sm, .dash-link, .dash-fuel-tag, .dash-vehicle-pick label, .dash-month label { min-height: 2.75rem; }
  .mobile-bar-brand, .pub-cta-sm, .dash-fuel-tag { display: inline-flex; align-items: center; }
  .dash-link { padding-inline: 0.5rem; margin-inline: -0.5rem; }
  /* Gasolineras: filtros, ubicación, asa del cajón, actualizar y enlaces de zona */
  .ex-chip { height: 2.75rem; }
  .ex-locate { width: 2.75rem; height: 2.75rem; }
  .ex-grab { height: 2rem; }
  .ex-live { min-height: 2.5rem; padding-inline: 0.8rem; }
  .ex-links a { padding: 0.7rem 0.9rem; }
  .ex-pop button, .ex-place-list li { min-height: 2.75rem; }
  /* Viaje y Rutas */
  .trip-cat { height: 2.75rem; }
  .trip-swap, .trip-clear { width: 2.75rem; height: 2.75rem; }
  .trip-swap { right: 0.2rem; }
  .trip-more { min-height: 2.75rem; }
  .trip-poi button { height: 2.75rem; }
  .rt-split button, .rt-icon { width: 2.75rem; height: 2.75rem; }
  .leaflet-bar a { width: 2.75rem !important; height: 2.75rem !important; line-height: 2.75rem !important; }
  /* Casillas de ajustes y mi cuenta: la fila entera se pulsa, la casilla es más grande */
  label.flex.items-center.gap-3 { min-height: 2.75rem; }
  input[type='checkbox'], input[type='radio'] { width: 1.3rem; height: 1.3rem; accent-color: rgb(var(--a-500)); }
  /* Deslizadores: el tirador es grande y la barra deja sitio para el dedo */
  .calc-slider input[type='range'] { margin: 1rem 0; touch-action: pan-y; }
  .calc-slider input[type='range']::-webkit-slider-thumb { width: 2.2rem; height: 2.2rem; }
  .calc-slider input[type='range']::-moz-range-thumb { width: 1.7rem; height: 1.7rem; }
}

/* Sin teclado físico: ni pistas de teclas ni ayuda de atajos */
@media (hover: none) and (pointer: coarse) {
  .kbd, .shortcut-hint, [data-shortcut-help] { display: none !important; }
}
/* atelier.css */
/* ==========================================================================
   ATELIER - piel visual de FuelApp. Se carga la última: solo cambia aspecto, nunca marcado ni lógica.

   Idea: cuaderno de a bordo. Hormigón y tinta, un único acento "naranja señal", cifras en monoespaciada
   (como el surtidor), líneas de ticket (guiones), botones que se hunden como teclas.

   Reglas de forma (una sola escala, sin excepciones):
     contenedores 0.9rem  |  controles 0.6rem  |  etiquetas 0.4rem  |  píldora solo en segmentos, interruptores y estados
   Reglas de materia:
     contenido = sólido con filo de 1px  |  capas flotantes (menús, barra móvil, hojas) = cristal
   Fuentes: Bricolage Grotesque (títulos), Geist (texto), Geist Mono (cifras).
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --font-body: 'Geist', 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
  --font-display: 'Bricolage Grotesque', 'Geist', 'Segoe UI', system-ui, sans-serif;
  --font-figure: 'Geist Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  --background: #e4e8e3;
  --card: #f8f9f6;
  --card-sunken: #eceee9;
  --foreground: #0e1210;
  --muted: rgba(14, 18, 16, 0.055);
  --muted-foreground: #565f59;
  --accent: #eef0eb;
  --border: rgba(14, 18, 16, 0.13);
  --border-strong: rgba(14, 18, 16, 0.26);
  --color-background-light: #e4e8e3;
  --color-card-light: #f8f9f6;
  --color-modal-light: #f8f9f6;

  --on-primary: #ffffff;
  --gauge-ok: #12a05c;
  --gauge-warn: #e69a12;
  --gauge-bad: #e5392d;
  --gauge-info: #2678e5;

  --radius-sm: 0.4rem;
  --radius-md: 0.6rem;
  --radius-lg: 0.9rem;
  --radius-xl: 1.1rem;

  --ink: #0b0e0c;
  --line-dash: 1px dashed var(--border-strong);
  --lift-1: 0 1px 1px rgb(14 30 22 / 0.04), 0 8px 18px -14px rgb(14 30 22 / 0.22);
  --lift-2: 0 2px 3px rgb(14 30 22 / 0.06), 0 16px 30px -16px rgb(14 30 22 / 0.3);
  --shadow-sm: var(--lift-1);
  --shadow-md: 0 10px 28px -10px rgb(14 30 22 / 0.28);
  --shadow-lg: 0 28px 60px -18px rgb(14 30 22 / 0.4);
  --edge-light: inset 0 1px 0 rgb(255 255 255 / 0.65);
  --key: 0 2px 0;
  --ease-out: cubic-bezier(0.2, 0.9, 0.25, 1);
}
html.dark, .dark {
  --background: #0a0d0b;
  --card: #121613;
  --card-sunken: #0d100e;
  --foreground: #ecf0ea;
  --muted: rgba(255, 255, 255, 0.06);
  --muted-foreground: #9aa49d;
  --accent: #1a1f1b;
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.2);
  --color-background-dark: #0a0d0b;
  --color-card-dark: #121613;
  --color-modal-dark: #121613;
  --on-primary: #160803;
  --lift-1: 0 1px 0 rgb(255 255 255 / 0.03) inset, 0 12px 24px -16px rgb(0 0 0 / 0.8);
  --lift-2: 0 1px 0 rgb(255 255 255 / 0.05) inset, 0 20px 36px -16px rgb(0 0 0 / 0.9);
  --shadow-sm: var(--lift-1);
  --shadow-md: 0 12px 30px -10px rgb(0 0 0 / 0.75);
  --shadow-lg: 0 30px 70px -14px rgb(0 0 0 / 0.9);
  --edge-light: inset 0 1px 0 rgb(255 255 255 / 0.05);
}
/* Acento por defecto: naranja señal (los demás acentos de Ajustes se mantienen) */
html[data-accent='racing'], html:not([data-accent]) { --a-200: 255 224 212; --a-300: 255 172 140; --a-400: 240 98 52; --a-500: 214 62 22; --a-600: 176 46 14; --a-700: 128 32 10; }
html.dark[data-accent='racing'], html.dark:not([data-accent]) { --a-200: 100 30 14; --a-300: 255 162 122; --a-400: 255 124 78; --a-500: 255 106 61; --a-600: 236 84 38; --a-700: 176 56 20; }

/* ---------- 2. Base: papel liso, sin halos ---------- */
body {
  font-family: var(--font-body);
  background-image: none;
  font-feature-settings: 'ss01', 'cv11';
}
.font-sans, .font-body { font-family: var(--font-body) !important; }
.font-display { font-family: var(--font-display) !important; }
.font-mono { font-family: var(--font-figure) !important; }
/* Rejilla de puntos fija y casi invisible: da textura al papel sin repintar el scroll */
body::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(rgb(14 18 16 / 0.11) 1px, transparent 1.2px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 55%); mask-image: linear-gradient(180deg, #000, transparent 55%);
}
.dark body::before { background-image: radial-gradient(rgb(255 255 255 / 0.09) 1px, transparent 1.2px); }

h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.028em; font-weight: 700; }
h1 { font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.6rem); line-height: 1.04; }
h2 { font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem); }

/* Cifras: monoespaciada con ancho fijo, como el display de un surtidor */
.compact-kpi-value, .sim-total, .tco-total, .calc-result-value, .calc-stat strong, .ledger-figure, .activity-amount, .record-figure,
.dash-value, .dash-st-price strong, .dash-last-total strong, .dash-tx-amount, .dash-delta, .an-step-num,
.an-live strong, .nav-badge, .dash-pill-text small, td.tabular, .tabular {
  font-family: var(--font-figure); font-variant-numeric: tabular-nums; letter-spacing: -0.04em;
}
.compact-kpi-value { font-weight: 600; font-size: clamp(1.2rem, 1rem + 0.9vw, 1.8rem); }

::selection { background: rgb(var(--a-500) / 0.3); }
:focus-visible { outline: 2px solid rgb(var(--a-500)); outline-offset: 2px; border-radius: var(--radius-sm); }

/* ---------- 3. Contenedores ---------- */
.card, .dash-card, .dash-panel, .dash-tile, .premium-surface, .spec-card {
  border-radius: var(--radius-lg);
}
.card { background: var(--card); box-shadow: 0 0 0 1px var(--border), var(--lift-1); }
.card:hover { box-shadow: 0 0 0 1px var(--border), var(--lift-1); }
a.card:hover, .record-card:hover, .vehicle-shell-card:hover { box-shadow: 0 0 0 1px var(--border-strong), var(--lift-2); }
.premium-surface { background: var(--card); }
.spec-card { background: var(--card-sunken); }
.dash-card, .dash-panel, .dash-tile { background: var(--card); box-shadow: 0 0 0 1px var(--border), var(--lift-1); }

/* Cabecera de página: editorial, sin caja; una línea de base y ya */
.page-header.card, .page-header {
  background: transparent !important; box-shadow: none !important;
  padding: 0.25rem 0 1.1rem !important; margin-bottom: 1.2rem;
  border: 0 !important; border-radius: 0;
  border-bottom: 1px solid var(--border-strong) !important;
}
.page-header h1 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.9rem); font-weight: 750; letter-spacing: -0.04em; }
.page-header p { color: var(--muted-foreground); }

/* Listas: líneas de ticket */
.connection-item, .dash-st-row, .dash-st-skel, .dash-card-foot, .shortcut-row, .more-sheet-list a { border-style: dashed; border-color: var(--border-strong); }
.dash-st-row, .dash-st-skel { border-top-style: dashed; }
.dashboard-list-row:hover { box-shadow: inset 2px 0 0 rgb(var(--a-500)); border-radius: var(--radius-sm); }

/* Chips: etiquetas rectas, no píldoras */
.user-role-badge, .user-status-badge, .user-meta-chip, .soft-chip, .app-chip, .app-tag-chip {
  border-radius: var(--radius-sm); font-family: var(--font-body); font-weight: 600; font-size: 0.78rem; background: var(--card-sunken);
}
.app-tag-chip { background: rgb(var(--a-500) / 0.1); color: rgb(var(--a-600)); border-color: rgb(var(--a-500) / 0.3); }
.dark .app-tag-chip { color: rgb(var(--a-300)); }

/* KPIs clásicos */
.compact-kpi-card { border-radius: var(--radius-lg); }
.compact-kpi-label { font-family: var(--font-body); font-size: 0.8rem; font-weight: 550; letter-spacing: 0; text-transform: none; color: var(--muted-foreground); }
.compact-kpi-icon { border-radius: var(--radius-md); box-shadow: none; }
.compact-kpi-help { font-size: 0.78rem; }

/* ---------- 4. Botones: teclas físicas ---------- */
.btn-primary, .btn-secondary, .btn-ghost, .btn-danger, .icon-action-btn, .sidebar-mini-link {
  border-radius: var(--radius-md); font-family: var(--font-body); font-weight: 650; letter-spacing: -0.005em;
  transition-property: transform, box-shadow, background-color, border-color, color; transition-duration: 0.14s; transition-timing-function: var(--ease-out);
}
.btn-primary {
  color: var(--on-primary); background: rgb(var(--a-500)); border: 1px solid rgb(var(--a-600));
  box-shadow: var(--key) rgb(var(--a-700)), inset 0 1px 0 rgb(255 255 255 / 0.22);
  translate: 0 0;
}
.btn-primary:hover:not(:disabled) { filter: none; background: rgb(var(--a-400)); transform: none; box-shadow: var(--key) rgb(var(--a-700)), inset 0 1px 0 rgb(255 255 255 / 0.28); }
.btn-primary:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 0 0 rgb(var(--a-700)), inset 0 1px 2px rgb(0 0 0 / 0.25); }
.btn-secondary {
  color: var(--foreground); background: var(--card); border: 1px solid var(--border-strong);
  box-shadow: var(--key) var(--border-strong);
}
.btn-secondary:hover:not(:disabled) { background: var(--card); border-color: var(--foreground); transform: none; }
.btn-secondary:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 0 0 var(--border-strong); }
.btn-ghost { border-color: transparent; color: var(--muted-foreground); }
.btn-ghost:hover:not(:disabled) { background: var(--muted); color: var(--foreground); border-color: var(--border); }
.btn-ghost:active:not(:disabled) { transform: scale(0.97); }
.btn-danger { color: #fff; background: #d92d20; border: 1px solid #a8190f; box-shadow: var(--key) #8a130b; }
.btn-danger:hover:not(:disabled) { filter: none; background: #e5392d; transform: none; }
.btn-danger:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 0 0 #8a130b; }
.btn-primary:focus-visible, .btn-secondary:focus-visible, .btn-ghost:focus-visible, .btn-danger:focus-visible { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px rgb(var(--a-500)); }
.icon-action-btn { background: var(--card); border: 1px solid var(--border-strong); }
.icon-action-btn:hover { transform: none; border-color: var(--foreground); background: var(--card); }
.icon-action-btn:active { transform: scale(0.94); }
.sidebar-mini-link { border-radius: var(--radius-md); }

/* ---------- 5. Formularios ---------- */
label, .form-label { font-family: var(--font-body); font-size: 0.84rem; font-weight: 600; letter-spacing: 0; color: var(--foreground); }
.form-label { color: var(--muted-foreground); }
.input-field {
  border-radius: var(--radius-md); background-color: var(--card-sunken); border: 1px solid var(--border-strong);
  box-shadow: inset 0 1px 2px rgb(14 30 22 / 0.07); font-weight: 500;
}
.dark .input-field { box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.5); }
.input-field:hover { border-color: var(--foreground); }
.input-field:focus { border-color: rgb(var(--a-500)); box-shadow: 0 0 0 3px rgb(var(--a-500) / 0.2); background-color: var(--card); }
.input-field::placeholder { color: var(--muted-foreground); opacity: 0.75; }
select.input-field { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23778078' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); }
input[type='file']::file-selector-button { border-radius: var(--radius-sm); background: rgb(var(--a-500)); color: var(--on-primary); }

/* Casillas y botones de radio propios (los ocultos con sr-only no se ven afectados) */
input[type='checkbox']:not(.sr-only):not([class*='peer']), input[type='radio']:not(.sr-only):not([class*='peer']) {
  -webkit-appearance: none; appearance: none; flex: none; width: 1.2rem; height: 1.2rem; margin: 0; cursor: pointer;
  background: var(--card); border: 1.5px solid var(--border-strong); vertical-align: middle;
  transition: background-color 0.14s, border-color 0.14s, box-shadow 0.14s;
}
input[type='checkbox']:not(.sr-only):not([class*='peer']) { border-radius: 0.35rem; }
input[type='radio']:not(.sr-only):not([class*='peer']) { border-radius: 50%; }
input[type='checkbox']:not(.sr-only):not([class*='peer']):hover, input[type='radio']:not(.sr-only):not([class*='peer']):hover { border-color: var(--foreground); }
input[type='checkbox']:not(.sr-only):not([class*='peer']):checked {
  background-color: rgb(var(--a-500)); border-color: rgb(var(--a-600));
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E");
  background-size: 100%; background-position: center; background-repeat: no-repeat;
}
.dark input[type='checkbox']:not(.sr-only):not([class*='peer']):checked {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23160803' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E");
}
input[type='radio']:not(.sr-only):not([class*='peer']):checked { border-color: rgb(var(--a-500)); background: radial-gradient(circle, rgb(var(--a-500)) 0 38%, var(--card) 42%); }
input[type='checkbox']:not(.sr-only):focus-visible, input[type='radio']:not(.sr-only):focus-visible { outline: 2px solid rgb(var(--a-500)); outline-offset: 2px; }

/* Interruptores del panel */
.admin-switch-track { border-radius: 9999px; }

/* Segmentos y pestañas: aquí sí, píldora */
.section-tabs, .calc-tabs, .rutas-tabs { border-radius: 9999px; background: var(--card-sunken); box-shadow: inset 0 0 0 1px var(--border); }
.calc-tabs { border-radius: var(--radius-lg); }
.section-tabs a, .calc-tabs a, .rutas-tabs a { font-family: var(--font-body); font-weight: 600; letter-spacing: -0.005em; }
.section-tabs .tab-indicator, .section-tabs:not(.has-indicator) a.is-active { background: var(--foreground); box-shadow: none; }
.section-tabs a.is-active { color: var(--card); }
.section-tabs a.is-active svg { color: rgb(var(--a-400)); }

/* ---------- 6. Tablas ---------- */
table { font-variant-numeric: tabular-nums; }
table th {
  font-family: var(--font-body); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.02em; text-align: left;
  color: var(--muted-foreground); border-bottom: 1px solid var(--border-strong);
}
table td { border-bottom: 1px dashed var(--border); }
table tbody tr:last-child td { border-bottom: 0; }
table tbody tr { transition: background-color 0.12s; }
@media (hover: hover) { table tbody tr:hover { background: var(--muted); } }

/* ---------- 7. Navegación de escritorio: barra de tinta ---------- */
.sidebar {
  background-color: var(--ink); background-image: none; border-right: 1px solid rgb(255 255 255 / 0.07); box-shadow: none;
  --card: #141915;
}
.sidebar::before { height: 2px; background: rgb(var(--a-500)); }
.rail-search { border-radius: var(--radius-md); background: rgb(255 255 255 / 0.05); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08); }
.rail-search:hover { background: rgb(255 255 255 / 0.09); }
.rail-add {
  border-radius: var(--radius-md); color: var(--on-primary); background: rgb(var(--a-500)); font-family: var(--font-body); font-weight: 700;
  box-shadow: var(--key) rgb(var(--a-700)), inset 0 1px 0 rgb(255 255 255 / 0.22);
  transition-property: transform, background-color, box-shadow; transition-duration: 0.14s;
}
.rail-add:hover { background: rgb(var(--a-400)); }
.rail-add:active { transform: translateY(2px); box-shadow: 0 0 0 rgb(var(--a-700)); }
.rail-add .kbd { color: var(--on-primary); background: rgb(0 0 0 / 0.14); border-color: rgb(0 0 0 / 0.2); }
.rail-link { border-radius: var(--radius-md); font-family: var(--font-body); font-weight: 560; font-size: 0.95rem; }
.rail-link:hover { background: rgb(255 255 255 / 0.06); }
.rail-link:hover svg { transform: none; }
.rail-link.is-active { font-weight: 650; }
.rail-link.is-active svg { color: rgb(var(--a-400)); }
.rail-indicator { border-radius: var(--radius-md); background: rgb(255 255 255 / 0.08); box-shadow: inset 2px 0 0 rgb(var(--a-500)); }
.user-trigger { border-radius: var(--radius-lg); background: rgb(255 255 255 / 0.05); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08); }
.user-chip > span, .user-chip-img { border-radius: var(--radius-md); background: rgb(var(--a-500)); color: var(--on-primary); }
.nav-badge { border-radius: var(--radius-sm); background: rgb(var(--a-500)); color: var(--on-primary); font-size: 0.68rem; }
.dash-bell-dot { background: rgb(var(--a-500)); color: var(--on-primary); border-radius: var(--radius-sm); font-family: var(--font-figure); }

/* Menús flotantes: cristal */
.user-menu, .dash-menu, .an-menu {
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--card) 90%, transparent); -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
  box-shadow: 0 0 0 1px var(--border-strong), inset 0 1px 0 rgb(255 255 255 / 0.12), 0 24px 48px -16px rgb(0 0 0 / 0.5);
}
.user-menu-item { border-radius: var(--radius-sm); font-weight: 560; }
.user-menu-item:hover, .user-menu-item:focus-visible { background: var(--muted); }

/* ---------- 8. Navegación móvil: barra superior y dock flotante de cristal ---------- */
.mobile-bar { background: rgb(11 14 12 / 0.78); border-bottom-color: rgb(255 255 255 / 0.07); box-shadow: none; }
.bottom-nav {
  inset: auto 0.6rem calc(0.55rem + env(safe-area-inset-bottom)) 0.6rem;
  padding: 0.3rem; border-radius: 1.5rem;
  background: rgb(14 18 15 / 0.82); -webkit-backdrop-filter: saturate(1.6) blur(20px); backdrop-filter: saturate(1.6) blur(20px);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.1), inset 0 1px 0 rgb(255 255 255 / 0.12), 0 18px 40px -14px rgb(0 0 0 / 0.7);
}
.bottom-nav-link { border-radius: 1.1rem; font-family: var(--font-body); font-size: 0.64rem; font-weight: 600; color: #a2aca5; }
.bottom-nav-pill { border-radius: 0.9rem; background: rgb(255 255 255 / 0.1); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.1); }
.bottom-nav-add span {
  border-radius: 1rem; color: var(--on-primary); background: rgb(var(--a-500));
  box-shadow: 0 0 0 4px rgb(14 18 15 / 0.9), var(--key) rgb(var(--a-700)), inset 0 1px 0 rgb(255 255 255 / 0.25);
}
.bottom-nav .nav-badge { color: var(--on-primary); }
@media (max-width: 767.98px) { .app-main { padding-bottom: calc(7rem + env(safe-area-inset-bottom)); } }

/* Hoja "Más" y modales: hoja inferior con asa */
.more-sheet-panel, .app-modal-panel, .modal-card, .ui-dialog {
  background: color-mix(in srgb, var(--card) 94%, transparent); -webkit-backdrop-filter: blur(22px) saturate(1.4); backdrop-filter: blur(22px) saturate(1.4);
}
.more-sheet-panel { border-radius: 1.4rem 1.4rem 0 0; }
.more-tile { border-radius: var(--radius-lg); font-family: var(--font-body); background: var(--card-sunken); }
.more-tile svg { color: rgb(var(--a-500)); }

.app-modal-backdrop, .ui-dialog-backdrop, #searchModal, .more-sheet-backdrop { background: rgb(6 9 7 / 0.62); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.app-modal-panel, .modal-card { border: 0; border-radius: 1.4rem 1.4rem 0 0; box-shadow: 0 0 0 1px var(--border-strong), var(--shadow-lg); }
.app-modal-panel::before { /* asa de hoja inferior en móvil, filo de acento en escritorio */
  inset: 0.5rem 50% auto auto; translate: 50% 0; width: 2.5rem; height: 0.28rem; border-radius: 9999px; background: var(--border-strong);
}
@media (min-width: 40rem) {
  .app-modal-panel, .modal-card, .ui-dialog { border-radius: var(--radius-xl); }
  .app-modal-panel::before { inset: 0 1.4rem auto 1.4rem; translate: 0; width: auto; height: 2px; border-radius: 0 0 2px 2px; background: rgb(var(--a-500)); }
}
.app-modal-header { background: transparent; }
.app-modal-eyebrow { font-family: var(--font-body); letter-spacing: 0.02em; text-transform: none; font-size: 0.8rem; }
.app-modal-title { font-weight: 750; letter-spacing: -0.035em; }
.app-modal-close { border-radius: var(--radius-md); background: var(--card-sunken); }
.app-modal-close:hover { transform: none; }
.app-modal-close:active { transform: scale(0.94); }
.app-modal-footer { box-shadow: 0 -1px 0 var(--border); }
.ui-dialog { border: 0; box-shadow: 0 0 0 1px var(--border-strong), var(--shadow-lg); }
.ui-dialog-icon { border-radius: var(--radius-md); }
#searchModal .search-container { border-radius: var(--radius-xl); background: color-mix(in srgb, var(--card) 94%, transparent); -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px); }
.search-result-item { border-radius: var(--radius-md); }
.search-result-item .icon-box { border-radius: var(--radius-md); }
.kbd { border-radius: 0.3rem; font-family: var(--font-figure); }
.toast { border-radius: var(--radius-lg); background: color-mix(in srgb, var(--card) 94%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.toast-icon { border-radius: var(--radius-sm); }
.quick-add-item, .quick-add-icon { border-radius: var(--radius-lg); }
.quick-add-icon { border-radius: var(--radius-md); }

/* ---------- 9. Dashboard: bento asimétrico ---------- */
.dash-tile { border-radius: var(--radius-lg); background: var(--card); box-shadow: 0 0 0 1px var(--border), var(--lift-1); padding: 1rem 1.1rem; }
.dash-panel { padding: 1.1rem 1.2rem; }
.dash-label { font-size: 0.8rem; font-weight: 550; }
.dash-value { font-size: 1.55rem; font-weight: 600; }
.dash-value small { font-family: var(--font-body); letter-spacing: 0; }
.dash-hello { font-family: var(--font-display); letter-spacing: -0.045em; font-weight: 750; }

/* Gasto total: pantalla de surtidor (tinta + matriz de puntos); la cifra, en el color del acento */
.dash-total {
  color: #eef2ec; border-radius: var(--radius-lg);
  background:
    radial-gradient(rgb(255 255 255 / 0.1) 1px, transparent 1.3px) 0 0 / 14px 14px,
    linear-gradient(160deg, #161b17, #0b0e0c);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.08), inset 0 1px 0 rgb(255 255 255 / 0.08), 0 20px 36px -22px rgb(0 0 0 / 0.7);
}
.dash-total::after {
  content: ''; position: absolute; inset: auto 0 0 0; height: 2px; background: rgb(var(--a-500));
}
.dash-big { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.05em; color: rgb(var(--a-400)); }
.dash-big small { font-family: var(--font-body); letter-spacing: 0; color: rgb(238 242 236 / 0.6); }
.dash-month label, .dash-chip { border-radius: var(--radius-sm); }

.dash-act { border-radius: var(--radius-lg); }
.dash-act.is-primary {
  color: var(--on-primary); background: rgb(var(--a-500));
  box-shadow: var(--key) rgb(var(--a-700)), inset 0 1px 0 rgb(255 255 255 / 0.22);
}
.dash-act.is-primary:active { translate: 0 2px; scale: 1; box-shadow: 0 0 0 rgb(var(--a-700)); }
.is-primary .dash-act-icon { color: var(--on-primary); background: rgb(0 0 0 / 0.14); }
.is-primary .dash-act-text small { color: color-mix(in srgb, var(--on-primary) 78%, transparent); }
.dash-act-icon { border-radius: var(--radius-md); }
.dash-act:not(.is-primary):active { scale: 0.98; }
.dash-pill { border-radius: var(--radius-lg); }
.dash-pill-icon { border-radius: var(--radius-md); }
.dash-fuel-tag, .dash-fuel-pills button { border-radius: 9999px; }
.dash-tx-mark { border-radius: var(--radius-md); }
.dash-tx-row { border-bottom: 1px dashed var(--border); }
.dash-tx-row:last-child { border-bottom: 0; }
.dash-st-nav { border-radius: var(--radius-md); }
.dash-row-icon, .dash-last-logo:not(.fuel-logo) { border-radius: var(--radius-md); }
.dash-last-now { border-radius: var(--radius-md); }
.dash-st-price strong, .dash-last-total strong { font-weight: 600; }

@media (min-width: 48rem) {
  .dash-bento {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    grid-template-areas: 'total total cons rep' 'total total price cost' 'add gasto gasto map';
  }
}

/* ---------- 10. Analíticas (cargan su CSS después: se sube la especificidad) ---------- */
:root .an-tile {
  border-radius: var(--radius-lg); -webkit-backdrop-filter: none; backdrop-filter: none;
  background: var(--card); box-shadow: 0 0 0 1px var(--border), var(--lift-1);
}
:root .an-label { font-family: var(--font-body); font-weight: 550; }
:root .an-num, :root .an-bignum { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.045em; }
:root .an-pill, :root .an-export { border-radius: var(--radius-md); background: var(--card); box-shadow: 0 0 0 1px var(--border-strong), var(--key) var(--border-strong); }
:root .an-pill:active, :root .an-export:active { translate: 0 2px; scale: 1; box-shadow: 0 0 0 1px var(--border-strong); }
:root .an-live { border-radius: var(--radius-md); }
:root .an-opt, :root .an-dates input, :root .an-apply { border-radius: var(--radius-sm); }
:root .an-apply { color: var(--on-primary); box-shadow: var(--key) rgb(var(--a-700)); }
:root .an-step-bar, :root .an-bars li, :root .an-meter { border-radius: var(--radius-sm); }
:root .an-chip { border-radius: var(--radius-sm); }
:root .an-list li, :root .an-bars li { border-bottom: 0; }

/* ---------- 11. Movimiento: sin saltos para quien lo pide ---------- */
@media (prefers-reduced-motion: reduce) {
  .btn-primary, .btn-secondary, .rail-add, .dash-act { transition: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .user-menu, .dash-menu, .an-menu, .bottom-nav, .more-sheet-panel, .app-modal-panel, .modal-card, .ui-dialog, .toast, #searchModal .search-container {
    -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--card);
  }
  .bottom-nav { background: #0e120f; }
}

/* Texto claro dentro de la tarjeta oscura del total (la etiqueta del mes heredaba el color de tinta) */
.dash-total label, .dash-total select { color: inherit; margin: 0; }

/* ---------- Una sola escala de radios en todas las pantallas ---------- */
.st-card, .acct-card, .acct-stat, .fuel-bar, .fuel-board-summary, .fuel-map-wrap, .trip-box, .trip-card, .rt-card, .mk-card, .vehicle-shell-card,
.public-vehicle-card, .doc-card-premium, .ex-place-list { border-radius: var(--radius-lg); }
.gv-media { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.fuel-sheet-panel, .ex-sheet { border-radius: var(--radius-xl); }
.rounded-3xl { border-radius: var(--radius-xl); }
.rounded-2xl { border-radius: var(--radius-lg); }
.gv-add-icon, .pw-icon { border-radius: var(--radius-md); }

/* ---------- KPIs de registros: rejilla asimétrica y un solo color de acento (adiós a los iconos pastel) ---------- */
.rf-kpi { flex-direction: column; align-items: flex-start; gap: 0.7rem; padding: 1.1rem 1.25rem; border-radius: var(--radius-lg); box-shadow: 0 0 0 1px var(--border), var(--lift-1); }
.rf-kpi-icon, .dark .rf-kpi-icon { width: auto; height: auto; border-radius: 0; background: none; box-shadow: none; filter: none; color: rgb(var(--a-500)); }
.rf-kpi-label { font-weight: 550; letter-spacing: 0; }
.rf-kpi-value { font-family: var(--font-figure); font-weight: 600; letter-spacing: -0.05em; }
@media (min-width: 48rem) {
  .rf-kpis.kpi-grid-3 { grid-template-columns: 1.5fr 1fr 1fr; }
  .rf-kpis .rf-kpi:first-child .rf-kpi-value { font-size: clamp(1.9rem, 1.4rem + 1.4vw, 2.5rem); }
}

/* ---------- Análisis: hero de tinta y desglose en un solo color ---------- */
.st-hero {
  border-radius: var(--radius-lg); color: #eef2ec; position: relative; overflow: hidden;
  background: radial-gradient(rgb(255 255 255 / 0.1) 1px, transparent 1.3px) 0 0 / 14px 14px, linear-gradient(160deg, #161b17, #0b0e0c);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.08), inset 0 1px 0 rgb(255 255 255 / 0.08), 0 20px 36px -22px rgb(0 0 0 / 0.7);
}
.st-hero::after { content: ''; position: absolute; inset: auto 0 0 0; height: 2px; background: rgb(var(--a-500)); }
.st-eyebrow { font-family: var(--font-body); font-size: 0.8rem; font-weight: 550; letter-spacing: 0; text-transform: none; color: rgb(238 242 236 / 0.66); }
.st-big { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.05em; }
.st-big:not(.is-empty) { color: rgb(var(--a-400)); }
.st-hero .st-big.is-money { color: #eef2ec; }
.st-ico { border-radius: var(--radius-md); color: rgb(var(--a-500)); background: rgb(var(--a-500) / 0.1); box-shadow: none; }
.st-track { border-radius: 2px; height: 0.4rem; background: var(--muted); }
.st-fill { border-radius: 2px; background: rgb(var(--a-500)); }
.st-row-val { font-family: var(--font-figure); font-weight: 600; letter-spacing: -0.05em; }
.st-seg { border-radius: 9999px; }
.st-badge { border-radius: var(--radius-sm); }
@media (min-width: 48rem) {
  :root .an-kpi:nth-of-type(1) { grid-column: span 4; }
  :root .an-kpi:nth-of-type(2), :root .an-kpi:nth-of-type(4) { grid-column: span 3; }
  :root .an-kpi:nth-of-type(3) { grid-column: span 2; }
  :root .an-kpi:nth-of-type(1) .an-num { font-size: 3rem; }
  :root .an-kpi:nth-of-type(3) .an-label svg { display: none; }
}

/* ---------- Acceso: tinta lisa con matriz de puntos y una ficha, no un panel con resplandor ---------- */
.login-shell { background: var(--ink); }
.login-shell::before {
  inset: 0; left: 0; top: 0; width: auto; aspect-ratio: auto; transform: none; border-radius: 0; animation: none; opacity: 1;
  -webkit-mask: radial-gradient(70% 60% at 50% 45%, #000, transparent); mask: radial-gradient(70% 60% at 50% 45%, #000, transparent);
  -webkit-mask-composite: initial; mask-composite: initial;
  background: radial-gradient(rgb(255 255 255 / 0.16) 1px, transparent 1.3px) 0 0 / 22px 22px;
}
.login-shell::after { height: 2px; opacity: 1; background: rgb(var(--a-500)); -webkit-mask-image: none; mask-image: none; }
.login-card {
  background: #121713; border-radius: var(--radius-lg); -webkit-backdrop-filter: none; backdrop-filter: none;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.1), 0 30px 70px -24px rgb(0 0 0 / 0.9);
}
.login-card::after { inset: 0 auto auto 1.5rem; width: 3rem; height: 3px; border-radius: 0 0 3px 3px; background: rgb(var(--a-500)); }
.auth-title { font-family: var(--font-display); font-size: 1.6rem; font-weight: 750; letter-spacing: -0.04em; }
.auth-flash { border-radius: var(--radius-md); }
.auth-eye { border-radius: var(--radius-sm); }
.auth-back { border-radius: var(--radius-md); }
.auth-done-icon { border-radius: var(--radius-md); }
.auth-meter-bar, .auth-meter-bar span { border-radius: 2px; }
@media (max-width: 47.99rem) {
  .rf-kpi { flex-direction: row; align-items: center; gap: 0.85rem; padding: 0.85rem 1rem; }
}

/* Acceso en pantallas grandes: la ficha a la izquierda y un contador de surtidor a cero, sin texto real */
@media (min-width: 64rem) {
  .login-shell { justify-content: flex-start; padding-left: clamp(2rem, 11vw, 11rem); overflow: hidden; }
  .login-shell > div { position: relative; }
  .login-shell > div::before {
    content: '0,000'; content: '0,000' / '';
    position: absolute; left: calc(100% + 5vw); top: 50%; translate: 0 -50%;
    font: 500 clamp(6rem, 15vw, 17rem)/1 var(--font-figure); letter-spacing: -0.08em; white-space: nowrap;
    color: transparent; -webkit-text-stroke: 1px rgb(255 255 255 / 0.13); pointer-events: none; user-select: none;
  }
}

/* Precios de gasolineras: cifras de surtidor */
.ex-d-price, .ex-row-price, .ex-row-price strong, .fuel-best-price, .fuel-card-price, .fuel-pop-price, .fuel-price-num {
  font-family: var(--font-figure); font-variant-numeric: tabular-nums; letter-spacing: -0.05em;
}

/* Mapa de gasolineras: buscador y botones con la escala de controles; filtros y selector de modo siguen en píldora */
.ex-search, .ex-btn, .ex-more, .ex-back, .ex-live, .ex-best { border-radius: var(--radius-md); }
.ex-tier, .ex-d-meta span, .ex-links a { border-radius: var(--radius-sm); }

/* Adornos del marcado del dashboard (el € del total, la flecha de la acción principal, el nombre del saludo) */
.dash-hello-name { font-style: normal; color: rgb(var(--a-500)); }
.dash-total-fx { position: absolute; right: 1.1rem; bottom: -0.6rem; z-index: 0; pointer-events: none; user-select: none; line-height: 1; }
.dash-total-fx b { font: 500 clamp(6rem, 12vw, 9.5rem)/1 var(--font-figure); color: transparent; -webkit-text-stroke: 1px rgb(255 255 255 / 0.12); }
.dash-total > :not(.dash-total-fx) { position: relative; z-index: 1; }
.dash-act-go { margin-left: auto; display: grid; place-items: center; flex: none; opacity: 0.7; transition: translate 0.16s var(--ease-out); }
.dash-act:hover .dash-act-go { translate: 2px -2px; }

/* ---------- Acceso en móvil: pantalla a sangre, cabecera a la izquierda y campos compactos ---------- */
@media (max-width: 39.99rem) {
  .login-shell { align-items: flex-start; padding: 0; background-image: none; }
  .login-shell > div { max-width: none; }
  .login-card {
    min-height: 100dvh; padding: 0.4rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom)) !important;
    border-radius: 0; box-shadow: none; background: transparent;
  }
  .login-card::after { left: 1.25rem; }
  .login-card .auth-back { margin: 0.4rem 0 0 -0.6rem; min-height: 2.5rem; font-size: 0.84rem; }
  .login-card > .text-center { text-align: left; margin: 0.6rem 0 1.35rem; }
  .login-card .brand-lockup { margin: 0 0 1.1rem; gap: 0.5rem; }
  .login-card .brand-lockup img { height: 2.1rem; width: auto; }
  .login-card .brand-wordmark { font-size: 1.25rem; }
  .login-card .auth-title { font-size: 1.75rem; line-height: 1.05; margin: 0 0 0.4rem; }
  .login-card > .text-center p { font-size: 0.9rem; line-height: 1.4; margin: 0; color: var(--muted-foreground); }
  .login-card .space-y-5 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.8rem; }
  .login-card .form-label, .login-card label { margin-bottom: 0.3rem; font-size: 0.8rem; }
  .login-card .input-field { min-height: 2.75rem; padding-block: 0.5rem; font-size: 1rem; }
  .login-card .auth-link { min-height: 2rem; font-size: 0.78rem; }
  .login-card .auth-label-row { align-items: center; }
  .login-card .auth-check { font-size: 0.8rem; gap: 0.55rem; }
  .login-card .btn-primary { min-height: 3rem; margin-top: 0.2rem; }
  .login-card .auth-flash { margin-bottom: 0.9rem; padding: 0.6rem 0.8rem; font-size: 0.82rem; }
  .login-card .auth-switch { margin-top: 1.1rem; font-size: 0.86rem; }
  .login-card .auth-switch-sm { margin-top: 0.1rem; font-size: 0.78rem; }
  .login-card .auth-meter { margin-top: 0.45rem; }
  .login-shell .auth-switch { padding: 0.5rem 1.25rem 0; margin: 0; justify-content: flex-start; font-size: 0.78rem; }
  .login-shell > div > .auth-switch { position: relative; margin-top: -3rem; padding-bottom: 1rem; }
}
@media (max-width: 39.99rem) {
  .login-card .auth-switch { justify-content: flex-start; padding: 0; margin-top: 1rem; }
  .login-card .auth-switch-sm { margin-top: 0; }
  .login-shell > div > .auth-switch a { color: var(--muted-foreground); font-weight: 500; }
}

/* ---------- Muro para invitados (secciones bloqueadas) ---------- */
.pw-card { border-radius: var(--radius-xl); background: color-mix(in srgb, var(--card) 92%, transparent); box-shadow: 0 0 0 1px var(--border-strong), var(--shadow-lg), inset 0 1px 0 rgb(255 255 255 / 0.1); }
.pw-stage { border-radius: var(--radius-xl); }
.pw-icon { border-radius: var(--radius-md); color: rgb(var(--a-500)); }
.pw-eyebrow { font-family: var(--font-body); font-size: 0.78rem; font-weight: 600; letter-spacing: 0; text-transform: none; }
.pw-card h1 { font-family: var(--font-display); font-weight: 750; letter-spacing: -0.04em; }
.pw-points svg { color: rgb(var(--a-500)); }
.pw-close { border-radius: var(--radius-md); }
.pub-cta { border-radius: var(--radius-md); }
.pub-cta-block { box-shadow: var(--key) rgb(var(--a-700)), inset 0 1px 0 rgb(255 255 255 / 0.22); color: var(--on-primary); }
.pub-cta-block:active { transform: translateY(2px); box-shadow: 0 0 0 rgb(var(--a-700)); }

/* Barra inferior de invitado: la sección que estás viendo queda marcada y los toques responden */
.bottom-nav-guest .bottom-nav-link.is-active, .bottom-nav-guest .bottom-nav-link.is-viewing { color: #fff; background: rgb(255 255 255 / 0.1); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.1); }
.bottom-nav-guest .bottom-nav-link.is-viewing svg:not(.bn-lock svg), .bottom-nav-guest .bottom-nav-link.is-active svg { color: rgb(var(--a-400)); }
.bottom-nav-guest .bottom-nav-link.is-locked:active { color: #fff; background: rgb(255 255 255 / 0.07); }
.bottom-nav-guest .bottom-nav-link.is-locked.is-viewing .bn-lock { opacity: 0.9; }
.pw-secondary:active, .pw-back:active, .pw-close:active { background: var(--muted); color: var(--foreground); scale: 0.97; }
.pub-cta:active { scale: 0.98; }

@media (max-width: 47.99rem) {
  .mobile-bar { background: rgb(11 14 12 / 0.94); }
  /* A sangre y con la hoja de acceso anclada abajo: lo bloqueado se ve difuminado detrás */
  .pw-stage {
    margin-inline: calc(var(--page-pad) * -1); border-radius: 0; place-items: end center;
    min-height: calc(100dvh - 4.75rem - 6.25rem - env(safe-area-inset-bottom));
  }
  .pw-mock { padding: 0.9rem; filter: blur(6px) saturate(0.9); }
  .pw-scrim { background: linear-gradient(180deg, transparent 0%, color-mix(in srgb, var(--background) 55%, transparent) 38%, var(--background) 82%); }
  .pw-card {
    width: calc(100% - 1.5rem); margin: 0 0 0.25rem; padding: 1.35rem 1.15rem 0.9rem; text-align: left;
    border-radius: 1.4rem; background: color-mix(in srgb, var(--card) 96%, transparent);
  }
  .pw-icon { width: 2.6rem; height: 2.6rem; margin: 0 0 0.8rem; }
  .pw-icon svg { width: 1.25rem; height: 1.25rem; }
  .pw-close { top: 0.65rem; right: 0.65rem; width: 2.75rem; height: 2.75rem; }
  .pw-eyebrow { margin-bottom: 0.35rem; font-size: 0.74rem; }
  .pw-card h1 { margin-bottom: 0.4rem; font-size: 1.5rem; line-height: 1.08; }
  .pw-text { margin: 0 0 0.9rem; max-width: none; font-size: 0.88rem; line-height: 1.4; }
  .pw-points { margin-bottom: 1.1rem; gap: 0.45rem; }
  .pw-points li { font-size: 0.84rem; line-height: 1.3; gap: 0.5rem; }
  .pw-actions { justify-items: stretch; gap: 0.2rem; }
  .pub-cta-block { min-height: 3rem; justify-content: center; }
  .pw-secondary { justify-content: center; min-height: 2.75rem; }
  .pw-back { justify-content: center; width: 100%; margin-top: 0; min-height: 2.75rem; }
}

/* ---------- Ajustes y Mi cuenta (account.css carga después: se sube la especificidad) ---------- */
:root .acct { gap: 0.8rem; }
:root .acct-card { border-radius: var(--radius-lg); box-shadow: 0 0 0 1px var(--border), var(--lift-1); }
:root .acct-hero {
  gap: 0.95rem; padding: 1.1rem; color: #eef2ec; -webkit-backdrop-filter: none; backdrop-filter: none;
  background: radial-gradient(rgb(255 255 255 / 0.1) 1px, transparent 1.3px) 0 0 / 14px 14px, linear-gradient(160deg, #161b17, #0b0e0c);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.08), inset 0 1px 0 rgb(255 255 255 / 0.08), 0 18px 32px -22px rgb(0 0 0 / 0.7);
}
:root .acct-hero::after { content: ''; position: absolute; inset: auto 0 0 0; height: 2px; background: rgb(var(--a-500)); }
:root .acct-avatar { width: 3.6rem; height: 3.6rem; border-radius: var(--radius-md); font-size: 1.5rem; color: var(--on-primary); background: rgb(var(--a-500)); box-shadow: var(--key) rgb(var(--a-700)); }
:root .acct-avatar img { border-radius: inherit; }
:root .acct-avatar-edit { right: -0.4rem; bottom: -0.4rem; width: 1.5rem; height: 1.5rem; border-radius: var(--radius-sm); color: var(--foreground); background: var(--card); }
:root .acct-id h1 { font: 750 1.3rem/1.1 var(--font-display); letter-spacing: -0.035em; color: #eef2ec; }
:root .acct-mail { color: rgb(238 242 236 / 0.66); font-size: 0.84rem; }
:root .acct-meta { color: rgb(238 242 236 / 0.55); font-size: 0.74rem; }

:root .acct-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.55rem; }
:root .acct-stats .acct-stat:first-child { grid-column: 1 / -1; }
:root .acct-stat { padding: 0.85rem 0.95rem; border-radius: var(--radius-lg); box-shadow: 0 0 0 1px var(--border), var(--lift-1); }
:root .acct-stat b { font: 600 1.6rem/1 var(--font-figure); letter-spacing: -0.05em; }
:root .acct-stat span { margin-top: 0.45rem; font-size: 0.74rem; }
@media (min-width: 48rem) {
  :root .acct-stats { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  :root .acct-stats .acct-stat:first-child { grid-column: auto; }
}

:root .acct-section { padding: 1rem; gap: 0.85rem; }
:root .acct-section > header h2 { font: 700 1.05rem/1.2 var(--font-display); letter-spacing: -0.025em; }
:root .acct-section > header p { font-size: 0.82rem; }
:root .acct-field label { font-weight: 600; }
:root .acct-input { border-radius: var(--radius-md); background: var(--card-sunken); border: 1px solid var(--border-strong); box-shadow: inset 0 1px 2px rgb(14 30 22 / 0.07); }
:root .acct-input:focus { border-color: rgb(var(--a-500)); box-shadow: 0 0 0 3px rgb(var(--a-500) / 0.2); background: var(--card); }
:root .acct-photo .btn-secondary { min-height: 44px; }

:root .acct-rows { border-radius: var(--radius-md); box-shadow: inset 0 0 0 1px var(--border); }
:root .acct-row { min-height: 3.2rem; padding: 0.65rem 0.85rem; }
:root .acct-row + .acct-row { box-shadow: none; border-top: 1px dashed var(--border-strong); }
:root .acct-row:active { background: var(--muted); }
:root .acct-row-text strong { font-weight: 600; }

:root .seg { padding: 3px; border-radius: var(--radius-md); background: var(--card-sunken); box-shadow: inset 0 0 0 1px var(--border); }
:root .seg-opt span { min-height: 38px; border-radius: 0.4rem; font-family: var(--font-body); font-size: 0.84rem; }
:root .seg-opt input:checked + span { color: var(--card); background: var(--foreground); box-shadow: none; }
:root .seg-opt:active span { scale: 0.97; }
:root .stepper { border-radius: var(--radius-md); background: var(--card-sunken); box-shadow: inset 0 0 0 1px var(--border); }
:root .stepper input { background: transparent; font: 600 1.1rem/1 var(--font-figure); }
:root .stepper button:active { background: rgb(var(--a-500) / 0.16); }
:root .swatch i { box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.18); }
:root .swatch input:checked + i { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px rgb(var(--c)); transform: none; }

:root .acct-save { min-height: 46px; }
:root .acct-spin { border-color: color-mix(in srgb, var(--on-primary) 35%, transparent); border-top-color: var(--on-primary); }
:root .acct-logout { border-radius: var(--radius-md); min-height: 46px; border: 1px solid rgb(229 72 77 / 0.3); background: transparent; }
:root .acct-logout:active { background: rgb(229 72 77 / 0.12); }
:root .acct-danger { box-shadow: 0 0 0 1px rgb(229 72 77 / 0.35); background: var(--card); }
:root .acct-danger-btn { border-radius: var(--radius-md); }
:root .acct-danger-btn:not(:disabled):active { background: #e5484d; color: #fff; }
@media (max-width: 47.99rem) {
  :root .acct-stats .acct-stat:first-child { display: flex; align-items: center; justify-content: space-between; flex-direction: row-reverse; }
  :root .acct-stats .acct-stat:first-child span { margin-top: 0; font-size: 0.84rem; }
}
/* Formularios con clase .acct dentro de una tarjeta (Seguridad): a todo el ancho de la tarjeta */
:root .acct-section form.acct { width: 100%; max-width: none; margin: 0; padding-bottom: 0; gap: 0.85rem; }

/* Seguridad contra desbordes: nada puede ensanchar la pantalla (eso empujaba la barra inferior fuera de vista en móviles estrechos) */
html, body { overflow-x: clip; }
.app-main, .app-content { min-width: 0; max-width: 100%; }
.st-row-top { min-width: 0; }
.st-row-name { min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; }
.st-row-val { flex: 0 0 auto; white-space: nowrap; }
/* motion.css */
/* ==========================================================================
   MOTION - sistema de movimiento de FuelApp. Se carga después de atelier.css y manda sobre el resto.

   Principios
     · Respuesta inmediata: micro-acciones 100-180 ms, entradas 240-320 ms. Nada pesado.
     · Peso e inercia: las cosas aterrizan con frenada suave (expo) y los controles pequeños rebotan (spring).
     · Solo se anima lo que compone la GPU: transform (translate/scale/rotate), opacity y filter: blur().
       Excepciones deliberadas, de un solo elemento y sin recalcular el diseño: el anillo de foco (box-shadow, 320 ms)
       y el desenfoque del telón de modales (backdrop-filter, 400 ms).
     · prefers-reduced-motion: sin desplazamientos, escalas ni desenfoques; solo cambios de color y opacidad casi instantáneos.

   Las mismas curvas están registradas en GSAP (assets/js/ui/motion-system.js) como fuelOut, fuelSpring, fuelInOut y fuelSheet.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --ease-out-expo: var(--ease-smooth-out);                 /* alias: todo el CSS de entrada/salida usa la curva smooth-out de transitions.dev */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);        /* micro-rebotes: interruptores, checks, recuperación al soltar */
  --ease-in-out-smooth: cubic-bezier(0.65, 0, 0.35, 1);    /* morphing y cambios de posición de contenedores */
  --ease-sheet: cubic-bezier(0.16, 1, 0.3, 1.025);         /* hoja inferior: llega y roza el tope magnético */
  /* Escala de movimiento de transitions.dev (duraciones, curvas, distancias, escalas, blur) */
  --duration-stagger: 40ms; --duration-micro: 80ms; --duration-quick: 150ms; --duration-fast: 250ms; --duration-medium: 350ms; --duration-slow: 400ms; --duration-very-slow: 500ms;
  --ease-smooth-out: cubic-bezier(0.22, 1, 0.36, 1); --ease-bounce: cubic-bezier(0.34, 1.36, 0.64, 1);
  --distance-micro: 4px; --distance-base: 8px; --distance-medium: 12px;
  --scale-large: 0.96; --scale-medium: 0.97; --scale-small: 0.98; --scale-tiny: 0.99;
  --blur-small: 2px; --blur-medium: 3px;
  --ease: var(--ease-smooth-out);
  --ease-out: var(--ease-smooth-out);

  --t-press: 100ms;
  --t-micro: var(--duration-quick);
  --t-ui: 180ms;
  --t-enter: var(--duration-fast);
  --t-sheet: 420ms;
  --stagger: var(--duration-stagger);

  --lift-glow: 14 30 22;           /* tinte de la sombra de elevación (claro) */
  --lift-edge: 255 255 255;
}
.dark { --lift-glow: 0 0 0; }

/* Utilidades de Tailwind: mismas curvas y duraciones más cortas que las de plantilla */
.transition, .transition-all, .transition-colors, .transition-opacity, .transition-shadow, .transition-transform { transition-timing-function: var(--ease-out-expo); }
.ease-in-out, .ease-in { transition-timing-function: var(--ease-in-out-smooth); }
.ease-out { transition-timing-function: var(--ease-out-expo); }
.duration-150 { transition-duration: 120ms; }
.duration-200 { transition-duration: 160ms; }
.duration-300 { transition-duration: 240ms; }
.duration-500 { transition-duration: 320ms; }
.duration-700 { transition-duration: 400ms; }

/* ---------- 2. Entrada de página sin GSAP (con GSAP lo hace motion.js): desenfoque óptico + subida milimétrica ---------- */
@keyframes pageEnter {
  from { opacity: 0; translate: 0 8px; scale: 0.98; filter: blur(4px); }
  to   { opacity: 1; translate: 0 0; scale: 1; filter: blur(0); }
}
.animate-in { animation: pageEnter var(--t-enter) var(--ease-out-expo) backwards; }
.animate-in > * { animation: pageEnter 320ms var(--ease-out-expo) backwards; }
.animate-in > *:nth-child(2) { animation-delay: calc(var(--stagger) * 1); }
.animate-in > *:nth-child(3) { animation-delay: calc(var(--stagger) * 2); }
.animate-in > *:nth-child(4) { animation-delay: calc(var(--stagger) * 3); }
.animate-in > *:nth-child(5) { animation-delay: calc(var(--stagger) * 4); }
.animate-in > *:nth-child(n+6) { animation-delay: calc(var(--stagger) * 5); }
.animate-in > .admin-bulk-bar { animation: none; }
.js-motion .animate-in, .js-motion .animate-in > * { animation: none; }

/* ---------- 3. Pulsación: compresión instantánea y recuperación con rebote ----------
   (sin opacity ni filter en la lista: GSAP anima esas propiedades en entradas y una transición CSS las retrasaría) */
.btn-primary, .btn-secondary, .btn-ghost, .btn-danger, .icon-action-btn, .sidebar-mini-link, .pub-cta, .pw-secondary, .pw-back, .pw-close,
.dash-act, .dash-pill, .dash-tool, .dash-fuel-pills button, .dash-fuel-tag, .dash-st-nav, .dash-bell, .an-pill, .an-export, .an-apply,
.rail-link, .rail-add, .rail-search, .bottom-nav-link, .bottom-nav-add span, .more-tile, .quick-add-item, .user-trigger, .mobile-bar-btn,
.section-tabs a, .calc-tabs a, .rutas-tabs a, .seg-opt span, .stepper button, .acct-logout, .acct-danger-btn, .acct-avatar, .rf-add, .app-modal-close {
  transition: scale 220ms var(--ease-spring), translate 220ms var(--ease-spring),
              background-color var(--t-micro) var(--ease-out-expo), border-color var(--t-micro) var(--ease-out-expo),
              color var(--t-micro) var(--ease-out-expo), box-shadow var(--t-ui) var(--ease-out-expo);
  -webkit-tap-highlight-color: transparent;
}
.btn-primary:active:not(:disabled), .btn-secondary:active:not(:disabled), .btn-ghost:active:not(:disabled), .btn-danger:active:not(:disabled),
.icon-action-btn:active, .sidebar-mini-link:active, .pub-cta:active, .pw-secondary:active, .pw-back:active, .pw-close:active,
.dash-act:active, .dash-pill:active, .dash-tool:active, .dash-fuel-pills button:active, .dash-fuel-tag:active, .dash-st-nav:active, .dash-bell:active,
.an-pill:active, .an-export:active, .an-apply:active, .rail-link:active, .rail-add:active, .rail-search:active, .bottom-nav-link:active,
.bottom-nav-add:active span, .more-tile:active, .quick-add-item:active, .user-trigger:active, .mobile-bar-btn:active,
.section-tabs a:active, .calc-tabs a:active, .rutas-tabs a:active, .seg-opt:active span, .stepper button:active, .acct-logout:active, .acct-danger-btn:not(:disabled):active,
.acct-avatar:active, .rf-add:active, .app-modal-close:active {
  scale: 0.96; transform: none;
  transition-duration: var(--t-press), var(--t-press), var(--t-micro), var(--t-micro), var(--t-micro), var(--t-press);
  transition-timing-function: var(--ease-out-expo);
}
/* Botones con "tecla": bajan 1 px y pierden el filo inferior mientras se mantienen */
.btn-primary:active:not(:disabled), .btn-secondary:active:not(:disabled), .btn-danger:active:not(:disabled), .rail-add:active, .dash-act.is-primary:active, .pub-cta-block:active { translate: 0 1px; }
.dash-act.is-primary:active { scale: 0.96; }
.bottom-nav-link:active, .rail-link:active { scale: 0.94; }
.bottom-nav-link:active svg { transform: none; }

/* ---------- 4. Tarjetas y bento: elevación táctil con reflejo de cristal (la sombra vive en un pseudo-elemento: solo opacity) ---------- */
.card:is(a, .record-card, .vehicle-shell-card), .dash-tile, .dash-card, .compact-kpi-card, .acct-stat, .an-kpi, .spec-card, .public-vehicle-card, .rf-kpi, .quick-add-item, .more-tile {
  position: relative;
  transition: translate 280ms var(--ease-out-expo), scale 220ms var(--ease-spring), background-color var(--t-micro) var(--ease-out-expo), border-color var(--t-micro) var(--ease-out-expo);
}
.card:is(a, .record-card, .vehicle-shell-card)::before, .dash-tile::before, .dash-card::before, .compact-kpi-card::before, .acct-stat::before, .an-kpi::before,
.spec-card::before, .public-vehicle-card::before, .rf-kpi::before, .quick-add-item::before {
  display: block; content: ''; position: absolute; inset: 0; z-index: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  background: linear-gradient(180deg, rgb(var(--lift-edge) / 0.1), transparent 38%);
  box-shadow: inset 0 1px 0 rgb(var(--lift-edge) / 0.55), inset 0 0 0 1px rgb(var(--lift-edge) / 0.14), 0 24px 38px -20px rgb(var(--lift-glow) / 0.42);
  transition: opacity 280ms var(--ease-out-expo);
}
.dark .card:is(a, .record-card, .vehicle-shell-card)::before, .dark .dash-tile::before, .dark .dash-card::before, .dark .compact-kpi-card::before, .dark .acct-stat::before,
.dark .an-kpi::before, .dark .spec-card::before, .dark .public-vehicle-card::before, .dark .rf-kpi::before, .dark .quick-add-item::before {
  box-shadow: inset 0 1px 0 rgb(var(--lift-edge) / 0.14), inset 0 0 0 1px rgb(var(--lift-edge) / 0.05), 0 26px 40px -20px rgb(0 0 0 / 0.85);
}
@media (hover: hover) and (pointer: fine) {
  .card:is(a, .record-card, .vehicle-shell-card):hover, .dash-tile:hover, .dash-card:hover, .compact-kpi-card:hover, .acct-stat:hover, .an-kpi:hover,
  .spec-card:hover, .public-vehicle-card:hover, .rf-kpi:hover, .quick-add-item:hover, .more-tile:hover { translate: 0 -2px; }
  .card:is(a, .record-card, .vehicle-shell-card):hover::before, .dash-tile:hover::before, .dash-card:hover::before, .compact-kpi-card:hover::before, .acct-stat:hover::before,
  .an-kpi:hover::before, .spec-card:hover::before, .public-vehicle-card:hover::before, .rf-kpi:hover::before, .quick-add-item:hover::before { opacity: 1; }
  .vehicle-shell-card:hover, .spec-card:hover, .public-vehicle-card:hover { transform: none; }
}
.card:is(a, .record-card):active, .dash-tile:active, .vehicle-shell-card:active { scale: 0.985; transition-duration: var(--t-press); }

/* Filas de lista: respuesta táctil sin saltos de diseño */
.record-card, .dashboard-list-row, .dash-tx-row, .dash-st-row, .search-result-item, .ui-select-option, .user-menu-item, .acct-row {
  transition: background-color var(--t-micro) var(--ease-out-expo), scale 200ms var(--ease-spring);
}
.record-card:active, .dashboard-list-row:active, .search-result-item:active { scale: 0.99; transition-duration: var(--t-press); }

/* ---------- 5. Campos: el foco florece con un rebote elástico ---------- */
.input-field, .acct-input, .calc-input input, .stepper input, .ui-select-button, .auth-pass {
  transition: border-color var(--t-micro) var(--ease-out-expo), background-color var(--t-micro) var(--ease-out-expo), box-shadow 320ms var(--ease-spring);
}
.input-field:focus, .acct-input:focus, .calc-input input:focus, .ui-select-button[aria-expanded="true"] { box-shadow: 0 0 0 4px rgb(var(--a-500) / 0.2); }
.input-field:not(:focus):not(:hover), .acct-input:not(:focus) { box-shadow: 0 0 0 0 rgb(var(--a-500) / 0); }
.ui-select-chevron, .dash-pill-chevron, .an-chev, .dash-fold summary svg { transition: rotate 260ms var(--ease-spring), transform 260ms var(--ease-spring); }

/* ---------- 6. Interruptores, casillas y segmentos: palanca mecánica ---------- */
.ios-switch i { transition: background-color var(--t-ui) var(--ease-out-expo); }
.ios-switch i::after {
  width: 1.55rem; transform-origin: 0% 50%;
  transition: transform 340ms var(--ease-spring), scale 200ms var(--ease-in-out-smooth);
}
.ios-switch input:checked + i::after { transform-origin: 100% 50%; }
.ios-switch input:active + i::after, .ios-switch input:checked:active + i::after { width: 1.55rem; scale: 1.18 1; }
.ios-switch input:checked:active + i::after { transform: translateX(1.25rem); }
.ios-switch.is-pop i::after { animation: knob-stretch 340ms var(--ease-in-out-smooth); }
.admin-switch-track { transition: background-color var(--t-ui) var(--ease-out-expo); }
.admin-switch-track::after { transform-origin: 0% 50%; transition: transform 340ms var(--ease-spring), scale 200ms var(--ease-in-out-smooth); }
.admin-switch input:checked + .admin-switch-track::after { transform-origin: 100% 50%; }
.admin-switch.is-pop .admin-switch-track::after { animation: knob-stretch 340ms var(--ease-in-out-smooth); }
@keyframes knob-stretch { 0% { scale: 1 1; } 38% { scale: 1.2 0.94; } 100% { scale: 1 1; } }

input[type='checkbox'], input[type='radio'] { transition: background-color var(--t-micro) var(--ease-out-expo), border-color var(--t-micro) var(--ease-out-expo), box-shadow 280ms var(--ease-spring); }
input.is-pop:checked { animation: check-pop 280ms var(--ease-spring); }
@keyframes check-pop { 0% { scale: 0.72; } 55% { scale: 1.14; } 100% { scale: 1; } }
.seg-opt.is-pop input:checked + span { animation: seg-pop 300ms var(--ease-spring); }
@keyframes seg-pop { 0% { scale: 0.94; } 60% { scale: 1.04; } 100% { scale: 1; } }
.swatch input:checked + i { transition: box-shadow 280ms var(--ease-spring), scale 280ms var(--ease-spring); }
.swatch.is-pop i { animation: check-pop 300ms var(--ease-spring); }

/* ---------- 7. Menús y desplegables: se abren desde su ancla, desenfocados, y encajan ---------- */
.an-menu, .dash-menu { filter: blur(var(--blur-small)); transition: opacity var(--t-ui) var(--ease-out-expo), scale 280ms var(--ease-out-expo), translate 280ms var(--ease-out-expo), filter 240ms var(--ease-out-expo); }
.an-menu.is-open, .dash-menu.is-open { filter: blur(0); }
.dash-menu { transform-origin: top left; }
.an-menu { transform-origin: top right; }
.ui-select-popover {
  filter: blur(4px); transform: translateY(-6px) scale(0.96);
  transition: opacity var(--t-ui) var(--ease-out-expo), transform 280ms var(--ease-out-expo), filter 240ms var(--ease-out-expo);
}
.ui-select-popover.opens-up { transform: translateY(6px) scale(0.96); }
.ui-select-popover.is-open { filter: blur(0); transform: none; }
.ui-select-option { transition: background-color var(--t-micro) var(--ease-out-expo), scale 200ms var(--ease-spring); }
.ui-select-check { transition: opacity var(--t-micro) var(--ease-out-expo), transform 300ms var(--ease-spring); }

/* Hojas inferiores: subida con inercia, tope magnético y telón que se desenfoca de forma no lineal */
.ui-select-sheet { transition: transform var(--t-sheet) var(--ease-sheet); }
.ui-select-sheet-overlay { transition: opacity 320ms var(--ease-out-expo); }
.ui-select-sheet-overlay.is-open { -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); animation: backdrop-bloom 420ms var(--ease-out-expo) backwards; }
.app-modal-overlay { transition-timing-function: var(--ease-out-expo); transition-duration: 260ms; }
.app-modal-overlay:not(.opacity-0) .app-modal-backdrop { animation: backdrop-bloom 420ms var(--ease-out-expo) backwards; }
.more-sheet-backdrop { animation: backdrop-bloom 420ms var(--ease-out-expo) backwards; }
@keyframes backdrop-bloom {
  0%   { -webkit-backdrop-filter: blur(0); backdrop-filter: blur(0); }
  35%  { -webkit-backdrop-filter: blur(1.5px); backdrop-filter: blur(1.5px); }
  100% { -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
}
.ui-dialog { transition: transform 340ms var(--ease-spring); }
.ui-dialog-overlay { transition: opacity 220ms var(--ease-out-expo); }

/* Avisos: llegan con un pequeño rebote desde donde nacen */
@keyframes toast-in { 0% { opacity: 0; translate: 0 14px; scale: 0.95; filter: blur(4px); } 100% { opacity: 1; translate: 0 0; scale: 1; filter: blur(0); } }
@keyframes toast-in-top { 0% { opacity: 0; translate: 0 -14px; scale: 0.95; filter: blur(4px); } 100% { opacity: 1; translate: 0 0; scale: 1; filter: blur(0); } }
.toast { animation: toast-in 380ms var(--ease-spring) both; transition: opacity var(--t-ui) var(--ease-out-expo), transform var(--t-ui) var(--ease-in-out-smooth); }
@media (max-width: 767.98px) { .toast { animation-name: toast-in-top; } }

/* ---------- 8. Datos reactivos: el cálculo se confirma con un destello cromático ---------- */
@keyframes calc-bloom {
  0%   { filter: brightness(1.35) saturate(1.5); scale: 1.015; }
  100% { filter: brightness(1) saturate(1); scale: 1; }
}
.calc-field.is-calculated { animation: calc-bloom 720ms var(--ease-out-expo); }
.calc-field .num-field { transition: color 700ms var(--ease-out-expo); }
@keyframes stat-tick { 0% { filter: brightness(1.5); translate: 0 -2px; } 100% { filter: brightness(1); translate: 0 0; } }
.is-updated { animation: stat-tick 480ms var(--ease-out-expo); }

/* Cargas y esqueletos */
.an-body { transition: opacity var(--t-ui) var(--ease-out-expo), filter var(--t-ui) var(--ease-out-expo); }
.an-body.is-loading { filter: blur(1.5px); }
.is-busy { transition: opacity var(--t-ui) var(--ease-out-expo); }

/* ---------- 9. Movimiento reducido: sin desplazamientos, escalas ni desenfoques; solo color y opacidad casi instantáneos ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-property: opacity, color, background-color, border-color, fill, stroke !important;
    transition-duration: 160ms !important;
    transition-delay: 0s !important;
  }
  .btn-primary:active, .btn-secondary:active, .btn-ghost:active, .btn-danger:active, [class]:active { scale: none !important; translate: none !important; }
  .card:hover, .dash-tile:hover, .dash-card:hover, .record-card:hover, [class]:hover { translate: none !important; }
  .an-menu, .dash-menu, .ui-select-popover { filter: none !important; }
  .toast { opacity: 1; }
  .ui-select-sheet { transition: opacity 60ms linear !important; }
}

/* ---------- 10. Transición nativa entre páginas (Cross-Document View Transitions): 0 KB de JS, solo opacity y transform (GPU) ---------- */
@view-transition { navigation: auto; }

/* Elementos persistentes: se quedan fijos mientras solo muta el contenido central */
.mobile-bar  { view-transition-name: app-header; }
.sidebar     { view-transition-name: app-rail; }
.pub-topbar  { view-transition-name: app-top; }
.bottom-nav  { view-transition-name: bottom-nav; }
.app-content { view-transition-name: page; }

/* Sin interpolar la geometría: se muestra la versión nueva directamente en su sitio
   (evita que la barra inferior "viaje" o sobresalga cuando cambia el alto visible del móvil) */
::view-transition-group(app-header), ::view-transition-group(app-rail), ::view-transition-group(app-top), ::view-transition-group(bottom-nav) { animation: none; }
::view-transition-old(app-header), ::view-transition-old(app-rail), ::view-transition-old(app-top), ::view-transition-old(bottom-nav) { display: none; }
::view-transition-new(app-header), ::view-transition-new(app-rail), ::view-transition-new(app-top), ::view-transition-new(bottom-nav) { animation: none; opacity: 1; }

/* Contenido: fundido + desplazamiento milimétrico, 150–200 ms */
::view-transition-old(page) { animation: vt-out 150ms var(--ease-smooth-out) both; }
::view-transition-new(page) { animation: vt-in 200ms var(--ease-smooth-out) both; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 150ms; animation-timing-function: var(--ease-smooth-out); }
@keyframes vt-out { to   { opacity: 0; transform: translateY(-4px); } }
@keyframes vt-in  { from { opacity: 0; transform: translateY(6px); } }

/* Accesibilidad: sin transiciones con movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* Con GSAP activo la entrada la hace motion.js: sin esto cada bloque animaba dos veces (CSS + GSAP) y daba tirones */
.js-motion .animate-in, .js-motion .animate-in > * { animation: none; }
@keyframes pageEnter { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }

/* ---------- 11. transitions.dev: sustituye las animaciones propias por las de la skill ----------
   Menús/desplegables: escala + opacidad (abre 250 ms, cierra 150 ms). Modal/diálogo: escala .96.
   Panel/hoja: 400/350 ms. Aviso: sube 16 px con blur 2. Interruptor: palanca con doble rebote. Todo con smooth-out. */
:root {
  --dropdown-open-dur: 250ms; --dropdown-close-dur: 150ms;
  --modal-open-dur: 250ms; --modal-close-dur: 150ms;
  --panel-open-dur: 400ms; --panel-close-dur: 350ms;
  --toast-open: 350ms; --toast-close: 250ms;
  --toggle-dur: 350ms; --toggle-ease: cubic-bezier(0.34, 1.35, 0.64, 1);
}

/* Menús desplegables */
.an-menu, .dash-menu, .ui-select-popover {
  filter: none; translate: none;
  scale: var(--scale-medium);
  transition: opacity var(--dropdown-close-dur) var(--ease-smooth-out), scale var(--dropdown-close-dur) var(--ease-smooth-out);
}
.an-menu.is-open, .dash-menu.is-open, .ui-select-popover.is-open {
  filter: none; scale: 1;
  transition: opacity var(--dropdown-open-dur) var(--ease-smooth-out), scale var(--dropdown-open-dur) var(--ease-smooth-out);
}
.ui-select-popover, .ui-select-popover.opens-up { transform: none; }
.ui-select-popover { transform-origin: top center; }
.ui-select-popover.opens-up { transform-origin: bottom center; }

/* Modal y diálogos de confirmación */
.ui-dialog { scale: var(--scale-large); transition: scale var(--modal-close-dur) var(--ease-smooth-out), opacity var(--modal-close-dur) var(--ease-smooth-out); }
.ui-dialog-overlay:not(.opacity-0):not([hidden]) .ui-dialog, .ui-dialog.is-open { scale: 1; transition-duration: var(--modal-open-dur); }
.ui-dialog-overlay { transition: opacity var(--modal-open-dur) var(--ease-smooth-out); }
.app-modal-overlay { transition-timing-function: var(--ease-smooth-out); transition-duration: var(--panel-close-dur); }
.app-modal-overlay:not(.opacity-0) { transition-duration: var(--panel-open-dur); }

/* Hojas inferiores y telones: sin rebote ni blur progresivo */
.ui-select-sheet { transition: transform var(--panel-open-dur) var(--ease-smooth-out); }
.ui-select-sheet-overlay { transition: opacity var(--dropdown-open-dur) var(--ease-smooth-out); }
.ui-select-sheet-overlay.is-open, .app-modal-overlay:not(.opacity-0) .app-modal-backdrop, .more-sheet-backdrop { animation: none; }

/* Avisos */
@keyframes toast-in { from { opacity: 0; translate: 0 16px; scale: var(--scale-medium); filter: blur(var(--blur-small)); } to { opacity: 1; translate: 0 0; scale: 1; filter: blur(0); } }
@keyframes toast-in-top { from { opacity: 0; translate: 0 -16px; scale: var(--scale-medium); filter: blur(var(--blur-small)); } to { opacity: 1; translate: 0 0; scale: 1; filter: blur(0); } }
.toast { animation: toast-in var(--toast-open) var(--ease-smooth-out) both; transition: opacity var(--toast-close) var(--ease-smooth-out), transform var(--toast-close) var(--ease-smooth-out); }

/* Interruptor: la palanca viaja con el doble rebote de la skill (sin estiramiento) */
.ios-switch i::after, .admin-switch-track::after { transition: transform var(--toggle-dur) var(--toggle-ease); }
.ios-switch input:active + i::after, .ios-switch input:checked:active + i::after { scale: 1 1; width: 1.55rem; }
.ios-switch.is-pop i::after, .admin-switch.is-pop .admin-switch-track::after { animation: none; }
.ios-switch i, .admin-switch-track { transition: background-color var(--duration-quick) var(--ease-smooth-out); }

/* Casillas, radios y selectores: relleno de la caja en 150 ms, sin pop */
input[type='checkbox'], input[type='radio'] { transition: background-color var(--duration-quick) var(--ease-smooth-out), border-color var(--duration-quick) var(--ease-smooth-out), box-shadow var(--duration-quick) var(--ease-smooth-out); }
input.is-pop:checked, .seg-opt.is-pop input:checked + span, .swatch.is-pop i { animation: none; }
.swatch input:checked + i { transition: box-shadow var(--duration-quick) var(--ease-smooth-out); }

@media (prefers-reduced-motion: reduce) {
  .ui-dialog, .toast { animation: none !important; }
}
