.rxsStick .rxs-sticked {
    -webkit-transition: all .3s ease;
    transition: all .3s ease;
    z-index: 1001;
}
.rxsStick .rxs-sticked.top {
    top: 0;
}
.rxsStick .rxs-sticked.bottom {
    top: 0;
}
.rxs-sticked {
    position: fixed;
    bottom: -160px;
    width: 100%;
    z-index: 900;
    padding: calc(11px + -5 * (100vw - 320px) / 1600) 0;
    -webkit-box-shadow: 0 0 3px 1px rgba(34, 34, 34, .06);
    box-shadow: 0 0 3px 1px rgba(34, 34, 34, .06);
    -webkit-transition: all .3s ease;
    transition: all .3s ease;
}
.thr-fix header.topbar{bottom:auto !important;position:fixed !important;top:0 !important;width:100%}
.thr-fix{padding-top:70px}
.btn-outline-primary:not(:disabled):not(.disabled).active, .btn-outline-primary:not(:disabled):not(.disabled):active, .show>.btn-outline-primary.dropdown-toggle {
    color: #fff;
    background-color: var(--rx-color1);
    border-color: var(--rx-color1);
}
.cke_screen_reader_only{display:none}
.rxsBtns .dropdown-menu{margin-top:-1px;}
.body .col-12.rxsSep{border-bottom:1px solid var(--rx-color1);margin-bottom:10px;padding-bottom:8px;}
.stvTextVal{margin-left:5px;display:inline-block}
.modal-xl{max-width:850px;}
.modal-fullwidth{max-width:98%;width:98%;max-height:95vh;height:95vh;}
.modal-fullwidth .modal-content{display:flex;flex-direction:column;}
.modal-fullwidth .modal-body{flex:1;overflow:auto;display:flex;flex-direction:column;}
.modal-fullwidth .modal-body>div{flex:1;min-height:auto!important;height:100%;}
body.blacked #helperContainer{
      background-color: var(--bg-primary) !important;
}
.btn-themecolor2 {
    color: var(--rx-color1);
}
body.blacked .list-group-item.active{
  background:black;
}
.payment-item {
    border-left: 4px solid #0d6efd;
    transition: all 0.3s ease;
}
.filterStv .yadcf-exclude-wrapper {
  display: none;
}
.yadcf-exclude-wrapper input{
  position:relative;left:0;
}
.filterStv:focus-within .yadcf-exclude-wrapper {
     display: inline-block;
    position: absolute;
    bottom: -31px;
    left: 0;
    width: 100%;
    background: var(--rx-color1);
    padding: 0;
    z-index:9999;
}

