/* ===== Halaman PETA POSISI ===== */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font-family: 'DM Sans', 'Segoe UI', Arial, sans-serif; color: #12301f; background: #f4f8f5; overflow-x: hidden; }

/* --- Navigasi (sama dengan halaman lain) --- */
nav { position: fixed; top: 0; left: 0; right: 0; z-index: 2000; height: 62px; padding: 6px 14px;
      display: flex; align-items: center; justify-content: space-between; background: rgba(10, 34, 25, .94); box-shadow: 0 2px 5px rgba(0,0,0,.2); }
nav > a img { height: 46px; width: auto; display: block; }
.nav-links { display: flex; align-items: center; gap: 12px; flex-grow: 1; justify-content: flex-end; }
.nav-links a { text-decoration: none; color: #fff; font-size: 14px; font-weight: 700; padding: 10px 12px; transition: color .25s; }
.nav-links a.active, .nav-links a:hover { color: #F6D920; }
.nav-links .login-admin { padding: 0; }
.login-admin button { padding: 8px 14px; background: #0f8950; color: #fff; border: 0; border-radius: 5px; font-size: 14px; cursor: pointer; }
.login-admin button:hover { background: #0b6840; }
.toggle-nav { display: none; background: #0f8950; border: 0; color: #fff; font-size: 24px; border-radius: 5px; padding: 4px 10px; cursor: pointer; }

/* --- Susunan utama: sidebar + peta --- */
.peta-wrap { display: flex; height: 100vh; height: 100dvh; padding-top: 62px; }
.peta-side { width: 330px; flex: 0 0 330px; background: #fff; border-right: 1px solid #d5e5db; overflow-y: auto; padding: 16px 14px 20px; }
.peta-map  { position: relative; flex: 1; min-width: 0; }
#map { position: absolute; inset: 0; background: #dfe9e3; }

.side-head h1 { margin: 0; font-size: 20px; color: #0a3822; letter-spacing: .3px; text-align: left; }
.side-head p  { margin: 4px 0 14px; font-size: 13px; color: #55705f; font-weight: 400; text-align: left; }

.side-label { display: block; font-size: 12px; font-weight: 700; color: #0a3822; margin: 0 0 5px; }
#fKec { width: 100%; padding: 10px; border: 1px solid #0f8950; border-radius: 6px; background: #fff; font-size: 14px; color: #000; }

.grp { margin-top: 16px; }
.grp-title { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: #5d7a69; margin-bottom: 6px; }
.grp-items { display: flex; flex-direction: column; gap: 6px; }

.layer-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; cursor: pointer;
              background: #fff; border: 1px solid #cfe3d6; border-radius: 8px; padding: 9px 11px; font-size: 14px; color: #12301f;
              font-family: inherit; transition: background .15s, border-color .15s, box-shadow .15s; }
.layer-item:hover { background: #eef7f1; border-color: #0f8950; }
.layer-item .dot { width: 14px; height: 14px; border-radius: 50%; flex: 0 0 14px; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.25); opacity: .45; }
.layer-item .nm  { flex: 1; font-weight: 600; white-space: nowrap; }
.layer-item .cnt { font-size: 12px; font-weight: 700; background: #e6f1ea; color: #0a3822; border-radius: 20px; padding: 2px 9px; }
.layer-item[aria-pressed="true"] { background: #e3f4ea; border-color: #0f8950; box-shadow: inset 0 0 0 1px #0f8950; }
.layer-item[aria-pressed="true"] .dot { opacity: 1; }
.layer-item.kosong { color: #7d8f84; background: #f6f8f7; border-style: dashed; }
.layer-item.kosong .cnt { background: #eceeed; color: #7d8f84; }

.side-actions { display: flex; gap: 8px; margin-top: 16px; }
.side-actions button { flex: 1; padding: 9px 6px; font-size: 13px; font-weight: 600; font-family: inherit; color: #0a3822; background: #fff; border: 1px solid #0b6840; border-radius: 6px; cursor: pointer; }
.side-actions button:hover { background: #198754; color: #fff; }

.status { margin-top: 14px; font-size: 12.5px; line-height: 1.55; color: #3f5a4a; background: #f1f7f3; border-radius: 8px; padding: 10px 12px; }
.status:empty { display: none; }
.status b { color: #0a3822; }
.status .peringatan { color: #8a5a00; }

.peta-loading { position: absolute; z-index: 1200; top: 12px; left: 50%; transform: translateX(-50%); background: #0a3822; color: #fff;
                font-size: 13px; padding: 7px 16px; border-radius: 20px; box-shadow: 0 2px 8px rgba(0,0,0,.3); display: none; }
.peta-loading.show { display: block; }

/* --- Popup & cluster --- */
.popup-peta { min-width: 190px; max-width: 250px; font-size: 13px; line-height: 1.45; }
.popup-peta .pj { font-size: 11px; font-weight: 700; color: #fff; display: inline-block; border-radius: 4px; padding: 1px 7px; margin-bottom: 4px; }
.popup-peta .pn { font-size: 14.5px; font-weight: 700; color: #0a3822; margin: 0 0 4px; text-align: left; }
.popup-peta .pa { color: #444; margin-bottom: 5px; }
.popup-peta table { border-collapse: collapse; width: 100%; margin: 4px 0 6px; }
.popup-peta td { padding: 1px 0; vertical-align: top; font-size: 12.5px; border: 0; }
.popup-peta td:first-child { color: #668070; padding-right: 8px; white-space: nowrap; }
.popup-peta img { width: 100%; border-radius: 6px; margin: 4px 0; display: block; }
.popup-peta a.gmaps { display: inline-block; font-weight: 700; color: #0f8950; text-decoration: none; }
.popup-peta a.gmaps:hover { text-decoration: underline; }
.cluster-pin { color: #fff; font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center;
               border-radius: 50%; border: 3px solid rgba(255,255,255,.9); box-shadow: 0 1px 6px rgba(0,0,0,.4); }

/* --- HP & tablet --- */
@media (max-width: 768px) {
  nav { padding: 6px 10px; }
  .toggle-nav { display: block; }
  .nav-links { display: none; position: absolute; top: 62px; right: 0; width: 60%; flex-direction: column; align-items: stretch; gap: 0; background: #292929; padding: 8px 0; }
  .nav-links.show { display: flex; }
  .nav-links a { padding: 11px 16px; }
  .nav-links .login-admin { padding: 8px 16px; }
  .login-admin button { width: 100%; }

  .peta-wrap { flex-direction: column; }
  .peta-side { width: 100%; flex: 0 0 auto; max-height: 44vh; border-right: 0; border-bottom: 1px solid #d5e5db; padding: 10px 12px 12px; }
  .peta-map  { flex: 1 1 auto; min-height: 280px; }
  .side-head p { display: none; }
  .side-head h1 { font-size: 16px; margin-bottom: 8px; }
  .grp { margin-top: 10px; }
  .grp-items { flex-direction: row; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .layer-item { width: auto; flex: 0 0 auto; padding: 8px 11px; }
  .side-actions { margin-top: 10px; }
}
