/*
 * NOTIKIT — capa de compatibilidad Bootstrap 4 -> Bootstrap 5 (Frest 5.1.0)
 * ---------------------------------------------------------------------------
 * Archivo propio de Notikit (no viene de AltumCode ni de Frest).
 *
 * Las vistas del producto (66socialproof) estan escritas para Bootstrap 4.6.
 * El panel de usuario carga el Bootstrap 5.3 de Frest, asi que aca se definen,
 * con estetica Frest, las clases de BS4 que BS5 elimino o renombro. La idea es
 * NO reescribir las vistas: cada vista tocada es un conflicto en el proximo
 * `git merge upstream`.
 *
 * Orden de carga (ver themes/altum/views/app_wrapper.php):
 *   frest core.css -> frest theme-default.css -> custom.css (producto)
 *   -> bs4-compat.css (este) -> notikit-panel.css
 *
 * Como regenerar la lista de clases a cubrir:
 *   node scripts/frest-bs4-audit.mjs            # huecos: clases usadas, sin definir, que BS4 si estilaba
 *   node scripts/frest-bs4-audit.mjs --rules    # idem + la regla original del BS4 del producto
 *   node scripts/frest-bs4-audit.mjs --all      # todo lo que no tiene ninguna regla
 * Si el primer comando no imprime nada, la capa esta completa.
 *
 * Tema oscuro: Frest usa hojas separadas (core-dark.css) con colores fijos, asi
 * que aca todo color sale de variables --nk-* definidas dos veces (claro y
 * html.dark-style).
 */

/* ==========================================================================
   1. Tokens
   ========================================================================== */
:root {
  --nk-primary: #5a8dee;
  --nk-primary-rgb: 90, 141, 238;
  --nk-secondary: #69809a;
  --nk-success: #39da8a;
  --nk-info: #00cfdd;
  --nk-warning: #fdac41;
  --nk-danger: #ff5b5c;
  --nk-dark: #495563;

  --nk-body-bg: #f2f2f6;
  --nk-card-bg: #fff;
  --nk-input-bg: #fff;
  --nk-body-color: #677788;
  --nk-heading-color: #516377;
  --nk-muted: #62707f; /* era #a8b1bb (2,2:1 sobre blanco); este da 5:1 sobre blanco */
  --nk-border: #d4d8dd;
  --nk-border-soft: #e9ecee;
  --nk-hover-bg: rgba(38, 60, 85, 0.04);
  --nk-soft-bg: rgba(38, 60, 85, 0.06);
  --nk-shadow: 0 2px 14px rgba(38, 60, 85, 0.16);
  --nk-label-opacity: 0.16;

  /* Variables que el CSS/JS del producto espera del Bootstrap 4 de AltumCode */
  --primary: var(--nk-primary);
  --secondary: var(--nk-secondary);
  --success: var(--nk-success);
  --info: var(--nk-info);
  --warning: var(--nk-warning);
  --danger: var(--nk-danger);
  --light: #f2f2f6;
  --dark: var(--nk-dark);
  --white: #fff;
  --black: #263c55;
  --gray: #69809a;
  --gray-dark: #495563;
  --gray-50: #f9fafb;
  --gray-100: #f4f5f7;
  --gray-200: #e9ecee;
  --gray-300: #d4d8dd;
  --gray-400: #bdc4cc;
  --gray-500: #a8b1bb;
  --gray-600: #7d8a9a;
  --gray-700: #677788;
  --gray-800: #516377;
  --gray-900: #3c5066;
  --primary-50: #f4f7fe;
  --primary-100: #e5edfc;
  --primary-200: #c8d9f9;
  --primary-300: #a3bff5;
  --primary-400: #7ea6f1;
  --primary-600: #4c7ad2;
  --primary-700: #3f66b3;
  --primary-800: #2c477d;
  --primary-900: #1c2e52;
  --body-bg: var(--nk-body-bg);
  --body-color: var(--nk-body-color);
  --border-radius: 0.3125rem;
  --input-border-color: var(--nk-border);
  --input-color: var(--nk-body-color);
  --input-placeholder-color: var(--nk-muted);
  --input-padding-y: 0.469rem;
  --input-padding-x: 0.735rem;
  --input-font-size: 0.9375rem;
  --card-padding: 1.375rem;
}

