/* =========================================================
   M.A · Movimiento Político Águila — diseño digital oscuro
   ========================================================= */
:root {
  /* Colores del logo oficial: azul real, naranja y amarillo */
  --fondo: #040a22;
  --panel: #08133d;
  --tarjeta: #0b1748;
  --tarjeta-2: #11215e;
  --texto: #eef2ff;
  --suave: #9fb0d9;
  --borde: #1f3383;
  --azul: #2b55e6; --azul-2: #4a6ff0; --azul-claro: rgba(43, 85, 230, .16);
  --azul-logo: #10309f;
  --cian: #5ec8ff;
  --oro: #ff7a1a; --oro-claro: rgba(244, 106, 8, .15);
  --amarillo: #ffe14a;
  --verde: #2ee59d; --verde-claro: rgba(46, 229, 157, .13);
  --rojo: #ff5470; --rojo-claro: rgba(255, 84, 112, .13);
  --gris-dato: #6a7cad;
  --radio: 16px;
  --sombra: 0 10px 30px rgba(0, 0, 0, .35);
  --brillo: 0 0 0 1px rgba(43, 85, 230, .3), 0 8px 30px rgba(43, 85, 230, .15);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(43, 85, 230, .28), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(244, 106, 8, .10), transparent 60%),
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px) 0 0 / 32px 32px,
    var(--fondo);
  background-attachment: fixed;
  color: var(--texto); font-size: 16px; line-height: 1.45;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--azul-2); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; font-weight: 800; }
h2 { font-size: 1.15rem; font-weight: 700; }
h3 { font-size: 1.02rem; }
code { background: var(--tarjeta-2); padding: 1px 6px; border-radius: 6px; }
.cargando-pantalla { min-height: 100vh; display: grid; place-content: center; text-align: center; color: var(--suave); }

