:root {
  --bg: #0f1419;
  --panel: #1a222c;
  --line: #2c3846;
  --text: #e8eef4;
  --muted: #8b9bb0;
  --accent: #3d9cf0;
  --ok: #3ecf8e;
  --bad: #f07178;
  --warn: #e6c07b;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  background: #12181f;
}

header h1 { margin: 0; font-size: 1.15rem; font-weight: 600; }
header .grow { flex: 1; }
label.inline { font-size: 0.8rem; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
label select { min-width: 220px; max-width: 420px; }
  font: inherit;
  color: var(--text);
  background: #0d1218;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
}
button {
  background: var(--accent);
  border-color: transparent;
  color: #061018;
  font-weight: 600;
  cursor: pointer;
}
button:disabled { opacity: 0.5; cursor: not-allowed; }
button.ghost { background: transparent; color: var(--text); border-color: var(--line); }
button.danger { background: #c44c55; color: #fff; }

.ships {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 12px 24px;
  border-bottom: 1px solid var(--line);
}
.ship {
  min-width: 200px;
  padding: 10px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}
.ship.active { border-color: var(--accent); }
.ship .id { font-weight: 600; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--bad); }
.dot.on { background: var(--ok); }
.meta { font-size: 0.75rem; color: var(--muted); margin-top: 4px; }

nav.tabs {
  display: flex;
  gap: 4px;
  padding: 12px 24px 0;
}
nav.tabs button {
  background: transparent;
  color: var(--muted);
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
}
nav.tabs button.on { color: var(--text); border-bottom-color: var(--accent); }

main { padding: 16px 24px 40px; max-width: 1100px; }
.panel { display: none; }
.panel.on { display: block; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 14px; }
.row label { font-size: 0.8rem; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.status {
  margin: 12px 0;
  padding: 10px 12px;
  background: #0d1218;
  border-radius: 6px;
  font-size: 0.85rem;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 2.4em;
  border: 1px solid var(--line);
}
.status.ok { border-color: var(--ok); }
.status.err { border-color: var(--bad); }

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 500; }
td input { width: 100%; }
.locked { color: var(--warn); font-size: 0.8rem; }

pre.json {
  background: #0d1218;
  padding: 12px;
  overflow: auto;
  border-radius: 6px;
  font-size: 0.8rem;
  max-height: 420px;
}
