        :root {
            --beige-bg: #FAF8F4;
            --verde-principal: #2E7D32;
            --verde-hover: #1B5E20;
            --texto-gris: #2E2E2E;
            --gris-claro: #E0E0E0;
            --blanco: #FFFFFF;
            --sombra: 0 2px 8px rgba(0, 0, 0, 0.1);
            --border-radius: 12px;
            --glass-bg: rgba(255, 255, 255, 0.7);
            --glass-border: rgba(255, 255, 255, 0.3);
            --rojo-alerta: #d32f2f;
            --azul-info: #1976D2;
            --naranja-ayuda: #F57C00;
        }

        /* Reset básico */
        * {
            box-sizing: border-box;
        }

        html, body {
            margin: 0;
            padding: 0;
        }

        body {
            font-family: 'Poppins', sans-serif;
            margin: 0;
            padding: 0;
            background-color: var(--beige-bg);
            color: var(--texto-gris);
            line-height: 1.6;
            height: 100vh;
            overflow: hidden;
        }


        /* Contenedor del mapa */
        .map-container {
            position: relative;
            height: calc(100vh - 70px); /* Altura de viewport menos header */
            width: 100%;
            overflow: hidden;
        }

        #map {
            height: 100%;
            width: 100%;
            z-index: 1;
        }

        /* Panel de filtros */
        .filters-panel {
            position: absolute;
            top: 20px;
            left: 20px;
            background: rgba(255, 255, 255, 0.95);
            border-radius: 8px;
            box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
            z-index: 500;
            min-width: 240px;
            transition: all 0.3s ease;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(0, 0, 0, 0.06);
        }

        .filters-panel.minimized {
            min-width: auto;
            width: auto;
        }

        .filters-panel.minimized .panel-body {
            display: none;
        }

        /* Header común para todos los paneles - Diseño minimalista */
        .panel-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 8px 14px;
            border-bottom: 1px solid rgba(46, 125, 50, 0.15);
            background: transparent;
        }

        .panel-header h3 {
            margin: 0;
            font-size: 14px;
            font-weight: 600;
            color: var(--verde-principal);
            letter-spacing: 0.3px;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .minimize-btn {
            background: transparent;
            border: 1px solid rgba(46, 125, 50, 0.25);
            color: var(--verde-principal);
            width: 20px;
            height: 20px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 600;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
            line-height: 1;
            padding: 0;
            flex-shrink: 0;
            margin-left: 8px;
            min-width: 20px;
            max-width: 20px;
            min-height: 20px;
            max-height: 20px;
        }

        .minimize-btn:hover {
            background: rgba(46, 125, 50, 0.1);
            border-color: var(--verde-principal);
            transform: scale(1.1);
        }

        .panel-body {
            padding: 12px 14px 14px;
        }

        .filters-title, .controls-title, .stats-title {
            font-size: 13px;
            font-weight: 600;
            margin: 0;
            color: var(--verde-principal);
        }

        .filter-group {
            margin-bottom: 14px;
        }
        
        .filter-group:last-child {
            margin-bottom: 0;
        }

        .filter-label {
            font-size: 11px;
            font-weight: 600;
            color: #666;
            margin-bottom: 8px;
            display: block;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .filter-buttons {
            display: flex;
            gap: 8px;
        }

        .filter-btn {
            flex: 1;
            padding: 6px 12px;
            border: 1px solid var(--gris-claro);
            border-radius: 6px;
            background: white;
            color: var(--texto-gris);
            font-size: 12px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .filter-btn:hover {
            border-color: var(--verde-principal);
            background: rgba(46, 125, 50, 0.05);
        }

        .filter-btn.active {
            background: var(--verde-principal);
            color: white;
            border-color: var(--verde-principal);
        }

        /* Controles del mapa */
        .map-controls {
            position: absolute;
            bottom: 30px;
            right: 30px;
            background: rgba(255, 255, 255, 0.95);
            border-radius: 8px;
            box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
            z-index: 500;
            transition: all 0.3s ease;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(0, 0, 0, 0.06);
        }

        .map-controls.minimized {
            width: auto;
        }

        .map-controls.minimized .panel-body {
            display: none;
        }

        .controls-body {
            display: flex;
            flex-direction: row;
            gap: 8px;
            padding: 8px;
        }

        .control-btn {
            width: 38px;
            height: 38px;
            background: white;
            border-radius: 6px;
            box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-size: 18px;
            transition: all 0.2s ease;
            border: 1px solid rgba(0, 0, 0, 0.06);
        }

        .control-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
            border-color: var(--verde-principal);
        }

        /* Información de estadísticas */
        .stats-panel {
            position: absolute;
            bottom: 30px;
            left: 20px;
            background: rgba(255, 255, 255, 0.95);
            border-radius: 8px;
            box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
            z-index: 500;
            transition: all 0.3s ease;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(0, 0, 0, 0.06);
        }

        .stats-panel.minimized {
            width: auto;
        }

        .stats-panel.minimized .panel-body {
            display: none;
        }

        .stats-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 16px;
        }

        .stat-item {
            text-align: center;
        }

        .stat-number {
            font-size: 24px;
            font-weight: 700;
            color: var(--verde-principal);
            line-height: 1;
            margin-bottom: 4px;
        }

        .stat-label {
            font-size: 11px;
            color: #666;
            font-weight: 500;
            text-transform: uppercase;
            letter-spacing: 0.3px;
        }

        /* Panel lateral de detalles */
        .details-panel {
            position: fixed !important;
            top: 70px !important;
            right: -450px !important; /* Fuera de pantalla con margen extra */
            width: 400px !important;
            max-width: 400px !important;
            height: calc(100vh - 70px) !important;
            background: rgba(255, 255, 255, 0.98);
            box-shadow: -2px 0 20px rgba(0, 0, 0, 0.1);
            border-left: 1px solid rgba(0, 0, 0, 0.05);
            transition: right 0.4s cubic-bezier(0.4, 0.0, 0.2, 1) !important;
            z-index: 10000 !important;
            overflow-y: auto;
            overflow-x: hidden;
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            pointer-events: none !important; /* No clickeable cuando está oculto */
            visibility: hidden !important; /* Oculto por defecto */
            opacity: 0 !important;
        }

        .details-panel.active {
            right: 0 !important;
            pointer-events: auto !important; /* Clickeable cuando está activo */
            visibility: visible !important;
            opacity: 1 !important;
        }

        .details-header {
            background: white;
            padding: 16px 20px;
            border-bottom: 1px solid #f0f0f0;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .details-title {
            font-size: 16px;
            font-weight: 600;
            color: #333;
            line-height: 1.3;
        }

        .close-details {
            width: 24px;
            height: 24px;
            background: #f5f5f5;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 16px;
            color: #666;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }

        .close-details:hover {
            background: #e0e0e0;
            color: #333;
        }

        .details-content {
            padding: 20px;
            background: transparent;
            height: calc(100% - 58px);
            overflow-y: auto;
        }

        .detail-section {
            margin-bottom: 14px;
            background: white;
            padding: 14px;
            border-radius: 8px;
            border: 1px solid #f0f0f0;
            transition: border-color 0.2s ease;
        }

        .detail-section:hover {
            border-color: #e0e0e0;
        }

        .detail-label {
            font-size: 11px;
            color: #666;
            text-transform: uppercase;
            font-weight: 600;
            letter-spacing: 0.5px;
            margin-bottom: 6px;
        }

        .detail-value {
            font-size: 14px;
            color: #333;
            font-weight: 500;
            line-height: 1.4;
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
        }
        
        .profile-link-btn {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 4px 12px;
            background: #4CAF50;
            color: white !important;
            text-decoration: none;
            border-radius: 15px;
            font-size: 12px;
            font-weight: 500;
            transition: all 0.2s ease;
        }
        
        .profile-link-btn:hover {
            background: #45a049;
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
        }
        
        .profile-link-btn i {
            font-size: 11px;
        }

        .status-badge {
            display: inline-block;
            padding: 6px 12px;
            border-radius: 15px;
            font-size: 14px;
            font-weight: 500;
        }

        .status-badge.perdido {
            background: rgba(211, 47, 47, 0.1);
            color: var(--rojo-alerta);
        }

        .status-badge.herido {
            background: rgba(255, 152, 0, 0.1);
            color: #FF6F00;
        }

        .status-badge.abandonado {
            background: rgba(158, 158, 158, 0.1);
            color: #616161;
        }

        .action-buttons {
            display: flex;
            gap: 10px;
            margin-top: 16px;
            padding: 0;
        }

        .action-btn {
            flex: 1;
            padding: 10px 14px;
            border-radius: 6px;
            border: none;
            font-weight: 500;
            font-size: 13px;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .action-btn.primary {
            background: var(--verde-principal);
            color: white;
        }

        .action-btn.primary:hover {
            background: var(--verde-hover);
        }

        .action-btn.secondary {
            background: white;
            color: var(--verde-principal);
            border: 1px solid #ddd;
        }

        .action-btn.secondary:hover {
            background: #f8f8f8;
            border-color: var(--verde-principal);
        }

        /* Leyenda del mapa */
        .map-legend {
            position: absolute;
            bottom: 30px;
            left: 50%;
            transform: translateX(-50%);
            background: white;
            border-radius: var(--border-radius);
            box-shadow: var(--sombra);
            padding: 15px 25px;
            z-index: 500;
            display: flex;
            gap: 20px;
        }

        .legend-item {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 14px;
            color: #666;
        }

        .legend-icon {
            width: 20px;
            height: 20px;
            border-radius: 50%;
        }

        .legend-icon.report {
            background: var(--rojo-alerta);
        }

        .legend-icon.help {
            background: var(--verde-principal);
        }

        /* Marcadores antiguos eliminados - ahora usamos map-pin */

        /* Eliminar fondo rectangular de Leaflet */
        .leaflet-div-icon {
            background: transparent !important;
            border: none !important;
        }

        /* Pin moderno estilo Material Design con animaciones */
        .modern-pin {
            width: 46px;
            height: 60px;
            position: relative;
            cursor: pointer;
            transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
            animation: markerDrop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
        }

        @keyframes markerDrop {
            0% {
                transform: translateY(-200px) scale(0);
                opacity: 0;
            }
            60% {
                transform: translateY(5px) scale(1.1);
                opacity: 1;
            }
            80% {
                transform: translateY(-2px) scale(0.95);
            }
            100% {
                transform: translateY(0) scale(1);
                opacity: 1;
            }
        }

        .modern-pin .pin-head {
            width: 42px;
            height: 42px;
            border-radius: 50% 50% 50% 0;
            transform: rotate(-45deg);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
            position: absolute;
            top: 0;
            left: 2px;
            box-shadow: 
                0 8px 16px rgba(0,0,0,0.2),
                0 3px 6px rgba(0,0,0,0.15),
                inset 0 -2px 4px rgba(0,0,0,0.1);
            border: 3px solid white;
            transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        .modern-pin .pin-head::before {
            content: '';
            position: absolute;
            width: 12px;
            height: 12px;
            background: rgba(255,255,255,0.3);
            border-radius: 50%;
            top: 4px;
            left: 4px;
            transition: all 0.3s ease;
        }

        .modern-pin .pin-head::after {
            content: attr(data-emoji);
            transform: rotate(45deg);
            display: flex;
            align-items: center;
            justify-content: center;
            filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
        }

        /* Anillo de pulso animado */
        .modern-pin::before {
            content: '';
            position: absolute;
            top: 25px;
            left: -3px;
            transform: translate(-50%, -50%);
            width: 50px;
            height: 50px;
            border-radius: 50%;
            opacity: 0;
            animation: pulse 2s ease-out infinite;
        }

        @keyframes pulse {
            0% {
                width: 40px;
                height: 40px;
                opacity: 0.8;
            }
            100% {
                width: 70px;
                height: 70px;
                opacity: 0;
            }
        }

        .modern-pin .pin-tail {
            display: none; /* Removemos la cola tradicional */
        }

        /* Sombra dinámica debajo del pin */
        .modern-pin::after {
            content: '';
            position: absolute;
            bottom: -8px;
            left: 50%;
            transform: translateX(-50%);
            width: 20px;
            height: 8px;
            background: radial-gradient(ellipse at center, rgba(0,0,0,0.3) 0%, transparent 70%);
            border-radius: 50%;
            transition: all 0.3s ease;
        }

        .modern-pin:hover {
            transform: translateY(-8px) scale(1.12);
            z-index: 1000 !important;
        }

        .modern-pin:hover::after {
            width: 26px;
            height: 10px;
            bottom: -10px;
            background: radial-gradient(ellipse at center, rgba(0,0,0,0.4) 0%, transparent 70%);
        }

        .modern-pin:hover .pin-head {
            box-shadow: 
                0 12px 28px rgba(0,0,0,0.3),
                0 6px 12px rgba(0,0,0,0.2),
                inset 0 -2px 6px rgba(0,0,0,0.15);
            transform: rotate(-45deg) scale(1.05);
        }

        .modern-pin:hover .pin-head::before {
            width: 16px;
            height: 16px;
            top: 3px;
            left: 3px;
            background: rgba(255,255,255,0.5);
        }

        .modern-pin:hover::before {
            animation: pulse 1s ease-out infinite;
        }

        /* Estilos para reportes - Rojo vibrante */
        .modern-pin.report .pin-head {
            background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 50%, #d63031 100%);
            color: white;
        }

        .modern-pin.report::before {
            border: 2px solid #ff6b6b;
        }

        /* Estilos para ayudas - Verde esperanza */
        .modern-pin.help .pin-head {
            background: linear-gradient(135deg, #51cf66 0%, #40c057 50%, #37b24d 100%);
            color: white;
        }

        .modern-pin.help::before {
            border: 2px solid #51cf66;
        }

        /* Badge para reportes/ayudas aceptados */
        .accepted-badge {
            position: absolute;
            top: -8px;
            right: -8px;
            background: linear-gradient(135deg, #4caf50, #2e7d32);
            color: white;
            border-radius: 50%;
            width: 20px;
            height: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            font-weight: bold;
            box-shadow: 0 2px 8px rgba(76, 175, 80, 0.5);
            border: 2px solid white;
            z-index: 10;
            animation: badgePop 0.3s ease-out;
        }

        @keyframes badgePop {
            0% {
                transform: scale(0);
            }
            50% {
                transform: scale(1.2);
            }
            100% {
                transform: scale(1);
            }
        }

        /* Estilo para marcadores aceptados */
        .modern-pin.aceptado .pin-head {
            border: 2px solid #4caf50;
        }

        .modern-pin.aceptado::before {
            border-color: #4caf50;
            background: rgba(76, 175, 80, 0.1);
        }

        /* Variantes por tipo de reporte */
        .modern-pin.report.urgente .pin-head {
            background: linear-gradient(135deg, #ff3838 0%, #ff0000 50%, #d60000 100%);
            animation: urgentPulse 1.5s ease-in-out infinite;
        }

        @keyframes urgentPulse {
            0%, 100% {
                box-shadow: 
                    0 8px 16px rgba(255, 56, 56, 0.4),
                    0 3px 6px rgba(255, 0, 0, 0.3),
                    inset 0 -2px 4px rgba(0,0,0,0.1);
            }
            50% {
                box-shadow: 
                    0 12px 24px rgba(255, 56, 56, 0.6),
                    0 6px 12px rgba(255, 0, 0, 0.5),
                    inset 0 -2px 4px rgba(0,0,0,0.1);
            }
        }

        /* Marcador del usuario - Diseño especial */
        .modern-pin.user .pin-head {
            background: linear-gradient(135deg, #2196F3 0%, #1976D2 50%, #0D47A1 100%);
            color: white;
            animation: userPulse 2s ease-in-out infinite;
        }

        @keyframes userPulse {
            0%, 100% {
                transform: rotate(-45deg) scale(1);
            }
            50% {
                transform: rotate(-45deg) scale(1.08);
            }
        }

        /* Badge para información adicional (nuevo, urgente, etc) */
        .modern-pin .badge {
            position: absolute;
            top: -8px;
            right: -8px;
            background: linear-gradient(135deg, #ff3838, #ff0000);
            color: white;
            font-size: 10px;
            font-weight: bold;
            padding: 2px 6px;
            border-radius: 10px;
            border: 2px solid white;
            box-shadow: 0 2px 8px rgba(0,0,0,0.3);
            z-index: 10;
            animation: badgePulse 2s ease-in-out infinite;
        }

        @keyframes badgePulse {
            0%, 100% {
                transform: scale(1);
            }
            50% {
                transform: scale(1.1);
            }
        }

        /* Efecto de brillo en los pins */
        .modern-pin .pin-head::after {
            content: '';
            position: absolute;
            top: 2px;
            left: 2px;
            right: 2px;
            bottom: 2px;
            border-radius: 50% 50% 50% 0;
            background: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, transparent 50%);
            pointer-events: none;
        }

        /* Tooltip mejorado para los marcadores */
        .leaflet-popup-content-wrapper {
            border-radius: 12px;
            box-shadow: 0 8px 24px rgba(0,0,0,0.15);
        }

        .leaflet-popup-tip {
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }

        /* Animación cuando se carga el marcador */
        .modern-pin.loading {
            animation: markerLoading 1s ease-in-out infinite;
        }

        @keyframes markerLoading {
            0%, 100% {
                opacity: 1;
            }
            50% {
                opacity: 0.5;
            }
        }

        /* Reglas antiguas de custom-marker eliminadas - ahora usamos map-pin */

        /* Ocultar botones móviles en desktop */
        .mobile-panel-toggles {
            display: none;
        }

        /* Responsive */
        @media (max-width: 768px) {
            .page-title {
                display: none;
            }

            /* Mostrar y posicionar botones flotantes para abrir paneles en móvil */
            .mobile-panel-toggles {
                display: flex;
                position: fixed;
                bottom: 80px;
                right: 15px;
                display: flex;
                flex-direction: column;
                gap: 10px;
                z-index: 1002;
            }

            .mobile-toggle-btn {
                width: 50px;
                height: 50px;
                border-radius: 50%;
                background: white;
                border: 2px solid var(--primary-color);
                box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
                display: flex;
                align-items: center;
                justify-content: center;
                font-size: 20px;
                cursor: pointer;
                transition: all 0.3s ease;
                color: var(--primary-color);
            }

            .mobile-toggle-btn:active {
                transform: scale(0.95);
                box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
            }

            .mobile-toggle-btn.active {
                background: var(--primary-color);
                color: white;
            }

            /* Paneles ocultos por defecto en móvil */
            .filters-panel {
                position: fixed;
                top: 70px;
                left: 0;
                right: 0;
                bottom: auto;
                max-height: 70vh;
                min-width: unset;
                width: 100%;
                padding: 12px;
                border-radius: 0 0 16px 16px;
                transform: translateY(-100%);
                transition: transform 0.3s ease;
                overflow-y: auto;
                z-index: 1001;
            }

            .filters-panel.mobile-open {
                transform: translateY(0);
                box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
            }

            .panel-header {
                display: flex;
                justify-content: space-between;
                align-items: center;
                margin-bottom: 12px;
            }

            .panel-header h3 {
                font-size: 16px;
                margin: 0;
            }

            .minimize-btn {
                padding: 4px 8px;
                font-size: 18px;
            }

            /* En móvil, cambiar el texto del botón de minimizar a ✕ */
            .minimize-btn::before {
                content: "✕";
            }
            
            .minimize-btn {
                font-size: 0; /* Ocultar el texto original */
            }
            
            .minimize-btn::before {
                font-size: 18px; /* Tamaño del ✕ */
            }

            .filter-group {
                margin-bottom: 12px;
            }

            .filter-label {
                font-size: 13px;
                margin-bottom: 6px;
            }

            .filter-buttons {
                gap: 6px;
            }

            .filter-btn {
                padding: 8px 12px;
                font-size: 13px;
            }

            /* Controles del mapa compactos en móvil - OCULTOS POR DEFECTO */
            .map-controls {
                position: fixed;
                bottom: 0;
                left: 0;
                right: 0;
                top: auto;
                max-height: 40vh;
                width: 100%;
                flex-direction: column;
                gap: 0;
                background: white;
                padding: 0;
                border-radius: 16px 16px 0 0;
                box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.2);
                transform: translateY(100%); /* Oculto por defecto */
                transition: transform 0.3s ease;
                z-index: 1001;
                visibility: hidden;
                opacity: 0;
            }

            .map-controls.mobile-open {
                transform: translateY(0);
                visibility: visible;
                opacity: 1;
            }

            .map-controls .panel-header {
                display: flex;
                padding: 12px;
                border-bottom: 1px solid var(--gray-200);
            }

            .map-controls .panel-body {
                display: flex;
                gap: 12px;
                padding: 16px;
                justify-content: center;
            }

            .control-btn {
                width: 60px;
                height: 60px;
                border-radius: 12px;
                background: white;
                border: 2px solid var(--primary-color);
                box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
                font-size: 24px;
                display: flex;
                align-items: center;
                justify-content: center;
                color: var(--primary-color);
            }

            /* Panel de estadísticas como overlay deslizable */
            .stats-panel {
                position: fixed;
                bottom: 0;
                left: 0;
                right: 0;
                top: auto;
                max-height: 50vh;
                width: 100%;
                border-radius: 16px 16px 0 0;
                transform: translateY(100%);
                transition: transform 0.3s ease;
                z-index: 1001;
                overflow-y: auto;
            }

            .stats-panel.mobile-open {
                transform: translateY(0);
                box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.2);
            }

            .stats-panel .panel-header {
                padding: 12px;
                border-bottom: 1px solid var(--gray-200);
            }

            .stats-panel .panel-body {
                padding: 12px;
            }

            .stats-grid {
                display: grid;
                grid-template-columns: 1fr 1fr;
                gap: 10px;
            }

            .stat-item {
                padding: 12px;
            }

            .stat-number {
                font-size: 24px;
            }

            .stat-label {
                font-size: 12px;
            }

            .map-legend {
                bottom: 10px;
                padding: 8px 12px;
                font-size: 11px;
            }

            .details-panel {
                width: 100% !important;
                max-width: 100% !important;
                right: -100% !important;
                border-radius: 20px 20px 0 0;
                height: calc(100vh - 70px) !important;
                visibility: hidden !important;
                opacity: 0 !important;
                pointer-events: none !important;
            }

            .details-header {
                border-radius: 20px 20px 0 0;
            }

            .details-content {
                padding: 20px 20px 180px 20px; /* Padding inferior generoso para tablets */
                height: calc(100% - 58px);
                overflow-y: auto;
                -webkit-overflow-scrolling: touch; /* Scroll suave en iOS */
            }

            .action-buttons {
                flex-direction: column;
                gap: 12px;
                margin-top: 24px;
                padding-bottom: 20px;
            }

            .details-panel.active {
                right: 0 !important;
                box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
                visibility: visible !important;
                opacity: 1 !important;
                pointer-events: auto !important;
            }

            .map-controls {
                bottom: 80px;
            }
        }

        /* Estilos adicionales para móviles muy pequeños */
        @media (max-width: 480px) {
            .mobile-panel-toggles {
                bottom: 70px;
                right: 10px;
                gap: 8px;
            }

            .mobile-toggle-btn {
                width: 45px;
                height: 45px;
                font-size: 18px;
            }

            .filters-panel {
                top: 60px;
                max-height: 65vh;
                padding: 10px;
            }

            .panel-header h3 {
                font-size: 14px;
            }

            .minimize-btn {
                padding: 2px 6px;
                font-size: 16px;
            }

            .filter-label {
                font-size: 12px;
            }

            .filter-btn {
                padding: 6px 10px;
                font-size: 12px;
            }

            .map-controls .panel-body {
                padding: 12px;
                gap: 10px;
            }

            .control-btn {
                width: 55px;
                height: 55px;
                font-size: 22px;
            }

            .stats-panel .panel-body {
                padding: 10px;
            }

            .stat-number {
                font-size: 20px;
            }

            .stat-label {
                font-size: 11px;
            }
        }

        /* Iconos */
        .icon-paw::before { content: "🐾"; }
        .icon-home::before { content: "🏠"; }
        .icon-user::before { content: "👤"; }
        .icon-bell::before { content: "🔔"; }
        .icon-menu::before { content: "☰"; }
        .icon-location::before { content: "📍"; }
        .icon-filter::before { content: "⚙️"; }
        .icon-close::before { content: "✕"; }
        .icon-dog::before { content: "🐕"; }
        .icon-cat::before { content: "🐈"; }
        .icon-bird::before { content: "🦜"; }
        .icon-food::before { content: "🍖"; }
        .icon-shelter::before { content: "🏠"; }
        .icon-transport::before { content: "🚗"; }
        .icon-help::before { content: "❤️"; }
        .icon-warning::before { content: "⚠️"; }
/* ============================================ */
/* NUEVOS ESTILOS PARA SISTEMA DE ACEPTACI�N */
/* ============================================ */

/* Alertas de estado */
.alert-success,
.alert-info {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #2e7d32;
    border-left: 4px solid #4caf50;
}

.alert-info {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1565c0;
    border-left: 4px solid #2196f3;
}

/* Modal de contacto */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 2px solid #f0f0f0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #999;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    background: #f5f5f5;
    color: #333;
}

.modal-body {
    padding: 24px;
}

.contact-name {
    font-size: 1.1rem;
    margin-bottom: 20px;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    text-align: center;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.contact-method:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.contact-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.contact-info {
    flex: 1;
}

.contact-label {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 4px;
}

.contact-value {
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    word-break: break-all;
}

.contact-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.btn-copy,
.btn-action,
.btn-whatsapp {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-copy {
    background: #e0e0e0;
    color: #333;
}

.btn-copy:hover {
    background: #d0d0d0;
    transform: translateY(-2px);
}

.btn-action {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
}

.btn-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

.contact-note {
    padding: 12px;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #856404;
}

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 24px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 400px;
    font-size: 0.95rem;
}

.toast.show {
    transform: translateX(0);
}

.toast-success {
    border-left: 4px solid #4caf50;
}

.toast-error {
    border-left: 4px solid #f44336;
}

.toast-info {
    border-left: 4px solid #2196F3;
}

/* Responsive para modales */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 80vh;
    }

    .contact-method {
        flex-direction: column;
        align-items: flex-start;
    }

    .contact-actions {
        width: 100%;
        flex-direction: column;
    }

    .btn-copy,
    .btn-action,
    .btn-whatsapp {
        width: 100%;
        justify-content: center;
    }

    .toast {
        bottom: 12px;
        right: 12px;
        left: 12px;
        max-width: none;
    }
}

/* ========== SISTEMA DE PESTAÑAS LATERALES ========== */

/* Pestañas laterales cuando los paneles están ocultos */
.panel-tabs {
    position: fixed; /* Fixed al viewport para evitar que el map-container las corte */
    left: 0;
    top: 200px; /* Posición fija desde arriba, debajo del header */
    z-index: 9999;
    display: none; /* Ocultas por defecto */
    flex-direction: column;
    gap: 10px;
    pointer-events: auto;
    padding: 0;
}

.panel-tabs.show {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.panel-tab {
    background: #FF0000; /* ROJO SÓLIDO PARA DEBUG */
    border: 5px solid #FFFF00; /* BORDE AMARILLO GRUESO */
    border-left: none;
    border-radius: 0 16px 16px 0;
    padding: 20px 15px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 80px;
    color: white;
    box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    position: relative;
    overflow: visible;
}

.panel-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.3s ease;
}

.panel-tab:hover::before {
    left: 0;
}

.panel-tab:hover {
    transform: translateX(5px);
    box-shadow: 3px 3px 12px rgba(0, 0, 0, 0.3);
}

.panel-tab:active {
    transform: translateX(3px) scale(0.98);
}

.tab-icon {
    font-size: 28px;
    display: block;
}

.tab-text {
    font-size: 11px;
    font-weight: 700;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* Animaciones para paneles */
.filters-panel,
.stats-panel,
.details-panel {
    transition: transform 0.4s cubic-bezier(0.4, 0.0, 0.2, 1),
                opacity 0.4s ease,
                visibility 0.4s ease;
}

/* Estado oculto de paneles */
.filters-panel.hidden {
    transform: translateX(-120%);
    opacity: 0;
    visibility: hidden;
}

.stats-panel.hidden {
    transform: translateX(-120%);
    opacity: 0;
    visibility: hidden;
}

/* NOTA: El details-panel NO usa la clase hidden, 
   ya que tiene su propio sistema con right: -380px 
   y se muestra/oculta con la clase .active */

/* Animación de entrada/salida de pestañas */
@keyframes slideInTabs {
    from {
        transform: translateY(-50%) translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(-50%) translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutTabs {
    from {
        transform: translateY(-50%) translateX(0);
        opacity: 1;
    }
    to {
        transform: translateY(-50%) translateX(-100%);
        opacity: 0;
    }
}

/* Botón de toggle en controles */
#togglePanelsBtn {
    position: relative;
}

#togglePanelsBtn.active {
    background: var(--verde-principal);
    color: white;
}

#togglePanelsBtn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transition: width 0.3s ease, height 0.3s ease;
}

#togglePanelsBtn:active::after {
    width: 100%;
    height: 100%;
}

/* Responsive para pestañas */
@media (max-width: 768px) {
    .panel-tabs {
        top: auto;
        bottom: 80px;
        transform: none;
        flex-direction: row;
        left: 50%;
        transform: translateX(-50%);
        width: auto;
    }
    
    .panel-tab {
        flex-direction: row;
        border-radius: 12px 12px 0 0;
        padding: 8px 12px;
        min-width: auto;
    }
    
    .tab-text {
        writing-mode: horizontal-tb;
        text-orientation: upright;
    }
    
    .panel-tab:hover {
        transform: translateY(-5px);
    }
}




/* Marcador agrupado: misma silueta que los indicadores del mapa */
.helppets-marker-cluster {
    width: 46px !important;
    height: 60px !important;
    background: transparent !important;
    border: 0 !important;
}
.modern-pin.cluster-pin .pin-head::after { content: none; }
.modern-pin.cluster-pin .cluster-count {
    position: relative;
    z-index: 2;
    transform: rotate(45deg);
    color: #fff;
    font-size: 17px;
    line-height: 1;
    font-weight: 800;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}
.modern-pin.cluster-pin.mixed .pin-head {
    background: linear-gradient(135deg, #ff6b6b 0%, #d63031 49.5%, #40c057 50.5%, #37b24d 100%);
}
.modern-pin.cluster-pin.mixed::before {
    border: 2px solid #40c057;
}
.modern-pin.cluster-pin:hover .cluster-count {
    transform: rotate(45deg) scale(1.04);
}

.modern-pin.colony .pin-head,
.modern-pin.cluster-pin.colony .pin-head {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
}

.modern-pin.colony::before,
.modern-pin.cluster-pin.colony::before {
    border-top-color: #7c3aed;
}

/* Galería de fotografías en la ficha de reportes */
.report-photos-section .detail-label {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #2e7d32;
}

.report-photos-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.report-photo-thumb {
    position: relative;
    min-width: 0;
    aspect-ratio: 4 / 3;
    padding: 0;
    overflow: hidden;
    border: 2px solid #e4f2e5;
    border-radius: 10px;
    background: #eef7ef;
    cursor: zoom-in;
    box-shadow: 0 3px 10px rgba(46, 125, 50, 0.1);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.report-photo-thumb:hover,
.report-photo-thumb:focus-visible {
    transform: translateY(-2px);
    border-color: #4caf50;
    box-shadow: 0 7px 16px rgba(46, 125, 50, 0.2);
    outline: none;
}

.report-photo-thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.report-photo-zoom {
    position: absolute;
    right: 7px;
    bottom: 7px;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: rgba(24, 93, 38, 0.82);
    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.25);
}

.report-photo-viewer {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    background: rgba(8, 24, 12, 0.9);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.report-photo-viewer.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.report-photo-viewer img {
    max-width: min(100%, 1100px);
    max-height: calc(100vh - 56px);
    object-fit: contain;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.45);
}

.report-photo-viewer-close {
    position: fixed;
    top: 18px;
    right: 22px;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: #388e3c;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.35);
}

.report-photo-viewer-close:hover,
.report-photo-viewer-close:focus-visible {
    background: #2e7d32;
    outline: 3px solid rgba(255, 255, 255, 0.75);
}

body.report-photo-viewer-open {
    overflow: hidden;
}

@media (max-width: 480px) {
    .report-photos-grid {
        grid-template-columns: 1fr;
    }

    .report-photo-viewer {
        padding: 16px;
    }
}
