/* ============================================= 
   VARIABLES Y ESTILOS GLOBALES
   ============================================= */
:root {
    --purple-main: #9333EA;
    --purple-dark: #7C3AED;
    --purple-light: #A855F7;
    --purple-lighter: #C084FC;
    --bg-dark: #0F0F23;
    --bg-darker: #0A0A15;
    --glass-bg: rgba(147, 51, 234, 0.1);
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0F0F23 0%, #1a0033 50%, #2d1b69 100%);
    background-attachment: fixed;
    color: white;
    overflow-x: hidden;
}

/* ============================================= 
   EFECTOS GLASS
   ============================================= */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    box-shadow: 0 8px 32px 0 rgba(147, 51, 234, 0.2);
}

.glass-input {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--glass-border) !important;
    color: white !important;
    backdrop-filter: blur(5px);
}

.glass-input:focus {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: var(--purple-light) !important;
    box-shadow: 0 0 0 0.2rem rgba(147, 51, 234, 0.25) !important;
    color: white !important;
}

.glass-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* ============================================= 
   FIX SELECTS - DROPDOWN OSCURO
   ============================================= */
.glass-input option {
    background-color: #1a1a2e !important;
    color: white !important;
    padding: 10px;
}

.glass-input option:hover,
.glass-input option:focus,
.glass-input option:checked {
    background-color: #9333EA !important;
    color: white !important;
}

select.glass-input {
    background-color: rgba(26, 26, 46, 0.95) !important;
    color: white !important;
}

select.glass-input:focus {
    background-color: rgba(26, 26, 46, 0.98) !important;
}

/* Para navegadores webkit (Chrome, Safari, Edge) */
select.glass-input option {
    background: #1a1a2e;
    color: #ffffff;
}

/* Custom select para mejor compatibilidad */
.form-control.glass-input[multiple] option,
.form-control.glass-input option {
    background-color: #1a1a2e;
    color: #ffffff;
    padding: 8px 12px;
}

.form-control.glass-input[multiple] option:checked,
.form-control.glass-input option:checked {
    background: linear-gradient(0deg, #9333EA 0%, #9333EA 100%);
    color: white;
}

/* Fix para el custom-file en masivos */
.custom-file-input:lang(es) ~ .custom-file-label::after {
    content: "Buscar";
}

/* ============================================= 
   PÁGINA DE LOGIN
   ============================================= */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.login-box {
    padding: 40px;
    animation: fadeInUp 0.5s ease;
}

.brand-logo {
    font-size: 2.5rem;
    color: var(--purple-light);
    font-weight: bold;
}

.btn-purple {
    background: linear-gradient(135deg, var(--purple-main), var(--purple-dark));
    border: none;
    color: white;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.btn-purple:hover {
    background: linear-gradient(135deg, var(--purple-dark), var(--purple-main));
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(147, 51, 234, 0.4);
    color: white;
}

/* ============================================= 
   DASHBOARD
   ============================================= */
.dashboard-page {
    padding-top: 100px;
}

.navbar {
    z-index: 1000;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--purple-light) !important;
}

.dashboard-container {
    height: calc(100vh - 100px);
    padding: 0;
}

/* ============================================= 
   SIDEBAR
   ============================================= */
.sidebar {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 0;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
}

.menu-item {
    padding: 15px 20px 15px 38px;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.menu-item i {
    margin-right: 12px;
    font-size: 1.2rem;
    min-width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.menu-item:hover {
    background: rgba(147, 51, 234, 0.2);
    border-left-color: var(--purple-light);
    color: white;
    text-decoration: none;
}

.menu-item.active {
    background: rgba(147, 51, 234, 0.3);
    border-left-color: var(--purple-light);
    color: var(--purple-lighter);
}

/* ============================================= 
   CONTENIDO PRINCIPAL
   ============================================= */
.main-content {
    height: 100%;
    overflow-y: auto;
    padding: 20px;
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* ============================================= 
   LISTA DE CHATS
   ============================================= */
.chat-list-container {
    height: calc(100vh - 110px);
    display: flex;
    flex-direction: column;
}

.chat-list-header {
    border-bottom: 1px solid var(--glass-border);
}

.chat-list {
    flex: 1;
    overflow-y: auto;
}

.chat-item {
    padding: 15px;
    border-bottom: 1px solid var(--glass-border);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-item:hover {
    background: rgba(147, 51, 234, 0.15);
}

.chat-item.active {
    background: rgba(147, 51, 234, 0.25);
    border-left: 3px solid var(--purple-light);
}

.chat-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--purple-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 1.5rem;
}

.chat-info {
    flex: 1;
    min-width: 0; /* Importante para que text-overflow funcione en flexbox */
    overflow: hidden;
}

.chat-name {
    font-weight: 600;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-last-message {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.chat-meta {
    text-align: right;
    flex-shrink: 0;
}

.chat-time {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 5px;
}

.chat-badge {
    background: var(--purple-main);
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: bold;
}

.chat-delete-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 8px;
    flex-shrink: 0;
}

.chat-delete-btn:hover {
    background: rgba(220, 38, 38, 0.25);
    color: #f87171;
}

.chat-delete-btn i {
    font-size: 0.85rem;
}

/* ============================================= 
   ÁREA DE CONVERSACIÓN
   ============================================= */
.conversation-container {
    height: calc(100vh - 110px);
    display: flex;
    flex-direction: column;
}

.no-chat-selected {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#chatContainer {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.chat-header {
    border-bottom: 1px solid var(--glass-border);
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.message {
    margin-bottom: 15px;
    display: flex;
    animation: fadeInMessage 0.3s ease;
}

.message.entrante {
    justify-content: flex-start;
}

.message.saliente {
    justify-content: flex-end;
}

.message-bubble {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 15px;
    word-wrap: break-word;
}

.message.entrante .message-bubble {
    background: rgba(255, 255, 255, 0.1);
    border-bottom-left-radius: 5px;
}

.message.saliente .message-bubble {
    background: linear-gradient(135deg, var(--purple-main), var(--purple-dark));
    border-bottom-right-radius: 5px;
}

.message-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 5px;
}

.message-time {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
}

.btn-reply {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    padding: 0 4px;
    font-size: 0.7rem;
    opacity: 0;
    transition: opacity 0.2s, color 0.2s;
}

.message-bubble:hover .btn-reply {
    opacity: 1;
}

.btn-reply:hover {
    color: var(--purple-lighter);
}

/* Highlight cuando se selecciona un mensaje para citar */
.message-highlighted .message-bubble {
    box-shadow: 0 0 0 2px var(--purple-light), 0 0 15px rgba(147, 51, 234, 0.4);
    transition: box-shadow 0.3s ease;
}

/* Preview de mensaje citado arriba del input */
.reply-preview {
    background: rgba(147, 51, 234, 0.15);
    border-left: 3px solid var(--purple-light);
    border-radius: 8px 8px 0 0;
    padding: 8px 12px;
    margin-bottom: -1px;
    animation: slideUp 0.2s ease;
}

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

.reply-preview-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.reply-preview-bar {
    width: 3px;
    height: 32px;
    background: var(--purple-light);
    border-radius: 2px;
    flex-shrink: 0;
}

.reply-preview-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.reply-preview-sender {
    display: block;
    font-weight: 600;
    color: var(--purple-lighter);
    font-size: 0.75rem;
}

.reply-preview-message {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reply-preview-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 4px 8px;
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: color 0.2s;
}

.reply-preview-close:hover {
    color: #ff6b6b;
}

.message-input-container {
    border-top: 1px solid var(--glass-border);
}

/* ============================================= 
   MODALES
   ============================================= */
.modal-content.glass {
    background: var(--bg-darker);
}

.modal-header {
    border-bottom-color: var(--glass-border);
}

.modal-footer {
    border-top-color: var(--glass-border);
}

/* ============================================= 
   TABLAS
   ============================================= */
.table-glass {
    background: rgba(255, 255, 255, 0.02);
    color: white;
}

.table-glass th {
    border-color: var(--glass-border);
    color: var(--purple-lighter);
    font-weight: 600;
}

.table-glass td {
    border-color: var(--glass-border);
}

.table-glass tbody tr:hover {
    background: rgba(147, 51, 234, 0.1);
}

/* ============================================= 
   TARJETAS
   ============================================= */
.card-glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.card-glass:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(147, 51, 234, 0.3);
}

/* Sesión con error de proxy - Tarjeta roja */
.card-glass.session-error-proxy {
    background: rgba(220, 53, 69, 0.2);
    border: 2px solid rgba(220, 53, 69, 0.8);
    box-shadow: 0 0 15px rgba(220, 53, 69, 0.4);
}

.card-glass.session-error-proxy:hover {
    box-shadow: 0 10px 30px rgba(220, 53, 69, 0.5);
}

/* Lista de contactos masivos */
.lista-item {
    background: rgba(147, 51, 234, 0.1);
    border: 1px solid rgba(147, 51, 234, 0.3);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.lista-item:hover {
    background: rgba(147, 51, 234, 0.2);
    border-color: rgba(147, 51, 234, 0.5);
}

/* ============================================= 
   BADGES Y ETIQUETAS
   ============================================= */
.badge-purple {
    background: var(--purple-main);
    color: white;
}

.badge-success {
    background: #10B981;
}

.badge-danger {
    background: #EF4444;
}

.badge-warning {
    background: #F59E0B;
}

/* ============================================= 
   ANIMACIONES
   ============================================= */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

/* ============================================= 
   SCROLLBARS PERSONALIZADOS
   ============================================= */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
    background: var(--purple-main);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--purple-dark);
}

/* ============================================= 
   RESPONSIVE
   ============================================= */
@media (max-width: 991px) {
    .sidebar {
        display: none;
    }
    
    .main-content {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
    }
    
    .message-bubble {
        max-width: 85%;
    }
    
    /* Menú móvil en navbar */
    .mobile-menu {
        width: 100%;
        padding: 10px 0;
        border-bottom: 1px solid var(--glass-border);
        margin-bottom: 10px;
    }
    
    .mobile-menu-item {
        padding: 12px 15px !important;
        border-radius: 8px;
        margin: 2px 0;
        transition: all 0.3s ease;
    }
    
    .mobile-menu-item:hover {
        background: rgba(147, 51, 234, 0.2);
    }
    
    .mobile-menu-item.active {
        background: rgba(147, 51, 234, 0.3);
        color: var(--purple-lighter) !important;
    }
    
    .mobile-menu-item i {
        width: 25px;
        margin-right: 10px;
    }
    
    .mobile-divider {
        border-top: 1px solid var(--glass-border);
        margin: 10px 0;
    }
    
    /* Separador WordPress en móvil */
    .mobile-separator-text {
        display: block;
        padding: 5px 15px;
        font-size: 10px;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.4);
        letter-spacing: 1px;
        font-weight: 600;
    }
    
    /* Navbar collapse background */
    #navbarNav {
        background: rgba(15, 15, 35, 0.95);
        backdrop-filter: blur(10px);
        border-radius: 0 0 15px 15px;
        padding: 15px;
        margin-top: 10px;
        max-height: 80vh;
        overflow-y: auto;
    }
    
    /* Dashboard container ajuste */
    .dashboard-container {
        height: auto;
        min-height: calc(100vh - 70px);
    }
}

@media (max-width: 768px) {
    /* ========================================
       SISTEMA DE PESTAÑAS MÓVIL PARA CHATS
       ======================================== */
    
    /* Mostrar las pestañas en móvil */
    .mobile-chat-tabs {
        display: flex !important;
        background: rgba(15, 15, 35, 0.98);
        border-bottom: 2px solid var(--purple-main);
        position: sticky;
        top: 0;
        z-index: 100;
    }
    
    .mobile-tab {
        flex: 1;
        padding: 12px 15px;
        background: transparent;
        border: none;
        color: rgba(255, 255, 255, 0.6);
        font-size: 0.9rem;
        font-weight: 600;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        cursor: pointer;
        transition: all 0.3s ease;
        position: relative;
    }
    
    .mobile-tab i {
        font-size: 1.1rem;
    }
    
    .mobile-tab:hover {
        color: rgba(255, 255, 255, 0.8);
        background: rgba(147, 51, 234, 0.1);
    }
    
    .mobile-tab.active {
        color: white;
        background: rgba(147, 51, 234, 0.2);
    }
    
    .mobile-tab.active::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, var(--purple-main), var(--purple-light));
        border-radius: 3px 3px 0 0;
    }
    
    /* Badge de notificación en pestaña */
    .tab-badge {
        background: #ef4444;
        color: white;
        font-size: 0.7rem;
        padding: 2px 6px;
        border-radius: 10px;
        min-width: 18px;
        text-align: center;
    }
    
    /* Indicador de chat activo en pestaña conversación */
    .mobile-tab.has-chat::after {
        content: '';
        position: absolute;
        top: 8px;
        right: 15%;
        width: 8px;
        height: 8px;
        background: #10b981;
        border-radius: 50%;
        animation: pulse-dot 2s infinite;
    }
    
    @keyframes pulse-dot {
        0%, 100% { opacity: 1; transform: scale(1); }
        50% { opacity: 0.7; transform: scale(1.2); }
    }
    
    /* Sección Chats responsive - altura completa */
    #chatsSection {
        height: calc(100vh - 70px);
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
    
    #chatsSection .row {
        flex: 1;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        min-height: 0;
    }
    
    #chatsSection .row.h-100 {
        height: 100% !important;
    }
    
    /* PANEL DE LISTA DE CHATS */
    #chatsSection .chat-list-container {
        display: none;
        flex-direction: column;
        flex: 1;
        max-width: 100%;
        height: 100%;
        overflow: hidden;
    }
    
    #chatsSection .chat-list-container.mobile-active {
        display: flex !important;
    }
    
    #chatsSection .chat-list-container .chat-list {
        flex: 1;
        overflow-y: auto;
    }
    
    /* PANEL DE CONVERSACIÓN */
    #chatsSection .conversation-container {
        display: none !important;
        flex-direction: column;
        flex: 1;
        max-width: 100%;
        height: 100%;
        overflow: hidden;
    }
    
    #chatsSection .conversation-container.mobile-active {
        display: flex !important;
    }
    
    /* #chatContainer altura completa */
    #chatContainer {
        height: 100%;
        display: flex;
        flex-direction: column;
        flex: 1;
        min-height: 0;
        overflow: hidden;
    }
    
    /* Header del chat - no se encoge */
    .conversation-container .chat-header {
        flex-shrink: 0;
        padding: 10px 15px !important;
    }
    
    /* Botón de volver en header del chat móvil */
    .mobile-back-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        background: rgba(147, 51, 234, 0.3);
        border: none;
        border-radius: 50%;
        color: white;
        margin-right: 10px;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .mobile-back-btn:hover {
        background: var(--purple-main);
    }
    
    /* Contenedor de mensajes con scroll */
    .conversation-container .messages-container {
        flex: 1;
        overflow-y: auto;
        min-height: 0;
        padding: 15px;
    }
    
    /* Indicador de presencia del operador */
    .conversation-container #operadorPresenciaContainer {
        flex-shrink: 0;
    }
    
    /* Aviso de modo bot */
    .conversation-container .mode-bot-aviso {
        flex-shrink: 0;
    }
    
    /* ========================================
       INPUT SIEMPRE VISIBLE EN MÓVIL
       ======================================== */
    .conversation-container .message-input-container {
        flex-shrink: 0 !important;
        background: rgba(10, 10, 21, 0.98);
        z-index: 100;
        padding: 10px !important;
        border-top: 1px solid var(--glass-border);
    }
    
    .conversation-container .message-input-container .input-group {
        display: flex !important;
        flex-wrap: nowrap;
    }
    
    .conversation-container .message-input-container #messageInput {
        flex: 1;
        min-width: 0;
        height: 44px;
        font-size: 16px; /* Previene zoom en iOS */
    }
    
    .conversation-container .message-input-container .btn {
        flex-shrink: 0;
        height: 44px;
        min-width: 44px;
    }
    
    /* Selector de plantillas compacto */
    .conversation-container .plantilla-selector-container {
        padding: 5px 0;
        flex-shrink: 0;
    }
    
    .conversation-container .plantilla-selector-container select {
        font-size: 0.85rem;
        max-width: 150px;
    }
    
    /* Form de mensaje */
    .conversation-container .message-input-container form {
        width: 100%;
    }
    
    /* Contenedor de archivos clip */
    .conversation-container .clip-files-container {
        flex-shrink: 0;
        max-height: 150px;
        overflow-y: auto;
    }
    
    /* Grabador de audio */
    .conversation-container .audio-recorder-container {
        flex-shrink: 0;
    }
    
    /* No chat selected en móvil */
    #noChatSelected {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
}

