/* ============================================================
   Consulta Popular Nacional 2026 - Alcaldía Bolivariana de Tucupita
   Hoja de estilos principal
   ============================================================ */

:root {
    --azul-profundo: #0b1f3a;
    --azul-rey: #143a6b;
    --azul-claro: #1e5aa8;
    --rojo: #c8102e;
    --rojo-oscuro: #9c0c23;
    --amarillo: #f4b400;
    --dorado: #d4a017;
    --verde: #1f7a3f;
    --gris-fondo: #f2f4f8;
    --gris-borde: #dde3ec;
    --gris-texto: #5a6478;
    --blanco: #ffffff;
    --sombra: 0 10px 30px -12px rgba(11, 31, 58, 0.28);
    --sombra-suave: 0 4px 14px -6px rgba(11, 31, 58, 0.18);
    --radio: 14px;
    --radio-sm: 9px;
    --fuente: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--fuente);
    color: var(--azul-profundo);
    background: var(--gris-fondo);
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

img { max-width: 100%; display: block; }

/* ============================================================
   LOGIN
   ============================================================ */
.login-body {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
    background:
        radial-gradient(circle at 15% 10%, rgba(30, 90, 168, 0.35), transparent 55%),
        radial-gradient(circle at 85% 90%, rgba(200, 16, 46, 0.30), transparent 55%),
        linear-gradient(160deg, #081729 0%, #0b1f3a 45%, #102a4d 100%);
    position: relative;
    overflow-x: hidden;
}

.login-body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        repeating-linear-gradient(45deg, rgba(255,255,255,0.025) 0 2px, transparent 2px 22px);
    pointer-events: none;
}

.login-wrap {
    width: 100%;
    max-width: 430px;
    position: relative;
    z-index: 2;
}

.login-card {
    background: var(--blanco);
    border-radius: 22px;
    padding: 0 26px 26px;
    box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    animation: loginEntrada 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes loginEntrada {
    from { opacity: 0; transform: translateY(24px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.login-bandera {
    display: flex;
    height: 7px;
    margin: 0 -26px 22px;
}
.login-bandera .franja { flex: 1; }
.franja--amarilla { background: var(--amarillo); }
.franja--azul     { background: var(--azul-rey); }
.franja--roja     { background: var(--rojo); }

.login-escudo {
    width: 92px;
    height: 92px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: linear-gradient(145deg, #f7f9fc, #e6ecf5);
    border: 3px solid var(--amarillo);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 22px -8px rgba(11, 31, 58, 0.45);
    overflow: hidden;
}
.login-escudo img { width: 76px; height: 76px; object-fit: contain; }

.login-estado {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0 auto 16px;
    padding: 5px 14px;
    border-radius: 999px;
    background: rgba(31, 122, 63, 0.10);
    color: var(--verde);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    width: fit-content;
}
.login-punto {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--verde);
    box-shadow: 0 0 0 0 rgba(31, 122, 63, 0.6);
    animation: pulso 1.8s infinite;
}
@keyframes pulso {
    0%   { box-shadow: 0 0 0 0 rgba(31, 122, 63, 0.55); }
    70%  { box-shadow: 0 0 0 9px rgba(31, 122, 63, 0); }
    100% { box-shadow: 0 0 0 0 rgba(31, 122, 63, 0); }
}

.login-titulo {
    margin: 0;
    text-align: center;
    font-size: 22px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -0.3px;
    color: var(--azul-profundo);
    text-transform: uppercase;
}

.login-lema {
    margin: 6px 0 18px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--rojo);
    letter-spacing: 0.3px;
}

.login-subtitulo {
    margin: 0 0 6px;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--azul-rey);
}

.login-descripcion {
    margin: 0 0 18px;
    text-align: center;
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--gris-texto);
}

.login-alerta {
    margin-bottom: 16px;
    padding: 11px 14px;
    border-radius: var(--radio-sm);
    background: rgba(200, 16, 46, 0.08);
    border-left: 4px solid var(--rojo);
    color: var(--rojo-oscuro);
    font-size: 13px;
    font-weight: 600;
}

.login-form { display: flex; flex-direction: column; }

.login-label {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--azul-profundo);
    margin-bottom: 6px;
    letter-spacing: 0.2px;
}

.login-input {
    width: 100%;
    padding: 13px 14px;
    margin-bottom: 15px;
    border: 1.5px solid var(--gris-borde);
    border-radius: var(--radio-sm);
    font-size: 15px;
    font-family: inherit;
    color: var(--azul-profundo);
    background: #fbfcfe;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.login-input:focus {
    outline: none;
    border-color: var(--azul-claro);
    background: var(--blanco);
    box-shadow: 0 0 0 4px rgba(30, 90, 168, 0.12);
}

.login-pass { position: relative; }
.login-pass .login-input { padding-right: 48px; }
.login-ojo {
    position: absolute;
    right: 6px;
    top: 6px;
    width: 38px;
    height: 38px;
    border: none;
    background: transparent;
    font-size: 17px;
    cursor: pointer;
    border-radius: 8px;
    color: var(--gris-texto);
    transition: background 0.2s;
}
.login-ojo:hover { background: rgba(11, 31, 58, 0.06); }

.login-btn {
    margin-top: 6px;
    padding: 15px;
    border: none;
    border-radius: var(--radio-sm);
    background: linear-gradient(135deg, var(--rojo) 0%, var(--rojo-oscuro) 100%);
    color: var(--blanco);
    font-size: 15.5px;
    font-weight: 800;
    letter-spacing: 0.3px;
    cursor: pointer;
    box-shadow: 0 10px 24px -10px rgba(200, 16, 46, 0.75);
    transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
}
.login-btn:hover { filter: brightness(1.07); box-shadow: 0 14px 30px -10px rgba(200, 16, 46, 0.85); }
.login-btn:active { transform: scale(0.98); }

.login-olvido {
    display: block;
    margin: 16px 0 0;
    text-align: center;
    font-size: 12.5px;
    color: var(--azul-claro);
    text-decoration: none;
    font-weight: 600;
}
.login-olvido:hover { text-decoration: underline; }

.login-pie {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid var(--gris-borde);
    text-align: center;
    font-size: 11.5px;
    line-height: 1.7;
    color: var(--gris-texto);
}
.login-pie strong { color: var(--azul-profundo); }

/* ============================================================
   APP (cabecera, contenido, pie)
   ============================================================ */
.app-body {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--gris-fondo);
}

.app-header {
    background: linear-gradient(135deg, var(--azul-profundo) 0%, var(--azul-rey) 100%);
    color: var(--blanco);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 4px 18px -6px rgba(11, 31, 58, 0.5);
    position: sticky;
    top: 0;
    z-index: 40;
    border-bottom: 3px solid var(--amarillo);
}

.app-header__logo {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}
.app-header__escudo {
    width: 44px;
    height: 42px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 9px;
    padding: 3px;
    flex-shrink: 0;
}
.app-header__texto { min-width: 0; }
.app-header__texto h1 {
    margin: 0;
    font-size: 14.5px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.app-header__texto small {
    display: block;
    font-size: 10.5px;
    color: var(--amarillo);
    font-weight: 700;
    letter-spacing: 0.3px;
}

.app-header__usuario {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.app-header__usuario-nombre {
    font-size: 12px;
    font-weight: 600;
    max-width: 130px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0.95;
}
.app-header__salir {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--blanco);
    text-decoration: none;
    padding: 6px 11px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.14);
    transition: background 0.2s;
    white-space: nowrap;
}
.app-header__salir:hover { background: rgba(255, 255, 255, 0.26); }

.app-contenido {
    flex: 1;
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 18px 14px 34px;
}

.app-footer {
    background: var(--azul-profundo);
    color: rgba(255, 255, 255, 0.82);
    text-align: center;
    padding: 16px 14px;
    font-size: 11.5px;
    line-height: 1.7;
    border-top: 3px solid var(--rojo);
}
.app-footer__sub { color: var(--amarillo); font-weight: 600; }

/* ============================================================
   VOTACIÓN
   ============================================================ */
.vot-panel { display: flex; flex-direction: column; gap: 16px; }

.vot-paso {
    background: var(--blanco);
    border-radius: var(--radio);
    padding: 20px 18px;
    box-shadow: var(--sombra-suave);
    border: 1px solid var(--gris-borde);
    position: relative;
    animation: pasoEntrada 0.35s ease;
}
@keyframes pasoEntrada {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.vot-oculto { display: none !important; }

.vot-paso__num {
    position: absolute;
    top: -12px;
    left: 18px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--rojo), var(--rojo-oscuro));
    color: var(--blanco);
    font-weight: 800;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 14px -5px rgba(200, 16, 46, 0.8);
}

.vot-paso__titulo {
    margin: 8px 0 4px;
    font-size: 17px;
    font-weight: 800;
    color: var(--azul-profundo);
}
.vot-paso__desc {
    margin: 0 0 16px;
    font-size: 13px;
    color: var(--gris-texto);
    line-height: 1.55;
}

.vot-buscar {
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
}
.vot-buscar .vot-input { flex: 1; min-width: 150px; }

.vot-input {
    width: 100%;
    padding: 12px 13px;
    border: 1.5px solid var(--gris-borde);
    border-radius: var(--radio-sm);
    font-size: 15px;
    font-family: inherit;
    color: var(--azul-profundo);
    background: #fbfcfe;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.vot-input:focus {
    outline: none;
    border-color: var(--azul-claro);
    background: var(--blanco);
    box-shadow: 0 0 0 4px rgba(30, 90, 168, 0.12);
}
.vot-input--sm { padding: 9px 11px; font-size: 13.5px; width: auto; }

.vot-btn {
    padding: 12px 20px;
    border: 1.5px solid var(--gris-borde);
    border-radius: var(--radio-sm);
    background: var(--blanco);
    color: var(--azul-profundo);
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s, background 0.2s, filter 0.2s;
    white-space: nowrap;
}
.vot-btn:hover { background: #f4f7fb; }
.vot-btn:active { transform: scale(0.97); }

.vot-btn--primary {
    background: linear-gradient(135deg, var(--rojo), var(--rojo-oscuro));
    border-color: transparent;
    color: var(--blanco);
    box-shadow: 0 8px 20px -9px rgba(200, 16, 46, 0.8);
}
.vot-btn--primary:hover { filter: brightness(1.07); background: linear-gradient(135deg, var(--rojo), var(--rojo-oscuro)); }

.vot-btn--ghost { background: transparent; color: var(--gris-texto); }
.vot-btn--ghost:hover { background: rgba(11, 31, 58, 0.05); }

.vot-btn--sm { padding: 7px 10px; font-size: 13px; }
.vot-btn--peligro {
    background: rgba(200, 16, 46, 0.08);
    border-color: rgba(200, 16, 46, 0.25);
    color: var(--rojo);
}
.vot-btn--peligro:hover {
    background: linear-gradient(135deg, var(--rojo), var(--rojo-oscuro));
    border-color: transparent;
    color: var(--blanco);
    box-shadow: 0 8px 20px -9px rgba(200, 16, 46, 0.8);
}
.vot-btn--peligro:focus-visible {
    outline: 3px solid var(--rojo);
    outline-offset: 2px;
}

.vot-acciones {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}

/* Contenedor de resultados: nunca recorta los mensajes de error. */
.vot-resultado {
    margin-top: 16px;
    overflow: visible;
    max-height: none;
    height: auto;
}
.vot-resultado:empty { margin-top: 0; }
/* Los mensajes deben poder crecer y ser legibles completos. */
.vot-resultado .vot-alerta {
    display: block;
    width: 100%;
    box-sizing: border-box;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.vot-resultado .vot-alerta strong,
.vot-resultado .vot-alerta p,
.vot-resultado .vot-alerta small {
    display: block;
    white-space: normal;
    overflow: visible;
}
.vot-resultado .vot-alerta p { margin: 8px 0 0; }
.vot-resultado .vot-alerta small { font-size: 0.92rem; font-weight: 600; opacity: 0.95; }

.vot-tarjeta {
    border-radius: var(--radio);
    padding: 16px;
    border: 1.5px solid var(--gris-borde);
    background: #fbfcfe;
}
.vot-tarjeta--ok { border-color: rgba(31, 122, 63, 0.4); background: rgba(31, 122, 63, 0.06); }
.vot-tarjeta--alerta { border-color: rgba(244, 180, 0, 0.5); background: rgba(244, 180, 0, 0.08); }
.vot-tarjeta--error { border-color: rgba(200, 16, 46, 0.4); background: rgba(200, 16, 46, 0.06); }

.vot-tarjeta__titulo {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 800;
    color: var(--azul-profundo);
}

.vot-datos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 9px 16px;
    margin: 0;
}
.vot-datos dt {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gris-texto);
    font-weight: 700;
}
.vot-datos dd {
    margin: 2px 0 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--azul-profundo);
}

.vot-form { display: flex; flex-direction: column; }
.vot-form label {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--azul-profundo);
    margin: 12px 0 6px;
}
.vot-form label:first-child { margin-top: 0; }

.vot-votante {
    background: linear-gradient(135deg, rgba(20, 58, 107, 0.07), rgba(30, 90, 168, 0.05));
    border-left: 4px solid var(--azul-claro);
    border-radius: var(--radio-sm);
    padding: 12px 14px;
    margin-bottom: 16px;
    font-size: 13.5px;
    line-height: 1.6;
}
.vot-votante strong { color: var(--azul-profundo); }

.vot-votante__card { display: flex; flex-direction: column; gap: 4px; }
.vot-votante__nombre { font-weight: 800; font-size: 15px; color: var(--azul-profundo); }
.vot-votante__meta { font-size: 12.5px; color: var(--gris-texto); }
.vot-tag {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.15);
    color: #047857;
    font-size: 11px;
    font-weight: 700;
}

