/* SISGEP - Mapa Interativo - CSS Completo */

:root {
    --primary-color: #4a6fa5;
    --secondary-color: #166088;
    --accent-color: #4fc3f7;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-color);
    overflow: hidden;
}

/* Toggle Sidebar Button */
.toggle-sidebar {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 16px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.toggle-sidebar:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.toggle-sidebar:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Container Principal */
.container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Sidebar */
.sidebar {
    width: 400px;
    height: 100vh;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 15px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    z-index: 1000;
    transition: all 0.3s ease;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
}

/* Estados do Sidebar */
.sidebar-expanded {
    width: 400px;
    transform: translateX(0);
    opacity: 1;
}

.sidebar-collapsed {
    width: 0;
    transform: translateX(-100%);
    opacity: 0;
    padding: 0;
    overflow: hidden;
}

.sidebar-header {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--accent-color);
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    width: 100%;
}

.logo img {
    width: 320px;
    height: auto;
}

.logo h1 {
    margin: 0;
    font-size: 1.1rem;
    text-align: center;
    color: var(--secondary-color);
    font-weight: 600;
}

/* Seções da Sidebar */
.sidebar-section {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.sidebar-section:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.sidebar-section h2 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-section h2 i {
    color: var(--accent-color);
}

/* Formulários */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--dark-color);
}

/* Estilos globais para todos os selects */
select {
    width: 100% !important;
    max-width: 100% !important;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: var(--transition);
    background-color: white;
    cursor: pointer;
    box-sizing: border-box;
}

select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(79, 195, 247, 0.1);
}

select:hover {
    border-color: var(--accent-color);
}

/* Estilos para as opções dos selects */
select option {
    padding: 8px 12px;
    font-size: 14px;
    background-color: white;
    color: var(--dark-color);
}

select option:hover {
    background-color: var(--light-color);
}

select option:checked {
    background-color: var(--accent-color);
    color: white;
}

/* Estilos para selects desabilitados */
select:disabled {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
    opacity: 0.6;
}

select:disabled:hover {
    border-color: #ddd;
}

/* Garantir que selects dentro da sidebar tenham largura correta */
.sidebar select {
    width: calc(100% - 0px) !important;
    max-width: calc(100% - 0px) !important;
    box-sizing: border-box;
}

.sidebar .form-group select {
    width: 100% !important;
    max-width: 100% !important;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(79, 195, 247, 0.1);
}

/* Botões */
.btn {
    display: inline-block;
    padding: 12px 20px;
    background-color: #2B323A;
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    transition: var(--transition);
    width: 100%;
}

.btn:hover {
    background-color: #9A9FA6;
    transform: translateY(-2px);
}

.btn i {
    margin-right: 8px;
}

.btn-primary {
    background-color: #2B323A;
}

.btn-primary:hover {
    background-color: #9A9FA6;
}

.btn-secondary {
    background-color: #9A9FA6;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-success {
    background-color: #28a745;
}

.btn-success:hover {
    background-color: #218838;
}

.btn-warning {
    background-color: var(--warning-color);
    color: white;
}

.btn-warning:hover {
    background-color: #e0a800;
    transform: translateY(-2px);
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    transform: none;
}

.btn:disabled:hover {
    background-color: #cccccc;
}

/* Checkbox personalizado */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
}

/* Checkbox Group Styles */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.checkbox-group .checkbox-label {
    margin-bottom: 0;
    font-size: 13px;
}

/* Radio Group Styles */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.radio-group .radio-label {
    margin-bottom: 0;
    font-size: 13px;
}

/* Radio Button Styles */
.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 10px;
    position: relative;
    padding-left: 25px;
}

.radio-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-mark {
    position: absolute;
    top: 0;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: #fff;
    border: 2px solid #ccc;
    border-radius: 50%;
}

.radio-label:hover input ~ .radio-mark {
    background-color: #f0f0f0;
}

.radio-label input:checked ~ .radio-mark {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.radio-mark:after {
    content: '';
    position: absolute;
    display: none;
}

.radio-label input:checked ~ .radio-mark:after {
    display: block;
}

.radio-label .radio-mark:after {
    top: 5px;
    left: 5px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: white;
}

.radio-label:hover {
    color: var(--primary-color);
}

/* Mapa */
#map {
    flex: 1;
    width: calc(100% - 400px);
    height: 100vh;
    background: #e8f4f8;
    position: relative;
    transition: all 0.3s ease;
}

/* Estados do Mapa */
.map-with-sidebar {
    width: calc(100% - 400px);
}

.map-expanded {
    width: 100%;
}

/* ===== POPUP E TOOLTIP STYLES ===== */

/* Popup Content - APLICADO DIRETAMENTE NO LEAFLET */
.leaflet-popup-content-wrapper {
    padding: 0;
    border-radius: 8px;
    background: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    min-width: 400px;
    border: none;
}

.leaflet-popup-content {
    margin: 0;
    min-width: 400px;
    max-height: none;
    border: none;
    background: white;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding: 20px;
    border-radius: 8px;
}

.leaflet-popup-tip {
    background: white;
    border: none;
    box-shadow: none;
}

.leaflet-popup-close-button {
    color: #666;
    font-size: 18px;
    padding: 25px;
    right: 5px;
    top: 5px;
}

.leaflet-popup-close-button:hover {
    color: #333;
}

/* Remover o highlight ao clicar */
.leaflet-interactive:focus {
    outline: none;
}

.leaflet-interactive:active {
    outline: none;
}

/* 🆕 IMPLEMENTAÇÃO: Melhorar área de clique dos polígonos regionais */
.leaflet-interactive {
    cursor: pointer !important;
    pointer-events: all !important;
}

