/* VARIABLES DE DISEÑO SYSTEM */
:root {
    --bg-primary: #080c14;
    --bg-secondary: #0f172a;
    --bg-tertiary: #1e293b;
    --border-color: rgba(255, 255, 255, 0.06);
    --border-highlight: rgba(139, 92, 246, 0.2);
    
    /* Acentos vibrantes */
    --accent-purple: #8b5cf6;
    --accent-purple-glow: rgba(139, 92, 246, 0.3);
    --accent-cyan: #06b6d4;
    --accent-cyan-glow: rgba(6, 182, 212, 0.3);
    --accent-emerald: #10b981;
    --accent-rose: #f43f5e;
    
    /* Paleta de textos */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Glassmorphism */
    --glass-bg: rgba(15, 23, 42, 0.6);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-blur: blur(16px);
    
    /* Sombras y Radios */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    
    /* Tipografía */
    --font-sans: 'Inter', sans-serif;
    --font-display: 'Outfit', sans-serif;
}

/* RESET GENERAL Y ESTILOS DE BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.5;
    height: 100vh;
    overflow: hidden;
}

/* ESTRUCTURA PRINCIPAL GRID/FLEX */
.app-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 10% 80%, rgba(6, 182, 212, 0.05) 0%, transparent 50%);
}

/* ESTILOS DE LA BARRA LATERAL (SIDEBAR) */
.sidebar {
    width: 320px;
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    height: 100%;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: -0.02em;
}

.logo-icon {
    font-size: 1.6rem;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 8px var(--accent-purple-glow));
}

.logo-accent {
    color: var(--accent-cyan);
    font-weight: 500;
}

.subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* SCROLLABLE SIDEBAR SECTIONS */
.sidebar-scrollable {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Personalizar scrollbar de la barra lateral */
.sidebar-scrollable::-webkit-scrollbar {
    width: 4px;
}

.sidebar-scrollable::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.section-title i {
    color: var(--accent-purple);
    font-size: 0.95rem;
}

/* API KEY CONTAINER */
.api-key-container {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: border-color 0.3s ease;
}

.api-key-container:focus-within {
    border-color: var(--accent-purple);
}

.input-group {
    display: flex;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    height: 38px;
}

.input-group input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    padding: 0 12px;
    font-size: 0.85rem;
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.btn-icon:hover {
    color: var(--text-primary);
}

.api-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.btn-primary-sm {
    background: linear-gradient(135deg, var(--accent-purple), #7c3aed);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px var(--accent-purple-glow);
    transition: transform 0.2s ease, filter 0.2s ease;
}

.btn-primary-sm:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
}

.status-badge {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.status-missing {
    background-color: rgba(244, 63, 94, 0.1);
    color: var(--accent-rose);
    border: 1px solid rgba(244, 63, 94, 0.2);
}

.status-active {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--accent-emerald);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.help-text {
    font-size: 0.7rem;
    color: var(--text-muted);
    line-height: 1.3;
}

.help-text a {
    color: var(--accent-cyan);
    text-decoration: none;
}

.help-text a:hover {
    text-decoration: underline;
}

/* LISTADO DE PAPERS */
.papers-list-container {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px;
    max-height: 180px;
    overflow-y: auto;
}

.papers-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.papers-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    background-color: var(--bg-tertiary);
    font-size: 0.8rem;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.papers-list li.active-paper {
    border-color: var(--border-highlight);
    background: linear-gradient(90deg, var(--bg-tertiary), rgba(139, 92, 246, 0.03));
}

.paper-name-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    flex: 1;
}

.paper-name-wrapper i {
    color: var(--accent-cyan);
    flex-shrink: 0;
}

.paper-title-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
}

.paper-status-indicator {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    flex-shrink: 0;
}

.paper-status-loading {
    background-color: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.paper-status-ready {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--accent-emerald);
}

.paper-status-error {
    background-color: rgba(244, 63, 94, 0.1);
    color: var(--accent-rose);
}

