/**
 * INTEGRA-NET - Estilos Globales y Calibración de Layout Vuexy
 * Plataforma Académica y de Trazabilidad
 */

/* ========================================================
   ESTRUCTURA ESTÁTICA Y FIJA: CABECERA, MENÚ LATERAL Y PIE
   Solo el contenedor central de contenido cambia y se desplaza
   ======================================================== */

/* 1. Menú Lateral Fijo y Estático */
@media (min-width: 1200px) {
  #layout-menu.layout-menu {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 16.25rem !important;
    height: 100vh !important;
    z-index: 1030 !important;
    overflow-y: auto !important;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.06) !important;
  }
  
  .layout-menu-collapsed #layout-menu.layout-menu {
    width: 5.125rem !important;
  }
  
  .layout-page {
    padding-left: 16.25rem !important;
    min-height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
  }
  
  .layout-menu-collapsed .layout-page {
    padding-left: 5.125rem !important;
  }
}

/* 2. Cabecera / Navbar Fija y Estática */
#layout-navbar.layout-navbar {
  position: fixed !important;
  top: 0.75rem !important;
  z-index: 1025 !important;
  border-radius: 10px !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  background-color: rgba(255, 255, 255, 0.96) !important;
}

@media (min-width: 1200px) {
  .layout-navbar-fixed:not(.layout-menu-collapsed) #layout-navbar.navbar-detached {
    width: calc(100% - 16.25rem - 3rem) !important;
    max-width: calc(100% - 16.25rem - 3rem) !important;
    left: calc(16.25rem + 1.5rem) !important;
    right: 1.5rem !important;
    margin: 0 !important;
  }
  
  .layout-navbar-fixed.layout-menu-collapsed #layout-navbar.navbar-detached {
    width: calc(100% - 5.125rem - 3rem) !important;
    max-width: calc(100% - 5.125rem - 3rem) !important;
    left: calc(5.125rem + 1.5rem) !important;
    right: 1.5rem !important;
    margin: 0 !important;
  }
}

@media (max-width: 1199.98px) {
  #layout-navbar.navbar-detached {
    width: calc(100% - 2rem) !important;
    max-width: calc(100% - 2rem) !important;
    left: 1rem !important;
    right: 1rem !important;
    margin: 0 !important;
  }
}

/* 3. Pie de Página / Footer Fijo y Estático */
.content-footer.footer {
  position: fixed !important;
  bottom: 0 !important;
  z-index: 1020 !important;
  height: 52px !important;
  background-color: #ffffff !important;
  border-top: 1px solid #e2e8f0 !important;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.04) !important;
  display: flex !important;
  align-items: center !important;
}

@media (min-width: 1200px) {
  .layout-wrapper:not(.layout-menu-collapsed) .content-footer {
    left: 16.25rem !important;
    width: calc(100% - 16.25rem) !important;
  }
  
  .layout-wrapper.layout-menu-collapsed .content-footer {
    left: 5.125rem !important;
    width: calc(100% - 5.125rem) !important;
  }
}

@media (max-width: 1199.98px) {
  .content-footer {
    left: 0 !important;
    width: 100% !important;
  }
}

/* 4. Área Central de Contenido (Única zona que se desplaza / scrollable) */
.layout-navbar-fixed .layout-wrapper:not(.layout-horizontal):not(.layout-without-menu) .layout-page {
  padding-top: 70px !important;
}

.content-wrapper {
  padding-top: 0 !important;
  padding-bottom: 65px !important;
  min-height: calc(100vh - 70px) !important;
  overflow-y: auto !important;
  display: flex !important;
  flex-direction: column !important;
  flex-grow: 1 !important;
}

.content-wrapper > .container-fluid,
.content-wrapper > .container-xxl {
  flex: 1 0 auto !important;
}

/* Reducción de espacio muerto antes de las cajas / tarjetas */
.content-wrapper > .container-xxl.container-p-y,
.content-wrapper > .container-fluid.container-p-y {
  padding-top: 0.5rem !important;
}

.content-wrapper > .container-xxl > .row:first-of-type,
.content-wrapper > .container-fluid > .row:first-of-type {
  margin-top: 0 !important;
}

/* Tipografía de Marca Oficial INTEGRA-NET */
.app-brand-text.integra-brand-title {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-size: 1.25rem !important;
  font-weight: 900 !important;
  letter-spacing: -0.5px !important;
  text-transform: uppercase !important;
  line-height: 1.1 !important;
  display: inline-flex !important;
  align-items: center !important;
}

.integra-brand-part1 {
  color: #1e3a8a !important; /* Azul Acero Profundo */
}

.integra-brand-part2 {
  color: #2563eb !important; /* Azul Eléctrico */
}

/* Jerarquía de Capas (Z-Index) para Modales de Vuexy y SweetAlert2 */
.modal {
  z-index: 109000 !important;
}