html.dark-style {
  --nk-body-bg: #1c222f;
  --nk-card-bg: #283144;
  --nk-input-bg: #283144;
  --nk-body-color: #a1b0cb;
  --nk-heading-color: #d8deea;
  --nk-muted: #8295ba;
  --nk-border: #36445d;
  --nk-border-soft: #323d55;
  --nk-hover-bg: rgba(255, 255, 255, 0.04);
  --nk-soft-bg: rgba(255, 255, 255, 0.06);
  --nk-shadow: 0 2px 14px rgba(0, 0, 0, 0.25);
  --nk-label-opacity: 0.2;

  --light: #323d55;
  --dark: #d8deea;
  --white: #283144;
  --black: #fff;
  --gray: #8295ba;
  --gray-dark: #d8deea;
  --gray-50: #232b3c;
  --gray-100: #2e384d;
  --gray-200: #36445d;
  --gray-300: #44536f;
  --gray-400: #5f7093;
  --gray-500: #8295ba;
  --gray-600: #94a4c4;
  --gray-700: #a1b0cb;
  --gray-800: #c3cde0;
  --gray-900: #d8deea;
  --primary-50: #242d42;
  --primary-100: #2c3a59;
  --primary-200: #34497a;
  --primary-300: #3f5fa6;
  --primary-400: #4c76ca;
  --primary-600: #7aa3f1;
  --primary-700: #9bbaf5;
  --primary-800: #bdd1f8;
  --primary-900: #dee8fc;
}

/* ==========================================================================
   2. Espaciado direccional: ml/mr/pl/pr (BS5: ms/me/ps/pe)
   Bloque generado. Para regenerarlo:
     node -e "const bp=['','sm','md','lg','xl'],w={sm:576,md:768,lg:992,xl:1200},s={0:'0',1:'.25rem',2:'.5rem',3:'1rem',4:'1.5rem',5:'3rem'},p={ml:'margin-left',mr:'margin-right',pl:'padding-left',pr:'padding-right'};let o='';for(const b of bp){let r='';for(const k in p){for(const n in s)r+='.'+k+(b?'-'+b:'')+'-'+n+'{'+p[k]+':'+s[n]+' !important}';if(k[0]=='m'){r+='.'+k+(b?'-'+b:'')+'-auto{'+p[k]+':auto !important}';for(const n of [1,2,3,4,5])r+='.'+k+(b?'-'+b:'')+'-n'+n+'{'+p[k]+':-'+s[n]+' !important}'}}o+=b?'@media (min-width:'+w[b]+'px){'+r+'}\n':r+'\n'}console.log(o)"
   En RTL, Frest ya invierte ms/me; estas quedan fisicas como en el BS4 LTR.
   ========================================================================== */
