.mylocation {
  background-color: #fff;
  border: 0;
  border-radius: 2px;
  box-shadow: 0 1px 4px -1px rgba(0, 0, 0, 0.3);
  margin: 10px;
  padding: 0 0.5em;
  font: 400 18px Roboto, Arial, sans-serif;
  overflow: hidden;
  height: 40px;
  cursor: pointer;
}
.mylocation:hover {
  background: rgb(235, 235, 235);
}


/* ════════════════════════════════════════════
   GLOBAL
════════════════════════════════════════════ */
* { box-sizing: border-box; }
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Inter', 'Segoe UI', sans-serif;
}

#map { width: 100%; height: 100vh; }

/* ════════════════════════════════════════════
   STATS BAR — di atas peta
════════════════════════════════════════════ */
#stats-bar {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 500;
    display: flex;
    gap: 10px;
    background: rgba(15, 15, 15, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    padding: 10px 18px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.35);
}
.stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border-right: 1px solid rgba(255,255,255,0.1);
}
.stat-item:last-child { border-right: none; }
.stat-icon {
    font-size: 22px;
    line-height: 1;
}
.stat-info { display: flex; flex-direction: column; }
.stat-val {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
}
.stat-label {
    font-size: 10px;
    color: rgba(255,255,255,0.55);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 1px;
}
.stat-val.fire   { color: #ff6b47; }
.stat-val.pos    { color: #4ade80; }
.stat-val.skipped{ color: #facc15; }

/* live pulse */
.live-dot {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #4ade80;
    font-weight: 500;
}
.live-dot::before {
    content: '';
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #4ade80;
    animation: livepulse 1.4s ease-in-out infinite;
    display: inline-block;
}
@keyframes livepulse {
    0%,100% { opacity:1; transform:scale(1); }
    50%      { opacity:.3; transform:scale(1.4); }
}

/* ════════════════════════════════════════════
   SIDEBAR PANEL — glassmorphism
════════════════════════════════════════════ */
#side-panel {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: 300px;
    z-index: 1200;
    background: rgba(10, 10, 20, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-left: 1px solid rgba(255,255,255,0.08);
    box-shadow: -8px 0 40px rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(.4,0,.2,1), visibility 0.35s cubic-bezier(.4,0,.2,1);
}
#side-panel.open {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
}

.panel-header {
    padding: 20px 20px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.panel-title {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.panel-title span { font-size: 18px; }
.btn-close-panel {
    background: rgba(255,255,255,0.07);
    border: none;
    color: rgba(255,255,255,0.6);
    width: 30px; height: 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    display: flex; align-items: center; justify-content: center;
    transition: all .2s;
}
.btn-close-panel:hover { background: rgba(255,255,255,0.15); color: #fff; }

.panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

/* Section group */
.layer-group {
    margin-bottom: 14px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.07);
    overflow: hidden;
}
.layer-group-header {
    padding: 11px 14px;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    transition: background .2s;
}
.layer-group-header:hover { background: rgba(255,255,255,0.09); }
.layer-group-title {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    display: flex;
    align-items: center;
    gap: 8px;
}
.layer-group-title .icon { font-size: 15px; }
.layer-group-arrow {
    color: rgba(255,255,255,0.35);
    font-size: 11px;
    transition: transform .25s;
}
.layer-group.expanded .layer-group-arrow { transform: rotate(180deg); }
.layer-group-body {
    display: none;
    padding: 12px 14px;
    background: rgba(0,0,0,0.2);
}
.layer-group.expanded .layer-group-body { display: block; }

/* Toggle switch */
.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.toggle-label {
    font-size: 12px;
    color: rgba(255,255,255,0.65);
}
.toggle-switch {
    position: relative;
    width: 38px; height: 20px;
    flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.15);
    border-radius: 20px;
    cursor: pointer;
    transition: background .25s;
}
.toggle-slider::before {
    content: '';
    position: absolute;
    width: 14px; height: 14px;
    left: 3px; top: 3px;
    border-radius: 50%;
    background: #fff;
    transition: transform .25s;
}
.toggle-switch input:checked + .toggle-slider { background: #ff6b47; }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }
.toggle-switch.green input:checked + .toggle-slider { background: #4ade80; }
.toggle-switch.yellow input:checked + .toggle-slider { background: #facc15; }

/* Radius slider */
.radius-row { margin-top: 8px; }
.radius-row label { font-size: 11px; color: rgba(255,255,255,0.5); display: block; margin-bottom: 5px; }
.radius-val {
    font-size: 13px;
    font-weight: 600;
    color: #4ade80;
    float: right;
}
input[type=range] {
    width: 100%;
    accent-color: #4ade80;
    margin-top: 4px;
}

/* Divider */
.panel-divider {
    height: 1px;
    background: rgba(255,255,255,0.07);
    margin: 10px 0;
}

/* ════════════════════════════════════════════
   TOMBOL MENU TOGGLE
════════════════════════════════════════════ */
#btn-menu {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 700;
    background: rgba(15,15,15,0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 9px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 7px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    transition: all .2s;
}
#btn-menu:hover { background: rgba(255,107,71,0.85); border-color: #ff6b47; }
#btn-menu .menu-icon { font-size: 16px; }

/* ════════════════════════════════════════════
   INFOWINDOW CUSTOM
════════════════════════════════════════════ */
.iw-card {
    font-family: 'Inter','Segoe UI',sans-serif;
    min-width: 270px;
    max-width: 320px;
}
.iw-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}
.iw-icon-wrap {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #ff6b47, #e74c3c);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.iw-title { font-size: 14px; font-weight: 700; color: #1a1a1a; }
.iw-subtitle { font-size: 11px; color: #888; margin-top: 1px; }
.iw-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 5px 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 12px;
}
.iw-row:last-child { border-bottom: none; }
.iw-key { color: #888; flex-shrink: 0; width: 110px; }
.iw-val { color: #222; font-weight: 500; text-align: right; }
.iw-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
}
.badge-aktif    { background: #fef3c7; color: #d97706; }
.badge-selesai  { background: #d1fae5; color: #059669; }
.badge-proses   { background: #dbeafe; color: #2563eb; }

/* pos infowindow */
.iw-pos-header {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 10px; padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}
.iw-pos-icon {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #4ade80, #16a34a);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; flex-shrink: 0;
}
.iw-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-top: 8px;
}
.iw-grid-item {
    background: #f9fafb;
    border-radius: 8px;
    padding: 6px 8px;
}
.iw-grid-key { font-size: 10px; color: #9ca3af; margin-bottom: 2px; }
.iw-grid-val { font-size: 13px; font-weight: 700; color: #111827; }

/* ════════════════════════════════════════════
   SEARCH BOX
════════════════════════════════════════════ */
#search-box {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 500;
    width: 340px;
}
#search-input {
    width: 100%;
    padding: 11px 18px 11px 44px;
    background: rgba(10,10,20,0.82);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 30px;
    color: #fff;
    font-size: 13px;
    outline: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    transition: border-color .2s;
}
#search-input::placeholder { color: rgba(255,255,255,0.35); }
#search-input:focus { border-color: #ff6b47; }
.search-icon {
    position: absolute;
    left: 15px; top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: rgba(255,255,255,0.4);
    pointer-events: none;
}


* { box-sizing: border-box; }
body, html { margin: 0; padding: 0; height: 100%; font-family: 'Inter', 'Segoe UI', sans-serif; }
#map { width: 100%; height: 100vh; }

/* ── STATS BAR ── */
#stats-bar {
    position: absolute; top: 16px; left: 50%;
    transform: translateX(-50%); z-index: 500;
    display: flex; gap: 10px;
    background: rgba(8, 12, 28, 0.82);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px; padding: 10px 18px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.35);
    white-space: nowrap;
}
.stat-item {
    display: flex; align-items: center; gap: 10px;
    padding: 0 14px;
    border-right: 1px solid rgba(255,255,255,0.08);
}
.stat-item:last-child { border-right: none; }
.stat-icon  { font-size: 20px; line-height: 1; }
.stat-info  { display: flex; flex-direction: column; }
.stat-val   { font-size: 20px; font-weight: 700; color: #fff; line-height: 1.1; }
.stat-label { font-size: 10px; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: .5px; margin-top: 1px; }
.stat-val.aktif   { color: #f87171; }
.stat-val.proses  { color: #facc15; }
.stat-val.selesai { color: #4ade80; }
.stat-val.pos     { color: #4ade80; }
.stat-val.invalid { color: #94a3b8; }

.live-dot {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 11px; color: #4ade80; font-weight: 500;
}
.live-dot::before {
    content: ''; width: 7px; height: 7px; border-radius: 50%;
    background: #4ade80; display: inline-block;
    animation: lp 1.4s ease-in-out infinite;
}
@keyframes lp { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.3;transform:scale(1.4)} }

/* ── TOMBOL MENU ── */
#btn-menu {
    position: absolute; top: 16px; right: 16px; z-index: 700;
    background: rgba(8,12,28,0.82);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.12); border-radius: 12px;
    color: #fff; font-size: 13px; font-weight: 600;
    padding: 9px 16px; cursor: pointer;
    display: flex; align-items: center; gap: 7px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3); transition: all .2s;
}
#btn-menu:hover { background: rgba(139,92,246,0.85); border-color: #a78bfa; }

/* ── SIDEBAR ── */
#side-panel {
    position: absolute; top: 0; right: 0; height: 100%; width: 300px; z-index: 600;
    background: rgba(8, 12, 28, 0.9);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-left: 1px solid rgba(255,255,255,0.07);
    box-shadow: -8px 0 40px rgba(0,0,0,0.45);
    display: flex; flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(.4,0,.2,1);
}
#side-panel.open { transform: translateX(0); }

.panel-header {
    padding: 20px 20px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    display: flex; align-items: center; justify-content: space-between;
}
.panel-title { font-size: 14px; font-weight: 700; color: #fff; display: flex; align-items: center; gap: 8px; }
.btn-close-panel {
    background: rgba(255,255,255,0.07); border: none; color: rgba(255,255,255,0.6);
    width: 30px; height: 30px; border-radius: 8px; cursor: pointer;
    font-size: 16px; display: flex; align-items: center; justify-content: center; transition: all .2s;
}
.btn-close-panel:hover { background: rgba(255,255,255,0.15); color: #fff; }
.panel-body { flex: 1; overflow-y: auto; padding: 16px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.1) transparent; }

/* ── LAYER GROUP ── */
.layer-group { margin-bottom: 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.07); overflow: hidden; }
.layer-group-header {
    padding: 11px 14px; background: rgba(255,255,255,0.05);
    display: flex; align-items: center; justify-content: space-between;
    cursor: pointer; user-select: none; transition: background .2s;
}
.layer-group-header:hover { background: rgba(255,255,255,0.09); }
.layer-group-title { font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.85); display: flex; align-items: center; gap: 8px; }
.layer-group-arrow { color: rgba(255,255,255,0.35); font-size: 11px; transition: transform .25s; }
.layer-group.expanded .layer-group-arrow { transform: rotate(180deg); }
.layer-group-body { display: none; padding: 12px 14px; background: rgba(0,0,0,0.2); }
.layer-group.expanded .layer-group-body { display: block; }

/* ── TOGGLE SWITCH ── */
.toggle-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.toggle-label { font-size: 12px; color: rgba(255,255,255,0.65); display: flex; align-items: center; gap: 7px; }
.toggle-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.toggle-switch { position: relative; width: 38px; height: 20px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute; inset: 0; background: rgba(255,255,255,0.15);
    border-radius: 20px; cursor: pointer; transition: background .25s;
}
.toggle-slider::before {
    content: ''; position: absolute; width: 14px; height: 14px;
    left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: transform .25s;
}
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }
.sw-red    input:checked + .toggle-slider { background: #ef4444; }
.sw-yellow input:checked + .toggle-slider { background: #facc15; }
.sw-green  input:checked + .toggle-slider { background: #4ade80; }
.sw-purple input:checked + .toggle-slider { background: #a78bfa; }

/* ── RADIUS SLIDER ── */
.panel-divider { height: 1px; background: rgba(255,255,255,0.07); margin: 10px 0; }
.radius-row { margin-top: 8px; }
.radius-row label { font-size: 11px; color: rgba(255,255,255,0.5); display: block; margin-bottom: 5px; }
.radius-val { font-size: 13px; font-weight: 600; color: #4ade80; float: right; }
input[type=range] { width: 100%; accent-color: #4ade80; margin-top: 4px; }

/* ── MAP TYPE ── */
.map-type-btn {
    padding: 7px 6px; border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.6);
    font-size: 11px; cursor: pointer; transition: all .2s; font-weight: 500;
}
.map-type-btn:hover, .map-type-btn.active {
    background: rgba(139,92,246,0.25); border-color: #a78bfa; color: #a78bfa;
}

/* ── INFOWINDOW ── */
.iw-card { font-family: 'Inter','Segoe UI',sans-serif; min-width: 260px; max-width: 320px; }
.iw-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid #f0f0f0; }
.iw-icon-wrap {
    width: 38px; height: 38px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0;
}
.iw-title    { font-size: 14px; font-weight: 700; color: #1a1a1a; line-height: 1.3; }
.iw-subtitle { font-size: 11px; color: #888; margin-top: 2px; }
.iw-row { display: flex; gap: 8px; align-items: flex-start; padding: 5px 0; border-bottom: 1px solid #f5f5f5; font-size: 12px; }
.iw-row:last-child { border-bottom: none; }
.iw-key { color: #888; flex-shrink: 0; width: 110px; }
.iw-val { color: #222; font-weight: 500; }
.iw-status {
    display: inline-block; padding: 2px 10px; border-radius: 8px;
    font-size: 11px; font-weight: 700;
}

/* ── LEGENDA BAWAH ── */
#legenda {
    position: absolute; bottom: 30px; left: 16px; z-index: 500;
    background: rgba(8,12,28,0.82);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px; padding: 12px 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.leg-title { font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.leg-item  { display: flex; align-items: center; gap: 8px; font-size: 12px; color: rgba(255,255,255,0.7); margin-bottom: 5px; }
.leg-item:last-child { margin-bottom: 0; }
.leg-dot   { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }