/* Gaya halaman peta (index.php) */
    * {
        box-sizing: border-box;
    }

    html,
    body {
        margin: 0;
        padding: 0;
        height: 100%;
        overflow: hidden;
        background: #aad3df;
        font-family: 'Roboto', Arial, sans-serif;
        color: #263238;
    }

    #map {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
    }

    .leaflet-container {
        font-family: inherit;
    }

    button {
        font-family: inherit;
        cursor: pointer;
    }

    /* ===== Ikon pos (seragam) ===== */
    .pos-marker {
        position: relative;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background: var(--bg);
        border: 2px solid var(--bd);
        color: var(--fg);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
        display: flex;
        align-items: center;
        justify-content: center;
        flex: none;
    }

    .pos-marker .glyph {
        width: 20px;
        height: 20px;
    }

    .pos-marker .pulse {
        position: absolute;
        top: -12px;
        left: -12px;
        right: -12px;
        bottom: -12px;
        border-radius: 50%;
        border: 4px solid var(--bg);
        opacity: 0;
        animation: pulsate 3.6s ease-out infinite;
        pointer-events: none;
    }

    @keyframes pulsate {
        0% {
            transform: scale(0.1, 0.1);
            opacity: 0;
        }

        50% {
            opacity: 1;
        }

        100% {
            transform: scale(1.2, 1.2);
            opacity: 0;
        }
    }

    /* Ikon berkedip saat hujan */
    .pos-marker.berkedip {
        animation: kedip 2.4s ease-in-out infinite;
    }

    @keyframes kedip {

        0%,
        100% {
            opacity: 1;
            transform: scale(1);
        }

        50% {
            opacity: 0.45;
            transform: scale(0.9);
        }
    }

    .pos-marker .badge-off {
        position: absolute;
        right: -5px;
        bottom: -5px;
        width: 16px;
        height: 16px;
    }

    .pos-marker.mini {
        width: 22px;
        height: 22px;
        border-width: 1.5px;
        box-shadow: none;
    }

    .pos-marker.mini .glyph {
        width: 13px;
        height: 13px;
    }

    .pos-marker.mini .badge-off {
        right: -4px;
        bottom: -4px;
        width: 11px;
        height: 11px;
    }

    .pos-marker.besar {
        width: 44px;
        height: 44px;
        box-shadow: none;
    }

    .pos-marker.besar .glyph {
        width: 26px;
        height: 26px;
    }

    /* ===== Tombol daftar pos (kiri atas) ===== */
    .tombol-daftar {
        display: flex;
        align-items: center;
        gap: 8px;
        height: 44px;
        padding: 0 16px 0 12px;
        border: 0;
        border-radius: 22px;
        background: #fff;
        color: #263238;
        font-size: 15px;
        font-weight: 500;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    .tombol-daftar svg {
        width: 22px;
        height: 22px;
        fill: #0d47a1;
    }

    .tombol-daftar .jumlah-hujan {
        display: none;
        padding: 2px 8px;
        border-radius: 10px;
        background: #1565c0;
        color: #fff;
        font-size: 12px;
    }

    .tombol-daftar .jumlah-hujan.ada {
        display: inline-block;
    }

    /* ===== Legenda (bisa dilipat & interaktif) ===== */
    .legend {
        width: 285px;
        background: rgba(255, 255, 255, 0.92);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.6);
        border-radius: 16px;
        box-shadow: 0 8px 28px rgba(15, 40, 80, 0.22);
        font-size: 13px;
        color: #455a64;
        overflow: hidden;
    }

    .legend.tertutup {
        width: auto;
    }

    .legend-kepala {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        width: 100%;
        padding: 12px 14px;
        border: 0;
        background: transparent;
        font-size: 14px;
        font-weight: 700;
        color: #263238;
    }

    .legend-kepala .panah {
        display: inline-flex;
        width: 24px;
        height: 24px;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: #eef2f7;
        font-size: 11px;
        transition: transform 0.25s;
    }

    .legend.tertutup .legend-kepala .panah {
        transform: rotate(180deg);
    }

    .legend-isi {
        max-height: 62vh;
        padding: 0 10px 12px;
        overflow-y: auto;
    }

    .legend.tertutup .legend-isi {
        display: none;
    }

    .legend-seksi {
        margin: 6px 4px 6px;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.6px;
        text-transform: uppercase;
        color: #90a4ae;
    }

    /* Pilihan tampilan peta (Peta / Satelit / Topografi) */
    .pilih-peta {
        display: flex;
        gap: 8px;
        margin: 0 4px 4px;
    }

    .pilih-peta button {
        flex: 1;
        padding: 0 0 5px;
        border: 2px solid transparent;
        border-radius: 12px;
        background: #f1f5f9;
        color: #455a64;
        font-size: 12px;
        font-weight: 500;
        overflow: hidden;
        transition: border-color 0.15s, transform 0.15s;
    }

    .pilih-peta button:hover {
        transform: translateY(-1px);
    }

    .pilih-peta button.aktif {
        border-color: #1565c0;
        background: #e3f2fd;
        color: #0d47a1;
    }

    .pilih-peta img {
        display: block;
        width: 100%;
        height: 44px;
        margin-bottom: 4px;
        object-fit: cover;
        background: #cfd8dc;
    }

    /* Label nama pos (muncul saat zoom >= ZOOM_LABEL) */
    .leaflet-tooltip.label-pos {
        display: none;
        padding: 2px 7px;
        border: 0;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.92);
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
        color: #263238;
        font-size: 11.5px;
        font-weight: 500;
        white-space: nowrap;
    }

    .leaflet-tooltip.label-pos::before {
        display: none;
    }

    .leaflet-tooltip.label-pos b {
        color: #0d47a1;
    }

    .tampil-label .leaflet-tooltip.label-pos {
        display: block;
    }

    /* Sakelar citra satelit BMKG di legenda */
    .sakelar-satelit {
        display: flex;
        align-items: center;
        gap: 10px;
        margin: 10px 4px 0;
        padding: 8px 10px;
        border-radius: 12px;
        background: #f1f5f9;
        cursor: pointer;
    }

    .sakelar-satelit input {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

    .sakelar {
        position: relative;
        flex: none;
        width: 38px;
        height: 22px;
        border-radius: 11px;
        background: #b0bec5;
        transition: background 0.2s;
    }

    .sakelar::after {
        content: '';
        position: absolute;
        top: 3px;
        left: 3px;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        background: #fff;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
        transition: transform 0.2s;
    }

    .sakelar-satelit input:checked + .sakelar {
        background: #1565c0;
    }

    .sakelar-satelit input:checked + .sakelar::after {
        transform: translateX(16px);
    }

    .teks-sakelar b {
        display: block;
        font-size: 12.5px;
        color: #263238;
    }

    .teks-sakelar small {
        display: block;
        font-size: 11px;
        color: #78909c;
    }

    .sakelar-satelit .pos-marker.mini {
        margin-left: auto;
    }

    .legenda-satelit .pos-marker.mini {
        display: inline-flex;
        width: 16px;
        height: 16px;
        margin-right: 2px;
        vertical-align: middle;
    }

    .legenda-satelit .pos-marker.mini .glyph {
        width: 10px;
        height: 10px;
    }

    .legenda-satelit .pos-marker.mini .badge-manual {
        display: none;
    }

    .legenda-satelit {
        display: flex;
        flex-wrap: wrap;
        gap: 4px 10px;
        margin: 6px 6px 0;
        font-size: 11px;
        color: #607d8b;
    }

    .legenda-satelit i {
        display: inline-block;
        width: 14px;
        height: 10px;
        margin-right: 4px;
        border-radius: 2px;
        vertical-align: -1px;
    }

    /* Di atas citra satelit, garis penunjuk pos dibuat lebih terang */
    .mode-satelit .leaflet-overlay-pane path {
        stroke: #fff;
    }

    .legend-seksi small {
        font-weight: 400;
        text-transform: none;
        letter-spacing: 0;
    }

    /* Bilah skala warna curah hujan */
    .skala {
        display: flex;
        height: 12px;
        margin: 2px 4px 0;
        border-radius: 6px;
        overflow: hidden;
    }

    .skala span {
        flex: 1;
        cursor: pointer;
        transition: opacity 0.2s, transform 0.2s;
    }

    .skala span:hover {
        transform: scaleY(1.35);
    }

    .skala span.mati {
        opacity: 0.2;
    }

    .skala-angka {
        display: flex;
        margin: 3px 4px 6px;
        font-size: 10px;
        color: #90a4ae;
    }

    .skala-angka span {
        flex: 1;
    }

    .legend-baris {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        padding: 5px 6px;
        border: 0;
        border-radius: 10px;
        background: transparent;
        color: #37474f;
        font-size: 13px;
        text-align: left;
        transition: background 0.15s, opacity 0.2s;
    }

    .legend-baris:hover {
        background: #eef4fb;
    }

    .legend-baris .teks {
        flex: 1;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .legend-baris .range {
        color: #90a4ae;
        font-size: 12px;
        white-space: nowrap;
    }

    .legend-baris .jumlah {
        min-width: 26px;
        padding: 1px 7px;
        border-radius: 10px;
        background: #eceff1;
        color: #546e7a;
        font-size: 11px;
        font-weight: 700;
        text-align: center;
    }

    .legend-baris.ada .jumlah {
        background: #1565c0;
        color: #fff;
    }

    .legend-baris.mati {
        opacity: 0.4;
    }

    .legend-baris.mati .teks {
        text-decoration: line-through;
    }

    .legend-kaki {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        margin: 8px 4px 0;
        padding-top: 8px;
        border-top: 1px solid #eceff1;
        font-size: 11px;
        color: #90a4ae;
    }

    .legend-kaki button {
        padding: 3px 10px;
        border: 0;
        border-radius: 10px;
        background: #e3f2fd;
        color: #1565c0;
        font-size: 11px;
        font-weight: 500;
    }

    .legend-update {
        display: flex;
        align-items: center;
        gap: 6px;
        margin: 6px 4px 0;
        font-size: 11px;
        color: #78909c;
    }

    .legend-update::before {
        content: '';
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: #43a047;
        box-shadow: 0 0 0 3px rgba(67, 160, 71, 0.2);
    }

    /* Sorot pos saat kursor di atas baris legenda */
    .mode-sorot .leaflet-marker-icon {
        opacity: 0.18 !important;
        transition: opacity 0.2s;
    }

    .mode-sorot .leaflet-marker-icon.disorot {
        opacity: 1 !important;
    }

    /* ===== Panel daftar pos ===== */
    .panel {
        position: fixed;
        z-index: 1100;
        top: 0;
        bottom: 0;
        left: 0;
        width: 360px;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        background: #fff;
        box-shadow: 2px 0 16px rgba(0, 0, 0, 0.3);
        transform: translateX(-105%);
        transition: transform 0.25s ease;
    }

    .panel.buka {
        transform: none;
    }

    .panel-kepala {
        padding: 16px 16px 8px;
    }

    .panel-judul {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .panel-judul h2 {
        margin: 0;
        font-size: 18px;
        font-weight: 700;
    }

    .panel-sub {
        margin-top: 2px;
        font-size: 12px;
        color: #78909c;
    }

    .tombol-tutup {
        width: 36px;
        height: 36px;
        border: 0;
        border-radius: 50%;
        background: #eceff1;
        color: #455a64;
        font-size: 20px;
        line-height: 36px;
    }

    .kolom-cari {
        width: 100%;
        margin-top: 12px;
        padding: 10px 14px;
        border: 1px solid #cfd8dc;
        border-radius: 10px;
        font-size: 16px;
        outline: none;
    }

    .kolom-cari:focus {
        border-color: #1565c0;
    }

    .filter {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin-top: 10px;
    }

    .filter button {
        flex: none;
        padding: 6px 12px;
        border: 1px solid #cfd8dc;
        border-radius: 16px;
        background: #fff;
        color: #455a64;
        font-size: 13px;
    }

    .filter button.aktif {
        border-color: #1565c0;
        background: #1565c0;
        color: #fff;
    }

    .daftar-pos {
        flex: 1;
        margin: 0;
        padding: 0 8px 16px;
        list-style: none;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .daftar-pos li {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 8px;
        border-bottom: 1px solid #eceff1;
        cursor: pointer;
    }

    .daftar-pos li:hover {
        background: #f5f9ff;
    }

    .daftar-pos .nama {
        flex: 1;
        min-width: 0;
        font-size: 14px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .daftar-pos .nilai {
        flex: none;
        font-size: 13px;
        font-weight: 500;
        color: #455a64;
    }

    .daftar-pos .nilai.off {
        color: #e53935;
    }

    .daftar-pos .nama small {
        display: block;
        font-size: 11.5px;
        color: #90a4ae;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Tombol download Excel (di bawah tombol Daftar Pos) */
    .tombol-daftar.tombol-instal {
        display: none;
        background: #0d47a1;
        color: #fff;
    }

    .tombol-daftar.tombol-instal.tampil {
        display: flex;
    }

    .tombol-daftar.tombol-instal svg {
        fill: #fff;
    }

    .tombol-daftar.tombol-unduh svg {
        fill: #2e7d32;
    }

    /* Dialog download */
    .modal-unduh {
        position: fixed;
        z-index: 1200;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 16px;
        background: rgba(15, 30, 50, 0.45);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s;
    }

    .modal-unduh.buka {
        opacity: 1;
        pointer-events: auto;
    }

    .modal-kotak {
        width: 100%;
        max-width: 420px;
        padding: 20px;
        border-radius: 18px;
        background: #fff;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
        transform: translateY(12px);
        transition: transform 0.2s;
    }

    .modal-unduh.buka .modal-kotak {
        transform: none;
    }

    .modal-kepala {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 14px;
    }

    .modal-kepala h3 {
        margin: 0;
        font-size: 18px;
    }

    .opsi {
        display: flex;
        align-items: center;
        gap: 12px;
        margin: 0 0 10px;
        padding: 12px 14px;
        border: 2px solid #e3e8ee;
        border-radius: 14px;
        cursor: pointer;
        transition: border-color 0.15s, background 0.15s;
    }

    .opsi:has(input:checked) {
        border-color: #1565c0;
        background: #f3f8ff;
    }

    .opsi input {
        width: 18px;
        height: 18px;
        margin: 0;
        accent-color: #1565c0;
    }

    .opsi span {
        flex: 1;
    }

    .opsi b {
        display: block;
        font-size: 14px;
    }

    .opsi small {
        display: block;
        margin-top: 2px;
        font-size: 12px;
        color: #78909c;
    }

    .opsi em {
        padding: 2px 10px;
        border-radius: 10px;
        background: #eceff1;
        font-size: 12px;
        font-style: normal;
        font-weight: 700;
        color: #455a64;
    }

    /* Pilihan format: Excel / WhatsApp */
    .pilih-format {
        display: flex;
        gap: 6px;
        margin-bottom: 14px;
        padding: 4px;
        border-radius: 14px;
        background: #eef2f6;
    }

    .pilih-format button {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        height: 40px;
        border: 0;
        border-radius: 10px;
        background: transparent;
        color: #607d8b;
        font-size: 14px;
        font-weight: 500;
        transition: background 0.15s, color 0.15s;
    }

    .pilih-format svg {
        width: 20px;
        height: 20px;
        fill: currentColor;
    }

    .pilih-format button.aktif {
        background: #fff;
        color: #263238;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
    }

    .pilih-format button[data-format=excel].aktif svg {
        fill: #2e7d32;
    }

    .pilih-format button[data-format=wa].aktif svg {
        fill: #25d366;
    }

    .bagian-wa,
    .modal-kotak.mode-wa .bagian-excel {
        display: none;
    }

    .modal-kotak.mode-wa .bagian-wa {
        display: block;
    }

    /* Pratinjau pesan WhatsApp (gaya gelembung chat) */
    .pratinjau-wa {
        max-height: 34vh;
        margin: 4px 0 14px;
        padding: 10px 12px;
        border-radius: 12px 12px 12px 4px;
        background: #dcf8c6 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3C/svg%3E");
        box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
        color: #111b21;
        font-size: 13px;
        line-height: 1.45;
        white-space: pre-wrap;
        overflow-y: auto;
    }

    .pilih-wa {
        display: flex;
        gap: 6px;
        margin: 2px 0 10px;
    }

    .pilih-wa button {
        flex: 1;
        height: 34px;
        border: 1px solid #cfd8dc;
        border-radius: 17px;
        background: #fff;
        color: #546e7a;
        font-size: 12.5px;
    }

    .pilih-wa button.aktif {
        border-color: #1fa855;
        background: #e8f8ee;
        color: #146c38;
        font-weight: 500;
    }

    .wa-teks,
    .bagian-wa.mode-teks .wa-gambar {
        display: none;
    }

    .bagian-wa.mode-teks .wa-teks {
        display: block;
    }

    .pratinjau-gambar {
        max-height: 34vh;
        margin-bottom: 12px;
        border-radius: 12px;
        background: #eef2f6;
        overflow-y: auto;
    }

    .pratinjau-gambar img {
        display: block;
        width: 100%;
    }

    .catatan-wa {
        margin-top: 8px;
        font-size: 12px;
        color: #607d8b;
        text-align: center;
    }

    .tombol-baris {
        display: flex;
        gap: 8px;
    }

    .tombol-kedua {
        flex: none;
        height: 48px;
        padding: 0 16px;
        border: 0;
        border-radius: 14px;
        background: #eef2f6;
        color: #37474f;
        font-size: 14px;
        font-weight: 500;
    }

    .tombol-utama.tombol-wa {
        flex: 1;
        background: #1fa855;
    }

    .modal-kolom {
        margin: 4px 2px 16px;
        font-size: 12px;
        color: #78909c;
    }

    .tombol-utama {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
        height: 48px;
        border: 0;
        border-radius: 14px;
        background: #2e7d32;
        color: #fff;
        font-size: 15px;
        font-weight: 500;
    }

    .tombol-utama:disabled {
        opacity: 0.6;
    }

    .tombol-utama svg {
        width: 20px;
        height: 20px;
        fill: #fff;
    }

    /* Riwayat rekap di kartu detail */
    .kartu-lokasi {
        margin-top: 2px;
        font-size: 12px;
        color: #78909c;
    }

    .riwayat {
        margin-top: 12px;
        padding-top: 10px;
        border-top: 1px solid #eceff1;
    }

    .riwayat-judul {
        display: flex;
        justify-content: space-between;
        margin-bottom: 6px;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        color: #90a4ae;
    }

    .riwayat-grafik {
        display: block;
        width: 100%;
        height: 64px;
        margin-bottom: 6px;
    }

    .riwayat-daftar {
        max-height: 150px;
        margin: 0;
        padding: 0;
        list-style: none;
        overflow-y: auto;
        font-size: 12.5px;
    }

    .riwayat-daftar li {
        display: flex;
        gap: 8px;
        padding: 4px 2px;
        border-bottom: 1px solid #f3f5f7;
    }

    .riwayat-daftar .w {
        flex: 1;
        color: #607d8b;
    }

    .riwayat-daftar .v {
        font-weight: 700;
    }

    .riwayat-daftar .d {
        width: 58px;
        text-align: right;
        font-size: 11.5px;
    }

    .riwayat-daftar .v.ada-hujan {
        color: #1565c0;
    }

    .riwayat-daftar .d.harian {
        width: 96px;
        color: #78909c;
    }

    .d.naik {
        color: #c62828;
    }

    .d.turun {
        color: #2e7d32;
    }

    .d.tetap {
        color: #b0bec5;
    }

    .riwayat-kosong {
        font-size: 12px;
        color: #90a4ae;
    }

    @media (max-width: 767px) {
        .modal-unduh {
            align-items: flex-end;
            padding: 0;
        }

        .modal-kotak {
            max-width: none;
            padding-bottom: calc(20px + env(safe-area-inset-bottom));
            border-radius: 18px 18px 0 0;
        }

        .sheet {
            max-height: 85vh;
            overflow-y: auto;
        }
    }

    /* Tombol "Lihat data" di kartu detail */
    .tombol-lihat-data {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
        height: 40px;
        margin-top: 12px;
        border: 0;
        border-radius: 12px;
        background: #e3f2fd;
        color: #0d47a1;
        font-size: 13.5px;
        font-weight: 500;
    }

    .tombol-lihat-data:hover {
        background: #d0e7fb;
    }

    .tombol-lihat-data svg {
        width: 18px;
        height: 18px;
        fill: currentColor;
    }

    /* Jendela data pos */
    .modal-kotak.kotak-data {
        display: flex;
        flex-direction: column;
        max-width: 760px;
        max-height: 92vh;
    }

    .kotak-data .modal-kepala,
    .kotak-data .pilih-hari,
    .kotak-data .tombol-utama {
        flex: none;
    }

    .data-judul {
        display: flex;
        align-items: center;
        gap: 12px;
        min-width: 0;
    }

    .data-judul h3 {
        margin: 0;
        font-size: 18px;
        line-height: 1.2;
    }

    .data-isi {
        flex: 1;
        min-height: 160px;
        margin: 0 -4px 14px;
        padding: 0 4px;
        overflow-y: auto;
    }

    .kotak-statistik {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        margin-bottom: 12px;
    }

    .statistik {
        padding: 10px 12px;
        border-radius: 12px;
        background: #f3f6f9;
    }

    .statistik small {
        display: block;
        font-size: 11px;
        color: #78909c;
    }

    .statistik b {
        display: block;
        margin-top: 2px;
        font-size: 18px;
        color: #263238;
    }

    .statistik span {
        display: block;
        font-size: 11px;
        color: #90a4ae;
    }

    .grafik-besar {
        display: block;
        width: 100%;
        height: auto;
        margin-bottom: 12px;
        border-radius: 12px;
        background: #fafcfe;
    }

    .data-sub {
        margin: 10px 2px 6px;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        color: #90a4ae;
    }

    .tabel-data {
        width: 100%;
        border-collapse: collapse;
        font-size: 13px;
    }

    .tabel-data th {
        position: sticky;
        top: 0;
        padding: 7px 8px;
        background: #eef2f6;
        color: #546e7a;
        font-size: 12px;
        font-weight: 500;
        text-align: left;
    }

    .tabel-data td {
        padding: 6px 8px;
        border-bottom: 1px solid #f1f4f7;
    }

    .tabel-data td.angka,
    .tabel-data th.angka {
        text-align: right;
        white-space: nowrap;
    }

    .tabel-data tr.ada-hujan td.angka:first-of-type {
        color: #1565c0;
        font-weight: 700;
    }

    .catatan-reset {
        margin: -2px 2px 6px;
        font-size: 11.5px;
        color: #78909c;
    }

    .data-kosong {
        padding: 36px 12px;
        text-align: center;
        color: #90a4ae;
    }

    @media (max-width: 767px) {
        .modal-kotak.kotak-data {
            height: 94vh;
            max-height: none;
        }

        .kotak-statistik {
            grid-template-columns: repeat(2, 1fr);
        }
    }

    .daftar-kosong {
        padding: 24px;
        text-align: center;
        color: #90a4ae;
    }

    /* ===== Kartu detail pos (popup desktop & bottom sheet mobile) ===== */
    .kartu {
        min-width: 230px;
    }

    .kartu-kepala {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .kartu-jenis {
        font-size: 11px;
        font-weight: 500;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        color: #78909c;
    }

    .kartu-nama {
        font-size: 16px;
        font-weight: 700;
        line-height: 1.25;
    }

    .kartu-nilai {
        display: flex;
        align-items: baseline;
        gap: 6px;
        margin-top: 14px;
    }

    .kartu-nilai .angka {
        font-size: 34px;
        font-weight: 700;
        line-height: 1;
    }

    .kartu-nilai .satuan {
        font-size: 15px;
        color: #607d8b;
    }

    .kartu-ket {
        font-size: 12px;
        color: #78909c;
    }

    .chip {
        display: inline-block;
        margin-top: 10px;
        padding: 4px 10px;
        border-radius: 12px;
        font-size: 12px;
        font-weight: 500;
    }

    .kartu-waktu {
        margin-top: 12px;
        padding-top: 10px;
        border-top: 1px solid #eceff1;
        font-size: 13px;
        color: #546e7a;
    }

    .kartu-peringatan {
        margin-top: 10px;
        padding: 8px 10px;
        border-radius: 8px;
        background: #ffebee;
        color: #c62828;
        font-size: 13px;
    }

    .leaflet-popup-content-wrapper {
        border-radius: 14px;
    }

    .leaflet-popup-content {
        margin: 16px 18px;
    }

    /* Bottom sheet detail (khusus mobile) */
    .sheet {
        position: fixed;
        z-index: 1050;
        left: 0;
        right: 0;
        bottom: 0;
        padding: 8px 20px calc(20px + env(safe-area-inset-bottom));
        background: #fff;
        border-radius: 18px 18px 0 0;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
        transform: translateY(110%);
        transition: transform 0.25s ease;
    }

    .sheet.buka {
        transform: none;
    }

    .sheet-pegangan {
        width: 40px;
        height: 5px;
        margin: 0 auto 12px;
        border-radius: 3px;
        background: #cfd8dc;
    }

    .sheet .tombol-tutup {
        position: absolute;
        top: 14px;
        right: 14px;
    }

    .latar {
        position: fixed;
        z-index: 1090;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        background: rgba(0, 0, 0, 0.35);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s;
    }

    .latar.buka {
        opacity: 1;
        pointer-events: auto;
    }

    /* ===== Mobile ===== */
    @media (max-width: 767px) {
        .leaflet-control-zoom {
            display: none;
        }

        .tombol-daftar {
            height: 42px;
            font-size: 14px;
        }

        .legend {
            width: 265px;
            font-size: 12px;
        }

        .legend.tertutup {
            width: auto;
        }

        .legend-isi {
            max-height: 55vh;
        }

        .legend-baris {
            gap: 8px;
        }

        .legend-baris .range {
            font-size: 10.5px;
        }

        /* Panel daftar pos jadi bottom sheet tinggi */
        .panel {
            top: auto;
            width: 100%;
            height: 82vh;
            border-radius: 18px 18px 0 0;
            transform: translateY(105%);
            padding-bottom: env(safe-area-inset-bottom);
        }

        .panel.buka {
            transform: none;
        }

        .panel-kepala::before {
            content: '';
            display: block;
            width: 40px;
            height: 5px;
            margin: -6px auto 10px;
            border-radius: 3px;
            background: #cfd8dc;
        }
    }

    /* ===== Titik kualitas air: ikon belah ketupat, warna = status mutu air ===== */
    .ikon-ka {
        position: relative;
        width: 26px;
        height: 26px;
    }

    .ikon-ka::before {
        content: '';
        position: absolute;
        inset: 4px;
        border: 2px solid #fff;
        border-radius: 5px;
        background: var(--ka);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
        transform: rotate(45deg);
    }

    .ikon-ka svg {
        position: absolute;
        inset: 7px;
        width: 12px;
        height: 12px;
        fill: #fff;
    }

    .ka-param {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 5px;
        margin-top: 10px;
    }

    .ka-param div {
        padding: 5px 7px;
        border-radius: 8px;
        background: #f3f6f9;
        font-size: 10.5px;
        color: #78909c;
    }

    .ka-param div.lewat {
        background: #ffebee;
        color: #c62828;
    }

    .ka-param b {
        display: block;
        font-size: 13px;
        color: #263238;
    }

    .ka-param div.lewat b {
        color: #c62828;
    }

    /* ===== Pos manual: ikon kotak membulat + lencana "M" ===== */
    .pos-marker.manual {
        border-radius: 9px;
    }

    .pos-marker .badge-manual {
        position: absolute;
        left: -6px;
        bottom: -6px;
        min-width: 16px;
        height: 16px;
        padding: 0 3px;
        border: 1.5px solid #fff;
        border-radius: 8px;
        background: #7b1fa2;
        color: #fff;
        font-size: 9.5px;
        font-weight: 700;
        line-height: 13px;
        text-align: center;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
    }

    .pos-marker.mini .badge-manual {
        left: -5px;
        bottom: -5px;
        min-width: 12px;
        height: 12px;
        font-size: 7.5px;
        line-height: 9px;
    }

    .nav-menu a.nav-login {
        display: inline-flex;
        align-items: center;
        height: 38px;
        margin-left: 4px;
        padding: 0 12px;
        border-radius: 9px;
        background: #ffd54f;
        color: #14306b;
        font-size: 14px;
        font-weight: 700;
        text-decoration: none;
        white-space: nowrap;
    }

    .nav-menu a.nav-login:hover {
        background: #ffe082;
    }

    /* "Input Data" berupa menu: Input Pos Manual / Import Kualitas Air */
    .nav-menu .nav-drop > button.nav-login {
        margin-left: 4px;
        background: #ffd54f;
        color: #14306b;
        font-weight: 700;
    }

    .nav-menu .nav-drop > button.nav-login:hover,
    .nav-menu .nav-drop.buka > button.nav-login {
        background: #ffe082;
    }

    .nav-input .nav-drop-isi,
    .nav-impor .nav-drop-isi {
        left: auto;
        right: 0;
    }

    .kartu-manual {
        margin-top: 10px;
        padding: 9px 11px;
        border-radius: 10px;
        background: #f5edfb;
        color: #4a148c;
        font-size: 12.5px;
    }

    .kartu-manual b {
        font-size: 14px;
    }

    .kartu-manual small {
        display: block;
        margin-top: 2px;
        color: #7e57c2;
    }

    @media (max-width: 767px) {
        .nav-menu a.nav-login {
            margin: 6px 12px;
            justify-content: center;
        }
    }

    /* ===== Penanda tambahan di ikon: sedang hujan, tren TMA, status siaga ===== */
    .pos-marker .badge-hujan {
        position: absolute;
        top: -7px;
        right: -7px;
        width: 17px;
        height: 17px;
        border-radius: 50%;
        background: #fff;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
        display: flex;
        align-items: center;
        justify-content: center;
        animation: tetes 1.2s ease-in-out infinite;
    }

    .pos-marker .badge-hujan svg {
        width: 11px;
        height: 11px;
        fill: #0d47a1;
    }

    @keyframes tetes {

        0%,
        100% {
            transform: translateY(0);
        }

        50% {
            transform: translateY(2px);
        }
    }

    .pos-marker .badge-tren {
        position: absolute;
        top: -7px;
        right: -7px;
        width: 17px;
        height: 17px;
        border-radius: 50%;
        border: 1.5px solid #fff;
        color: #fff;
        font-size: 9px;
        line-height: 14px;
        text-align: center;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    }

    .badge-tren.naik {
        background: #e53935;
    }

    .badge-tren.turun {
        background: #43a047;
    }

    .pos-marker.siaga-waspada {
        border-color: #fbc02d;
        box-shadow: 0 0 0 3px #fbc02d, 0 2px 6px rgba(0, 0, 0, 0.45);
    }

    .pos-marker.siaga-siaga {
        border-color: #fb8c00;
        box-shadow: 0 0 0 3px #fb8c00, 0 2px 6px rgba(0, 0, 0, 0.45);
    }

    .pos-marker.siaga-awas {
        border-color: #e53935;
        box-shadow: 0 0 0 3px #e53935, 0 2px 6px rgba(0, 0, 0, 0.45);
        animation: kedip 1.2s ease-in-out infinite;
    }

    .tombol-daftar.tombol-ringkasan svg {
        fill: #6a1b9a;
    }

    .tombol-daftar.tombol-putar svg {
        fill: #e65100;
    }

    /* ===== Kartu detail: info tambahan ===== */
    .kartu-durasi {
        margin-top: 10px;
        font-size: 13px;
        color: #37474f;
    }

    .daftar-pos .nilai {
        text-align: right;
    }

    /* "Total durasi" dan lamanya dibuat 2 baris supaya nama pos tidak tergencet */
    .daftar-pos .nilai small.durasi {
        display: block;
        white-space: nowrap;
        font-size: 11px;
        font-weight: 400;
        line-height: 1.25;
        color: #78909c;
        text-align: right;
    }

    .kartu-sedang-hujan {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-top: 10px;
        padding: 8px 10px;
        border-radius: 10px;
        background: #e3f2fd;
        color: #0d47a1;
        font-size: 13px;
    }

    .kartu-sedang-hujan svg {
        flex: none;
        width: 18px;
        height: 18px;
        fill: currentColor;
        animation: tetes 1.2s ease-in-out infinite;
    }

    .kartu-mini {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
        margin-top: 10px;
    }

    .kartu-mini div {
        padding: 6px 8px;
        border-radius: 8px;
        background: #f3f6f9;
        font-size: 10.5px;
        color: #78909c;
    }

    .kartu-mini b {
        display: block;
        font-size: 14px;
        color: #263238;
    }

    .kartu-tren {
        margin-top: 10px;
        font-size: 13px;
        font-weight: 500;
    }

    .kartu-tren.naik {
        color: #c62828;
    }

    .kartu-tren.turun {
        color: #2e7d32;
    }

    .kartu-tren.stabil {
        color: #546e7a;
    }

    .kartu-siaga {
        margin-top: 10px;
        padding: 8px 10px;
        border-radius: 10px;
        font-size: 12.5px;
    }

    .kartu-siaga b {
        font-size: 14px;
    }

    .kartu-siaga.normal {
        background: #e8f5e9;
        color: #1b5e20;
    }

    .kartu-siaga.waspada {
        background: #fff8e1;
        color: #8d6e00;
    }

    .kartu-siaga.siaga {
        background: #fff3e0;
        color: #e65100;
    }

    .kartu-siaga.awas {
        background: #ffebee;
        color: #b71c1c;
    }

    .tampungan {
        margin-top: 10px;
        font-size: 12.5px;
        color: #455a64;
    }

    .bar {
        height: 8px;
        margin: 4px 0;
        border-radius: 4px;
        background: #eceff1;
        overflow: hidden;
    }

    .bar i {
        display: block;
        height: 100%;
        border-radius: 4px;
        background: #00897b;
    }

    .kartu-sehat {
        margin-top: 10px;
        font-size: 12px;
        color: #607d8b;
    }

    .prakiraan {
        margin-top: 12px;
        padding-top: 10px;
        border-top: 1px solid #eceff1;
    }

    .prakiraan-judul {
        display: flex;
        justify-content: space-between;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        color: #90a4ae;
    }

    .prakiraan-daftar {
        display: flex;
        gap: 6px;
        margin-top: 6px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .prakiraan-daftar div {
        flex: none;
        width: 62px;
        padding: 6px 4px;
        border-radius: 10px;
        background: #f3f6f9;
        font-size: 10.5px;
        text-align: center;
        color: #546e7a;
    }

    .prakiraan-daftar img {
        display: block;
        width: 30px;
        height: 30px;
        margin: 2px auto;
    }

    .prakiraan-daftar b {
        display: block;
        font-size: 12px;
        color: #263238;
    }

    /* ===== Panel ringkasan ===== */
    .daftar-pos .peringkat {
        flex: none;
        width: 22px;
        font-size: 13px;
        font-weight: 700;
        color: #90a4ae;
        text-align: center;
    }

    .daftar-pos .batang {
        display: block;
        height: 4px;
        margin-top: 4px;
        border-radius: 2px;
        background: #1e88e5;
    }

    .daftar-pos .nilai.naik {
        color: #c62828;
    }

    .daftar-pos .nilai.turun {
        color: #2e7d32;
    }

    .panel-catatan {
        margin: 10px 4px 0;
        font-size: 12px;
        color: #78909c;
    }

    .tombol-notif {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        margin-top: 10px;
        padding: 9px 12px;
        border: 1px solid #cfd8dc;
        border-radius: 12px;
        background: #fff;
        color: #37474f;
        font-size: 13px;
        text-align: left;
    }

    .tombol-notif svg {
        flex: none;
        width: 20px;
        height: 20px;
        fill: #6a1b9a;
    }

    .tombol-notif.aktif {
        border-color: #6a1b9a;
        background: #f3e5f5;
    }

    .tombol-notif small {
        display: block;
        color: #78909c;
        font-size: 11.5px;
    }

    /* ===== Pilihan data hujan & lapisan di legenda ===== */
    .pilih-mode {
        display: flex;
        gap: 4px;
        margin: 0 0 8px;
        padding: 3px;
        border-radius: 10px;
        background: #eef2f6;
    }

    .pilih-mode button {
        flex: 1;
        height: 28px;
        border: 0;
        border-radius: 8px;
        background: transparent;
        color: #607d8b;
        font-size: 12px;
        font-weight: 500;
    }

    .pilih-mode button.aktif {
        background: #fff;
        color: #0d47a1;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    }

    .catatan-legenda {
        margin: 4px 4px 0;
        font-size: 11px;
        color: #90a4ae;
    }

    /* ===== Banner peringatan dini BMKG ===== */
    .banner-bmkg {
        position: fixed;
        z-index: 1000;
        top: 10px;
        left: 50%;
        width: min(520px, calc(100% - 140px));
        transform: translateX(-50%);
        border-radius: 14px;
        background: #b71c1c;
        color: #fff;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
        font-size: 13px;
        display: none;
    }

    .banner-bmkg.tampil {
        display: block;
    }

    .banner-bmkg button.kepala {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        padding: 9px 14px;
        border: 0;
        background: transparent;
        color: #fff;
        font-size: 13px;
        font-weight: 500;
        text-align: left;
    }

    .banner-bmkg .isi {
        display: none;
        max-height: 45vh;
        padding: 0 14px 12px;
        overflow-y: auto;
        font-size: 12.5px;
        line-height: 1.45;
    }

    .banner-bmkg.buka .isi {
        display: block;
    }

    .banner-bmkg .isi p {
        margin: 8px 0 0;
        padding-top: 8px;
        border-top: 1px solid rgba(255, 255, 255, 0.25);
    }

    .banner-bmkg .judul-pendek {
        display: none;
    }

    .banner-bmkg a {
        color: #ffcdd2;
    }

    /* ===== Putar ulang 24 jam ===== */
    .putar-ulang {
        position: fixed;
        z-index: 1000;
        left: 50%;
        bottom: 20px;
        width: min(560px, calc(100% - 24px));
        transform: translateX(-50%);
        padding: 10px 14px 12px;
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.96);
        box-shadow: 0 8px 28px rgba(15, 40, 80, 0.3);
        display: none;
    }

    .putar-ulang.tampil {
        display: block;
    }

    .putar-baris {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .putar-baris .tombol-putar-main {
        flex: none;
        width: 40px;
        height: 40px;
        border: 0;
        border-radius: 50%;
        background: #e65100;
        color: #fff;
        font-size: 16px;
    }

    .putar-baris input[type=range] {
        flex: 1;
        min-width: 0;
        accent-color: #e65100;
    }

    .putar-waktu {
        font-size: 14px;
        font-weight: 700;
        color: #263238;
    }

    .putar-ket {
        font-size: 11.5px;
        color: #78909c;
    }

    /* ===== Jendela Lihat data: tab periode & navigasi tanggal ===== */
    .pilih-format.pilih-mode-data {
        flex-wrap: wrap;
    }

    .pilih-mode-data button {
        flex: 1 0 auto;
        height: 34px;
        padding: 0 10px;
        font-size: 13px;
    }

    .nav-tanggal {
        display: flex;
        align-items: center;
        gap: 6px;
        margin: -4px 0 12px;
    }

    .nav-tanggal button {
        flex: none;
        width: 36px;
        height: 36px;
        border: 1px solid #cfd8dc;
        border-radius: 10px;
        background: #fff;
        color: #455a64;
        font-size: 16px;
    }

    .nav-tanggal input {
        height: 36px;
        padding: 0 10px;
        border: 1px solid #cfd8dc;
        border-radius: 10px;
        font: inherit;
        font-size: 14px;
        color: #263238;
    }

    .nav-tanggal .judul-periode {
        flex: 1;
        min-width: 0;
        font-size: 13px;
        font-weight: 500;
        color: #455a64;
        text-align: right;
    }

    .nav-tanggal.sembunyi {
        display: none;
    }

    .pilih-hari.sembunyi {
        display: none;
    }

    .judul-grafik {
        margin: 4px 0 6px;
        text-align: center;
        font-size: 14px;
        font-weight: 700;
        color: #263238;
    }

    .legenda-grafik {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px 12px;
        margin: -4px 0 12px;
        font-size: 11.5px;
        color: #546e7a;
    }

    .legenda-grafik i {
        display: inline-block;
        width: 10px;
        height: 10px;
        margin-right: 4px;
        border-radius: 50%;
        vertical-align: -1px;
    }

    @media (max-width: 767px) {
        /* HP: tombol kecil di kanan atas (tombol zoom tidak tampil di HP), diketuk -> terbuka selebar layar */
        .banner-bmkg {
            top: 10px;
            right: 10px;
            left: auto;
            width: auto;
            transform: none;
            border-radius: 22px;
        }

        .banner-bmkg button.kepala {
            height: 42px;
            padding: 0 14px;
        }

        .banner-bmkg .judul-panjang {
            display: none;
        }

        .banner-bmkg .judul-pendek {
            display: inline;
        }

        .banner-bmkg.buka {
            left: 10px;
            border-radius: 14px;
        }

        .banner-bmkg.buka .judul-panjang {
            display: inline;
        }

        .banner-bmkg.buka .judul-pendek {
            display: none;
        }

        .putar-ulang {
            bottom: 12px;
        }

        .tombol-daftar.ikon-saja span {
            display: none;
        }

        .tombol-daftar.ikon-saja {
            width: 42px;
            padding: 0;
            justify-content: center;
        }

        .nav-tanggal .judul-periode {
            display: none;
        }

        .nav-tanggal input {
            flex: 1;
        }
    }

    /* ===== Peringatan BMKG + bilah menu di sebelah kanannya (atas tengah) ===== */
    .bilah-atas {
        position: fixed;
        z-index: 1000;
        top: 10px;
        left: 240px;
        right: 64px;
        display: flex;
        justify-content: center;
        align-items: flex-start;
        gap: 10px;
        pointer-events: none;
    }

    .bilah-atas > * {
        pointer-events: auto;
    }

    .navbar {
        position: relative;
        display: flex;
        align-items: center;
        flex: none;
        height: 50px;
        padding: 0 6px 0 10px;
        border-radius: 14px;
        background: #14306b;
        color: #fff;
        box-shadow: 0 6px 20px rgba(10, 30, 70, 0.35);
    }

    .nav-brand {
        display: flex;
        align-items: center;
        gap: 8px;
        height: 100%;
        padding-right: 10px;
        border: 0;
        border-right: 1px solid rgba(255, 255, 255, 0.25);
        background: transparent;
        color: #fff;
        text-align: left;
    }

    .nav-brand img {
        width: 32px;
        height: 32px;
        border-radius: 8px;
    }

    .nav-brand b {
        display: block;
        font-size: 13px;
        letter-spacing: 0.5px;
        line-height: 1.15;
    }

    .nav-brand small {
        display: block;
        font-size: 10.5px;
        font-weight: 500;
        letter-spacing: 0.3px;
        color: #ffd54f;
    }

    .nav-menu {
        display: flex;
        align-items: center;
        gap: 2px;
        margin-left: 6px;
    }

    .nav-menu button {
        height: 38px;
        padding: 0 11px;
        border: 0;
        border-radius: 9px;
        background: transparent;
        color: #fff;
        font-size: 14.5px;
        font-weight: 600;
        white-space: nowrap;
    }

    .nav-menu > button:hover,
    .nav-drop.buka > button,
    .nav-drop > button.aktif {
        background: rgba(255, 255, 255, 0.14);
    }

    .nav-drop {
        position: relative;
    }

    .nav-drop > button::after {
        content: '';
        display: inline-block;
        margin-left: 6px;
        border: 5px solid transparent;
        border-top-color: currentColor;
        border-bottom: 0;
        vertical-align: middle;
    }

    .nav-drop-isi {
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        min-width: 240px;
        padding: 8px 0;
        border-radius: 14px;
        background: #fff;
        box-shadow: 0 12px 32px rgba(10, 30, 70, 0.3);
        display: none;
    }

    .nav-drop.buka .nav-drop-isi {
        display: block;
    }

    /* jembatan tak terlihat di celah antara tombol Data dan menunya, supaya menu tidak tertutup saat mouse lewat */
    .nav-drop-isi::before {
        content: '';
        position: absolute;
        top: -12px;
        left: 0;
        right: 0;
        height: 12px;
    }

    .nav-drop-isi button {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        width: 100%;
        height: 44px;
        padding: 0 20px;
        border-radius: 0;
        color: #37474f;
        font-size: 15.5px;
        font-weight: 400;
        text-align: left;
    }

    .nav-drop-isi button:hover {
        background: #eef3fb;
    }

    .nav-drop-isi button.aktif {
        color: #0d47a1;
        font-weight: 600;
    }

    .nav-drop-isi button.aktif::after {
        content: '✓';
    }

    .nav-drop-isi button:disabled {
        color: #b0bec5;
        cursor: default;
        background: transparent;
    }

    .nav-drop-isi small {
        padding: 2px 7px;
        border-radius: 8px;
        background: #eceff1;
        color: #90a4ae;
        font-size: 10.5px;
    }

    .nav-burger {
        display: none;
        width: 40px;
        height: 40px;
        border: 0;
        border-radius: 10px;
        background: transparent;
        color: #fff;
        font-size: 20px;
    }

    @media (min-width: 768px) {
        .bilah-atas .banner-bmkg {
            position: relative;
            top: auto;
            left: auto;
            flex: 0 1 440px;
            min-width: 180px;
            margin-top: 3px;
            width: auto;
            transform: none;
        }

        .bilah-atas .banner-bmkg .kepala span:nth-child(2) {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
    }

    @media (min-width: 768px) and (max-width: 1180px) {
        .nav-brand span {
            display: none;
        }
    }

    /* HP: [BMKG] [☰] di kanan atas, tombol lama tetap di kiri */
    @media (max-width: 767px) {
        .bilah-atas {
            left: auto;
            right: 10px;
            justify-content: flex-end;
            gap: 6px;
        }

        .bilah-atas .banner-bmkg {
            position: relative;
            top: auto;
            right: auto;
            left: auto;
        }

        .bilah-atas .banner-bmkg.buka {
            position: fixed;
            top: 62px;
            left: 10px;
            right: 10px;
        }

        .navbar {
            height: 42px;
            padding: 0 1px;
            border-radius: 21px;
        }

        .nav-brand {
            display: none;
        }

        .nav-burger {
            display: block;
        }

        .nav-menu {
            position: absolute;
            top: calc(100% + 8px);
            right: 0;
            display: none;
            flex-direction: column;
            align-items: stretch;
            width: min(280px, calc(100vw - 20px));
            margin: 0;
            padding: 6px 0;
            border-radius: 14px;
            background: #fff;
            box-shadow: 0 12px 32px rgba(10, 30, 70, 0.3);
        }

        .navbar.buka .nav-menu {
            display: flex;
        }

        .nav-menu button {
            color: #263238;
            text-align: left;
            border-radius: 0;
            padding: 0 18px;
        }

        .nav-menu > button:hover {
            background: #eef3fb;
        }

        .nav-drop > button {
            width: 100%;
            color: #90a4ae;
            font-size: 12px;
            letter-spacing: 0.5px;
            text-transform: uppercase;
            pointer-events: none;
            background: transparent !important;
        }

        .nav-drop > button::after {
            display: none;
        }

        /* di HP isi menu Data langsung tampil berurutan */
        .nav-drop-isi {
            position: static;
            display: block;
            min-width: 0;
            padding: 0;
            box-shadow: none;
        }

        .nav-drop-isi button {
            height: 42px;
            padding-left: 28px;
            font-size: 14.5px;
        }
    }

/* ===== Kartu pos gaya iOS (header + badge + grid info + tombol aksi) ===== */
.kartu-ios {
    min-width: 234px;
}

.kartu-kepala-teks {
    min-width: 0;
}

.kartu-ios .kartu-nama {
    color: #0b2a63;
    word-break: break-word;
}

.kartu-badge {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eef1f5;
}

.kartu-badge .chip {
    margin-top: 0;
}

.badge-tipe {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
}

.badge-tipe.tipe-hujan {
    background: #dbeafe;
    color: #1e40af;
}

.badge-tipe.tipe-tma {
    background: #e0e7ff;
    color: #3730a3;
}

.kartu-info {
    display: grid;
    grid-template-columns: 74px 1fr;
    row-gap: 7px;
    column-gap: 10px;
    align-items: start;
    margin-top: 11px;
    font-size: 12px;
    line-height: 1.35;
}

.kartu-info .ki-label {
    color: #64748b;
    font-weight: 500;
}

.kartu-info .ki-nilai {
    color: #1e293b;
    word-break: break-word;
}

.kartu-info .ki-nilai.mono {
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 11.5px;
    color: #334155;
}

.kartu-info .ki-angka {
    font-weight: 700;
    font-size: 13.5px;
    color: #0b2a63;
}

.kartu-info .tag-sumber {
    display: inline-block;
    margin-left: 5px;
    padding: 1px 6px;
    border-radius: 5px;
    font-size: 9.5px;
    font-weight: 600;
    vertical-align: middle;
}

.kartu-info .tag-tele {
    background: #dbeafe;
    color: #1e40af;
}

.kartu-info .tag-manual {
    background: #f3e5f5;
    color: #6a1b9a;
}

.kartu-info .ki-sub {
    margin-left: 5px;
    font-size: 10.5px;
    color: #64748b;
}

.kartu-info .ki-ket {
    margin-top: 2px;
    font-size: 10.5px;
    color: #78909c;
}

.kartu-aksi {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 7px;
    margin-top: 12px;
}

.kartu-aksi .aksi-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 100%;
    height: 34px;
    margin-top: 0;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    box-sizing: border-box;
    cursor: pointer;
}

.kartu-aksi .aksi-btn svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
}

.kartu-aksi .aksi-maps {
    background: #f8fafc;
    color: #334155;
    border: 1px solid #cbd5e1;
}

.kartu-aksi .aksi-maps:hover {
    background: #eef2f7;
}

.kartu-aksi .aksi-detail {
    background: #0b2a63;
    color: #fff;
    border: 1px solid #0b2a63;
}

.kartu-aksi .aksi-detail:hover {
    background: #0a234f;
}