.loading-item {
    display: flex;
    align-items: center;
    justify-content: center !important;
    gap: 8px;
    color: var(--text-muted);
    padding: 16px !important;
    background: transparent !important;
}

/* DRAG & DROP ZONE */
.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px 10px;
    text-align: center;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.01);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--accent-cyan);
    background-color: rgba(6, 182, 212, 0.03);
}

.drop-icon {
    font-size: 1.6rem;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.drop-zone:hover .drop-icon {
    color: var(--accent-cyan);
    transform: translateY(-2px);
}

.drop-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* CONTEXT STATS */
.stats-container {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.stat-value {
    color: var(--text-primary);
    font-weight: 600;
}

.progress-bar-container {
    margin-top: 4px;
}

.progress-bar-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    margin-bottom: 6px;
    color: var(--text-muted);
}

.progress-track {
    height: 6px;
    background-color: var(--bg-tertiary);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-cyan));
    border-radius: 10px;
    transition: width 0.5s ease-out;
}

.progress-caption {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 6px;
    line-height: 1.2;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: center;
}

/* ESTILOS DEL CONTENEDOR DE CHAT */
.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: var(--bg-primary);
}

.chat-header {
    height: 70px;
    border-bottom: 1px solid var(--border-color);
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: rgba(8, 12, 20, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10;
}

.chat-header h1 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
}

.header-status {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.btn-secondary-sm {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-secondary-sm:hover {
    background-color: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    border-color: var(--text-muted);
}

/* ZONA DE MENSAJES */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Scrollbar para el chat */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

.message {
    display: flex;
    max-width: 85%;
    animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
    font-size: 0.9rem;
}

/* Mensaje del sistema (Bienvenida) */
.system-message {
    max-width: 100%;
    margin-bottom: 10px;
}

.system-message .message-content {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.03), rgba(6, 182, 212, 0.02));
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-lg);
    padding: 24px;
    color: var(--text-primary);
    width: 100%;
}

.system-message h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(90deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.system-message h3 i {
    color: var(--accent-purple);
    -webkit-text-fill-color: var(--accent-purple);
}

.setup-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.step-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.step-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-cyan));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.step-card:hover::before {
    opacity: 1;
}

.step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--bg-tertiary);
    color: var(--accent-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
}

.step-card h4 {
    font-family: var(--font-display);
    font-size: 0.95rem;
    color: var(--text-primary);
}

.step-card p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Sugerencias de chat */
.suggestions-container {
    margin-top: 24px;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}

.suggestions-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.suggestions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px;
}

.suggestion-btn {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    text-align: left;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1.3;
}

.suggestion-btn:hover:not(:disabled) {
    background-color: var(--bg-tertiary);
    border-color: var(--accent-purple);
    color: var(--text-primary);
}

.suggestion-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Mensajes de Usuario */
.user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.user-message .message-avatar {
    margin-right: 0;
    margin-left: 12px;
    background: linear-gradient(135deg, var(--accent-cyan), #0891b2);
    color: white;
}

.user-message .message-content {
    background-color: var(--bg-tertiary);
    border: 1px solid rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-lg) 0 var(--radius-lg) var(--radius-lg);
    padding: 14px 18px;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    white-space: pre-wrap;
}

/* Mensajes del Agente */
.agent-message {
    align-self: flex-start;
}

