/* =========================================================
   STYLE — Halaman Publik (Peta Interaktif)
   ========================================================= */
/* Query string di bawah bukan query PHP (tokens.css statis) — sekadar pemaksa
   cache-bust, karena @import TIDAK ikut ter-versi otomatis oleh ?v=filemtime()
   pada <link> style.css sendiri. Naikkan angkanya tiap kali tokens.css berubah. */
@import 'tokens.css?v=2';

html, body { min-height: 100%; }
body { padding-top: 60px; }

/* ---- Topbar ---- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; height: 60px; z-index: 1000;
  background: var(--navy-deep); color: var(--cloud);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; box-shadow: var(--shadow-float);
}
.topbar-brand { display: flex; align-items: center; gap: 12px; }
.topbar-emblem {
  width: 34px; height: 34px; border-radius: 50%; background: var(--orange);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; color: var(--navy-deep); font-size: 14px;
}
.topbar-emblem-img { border-radius: var(--radius-sm); object-fit: cover; }
.topbar-title { line-height: 1.2; }
.topbar-title strong { display: block; font-family: var(--font-display); font-size: 14.5px; letter-spacing: 0.01em; }
.topbar-title span { display: block; font-size: 11px; color: var(--cloud-soft); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.05em; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.topbar-actions .btn-outline { border-color: rgba(234,242,248,0.35); color: var(--cloud); }
.topbar-actions .btn-outline:hover { background: rgba(234,242,248,0.12); color: #fff; }
.theme-toggle-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid rgba(234,242,248,0.35);
  background: transparent; color: var(--cloud); font-size: 15px; display: flex; align-items: center; justify-content: center;
}
.theme-toggle-btn:hover { background: rgba(234,242,248,0.12); color: #fff; }

/* ---- Kerangka halaman ---- */
.dash-shell { max-width: 1400px; margin: 0 auto; padding: 20px 20px 60px; display: flex; flex-direction: column; gap: 20px; }

/* ---- Counter Aset (carousel horizontal) ---- */
.counter-wrap { display: flex; align-items: center; gap: 10px; }
.counter-actions-inline { display: none; }
.counter-nav {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--linework);
  background: var(--paper-raised); color: var(--navy-light); font-size: 16px; display: flex;
  align-items: center; justify-content: center; box-shadow: var(--shadow-card);
}
.counter-nav:hover { background: var(--navy-light); color: #fff; border-color: var(--navy-light); }
.counter-carousel {
  flex: 1; display: flex; gap: 12px; overflow-x: auto; scroll-behavior: smooth; padding: 4px 2px;
  scrollbar-width: none; cursor: grab; user-select: none;
}
.counter-carousel::-webkit-scrollbar { display: none; }
.counter-carousel.dragging { cursor: grabbing; scroll-behavior: auto; }
.counter-card {
  flex: 0 0 150px; display: flex; flex-direction: column; gap: 4px; position: relative;
  background: var(--paper-raised); border: 1.5px solid var(--linework); border-radius: var(--radius-md);
  padding: 14px 16px; cursor: pointer; box-shadow: var(--shadow-card); transition: border-color .15s ease, background .15s ease;
}
.counter-card:hover { border-color: var(--navy-light); }
.counter-card input[type="checkbox"] { position: absolute; opacity: 0; pointer-events: none; }
.counter-card:has(input:checked) { background: var(--navy-deep); border-color: var(--navy-deep); }
.counter-card:has(input:checked) .counter-card-num,
.counter-card:has(input:checked) .counter-card-name { color: #fff; }
.counter-card:has(input:checked) .counter-card-bidang { color: var(--cloud-soft); }
.counter-card-dot { width: 10px; height: 10px; border-radius: 50%; }
.counter-card-num { font-family: var(--font-mono); font-size: 22px; font-weight: 600; color: var(--ink); line-height: 1.1; }
.counter-card-name { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.25; }
.counter-card-bidang { font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); }

/* ---- Peta (bagian, bukan full-screen) ---- */
.map-wrap { background: var(--navy-deep); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-float); position: relative; }
.map-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; flex-wrap: wrap; }
.map-toolbar-stats { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; font-size: 12px; color: var(--cloud-soft); }
.map-toolbar-stats strong { font-size: 15px; color: #fff; margin-right: 4px; }
.search-box { position: relative; min-width: 240px; flex: 1; max-width: 360px; }
.search-box input {
  width: 100%; padding: 9px 12px; border-radius: var(--radius-sm); border: 1px solid rgba(234,242,248,0.2);
  background: rgba(255,255,255,0.06); color: var(--cloud); font-size: 13.5px; font-family: var(--font-body);
}
.search-box input::placeholder { color: var(--cloud-soft); }
.search-box input:focus { outline: none; border-color: var(--orange); }

.search-suggest {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--navy);
  border: 1px solid rgba(234,242,248,0.15); border-radius: var(--radius-sm); box-shadow: var(--shadow-float);
  max-height: 320px; overflow-y: auto; z-index: 1300;
}
.search-suggest-item { padding: 9px 14px; cursor: pointer; border-bottom: 1px solid rgba(234,242,248,0.08); }
.search-suggest-item:last-child { border-bottom: none; }
.search-suggest-item:hover, .search-suggest-item.active { background: rgba(255,255,255,0.08); }
.search-suggest-item .ssi-title { display: block; font-size: 13px; color: var(--cloud); font-weight: 500; }
.search-suggest-item .ssi-sub { display: block; font-size: 11.5px; color: var(--cloud-soft); margin-top: 2px; }
.search-suggest-item .ssi-kat { display: block; font-size: 10.5px; color: var(--cloud-soft); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 2px; }
.search-suggest-empty, .search-suggest-more { padding: 10px 14px; font-size: 12.5px; color: var(--cloud-soft); font-style: italic; }

