/* analitica-medidores.css — 5 nov 2026. Pestaña «Analítica», opción «C · Medidores» elegida por Lucas.
   Línea S3 de la web (tarjetas con borde fino y franja de estado a la izquierda) + fila de medidores
   (CPU, Memoria, Temperatura, Partición, Red y Canales en uso) + servicios en mosaico.
   Solo presentación: los datos, el refresco y el cambio de equipo son los de siempre (index.js).
   Se activa con la clase html.an-med que pone js/analitica-medidores.js (sin JS, la pestaña queda como antes).
   Rollback: deploy\deshacer-analitica-medidores.bat */

html.an-med #fusion {
  --am-ok:#1b855e; --am-warn:#e08600; --am-crit:#e0226e; --am-na:rgba(36,41,46,.45); --am-sel:#2563eb; --am-trk:rgba(36,41,46,.09);
  --am-bd:var(--border-weak, rgba(36,41,46,.12)); --am-bg:var(--bg-panel,#fff); --am-sf:var(--bg-surface,#f4f5f5);
  --am-tx:var(--text-primary,#24292e); --am-mu:var(--text-secondary,rgba(36,41,46,.75));
}
html[data-theme="dark"].an-med #fusion { --am-ok:#3fb950; --am-warn:#fbad37; --am-crit:#ff5c8a; --am-sel:#5b8cff; --am-na:rgba(230,233,236,.45); --am-trk:rgba(230,233,236,.10); }

/* Equipos: tarjetas como la barra de servidores */
html.an-med #fusion .fs-equipos { display:flex !important; gap:10px !important; flex-wrap:wrap; }
html.an-med #fusion .fs-eq { all:unset; box-sizing:border-box; cursor:pointer; position:relative; display:flex !important; align-items:center; gap:12px;
  min-width:240px; flex:0 1 320px; background:var(--am-bg); border:1.25px solid var(--am-bd); border-radius:8px; padding:10px 14px 10px 16px; overflow:hidden; }
html.an-med #fusion .fs-eq::before { content:""; position:absolute; left:0; top:0; bottom:0; width:3px; background:var(--am-st,var(--am-ok)); }
html.an-med #fusion .fs-eq:hover { border-color:var(--border-medium,rgba(36,41,46,.3)); }
html.an-med #fusion .fs-eq:focus-visible { outline:2px solid var(--am-sel); outline-offset:2px; }
html.an-med #fusion .fs-eq.am-on { border-color:var(--am-sel); box-shadow:0 0 0 3px color-mix(in srgb,var(--am-sel) 14%,transparent); }
html.an-med #fusion .fs-eq > .gs-dot { display:none; }
html.an-med #fusion .fs-eq-t { display:flex; flex-direction:column; gap:3px; flex:1; min-width:0; }
html.an-med #fusion .fs-eq-t b { font-size:11px; letter-spacing:.06em; text-transform:uppercase; font-weight:600; color:var(--am-tx); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
html.an-med #fusion .fs-eq-t small { font-size:11px; color:var(--am-mu); display:flex; align-items:center; gap:6px; }
html.an-med #fusion .fs-eq-t small::before { content:""; width:7px; height:7px; border-radius:1px; background:var(--am-st,var(--am-ok)); flex:none; }
html.an-med #fusion .am-eqv { display:flex; flex-direction:column; align-items:flex-end; gap:2px; font-variant-numeric:tabular-nums; }
html.an-med #fusion .am-eqv b { font-size:18px; font-weight:600; color:var(--am-tx); line-height:1.1; }
html.an-med #fusion .am-eqv small { font-size:10.5px; color:var(--am-mu); }

/* KPI y tarjetas */
html.an-med #fusion .noc-kpi { border-radius:8px !important; border:1.25px solid var(--am-bd) !important; border-left:3px solid var(--am-ok) !important; background:var(--am-bg) !important; padding:12px 14px !important; }
html.an-med #fusion .noc-kpi.warn { border-left-color:var(--am-warn) !important; background:color-mix(in srgb,var(--am-warn) 7%,var(--am-bg)) !important; }
html.an-med #fusion .noc-kpi.crit, html.an-med #fusion .noc-kpi.bad { border-left-color:var(--am-crit) !important; background:color-mix(in srgb,var(--am-crit) 6%,var(--am-bg)) !important; }
html.an-med #fusion .noc-kpi-l { letter-spacing:.06em; font-weight:600; }
html.an-med #fusion .noc-kpi-v { font-size:26px !important; }
html.an-med #fusion .sg-card { border:1.25px solid var(--am-bd) !important; border-radius:8px !important; background:var(--am-bg) !important; padding:0 !important; overflow:hidden; }
html.an-med #fusion .sg-card > * { margin-left:16px; margin-right:16px; }
html.an-med #fusion .sg-card > :last-child { margin-bottom:14px; }
html.an-med #fusion .sg-card-h { margin:0 0 10px !important; padding:11px 16px !important; border-bottom:1px solid var(--am-bd); background:var(--am-sf); position:relative; }
html.an-med #fusion .sg-card-h::before { content:""; position:absolute; left:0; top:0; bottom:0; width:3px; background:var(--am-ok); }
html.an-med #fusion .sg-card.warn .sg-card-h::before { background:var(--am-warn); }
html.an-med #fusion .sg-card.crit .sg-card-h::before, html.an-med #fusion .sg-card.bad .sg-card-h::before { background:var(--am-crit); }
html.an-med #fusion .sg-card-n { font-size:13px !important; font-weight:600 !important; }
html.an-med #fusion .sg-pill { border-radius:4px !important; font-weight:600; }
html.an-med #fusion .vs-upt { border-radius:6px !important; }
html.an-med #fusion .sg-track { height:6px !important; border-radius:3px !important; }
html.an-med #fusion .sg-track > span { border-radius:3px !important; }
html.an-med #fusion .sg-bloque { border:1.25px solid var(--am-bd) !important; border-radius:8px !important; background:var(--am-bg); }

