/* Cabecera estándar para todos los modales */
.vb-modal-header {
  background: linear-gradient(90deg, var(--primary) 60%, var(--secondary) 100%);
  color: #fff;
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 1.1rem;
  border-bottom: none;
  min-height: 3.5rem;
}
.vb-modal-header .vb-btn-icon {
  margin-left: auto;
  background: transparent;
  color: #fff;
  border: none;
  box-shadow: none;
  padding: 0.4rem 0.6rem;
  border-radius: 0.5rem;
}
.vb-modal-header .vb-btn-icon:hover {
  background: rgba(0,0,0,0.15);
  color: #fff;
}
/* Iconos en headers de modales con tamaño apropiado */
.vb-modal-header i {
  font-size: 1.2rem;
}
/* --- Panel Responsive & Utilidades (Depurado y Consolidado) --- */
@media (max-width: 991.98px) {
  #main-panel-responsive {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding: 1.2rem 0.2rem 0 0.2rem !important;
  }
  .vb-panel-fluid, .vb-panel-row {
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    height: calc(100vh - 64px) !important;
    min-height: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  #panel-content-wrapper {
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .sidebar-modern {
    width: 90vw;
    max-width: 340px;
    border-radius: 0 1.2rem 1.2rem 0;
    top: 0;
    height: 100vh;
    box-shadow: 0 8px 32px 0 #2d2e8322;
    z-index: 100;
  }
  .sidebar-modern.hide {
    transform: translateX(-110%);
    box-shadow: none;
  }
  .main-panel {
    margin-left: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    min-height: 0 !important;
    padding: 1.2rem 0.5rem 0 0.5rem !important;
  }
}
.vb-panel-fluid, .vb-panel-row {
  width: 100vw !important;
  min-width: 0 !important;
  max-width: 100vw !important;
  height: calc(100vh - 64px) !important;
  min-height: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
.vb-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.04);
  border: 1.5px solid var(--border);
  box-shadow: 0 2px 8px #0d6efd11;
  font-size: 1.2rem;
  transition: background 0.22s, box-shadow 0.22s, transform 0.15s, color 0.18s;
  cursor: pointer;
  margin: 0 0.18rem;
  padding: 0;
  position: relative;
  overflow: hidden;
  outline: none !important;
}
.vb-btn-icon i {
  font-size: 1.2rem;
  transition: color 0.18s;
}
.vb-btn-icon:focus {
  outline: none;
  box-shadow: 0 0 0 2px #0d6efd44, 0 2px 12px #0d6efd22;
  background: #f3f6fa;
  transform: scale(1.08);
}
.vb-btn-icon:active {
  background: #e9ecef;
  transform: scale(0.96);
}
.vb-btn-icon:hover, .vb-btn-icon:focus {
  background: rgba(0, 123, 255, 0.13);
  box-shadow: 0 4px 16px rgba(0,0,0,0.13);
  transform: translateY(-2px) scale(1.09);
  outline: none;
}
.vb-btn-edit:hover, .vb-btn-edit:focus {
  background: rgba(13, 110, 253, 0.13);
  box-shadow: 0 2px 12px #0d6efd22;
  transform: scale(1.08);
}
.vb-btn-delete:hover, .vb-btn-delete:focus {
  background: rgba(220, 53, 69, 0.13);
  box-shadow: 0 2px 12px #dc354522;
  transform: scale(1.08);
}
.vb-btn-add {
  background: rgba(40, 167, 69, 0.10);
}
.vb-btn-add:hover, .vb-btn-add:focus {
  background: rgba(40, 167, 69, 0.18);
  box-shadow: 0 2px 12px #0d6efd22;
}
.vb-btn-add:hover i {
  color: #6610f2 !important;
}
.vb-table tr {
  transition: background 0.18s;
}
.vb-table tbody tr:hover {
  background: #e0f2fe44;
}
/* ...el resto del CSS global y utilidades permanece igual, sin duplicados... */
/* VeryBucay - Estilos globales modernos */
:root {
  --primary: #2d2e83; /* Azul oscuro elegante */
  --secondary: #7c3aed; /* Violeta moderno */
  --accent: #00c6fb; /* Azul acento */
  --bg-light: #f6f7fb;
  --bg-gradient: linear-gradient(120deg, #f6f7fb 0%, #e9e6f7 60%, #e0e7ff 100%);
  --border: #d1d5db;
  --text-main: #232946;
  --text-muted: #7b809a;
}
body {
  background: var(--bg-gradient);
  color: var(--text-main);
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  min-height: 100vh;
}
.card {
  background: #fff;
  border-radius: 1.2rem;
  box-shadow: 0 4px 24px 0 rgba(30, 64, 175, 0.10), 0 1.5px 6px 0 rgba(16, 185, 129, 0.08);
  border: 1.5px solid var(--border);
  padding: 2rem 1.5rem;
}
.btn-primary {
  background: linear-gradient(90deg, var(--secondary) 0%, var(--primary) 100%);
  border: none;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.5px;
  transition: background 0.2s;
}
.btn-primary:hover {
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
}
.input-group, .form-control {
  border: 1.5px solid var(--border);
  border-radius: 0.5rem;
  background: var(--bg-light);
  box-shadow: 0 1px 4px 0 var(--primary)11;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input-group:focus-within, .form-control:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 0.15rem #38bdf822;
  background: #f0f9ff;
  outline: none;
}
.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: #e0f2fe;
  border: 2px solid var(--primary);
  box-shadow: 0 2px 8px 0 #1e40af22;
  display: inline-block;
}
.avatar-initials {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #e0f2fe;
  color: var(--primary);
  font-weight: 700;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--primary);
  box-shadow: 0 2px 8px 0 #1e40af22;
}
.header-panel {
  background: #fff;
  border-bottom: 1.5px solid var(--border);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sidebar {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px) saturate(1.2);
  color: #1e40af;
  min-height: 100vh;
  padding: 0;
  border-radius: 0;
  box-shadow: 2px 0 16px 0 #1e40af11;
  width: 240px;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 999;
}
.sidebar-modern {
  border-radius: 0 !important;
}
.sidebar-header {
  border-radius: 0 !important;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  border-radius: 0;
  box-shadow: 0 2px 12px 0 #1e40af11;
  margin: 0;
  padding: 1.2rem 0.5rem 1.2rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.sidebar-menu {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 1.2rem 0.5rem 1.2rem 0.5rem;
}
.sidebar-menu::-webkit-scrollbar {
  width: 7px;
  background: transparent;
}
.sidebar-menu::-webkit-scrollbar-thumb {
  background: #e0f2fe;
  border-radius: 6px;
  box-shadow: 0 2px 8px #1e40af11;
}
.sidebar-menu::-webkit-scrollbar-thumb:hover {
  background: #bae6fd;
}
.sidebar .nav-link {
  color: #1e40af;
  font-weight: 500;
  margin-bottom: 1rem;
  border-radius: 0.5rem;
  transition: background 0.2s, color 0.2s;
  padding: 0.7rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.sidebar .nav-link.active, .sidebar .nav-link:hover {
  background: #e0f2fe;
  color: #16a34a;
}
.vb-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 64px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px) saturate(1.2);
  box-shadow: 0 4px 24px 0 #1e40af13, 0 1.5px 6px 0 #16a34a13;
  border-radius: 0;
  padding: 0 2.2rem 0 1.2rem;
  display: flex;
  align-items: center;
  z-index: 1000;
  height: 64px;
}
.vb-header-logo img {
  height: 50px;
  display: block;
}
.vb-main-content {
  width: auto;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  overflow-x: hidden;
  padding-top: 45px; /* Espacio igual a la altura del header fijo */
}
@media (max-width: 900px) {
  .vb-header {
    padding: 0.5rem 0.7rem;
    min-height: 54px;
    height: 54px;
  }
  .vb-main-content {
    padding-top: 54px; /* Ajuste para header más pequeño en móvil */
  }
  .vb-header-logo img {
    height: 40px;
    max-width: 130px;
  }
  .vb-user-avatar, .avatar-lg {
    width: 38px;
    height: 38px;
  }
  .avatar-lg {
    font-size: 1.3rem;
  }
  .vb-user-avatar {
    width: 32px !important;
    height: 32px !important;
  }
  .vb-user-name {
    font-size: 1rem;
  }
  .sidebar {
    width: 100vw;
    min-height: 0;
    max-height: 60vh;
    position: fixed;
    top: 54px;
    left: 0;
    right: 0;
    border-radius: 0 0 1.2rem 1.2rem;
    box-shadow: 0 8px 32px 0 #1e40af22;
    z-index: 1200;
  }
  .sidebar-header {
    padding: 0.7rem 0.5rem 0.7rem 0.5rem;
  }
  .sidebar-menu {
    max-height: 40vh;
    padding: 0.7rem 0.5rem 0.7rem 0.5rem;
  }
}

