/* ===== Portal de Capacitación — estilos (sin dependencias externas) =====
   Cambie los colores corporativos en las variables de :root */
:root {
    --primario: #16153a;      /* azul Algagicorp */
    --primario-2: #2c2b63;
    --acento: #f3961a;        /* naranja Algagicorp */
    --fondo: #f3f5f8;
    --tarjeta: #ffffff;
    --texto: #1d2733;
    --suave: #5d6b7a;
    --borde: #dde3ea;
    --ok: #1f8a4c;
    --ok-f: #e3f4ea;
    --mal: #c0392b;
    --mal-f: #fbe7e5;
    --aviso: #b7791f;
    --aviso-f: #fdf1dc;
    --info: #2b6cb0;
    --info-f: #e3eefa;
    --radio: 10px;
    --sombra: 0 1px 2px rgba(16,30,54,.06), 0 4px 14px rgba(16,30,54,.06);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    background: var(--fondo); color: var(--texto); font-size: 15px; line-height: 1.5;
    min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--primario-2); }
h1 { font-size: 1.6rem; margin: 0 0 .25rem; color: var(--primario); }
h2 { font-size: 1.2rem; margin: 1.5rem 0 .75rem; color: var(--primario); }
.sub { color: var(--suave); margin: 0 0 1.25rem; }