.vot-contacto {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.vot-contacto__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
    color: #fff;
    background: var(--azul-claro);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.vot-contacto__btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.vot-contacto__btn:active { transform: scale(0.97); }
.vot-contacto__btn--llamar { background: linear-gradient(135deg, #1e5aa8, #143a6b); }
.vot-contacto__btn--wa { background: linear-gradient(135deg, #25d366, #128c7e); }
.vot-contacto__btn--tg { background: linear-gradient(135deg, #2aabee, #229ed9); }

.vot-comuna-select { margin-bottom: 16px; }
.vot-comuna-select label {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    margin-bottom: 6px;
}

.vot-proyectos {
    display: grid;
    grid-template-columns: 1fr;
    gap: 11px;
}

.vot-proyecto {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    padding: 15px;
    border: 2px solid var(--gris-borde);
    border-radius: var(--radio);
    background: var(--blanco);
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s, background 0.2s;
    text-align: left;
    font-family: inherit;
    width: 100%;
}
.vot-proyecto:hover {
    border-color: var(--azul-claro);
    box-shadow: 0 8px 22px -12px rgba(30, 90, 168, 0.55);
    transform: translateY(-2px);
}
.vot-proyecto--sel {
    border-color: var(--rojo);
    background: rgba(200, 16, 46, 0.05);
    box-shadow: 0 8px 24px -12px rgba(200, 16, 46, 0.6);
}

.vot-proyecto__num {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--azul-rey), var(--azul-profundo));
    color: var(--blanco);
    font-weight: 800;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.vot-proyecto--sel .vot-proyecto__num {
    background: linear-gradient(135deg, var(--rojo), var(--rojo-oscuro));
}

.vot-proyecto__cuerpo { flex: 1; min-width: 0; }
.vot-proyecto__titulo {
    margin: 0 0 4px;
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--azul-profundo);
}
.vot-proyecto__desc {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--gris-texto);
}

.vot-vacio {
    text-align: center;
    padding: 26px 14px;
    color: var(--gris-texto);
    font-size: 13.5px;
}

/* Toast: mensaje flotante de error/éxito, siempre visible por encima del resto */
.vot-toast {
    position: fixed;
    left: 50%;
    bottom: 26px;
    transform: translate(-50%, 130%);
    background: var(--azul-profundo);
    color: var(--blanco);
    padding: 14px 22px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
    box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.65);
    z-index: 9999;
    width: auto;
    min-width: 240px;
    max-width: min(92vw, 560px);
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
    opacity: 0;
    pointer-events: none;
}
.vot-toast--visible {
    transform: translate(-50%, 0);
    opacity: 1;
}
.vot-toast--ok { background: var(--verde); }
.vot-toast--error { background: var(--rojo); }
.vot-toast--warn { background: #b45309; }
@media (max-width: 480px) {
    .vot-toast {
        bottom: 16px;
        left: 12px;
        right: 12px;
        transform: translate(0, 130%);
        width: auto;
        min-width: 0;
        max-width: none;
    }
    .vot-toast--visible { transform: translate(0, 0); }
}

/* ============================================================
   Modal de confirmación de voto
   ============================================================ */
.vot-confirm {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}
.vot-confirm--visible {
    opacity: 1;
    visibility: visible;
}

.vot-confirm__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(11, 31, 58, 0.62);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.vot-confirm__caja {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: var(--blanco);
    border-radius: 20px;
    padding: 30px 26px 24px;
    text-align: center;
    box-shadow: 0 30px 70px -20px rgba(11, 31, 58, 0.55);
    border: 1px solid rgba(221, 227, 236, 0.9);
    transform: translateY(18px) scale(0.96);
    opacity: 0;
    transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.34s ease;
}
.vot-confirm--visible .vot-confirm__caja {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.vot-confirm__icono {
    width: 66px;
    height: 66px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blanco);
    background: linear-gradient(135deg, var(--azul-claro), var(--azul-rey));
    box-shadow: 0 12px 26px -10px rgba(20, 58, 107, 0.75);
}
.vot-confirm__icono svg {
    width: 34px;
    height: 34px;
}

.vot-confirm__titulo {
    margin: 0 0 8px;
    font-size: 19px;
    font-weight: 800;
    color: var(--azul-profundo);
    letter-spacing: -0.01em;
}

.vot-confirm__texto {
    margin: 0 0 12px;
    font-size: 14px;
    color: var(--gris-texto);
    line-height: 1.5;
}

.vot-confirm__proyecto {
    margin: 0 0 16px;
    padding: 14px 16px;
    border-radius: var(--radio-sm);
    background: linear-gradient(135deg, rgba(30, 90, 168, 0.08), rgba(20, 58, 107, 0.05));
    border: 1px solid rgba(30, 90, 168, 0.18);
    font-size: 15px;
    font-weight: 700;
    color: var(--azul-rey);
    line-height: 1.45;
    word-break: break-word;
}

.vot-confirm__aviso {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 22px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(200, 16, 46, 0.08);
    color: var(--rojo);
    font-size: 12.5px;
    font-weight: 700;
}
.vot-confirm__aviso-icono { font-size: 14px; }

.vot-confirm__acciones {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}
.vot-confirm__acciones .vot-btn {
    flex: 1 1 0;
    min-width: 130px;
    justify-content: center;
}

@media (max-width: 420px) {
    .vot-confirm__caja { padding: 26px 20px 20px; }
    .vot-confirm__acciones { flex-direction: column-reverse; }
    .vot-confirm__acciones .vot-btn { width: 100%; }
}

/* ============================================================
   ADMIN
   ============================================================ */
.admin-body { background: #eef1f6; }

.admin-tabs {
    display: flex;
    gap: 4px;
    padding: 0 12px;
    background: var(--blanco);
    border-bottom: 1px solid var(--gris-borde);
    overflow-x: auto;
    position: sticky;
    top: 66px;
    z-index: 30;
    scrollbar-width: none;
}
.admin-tabs::-webkit-scrollbar { display: none; }

.admin-tab {
    padding: 13px 15px;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    color: var(--gris-texto);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    transition: color 0.2s, border-color 0.2s;
}
.admin-tab:hover { color: var(--azul-rey); }
.admin-tab--active {
    color: var(--rojo);
    border-bottom-color: var(--rojo);
}
.admin-tab--peligro { color: var(--rojo-oscuro); }
.admin-tab--peligro:hover { color: var(--rojo); }
.admin-tab--peligro.admin-tab--active {
    color: var(--rojo);
    border-bottom-color: var(--rojo);
}

.admin-contenido { max-width: 1180px; }
.admin-oculto { display: none !important; }

.admin-seccion { animation: pasoEntrada 0.3s ease; }

.admin-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.kpi {
    background: var(--blanco);
    border-radius: var(--radio);
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--sombra-suave);
    border-left: 4px solid var(--azul-claro);
}
.kpi--rojo   { border-left-color: var(--rojo); }
.kpi--dorado { border-left-color: var(--amarillo); }
.kpi--verde  { border-left-color: var(--verde); }
.kpi--gris   { border-left-color: var(--gris-texto); }
.kpi--azul   { border-left-color: var(--azul-claro); }

.kpi__icono { font-size: 24px; line-height: 1; }
.kpi__datos { display: flex; flex-direction: column; min-width: 0; }
.kpi__valor {
    font-size: 21px;
    font-weight: 800;
    color: var(--azul-profundo);
    line-height: 1.1;
}
.kpi__titulo {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--gris-texto);
    font-weight: 700;
    margin-top: 3px;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.admin-card {
    background: var(--blanco);
    border-radius: var(--radio);
    padding: 17px;
    box-shadow: var(--sombra-suave);
    margin-bottom: 16px;
}
.admin-card__titulo {
    margin: 0 0 14px;
    font-size: 14px;
    font-weight: 800;
    color: var(--azul-profundo);
    padding-bottom: 9px;
    border-bottom: 2px solid var(--gris-borde);
}

.admin-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.admin-bar h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    color: var(--azul-profundo);
}
.admin-bar__acciones { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }

.admin-nota {
    margin: 0;
    font-size: 13px;
    line-height: 1.65;
    color: var(--gris-texto);
}

.admin-tabla-wrap {
    overflow-x: auto;
    border-radius: var(--radio);
    box-shadow: var(--sombra-suave);
    background: var(--blanco);
}

.admin-tabla {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 560px;
}
.admin-tabla thead th {
    background: var(--azul-profundo);
    color: var(--blanco);
    text-align: left;
    padding: 11px 13px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    white-space: nowrap;
}
.admin-tabla tbody td {
    padding: 10px 13px;
    border-bottom: 1px solid var(--gris-borde);
    color: var(--azul-profundo);
    vertical-align: middle;
}
.admin-tabla tbody tr:nth-child(even) { background: #fafbfd; }
.admin-tabla tbody tr:hover { background: #f2f6fc; }
.admin-tabla__vacio {
    text-align: center;
    color: var(--gris-texto);
    padding: 26px 13px !important;
    font-style: italic;
}
.admin-tabla__acciones { white-space: nowrap; display: flex; gap: 6px; }

.padron-tel {
    color: var(--azul-claro);
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
.padron-tel:hover { text-decoration: underline; }
.padron-tel__ico { text-decoration: none; font-size: 14px; }

.badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    background: rgba(90, 100, 120, 0.14);
    color: var(--gris-texto);
}
.badge--ok { background: rgba(31, 122, 63, 0.14); color: var(--verde); }
.badge--off { background: rgba(200, 16, 46, 0.12); color: var(--rojo); }
.badge--admin { background: rgba(20, 58, 107, 0.14); color: var(--azul-rey); }
.badge--sup { background: rgba(124, 58, 237, 0.14); color: #6d28d9; }
.badge--alcalde { background: rgba(180, 130, 20, 0.16); color: #8a6100; }
.badge--sala { background: rgba(31, 122, 63, 0.14); color: var(--verde); }
.badge--delegado { background: rgba(13, 148, 136, 0.16); color: #0f766e; }
.badge--padron { background: rgba(20, 58, 107, 0.14); color: var(--azul-rey); }
.badge--registrado { background: rgba(214, 158, 46, 0.18); color: #8a6410; }

/* ============================================================
   MANTENIMIENTO (zona restringida con contraseña maestra)
   ============================================================ */
.admin-aviso-peligro {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: linear-gradient(135deg, #fff5f6, #ffe9ec);
    border: 1px solid rgba(200, 16, 46, 0.28);
    border-left: 5px solid var(--rojo);
    border-radius: var(--radio);
    padding: 16px 18px;
    margin-bottom: 18px;
    box-shadow: 0 4px 14px rgba(200, 16, 46, 0.08);
}
.admin-aviso-peligro__icono {
    font-size: 26px;
    line-height: 1;
    flex-shrink: 0;
    animation: adminParpadeoVivo 2.4s ease-in-out infinite;
}
.admin-aviso-peligro strong {
    display: block;
    font-size: 14.5px;
    font-weight: 800;
    color: var(--rojo-oscuro);
    margin-bottom: 5px;
}
.admin-aviso-peligro p {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #7a2230;
}
.admin-aviso-peligro p strong { display: inline; color: var(--rojo-oscuro); }

/* KPIs de mantenimiento / sala situacional */
.admin-kpi {
    background: var(--blanco);
    border-radius: var(--radio);
    padding: 14px 15px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    box-shadow: var(--sombra-suave);
    border-left: 4px solid var(--rojo);
    min-width: 0;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.admin-kpi:hover {
    transform: translateY(-2px);
    box-shadow: var(--sombra);
}
.admin-kpi__icono {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: rgba(30, 90, 168, 0.10);
    font-size: 20px;
    line-height: 1;
}
.admin-kpi__cuerpo {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1 1 auto;
}
.admin-kpi__valor {
    font-size: 23px;
    font-weight: 800;
    color: var(--azul-profundo);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
.admin-kpi__titulo {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--gris-texto);
    font-weight: 700;
    line-height: 1.25;
}

/* Tarjetas de acción peligrosa */
.admin-grid--mantenimiento {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.admin-card--peligro {
    border-top: 4px solid var(--rojo);
    display: flex;
    flex-direction: column;
}
.admin-card--peligro .admin-card__titulo {
    color: var(--rojo-oscuro);
    border-bottom-color: rgba(200, 16, 46, 0.2);
}
.admin-card--peligro .admin-nota { flex: 1 1 auto; margin-bottom: 14px; }
.admin-card--peligro .vot-btn--peligro { align-self: flex-start; }
.admin-card--critico {
    background: linear-gradient(160deg, #fff, #fff2f4);
    border: 1px solid rgba(200, 16, 46, 0.35);
    border-top: 4px solid var(--rojo-oscuro);
    box-shadow: 0 6px 20px rgba(200, 16, 46, 0.14);
}
.admin-card--critico .admin-card__titulo { color: var(--rojo-oscuro); }

@media (max-width: 560px) {
    .admin-aviso-peligro { flex-direction: column; gap: 8px; }
    .admin-card--peligro .vot-btn--peligro { align-self: stretch; width: 100%; }
}

/* Bitácora: columna de detalle */
.admin-detalle {
    font-size: 12px;
    color: var(--gris-texto);
    word-break: break-word;
    max-width: 520px;
}

/* Bitácora: contexto técnico (método/URI/user-agent) en segunda línea */
.admin-contexto {
    font-size: 10.5px;
    color: #9aa3ad;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    word-break: break-all;
    max-width: 520px;
    margin-top: 2px;
    opacity: .85;
}

/* Gráficos */
.chart-barras { display: flex; flex-direction: column; gap: 10px; }

.chart-fila {
    display: grid;
    grid-template-columns: minmax(90px, 34%) 1fr auto;
    align-items: center;
    gap: 10px;
}
.chart-fila__label {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--azul-profundo);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.chart-fila__barra {
    height: 20px;
    background: #eef1f6;
    border-radius: 999px;
    overflow: hidden;
}
.chart-fila__fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--azul-claro), var(--azul-rey));
    transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    min-width: 3px;
}
.chart-fila__valor {
    font-size: 12.5px;
    font-weight: 800;
    color: var(--azul-profundo);
    min-width: 42px;
    text-align: right;
}

/* Modo tarjetas: título completo + barra ancha + valor visible */
.chart-barras--tarjetas { gap: 14px; }

.chart-tarjeta {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid var(--gris-borde);
    border-radius: 12px;
}

.chart-tarjeta__cab {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.chart-tarjeta__label {
    font-size: 13px;
    font-weight: 700;
    color: var(--azul-profundo);
    line-height: 1.35;
    flex: 1;
    min-width: 0;
}

.chart-tarjeta__valor {
    font-size: 15px;
    font-weight: 800;
    color: var(--azul-rey);
    white-space: nowrap;
    flex-shrink: 0;
}

.chart-tarjeta__barra {
    height: 14px;
    background: #e6ebf2;
    border-radius: 999px;
    overflow: hidden;
}

.chart-tarjeta__fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--azul-claro), var(--azul-rey));
    transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    min-width: 4px;
}

/* ============================================================
   Ranking de Votos por Proyecto (vista profesional)
   ============================================================ */
.rank-proyectos {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rank-item {
    display: flex;
    align-items: stretch;
    gap: 12px;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid var(--gris-borde);
    border-radius: 14px;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.rank-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px -12px rgba(11, 31, 58, .35);
    border-color: #cbd5e1;
}

/* Posición / medalla */
.rank-item__pos {
    flex-shrink: 0;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rank-item__medalla {
    font-size: 24px;
    line-height: 1;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .18));
}

.rank-item__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 12.5px;
    font-weight: 800;
    color: #64748b;
    background: #eef2f7;
    border: 1px solid #e2e8f0;
}

/* Cuerpo */
.rank-item__cuerpo {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.rank-item__cab {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.rank-item__titulo {
    font-size: 13px;
    font-weight: 600;
    color: var(--azul-profundo);
    line-height: 1.35;
    flex: 1;
    min-width: 0;
}

.rank-item__titulo b {
    color: var(--azul-rey);
    font-weight: 800;
}

.rank-item__votos {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 16px;
    font-weight: 800;
    color: var(--azul-rey);
    font-variant-numeric: tabular-nums;
}

.rank-item__votos small {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--gris-texto);
    text-transform: uppercase;
    letter-spacing: .03em;
}

/* Barra */
.rank-item__barra {
    height: 12px;
    background: #e6ebf2;
    border-radius: 999px;
    overflow: hidden;
}

.rank-item__fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--azul-claro), var(--azul-rey));
    transition: width .8s cubic-bezier(.22, 1, .36, 1);
    min-width: 4px;
}

/* Pie: comuna + porcentaje */
.rank-item__pie {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 11px;
    color: var(--gris-texto);
}

.rank-item__comuna {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 60%;
}

.rank-item__pct {
    flex-shrink: 0;
    font-weight: 700;
    color: #64748b;
    font-variant-numeric: tabular-nums;
}

/* Destacados del podio */
.rank-item--1 {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-color: #fcd34d;
}
.rank-item--1 .rank-item__fill {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}
.rank-item--1 .rank-item__votos { color: #b45309; }

.rank-item--2 {
    background: linear-gradient(135deg, #f8fafc 0%, #eef2f7 100%);
    border-color: #cbd5e1;
}
.rank-item--2 .rank-item__fill {
    background: linear-gradient(90deg, #94a3b8, #64748b);
}

.rank-item--3 {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border-color: #fdba74;
}
.rank-item--3 .rank-item__fill {
    background: linear-gradient(90deg, #fb923c, #ea580c);
}

/* El panel admin usa fondo claro; se fuerzan colores oscuros legibles
   independientemente del tema del sistema operativo. */
.rank-item__titulo,
.rank-item__titulo b,
.rank-item__votos,
.rank-item__num,
.rank-item__pct,
.rank-item__comuna {
    color: var(--azul-profundo);
}
.rank-item__titulo b { color: var(--azul-rey); }
.rank-item__votos { color: var(--azul-rey); }
.rank-item__num { color: #475569; }
.rank-item__pct,
.rank-item__comuna { color: var(--gris-texto); }
.rank-item--1 .rank-item__votos { color: #b45309; }

.chart-vacio {
    text-align: center;
    color: var(--gris-texto);
    font-size: 13px;
    font-style: italic;
    padding: 22px 10px;
    margin: 0;
}

.chart-dona__wrap {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}
.chart-dona__circulo {
    width: 148px;
    height: 148px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.chart-dona__centro {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: var(--blanco);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 2px 8px rgba(11, 31, 58, 0.12);
}
.chart-dona__centro strong {
    font-size: 21px;
    font-weight: 800;
    color: var(--azul-profundo);
    line-height: 1;
}
.chart-dona__centro small {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gris-texto);
    font-weight: 700;
    margin-top: 3px;
}

.chart-leyenda {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 150px;
}
.chart-leyenda__item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
}
.chart-leyenda__punto {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}
.chart-leyenda__nombre { flex: 1; color: var(--azul-profundo); font-weight: 600; }
.chart-leyenda__valor { color: var(--gris-texto); font-weight: 700; white-space: nowrap; }

/* Modal */
.admin-modal {
    position: fixed;
    inset: 0;
    background: rgba(8, 23, 41, 0.62);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}
.admin-modal--visible { opacity: 1; visibility: visible; }

.admin-modal__box {
    background: var(--blanco);
    border-radius: var(--radio);
    width: 100%;
    max-width: 470px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.55);
    transform: translateY(14px) scale(0.98);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.admin-modal--visible .admin-modal__box { transform: translateY(0) scale(1); }

.admin-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 18px;
    border-bottom: 1px solid var(--gris-borde);
    position: sticky;
    top: 0;
    background: var(--blanco);
    z-index: 2;
}
.admin-modal__head h3 {
    margin: 0;
    font-size: 15.5px;
    font-weight: 800;
    color: var(--azul-profundo);
}
.admin-modal__cerrar {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 9px;
    background: rgba(11, 31, 58, 0.06);
    color: var(--azul-profundo);
    font-size: 21px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s;
}
.admin-modal__cerrar:hover { background: rgba(200, 16, 46, 0.12); color: var(--rojo); }

.admin-modal__body { padding: 18px; }

/* Formularios del admin */
.admin-form { display: flex; flex-direction: column; }
.admin-form label {
    display: flex;
    flex-direction: column;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--azul-profundo);
    margin-bottom: 13px;
    gap: 6px;
}
.admin-form__check {
    flex-direction: row !important;
    align-items: center;
    gap: 9px !important;
    font-weight: 600 !important;
}
.admin-form__check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--rojo);
    cursor: pointer;
}
.admin-form textarea.vot-input { resize: vertical; min-height: 70px; }
.admin-form__acciones {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 6px;
    padding-top: 14px;
    border-top: 1px solid var(--gris-borde);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 720px) {
    .app-header__texto h1 { font-size: 13px; }
    .app-header__usuario-nombre { display: none; }
    .admin-tabs { top: 62px; }
    .admin-grid { grid-template-columns: 1fr; }
    .chart-fila { grid-template-columns: minmax(74px, 40%) 1fr auto; }
    .chart-fila__label { font-size: 11px; }
}

@media (max-width: 480px) {
    .login-card { padding: 0 18px 22px; border-radius: 18px; }
    .login-bandera { margin: 0 -18px 18px; }
    .login-titulo { font-size: 19px; }
    .login-escudo { width: 80px; height: 80px; }
    .login-escudo img { width: 66px; height: 66px; }

    .app-contenido { padding: 14px 11px 28px; }
    .vot-paso { padding: 17px 14px; }
    .vot-buscar { flex-direction: column; }
    .vot-buscar .vot-btn { width: 100%; }
    .vot-acciones .vot-btn { flex: 1; }
    .admin-kpis { grid-template-columns: repeat(2, 1fr); }
    .kpi { padding: 12px; gap: 9px; }
    .kpi__valor { font-size: 18px; }
    .kpi__icono { font-size: 20px; }
    .chart-dona__circulo { width: 128px; height: 128px; }
    .chart-dona__centro { width: 82px; height: 82px; }
    .admin-tabla { min-width: 520px; }
}

@media (min-width: 640px) {
    .vot-proyectos { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1000px) {
    .vot-proyectos { grid-template-columns: repeat(2, 1fr); }
}

/* Impresión */
@media print {
    .app-header, .app-footer, .admin-tabs, .vot-btn, .admin-bar { display: none !important; }
    body { background: #fff; }
    .admin-card, .admin-tabla-wrap { box-shadow: none; border: 1px solid #ccc; }
}

/* ============================================================
   DASHBOARD ESTADÍSTICO
   ============================================================ */

/* Barra de progreso hacia la meta */
.dash-meta {
    background: linear-gradient(135deg, #0b1f3a 0%, #143a63 100%);
    border-radius: 16px;
    padding: 20px 22px;
    margin-bottom: 18px;
    color: #fff;
    box-shadow: 0 10px 30px -12px rgba(11, 31, 58, 0.55);
}
.dash-meta__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}
.dash-meta__etiqueta {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255, 255, 255, 0.65);
    font-weight: 700;
}
.dash-meta__titulo {
    display: block;
    font-size: 22px;
    font-weight: 800;
    margin-top: 3px;
}
.dash-meta__pct {
    font-size: 30px;
    font-weight: 900;
    color: #f4b400;
    line-height: 1;
}
.dash-meta__barra {
    height: 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    overflow: hidden;
}
.dash-meta__fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #f4b400, #ffd54f);
    transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.dash-meta__fill--completo {
    background: linear-gradient(90deg, #1f7a3f, #4caf50);
}
.dash-meta__pie {
    margin-top: 10px;
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.8);
}

/* Tarjeta del proyecto líder */
.dash-lider {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    border: 1px solid #f4b400;
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 18px;
    box-shadow: 0 8px 24px -14px rgba(244, 180, 0, 0.7);
}
.dash-lider__icono {
    font-size: 34px;
    line-height: 1;
    flex-shrink: 0;
}
.dash-lider__info {
    flex: 1;
    min-width: 0;
}
.dash-lider__etiqueta {
    display: block;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 1.1px;
    font-weight: 800;
    color: #8a6d00;
}
.dash-lider__titulo {
    display: block;
    font-size: 15.5px;
    font-weight: 800;
    color: #0b1f3a;
    margin: 3px 0 2px;
    line-height: 1.3;
}
.dash-lider__comuna {
    display: block;
    font-size: 12px;
    color: #6b5a00;
}
.dash-lider__votos {
    text-align: center;
    flex-shrink: 0;
    padding-left: 16px;
    border-left: 1px solid rgba(138, 109, 0, 0.25);
}
.dash-lider__votos strong {
    display: block;
    font-size: 26px;
    font-weight: 900;
    color: #0b1f3a;
    line-height: 1;
}
.dash-lider__votos small {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #8a6d00;
    font-weight: 700;
}
.dash-lider__vacio {
    font-size: 13px;
    color: #6b5a00;
    text-align: center;
    width: 100%;
}

/* Barras dobles (padrón vs. votos) */
.chart-fila--doble .chart-fila__barras {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
}
.chart-fila--doble .chart-fila__barra {
    height: 9px;
}
.chart-fila__fill--padron {
    background: linear-gradient(90deg, #9aa7b8, #c3ccd8) !important;
}
.chart-leyenda-inline {
    display: flex;
    gap: 18px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed var(--gris-borde);
    font-size: 12px;
    color: #556;
    font-weight: 600;
}
.chart-leyenda-inline .punto {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    margin-right: 6px;
    vertical-align: middle;
}
.chart-leyenda-inline .punto--votos { background: #c8102e; }
.chart-leyenda-inline .punto--padron { background: #9aa7b8; }

/* ============================================================
   DASHBOARD ESTADÍSTICO — encabezado, top rankings y paginación
   ============================================================ */

/* Encabezado del dashboard */
.dash-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.dash-head__info { min-width: 0; }
.dash-head__titulo {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    color: var(--azul-profundo);
    letter-spacing: -0.01em;
}
.dash-head__sub {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    color: var(--gris-texto);
    font-weight: 600;
}

/* Encabezado de tarjeta con acciones a la derecha */
.admin-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.admin-card__head .admin-card__titulo { margin: 0; }
.admin-card__acciones {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.dash-actualizado {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--gris-texto);
    white-space: nowrap;
}

/* Filas de ranking (top comunas / operadores) */
.chart-fila--top .chart-fila__label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    color: var(--azul-profundo);
}
.chart-fila__medalla {
    font-size: 15px;
    line-height: 1;
    flex-shrink: 0;
}
.chart-fila__fill--operador {
    background: linear-gradient(90deg, #1e5aa8, #00ADCD) !important;
}

/* Paginación de tablas */
.admin-paginacion {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--gris-borde);
}
.admin-paginacion__info {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--gris-texto);
}
.admin-paginacion__controles {
    display: flex;
    align-items: center;
    gap: 10px;
}
.admin-paginacion__pagina {
    font-size: 13px;
    font-weight: 800;
    color: var(--azul-profundo);
    min-width: 54px;
    text-align: center;
}
.admin-paginacion .vot-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

@media (max-width: 560px) {
    .dash-head { align-items: flex-start; }
    .admin-card__head { align-items: flex-start; }
    .admin-card__acciones { width: 100%; }
    .admin-card__acciones .vot-input { flex: 1 1 auto; }
    .admin-paginacion { justify-content: center; }
    .dash-meta__titulo { font-size: 18px; }
    .dash-meta__pct { font-size: 24px; }
    .dash-lider { flex-wrap: wrap; }
    .dash-lider__votos {
        padding-left: 0;
        border-left: none;
        width: 100%;
        text-align: left;
        border-top: 1px solid rgba(138, 109, 0, 0.25);
        padding-top: 10px;
    }
}

/* ============================================================
   PADRÓN / CONTROL DE VOTANTES
   ============================================================ */
.admin-filtros {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 16px;
}
.admin-filtro {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 180px;
}
.admin-filtro--crece { flex: 1 1 240px; }
.admin-filtro label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}
.admin-filtro select,
.admin-filtro input {
    padding: 9px 12px;
    border: 1px solid var(--gris-borde, #d7dde5);
    border-radius: 9px;
    font-size: 14px;
    background: #fff;
    color: #1e293b;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.admin-filtro select:focus,
.admin-filtro input:focus {
    outline: none;
    border-color: #00ADCD;
    box-shadow: 0 0 0 3px rgba(0, 173, 205, 0.15);
}
.admin-barra-acciones {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    margin-bottom: 14px;
    background: #f8fafc;
    border: 1px solid var(--gris-borde, #e2e8f0);
    border-radius: 12px;
}
.admin-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    user-select: none;
}
.admin-check input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: #00ADCD;
    cursor: pointer;
}
.admin-seleccion {
    font-size: 13px;
    font-weight: 700;
    color: #0f766e;
    background: #ccfbf1;
    padding: 4px 10px;
    border-radius: 999px;
}
.admin-barra-acciones .admin-filtro { min-width: 200px; }
.admin-barra-acciones .btn { margin-left: auto; }
.padron-check {
    width: 17px;
    height: 17px;
    accent-color: #00ADCD;
    cursor: pointer;
}
.admin-paginacion {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
}
.admin-paginacion__info {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    min-width: 140px;
    text-align: center;
}
.admin-paginacion .btn[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
}
@media (max-width: 640px) {
    .admin-filtro { min-width: 100%; }
    .admin-barra-acciones .btn { margin-left: 0; width: 100%; }
    .admin-paginacion { flex-wrap: wrap; }
}

/* ============================================================
   TOASTS MODERNOS (apilables, con icono, cierre y progreso)
   ============================================================ */
.admin-toasts {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: min(380px, calc(100vw - 32px));
    pointer-events: none;
}
.admin-toast {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 40px 16px 14px;
    border-radius: 14px;
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 12px 32px -8px rgba(15, 23, 42, 0.28), 0 2px 8px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-left: 4px solid #00ADCD;
    overflow: hidden;
    pointer-events: auto;
    opacity: 0;
    transform: translateX(24px) scale(0.97);
    transition: opacity 0.26s ease, transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}
.admin-toast--visible {
    opacity: 1;
    transform: translateX(0) scale(1);
}
.admin-toast--saliendo {
    opacity: 0;
    transform: translateX(24px) scale(0.97);
}
.admin-toast__icono {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    color: #ffffff;
    background: #00ADCD;
}
.admin-toast__texto {
    flex: 1;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 600;
    padding-top: 2px;
    word-break: break-word;
}
.admin-toast__cerrar {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #94a3b8;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
}
.admin-toast__cerrar:hover {
    background: rgba(15, 23, 42, 0.06);
    color: #0f172a;
}
.admin-toast__progreso {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 100%;
    transform-origin: left center;
    background: #00ADCD;
    animation: adminToastProgreso linear forwards;
}
@keyframes adminToastProgreso {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}
.admin-toast--ok { border-left-color: #10b981; }
.admin-toast--ok .admin-toast__icono { background: #10b981; }
.admin-toast--ok .admin-toast__progreso { background: #10b981; }
.admin-toast--error { border-left-color: #ef4444; }
.admin-toast--error .admin-toast__icono { background: #ef4444; }
.admin-toast--error .admin-toast__progreso { background: #ef4444; }
.admin-toast--aviso { border-left-color: #f59e0b; }
.admin-toast--aviso .admin-toast__icono { background: #f59e0b; }
.admin-toast--aviso .admin-toast__progreso { background: #f59e0b; }
.admin-toast--info { border-left-color: #00ADCD; }

/* ============================================================
   CONFIRM MODERNO (reemplaza window.confirm)
   ============================================================ */
.admin-confirm {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.22s ease;
}
.admin-confirm--visible { opacity: 1; }
.admin-confirm__box {
    width: min(440px, 100%);
    background: #ffffff;
    border-radius: 20px;
    padding: 28px 26px 22px;
    text-align: center;
    box-shadow: 0 30px 70px -20px rgba(15, 23, 42, 0.5);
    transform: translateY(14px) scale(0.97);
    transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}
.admin-confirm--visible .admin-confirm__box {
    transform: translateY(0) scale(1);
}
.admin-confirm__icono {
    width: 62px;
    height: 62px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    background: #e0f2fe;
}
.admin-confirm__icono--peligro { background: #fee2e2; }
.admin-confirm__icono--aviso { background: #fef3c7; }
.admin-confirm__titulo {
    margin: 0 0 8px;
    font-size: 19px;
    font-weight: 800;
    color: #0f172a;
}
.admin-confirm__mensaje {
    margin: 0 0 22px;
    font-size: 14.5px;
    line-height: 1.55;
    color: #475569;
}
.admin-confirm__acciones {
    display: flex;
    gap: 12px;
    justify-content: center;
}
.admin-confirm__acciones .vot-btn {
    flex: 1;
    min-width: 0;
}

/* Campo de contraseña maestra dentro del modal */
.admin-clave__campo {
    position: relative;
    display: flex;
    align-items: center;
    margin: 0 0 10px;
}
.admin-clave__input {
    width: 100%;
    padding: 13px 46px 13px 15px;
    border: 1.5px solid var(--gris-borde);
    border-radius: var(--radio-sm);
    background: #f8fafc;
    color: #0f172a;
    font-size: 15px;
    font-family: inherit;
    letter-spacing: 0.02em;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.admin-clave__input:focus {
    outline: none;
    border-color: var(--rojo);
    background: var(--blanco);
    box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.14);
}
.admin-clave__ver {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 8px;
    background: transparent;
    font-size: 16px;
    cursor: pointer;
    opacity: 0.7;
    transition: background 0.2s, opacity 0.2s;
}
.admin-clave__ver:hover { background: rgba(11, 31, 58, 0.07); opacity: 1; }
.admin-clave__error {
    margin: 0 0 16px;
    font-size: 13px;
    font-weight: 700;
    color: var(--rojo);
    text-align: left;
}

/* ============================================================
   BITÁCORA EN TIEMPO REAL
   ============================================================ */
.vot-btn--vivo {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
}
.vot-btn--vivo:hover { background: #e2e8f0; }
.vot-btn--en-vivo {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    color: #ffffff !important;
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55);
    animation: adminPulsoVivo 1.8s infinite;
}
@keyframes adminPulsoVivo {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}
.punto-vivo {
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-right: 6px;
    border-radius: 50%;
    background: #ffffff;
    vertical-align: middle;
    animation: adminParpadeoVivo 1.1s infinite;
}
@keyframes adminParpadeoVivo {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.25; }
}
.badge--accion {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: #0f766e;
    background: #ccfbf1;
    white-space: nowrap;
}
.admin-bitacora__fecha {
    font-variant-numeric: tabular-nums;
    font-size: 12.5px;
    color: #64748b;
    white-space: nowrap;
}
.admin-bitacora__ip {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12px;
    color: #64748b;
}
.admin-detalle {
    font-size: 13.5px;
    color: #1e293b;
    font-weight: 600;
    word-break: break-word;
}
.admin-contexto {
    margin-top: 3px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11px;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 520px;
}
.admin-bitacora__nueva {
    animation: adminFilaNueva 2.4s ease-out;
}
@keyframes adminFilaNueva {
    0% { background: #d1fae5; }
    100% { background: transparent; }
}

/* ============================================================
   Aviso de rol (modo elector) en la pantalla de votación
   ============================================================ */
.vot-rol-aviso {
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: 720px;
    margin: 0 auto 18px;
    padding: 14px 18px;
    border-radius: 16px;
    border: 1px solid transparent;
    box-shadow: 0 6px 20px -10px rgba(0, 0, 0, 0.25);
}
.vot-rol-aviso__icono {
    font-size: 1.8rem;
    line-height: 1;
    flex-shrink: 0;
}
.vot-rol-aviso strong {
    display: block;
    font-size: 0.98rem;
    margin-bottom: 2px;
}
.vot-rol-aviso small {
    display: block;
    font-size: 0.82rem;
    line-height: 1.35;
    opacity: 0.85;
}
.vot-rol-aviso--elector {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-color: #6ee7b7;
    color: #065f46;
}
@media (prefers-color-scheme: dark) {
    .vot-rol-aviso--elector {
        background: linear-gradient(135deg, rgba(6, 95, 70, 0.35) 0%, rgba(4, 120, 87, 0.25) 100%);
        border-color: rgba(110, 231, 183, 0.4);
        color: #a7f3d0;
    }
}

/* ============================================================
   Ayuda contextual en formularios del panel (rol de usuario)
   ============================================================ */
.admin-form__ayuda {
    margin: -6px 0 4px;
    padding: 8px 12px;
    font-size: 0.8rem;
    line-height: 1.35;
    color: #475569;
    background: #f1f5f9;
    border-left: 3px solid #0ea5e9;
    border-radius: 8px;
}
@media (prefers-color-scheme: dark) {
    .admin-form__ayuda {
        color: #cbd5e1;
        background: rgba(148, 163, 184, 0.12);
        border-left-color: #38bdf8;
    }
}

/* ============================================================
   Control antifraude: cierre / reapertura del padrón
   ============================================================ */
.admin-cierre {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    border-left: 5px solid #16a34a;
    transition: border-color 0.3s ease, background 0.3s ease;
}
.admin-cierre--cerrado {
    border-left-color: #c8102e;
    background: linear-gradient(135deg, #fff5f6 0%, #ffe9ec 100%);
}
.admin-cierre__info {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.admin-cierre__icono {
    font-size: 2rem;
    line-height: 1;
    flex-shrink: 0;
}
.admin-cierre__texto {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.admin-cierre__texto strong {
    font-size: 1.02rem;
    color: var(--azul-profundo);
}
.admin-cierre--cerrado .admin-cierre__texto strong {
    color: #9f1239;
}
.admin-cierre__detalle {
    font-size: 0.84rem;
    line-height: 1.4;
    color: var(--gris-texto);
}
.admin-cierre__acciones {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}
@media (max-width: 640px) {
    .admin-cierre { flex-direction: column; align-items: stretch; }
    .admin-cierre__acciones { width: 100%; }
    .admin-cierre__acciones .vot-btn { flex: 1; }
}

/* ============================================================
   ACCESIBILIDAD VISUAL - Pantalla de votación
   Mejoras de legibilidad, contraste y tamaño táctil.
   ============================================================ */

/* Tipografía y contraste reforzados en la pantalla de votación */
.vot-panel { gap: 20px; }

.vot-paso {
    padding: 26px 24px;
    border-width: 1.5px;
}

.vot-paso__titulo {
    font-size: 1.35rem;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.vot-paso__desc {
    font-size: 1rem;
    line-height: 1.65;
    color: #3f4a5c;
    max-width: 62ch;
}

.vot-paso__num {
    width: 38px;
    height: 38px;
    font-size: 1.05rem;
    top: -15px;
    box-shadow: 0 6px 16px -5px rgba(200, 16, 46, 0.85);
}

/* Campos de entrada más grandes y con foco muy visible */
.vot-input {
    padding: 15px 16px;
    font-size: 1.05rem;
    border-width: 2px;
    border-color: #c3cddd;
}
.vot-input:focus-visible,
.vot-input:focus {
    border-color: var(--azul-rey);
    box-shadow: 0 0 0 4px rgba(30, 90, 168, 0.28);
}

.vot-form label,
.vot-comuna-select label {
    font-size: 0.95rem;
    color: var(--azul-profundo);
}

/* Botones: mayor tamaño táctil (>=48px), contraste y foco visible */
.vot-btn {
    min-height: 50px;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    border-width: 2px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.vot-btn:focus-visible {
    outline: 3px solid var(--amarillo);
    outline-offset: 2px;
}
.vot-btn--primary {
    background: linear-gradient(135deg, #d0122f, #9c0c23);
    box-shadow: 0 10px 24px -9px rgba(200, 16, 46, 0.9);
}
.vot-btn--primary:hover { filter: brightness(1.1); }
.vot-btn--ghost {
    color: var(--azul-rey);
    border-color: #c3cddd;
    background: #f7f9fc;
}
.vot-btn--ghost:hover { background: #eef3fa; }
.vot-btn--grande {
    min-height: 58px;
    padding: 18px 34px;
    font-size: 1.12rem;
    border-radius: 14px;
}
.vot-btn:disabled,
.vot-btn[aria-disabled="true"] {
    opacity: 0.55;
    cursor: not-allowed;
    filter: grayscale(0.25);
}

.vot-acciones { gap: 12px; }
.vot-acciones .vot-btn { flex: 1 1 auto; }

/* Tarjetas de proyecto: más grandes, con check visible y foco claro */
.vot-proyecto {
    padding: 20px 18px;
    gap: 16px;
    align-items: center;
    border-width: 2.5px;
}
.vot-proyecto:focus-visible {
    outline: 3px solid var(--amarillo);
    outline-offset: 2px;
    border-color: var(--azul-rey);
}
.vot-proyecto__num {
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
    border-radius: 12px;
}
.vot-proyecto__titulo {
    font-size: 1.12rem;
    font-weight: 800;
    line-height: 1.4;
    color: var(--azul-profundo);
}
.vot-proyecto__check {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2.5px solid #c3cddd;
    color: transparent;
    font-size: 1rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}
.vot-proyecto--sel .vot-proyecto__check {
    background: var(--rojo);
    border-color: var(--rojo);
    color: var(--blanco);
    transform: scale(1.08);
}
.vot-proyecto--sel {
    border-color: var(--rojo);
    background: rgba(200, 16, 46, 0.07);
}

/* Tarjeta del votante y datos: texto más legible */
.vot-votante {
    font-size: 1rem;
    padding: 16px 18px;
    border-left-width: 5px;
}
.vot-votante__nombre { font-size: 1.15rem; }
.vot-votante__meta { font-size: 0.95rem; color: #46536a; }
.vot-datos dt { font-size: 0.8rem; color: #46536a; }
.vot-datos dd { font-size: 1.02rem; }

/* Pantalla de éxito: representativa y clara */
.vot-exito {
    text-align: center;
    padding: 40px 24px;
    border-radius: var(--radio);
    background: linear-gradient(160deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid #86efac;
    animation: pasoEntrada 0.4s ease;
}
.vot-exito__icono {
    width: 88px;
    height: 88px;
    margin: 0 auto 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 900;
    color: var(--blanco);
    background: linear-gradient(135deg, #22c55e, #15803d);
    box-shadow: 0 16px 34px -12px rgba(21, 128, 61, 0.75);
    animation: exitoPulso 1.6s ease-in-out infinite;
}
@keyframes exitoPulso {
    0%, 100% { transform: scale(1); box-shadow: 0 16px 34px -12px rgba(21, 128, 61, 0.75); }
    50%      { transform: scale(1.05); box-shadow: 0 20px 42px -12px rgba(21, 128, 61, 0.9); }
}
.vot-exito h3,
.vot-exito__titulo {
    margin: 0 0 10px;
    font-size: 1.7rem;
    font-weight: 900;
    color: #14532d;
    letter-spacing: -0.01em;
    line-height: 1.25;
}
.vot-exito p,
.vot-exito__subtitulo {
    margin: 0 0 22px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #166534;
    line-height: 1.5;
    max-width: 46ch;
    margin-left: auto;
    margin-right: auto;
}
.vot-exito__icono svg {
    width: 46px;
    height: 46px;
    stroke: var(--blanco);
}
/* Detalle del voto: cédula y proyecto en filas legibles */
.vot-exito__detalle {
    max-width: 460px;
    margin: 0 auto 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.vot-exito__fila {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.85);
    border: 2px solid #86efac;
    border-radius: var(--radio-sm);
    text-align: left;
}
.vot-exito__etiqueta {
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #15803d;
    flex-shrink: 0;
}
.vot-exito__valor {
    font-size: 1.12rem;
    font-weight: 800;
    color: #14532d;
    text-align: right;
    word-break: break-word;
}
.vot-exito__nota {
    margin: 0 0 26px;
    font-size: 0.98rem;
    font-weight: 600;
    color: #166534;
    line-height: 1.5;
    max-width: 46ch;
    margin-left: auto;
    margin-right: auto;
}
.vot-exito .vot-btn { min-width: 240px; }

/* Alertas y estados de carga: legibles y con buen contraste */
.vot-alerta {
    padding: 16px 18px;
    border-radius: var(--radio-sm);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.5;
    border: 2px solid transparent;
    /* Evita que el texto se corte en contenedores flex/grid o con altura fija. */
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    overflow: visible;
    overflow-wrap: anywhere;
    word-break: break-word;
    height: auto;
    max-height: none;
}
.vot-alerta strong,
.vot-alerta p,
.vot-alerta small,
.vot-alerta span {
    white-space: normal;
    overflow-wrap: anywhere;
}
.vot-alerta p { margin: 8px 0 0; }
.vot-alerta p:first-child { margin-top: 0; }
.vot-alerta--warn {
    background: #fffbeb;
    border-color: #fcd34d;
    color: #92400e;
}
.vot-alerta--error {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #991b1b;
}
.vot-alerta--ok {
    background: #f0fdf4;
    border-color: #86efac;
    color: #166534;
}
.vot-cargando {
    text-align: center;
    padding: 30px 16px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--azul-rey);
}
.vot-cargando::after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 10px;
    vertical-align: -2px;
    border: 3px solid rgba(20, 58, 107, 0.25);
    border-top-color: var(--azul-rey);
    border-radius: 50%;
    animation: votGiro 0.8s linear infinite;
}
@keyframes votGiro { to { transform: rotate(360deg); } }

/* Aviso de rol (modo elector): más visible */
.vot-rol-aviso {
    padding: 18px 22px;
    border-width: 2px;
}
.vot-rol-aviso strong { font-size: 1.1rem; }
.vot-rol-aviso small { font-size: 0.95rem; opacity: 1; }

/* ============================================================
   DASHBOARD DEL ELECTOR
   ============================================================ */
.vot-dashboard {
    background: linear-gradient(135deg, var(--azul-profundo), var(--azul-rey));
    border-radius: var(--radio);
    padding: 26px 24px;
    margin-bottom: 20px;
    color: var(--blanco);
    box-shadow: 0 18px 40px -22px rgba(11, 31, 58, 0.9);
}
.vot-dashboard__hero {
    display: flex;
    align-items: center;
    gap: 18px;
}
.vot-dashboard__hero-icono {
    flex-shrink: 0;
    width: 62px;
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: rgba(255, 255, 255, 0.14);
    border: 2px solid rgba(255, 255, 255, 0.28);
    border-radius: 50%;
}
.vot-dashboard__hero-titulo {
    margin: 0 0 4px;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.25;
}
.vot-dashboard__hero-sub {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
}
.vot-dashboard__datos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
    margin-top: 20px;
}
.vot-dashboard__dato {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radio-sm);
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.35;
}
.vot-dashboard__dato-icono { font-size: 1.15rem; flex-shrink: 0; }

/* ============================================================
   INDICADOR DE PASOS DE LA VOTACIÓN
   ============================================================ */
.vot-progreso {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    list-style: none;
    margin: 0 0 4px;
    padding: 16px 18px;
    background: var(--blanco);
    border: 1px solid var(--gris-borde);
    border-radius: var(--radio);
    box-shadow: 0 6px 18px -14px rgba(11, 31, 58, 0.5);
}
.vot-progreso__item {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    color: var(--gris-texto);
    font-weight: 700;
    font-size: 0.92rem;
    position: relative;
}
.vot-progreso__item:not(:last-child)::after {
    content: "";
    flex: 1;
    height: 2px;
    margin: 0 4px;
    background: var(--gris-borde);
    border-radius: 2px;
}
.vot-progreso__num {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--gris-fondo);
    border: 2px solid var(--gris-borde);
    color: var(--gris-texto);
    font-weight: 800;
    font-size: 0.95rem;
    transition: all 0.25s ease;
}
.vot-progreso__texto {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.vot-progreso__item--activo { color: var(--azul-rey); }
.vot-progreso__item--activo .vot-progreso__num {
    background: var(--azul-rey);
    border-color: var(--azul-rey);
    color: var(--blanco);
    box-shadow: 0 0 0 4px rgba(20, 58, 107, 0.15);
}
.vot-progreso__item--completo { color: var(--verde); }
.vot-progreso__item--completo .vot-progreso__num {
    background: var(--verde);
    border-color: var(--verde);
    color: var(--blanco);
}
.vot-progreso__item--completo .vot-progreso__num::before {
    content: "✓";
}
.vot-progreso__item--completo .vot-progreso__num { font-size: 0; }
.vot-progreso__item--completo .vot-progreso__num::before { font-size: 1rem; }

/* ============================================================
   AVISO "ACUDA A UN OPERADOR" (elector sin cuadernillo)
   ============================================================ */
.vot-alerta--operador {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    text-align: left;
}
.vot-alerta--operador .vot-alerta__icono {
    flex-shrink: 0;
    font-size: 1.9rem;
    line-height: 1;
}
.vot-alerta--operador .vot-alerta__cuerpo { flex: 1; }
.vot-alerta--operador .vot-alerta__cuerpo strong {
    display: block;
    font-size: 1.08rem;
    margin-bottom: 6px;
}
.vot-alerta--operador .vot-alerta__cuerpo p {
    margin: 0 0 8px;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.5;
}
.vot-alerta--operador .vot-alerta__pasos {
    background: rgba(153, 27, 27, 0.07);
    border-radius: var(--radio-sm);
    padding: 10px 12px;
    margin: 0;
    font-weight: 600;
    line-height: 1.7;
}

@media (max-width: 560px) {
    .vot-dashboard { padding: 20px 16px; }
    .vot-dashboard__hero { flex-direction: column; text-align: center; }
    .vot-dashboard__hero-titulo { font-size: 1.15rem; }
    .vot-progreso { padding: 12px 10px; gap: 4px; }
    .vot-progreso__texto { display: none; }
    .vot-progreso__item { flex: 0 0 auto; }
    .vot-progreso__item:not(:last-child)::after { width: 18px; flex: 0 0 18px; }
}

/* Respeta la preferencia de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
    .vot-exito__icono { animation: none; }
    .vot-cargando::after { animation-duration: 1.6s; }
    .vot-paso, .vot-exito { animation: none; }
}

/* Pantallas pequeñas: botones a ancho completo y texto cómodo */
@media (max-width: 560px) {
    .vot-paso { padding: 22px 16px; }
    .vot-paso__titulo { font-size: 1.2rem; }
    .vot-acciones { flex-direction: column; }
    .vot-acciones .vot-btn { width: 100%; }
    .vot-exito .vot-btn { min-width: 0; width: 100%; }
    .vot-proyecto__titulo { font-size: 1.05rem; }
}

/* Acciones de la pantalla de éxito (imprimir comprobante / nuevo voto) */
.vot-exito__acciones {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 18px;
}

/* ------------------------------------------------------------
   Impresión del TICKET de votación para impresora térmica (tikera).
   Formato 80 mm. Al imprimir desde la ventana emergente se usa su
   propio CSS; estas reglas cubren la impresión directa (Ctrl+P).
   ------------------------------------------------------------ */
@media print {
    @page { size: 80mm auto; margin: 0; }

    html, body {
        width: 72mm !important;
        margin: 0 auto !important;
        padding: 0 !important;
        background: #ffffff !important;
        color: #000000 !important;
        font-family: "Courier New", Courier, monospace !important;
        font-size: 12px !important;
    }

    /* Ocultar todo lo que no es el ticket */
    .vot-header,
    .vot-progreso,
    .vot-dashboard,
    .vot-acciones,
    .vot-exito__acciones,
    .vot-toast,
    .vot-confirm,
    .vot-comuna-select,
    #vot-toast,
    #vot-confirm,
    .vot-paso__num,
    .vot-paso__titulo,
    .vot-paso__desc,
    .vot-alerta,
    .vot-cargando,
    .vot-contacto,
    .vot-btn,
    .vot-exito__icono,
    .vot-exito__nota {
        display: none !important;
    }

    .vot-panel {
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
        max-width: none !important;
    }

    .vot-paso {
        display: block !important;
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
        animation: none !important;
    }

    .vot-paso.vot-oculto { display: none !important; }

    .vot-votante__card {
        border: 1px dashed #000 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        margin-bottom: 6px !important;
        padding: 6px 4px !important;
    }

    .vot-votante__nombre { font-size: 13px !important; font-weight: 700 !important; }
    .vot-votante__meta { font-size: 11px !important; }

    .vot-proyectos { gap: 6px !important; }

    .vot-proyecto {
        display: flex !important;
        border: 1px dashed #000 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background: #ffffff !important;
        color: #000000 !important;
        padding: 6px 4px !important;
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .vot-proyecto__num {
        font-size: 20px !important;
        font-weight: 700 !important;
        color: #000000 !important;
    }
    .vot-proyecto__titulo { font-size: 12px !important; font-weight: 700 !important; }
    .vot-proyecto__check { display: none !important; }
}

/* ============================================================
   SALA SITUACIONAL (nómina de trabajadores + referidos)
   ============================================================ */
.sala-head__acciones {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* KPIs con variantes de color */
.admin-kpi--azul   { border-left-color: var(--azul-claro); }
.admin-kpi--verde  { border-left-color: var(--verde); }
.admin-kpi--amarillo { border-left-color: var(--amarillo); }
.admin-kpi--rojo   { border-left-color: var(--rojo); }

.admin-kpi--azul   .admin-kpi__icono { background: rgba(30, 90, 168, 0.12); }
.admin-kpi--verde  .admin-kpi__icono { background: rgba(31, 122, 63, 0.12); }
.admin-kpi--amarillo .admin-kpi__icono { background: rgba(244, 180, 0, 0.16); }
.admin-kpi--rojo   .admin-kpi__icono { background: rgba(200, 16, 46, 0.12); }

.admin-kpi--azul   .admin-kpi__valor { color: var(--azul-claro); }
.admin-kpi--verde  .admin-kpi__valor { color: var(--verde); }
.admin-kpi--amarillo .admin-kpi__valor { color: var(--dorado); }
.admin-kpi--rojo   .admin-kpi__valor { color: var(--rojo); }

/* Botón extra pequeño (tablas y fichas) */
.vot-btn--xs {
    min-height: 0;
    padding: 5px 10px;
    font-size: 11.5px;
    font-weight: 700;
    border-radius: 8px;
    border-width: 1px;
    line-height: 1.2;
    gap: 4px;
}

/* Filtros */
.sala-filtros {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 14px;
}
.sala-filtros .vot-input {
    flex: 1 1 180px;
    min-width: 150px;
}
.sala-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--gris-texto);
    white-space: nowrap;
    cursor: pointer;
}
.sala-check input { accent-color: var(--azul-claro); }

/* Tabla */
.sala-tabla-wrap { overflow-x: auto; }
.sala-tabla { font-size: 12.5px; }
.sala-tabla tbody td { vertical-align: middle; }

/* Badges de referidos */
.sala-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    background: #eef1f6;
    color: var(--gris-texto);
    border: 1px solid var(--gris-borde);
    white-space: nowrap;
}
.sala-badge--ok {
    background: rgba(31, 122, 63, 0.12);
    color: var(--verde);
    border-color: rgba(31, 122, 63, 0.3);
}
.sala-badge--tope {
    background: rgba(200, 16, 46, 0.12);
    color: var(--rojo-oscuro);
    border-color: rgba(200, 16, 46, 0.3);
}

/* Teléfono con enlace directo a WhatsApp */
.sala-wa {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px 2px 5px;
    border-radius: 999px;
    background: rgba(37, 211, 102, 0.12);
    border: 1px solid rgba(37, 211, 102, 0.35);
    color: #128c4a;
    font-weight: 700;
    font-size: 12px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.sala-wa:hover,
.sala-wa:focus-visible {
    background: rgba(37, 211, 102, 0.22);
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.28);
    transform: translateY(-1px);
    text-decoration: none;
}
.sala-wa__ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    font-size: 11px;
    line-height: 1;
    flex-shrink: 0;
}
.sala-wa__num { letter-spacing: 0.2px; }
.sala-ficha__datos .sala-wa { font-size: 12.5px; }

/* Paginación */
.sala-paginacion {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}
.sala-paginacion__info {
    font-size: 12px;
    font-weight: 600;
    color: var(--gris-texto);
}

/* Ranking */
.sala-ranking { display: flex; flex-direction: column; gap: 6px; }
.sala-ranking__fila {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border-radius: var(--radio-sm);
    background: #f7f9fc;
    border: 1px solid var(--gris-borde);
}
.sala-ranking__pos {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--azul-profundo);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}
.sala-ranking__fila:nth-child(1) .sala-ranking__pos { background: var(--dorado); color: var(--azul-profundo); }
.sala-ranking__fila:nth-child(2) .sala-ranking__pos { background: #9aa5b5; }
.sala-ranking__fila:nth-child(3) .sala-ranking__pos { background: #b87333; }
.sala-ranking__info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sala-ranking__info strong { font-size: 13px; color: var(--azul-profundo); }
.sala-ranking__info small { font-size: 11px; color: var(--gris-texto); }
.sala-ranking__valor {
    font-size: 17px;
    font-weight: 800;
    color: var(--verde);
}

/* ============================================================
   Sala Situacional · Estadística detallada y comparativa
   ============================================================ */
.sala-comp-fichas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}
.sala-comp-ficha {
    border: 1px solid var(--gris-borde);
    border-radius: var(--radio-sm);
    padding: 14px 16px;
    background: #fff;
    border-top: 3px solid var(--azul-profundo);
}
.sala-comp-ficha--referidos { border-top-color: var(--verde); }
.sala-comp-ficha__head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.sala-comp-ficha__head strong {
    font-size: 13px;
    color: var(--azul-profundo);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.sala-comp-ficha__icono { font-size: 18px; line-height: 1; }
.sala-comp-ficha__lista {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.sala-comp-ficha__lista li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    font-size: 12.5px;
    padding-bottom: 5px;
    border-bottom: 1px dashed #eef1f6;
}
.sala-comp-ficha__lista li:last-child { border-bottom: 0; padding-bottom: 0; }
.sala-comp-ficha__lista span { color: var(--gris-texto); }
.sala-comp-ficha__lista b { color: var(--azul-profundo); font-weight: 800; }

.sala-comp-tabla-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 18px;
}
.sala-comp-tabla {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
    min-width: 420px;
}
.sala-comp-tabla thead th {
    text-align: left;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--gris-texto);
    padding: 8px 10px;
    border-bottom: 2px solid var(--gris-borde);
    white-space: nowrap;
}
.sala-comp-tabla tbody td {
    padding: 8px 10px;
    border-bottom: 1px solid #f0f3f8;
    color: var(--azul-profundo);
}
.sala-comp-tabla tbody tr:hover { background: #f8fafd; }
.sala-comp-tabla--compacta { min-width: 380px; }
.sala-comp-num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.sala-comp-pos { color: var(--verde); }
.sala-comp-neg { color: #c8102e; }

.sala-comp-grid { margin-bottom: 18px; }
.admin-card--plano {
    box-shadow: none;
    border: 1px solid var(--gris-borde);
    margin-bottom: 16px;
}
.admin-card__subtitulo {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 800;
    color: var(--azul-profundo);
}

.sala-comp-mini {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 4px;
}
.sala-comp-mini__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radio-sm);
    background: #f7f9fc;
    border: 1px solid var(--gris-borde);
}
.sala-comp-mini__icono { font-size: 20px; line-height: 1; }
.sala-comp-mini__item div { display: flex; flex-direction: column; min-width: 0; }
.sala-comp-mini__item strong {
    font-size: 17px;
    font-weight: 800;
    color: var(--azul-profundo);
    line-height: 1.1;
}
.sala-comp-mini__item span {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--gris-texto);
}
.sala-comp-mini__item small { font-size: 10.5px; color: #9aa5b5; }

@media (max-width: 640px) {
    .sala-comp-fichas { grid-template-columns: 1fr; }
    .sala-comp-ficha { padding: 12px 13px; }
    .sala-comp-tabla { font-size: 12px; }
    .sala-comp-mini { grid-template-columns: 1fr 1fr; }
    .sala-comp-mini__item { padding: 10px 11px; }
    .sala-comp-mini__item strong { font-size: 15px; }
}

/* ============================================================
   ESTADÍSTICA PRECISA DE REFERIDOS (listado masivo)
   ============================================================ */
.sala-ref-head__acciones {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.sala-ref-totales {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}
.sala-ref-total {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 14px 15px;
    border: 1px solid var(--gris-borde);
    border-top: 3px solid var(--azul-rey);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(16, 42, 67, 0.06);
    min-width: 0;
}
.sala-ref-total--principal {
    border-top-color: var(--azul-profundo);
    background: linear-gradient(160deg, #f4f8fd 0%, #ffffff 70%);
}
.sala-ref-total--ok { border-top-color: var(--verde); }
.sala-ref-total--neutro { border-top-color: #8fa3b8; }
.sala-ref-total--meta { border-top-color: #d99a00; }
.sala-ref-total__icono {
    font-size: 18px;
    line-height: 1;
    margin-bottom: 2px;
}
.sala-ref-total__valor {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.1;
    color: var(--azul-profundo);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.5px;
    overflow-wrap: anywhere;
}
.sala-ref-total--ok .sala-ref-total__valor { color: var(--verde); }
.sala-ref-total--meta .sala-ref-total__valor { color: #b07d00; }
.sala-ref-total__titulo {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--gris-texto);
}
.sala-ref-total__pie {
    font-size: 11px;
    color: #9aa5b5;
    line-height: 1.35;
}

.sala-ref-filtros {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.sala-ref-filtros .admin-campo { margin: 0; min-width: 150px; }
.sala-ref-filtros .admin-campo--buscar { flex: 1 1 240px; min-width: 200px; }
.sala-ref-filtros .admin-campo label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--gris-texto);
    margin-bottom: 4px;
    display: block;
}
.sala-ref-filtros .admin-campo input,
.sala-ref-filtros .admin-campo select {
    width: 100%;
    padding: 8px 10px;
    font-size: 13px;
    border: 1px solid var(--gris-borde);
    border-radius: 8px;
    background: #fff;
    color: var(--azul-profundo);
}
.sala-ref-filtros .admin-campo input:focus,
.sala-ref-filtros .admin-campo select:focus {
    outline: none;
    border-color: var(--azul-rey);
    box-shadow: 0 0 0 3px rgba(0, 136, 199, 0.12);
}
.sala-ref-filtros__acciones {
    display: flex;
    gap: 8px;
    align-items: center;
    padding-bottom: 1px;
}

.sala-ref-tabla-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--gris-borde);
    border-radius: 10px;
    background: #fff;
}
.sala-ref-tabla {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
    min-width: 980px;
}
.sala-ref-tabla thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    text-align: left;
    padding: 9px 10px;
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #5b6b7d;
    background: #f2f6fb;
    border-bottom: 1px solid var(--gris-borde);
    white-space: nowrap;
}
.sala-ref-tabla tbody td {
    padding: 8px 10px;
    border-bottom: 1px solid #eef2f7;
    vertical-align: top;
    color: #2c3e50;
}
.sala-ref-tabla tbody tr:last-child td { border-bottom: 0; }
.sala-ref-tabla tbody tr:hover { background: #f8fafd; }
.sala-ref-tabla__num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    white-space: nowrap;
}
.sala-ref-tabla__ced {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: var(--azul-profundo);
    white-space: nowrap;
}
.sala-ref-tabla__nombre {
    font-weight: 700;
    color: var(--azul-profundo);
    min-width: 170px;
}
.sala-ref-tabla__sub {
    display: block;
    font-size: 10.5px;
    font-weight: 500;
    color: #9aa5b5;
    margin-top: 1px;
}
.sala-ref-tabla__vacio {
    text-align: center;
    padding: 26px 12px;
    color: var(--gris-texto);
    font-size: 13px;
}
.sala-ref-trab {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    font-weight: 700;
    color: var(--azul-rey);
    cursor: pointer;
    text-align: left;
    text-decoration: underline dotted;
    text-underline-offset: 2px;
}
.sala-ref-trab:hover { color: var(--azul-profundo); }
.sala-ref-trab__ced {
    display: block;
    font-size: 10.5px;
    font-weight: 600;
    color: #9aa5b5;
    text-decoration: none;
    margin-top: 1px;
}

.sala-ref-lista-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
    font-size: 12px;
    color: var(--gris-texto);
}
.sala-ref-lista-info b { color: var(--azul-profundo); }

@media (max-width: 1100px) {
    .sala-ref-totales { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
    .sala-ref-totales { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sala-ref-total__valor { font-size: 22px; }
    .sala-ref-filtros .admin-campo { min-width: 0; flex: 1 1 140px; }
    .sala-ref-filtros .admin-campo--buscar { flex: 1 1 100%; }
    .sala-ref-filtros__acciones { flex: 1 1 100%; }
    .sala-ref-filtros__acciones .vot-btn { flex: 1 1 auto; }
}
@media (max-width: 480px) {
    .sala-ref-totales { grid-template-columns: 1fr 1fr; gap: 9px; }
    .sala-ref-total { padding: 11px 12px; }
    .sala-ref-total__valor { font-size: 20px; }
    .sala-ref-total__titulo { font-size: 10px; }
    .sala-ref-total__pie { font-size: 10px; }
    .sala-ref-tabla { font-size: 12px; }
}

/* Ficha del trabajador (dentro del modal) */
.sala-ficha { display: flex; flex-direction: column; gap: 16px; }
.sala-ficha__cab {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.sala-ficha__cab h3 {
    margin: 0;
    font-size: 17px;
    color: var(--azul-profundo);
}
.sala-ficha__sub {
    margin: 3px 0 0;
    font-size: 12.5px;
    color: var(--gris-texto);
    font-weight: 600;
}
.sala-ficha__datos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    padding: 12px;
    background: #f7f9fc;
    border: 1px solid var(--gris-borde);
    border-radius: var(--radio-sm);
}
.sala-ficha__datos > div { display: flex; flex-direction: column; min-width: 0; }
.sala-ficha__datos span {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-weight: 700;
    color: var(--gris-texto);
}
.sala-ficha__datos strong {
    font-size: 13px;
    color: var(--azul-profundo);
    word-break: break-word;
}
.sala-ficha__ancho { grid-column: 1 / -1; }
.sala-ficha__acciones { display: flex; gap: 8px; flex-wrap: wrap; }
.sala-ficha__titulo {
    margin: 4px 0 0;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--azul-rey);
    border-bottom: 2px solid var(--gris-borde);
    padding-bottom: 6px;
}

/* Formulario de referido */
.sala-form-ref {
    padding: 14px;
    border-radius: var(--radio-sm);
    background: rgba(30, 90, 168, 0.05);
    border: 1px dashed rgba(30, 90, 168, 0.35);
}
.sala-form-ref h4 {
    margin: 0 0 10px;
    font-size: 13px;
    color: var(--azul-rey);
}
.sala-form-ref h4 small { font-weight: 600; color: var(--gris-texto); }
.sala-form-ref__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 9px;
    margin-bottom: 11px;
}
.sala-form-ref__grid label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    color: var(--gris-texto);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.sala-form-edit .sala-form-ref__grid { margin-bottom: 12px; }

/* Alta manual de trabajadores en la nómina */
.sala-form-alta__ayuda {
    margin: 0 0 12px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--gris-texto);
}
.sala-form-alta__req {
    color: #dc2626;
    font-weight: 800;
}
.sala-form-alta__aviso {
    margin: 0 0 12px;
    padding: 9px 12px;
    border-radius: 8px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.45;
}
.sala-form-alta__aviso[hidden] { display: none; }
.sala-form-alta__acciones {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

/* Campos con etiqueta propia (misma estructura que el portal de referidos) */
.sala-campo {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    color: var(--gris-texto);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    min-width: 0;
}
.sala-campo > span:first-child { line-height: 1.25; }
.sala-campo--ancho { grid-column: 1 / -1; }
.sala-req { color: var(--rojo); font-weight: 900; }

/* Fecha de nacimiento: dia / mes / anio (mas claro para adultos mayores) */
.sala-fecha {
    display: grid;
    grid-template-columns: 0.85fr 1.5fr 1fr;
    gap: 6px;
}
.sala-fecha .vot-input {
    min-width: 0;
    padding-left: 8px;
    padding-right: 8px;
    text-align: center;
    text-align-last: center;
}
.sala-fecha #ref-fnac-mes { text-align: left; text-align-last: left; }

.sala-vacio {
    text-align: center;
    color: var(--gris-texto);
    font-size: 12.5px;
    padding: 14px;
}

.admin-nota--aviso {
    background: rgba(244, 180, 0, 0.12);
    border-left: 3px solid var(--amarillo);
    padding: 10px 12px;
    border-radius: var(--radio-sm);
    color: #7a5c00;
    font-weight: 600;
}

@media (max-width: 640px) {
    .sala-head__acciones { width: 100%; }
    .sala-filtros .vot-input { flex: 1 1 100%; }
    .sala-ficha__datos { grid-template-columns: 1fr 1fr; }
    .sala-form-ref__grid { grid-template-columns: 1fr; }
    .sala-fecha { grid-template-columns: 0.8fr 1.4fr 1fr; gap: 5px; }
    .sala-fecha .vot-input { font-size: 15px; padding-left: 4px; padding-right: 4px; }
}

/* ============================================================
   MONITOR ELECTORAL (Despacho del Alcalde)
   ============================================================ */

/* --- Login del monitor --- */
.monitor-login-body {
    background:
        radial-gradient(circle at 15% 12%, rgba(244, 180, 0, 0.16), transparent 42%),
        radial-gradient(circle at 85% 88%, rgba(200, 16, 46, 0.18), transparent 45%),
        linear-gradient(160deg, #0b1f3a 0%, #143a6b 55%, #0b1f3a 100%);
}
.monitor-login-wrap { max-width: 440px; }
.monitor-login-card { border-top: 0; }
.monitor-login-escudo {
    width: 104px;
    height: 104px;
    border: 4px solid var(--amarillo);
    box-shadow: 0 10px 26px rgba(11, 31, 58, 0.28);
}
.monitor-login-titulo {
    font-size: 24px;
    letter-spacing: 0.6px;
    color: var(--azul-profundo);
}
.monitor-login-btn {
    background: linear-gradient(135deg, var(--azul-claro), var(--azul-profundo));
    box-shadow: 0 8px 20px rgba(20, 58, 107, 0.32);
}
.monitor-login-btn:hover {
    background: linear-gradient(135deg, var(--azul-profundo), var(--azul-claro));
}

/* --- Layout general --- */
.monitor-body { background: #eef1f6; }
.monitor-header { background: linear-gradient(135deg, var(--azul-profundo), var(--azul-rey)); }
.monitor-contenido { max-width: 1180px; }

/* --- Hero del hub --- */
.monitor-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: linear-gradient(135deg, var(--azul-profundo) 0%, var(--azul-rey) 60%, var(--azul-claro) 100%);
    color: var(--blanco);
    border-radius: 18px;
    padding: 26px 28px;
    margin-bottom: 22px;
    box-shadow: 0 14px 34px rgba(11, 31, 58, 0.24);
    position: relative;
    overflow: hidden;
}
.monitor-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 88% 20%, rgba(244, 180, 0, 0.22), transparent 55%);
    pointer-events: none;
}
.monitor-hero__texto { position: relative; z-index: 1; min-width: 0; }
.monitor-hero__etiqueta {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--amarillo);
    margin-bottom: 8px;
}
.monitor-hero__titulo {
    font-size: 25px;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 8px;
}
.monitor-hero__desc {
    font-size: 13px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.82);
    margin: 0;
    max-width: 640px;
}
.monitor-hero__sello {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 3px solid rgba(244, 180, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}
.monitor-hero__sello img { width: 100%; height: 100%; object-fit: contain; }

/* --- Panel exclusivo del Alcalde (hub) --- */
.monitor-alcalde {
    background: var(--blanco);
    border-radius: 18px;
    padding: 24px;
    box-shadow: var(--sombra-suave);
    border-top: 5px solid var(--dorado, #d4a017);
    margin-bottom: 22px;
}
.monitor-alcalde__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
}
.monitor-alcalde__tarjeta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 20px 14px;
    border-radius: 14px;
    background: linear-gradient(160deg, rgba(20, 58, 107, 0.06), rgba(31, 122, 63, 0.06));
    border: 1px solid rgba(20, 58, 107, 0.10);
    text-align: center;
}
.monitor-alcalde__icono { font-size: 26px; line-height: 1; }
.monitor-alcalde__valor {
    font-size: 26px;
    font-weight: 800;
    color: var(--azul-rey);
    letter-spacing: -0.5px;
}
.monitor-alcalde__etiqueta {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--gris, #5b6b7c);
}
.monitor-alcalde__nota {
    margin: 18px 0 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(20, 58, 107, 0.05);
    border-left: 4px solid var(--azul-claro);
    font-size: 13px;
    line-height: 1.55;
    color: var(--gris, #5b6b7c);
}

/* --- Dashboard ejecutivo del Alcalde --- */
.monitor-alcalde__meta {
    margin: 20px 0 22px;
    padding: 16px 18px;
    border-radius: 14px;
    background: linear-gradient(160deg, rgba(20, 58, 107, 0.06), rgba(31, 122, 63, 0.06));
    border: 1px solid rgba(20, 58, 107, 0.10);
}
.monitor-alcalde__meta-cab {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.monitor-alcalde__meta-cab span {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gris, #5b6b7c);
}
.monitor-alcalde__meta-cab strong {
    font-size: 18px;
    font-weight: 800;
    color: var(--azul-profundo);
    font-variant-numeric: tabular-nums;
}
.monitor-alcalde__meta-pie {
    margin: 10px 0 0;
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--gris, #5b6b7c);
}
.monitor-alcalde__meta-pie strong { color: var(--azul-profundo); }

.monitor-alcalde__paneles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}
.monitor-alcalde__panel {
    background: var(--blanco);
    border-radius: 14px;
    padding: 16px 18px;
    border: 1px solid rgba(20, 58, 107, 0.10);
    box-shadow: 0 4px 14px rgba(11, 31, 58, 0.05);
    min-width: 0;
}
.monitor-alcalde__panel-titulo {
    margin: 0 0 14px;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--azul-profundo);
    padding-bottom: 9px;
    border-bottom: 1px solid var(--gris-borde, #e3e8ee);
}
.monitor-alcalde__lista {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.monitor-alcalde__item { min-width: 0; }
.monitor-alcalde__item-cab {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 5px;
}
.monitor-alcalde__item-nombre {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--azul-profundo);
    overflow-wrap: anywhere;
    min-width: 0;
}
.monitor-alcalde__item-valor {
    flex: 0 0 auto;
    font-size: 12.5px;
    font-weight: 800;
    color: var(--azul-rey);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.monitor-alcalde__item-sub {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: var(--gris-texto, #7b8794);
    font-variant-numeric: tabular-nums;
}
.monitor-alcalde__barra {
    height: 7px;
    border-radius: 999px;
    background: var(--gris-borde, #e3e8ee);
    overflow: hidden;
}
.monitor-alcalde__barra-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--azul-claro), var(--azul-rey));
    transition: width 0.5s ease;
}
.monitor-alcalde__barra-fill--verde {
    background: linear-gradient(90deg, var(--verde), #2fa35a);
}
.monitor-alcalde__barra-fill--dorado {
    background: linear-gradient(90deg, var(--dorado, #d4a017), #f0c14b);
}
.monitor-alcalde__tabla-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.monitor-alcalde__tabla {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.monitor-alcalde__tabla thead th {
    text-align: left;
    padding: 7px 9px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--gris-texto, #7b8794);
    border-bottom: 1px solid var(--gris-borde, #e3e8ee);
    white-space: nowrap;
}
.monitor-alcalde__tabla tbody td {
    padding: 8px 9px;
    border-bottom: 1px solid rgba(227, 232, 238, 0.7);
    color: var(--gris, #5b6b7c);
    vertical-align: top;
}
.monitor-alcalde__tabla tbody tr:last-child td { border-bottom: 0; }
.monitor-alcalde__tabla tbody td:first-child {
    font-weight: 700;
    color: var(--azul-profundo);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.monitor-alcalde__vacio {
    margin: 0;
    padding: 14px 4px;
    font-size: 12.5px;
    color: var(--gris-texto, #7b8794);
    text-align: center;
}

/* --- Secciones estadísticas del panel del Alcalde --- */
.monitor-alcalde__seccion {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 26px 0 14px;
    padding: 0 0 10px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.2px;
    color: var(--azul-profundo, #0d2b45);
    border-bottom: 2px solid rgba(13, 71, 161, 0.12);
}
.monitor-alcalde__seccion::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(13, 71, 161, 0.18), transparent);
}
.monitor-alcalde__grid--compacta {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}
.monitor-alcalde__grid--compacta .monitor-alcalde__tarjeta {
    padding: 14px 12px;
}
.monitor-alcalde__grid--compacta .monitor-alcalde__valor {
    font-size: 19px;
}
.monitor-alcalde__grid--compacta .monitor-alcalde__etiqueta {
    font-size: 10.5px;
    line-height: 1.3;
}
.monitor-alcalde__panel h4.monitor-alcalde__panel-titulo {
    font-size: 13px;
}
/* Barra de meta con relleno alto (Sala Situacional) */
.monitor-alcalde__barra--alta {
    height: 10px;
}
.monitor-alcalde__barra--alta .monitor-alcalde__barra-fill {
    background: linear-gradient(90deg, var(--verde, #1f9d55), var(--dorado, #d4a017));
}
/* Lista secundaria separada dentro de un mismo panel */
.monitor-alcalde__lista--separada {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed rgba(13, 71, 161, 0.16);
}

/* --- Tarjetas de evento --- */
.monitor-eventos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}
.monitor-evento {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--blanco);
    border-radius: 16px;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    border-top: 5px solid var(--azul-claro);
    box-shadow: var(--sombra-suave);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.monitor-evento:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 34px rgba(11, 31, 58, 0.16);
}
.monitor-evento--verde { border-top-color: var(--verde); }
.monitor-evento--azul  { border-top-color: var(--azul-claro); }
.monitor-evento--morado { border-top-color: #6d3fa8; }

.monitor-evento__cab {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.monitor-evento__icono {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: rgba(30, 90, 168, 0.10);
    font-size: 23px;
}
.monitor-evento--verde .monitor-evento__icono { background: rgba(31, 122, 63, 0.12); }
.monitor-evento--morado .monitor-evento__icono { background: rgba(109, 63, 168, 0.12); }
.monitor-evento__estado {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(30, 90, 168, 0.10);
    color: var(--azul-claro);
    white-space: nowrap;
}
.monitor-evento--verde .monitor-evento__estado {
    background: rgba(31, 122, 63, 0.12);
    color: var(--verde);
}
.monitor-evento--morado .monitor-evento__estado {
    background: rgba(109, 63, 168, 0.12);
    color: #6d3fa8;
}
.monitor-evento__titulo {
    font-size: 18px;
    font-weight: 800;
    color: var(--azul-profundo);
    margin: 0;
    line-height: 1.25;
}
.monitor-evento__lema {
    font-size: 12.5px;
    color: var(--gris-texto);
    margin: 0;
    line-height: 1.5;
}
.monitor-evento__metricas {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 4px;
}
.monitor-evento__metrica {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--gris-fondo);
    border-radius: 10px;
    padding: 9px 11px;
}
.monitor-evento__metrica-valor {
    font-size: 17px;
    font-weight: 800;
    color: var(--azul-profundo);
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
}
.monitor-evento__metrica-etiqueta {
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--gris-texto);
}
.monitor-evento__barra {
    height: 8px;
    border-radius: 999px;
    background: var(--gris-borde);
    overflow: hidden;
    margin-top: 2px;
}
.monitor-evento__fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--azul-claro), var(--azul-rey));
    transition: width 0.5s ease;
}
.monitor-evento--verde .monitor-evento__fill {
    background: linear-gradient(90deg, var(--verde), #2fa35a);
}
.monitor-evento--morado .monitor-evento__fill {
    background: linear-gradient(90deg, #6d3fa8, #8b5cc7);
}
.monitor-evento__cta {
    font-size: 12px;
    font-weight: 800;
    color: var(--azul-claro);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}
.monitor-evento--verde .monitor-evento__cta { color: var(--verde); }
.monitor-evento--morado .monitor-evento__cta { color: #6d3fa8; }

/* --- Tarjetas de evento del Alcalde (hub ejecutivo) --- */
.monitor-eventos--alcalde {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    margin-bottom: 18px;
}
.monitor-eventos--alcalde .monitor-evento {
    cursor: pointer;
}
.monitor-evento--activo {
    box-shadow: 0 18px 40px rgba(11, 31, 58, 0.20);
    transform: translateY(-2px);
}
.monitor-evento--activo.monitor-evento--azul {
    border-top-color: var(--azul-rey);
    background: linear-gradient(180deg, rgba(30, 90, 168, 0.05), var(--blanco) 55%);
}
.monitor-evento--activo.monitor-evento--verde {
    border-top-color: var(--verde);
    background: linear-gradient(180deg, rgba(31, 122, 63, 0.06), var(--blanco) 55%);
}
.monitor-evento--activo .monitor-evento__cta::after {
    content: " (abierto)";
    font-weight: 700;
    opacity: 0.75;
}

/* --- Acordeón de detalle estadístico del Alcalde --- */
.monitor-alcalde__detalle {
    background: var(--blanco);
    border-radius: 16px;
    box-shadow: var(--sombra-suave);
    margin-bottom: 18px;
    overflow: hidden;
    border-left: 5px solid var(--azul-claro);
}
.monitor-alcalde__detalle[data-alcalde-detalle="sala"] {
    border-left-color: var(--verde);
}
.monitor-alcalde__detalle-cab {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: background 0.2s ease;
}
.monitor-alcalde__detalle-cab::-webkit-details-marker { display: none; }
.monitor-alcalde__detalle-cab:hover {
    background: rgba(13, 71, 161, 0.04);
}
.monitor-alcalde__detalle-icono {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(30, 90, 168, 0.10);
    font-size: 20px;
}
.monitor-alcalde__detalle[data-alcalde-detalle="sala"] .monitor-alcalde__detalle-icono {
    background: rgba(31, 122, 63, 0.12);
}
.monitor-alcalde__detalle-texto {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}
.monitor-alcalde__detalle-texto strong {
    font-size: 15px;
    font-weight: 800;
    color: var(--azul-profundo);
    line-height: 1.25;
}
.monitor-alcalde__detalle-texto small {
    font-size: 11.5px;
    color: var(--gris-texto);
    line-height: 1.4;
}
.monitor-alcalde__detalle-flecha {
    font-size: 15px;
    color: var(--azul-claro);
    transition: transform 0.25s ease;
    flex-shrink: 0;
}
.monitor-alcalde__detalle[open] .monitor-alcalde__detalle-flecha {
    transform: rotate(180deg);
}
.monitor-alcalde__detalle-cuerpo {
    padding: 4px 20px 20px;
    border-top: 1px solid rgba(13, 71, 161, 0.10);
    animation: detalleEntrada 0.28s ease;
}
.monitor-alcalde__detalle-cuerpo > .monitor-alcalde:first-child {
    margin-top: 16px;
}
@keyframes detalleEntrada {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
@media (max-width: 640px) {
    .monitor-alcalde__detalle-cab { padding: 14px 15px; }
    .monitor-alcalde__detalle-cuerpo { padding: 4px 15px 16px; }
    .monitor-alcalde__detalle-texto small { display: none; }
}

/* --- Migas y cabecera de evento --- */
.monitor-migas {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--gris-texto);
    margin-bottom: 14px;
}
.monitor-migas a { color: var(--azul-claro); text-decoration: none; font-weight: 700; }
.monitor-migas a:hover { text-decoration: underline; }
.monitor-migas strong { color: var(--azul-profundo); }

.monitor-evento-head {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--blanco);
    border-radius: 16px;
    padding: 18px 20px;
    margin-bottom: 18px;
    border-left: 5px solid var(--azul-claro);
    box-shadow: var(--sombra-suave);
}
.monitor-evento-head--verde { border-left-color: var(--verde); }
.monitor-evento-head__icono {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(30, 90, 168, 0.10);
    font-size: 26px;
}
.monitor-evento-head--verde .monitor-evento-head__icono { background: rgba(31, 122, 63, 0.12); }
.monitor-evento-head__texto { flex: 1 1 auto; min-width: 0; }
.monitor-evento-head__texto h2 {
    font-size: 20px;
    font-weight: 800;
    color: var(--azul-profundo);
    margin: 0 0 3px;
}
.monitor-evento-head__texto p {
    font-size: 12.5px;
    color: var(--gris-texto);
    margin: 0;
}
.monitor-evento-head__acciones {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
}
.monitor-evento-head__fecha {
    flex: 0 0 auto;
    font-size: 11px;
    font-weight: 700;
    color: var(--gris-texto);
    background: var(--gris-fondo);
    padding: 6px 11px;
    border-radius: 999px;
    white-space: nowrap;
}

/* --- KPIs y meta del monitor --- */
.monitor-kpis { margin-bottom: 18px; }
.monitor-meta { margin-bottom: 18px; }

/* --- Grilla de gráficos --- */
.monitor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}
.monitor-card { padding: 18px; }
.monitor-card .chart-barras { margin-top: 4px; }
.monitor-ranking { margin-bottom: 18px; }

/* ============================================================
   Votos por tipo de empleado (Sala Situacional)
   ============================================================ */
.tipo-empleado { margin-bottom: 18px; }

.tipo-empleado__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.tipo-empleado__head .admin-card__titulo { margin: 0 0 2px; }
.tipo-empleado__head .admin-form__ayuda { margin: 0; }

.tipo-empleado__badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
    color: var(--azul-claro);
    background: rgba(30, 90, 168, .10);
    border: 1px solid rgba(30, 90, 168, .22);
    white-space: nowrap;
}

.tipo-empleado__resumen {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}
.tipo-empleado__stat {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--gris-fondo);
    border: 1px solid var(--gris-borde);
    border-left: 4px solid var(--gris-borde);
    transition: transform .18s ease, box-shadow .18s ease;
}
.tipo-empleado__stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(11, 31, 58, .10);
}
.tipo-empleado__stat-ico { font-size: 15px; line-height: 1; opacity: .85; }
.tipo-empleado__stat-valor {
    font-size: 21px;
    font-weight: 800;
    line-height: 1.15;
    color: var(--azul-profundo);
    font-variant-numeric: tabular-nums;
}
.tipo-empleado__stat-titulo {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: var(--gris-texto);
}
.tipo-empleado__stat--azul   { border-left-color: var(--azul-claro); }
.tipo-empleado__stat--verde  { border-left-color: var(--verde); }
.tipo-empleado__stat--rojo   { border-left-color: var(--rojo); }
.tipo-empleado__stat--dorado { border-left-color: var(--dorado); }
.tipo-empleado__stat--verde  .tipo-empleado__stat-valor { color: var(--verde); }
.tipo-empleado__stat--rojo   .tipo-empleado__stat-valor { color: var(--rojo); }
.tipo-empleado__stat--dorado .tipo-empleado__stat-valor { color: var(--dorado); }

.tipo-empleado__lista {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.tipo-empleado__fila {
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--blanco);
    border: 1px solid var(--gris-borde);
    transition: border-color .18s ease, background .18s ease;
}
.tipo-empleado__fila--activa {
    background: linear-gradient(90deg, rgba(31, 122, 63, .06), rgba(31, 122, 63, 0) 65%);
    border-color: rgba(31, 122, 63, .30);
}
.tipo-empleado__fila-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}
.tipo-empleado__nombre {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--azul-profundo);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tipo-empleado__pct {
    font-size: 12.5px;
    font-weight: 800;
    color: var(--azul-claro);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}
.tipo-empleado__fila--activa .tipo-empleado__pct { color: var(--verde); }

.tipo-empleado__barra {
    display: block;
    height: 8px;
    border-radius: 999px;
    background: var(--gris-borde);
    overflow: hidden;
}
.tipo-empleado__fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--azul-claro), var(--azul-rey));
    transition: width .5s ease;
}
.tipo-empleado__fila--activa .tipo-empleado__fill {
    background: linear-gradient(90deg, var(--verde), #2ea35a);
}

.tipo-empleado__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin-top: 6px;
    font-size: 11px;
    color: var(--gris-texto);
    font-variant-numeric: tabular-nums;
}
.tipo-empleado__meta b { color: var(--azul-profundo); font-weight: 800; }
.tipo-empleado__faltan { margin-left: auto; color: var(--rojo); font-weight: 600; }

@media (max-width: 720px) {
    .tipo-empleado__resumen { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tipo-empleado__stat-valor { font-size: 18px; }
    .tipo-empleado__faltan { margin-left: 0; }
}

/* ============================================================
   REPORTE DE DIRECTORES (Sala Situacional)
   ============================================================ */
.dir-reporte__resumen-ref { margin-top: 10px; }

.dir-reporte__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.dir-reporte__col {
    min-width: 0;
    background: var(--gris-fondo);
    border: 1px solid var(--gris-borde);
    border-radius: 12px;
    padding: 14px;
}

.dir-reporte__subtitulo {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--gris-borde);
}

.dir-reporte__subtitulo--ok { color: var(--verde); border-bottom-color: rgba(31, 122, 63, .35); }
.dir-reporte__subtitulo--no { color: var(--rojo); border-bottom-color: rgba(200, 16, 46, .35); }

.dir-reporte__lista {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 620px;
    overflow-y: auto;
    padding-right: 4px;
}

.dir-reporte__item {
    background: var(--blanco);
    border: 1px solid var(--gris-borde);
    border-left: 4px solid var(--gris-borde);
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow .18s ease, border-color .18s ease;
}

.dir-reporte__item:hover { box-shadow: 0 4px 14px rgba(11, 31, 58, .08); }
.dir-reporte__item--ok { border-left-color: var(--verde); }
.dir-reporte__item--no { border-left-color: var(--rojo); }
.dir-reporte__item[open] { box-shadow: 0 6px 18px rgba(11, 31, 58, .10); }

.dir-reporte__cabecera {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.dir-reporte__cabecera::-webkit-details-marker { display: none; }
.dir-reporte__cabecera::after {
    content: '▾';
    margin-left: 4px;
    font-size: 11px;
    color: var(--gris-texto);
    transition: transform .18s ease;
}
.dir-reporte__item[open] .dir-reporte__cabecera::after { transform: rotate(180deg); }

.dir-reporte__estado { font-size: 15px; line-height: 1; flex-shrink: 0; }

.dir-reporte__datos {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.dir-reporte__datos strong {
    font-size: 13px;
    font-weight: 700;
    color: var(--azul-profundo);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dir-reporte__datos small {
    font-size: 11px;
    color: var(--gris-texto);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dir-reporte__refs {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
    line-height: 1.15;
}

.dir-reporte__refs b {
    font-size: 13px;
    font-weight: 800;
    color: var(--azul-rey);
    font-variant-numeric: tabular-nums;
}

.dir-reporte__refs small {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--gris-texto);
}

.dir-reporte__refs-lista {
    list-style: none;
    margin: 0;
    padding: 4px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-top: 1px dashed var(--gris-borde);
}

.dir-reporte__ref {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    padding: 5px 8px;
    border-radius: 7px;
    background: var(--gris-fondo);
}

.dir-reporte__ref--ok { background: rgba(31, 122, 63, .08); }
.dir-reporte__ref--no { background: rgba(200, 16, 46, .07); }

.dir-reporte__ref-nombre {
    flex: 1;
    min-width: 0;
    font-weight: 600;
    color: var(--azul-profundo);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dir-reporte__ref small {
    font-size: 10px;
    color: var(--gris-texto);
    white-space: nowrap;
}

.dir-reporte__vacio {
    margin: 0;
    padding: 8px 12px 12px;
    font-size: 11px;
    font-style: italic;
    color: var(--gris-texto);
    border-top: 1px dashed var(--gris-borde);
}

.dir-reporte__wa { margin: 0 12px 10px; }

/* Acciones del reporte de directores (badge + botón PDF) */
.dir-reporte__acciones {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.dir-reporte__pdf {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--rojo), var(--rojo-oscuro));
    color: var(--blanco);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2px;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(200, 16, 46, 0.28);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.dir-reporte__pdf:hover,
.dir-reporte__pdf:focus-visible {
    transform: translateY(-1px);
    filter: brightness(1.06);
    box-shadow: 0 4px 12px rgba(200, 16, 46, 0.36);
    color: var(--blanco);
}

.dir-reporte__pdf:active { transform: translateY(0); }

.dir-reporte__pdf span[aria-hidden="true"] { font-size: 13px; line-height: 1; }

/* Tabla nominal del reporte de directores */
.dir-reporte__tabla-wrap {
    max-height: 620px;
    overflow: auto;
    border: 1px solid var(--gris-borde);
    border-radius: 10px;
    background: var(--blanco);
}

.dir-reporte__tabla {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.dir-reporte__tabla thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 9px 10px;
    text-align: left;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--gris-texto);
    background: var(--gris-fondo);
    border-bottom: 1px solid var(--gris-borde);
    white-space: nowrap;
}

.dir-reporte__tabla tbody td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(221, 227, 236, .7);
    vertical-align: middle;
}

.dir-reporte__tabla tbody tr:last-child td { border-bottom: 0; }
.dir-reporte__tabla tbody tr:hover { background: rgba(30, 90, 168, .04); }

.dir-reporte__nombre {
    font-weight: 600;
    color: var(--azul-profundo);
    line-height: 1.3;
}

.dir-reporte__cedula {
    color: var(--gris-texto);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.dir-reporte__num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.dir-reporte__num--ok { color: var(--verde); font-weight: 700; }
.dir-reporte__num--no { color: var(--rojo); font-weight: 700; }

.dir-reporte__wa-mini {
    display: inline-block;
    margin-left: 6px;
    font-size: 12px;
    text-decoration: none;
    vertical-align: middle;
}

@media (max-width: 900px) {
    .dir-reporte__grid { grid-template-columns: minmax(0, 1fr); }
    .dir-reporte__lista { max-height: 460px; }
    .dir-reporte__tabla-wrap { max-height: 460px; }
    .dir-reporte__tabla { font-size: 11.5px; }
    .dir-reporte__tabla thead th,
    .dir-reporte__tabla tbody td { padding: 7px 8px; }
}

.monitor-pie {
    text-align: center;
    font-size: 11.5px;
    color: var(--gris-texto);
    margin: 18px 0 0;
}

/* --- Responsive --- */
@media (max-width: 720px) {
    .monitor-hero { flex-direction: column; align-items: flex-start; padding: 22px; }
    .monitor-hero__sello { display: none; }
    .monitor-hero__titulo { font-size: 21px; }
    .monitor-eventos { grid-template-columns: 1fr; }
    .monitor-alcalde { padding: 18px; }
    .monitor-alcalde__grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .monitor-alcalde__valor { font-size: 22px; }
    .monitor-grid { grid-template-columns: 1fr; }
    .monitor-evento-head { flex-wrap: wrap; }
    .monitor-evento-head__acciones {
        order: 3;
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }
    .monitor-evento-head__fecha { order: 3; }
}
@media (max-width: 480px) {
    .monitor-evento__metricas { grid-template-columns: 1fr 1fr; }
    .monitor-hero { padding: 18px; }
    .monitor-hero__titulo { font-size: 19px; }
}

/* --- Enlace al Monitor Electoral desde el login principal --- */
.login-monitor {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 14px auto 0;
    padding: 9px 16px;
    border-radius: 999px;
    border: 1px solid rgba(30, 90, 168, 0.28);
    background: rgba(30, 90, 168, 0.07);
    color: var(--azul-rey);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.2px;
    text-decoration: none;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.login-monitor:hover {
    background: rgba(30, 90, 168, 0.13);
    border-color: rgba(30, 90, 168, 0.45);
    transform: translateY(-1px);
}
.login-monitor span { font-size: 14px; line-height: 1; }

/* ============================================================
   AUDITORÍA E INTEGRIDAD DE DATOS (panel admin)
   ============================================================ */
.aud-hallazgos {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 20px;
}
.aud-limpio {
    padding: 22px;
    border-radius: 14px;
    background: rgba(22, 163, 74, 0.08);
    border: 1px solid rgba(22, 163, 74, 0.28);
    color: #15803d;
    font-weight: 600;
    text-align: center;
}
.aud-hallazgo {
    border-radius: 14px;
    border: 1px solid rgba(11, 31, 58, 0.10);
    border-left: 5px solid var(--azul-claro);
    background: #fff;
    padding: 16px 18px;
    box-shadow: 0 2px 10px rgba(11, 31, 58, 0.05);
}
.aud-hallazgo--rojo     { border-left-color: #dc2626; }
.aud-hallazgo--amarillo { border-left-color: #f59e0b; }
.aud-hallazgo--azul     { border-left-color: var(--azul-claro); }

.aud-hallazgo__head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.aud-hallazgo__titulo {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--azul-profundo);
    flex: 1 1 auto;
}
.aud-hallazgo__cuenta {
    font-size: 13px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(11, 31, 58, 0.07);
    color: var(--azul-profundo);
}
.aud-badge {
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 999px;
    color: #fff;
}
.aud-badge--rojo     { background: #dc2626; }
.aud-badge--amarillo { background: #f59e0b; }
.aud-badge--azul     { background: var(--azul-claro); }

.aud-hallazgo__detalle {
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.55;
    color: #475569;
}
.aud-lista {
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 6px 16px;
    max-height: 260px;
    overflow-y: auto;
}
.aud-lista li {
    font-size: 12.5px;
    color: #334155;
    padding: 4px 0;
    border-bottom: 1px dashed rgba(11, 31, 58, 0.08);
}
.aud-lista li strong { color: var(--azul-profundo); }
.aud-extra { color: #64748b; }
.aud-mas { font-style: italic; color: #64748b; }

/* ---------- Enlace personal de referidos (ficha del trabajador) ---------- */
.sala-enlace {
    margin: 16px 0 4px;
    padding: 14px 16px;
    border-radius: 14px;
    background: linear-gradient(135deg, #eff6ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
}
.sala-enlace__cab {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 10px;
}
.sala-enlace__cab strong {
    font-size: 13.5px;
    color: #0b1f3a;
}
.sala-enlace__cab small {
    font-size: 11.5px;
    color: #0369a1;
    line-height: 1.4;
}
.sala-enlace__fila {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.sala-enlace__input {
    flex: 1 1 240px;
    min-width: 0;
    font-size: 12px !important;
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace !important;
    background: #fff !important;
    color: #0f172a !important;
}
.sala-enlace__nota {
    margin: 8px 0 0;
    font-size: 11.5px;
    line-height: 1.45;
    color: #0369a1;
}
.sala-enlace__nota:empty {
    display: none;
}
.sala-enlace__fila .vot-btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

/* ============================================================
   PORTAL DE REFERIDOS DEL TRABAJADOR
   Página pública /consulta_popular/referidos/?t=<token>
   Diseño mobile-first: pensado para pantallas de 360-430 px.
   ============================================================ */
.ref-body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #eef4fb 0%, #e2e8f0 100%);
    font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    color: #0f172a;
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;
}

/* ---------- Cabecera ---------- */
.ref-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    padding-top: calc(10px + env(safe-area-inset-top, 0px));
    background: linear-gradient(135deg, #0b1f3a 0%, #143a63 100%);
    color: #fff;
    box-shadow: 0 3px 14px rgba(11, 31, 58, 0.24);
}
.ref-header__marca {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.ref-header__marca img {
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px;
    flex-shrink: 0;
    width: 36px;
    height: 34px;
}
.ref-header__marca strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.2px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ref-header__marca small {
    display: block;
    font-size: 10.5px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ref-header__salir {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease;
}
.ref-header__salir:active { background: rgba(255, 255, 255, 0.3); }

/* ---------- Contenedor ---------- */
.ref-main {
    flex: 1;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 14px 12px 32px;
    padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-sizing: border-box;
}

/* ---------- Alertas ---------- */
.ref-alerta {
    padding: 13px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    border: 1px solid transparent;
    animation: refAlertaIn 0.25s ease;
}
.ref-alerta--error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}
.ref-alerta--ok {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}
@keyframes refAlertaIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Tarjetas ---------- */
.ref-card {
    background: #fff;
    border-radius: 18px;
    padding: 16px;
    border: 1px solid rgba(11, 31, 58, 0.07);
    box-shadow: 0 4px 16px rgba(11, 31, 58, 0.06);
}
.ref-card h1 {
    margin: 0 0 8px;
    font-size: 19px;
    font-weight: 700;
    color: #0b1f3a;
    line-height: 1.3;
}

/* ---------- Tarjeta de entrada (búsqueda / PIN) ---------- */
.ref-card--hero {
    text-align: center;
    padding: 26px 18px 22px;
    background: radial-gradient(120% 90% at 50% 0%, #e0f2fe 0%, #ffffff 62%);
    border-color: #dbeafe;
}
.ref-hero__icono {
    width: 58px;
    height: 58px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 27px;
    line-height: 1;
    border-radius: 50%;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    box-shadow: 0 8px 20px rgba(2, 132, 199, 0.28);
}
.ref-hero__titulo {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 700;
    color: #0b1f3a;
    line-height: 1.25;
    word-break: break-word;
}
.ref-hero__texto {
    margin: 0 auto 18px;
    max-width: 320px;
    font-size: 13.5px;
    line-height: 1.55;
    color: #475569;
}
.ref-hero__texto strong { color: #0b1f3a; }

.ref-titulo {
    margin: 0 0 14px;
    font-size: 15.5px;
    font-weight: 700;
    color: #0b1f3a;
    display: flex;
    align-items: center;
    gap: 7px;
}

/* ---------- Formulario de entrada ---------- */
.ref-form-pin {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
}
.ref-label {
    font-size: 12.5px;
    font-weight: 600;
    color: #334155;
    text-align: left;
    padding-left: 2px;
}
.ref-pin {
    width: 100%;
    box-sizing: border-box;
    min-height: 62px;
    padding: 12px;
    font-family: inherit;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 12px;
    text-align: center;
    text-indent: 12px;
    color: #0b1f3a;
    background: #f8fafc;
    border: 2px solid #cbd5e1;
    border-radius: 16px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.ref-pin:focus {
    background: #fff;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.16);
}

/* ---------- Buscador por cédula ---------- */
.ref-cedula {
    width: 100%;
    box-sizing: border-box;
    min-height: 58px;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 2px;
    text-align: center;
    color: #0b1f3a;
    background: #f8fafc;
    border: 2px solid #cbd5e1;
    border-radius: 16px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.ref-cedula::placeholder {
    font-weight: 400;
    letter-spacing: 1px;
    color: #94a3b8;
}
.ref-cedula:focus {
    background: #fff;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.16);
}
.ref-ayuda {
    margin: -2px 0 4px;
    font-size: 11.5px;
    line-height: 1.4;
    text-align: center;
    color: #64748b;
}

/* ---------- Bloques plegables (enlace personal / más datos) ---------- */
.ref-plegable,
.ref-mas {
    padding: 0;
    overflow: hidden;
}
.ref-plegable__cab,
.ref-mas__cab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    cursor: pointer;
    list-style: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.ref-plegable__cab::-webkit-details-marker,
.ref-mas__cab::-webkit-details-marker { display: none; }
.ref-plegable__cab:active,
.ref-mas__cab:active { background: #f8fafc; }
.ref-plegable__ico {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    border-radius: 10px;
    background: #e0f2fe;
}
.ref-plegable__txt {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.ref-plegable__txt strong {
    font-size: 13.5px;
    color: #0b1f3a;
}
.ref-plegable__txt small {
    font-size: 11.5px;
    line-height: 1.35;
    color: #64748b;
}
.ref-plegable__flecha,
.ref-mas__flecha {
    flex-shrink: 0;
    font-size: 13px;
    color: #94a3b8;
    transition: transform 0.2s ease;
}
.ref-plegable[open] .ref-plegable__flecha,
.ref-mas[open] .ref-mas__flecha { transform: rotate(180deg); }
.ref-plegable__cuerpo { padding: 0 16px 16px; }
.ref-mas__cab {
    margin-top: 14px;
    padding: 11px 14px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}
.ref-mas__cab small {
    font-weight: 400;
    color: #94a3b8;
}
.ref-mas__cuerpo { margin-top: 12px; }

/* ---------- Enlace personal ---------- */
.ref-enlace__fila {
    display: flex;
    align-items: stretch;
    gap: 8px;
}
.ref-enlace__input {
    flex: 1 1 auto;
    min-width: 0;
    box-sizing: border-box;
    min-height: 44px;
    padding: 10px 12px;
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    font-size: 11.5px;
    color: #0f172a;
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 11px;
    outline: none;
}
.ref-enlace__input:focus {
    background: #fff;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.14);
}
.ref-nota {
    margin: 16px auto 0;
    max-width: 330px;
    font-size: 11.5px;
    line-height: 1.5;
    color: #64748b;
}

/* ---------- Botones ---------- */
.ref-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 22px;
    border: none;
    border-radius: 14px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.ref-btn:active { transform: scale(0.975); }
.ref-btn--primario {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: #fff;
    box-shadow: 0 6px 18px rgba(2, 132, 199, 0.28);
}
.ref-btn--primario:hover {
    box-shadow: 0 9px 24px rgba(2, 132, 199, 0.36);
}
.ref-btn--bloque {
    width: 100%;
    margin-top: 14px;
}
.ref-btn--peligro {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}
.ref-btn--peligro:hover {
    background: #fee2e2;
    border-color: #fca5a5;
}
.ref-btn--sm {
    min-height: 38px;
    padding: 0 14px;
    font-size: 12.5px;
    border-radius: 10px;
}

/* ---------- Perfil ---------- */
.ref-card--perfil { padding: 16px 16px 14px; }
.ref-perfil {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e2e8f0;
}
.ref-perfil__avatar {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    background: linear-gradient(135deg, #0ea5e9 0%, #0b1f3a 100%);
    box-shadow: 0 4px 14px rgba(11, 31, 58, 0.22);
}
.ref-perfil__datos { min-width: 0; }
.ref-perfil__datos h1 {
    margin: 0 0 2px;
    font-size: 16px;
    font-weight: 700;
    color: #0b1f3a;
    line-height: 1.25;
    word-break: break-word;
}
.ref-perfil__datos p {
    margin: 0;
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
    word-break: break-word;
}

/* ---------- Progreso ---------- */
.ref-meta { margin-top: 14px; }
.ref-meta__cab {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    font-size: 12.5px;
    color: #475569;
    margin-bottom: 7px;
}
.ref-meta__cab strong {
    font-size: 15px;
    color: #0b1f3a;
}
.ref-meta__barra {
    height: 9px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}
.ref-meta__fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #10b981 0%, #0ea5e9 100%);
    transition: width 0.5s ease;
}
.ref-meta__pie {
    margin: 8px 0 0;
    font-size: 12px;
    color: #64748b;
}
.ref-meta__pie strong { color: #0b1f3a; }

/* ---------- Formulario de referido ---------- */
.ref-form { margin: 0; }
.ref-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.ref-campo {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}
.ref-campo--ancho { grid-column: 1 / -1; }
.ref-campo label {
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    padding-left: 2px;
}
.ref-req { color: #dc2626; }
.ref-campo input,
.ref-campo select {
    width: 100%;
    box-sizing: border-box;
    min-height: 48px;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 16px;
    color: #0f172a;
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.ref-campo select {
    padding-right: 34px;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M1.4 0 6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    background-size: 11px 7px;
}
.ref-campo input:focus,
.ref-campo select:focus {
    background-color: #fff;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.14);
}
.ref-campo input::placeholder { color: #94a3b8; }

/* ---------- Selector de fecha amigable (día / mes / año) ----------
   Sustituye al input nativo type="date", que confunde a las personas
   adultas mayores por su formato mm/dd/yyyy y el calendario emergente.
   Tres listas grandes y legibles se entienden sin explicación. */
.ref-fecha {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 8px;
}
.ref-fecha__bloque {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.ref-fecha__etq {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    padding-left: 2px;
}
.ref-campo .ref-fecha__sel {
    width: 100%;
    box-sizing: border-box;
    min-height: 52px;
    padding: 10px 30px 10px 12px;
    font-family: inherit;
    font-size: 17px;
    font-weight: 600;
    color: #0f172a;
    text-align: center;
    text-align-last: center;
    background-color: #f8fafc;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M1.4 0 6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 11px 7px;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.ref-campo .ref-fecha__sel:focus {
    background-color: #fff;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.14);
}
.ref-campo--error .ref-fecha__sel {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.14) !important;
}
.ref-ayuda--error {
    color: #b91c1c !important;
    font-weight: 600;
}

/* ---------- Lista de referidos ---------- */
.ref-vacio {
    margin: 0;
    padding: 20px 14px;
    text-align: center;
    font-size: 13px;
    line-height: 1.5;
    color: #94a3b8;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
}
.ref-lista {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ref-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.ref-item:active {
    background: #fff;
    border-color: #bae6fd;
}
.ref-item__datos {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ref-item__datos strong {
    font-size: 13.5px;
    font-weight: 700;
    color: #0b1f3a;
    word-break: break-word;
}
.ref-item__datos span {
    font-size: 11.5px;
    color: #64748b;
    word-break: break-word;
}
.ref-item form { flex-shrink: 0; margin: 0; }

/* ---------- Campo con error ---------- */
.ref-campo--error input,
.ref-campo--error select {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.14) !important;
}
.ref-campo--error label { color: #b91c1c; }

/* ---------- Modal de confirmación ---------- */
.ref-modal {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    background: rgba(11, 31, 58, 0.55);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}
.ref-modal--abierto {
    opacity: 1;
    visibility: visible;
}
.ref-modal__caja {
    width: 100%;
    max-width: 360px;
    padding: 22px 18px 18px;
    text-align: center;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 22px 60px rgba(11, 31, 58, 0.32);
    transform: translateY(14px) scale(0.97);
    transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.ref-modal--abierto .ref-modal__caja {
    transform: translateY(0) scale(1);
}
.ref-modal__icono {
    width: 54px;
    height: 54px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    line-height: 1;
    background: #e0f2fe;
    border-radius: 50%;
}
.ref-modal__icono--peligro { background: #fee2e2; }
.ref-modal__titulo {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 700;
    color: #0b1f3a;
    line-height: 1.3;
}
.ref-modal__texto {
    margin: 0 0 18px;
    font-size: 13.5px;
    line-height: 1.55;
    color: #475569;
    white-space: pre-line;
    word-break: break-word;
}
.ref-modal__acciones {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ref-modal__acciones .ref-btn { width: 100%; }
.ref-modal-bloqueo { overflow: hidden; }

/* ---------- Pie ---------- */
.ref-footer {
    padding: 18px 14px calc(22px + env(safe-area-inset-bottom, 0px));
    text-align: center;
    font-size: 11.5px;
    color: #64748b;
    line-height: 1.6;
}
.ref-footer p { margin: 0; }
.ref-footer__lema {
    margin-top: 4px !important;
    font-weight: 600;
    color: #0b1f3a;
    opacity: 0.75;
}

/* ---------- Responsive ---------- */
@media (max-width: 560px) {
    .ref-main { padding: 12px 10px calc(26px + env(safe-area-inset-bottom, 0px)); }
    .ref-card { padding: 14px 13px; border-radius: 14px; }
    .ref-card--hero { padding: 22px 15px 18px; }
    .ref-hero__icono { width: 52px; height: 52px; font-size: 24px; }
    .ref-hero__titulo { font-size: 18.5px; }
    .ref-grid { grid-template-columns: minmax(0, 1fr); }
    .ref-fecha { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr) minmax(0, 1fr); gap: 6px; }
    .ref-campo .ref-fecha__sel { font-size: 16px; padding-left: 8px; padding-right: 24px; min-height: 50px; }
    .ref-pin { font-size: 25px; letter-spacing: 9px; text-indent: 9px; }
    .ref-header { padding: 9px 12px; padding-top: calc(9px + env(safe-area-inset-top, 0px)); }
    .ref-header__marca strong { font-size: 14px; }
    .ref-item { flex-direction: row; align-items: center; }
    .ref-item form { align-self: center; }
    .ref-btn--bloque { margin-top: 12px; }
}

@media (max-width: 360px) {
    .ref-hero__titulo { font-size: 17px; }
    .ref-cedula { font-size: 20px; letter-spacing: 1.5px; }
    .ref-pin { font-size: 22px; letter-spacing: 7px; text-indent: 7px; }
    .ref-header__marca small { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .ref-btn,
    .ref-item,
    .ref-plegable__flecha,
    .ref-mas__flecha {
        transition: none !important;
    }
    .ref-btn:active { transform: none; }
}

/* ============================================================
   Campana de notificaciones del administrador
   ============================================================ */
.notif {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.notif__btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: inherit;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
}

.notif__btn:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.38);
}

.notif__btn:active { transform: scale(0.95); }

.notif__btn--activo {
    border-color: #f5c542;
    box-shadow: 0 0 0 2px rgba(245, 197, 66, 0.28);
}

.notif__icono { font-size: 17px; line-height: 1; }

.notif__badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #e53935;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.notif__panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 1200;
    width: 340px;
    max-width: calc(100vw - 24px);
    max-height: 420px;
    display: flex;
    flex-direction: column;
    background: #fff;
    color: #1f2937;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 18px 45px -12px rgba(15, 23, 42, 0.35);
    overflow: hidden;
}

.notif__panel[hidden] { display: none; }

.notif__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 14px;
    border-bottom: 1px solid #eef1f5;
    background: #f8fafc;
    font-size: 13.5px;
}

.notif__marcar {
    border: 0;
    background: transparent;
    color: #0d6efd;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
}

.notif__marcar:hover { background: rgba(13, 110, 253, 0.1); }

.notif__lista {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.notif__vacio {
    margin: 0;
    padding: 26px 16px;
    text-align: center;
    font-size: 13px;
    color: #6b7280;
}

.notif__item {
    display: flex;
    gap: 10px;
    padding: 11px 14px;
    border-bottom: 1px solid #f1f3f6;
    cursor: default;
}

.notif__item:last-child { border-bottom: 0; }

.notif__item--nueva {
    background: #eef6ff;
    cursor: pointer;
}

.notif__item--nueva:hover { background: #e2eefc; }

.notif__item-icono {
    flex: 0 0 auto;
    font-size: 17px;
    line-height: 1.2;
}

.notif__item-cuerpo { min-width: 0; flex: 1; }

.notif__item-titulo {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.notif__rol {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 1px 6px;
    border-radius: 999px;
    background: #e0e7ff;
    color: #3730a3;
}

.notif__item-detalle {
    margin-top: 2px;
    font-size: 12px;
    color: #4b5563;
    word-break: break-word;
}

.notif__item-fecha {
    margin-top: 3px;
    font-size: 11px;
    color: #9ca3af;
}

@media (max-width: 640px) {
    .notif__panel {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        max-height: 70vh;
        border-radius: 16px 16px 0 0;
    }
    .notif__btn { width: 34px; height: 34px; }
    .notif__icono { font-size: 15px; }
}

/* ------------------------------------------------------------
   MÓDULO DE DELEGADOS (control de votación sobre la nómina)
   ------------------------------------------------------------ */
.delegado-body {
    background: #f4f6fa;
}

.delegado-contenido {
    max-width: 900px;
    margin: 0 auto;
    padding-bottom: 40px;
}

.delegado-aviso {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    margin-bottom: 16px;
    border-radius: var(--radio);
    font-size: 13.5px;
    line-height: 1.5;
    background: #fff8e6;
    border: 1px solid rgba(214, 158, 46, 0.35);
    border-left: 5px solid #d69e2e;
    color: #7a5a10;
}
.delegado-aviso--error {
    background: #fff5f6;
    border-color: rgba(200, 16, 46, 0.28);
    border-left-color: var(--rojo);
    color: #8a1024;
}
.delegado-aviso code {
    background: rgba(0, 0, 0, 0.06);
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 12.5px;
}

/* Buscador */
.delegado-buscador {
    position: sticky;
    top: 0;
    z-index: 20;
    box-shadow: 0 6px 18px rgba(11, 31, 58, 0.08);
}

.delegado-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.delegado-buscador__campo {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 2px solid #d7dde8;
    border-radius: 14px;
    padding: 4px 10px 4px 12px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.delegado-buscador__campo:focus-within {
    border-color: #0f766e;
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}
.delegado-buscador__ico {
    font-size: 17px;
    line-height: 1;
    opacity: 0.65;
    flex-shrink: 0;
}
.delegado-buscador__campo input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 16px;
    font-weight: 600;
    color: var(--azul-profundo, #0b1f3a);
    padding: 11px 0;
    font-family: inherit;
}
.delegado-buscador__campo input::placeholder {
    font-weight: 500;
    color: #9aa5b5;
}
.delegado-buscador__campo input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}
.delegado-buscador__limpiar {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: #eef1f6;
    color: #5a6478;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    line-height: 1;
    transition: background 0.15s ease;
}
.delegado-buscador__limpiar:hover { background: #e0e5ee; }

.delegado-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.delegado-chip {
    border: 1.5px solid #d7dde8;
    background: #fff;
    color: #4b5563;
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.16s ease;
    white-space: nowrap;
}
.delegado-chip:hover { border-color: #b9c3d3; }
.delegado-chip.is-activo {
    background: #0f766e;
    border-color: #0f766e;
    color: #fff;
    box-shadow: 0 3px 10px rgba(15, 118, 110, 0.25);
}

.delegado-ayuda {
    margin: 10px 0 0;
    font-size: 12px;
    color: #7b8698;
}

/* Resultados */
.delegado-resultados__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}
.delegado-resultados__head .admin-card__titulo { margin: 0; }

.delegado-contador {
    font-size: 11.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #0f766e;
    background: rgba(15, 118, 110, 0.1);
    border-radius: 999px;
    padding: 4px 10px;
    white-space: nowrap;
}

.delegado-lista {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.delegado-vacio {
    margin: 0;
    padding: 26px 16px;
    text-align: center;
    font-size: 13.5px;
    color: #8b95a6;
    background: #f8fafc;
    border: 1px dashed #d7dde8;
    border-radius: 12px;
}
.delegado-vacio--cargando { animation: delegadoPulso 1.1s ease-in-out infinite; }
@keyframes delegadoPulso {
    0%, 100% { opacity: 0.55; }
    50%      { opacity: 1; }
}

.delegado-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 13px 14px;
    border-radius: 14px;
    background: #fff;
    border: 1.5px solid #e3e8f0;
    border-left: 5px solid #d69e2e;
    box-shadow: 0 2px 8px rgba(11, 31, 58, 0.05);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.delegado-item:hover { box-shadow: 0 5px 16px rgba(11, 31, 58, 0.1); }
.delegado-item.is-votado {
    border-left-color: #1f7a3f;
    background: linear-gradient(180deg, #f7fdf9, #ffffff);
}

.delegado-item__cab {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.delegado-item__ident {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}
.delegado-item__nombre {
    font-size: 15px;
    font-weight: 800;
    color: var(--azul-profundo, #0b1f3a);
    line-height: 1.25;
    word-break: break-word;
}
.delegado-item__cedula {
    font-size: 12px;
    font-weight: 700;
    color: #6b7688;
    letter-spacing: 0.3px;
}
.delegado-item__badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.delegado-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.delegado-badge--trab { background: rgba(20, 58, 107, 0.12); color: var(--azul-rey, #143a6b); }
.delegado-badge--ref  { background: rgba(214, 158, 46, 0.18); color: #8a6410; }
.delegado-badge--ok   { background: rgba(31, 122, 63, 0.14); color: var(--verde, #1f7a3f); }
.delegado-badge--pend { background: rgba(200, 16, 46, 0.1); color: var(--rojo, #c8102e); }

.delegado-item__detalle {
    margin: 0;
    font-size: 12.5px;
    color: #5f6b7d;
    line-height: 1.45;
    word-break: break-word;
}
.delegado-item__voto {
    margin: 0;
    font-size: 11.5px;
    color: #1f7a3f;
    background: rgba(31, 122, 63, 0.07);
    border-radius: 8px;
    padding: 5px 9px;
}

.delegado-item__acciones {
    display: flex;
    gap: 8px;
    margin-top: 2px;
}

.delegado-btn {
    flex: 1;
    border: 0;
    border-radius: 11px;
    padding: 11px 14px;
    font-size: 13.5px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.16s ease, opacity 0.16s ease;
    min-height: 44px;
}
.delegado-btn:active { transform: scale(0.98); }
.delegado-btn:disabled { opacity: 0.6; cursor: wait; }
.delegado-btn--marcar {
    background: linear-gradient(135deg, #1f7a3f, #166534);
    color: #fff;
    box-shadow: 0 4px 12px rgba(31, 122, 63, 0.28);
}
.delegado-btn--marcar:hover { box-shadow: 0 6px 18px rgba(31, 122, 63, 0.36); }
.delegado-btn--desmarcar {
    background: #fff;
    color: #8a1024;
    border: 1.5px solid rgba(200, 16, 46, 0.35);
}
.delegado-btn--desmarcar:hover { background: #fff5f6; }
.delegado-btn.is-cargando {
    position: relative;
    color: transparent;
}
.delegado-btn.is-cargando::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: delegadoGiro 0.7s linear infinite;
}
.delegado-btn--desmarcar.is-cargando::after {
    border-color: rgba(200, 16, 46, 0.3);
    border-top-color: var(--rojo, #c8102e);
}
@keyframes delegadoGiro {
    to { transform: rotate(360deg); }
}

/* Paginación */
.delegado-paginacion {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #e8ecf3;
}
.delegado-pag__btn {
    border: 1.5px solid #d7dde8;
    background: #fff;
    color: #33415c;
    border-radius: 10px;
    padding: 9px 14px;
    font-size: 12.5px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s ease;
}
.delegado-pag__btn:hover:not(:disabled) { border-color: #0f766e; color: #0f766e; }
.delegado-pag__btn:disabled { opacity: 0.45; cursor: not-allowed; }
.delegado-pag__info {
    font-size: 12px;
    font-weight: 700;
    color: #6b7688;
    white-space: nowrap;
}

/* Actividad reciente */
.delegado-actividad__acciones {
    display: flex;
    align-items: center;
    gap: 8px;
}

.delegado-descargar {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 13px;
    border-radius: 999px;
    background: linear-gradient(135deg, #0f766e, #0d9488);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.2px;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(15, 118, 110, 0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.delegado-descargar:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 118, 110, 0.32);
}
.delegado-descargar:active { transform: translateY(0); }

.delegado-refrescar {
    width: 32px;
    height: 32px;
    border: 1.5px solid #d7dde8;
    background: #fff;
    border-radius: 50%;
    color: #4b5563;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    line-height: 1;
    transition: all 0.15s ease;
}
.delegado-refrescar:hover { border-color: #0f766e; color: #0f766e; }
.delegado-refrescar.is-girando { animation: delegadoGiro 0.7s linear; }

.delegado-actividad__lista {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 380px;
    overflow-y: auto;
}

.delegado-act {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 9px 11px;
    border-radius: 11px;
    background: #f8fdf9;
    border: 1px solid rgba(31, 122, 63, 0.16);
}
.delegado-act.is-anulada {
    background: #fdf8f8;
    border-color: rgba(200, 16, 46, 0.16);
}
.delegado-act__ico {
    font-size: 15px;
    line-height: 1.3;
    flex-shrink: 0;
}
.delegado-act__cuerpo {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.delegado-act__cuerpo strong {
    font-size: 12.5px;
    font-weight: 700;
    color: #26313f;
    line-height: 1.35;
    word-break: break-word;
}
.delegado-act__cuerpo small {
    font-size: 11px;
    color: #7b8698;
}

/* Toasts */
.delegado-toasts {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: calc(100% - 32px);
    max-width: 420px;
    pointer-events: none;
}
.delegado-toast {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    color: #fff;
    background: #33415c;
    box-shadow: 0 8px 24px rgba(11, 31, 58, 0.28);
    animation: delegadoToastIn 0.24s ease;
    transition: opacity 0.24s ease, transform 0.24s ease;
}
.delegado-toast--ok    { background: linear-gradient(135deg, #1f7a3f, #166534); }
.delegado-toast--error { background: linear-gradient(135deg, #c8102e, #9b0c23); }
.delegado-toast--aviso { background: linear-gradient(135deg, #b7791f, #92610f); }
.delegado-toast.is-saliendo {
    opacity: 0;
    transform: translateY(8px);
}
@keyframes delegadoToastIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 640px) {
    .delegado-contenido { padding-left: 12px; padding-right: 12px; }
    .delegado-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .delegado-item__cab { flex-direction: column; align-items: stretch; }
    .delegado-item__badges { justify-content: flex-start; }
    .delegado-buscador__campo input { font-size: 16px; }
    .delegado-paginacion { flex-wrap: wrap; justify-content: center; }
    .delegado-pag__info { order: -1; width: 100%; text-align: center; }
}