.agent-message .message-avatar {
    background: linear-gradient(135deg, var(--accent-purple), #6d28d9);
    color: white;
}

.agent-message .message-content {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0 var(--radius-lg) var(--radius-lg) var(--radius-lg);
    padding: 16px 20px;
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
}

/* Renderizado de Markdown en el Agente */
.message-content h1, .message-content h2, .message-content h3 {
    font-family: var(--font-display);
    margin-top: 14px;
    margin-bottom: 8px;
    color: var(--text-primary);
}
.message-content h1 { font-size: 1.3rem; }
.message-content h2 { font-size: 1.15rem; }
.message-content h3 { font-size: 1.05rem; }

.message-content p {
    margin-bottom: 12px;
    line-height: 1.6;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.message-content ul, .message-content ol {
    margin-left: 20px;
    margin-bottom: 12px;
}

.message-content li {
    margin-bottom: 4px;
}

.message-content code {
    background-color: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85em;
    font-family: monospace;
    color: #e2e8f0;
}

.message-content pre {
    background-color: #020617;
    padding: 14px;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 14px 0;
    border: 1px solid var(--border-color);
}

.message-content pre code {
    background-color: transparent;
    padding: 0;
    font-size: 0.8rem;
    color: #f1f5f9;
}

.message-content blockquote {
    border-left: 4px solid var(--accent-purple);
    padding-left: 14px;
    margin: 14px 0;
    color: var(--text-secondary);
    font-style: italic;
}

.message-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 14px 0;
    font-size: 0.85rem;
}

.message-content th, .message-content td {
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    text-align: left;
}

.message-content th {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

/* Indicador de Escritura del Agente (Typing Indicator) */
.typing-indicator-container {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 0;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background-color: var(--text-muted);
    border-radius: 50%;
    animation: typingPulse 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingPulse {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.3); opacity: 1; }
}

/* AREA DE INPUT */
.chat-input-area {
    padding: 20px 30px 24px 30px;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-primary);
}

.input-wrapper {
    display: flex;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 10px 14px;
    align-items: flex-end;
    gap: 12px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-wrapper:focus-within {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 1px var(--accent-purple-glow), var(--shadow-md);
}

.input-wrapper textarea {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    resize: none;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    max-height: 180px;
    padding: 4px 0;
    line-height: 1.4;
}

.input-wrapper textarea::placeholder {
    color: var(--text-muted);
}

.btn-send {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--accent-purple), #7c3aed);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px var(--accent-purple-glow);
    flex-shrink: 0;
}

.btn-send:hover:not(:disabled) {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.btn-send:disabled {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    cursor: not-allowed;
    box-shadow: none;
}

.input-footer {
    display: flex;
    justify-content: center;
    margin-top: 8px;
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ANIMACIONES GLOBALES Y SPINNERS */
.spinner-sm {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent-purple);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

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

/* RESPONSIVE LAYOUTS */
@media (max-width: 900px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        max-height: 400px;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .sidebar-scrollable {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        height: auto;
        padding: 14px;
        gap: 16px;
    }
    
    .sidebar-section {
        min-width: 260px;
        flex-shrink: 0;
    }
    
    .stats-section {
        min-width: 220px;
    }
    
    .sidebar-footer {
        display: none;
    }
    
    .setup-steps {
        grid-template-columns: 1fr;
    }
}

/* TOAST NOTIFICATIONS */
.notification-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    font-size: 0.85rem;
}

.notification-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-success {
    border-color: var(--accent-emerald);
    background: linear-gradient(90deg, var(--bg-secondary), rgba(16, 185, 129, 0.02));
}
.toast-success i {
    color: var(--accent-emerald);
}

.toast-error {
    border-color: var(--accent-rose);
    background: linear-gradient(90deg, var(--bg-secondary), rgba(244, 63, 94, 0.02));
}
.toast-error i {
    color: var(--accent-rose);
}

.toast-info {
    border-color: var(--accent-cyan);
    background: linear-gradient(90deg, var(--bg-secondary), rgba(6, 182, 212, 0.02));
}
.toast-info i {
    color: var(--accent-cyan);
}


/* ===== TABS DE NAVEGACIÓN (Papers / IA Libre) ===== */
.chat-tabs {
    display: flex;
    gap: 4px;
    background-color: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    padding: 4px;
}

.chat-tab {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.chat-tab:hover {
    color: var(--text-secondary);
    background-color: rgba(255, 255, 255, 0.03);
}

.chat-tab.active {
    background: linear-gradient(135deg, var(--accent-purple), #7c3aed);
    color: white;
    box-shadow: 0 2px 8px var(--accent-purple-glow);
}

.chat-tab i {
    font-size: 0.8rem;
}

/* Sección oculta */
.chat-messages.hidden {
    display: none;
}
