:root { --fondo: #0f1216; --panel: #181d23; --borde: #2a323c; --texto: #dfe5ec; --tenue: #8a96a3;
  --acento: #f5a524; --frio: #3fa7ff; --calido: #ff6a3d; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--fondo); color: var(--texto);
  font: 13px/1.4 system-ui, "Segoe UI", sans-serif; }
header { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; padding: .45rem .8rem;
  background: var(--panel); border-bottom: 1px solid var(--borde); }
header .marca { font-weight: 700; color: var(--acento); text-decoration: none; margin-right: .4rem; }
header .sep { width: 1px; height: 20px; background: var(--borde); }
select, button, input { background: #0c0f13; color: var(--texto); border: 1px solid var(--borde);
  border-radius: 6px; padding: 3px 7px; font: inherit; }
button { cursor: pointer; }
button:hover { border-color: var(--acento); }
#tiempo { width: 220px; padding: 0; }
#reloj { font-variant-numeric: tabular-nums; min-width: 64px; }
body.visor main { position: relative; height: calc(100% - 78px); }
#lienzo { position: absolute; inset: 0; }
footer { font-size: 11px; color: var(--tenue); padding: 4px .8rem; border-top: 1px solid var(--borde); }
#ficha { position: absolute; top: 10px; right: 10px; width: 340px; max-height: calc(100% - 20px); overflow: auto;
  background: rgba(24, 29, 35, .94); border: 1px solid var(--borde); border-radius: 10px; padding: 10px 14px; }
#ficha.oculto { display: none; }
#ficha h2 { margin: 0 0 6px; font-size: 15px; }
#ficha h3 { margin: 12px 0 4px; font-size: 12px; color: var(--tenue); text-transform: uppercase; letter-spacing: .05em; }
#ficha table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
#ficha td { padding: 1px 0; } #ficha td:first-child { color: var(--tenue); }
#cerrarFicha { position: absolute; top: 6px; right: 8px; border: none; font-size: 18px; background: none; }
.barra { display: flex; align-items: center; gap: 6px; margin: 2px 0; }
.barra span:first-child { width: 70px; color: var(--tenue); }
.barra .b { flex: 1; height: 8px; background: #0c0f13; border-radius: 4px; overflow: hidden; }
.barra .b i { display: block; height: 100%; background: var(--acento); }
pre.codigo { background: #0c0f13; border: 1px solid var(--borde); border-radius: 6px; padding: 6px; margin: 0;
  font-size: 11.5px; overflow-x: auto; }
pre.codigo .linea { display: block; padding: 0 4px; border-radius: 3px; }
pre.codigo .linea.activa { background: rgba(245, 165, 36, .28); }
#aviso { position: absolute; left: 12px; bottom: 12px; color: var(--tenue); }
/* panel */
body.panel { padding: 0 0 2rem; }
body.panel main { padding: 1rem 1.2rem; max-width: 1200px; }
.tarjetas { display: flex; gap: .8rem; flex-wrap: wrap; margin-bottom: 1rem; }
.tarjeta { background: var(--panel); border: 1px solid var(--borde); border-radius: 10px; padding: .6rem .9rem; min-width: 150px; }
.tarjeta b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; }
.tarjeta.alerta { border-color: var(--calido); }
table.corridas { width: 100%; border-collapse: collapse; background: var(--panel); border-radius: 10px; overflow: hidden; }
table.corridas th, table.corridas td { padding: 6px 8px; border-bottom: 1px solid var(--borde); text-align: left;
  font-variant-numeric: tabular-nums; }
table.corridas th { color: var(--tenue); font-weight: 500; }
.estado { padding: 1px 8px; border-radius: 10px; background: #26303a; }
.estado.corriendo { background: #1d4d2c; } .estado.pausada { background: #5a4513; } .estado.detenida, .estado.terminada { background: #3a2a2a; }
canvas.grafica { background: var(--panel); border: 1px solid var(--borde); border-radius: 10px; width: 100%; height: 280px; margin-top: 1rem; }
.pestanas { display: flex; gap: 4px; margin-bottom: 6px; }
.pestanas button { flex: 1; padding: 3px 0; }
.pestanas button.activa { border-color: var(--acento); color: var(--acento); }
pre.codigo .linea { white-space: pre; }
