:root {
  --gv-primario: #1f4e79;
  --gv-lateral: #10263d;
  --gv-fondo: #f4f6f9;
}

body { background: var(--gv-fondo); }

.gv-navbar { background: var(--gv-primario); }
.gv-navbar .navbar-brand { font-weight: 600; letter-spacing: .2px; }

/* Bootstrap fuerza fondo transparente en .offcanvas-lg; se reafirma el color del menú. */
.gv-lateral { background-color: var(--gv-lateral) !important; color: #cfd8e3; }
@media (min-width: 992px) {
  .gv-lateral { width: 250px; min-height: calc(100vh - 56px); position: sticky; top: 56px; align-self: flex-start; }
}
.gv-lateral .offcanvas-body { flex-direction: column; }
.gv-lateral .seccion { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #7f93a8; margin: 1rem 0 .3rem .75rem; }
.gv-lateral .nav-link { color: #cfd8e3; border-radius: .4rem; padding: .45rem .75rem; font-size: .92rem; }
.gv-lateral .nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.gv-lateral .nav-link.active { background: #2e86c1; color: #fff; }
.gv-lateral .nav-link i { width: 1.4rem; display: inline-block; }

.gv-contenido { min-width: 0; }

.kpi { border: 0; border-left: 4px solid var(--gv-primario); }
.kpi .valor { font-size: 1.75rem; font-weight: 700; line-height: 1.1; }
.kpi .etiqueta { font-size: .78rem; color: #6c757d; text-transform: uppercase; letter-spacing: .04em; }
.kpi.peligro { border-left-color: #b42318; }
.kpi.alerta { border-left-color: #e8590c; }
.kpi.exito { border-left-color: #2f9e44; }
.kpi.info { border-left-color: #2e86c1; }

.grafica { position: relative; height: 280px; }
.grafica.alta { height: 340px; }

.badge.nivel-critica { background: #b42318; }
.badge.nivel-alta { background: #e8590c; }
.badge.nivel-media { background: #e0a800; color: #212529; }
.badge.nivel-baja { background: #2f9e44; }
.badge.nivel-sin { background: #adb5bd; color: #212529; }

.tabla-compacta td, .tabla-compacta th { font-size: .88rem; vertical-align: middle; }
.texto-corto { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.linea-tiempo { border-left: 2px solid #dee2e6; margin-left: .5rem; padding-left: 1rem; }
.linea-tiempo .evento { position: relative; margin-bottom: 1rem; }
.linea-tiempo .evento::before { content: ""; position: absolute; left: -1.38rem; top: .35rem; width: .7rem; height: .7rem; border-radius: 50%; background: #2e86c1; }

.nist-tarjeta h6 { color: var(--gv-primario); }
.crudo { max-height: 420px; overflow: auto; font-size: .78rem; background: #0f1b2a; color: #d6e2f0; }

.login-fondo { min-height: 100vh; background: linear-gradient(135deg, #10263d, #1f4e79 60%, #2e86c1); }

@media print {
  .no-imprimir, .gv-navbar, .gv-lateral { display: none !important; }
  body { background: #fff; }
  .card { break-inside: avoid; }
  .grafica { height: 240px; }
}
