:root {
  --bg: #0f1117;
  --panel: #171a23;
  --panel-2: #1f232f;
  --border: #2a2f3c;
  --text: #e7eaf0;
  --muted: #9aa3b2;
  --accent: #4f8cff;
  --ok: #37c978;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
}
header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px; background: var(--panel); border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand h1 { font-size: 16px; margin: 0; font-weight: 600; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.controls { display: flex; align-items: center; gap: 8px; }
.status { color: var(--muted); font-size: 12px; min-width: 120px; }
select, input, button {
  background: var(--panel-2); color: var(--text); border: 1px solid var(--border);
  border-radius: 8px; padding: 7px 12px; font-size: 13px;
}
button { cursor: pointer; }
button:hover { border-color: var(--accent); }
button.ghost { background: transparent; }
main { flex: 1; display: grid; grid-template-columns: 1fr 340px; min-height: 0; }
.map-pane { position: relative; min-height: 0; }
#map { position: absolute; inset: 0; }
.meta {
  position: absolute; left: 12px; bottom: 12px; z-index: 500;
  background: rgba(23,26,35,.92); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 12px; font-size: 12px; color: var(--muted);
  backdrop-filter: blur(4px);
}
.meta b { color: var(--text); }
.gallery-pane {
  border-left: 1px solid var(--border); background: var(--panel);
  padding: 14px; overflow: auto;
}
.gallery-pane h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0 0 12px; }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.card { background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.thumb {
  aspect-ratio: 1; background: #10131b center/cover no-repeat; display: flex;
  align-items: center; justify-content: center; color: var(--muted); font-size: 11px;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.card .cap { padding: 6px 8px; font-size: 11px; color: var(--muted); display: flex; justify-content: space-between; }
.badge { font-size: 10px; padding: 1px 6px; border-radius: 6px; background: var(--border); color: var(--text); }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal.hidden { display: none; }
.modal-card { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 20px; width: 320px; }
.modal-card h3 { margin: 0 0 6px; }
.modal-card p { color: var(--muted); margin: 0 0 12px; font-size: 13px; }
.modal-card input { width: 100%; margin-bottom: 12px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; }
@media (max-width: 760px) {
  main { grid-template-columns: 1fr; grid-template-rows: 55% 45%; }
  .gallery-pane { border-left: none; border-top: 1px solid var(--border); }
}
