/* ELI STREAMING · Prueba de señales */
.pz { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; background: var(--bg); }
@media (min-width: 900px) {
  .pz { height: 100vh; height: 100dvh; overflow: hidden; }
}
.brand small { font-weight: 600; }
@media (max-width: 560px) { .brand small, .hide-sm { display: none; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Tarjetas de resumen ---------- */
.tiles {
  flex-shrink: 0; display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: .5rem;
  padding: .75rem .75rem .5rem; background: var(--panel);
}
@media (max-width: 1100px) { .tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 640px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .375rem; padding: .5rem; } }

.tile {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; min-width: 0;
  padding: .5rem .625rem .5rem .75rem; border: 1px solid var(--card-line); border-radius: var(--r-lg);
  background: var(--card); text-align: left; overflow: hidden; transition: border-color .15s, background-color .15s;
}
.tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: currentColor; opacity: .9; }
.tile--base { color: var(--ink); }
.tile--base::before { background: var(--line); }
button.tile:hover { border-color: currentColor; }
button.tile[aria-pressed="true"] { border-color: currentColor; background: color-mix(in srgb, currentColor 9%, var(--card)); }
.tile-k {
  font-size: .6875rem; line-height: 1rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tile-v {
  font-family: var(--display); font-size: 2rem; line-height: 1.1; font-weight: 700; letter-spacing: .01em;
  font-variant-numeric: tabular-nums; color: currentColor;
}
.tile--base .tile-v { color: var(--ink); }
.tile-s { font-size: .6875rem; line-height: 1rem; color: var(--hint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.tile.is-zero .tile-v { opacity: .45; }
@media (max-width: 640px) {
  .tile { padding: .375rem .5rem .375rem .625rem; }
  .tile-v { font-size: 1.5rem; }
  .tile-k { font-size: .625rem; letter-spacing: .06em; }
}

/* ---------- Barrido ---------- */
.sweep { flex-shrink: 0; padding: .25rem .75rem .75rem; background: var(--panel); border-bottom: 1px solid var(--line); }
.sweep-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: .25rem .75rem; margin-bottom: .375rem; font-size: .75rem; line-height: 1rem; }
.sweep-title { font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.sweep-title b { color: var(--ink); letter-spacing: .02em; text-transform: none; }
.sweep-count { font-weight: 700; color: var(--ink); }
.sweep-info { margin-left: auto; color: var(--hint); }
.sweep-info .on { color: var(--accent); font-weight: 600; }
@media (max-width: 640px) { .sweep-info { margin-left: 0; width: 100%; } }
.sweep-bar { height: .375rem; border-radius: 999px; background: var(--field); border: 1px solid var(--line); overflow: hidden; }
.sweep-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--card-line); transition: width .6s ease; }
.sweep-bar.is-on i {
  background: linear-gradient(90deg, rgba(90, 239, 155, .55), var(--accent));
  box-shadow: 0 0 10px rgba(90, 239, 155, .5);
}

/* ---------- Filtros ---------- */
.tools {
  flex-shrink: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem;
  padding: .625rem .75rem; border-bottom: 1px solid var(--line);
}
.chips { display: flex; flex-wrap: wrap; gap: .375rem; min-width: 0; }
.chip {
  display: inline-flex; align-items: center; gap: .375rem; height: 1.75rem; padding: 0 .625rem;
  border: 1px solid var(--card-line); border-radius: 999px; background: var(--field);
  font-size: .75rem; font-weight: 600; color: var(--muted); white-space: nowrap; transition: border-color .15s, color .15s, background-color .15s;
}
.chip .dot { color: inherit; }
.chip b { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.chip:hover { border-color: currentColor; }
.chip[aria-pressed="true"] { border-color: currentColor; background: color-mix(in srgb, currentColor 14%, var(--field)); }
.chip.st-activa, .chip.st-congelada, .chip.st-caida, .chip.st-bloqueada, .chip.st-offline, .chip.st-sin_senal, .chip.st-sin_verificar { color: var(--muted); }
.chip.st-activa .dot { color: var(--st-activa); }
.chip.st-congelada .dot { color: var(--st-congelada); }
.chip.st-caida .dot { color: var(--st-caida); }
.chip.st-bloqueada .dot { color: var(--st-bloqueada); }
.chip.st-offline .dot { color: var(--st-offline); }
.chip.st-sin_senal .dot { color: var(--st-sin-senal); }
.chip.st-sin_verificar .dot { color: var(--st-sin-verificar); }
.chip.st-activa[aria-pressed="true"] { color: var(--st-activa); }
.chip.st-congelada[aria-pressed="true"] { color: var(--st-congelada); }
.chip.st-caida[aria-pressed="true"] { color: var(--st-caida); }
.chip.st-bloqueada[aria-pressed="true"] { color: var(--st-bloqueada); }
.chip.st-offline[aria-pressed="true"] { color: var(--st-offline); }
.chip.st-sin_senal[aria-pressed="true"] { color: #a3b1a9; }
.chip.st-sin_verificar[aria-pressed="true"] { color: var(--st-sin-verificar); }
.chip--clear { color: var(--hint); background: transparent; border-style: dashed; }

.tools-right { display: flex; align-items: center; gap: .5rem .75rem; margin-left: auto; flex-wrap: wrap; min-width: 0; }
.tools-q { width: 17rem; height: 2rem; }
.tools-order { width: auto; height: 2rem; font-size: .8125rem; }
@media (max-width: 640px) {
  .tools-right { margin-left: 0; width: 100%; }
  .tools-q { flex: 1 1 100%; width: auto; }
  .tools-order { flex: 1; }
}

.toggle { display: inline-flex; align-items: center; gap: .5rem; font-size: .8125rem; font-weight: 600; color: var(--ink); cursor: pointer; white-space: nowrap; user-select: none; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle-ui {
  position: relative; width: 2rem; height: 1.125rem; border-radius: 999px; background: var(--field);
  border: 1px solid var(--card-line); transition: background-color .15s, border-color .15s;
}
.toggle-ui::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: .75rem; height: .75rem; border-radius: 50%;
  background: var(--muted); transition: transform .15s, background-color .15s;
}
.toggle input:checked + .toggle-ui { background: rgba(255, 93, 108, .18); border-color: var(--st-caida); }
.toggle input:checked + .toggle-ui::after { transform: translateX(.875rem); background: var(--st-caida); }
.toggle input:focus-visible + .toggle-ui { outline: 2px solid var(--accent); outline-offset: 2px; }

.banner {
  flex-shrink: 0; display: flex; align-items: center; gap: .5rem; padding: .5rem .75rem;
  background: rgba(255, 93, 108, .1); border-bottom: 1px solid rgba(255, 93, 108, .35); color: #ffc2c8; font-size: .8125rem;
}
.banner::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--st-caida); flex-shrink: 0; }

/* ---------- Tabla ---------- */
.tablewrap {
  flex: 1; min-height: 0; overflow: auto; scrollbar-color: var(--card-line) transparent; scrollbar-width: thin;
}
@media (max-width: 899px) { .tablewrap { flex: none; height: 72vh; height: 72dvh; } }

.grid { width: 100%; min-width: 68rem; font-size: .8125rem; line-height: 1.25rem; font-variant-numeric: tabular-nums; }
.grid th {
  position: sticky; top: 0; z-index: 2; padding: .5rem .625rem; background: var(--top);
  border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap;
  font-size: .6875rem; line-height: 1rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.grid td { padding: .375rem .625rem; vertical-align: middle; border-top: 1px solid rgba(44, 59, 52, .45); }
.grid .r { text-align: right; }
.grid tbody.grp { border-top: 1px solid var(--line); }
.grid tbody.grp:first-of-type { border-top: 0; }
.grid tbody.grp:hover td { background: rgba(255, 255, 255, .018); }
.grid tbody.grp tr:first-child td { border-top: 0; }
.grid td.c-ev, .grid td.c-act { vertical-align: top; padding-top: .5rem; }
.grid tbody.grp.is-flash td { animation: eli-flash 1.6s ease-out; }
@keyframes eli-flash { from { background: rgba(90, 239, 155, .16); } to { background: transparent; } }
.grid tbody.grp.is-probando td { background: rgba(90, 239, 155, .04); }

.c-ev { width: 17rem; min-width: 14rem; }
.ev-name { display: block; font-weight: 600; color: var(--ink); line-height: 1.3; }
.ev-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .125rem .5rem; margin-top: .125rem; font-size: .75rem; color: var(--hint); }
.ev-oculto {
  display: inline-flex; align-items: center; height: 1rem; padding: 0 .375rem; border-radius: 4px;
  background: rgba(255, 179, 71, .12); color: var(--st-bloqueada); font-size: .625rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.c-ch { white-space: nowrap; }
.ch-label { color: var(--ink); }
.ch-prov { display: block; font-size: .6875rem; color: var(--hint); line-height: 1rem; }
.c-tipo { white-space: nowrap; color: var(--ink); }
.c-st { white-space: nowrap; }
.c-mot { min-width: 14rem; max-width: 26rem; color: var(--ink); }
.mot-det { display: block; font-family: var(--mono); font-size: .6875rem; line-height: 1rem; color: var(--hint); }
.c-res, .c-ms { white-space: nowrap; }
.ms-lento { color: var(--st-bloqueada); }
.c-rev { white-space: nowrap; color: var(--muted); }
.rev-viejo { color: var(--st-bloqueada); }
.c-act { width: 1%; white-space: nowrap; text-align: right; }
.acts { display: inline-flex; gap: .375rem; }
.acts .btn { height: 1.75rem; padding: 0 .625rem; }
.acts .btn--go { min-width: 6.25rem; border-color: rgba(90, 239, 155, .45); color: var(--accent); }
.acts .btn--go:hover { border-color: var(--accent); background: var(--accent-12); }
.nada { color: var(--hint); }

.grid tbody.msg td { padding: 2.5rem 1rem; text-align: center; color: var(--hint); font-size: .875rem; border: 0; }

.pz-foot {
  flex-shrink: 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1rem;
  padding: .5rem .75rem; background: var(--top); border-top: 1px solid var(--line);
  font-size: .75rem; line-height: 1rem; color: var(--muted); font-variant-numeric: tabular-nums;
}
.pz-foot b { color: var(--ink); font-weight: 600; }
