html, body {
  margin: 0;
  min-height: 100%;
  background: radial-gradient(circle at top, #1a2540 0, #050710 45%, #000);
  color: #f7fafc;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.desk {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 24px 40px;
  box-sizing: border-box;
}

.desk-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.desk-kicker {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #6b7280;
}

.desk-brand h1 {
  margin: 4px 0 0;
  font-size: 28px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.desk-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: #0f172acc;
  font-size: 12px;
  color: #9ca3af;
}

.pill strong {
  color: #f7fafc;
  font-weight: 600;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.dot.on {
  background: radial-gradient(circle at 30% 30%, #6ee7b7, #16a34a);
  box-shadow: 0 0 10px #22c55ecc;
}

.dot.off {
  background: #f87171;
  box-shadow: 0 0 10px #f8717166;
}

.summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  border-radius: 16px;
  background: radial-gradient(circle at top left, #1e40af8c, #0f172afa);
  border: 1px solid rgba(30, 64, 175, 0.85);
}

.label {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #9ca3af;
}

.value {
  margin-top: 4px;
  font-size: 18px;
  font-weight: 600;
}

.value.muted {
  font-size: 14px;
  font-weight: 500;
  color: #9ca3af;
}

.controls {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 10px;
  margin-bottom: 18px;
  align-items: center;
}

.controls-note {
  grid-column: 1 / -1;
  font-size: 12px;
  color: #6b7280;
}

.btn {
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: inherit;
}

.btn.go {
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.55);
  background: radial-gradient(circle at top, #22c55e40, #0f172afa);
}

.btn.stop {
  color: #e5e7eb;
  border-color: rgba(148, 163, 184, 0.35);
  background: #0f172a;
}

.btn.kill {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.7);
  background: radial-gradient(circle at top, #f8717159, #0f172afa);
  box-shadow: 0 0 18px #f8717133;
}

.btn.ghost {
  color: #9ca3af;
  background: transparent;
  border-color: rgba(148, 163, 184, 0.28);
  padding: 6px 12px;
  font-size: 12px;
}

.grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 14px;
  margin-bottom: 14px;
}

.panel {
  border-radius: 16px;
  padding: 16px 16px 12px;
  background: radial-gradient(circle at top left, #1e40af40, #0f172afa);
  border: 1px solid rgba(31, 41, 55, 0.95);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.panel-head h2 {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tabs {
  display: flex;
  gap: 6px;
}

.tab {
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: transparent;
  color: #9ca3af;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.tab.on {
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.55);
}

.count {
  font-size: 12px;
  color: #6b7280;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th, td {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid rgba(55, 65, 81, 0.7);
}

th {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6b7280;
  font-weight: 500;
}

.empty {
  color: #6b7280;
  padding: 18px 6px;
}

.log-panel {
  min-height: 220px;
}

.log {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 280px;
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  color: #cbd5e1;
}

.log li {
  padding: 6px 0;
  border-bottom: 1px dashed rgba(55, 65, 81, 0.8);
}

.log .time {
  color: #6b7280;
  margin-right: 8px;
}

.log.error {
  color: #fca5a5;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  padding: 10px 14px;
  border-radius: 10px;
  background: #0f172a;
  border: 1px solid rgba(248, 113, 113, 0.5);
  color: #fecaca;
  font-size: 13px;
  z-index: 50;
}

@media (max-width: 900px) {
  .summary,
  .grid,
  .controls {
    grid-template-columns: 1fr 1fr;
  }
  .desk-header {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .summary,
  .grid,
  .controls {
    grid-template-columns: 1fr;
  }
  .btn.kill {
    order: -1;
  }
}
