body {
    font-family: 'Karla', sans-serif;
    /*font-family: 'Tilt Neon', cursive;*/
    font-size: 14px;

}
.text-primary {
    color: #000;
}
/* .btn-primary {
    background-color: #009846;
    border-color: #009846;
    color: #fff;
} */
.btn-primary.disabled, .btn-primary:disabled {
    background-color: #4e82a0;
    border-color: #4e82a0;
    color: #fff;
}
.btn-check:active+.btn-primary, .btn-check:checked+.btn-primary, .btn-primary.active, .btn-primary:active, .show>.btn-primary.dropdown-toggle {
    background-color: #4888c4;
    border-color: #6e869f;
    color: #fff;
}

.text-mapatour {
    color: #009846;
}
.chat-conversation .conversation-list .ctext-wrap {
    background-color: #f1f1f1;
    border-radius: 8px 8px 8px 0;
    overflow: hidden;
    padding: 12px 24px;
}
.chat-conversation .conversation-list .ctext-wrap-user {
    background-color: #d2fbd4;
    border-radius: 8px 8px 8px 0;
    overflow: hidden;
    padding: 12px 24px;
}
.bootstrap-select .dropdown-menu {
    width: 100%;
}
.bootstrap-select .dropdown-menu li small {
    white-space: normal;
}

.list-inline-item:not(:last-child) {
    margin-right: 0rem;
}

.loading-overlay-update {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(235, 235, 235, 0.9);
    z-index: 1100;
    justify-content: center;
    align-items: center;
}
.loading-overlay-load {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(235, 235, 235, 0.9);
    z-index: 1100;
    justify-content: center;
    align-items: center;
}


/* Estilos del Header */
.navbar-header {
    background-color: #d9e4ea; /* Fondo blanco como en la imagen */
    border-bottom: 1px solid #e9ecef; /* Línea divisoria sutil */
    max-height: 60px;
}

/* Estilos del Logo */
.navbar-brand-box {
    background-color: #FFFFFF!important; /* El fondo del logo debe ser igual al del header */
    padding: 0 1.5rem;
}

/* Estilos para el perfil de usuario en el topbar */
.header-profile-user {
    height: 42px;
    width: 42px;
    object-fit: contain;
    background-color: #f1f1f1;
}

/* Estilos para el botón de notificaciones */
.noti-icon {
    position: relative;
    padding: 0.4rem 0.6rem;
    transition: all 0.3s ease;
}

.noti-icon i {
    font-size: 22px;
}

.noti-icon .badge {
    position: absolute;
    top: 15px;
    right: 2px;
    font-size: 9px;
    padding: 0.25em 0.4em;
}

/* Estilos del texto de usuario en topbar */
#page-header-user-dropdown .d-flex.flex-column {
    line-height: 1.2;
    margin-right: 5px;
}

#page-header-user-dropdown .d-flex.flex-column small {
    font-size: 11px;
    opacity: 0.8;
}

/* ======================================
   Estilos del Sidebar - Configuración General
   ====================================== */
.vertical-menu {
    background-color: #ffffff!important; /* Color de fondo del sidebar */
    top: 0 !important;
}

.vertical-menu .vh-100 {
    padding-top: 70px;
    box-sizing: border-box;
}

/* Contenedor del logo en el sidebar */
body[data-sidebar=dark] .navbar-brand-box {
    background: #f1f1f1;
    max-height: 60px;
    padding-left: 16px;
}

/* Estilos generales para todos los elementos del menú */
#sidebar-menu ul li {
    margin: 5px 0;
}

#sidebar-menu ul li a {
    border-radius: 4px;
    margin: 0 0.5rem;
    transition: all 0.2s ease;
}

/* ======================================
   Estilos del Sidebar - Elementos del Menú
   ====================================== */

/* Estilos básicos para los enlaces del menú */
body[data-sidebar=dark] #sidebar-menu ul li a {
    color: #495057; /* Color de texto más oscuro para mejor contraste */
    font-weight: 500; /* Un poco más de peso para los textos */
    padding: 0.7rem 1.2rem; /* Padding para hacer los elementos más consistentes */
    position: relative;
    transition: color 0.2s ease, background-color 0.2s ease;
    transform: none;
    box-sizing: border-box;
}

/* Estilos para hover en enlaces del menú */
body[data-sidebar=dark] #sidebar-menu ul li a:hover,
body[data-sidebar=dark] #sidebar-menu ul li a:hover i {
    color: #000; /* Color de texto al pasar el mouse */
    background-color: rgba(0, 0, 0, 0.05); /* Fondo sutil al hacer hover */
    transform: none;
}

/* Estilos para submenús */
body[data-sidebar=dark] #sidebar-menu ul li ul.sub-menu li a {
    color: #495057; /* Color de texto para elementos de submenú */
    padding: 0.6rem 1.2rem 0.6rem 3.2rem; /* Padding con indentación para submenús */
}

body[data-sidebar=dark] #sidebar-menu ul li ul.sub-menu li a:hover {
    color: #000; /* Color de texto para hover en submenú */
    background-color: rgba(0, 0, 0, 0.05); /* Fondo sutil al hacer hover */
}

/* ======================================
   Estilos del Sidebar - Elementos Activos
   ====================================== */

/* Estilos para elementos activos del menú */
body[data-sidebar=dark] .mm-active > a, 
body[data-sidebar=dark] .mm-active .active,
body[data-sidebar=dark] #sidebar-menu ul li a.active {
    background-color: #222933 !important; /* Fondo oscuro para elementos activos */
    color: #ffffff !important; /* Texto blanco para elementos activos */
    border-radius: 4px; /* Bordes redondeados como en la imagen */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Sombra sutil */
}

body[data-sidebar=dark] .mm-active > a i, 
body[data-sidebar=dark] .mm-active .active i,
body[data-sidebar=dark] #sidebar-menu ul li a.active i {
    color: #ffffff !important; /* Ícono blanco para elementos activos */
}

/* Estilos para elementos activos en sidebar colapsado */
body[data-sidebar=dark].vertical-collpsed .vertical-menu #sidebar-menu ul li.mm-active .active, 
body[data-sidebar=dark].vertical-collpsed .vertical-menu #sidebar-menu ul li.mm-active .active i {
    background-color: #222933 !important; /* Fondo oscuro para elementos activos */
    color: #ffffff !important; /* Texto e ícono blancos */
    border-radius: 4px; /* Bordes redondeados */
    margin: 0 auto!important;
}

/* Ajuste para los submenús cuando están activos */
body[data-sidebar=dark] #sidebar-menu ul li.mm-active .sub-menu li.mm-active > a {
    background-color: #222933 !important; /* Fondo oscuro */
    color: #ffffff !important; /* Texto blanco */
    border-radius: 4px; /* Bordes redondeados */
}

