/* =============================================================================
   NORMASUITE · MARCA (05-10-2026)
   -----------------------------------------------------------------------------
   Pedido del propietario: usar en toda la interfaz el logo, el nombre, los
   colores, las letras y los efectos del afiche «Todo conectado. Ese es el poder».

   · Logo: nucleo/public/marca/normasuite-logo*.svg (vectorizado del logo
     oficial; el azul y el turquesa son los del logo: #00254A y #009596).
   · Letras: Montserrat (texto y títulos) y Barlow Condensed (rótulos en
     mayúsculas). Van dentro de la suite (marca/fuentes), sin pedir nada a
     internet. Licencia OFL: marca/fuentes/LICENCIA-FUENTES.txt.
   · Colores del afiche: azul noche de fondo, cian del «poder», y un color por
     módulo (SG-SST azul, Talento Humano naranja, Calidad/ISO violeta, PESV
     verde, Administrativo turquesa). El amarillo es solo para el llamado
     principal.
   · Efectos: barra superior azul noche con la cinta de neón de los módulos,
     brillos suaves al acercarse y tarjetas con borde del color del módulo.

   Se carga la ÚLTIMA en cada página: solo cambia colores, letras y sombras.
   No toca medidas ni posiciones, para no mover ninguna pantalla aprobada.
   Reglas de rendimiento de la suite: sin backdrop-filter; lo que se anima es
   opacidad, transformación o el desfase de un trazo.
   ============================================================================= */

