/* hcp-medidores.css — 5 nov 2026. Pestaña «HCP», mismo estilo que «Analítica» (opción «C · Medidores»), pedido de Lucas:
   «quiero comenzar a unificar la estética de la web». Línea S3 (tarjetas con borde fino y franja de estado a la izquierda)
   + fila de medidores (CPU, Memoria, Disco C, Disco D, Ping 24 h y Servicios). Mismos colores y medidas que analitica-medidores.css.
   Solo presentación: los datos, el refresco y el cambio de equipo son los de siempre (index.js).
   Se activa con la clase html.hcp-med que pone js/hcp-medidores.js (sin JS, la pestaña queda como antes).
   Rollback: deploy\deshacer-estetica-hcp.bat */

html.hcp-med #resumen {
  --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"].hcp-med #resumen { --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 (HCP principal / HCP respaldo): tarjetas como la barra de servidores y Analítica */
html.hcp-med #resumen .vs-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.hcp-med #resumen .vs-eq::before { content:""; position:absolute; left:0; top:0; bottom:0; width:3px; background:var(--am-st,var(--am-ok)); }
html.hcp-med #resumen .vs-eq:hover { border-color:var(--border-medium,rgba(36,41,46,.3)); }
html.hcp-med #resumen .vs-eq:focus-visible { outline:2px solid var(--am-sel); outline-offset:2px; }
html.hcp-med #resumen .vs-eq[aria-pressed="true"] { border-color:var(--am-sel); box-shadow:0 0 0 3px color-mix(in srgb,var(--am-sel) 14%,transparent); }
html.hcp-med #resumen .vs-eq > .gs-dot { display:none; }
html.hcp-med #resumen .vs-eq-t { display:flex; flex-direction:column; gap:3px; flex:1; min-width:0; }
html.hcp-med #resumen .vs-eq-t b { display:flex; align-items:center; gap:8px; font-size:11px; letter-spacing:.06em; text-transform:uppercase; font-weight:600; color:var(--am-tx); white-space:nowrap; }
html.hcp-med #resumen .vs-eq-t small { font-size:11px; color:var(--am-mu); display:flex; align-items:center; gap:6px; }
html.hcp-med #resumen .vs-eq-t small::before { content:""; width:7px; height:7px; border-radius:1px; background:var(--am-st,var(--am-ok)); flex:none; }
html.hcp-med #resumen .vs-rol { border-radius:4px !important; font-weight:600; }

/* KPI y tarjetas (igual que Analítica) */
html.hcp-med #resumen .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.hcp-med #resumen .noc-kpi.warn { border-left-color:var(--am-warn) !important; background:color-mix(in srgb,var(--am-warn) 7%,var(--am-bg)) !important; }
html.hcp-med #resumen .noc-kpi.crit, html.hcp-med #resumen .noc-kpi.bad { border-left-color:var(--am-crit) !important; background:color-mix(in srgb,var(--am-crit) 6%,var(--am-bg)) !important; }
html.hcp-med #resumen .noc-kpi-l { letter-spacing:.06em; font-weight:600; }
html.hcp-med #resumen .noc-kpi-v { font-size:26px !important; }
html.hcp-med #resumen .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.hcp-med #resumen .sg-card > * { margin-left:16px; margin-right:16px; }
html.hcp-med #resumen .sg-card > :last-child { margin-bottom:14px; }
html.hcp-med #resumen .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.hcp-med #resumen .sg-card-h::before { content:""; position:absolute; left:0; top:0; bottom:0; width:3px; background:var(--am-ok); }
html.hcp-med #resumen .sg-card.warn .sg-card-h::before { background:var(--am-warn); }
html.hcp-med #resumen .sg-card.crit .sg-card-h::before, html.hcp-med #resumen .sg-card.bad .sg-card-h::before { background:var(--am-crit); }
html.hcp-med #resumen .sg-card-n { font-size:13px !important; font-weight:600 !important; }
html.hcp-med #resumen .sg-pill { border-radius:4px !important; font-weight:600; }
html.hcp-med #resumen .vs-upt { border-radius:6px !important; }
html.hcp-med #resumen .sg-track { height:6px !important; border-radius:3px !important; }
html.hcp-med #resumen .sg-track > span { border-radius:3px !important; }
html.hcp-med #resumen .sg-bloque { border:1.25px solid var(--am-bd) !important; border-radius:8px !important; background:var(--am-bg); }

