/* ficha-mapa.css — 4 nov 2026 (entrega ficha-mapa-20261104, aprobada por Lucas en la vista previa del navegador).
   Ficha de cámara y ficha del equipo de fibra (ONU), líneas «Caídas en grupo → equipo de fibra», leyenda «?», foto de la
   última ronda en el panel de detalle (PC) y botón ‹ / › Opciones para ocultar la barra del mapa (tecla M).
   Todo va con prefijo hx- y sus colores viven en .hx: no cambia el aspecto del resto de la app.
   Tema claro por defecto; oscuro con <html data-theme="dark">. Sin formas de píldora.
   Rollback: quitar la línea de este archivo y la de js/ficha-mapa.js de map.html. */

.hx {
  --x-s1:#FFFFFF; --x-s2:#F4F6F9; --x-s3:#E9EDF2; --x-line:#E3E8EE; --x-line2:#D2D9E2;
  --x-tx:#0F1720; --x-tx2:#4A5868; --x-mut:#6F7D8D; --x-acc:#0B8AA0; --x-acc-bg:rgba(11,138,160,.10); --x-acc-tx:#ffffff;
  --x-ok:#1E9A5F; --x-warn:#B9770C; --x-crit:#D23A41;
  --x-ok-bg:rgba(30,154,95,.10); --x-warn-bg:rgba(201,130,14,.12); --x-crit-bg:rgba(210,58,65,.09);
  --x-shadow:0 18px 50px rgba(15,23,32,.16); --x-ov:rgba(15,23,32,.35);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
html[data-theme="dark"] .hx {
  --x-s1:#10161D; --x-s2:#151C25; --x-s3:#1B2430; --x-line:#1F2833; --x-line2:#2C3846;
  --x-tx:#E7ECF2; --x-tx2:#A9B4C2; --x-mut:#8592A0; --x-acc:#4CC2D6; --x-acc-bg:rgba(76,194,214,.12); --x-acc-tx:#04222a;
  --x-ok:#3DB37A; --x-warn:#E0A43A; --x-crit:#EF5D63;
  --x-ok-bg:rgba(61,179,122,.12); --x-warn-bg:rgba(224,164,58,.12); --x-crit-bg:rgba(239,93,99,.12);
  --x-shadow:0 20px 50px rgba(0,0,0,.5); --x-ov:rgba(3,6,9,.55);
}
.hx, .hx * { box-sizing: border-box; }
.hx button { font: inherit; }
.hx .bxn { font-family: "JetBrains Mono", "Cascadia Mono", Consolas, ui-monospace, monospace; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.hx svg.bi { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.hx svg.bi.s { width: 15px; height: 15px; }
.hx .t-ok { color: var(--x-ok); } .hx .t-warn { color: var(--x-warn); } .hx .t-crit { color: var(--x-crit); }
.hx .t-mut { color: var(--x-mut); } .hx .t-acc { color: var(--x-acc); }
.hx-dot { width: 8px; height: 8px; border-radius: 2px; display: inline-block; flex: none; background: var(--x-mut); }
.hx-dot.ok { background: var(--x-ok); } .hx-dot.warn { background: var(--x-warn); } .hx-dot.crit { background: var(--x-crit); }
.hx-lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--x-mut); font-weight: 600; }
.hx-btn { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border: 1px solid var(--x-line2); border-radius: 7px; background: var(--x-s1);
  font-size: 12.5px; font-weight: 500; color: var(--x-tx); cursor: pointer; white-space: nowrap; line-height: 1.2; }
.hx-btn:hover { border-color: var(--x-acc); color: var(--x-acc); }
.hx-btn:disabled { opacity: .45; cursor: not-allowed; }
.hx-btn.gh { background: none; border-color: transparent; color: var(--x-tx2); }
.hx-btn.pri { background: var(--x-acc); border-color: var(--x-acc); color: var(--x-acc-tx); font-weight: 600; }
.hx-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; padding: 2px 7px; border-radius: 5px; white-space: nowrap; }
.hx-tag.ok { background: var(--x-ok-bg); color: var(--x-ok); } .hx-tag.warn { background: var(--x-warn-bg); color: var(--x-warn); }
.hx-tag.crit { background: var(--x-crit-bg); color: var(--x-crit); } .hx-tag.mut { background: var(--x-s3); color: var(--x-tx2); }
.hx-tag.acc { background: var(--x-acc-bg); color: var(--x-acc); }

/* ===== Ficha (panel lateral en PC, hoja inferior en celular) ===== */
#hx-ov { position: fixed; inset: 0; z-index: 1050; background: var(--x-ov); display: flex; justify-content: flex-end; opacity: 0; pointer-events: none; transition: opacity .18s; }
#hx-ov.on { opacity: 1; pointer-events: auto; }
/* la ficha queda por encima de los controles del mapa; el visor de video en vivo (z 1000) se abre por encima de la ficha */
html:has(#video-modal.flex) #hx-ov { z-index: 990; }
html.hx-ov-on #hx-mmx, html.hx-ov-on #hx-ley { display: none !important; }
#hx-ov .dr { width: 430px; max-width: 100%; height: 100%; background: var(--x-s1); border-left: 1px solid var(--x-line2); overflow: auto; overscroll-behavior: contain;
  transform: translateX(30px); transition: transform .2s; color: var(--x-tx); box-shadow: var(--x-shadow); font-size: 13px; line-height: 1.4; }