/* Aumentar área de clique para polígonos das regionais */
.leaflet-interactive:hover {
    cursor: pointer !important;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

/* Garantir que todos os elementos do polígono sejam clicáveis */
.leaflet-interactive * {
    pointer-events: all !important;
    cursor: pointer !important;
}

/* 🆕 IMPLEMENTAÇÃO: Melhorar área de clique dos bairros */
.leaflet-interactive[data-layer-type="bairro"] {
    cursor: pointer !important;
    pointer-events: all !important;
    stroke-width: 2px !important;
}

.leaflet-interactive[data-layer-type="bairro"]:hover {
    cursor: pointer !important;
    opacity: 0.8 !important;
    stroke-width: 3px !important;
    stroke: #27ae60 !important;
    transition: all 0.2s ease !important;
}

/* Aumentar área de clique para polígonos dos bairros */
.leaflet-interactive[data-layer-type="bairro"] * {
    pointer-events: all !important;
    cursor: pointer !important;
}

/* ===== TOOLTIPS MELHORADOS ===== */

/* Tooltip base do Leaflet */
.leaflet-tooltip {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 8px;
    color: #333;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 12px;
    padding: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    max-width: 280px;
}

/* Tooltip simples para bairros - fundo branco e texto azul - ATUALIZADO */
.bairro-tooltip {
    background: white !important;
    border: 1px solid var(--primary-color) !important;
    border-radius: 4px !important;
    padding: 6px 12px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: var(--secondary-color) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* Sobrescrever estilos padrão do Leaflet para tooltips */
.leaflet-tooltip.bairro-tooltip {
    background: white !important;
    border: 1px solid var(--primary-color) !important;
    border-radius: 4px !important;
    padding: 6px 12px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: var(--secondary-color) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* Regra adicional para garantir que o tooltip seja aplicado */
.leaflet-tooltip[class*="bairro-tooltip"] {
    background: white !important;
    border: 1px solid var(--primary-color) !important;
    border-radius: 4px !important;
    padding: 6px 12px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: var(--secondary-color) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* Tooltip melhorado - usando as mesmas cores do popup */
.bairro-tooltip-enhanced {
    background: white !important;
    border: none !important;
    border-radius: var(--border-radius) !important;
    padding: 0 !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
    backdrop-filter: none !important;
    max-width: 300px !important;
    font-weight: 500 !important;
    color: #333 !important;
}

/* Cabeçalho do tooltip - usando as mesmas cores do popup */
.tooltip-header {
    background: white;
    padding: 12px 16px;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid var(--accent-color);
}

.tooltip-header i {
    color: var(--secondary-color);
    font-size: 14px;
    opacity: 0.9;
}

.tooltip-title {
    color: var(--secondary-color);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Conteúdo do tooltip - usando as mesmas cores do popup */
.tooltip-content {
    padding: 16px;
    background: white;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

/* Valor principal - usando as mesmas cores do popup */
.tooltip-value {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding: 12px;
    background: white;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--accent-color);
}

/* ===== SEÇÃO ESPECÍFICA PARA FILTRO TIPO DE OCORRÊNCIA - TODOS OS BAIRROS ===== */

/* Tooltip específico para o Filtro Tipo de Ocorrência na visualização "Todos os Bairros" */
.bairro-tooltip-mda-filtro {
    background: white !important;
    border: 2px solid var(--accent-color) !important;
    border-radius: 8px !important;
    padding: 8px 16px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #333 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    text-transform: none !important;
    letter-spacing: 0.3px !important;
    line-height: 1.4 !important;
    
    /* Largura proporcional ao conteúdo - sem max-width fixo */
    width: auto !important;
    min-width: 200px !important;
    max-width: none !important;
    
    /* Quebra de linha automática para nomes longos */
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

/* Sobrescrever estilos padrão do Leaflet para tooltips MDA */
.leaflet-tooltip.bairro-tooltip-mda-filtro {
    background: white !important;
    border: 2px solid var(--accent-color) !important;
    border-radius: 8px !important;
    padding: 8px 16px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #333 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    text-transform: none !important;
    letter-spacing: 0.3px !important;
    line-height: 1.4 !important;
    
    /* Largura proporcional ao conteúdo */
    width: auto !important;
    min-width: 200px !important;
    max-width: none !important;
    
    /* Quebra de linha automática */
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

/* Regra adicional para garantir que o tooltip MDA seja aplicado */
.leaflet-tooltip[class*="bairro-tooltip-mda-filtro"] {
    background: white !important;
    border: 2px solid var(--accent-color) !important;
    border-radius: 8px !important;
    padding: 8px 16px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #333 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    text-transform: none !important;
    letter-spacing: 0.3px !important;
    line-height: 1.4 !important;
    
    /* Largura proporcional ao conteúdo */
    width: auto !important;
    min-width: 200px !important;
    max-width: none !important;
    
    /* Quebra de linha automática */
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

/* Estilo específico para o nome do tipo de ocorrência no tooltip MDA */
.bairro-tooltip-mda-filtro .tipo-ocorrencia-nome {
    font-weight: 600 !important;
    color: var(--accent-color) !important;
    background: rgba(0, 123, 255, 0.1) !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    margin: 2px 0 !important;
    display: inline-block !important;
    word-break: break-word !important;
    max-width: 100% !important;
}

/* Responsividade para tooltips MDA */
@media (max-width: 768px) {
    .bairro-tooltip-mda-filtro,
    .leaflet-tooltip.bairro-tooltip-mda-filtro,
    .leaflet-tooltip[class*="bairro-tooltip-mda-filtro"] {
        font-size: 12px !important;
        padding: 6px 12px !important;
        min-width: 180px !important;
        max-width: 90vw !important;
    }
}

/* 🆕 DIREITOS HUMANOS: Estilos para pins e popups */
.custom-pin {
    background: transparent !important;
    border: none !important;
}

.direitos-humanos-popup .leaflet-popup-content-wrapper {
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
    border: 2px solid #e9ecef;
    max-width: 900px;
    min-width: 800px;
    z-index: 2100 !important;
}

.direitos-humanos-popup {
    z-index: 2100 !important;
}

.leaflet-popup.direitos-humanos-popup {
    z-index: 2100 !important;
}

.direitos-humanos-popup .leaflet-popup-tip {
    z-index: 2100 !important;
}

.direitos-humanos-popup .leaflet-popup-content {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    font-size: 14px;
}

.direitos-humanos-popup-content h4 {
    color: #2c3e50;
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
}

.direitos-humanos-popup-content p {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #34495e;
}

.direitos-humanos-popup-content strong {
    color: #2c3e50;
    font-weight: 600;
}

/* Responsividade para popups de direitos humanos */
@media (max-width: 768px) {
    .direitos-humanos-popup .leaflet-popup-content {
        margin: 8px;
        font-size: 12px;
    }
    
    .direitos-humanos-popup-content h4 {
        font-size: 14px;
    }
    
    .direitos-humanos-popup-content p {
        font-size: 11px;
    }
}

/* ===== ESTILOS PARA POPUP COM ABAS - DIREITOS HUMANOS ===== */

/* Popup com abas para equipamentos de assistência social */
.direitos-humanos-popup .popup-tabs {
    margin-top: 0;
    width: 100%;
}

.direitos-humanos-popup .tab-buttons {
    display: flex;
    border-bottom: 2px solid #eee;
    margin-bottom: 12px;
    background: #f8f9fa;
    border-radius: 6px 6px 0 0;
    overflow: hidden;
}

.direitos-humanos-popup .tab-button {
    flex: 1;
    padding: 8px 12px;
    border: none;
    background: #f8f9fa;
    color: #6c757d;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border-right: 1px solid #dee2e6;
}

.direitos-humanos-popup .tab-button:last-child {
    border-right: none;
}

.direitos-humanos-popup .tab-button:hover {
    background: #e9ecef;
    color: #495057;
}

.direitos-humanos-popup .tab-button.active {
    background: white;
    color: #2c3e50;
    font-weight: 600;
    border-bottom: 2px solid transparent;
}

.direitos-humanos-popup .tab-content {
    background: white;
    padding: 15px;
    border-radius: 0 0 6px 6px;
    max-height: 400px;
    overflow-y: auto;
}

/* Estilos personalizados para a barra de rolagem do conteúdo da aba */
.direitos-humanos-popup .tab-content::-webkit-scrollbar {
    width: 6px;
}

.direitos-humanos-popup .tab-content::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 3px;
}

.direitos-humanos-popup .tab-content::-webkit-scrollbar-thumb {
    background: #6c757d;
    border-radius: 3px;
}

.direitos-humanos-popup .tab-content::-webkit-scrollbar-thumb:hover {
    background: #495057;
}

.direitos-humanos-popup .tab-pane {
    display: none;
}

.direitos-humanos-popup .tab-pane.active {
    display: block;
}

/* ===== ESTILOS PARA ABA DE INFORMAÇÕES ===== */

.direitos-humanos-popup .info-section h5 {
    margin: 0 0 12px 0;
    color: #2c3e50;
    font-size: 14px;
    font-weight: 600;
}

.direitos-humanos-popup .info-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.direitos-humanos-popup .info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.direitos-humanos-popup .info-label {
    font-weight: 600;
    color: #495057;
    font-size: 12px;
    flex: 1;
}

.direitos-humanos-popup .info-value {
    font-weight: 500;
    color: #2c3e50;
    font-size: 12px;
    text-align: right;
    flex: 1;
}

/* ===== ESTILOS PARA ABA DE MÉTRICAS ===== */

.direitos-humanos-popup .metric-section h5 {
    margin: 0 0 12px 0;
    color: #2c3e50;
    font-size: 14px;
    font-weight: 600;
}

.direitos-humanos-popup .metrics-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 8px;
}

/* Estilos personalizados para a barra de rolagem da aba Métrica */
.direitos-humanos-popup .metrics-grid::-webkit-scrollbar {
    width: 8px;
}

.direitos-humanos-popup .metrics-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.direitos-humanos-popup .metrics-grid::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 4px;
}

.direitos-humanos-popup .metrics-grid::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}

.direitos-humanos-popup .metric-item {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 12px;
}

.direitos-humanos-popup .metric-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.direitos-humanos-popup .metric-header i {
    font-size: 14px;
    color: #3498db;
    min-width: 14px;
}

.direitos-humanos-popup .metric-label {
    flex: 1;
    font-weight: 600;
    color: #2c3e50;
    font-size: 12px;
}

.direitos-humanos-popup .metric-number {
    font-weight: 700;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 8px;
    text-align: center;
}

.direitos-humanos-popup .metric-number.has-data {
    background: #28a745;
    color: white;
}

.direitos-humanos-popup .metric-number.no-data {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.direitos-humanos-popup .metric-description {
    color: #495057;
    font-size: 11px;
    line-height: 1.4;
    font-style: italic;
    background: white;
    padding: 8px;
    border-radius: 4px;
    border-left: 3px solid #17a2b8;
}

/* ===== ESTILOS PARA JUSTIFICATIVA ===== */

.direitos-humanos-popup .justificativa-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #dee2e6;
}

.direitos-humanos-popup .justificativa-section h6 {
    margin: 0 0 8px 0;
    color: #27ae60;
    font-size: 12px;
    font-weight: 600;
}

.direitos-humanos-popup .justificativa-content {
    background: #d4edda;
    border: 1px solid #27ae60;
    border-radius: 6px;
    padding: 12px;
    color: #155724;
    font-size: 11px;
    line-height: 1.4;
    font-weight: 500;
}

/* ===== ESTILOS ESPECÍFICOS PARA ABA EQUIPAMENTO ===== */

.direitos-humanos-popup .equipamento-section {
    padding: 0;
    margin: 0;
}

.direitos-humanos-popup .equipamento-section h5 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.direitos-humanos-popup .equipamento-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-height: 450px;
    overflow-y: auto;
    padding-right: 5px;
}

.direitos-humanos-popup .equipamento-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    transition: all 0.2s ease;
}

.direitos-humanos-popup .equipamento-item:hover {
    border-color: #9b59b6;
    box-shadow: 0 2px 8px rgba(155, 89, 182, 0.1);
}

.direitos-humanos-popup .equipamento-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.direitos-humanos-popup .equipamento-label {
    font-weight: 700;
    color: #2c3e50;
    font-size: 12px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.direitos-humanos-popup .equipamento-description {
    color: #495057;
    font-size: 11px;
    line-height: 1.5;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    border-left: 4px solid #9b59b6;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.direitos-humanos-popup .equipamento-description.has-data {
    background: #f8f9fa;
    color: #495057;
    border-left-color: #9b59b6;
}

.direitos-humanos-popup .equipamento-description.no-data {
    background: #f8f9fa;
    color: #6c757d;
    border-left-color: #dee2e6;
    font-style: italic;
}

/* ===== ESTILOS ESPECÍFICOS PARA ABA FOTOS ===== */

.direitos-humanos-popup .fotos-section {
    padding: 0;
    margin: 0;
}

.direitos-humanos-popup .fotos-section h5 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.direitos-humanos-popup .foto-data {
    background: #e8f4f8;
    border: 1px solid #3498db;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 15px;
    text-align: center;
    color: #2c3e50;
    font-size: 12px;
}

.direitos-humanos-popup .fotos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 5px;
}

.direitos-humanos-popup .foto-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
    position: relative;
}

.direitos-humanos-popup .foto-item:hover {
    border-color: #e67e22;
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.2);
    transform: translateY(-2px);
}

.direitos-humanos-popup .foto-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.direitos-humanos-popup .foto-item img:hover {
    opacity: 0.9;
}

.direitos-humanos-popup .foto-item.sem-foto {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.direitos-humanos-popup .foto-placeholder {
    text-align: center;
    color: #bdc3c7;
}

.direitos-humanos-popup .foto-placeholder h6 {
    margin: 10px 0 0 0;
    font-size: 12px;
    font-weight: 500;
}

.direitos-humanos-popup .foto-erro {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Estilos para aba Equipe */
.direitos-humanos-popup .equipe-section {
    padding: 15px;
}

.direitos-humanos-popup .equipe-section h5 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.direitos-humanos-popup .equipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    max-height: 500px;
    overflow-y: auto;
    padding: 5px;
}

.direitos-humanos-popup .equipe-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid #e9ecef;
}

.direitos-humanos-popup .equipe-card.coordenador {
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
    border: 2px solid #ffc107;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

.direitos-humanos-popup .equipe-card.coordenador .equipe-nome {
    color: #856404;
    font-weight: 700;
}

.direitos-humanos-popup .equipe-card.coordenador .equipe-foto img,
.direitos-humanos-popup .equipe-card.coordenador .equipe-foto div {
    border-color: #ffc107;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.4);
}

.direitos-humanos-popup .equipe-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.direitos-humanos-popup .equipe-card.coordenador:hover {
    border-color: #ffc107;
    box-shadow: 0 4px 16px rgba(255, 193, 7, 0.5);
}

.direitos-humanos-popup .equipe-foto {
    margin-bottom: 12px;
}

.direitos-humanos-popup .equipe-foto img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #667eea;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.direitos-humanos-popup .equipe-info {
    text-align: center;
}

.direitos-humanos-popup .equipe-nome {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-size: 14px;
    font-weight: 600;
}

.direitos-humanos-popup .equipe-cargo,
.direitos-humanos-popup .equipe-contato {
    margin: 5px 0;
    color: #6c757d;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.direitos-humanos-popup .equipe-email {
    margin: 5px 0;
    color: #6c757d;
    font-size: 12px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 6px;
    line-height: 1.4;
}

.direitos-humanos-popup .equipe-email i {
    color: #667eea;
    margin-top: 2px;
    flex-shrink: 0;
}

.direitos-humanos-popup .equipe-email .email-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.direitos-humanos-popup .equipe-email .email-user {
    display: block;
}

