/* ==========================================================================
   Futurizalo Nexo · sistema de diseño
   Paleta de marca sin cambios (verdes y grises de futurizalo.pe); tipografía única Plus Jakarta Sans.
   ========================================================================== */
:root {
  /* Marca */
  --nexo-verde: #00875d;
  --nexo-verde-oscuro: #006646;
  --nexo-verde-claro: #e6faf3;
  --nexo-logo: #003d38;

  /* Neutros */
  --nexo-fondo: #f0f2f5;
  --nexo-superficie: #e8ecf1;
  --nexo-superficie-2: #f7f8fa;   /* cabeceras de tabla, pies de tarjeta, zonas secundarias */
  --nexo-hover: #f3f5f7;
  --nexo-texto: #2f3540;
  --nexo-texto-2: #5c6370;
  --nexo-texto-3: #858b96;        /* solo marcadores de posición y elementos decorativos */
  --nexo-borde: rgba(47, 53, 64, 0.1);
  --nexo-borde-2: rgba(47, 53, 64, 0.18);
  --nexo-borde-campo: #d4d8de;
  --nexo-borde-campo-hover: #b9bfc8;
  --nexo-separador: #eceef2;
  /* Líneas entre registros de las tablas: gris medio, visible sin competir con el texto. */
  --nexo-linea-tabla: #dcdfe4;

  /* Estados */
  --nexo-peligro: #dc3545;
  --nexo-peligro-texto: #b42a36;
  --nexo-peligro-fondo: #fdf3f4;
  --nexo-aviso-texto: #7a5200;
  --nexo-aviso-fondo: #fff4d6;
  --nexo-aviso-borde: #f0d58a;
  --nexo-info-texto: #1f4d7a;
  --nexo-info-fondo: #eef5fc;
  --nexo-info-borde: #c7dcf3;
  --nexo-anillo: 0 0 0 3px rgba(0, 135, 93, 0.18);

  /* Escala de espaciado (base 4 px) */
  --e-1: 0.25rem; --e-2: 0.5rem; --e-3: 0.75rem; --e-4: 1rem; --e-5: 1.25rem; --e-6: 1.5rem; --e-8: 2rem; --e-10: 2.5rem;

  /* Radios, sombras y alturas de control */
  --r-sm: 6px; --r: 8px; --r-lg: 10px;
  --nexo-radio: var(--r-lg);
  --sombra-1: 0 1px 2px rgba(16, 24, 40, 0.04);
  --sombra-2: 0 1px 3px rgba(16, 24, 40, 0.06), 0 1px 2px rgba(16, 24, 40, 0.03);
  --sombra-menu: 0 12px 28px -8px rgba(16, 24, 40, 0.16), 0 2px 6px rgba(16, 24, 40, 0.05);
  --alto-control: 2.375rem;
  --alto-control-sm: 2rem;
  --transicion: 0.15s ease;

  /* Bootstrap */
  --bs-primary: var(--nexo-verde);
  --bs-primary-rgb: 0, 135, 93;
  --bs-body-color: var(--nexo-texto);
  --bs-body-bg: #fff;
  --bs-emphasis-color: var(--nexo-texto);
  --bs-secondary-color: var(--nexo-texto-2);
  --bs-border-color: var(--nexo-borde-campo);
  --bs-border-color-translucent: var(--nexo-borde);
  --bs-link-color: var(--nexo-verde);
  --bs-link-color-rgb: 0, 135, 93;
  --bs-link-hover-color: var(--nexo-verde-oscuro);
  --bs-link-hover-color-rgb: 0, 102, 70;
  --bs-body-font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --bs-body-font-size: 0.875rem;
  --bs-body-line-height: 1.55;
  --bs-border-radius: var(--r);
  --bs-border-radius-sm: var(--r-sm);
  --bs-border-radius-lg: var(--r-lg);
  --bs-danger: var(--nexo-peligro);
  --bs-danger-rgb: 220, 53, 69;
}

