body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f8f9fb;
  color: #1f2d3d;
}

header {
  padding: 16px 20px;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}

h1 {
  margin: 0 0 10px 0;
  font-size: 20px;
}

.controls {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.controls label {
  font-size: 12px;
  color: #4b5563;
}

.hidden {
  display: none !important;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  background: #ffffff;
  padding: 16px 20px;
  border-radius: 8px;
  width: 320px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.modal h3 {
  margin: 0 0 8px 0;
  font-size: 16px;
}

.modal p {
  margin: 0 0 12px 0;
  font-size: 13px;
  color: #374151;
}

.controls input,
.controls select {
  margin-left: 8px;
  padding: 6px 8px;
}

.btn {
  min-width: 120px;
  padding: 6px 10px;
}

#dateInput {
  width: 90px;
}

main {
  display: grid;
  grid-template-columns: 1fr 260px;
  height: calc(100vh - 92px);
}

#map {
  height: 100%;
}

aside {
  padding: 16px;
  background: #ffffff;
  border-left: 1px solid #e5e7eb;
}

.legend {
  margin-top: 12px;
  font-size: 12px;
  color: #4b5563;
}

#actions {
  margin: 8px 0;
  font-size: 12px;
  color: #2563eb;
}

.progress {
  height: 6px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
}

#progressBar {
  height: 100%;
  width: 0%;
  background: #2563eb;
  transition: width 0.2s ease;
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
}

.dot-good {
  background: #2ecc71;
}

.dot-mid {
  background: #f1c40f;
}

.dot-weak {
  background: #e74c3c;
}

.dot-anchor {
  background: #111827;
}

.dot-gateway {
  background: #3b82f6;
}

.status {
  font-size: 12px;
  color: #6b7280;
  padding: 4px 8px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #ffffff;
}

.config-info {
  margin-top: 8px;
  font-size: 12px;
  color: #4b5563;
}

.auth {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 8px;
}

.auth input {
  padding: 6px 8px;
  font-size: 12px;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #e5e7eb;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 6px 0;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
