/*-----------------------------------------------------------------------------------
    Modern Modal Styles - shadcn/ui inspired
    Diseño basado en shadcn/ui Dialog component
    Compatible con temas light/dark
-----------------------------------------------------------------------------------*/

/* ============================================
   MODAL BACKDROP - Fondo con overlay
   ============================================ */
.modal-backdrop.show {
  opacity: 1;
  background-color: rgba(0, 0, 0, 0.5);
}

body.skin-dark .modal-backdrop.show {
  background-color: rgba(0, 0, 0, 0.7);
}

/* ============================================
   MODAL DIALOG - Contenedor
   ============================================ */
.modal-dialog.modern-modal-dialog {
  max-width: 425px;
  margin: 1.75rem auto;
}

/* ============================================
   MODAL CONTENT - Tarjeta principal (estilo shadcn)
   ============================================ */
.modal-content.modern-modal-content {
  background: var(--background-card);
  border: 1px solid var(--border-color);
  border-radius: calc(0.625rem + 4px) !important; /* 10px + 4px = 14px para el modal */
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
              0 4px 6px -2px rgba(0, 0, 0, 0.05);
  overflow: visible;
  padding: 0;
}

body.skin-dark .modal-content.modern-modal-content {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3),
              0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

/* ============================================
   MODAL HEADER - Estilo shadcn (sin border por defecto)
   ============================================ */
.modal-header.modern-modal-header {
  padding: 1.5rem 1.5rem 0.5rem;
  border-bottom: none;
  background: transparent;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.modal-title.modern-modal-title {
  font-size: 1.125rem; /* 18px */
  font-weight: 600; /* semibold */
  color: var(--text-primary);
  margin: 0;
  line-height: 1.75rem;
  letter-spacing: -0.01em;
}

/* Descripción debajo del título (si se agrega) */
.modal-description {
  font-size: 0.875rem; /* 14px */
  color: var(--text-secondary);
  margin-top: 0.5rem;
  line-height: 1.25rem;
}

/* Botón cerrar estilo shadcn (X más sutil) */
.modal-header.modern-modal-header .close,
.modal-header.modern-modal-header .btn-close2 {
  position: absolute;
  top: 1.25rem; /* 20px - un poco más abajo */
  right: 1.25rem; /* 20px - más separado del borde */
  width: 1.5rem; /* 24px - más pequeño */
  height: 1.5rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem; /* 6px - más pequeño para la X */
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.25rem; /* 20px - más pequeño */
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s ease, background-color 0.2s ease;
  cursor: pointer;
}

.modal-header.modern-modal-header .close:hover,
.modal-header.modern-modal-header .btn-close2:hover {
  opacity: 1;
  background: var(--background-hover);
}

.modal-header.modern-modal-header .close:focus,
.modal-header.modern-modal-header .btn-close2:focus {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

/* ============================================
   MODAL BODY - Contenido (estilo shadcn)
   ============================================ */
.modal-body.modern-modal-body {
  padding: 0 1.5rem; /* Solo padding lateral por defecto */
  background: transparent;
}

/* Padding bottom solo para modales de texto (sin form-groups) */
.modal-body.modern-modal-body:not(:has(.form-group)) {
  padding-bottom: 1.5rem; /* Solo cuando NO hay form-groups */
}

/* Modal body específico para dark mode - mismo color que sidebar */
body.skin-dark .modal-body.modern-modal-body {
  background: transparent; /* Hereda del modal-content */
}

/* Modal content card en dark mode con color shadcn */
/* Mayor especificidad para sobrescribir el CSS antiguo */
body.skin-dark .modal .modal-dialog .modal-content.modern-modal-content {
  background: #09090b !important; /* Color shadcn para modales */
  background-color: #09090b !important; /* Override completo */
}

/* Espaciado entre form groups */
.modal-body.modern-modal-body .form-group {
  margin-bottom: 1rem;
}

.modal-body.modern-modal-body .form-group:last-child {
  margin-bottom: 1rem; /* Ahora sí mantiene margin para separar del footer */
}

/* Label estilo shadcn */
.modal-body.modern-modal-body .modern-form-label,
.modal-body.modern-modal-body label {
  display: block;
  font-size: 0.875rem; /* 14px */
  font-weight: 500; /* medium */
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.25rem;
}

/* Input estilo shadcn */
.modal-body.modern-modal-body .form-control,
.modal-body.modern-modal-body .modern-input {
  width: 100%;
  height: 2.5rem; /* 40px - altura shadcn */
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem; /* 14px */
  font-weight: 400;
  line-height: 1.25rem;
  color: var(--text-primary);
  background-color: var(--background);
  border: 1px solid var(--border-color);
  border-radius: 0.625rem !important; /* 10px - igual al login */
  transition: border-color 0.2s ease,
              box-shadow 0.2s ease,
              background-color 0.2s ease;
  outline: none;
}

.modal-body.modern-modal-body .form-control:focus,
.modal-body.modern-modal-body .modern-input:focus {
  background-color: var(--background) !important;
  border-color: #a1a1aa !important;
  box-shadow: 0 0 0 3px rgba(113, 113, 122, 0.15) !important;
}

.modal-body.modern-modal-body .form-control::placeholder,
.modal-body.modern-modal-body .modern-input::placeholder {
  color: var(--text-tertiary);
  opacity: 1;
}

/* Estado de error */
.modal-body.modern-modal-body .form-control.error-input,
.modal-body.modern-modal-body .modern-input.error-input {
  border-color: #ef4444; /* red-500 */
  background-color: rgba(239, 68, 68, 0.05);
}

.modal-body.modern-modal-body .form-control.error-input:focus,
.modal-body.modern-modal-body .modern-input.error-input:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 1px #ef4444;
}

/* ============================================
   MODAL FOOTER - Estilo shadcn (fondo gris claro)
   ============================================ */
.modal-footer.modern-modal-footer {
  padding: 1rem 1.5rem;
  border-top: none;
  background: rgba(0, 0, 0, 0.02); /* Gris muy claro - base */
  display: flex;
  flex-direction: row;
  gap: 0.5rem; /* 8px */
  justify-content: flex-end;
  border-bottom-left-radius: calc(0.625rem + 4px); /* 14px - coincide con el modal */
  border-bottom-right-radius: calc(0.625rem + 4px); /* 14px - coincide con el modal */
}

body.skin-dark .modal-footer.modern-modal-footer {
  background: rgba(255, 255, 255, 0.04); /* Gris muy claro para dark mode */
}

body.skin-light .modal-footer.modern-modal-footer {
  background: linear-gradient(rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.02)), #f8f9fa; /* Capa oscura sutil sobre el color del menú */
}