/* Las barras de hardware pasan a los medidores (mismo dato y mismo umbral). Solo se ocultan si los medidores se dibujaron. */
html.hcp-med.hm-gauges-ok #resumen .vs-dos-col > .sg-card:nth-child(1) .vs-hw { display:none !important; }

/* Medidores (mismo diseño que Analítica) */
html.hcp-med #resumen .am-gauges { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:12px; margin:12px 0; }
html.hcp-med #resumen .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.hcp-med #resumen .am-g::before { content:""; position:absolute; left:0; top:0; bottom:0; width:3px; background:var(--c); }
html.hcp-med #resumen .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.hcp-med #resumen .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.hcp-med #resumen .am-gt { min-width:0; }
html.hcp-med #resumen .am-gt b { display:block; font-size:11px; letter-spacing:.06em; text-transform:uppercase; font-weight:600; color:var(--am-tx) !important; }
html.hcp-med #resumen .am-gt small { display:block; font-size:11px; color:var(--am-mu); line-height:1.35; margin-top:2px; overflow-wrap:anywhere; }

@media (max-width: 1299px) {
  html.hcp-med #resumen .am-gauges { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width: 1099px) {
  html.hcp-med #resumen .vs-eq { flex:0 0 auto; min-width:220px; }
}
@media (max-width: 600px) {
  html.hcp-med #resumen .am-gauges { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  html.hcp-med #resumen .am-g { flex-direction:column; text-align:center; gap:6px; padding:12px 8px 10px; }
  html.hcp-med #resumen .vs-eq { min-width:200px; }
}

