:root { --bg:#0b1520; --bg2:#13212e; --fg:#e8eef3; --mute:#8fa3b3; --acc:#ec407a; --acc2:#7ff5ec; }
[hidden] { display:none !important; }
* { box-sizing: border-box; }
html, body { margin:0; height:100%; background:var(--bg); color:var(--fg); font:14px/1.35 system-ui, "Segoe UI", Roboto, sans-serif; }
body { display:flex; }
aside { width:360px; min-width:300px; height:100%; display:flex; flex-direction:column; background:var(--bg); border-right:1px solid #233545; }
header { display:flex; gap:12px; align-items:center; padding:14px 16px 8px; }
#logo { width:46px; height:46px; border-radius:12px; }
h1 { margin:0; font-size:20px; }
#counts { color:var(--acc2); font-size:12.5px; }
.sync { margin:0 16px 8px; padding:7px 10px; border-radius:8px; background:var(--bg2); font-size:12.5px; display:flex; gap:8px; align-items:center; }
.sync button { margin-left:auto; }
nav { display:flex; gap:4px; padding:0 12px; }
nav button { flex:1; background:none; border:0; border-bottom:2px solid transparent; color:var(--mute); padding:8px; cursor:pointer; font-size:14px; }
nav button.on { color:var(--fg); border-color:var(--acc); }
#search { margin:10px 16px; padding:8px 10px; border-radius:8px; border:1px solid #2a4054; background:var(--bg2); color:var(--fg); font-size:14px; }
#panel { flex:1; overflow:auto; padding:0 8px 8px; }
footer { display:flex; flex-wrap:wrap; gap:6px; align-items:center; padding:10px 12px; border-top:1px solid #233545; }
button { background:#22384a; color:var(--fg); border:0; border-radius:7px; padding:6px 10px; cursor:pointer; font-size:13px; }
button:hover { background:#2d4960; }
button.primary { background:var(--acc); }
button.primary:hover { background:#f06292; }
button.danger { background:#8e2a2a; }
.chk { font-size:12.5px; color:var(--mute); display:flex; gap:4px; align-items:center; }
.grp { margin:12px 8px 4px; font-size:11.5px; font-weight:700; letter-spacing:.05em; text-transform:uppercase; color:var(--mute); display:flex; align-items:center; gap:6px; }
.grp input { margin:0; }
.row { display:flex; align-items:center; gap:8px; padding:6px 8px; border-radius:7px; cursor:pointer; }
.row:hover { background:var(--bg2); }
.row .ic { width:22px; text-align:center; }
.row .nm { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.row .ct { color:var(--mute); font-size:12px; white-space:nowrap; }
.row.has .nm { font-weight:600; }
.row .act { opacity:0; display:flex; gap:3px; }
.row:hover .act, .row .act.keep { opacity:1; }
.row .act button { padding:2px 6px; font-size:12px; }
.row .act button.on { background:#7a5b00; }
.dot { width:12px; height:12px; border-radius:50%; display:inline-block; }
main { flex:1; position:relative; }
#map { position:absolute; inset:0; background:#2f90b0; cursor:default; }
#map.picking, #map.picking .leaflet-interactive { cursor:crosshair !important; }
#toolbar { position:absolute; top:12px; left:50%; transform:translateX(-50%); z-index:500; display:flex; gap:6px; background:rgba(11,21,32,.92); padding:6px; border-radius:12px; }
#toolbar button.on { background:var(--acc); }
#modebar { position:absolute; bottom:34px; left:50%; transform:translateX(-50%); z-index:500; background:rgba(11,21,32,.95); padding:8px 8px 8px 16px; border-radius:12px; display:flex; gap:14px; align-items:center; font-size:14px; }
#credit { position:absolute; bottom:4px; left:50%; transform:translateX(-50%); z-index:500; font-size:11px; color:#fff; text-shadow:0 1px 3px #000; white-space:nowrap; }
#credit a { color:#fff; }
.lbl { color:#fff; font-weight:700; white-space:nowrap; text-shadow:-1px -1px 0 #0b1520,1px -1px 0 #0b1520,-1px 1px 0 #0b1520,1px 1px 0 #0b1520,0 0 4px #0b1520; transform:translate(-50%,-60%); pointer-events:none; }
.lbl.k0 { font-size:15px; text-transform:uppercase; }
.lbl.k1 { font-size:13px; color:#ffe082; }
.lbl.k2 { font-size:11.5px; font-weight:500; }
.pin { display:flex; align-items:center; justify-content:center; border-radius:50%; border:2.5px solid #0b1520; font-size:15px; box-shadow:0 1px 4px rgba(0,0,0,.5); }
.pin.ref { background:rgba(255,255,255,.88) !important; border-width:3px; font-size:12px; }
.pin.sel { outline:3px solid #fff; }
.atip { background:none; border:0; box-shadow:none; color:#fff; font-weight:700; font-size:12.5px; text-shadow:-1px -1px 0 #000,1px 1px 0 #000,0 0 4px #000; }
.atip::before { display:none; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background:var(--bg2); color:var(--fg); }
.leaflet-popup-content { margin:12px 14px; font-size:13.5px; }
.leaflet-popup-content h3 { margin:0 0 6px; font-size:15px; }
.leaflet-popup-content .btns { display:flex; gap:6px; margin-top:10px; flex-wrap:wrap; }
.leaflet-container a.leaflet-popup-close-button { color:#fff; }
.ctx { position:fixed; z-index:2000; background:var(--bg2); border:1px solid #2a4054; border-radius:9px; padding:4px; min-width:220px; box-shadow:0 6px 24px rgba(0,0,0,.5); }
.ctx div { padding:7px 12px; border-radius:6px; cursor:pointer; }
.ctx div:hover { background:#22384a; }
.modal { position:fixed; inset:0; z-index:3000; background:rgba(0,0,0,.55); display:flex; align-items:center; justify-content:center; }
.modal .box { background:var(--bg2); border-radius:14px; padding:18px 20px; width:440px; max-width:94vw; max-height:90vh; overflow:auto; box-shadow:0 10px 40px rgba(0,0,0,.6); }
.modal h2 { margin:0 0 12px; font-size:18px; }
.modal label { display:block; margin:10px 0 4px; color:var(--mute); font-size:12.5px; }
.modal input[type=text], .modal input[type=password], .modal textarea, .modal select { width:100%; padding:8px 10px; border-radius:8px; border:1px solid #2a4054; background:var(--bg); color:var(--fg); font-size:14px; font-family:inherit; }
.modal textarea { min-height:70px; resize:vertical; }
.modal .radios label { display:flex; gap:8px; align-items:center; color:var(--fg); font-size:14px; margin:6px 0; cursor:pointer; }
#mbtns { display:flex; gap:8px; justify-content:flex-end; margin-top:16px; flex-wrap:wrap; }
#toast { position:fixed; bottom:40px; left:50%; transform:translateX(-50%); z-index:4000; background:#e8eef3; color:#0b1520; padding:9px 16px; border-radius:20px; font-size:14px; box-shadow:0 4px 16px rgba(0,0,0,.4); }
.muted { color:var(--mute); }
.empty { color:var(--mute); padding:18px 10px; text-align:center; }
kbd { background:#22384a; border-radius:4px; padding:0 5px; font-size:12px; }
.clu { display:flex; align-items:center; justify-content:center; border-radius:50%; background:rgba(255,255,255,.95); color:#0b1520;
  border:2.5px solid #0b1520; font-weight:800; font-size:14px; box-shadow:0 2px 6px rgba(0,0,0,.45); cursor:pointer; }
.clu.own { background:rgba(11,21,32,.95); color:#fff; border-color:#ec407a; }
.clu:hover { transform:scale(1.08); }
