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

html, body {
    height: 100%;
    font-family: 'Roboto', sans-serif;
    background: #0a0e17;
    color: #e0e6ed;
    overflow: hidden;
}

.gis-app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
}

.gis-header {
    background: linear-gradient(135deg, #0d1b2a 0%, #1b2838 100%);
    border-bottom: 1px solid rgba(0, 180, 255, 0.15);
    padding: 0 20px;
    display: flex;
    align-items: center;
    height: 56px;
    flex-shrink: 0;
    z-index: 1000;
}

.gis-header .header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 30px;
}

.gis-header .header-brand img {
    height: 36px;
    width: auto;
}

.gis-header .header-brand .brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.gis-header .header-brand .brand-text h1 {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gis-header .header-brand .brand-text span {
    font-size: 10px;
    color: #64b5f6;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gis-tabs {
    display: flex;
    align-items: center;
    gap: 2px;
    height: 100%;
    overflow-x: auto;
}

.gis-tabs::-webkit-scrollbar {
    display: none;
}

.gis-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 16px;
    height: 100%;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: #8899aa;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gis-tab:hover {
    color: #b0c4d8;
    background: rgba(255, 255, 255, 0.03);
}

.gis-tab.active {
    color: #00bcd4;
    border-bottom-color: #00bcd4;
    background: rgba(0, 188, 212, 0.05);
}

.gis-tab i {
    font-size: 14px;
}

.gis-header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.gis-header-right .live-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(244, 67, 54, 0.15);
    border: 1px solid rgba(244, 67, 54, 0.3);
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    color: #f44336;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gis-header-right .live-badge .dot {
    width: 6px;
    height: 6px;
    background: #f44336;
    border-radius: 50%;
    animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.5); }
}

.gis-header-right .clock {
    font-size: 13px;
    font-weight: 500;
    color: #90a4ae;
    font-variant-numeric: tabular-nums;
}

.gis-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.gis-filter-bar {
    background: #0d1520;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.gis-filter-bar .filter-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.gis-filter-bar label {
    font-size: 11px;
    color: #607d8b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gis-filter-bar select,
.gis-filter-bar input {
    background: #141e2b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cfd8dc;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    outline: none;
    transition: border-color 0.2s;
}

.gis-filter-bar select:focus,
.gis-filter-bar input:focus {
    border-color: #00bcd4;
}

.gis-filter-bar .filter-divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.08);
}

.gis-filter-bar .filter-legend {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.gis-filter-bar .legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #78909c;
}

.gis-filter-bar .legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.gis-map-container {
    flex: 1;
    position: relative;
    overflow: hidden;
}

#gis-map {
    width: 100%;
    height: 100%;
    background: #0a1929;
}

.gis-stats {
    background: #0d1520;
    border-top: 1px solid rgba(0, 180, 255, 0.1);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
    overflow-x: auto;
}

.gis-stats::-webkit-scrollbar {
    display: none;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    min-width: 160px;
    flex-shrink: 0;
}

.stat-card .stat-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 16px;
}

.stat-card .stat-icon.blue { background: rgba(33, 150, 243, 0.15); color: #2196f3; }
.stat-card .stat-icon.green { background: rgba(76, 175, 80, 0.15); color: #4caf50; }
.stat-card .stat-icon.orange { background: rgba(255, 152, 0, 0.15); color: #ff9800; }
.stat-card .stat-icon.red { background: rgba(244, 67, 54, 0.15); color: #f44336; }
.stat-card .stat-icon.purple { background: rgba(156, 39, 176, 0.15); color: #9c27b0; }
.stat-card .stat-icon.teal { background: rgba(0, 150, 136, 0.15); color: #009688; }
.stat-card .stat-icon.cyan { background: rgba(0, 188, 212, 0.15); color: #00bcd4; }

.stat-card .stat-info {
    display: flex;
    flex-direction: column;
}

.stat-card .stat-info .stat-value {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.stat-card .stat-info .stat-label {
    font-size: 10px;
    color: #607d8b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.leaflet-popup-content-wrapper {
    background: #1a2332 !important;
    border: 1px solid rgba(0, 188, 212, 0.2) !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
    color: #e0e6ed !important;
}

.leaflet-popup-tip {
    background: #1a2332 !important;
}

.leaflet-popup-content {
    margin: 12px 16px !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
}

.leaflet-popup-content h4 {
    font-size: 14px;
    font-weight: 600;
    color: #00bcd4;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 6px;
}

.leaflet-popup-content .popup-row {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.leaflet-popup-content .popup-row .label {
    color: #78909c;
    margin-right: 10px;
}

.leaflet-popup-content .popup-row .value {
    font-weight: 500;
    color: #cfd8dc;
    text-align: right;
}

.leaflet-popup-content .popup-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.leaflet-popup-content .popup-status.normal { background: rgba(76, 175, 80, 0.2); color: #4caf50; }
.leaflet-popup-content .popup-status.perhatian { background: rgba(255, 152, 0, 0.2); color: #ff9800; }
.leaflet-popup-content .popup-status.masalah { background: rgba(244, 67, 54, 0.2); color: #f44336; }
.leaflet-popup-content .popup-status.berjalan { background: rgba(33, 150, 243, 0.2); color: #2196f3; }
.leaflet-popup-content .popup-status.selesai { background: rgba(76, 175, 80, 0.2); color: #4caf50; }
.leaflet-popup-content .popup-status.terlambat { background: rgba(244, 67, 54, 0.2); color: #f44336; }
.leaflet-popup-content .popup-status.baru { background: rgba(244, 67, 54, 0.2); color: #f44336; }
.leaflet-popup-content .popup-status.diproses { background: rgba(255, 152, 0, 0.2); color: #ff9800; }

.popup-progres-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 4px;
}

.popup-progres-bar .fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.popup-progres-bar .fill.low { background: #f44336; }
.popup-progres-bar .fill.mid { background: #ff9800; }
.popup-progres-bar .fill.high { background: #4caf50; }

.gis-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 999;
    display: none;
}

.gis-loading.show {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.gis-loading .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 188, 212, 0.2);
    border-top-color: #00bcd4;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.gis-loading span {
    font-size: 12px;
    color: #607d8b;
}

.kabupaten-info-panel {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 800;
    background: rgba(13, 21, 32, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 188, 212, 0.15);
    border-radius: 10px;
    padding: 16px;
    width: 280px;
    max-height: calc(100% - 20px);
    overflow-y: auto;
    display: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.kabupaten-info-panel.show {
    display: block;
}

.kabupaten-info-panel .panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.kabupaten-info-panel .panel-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: #00bcd4;
}

.kabupaten-info-panel .panel-header .close-btn {
    cursor: pointer;
    color: #607d8b;
    font-size: 16px;
    line-height: 1;
}

.kabupaten-info-panel .panel-header .close-btn:hover {
    color: #f44336;
}

.kabupaten-info-panel .panel-stat {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 12px;
}

.kabupaten-info-panel .panel-stat .label {
    color: #78909c;
}

.kabupaten-info-panel .panel-stat .value {
    font-weight: 600;
    color: #e0e6ed;
}

.kabupaten-info-panel .panel-section-title {
    font-size: 11px;
    color: #00bcd4;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 12px;
    margin-bottom: 6px;
}

@media (max-width: 768px) {
    .gis-header {
        height: 48px;
        padding: 0 10px;
    }

    .gis-header .header-brand {
        margin-right: 10px;
    }

    .gis-header .header-brand .brand-text h1 {
        font-size: 11px;
    }

    .gis-tab {
        padding: 0 10px;
        font-size: 10px;
    }

    .gis-tab .tab-text {
        display: none;
    }

    .gis-filter-bar {
        padding: 6px 10px;
        gap: 6px;
        flex-wrap: wrap;
    }

    .gis-stats {
        padding: 8px 10px;
        gap: 8px;
    }

    .stat-card {
        min-width: 130px;
        padding: 6px 10px;
    }
}

/* ===== BERITA FLASH CARD PANEL ===== */
.gis-main-area {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.gis-map-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.gis-berita-panel {
    width: 320px;
    flex-shrink: 0;
    background: #0b1120;
    border-left: 1px solid rgba(0, 188, 212, 0.12);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.gis-berita-header {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.gis-berita-header i {
    color: #f44336;
    font-size: 14px;
    animation: pulse-dot 1.5s infinite;
}

.gis-berita-header span {
    font-size: 12px;
    font-weight: 600;
    color: #cfd8dc;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.gis-berita-scroll {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.gis-berita-track {
    display: flex;
    flex-direction: column;
    animation: berita-scroll 30s linear infinite;
}

.gis-berita-track:hover {
    animation-play-state: paused;
}

@keyframes berita-scroll {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

.berita-card {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.berita-card:hover {
    background: rgba(0, 188, 212, 0.05);
}

.berita-card .berita-img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 10px;
    background: #1a2332;
}

.berita-card .berita-sumber {
    font-size: 10px;
    color: #00bcd4;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.berita-card .berita-sumber i {
    font-size: 8px;
}

.berita-card .berita-judul {
    font-size: 13px;
    font-weight: 600;
    color: #e0e6ed;
    line-height: 1.4;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.berita-card .berita-desc {
    font-size: 11px;
    color: #78909c;
    line-height: 1.4;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.berita-card .berita-date {
    font-size: 11px;
    color: #546e7a;
    display: flex;
    align-items: center;
    gap: 4px;
}

.berita-card .berita-date i {
    font-size: 10px;
}

@media (max-width: 1024px) {
    .gis-berita-panel {
        display: none;
    }
}