.ml-0{margin-left:0 !important}.ml-1{margin-left:.25rem !important}.ml-2{margin-left:.5rem !important}.ml-3{margin-left:1rem !important}.ml-4{margin-left:1.5rem !important}.ml-5{margin-left:3rem !important}.ml-auto{margin-left:auto !important}.ml-n1{margin-left:-.25rem !important}.ml-n2{margin-left:-.5rem !important}.ml-n3{margin-left:-1rem !important}.ml-n4{margin-left:-1.5rem !important}.ml-n5{margin-left:-3rem !important}.mr-0{margin-right:0 !important}.mr-1{margin-right:.25rem !important}.mr-2{margin-right:.5rem !important}.mr-3{margin-right:1rem !important}.mr-4{margin-right:1.5rem !important}.mr-5{margin-right:3rem !important}.mr-auto{margin-right:auto !important}.mr-n1{margin-right:-.25rem !important}.mr-n2{margin-right:-.5rem !important}.mr-n3{margin-right:-1rem !important}.mr-n4{margin-right:-1.5rem !important}.mr-n5{margin-right:-3rem !important}.pl-0{padding-left:0 !important}.pl-1{padding-left:.25rem !important}.pl-2{padding-left:.5rem !important}.pl-3{padding-left:1rem !important}.pl-4{padding-left:1.5rem !important}.pl-5{padding-left:3rem !important}.pr-0{padding-right:0 !important}.pr-1{padding-right:.25rem !important}.pr-2{padding-right:.5rem !important}.pr-3{padding-right:1rem !important}.pr-4{padding-right:1.5rem !important}.pr-5{padding-right:3rem !important}
@media (min-width:576px){.ml-sm-0{margin-left:0 !important}.ml-sm-1{margin-left:.25rem !important}.ml-sm-2{margin-left:.5rem !important}.ml-sm-3{margin-left:1rem !important}.ml-sm-4{margin-left:1.5rem !important}.ml-sm-5{margin-left:3rem !important}.ml-sm-auto{margin-left:auto !important}.ml-sm-n1{margin-left:-.25rem !important}.ml-sm-n2{margin-left:-.5rem !important}.ml-sm-n3{margin-left:-1rem !important}.ml-sm-n4{margin-left:-1.5rem !important}.ml-sm-n5{margin-left:-3rem !important}.mr-sm-0{margin-right:0 !important}.mr-sm-1{margin-right:.25rem !important}.mr-sm-2{margin-right:.5rem !important}.mr-sm-3{margin-right:1rem !important}.mr-sm-4{margin-right:1.5rem !important}.mr-sm-5{margin-right:3rem !important}.mr-sm-auto{margin-right:auto !important}.mr-sm-n1{margin-right:-.25rem !important}.mr-sm-n2{margin-right:-.5rem !important}.mr-sm-n3{margin-right:-1rem !important}.mr-sm-n4{margin-right:-1.5rem !important}.mr-sm-n5{margin-right:-3rem !important}.pl-sm-0{padding-left:0 !important}.pl-sm-1{padding-left:.25rem !important}.pl-sm-2{padding-left:.5rem !important}.pl-sm-3{padding-left:1rem !important}.pl-sm-4{padding-left:1.5rem !important}.pl-sm-5{padding-left:3rem !important}.pr-sm-0{padding-right:0 !important}.pr-sm-1{padding-right:.25rem !important}.pr-sm-2{padding-right:.5rem !important}.pr-sm-3{padding-right:1rem !important}.pr-sm-4{padding-right:1.5rem !important}.pr-sm-5{padding-right:3rem !important}}
@media (min-width:768px){.ml-md-0{margin-left:0 !important}.ml-md-1{margin-left:.25rem !important}.ml-md-2{margin-left:.5rem !important}.ml-md-3{margin-left:1rem !important}.ml-md-4{margin-left:1.5rem !important}.ml-md-5{margin-left:3rem !important}.ml-md-auto{margin-left:auto !important}.ml-md-n1{margin-left:-.25rem !important}.ml-md-n2{margin-left:-.5rem !important}.ml-md-n3{margin-left:-1rem !important}.ml-md-n4{margin-left:-1.5rem !important}.ml-md-n5{margin-left:-3rem !important}.mr-md-0{margin-right:0 !important}.mr-md-1{margin-right:.25rem !important}.mr-md-2{margin-right:.5rem !important}.mr-md-3{margin-right:1rem !important}.mr-md-4{margin-right:1.5rem !important}.mr-md-5{margin-right:3rem !important}.mr-md-auto{margin-right:auto !important}.mr-md-n1{margin-right:-.25rem !important}.mr-md-n2{margin-right:-.5rem !important}.mr-md-n3{margin-right:-1rem !important}.mr-md-n4{margin-right:-1.5rem !important}.mr-md-n5{margin-right:-3rem !important}.pl-md-0{padding-left:0 !important}.pl-md-1{padding-left:.25rem !important}.pl-md-2{padding-left:.5rem !important}.pl-md-3{padding-left:1rem !important}.pl-md-4{padding-left:1.5rem !important}.pl-md-5{padding-left:3rem !important}.pr-md-0{padding-right:0 !important}.pr-md-1{padding-right:.25rem !important}.pr-md-2{padding-right:.5rem !important}.pr-md-3{padding-right:1rem !important}.pr-md-4{padding-right:1.5rem !important}.pr-md-5{padding-right:3rem !important}}
@media (min-width:992px){.ml-lg-0{margin-left:0 !important}.ml-lg-1{margin-left:.25rem !important}.ml-lg-2{margin-left:.5rem !important}.ml-lg-3{margin-left:1rem !important}.ml-lg-4{margin-left:1.5rem !important}.ml-lg-5{margin-left:3rem !important}.ml-lg-auto{margin-left:auto !important}.ml-lg-n1{margin-left:-.25rem !important}.ml-lg-n2{margin-left:-.5rem !important}.ml-lg-n3{margin-left:-1rem !important}.ml-lg-n4{margin-left:-1.5rem !important}.ml-lg-n5{margin-left:-3rem !important}.mr-lg-0{margin-right:0 !important}.mr-lg-1{margin-right:.25rem !important}.mr-lg-2{margin-right:.5rem !important}.mr-lg-3{margin-right:1rem !important}.mr-lg-4{margin-right:1.5rem !important}.mr-lg-5{margin-right:3rem !important}.mr-lg-auto{margin-right:auto !important}.mr-lg-n1{margin-right:-.25rem !important}.mr-lg-n2{margin-right:-.5rem !important}.mr-lg-n3{margin-right:-1rem !important}.mr-lg-n4{margin-right:-1.5rem !important}.mr-lg-n5{margin-right:-3rem !important}.pl-lg-0{padding-left:0 !important}.pl-lg-1{padding-left:.25rem !important}.pl-lg-2{padding-left:.5rem !important}.pl-lg-3{padding-left:1rem !important}.pl-lg-4{padding-left:1.5rem !important}.pl-lg-5{padding-left:3rem !important}.pr-lg-0{padding-right:0 !important}.pr-lg-1{padding-right:.25rem !important}.pr-lg-2{padding-right:.5rem !important}.pr-lg-3{padding-right:1rem !important}.pr-lg-4{padding-right:1.5rem !important}.pr-lg-5{padding-right:3rem !important}}
@media (min-width:1200px){.ml-xl-0{margin-left:0 !important}.ml-xl-1{margin-left:.25rem !important}.ml-xl-2{margin-left:.5rem !important}.ml-xl-3{margin-left:1rem !important}.ml-xl-4{margin-left:1.5rem !important}.ml-xl-5{margin-left:3rem !important}.ml-xl-auto{margin-left:auto !important}.ml-xl-n1{margin-left:-.25rem !important}.ml-xl-n2{margin-left:-.5rem !important}.ml-xl-n3{margin-left:-1rem !important}.ml-xl-n4{margin-left:-1.5rem !important}.ml-xl-n5{margin-left:-3rem !important}.mr-xl-0{margin-right:0 !important}.mr-xl-1{margin-right:.25rem !important}.mr-xl-2{margin-right:.5rem !important}.mr-xl-3{margin-right:1rem !important}.mr-xl-4{margin-right:1.5rem !important}.mr-xl-5{margin-right:3rem !important}.mr-xl-auto{margin-right:auto !important}.mr-xl-n1{margin-right:-.25rem !important}.mr-xl-n2{margin-right:-.5rem !important}.mr-xl-n3{margin-right:-1rem !important}.mr-xl-n4{margin-right:-1.5rem !important}.mr-xl-n5{margin-right:-3rem !important}.pl-xl-0{padding-left:0 !important}.pl-xl-1{padding-left:.25rem !important}.pl-xl-2{padding-left:.5rem !important}.pl-xl-3{padding-left:1rem !important}.pl-xl-4{padding-left:1.5rem !important}.pl-xl-5{padding-left:3rem !important}.pr-xl-0{padding-right:0 !important}.pr-xl-1{padding-right:.25rem !important}.pr-xl-2{padding-right:.5rem !important}.pr-xl-3{padding-right:1rem !important}.pr-xl-4{padding-right:1.5rem !important}.pr-xl-5{padding-right:3rem !important}}

