        :root {
            --bg-dark: #0f172a;
            --surface-glass: rgba(15, 23, 42, 0.92);
            --text-main: #f8fafc;
            --text-muted: #94a3b8;
            --border-light: rgba(255, 255, 255, 0.12);
            --area-centro: #0284c7;
            --area-este: #9333ea;
            --area-oeste: #059669;
            --area-sur: #d97706;
            --primary: #38bdf8;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
            background-color: var(--bg-dark);
            color: var(--text-main);
            height: 100vh;
            width: 100vw;
            overflow: hidden;
            display: flex;
        }

        #map {
            flex: 1;
            height: 100%;
            width: 100%;
            background-color: #e2e8f0;
            z-index: 1;
        }

        /* Animación de Parpadeo Luminoso para Efectores y Polígonos */
        @keyframes markerPulseBlink {
            0%, 100% {
                transform: scale(1);
                filter: drop-shadow(0 0 0 rgba(255, 255, 255, 0));
                opacity: 1;
            }
            50% {
                transform: scale(1.6);
                filter: drop-shadow(0 0 18px #ffffff) drop-shadow(0 0 30px #f97316);
                opacity: 1;
            }
        }

        .marker-blinking {
            animation: markerPulseBlink 0.45s ease-in-out 6 !important;
            z-index: 999999 !important;
        }

        /* Panel Lateral (Sidebar) */
        .sidebar {
            position: absolute;
            top: 20px;
            left: 20px;
            bottom: 20px;
            width: 410px;
            max-width: calc(100vw - 40px);
            background: var(--surface-glass);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border: 1px solid var(--border-light);
            border-radius: 20px;
            box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.7);
            z-index: 1000;
            display: flex;
            flex-direction: column;
            transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
            overflow: hidden;
        }

        .sidebar.collapsed {
            transform: translateX(-440px);
        }

        .sidebar-toggle-btn {
            position: absolute;
            left: calc(100% + 12px);
            top: 20px;
            width: 44px;
            height: 44px;
            background: var(--surface-glass);
            backdrop-filter: blur(10px);
            border: 1px solid var(--border-light);
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            color: var(--primary);
            font-size: 1.2rem;
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
            transition: all 0.2s ease;
        }

        .sidebar-toggle-btn:hover {
            background: var(--primary);
            color: #ffffff;
            transform: scale(1.05);
        }

        .sidebar-header {
            padding: 22px 24px 16px 24px;
            border-bottom: 1px solid var(--border-light);
            background: linear-gradient(180deg, rgba(56, 189, 248, 0.1) 0%, transparent 100%);
        }

        .badge-pill {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            background: rgba(56, 189, 248, 0.18);
            border: 1px solid rgba(56, 189, 248, 0.35);
            color: #7dd3fc;
            padding: 4px 10px;
            border-radius: 9999px;
            font-size: 0.75rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            margin-bottom: 8px;
        }

        .badge-pill::before {
            content: '';
            width: 6px;
            height: 6px;
            background: #38bdf8;
            border-radius: 50%;
            box-shadow: 0 0 8px #38bdf8;
        }

        .sidebar-header h1 {
            font-size: 1.35rem;
            font-weight: 800;
            color: #ffffff;
            line-height: 1.2;
            letter-spacing: -0.02em;
        }

        .sidebar-header p {
            font-size: 0.8rem;
            color: var(--text-muted);
            margin-top: 4px;
        }

        /* Selector de Áreas Programáticas */
        .areas-tabs {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 6px;
            padding: 12px 18px 6px 18px;
        }

        .area-tab-btn {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid var(--border-light);
            border-radius: 10px;
            padding: 8px 4px;
            color: #cbd5e1;
            font-size: 0.75rem;
            font-weight: 700;
            cursor: pointer;
            text-align: center;
            transition: all 0.2s ease;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
        }

        .area-tab-btn .dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
        }

        .area-tab-btn[data-area="todas"] .dot { background: #94a3b8; }
        .area-tab-btn[data-area="centro"] .dot { background: var(--area-centro); box-shadow: 0 0 6px var(--area-centro); }
        .area-tab-btn[data-area="este"] .dot { background: var(--area-este); box-shadow: 0 0 6px var(--area-este); }
        .area-tab-btn[data-area="oeste"] .dot { background: var(--area-oeste); box-shadow: 0 0 6px var(--area-oeste); }
        .area-tab-btn[data-area="sur"] .dot { background: var(--area-sur); box-shadow: 0 0 6px var(--area-sur); }

        .area-tab-btn:hover {
            background: rgba(255, 255, 255, 0.12);
            color: #ffffff;
        }

        .area-tab-btn.active {
            background: rgba(255, 255, 255, 0.18);
            border-color: #ffffff;
            color: #ffffff;
            box-shadow: 0 0 12px rgba(255, 255, 255, 0.15);
        }

        /* Filtro de Categorías de Establecimientos */
        .category-filters {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            padding: 6px 18px;
        }

        .category-filters::-webkit-scrollbar {
            display: none;
        }

        .cat-chip {
            padding: 5px 10px;
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid var(--border-light);
            font-size: 0.75rem;
            font-weight: 600;
            color: #cbd5e1;
            cursor: pointer;
            white-space: nowrap;
            transition: all 0.2s ease;
        }

        .cat-chip:hover, .cat-chip.active {
            background: #0284c7;
            border-color: #38bdf8;
            color: #ffffff;
        }

        /* Buscador */
        .search-box {
            padding: 8px 18px;
        }

        .search-input-wrapper {
            position: relative;
            display: flex;
            align-items: center;
        }

        .search-input-wrapper svg {
            position: absolute;
            left: 12px;
            width: 16px;
            height: 16px;
            fill: none;
            stroke: var(--text-muted);
            stroke-width: 2;
        }

        .search-input {
            width: 100%;
            padding: 10px 12px 10px 38px;
            background: rgba(15, 23, 42, 0.65);
            border: 1px solid var(--border-light);
            border-radius: 10px;
            color: var(--text-main);
            font-size: 0.85rem;
            font-family: inherit;
            outline: none;
            transition: all 0.2s ease;
        }

        .search-input:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
        }

        /* Contador de resultados */
        .results-count {
            padding: 4px 18px 8px 18px;
            font-size: 0.75rem;
            color: var(--text-muted);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        /* Lista de Efectores */
        .efectores-list {
            flex: 1;
            overflow-y: auto;
            padding: 4px 14px;
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .efectores-list::-webkit-scrollbar {
            width: 5px;
        }
        .efectores-list::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.18);
            border-radius: 4px;
        }

        .efector-card {
            padding: 10px 14px;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.06);
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.2s ease;
            position: relative;
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .efector-card:hover {
            background: rgba(56, 189, 248, 0.12);
            border-color: rgba(56, 189, 248, 0.4);
            transform: translateX(4px);
        }

        .efector-card.active {
            background: rgba(56, 189, 248, 0.22);
            border-color: #38bdf8;
            box-shadow: 0 0 14px rgba(56, 189, 248, 0.35);
        }

        .efector-card-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 8px;
        }

        .efector-name {
            font-size: 0.88rem;
            font-weight: 700;
            color: #ffffff;
            line-height: 1.25;
        }

        .efector-badge {
            font-size: 0.68rem;
            font-weight: 700;
            padding: 2px 6px;
            border-radius: 6px;
            color: #ffffff;
            white-space: nowrap;
        }

        .efector-card-details {
            font-size: 0.75rem;
            color: var(--text-muted);
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        /* Footer de la Sidebar y enlaces PDF oficiales */
        .sidebar-footer {
            padding: 14px 18px;
            border-top: 1px solid var(--border-light);
            background: rgba(15, 23, 42, 0.5);
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .pdf-links-title {
            font-size: 0.75rem;
            font-weight: 700;
            color: #94a3b8;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        .pdf-report-btn {
            background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
            border: 1px solid rgba(56, 189, 248, 0.4);
            border-radius: 10px;
            padding: 9px 12px;
            color: #ffffff;
            text-decoration: none;
            font-size: 0.82rem;
            font-weight: 700;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
            transition: all 0.2s ease;
            margin-bottom: 4px;
        }

        .pdf-report-btn:hover {
            background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
            transform: translateY(-1px);
            box-shadow: 0 6px 16px rgba(2, 132, 199, 0.5);
            color: #ffffff;
        }

        .pdf-links-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 6px;
        }

        .pdf-link-btn {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid var(--border-light);
            border-radius: 8px;
            padding: 6px 8px;
            color: #e2e8f0;
            text-decoration: none;
            font-size: 0.75rem;
            font-weight: 600;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 4px;
            transition: all 0.2s ease;
        }

        .pdf-link-btn:hover {
            background: rgba(56, 189, 248, 0.2);
            border-color: #38bdf8;
            color: #ffffff;
        }

        /* Controles Superiores Flotantes */
        .top-controls {
            position: absolute;
            top: 20px;
            right: 20px;
            z-index: 1000;
            display: flex;
            gap: 10px;
            align-items: center;
        }

        .control-pill {
            background: var(--surface-glass);
            backdrop-filter: blur(12px);
            border: 1px solid var(--border-light);
            border-radius: 14px;
            padding: 8px 14px;
            display: flex;
            align-items: center;
            gap: 14px;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
            font-size: 0.82rem;
            font-weight: 600;
        }

        .control-pill label {
            display: flex;
            align-items: center;
            gap: 6px;
            cursor: pointer;
            color: #e2e8f0;
            user-select: none;
        }

        .control-pill input[type="checkbox"] {
            accent-color: var(--primary);
            width: 16px;
            height: 16px;
            cursor: pointer;
        }

        .btn-reset {
            background: var(--surface-glass);
            backdrop-filter: blur(12px);
            border: 1px solid var(--border-light);
            border-radius: 14px;
            padding: 8px 14px;
            color: #e2e8f0;
            font-size: 0.82rem;
            font-weight: 600;
            cursor: pointer;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .btn-reset:hover {
            background: var(--primary);
            color: #ffffff;
        }

        /* Ficha Informativa Flotante */
        .info-card-floating {
            position: absolute;
            bottom: 25px;
            right: 25px;
            z-index: 1000;
            width: 340px;
            background: var(--surface-glass);
            backdrop-filter: blur(16px);
            border: 1px solid rgba(56, 189, 248, 0.4);
            border-radius: 16px;
            padding: 20px;
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
            display: none;
            animation: fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(12px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .info-card-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 12px;
        }

        .info-card-title {
            font-size: 1.1rem;
            font-weight: 800;
            color: #ffffff;
            line-height: 1.25;
        }

        .info-card-close {
            background: none;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            font-size: 1.3rem;
            line-height: 1;
        }

        .info-card-close:hover {
            color: #ffffff;
        }

        .info-field {
            display: flex;
            justify-content: space-between;
            padding: 6px 0;
            border-bottom: 1px solid rgba(255, 255, 255, 0.07);
            font-size: 0.82rem;
            gap: 12px;
        }

        .info-field:last-child {
            border-bottom: none;
        }

        .info-label {
            color: var(--text-muted);
            flex-shrink: 0;
        }

        .info-val {
            font-weight: 600;
            color: #fdba74;
            text-align: right;
            word-break: break-word;
        }

        /* Estilos de Iconos de Marcadores */
        .custom-efector-pin {
            width: 22px;
            height: 22px;
            border-radius: 50%;
            border: 2px solid #ffffff;
            box-shadow: 0 2px 6px rgba(0,0,0,0.5);
            display: flex;
            align-items: center;
            justify-content: center;
            color: #ffffff;
            font-size: 10px;
            font-weight: 800;
            transition: all 0.2s ease;
        }

        /* Custom Popup Leaflet */
        .leaflet-popup-content-wrapper {
            background: var(--surface-glass) !important;
            backdrop-filter: blur(12px);
            color: #ffffff !important;
            border: 1px solid rgba(56, 189, 248, 0.5) !important;
            border-radius: 14px !important;
            box-shadow: 0 15px 30px rgba(0,0,0,0.5) !important;
        }

        .leaflet-popup-tip {
            background: var(--surface-glass) !important;
        }

        .popup-title {
            font-size: 1rem;
            font-weight: 800;
            color: #38bdf8;
            margin-bottom: 4px;
        }

        .popup-row {
            font-size: 0.8rem;
            color: #cbd5e1;
            margin-top: 3px;
        }

        /* Cluster Badges */
        .marker-cluster-small, .marker-cluster-medium, .marker-cluster-large {
            background-color: rgba(56, 189, 248, 0.4) !important;
        }
        .marker-cluster-small div, .marker-cluster-medium div, .marker-cluster-large div {
            background-color: #0284c7 !important;
            color: #ffffff !important;
            font-family: 'Inter', sans-serif !important;
            font-weight: 700 !important;
        }

        /* Zoom Control */
        .leaflet-top.leaflet-left {
            left: unset;
            right: 20px;
            top: 80px;
        }

        .leaflet-bar {
            border: 1px solid var(--border-light) !important;
            border-radius: 12px !important;
            overflow: hidden;
            box-shadow: 0 8px 20px rgba(0,0,0,0.4) !important;
        }

        .leaflet-bar a {
            background-color: var(--surface-glass) !important;
            color: #ffffff !important;
            border-bottom: 1px solid var(--border-light) !important;
        }

        .leaflet-bar a:hover {
            background-color: var(--primary) !important;
            color: #ffffff !important;
        }

        @media (max-width: 640px) {
            .sidebar {
                width: calc(100vw - 40px);
            }
            .info-card-floating {
                left: 20px;
                right: 20px;
                width: auto;
                bottom: 20px;
            }
        }
    </style>
