/* PrediMant · demo. Lenguaje visual alineado con SistemaComercialWeb:
   tokens claro/oscuro, tarjetas KPI con barra lateral, paneles con encabezado, Segoe UI. */
:root {
  --bg: #f2f6fb; --surface: #ffffff; --surface-2: #eef3f9; --surface-hover: #e7eff8; --surface-active: #d8ebf7;
  --border: #dde6f0; --border-strong: #c4d4e4;
  --text: #0c2031; --text-secondary: #2c4761; --text-muted: #46627c; --text-dim: #5b7286; --text-faint: #8598ab;
  --accent: #0369a1; --accent-strong: #075985; --accent-2: #0891b2;
  --btn-bg: #0369a1; --btn-bg-hover: #075985; --shadow-glow: rgba(3, 105, 161, .18);
  --ok: #16a34a; --warn: #d97706; --bad: #dc2626; --info: #0891b2; --slate: #64748b;
  --c-blue: #3b82f6; --c-indigo: #6366f1; --c-teal: #14b8a6; --c-amber: #f59e0b; --c-purple: #8b5cf6;
  --grid: rgba(12, 32, 49, .07);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}
html.dark {
  --bg: #07121f; --surface: #0c1c30; --surface-2: #0a1828; --surface-hover: #16304d; --surface-active: #1d4f7d;
  --border: #14253d; --border-strong: #21405f;
  --text: #f1f7fc; --text-secondary: #b3d2ea; --text-muted: #93bbdf; --text-dim: #6b93b8; --text-faint: #4a6c8a;
  --accent: #38bdf8; --accent-strong: #0ea5e9; --accent-2: #22d3ee;
  --btn-bg: #155e8a; --btn-bg-hover: #1d7ab0; --shadow-glow: rgba(56, 189, 248, .22);
  --ok: #4ade80; --warn: #fbbf24; --bad: #f87171; --info: #22d3ee;
  --grid: rgba(241, 247, 252, .07);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { font-size: 14px; line-height: 1.45; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; cursor: pointer; }
svg { stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ------------------------------------------------------------ layout */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 248px; flex: none; background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.logo { display: flex; align-items: center; gap: 10px; padding: 14px; border-bottom: 1px solid var(--border); }
.logo-ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: linear-gradient(135deg, #0369a1, #0c4a6e); box-shadow: 0 0 10px rgba(3,105,161,.35); }
.logo-ico svg { width: 20px; height: 20px; stroke: #fff; stroke-width: 2.2; }
.logo b { display: block; font-size: 14px; line-height: 1.2; }
.logo small { display: block; font-size: 10.5px; color: var(--text-dim); }
.nav { padding: 10px 8px; display: grid; gap: 2px; flex: 1; align-content: start; }
.nav-sec { font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); padding: 10px 10px 4px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text-secondary); font-size: 13.5px; transition: background-color .15s; }
.nav a svg { width: 18px; height: 18px; color: var(--text-dim); }
.nav a:hover { background: var(--surface-hover); }
.nav a.activa { background: var(--surface-active); color: var(--accent-strong); font-weight: 600; }
html.dark .nav a.activa { color: var(--text); }
.nav a.activa svg { color: var(--accent); }
.side-pie { border-top: 1px solid var(--border); padding: 12px 14px; font-size: 12px; color: var(--text-dim); display: grid; gap: 4px; }
.side-estado { display: flex; align-items: center; gap: 8px; color: var(--text-secondary); font-weight: 500; }
.side-estado i { width: 8px; height: 8px; border-radius: 50%; background: var(--text-faint); }
.side-estado i.ok { background: var(--ok); }
.principal { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; height: 56px; display: flex; align-items: center; gap: 12px; padding: 0 20px; background: var(--surface); border-bottom: 1px solid var(--border); }
.tb-tit { min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.tb-tit b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-tit small { font-size: 11px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-der { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.vivo { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-dim); padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); }
.vivo i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-faint); }
.vivo.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.vivo.ok i { background: var(--ok); animation: pulso 1.8s infinite; }
@keyframes pulso { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 55%, transparent); } 70% { box-shadow: 0 0 0 6px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.seg { display: inline-flex; padding: 2px; border-radius: 8px; background: var(--surface-2); }
.seg button { border: 0; background: transparent; color: var(--text-dim); font-size: 12px; font-weight: 500; padding: 4px 10px; border-radius: 6px; }
.seg button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.icono-btn { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border); background: transparent; color: var(--text-dim); display: grid; place-items: center; }
.icono-btn:hover { background: var(--surface-hover); }
.icono-btn svg { width: 17px; height: 17px; }
main { padding: 20px; outline: none; max-width: 1400px; width: 100%; }
.tabbar { display: none; }