/* Cuando el menú lateral está oculto, el panel ocupa el 100% del ancho */
.sidebar-hidden .main-panel {
  margin-left: 0 !important;
  width: 100vw !important;
  max-width: 100vw !important;
}

/* Scroll para el panel principal */
.panel-scroll {
  height: calc(100vh - 70px); /* Ajusta 70px según la altura del header si es necesario */
  overflow-y: auto;
  overflow-x: hidden;
}
.vb-user-avatar {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
  box-shadow: 0 2px 8px 0 #1e40af22;
  background: #e0f2fe;
  display: inline-block;
  transition: box-shadow 0.22s, border 0.22s, transform 0.18s;
  z-index: 1202;
}
@media (max-width: 900px) {
  .vb-user-avatar {
    width: 28px !important;
    height: 28px !important;
  }
}
.vb-pagination-info {
  color: #192cb4;
  font-size: 0.98rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding-left: 0.2rem;
  padding-right: 0.2rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
/* Pie de paginación integrado al panel de la tabla */
.vb-pagination-footer {
  background: #fff;
  border-top: 1px solid #e5e7eb;
}
.vb-pagination .page-item .page-link,
.vb-page-link {
  color: #0d6efd;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
}
.vb-pagination .page-item .page-link:hover,
.vb-page-link:hover {
  color: #0b5ed7;
  background: #f1f5f9;
  border-color: #e2e8f0;
}
.vb-pagination .page-item.active .page-link,
.vb-page-link.active {
  background: #0d6efd; /* Azul Bootstrap clásico */
  border-color: #0d6efd;
  color: #fff;
}
.vb-pagination .page-item.disabled .page-link{
  color: #94a3b8;
}
.vb-table-card {
  background: #fff;
  border-radius: 1.2rem;
  box-shadow: 0 4px 24px 0 rgba(30, 64, 175, 0.10);
  padding: 0;
  margin-bottom: 2rem;
}

.vb-table-filters {
  background: transparent;
  border-bottom: 1px solid #e5e7eb;
  border-radius: 1.2rem 1.2rem 0 0;
  margin-bottom: 0;
}
.vb-table-filters .btn.btn-primary {
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
  color: #fff;
  border: none;
  font-weight: 600;
  box-shadow: 0 2px 8px #0d6efd11;
  transition: background 0.18s, box-shadow 0.18s;
}
.vb-table-filters .btn.btn-primary:hover {
  background: linear-gradient(90deg, var(--secondary) 0%, var(--primary) 100%);
  color: #fff;
}
.vb-table-filters .btn.btn-light {
  background: #f8fafc;
  color: #0d6efd;
  border: 1.5px solid #e5e7eb;
  font-weight: 600;
  transition: background 0.18s, color 0.18s;
}
.vb-table-filters .btn.btn-light:hover {
  background: #e0f2fe;
  color: #dc3545;
}
.vb-table-panel {
  border-radius: 0 0 1.2rem 1.2rem;
  margin: 0;
  background: #fff;
  box-shadow: none;
}

.main-header {
  height: 64px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border-bottom: 1px solid #e9ecef;
}
/* Sidebar responsive tipo drawer con diseño moderno y ligero */
.sidebar-modern {
  position: fixed;
  top: 64px;
  left: 0;
  height: calc(100vh - 64px);
  width: 260px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 0 1.5rem 1.5rem 0;
  border-right: 1px solid #e2e8f0;
  box-shadow: 0 4px 25px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(15, 23, 42, 0.03);
  z-index: 100;
  transition: transform 0.32s cubic-bezier(.4,1.3,.5,1), box-shadow 0.22s;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  backdrop-filter: blur(20px);
}
.sidebar-modern.hide {
  transform: translateX(-110%);
  box-shadow: none;
}
.main-panel {
  margin-left: 260px;
  transition: margin-left 0.32s cubic-bezier(.4,1.3,.5,1), width 0.32s cubic-bezier(.4,1.3,.5,1), max-width 0.32s cubic-bezier(.4,1.3,.5,1);
  width: calc(100vw - 260px);
  max-width: calc(100vw - 260px);
  height: calc(100vh - 64px);
  min-height: 0;
  box-sizing: border-box;
  overflow-x: hidden;
  padding: 1.5rem 1.5rem 0 1.5rem;
  background: #ffffff;
}
.sidebar-hidden .main-panel {
  margin-left: 0 !important;
  width: 100vw !important;
  max-width: 100vw !important;
}
@media (max-width: 991.98px) {
  .sidebar-modern {
    width: 90vw;
    max-width: 340px;
    border-radius: 0 1.2rem 1.2rem 0;
    top: 0;
    height: 100vh;
    box-shadow: 0 8px 32px 0 #2d2e8322;
    z-index: 100;
  }
  .sidebar-modern.hide {
    transform: translateX(-110%);
    box-shadow: none;
  }
  .main-panel {
    margin-left: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    min-height: 0 !important;
    padding: 1.2rem 0.5rem 0 0.5rem !important;
  }
}
.sidebar-modern.hide ~ .main-panel {
  margin-left: 0 !important;
  width: 100vw !important;
  max-width: 100vw !important;
}

/* === NUEVO DISEÑO DE SIDEBAR MODERNO === */

/* Título de marca en sidebar */
.sidebar-brand-text {
  padding: 1rem 1.5rem 0.5rem;
}

.sidebar-brand-text h6 {
  color: #64748b !important;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  margin-bottom: 0;
  font-weight: 600;
}

/* Menú de navegación del sidebar */
.sidebar-nav {
  padding: 0.75rem 1rem 2rem;
}

.sidebar-nav .nav-item {
  margin-bottom: 0.05rem;
}

/* Enlaces de navegación con diseño moderno y ligero */
.sidebar-nav .nav-link {
  position: relative;
  color: #475569;
  background: transparent;
  border: none;
  border-radius: 0.5rem;
  padding: 0.65rem 1rem;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  overflow: hidden;
  margin-bottom: 0.02rem;
}

/* Icono del enlace de navegación */
.sidebar-nav .nav-icon {
  width: 1.75rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(59, 130, 246, 0.08);
  border-radius: 0.4rem;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.sidebar-nav .nav-icon i {
  font-size: 1rem;
  color: inherit;
}

/* Texto del enlace */
.sidebar-nav .nav-text {
  flex: 1;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* Indicador de página activa */
.sidebar-nav .nav-indicator {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: transparent;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

/* Estados hover y active */
.sidebar-nav .nav-link:hover {
  color: #3b82f6 !important;
  background: rgba(59, 130, 246, 0.1) !important;
  transform: translateX(2px);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
  text-decoration: none !important;
}

.sidebar-nav .nav-link:hover .nav-icon {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  transform: scale(1.05);
}

.sidebar-nav .nav-link:hover .nav-indicator {
  background: rgba(59, 130, 246, 0.5);
}

/* Estado activo (página actual) */
.sidebar-nav .nav-link.active {
  color: #3b82f6 !important;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0.08) 100%) !important;
  border: 1px solid rgba(59, 130, 246, 0.2);
  box-shadow: 0 3px 10px rgba(59, 130, 246, 0.2);
  transform: translateX(3px);
  text-decoration: none !important;
  font-weight: 600;
}

.sidebar-nav .nav-link.active .nav-icon {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
  transform: scale(1.08);
}

.sidebar-nav .nav-link.active .nav-indicator {
  background: #3b82f6;
  box-shadow: 0 0 6px rgba(59, 130, 246, 0.4);
}

/* Efecto de ondas al hacer clic */
.sidebar-nav .nav-link:active {
  transform: scale(0.98);
}

/* Scrollbar personalizado para el sidebar */
.sidebar-menu {
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
}

.sidebar-menu::-webkit-scrollbar {
  width: 6px;
}

.sidebar-menu::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-menu::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3);
  border-radius: 3px;
}

.sidebar-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.4);
}