/* ===== 6 nov 2026: «L2 + G3 + P2» — Hardware y límites en una tarjeta con tablas; Servicios a todo el ancho ===== */
html.hcp-med.hm-l2 #resumen .vs-dos-col { display:grid !important; grid-template-columns:minmax(0,1fr) !important; gap:14px !important; }
html.hcp-med.hm-l2 #resumen .vs-dos-col > .hm-hw { order:1; } html.hcp-med.hm-l2 #resumen .vs-dos-col > .hm-svc { order:2; } html.hcp-med.hm-l2 #resumen .vs-dos-col > .hm-prob { order:3; }
html.hcp-med.hm-l2 #resumen .hm-oculto { display:none !important; }
/* la tarjeta muestra solo encabezado, subtítulo y el cuerpo nuevo (los datos originales quedan ocultos, se leen de ahí) */
html.hcp-med.hm-l2 #resumen .hm-hw > :not(.sg-card-h):not(.sg-card-sub):not(.hm-body) { display:none !important; }
html.hcp-med #resumen .hm-body { --hm-c:var(--am-ok); }
html.hcp-med #resumen .hm-c-ok { --hm-c:var(--am-ok); } html.hcp-med #resumen .hm-c-warn { --hm-c:var(--am-warn); }
html.hcp-med #resumen .hm-c-crit { --hm-c:var(--am-crit); } html.hcp-med #resumen .hm-c-na { --hm-c:var(--am-na); }
html.hcp-med #resumen .hm-tit { font-size:11px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; color:var(--am-mu); margin:16px 0 6px; display:flex; gap:8px; align-items:baseline; flex-wrap:wrap; }
html.hcp-med #resumen .hm-tit:first-child { margin-top:4px; }
html.hcp-med #resumen .hm-tit small { text-transform:none; letter-spacing:0; font-weight:400; }
html.hcp-med #resumen .hm-sq::before { content:""; display:inline-block; width:8px; height:8px; border-radius:2px; margin-right:6px; background:var(--hm-c); vertical-align:1px; }
html.hcp-med #resumen .hm-strip { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); border:1.25px solid var(--am-bd); border-radius:8px; overflow:hidden; }
html.hcp-med #resumen .hm-strip > div { padding:10px 14px; border-right:1px solid var(--am-bd); min-width:0; }
html.hcp-med #resumen .hm-strip > div:last-child { border-right:0; }
html.hcp-med #resumen .hm-strip span { display:block; font-size:10.5px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; color:var(--am-mu); }
html.hcp-med #resumen .hm-strip b { display:block; font-size:17px; font-weight:600; color:var(--am-tx); margin-top:3px; font-variant-numeric:tabular-nums; }
html.hcp-med #resumen .hm-strip small { display:block; font-size:11px; color:var(--am-mu); margin-top:1px; }
html.hcp-med #resumen table.hm-t { width:100%; border-collapse:collapse; table-layout:fixed; font-size:12.5px; }
html.hcp-med #resumen table.hm-t col.c1 { width:30%; } html.hcp-med #resumen table.hm-t col.c2 { width:12%; } html.hcp-med #resumen table.hm-t col.c3 { width:9%; }
html.hcp-med #resumen table.hm-t col.c4 { width:15%; } html.hcp-med #resumen table.hm-t col.c5 { width:8%; } html.hcp-med #resumen table.hm-t col.c6 { width:26%; }
html.hcp-med #resumen table.hm-t th { text-align:left; font-size:10.5px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; color:var(--am-mu); padding:7px 10px; border-bottom:1px solid var(--am-bd); background:var(--am-sf); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
html.hcp-med #resumen table.hm-t td { padding:9px 10px; border-bottom:1px solid var(--am-bd); color:var(--am-tx); vertical-align:middle; overflow-wrap:anywhere; }
html.hcp-med #resumen table.hm-t th.n, html.hcp-med #resumen table.hm-t td.n { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; overflow-wrap:normal; }
html.hcp-med #resumen table.hm-t td small { display:block; color:var(--am-mu); font-size:11px; font-weight:400; }
html.hcp-med #resumen table.hm-t td.k { font-weight:600; color:var(--hm-c); }
html.hcp-med #resumen table.hm-t tr.off td, html.hcp-med #resumen table.hm-t tr.off td.k { color:var(--am-mu); }
/* Servicios a todo el ancho, en mosaico (como Analítica) */
html.hcp-med.hm-l2 #resumen .hm-svc .hm-lista { display:grid !important; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:8px; }
html.hcp-med.hm-l2 #resumen .hm-svc .vs-svc { border:1.25px solid var(--am-bd); border-radius:6px; padding:8px 10px !important; margin:0 !important; }
html.hcp-med.hm-l2 #resumen .hm-svc .vs-svc:hover { background:var(--am-sf); }
/* Problemas · 24 h (abajo, a lo ancho) */
html.hcp-med.hm-l2 #resumen .hm-prob > :not(.sg-bloque-h) { margin-left:14px !important; margin-right:14px !important; }
html.hcp-med.hm-l2 #resumen .hm-prob > .sg-bloque-h { padding:10px 14px 4px !important; }
@media (max-width: 900px) {
  html.hcp-med #resumen .hm-strip { grid-template-columns:repeat(2,minmax(0,1fr)); }
  html.hcp-med #resumen .hm-strip > div:nth-child(2) { border-right:0; } html.hcp-med #resumen .hm-strip > div:nth-child(-n+2) { border-bottom:1px solid var(--am-bd); }
  html.hcp-med #resumen table.hm-t { table-layout:auto; }
  html.hcp-med #resumen table.hm-t col { width:auto !important; }
  html.hcp-med #resumen table.hm-t .hm-m { display:none; }
}
@media (max-width: 600px) {
  html.hcp-med #resumen table.hm-t td, html.hcp-med #resumen table.hm-t th { padding:7px 6px; }
}
