:root {
  --bg: #0b1220;
  --card: #121b2e;
  --card-2: #1a2640;
  --text: #eef4ff;
  --muted: #9eb0d0;
  --line: rgba(255,255,255,.09);
  --ok: #22c55e;
  --warn: #f59e0b;
  --danger: #ef4444;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #17233f 0, var(--bg) 55%);
  color: var(--text);
}
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}
h1 { margin: 0; font-size: 32px; }
.sub { margin: 6px 0 0; color: var(--muted); }
.status {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line);
}
.card {
  background: rgba(18,27,46,.92);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
}
.auth-card, .controls, .logs-card { margin-bottom: 16px; }
.grid {
  display: grid;
  gap: 16px;
}
.grid.two {
  grid-template-columns: repeat(2, minmax(0,1fr));
  margin-bottom: 14px;
}
.panels {
  grid-template-columns: repeat(2, minmax(0,1fr));
}
label span, .panel-title, h2 { display: block; margin-bottom: 8px; font-weight: 700; }
.muted, .help { color: var(--muted); }
input, select, button {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 12px 14px;
  font-size: 15px;
}
input, select {
  background: #0f172a;
  color: var(--text);
}
button {
  cursor: pointer;
  background: #3b82f6;
  color: white;
  font-weight: 700;
}
button.ghost { background: transparent; }
button:disabled { opacity: .45; cursor: not-allowed; }
.row {
  display: flex;
  gap: 12px;
  align-items: center;
}
.between { justify-content: space-between; }
.video-area {
  background: #07101d;
  border-radius: 16px;
  min-height: 360px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px dashed rgba(255,255,255,.12);
  padding: 10px;
}
.video-area.empty { color: var(--muted); }
.video-area video, .video-area audio {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
  background: black;
}
.remote-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.remote-tile {
  position: relative;
  min-height: 220px;
  background: #000;
  border-radius: 14px;
  overflow: hidden;
}
.remote-label {
  position: absolute;
  left: 10px;
  bottom: 10px;
  background: rgba(0,0,0,.55);
  color: white;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
}
pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: #d6e3ff;
  line-height: 1.5;
  min-height: 100px;
}
.hidden { display: none; }
@media (max-width: 900px) {
  .grid.two, .panels { grid-template-columns: 1fr; }
  header, .row.between { flex-direction: column; align-items: stretch; }
}
