/* Panel de feria · Mesa y Comanda. Colores y tipografía de la aplicación. */
:root {
  /* Paleta de la aplicación Mesa y Comanda (admin.css): azul marino, azules y grises pizarra. */
  --navy: #151A40;
  --navy-2: #20275C;
  --navy-3: #2E3876;
  --navy-hover: #0D112B;
  --navy-light: #EEF1F8;
  --navy-claro: #B9C3F0;
  --bg: #F4F6FB;
  --bg-subtle: #EDF0F6;
  --white: #FFFFFF;
  --border: #E2E8F0;
  --slate: #334155;
  --slate-2: #475569;
  --slate-3: #64748B;
  --slate-4: #94A3B8;
  --success: #10B981;
  --success-light: #EAFBF1;
  --danger: #E11D48;
  --text: #151A40;
  --text-body: #475569;
  --text-muted: #64748B;
  --font: 'Lato', 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 2px 10px rgba(21, 26, 64, 0.06);
  --shadow-lg: 0 8px 30px rgba(21, 26, 64, 0.12);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-body);
  font-size: 18px;
  line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
  min-height: 100vh;
}
h1, h2, h3 { color: var(--text); margin: 0; line-height: 1.15; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }
svg { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
svg .relleno { fill: currentColor; stroke: none; }

/* ---------- Acceso ---------- */
body.fuera { background: var(--navy); color: #fff; display: grid; place-items: center; padding: 24px 16px; }
.acceso-caja { width: min(380px, 100%); text-align: center; }
.acceso-logo { width: 96px; height: auto; }
.acceso h1 { color: #fff; font-size: 30px; font-weight: 900; margin-top: 12px; }
.acceso p { color: rgba(255,255,255,.7); margin: 6px 0 24px; }
.pin-puntos { display: flex; justify-content: center; gap: 14px; margin-bottom: 24px; }
.pin-puntos span { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.55); transition: background .15s; }
.pin-puntos span.lleno { background: #fff; border-color: #fff; }
.pin-oculto { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.teclado { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.teclado button { height: 68px; border-radius: 18px; border: 0; background: rgba(255,255,255,.1); color: #fff; font-size: 26px; font-weight: 700; }
.teclado button:active { background: rgba(255,255,255,.25); }
.teclado .ok { background: var(--navy-3); font-size: 18px; }
.acceso-error { min-height: 24px; color: #FFB4A8 !important; margin-top: 16px !important; }
.agitar { animation: agitar .35s; }
@keyframes agitar { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

/* ---------- Barra superior ---------- */
.barra {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(16px, 3vw, 40px);
  background: rgba(250, 248, 245, .94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.marca { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.marca img { width: 52px; height: auto; }
.marca strong { display: block; color: var(--navy); font-size: 21px; font-weight: 900; letter-spacing: -.01em; }
.marca small { display: block; color: var(--text-muted); font-size: 14px; }
.barra-der { display: flex; align-items: center; gap: 12px; }
.btn-volver {
  display: inline-flex; align-items: center; min-height: 52px; padding: 0 22px;
  border-radius: 999px; background: var(--navy); color: #fff; text-decoration: none; font-weight: 700;
}
.estado-red { background: var(--navy-light); color: var(--navy-2); border-radius: 999px; padding: 8px 14px; font-size: 15px; font-weight: 700; }

main#vistas { padding: clamp(20px, 3.5vw, 48px) clamp(16px, 3vw, 40px) 48px; max-width: 1600px; margin: 0 auto; }
.vista { animation: entrar .45s var(--ease); }
@keyframes entrar { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.vista-titulo { font-size: clamp(30px, 4vw, 44px); font-weight: 900; letter-spacing: -.02em; }
.vista-sub { font-size: clamp(17px, 1.8vw, 21px); margin: 8px 0 28px; color: var(--text-body); max-width: 760px; }

/* ---------- Inicio ---------- */
.inicio-titulo { text-align: center; margin: 0 0 24px; }
.inicio-titulo h1 { font-size: clamp(32px, 4.4vw, 50px); font-weight: 900; letter-spacing: -.02em; }
.inicio-titulo p { font-size: 20px; margin: 8px 0 0; }
.botonera { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.boton-grande {
  position: relative; display: flex; flex-direction: column; align-items: flex-start;
  min-height: clamp(170px, calc((100vh - 330px) * .6), 260px);
  padding: 20px 20px 22px;
  border-radius: var(--radius-lg);
  text-decoration: none; color: #fff; background: var(--navy);
  box-shadow: var(--shadow-lg);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s;
  overflow: hidden;
}
.boton-grande::after { content: "›"; position: absolute; right: 18px; top: 14px; font-size: 34px; line-height: 1; opacity: .45; }
.boton-grande:active { transform: scale(.98); background: var(--navy-hover); }
@media (hover: hover) { .boton-grande:hover { transform: translateY(-3px); } }
.boton-grande:nth-child(2) { background: var(--navy-2); }
.boton-grande:nth-child(3) { background: var(--navy-3); }
.boton-grande:nth-child(4) { background: var(--slate); }
.boton-grande:nth-child(5) { background: var(--slate-2); }
.boton-grande .icono {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px;
  background: rgba(255,255,255,.13); margin-bottom: auto;
}
.boton-grande .icono svg { width: 32px; height: 32px; }
.boton-grande .titulo { font-size: clamp(20px, 1.7vw, 25px); font-weight: 900; letter-spacing: -.01em; line-height: 1.15; margin-top: 18px; }
.boton-grande .texto { font-size: 15px; line-height: 1.35; color: rgba(255,255,255,.82); margin-top: 6px; }
.pie-inicio { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.enlace-equipo { color: var(--text-muted); font-size: 16px; text-decoration: none; padding: 10px 0; }
.enlace-equipo b { color: var(--navy); }

/* ---------- Demo ---------- */
.demo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.demo-tarjeta {
  display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: clamp(24px, 3vw, 40px); text-decoration: none; box-shadow: var(--shadow);
}
.demo-tarjeta .icono { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 22px; background: var(--navy-light); color: var(--navy); margin-bottom: 24px; }
.demo-tarjeta .icono svg { width: 50px; height: 50px; }
.demo-tarjeta h2 { font-size: 30px; font-weight: 900; }
.demo-tarjeta p { margin: 10px 0 20px; font-size: 18px; }
.demo-tarjeta .accion { margin-top: auto; color: var(--navy-3); font-weight: 900; font-size: 20px; text-decoration: none; }
a.demo-tarjeta:first-child { background: var(--navy); border-color: var(--navy); }
a.demo-tarjeta:first-child h2, a.demo-tarjeta:first-child p { color: #fff; }
a.demo-tarjeta:first-child .icono { background: rgba(255,255,255,.14); color: #fff; }
a.demo-tarjeta:first-child .accion { color: var(--navy-claro); }
.qr-caja { align-self: center; background: #fff; padding: 12px; border-radius: 16px; border: 1px solid var(--border); margin-bottom: 16px; }
.qr-caja canvas { display: block; width: min(260px, 60vw); height: auto; image-rendering: pixelated; }
.qr-tarjeta .accion { align-self: center; font-size: 17px; }

/* ---------- Formulario ---------- */
.formulario { display: grid; gap: 20px; max-width: 980px; }
.bloque { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(20px, 2.6vw, 32px); box-shadow: var(--shadow); }
.bloque h2 { font-size: 22px; font-weight: 900; margin-bottom: 16px; }
.campos { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.campos.tres { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); align-items: end; }
label { display: grid; gap: 6px; font-weight: 700; color: var(--text); font-size: 16px; }
label.ancho { margin-top: 20px; }
input:not([type=checkbox]), textarea, select {
  font: inherit; font-size: 19px; color: var(--text); width: 100%;
  min-height: 58px; padding: 12px 16px; border: 1.5px solid var(--border); border-radius: 14px; background: var(--bg);
  -webkit-appearance: none; appearance: none;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--navy); background: #fff; box-shadow: 0 0 0 4px var(--navy-light); }
.nota { font-size: 15px; color: var(--text-muted); margin: 10px 0 0; }
.etiqueta { font-weight: 700; color: var(--text); margin: 18px 0 10px; font-size: 16px; }
.etiqueta:first-of-type { margin-top: 0; }
.etiqueta.sin-margen { margin: 0 0 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips button {
  min-height: 52px; padding: 0 20px; border-radius: 999px; border: 1.5px solid var(--border);
  background: var(--bg); color: var(--text); font-size: 17px; font-weight: 700; transition: all .15s;
}
.chips button.activo { background: var(--navy); border-color: var(--navy); color: #fff; }
.chips.compactos button { min-height: 58px; padding: 0 16px; }
.interruptor { display: flex; align-items: center; gap: 14px; font-size: 20px; cursor: pointer; }
.interruptor input { position: absolute; opacity: 0; }
.interruptor span { flex: none; width: 62px; height: 36px; border-radius: 999px; background: var(--border); position: relative; transition: background .2s; }
.interruptor span::after { content: ""; position: absolute; top: 4px; left: 4px; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s var(--ease); }
.interruptor input:checked + span { background: var(--navy); }
.interruptor input:checked + span::after { transform: translateX(26px); }
.interruptor input:focus-visible + span { box-shadow: 0 0 0 4px var(--navy-light); }
.cita-campos { margin-top: 20px; }
.casilla { display: flex; gap: 14px; align-items: flex-start; font-weight: 400; color: var(--text-body); font-size: 16px; cursor: pointer; }
.casilla input { width: 28px; height: 28px; flex: none; margin: 0; accent-color: var(--navy); }
.form-error { color: var(--danger); font-weight: 700; min-height: 24px; margin: 14px 0 6px; }
.btn-primario, .btn-secundario {
  display: inline-flex; align-items: center; justify-content: center; min-height: 60px; padding: 0 32px;
  border-radius: 999px; font-size: 20px; font-weight: 900; text-decoration: none; border: 0;
}
.btn-primario { background: var(--navy); color: #fff; box-shadow: 0 8px 20px rgba(21,26,64,.22); }
.btn-primario:disabled { opacity: .6; }
.btn-secundario { background: var(--white); color: var(--navy); border: 1.5px solid var(--navy); }
.bloque.final .btn-primario { width: 100%; }

.gracias { max-width: 720px; margin: 32px auto; text-align: center; background: var(--white); border-radius: var(--radius-lg); padding: clamp(28px, 4vw, 56px); box-shadow: var(--shadow-lg); }
.gracias-icono { color: var(--success); }
.gracias-icono svg { width: 96px; height: 96px; stroke-width: 2.6; }
.gracias h2 { font-size: 38px; font-weight: 900; margin: 12px 0; }
.gracias p { font-size: 20px; }
.gracias-cita { display: inline-block; background: var(--success-light); color: #047857; font-weight: 900; padding: 12px 20px; border-radius: 14px; }
.gracias-botones { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }

/* ---------- Cómo empezamos ---------- */
.fases { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: fase; }
.fases li {
  position: relative; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px 26px 26px; box-shadow: var(--shadow);
}
.fases.animar li { animation: fase .55s var(--ease) both; animation-delay: calc(var(--i) * 110ms); }
@keyframes fase { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
.fase-num {
  position: absolute; top: 22px; right: 22px; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; background: var(--navy); color: #fff; font-weight: 900; font-size: 20px;
}
.fase-icono { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 20px; background: var(--navy-light); color: var(--navy-2); margin-bottom: 18px; }
.fase-icono svg { width: 42px; height: 42px; }
.fases h2 { font-size: 25px; font-weight: 900; margin-bottom: 8px; }
.fases p { margin: 0; font-size: 18px; }
.fases li.destacada { background: var(--navy); border-color: var(--navy); }
.fases li.destacada h2, .fases li.destacada p { color: #fff; }
.fases li.destacada .fase-icono { background: rgba(255,255,255,.16); color: #fff; }
.fases li.destacada .fase-num { background: #fff; color: var(--navy); }
.banda-precio {
  display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 20px; align-items: center;
  margin-top: 28px; padding: 24px 28px; border-radius: var(--radius-lg); background: var(--navy); color: rgba(255,255,255,.75);
}
.banda-precio strong { display: block; color: #fff; font-size: 21px; font-weight: 900; }
.banda-precio span { font-size: 15px; }

/* ---------- Contactos ---------- */
.contactos-cabecera { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.contactos-cabecera .vista-sub { margin-bottom: 0; }
.contactos-acciones { display: flex; gap: 12px; flex-wrap: wrap; }
.contactos-acciones input { width: 320px; max-width: 100%; }
.aviso-pendientes { background: var(--navy-light); color: var(--navy-2); font-weight: 700; padding: 14px 18px; border-radius: 14px; }
.tabla-contactos { display: grid; gap: 14px; }
.contacto { display: flex; justify-content: space-between; gap: 20px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; }
.contacto h3 { font-size: 21px; font-weight: 900; }
.contacto h3 span { font-weight: 400; color: var(--text-body); }
.contacto-datos { display: flex; gap: 18px; flex-wrap: wrap; margin: 6px 0; }
.contacto-datos a { color: var(--navy); font-weight: 700; }
.contacto-meta { margin: 0; font-size: 15px; color: var(--text-muted); }
.contacto-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.contacto-chips span { background: var(--navy-light); color: var(--navy); border-radius: 999px; padding: 4px 12px; font-size: 14px; font-weight: 700; }
.contacto-notas { margin: 10px 0 0; font-size: 16px; white-space: pre-wrap; }
.contacto-lado { display: grid; gap: 8px; align-content: start; justify-items: end; min-width: 210px; }
.contacto-lado small { color: var(--text-muted); }
.contacto-lado select { min-height: 46px; font-size: 16px; padding: 8px 14px; width: 210px;
  background-image: linear-gradient(45deg, transparent 50%, var(--navy) 50%), linear-gradient(135deg, var(--navy) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.cita-enlace { font-size: 15px; font-weight: 700; color: var(--navy-3); text-align: right; }
.vacio { text-align: center; padding: 48px 16px; color: var(--text-muted); font-size: 19px; }


/* ---------- Ya tengo un sistema de reservas ---------- */
.marcas-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.marca-tarjeta {
  display: flex; flex-direction: column; justify-content: center; gap: 6px; min-height: 150px; padding: 24px 28px; text-align: left;
  background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); color: var(--text);
}
.marca-tarjeta strong { font-size: 27px; font-weight: 900; }
.marca-tarjeta span { color: var(--text-muted); font-size: 17px; }
.marca-tarjeta:active { transform: scale(.98); border-color: var(--navy); }
.marca-tarjeta.otra { background: var(--bg-subtle); border-style: dashed; }
.sis-cabecera { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.sis-antetitulo { margin: 0 0 4px; color: var(--navy-3); font-weight: 900; text-transform: uppercase; letter-spacing: .06em; font-size: 14px; }
.pestanas { display: flex; gap: 6px; background: var(--bg-subtle); padding: 6px; border-radius: 999px; margin-bottom: 24px; overflow-x: auto; }
.pestanas button { flex: 1; min-height: 54px; border: 0; border-radius: 999px; background: transparent; color: var(--text-body); font-size: 18px; font-weight: 700; white-space: nowrap; padding: 0 18px; }
.pestanas button.activa { background: var(--navy); color: #fff; box-shadow: var(--shadow); }
.sis-nota { margin: 0 0 18px; font-size: 18px; }
.planes-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.plan {
  display: flex; flex-direction: column; gap: 8px; text-align: left; padding: 24px; border-radius: var(--radius-lg);
  background: var(--white); border: 2px solid var(--border); color: var(--text-body); box-shadow: var(--shadow);
}
.plan.elegido { border-color: var(--navy-2); box-shadow: 0 0 0 4px var(--navy-light), var(--shadow); }
.plan-nombre { font-weight: 900; color: var(--text); font-size: 20px; }
.plan-precio { font-size: 40px; font-weight: 900; color: var(--text); line-height: 1.05; }
.plan-precio small { font-size: 17px; font-weight: 700; color: var(--text-muted); }
.plan-comision { color: var(--slate-2); font-weight: 700; font-size: 16px; min-height: 22px; }
.plan-texto { font-size: 16px; flex: 1; }
.plan-marca { margin-top: 6px; align-self: flex-start; padding: 8px 16px; border-radius: 999px; background: var(--bg-subtle); color: var(--text); font-weight: 700; font-size: 15px; }
.plan.elegido .plan-marca { background: var(--navy-2); color: #fff; }
.plan.myc { background: var(--navy); border-color: var(--navy); color: rgba(255,255,255,.85); }
.plan.myc .plan-nombre, .plan.myc .plan-precio { color: #fff; }
.plan.myc .plan-precio small { color: rgba(255,255,255,.7); }
.plan.myc .plan-comision { color: var(--navy-claro); }
.plan.myc .boton { border: 0; background: #fff; color: var(--navy); font-size: 16px; }
.tabla-funciones { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.tabla-funciones .fila { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 16px; align-items: center; padding: 13px 22px; border-top: 1px solid var(--border); font-size: 17px; color: var(--text); }
.tabla-funciones .fila.cabecera { border-top: 0; background: var(--navy); color: #fff; font-weight: 900; font-size: 16px; }
.tabla-funciones .fila.destaca { background: var(--navy-light); }
.tabla-funciones .bien { color: var(--navy); font-weight: 900; }
.tabla-funciones .mal { color: var(--slate-3); font-weight: 400; }
.tabla-funciones .extra { color: var(--navy-3); font-weight: 700; }
.tabla-funciones .neutro { color: var(--text-muted); }
.tabla-funciones .pronto { color: var(--slate-2); font-weight: 700; font-style: italic; }
.tabla-funciones .leyenda { margin: 0; padding: 14px 22px; font-size: 15px; color: var(--text-muted); border-top: 1px solid var(--border); }
.calc { display: grid; grid-template-columns: 1.05fr 1fr; gap: 20px; align-items: start; }
.calc-datos, .calc-resultado { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px 24px; box-shadow: var(--shadow); }
.calc-datos h2 { font-size: 21px; font-weight: 900; margin-bottom: 8px; }
.campo-num { display: grid; grid-template-columns: 1fr auto 52px; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); }
.campo-num:first-child { border-top: 0; }
.campo-t { font-size: 16px; font-weight: 700; color: var(--text); }
.campo-u { font-size: 14px; color: var(--text-muted); }
.stepper { display: flex; align-items: center; border: 1.5px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--bg); }
.stepper button { width: 46px; height: 50px; border: 0; background: transparent; color: var(--navy); font-size: 26px; font-weight: 700; }
.stepper button:active { background: var(--navy-light); }
.stepper input { width: 86px !important; min-height: 50px !important; border: 0 !important; border-radius: 0 !important; text-align: center; padding: 0 4px !important; font-weight: 900; background: #fff !important; box-shadow: none !important; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.calc-resultado { position: sticky; top: 100px; }
.calc-opciones { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.segmento { display: flex; background: var(--bg-subtle); border-radius: 999px; padding: 4px; }
.segmento button { border: 0; background: transparent; border-radius: 999px; min-height: 44px; padding: 0 14px; font-size: 15px; font-weight: 700; color: var(--text-body); }
.segmento button.activo { background: var(--navy); color: #fff; }
.interruptor.pequeno { font-size: 16px; gap: 10px; }
.interruptor.pequeno span { width: 50px; height: 30px; }
.interruptor.pequeno span::after { width: 22px; height: 22px; }
.interruptor.pequeno input:checked + span::after { transform: translateX(20px); }
.res-etiqueta { margin: 0 0 8px; font-weight: 900; color: var(--text); font-size: 15px; text-transform: uppercase; letter-spacing: .05em; }
.res-barra { display: grid; grid-template-columns: 150px 1fr auto; gap: 12px; align-items: center; margin-bottom: 10px; }
.res-nombre { font-size: 15px; font-weight: 700; color: var(--text); line-height: 1.2; }
.barra-fondo { height: 26px; background: var(--bg-subtle); border-radius: 8px; overflow: hidden; }
.barra { height: 100%; border-radius: 8px; transition: width .5s var(--ease); min-width: 4px; }
.barra.ellos { background: var(--slate-4); }
.barra.myc { background: var(--navy); }
.res-barra b { font-size: 19px; color: var(--text); min-width: 96px; text-align: right; }
.res-ahorro { margin: 18px 0 14px; padding: 20px; border-radius: 18px; background: var(--navy); color: #fff; text-align: center; }
.res-ahorro span { display: block; font-weight: 700; font-size: 17px; opacity: .9; }
.res-ahorro strong { display: block; font-size: clamp(40px, 5vw, 56px); font-weight: 900; line-height: 1.1; }
.res-ahorro small { font-size: 16px; opacity: .9; }
.res-ahorro.negativo { background: var(--bg-subtle); color: var(--text); }
.res-desglose { list-style: none; margin: 0 0 12px; padding: 0; }
.res-desglose li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 15px; border-bottom: 1px dashed var(--border); }
.res-desglose b { color: var(--text); }
.res-frase { font-size: 16px; color: var(--text); font-weight: 700; margin: 0 0 16px; }
.calc-resultado .btn-primario { width: 100%; }
.sis-fuentes { margin: 24px 0 0; font-size: 14px; color: var(--text-muted); }
@media (max-width: 1000px) {
  .calc { grid-template-columns: 1fr; }
  .calc-resultado { position: static; order: -1; }
  .marcas-grid { grid-template-columns: repeat(2, 1fr); }
  .tabla-funciones .fila { grid-template-columns: 1.3fr 1fr 1fr; padding: 12px 16px; font-size: 16px; }
}
@media (max-width: 640px) {
  .botonera { grid-template-columns: 1fr; }
  .marcas-grid { grid-template-columns: 1fr; }
  .tabla-funciones .fila { grid-template-columns: 1fr 1fr; }
  .tabla-funciones .fila > span:first-child { grid-column: 1 / -1; font-weight: 700; }
  .res-barra { grid-template-columns: 1fr auto; }
  .res-barra .barra-fondo { grid-column: 1 / -1; grid-row: 2; }
}

/* ---------- Adaptación a tablet vertical y móvil ---------- */
@media (max-width: 1000px) {
  .fases { grid-template-columns: repeat(2, 1fr); }
  .banda-precio { grid-template-columns: repeat(2, 1fr); }
  .banda-precio .btn-primario { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  body { font-size: 17px; }
  .marca img { width: 42px; }
  .fases { grid-template-columns: 1fr; }
  .banda-precio { grid-template-columns: 1fr; }
  .contacto { flex-direction: column; }
  .contacto-lado { justify-items: start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Cabecera corporativa: teléfono, correo y eslogan siempre visibles ---------- */
.barra { display: grid; grid-template-columns: auto 1fr auto; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--border); }
.marca strong { font-size: 22px; }
.marca small { color: var(--navy-3); font-size: 15px; font-weight: 700; letter-spacing: .01em; }
.barra-contacto { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.barra-contacto a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border-radius: 999px; background: var(--navy-light); color: var(--navy); text-decoration: none; font-weight: 900; font-size: 17px; white-space: nowrap;
}
.barra-contacto svg { width: 18px; height: 18px; stroke-width: 2.2; color: var(--navy-3); }
.btn-volver { min-height: 44px; }
body[data-vista="inicio"] .barra-der:not(:has(.estado-red:not([hidden]))) { display: none; }

/* ---------- Vídeo ---------- */
.video-caja { background: var(--navy); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.video-caja video { display: block; width: 100%; max-height: calc(100vh - 330px); aspect-ratio: 16 / 9; background: #000; }
.video-acciones { display: flex; justify-content: flex-end; gap: 12px; flex-wrap: wrap; margin-top: 18px; }

/* ---------- Comparativa: más marcas y estilo corporativo ---------- */
.marcas-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; }
.marca-tarjeta { min-height: 104px; padding: 16px 20px; border-radius: var(--radius-lg); }
.marca-tarjeta strong { font-size: 21px; }
.marca-tarjeta span { font-size: 15px; }
.plan-aprox { font-size: 13px; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-top: -4px; }
.plan.myc .plan-aprox { color: var(--navy-claro); }
.tabla-funciones .leyenda b { color: var(--text); }
.inicio-titulo { margin-bottom: 18px; }
.inicio-titulo h1 { font-size: clamp(28px, 3.4vw, 42px); }
.inicio-titulo p { font-size: 18px; }

@media (max-width: 1200px) {
  .botonera { grid-template-columns: repeat(6, 1fr); }
  .boton-grande { grid-column: span 2; min-height: 170px; }
  .boton-grande:nth-child(n+4) { grid-column: span 3; }
  .marcas-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .barra { grid-template-columns: 1fr auto; row-gap: 10px; }
  .barra-contacto { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; }
  .botonera { grid-template-columns: repeat(2, 1fr); }
  .boton-grande, .boton-grande:nth-child(n+4) { grid-column: auto; min-height: 150px; }
  .boton-grande:last-child { grid-column: 1 / -1; }
  .marcas-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .marca small { display: block; font-size: 13px; }
  .barra-contacto { gap: 6px; }
  .barra-contacto a { font-size: 14px; padding: 0 10px; min-height: 38px; gap: 6px; }
  .barra-contacto svg { width: 15px; height: 15px; }
  .botonera { grid-template-columns: 1fr 1fr; gap: 10px; }
  .boton-grande, .boton-grande:nth-child(n+4) { min-height: 128px; padding: 14px; }
  .boton-grande .icono { width: 44px; height: 44px; }
  .boton-grande .titulo { font-size: 18px; margin-top: 12px; }
  .boton-grande .texto { display: none; }
  .marcas-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 340px) {
  .botonera, .marcas-grid { grid-template-columns: 1fr; }
}

/* v3.1: seis botones en el inicio (3 + 3) */
.botonera { grid-template-columns: repeat(3, 1fr); }
.boton-grande { min-height: clamp(150px, calc((100vh - 360px) * .42), 220px); }
.boton-grande:nth-child(6) { background: #64748b; }
.pie-inicio { justify-content: flex-end; }
@media (max-width: 1200px) {
  .botonera { grid-template-columns: repeat(3, 1fr); }
  .boton-grande, .boton-grande:nth-child(n+4) { grid-column: auto; min-height: 150px; }
}
@media (max-width: 900px) {
  .botonera { grid-template-columns: repeat(2, 1fr); }
  .boton-grande:last-child { grid-column: auto; }
}
@media (max-width: 340px) {
  .botonera { grid-template-columns: 1fr; }
}

/* v3.3: precio en la cabecera de la comparativa */
.tabla-funciones .cab-cifra { display: block; font-size: 24px; font-weight: 900; letter-spacing: -.01em; margin-top: 4px; }
.tabla-funciones .cab-precio { display: block; font-size: 13px; font-weight: 700; color: var(--navy-claro); letter-spacing: .02em; margin-top: 2px; }

/* v3.3: «Estoy interesado» a ancho completo y en dos columnas */
.formulario { max-width: none; grid-template-columns: 1fr 1fr; align-items: start; gap: 24px; }
.form-col { display: grid; gap: 24px; }
.formulario .bloque { border-top: 4px solid var(--navy); }
.formulario .bloque h2 { display: flex; align-items: center; gap: 10px; }
.formulario .bloque.final { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; border-top-color: var(--navy-3); }
.final-accion { display: grid; justify-items: end; }
.final-accion .form-error { margin: 0 0 8px; min-height: 0; text-align: right; }
.formulario .bloque.final .btn-primario { width: auto; min-width: 280px; }
@media (max-width: 1000px) {
  .formulario { grid-template-columns: 1fr; }
  .formulario .bloque.final { grid-template-columns: 1fr; }
  .final-accion { justify-items: stretch; }
  .final-accion .form-error { text-align: left; }
  .formulario .bloque.final .btn-primario { width: 100%; min-width: 0; }
}

/* v3.3: «Me interesa» resaltado sobre la banda azul de «Cómo empezamos» */
.banda-precio .btn-resaltado { background: #fff; color: var(--navy); box-shadow: 0 0 0 4px rgba(255,255,255,.22), 0 10px 26px rgba(0,0,0,.28); white-space: nowrap; }
@media (hover: hover) { .banda-precio .btn-resaltado:hover { background: var(--navy-light); } }

/* v3.4: pie del inicio abajo a la izquierda, discreto; acceso privado con PIN */
.vista[data-vista="inicio"] { padding-bottom: 36px; }
.pie-inicio {
  position: fixed; left: 0; bottom: 0; z-index: 5; margin: 0;
  display: none; align-items: center; gap: 4px;
  padding: 0 12px calc(4px + env(safe-area-inset-bottom)) calc(12px + env(safe-area-inset-left));
}
body[data-vista="inicio"] .pie-inicio { display: flex; }
.pie-inicio .enlace-equipo {
  display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 0 8px;
  border: 0; background: none; font-size: 13px; color: var(--slate-4); text-decoration: none;
}
.pie-inicio .enlace-equipo svg { width: 13px; height: 13px; stroke-width: 2.2; }
.pie-inicio .enlace-equipo:active { color: var(--navy); }

.privado-capa {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px 16px;
  background: var(--navy); color: #fff; overflow-y: auto; animation: entrar .3s var(--ease);
}
.privado-capa h1 { color: #fff; font-size: 30px; font-weight: 900; margin-top: 12px; }
.privado-capa p { color: rgba(255,255,255,.7); margin: 6px 0 24px; }
.privado-candado { width: 56px; height: 56px; stroke-width: 1.8; color: #fff; }
.privado-cancelar { margin-top: 4px; min-height: 44px; padding: 0 20px; border: 0; background: none; color: rgba(255,255,255,.7); font-size: 16px; }
#salir-privado { white-space: nowrap; }