.leaflet-control-attribution { font-size: 10px !important; }

/* ---- Peta: sidebar daftar layer + kanvas peta ---- */
.map-body { display: flex; height: 560px; }
.map-sidebar {
  width: 300px; flex-shrink: 0; background: var(--navy); border-right: 1px solid rgba(234,242,248,0.1);
  display: flex; flex-direction: column; overflow: hidden;
}
.sb-mobile-toggle { display: none; }
.map-sidebar-inner { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.map-sidebar-view { flex: 1; min-height: 0; overflow-y: auto; }
.map-sidebar-scroll { padding: 6px 0; }

.sb-bidang-label {
  padding: 12px 14px 4px; font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--cloud-soft);
}
.sb-kategori-row { display: flex; align-items: center; gap: 9px; padding: 8px 14px; cursor: pointer; }
.sb-kategori-row:hover { background: rgba(255,255,255,0.05); }
.sb-kategori-row input[type="checkbox"] { flex-shrink: 0; accent-color: var(--orange); width: 15px; height: 15px; cursor: pointer; }
.sb-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.sb-kategori-name { flex: 1; font-size: 13.5px; color: var(--cloud); line-height: 1.3; }
.sb-expand-arrow { color: var(--cloud-soft); font-size: 11px; transition: transform .15s ease; flex-shrink: 0; }
.sb-kategori.expanded > .sb-kategori-row .sb-expand-arrow { transform: rotate(180deg); }

.sb-item-list { padding: 2px 14px 10px 38px; }
.sb-item-list-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--cloud-soft); margin-bottom: 5px;
}
.sb-item {
  padding: 6px 9px; font-size: 12.5px; color: var(--cloud-soft); cursor: pointer;
  border-radius: var(--radius-sm); line-height: 1.35;
}
.sb-item:hover { background: rgba(255,255,255,0.08); color: var(--cloud); }
.sb-item-sub { display: block; margin-top: 2px; font-size: 11px; line-height: 1.3; opacity: 0.7; }
.sb-item-empty, .sb-item-loading { font-size: 12px; color: var(--cloud-soft); padding: 4px 9px; font-style: italic; }
.sb-item-more { font-size: 11.5px; color: var(--cloud-soft); padding: 4px 9px; font-style: italic; }

.sb-back-btn {
  display: block; width: 100%; text-align: left; background: none; border: none;
  border-bottom: 1px solid rgba(234,242,248,0.1); color: var(--orange); font-size: 13px;
  font-weight: 600; padding: 12px 14px; cursor: pointer; flex-shrink: 0;
}
.sb-back-btn:hover { background: rgba(255,255,255,0.05); }
.sb-detail-scroll { padding: 4px 14px 14px; }
/* .popup-* aslinya didesain sbg kartu TERANG (bubble popup di atas peta) — di sini
   dipakai ulang di atas sidebar GELAP, jadi warna teks & pembatasnya perlu ditimpa. */