.direitos-humanos-popup .equipe-email .email-domain {
    display: block;
    margin-top: 2px;
}

.direitos-humanos-popup .equipe-cargo i,
.direitos-humanos-popup .equipe-contato i {
    color: #667eea;
    font-size: 11px;
}

/* Responsivo para aba Equipe */
@media (max-width: 768px) {
    .direitos-humanos-popup .equipe-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .direitos-humanos-popup .equipe-foto img {
        width: 80px;
        height: 80px;
    }
}
    flex-direction: column;
    background: #f8f9fa;
    color: #e74c3c;
    font-size: 11px;
}

/* ===== MODAL DE FOTO ===== */

.foto-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(5px);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { 
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to { 
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.foto-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 98%;
    max-width: 1600px;
    max-height: 98%;
    text-align: center;
    animation: zoomIn 0.3s ease;
}

.foto-modal-close {
    position: absolute;
    top: -15px;
    right: -15px;
    color: #ffffff;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 100000;
    background: rgba(231, 76, 60, 0.8);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.foto-modal-close:hover {
    background: rgba(231, 76, 60, 1);
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.8);
}

.foto-modal img {
    width: 100%;
    height: auto;
    max-height: 90vh;
    max-width: 100%;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.6);
    transition: transform 0.3s ease;
    cursor: zoom-out;
}

.foto-modal img:hover {
    transform: scale(1.02);
}

.foto-modal-caption {
    display: block;
    width: 100%;
    text-align: center;
    color: #ffffff;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 8px;
    margin-top: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Navegação do modal (se houver múltiplas fotos) */
.foto-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    padding: 15px 20px;
    font-size: 24px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    z-index: 100000;
}

.foto-modal-nav:hover {
    background: rgba(230, 126, 34, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.foto-modal-nav.prev {
    left: 20px;
}

.foto-modal-nav.next {
    right: 20px;
}

/* Responsividade do modal */
@media (max-width: 768px) {
    .foto-modal-content {
        width: 98%;
        max-height: 98%;
    }
    
    .foto-modal-close {
        top: -10px;
        right: -10px;
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
    
    .foto-modal img {
        max-height: 75vh;
        border-radius: 8px;
    }
    
    .foto-modal-caption {
        font-size: 14px;
        padding: 10px 15px;
    }
    
    .foto-modal-nav {
        padding: 10px 15px;
        font-size: 20px;
    }
}

/* ===== RESPONSIVIDADE PARA POPUP COM ABAS ===== */

@media (max-width: 768px) {
    .direitos-humanos-popup .tab-button {
        padding: 6px 8px;
        font-size: 11px;
    }
    
    .direitos-humanos-popup .tab-content {
        padding: 10px;
    }
    
    .direitos-humanos-popup .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 6px 0;
    }
    
    .direitos-humanos-popup .info-value {
        text-align: left;
        font-weight: 600;
    }
    
    .direitos-humanos-popup .metric-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .direitos-humanos-popup .metric-number {
        align-self: flex-end;
    }
}

/* ===== ESTILOS PARA POPUP DA LEGENDA MÉTRICA ===== */

.legenda-metrica-popup {
    max-width: 700px !important;
    min-width: 600px !important;
}

.legenda-metrica-popup .leaflet-popup-content-wrapper {
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    border: 3px solid #3498db;
    max-width: 700px;
    min-width: 600px;
}

.legenda-metrica-popup .leaflet-popup-content {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    font-size: 14px;
    padding: 20px;
}

.legenda-metrica-content {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 20px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.legenda-metrica-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 3px solid #3498db;
}

.legenda-metrica-header h3 {
    margin: 0;
    color: #1a252f;
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.legenda-metrica-header h3 i {
    color: #3498db;
    font-size: 24px;
}

.legenda-metrica-header p {
    margin: 8px 0 0 0;
    color: #6c757d;
    font-size: 14px;
    font-style: italic;
}

.legenda-metrica-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 10px;
}

/* Estilos personalizados para a barra de rolagem da legenda */
.legenda-metrica-grid::-webkit-scrollbar {
    width: 8px;
}

.legenda-metrica-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.legenda-metrica-grid::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 4px;
}

.legenda-metrica-grid::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}

.legenda-metrica-item {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.legenda-metrica-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(135deg, #3498db, #2980b9);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.legenda-metrica-item:hover::before {
    transform: scaleY(1);
}

.legenda-metrica-item:hover {
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.2);
}

.legenda-metrica-categoria {
    font-weight: 700;
    color: #1a252f;
    font-size: 16px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.legenda-metrica-categoria i {
    color: #3498db;
    font-size: 18px;
    min-width: 18px;
}

.legenda-metrica-descricao {
    color: #495057 !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef) !important;
    padding: 12px 15px !important;
    border-radius: 8px !important;
    border-left: 4px solid #17a2b8 !important;
    font-weight: 500 !important;
    margin: 0 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    min-height: 40px !important;
    overflow: visible !important;
    white-space: normal !important;
    word-wrap: break-word !important;
}

.legenda-metrica-footer {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #e9ecef;
    text-align: center;
}

.legenda-metrica-footer p {
    margin: 0;
    color: #6c757d;
    font-size: 12px;
    font-style: italic;
}

/* Responsividade para popup da legenda */
@media (max-width: 768px) {
    .legenda-metrica-popup {
        max-width: 90vw !important;
        min-width: 90vw !important;
    }
    
    .legenda-metrica-popup .leaflet-popup-content-wrapper {
        max-width: 90vw;
        min-width: 90vw;
    }
    
    .legenda-metrica-content {
        padding: 15px;
    }
    
    .legenda-metrica-header h3 {
        font-size: 20px;
    }
    
    .legenda-metrica-item {
        padding: 15px;
    }
    
    .legenda-metrica-categoria {
        font-size: 14px;
    }
    
    .legenda-metrica-descricao {
        font-size: 13px;
        padding: 12px 15px;
    }
    
    .legenda-metrica-grid {
        max-height: 300px;
    }

    
    .bairro-tooltip-mda-filtro .tipo-ocorrencia-nome {
        font-size: 11px !important;
        padding: 1px 4px !important;
    }
}

@media (max-width: 480px) {
    .bairro-tooltip-mda-filtro,
    .leaflet-tooltip.bairro-tooltip-mda-filtro,
    .leaflet-tooltip[class*="bairro-tooltip-mda-filtro"] {
        font-size: 11px !important;
        padding: 5px 10px !important;
        min-width: 160px !important;
        max-width: 95vw !important;
    }
    
    .bairro-tooltip-mda-filtro .tipo-ocorrencia-nome {
        font-size: 10px !important;
        padding: 1px 3px !important;
    }
}

.tooltip-value i {
    color: var(--secondary-color);
    font-size: 16px;
}

.value-number {
    color: var(--secondary-color);
    font-size: 18px;
    font-weight: 700;
}

.value-unit {
    color: #666;
    font-size: 12px;
    font-weight: 500;
}

/* Classificação */
.tooltip-classification {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(22, 96, 136, 0.08);
    border-radius: 6px;
    border-left: 3px solid var(--secondary-color);
    margin-top: 8px;
}

.tooltip-classification i {
    color: var(--secondary-color);
    font-size: 14px;
}

.tooltip-classification span {
    color: #666;
    font-size: 12px;
    font-weight: 500;
}

/* Sem dados - usando as mesmas cores do popup */
.tooltip-no-data {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: white;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--accent-color);
}

.tooltip-no-data i {
    color: var(--secondary-color);
    font-size: 16px;
}

.tooltip-no-data span {
    color: #666;
    font-size: 12px;
    font-weight: 500;
}

/* Seta do tooltip */
.leaflet-tooltip-top:before {
    border-top-color: rgba(255, 255, 255, 0.95) !important;
}

.leaflet-tooltip-bottom:before {
    border-bottom-color: rgba(255, 255, 255, 0.95) !important;
}

.leaflet-tooltip-left:before {
    border-left-color: rgba(255, 255, 255, 0.95) !important;
}

.leaflet-tooltip-right:before {
    border-right-color: rgba(255, 255, 255, 0.95) !important;
}

.leaflet-popup-content h3 {
    margin: 0 0 10px 0;
    color: var(--secondary-color);
    font-size: 16px;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.leaflet-popup-content h4 {
    margin: 15px 0 8px 0;
    color: var(--secondary-color);
    font-size: 14px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.leaflet-popup-content p {
    margin: 8px 0;
    font-size: 13px;
    line-height: 1.5;
}

.leaflet-popup-content strong {
    color: var(--dark-color);
    font-weight: 500;
}



/* Mensagem de Loading */
#mapLoadingMessage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px 30px;
    border-radius: 10px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    font-weight: 500;
    z-index: 2000;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    min-width: 200px;
}

#mapLoadingMessage i {
    font-size: 24px;
    color: var(--accent-color);
    margin-bottom: 10px;
}

/* Responsividade */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -400px;
        height: 100vh;
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .container {
        flex-direction: column;
    }
    
    #map {
        height: calc(100vh - 60px);
        margin-top: 60px;
    }
    
    .toggle-sidebar {
        top: 10px;
        left: 10px;
    }
    
    /* Garantir que selects tenham largura adequada em mobile */
    select {
        width: 100%;
        max-width: none;
    }
    
    .form-control {
        width: 100%;
        max-width: none;
    }
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.sidebar-section {
    animation: fadeIn 0.3s ease-out;
}

