:root {
    --bs-primary: #888b8d; 
    --bs-primary-rgb: 136,139,141; 
    --bs-secondary: #005eb8;
    --bs-secondary-rgb: 0,94,184;
}

table{
    border-radius: 0.5rem;
    overflow: hidden;
  }

.table-primary {
    --bs-table-bg: var(--bs-secondary);
    --bs-table-color: #f7f7f7; 
  }

.botonBoostrapTable a:hover {
    color: #e6e3ee !important;
}

/* Estilos botones asignacion de permisos */
.form-switch .form-check-input {
    background-color: #dc3545; 
    border: none;
    cursor: pointer;
    height: 18px;
}

.form-switch .form-check-input:checked {
    background-color: #26ac26; 
}

.form-switch .form-check-input:focus {
    box-shadow: none;
}

/* Estilos bootstrap table */
.pagination .page-item.active .page-link {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
    color: white !important;
}

.pagination .page-link {
    color: var(--bs-primary) !important;
}

.pagination .page-link:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.1) !important;
    border-color: var(--bs-primary) !important;
}

.table{
    border-radius: 1em;
}

/* Estilos menu lateral */
.nav-collapse-hide-child .menu-open:not(.menu-is-opening) > .nav-treeview {
  max-height: min-content;
  animation-name: fadeIn;
  animation-duration: 0.3s;
  animation-fill-mode: both;
}

body.sidebar-collapse .main-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    overflow-y: auto;
}

/* Centrar verticalmente los íconos SOLO cuando no se hace hover */
body.sidebar-collapse:not(.sidebar-open) .main-sidebar:hover .nav-sidebar,
body.sidebar-collapse:not(.sidebar-open) .main-sidebar .nav-sidebar:hover {
    position: static !important;
    transform: none !important;
}

/* Centrado solo cuando sidebar colapsado y sin hover */
body.sidebar-collapse .main-sidebar .nav-sidebar {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    transition: transform 0s ease;
}

/* padding de los ítems del menú */
.main-sidebar .nav-sidebar > .nav-item > .nav-link {
    padding-left: 6px !important; 
}

/* Padding a los iconos del menu */
.main-sidebar .nav-sidebar .nav-icon {
    padding-left: 12px;
}

/* Solo aplicar cuando el menú está expandido (sin sidebar-collapse) */
body:not(.sidebar-collapse) .main-sidebar .nav-sidebar .nav-icon {
    padding-left: 1px;
}

.nav-sidebar .nav-link p {
    white-space: nowrap;   
    text-overflow: ellipsis; 
    color:#2e2e2ebd;
    font-weight: 400;
}

.nav-sidebar .nav-link:hover{
    background-color: #cecece !important;  
}

.nav-sidebar .nav-treeview .nav-link.active {
    background-color: #F8F9FA !important;         
}

.nav-sidebar .nav-treeview .nav-link.active i{
    color: var(--bs-secondary) !important;            
}

.nav-sidebar .nav-treeview .nav-link.active p{
    color: var(--bs-secondary) !important; 
    font-weight: 700;
}

body:not(.sidebar-collapse) .nav-item .nav-treeview .nav-link {
    padding-left: 20px;
}

.nav-sidebar .nav-item{
    border-bottom: 1px solid rgb(223, 223, 223);
}

.nav-sidebar .nav-item .nav-link.active{
    box-shadow: none !important;
}


/* Estilos select2 */
.select2-container .select2-selection--single {
    height: calc(1.5em + 0.75rem + 2px); 
    padding: 0.375rem; 
    font-size: 1rem;
    line-height: 1.5;
    border: 1px solid #ced4da; 
    border-radius: 0.375rem; 
}

.select2-container--default .select2-results > .select2-results__options {
	max-height: 400px !important;
    padding: 0.5em;
}


/* Dual select bootstrap */
.bootstrap-duallistbox-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.bootstrap-duallistbox-container select option {
    padding: 6px;
    margin: 5px 0;
    font-size: 0.95rem;
    background-color: #f8f9fa;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    border: 1px solid #dee2e6;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.bootstrap-duallistbox-container select option:hover {
    background-color: #e9ecef;
}

.bootstrap-duallistbox-container select {
    height: 250px !important;
    border-radius: 8px;
    border: 1px solid #ccc;
    padding: 5px;
    background-color: white;
}

.bootstrap-duallistbox-container .box1,
.bootstrap-duallistbox-container .box2 {
    border-radius: 8px;
    border: 1px solid #ddd;
    padding: 12px;
    background-color: #ffffff;
    flex: 1;
    min-width: 0;
}

.bootstrap-duallistbox-container .box1::before,
.bootstrap-duallistbox-container .box2::before {
    display: block;
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 10px;
    color: #0d6efd;
    content: attr(data-title);
    font-family: "Segoe UI", sans-serif;
}

.bootstrap-duallistbox-container .moveall,
.bootstrap-duallistbox-container .removeall {
    width: 100%;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 0;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-top: 8px;
    margin-bottom: 4px;
}

.bootstrap-duallistbox-container .moveall {
    background-color: #198754 !important; /* verde Bootstrap */
    color: white;
}

.bootstrap-duallistbox-container .removeall {
    background-color: #dc3545 !important; /* rojo Bootstrap */
    color: white;
}

/* Estilos select en permisos usuario */
.isInherited{
    background-color: #f8d7da !important; /* Color de fondo rojo claro */
    color: #721c24 !important; /* Color de texto rojo oscuro */
    font-weight: bold; /* Negrita */
}

/* Spinner de carga */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); 
    backdrop-filter: blur(1px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1050; 
}

.spinner-container {
    text-align: center;
    color: white;
    font-size: 18px;
}

/* Bootstrap table detail view icon----------------- */
.bootstrap-table .detail-icon {
    font-size: 0.7rem;  
    font-weight: bold;
    padding: 0 2px;     
    line-height: 1.5rem; 
    color: #fff;
    background-color: var(--bs-secondary);
    border: 1px solid #fff;
    border-radius: 50%;
    width: 1.5rem;             
    height: 1.5rem;   
    cursor: pointer;          
}

.bootstrap-table td.detail {
    width: 1.5rem !important; 
    padding: 0 !important;
    text-align: center;
    vertical-align: middle;
}


/* Estilos card componente */
.cardComponent:hover{
    transform: translateY(-4px);
    transition: all 0.1s ease-in-out;
}

.botonBoostrapTable{
    position: absolute;
    box-shadow:#1a1a1a;
    top: 210px;
}


/* Toast componente */
.toast {
    opacity: 0;
    transform: translateX(100%);
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-hide {
    opacity: 0;
    transform: translateX(100%);
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background-color: currentColor;
    width: 100%;
    transform-origin: left;
    animation: toastProgress 5s linear forwards;
    opacity: 0.8;
}

@keyframes toastProgress {
    from { width: 100%; }
    to { width: 0%; }
}

.swal2-popup{
    max-width: 450px;
    
}

/* @media (max-width: 576px) {
    th.detalle-mobile,
    td.detalle-mobile {
        display: table-cell !important;
    }
} */