/* ----- Barra superior ----- */
.barra {
    display: flex; align-items: center; gap: 1.5rem; padding: .6rem 1.5rem;
    background: var(--primario); color: #fff; position: sticky; top: 0; z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,.15); flex-wrap: nowrap;
}
.marca { display: flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; }
.marca .logo {
    width: 36px; height: 36px; border-radius: 8px; background: var(--acento); color: var(--primario);
    display: grid; place-items: center; font-weight: 800; font-size: 1.2rem;
}
.marca strong { display: block; line-height: 1.1; }
.marca small { display: block; opacity: .75; font-size: .75rem; }
.menu { display: flex; gap: .25rem; flex: 1; }
.menu a { color: #dfe7f1; text-decoration: none; padding: .45rem .8rem; border-radius: 6px; white-space: nowrap; }
.menu a:hover { background: rgba(255,255,255,.1); color: #fff; }
.menu a.activo { background: rgba(255,255,255,.16); color: #fff; box-shadow: inset 0 -2px 0 var(--acento); }
.usuario { display: flex; align-items: center; gap: .9rem; font-size: .9rem; white-space: nowrap; }
.usuario a, .usuario .enlace { color: #dfe7f1; }
.usuario form { margin: 0; }
.enlace { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-decoration: underline; }

.contenido { width: 100%; max-width: 1200px; margin: 0 auto; padding: 1.75rem 1.5rem 3rem; flex: 1; }
.pie { text-align: center; color: var(--suave); font-size: .8rem; padding: 1rem; }

/* ----- Tarjetas y rejillas ----- */
.tarjeta { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: var(--radio); box-shadow: var(--sombra); padding: 1.25rem; }
.rejilla { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.kpis { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 1.5rem; }
.kpi { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: var(--radio); padding: 1rem 1.25rem; box-shadow: var(--sombra); }
.kpi b { display: block; font-size: 1.8rem; color: var(--primario); line-height: 1.2; }
.kpi span { color: var(--suave); font-size: .85rem; }

.curso { display: flex; flex-direction: column; gap: .75rem; }
.curso h3 { margin: 0; font-size: 1.1rem; color: var(--primario); }
.curso p { margin: 0; color: var(--suave); font-size: .9rem; }
.curso .pie-curso { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; }
.datos { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .85rem; color: var(--suave); }

.progreso { height: 8px; background: #e7ecf2; border-radius: 99px; overflow: hidden; }
.progreso > i { display: block; height: 100%; background: linear-gradient(90deg, var(--primario-2), var(--acento)); border-radius: 99px; }

/* ----- Etiquetas de estado ----- */
.estado { display: inline-block; padding: .15rem .6rem; border-radius: 99px; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.estado.ok { background: var(--ok-f); color: var(--ok); }
.estado.mal { background: var(--mal-f); color: var(--mal); }
.estado.aviso { background: var(--aviso-f); color: var(--aviso); }
.estado.info { background: var(--info-f); color: var(--info); }
.estado.neutro { background: #eef1f5; color: var(--suave); }

/* ----- Botones y formularios ----- */
.btn {
    display: inline-flex; align-items: center; gap: .4rem; border: 1px solid transparent; border-radius: 8px;
    padding: .55rem 1rem; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
    background: var(--primario); color: #fff; transition: background .15s;
}
.btn:hover { background: var(--primario-2); }
.btn.sec { background: #fff; color: var(--primario); border-color: var(--borde); }
.btn.sec:hover { background: #f4f7fa; }
.btn.acento { background: var(--acento); color: #1d2733; }
.btn.acento:hover { filter: brightness(.95); }
.btn.peq { padding: .3rem .65rem; font-size: .85rem; }
.btn[disabled], .btn.deshab { opacity: .5; cursor: not-allowed; pointer-events: none; }

label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: .3rem; }
input[type=text], input[type=password], input[type=date], input[type=search], select {
    width: 100%; padding: .55rem .7rem; border: 1px solid var(--borde); border-radius: 8px; font: inherit; background: #fff;
}
input:focus, select:focus { outline: 2px solid rgba(243,150,26,.35); border-color: var(--primario-2); }
.campo { margin-bottom: 1rem; }
.filtros { display: flex; gap: .75rem; align-items: flex-end; flex-wrap: wrap; margin-bottom: 1rem; }
.filtros > div { min-width: 180px; }
.validacion { color: var(--mal); font-size: .85rem; }

.alerta { padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem; border: 1px solid; }
.alerta.ok { background: var(--ok-f); border-color: #b9e2c9; color: #14663a; }
.alerta.mal { background: var(--mal-f); border-color: #f1c2bc; color: #8f2a20; }
.alerta.info { background: var(--info-f); border-color: #bcd5f0; color: #1f4e86; }
.alerta.aviso { background: var(--aviso-f); border-color: #f0d6a8; color: #7c5414; }

/* ----- Tablas ----- */
.tabla-cont { overflow-x: auto; background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); box-shadow: var(--sombra); }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { padding: .6rem .75rem; text-align: left; border-bottom: 1px solid var(--borde); vertical-align: top; }
th { background: #f6f8fb; color: var(--suave); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafbfd; }
td.num, th.num { text-align: right; }
.vacio { text-align: center; color: var(--suave); padding: 2rem; }

/* ----- Logos ----- */
.marca img { height: 30px; display: block; }
.marca .sep { width: 1px; height: 28px; background: rgba(255,255,255,.25); }
.login .logo-emp { height: 40px; max-width: 100%; margin: 0 auto 1rem; display: block; }
.login .franja { height: 4px; background: var(--acento); border-radius: 4px 4px 0 0; margin: -2rem -2rem 1.75rem; }

/* ----- Nuestra empresa ----- */
.emp-hero { text-align: center; padding: 1rem 0 1.5rem; }
.emp-hero img { height: 64px; }
.emp-bloques { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 2rem; }
@media (max-width: 800px) { .emp-bloques { grid-template-columns: 1fr; } }
.emp-bloque { border-radius: var(--radio); padding: 2rem 1.75rem; text-align: center; color: #fff; box-shadow: var(--sombra); }
.emp-bloque h2 { color: #fff; margin: 0 0 1rem; font-size: 1.5rem; }
.emp-bloque p { margin: 0; font-size: 1.05rem; line-height: 1.6; }
.emp-bloque.mision { background: var(--acento); }
.emp-bloque.vision { background: var(--primario); }
.recorrido { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; position: relative; }
.hito { text-align: center; padding: 1.25rem 1rem; background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); border-top: 4px solid var(--acento); }
.hito b { display: block; font-size: 1.7rem; color: var(--primario); }
.hito span { color: var(--suave); }

/* ----- Login ----- */
.sin-sesion { background: linear-gradient(135deg, #16153a 0%, #1f1e4d 55%, #2c2b63 100%); }
.sin-sesion .pie { color: rgba(255,255,255,.7); }
.login { max-width: 400px; margin: 8vh auto 0; }
.login .tarjeta { padding: 2rem; }
.login .encab { text-align: center; margin-bottom: 1.5rem; }
.login .btn { width: 100%; justify-content: center; padding: .7rem; }

/* ----- Curso / reproductor ----- */
.curso-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.25rem; align-items: start; }
@media (max-width: 900px) { .curso-layout { grid-template-columns: 1fr; } }
.reproductor { background: #000; border-radius: var(--radio); overflow: hidden; box-shadow: var(--sombra); }
.reproductor video { width: 100%; display: block; max-height: 70vh; background: #000; }
.lista-videos { list-style: none; margin: 0; padding: 0; }
.lista-videos li a { display: flex; gap: .75rem; align-items: center; padding: .65rem .75rem; border-radius: 8px; text-decoration: none; color: var(--texto); }
.lista-videos li a:hover { background: #f2f5f9; }
.lista-videos li.actual a { background: var(--info-f); }
.lista-videos .chk { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 700; flex: none; border: 2px solid var(--borde); color: var(--suave); }
.lista-videos .visto .chk { background: var(--ok); border-color: var(--ok); color: #fff; }
.lista-videos small { display: block; color: var(--suave); }

/* ----- Evaluación ----- */
.pregunta { margin-bottom: 1rem; }
.pregunta h3 { font-size: 1rem; margin: 0 0 .75rem; }
.pregunta h3 span { color: var(--acento); margin-right: .35rem; }
.opcion { display: flex; gap: .65rem; align-items: flex-start; padding: .6rem .8rem; border: 1px solid var(--borde); border-radius: 8px; margin-bottom: .45rem; cursor: pointer; font-weight: 400; }
.opcion:hover { background: #f6f9fc; }
.opcion input { margin-top: .25rem; }
.opcion b { color: var(--primario); }
.opcion.correcta { border-color: #9dd3b2; background: var(--ok-f); }
.opcion.incorrecta { border-color: #eeb4ac; background: var(--mal-f); }
.resultado-nota { font-size: 3rem; font-weight: 800; line-height: 1; }
.resultado-nota.ok { color: var(--ok); }
.resultado-nota.mal { color: var(--mal); }
.acciones { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; }
pre.log { white-space: pre-wrap; background: #0f1b2b; color: #d7e3f2; padding: 1rem; border-radius: 8px; font-size: .82rem; max-height: 320px; overflow: auto; }
.dos-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 800px) { .dos-col { grid-template-columns: 1fr; } }
dl.ficha { display: grid; grid-template-columns: 160px 1fr; gap: .35rem .75rem; margin: 0; }
dl.ficha dt { color: var(--suave); }
dl.ficha dd { margin: 0; font-weight: 600; }

/* =====================================================================
   NAVEGACIÓN (escritorio) + MENÚ HAMBURGUESA
   ===================================================================== */
.nav-items { display: flex; align-items: center; gap: 1.5rem; flex: 1; }
.nav-toggle, .hamburguesa { display: none; }
.hamburguesa { cursor: pointer; padding: .5rem; margin-left: auto; border-radius: 6px; }
.hamburguesa span { display: block; width: 24px; height: 2px; background: #fff; border-radius: 2px; transition: transform .2s, opacity .2s; transform-origin: center; }
.nav-toggle:checked + .hamburguesa span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle:checked + .hamburguesa span:nth-child(2) { opacity: 0; }
.nav-toggle:checked + .hamburguesa span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1400px) {
    .marca .sep, .marca > span:last-child { display: none; }
}
@media (max-width: 1200px) {
    .barra { padding: .6rem 1rem; gap: .75rem; flex-wrap: wrap; }
    .marca img { height: 24px; }
    .marca .sep, .marca small { display: none; }
    .hamburguesa { display: flex; flex-direction: column; gap: 5px; }
    .nav-items { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: .25rem; padding: .5rem 0 .25rem; border-top: 1px solid rgba(255,255,255,.15); }
    .nav-toggle:checked ~ .nav-items { display: flex; }
    .menu { flex-direction: column; gap: .15rem; }
    .menu a { padding: .7rem .75rem; font-size: 1rem; }
    .menu a.activo { box-shadow: inset 3px 0 0 var(--acento); }
    .usuario { flex-wrap: wrap; gap: .75rem 1.25rem; padding: .6rem .75rem 0; border-top: 1px solid rgba(255,255,255,.12); }
    .usuario { white-space: normal; }
    .usuario > span { width: 100%; font-weight: 600; color: #fff; }
}

/* =====================================================================
   CELULAR (≤ 700 px)
   ===================================================================== */
@media (max-width: 700px) {
    body { font-size: 15px; }
    .contenido { padding: 1.1rem .9rem 2.5rem; }
    h1 { font-size: 1.35rem; }
    h2 { font-size: 1.1rem; }
    .kpis { grid-template-columns: 1fr 1fr; gap: .6rem; }
    .kpi { padding: .75rem .9rem; }
    .kpi b { font-size: 1.45rem; }
    .rejilla { grid-template-columns: 1fr; }
    .tarjeta { padding: 1rem; }
    .curso .pie-curso { flex-direction: column; align-items: stretch; }
    .curso .pie-curso .btn { justify-content: center; }
    .filtros > div { min-width: 100% !important; flex: 1 1 100% !important; }
    .filtros .btn { width: 100%; justify-content: center; }
    .acciones .btn { flex: 1 1 100%; justify-content: center; }
    dl.ficha { grid-template-columns: 1fr !important; gap: 0; }
    dl.ficha dt { margin-top: .5rem; font-size: .82rem; }
    .resultado-nota { font-size: 2.6rem; }
    .reproductor video { max-height: none; }
    .opcion { padding: .8rem; }
    .login { margin-top: 4vh; padding: 0 .25rem; }
    .login .tarjeta { padding: 1.5rem 1.25rem; }
    .login .franja { margin: -1.5rem -1.25rem 1.5rem; }
    .emp-hero img { height: 44px; }
    .emp-bloque { padding: 1.4rem 1.1rem; }
    .emp-bloque p { font-size: .98rem; }
    .recorrido { grid-template-columns: 1fr 1fr; }
    pre.log { font-size: .75rem; }

    /* Tablas -> tarjetas apiladas (las etiquetas las agrega site.js desde el encabezado) */
    .tabla-cont { overflow: visible; background: transparent; border: 0; box-shadow: none; }
    .tabla-cont table, .tabla-cont tbody, .tabla-cont tr, .tabla-cont td { display: block; width: 100%; }
    .tabla-cont thead { display: none; }
    .tabla-cont tr { background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); box-shadow: var(--sombra); margin-bottom: .75rem; padding: .4rem 0; }
    .tabla-cont td { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; border: 0; padding: .35rem .9rem; text-align: right; white-space: normal !important; }
    .tabla-cont td::before { content: attr(data-label); font-weight: 600; color: var(--suave); font-size: .78rem; text-transform: uppercase; letter-spacing: .02em; text-align: left; flex: 0 0 42%; }
    .tabla-cont td[data-label=""]::before { display: none; }
    .tabla-cont td[data-label=""] { justify-content: flex-end; }
    .tabla-cont td.num { text-align: right; }
    .tabla-cont td.vacio { justify-content: center; }
    .tabla-cont td.vacio::before { display: none; }
    tbody tr:hover { background: #fff; }
}

/* ---------- Roles y permisos ---------- */
.form-rol { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.form-rol select { width: auto; min-width: 140px; }
.form-rol input[type=text] { flex: 1 1 160px; min-width: 140px; }
@media (max-width: 700px) {
    .form-rol { flex-direction: column; align-items: stretch; }
    .form-rol select, .form-rol input[type=text], .form-rol .btn { width: 100%; }
}

/* =====================================================================
   MÓDULO INVENTARIO TI
   ===================================================================== */
.tabs-inv { display: flex; gap: .25rem; flex-wrap: wrap; border-bottom: 1px solid var(--borde); margin: .25rem 0 1.25rem; }
.tabs-inv a { padding: .5rem .9rem; text-decoration: none; color: var(--suave); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs-inv a:hover { color: var(--primario); }
.tabs-inv a.activo { color: var(--primario); border-bottom-color: var(--acento); }

a.enlace-kpi { text-decoration: none; color: inherit; transition: transform .1s, box-shadow .1s; border-top: 3px solid var(--primario-2); }
a.enlace-kpi:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(16,30,54,.1); }
.kpi.k-mal { border-top-color: var(--mal); }
.kpi.k-mal b { color: var(--mal); }
.kpi.k-aviso { border-top-color: var(--aviso); }
.kpi.k-aviso b { color: var(--aviso); }
.kpi.k-info { border-top-color: var(--info); }
.kpi.k-info b { color: var(--info); }

.procesos { display: flex; gap: .5rem; flex-wrap: wrap; margin: -.5rem 0 .5rem; }
a.estado { text-decoration: none; }
.filtro-activo { margin: -.25rem 0 1rem; color: var(--suave); }
.txt-mal { color: var(--mal); font-weight: 600; }
.chip { display: inline-block; padding: .1rem .5rem; margin: 0 .25rem .25rem 0; background: #eef1f5; border-radius: 6px; font-size: .82rem; text-decoration: none; }
.chip:hover { background: var(--info-f); }
.fila-cerrada td { color: var(--suave); }
small.dn { font-size: .75rem; word-break: break-all; }

.encab-ficha { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.encab-ficha .sub { margin-bottom: .5rem; }

/* Métricas con barra */
.metricas { display: grid; gap: .55rem; }
.metricas > div { display: grid; grid-template-columns: 130px 1fr 56px; align-items: center; gap: .6rem; font-size: .88rem; }
.metricas span { color: var(--suave); }
.metricas b { text-align: right; }
.barra-pct { height: 10px; background: #e7ecf2; border-radius: 99px; overflow: hidden; }
.barra-pct > i { display: block; height: 100%; border-radius: 99px; }
.barra-pct .b-ok { background: var(--ok); }
.barra-pct .b-aviso { background: var(--acento); }
.barra-pct .b-mal { background: var(--mal); }

/* Gráficos SVG */
.grafico { width: 100%; height: auto; display: block; }
.grafico .g-rej { stroke: #e6ebf1; stroke-width: 1; }
.grafico .g-umbral { stroke: var(--mal); stroke-width: 1; stroke-dasharray: 5 4; opacity: .7; }
.grafico .g-eje { fill: var(--suave); font-size: 11px; font-family: inherit; }
.grafico .g-ram { fill: none; stroke: var(--primario-2); stroke-width: 2.5; stroke-linejoin: round; }
.grafico .g-cpu { fill: none; stroke: var(--acento); stroke-width: 2.5; stroke-linejoin: round; }
.grafico .g-ram-p { fill: var(--primario-2); }
.grafico .g-cpu-p { fill: var(--acento); }
.grafico .g-barra { fill: var(--primario-2); opacity: .85; }
.grafico .g-barra:hover, .grafico circle:hover { opacity: 1; stroke: #fff; stroke-width: 1.5; }
.g-leyenda { display: flex; gap: 1.25rem; flex-wrap: wrap; font-size: .82rem; color: var(--suave); margin-top: .35rem; }
.g-leyenda i { display: inline-block; width: 18px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: .4rem; }
.g-leyenda .l-ram { background: var(--primario-2); }
.g-leyenda .l-cpu { background: var(--acento); }
.g-leyenda .l-umbral { background: repeating-linear-gradient(90deg, var(--mal) 0 5px, transparent 5px 9px); }

/* Formularios del módulo */
.rejilla-form { display: grid; gap: 0 1rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
textarea { width: 100%; padding: .55rem .7rem; border: 1px solid var(--borde); border-radius: 8px; font: inherit; background: #fff; resize: vertical; }
details.desplegable > summary { cursor: pointer; font-weight: 600; color: var(--primario-2); }
details.desplegable .tabla-cont { box-shadow: none; }

@media (max-width: 700px) {
    .tabs-inv { overflow-x: auto; flex-wrap: nowrap; }
    .tabs-inv a { white-space: nowrap; padding: .5rem .7rem; }
    .metricas > div { grid-template-columns: 110px 1fr 50px; }
    .encab-ficha .acciones { width: 100%; }
}
.nw { white-space: nowrap; }

/* Franja de ambiente (solo si Portal:Ambiente tiene valor, p. ej. en Pruebas) */
.franja-ambiente { background: repeating-linear-gradient(45deg, #f3961a 0 14px, #f5a536 14px 28px); color: #16153a; text-align: center; font-weight: 700; font-size: .8rem; letter-spacing: .06em; padding: .3rem .5rem; position: sticky; top: 0; z-index: 50; }

/* =====================================================================
   REPORTES DEL INVENTARIO (pantalla e impresión)
   ===================================================================== */
.reporte { background: #fff; border: 1px solid var(--borde); border-radius: 14px; padding: 2rem 2.25rem; box-shadow: 0 2px 10px rgba(16,30,54,.05); }
.rep-encab { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; border-bottom: 3px solid var(--acento); padding-bottom: 1rem; margin-bottom: 1.25rem; }
.rep-empresa { margin: 0; color: var(--acento); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: .78rem; }
.rep-titulo { margin: .2rem 0 .2rem; font-size: 1.6rem; color: var(--primario); }
.rep-sub { margin: 0; color: var(--suave); }
.rep-ficha { display: grid; grid-template-columns: auto auto; gap: .15rem .9rem; margin: 0; font-size: .85rem; align-self: flex-start; }
.rep-ficha dt { color: var(--suave); }
.rep-ficha dd { margin: 0; font-weight: 600; }
.reporte section { margin-top: 1.6rem; }
.rep-h { display: flex; align-items: center; gap: .6rem; font-size: 1.05rem; color: var(--primario); text-transform: uppercase; letter-spacing: .05em; margin: 0 0 .6rem; }
.rep-h span { background: var(--primario); color: #fff; border-radius: 6px; padding: .1rem .45rem; font-size: .8rem; letter-spacing: 0; }
.rep-h3 { font-size: .95rem; color: var(--primario-2); margin: 1.1rem 0 .4rem; }
.rep-h3 small { color: var(--suave); font-weight: 400; }
.rep-nota { color: var(--suave); font-size: .86rem; margin: 0 0 .6rem; }
.rep-puntos { margin: 0; padding-left: 1.15rem; line-height: 1.55; }
.rep-puntos li { margin-bottom: .35rem; }
.rep-kpis { margin-top: 1.25rem; }
.rep-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .9rem; margin-bottom: .9rem; }
.rep-tabla { width: 100%; border-collapse: collapse; font-size: .86rem; margin-bottom: .5rem; }
.rep-tabla th { background: var(--primario); color: #fff; text-align: left; padding: .45rem .55rem; font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; border-bottom: 2px solid var(--acento); }
.rep-tabla td { padding: .4rem .55rem; border-bottom: 1px solid var(--borde); vertical-align: top; }
.rep-tabla tbody tr:nth-child(even) td { background: #f8fafc; }
.rep-tabla tfoot td { font-weight: 700; border-top: 2px solid var(--primario); background: #f1f4f8; }
.rep-tabla .num { text-align: right; white-space: nowrap; }
.rep-compacta { font-size: .76rem; }
.rep-tabla td:first-child { white-space: nowrap; }
.rep-supuestos td:nth-child(odd) { color: var(--suave); }
.grafico .g-valor { fill: var(--primario); font-size: 11px; font-weight: 700; }
.dist { display: flex; height: 26px; border-radius: 8px; overflow: hidden; margin: .4rem 0; }
.dist span { display: flex; align-items: center; justify-content: center; color: #fff; font-size: .75rem; font-weight: 700; }
.d-mal { background: var(--mal); } .d-ok { background: var(--ok); } .d-info { background: var(--info); } .d-aviso { background: var(--acento); } .d-neutro { background: #9aa6b5; }
.g-leyenda i.d-mal, .g-leyenda i.d-ok, .g-leyenda i.d-info, .g-leyenda i.d-aviso, .g-leyenda i.d-neutro { height: 10px; width: 10px; border-radius: 3px; }

@media print {
    @page { size: A4; margin: 14mm 12mm; }
    body { background: #fff !important; }
    header.barra, footer.pie, .franja-ambiente, .no-imprimir, .tabs-inv, .alerta { display: none !important; }
    main.contenido { padding: 0 !important; max-width: none !important; margin: 0 !important; }
    .reporte { border: 0; box-shadow: none; padding: 0; border-radius: 0; }
    .reporte section, .rep-tabla tr, .kpi { break-inside: avoid; }
    .rep-tabla thead { display: table-header-group; }
    .salto { break-before: page; }
    .kpis { gap: .5rem; }
    .kpi { box-shadow: none; border: 1px solid var(--borde); }
    * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- Monitoreo ---------- */
.tabla-monitoreo td { vertical-align: top; }
.tabla-monitoreo tr.fila-mal { background: #fff6f5; }
.tabla-monitoreo tr.fila-aviso { background: #fffaf0; }
.mon-detalle { font-size: .85rem; color: var(--suave); }
.mon-accion { font-size: .85rem; margin-top: .3rem; color: var(--texto, #1d2430); }
.kpi b.kpi-txt { font-size: 1.25rem; }
.suave { color: var(--suave); }

/* ----- Inicio: valores y accesos a módulos ----- */
.titulo-centro { text-align: center; font-size: 1.5rem; margin-top: 2rem; }
.valores { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.valor { background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); padding: 1.1rem 1rem; text-align: center; border-bottom: 4px solid var(--primario); box-shadow: var(--sombra); }
.valor b { display: block; color: var(--primario); font-size: 1.1rem; }
.valor span { display: block; color: var(--suave); font-size: .9rem; margin-top: .3rem; }
.modulos { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.modulo { display: flex; flex-direction: column; gap: .35rem; text-decoration: none; background: var(--primario); color: #fff; border-radius: var(--radio); padding: 1.25rem; box-shadow: var(--sombra); border-left: 6px solid var(--acento); transition: transform .12s; }
.modulo:hover { transform: translateY(-2px); }
.modulo b { font-size: 1.15rem; }
.modulo span { opacity: .85; font-size: .9rem; }
.modulo em { font-style: normal; align-self: flex-start; background: var(--acento); color: #1d2733; border-radius: 99px; padding: .1rem .6rem; font-size: .8rem; font-weight: 600; }
.submenu-mod { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.submenu-mod a { text-decoration: none; padding: .35rem .8rem; border-radius: 99px; border: 1px solid var(--borde); background: #fff; color: var(--primario); font-size: .9rem; }
.submenu-mod a.activo { background: var(--primario); color: #fff; border-color: var(--primario); }
textarea, input[type=email], input[type=file] { width: 100%; padding: .55rem .7rem; border: 1px solid var(--borde); border-radius: 8px; font: inherit; background: #fff; }
textarea { min-height: 110px; resize: vertical; }
.ayuda { color: var(--suave); font-size: .82rem; margin-top: .25rem; display: block; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
pre.informe { white-space: pre-wrap; background: #f6f8fb; border: 1px solid var(--borde); border-radius: 8px; padding: .75rem; font-size: .82rem; max-height: 320px; overflow: auto; }