/* Estilos para o Leaflet */
.leaflet-container {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.leaflet-popup-content {
    font-size: 14px;
    line-height: 1.4;
}

.leaflet-tooltip {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 500;
}

/* Scrollbar personalizada */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Estados de hover e focus */
.form-control:hover {
    border-color: var(--primary-color);
}

.btn:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ===== LABELS FIXAS (PERMANENTES) ===== */

/* Labels permanentes para regionais */
.regional-label {
    background: transparent !important;
    border: none !important;
}

.label-content {
    background: rgba(255, 255, 255, 0); /* Fundo quase transparente */
    border: none; /* Remove a borda */
    padding: 4px 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Sombra mais suave */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-width: 100px;
    backdrop-filter: blur(1px); /* Aumenta o desfoque para efeito "vidro" */
    color: #000000; /* Cor do texto escuro para contraste */
}

.regional-name {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #1a1a1a;
    text-shadow: 2px 2px 4px rgba(255,255,255,0.9), -1px -1px 2px rgba(255,255,255,0.9);
}

.regional-value {
    font-weight: 800;
    font-size: 16px;
    margin-bottom: 2px;
    color: #000000;
    text-shadow: 2px 2px 4px rgba(255,255,255,0.9), -1px -1px 2px rgba(255,255,255,0.9);
}

.regional-classification {
    font-weight: 600;
    font-size: 11px;
    color: #2c3e50;
    text-shadow: 2px 2px 4px rgba(255,255,255,0.9), -1px -1px 2px rgba(255,255,255,0.9);
    font-style: italic;
}

.regional-total {
    font-weight: 500;
    font-size: 12px;
    padding: 1px 1px;
    border-radius: 3px;
}

/* Labels para bairros */
.bairro-label {
    background: transparent !important;
    border: none !important;
}

.bairro-name {
    font-weight: 600;
    font-size: 11px;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #000000;
}

.bairro-total {
    font-weight: 500;
    font-size: 10px;
    padding: 1px 1px;
    border-radius: 3px;
    color: #000000;
}

/* Estilo para labels das regionais */
.regional-label div {
    font-family: 'Arial', sans-serif;
    font-weight: bold;
    color: #000000;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.8);
    z-index: 1000;
}

/* Estilo para labels dos bairros */
.bairro-label div {
    font-family: 'Arial', sans-serif;
    font-weight: bold;
    color: #000000;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.8);
    z-index: 1000;
}

/* Utilitários */
.hidden {
    display: none !important;
}

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

.mb-2 {
    margin-bottom: 8px;
}

.mb-3 {
    margin-bottom: 16px;
}

.mt-2 {
    margin-top: 8px;
}

.mt-3 {
    margin-top: 16px;
}

/* Search Container */
.search-container {
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.search-container input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.search-container select {
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    font-size: 13px;
    box-sizing: border-box;
}

.search-container select option {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    white-space: normal;
    word-wrap: break-word;
    min-height: 20px;
    line-height: 1.4;
}

.search-container select option:hover {
    background-color: #f0f0f0;
}

/* Input with Icon */
.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon input {
    flex: 1;
    padding-right: 30px;
}

.edit-icon {
    position: absolute;
    right: 10px;
    color: #666;
    cursor: pointer;
    font-size: 14px;
}

.edit-icon:hover {
    color: #333;
}

/* Warning Button */
.btn-warning {
    background-color: var(--warning-color);
    color: white;
}

.btn-warning:hover {
    background-color: #e0a800;
    transform: translateY(-2px);
}

/* Danger Button */
.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
    transform: translateY(-2px);
}

/* ===== LEGENDAS AVANÇADAS ===== */

/* Legend Styles */
.legend {
    padding: 10px 15px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    line-height: 1.5;
    font-size: 13px;
    margin-top: 15px;
}

.legend h4 {
    margin: 0 0 8px 0;
    color: var(--secondary-color);
    font-size: 14px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    font-size: 12px;
}

.legend-color {
    width: 20px;
    height: 15px;
    margin-right: 8px;
    border: 1px solid #666;
    border-radius: 2px;
}

/* Estilos específicos para a legenda do mapa de calor das eleições */
.eleicoes-heatmap-legend {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    padding: 15px;
    box-shadow: var(--box-shadow);
    min-width: 200px;
}

/* ===== LABELS FIXAS DOS BAIRROS ===== */
.bairro-label-fixed-container {
    background: transparent !important;
    border: none !important;
}

.bairro-label-fixed {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 4px 8px;
    text-align: center;
    box-shadow: none;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-width: 100px;
    max-width: 150px;
}

.bairro-label-fixed .bairro-nome {
    font-weight: bold;
    font-size: 12px;
    color: #000000;
    margin-bottom: 4px;
    line-height: 1.2;
}

.bairro-label-fixed .bairro-valor {
    font-size: 14px;
    font-weight: bold;
    color: #000000;
    margin-bottom: 2px;
}

.bairro-label-fixed .bairro-classificacao {
    font-size: 10px;
    color: #000000;
    font-style: italic;
}

/* ===== AVISO DE CARREGAMENTO ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.loading-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loading-text {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.loading-subtext {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsividade para o aviso de carregamento */
@media (max-width: 768px) {
    .loading-content {
        padding: 20px;
        max-width: 300px;
    }
    
    .loading-text {
        font-size: 20px;
    }
    
    .loading-subtext {
        font-size: 12px;
    }
    
    .loading-spinner {
        width: 50px;
        height: 50px;
    }
}

.eleicoes-heatmap-legend h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    color: var(--secondary-color);
    text-align: center;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 8px;
}

.eleicoes-heatmap-legend .legend-item {
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 500;
}

.eleicoes-heatmap-legend .legend-color {
    width: 25px;
    height: 20px;
    margin-right: 10px;
    border: 1px solid #666;
    border-radius: 3px;
}

/* Estilos para o ranking dos bairros */
.bairros-ranking-panel {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    padding: 15px;
    box-shadow: var(--box-shadow);
    max-width: 400px;
    max-height: 500px;
    overflow-y: auto;
    font-family: Arial, sans-serif;
}

.bairros-ranking-panel h4 {
    margin: 0 0 15px 0;
    color: var(--secondary-color);
    text-align: center;
    font-size: 16px;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 8px;
}

.bairros-ranking-panel .ranking-table {
    margin-bottom: 15px;
}

.bairros-ranking-panel table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.bairros-ranking-panel th {
    background: #f8f9fa;
    padding: 8px;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
    font-weight: bold;
    color: #495057;
}

.bairros-ranking-panel td {
    padding: 6px 8px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: top;
}

.bairros-ranking-panel .rank {
    text-align: center;
    font-weight: bold;
    font-size: 14px;
}

.bairros-ranking-panel .bairro-nome {
    font-weight: 500;
    color: #333;
}

.bairros-ranking-panel .total-votos {
    text-align: center;
    font-weight: bold;
    color: #28a745;
}

.bairros-ranking-panel .locais {
    text-align: center;
    color: #6c757d;
    font-size: 11px;
}

.bairros-ranking-panel .top-5 {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
}

.bairros-ranking-panel .top-5 .rank {
    color: #856404;
}

.bairros-ranking-panel .ranking-info {
    text-align: center;
    padding: 10px;
    background: #e3f2fd;
    border-radius: 5px;
    border-left: 4px solid #2196f3;
}

.bairros-ranking-panel .ranking-info small {
    color: #1976d2;
    font-style: italic;
}

.legend h4 {
    margin: 0 0 8px 0;
    color: var(--secondary-color);
    font-size: 14px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    font-size: 12px;
}

.legend-color {
    width: 20px;
    height: 15px;
    margin-right: 8px;
    border: 1px solid #666;
    border-radius: 2px;
}

/* File Info */
#fileInfo {
    margin-top: 15px;
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--accent-color);
    font-size: 14px;
    color: #495057;
}

/* ===== PAINÉIS INFORMATIVOS ===== */

/* Info Panel */
.info-panel {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: white;
    padding: 15px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    max-width: 250px;
    display: none;
}

.info-panel h3 {
    margin-top: 0;
    color: var(--secondary-color);
    font-size: 16px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
    margin-bottom: 10px;
}

.info-panel p {
    margin: 5px 0;
    font-size: 13px;
}

.close-info {
    position: absolute;
    top: 5px;
    right: 5px;
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #999;
}

/* Stats Panel */
.stats-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: var(--box-shadow);
}

.stats-card h3 {
    margin-top: 0;
    font-size: 16px;
    color: var(--secondary-color);
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
    margin-bottom: 10px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.stat-label {
    font-weight: 500;
    color: var(--dark-color);
}

.stat-value {
    font-weight: 600;
    color: var(--primary-color);
}

/* ===== RESPONSIVIDADE E MOBILE ===== */

/* Responsividade */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        max-height: 50vh;
        position: absolute;
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    #map {
        width: 100%;
        height: 50vh;
    }
    
    .sidebar-section {
        padding: 15px;
    }
}

/* Toggle Button for Mobile */
.toggle-sidebar {
    display: none;
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1001;
    background: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    cursor: pointer;
    font-size: 18px;
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .toggle-sidebar {
        display: block;
    }
}

/* ===== SCROLLBAR PERSONALIZADA ===== */

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* ===== ANIMAÇÕES E EFEITOS ===== */

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success Message */
.success-message {
    color: var(--success-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.success-message i {
    font-size: 16px;
}

/* ===== LEGENDA DADOS SEM BAIRRO ===== */
.sem-bairro-legend {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;
    min-width: 250px;
    max-width: 300px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.sem-bairro-legend h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-align: center;
    border-bottom: 2px solid #4a6fa5;
    padding-bottom: 8px;
}

.sem-bairro-legend .legend-item-sem-bairro {
    margin-bottom: 10px;
    padding: 8px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #4a6fa5;
    font-size: 12px;
    color: #333;
}

.sem-bairro-legend .legend-detalhamento {
    margin-top: 12px;
    padding: 10px;
    background-color: #e8f4fd;
    border-radius: 4px;
    border-left: 3px solid #2196f3;
    font-size: 11px;
    line-height: 1.5;
    color: #1976d2;
}

.sem-bairro-legend .legend-detalhamento strong {
    color: #0d47a1;
    font-weight: 600;
}

/* Responsividade da legenda */
@media (max-width: 768px) {
    .sem-bairro-legend {
        min-width: 200px;
        max-width: 250px;
        padding: 12px;
    }
    
    .sem-bairro-legend h4 {
        font-size: 13px;
    }
    
    .sem-bairro-legend .legend-item-sem-bairro {
        font-size: 11px;
        padding: 6px;
    }
    
    .sem-bairro-legend .legend-detalhamento {
        font-size: 10px;
        padding: 8px;
    }
}

/* ESTILOS DE QUARTIS COMENTADOS - SUBSTITUÍDOS POR "DADOS SEM BAIRRO"

.quartiles-legend {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;
    min-width: 200px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.quartiles-legend h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-align: center;
    border-bottom: 2px solid #4a6fa5;
    padding-bottom: 8px;
}

.quartiles-legend .legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 12px;
    color: #555;
}

.quartiles-legend .legend-item i {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

.quartiles-legend .legend-info {
    margin-top: 10px;
    padding: 8px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #4a6fa5;
}

.quartiles-legend .legend-info small {
    font-size: 11px;
    line-height: 1.4;
    color: #666;
}

.quartiles-legend .legend-info[style*="background-color: #e3f2fd"] {
    border-left-color: #2196f3;
}

.quartiles-legend .legend-info[style*="background-color: #fff3e0"] {
    border-left-color: #ff9800;
}

@media (max-width: 768px) {
    .quartiles-legend {
        min-width: 180px;
        padding: 12px;
    }
    
    .quartiles-legend h4 {
        font-size: 13px;
    }
    
    .quartiles-legend .legend-item {
        font-size: 11px;
    }
    
    .quartiles-legend .legend-info small {
        font-size: 10px;
    }
}

*/

/* Map Legend */
.map-legend {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #ccc;
    border-radius: 5px;
    padding: 10px;
    z-index: 1000;
    font-size: 12px;
    max-width: 200px;
}

.map-legend h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #333;
}

.map-legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.map-legend-color {
    width: 20px;
    height: 15px;
    margin-right: 8px;
    border: 1px solid #666;
    border-radius: 2px;
}

/* ===== ESTILOS PARA REGIONAIS ===== */

/* Legendas para regionais */
.regional-legend {
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    padding: 15px;
    margin: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-width: 200px;
    z-index: 1000;
}

.regional-legend h4 {
    margin: 0 0 15px 0;
    color: var(--primary-color);
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.regional-legend .legend-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.regional-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--secondary-color);
}