#hx-ov.on .dr { transform: none; }
#hx-ov .grab { display: none; width: 38px; height: 4px; border-radius: 2px; background: var(--x-line2); margin: 8px auto 0; border: 0; padding: 0; cursor: pointer; }
.hx-fh { padding: 16px 18px 14px; border-bottom: 1px solid var(--x-line); }
.hx-fh .hd { display: flex; align-items: center; gap: 8px; }
.hx-fh .st { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; min-width: 0; }
.hx-fh .x { margin-left: auto; padding: 6px; }
.hx-fh h4 { font-size: 17px; font-weight: 600; margin: 6px 0 2px; letter-spacing: -.01em; color: var(--x-tx); overflow-wrap: anywhere; }
.hx-fh .sub { font-size: 12.5px; color: var(--x-mut); }
.hx-fs { padding: 14px 18px; border-bottom: 1px solid var(--x-line); }
.hx-fs.fin { border-bottom: 0; }
.hx-fs > .hx-lbl { display: block; margin-bottom: 10px; }
.hx-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.hx-kv > div { min-width: 0; }
.hx-kv span.k { display: block; font-size: 11px; color: var(--x-mut); margin-bottom: 2px; }
.hx-kv b { font-weight: 500; font-size: 13.5px; color: var(--x-tx); overflow-wrap: anywhere; }
.hx-kv .ancho { grid-column: 1 / -1; }
.hx-acts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.hx-acts.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hx-act { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 11px 4px; border: 1px solid var(--x-line2); border-radius: 9px; background: var(--x-s2);
  font-size: 12px; color: var(--x-tx2); cursor: pointer; text-align: center; line-height: 1.2; min-height: 64px; justify-content: center; }