.sb-detail-scroll .popup-card { box-shadow: none; background: none; padding: 0; }
.sb-detail-scroll .popup-header { background: none; padding: 0 0 10px; border-left: none; border-bottom: 1px solid rgba(234,242,248,0.15); margin-bottom: 8px; }
.sb-detail-scroll .popup-kategori { color: var(--orange); }
.sb-detail-scroll .popup-title { color: #fff; }
.sb-detail-scroll .popup-body { padding: 0; max-height: none; overflow: visible; }
.sb-detail-scroll .popup-meta { color: var(--cloud-soft); border-bottom-color: rgba(234,242,248,0.12); }
.sb-detail-scroll .popup-meta .mono { color: var(--cloud); }
.sb-detail-scroll .popup-progress-track { background: rgba(234,242,248,0.15); }
.sb-detail-scroll .popup-progress-label { color: var(--cloud-soft); }

.map-canvas-wrap { position: relative; flex: 1; min-width: 0; }
#map { width: 100%; height: 100%; background: var(--navy-deep); }

.map-fullscreen-btn {
  position: absolute; top: 10px; right: 10px; z-index: 1000; width: 34px; height: 34px;
  border-radius: var(--radius-sm); border: none; background: rgba(15,36,64,0.85); color: #fff;
  font-size: 16px; line-height: 1; cursor: pointer; box-shadow: var(--shadow-card);
}
.map-fullscreen-btn:hover { background: var(--navy-light); }
/* !important dipakai di sini secara sengaja: ini satu-satunya tempat di seluruh stylesheet
   yang melakukannya, khusus utk menang lawan aturan penulis lain (mis. .corner-frame/.map-wrap
   dasar) sambil tetap TIDAK memaksa position — setiap browser sudah punya mekanisme sendiri
   utk memposisikan elemen :fullscreen (position:fixed hasil override kami ternyata malah
   bentrok dengan mekanisme internal Firefox, walau cocok di Chrome/Edge). Cukup pastikan
   width/height 100% dari kotak yang disediakan browser, sisanya diserahkan ke browser.
   grid-template-rows:auto 1fr dipakai (bukan flex:1 1 auto) krn lebih konsisten lintas-browser
   utk pola "header tetap + isi mengisi sisa ruang". */
.map-wrap:fullscreen,
.map-wrap:-webkit-full-screen {
  width: 100% !important; height: 100% !important; margin: 0 !important;
  max-width: none !important; max-height: none !important;
  display: grid !important; grid-template-rows: auto 1fr !important; border-radius: 0 !important;
}
.map-wrap:fullscreen .map-body,
.map-wrap:-webkit-full-screen .map-body {
  height: auto !important; min-height: 0 !important;
}
.map-wrap:fullscreen .map-sidebar,
.map-wrap:-webkit-full-screen .map-sidebar { max-height: none !important; }
.map-wrap:fullscreen .map-canvas-wrap,
.map-wrap:-webkit-full-screen .map-canvas-wrap { flex: 1 1 auto !important; height: auto !important; }

.picking-hint {
  position: absolute; top: 16px; left: 50%; transform: translateX(-50%); z-index: 1200;
  background: var(--orange); color: var(--navy-deep); padding: 10px 18px; border-radius: 999px;
  font-size: 13px; font-weight: 600; box-shadow: var(--shadow-float); display: none;
  align-items: center; gap: 8px; font-family: var(--font-mono);
}
.picking-hint.show { display: flex; }
.map-picking #map { cursor: crosshair; }

/* ---- Rincian Data Ruas Jalan ---- */
.rj-section {
  background: var(--paper-raised); border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
  padding: 22px 24px; border: 1px solid var(--linework);
}
.rj-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.rj-header h2 { font-size: 18px; color: var(--ink); }
.rj-filters { display: flex; gap: 14px; flex-wrap: wrap; }
.rj-filters .field { min-width: 220px; }

.rj-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 20px; }
.rj-stat-card { background: var(--paper); border-radius: var(--radius-sm); padding: 12px 14px; border: var(--border-hairline-paper); }
.rj-stat-card .num { font-size: 20px; font-weight: 600; color: var(--ink); }
.rj-stat-card .lbl { font-size: 10.5px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 2px; }