.filterReal .yadcf-filter-range-number{background:transparent;border:0}
.payment-item:hover {
    background-color: #f8f9fa;
    transform: translateX(5px);
}
.badge-metodo {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
}
.total-real {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--rx-color1);
}
.total-pagado {
    font-size: 1.5rem;
    font-weight: bold;
    color: #198754;
}
.saldo-pendiente {
    font-size: 1.5rem;
    font-weight: bold;
    color: #dc3545;
}
.factura-row:hover {
    background-color: #f8f9fa;
    cursor: pointer;
}
/* Variables CSS para colores y gradientes */
:root {
    --gradient-primary: linear-gradient(135deg, var(--rx-color1) 0%,  var(--rx-color2) 100%);
    --gradient-success: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    --gradient-warning: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    --gradient-info: linear-gradient(135deg, #17a2b8 0%, #6f42c1 100%);
    --gradient-danger: linear-gradient(135deg, #dc3545 0%, #e83e8c 100%);
    --shadow-soft: 0 2px 15px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 30px rgba(0,0,0,0.12);
}
.dataTables_scrollHeadInner,.dataTables_scrollFootInner{margin:0 auto}
/* Layout principal */
.dashboard-full-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 50vh;
    padding: 20px;
}

/* Header del dashboard */
.dashboard-header {
    background: var(--gradient-primary);
    border-radius: 15px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

/* Selector de período */
.period-selector {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.period-btn {
    border: none;
    background: transparent;
    border-radius: 8px;
    padding: 6px 12px;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    font-size: 0.875rem;
}

.period-btn.active {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.period-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

/* Cards principales */
.kpi-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    box-shadow: var(--shadow-soft);
}

.kpi-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.metric-card {
    transition: all 0.3s ease;
    border: none;
    box-shadow: var(--shadow-soft);
}

.metric-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    z-index:1;
}

/* Iconos de KPI */
.kpi-icon {
    opacity: 0.6;
    font-size: 2rem;
}
.kpi-card:hover > .kpi-icon{
  opacity:1;
}
.kpi-card{
  border:1px dashed var(--rx-color1);
}
/* Indicadores de tendencia */
.trend-indicator {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.text-success .trend-indicator {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.text-danger .trend-indicator {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.text-muted .trend-indicator {
    background-color: rgba(108, 117, 125, 0.1);
    color: #6c757d;
}

/* Datos en listas */
.data-list {
    max-height: 250px;
    overflow-y: auto;
}

.data-item {
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.data-item:last-child {
    border-bottom: none;
}

.list-header {
    background: rgba(102, 126, 234, 0.1);
    padding: 8px 12px;
    margin: -15px -15px 15px -15px;
    border-radius: 8px 8px 0 0;
}

/* Progress bars mini */
.progress {
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    transition: width 0.6s ease;
}

/* Comparación y análisis */
.comparison-section {
    background: rgba(0, 0, 0, 0.02);
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
}

.comparison-box {
    background: rgba(0, 0, 0, 0.02);
    padding: 12px;
    border-radius: 8px;
}

.trend-box {
    background: rgba(0, 0, 0, 0.02);
    padding: 12px;
    border-radius: 8px;
}

/* Badges de tendencia */
.trend-badge {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 12px;
}

/* Chart containers */
.chart-mini {
    height: 100px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #dee2e6;
}

/* Info grid para metadatos */
.info-grid .info-item {
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.info-grid .info-item:last-child {
    border-bottom: none;
}

/* Floating Action Button */
.fab {
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.fab:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease forwards;
}

/* Loading states */
.spinner-border {
    animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

/* Gradientes para backgrounds */
.bg-gradient {
    background: var(--gradient-primary);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .dashboard-full-container {
        padding: 10px;
    }
    
    .dashboard-header {
        text-align: center;
    }
    
    .period-selector {
        margin-top: 15px;
    }
    
    .kpi-value {
        font-size: 1.5rem !important;
    }
    
    .display-3 {
        font-size: 2.5rem;
    }
}

@media (max-width: 576px) {
    .navbar-brand img{max-width:170px}
    .period-btn {
        padding: 4px 8px;
        font-size: 0.75rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    

}

/* Dark mode support (opcional) */

    body.thr-dark .dashboard-full-container {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
        color: #ffffff;
    }
    
    body.thr-darkt .card {
        background-color: rgba(255, 255, 255, 0.1);
        color: #ffffff;
    }
    


/* Scrollbar personalizado */
.data-list::-webkit-scrollbar {
    width: 4px;
}

.data-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.data-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

.data-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Efectos hover adicionales */
.dropdown-toggle:hover {
    background-color: rgba(0, 123, 255, 0.1) !important;
}

.alert {
    border: none;
    box-shadow: var(--shadow-soft);
}

/* Utilities adicionales */
.opacity-10 {
    opacity: 0.1;
}

.opacity-25 {
    opacity: 0.25;
}

.rounded {
    border-radius: 15px !important;
}

.shadow-lg {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

/* Estados de botones */
.btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
}

.btn-primary:hover {
    background: var(--gradient-primary);
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Transiciones globales
* {
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, 
                border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
 */
/* === ESTILOS PARA DISEÑO TIPO PODIO === */

/* Contenedor del podio */
.podium-list {
    padding: 0;
    max-height:500px;
    overflow-x:hidden;
    overflow-y:ellipsis;
}

/* Item del podio */
.podium-item {
    border: 1px solid transparent;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
}

.podium-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.1);
}

/* Estilos específicos por posición */
.podium-first {
    background: linear-gradient(135deg, #fff9c4 0%, #fff3cd 100%);
    border-left: 4px solid #FFD700;
}

.podium-first:hover {
    background: linear-gradient(135deg, #fff7b3 0%, #fff0b8 100%);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.3);
}

.podium-second {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid #C0C0C0;
}

.podium-second:hover {
    background: linear-gradient(135deg, #f1f3f4 0%, #dee2e6 100%);
    box-shadow: 0 6px 20px rgba(192, 192, 192, 0.3);
}

.podium-third {
    background: linear-gradient(135deg, #fdf2e9 0%, #f4e6d7 100%);
    border-left: 4px solid #CD7F32;
}

.podium-third:hover {
    background: linear-gradient(135deg, #fbeee3 0%, #f0dcc9 100%);
    box-shadow: 0 6px 20px rgba(205, 127, 50, 0.3);
}

.podium-other {
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f4 100%);
    border-left: 4px solid #6c757d;
}

.podium-other:hover {
    background: linear-gradient(135deg, #f0f2f3 0%, #e9ecef 100%);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.2);
}

/* Posición badge */
.podium-position .badge {
    font-size: 0.875rem;
    padding: 8px 12px;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

/* Contenido del podio */
.podium-content {
    min-width: 0; /* Para permitir text-truncate */
}

.podium-content .min-width-0 {
    min-width: 0;
}

.podium-content .text-small {
    font-size: 0.75rem;
    align-items: center;
}

.podium-content .badge-sm {
    font-size: 0.65rem;
    padding: 2px 6px;
}

.podium-item .font-weight-medium {
    font-weight: 500;
    color: #495057;
}

.podium-item .text-primary {
    font-size: 1.1rem;
    font-weight: 700;
}

/* Animaciones para el podio */
.podium-item:nth-child(1) {
    animation: slideInUp 0.6s ease-out 0.1s both;
}

.podium-item:nth-child(2) {
    animation: slideInUp 0.6s ease-out 0.2s both;
}

.podium-item:nth-child(3) {
    animation: slideInUp 0.6s ease-out 0.3s both;
}

.podium-item:nth-child(4) {
    animation: slideInUp 0.6s ease-out 0.4s both;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === ESTILOS MODERNOS PARA CHAT-MANAGER === */

/* Contenedor principal del chat */
.chat-main-box {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    display: flex;
    height: 85vh;
    min-height: 600px;
}
.chat-main-box .chat-left-aside .open-panel{color:black}
/* Panel de conversaciones */
.chat-left-aside {
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    height: 100%;
    display: flex;
    flex-direction: column;

}

/* Contenedor interno del left-aside */
.chat-left-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Lista de conversaciones con scroll */
.chatonline {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
}
.chatonline small{
      white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display:block;
}
body.blacked .chatonline li a span{
  color:white;
}
body.thr-dark .chat-main-box .chat-left-aside .chat-left-inner .style-none li a:hover, body.thr-dark .chat-main-box .chat-left-aside .chat-left-inner .style-none li a.active{
background:var(--rx-color1);
}
/* Scrollbar personalizado para lista de conversaciones */
.chatonline::-webkit-scrollbar {
    width: 6px;
}

.chatonline::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.chatonline::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

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

/* Ocultar botón de cargar más conversaciones (se activa auto con scroll) */
.more-page-convs {
    display: none;
}

/* Panel derecho del chat */
.chat-right-aside {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header del chat */
.chat-main-header {
    flex-shrink: 0;
}

/* Contenedor de mensajes */
.chat-rbox {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Items de conversación */
.rxsCv {
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 5px 10px;
}

.rxsCv:hover {
    background: rgba(0, 123, 255, 0.08);
    transform: translateX(5px);
}

.rxsCv a.active {
    background: var(--gradient-primary);
    color: white !important;
    border-radius: 8px;
}

/* Lista de mensajes */
.chat-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    transition: opacity 0.15s ease;
}

.chat-list::-webkit-scrollbar {
    width: 6px;
}

.chat-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.chat-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

/* Burbujas de mensajes */
.chat-list > li {
    margin-bottom: 20px;
    animation: messageSlideIn 0.3s ease;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-content .box {
    background: white;
    border-radius: 18px 18px 18px 4px;
    padding: 12px 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    max-width: 65%;
    word-wrap: break-word;
}

.chat-list > li.reverse .chat-content .box {
    background: var(--gradient-primary);
    color: white;
    border-radius: 18px 18px 4px 18px;
}

/* Imágenes en mensajes */
.rxsChatImg {
    border-radius: 12px;
    margin-top: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
    max-width: 100%;
    height: auto;
}

.rxsChatImg:hover {
    transform: scale(1.05);
}

/* Audio en mensajes */
audio {
    width: 100%;
    margin-top: 8px;
    border-radius: 25px;
    height: 40px;
}

audio::-webkit-media-controls-panel {
    background: rgba(255, 255, 255, 0.95);
}

/* Botones de descarga de archivos */
.chat-content .btn-primary {
    margin-top: 8px;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.chat-content .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* Área de input de mensaje */
.rxsMsgSendTx {
    background: #f8f9fa;
    border-top: 2px solid #e9ecef;
    padding: 15px 20px;
    flex-shrink: 0;
}

.rxsMsgSendTx textarea {
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 12px 16px;
    transition: all 0.3s ease;
    background: white;
}

.rxsMsgSendTx textarea:focus {
    border-color: var(--rx-color1, #667eea);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.rxsMsgSendTx textarea:disabled {
    background: #f1f3f4;
    cursor: not-allowed;
}

/* Botones de acción */
.rxsMsgSendTx .btn-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.rxsMsgSendTx .btn-circle:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.rxsMsgSendTx .btn-circle.btn-lg {
    width: 50px;
    height: 50px;
}

.rxsMsgSendTx .btn-circle:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Preview de adjuntos */
.attachment-preview {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        margin-bottom: 0;
    }
    to {
        opacity: 1;
        max-height: 200px;
        margin-bottom: 8px;
    }
}

.attachment-preview img {
    border: 2px solid #dee2e6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Estado de grabación */
.btn-circle.btn-danger {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }
}

/* Avatares en chat */
.chat-img img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Timestamp */
.chat-time {
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 4px;
}

/* Headers */
.chat-main-header {
    background: white;
    border-bottom: 2px solid #e9ecef;
}

/* Responsive */
@media (max-width: 768px) {
    .chat-content .box {
        max-width: 85%;
    }
    .chat-list.p-20{
      padding:3px;
    }
    li .chat-content h5{
      /*display: none;*/
      font-size:10px;
      margin-bottom:2px;
    }
    .rxsMsgSendTx .btn-circle {
        width: 38px;
        height: 38px;
    }

    .rxsMsgSendTx .btn-circle.btn-lg {
        width: 44px;
        height: 44px;
    }
}

/* === MODO OSCURO PARA CHAT === */
body.thr-dark .chat-main-box {
    background: #1e2128;
}

body.thr-dark .chat-left-aside {
    background: linear-gradient(180deg, #252934 0%, #1e2128 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

body.thr-dark .rxsCv:hover {
    background: rgba(255, 255, 255, 0.08);
}

body.thr-dark .rxsCv a.active {
    background: var(--gradient-primary);
    color: white !important;
}

body.thr-dark .chat-main-header {
    background: #252934;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

body.thr-dark .chat-main-header .box-title {
    color: #ffffff;
}

body.thr-dark .chat-list::-webkit-scrollbar-track {
    background: #1e2128;
}

body.thr-dark .chat-list::-webkit-scrollbar-thumb {
    background: #3a3f4b;
}

body.thr-dark .chat-list::-webkit-scrollbar-thumb:hover {
    background: #4a4f5b;
}

/* Scrollbar para conversaciones en modo oscuro */
body.thr-dark .chatonline::-webkit-scrollbar-track {
    background: #1e2128;
}

body.thr-dark .chatonline::-webkit-scrollbar-thumb {
    background: #3a3f4b;
}

body.thr-dark .chatonline::-webkit-scrollbar-thumb:hover {
    background: #4a4f5b;
}

/* Burbujas de mensajes - modo oscuro */
body.thr-dark .chat-content .box {
    background: #2c313c;
    color: #e4e6eb !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.thr-dark .chat-list > li.reverse .chat-content .box {
    background: var(--gradient-primary);
    color: white;
}
.chat-content .box{text-align:left;}
.over-expand {
    display: -webkit-box;
    -webkit-line-clamp: 7;  /* Cantidad de líneas */
    -webkit-box-orient: vertical;
    overflow: hidden;
}
/* Método 1: Animación suave con max-height */
.hover-expand-1 {
    max-height: 10.5em;
    overflow: hidden;
    transition: max-height 0.5s ease;
    position: relative;
}

.hover-expand-1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2em;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.hover-expand-1:hover {
    max-height: 1000px;
}

.hover-expand-1:hover::after {
    opacity: 0;
}
.hover-expand:hover {
        -webkit-line-clamp: unset;
        display: block;
    }
body.thr-dark .chat-content h5 {
    color: #b0b3b8;
}

body.thr-dark .chat-time {
    color: #8a8d91;
}
.chat-content audio{min-width:150px}
/* Input área - modo oscuro */
body.thr-dark .rxsMsgSendTx {
    background: #252934;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
}

body.thr-dark .rxsMsgSendTx textarea {
    background: #2c313c;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e4e6eb;
}

body.thr-dark .rxsMsgSendTx textarea::placeholder {
    color: #8a8d91;
}

body.thr-dark .rxsMsgSendTx textarea:focus {
    border-color: var(--rx-color1, #667eea);
    background: #323844;
}

body.thr-dark .rxsMsgSendTx textarea:disabled {
    background: #1e2128;
    color: #6c757d;
}

/* Preview de adjuntos - modo oscuro */
body.thr-dark .attachment-preview {
    background: #2c313c !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

body.thr-dark .attachment-preview .font-weight-bold {
    color: #e4e6eb;
}

body.thr-dark .attachment-preview .text-muted {
    color: #8a8d91 !important;
}

body.thr-dark .attachment-preview img {
    border: 2px solid rgba(255, 255, 255, 0.2);
}

/* Botones - modo oscuro */
body.thr-dark .rxsMsgSendTx .btn-secondary {
    background: #3a3f4b;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e4e6eb;
}

body.thr-dark .rxsMsgSendTx .btn-secondary:hover:not(:disabled) {
    background: #4a4f5b;
    border-color: rgba(255, 255, 255, 0.3);
}

body.thr-dark .rxsMsgSendTx .btn-info {
    background: #17a2b8;
    border-color: #17a2b8;
}

body.thr-dark .rxsMsgSendTx .btn-info:hover:not(:disabled) {
    background: #138496;
}

body.thr-dark .chat-content .btn-primary {
    background: var(--gradient-primary);
    border: none;
}

/* Avatares - modo oscuro */
body.thr-dark .chat-img img {
    border: 2px solid #3a3f4b;
}

/* Audio player - modo oscuro */
body.thr-dark audio {
    filter: invert(0.9) hue-rotate(180deg);
}


/* menu home */

/* === MENU VISUAL COMPONENT === */
.menu-visual-container {
  width: 100%;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--rx-color1) 0%, var(--rx-color2) 50%, var(--rx-color1) 100%);
  padding: 0;
  overflow-y: auto;
  box-sizing: border-box;
  position: relative;
  border-radius:2rem;
}

/* Hero Section */
.categories-hero {
  padding: 4rem 2rem 3rem;
  text-align: center;
  position: relative;
  transition: padding 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow:hidden;
}

.categories-hero.compact {
  padding: 1.5rem 2rem 1.5rem;
  min-height: auto;
  justify-content: flex-start;
}

/* Animación suave para el grid durante cambio */
@keyframes compactTransition {
  0% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

.categories-hero.compact .categories-grid {
  animation: compactTransition 0.4s ease-out;
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  color: white;
  margin: 0 0 1rem 0;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
  letter-spacing: -0.5px;
  transition: all 0.4s ease;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 3rem 0;
  font-weight: 300;
  transition: all 0.4s ease;
}

/* Categories Grid */
.categories-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
  transition:
    gap 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.15s ease,
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.categories-hero.compact .categories-grid {
  gap: 1rem;
  max-width: 100%;
}

/* Category Cards - Estilos visuales */
.category-card-wrapper {
  flex: 0 0 auto;
  position: relative;
}

.category-card {
  width: 160px;
  max-width: 180px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 1.5rem 1rem;
  cursor: pointer;
  transition:
    width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    border-radius 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    background 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.categories-hero.compact .category-card {
  width: 110px;
  max-width: 120px;
  padding: 0.85rem 0.65rem;
  border-radius: 14px;
}


.category-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, var(--card-color) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.category-card:hover {
  transform: translateY(-8px) scale(1.03);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
}

.category-card:hover::before {
  opacity: 0.15;
}

.category-card.active {
  background: rgba(255, 255, 255, 0.95);
  border-color: white;
  transform: scale(1.05);
}

.categories-hero.compact .category-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.categories-hero.compact .category-card.active {
  transform: scale(1.03);
}

.category-visual {
  position: relative;
  display: inline-block;
  margin-bottom: 1rem;
  transition: margin 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.categories-hero.compact .category-visual {
  margin-bottom: 0.65rem;
}

.category-icon-wrapper {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.8) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  color: var(--card-color, var(--rx-color1));
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
  transition:
    width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    font-size 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
    background 0.3s ease,
    box-shadow 0.3s ease;
  margin: 0 auto;
}

.categories-hero.compact .category-icon-wrapper {
  width: 50px;
  height: 50px;
  font-size: 22px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
}

.category-card:hover .category-icon-wrapper {
  transform: rotate(8deg) scale(1.08);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.25);
}

.categories-hero.compact .category-card:hover .category-icon-wrapper {
  transform: rotate(5deg) scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.category-card.active .category-icon-wrapper {
  background: var(--card-color);
  color: white;
}

.category-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 0 4px 12px rgba(238, 90, 111, 0.4);
  border: 3px solid white;
  transition:
    width 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    font-size 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    border-width 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s ease;
  will-change: width, height, font-size;
}

.categories-hero.compact .category-badge {
  width: 24px;
  height: 24px;
  font-size: 0.7rem;
  border: 2px solid white;
}

.category-name {
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;  
  font-weight: 700;
  color: white;
  margin: 0 0 0.35rem 0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition:
    font-size 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    margin 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    color 0.3s ease,
    text-shadow 0.3s ease;
  line-height: 1.3;
  will-change: font-size, margin;
}

.categories-hero.compact .category-name {
  font-size: 0.85rem;
  margin: 0;
  line-height: 1.2;
}

.category-card.active .category-name {
  color: #2d3748;
  text-shadow: none;
}

.category-description {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  font-weight: 400;
  line-height: 1.3;
  transition:
    font-size 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.4s ease,
    max-height 0.4s ease;
  max-height: 100px;
  overflow: hidden;
}

.categories-hero.compact .category-description {
  opacity: 0;
  max-height: 0;
}

.category-card.active .category-description {
  color: #718096;
}

/* Submenu Showcase */
.submenu-showcase {
  background: rgba(255, 255, 255, 0.98);
  margin: 2rem;
  border-radius: 30px;
  padding: 2.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.submenu-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid #e2e8f0;
}

.back-button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 0.85rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  box-shadow: 0 4px 15px rgb(from var(--rx-color1) r g b / 0.3);
}

.back-button:hover {
  transform: translateX(-5px);
  box-shadow: 0 6px 20px rgb(from var(--rx-color1) r g b / 0.4);
}

.submenu-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: #2d3748;
  margin: 0;
  animation: titleSlideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes titleSlideIn {
  0% {
    opacity: 0;
    transform: translateX(-20px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Tools Grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  animation: toolsGridFadeIn 0.4s ease-out;
}

@keyframes toolsGridFadeIn {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.tool-card-wrapper {
  position: relative;
  animation: toolCardSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.tool-card {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  text-decoration: none;
  transition:
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.3s ease,
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.2s ease;
  position: relative;
  overflow: hidden;
}

/* Animación stagger para tool cards */
.tool-card-wrapper:nth-child(1) { animation-delay: 0.05s; }
.tool-card-wrapper:nth-child(2) { animation-delay: 0.08s; }
.tool-card-wrapper:nth-child(3) { animation-delay: 0.11s; }
.tool-card-wrapper:nth-child(4) { animation-delay: 0.14s; }
.tool-card-wrapper:nth-child(5) { animation-delay: 0.17s; }
.tool-card-wrapper:nth-child(6) { animation-delay: 0.2s; }
.tool-card-wrapper:nth-child(7) { animation-delay: 0.23s; }
.tool-card-wrapper:nth-child(8) { animation-delay: 0.26s; }
.tool-card-wrapper:nth-child(9) { animation-delay: 0.29s; }
.tool-card-wrapper:nth-child(10) { animation-delay: 0.32s; }
.tool-card-wrapper:nth-child(11) { animation-delay: 0.35s; }
.tool-card-wrapper:nth-child(12) { animation-delay: 0.38s; }
.tool-card-wrapper:nth-child(13) { animation-delay: 0.41s; }
.tool-card-wrapper:nth-child(14) { animation-delay: 0.44s; }
.tool-card-wrapper:nth-child(15) { animation-delay: 0.47s; }
.tool-card-wrapper:nth-child(16) { animation-delay: 0.5s; }
.tool-card-wrapper:nth-child(17) { animation-delay: 0.53s; }
.tool-card-wrapper:nth-child(18) { animation-delay: 0.56s; }
.tool-card-wrapper:nth-child(19) { animation-delay: 0.59s; }
.tool-card-wrapper:nth-child(20) { animation-delay: 0.62s; }
.tool-card-wrapper:nth-child(n+21) { animation-delay: 0.65s; }

@keyframes toolCardSlideIn {
  0% {
    opacity: 0;
    transform: translateX(-30px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.tool-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 5px;
  height: 100%;
  background: linear-gradient(180deg, var(--rx-color1), var(--rx-color2));
  transform: scaleY(0);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

.tool-card:hover {
  transform: translateX(10px);
  border-color: var(--rx-color2);
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.18);
}

.tool-card:hover::before {
  transform: scaleY(1);
}

.tool-card:active {
  transform: translateX(8px) scale(0.98);
}

.tool-icon-bg {
  width: 65px;
  height: 65px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 28px;
  color: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  transition:
    transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.3s ease;
}

.tool-card:hover .tool-icon-bg {
  transform: scale(1.12) rotate(-8deg);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.tool-card:active .tool-icon-bg {
  transform: scale(1.08) rotate(-6deg);
}

.tool-info {
  flex: 1;
  min-width: 0;
}

.tool-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2d3748;
  margin: 0 0 0.5rem 0;
}

.tool-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #f0f4ff;
  color: var(--rx-color1);
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
}

.tool-arrow {
  color: #cbd5e0;
  font-size: 1.2rem;
  transition:
    color 0.3s ease,
    transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tool-card:hover .tool-arrow {
  color: var(--rx-color1);
  transform: translateX(8px);
}

.tool-card:active .tool-arrow {
  transform: translateX(6px);
}

/* Animations */
.submenu-reveal-enter-active {
  animation: revealIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.submenu-reveal-leave-active {
  animation: revealOut 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes revealIn {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(0.92);
  }
  60% {
    opacity: 1;
    transform: translateY(-5px) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes revealOut {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
}

/* Scrollbar */
.menu-visual-container::-webkit-scrollbar {
  width: 10px;
}

.menu-visual-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

.menu-visual-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
}

.menu-visual-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

/* Responsive Grid Layouts */
@media (max-width: 768px) {
  .categories-hero {
    padding: 2rem 1rem 2rem;
    align-items: center;
  }

  .categories-hero.compact {
    padding: 1rem;
  }

  .categories-grid {
    justify-content: space-evenly;
    padding: 0 0.5rem;
    width: 100%;
    gap: 1rem;
  }

  .category-card-wrapper {
    flex: 0 0 calc(33.333% - 0.7rem);
    max-width: calc(33.333% - 0.7rem);
  }

  .hero-title {
    font-size: 2rem;
  }
  .hero-subtitle{display:none}

  .category-card {
    width: 100%;
    min-width: auto;
    max-width: 140px;
    margin: 0 auto;
  }

  .categories-hero.compact .category-card {
    width: 100%;
    min-width: auto;
    max-width: 90px;
  }

  .category-icon-wrapper {
    width: 65px;
    height: 65px;
    font-size: 28px;
  }

  .categories-hero.compact .category-icon-wrapper {
    width: 45px;
    height: 45px;
    font-size: 20px;
  }

  .category-name {
    font-size: 1rem;
  }

  .categories-hero.compact .category-name {
    font-size: 0.75rem;
  }

  .submenu-showcase {
    margin: 1rem;
    padding: 1.5rem;
  }

  .submenu-title {
    font-size: 1.75rem;
  }

  .tools-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .categories-hero {
    padding: 1.5rem 0.5rem 1.5rem;
  }

  .categories-grid {
    gap: 0.75rem;
    padding: 0 0.25rem;
  }

  .category-card-wrapper {
    flex: 0 0 calc(33.333% - 0.5rem);
    max-width: calc(33.333% - 0.5rem);
  }

  .category-card {
    width: 100%;
    max-width: 120px;
  }

  .categories-hero.compact .category-card {
    width: 100%;
    max-width: 75px;
  }
}

/* === DARK MODE === */
.menu-visual-container.dark-mode {
  background: linear-gradient(135deg, var(--rx-color1) 0%, var(--rx-color2) 50%, var(--rx-color1) 100%);
}

.dark-mode .hero-title,
.dark-mode .hero-subtitle {
  color: white;
}

.dark-mode .category-card {
  background: rgba(30, 30, 50, 0.4);
  border-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .category-card:hover {
  border-color: rgba(255, 255, 255, 0.3);
}

.dark-mode .category-card.active {
  background: rgba(40, 40, 60, 0.95);
  border-color: rgba(167, 139, 250, 0.6);
}

.dark-mode .category-name {
  color: rgba(255, 255, 255, 0.95);
}

.dark-mode .category-description {
  color: rgba(255, 255, 255, 0.7);
}

.dark-mode .category-card.active .category-name {
  color: white;
}

.dark-mode .submenu-showcase {
  background: rgba(30, 30, 50, 0.95);
  backdrop-filter: blur(20px);
}

.dark-mode .submenu-header {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .submenu-title {
  color: #e2e8f0;
}

.dark-mode .tool-card {
  background: rgba(40, 40, 60, 0.6);
  border-color: rgb(from var(--rx-color1) r g b / 0.1);
}

.dark-mode .tool-card:hover {
  border-color: rgb(from var(--rx-color1) r g b / 0.5);
  background: rgba(50, 50, 70, 0.8);
}

.dark-mode .tool-name {
  color: #e2e8f0;
}

.dark-mode .tool-badge {
  border-color: rgb(from var(--rx-color1) r g b / 0.2);
  color: black;
}

.dark-mode .tool-arrow {
  color: rgba(255, 255, 255, 0.3);
}

.dark-mode .tool-card:hover .tool-arrow {
  color: var(--rx-color1);
}

.dark-mode .menu-visual-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
}

.dark-mode .menu-visual-container::-webkit-scrollbar-thumb {
  background: rgba(167, 139, 250, 0.4);
}

.dark-mode .menu-visual-container::-webkit-scrollbar-thumb:hover {
  background: rgba(167, 139, 250, 0.6);
}

/* Buscador del menú */
.menu-search-container {
  margin: 20px 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.menu-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 25px;
  padding: 12px 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.menu-search-wrapper:focus-within {
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  transform: translateY(-2px);
}

.menu-search-wrapper i.fa-search {
  margin-right: 10px;
  color: #999;
}

.menu-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  background: transparent;
}

.menu-search-wrapper i.fa-times-circle {
  margin-left: 10px;
  color: #999;
  transition: color 0.2s;
}

.menu-search-wrapper i.fa-times-circle:hover {
  color: #e74c3c;
}

/* Dark mode para buscador */
.dark-mode .menu-search-wrapper {
  background: rgba(50, 50, 70, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-mode .menu-search-input {
  color: #e2e8f0;
}

.dark-mode .menu-search-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

/* Favoritos */
.favorites-section {
  margin: 30px 0;
  padding: 20px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 15px;
  backdrop-filter: blur(10px);
}

.favorites-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 15px;
  color: #e74c3c;
  display: flex;
  align-items: center;
  gap: 8px;
}

.favorites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
}

.favorite-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 15px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.favorite-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  text-decoration: none;
}

.fav-icon-bg {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  color: white;
  font-size: 24px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.fav-name {
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  color: #2d3748;
}

/* Dark mode para favoritos */
.dark-mode .favorites-section {
  background: rgba(50, 50, 70, 0.5);
}

.dark-mode .favorites-title {
  color: #fc8181;
}

.dark-mode .favorite-card {
  background: rgba(50, 50, 70, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-mode .fav-name {
  color: #e2e8f0;
}

/* Favoritos pequeños (abajo) */
.favorites-bottom {
  margin-top: 40px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.3);
}

.favorites-bottom .favorites-title {
  font-size: 16px;
  margin-bottom: 10px;
}

.favorite-card-small {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 5px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  transition: all 0.2s ease;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  height: 100%;
}

.favorite-card-small:hover {
  transform: translateY(-3px);
  box-shadow: 0 3px 10px rgba(0,0,0,0.12);
  text-decoration: none;
}

.fav-icon-small {
  width: 35px;
  height: 35px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  color: white;
  font-size: 16px;
  box-shadow: 0 1px 5px rgba(0,0,0,0.15);
}

.fav-name-small {
  font-size: 11px;
  font-weight: 500;
  text-align: center;
  color: #2d3748;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Dark mode para favoritos pequeños */
.dark-mode .favorites-bottom {
  background: rgba(50, 50, 70, 0.3);
}

.dark-mode .favorite-card-small {
  background: rgba(50, 50, 70, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.dark-mode .fav-name-small {
  color: #e2e8f0;
}

/* Resultados de búsqueda */
.search-results-section {
  margin: 20px 0;
  animation: searchResultsFadeIn 0.4s ease-out;
}

@keyframes searchResultsFadeIn {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-results-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 15px;
  color: #2d3748;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: searchTitleSlideIn 0.3s ease-out;
}

@keyframes searchTitleSlideIn {
  0% {
    opacity: 0;
    transform: translateX(-20px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.search-result-wrapper {
  position: relative;
  height: 100%;
  animation: searchCardPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

@keyframes searchCardPop {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Animación stagger para resultados */
.search-result-wrapper:nth-child(1) { animation-delay: 0.05s; }
.search-result-wrapper:nth-child(2) { animation-delay: 0.08s; }
.search-result-wrapper:nth-child(3) { animation-delay: 0.11s; }
.search-result-wrapper:nth-child(4) { animation-delay: 0.14s; }
.search-result-wrapper:nth-child(5) { animation-delay: 0.17s; }
.search-result-wrapper:nth-child(6) { animation-delay: 0.2s; }
.search-result-wrapper:nth-child(7) { animation-delay: 0.23s; }
.search-result-wrapper:nth-child(8) { animation-delay: 0.26s; }
.search-result-wrapper:nth-child(9) { animation-delay: 0.29s; }
.search-result-wrapper:nth-child(10) { animation-delay: 0.32s; }
.search-result-wrapper:nth-child(11) { animation-delay: 0.35s; }
.search-result-wrapper:nth-child(12) { animation-delay: 0.38s; }
.search-result-wrapper:nth-child(n+13) { animation-delay: 0.4s; }

.search-result-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 15px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  height: 100%;
}

.search-result-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  text-decoration: none;
}

/* Efecto al presionar Enter */
.search-result-enter-active {
  animation: searchResultPulse 0.3s ease-out;
}

@keyframes searchResultPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  }
}

.search-result-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  margin-bottom: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.search-result-info {
  text-align: center;
  width: 100%;
}

.search-result-name {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 6px 0;
  color: #2d3748;
}

.search-result-path {
  font-size: 11px;
  color: #999;
  margin: 0;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Botón de favorito */
.fav-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #cbd5e0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  z-index: 10;
}

.fav-btn:hover {
  background: #fff;
  color: #e74c3c;
  transform: scale(1.1);
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

.fav-btn.is-fav {
  background: #e74c3c;
  color: #fff;
}

.fav-btn.is-fav:hover {
  background: #c0392b;
}

.fav-btn i {
  font-size: 14px;
}

/* Dark mode para botón de favorito */
.dark-mode .fav-btn {
  background: rgba(50, 50, 70, 0.9);
  color: rgba(255, 255, 255, 0.5);
}

.dark-mode .fav-btn:hover {
  background: rgba(50, 50, 70, 1);
  color: #fc8181;
}

.dark-mode .fav-btn.is-fav {
  background: #fc8181;
  color: #1a202c;
}

.dark-mode .fav-btn.is-fav:hover {
  background: #f56565;
}

/* Botón favorito en categorías */
.fav-btn-category {
  top: 5px;
  right: 5px;
  width: 26px;
  height: 26px;
}

.fav-btn-category i {
  font-size: 12px;
}

.categories-hero.compact .fav-btn-category {
  width: 22px;
  height: 22px;
}

.categories-hero.compact .fav-btn-category i {
  font-size: 10px;
}

/* Botón favorito en sección de favoritos pequeños */
.favorites-bottom .fav-btn {
  top: 5px;
  right: 5px;
  width: 20px;
  height: 20px;
}

.favorites-bottom .fav-btn i {
  font-size: 10px;
}

/* Sin resultados */
.no-results {
  text-align: center;
  padding: 40px 20px;
  color: #999;
  animation: noResultsFadeIn 0.5s ease-out;
}

@keyframes noResultsFadeIn {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.no-results i {
  font-size: 48px;
  margin-bottom: 15px;
  opacity: 0.5;
  animation: noResultsIconBounce 0.6s ease-out 0.2s backwards;
}

@keyframes noResultsIconBounce {
  0% {
    opacity: 0;
    transform: translateY(-20px) rotate(-10deg);
  }
  60% {
    transform: translateY(5px) rotate(5deg);
  }
  100% {
    opacity: 0.5;
    transform: translateY(0) rotate(0deg);
  }
}

.no-results p {
  font-size: 16px;
  margin: 0;
  animation: noResultsTextSlide 0.5s ease-out 0.3s backwards;
}

@keyframes noResultsTextSlide {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Dark mode para resultados de búsqueda */
.dark-mode .search-results-title {
  color: #e2e8f0;
}

.dark-mode .search-result-card {
  background: rgba(50, 50, 70, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-mode .search-result-name {
  color: #e2e8f0;
}

.dark-mode .search-result-path {
  color: rgba(255, 255, 255, 0.5);
}

.dark-mode .no-results {
  color: rgba(255, 255, 255, 0.5);
}

/* Responsive */
@media (max-width: 768px) {
  .favorites-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
  }

  .favorite-card {
    padding: 15px 10px;
  }

  .fav-icon-bg {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .fav-name {
    font-size: 12px;
  }

  .menu-search-container {
    margin: 15px;
  }
}


/**
 * RXS99 - Code99 Dynamic Forms
 * CSS Mínimo - Usa Bootstrap 4/5 para todo lo demás
 *
 * @version 2.0.0
 * @author RXS99
 */

/* ==========================================
   Variables CSS Personalizadas (Solo gradientes)
   ========================================== */
.rxs99-container {
    --rxs99-primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --rxs99-success-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --rxs99-danger-gradient: linear-gradient(135deg, #ee0979 0%, #ff6a00 100%);
    --rxs99-info-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}
.mbhelper #code99-question{color:white}
/* ==========================================
   Animaciones de Transición
   ========================================== */
.rxs99-section {
    display: none;
}

.rxs99-section.active {
    display: block;
    animation: rxs99FadeIn 0.5s ease-in;
}

@keyframes rxs99FadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   Botones con Gradientes
   ========================================== */
.rxs99-btn-primary-gradient {
    background: var(--rxs99-primary-gradient);
    color: white;
    border: none;
    transition: all 0.3s ease;
}

.rxs99-btn-primary-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
    color: white;
}

.rxs99-btn-success-gradient {
    background: var(--rxs99-success-gradient);
    color: white;
    border: none;
    transition: all 0.3s ease;
}

.rxs99-btn-success-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(17, 153, 142, 0.3);
    color: white;
}

.rxs99-btn-danger-gradient {
    background: var(--rxs99-danger-gradient);
    color: white;
    border: none;
    transition: all 0.3s ease;
}

.rxs99-btn-danger-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(238, 9, 121, 0.3);
    color: white;
}

/* ==========================================
   Cards de Opciones
   ========================================== */
.rxs99-option-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.rxs99-option-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--rxs99-primary-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.rxs99-option-card:hover::before {
    opacity: 0.1;
}

.rxs99-option-card:hover {
    border-color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.2);
}

.rxs99-option-content {
    position: relative;
    z-index: 1;
}

.rxs99-option-number {
    display: inline-block;
    background: var(--rxs99-primary-gradient);
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    line-height: 35px;
    font-weight: 700;
    margin-bottom: 10px;
}

.rxs99-option-text {
    font-weight: 600;
    color: #2d3748;
    font-size: 0.95rem;
}

/* ==========================================
   Progress Bar Custom
   ========================================== */
.rxs99-progress-custom {
    height: 8px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.rxs99-progress-fill {
    height: 100%;
    background: var(--rxs99-success-gradient);
    transition: width 0.5s ease;
}

/* ==========================================
   Badge con Gradiente
   ========================================== */
.rxs99-badge-gradient {
    background: var(--rxs99-info-gradient);
    color: white;
}
.rxs99-container.rxsShort .card.shadow-lg{
  background:transparent;
  box-shadow: none !important;
}
/* Offcanvas de BS5 para BS4 */
.offcanvas {
  position: fixed;
  bottom: 0;
  z-index: 1045;
  display: flex;
  flex-direction: column;
  max-width: 100%;
  visibility: hidden;
  background-color: #fff;
  background-clip: padding-box;
  outline: 0;
  transition: transform 0.3s ease-in-out;
}
.thr-dark .offcanvas{
  background-color:#263238;
}
.offcanvas-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1040;
  width: 100vw;
  height: 100vh;
  background-color: #000;
}

.offcanvas-backdrop.fade {
  opacity: 0;
}

.offcanvas-backdrop.show {
  opacity: 0.2;
}

.offcanvas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1rem;
}

.offcanvas-header .btn-close {
  padding: 0.5rem 0.5rem;
  margin-top: -0.5rem;
  margin-right: -0.5rem;
  margin-bottom: -0.5rem;
}

.offcanvas-title {
  margin-bottom: 0;
  line-height: 1.5;
}

.offcanvas-body {
  flex-grow: 1;
  padding: 1rem 1rem;
  overflow-y: auto;
}

.offcanvas-start {
  top: 0;
  left: 0;
  width: 400px;
  border-right: 1px solid rgba(0, 0, 0, 0.2);
  transform: translateX(-100%);
}

.offcanvas-end {
  top: 0;
  right: 0;
  width: 400px;
  border-left: 1px solid rgba(0, 0, 0, 0.2);
  transform: translateX(100%);
}

.offcanvas-top {
  top: 0;
  right: 0;
  left: 0;
  height: 30vh;
  max-height: 100%;
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
  transform: translateY(-100%);
}

.offcanvas-bottom {
  right: 0;
  left: 0;
  height: 30vh;
  max-height: 100%;
  border-top: 1px solid rgba(0, 0, 0, 0.2);
  transform: translateY(100%);
}

.offcanvas.show {
  transform: none;
  visibility: visible;
}

/* Responsive */
@media (max-width: 575.98px) {
  .offcanvas-start,
  .offcanvas-end {
    width: 100%;
  }
}
.offcanvas .col,
.offcanvas [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
}
.filterReal{
    margin-left: 34px;
      border:0;

}
.filterReal .select2-selection__rendered{
  border:0;
}
.filterStv .input-group-prepend {
    width: 36px;
    height:36px;
}
.filterStv .input-group{
  line-height:31px;
  border:0;
  border-radius: 0;
}
.filterStv .select2-selection{
  border:0;

}
.rxsOffFilter{
  position: absolute;
    top: -13px;
    right: 0;
}
.filterStv .select2-selection__rendered{padding:0 !important}
.filterReal input,.filterReal .yadcf-filter, .filterReal .yadcf-filter-range-date{height:36px;padding-left:5px}
.filterReal .select2-selection--multiple{height:36px;}
.filterStv .input-group-text{background:var(--rx-color1) !important}
.filterStv{margin-bottom: 0.5rem;}
.offcanvas-body .allFilters {
    max-height: 90vh;
}
.allFilters .filterReal .yadcf-filter,.allFilters .filterReal .yadcf-filter-range-date,.allFilters input{border-bottom:1px solid grey !important;}
.allFilters input:focus {
    box-shadow: none;
    border-bottom: 1px solid var(--rx-color1) !important; /* Cyan al enfocar */
}
.allFilters .select2-container .select2-search--inline .select2-search__field{padding-left:5px;}
/* Contenedor de filtros */
.allFilters {
    position: relative;
    max-height: 45px; /* Altura de una fila + margen */
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
}

.allFilters.expanded {
    max-height: 2000px; /* Suficientemente alto para todos los filtros */
}

/* Botón para expandir/colapsar */
.filter-toggle {
    position: absolute;
    bottom: -45px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    background: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 10px 30px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(78, 115, 223, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-toggle:hover {
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 6px 16px rgba(78, 115, 223, 0.4);
}

.filter-toggle i {
    transition: transform 0.3s ease;
}

.allFilters.expanded + .filter-toggle i {
    transform: rotate(180deg);
}
.allFilters .select2-container--default .select2-selection--multiple .select2-selection__choice{
  max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.filterStv .select2-container--default .select2-search--inline .select2-search__field{
  width:auto;
}
/* Responsive */
@media (max-width: 575px) {
    .allFilters {
        max-height: 50px; /* Ajustar para móvil */
    }
    
    .filterStv {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .select2-container .select2-search--inline{width:100%}
}
/* Mobile XS (< 576px): col-6 = 2 filtros por fila
   Siempre mostrar el botón */
.filtCon .allFiltersBtn {
    display: block;
}

/* SM (576px+): col-sm-6 = 2 por fila
   Ocultar si hay 2 o menos */
@media (min-width: 576px) {
    .filtCon:has(.allFilters .filterStv:nth-child(3)) .allFiltersBtn {
        display: block;
    }
    
    .filtCon:not(:has(.allFilters .filterStv:nth-child(3))) .allFiltersBtn {
        display: none;
    }
}

/* MD (768px+): col-md-4 = 3 por fila
   Ocultar si hay 3 o menos */
@media (min-width: 768px) {
    .filtCon:has(.allFilters .filterStv:nth-child(4)) .allFiltersBtn {
        display: block;
    }
    
    .filtCon:not(:has(.allFilters .filterStv:nth-child(4))) .allFiltersBtn {
        display: none;
    }
}

/* LG (992px+): col-lg-3 = 4 por fila
   Ocultar si hay 4 o menos */
@media (min-width: 992px) {
    .filtCon:has(.allFilters .filterStv:nth-child(5)) .allFiltersBtn {
        display: block;
    }
    
    .filtCon:not(:has(.allFilters .filterStv:nth-child(5))) .allFiltersBtn {
        display: none;
    }
}

/* XL (1200px+): col-xl-2 = 6 por fila
   Ocultar si hay 6 o menos */
@media (min-width: 1200px) {
    .filtCon:has(.allFilters .filterStv:nth-child(7)) .allFiltersBtn {
        display: block;
    }

    .filtCon:not(:has(.allFilters .filterStv:nth-child(7))) .allFiltersBtn {
        display: none;
    }
}

/* === DATA EXPORT BUILDER COMPONENT === */
.data-export-builder {
  padding: 20px 0;
}

.data-export-builder .table-icon-mini {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.data-export-builder .table-icon-mini i {
  font-size: 14px;
}

.data-export-builder .table-item {
  transition: all 0.2s ease;
  cursor: pointer;
}

.data-export-builder .table-item:hover {
  background-color: #f8f9fa !important;
}

.data-export-builder .hover-bg-light:hover {
  background-color: #f8f9fa;
}

.data-export-builder .cursor-pointer {
  cursor: pointer;
}

.data-export-builder .tree-node .card {
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.data-export-builder .tree-node .card:hover {
  border-left-color: #28a745;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.data-export-builder .relation-item {
  transition: all 0.2s ease;
  background-color: #fff;
}

.data-export-builder .relation-item:hover {
  background-color: #f8f9fa;
  transform: translateX(4px);
}

.data-export-builder .relation-selected {
  background-color: #d4edda !important;
}

.data-export-builder .bg-success-light {
  background-color: #d4edda;
}

.data-export-builder .btn-xs {
  padding: 0.15rem 0.4rem;
  font-size: 0.75rem;
  line-height: 1.2;
  border-radius: 0.2rem;
}

.data-export-builder .tables-list::-webkit-scrollbar,
.data-export-builder .export-tree::-webkit-scrollbar {
  width: 8px;
}

.data-export-builder .tables-list::-webkit-scrollbar-track,
.data-export-builder .export-tree::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.data-export-builder .tables-list::-webkit-scrollbar-thumb,
.data-export-builder .export-tree::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

.data-export-builder .tables-list::-webkit-scrollbar-thumb:hover,
.data-export-builder .export-tree::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Animaciones */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.data-export-builder .tree-node {
  animation: fadeIn 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .data-export-builder .col-md-6 {
    margin-bottom: 20px;
  }
}

/* Dark mode support */
.thr-dark .data-export-builder .table-item:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
}

.thr-dark .data-export-builder .relation-item {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.thr-dark .data-export-builder .relation-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.thr-dark .data-export-builder .relation-selected,
.thr-dark .data-export-builder .bg-success-light {
  background-color: rgba(40, 167, 69, 0.2) !important;
}

.thr-dark .data-export-builder .card {
  background-color: #2a2a2a;
  border-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.thr-dark .data-export-builder .card-header {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.thr-dark .data-export-builder .bg-light {
  background-color: rgba(255, 255, 255, 0.05) !important;
}

.thr-dark .data-export-builder .border {
  border-color: rgba(255, 255, 255, 0.1) !important;
}

.thr-dark .data-export-builder .text-muted {
  color: rgba(255, 255, 255, 0.6) !important;
}

/* Indicadores de mensajes leídos/no leídos */
.msg-read-indicator {
  display: inline-block;
  margin-left: 5px;
  font-size: 0.75rem;
  position: relative;
}

.msg-read-indicator i {
  font-size: 0.75rem;
}

/* Indicador de mensaje enviado (un check) */
.msg-read-indicator.sent {
  color: #999;
}

/* Indicador de mensaje leído (doble check) */
.msg-read-indicator.read {
  color: #34c759;
}

.msg-read-indicator.read i:first-child {
  position: relative;
  margin-right: -6px;
}

/* Badge de mensajes no leídos en lista de conversaciones */
.unread-badge {
  margin-left: 8px;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: bold;
  vertical-align: middle;
}

/* Dark mode para indicadores */
.thr-dark .msg-read-indicator.sent {
  color: #666;
}

.thr-dark .msg-read-indicator.read {
  color: #34c759;
}

/* Estilos mejorados para lista de conversaciones */
.chatonline.style-none .rxsCv {
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  position: relative;
}

.chatonline.style-none .rxsCv a {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  gap: 10px;
  position: relative;
}

/* Avatar con icono de plataforma */
.conv-avatar {
  position: relative;
  flex-shrink: 0;
}

.conv-avatar .img-circle {
  width: 36px;
  height: 36px;
  object-fit: cover;
}

.conv-avatar .platform-icon {
  position: absolute;
  bottom: -2px;
  right: -2px;
  background: white;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Contenido de la conversación */
.conv-content {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.conv-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.conv-name {
  font-weight: 500;
  font-size: 14px;
  color: #2c3e50;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.conv-time {
  font-size: 11px;
  color: #95a5a6;
  white-space: nowrap;
  margin-left: 8px;
}

.conv-preview {
  font-size: 13px;
  color: #7f8c8d;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.4;
}

.conv-meta {
  font-size: 11px;
  color: #95a5a6;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.conv-meta .badge-xs {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.conv-agent {
  font-size: 10px;
  color: #7f8c8d;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.conv-agent i {
  font-size: 11px;
}

/* Badge de no leídos - reposicionado */
.chatonline .unread-badge {
  position: absolute;
  top: 10px;
  right: 12px;
  margin: 0;
}

/* Efectos para conversaciones con mensajes no leídos */
.rxsCv.has-unread {
  background: linear-gradient(to right, rgba(231, 76, 60, 0.05), transparent);
  border-left-color: #e74c3c;
}

.rxsCv.has-unread .conv-name {
  font-weight: 700;
  color: #2c3e50;
}

.rxsCv.has-unread .conv-preview {
  color: #34495e;
  font-weight: 500;
}

/* Colores por plataforma - borde izquierdo */
.rxsCv.platform-whatsapp,.rxsCv.platform-whatsappo {
  border-left-color: #25D366;
}

.rxsCv.platform-whatsapp:hover,.rxsCv.platform-whatsappo:hover {
  background: linear-gradient(to right, rgba(37, 211, 102, 0.08), transparent);
}

.rxsCv.platform-whatsapp .platform-icon ,.rxsCv.platform-whatsappo .platform-icon {
  color: #25D366;
}
.platco-telegram{
  background:#0088cc;
}
.platco-whatsappo,.platco-whatsapp{
  background:#25D366;
}
.rxsCv.platform-telegram {
  border-left-color: #0088cc;
}

.rxsCv.platform-telegram:hover {
  background: linear-gradient(to right, rgba(0, 136, 204, 0.08), transparent);
}

.rxsCv.platform-telegram .platform-icon {
  color: #0088cc;
}

.rxsCv.platform-mail {
  border-left-color: #3498db;
}

.rxsCv.platform-mail:hover {
  background: linear-gradient(to right, rgba(52, 152, 219, 0.08), transparent);
}

.rxsCv.platform-mail .platform-icon {
  color: #3498db;
}

.rxsCv.platform-messenger {
  border-left-color: #0084ff;
}

.rxsCv.platform-messenger:hover {
  background: linear-gradient(to right, rgba(0, 132, 255, 0.08), transparent);
}

.rxsCv.platform-messenger .platform-icon {
  color: #0084ff;
}

.rxsCv.platform-instagram {
  border-left-color: #E1306C;
}

.rxsCv.platform-instagram:hover {
  background: linear-gradient(to right, rgba(225, 48, 108, 0.08), transparent);
}

.rxsCv.platform-instagram .platform-icon {
  color: #E1306C;
}

.rxsCv.platform-default {
  border-left-color: #9b59b6;
}

.rxsCv.platform-default:hover {
  background: linear-gradient(to right, rgba(155, 89, 182, 0.08), transparent);
}

/* Efecto hover general */
.rxsCv:hover {
  background: rgba(0, 0, 0, 0.03);
}

.rxsCv a.active {
  background: rgba(0, 123, 255, 0.1);
}

/* Dark mode para conversaciones */
.thr-dark .conv-name {
  color: #ecf0f1;
}

.thr-dark .conv-time {
  color: #7f8c8d;
}

.thr-dark .conv-preview {
  color: #95a5a6;
}

.thr-dark .rxsCv.has-unread {
  background: linear-gradient(to right, rgba(231, 76, 60, 0.15), transparent);
}

.thr-dark .rxsCv.has-unread .conv-name {
  color: #fff;
}

.thr-dark .rxsCv.has-unread .conv-preview {
  color: #bdc3c7;
}

.thr-dark .rxsCv:hover {
  background: rgba(255, 255, 255, 0.05);
}

.thr-dark .conv-avatar .platform-icon {
  background: #34495e;
}

.thr-dark .conv-agent {
  color: #95a5a6;
}

/* Sugerencias de respuesta automática */
.suggested-responses-container {
  border-top: 1px solid #e0e0e0;
  background: linear-gradient(135deg, #f5f7fa 0%, #f0f2f5 100%);
}

.suggested-responses-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.suggested-response-btn {
  flex: 0 1 auto;
  max-width: 100%;
  text-align: left;
  border-radius: 20px;
  padding: 8px 16px;
  border: 1px solid #007bff;
  background: #fff;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.suggested-response-btn:hover {
  background: #007bff;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.suggested-response-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.suggested-response-btn span {
  display: inline-block;
  max-width: 400px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.suggested-response-btn i {
  vertical-align: middle;
}

/* Modo oscuro para sugerencias */
.thr-dark .suggested-responses-container {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  border-top-color: #34495e;
}

.thr-dark .suggested-response-btn {
  background: #34495e;
  border-color: #5dade2;
  color: #ecf0f1;
}

.thr-dark .suggested-response-btn:hover {
  background: #5dade2;
  color: #fff;
  box-shadow: 0 4px 8px rgba(93, 173, 226, 0.3);
}

/* Responsive para móviles */
@media (max-width: 768px) {
  .suggested-response-btn {
    font-size: 0.85rem;
    padding: 6px 12px;
  }
  
  .suggested-response-btn span {
    max-width: 250px;
  }
}

/* Toggle switch para auto-envío */
.auto-send-toggle {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  gap: 8px;
}

.auto-send-toggle input[type="checkbox"] {
  display: none;
}

.toggle-slider {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  background-color: #ccc;
  border-radius: 24px;
  transition: background-color 0.3s ease;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.auto-send-toggle input[type="checkbox"]:checked + .toggle-slider {
  background-color: #28a745;
}

.auto-send-toggle input[type="checkbox"]:checked + .toggle-slider::before {
  transform: translateX(20px);
}

.toggle-label {
  color: #6c757d;
  font-weight: 500;
  white-space: nowrap;
}

.auto-send-toggle:hover .toggle-slider {
  opacity: 0.9;
}

/* Modo oscuro para el toggle */
.thr-dark .toggle-slider {
  background-color: #4a5568;
}

.thr-dark .auto-send-toggle input[type="checkbox"]:checked + .toggle-slider {
  background-color: #48bb78;
}

.thr-dark .toggle-label {
  color: #cbd5e0;
}

/* Responsive */
@media (max-width: 768px) {
  .toggle-label {
    font-size: 0.75rem;
  }
  
  .toggle-slider {
    width: 38px;
    height: 20px;
  }
  
  .toggle-slider::before {
    width: 14px;
    height: 14px;
  }
  
  .auto-send-toggle input[type="checkbox"]:checked + .toggle-slider::before {
    transform: translateX(18px);
  }
}

/* Chat Header Styles */
.chat-header-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.5rem;
}

.chat-header-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.5rem;
  background: rgba(0,0,0,0.03);
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: nowrap;
}

.chat-header-meta-item i {
  opacity: 0.7;
}

.chat-header-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.chat-header-date {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  color: #6c757d;
  white-space: nowrap;
}

.chat-header-date i {
  opacity: 0.6;
  font-size: 0.65rem;
}

.chat-header-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  justify-content: flex-end;
}

body.blacked .chat-header-meta-item {
  background: rgba(255,255,255,0.05);
}

@media (max-width: 768px) {
  .chat-header-meta {
    gap: 0.5rem;
  }

  .chat-header-meta-item {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
  }

  .rxsItem .d-flex.align-items-start.justify-content-between {
    flex-direction: column;
  }

  .rxsItem .d-flex.flex-column.align-items-end {
    width: 100%;
    align-items: flex-start !important;
    margin-left: 0 !important;
    margin-top: 0.75rem;
  }

  .chat-header-dates,
  .chat-header-badges {
    justify-content: flex-start;
  }
}

/* Dashboard Edit Mode - Resize & Drag */
.card-editable {
    border: 2px dashed #17a2b8 !important;
    transition: all 0.2s ease;
}
.card-editable .direct-graph{
  overflow:hidden;
}
.card-editable:hover {
    border-color: #138496 !important;
    box-shadow: 0 0 15px rgba(23, 162, 184, 0.3) !important;
}

.resize-handles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 10;
}

.resize-handle {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 80px;
    background: #17a2b8;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: ew-resize;
    opacity: 0.7;
    transition: all 0.2s ease;
    pointer-events: auto;
    border-radius: 0 8px 8px 0;
}

.resize-handle:hover {
    opacity: 1;
    width: 35px;
    box-shadow: 0 0 10px rgba(23, 162, 184, 0.5);
}

.resize-handle-left {
    left: -15px;
    border-radius: 8px 0 0 8px;
}

.resize-handle-right {
    right: -15px;
}

.resize-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    pointer-events: none;
    z-index: 11;
}

.resize-indicator .badge {
    font-size: 0.9em;
    padding: 5px 10px;
}

/* Drag state */
[draggable="true"] {
    transition: opacity 0.2s ease;
}

[draggable="true"]:active {
    cursor: grabbing !important;
}


/* nuevo claude */
/* ===== TABLA LIMPIA Y MODERNA ===== */
table.table {
  border-collapse: collapse ;
  background: transparent ;
  margin-top: 20px ;
}
body:not(.blacked) table.table thead th{
    background: #2c3e50 !important ;

}
body.blacked thead th {
    background: #21252b !important;
}
/* Encabezados con estilo sutil pero claro */
table.table thead th {
  color: #ffffff ;
  padding: 14px 12px ;
  font-weight: 600 ;
  font-size: 13px ;
  border: none ;
  text-transform: none ;
  letter-spacing: 0.3px ;
  border-bottom: 2px solid var(--rx-color1) ;
}

/* Filas con espaciado y borde sutil */
body:not(.blacked) table.table tbody tr {
  background: #ffffff ;
  border-bottom: 1px solid #e8e8e8 ;
  transition: background-color 0.2s ease ;
}

body:not(.blacked) table.table tbody tr:hover {
  background: #f5f8fc ;
}

/* Celdas con padding decente */
table.table td {
  padding: 12px ;
  border: none ;
  font-size: 13px ;
  vertical-align: middle ;
}
body:not(.blacked) table.table td{
    /*color: #333 ;*/
}
/* ===== BOTONES LIMPIOS ===== */
button.btn[href*="edit"], a[href*="view"]:not(.popupurl){
  border: none ;
  font-size: 12px ;
  font-weight: 600 ;
  cursor: pointer ;
  transition: all 0.2s ease ;
  text-decoration: none ;
}


/* Botón rojo (Eliminar) */
 .btn-delete {
  background: #e74c3c ;
  color: white ;
}

 .btn-delete:hover {
  background: #c0392b ;
  box-shadow: 0 2px 6px rgba(231, 76, 60, 0.3) ;
}


/* ===== FILTROS ===== */
input[type="text"], 
input[type="search"], 
input[type="date"],
select, 
textarea {
  border-radius: 4px ;
  padding: 8px 10px ;
  font-size: 13px ;
  transition: all 0.2s ease ;
  outline: none ;
}

input[type="text"]:focus, 
input[type="search"]:focus,
input[type="date"]:focus,
select:focus, 
textarea:focus {
  border-color: var(--rx-color1) ;
  outline: none ;
}

label {
  font-weight: 600 ;
  font-size: 14px ;
  margin-bottom: 6px ;
}
body:not(.blacked) label{
    color: #2c3e50 ;

}
body:not(.blacked) .login-register label{
    color: white ;
}
/* ===== PESTAÑAS ===== */
.nav-tabs .nav-link {
  color: #666 ;
  border: none ;
  border-bottom: 2px solid transparent ;
  padding: 12px 16px ;
  font-weight: 600 ;
  transition: all 0.2s ease ;
}



.nav-tabs .nav-link.active {
  border: none ;
  border-radius: 4px 4px 0 0 ;
}

/* ===== GENERAL ===== */
body {
  background: #f5f6f7 ;
  color: #333 ;
}

/* Mejorar scroll */
::-webkit-scrollbar {
  width: 8px ;
}

::-webkit-scrollbar-track {
  background: #f5f6f7 ;
}

::-webkit-scrollbar-thumb {
  background: #bbb ;
  border-radius: 4px ;
}

::-webkit-scrollbar-thumb:hover {
  background: #999 ;
}
.allFilters:focus-within {
    max-height: 1000px; /* O el alto que necesites para ver todo */
    overflow: visible;
}