/* ============================================= 
   UTILIDADES
   ============================================= */
.text-purple {
    color: var(--purple-light) !important;
}

.bg-purple {
    background: var(--purple-main) !important;
}

.border-purple {
    border-color: var(--purple-light) !important;
}

hr {
    border-top-color: var(--glass-border);
}

/* ============================================= 
   CUSTOM SWITCHES
   ============================================= */
.custom-switch .custom-control-label::before {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: var(--glass-border);
}

.custom-switch .custom-control-input:checked~.custom-control-label::before {
    background-color: var(--purple-main);
    border-color: var(--purple-main);
}

/* ============================================= 
   PANEL DE CONTROLES DEL BOT
   ============================================= */
.bot-controls-panel {
    background: rgba(147, 51, 234, 0.15);
    border-top: 1px solid var(--glass-border);
    animation: fadeIn 0.3s ease;
}

.bot-controls-panel .form-control-sm {
    font-size: 0.85rem;
    padding: 0.375rem 0.75rem;
}

.chat-mode-indicator .badge {
    padding: 8px 12px;
    font-size: 0.85rem;
}

/* Icono de modo en la lista de chats */
.chat-name i {
    margin-left: 5px;
    font-size: 0.85rem;
}

/* Mensaje de error de audio */
.message .text-warning {
    color: #F59E0B !important;
    font-style: italic;
}

/* Badge de audio en prompts */
.badge-info {
    background: #06B6D4;
    color: white;
}

/* Modal Nueva Sesión - Configuración del Bot */
#sessionBotSelectionContainer {
    animation: fadeIn 0.2s ease;
}

#sessionBotInfo {
    display: block;
    margin-top: 5px;
}

/* ============================================= 
   SECCIÓN MASIVOS
   ============================================= */

/* Botón outline purple */
.btn-outline-purple {
    color: var(--purple-light);
    border-color: var(--purple-light);
    background: transparent;
}

.btn-outline-purple:hover,
.btn-outline-purple.active {
    background: var(--purple-main);
    border-color: var(--purple-main);
    color: white;
}

/* Botón neon play */
.btn-neon-play {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    border: none;
    color: white;
    position: relative;
    overflow: hidden;
    animation: neon-glow 2s infinite;
}

.btn-neon-play:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.6);
}

.btn-neon-play:disabled {
    background: #6c757d;
    animation: none;
}

@keyframes neon-glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(16, 185, 129, 0.4),
                    0 0 10px rgba(16, 185, 129, 0.3),
                    0 0 15px rgba(16, 185, 129, 0.2);
    }
    50% {
        box-shadow: 0 0 10px rgba(16, 185, 129, 0.6),
                    0 0 20px rgba(16, 185, 129, 0.4),
                    0 0 30px rgba(16, 185, 129, 0.3);
    }
}

/* Botón stop */
.btn-stop {
    animation: pulse-danger 1s infinite;
}

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

/* Archivo item */
.archivo-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.archivo-item:hover {
    background: rgba(147, 51, 234, 0.1);
}

/* Campaña item */
.campania-item {
    transition: all 0.3s ease;
}

.campania-item:hover {
    transform: translateX(5px);
}

/* Custom file input */
.custom-file-label.glass-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: rgba(255, 255, 255, 0.7);
}

.custom-file-label.glass-input::after {
    background: var(--purple-main);
    color: white;
    border: none;
}

/* Progress bar personalizado */
.progress {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.progress-bar {
    border-radius: 10px;
    transition: width 0.3s ease;
}

/* SweetAlert2 personalizado */
.swal2-popup {
    background: var(--bg-darker) !important;
    border: 1px solid var(--glass-border);
}

.swal2-title {
    color: white !important;
}

.swal2-html-container {
    color: rgba(255, 255, 255, 0.8) !important;
}

.swal2-confirm {
    background: linear-gradient(135deg, var(--purple-main), var(--purple-dark)) !important;
}

/* Text purple */
.text-purple {
    color: var(--purple-light) !important;
}

/* Badge en contador */
#contadorCaracteres {
    font-size: 0.75rem;
    padding: 3px 8px;
}

/* Responsive masivos */
@media (max-width: 992px) {
    #masivosSection .col-md-6 {
        margin-bottom: 20px;
    }
}

/* ============================================= 
   SECCIÓN DASHBOARD - PÁGINA DE INICIO
   ============================================= */

.dashboard-welcome-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Título neón animado */
.neon-title-container {
    text-align: center;
    margin-bottom: 50px;
    padding: 30px;
}

.neon-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.neon-text {
    font-size: 3.5rem;
    font-weight: 900;
    background: linear-gradient(90deg, #a855f7, #d946ef, #c084fc, #a855f7);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: neon-flow 3s ease-in-out infinite, neon-pulse 2s ease-in-out infinite;
    text-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
    filter: drop-shadow(0 0 20px rgba(168, 85, 247, 0.8)) 
            drop-shadow(0 0 40px rgba(192, 132, 252, 0.6))
            drop-shadow(0 0 60px rgba(217, 70, 239, 0.4));
    letter-spacing: 2px;
}

.neon-subtitle {
    font-size: 2rem;
    font-weight: 600;
    color: #e879f9;
    text-shadow: 0 0 10px rgba(232, 121, 249, 0.8),
                 0 0 20px rgba(232, 121, 249, 0.6),
                 0 0 30px rgba(232, 121, 249, 0.4),
                 0 0 40px rgba(168, 85, 247, 0.3);
    animation: subtitle-glow 2s ease-in-out infinite alternate;
}

@keyframes neon-flow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes neon-pulse {
    0%, 100% {
        filter: drop-shadow(0 0 20px rgba(168, 85, 247, 0.8)) 
                drop-shadow(0 0 40px rgba(192, 132, 252, 0.6))
                drop-shadow(0 0 60px rgba(217, 70, 239, 0.4));
    }
    50% {
        filter: drop-shadow(0 0 30px rgba(168, 85, 247, 1)) 
                drop-shadow(0 0 60px rgba(192, 132, 252, 0.8))
                drop-shadow(0 0 90px rgba(217, 70, 239, 0.6));
    }
}

@keyframes subtitle-glow {
    0% {
        text-shadow: 0 0 10px rgba(232, 121, 249, 0.8),
                     0 0 20px rgba(232, 121, 249, 0.6),
                     0 0 30px rgba(232, 121, 249, 0.4);
    }
    100% {
        text-shadow: 0 0 15px rgba(232, 121, 249, 1),
                     0 0 30px rgba(232, 121, 249, 0.8),
                     0 0 45px rgba(232, 121, 249, 0.6),
                     0 0 60px rgba(168, 85, 247, 0.4);
    }
}

/* Tarjetas de pasos */
.steps-container {
    margin-bottom: 40px;
}

.step-card {
    padding: 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.step-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(147, 51, 234, 0.4);
}

.step-emoji {
    font-size: 4rem;
    margin-bottom: 15px;
    animation: bounce-emoji 2s ease-in-out infinite;
}

.step-card:nth-child(1) .step-emoji { animation-delay: 0s; }
.step-card:nth-child(2) .step-emoji { animation-delay: 0.3s; }
.step-card:nth-child(3) .step-emoji { animation-delay: 0.6s; }

@keyframes bounce-emoji {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.step-number {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, var(--purple-main), var(--purple-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(147, 51, 234, 0.5);
}

.step-title {
    color: var(--purple-lighter);
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.step-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Mensaje de bienvenida */
.welcome-message {
    text-align: center;
    padding: 40px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.welcome-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--purple-light), transparent);
}

.welcome-icon {
    font-size: 3rem;
    color: var(--purple-light);
    margin-bottom: 20px;
    animation: rocket-float 3s ease-in-out infinite;
}

@keyframes rocket-float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-5px) rotate(5deg); }
    75% { transform: translateY(-5px) rotate(-5deg); }
}

.welcome-message h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.welcome-text {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto 25px;
}

.welcome-text .highlight {
    color: var(--purple-lighter);
    font-weight: 600;
    position: relative;
}

.welcome-text .highlight::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--purple-light);
    animation: underline-pulse 2s ease-in-out infinite;
}

@keyframes underline-pulse {
    0%, 100% { opacity: 0.5; transform: scaleX(0.8); }
    50% { opacity: 1; transform: scaleX(1); }
}

.welcome-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
}

.feature-badge {
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.3), rgba(192, 132, 252, 0.2));
    border: 1px solid rgba(192, 132, 252, 0.4);
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.feature-badge:hover {
    transform: scale(1.05);
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.5), rgba(192, 132, 252, 0.4));
    box-shadow: 0 5px 20px rgba(147, 51, 234, 0.3);
}

.feature-badge i {
    color: var(--purple-lighter);
}

/* ============================================= 
   EFECTOS DE LUZ NEÓN EN MOVIMIENTO
   ============================================= */

/* Contenedor de efectos neón */
.neon-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

/* Contenedor de líneas neón */
.neon-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Líneas de neón animadas */
.neon-line {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent, 
        #a855f7, 
        #d946ef, 
        #a855f7, 
        transparent
    );
    box-shadow: 
        0 0 10px #a855f7,
        0 0 20px #a855f7,
        0 0 40px #d946ef,
        0 0 80px #d946ef;
    animation: neon-line-move linear infinite;
    opacity: 0.6;
}

.neon-line-1 {
    top: 15%;
    width: 200px;
    animation-duration: 8s;
    animation-delay: 0s;
}

.neon-line-2 {
    top: 35%;
    width: 150px;
    animation-duration: 12s;
    animation-delay: -2s;
    background: linear-gradient(90deg, 
        transparent, 
        #06b6d4, 
        #22d3ee, 
        #06b6d4, 
        transparent
    );
    box-shadow: 
        0 0 10px #06b6d4,
        0 0 20px #06b6d4,
        0 0 40px #22d3ee,
        0 0 80px #22d3ee;
}

.neon-line-3 {
    top: 55%;
    width: 180px;
    animation-duration: 10s;
    animation-delay: -4s;
}

.neon-line-4 {
    top: 75%;
    width: 120px;
    animation-duration: 15s;
    animation-delay: -6s;
    background: linear-gradient(90deg, 
        transparent, 
        #10b981, 
        #34d399, 
        #10b981, 
        transparent
    );
    box-shadow: 
        0 0 10px #10b981,
        0 0 20px #10b981,
        0 0 40px #34d399,
        0 0 80px #34d399;
}

.neon-line-5 {
    top: 90%;
    width: 160px;
    animation-duration: 9s;
    animation-delay: -1s;
}

@keyframes neon-line-move {
    0% {
        left: -250px;
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        left: 100%;
        opacity: 0;
    }
}

