:root {
  --bg: #0f172a;
  --panel: #ffffff;
  --ink: #111827;
  --mut: #6b7280;
  --line: #e5e7eb;
  --blue: #2563eb;
  --orange: #ea580c;
  --grey: #6b7280;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink); background: #f3f4f6; display: flex; flex-direction: column;
}
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 18px; background: var(--bg); color: #fff;
}
.topbar h1 { font-size: 18px; margin: 0; font-weight: 650; letter-spacing: -.01em; }
.topbar h1 span { color: #93c5fd; font-weight: 400; }
.sub { margin: 2px 0 0; font-size: 12.5px; color: #cbd5e1; }
.sub strong { color: #fff; }
.actions { display: flex; gap: 8px; align-items: center; }
.actions .csv, .actions .ghost {
  font: inherit; font-size: 13px; padding: 7px 12px; border-radius: 7px;
  border: 1px solid #334155; color: #e2e8f0; background: #1e293b; text-decoration: none; cursor: pointer;
}
.actions .ghost:hover, .actions .csv:hover { background: #334155; }
.ghost { display: none; }

.layout { flex: 1; display: flex; min-height: 0; }
.sidebar {
  width: 340px; flex: 0 0 340px; background: var(--panel); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; min-height: 0;
}
.filters { padding: 14px; border-bottom: 1px solid var(--line); }
.field { display: block; margin-bottom: 10px; }
.field > span { display: block; font-size: 12px; color: var(--mut); margin-bottom: 4px; }
.field input, .field select {
  width: 100%; font: inherit; font-size: 14px; padding: 7px 9px;
  border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink);
}
.row { display: flex; gap: 10px; }
.row .field { flex: 1; min-width: 0; }
.check { display: flex; gap: 7px; align-items: center; font-size: 13.5px; margin: 6px 0; cursor: pointer; }
.legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; font-size: 12px; color: var(--mut); }
.legend span { display: flex; align-items: center; gap: 5px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot.b { background: var(--blue); }
.dot.o { background: var(--orange); }
.dot.n { background: var(--grey); }

.seller-list { list-style: none; margin: 0; padding: 4px 0 20px; overflow-y: auto; flex: 1; }
.seller-list li {
  padding: 10px 14px; border-bottom: 1px solid #f1f5f9; cursor: pointer;
}
.seller-list li:hover, .seller-list li.active { background: #eff6ff; }
.seller-list .nm { font-weight: 600; font-size: 13.5px; }
.seller-list .mt { font-size: 12.5px; color: var(--mut); }
.seller-list .badge {
  display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 10px; margin-right: 5px;
}
.badge.b { background: #dbeafe; color: #1e40af; }
.badge.o { background: #ffedd5; color: #9a3412; }
.badge.n { background: #e5e7eb; color: #374151; }

#map { flex: 1; min-width: 0; }
.pop h3 { margin: 0 0 2px; font-size: 15px; }
.pop .biz { font-size: 12.5px; color: var(--mut); margin-bottom: 6px; }
.pop ul { margin: 0; padding: 0; list-style: none; font-size: 13px; }
.pop li { margin: 3px 0; }
.pop .tag { font-size: 11.5px; color: #1e40af; background: #dbeafe; border-radius: 4px; padding: 1px 6px; display: inline-block; }
.pop .links { margin-top: 8px; display: flex; gap: 10px; font-size: 12.5px; }
.pop a { color: #1d4ed8; }
.badge-m { padding: 0 6px; }

@media (max-width: 760px) {
  .layout { flex-direction: column-reverse; }
  .sidebar { width: 100%; flex: 1 1 auto; border-right: 0; border-top: 1px solid var(--line); }
  .sidebar .filters { display: none; }
  .sidebar.open .filters { display: block; }
  .ghost { display: inline-block; }
  #map { flex: 0 0 55vh; }
}
