:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --text: #14213d;
  --muted: #5c677d;
  --border: #dbe2ef;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary: #eef2ff;
  --success: #16a34a;
  --danger: #dc2626;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Tahoma, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.app-shell {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 18px;
  min-height: 100vh;
  padding: 18px;
}

.panel, .map-wrap {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(20, 33, 61, 0.06);
}

.panel { padding: 18px; }
.header-row {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

h1, h2 { margin: 0 0 8px; }
.muted { color: var(--muted); margin: 0; line-height: 1.6; }
.badge {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}
.badge.idle { background: #e5e7eb; color: #374151; }
.badge.active { background: #dcfce7; color: #166534; }
.badge.error { background: #fee2e2; color: #991b1b; }

.grid {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}
label span {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}
input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 16px;
}
.actions {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
button {
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
button:disabled { opacity: .55; cursor: not-allowed; }
.primary { background: var(--primary); color: white; }
.primary:hover:not(:disabled) { background: var(--primary-dark); }
.secondary { background: var(--secondary); color: var(--text); }
.info-cards {
  display: grid;
  gap: 12px;
}
.card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
}
.card p { margin: 0; line-height: 1.7; color: var(--muted); }
.map-wrap { overflow: hidden; }
#map { width: 100%; height: calc(100vh - 36px); min-height: 500px; }

@media (max-width: 920px) {
  .app-shell { grid-template-columns: 1fr; }
  #map { height: 55vh; min-height: 380px; }
}