.regional-legend .legend-color {
    width: 20px;
    height: 20px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

/* Labels fixos das regionais */
.regional-label {
    background: transparent;
    border: none;
}

.regional-label-text {
    background: transparent;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-color);
    text-align: center;
    white-space: normal;
    box-shadow: none;
    text-transform: none;
    letter-spacing: 0.3px;
    line-height: 1.3;
    min-width: 140px;
}

/* Tooltips para regionais */
.regional-tooltip {
    background: white !important;
    border: 1px solid var(--primary-color) !important;
    border-radius: 4px !important;
    padding: 6px 12px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: var(--secondary-color) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* Popups para regionais */
.regional-popup {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 400px;
    /*background: white !important;*/
    border: none !important;
    border-radius: 8px !important;
    padding: 15px !important;
    box-shadow: none !important;
}

.regional-popup h3 {
    color: var(--primary-color);
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    border-bottom: none;
    padding-bottom: 8px;
}

.regional-popup h4 {
    color: var(--secondary-color);
    margin: 15px 0 10px 0;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.popup-section {
    margin-bottom: 15px;
}

.popup-info-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.popup-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: none;
}

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

.popup-label {
    font-weight: 500;
    color: var(--secondary-color);
    font-size: 13px;
}

.popup-value {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 13px;
    text-align: right;
    min-width: 80px;
}

.popup-current-view {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: rgba(var(--primary-color-rgb), 0.1);
    border-radius: 6px;
    border-left: none;
}

.popup-value.highlight {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 14px;
}

/* Estilos consolidados para popups - SEM DUPLICAÇÃO */
.leaflet-popup {
    border: none !important;
    outline: none !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
}

/* Estilo específico para o popup das regionais */
.leaflet-popup.regional-popup,
.leaflet-popup .regional-popup {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Estilos consolidados - removendo duplicações */

/* Manter apenas as bordas internas necessárias */
.regional-popup .popup-info-item {
    border-bottom: 1px solid #f0f0f0 !important;
}

.regional-popup .popup-current-view {
    border-left: 4px solid var(--primary-color) !important;
}

/* Estilos base do Leaflet - CONSOLIDADO */

/* 🆕 IMPLEMENTAÇÃO: Estilos para popup dos bairros */
.bairro-popup .leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border: none;
}

.bairro-popup .leaflet-popup-content {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding: 15px;
    border-radius: 8px;
    background: white;
    max-height: none;
    line-height: 1.3;
}

.bairro-popup h3 {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-size: 15px;
    border-bottom: 2px solid #27ae60;
    padding-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.bairro-popup h4 {
    margin: 12px 0 6px 0;
    color: #2c3e50;
    font-size: 13px;
    border-bottom: 1px solid #eee;
    padding-bottom: 4px;
}

.bairro-popup .popup-info-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.bairro-popup .popup-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    border-bottom: 1px solid #f0f0f0;
}

.bairro-popup .popup-info-item:last-child {
    border-bottom: none;
}

.bairro-popup .popup-label {
    font-weight: 500;
    color: #2c3e50;
    font-size: 12px;
}

.bairro-popup .popup-value {
    font-weight: 600;
    color: #27ae60;
    font-size: 12px;
    text-align: right;
    min-width: 80px;
}

.bairro-popup .popup-current-view {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    background: rgba(39, 174, 96, 0.1);
    border-radius: 6px;
    border-left: 4px solid #27ae60;
    margin-bottom: 12px;
}

.bairro-popup .popup-value.highlight {
    font-weight: 700;
    color: #27ae60;
    font-size: 13px;
}

.bairro-popup .popup-section {
    margin-bottom: 12px;
}

.bairro-popup .popup-section h4 {
    color: #27ae60;
    margin: 12px 0 8px 0;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 🆕 IMPLEMENTAÇÃO: Estilos para tabela TOP10 dos bairros */
.bairro-popup .top10-table {
    margin-top: 8px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.bairro-popup .top10-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

.bairro-popup .top10-table th {
    background: #27ae60;
    color: white;
    padding: 6px 4px;
    text-align: center;
    font-weight: 600;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bairro-popup .top10-table td {
    padding: 4px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
    font-size: 10px;
}

.bairro-popup .top10-table tr:nth-child(even) {
    background: rgba(39, 174, 96, 0.05);
}

.bairro-popup .top10-table tr:hover {
    background: rgba(39, 174, 96, 0.1);
}

.bairro-popup .top10-table .posicao {
    font-weight: 700;
    color: #27ae60;
    width: 50px;
}

.bairro-popup .top10-table .tipo {
    text-align: left;
    font-weight: 500;
    color: #2c3e50;
    padding-left: 6px;
}

.bairro-popup .top10-table .total {
    font-weight: 600;
    color: #27ae60;
    width: 70px;
}

/* 🆕 IMPLEMENTAÇÃO: Estilos para popup das regionais */
.regional-popup .leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border: none;
}

.regional-popup .leaflet-popup-content {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding: 15px;
    border-radius: 8px;
    background: white;
    max-height: none;
    line-height: 1.3;
}

.regional-popup h3 {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-size: 15px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.regional-popup h4 {
    margin: 12px 0 6px 0;
    color: #2c3e50;
    font-size: 13px;
    border-bottom: 1px solid #eee;
    padding-bottom: 4px;
}

.regional-popup .popup-info-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.regional-popup .popup-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    border-bottom: 1px solid #f0f0f0;
}

.regional-popup .popup-info-item:last-child {
    border-bottom: none;
}

.regional-popup .popup-label {
    font-weight: 500;
    color: #2c3e50;
    font-size: 12px;
}

.regional-popup .popup-value {
    font-weight: 600;
    color: #3498db;
    font-size: 12px;
    text-align: right;
    min-width: 80px;
}

.regional-popup .popup-current-view {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 6px;
    border-left: 4px solid #3498db;
    margin-bottom: 12px;
}

.regional-popup .popup-value.highlight {
    font-weight: 700;
    color: #3498db;
    font-size: 13px;
}

.regional-popup .popup-section {
    margin-bottom: 12px;
}

.regional-popup .popup-section h4 {
    color: #3498db;
    margin: 12px 0 8px 0;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 🆕 IMPLEMENTAÇÃO: Estilos para tabela TOP10 das regionais */
.regional-popup .top10-table {
    margin-top: 8px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.regional-popup .top10-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

.regional-popup .top10-table th {
    background: #3498db;
    color: white;
    padding: 6px 4px;
    text-align: center;
    font-weight: 600;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.regional-popup .top10-table td {
    padding: 4px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
    font-size: 10px;
}

.regional-popup .top10-table tr:nth-child(even) {
    background: rgba(52, 152, 219, 0.05);
}

.regional-popup .top10-table tr:hover {
    background: rgba(52, 152, 219, 0.1);
}

.regional-popup .top10-table .posicao {
    font-weight: 700;
    color: #3498db;
    width: 50px;
}

.regional-popup .top10-table .tipo {
    text-align: left;
    font-weight: 500;
    color: #2c3e50;
    padding-left: 6px;
}

.regional-popup .top10-table .total {
    font-weight: 600;
    color: #3498db;
    width: 70px;
}


.tab-content {
    position: relative;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 🆕 IMPLEMENTAÇÃO: Melhorar posicionamento do botão X do popup */
.leaflet-popup-close-button {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    width: 24px !important;
    height: 24px !important;
    padding: 0 !important;
    margin: 0 !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid #ddd !important;
    border-radius: 50% !important;
    font-size: 16px !important;
    font-weight: bold !important;
    color: #666 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    z-index: 1000 !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.leaflet-popup-close-button:hover {
    background: rgba(255, 255, 255, 1) !important;
    color: #333 !important;
    border-color: #999 !important;
    transform: scale(1.1) !important;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15) !important;
}

.leaflet-popup-close-button:active {
    transform: scale(0.95) !important;
}

/* Melhorar posicionamento específico para popups regionais */
.regional-popup .leaflet-popup-close-button {
    background: rgba(52, 152, 219, 0.1) !important;
    border-color: #3498db !important;
    color: #3498db !important;
}

.regional-popup .leaflet-popup-close-button:hover {
    background: rgba(52, 152, 219, 0.2) !important;
    color: #2980b9 !important;
    border-color: #2980b9 !important;
}

/* Melhorar posicionamento específico para popups de bairros */
.bairro-popup .leaflet-popup-close-button {
    background: rgba(39, 174, 96, 0.1) !important;
    border-color: #27ae60 !important;
    color: #27ae60 !important;
}

.bairro-popup .leaflet-popup-close-button:hover {
    background: rgba(39, 174, 96, 0.2) !important;
    color: #229954 !important;
    border-color: #229954 !important;
}

/* ===== POPUP TOP 10 OCORRÊNCIAS ===== */

/* Estilos para o popup de ocorrências seguindo o design limpo dos bairros */
.popup-content {
    /*background: white;*/
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    min-width: 200px;
}

.popup-content h3 {
    margin: 0 0 15px 0;
    color: var(--primary-color);
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.popup-content h3 i {
    color: var(--accent-color);
    font-size: 18px;
}

.popup-content h4 {
    color: var(--secondary-color);
    margin: 15px 0 10px 0;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.popup-content h4 i {
    color: var(--accent-color);
    font-size: 16px;
}

.popup-content p {
    margin: 8px 0;
    color: #666;
    line-height: 1.4;
}

.popup-content em {
    color: #999;
    font-size: 12px;
    font-style: italic;
}

/* Estilos específicos do Leaflet para o popup de ocorrências */
.leaflet-popup-content-wrapper.popup-content,
.leaflet-popup-content.popup-content {
    background: white !important;
    border: none !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
    border-radius: 8px !important;
    padding: 0 !important;
    margin: 0 !important;
}

.leaflet-popup-tip.popup-content {
    background: white !important;
    border: none !important;
    box-shadow: none !important;
}

/* ===== ESTILOS ESPECÍFICOS PARA POPUPS DOS BAIRROS ===== */

/* Popup de classificação dos bairros */
.popup-content .popup-section {
    margin: 15px 0;
}

.popup-content .popup-section-title {
    font-weight: 600;
    color: var(--secondary-color);
    margin: 15px 0 10px 0;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.popup-content .popup-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 13px;
}

.popup-content .popup-info-item:last-child {
    border-bottom: none;
}

.popup-content .popup-label {
    color: #555;
    font-weight: 500;
    flex: 1;
}

.popup-content .popup-value {
    color: var(--primary-color);
    font-weight: 600;
    text-align: right;
    min-width: 60px;
}

/* Estilos específicos para TOP 10 ocorrências */
.popup-content .top-ocorrencia {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.popup-content .top-ocorrencia:last-child {
    border-bottom: none;
}

.popup-content .top-ocorrencia .popup-label {
    font-size: 12px;
    line-height: 1.3;
}

.popup-content .top-ocorrencia .popup-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--success-color);
}

/* Popup de carregamento */
.popup-content .fa-spinner {
    color: var(--accent-color);
    margin-right: 8px;
}

/* Responsividade para popups */
@media (max-width: 480px) {
    .popup-content {
        min-width: 280px;
        padding: 12px;
    }
    
    .popup-content h3 {
        font-size: 14px;
    }
    
    .popup-content h4 {
        font-size: 12px;
    }
    
    .popup-content .popup-info-item {
        font-size: 12px;
        padding: 6px 0;
    }
}

/* 🆕 IMPLEMENTAÇÃO: Estilos para mensagem de seleção de regional */
.regional-selection-message {
    margin-top: 15px;
    padding: 12px;
    background-color: #e3f2fd;
    border: 1px solid #2196f3;
    border-radius: 8px;
    text-align: center;
}

.regional-selection-message .message-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #1976d2;
    font-weight: 500;
    font-size: 14px;
}

.regional-selection-message i {
    font-size: 16px;
    color: #2196f3;
}

.regional-selection-message span {
    line-height: 1.4;
}

/* 🆕 IMPLEMENTAÇÃO: Estilos para legenda fixa dos quartis no menu lateral */
.sidebar-legend {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

/* 🗳️ IMPLEMENTAÇÃO: Estilos para controles de eleições */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: color 0.2s ease;
}

.radio-label:hover {
    color: #007bff;
}

.radio-label input[type="radio"] {
    margin-right: 8px;
    cursor: pointer;
}

.radio-mark {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ccc;
    border-radius: 50%;
    margin-right: 8px;
    position: relative;
    transition: border-color 0.2s ease;
}

.radio-label input[type="radio"]:checked + .radio-mark {
    border-color: #007bff;
}

.radio-label input[type="radio"]:checked + .radio-mark::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background-color: #007bff;
    border-radius: 50%;
}

/* 🗳️ IMPLEMENTAÇÃO: Estilos para legenda das eleições */
.eleicoes-heatmap-legend {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-width: 250px;
    max-width: 300px;
}

.eleicoes-heatmap-legend h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    border-bottom: 2px solid #007bff;
    padding-bottom: 8px;
}

.eleicoes-heatmap-legend .legend-content {
    margin-bottom: 15px;
}

.eleicoes-heatmap-legend .legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
}

.eleicoes-heatmap-legend .legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    margin-right: 10px;
    border: 1px solid #ddd;
}

.eleicoes-heatmap-legend .legend-info {
    text-align: center;
    color: #666;
    font-size: 11px;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

/* 🗳️ IMPLEMENTAÇÃO: Estilos responsivos para eleições */
@media (max-width: 768px) {
    .eleicoes-heatmap-legend {
        min-width: 200px;
        max-width: 250px;
        font-size: 12px;
    }
    
    .eleicoes-heatmap-legend h4 {
        font-size: 14px;
    }
    
    .eleicoes-heatmap-legend .legend-item {
        font-size: 12px;
    }
}

/* 🏆 IMPLEMENTAÇÃO: Estilos para popup TOP10 - Tipo de Ocorrência (baseado no projeto inicial) */
.popup-content {
    max-width: 400px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding: 20px;
    border-radius: 8px;
    background: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.leaflet-popup-content-wrapper {
    padding: 0;
    border-radius: 8px;
    background: transparent;
    box-shadow: none;
    min-width: 400px;
}

.leaflet-popup-content {
    margin: 0;
    min-width: 400px;
}

.leaflet-popup-tip {
    background: white;
}

.leaflet-popup-close-button {
    color: #666;
    font-size: 18px;
    padding: 5px;
    right: 5px;
    top: 5px;
}

.leaflet-popup-close-button:hover {
    color: #333;
}

.popup-content h3 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 16px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.popup-content h4 {
    margin: 15px 0 8px 0;
    color: #2c3e50;
    font-size: 14px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.popup-content p {
    margin: 8px 0;
    font-size: 13px;
    line-height: 1.5;
}

.popup-content strong {
    color: #2c3e50;
    font-weight: 500;
}

/* Estilos para tabela TOP 10 */
.top10-table {
    max-height: none;
    overflow-y: visible;
}

.top10-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.top10-table th,
.top10-table td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.top10-table th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #495057;
}

.top10-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.top10-table tr:hover {
    background-color: #e9ecef;
}

/* Responsividade para popup TOP10 */
@media (max-width: 768px) {
    .popup-content {
        max-width: 350px;
        padding: 15px;
    }
    
    .popup-content h3 {
        font-size: 14px;
    }
    
    .popup-content h4 {
        font-size: 12px;
    }
    
    .top10-table table {
        font-size: 11px;
    }
    
    .top10-table th,
    .top10-table td {
        padding: 6px;
    }
}

.sidebar-legend h4 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-legend h4 i {
    color: #007bff;
    font-size: 16px;
}

.sidebar-legend .legend-content {
    margin-bottom: 12px;
}

.sidebar-legend .legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 12px;
    line-height: 1.3;
}

.sidebar-legend .legend-item:last-child {
    margin-bottom: 0;
}

.sidebar-legend .legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    margin-right: 10px;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.sidebar-legend .legend-text {
    color: #495057;
    flex: 1;
}

.sidebar-legend .legend-text strong {
    color: #212529;
    font-weight: 600;
}

.sidebar-legend .legend-info {
    padding: 8px;
    background-color: #e3f2fd;
    border-radius: 4px;
    border-left: 3px solid #2196f3;
}

.sidebar-legend .legend-info small {
    color: #1976d2;
    font-size: 11px;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sidebar-legend .legend-info i {
    color: #2196f3;
    font-size: 12px;
}

/* Responsividade para a legenda */
@media (max-width: 768px) {
    .sidebar-legend {
        padding: 12px;
        margin-top: 15px;
    }
    
    .sidebar-legend h4 {
        font-size: 13px;
    }
    
    .sidebar-legend .legend-item {
        font-size: 11px;
    }
    
    .sidebar-legend .legend-color {
        width: 14px;
        height: 14px;
        margin-right: 8px;
    }
}

/* ===== ESTILOS PARA LEGENDAS FLUTUANTES DAS ELEIÇÕES ===== */

.eleicoes-legend {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #007bff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 300px;
    max-width: 400px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    backdrop-filter: blur(10px);
    cursor: move;
    user-select: none;
}

.eleicoes-legend .legend-header {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 12px 15px;
    border-radius: 6px 6px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
}

.eleicoes-legend .legend-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.eleicoes-legend .legend-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.2s ease;
}

.eleicoes-legend .legend-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.eleicoes-legend .legend-content {
    padding: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.eleicoes-legend .ranking-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.eleicoes-legend .ranking-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #007bff;
    transition: all 0.2s ease;
}

.eleicoes-legend .ranking-item:hover {
    background: #e9ecef;
    transform: translateX(2px);
}

.eleicoes-legend .ranking-item.top-3 {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border-left-color: #ffc107;
    font-weight: 600;
}

.eleicoes-legend .ranking-item .rank {
    font-size: 16px;
    min-width: 30px;
    text-align: center;
    font-weight: bold;
}

.eleicoes-legend .ranking-item .name {
    flex: 1;
    font-size: 13px;
    color: #333;
    font-weight: 500;
}

.eleicoes-legend .ranking-item .votes {
    font-size: 12px;
    color: #007bff;
    font-weight: 600;
    background: rgba(0, 123, 255, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
}

/* Responsividade para legendas das eleições */
@media (max-width: 768px) {
    .eleicoes-legend {
        top: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
    }
    
    .eleicoes-legend .legend-header h4 {
        font-size: 13px;
    }
    
    .eleicoes-legend .ranking-item .name {
        font-size: 12px;
    }
    
    .eleicoes-legend .ranking-item .votes {
        font-size: 11px;
    }
}

/* ===== ESTILOS PARA POPUP FLUTUANTE DAS ELEIÇÕES ===== */

.floating-eleicoes-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.98);
    border: 2px solid #007bff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    min-width: 600px;
    max-width: 800px;
    max-height: 80vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    backdrop-filter: blur(15px);
    cursor: move;
    user-select: none;
    opacity: 0;
    transition: all 0.3s ease;
}

/* Estado de arrastando */
.floating-eleicoes-popup.dragging {
    cursor: grabbing !important;
    user-select: none !important;
    pointer-events: all !important;
}

/* Garantir que o conteúdo interno possa ser selecionado quando não está sendo arrastado */
.floating-eleicoes-popup:not(.dragging) .tab-content,
.floating-eleicoes-popup:not(.dragging) .votos-list,
.floating-eleicoes-popup:not(.dragging) .scrollable-list {
    user-select: auto;
    cursor: default;
}

.floating-eleicoes-popup.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.floating-eleicoes-popup .popup-header {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 15px 20px;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
    user-select: none;
}

.floating-eleicoes-popup .popup-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.floating-eleicoes-popup .popup-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.2s ease;
}

.floating-eleicoes-popup .popup-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.floating-eleicoes-popup .popup-tabs {
    padding: 0;
}

.floating-eleicoes-popup .tab-buttons {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    border-radius: 0;
}

.floating-eleicoes-popup .tab-btn {
    flex: 1;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.floating-eleicoes-popup .tab-btn:hover {
    background: #e9ecef;
    color: #495057;
}

.floating-eleicoes-popup .tab-btn.active {
    background: #007bff;
    color: white;
    border-bottom: 3px solid #0056b3;
}

.floating-eleicoes-popup .tab-content {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.floating-eleicoes-popup .tab-pane {
    display: none;
}

.floating-eleicoes-popup .tab-pane.active {
    display: block;
}

.floating-eleicoes-popup .tab-pane h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Lista com scroll para bairros */
.floating-eleicoes-popup .scrollable-list {
    max-height: 600px;
    overflow-y: auto;
    padding-right: 8px;
    min-height: 200px;
    /* Garantir que o scroll funcione corretamente */
    overflow-x: hidden;
    position: relative;
}

.floating-eleicoes-popup .scrollable-list::-webkit-scrollbar {
    width: 8px;
}

.floating-eleicoes-popup .scrollable-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.floating-eleicoes-popup .scrollable-list::-webkit-scrollbar-thumb {
    background: #007bff;
    border-radius: 4px;
}

.floating-eleicoes-popup .scrollable-list::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

.floating-eleicoes-popup .votos-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.floating-eleicoes-popup .voto-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007bff;
    transition: all 0.2s ease;
}

.floating-eleicoes-popup .voto-item:hover {
    background: #e9ecef;
    transform: translateX(2px);
}

.floating-eleicoes-popup .voto-item.top-5 {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border-left-color: #ffc107;
    font-weight: 600;
}

.floating-eleicoes-popup .voto-rank {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 50px;
}

.floating-eleicoes-popup .rank-emoji {
    font-size: 18px;
}

.floating-eleicoes-popup .rank-number {
    font-size: 14px;
    font-weight: bold;
    color: #007bff;
}

.floating-eleicoes-popup .bairro-nome {
    flex: 1;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.floating-eleicoes-popup .voto-count {
    font-size: 13px;
    color: #007bff;
    font-weight: 600;
    background: rgba(0, 123, 255, 0.1);
    padding: 6px 12px;
    border-radius: 6px;
}

/* Responsividade para popup flutuante */
@media (max-width: 768px) {
    .floating-eleicoes-popup {
        min-width: 90vw;
        max-width: 95vw;
        max-height: 85vh;
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .floating-eleicoes-popup.show {
        transform: translateX(-50%) scale(1);
    }
    
    .floating-eleicoes-popup .tab-content {
        max-height: 50vh;
        padding: 15px;
    }
    
    .floating-eleicoes-popup .scrollable-list {
        max-height: 300px;
    }
    
    .floating-eleicoes-popup .tab-btn {
        padding: 10px 12px;
        font-size: 13px;
    }
}

/* ===== ESTILOS PARA POPUP DAS ELEIÇÕES ===== */

/* POPUP PRINCIPAL - ALTO Z-INDEX E ESPECIFICIDADE */
.eleicoes-popup,
.leaflet-popup.eleicoes-popup,
.leaflet-popup-pane .eleicoes-popup {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
    border: none;
    z-index: 99999 !important;
    position: relative !important;
}

/* Estilos específicos para o popup das eleições - SEM CONFLITOS */
.eleicoes-popup .leaflet-popup-content-wrapper,
.leaflet-popup.eleicoes-popup .leaflet-popup-content-wrapper {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    min-width: auto !important;
    z-index: 99999 !important;
}

.eleicoes-popup .leaflet-popup-content,
.leaflet-popup.eleicoes-popup .leaflet-popup-content {
    background: transparent !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    min-width: auto !important;
    z-index: 99999 !important;
}

.eleicoes-popup .leaflet-popup-tip,
.leaflet-popup.eleicoes-popup .leaflet-popup-tip {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    z-index: 99999 !important;
}

.eleicoes-popup .leaflet-popup-close-button,
.leaflet-popup.eleicoes-popup .leaflet-popup-close-button {
    display: none !important;
}

.eleicoes-popup-content {
    padding: 0;
    min-width: 550px;
    max-width: 700px;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    z-index: 99999;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 16px 16px 0 0;
    margin: -20px -20px 0 -20px;
    position: relative;
    overflow: hidden;
    z-index: 99999;
}

.popup-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.popup-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 1;
    position: relative;
}

.popup-header h3 i {
    color: #ffd700;
    font-size: 24px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.popup-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 1;
    position: relative;
}

.popup-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}


.votos-list {
    max-height: 280px;
    overflow-y: auto;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
}

.votos-list::-webkit-scrollbar {
    width: 8px;
}

.votos-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.votos-list::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 4px;
}

.votos-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
}

