:root {
  color-scheme: dark;
  --bg: #0f1115;
  --panel: #171a21;
  --border: #2a2e38;
  --text: #e6e8ec;
  --muted: #8b8f9a;
  --accent: #4f8cff;
  --danger: #ff5c5c;
  --warn-bg: #3a1f1f;
  --warn-border: #7a2e2e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
  background: var(--bg);
  color: var(--text);
}

.wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

.auth-wrap {
  max-width: 420px;
  margin: 10vh auto 0;
  padding: 24px 16px;
}

h1 {
  font-size: 1.25rem;
  margin: 0 0 16px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin: 12px 0 4px;
}

input, select, button {
  font-family: inherit;
  font-size: 0.95rem;
}

input, select {
  width: 100%;
  padding: 8px 10px;
  background: #0c0e12;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
}

button {
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #04101f;
  font-weight: 600;
}

button.secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
  font-weight: 400;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.error {
  color: var(--danger);
  font-size: 0.85rem;
  margin-top: 8px;
  min-height: 1.2em;
}

.banner {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  color: #ffd9d9;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  margin-bottom: 16px;
  font-weight: 600;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.topbar .who {
  color: var(--muted);
  font-size: 0.85rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

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

tr.selectable {
  cursor: pointer;
}

tr.selectable:hover {
  background: #1e222c;
}

tr.selected {
  background: #1c2740;
}

.controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 12px;
}

.controls > div {
  min-width: 140px;
}

pre.logs {
  background: #0a0c0f;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
  max-height: 60vh;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.8rem;
  line-height: 1.4;
}

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