/* Logo y controles del sidebar */
.sidebar-logo {
  opacity: 0.95;
}

.sidebar-logo .logo-icon {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 0.5rem;
}

.sidebar-logo .logo-icon i {
  font-size: 1.2rem;
  color: #3b82f6;
}

.sidebar-logo .logo-text {
  color: #0d6efd;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  font-weight: 700;
}

/* Botones de control del sidebar */
.sidebar-btn {
  width: 2rem;
  height: 2rem;
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 0.5rem;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.sidebar-btn:hover {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  border-color: rgba(59, 130, 246, 0.3);
  transform: scale(1.05);
}

.sidebar-btn:active {
  transform: scale(0.95);
}

/* Responsivo para móviles */
@media (max-width: 991.98px) {
  .sidebar-modern {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 0 1.5rem 1.5rem 0;
    border-right: 1px solid #e2e8f0;
  }

  .sidebar-logo .logo-text {
    font-size: 1rem;
  }
}

/* Mejora para los nav-links generales */
.nav-link {
  font-size: 1.05rem;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  transition: background 0.2s, color 0.2s;
}

.nav-link:hover, .nav-link.active {
  background: #f0f4ff;
  color: #0d6efd;
}
.btn-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  transition: background 0.2s, box-shadow 0.2s;
  border: none;
}
.btn-circle:hover, .btn-circle:focus {
  background: #e9ecef;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.sidebar-header {
  position: relative;
  border-bottom: 1px solid #e9ecef;
}
.avatar-lg {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}
/* El backdrop debe estar por encima de la cabecera pero debajo del modal */
.modal-backdrop {
  background: rgba(30, 41, 175, 0.35) !important; /* azul oscuro semitransparente */
  backdrop-filter: blur(2px) saturate(1.1);
  z-index: 1150 !important;
}
/* El modal debe estar por encima del backdrop */
.modal {
  z-index: 1200 !important;
}
/* Empuja el modal hacia abajo para que no se corte con la cabecera fija y aprovecha el espacio */
@media (min-width: 576px) {
  .modal-dialog {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    /* Deja que Bootstrap centre el modal */
  }
  .modal-content {
    overflow-y: auto;
  }
}