.voto-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.voto-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.voto-item:hover::before {
    transform: scaleY(1);
}

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

.voto-item:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.bairro-nome,
.regional-nome {
    font-weight: 600;
    color: #212529;
    flex: 1;
    font-size: 15px;
    position: relative;
    z-index: 1;
}

.voto-count {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 700;
    min-width: 100px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.voto-count::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.voto-count:hover::before {
    left: 100%;
}

.voto-count:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.regional-bairros {
    margin-top: 8px;
    color: #6c757d;
    font-size: 12px;
    line-height: 1.4;
    font-style: italic;
    background: rgba(102, 126, 234, 0.1);
    padding: 6px 12px;
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

/* Responsividade para o popup das eleições */
@media (max-width: 768px) {
    .eleicoes-popup-content {
        min-width: 400px;
        max-width: 450px;
    }
    
    .popup-header {
        padding: 15px 20px;
    }
    
    .popup-header h3 {
        font-size: 18px;
    }
    
    
    .votos-list {
        max-height: 250px;
    }
    
    .voto-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 20px;
    }
    
    .voto-count {
        align-self: flex-end;
        margin-top: 5px;
    }
    
    .tab-pane {
        padding: 20px;
    }
}

/* ===== CONTROLE DE Z-INDEX PARA EVITAR SOBREPOSIÇÕES ===== */

/* Garantir que o popup das eleições fique sempre no topo */
.leaflet-popup-pane .eleicoes-popup,
.leaflet-popup-pane .leaflet-popup.eleicoes-popup {
    z-index: 99999 !important;
}

/* REGRA CRÍTICA: Forçar popup das eleições acima de TUDO */
.eleicoes-popup,
.leaflet-popup.eleicoes-popup,
.leaflet-popup-pane .eleicoes-popup,
.leaflet-popup-pane .leaflet-popup.eleicoes-popup {
    z-index: 99999 !important;
    position: relative !important;
}

/* Garantir que o conteúdo interno também tenha z-index alto */
.eleicoes-popup *,
.leaflet-popup.eleicoes-popup * {
    position: relative;
    z-index: 99999;
}

/* ===== ESTILOS PARA MODAL DAS ELEIÇÕES ===== */

.eleicoes-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.eleicoes-modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.eleicoes-modal.show .modal-content {
    transform: scale(1);
}

/* Modal body removido - não é mais necessário */

/* Responsividade para o modal */
@media (max-width: 768px) {
    .modal-content {
        max-width: 95vw;
        max-height: 95vh;
        margin: 10px;
    }
    
    /* Estilos responsivos do modal simplificados */
}

/* ===== ESTILOS PARA NOVOS ELEMENTOS DO POPUP ===== */

/* Ranking e emojis */
.voto-rank {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 60px;
}

.rank-emoji {
    font-size: 18px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.rank-number {
    font-size: 14px;
    font-weight: 600;
    color: #6c757d;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 12px;
    min-width: 20px;
    text-align: center;
}

/* Itens destacados */
.voto-item.top-5 {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-left: 4px solid #ffc107;
}

.voto-item.top-3 {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    border-left: 4px solid #17a2b8;
}

/* Informações regionais */
.regional-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.regional-bairros {
    color: #6c757d;
    font-size: 12px;
    line-height: 1.4;
    font-style: italic;
    background: rgba(102, 126, 234, 0.1);
    padding: 4px 10px;
    border-radius: 6px;
    border-left: 2px solid #667eea;
    display: flex;
    align-items: center;
    gap: 6px;
}

.regional-bairros i {
    color: #667eea;
    font-size: 10px;
}

/* Estatísticas */
.estatisticas-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.estatistica-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.estatistica-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.5s;
}

.estatistica-card:hover::before {
    left: 100%;
}

.estatistica-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.estatistica-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.estatistica-content h5 {
    margin: 0 0 8px 0;
    color: #495057;
    font-size: 14px;
    font-weight: 600;
}

.estatistica-valor {
    color: #212529;
    font-size: 18px;
    font-weight: 700;
    display: block;
}

/* Estatísticas detalhadas */
.estatisticas-detalhes {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
}

.estatisticas-detalhes h5 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.estatisticas-detalhes h5 i {
    color: #ffd700;
    font-size: 18px;
}

.top-bairros {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.top-bairro-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.top-bairro-item:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.top-rank {
    font-size: 20px;
    min-width: 30px;
    text-align: center;
}

.top-nome {
    flex: 1;
    font-weight: 600;
    color: #212529;
}

.top-votos {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Responsividade para estatísticas */
@media (max-width: 768px) {
    .estatisticas-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .estatistica-card {
        padding: 15px;
    }
    
    .estatistica-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .estatistica-valor {
        font-size: 16px;
    }
    
    .top-bairro-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        text-align: center;
    }
    
    .top-votos {
        align-self: center;
    }
}

/* ===== SEÇÃO ESPECÍFICA PARA FILTRO POR CATEGORIA - BAIRROS POR REGIONAL ===== */

/* Tooltip para bairros da regional */
.bairro-tooltip-regional-categoria {
    background: white !important;
    border: 2px solid var(--accent-color) !important;
    border-radius: 8px !important;
    padding: 8px 16px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #333 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    text-transform: none !important;
    letter-spacing: 0.3px !important;
    line-height: 1.4 !important;
    width: auto !important;
    min-width: 200px !important;
    max-width: none !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

/* Conteúdo do tooltip */
.bairro-tooltip-regional-categoria .tooltip-content {
    text-align: center;
}

.bairro-tooltip-regional-categoria .tooltip-categoria {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 12px;
    display: block;
    margin: 4px 0;
}

.bairro-tooltip-regional-categoria .tooltip-total {
    color: #28a745;
    font-weight: 700;
    font-size: 14px;
    display: block;
    margin-top: 4px;
}

.bairro-tooltip-regional-categoria .tooltip-zero {
    color: #6c757d;
    font-weight: 600;
    font-size: 14px;
    display: block;
    margin-top: 4px;
}

/* Popup para bairros da regional */
.bairro-popup-regional-categoria {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: none;
    padding: 0;
    max-width: 350px;
}

.bairro-popup-regional-categoria .popup-content {
    padding: 20px;
    border-radius: 12px;
}

.bairro-popup-regional-categoria .popup-title {
    color: var(--primary-color);
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 15px 0;
    text-align: center;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
}

.bairro-popup-regional-categoria .popup-info {
    margin-bottom: 15px;
}

.bairro-popup-regional-categoria .popup-info p {
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.5;
}

.bairro-popup-regional-categoria .popup-info strong {
    color: var(--primary-color);
    font-weight: 600;
}

.bairro-popup-regional-categoria .popup-total {
    color: #28a745;
    font-weight: 700;
    font-size: 16px;
    padding: 4px 8px;
    background: #f8f9fa;
    border-radius: 4px;
    display: inline-block;
}

.bairro-popup-regional-categoria .popup-total.zero {
    color: #6c757d;
    background: #e9ecef;
}

.bairro-popup-regional-categoria .popup-footer {
    text-align: center;
    color: #6c757d;
    font-size: 12px;
    font-style: italic;
    border-top: 1px solid #e9ecef;
    padding-top: 10px;
    margin-top: 15px;
}

/* Responsividade para tooltips e popups regionais */
@media (max-width: 768px) {
    .bairro-tooltip-regional-categoria {
        min-width: 180px !important;
        font-size: 12px !important;
        padding: 6px 12px !important;
    }
    
    .bairro-popup-regional-categoria {
        max-width: 300px;
    }
    
    .bairro-popup-regional-categoria .popup-content {
        padding: 15px;
    }
    
    .bairro-popup-regional-categoria .popup-title {
        font-size: 16px;
    }
}

/* ===== ESTILOS PARA LEGENDA DOS QUARTIS - DIREITOS HUMANOS ===== */

/* Legenda fixa na sidebar */
.legenda-quartis-sidebar {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px solid #3498db;
    border-radius: 10px;
    padding: 15px;
    margin-top: 15px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.15);
    transition: all 0.3s ease;
}

.legenda-quartis-sidebar:hover {
    border-color: #2980b9;
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.25);
}

.legenda-quartis-sidebar .legend-header {
    margin-bottom: 12px;
    text-align: center;
}

.legenda-quartis-sidebar .legend-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.legenda-quartis-sidebar .legend-items {
    margin-bottom: 12px;
}

.legenda-quartis-sidebar .legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 12px;
    color: #2c3e50;
    font-weight: 500;
}

