* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f3f6fb;
  color: #172033;
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.card {
  width: 100%;
  max-width: 620px;
  background: white;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 12px 40px rgba(20, 40, 80, 0.12);
}

h1 {
  margin-top: 0;
}

h2 {
  margin-top: 28px;
}

.muted {
  color: #667085;
}

label {
  display: block;
  margin-top: 20px;
  font-weight: 700;
}

input {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  margin-top: 8px;
  font-size: 16px;
}

.row {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

button {
  flex: 1;
  padding: 14px 16px;
  border: none;
  border-radius: 12px;
  background: #174ea6;
  color: white;
  font-weight: 800;
  font-size: 16px;
}

button.secondary {
  background: #334155;
}

button:disabled {
  opacity: 0.45;
}

.status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
}

.status-grid div {
  background: #eef4ff;
  border-radius: 14px;
  padding: 14px;
}

.status-grid strong,
.status-grid span {
  display: block;
}

.status-grid span {
  margin-top: 6px;
  color: #174ea6;
}

pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 16px;
  border-radius: 14px;
  overflow: auto;
  max-height: 340px;
}

.admin-body {
  height: 100vh;
  overflow: hidden;
}

.admin-header {
  height: 64px;
  padding: 0 18px;
  background: #172033;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-header h1 {
  font-size: 20px;
  margin: 0;
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.admin-actions a {
  color: white;
  font-weight: 700;
  text-decoration: underline;
}

.admin-layout {
  height: calc(100vh - 64px);
  display: grid;
  grid-template-columns: 320px 1fr;
}

.sidebar {
  background: white;
  border-right: 1px solid #dbe3ef;
  padding: 16px;
  overflow-y: auto;
}

.sidebar h2 {
  margin-top: 0;
}

#map {
  height: calc(100vh - 64px);
  width: 100%;
}

.runner-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border-radius: 12px;
  background: #f8fafc;
  margin-bottom: 10px;
  cursor: pointer;
}

.runner-item input {
  width: auto;
  margin-top: 4px;
}

.runner-color {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  margin-top: 5px;
  flex: 0 0 auto;
}

.runner-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.runner-info small {
  color: #64748b;
}

.runner-marker div {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

@media (max-width: 800px) {
  .admin-layout {
    grid-template-columns: 1fr;
    grid-template-rows: 220px 1fr;
  }

  .sidebar {
    border-right: none;
    border-bottom: 1px solid #dbe3ef;
  }

  #map {
    height: calc(100vh - 64px - 220px);
  }
}
