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

        body {
            font-family: 'Inter', 'Segoe UI', sans-serif;
            background-color: #f1f5f9;
        }

        
        #map {
            width: 100%;
            height: 100vh;
            background-color: #87CEEB !important; /* Blue Sky */
        }

        
        .leaflet-control-container .leaflet-top {
            margin-top: 85px; 
        }

        
        .legend {
            position: absolute;
            top: 95px;
            right: 15px;
            z-index: 1000;
            background: rgba(255, 255, 255, 0.7); 
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border: 1px solid rgba(255, 255, 255, 0.5);
            border-radius: 16px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
            font-size: 13px;
            width: 260px;
            overflow: hidden;
            animation: slideIn 0.5s ease-out 0.3s both;
        }

        @keyframes slideIn {
            from { transform: translateX(30px); opacity: 0; }
            to   { transform: translateX(0); opacity: 1; }
        }

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

        
        .legend-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 14px 18px;
            cursor: pointer;
            user-select: none;
            border-bottom: 1px solid #f0f0f0;
            transition: background 0.2s ease;
        }

        .legend-header:hover {
            background: #fafafa;
        }

        .legend-header h4 {
            margin: 0;
            color: #1a1a2e;
            font-weight: 800;
            font-size: 15px;
            letter-spacing: -0.3px;
        }

        .legend-chevron {
            width: 20px;
            height: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: transform 0.3s ease;
        }

        .legend-chevron svg {
            width: 16px;
            height: 16px;
            stroke: #94a3b8;
            stroke-width: 2.5;
            fill: none;
        }

        .legend.collapsed .legend-chevron {
            transform: rotate(180deg);
        }

        .legend.collapsed .legend-header {
            border-bottom-color: transparent;
        }

        
        .legend-body {
            max-height: 600px;
            overflow-y: auto;
            transition: max-height 0.4s ease, opacity 0.3s ease;
            opacity: 1;
        }

        .legend.collapsed .legend-body {
            max-height: 0;
            opacity: 0;
            overflow: hidden;
        }

        
        .legend-section {
            padding: 0 18px;
        }

        .legend-section-title {
            font-size: 10px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 1px;
            color: #94a3b8;
            padding: 14px 0 8px;
        }

        .legend-section + .legend-section .legend-section-title {
            border-top: 1px solid #f0f0f0;
        }

        
        .legend-checkbox-item {
            display: flex;
            align-items: center;
            padding: 7px 0;
            cursor: pointer;
            transition: opacity 0.2s ease;
        }

        .legend-checkbox-item:hover {
            opacity: 0.8;
        }

        .legend-checkbox {
            appearance: none;
            -webkit-appearance: none;
            width: 18px;
            height: 18px;
            border: 2px solid #cbd5e1;
            border-radius: 4px;
            margin-right: 10px;
            cursor: pointer;
            position: relative;
            flex-shrink: 0;
            transition: all 0.2s ease;
        }

        .legend-checkbox:checked {
            border-color: currentColor;
            background: currentColor;
        }

        .legend-checkbox:checked::after {
            content: '';
            position: absolute;
            top: 1px;
            left: 4.5px;
            width: 5px;
            height: 9px;
            border: solid white;
            border-width: 0 2px 2px 0;
            transform: rotate(45deg);
        }

        .legend-checkbox-label {
            font-size: 13px;
            font-weight: 600;
            color: #334155;
            flex: 1;
        }

        
        .legend-line-item {
            display: flex;
            align-items: center;
            padding: 6px 0;
        }

        .legend-line-sample {
            width: 28px;
            margin-right: 10px;
            flex-shrink: 0;
        }

        .legend-line-solid {
            height: 3px;
            border-radius: 2px;
        }

        .legend-line-dashed {
            height: 0;
            border-top: 3px dashed;
            border-radius: 0;
        }

        .legend-line-label {
            font-size: 12.5px;
            font-weight: 500;
            color: #475569;
        }

        
        .legend-info-text {
            font-size: 11px;
            color: #94a3b8;
            line-height: 1.6;
            padding: 4px 0 14px;
        }



        
        .zoom-info {
            position: absolute;
            bottom: 30px;
            left: 15px;
            z-index: 1000;
            background: rgba(26, 26, 46, 0.85);
            backdrop-filter: blur(8px);
            padding: 8px 14px;
            border-radius: 10px;
            font-size: 11px;
            font-weight: 600;
            color: rgba(255, 255, 255, 0.7);
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
            animation: slideUp 0.6s ease-out 0.5s both;
        }

        
        .glass-tooltip {
            background: rgba(255, 255, 255, 0.9) !important;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.5) !important;
            border-radius: 8px !important;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
            padding: 8px 12px !important;
            font-family: 'Inter', sans-serif;
        }

        .glass-tooltip::before {
            display: none; 
        }

        
        .leaflet-popup-content-wrapper {
            border-radius: 12px !important;
            box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15) !important;
            padding: 0 !important;
        }

        .leaflet-popup-content {
            margin: 0 !important;
        }

        .popup-content {
            padding: 16px 20px;
            text-align: center;
        }

        .popup-content .province-name {
            font-size: 16px;
            font-weight: 800;
            color: #1a1a2e;
            margin-bottom: 4px;
            letter-spacing: -0.3px;
        }

        .popup-content .province-code {
            font-size: 12px;
            font-weight: 600;
            color: #718096;
            margin-bottom: 8px;
        }

        .popup-content .province-badge {
            display: inline-block;
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 10px;
            font-weight: 700;
            color: white;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        
        .loading-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: rgba(5, 10, 31, 0.8);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            z-index: 10000;
            display: flex;
            justify-content: center;
            align-items: center;
            transition: opacity 0.5s ease, visibility 0.5s ease;
        }

        .loading-overlay.hidden {
            opacity: 0;
            visibility: hidden;
        }

        .loader-content {
            text-align: center;
            color: #ffffff;
        }

        .spinner {
            width: 50px;
            height: 50px;
            border: 4px solid rgba(255, 255, 255, 0.1);
            border-left-color: #f5b700;
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin: 0 auto 15px;
        }

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

        .loading-text {
            font-weight: 600;
            font-size: 14px;
            letter-spacing: 1px;
            color: #f5b700;
        }

        
        .province-label {
            background: none !important;
            border: none !important;
            box-shadow: none !important;
            font-family: 'Inter', 'Segoe UI', sans-serif;
            pointer-events: none !important;
        }

        .province-label-text {
            display: inline-block;
            font-size: 11px;
            font-weight: 700;
            color: #1e293b;
            text-shadow:
                -1px -1px 0 #fff,
                 1px -1px 0 #fff,
                -1px  1px 0 #fff,
                 1px  1px 0 #fff,
                 0   -2px 0 #fff,
                 0    2px 0 #fff,
                -2px  0   0 #fff,
                 2px  0   0 #fff;
            letter-spacing: 0.3px;
            text-transform: uppercase;
            white-space: nowrap;
            padding: 2px 6px;
            border-radius: 3px;
            background: rgba(255, 255, 255, 0.6) !important;
        }


        
        .leaflet-control-attribution {
            font-size: 10px !important;
            background: rgba(255,255,255,0.8) !important;
        }

        
        .side-panel {
            position: fixed;
            top: 75px;
            right: -400px;
            width: 400px;
            height: calc(100vh - 75px);
            background: #ffffff;
            z-index: 10000;
            box-shadow: -5px 0 25px rgba(0,0,0,0.1);
            transition: right 0.4s cubic-bezier(0.175, 0.885, 0.32, 1);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            font-family: 'Inter', sans-serif;
        }

        .side-panel.open {
            right: 0;
        }

        .panel-header {
            position: relative;
            width: 100%;
            background: #050a1f; 
            padding: 40px 24px 25px;
            text-align: center;
            display: flex;
            flex-direction: column;
            align-items: center;
            transition: all 0.3s ease;
        }

        .panel-img {
            width: 100%;
            max-width: 340px;
            height: 250px;
            object-fit: cover;
            object-position: center bottom;
            border-radius: 18px; 
            border: 4px solid rgba(255, 255, 255, 0.2);
            margin-bottom: 18px;
            box-shadow: 0 12px 30px rgba(0,0,0,0.35);
            background: #ffffff;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .panel-img-fallback {
            width: 100%;
            max-width: 340px;
            height: 220px;
            border-radius: 18px;
            background: linear-gradient(135deg, #f5b700, #e6a800);
            border: 4px solid rgba(255, 255, 255, 0.2);
            margin-bottom: 18px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 64px;
            color: #050a1f;
            box-shadow: 0 12px 30px rgba(0,0,0,0.35);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .side-panel.scrolled .panel-header {
            padding: 20px 24px 15px;
        }

        .side-panel.scrolled .panel-img {
            height: 80px;
            width: 80px;
            max-width: 80px;
            border-radius: 50%;
            border-width: 3px;
            margin-bottom: 10px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.3);
        }

        .side-panel.scrolled .panel-img-fallback {
            height: 80px;
            width: 80px;
            max-width: 80px;
            border-radius: 50%;
            border-width: 3px;
            margin-bottom: 10px;
            font-size: 32px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.3);
        }

        .panel-close {
            position: absolute;
            top: 15px;
            left: 15px;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.2);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
            z-index: 10;
            color: white;
        }

        .panel-close:hover {
            background: #f5b700;
            color: #050a1f;
            border-color: #f5b700;
        }

        .panel-body {
            padding: 25px;
            flex: 1;
            overflow-y: auto;
            background: #ffffff;
        }

        .panel-title {
            font-size: 22px;
            font-weight: 800;
            color: #ffffff;
            margin-bottom: 4px;
            line-height: 1.3;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .side-panel.scrolled .panel-title {
            font-size: 16px;
            margin-bottom: 2px;
        }

        .panel-subtitle {
            font-size: 12px;
            color: #f5b700;
            margin-bottom: 0;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .side-panel.scrolled .panel-subtitle {
            font-size: 10px;
        }

        .panel-section {
            background: #f8fafc;
            padding: 18px;
            border-radius: 14px;
            border: 1px solid #e2e8f0;
            margin-bottom: 16px;
        }

        .panel-section h5 {
            font-size: 13px;
            color: #050a1f;
            margin-bottom: 12px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            font-weight: 700;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .panel-section h5 i {
            color: #f5b700;
        }

        .panel-info-item {
            font-size: 14px;
            color: #475569;
            margin-bottom: 10px;
            display: flex;
            align-items: flex-start;
            gap: 12px;
            line-height: 1.5;
        }

        .panel-info-item i {
            margin-top: 3px;
            color: #64748b;
            font-size: 16px;
            width: 16px;
            text-align: center;
        }

        .social-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 36px;
            height: 36px;
            background: #f1f5f9;
            color: #475569;
            border-radius: 10px;
            text-decoration: none;
            transition: all 0.2s;
            margin-right: 10px;
            margin-bottom: 10px;
            font-size: 16px;
        }

        .social-btn:hover {
            background: #f5b700;
            color: #050a1f;
            transform: translateY(-2px);
        }

        .social-btn.instagram:hover { background: #E1306C; color: white; }
        .social-btn.facebook:hover { background: #1877F2; color: white; }
        .social-btn.youtube:hover { background: #FF0000; color: white; }

        
        .custom-popup .leaflet-popup-content-wrapper {
            border-radius: 14px;
            overflow: hidden;
            padding: 0;
            box-shadow: 0 10px 30px rgba(0,0,0,0.2), 0 0 0 1px rgba(0,0,0,0.05);
            font-family: 'Inter', sans-serif;
        }

        .custom-popup .leaflet-popup-content {
            margin: 0;
            width: 250px !important;
        }

        .popup-header-img {
            width: 250px;
            height: 180px;
            object-fit: cover;
            object-position: center bottom;
            display: block;
        }

        .popup-header-text-container {
            background: #050a1f; 
            color: #ffffff;
            padding: 12px 15px;
            border-bottom: 3px solid #f5b700;
        }

        .popup-title {
            font-weight: 800;
            font-size: 15px;
            color: #ffffff;
            line-height: 1.3;
            margin-bottom: 2px;
        }

        .popup-subtitle {
            font-size: 10px;
            color: #f5b700;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .popup-body {
            padding: 14px 18px;
            background: #ffffff;
        }

        .popup-address {
            font-size: 12px;
            color: #64748b;
            margin-bottom: 10px;
            line-height: 1.5;
        }

        .popup-btn {
            display: block;
            width: 100%;
            text-align: center;
            background: #050a1f;
            color: white;
            padding: 10px;
            border-radius: 10px;
            text-decoration: none;
            font-size: 13px;
            font-weight: 600;
            margin-top: 12px;
            cursor: pointer;
            border: none;
            transition: all 0.2s;
            letter-spacing: 0.3px;
        }

        .popup-btn:hover {
            background: #f5b700;
            color: #050a1f;
        }

        /* =============================================
           Category Marker Styles
           ============================================= */
        .category-marker {
            background: none !important;
            border: none !important;
            box-shadow: none !important;
        }

        .category-marker-pin {
            width: 36px;
            height: 36px;
            border-radius: 50% 50% 50% 0;
            transform: rotate(-45deg);
            display: flex;
            align-items: center;
            justify-content: center;
            border: 3px solid white;
            transition: transform 0.3s ease;
        }

        .category-marker-pin i {
            transform: rotate(45deg);
            color: white;
            font-size: 14px;
        }

        .category-marker:hover .category-marker-pin {
            transform: rotate(-45deg) scale(1.15);
        }

        .category-marker-shadow {
            width: 16px;
            height: 6px;
            background: rgba(0,0,0,0.2);
            border-radius: 50%;
            margin: 2px auto 0;
        }

        /* Layanan Popup */
        .layanan-popup .leaflet-popup-content-wrapper {
            border-radius: 14px;
            overflow: hidden;
        }

        .layanan-popup .popup-header-text-container {
            border-bottom-width: 3px;
            border-bottom-style: solid;
        }

        /* =============================================
           Detail Panel Styles
           ============================================= */
        .detail-field {
            padding: 12px 0;
            border-bottom: 1px solid #f1f5f9;
        }

        .detail-field:last-child {
            border-bottom: none;
        }

        .detail-label {
            font-size: 11px;
            font-weight: 700;
            color: #94a3b8;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 4px;
        }

        .detail-value {
            font-size: 15px;
            font-weight: 600;
            color: #1e293b;
            line-height: 1.4;
        }

        /* Documentation Gallery */
        .dok-gallery {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 10px;
        }

        .dok-img {
            width: 100%;
            height: 120px;
            object-fit: cover;
            border-radius: 10px;
            border: 2px solid #f1f5f9;
            cursor: pointer;
            transition: all 0.3s;
        }

        .dok-img:hover {
            transform: scale(1.03);
            box-shadow: 0 4px 15px rgba(0,0,0,0.15);
            border-color: #f5b700;
        }
/* =============================================
   Map Stats Overlay (Top Filter Cards)
   ============================================= */
.map-stats-container {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    width: 96%;
    max-width: 1400px;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 6px 4px 4px;
    pointer-events: none;
}

/* Scrollbar styles for the horizontal container */
.map-stats-container::-webkit-scrollbar {
    height: 8px;
}
.map-stats-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 4px;
}
.map-stats-container::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.map-stat-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #f1f5f9;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    cursor: pointer;
    pointer-events: auto;
    width: 150px;
    min-width: 150px;
    flex-shrink: 0;
    text-decoration: none;
}

.map-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.map-stat-card.active {
    border-color: #f5b700;
    box-shadow: 0 0 0 2px rgba(245, 183, 0, 0.3), 0 4px 15px rgba(0, 0, 0, 0.1);
}

.map-stat-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.map-stat-content {
    flex: 1;
    text-align: left;
}

.map-stat-number {
    font-size: 18px;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.2;
    margin-bottom: 2px;
}

.map-stat-label {
    font-size: 8px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
}



/* Map Breadcrumb */
.map-breadcrumb {
    position: absolute;
    top: 95px;
    left: 20px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    animation: slideIn 0.3s ease-out;
}
.breadcrumb-back-btn {
    background: #1e293b;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-right: 12px;
    transition: background 0.2s;
}
.breadcrumb-back-btn:hover {
    background: #0f172a;
}
.breadcrumb-path {
    font-size: 14px;
    font-weight: 600;
    color: #334155;
}

/* Label Box Hover */
.province-textbox {
    transition: transform 0.2s, box-shadow 0.2s;
}
.province-textbox:hover {
    transform: translate(-50%, -50%) scale(1.05) !important;
    box-shadow: 0 6px 12px rgba(0,0,0,0.4) !important;
    z-index: 9999 !important;
}
.province-textbox.dimmed {
    opacity: 0.4;
    pointer-events: none;
    filter: grayscale(80%);
}


/* Province Name Labels (Zoom level <= 6) */
.province-name-label {
    background: transparent;
    border: none;
    box-shadow: none;
    font-weight: 800;
    font-size: 16px;
    color: #1e293b;
    text-transform: uppercase;
    text-align: center;
    text-shadow: 2px 2px 0px rgba(255,255,255,0.8), -2px -2px 0px rgba(255,255,255,0.8), 2px -2px 0px rgba(255,255,255,0.8), -2px 2px 0px rgba(255,255,255,0.8);
    pointer-events: none;
    letter-spacing: 2px;
}

.leaflet-container { background-color: #87CEEB !important; }