/* monitoreo-evo-img.css — 5 nov 2026 · «G1 sin relleno» + «I1 · Tabla D1» (pestaña Monitoreo). Rollback: quitar la línea de index.html. */
html.md1-g { --g-ok:#15803d; --g-okb:#16a34a; --g-warn:#b45309; --g-warnb:#f59e0b; --g-crit:#be123c; --g-critb:#e11d48;
  --g-tx:#0f172a; --g-tx2:#475569; --g-tx3:#94a3b8; --g-ln:#e2e8f0; --g-bg:#fff; --g-bg2:#f8fafc; }
html.md1-g[data-theme="dark"] { --g-tx:#e7ecf2; --g-tx2:#a9b4c2; --g-tx3:#6b7684; --g-ln:#2b323c; --g-bg:#161b22; --g-bg2:#1b2028; --g-ok:#4ade80; --g-warn:#fbbf24; --g-crit:#fb7185; }

/* ===== Evolución por servidor: leyenda → tarjetas KPI ===== */
html.md1-g .evo-leg { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 12px 14px !important; width: auto !important; height: auto !important; max-height: none !important; grid-auto-rows: auto !important; overflow: visible !important; }
html.md1-g .evo-l { position: relative; display: grid !important; align-content: start !important; justify-items: start !important; gap: 4px !important; min-width: 0; background: var(--g-bg); border: 1px solid var(--g-ln); border-radius: 8px; padding: 10px 14px !important; }
html.md1-g .evo-l { text-align: left !important; height: auto !important; max-height: none !important; }
html.md1-g .evo-l small, html.md1-g .evo-l b, html.md1-g .evo-l i { height: auto !important; min-height: 0 !important; padding: 0 !important; line-height: 1.15 !important; }
html.md1-g .evo-l > * { display: block !important; float: none !important; margin: 0 !important; text-align: left !important; width: auto !important; }
html.md1-g .evo-l::before { content: ""; position: absolute; left: -1px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 2px 2px 0; background: #64748b; }
html.md1-g .evo-l.on::before { background: var(--g-okb); } html.md1-g .evo-l.off::before { background: var(--g-critb); }
html.md1-g .evo-l small { font: 600 11px/1.2 Inter, system-ui, sans-serif !important; text-transform: uppercase; letter-spacing: .06em; color: var(--g-tx2) !important; }
html.md1-g .evo-l small::before { display: none !important; }
html.md1-g .evo-l b { font: 700 26px/1 "JetBrains Mono", ui-monospace, monospace !important; color: var(--g-tx) !important; }
html.md1-g .evo-l.on b { color: var(--g-ok) !important; } html.md1-g .evo-l.off b { color: var(--g-crit) !important; }
html.md1-g .evo-l i { font: 600 12px/1 "JetBrains Mono", ui-monospace, monospace !important; font-style: normal !important; color: var(--g-tx2) !important; }
html.md1-g .md1-ex { grid-column: 1 / -1; display: flex; gap: 10px; flex-wrap: wrap; font: 12px/1.4 Inter, system-ui, sans-serif; color: var(--g-tx2); }
html.md1-g .md1-ex .k { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--g-ln); border-radius: 6px; background: var(--g-bg2); }
html.md1-g .md1-ex b { font-family: "JetBrains Mono", ui-monospace, monospace; color: var(--g-tx); }
html.md1-g .md1-ex .k.ok b { color: var(--g-ok); } html.md1-g .md1-ex .k.crit b { color: var(--g-crit); }

/* ===== controles (antigüedad, chips de imagen): rectos, activo en oscuro ===== */
html.md1-g .inc-chip-btn, html.md1-g .cimg-chip { border-radius: 5px !important; }
html.md1-g .inc-chip-btn.on, html.md1-g .cimg-chip.on { background: var(--g-tx) !important; color: var(--g-bg) !important; border-color: var(--g-tx) !important; }
html.md1-g .inc-chip-btn.on .n { background: rgba(255,255,255,.18) !important; color: inherit !important; }
html.md1-g .inc-chip-btn .n { border-radius: 3px !important; font-family: "JetBrains Mono", ui-monospace, monospace; }

/* ===== tablas «Listado de cámaras offline» y «Control de imagen»: estilo de la tabla de áreas ===== */
html.md1-g #coff-section table thead th, html.md1-g #cam-sec-cimg table thead th { position: sticky; top: 0; z-index: 2; background: var(--g-bg2) !important;
  font: 600 10.5px/1.2 Inter, system-ui, sans-serif !important; letter-spacing: .06em; text-transform: uppercase; color: var(--g-tx2) !important; padding: 9px 12px !important; border-bottom: 1px solid var(--g-ln) !important; }
html.md1-g #coff-section table tbody td, html.md1-g #cam-sec-cimg table tbody td { padding: 10px 12px !important; border-bottom: 1px solid var(--g-ln) !important; vertical-align: middle; }
html.md1-g #coff-section table tbody tr:hover td, html.md1-g #cam-sec-cimg table tbody tr:hover td { background: var(--g-bg2) !important; }
/* offline */
html.md1-g #coff-section td.rt-title { font: 500 12px/1.3 Inter, system-ui, sans-serif !important; color: var(--g-tx2) !important; }
html.md1-g #coff-section td[data-label="CÁMARA"] b { font: 600 13px/1.3 Inter, system-ui, sans-serif; }
html.md1-g #coff-section .frn-ip { font: 500 12px "JetBrains Mono", ui-monospace, monospace !important; color: var(--g-tx2) !important; }
html.md1-g #coff-section .frn-est.off { display: inline-flex; align-items: center; gap: 6px; font-size: 0 !important; color: var(--g-crit) !important; }
html.md1-g #coff-section .frn-est.off::before { content: ""; width: 9px; height: 9px; border-radius: 2px; background: var(--g-critb); }
html.md1-g #coff-section .frn-est.off::after { content: "Offline"; font: 600 12px Inter, system-ui, sans-serif; }
html.md1-g #coff-section .coff-dur { font: 700 13px "JetBrains Mono", ui-monospace, monospace; }
html.md1-g #coff-section tr.md1-h24 .coff-dur { color: var(--g-crit); }
html.md1-g #coff-section tr.md1-d7 .coff-dur { color: var(--g-warn); }
html.md1-g #coff-section tr.md1-d30 .coff-dur, html.md1-g #coff-section tr.md1-d30p .coff-dur { color: var(--g-tx2); }
html.md1-g #coff-section .md1-dbar { display: block; height: 4px; margin: 5px 0 0 auto; border-radius: 2px; background: var(--g-ln); overflow: hidden; width: 110px; max-width: 100%; }
html.md1-g #coff-section .md1-dbar i { display: block; height: 100%; width: 0; background: currentColor; opacity: .55; }
html.md1-g #coff-section tr.md1-h24 .md1-dbar { color: var(--g-crit); } html.md1-g #coff-section tr.md1-d7 .md1-dbar { color: var(--g-warn); } html.md1-g #coff-section tr.md1-d30 .md1-dbar, html.md1-g #coff-section tr.md1-d30p .md1-dbar { color: var(--g-tx2); }
html.md1-g #coff-section .frn-heat { border-radius: 3px !important; font: 700 11.5px "JetBrains Mono", ui-monospace, monospace !important; min-width: 28px; display: inline-block; text-align: center; padding: 3px 6px !important; }
html.md1-g #coff-section .vm-btn, html.md1-g #cam-sec-cimg .vm-btn { border-radius: 6px !important; border: 1px solid var(--g-ln) !important; background: var(--g-bg) !important; }
html.md1-g #coff-section .vm-btn:hover, html.md1-g #cam-sec-cimg .vm-btn:hover { border-color: #1f62e0 !important; }

/* ===== Control de imagen ===== */
html.md1-ci #cimg-cob { display: none !important; }
.md1-cob { display: none; }
html.md1-ci .md1-cob { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 12px 14px; font: 13px/1.4 Inter, system-ui, sans-serif; }
html.md1-ci .md1-cob .c { position: relative; background: var(--g-bg); border: 1px solid var(--g-ln); border-radius: 8px; padding: 10px 14px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
html.md1-ci .md1-cob .c::before { content: ""; position: absolute; left: -1px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 2px 2px 0; background: #64748b; }
html.md1-ci .md1-cob .c.warn::before { background: var(--g-warnb); } html.md1-ci .md1-cob .c.ok::before { background: var(--g-okb); }
html.md1-ci .md1-cob small { font: 600 11px/1.2 Inter, system-ui, sans-serif; text-transform: uppercase; letter-spacing: .06em; color: var(--g-tx2); }
html.md1-ci .md1-cob b { font: 700 24px/1 "JetBrains Mono", ui-monospace, monospace; color: var(--g-tx); }
html.md1-ci .md1-cob .c.warn b { color: var(--g-warn); }
html.md1-ci .md1-cob .c span { font-size: 11.5px; color: var(--g-tx3); }
html.md1-ci .md1-cob .acc { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--g-tx2); }
html.md1-ci .md1-cob .acc strong { color: var(--g-tx); }
html.md1-ci .md1-cob .acc .btn { border-radius: 6px !important; }
html.md1-g .cimg-chip { display: inline-flex !important; align-items: center; gap: 6px; }
html.md1-g #cam-sec-cimg .cimg-th { width: 132px !important; height: 74px !important; object-fit: cover; border-radius: 6px !important; border: 1px solid var(--g-ln); display: block; }
html.md1-g #cam-sec-cimg .cimg-ph { width: 132px; min-height: 74px; border-radius: 6px !important; border: 1px dashed var(--g-ln) !important; background: var(--g-bg2) !important; font-size: 11px !important; color: var(--g-tx3) !important;
  display: flex !important; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 6px; }
html.md1-g #cam-sec-cimg td[data-label="CÁMARA"] { font: 600 13px/1.3 Inter, system-ui, sans-serif; color: var(--g-tx); }
html.md1-g #cam-sec-cimg td[data-label="CÁMARA"] .sub { display: block; font: 500 11.5px/1.3 Inter, system-ui, sans-serif; color: var(--g-tx3); margin-top: 2px; }
html.md1-g #cam-sec-cimg tr { --md1-c: #94a3b8; }
html.md1-g #cam-sec-cimg tr[data-md1t="sinvideo"], html.md1-g #cam-sec-cimg .cimg-tag.t-sinvideo { --md1-c: #e11d48; }
html.md1-g #cam-sec-cimg tr[data-md1t="sinfoto"], html.md1-g #cam-sec-cimg .cimg-tag.t-sinfoto { --md1-c: #64748b; }
html.md1-g #cam-sec-cimg tr[data-md1t="tapada"], html.md1-g #cam-sec-cimg .cimg-tag.t-tapada { --md1-c: #f59e0b; }
html.md1-g #cam-sec-cimg tr[data-md1t="movio"], html.md1-g #cam-sec-cimg .cimg-tag.t-movio { --md1-c: #2563eb; }
html.md1-g #cam-sec-cimg tr[data-md1t="desenfocada"], html.md1-g #cam-sec-cimg .cimg-tag.t-desenfocada { --md1-c: #7c3aed; }
html.md1-g #cam-sec-cimg .cimg-tag { display: inline-flex !important; align-items: center; gap: 6px; background: transparent !important; border: 0 !important; padding: 0 !important;
  font: 700 12.5px Inter, system-ui, sans-serif !important; color: var(--md1-c) !important; }