.modal-backdrop {
  z-index: 108000 !important;
}

.swal2-container {
  z-index: 110000 !important;
}

/* Ocultar botón Deny ("No") en SweetAlert2 si no se solicita explícitamente */
.swal2-actions .swal2-deny[style*="display: none"],
.swal2-actions button.swal2-deny[style*="display: none"],
.swal2-actions .swal2-deny:not([style*="display: inline-block"]):not([style*="display: block"]):not([style*="display: flex"]) {
  display: none !important;
}

/* Selector de Roles y Tarjetas de Modal */
.role-card-select-box {
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  background-color: #ffffff;
  padding: 16px;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  height: 100%;
}

.role-card-select-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  border-color: #2563eb !important;
}

/* ========================================================
   Corrección Global del Botón Cerrar (X) de Modales en Vuexy
   Elimina el desfase 'transform: translate(23px, -25px)' de Vuexy
   para que la X aparezca completa, nítida y perfectamente alineada
   ======================================================== */
.modal .btn-close,
.modal .modal-header .btn-close,
html:not([dir=rtl]) .modal .btn-close,
html:not([dir=rtl]) .modal .modal-header .btn-close {
  position: static !important;
  transform: none !important;
  margin: 0 0 0 auto !important;
  opacity: 0.9 !important;
  box-shadow: none !important;
  background-color: rgba(255, 255, 255, 0.25) !important;
  border-radius: 50% !important;
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.modal .btn-close:hover,
.modal .modal-header .btn-close:hover,
html:not([dir=rtl]) .modal .btn-close:hover,
html:not([dir=rtl]) .modal .modal-header .btn-close:hover {
  opacity: 1 !important;
  transform: scale(1.1) !important;
  background-color: rgba(255, 255, 255, 0.45) !important;
}

/* Modales con encabezado claro/blanco */
.modal-header:not(.bg-primary):not(.bg-success):not(.bg-danger):not(.bg-warning):not(.bg-info):not(.bg-dark):not(.bg-secondary) .btn-close,
.modal-header:not(.bg-primary):not(.bg-success):not(.bg-danger):not(.bg-warning):not(.bg-info):not(.bg-dark):not(.bg-secondary) .modal-header .btn-close {
  background-color: #f1f5f9 !important;
  color: #64748b !important;
}

.modal-header:not(.bg-primary):not(.bg-success):not(.bg-danger):not(.bg-warning):not(.bg-info):not(.bg-dark):not(.bg-secondary) .btn-close:hover,
.modal-header:not(.bg-primary):not(.bg-success):not(.bg-danger):not(.bg-warning):not(.bg-info):not(.bg-dark):not(.bg-secondary) .modal-header .btn-close:hover {
  background-color: #e2e8f0 !important;
  color: #1e293b !important;
}

/* ========================================================
   Amplitud y Ancho Completo del Cuerpo de Todos los Módulos
   Elimina la restricción estrecha de container-xxl
   ======================================================== */
.content-wrapper .container-xxl,
.content-wrapper .container-fluid,
.layout-page .container-xxl,
.layout-page .container-fluid,
.container-xxl {
  max-width: 100% !important;
  width: 100% !important;
  padding-left: 1.5rem !important;
  padding-right: 1.5rem !important;
}

@media (max-width: 767.98px) {
  .content-wrapper .container-xxl,
  .content-wrapper .container-fluid,
  .layout-page .container-xxl,
  .layout-page .container-fluid,
  .container-xxl {
    padding-left: 0.85rem !important;
    padding-right: 0.85rem !important;
  }
}

.card-datatable table.dataTable {
  width: 100% !important;
}

/* ========================================================
   Componentes de Cabecera y Tarjetas de Estadísticas Tenues
   Estándar Vuexy Global para Todos los Módulos
   ======================================================== */
.mat-hero-soft {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.875rem 1.25rem;
  margin-bottom: 1.125rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.stat-box {
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.stat-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.stat-box-icon {
  width: 38px;
  height: 38px;
  border-radius: 0.375rem;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.stat-box-num {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.1;
}
.stat-box-lbl {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #64748b;
  margin-bottom: 2px;
}

.stat-blue   { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.stat-blue .stat-box-icon   { background: #dbeafe; color: #2563eb; }

.stat-green  { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }
.stat-green .stat-box-icon  { background: #dcfce7; color: #16a34a; }

.stat-orange { background: #fff7ed; border-color: #fed7aa; color: #c2410c; }
.stat-orange .stat-box-icon { background: #ffedd5; color: #ea580c; }

.stat-purple { background: #faf5ff; border-color: #e9d5ff; color: #7e22ce; }
.stat-purple .stat-box-icon { background: #f3e8ff; color: #9333ea; }