/* Distribución: Hardware y Capacidad lado a lado; Servicios abajo a todo el ancho */
html.an-med #fusion .vs-tres-col { display:grid !important; grid-template-columns:minmax(0,1fr) minmax(0,1fr) !important; gap:14px !important; }
html.an-med #fusion .vs-tres-col > .sg-card:nth-child(3) { grid-column:1 / -1; }
/* Las barras de hardware pasan a los medidores (mismo dato y mismo umbral). Solo se ocultan si los medidores se dibujaron. */
html.an-med.am-gauges-ok #fusion .vs-tres-col > .sg-card:nth-child(1) .vs-hw { display:none !important; }

/* Medidores */
html.an-med #fusion .am-gauges { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:12px; margin:12px 0; }
html.an-med #fusion .am-g { position:relative; background:var(--am-bg); border:1.25px solid var(--am-bd); border-radius:8px; overflow:hidden; min-width:0;
  padding:12px 12px 10px 15px; display:flex; align-items:center; gap:12px; }
html.an-med #fusion .am-g::before { content:""; position:absolute; left:0; top:0; bottom:0; width:3px; background:var(--c); }
html.an-med #fusion .am-ring { width:64px; height:64px; flex:none; border-radius:50%; display:grid; place-items:center;
  background:conic-gradient(var(--c) calc(var(--p)*1%), var(--am-trk) 0); }
html.an-med #fusion .am-ring > span { width:50px; height:50px; border-radius:50%; background:var(--am-bg); display:grid; place-items:center; text-align:center;
  font-weight:600; font-size:11.5px; line-height:1.1; font-variant-numeric:tabular-nums; color:var(--am-tx); padding:2px; box-sizing:border-box; }
html.an-med #fusion .am-gt { min-width:0; }
html.an-med #fusion .am-gt b { display:block; font-size:11px; letter-spacing:.06em; text-transform:uppercase; font-weight:600; color:var(--am-tx); }
html.an-med #fusion .am-gt small { display:block; font-size:11px; color:var(--am-mu); line-height:1.35; margin-top:2px; overflow-wrap:anywhere; }

/* Servicios en mosaico */
html.an-med #fusion .vs-tres-col > .sg-card:nth-child(3) > div:not(.sg-card-h):not(.sg-card-sub) { display:grid !important; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:8px; }
html.an-med #fusion .vs-tres-col > .sg-card:nth-child(3) .vs-svc { border:1.25px solid var(--am-bd); border-radius:6px; padding:8px 10px !important; margin:0 !important; }
html.an-med #fusion .vs-tres-col > .sg-card:nth-child(3) .vs-svc:hover { background:var(--am-sf); }

/* Notebook / tablet */
@media (max-width: 1299px) {
  html.an-med #fusion .am-gauges { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width: 1099px) {
  html.an-med #fusion .fs-equipos { flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; -webkit-overflow-scrolling:touch; }
  html.an-med #fusion .fs-equipos::-webkit-scrollbar { display:none; }
  html.an-med #fusion .fs-eq { flex:0 0 auto; min-width:220px; }
  html.an-med #fusion .vs-tres-col { grid-template-columns:minmax(0,1fr) !important; }
  html.an-med #fusion .vs-tres-col > .sg-card:nth-child(3) > div:not(.sg-card-h):not(.sg-card-sub) { grid-template-columns:minmax(0,1fr); }
}
/* Celular */
@media (max-width: 600px) {
  html.an-med #fusion .am-gauges { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  html.an-med #fusion .am-g { flex-direction:column; text-align:center; gap:6px; padding:12px 8px 10px; }
  html.an-med #fusion .fs-eq { min-width:200px; }
}