html.md1-g #cam-sec-cimg .cimg-tag::before { content: ""; width: 9px; height: 9px; border-radius: 2px; background: var(--md1-c); flex: none; }
html.md1-g #cam-sec-cimg .cimg-desc { display: block; font: 500 11.5px/1.35 Inter, system-ui, sans-serif !important; color: var(--g-tx2) !important; margin-top: 2px; }
html.md1-g #cam-sec-cimg td[data-label="MEDIDA"] { font: 500 11.5px/1.35 "JetBrains Mono", ui-monospace, monospace; color: var(--g-tx2); max-width: 220px; }
html.md1-g #cam-sec-cimg td[data-label="DESDE"] { font: 700 12.5px/1.3 Inter, system-ui, sans-serif; color: var(--g-tx); white-space: nowrap; }
html.md1-g #cam-sec-cimg .cimg-btn { border-radius: 6px !important; font: 600 12px Inter, system-ui, sans-serif !important; }
html.md1-g #cam-sec-cimg .cimg-btn.pri { background: var(--g-tx) !important; border-color: var(--g-tx) !important; color: var(--g-bg) !important; }

/* 11 nov 2026: la barrita de duración (.md1-dbar) queda solo en el listado offline (#coff-section); antes también
   pisaba la columna «Disponibilidad» de la tabla de áreas (rayita gris y % corrido). */
