:root {
  --bg: #2b2f36;
  --bar: #23262c;
  --panel: #3a3f47;
  --panel-head: #30343b;
  --border: #4a5059;
  --text: #e6e8eb;
  --muted: #b7bec8;
  --green: #22e04a;
  --green-dark: #17b53a;
  --red: #e5323c;
  --accent: #c4b3ff;
  --brand: #6b35ee;
  --brand-2: #4b3de8;
  --live: #d4232c;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 15px;
}
.topbar {
  height: 48px; background: var(--bar);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; border-bottom: 1px solid #1b1d21;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: .5px; }
.brand img { height: 28px; width: auto; display: block; }
.brand .wordmark { font-weight: 700; }
.brand small { font-weight: 400; color: var(--muted); margin-left: 6px; }
.topbar .right { font-size: 13px; color: var(--muted); display: flex; gap: 12px; align-items: center; }

h1.title { text-align: center; font-size: 26px; color: #c9cdd3; margin: 36px 0 24px; font-weight: 700; }

.center { width: 100%; max-width: 520px; margin: 0 auto; padding: 0 16px 40px; }

.preview {
  width: 100%; aspect-ratio: 16/9; background: #111; border-radius: 4px; overflow: hidden;
  display: flex; align-items: center; justify-content: center; color: var(--muted); position: relative;
}
.preview video { width: 100%; height: 100%; object-fit: cover; background: #000; transform: scaleX(-1); }
.preview .badge {
  position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,.6); padding: 6px 10px; border-radius: 3px;
  font-size: 12px; letter-spacing: 1px; display: none;
}
.preview .badge.live { display: block; color: #fff; background: var(--live); }

.btn-start {
  display: block; margin: 20px auto 24px; padding: 12px 48px; border: 0; border-radius: 4px;
  background: var(--brand); color: #fff; font-weight: 800; font-size: 17px; letter-spacing: 2px; cursor: pointer;
  box-shadow: 0 2px 0 #3d26a8;
}
.btn-start:hover { filter: brightness(1.05); }
.btn-start.stop { background: var(--red); color: #fff; box-shadow: 0 2px 0 #a3151d; }
.btn-start:disabled { opacity: .5; cursor: not-allowed; }

.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 4px; margin: 0 auto 14px;
  padding: 14px 16px;
}
.card .head { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 8px; }
.card .head svg { width: 16px; height: 16px; fill: currentColor; }
.card .inline { display: flex; align-items: center; gap: 10px; }
.card .inline .head { margin: 0; }
select, input[type=text], input[type=password] {
  background: #f3f4f6; color: #1a1d22; border: 1px solid #c7ccd3; border-radius: 3px; padding: 8px 12px; font-size: 14px;
  min-width: 0;
}
select.wide, input.wide { width: 100%; }
.meter { width: 10px; height: 10px; background: #666; border-radius: 2px; }
.meter.on { background: var(--green); }
.hint { color: var(--muted); font-size: 13px; margin-top: 6px; }
.status { text-align: center; color: var(--muted); font-size: 13px; min-height: 18px; }
.status.err { color: #ff8080; }
.link { color: var(--accent); word-break: break-all; }

/* Estudio */
.studio { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 12px; }
.inputs { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.input {
  background: var(--panel); border: 1px solid var(--border); border-radius: 4px; overflow: hidden;
}
.input .vid { aspect-ratio: 16/9; background: #000; }
.input .vid video { width: 100%; height: 100%; object-fit: cover; }
.input .meta { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; font-size: 13px; }
.input .meta .num { background: #1f2227; padding: 3px 8px; border-radius: 3px; color: var(--muted); margin-right: 6px; }
.input button { background: #1f2227; color: var(--text); border: 1px solid var(--border); border-radius: 3px; padding: 6px 10px; cursor: pointer; font-size: 12px; }
.input button:hover { border-color: var(--brand); }
.empty { color: var(--muted); padding: 40px; text-align: center; border: 1px dashed var(--border); border-radius: 4px; }
code.inv { background: #1f2227; padding: 3px 8px; border-radius: 3px; }

.logo-hero { display:block; margin: 32px auto 8px; width: min(420px, 80%); }