.legenda-quartis-sidebar .legend-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-right: 10px;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    flex-shrink: 0;
}

.legenda-quartis-sidebar .legend-footer {
    text-align: center;
    padding-top: 8px;
    border-top: 1px solid #dee2e6;
}

.legenda-quartis-sidebar .legend-footer small {
    color: #6c757d;
    font-size: 10px;
    line-height: 1.3;
    font-weight: 500;
}

/* Legenda dos quartis para equipamentos de assistência social (REMOVIDA DO MAPA) */
.quartis-legend {
    display: none !important; /* Ocultar legenda flutuante */
}

.quartis-legend .legend-header {
    margin-bottom: 12px;
    text-align: center;
}

.quartis-legend .legend-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--secondary-color);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 8px;
}

.quartis-legend .legend-items {
    margin-bottom: 12px;
}

.quartis-legend .legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 12px;
    color: #333;
}

.quartis-legend .legend-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-right: 10px;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    flex-shrink: 0;
}

.quartis-legend .legend-footer {
    text-align: center;
    padding-top: 8px;
    border-top: 1px solid #e9ecef;
}

.quartis-legend .legend-footer small {
    color: #6c757d;
    font-size: 10px;
    line-height: 1.3;
}

/* Responsividade para legenda dos quartis */
@media (max-width: 768px) {
    .quartis-legend {
        bottom: 10px;
        right: 10px;
        max-width: 200px;
        padding: 12px;
    }
    
    .quartis-legend .legend-header h4 {
        font-size: 13px;
    }
    
    .quartis-legend .legend-item {
        font-size: 11px;
    }
    
    .quartis-legend .legend-color {
        width: 14px;
        height: 14px;
        margin-right: 8px;
    }
    
    .quartis-legend .legend-footer small {
        font-size: 9px;
    }
}