/* ---------- Base y tipografía ---------- */
/* En escritorio todo se ve al 90 %, igual que con el zoom del navegador. */
@media screen and (min-width: 992px) { html { zoom: 0.9; } }
body {
  background-color: var(--nexo-fondo);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { color: var(--nexo-texto); letter-spacing: -0.015em; line-height: 1.25; }
h1, .h1, .nexo-titulo { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.022em; }
h2, .h2 { font-size: 1.125rem; font-weight: 600; }
h3, .h3, h4, .h4 { font-size: 1rem; font-weight: 600; }
.small, small { font-size: 0.8125rem; }
.text-secondary { color: var(--nexo-texto-2) !important; }
.text-danger { color: var(--nexo-peligro-texto) !important; }
strong, b, .fw-semibold { font-weight: 600 !important; }
::selection { background: rgba(0, 135, 93, 0.16); }
:focus-visible { outline: 2px solid var(--nexo-verde); outline-offset: 2px; }
a { text-underline-offset: 0.18em; }

.nexo-icono { width: 1rem; height: 1rem; flex: none; vertical-align: -0.15em; }

main.container-xxl { padding-top: var(--e-8); padding-bottom: 3.5rem; }
@media (max-width: 767.98px) {
  .container-xxl { --bs-gutter-x: 2rem; }
  main.container-xxl { padding-top: var(--e-6); padding-bottom: var(--e-10); }
}

/* ---------- Navegación ---------- */
/* Barra superior fija (logo a la izquierda, usuario a la derecha) y, en escritorio, menú en columna a la izquierda. */
:root { --alto-barra: 3.75rem; --ancho-menu: 15rem; }
.nexo-nav {
  position: sticky; top: 0; z-index: 1020; padding: 0; flex-direction: column; align-items: stretch;
  /* Límite de la barra: línea gris de lado a lado y una sombra leve, para no confundirse con el borde del menú lateral. */
  background: #fff; border-bottom: 1px solid var(--nexo-linea-tabla); box-shadow: 0 1px 3px rgba(47, 53, 64, 0.06);
}
.nexo-barra-superior { display: flex; flex: none; align-items: center; gap: var(--e-2); height: var(--alto-barra); padding: 0 var(--e-4); }
.nexo-logo { display: inline-flex; align-items: center; gap: var(--e-2); margin: 0 auto 0 0; padding-block: 0; }
.nexo-logo img { display: block; width: auto; height: 24px; }
.nexo-producto {
  font-weight: 700; font-size: 1.0625rem; letter-spacing: -0.025em; line-height: 1; color: var(--nexo-verde);
  padding-left: var(--e-2); border-left: 1px solid var(--nexo-borde-2);
}
.nexo-nav .navbar-nav { flex-direction: column; gap: 2px; }
.nexo-nav .nav-link {
  display: flex; align-items: center; gap: var(--e-3); height: 2.375rem;
  padding-inline: var(--e-3) !important; padding-block: 0; border-radius: var(--r);
  color: var(--nexo-texto-2); font-size: 0.875rem; font-weight: 500; transition: color var(--transicion), background-color var(--transicion);
}
.nexo-nav .nav-link:hover { color: var(--nexo-texto); background: var(--nexo-hover); }
.nexo-nav .nav-link.active { background: var(--nexo-verde-claro); color: var(--nexo-verde-oscuro); font-weight: 600; }
.nexo-nav .nav-link:focus-visible { outline-offset: -2px; }
.nexo-nav-icono { display: block; width: 1.125rem; height: 1.125rem; color: var(--nexo-texto-2); }
.nexo-nav .nav-link.active .nexo-nav-icono { color: var(--nexo-verde); }
.nexo-nav-seccion {
  display: block; padding: 0 var(--e-3) var(--e-2);
  color: var(--nexo-texto-2); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
}
.nexo-nav .nexo-nav-derecha { margin-top: var(--e-5); }
.nexo-nav .navbar-toggler { border: 1px solid var(--nexo-borde-campo); border-radius: var(--r); padding: 0.3rem 0.5rem; }
.nexo-nav .navbar-toggler:focus { box-shadow: var(--nexo-anillo); }
.nexo-nav .navbar-toggler-icon { width: 1.25em; height: 1.25em; }

/* Menú de usuario (arriba a la derecha) */
/* Quién más está conectado: círculos con un punto verde, a la izquierda del tipo de cambio y del menú de usuario. */
.nexo-conectados { display: flex; align-items: center; gap: var(--e-2); }
.nexo-conectados-titulo { color: var(--nexo-texto-2); font-size: 0.75rem; font-weight: 500; }
.nexo-conectados-lista { display: flex; align-items: center; gap: 0.375rem; margin: 0; padding: 0; list-style: none; }
.nexo-conectado {
  position: relative; display: inline-grid; place-items: center; width: 2rem; height: 2rem;
  border-radius: 50%; box-shadow: 0 0 0 2px #fff; cursor: default;
  font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.02em; color: #fff;
}
.nexo-conectado::after {
  content: ""; position: absolute; right: -1px; bottom: -1px; width: 0.625rem; height: 0.625rem;
  border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 2px #fff;
}
.nexo-conectado-0 { background: #2563eb; }
.nexo-conectado-1 { background: #7c3aed; }
.nexo-conectado-2 { background: #c2410c; }
.nexo-conectado-3 { background: #0e7490; }
.nexo-conectado-4 { background: #be185d; }
.nexo-conectado-5 { background: #4d7c0f; }
.nexo-conectado-resto { background: var(--nexo-superficie); color: var(--nexo-texto); }
.nexo-conectado-resto::after { display: none; }
.nexo-conectados:has(.nexo-conectado) + .nexo-menu-usuario { padding-left: var(--e-2); border-left: 1px solid var(--nexo-borde-2); }

.nexo-menu-usuario { position: relative; }
.nexo-usuario {
  display: inline-flex; align-items: center; gap: var(--e-2); height: 2.75rem;
  padding: 0 var(--e-2) 0 var(--e-1); max-width: 18rem;
  background: transparent; border: 1px solid transparent; border-radius: var(--r);
  color: var(--nexo-texto); text-align: left;
  transition: background-color var(--transicion), border-color var(--transicion);
}
.nexo-usuario:hover, .nexo-usuario[aria-expanded="true"] { background: var(--nexo-hover); border-color: var(--nexo-borde); }
.nexo-usuario::after { display: none; }
.nexo-usuario-texto { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.nexo-usuario-nombre { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.8125rem; font-weight: 600; }
.nexo-usuario-rol { color: var(--nexo-texto-2); font-size: 0.75rem; }
.nexo-avatar {
  display: inline-grid; place-items: center; flex: none; width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--nexo-verde); color: #fff; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.02em;
}
.nexo-usuario .nexo-icono { width: 0.875rem; height: 0.875rem; color: var(--nexo-texto-2); }
.nexo-menu-usuario .dropdown-menu { min-width: 14rem; max-width: 18rem; margin-top: var(--e-1) !important; }

/* Semáforo del hosting junto a su menú (solo administradores): verde holgado, ámbar vigilar, rojo ampliar plan. */
.nexo-nav-semaforo {
  flex: none; width: 0.5625rem; height: 0.5625rem; margin-left: auto; margin-right: var(--e-1); border-radius: 50%;
  background: var(--color-semaforo); box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--nexo-borde-2);
}

@media (max-width: 991.98px) {
  /* Celular y tableta: el menú se despliega bajo la barra con el botón de las tres líneas. */
  .nexo-lateral { padding: 0 var(--e-4) var(--e-3); border-top: 1px solid var(--nexo-separador); }
  .nexo-lateral .navbar-nav:first-child { padding-top: var(--e-3); }
  .nexo-nav .nexo-nav-derecha { margin-top: var(--e-3); padding-top: var(--e-3); border-top: 1px solid var(--nexo-separador); }
}
@media (max-width: 575.98px) {
  .nexo-barra-superior { padding-inline: var(--e-3); }
  .nexo-usuario-texto, .nexo-usuario > .nexo-icono { display: none; }
  .nexo-usuario { padding: 0; width: 2.75rem; justify-content: center; }
  .nexo-conectados-titulo { display: none; }
}

/* Tipo de cambio del día en la barra superior; enlaza a la página de la fuente. */
.nexo-tc {
  display: inline-flex; align-items: center; gap: var(--e-2); height: 2rem; padding: 0 var(--e-3);
  border: 1px solid var(--nexo-borde-2); border-radius: var(--r); white-space: nowrap;
  font-size: 0.8125rem; line-height: 1; color: var(--nexo-texto-2); text-decoration: none;
  transition: border-color var(--transicion), background-color var(--transicion);
}
.nexo-tc:hover { border-color: var(--nexo-verde); background: var(--nexo-verde-claro); color: var(--nexo-texto-2); }
.nexo-tc:focus-visible { outline: none; box-shadow: var(--nexo-anillo); }
.nexo-tc-etiqueta { font-weight: 700; color: var(--nexo-verde); }
.nexo-tc strong { font-weight: 600; color: var(--nexo-texto); font-variant-numeric: tabular-nums; }
.nexo-tc-fuente { padding-left: var(--e-2); border-left: 1px solid var(--nexo-borde-2); font-size: 0.75rem; }
.nexo-tc-menu {
  align-self: flex-start; flex-wrap: wrap; row-gap: var(--e-1); max-width: 100%; height: auto;
  margin-block: var(--e-3) var(--e-1); padding-block: var(--e-2);
}
.nexo-tc-barra + .nexo-menu-usuario { padding-left: var(--e-2); border-left: 1px solid var(--nexo-borde-2); }
/* Celular: no cabe en la barra y pasa al menú desplegable. Tableta: solo la venta (el resto queda en el texto al
   pasar el cursor). */
@media (max-width: 575.98px) { .nexo-tc-barra { display: none; } }
@media (min-width: 576px) { .nexo-tc-menu { display: none; } }
@media (min-width: 576px) and (max-width: 991.98px) { .nexo-tc-barra :is(.nexo-tc-compra, .nexo-tc-fuente) { display: none; } }
@media screen and (min-width: 992px) {
  .nexo-con-barra { padding-top: var(--alto-barra); }
  .nexo-con-menu { padding-left: var(--ancho-menu); }
  .nexo-nav { position: fixed; inset: 0 0 auto 0; }
  .nexo-barra-superior { padding-inline: var(--e-6); }
  /* La columna del menú arranca bajo la barra y ocupa el alto restante. */
  .nexo-lateral {
    position: fixed; top: calc(var(--alto-barra) + 1px); bottom: 0; left: 0; width: var(--ancho-menu);
    flex-direction: column; align-items: stretch; overflow-y: auto;
    padding: var(--e-5) var(--e-3); background: #fff; border-right: 1px solid var(--nexo-borde);
  }
  .nexo-nav .navbar-nav { margin-inline: 0 !important; }
  /* Las aplicaciones ocupan el alto libre: «Sistema» queda siempre al pie de la columna. */
  .nexo-nav .navbar-nav.me-auto { flex-grow: 1; }
}

/* ---------- Encabezado de página ---------- */
.nexo-encabezado { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--e-4) var(--e-6); margin-bottom: var(--e-6); }
.nexo-encabezado-texto { flex: 1 1 18rem; min-width: 0; }
.nexo-encabezado h1 { margin: 0; overflow-wrap: anywhere; }
.nexo-subtitulo { margin: var(--e-1) 0 0; color: var(--nexo-texto-2); font-size: 0.875rem; }
.nexo-acciones { display: flex; flex-wrap: wrap; align-items: center; gap: var(--e-2); }
.nexo-volver {
  display: inline-flex; align-items: center; gap: 0.375rem; margin-bottom: var(--e-2);
  color: var(--nexo-texto-2); font-size: 0.8125rem; font-weight: 500; text-decoration: none; border-radius: var(--r-sm);
}
.nexo-volver:hover { color: var(--nexo-verde-oscuro); }
.nexo-volver .nexo-icono { width: 0.875rem; height: 0.875rem; transition: transform var(--transicion); }
.nexo-volver:hover .nexo-icono { transform: translateX(-2px); }
@media (max-width: 575.98px) {
  .nexo-acciones { width: 100%; }
  .nexo-acciones > .btn-primary { flex: 1 1 auto; }
}

/* ---------- Botones ---------- */
.btn {
  --bs-btn-font-family: inherit; --bs-btn-font-size: 0.875rem; --bs-btn-font-weight: 600; --bs-btn-line-height: 1.25;
  --bs-btn-padding-x: 0.875rem; --bs-btn-padding-y: 0.5rem; --bs-btn-border-radius: var(--r);
  --bs-btn-focus-box-shadow: none; --bs-btn-disabled-opacity: 0.5;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--e-2);
  min-height: var(--alto-control); letter-spacing: -0.005em; white-space: nowrap;
  transition: background-color var(--transicion), border-color var(--transicion), color var(--transicion), box-shadow var(--transicion);
}
.btn:focus-visible { outline: 2px solid var(--nexo-verde); outline-offset: 2px; }
.btn-sm {
  --bs-btn-font-size: 0.8125rem; --bs-btn-padding-x: 0.625rem; --bs-btn-padding-y: 0.3125rem; --bs-btn-border-radius: var(--r-sm);
  min-height: var(--alto-control-sm); gap: 0.375rem;
}
.btn-sm .nexo-icono { width: 0.875rem; height: 0.875rem; }
.btn-lg { --bs-btn-font-size: 0.9375rem; --bs-btn-padding-y: 0.625rem; --bs-btn-border-radius: var(--r); min-height: 2.75rem; }
.btn-primary {
  --bs-btn-bg: var(--nexo-verde); --bs-btn-border-color: var(--nexo-verde); --bs-btn-color: #fff;
  --bs-btn-hover-bg: var(--nexo-verde-oscuro); --bs-btn-hover-border-color: var(--nexo-verde-oscuro); --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: #005a3e; --bs-btn-active-border-color: #005a3e;
  --bs-btn-disabled-bg: var(--nexo-verde); --bs-btn-disabled-border-color: var(--nexo-verde);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 1px 2px rgba(0, 61, 56, 0.18);
}
.btn-outline-secondary {
  --bs-btn-color: var(--nexo-texto); --bs-btn-bg: #fff; --bs-btn-border-color: var(--nexo-borde-campo);
  --bs-btn-hover-color: var(--nexo-texto); --bs-btn-hover-bg: var(--nexo-superficie-2); --bs-btn-hover-border-color: var(--nexo-borde-campo-hover);
  --bs-btn-active-color: var(--nexo-texto); --bs-btn-active-bg: var(--nexo-hover); --bs-btn-active-border-color: var(--nexo-borde-campo-hover);
  --bs-btn-disabled-color: var(--nexo-texto-2); --bs-btn-disabled-bg: #fff; --bs-btn-disabled-border-color: var(--nexo-borde-campo);
  box-shadow: var(--sombra-1);
}
.btn-outline-secondary .nexo-icono { color: var(--nexo-texto-2); }
.btn-outline-danger {
  --bs-btn-color: var(--nexo-peligro-texto); --bs-btn-bg: #fff; --bs-btn-border-color: rgba(220, 53, 69, 0.35);
  --bs-btn-hover-color: #9b1c27; --bs-btn-hover-bg: var(--nexo-peligro-fondo); --bs-btn-hover-border-color: rgba(220, 53, 69, 0.55);
  --bs-btn-active-color: #9b1c27; --bs-btn-active-bg: #fbe7e9; --bs-btn-active-border-color: rgba(220, 53, 69, 0.6);
  box-shadow: var(--sombra-1);
}
.btn-danger {
  --bs-btn-bg: var(--nexo-peligro); --bs-btn-border-color: var(--nexo-peligro);
  --bs-btn-hover-bg: #c22d3b; --bs-btn-hover-border-color: #c22d3b; --bs-btn-active-bg: #a92633; --bs-btn-active-border-color: #a92633;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 1px 2px rgba(120, 20, 30, 0.2);
}
.btn:focus-visible.btn-danger, .btn:focus-visible.btn-outline-danger { outline-color: var(--nexo-peligro); }
/* Botón discreto para acciones por fila: sin borde hasta pasar el cursor. */
.nexo-btn-fantasma { --bs-btn-color: var(--nexo-texto-2); --bs-btn-bg: transparent; --bs-btn-border-color: transparent;
  --bs-btn-hover-color: var(--nexo-texto); --bs-btn-hover-bg: var(--nexo-hover); --bs-btn-hover-border-color: transparent;
  --bs-btn-active-color: var(--nexo-texto); --bs-btn-active-bg: var(--nexo-superficie); --bs-btn-active-border-color: transparent; }
.nexo-btn-fantasma.nexo-peligro { --bs-btn-color: var(--nexo-peligro-texto); --bs-btn-hover-color: #9b1c27; --bs-btn-hover-bg: var(--nexo-peligro-fondo); --bs-btn-active-color: #9b1c27; --bs-btn-active-bg: #fbe7e9; }
.btn-group > .btn { box-shadow: none; }
.btn-group { box-shadow: var(--sombra-1); border-radius: var(--r); }

/* Envío en curso: el botón muestra un indicador y no admite un segundo clic (nexo.js). */
.btn.nexo-cargando { pointer-events: none; }
.btn.nexo-cargando .nexo-icono { display: none; }
.btn.nexo-cargando::before {
  content: ""; width: 0.875rem; height: 0.875rem; flex: none; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: nexo-giro 0.6s linear infinite;
}
@keyframes nexo-giro { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .btn.nexo-cargando::before { animation-duration: 1.6s; } * { scroll-behavior: auto !important; } }

/* ---------- Formularios ---------- */
.form-label { display: block; font-size: 0.8125rem; font-weight: 600; color: var(--nexo-texto); margin-bottom: 0.375rem; }
.form-label .text-danger { font-weight: 500; }
.form-control, .form-select {
  min-height: var(--alto-control); padding: 0.4375rem 0.75rem; font-size: 0.875rem; line-height: 1.4;
  color: var(--nexo-texto); background-color: #fff; border: 1px solid var(--nexo-borde-campo); border-radius: var(--r);
  box-shadow: var(--sombra-1); transition: border-color var(--transicion), box-shadow var(--transicion);
}
.form-select { padding-right: 2.25rem; background-position: right 0.75rem center; background-size: 14px 10px; }
.form-control::placeholder { color: var(--nexo-texto-3); opacity: 1; }
.form-control:hover, .form-select:hover { border-color: var(--nexo-borde-campo-hover); }
.form-control:focus, .form-select:focus { border-color: var(--nexo-verde); box-shadow: var(--nexo-anillo); }
textarea.form-control { min-height: 5.5rem; resize: vertical; }
.form-control[type="file"] { padding: 0; line-height: calc(var(--alto-control) - 2px); overflow: hidden; }
.form-control::file-selector-button {
  height: calc(var(--alto-control) - 2px); margin: 0 0.75rem 0 0; padding: 0 0.875rem;
  font-weight: 600; color: var(--nexo-texto); background: var(--nexo-superficie-2); border: 0; border-right: 1px solid var(--nexo-borde-campo);
}
.form-control:hover:not(:disabled):not([readonly])::file-selector-button { background: var(--nexo-hover); }
.form-text { margin-top: 0.375rem; font-size: 0.75rem; color: var(--nexo-texto-2); }
.invalid-feedback { display: flex; align-items: flex-start; gap: 0.375rem; margin-top: 0.375rem; font-size: 0.75rem; font-weight: 500; color: var(--nexo-peligro-texto); }
.invalid-feedback .nexo-icono { width: 0.875rem; height: 0.875rem; margin-top: 0.1rem; }
.nexo-campo-error .form-control, .nexo-campo-error .form-select { border-color: var(--nexo-peligro); }
.nexo-campo-error .form-control:focus, .nexo-campo-error .form-select:focus { box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15); }
.form-check { min-height: 1.25rem; }
.form-check-input { width: 1rem; height: 1rem; margin-top: 0.2rem; border: 1px solid #c3c8d0; box-shadow: var(--sombra-1); }
.form-check-input[type="checkbox"] { border-radius: 4px; }
.form-check-input:checked { background-color: var(--nexo-verde); border-color: var(--nexo-verde); }
.form-check-input:focus { border-color: var(--nexo-verde); box-shadow: var(--nexo-anillo); }
.form-check-label { font-weight: 500; }
.input-group > .form-control, .input-group > .form-select { box-shadow: none; }
.input-group { border-radius: var(--r); box-shadow: var(--sombra-1); }
.input-group > .btn { box-shadow: none; }
.input-group > .form-control:focus { z-index: 5; box-shadow: var(--nexo-anillo); }
/* Botón de calendario junto a los campos de fecha (nexo.js): el texto del date nativo queda oculto. */
.nexo-calendario { flex: 0 0 2.75rem !important; width: 2.75rem !important; padding-inline: 0.55rem; color: transparent; cursor: pointer; background: var(--nexo-superficie-2); }
.nexo-calendario:hover { background: var(--nexo-hover); }
.nexo-calendario::-webkit-calendar-picker-indicator { cursor: pointer; opacity: 0.6; }
/* iOS amplía la página si el campo tiene menos de 16 px. */
@media (max-width: 575.98px) { .form-control, .form-select { font-size: 1rem; } }

/* Secciones dentro de un formulario */
.nexo-seccion + .nexo-seccion { margin-top: var(--e-6); padding-top: var(--e-6); border-top: 1px solid var(--nexo-separador); }
.nexo-seccion-titulo { margin: 0 0 var(--e-1); font-size: 0.9375rem; font-weight: 600; }
.nexo-seccion-desc { margin: 0 0 var(--e-4); color: var(--nexo-texto-2); font-size: 0.8125rem; }
.nexo-opcion { padding: var(--e-3) var(--e-4); background: var(--nexo-superficie-2); border: 1px solid var(--nexo-separador); border-radius: var(--r); }
.nexo-opcion .form-check { margin: 0; }
.nexo-opcion .form-text { margin-top: 0.125rem; }

/* ---------- Tarjetas ---------- */
.nexo-card {
  --bs-card-bg: #fff; --bs-card-spacer-x: var(--e-5); --bs-card-spacer-y: var(--e-5);
  --bs-card-cap-padding-x: var(--e-5); --bs-card-cap-padding-y: 0.875rem;
  border: 1px solid var(--nexo-borde); border-radius: var(--nexo-radio); box-shadow: var(--sombra-2); overflow: hidden;
}
.nexo-card > .card-header {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--e-2);
  background: #fff; border-bottom: 1px solid var(--nexo-separador);
  font-size: 0.9375rem; font-weight: 600; letter-spacing: -0.01em; min-height: 3.25rem;
}
.nexo-card-sub { flex-basis: 100%; margin-top: -0.125rem; color: var(--nexo-texto-2); font-size: 0.8125rem; font-weight: 400; letter-spacing: 0; }
.nexo-card > .card-footer { background: var(--nexo-superficie-2); border-top: 1px solid var(--nexo-separador); padding: var(--e-3) var(--e-5); }
.nexo-card .list-group-item { padding: var(--e-3) var(--e-5); border-color: var(--nexo-separador); color: var(--nexo-texto); }
.nexo-pie-meta { display: flex; flex-wrap: wrap; gap: var(--e-1) var(--e-4); font-size: 0.75rem; color: var(--nexo-texto-2); }

/* Archivos dentro de una tarjeta */
.nexo-archivo { display: flex; align-items: center; gap: var(--e-3); }
.nexo-archivo-icono {
  display: grid; place-items: center; flex: none; width: 2rem; height: 2rem; border-radius: var(--r);
  background: var(--nexo-superficie-2); border: 1px solid var(--nexo-separador); color: var(--nexo-texto-2);
}
/* Distintivo del tipo de archivo (PDF rojo, Word azul, imagen verde). */
.nexo-archivo-tipo { font-size: 0.625rem; font-weight: 700; letter-spacing: 0.02em; line-height: 1; }
.nexo-archivo-tipo-pdf { background: #fdecec; border-color: #f5c2c2; color: #c62828; }
.nexo-archivo-tipo-doc { background: #e8f0fb; border-color: #bcd2f0; color: #2b579a; }
.nexo-archivo-tipo-img { background: var(--nexo-verde-claro); border-color: #b5e8d5; color: var(--nexo-verde-oscuro); }
.nexo-archivo-tipo-ppt { background: #fdeee8; border-color: #f4c7b5; color: #b7472a; }
.nexo-archivo-tipo-xls { background: #e7f4ec; border-color: #b9dfc8; color: #1d6f42; }
.nexo-archivo-tipo-xml { background: #f3eefb; border-color: #d6c8ee; color: #6a3fb5; }
.nexo-vista-titulo .nexo-archivo-icono { width: 1.75rem; height: 1.5rem; }
.nexo-archivo-tipo-chico { display: inline-block; vertical-align: middle; margin-left: 0.25rem; padding: 0.2rem 0.3rem; border-width: 1px; border-style: solid; border-radius: var(--r-sm); font-size: 0.5625rem; }
.nexo-archivo-texto { min-width: 0; }
/* Documentos: código fijo, distintivo «Nuevo», trozo del texto encontrado y vista rápida en un panel lateral. */
.nexo-doc-codigo { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--nexo-texto-2); }
.nexo-enlace-codigo { color: inherit; text-decoration: none; }
.nexo-enlace-codigo:hover { color: var(--nexo-verde-oscuro); text-decoration: underline; }
.nexo-badge-nuevo {
  display: inline-block; padding: 0.125rem 0.375rem; border-radius: var(--r-sm); vertical-align: 0.1em;
  font-size: 0.6875rem; font-weight: 600; line-height: 1.3; white-space: nowrap;
  background: var(--nexo-info-fondo); color: var(--nexo-info-texto); border: 1px solid var(--nexo-info-borde);
}
.nexo-fragmento {
  display: flex; gap: 0.375rem; margin-top: 0.25rem; font-size: 0.8125rem; color: var(--nexo-texto-2);
  white-space: normal; line-height: 1.4;
}
.nexo-fragmento .nexo-icono { flex: none; width: 0.875rem; height: 0.875rem; margin-top: 0.15rem; }
.nexo-fragmento mark { padding: 0 0.1rem; background: #fff1b8; color: var(--nexo-texto); border-radius: 2px; }
.nexo-ver-rapido { cursor: pointer; margin-left: 0; margin-right: 0.25rem; }
.nexo-ver-rapido:hover { filter: brightness(0.94); box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.06); }
.nexo-ver-rapido:focus-visible { outline: none; box-shadow: var(--nexo-anillo); }
.nexo-panel-vista.offcanvas-end { width: min(1200px, 75vw); }
@media (max-width: 991.98px) { .nexo-panel-vista.offcanvas-end { width: 100vw; } }
/* Lista de Documentos sin barra de desplazamiento: textos recortados con «…» y el aviso de vencimiento bajo la fecha. */
.nexo-doc-numero { max-width: 7rem; }
@media (max-width: 1299.98px) {
  .nexo-tabla-docs .nexo-celda-media { max-width: 6.5rem; }
  .nexo-tabla-docs .nexo-doc-numero { max-width: 5.5rem; }
  .nexo-tabla-docs > :not(caption) > * > * { padding-inline: 0.375rem; }
}
/* En pantallas angostas (con el menú lateral a la vista) se ocultan N.º doc. (5.ª columna) y Peso (9.ª) bajo
   1200 px, para no tener barra; siguen en la ficha. */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .nexo-tabla-docs tr > :nth-child(5), .nexo-tabla-docs tr > :nth-child(9) { display: none; }
}
.nexo-tabla-compacta > :not(caption) > * > .nexo-doc-vence { white-space: nowrap; }
.nexo-doc-vence > div { margin-top: 0.125rem; }
.nexo-panel-vista .offcanvas-header { gap: var(--e-2); border-bottom: 1px solid var(--nexo-borde); }
.nexo-panel-vista-cuerpo { padding: var(--e-2); background: var(--nexo-superficie-2); display: flex; }
.nexo-panel-vista-cuerpo iframe { flex: 1; width: 100%; border: 0; background: #fff; border-radius: var(--r-sm); }
.nexo-panel-vista-cuerpo img { max-width: 100%; max-height: 100%; margin: auto; object-fit: contain; }
.nexo-archivo-nombre { display: block; min-width: 0; color: var(--nexo-texto); font-weight: 500; text-decoration: none; overflow-wrap: anywhere; }
.nexo-archivo-nombre:hover { color: var(--nexo-verde-oscuro); text-decoration: underline; }
.nexo-archivo-meta { display: block; font-size: 0.75rem; color: var(--nexo-texto-2); }
.nexo-archivo-acciones { display: flex; gap: var(--e-1); flex: none; }

/* ---------- Tablas ---------- */
.nexo-tabla { --bs-table-color: var(--nexo-texto); --bs-table-hover-bg: #f6f9f8; --bs-table-hover-color: var(--nexo-texto); margin: 0; }
.nexo-tabla > :not(caption) > * > * { padding: 0.625rem var(--e-3); border-bottom-color: var(--nexo-linea-tabla); }
.nexo-tabla thead th {
  background: var(--nexo-superficie-2); color: var(--nexo-texto-2);
  font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
  white-space: nowrap; border-bottom: 1px solid var(--nexo-borde); vertical-align: middle;
}
.nexo-tabla tbody tr:last-child > * { border-bottom: 0; }
/* Fila de sumas al pie de una tabla (Resumen mensual por moneda). */
.nexo-tabla-total th, .nexo-tabla-total td { font-weight: 700; border-top: 1px solid var(--nexo-borde-2); border-bottom: 0; background: var(--nexo-superficie-2); }
.nexo-tabla thead th a { color: inherit; text-decoration: none; }
.nexo-tabla thead th a:hover { color: var(--nexo-verde-oscuro); }
.nexo-tabla > :not(caption) > * > *:first-child { padding-left: var(--e-5); }
.nexo-tabla > :not(caption) > * > *:last-child { padding-right: var(--e-5); }

/* Cabeceras con menú para ordenar y filtrar por valores. */
.nexo-th-boton {
  display: inline-flex; align-items: center; gap: 0.25rem; margin: -0.25rem -0.375rem; padding: 0.25rem 0.375rem;
  background: none; border: 0; border-radius: var(--r-sm); font: inherit; color: inherit;
  text-transform: inherit; letter-spacing: inherit; cursor: pointer; transition: background-color var(--transicion), color var(--transicion);
}
.nexo-th-boton:hover, .nexo-th-boton[aria-expanded="true"] { background: var(--nexo-superficie); color: var(--nexo-texto); }
.nexo-th-activa { color: var(--nexo-verde-oscuro); }
.nexo-th-boton .nexo-icono { width: 0.75rem; height: 0.75rem; stroke-width: 2.5; }
.nexo-th-filtro { width: 0.375rem; height: 0.375rem; border-radius: 50%; background: var(--nexo-verde); flex: none; }
.nexo-menu-columna { min-width: 14rem; color: var(--nexo-texto); text-align: left; text-transform: none; letter-spacing: 0; font-size: 0.875rem; font-weight: 400; }
.nexo-menu-opciones { max-height: 15rem; overflow-y: auto; white-space: normal; margin-inline: -0.375rem; padding-inline: 0.375rem; }
.nexo-menu-opciones .form-check { display: flex; align-items: flex-start; gap: var(--e-2); padding: 0.3125rem 0.375rem; margin: 0; border-radius: var(--r-sm); cursor: pointer; }
.nexo-menu-opciones .form-check:hover { background: var(--nexo-hover); }
.nexo-menu-opciones .form-check-input { float: none; margin: 0.15rem 0 0; }
.nexo-menu-opciones .form-check-label { font-weight: 400; }
@media print { .nexo-th-filtro { display: none; } }

/* Listado de registros: cada gasto en una sola línea; los textos largos se recortan con «…» (completo al pasar el cursor). */
.nexo-tabla-compacta { font-size: 0.8125rem; }
.nexo-tabla-compacta > :not(caption) > * > * { white-space: nowrap; padding: 0.5625rem 0.5rem; }
.nexo-tabla-compacta > :not(caption) > * > *:first-child { padding-left: var(--e-4); }
.nexo-tabla-compacta > :not(caption) > * > *:last-child { padding-right: var(--e-4); }
.nexo-tabla-compacta thead th { font-size: 0.6875rem; padding-block: 0.625rem; }
.nexo-celda-larga, .nexo-celda-media { overflow: hidden; text-overflow: ellipsis; }
/* El concepto ocupa el ancho que sobra y se recorta lo necesario, para que la tabla entre sin barra de desplazamiento. */
.nexo-celda-larga { width: 100%; max-width: 0; min-width: 8rem; }
.nexo-celda-media { max-width: 9rem; }
/* Vista previa de «Repetir» en Nuevo pendiente: hasta 60 filas, con la cabecera fija al desplazar. */
.nexo-vista-repetir { max-height: 26rem; overflow-y: auto; }
.nexo-vista-repetir thead th { position: sticky; top: 0; z-index: 1; background: var(--nexo-superficie-2); }
.nexo-importe { font-variant-numeric: tabular-nums; font-weight: 600; }
.nexo-tenue { color: var(--nexo-texto-3); }
.nexo-enlace-fila { color: var(--nexo-texto); font-weight: 600; text-decoration: none; }
.nexo-enlace-fila:hover { color: var(--nexo-verde-oscuro); text-decoration: underline; }
.nexo-badge-prueba {
  display: inline-block; padding: 0.125rem 0.375rem; border-radius: var(--r-sm); vertical-align: 0.1em;
  background: var(--nexo-aviso-fondo); color: var(--nexo-aviso-texto); border: 1px solid var(--nexo-aviso-borde);
  font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.01em; line-height: 1.3;
}
/* Estado de los pendientes: los terminados quedan en verde y con el texto atenuado. */
.nexo-badge-abierto, .nexo-badge-proceso, .nexo-badge-revisar, .nexo-badge-hecho, .nexo-badge-na, .nexo-badge-cancelado {
  display: inline-block; padding: 0.125rem 0.375rem; border-radius: var(--r-sm);
  font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.01em; line-height: 1.3; white-space: nowrap;
}
/* Lo que no aplica queda en gris con borde punteado, para distinguirlo de lo cancelado (gris liso). */
.nexo-badge-na { background: var(--nexo-superficie-2); color: var(--nexo-texto-2); border: 1px dashed var(--nexo-texto-3); }
/* Pendiente (sin empezar) en rojo: es lo que hay que atender. */
.nexo-badge-abierto { background: var(--nexo-peligro-fondo); color: var(--nexo-peligro-texto); border: 1px solid #f3c6cb; }
.nexo-badge-proceso { background: var(--nexo-aviso-fondo); color: var(--nexo-aviso-texto); border: 1px solid var(--nexo-aviso-borde); }
.nexo-badge-hecho { background: var(--nexo-verde-claro); color: var(--nexo-verde-oscuro); border: 1px solid rgba(0, 135, 93, 0.25); }
/* Lo cancelado (cerrado sin hacerse) en gris. */
.nexo-badge-cancelado { background: var(--nexo-superficie-2); color: var(--nexo-texto-2); border: 1px solid var(--nexo-separador); }
/* Caja chica: ingresos en verde, egresos en azul; el gasto de caja chica se distingue en la tabla de Gastos. */
.nexo-badge-ingreso, .nexo-badge-egreso, .nexo-badge-caja {
  display: inline-block; padding: 0.125rem 0.375rem; border-radius: var(--r-sm);
  font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.01em; line-height: 1.3; white-space: nowrap; vertical-align: 0.1em;
}
.nexo-badge-ingreso { background: var(--nexo-verde-claro); color: var(--nexo-verde-oscuro); border: 1px solid rgba(0, 135, 93, 0.25); }
/* Gasto «Por revisar» (llegó por foto o correo). No confundir con nexo-badge-revisar: estado de Cavali. */
.nexo-badge-por-revisar {
  display: inline-block; padding: 0.125rem 0.375rem; border-radius: var(--r-sm); vertical-align: 0.1em;
  font-size: 0.6875rem; font-weight: 600; line-height: 1.3; white-space: nowrap;
  background: var(--nexo-aviso-fondo); color: var(--nexo-aviso-texto); border: 1px solid var(--nexo-aviso-borde);
}
h1 .nexo-badge-por-revisar { font-size: 0.75rem; }
.nexo-contador {
  display: inline-grid; place-items: center; min-width: 1.25rem; height: 1.25rem; margin-left: 0.25rem; padding: 0 0.3rem;
  border-radius: 999px; background: var(--nexo-aviso-fondo); color: var(--nexo-aviso-texto); font-size: 0.6875rem; font-weight: 700;
}
/* Captura con foto: enlace personal en «Mi cuenta», bandeja de capturas y foto al completar. */
.nexo-captura-enlace { display: flex; gap: var(--e-5); align-items: flex-start; }
.nexo-captura-qr { flex: none; width: 9.5rem; }
.nexo-captura-qr svg { display: block; width: 100%; height: auto; }
@media (max-width: 575.98px) { .nexo-captura-enlace { flex-direction: column; align-items: center; } }
.nexo-capturas { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: var(--e-4); }
.nexo-captura { overflow: hidden; }
.nexo-captura-foto { display: block; height: 14rem; background: var(--nexo-superficie-2); border-bottom: 1px solid var(--nexo-borde); }
.nexo-captura-foto img, .nexo-captura-ficha img { display: block; width: 100%; height: 100%; object-fit: contain; }
.nexo-captura-ficha { overflow: hidden; }
.nexo-captura-foto iframe, .nexo-captura-pdf iframe { display: block; width: 100%; height: 100%; border: 0; }
.nexo-captura-pdf { height: 32rem; border-bottom: 1px solid var(--nexo-borde); }
.nexo-captura .nexo-icono { width: 0.875rem; height: 0.875rem; vertical-align: -0.1em; }
.nexo-captura-ficha > a { display: block; height: 22rem; background: var(--nexo-superficie-2); border-bottom: 1px solid var(--nexo-borde); }
.nexo-captura-datos { display: grid; grid-template-columns: auto 1fr; gap: 0.125rem var(--e-3); }
.nexo-captura-datos dt { font-weight: 400; color: var(--nexo-texto-2); }
.nexo-captura-datos dd { margin: 0; font-variant-numeric: tabular-nums; }
.nexo-badge-egreso, .nexo-badge-caja { background: var(--nexo-info-fondo); color: var(--nexo-info-texto); border: 1px solid var(--nexo-info-borde); }
.nexo-caja-ingreso { color: var(--nexo-verde-oscuro); }
.nexo-caja-fila-saldo td { color: var(--nexo-texto-2); font-style: italic; }
.nexo-caja-mes-actual td { background: var(--nexo-superficie-2); font-weight: 600; }
.nexo-caja-final { border-color: var(--nexo-verde); }
.nexo-caja-mes { width: auto; min-width: 9rem; }
/* Importe original (USD × tipo de cambio) bajo el egreso en PEN. */
.nexo-caja-original { font-size: 0.75rem; font-weight: 400; color: var(--nexo-texto-3); white-space: nowrap; }
/* Respaldos del saldo inicial y final, dentro de su tarjeta. */
.nexo-caja-respaldo { margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px solid var(--nexo-linea-tabla); }
.nexo-caja-respaldo-archivo { display: flex; align-items: center; gap: 0.25rem; font-size: 0.8125rem; min-width: 0; }
.nexo-caja-respaldo-archivo a:first-child {
  display: inline-flex; align-items: center; gap: 0.25rem; min-width: 0; flex: 1 1 auto; color: var(--nexo-texto); text-decoration: none;
}
.nexo-caja-respaldo-archivo a:first-child span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nexo-caja-respaldo-archivo a:first-child:hover span { text-decoration: underline; }
.nexo-caja-respaldo .btn { margin-top: 0.25rem; padding-left: 0; }
.nexo-equivalente { font-size: 0.875rem; color: var(--nexo-texto-2); margin-top: 0.25rem; }
/* Mes de caja cerrado (gris) o abierto y vencimiento presentado (verde). Nombres propios: «abierto» es el estado
   Pendiente de Pendientes, Legal y Cavali. */
.nexo-badge-cerrado, .nexo-badge-verde {
  display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.125rem 0.5rem; border-radius: var(--r-sm);
  font-size: 0.75rem; font-weight: 600; white-space: nowrap;
}
.nexo-badge-cerrado { background: var(--nexo-superficie-2); color: var(--nexo-texto); border: 1px solid var(--nexo-borde-campo); }
.nexo-badge-cerrado .nexo-icono { width: 0.85rem; height: 0.85rem; }
.nexo-badge-verde { background: var(--nexo-verde-claro); color: var(--nexo-verde-oscuro); border: 1px solid rgba(0, 135, 93, 0.25); }
.nexo-arqueo .form-control { font-variant-numeric: tabular-nums; }
.nexo-arqueo-total {
  display: grid; grid-template-columns: auto auto; justify-content: start; column-gap: 1.5rem; row-gap: 0.25rem;
  padding: 0.75rem 1rem; border-radius: var(--r); background: var(--nexo-superficie-2); font-variant-numeric: tabular-nums;
}
.nexo-arqueo-total strong { text-align: right; }

/* Distintivo «Beta» (menú y título de lo que aún está en prueba). */
.nexo-beta {
  display: inline-flex; align-items: center; gap: 0.2rem; margin-left: 0.4rem; padding: 0.05rem 0.4rem;
  border-radius: 999px; border: 1px solid #d9c7f5; background: #f3edfc; color: #6a3fc0;
  font-size: 0.625rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; line-height: 1.5; vertical-align: middle;
}
.nexo-beta .nexo-icono { width: 0.7rem; height: 0.7rem; }
.nexo-beta-grande { font-size: 0.75rem; padding: 0.15rem 0.55rem; }
.nexo-beta-grande .nexo-icono { width: 0.85rem; height: 0.85rem; }

/* Calendario: cuadrícula mensual; cada fuente con su color y lo vencido en rojo. */
.nexo-cal-titulo { min-width: 6.5rem; text-align: center; font-size: 1.0625rem; }
.nexo-cal { width: 100%; min-width: 760px; table-layout: fixed; border-collapse: collapse; }
.nexo-cal th { padding: 0.5rem; font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--nexo-texto-2); text-align: left; background: var(--nexo-superficie-2); border-bottom: 1px solid var(--nexo-linea-tabla); }
.nexo-cal td { height: 7rem; padding: 0.35rem; vertical-align: top; border: 1px solid var(--nexo-separador); }
.nexo-cal td.nexo-cal-fuera { background: var(--nexo-superficie-2); }
.nexo-cal td.nexo-cal-fuera .nexo-cal-dia { color: #a3a9b3; }
.nexo-cal-dia { display: inline-block; min-width: 1.6rem; margin-bottom: 0.2rem; font-size: 0.8125rem; font-weight: 600; text-align: center; border-radius: 999px; }
.nexo-cal-hoy .nexo-cal-dia { background: var(--nexo-verde); color: #fff; }
.nexo-cal-evento {
  display: flex; align-items: center; gap: 0.2rem; margin-top: 0.15rem; padding: 0.1rem 0.35rem; border-radius: var(--r-sm);
  border-left: 3px solid var(--nexo-cal-color); background: var(--nexo-cal-fondo); color: var(--nexo-texto);
  font-size: 0.75rem; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none;
}
.nexo-cal-evento:hover { filter: brightness(0.96); color: var(--nexo-texto); }
.nexo-cal-evento .nexo-icono { width: 0.75rem; height: 0.75rem; flex: none; }
.nexo-cal-evento.nexo-cal-estado-vencido { background: var(--nexo-peligro-fondo); color: var(--nexo-peligro-texto); font-weight: 600; }
.nexo-cal-evento.nexo-cal-estado-cerrado { opacity: 0.6; text-decoration: line-through; }
.nexo-cal-obligaciones { --nexo-cal-color: var(--nexo-verde); --nexo-cal-fondo: var(--nexo-verde-claro); }
.nexo-cal-legal { --nexo-cal-color: #7c5cc4; --nexo-cal-fondo: #f3effb; }
.nexo-cal-pendientes { --nexo-cal-color: #2f74c0; --nexo-cal-fondo: var(--nexo-info-fondo); }
.nexo-cal-documentos { --nexo-cal-color: #c28a00; --nexo-cal-fondo: var(--nexo-aviso-fondo); }
.nexo-cal-cavali { --nexo-cal-color: #0f8a9d; --nexo-cal-fondo: #e7f6f8; }
.nexo-cal-muestra { display: inline-block; flex: none; width: 0.7rem; height: 0.7rem; border-radius: 3px; background: var(--nexo-cal-color); }
.nexo-agenda-fecha { min-width: 6.5rem; font-variant-numeric: tabular-nums; font-size: 0.875rem; }
.nexo-agenda-texto { display: flex; flex-direction: column; min-width: 0; }
.nexo-agenda-texto a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Documento imprimible de caja chica: acta de cierre. */
.nexo-documento {
  position: relative; overflow: hidden; background: #fff; color: #1d2229; border: 1px solid var(--nexo-linea-tabla);
  border-radius: var(--nexo-radio); padding: 2rem; margin: 0 auto 1.5rem; max-width: 52rem; font-size: 0.875rem;
}
.nexo-documento-marca {
  position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%) rotate(-24deg); pointer-events: none;
  font-size: 5.5rem; font-weight: 700; letter-spacing: 0.1em; color: rgba(220, 53, 69, 0.12); white-space: nowrap;
}
.nexo-documento-cabecera { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: 1rem; border-bottom: 2px solid #1d2229; margin-bottom: 1rem; }
.nexo-documento-empresa { font-weight: 700; font-size: 1rem; }
.nexo-documento-titulo { font-size: 1.125rem; font-weight: 600; margin: 0.25rem 0 0; }
.nexo-documento-numero { display: flex; flex-direction: column; align-items: flex-end; text-align: right; font-size: 0.8125rem; }
.nexo-documento-numero strong { font-size: 1.125rem; }
.nexo-documento-datos { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0.75rem 1.5rem; margin: 0 0 1rem; }
.nexo-documento-datos dt { font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: #5b6472; }
.nexo-documento-datos dd { margin: 0; }
.nexo-documento-subtitulo { font-size: 0.875rem; font-weight: 700; margin: 1.25rem 0 0.5rem; }
.nexo-documento-tabla { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.nexo-documento-tabla th, .nexo-documento-tabla td { padding: 0.3rem 0.5rem; border-bottom: 1px solid var(--nexo-linea-tabla); text-align: left; vertical-align: top; }
.nexo-documento-tabla thead th { font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.04em; color: #5b6472; border-bottom-color: #1d2229; }
.nexo-documento-tabla .text-end { text-align: right; }
.nexo-documento-resumen { max-width: 26rem; }
.nexo-documento-resumen td { text-align: right; }
.nexo-documento-total th, .nexo-documento-total td { font-weight: 700; border-top: 1px solid #1d2229; }
.nexo-documento-nota { margin: 0; }
.nexo-documento-firmas { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 2rem; margin-top: 3.5rem; text-align: center; font-size: 0.8125rem; }
.nexo-documento-linea { display: block; border-top: 1px solid #1d2229; margin-bottom: 0.35rem; }
.nexo-documento-pie { margin-top: 1.5rem; font-size: 0.6875rem; color: #5b6472; }
@media print {
  .nexo-documento { border: 0; border-radius: 0; padding: 0; max-width: none; font-size: 9.5pt; }
  .nexo-documento-marca { color: rgba(220, 53, 69, 0.18); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
/* CAVALI: lo listo para que alguien lo revise y apruebe, en violeta (mismo tono que su tramo en la barra). */
.nexo-badge-revisar { background: #f1effc; color: #4433a8; border: 1px solid #d5cff5; }
.nexo-cavali-codigo { min-width: 1.25rem; }
/* Cavali: documentos de Documental para vincular (lista con desplazamiento si crece). */
.nexo-vinculos-opciones {
  max-height: 14rem; overflow-y: auto; padding: var(--e-2) var(--e-3);
  border: 1px solid var(--nexo-separador); border-radius: var(--r-sm); background: #fff;
}
.nexo-vinculos-opciones .form-check { display: flex; gap: var(--e-2); margin: 0; padding: 0.25rem 0; font-size: 0.875rem; }
.nexo-vinculos-opciones .form-check-input { flex: none; margin: 0.2rem 0 0; }
/* Vencimiento de documentos y gastos recurrentes pausados. */
.nexo-badge-vencido, .nexo-badge-por-vencer, .nexo-badge-vence-3, .nexo-badge-vence-6, .nexo-badge-vence-12, .nexo-badge-pausado {
  display: inline-block; padding: 0.125rem 0.375rem; border-radius: var(--r-sm); vertical-align: 0.05em;
  font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.01em; line-height: 1.3; white-space: nowrap;
}
.nexo-badge-vencido { background: var(--nexo-peligro-fondo); color: var(--nexo-peligro-texto); border: 1px solid #f1c3c8; }
.nexo-badge-por-vencer { background: var(--nexo-aviso-fondo); color: var(--nexo-aviso-texto); border: 1px solid var(--nexo-aviso-borde); }
/* Cuanto más lejano el vencimiento, más tenue: 3 meses naranja suave, 6 azul, 12 gris. */
.nexo-badge-vence-3 { background: #fff1e8; color: #9a4a12; border: 1px solid #f5cdb0; }
.nexo-badge-vence-6 { background: var(--nexo-info-fondo); color: var(--nexo-info-texto); border: 1px solid var(--nexo-info-borde); }
.nexo-badge-vence-12 { background: var(--nexo-superficie-2); color: var(--nexo-texto-2); border: 1px solid var(--nexo-separador); }
.nexo-badge-pausado { background: var(--nexo-superficie-2); color: var(--nexo-texto-2); border: 1px solid var(--nexo-separador); }
.nexo-badge-bloqueante {
  display: inline-block; padding: 0.125rem 0.375rem; border-radius: var(--r-sm); font-size: 0.6875rem; font-weight: 600; line-height: 1.3;
  background: var(--nexo-peligro-fondo); color: var(--nexo-peligro-texto); border: 1px solid #f1c3c8;
}
/* Etiquetas de documentos y temas de pendientes. */
.nexo-etiqueta {
  display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle;
  padding: 0.0625rem 0.4375rem; margin: 0.0625rem 0.25rem 0.0625rem 0; border-radius: 999px;
  background: var(--nexo-info-fondo); color: var(--nexo-info-texto); border: 1px solid var(--nexo-info-borde);
  font-size: 0.6875rem; font-weight: 600; line-height: 1.35; white-space: nowrap; text-decoration: none;
}
a.nexo-etiqueta:hover { text-decoration: underline; }
.nexo-etiquetas-opciones { display: flex; flex-wrap: wrap; gap: var(--e-2); }
.nexo-etiqueta-opcion {
  display: inline-flex; align-items: center; gap: var(--e-2); margin: 0; padding: 0.3125rem 0.625rem; cursor: pointer;
  border: 1px solid var(--nexo-borde-campo); border-radius: var(--r); font-size: 0.875rem;
}
.nexo-etiqueta-opcion .form-check-input { margin: 0; }
.nexo-etiqueta-opcion:has(:checked) { border-color: var(--nexo-info-borde); background: var(--nexo-info-fondo); color: var(--nexo-info-texto); }
.nexo-duplicado ul { padding-left: 1.125rem; }
.nexo-por-pagina { display: inline-flex; align-items: center; gap: var(--e-2); color: var(--nexo-texto-2); }
.nexo-por-pagina a { color: var(--nexo-verde-oscuro); text-decoration: none; }
.nexo-por-pagina a:hover { text-decoration: underline; }
.nexo-por-actual { font-weight: 700; color: var(--nexo-texto); }
.nexo-cambio { display: flex; flex-direction: column; gap: 0.125rem; font-size: 0.875rem; }
.nexo-cambio-meta { font-size: 0.75rem; color: var(--nexo-texto-2); }
.nexo-fila-hecha .nexo-enlace-fila { color: var(--nexo-texto-3); font-weight: 500; }
/* Legal: tabla con grupos plegables (sección, vencimiento, estado o responsable). */
.nexo-tabla-grupos .nexo-grupo-cabecera > th { padding: 0 !important; background: var(--nexo-superficie-2); border-bottom: 1px solid var(--nexo-linea-tabla); }
.nexo-grupo-boton {
  display: flex; align-items: center; gap: var(--e-3); width: 100%; padding: 0.625rem var(--e-4);
  background: none; border: 0; color: var(--nexo-texto); font: inherit; font-size: 0.8125rem; text-align: left; cursor: pointer;
}
.nexo-grupo-boton:hover { background: var(--nexo-hover); }
.nexo-grupo-flecha { width: 1rem; height: 1rem; color: var(--nexo-texto-2); transition: transform var(--transicion); transform: rotate(-90deg); }
.nexo-grupo-boton[aria-expanded="true"] .nexo-grupo-flecha { transform: none; }
.nexo-grupo-titulo { font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.nexo-grupo-meta { color: var(--nexo-texto-2); font-weight: 500; white-space: nowrap; }
.nexo-grupo-avance { display: flex; align-items: center; gap: var(--e-2); margin-left: auto; }
.nexo-grupo-avance .nexo-barra { width: 9rem; height: 0.5rem; }
.nexo-grupo-porcentaje { min-width: 2.75rem; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.nexo-barra-alta { height: 0.75rem; margin: var(--e-2) 0 var(--e-3); }
.nexo-legal-avance { display: flex; align-items: baseline; gap: var(--e-2); }
.nexo-legal-avance strong { font-size: 1.75rem; line-height: 1; }
.nexo-legal-avance span { color: var(--nexo-texto-2); font-size: 0.875rem; }
.nexo-legal-cuentas { display: flex; flex-wrap: wrap; gap: var(--e-2) var(--e-4); margin: 0 0 var(--e-2); padding: 0; list-style: none; font-size: 0.8125rem; font-weight: 600; }
.nexo-legal-cuentas a { color: inherit; text-decoration: none; }
@media print { .nexo-grupo-fila[hidden] { display: table-row !important; } }

/* Estado vacío */
.nexo-vacio { padding: var(--e-10) var(--e-4) !important; text-align: center; white-space: normal !important; }
.nexo-vacio-icono {
  display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; margin-bottom: var(--e-3);
  border-radius: 50%; background: var(--nexo-superficie-2); border: 1px solid var(--nexo-separador); color: var(--nexo-texto-2);
}
.nexo-vacio-icono .nexo-icono { width: 1.25rem; height: 1.25rem; }
.nexo-vacio-texto { margin: 0 auto; max-width: 28rem; color: var(--nexo-texto-2); font-size: 0.875rem; }

/* Paginación */
.pagination { --bs-pagination-color: var(--nexo-texto); --bs-pagination-hover-color: var(--nexo-texto); --bs-pagination-hover-bg: var(--nexo-hover);
  --bs-pagination-border-color: var(--nexo-borde-campo); --bs-pagination-hover-border-color: var(--nexo-borde-campo-hover);
  --bs-pagination-focus-box-shadow: var(--nexo-anillo); --bs-pagination-focus-bg: #fff; --bs-pagination-focus-color: var(--nexo-texto);
  --bs-pagination-disabled-color: var(--nexo-texto-3); --bs-pagination-disabled-bg: #fff; --bs-pagination-disabled-border-color: var(--nexo-separador);
  --bs-pagination-border-radius: var(--r-sm); gap: var(--e-2); }
.pagination-sm { --bs-pagination-font-size: 0.8125rem; --bs-pagination-padding-x: 0.625rem; --bs-pagination-padding-y: 0.3125rem; --bs-pagination-border-radius: var(--r-sm); }
.pagination .page-link { display: inline-flex; align-items: center; gap: 0.25rem; min-height: var(--alto-control-sm); font-weight: 600; border-radius: var(--r-sm) !important; margin: 0 !important; box-shadow: var(--sombra-1); }
.pagination .page-link .nexo-icono { width: 0.875rem; height: 0.875rem; }
.pagination .disabled .page-link { box-shadow: none; }
/* Detalle del reporte: la paginación es solo de pantalla, para que la impresión incluya todos los registros. */
@media screen { .nexo-otra-pagina { display: none; } }
/* «Mostrar 25 / 50 / 100» al pie de las tablas. */
.nexo-por-pagina .btn { min-width: 2.75rem; font-weight: 600; }
.nexo-por-pagina .btn.btn-primary, .nexo-por-pagina .btn.btn-primary:hover { color: #fff; }

/* ---------- Indicadores (totales) ---------- */
.nexo-total .card-body { padding: var(--e-5); }
.nexo-total-etiqueta { font-size: 0.8125rem; font-weight: 500; color: var(--nexo-texto-2); }
.nexo-total-valor { margin-top: 0.125rem; font-size: 1.75rem; font-weight: 700; letter-spacing: -0.025em; line-height: 1.2; font-variant-numeric: tabular-nums; color: var(--nexo-texto); }
@media (max-width: 575.98px) {
  .nexo-total .card-body { padding: var(--e-4); }
  .nexo-total-valor { font-size: 1.25rem; }
}
.nexo-total-meta { margin-top: var(--e-1); font-size: 0.8125rem; color: var(--nexo-texto-2); }
.nexo-moneda {
  display: inline-block; padding: 0.0625rem 0.375rem; border-radius: var(--r-sm); background: var(--nexo-verde-claro);
  color: var(--nexo-verde-oscuro); font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.04em; vertical-align: 0.1em;
}

/* Ficha de datos (detalle) */
.nexo-ficha { --bs-gutter-x: var(--e-4); margin: 0; }
.nexo-ficha dt, .nexo-ficha dd { margin: 0; padding-block: 0.625rem; border-top: 1px solid var(--nexo-separador); }
.nexo-ficha > :nth-child(-n+2) { border-top: 0; padding-top: 0; }
.nexo-ficha > :nth-last-child(-n+2) { padding-bottom: 0; }
.nexo-ficha dt { font-weight: 500; color: var(--nexo-texto-2); }
.nexo-ficha dd { overflow-wrap: anywhere; font-weight: 500; }
.nexo-importe-bloque { margin: calc(var(--e-5) * -1) calc(var(--e-5) * -1) var(--e-5); padding: var(--e-5); border-bottom: 1px solid var(--nexo-separador); background: var(--nexo-superficie-2); }

/* ---------- Mapa de calor del reporte (categoría × mes): un solo tono, más oscuro cuanto mayor el gasto. ---------- */
.nexo-calor { width: 100%; border-collapse: separate; border-spacing: 2px; font-size: 0.8125rem; }
.nexo-calor th, .nexo-calor td { padding: 0.4375rem 0.625rem; white-space: nowrap; }
.nexo-calor td { min-width: 4.5rem; text-align: right; border-radius: 4px; font-variant-numeric: tabular-nums; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.nexo-calor thead th { font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--nexo-texto-2); text-align: right; }
.nexo-calor thead th:first-child { text-align: left; padding-left: 0; }
.nexo-calor tbody th, .nexo-calor tfoot th { font-weight: 500; padding-left: 0; }
.nexo-calor tfoot th, .nexo-calor-total { font-weight: 700; }
.nexo-calor tfoot th, .nexo-calor tfoot td { border-top: 1px solid var(--nexo-borde-2); border-radius: 0; }
.nexo-calor-1 { background: #e6faf3; }
.nexo-calor-2 { background: #b9eed9; }
.nexo-calor-3 { background: #7fdcb9; }
.nexo-calor-4 { background: #3fbf93; }
.nexo-calor-5 { background: #00875d; color: #fff; }
.nexo-calor-pie { display: flex; flex-wrap: wrap; align-items: center; gap: var(--e-2) var(--e-5); margin-top: var(--e-4); padding-top: var(--e-3); border-top: 1px solid var(--nexo-separador); font-size: 0.75rem; color: var(--nexo-texto-2); }
.nexo-calor-leyenda { display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }
.nexo-calor-leyenda i { width: 1.1rem; height: 0.75rem; border-radius: 2px; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.nexo-calor-leyenda i:first-of-type { margin-left: 0.375rem; }
.nexo-calor-leyenda i:last-of-type { margin-right: 0.375rem; }

/* Torta del reporte (total en PEN por categoría): la leyenda lleva importe y porcentaje de cada porción. */
.nexo-torta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--e-5) 3rem; }
.nexo-torta svg { flex: none; width: 210px; height: 210px; }
.nexo-torta path { stroke: #fff; stroke-width: 2; stroke-linejoin: round; }
.nexo-torta-leyenda { font-size: 0.8125rem; border-collapse: collapse; }
.nexo-torta-leyenda th, .nexo-torta-leyenda td { padding: 0.3125rem 0 0.3125rem 1.5rem; white-space: nowrap; }
.nexo-torta-leyenda th { font-weight: 500; padding-left: 0; }
.nexo-torta-leyenda td { text-align: right; font-variant-numeric: tabular-nums; }
.nexo-torta-leyenda td:last-child { color: var(--nexo-texto-2); }
.nexo-torta-leyenda tfoot th, .nexo-torta-leyenda tfoot td { font-weight: 700; border-top: 1px solid var(--nexo-borde-2); }
/* Pendientes por responsable: barras horizontales apiladas por estado. */
.nexo-barras { width: 100%; font-size: 0.8125rem; border-collapse: collapse; }
.nexo-barras th { width: 1%; max-width: 12rem; padding: 0.3125rem var(--e-3) 0.3125rem 0; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nexo-barras td { padding-block: 0.3125rem; }
.nexo-barras td:last-child { width: 1%; padding-left: var(--e-3); text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.nexo-barra { display: flex; gap: 2px; height: 0.875rem; }
.nexo-barra > * { display: block; min-width: 3px; border-radius: 3px; print-color-adjust: exact; -webkit-print-color-adjust: exact; transition: filter var(--transicion); }
.nexo-barra > a:hover, .nexo-barra > a:focus-visible { filter: brightness(0.85); }
.nexo-barras th a { color: inherit; text-decoration: none; }
.nexo-barras th a:hover { color: var(--nexo-verde-oscuro); text-decoration: underline; }
/* Legal · plan por semana: la fila entera enlaza a la tabla filtrada; la semana en curso resaltada. */
.nexo-barras td:last-child { white-space: nowrap; }
a.nexo-barra { text-decoration: none; }
a.nexo-barra:hover > *, a.nexo-barra:focus-visible > * { filter: brightness(0.9); }
.nexo-plan th { max-width: 16rem; }
.nexo-plan-actual th, .nexo-plan-actual th a { font-weight: 700; color: var(--nexo-verde-oscuro); }
.nexo-badge-hoy {
  display: inline-block; margin-left: 0.25rem; padding: 0.0625rem 0.375rem; border-radius: var(--r-sm); vertical-align: 0.05em;
  background: var(--nexo-verde-claro); color: var(--nexo-verde-oscuro); font-size: 0.6875rem; font-weight: 600;
}
.nexo-leyenda { display: inline-flex; flex-wrap: wrap; gap: var(--e-1) var(--e-4); }
.nexo-leyenda i { display: inline-block; width: 0.625rem; height: 0.625rem; margin-right: 0.375rem; border-radius: 3px; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.nexo-torta-leyenda i { display: inline-block; width: 0.625rem; height: 0.625rem; margin-right: 0.5rem; border-radius: 3px; print-color-adjust: exact; -webkit-print-color-adjust: exact; }

/* ---------- Menús desplegables ---------- */
.dropdown-menu {
  --bs-dropdown-font-size: 0.875rem; --bs-dropdown-color: var(--nexo-texto); --bs-dropdown-border-color: var(--nexo-borde);
  --bs-dropdown-border-radius: var(--r-lg); --bs-dropdown-padding-x: 0.375rem; --bs-dropdown-padding-y: 0.375rem;
  --bs-dropdown-box-shadow: var(--sombra-menu); --bs-dropdown-link-color: var(--nexo-texto);
  --bs-dropdown-link-hover-bg: var(--nexo-hover); --bs-dropdown-link-hover-color: var(--nexo-texto);
  --bs-dropdown-link-active-bg: var(--nexo-verde-claro); --bs-dropdown-link-active-color: var(--nexo-verde-oscuro);
  --bs-dropdown-item-padding-x: 0.625rem; --bs-dropdown-item-padding-y: 0.4375rem; --bs-dropdown-item-border-radius: var(--r-sm);
  --bs-dropdown-divider-margin-y: 0.375rem; --bs-dropdown-divider-bg: var(--nexo-separador);
  box-shadow: var(--bs-dropdown-box-shadow); animation: nexo-aparecer 0.12s ease-out;
}
.dropdown-item { display: flex; align-items: center; gap: var(--e-2); font-weight: 500; }
.dropdown-item .nexo-icono { color: var(--nexo-texto-2); }
.dropdown-divider { margin-inline: -0.375rem; }
.dropdown-header-usuario { padding: 0.375rem 0.625rem 0.5rem; font-size: 0.75rem; color: var(--nexo-texto-2); overflow-wrap: anywhere; }
@keyframes nexo-aparecer { from { opacity: 0; transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .dropdown-menu { animation: none; } }

/* ---------- Avisos ---------- */
.alert {
  --bs-alert-padding-x: var(--e-4); --bs-alert-padding-y: var(--e-3); --bs-alert-border-radius: var(--r); --bs-alert-margin-bottom: var(--e-4);
  display: flex; align-items: flex-start; gap: 0.625rem; font-size: 0.875rem; font-weight: 500; box-shadow: var(--sombra-1);
}
.alert > .nexo-icono { width: 1.125rem; height: 1.125rem; margin-top: 0.075rem; }
.alert-success { --bs-alert-color: #0b5a40; --bs-alert-bg: #effaf5; --bs-alert-border-color: rgba(0, 135, 93, 0.25); }
.alert-success > .nexo-icono { color: var(--nexo-verde); }
.alert-danger { --bs-alert-color: #8f1c26; --bs-alert-bg: var(--nexo-peligro-fondo); --bs-alert-border-color: rgba(220, 53, 69, 0.28); }
.alert-danger > .nexo-icono { color: var(--nexo-peligro); }
.alert-warning { --bs-alert-color: var(--nexo-aviso-texto); --bs-alert-bg: #fff9e8; --bs-alert-border-color: var(--nexo-aviso-borde); }
.alert-info { --bs-alert-color: var(--nexo-info-texto); --bs-alert-bg: var(--nexo-info-fondo); --bs-alert-border-color: var(--nexo-info-borde); }
.alert-dismissible { padding-right: 3rem; }
.alert-dismissible .btn-close { padding: 0.9rem 1rem; background-size: 0.625rem; }
.btn-close:focus { box-shadow: var(--nexo-anillo); }

/* Requisitos de la contraseña: semáforo rojo o verde según se cumple cada uno al escribir. */
.nexo-requisitos { font-size: 0.8125rem; color: var(--nexo-texto-2); padding: var(--e-3) var(--e-4) !important; background: var(--nexo-superficie-2); border: 1px solid var(--nexo-separador); border-radius: var(--r); }
.nexo-requisitos li { display: flex; align-items: baseline; gap: 0.625rem; padding-block: 0.1875rem; }
.nexo-semaforo { flex: none; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--nexo-peligro); box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.14); transition: background-color var(--transicion), box-shadow var(--transicion); transform: translateY(-1px); }
.nexo-cumple { color: var(--nexo-texto); }
/* Al restablecer la contraseña sin sesión los requisitos se muestran sin semáforo. */
.nexo-requisitos-fijos .nexo-semaforo { background: var(--nexo-texto-3); box-shadow: none; }
.nexo-cumple .nexo-semaforo { background: #1faa59; box-shadow: 0 0 0 3px rgba(31, 170, 89, 0.16); }

/* ---------- Anchos de página ---------- */
.nexo-estrecho { max-width: 860px; margin-inline: auto; }
.nexo-angosto { max-width: 520px; margin-inline: auto; }

/* Ingreso */
.nexo-ingreso { max-width: 400px; margin: 9vh auto 0; }
.nexo-ingreso-marca { margin-right: 0; margin-bottom: var(--e-3); }
.nexo-ingreso-marca .nexo-producto { font-size: 1.375rem; }
.nexo-ingreso .card-body { padding: var(--e-8); }
.nexo-ingreso-pie { display: flex; align-items: center; justify-content: center; gap: 0.375rem; margin-top: var(--e-5); font-size: 0.75rem; color: var(--nexo-texto-2); }
.nexo-ingreso-pie .nexo-icono { width: 0.8125rem; height: 0.8125rem; }
@media (max-width: 575.98px) { .nexo-ingreso { margin-top: 4vh; } .nexo-ingreso .card-body { padding: var(--e-6); } }

/* Diálogos de confirmación y páginas de error */
.nexo-dialogo .card-body { padding: var(--e-6); }
.nexo-dialogo-icono {
  display: grid; place-items: center; width: 2.5rem; height: 2.5rem; margin-bottom: var(--e-4); border-radius: 50%;
  background: var(--nexo-peligro-fondo); color: var(--nexo-peligro);
}
.nexo-dialogo-icono .nexo-icono { width: 1.25rem; height: 1.25rem; }
.nexo-dialogo-icono.nexo-exito { background: var(--nexo-verde-claro); color: var(--nexo-verde); }
.nexo-etiqueta-fila { display: flex; align-items: baseline; justify-content: space-between; gap: var(--e-3); margin-bottom: 0.375rem; }
.nexo-etiqueta-fila .form-label { margin-bottom: 0; }
.nexo-olvido { font-size: 0.8125rem; font-weight: 500; text-decoration: none; white-space: nowrap; }
.nexo-olvido:hover { text-decoration: underline; }
.nexo-dialogo-icono.nexo-neutro { background: var(--nexo-superficie-2); color: var(--nexo-texto-2); }
.nexo-dialogo h1 { font-size: 1.125rem; font-weight: 600; margin-bottom: var(--e-2); }
.nexo-dialogo p { color: var(--nexo-texto-2); }
.nexo-irreversible { display: flex; align-items: center; gap: var(--e-2); margin-top: var(--e-4); padding: 0.625rem var(--e-3); border-radius: var(--r); background: var(--nexo-peligro-fondo); color: var(--nexo-peligro-texto) !important; font-size: 0.8125rem; font-weight: 600; }
.nexo-irreversible .nexo-icono { width: 0.9375rem; height: 0.9375rem; }
.nexo-codigo { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--nexo-verde); margin-bottom: var(--e-2); }

/* Filtros: en móvil se pliegan detrás de un botón. */
.nexo-filtros .card-body { padding: var(--e-4) var(--e-5); }
.nexo-filtros .form-label { font-size: 0.75rem; font-weight: 500; color: var(--nexo-texto-2); margin-bottom: 0.25rem; }
.nexo-filtros-pie { display: flex; gap: var(--e-2); }
.nexo-filtros-boton { width: 100%; justify-content: space-between; }
.nexo-filtros-boton .nexo-contador { margin-left: auto; }
@media (max-width: 767.98px) { .nexo-filtros-pie > .btn { flex: 1 1 0; } }

/* Vista previa de adjuntos: todos los archivos del registro, uno debajo del otro. */
.nexo-vista { scroll-margin-top: 5rem; }
.nexo-vista > .card-header { font-size: 0.875rem; }
.nexo-vista:target { border-color: var(--nexo-verde); box-shadow: var(--nexo-anillo); }
/* Columna de la vista previa: 7/12 en pantallas medianas y 8/12 desde 1200 px (plantillas con col-xl-8). El PDF se
   abre al 95 % (#zoom=95 en la URL del iframe), como pidió el usuario. */
.nexo-vista-cuerpo { background: var(--nexo-superficie-2); display: flex; align-items: center; justify-content: center; min-height: 220px; padding: var(--e-2); }
.nexo-vista-cuerpo iframe { width: 100%; height: 80vh; border: 0; background: #fff; border-radius: var(--r-sm); box-shadow: var(--sombra-2); }
.nexo-vista-cuerpo img { max-width: 100%; max-height: 75vh; object-fit: contain; border-radius: var(--r-sm); box-shadow: var(--sombra-2); }
.nexo-vista-titulo { display: flex; align-items: center; gap: var(--e-2); min-width: 0; margin-right: auto; }
.nexo-vista-titulo span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nexo-vista-titulo .nexo-icono { color: var(--nexo-texto-2); }
@media (max-width: 991.98px) { .nexo-vista-cuerpo iframe { height: 65vh; } }

/* En móvil, el nombre del archivo o elemento ocupa su propia línea y las acciones van debajo. */
@media (max-width: 575.98px) {
  .nexo-card .list-group-item { flex-wrap: wrap; }
  .nexo-card .list-group-item > .me-auto { flex: 1 1 100%; }
  .nexo-card .nexo-archivo > .nexo-archivo-texto { flex: 1 1 calc(100% - 2.75rem); }
  .nexo-archivo-acciones { margin-left: 2.25rem; }
}

/* ---------- Tablero ---------- */
.nexo-meta-operar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--e-5) var(--e-8); }
.nexo-meta-cuenta { display: flex; align-items: center; gap: var(--e-4); }
.nexo-meta-icono { display: inline-flex; align-items: center; justify-content: center; width: 3rem; height: 3rem; border-radius: 50%; background: var(--nexo-verde-claro); color: var(--nexo-verde-oscuro); }
.nexo-meta-icono .nexo-icono { width: 1.5rem; height: 1.5rem; margin: 0; }
.nexo-meta-etiqueta { font-size: 0.75rem; font-weight: 600; color: var(--nexo-texto-2); text-transform: uppercase; letter-spacing: 0.03em; }
.nexo-meta-dias { font-size: 1.625rem; font-weight: 700; line-height: 1.2; color: var(--nexo-texto); font-variant-numeric: tabular-nums; }
.nexo-kpis { display: flex; flex-wrap: wrap; gap: var(--e-4) var(--e-8); margin: 0 0 0 auto; }
.nexo-kpis > div { min-width: 7.5rem; }
.nexo-kpis dt { font-size: 0.75rem; font-weight: 500; color: var(--nexo-texto-2); }
.nexo-kpis dd { margin: 0; font-size: 1.375rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.nexo-kpis dd small { font-size: 0.75rem; font-weight: 500; color: var(--nexo-texto-2); }
.nexo-kpi-barra { display: block; height: 0.375rem; margin-top: 0.25rem; border-radius: 999px; background: var(--nexo-superficie); overflow: hidden; }
.nexo-kpi-barra i { display: block; height: 100%; background: var(--nexo-verde); border-radius: 999px; }
@media (max-width: 767.98px) { .nexo-kpis { margin-left: 0; } .nexo-kpis > div { min-width: 40%; } }

.nexo-areas { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: var(--e-4); }
.nexo-area { border-top: 4px solid var(--color-semaforo, var(--nexo-separador)); }
.nexo-area .card-body { display: flex; flex-direction: column; gap: var(--e-2); }
.nexo-area .card-footer { padding-block: var(--e-2); }
.nexo-area-cabecera { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--e-2); }
/* Título siempre en dos líneas de alto (cortado con «…» si es más largo): las barras quedan a la misma altura en todas las tarjetas. */
.nexo-area-cabecera h2 {
  margin: 0; font-size: 1rem; font-weight: 700; min-width: 0; overflow-wrap: anywhere; line-height: 1.25;
  min-height: 2.5em; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
.nexo-area-pie { display: flex; justify-content: center; margin-top: auto; padding-top: var(--e-2); }
.nexo-area-cabecera h2 a { color: inherit; text-decoration: none; }
.nexo-area-cabecera h2 a:hover { color: var(--nexo-verde-oscuro); text-decoration: underline; }
.nexo-area-avance strong { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.nexo-area-avance span { font-size: 0.75rem; color: var(--nexo-texto-2); }
.nexo-area-datos { display: flex; flex-wrap: wrap; gap: var(--e-1) var(--e-4); margin: 0; padding: 0; list-style: none; font-size: 0.8125rem; }
.nexo-area-datos a { color: var(--nexo-texto); font-weight: 600; }
.nexo-area-datos a.text-danger { color: var(--nexo-peligro-texto) !important; }
.nexo-area-motivos { display: flex; gap: var(--e-2); margin: 0; font-size: 0.75rem; color: var(--nexo-texto-2); }
.nexo-area-motivos .nexo-icono { flex: none; width: 0.875rem; height: 0.875rem; margin-top: 0.15rem; color: var(--color-semaforo); }
.nexo-area-vacia { margin: 0; font-size: 0.8125rem; color: var(--nexo-texto-2); }
/* ---------- Templates corporativos ---------- */
.nexo-plantillas { display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: var(--e-4); }
.nexo-plantilla .card-body { display: flex; flex-direction: column; gap: var(--e-3); }
.nexo-plantilla-cabecera { display: flex; align-items: flex-start; gap: var(--e-3); }
.nexo-plantilla-cabecera > div { min-width: 0; }
.nexo-plantilla-cabecera .nexo-archivo-icono { width: 2.75rem; height: 2.75rem; font-size: 0.6875rem; }
.nexo-plantilla h2 {
  margin: 0; font-size: 1rem; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
.nexo-plantilla-meta { margin: var(--e-1) 0 0; font-size: 0.75rem; color: var(--nexo-texto-2); }
.nexo-plantilla-desc { margin: 0; font-size: 0.8125rem; color: var(--nexo-texto-2); }
.nexo-plantilla-pie { display: flex; flex-wrap: wrap; align-items: center; gap: var(--e-2); padding-block: var(--e-2); }
.nexo-plantilla-pie .nexo-btn-icono { padding-inline: 0.5rem; }
.nexo-plantilla-contador { display: inline-flex; align-items: center; gap: 0.375rem; margin-right: auto; font-size: 0.8125rem; color: var(--nexo-texto-2); }
.nexo-plantilla-contador strong { color: var(--nexo-texto); font-variant-numeric: tabular-nums; }
.nexo-plantilla-contador .nexo-icono { width: 0.875rem; height: 0.875rem; }

.nexo-area-rojo, .nexo-estado-area-rojo { --color-semaforo: #d7373f; }
.nexo-area-ambar, .nexo-estado-area-ambar { --color-semaforo: #e09b00; }
.nexo-area-verde, .nexo-estado-area-verde { --color-semaforo: #2a78d6; }
.nexo-area-listo, .nexo-estado-area-listo { --color-semaforo: var(--nexo-verde); }
.nexo-area-vacio, .nexo-estado-area-vacio { --color-semaforo: #b9bfc8; }
.nexo-estado-area {
  flex: none; display: inline-flex; align-items: center; gap: 0.3125rem; padding: 0.125rem 0.5rem; border-radius: 999px;
  border: 1px solid var(--nexo-separador); background: var(--nexo-superficie-2); font-size: 0.6875rem; font-weight: 600; white-space: nowrap;
}
.nexo-estado-area::before, .nexo-estado-area-punto { content: ""; display: inline-block; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--color-semaforo); }
.nexo-leyenda .nexo-estado-area-punto { margin-right: 0.375rem; }

/* ---------- Hosting ---------- */
.nexo-estado-hosting { font-size: 0.875rem; padding: 0.25rem 0.75rem; }
.nexo-estado-hosting::before { width: 0.625rem; height: 0.625rem; }
.nexo-kpi-barra i.nexo-uso-ambar { background: #e09b00; }
.nexo-kpi-barra i.nexo-uso-rojo { background: #d7373f; }
.nexo-hosting-proyeccion { display: flex; gap: var(--e-2); margin: 0 0 var(--e-4); font-size: 0.875rem; }
.nexo-hosting-proyeccion .nexo-icono { flex: none; margin-top: 0.2rem; color: var(--nexo-verde); }
.nexo-hosting-grafico svg { display: block; width: 100%; height: auto; overflow: visible; }
.nexo-hg-guia { stroke: var(--nexo-separador); stroke-width: 1; }
.nexo-hg-eje { fill: var(--nexo-texto-2); font-size: 11px; font-variant-numeric: tabular-nums; }
.nexo-hg-eje-hoy { fill: var(--nexo-texto); font-weight: 600; }
.nexo-hg-base { stroke: var(--nexo-borde-2); stroke-width: 1; }
.nexo-hg-dato { fill: #fff; stroke: var(--nexo-verde); stroke-width: 2; }
.nexo-hg-linea { fill: none; stroke: var(--nexo-verde); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.nexo-hg-proyeccion { stroke: var(--nexo-verde); stroke-width: 2; stroke-dasharray: 4 4; opacity: 0.6; }
.nexo-hg-limite { stroke: #d7373f; stroke-width: 1.5; stroke-dasharray: 6 4; }
.nexo-hg-hoy { stroke: var(--nexo-borde-2); stroke-width: 1; }
.nexo-hg-rotulo { font-size: 11px; font-weight: 600; }
.nexo-hg-rotulo-limite { fill: #b42a36; }
.nexo-hg-marca { fill: var(--nexo-verde); stroke: #fff; stroke-width: 2; }
/* Zona de cursor más grande que la marca; se ve al pasar o al enfocar con el teclado. */
.nexo-hg-punto { fill: transparent; cursor: default; }
.nexo-hg-punto:hover, .nexo-hg-punto:focus-visible { fill: rgba(0, 135, 93, 0.18); outline: none; }
.nexo-leyenda i.nexo-hg-leyenda-linea { height: 2px; width: 1rem; border-radius: 1px; background: var(--nexo-verde); vertical-align: middle; }
.nexo-leyenda i.nexo-hg-leyenda-proyeccion { height: 0; width: 1rem; border-radius: 0; border-top: 2px dashed var(--nexo-verde); opacity: 0.6; vertical-align: middle; }
.nexo-leyenda i.nexo-hg-leyenda-limite { height: 0; width: 1rem; border-radius: 0; border-top: 2px dashed #d7373f; vertical-align: middle; }

/* ---------- Impresión ---------- */
@media print {
  body { background: #fff; font-size: 9pt; }
  .nexo-card, .btn-group, .input-group { box-shadow: none; }
  .nexo-card { border-color: #d8dbe0; }
  .nexo-encabezado { margin-bottom: 0.5rem; }
  .nexo-enlace-fila { text-decoration: none; }
  /* Al imprimir o guardar en PDF la tabla se ajusta al ancho de la hoja: letra menor y el texto largo
     ocupa varias líneas en vez de recortarse. */
  main.container-xxl { max-width: none; padding: 0; }
  .table-responsive { overflow: visible; }
  .nexo-tabla-compacta { width: 100%; font-size: 7.5pt; }
  .nexo-tabla-compacta > :not(caption) > * > * { padding: 0.2rem 0.3rem; }
  .nexo-tabla-compacta thead th { font-size: 6.5pt; letter-spacing: 0; }
  .nexo-tabla-compacta td { white-space: normal; }
  .nexo-tabla-compacta td:first-child, .nexo-tabla-compacta .nexo-importe { white-space: nowrap; }
  .nexo-celda-larga, .nexo-celda-media { width: auto; min-width: 0; max-width: none; overflow: visible; }
}

/* Márgenes de hoja estrechos (como «Estrecho» de Word: 1,27 cm). */
@page { margin: 1.27cm; }

/* Contraseñas: valores en una línea, botones de icono compactos y aviso «copiado» flotante. */
.nexo-claves .nexo-btn-icono { padding: 0.125rem 0.375rem; }
.nexo-claves-valor { display: inline-block; max-width: 16rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.8125rem; }
.nexo-claves-secreto { letter-spacing: 0.1em; color: var(--nexo-texto-3); }
.nexo-claves-buscar { flex: 1 1 18rem; max-width: 32rem; }
.nexo-aviso-flotante {
  position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%); z-index: 1080; padding: 0.5rem 1rem;
  border-radius: var(--r-sm); background: var(--nexo-texto); color: #fff; font-size: 0.875rem; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
/* Código de ingreso por correo: seis cajitas, una por dígito. */
.nexo-codigo-cajas { display: flex; gap: 0.5rem; justify-content: space-between; margin-bottom: 0.5rem; }
.nexo-codigo-caja {
  flex: 1 1 0; min-width: 0; max-width: 3.25rem; height: 3.5rem; padding: 0; text-align: center; font-size: 1.5rem;
  font-weight: 700; font-variant-numeric: tabular-nums; caret-color: var(--nexo-verde);
}

/* Recuadro «Reenvía tus comprobantes a gastos@…» (lista de Gastos y Nuevo registro). */
.nexo-aviso-correo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 1rem;
  background: var(--nexo-info-fondo);
  border: 1px solid var(--nexo-info-borde);
  border-radius: var(--nexo-radio);
  color: var(--nexo-info-texto);
  font-size: 0.875rem;
  line-height: 1.45;
}
.nexo-aviso-correo-icono { display: inline-flex; flex: none; }
.nexo-aviso-correo-icono svg { width: 1.35rem; height: 1.35rem; }
.nexo-aviso-correo-texto { flex: 1; min-width: 0; }
.nexo-aviso-correo-dir { font-weight: 700; color: inherit; white-space: nowrap; }
.nexo-aviso-correo-desde { display: block; font-size: 0.8125rem; opacity: 0.85; }
.nexo-aviso-correo-desde a { color: inherit; }
.nexo-aviso-correo-copiar { flex: none; background: #fff; }
@media (max-width: 575.98px) {
  .nexo-aviso-correo { flex-wrap: wrap; }
  .nexo-aviso-correo-copiar { margin-left: auto; }
}

/* Caja chica: fijar el saldo inicial del mes (no se arrastra el del mes anterior). */
.nexo-caja-editar { margin-top: 0.5rem; font-size: 0.8125rem; }
.nexo-caja-editar summary { display: inline-flex; align-items: center; gap: 0.3rem; cursor: pointer; color: var(--nexo-verde-oscuro); font-weight: 600; list-style: none; }
.nexo-caja-editar summary::-webkit-details-marker { display: none; }
.nexo-caja-editar summary svg { width: 0.95rem; height: 0.95rem; }
.nexo-caja-editar input { max-width: 9rem; }