@media (max-width: 899px) {
  .sidebar { display: none; }
  .topbar { padding: 0 14px; }
  .vivo { display: none; }
  main { padding: 14px 14px 84px; }
  .tabbar { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; z-index: 30; left: 0; right: 0; bottom: 0;
    background: var(--surface); border-top: 1px solid var(--border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { display: grid; justify-items: center; gap: 2px; font-size: 10.5px; color: var(--text-dim); padding: 4px 0; border-radius: 8px; }
  .tabbar a svg { width: 20px; height: 20px; }
  .tabbar a.activa { color: var(--accent); font-weight: 600; }
}

/* ------------------------------------------------------------ piezas */
.cab { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-title { font-size: 20px; font-weight: 700; }
.page-sub { font-size: 12.5px; color: var(--text-dim); margin-top: 2px; }
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 16px; }
@media (min-width: 760px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1180px) { .kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.kpi { position: relative; overflow: hidden; border-radius: 16px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); }
.kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--k, var(--c-blue)); }
.kpi-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 8px;
  color: var(--k, var(--c-blue)); background: color-mix(in srgb, var(--k, var(--c-blue)) 14%, transparent); }
.kpi-ico svg { width: 18px; height: 18px; }
.kpi-v { font-size: 24px; font-weight: 700; line-height: 1.05; font-variant-numeric: tabular-nums; }
.kpi-l { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-dim); margin-top: 6px; }
.kpi-s { font-size: 12px; color: var(--text-faint); margin-top: 1px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px; }
.panel-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.panel-t { font-size: 14px; font-weight: 600; }
.panel-s { font-size: 12px; color: var(--text-dim); margin-top: 1px; }
.form-label { display: block; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); margin: 4px 0 -2px; }
.form-input { width: 100%; font: inherit; font-size: 14px; padding: 8px 12px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--text); }
.form-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.btn-pri, .btn-sec { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 8px; font-size: 13.5px; font-weight: 500; transition: all .2s; }
.btn-pri { background: var(--btn-bg); border: 1px solid var(--btn-bg-hover); color: #fff; }
.btn-pri:hover { background: var(--btn-bg-hover); box-shadow: 0 0 12px var(--shadow-glow); }
.btn-sec { background: transparent; border: 1px solid var(--border-strong); color: var(--text-muted); }
.btn-sec:hover { background: var(--surface-hover); }
.btn-pri:disabled, .btn-sec:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn-pri svg, .btn-sec svg { width: 16px; height: 16px; }
.fila-btn { display: flex; gap: 8px; flex-wrap: wrap; }
.fila-btn.der { justify-content: flex-end; margin-top: 6px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; border: 1px solid transparent; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-normal { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.b-atencion { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.b-critico { color: var(--bad); background: color-mix(in srgb, var(--bad) 11%, transparent); border-color: color-mix(in srgb, var(--bad) 25%, transparent); }
.b-calibrando, .b-mantenimiento { color: var(--info); background: color-mix(in srgb, var(--info) 12%, transparent); border-color: color-mix(in srgb, var(--info) 25%, transparent); }
.progreso { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progreso i { display: block; height: 100%; border-radius: 999px; transition: width .6s, background .6s; }
.dos { display: grid; gap: 16px; }
@media (min-width: 1080px) { .dos { grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr); align-items: start; } }
.grid { display: grid; gap: 16px; align-content: start; }

/* ------------------------------------------------------------ máquinas */
.maquinas { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.mq { position: relative; display: block; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 14px 14px 12px 18px; transition: border-color .15s, box-shadow .15s; }
.mq::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--slate); }
.mq.normal::before { background: var(--ok); } .mq.atencion::before { background: var(--warn); }
.mq.critico::before { background: var(--bad); } .mq.calibrando::before, .mq.mantenimiento::before { background: var(--info); }
.mq:hover { border-color: var(--border-strong); box-shadow: 0 4px 16px rgba(12,32,49,.06); }
.mq.critico { border-color: color-mix(in srgb, var(--bad) 40%, var(--border)); }
.mq-top { display: flex; align-items: center; gap: 10px; padding-right: 26px; }
.mq-ico { width: 36px; height: 36px; flex: none; border-radius: 10px; display: grid; place-items: center; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.mq-ico svg { width: 20px; height: 20px; }
.mq-n { font-weight: 600; font-size: 14px; line-height: 1.2; }
.mq-t { font-size: 11.5px; color: var(--text-dim); }
.mq-falla { font-size: 12.5px; color: var(--text-secondary); min-height: 1.3em; margin-top: 8px; }
.mq-prob { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-dim); margin: 8px 0 4px; }
.mq-prob b { color: var(--text); font-weight: 600; }
.mq .badge { margin-top: 10px; }
.mq canvas.spark { width: 100%; height: 30px; display: block; margin-top: 8px; }
.mq-datos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.mq-datos div { background: var(--surface-2); border-radius: 8px; padding: 5px 8px; }
.mq-datos small { display: block; font-size: 9.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-faint); }
.mq-datos span { font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.quitar { position: absolute; top: 10px; right: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text-dim); border-radius: 8px; width: 26px; height: 26px; display: grid; place-items: center; }
.quitar svg { width: 14px; height: 14px; }
.nueva { display: grid; place-items: center; align-content: center; gap: 6px; min-height: 160px; border: 1.5px dashed var(--border-strong); border-radius: 16px; background: transparent; color: var(--text-dim); font-size: 13px; }
.nueva svg { width: 22px; height: 22px; }

/* ------------------------------------------------------------ listas */
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fila { display: flex; align-items: center; gap: 10px; border-radius: 12px; padding: 9px 10px; background: var(--surface-2); }
.fila-ico { width: 34px; height: 34px; flex: none; border-radius: 9px; display: grid; place-items: center; color: var(--f, var(--accent)); background: color-mix(in srgb, var(--f, var(--accent)) 15%, transparent); }
.fila-ico svg { width: 17px; height: 17px; }
.fila-c { flex: 1; min-width: 0; }
.fila-c b { display: block; font-size: 13px; font-weight: 600; }
.fila-c small { display: block; font-size: 11.5px; color: var(--text-dim); }
.fila-x { font-size: 11px; color: var(--text-faint); white-space: nowrap; align-self: flex-start; }
.vacio { text-align: center; color: var(--text-faint); font-size: 13px; padding: 24px 0; }

/* ------------------------------------------------------------ detalle */
.volver { display: inline-flex; gap: 6px; align-items: center; color: var(--text-dim); font-size: 13px; margin-bottom: 10px; }
.volver svg { width: 16px; height: 16px; }
.det-cab { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-secondary); border-radius: 8px; padding: 6px 10px; font-size: 12.5px; }
.chip:hover { background: var(--surface-hover); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.descr { font-size: 12.5px; color: var(--text-dim); }
.graficas { display: grid; gap: 16px; }
@media (min-width: 760px) { .graficas { grid-template-columns: 1fr 1fr; } }
.graf canvas { width: 100%; height: 180px; display: block; }
.leyenda { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--text-dim); margin-top: 6px; }
.leyenda i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; vertical-align: -1px; margin-right: 5px; }
.huella { width: 100%; border-collapse: collapse; font-size: 13px; }
.huella th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-dim); padding: 0 4px 6px; }
.huella th:last-child, .huella td:last-child { text-align: right; }
.huella td { padding: 7px 4px; border-top: 1px solid var(--border); font-variant-numeric: tabular-nums; color: var(--text-secondary); }
.huella td:last-child { font-weight: 600; color: var(--text); }
.huella tr.alta td:last-child { color: var(--bad); }
.huella small { color: var(--text-faint); }
.probs { display: grid; gap: 10px; }
.prob-h { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 4px; }
.prob-h span { color: var(--text-dim); } .prob-h b { font-weight: 600; }
.diag { position: relative; overflow: hidden; }
.diag::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--bad); }
.diag.atencion::before { background: var(--warn); }
.diag.sano::before { background: var(--ok); }
.diag.info::before { background: var(--info); }
.diag-h { display: flex; align-items: center; gap: 10px; margin: 4px 0 6px; }
.diag-h .fila-ico { --f: var(--bad); }
.diag.atencion .diag-h .fila-ico { --f: var(--warn); }
.diag.sano .diag-h .fila-ico { --f: var(--ok); }
.diag.info .diag-h .fila-ico { --f: var(--info); }
.diag-h h2 { font-size: 16px; font-weight: 700; }
.etq { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); margin: 14px 0 6px; }
.diag p.txt { color: var(--text-secondary); }
.diag ol, .diag ul { margin: 0; padding-left: 1.2em; color: var(--text-secondary); }
.diag li { margin: 3px 0; }
.cifras { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.cifra { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.cifra small { display: block; font-size: 10.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 2px; }
.cifra b { font-size: 14px; font-weight: 700; }
.cifra.ahorro { grid-column: 1 / -1; background: color-mix(in srgb, var(--ok) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--ok) 25%, transparent); }
.cifra.ahorro b { font-size: 20px; color: var(--ok); }
.nota { font-size: 11.5px; color: var(--text-faint); margin-top: 10px; }
.det-dos .acciones { display: grid; gap: 12px; }

/* ------------------------------------------------------------ arquitectura */
.arq svg { width: 100%; height: auto; display: block; }
.arq .caja rect { fill: var(--surface); stroke-width: 2; }
.arq text, .arq circle { stroke: none; }
.arq text { fill: var(--text); font-size: 14.5px; font-family: "Segoe UI", system-ui, sans-serif; }
.arq .sub { fill: var(--text-dim); font-size: 12px; }
.arq .num { font-weight: 700; font-size: 13.5px; fill: var(--accent); }
.arq .linea { fill: none; stroke-width: 2.5; }
.arq.parado .pt { display: none; }
.arq .apagado rect { stroke-dasharray: 6 5; opacity: .45; }
.laptops { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.lap { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 14px 14px 14px 18px; }
.lap::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--ok); }
.lap.off::before { background: var(--bad); }
.lap-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.lap b { font-size: 14px; }
.lap ul { margin: 8px 0 10px; padding-left: 1.1em; font-size: 12.5px; color: var(--text-secondary); }