/* Botones estilo shadcn - más pequeños */
.modal-footer.modern-modal-footer button {
  height: 2.25rem; /* 36px - más pequeños */
  padding-left: 0.875rem; /* 14px */
  padding-right: 0.875rem;
  font-size: 0.875rem; /* 14px */
  font-weight: 500; /* medium */
  line-height: 1.25rem;
  border-radius: 0.625rem !important; /* 10px - igual al login */
  transition: all 0.2s ease;
  cursor: pointer;
  outline: none;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

/* Botón Cancelar (outline/ghost) - estilo shadcn - SIN SOMBRAS */
.modal-footer.modern-modal-footer .mat-outline-button {
  background-color: transparent;
  border-color: var(--border-color);
  color: var(--text-primary);
  box-shadow: none !important; /* Sin sombras */
}

.modal-footer.modern-modal-footer .mat-outline-button:hover {
  background-color: var(--background-hover);
  border-color: var(--border-color);
  box-shadow: none !important; /* Sin sombras */
}

.modal-footer.modern-modal-footer .mat-outline-button:focus {
  border-color: var(--brand-primary);
  box-shadow: none !important; /* Sin sombras */
}

.modal-footer.modern-modal-footer .mat-outline-button:active {
  background-color: var(--background-hover);
  box-shadow: none !important; /* Sin sombras */
}

/* Botón Aceptar (primary) - estilo shadcn - SIN SOMBRAS */
.modal-footer.modern-modal-footer .mat-button {
  background-color: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #ffffff;
  box-shadow: none !important; /* Sin sombras */
}

.modal-footer.modern-modal-footer .mat-button:hover {
  background-color: var(--brand-primary-hover);
  border-color: var(--brand-primary-hover);
  box-shadow: none !important; /* Sin sombras */
}

.modal-footer.modern-modal-footer .mat-button:focus {
  border-color: var(--brand-primary-hover);
  box-shadow: none !important; /* Sin sombras */
}

.modal-footer.modern-modal-footer .mat-button:active {
  background-color: var(--brand-primary-hover);
  opacity: 0.9;
  box-shadow: none !important; /* Sin sombras */
}

.modal-footer.modern-modal-footer .mat-button:disabled {
  background-color: var(--background-hover);
  border-color: var(--background-hover);
  color: var(--text-tertiary);
  cursor: not-allowed;
  opacity: 0.5;
  box-shadow: none !important; /* Sin sombras */
}

/* ============================================
   ANIMACIONES - Estilo shadcn (más sutil)
   ============================================ */
.modal.fade .modal-dialog {
  transition: transform 0.15s ease-out, opacity 0.15s ease-out;
  transform: scale(0.98) translateY(-8px);
  opacity: 0;
}

.modal.show .modal-dialog {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* ============================================
   RESPONSIVE - Móvil
   ============================================ */
@media (max-width: 640px) {
  .modal-dialog.modern-modal-dialog {
    max-width: calc(100% - 2rem);
    margin: 1rem;
  }

  .modal-header.modern-modal-header {
    padding: 1.25rem 1.25rem 0.5rem;
  }

  .modal-body.modern-modal-body {
    padding: 0 1.25rem;
  }

  .modal-footer.modern-modal-footer {
    padding: 1rem 1.25rem 1.25rem;
    flex-direction: column-reverse;
    gap: 0.5rem;
  }

  .modal-footer.modern-modal-footer button {
    width: 100%;
    margin-left: 0 !important; /* Eliminar margin de Bootstrap */
    margin-right: 0 !important;
  }

  /* Override específico para el selector de Bootstrap */
  .modal-footer.modern-modal-footer > :not(:first-child) {
    margin-left: 0 !important;
  }

  /* En móvil, botón secundario arriba */
  .modal-footer.modern-modal-footer .mat-outline-button {
    order: 2;
  }

  .modal-footer.modern-modal-footer .mat-button {
    order: 1;
  }
}

/* ============================================
   TEMA DARK - Ajustes específicos
   ============================================ */
body.skin-dark .modal-header.modern-modal-header .close:hover,
body.skin-dark .modal-header.modern-modal-header .btn-close2:hover {
  background: rgba(255, 255, 255, 0.1);
}

body.skin-dark .modal-footer.modern-modal-footer .mat-outline-button {
  border-color: var(--border-color);
}

body.skin-dark .modal-footer.modern-modal-footer .mat-outline-button:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* ============================================
   TEMA LIGHT - Ajustes específicos
   ============================================ */
body.skin-light .modal-footer.modern-modal-footer .mat-outline-button {
  background-color: #ffffff; /* Fondo blanco para distinguirse del footer gris */
  border-color: var(--border-color);
}

body.skin-light .modal-footer.modern-modal-footer .mat-outline-button:hover {
  background-color: rgba(0, 0, 0, 0.05); /* Fondo gris claro al hacer hover */
}

/* ============================================
   UTILIDADES ADICIONALES
   ============================================ */

/* Para cuando se agregue descripción debajo del título */
.modal-header.modern-modal-header.with-description {
  padding-bottom: 1rem;
}

/* Para inputs con icono (opcional) */
.input-with-icon {
  position: relative;
}

.input-with-icon .form-control {
  padding-left: 2.5rem;
}

.input-with-icon .icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  pointer-events: none;
}

/* ============================================
   SECTION DIVIDER - Separador dentro de modal
   ============================================ */
.modal-body.modern-modal-body .modern-section-divider {
  display: flex;
  align-items: center;
  margin: 1.25rem 0 1rem 0;
  position: relative;
}

.modal-body.modern-modal-body .modern-section-divider::before,
.modal-body.modern-modal-body .modern-section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, currentColor, transparent);
  opacity: 0.15;
}

