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

:root {
  --navbar: #0f172a;
  --navbar-border: #1e293b;
  --accent: #2563eb;
  --panel-bg: #ffffff;
  --panel-border: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
}

html, body {
  height: 100%;
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  color: var(--text);
}

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1100;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: var(--navbar);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo {
  font-size: 22px;
}

.brand {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-title {
  font-size: 15px;
  font-weight: 500;
}

.brand-title strong {
  font-weight: 700;
}

.brand-sub {
  font-size: 11px;
  color: #94a3b8;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-box {
  display: flex;
  align-items: center;
  background: #1e293b;
  border-radius: 8px;
  overflow: hidden;
  margin-right: 4px;
}

.search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: #e2e8f0;
  padding: 8px 12px;
  width: 200px;
  font-size: 14px;
}

.search-box input::placeholder {
  color: #64748b;
}

.search-box button {
  background: var(--accent);
  border: none;
  color: #fff;
  padding: 8px 12px;
  cursor: pointer;
}

.nav-btn {
  background: #1e293b;
  border: none;
  color: #e2e8f0;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  transition: background 0.15s;
}

.nav-btn:hover {
  background: #334155;
}

.nav-btn.active {
  background: var(--accent);
}

/* ===== Peta ===== */
#map {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

/* ===== Panel ===== */
.panel {
  position: fixed;
  z-index: 1000;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  width: 260px;
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  font-weight: 600;
  font-size: 14px;
  background: #f8fafc;
  border-bottom: 1px solid var(--panel-border);
}

.panel-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
}

.panel-close:hover {
  color: #ef4444;
}

.panel-body {
  padding: 12px 14px;
  font-size: 13px;
}

/* Panel layer: kiri atas */
#panel-layer {
  top: 72px;
  left: 12px;
}

.layer-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 6px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}

.layer-item:hover {
  background: #f1f5f9;
}

.layer-item input {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.layer-item small {
  color: #94a3b8;
}

.panel-note {
  margin-top: 10px;
  padding: 8px 10px;
  background: #fef3c7;
  color: #92400e;
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.4;
}

/* Legend: kanan bawah */
.legend {
  bottom: 24px;
  right: 12px;
  width: 210px;
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  color: #334155;
}

.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
}

.line {
  width: 16px;
  height: 2px;
  background: #64748b;
  flex-shrink: 0;
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(15, 23, 42, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.show {
  display: flex;
}

.modal {
  background: #fff;
  border-radius: 14px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  font-weight: 700;
  font-size: 15px;
  background: #f8fafc;
  border-bottom: 1px solid var(--panel-border);
}

.modal-body {
  padding: 16px 18px;
  font-size: 14px;
  line-height: 1.6;
  color: #334155;
}

.modal-body ul {
  margin: 10px 0 10px 18px;
}

.modal-body .muted {
  margin-top: 10px;
  font-size: 12px;
  color: #94a3b8;
}

/* ===== Popup Leaflet ===== */
.leaflet-popup-content-wrapper {
  border-radius: 10px;
}

.leaflet-popup-content {
  font-family: inherit;
  margin: 12px 14px;
  line-height: 1.5;
}

.lik-popup h3 {
  font-size: 15px;
  margin-bottom: 4px;
}

.lik-popup .badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}

.lik-popup p {
  font-size: 13px;
  color: #475569;
  margin-top: 6px;
}

/* ===== Responsif ===== */
@media (max-width: 640px) {
  .nav-label {
    display: none;
  }
  .search-box input {
    width: 120px;
  }
  .brand-sub {
    display: none;
  }
  .panel {
    width: 220px;
  }
  .legend {
    width: 180px;
  }
}