/* Escalones extra del Bootstrap de AltumCode (6..10) que usan algunas vistas */
.mt-6, .my-6 { margin-top: 4rem !important; }
.mb-6, .my-6 { margin-bottom: 4rem !important; }
.mt-7, .my-7 { margin-top: 5rem !important; }
.mb-7, .my-7 { margin-bottom: 5rem !important; }
.mt-8, .my-8 { margin-top: 6rem !important; }
.mb-8, .my-8 { margin-bottom: 6rem !important; }
.mt-9, .my-9 { margin-top: 8rem !important; }
.mt-10, .my-10 { margin-top: 10rem !important; }
.py-6 { padding-top: 4rem !important; padding-bottom: 4rem !important; }
.py-7 { padding-top: 5rem !important; padding-bottom: 5rem !important; }
@media (min-width: 992px) {
  .mb-lg-6 { margin-bottom: 4rem !important; }
  .py-lg-6 { padding-top: 4rem !important; padding-bottom: 4rem !important; }
}

/* ==========================================================================
   3. Texto, floats, bordes, redondeos
   ========================================================================== */
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }
@media (min-width: 576px) { .text-sm-left { text-align: left !important; } .text-sm-right { text-align: right !important; } }
@media (min-width: 768px) { .text-md-left { text-align: left !important; } .text-md-right { text-align: right !important; } }
@media (min-width: 992px) { .text-lg-left { text-align: left !important; } .text-lg-right { text-align: right !important; } }
@media (min-width: 1200px) { .text-xl-left { text-align: left !important; } .text-xl-right { text-align: right !important; } }

.float-left { float: left !important; }
.float-right { float: right !important; }

.font-weight-light { font-weight: 300 !important; }
.font-weight-lighter { font-weight: lighter !important; }
.font-weight-normal { font-weight: 400 !important; }
.font-weight-bold { font-weight: 600 !important; }
.font-weight-bolder { font-weight: 700 !important; }
.font-italic { font-style: italic !important; }
.text-monospace { font-family: var(--bs-font-monospace) !important; }
.text-decoration-none { text-decoration: none !important; }
.text-hide { font: 0/0 a; color: transparent; text-shadow: none; background-color: transparent; border: 0; }

.sr-only {
  position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important;
  overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important;
}

.border-left { border-left: 1px solid var(--nk-border) !important; }
.border-right { border-right: 1px solid var(--nk-border) !important; }
.border-left-0 { border-left: 0 !important; }
.border-right-0 { border-right: 0 !important; }
.rounded-left { border-top-left-radius: 0.25rem !important; border-bottom-left-radius: 0.25rem !important; }
.rounded-right { border-top-right-radius: 0.25rem !important; border-bottom-right-radius: 0.25rem !important; }
.rounded-sm { border-radius: 0.2rem !important; }
.rounded-lg { border-radius: 0.5rem !important; }