/* Orbes de luz flotantes */
.neon-orbs {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.neon-orb {
    position: absolute;
    border-radius: 50%;
    animation: neon-orb-float ease-in-out infinite;
    filter: blur(1px);
}

.neon-orb-1 {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    background: radial-gradient(circle, 
        rgba(168, 85, 247, 0.4) 0%, 
        rgba(168, 85, 247, 0.1) 50%, 
        transparent 70%
    );
    box-shadow: 
        0 0 30px rgba(168, 85, 247, 0.5),
        0 0 60px rgba(168, 85, 247, 0.3),
        0 0 100px rgba(168, 85, 247, 0.2);
    animation-duration: 6s;
}

.neon-orb-2 {
    width: 60px;
    height: 60px;
    top: 60%;
    left: 80%;
    background: radial-gradient(circle, 
        rgba(6, 182, 212, 0.4) 0%, 
        rgba(6, 182, 212, 0.1) 50%, 
        transparent 70%
    );
    box-shadow: 
        0 0 30px rgba(6, 182, 212, 0.5),
        0 0 60px rgba(6, 182, 212, 0.3),
        0 0 100px rgba(6, 182, 212, 0.2);
    animation-duration: 8s;
    animation-delay: -2s;
}

.neon-orb-3 {
    width: 100px;
    height: 100px;
    top: 40%;
    left: 50%;
    background: radial-gradient(circle, 
        rgba(217, 70, 239, 0.3) 0%, 
        rgba(217, 70, 239, 0.1) 50%, 
        transparent 70%
    );
    box-shadow: 
        0 0 40px rgba(217, 70, 239, 0.4),
        0 0 80px rgba(217, 70, 239, 0.2),
        0 0 120px rgba(217, 70, 239, 0.1);
    animation-duration: 10s;
    animation-delay: -4s;
}

.neon-orb-4 {
    width: 50px;
    height: 50px;
    top: 80%;
    left: 25%;
    background: radial-gradient(circle, 
        rgba(16, 185, 129, 0.4) 0%, 
        rgba(16, 185, 129, 0.1) 50%, 
        transparent 70%
    );
    box-shadow: 
        0 0 25px rgba(16, 185, 129, 0.5),
        0 0 50px rgba(16, 185, 129, 0.3),
        0 0 80px rgba(16, 185, 129, 0.2);
    animation-duration: 7s;
    animation-delay: -1s;
}

.neon-orb-5 {
    width: 70px;
    height: 70px;
    top: 10%;
    left: 70%;
    background: radial-gradient(circle, 
        rgba(236, 72, 153, 0.4) 0%, 
        rgba(236, 72, 153, 0.1) 50%, 
        transparent 70%
    );
    box-shadow: 
        0 0 30px rgba(236, 72, 153, 0.5),
        0 0 60px rgba(236, 72, 153, 0.3),
        0 0 100px rgba(236, 72, 153, 0.2);
    animation-duration: 9s;
    animation-delay: -3s;
}

.neon-orb-6 {
    width: 40px;
    height: 40px;
    top: 50%;
    left: 5%;
    background: radial-gradient(circle, 
        rgba(251, 191, 36, 0.4) 0%, 
        rgba(251, 191, 36, 0.1) 50%, 
        transparent 70%
    );
    box-shadow: 
        0 0 20px rgba(251, 191, 36, 0.5),
        0 0 40px rgba(251, 191, 36, 0.3),
        0 0 70px rgba(251, 191, 36, 0.2);
    animation-duration: 11s;
    animation-delay: -5s;
}

@keyframes neon-orb-float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.5;
    }
    25% {
        transform: translate(30px, -20px) scale(1.1);
        opacity: 0.7;
    }
    50% {
        transform: translate(10px, 20px) scale(0.9);
        opacity: 0.4;
    }
    75% {
        transform: translate(-20px, 10px) scale(1.05);
        opacity: 0.6;
    }
}

/* Efecto de pulso neón en el fondo */
@keyframes neon-bg-pulse {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* ========== FIN EFECTOS NEÓN ========== */

/* Responsive para dashboard */
@media (max-width: 768px) {
    .neon-text {
        font-size: 2rem;
    }
    
    .neon-subtitle {
        font-size: 1.3rem;
    }
    
    .step-card {
        min-height: auto;
        padding: 20px;
    }
    
    .step-emoji {
        font-size: 3rem;
    }
    
    /* Responsive efectos neón */
    .neon-line {
        height: 1px;
    }
    
    .neon-orb {
        transform: scale(0.6);
    }
}

/* ============================================= 
   CLIP DE ARCHIVOS - BARRA DE CARGA
   ============================================= */

.clip-files-container {
    background: rgba(147, 51, 234, 0.15);
    border: 1px solid rgba(147, 51, 234, 0.3);
    border-radius: 12px;
    padding: 15px;
    margin-top: 10px;
    animation: fadeIn 0.3s ease;
}

.clip-files-header {
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.clip-files-list {
    max-height: 200px;
    overflow-y: auto;
    padding: 10px 0;
}

/* Item de archivo individual */
.clip-file-item {
    display: flex;
    align-items: center;
    padding: 10px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.clip-file-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.clip-file-item.uploading {
    border-color: rgba(147, 51, 234, 0.5);
}

.clip-file-item.success {
    border-color: rgba(16, 185, 129, 0.5);
    background: rgba(16, 185, 129, 0.1);
}

.clip-file-item.error {
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.1);
}

/* Icono del archivo */
.clip-file-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(147, 51, 234, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    margin-right: 12px;
    flex-shrink: 0;
}

.clip-file-icon.image { background: rgba(59, 130, 246, 0.3); }
.clip-file-icon.video { background: rgba(239, 68, 68, 0.3); }
.clip-file-icon.audio { background: rgba(16, 185, 129, 0.3); }
.clip-file-icon.document { background: rgba(245, 158, 11, 0.3); }

/* Info del archivo */
.clip-file-info {
    flex: 1;
    min-width: 0;
}

.clip-file-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.clip-file-size {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Barra de progreso */
.clip-file-progress {
    margin-top: 6px;
}

.clip-progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.clip-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #9333EA, #A855F7);
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease;
}

.clip-file-item.success .clip-progress-fill {
    background: linear-gradient(90deg, #10B981, #059669);
    width: 100%;
}

.clip-file-item.error .clip-progress-fill {
    background: linear-gradient(90deg, #EF4444, #DC2626);
}

/* Estado del archivo */
.clip-file-status {
    margin-left: 10px;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.clip-file-status .fa-spinner {
    color: #A855F7;
}

.clip-file-status .fa-check-circle {
    color: #10B981;
}

.clip-file-status .fa-times-circle {
    color: #EF4444;
}

/* Botón eliminar archivo */
.clip-file-remove {
    margin-left: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.2);
    border: none;
    color: #EF4444;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.clip-file-remove:hover {
    background: #EF4444;
    color: white;
}

/* Footer del contenedor */
.clip-files-footer {
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#clipFilesInfo {
    color: rgba(255, 255, 255, 0.7);
}

#btnEnviarClipFiles {
    transition: all 0.3s ease;
}

#btnEnviarClipFiles:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#btnEnviarClipFiles:not(:disabled) {
    animation: btn-pulse-green 2s infinite;
}

/* Preview de imagen */
.clip-file-preview {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 12px;
    flex-shrink: 0;
}

/* Mensaje de error */
.clip-file-error-msg {
    font-size: 0.75rem;
    color: #EF4444;
    margin-top: 4px;
}

/* ============================================= 
   INDICADORES DE PRESENCIA (ESCRIBIENDO/GRABANDO)
   ============================================= */

/* Indicador de presencia del cliente en el header del chat */
.presencia-indicator {
    margin-top: 4px;
    font-size: 0.75rem;
}

/* Indicador de escritura */
.typing-indicator {
    color: #4ade80;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    animation: fadeIn 0.3s ease;
}

.typing-indicator i {
    animation: typing-bounce 0.5s ease-in-out infinite;
}

.typing-dots {
    display: inline-flex;
    gap: 2px;
}

.typing-dots span {
    animation: typing-dot 1.4s ease-in-out infinite;
    opacity: 0;
}

.typing-dots span:nth-child(1) { animation-delay: 0s; }
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-dot {
    0%, 60%, 100% { opacity: 0; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-3px); }
}

@keyframes typing-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

/* Indicador de grabación */
.recording-indicator {
    color: #f87171;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    animation: fadeIn 0.3s ease;
}

.recording-indicator i {
    animation: recording-pulse-icon 1s ease-in-out infinite;
}

.recording-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f87171;
    animation: recording-pulse-dot 1s ease-in-out infinite;
}

@keyframes recording-pulse-icon {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
}

@keyframes recording-pulse-dot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
}

/* Indicador en la lista de chats */
.chat-item .chat-presencia {
    font-size: 0.7rem;
    margin-top: 2px;
}

.chat-item .chat-presencia-typing {
    color: #4ade80;
}

.chat-item .chat-presencia-recording {
    color: #f87171;
}

.chat-item .chat-presencia i {
    margin-right: 3px;
}

/* Estado del operador (referencia visual) */
.operador-presencia-container {
    padding: 5px 15px;
    background: rgba(147, 51, 234, 0.1);
    border-top: 1px solid var(--glass-border);
    font-size: 0.75rem;
}

.operador-typing-status,
.operador-recording-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* ============================================= 
   GRABADOR DE AUDIO
   ============================================= */

.btn-record {
    position: relative;
    transition: all 0.3s ease;
}

.btn-record.recording {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    animation: recording-btn-pulse 1s ease-in-out infinite;
}

@keyframes recording-btn-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
}

.audio-recorder-container {
    padding: 10px 15px;
    background: rgba(239, 68, 68, 0.15);
    border-radius: 10px;
    margin-top: 10px;
    animation: fadeIn 0.3s ease;
}

.recording-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #f87171;
    font-weight: 600;
}

.recording-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ef4444;
    animation: recording-dot-blink 1s ease-in-out infinite;
}

@keyframes recording-dot-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.recording-controls {
    display: flex;
    gap: 10px;
}

.recording-controls .btn {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* Indicador de presencia en item de chat de la lista */
.chat-item-presencia {
    font-size: 0.7rem;
    margin-top: 3px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.chat-item-presencia.typing {
    color: #4ade80;
}

.chat-item-presencia.recording {
    color: #f87171;
}

.chat-item-presencia .dots {
    display: inline-flex;
    gap: 1px;
}

.chat-item-presencia .dots span {
    animation: typing-dot 1.4s ease-in-out infinite;
    opacity: 0;
}

.chat-item-presencia .dots span:nth-child(1) { animation-delay: 0s; }
.chat-item-presencia .dots span:nth-child(2) { animation-delay: 0.2s; }
.chat-item-presencia .dots span:nth-child(3) { animation-delay: 0.4s; }

/* ============================================= 
   INPUT DE MENSAJE - AJUSTE DE ALTURA
   ============================================= */

/* Contenedor del input de mensaje */
.message-input-container .input-group {
    align-items: stretch;
}

/* Input de mensaje con altura igual a los botones */
.message-input-container #messageInput {
    height: 44px;
    padding: 10px 15px;
    font-size: 0.95rem;
    border-radius: 0;
}

/* Botones del input-group con altura fija */
.message-input-container .input-group .btn {
    height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
}

/* Botón de clip (prepend) */
.message-input-container .input-group-prepend .btn {
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* Botones de grabar y enviar (append) */
.message-input-container .input-group-append .btn:first-child {
    border-radius: 0;
}

.message-input-container .input-group-append .btn:last-child {
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* ============================================= 
   SECCIÓN RECORDATORIOS
   ============================================= */

/* Bloque de recordatorio */
.bloque-recordatorio {
    border-left: 3px solid var(--purple-main);
    transition: all 0.3s ease;
}

.bloque-recordatorio:hover {
    border-left-color: var(--purple-light);
    box-shadow: 0 5px 20px rgba(147, 51, 234, 0.2);
}

/* Lista de archivos del bloque */
.lista-archivos-bloque {
    max-height: 200px;
    overflow-y: auto;
    padding: 5px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.lista-archivos-bloque .archivo-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 5px;
}

/* Badge de estado activo con animación */
.recordatorio-activo {
    animation: pulse-success 2s infinite;
}

@keyframes pulse-success {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
}

/* Botón play con efecto neón mejorado para recordatorios */
.btn-neon-play {
    position: relative;
    overflow: hidden;
}

.btn-neon-play::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to right,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) rotate(45deg);
    }
}

/* Contenedor de bloques scrolleable */
#bloquesRecordatorioContainer {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

/* Fix para el modal XL de recordatorios */
.modal-xl {
    max-width: 1140px;
}

@media (max-width: 1200px) {
    .modal-xl {
        max-width: 90%;
    }
}

/* Indicador de bloque activo */
.bloque-activo {
    border-left-color: #10B981 !important;
    background: rgba(16, 185, 129, 0.1) !important;
}

/* Archivo nombre input más compacto */
.archivo-nombre-personalizado {
    font-size: 0.85rem !important;
    padding: 0.25rem 0.5rem !important;
}

/* ============================================= 
   SWITCH BOT/HUMANO
   ============================================= */

.chat-mode-switch-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ============================================= 
   SWITCH DEL HEADER - ICONOS AFUERA
   ============================================= */

.header-switch-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

/* Texto dinámico arriba del switch del header */
.header-mode-text {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.header-mode-text.bot {
    color: #10b981;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
}

.header-mode-text.humano {
    color: #8b5cf6;
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.6);
}

/* Contenedor del switch con iconos - header */
.header-switch-icons {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Iconos del header */
.header-icon-left,
.header-icon-right {
    font-size: 1rem;
    transition: all 0.3s ease;
    opacity: 0.4;
}

.header-icon-left.active {
    color: #8b5cf6;
    opacity: 1;
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.8);
    transform: scale(1.1);
}

.header-icon-right.active {
    color: #10b981;
    opacity: 1;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.8);
    transform: scale(1.1);
}

/* Switch del header - solo slider */
.header-mode-switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 28px;
    cursor: pointer;
    margin: 0;
}

.header-mode-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* Slider del header limpio */
.header-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(99, 102, 241, 0.4);
}

.header-slider::before {
    content: '';
    position: absolute;
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* Header switch - Modo BOT (checked) */
.header-mode-switch input:checked + .header-slider {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.4);
}

.header-mode-switch input:checked + .header-slider::before {
    transform: translateX(28px);
}

/* Hover en header switch */
.header-mode-switch:hover .header-slider {
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.5);
}

.header-mode-switch input:checked:hover + .header-slider {
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.5);
}

/* Aviso de modo Bot */
.mode-bot-aviso {
    border-top: 1px solid var(--glass-border);
    background: rgba(16, 185, 129, 0.1);
}

.mode-bot-aviso .alert {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #fff;
}

.mode-bot-aviso .alert i {
    color: #10b981;
}

/* Switch en lista de chats */
.chat-item-mode-switch {
    margin-top: 5px;
}

.chat-item-mode-switch .mode-switch {
    width: 90px;
    height: 26px;
}

.chat-item-mode-switch .mode-slider::before {
    height: 20px;
    width: 42px;
    left: 3px;
    bottom: 3px;
}

.chat-item-mode-switch .mode-switch input:checked + .mode-slider::before {
    transform: translateX(42px);
}

.chat-item-mode-switch .mode-label {
    font-size: 0.6rem;
}

.chat-item-mode-switch .mode-label.mode-bot {
    right: 8px;
}

.chat-item-mode-switch .mode-label.mode-humano {
    left: 6px;
}

.chat-item-mode-switch .mode-label i {
    font-size: 0.55rem;
}

/* Badge de modo en lista de chats */
.chat-mode-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
}

