@media (max-width: 700px) {
    .event-card-rect {
        flex-direction: column;
        align-items: center;
        padding: 16px 6px;
        gap: 16px;
        max-width: 98vw;
        margin: 0 auto 18px auto;
        box-shadow: 0 2px 12px rgba(10,36,99,0.10);
    }
    .event-card-rect .info {
        width: 100%;
        align-items: center;
        text-align: center;
        gap: 8px;
    }
    .event-card-rect .event-details-list {
        gap: 6px;
        font-size: 1em;
    }
    .event-card-rect .qr-code {
        min-width: 120px;
        padding: 10px 0;
        gap: 8px;
    }
    .event-card-rect .qr-code img {
        width: 90px;
        height: 90px;
    }
    .event-card-rect .event-actions {
        flex-direction: column;
        gap: 10px;
        align-items: center;
        margin-top: 10px;
    }
        .event-card-rect .btn-small {
            width: 80vw;
            max-width: 220px;
            justify-content: center;
            padding: 7px 0;
            font-size: 0.98em;
            border-radius: 8px;
        }
}
/* Tarjeta de evento moderna y atractiva */
.event-card-rect {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(10,36,99,0.10);
    padding: 32px 28px;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 32px;
    width: 100%;
    max-width: 900px;
    margin: 0 auto 32px auto;
}
.event-card-rect .info {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.event-card-rect .event-details-list {
    font-size: 1.08em;
    color: #1e293b;
    gap: 10px;
}
.event-card-rect .event-detail-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}
.event-card-rect .event-detail-row i {
    color: #FFD700;
    font-size: 1.2em;
}
.event-card-rect .qr-code {
    background: #f9fbff;
    border-radius: 12px;
    padding: 18px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    min-width: 180px;
}
.event-card-rect .qr-code img {
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(10,36,99,0.08);
    width: 120px;
    height: 120px;
}
.event-card-rect .event-actions {
    display: flex;
    flex-direction: row;
    gap: 16px;
    margin-top: 18px;
    justify-content: flex-start;
    flex-wrap: wrap;
}
.event-card-rect .btn-small {
    font-size: 1em;
    padding: 12px 28px;
    border-radius: 10px;
    font-weight: 600;
    transition: background 0.18s, color 0.18s, transform 0.18s;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.10);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}
