/* ==========================================================
   RB · capa "Premium" (parche 18)
   Asfalto profundo + amarillo señal (el de los remolques) +
   azul para actuar. Cifras en letra de rótulo de carretera.
   ========================================================== */
:root { --rb-signal: #ffc629; --rb-asphalt: #111a24; --rb-asphalt-2: #1a2633; --rb-ease: cubic-bezier(.2,.7,.2,1); }

body { background: radial-gradient(1200px 400px at 70% -100px, rgba(31,85,208,.07), transparent 60%), var(--rb-road); }
html.dark body { background: var(--rb-road); }

/* Entrada suave de cada pantalla */
.page.active { animation: rbIn .28s var(--rb-ease); }
@keyframes rbIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .page.active { animation: none; } }

/* Barra superior translúcida */
#topbar { background: color-mix(in srgb, var(--rb-paper) 82%, transparent) !important; backdrop-filter: saturate(160%) blur(10px); -webkit-backdrop-filter: saturate(160%) blur(10px); border-bottom-color: var(--rb-line) !important; }

/* Menú lateral: asfalto con marca amarilla en lo activo */
aside:has(#sidebar-nav) { background: var(--rb-asphalt) !important; }
aside:has(#sidebar-nav) .sidebar-link { border-radius: 10px; }
aside:has(#sidebar-nav) .sidebar-link.active { background: rgba(255,255,255,.08) !important; color: #fff !important; box-shadow: inset 3px 0 0 var(--rb-signal); }
aside:has(#sidebar-nav) .sidebar-link:hover { background: rgba(255,255,255,.05) !important; }
aside:has(#sidebar-nav) .sg-header { opacity: .92; }

/* Tarjetas: más aire y una sombra casi invisible */
.card, .rbt-row, .rbx-asset, .rbd-hero, .rbt-actions button, .rbd-actions button { box-shadow: 0 1px 0 rgba(17,26,36,.04), 0 1px 3px rgba(17,26,36,.05); }
.rbx-asset, .rbt-row { transition: transform .15s var(--rb-ease), box-shadow .15s var(--rb-ease), border-color .15s; }
.rbx-asset:hover, .rbt-row:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(17,26,36,.08); }

/* Cifras en letra de rótulo */
.rbt-kpi b, .rbt-hero-stats b, .kpi-card .text-2xl, .kpi-card .text-3xl, .rbi-stock, .rbt-g-num { font-family: 'Barlow Semi Condensed', 'Atkinson Hyperlegible', sans-serif !important; letter-spacing: .01em; }

/* ── HOY: cabina ─────────────────────────────────────── */
.rbt-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 14px 24px; align-items: center;
  padding: 22px 24px; border-radius: 22px; color: #fff; background:
  radial-gradient(500px 220px at 85% 0%, rgba(255,198,41,.16), transparent 60%),
  radial-gradient(600px 300px at 0% 100%, rgba(31,85,208,.35), transparent 60%), var(--rb-asphalt); }
.rbt-hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: repeating-linear-gradient(90deg, var(--rb-signal) 0 34px, transparent 34px 58px); opacity: .55; }
.rbt-hero h1 { color: #fff !important; font-size: 1.9rem !important; margin: 0; }
.rbt-hero .rbt-date { color: rgba(255,255,255,.65) !important; margin: 0 0 2px; }
.rbt-sum { margin: 8px 0 0; color: rgba(255,255,255,.85); font-size: 1.02rem; }
.rbt-sum b { color: var(--rb-signal); }
.rbt-gauge { grid-row: 1 / span 2; grid-column: 2; }
.rbt-arc { transition: stroke-dasharray 1s var(--rb-ease); }
.rbt-g-num { fill: #fff; font-size: 40px; font-weight: 600; }
.rbt-g-lbl { fill: rgba(255,255,255,.7); font-size: 12px; font-family: 'Atkinson Hyperlegible', sans-serif; }
.rbt-hero-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.rbt-hero-stats button { display: grid; text-align: left; min-width: 112px; padding: 10px 14px; border-radius: 14px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.06); color: #fff; }
.rbt-hero-stats button:hover { background: rgba(255,255,255,.1); }
.rbt-hero-stats b { font-size: 1.7rem; line-height: 1; }
.rbt-hero-stats span { font-size: .85rem; color: rgba(255,255,255,.7); margin-top: 4px; }
.rbt-hero-stats .is-stop b { color: #ff8a8a; } .rbt-hero-stats .is-info b { color: #8fb0ff; } .rbt-hero-stats .is-warn b { color: var(--rb-signal); }
.rbt-kpis { display: none !important; }
@media (max-width: 640px) {
  .rbt-hero { grid-template-columns: 1fr; padding: 18px; border-radius: 18px; }
  .rbt-gauge { grid-row: auto; grid-column: 1; justify-self: center; }
  .rbt-hero h1 { font-size: 1.45rem !important; }
  .rbt-hero-stats button { flex: 1; min-width: 0; }
}

/* ── Barra "Dime qué necesitas" ─────────────────────── */
.rbc { display: grid; gap: 10px; }
.rbc-bar { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 16px; border-radius: 18px; background: var(--rb-paper); border: 2px solid var(--rb-line); transition: border-color .15s, box-shadow .15s; }
.rbc-bar:focus-within { border-color: var(--rb-blue); box-shadow: 0 0 0 4px rgba(31,85,208,.12); }
.rbc-ic { color: var(--rb-blue); }
.rbc-bar input { flex: 1; min-width: 0; border: 0 !important; outline: 0 !important; box-shadow: none !important; background: transparent; font-size: 17px; color: var(--rb-ink); padding: 8px 0 !important; min-height: 0 !important; }
.rbc-mic, .rbc-go { width: 46px; height: 46px; border-radius: 14px; border: 0; display: grid; place-items: center; flex: 0 0 auto; font-size: 1.05rem; }
.rbc-mic { background: var(--rb-blue-wash); color: var(--rb-blue); }
.rbc-mic.is-rec { background: var(--rb-stop); color: #fff; animation: rbvPulse 1.2s ease-in-out infinite; }
.rbc-go { background: var(--rb-blue); color: #fff; }
.rbc-ex { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.rbc-ex button { flex: 0 0 auto; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--rb-line); background: var(--rb-paper); color: var(--rb-ink-2); font-size: .9rem; white-space: nowrap; }
.rbc-ex button:hover { color: var(--rb-blue); border-color: var(--rb-blue); }
.rbc-out:empty { display: none; }
.rbc-msg { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--rb-blue-wash); color: var(--rb-ink); }
.rbc-msg i { color: var(--rb-blue); } .rbc-msg.is-err { background: var(--rb-stop-wash); color: var(--rb-stop); }
.rbc-msg .loading-spinner { width: 18px; height: 18px; }
.rbc-answer { padding: 14px 16px; border-radius: 16px; background: var(--rb-paper); border: 1px solid var(--rb-line); border-left: 5px solid var(--rb-blue); }
.rbc-q { font-size: .88rem; color: var(--rb-ink-3); margin-bottom: 6px; }
.rbc-a { font-size: 1rem; line-height: 1.55; color: var(--rb-ink); }
.rbc-back { position: fixed; inset: 0; z-index: 9996; background: rgba(17,26,36,.55); backdrop-filter: blur(3px); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.rbc-back .rbc { width: 100%; max-width: 680px; background: var(--rb-road); padding: 14px; border-radius: 22px; box-shadow: var(--shadow-xl); }
@media (max-width: 640px) { .rbc-back { padding-top: 10px; } }

/* Barra inferior del móvil más fina y elegante */
#mobile-bottom-nav { backdrop-filter: saturate(160%) blur(10px); -webkit-backdrop-filter: saturate(160%) blur(10px); background: color-mix(in srgb, var(--rb-paper) 88%, transparent) !important; }

/* Placas de la flota: brillo suave al pasar */
.rbt-plate { transition: transform .12s var(--rb-ease), box-shadow .12s; }
.rbt-plate:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(17,26,36,.14); }

/* Sugerencias */
.rbs-note { width: 100%; min-height: 110px; border: 1.5px solid var(--rb-line); border-radius: 12px; padding: 10px 12px; font-size: 16px; background: var(--rb-paper); color: var(--rb-ink); }

#dark-mode-icon { display: none !important; }

/* Modales ocultos que quedaban encima de la pantalla (ITV, Neumáticos, Partes, Documentos) */
.modal-overlay.hidden, .fixed.hidden { display: none !important; }
