html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: #070b14;
}

.leaflet-top.leaflet-left {
    top: 68px !important;
    left: 18px !important;
    z-index: 900 !important;
}

.leaflet-bar {
    border: none !important;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.6) !important;
    border-radius: 12px !important;
    overflow: hidden !important;
}

.leaflet-bar-part {
    background-color: rgba(15, 23, 42, 0.92) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    color: #38bdf8 !important;
    border: 1px solid rgba(51, 65, 85, 0.8) !important;
    transition: all 0.2s ease !important;
    font-weight: bold !important;
}

.leaflet-bar-part:hover {
    background-color: rgba(30, 41, 59, 0.95) !important;
    color: #ffffff !important;
    border-color: rgba(6, 182, 212, 0.6) !important;
}

.leaflet-container {
    background: #0b0f19;
}

.leaflet-div-icon {
    background: transparent !important;
    border: none !important;
}

.leaflet-popup-content-wrapper {
    background: rgba(15, 23, 42, 0.75) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: #e2e8f0 !important;
    border: 1px solid rgba(51, 65, 85, 0.6);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.3) !important;
    border-radius: 16px;
    padding: 0 !important;
}

.leaflet-popup-content {
    margin: 10px !important;
    width: auto !important;
    min-width: 170px;
}

.leaflet-popup-tip {
    background: rgba(15, 23, 42, 0.85) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(51, 65, 85, 0.6);
}

/* Kustomisasi scrollbar halus */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.1);
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(51, 65, 85, 0.5);
    border-radius: 9px;
}

/* ─── Mobile Responsive (< 640px) ──────────────────────── */
@media (max-width: 639px) {
    .leaflet-top.leaflet-left {
        top: 12px;
        left: 12px;
    }

    /* Widget panel: bottom sheet */
    .widget-panel {
        position: fixed !important;
        top: auto !important;
        right: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        max-height: 50vh;
        padding: 0 !important;
        border-radius: 0;
        z-index: 999;
        transition: max-height 0.35s ease;
    }

    /* Collapsed state — hanya tampilkan header */
    .widget-panel.collapsed {
        max-height: 64px;
        overflow: hidden !important;
    }

    .widget-panel .widget-card {
        border-radius: 20px 20px 0 0 !important;
        padding: 14px 16px 20px !important;
        border-bottom: none !important;
    }

    /* Handle bar untuk swipe hint / tap toggle */
    .widget-panel .widget-card::before {
        content: '';
        display: block;
        width: 36px;
        height: 4px;
        background: rgba(148, 163, 184, 0.4);
        border-radius: 4px;
        margin: 0 auto 10px;
        cursor: pointer;
    }

    .widget-panel .widget-card h2 {
        font-size: 1rem !important;
    }

    /* Toggle button */
    .widget-toggle {
        display: flex !important;
    }

    /* Sembunyikan konten saat collapsed */
    .widget-panel.collapsed .widget-body {
        opacity: 0;
        pointer-events: none;
    }

    .widget-body {
        transition: opacity 0.25s ease;
    }
}

/* Toggle button — hidden on desktop */
.widget-toggle {
    display: none !important;
}

/* ─── Expandable Widget Panel (Desktop) ─────────────────── */
@media (min-width: 768px) {
    .widget-panel {
        transition: max-width 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s ease;
    }
    .widget-panel.expanded {
        max-width: 780px !important;
    }
}

/* ─── Map Layer Switcher & Action Controls ───────────────── */
#mapLayersControl {
    transition: all 0.2s ease;
}

@media (max-width: 639px) {
    #mapLayersControl {
        top: 10px !important;
        left: 10px !important;
    }

    .leaflet-top.leaflet-left {
        top: 62px !important;
        left: 10px !important;
    }
    
    #layerDropdownMenu {
        max-width: calc(100vw - 32px);
    }
}

/* ─── Pulse & Glow Animations for Map Nodes ───────────────── */
@keyframes beacon-wave {
    0% {
        transform: scale(0.6);
        opacity: 0.8;
    }
    100% {
        transform: scale(2.6);
        opacity: 0;
    }
}