.chat-mode-badge.bot {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.chat-mode-badge.humano {
    background: rgba(99, 102, 241, 0.2);
    color: #8b5cf6;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

/* Animación para el cambio de modo */
@keyframes modeChange {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.mode-switch.changing .mode-slider {
    animation: modeChange 0.3s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .mode-switch {
        width: 110px;
        height: 32px;
    }
    
    .mode-slider::before {
        height: 24px;
        width: 52px;
    }
    
    .mode-switch input:checked + .mode-slider::before {
        transform: translateX(52px);
    }
    
    .mode-label {
        font-size: 0.65rem;
    }
}

/* ============================================= 
   MINI SWITCH PARA LISTA DE CHATS
   ============================================= */

.chat-item-switch {
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

/* Texto dinámico arriba del switch */
.switch-mode-text {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    margin-right: 2px;
}

.switch-mode-text.bot {
    color: #10b981;
    text-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.switch-mode-text.humano {
    color: #8b5cf6;
    text-shadow: 0 0 8px rgba(139, 92, 246, 0.5);
}

/* Contenedor del switch con iconos */
.switch-with-icons {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Iconos a los lados */
.switch-icon-left,
.switch-icon-right {
    font-size: 0.75rem;
    transition: all 0.3s ease;
    opacity: 0.4;
}

.switch-icon-left.active {
    color: #8b5cf6;
    opacity: 1;
    text-shadow: 0 0 8px rgba(139, 92, 246, 0.6);
}

.switch-icon-right.active {
    color: #10b981;
    opacity: 1;
    text-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

/* Mini switch - solo slider */
.mini-mode-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
    cursor: pointer;
    margin: 0;
}

.mini-mode-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* Mini slider limpio */
.mini-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.mini-slider::before {
    content: '';
    position: absolute;
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Mini switch - Modo BOT (checked) */
.mini-mode-switch input:checked + .mini-slider {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.mini-mode-switch input:checked + .mini-slider::before {
    transform: translateX(22px);
}

/* Hover en mini switch */
.mini-mode-switch:hover .mini-slider {
    box-shadow: 0 3px 12px rgba(99, 102, 241, 0.5);
}

.mini-mode-switch input:checked:hover + .mini-slider {
    box-shadow: 0 3px 12px rgba(16, 185, 129, 0.5);
}

/* ============================================= 
   ORGANIZADOR DE CHATS
   ============================================= */

/* Pestañas del organizador */
.nav-tabs-organizador {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-tabs-organizador .nav-link {
    color: rgba(255, 255, 255, 0.7);
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    padding: 10px 20px;
    transition: all 0.3s ease;
}

.nav-tabs-organizador .nav-link:hover {
    color: white;
    border-color: rgba(147, 51, 234, 0.5);
}

.nav-tabs-organizador .nav-link.active {
    color: white;
    background: transparent;
    border-color: var(--purple-main);
}

/* Tablero del organizador (estilo Kanban) */
.organizador-tablero {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 15px;
    min-height: 400px;
}

/* Columnas de etiquetas */
.etiqueta-columna {
    flex: 0 0 280px;
    min-width: 280px;
    max-width: 280px;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 350px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    position: relative;
}

/* Efecto de brillo en las columnas */
.etiqueta-columna::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transition: left 0.5s ease;
    pointer-events: none;
}

.etiqueta-columna:hover::before {
    left: 100%;
}

/* Header de columna */
.etiqueta-columna-header {
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.etiqueta-columna-header .etiqueta-count {
    background: rgba(0, 0, 0, 0.3);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
}

/* Contenedor de chats en columna */
.etiqueta-columna-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    min-height: 100px;
}

/* Cards de chat dentro de las columnas */
.chat-card-org {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
    cursor: grab;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-card-org:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.chat-card-org:active {
    cursor: grabbing;
}

.chat-card-org.sortable-ghost {
    opacity: 0.5;
    background: rgba(147, 51, 234, 0.3);
}

.chat-card-org.sortable-drag {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

/* Info del chat en card */
.chat-card-org .chat-telefono {
    font-weight: 600;
    font-size: 0.95rem;
    color: white;
    margin-bottom: 4px;
}

.chat-card-org .chat-ticket {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
}

.chat-card-org .chat-preview {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
    line-height: 1.4;
    max-height: 40px;
    overflow: hidden;
}

/* Botón Ir a Chat */
.btn-ir-chat {
    width: 100%;
    padding: 6px 12px;
    font-size: 0.8rem;
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    color: white;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.btn-ir-chat:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-1px);
    color: white;
}

/* Botón eliminar en card (tache) */
.chat-card-org .btn-remove-chat {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 22px;
    height: 22px;
    padding: 0;
    font-size: 0.7rem;
    background: rgba(239, 68, 68, 0.8);
    border: none;
    color: white;
    border-radius: 50%;
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-card-org:hover .btn-remove-chat {
    opacity: 1;
}

.chat-card-org .btn-remove-chat:hover {
    background: #ef4444;
    transform: scale(1.1);
}

.chat-card-org .btn-classify-chat {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 22px;
    height: 22px;
    padding: 0;
    font-size: 0.7rem;
    background: rgba(147, 51, 234, 0.8);
    border: none;
    color: white;
    border-radius: 50%;
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.chat-card-org:hover .btn-classify-chat {
    opacity: 1;
}

.chat-card-org .btn-classify-chat:hover {
    background: #9333EA;
    transform: scale(1.1);
}

.chat-card-org .chat-nombre {
    font-weight: 600;
    font-size: 0.9rem;
    color: white;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-card-org .chat-card-actions {
    margin-top: 8px;
}

.chat-card-org .btn-ir-chat {
    width: 100%;
    font-size: 0.75rem;
    padding: 6px 10px;
    background: rgba(147, 51, 234, 0.6);
    border: none;
    color: white;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.chat-card-org .btn-ir-chat:hover {
    background: #9333EA;
    transform: translateY(-1px);
}

/* Columna Sin Clasificar */
.etiqueta-columna[data-etiqueta-id="sin-clasificar"] {
    border: 2px dashed rgba(255, 255, 255, 0.2);
}

.etiqueta-columna[data-etiqueta-id="sin-clasificar"] .etiqueta-columna-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 5px;
}

.etiqueta-columna[data-etiqueta-id="sin-clasificar"] .btn-outline-light {
    font-size: 0.7rem;
    padding: 2px 8px;
}

.chat-card-org {
    position: relative;
}

/* Lista de etiquetas (pestaña Gestionar) */
.etiqueta-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-left: 4px solid;
    transition: all 0.3s ease;
}

.etiqueta-list-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.etiqueta-list-item .etiqueta-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.etiqueta-list-item .color-badge {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.etiqueta-list-item .etiqueta-nombre {
    font-weight: 600;
    font-size: 1rem;
}

.etiqueta-list-item .etiqueta-desc {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Colores preestablecidos en modal */
.colores-predef {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.color-preset {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.color-preset:hover {
    transform: scale(1.15);
    border-color: white;
}

.color-preset.active {
    border-color: white;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Vista previa de etiqueta */
.etiqueta-preview-container {
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.etiqueta-card-preview {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.etiqueta-card-preview .etiqueta-card-header {
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--purple-main);
}

.etiqueta-card-preview .etiqueta-nombre {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.etiqueta-card-preview .etiqueta-count {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
}

/* Responsive organizador */
@media (max-width: 768px) {
    .organizador-tablero {
        flex-direction: column;
    }
    
    .etiqueta-columna {
        flex: 0 0 auto;
        min-width: 100%;
        max-width: 100%;
        max-height: none;
        margin-bottom: 15px;
    }
    
    .etiqueta-columna-body {
        max-height: 300px;
    }
}

/* Animación de entrada para cards */
@keyframes slideInCard {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-card-org {
    animation: slideInCard 0.3s ease;
}

/* Placeholder cuando no hay chats */
.etiqueta-empty {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

.etiqueta-empty i {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

/* ============================================= 
   VISTA PREVIA DE PROMPT EN MODAL
   ============================================= */

/* Contenedor de vista previa del prompt con scroll */
#promptPreview .card-glass {
    max-height: 300px;
    overflow-y: auto;
}

#promptPreview #promptPreviewText {
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* ============================================= 
   BOTÓN CREAR ASISTENTE CON DESTELLOS
   ============================================= */

.crear-asistente-container {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.btn-crear-asistente {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 18px 40px;
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #10B981 0%, #059669 50%, #047857 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 
        0 4px 15px rgba(16, 185, 129, 0.4),
        0 0 30px rgba(16, 185, 129, 0.2);
    animation: btn-pulse-green 2s infinite;
}

.btn-crear-asistente:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 8px 25px rgba(16, 185, 129, 0.5),
        0 0 50px rgba(16, 185, 129, 0.3);
    color: white;
    text-decoration: none;
}

.btn-crear-asistente:active {
    transform: translateY(-1px);
}

@keyframes btn-pulse-green {
    0%, 100% {
        box-shadow: 
            0 4px 15px rgba(16, 185, 129, 0.4),
            0 0 30px rgba(16, 185, 129, 0.2);
    }
    50% {
        box-shadow: 
            0 6px 20px rgba(16, 185, 129, 0.6),
            0 0 60px rgba(16, 185, 129, 0.4),
            0 0 100px rgba(16, 185, 129, 0.2);
    }
}

/* Destellos (Sparkles) */
.btn-sparkle {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
    animation: sparkle 2s infinite;
    pointer-events: none;
}

.btn-sparkle:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.btn-sparkle:nth-child(2) {
    top: 60%;
    left: 25%;
    animation-delay: 0.3s;
}

.btn-sparkle:nth-child(3) {
    top: 30%;
    right: 15%;
    animation-delay: 0.6s;
}

.btn-sparkle:nth-child(4) {
    bottom: 20%;
    right: 25%;
    animation-delay: 0.9s;
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1) rotate(180deg);
        box-shadow: 
            0 0 10px white,
            0 0 20px rgba(255, 255, 255, 0.8),
            0 0 30px rgba(16, 185, 129, 0.6);
    }
}

/* Brillo que recorre el botón */
.btn-crear-asistente::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        transparent 40%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 60%,
        transparent
    );
    animation: shine-sweep 3s infinite;
}

@keyframes shine-sweep {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) rotate(45deg);
    }
}

/* ============================================= 
   WIZARD ONBOARDING - CREAR MI PRIMER BOT
   ============================================= */

.onboarding-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header del Wizard */
.wizard-header {
    position: relative;
    overflow: hidden;
}

.wizard-title {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 10px;
}

.wizard-subtitle {
    font-size: 1.1rem;
}

/* Progress Steps */
.wizard-progress {
    position: relative;
    padding: 0 20px;
}

.progress-track {
    position: absolute;
    top: 50%;
    left: 80px;
    right: 80px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    transform: translateY(-20px);
    z-index: 1;
}

.progress-bar-wizard {
    height: 100%;
    background: linear-gradient(90deg, #10B981, #059669);
    border-radius: 2px;
    width: 0%;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
}

.steps-indicators {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.step-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 3px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.step-indicator.active .step-circle {
    background: linear-gradient(135deg, #10B981, #059669);
    border-color: #10B981;
    color: white;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
    transform: scale(1.1);
}

.step-indicator.completed .step-circle {
    background: #10B981;
    border-color: #10B981;
    color: white;
}

/* Ocultar el ícono original y mostrar palomita cuando está completado */
.step-indicator.completed .step-circle i {
    display: none;
}

.step-indicator.completed .step-circle::after {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 1.5rem;
}

.step-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
}

.step-indicator.active .step-label {
    color: #10B981;
}

.step-indicator.completed .step-label {
    color: white;
}

/* Contenido del Wizard */
.wizard-content {
    margin-top: 20px;
}

.wizard-step {
    display: none;
    animation: fadeInStep 0.5s ease;
}

.wizard-step.active {
    display: block;
}

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

/* Step Header Card */
.step-header-card {
    margin-bottom: 20px;
}

.step-badge {
    display: inline-block;
    background: linear-gradient(135deg, #10B981, #059669);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 10px;
}

/* Mensaje Motivacional */
.motivational-message {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.1));
    border-left: 4px solid #10B981;
    padding: 15px;
    border-radius: 0 10px 10px 0;
    color: white;
}

/* Tutorial Section */
.tutorial-section h5 {
    font-size: 1rem;
}

.tutorial-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tutorial-list li {
    padding: 10px 0;
    color: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.tutorial-list li:last-child {
    border-bottom: none;
}

.tutorial-list li strong {
    color: white;
}

/* Demo Form */
.demo-form-container {
    margin-top: 20px;
}

.demo-form {
    background: rgba(255, 255, 255, 0.05);
}

.demo-input {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 15px;
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Status Card */
.status-card {
    padding: 30px;
}

.status-icon i {
    transition: all 0.3s ease;
}

/* Action Buttons */
.action-buttons .btn-action {
    transition: all 0.3s ease;
}

.action-buttons .btn-action:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(16, 185, 129, 0.4);
}

/* Navigation Buttons */
.navigation-buttons {
    display: flex;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-next:disabled, .btn-prev:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-next:not(:disabled) {
    animation: pulse-next 2s infinite;
}

@keyframes pulse-next {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(147, 51, 234, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(147, 51, 234, 0);
    }
}

/* Option Cards */
.option-cards {
    margin-top: 15px;
}

.option-card {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.option-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.option-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.option-info h6 {
    margin: 0;
}

/* Success Animation */
.success-animation {
    animation: success-pop 0.5s ease;
}

@keyframes success-pop {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* Detected Containers */
.proxy-detected-container,
.prompt-detected-container,
.session-detected-container {
    padding: 30px;
}

/* ============================================= 
   CELEBRATION STEP (PASO 4)
   ============================================= */

.celebration-container {
    position: relative;
    overflow: hidden;
    min-height: 500px;
}

.celebration-content {
    position: relative;
    z-index: 10;
}

.celebration-icon {
    animation: celebration-float 2s ease-in-out infinite;
}

@keyframes celebration-float {
    0%, 100% { transform: translateY(0) rotate(-5deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

.celebration-bounce {
    animation: celebration-bounce 1s ease-in-out infinite;
}

@keyframes celebration-bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.celebration-title {
    font-size: 3rem;
    font-weight: 800;
    text-shadow: 
        0 0 20px rgba(16, 185, 129, 0.5),
        0 0 40px rgba(16, 185, 129, 0.3);
    animation: title-glow 2s ease-in-out infinite alternate;
}

@keyframes title-glow {
    0% {
        text-shadow: 
            0 0 20px rgba(16, 185, 129, 0.5),
            0 0 40px rgba(16, 185, 129, 0.3);
    }
    100% {
        text-shadow: 
            0 0 30px rgba(16, 185, 129, 0.8),
            0 0 60px rgba(16, 185, 129, 0.5),
            0 0 90px rgba(16, 185, 129, 0.3);
    }
}

.celebration-text {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

.celebration-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    color: white;
}

.stat-item i {
    font-size: 2rem;
}

.celebration-actions {
    margin-top: 30px;
}

/* Fireworks */
.fireworks-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.firework {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: firework-explode 1s ease-out forwards;
}

@keyframes firework-explode {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: scale(20);
        opacity: 0;
    }
}

/* Confetti */
.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    animation: confetti-fall 3s ease-out forwards;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(500px) rotate(720deg);
        opacity: 0;
    }
}

/* Tooltip demo */
.tooltip-demo {
    cursor: help;
}

/* Responsive Wizard */
@media (max-width: 991px) {
    .wizard-title {
        font-size: 1.5rem;
    }
    
    .progress-track {
        left: 40px;
        right: 40px;
    }
    
    .step-circle {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .step-label {
        font-size: 0.75rem;
    }
    
    .celebration-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .btn-crear-asistente {
        padding: 15px 30px;
        font-size: 1rem;
    }
    
    .steps-indicators {
        gap: 5px;
    }
    
    .step-circle {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .step-label {
        font-size: 0.7rem;
        display: none;
    }
    
    .navigation-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .navigation-buttons .btn {
        width: 100%;
    }
    
    .celebration-stats {
        gap: 15px;
    }
    
    .stat-item {
        padding: 15px 20px;
    }
}

/* ============================================= 
   CONFIGURACIÓN - PESTAÑAS Y UNIFICAR CHATS
   ============================================= */

/* Pestañas de configuración */
.nav-tabs-configuracion {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-tabs-configuracion .nav-link {
    color: rgba(255, 255, 255, 0.7);
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    padding: 10px 20px;
    transition: all 0.3s ease;
}

.nav-tabs-configuracion .nav-link:hover {
    color: white;
    border-color: rgba(147, 51, 234, 0.5);
}

.nav-tabs-configuracion .nav-link.active {
    color: white;
    background: transparent;
    border-color: var(--purple-main);
}

.nav-tabs-configuracion .nav-link i {
    margin-right: 8px;
}

/* Contenedor de chats para unificar */
.unificar-chats-container {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
}

/* Item de chat para unificar */
.unificar-chat-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.unificar-chat-item:hover {
    background: rgba(147, 51, 234, 0.2);
    border-color: rgba(147, 51, 234, 0.5);
}

.unificar-chat-item.selected {
    background: rgba(147, 51, 234, 0.3);
    border-color: var(--purple-main);
}

.unificar-chat-item .chat-checkbox {
    margin-right: 15px;
}

.unificar-chat-item .chat-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--purple-main);
}

.unificar-chat-item .chat-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple-main), var(--purple-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 1.2rem;
    color: white;
    flex-shrink: 0;
}

.unificar-chat-item .chat-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.unificar-chat-item .chat-info {
    flex: 1;
    min-width: 0;
}

.unificar-chat-item .chat-name {
    font-weight: 600;
    color: white;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.unificar-chat-item .chat-phone {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 3px;
}

.unificar-chat-item .chat-session {
    font-size: 0.75rem;
    color: rgba(147, 51, 234, 0.8);
}

.unificar-chat-item .chat-last-message {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 5px;
}

.unificar-chat-item .chat-date {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    text-align: right;
    min-width: 80px;
}

/* Botones de acción */
.unificar-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.unificar-actions .btn {
    padding: 10px 20px;
}

/* Detalles de chats en modal */
.chats-unificar-detalles {
    max-height: 300px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 15px;
}

.chat-detalle-item {
    display: flex;
    align-items: flex-start;
    padding: 12px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 3px solid var(--purple-main);
}

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

.chat-detalle-item.chat-principal {
    border-left-color: #10B981;
    background: rgba(16, 185, 129, 0.1);
}

.chat-detalle-item .detalle-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple-main), var(--purple-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 1rem;
    color: white;
    flex-shrink: 0;
}

.chat-detalle-item .detalle-info {
    flex: 1;
}

.chat-detalle-item .detalle-nombre {
    font-weight: 600;
    color: white;
    font-size: 0.95rem;
}

.chat-detalle-item .detalle-telefono {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.chat-detalle-item .detalle-ultimo-mensaje {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 5px;
    font-style: italic;
}

.chat-detalle-item .detalle-badge {
    background: #10B981;
    color: white;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 10px;
}

/* Contador de selección */
.seleccion-contador {
    background: rgba(147, 51, 234, 0.2);
    border: 1px solid var(--purple-main);
    border-radius: 10px;
    padding: 10px 15px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.seleccion-contador .contador-texto {
    color: white;
    font-weight: 500;
}

.seleccion-contador .contador-numero {
    background: var(--purple-main);
    color: white;
    padding: 2px 10px;
    border-radius: 15px;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .unificar-actions {
        flex-direction: column;
    }
    
    .unificar-actions .btn {
        width: 100%;
    }
    
    .unificar-chat-item {
        flex-wrap: wrap;
    }
    
    .unificar-chat-item .chat-date {
        width: 100%;
        text-align: left;
        margin-top: 10px;
    }
}

/* ============================================= 
   ESTILOS ADICIONALES PARA PESTAÑAS MÓVILES
   ============================================= */

@media (max-width: 992px) {
    /* Asegurar que el main-content no corte el contenido */
    .main-content {
        overflow-y: auto;
        overflow-x: hidden;
    }
}

/* Ocultar botón de volver en escritorio */
.mobile-back-btn {
    display: none;
}

/* Ocultar pestañas en escritorio */
.mobile-chat-tabs {
    display: none;
}

/* Ocultar hint móvil en escritorio */
.mobile-hint {
    display: none !important;
}

@media (max-width: 768px) {
    /* Mostrar hint móvil */
    .mobile-hint {
        display: block !important;
        margin-top: 20px;
        animation: pulse-hint 2s infinite;
    }
    
    @keyframes pulse-hint {
        0%, 100% { opacity: 0.6; }
        50% { opacity: 1; }
    }
}

/* Para pantallas muy pequeñas (celulares compactos) */
@media (max-width: 480px) {
    /* Pestañas más compactas */
    .mobile-tab {
        padding: 10px 8px;
        font-size: 0.85rem;
    }
    
    .mobile-tab i {
        font-size: 1rem;
    }
    
    .mobile-tab span:not(.tab-badge) {
        display: none; /* Ocultar texto, solo mostrar icono */
    }
    
    .mobile-tab i {
        font-size: 1.3rem;
    }
    
    /* Header del chat más compacto */
    .conversation-container .chat-header {
        padding: 8px 10px !important;
    }
    
    .conversation-container .chat-header .chat-avatar {
        width: 35px !important;
        height: 35px !important;
        font-size: 0.9rem !important;
        margin-right: 8px !important;
    }
    
    .conversation-container .chat-header h6 {
        font-size: 0.85rem !important;
    }
    
    .mobile-back-btn {
        width: 32px !important;
        height: 32px !important;
        margin-right: 8px !important;
    }
    
    /* Switch más pequeño */
    .header-mode-switch {
        width: 42px !important;
        height: 22px !important;
    }
    
    .header-slider::before {
        height: 16px !important;
        width: 16px !important;
    }
    
    .header-mode-switch input:checked + .header-slider::before {
        transform: translateX(20px) !important;
    }
    
    .header-mode-text {
        font-size: 0.65rem !important;
    }
    
    /* Input más compacto */
    .conversation-container .message-input-container {
        padding: 8px !important;
    }
    
    .conversation-container .message-input-container #messageInput {
        height: 40px !important;
    }
    
    .conversation-container .message-input-container .btn {
        min-width: 38px !important;
        height: 40px !important;
    }
    
    /* Selector de plantillas compacto en pantallas pequeñas */
    .conversation-container .plantilla-selector-container {
        display: flex !important;
        padding: 3px 0 !important;
    }
    
    .conversation-container .plantilla-selector-container select {
        max-width: 120px !important;
        font-size: 0.75rem !important;
        height: 30px !important;
        padding: 2px 5px !important;
    }
    
    /* Mensajes */
    .message-bubble {
        max-width: 90% !important;
        padding: 8px 12px !important;
        font-size: 0.9rem !important;
    }
}

/* ============================================= 
   ESTILOS PARA SELECTOR DE TIPO DE API
   (WhatsApp Baileys vs Meta API Oficial)
   ============================================= */

.tipo-api-card {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent !important;
    background: rgba(30, 30, 60, 0.8) !important;
}

.tipo-api-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(147, 51, 234, 0.3);
}

.tipo-api-card.active {
    border-color: var(--purple-main) !important;
    background: rgba(147, 51, 234, 0.2) !important;
    box-shadow: 0 0 20px rgba(147, 51, 234, 0.4);
}

.tipo-api-card.active::before {
    content: '\f058';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 10px;
    right: 10px;
    color: #10B981;
    font-size: 1.2rem;
}

.tipo-api-card .card-body {
    position: relative;
}

/* Badge de tipo de API en la lista de sesiones */
.badge-api-baileys {
    background: linear-gradient(135deg, #3B82F6, #1D4ED8);
    color: white;
}

.badge-api-meta {
    background: linear-gradient(135deg, #0668E1, #0866FF);
    color: white;
}

/* Indicador de tipo de API en sesión */
.sesion-tipo-api {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
}

.sesion-tipo-api.baileys {
    background: rgba(59, 130, 246, 0.2);
    color: #60A5FA;
}

.sesion-tipo-api.meta_oficial {
    background: rgba(6, 102, 255, 0.2);
    color: #60A5FA;
}

/* Sección Meta credenciales */
#seccionMeta .form-group label {
    display: flex;
    align-items: center;
    gap: 5px;
}

#seccionMeta .alert {
    font-size: 0.9rem;
}

#seccionMeta .alert ul {
    padding-left: 20px;
}

/* Modal configuración Meta (Admin) */
.meta-config-card {
    background: rgba(30, 30, 60, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.meta-config-card h6 {
    color: white;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.meta-config-card h6 i {
    color: #0866FF;
}

/* Webhook URL copiable */
.webhook-url-container {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.webhook-url-container code {
    color: #A5B4FC;
    font-size: 0.9rem;
    word-break: break-all;
}

.webhook-url-container .btn-copy {
    flex-shrink: 0;
}

/* Tabla de plantillas Meta */
.meta-plantillas-table {
    background: rgba(30, 30, 60, 0.5);
    border-radius: 10px;
    overflow: hidden;
}

.meta-plantillas-table th {
    background: rgba(147, 51, 234, 0.3);
    color: white;
    font-weight: 500;
    padding: 12px 15px;
    border: none;
}

.meta-plantillas-table td {
    color: rgba(255, 255, 255, 0.8);
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.meta-plantillas-table tr:hover td {
    background: rgba(147, 51, 234, 0.1);
}

/* Estado de plantilla */
.plantilla-estado {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
}

.plantilla-estado.APPROVED {
    background: rgba(16, 185, 129, 0.2);
    color: #10B981;
}

.plantilla-estado.PENDING {
    background: rgba(245, 158, 11, 0.2);
    color: #F59E0B;
}

.plantilla-estado.REJECTED {
    background: rgba(239, 68, 68, 0.2);
    color: #EF4444;
}

/* Responsive para tarjetas de API */
@media (max-width: 576px) {
    .tipo-api-card .card-body {
        padding: 15px 10px !important;
    }
    
    .tipo-api-card h6 {
        font-size: 0.9rem;
    }
    
    .tipo-api-card .badge {
        font-size: 0.65rem;
        padding: 2px 6px;
    }
    
    .tipo-api-card i.fa-2x {
        font-size: 1.5rem !important;
    }
}

/* ============================================= 
   SECCIÓN GOOGLE CALENDAR
   ============================================= */

/* Tarjetas de sesión con Google Calendar */
.gc-sesion-card {
    transition: all 0.3s ease;
}

.gc-sesion-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(147, 51, 234, 0.3);
}

/* Switch de agenda */
.gc-sesion-switch:checked + .custom-control-label::before {
    background-color: #10B981;
    border-color: #10B981;
}

/* Botón outline purple */
.btn-outline-purple {
    color: var(--purple-light);
    border-color: var(--purple-light);
    background: transparent;
}

.btn-outline-purple:hover {
    background: var(--purple-main);
    border-color: var(--purple-main);
    color: white;
}

/* Horarios de agenda */
.horario-dia {
    transition: all 0.3s ease;
}

.horario-dia:hover {
    background: rgba(147, 51, 234, 0.1) !important;
}

.horario-horas input[type="time"] {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 5px;
}

.horario-horas input[type="time"]:focus {
    border-color: var(--purple-light);
    box-shadow: 0 0 0 0.2rem rgba(147, 51, 234, 0.25);
}

/* Fix para input time en Chrome */
.horario-horas input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
}

/* Estado de conexión Google */
#gcConnected, #gcNotConnected {
    animation: fadeIn 0.3s ease;
}

/* Tabla de citas */
.table-glass.table-sm td,
.table-glass.table-sm th {
    padding: 0.5rem;
    vertical-align: middle;
}

/* Preview de archivo en agenda */
#agendaArchivoPreview {
    animation: fadeIn 0.3s ease;
}

/* Modal de configuración de agenda */
#modalConfigAgenda .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

#modalConfigAgenda .card-glass {
    background: rgba(255, 255, 255, 0.03);
}

/* Input de color */
input[type="color"].glass-input {
    padding: 5px;
    cursor: pointer;
}

input[type="color"].glass-input::-webkit-color-swatch-wrapper {
    padding: 0;
}

input[type="color"].glass-input::-webkit-color-swatch {
    border: none;
    border-radius: 5px;
}

/* Responsive Google Calendar */
@media (max-width: 768px) {
    #modalConfigAgenda .modal-dialog {
        max-width: 95%;
        margin: 10px auto;
    }
    
    .horario-dia .d-flex {
        flex-direction: column;
        gap: 10px;
    }
    
    .horario-horas {
        width: 100%;
        justify-content: flex-start !important;
        padding-left: 35px;
    }
    
    .horario-horas input[type="time"] {
        width: 100px !important;
    }
}

/* ============================================= 
   SISTEMA DE ANUNCIOS
   ============================================= */

/* Versión compacta del mensaje de bienvenida */
.welcome-message-compact {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.welcome-icon-compact {
    font-size: 2.5rem;
    color: var(--purple-light);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(147, 51, 234, 0.2);
    border-radius: 50%;
    flex-shrink: 0;
}

.welcome-text-compact {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
}

.welcome-features-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.feature-badge-sm {
    background: rgba(147, 51, 234, 0.2);
    border: 1px solid rgba(147, 51, 234, 0.3);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: rgba(255, 255, 255, 0.9);
}

.feature-badge-sm i {
    font-size: 0.8rem;
}

/* Tarjeta del carrusel de anuncios */
.anuncio-card {
    padding: 15px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    min-height: 280px;
}

.anuncio-carrusel {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.anuncio-slide {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    pointer-events: none;
}

.anuncio-slide.active {
    opacity: 1;
    pointer-events: auto;
    position: relative;
}

.anuncio-media-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
    margin-bottom: 10px;
    min-height: 150px;
}

.anuncio-media-img {
    max-width: 100%;
    max-height: 180px;
    object-fit: contain;
    border-radius: 8px;
}

.anuncio-media-video {
    max-width: 100%;
    max-height: 180px;
    object-fit: contain;
    border-radius: 8px;
}

.anuncio-media-doc {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.anuncio-info {
    text-align: center;
    padding: 5px 0;
}

.anuncio-titulo {
    font-size: 0.95rem;
    margin-bottom: 8px;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-anuncio-ver-mas {
    font-size: 0.8rem;
    padding: 6px 15px;
}

.btn-anuncio-ver-mas:hover {
    transform: scale(1.05);
}

/* Indicadores del carrusel */
.anuncio-indicadores {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
}

.anuncio-indicador {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.anuncio-indicador:hover {
    background: rgba(255, 255, 255, 0.5);
}

.anuncio-indicador.active {
    background: var(--purple-light);
    width: 20px;
    border-radius: 10px;
}

/* Lista de anuncios en el admin */
.anuncio-admin-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.anuncio-admin-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--purple-light);
    transform: translateY(-2px);
}

.anuncio-admin-card.inactive {
    opacity: 0.6;
    border-color: rgba(255, 255, 255, 0.05);
}

.anuncio-admin-preview {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.anuncio-admin-preview img,
.anuncio-admin-preview video {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.anuncio-admin-stats {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.anuncio-stat {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.anuncio-stat i {
    color: var(--purple-light);
}

/* Badge de estado */
.badge-activo {
    background: rgba(16, 185, 129, 0.2);
    color: #10B981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-inactivo {
    background: rgba(239, 68, 68, 0.2);
    color: #EF4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Card glass para estadísticas */
.card-glass {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

/* Responsive anuncios */
@media (max-width: 992px) {
    #welcomeConAnuncios .col-lg-8,
    #welcomeConAnuncios .col-lg-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .anuncio-card {
        min-height: 200px;
    }
    
    .welcome-message-compact {
        margin-bottom: 15px;
    }
}

@media (max-width: 576px) {
    .welcome-icon-compact {
        width: 50px;
        height: 50px;
        font-size: 1.8rem;
    }
    
    .anuncio-media-img,
    .anuncio-media-video {
        max-height: 120px;
    }
}

/* ============================================= 
   SISTEMA DE FEEDBACK / TICKETS
   ============================================= */

/* Contenedor de chat de feedback */
.feedback-chat-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Mensaje de feedback */
.feedback-mensaje {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 15px;
    position: relative;
    animation: fadeInUp 0.3s ease;
}

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

/* Mensaje del cliente (izquierda) */
.feedback-mensaje.cliente {
    align-self: flex-start;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.3), rgba(147, 51, 234, 0.1));
    border: 1px solid rgba(147, 51, 234, 0.3);
    border-bottom-left-radius: 5px;
}

/* Mensaje de soporte (derecha) */
.feedback-mensaje.soporte {
    align-self: flex-end;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.3), rgba(34, 197, 94, 0.1));
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-bottom-right-radius: 5px;
}

/* Autor del mensaje */
.feedback-mensaje-autor {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 5px;
    opacity: 0.8;
}

.feedback-mensaje.cliente .feedback-mensaje-autor {
    color: var(--purple-lighter);
}

.feedback-mensaje.soporte .feedback-mensaje-autor {
    color: #86efac;
}

/* Contenido del mensaje */
.feedback-mensaje-contenido {
    font-size: 0.95rem;
    line-height: 1.5;
    word-wrap: break-word;
}

.feedback-mensaje-contenido img {
    max-width: 100%;
    border-radius: 8px;
    margin: 10px 0;
    cursor: pointer;
    transition: transform 0.2s;
}

.feedback-mensaje-contenido img:hover {
    transform: scale(1.02);
}

.feedback-mensaje-contenido video {
    max-width: 100%;
    border-radius: 8px;
    margin: 10px 0;
}

/* Fecha del mensaje */
.feedback-mensaje-fecha {
    font-size: 0.7rem;
    opacity: 0.6;
    margin-top: 8px;
    text-align: right;
}

/* Editor de mensaje (contenteditable) */
.feedback-mensaje-editor {
    min-height: 60px;
    outline: none;
}

.feedback-mensaje-editor:empty:before {
    content: attr(placeholder);
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
}

.feedback-mensaje-editor:focus {
    border-color: var(--purple-light) !important;
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.2);
}

/* Área de archivos pendientes (preview) */
.feedback-archivos-pendientes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px;
    background: rgba(128, 0, 128, 0.1);
    border-radius: 8px;
}

.feedback-archivo-preview {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid rgba(147, 51, 234, 0.5);
}

.feedback-archivo-preview img,
.feedback-archivo-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.feedback-archivo-preview .remove-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    background: rgba(239, 68, 68, 0.9);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.feedback-archivo-preview .remove-btn:hover {
    transform: scale(1.1);
}

/* Archivos adjuntos en mensaje */
.feedback-archivos {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.feedback-archivo-thumb {
    width: 150px;
    max-height: 150px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.feedback-archivo-thumb:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(147, 51, 234, 0.4);
}

.feedback-archivo-thumb img,
.feedback-archivo-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Badge de tipo de ticket */
.feedback-tipo-badge {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px;
}

.feedback-tipo-badge.problema {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.feedback-tipo-badge.mejora {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.feedback-tipo-badge.actualizacion {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.feedback-tipo-badge.detalle {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

/* Switch de estado en tabla */
.feedback-estado-switch {
    width: 50px;
}

/* Tabla de tickets */
#feedbackTable tbody tr {
    cursor: pointer;
    transition: background 0.2s;
}

#feedbackTable tbody tr:hover {
    background: rgba(147, 51, 234, 0.2) !important;
}

/* Animación de carga */
.feedback-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.feedback-loading i {
    font-size: 2rem;
    color: var(--purple-light);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .feedback-mensaje {
        max-width: 95%;
    }
    
    .feedback-archivo-thumb {
        width: 100px;
        max-height: 100px;
    }
    
    #modalVerFeedback .modal-body .row {
        flex-direction: column;
    }
    
    #modalVerFeedback .modal-body .col-md-2,
    #modalVerFeedback .modal-body .col-md-8 {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* =============================================
   ESTILOS WORDPRESS INTEGRATION
   Webhooks, Productos WP, Stickers, Verificación
   ============================================= */

/* Separador de menú lateral */
.menu-separator {
    padding: 10px 15px 5px 38px;
    font-size: 10px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 1px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 10px;
}

/* Grid de Stickers */
.stickers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
    padding: 10px;
}

.sticker-item {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.sticker-item:hover {
    background: rgba(147, 51, 234, 0.2);
    transform: scale(1.05);
}

.sticker-item img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.sticker-item .sticker-name {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sticker-item .sticker-delete {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(220, 53, 69, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 10px;
    display: none;
    cursor: pointer;
}

.sticker-item:hover .sticker-delete {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Selector de stickers para packs */
.stickers-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
}

.stickers-selector .sticker-option {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.stickers-selector .sticker-option:hover {
    background: rgba(147, 51, 234, 0.2);
}

.stickers-selector .sticker-option.selected {
    border-color: var(--purple-light);
    background: rgba(147, 51, 234, 0.3);
}

.stickers-selector .sticker-option img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.stickers-selector .sticker-option .check-icon {
    position: absolute;
    top: 3px;
    right: 3px;
    color: var(--purple-light);
    display: none;
}

.stickers-selector .sticker-option.selected .check-icon {
    display: block;
}

/* Botón de stickers en chat (modo humano) */
.btn-stickers-chat {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 8px 12px;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-stickers-chat:hover {
    color: var(--purple-light);
}

/* Popup de stickers en chat */
.stickers-popup {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: rgba(15, 15, 35, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px 15px 0 0;
    max-height: 350px;
    overflow: hidden;
    display: none;
    z-index: 100;
}

.stickers-popup.active {
    display: block;
}

.stickers-popup-header {
    padding: 10px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stickers-popup-header h6 {
    margin: 0;
    color: white;
}

.stickers-popup-tabs {
    display: flex;
    padding: 10px;
    gap: 10px;
    overflow-x: auto;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stickers-popup-tabs .pack-tab {
    padding: 5px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
    font-size: 13px;
    transition: all 0.2s;
}

.stickers-popup-tabs .pack-tab:hover,
.stickers-popup-tabs .pack-tab.active {
    background: var(--purple-main);
}

.stickers-popup-content {
    padding: 15px;
    max-height: 250px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 10px;
}

.stickers-popup-content .sticker-send {
    cursor: pointer;
    padding: 5px;
    border-radius: 8px;
    transition: all 0.2s;
}

.stickers-popup-content .sticker-send:hover {
    background: rgba(147, 51, 234, 0.3);
    transform: scale(1.1);
}

.stickers-popup-content .sticker-send img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

/* Verificación - Preview del icono */
.verificacion-icono-actual {
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.verificacion-icono-actual img {
    max-width: 64px;
    max-height: 64px;
}

.verificacion-vista-previa {
    background: rgba(0, 0, 0, 0.3);
}

/* Badge de verificación en chat */
.verificacion-badge {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 5px;
    vertical-align: middle;
}

.verificacion-badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Categorías de productos WP */
.categoria-badge {
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 12px;
    display: inline-block;
}

.categoria-badge.crm_licenses {
    background: rgba(59, 130, 246, 0.3);
    color: #93C5FD;
}

.categoria-badge.crm_plugins {
    background: rgba(34, 197, 94, 0.3);
    color: #86EFAC;
}

.categoria-badge.crm_stickers {
    background: rgba(234, 179, 8, 0.3);
    color: #FDE047;
}

.categoria-badge.crm_verification {
    background: rgba(147, 51, 234, 0.3);
    color: #C4B5FD;
}

/* Estados de webhook */
.webhook-estado {
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 12px;
}

.webhook-estado.completado {
    background: rgba(34, 197, 94, 0.3);
    color: #86EFAC;
}

.webhook-estado.error {
    background: rgba(239, 68, 68, 0.3);
    color: #FCA5A5;
}

.webhook-estado.procesando {
    background: rgba(234, 179, 8, 0.3);
    color: #FDE047;
}

.webhook-estado.recibido {
    background: rgba(59, 130, 246, 0.3);
    color: #93C5FD;
}

/* Responsive para stickers */
@media (max-width: 768px) {
    .stickers-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
    
    .stickers-popup-content {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    }
}

/* =============================================
   ESTADO DE LICENCIA - DASHBOARD
   ============================================= */
.licencia-status-container {
    max-width: 600px;
    margin: 0 auto;
}

.licencia-card {
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.licencia-header {
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.3), rgba(147, 51, 234, 0.1));
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.licencia-header i {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--purple-light);
}

.licencia-header h3 {
    margin: 0;
    font-size: 1.3rem;
    color: white;
}

.licencia-body {
    padding: 25px;
}

/* Estados de Licencia */
.licencia-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 25px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.licencia-status-badge i {
    font-size: 1.3rem;
}

/* Verde - Licencia Activa Comprada */
.licencia-activa {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.3), rgba(34, 197, 94, 0.1));
    border: 2px solid #22C55E;
    color: #86EFAC;
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
    animation: pulseGreen 2s ease-in-out infinite;
}

@keyframes pulseGreen {
    0%, 100% { box-shadow: 0 0 20px rgba(34, 197, 94, 0.3); }
    50% { box-shadow: 0 0 30px rgba(34, 197, 94, 0.5); }
}

/* Morado - Demo Activo */
.licencia-demo {
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.4), rgba(147, 51, 234, 0.2));
    border: 2px solid #9333EA;
    color: #C084FC;
    box-shadow: 0 0 20px rgba(147, 51, 234, 0.3);
    animation: pulsePurple 2s ease-in-out infinite;
}

@keyframes pulsePurple {
    0%, 100% { box-shadow: 0 0 20px rgba(147, 51, 234, 0.3); }
    50% { box-shadow: 0 0 30px rgba(147, 51, 234, 0.5); }
}

/* Amarillo - Pendiente de Verificación */
.licencia-pendiente {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.3), rgba(234, 179, 8, 0.1));
    border: 2px solid #EAB308;
    color: #FDE047;
    box-shadow: 0 0 20px rgba(234, 179, 8, 0.3);
    animation: pulseYellow 2s ease-in-out infinite;
}

@keyframes pulseYellow {
    0%, 100% { box-shadow: 0 0 20px rgba(234, 179, 8, 0.3); }
    50% { box-shadow: 0 0 30px rgba(234, 179, 8, 0.5); }
}

/* Rojo - Sin Licencia */
.licencia-sin {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.3), rgba(239, 68, 68, 0.1));
    border: 2px solid #EF4444;
    color: #FCA5A5;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
    animation: pulseRed 2s ease-in-out infinite;
}

@keyframes pulseRed {
    0%, 100% { box-shadow: 0 0 20px rgba(239, 68, 68, 0.3); }
    50% { box-shadow: 0 0 30px rgba(239, 68, 68, 0.5); }
}

.licencia-info {
    text-align: center;
}

.licencia-info .tipo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.licencia-info .vigencia {
    font-size: 0.95rem;
    opacity: 0.9;
}

.licencia-info .dias-restantes {
    font-size: 2rem;
    font-weight: 800;
    margin: 10px 0;
}

.licencia-info .fecha-fin {
    font-size: 0.85rem;
    opacity: 0.7;
}

.licencia-cta {
    margin-top: 20px;
    text-align: center;
}

.licencia-cta .btn-renovar {
    background: linear-gradient(135deg, #9333EA, #7C3AED);
    color: white;
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    border: none;
}

.licencia-cta .btn-renovar:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(147, 51, 234, 0.4);
}

.licencia-cta .btn-comprar {
    background: linear-gradient(135deg, #22C55E, #16A34A);
    color: white;
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    border: none;
}

.licencia-cta .btn-comprar:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(34, 197, 94, 0.4);
}

/* ============================================= 
   ESTADOS DE CONEXIÓN DE USUARIOS - FUTURISTA
   ============================================= */

/* Contenedor del indicador de estado */
.estado-conexion {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 40px;
    height: 40px;
}

/* Indicador base con efecto de luz */
.estado-indicador {
    position: relative;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Anillo exterior animado */
.estado-indicador::before {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid transparent;
    animation: ringPulse 2s ease-in-out infinite;
}

/* Efecto de brillo interno */
.estado-indicador::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, transparent 70%);
    animation: innerGlow 1.5s ease-in-out infinite;
}

/* ===== ESTADO: EN LÍNEA ===== */
.estado-online {
    background: linear-gradient(135deg, #00FF88 0%, #00D4AA 50%, #00B894 100%);
    box-shadow: 
        0 0 10px rgba(0, 255, 136, 0.6),
        0 0 20px rgba(0, 255, 136, 0.4),
        0 0 30px rgba(0, 255, 136, 0.2),
        inset 0 0 8px rgba(255, 255, 255, 0.3);
    animation: pulseOnline 2s ease-in-out infinite, floatGlow 3s ease-in-out infinite;
}

.estado-online::before {
    border-color: rgba(0, 255, 136, 0.5);
    animation: ringPulseOnline 2s ease-in-out infinite;
}

@keyframes pulseOnline {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 
            0 0 10px rgba(0, 255, 136, 0.6),
            0 0 20px rgba(0, 255, 136, 0.4),
            0 0 30px rgba(0, 255, 136, 0.2),
            inset 0 0 8px rgba(255, 255, 255, 0.3);
    }
    50% { 
        transform: scale(1.1);
        box-shadow: 
            0 0 15px rgba(0, 255, 136, 0.8),
            0 0 30px rgba(0, 255, 136, 0.5),
            0 0 45px rgba(0, 255, 136, 0.3),
            inset 0 0 10px rgba(255, 255, 255, 0.4);
    }
}

@keyframes ringPulseOnline {
    0%, 100% { 
        transform: scale(1);
        opacity: 0.5;
        border-color: rgba(0, 255, 136, 0.5);
    }
    50% { 
        transform: scale(1.3);
        opacity: 0.2;
        border-color: rgba(0, 255, 136, 0.3);
    }
}

/* ===== ESTADO: HIBERNACIÓN ===== */
.estado-hibernacion {
    background: linear-gradient(135deg, #FFD93D 0%, #FF9F1C 50%, #FF6B35 100%);
    box-shadow: 
        0 0 10px rgba(255, 159, 28, 0.6),
        0 0 20px rgba(255, 159, 28, 0.4),
        0 0 30px rgba(255, 159, 28, 0.2),
        inset 0 0 8px rgba(255, 255, 255, 0.3);
    animation: pulseHibernacion 3s ease-in-out infinite;
}

.estado-hibernacion::before {
    border-color: rgba(255, 159, 28, 0.5);
    animation: ringPulseHibernacion 3s ease-in-out infinite;
}

/* Icono de luna para hibernación */
.estado-hibernacion .estado-icono {
    position: absolute;
    font-size: 10px;
    color: white;
    text-shadow: 0 0 5px rgba(255,255,255,0.5);
    z-index: 2;
}

@keyframes pulseHibernacion {
    0%, 100% { 
        transform: scale(1);
        opacity: 1;
        box-shadow: 
            0 0 10px rgba(255, 159, 28, 0.6),
            0 0 20px rgba(255, 159, 28, 0.4),
            0 0 30px rgba(255, 159, 28, 0.2),
            inset 0 0 8px rgba(255, 255, 255, 0.3);
    }
    50% { 
        transform: scale(0.95);
        opacity: 0.7;
        box-shadow: 
            0 0 5px rgba(255, 159, 28, 0.4),
            0 0 10px rgba(255, 159, 28, 0.3),
            0 0 15px rgba(255, 159, 28, 0.1),
            inset 0 0 6px rgba(255, 255, 255, 0.2);
    }
}

@keyframes ringPulseHibernacion {
    0%, 100% { 
        transform: scale(1);
        opacity: 0.4;
    }
    50% { 
        transform: scale(1.1);
        opacity: 0.1;
    }
}

/* ===== ESTADO: DESCONECTADO ===== */
.estado-offline {
    background: linear-gradient(135deg, #6B7280 0%, #4B5563 50%, #374151 100%);
    box-shadow: 
        0 0 5px rgba(107, 114, 128, 0.3),
        0 0 10px rgba(107, 114, 128, 0.2),
        inset 0 0 5px rgba(255, 255, 255, 0.1);
    animation: none;
}

.estado-offline::before {
    border-color: rgba(107, 114, 128, 0.2);
    animation: none;
}

.estado-offline::after {
    animation: none;
    opacity: 0.3;
}

/* ===== EFECTO DE LEVITACIÓN ===== */
@keyframes floatGlow {
    0%, 100% { 
        transform: translateY(0);
    }
    50% { 
        transform: translateY(-2px);
    }
}

@keyframes innerGlow {
    0%, 100% { 
        opacity: 0.6;
        transform: scale(1);
    }
    50% { 
        opacity: 1;
        transform: scale(1.2);
    }
}

/* ===== TOOLTIPS FUTURISTAS ===== */
.estado-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, rgba(15, 15, 35, 0.95), rgba(26, 0, 51, 0.95));
    color: white;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(147, 51, 234, 0.3);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(147, 51, 234, 0.2);
    z-index: 100;
    margin-bottom: 8px;
}

.estado-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(26, 0, 51, 0.95);
}

.estado-conexion:hover .estado-tooltip {
    opacity: 1;
    visibility: visible;
}

/* ===== TABLA DE USUARIOS - COLUMNA DE ESTADO ===== */
.tabla-usuarios-estados th:first-child,
.tabla-usuarios-estados td:first-child {
    width: 60px;
    text-align: center;
}

/* ===== HEADER DE COLUMNA ESTADO ===== */
.estado-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.estado-header i {
    color: var(--purple-light);
    animation: headerPulse 2s ease-in-out infinite;
}

@keyframes headerPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .estado-conexion {
        width: 30px;
        height: 30px;
    }
    
    .estado-indicador {
        width: 12px;
        height: 12px;
    }
    
    /* Icono de luna para hibernación */
    .estado-hibernacion .estado-icono {
        position: absolute;
        font-size: 10px;
        color: white;
        text-shadow: 0 0 5px rgba(255,255,255,0.5);
        z-index: 2;
    }
    
    @keyframes pulseHibernacion {
        0%, 100% { 
            transform: scale(1);
            opacity: 1;
            box-shadow: 
                0 0 10px rgba(255, 159, 28, 0.6),
                0 0 20px rgba(255, 159, 28, 0.4),
                0 0 30px rgba(255, 159, 28, 0.2),
                inset 0 0 8px rgba(255, 255, 255, 0.3);
        }
        50% { 
            transform: scale(0.95);
            opacity: 0.7;
            box-shadow: 
                0 0 5px rgba(255, 159, 28, 0.4),
                0 0 10px rgba(255, 159, 28, 0.3),
                0 0 15px rgba(255, 159, 28, 0.1),
                inset 0 0 6px rgba(255, 255, 255, 0.2);
        }
    }
    
    @keyframes ringPulseHibernacion {
        0%, 100% { 
            transform: scale(1);
            opacity: 0.4;
        }
        50% { 
            transform: scale(1.1);
            opacity: 0.1;
        }
    }
    
    /* ===== ESTADO: DESCONECTADO ===== */
    .estado-offline {
        background: linear-gradient(135deg, #6B7280 0%, #4B5563 50%, #374151 100%);
        box-shadow: 
            0 0 5px rgba(107, 114, 128, 0.3),
            0 0 10px rgba(107, 114, 128, 0.2),
            inset 0 0 5px rgba(255, 255, 255, 0.1);
        animation: none;
    }
    
    .estado-offline::before {
        border-color: rgba(107, 114, 128, 0.2);
        animation: none;
    }
    
    .estado-offline::after {
        animation: none;
        opacity: 0.3;
    }
    
    /* ===== EFECTO DE LEVITACIÓN ===== */
    @keyframes floatGlow {
        0%, 100% { 
            transform: translateY(0);
        }
        50% { 
            transform: translateY(-2px);
        }
    }
    
    @keyframes innerGlow {
        0%, 100% { 
            opacity: 0.6;
            transform: scale(1);
        }
        50% { 
            opacity: 1;
            transform: scale(1.2);
        }
    }
    
    /* ===== TOOLTIPS FUTURISTAS ===== */
    .estado-tooltip {
        position: absolute;
        bottom: 100%;
        left: 50%;
        transform: translateX(-50%);
        background: linear-gradient(135deg, rgba(15, 15, 35, 0.95), rgba(26, 0, 51, 0.95));
        color: white;
        padding: 8px 14px;
        border-radius: 8px;
        font-size: 12px;
        font-weight: 500;
        white-space: nowrap;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        border: 1px solid rgba(147, 51, 234, 0.3);
        box-shadow: 
            0 4px 15px rgba(0, 0, 0, 0.3),
            0 0 20px rgba(147, 51, 234, 0.2);
        z-index: 100;
        margin-bottom: 8px;
    }
    
    .estado-tooltip::after {
        content: '';
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        border: 6px solid transparent;
        border-top-color: rgba(26, 0, 51, 0.95);
    }
    
    .estado-conexion:hover .estado-tooltip {
        opacity: 1;
        visibility: visible;
    }
    
    /* ===== TABLA DE USUARIOS - COLUMNA DE ESTADO ===== */
    .tabla-usuarios-estados th:first-child,
    .tabla-usuarios-estados td:first-child {
        width: 60px;
        text-align: center;
    }
    
    /* ===== HEADER DE COLUMNA ESTADO ===== */
    .estado-header {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
    }
    
    .estado-header i {
        color: var(--purple-light);
        animation: headerPulse 2s ease-in-out infinite;
    }
    
    @keyframes headerPulse {
        0%, 100% { opacity: 0.7; }
        50% { opacity: 1; }
    }
    
    /* ===== RESPONSIVE ===== */
    @media (max-width: 768px) {
        .estado-conexion {
            width: 30px;
            height: 30px;
        }
        
        .estado-indicador {
            width: 12px;
            height: 12px;
        }
        
        .estado-indicador::before {
            width: 18px;
            height: 18px;
        }
    }
}

/* =============================================
   NAVBAR RIGHT ITEMS - ESPACIADO DESKTOP
   ============================================= */
.navbar-right-items > .nav-item {
    margin-left: 8px;
    margin-right: 8px;
}

@media (min-width: 992px) {
    .navbar-right-items > .nav-item {
        margin-left: 12px;
        margin-right: 12px;
    }
}

/* =============================================
   NOTIFICACIONES DE ERROR DEL BOT
   ============================================= */

/* Campana / ícono de alerta */
.notif-error-bell {
    position: relative;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7) !important;
    transition: color 0.3s ease;
    cursor: pointer;
    padding: 8px 12px !important;
}

.notif-error-bell:hover {
    color: #FCD34D !important;
}

/* Badge de conteo */
.notif-error-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #EF4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.6);
}

/* Animación de destello/pulso cuando hay errores sin leer */
.notif-error-bell.has-errors {
    color: #FCD34D !important;
    animation: notifBellPulse 1.5s ease-in-out infinite;
}

.notif-error-bell.has-errors .notif-error-badge {
    animation: notifBadgeGlow 1.5s ease-in-out infinite;
}

@keyframes notifBellPulse {
    0%, 100% { 
        color: #FCD34D;
        text-shadow: 0 0 5px rgba(252, 211, 77, 0.3);
        transform: scale(1);
    }
    25% {
        transform: scale(1.15) rotate(-5deg);
    }
    50% { 
        color: #F59E0B;
        text-shadow: 0 0 15px rgba(245, 158, 11, 0.8);
        transform: scale(1.15) rotate(5deg);
    }
    75% {
        transform: scale(1.15) rotate(-3deg);
    }
}

@keyframes notifBadgeGlow {
    0%, 100% { 
        box-shadow: 0 0 6px rgba(239, 68, 68, 0.4);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 16px rgba(239, 68, 68, 0.9), 0 0 30px rgba(239, 68, 68, 0.4);
        transform: scale(1.15);
    }
}

/* Dropdown de notificaciones */
.notif-error-dropdown {
    width: 420px;
    max-width: 95vw;
    background: rgba(15, 15, 35, 0.98) !important;
    border: 1px solid rgba(147, 51, 234, 0.3);
    border-radius: 12px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(147, 51, 234, 0.15);
    padding: 0 !important;
    overflow: hidden;
    backdrop-filter: blur(15px);
}

.notif-error-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(147, 51, 234, 0.15);
    color: white;
}

.notif-error-header .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
    padding: 2px 8px;
}

.notif-error-header .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.notif-error-body {
    max-height: 400px;
    overflow-y: auto;
    padding: 0;
}

.notif-error-body::-webkit-scrollbar {
    width: 5px;
}

.notif-error-body::-webkit-scrollbar-track {
    background: transparent;
}

.notif-error-body::-webkit-scrollbar-thumb {
    background: rgba(147, 51, 234, 0.4);
    border-radius: 3px;
}

/* Estado vacío */
.notif-error-empty {
    text-align: center;
    padding: 30px 20px;
    color: rgba(255, 255, 255, 0.5);
}

.notif-error-empty i {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

/* Cada item de notificación */
.notif-error-item {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background 0.2s ease;
    position: relative;
}

.notif-error-item:hover {
    background: rgba(147, 51, 234, 0.1);
}

.notif-error-item.no-leido {
    background: rgba(239, 68, 68, 0.08);
    border-left: 3px solid #EF4444;
}

.notif-error-item.no-leido:hover {
    background: rgba(239, 68, 68, 0.15);
}

.notif-error-item .notif-tipo {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 4px;
}

.notif-tipo-IAERR { background: rgba(239, 68, 68, 0.2); color: #FCA5A5; }
.notif-tipo-BOTCFG { background: rgba(245, 158, 11, 0.2); color: #FCD34D; }
.notif-tipo-AUDIOERR { background: rgba(59, 130, 246, 0.2); color: #93C5FD; }
.notif-tipo-FLUJO { background: rgba(147, 51, 234, 0.2); color: #C4B5FD; }
.notif-tipo-CONEXION { background: rgba(239, 68, 68, 0.2); color: #FCA5A5; }
.notif-tipo-OTRO { background: rgba(107, 114, 128, 0.2); color: #D1D5DB; }

.notif-error-item .notif-mensaje {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    margin-bottom: 3px;
    line-height: 1.3;
}

.notif-error-item .notif-detalle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    line-height: 1.3;
    word-break: break-word;
}

.notif-error-item .notif-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
}

.notif-error-item .notif-contacto {
    color: var(--purple-lighter);
    font-weight: 600;
}

.notif-error-item .notif-origen {
    display: inline-block;
    font-size: 0.6rem;
    padding: 1px 5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.05);
}

/* Footer del dropdown */
.notif-error-footer {
    padding: 8px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.notif-error-footer .btn-outline-danger {
    font-size: 0.75rem;
    border-color: rgba(239, 68, 68, 0.3);
    color: rgba(239, 68, 68, 0.7);
}

.notif-error-footer .btn-outline-danger:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #EF4444;
}

/* Responsive para notificaciones */
@media (max-width: 768px) {
    .notif-error-dropdown {
        width: 320px;
        right: -60px !important;
    }
    
    .notif-error-body {
        max-height: 300px;
    }
}

/* =============================================
   SOPORTE - NOTIFICACIÓN NAVBAR (AZUL NEÓN)
   ============================================= */

.soporte-notif-bell {
    position: relative;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7) !important;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 8px 12px !important;
}

.soporte-notif-bell:hover {
    color: #00D4FF !important;
}

.soporte-notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #00D4FF;
    color: #000;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
    line-height: 1.2;
}

.soporte-notif-bell.has-soporte-msgs {
    color: #00D4FF !important;
    animation: soporteBellPulse 1.5s ease-in-out infinite;
}

.soporte-notif-bell.has-soporte-msgs .soporte-notif-badge {
    animation: soporteBadgeGlow 1.5s ease-in-out infinite;
}

@keyframes soporteBellPulse {
    0%, 100% { 
        color: #00D4FF;
        text-shadow: 0 0 5px rgba(0, 212, 255, 0.3);
    }
    50% { 
        color: #66E5FF;
        text-shadow: 0 0 20px rgba(0, 212, 255, 0.6), 0 0 40px rgba(0, 212, 255, 0.3);
    }
}

@keyframes soporteBadgeGlow {
    0%, 100% { 
        box-shadow: 0 0 6px rgba(0, 212, 255, 0.4);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 12px rgba(0, 212, 255, 0.8);
        transform: scale(1.1);
    }
}

/* =============================================
   SOPORTE - LAYOUT PRINCIPAL
   ============================================= */

.soporte-admin-container {
    min-height: 500px;
}

.soporte-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
}

.soporte-tab {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    padding: 8px 20px;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.soporte-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.soporte-tab.active {
    background: rgba(0, 212, 255, 0.15);
    border-color: rgba(0, 212, 255, 0.3);
    color: #00D4FF;
}

.soporte-tab-content {
    display: none;
}

.soporte-tab-content.active {
    display: block;
}

/* =============================================
   SOPORTE - LAYOUT 2 PANELES (ADMIN)
   ============================================= */

.soporte-layout {
    display: flex;
    gap: 15px;
    height: 600px;
}

.soporte-lista-panel {
    width: 320px;
    min-width: 280px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.soporte-lista-header {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.soporte-lista-header h6 {
    margin: 0;
    font-size: 0.9rem;
}

.soporte-lista {
    flex: 1;
    overflow-y: auto;
}

.soporte-lista::-webkit-scrollbar {
    width: 4px;
}

.soporte-lista::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.3);
    border-radius: 2px;
}

.soporte-lista-empty {
    text-align: center;
    padding: 40px 20px;
}

.soporte-chat-panel {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.soporte-chat-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

/* =============================================
   SOPORTE - ITEMS DE TICKET
   ============================================= */

.soporte-ticket-item {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
}

.soporte-ticket-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.soporte-ticket-item.active {
    background: rgba(0, 212, 255, 0.1);
}

/* Estado: Abierto (ROJO) */
.soporte-ticket-item.soporte-estado-abierto {
    border-left-color: #EF4444;
}

/* Estado: En revisión (NARANJA) */
.soporte-ticket-item.soporte-estado-revision {
    border-left-color: #F59E0B;
}

/* Estado: Información (AZUL) */
.soporte-ticket-item.soporte-estado-informacion {
    border-left-color: #3B82F6;
}

/* Estado: Solucionado (VERDE) */
.soporte-ticket-item.soporte-estado-solucionado {
    border-left-color: #10B981;
    opacity: 0.7;
}

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

.soporte-ticket-nombre {
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.soporte-ticket-estado {
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.soporte-estado-abierto .soporte-ticket-estado {
    background: rgba(239, 68, 68, 0.2);
    color: #FCA5A5;
}

.soporte-estado-revision .soporte-ticket-estado {
    background: rgba(245, 158, 11, 0.2);
    color: #FCD34D;
}

.soporte-estado-informacion .soporte-ticket-estado {
    background: rgba(59, 130, 246, 0.2);
    color: #93C5FD;
}

.soporte-estado-solucionado .soporte-ticket-estado {
    background: rgba(16, 185, 129, 0.2);
    color: #6EE7B7;
}

.soporte-ticket-preview {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.soporte-ticket-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}

.soporte-ticket-tiempo {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.7rem;
}

.soporte-badge-noleido {
    background: #00D4FF;
    color: #000;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* =============================================
   SOPORTE - CHAT HEADER
   ============================================= */

.soporte-chat-header {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.soporte-chat-info h6 {
    color: white;
}

.soporte-estado-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.soporte-estado-badge.soporte-estado-abierto {
    background: rgba(239, 68, 68, 0.2);
    color: #FCA5A5;
}

.soporte-estado-badge.soporte-estado-revision {
    background: rgba(245, 158, 11, 0.2);
    color: #FCD34D;
}

.soporte-estado-badge.soporte-estado-informacion {
    background: rgba(59, 130, 246, 0.2);
    color: #93C5FD;
}

.soporte-estado-badge.soporte-estado-solucionado {
    background: rgba(16, 185, 129, 0.2);
    color: #6EE7B7;
}

.soporte-chat-acciones {
    display: flex;
    gap: 5px;
    align-items: center;
    flex-wrap: wrap;
}

.soporte-chat-acciones .btn {
    font-size: 0.75rem;
    padding: 3px 10px;
}

/* =============================================
   SOPORTE - LEYENDA EN REVISIÓN
   ============================================= */

.soporte-leyenda-revision {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #FCD34D;
    padding: 8px 15px;
    text-align: center;
    font-size: 0.85rem;
}

.soporte-leyenda-revision i {
    margin-right: 5px;
}

.soporte-leyenda-informacion {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #93C5FD;
    padding: 8px 15px;
    text-align: center;
    font-size: 0.85rem;
}

.soporte-leyenda-informacion i {
    margin-right: 5px;
}

/* =============================================
   SOPORTE - MENSAJES DEL CHAT
   ============================================= */

.soporte-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.soporte-chat-messages::-webkit-scrollbar {
    width: 4px;
}

.soporte-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.3);
    border-radius: 2px;
}

.soporte-msg {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.4;
    position: relative;
}

.soporte-msg-propio {
    align-self: flex-end;
    background: rgba(0, 212, 255, 0.15);
    border: 1px solid rgba(0, 212, 255, 0.2);
    color: white;
    border-bottom-right-radius: 4px;
}

.soporte-msg-otro {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    border-bottom-left-radius: 4px;
}

.soporte-bot-label {
    display: inline-block;
    font-size: 0.65rem;
    background: rgba(147, 51, 234, 0.3);
    color: #C084FC;
    padding: 1px 6px;
    border-radius: 4px;
    margin-bottom: 4px;
}

.soporte-msg-texto {
    word-break: break-word;
}

.soporte-msg-imagen {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.soporte-msg-imagen:hover {
    opacity: 0.9;
}

.soporte-msg-video {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
}

.soporte-msg-audio {
    width: 100%;
    max-width: 280px;
    height: 36px;
    border-radius: 8px;
}

.soporte-msg-documento {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 10px 14px;
    color: white;
    text-decoration: none;
    transition: all 0.2s;
    min-width: 200px;
}

.soporte-msg-documento:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #00D4FF;
    text-decoration: none;
}

.soporte-msg-documento > i:first-child {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.soporte-doc-info {
    flex: 1;
    overflow: hidden;
}

.soporte-doc-nombre {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.soporte-doc-tamano {
    display: block;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
}

.soporte-doc-download {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
}

.soporte-msg-documento:hover .soporte-doc-download {
    color: #00D4FF;
}

.soporte-msg-meta {
    text-align: right;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 4px;
}

/* =============================================
   SOPORTE - INPUT DE MENSAJE
   ============================================= */

.soporte-chat-input {
    padding: 12px 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.soporte-input-wrapper {
    flex: 1;
    position: relative;
}

.soporte-textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: white;
    padding: 10px 14px;
    font-size: 0.9rem;
    resize: none;
    outline: none;
    transition: border-color 0.3s;
    max-height: 120px;
}

.soporte-textarea:focus {
    border-color: rgba(0, 212, 255, 0.5);
}

.soporte-textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.soporte-char-counter {
    position: absolute;
    bottom: 4px;
    right: 10px;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.3);
}

.soporte-input-actions {
    display: flex;
    gap: 5px;
    align-items: center;
}

.soporte-btn-archivo {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
}

.soporte-btn-archivo:hover {
    background: rgba(0, 212, 255, 0.15);
    color: #00D4FF;
    border-color: rgba(0, 212, 255, 0.3);
}

.soporte-btn-enviar {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #00D4FF;
    border: none;
    border-radius: 8px;
    color: #000;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
}

.soporte-btn-enviar:hover {
    background: #33DDFF;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.4);
}

/* =============================================
   SOPORTE - CHAT CERRADO/SOLUCIONADO
   ============================================= */

.soporte-chat-cerrado {
    padding: 15px;
    text-align: center;
    background: rgba(16, 185, 129, 0.1);
    border-top: 1px solid rgba(16, 185, 129, 0.2);
    color: #6EE7B7;
    font-size: 0.9rem;
}

.soporte-chat-cerrado i {
    margin-right: 5px;
}

/* =============================================
   SOPORTE - CONFIGURACIÓN (ADMIN)
   ============================================= */

.soporte-config-container {
    max-width: 700px;
}

.soporte-config-options {
    display: flex;
    gap: 10px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.soporte-config-radio {
    flex: 1;
    min-width: 150px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 12px 15px;
    cursor: pointer;
    transition: all 0.3s;
    color: rgba(255, 255, 255, 0.7);
}

.soporte-config-radio:hover {
    background: rgba(255, 255, 255, 0.08);
}

.soporte-config-radio.active {
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.3);
    color: #00D4FF;
}

.soporte-config-radio input[type="radio"] {
    display: none;
}

/* =============================================
   SOPORTE - VISTA USUARIO (CREAR TICKET)
   ============================================= */

.soporte-usuario-container {
    max-width: 800px;
    margin: 0 auto;
}

.soporte-crear-container {
    max-width: 500px;
    margin: 0 auto;
}

/* =============================================
   SOPORTE - RESPONSIVE
   ============================================= */

@media (max-width: 992px) {
    .soporte-layout {
        flex-direction: column;
        height: auto;
    }
    
    .soporte-lista-panel {
        width: 100%;
        max-height: 250px;
    }
    
    .soporte-chat-panel {
        min-height: 400px;
    }
}

@media (max-width: 576px) {
    .soporte-msg {
        max-width: 90%;
    }
    
    .soporte-chat-acciones {
        flex-wrap: wrap;
    }
    
    .soporte-config-options {
        flex-direction: column;
    }
}

/* =============================================
   SWITCH DE IA PAUSADA/ACTIVA (WhatsApp Sessions)
   ============================================= */
.ia-switch-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.ia-switch-label:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.ia-switch-text {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

.ia-switch-input {
    display: none;
}

.ia-switch-slider {
    position: relative;
    width: 40px;
    height: 22px;
    background: #6c757d;
    border-radius: 11px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.ia-switch-slider::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.ia-switch-input:checked + .ia-switch-slider {
    background: #28a745;
}

.ia-switch-input:checked + .ia-switch-slider::after {
    left: 21px;
}

/* =============================================
   MODAL ELIMINAR SESIÓN - ADVERTENCIA ROJA
   ============================================= */
.swal-danger-popup {
    border: 2px solid #dc3545 !important;
    box-shadow: 0 0 30px rgba(220, 53, 69, 0.3) !important;
}

.animated-danger {
    animation: borderPulse 2s infinite;
}

@keyframes borderPulse {
    0%, 100% {
        border-color: #dc3545;
        box-shadow: 0 0 20px rgba(220, 53, 69, 0.3);
    }
    50% {
        border-color: #ff6b7a;
        box-shadow: 0 0 40px rgba(220, 53, 69, 0.5);
    }
}

.eliminar-sesion-warning {
    text-align: center;
    padding: 10px;
}

.warning-icon-container {
    margin-bottom: 10px;
}

.pulse-danger {
    animation: pulseDanger 1.5s infinite;
}

@keyframes pulseDanger {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.fa-shake {
    animation: shake 0.5s infinite;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px) rotate(-5deg); }
    75% { transform: translateX(3px) rotate(5deg); }
}

.session-name-highlight {
    font-size: 1.2rem;
    font-weight: bold;
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
    padding: 8px 15px;
    border-radius: 8px;
    display: inline-block;
    border: 1px dashed #dc3545;
}

.btn-danger-pulse {
    animation: btnPulse 2s infinite;
}

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

/* Animaciones de entrada/salida para el modal */
.animate__fadeInDown {
    animation: fadeInDown 0.4s ease-out;
}

.animate__fadeOutUp {
    animation: fadeOutUp 0.3s ease-in;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translate3d(0, -30px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes fadeOutUp {
    from {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
    to {
        opacity: 0;
        transform: translate3d(0, -30px, 0);
    }
}