/* Ajustes propios del Cache IPTV sobre la hoja del transcodificador */
.kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpi { min-height: 104px; }
.dash-cols { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(280px, 1fr); gap: 18px; align-items: start; }
.dash-cols .card { gap: 8px; }
.load { height: 8px; border-radius: 99px; background: var(--panel-2); overflow: hidden; }
.load i { display: block; height: 100%; background: var(--brand); border-radius: 99px; transition: width .4s; }
.acc-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.acc-row b { flex: 1; font-family: var(--mono); font-weight: 500; }
.den-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); }
.den-row b { color: var(--text); font-variant-numeric: tabular-nums; }
.ch-logo { width: 42px; height: 28px; object-fit: contain; border-radius: 5px; background: var(--panel-2); border: 1px solid var(--line); flex: none; }
.ch-logo.none { display: inline-grid; place-items: center; font-size: 11px; color: var(--dim); font-weight: 700; }
.ch-line { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ch-line .ch-name { font-weight: 600; }
.src { font-family: var(--mono); font-size: 11.5px; color: var(--dim); max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sel { width: auto; min-width: 150px; }
.icon-btn { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--muted); cursor: pointer; }
.icon-btn:hover { color: var(--text); border-color: var(--muted); }
.icon-btn.del:hover { color: var(--red); border-color: var(--red); }
.actions { display: inline-flex; gap: 6px; justify-content: flex-end; }
.grid tr.off td { opacity: .55; }
.file-btn { cursor: pointer; }
.logo-prev img { max-height: 60px; max-width: 160px; border-radius: 6px; background: var(--panel-2); padding: 4px; }
.mw-kv dd { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.mw-kv dd .btn { height: 26px; padding: 0 8px; font-size: 12px; }
.cat-new { align-items: flex-end; }
.origin-form { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.import-result { padding: 10px 12px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line); font-size: 13px; white-space: pre-line; }
.net-list { font-family: var(--mono); font-size: 12px; color: var(--muted); }
textarea { font-family: var(--mono); font-size: 12.5px; }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dash-cols { grid-template-columns: 1fr; } }
textarea { width: 100%; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--field); color: var(--text); resize: vertical; }
textarea:focus { outline: 2px solid color-mix(in srgb, var(--blue) 50%, transparent); border-color: var(--blue); }
.mw-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.btn.file-btn { flex-direction: row; font-size: 14px; color: var(--text); } .btn.sm.file-btn { font-size: 13px; }

/* usuarios y permisos */
body.ro [data-rw], body.ro .rw-only { display: none !important; }
.ro-only { display: none; }
body.ro .ro-only { display: block; }
button.user-pill { cursor: pointer; }
button.user-pill:hover { border-color: var(--brand); }
.user-pill .role { color: var(--muted); font-size: 11px; }
.role-tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; border: 1px solid var(--line-2); }
.role-tag.r-admin { color: var(--brand-2); border-color: color-mix(in srgb, var(--brand-2) 55%, transparent); }
.role-tag.r-operator { color: var(--blue); border-color: color-mix(in srgb, var(--blue) 55%, transparent); }
.role-tag.r-viewer { color: var(--muted); }
fieldset.roles { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px 10px; margin: 0; display: flex; flex-direction: column; gap: 6px; }
fieldset.roles legend { font-size: 12.5px; color: var(--muted); padding: 0 4px; }
.role-opt { flex-direction: row; align-items: flex-start; gap: 10px; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.role-opt:has(input:checked) { background: color-mix(in srgb, var(--brand) 12%, transparent); }
.role-opt input { width: 16px; height: 16px; min-height: 0; flex: none; margin: 3px 0 0; padding: 0; accent-color: var(--brand); }
.role-opt span { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.role-opt b { color: var(--text); font-size: 13.5px; }
.role-opt small { font-size: 12px; color: var(--muted); line-height: 1.35; }
.me-h { margin: 8px 0 0; font-size: 14px; }
tr.me td:first-child { box-shadow: inset 3px 0 0 var(--brand); }

/* rendimiento */
.perf-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.perf-kpis .kpi { min-height: 108px; }
.perf-charts { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; margin-top: 14px; }
.chart-card { gap: 6px; }
.chart-h { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; font-size: 13.5px; }
.chart-h .hint { font-size: 12px; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.chart { position: relative; min-height: 170px; }
.chart svg { display: block; width: 100%; height: 170px; overflow: visible; }
.chart.sm svg { height: 120px; }
.chart.sm { min-height: 120px; }
.chart svg .g { stroke: var(--grid); }
.chart svg .ax { font: 10.5px var(--mono); fill: var(--muted); }
.chart svg .xh { stroke: var(--line-2); stroke-dasharray: 3 3; }
.chart .tip { position: absolute; top: 6px; pointer-events: none; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 9px; font-size: 12px; box-shadow: 0 6px 18px var(--shadow, rgba(0,0,0,.3)); white-space: nowrap; z-index: 2; }
.chart .tip div { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.chart .tip b { color: var(--text); }
.chart .tip i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.chart-empty { margin: 50px 0; text-align: center; }
.host-grid2 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.host-grid2 h3 { justify-content: space-between; }
.host-grid2 .big { font: 650 22px var(--mono); }
.kv.spec dd { text-align: right; }
.membar { display: flex; height: 14px; border-radius: 5px; overflow: hidden; background: var(--panel-2); gap: 2px; }
.membar i { display: block; height: 100%; }
.m-app { background: var(--s1); } .m-shm { background: var(--s2); } .m-cache { background: color-mix(in srgb, var(--s1) 35%, var(--panel-2)); }
.net-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin-top: 14px; }
.net-card .meter { grid-template-columns: 60px 1fr 150px; }
.net-card .bar { height: 8px; border-radius: 99px; background: var(--panel-2); overflow: hidden; }
.net-card .bar i { display: block; height: 100%; background: var(--s1); border-radius: 99px; }
@media (max-width: 1280px) { .perf-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .host-grid2 { grid-template-columns: 1fr; } .perf-charts { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .perf-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bad-ink { color: var(--red); }
