:root {
  --bg: #07101c;
  --panel: #0c1828;
  --line: rgba(255,255,255,0.12);
  --text: #fff;
  --muted: rgba(232,240,255,0.72);
  --blue: #155eef;
  --green: #16a34a;
  --amber: #d97706;
  --red: #e11d2e;
  --font: "Manrope", system-ui, sans-serif;
  --display: "Syne", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}
a { color: inherit; }
button, input, select { font: inherit; }

.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.85rem 1.2rem;
  border-bottom: 1px solid var(--line);
  background: rgba(7,16,28,0.95);
  position: sticky; top: 0; z-index: 20;
}
.top__brand { display: flex; gap: 0.65rem; align-items: center; }
.top__mark {
  width: 1.4rem; height: 1.4rem; border-radius: 7px;
  background: linear-gradient(145deg, #1d6bff, #0b3db8 55%, #c81428);
}
.top__brand strong { font-family: var(--display); display: block; line-height: 1.1; }
.top__brand small { color: var(--muted); font-size: 0.75rem; }
.top__nav { display: flex; gap: 1rem; color: var(--muted); font-weight: 600; font-size: 0.92rem; }
.top__nav a:hover { color: #fff; }

.layout {
  display: grid;
  grid-template-columns: minmax(300px, 400px) 1fr;
  min-height: calc(100vh - 58px);
}
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
}

.panel {
  padding: 1.2rem 1.15rem 2rem;
  border-right: 1px solid var(--line);
  background: var(--panel);
  overflow: auto;
}
.panel h1 {
  font-family: var(--display);
  font-size: 1.55rem;
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem;
  line-height: 1.15;
}
.lead { margin: 0 0 1rem; color: var(--muted); font-size: 0.95rem; line-height: 1.4; }

.plan {
  display: grid; gap: 0.45rem; margin-bottom: 1rem;
}
.plan__leg {
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  font-size: 0.9rem;
}
.plan__leg strong { display: block; margin-bottom: 0.15rem; }
.plan__leg span { color: var(--muted); }

.stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.45rem;
  margin-bottom: 1rem;
}
.stat {
  padding: 0.7rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(21,94,239,0.12);
}
.stat b { display: block; font-size: 1.35rem; font-family: var(--display); }
.stat span { color: var(--muted); font-size: 0.8rem; }

.filters { display: grid; gap: 0.55rem; margin-bottom: 0.9rem; }
.filters label { display: grid; gap: 0.25rem; font-size: 0.8rem; color: var(--muted); font-weight: 700; }
.filters select, .filters input {
  width: 100%;
  min-height: 42px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #091320;
  color: #fff;
  padding: 0.45rem 0.65rem;
}

.actions { display: flex; gap: 0.45rem; flex-wrap: wrap; margin-bottom: 0.9rem; }
.btn {
  border: 0; border-radius: 10px; min-height: 40px; padding: 0.45rem 0.85rem;
  background: var(--blue); color: #fff; font-weight: 700; cursor: pointer;
}
.btn--ghost { background: transparent; border: 1px solid var(--line); }
.disclaimer { color: var(--muted); font-size: 0.78rem; line-height: 1.4; margin: 0; }

.list-wrap { overflow: auto; padding: 1rem 1.2rem 2rem; }
.list-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 0.75rem; gap: 0.5rem;
}
.list-head h2 { margin: 0; font-family: var(--display); font-size: 1.25rem; }
#listCount { color: var(--muted); font-size: 0.9rem; }

.city-block { margin-bottom: 1.25rem; }
.city-block__title {
  font-family: var(--display);
  font-size: 1.15rem;
  margin: 0 0 0.55rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--line);
}

.cluster {
  margin: 0 0 0.85rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255,255,255,0.02);
}
.cluster__head {
  display: flex; justify-content: space-between; gap: 0.5rem;
  padding: 0.65rem 0.8rem;
  background: rgba(21,94,239,0.15);
  font-weight: 700; font-size: 0.92rem;
}
.cluster__head span { color: var(--muted); font-weight: 600; }

.card {
  padding: 0.85rem 0.9rem;
  border-top: 1px solid var(--line);
}
.card__top {
  display: flex; justify-content: space-between; gap: 0.6rem; align-items: start;
}
.card__name { font-weight: 800; font-size: 1.02rem; margin: 0 0 0.25rem; }
.card__meta { color: var(--muted); font-size: 0.88rem; line-height: 1.4; margin: 0; }
.card__meta a { color: #9ec0ff; text-decoration: none; }
.card__meta a:hover { text-decoration: underline; }
.card__note { margin: 0.35rem 0 0; color: rgba(255,255,255,0.55); font-size: 0.82rem; }

.badge {
  display: inline-flex; align-items: center;
  padding: 0.2rem 0.5rem; border-radius: 999px;
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.02em;
  white-space: nowrap;
}
.badge--new { background: rgba(255,255,255,0.1); }
.badge--visited { background: rgba(21,94,239,0.25); color: #9ec0ff; }
.badge--presented { background: rgba(217,119,6,0.25); color: #fbbf24; }
.badge--interested { background: rgba(22,163,74,0.22); color: #4ade80; }
.badge--sold { background: rgba(22,163,74,0.4); color: #bbf7d0; }
.badge--skip { background: rgba(225,29,46,0.2); color: #fca5a5; }

.card__controls {
  display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.65rem; align-items: center;
}
.card__controls select {
  min-height: 36px; border-radius: 8px; border: 1px solid var(--line);
  background: #091320; color: #fff; padding: 0.25rem 0.45rem;
}
.card__controls input {
  flex: 1; min-width: 140px; min-height: 36px; border-radius: 8px;
  border: 1px solid var(--line); background: #091320; color: #fff; padding: 0.25rem 0.5rem;
}
.linkbtn {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0.25rem 0.6rem;
  border-radius: 8px; border: 1px solid var(--line); color: #fff; text-decoration: none;
  font-size: 0.85rem; font-weight: 700;
}
.linkbtn:hover { border-color: rgba(21,94,239,0.7); background: rgba(21,94,239,0.15); }