/* Iconos en el menú */
#sidebar-menu ul li a i {
    font-size: 18px; /* Tamaño de los iconos */
    height: 22px;
    width: 22px;
    min-width: 22px; /* Ancho mínimo fijo */
    line-height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    transition: color 0.2s ease;
    transform: none;
}

/* ======================================
   Estilos del Sidebar - Versión Colapsada
   ====================================== */

/* Estilos para hover en elementos del menú en sidebar colapsado */
body[data-sidebar=dark].vertical-collpsed .vertical-menu #sidebar-menu>ul>li:hover>a {
    background: #f1f1f1; /* Fondo al hacer hover en sidebar colapsado */
    color: #000; /* Color de texto al hacer hover en sidebar colapsado */
    transform: none;
}

/* Asegurar que los iconos mantengan su posición en el modo colapsado */
body[data-sidebar=dark].vertical-collpsed .vertical-menu #sidebar-menu > ul > li > a i {
    display: block;
    text-align: center;
    margin: 0 auto;
    margin-bottom: 5px;
    height: 22px;
    width: 22px;
    line-height: 22px;
    transition: color 0.2s ease;
    transform: none;
}

/* Asegurar dimensiones y espaciado consistentes en el modo colapsado */
body[data-sidebar=dark].vertical-collpsed .vertical-menu {
    width: 70px;
    box-sizing: border-box;
}

body[data-sidebar=dark].vertical-collpsed .vertical-menu #sidebar-menu > ul > li > a {
    padding: 15px 0;
    text-align: center;
    box-sizing: border-box;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Estilos para submenús en sidebar colapsado */
body[data-sidebar=dark].vertical-collpsed .vertical-menu #sidebar-menu>ul ul {
    background-color: #f1f1f1; /* Fondo de submenús en sidebar colapsado */
}

/* Estilos para el header de usuario (Roberto Carlos) */
.dropdown .header-item { /* Estilo para el botón que contiene el nombre del usuario */
    color: #232D42; /* Color de texto para el nombre del usuario */
}
.dropdown .header-item:hover {
    color: #556ee6;
}

/* --- Estilos para la barra de búsqueda --- */
.search-box {
    width: 350px; /* Ancho deseado para la barra de búsqueda */
    margin-left: 1rem; /* Margen a la izquierda para separarla del botón de menú */
    margin-right: auto; /* Empuja los elementos de la derecha */
}
#user-search-box {
    margin-top: 15px;
    /* margin-left: 15px; */
}

.search-box .form-control {
    padding-left: 40px; /* Espacio para el ícono */
    background-color: #f8f9fa; /* Fondo claro para el input */
    border-radius: 10px; /* Bordes redondeados */
    border: 1px solid #e9ecef; /* Borde sutil */
    height: 38px;
    color: #495057; /* Color del texto del input */
}

.search-box .form-control::placeholder { /* Estilo para el placeholder */
    color: #aab1b9;
}

.search-box .form-control:focus {
    background-color: #fff;
    border-color: #556ee6; /* Color del borde al enfocar */
    box-shadow: none;
}

.search-box .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%); /* Centrar el ícono verticalmente */
    font-size: 16px;
    color: #74788d; /* Color del ícono de búsqueda */
}

/* Estilos para botones y elementos interactivos (mantener si se usan en otro lado) */
.btn-primary {
    background-color: #009fe3;
    border-color: #009fe3;
    font-size: 0.9rem;
    font-weight: 500;
    word-spacing: 0.2rem;
    /* border-radius: 0.6rem; */
}

.btn-primary:hover {
    background-color: #4888c4;
    border-color: #4888c4;
}

/* Estilos responsivos para la búsqueda - Manejado ahora en media queries específicas de user-table */

/* Estilos para las Tarjetas de Estadísticas */
.mini-stats-wid .card-body {
    padding: 1.25rem; /* Un poco más de padding que el default de Skote */
}

.mini-stats-wid .mini-stat-icon {
    width: 40px;
    height: 40px;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mini-stats-wid .mini-stat-icon span.avatar-title {
    background-color: transparent !important; /* Hacemos el fondo del icono transparente */
}

.mini-stats-wid .mini-stat-icon i {
    color: #556ee6; /* Color primario para los iconos, puedes ajustarlo */
}

/* Ajustes para los iconos específicos si quieres colores diferentes por tarjeta */
/* Ejemplo para la tarjeta de usuarios (color rosado de la imagen) */
.card-usuarios .mini-stat-icon i {
 color: #f0657d;
}
.card-usuarios .mini-stat-icon {
    background-color: rgba(240, 101, 125, 0.15) !important;
}

/* Ejemplo para la tarjeta de consultas (color celeste de la imagen) */
.card-consultas .mini-stat-icon i {
 color: #55a6d1;
}
.card-consultas .mini-stat-icon {
    background-color: rgba(85, 166, 209, 0.15) !important;
}

/* Ejemplo para la tarjeta de respuestas (color azul de la imagen) */
.card-respuestas .mini-stat-icon i {
 color: #007bff;
}
.card-respuestas .mini-stat-icon {
    background-color: rgba(0, 123, 255, 0.15) !important;
}

.mini-stats-wid h4 {
    font-size: 1.5rem; /* Tamaño del número principal */
    font-weight: 600;
}

.mini-stats-wid .text-muted.fw-medium {
    font-size: 0.875rem; /* Tamaño del título de la tarjeta */
    margin-bottom: 0.5rem;
}

.mini-stats-wid .text-muted.mb-0 {
    font-size: 0.8125rem; /* Tamaño del texto "Respecto al mes anterior" */
}

.mini-stats-wid .stat-graph svg path {
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Añadir un hover general a las tarjetas */
.mini-stats-wid:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.2s ease-out;
}

/* ======================================
   Estilos para iconos personalizados del sidebar
   ====================================== */

/* Contenedor del icono personalizado */
.sidebar-icon-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 22px;
    width: 22px;
    min-width: 22px;
    margin-right: 10px;
    position: relative;
    transition: none;
}

/* Icono personalizado */
.sidebar-custom-icon {
    height: 18px;
    width: 18px;
    object-fit: contain;
    transition: none;
}

/* Ajustes para el icono personalizado cuando el sidebar está colapsado */
body[data-sidebar=dark].vertical-collpsed .vertical-menu #sidebar-menu > ul > li > a .sidebar-icon-container {
    display: flex;
    margin: 0 auto;
    text-align: center;
    margin-bottom: 8px;
}

body[data-sidebar=dark].vertical-collpsed .vertical-menu #sidebar-menu > ul > li > a .sidebar-custom-icon {
    height: 22px;
    width: 22px;
}

