/* Smart Charging by Solventium · estilo de la APP (26-10-2026): profundidad, degradados suaves, cristal y sombras.
   Un único acento de marca: rojo #CA0000. La landing mantiene el estilo plano. */
:root {
  --fondo: #0D0C0B; --fondo2: #1A0F0E; --brillo: rgba(202, 0, 0, .20);
  --panel: rgba(255, 255, 255, .055); --panel2: rgba(255, 255, 255, .09); --panel3: rgba(255, 255, 255, .15);
  --tinta: #F3EEE6; --tinta2: #BDB5AA; --sec: #9A948C; --linea: rgba(243, 238, 230, .09); --linea2: rgba(243, 238, 230, .18);
  --acento: #CA0000; --acento-h: #E01818; --acento-tinta: #FFFFFF; --error: #FF6B62; --ok: #6CC58A;
  --carga: #E01818;
  --barato: #6CC58A; --medio: #877E73; --caro: #E0A33A;
  --vidrio: rgba(30, 24, 22, .62); --vidrio-borde: rgba(255, 255, 255, .12);
  --sombra: 0 16px 40px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .07);
  --sombra-s: 0 6px 18px rgba(0, 0, 0, .35);
  --superficie: linear-gradient(160deg, rgba(255, 255, 255, .085), rgba(255, 255, 255, .035));
  --area0: rgba(255, 255, 255, .5); --area1: rgba(255, 120, 110, .22); --area2: rgba(202, 0, 0, 0);
  --linea-precio: #FFFFFF; --glow-linea: rgba(255, 255, 255, .4); --banda0: rgba(255, 96, 84, .34); --banda1: rgba(255, 96, 84, .1); --banda-borde: #FF6A5E;
  --car-a: #4A413D; --car-b: #231E1C; --car-borde: rgba(255, 255, 255, .22); --cargador-a: #3B3330; --cargador-b: #1E1917;
  --aviso-fondo: #F3EEE6; --aviso-tinta: #161412;
  --r: 26px; --gutter: 16px;
  --f-texto: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-titulo: "Archivo", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-family: var(--f-texto);
  color-scheme: dark;
}
:root[data-tema="claro"] {
  --fondo: #F8F4EE; --fondo2: #F0E3DA; --brillo: rgba(202, 0, 0, .12);
  --panel: rgba(255, 255, 255, .78); --panel2: rgba(255, 255, 255, .95); --panel3: rgba(22, 20, 18, .08);
  --tinta: #161412; --tinta2: #4A4540; --sec: #6F6862; --linea: rgba(22, 20, 18, .09); --linea2: rgba(22, 20, 18, .2);
  --acento-h: #A60000; --error: #B00000; --ok: #1E7A3E; --carga: #CA0000;
  --barato: #1E7A3E; --medio: #7A736C; --caro: #A86100;
  --vidrio: rgba(255, 255, 255, .72); --vidrio-borde: rgba(22, 20, 18, .1);
  --sombra: 0 14px 34px rgba(80, 40, 30, .13), inset 0 1px 0 rgba(255, 255, 255, .9);
  --sombra-s: 0 6px 16px rgba(80, 40, 30, .12);
  --superficie: linear-gradient(160deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, .62));
  --area0: rgba(202, 0, 0, .28); --area1: rgba(202, 0, 0, .1); --area2: rgba(202, 0, 0, 0);
  --linea-precio: #161412; --glow-linea: rgba(202, 0, 0, .25); --banda0: rgba(202, 0, 0, .3); --banda1: rgba(202, 0, 0, .08); --banda-borde: #CA0000;
  --car-a: #FFFFFF; --car-b: #D9D0C5; --car-borde: rgba(22, 20, 18, .28); --cargador-a: #FFFFFF; --cargador-b: #DDD4C9;
  --aviso-fondo: #161412; --aviso-tinta: #F8F4EE;
  color-scheme: light;
}
@font-face { font-family: "Inter"; src: url("/fonts/inter-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("/fonts/archivo-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--fondo); }
html, body { margin: 0; color: var(--tinta); }
body { min-height: 100dvh; font-size: 16px; line-height: 1.5; background: transparent; }
/* Fondo con profundidad: base oscura que se calienta hacia abajo y un brillo rojizo muy sutil arriba a la derecha. */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(70% 38% at 88% -4%, var(--brillo), transparent 72%), radial-gradient(60% 34% at 0% 104%, var(--brillo), transparent 70%), linear-gradient(180deg, var(--fondo) 0%, var(--fondo) 38%, var(--fondo2) 100%); }
#app { max-width: 560px; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 12px) var(--gutter) calc(env(safe-area-inset-bottom) + 120px); }
h1 { font-family: var(--f-titulo); font-size: 30px; font-weight: 700; line-height: 1.1; margin: 8px 0 4px; letter-spacing: -0.028em; text-wrap: balance; }
h2 { font-size: 15px; letter-spacing: -0.01em; color: var(--tinta2); margin: 32px 4px 10px; font-weight: 700; }
p { margin: 0 0 10px; }
a { color: var(--tinta); text-underline-offset: 3px; }
.sub { color: var(--tinta2); font-size: 15px; margin: 0; }
.peq { font-size: 14px; }
.sin-margen { margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- superficies de cristal ---------- */
.tarjeta, .grupo, .tesela { background: var(--superficie); border: 1px solid var(--vidrio-borde); box-shadow: var(--sombra); border-radius: var(--r);
  -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%); }
