:root {
  --fondo: #0e1013;
  --panel: #171a1f;
  --panel2: #1f232a;
  --linea: #2a2f37;
  --texto: #e8eaed;
  --suave: #9aa1ab;
  --acento: #fad047;
  --vivo: #e5484d;
  --ok: #3dbb7a;
  --radio: 6px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--fondo); color: var(--texto); font: 14px/1.4 "Archivo", system-ui, sans-serif; }
a { color: var(--acento); text-decoration: none; }
h2 { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--suave); margin: 0 0 8px; font-weight: 600; }
button, select, input, textarea {
  font: inherit; color: var(--texto); background: var(--panel2); border: 1px solid var(--linea);
  border-radius: var(--radio); padding: 7px 10px;
}
button { cursor: pointer; }
button:hover:not(:disabled) { border-color: #444b56; }
button:disabled { opacity: .45; cursor: default; }
button.primario { background: var(--acento); color: #111; border-color: var(--acento); font-weight: 600; }
button.peligro { background: var(--vivo); border-color: var(--vivo); color: #fff; font-weight: 600; }
button.activo { border-color: var(--acento); color: var(--acento); }
input[type=checkbox] { accent-color: var(--acento); }
select, input[type=text], input[type=password], input[type=number], textarea { width: 100%; }

.barra { display: flex; align-items: center; gap: 16px; padding: 10px 16px; border-bottom: 1px solid var(--linea); background: var(--panel); }
.barra .marca { font-weight: 700; letter-spacing: .02em; }
.barra nav { display: flex; gap: 14px; margin-left: auto; }
.barra nav a { color: var(--suave); }
.barra nav a.aqui { color: var(--texto); }
.estado { font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 4px; background: var(--panel2); color: var(--suave); }
.estado.vivo { background: var(--vivo); color: #fff; }
.estado.grabando { background: #5b1f22; color: #ffb4b6; }

.estudio { display: grid; grid-template-columns: 260px 1fr 290px; gap: 0; height: calc(100% - 49px); }
.col { padding: 14px; overflow-y: auto; border-right: 1px solid var(--linea); }
.col:last-child { border-right: 0; border-left: 1px solid var(--linea); }
.bloque { margin-bottom: 20px; }
.fila { display: flex; gap: 8px; align-items: center; }
.fila > * { flex: 1; }
.pila > * + * { margin-top: 8px; }

.centro { display: flex; flex-direction: column; padding: 14px; gap: 12px; overflow-y: auto; }
.lienzo-caja { position: relative; background: #000; border-radius: var(--radio); overflow: hidden; aspect-ratio: 16 / 9; width: 100%; }
#programa { width: 100%; height: 100%; display: block; }
.layouts, .escenas { display: flex; flex-wrap: wrap; gap: 8px; }
.layouts button { min-width: 92px; }

.fuente { display: grid; grid-template-columns: 64px 1fr; gap: 8px; align-items: center; padding: 6px; border: 1px solid var(--linea); border-radius: var(--radio); background: var(--panel); }
.fuente + .fuente { margin-top: 8px; }
.fuente video { width: 64px; height: 36px; object-fit: cover; background: #000; border-radius: 3px; }
.fuente .nombre { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fuente .acciones { display: flex; gap: 6px; margin-top: 4px; }
.fuente .acciones button { padding: 3px 7px; font-size: 12px; }
.fuente.en-escena { border-color: var(--acento); }

.medidor { height: 6px; background: var(--panel2); border-radius: 3px; overflow: hidden; }
.medidor > div { height: 100%; width: 0; background: var(--ok); transition: width .08s; }
.dato { display: flex; justify-content: space-between; color: var(--suave); font-size: 12px; }
.dato b { color: var(--texto); font-weight: 600; }
.aviso { font-size: 12px; color: var(--suave); }
.aviso.mal { color: #ff9a9d; }

.pagina { max-width: 980px; margin: 0 auto; padding: 24px 16px; }
.tabla { width: 100%; border-collapse: collapse; }
.tabla th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--suave); font-weight: 600; padding: 8px; border-bottom: 1px solid var(--linea); }
.tabla td { padding: 10px 8px; border-bottom: 1px solid var(--linea); vertical-align: middle; }
.tabla td.num { text-align: right; font-variant-numeric: tabular-nums; }
.etiqueta { font-size: 11px; padding: 2px 6px; border-radius: 3px; background: var(--panel2); color: var(--suave); }
.etiqueta.ok { color: var(--ok); }
.etiqueta.ac { color: var(--acento); }
.barra-prog { height: 4px; background: var(--panel2); border-radius: 2px; overflow: hidden; margin-top: 4px; }
.barra-prog > div { height: 100%; background: var(--acento); width: 0; }

.centrado { min-height: 100%; display: grid; place-items: center; padding: 16px; }
.tarjeta { width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--linea); border-radius: 8px; padding: 22px; }

@media (max-width: 1100px) {
  .estudio { grid-template-columns: 1fr; height: auto; }
  .col { border: 0; border-bottom: 1px solid var(--linea); }
  .col:last-child { border: 0; }
}
.fuente .acciones { flex-wrap: wrap; }
.fuente > div { min-width: 0; }
input[type=file] { width: 100%; font-size: 12px; padding: 4px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 13px; cursor: pointer; }
.publicar { border-top: 1px solid var(--linea); padding-top: 10px; margin-top: 4px; }
.etiqueta.mal { color: #ff9a9d; }
.etiqueta { display: inline-block; white-space: normal; }
