body { font-family: 'Roboto', sans-serif; background-color: #f4f6f9; overflow-x: hidden; }
.bg-vino { background-color: #a60a2b !important; }
.text-vino { color: #a60a2b !important; }
.btn-vino { background-color: #a60a2b; color: white; }
.btn-vino:hover { background-color: #73061d; color: white; }

.wrapper { display: flex; width: 100%; height: 100vh; overflow: hidden; }
.main-content { flex-grow: 1; padding: 1.5rem 2rem; overflow-y: auto; background-color: #f8f9fa; transition: all 0.3s ease; width: 100%; }

.sidebar { width: 260px; min-width: 260px; background: #ffffff; border-right: 1px solid #e0e0e0; display: flex; flex-direction: column; box-shadow: 2px 0 5px rgba(0,0,0,0.02); z-index: 1000; transition: all 0.3s ease; }
.sidebar.collapsed { width: 70px; min-width: 70px; }
.sidebar.collapsed .sidebar-logo img { display: none; }
.sidebar.collapsed .nav-link span { display: none; }
.sidebar.collapsed .nav-link i { margin-right: 0; font-size: 1.3rem; margin: 0 auto; }

.sidebar-logo { padding: 1.5rem; border-bottom: 1px solid #f0f0f0; text-align: center; height: 75px; display: flex; align-items: center; justify-content: center; }
.sidebar-logo img { max-width: 180px; height: auto; }
.sidebar-nav { padding: 1rem 0; }
.sidebar-nav .nav-link { color: #495057; padding: 0.8rem 1.5rem; font-weight: 500; display: flex; align-items: center; border-left: 4px solid transparent; transition: all 0.2s; white-space: nowrap; }
.sidebar-nav .nav-link i { width: 24px; font-size: 1.1rem; margin-right: 10px; color: #6c757d; }
.sidebar-nav .nav-link:hover { background-color: #f8f9fa; color: #a60a2b; }
.sidebar-nav .nav-link.active { background-color: #a60a2b; color: #ffffff; border-left: 4px solid #73061d; }
.sidebar-nav .nav-link.active i { color: #ffffff; }

@media (max-width: 768px) {
    .sidebar { margin-left: -260px; position: absolute; height: 100vh; }
    .sidebar.mobile-open { margin-left: 0; }
}

.card { border: none; border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.04); margin-bottom: 1rem; }
.kpi-card { padding: 1.25rem; display: flex; align-items: center; justify-content: space-between; height: 100%; border-radius: 12px; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.kpi-card.kpi-active { background-color: #d84465; color: white; }
.kpi-title { font-size: 0.85rem; font-weight: 500; color: #6c757d; margin-bottom: 0.2rem; }
.kpi-active .kpi-title { color: rgba(255,255,255,0.9); }
.kpi-value { font-size: 1.6rem; font-weight: 700; margin-bottom: 0; }
.kpi-icon { font-size: 2rem; opacity: 0.2; }

.map-header-control { background: #a60a2b; color: white; padding: 0.5rem 1rem; border-radius: 8px 8px 0 0; display: flex; align-items: center; }
#mapaElectoral { height: calc(100vh - 350px); min-height: 400px; width: 100%; border-radius: 0 0 8px 8px; z-index: 1; }

.select2-container--default .select2-selection--single { border: none; border-radius: 6px; height: 36px; padding-top: 2px; }
.table-stats th { font-size: 0.75rem; text-transform: uppercase; color: #888; border-bottom: none; padding-bottom: 0.2rem; }
.table-stats td { vertical-align: middle; font-size: 0.85rem; font-weight: 500; border-bottom: 1px solid #f0f0f0; padding: 0.6rem 0.5rem; }
.progress-slim { height: 6px; border-radius: 3px; background-color: #e9ecef; margin-top: 4px; }
#loaderOverlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255, 255, 255, 0.85); z-index: 2000; display: none; justify-content: center; align-items: center; flex-direction: column; }

/* Clases dinámicas para Pantalla Completa */
.card.fullscreen-mode { height: 100vh !important; border-radius: 0 !important; margin: 0 !important; }
.card.fullscreen-mode .map-header-control { border-radius: 0 !important; }
.card.fullscreen-mode #mapaElectoral { height: calc(100vh - 46px) !important; min-height: auto !important; border-radius: 0 !important; }