/* Estilos para iconos personalizados en elementos activos */
body[data-sidebar=dark] .mm-active > a .sidebar-custom-icon,
body[data-sidebar=dark] .mm-active .active .sidebar-custom-icon,
body[data-sidebar=dark] #sidebar-menu ul li a.active .sidebar-custom-icon {
    filter: brightness(10); /* Hace que el icono se vea blanco cuando está activo */
}

/* Excepción para el icono de Jambo para que no se vuelva blanco cuando está inactivo */
body[data-sidebar=dark] #sidebar-menu ul li:not(.mm-active) > a:not(.active) .sidebar-custom-icon[alt="Jambo"] {
    filter: none !important; /* Mantiene el color original del icono cuando está inactivo */
}

/* Para asegurar que el icono de Jambo se vuelva blanco cuando está activo */
body[data-sidebar=dark] .mm-active > a .sidebar-custom-icon[alt="Jambo"],
body[data-sidebar=dark] .mm-active .active .sidebar-custom-icon[alt="Jambo"],
body[data-sidebar=dark] #sidebar-menu ul li a.active .sidebar-custom-icon[alt="Jambo"] {
    filter: brightness(10) !important; /* Se vuelve blanco cuando está activo */
}

/* Excepción para el texto de Jambo en el sidebar */
body[data-sidebar=dark] #sidebar-menu ul li.jambo.mm-active > a,
body[data-sidebar=dark] #sidebar-menu ul li.jambo > a.active,
body[data-sidebar=dark] #sidebar-menu ul li.jambo.mm-active > a span {
    color: #eff0f0 !important; /* Mantiene este color específico para el texto Jambo */
}

/* Mantener el color del texto Jambo en el sidebar colapsado */
body[data-sidebar=dark].vertical-collpsed .vertical-menu #sidebar-menu > ul > li.jambo.mm-active > a span,
body[data-sidebar=dark].vertical-collpsed .vertical-menu #sidebar-menu > ul > li.jambo.mm-active > a {
    color: #eff0f0 !important;
}

/* Selectores más específicos para el texto de Jambo */
body[data-sidebar=dark] #sidebar-menu ul li.jambo.mm-active > a span[key="t-jambo"],
body[data-sidebar=dark] #sidebar-menu ul li.jambo > a.active span[key="t-jambo"] {
    color: #eff0f0 !important;
}

/* Selectores para el estado colapsado */
body[data-sidebar=dark].vertical-collpsed .vertical-menu #sidebar-menu > ul > li.jambo.mm-active > a span[key="t-jambo"] {
    color: #eff0f0 !important;
}

/* Estilos para los iconos del submenú */
.submenu-icon-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 18px;
    width: 18px;
    min-width: 18px;
    margin-right: 8px;
    position: relative;
    transition: none;
}

.submenu-custom-icon {
    height: 16px;
    width: 16px;
    object-fit: contain;
    transition: none;
}

/* Estilos para iconos de submenú en elementos activos */
body[data-sidebar=dark] #sidebar-menu ul li.mm-active .sub-menu li a.active .submenu-custom-icon,
body[data-sidebar=dark] #sidebar-menu ul li .sub-menu li a.active .submenu-custom-icon {
    filter: brightness(10); /* Hace que el icono se vea blanco cuando está activo */
}

/* Ajustes para la alineación de los elementos del submenú */
body[data-sidebar=dark] #sidebar-menu ul li ul.sub-menu li a {
    display: flex;
    align-items: center;
}

/* Ajustes para evitar que los enlaces del menú cambien de tamaño al hacer hover */
#sidebar-menu ul li a {
    transition: color 0.2s ease, background-color 0.2s ease;
    display: flex;
    align-items: center;
}

#sidebar-menu ul li a:hover {
    transform: none;
}

/* Estilos para las tarjetas de estadísticas */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Dimensiones específicas para las tarjetas de estadísticas */
.stat-card {
    width: 100%;
    height: 126px;
    margin: 0;
}

.stat-card .card-body {
    padding: 1rem !important;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Estilos para los iconos personalizados de las tarjetas */
.stat-card .card-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    vertical-align: middle;
    margin-bottom: 3px;
}

.stat-card p.text-muted.mb-2 {
    margin-bottom: 8px !important;
    font-size: 14px;
    color: #8A92A6;
}

.stat-card h2 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 2px;
    line-height: 1.2;
    color: #232D42;
}

.stat-card .text-muted.text-truncate.mb-0 {
    font-size: 12px;
    margin-bottom: 0 !important;
    line-height: 1.2;
}

.stat-card small {
    font-size: 11px;
    display: block;
    line-height: 1.1;
    color: #8A92A6;
}

.card:hover {
    transform: translateY(-2px);
}

/* Estilos para los gráficos de ApexCharts */
#area-sparkline-chart-usuarios,
#area-sparkline-chart-consultas,
#area-sparkline-chart-respuestas {
    height: 60px !important;
    position: relative;
    overflow: visible !important;
    margin-top: -10px;
}

/* Ajustes específicos para los contenedores de gráficos */
.stat-card .col-5 {
    position: relative;
    overflow: visible;
    padding: 0 !important;
}

.stat-card .col-7 {
    padding-right: 0 !important;
}

/* Estilos para los SVG de ApexCharts */
.apexcharts-svg {
    overflow: visible !important;
}

.apexcharts-canvas {
    position: relative !important;
    overflow: visible !important;
}

/* Colores específicos para las curvas de los gráficos */
#area-sparkline-chart-usuarios .apexcharts-series path {
    stroke: #f41269 !important;
}

#area-sparkline-chart-consultas .apexcharts-series path {
    stroke: #3f9aff !important;
}

#area-sparkline-chart-respuestas .apexcharts-series path {
    stroke: #006ac0 !important;
}

/* Estilos específicos para el componente de Promociones Activas */
.chart-container {
    width: 100%;
    height: 200px;
    position: relative;
}

#promociones-chart {
    border-radius: 8px;
    overflow: hidden;
    max-width: 594px;
    margin: 0 auto;
}

/* Ajustar espacio para etiquetas de meses */
.apexcharts-xaxis-label {
    font-size: 11px !important;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #8A92A6;
}

/* Estilos para el componente de Usuarios que más consultan */
.users-container {
    width: 100%;
    /* height: 285px; */
    position: relative;
    display: flex;
    flex-direction: column;
}

