:root {
  --bg: #0b1220; --panel: #111a2c; --panel-2: #16223a; --line: #23314d; --line-2: #2d3e60;
  --text: #e6ecf7; --muted: #8b9ab5; --dim: #5d6c89;
  --accent: #22c55e; --accent-ink: #052e16; --s1: #3987e5; --s2: #d95926; --s3: #199e70; --good: #0ca30c; --warn: #fab219; --crit: #d03b3b; --grid: rgba(255,255,255,.07); --brand: #0a7cff; --brand-ink: #ffffff; --brand-2: #f7a21b; --blue: #60a5fa; --amber: #f59e0b; --red: #ef4444; --violet: #a78bfa;
  --radius: 10px; --mono: ui-monospace, "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
  --field: #0d1526; --field-2: #0d1526; --ink-soft: #cfe3ff; --tag-gpu: #b9d6ff; --tag-cpu: #ffd59a; --save: #3fd13f; --error-ink: #fca5a5;
  --banner-bg: #3b2a06; --banner-line: #a16207; --banner-ink: #fde68a; --glow: #0c3a7a; --tip-bg: #0a1020; --backdrop: rgb(2 6 15 / .7);
  --shadow: rgb(0 0 0 / .45); --primary-hover: #2b8fff; --bar-in: #7d8aa3;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #eef2f8; --panel: #ffffff; --panel-2: #f1f4f9; --line: #dde3ee; --line-2: #c8d1e1;
  --text: #142033; --muted: #52607a; --dim: #76839b;
  --accent: #15803d; --grid: rgba(20,32,51,.09); --brand: #0a6fe6; --brand-2: #e08e00; --blue: #2563eb; --amber: #b45309; --red: #dc2626; --violet: #7c3aed;
  --field: #ffffff; --field-2: #f6f8fc; --ink-soft: #0a5bc4; --tag-gpu: #1d4ed8; --tag-cpu: #a15c00; --save: #15803d; --error-ink: #b91c1c;
  --banner-bg: #fff6dc; --banner-line: #f0b429; --banner-ink: #7a4b00; --glow: #cfe2ff; --tip-bg: #ffffff; --backdrop: rgb(15 23 42 / .35);
  --shadow: rgb(15 23 42 / .16); --primary-hover: #0a5bc4; --bar-in: #a3aec2;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.hidden { display: none !important; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
svg { width: 15px; height: 15px; flex: none; }

.btn { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap; }
.btn:hover:not(:disabled) { border-color: var(--muted); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); font-weight: 600; }
.btn.primary:hover:not(:disabled) { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); }
.icon-btn { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover:not(:disabled) { background: var(--panel-2); color: var(--text); border-color: var(--line-2); }
.icon-btn:disabled { opacity: .3; cursor: default; }
.icon-btn.go:hover:not(:disabled) { color: var(--accent); }
.icon-btn.no:hover:not(:disabled) { color: var(--red); }

input, select { width: 100%; height: 34px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--field); color: var(--text); font: inherit; }
input:focus, select:focus { outline: 2px solid color-mix(in srgb, var(--blue) 50%, transparent); border-color: var(--blue); }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--brand); }
label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--muted); min-width: 0; }
label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-size: 13.5px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > label { flex: 1 1 120px; }
.row > label.grow { flex: 3 1 240px; }
.spacer { flex: 1; }
.hint { color: var(--muted); font-size: 12.5px; margin: 0; }
.error { color: var(--error-ink); min-height: 1em; margin: 6px 0 0; white-space: pre-line; }

.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: radial-gradient(1200px 600px at 50% -10%, var(--glow) 0%, var(--bg) 60%); }
.login-card { width: min(380px, 100%); display: flex; flex-direction: column; gap: 14px; padding: 28px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand b { display: block; font-size: 15px; }
.brand small { display: block; color: var(--dim); font-size: 11.5px; font-family: var(--mono); }
.brand-logo { height: 34px; width: auto; display: block; }
.brand-sep { width: 1px; height: 30px; background: var(--line-2); }
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; margin-bottom: 10px; }
.login-brand img { width: 100%; max-width: 280px; height: auto; }
.login-brand b { display: block; font-size: 16px; }
.login-brand small { display: block; color: var(--muted); font-size: 12.5px; }

.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 24px; padding: 10px 20px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 4px; }
.tabs button { height: 34px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font: inherit; font-weight: 500; cursor: pointer; }
.tabs button.active { background: var(--panel-2); color: var(--text); box-shadow: inset 0 -2px 0 var(--brand-2); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); font-size: 12px; font-family: var(--mono); color: var(--text); white-space: nowrap; }
.pill.muted { color: var(--muted); }
.banner { margin: 12px 20px 0; padding: 10px 14px; border-radius: 8px; background: var(--banner-bg); border: 1px solid var(--banner-line); color: var(--banner-ink); font-size: 13px; }

