    :root {
        --generic-bg: #000000;
        --generic-border: #e0e0e0;
        --generic-chip-bg: #000000;
        --generic-active-bg: #1e177e;
        --generic-active-text: #ffffff;
        --generic-text: #3c4043;
        --generic-primary: #003d7a;
        --generic-btn-gradient: linear-gradient(135deg, #003d7a 0%, #0056b3 100%);
    }

    /* SIAAH Theme Overrides */
    .generic-chatbot-wrapper[data-theme="siaah"] {
        --generic-bg: #000000;
        --generic-border: #bfd4ed;
        --generic-chip-bg: #000000;
        --generic-active-bg: #000000;
        --generic-active-text: #ffffff;
        --generic-text: #2c3e50;
        --generic-primary: #0050cd;
        --generic-btn-gradient: linear-gradient(135deg, #0033a0 0%, #0073ff 100%);
    }

    /* Esto asegura que el padding no "empuje" el ancho hacia afuera */
    .generic-chatbot-wrapper,
    .generic-chatbot-wrapper * {
        box-sizing: border-box;
    }

    .generic-chatbot-wrapper {
        width: 100%;
        max-width: 100%;
        height: calc(100vh - 80px);
        display: flex;
        flex-direction: column;
        align-items: stretch;
        font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

        border-radius: 24px;
        background: rgba(10, 20, 40, 0.95);
        /* backdrop-filter: blur(20px); Eliminado por rendimiento */
        /* -webkit-/* backdrop-filter: blur(20px); Eliminado por rendimiento */
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
        overflow: hidden;
        margin: 10px;
        box-sizing: border-box;
    }

    .generic-chat-container {
        flex: 1;
        height: auto;
        min-height: 0;
        max-height: none;
        overflow-y: auto;
        padding: 20px 5%;
        display: flex;
        flex-direction: column;
        gap: 20px;
        background: transparent;
    }

    /* Layout and Header */
    .generic-chatbot-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 20px;
        background: rgba(0, 0, 0, 0.2);
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        box-sizing: border-box;
    }

    .generic-chatbot-header button {
        background: rgba(255, 255, 255, 0.05);
        border: none;
        border-radius: 8px;
        padding: 8px 15px;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 14px;
        font-weight: 500;
        color: #e2e8f0;
        transition: all 0.2s;
    }

    .generic-chatbot-header button:hover {
        background: rgba(255, 255, 255, 0.08);
        /* Ligeramente más solido al remover blur */
    }

    .generic-layout-container {
        display: flex;
        flex: 1;
        overflow: hidden;
        position: relative;
    }

    .generic-chat-area {
        flex: 1;
        display: flex;
        flex-direction: column;
        min-width: 0;
    }

    /* History Sidebar */
    .generic-history-sidebar {
        width: 280px;
        background: rgba(0, 0, 0, 0.15) !important;
        border-right: 1px solid rgba(255, 255, 255, 0.05) !important;
        color: #ffffff !important;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        transition: transform 0.3s ease, margin-left 0.3s ease;
    }

    .generic-history-sidebar.collapsed {
        margin-left: -280px;
    }

    .generic-history-list {
        padding: 15px;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .generic-history-item {
        padding: 12px 15px;
        background: #f9f9f9;
        border: 1px solid transparent;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.2s;
    }

    .generic-history-item:hover {
        background: #f0f0f0;
    }

    .generic-history-item.active {
        background: var(--generic-active-bg);
        border-color: #000000;
    }

    .generic-history-item-title {
        font-size: 14px;
        font-weight: 600;
        color: var(--generic-text);
        margin-bottom: 4px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .generic-history-item-date {
        font-size: 12px;
        color: #70757a;
    }

    .generic-history-loading,
    .generic-history-empty {
        font-size: 14px;
        color: #70757a;
        text-align: center;
        padding: 20px 0;
    }

    /* Estilos de mensajes */
    .generic-message {
        padding: 12px 20px;
        border-radius: 20px;
        margin-bottom: 10px;
        word-wrap: break-word;
        animation: fadeIn 0.3s ease;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .generic-message.generic-user {
        align-self: flex-end;
        background: linear-gradient(135deg, #0047a0 0%, #0088ff 100%);
        color: #ffffff;
        border-radius: 20px 20px 2px 20px;
        padding: 16px 22px;
        font-size: 16px;
        line-height: 1.6;
        box-shadow: 0 4px 15px rgba(0, 136, 255, 0.3);
        margin-left: auto;
        max-width: 70%;
    }

    .generic-message.generic-ai {
        width: auto;
        max-width: 90%;
        line-height: 1.6;
        background: rgba(255, 255, 255, 0.08);
        /* Ligeramente más solido al remover blur */
        /* backdrop-filter: blur(10px); Eliminado por rendimiento */
        /* -webkit-/* backdrop-filter: blur(10px); Eliminado por rendimiento */
        border: 1px solid rgba(255, 255, 255, 0.15);
        color: #ffffff;
        border-radius: 20px 20px 20px 2px;
        padding: 16px 22px;
        font-size: 16px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        margin-right: auto;
    }

    .generic-message.generic-ai h1,
    .generic-message.generic-ai h2,
    .generic-message.generic-ai h3 {
        margin-top: 1em;
        margin-bottom: 0.5em;
        color: var(--generic-primary);
    }

    .generic-message.generic-ai ul,
    .generic-message.generic-ai ol {
        margin: 10px 0;
        padding-left: 25px;
    }

    .generic-message.generic-ai code {
        background: #f5f5f5;
        padding: 2px 6px;
        border-radius: 3px;
        font-size: 0.9em;
    }

    .generic-message.generic-ai pre {
        background: #f5f5f5;
        padding: 15px;
        border-radius: 6px;
        overflow-x: auto;
    }

    .generic-sources {
        font-size: 12px;
        color: #70757a;
        margin-top: 15px;
        padding-top: 10px;
        border-top: 1px solid #e0e0e0;
        font-style: italic;
    }

    /* Área de input */
    .generic-input-wrapper {
        background: rgba(0, 0, 0, 0.2);
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        border-radius: 24px;
        padding: 20px 70px 20px 20px;
        position: relative;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
        margin: 0 20px 20px 20px;
        transition: border-color 0.3s ease, box-shadow 0.3s ease;
        box-sizing: border-box;
        width: auto;
    }

    /* Ocultamos el efecto visual anterior para evitar que se pinte azul en modo oscuro */
    .generic-input-wrapper:focus-within {
        border-color: rgba(255, 255, 255, 0.2) !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
    }

    .generic-textarea {
        width: 100%;
        border: 1px solid rgba(255, 255, 255, 0.2);
        background: rgba(255, 255, 255, 0.05);
        border-radius: 12px;
        color: #ffffff !important;
        padding: 15px 18px;
        font-size: 15px;
        font-family: inherit;
        resize: none;
        outline: none;
        transition: border-color 0.3s;
        min-height: 50px;
        max-height: 150px;
    }

    .generic-textarea:focus {
        background: rgba(255, 255, 255, 0.08);
        /* Ligeramente más solido al remover blur */
        border-color: #0088ff;
        color: #ffffff !important;
        outline: none;
        box-shadow: 0 0 0 3px rgba(0, 136, 255, 0.2);
    }

    /* Controles inferiores */
    .generic-bottom-controls {
        margin-top: 0;
        padding: 0;
        display: flex;
        justify-content: flex-start;
        /* Alineados a la izquierda */
        width: 100%;
    }

    .generic-chips-group {
        display: flex;
        gap: 10px;
        align-items: center;
        flex: 1;
        flex-wrap: wrap;
    }

    /* Chips de filtro */
    .generic-filter-chip {
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.2);
        color: #cbd5e1;
        border-radius: 25px;
        padding: 10px 18px;
        font-size: 14px;
        cursor: pointer;
        transition: all 0.2s ease;
        white-space: nowrap;
        font-weight: 500;
    }

    .generic-filter-chip:hover {
        background: rgba(255, 255, 255, 0.15);
        color: #ffffff;
        border-color: rgba(255, 255, 255, 0.4);
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
        transform: translateY(-1px);
    }

    .generic-filter-chip.active {
        background: linear-gradient(135deg, #0050cd 0%, #0073ff 100%);
        color: #ffffff;
        border-color: transparent;
        font-weight: 600;
        box-shadow: 0 4px 15px rgba(0, 115, 255, 0.4);
    }

    .generic-hidden {
        display: none !important;
    }

    /* Modo Informes */
    .generic-informes-active-container {
        display: none;
        align-items: center;
        gap: 12px;
        position: relative;
    }

    .generic-informes-active-container.visible {
        display: inline-flex;
    }

    /* Botón circular (+) en modo info */
    .generic-circle-plus-btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: background 0.1s ease;
        flex-shrink: 0;
        padding: 0;
        box-sizing: border-box;
    }

    .generic-circle-plus-btn:hover {
        background: rgba(255, 255, 255, 0.15);
        border-color: rgba(255, 255, 255, 0.4);
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
        transform: translateY(-1px);
    }

    /* Fix strict SVG size for Elementor */
    .generic-circle-plus-btn svg {
        stroke: #ffffff;
        stroke-width: 2;
        width: 18px !important;
        height: 18px !important;
        min-width: 18px !important;
        min-height: 18px !important;
        display: block !important;
        flex-shrink: 0;
    }

    /* Etiqueta de informe seleccionado */
    .generic-report-label-chip {
        background: rgba(255, 255, 255, 0.08);
        /* Ligeramente más solido al remover blur */
        border: 1px solid rgba(255, 255, 255, 0.2);
        color: #ffffff;
        padding: 8px 18px;
        border-radius: 20px;
        font-size: 14px;
        font-weight: 500;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 350px;
        cursor: pointer;
        user-select: none;
        height: 36px;
        display: inline-flex;
        align-items: center;
        line-height: 1;
        transition: background 0.1s;
    }

    .generic-report-label-chip:hover {
        background: rgba(255, 255, 255, 0.2);
    }

    /* Menú desplegable */
    .generic-dropdown-menu {
        position: absolute;
        bottom: calc(100% + 15px);
        left: 0;
        background: rgb(22, 33, 56);
        border: 1px solid rgba(255, 255, 255, 0.15);
        border-radius: 12px;
        color: #e2e8f0;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        width: 320px;
        max-height: 200px;
        overflow-y: auto;
        display: none;
        z-index: 1000;
    }

    .generic-dropdown-menu.show {
        display: block;
    }

    .generic-dropdown-item {
        padding: 12px 18px;
        font-size: 14px;
        cursor: pointer;
        color: #cbd5e1;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        transition: background 0.1s;
    }

    .generic-dropdown-item:last-child {
        border-bottom: none;
    }

    .generic-dropdown-item:hover {
        background: rgba(255, 255, 255, 0.08);
        /* Ligeramente más solido al remover blur */
        color: #ffffff;
    }

    /* Botón de enviar */
    .generic-send-btn {
        background: var(--generic-btn-gradient);
        color: white;
        border: none;
        width: 42px;
        height: 42px;
        min-width: 42px;
        /* Fix squish */
        min-height: 42px;
        /* Fix squish */
        border-radius: 50%;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
        flex-shrink: 0;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
        position: absolute;
        /* Flotante */
        right: 15px;
        /* Pegado a la derecha */
        bottom: 15px;
        /* Pegado abajo */
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    /* Fix Elementor SVG squish */
    .generic-send-btn svg {
        width: 18px !important;
        height: 18px !important;
        min-width: 18px !important;
        min-height: 18px !important;
        display: block !important;
        flex-shrink: 0;
    }

    .generic-send-btn:hover {
        transform: scale(1.1);
        box-shadow: 0 4px 12px rgba(0, 61, 122, 0.4);
    }

    .generic-send-btn:active {
        transform: scale(0.95);
    }

    .generic-send-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        transform: none;
    }

    /* Loading spinner */
    .generic-loading {
        display: inline-block;
        width: 20px;
        height: 20px;
        border: 3px solid rgba(0, 61, 122, 0.2);
        border-radius: 50%;
        border-top-color: var(--generic-primary);
        animation: spin 1s ease-in-out infinite;
    }

    @keyframes spin {
        to {
            transform: rotate(360deg);
        }
    }

    /* Responsive */
    @media (max-width: 768px) {
        .generic-input-wrapper {
            background: rgba(0, 0, 0, 0.2);
            border-top: 1px solid rgba(255, 255, 255, 0.05);
            border-radius: 24px;
            padding: 20px 70px 20px 20px;
            position: relative;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
            margin: 0 20px 20px 20px;
            transition: border-color 0.3s ease, box-shadow 0.3s ease;
            box-sizing: border-box;
            width: auto;
        }

        .generic-chatbot-wrapper {
            margin: 20px 10px;
        }

        .generic-chat-container {
            min-height: 400px;
            /* Aumentado de 300px */
            max-height: 60vh;
            /* Cambiado a viewport height */
            padding: 20px 15px;
        }

        .generic-history-sidebar {
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            z-index: 100;
            transform: translateX(-100%);
            margin-left: 0 !important;
        }

        .generic-history-sidebar.show-mobile {
            transform: translateX(0);
        }

        .generic-chips-group {
            gap: 8px;
        }

        .generic-filter-chip {
            padding: 8px 14px;
            font-size: 13px;
        }

        .generic-dropdown-menu {
            width: 280px;
        }

        .generic-message.generic-user {
            align-self: flex-end;
            background: linear-gradient(135deg, #0047a0 0%, #0088ff 100%);
            color: #ffffff;
            border-radius: 20px 20px 2px 20px;
            padding: 16px 22px;
            font-size: 16px;
            line-height: 1.6;
            box-shadow: 0 4px 15px rgba(0, 136, 255, 0.3);
            margin-left: auto;
            max-width: 70%;
        }
    }

    /* Scrollbar personalizado */
    .generic-chat-container::-webkit-scrollbar,
    .generic-dropdown-menu::-webkit-scrollbar {
        width: 8px;
    }

    .generic-chat-container::-webkit-scrollbar-track,
    .generic-dropdown-menu::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 10px;
    }

    .generic-chat-container::-webkit-scrollbar-thumb,
    .generic-dropdown-menu::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 10px;
    }

    .generic-chat-container::-webkit-scrollbar-thumb:hover,
    .generic-dropdown-menu::-webkit-scrollbar-thumb:hover {
        background: #555;
    }



    /* Estilos para multiple stores */
    .generic-multiple-store-container {
        display: inline-flex;
        /* Cambiado de inline-flex a flex para consistencia */
        align-items: center;
        gap: 8px;
        flex-shrink: 0;
        /* Evita que se encoja */
    }

    .generic-multiple-active-group {
        display: none;
        align-items: center;
        gap: 8px;
    }

    .generic-multiple-active-group.visible {
        display: inline-flex !important;
    }