.beacon-wave {
    animation: beacon-wave 2.4s cubic-bezier(0.1, 0.5, 0.4, 1) infinite;
}

@keyframes radar-pulse {
    0% {
        transform: scale(0.6);
        opacity: 0.9;
    }
    70% {
        transform: scale(2.2);
        opacity: 0;
    }
    100% {
        transform: scale(2.2);
        opacity: 0;
    }
}

/* ─── Arc Flow Animation for Great Circle Lines ───────────── */
@keyframes flow-dash {
    from {
        stroke-dashoffset: 40;
    }
    to {
        stroke-dashoffset: 0;
    }
}

.leaflet-arc-line {
    stroke-dasharray: 6, 8;
    animation: flow-dash 1.8s linear infinite;
    filter: drop-shadow(0 0 6px rgba(168, 85, 247, 0.8));
    pointer-events: none;
}

/* ─── Ticker Bar Smooth Transition ──────────────────────── */
#visitorTickerBar {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── Digital Passport Hologram Effect ──────────────────── */
.passport-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 27, 75, 0.92) 50%, rgba(15, 23, 42, 0.95) 100%);
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.25), inset 0 0 20px rgba(56, 189, 248, 0.1);
}

.passport-holo-badge {
    background: linear-gradient(135deg, #38bdf8 0%, #818cf8 50%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ─── Toast Animation ───────────────────────────────────── */
#appToast.show {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

/* ─── Indonesia CCTV Live Node Styling (Crisp, No Glow) ─── */
.cctv-pulse-wave {
    display: none !important;
}

/* CCTV Leaflet Tooltip Custom Container */
.cctv-live-tooltip.leaflet-tooltip {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.cctv-live-tooltip.leaflet-tooltip::before {
    display: none !important;
}

.cctv-preview-card {
    background: rgba(10, 15, 29, 0.96) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(6, 182, 212, 0.45);
    box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.8), 0 0 24px rgba(6, 182, 212, 0.25) !important;
    border-radius: 18px;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.cctv-btn-active {
    background: rgba(6, 182, 212, 0.2) !important;
    border-color: rgba(6, 182, 212, 0.6) !important;
    color: #38bdf8 !important;
    box-shadow: 0 0 16px rgba(6, 182, 212, 0.3) !important;
}

.custom-node-cctv {
    z-index: 950 !important;
    pointer-events: auto !important;
}

/* CCTV Realtime Surveillance Screen Scanlines & OSD */
.cctv-scanline-overlay {
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.22) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    background-size: 100% 3px, 4px 100%;
    pointer-events: none;
}

.cctv-hud-font {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    letter-spacing: 0.04em;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.95), 0 0 2px rgba(6, 182, 212, 0.6);
}

.cctv-filter-pill {
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

/* ─── CCTV Command Center & Video Wall Matrix Styling ─────── */
.cctv-city-chip {
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.cctv-city-chip:hover {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(6, 182, 212, 0.5);
    color: #e2e8f0;
}
.cctv-city-chip.active {
    background: rgba(6, 182, 212, 0.2) !important;
    border-color: rgba(6, 182, 212, 0.7) !important;
    color: #38bdf8 !important;
    box-shadow: 0 0 14px rgba(6, 182, 212, 0.3);
}

#videoWallSection {
    background-color: #050811;
}

#videoWallGrid {
    height: 100%;
    width: 100%;
    min-height: 0;
}

.video-wall-cell {
    background: #000;
    border: 1px solid rgba(51, 65, 85, 0.75);
    position: relative;
    overflow: hidden;
    height: 100%;
    width: 100%;
    min-height: 0;
    min-width: 0;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.video-wall-cell:hover {
    border-color: rgba(6, 182, 212, 0.85);
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.3);
    z-index: 5;
}

.command-center-glow {
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.15), inset 0 0 15px rgba(6, 182, 212, 0.05);
}