main { padding: 18px 20px 40px; max-width: 1840px; margin: 0 auto; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar.tight { margin-bottom: 8px; }
.search { width: 220px; }
.counters { display: flex; gap: 8px; flex-wrap: wrap; }
.counter { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.counter b { color: var(--text); font-size: 15px; font-variant-numeric: tabular-nums; }

.table-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; }
.grid th { text-align: left; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--dim); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.grid td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.grid tr:last-child td { border-bottom: 0; }
.grid tbody tr:hover { background: color-mix(in srgb, var(--panel-2) 60%, transparent); }
.grid .chk { width: 34px; }
.grid th.right, .right { text-align: right; }
.ch-name { font-weight: 600; }
.ch-slug, .src { color: var(--dim); font-family: var(--mono); font-size: 12px; }
.src { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.actions { display: flex; gap: 2px; justify-content: flex-end; }
.empty { padding: 48px; text-align: center; color: var(--muted); }

.state { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; white-space: nowrap; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--dim); flex: none; }
.s-ok .dot { background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.s-warn .dot { background: var(--amber); box-shadow: 0 0 0 3px color-mix(in srgb, var(--amber) 22%, transparent); }
.s-bad .dot { background: var(--red); box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 22%, transparent); animation: blink 1.2s infinite; }
.s-off { color: var(--muted); }
@keyframes blink { 50% { opacity: .35; } }
.tag { display: inline-block; padding: 1px 7px; margin: 1px 3px 1px 0; border-radius: 5px; font-size: 11px; font-weight: 600; font-family: var(--mono); border: 1px solid var(--line-2); color: var(--muted); }
.tag.hls { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.tag.udp { color: var(--blue); border-color: color-mix(in srgb, var(--blue) 40%, transparent); }
.tag.srt { color: var(--violet); border-color: color-mix(in srgb, var(--violet) 40%, transparent); }
.tag.rtmp { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 40%, transparent); }
.tag.gpu { color: var(--tag-gpu); border-color: color-mix(in srgb, var(--brand) 55%, transparent); margin-top: 4px; }
.tag.cpu { color: var(--tag-cpu); border-color: color-mix(in srgb, var(--brand-2) 55%, transparent); margin-top: 4px; }
.tag.pending { color: var(--amber); border-color: var(--amber); margin-top: 4px; }
.tag.tc { color: var(--text); }
.tag.tc.tc2 { color: var(--s3); border-color: color-mix(in srgb, var(--s3) 60%, transparent); }
.fmt + .tag.gpu + .tag.tc, .fmt + .tag.cpu + .tag.tc { margin-top: 4px; }
.checklist { list-style: none; margin: 8px 0 0; padding: 0; font-size: 13px; }
.checklist li { padding: 2px 0; }
.checklist .ok { color: var(--good); font-weight: 700; margin-right: 6px; }
.checklist .no { color: var(--red); font-weight: 700; margin-right: 6px; }
.metrics { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
.metrics b { color: var(--text); font-weight: 500; }
.metrics .slow { color: var(--amber); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.card h3 { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.card .sub { color: var(--muted); font-size: 12.5px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-family: var(--mono); font-size: 12.5px; text-align: right; overflow-wrap: anywhere; }
.card .foot { display: flex; gap: 6px; margin-top: auto; padding-top: 6px; }
.bar { height: 6px; border-radius: 4px; background: var(--panel-2); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); }
.meter { display: grid; grid-template-columns: 70px 1fr 48px; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); }
.meter span:last-child { text-align: right; font-family: var(--mono); color: var(--text); }

dialog.modal { padding: 0; border: 1px solid var(--line-2); border-radius: 14px; background: var(--panel); color: var(--text); width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 40px); }
dialog.modal.wide { width: min(880px, calc(100vw - 32px)); }
dialog::backdrop { background: var(--backdrop); }
dialog form { display: flex; flex-direction: column; max-height: calc(100vh - 42px); }
dialog header { display: flex; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
dialog header h2 { margin: 0; font-size: 16px; }
dialog .x { margin-left: auto; width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 22px; cursor: pointer; }
dialog .x:hover { background: var(--panel-2); color: var(--text); }
dialog .body { padding: 16px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
dialog footer { display: flex; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); }
fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px 14px; margin: 0; display: flex; flex-direction: column; gap: 12px; }
legend { padding: 0 6px; color: var(--text); font-weight: 600; font-size: 13px; }
details summary { cursor: pointer; color: var(--muted); font-size: 13px; margin-bottom: 10px; }
details[open] { display: flex; flex-direction: column; gap: 10px; }
.input-btn { display: flex; gap: 8px; }
.input-btn input { flex: 1; }

.out { border-top: 1px dashed var(--line); padding-top: 10px; }
.out:first-of-type { border-top: 0; padding-top: 0; }
.out-body { margin: 10px 0 0 46px; display: flex; flex-direction: column; gap: 8px; }
.switch { flex-direction: row; align-items: center; gap: 10px; color: var(--text); font-size: 14px; font-weight: 500; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch span { position: relative; width: 36px; height: 20px; border-radius: 999px; background: var(--line-2); transition: .15s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: .15s; }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::after { left: 19px; }
.switch input:focus-visible + span { outline: 2px solid var(--blue); }

.probe { border: 1px solid var(--line-2); border-radius: 8px; background: var(--field-2); padding: 10px 12px; font-size: 12.5px; }
.probe table { width: 100%; border-collapse: collapse; }
.probe td, .probe th { padding: 4px 6px; text-align: left; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 12px; }
.probe th { color: var(--dim); font-family: inherit; font-weight: 600; }

.console { margin: 0; padding: 12px; background: #050a14; border: 1px solid var(--line); border-radius: 8px; font: 12px/1.5 var(--mono); color: #c9d4ea; max-height: 60vh; min-height: 200px; overflow: auto; white-space: pre; }
.console.wrap { white-space: pre-wrap; word-break: break-all; min-height: 0; }
#preview-video { width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 8px; }

#toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
#toasts[popover] { inset: auto 16px 16px auto; margin: 0; padding: 0; border: 0; background: transparent; overflow: visible; color: var(--text); }
#toasts[popover]:not(:popover-open) { display: none; }
.toast { animation: toastIn .2s ease-out; transition: opacity .25s, transform .25s; }
.toast.out { opacity: 0; transform: translateY(6px); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }
.btn.copied, .btn.copied:hover:not(:disabled) { background: var(--good); border-color: var(--good); color: #fff; }
.toast { min-width: 260px; max-width: 420px; padding: 10px 14px; border-radius: 9px; background: var(--panel-2); border: 1px solid var(--line-2); border-left: 4px solid var(--accent); box-shadow: 0 10px 30px var(--shadow); font-size: 13.5px; white-space: pre-line; }
.toast.err { border-left-color: var(--red); }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--line-2); border-top-color: var(--brand); border-radius: 50%; animation: rot .7s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }

/* ---------- peso de la señal ---------- */
.wtiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.wt { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.wt span { font-size: 12.5px; color: var(--muted); }
.wt b { display: block; font-size: 24px; font-weight: 650; margin: 2px 0; }
.wt b small { font-size: 15px; color: var(--muted); font-weight: 500; }
.wt > small { color: var(--muted); font-size: 12px; }
.wt.save b { color: var(--save); }
.pcell { min-width: 330px; }
.w { display: grid; grid-template-columns: 40px 104px 82px auto; align-items: center; gap: 8px; font-size: 12px; line-height: 1.9; }
.wl { font: 600 10.5px var(--mono); color: var(--dim); }
.wspan { grid-column: span 3; display: inline-flex; align-items: center; gap: 6px; }
.wb { height: 7px; border-radius: 4px; background: var(--panel-2); overflow: hidden; }
.wb i { display: block; height: 100%; border-radius: 4px; transition: width .6s ease; }
.wb i.in { background: var(--bar-in); } .wb i.out { background: var(--brand); }
.wv, .wm { font-family: var(--mono); color: var(--muted); white-space: nowrap; }
.wv { text-align: right; } .wv b { color: var(--text); }
.wfmt { font-size: 11.5px; color: var(--dim); margin-top: 2px; }
.red { font-weight: 650; color: var(--save); font-size: 15px; white-space: nowrap; }
.red.up { color: var(--warn); }
.ch-toggle { display: inline-flex; gap: 6px; align-items: baseline; padding: 0; border: 0; background: none; color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.ch-toggle:hover .ch-name { color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; }
.grid tr.sel td { background: color-mix(in srgb, var(--brand) 7%, transparent); }
.grid tr.detail td { background: var(--field-2); padding: 0; }
.det { display: grid; grid-template-columns: 1.2fr 1.2fr 1fr; gap: 18px; padding: 16px 18px 18px 46px; }
.det h5, .pv-side h5 { margin: 0 0 8px; font: 600 11px var(--mono); color: var(--brand-2); letter-spacing: .04em; }
.dt { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.dt th { text-align: left; color: var(--dim); font-weight: 600; font-size: 11px; padding: 4px 6px; border-bottom: 1px solid var(--line); }
.dt td { padding: 5px 6px; border-bottom: 1px solid var(--line); color: var(--muted); }
.dt td:first-child, .dt td:last-child { white-space: nowrap; }
.dt td b { color: var(--text); }
.dt tr.tot td { border-bottom: 0; padding-top: 7px; color: var(--text); font-weight: 600; }
.det .hint { margin: 10px 0; font-size: 11.5px; }
.btn.prev { border-color: color-mix(in srgb, var(--brand) 60%, transparent); color: var(--ink-soft); margin: 0 4px; }
.btn.prev svg { color: var(--brand); }
dialog.modal.xwide { width: min(1200px, calc(100vw - 32px)); }
dialog header .grow { flex: 1; }
.pv-body { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; padding: 18px; overflow-y: auto; }
.player { position: relative; border-radius: 10px; overflow: hidden; background: #000; aspect-ratio: 16 / 9; }
.player video { width: 100%; height: 100%; display: block; background: #000; }
.pl-live, .pl-res { position: absolute; top: 12px; background: rgb(0 0 0 / .65); color: #fff; font: 600 11.5px var(--mono); padding: 4px 9px; border-radius: 6px; pointer-events: none; }
.pl-live { left: 12px; display: flex; align-items: center; gap: 6px; }
.pl-live i { width: 8px; height: 8px; border-radius: 50%; background: #e5484d; animation: blink 1.6s infinite; }
.pl-res { right: 12px; } .pl-res:empty { display: none; }
.pl-msg { position: absolute; inset: auto 0 50% 0; text-align: center; color: #fff; font-size: 14px; text-shadow: 0 1px 3px #000; pointer-events: none; }
.pv-side h5:not(:first-child) { margin-top: 16px; }
.pv-side dl { display: grid; grid-template-columns: 72px 1fr; gap: 4px 10px; margin: 0; font-size: 12.5px; }
.pv-side dt { color: var(--dim); } .pv-side dd { margin: 0; color: var(--muted); } .pv-side dd b { color: var(--text); }
.cmp { display: flex; align-items: baseline; gap: 10px; font-family: var(--mono); font-size: 14px; color: var(--muted); flex-wrap: wrap; }
.cmp b { color: var(--text); font-size: 16px; } .cmp .red { font-size: 14px; }
.cmp2 { font-size: 12px; color: var(--dim); margin-top: 2px; }
.pvspark { width: 100%; height: 56px; background: var(--panel-2); border-radius: 6px; display: block; }
.spark-ax { display: flex; justify-content: space-between; font-size: 11px; color: var(--dim); margin-top: 4px; }
.pv-foot { align-items: center; flex-wrap: wrap; }
.pv-foot input { width: 440px; max-width: 100%; }
@media (max-width: 1000px) { .wtiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .det { grid-template-columns: minmax(0, 1fr); padding-left: 18px; } .pv-body { grid-template-columns: minmax(0, 1fr); } }

/* ---------- dashboard ---------- */
.dash-toolbar { margin-bottom: 16px; }
.seg { display: inline-flex; padding: 3px; border-radius: 9px; background: var(--panel); border: 1px solid var(--line); }
.seg button { height: 28px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.seg button.on { background: var(--panel-2); color: var(--text); }
.live { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 60%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.sec { font-size: 15px; font-weight: 600; margin: 26px 0 12px; display: flex; align-items: baseline; gap: 10px; }
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.kpi { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 14px 10px; display: flex; flex-direction: column; gap: 4px; min-height: 124px; overflow: hidden; }
.kpi-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.kpi-val { font-size: 30px; font-weight: 650; letter-spacing: -.02em; line-height: 1.1; }
.kpi-val small { font-size: 16px; color: var(--muted); font-weight: 500; }
.kpi-sub { font-size: 12px; color: var(--muted); }
.spark { width: 100%; height: 28px; margin-top: auto; }
.lvl { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 2px 8px 2px 6px; border-radius: 999px; background: var(--panel-2); color: var(--text); white-space: nowrap; }
.lvl svg { width: 13px; height: 13px; }
.lvl-good svg { color: var(--good); } .lvl-warning svg { color: var(--warn); } .lvl-critical svg { color: var(--crit); }
.lvl-critical { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--crit) 60%, transparent); }
.host-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.gpu-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gpu-grid.n1 { grid-template-columns: minmax(0, 1fr); }
.card h4 { margin: 6px 0 -2px; font-size: 12.5px; font-weight: 600; color: var(--muted); display: flex; gap: 8px; align-items: baseline; }
.hc-head, .gc-head { display: flex; align-items: flex-start; gap: 12px; }
.hc-head > div { flex: 1; min-width: 0; }
.hc-head h3 { margin: 0 0 2px; }
.hc-head small, .gc-title small { color: var(--muted); font-size: 12px; }
.gc-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.gc-title b { font-size: 15px; }
.gidx { flex: none; padding: 5px 9px; border-radius: 8px; background: color-mix(in srgb, var(--brand) 18%, var(--panel-2)); color: var(--ink-soft); font: 600 12px var(--mono); }
.minis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.mini { background: var(--panel-2); border-radius: 8px; padding: 9px 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mini span { font-size: 11.5px; color: var(--muted); }
.mini b { font-size: 19px; font-weight: 650; }
.mini small { font-size: 11.5px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.meters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; }
.dmeter { display: flex; flex-direction: column; gap: 5px; margin-bottom: 4px; }
.dmeter-head { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--muted); }
.dmeter-val b { color: var(--text); font-size: 13.5px; }
.dmeter-sub { font-size: 11.5px; color: var(--dim); }
.dbar { height: 8px; border-radius: 4px; background: var(--panel-2); overflow: hidden; }
.dbar i { display: block; height: 100%; border-radius: 4px; transition: width .6s ease; background: var(--s1); }
.dbar i.lv-good { background: var(--good); } .dbar i.lv-warning { background: var(--warn); } .dbar i.lv-critical { background: var(--crit); }
.temps, .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.chip b { color: var(--text); }
.cores { display: grid; grid-template-columns: repeat(auto-fill, minmax(14px, 1fr)); gap: 2px; }
.cores i { display: block; height: 14px; border-radius: 3px; transition: background .5s; }
.cores i:hover { outline: 2px solid var(--text); outline-offset: -1px; }
.gc-foot { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; }
.cap { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); }
.cap b { color: var(--text); }
.lchart { position: relative; }
.lchart svg { display: block; width: 100%; height: auto; outline: none; touch-action: none; }
.lchart svg:focus-visible { outline: 2px solid var(--blue); border-radius: 6px; }
.lc-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); margin: 4px 0 2px; }
.lc-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lc-legend i { width: 14px; height: 2px; border-radius: 2px; }
.lc-legend b { color: var(--text); font-weight: 600; }
.lchart .grid { stroke: var(--grid); stroke-width: 1; }
.lchart .ax { fill: var(--dim); font: 10.5px system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.lchart .cross { stroke: var(--muted); stroke-width: 1; }
.lchart .refline { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 4; }
.viz-tip { position: fixed; z-index: 200; pointer-events: none; min-width: 120px; padding: 8px 10px; border-radius: 8px; background: var(--tip-bg); border: 1px solid var(--line-2); box-shadow: 0 8px 24px var(--shadow); font-size: 12px; color: var(--muted); }
.tt-time { margin-bottom: 4px; font-size: 11px; color: var(--dim); }
.tt-row { display: flex; align-items: center; gap: 7px; line-height: 1.6; }
.tt-row i { width: 12px; height: 2px; border-radius: 2px; }
.tt-row b, .viz-tip > b { color: var(--text); font-size: 13px; font-variant-numeric: tabular-nums; min-width: 38px; }
.ubar { display: inline-block; width: 80px; height: 6px; border-radius: 3px; background: var(--panel-2); overflow: hidden; vertical-align: middle; margin-right: 8px; }
.ubar i { display: block; height: 100%; background: var(--s1); border-radius: 3px; }
@media (max-width: 1280px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .host-grid, .gpu-grid { grid-template-columns: minmax(0, 1fr); } }

@media (max-width: 760px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .minis, .meters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-val { font-size: 24px; }
  .topbar { flex-wrap: wrap; gap: 10px; padding: 10px 16px; }
  .top-right { width: 100%; justify-content: space-between; }
  .brand-sep, .brand small { display: none; }
  .brand-logo { height: 28px; }
  main { padding: 14px 16px 32px; }
  .search { width: 100%; }
  .out-body { margin-left: 0; }
  .grid th:nth-child(4), .grid td:nth-child(4), .grid th:nth-child(5), .grid td:nth-child(5) { display: none; }
}
#image-name { color: var(--brand-2); font-weight: 600; letter-spacing: .02em; }
.app-version { position: fixed; left: 8px; bottom: 6px; z-index: 300; padding: 2px 7px; border-radius: 5px; background: rgb(0 0 0 / .55); font: 11px var(--mono); color: #fff; opacity: .85; pointer-events: none; }

/* salidas: URL de conexión */
button.tag.tag-btn { cursor: pointer; white-space: nowrap; background: transparent; transition: background .15s, transform .1s; }
button.tag.tag-btn:hover { background: color-mix(in srgb, currentColor 14%, transparent); }
button.tag.tag-btn:active { transform: scale(.95); }
button.tag.tag-btn.on { background: color-mix(in srgb, currentColor 22%, transparent); }
.w-num { width: 130px; }
.srt-caller.hidden { display: none; }
#srt-port-hint .warn { color: var(--amber); }
#srt-port-hint a { color: var(--accent); }
.conn-row { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 6px 6px 6px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--field-2); }
.conn-row code { flex: 1; min-width: 0; font: 12.5px var(--mono); color: var(--text); overflow-wrap: anywhere; user-select: all; }
.conn-row .btn { flex: none; }
.conn-row.copied { border-color: var(--accent); }
.conn-lbl { flex: none; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.conn-pop { position: fixed; z-index: 400; width: min(480px, calc(100vw - 24px)); padding: 12px 14px 14px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line-2); box-shadow: 0 18px 50px var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.conn-pop.hidden { display: none; }
.conn-pop header { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; }
.conn-pop header .x { margin-left: auto; background: none; border: 0; color: var(--muted); font-size: 18px; cursor: pointer; line-height: 1; }
.conn-item { display: flex; flex-direction: column; gap: 5px; }
.conn-item .conn-lbl { display: flex; justify-content: space-between; }
.conn-item .ok { color: var(--accent); text-transform: none; letter-spacing: 0; }
.conn-pop .hint { font-size: 12px; }

/* configuración */
.settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; max-width: 1640px; align-items: start; }
.theme-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.theme-opt { position: relative; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid var(--line-2); border-radius: 10px; cursor: pointer; color: var(--text); font-size: 13px; transition: border-color .15s, background .15s; }
.theme-opt:hover { border-color: var(--muted); }
.theme-opt input { position: absolute; opacity: 0; pointer-events: none; }
.theme-opt:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, transparent); box-shadow: 0 0 0 1px var(--brand); }
.theme-opt:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }
.theme-opt b { font-weight: 600; } .theme-opt small { color: var(--muted); font-size: 11.5px; margin-top: -6px; }
.th-prev { display: grid; grid-template-columns: 26% 1fr; grid-template-rows: 9px 1fr; gap: 4px; height: 64px; padding: 5px; border-radius: 7px; border: 1px solid rgb(127 140 160 / .35); }
.th-prev i { border-radius: 3px; } .th-prev i:first-child { grid-column: 1 / 3; }
.th-prev.dark { background: #0b1220; } .th-prev.dark i { background: #1c2a45; } .th-prev.dark i:last-child { background: #16223a; box-shadow: inset 0 -10px 0 -6px #0a7cff; }
.th-prev.light { background: #eef2f8; } .th-prev.light i { background: #d5dcea; } .th-prev.light i:last-child { background: #ffffff; box-shadow: inset 0 -10px 0 -6px #0a6fe6; }
.th-prev.system { background: linear-gradient(135deg, #0b1220 50%, #eef2f8 50%); } .th-prev.system i { background: rgb(127 140 160 / .45); }
.pw-form { display: flex; flex-direction: column; gap: 10px; }
.pw-meter { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); min-height: 16px; }
.pw-meter span { display: flex; gap: 3px; } .pw-meter i { width: 34px; height: 5px; border-radius: 3px; background: var(--line-2); }
.pw-meter[data-l="1"] i:nth-child(-n+1) { background: var(--red); }
.pw-meter[data-l="2"] i:nth-child(-n+2) { background: var(--amber); }
.pw-meter[data-l="3"] i:nth-child(-n+3) { background: var(--accent); }
.pw-meter[data-l="4"] i { background: var(--accent); }
.pw-form .foot { display: flex; align-items: center; gap: 10px; }
.pw-meter em { font-style: normal; }
.banner a { color: inherit; font-weight: 600; }

/* consola de monitoreo */
.mon-head { margin: 2px 0 14px; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--brand-2); }
.mon-head h1 { margin: 2px 0 2px; font-size: 26px; font-weight: 650; letter-spacing: -.01em; }
.wall { --tile: 220px; display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--tile), 1fr)); gap: 8px; }
.wall.s { --tile: 160px; } .wall.l { --tile: 330px; }
.mon { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; cursor: pointer; transition: border-color .15s; }
.mon:hover { border-color: var(--muted); }
.mon.s-bad { border-color: color-mix(in srgb, var(--red) 70%, transparent); }
.mon.s-warn { border-color: color-mix(in srgb, var(--amber) 70%, transparent); }
.mon-pic { position: relative; aspect-ratio: 16 / 9; background: #05080f; }
.mon-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mon-pic img:not([src]) { visibility: hidden; }
.mon.s-off .mon-pic img, .mon.s-bad .mon-pic img { filter: grayscale(1) brightness(.45); }
.mon-n { position: absolute; top: 5px; left: 5px; min-width: 20px; padding: 1px 5px; border-radius: 4px; background: rgb(0 0 0 / .7); color: #fff; font: 600 10.5px var(--mono); text-align: center; }
.mon-dot { position: absolute; top: 7px; right: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--dim); box-shadow: 0 0 0 2px rgb(0 0 0 / .45); }
.mon.s-ok .mon-dot { background: #22c55e; } .mon.s-warn .mon-dot { background: #f59e0b; } .mon.s-bad .mon-dot { background: #ef4444; animation: blink 1.2s infinite; }
.mon-msg { position: absolute; inset: auto 6px 6px 6px; padding: 3px 7px; border-radius: 5px; background: rgb(0 0 0 / .72); color: #fff; font-size: 11.5px; font-weight: 600; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mon.s-ok .mon-msg { display: none; }
.mon.s-bad .mon-msg { background: rgb(185 28 28 / .9); } .mon.s-warn .mon-msg { background: rgb(180 83 9 / .92); }
.mon-foot { display: flex; align-items: center; gap: 6px; padding: 4px 4px 4px 8px; min-width: 0; }
.mon-name { flex: 1; min-width: 0; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: uppercase; }
.mon-age { flex: none; font: 10.5px var(--mono); color: var(--muted); }
.mon-foot .icon-btn { width: 24px; height: 24px; flex: none; }
.wall.s .mon-age { display: none; }
#tab-monitor:fullscreen { background: var(--bg); padding: 16px 20px; overflow: auto; }
#tab-monitor:fullscreen .mon-head { display: none; }

/* estado de la conexión SRT */
.tag .lk, .conn-st .lk { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; background: var(--dim); }
.lk-ok .lk { background: #22c55e; } .lk-wait .lk { background: var(--amber); animation: blink 1.6s infinite; } .lk-bad .lk { background: var(--red); }
.conn-st { font-size: 12.5px; color: var(--muted); padding: 6px 10px; border-radius: 7px; background: var(--field-2); border: 1px solid var(--line); }
.conn-st.lk-ok { color: var(--text); }

/* formato de entrada y salida en la tabla de canales */
.fmt { display: grid; grid-template-columns: auto 1fr; gap: 3px 8px; align-items: baseline; min-width: 190px; }
.fmt .fv { font-size: 13px; white-space: nowrap; }
.fmt .fa { color: var(--muted); }

/* pista elegida en el análisis del origen: video azul, audio naranja */
.probe button[data-map].use-on { font-weight: 700; }
.probe button[data-map].use-v { background: var(--brand); border-color: var(--brand); color: #fff; }
.probe button[data-map].use-a { background: var(--brand-2); border-color: var(--brand-2); color: #1d1300; }
.probe tr.use-v td { background: color-mix(in srgb, var(--brand) 14%, transparent); }
.probe tr.use-a td { background: color-mix(in srgb, var(--brand-2) 14%, transparent); }
.probe tr.use-v td:first-child { box-shadow: inset 3px 0 0 var(--brand); }
.probe tr.use-a td:first-child { box-shadow: inset 3px 0 0 var(--brand-2); }
.use-sum { margin-top: 8px; }
.use-sum .sum-v { color: var(--brand); } .use-sum .sum-a { color: var(--brand-2); }

#udp-dup .warn { color: var(--amber); }
#srt-port-hint .okp { color: var(--accent); }

/* núcleos de CPU: libres en azul, en uso en naranja */
.core-busy { color: var(--brand-2); font-weight: 600; margin-right: 6px; }
.core-lg { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin: 0 3px -1px 4px; }
.core-lg + .core-lg { margin-left: 0; }

/* medidor de temperatura por GPU */
.g-top { display: grid; grid-template-columns: 190px 1fr; gap: 10px; align-items: stretch; }
.g-top .minis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-gauge { background: var(--panel-2); border-radius: 8px; padding: 8px 8px 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.g-gauge > div:first-child { width: 100%; }
.gauge { width: 100%; height: auto; display: block; overflow: visible; }
.gauge path { fill: none; stroke-linecap: round; }
.gauge .gt { stroke: color-mix(in srgb, var(--text) 10%, transparent); stroke-width: 13; }
.gauge .gz { stroke-width: 4; stroke-linecap: butt; opacity: .85; }
.gauge .z-ok { stroke: var(--good); } .gauge .z-warn { stroke: var(--warn); } .gauge .z-crit { stroke: var(--crit); }
.gauge .gv { stroke-width: 13; transition: d .6s ease; }
.gauge .gv.lv-good, .gauge .gv.lv-none { stroke: var(--good); } .gauge .gv.lv-warning { stroke: var(--warn); } .gauge .gv.lv-critical { stroke: var(--crit); }
.gauge .glim { stroke: var(--crit); stroke-width: 2.5; stroke-linecap: round; }
.gauge .glim-t { fill: var(--crit); font: 700 11px var(--mono); }
.gauge .gpk { fill: var(--text); stroke: var(--panel-2); stroke-width: 1.5; }
.gauge .gax { fill: var(--dim); font: 10px var(--mono); }
.gauge .gnum { fill: var(--text); font: 700 26px system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.gauge .gsub { fill: var(--muted); font: 11px system-ui, sans-serif; }
.g-lv { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11.5px; color: var(--muted); text-align: center; }
.g-margin { font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .g-top { grid-template-columns: 1fr; } }

/* barra de potencia de la GPU: degradado azul → naranja revelado hasta los watts usados */
.pbar { position: relative; height: 7px; margin: 3px 0 1px; border-radius: 4px; overflow: hidden; background: linear-gradient(90deg, #0a7cff 0%, #5b6cf5 35%, #c05fa8 65%, #ff8a00 100%); }
.pbar i { position: absolute; top: 0; right: 0; bottom: 0; background: color-mix(in srgb, var(--text) 12%, var(--panel)); transition: left .6s ease; }

/* alarma de temperatura */
.sec-row { display: flex; align-items: center; gap: 16px; margin: 26px 0 12px; min-height: 34px; }
.sec-row .sec { margin: 0; flex: none; }
.t-alarm { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; padding: 9px 16px; border-radius: 9px; background: #d11a1a; color: #fff; box-shadow: 0 0 0 2px rgb(255 255 255 / .15), 0 8px 24px rgb(209 26 26 / .45); animation: tAlarm 1.2s ease-in-out infinite; }
.t-alarm.hidden { display: none; }
.t-alarm-ico { font-size: 26px; line-height: 1; }
.t-alarm-txt { flex: 1; min-width: 0; font-size: 20px; font-weight: 600; line-height: 1.25; }
.t-alarm-txt b { font-weight: 800; letter-spacing: .04em; }
.t-alarm-txt small { font-size: 14px; font-weight: 500; opacity: .9; }
.t-alarm-note { font-size: 13px; font-weight: 600; white-space: nowrap; }
.t-alarm-btn { flex: none; height: 32px; padding: 0 12px; border-radius: 7px; border: 1px solid rgb(255 255 255 / .6); background: rgb(255 255 255 / .12); color: #fff; font: 600 13px system-ui, sans-serif; cursor: pointer; }
.t-alarm-btn:hover { background: rgb(255 255 255 / .25); }
@keyframes tAlarm { 50% { background: #a90f0f; } }
.pill.pill-hot { background: #d11a1a; border-color: #d11a1a; color: #fff; animation: tAlarm 1.2s ease-in-out infinite; }
@media (max-width: 760px) { .sec-row { flex-direction: column; align-items: stretch; } .t-alarm-txt { font-size: 16px; } }

/* ventiladores del servidor (BMC) */
.fans-card { margin-top: 14px; }
.fans { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.fan { background: var(--panel-2); border-radius: 8px; padding: 8px 10px 6px; display: flex; flex-direction: column; gap: 2px; border: 1px solid transparent; min-width: 0; }
.fan.lv-warning { border-color: color-mix(in srgb, var(--warn) 60%, transparent); }
.fan.lv-critical { border-color: var(--crit); background: color-mix(in srgb, var(--crit) 14%, var(--panel-2)); }
.fan-top { display: flex; align-items: center; gap: 6px; font-size: 12.5px; }
.fan-top b { flex: 1; font-family: var(--mono); }
.fan-top .lvl { font-size: 10.5px; padding: 1px 7px; }
.fan-spin { display: inline-flex; color: var(--s1); animation: fanSpin 1s linear infinite; }
.fan-spin.stop { animation: none; color: var(--crit); }
.fan-ico { width: 18px; height: 18px; }
.lv-warning .fan-spin { color: var(--warn); }
@keyframes fanSpin { to { transform: rotate(360deg); } }
.fan-rpm { font-size: 19px; font-weight: 650; font-variant-numeric: tabular-nums; }
.fan-rpm small { font-size: 11.5px; font-weight: 500; color: var(--muted); }
.lv-critical .fan-rpm { color: var(--crit); }
.fan-spark { width: 100%; height: 22px; display: block; }
.fan-spark polyline { fill: none; stroke: var(--s1); stroke-width: 1.6; stroke-linejoin: round; }
.lv-critical .fan-spark polyline { stroke: var(--crit); }
.fans-absent { margin-top: 8px; }
@media (prefers-reduced-motion: reduce) { .fan-spin { animation: none; } }

/* usuario de solo lectura */
.user-pill { font-family: system-ui, sans-serif; }
.user-pill.pill-ro { border-color: color-mix(in srgb, var(--brand-2) 60%, transparent); }
.user-pill.pill-ro b { color: var(--brand-2); }
.ro-note { margin: 0 18px; padding: 8px 12px; border-radius: 8px; background: color-mix(in srgb, var(--brand-2) 14%, var(--panel-2)); border: 1px solid color-mix(in srgb, var(--brand-2) 45%, transparent); font-size: 13px; }
body.ro .btn:disabled, body.ro .icon-btn:disabled { cursor: not-allowed; }
dialog input:disabled, dialog select:disabled, dialog textarea:disabled { opacity: .75; cursor: default; }

/* canales agrupados por GPU */
.grid tr.grp td { padding: 0; background: color-mix(in srgb, var(--brand) 9%, var(--panel)); border-top: 1px solid var(--line-2); }
.grid tr.grp.off td { background: var(--panel-2); }
.grid tr.grp.hot td { background: color-mix(in srgb, var(--crit) 22%, var(--panel)); box-shadow: inset 4px 0 0 var(--crit); }
.grp-h { display: flex; align-items: center; gap: 12px; padding: 8px 14px; flex-wrap: wrap; }
.grp-h > b { font-size: 14px; }
.grp-name, .grp-count, .grp-meta { font-size: 12.5px; color: var(--muted); }
.grp-temp { font: 700 15px var(--mono); color: var(--good); }
.grp-temp.warm { color: var(--warn); } .grp-temp.hot { color: var(--crit); }
.grp-flag { font-size: 11px; font-weight: 800; letter-spacing: .06em; color: #fff; background: #d11a1a; padding: 2px 8px; border-radius: 5px; animation: tAlarm 1.2s ease-in-out infinite; }
.t-alarm-link { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.t-alarm-link:hover { text-decoration-thickness: 2px; }
#confirm-msg { white-space: pre-line; }

/* ventana de confirmación de cambios guardados */
dialog.modal.notice { width: min(420px, calc(100vw - 32px)); }
.notice-body { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 28px 26px 22px; }
.notice-body h2 { margin: 4px 0 0; font-size: 19px; }
.notice-body p { margin: 0 0 8px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.notice-body .btn { min-width: 140px; justify-content: center; }
.notice-ico svg { width: 64px; height: 64px; display: block; }
.notice-ico circle { fill: color-mix(in srgb, var(--good) 16%, transparent); stroke: var(--good); stroke-width: 2.5; }
.notice-ico path { fill: none; stroke: var(--good); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 36; stroke-dashoffset: 36; }
dialog.notice[open] .notice-ico path { animation: noticeCheck .45s .12s ease-out forwards; }
dialog.notice[open] .notice-ico svg { animation: noticePop .3s ease-out; }
@keyframes noticeCheck { to { stroke-dashoffset: 0; } }
@keyframes noticePop { from { transform: scale(.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { dialog.notice[open] .notice-ico path { animation: none; stroke-dashoffset: 0; } dialog.notice[open] .notice-ico svg { animation: none; } }
.btn.primary .spin { border-color: rgb(255 255 255 / .35); border-top-color: #fff; }

/* Sin conexión con el servidor: aviso arriba en todas las pestañas y datos en gris (no son actuales) */
.link-wrap { padding: 0 20px; }
.link-wrap:has(#link-alarm:not(.hidden)) { padding: 12px 20px 0; position: sticky; top: 0; z-index: 30; }
#link-alarm .t-alarm-txt { font-size: 19px; }
#link-alarm .t-alarm-txt small { display: inline-block; margin-top: 2px; }
body.offline main { filter: grayscale(1); opacity: .55; transition: filter .3s, opacity .3s; }
.live-off { display: none; } body.offline .live-on { display: none; } body.offline .live-off { display: inline; } body.offline .live-dot { background: var(--red); animation: none; }

/* Nombre del servidor: arriba en todas las pestañas (varios servidores de transcodificación) */
.server-pill { display: inline-flex; align-items: center; gap: 8px; flex: none; max-width: 340px; padding: 5px 14px 5px 10px; border-radius: 9px; background: color-mix(in srgb, var(--brand) 14%, var(--panel-2)); border: 1px solid color-mix(in srgb, var(--brand) 45%, transparent); color: var(--text); font-size: 15px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.server-pill svg { width: 18px; height: 18px; flex: none; color: var(--brand); }
.server-pill span { overflow: hidden; text-overflow: ellipsis; }
.server-pill.hidden, .login-server.hidden { display: none; }
.login-server { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0; padding: 8px 10px; border-radius: 8px; background: color-mix(in srgb, var(--brand) 12%, var(--panel-2)); font-weight: 700; font-size: 15px; }
.login-server svg { width: 18px; height: 18px; color: var(--brand); }
@media (max-width: 900px) { .server-pill { max-width: 40vw; font-size: 13px; } }
.top-right { min-width: 0; }
#gpu-pill { min-width: 0; flex-shrink: 1; overflow: hidden; text-overflow: ellipsis; }
.server-pill span, .login-server span { color: var(--brand-2); }
.udp-mc.hidden { display: none; }

/* Procesando información (sobre una ventana) */
.proc { position: absolute; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--bg) 62%, transparent); backdrop-filter: blur(2px); border-radius: inherit; }
.proc-box { display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 320px; max-width: 420px; padding: 26px 32px; text-align: center; background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 12px 34px var(--shadow); }
.proc-box b { font-size: 18px; }
.proc-step { color: var(--muted); font-size: 13.5px; line-height: 1.4; }
.proc-time { font-family: var(--mono); color: var(--dim); }
.spin.big { width: 36px; height: 36px; border-width: 3px; }

/* Medidor de audio L/R en la vista previa */
.pv-side { display: flex; flex-direction: column; }
.vu { margin-top: auto; padding-top: 14px; }
.vu h5 { margin: 0 0 6px !important; }
.vu canvas { display: block; width: 100%; height: 62px; }
.vu-msg { font-size: 12px; margin-top: 2px; min-height: 0; }
.vu-msg:empty { display: none; }