.users-list {
    padding: 0;
    height: 203px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.user-item {
    padding: 8px 0;
    border-radius: 8px;
    transition: all 0.2s ease;
    margin-bottom: 12px;
}

.user-item:last-child {
    margin-bottom: 0;
}

.user-item:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.avatar-circle {
    width: 29.57px;
    height: 29.57px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-info {
    padding-top: 2px;
}

.user-info h6 {
    font-size: 14px;
    font-weight: 600;
    color: #8A92A6;
    margin-bottom: 0;
    line-height: 1.2;
}

.user-info p {
    font-size: 14px;
    color: #8A92A6;
    line-height: 1.2;
    margin-top: 2px;
}

.consultas-count {
    font-size: 14px;
    font-weight: 400;
    white-space: nowrap;
    padding-top: 2px;
}

.consultas-count .text-info {
    color: #0099ff !important;
}

/* Estilos para el componente de Usuarios Concurrentes Activos */
.usuarios-concurrentes-info h2 {
    font-size: 32px;
    font-weight: 700;
    color: #212529;
}

.loading-placeholder {
    color: #6c757d;
    font-size: 18px;
    font-weight: 400;
}

.filter-select .form-select {
    border-color: #e9ecef;
    color: #6c757d;
    font-size: 12px;
    padding: 0.25rem 2rem 0.25rem 0.75rem;
    background-position: right 0.75rem center;
}

.filter-select .form-select:focus {
    border-color: #0099ff;
    box-shadow: none;
}

/* Nuevos estilos para controles de fecha */
.filter-toggle {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
}

.filter-toggle .btn {
    border-radius: 4px;
    font-size: 11px;
    padding: 0.25rem 0.5rem;
    transition: all 0.2s ease;
}

.filter-toggle .btn.active {
    background-color: #0099ff;
    border-color: #0099ff;
    color: white;
}

.filter-toggle .btn:not(.active) {
    background-color: transparent;
    border-color: #dee2e6;
    color: #6c757d;
}

.filter-toggle .btn:not(.active):hover {
    background-color: #f8f9fa;
    border-color: #0099ff;
    color: #0099ff;
}

.quick-filters {
    transition: opacity 0.3s ease;
}

.custom-range {
    transition: opacity 0.3s ease;
    min-width: 300px;
}

/* Estilos para date picker con calendario */
.date-input-wrapper {
    position: relative;
}

.date-input-wrapper .date-picker {
    font-size: 11px;
    padding: 0.25rem 2rem 0.25rem 0.5rem;
    border-color: #e9ecef;
    font-family: 'Courier New', monospace;
    text-align: center;
    cursor: pointer;
    background-color: #fff;
}

.date-input-wrapper .date-picker:focus {
    border-color: #0099ff;
    box-shadow: 0 0 0 0.1rem rgba(0, 153, 255, 0.25);
}

.date-input-wrapper .date-picker::placeholder {
    color: #adb5bd;
    font-style: italic;
    text-align: center;
}

.date-input-wrapper .date-picker:hover {
    border-color: #0099ff;
    background-color: #f8f9ff;
}

.date-input-wrapper .date-icon {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 14px;
    pointer-events: none;
    transition: color 0.2s ease;
}

.date-input-wrapper:hover .date-icon {
    color: #0099ff;
}

.date-input-wrapper .date-picker:focus + .date-icon {
    color: #0099ff;
}

/* Estilos para validación de fechas */
.date-input-wrapper .date-picker.is-invalid {
    border-color: #dc3545;
    background-color: #fff5f5;
}

.date-input-wrapper .date-picker.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.1rem rgba(220, 53, 69, 0.25);
}

.date-input-wrapper .date-picker.is-invalid + .date-icon {
    color: #dc3545;
}

.date-input-wrapper .date-picker:valid {
    border-color: #28a745;
}

.date-input-wrapper .date-picker:valid + .date-icon {
    color: #28a745;
}

.custom-range .btn-primary {
    background-color: #0099ff;
    border-color: #0099ff;
    font-size: 11px;
    padding: 0.25rem 0.5rem;
}

.custom-range .btn-primary:hover {
    background-color: #0088e6;
    border-color: #0088e6;
}

.custom-range .btn-primary:disabled {
    background-color: #6c757d;
    border-color: #6c757d;
    opacity: 0.6;
    cursor: not-allowed;
}

.custom-range small {
    font-size: 10px;
    line-height: 1.2;
    text-align: center;
    display: block;
    color: #6c757d;
}

.custom-range small .text-muted {
    color: #6c757d !important;
}

.period-info {
    border-left: 3px solid #0099ff;
    padding-left: 8px;
    background-color: #f8f9ff;
    border-radius: 0 4px 4px 0;
    padding: 5px 8px;
}

.period-info small {
    font-size: 11px;
    color: #0099ff;
    font-weight: 500;
}

.period-info .mdi {
    font-size: 13px;
    margin-right: 4px;
}

/* Animación sutil para campos de fecha válidos */
.date-input-wrapper .date-picker:valid {
    animation: validPulse 0.5s ease-in-out;
}

@keyframes validPulse {
    0% { border-color: #e9ecef; }
    50% { border-color: #28a745; }
    100% { border-color: #28a745; }
}

/* Estilos para el calendario Flatpickr */
.flatpickr-calendar {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 13px;
}

.flatpickr-calendar .flatpickr-months {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    border-radius: 8px 8px 0 0;
}

.flatpickr-calendar .flatpickr-current-month {
    color: #212529;
    font-weight: 600;
}

.flatpickr-calendar .flatpickr-weekday {
    background: #f8f9fa;
    color: #6c757d;
    font-weight: 500;
    font-size: 11px;
}

.flatpickr-calendar .flatpickr-day {
    color: #212529;
    border-radius: 4px;
    font-size: 12px;
}

.flatpickr-calendar .flatpickr-day:hover {
    background: #e3f2fd;
    border-color: #0099ff;
}

.flatpickr-calendar .flatpickr-day.selected {
    background: #0099ff;
    border-color: #0099ff;
    color: white;
}

.flatpickr-calendar .flatpickr-day.today {
    border-color: #0099ff;
    color: #0099ff;
    font-weight: 600;
}

.flatpickr-calendar .flatpickr-day.today.selected {
    background: #0088e6;
    color: white;
}

.flatpickr-calendar .flatpickr-day.inRange {
    background: #e3f2fd;
    border-color: #bbdefb;
    color: #1976d2;
}

.flatpickr-calendar .flatpickr-day.startRange,
.flatpickr-calendar .flatpickr-day.endRange {
    background: #0099ff;
    border-color: #0099ff;
    color: white;
}

/* Botones de navegación del calendario */
.flatpickr-calendar .flatpickr-prev-month,
.flatpickr-calendar .flatpickr-next-month {
    color: #6c757d;
    fill: #6c757d;
}

.flatpickr-calendar .flatpickr-prev-month:hover,
.flatpickr-calendar .flatpickr-next-month:hover {
    color: #0099ff;
    fill: #0099ff;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .filter-select {
        width: 100%;
        margin-top: 10px;
    }
    
    .custom-range {
        min-width: auto;
    }
    
    .custom-range .row {
        --bs-gutter-x: 0.5rem;
    }
    
    .filter-toggle {
        justify-content: center;
    }
    
    .period-info {
        text-align: center;
        border-left: none;
        border-top: 3px solid #0099ff;
        border-radius: 4px 4px 0 0;
    }
    
    .date-input-wrapper .date-picker {
        font-size: 10px;
        text-align: center;
    }
    
    .date-input-wrapper .date-icon {
        right: 6px;
        font-size: 12px;
    }
    
    .custom-range small {
        font-size: 9px;
        margin-top: 5px;
    }
    
    .flatpickr-calendar {
        font-size: 12px;
    }
}

/* Toast de error personalizado */
.toast.bg-danger {
    --bs-toast-bg: #dc3545;
    --bs-toast-border-color: #dc3545;
}

.toast .toast-body {
    font-size: 13px;
    padding: 0.5rem;
}

.toast .mdi {
    margin-right: 5px;
    font-size: 14px;
}

#usuarios-concurrentes-chart {
    width: 100%;
    overflow: hidden;
}

/* Ajustes para las líneas de la cuadrícula */
#usuarios-concurrentes-chart .apexcharts-gridline {
    stroke-dasharray: 3;
    stroke: #e9ecef;
}

/* Líneas verticales que separan periodos */
#usuarios-concurrentes-chart .apexcharts-xaxis-dashed-line {
    stroke-dasharray: 2;
    stroke: #e9ecef;
}

