* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #eef1f5;
    color: #16327a;
}

.header {
    background: #ffffff;
    border-bottom: 4px solid #16327a;
    padding: 18px 24px;
}

.header h1 {
    margin: 0;
    font-size: 20px;
    color: #16327a;
}

.header p {
    margin: 4px 0 0;
    color: #666;
    font-size: 13px;
}

.contenedor {
    max-width: 960px;
    margin: 24px auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 24px;
}

.banner-info {
    background: #f4f6fa;
    border: 1px solid #dbe2ee;
    border-radius: 6px;
    padding: 14px 18px;
    margin-bottom: 20px;
    font-size: 14px;
}

.banner-info strong { color: #16327a; }

/* ---------- FORMULARIO DE VOTO ---------- */
.campo {
    margin-bottom: 18px;
}

.campo label {
    display: block;
    font-weight: bold;
    margin-bottom: 6px;
    font-size: 14px;
}

.campo input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    font-size: 16px;
    border: 1px solid #c3cbdb;
    border-radius: 6px;
}

.candidatos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.candidato-card {
    border: 2px solid #dbe2ee;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
    position: relative;
}

.candidato-card:hover { border-color: #9db0d6; }

.candidato-card input[type="radio"] {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 20px;
    height: 20px;
}

.candidato-card.seleccionado {
    border-color: #16327a;
    box-shadow: 0 0 0 3px rgba(22,50,122,0.15);
}

.candidato-card img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
    border: 3px solid #eef1f5;
}

.candidato-card h3 {
    margin: 6px 0 2px;
    font-size: 16px;
    color: #16327a;
}

.candidato-card p {
    margin: 0;
    font-size: 13px;
    color: #666;
}

.check-declaracion {
    background: #fff8e6;
    border: 1px solid #f0d98c;
    border-radius: 6px;
    padding: 14px 16px;
    margin-bottom: 20px;
    font-size: 14px;
}

.check-declaracion label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
    cursor: pointer;
}

.btn {
    display: inline-block;
    background: #16327a;
    color: #fff;
    border: none;
    padding: 12px 28px;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
}

.btn:hover { background: #0f234f; }

.btn-secundario {
    background: #6c7a94;
}

.mensaje-error {
    background: #fdeaea;
    border: 1px solid #f5b5b5;
    color: #9c1f1f;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 18px;
    font-size: 14px;
}

.mensaje-ok {
    background: #e8f6ec;
    border: 1px solid #a8dab8;
    color: #1e6b34;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 18px;
    font-size: 14px;
}

/* ---------- CONTADOR / COUNTDOWN ---------- */
.countdown {
    display: flex;
    gap: 14px;
    justify-content: center;
    margin: 10px 0 20px;
}

.countdown div {
    background: #16327a;
    color: #fff;
    border-radius: 8px;
    padding: 14px 16px;
    min-width: 70px;
    text-align: center;
}

.countdown span {
    display: block;
    font-size: 26px;
    font-weight: bold;
}

.countdown small {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* ---------- RESULTADOS (estilo dona ONPE) ---------- */
.total-actas {
    text-align: center;
    margin-bottom: 24px;
    font-size: 14px;
    color: #555;
}

.total-actas strong {
    display: block;
    font-size: 28px;
    color: #16327a;
}

.resultados-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.resultado-card {
    text-align: center;
}

.dona {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.dona-interior {
    width: 108px;
    height: 108px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.dona-interior img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.porcentaje-grande {
    font-size: 30px;
    font-weight: bold;
    color: #16327a;
    margin: 8px 0 2px;
}

.resultado-card h3 {
    margin: 4px 0;
    font-size: 16px;
    color: #16327a;
}

.resultado-card .partido {
    font-size: 13px;
    color: #666;
}

.resultado-card .votos-num {
    font-weight: bold;
    color: #16327a;
    margin-top: 4px;
}

.footer-nota {
    text-align: center;
    font-size: 12px;
    color: #999;
    margin-top: 26px;
}

table.tabla-admin {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-top: 16px;
}

table.tabla-admin th, table.tabla-admin td {
    border: 1px solid #dbe2ee;
    padding: 8px 10px;
    text-align: left;
}

table.tabla-admin th {
    background: #16327a;
    color: #fff;
}

table.tabla-admin tr:nth-child(even) {
    background: #f4f6fa;
}

.top-bar-admin {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.resumen-admin {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.resumen-caja {
    background: #f4f6fa;
    border: 1px solid #dbe2ee;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.resumen-caja strong {
    display: block;
    font-size: 24px;
    color: #16327a;
}

.login-box {
    max-width: 360px;
    margin: 80px auto;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.login-box h2 {
    color: #16327a;
    margin-top: 0;
}

.login-box input[type="text"], .login-box input[type="password"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 14px;
    border: 1px solid #c3cbdb;
    border-radius: 6px;
    font-size: 15px;
}
