:root {
  --bg: #0f1115;
  --panel: #171a21;
  --border: #2a2f3a;
  --text: #e6e8eb;
  --muted: #9aa3b2;
  --accent: #4f8cff;
  --danger: #ff5c5c;
  --success: #3ecf8e;
  --warn: #ffb224;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}

nav a { color: var(--text); text-decoration: none; margin-right: 1rem; }
nav a:hover { color: var(--accent); }

main {
  max-width: 980px;
  margin: 0 auto;
  padding: 1.5rem;
}

h1, h2, h3 { font-weight: 600; }

table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; }
th, td { text-align: left; padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 500; font-size: 0.85rem; text-transform: uppercase; }

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

.badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}
.badge-scheduled { background: #2a2f3a; color: var(--muted); }
.badge-listening, .badge-receiving, .badge-processing, .badge-assembling { background: #3a3415; color: var(--warn); }
.badge-completed { background: #15372a; color: var(--success); }
.badge-failed { background: #3a1818; color: var(--danger); }
.badge-cancelled { background: #2a2f3a; color: var(--muted); }

form { margin-bottom: 1rem; }
fieldset { border: 1px solid var(--border); border-radius: 8px; margin-bottom: 1rem; }
legend { padding: 0 0.5rem; color: var(--muted); }

label { display: block; margin-bottom: 0.25rem; font-size: 0.9rem; color: var(--muted); }
input, select, textarea {
  width: 100%;
  padding: 0.5rem;
  margin-bottom: 0.9rem;
  background: #0d0f13;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}
textarea { min-height: 7rem; font-family: ui-monospace, monospace; font-size: 0.85rem; }

.row { display: flex; gap: 1rem; }
.row > * { flex: 1; }

button, .button {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  text-decoration: none;
}
button.secondary, .button.secondary { background: #2a2f3a; }
button.danger, .button.danger { background: var(--danger); }

.error { color: var(--danger); margin-bottom: 1rem; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, monospace; }

details > summary { cursor: pointer; padding: 0.5rem 0; color: var(--accent); }

video { width: 100%; max-width: 640px; border-radius: 8px; background: black; }

.connection-info {
  background: #15203a;
  border: 1px solid #27407a;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}
.connection-info dl { display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 1rem; margin: 0; }
.connection-info dt { color: var(--muted); }
.connection-info dd { margin: 0; font-family: ui-monospace, monospace; }