/* Estilo para los tooltips */
#usuarios-concurrentes-chart .apexcharts-tooltip {
    background: #fff;
    border: 1px solid #e9ecef;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    border-radius: 4px;
}

#usuarios-concurrentes-chart .apexcharts-tooltip-title {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
}

/* Mejorar visualización para períodos largos */
#usuarios-concurrentes-chart .apexcharts-xaxis-label {
    font-size: 10px !important;
}

#usuarios-concurrentes-chart .apexcharts-yaxis-label {
    font-size: 11px !important;
}

/* Animaciones suaves para cambios de estado */
.chart-container {
    transition: opacity 0.3s ease;
}

.chart-container.loading {
    opacity: 0.6;
}

/* =============================================================
   INICIO: Estilos para la vista de administración de usuarios
   ============================================================= */
.user-management-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.user-management-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 0;
}

.user-table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.user-table-header {
    display: grid;
    grid-template-columns: 250px 200px 150px auto;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    font-weight: 600;
    color: #555;
    background-color: #f9f9fa;
}

.user-table-header .header-item {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.user-table-header .header-item i {
    margin-left: 5px;
    font-size: 14px;
}

.user-table-body {
    padding: 10px 0;
}

.header-item .users-info{

    height: 10px!important;
}

/* Buttons for creating/viewing sub folders*/
@media (min-width: 1025px) {
    .sub-button {
        padding: 5px 15px !important;
    }
    .sub-button-sub {
        padding: 5px 15px !important;
        font-size: 0.9rem !important;
        display: flex;
        align-items: center; 
        justify-content: center;
    }
}

/* Ensure vertical/horizontal centering always  */
.sub-button-sub {
    display: flex;
    align-items: center;
    justify-content: center;
}
.back-button{
    display: flex;
    align-items: center;
    justify-content: center;
}
/* ================= Responsive sidebar (agents) adjustments ================= */
@media (max-width: 991.98px) { /* below lg */
    .filemanager-sidebar .card-body { padding: 1rem 1rem 0.75rem; }
    .filemanager-sidebar .agents-list { font-size: 14px; }
    .filemanager-sidebar .category-header.title-agents { font-size: 14px; }
    /* Truncate multi-line long agent names to 2 lines */
    .filemanager-sidebar .agents-list { 
        display: -webkit-box; 
        -webkit-line-clamp: 2; 
        line-clamp: 2; /* non-standard draft property for broader lint compatibility */
        -webkit-box-orient: vertical; 
        overflow: hidden; 
        line-height: 1.15rem;
    }
    /* Ensure collapse card has margin separation from toggle button */
    #agentsSidebarCollapse .card { margin-bottom: 0.5rem; }
}

.user-table-row {
    display: grid;
    grid-template-columns: 250px 200px 150px auto;
    padding: 18px 20px;
    border-bottom: 1px solid #f5f5f5;
    align-items: center;
    margin-bottom: 4px;
    transition: all 0.2s ease;
}

.user-table-row:last-child {
    margin-bottom: 0;
}

/* Deshabilitado: se elimina la animación/estilo al pasar el cursor por encima de la fila de usuario */
/* .user-table-row:hover {
    background-color: #f9f9f9;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
} */

/* === Adjustments for AJAX Users table (actions + search combined) === */
.user-table-header .actions-search-cell {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}
.user-table-header .actions-search-cell .search-box { flex: 0 1 320px; }

/* New separated layout: independent search + actions column */
.user-table-header .search-cell { 
    display:flex; 
    align-items:center; 
    justify-content:flex-start; 
}
.user-table-header .search-cell .search-box { flex:1 1 auto; }

/* Left separator only before Acciones */
.user-table-header .actions-cell {
    display:flex;
    align-items:center;
    justify-content:flex-end;
    padding-left:18px; /* space after separator */
    border-left:1px solid #e5e5e8; /* visual separation */
    white-space: nowrap; /* Prevent text wrapping */
    overflow: hidden; /* Hide overflow */
    text-overflow: ellipsis; /* Add ellipsis if needed */
    min-width: 0; /* Allow shrinking */
}
/* Media queries for better responsive handling */

/* Tablet landscape - 1024px to 1200px */
@media (max-width: 1200px) and (min-width: 1025px) {
    .user-table-header,
    .user-table-row {
        grid-template-columns: 1.8fr 1fr 0.8fr 1.3fr 0.7fr;
        column-gap: 12px;
    }
    
    /* Compact search box for this range */
    .user-table-header .search-cell .search-box {
        max-width: 180px;
    }
    
    .user-table-header .search-cell .search-box input {
        font-size: 13px;
        padding: 6px 12px;
    }
}

/* Standard tablet - 992px to 1024px */
@media (max-width: 1024px) and (min-width: 993px) {
    .user-table-header,
    .user-table-row {
        grid-template-columns: 1.6fr 0.9fr 0.7fr 1.2fr 0.6fr;
        column-gap: 10px;
    }
    
    /* Even more compact search */
    .user-table-header .search-cell .search-box {
        max-width: 150px;
    }
    
    .user-table-header .search-cell .search-box input {
        font-size: 12px;
        padding: 5px 10px;
    }
    
    /* Shorter actions text or use icon */
    .user-table-header .actions-cell {
        font-size: 12px;
        padding-left: 8px;
    }
    
    /* Replace "Acciones" with "Acc." on small tablets */
    .user-table-header .actions-cell {
        font-size: 0; /* Hide original text */
        position: relative;
    }
    
    .user-table-header .actions-cell::before {
        content: "Acc.";
        font-size: 12px;
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        white-space: nowrap;
    }
}

@media (max-width: 992px){
    .user-table-header .actions-cell { 
        padding-left: 8px;
        font-size: 0; /* Hide original text */
        position: relative;
    }
    
    .user-table-header .actions-cell::before {
        content: "Acc.";
        font-size: 12px;
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        white-space: nowrap;
    }
    
    /* Adjust grid for smaller screens */
    .user-table-header,
    .user-table-row {
        grid-template-columns: 2fr 1fr 0.8fr 1.3fr 0.6fr;
        column-gap: 8px;
    }
    
    /* Hide search box below 992px */
    .user-table-header .search-cell {
        display: none;
    }
}

/* Specific handling when profile panel is visible (narrow container) */
@media (min-width: 1201px) {
    .col-md-9 .user-table-header,
    .col-md-9 .user-table-row {
        grid-template-columns: 1.8fr 1fr 0.8fr 1.4fr 0.8fr;
        column-gap: 16px;
    }
}

@media (max-width: 1200px) and (min-width: 1025px) {
    .col-md-9 .user-table-header,
    .col-md-9 .user-table-row {
        grid-template-columns: 1.6fr 0.9fr 0.7fr 1.2fr 0.6fr;
        column-gap: 10px;
    }
    
    .col-md-9 .user-table-header .search-cell .search-box {
        max-width: 140px;
    }
}

@media (max-width: 1024px) and (min-width: 993px) {
    .col-md-9 .user-table-header,
    .col-md-9 .user-table-row {
        grid-template-columns: 1.4fr 0.8fr 0.6fr 1.1fr 0.5fr;
        column-gap: 8px;
    }
    
    .col-md-9 .user-table-header .search-cell .search-box {
        max-width: 120px;
    }
}

/* Tablet and smaller - hide search and cargo columns when space is limited */
@media (max-width: 768px) {
    .user-table-header,
    .user-table-row {
        grid-template-columns: 2.5fr 0fr 1fr 0fr 1fr;
    }
    
    /* Hide cargo column and search column on mobile */
    .user-table-header .header-item:nth-child(2),
    .user-table-row .user-row-item:nth-child(2) {
        display: none;
    }
    
    /* Hide search column on mobile */
    .user-table-header .search-cell {
        display: none;
    }
    
    /* Adjust actions column for mobile */
    .user-table-header .actions-cell {
        font-size: 0;
        position: relative;
        padding-left: 8px;
        justify-content: center;
    }
    
    .user-table-header .actions-cell::before {
        content: "Acc.";
        font-size: 12px;
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        white-space: nowrap;
    }
}

/* Responsive grid layout - adapts to container width changes */
.user-table-header { 
    grid-template-columns: 2fr 1.2fr 1fr 1.8fr 1fr; 
    min-width: 0; /* Allow grid to shrink */
    transition: all 0.3s ease; /* Smooth transition when layout changes */
}
.user-table-row { 
    grid-template-columns: 2fr 1.2fr 1fr 1.8fr 1fr;
    min-width: 0; /* Allow grid to shrink */
    transition: all 0.3s ease; /* Smooth transition when layout changes */
}
.user-table-header,
.user-table-row {
    column-gap: 24px; /* separación adicional entre columnas, especialmente entre buscador y acciones */
}

/* Smooth transition for container width changes */
#userListContainer {
    transition: all 0.3s ease;
}