/* ===== celular ===== */
@media (max-width: 767.98px) {
  html.md1-g .evo-leg { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 10px !important; }
  html.md1-g .evo-l { padding: 8px 10px !important; }
  html.md1-g .evo-l b { font-size: 20px !important; }
  html.md1-ci .md1-cob { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 10px; }
  html.md1-g #cam-sec-cimg .cimg-th, html.md1-g #cam-sec-cimg .cimg-ph { width: 100% !important; max-width: 160px; height: auto !important; aspect-ratio: 16 / 9; }
  html.md1-g #coff-section .md1-dbar { margin-left: 0; }
}

/* ===== 5 nov 2026 · «E1»: totales en azul ===== */
html.md1-g { --g-tot: #2563eb; } html.md1-g[data-theme="dark"] { --g-tot: #60a5fa; }
html.md1-g .evo-l.tot b { color: var(--g-tot) !important; }
html.md1-g .evo-l.tot::before { background: var(--g-tot); }
html.md1-g .evo-grp-btn[data-grupo="tot"] .evo-grp-n, html.md1-g .evo-grp-btn[data-grupo="vp"] .evo-grp-n { color: var(--g-tot) !important; }
html.md1-g .md1-tot, html.md1-g .md1-tot > span:not(.kpi-pct) { color: var(--g-tot) !important; }