/* ---------- letras ---------- */
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 400; font-display: swap; src: url("marca/fuentes/montserrat-regular.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: italic; font-weight: 400; font-display: swap; src: url("marca/fuentes/montserrat-italic.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 500; font-display: swap; src: url("marca/fuentes/montserrat-medium.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap; src: url("marca/fuentes/montserrat-semibold.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 700; font-display: swap; src: url("marca/fuentes/montserrat-bold.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 800; font-display: swap; src: url("marca/fuentes/montserrat-extrabold.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 900; font-display: swap; src: url("marca/fuentes/montserrat-black.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("marca/fuentes/barlow-condensed-semibold.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("marca/fuentes/barlow-condensed-bold.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 800; font-display: swap; src: url("marca/fuentes/barlow-condensed-extrabold.woff2") format("woff2"); }

/* ---------- fichas de la marca ---------- */
:root {
  --marca-noche: #021331;
  --marca-azul: #00254A;
  --marca-azul-2: #0A3A78;
  --marca-turquesa: #009596;
  --marca-turquesa-2: #14B8B5;
  --marca-cian: #22D3EE;
  --marca-cian-2: #00B8E6;
  --marca-amarillo: #FFD21F;
  --marca-amarillo-2: #FFB800;

  /* un color por módulo, los del afiche */
  --marca-sst: #1E6BFF;
  --marca-th: #FF8A00;
  --marca-iso: #8B5CF6;
  --marca-pesv: #22C55E;
  --marca-admin: #14B8A6;
  --marca-mediciones: #0EA5E9;
  --marca-auditorias: #D946EF;
  --marca-gedoc: #6366F1;
  --marca-ambiental: #65A30D;
  --marca-ruc: #F43F5E;

  /* la cinta de neón: todos los módulos conectados */
  --marca-cinta: linear-gradient(90deg, var(--marca-sst), var(--marca-cian) 18%, var(--marca-pesv) 38%,
    var(--marca-amarillo) 52%, var(--marca-th) 64%, var(--marca-iso) 82%, var(--marca-admin));
  --marca-fondo-oscuro:
    radial-gradient(120% 260% at 0% 0%, rgba(34, 211, 238, .16), transparent 42%),
    radial-gradient(90% 240% at 100% 100%, rgba(139, 92, 246, .14), transparent 45%),
    linear-gradient(100deg, var(--marca-noche) 0%, var(--marca-azul) 48%, #06306A 100%);

  --fuente: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --fuente-rotulo: "Barlow Condensed", "Arial Narrow", "Segoe UI", sans-serif;

  /* el color del módulo de la página (lo fija data-modulo en <html>) */
  --mod: var(--marca-turquesa);
  --mod-tinta: color-mix(in srgb, var(--mod) 72%, #000);
  --mod-suave: color-mix(in srgb, var(--mod) 10%, #fff);

  /* tokens de los módulos y del hub, al azul y turquesa del logo */
  --navy: var(--marca-azul);
  --navy-h: var(--marca-azul-2);
  --teal: var(--marca-turquesa);
  --blue: var(--marca-sst);
  --ns-navy: var(--marca-azul);
  --ns-navy-2: var(--marca-azul-2);
  --ns-blue: var(--marca-sst);
  --ns-green: var(--marca-turquesa);
  --ns-green-dark: #007A7B;
}
html[data-modulo="hub"]            { --mod: var(--marca-turquesa); }
html[data-modulo="sgsst"]          { --mod: var(--marca-sst); }
html[data-modulo="th"]             { --mod: var(--marca-th); }
html[data-modulo="sgi"]            { --mod: var(--marca-iso); }
html[data-modulo="pesv"]           { --mod: var(--marca-pesv); }
html[data-modulo="administrativo"] { --mod: var(--marca-admin); }
html[data-modulo="mediciones"]     { --mod: var(--marca-mediciones); }
html[data-modulo="auditorias"]     { --mod: var(--marca-auditorias); }
html[data-modulo="gedoc"]          { --mod: var(--marca-gedoc); }
html[data-modulo="ambiental"]      { --mod: var(--marca-ambiental); }

body {
  font-family: var(--fuente);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
:focus-visible { outline-color: var(--marca-cian-2); }
::selection { background: color-mix(in srgb, var(--marca-cian) 35%, #fff); color: var(--marca-azul); }

/* ---------- el logo ---------- */
.ns-marca { display: block; height: 30px; width: auto; flex: none; user-select: none; -webkit-user-drag: none; }
.ns-marca.grande { height: 44px; }

/* =============================================================================
   BARRA SUPERIOR DE LOS MÓDULOS · azul noche, logo blanco, cinta de neón
   ============================================================================= */
.topbar {
  background: var(--marca-fondo-oscuro);
  color: #fff; border-bottom: 0;
  box-shadow: 0 8px 24px -12px rgba(2, 19, 49, .65);
}
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px;
  background: var(--marca-cinta); opacity: 1; pointer-events: none;
  box-shadow: 0 0 10px rgba(34, 211, 238, .55), 0 0 2px rgba(255, 255, 255, .4);
}
.topbar .brand { color: #fff; }
.topbar .hamburger { color: #fff; }
.topbar .hamburger:hover { background: rgba(255, 255, 255, .12); }

/* el sello del módulo: píldora de neón en el color del módulo */
.topbar .mod-badge {
  font-family: var(--fuente-rotulo); font-weight: 700; font-size: 14px; letter-spacing: .03em; text-transform: uppercase;
  color: #fff; background: color-mix(in srgb, var(--mod) 22%, transparent);
  border: 1.5px solid color-mix(in srgb, var(--mod) 85%, #fff);
  box-shadow: 0 0 14px color-mix(in srgb, var(--mod) 55%, transparent), inset 0 0 10px color-mix(in srgb, var(--mod) 30%, transparent);
  border-radius: 999px;
}
/* Nada de la barra se parte en dos renglones: si falta espacio, el sello se recorta con puntos suspensivos. */
.topbar .tb-left { min-width: 0; flex: 1 1 auto; }
.topbar .tb-right { flex: none; }
.topbar .mod-badge { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
.topbar .tb-label, .topbar .suite-sel, .topbar .suite-salir, .topbar .tb-hub { white-space: nowrap; }
.topbar .mod-badge { font-size: 13.5px; }
@media (max-width: 1600px) { .topbar .company-sel { min-width: 220px; max-width: 280px; } }
/* En el teléfono la barra ya se parte en dos filas (styles.css de cada módulo): la segunda ocupa todo el ancho. */
@media (max-width: 900px) {
  .topbar .tb-right { flex: 1 1 100%; flex-wrap: wrap; min-width: 0; }
  .topbar .company-sel { min-width: 0; max-width: none; flex: 1 1 100%; }
  .ns-marca { height: 26px; }
}
.topbar a.mod-badge:hover { background: color-mix(in srgb, var(--mod) 38%, transparent); }

.topbar .tb-label { color: rgba(226, 232, 240, .78); }
.topbar .company-sel, .topbar .tb-hub, .topbar .suite-sel, .topbar .suite-salir {
  background: rgba(255, 255, 255, .07); color: #fff;
  border: 1px solid rgba(255, 255, 255, .22);
}
.topbar .company-sel:hover, .topbar .tb-hub:hover, .topbar .suite-sel:hover, .topbar .suite-salir:hover {
  background: rgba(255, 255, 255, .13); color: #fff; border-color: color-mix(in srgb, var(--marca-cian) 70%, transparent);
  box-shadow: 0 0 12px rgba(34, 211, 238, .35);
}
.topbar select option { background: var(--marca-azul); color: #fff; }
.topbar .avatar {
  background: linear-gradient(135deg, var(--marca-turquesa), var(--marca-cian-2)); color: #fff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .28), 0 0 16px rgba(34, 211, 238, .45);
}

/* =============================================================================
   MENÚ LATERAL · lo activo en el color del módulo, con brillo
   ============================================================================= */
.nav-item.active, .s-item.active, .side-link.active { background: var(--mod-suave); color: var(--mod-tinta); }
.s-item.active .code, .s-item.active .name { color: var(--mod-tinta); }
.nav-item.active::before, .s-item.active::before { background: var(--mod); box-shadow: 0 0 8px var(--mod); }
.g-head .g-ico { background: var(--mod-suave); color: var(--mod-tinta); }
/* El tablero del menú va en azul noche con letra blanca (el tema 2026 lo dejaba con letra blanca sobre fondo claro). */
.nav-item.dash-item.active {
  background: linear-gradient(135deg, var(--marca-azul), var(--marca-azul-2)); color: #fff;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--mod) 45%, transparent), 0 10px 20px -12px color-mix(in srgb, var(--mod) 80%, transparent);
}
.nav-item.dash-item.active b, .nav-item.dash-item.active .g-ico { color: #fff; }
.nav-group-title { font-family: var(--fuente-rotulo); font-size: 12px; letter-spacing: .08em; }

/* =============================================================================
   ÍCONOS DE LA BARRA LATERAL (06-10-2026) · nucleo/public/iconos.js
   Línea en dos tonos (Phosphor): el trazo en el color del texto y la capa clara en el color del módulo.
   Animación sobria: al acercarse el ícono se levanta y gira apenas, y su capa clara se enciende; en la opción
   activa la capa «respira» despacio. Nada salta ni parpadea.
   ============================================================================= */
.nsi { display: inline-grid; place-items: center; flex: none; width: 22px; height: 22px; margin-right: 9px; vertical-align: -5px; color: var(--mod-tinta, #334155); }
.nsi.nsi-chico { width: 16px; height: 16px; margin-right: 6px; vertical-align: -3px; }
.nsi-svg { width: 19px; height: 19px; fill: currentColor; transform-origin: 50% 60%;
  transition: transform .32s cubic-bezier(.34, 1.56, .64, 1), filter .25s ease; }
.nsi-chico .nsi-svg { width: 15px; height: 15px; }
.nsi-svg .nsi-d { fill: var(--mod, currentColor); opacity: .24; transition: opacity .25s ease; }
/* Los grupos: el ícono en su cajita del color del módulo. */
.g-head:has(.g-ico.nsi) { grid-template-columns: 30px 1fr 16px; }
.g-head .g-ico.nsi { width: 30px; height: 30px; margin-right: 0; border-radius: 9px; background: var(--mod-suave); color: var(--mod-tinta);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mod) 18%, transparent); transition: box-shadow .25s ease, background .25s ease; }
.g-head .g-ico.nsi .nsi-svg { width: 18px; height: 18px; }
.g-head:hover .g-ico.nsi { background: color-mix(in srgb, var(--mod) 16%, #fff); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mod) 35%, transparent), 0 4px 12px -4px color-mix(in srgb, var(--mod) 55%, transparent); }
.nav-item .g-ico.nsi { background: none; width: 22px; height: 22px; }
/* Al acercarse. */
:is(.nav-item, .g-head, .side-link, .ev-side > a, .s-item):hover .nsi-svg { transform: translateY(-1px) scale(1.12) rotate(-6deg); filter: drop-shadow(0 2px 3px color-mix(in srgb, var(--mod) 35%, transparent)); }
:is(.nav-item, .g-head, .side-link, .ev-side > a, .s-item):hover .nsi-svg .nsi-d { opacity: .5; }
/* La opción activa: el color del módulo y la capa clara respirando. */
:is(.nav-item.active, .side-link.active, .ev-side > a.activo) .nsi { color: var(--mod-tinta); }
:is(.nav-item.active, .side-link.active, .ev-side > a.activo) .nsi-svg .nsi-d { animation: nsiRespira 2.6s ease-in-out infinite; }
@keyframes nsiRespira { 0%, 100% { opacity: .22; } 50% { opacity: .62; } }
/* El tablero activo va en azul noche: ícono blanco. */
.nav-item.dash-item.active .nsi, .nav-item.dash-item.active .g-ico.nsi { color: #fff; }
.nav-item.dash-item.active .nsi-svg .nsi-d { fill: var(--marca-cian); }
/* La flecha de los grupos gira al abrirse. */
.nsi-flecha { display: inline-grid; place-items: center; font-style: normal; color: #94a3b8; }
.nsi-flecha .nsi-svg { width: 12px; height: 12px; transition: transform .25s cubic-bezier(.2, 0, 0, 1); }
.nsi-flecha .nsi-svg .nsi-d { display: none; }
.nsi-flecha.abierta .nsi-svg { transform: rotate(90deg); }
.g-head:hover .nsi-flecha { color: var(--mod-tinta); }
/* El texto con su ícono va en un solo <span> (no rompe botones con display:grid). */
.nsi-txt { display: inline; }
/* Íconos en línea con el texto (los que reemplazan los emojis de títulos, botones, sellos y avisos). */
.nsi-t { display: inline-flex; align-items: center; justify-content: center; width: 1.18em; height: 1.18em; vertical-align: -0.2em; margin-right: .18em; flex: none; }
.nsi-t .nsi-svg { width: 100%; height: 100%; }
.nsi-t .nsi-svg .nsi-d { opacity: .28; }
/* En botones y enlaces: el mismo gesto del menú, más corto. */
:is(button, .btn-navy, .btn-out, .btn-mini, .btn-ghost, .btn-primary, a, .pill-btn, .suite-salir):hover .nsi-t .nsi-svg { transform: translateY(-1px) scale(1.12) rotate(-5deg); }
:is(button, a):hover .nsi-t .nsi-svg .nsi-d { opacity: .55; }
/* Encabezados de tarjetas y secciones: el ícono en el color del módulo. */
:is(.card-head h2, .hub-section-head h2, .head-row h1, .card h3, h2, h3) .nsi-t { color: var(--mod-tinta, inherit); }
/* Barra superior oscura: blancos, con la capa clara en cian. */
:is(.topbar, .hub-top) .nsi-t { color: #fff; }
:is(.topbar, .hub-top) .nsi-t .nsi-d { fill: var(--marca-cian); opacity: .45; }
/* Las tarjetas de módulos del hub: el ícono grande en el color de cada módulo. */
.module-card .mod-ico .nsi-t { width: 26px; height: 26px; margin: 0; color: color-mix(in srgb, var(--c) 78%, #000); }
.module-card .mod-ico .nsi-t .nsi-d { fill: var(--c); opacity: .3; }
.module-card:hover .mod-ico .nsi-t .nsi-svg { transform: scale(1.1) rotate(-6deg); }
@media (prefers-reduced-motion: reduce) {
  .nsi-svg, .nsi-svg .nsi-d { transition: none; animation: none !important; }
  :is(.nav-item, .g-head, .side-link, .ev-side > a, .s-item):hover .nsi-svg { transform: none; }
}

/* =============================================================================
   TÍTULOS, RÓTULOS Y SELLOS
   ============================================================================= */
.head-row h1, .hub-hero h1 { font-weight: 800; letter-spacing: -.02em; color: var(--marca-azul); }
.card-head h2, .hub-section-head h2, .dialog header h2, .modal-card header h2 { font-weight: 800; letter-spacing: -.01em; color: var(--marca-azul); }
.crumb-g, .phva-pill, .tag, .hub-kpi small, .auth-eyebrow, .module-card .mod-norm {
  font-family: var(--fuente-rotulo);
}
.crumb-g { font-size: 13px; letter-spacing: .08em; }
.phva-pill { font-size: 13px; letter-spacing: .06em; }
.tag { font-size: 12px; font-weight: 700; letter-spacing: .05em; }

/* =============================================================================
   TARJETAS E INDICADORES · brillo del color del módulo al acercarse
   ============================================================================= */
.kpi:hover, .plan-kpi:hover, .ind-card:hover, .sec-card:hover, .score-card:hover, .pts-card:hover {
  border-color: color-mix(in srgb, var(--mod) 45%, #fff);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--mod) 10%, transparent), 0 22px 40px -22px color-mix(in srgb, var(--mod) 60%, transparent);
}
.kpi strong, .hub-kpi strong, .score-txt strong, .donut-num { font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.card:hover { border-color: color-mix(in srgb, var(--mod) 25%, #e3e9f1); }

/* =============================================================================
   CUADRÍCULAS · encabezado azul del logo y rótulos condensados
   ============================================================================= */
.table-wrap thead th {
  background: linear-gradient(180deg, #0A3A78 0%, var(--marca-azul) 62%, var(--marca-noche) 100%);
  font-family: var(--fuente-rotulo); font-size: 13px; font-weight: 700; letter-spacing: .07em;
}
.table-wrap tbody td { font-variant-numeric: tabular-nums; }

/* =============================================================================
   BOTONES
   ============================================================================= */
.btn-navy {
  background: linear-gradient(135deg, var(--marca-azul), var(--marca-azul-2)); color: #fff;
  box-shadow: 0 4px 12px -4px rgba(0, 37, 74, .45);
}
.btn-navy:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--marca-azul-2), #0E4C98);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, .45), 0 10px 24px -8px rgba(0, 149, 150, .65);
}
.btn-out:hover:not(:disabled) { border-color: var(--mod); color: var(--mod-tinta); }

/* El llamado principal va en el amarillo del afiche, con texto azul noche. */
.btn-primary {
  background: linear-gradient(180deg, #FFE45C 0%, var(--marca-amarillo) 45%, var(--marca-amarillo-2) 100%);
  color: var(--marca-azul); font-weight: 800; letter-spacing: .01em;
  box-shadow: 0 8px 22px -8px rgba(255, 184, 0, .75), inset 0 -2px 0 rgba(0, 37, 74, .12), inset 0 1px 0 rgba(255, 255, 255, .6);
}
.btn-primary:hover:not(:disabled) {
  filter: none;
  box-shadow: 0 0 0 3px rgba(255, 210, 31, .3), 0 12px 28px -8px rgba(255, 184, 0, .85), inset 0 -2px 0 rgba(0, 37, 74, .12);
}

/* =============================================================================
   HUB · barra superior con la marca de NormaSuite y la de la consultora
   ============================================================================= */
.hub-top {
  background: var(--marca-fondo-oscuro); color: #fff; border-bottom: 0;
  box-shadow: 0 8px 24px -12px rgba(2, 19, 49, .65);
}
.hub-top::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px;
  background: var(--marca-cinta); pointer-events: none;
  box-shadow: 0 0 10px rgba(34, 211, 238, .55);
}
.hub-brand { color: #fff; }
.hub-brand .hub-sep { width: 1px; height: 30px; background: rgba(255, 255, 255, .22); flex: none; }
.hub-brand b { color: #fff; font-weight: 700; }
.hub-brand .hub-nit { color: rgba(226, 232, 240, .7); font-weight: 600; font-size: 12px; }
.hub-brand .hub-editar { color: var(--marca-cian); font-weight: 700; font-size: 11.5px; cursor: pointer; margin-left: 6px; }
.hub-top .ns-logo {
  background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
  font-size: 14px; font-weight: 800; letter-spacing: .02em;
}
.hub-top { gap: 18px; }
.hub-brand { min-width: 0; }
.hub-brand b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.hub-user { color: #E2E8F0; gap: 6px; white-space: nowrap; font-size: 12.5px; }
#hubUserName { max-width: 170px; overflow: hidden; text-overflow: ellipsis; margin-right: 4px; }
.hub-top .btn-ghost {
  background: rgba(255, 255, 255, .07); color: #fff; border: 1px solid rgba(255, 255, 255, .2);
  min-height: 36px; padding: 0 11px; font-size: 12.5px; white-space: nowrap;
}
/* Sin espacio para los rótulos, los botones quedan con su ícono (el título sigue en la ayuda emergente). */
@media (max-width: 1640px) { .hub-top .btn-ghost .lbl { display: none; } }
@media (max-width: 1100px) { #hubUserName { display: none; } }
@media (max-width: 900px) {
  .hub-top { flex-wrap: wrap; gap: 10px; }
  .hub-user { flex-wrap: wrap; }
  .hub-brand .hub-sep, .hub-top .ns-logo { display: none; }
}
.hub-top .btn-ghost:hover {
  background: rgba(255, 255, 255, .14); color: #fff; border-color: color-mix(in srgb, var(--marca-cian) 70%, transparent);
  box-shadow: 0 0 12px rgba(34, 211, 238, .35);
}
.hub-top #btnLogout:hover { border-color: #fda4af; color: #fff; background: rgba(244, 63, 94, .22); box-shadow: 0 0 12px rgba(244, 63, 94, .35); }

body:has(.hub:not([hidden])) {
  background-image: radial-gradient(1100px 380px at 12% -90px, rgba(0, 184, 230, .12), transparent 70%),
    linear-gradient(180deg, #edf2f9 0, var(--ns-bg) 260px);
}
.hub-kpi { border-radius: 16px; box-shadow: 0 1px 2px rgba(0, 37, 74, .05); }
.hub-kpi small { font-size: 13px; letter-spacing: .06em; font-weight: 700; }
.hub-kpi strong { color: var(--marca-azul); font-size: 24px; }
.hub-section { box-shadow: 0 1px 2px rgba(0, 37, 74, .04), 0 10px 30px -24px rgba(0, 37, 74, .35); }

/* las tarjetas de módulos: borde, ícono y brillo del color de cada módulo */
.module-card { --c: var(--marca-turquesa); border: 1.5px solid color-mix(in srgb, var(--c) 30%, #e2e8f0); box-shadow: inset 0 3px 0 var(--c); }
.module-card[data-mod="sgsst"]          { --c: var(--marca-sst); }
.module-card[data-mod="th"]             { --c: var(--marca-th); }
.module-card[data-mod="sgi"]            { --c: var(--marca-iso); }
.module-card[data-mod="pesv"]           { --c: var(--marca-pesv); }
.module-card[data-mod="administrativo"] { --c: var(--marca-admin); }
.module-card[data-mod="mediciones"]     { --c: var(--marca-mediciones); }
.module-card[data-mod="auditorias"]     { --c: var(--marca-auditorias); }
.module-card[data-mod="gedoc"]          { --c: var(--marca-gedoc); }
.module-card[data-mod="ambiental"]      { --c: var(--marca-ambiental); }
.module-card[data-mod="ruc"]            { --c: var(--marca-ruc); }
.module-card .mod-ico {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 23px;
  background: color-mix(in srgb, var(--c) 13%, #fff); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 30%, transparent);
}
.module-card .mod-norm { color: color-mix(in srgb, var(--c) 72%, #000); font-size: 13.5px; letter-spacing: .05em; }
.module-card b { color: var(--marca-azul); font-weight: 800; }
.module-card:not(.off):hover {
  border-color: var(--c);
  box-shadow: inset 0 3px 0 var(--c), 0 0 0 3px color-mix(in srgb, var(--c) 16%, transparent),
    0 18px 38px -16px color-mix(in srgb, var(--c) 60%, transparent);
}

/* =============================================================================
   PANTALLA DE INGRESO · el afiche: «Todo conectado. Ese es el poder.»
   ============================================================================= */
.auth-brand {
  position: relative; overflow: hidden; color: #E2E8F0;
  background:
    radial-gradient(48% 34% at 50% 58%, rgba(0, 184, 230, .30), transparent 70%),
    radial-gradient(70% 45% at 110% -5%, rgba(139, 92, 246, .22), transparent 62%),
    radial-gradient(60% 40% at -10% 110%, rgba(30, 107, 255, .28), transparent 62%),
    linear-gradient(165deg, var(--marca-noche) 0%, var(--marca-azul) 52%, #06306A 100%);
}
/* la plataforma de luz bajo el diagrama */
.auth-brand::before {
  content: ""; position: absolute; left: 6%; right: 6%; bottom: 13%; height: 120px; pointer-events: none;
  background: radial-gradient(50% 50% at 50% 50%, rgba(125, 211, 252, .22), transparent 70%);
  border-radius: 50%; border: 1px solid rgba(125, 211, 252, .18);
  box-shadow: 0 0 40px rgba(34, 211, 238, .18) inset;
}
.auth-brand > * { position: relative; }
.auth-brand-top .ns-marca { height: 40px; }
.auth-eyebrow {
  background: rgba(34, 211, 238, .12); border-color: rgba(34, 211, 238, .45); color: #A5F3FC;
  font-size: 14px; letter-spacing: .05em; text-transform: uppercase; font-weight: 700;
}
.ns-titular { margin: 16px 0 10px; font-weight: 900; text-transform: uppercase; line-height: .98; letter-spacing: -.02em; font-size: clamp(30px, 3.3vw, 50px); color: #fff; }
.ns-titular span { display: block; }
.ns-titular .poder {
  background: linear-gradient(90deg, #67E8F9, var(--marca-cian) 40%, var(--marca-cian-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 18px rgba(34, 211, 238, .45));
}
.ns-bajada { color: #E2E8F0; font-size: 18px; font-weight: 600; }
.ns-lema { text-align: center; font-weight: 800; font-size: 19px; color: #fff; margin-top: 6px; }
.ns-lema b { color: var(--marca-cian); }
.ns-lema::after { content: ""; display: block; width: 120px; height: 3px; margin: 10px auto 0; border-radius: 99px; background: var(--marca-cian); box-shadow: 0 0 12px var(--marca-cian); }

/* el diagrama: un centro y cinco módulos conectados */
.ns-red { position: relative; width: 100%; max-width: 580px; margin: 4px auto 0; aspect-ratio: 560 / 380; container-type: inline-size; }
.ns-red > svg, .ns-escena > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ns-red .linea { fill: none; stroke-width: 2.4; stroke-linecap: round; filter: drop-shadow(0 0 4px currentColor); }
.ns-red .flujo { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 6 120; opacity: .3; animation: nsFlujo 3.2s linear infinite; }
.ns-red .flujo:nth-of-type(2n) { animation-duration: 4.1s; }
.ns-red .punto { fill: #fff; stroke-width: 3; filter: drop-shadow(0 0 5px currentColor); }
@keyframes nsFlujo { to { stroke-dashoffset: -126; } }

.ns-nodo {
  --c: var(--marca-turquesa);
  position: absolute; transform: translate(-50%, -50%); width: 35.5%;
  display: flex; align-items: center; gap: 2.2cqw; padding: 1.8cqw 2.2cqw;
  background: linear-gradient(180deg, #fff, #EEF4FF); border-radius: 2.8cqw;
  border: 2px solid color-mix(in srgb, var(--c) 85%, #fff);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 28%, transparent), 0 0 22px color-mix(in srgb, var(--c) 70%, transparent), 0 10px 20px -10px rgba(0, 0, 0, .5);
  color: var(--marca-azul);
}
.ns-nodo i {
  flex: none; width: 8.4cqw; height: 8.4cqw; border-radius: 2cqw; display: grid; place-items: center; color: #fff;
  background: linear-gradient(145deg, color-mix(in srgb, var(--c) 70%, #fff), var(--c) 55%, color-mix(in srgb, var(--c) 75%, #000));
  box-shadow: 0 4px 10px -3px color-mix(in srgb, var(--c) 80%, transparent);
}
.ns-nodo i svg { width: 60%; height: 60%; }
.ns-nodo b { display: block; font-family: var(--fuente-rotulo); font-weight: 800; text-transform: uppercase; font-size: clamp(10px, 2.95cqw, 17px); line-height: .95; letter-spacing: .01em; }
.ns-nodo small { display: block; font-size: clamp(8.5px, 1.95cqw, 11.5px); font-weight: 600; color: #334155; margin-top: .5cqw; line-height: 1.15; }
.ns-nodo.sst  { --c: var(--marca-sst); }
.ns-nodo.th   { --c: var(--marca-th); }
.ns-nodo.iso  { --c: var(--marca-iso); }
.ns-nodo.pesv { --c: var(--marca-pesv); }
.ns-nodo.adm  { --c: var(--marca-admin); }

.ns-centro {
  position: absolute; left: 50%; top: 51%; transform: translate(-50%, -50%);
  width: 25%; aspect-ratio: 1; border-radius: 50%; display: grid; place-content: center; justify-items: center; gap: 1cqw; text-align: center;
  background: radial-gradient(circle at 50% 35%, #0B3F82, var(--marca-azul) 60%, var(--marca-noche));
  border: 3px solid #7DD3FC;
  box-shadow: 0 0 0 5px rgba(34, 211, 238, .16), 0 0 30px rgba(34, 211, 238, .65), inset 0 0 24px rgba(34, 211, 238, .35);
}
.ns-centro::after {
  content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 2px solid rgba(34, 211, 238, .55);
  animation: nsLatido 2.8s ease-out infinite; pointer-events: none;
}
@keyframes nsLatido { from { transform: scale(.94); opacity: .9; } to { transform: scale(1.18); opacity: 0; } }
.ns-centro img { width: 9.5cqw; height: auto; }
.ns-centro > span:not(.ns-arma) { color: #fff; font-weight: 800; font-size: clamp(9px, 2.5cqw, 15px); line-height: 1.05; }

/* ---------- la pantalla de ingreso en 3D (el movimiento lo da marca-red.js) ----------
   El diagrama es una escena inclinada: las líneas quedan en el piso y las tarjetas flotan
   encima, cada una con su sombra de luz abajo. La escena se mece y sigue al puntero. */
.ns-red { perspective: 1100px; perspective-origin: 50% 35%; }
.ns-escena { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(13deg); will-change: transform; }
.ns-escena .ns-nodo {
  --z: 30px;
  transform: translate(-50%, -50%) translateZ(var(--z)); transform-style: preserve-3d;
  transition: transform .45s cubic-bezier(.2, .8, .2, 1);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 28%, transparent), 0 0 22px color-mix(in srgb, var(--c) 70%, transparent),
    inset 0 1px 0 #fff, 0 5px 0 -1px color-mix(in srgb, var(--c) 55%, #0B1E3A), 0 14px 22px -10px rgba(0, 0, 0, .6);
  animation: nsFlota 7s ease-in-out var(--fd, 0s) infinite;
}
.ns-escena .ns-nodo:hover { --z: 46px; }
.ns-nodo.th { --fd: -1.2s; } .ns-nodo.sst { --fd: -3.1s; } .ns-nodo.iso { --fd: -4.6s; } .ns-nodo.pesv { --fd: -2.2s; } .ns-nodo.adm { --fd: -5.4s; }
/* la sombra de luz en el piso, bajo la tarjeta */
.ns-escena .ns-nodo::after {
  content: ""; position: absolute; inset: 18% 6% -10%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 60%, transparent), transparent);
  transform: translateZ(calc(var(--z) * -1)); filter: blur(7px); opacity: .75;
}
@keyframes nsFlota { 0%, 100% { translate: 0 0 0; } 50% { translate: 0 -4px 10px; } }
.ns-escena .ns-centro { transform: translate(-50%, -50%) translateZ(54px); transform-style: preserve-3d; cursor: default; }
.ns-escena .ns-centro::before {
  content: ""; position: absolute; inset: -6%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(34, 211, 238, .55), transparent); transform: translateZ(-54px); filter: blur(8px);
}

/* la luz que camina por los conectores */
.ns-red .linea { transition: stroke-width .35s, filter .35s; }
.ns-red .linea.viva { stroke-width: 3.6; filter: drop-shadow(0 0 3px #fff) drop-shadow(0 0 9px currentColor); }
.ns-red .cometa-cola {
  fill: none; stroke: #fff; stroke-width: 3.4; stroke-linecap: round; pointer-events: none;
  filter: drop-shadow(0 0 4px #67E8F9) drop-shadow(0 0 10px #22D3EE); transition: opacity .35s;
}
.ns-red .cometa { fill: #fff; pointer-events: none; filter: drop-shadow(0 0 4px #fff) drop-shadow(0 0 10px #22D3EE) drop-shadow(0 0 20px #22D3EE); transition: opacity .35s; }
.ns-red .se-va { opacity: 0; }
.ns-red .punto { transform-box: fill-box; transform-origin: center; }
.ns-red .punto.vivo { animation: nsPunto .7s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes nsPunto { 40% { transform: scale(2); fill: #fff; } }

/* el módulo se enciende cuando la luz llega: resplandor, reflejo que lo cruza e ícono que brilla */
.ns-halo, .ns-brillo { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; }
.ns-halo { opacity: 0; box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 80%, #fff), 0 0 34px 6px var(--c); }
.ns-brillo { overflow: hidden; }
.ns-brillo::before {
  content: ""; position: absolute; inset: 0; opacity: 0;
  background: linear-gradient(110deg, transparent 36%, color-mix(in srgb, var(--c) 30%, transparent) 45%, rgba(255, 255, 255, .95) 50%, color-mix(in srgb, var(--c) 30%, transparent) 55%, transparent 64%) no-repeat;
  background-size: 260% 100%; background-position: 130% 0;
}
.ns-nodo.encendido .ns-halo { animation: nsHalo 1.15s ease-out; }
.ns-nodo.encendido .ns-brillo::before { animation: nsReflejo .9s ease-in-out; }
.ns-nodo.encendido i { animation: nsIcono 1s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes nsHalo { 25% { opacity: 1; } 100% { opacity: 0; } }
@keyframes nsReflejo { from { opacity: 1; background-position: 130% 0; } to { opacity: 1; background-position: -30% 0; } }
@keyframes nsIcono { 35% { scale: 1.14; filter: brightness(1.3); box-shadow: 0 0 18px var(--c); } }

/* al tocar un módulo: la tarjeta salta y una onda de luz la cruza y rebota en sus bordes */
.ns-escena .ns-nodo.rebota { animation: nsFlota 7s ease-in-out var(--fd, 0s) infinite, nsRebote .75s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes nsRebote { 0% { scale: 1; } 30% { scale: 1.09; } 55% { scale: .97; } 78% { scale: 1.025; } 100% { scale: 1; } }
.ns-onda {
  position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .95), color-mix(in srgb, var(--c) 50%, transparent) 45%, transparent 70%);
  animation: nsOnda .8s ease-out forwards;
}
.ns-onda.aro { background: none; border: 2px solid color-mix(in srgb, var(--c) 85%, #fff); animation-delay: .1s; animation-duration: .9s; opacity: 0; }
@keyframes nsOnda { from { transform: scale(.2); opacity: 1; } to { transform: scale(13); opacity: 0; } }

/* el centro late cuando las luces llegan a él */
.ns-escena .ns-centro.late { animation: nsLate .85s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes nsLate {
  35% { scale: 1.1; box-shadow: 0 0 0 7px rgba(34, 211, 238, .3), 0 0 60px rgba(34, 211, 238, .95), inset 0 0 30px rgba(34, 211, 238, .6); }
  70% { scale: .98; }
}

/* el logo se arma: cinco piezas que llegan en 3D, se encajan y les pasa un destello */
.ns-arma { position: relative; display: inline-block; vertical-align: middle; line-height: 0; perspective: 600px; }
.ns-arma > img { display: block; }
.ns-arma.es-simbolo > img { visibility: hidden; }
.ns-arma.es-logo > img { clip-path: inset(0 0 0 20.8%); }
.ns-piezas { position: absolute; left: 0; top: 0; width: 100%; height: 100%; transform-style: preserve-3d; pointer-events: none; }
.ns-arma.es-logo .ns-piezas { width: 20.34%; } /* el símbolo ocupa 404 de los 1986 de ancho del logo */
.ns-piezas .pz { position: absolute; inset: 0; }
.ns-piezas svg { display: block; width: 100%; height: 100%; overflow: visible; }
.ns-arma.armando .pz { animation: nsArma 1.6s cubic-bezier(.22, .9, .32, 1.08) var(--d) both; }
.ns-arma.armando.es-logo > img { animation: nsLetras .9s cubic-bezier(.2, .8, .2, 1) 1.3s both; }
@keyframes nsArma {
  0% { opacity: 0; transform: translate3d(var(--x), var(--y), var(--z)) rotateX(var(--rx)) rotateY(var(--ry)) rotateZ(var(--rz)) scale(.55); }
  25% { opacity: 1; }
  100% { opacity: 1; transform: none; }
}
@keyframes nsLetras {
  from { clip-path: inset(0 100% 0 20.8%); transform: translateX(-6px); opacity: .3; }
  to { clip-path: inset(0 0 0 20.8%); transform: none; opacity: 1; }
}
.ns-destello {
  position: absolute; inset: 0; pointer-events: none; opacity: 0;
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, .95) 50%, transparent 58%) no-repeat;
  background-size: 260% 100%; background-position: 140% 0;
}
.ns-arma.blanco .ns-destello { background-image: linear-gradient(105deg, transparent 40%, rgba(103, 232, 249, .95) 50%, transparent 60%); }
.ns-arma.armando .ns-destello { animation: nsDestello 1.1s ease-in-out 2s both; }
.ns-arma.destella .ns-destello { animation: nsDestello2 .95s ease-in-out both; }
@keyframes nsDestello { from { opacity: 1; background-position: 140% 0; } to { opacity: 1; background-position: -40% 0; } }
@keyframes nsDestello2 { from { opacity: 1; background-position: 140% 0; } to { opacity: 1; background-position: -40% 0; } }
.auth-card .ns-arma { display: block; width: fit-content; margin: 0 auto 18px; }
.auth-card .ns-arma > img { margin: 0; }

.ns-fichas { display: flex; justify-content: center; gap: 0; margin-top: 2px; }
.ns-fichas span {
  display: grid; justify-items: center; gap: 5px; padding: 0 16px; font-size: 12.5px; font-weight: 700; color: #E2E8F0;
}
.ns-fichas span + span { border-left: 1px solid rgba(255, 255, 255, .18); }
.ns-fichas i {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--marca-sst);
  background: radial-gradient(circle at 50% 30%, #fff, #E0EAFF); box-shadow: 0 0 0 3px rgba(125, 211, 252, .25), 0 0 14px rgba(34, 211, 238, .45);
}
.ns-fichas i svg { width: 19px; height: 19px; }
.auth-brand footer { color: rgba(203, 213, 225, .7); }

/* el panel del formulario */
.auth-panel {
  background:
    radial-gradient(60% 45% at 85% 0%, rgba(0, 184, 230, .10), transparent 70%),
    radial-gradient(50% 40% at 0% 100%, rgba(0, 149, 150, .08), transparent 70%), var(--ns-bg);
}
.auth-card::before { background: var(--marca-cinta); box-shadow: 0 0 10px rgba(34, 211, 238, .45); }
.auth-card { border-radius: 22px; box-shadow: 0 30px 70px -20px rgba(0, 37, 74, .28), 0 0 0 1px rgba(0, 37, 74, .04); }
.auth-card .ns-marca { height: 38px; margin: 0 auto 18px; }
.auth-card h2 { font-weight: 800; color: var(--marca-azul); }
.auth-card input:focus { border-color: var(--marca-turquesa); box-shadow: 0 0 0 3px rgba(0, 184, 230, .18); }

/* Versión suave para «reducir movimiento» (Windows con las animaciones apagadas): la luz y los
   destellos siguen; nada flota, salta ni gira, y el logo se arma acercando las piezas sin girarlas. */
@media (prefers-reduced-motion: reduce) {
  .ns-red .flujo, .ns-centro::after, .ns-escena .ns-nodo { animation: none; }
  .ns-red .flujo { opacity: 0; }
  .ns-escena .ns-nodo, .ns-escena .ns-nodo:hover { --z: 30px; transition: none; }
  .ns-arma.armando .pz { animation-name: nsArmaSuave; animation-duration: 1s; }
  .ns-escena .ns-centro.late { animation-name: nsLateSuave; }
  .ns-nodo.encendido i { animation-name: nsIconoSuave; }
}
@keyframes nsArmaSuave { from { opacity: 0; transform: translate(calc(var(--x) * .12), calc(var(--y) * .12)); } to { opacity: 1; transform: none; } }
@keyframes nsLateSuave { 35% { box-shadow: 0 0 0 7px rgba(34, 211, 238, .3), 0 0 60px rgba(34, 211, 238, .95), inset 0 0 30px rgba(34, 211, 238, .6); } }
@keyframes nsIconoSuave { 35% { filter: brightness(1.3); box-shadow: 0 0 18px var(--c); } }

/* =============================================================================
   PÁGINAS SUELTAS: constructor documental, codificación y Psicosocial en línea
   ============================================================================= */
:root { --ns-acento: var(--mod); }
.ns-cab-constructor { display: flex; align-items: center; gap: 16px; }
.ns-cab-constructor .ns-marca { height: 28px; padding-right: 16px; border-right: 1px solid var(--ns-linea, #e2e8f0); box-sizing: content-box; }
.hub-top .hub-brand a { display: inline-flex; }
.ns-marca-psico { height: 24px; margin-bottom: 8px; }

/* Al imprimir la barra va en blanco, con el logo a color. */
@media print {
  .topbar, .hub-top { background: #fff !important; box-shadow: none !important; color: var(--marca-azul) !important; }
  .topbar::after, .hub-top::after { display: none; }
  .topbar .ns-marca, .hub-top .ns-marca { content: url("marca/normasuite-logo.svg"); }
  .topbar .mod-badge, .topbar .company-sel, .hub-top b, .hub-user { color: var(--marca-azul) !important; box-shadow: none !important; }
}