.modal-body.modern-modal-body .modern-section-divider-text {
  padding: 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

body.skin-light .modal-body.modern-modal-body .modern-section-divider {
  color: #64748b;
}

body.skin-light .modal-body.modern-modal-body .modern-section-divider-text {
  color: #475569;
}

body.skin-dark .modal-body.modern-modal-body .modern-section-divider {
  color: #94a3b8;
}

body.skin-dark .modal-body.modern-modal-body .modern-section-divider-text {
  color: #cbd5e1;
}

/* ============================================
   DROPIFY - Estilo dentro de modal
   Los estilos de upload-zone se heredan de modern-form-pro.css
   Solo se anulan bordes/backgrounds del wrapper cuando está dentro de upload-zone
   ============================================ */
.modal-body.modern-modal-body .upload-zone .dropify-wrapper {
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  min-height: 140px !important;
  height: 140px !important;
  padding: 0 !important;
}

body.skin-dark .modal-body.modern-modal-body .upload-zone .dropify-wrapper {
  background: #0f0f11 !important;
}

body.skin-light .modal-body.modern-modal-body .upload-zone .dropify-wrapper {
  background: #f4f4f5 !important;
}

/* ============================================
   TRANSITION OVERRIDES PARA MODALES
   Solo deshabilita transiciones en inputs/dropify, no en el modal fade
   ============================================ */

/* Inputs y form-control dentro de modales - sin transición para cambio de tema */
.modal .form-control,
.modal .modern-input,
.modal input.form-control,
.modal select.form-control,
.modal textarea.form-control,
.modal-body .form-control,
.modal-body .modern-input {
  -webkit-transition: none !important;
  -o-transition: none !important;
  transition: none !important;
}

/* Dropify dentro de modales - sin transición */
.modal .dropify-wrapper,
.modal .dropify-wrapper *,
.modal-body .dropify-wrapper,
.modal-body .dropify-wrapper * {
  -webkit-transition: none !important;
  -o-transition: none !important;
  transition: none !important;
}

/* Skin dark override para modales */
body.skin-dark .modal .form-control,
body.skin-dark .modal .modern-input,
body.skin-dark .modal .dropify-wrapper,
body.skin-dark .modal .dropify-wrapper * {
  -webkit-transition: none !important;
  -o-transition: none !important;
  transition: none !important;
}

/* Skin light override para modales */
body.skin-light .modal .form-control,
body.skin-light .modal .modern-input,
body.skin-light .modal .dropify-wrapper,
body.skin-light .modal .dropify-wrapper * {
  -webkit-transition: none !important;
  -o-transition: none !important;
  transition: none !important;
}

/* ============================================
   FORM-SECTION dentro de modales
   ============================================ */
.modal-body.modern-modal-body .form-section {
  background: var(--background-card);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.modal-body.modern-modal-body .form-section:last-child {
  margin-bottom: 0.5rem;
}

body.skin-light .modal-body.modern-modal-body .form-section {
  background: #ffffff;
  border-color: #e4e4e7;
}

body.skin-dark .modal-body.modern-modal-body .form-section {
  background: #18181b;
  border-color: #27272a;
}

.modal-body.modern-modal-body .form-section-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 1rem 0;
}

body.skin-dark .modal-body.modern-modal-body .form-section-title {
  color: #fafafa;
}

body.skin-light .modal-body.modern-modal-body .form-section-title {
  color: #18181b;
}

/* Form row dentro de modales */
.modal-body.modern-modal-body .form-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 0;
}