/* ------------------------------------------------------------ presentador */
.pres { display: grid; gap: 16px; }
@media (min-width: 1080px) { .pres { grid-template-columns: 1.7fr 1fr; } }
.gigantes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.gigante .kpi-v { font-size: clamp(28px, 4vw, 44px); }
.qr { text-align: center; }
.qr .panel-h { text-align: left; }
.qr img { width: min(250px, 70vw); background: #fff; padding: 10px; border-radius: 12px; border: 1px solid var(--border); }
.qr p { word-break: break-all; color: var(--text-dim); font-size: 12.5px; margin-top: 8px; }
.mini { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.mini a { position: relative; overflow: hidden; background: var(--surface-2); border-radius: 10px; padding: 8px 10px 8px 14px; font-size: 12px; color: var(--text-secondary); }
.mini a::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--ok); }
.mini a.atencion::before { background: var(--warn); } .mini a.critico::before { background: var(--bad); } .mini a.calibrando::before { background: var(--info); }
.mini b { display: block; color: var(--text); font-size: 13px; }

/* ------------------------------------------------------------ cómo funciona */
.pasos { display: grid; gap: 12px; }
@media (min-width: 760px) { .pasos { grid-template-columns: repeat(3, 1fr); } }
.paso .kpi-ico { --k: var(--accent); }
.paso h3 { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.tabla { width: 100%; border-collapse: collapse; font-size: 13px; }
.tabla th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-dim); padding: 0 8px 8px; }
.tabla td { padding: 9px 8px; border-top: 1px solid var(--border); vertical-align: top; color: var(--text-secondary); }
.tabla td b { color: var(--text); }

