/* ===== Admin Typography (unificado) ===== */
:root{
  /* Escala tipográfica base (REM sobre 16px de Bootstrap) */
  --fs-xxs: 0.75rem;   /* 12px */
  --fs-xs:  0.8125rem; /* 13px */
  --fs-sm:  0.875rem;  /* 14px */
  --fs-md:  1rem;      /* 16px */
  --fs-lg:  1.125rem;  /* 18px */
  --fs-xl:  1.25rem;   /* 20px */
  --fs-2xl: 1.5rem;    /* 24px */
  --fs-3xl: 1.875rem;  /* 30px */

  --lh-tight: 1.2;
  --lh-base:  1.5;
  --lh-relax: 1.7;

  /* Peso por defecto para títulos */
  --fw-headings: 600;
}

/* Base del documento */
html { font-size: 100%; } /* Mantén 16px base para no romper Bootstrap */
body {
  font-size: var(--fs-md);
  line-height: var(--lh-base);
}

/* Encabezados: normalizamos jerarquía (Bootstrap tiende a exagerar) */
h1, .h1 { font-size: var(--fs-3xl); line-height: var(--lh-tight); font-weight: var(--fw-headings); }
h2, .h2 { font-size: var(--fs-2xl); line-height: var(--lh-tight); font-weight: var(--fw-headings); }
h3, .h3 { font-size: var(--fs-xl);  line-height: var(--lh-tight); font-weight: var(--fw-headings); }
h4, .h4 { font-size: var(--fs-lg);  line-height: var(--lh-tight); font-weight: var(--fw-headings); }
h5, .h5 { font-size: var(--fs-md);  line-height: var(--lh-tight); font-weight: var(--fw-headings); }
h6, .h6 { font-size: var(--fs-sm);  line-height: var(--lh-tight); font-weight: var(--fw-headings); }

/* Texto y auxiliares */
p, li, dd, dt, label, input, select, textarea, .form-control, .form-select, .nav-link, .dropdown-item {
  font-size: var(--fs-md);
  line-height: var(--lh-base);
}

small, .small, .form-text, .text-muted { font-size: var(--fs-sm); line-height: var(--lh-relax); }

/* Botones y badges */
.btn       { font-size: var(--fs-sm); line-height: var(--lh-tight); }
.btn-lg    { font-size: var(--fs-md); }
.btn-sm    { font-size: var(--fs-xs); }

.badge     { font-size: var(--fs-xs); line-height: 1; }

/* Tablas (admin suele ser denso) */
.table, .table td, .table th { font-size: var(--fs-sm); }
.table .small { font-size: var(--fs-xxs); }

/* Cards, modales, offcanvas */
.card, .modal, .offcanvas { font-size: var(--fs-md); }
.card-title { font-size: var(--fs-lg); font-weight: var(--fw-headings); }
.card-subtitle, .card .text-muted { font-size: var(--fs-sm); }

/* Navs, tabs y breadcrumbs */
.nav, .nav-tabs .nav-link, .breadcrumb { font-size: var(--fs-sm); }

/* Formularios: ayuda y feedback */
.form-label, .col-form-label { font-size: var(--fs-sm); }
.invalid-feedback, .valid-feedback { font-size: var(--fs-sm); }

/* DataTables (si lo usas) */
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate,
.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
  font-size: var(--fs-sm);
}

/* Utilidades propias por si necesitas en vistas */
.fs-xxs { font-size: var(--fs-xxs) !important; }
.fs-xs  { font-size: var(--fs-xs)  !important; }
.fs-sm  { font-size: var(--fs-sm)  !important; }
.fs-md  { font-size: var(--fs-md)  !important; }
.fs-lg  { font-size: var(--fs-lg)  !important; }
.fs-xl  { font-size: var(--fs-xl)  !important; }
.fs-2xl { font-size: var(--fs-2xl) !important; }
.fs-3xl { font-size: var(--fs-3xl) !important; }

/* Anti-caos: neutraliza inlines puntuales que rompen la escala */
*[style*="font-size"] { font-size: inherit !important; }