/* --- Touch-Friendly Mobile Responsive Rules --- */
/* Asegurar que todos los botones tengan mínimo 44px de altura para touch */
@media (max-width: 900px) {
  .btn, button[type="submit"], button[type="button"], .btn-primary, .btn-secondary, .btn-danger, .btn-success, .btn-warning {
    min-height: 44px !important;
    padding: 0.75rem 1rem !important;
    font-size: 1rem !important;
  }
  
  /* Botones pequeños mantienen 44px mínimo pero con padding ajustado */
  .btn-sm {
    min-height: 44px !important;
    padding: 0.5rem 0.75rem !important;
    font-size: 0.9rem !important;
  }
  
  /* Inputs con mínimo 16px font-size para evitar zoom en iOS */
  .form-control, .form-select, input[type="text"], input[type="email"], input[type="password"], 
  input[type="number"], input[type="tel"], input[type="url"], textarea, select {
    font-size: 16px !important;
    min-height: 44px !important;
    padding: 0.75rem !important;
  }
  
  /* Botones de acción en tablas */
  .vb-btn-icon {
    min-width: 44px !important;
    min-height: 44px !important;
    width: 44px !important;
    height: 44px !important;
  }
  
  /* Enlaces que actúan como botones */
  .nav-link, .page-link {
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
    padding: 0.75rem 1rem !important;
  }
  
  /* Checkboxes y radios más grandes */
  .form-check-input {
    width: 1.2rem !important;
    height: 1.2rem !important;
    margin-top: 0.1rem !important;
  }
  
  /* Labels más grandes para mejor legibilidad */
  .form-label, label {
    font-size: 1rem !important;
    font-weight: 500 !important;
  }
}

/* --- Fin de la depuración de duplicados --- */

/* === MODALES ANIDADOS: Z-INDEX MANAGEMENT === */
/* Asegurar que los modales se muestren correctamente */
.modal.show {
  z-index: 1055; /* Bootstrap default */
}

/* Prevenir múltiples backdrops superpuestos */
.modal-backdrop + .modal-backdrop {
  display: none !important;
}

/* Asegurar que solo haya un backdrop activo */
body.modal-open .modal-backdrop:not(:last-child) {
  display: none !important;
}

/* Prevenir scroll del body cuando hay modales */
body.modal-open {
  overflow: hidden !important;
  padding-right: 0px !important;
}