/* ============================================================
   INTER TIGHT - TIPOGRAFIA UNIVERSAL DEL SISTEMA
   ------------------------------------------------------------
   Inter Tight manda por encima de todo el texto real del ERP:
   body, inputs, selects, checkboxes, placeholders, calendario,
   tablas, menus, botones, modales y widgets de terceros.

   Cargar SIEMPRE como ULTIMO stylesheet del <head> (gana por
   orden de cascada + !important).

   Excepciones intencionales (NO son tipografia de texto):
     - Fuentes de icono: Tabler Icons (.ti / <i>), FontAwesome
       (.fa*), flag-icons (.fi). Ganan por su propia especificidad
       de clase; ademas excluimos <i> del selector universal.
     - Campos monoespaciados (.mono): conservan su fuente para
       alinear codigos/numeros (mayor especificidad, no se tocan).
     - Logo de marca "nexa cloud" (SVG <text>): conserva Montserrat
       (re-afirmado al final de este archivo).
   ============================================================ */

/* Base Bootstrap: redefinir variables de fuente del template
   (afecta a todo lo que herede de --bs-font-sans-serif). */
:root,
.light-style,
.dark-style {
  --bs-font-sans-serif: 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
  --bs-body-font-family: 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
}

/* Selector universal de texto.
   `body *:not(i)` = baja especificidad (0,0,2): cualquier regla
   basada en clase (iconos .ti/.fa/.fi, campos .mono) la sobrescribe,
   por lo que se preservan automaticamente. */
html,
body,
body *:not(i) {
  font-family: 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
}

/* Controles de formulario: NO heredan font-family por defecto del
   navegador -> regla explicita. */
input,
select,
textarea,
button,
optgroup,
option,
.form-control,
.form-select,
.form-check-label {
  font-family: 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
}

/* Placeholders (todos los prefijos). */
::placeholder,
::-webkit-input-placeholder,
:-ms-input-placeholder,
::-ms-input-placeholder {
  font-family: 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
}

/* Widgets de terceros que se inyectan en <body> (refuerzo explicito;
   el selector universal ya los cubre, pero algunos definen su propia
   font-family). Flatpickr=calendario, Select2, Choices, SweetAlert2,
   DataTables, dropdowns/tooltips/popovers de Bootstrap. */
.flatpickr-calendar, .flatpickr-calendar *,
.select2-container, .select2-container *,
.swal2-container, .swal2-popup, .swal2-popup *,
.choices, .choices *,
.dataTables_wrapper, .dataTables_wrapper *,
.dropdown-menu, .dropdown-menu *,
.tooltip, .tooltip *,
.popover, .popover *,
.toast, .toast * {
  font-family: 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
}

/* --- Re-afirmacion del logo de marca: conserva Montserrat ---
   (ultima regla del archivo -> gana sobre el selector universal). */
svg text {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}