#userProfilePanel {
    transition: all 0.3s ease;
}

/* Actions column: align right inside last cell */
.user-table-row .actions { display:flex; justify-content:flex-end; }

/* Fix dropdown overlapping / clipping when row has overflow hidden (avoid) */
.user-table { overflow: visible; }
.user-table-row { position: relative; }
.user-table-row .dropdown-menu { z-index: 5000; box-shadow:0 10px 25px -5px rgba(0,0,0,.15); }

/* Remove any accidental debug background (yellow lines) if added elsewhere */
.user-table-header .header-item { background: transparent !important; }

.user-info {
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 12px;
    background-color: #f0f0f0;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-name {
    font-weight: 500;
    color: #333;
}

.user-role {
    color: #555;
    font-weight: 500;
}

.user-status {
    display: flex;
    align-items: center;
}

.status-indicator {
    display: flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
}

.status-active {
    background-color: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
}

.status-inactive {
    background-color: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
}

.status-indicator i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 5px;
}

.status-active i {
    background-color: #2ecc71;
}

.status-inactive i {
    background-color: #e74c3c;
}

.user-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

.action-button {
    background: none;
    border: none;
    color: #666;
    padding: 6px 8px;
    cursor: pointer;
    font-size: 16px;
    border-radius: 4px;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 32px;
}

.action-button:hover {
    background-color: #f8f9fa;
    transform: scale(1.1);
    text-decoration: none;
}

.action-button.edit {
    color: #007bff;
}

.action-button.edit:hover {
    color: #0056b3;
    background-color: #e3f2fd;
}

.action-button.delete {
    color: #dc3545;
}

.action-button.delete:hover {
    color: #c82333;
    background-color: #f8d7da;
}

.action-button.info {
    color: #ffc107;
}

.action-button.info:hover {
    color: #e0a800;
    background-color: #fff3cd;
}

/* Botón Ver/Abrir documentos */
.action-button.action-view {
    color: #17a2b8;
}

.action-button.action-view:hover {
    color: #138496;
    background-color: #bee5eb;
}

/* Botón Historial */
.action-button.action-history {
    color: #fd7e14;
}

.action-button.action-history:hover {
    color: #e66a00;
    background-color: #ffeeba;
}

/* Actualizar botón Editar para consistencia */
.action-button.action-edit {
    color: #28a745;
}

.action-button.action-edit:hover {
    color: #218838;
    background-color: #d4edda;
}

/* Actualizar botón Eliminar para consistencia */
.action-button.action-delete {
    color: #dc3545;
}

.action-button.action-delete:hover {
    color: #c82333;
    background-color: #f8d7da;
}

.add-user-btn {
    background-color: #303032;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    font-weight: 500;
    transition: background-color 0.2s;
}

.add-user-btn:hover {
    background-color: #1a1a1c;
    color: white;
}