.no-gutters { --bs-gutter-x: 0; --bs-gutter-y: 0; margin-right: 0; margin-left: 0; }
.no-gutters > .col, .no-gutters > [class*="col-"] { padding-right: 0; padding-left: 0; }

.media { display: flex; align-items: flex-start; }
.media-body { flex: 1; }

.embed-responsive { position: relative; display: block; width: 100%; padding: 0; overflow: hidden; }
.embed-responsive::before { display: block; content: ""; }
.embed-responsive-16by9::before { padding-top: 56.25%; }
.embed-responsive-4by3::before { padding-top: 75%; }
.embed-responsive-1by1::before { padding-top: 100%; }
.embed-responsive .embed-responsive-item, .embed-responsive iframe, .embed-responsive embed, .embed-responsive object, .embed-responsive video {
  position: absolute; top: 0; bottom: 0; left: 0; width: 100%; height: 100%; border: 0;
}

.jumbotron { padding: 2rem 1.375rem; margin-bottom: 2rem; background-color: var(--nk-card-bg); border-radius: 0.3125rem; box-shadow: var(--nk-shadow); }
.card-deck { display: flex; flex-flow: row wrap; gap: 1.625rem; }
.card-deck > .card { flex: 1 0 0%; margin-bottom: 0; }

/* Paletas extendidas del Bootstrap de AltumCode */
.bg-white { background-color: var(--nk-card-bg) !important; }
.bg-gray-50 { background-color: var(--gray-50) !important; }
.bg-gray-100 { background-color: var(--gray-100) !important; }
.bg-gray-200 { background-color: var(--gray-200) !important; }
.bg-gray-300 { background-color: var(--gray-300) !important; }
.bg-primary-50 { background-color: var(--primary-50) !important; }
.bg-primary-100 { background-color: var(--primary-100) !important; }
.bg-primary-200 { background-color: var(--primary-200) !important; }
.text-gray-300 { color: var(--gray-300) !important; }
.text-gray-400 { color: var(--gray-400) !important; }
.text-gray-500 { color: var(--gray-500) !important; }
.text-gray-600 { color: var(--gray-600) !important; }
.text-gray-700 { color: var(--gray-700) !important; }
.text-gray-800 { color: var(--gray-800) !important; }
.text-gray-900 { color: var(--gray-900) !important; }
.text-primary-600 { color: var(--primary-600) !important; }
.text-primary-700 { color: var(--primary-700) !important; }
.text-primary-800 { color: var(--primary-800) !important; }
.text-primary-900 { color: var(--primary-900) !important; }
.border-gray-50 { border-color: var(--gray-50) !important; }
.border-gray-100 { border-color: var(--gray-100) !important; }
.border-gray-200 { border-color: var(--gray-200) !important; }
.border-gray-300 { border-color: var(--gray-300) !important; }

/* ==========================================================================
   4. Badges (BS4: .badge-<color>; BS5: .bg-<color>) — estilo "label" de Frest
   ========================================================================== */
