/* MaxiControl UI 33/34 — UNICA CAPA FINAL de presentación de ventanas.
   Se carga DESPUES de los estilos de cada pantalla, sin reemplazar Bootstrap,
   Bootstrap Icons, fuentes ni dependencias visuales originales.
   No altera validaciones, confirmaciones, permisos ni datos. */
:root {
  --mk-dialog33-x:20px;
  --mk-dialog33-title:1.07rem;
  --mk-dialog33-subtitle:.78rem;
  --mk-dialog33-border:#e4e7ec;
  --mk-dialog33-text:#101828;
  --mk-dialog33-muted:#667085;
}
/* Encabezados: misma retícula para avisos, errores, confirmaciones y formularios. */
body .swal2-popup.mk-unified-swal.mk-local-dialog[open] {
  position:fixed!important;top:50%!important;bottom:auto!important;
  left:50%!important;right:auto!important;
  transform:translate(-50%,-50%)!important;
  margin:0!important;padding:0!important;
  box-sizing:border-box!important;
  width:min(var(--mk-dialog-custom-width,530px),calc(100vw - 24px))!important;max-width:calc(100vw - 24px)!important;
  max-height:calc(100dvh - 24px)!important;
  overflow:hidden!important;border-radius:18px!important;
  background:#fff!important;
  display:flex!important;flex-direction:column!important;
}
body .swal2-popup.mk-unified-swal.mk-local-dialog.mk-product-editor[open] {
  /* Los formularios amplios mantienen su ancho solicitado sin salir de pantalla. */
  width:min(var(--mk-dialog-custom-width,1040px),calc(100vw - 24px))!important;
}
body .swal2-popup.mk-unified-swal.mk-local-dialog[open]>.mk-local-dialog-head,
body .swal2-popup.mk-unified-swal:not(.mk-local-dialog)>.swal2-title,
body .modal:not(.mk-doc-modal) .modal-header.mk-unified-modal-header {
  box-sizing:border-box!important;flex:0 0 auto!important;
  margin:0!important;padding:16px 48px 13px var(--mk-dialog33-x)!important;
  border-bottom:1px solid var(--mk-dialog33-border)!important;
  background:#fff!important;color:var(--mk-dialog33-text)!important;
  min-width:0!important;text-align:left!important;
}
body .swal2-popup.mk-unified-swal.mk-local-dialog .mk-local-dialog-title,
body .swal2-popup.mk-unified-swal:not(.mk-local-dialog)>.swal2-title,
body .modal:not(.mk-doc-modal) .modal-header.mk-unified-modal-header .modal-title {
  font-size:var(--mk-dialog33-title)!important;font-weight:750!important;
  line-height:1.34!important;letter-spacing:-.012em!important;
  color:var(--mk-dialog33-text)!important;text-align:left!important;
}
body .swal2-popup.mk-unified-swal .mk-dialog-head-shell,
body .swal2-popup.mk-unified-swal .mk-dialog-title-copy,
body .modal:not(.mk-doc-modal) .mk-unified-modal-heading{
  display:flex!important;align-items:flex-start!important;gap:12px!important;min-width:0!important;
}
body .swal2-popup.mk-unified-swal .mk-dialog-head-copy{
  display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:4px!important;min-width:0!important;flex:1 1 auto!important;
}
body .swal2-popup.mk-unified-swal .mk-dialog-head-title,
body .swal2-popup.mk-unified-swal .mk-dialog-title-row,
body .modal:not(.mk-doc-modal) .mk-modal-title-line{
  display:flex!important;flex-direction:row!important;
  align-items:center!important;gap:9px!important;min-width:0!important;
  margin:0!important;overflow-wrap:anywhere!important;
}
body .swal2-popup.mk-unified-swal .mk-dialog-head-title{font-size:inherit!important;font-weight:inherit!important;line-height:inherit!important;color:inherit!important}
body .swal2-popup.mk-unified-swal .mk-dialog-head-icon{
  width:44px!important;height:44px!important;min-width:44px!important;flex:0 0 44px!important;
  display:grid!important;place-items:center!important;border-radius:13px!important;
  background:#eef2ff!important;color:#4f46e5!important;font-size:1.08rem!important;
}
body .swal2-popup.mk-unified-swal .mk-dialog-head-shell[data-mk-dialog-kind="warning"] .mk-dialog-head-icon,
body .swal2-popup.mk-unified-swal .mk-dialog-head-shell[data-mk-dialog-kind="question"] .mk-dialog-head-icon{background:#fff7ed!important;color:#b54708!important}
body .swal2-popup.mk-unified-swal .mk-dialog-head-shell[data-mk-dialog-kind="error"] .mk-dialog-head-icon{background:#fef3f2!important;color:#d92d20!important}
body .swal2-popup.mk-unified-swal .mk-dialog-head-shell[data-mk-dialog-kind="success"] .mk-dialog-head-icon{background:#ecfdf3!important;color:#039855!important}
body .swal2-popup.mk-unified-swal .mk-dialog-head-shell[data-mk-dialog-kind="info"] .mk-dialog-head-icon,
body .swal2-popup.mk-unified-swal .mk-dialog-head-shell[data-mk-dialog-kind="default"] .mk-dialog-head-icon{background:#eef2ff!important;color:#4f46e5!important}
body .swal2-popup.mk-unified-swal .mk-dialog-title-row>i.bi,
body .modal:not(.mk-doc-modal) .mk-modal-title-line>i.bi{
  font-size:1.02rem!important;line-height:1!important;
  font-weight:400!important;flex:0 0 auto!important;
}
body .swal2-popup.mk-unified-swal .mk-dialog-head-subtitle,
body .swal2-popup.mk-unified-swal .mk-dialog-title-subtitle,
body .modal:not(.mk-doc-modal) .modal-header.mk-unified-modal-header .mk-unified-modal-subtitle,
body .modal:not(.mk-doc-modal) .modal-header.mk-unified-modal-header .mk-modal-subtitle,
body .modal:not(.mk-doc-modal) .modal-header.mk-unified-modal-header .mk-load-article-intro {
  display:block!important;font-size:var(--mk-dialog33-subtitle)!important;
  font-weight:400!important;line-height:1.45!important;
  color:var(--mk-dialog33-muted)!important;margin:0!important;
  letter-spacing:0!important;text-align:left!important;
}
/* SweetAlert2 trae un icono gigante en el cuerpo: ya existe uno discreto
   en la cabecera común. Ocultarlo evita iconos duplicados y espacio extra. */
body .swal2-popup.mk-unified-swal:not(.mk-local-dialog)>.swal2-icon {display:none!important}
body .swal2-popup.mk-unified-swal.mk-local-dialog[open]>.mk-local-dialog-content,
body .swal2-popup.mk-unified-swal:not(.mk-local-dialog)>.swal2-html-container {
  box-sizing:border-box!important;flex:1 1 auto!important;min-height:0!important;
  max-height:none!important;width:100%!important;
  margin:0!important;padding:16px var(--mk-dialog33-x) 14px!important;
  overflow-x:hidden!important;overflow-y:auto!important;
  text-align:left!important;font-size:.9rem!important;line-height:1.5!important;
  overflow-wrap:anywhere!important;
}
body .swal2-popup.mk-unified-swal.mk-local-dialog[open]>.mk-local-dialog-content .mk-dialog-text,
body .swal2-popup.mk-unified-swal:not(.mk-local-dialog)>.swal2-html-container p {
  margin-top:0!important;
}
body .swal2-popup.mk-unified-swal.mk-local-dialog[open]>.mk-local-dialog-actions,
body .swal2-popup.mk-unified-swal:not(.mk-local-dialog)>.swal2-actions,
body .modal:not(.mk-doc-modal) .modal-footer {
  box-sizing:border-box!important;flex:0 0 auto!important;
  margin:0!important;padding:13px var(--mk-dialog33-x) 17px!important;
  gap:10px!important;justify-content:center!important;align-items:center!important;
  border-top:1px solid var(--mk-dialog33-border)!important;
  background:#fff!important;width:100%!important;
}
body .swal2-popup.mk-unified-swal.mk-local-dialog[open]>.mk-local-dialog-actions .btn,
body .swal2-popup.mk-unified-swal:not(.mk-local-dialog)>.swal2-actions .swal2-styled,
body .modal:not(.mk-doc-modal) .modal-footer .btn {
  min-height:40px!important;min-width:105px!important;border-radius:10px!important;
  padding:9px 15px!important;font-size:.82rem!important;
  line-height:1.32!important;font-weight:700!important;
  white-space:normal!important;max-width:100%!important;
}
body .swal2-popup.mk-unified-swal.mk-local-dialog[open]>.mk-local-dialog-validation,
body .swal2-popup.mk-unified-swal:not(.mk-local-dialog)>.swal2-validation-message {
  flex:0 0 auto!important;width:auto!important;max-width:100%!important;
  margin:0!important;padding:10px var(--mk-dialog33-x)!important;
  box-sizing:border-box!important;
}
body .swal2-popup.mk-unified-swal.mk-local-dialog[open]>.mk-local-dialog-head .mk-local-dialog-x,
body .swal2-popup.mk-unified-swal:not(.mk-local-dialog)>.swal2-close,
body .modal:not(.mk-doc-modal) .modal-header.mk-unified-modal-header .btn-close{
  position:absolute!important;top:11px!important;right:12px!important;
  margin:0!important;z-index:5!important;
}
body .swal2-popup.mk-unified-swal.mk-local-dialog[open] .mk-dialog-title-row>i.bi-x-circle{color:#bd2837!important}
body .swal2-popup.mk-unified-swal.mk-local-dialog[open] .mk-dialog-title-row>i.bi-exclamation-triangle{color:#b56805!important}
body .swal2-popup.mk-unified-swal.mk-local-dialog[open] .mk-dialog-title-row>i.bi-check-circle{color:#158352!important}
/* Los formularios Bootstrap siguen usando su scroll interno original, pero
   cabecera y acciones quedan fijas dentro de su ventana. */
body .modal:not(.mk-doc-modal) .modal-content{
  display:flex!important;flex-direction:column!important;
  max-height:calc(100dvh - 24px)!important;overflow:hidden!important;
}
body .modal:not(.mk-doc-modal) .modal-content>.modal-body,
body .modal:not(.mk-doc-modal) .modal-content>form>.modal-body{
  flex:1 1 auto!important;min-height:0!important;
  overflow-y:auto!important;overflow-x:hidden!important;
}
body .modal:not(.mk-doc-modal) .modal-content>.modal-header,
body .modal:not(.mk-doc-modal) .modal-content>form>.modal-header,
body .modal:not(.mk-doc-modal) .modal-content>.modal-footer,
body .modal:not(.mk-doc-modal) .modal-content>form>.modal-footer{
  flex:0 0 auto!important;
}
body .modal:not(.mk-doc-modal) .modal-content>form{
  display:flex!important;flex-direction:column!important;min-height:0!important;
  overflow:hidden!important;
}
@media(max-width:575.98px) {
  :root{--mk-dialog33-x:14px;--mk-dialog33-title:1rem;--mk-dialog33-subtitle:.75rem}
  body .swal2-popup.mk-unified-swal.mk-local-dialog[open]{
    max-width:calc(100vw - 12px)!important;max-height:calc(100dvh - 12px)!important;
  }
  body .swal2-popup.mk-unified-swal.mk-local-dialog[open]>.mk-local-dialog-head,
  body .swal2-popup.mk-unified-swal:not(.mk-local-dialog)>.swal2-title,
  body .modal:not(.mk-doc-modal) .modal-header.mk-unified-modal-header{
    padding:14px 42px 11px var(--mk-dialog33-x)!important;
  }
  body .swal2-popup.mk-unified-swal.mk-local-dialog[open]>.mk-local-dialog-actions,
  body .swal2-popup.mk-unified-swal:not(.mk-local-dialog)>.swal2-actions,
  body .modal:not(.mk-doc-modal) .modal-footer {
    padding-bottom:max(14px,env(safe-area-inset-bottom))!important;
    flex-wrap:wrap!important;
  }
  body .swal2-popup.mk-unified-swal.mk-local-dialog[open]>.mk-local-dialog-actions .btn,
  body .swal2-popup.mk-unified-swal:not(.mk-local-dialog)>.swal2-actions .swal2-styled,
  body .modal:not(.mk-doc-modal) .modal-footer .btn{
    flex:1 1 120px!important;min-width:0!important;
  }
}

body .swal2-popup.mk-local-dialog.mk-unified-swal.mk-price-modal[open],
body .swal2-popup.mk-local-dialog.mk-unified-swal:has(.mk-price-modal-grid)[open]{width:min(var(--mk-dialog-custom-width,1050px),calc(100vw - 24px))!important}

/* También se unifican las ventanas autónomas que no usan Bootstrap/SweetAlert:
   auxiliares, borrado histórico, PDF de productos y período de movimientos. */
body .mk-history-dialog {
  display:flex!important;flex-direction:column!important;
  overflow:hidden!important;border-radius:18px!important;
}
body .mk-history-dialog-header,
body .mk-products-pdf-dialog .mk-products-pdf-header,
body .mk-movement-period-dialog .mk-period-header {
  box-sizing:border-box!important;
  padding:16px 48px 13px var(--mk-dialog33-x)!important;
  border-bottom:1px solid var(--mk-dialog33-border)!important;
  background:#fff!important;
}
body .mk-history-dialog-header h2,
body .mk-products-pdf-dialog .mk-products-pdf-header h2,
body .mk-movement-period-dialog .mk-period-header h2 {
  font-size:var(--mk-dialog33-title)!important;font-weight:750!important;
  letter-spacing:-.012em!important;line-height:1.34!important;
  color:var(--mk-dialog33-text)!important;
}
body .mk-history-dialog-header p,
body .mk-products-pdf-dialog .mk-products-pdf-header p,
body .mk-movement-period-dialog .mk-period-subtitle{
  margin:4px 0 0!important;color:var(--mk-dialog33-muted)!important;
  font-size:var(--mk-dialog33-subtitle)!important;line-height:1.45!important;
  font-weight:400!important;
}
body .mk-history-dialog-header .mk-history-dialog-eyebrow{display:none!important}
body .mk-history-dialog-body{flex:1 1 auto!important;min-height:0!important;
  overflow-y:auto!important;overflow-x:hidden!important;
  padding:16px var(--mk-dialog33-x) 14px!important;
}
body .mk-history-dialog-footer,
body .mk-movement-period-dialog .mk-period-actions{
  box-sizing:border-box!important;flex:0 0 auto!important;
  padding:13px var(--mk-dialog33-x) 17px!important;
  margin:0!important;border-top:1px solid var(--mk-dialog33-border)!important;
  justify-content:center!important;gap:10px!important;background:#fff!important;
}
body .mk-history-dialog-footer button,
body .mk-movement-period-dialog .mk-period-actions .btn{
  min-height:40px!important;border-radius:10px!important;font-size:.82rem!important;
  font-weight:700!important;padding:9px 15px!important;
}
body .mk-products-pdf-dialog .mk-products-pdf-header{position:relative!important}
body .mk-products-pdf-dialog .mk-products-pdf-close{position:absolute!important;
  top:11px!important;right:12px!important;
}
@media(max-width:575.98px){
 body .mk-history-dialog-header,
 body .mk-products-pdf-dialog .mk-products-pdf-header,
 body .mk-movement-period-dialog .mk-period-header{
   padding:14px 42px 11px var(--mk-dialog33-x)!important;
 }
 body .mk-history-dialog-footer,
 body .mk-movement-period-dialog .mk-period-actions{flex-wrap:wrap!important}
}

body .mk-movement-period-dialog .mk-doc-eyebrow{display:none!important}


body .swal2-popup.mk-unified-swal:not(.mk-local-dialog)>.swal2-title{
  width:100%!important;box-sizing:border-box!important;
}
body .swal2-popup.mk-unified-swal:not(.mk-local-dialog)>.swal2-title .mk-dialog-head-title{
  justify-content:flex-start!important;
}
body .swal2-popup.mk-unified-swal:not(.mk-local-dialog)>.swal2-title .mk-dialog-head-title > *{min-width:0!important}
body .swal2-popup.mk-unified-swal:not(.mk-local-dialog)>.swal2-title .mk-dialog-title-row>i.bi{display:none!important}
body .swal2-popup.mk-unified-swal:not(.mk-local-dialog)>.swal2-title .mk-dialog-title-copy{gap:0!important}
body .swal2-popup.mk-unified-swal:not(.mk-local-dialog)>.swal2-title .mk-dialog-title-copy .mk-dialog-title-row{gap:0!important}
body .swal2-popup.mk-unified-swal:not(.mk-local-dialog)>.swal2-close{
  width:34px!important;height:34px!important;border-radius:10px!important;
  background:#f3f5fa!important;color:#667085!important;border:0!important;
  padding:0!important;display:grid!important;place-items:center!important;
  opacity:1!important;font-size:1rem!important;
}
body .swal2-popup.mk-unified-swal:not(.mk-local-dialog)>.swal2-close:hover{background:#eceff5!important;color:#344054!important}
body .swal2-popup.mk-unified-swal:not(.mk-local-dialog)>.swal2-close:focus-visible{outline:2px solid #4f46e5!important;outline-offset:2px!important}
body .swal2-popup.mk-unified-swal.mk-delete-product-confirm>.swal2-html-container .mk-delete-product-summary strong{
  display:block!important;font-size:.98rem!important;color:#344054!important;margin-bottom:.2rem!important;
}
body .swal2-popup.mk-unified-swal.mk-delete-product-confirm>.swal2-html-container .mk-delete-product-summary .mk-delete-product-meta{
  display:grid!important;grid-template-columns:auto 1fr!important;gap:.25rem .55rem!important;color:#667085!important;font-size:.83rem!important;
}
@media(max-width:575.98px){
  body .swal2-popup.mk-unified-swal .mk-dialog-head-shell{gap:10px!important}
  body .swal2-popup.mk-unified-swal .mk-dialog-head-icon{width:38px!important;height:38px!important;min-width:38px!important;flex-basis:38px!important;border-radius:11px!important}
}


/* UI39/40 — Norma visual aprobada: cabecera del selector «Exportar productos».
   Un único separador horizontal. Sin alterar contenido ni acciones. */
:root{--mk-modal40-border:#e4e7ec;--mk-modal40-muted:#98a2b3;--mk-modal40-accent:#4f46e5}
body .swal2-popup.mk-unified-swal.mk-local-dialog[open]>.mk-local-dialog-head,
body .swal2-popup.mk-unified-swal:not(.mk-local-dialog)>.swal2-title,
body .modal:not(.mk-doc-modal) .modal-header.mk-unified-modal-header {
  position:relative!important;
  padding:17px 54px 16px 20px!important;
  border:0!important;border-bottom:1px solid var(--mk-modal40-border)!important;
  margin:0!important;background:#fff!important;
  box-shadow:none!important;min-height:76px!important;
}
/* Nunca aplicar un segundo borde o línea al título interior. */
body .swal2-popup.mk-unified-swal.mk-local-dialog .mk-local-dialog-head>.swal2-title,
body .swal2-popup.mk-unified-swal:not(.mk-local-dialog)>.swal2-title .mk-dialog-head-shell,
body .swal2-popup.mk-unified-swal .mk-dialog-head-title,
body .swal2-popup.mk-unified-swal .mk-dialog-head-copy,
body .modal:not(.mk-doc-modal) .modal-header.mk-unified-modal-header .modal-title,
body .modal:not(.mk-doc-modal) .modal-header.mk-unified-modal-header .mk-modal-title-line {
  border:0!important;border-bottom:0!important;box-shadow:none!important;
  padding:0!important;margin:0!important;
}
body .swal2-popup.mk-unified-swal .mk-dialog-head-shell{
  display:flex!important;flex-direction:row!important;align-items:center!important;
  gap:12px!important;max-width:100%!important;
}
body .swal2-popup.mk-unified-swal .mk-dialog-head-copy{
  display:flex!important;flex:1 1 auto!important;flex-direction:column!important;
  gap:3px!important;justify-content:center!important;align-items:flex-start!important;
}
body .swal2-popup.mk-unified-swal .mk-dialog-head-eyebrow,
body .modal:not(.mk-doc-modal) .modal-header.mk-unified-modal-header .mk-standard-header-eyebrow {
  display:block!important;order:-1!important;color:var(--mk-modal40-muted)!important;
  font-size:.64rem!important;line-height:1.25!important;font-weight:800!important;
  letter-spacing:.085em!important;text-transform:uppercase!important;
  white-space:normal!important;margin:0 0 2px!important;
}
body .swal2-popup.mk-unified-swal .mk-dialog-head-title{
  display:block!important;font-size:1.075rem!important;line-height:1.3!important;
  font-weight:800!important;letter-spacing:-.02em!important;color:#101828!important;
}
body .swal2-popup.mk-unified-swal .mk-dialog-head-subtitle{
  display:block!important;font-size:.76rem!important;line-height:1.4!important;
  color:#667085!important;font-weight:400!important;margin:2px 0 0!important;
}
body .swal2-popup.mk-unified-swal .mk-dialog-head-icon,
body .modal:not(.mk-doc-modal) .modal-header.mk-unified-modal-header .mk-standard-header-icon{
  width:44px!important;height:44px!important;flex:0 0 44px!important;
  border-radius:13px!important;display:grid!important;place-items:center!important;
  background:#eef2ff!important;color:var(--mk-modal40-accent)!important;
  font-size:1.08rem!important;position:static!important;
}
body .modal:not(.mk-doc-modal) .modal-header.mk-unified-modal-header.mk-standard-header{
  padding-left:76px!important;min-height:76px!important;
}
body .modal:not(.mk-doc-modal) .modal-header.mk-unified-modal-header .mk-standard-header-icon{
  position:absolute!important;left:20px!important;top:16px!important;
}
body .modal:not(.mk-doc-modal) .modal-header.mk-unified-modal-header .mk-unified-modal-heading,
body .modal:not(.mk-doc-modal) .modal-header.mk-unified-modal-header .mk-load-article-heading,
body .modal:not(.mk-doc-modal) .modal-header.mk-unified-modal-header .mk-queue-modal-heading {
  display:flex!important;flex-direction:column!important;align-items:flex-start!important;
  justify-content:center!important;gap:2px!important;min-width:0!important;
}
body .modal:not(.mk-doc-modal) .modal-header.mk-unified-modal-header .mk-modal-title-line>i.bi,
body .modal:not(.mk-doc-modal) .modal-header.mk-unified-modal-header .mk-load-article-heading .mk-load-article-icon {display:none!important}
body .modal:not(.mk-doc-modal) .modal-header.mk-unified-modal-header .mk-unified-modal-subtitle,
body .modal:not(.mk-doc-modal) .modal-header.mk-unified-modal-header .mk-modal-subtitle{
  font-size:.75rem!important;color:#667085!important;line-height:1.4!important;
}
/* Sólo mostrar X si el flujo permite cerrar. Mantener los bloqueos originales. */
body .swal2-popup.mk-unified-swal.mk-local-dialog[open] .mk-local-dialog-x:not([hidden]),
body .swal2-popup.mk-unified-swal:not(.mk-local-dialog)>.swal2-close:not([hidden]),
body .modal:not(.mk-doc-modal) .modal-header.mk-unified-modal-header .btn-close{
  width:34px!important;height:34px!important;min-width:34px!important;min-height:34px!important;
  background:#f3f5fa!important;color:#667085!important;border:0!important;
  border-radius:10px!important;display:grid!important;place-items:center!important;
  top:12px!important;right:13px!important;position:absolute!important;
  margin:0!important;padding:0!important;line-height:1!important;
}
body .swal2-popup.mk-unified-swal.mk-local-dialog[open] .mk-local-dialog-x[hidden],
body .swal2-popup.mk-unified-swal:not(.mk-local-dialog)>.swal2-close[hidden]{display:none!important}
/* La referencia original ya tiene esta geometría. Respetar sus recursos. */
body .mk-movement-period-dialog .mk-doc-eyebrow,
body .mk-history-dialog-header .mk-history-dialog-eyebrow {display:block!important}
body .mk-movement-period-dialog .mk-period-header,
body .mk-products-pdf-dialog .mk-products-pdf-header,
body .mk-history-dialog .mk-history-dialog-header{
  border:0!important;border-bottom:1px solid var(--mk-modal40-border)!important;
  box-shadow:none!important;
}
/* En espera el cuerpo es compacto; icono de actividad alineado, sin espacios vacíos. */
body .swal2-popup.mk-unified-swal.mk-standard-dialog-waiting .swal2-html-container,
body .swal2-popup.mk-unified-swal.mk-standard-dialog-waiting .mk-local-dialog-content{
  flex:0 1 auto!important;max-height:calc(100dvh - 180px)!important;
}
body .swal2-popup.mk-unified-swal.mk-standard-dialog-waiting .mk-local-dialog-progress{
  display:flex!important;align-items:center!important;gap:9px!important;
  background:#f8fafc!important;border-radius:10px!important;
  margin-top:8px!important;padding:9px 11px!important;
}
@media(max-width:575.98px){
  body .swal2-popup.mk-unified-swal.mk-local-dialog[open]>.mk-local-dialog-head,
  body .swal2-popup.mk-unified-swal:not(.mk-local-dialog)>.swal2-title,
  body .modal:not(.mk-doc-modal) .modal-header.mk-unified-modal-header{
    min-height:68px!important;padding:13px 46px 12px 13px!important;
  }
  body .modal:not(.mk-doc-modal) .modal-header.mk-unified-modal-header.mk-standard-header{
    padding-left:61px!important;
  }
  body .modal:not(.mk-doc-modal) .modal-header.mk-unified-modal-header .mk-standard-header-icon{
    width:38px!important;height:38px!important;flex-basis:38px!important;
    left:13px!important;top:12px!important;border-radius:11px!important;
  }
  body .swal2-popup.mk-unified-swal .mk-dialog-head-title{font-size:1rem!important}
  body .swal2-popup.mk-unified-swal .mk-dialog-head-eyebrow,
  body .modal:not(.mk-doc-modal) .modal-header.mk-unified-modal-header .mk-standard-header-eyebrow{font-size:.6rem!important}
}
/* M263/M264 T41-42: TODOS los estados de espera usan el mismo recuadro.
   No depende de que cada llamador asigne una clase de ventana especial. */
body .swal2-popup.mk-local-dialog .mk-local-dialog-progress {
  display:flex!important;align-items:center!important;gap:9px!important;
  margin:9px 0 0!important;padding:10px 12px!important;
  border-radius:10px!important;background:#f8fafc!important;
  color:#52617a!important;font-size:.83rem!important;
}
body .swal2-popup.mk-local-dialog .mk-local-dialog-progress .spinner-border {
  width:1rem!important;height:1rem!important;border-width:2px!important;flex:0 0 auto!important;
}
/* M263/M264 T41-42: confirmación de eliminación al estilo de las tarjetas de
   Exportar productos, manteniendo el encabezado y la acción destructiva. */
body .swal2-popup .mk-delete-product-summary {
  background:#f8fafc!important;border:1px solid #e4e7ec!important;
  border-radius:12px!important;padding:12px 14px!important;
  color:#344054!important;text-align:left!important;
}
body .swal2-popup .mk-delete-product-summary strong {
  display:block!important;font-size:.94rem!important;font-weight:750!important;
  margin:0 0 7px!important;color:#202b43!important;
}
body .swal2-popup .mk-delete-product-summary .mk-delete-product-meta {
  display:grid!important;grid-template-columns:54px minmax(0,1fr)!important;
  gap:5px 9px!important;font-size:.76rem!important;color:#667085!important;
}
body .swal2-popup .mk-delete-product-summary .mk-delete-product-meta span:nth-child(2n) {
  font-weight:550!important;color:#475467!important;overflow-wrap:anywhere!important;
}
body .swal2-popup .mk-delete-product-guidance {
  margin:10px 2px 0!important;color:#667085!important;
  font-size:.74rem!important;line-height:1.45!important;
  text-align:left!important;
}

/* T43/T44 — datos de referencia y preparación sin modal intermedio */
.mk-price-ref-preview{background:#f8fafc;border:1px solid #e4e7ec;border-radius:12px;padding:10px 12px;margin:0 0 14px;display:flex;flex-direction:column;gap:4px;font-size:.8rem;color:#475467}
.mk-price-ref-preview>strong{font-weight:750;color:#101828}.mk-price-ref-preview>small{color:#667085}
.mk-price-ref-preview>div{display:flex;justify-content:flex-start;gap:20px;flex-wrap:wrap}
.mk-price-ref-preview b{color:#344054}
button.mk-product-button-busy{opacity:.77;pointer-events:none;position:relative}
button.mk-product-button-busy:after{content:'';display:inline-block;width:13px;height:13px;margin-left:8px;border:2px solid #c7d2fe;border-top-color:#4f46e5;border-radius:50%;animation:mk-ui-followup-spin .75s linear infinite}

/* T45-46 — Cierre coherente en TODO MaxiControl. Formularios/confirmaciones
   con salida explícita: una sola acción de cancelación visible.
   Los diálogos informativos conservan la X de la referencia Exportar productos. */
body .swal2-popup.mk-unified-swal.mk-single-exit-dialog > .swal2-close,
body .swal2-popup.mk-unified-swal.mk-single-exit-dialog .mk-local-dialog-x,
body .modal.mk-single-exit-modal .modal-header .btn-close {
  display:none!important;
}
body .modal .mk-unsaved-close-note {
  flex:0 0 100%;width:100%;font-size:.76rem;line-height:1.4;
  color:#b54708;text-align:center;margin:2px 0 0;
}
/* Precedencia sobre reglas históricas con :not y [open]. */
body .swal2-popup.mk-unified-swal.mk-local-dialog.mk-single-exit-dialog[open] .mk-local-dialog-x:not([hidden]),
body .swal2-popup.mk-unified-swal.mk-single-exit-dialog:not(.mk-local-dialog) > .swal2-close:not([hidden]),
body .modal.mk-single-exit-modal:not(.mk-doc-modal) .modal-header.mk-unified-modal-header button.btn-close {
  display:none!important;
}

/* T50: actividad inmediata también en enlaces de edición, sin doble clic. */
button.mk-product-button-busy,a.mk-product-button-busy,[role="button"].mk-product-button-busy {
  position:relative!important;cursor:progress!important;pointer-events:none!important;opacity:.85!important;
}
/* Ícono original intacto: el spinner se superpone sin cambiar el ancho de columna. */
a.mk-product-button-busy:after {
  content:''!important;position:absolute!important;display:block!important;
  width:15px!important;height:15px!important;left:50%!important;top:50%!important;
  transform:translate(-50%,-50%)!important;border:2px solid #dbeafe!important;
  border-top-color:#4f46e5!important;border-radius:50%!important;
  animation:mk-product-action-spin .75s linear infinite!important;
  background:transparent!important;pointer-events:none!important;
}
a.mk-product-button-busy>i{opacity:.22!important}
@keyframes mk-product-action-spin{to{transform:translate(-50%,-50%) rotate(360deg)}}

/* T51-52: regla universal. Una ventana de espera no es una confirmación. */
body .swal2-popup.mk-unified-swal.mk-standard-dialog-waiting .swal2-actions,
body .swal2-popup.mk-unified-swal.mk-standard-dialog-waiting .mk-local-dialog-actions,
body .swal2-popup.mk-unified-swal.mk-progress-only .swal2-actions,
body .swal2-popup.mk-unified-swal.mk-progress-only .mk-local-dialog-actions,
body .swal2-popup.mk-unified-swal.mk-standard-dialog-waiting .swal2-close,
body .swal2-popup.mk-unified-swal.mk-progress-only .swal2-close {display:none!important}
body .swal2-popup.mk-unified-swal.mk-standard-dialog-waiting .mk-ui-wait-progress,
body .swal2-popup.mk-unified-swal.mk-standard-dialog-waiting .mk-local-dialog-progress,
body .swal2-popup.mk-unified-swal.mk-progress-only .mk-local-dialog-progress {
 display:flex!important;align-items:center!important;gap:10px!important;
 padding:10px 12px!important;border-radius:10px!important;
 background:#f6f8fb!important;color:#52617a!important;
 margin:9px 0 0!important;min-height:39px!important;font-size:.83rem!important;
}
body .swal2-popup.mk-unified-swal .mk-ui-wait-progress .spinner-border,
body .swal2-popup.mk-unified-swal .mk-local-dialog-progress .spinner-border {
 display:inline-block!important;width:1rem!important;height:1rem!important;
 border:2px solid currentColor!important;border-right-color:transparent!important;border-radius:50%!important;
 animation:spinner-border .75s linear infinite!important;flex:0 0 1rem!important;
}
body .swal2-popup.mk-unified-swal.mk-standard-dialog-waiting .mk-local-dialog-content,
body .swal2-popup.mk-unified-swal.mk-standard-dialog-waiting .swal2-html-container {padding-bottom:18px!important}