/* ------------------------------------------------------------ diálogos / toast */
dialog { border: 1px solid var(--border); border-radius: 16px; padding: 0; width: min(420px, calc(100vw - 32px)); background: var(--surface); color: var(--text); box-shadow: 0 24px 60px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(7, 18, 31, .55); }
dialog form { padding: 18px; display: grid; gap: 10px; }
dialog h3 { font-size: 16px; font-weight: 700; }
dialog p { color: var(--text-dim); font-size: 13px; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%) translateY(160%); background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 10px 16px; border-radius: 10px; z-index: 50; max-width: calc(100vw - 32px); transition: transform .25s; font-size: 13px; }
.toast:not(.ver) { visibility: hidden; }
.toast.ver { transform: translateX(-50%) translateY(0); }
@media (max-width: 899px) { .toast { bottom: 86px; } }
.oculto { display: none !important; }
.cargando { padding: 40px 0; text-align: center; color: var(--text-faint); }

/* en pantallas angostas: diagnóstico, luego acciones y después las gráficas */
@media (max-width: 1079px) {
  .det-dos > section, .det-dos > aside { display: contents; }
  .det-dos #d-diag { order: 1; } .det-dos .acciones { order: 2; } .det-dos .graficas { order: 3; } .det-dos aside > .panel:not(.acciones) { order: 4; }
}
