:root {
  --moving: #1f9d55;
  --stopped: #2b6cb0;
  --inactive: #8a8f98;
  --disconnected: #1a1a1a;
  --zone: #d64545;
  --proximity: #e8890c;
  --border: #d7dbe0;
  --muted: #5f6b7a;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  color: #1c2430;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f6f7f9;
}

header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 16px;
  background: #1c2430;
  color: #fff;
}

header h1 {
  font-size: 16px;
  margin: 0;
  flex: 1;
}

header input {
  padding: 4px 8px;
  border: 1px solid #3b4656;
  border-radius: 4px;
}

header button {
  padding: 4px 12px;
  border: 0;
  border-radius: 4px;
  background: #3d7be0;
  color: #fff;
  cursor: pointer;
}

.status {
  font-size: 12px;
  min-width: 180px;
  text-align: right;
}

.status.error {
  color: #ff8f8f;
}

main {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 420px;
  min-height: 0;
}

#map {
  height: 100%;
}

aside {
  overflow-y: auto;
  border-left: 1px solid var(--border);
  background: #fff;
  padding: 8px 14px;
}

aside h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 14px 0 6px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 4px 6px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.list li {
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.list .empty {
  color: var(--muted);
}

.badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 12px;
  color: #fff;
  background: var(--muted);
}

.badge.moving,
.badge.completed {
  background: var(--moving);
}

.badge.stopped,
.badge.started,
.badge.command_sent {
  background: var(--stopped);
}

.badge.inactive {
  background: var(--inactive);
}

.badge.disconnected,
.badge.failed {
  background: var(--disconnected);
}

.badge.compensating,
.badge.proximity {
  background: var(--proximity);
}

.badge.zone_entered {
  background: var(--zone);
}

.note {
  color: var(--muted);
  display: block;
  margin-top: 2px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  font-size: 12px;
  color: var(--muted);
}

.dot,
.ring,
.line {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}

.dot.moving {
  background: var(--moving);
}

.dot.stopped {
  background: var(--stopped);
}

.dot.inactive {
  background: var(--inactive);
}

.dot.disconnected {
  background: var(--disconnected);
}

.ring {
  border: 2px solid var(--zone);
}

.line {
  width: 16px;
  height: 0;
  border-radius: 0;
  border-top: 2px dashed var(--proximity);
}

.hive-label {
  background: transparent;
  border: 0;
  box-shadow: none;
  font-weight: 600;
}
