* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: #f5f5f5;
}

header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 1.5rem;
    font-weight: 500;
}

main {
    height: calc(100vh - 60px);
}

.container {
    display: flex;
    height: 100%;
}

.sidebar {
    width: 300px;
    background-color: white;
    padding: 1.5rem;
    overflow-y: auto;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
}

.filters {
    margin-bottom: 2rem;
}

.filters h3,
.stats h3 {
    font-size: 1rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3498db;
}

.filters label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

.filters select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.filters button {
    width: 100%;
    padding: 0.6rem 1rem;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.filters button:hover {
    background-color: #2980b9;
}

.stats {
    margin-bottom: 1rem;
}

#stats-container {
    font-size: 0.9rem;
    color: #666;
}

#stats-container p {
    margin-bottom: 0.5rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-total {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 2px solid #2c3e50;
    background-color: #f8f9fa;
}

.stat-label {
    color: #555;
}

.stat-value {
    font-weight: 600;
    color: #2c3e50;
}

.map-container {
    flex: 1;
    position: relative;
}

#map {
    width: 100%;
    height: 100%;
}

/* Estilos para popups del mapa */
.leaflet-popup-content {
    font-size: 0.9rem;
    line-height: 1.4;
}

.popup-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.popup-address {
    color: #666;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.popup-winner {
    background-color: #f8f9fa;
    padding: 0.5rem;
    border-radius: 4px;
    margin-top: 0.5rem;
}

.popup-winner strong {
    color: #27ae60;
}

.popup-locales {
    color: #888;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
}

.popup-detalle {
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

.popup-detalle ul {
    margin: 0.3rem 0 0 0;
    padding-left: 1.2rem;
}

.popup-detalle li {
    margin-bottom: 0.2rem;
    color: #555;
}

.popup-total {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #ddd;
    text-align: right;
}

.popup-votes {
    font-size: 0.85rem;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        max-height: 200px;
    }

    .map-container {
        height: calc(100vh - 260px);
    }
}