.modal-body.modern-modal-body .form-row + .form-row {
  margin-top: 0;
}

.modal-body.modern-modal-body .form-row .form-group {
  flex: 1;
  margin-bottom: 0;
}

.modal-body.modern-modal-body .form-row .form-group-lg {
  flex: 2;
}

.modal-body.modern-modal-body .form-row .form-group-sm {
  flex: 0 0 120px;
}

/* Form label dentro de modales */
.modal-body.modern-modal-body .form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

body.skin-dark .modal-body.modern-modal-body .form-label {
  color: #a1a1aa;
}

body.skin-light .modal-body.modern-modal-body .form-label {
  color: #71717a;
}

/* Form input dentro de modales */
.modal-body.modern-modal-body .form-input {
  width: 100%;
  height: 38px;
  padding: 0 0.875rem;
  font-size: 0.8125rem;
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--background);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  outline: none;
  transition: none;
}

.modal-body.modern-modal-body .form-input::placeholder {
  color: var(--text-tertiary);
}

.modal-body.modern-modal-body .form-input:focus {
  border-color: #a1a1aa;
  box-shadow: 0 0 0 3px rgba(113, 113, 122, 0.15);
}

.modal-body.modern-modal-body .form-input.error-input {
  border-color: #ef4444 !important;
}

body.skin-dark .modal-body.modern-modal-body .form-input {
  background: #0f0f11;
  border-color: #3f3f46;
  color: #fafafa;
}

body.skin-dark .modal-body.modern-modal-body .form-input:focus {
  border-color: #71717a;
  box-shadow: 0 0 0 3px rgba(161, 161, 170, 0.2);
}

body.skin-dark .modal-body.modern-modal-body .form-input::placeholder {
  color: #52525b;
}

body.skin-light .modal-body.modern-modal-body .form-input {
  background-color: #ffffff;
  border: 1px solid #d4d4d8;
  color: #18181b;
}

body.skin-light .modal-body.modern-modal-body .form-input:focus {
  border-color: #a1a1aa;
  box-shadow: 0 0 0 3px rgba(113, 113, 122, 0.22);
}

body.skin-light .modal-body.modern-modal-body .form-input::placeholder {
  color: #a1a1aa;
}