.add-user-btn i {
    margin-right: 6px;
}

.user-profile-card {
    position: fixed;
    top: 0;
    right: -350px; /* Inicialmente fuera de la pantalla */
    width: 350px;
    height: 100vh;
    background: white;
    box-shadow: -3px 0 15px rgba(0,0,0,0.1);
    padding: 25px;
    display: block;
    z-index: 1050;
    overflow-y: auto;
    transition: right 0.3s ease-in-out;
    border-left: 4px solid #2196f3;
}

.user-profile-card.show {
    right: 0; /* Se desliza a la posición visible */
}

.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
    margin-top: 20px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 25px;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 15px;
    border: 4px solid #f5f5f5;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-name {
    font-weight: 600;
    font-size: 20px;
    color: #333;
    margin-bottom: 5px;
}

.profile-title {
    color: #777;
    font-size: 14px;
    margin-bottom: 10px;
}

.profile-info-section {
    margin-top: 15px;
    padding-top: 5px;
}

.profile-info-title {
    font-weight: 600;
    color: #555;
    margin-bottom: 15px;
    font-size: 16px;
}

.profile-info-item {
    display: flex;
    align-items: center;
    margin-bottom: 18px;
}

.profile-info-item i {
    color: #777;
    font-size: 18px;
    margin-right: 15px;
    width: 18px;
}

.profile-info-text {
    color: #444;
    font-size: 14px;
}

.profile-actions {
    margin-top: 20px;
    display: flex;
}

.profile-action-btn {
    padding: 10px 20px;
    text-align: center;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    border: none;
    width: 100%;
}

.edit-profile-btn {
    background-color: #f5f5f5;
    color: #444 !important;
}

.edit-profile-btn:hover {
    background-color: #e9e9e9;
}

.user-profile-card .btn-close {
    background-size: 0.8rem;
    opacity: 0.6;
    margin-left: auto;
}

.user-profile-card .btn-close:hover {
    opacity: 1;
}

/* =============================================================
   FIN: Estilos para la vista de administración de usuarios
   ============================================================= */

/* Estilos adicionales para el panel de perfil */
.profile-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 0;
}

.user-profile-card .btn-close {
    background-size: 0.8rem;
    opacity: 0.6;
}

.user-profile-card .btn-close:hover {
    opacity: 1;
}

/* Overlay para cuando el panel está abierto */
.profile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    opacity: 0;
    z-index: 1040;
    visibility: hidden;
    transition: opacity 0.3s;
}

.profile-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Ajustes responsivos para el panel */
@media (max-width: 576px) {
    .user-profile-card {
        width: 100%;
        right: -100%;
    }
}

/* Estilos para el panel de perfil de usuario que se muestra junto a la tabla */
.user-profile-panel {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 20px 15px;
    margin-top: 20px;
    transition: all 0.3s ease;
    text-align: center;
    max-width: 280px;
    margin-left: auto;
}

.user-profile-panel .profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.user-profile-panel .profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 15px;
    margin-top: -5px;
}

.user-profile-panel .profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-profile-panel .profile-name {
    font-weight: 600;
    font-size: 18px;
    color: #333;
    margin-bottom: 5px;
}

.user-profile-panel .profile-title {
    color: #777;
    font-size: 14px;
    margin-bottom: 5px;
}

.user-profile-panel .profile-info-section {
    margin-top: 10px;
}

.user-profile-panel .profile-info-title {
    font-weight: 600;
    color: #555;
    margin-bottom: 15px;
    font-size: 15px;
    text-align: left;
}

.user-profile-panel .profile-info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    text-align: left;
}

.user-profile-panel .profile-info-item i {
    color: #777;
    font-size: 16px;
    margin-right: 10px;
    width: 16px;
    min-width: 16px;
}

.user-profile-panel .profile-info-text {
    color: #444;
    font-size: 14px;
    word-break: break-word;
}

.user-profile-panel .profile-actions {
    margin-top: 15px;
}

.user-profile-panel .profile-action-btn {
    padding: 8px 15px;
    text-align: center;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    border: none;
    width: 100%;
}

.user-profile-panel .edit-profile-btn {
    background-color: #f5f5f5;
    color: #444 !important;
}

.user-profile-panel .edit-profile-btn:hover {
    background-color: #e9e9e9;
}

.user-profile-panel .btn-close {
    background-size: 0.7rem;
    opacity: 0.6;
}

.user-profile-panel .btn-close:hover {
    opacity: 1;
}

/* Estilos responsivos para la vista de administración de usuarios */
@media (max-width: 768px) {
    #userProfilePanel {
        margin-top: 30px;
        max-width: 100%;
    }
}

/* Estilos para el menú desplegable de acciones - DEPRECATED 
.user-actions .dropdown-toggle::after {
    display: none;
}

.user-actions .dropdown-menu {
    min-width: 160px;
    padding: 0.5rem 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border: none;
    border-radius: 6px;
}

.user-actions .dropdown-item {
    padding: 0.5rem 1rem;
    font-size: 13px;
    transition: background-color 0.2s;
}

.user-actions .dropdown-item:hover {
    background-color: #f8f9fa;
}

.user-actions .dropdown-item i {
    font-size: 16px;
}

.user-actions .text-primary {
    color: #3498db !important;
}

.user-actions .text-danger {
    color: #e74c3c !important;
}

.user-actions .text-warning {
    color: #f39c12 !important;
}
*/

/* Estilos para la paginación de usuarios */
.user-table-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-top: 1px solid #f0f0f0;
    background-color: #fafafa;
}