.badge { --bs-badge-color: var(--nk-body-color); }
.badge-pill { border-radius: 50rem !important; }
.badge-primary { background-color: rgba(90, 141, 238, var(--nk-label-opacity)) !important; color: #5a8dee !important; }
.badge-secondary { background-color: rgba(105, 128, 154, var(--nk-label-opacity)) !important; color: #69809a !important; }
.badge-success { background-color: rgba(57, 218, 138, var(--nk-label-opacity)) !important; color: #2bbd73 !important; }
.badge-info { background-color: rgba(0, 207, 221, var(--nk-label-opacity)) !important; color: #00b3c0 !important; }
.badge-warning { background-color: rgba(253, 172, 65, var(--nk-label-opacity)) !important; color: #e8922a !important; }
.badge-danger { background-color: rgba(255, 91, 92, var(--nk-label-opacity)) !important; color: #ff5b5c !important; }
.badge-light { background-color: var(--nk-soft-bg) !important; color: var(--nk-body-color) !important; }
.badge-dark { background-color: rgba(73, 85, 99, var(--nk-label-opacity)) !important; color: var(--nk-heading-color) !important; }
html.dark-style .badge-secondary { color: #a1b0cb !important; }
a.badge { text-decoration: none; transition: filter 0.15s ease-in-out; }
a.badge:hover { filter: brightness(0.94); }

/* ==========================================================================
   5. Botones
   ========================================================================== */
.btn-block { display: block; width: 100%; }
.btn-block + .btn-block { margin-top: 0.5rem; }

.btn-light, .btn-gray-50, .btn-gray-100, .btn-gray-200, .btn-gray-300 {
  color: var(--nk-heading-color);
  background-color: var(--nk-soft-bg);
  border-color: transparent;
}
.btn-light:hover, .btn-gray-50:hover, .btn-gray-100:hover, .btn-gray-200:hover, .btn-gray-300:hover,
.btn-light:focus, .btn-gray-200:focus, .btn-light.active, .btn-gray-200.active {
  color: var(--nk-heading-color);
  background-color: rgba(105, 128, 154, 0.2);
  border-color: transparent;
}
.btn-gray-900 { color: #fff; background-color: #495563; border-color: #495563; }
.btn-gray-900:hover { color: #fff; background-color: #3c4652; border-color: #3c4652; }
.btn-outline-gray-200, .btn-outline-light {
  color: var(--nk-body-color); background-color: transparent; border-color: var(--nk-border);
}
.btn-outline-gray-200:hover, .btn-outline-light:hover { color: var(--nk-heading-color); background-color: var(--nk-soft-bg); border-color: var(--nk-border); }
.btn-link { text-decoration: none; }
.btn.disabled, .btn:disabled { pointer-events: auto; cursor: not-allowed; }
.dropdown-toggle-simple::after, .dropdown-toggle-simple::before { display: none !important; }

/* .btn-group-toggle + data-toggle="buttons": radios/checkbox dentro de label.btn */
.btn-group-toggle > .btn, .btn-group-toggle > .btn-group > .btn { margin-bottom: 0; }
.btn-group-toggle > .btn input[type="radio"], .btn-group-toggle > .btn input[type="checkbox"],
.btn-group-toggle > .btn-group > .btn input[type="radio"], .btn-group-toggle > .btn-group > .btn input[type="checkbox"],
[data-toggle="buttons"] > .btn input[type="radio"], [data-toggle="buttons"] > .btn input[type="checkbox"] {
  position: absolute; clip: rect(0, 0, 0, 0); pointer-events: none;
}

/* Cerrar (BS4 .close -> BS5 .btn-close) */
.close {
  float: right; padding: 0; background-color: transparent; border: 0; appearance: none;
  font-size: 1.5rem; font-weight: 500; line-height: 1; color: var(--nk-muted); opacity: 0.85; cursor: pointer;
}
.close:hover, .close:focus { color: var(--nk-heading-color); opacity: 1; text-decoration: none; outline: 0; }
.modal-header { justify-content: space-between; }
.modal-header .close { margin: -0.25rem -0.25rem -0.25rem auto; padding: 0.25rem 0.5rem; float: none; }
.alert-dismissible .close { position: absolute; top: 0; right: 0; z-index: 2; padding: 0.75rem 1.25rem; color: inherit; }

/* ==========================================================================
   6. Formularios
   ========================================================================== */
.form-group { margin-bottom: 1.25rem; }
.form-group > label, .form-group > .d-flex > label { margin-bottom: 0.3rem; font-weight: 500; color: var(--nk-heading-color); font-size: 0.875rem; }
.form-row { display: flex; flex-wrap: wrap; margin-right: -5px; margin-left: -5px; }
.form-row > .col, .form-row > [class*="col-"] { padding-right: 5px; padding-left: 5px; }
.form-inline { display: flex; flex-flow: row wrap; align-items: center; }
.form-text { display: block; }
.form-control-file { display: block; width: 100%; }
.form-control-range { display: block; width: 100%; }
label { cursor: default; }
label[for] { cursor: pointer; }

/* select: .custom-select -> .form-select */
.custom-select {
  display: block; width: 100%;
  padding: 0.469rem 1.735rem 0.469rem 0.735rem;
  font-size: 0.9375rem; font-weight: 400; line-height: 1.4;
  color: var(--nk-body-color);
  appearance: none;
  background-color: var(--nk-input-bg);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23a8b1bb' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.735rem center;
  background-size: 17px 12px;
  border: 1px solid var(--nk-border);
  border-radius: var(--bs-border-radius);
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
.custom-select:focus { border-color: var(--nk-primary); outline: 0; box-shadow: 0 0 0.25rem 0.05rem rgba(90, 141, 238, 0.1); }
.custom-select:disabled { background-color: var(--nk-soft-bg); opacity: 0.7; }
.custom-select[multiple], .custom-select[size]:not([size="1"]) { padding-right: 0.735rem; background-image: none; height: auto; }
.custom-select-sm { padding: 0.25rem 1.6rem 0.25rem 0.625rem; font-size: 0.813rem; border-radius: var(--bs-border-radius-sm); background-position: right 0.5rem center; }
.custom-select-lg { padding: 0.72rem 2.2rem 0.72rem 1.125rem; font-size: 1rem; }
[dir="rtl"] .custom-select { padding: 0.469rem 0.735rem 0.469rem 1.735rem; background-position: left 0.735rem center; }

/* checkbox / radio / switch: .custom-control -> .form-check */
.custom-control { position: relative; z-index: 1; display: block; min-height: 1.4rem; padding-left: 1.75rem; print-color-adjust: exact; }
.custom-control-inline { display: inline-flex; margin-right: 1rem; }
.custom-control-input { position: absolute; left: 0; z-index: -1; width: 1.2rem; height: 1.3rem; opacity: 0; }
.custom-control-label { position: relative; margin-bottom: 0; vertical-align: top; cursor: pointer; font-weight: 400; color: var(--nk-body-color); font-size: 0.9375rem; }
.custom-control-label::before {
  position: absolute; top: 0.1rem; left: -1.75rem; display: block; width: 1.2rem; height: 1.2rem; pointer-events: none; content: "";
  background-color: var(--nk-input-bg); border: 1px solid var(--gray-400); border-radius: 0.2rem;
  transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
.custom-control-label::after {
  position: absolute; top: 0.1rem; left: -1.75rem; display: block; width: 1.2rem; height: 1.2rem; content: "";
  background: 50% / 60% 60% no-repeat;
}
.custom-control-input:focus-visible ~ .custom-control-label::before { box-shadow: 0 0 0 0.2rem rgba(90, 141, 238, 0.2); border-color: var(--nk-primary); }
.custom-control-input:checked ~ .custom-control-label::before { background-color: var(--nk-primary); border-color: var(--nk-primary); box-shadow: 0 2px 4px 0 rgba(90, 141, 238, 0.4); }
.custom-control-input:disabled ~ .custom-control-label { opacity: 0.55; cursor: not-allowed; }
.custom-checkbox .custom-control-input:checked ~ .custom-control-label::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
  background-size: 100% 100%;
}
.custom-checkbox .custom-control-input:indeterminate ~ .custom-control-label::before { background-color: var(--nk-primary); border-color: var(--nk-primary); }
.custom-checkbox .custom-control-input:indeterminate ~ .custom-control-label::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e");
  background-size: 100% 100%;
}
.custom-radio .custom-control-label::before { border-radius: 50%; }
.custom-radio .custom-control-input:checked ~ .custom-control-label::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e");
  background-size: 100% 100%;
}

.custom-switch { padding-left: 2.75rem; min-height: 1.4rem; }
.custom-switch .custom-control-input { width: 2.25rem; }
.custom-switch .custom-control-label::before {
  top: 0.05rem; left: -2.75rem; width: 2.25rem; height: 1.25rem; border-radius: 2rem;
  background-color: var(--gray-300); border-color: transparent; box-shadow: none;
}
.custom-switch .custom-control-label::after {
  top: calc(0.05rem + 3px); left: calc(-2.75rem + 3px); width: calc(1.25rem - 6px); height: calc(1.25rem - 6px);
  background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(38, 60, 85, 0.3);
  transition: transform 0.15s ease-in-out;
}
.custom-switch .custom-control-input:checked ~ .custom-control-label::before { background-color: var(--nk-primary); border-color: var(--nk-primary); box-shadow: 0 2px 4px 0 rgba(90, 141, 238, 0.4); }
.custom-switch .custom-control-input:checked ~ .custom-control-label::after { transform: translateX(1rem); background: #fff; }
.custom-switch .custom-control-label:empty { display: block; min-height: 1.4rem; }
[dir="rtl"] .custom-control { padding-left: 0; padding-right: 1.75rem; }
[dir="rtl"] .custom-control-input { left: auto; right: 0; }
[dir="rtl"] .custom-control-label::before, [dir="rtl"] .custom-control-label::after { left: auto; right: -1.75rem; }
[dir="rtl"] .custom-switch { padding-right: 2.75rem; }
[dir="rtl"] .custom-switch .custom-control-label::before { right: -2.75rem; }
[dir="rtl"] .custom-switch .custom-control-label::after { right: calc(-2.75rem + 3px); }
[dir="rtl"] .custom-switch .custom-control-input:checked ~ .custom-control-label::after { transform: translateX(-1rem); }

/* file */
.custom-file { position: relative; display: inline-block; width: 100%; height: calc(1.4em + 0.938rem + 2px); margin-bottom: 0; }
.custom-file-input { position: relative; z-index: 2; width: 100%; height: 100%; margin: 0; overflow: hidden; opacity: 0; cursor: pointer; }
.custom-file-label {
  position: absolute; top: 0; right: 0; left: 0; z-index: 1; height: 100%; padding: 0.469rem 0.735rem; overflow: hidden;
  font-weight: 400; line-height: 1.4; color: var(--nk-body-color); background-color: var(--nk-input-bg);
  border: 1px solid var(--nk-border); border-radius: var(--bs-border-radius);
}
.custom-file-label::after {
  position: absolute; top: 0; right: 0; bottom: 0; z-index: 3; display: block; padding: 0.469rem 0.735rem; line-height: 1.4;
  color: var(--nk-body-color); content: "Browse"; background-color: var(--nk-soft-bg); border-left: inherit; border-radius: 0 var(--bs-border-radius) var(--bs-border-radius) 0;
}

/* range */
.custom-range { width: 100%; height: 1rem; padding: 0; background-color: transparent; appearance: none; accent-color: var(--nk-primary); }

/* input-group con envoltorios prepend/append */
.input-group-prepend, .input-group-append { display: flex; }
.input-group-prepend .btn, .input-group-append .btn { position: relative; z-index: 2; }
.input-group-prepend .btn:focus, .input-group-append .btn:focus { z-index: 3; }
.input-group > .input-group-prepend > .btn, .input-group > .input-group-prepend > .input-group-text,
.input-group > .input-group-prepend > .custom-select, .input-group > .input-group-prepend > .form-control {
  border-top-right-radius: 0; border-bottom-right-radius: 0;
}
.input-group > .input-group-append > .btn, .input-group > .input-group-append > .input-group-text,
.input-group > .input-group-append > .custom-select, .input-group > .input-group-append > .form-control {
  border-top-left-radius: 0; border-bottom-left-radius: 0;
}
.input-group > .input-group-prepend:not(:first-child) > *, .input-group > .input-group-append:not(:last-child) > * { border-radius: 0; }
.input-group > .input-group-append { margin-left: -1px; }
.input-group > .input-group-prepend { margin-right: -1px; }
.input-group > .input-group-prepend + .form-control, .input-group > .input-group-prepend + .custom-select,
.input-group > .input-group-prepend ~ .form-control, .input-group > .input-group-prepend ~ .custom-select {
  border-top-left-radius: 0 !important; border-bottom-left-radius: 0 !important;
}
.input-group > .form-control:has(~ .input-group-append), .input-group > .custom-select:has(~ .input-group-append) {
  border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important;
}
.input-group > .custom-select { position: relative; flex: 1 1 auto; width: 1%; min-width: 0; }
.input-group-prepend .input-group-text + .input-group-text, .input-group-append .input-group-text + .input-group-text { margin-left: -1px; }
.input-group-sm > .input-group-prepend > .btn, .input-group-sm > .input-group-append > .btn,
.input-group-sm > .input-group-prepend > .input-group-text, .input-group-sm > .input-group-append > .input-group-text {
  padding: 0.25rem 0.625rem; font-size: 0.813rem;
}
[dir="rtl"] .input-group > .input-group-append { margin-left: 0; margin-right: -1px; }

/* validacion del lado servidor del producto (.is-invalid + .invalid-feedback) */
.custom-select.is-invalid, .custom-control-input.is-invalid ~ .custom-control-label::before { border-color: var(--nk-danger); }
.custom-select.is-valid { border-color: var(--nk-success); }
.custom-control-input.is-invalid ~ .invalid-feedback, .custom-select.is-invalid ~ .invalid-feedback { display: block; }

/* ==========================================================================
   7. Dropdowns, navs, cards, listas
   ========================================================================== */
.dropdown-menu-right { --bs-position: end; }
.dropdown-menu-right[data-bs-popper] { right: 0; left: auto; }
.dropdown-menu-left { --bs-position: start; }
.dropdown-menu-left[data-bs-popper] { right: auto; left: 0; }

.card-columns { column-count: 3; column-gap: 1.25rem; orphans: 1; widows: 1; }
.card-columns .card { display: inline-block; width: 100%; }

.list-inline-item:not(:last-child) { margin-right: 0.5rem; }
.pre-scrollable { max-height: 340px; overflow-y: scroll; }

/* BS4 ocultaba .collapse sin display:none!important igual que BS5; nada que hacer.
   .tab-pane y .fade se llaman igual. */

/* Tooltips: BS4 usaba .tooltip .arrow; BS5 .tooltip-arrow (lo genera BS5 solo) */
.tooltip-inner { text-align: center; }

/* ==========================================================================
   8. Utilidades varias que BS5 renombro
   ========================================================================== */
.shadow-none { box-shadow: none !important; }
.w-fit-content { width: fit-content; }

/* Texto secundario legible en tema claro: el .text-muted de Frest (#a8b1bb) no llega a 4,5:1 */
html.light-style .text-muted { color: var(--nk-muted) !important; }

/* Selector de periodo de pago sin opciones (no hay planes pagos): no dejar la cajita vacia */
.btn-group-toggle:not(:has(label)) { display: none !important; }