/* ----- Estructura ----- */
.barra {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  background: rgba(8, 14, 34, .82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  color: #fff; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
  border-bottom: 1px solid var(--borde);
}
.barra img { width: 40px; height: 40px; filter: drop-shadow(0 0 10px rgba(244, 106, 8, .35)); }
.barra .marca { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.barra .marca b { color: var(--amarillo); font-size: 1.15rem; letter-spacing: 2px; }
.barra .marca span { font-size: .78rem; color: var(--suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barra .quien { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: .85rem; text-align: right; }
.barra .quien small { display: block; color: var(--oro); font-weight: 600; letter-spacing: .5px; }
.barra button { background: var(--tarjeta-2); color: var(--texto); border: 1px solid var(--borde); border-radius: 10px; padding: 7px 12px; cursor: pointer; font: inherit; font-size: .85rem; }
.barra button:hover { border-color: var(--azul); }
.cuerpo { display: flex; min-height: calc(100vh - 61px); }
.menu { width: 236px; background: rgba(10, 17, 40, .7); border-right: 1px solid var(--borde); padding: 14px 10px; flex-shrink: 0; }
.menu a { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 12px; color: var(--suave); text-decoration: none; font-weight: 600; margin-bottom: 3px; transition: background .15s, color .15s; }
.menu a svg { width: 22px; height: 22px; flex-shrink: 0; }
.menu a:hover { background: var(--azul-claro); color: var(--texto); }
.menu a.activo { background: linear-gradient(135deg, var(--azul), #10309f); color: #fff; box-shadow: 0 6px 20px rgba(43, 85, 230, .35); }
.menu a.activo svg { color: var(--oro); }
.contenido { flex: 1; padding: 24px; max-width: 1200px; width: 100%; margin: 0 auto; min-width: 0; }

@media (max-width: 820px) {
  .barra .quien .nombre { display: none; }
  .menu {
    position: fixed; bottom: 0; left: 0; right: 0; width: auto; z-index: 30; display: flex; justify-content: space-around;
    background: rgba(8, 14, 34, .94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-right: 0; border-top: 1px solid var(--borde); padding: 5px 2px; padding-bottom: max(5px, env(safe-area-inset-bottom));
  }
  .menu a { flex-direction: column; gap: 2px; font-size: .66rem; padding: 6px 2px; flex: 1; text-align: center; margin: 0; }
  .menu a.activo { box-shadow: none; }
  .contenido { padding: 14px 16px 100px; }
  h1 { font-size: 1.35rem; }
}

/* ----- Piezas ----- */
.tarjeta {
  background: linear-gradient(180deg, rgba(19, 31, 66, .85), rgba(13, 21, 47, .85));
  border-radius: var(--radio); box-shadow: var(--sombra); padding: 18px; margin-bottom: 16px; border: 1px solid var(--borde);
}
.tarjeta > h2:first-child, .tarjeta > h3:first-child { margin-top: 0; }
.encabezado { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.encabezado h1 { margin: 0; }
.sub { color: var(--suave); margin: -8px 0 16px; }
.cifras { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.cifra {
  position: relative; overflow: hidden; background: linear-gradient(180deg, var(--tarjeta-2), var(--tarjeta));
  border: 1px solid var(--borde); border-radius: var(--radio); padding: 14px 16px; box-shadow: var(--sombra);
}
.cifra::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--azul); opacity: .8; }
.cifra b { display: block; font-size: 1.9rem; font-weight: 800; color: var(--texto); line-height: 1.1; font-variant-numeric: tabular-nums; }
.cifra span { color: var(--suave); font-size: .82rem; }
.cifra.oro { background: linear-gradient(135deg, rgba(244, 106, 8, .22), rgba(244, 106, 8, .05)); border-color: rgba(244, 106, 8, .35); }
.cifra.oro::after { background: var(--oro); }
.cifra.oro b { color: var(--oro); text-shadow: 0 0 18px rgba(244, 106, 8, .35); }
.cifra.verde::after { background: var(--verde); } .cifra.verde b { color: var(--verde); text-shadow: 0 0 18px rgba(46, 229, 157, .35); }
.cifra.roja::after { background: var(--rojo); } .cifra.roja b { color: var(--rojo); text-shadow: 0 0 18px rgba(255, 84, 112, .35); }

label { display: block; font-weight: 600; font-size: .88rem; margin: 12px 0 5px; color: var(--texto); }
input, select, textarea {
  width: 100%; font: inherit; padding: 12px 13px; border: 1.5px solid var(--borde); border-radius: 12px;
  background: #0a1230; color: var(--texto);
}
input::placeholder { color: #5f6d92; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--azul); box-shadow: 0 0 0 3px rgba(43, 85, 230, .25); }
input[type="file"] { padding: 10px; }
input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(.8); }
.fila { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 14px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; cursor: pointer;
  border: 0; border-radius: 12px; padding: 12px 18px; background: linear-gradient(135deg, var(--azul), #10309f); color: #fff;
  text-decoration: none; min-height: 46px; transition: transform .08s, box-shadow .15s, filter .15s;
}
.btn:hover { filter: brightness(1.12); box-shadow: 0 6px 20px rgba(43, 85, 230, .35); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; filter: none; }
.btn.oro { background: linear-gradient(135deg, #ff8a2a, #e45700); color: #fff; text-shadow: 0 1px 1px rgba(0,0,0,.25); }
.btn.oro:hover { box-shadow: 0 6px 22px rgba(244, 106, 8, .4); }
.btn.verde { background: linear-gradient(135deg, #34f0a8, #16b877); color: #04291a; }
.btn.rojo { background: linear-gradient(135deg, #ff6b83, #e23a57); }
.btn.claro { background: var(--azul-claro); color: #b9cdff; border: 1px solid rgba(43, 85, 230, .3); }
.btn.claro:hover { box-shadow: none; filter: brightness(1.25); }
.btn.chico { padding: 7px 12px; min-height: 36px; font-size: .84rem; border-radius: 10px; }
.btn.ancho { width: 100%; }
.acciones { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.nota { background: var(--oro-claro); border: 1px solid rgba(244, 106, 8, .3); border-left: 4px solid var(--oro); padding: 10px 14px; border-radius: 10px; font-size: .9rem; margin: 12px 0; }
.nota.azul { background: var(--azul-claro); border-color: rgba(43, 85, 230, .3); border-left-color: var(--azul); }
.nota.roja { background: var(--rojo-claro); border-color: rgba(255, 84, 112, .3); border-left-color: var(--rojo); }
.etiqueta { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: .74rem; font-weight: 700; background: var(--azul-claro); color: #a9c1ff; white-space: nowrap; border: 1px solid rgba(43, 85, 230, .3); }
.etiqueta.afiliado { background: var(--oro-claro); color: var(--oro); border-color: rgba(244, 106, 8, .3); }
.etiqueta.voto { background: var(--verde-claro); color: var(--verde); border-color: rgba(46, 229, 157, .35); }
.etiqueta.camino { background: var(--rojo-claro); color: #ff8a9c; border-color: rgba(255, 84, 112, .35); }
.etiqueta.gris { background: rgba(147, 161, 196, .1); color: var(--suave); border-color: rgba(147, 161, 196, .25); }
.vacio { text-align: center; color: var(--suave); padding: 26px 10px; }
.mini { font-size: .82rem; color: var(--suave); }
.oculto { display: none !important; }
details summary { cursor: pointer; }

/* Tablas que se vuelven tarjetas en el celular */
.tabla { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tabla th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .6px; color: var(--suave); padding: 8px 10px; border-bottom: 1px solid var(--borde); }
.tabla td { padding: 10px; border-bottom: 1px solid rgba(31, 44, 85, .6); vertical-align: middle; }
.tabla tr.clic { cursor: pointer; } .tabla tr:hover td { background: rgba(43, 85, 230, .05); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 680px) {
  .tabla.resp thead { display: none; }
  .tabla.resp tr { display: block; border: 1px solid var(--borde); border-radius: 14px; margin-bottom: 10px; padding: 6px 4px; background: var(--tarjeta-2); }
  .tabla.resp td { display: flex; justify-content: space-between; gap: 10px; border: 0; padding: 5px 10px; text-align: right; }
  .tabla.resp td::before { content: attr(data-t); font-weight: 600; color: var(--suave); text-align: left; flex-shrink: 0; }
  .tabla.resp td:empty { display: none; }
}

/* Buscador de cédula */
.buscador { position: relative; }
.buscador input { font-size: 1.4rem; letter-spacing: 1.5px; padding: 14px 16px; font-variant-numeric: tabular-nums; font-weight: 600; }
.sugerencias { position: absolute; left: 0; right: 0; top: 100%; margin-top: 6px; background: #0d1738; border: 1px solid var(--borde); border-radius: 14px; box-shadow: 0 16px 40px rgba(0,0,0,.5); z-index: 10; overflow: hidden; }
.sugerencias button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 10px 14px; font: inherit; color: var(--texto); cursor: pointer; border-bottom: 1px solid var(--borde); }
.sugerencias button:last-child { border-bottom: 0; }
.sugerencias button:hover, .sugerencias button.activa { background: var(--azul-claro); }
.sugerencias b { font-variant-numeric: tabular-nums; color: var(--cian); }

/* Ficha de persona */
.ficha { display: flex; gap: 18px; align-items: flex-start; }
.foto { width: 120px; height: 150px; border-radius: 14px; object-fit: cover; background: linear-gradient(135deg, #1b2b5c, #0e1734); flex-shrink: 0; display: grid; place-items: center; font-size: 2.4rem; font-weight: 800; color: var(--oro); overflow: hidden; border: 1px solid var(--borde); box-shadow: var(--brillo); }
.foto img { width: 100%; height: 100%; object-fit: cover; }
.ficha .datos { flex: 1; min-width: 0; }
.ficha .nombre { font-size: 1.4rem; font-weight: 800; margin: 0 0 2px; }
.ficha .ced { color: var(--cian); font-variant-numeric: tabular-nums; margin-bottom: 10px; letter-spacing: 1px; }
.campos { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 16px; }
.campos div span { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .6px; color: var(--suave); }
.campos div b { font-weight: 600; word-break: break-word; }
@media (max-width: 520px) { .ficha { flex-direction: column; align-items: center; text-align: center; } .campos { text-align: left; } }

/* Entrar */
.portada { min-height: 100vh; display: grid; place-items: center; padding: 20px 16px; }
.caja-entrar { width: 100%; max-width: 410px; background: linear-gradient(180deg, rgba(19, 31, 66, .92), rgba(10, 17, 40, .92)); border: 1px solid var(--borde); border-radius: 22px; padding: 28px 24px; box-shadow: 0 30px 80px rgba(0,0,0,.55), var(--brillo); }
.caja-entrar .logo { text-align: center; margin-bottom: 10px; }
.caja-entrar .logo img { width: 96px; height: 96px; filter: drop-shadow(0 0 22px rgba(244, 106, 8, .4)); }
.caja-entrar h1 { text-align: center; font-size: 1.3rem; margin-bottom: 2px; }
.caja-entrar .lema { text-align: center; color: var(--amarillo); font-weight: 800; letter-spacing: 4px; margin-bottom: 14px; }
.demo { margin-top: 18px; font-size: .82rem; background: var(--tarjeta-2); border: 1px dashed var(--borde); border-radius: 12px; padding: 10px 12px; }
.demo button { border: 0; background: var(--azul-claro); color: #b9cdff; border-radius: 8px; padding: 4px 8px; margin: 3px 2px; cursor: pointer; font: inherit; font-size: .8rem; }

/* Voté */
.vote-grande { text-align: center; padding: 26px 16px; }
.vote-grande .check { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 10px; background: var(--verde-claro); color: var(--verde); box-shadow: 0 0 30px rgba(46, 229, 157, .35); }
.vista-foto { max-width: 100%; max-height: 320px; border-radius: 12px; display: block; margin: 10px auto; box-shadow: var(--sombra); }
.subir-foto { border: 2px dashed var(--borde); border-radius: 14px; padding: 22px; text-align: center; cursor: pointer; display: block; background: var(--tarjeta-2); font-weight: 700; color: #b9cdff; }
.subir-foto:hover { border-color: var(--azul); }
.subir-foto input { display: none; }

/* ======== Marcador en vivo ======== */
.piramide2 { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.nivel { width: 100%; border-radius: 14px; padding: 10px 14px; border: 1px solid var(--borde); background: var(--tarjeta-2); }
.nivel .nivel-cab { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.nivel .nivel-cab > b { font-size: 1rem; letter-spacing: .3px; }
.nivel .nivel-cab span { font-size: .85rem; color: var(--suave); }
.nivel .nivel-cab span b { color: var(--verde); font-size: 1.05rem; }
.nivel .tira { height: 10px; margin-top: 8px; }
.nivel.n0 { max-width: 46%; min-width: 250px; text-align: center; background: linear-gradient(135deg, rgba(244,106,8,.25), rgba(244,106,8,.06)); border-color: rgba(244,106,8,.45); box-shadow: 0 0 24px rgba(244,106,8,.15); }
.nivel.n0 .nivel-cab { justify-content: center; flex-direction: column; align-items: center; gap: 2px; }
.nivel.n0 .nivel-cab > b { color: var(--oro); font-size: 1.15rem; letter-spacing: 2px; }
.nivel.n1 { max-width: 64%; } .nivel.n2 { max-width: 82%; } .nivel.n3 { max-width: 100%; }
@media (max-width: 600px) { .nivel.n0, .nivel.n1, .nivel.n2 { max-width: 100%; min-width: 0; } }
.vivo { display: inline-flex; align-items: center; gap: 7px; font-size: .8rem; color: var(--suave); font-weight: 600; }
.vivo i { width: 9px; height: 9px; border-radius: 50%; background: var(--rojo); box-shadow: 0 0 10px var(--rojo); animation: late 1.2s infinite; }
.vivo b { color: var(--rojo); letter-spacing: 2px; }
@keyframes late { 50% { opacity: .25; } }

.hero { display: grid; grid-template-columns: minmax(250px, 320px) 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 760px) { .hero { grid-template-columns: 1fr; } }
.anillo { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; margin-bottom: 0; }
.anillo svg { width: 210px; height: 210px; overflow: visible; }
.anillo .pct { font-size: 46px; font-weight: 800; fill: var(--texto); font-variant-numeric: tabular-nums; }
.anillo .pct-sub { font-size: 13px; fill: var(--suave); font-weight: 600; letter-spacing: 1px; }
.leyenda { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; font-size: .8rem; color: var(--suave); margin-top: 8px; }
.leyenda span { display: inline-flex; align-items: center; gap: 6px; }
.leyenda b { color: var(--texto); }
.hero .cifras { margin: 0; align-content: start; }

.graficas { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
@media (max-width: 900px) { .graficas { grid-template-columns: 1fr; } }
.grafica-horas svg { width: 100%; height: 220px; display: block; }
.grafica-horas .eje { font-size: 11px; fill: var(--suave); }
.grafica-horas .guia { stroke: rgba(147, 161, 196, .12); stroke-width: 1; }
.grafica-horas .base { stroke: rgba(147, 161, 196, .35); stroke-width: 1; }
.grafica-horas .etq { font-size: 11px; font-weight: 700; fill: var(--texto); }
.grafica-horas rect.col:hover, .ranking .fila-r:hover .tira { filter: brightness(1.25); }
.tip { position: fixed; z-index: 200; pointer-events: none; background: #0b1433; border: 1px solid var(--borde); border-radius: 10px; padding: 8px 10px; font-size: .82rem; box-shadow: 0 10px 30px rgba(0,0,0,.5); color: var(--texto); }
.tip b { font-variant-numeric: tabular-nums; }

.ranking .fila-r { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid rgba(31, 44, 85, .6); }
.ranking .fila-r:last-child { border-bottom: 0; }
.ranking .pos { font-size: 1.1rem; text-align: center; font-weight: 800; color: var(--suave); }
.ranking .nom { font-weight: 700; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ranking .val { font-weight: 800; font-variant-numeric: tabular-nums; }
.tira { display: flex; gap: 2px; height: 8px; margin-top: 5px; }
.tira i { display: block; height: 100%; border-radius: 4px; min-width: 0; }
.tira .v { background: var(--verde); } .tira .r { background: var(--rojo); } .tira .p { background: rgba(98, 115, 154, .45); }

.capitanes { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.capitan {
  background: linear-gradient(180deg, var(--tarjeta-2), #0d1636); border: 1px solid var(--borde); border-radius: var(--radio);
  padding: 14px; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s;
}
.capitan:hover { border-color: var(--azul); box-shadow: var(--brillo); transform: translateY(-1px); }
.capitan.abierto { border-color: var(--azul); box-shadow: var(--brillo); }
.capitan .cab { display: flex; align-items: center; gap: 12px; }
.capitan .cnom { flex: 1; min-width: 0; }
.capitan .cnom b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.capitan .cnom span { font-size: .78rem; color: var(--suave); }
.circulo { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 1.1rem; flex-shrink: 0; line-height: 1; text-align: center; font-variant-numeric: tabular-nums; }
.circulo small { display: block; font-size: .52rem; font-weight: 700; opacity: .9; margin-top: 2px; letter-spacing: .3px; }
.circulo.rojo { background: var(--rojo-claro); color: #ff8a9c; border: 2px solid var(--rojo); box-shadow: 0 0 16px rgba(255, 84, 112, .35); }
.circulo.verde { background: var(--verde-claro); color: var(--verde); border: 2px solid var(--verde); box-shadow: 0 0 16px rgba(46, 229, 157, .35); }
.circulo.cero { opacity: .35; box-shadow: none; }
.barra-voto { height: 8px; border-radius: 99px; background: rgba(98, 115, 154, .3); overflow: hidden; display: flex; gap: 2px; margin-top: 12px; }
.barra-voto i { display: block; height: 100%; border-radius: 4px; }
.barra-voto .v { background: var(--verde); } .barra-voto .r { background: var(--rojo); }
.capitan .pie { display: flex; justify-content: space-between; font-size: .76rem; color: var(--suave); margin-top: 6px; }
.gente { margin-top: 12px; border-top: 1px solid var(--borde); padding-top: 8px; max-height: 340px; overflow: auto; }
.gente div { display: flex; justify-content: space-between; gap: 8px; padding: 6px 2px; font-size: .9rem; border-bottom: 1px dashed rgba(31, 44, 85, .8); }
.gente .n-rojo { color: #ff8a9c; font-weight: 700; } .gente .n-verde { color: var(--verde); font-weight: 700; } .gente .n-gris { color: var(--suave); }
.feed div { padding: 8px 0; border-bottom: 1px solid rgba(31, 44, 85, .6); font-size: .9rem; display: flex; gap: 10px; align-items: baseline; }
.punto { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.punto.rojo { background: var(--rojo); box-shadow: 0 0 8px var(--rojo); } .punto.verde { background: var(--verde); box-shadow: 0 0 8px var(--verde); }
.punto.gris { background: var(--gris-dato); }

/* Votante */
.estado-voto { display: flex; align-items: center; gap: 16px; border-radius: var(--radio); padding: 18px 20px; margin-bottom: 16px; border: 2px solid; }
.estado-voto b { display: block; font-size: 1.35rem; font-weight: 900; letter-spacing: 1px; }
.estado-voto span { font-size: .9rem; opacity: .9; }
.estado-voto .luz { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; }
.estado-voto.si { background: var(--verde-claro); border-color: var(--verde); color: var(--verde); box-shadow: 0 0 30px rgba(46, 229, 157, .25); }
.estado-voto.si .luz { background: var(--verde); box-shadow: 0 0 18px var(--verde); }
.estado-voto.no { background: var(--rojo-claro); border-color: var(--rojo); color: #ff8a9c; box-shadow: 0 0 30px rgba(255, 84, 112, .2); }
.estado-voto.no .luz { background: var(--rojo); box-shadow: 0 0 18px var(--rojo); animation: late 1.6s infinite; }
.boton-grande { display: block; width: 100%; border: 0; border-radius: 20px; padding: 24px; font: inherit; font-size: 1.7rem; font-weight: 900; letter-spacing: 2px; color: #fff; cursor: pointer; transition: transform .08s, filter .15s; }
.boton-grande small { display: block; font-size: .85rem; font-weight: 500; letter-spacing: 0; opacity: .92; margin-top: 4px; }
.boton-grande:active { transform: scale(.99); }
.boton-grande.rojo { background: linear-gradient(135deg, #ff6b83, #d42d4b); box-shadow: 0 10px 34px rgba(255, 84, 112, .4); }
.boton-grande.verde { background: linear-gradient(135deg, #34f0a8, #12a86b); color: #04291a; box-shadow: 0 10px 34px rgba(46, 229, 157, .35); }
.boton-grande:disabled { opacity: .35; cursor: not-allowed; box-shadow: none; }
.recordatorio { background: linear-gradient(135deg, #ff8a2a, #e45700); color: #fff; border-radius: var(--radio); padding: 14px 16px; margin-bottom: 16px; display: flex; gap: 12px; align-items: center; font-weight: 700; box-shadow: 0 10px 30px rgba(244, 106, 8, .25); }
.pasos { counter-reset: paso; list-style: none; padding: 0; margin: 0; }
.pasos li { counter-increment: paso; position: relative; padding: 8px 0 8px 46px; min-height: 36px; }
.pasos li::before { content: counter(paso); position: absolute; left: 0; top: 6px; width: 32px; height: 32px; border-radius: 50%; background: var(--azul-claro); border: 1px solid var(--azul); color: var(--oro); font-weight: 800; display: grid; place-items: center; }
.sin-resultados { text-align: center; padding: 18px 8px; }
.sin-resultados .grande { font-size: 1.4rem; font-weight: 900; color: var(--rojo); margin-bottom: 6px; text-shadow: 0 0 18px rgba(255, 84, 112, .35); }

/* Escáner de cédula */
.escaner { position: fixed; inset: 0; z-index: 300; background: rgba(3, 7, 18, .88); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; }
.escaner-caja { width: 100%; max-width: 480px; background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 20px; padding: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.6), var(--brillo); }
.escaner-cab { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.escaner-video { position: relative; border-radius: 14px; overflow: hidden; background: #000; aspect-ratio: 4 / 3; }
.escaner-video video { width: 100%; height: 100%; object-fit: cover; display: block; }
.escaner .mira { position: absolute; inset: 14% 8%; border: 3px solid var(--cian); border-radius: 14px; box-shadow: 0 0 0 999px rgba(0,0,0,.35), 0 0 20px rgba(34,211,238,.5); }
.escaner .mira i { position: absolute; left: 4%; right: 4%; height: 2px; background: var(--rojo); box-shadow: 0 0 10px var(--rojo); top: 50%; animation: barrido 1.8s ease-in-out infinite; }
@keyframes barrido { 0%, 100% { top: 12%; } 50% { top: 88%; } }
.btn-escanear { margin-top: 10px; }

/* Menú con muchas opciones: en el celular se desliza de lado */
@media (max-width: 820px) {
  .menu { justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
  .menu::-webkit-scrollbar { display: none; }
  .menu a { flex: 0 0 auto; min-width: 74px; }
}

/* Mensaje del movimiento */
.mensaje-mov { display: flex; gap: 12px; align-items: center; background: linear-gradient(135deg, rgba(43,85,230,.18), rgba(34,211,238,.08)); border: 1px solid rgba(43,85,230,.35);
  border-radius: var(--radio); padding: 14px 16px; margin-bottom: 16px; min-height: 64px; }
.mensaje-mov span { font-size: 1.6rem; }
.mensaje-mov b { font-size: 1.02rem; line-height: 1.35; }
.mensaje-mov.entra b { animation: aparece .6s ease-out; }
@keyframes aparece { from { opacity: 0; transform: translateY(6px); } }

/* Premios */
.premio-listo { background: linear-gradient(135deg, #ff4d6a, #c9183a); color: #fff; border-radius: var(--radio); padding: 20px; margin-bottom: 16px; text-align: center;
  font-size: 1.35rem; font-weight: 900; letter-spacing: .5px; box-shadow: 0 0 40px rgba(255,84,112,.45); animation: late 1.6s infinite; }
.premio-listo span { display: block; font-size: 1.6rem; margin-top: 6px; color: #fff3c4; }
.premio-listo small { display: block; font-size: .9rem; font-weight: 600; margin-top: 8px; opacity: .95; letter-spacing: 0; }
.premio-ganado { background: var(--verde-claro); border: 2px solid var(--verde); color: var(--verde); border-radius: var(--radio); padding: 14px 16px; margin-bottom: 16px; font-weight: 700; }

/* Ruleta */
.ruleta { position: relative; width: min(320px, 92%); margin: 10px auto 0; }
.ruleta svg { width: 100%; display: block; filter: drop-shadow(0 0 24px rgba(244,106,8,.3)); }
.ruleta .giro { transform-origin: 150px 150px; transition: transform 5.2s cubic-bezier(.12,.8,.18,1); }
.ruleta .flecha { position: absolute; top: -8px; left: 50%; transform: translateX(-50%); color: var(--rojo); font-size: 2rem; z-index: 2; text-shadow: 0 0 10px var(--rojo); }

/* Clip animado de 30 s */
.clip { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: radial-gradient(circle at 30% 20%, #24489c, #0b1433 60%, #050a18); border: 1px solid var(--borde); }
.clip .escena { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 18px; text-align: center;
  opacity: 0; animation: escena 30s infinite; }
@keyframes escena { 0% { opacity: 0; transform: scale(.94); } 2% { opacity: 1; transform: scale(1); } 15% { opacity: 1; transform: scale(1.03); } 17%, 100% { opacity: 0; } }
.clip-logo { width: 26%; max-width: 110px; filter: drop-shadow(0 0 20px rgba(244,106,8,.5)); }
.clip-logo.chico { width: 14%; }
.clip-grande { font-size: clamp(1.1rem, 4.6vw, 1.9rem); font-weight: 900; line-height: 1.15; }
.clip-enorme { font-size: clamp(1.8rem, 9vw, 3.4rem); font-weight: 900; line-height: 1; letter-spacing: 2px; }
.clip-medio { font-size: clamp(1rem, 3.8vw, 1.45rem); font-weight: 800; line-height: 1.25; }
.clip-chico { color: var(--oro); font-weight: 800; letter-spacing: 3px; text-transform: uppercase; font-size: .8rem; }
.clip-barra { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,.12); }
.clip-barra i { display: block; height: 100%; background: var(--oro); animation: barraClip 30s linear infinite; }
@keyframes barraClip { from { width: 0; } to { width: 100%; } }
.clip-marca { position: absolute; top: 8px; right: 10px; font-size: .7rem; color: rgba(255,255,255,.6); font-weight: 700; }
.clip-video { width: 100%; border-radius: 14px; display: block; background: #000; }
textarea { min-height: 120px; resize: vertical; }

/* MASTER: ¿Cómo quieres entrar? y modo prueba */
.opcion-rol { display: flex; gap: 14px; align-items: center; width: 100%; text-align: left; margin-top: 10px; padding: 14px; border-radius: 14px; cursor: pointer;
  background: var(--tarjeta-2); border: 1px solid var(--borde); color: var(--texto); font: inherit; transition: border-color .15s, transform .1s; }
.opcion-rol:hover { border-color: var(--azul); transform: translateY(-1px); box-shadow: var(--brillo); }
.opcion-rol .ico { font-size: 1.9rem; width: 44px; text-align: center; flex-shrink: 0; }
.opcion-rol b { display: block; font-size: 1.05rem; }
.opcion-rol small { display: block; color: var(--suave); font-size: .82rem; margin-top: 2px; }
.opcion-rol:first-of-type { border-color: rgba(244,106,8,.45); }
.banda-prueba { position: relative; z-index: 25; background: linear-gradient(90deg, #7c3aed, #3d7bff); color: #fff; padding: 8px 14px; font-size: .85rem;
  display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.banda-prueba span { display: flex; gap: 6px; }
.banda-prueba button { background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.4); color: #fff; border-radius: 8px; padding: 4px 10px; font: inherit; font-size: .8rem; cursor: pointer; }
#verComo { white-space: nowrap; }

/* Avisos */
#avisos { position: fixed; top: 74px; right: 16px; left: 16px; z-index: 100; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: none; }
.aviso { pointer-events: auto; background: #13204a; border: 1px solid var(--azul); color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.45); max-width: 420px; animation: entra .2s ease-out; }
.aviso.ok { background: #0d3a2a; border-color: var(--verde); } .aviso.error { background: #42121d; border-color: var(--rojo); }
@keyframes entra { from { transform: translateY(-8px); opacity: 0; } }
.paginas { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 12px; }
.girando { width: 18px; height: 18px; border: 3px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: gira .8s linear infinite; display: inline-block; }
@keyframes gira { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Logo oficial: redondo, con brillo naranja */
.barra img { border-radius: 50%; filter: drop-shadow(0 0 8px rgba(244,106,8,.45)); }
.caja-entrar .logo img { width: 120px; height: 120px; border-radius: 50%; filter: drop-shadow(0 0 22px rgba(244,106,8,.45)); }
.menu a.activo { background: linear-gradient(135deg, var(--azul), var(--azul-logo)); }
.menu a.activo svg { color: var(--amarillo); }
.nivel.n0 .nivel-cab > b { color: var(--amarillo); }

/* ---------- Chat de soporte ---------- */
.chat-boton { position: fixed; right: 16px; bottom: 84px; z-index: 60; display: flex; align-items: center; gap: 6px; border: 0; border-radius: 999px; padding: 12px 16px;
  background: linear-gradient(135deg, #ff8a2a, #e45700); color: #fff; font: 700 15px/1 inherit; cursor: pointer; box-shadow: 0 10px 28px rgba(244,106,8,.45); }
.chat-boton span { font-size: 14px; }
.chat-caja { position: fixed; right: 16px; bottom: 140px; z-index: 61; width: min(380px, calc(100vw - 32px)); max-height: min(620px, calc(100vh - 170px));
  display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--borde); border-radius: 18px; box-shadow: var(--sombra); overflow: hidden; }
.chat-cab { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; background: linear-gradient(135deg, var(--azul-logo), var(--azul)); }
.chat-x { background: rgba(255,255,255,.15); color: #fff; border: 0; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 15px; }
.chat-cuerpo { padding: 12px; overflow-y: auto; display: grid; gap: 8px; align-content: start; }
.chat-cuerpo label { margin-top: 4px; }
.chat-pie { padding: 8px 12px; border-top: 1px solid var(--borde); }
.burbuja { padding: 10px 12px; border-radius: 14px; font-size: .92rem; line-height: 1.45; max-width: 92%; }
.burbuja.bot { background: var(--tarjeta-2); border-top-left-radius: 4px; }
.burbuja.yo { background: var(--azul); color: #fff; justify-self: end; border-top-right-radius: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: var(--azul-claro); color: var(--texto); border: 1px solid var(--borde); border-radius: 999px; padding: 8px 12px; font-size: .85rem; cursor: pointer; }
.chip.fuerte { background: var(--oro-claro); border-color: rgba(244,106,8,.5); color: var(--oro); font-weight: 700; }
.estado-sol { background: var(--oro-claro); border: 1px solid rgba(244,106,8,.35); border-radius: 12px; padding: 10px 12px; font-size: .88rem; }
.estado-sol.ok { background: var(--verde-claro); border-color: rgba(46,229,157,.4); }
@media (min-width: 900px) { .chat-boton { bottom: 24px; } .chat-caja { bottom: 84px; } }

/* ---------- Aviso grande (soporte) ---------- */
.aviso-grande { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; background: rgba(2, 6, 25, .78); backdrop-filter: blur(4px); }
.aviso-grande-caja { width: min(520px, 100%); background: var(--panel); border: 2px solid var(--oro); border-radius: 22px; padding: 26px 22px; text-align: center; box-shadow: 0 30px 80px rgba(0,0,0,.6); animation: entrarAviso .25s ease-out; }
.aviso-grande-icono { font-size: 64px; line-height: 1; }
.aviso-grande-caja h2 { font-size: 1.6rem; margin: 10px 0; color: var(--amarillo); }
.aviso-grande-texto { margin: 8px 0 16px; }
@keyframes entrarAviso { from { transform: scale(.92); opacity: 0 } to { transform: scale(1); opacity: 1 } }
