/* Numa App · estilos. Paleta de la marca (COLORES de Numa Core). */
:root {
  --azul: #1A2747; --azul-osc: #11192E; --dorado: #C69646; --dorado-osc: #A87D33; --crema: #F6F3EA;
  --verde: #187640; --verde-bg: #E8F5E9; --ambar: #8A6D00; --ambar-barra: #E5A100; --ambar-bg: #FFF8E1;
  --rojo: #C0392B; --rojo-bg: #FCE8E6; --azul-bg: #EAF1FB;
  --fondo: #F5F6F8; --tarjeta: #FFFFFF; --borde: #E5E7EB; --borde-fuerte: #D1D5DB;
  --texto: #1F2937; --texto-2: #4B5563; --texto-3: #6B7280; --gris-barra: #CBD2DC;
  --radio: 10px; --sombra: 0 1px 2px rgba(17, 25, 46, .05), 0 1px 1px rgba(17, 25, 46, .03);
  --fuente: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--fuente); font-size: 14px; line-height: 1.45; color: var(--texto); background: var(--fondo); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--azul); }
button, input, select, textarea { font: inherit; color: inherit; }
.num, td.n, th.n { font-variant-numeric: tabular-nums; }
h1, h2, h3 { margin: 0; color: var(--azul); font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 22px; } h2 { font-size: 16px; } h3 { font-size: 14px; }
.oculto { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Barra superior ---------- */
.barra { position: sticky; top: 0; z-index: 20; background: var(--azul); color: #fff; height: 56px; display: flex; align-items: center; gap: 16px; padding: 0 24px; }
.logo { display: inline-flex; align-items: baseline; gap: 2px; font-weight: 800; font-size: 22px; letter-spacing: -.03em; color: #fff; text-decoration: none; }
.logo i { width: 7px; height: 7px; border-radius: 50%; background: var(--dorado); display: inline-block; margin-left: 1px; }
/* El logo oficial en blanco (00 Marca e Identidad, versión negativa): todas las barras son azul marino. */
.logo img { display: block; height: 38px; width: auto; }
.acceso .lado .logo img { height: 64px; }
@media (max-width: 760px) { .logo img { height: 32px; } }
.barra nav { display: flex; gap: 4px; margin-left: 12px; }
.barra nav a { color: rgba(255, 255, 255, .78); text-decoration: none; padding: 7px 12px; border-radius: 8px; font-weight: 500; }
.barra nav a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.barra nav a.activo { color: #fff; background: rgba(255, 255, 255, .12); }
.barra .espacio { flex: 1; }
.barra .quien { display: flex; align-items: center; gap: 10px; font-size: 13px; color: rgba(255, 255, 255, .85); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--dorado); color: var(--azul-osc); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.chip-plan { border: 1px solid rgba(198, 150, 70, .6); color: var(--dorado); border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600; }
.barra .menu-btn { display: none; background: transparent; border: 0; color: #fff; font-size: 20px; cursor: pointer; }

/* ---------- Contenedores ---------- */
main { max-width: 1320px; margin: 0 auto; padding: 24px; }
.cabeza { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.cabeza .sub { color: var(--texto-3); font-size: 13px; margin-top: 4px; }
.tarjeta { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: var(--radio); box-shadow: var(--sombra); padding: 18px; min-width: 0; }
.tarjeta > h2, .tarjeta > .t-cab { margin-bottom: 12px; }
.t-cab { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.t-cab .nota { font-size: 12px; color: var(--texto-3); }
.rejilla { display: grid; gap: 16px; }
.r2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.r3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.r4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.r-21 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.pila > * + * { margin-top: 16px; }
.nota { color: var(--texto-3); font-size: 12px; }
.mt { margin-top: 16px; }

/* ---------- Botones y formularios ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--borde-fuerte); background: #fff; color: var(--azul); border-radius: 8px; padding: 8px 14px; font-weight: 600; cursor: pointer; text-decoration: none; font-size: 13px; white-space: nowrap; }
.btn:hover { border-color: var(--azul); }
.btn.primario { background: var(--azul); color: #fff; border-color: var(--azul); }
.btn.primario:hover { background: var(--azul-osc); }
.btn.dorado { background: var(--dorado); border-color: var(--dorado); color: #fff; }
.btn.peligro { color: var(--rojo); border-color: #F0C2BC; }
.btn.chico { padding: 4px 10px; font-size: 12px; }
.btn:disabled { opacity: .55; cursor: default; }
.campo { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.campo label, .etq { font-size: 12px; font-weight: 600; color: var(--texto-2); }
.campo .ayuda { font-size: 11.5px; color: var(--texto-3); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=month], input[type=date], select, textarea {
  border: 1px solid var(--borde-fuerte); border-radius: 8px; padding: 8px 10px; background: #fff; min-width: 0; width: 100%; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible { outline: 2px solid var(--dorado); outline-offset: 1px; }
.form { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.form .ancho { grid-column: 1 / -1; }
.casilla { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.acciones { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.msg { border-radius: 8px; padding: 10px 12px; font-size: 13px; }
.msg.error { background: var(--rojo-bg); color: #8E2A1F; }
.msg.ok { background: var(--verde-bg); color: #145C33; }
.msg.info { background: var(--azul-bg); color: var(--azul); }
.msg.aviso { background: var(--ambar-bg); color: var(--ambar); }

/* ---------- Pestañas ---------- */
.pestanas { display: flex; gap: 2px; border-bottom: 1px solid var(--borde); margin: 0 0 20px; overflow-x: auto; scrollbar-width: none; }
.pestanas::-webkit-scrollbar { display: none; }
.pestanas a { padding: 10px 14px; color: var(--texto-3); text-decoration: none; font-weight: 600; font-size: 13.5px; border-bottom: 2px solid transparent; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.pestanas a:hover { color: var(--azul); }
.pestanas a.activo { color: var(--azul); border-bottom-color: var(--dorado); }
.pestanas a .candado { font-size: 11px; opacity: .6; }
.pestanas a .punto { width: 7px; height: 7px; border-radius: 50%; background: var(--rojo); }

/* ---------- KPI ---------- */
.kpi { display: flex; flex-direction: column; gap: 4px; }
.kpi .et { font-size: 12px; color: var(--texto-3); font-weight: 600; }
.kpi .v { font-size: 24px; font-weight: 700; color: var(--azul); letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.kpi .d { font-size: 12px; color: var(--texto-3); }
.kpi .d b { font-weight: 650; }
.sube { color: var(--verde); } .baja { color: var(--rojo); } .neutro { color: var(--texto-3); }
.neg { color: var(--rojo); }

/* ---------- Veredicto ---------- */
.veredicto { display: flex; gap: 18px; align-items: center; }
.anillo { flex: 0 0 auto; }
.veredicto .vt { font-size: 20px; font-weight: 700; }
.veredicto .vs { color: var(--texto-3); font-size: 13px; }
.c-verde { color: var(--verde); } .c-ambar { color: var(--ambar); } .c-rojo { color: var(--rojo); }
.etiqueta { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 650; }
.etiqueta.verde { background: var(--verde-bg); color: var(--verde); }
.etiqueta.ambar { background: var(--ambar-bg); color: var(--ambar); }
.etiqueta.rojo { background: var(--rojo-bg); color: var(--rojo); }
.etiqueta.gris { background: #EEF0F3; color: var(--texto-2); }
.etiqueta.azul { background: var(--azul-bg); color: var(--azul); }

/* ---------- Componentes de salud ---------- */
.comp { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 8px 0; border-bottom: 1px solid #F0F1F3; }
.comp:last-child { border-bottom: 0; }
.comp .cn { font-weight: 600; font-size: 13px; }
.comp .cp { font-weight: 700; font-variant-numeric: tabular-nums; }
.comp .cnota { grid-column: 1 / -1; font-size: 12px; color: var(--texto-3); }
.pista { grid-column: 1 / -1; height: 4px; border-radius: 3px; background: #EEF0F3; overflow: hidden; }
.pista i { display: block; height: 100%; border-radius: 3px; background: var(--azul); }

/* ---------- Alertas y palancas ---------- */
.alerta { display: grid; grid-template-columns: 4px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid #F0F1F3; }
.alerta:last-child { border-bottom: 0; }
.alerta .barra-a { border-radius: 2px; }
.alerta.rojo .barra-a { background: var(--rojo); } .alerta.ambar .barra-a { background: var(--ambar-barra); } .alerta.info .barra-a { background: var(--gris-barra); }
.alerta .at { font-weight: 650; }
.alerta.rojo .at { color: var(--rojo); } .alerta.ambar .at { color: var(--ambar); }
.alerta .ax { font-size: 13px; color: var(--texto-2); margin-top: 2px; }
.alerta .ac { font-size: 12.5px; color: var(--azul); margin-top: 4px; font-weight: 600; }
.palanca { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid #F0F1F3; }
.palanca:last-child { border-bottom: 0; }
.palanca .pt { font-weight: 650; }
.palanca .px { font-size: 12.5px; color: var(--texto-2); margin-top: 2px; }
.palanca .pv { font-weight: 700; color: var(--verde); white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.palanca .pv small { display: block; font-weight: 500; color: var(--texto-3); font-size: 11px; }

/* ---------- Narrativa ---------- */
.narrativa p { margin: 0 0 10px; color: var(--texto); font-size: 14px; line-height: 1.6; }
.narrativa ol { margin: 6px 0 0 18px; padding: 0; } .narrativa li { margin-bottom: 4px; }
.narrativa .marca { font-size: 11.5px; color: var(--texto-3); margin-top: 8px; }

/* ---------- Tablas ---------- */
.tabla-env { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 8px; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th { text-align: left; font-weight: 600; color: var(--texto-3); font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--borde); white-space: nowrap; background: #FAFBFC; position: sticky; top: 0; }
table.t td { padding: 8px 10px; border-bottom: 1px solid #F0F1F3; vertical-align: top; }
table.t th.n, table.t td.n { text-align: right; white-space: nowrap; }
table.t tr.total td { font-weight: 700; color: var(--azul); background: var(--crema); border-bottom: 1px solid #E8E2D1; }
table.t tr.cierre td { border-top: 1px solid var(--azul); border-bottom: 3px double var(--azul); }
table.t tr.sangria td:first-child { padding-left: 24px; color: var(--texto-2); }
table.t tr.clic { cursor: pointer; }
table.t tr.clic:hover td { background: #F8F9FB; }
table.t tr.detalle td { background: #FBFBFC; font-size: 12.5px; color: var(--texto-2); }
table.t td .flecha { color: var(--texto-3); font-size: 10px; margin-left: 4px; }
.sem { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.sem.verde { background: var(--verde); } .sem.ambar { background: var(--ambar-barra); } .sem.rojo { background: var(--rojo); } .sem.gris { background: var(--gris-barra); }

/* ---------- Rango contra sector ---------- */
.rango { position: relative; height: 8px; background: #EEF0F3; border-radius: 4px; margin-top: 6px; min-width: 110px; }
.rango .zona { position: absolute; top: 0; height: 100%; background: #D7DEE8; border-radius: 4px; }
.rango .marca { position: absolute; top: -3px; width: 4px; height: 14px; border-radius: 2px; background: var(--azul); transform: translateX(-2px); }
.rango .marca.mal { background: var(--ambar-barra); }

/* ---------- Gráficas ---------- */
.grafica { width: 100%; height: auto; display: block; }
.grafica text { font-family: var(--fuente); }
.leyenda { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--texto-3); margin-top: 8px; }
.leyenda span { display: inline-flex; align-items: center; gap: 6px; }
.leyenda i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }

/* ---------- Panorama ---------- */
.emp-tarjeta { display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: inherit; transition: border-color .15s; }
.emp-tarjeta:hover { border-color: var(--borde-fuerte); }
.emp-tarjeta .en { font-weight: 700; color: var(--azul); font-size: 15px; }
.emp-tarjeta .ep { font-size: 12px; color: var(--texto-3); }
.mini { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mini .et { font-size: 11px; color: var(--texto-3); font-weight: 600; }
.mini .v { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--azul); }
.cal { display: grid; grid-template-columns: 64px 1fr; gap: 4px 12px; padding: 9px 0; border-bottom: 1px solid #F0F1F3; font-size: 13px; }
.cal:last-child { border-bottom: 0; }
.cal .cf { font-weight: 700; color: var(--azul); font-variant-numeric: tabular-nums; }
.cal .cf small { display: block; font-weight: 500; color: var(--texto-3); font-size: 11px; }
.cal .ca { font-size: 11.5px; color: var(--texto-3); }

/* ---------- Vacíos, cargando, bloqueado ---------- */
.vacio { text-align: center; padding: 36px 20px; color: var(--texto-2); }
.vacio .vi { width: 46px; height: 46px; border-radius: 12px; margin: 0 auto 12px; background: var(--crema); color: var(--dorado-osc); display: flex; align-items: center; justify-content: center; font-size: 22px; }
.vacio h3 { margin-bottom: 6px; }
.vacio p { max-width: 520px; margin: 0 auto 14px; font-size: 13px; color: var(--texto-3); }
.bloqueado { border: 1px dashed var(--dorado); background: linear-gradient(180deg, #fff, var(--crema)); }
.cargando { padding: 48px 0; text-align: center; color: var(--texto-3); }
.giro { width: 26px; height: 26px; border: 3px solid #E5E7EB; border-top-color: var(--dorado); border-radius: 50%; margin: 0 auto 10px; animation: giro .8s linear infinite; }
@keyframes giro { to { transform: rotate(360deg); } }
.esqueleto { background: linear-gradient(90deg, #EEF0F3, #F6F7F9, #EEF0F3); background-size: 200% 100%; animation: brillo 1.2s infinite; border-radius: 8px; }
@keyframes brillo { to { background-position: -200% 0; } }

/* ---------- Carga de archivos ---------- */
.zona-carga { display: block; border: 2px dashed var(--borde-fuerte); border-radius: 12px; padding: 28px; text-align: center; background: #FBFBFC; cursor: pointer; transition: all .15s; }
.zona-carga.sobre { border-color: var(--dorado); background: var(--crema); }
.zona-carga .zt { font-weight: 700; color: var(--azul); font-size: 15px; }
.zona-carga .zx { font-size: 12.5px; color: var(--texto-3); margin-top: 4px; }
.resultado { border: 1px solid var(--borde); border-radius: 8px; padding: 10px 12px; margin-top: 8px; font-size: 13px; }
.resultado ul { margin: 6px 0 0; padding-left: 18px; }

/* ---------- Chat ---------- */
.chat { display: flex; flex-direction: column; height: min(640px, calc(100vh - 260px)); min-height: 380px; }
.chat .hilo { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 4px 2px 12px; }
.burbuja { max-width: 78%; padding: 10px 14px; border-radius: 14px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; }
.burbuja.yo { align-self: flex-end; background: var(--azul); color: #fff; border-bottom-right-radius: 4px; }
.burbuja.numa { align-self: flex-start; background: var(--crema); border-bottom-left-radius: 4px; }
.chat form { display: flex; gap: 8px; border-top: 1px solid var(--borde); padding-top: 12px; }
.sugerencias { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.sugerencias button { border: 1px solid var(--borde); background: #fff; border-radius: 999px; padding: 5px 12px; font-size: 12.5px; cursor: pointer; color: var(--azul); }

/* ---------- Simulador ---------- */
.deslizador { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; }
.deslizador label { font-size: 13px; font-weight: 600; color: var(--texto-2); }
.deslizador output { font-weight: 700; color: var(--azul); font-variant-numeric: tabular-nums; min-width: 56px; text-align: right; }
.deslizador input[type=range] { grid-column: 1 / -1; width: 100%; accent-color: var(--azul); }
.lista-mini { display: flex; flex-direction: column; gap: 6px; }
.lista-mini .fila { display: grid; grid-template-columns: 1.4fr 1fr 70px 30px; gap: 6px; align-items: center; }
.difs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }

/* ---------- Acceso ---------- */
.acceso { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.acceso .lado { background: var(--azul); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.acceso .lado h1 { color: #fff; font-size: 34px; line-height: 1.15; margin: 32px 0 14px; max-width: 520px; }
.acceso .lado h1 em { color: var(--dorado); font-style: normal; }
.acceso .lado p { color: rgba(255, 255, 255, .78); max-width: 480px; font-size: 15px; }
.acceso .puntos { display: grid; gap: 10px; margin-top: 22px; max-width: 480px; }
.acceso .puntos div { display: flex; gap: 10px; color: rgba(255, 255, 255, .88); font-size: 14px; }
.acceso .puntos div::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--dorado); margin-top: 8px; flex: 0 0 auto; }
.acceso .formulario { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: #fff; }
.acceso .caja { width: 100%; max-width: 380px; }
.acceso .caja h2 { font-size: 22px; margin-bottom: 6px; }
.acceso .planes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 28px; }
.acceso .plan { border: 1px solid rgba(255, 255, 255, .16); border-radius: 10px; padding: 12px; }
.acceso .plan b { display: block; color: var(--dorado); font-size: 13px; }
.acceso .plan span { font-size: 18px; font-weight: 700; }
.acceso .plan small { display: block; color: rgba(255, 255, 255, .6); font-size: 11px; margin-top: 2px; }
.conmutador { display: flex; background: #F1F2F5; border-radius: 9px; padding: 3px; margin: 18px 0; }
.conmutador button { flex: 1; border: 0; background: transparent; padding: 8px; border-radius: 7px; font-weight: 600; cursor: pointer; color: var(--texto-3); }
.conmutador button.activo { background: #fff; color: var(--azul); box-shadow: var(--sombra); }

/* ---------- Diálogo ---------- */
.velo { position: fixed; inset: 0; background: rgba(17, 25, 46, .45); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; }
.dialogo { background: #fff; border-radius: 12px; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow-y: auto; padding: 22px; box-shadow: 0 20px 50px rgba(0, 0, 0, .2); }
.dialogo h2 { margin-bottom: 14px; }
.secreto { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: #F3F4F6; border-radius: 8px; padding: 10px; word-break: break-all; font-size: 12.5px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: #F3F4F6; padding: 1px 5px; border-radius: 4px; word-break: break-word; }
pre.codigo { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: var(--azul-osc); color: #E5E7EB; border-radius: 8px; padding: 12px; overflow-x: auto; white-space: pre; }

/* ---------- Aviso flotante ---------- */
.avisos-flot { position: fixed; bottom: 16px; right: 16px; z-index: 60; display: flex; flex-direction: column; gap: 8px; max-width: calc(100vw - 32px); }
.avisos-flot .msg { box-shadow: 0 6px 18px rgba(0, 0, 0, .12); }

/* ---------- Teléfono y tableta ---------- */
@media (max-width: 1080px) {
  .r4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .r3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .r-21 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  main { padding: 16px; }
  .barra { padding: 0 16px; gap: 10px; }
  .barra nav { display: none; position: absolute; top: 56px; left: 0; right: 0; background: var(--azul); flex-direction: column; padding: 8px 16px 14px; margin: 0; }
  .barra nav.abierto { display: flex; }
  .barra .menu-btn { display: inline-block; }
  .barra .quien .nombre, .barra .quien .chip-plan { display: none; }
  .r2, .r3 { grid-template-columns: minmax(0, 1fr); }
  .r4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi .v { font-size: 20px; }
  .acceso { grid-template-columns: 1fr; }
  .acceso .lado { padding: 28px 16px; }
  .acceso .lado h1 { font-size: 26px; margin-top: 18px; }
  .acceso .planes { grid-template-columns: 1fr 1fr 1fr; }
  .burbuja { max-width: 90%; }
  .lista-mini .fila { grid-template-columns: 1fr 1fr; }
  .tarjeta { padding: 14px; }
  h1 { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Ronda 2 ---------- */
.dialogo.ancho { max-width: 880px; }
.con-origen { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.con-origen:hover, .con-origen:focus-visible { border-color: var(--dorado); box-shadow: 0 0 0 3px rgba(198, 150, 70, .15); outline: none; }
.origen-ico, .origen-btn { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; border-radius: 50%; border: 1px solid var(--borde-fuerte); color: var(--texto-3); background: #fff; font-size: 10.5px; font-weight: 700; line-height: 1; margin-left: 6px; vertical-align: 1px; flex: none; }
.origen-btn { cursor: pointer; padding: 0; }
.origen-btn:hover, .con-origen:hover .origen-ico { border-color: var(--dorado); color: var(--dorado-osc); background: var(--crema); }
.origen-btn.muestra { cursor: default; margin: 0 2px; }
.origen-res { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-top: 4px; }
.origen-res > div { background: var(--fondo); border-radius: 8px; padding: 10px 12px; }
.origen-res .et { font-size: 12px; color: var(--texto-3); font-weight: 600; }
.origen-res .v { font-size: 20px; font-weight: 700; color: var(--azul); font-variant-numeric: tabular-nums; }
th.ordenable { cursor: pointer; user-select: none; white-space: nowrap; }
th.ordenable:hover { color: var(--azul); }
.etiqueta.chip { font-size: 10.5px; padding: 0 6px; }
.chip-isr { display: inline-block; font-size: 10.5px; padding: 0 6px; border-radius: 10px; background: var(--ambar-bg); color: var(--ambar); font-weight: 600; margin-left: 2px; }
table.t tr.estimado td { color: var(--ambar); font-style: italic; }
.aviso-memoria { border-left: 4px solid var(--ambar-barra); background: linear-gradient(0deg, #fff, #fff), var(--ambar-bg); }
.tramo { display: grid; grid-template-columns: 110px minmax(0, 1fr) 110px; gap: 10px; align-items: center; margin: 9px 0; }
.tramo .nota { font-size: 12.5px; }
.tramo .num { text-align: right; font-weight: 650; }
.tramo-pista { height: 14px; background: #F3F4F6; border-radius: 4px; overflow: hidden; }
.tramo-pista > div { height: 100%; border-radius: 4px; }
.progreso-global { margin: 10px 0 4px; }
.progreso-global .pista, .mini-pista { margin-top: 6px; }
.mini-pista i { transition: width .2s; background: var(--dorado); }
.tarjeta-numa { background: var(--crema); border-color: #E8E2D1; }
.omitidas { margin-top: 6px; }
.omitidas summary { cursor: pointer; }
.omitidas > div { margin-top: 4px; line-height: 1.6; }
.enlace-url { margin: 10px 0; font-size: 12px; }
.chip-x { display: inline-flex; align-items: center; gap: 4px; margin: 2px 0; }
.chip-x .x { border: 0; background: transparent; cursor: pointer; font-size: 14px; line-height: 1; padding: 0 2px; color: var(--texto-3); }
.plan-tarjeta.actual { border-color: var(--azul); box-shadow: 0 0 0 1px var(--azul); }
.qr-caja { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.qr-caja .qr { flex: none; border: 1px solid var(--borde); border-radius: 8px; max-width: 100%; height: auto; }
.qr-caja > div { flex: 1; min-width: 200px; }

/* Tablero del dueño (enlace sin cuenta) */
.pub { min-height: 100vh; background: var(--fondo); }
.pub-cab { position: sticky; top: 0; z-index: 10; background: var(--azul); color: #fff; display: flex; align-items: center; gap: 16px; padding: 12px 24px; flex-wrap: wrap; }
.pub-cab .logo { font-size: 22px; }
.pub-emp { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.pub-emp b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pub-emp span { font-size: 12.5px; color: rgba(255, 255, 255, .75); }
.pub-cab select { width: auto; background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .3); }
.pub-cab select option { color: var(--texto); }
.pub-cuerpo { max-width: 1180px; margin: 0 auto; padding: 22px 24px 40px; }
.pub-pie { text-align: center; margin-top: 26px; }
@media (max-width: 760px) {
  .pub-cab { padding: 10px 16px; gap: 10px; }
  .pub-cab select { width: 100%; }
  .pub-cuerpo { padding: 14px 16px 32px; }
  .tramo { grid-template-columns: 84px minmax(0, 1fr) 92px; gap: 8px; }
  .origen-res .v { font-size: 17px; }
  .dialogo { padding: 16px; }
}

/* Escenarios guardados del simulador (25-nov) */
.fila-guardar { display: flex; gap: 8px; }
.fila-guardar input { flex: 1; min-width: 0; }
.fila-esc { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--linea, #E5E7EB); }
.fila-esc:last-child { border-bottom: 0; }

/* Meta vs real: el color de la diferencia gana sobre el color general de la tabla (25-nov). */
.t td.n.sube { color: var(--verde); } .t td.n.baja { color: var(--rojo); }

/* ---- Celular y accesibilidad (revisión de producto, 25-nov) ---- */
/* Tablas anchas: la primera columna queda fija al recorrer, y una sombra en el borde indica que hay más. */
.tabla-env { position: relative; background:
  linear-gradient(to right, var(--blanco, #fff) 30%, rgba(255,255,255,0)) left center / 24px 100% no-repeat local,
  linear-gradient(to left, var(--blanco, #fff) 30%, rgba(255,255,255,0)) right center / 24px 100% no-repeat local,
  radial-gradient(farthest-side at 0 50%, rgba(0,0,0,.14), rgba(0,0,0,0)) left center / 10px 100% no-repeat scroll,
  radial-gradient(farthest-side at 100% 50%, rgba(0,0,0,.14), rgba(0,0,0,0)) right center / 10px 100% no-repeat scroll; }
@media (max-width: 760px) {
  .tabla-env table.t th:first-child, .tabla-env table.t td:first-child { position: sticky; left: 0; z-index: 1; background: var(--blanco, #fff); box-shadow: 1px 0 0 var(--borde); }
  /* Los totales llevan su fondo crema opaco en la columna fija (con "inherit" se transparentaba y se encimaban
     los números al recorrer). La columna fija tiene ancho suficiente para el concepto y su "?". */
  .tabla-env table.t tr.total td:first-child { background: var(--crema, #F6F3EA); }
  .tabla-env table.t th:first-child, .tabla-env table.t td:first-child { min-width: 170px; }
  .origen-btn { min-width: 28px; min-height: 28px; vertical-align: middle; }
  /* Pestañas: una sombra al borde derecho dice que hay más pestañas al deslizar. */
  .pestanas { -webkit-mask-image: linear-gradient(to right, #000 85%, transparent); mask-image: linear-gradient(to right, #000 85%, transparent); }
  /* Zonas de toque de al menos 44 px. */
  .barra .menu-btn, .barra .btn.chico, #salir { min-height: 44px; min-width: 44px; }
  .pestanas a { min-height: 44px; }
}
/* Las notas grises pequeñas, un poco más oscuras para que se lean. */
.nota { color: #565D6B; }
