        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        body {
            font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
            background-color: #f5f5f5;
        }
        .container {
            width: 100%;
            height: 100vh;
            display: flex;
            flex-direction: column;
        }
        .header {
            background-color: #C00000;
            color: white;
            padding: 20px;
            display: flex;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            transition: max-height 0.3s ease, padding 0.3s ease;
            max-height: 200px;
            overflow: hidden;
        }
        .header.hidden {
            max-height: 0;
            padding: 0 20px;
        }
        
        .dataTables_wrapper .dataTables_length {
            color: inherit;
            margin: 5px 0px 5px 0px;
        }
        .toggle-header-btn {
            position: absolute;
            top: 10px;
            right: 20px;
            z-index: 1001;
            width: 40px;
            height: 40px;
            background-color: #C00000;
            color: white;
            border: 2px solid white;
            border-radius: 50%;
            font-size: 24px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s;
        }
        .toggle-header-btn:hover {
            background-color: #a50000;
            transform: scale(1.1);
        }
        .toggle-header-btn.hidden {
            top: 10px;
            right: 20px;
        }
        .header img {
            height: 30px;
            width: auto;
            position: absolute;
            left: 20px;
        }
        .header-content {
            text-align: center;
        }
        .header h1 {
            font-size: 24px;
            margin-bottom: 5px;
        }
        .header p {
            font-size: 14px;
            opacity: 0.9;
        }
        #map {
            flex: 1;
            position: relative;
        }
        .back-btn {
            font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
            position: absolute;
            top: 20px;
            left: 60px;
            z-index: 1000;
            padding: 10px 20px;
            background-color: white;
            color: #003f5c;
            text-decoration: none;
            border-radius: 6px;
            font-weight: 500;
            box-shadow: 0 2px 8px rgba(0,0,0,0.2);
            cursor: pointer;
            border: none;
            transition: all 0.3s;
        }
        .back-btn:hover {
            background-color: #003f5c;
            color: white;
            box-shadow: 0 4px 12px rgba(0,0,0,0.3);
        }
        .legend {
            font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
            position: absolute;
            bottom: 20px;
            right: 20px;
            background: white;
            padding: 20px;
            border-radius: 6px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.2);
            z-index: 1000;
            max-width: 330px;
            min-width: 260px;
        }
        .legend h3 {
            margin: 0 0 5px 0;
            font-size: 14px;
            color: #000;
        }
        .legend-item {
            display: flex;
            align-items: center;
            margin-bottom: 5px;
            font-size: 13px;
        }
        .legend-color {
            width: 20px;
            height: 20px;
            margin-right: 10px;
            border-radius: 100px;
        }
        #btnFiltrarFecha{
            font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
            margin-top: 10px; 
            width: 100%; 
            padding: 10px; 
            background-color: #C00000; 
            color: white; 
            border: none; 
            border-radius: 4px; 
            cursor: pointer; 
            font-weight: 600;
        }
        
        .fila-habilitado td {
            background-color: #28a745 !important;
            color: #fff !important;
            font-weight: 600;
        }
        
        .info-panel {
            position: absolute;
            font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
            top: 70px;
            left: 60px;
            background: white;
            padding: 15px;
            border-radius: 6px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.2);
            z-index: 1000;
            width: 320px;
            max-height: 715px;
            overflow-y: auto;
        }
        
        .filter-panel {
            position: absolute;
            font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
            /*right: 20px;*/
            background: white;
            padding: 10px;
            border-radius: 6px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.2);
            z-index: 1000;
            min-width: 260px;
        }
        
        #filterPeligro {
            top: 20px;
            right: 20px;
        }
        
        #filterRegion {
            top: 20px;
            right: 290px;
        }
        
        #filterColegio {
            top: 115px;
            right: 290px;
            width: 50px;
        }
        
        #filterFechas {
            top: 115px;
            right: 20px;
            width: 260px;
        }
        
        .filter-panel label {
            display: block;
            font-size: 14px;
            font-weight: 600;
            color: #000;
            margin-bottom: 8px;
        }
        
        .filter-panel select {
            width: 100%;
            padding: 10px;
            font-family: 'Montserrat', sans-serif;
            font-size: 13px;
            border: 1px solid #003f5c;
            border-radius: 4px;
            background-color: white;
            color: #333;
            cursor: pointer;
            transition: border-color 0.3s;
        }
        
        .filter-panel select:hover {
            border-color: #C00000;
        }
        
        .filter-panel select:focus {
            outline: none;
            border-color: #C00000;
            box-shadow: 0 0 4px rgba(0,63,92,0.2);
        }
        
        .filter-panel input[type="date"] {
            width: 100%;
            padding: 10px;
            font-family: 'Montserrat', sans-serif;
            font-size: 13px;
            border: 1px solid #003f5c;
            border-radius: 4px;
            background-color: white;
            color: #333;
            cursor: pointer;
            transition: border-color 0.3s;
            margin-bottom: 10px;
            box-sizing: border-box;
        }
        
        .filter-panel input[type="date"]:hover {
            border-color: #C00000;
        }
        
        .filter-panel input[type="date"]:focus {
            outline: none;
            border-color: #C00000;
            box-shadow: 0 0 4px rgba(0,63,92,0.2);
        }
        
        .leaflet-container a {
            color: #000000;
        }
        .info-panel h4 {
            margin: 0 0 0 0;
            font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
            color: #000;
            font-size: 14px;
            position: sticky;
            top: 0;
            background: white;
            padding-bottom: 10px;
            text-align: center;
        }
        .info-panel p {
            margin: 5px 0;
            font-size: 12px;
            color: #666;
        }
        .dept-item {
            padding: 0;
            border-bottom: 1px solid #eee;
            font-size: 13px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .dept-item:last-child {
            border-bottom: none;
        }
        .dept-name {
            font-weight: 500;
            color: #000;
            flex: 1;
        }
        .dept-stats {
            display: flex;
            gap: 10px;
            align-items: center;
        }
        .dept-count {
            background-color: #003f5c;
            color: white;
            min-width: 35px;
            text-align: center;
            padding: 0;
            border-radius: 3px;
            font-size: 12px;
        }
        
        .dept-count_v {
            background-color: #003f5c;
            color: white;
            min-width: 35px;
            text-align: center;
            padding: 3px 3px;
            border-radius: 3px;
            font-size: 12px;
        }
        
        .dept-count_vv {
            background-color: #28a745;
            color: white;
            min-width: 35px;
            text-align: center;
            padding: 3px 3px;
            border-radius: 3px;
            font-size: 12px;
        }
        
        .dept-count_vvv {
            background-color: #000;
            color: white;
            min-width: 35px;
            text-align: center;
            padding: 3px 3px;
            border-radius: 3px;
            font-size: 12px;
        }

        .dept-habilitado {
            background-color: #28a745;
            color: white;
            min-width: 35px;
            text-align: center;
            padding: 0;
            border-radius: 3px;
            font-size: 12px;
        }
        
        .dept-resto {
            background-color: #000000;
            color: white;
            min-width: 35px;
            text-align: center;
            padding: 0;
            border-radius: 3px;
            font-size: 12px;
        }
        
        .loading {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: white;
            padding: 30px;
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.2);
            z-index: 2000;
            text-align: center;
        }
        .spinner {
            border: 4px solid #f3f3f3;
            border-top: 4px solid #003f5c;
            border-radius: 50%;
            width: 40px;
            height: 40px;
            animation: spin 1s linear infinite;
            margin: 0 auto 15px;
        }
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        
        /* Estilos para Leaflet Popup */
        .leaflet-popup {
            min-width: 280px !important;
        }
        
        /* Estilos para Leaflet Popup */
        .leaflet-popup-content-wrapper {
            background-color: white;
            border-radius: 8px;
            box-shadow: 0 4px 16px rgba(0,0,0,0.25);
            border: 2px solid #003f5c;
            width: 100%;
        }
        .leaflet-popup-content {
            font-family: 'Montserrat', sans-serif;
            margin: 0;
            padding: 16px;
            color: #333;
            font-size: 13px;
            line-height: 1.6;
        }
        .leaflet-popup-content strong {
            color: #003f5c;
            font-size: 15px;
            display: block;
            margin-bottom: 8px;
        }
        .leaflet-popup-content br {
            margin: 4px 0;
        }
        .leaflet-popup-tip {
            background-color: white;
            border: 2px solid #003f5c;
            border-top: none;
        }
        .leaflet-popup-close-button {
            color: #003f5c;
            font-size: 24px;
            width: 28px;
            height: 28px;
            line-height: 28px;
        }
        .leaflet-popup-close-button:hover {
            color: #C00000;
        }

        /* Estilos para botones en popup */
        .popup-buttons {
            display: flex;
            gap: 10px;
            margin-top: 10px;
            flex-direction: column;
        }

        .popup-buttons button {
            padding: 8px 12px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-weight: 600;
            font-size: 12px;
            transition: all 0.3s ease;
            width: 100%;
        }

        .btn-informe {
            background-color: #0066cc;
            color: white;
            font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
        }

        .btn-informe:hover {
            background-color: #0052a3;
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0, 102, 204, 0.3);
        }

        .btn-evidencia {
            background-color: #ff9900;
            color: white;
            font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
        }

        .btn-evidencia:hover {
            background-color: #e68a00;
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(255, 153, 0, 0.3);
        }

        /* Modal para evidencia */
        .modal {
            display: none;
            position: fixed;
            z-index: 10000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.8);
            padding: 20px;
        }

        .modal-iframe {
            margin: 50px auto;
            display: block;
            width: 90%;
            height: 70%;
            max-width: 1200px;
            border-radius: 8px;
            box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
        }

        #modalFotoTitle {
            color: white;
            text-align: center;
            margin-bottom: 20px;
            font-size: 18px;
        }

        .close {
            position: absolute;
            top: 20px;
            right: 40px;
            color: white;
            font-size: 40px;
            font-weight: bold;
            cursor: pointer;
            z-index: 10001;
            transition: color 0.3s ease;
        }

        .close:hover,
        .close:focus {
            color: #ff6b6b;
        }

        /* Loading del modal */
        .modal-loading {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            margin: 100px auto;
            gap: 20px;
        }

        .modal-loading p {
            color: white;
            font-size: 16px;
            font-weight: 600;
        }

        .spinner-modal {
            border: 4px solid rgba(255, 255, 255, 0.3);
            border-top: 4px solid white;
            border-radius: 50%;
            width: 50px;
            height: 50px;
            animation: spin 1s linear infinite;
        }
        
        .tituloslluvias{
            background-color: #C00000 !important;
            color: #ffffff !important;
            font-size: 12px;
            font-weight: 700;
            vertical-align: middle !important;
        }

        @keyframes spin {
            0% {
                transform: rotate(0deg);
            }
            100% {
                transform: rotate(360deg);
            }
        }

        /* Animación de brillo para marcadores */
        @keyframes glow {
            0% {
                filter: drop-shadow(0 0 2x rgba(40, 167, 69, 0.8));
            }
            50% {
                filter: drop-shadow(0 0 5px rgba(40, 167, 69, 1)) drop-shadow(0 0 10px rgba(40, 167, 69, 0.9));
            }
            100% {
                filter: drop-shadow(0 0 2px rgba(40, 167, 69, 0.8));
            }
        }

        /* Clase para marcadores que brillan */
        .marker-glow {
            animation: glow 1.5s ease-in-out infinite;
        }