.pagination-info {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.pagination-controls .pagination {
    margin: 0;
}

.pagination-controls .page-link {
    color: #333;
    background-color: white;
    border: 1px solid #e0e0e0;
    padding: 8px 12px;
    margin: 0 2px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination-controls .page-link:hover {
    color: #303032;
    background-color: #f8f9fa;
    border-color: #d0d0d0;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* ====================================================
   ESTILOS PARA PAGINACIÓN DE USUARIOS ASIGNADOS
   ==================================================== */

.assigned-users-pagination {
    border-top: 1px solid #e9ecef;
    background-color: #fafbfc;
    border-radius: 0 0 0.375rem 0.375rem;
    margin-top: 0;
}

.assigned-users-pagination .d-flex {
    padding: 15px 20px;
}

.assigned-users-pagination .pagination-info {
    color: #6c757d;
    font-size: 13px;
    font-weight: 500;
}

.assigned-users-pagination .pagination-controls .pagination {
    margin: 0;
    gap: 4px;
}

.assigned-users-pagination .page-link {
    color: #495057;
    background-color: white;
    border: 1px solid #dee2e6;
    padding: 6px 10px;
    border-radius: 0.375rem;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.15s ease-in-out;
    text-decoration: none;
}

.assigned-users-pagination .page-link:hover {
    color: #0d6efd;
    background-color: #f8f9fa;
    border-color: #c6d0f5;
}

.assigned-users-pagination .page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
}

.assigned-users-pagination .page-item.disabled .page-link {
    color: #adb5bd;
    background-color: white;
    border-color: #dee2e6;
}

.pagination-controls .page-item.active .page-link {
    color: white;
    background-color: #303032;
    border-color: #303032;
    box-shadow: 0 2px 4px rgba(48, 48, 50, 0.2);
}

.pagination-controls .page-item.disabled .page-link {
    color: #ccc;
    background-color: #f8f9fa;
    border-color: #e9ecef;
}

/* Responsivo para paginación */
@media (max-width: 768px) {
    .user-table-pagination {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .pagination-controls .page-link {
        padding: 6px 10px;
        font-size: 13px;
    }
}

/* ======================================
   ESTILOS HISTORIAL JAMBO - INICIO
   ====================================== */

.history-title {
    font-size: 16px;
    font-weight: 600;
}

.history-container {
    min-height: 300px;
}

.history-item {
    border-radius: 8px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    padding: 15px;
}

.history-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.history-item:nth-child(odd) {
    background-color: #ffffff;
}

.history-item:nth-child(even) {
    background-color: #d9e3ea;
}

.history-item.highlighted {
    border: 1px dotted #3498db;
}

.thread-title {
    font-size: 16px;
    font-weight: 600;
    color: #000000;
    margin-bottom: 0.5rem;
}

.timestamp {
    color: #6c757d;
    font-size: 0.85rem;
}

.badge-marketing {
    background-color: #e83e8c;
    color: white;
}

.badge-recursos {
    background-color: #001f3f;
    color: white;
}

.badge-contabilidad {
    background-color: #f39c12;
    color: white;
}

.agent-selector {
    border-radius: 4px;
    background-color: #818181;
    color: white;
    border: none;
    padding: 4px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 199px;
    height: 28px;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.agent-selector:hover {
    background-color: #FFFFFF;
}

.agent-selector:focus {
    box-shadow: none;
    outline: none;
}

.dropdown-menu {
    width: 199px;
    max-height: 300px;
    overflow-y: auto;
}

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

.dropdown-menu::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.dropdown-menu::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.dropdown-item.active, .dropdown-item:active {
    background-color: #f8f9fa;
    color: #212529;
}

.dropdown-item {
    padding: 8px 16px;
}

.dropdown-item:hover {
    background-color: #f1f1f1;
}

/* ======================================
   ESTILOS HISTORIAL JAMBO - FIN
   ====================================== */

/* ======================================
   ESTILOS MODAL - INICIO
   ====================================== */

   .modal-content .modal-header {
    color: #303032;
    color: #fff;
    border-bottom: 1px solid #D9E3EA;
  }

  .modal-content .modal-header .modal-title{
    color: #303032;
    font-size: 16px;
    font-weight: 500;
  }
  /* Ajustar el padding del body */
  .modal-content .modal-body .form-label {
    /* padding: 2rem; */
    font-size: 0.9rem;
    font-weight: 500;
    color: #303032;
  }
  .modal-content .modal-body .form-control .input-group-text{
    background-color: #009fe3;
    
  }

  .modal-content .modal-body .form-control {
    font-size: 0.9rem;
    font-weight: 500;
    color: #303032;
    border-radius: 0.6rem;
  }
  .modal-content .modal-body .form-control .btn-primary{
    /* background-color: red!important; */
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 0.5rem;
  }

  /* Redondear bordes de la ventana */
  .modal-content {
    border-radius: 0.2rem;
  }

  /* ======================================
   ESTILOS MODAL - FIN
   ====================================== */

/* custom.css: mantener el sidebar desplegado al cargar */
/* .vertical-menu .metismenu .sub-menu {
  display: block !important;
  height: auto !important;
  overflow: visible !important;
}
body.vertical-collpsed .vertical-menu .metismenu .sub-menu {
  display: none !important;
} */

/* Override menú de notificaciones en el topbar */
#page-header-notifications-dropdown + .dropdown-menu.dropdown-menu-lg.dropdown-menu-end.p-0 {
    /* Ejemplos de propiedades personalizadas: */
    min-width: 300px;           /* cambia el ancho */
    border-radius: 8px;         /* redondea esquinas */
    background-color: #fff;     /* color de fondo */
    /* si quieres, controla el scroll */
    max-height: 280px;
    overflow-y: auto;
  }

  /* Opcional: cuando se añade la clase .show */
  #page-header-notifications-dropdown + .dropdown-menu.show {
    display: block; /* ya lo hace Bootstrap, pero podrías limpiar o reforzar */
  }

  .notifications-title-topbar{
    font-size: 14px;
    font-weight: 600;
    color: #000;
  }

  .icon-file-notification{
    font-size: 20px;
    color: #000;
    z-index: 100
  }
  .text-name-notification{
    color: #363232;
    font-size: 14px;

  }

  /* .text-noti-notification{
    color: #009fe3;
    font-size: 12px;
    font-weight: 400;
  } */
  .text-name-notification-id{
    color: #363232;
    font-size: 12px;
    font-weight: 600;
  }

  .notification-name{
    font-weight: 600;
    font-size: 15px;

  }

/* Placeholder column inside .user-table-row to align with search column */
.user-search-placeholder {
    min-width: 300px;
    pointer-events: none; /* Evita interceptar clics sobre el menú desplegable */
}
.actions-cell {
    background: transparent !important;
    border: none !important;
}

/* ===== ACTION BUTTONS (Edit/Delete) ===== */
        .agent-action-btn {
            width: 38px;
            height: 38px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 1.15rem;
            padding: 0;
            border-radius: 0.5rem;
            line-height: 1;
        }
        .agent-action-btn i { font-size: 1.2rem; }
        .agent-action-btn.btn-primary { background-color: #007bff; border-color: #007bff; }
        .agent-action-btn.btn-primary:hover { background-color: #0069d9; border-color: #0062cc; }
        .agent-action-btn.btn-danger { background-color: #dc3545; border-color: #dc3545; }
        .agent-action-btn.btn-danger:hover { background-color: #c82333; border-color: #bd2130; }
        .agent-action-btn:focus { box-shadow: 0 0 0 0.18rem rgba(0,123,255,.35); }
        .agent-action-btn + .agent-action-btn { margin-left: .4rem; }

        /* Align Actions column contents */
        td:last-child .d-flex { align-items: center; }

        /* ===== Custom styles for dual view ===== */