/* ===== ESTILOS PARA DROPDOWN DE EQUIPAMENTOS ===== */

#dropdown-equipamentos {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 2px solid #5a67d8;
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 4px 15px rgba(90, 103, 216, 0.2);
    transition: all 0.3s ease;
}

#dropdown-equipamentos:hover {
    box-shadow: 0 6px 20px rgba(90, 103, 216, 0.3);
    transform: translateY(-2px);
}

#dropdown-equipamentos label {
    color: white;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

#dropdown-equipamentos label i {
    color: #ffd700;
    font-size: 18px;
}

#seletorEquipamento {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    color: #2c3e50;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

#seletorEquipamento:focus {
    outline: none;
    border-color: #ffd700;
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
}

#dropdown-equipamentos small {
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

#dropdown-equipamentos small i {
    color: #ffd700;
}

/* ===== ESTILOS PARA SUB-ABAS DE INFORMAÇÕES ===== */

.info-sub-tabs {
    margin-top: 10px;
}

.info-sub-tab-buttons {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
    overflow-x: auto;
}

.info-sub-tab-button {
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 10px 15px;
    font-size: 13px;
    font-weight: 600;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.info-sub-tab-button:hover {
    color: #495057;
    background: rgba(0, 123, 255, 0.05);
}

.info-sub-tab-button.active {
    color: #007bff;
    border-bottom-color: #007bff;
    background: rgba(0, 123, 255, 0.1);
}

.info-sub-tab-button i {
    font-size: 12px;
}

.info-sub-tab-content {
    min-height: 200px;
}

.info-sub-tab-pane {
    display: none;
    animation: fadeInSubTab 0.3s ease;
}

.info-sub-tab-pane.active {
    display: block;
}

@keyframes fadeInSubTab {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== ESTILOS PARA CONTEÚDO DE ATENDIMENTO E RECLAMAÇÕES ===== */

.loading-content,
.error-content,
.no-data-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: #6c757d;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 10px 0;
}

.loading-content i {
    font-size: 24px;
    margin-bottom: 10px;
    color: #007bff;
}

.error-content {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    color: #e53e3e;
}

.error-content i {
    color: #e53e3e;
}

.error-content small {
    margin-top: 5px;
    font-size: 12px;
    opacity: 0.8;
}

.stats-header {
    margin-bottom: 20px;
}

.stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card.alert {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

.stat-number {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    opacity: 0.9;
    font-weight: 500;
    color: white;
}

/* Estilos para seção de análise de tempos */
.tempo-section {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
}

.tempo-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tempo-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.tempo-label {
    font-size: 13px;
    color: #6c757d;
    font-weight: 500;
}

.tempo-value {
    font-size: 14px;
    font-weight: bold;
    color: #2c3e50;
}

.tempo-value.tempo-espera {
    color: #f39c12;
}

.tempo-value.tempo-atendimento {
    color: #27ae60;
}

/* Estilos para tooltip do PIN */
.pin-tooltip {
    background: rgba(44, 62, 80, 0.95) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    text-align: center !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    max-width: 250px !important;
    line-height: 1.4 !important;
}

.pin-tooltip::before {
    border-top-color: rgba(44, 62, 80, 0.95) !important;
}

/* Tooltip responsivo para mobile */
@media (max-width: 768px) {
    .pin-tooltip {
        font-size: 12px !important;
        padding: 6px 10px !important;
        max-width: 180px !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }
}

/* Estilos para labels de equipamentos (Mostrar Legenda) */
.equipamento-label {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    text-align: center !important;
}

.label-content {
    background: rgba(255, 255, 255, 0.95);
    color: #2c3e50;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    pointer-events: none;
    text-align: center;
    display: block;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    transition: all 0.2s ease;
    /* Posicionar abaixo do PIN - iconAnchor já centraliza horizontalmente */
    margin-top: 20px; /* PIN tem 15px de raio (centro) + 5px de espaçamento */
}

.label-content:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    transform: scale(1.05);
}

/* Label responsivo para mobile */
@media (max-width: 768px) {
    .label-content {
        font-size: 11px;
        padding: 4px 10px;
        max-width: 150px;
    }
}

.atendimento-section,
.reclamacoes-section {
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.atendimento-details,
.reclamacoes-details {
    margin-top: 20px;
}

.atendimento-details h6,
.reclamacoes-details h6 {
    color: #495057;
    margin: 0 0 15px 0;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.table-container {
    overflow-x: auto;
    border: 1px solid #dee2e6;
    border-radius: 6px;
}

.atendimento-table,
.reclamacoes-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.atendimento-table th,
.reclamacoes-table th {
    background: #f8f9fa;
    color: #495057;
    font-weight: 600;
    padding: 12px 8px;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
    font-size: 12px;
}

.atendimento-table td,
.reclamacoes-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: top;
}

.atendimento-table tr:hover,
.reclamacoes-table tr:hover {
    background: #f8f9fa;
}

.number-cell {
    text-align: right;
    font-weight: 600;
}

.number-cell.alert {
    color: #e74c3c;
}

.data-info {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

/* ===== RESPONSIVIDADE PARA SUB-ABAS ===== */

@media (max-width: 768px) {
    .info-sub-tab-buttons {
        gap: 2px;
    }
    
    .info-sub-tab-button {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .stats-summary {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .stat-card {
        padding: 12px;
    }
    
    .stat-number {
        font-size: 20px;
    }
    
    .atendimento-table th,
    .reclamacoes-table th,
    .atendimento-table td,
    .reclamacoes-table td {
        padding: 8px 6px;
        font-size: 12px;
    }
}

/* ============================================
   SISTEMA DE SAÚDE - Estilos
   ============================================ */

/* Pin customizado para sistema de saúde */
.custom-pin-saude {
    background: transparent !important;
    border: none !important;
}

/* Popup do sistema de saúde */
.saude-popup .leaflet-popup-content-wrapper {
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
    border: 2px solid #e9ecef;
    max-width: 450px;
    min-width: 350px;
    padding: 0;
    z-index: 2100 !important;
}

.saude-popup {
    z-index: 2100 !important;
}

.leaflet-popup.saude-popup {
    z-index: 2100 !important;
}

.saude-popup .leaflet-popup-tip {
    background: white;
    border: 2px solid #e9ecef;
}

.saude-popup-content {
    width: 100%;
}

.saude-popup-content .popup-header {
    border-radius: 13px 13px 0 0;
    padding: 0;
}

.saude-popup-content .popup-header h3 {
    margin: 0;
    padding: 15px;
    font-size: 18px;
    font-weight: 700;
}

.saude-popup-content .popup-body {
    background: white;
    border-radius: 0 0 13px 13px;
}

.saude-popup-content .info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.saude-popup-content .info-row:last-child {
    border-bottom: none;
}

.saude-popup-content .info-row strong {
    color: #2c3e50;
    font-weight: 600;
    font-size: 13px;
    min-width: 100px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.saude-popup-content .info-row strong i {
    color: #667eea;
    width: 18px;
}

.saude-popup-content .info-row span {
    color: #555;
    font-size: 13px;
    text-align: right;
    flex: 1;
    word-break: break-word;
}

/* Responsivo para popup de saúde */
@media (max-width: 768px) {
    .saude-popup .leaflet-popup-content-wrapper {
        max-width: 300px;
        min-width: 280px;
    }
    
    .saude-popup-content .popup-header h3 {
        font-size: 16px;
        padding: 12px;
    }
    
    .saude-popup-content .info-row {
        flex-direction: column;
        gap: 5px;
    }
    
    .saude-popup-content .info-row span {
        text-align: left;
    }
}
