:root {
  --bg: #0f1115;
  --panel: #151924;
  --panel2: #0f1320;
  --text: #e9ecf1;
  --muted: #a7b0c0;
  --line: #252c3c;
  --btn: #2b3550;
  --btn2: #1f2638;
  --accent: #7aa2ff;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.nav {
  margin-top: 10px;
  display: flex;
  gap: 14px;
}

.nav a {
  color: #7aa2ff;
  text-decoration: none;
  font-size: 14px;
}

.nav a:hover {
  text-decoration: underline;
}

.topbar {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #121625, #0f1115);
}
.brand { display: flex; gap: 12px; align-items: center; }
.logo { font-size: 28px; }
h1 { margin: 0; font-size: 18px; }
.sub { margin: 2px 0 0; color: var(--muted); font-size: 13px; }

.layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  min-height: calc(100vh - 58px);
}

.panel {
  height: calc(100vh - 80px);
  padding: 16px;
  border-right: 1px solid var(--line);
  background: var(--panel);

  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.section {
  padding: 14px;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 12px;
}

.results-section {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

#list {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding-right: 6px;
}

.section.small { padding: 10px 14px; }

.label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.row { display: flex; gap: 10px; }
.space-between { justify-content: space-between; align-items: start; }

input[type="text"], select {
  width: 100%;
  padding: 10px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0c0f18;
  color: var(--text);
  outline: none;
}
input[type="text"]::placeholder { color: #6e7890; }

.btn {
  background: var(--btn);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { border-color: #36425f; }
.btn.secondary { background: var(--btn2); }
.btn.smallBtn { padding: 7px 10px; border-radius: 10px; }

.hint { color: var(--muted); font-size: 12px; margin: 8px 0 0; }
.tiny { color: var(--muted); font-size: 11px; margin: 0; }

.check {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 10px 0;
  color: var(--text);
  font-size: 13px;
}

.meta { color: var(--muted); font-size: 12px; margin: 6px 0 10px; }

.list { display: grid; gap: 8px; }
.item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 10px;
  background: #0c0f18;
  cursor: pointer;
}
.item:hover { border-color: #36425f; }
.itemTitle { font-size: 13px; margin: 0 0 4px; }
.itemMeta { font-size: 12px; color: var(--muted); margin: 0; }

.mapWrap { position: relative; }
#map { height: calc(100vh - 58px); width: 100%; }

.details {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 360px;
  max-width: calc(100% - 28px);
  background: #0c0f18;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.45);
  z-index: 9999;
  pointer-events: auto;
}
.details.hidden { display: none; }

.detailsHead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 12px 0 12px;
}
.detailsHead h3 { margin: 0; font-size: 14px; }
.detailsBody { padding: 12px; color: var(--text); font-size: 13px; }
.detailsBody .kv { margin: 6px 0; color: var(--muted); }
.detailsBody a { color: var(--accent); text-decoration: none; }
.detailsBody a:hover { text-decoration: underline; }

@media (max-width: 920px) {
  .layout { grid-template-columns: 1fr; }
  .panel { border-right: 0; border-bottom: 1px solid var(--line); }
  #map { height: 60vh; }
}
