* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #0f172a;
  color: #e5e7eb;
  height: 100vh;
  display: flex;
  flex-direction: column;
}
header {
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(90deg, #0f172a, #1e293b);
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
}
header h1 {
  font-size: 18px;
  font-weight: 600;
}
header span {
  font-size: 12px;
  color: #9ca3af;
}
main {
  flex: 1;
  display: flex;
  min-height: 0;
}
#map {
  flex: 2;
  min-width: 0;
}
#sidebar {
  flex: 1;
  max-width: 420px;
  border-left: 1px solid rgba(148, 163, 184, 0.3);
  background: radial-gradient(circle at top left, #111827, #020617);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.stats-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  font-size: 13px;
}
.stat-card {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.3);
}
.stat-label {
  color: #9ca3af;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.stat-value {
  font-size: 16px;
  font-weight: 600;
}
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  margin-right: 6px;
}
.status-ok {
  background-color: #22c55e;
}
.status-error {
  background-color: #ef4444;
}
.status-idle {
  background-color: #eab308;
}
.status-missing_credentials {
  background-color: #f97316;
}
.panel-section-title {
  font-size: 13px;
  font-weight: 500;
  color: #e5e7eb;
  margin-bottom: 6px;
}
.cities-list {
  flex: 1;
  min-height: 0;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.3);
  padding: 8px 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.cities-header,
.city-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  padding: 6px 12px;
  font-size: 13px;
  align-items: center;
}
.cities-header {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9ca3af;
  border-bottom: 1px solid rgba(55, 65, 81, 0.9);
}
.city-row:nth-child(odd) {
  background: rgba(15, 23, 42, 0.6);
}
.city-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.city-count {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: #f97316;
}
.header-link {
  color: #60a5fa;
  font-size: 13px;
  text-decoration: none;
  transition: opacity 0.15s;
}
.header-link:hover {
  text-decoration: underline;
  opacity: 0.8;
}
.last-update {
  font-size: 11px;
  color: #9ca3af;
}
footer {
  padding: 6px 16px 10px;
  font-size: 11px;
  color: #6b7280;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(148, 163, 184, 0.3);
  background: #020617;
}
footer a {
  color: #60a5fa;
  text-decoration: none;
}
footer a:hover {
  text-decoration: underline;
}
@media (max-width: 900px) {
  main {
    flex-direction: column;
  }
  #sidebar {
    max-width: none;
    border-left: none;
    border-top: 1px solid rgba(148, 163, 184, 0.3);
  }
  .stats-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