/* Select form-input dentro de modales */
.modal-body.modern-modal-body select.form-input {
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2371717a' d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
}

body.skin-dark .modal-body.modern-modal-body select.form-input {
  background-color: #0f0f11;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a1a1aa' d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
}

body.skin-light .modal-body.modern-modal-body select.form-input {
  background-color: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2371717a' d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
}

/* Checkboxes dentro de modales */
.modal-body.modern-modal-body .form-checkboxes-vertical {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.modal-body.modern-modal-body .form-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.8125rem;
  color: var(--text-primary);
}

.modal-body.modern-modal-body .form-checkbox input[type="checkbox"] {
  display: none;
}

.modal-body.modern-modal-body .form-checkbox-mark {
  width: 18px;
  height: 18px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--background);
}

.modal-body.modern-modal-body .form-checkbox input[type="checkbox"]:checked + .form-checkbox-mark {
  background: #3b82f6;
  border-color: #3b82f6;
}

.modal-body.modern-modal-body .form-checkbox input[type="checkbox"]:checked + .form-checkbox-mark::after {
  content: '';
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-bottom: 2px;
}

.modal-body.modern-modal-body .form-checkbox-label {
  color: var(--text-primary);
}

body.skin-dark .modal-body.modern-modal-body .form-checkbox-mark {
  border-color: #3f3f46;
  background: #0f0f11;
}

body.skin-dark .modal-body.modern-modal-body .form-checkbox-label {
  color: #fafafa;
}

body.skin-light .modal-body.modern-modal-body .form-checkbox-mark {
  border-color: #d4d4d8;
  background: #ffffff;
}

body.skin-light .modal-body.modern-modal-body .form-checkbox-label {
  color: #18181b;
}

/* Upload-zone dentro de modales - hereda estilos de modern-form-pro.css */
/* Solo override de transiciones para cambio de tema */
.modal .upload-zone,
.modal .upload-zone .dropify-wrapper,
.modal .upload-zone .dropify-wrapper * {
  -webkit-transition: none !important;
  -o-transition: none !important;
  transition: none !important;
}

/* Form section row dentro de modales (2 columnas lado a lado) */
.modal-body.modern-modal-body .form-section-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.modal-body.modern-modal-body .form-section-row:last-child {
  margin-bottom: 0.75rem;
}

.modal-body.modern-modal-body .form-section-row .form-section {
  margin-bottom: 0;
}

.modal-body.modern-modal-body .form-section-row.left-wide {
  grid-template-columns: 1.5fr 1fr;
}

.modal-body.modern-modal-body .form-section-row.left-wider {
  grid-template-columns: 2fr 1fr;
}

.modal-body.modern-modal-body .form-section-row.right-wider {
  grid-template-columns: 1fr 2fr;
}

/* Responsive para form-row dentro de modales */
@media (max-width: 640px) {
  .modal-body.modern-modal-body .form-row {
    flex-direction: column;
    gap: 0;
  }

  .modal-body.modern-modal-body .form-row .form-group {
    margin-bottom: 1rem;
  }

  .modal-body.modern-modal-body .form-row .form-group-lg,
  .modal-body.modern-modal-body .form-row .form-group-sm {
    flex: 1;
  }

  .modal-body.modern-modal-body .form-section-row,
  .modal-body.modern-modal-body .form-section-row.left-wide,
  .modal-body.modern-modal-body .form-section-row.left-wider,
  .modal-body.modern-modal-body .form-section-row.right-wider {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   DATATABLES DENTRO DE MODALES
   Mismo tamaño de fuente que las páginas
   ============================================ */
.modern-modal .dataTables_wrapper,
.modern-modal table.dataTable {
  font-size: 0.8125rem !important;
  font-family: var(--font-sans) !important;
}

.modern-modal table.dataTable thead th {
  font-size: 0.75rem !important;
  font-weight: 500 !important;
}

.modern-modal table.dataTable tbody td {
  font-size: 0.8125rem !important;
  padding: 0.625rem 0.75rem !important;
}

.modern-modal .dataTables_length,
.modern-modal .dataTables_filter,
.modern-modal .dataTables_info,
.modern-modal .dataTables_paginate {
  font-size: 0.75rem !important;
  color: var(--text-secondary) !important;
}

.modern-modal .dataTables_length select,
.modern-modal .dataTables_filter input {
  font-size: 0.8125rem !important;
}

.modern-modal .dataTables_paginate .paginate_button {
  font-size: 0.75rem !important;
}