.event-card-rect .btn-primary-small {
    background: #FFD700;
    color: #0A2463;
    border: none;
}
.event-card-rect .btn-primary-small:hover {
    background: #0A2463;
    color: #FFD700;
    transform: scale(1.04);
}
.event-card-rect .btn-secondary-small {
    background: #e5e7eb;
    color: #0A2463;
    border: none;
}
.event-card-rect .btn-secondary-small:hover {
    background: #FFD700;
    color: #0A2463;
    transform: scale(1.04);
}
.event-card-rect .btn-danger-small {
    background: #ef4444;
    color: #fff;
    border: none;
}
.event-card-rect .btn-danger-small:hover {
    background: #991b1b;
    color: #FFD700;
    transform: scale(1.04);
}
/* Tarjetas de eventos en lista vertical y rectangulares */
.events-list-vertical {
    display: flex;
    flex-direction: column;
    gap: 32px;
    width: 100%;
}
.event-card-vertical {
    width: 100%;
    display: flex;
    justify-content: center;
}
.event-card-rect {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 6px 32px rgba(10,36,99,0.10);
    border: 1.5px solid #e2e8f0;
    padding: 32px 28px 24px 28px;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 32px;
    width: 100%;
    max-width: 900px;
}
@media (max-width: 900px) {
    .event-card-rect {
        flex-direction: column;
        gap: 18px;
        padding: 18px 8px;
    }
}
.event-card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 6px 32px rgba(10,36,99,0.10);
    border: 1.5px solid #e2e8f0;
    margin-bottom: 24px;
    padding: 32px 28px 24px 28px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 1.08em;
    font-weight: 500;
    transition: box-shadow 0.2s, border-color 0.2s;
    align-items: flex-start;
}
.event-card .name {
    font-size: 1.3em;
    font-weight: 700;
    color: #0A2463;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.event-card .event-details-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}
.event-card .event-detail-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1em;
    color: #374151;
}
.event-card .event-detail-row i {
    color: #FFD700;
    font-size: 1.1em;
}
.event-card .event-status {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 8px;
    font-size: 0.98em;
    font-weight: 700;
    background: #e5e7eb;
    color: #0A2463;
    margin-bottom: 10px;
}
.event-card .event-status.bg-gray {
    background: #d1d5db;
    color: #6b7280;
}
.event-card .event-status.bg-orange {
    background: #FFD700;
    color: #0A2463;
}
.event-card .qr-code {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: #f9fbff;
    border-radius: 12px;
    padding: 18px 0;
    margin-bottom: 8px;
    width: 100%;
}
.event-card .qr-code img {
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(10,36,99,0.08);
    width: 110px;
    height: 110px;
}
.event-card .event-actions {
    display: flex;
    gap: 16px;
    justify-content: flex-start;
    align-items: center;
    margin-top: 10px;
    flex-wrap: wrap;
}
.event-card .event-actions .btn-small {
    font-size: 1em;
    padding: 10px 22px;
    border-radius: 10px;
    font-weight: 600;
    transition: background 0.18s, color 0.18s, transform 0.18s;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.10);
    display: flex;
    align-items: center;
    gap: 8px;
}
.event-card .event-actions .btn-primary-small {
    background: #FFD700;
    color: #0A2463;
    border: none;
}
.event-card .event-actions .btn-primary-small:hover {
    background: #0A2463;
    color: #FFD700;
    transform: scale(1.04);
}
.event-card .event-actions .btn-secondary-small {
    background: #e5e7eb;
    color: #0A2463;
    border: none;
}
.event-card .event-actions .btn-secondary-small:hover {
    background: #FFD700;
    color: #0A2463;
    transform: scale(1.04);
}
.event-card .event-actions .btn-danger-small {
    background: #ef4444;
    color: #fff;
    border: none;
}
.event-card .event-actions .btn-danger-small:hover {
    background: #991b1b;
    color: #FFD700;
    transform: scale(1.04);
}
.event-card .event-actions .btn-success-small {
    background: #10b981;
    color: #fff;
    border: none;
}
.event-card .event-actions .btn-success-small:hover {
    background: #065f46;
    color: #FFD700;
    transform: scale(1.04);
}
.event-card .event-actions .btn-small.disabled {
    background: #e5e7eb;
    color: #9ca3af;
    border: 1px solid #d1d5db;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}
@media (max-width: 900px) {
    .event-card {
        padding: 18px 4px;
    }
    .event-card .event-actions {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
}
/* --- ESTILO MEJORADO PARA TARJETAS DE EVENTOS --- */
.event-card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 6px 32px rgba(10,36,99,0.10);
    border: 1.5px solid #e2e8f0;
    margin-bottom: 24px;
    padding: 32px 28px 24px 28px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    font-size: 1.08em;
    font-weight: 500;
    transition: box-shadow 0.2s, border-color 0.2s;
    align-items: flex-start;
}
.event-card .name {
    font-size: 1.3em;
    font-weight: 700;
    color: #0A2463;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.event-card .event-detail {
    color: #374151;
    font-size: 1em;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.event-card .event-detail i {
    color: #FFD700;
    font-size: 1.1em;
}
.event-card .event-status {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 8px;
    font-size: 0.98em;
    font-weight: 700;
    background: #e5e7eb;
    color: #0A2463;
    margin-bottom: 10px;
}
.event-card .event-status.bg-gray {
    background: #d1d5db;
    color: #6b7280;
}
.event-card .event-status.bg-orange {
    background: #FFD700;
    color: #0A2463;
}
.event-card .qr-code {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: #f9fbff;
    border-radius: 12px;
    padding: 18px 0;
    margin-bottom: 8px;
    width: 100%;
}
.event-card .qr-code img {
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(10,36,99,0.08);
    width: 110px;
    height: 110px;
}
.event-card .event-actions {
    display: flex;
    gap: 16px;
    justify-content: flex-start;
    align-items: center;
    margin-top: 10px;
    flex-wrap: wrap;
}
.event-card .event-actions .btn-small {
    font-size: 1em;
    padding: 10px 22px;
    border-radius: 10px;
    font-weight: 600;
    transition: background 0.18s, color 0.18s, transform 0.18s;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.10);
    display: flex;
    align-items: center;
    gap: 8px;
}
.event-card .event-actions .btn-primary-small {
    background: #FFD700;
    color: #0A2463;
    border: none;
}
.event-card .event-actions .btn-primary-small:hover {
    background: #0A2463;
    color: #FFD700;
    transform: scale(1.04);
}
.event-card .event-actions .btn-secondary-small {
    background: #e5e7eb;
    color: #0A2463;
    border: none;
}
.event-card .event-actions .btn-secondary-small:hover {
    background: #FFD700;
    color: #0A2463;
    transform: scale(1.04);
}
.event-card .event-actions .btn-danger-small {
    background: #ef4444;
    color: #fff;
    border: none;
}
.event-card .event-actions .btn-danger-small:hover {
    background: #991b1b;
    color: #FFD700;
    transform: scale(1.04);
}
.event-card .event-actions .btn-success-small {
    background: #10b981;
    color: #fff;
    border: none;
}
.event-card .event-actions .btn-success-small:hover {
    background: #065f46;
    color: #FFD700;
    transform: scale(1.04);
}
.event-card .event-actions .btn-small.disabled {
    background: #e5e7eb;
    color: #9ca3af;
    border: 1px solid #d1d5db;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}
@media (max-width: 900px) {
    .event-card {
        padding: 18px 4px;
    }
    .event-card .event-actions {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
}
/* --- ESTILOS GENERALES Y FUENTE --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    margin: 0;
    background-color: #f0f2f5;
}

/* --- ESTILOS PÁGINA DE LOGIN --- */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}
.login-container {
    background-color: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: center;
    width: 100%;
    max-width: 380px;
    box-sizing: border-box;
    margin: 20px;
}
.logo-text {
    color: #0A2463;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
}
.input-field {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 16px;
}
.login-button {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    background-color: #FFD700;
    color: #0A2463;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}
.login-button:hover {
    background-color: #f0c400;
}

/* --- ESTILOS DASHBOARD LÍDER --- */
.main-header {
    background-color: #0A2463;
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-sizing: border-box;
}
.header-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}
.user-info span {
    margin-right: 15px;
}
.dashboard-container {
    padding: 80px 15px 100px 15px;
}

/* --- DASHBOARD GERENTE --- */
.gerente-dashboard {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.dashboard-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.section-header h2 {
    margin: 0;
    color: #0A2463;
    font-size: 20px;
    font-weight: 600;
}

.section-subtitle,
.card-subtitle {
    font-size: 13px;
    color: #737373;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
}

.metrics-grid--compact {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.dashboard-split {
    display: grid;
    grid-template-columns: minmax(320px, 2fr) 1fr;
    gap: 24px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 12px;
}

.card-header h3 {
    margin: 0;
    color: #0A2463;
    font-size: 18px;
    font-weight: 600;
}

.birthday-card-wrapper {
    padding: 24px;
}

.birthday-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quick-actions-card {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: hidden;
}

.quick-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.quick-stat-value {
    font-size: 36px;
    font-weight: 700;
    color: #0A2463;
    line-height: 1;
}

.quick-stat-label {
    font-size: 14px;
    color: #5f5f5f;
}

.quick-actions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.quick-actions-list .button-small,
.quick-actions-list .button-primary {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.coordinator-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.coordinator-card {
    display: grid;
    grid-template-columns: minmax(200px, 2fr) minmax(160px, 1fr) minmax(200px, 1.2fr);
    align-items: center;
    gap: 16px;
    padding: 20px;
    border-radius: 14px;
    border: 1px solid #edf0f6;
    box-shadow: 0 2px 8px rgba(10, 36, 99, 0.06);
}

.coordinator-card .info {
    min-width: 220px;
}

.coordinator-card .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
    padding: 0;
    margin: 0;
}

/* --- COORDINATORS FILTERS AND GROUPING --- */
.filters-card {
    padding: 20px;
    margin-bottom: 20px;
}

.filters-header h3 {
    margin: 0 0 16px 0;
    color: #0A2463;
    font-size: 16px;
    font-weight: 600;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-group label {
    font-size: 13px;
    font-weight: 600;
    color: #0A2463;
}

.filter-group select,
.filter-group input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: #FFD700;
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.2);
}

.coordinator-summary {
    padding: 12px 0;
    margin-bottom: 16px;
    border-bottom: 1px solid #eef1f7;
    font-size: 14px;
    color: #666;
}

.coordinator-card .location {
    font-size: 13px;
    color: #666;
    margin: 4px 0 0 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.coordinator-card .location i {
    color: #FFD700;
    font-size: 12px;
}

/* Grouped view styles */
.municipality-section {
    margin-bottom: 32px;
}

.municipality-header {
    background: linear-gradient(135deg, #0A2463 0%, #1e40af 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.municipality-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 14px;
    margin-left: auto;
}

@media (max-width: 1024px) {
    .dashboard-split {
        grid-template-columns: 1fr;
    }

    .coordinator-card {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .coordinator-card .actions {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 6px;
        padding: 0;
        margin: 0;
    }
    .coordinator-card .actions .icon-button {
        flex: 1 1 40px;
        min-width: 40px;
        max-width: 48px;
        padding: 8px;
        font-size: 18px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #f5f7fa;
        box-shadow: 0 1px 2px rgba(10,36,99,0.04);
    }
}

@media (max-width: 768px) {
    .section-header h2 {
        font-size: 18px;
    }

    .quick-stat-value {
        font-size: 30px;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .metrics-card {
        padding: 18px;
    }

    .quick-actions-list .button-small,
    .quick-actions-list .button-primary {
        font-size: 14px;
        padding: 12px 16px;
    }

    .voter-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .voter-card .actions {
        width: 100%;
        justify-content: flex-start;
        gap: 8px;
    }

    .voter-card .actions .icon-button {
        flex: 1 1 46%;
        min-width: 120px;
    }

    .coordinator-card {
        grid-template-columns: 1fr;
    }

    .coordinator-card .actions .icon-button {
        flex: 1 1 46%;
        min-width: 120px;
    }
}

@media (max-width: 600px) {
    .coordinator-card .actions {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 4px;
        padding: 0;
        margin: 0;
    }
    .coordinator-card .actions .icon-button {
        flex: 1 1 36px;
        min-width: 36px;
        max-width: 44px;
        padding: 6px;
        font-size: 16px;
        border-radius: 8px;
    }
    .metrics-grid,
    .metrics-grid.metrics-grid--compact {
        grid-template-columns: 1fr;
    }

    .quick-actions-card {
        padding: 20px;
    }

    .birthday-card-wrapper {
        padding: 20px;
    }

    .voter-card .actions .icon-button {
        flex: 1 1 100%;
        min-width: unset;
    }

    .coordinator-card .actions .icon-button {
        flex: 1 1 100%;
        min-width: unset;
    }

    .chart-card,
    .chart-container {
        padding: 16px;
    }

    .chart-card canvas,
    .chart-container canvas {
        max-height: 250px;
    }

    .filters-grid {
        grid-template-columns: 1fr;
    }

    .municipality-header {
        font-size: 14px;
        padding: 10px 12px;
    }
}

/* --- DISTRIBUCIÓN GENERAL DE FILAS Y CAMPOS --- */
.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.form-row > * {
    flex: 1 1 200px;
    min-width: 160px;
}

.form-row label {
    font-size: 13px;
    font-weight: 600;
    color: #0A2463;
    display: block;
    margin-bottom: 6px;
}

/* Global input styling */
input[type="text"],
input[type="number"],
input[type="tel"],
input[type="email"],
input[type="date"],
input[type="password"],
textarea {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 15px;
    background-color: white;
    transition: border-color 0.2s ease;
}

input[type="text"]:hover,
input[type="number"]:hover,
input[type="tel"]:hover,
input[type="email"]:hover,
input[type="date"]:hover,
input[type="password"]:hover,
textarea:hover {
    border-color: #0A2463;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="email"]:focus,
input[type="date"]:focus,
input[type="password"]:focus,
textarea:focus {
    outline: none;
    border-color: #FFD700;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
}

.metrics-card h3 {
    margin-top: 0;
    color: #0A2463;
}

.metrics-card p {
    margin: 0;
}
.metrics-card, .voter-card, .form-popup {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    box-sizing: border-box;
}
.metrics-card {
    padding: 20px;
    margin-bottom: 20px;
}
.metric-title {
    margin: 0 0 5px 0;
    color: #555;
    font-size: 14px;
}
.metric-number {
    margin: 0 0 15px 0;
    font-size: 36px;
    font-weight: bold;
    color: #0A2463;
}
progress {
    width: 100%;
    height: 10px;
    border-radius: 5px;
    border: none;
}
progress::-webkit-progress-bar {
    background-color: #e0e0e0;
    border-radius: 5px;
}
progress::-webkit-progress-value {
    background-color: #FFD700;
    border-radius: 5px;
    transition: width 0.5s ease-in-out;
}
.search-bar input {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    margin-bottom: 20px;
    font-size: 16px;
}
.voter-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 18px;
    margin-bottom: 14px;
}
.voter-card .name {
    font-weight: 600;
    color: #0A2463;
    margin: 0;
}
.voter-card .cedula {
    font-size: 14px;
    color: #555;
    margin: 4px 0 0 0;
}
.actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.actions form {
    margin: 0;
}
.actions .icon-button {
    background: #eef2ff;
    border: 1px solid transparent;
    font-size: 16px;
    color: #0A2463;
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.actions .icon-button:hover {
    background: #d7dfff;
    box-shadow: 0 4px 10px rgba(10, 36, 99, 0.15);
    transform: translateY(-1px);
}
.actions .icon-button.icon-danger {
    background: #ffe1e1;
    color: #8a2d1f;
}
.actions .icon-button.icon-danger:hover {
    background: #ffcccc;
}
.floating-action-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: #FFD700;
    color: #0A2463;
    border-radius: 50%;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: transform 0.2s;
    z-index: 1500;
    cursor: pointer;
}
.floating-action-button:hover {
    transform: scale(1.1);
}

/* --- ESTILOS FORMULARIO POPUP --- */
.form-popup-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 36, 99, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto; /* <-- ESTA ES LA PROPIEDAD CLAVE PARA EL SCROLL */
}
.hidden {
    display: none !important;
}
.form-popup {
    padding: 25px 30px;
    width: 100%;
    max-width: 700px;
}
.form-popup h2 {
    margin-top: 0;
    margin-bottom: 25px;
    color: #0A2463;
    text-align: center;
}
.form-popup .form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}
.form-popup .form-row > * {
    flex: 1;
    min-width: 200px;
}
.form-popup input, .form-popup textarea, .select-wrapper {
    width: 100%;
    margin-bottom: 15px;
}
.form-popup input, .form-popup textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 15px;
    background-color: white;
    transition: border-color 0.2s ease;
}
.form-popup input:focus, .form-popup textarea:focus {
    outline: none;
    border-color: #FFD700;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
}
.form-popup textarea {
    resize: vertical;
    min-height: 80px;
}
.form-popup .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 10px;
}
.form-popup button {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    font-size: 16px;
}
.button-primary {
    background-color: #FFD700;
    color: #0A2463;
}
.button-primary:hover {
    background-color: #f0c400;
}

.button-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-decoration: none;
    background-color: #0A2463;
    color: #FFFFFF;
    transition: background-color 0.2s ease, transform 0.2s ease;
    gap: 8px;
    box-sizing: border-box;
    min-height: 40px;
}

.button-small:hover {
    background-color: #132d7e;
    transform: translateY(-1px);
}

.button-small.button-secondary {
    background-color: #FFFFFF;
    color: #0A2463;
    border: 1px solid #0A2463;
}

.button-small.button-secondary:hover {
    background-color: #0A2463;
    color: #FFFFFF;
}

.row-warning {
    background-color: #fff7d6 !important;
}

.row-danger {
    background-color: #ffe1e1 !important;
}

.status-chip.danger {
    background-color: #ffe1e1;
    color: #8a2d1f;
}

.status-chip.info {
    background-color: #e7f0ff;
    color: #214a8d;
}

.callcenter-assignment-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.callcenter-assignment-bar strong {
    font-size: 15px;
    color: #0A2463;
}
/* --- ESTILO MEJORADO PARA BOTONES SECUNDARIOS --- */
.button-secondary {
    background-color: #FFFFFF; /* Fondo blanco */
    color: #0A2463; /* Texto azul oscuro */
    padding: 8px 20px; /* Ajustamos el padding para que coincida con el borde */
    border: 2px solid #0A2463; /* Borde azul oscuro */
    border-radius: 8px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease-in-out; /* Transición suave para todos los efectos */
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.button-secondary:hover {
    background-color: #0A2463; /* El fondo se vuelve azul al pasar el mouse */
    color: #FFFFFF; /* El texto se vuelve blanco */
    transform: translateY(-2px); /* Un ligero efecto de levantamiento */
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-small.disabled {
    background: #e5e7eb;
    color: #9ca3af;
    border: 1px solid #d1d5db;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}
#puesto_manual {
    width: 100%;
    box-sizing: border-box;
    margin-top: -15px; /* Ajuste para que se vea pegado al select */
    margin-bottom: 15px;
}

/* --- ESTILOS PARA DESPLEGABLES PERSONALIZADOS --- */
.select-wrapper {
    position: relative;
    width: 100%;
}
.select-wrapper select,
.form-popup select,
select {
    width: 100%;
    padding: 12px 40px 12px 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 15px;
    background-color: white;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: border-color 0.2s ease;
}
.select-wrapper select:hover,
.form-popup select:hover,
select:hover {
    border-color: #0A2463;
}
.select-wrapper select:focus,
.form-popup select:focus,
select:focus {
    outline: none;
    border-color: #FFD700;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
}
.form-popup select:required:invalid,
select:required:invalid {
  color: #757575;
}
.select-wrapper::after {
    content: '▼';
    font-size: 12px;
    color: #0A2463;
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    pointer-events: none;
}
/* --- ESTILOS FORMULARIO MULTI-PASO --- */
.form-step {
    transition: opacity 0.3s ease-in-out;
}
.form-step.hidden {
    display: none;
}
.form-actions button.hidden {
    display: none;
}
.error-message {
    color: #dc3545; /* Rojo */
    font-size: 14px;
    font-weight: bold;
    text-align: left;
    width: 100%;
    margin-top: -10px;
    margin-bottom: 10px;
    height: 15px; /* Altura fija para que no mueva el layout */
}
/* --- MEJORA DE ESTILOS PARA BOTONES GENERALES --- */

/* Estilo para el contenedor del botón y el título de la sección */
.actions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    margin-bottom: 20px;
    flex-wrap: wrap; /* Para que se vea bien en móviles */
    gap: 10px;
}

.actions-header h3 {
    color: #0A2463;
    margin: 0;
}

/* --- TABLAS Y LISTADOS --- */
.table-list {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table-list thead th {
    color: #0A2463;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-size: 13px;
    background-color: #f5f7ff;
    border-bottom: 2px solid #e3e8ff;
    padding: 12px;
}

.table-list tbody td {
    padding: 12px;
    border-bottom: 1px solid #eef1f7;
    color: #333;
    vertical-align: top;
}

.table-list tbody tr:hover {
    background-color: #f9fbff;
}

.table-list tbody tr:last-child td {
    border-bottom: none;
}

.table-list-wrapper {
    max-height: 420px;
    overflow-y: auto;
    overflow-x: auto;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.status-chip.ok {
    background-color: #d4f1e2;
    color: #126b39;
}

.status-chip.pending {
    background-color: #fff2cc;
    color: #8a6400;
}

.empty-state {
    text-align: center;
    color: #8a8a8a;
    padding: 20px 0;
    font-size: 14px;
}

.row-success {
    background-color: #edf8f2 !important;
}

/* --- TARJETAS Y ESTADÍSTICAS CALL CENTER --- */
.callcenter-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
    margin-top: 15px;
}


.stat-card {
    padding: 32px 28px 24px 28px;
    border-radius: 18px;
    background: #fff;
    color: #0A2463;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 32px rgba(10,36,99,0.10);
    border: 1.5px solid #e2e8f0;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    font-size: 1.12em;
    font-weight: 500;
    transition: box-shadow 0.2s, border-color 0.2s;
    align-items: flex-start;
}
}

.stat-card.light {
    background: #f9fbff;
    border: 1px solid #e3eafc;
    color: #0A2463;
}


.stat-card .stat-label {
    font-size: 1.18em;
    font-weight: 700;
    margin-bottom: 2px;
    color: #0A2463;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 1;
    text-transform: none;
}
}


.stat-card .stat-number {
    font-size: 3.2em;
    font-weight: 800;
    margin-bottom: 10px;
    color: #FFD700;
    text-shadow: 0 2px 12px rgba(245, 158, 11, 0.18);
    letter-spacing: 1px;
    font-family: 'Segoe UI', 'Arial', sans-serif;
}
}


.stat-card .stat-detail {
    font-size: 1.05em;
    color: #64748b;
    margin-top: 6px;
    font-weight: 400;
    letter-spacing: 0.2px;
}
}