/* Rincian per-nilai (mis. per Status Kumuh, per Jenis Kawasan) — jumlah kartu dinamis
   mengikuti data (bisa 2, bisa 22), beda dari .rj-stats yang jumlah kartunya tetap. */
.rj-breakdown { margin-bottom: 20px; }
.rj-breakdown-label { font-size: 11px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; }
.rj-breakdown-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.rj-breakdown-card { background: var(--paper); border-radius: var(--radius-sm); padding: 10px 12px; border: var(--border-hairline-paper); }
.rj-breakdown-card .num { font-size: 16px; font-weight: 600; color: var(--ink); }
.rj-breakdown-card .lbl { font-size: 11px; color: var(--ink-soft); margin-top: 2px; line-height: 1.3; }

.rj-table-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 10px; flex-wrap: wrap; }
.rj-table-count { font-size: 12.5px; color: var(--ink-soft); padding-bottom: 10px; }
.rj-table-toolbar .field { min-width: 0; }
.rj-table-toolbar select { padding: 7px 10px; font-size: 13px; }

.rj-table-wrap { overflow-x: auto; }
.rj-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rj-table th {
  text-align: left; padding: 10px 12px; background: var(--paper); color: var(--ink-soft);
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1.5px solid var(--linework);
  white-space: nowrap;
}
.rj-table td { padding: 10px 12px; border-bottom: 1px solid var(--linework); color: var(--ink); white-space: nowrap; }
.rj-table tbody tr:hover { background: var(--paper); }
.rj-table .rj-empty { text-align: center; color: var(--ink-soft); padding: 30px 12px; white-space: normal; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.pagination-pages { display: flex; gap: 4px; flex-wrap: wrap; }
.pagination-pages a, .pagination-pages span {
  display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px;
  padding: 0 6px; border-radius: var(--radius-sm); border: 1px solid var(--linework); font-size: 12.5px;
  color: var(--ink-soft); cursor: pointer;
}
.pagination-pages a:hover { background: var(--paper); }
.pagination-pages .current { background: var(--navy-light); color: #fff; border-color: var(--navy-light); }

/* ---- Tombol mengambang (FAB) ---- */
.fab {
  position: fixed; bottom: 22px; z-index: 950; border: none; border-radius: 999px;
  padding: 13px 20px; font-weight: 600; font-size: 13.5px; box-shadow: var(--shadow-float);
  display: flex; align-items: center; gap: 8px;
}
.fab-report { right: 20px; background: var(--orange); color: var(--navy-deep); }
.fab-report:hover { background: var(--orange-dark); }

/* ---- Panel Lapor Pengaduan (slide-in, dipicu FAB) ---- */
.report-panel {
  position: fixed; top: 76px; right: 16px; bottom: 16px; width: 320px; max-height: calc(100vh - 92px);
  overflow-y: auto; z-index: 1500;
  background: rgba(22, 50, 79, 0.96); backdrop-filter: blur(10px);
  border-radius: var(--radius-lg); color: var(--cloud);
  box-shadow: var(--shadow-float); border: 1px solid rgba(234,242,248,0.08);
  display: none;
}
.report-panel.open { display: block; }
.report-panel .panel-section { padding: 16px 18px; border-bottom: var(--border-hairline); }
.report-panel .panel-section:last-child { border-bottom: none; }
.report-panel-close {
  position: sticky; top: 0; float: right; margin: 10px 10px 0 0; color: var(--cloud-soft); z-index: 2;
}
.panel-eyebrow {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--orange); margin-bottom: 10px; display: flex; align-items: center; gap: 6px;
}
.panel-eyebrow::before { content: '◈'; }
.report-intro { font-size: 12.5px; color: var(--cloud-soft); margin-bottom: 12px; line-height: 1.5; }
.coord-readout {
  font-family: var(--font-mono); font-size: 12px; background: rgba(255,255,255,0.06); border: var(--border-hairline);
  border-radius: var(--radius-sm); padding: 8px 12px; color: var(--cloud); margin-bottom: 16px;
}
.btn-report {
  width: 100%; background: var(--orange); color: var(--navy-deep); border: none; border-radius: var(--radius-sm);
  padding: 12px; font-family: var(--font-body); font-weight: 600; font-size: 13.5px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-report:hover { background: var(--orange-dark); }
.btn-report.picking { background: var(--crit); color: #fff; animation: pulse 1.4s infinite; }
.btn-report-outline { background: transparent; color: var(--cloud); border: 1.5px solid rgba(234,242,248,0.3); }
.btn-report-outline:hover { background: rgba(255,255,255,0.1); border-color: var(--cloud-soft); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .7; } }

.checklist-actions, .counter-actions-inline { display: flex; align-items: center; gap: 6px; }
.link-btn { background: none; border: none; color: var(--navy-light); font-size: 11.5px; font-weight: 600; padding: 0; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.checklist-actions .sep, .counter-actions-inline .sep { color: var(--ink-soft); opacity: .5; font-size: 11px; }

.chip-group { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: 12px; font-family: var(--font-body); font-weight: 500;
  padding: 5px 11px; border-radius: 999px; border: 1px solid var(--linework);
  color: var(--ink-soft); background: transparent; display: inline-flex; align-items: center; gap: 6px;
  transition: all .15s ease;
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip.active { background: var(--navy-light); border-color: var(--navy-light); color: #fff; }
.chip:hover:not(.active) { border-color: var(--navy-light); color: var(--ink); }

/* ---- Popup Leaflet & kartu detail aset ---- */
.leaflet-popup-content-wrapper { border-radius: var(--radius-md); padding: 0; overflow: hidden; box-shadow: var(--shadow-float); background: var(--paper-raised); color: var(--ink); }
.leaflet-popup-content { margin: 0; width: 300px !important; }
.leaflet-popup-tip-container { filter: drop-shadow(0 2px 2px rgba(15,36,64,0.15)); }
.leaflet-popup-close-button {
  font-size: 20px !important; color: var(--ink-soft) !important; top: 8px !important; right: 8px !important;
  width: 24px !important; height: 24px !important; display: flex !important; align-items: center; justify-content: center;
}
.leaflet-popup-close-button:hover { color: var(--ink) !important; }
.popup-card { font-family: var(--font-body); }
.popup-photo { width: 100%; height: 120px; object-fit: cover; display: block; background: var(--linework); }
/* Header (kategori+judul) tetap terlihat & tidak ikut ter-scroll — kasih aksen warna kategori di kiri. */
.popup-header { padding: 14px 30px 12px 14px; border-left: 4px solid var(--navy-light); background: var(--paper); }
.popup-body { padding: 10px 16px 14px; max-height: 190px; overflow-y: auto; }
.popup-body::-webkit-scrollbar { width: 6px; }
.popup-body::-webkit-scrollbar-thumb { background: rgba(15,36,64,0.25); border-radius: 3px; }
.popup-body::-webkit-scrollbar-thumb:hover { background: rgba(15,36,64,0.4); }
.popup-kategori { font-family: var(--font-mono); font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--navy-light); margin-bottom: 4px; }
.popup-header .popup-kategori { margin-bottom: 2px; }
.popup-title { font-family: var(--font-display); font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 8px; line-height: 1.3; }
.popup-header .popup-title { margin-bottom: 0; }
.popup-meta { font-size: 12px; color: var(--ink-soft); padding: 5px 0; display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed var(--linework); }
.popup-meta:last-child { border-bottom: none; }
.popup-meta span:first-child { flex-shrink: 0; }
.popup-meta .mono { color: var(--ink); text-align: right; word-break: break-word; font-weight: 500; }
.popup-progress-track { height: 6px; background: var(--linework); border-radius: 3px; overflow: hidden; margin-top: 8px; }
.popup-progress-fill { height: 100%; background: var(--orange); }
.popup-progress-label { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-soft); margin-top: 4px; text-align: right; }
#assetDetailCard .btn-rute {
  margin-top: 12px; width: 100%; background: var(--navy-light); color: #fff;
  border: none; border-radius: var(--radius-sm); padding: 10px;
  font-size: 12.5px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 6px;
}
#assetDetailCard .btn-rute:hover { background: var(--navy-deep); }

/* ---- Modal (Filter Peta / Detail Aset / Kamera) ---- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(15,36,64,0.55); backdrop-filter: blur(3px);
  z-index: 2000; display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.show { display: flex; }
.modal-box {
  background: var(--paper-raised); border-radius: var(--radius-lg); width: 100%; max-width: 460px;
  max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-float);
}
.modal-header { padding: 20px 22px; border-bottom: 1px solid var(--linework); display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 { font-size: 17px; }
.modal-close { background: none; border: none; font-size: 20px; color: var(--ink-soft); }
.modal-body { padding: 22px; }

/* ---- Toast ---- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--navy-deep); color: #fff; padding: 12px 20px; border-radius: var(--radius-sm);
  font-size: 13.5px; box-shadow: var(--shadow-float); z-index: 3000; opacity: 0; transition: all .25s ease; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: var(--crit); }
.toast.success { background: var(--ok); }

/* ---- Pulau tooltip ---- */
.pulau-tooltip {
  font-size: 14px; font-weight: 600; padding: 5px 12px;
  background: var(--navy-deep); color: var(--cloud);
  border: none; border-radius: 6px; box-shadow: var(--shadow-float);
}

/* ---- Footer ---- */
.site-footer { background: var(--navy-deep); color: var(--cloud-soft); margin-top: 32px; border-top: var(--border-hairline); }
.site-footer-inner {
  max-width: 720px; margin: 0 auto; padding: 32px 20px 26px;
  display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center;
}
.site-footer-brand { display: flex; align-items: center; gap: 12px; }
.site-footer-logo { width: 40px; height: 40px; border-radius: var(--radius-sm); object-fit: cover; }
.site-footer-title { text-align: left; line-height: 1.3; }
.site-footer-title strong { display: block; font-family: var(--font-display); font-size: 15px; color: var(--cloud); }
.site-footer-title span { display: block; font-size: 11.5px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.05em; color: var(--cloud-soft); }
.site-footer-desc { font-size: 13px; line-height: 1.6; max-width: 480px; margin: 0; }
.site-footer-bottom {
  font-size: 11.5px; font-family: var(--font-mono); color: rgba(169,194,214,0.65);
  padding-top: 12px; border-top: 1px dashed rgba(234,242,248,0.14); width: 100%;
}

@media (max-width: 900px) {
  .rj-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 780px) {
  .dash-shell { padding: 14px 14px 80px; gap: 14px; }
  .topbar-title span { font-size: 10px; }
  .topbar-actions .btn-outline span.lbl { display: none; }
  .map-toolbar { flex-direction: column; align-items: stretch; }
  .search-box { max-width: none; }
  .map-toolbar-stats { justify-content: space-between; }

  /* Sidebar daftar layer jadi panel overlay yang bisa dibuka/tutup di atas peta, bukan di samping */
  .map-body { flex-direction: column; height: auto; position: relative; }
  .map-sidebar { width: 100%; flex-shrink: 0; border-right: none; }
  .sb-mobile-toggle {
    display: block; width: 100%; text-align: left; background: var(--navy); color: var(--cloud);
    border: none; border-bottom: 1px solid rgba(234,242,248,0.1); padding: 11px 14px;
    font-size: 13px; font-weight: 600; cursor: pointer;
  }
  .map-sidebar-inner { display: none; }
  .map-sidebar.open .map-sidebar-inner {
    display: flex; position: absolute; left: 0; right: 0; top: 40px; bottom: 0; z-index: 500;
    background: var(--navy); box-shadow: 0 10px 26px rgba(0,0,0,0.45);
  }
  /* flex:1 (flex-basis 0%) dari aturan dasar mengalahkan height di sini kalau tidak
     dibatalkan — .map-body sekarang "height:auto" (menyesuaikan isi), jadi butuh flex:none
     supaya height:380px yang dipakai, bukan hasil perhitungan flex-grow yang berujung 0. */
  .map-canvas-wrap { width: 100%; height: 380px; flex: none; }
  /* Versi fullscreen (!important) di atas sudah menimpa height:380px ini kalau sedang
     fullscreen — tidak perlu override terpisah lagi di sini. */

  .rj-header { flex-direction: column; align-items: stretch; }
  .rj-filters .field { min-width: 0; flex: 1; }
  .report-panel { left: 10px; right: 10px; top: auto; bottom: 10px; width: auto; max-height: 72vh; }
  .fab-report { right: 14px; bottom: 14px; padding: 12px 16px; font-size: 12.5px; }

  /* "Kosongkan" ditumpuk di bawah "Pilih Semua" (bukan sejajar) supaya tidak memakan
     lebar di layar sempit — titik pemisah "·" jadi tidak relevan lagi, disembunyikan. */
  .counter-actions-inline { flex-direction: column; align-items: flex-start; gap: 2px; }
  .counter-actions-inline .sep { display: none; }
}