.tarjeta { padding: 24px 20px; }
.tarjeta + .tarjeta { margin-top: 14px; }
.cols { display: block; }
.cols .col > .tarjeta + .tarjeta { margin-top: 14px; }

/* ---------- controles ---------- */
label { display: block; font-weight: 600; margin: 0 0 8px; }
.campo { margin-bottom: 20px; }
.campo small { display: block; color: var(--tinta2); margin-top: 8px; font-size: 14px; }
input[type=text], input[type=password], input[type=time], input[type=number], select {
  width: 100%; min-height: 52px; padding: 12px 18px; font: inherit; color: var(--tinta); background: rgba(0, 0, 0, .22);
  border: 1px solid var(--linea2); border-radius: 18px; box-shadow: inset 0 2px 6px rgba(0, 0, 0, .25); }
:root[data-tema="claro"] input[type=text], :root[data-tema="claro"] input[type=password], :root[data-tema="claro"] input[type=time], :root[data-tema="claro"] input[type=number] { background: rgba(255, 255, 255, .85); box-shadow: inset 0 1px 3px rgba(60, 30, 20, .1); }
input::placeholder { color: var(--sec); }
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible, .graf:focus-visible, summary:focus-visible { outline: 2px solid var(--acento-h); outline-offset: 3px; }
:root[data-tema="claro"] input:focus-visible, :root[data-tema="claro"] button:focus-visible, :root[data-tema="claro"] a:focus-visible { outline-color: var(--acento); }
.fila { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.valor { font-family: var(--f-titulo); font-size: 34px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; margin: 4px 0; --p: 60%; }
input[type=range]::-webkit-slider-runnable-track { height: 10px; border-radius: 999px; background: linear-gradient(90deg, var(--acento-h) var(--p), var(--panel3) var(--p)); }
input[type=range]::-moz-range-track { height: 10px; border-radius: 999px; background: linear-gradient(90deg, var(--acento-h) var(--p), var(--panel3) var(--p)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -9px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 2px 10px rgba(0, 0, 0, .45), 0 0 0 4px rgba(224, 24, 24, .35); }
input[type=range]::-moz-range-thumb { width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 2px 10px rgba(0, 0, 0, .45), 0 0 0 4px rgba(224, 24, 24, .35); }

button, .boton { font: inherit; font-weight: 600; min-height: 52px; padding: 14px 26px; border-radius: 999px; border: 0; cursor: pointer; width: 100%;
  background: linear-gradient(180deg, #E01818, #CA0000 70%); color: var(--acento-tinta); box-shadow: 0 10px 26px rgba(202, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .22);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
button:not(.icono):not(.fila-menu):not(.tesela):not(.enlace):not(.sec):not(.velo):not(.nav-b):not(.chip-hogar):not(.seg-b):hover, .boton:hover { background: linear-gradient(180deg, #F02A2A, #E01818 70%); }
button:active { transform: scale(.98); }
button[disabled] { opacity: .55; }
button.sec { background: var(--panel2); color: var(--tinta); border: 1px solid var(--linea2); box-shadow: var(--sombra-s); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
button.sec:hover { background: var(--panel3); }
button.mini { width: auto; min-height: 44px; padding: 8px 20px; font-size: 15px; }
.boton { display: grid; place-content: center; text-decoration: none; }
button.icono { width: 48px; min-width: 48px; min-height: 48px; height: 48px; padding: 0; background: var(--panel2); color: var(--tinta); border: 1px solid var(--vidrio-borde); box-shadow: var(--sombra-s); display: grid; place-content: center; flex: none;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
button.icono:hover { background: var(--panel3); }
button.enlace { width: auto; min-height: 44px; padding: 0 6px; background: transparent; color: var(--tinta); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; border-radius: 10px; box-shadow: none; }
button.enlace:hover { text-decoration: underline; }
.icono svg, .enlace svg, .cheb svg, .ico-coche svg, .fm-i svg, nav svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icono svg { width: 22px; height: 22px; } .enlace svg { width: 18px; height: 18px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; background: rgba(0, 0, 0, .22); padding: 4px; border-radius: 999px; border: 1px solid var(--linea); }
:root[data-tema="claro"] .seg { background: rgba(22, 20, 18, .06); }
.seg button { min-height: 46px; background: transparent; color: var(--tinta2); border-radius: 999px; padding: 0 10px; box-shadow: none; border: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
.seg button[aria-pressed=true] { background: var(--panel3); color: var(--tinta); box-shadow: var(--sombra-s); }
:root[data-tema="claro"] .seg button[aria-pressed=true] { background: #fff; }
.seg.corto { min-width: 0; width: 164px; } .seg.corto button { padding: 0 6px; font-size: 15px; } .seg button.sec:hover { background: var(--panel3); }
.interruptor { appearance: none; -webkit-appearance: none; width: 58px; height: 34px; border-radius: 17px; background: var(--panel3); border: 1px solid var(--linea2); position: relative; cursor: pointer; flex: none; transition: background .2s; }
.interruptor::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .4); transition: transform .2s ease; }
.interruptor:checked { background: linear-gradient(180deg, #E01818, #CA0000); border-color: transparent; }
.interruptor:checked::after { transform: translateX(24px); }
.error { color: var(--error); font-weight: 600; }
code, .mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; word-break: break-all; }
.secreto { background: rgba(0, 0, 0, .25); border-radius: 18px; padding: 14px; margin: 12px 0; }
.secreto div { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 4px 0; }
.disp { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-top: 1px solid var(--linea); }
.disp:first-child { border-top: 0; padding-top: 0; } .disp:last-child { padding-bottom: 0; }
.disp b { display: block; } .disp span { color: var(--tinta2); font-size: 14px; }
.vacio { text-align: center; padding: 32px 20px; color: var(--tinta2); }
.vacio .escena { margin: 0 auto 8px; }

/* ---------- cabecera y marca ---------- */
.cabecera { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cabecera .acc { display: flex; gap: 10px; }
.marca { display: inline-flex; align-items: center; gap: 12px; color: var(--tinta); text-decoration: none; min-height: 48px; }
.marca img { width: 30px; height: 30px; flex: none; display: block; filter: drop-shadow(0 0 10px rgba(224, 24, 24, .55)); }
.marca-txt { display: grid; line-height: 1.1; }
.marca-txt b { font-family: var(--f-titulo); font-size: 23px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.marca-txt small { font-family: var(--f-texto); font-size: 13px; font-weight: 400; color: var(--sec); margin-top: 2px; white-space: nowrap; }
.marca.grande img { width: 46px; height: 46px; }
.marca.grande .marca-txt b { font-size: 34px; }
.marca.grande .marca-txt small { font-size: 14px; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; padding: 4px 12px; border-radius: 999px; background: var(--panel2); color: var(--tinta); border: 1px solid var(--linea2); white-space: nowrap; vertical-align: 1px; }
.chip.plan-premium, .chip.plan-vida, .chip.activa { background: var(--tinta); color: var(--fondo); border-color: transparent; }
.chip.candado { color: var(--tinta2); }
.ic-candado { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.bloqueado { position: relative; } .atenuado { opacity: .55; }
.velo, .velo:hover { position: absolute; inset: -8px; width: auto; min-height: 44px; background: transparent; border-radius: 18px; padding: 0; box-shadow: none; }
.barra-sub { margin: 4px 0 8px; }
.estrecho, .entrada { max-width: 480px; margin-left: auto; margin-right: auto; }

/* ---------- pantalla principal: gráfico a sangre ---------- */
.bloque-grafico { margin: 8px calc(var(--gutter) * -1) 0; }
.cab-grafico { align-items: flex-start; padding: 0 var(--gutter); }
.cab-grafico h2 { font-size: 19px; color: var(--tinta); margin: 0; white-space: nowrap; }
.graf { position: relative; touch-action: pan-y; user-select: none; -webkit-user-select: none; margin-top: 4px; cursor: crosshair; }
.graf:focus-visible { outline-offset: -3px; border-radius: 18px; }
.lienzo { display: block; line-height: 0; }
.grafico { display: block; max-width: 100%; overflow: visible; }
.grafico text { fill: var(--tinta2); font-size: 13px; font-family: var(--f-texto); font-variant-numeric: tabular-nums; }
.grafico .rejilla { stroke: var(--linea2); stroke-width: 1; }
.grafico .rejilla.v { stroke-dasharray: 2 6; opacity: .8; }
.ga0 { stop-color: var(--area0); } .ga1 { stop-color: var(--area1); } .ga2 { stop-color: var(--area2); }
.gb0 { stop-color: rgba(255, 70, 60, .7); } .gb1 { stop-color: rgba(224, 24, 24, .02); }
.grafico .area { stroke: none; }
.grafico .linea-precio { fill: none; stroke: var(--linea-precio); stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; filter: drop-shadow(0 0 5px var(--glow-linea)); }
.grafico .banda-carga { opacity: .9; }
.grafico .franja-carga { fill: var(--carga); filter: drop-shadow(0 0 6px rgba(255, 50, 40, .9)); }
.grafico .marca-sel line { stroke: var(--tinta2); stroke-width: 1.5; stroke-dasharray: 4 4; }
.grafico .marca-sel .punto-p { fill: #fff; stroke: var(--carga); stroke-width: 3; filter: drop-shadow(0 0 8px rgba(255, 255, 255, .8)); }
:root[data-tema="claro"] .grafico .marca-sel .punto-p { fill: #fff; filter: drop-shadow(0 0 6px rgba(202, 0, 0, .6)); }
.grafico .marca-sel .halo { fill: none; stroke: var(--carga); stroke-width: 2; opacity: .6; transform-box: fill-box; transform-origin: center; }
.tip { position: absolute; top: 6px; left: 0; background: var(--vidrio); border: 1px solid var(--vidrio-borde); color: var(--tinta); border-radius: 20px; padding: 10px 18px; pointer-events: none; white-space: nowrap; display: grid; gap: 2px; font-size: 14px; line-height: 1.3;
  box-shadow: var(--sombra-s); -webkit-backdrop-filter: blur(16px) saturate(150%); backdrop-filter: blur(16px) saturate(150%); transition: transform .12s ease-out; }
.tip b { font-size: 14px; font-weight: 600; color: var(--tinta2); }
.tip strong { font-family: var(--f-titulo); font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tip em { font-style: normal; font-size: 13px; color: var(--tinta2); }
.tip em.carga::before { content: ""; display: inline-block; width: 10px; height: 6px; border-radius: 3px; background: var(--carga); margin-right: 6px; vertical-align: 1px; box-shadow: 0 0 8px var(--carga); }
.leyenda { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; color: var(--tinta2); padding: 0 var(--gutter); margin-top: 6px; }
.leyenda i { display: inline-block; border-radius: 3px; margin-right: 8px; vertical-align: middle; }
.leyenda .l-precio { width: 16px; height: 3px; background: var(--linea-precio); }
.leyenda .l-carga { width: 16px; height: 6px; background: var(--carga); box-shadow: 0 0 8px var(--carga); }
.leyenda .l-ahora { width: 0; height: 14px; border-left: 2px dashed var(--tinta2); border-radius: 0; }

/* ---------- tarjeta del coche y escena ---------- */
.tarjeta.coche { margin-top: 18px; padding: 0; overflow: hidden; border-radius: 28px; }
.escena-caja { padding: 18px 12px 0; position: relative; background: radial-gradient(70% 90% at 62% 100%, rgba(224, 24, 24, .16), transparent 70%); }
.escena { display: block; width: 100%; height: auto; max-height: 150px; overflow: visible; }
.escena.grande { max-height: 240px; }
.escena .suelo { stroke: var(--linea2); stroke-width: 1.5; }
.escena .sombra-suelo { fill: rgba(0, 0, 0, .45); }
:root[data-tema="claro"] .escena .sombra-suelo { fill: rgba(80, 40, 30, .2); }
.escena .cs1 { stop-color: var(--car-a); } .escena .cs2 { stop-color: var(--car-b); }
.escena .ch1 { stop-color: var(--cargador-a); } .escena .ch2 { stop-color: var(--cargador-b); }
.escena .carro { stroke: var(--car-borde); stroke-width: 1.5; }
.escena .cristal { fill: rgba(255, 255, 255, .13); stroke: var(--car-borde); stroke-width: 1; }
:root[data-tema="claro"] .escena .cristal { fill: rgba(22, 20, 18, .1); }
.escena .rueda { fill: #17120F; stroke: var(--car-borde); stroke-width: 1.5; } .escena .llanta { fill: #8E857C; }
.escena .faro { fill: #fff; filter: drop-shadow(0 0 5px rgba(255, 255, 255, .9)); } .escena .piloto { fill: #FF3B30; filter: drop-shadow(0 0 5px rgba(255, 59, 48, .9)); }
.escena .cargador { stroke: var(--car-borde); stroke-width: 1.5; }
.escena .pantalla { fill: rgba(0, 0, 0, .45); } :root[data-tema="claro"] .escena .pantalla { fill: rgba(22, 20, 18, .55); }
.escena .led { fill: var(--sec); }
.escena .cable { fill: none; stroke: var(--tinta2); stroke-width: 3.5; stroke-linecap: round; opacity: .85; }
.escena .flujo { fill: none; stroke: #FF5A4E; stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 5 11; opacity: 0; filter: drop-shadow(0 0 5px #FF3B30); }
.escena .rayo-c { fill: #FF4A3F; filter: drop-shadow(0 0 8px rgba(255, 60, 50, .95)); transform-box: fill-box; transform-origin: center; }
.escena .rayo-p { fill: var(--tinta2); }
.escena .ok-b { fill: #2E9E5B; } .escena .ok-t { fill: none; stroke: #fff; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.escena .luna { fill: var(--tinta2); }
.escena .punteado { fill: none; stroke: var(--sec); stroke-width: 2; stroke-dasharray: 5 6; stroke-linejoin: round; }
.escena .mas { fill: none; stroke: var(--tinta2); stroke-width: 3; stroke-linecap: round; }
.escena .aviso-t { fill: var(--tinta2); font-size: 12px; font-family: var(--f-texto); font-weight: 600; text-anchor: middle; }
.e-cargando .led { fill: #FF3B30; filter: drop-shadow(0 0 5px #FF3B30); } .e-cargando .flujo { opacity: 1; }
.e-listo .led { fill: #37B26C; filter: drop-shadow(0 0 5px #37B26C); }
.e-espera .coche-g, .e-espera .cable { opacity: .75; }
.e-sin_conexion .coche-g { opacity: .5; filter: grayscale(1); } .e-sin_conexion .cable { opacity: .5; }
.fila-coche { display: grid; grid-template-columns: 84px 1fr auto; gap: 16px; align-items: center; padding: 8px 20px 0; }
.aro-coche { position: relative; width: 84px; height: 84px; }
.aro-coche svg { width: 100%; height: 100%; transform: rotate(-90deg); display: block; overflow: visible; }
.aro-coche .pista { stroke: var(--panel3); }
.aro-coche .arco { filter: drop-shadow(0 0 6px rgba(224, 24, 24, .7)); }
.ico-coche { position: absolute; inset: 9px; display: grid; place-content: center; color: var(--tinta); background: var(--panel2); border-radius: 50%; border: 1px solid var(--vidrio-borde); }
.ico-coche svg { width: 44px; height: 16px; stroke-width: 6; }
.aro-coche .pct { position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%); background: var(--fondo); border: 1px solid var(--linea2); border-radius: 999px; padding: 1px 9px; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.datos-coche { display: grid; gap: 2px; min-width: 0; }
.datos-coche .estado { margin: 0; font-family: var(--f-titulo); font-size: 22px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.pie-coche { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 20px 0; padding: 6px 0 14px; border-top: 1px solid var(--linea); }
.pie-coche .sub { display: inline-flex; align-items: center; gap: 8px; }
.pie-coche .sub svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.tarjeta.coche > p { margin: 0 20px 16px; }

/* ---------- teselas ---------- */
.teselas { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.tesela { color: var(--tinta); padding: 20px; display: flex; flex-direction: column; gap: 8px; text-align: left; width: auto; min-height: 172px; font-weight: 400; position: relative; overflow: hidden; transition: transform .15s ease; }
button.tesela { cursor: pointer; background: var(--superficie); }
button.tesela:hover { background: var(--superficie); transform: translateY(-2px); }
.tesela .et { font-size: 14px; color: var(--tinta2); font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.tesela .et svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tesela b { font-family: var(--f-titulo); font-size: 40px; line-height: 1; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; margin-top: 4px; }
.tesela b small { font-family: var(--f-texto); font-size: 17px; font-weight: 600; color: var(--tinta2); letter-spacing: 0; }
.tesela .pie { font-size: 14px; color: var(--tinta2); margin-top: auto; }
.tesela.estado-tes b { font-size: 30px; line-height: 1.05; }
.tesela.alerta, button.tesela.alerta { background: linear-gradient(150deg, #E01818 0%, #CA0000 55%, #9C0000 100%); color: #fff; border-color: rgba(255, 255, 255, .25); box-shadow: 0 16px 36px rgba(202, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .3); }
.tesela.alerta .et, .tesela.alerta .pie, .tesela.alerta b { color: #fff; }
.tesela.ok, button.tesela.ok { background: linear-gradient(150deg, #238048 0%, #1E7A3E 60%, #17612F 100%); color: #fff; border-color: rgba(255, 255, 255, .22); box-shadow: 0 16px 36px rgba(30, 122, 62, .35), inset 0 1px 0 rgba(255, 255, 255, .25); }
.tesela.ok .et, .tesela.ok .pie, .tesela.ok b { color: #fff; }
.tarjeta.ahorro { margin-top: 14px; }
.cifras { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.cifras b { display: block; font-family: var(--f-titulo); font-size: 24px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.cifras span { font-size: 14px; color: var(--tinta2); }

/* ---------- barra inferior flotante (cristal) ---------- */
nav { position: fixed; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom) + 14px); padding: 0 14px; pointer-events: none; z-index: 20; }
nav > div { pointer-events: auto; max-width: 520px; margin: 0 auto; display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 999px; background: var(--vidrio); border: 1px solid var(--vidrio-borde);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .08); -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%); }
:root[data-tema="claro"] nav > div { box-shadow: 0 16px 38px rgba(80, 40, 30, .2), inset 0 1px 0 rgba(255, 255, 255, .9); }
nav button.nav-b { width: 56px; min-width: 56px; height: 56px; min-height: 56px; padding: 0; border-radius: 50%; background: var(--panel2); color: var(--tinta2); box-shadow: none; display: grid; place-content: center; flex: none; border: 1px solid transparent; }
nav button.nav-b svg { width: 26px; height: 26px; }
nav button.nav-b:hover { background: var(--panel3); color: var(--tinta); }
nav button.nav-b[aria-current=page] { color: #fff; background: linear-gradient(160deg, #E01818, #CA0000); box-shadow: 0 8px 22px rgba(202, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .3); }
nav button.nav-b .rayo-i { width: 26px; height: 26px; display: block; filter: brightness(0) invert(1); opacity: .92; }
nav button.nav-b:not([aria-current=page]) .rayo-i { filter: none; opacity: 1; }
nav button.nav-p[aria-current=page] { background: var(--panel3); color: var(--tinta); box-shadow: inset 0 0 0 1.5px var(--acento-h); }
nav button.chip-hogar { flex: 1; min-width: 0; height: 56px; min-height: 56px; border-radius: 999px; background: var(--panel2); color: var(--tinta); box-shadow: none; display: flex; align-items: center; gap: 10px; padding: 0 16px; justify-content: flex-start; border: 1px solid transparent; font-size: 14px; font-weight: 700; letter-spacing: .01em; }
nav button.chip-hogar:hover { background: var(--panel3); }
nav button.chip-hogar svg:first-child { width: 36px; height: 14px; flex: none; stroke-width: 7; }
nav .sel-n { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; text-align: left; }
nav .chip-hogar > svg:last-child { width: 18px; height: 18px; color: var(--sec); }
nav .et-nav { display: none; }
#aviso { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 100px); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--aviso-fondo); color: var(--aviso-tinta);
  padding: 12px 20px; border-radius: 999px; font-size: 14px; font-weight: 600; transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); box-shadow: var(--sombra-s); z-index: 30; }
#aviso.ver { opacity: 1; transform: translate(-50%, 0); }

/* ---------- menú de ajustes ---------- */
.grupo { margin-top: 14px; overflow: hidden; }
.cols .col > .grupo:first-child { margin-top: 0; }
.fila-menu { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 68px; padding: 12px 18px; background: transparent; color: var(--tinta); border: 0; border-radius: 0; border-top: 1px solid var(--linea); text-align: left; font-weight: 400; text-decoration: none; cursor: pointer; box-shadow: none; }
.grupo > .fila-menu:first-child { border-top: 0; }
.fila-menu:hover { background: var(--panel2); }
.fila-menu.pronto { cursor: default; } .fila-menu.pronto:hover { background: transparent; } .fila-menu.pronto b { color: var(--tinta2); }
.fm-i { width: 40px; height: 40px; border-radius: 14px; background: var(--panel2); border: 1px solid var(--linea); display: grid; place-content: center; flex: none; }
.fm-i svg { width: 22px; height: 22px; }
.fm-t { display: grid; gap: 2px; min-width: 0; flex: 1; } .fm-t b { font-weight: 600; }
.cheb { color: var(--sec); display: grid; } .cheb svg { width: 20px; height: 20px; }
.tarjeta.mejora { position: relative; overflow: hidden; padding: 24px 22px 22px; background: linear-gradient(150deg, rgba(224, 24, 24, .22), rgba(255, 255, 255, .05) 60%), var(--superficie); }
.mejora-t { font-size: 27px; line-height: 1.1; letter-spacing: -0.025em; color: var(--tinta); margin: 4px 0 10px; font-family: var(--f-titulo); }
.mejora .sub { margin-bottom: 18px; }
.mejora .escena { width: 100%; max-height: 128px; margin: -6px 0 0; }
.mejora button { position: relative; }
.glosario { margin: 0; } .glosario dt { font-weight: 600; margin-top: 14px; } .glosario dt:first-child { margin-top: 0; } .glosario dd { margin: 2px 0 0; color: var(--tinta2); }

/* ---------- hojas (modales) ---------- */
.hoja { border: 1px solid var(--vidrio-borde); border-radius: 30px 30px 0 0; background: var(--superficie), var(--fondo); background-color: color-mix(in srgb, var(--fondo2) 92%, #000); color: var(--tinta); padding: 26px 22px calc(env(safe-area-inset-bottom) + 22px);
  width: 100%; max-width: 520px; margin: auto auto 0; box-shadow: 0 -20px 60px rgba(0, 0, 0, .5); }
:root[data-tema="claro"] .hoja { background-color: #FBF8F3; }
.hoja::backdrop { background: rgba(8, 6, 6, .55); -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px); }
.hoja-t { font-family: var(--f-titulo); font-size: 27px; line-height: 1.12; letter-spacing: -0.025em; color: var(--tinta); margin: 0 0 12px; }
.hoja p { color: var(--tinta2); }
.paso { font-size: 14px; color: var(--tinta2); margin: 0 0 10px; font-weight: 600; }
.codigo { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--linea); } .codigo label { margin-bottom: 2px; }
.ventajas { margin: 14px 0; padding-left: 20px; } .ventajas li { margin-bottom: 8px; }
.acciones { display: grid; gap: 10px; margin-top: 18px; }
.acciones.dos { grid-template-columns: 1fr 1fr; }
.hoja .grupo { margin-top: 12px; }
.paso-pt { display: flex; gap: 6px; margin: 0 0 14px; } .paso-pt i { height: 4px; flex: 1; border-radius: 2px; background: var(--panel3); } .paso-pt i.on { background: var(--acento-h); box-shadow: 0 0 8px rgba(224, 24, 24, .7); }

/* ---------- entrada y alta ---------- */
.entrada { min-height: calc(100dvh - 24px); display: grid; align-content: center; gap: 16px; padding-bottom: 24px; }
.entrada .escena { margin: 4px 0 0; }
.entrada h1 { font-size: 40px; margin-top: 4px; }
.vidrio { padding: 22px 20px; }
.volver { display: inline-flex; align-items: center; min-height: 44px; color: var(--tinta2); font-weight: 600; text-decoration: none; }
.volver:hover { color: var(--tinta); text-decoration: underline; }
.entrada a:not(.volver):not(.marca) { color: var(--tinta); font-weight: 600; text-underline-offset: 3px; }
.ayuda { font-size: 14px; }
.heroe-alta { text-align: center; padding: 8px 0 4px; } .heroe-alta .escena { max-height: 160px; margin: 8px auto 0; }
.pasos-alta h2 { display: flex; align-items: center; gap: 10px; } .pasos-alta h2 i { font-style: normal; width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(160deg, #E01818, #CA0000); color: #fff; display: grid; place-content: center; font-size: 14px; font-weight: 700; box-shadow: 0 4px 12px rgba(202, 0, 0, .45); }
.esqueleto { height: 300px; border-radius: var(--r); background: var(--superficie); border: 1px solid var(--vidrio-borde); }
.esqueleto.corto { height: 160px; } .esqueleto + .esqueleto { margin-top: 14px; }
.vacio-grafico { text-align: center; padding: 40px 24px; }
.vacio-grafico svg { width: 220px; max-width: 80%; height: auto; margin: 0 auto 8px; display: block; }

/* ---------- búsqueda de dirección ---------- */
.combo { position: relative; }
.resultados { list-style: none; margin: 6px 0 0; padding: 6px; position: absolute; left: 0; right: 0; z-index: 5; background: var(--vidrio); border-radius: 20px; max-height: 270px; overflow: auto; border: 1px solid var(--vidrio-borde); box-shadow: var(--sombra);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.resultados[hidden] { display: none; }
.resultados li { padding: 10px 14px; border-radius: 14px; cursor: pointer; display: grid; gap: 2px; min-height: 48px; align-content: center; }
.resultados li b { font-weight: 600; } .resultados li span { font-size: 14px; color: var(--tinta2); }
.resultados li[aria-selected=true], .resultados li:hover { background: var(--panel3); outline: 2px solid var(--acento-h); outline-offset: -2px; }
.elegida { font-size: 14px; font-weight: 600; margin: 10px 0 0; } .elegida:empty { display: none; }
.avanzado { margin-top: 16px; } .avanzado summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--tinta2); font-weight: 600; } .avanzado .campo { margin-top: 8px; }

/* ---------- animaciones (solo transform, opacity y trazo) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .grafico.anim .linea-precio { stroke-dasharray: 1; stroke-dashoffset: 1; animation: trazar 1.2s cubic-bezier(.3, .7, .2, 1) .1s forwards; }
  .grafico.anim .area { opacity: 0; animation: aparecer .9s ease-out .6s forwards; }
  .grafico.anim .banda-carga, .grafico.anim .franja-carga { opacity: 0; animation: aparecer .7s ease-out 1.1s forwards; }
  .grafico.anim .marca-sel { opacity: 0; animation: aparecer .5s ease-out 1.2s forwards; }
  .grafico .marca-sel .halo { animation: latir 2s ease-out infinite; }
  .arco-anim { stroke-dashoffset: var(--c); animation: llenar 1.3s cubic-bezier(.3, .7, .2, 1) .2s forwards; }
  .e-cargando .flujo { animation: fluir 1s linear infinite; }
  .e-cargando .rayo-c { animation: pulsa 1.3s ease-in-out infinite; }
  .e-cargando .carro { animation: respira 3s ease-in-out infinite; }
  .hoja[open] { animation: subir .38s cubic-bezier(.2, .8, .2, 1); }
  .hoja[open]::backdrop { animation: aparecer .3s ease-out; }
  .tarjeta, .tesela, .grupo { animation: entra .5s cubic-bezier(.2, .8, .2, 1) backwards; }
  .tesela:nth-child(2) { animation-delay: .06s; } .tarjeta.coche { animation-delay: .05s; }
  .esqueleto { animation: pulso 1.4s ease-in-out infinite; }
  @keyframes trazar { to { stroke-dashoffset: 0; } }
  @keyframes aparecer { to { opacity: 1; } }
  @keyframes llenar { to { stroke-dashoffset: var(--off); } }
  @keyframes fluir { to { stroke-dashoffset: -32; } }
  @keyframes pulsa { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.18); opacity: .75; } }
  @keyframes respira { 50% { transform: translateY(-1px); } }
  @keyframes latir { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(2.6); opacity: 0; } }
  @keyframes subir { from { transform: translateY(40px); opacity: 0; } }
  @keyframes entra { from { transform: translateY(12px); opacity: 0; } }
  @keyframes pulso { 50% { opacity: .55; } }
}
@media (prefers-reduced-motion: no-preference) { .quieto .tarjeta, .quieto .tesela, .quieto .grupo { animation: none; } .quieto .arco-anim { animation: none; stroke-dashoffset: var(--off); } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } .arco-anim { stroke-dashoffset: var(--off); } }

/* ---------- responsive ---------- */
@media (max-width: 380px) { .teselas { gap: 8px; } .tesela { padding: 16px; } .tesela b { font-size: 32px; } .fila-coche { grid-template-columns: 72px 1fr auto; gap: 12px; } .aro-coche { width: 72px; height: 72px; } nav button.chip-hogar { padding: 0 12px; } }
@media (min-width: 600px) and (max-width: 899px) { #app { max-width: 720px; } }
@media (max-width: 899px) { .cols .col:first-child > h2:first-child { margin-top: 28px; } .cols .col + .col { margin-top: 14px; } }
@media (min-width: 900px) {
  body::before { background: radial-gradient(50% 50% at 90% -6%, var(--brillo), transparent 72%), radial-gradient(50% 50% at 0% 106%, var(--brillo), transparent 70%), linear-gradient(180deg, var(--fondo) 0%, var(--fondo) 38%, var(--fondo2) 100%); }
  #app { max-width: 1180px; padding: calc(env(safe-area-inset-top) + 104px) 40px 64px; }
  .cols { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(360px, 1fr); gap: 0 32px; align-items: start; }
  .cols .col > h2:first-child { margin-top: 32px; }
  .cols .col > .tarjeta.coche:first-child { margin-top: 0; }
  .cols .col > .grupo:first-child { margin-top: 0; }
  .bloque-grafico { margin: 0; background: var(--superficie); border: 1px solid var(--vidrio-borde); box-shadow: var(--sombra); border-radius: 32px; padding: 24px 0 18px; -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); overflow: hidden; }
  .cab-grafico, .leyenda { padding: 0 28px; }
  .hoja { margin: auto; border-radius: 30px; }
  .entrada { min-height: calc(100dvh - 140px); }
  nav { top: 18px; bottom: auto; }
  nav > div { max-width: 640px; }
  nav button.nav-b { width: auto; border-radius: 999px; padding: 0 20px; gap: 10px; display: flex; align-items: center; }
  nav .et-nav { display: inline; font-size: 15px; font-weight: 600; }
  nav button.chip-hogar { max-width: 280px; }
  #aviso { bottom: 32px; }
}

.solo-d { display: none; }
@media (min-width: 560px) { .solo-d { display: inline; } }

.hoja > .escena { max-height: 104px; margin: -4px auto 10px; }
.hoja .paso-pt { margin-top: 2px; }

/* ---------- instalación preparada por Solventium ---------- */
.tarjeta.confirmar { margin-top: 14px; background: linear-gradient(150deg, rgba(224, 24, 24, .26), rgba(255, 255, 255, .05) 62%), var(--superficie); border-color: rgba(224, 24, 24, .45); box-shadow: 0 16px 44px rgba(202, 0, 0, .22), var(--sombra); padding: 24px 22px; }
.confirmar .hoja-t { font-size: 24px; margin-bottom: 8px; }
.resumen { margin: 16px 0 12px; display: grid; gap: 0; }
.resumen div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--linea); }
.resumen div:first-child { border-top: 0; }
.resumen dt { color: var(--tinta2); font-size: 15px; } .resumen dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.transparencia { margin: 4px 0 4px; }
.perfil-crm { margin-bottom: 4px; } .perfil-crm .disp .chip { margin-top: 6px; }
.seg.tres button { font-size: 14px; padding: 0 4px; }
.tarifa-fija { margin-top: 16px; }
.tres-precios { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0 0; }
.tres-precios input { padding: 12px 10px; text-align: center; font-variant-numeric: tabular-nums; }
.tres-precios label { font-size: 14px; }
.periodos-caja { margin-top: 18px; }
.periodos { display: flex; height: 14px; border-radius: 7px; overflow: hidden; margin-top: 10px; gap: 2px; }
.periodos span { display: block; } .per-valle { background: var(--barato); } .per-llano { background: var(--medio); } .per-punta { background: var(--caro); }
.periodos-h { display: flex; font-size: 13px; color: var(--tinta2); margin-top: 4px; font-variant-numeric: tabular-nums; } .periodos-h span { display: block; }
.per-leyenda { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; font-size: 14px; color: var(--tinta2); }
.per-leyenda i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 8px; vertical-align: -1px; }

/* ---------- horas más baratas ---------- */
.gm0 { stop-color: var(--banda0); } .gm1 { stop-color: var(--banda1); }
.grafico .banda-mejor { stroke: var(--banda-borde); stroke-width: 1.5; filter: drop-shadow(0 0 8px var(--banda-borde)); }
.tarjeta.mejores { margin-top: 14px; }
.tarjeta.mejores:focus-visible { outline: 2px solid var(--acento-h); outline-offset: 3px; }
.mh-t { font-size: 18px; color: var(--tinta); line-height: 1.25; margin: 0 0 14px; }
.durs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.durs button { min-height: 48px; padding: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.durs button[aria-pressed=true] { background: linear-gradient(180deg, #E01818, #CA0000); color: #fff; border-color: transparent; box-shadow: 0 8px 20px rgba(202, 0, 0, .4); }
.frase-mejor { margin: 16px 0 6px; font-size: 17px; line-height: 1.45; } .frase-mejor strong { font-weight: 700; font-family: var(--f-titulo); }
.nota-guia { margin: 6px 0 0; }
.mejores-ir { margin-top: 2px; padding: 0; min-height: 36px; font-size: 14px; color: var(--tinta2); }
.bloque-grafico .mejores-ir { margin-left: -2px; }
@media (min-width: 900px) { .cols .col > .tarjeta.mejores { margin-top: 14px; } }

.resumen dd .enlace { display: block; margin-left: auto; font-size: 14px; }
.corrige { display: grid; gap: 6px; justify-items: end; }
.corr-fila { display: inline-flex; align-items: center; gap: 6px; }
input.corr { width: 84px; min-height: 44px; padding: 8px 10px; text-align: right; }
.chip.aviso-ia { font-weight: 500; font-size: 13px; background: rgba(224, 163, 58, .16); border-color: rgba(224, 163, 58, .5); white-space: normal; text-align: right; }
:root[data-tema="claro"] .chip.aviso-ia { background: rgba(168, 97, 0, .1); border-color: rgba(168, 97, 0, .5); }
.corrige > div:empty { display: none; }
.tarjeta.mejores { scroll-margin-top: 16px; }

/* ---------- modo energía (sin conexión con el coche) ---------- */
.fila-coche.sin-aro { grid-template-columns: 64px 1fr auto; }
.ico-coche.solo { position: static; inset: auto; width: 64px; height: 64px; background: var(--panel2); }
.ico-coche.solo svg { width: 38px; height: 15px; }
.sin-coche-nota { margin: 12px 20px 0; }
.sin-coche-nota .enlace { display: inline-flex; padding: 0; min-height: 36px; text-decoration: underline; text-underline-offset: 3px; }
.energia-fila { margin-top: 16px; }
.aviso-aprende { margin: 6px 0 0; padding: 10px 14px; border-radius: 14px; background: rgba(224, 163, 58, .14); border: 1px solid rgba(224, 163, 58, .4); color: var(--tinta); }
:root[data-tema="claro"] .aviso-aprende { background: rgba(168, 97, 0, .08); border-color: rgba(168, 97, 0, .4); }
.energia .estim, .energia p[aria-live] { margin-top: 12px; }

/* ---------- privacidad ---------- */
.texto-consent { font-size: 16px; line-height: 1.55; margin: 12px 0 6px; }
.hoja p { margin: 0 0 12px; }
.disp .chip { display: inline-flex; }
.disp > div > span { display: block; }
.disp > div > span.chip { display: inline-flex; margin-top: 6px; width: max-content; }
.disp > div > span.chip + span { margin-top: 6px; }