.stat-card.light .stat-value {
    color: #0A2463;
}

.highlight-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: linear-gradient(120deg, #fff7d1 0%, #ffe27a 100%);
    border-radius: 14px;
    border: 1px solid #ffeaa3;
    margin-top: 20px;
}

.highlight-card strong {
    font-size: 20px;
    color: #0A2463;
}

.highlight-card span {
    font-size: 14px;
    color: #5d4d00;
}

/* --- CHARTS --- */
.chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.chart-card,
.chart-container {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e7ecf5;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(10, 36, 99, 0.04);
    overflow: hidden;
    box-sizing: border-box;
}

.chart-card canvas,
.chart-container canvas {
    max-height: 320px;
    max-width: 100%;
    width: 100% !important;
    height: auto !important;
}

.chart-card h4,
.chart-container h4 {
    margin: 0 0 12px 0;
    color: #0A2463;
    font-size: 16px;
    font-weight: 600;
}

/* Estilo base para botones primarios (amarillos) */
.button-primary {
    background-color: #FFD700; /* Amarillo Votación */
    color: #0A2463; /* Azul Oscuro */
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none; /* En caso de que se use en una etiqueta <a> */
    transition: background-color 0.2s, transform 0.2s;
    display: inline-flex; /* Para alinear el ícono y el texto */
    align-items: center;
    gap: 8px; /* Espacio entre el ícono '+' y el texto */
    box-sizing: border-box;
    min-height: 44px;
}