.hx-act:hover:not([disabled]) { border-color: var(--x-acc); color: var(--x-acc); }
.hx-act[disabled] { opacity: .4; cursor: not-allowed; }
.hx-act.run { color: var(--x-acc); border-color: var(--x-acc); cursor: progress; }
.hx-res { margin-top: 10px; font-size: 12.5px; color: var(--x-tx2); }
.hx-res:empty { display: none; }
.hx-res .fila { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hx-onu { border: 1px solid var(--x-line2); border-radius: 9px; background: var(--x-s2); padding: 12px; display: flex; gap: 10px; align-items: center; color: var(--x-tx);
  width: 100%; text-align: left; cursor: pointer; }
.hx-onu:hover { border-color: var(--x-acc); }
.hx-onu .q { flex: 1; min-width: 0; }
.hx-onu .q b { font-weight: 600; }
.hx-onu .q small { display: block; font-size: 12px; color: var(--x-mut); }
.hx-diag { margin-top: 10px; border-radius: 8px; padding: 11px 12px; font-size: 13px; color: var(--x-tx); }
.hx-diag.warn { background: var(--x-warn-bg); } .hx-diag.crit { background: var(--x-crit-bg); } .hx-diag.ok { background: var(--x-ok-bg); } .hx-diag.mut { background: var(--x-s2); }
.hx-nota { font-size: 11.5px; color: var(--x-mut); margin-top: 8px; }
.hx-row { display: flex; align-items: center; gap: 12px; padding: 11px 2px; border-top: 1px solid var(--x-line); cursor: pointer; color: var(--x-mut); width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; text-align: left; }
.hx-row:first-of-type { border-top: 0; }
.hx-row .q { flex: 1; min-width: 0; }
.hx-row .nm, .hx-row .meta { display: block; }
.hx-row .nm { font-size: 13.5px; color: var(--x-tx); font-weight: 500; overflow-wrap: anywhere; }
.hx-row .meta { font-size: 12px; color: var(--x-mut); }
/* foto de la última ronda */
.hx-foto { position: relative; background: #0b0f14; border-bottom: 1px solid var(--x-line); }
.hx-foto img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #0b0f14; }
.hx-foto.vivo img { cursor: pointer; }
.hx-foto .sin { display: none; padding: 22px 18px; color: var(--x-mut); font-size: 12.5px; background: var(--x-s2); text-align: center; }
.hx-foto.is-sin { background: var(--x-s2); }
.hx-foto.is-sin img { display: none; }
.hx-foto.is-sin .sin { display: block; }
.hx-foto .cap { padding: 8px 18px; font-size: 12px; background: var(--x-s1); color: var(--x-tx2); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.hx-foto.is-sin .cap { display: none; }
/* historial 7 días */
.hx-hist { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-top: 8px; }
.hx-hist i { display: block; height: 22px; border-radius: 3px; background: var(--x-ok-bg); }
.hx-hist i.c { background: var(--x-crit); } .hx-hist i.c1 { background: var(--x-crit-bg); box-shadow: inset 0 0 0 1px var(--x-crit); }
.hx-hist i.nd { background: var(--x-s3); }
.hx-hist-d { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; font-size: 10.5px; color: var(--x-mut); text-align: center; margin-top: 3px; }
.hx-big { display: flex; align-items: baseline; gap: 8px; margin-top: 6px; }
.hx-big b { font-size: 20px; font-weight: 600; color: var(--x-tx); }
/* señal */
.hx-sen { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* toast */
#hx-toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px); background: var(--x-tx); color: var(--x-s1); padding: 10px 14px; border-radius: 8px;
  font-size: 13px; opacity: 0; transition: .2s; z-index: 1200; pointer-events: none; max-width: calc(100% - 24px); text-align: center; box-shadow: var(--x-shadow); }
#hx-toast.on { opacity: 1; transform: translateX(-50%); }

/* ===== Celular: la ficha es una hoja que sube desde abajo ===== */
@media (max-width: 767.98px) {
  #hx-ov { align-items: flex-end; justify-content: stretch; }
  #hx-ov .dr { width: 100%; height: auto; max-height: 88vh; max-height: 88dvh; border-left: 0; border-top: 1px solid var(--x-line2); border-radius: 16px 16px 0 0;
    transform: translateY(40px); padding-bottom: env(safe-area-inset-bottom, 0px); }
  #hx-ov .grab { display: block; }
  .hx-fh { padding-top: 10px; }
  .hx-btn { min-height: 40px; }
  .hx-act { min-height: 66px; }
  .hx-fs { padding: 14px 16px; }
  #hx-toast { bottom: 96px; }
}
html.mm-on #hx-toast { bottom: calc(var(--hx-pie-h, 58px) + 24px); }

/* ===== Mapa: botones «Caídas en grupo → equipo de fibra» y «?» ===== */
.hx-ctl a { cursor: pointer; }
.hx-ctl a svg { width: 17px; height: 17px; }
.me-tools .hx-ctl a + a { border-left: 1px solid rgba(36,41,46,.12) !important; }
.me-tools .hx-ctl a.is-on { background: #e7eefb !important; color: #1f62e0 !important; }
.me-tools .hx-ctl a.cargando { opacity: .55; cursor: progress; }
html[data-theme="dark"] .me-tools .hx-ctl a.is-on { background: rgba(79,140,255,.16) !important; color: #7aa7ff !important; }
/* sin barra (pantallas medianas): columna izquierda de Leaflet */
.leaflet-top.leaflet-left .hx-ctl { display: flex; flex-direction: column; }
.leaflet-top.leaflet-left .hx-ctl a { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; background: #fff; color: #24292e; }
.leaflet-top.leaflet-left .hx-ctl a.is-on { background: #e7eefb; color: #1f62e0; }
html.mm-on .leaflet-top.leaflet-left .hx-ctl { display: none !important; }
/* celular: grupo propio arriba del pie del mapa */
#hx-mmx { position: absolute; right: 8px; bottom: calc(var(--hx-pie-h, 58px) + 18px); z-index: 1000; display: none; flex-direction: column; gap: 0;
  background: var(--x-s1); border: 1px solid var(--x-line2); border-radius: 10px; box-shadow: 0 4px 14px rgba(15,30,45,.16); overflow: hidden; }
html.mm-on #hx-mmx { display: flex; }
html.mm-on.mm-hoja-abierta #hx-mmx { display: none; }
#hx-mmx button { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: 0; background: transparent; color: var(--x-tx2); cursor: pointer; }
#hx-mmx button + button { border-top: 1px solid var(--x-line); }
#hx-mmx button.is-on { background: var(--x-acc-bg); color: var(--x-acc); }
#hx-mmx button.cargando { opacity: .55; }
#hx-mmx svg { width: 20px; height: 20px; }

/* anillo rojo sobre el equipo de fibra de una caída en grupo (se toca para abrir su ficha) */
.hx-onu-anillo { width: 30px; height: 30px; border-radius: 50%; border: 3.5px solid #D23A41; background: rgba(255,255,255,.35);
  box-shadow: 0 0 0 2px #fff, 0 2px 8px rgba(0,0,0,.35); cursor: pointer; }
.hx-onu-anillo:hover { background: rgba(210,58,65,.18); }

/* leyenda a pedido */
#hx-ley { position: absolute; left: 12px; bottom: 30px; z-index: 830; width: 280px; max-width: calc(100% - 24px); max-height: calc(100% - 140px); overflow: auto;
  background: var(--x-s1); color: var(--x-tx); border: 1px solid var(--x-line2); border-radius: 10px; box-shadow: var(--x-shadow); padding: 10px 12px 12px; font-size: 12.5px; }
#hx-ley[hidden] { display: none; }
#hx-ley .hd { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
#hx-ley .hd b { font-size: 13px; }
#hx-ley .hd .hx-btn { margin-left: auto; padding: 4px; }
#hx-ley h5 { margin: 10px 0 4px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--x-mut); font-weight: 600; }
#hx-ley .it { display: flex; align-items: center; gap: 10px; padding: 3px 0; color: var(--x-tx2); }
#hx-ley .sw { flex: none; width: 30px; height: 22px; display: flex; align-items: center; justify-content: center; position: relative; }
#hx-ley .sw .camera-pin { position: relative !important; transform: none !important; flex: none; }
#hx-ley .sw svg { overflow: visible; }
html.mm-on #hx-ley { left: 8px; right: 8px; width: auto; bottom: calc(var(--hx-pie-h, 58px) + 18px); max-height: 60%; z-index: 1001; }

/* foto de la última ronda arriba del panel de detalle de la cámara (solo PC) */
#detail-panel .hx-pph { position: relative; margin: 0; aspect-ratio: 16 / 9; background: #0b0f14; overflow: hidden; }
#detail-panel .hx-pph img { width: 100%; height: 100%; object-fit: cover; display: block; }
#detail-panel .hx-pph span { display: none; position: absolute; inset: 0; align-items: center; justify-content: center; color: #9aa6b2; font-size: 12px; }
#detail-panel .hx-pph.is-sin img { display: none; }
#detail-panel .hx-pph.is-sin span { display: flex; }
html.mm-on #detail-panel .hx-pph { display: none; }
@media (max-width: 767.98px) { #detail-panel .hx-pph { display: none; } }

/* ===== Barra del mapa «A3 · Todo junto» (5 nov 2026): buscador fijo + «Opciones» (tecla M) ===== */
#hx-opc { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 9px 0 10px; border: 1px solid #c9d3e0; border-radius: 6px;
  background: #fff; color: #24292e; font: 600 12px/1 Inter, system-ui, sans-serif; cursor: pointer; }
#hx-opc svg { width: 15px; height: 15px; flex: none; }
#hx-opc .hx-cv { display: inline-flex; transition: transform .18s ease; }
#hx-opc:hover { border-color: #1f62e0; color: #1f62e0; }
html:not(.hx-mcol) #hx-opc { background: #eef3fd; border-color: #1f62e0; color: #1a4fb8; }
html.hx-mcol #hx-opc .hx-cv { transform: rotate(180deg); }
#hx-fil { display: none; align-items: center; gap: 6px; flex: none; cursor: pointer; }
#hx-fil span { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 9px; border-radius: 6px; border: 1px solid #c7d6f7;
  background: #eef3fd; color: #1a4fb8; font: 600 12px/1 Inter, system-ui, sans-serif; white-space: nowrap; }
#hx-fil .hx-fe { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
#hx-fil .hx-fe.on { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
#hx-fil .hx-fe.pend { background: #fffbeb; color: #b45309; border-color: #fde68a; }
#hx-fil button { border: 0; background: transparent; color: inherit; font: 700 15px/1 system-ui; cursor: pointer; padding: 0 0 0 2px; }
#hx-su { display: inline-flex; align-items: center; justify-content: center; gap: 3px; height: 30px; min-width: 40px; padding: 0 7px; margin-right: 4px;
  border: 1px solid #fcd34d; border-radius: 6px; background: #fffbeb; color: #b45309; cursor: pointer; }
#hx-su svg { width: 14px; height: 14px; flex: none; }
#hx-su b { font: 700 11px/1 "JetBrains Mono", ui-monospace, Consolas, monospace; }
#hx-su:hover, #hx-su.is-active { background: #fde68a; border-color: #d97706; }
#hx-tip { position: fixed; z-index: 1300; pointer-events: none; background: #0f172a; color: #fff; font: 600 12px/1.2 Inter, system-ui, sans-serif;
  padding: 6px 9px; border-radius: 6px; box-shadow: 0 6px 18px rgba(0,0,0,.25); white-space: nowrap; }
#hx-tip::before { content: ""; position: absolute; top: -5px; left: 50%; margin-left: -5px; border: 5px solid transparent; border-top: 0; border-bottom-color: #0f172a; }
#hx-tip[hidden] { display: none; }
/* solo con la barra de escritorio: sin «Total» (se vuelve a todas tocando de nuevo el filtro) y «Sin ubicación» como ícono */
html.me-barra-on:not(.mm-on) #map-chips .map-chip:has(#mf-n-todas),
html.me-barra-on:not(.mm-on) #map-chips .map-chip:has(#mf-n-sinubicar) { display: none !important; }
html.mm-on #hx-opc, html.mm-on #hx-fil, html.mm-on #hx-su, html:not(.me-barra-on) #hx-su { display: none !important; }
/* oculta: queda el buscador, «Opciones» y el filtro activo */
html.hx-mcol.me-barra-on:not(.mm-on) #me-barra > *:not(#me-buscar):not(#hx-opc):not(#hx-fil) { display: none !important; }
html.hx-mcol.me-barra-on:not(.mm-on) #me-barra { right: auto !important; width: auto !important; }
html.hx-mcol.me-barra-on:not(.mm-on) #hx-fil { display: inline-flex; }
html[data-theme="dark"] #hx-opc { background: #1b2028; color: #e7ecf2; border-color: #3a4250; }
html[data-theme="dark"]:not(.hx-mcol) #hx-opc { background: #1c2b45; border-color: #4f86f0; color: #cfe0ff; }
html[data-theme="dark"] #hx-fil span { background: #1c2b45; color: #cfe0ff; border-color: #34507f; }
html[data-theme="dark"] #hx-fil .hx-fe { background: #3a1a1d; color: #fca5a5; border-color: #6b2a30; }
html[data-theme="dark"] #hx-fil .hx-fe.on { background: #14301f; color: #86efac; border-color: #22573a; }
html[data-theme="dark"] #hx-fil .hx-fe.pend { background: #33270f; color: #fcd34d; border-color: #6b5214; }
html[data-theme="dark"] #hx-su { background: #33270f; color: #fcd34d; border-color: #6b5214; }
html[data-theme="dark"] #hx-su:hover, html[data-theme="dark"] #hx-su.is-active { background: #4a3812; border-color: #b7791f; }
@media (prefers-reduced-motion: reduce) { #hx-opc .hx-cv { transition: none; } }

/* ===== Dashboard: nombre de la cámara como enlace en el Listado de Cámaras Offline (opción C) ===== */
html.hx-coff-link #coff-section tbody tr[data-vm-row] td[data-label="CÁMARA"] b { color: #0B8AA0; cursor: pointer; text-decoration: underline;
  text-decoration-color: rgba(11,138,160,.35); text-underline-offset: 3px; border-radius: 3px; }
html.hx-coff-link #coff-section tbody tr[data-vm-row] td[data-label="CÁMARA"] b:hover { text-decoration-color: #0B8AA0; }
html.hx-coff-link #coff-section tbody tr[data-vm-row] td[data-label="CÁMARA"] b:focus-visible { outline: 2px solid #0B8AA0; outline-offset: 2px; }
html[data-theme="dark"].hx-coff-link #coff-section tbody tr[data-vm-row] td[data-label="CÁMARA"] b { color: #4CC2D6; text-decoration-color: rgba(76,194,214,.4); }

/* ===== 5 nov 2026 · ficha «B1 + V2» elegida por Lucas: foto limpia arriba, datos debajo, barra de íconos como la ficha
   de ONU (48 × 44, solo ícono de color, separador entre grupos) y video en vivo en el lugar de la foto ===== */
#hx-ov .dr { max-height: 94vh; max-height: 94dvh; }
.hx-foto { border-bottom: 0; }
.hx-foto video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; object-fit: contain; }
.hx-foto.en-vivo img, .hx-foto.en-vivo .sin { display: none !important; }
.hx-fh { padding: 10px 14px 8px; border-bottom: 0; }
.hx-fh .x { padding: 4px; }
.hx-fh .st { font-size: 11px; }
.hx-fh h4 { font-size: 15px; margin: 3px 0 0; line-height: 1.25; }
.hx-fh .sub { font-size: 11.5px; }
.hx-capl { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 5px; font-size: 11px; color: var(--x-mut); }
.hx-capl .hx-tag { font-size: 10.5px; padding: 1px 6px; }
.hx-capl [hidden] { display: none !important; }
.hx-vest { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; color: var(--x-tx); }
.hx-vest i { width: 7px; height: 7px; border-radius: 50%; background: #d1245c; animation: hxVivo 1.4s infinite; }
.hx-vest.con i { background: var(--x-warn); }
.hx-vest.err { color: var(--x-crit); } .hx-vest.err i { background: var(--x-crit); animation: none; }
@keyframes hxVivo { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .hx-vest i { animation: none; } }
/* barra de íconos */
.hx-tb { display: flex; align-items: center; gap: 2px; padding: 4px 8px; border-top: 1px solid var(--x-line); border-bottom: 1px solid var(--x-line); }
.hx-tb-g { display: flex; align-items: center; gap: 2px; }
.hx-tb-sep { flex: none; width: 1px; height: 28px; margin: 0 4px; background: #dbe2ea; }
html[data-theme="dark"] .hx-tb-sep { background: rgba(204,204,220,.22); }
.hx-tb-b { flex: 0 1 48px; width: 48px; min-width: 36px; height: 44px; padding: 0; margin: 0; display: inline-flex; align-items: center; justify-content: center;
  position: relative; border: 0; border-radius: 6px; background: transparent; color: var(--x-tx2); cursor: pointer; }
.hx-tb-b > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hx-tb-b svg.bi { width: 20px; height: 20px; pointer-events: none; }
.hx-tb-b:hover:not([disabled]) { background: #f1f5f9; }
html[data-theme="dark"] .hx-tb-b:hover:not([disabled]) { background: #20232b; }
.hx-tb-b:focus-visible { outline: 2px solid #3871dc; outline-offset: -2px; }
.hx-tb-b[disabled] { opacity: .38; cursor: not-allowed; }
.hx-tb-b[data-f="vivo"] { color: #7c5cd6; }
.hx-tb-b[data-f="vivo"].is-on { color: #d1245c; background: rgba(209,36,92,.08); }
.hx-tb-b[data-f="ping"], .hx-tb-b[data-o="cons"] { color: #0e9fb5; }
.hx-tb-b[data-f="mapa"], .hx-tb-b[data-o="mapa"] { color: #1f62e0; }
.hx-tb-b[data-f="wa"], .hx-tb-b[data-o="wa"] { color: #1a9e52; }
.hx-tb-b.vx { color: #475569; }
.hx-tb-b.vhd { font: 700 11px/1 Inter, system-ui, sans-serif; letter-spacing: .02em; }
.hx-tb-b.vhd.is-on { color: #1f62e0; background: #e7eefb; }
.hx-tb-b.run { background: rgba(14,159,181,.1); cursor: progress; }
.hx-tb-b .hx-cnt { position: absolute; top: 3px; right: 3px; min-width: 16px; height: 14px; padding: 0 3px; border-radius: 4px; background: #0e9fb5; color: #fff;
  font: 600 9.5px/14px Inter, system-ui, sans-serif; font-style: normal; text-align: center; }
html[data-theme="dark"] .hx-tb-b[data-f="vivo"] { color: #a18cf0; }
html[data-theme="dark"] .hx-tb-b[data-f="vivo"].is-on { color: #f47fa5; background: rgba(244,127,165,.1); }
html[data-theme="dark"] .hx-tb-b[data-f="ping"], html[data-theme="dark"] .hx-tb-b[data-o="cons"] { color: #22c3d9; }
html[data-theme="dark"] .hx-tb-b[data-f="mapa"], html[data-theme="dark"] .hx-tb-b[data-o="mapa"] { color: #8fb0ff; }
html[data-theme="dark"] .hx-tb-b[data-f="wa"], html[data-theme="dark"] .hx-tb-b[data-o="wa"] { color: #25d366; }
html[data-theme="dark"] .hx-tb-b.vx { color: #a9b4c2; }
html[data-theme="dark"] .hx-tb-b.vhd.is-on { color: #8fb0ff; background: rgba(79,140,255,.16); }
.hx-fs-res { padding: 0 14px; margin: 8px 0; font-size: 11.5px; }
/* datos, historial y equipo de fibra más compactos */
.hx-fs { padding: 9px 14px; }
.hx-fs > .hx-lbl { margin-bottom: 5px; font-size: 9.5px; }
.hx-kv { grid-template-columns: 1fr 1fr; gap: 5px 12px; }
.hx-kv span.k { display: inline; margin: 0 5px 0 0; font-size: 10px; }
.hx-kv b { font-size: 12px; }
[data-hist] { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
[data-hist] > .hx-lbl { margin: 0; font-size: 9.5px; }
.hx-big { margin: 0; gap: 5px; }
.hx-big b { font-size: 15px; }
.hx-big .t-mut { font-size: 12px; }
[data-hist] .hx-nota { flex-basis: 100%; margin-top: 2px; font-size: 10.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.hx-hist, .hx-hist-d { flex-basis: 100%; }
.hx-hist { margin-top: 4px; } .hx-hist i { height: 12px; }
.hx-hist-d { font-size: 9.5px; margin-top: 1px; }
.hx-onu { padding: 7px 9px; gap: 8px; }
.hx-onu .q b { font-size: 12.5px; }
.hx-onu .q small { font-size: 10.5px; }
.hx-diag { padding: 7px 9px; font-size: 11.5px; margin-top: 6px; line-height: 1.35; }
@media (max-width: 767.98px) { .hx-fh { padding-top: 10px; } .hx-fs { padding: 9px 14px; } }

/* ===== 5 nov 2026 · «V3» elegida por Lucas: en vivo, el video queda fijo arriba de la ficha al bajar, y Pantalla completa
   y SD/HD van dentro del video (arriba a la derecha), no en la barra. Rollback: *.pre-ficha-v3-20261105 ===== */
.hx-foto { position: relative; }
#hx-ov .dr > .hx-foto.en-vivo { position: sticky; top: 0; z-index: 4; box-shadow: 0 6px 14px rgba(0,0,0,.18); }
.hx-vtools { position: absolute; top: 8px; right: 8px; z-index: 2; display: flex; gap: 6px; }
.hx-vt { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 8px;
  background: rgba(15,23,32,.55); color: #fff; cursor: pointer; font: 700 11px/1 Inter, system-ui, sans-serif; letter-spacing: .02em; }
.hx-vt:hover { background: rgba(15,23,32,.75); }
.hx-vt:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.hx-vt.is-on { background: rgba(31,98,224,.85); }
.hx-vt svg.bi { width: 18px; height: 18px; stroke: #fff; }
@media (max-width: 767.98px) { .hx-vt { width: 40px; height: 40px; } }

/* 5 nov 2026: pantalla completa del recuadro del video (arreglo del giro en el celular). SD/HD y salir siguen a la vista. */
.hx-foto:fullscreen { background: #000; display: flex; align-items: center; justify-content: center; box-shadow: none; }
.hx-foto:-webkit-full-screen { background: #000; display: flex; align-items: center; justify-content: center; box-shadow: none; }
.hx-foto:fullscreen video { width: 100%; height: 100%; aspect-ratio: auto; object-fit: contain; }
.hx-foto:-webkit-full-screen video { width: 100%; height: 100%; aspect-ratio: auto; object-fit: contain; }
.hx-foto:fullscreen .hx-vtools { top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); }
.hx-foto:-webkit-full-screen .hx-vtools { top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); }
.hx-foto:fullscreen .hx-vt { width: 44px; height: 44px; }

/* ===== 5 nov 2026 · «P2» elegida por Lucas: en la PC, clic en una cámara del mapa abre la ficha como ventana flotante al
   lado del pin (el mapa se sigue usando). Botones que vienen del popup: Maps (rojo), web (turquesa), Mover (azul),
   Quitar ubicación (gris). Rollback: *.pre-ficha-p2-20261105 ===== */
@media (min-width: 768px) {
  html.hx-flota #hx-ov { background: transparent; pointer-events: none; display: block; }
  html.hx-flota #hx-ov.on .dr { pointer-events: auto; }
  html.hx-flota #hx-ov .dr { position: absolute; width: 360px; height: auto; left: var(--hx-fx, 60px); top: var(--hx-fy, 120px);
    max-height: calc(100vh - var(--hx-fy, 120px) - 12px); border: 1px solid var(--x-line2); border-radius: 12px; box-shadow: 0 14px 40px rgba(15,23,32,.25); transform: none; }
  html.hx-flota #hx-ov .dr > .hx-foto:first-of-type, html.hx-flota #hx-ov .dr > .grab + .hx-foto { border-radius: 12px 12px 0 0; overflow: hidden; }
}
.hx-tb { flex-wrap: wrap; }
.hx-tb-b[data-f="gmaps"] { color: #d93025; }
.hx-tb-b[data-f="web"] { color: #0e9fb5; }
.hx-tb-b[data-f="onulin"], .hx-tb-b[data-o="lin"] { color: #b45309; }
.hx-tb-b[data-f="mover"] { color: #1f62e0; }
.hx-tb-b[data-f="quitar"] { color: #64748b; }
.hx-tb-b[data-f="quitar"]:hover { color: #b91c1c; background: #fef2f2; }
html[data-theme="dark"] .hx-tb-b[data-f="gmaps"] { color: #f28b82; }
html[data-theme="dark"] .hx-tb-b[data-f="web"] { color: #22c3d9; }
html[data-theme="dark"] .hx-tb-b[data-f="onulin"], html[data-theme="dark"] .hx-tb-b[data-o="lin"] { color: #f6ad55; }
html[data-theme="dark"] .hx-tb-b[data-f="mover"] { color: #8fb0ff; }
html[data-theme="dark"] .hx-tb-b[data-f="quitar"] { color: #94a3b8; }
html[data-theme="dark"] .hx-tb-b[data-f="quitar"]:hover { color: #f87171; background: #2a1518; }
.hx-sondeo { font-weight: 500; font-size: 12px; }
.hx-sondeo .det-fresh { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--x-ok); margin-right: 5px; }
.hx-sondeo .det-fresh.is-old { background: var(--x-warn); }

/* ===== 5 nov 2026: RJ45 «Ver su ONU» (opción V1) y ficha/popup de la ONU con cabecera (opción «U3», elegidas por Lucas) ===== */
.hx-ipb { padding: 0 4px; color: #0e9fb5; }
.hx-ipb svg { width: 14px; height: 14px; }
.hx-hero { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 1px; background: #e5e7eb; border-bottom: 1px solid #e5e7eb; }
.hx-hero > div { background: #f8fafc; padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hx-hero small { font: 600 10px/1.2 Inter, system-ui, sans-serif; text-transform: uppercase; letter-spacing: .05em; color: #6b7280; }
.hx-hero b { font: 700 20px/1.1 "JetBrains Mono", ui-monospace, Consolas, monospace; color: #111827; }
.hx-hero em { font: 600 11px/1.2 Inter, system-ui, sans-serif; font-style: normal; }
.hx-hero .t-ok { color: #15803d; } .hx-hero .t-warn { color: #b45309; } .hx-hero .t-crit { color: #dc2626; } .hx-hero .t-mut { color: #6b7280; }
.hx-hbar { display: block; height: 6px; border-radius: 3px; background: #e5e7eb; overflow: hidden; margin-top: 4px; }
.hx-hbar i { display: block; height: 100%; width: 0; background: #9ca3af; }
.hx-hbar.hb-ok i { background: #16a34a; } .hx-hbar.hb-warn i { background: #f59e0b; } .hx-hbar.hb-crit i { background: #dc2626; }
.hx-hero > .hx-hmot b { font: 800 15px/1.15 Inter, system-ui, sans-serif; color: #be123c; overflow-wrap: anywhere; }
.hx-hero > .hx-hmot em { color: #9f1239; font-weight: 500; }
html[data-theme="dark"] .hx-hero > .hx-hmot b { color: #fb7185; } html[data-theme="dark"] .hx-hero > .hx-hmot em { color: #fda4af; }
html[data-theme="dark"] .hx-hero { background: #2b323c; border-color: #2b323c; }
html[data-theme="dark"] .hx-hero > div { background: #1b2028; }
html[data-theme="dark"] .hx-hero b { color: #e7ecf2; }
html[data-theme="dark"] .hx-hbar { background: #2b323c; }
/* popup de la ONU con la misma piel que la ficha de cámaras (es el mismo popup de siempre, ordenado y vestido) */
.leaflet-popup:has(.gx-card.hx-u3) .leaflet-popup-content-wrapper { border-radius: 10px !important; padding: 0 !important; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.22) !important; }
.leaflet-popup:has(.gx-card.hx-u3) .leaflet-popup-content { margin: 0 !important; width: 340px !important; max-width: calc(100vw - 24px); }
.gx-card.hx-u3 { font: 13px/1.4 Inter, system-ui, sans-serif; color: #1f2937; background: #fff; }
.gx-card.hx-u3 .gx-hd { background: #fff !important; color: #111827 !important; display: grid !important; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 12px 12px 10px 14px !important; border: 0 !important; border-bottom: 1px solid #eef0f3 !important; }
.gx-card.hx-u3 .hx-u3-st { grid-column: 1; font: 700 11px/1.3 Inter, system-ui, sans-serif; letter-spacing: .03em; display: flex; align-items: center; gap: 6px; }
.gx-card.hx-u3 .hx-u3-st.t-ok { color: #15803d; } .gx-card.hx-u3 .hx-u3-st.t-crit { color: #b91c1c; }
.gx-card.hx-u3 .gx-t { grid-column: 1; font: 700 16px/1.25 Inter, system-ui, sans-serif !important; color: #111827 !important; white-space: normal !important; }
.gx-card.hx-u3 .hx-u3-sub { grid-column: 1; font-size: 12px; color: #6b7280; }
.gx-card.hx-u3 .gx-tag { display: none !important; }
.gx-card.hx-u3 .gx-x { grid-column: 2; grid-row: 1; align-self: start; background: transparent !important; color: #6b7280 !important; border: 0 !important; }
.gx-card.hx-u3 .gx-tb { display: flex !important; flex-wrap: wrap; align-items: center; gap: 2px; padding: 6px 8px !important; border: 0 !important; border-bottom: 1px solid #eef0f3 !important; background: #fff !important; margin: 0 !important; justify-content: flex-start !important; }
.gx-card.hx-u3 .gx-tb-eq, .gx-card.hx-u3 .gx-tb-go { display: contents !important; }
.gx-card.hx-u3 .gx-tb .gx-b { width: 38px; height: 36px; min-width: 38px; padding: 0 !important; border: 0 !important; background: transparent !important; border-radius: 6px !important; display: inline-flex; align-items: center; justify-content: center; }
.gx-card.hx-u3 .gx-tb .gx-b span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.gx-card.hx-u3 .gx-tb .gx-b:hover { background: #f1f5f9 !important; }
.gx-card.hx-u3 .gx-tb .gx-b:disabled, .gx-card.hx-u3 .gx-tb .gx-b[aria-disabled="true"] { opacity: .45; }
.gx-card.hx-u3 .gx-tb-sep { width: 1px; height: 22px; background: #e5e7eb; margin: 0 4px; }
.gx-card.hx-u3 .gx-rj { color: #b45309 !important; }
.gx-card.hx-u3 .gx-rj svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gx-card.hx-u3 .vo-acc { display: none !important; }
.leaflet-popup .gx-card.hx-u3 dl.gx-body { display: grid !important; grid-template-columns: 1fr 1fr; gap: 8px 12px; padding: 10px 14px !important; margin: 0 !important; text-align: left; }
.leaflet-popup .gx-card.hx-u3 dl.gx-body > .gx-f { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; border: 0 !important; padding: 0 !important; min-width: 0; text-align: left; }
.leaflet-popup .gx-card.hx-u3 dl.gx-body > .gx-f.hx-u3-ancho { grid-column: 1 / -1; }
.leaflet-popup .gx-card.hx-u3 dl.gx-body > .gx-f.hx-u3-est { display: none; }
.gx-card.hx-u3 .gx-f dt { font: 500 11px/1.3 Inter, system-ui, sans-serif !important; color: #6b7280 !important; margin: 0 !important; text-align: left !important; width: auto !important; }
.gx-card.hx-u3 .gx-f dd { margin: 0 !important; display: block !important; white-space: normal !important; font: 600 12.5px/1.35 "JetBrains Mono", ui-monospace, Consolas, monospace !important; color: #111827 !important; text-align: left !important; }
.gx-card.hx-u3 .gx-f dd .gx-copy { vertical-align: middle; }
.gx-card.hx-u3 .gx-f dd > * { display: inline !important; }
.gx-card.hx-u3 .gx-f dd > .gx-copy { display: inline-flex !important; }
.gx-card.hx-u3 .hx-u3-dot { width: 8px; height: 8px; border-radius: 2px; background: currentColor; flex: none; }
.gx-card.hx-u3 .vo-info, .gx-card.hx-u3 .vo-det { margin-left: 14px !important; margin-right: 14px !important; }
.gx-card.hx-u3 .vo-det { margin-bottom: 12px !important; }
html[data-theme="dark"] .gx-card.hx-u3, html[data-theme="dark"] .gx-card.hx-u3 .gx-hd, html[data-theme="dark"] .gx-card.hx-u3 .gx-tb { background: #161b22 !important; color: #e7ecf2 !important; border-color: #2b323c !important; }
html[data-theme="dark"] .gx-card.hx-u3 .gx-t, html[data-theme="dark"] .gx-card.hx-u3 .gx-f dd { color: #e7ecf2 !important; }
html[data-theme="dark"] .gx-card.hx-u3 .gx-tb .gx-b:hover { background: #222a35 !important; }
html[data-theme="dark"] .gx-card.hx-u3 .gx-rj { color: #f6ad55 !important; }