.button-primary:hover {
    background-color: #f0c400; /* Un amarillo un poco más oscuro */
    transform: translateY(-2px); /* Un ligero efecto de levantamiento */
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
/* --- ESTILOS PARA TARJETA DE COORDINADOR --- */
.card-stats {
    display: flex;
    gap: 18px; /* Espacio entre los items de estadística */
    flex-wrap: wrap;
}
.stat-item {
    color: #555;
    font-size: 14px;
}
.stat-item strong {
    color: #0A2463;
    font-size: 18px;
    display: block; /* Para que el número quede arriba y el texto abajo */
    text-align: center;
}
/* --- OPTIMIZACIÓN PARA MÓVILES (DISEÑO RESPONSIVO) --- */

/* Estas reglas se aplicarán ÚNICAMENTE si la pantalla del dispositivo
   tiene un ancho de 768px o menos (el tamaño de una tablet o celular). */

@media (max-width: 768px) {

    /* Hacemos que los campos del formulario se pongan uno debajo del otro, en lugar de al lado */
    .form-popup .form-row {
        flex-direction: column; /* Cambia la dirección de horizontal a vertical */
        gap: 0; /* Quitamos el espacio lateral, ya que no es necesario */
    }

    /* Reducimos un poco el padding en los lados para dar más espacio */
    .dashboard-container {
        padding-left: 10px;
        padding-right: 10px;
    }

    .form-popup {
        padding: 20px 15px;
    }
    
    .form-popup h2 {
        font-size: 22px; /* Un título un poco más pequeño para móviles */
    }

    /* Ajustamos el contenedor de las estadísticas del coordinador */
    .dashboard-container .form-row {
        flex-direction: column;
    }

    /* Hacemos que la tarjeta de estadísticas ocupe todo el ancho */
    .metrics-card {
        width: 100%;
        box-sizing: border-box; /* Importante para que el padding no afecte el ancho */
    }

    /* --- Estilos para la tarjeta de coordinador en móvil (Diseño Pulido) --- */
    .voter-card {
        flex-direction: column;
        align-items: stretch; /* Estirar elementos al ancho completo */
        gap: 15px;
    }

    .voter-card .info,
    .voter-card .card-stats {
        text-align: center;
    }

    .voter-card .card-stats {
        display: flex;
        justify-content: center; /* Centrar las estadísticas */
        gap: 30px; /* Aumentar el espacio entre las estadísticas */
    }

    .voter-card .actions {
        width: 100%;
        display: flex;
        justify-content: center; /* Centrar los botones de acción */
        gap: 20px; /* Espacio consistente entre botones */
        padding-top: 15px;
        border-top: 1px solid #f0f2f5; /* Separador visual */
    }

    .actions .icon-button {
        margin-left: 0; /* Resetear el margen que tenían en desktop */
    }
}
.icon-button.icon-danger:hover {
    color: #dc3545; /* Rojo de peligro */
}
.actions-header {
    display: flex;
    justify-content: space-between; /* Distribuye el espacio entre el título y los botones */
    align-items: center; /* Alinea verticalmente el título y los botones */
    margin-bottom: 20px;
}

.actions-header h3 {
    margin: 0; /* Elimina el margen predeterminado del h3 */
}

.actions-header > div { /* Selecciona el div que contiene los botones */
    display: flex;
    gap: 10px;
    align-items: center;
}
/* --- ESTILOS PARA EL NUEVO MENÚ LATERAL (SIDEBAR) --- */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 240px;
    height: 100%;
    background: linear-gradient(135deg, #0A2463 0%, #13337f 100%);
    color: #fff;
    padding-top: 28px;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 18px rgba(10,36,99,0.10);
    z-index: 1000;
}

.sidebar-header {
    padding: 0 20px 20px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 10px;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 1.6em;
    font-weight: 700;
    letter-spacing: 1px;
    color: #FFD700;
    text-shadow: 0 2px 8px rgba(245, 158, 11, 0.12);
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 18px 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #fff !important;
    text-decoration: none !important;
    padding: 13px 22px;
    font-size: 1.08em;
    font-weight: 500;
    border-radius: 12px;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    box-shadow: 0 2px 8px rgba(10,36,99,0.04);
}

.sidebar-nav a:hover {
    background: linear-gradient(90deg, #FFD700 0%, #fbbf24 100%);
    color: #0A2463 !important;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.10);
    text-decoration: none !important;
}

.sidebar-nav a.active {
    background: linear-gradient(90deg, #FFD700 0%, #fbbf24 100%);
    color: #0A2463 !important;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.14);
    border: 1.5px solid #FFD700;
    text-decoration: none !important;
}

.sidebar-nav i {
    width: 22px;
    text-align: center;
    font-size: 1.2em;
    color: #FFD700 !important;
    transition: color 0.18s;
}

.sidebar-footer {
    padding: 18px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.98em;
    opacity: 0.85;
}

.sidebar-footer .user-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 15px;
}
.sidebar-footer .user-info span{
    font-weight: bold;
}
.sidebar-footer .logout-button {
    color: white;
    text-decoration: none;
    font-size: 14px;
    opacity: 0.8;
}
.sidebar-footer .logout-button:hover {
    opacity: 1;
}

/* Ajuste para el contenido principal */
/* Movemos el contenido principal hacia la derecha para que no quede debajo del menú */
.main-content-wrapper {
    margin-left: 240px; /* Mismo ancho que el sidebar */
}


/* --- ESTILOS PARA NUEVO MENÚ DESPLEGABLE (PWA STYLE) --- */

/* Encabezado superior fijo */
.top-header {
    background-color: #0A2463;
    color: white;
    padding: 0 20px;
    height: 60px;
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1010; /* Por encima del contenido, pero debajo del menú */
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.menu-toggle-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0 15px 0 0;
}

.header-page-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

/* Menú lateral (Sidebar) - Ahora empieza oculto */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100%;
    background-color: #0A2463;
    color: white;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 10px rgba(0,0,0,0.2);
    transform: translateX(-100%); /* <-- Empieza oculto a la izquierda */
    transition: transform 0.3s ease-in-out; /* <-- La animación de deslizamiento */
    z-index: 1020; /* Por encima de todo */
}

.sidebar.open {
    transform: translateX(0); /* <-- La clase 'open' lo hace visible */
}

/* El contenido principal ahora tiene un padding-top para no quedar debajo del nuevo header */
.main-content-wrapper {
    padding-top: 60px; /* Altura del top-header */
    margin-left: 0; /* Ya no necesita margen izquierdo */
}


/* --- ESTILO PARA CONTENEDOR DE GRÁFICO --- */
.chart-container {
    position: relative;
    height: 400px; /* Le damos una altura fija de 400 píxeles */
    width: 100%;   /* Ocupará todo el ancho de su tarjeta contenedora */
}
/* --- AJUSTES DE DISEÑO PARA FORMULARIO DE FECHA Y GÉNERO --- */

/* Estilo para las etiquetas (labels) que están encima de los campos */
.form-popup .form-row label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 500;
    color: #333; /* Un color un poco más oscuro para la etiqueta */
    text-align: left;
}

/* Le damos al placeholder del campo de fecha el mismo color que el texto normal cuando está vacío */
.form-popup input[type="date"] {
    color: #757575;
}

/* Cuando el usuario selecciona una fecha, el color del texto cambia a negro */
.form-popup input[type="date"]:valid {
    color: #000000;
}

/* --- ESTILOS ESPECÍFICOS PARA LA PÁGINA registro_evento.php --- */
.container-form {
    max-width: 780px;
    margin: 60px auto;
    padding: 20px;
    box-sizing: border-box;
}
.form-card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(10,36,99,0.08);
    padding: 28px;
}
.form-card h1 {
    margin: 0 0 6px 0;
    color: #0A2463;
    font-size: 22px;
}
.form-card h2 {
    margin: 0 0 12px 0;