/* chat-main.css - Extracted from chat.html on 2025-12-31 */

/* Variables - Paleta Lohmia consistente */
        :root {
            /* Paleta de colores Lohmia */
            --bg-primary: #0f172a;
            --bg-secondary: #1e293b;
            --bg-card: #334155;
            --bg-hover: #3d4f69;
            --text-primary: #f1f5f9;
            --text-secondary: #94a3b8;
            --accent-blue: #00D4AA;  /* Verde aqua Lohmia */
            --lohmia-accent: #00D4AA;
            --accent-green: #10b981;
            --accent-red: #ef4444;
            --accent-yellow: #f59e0b;
            --accent-purple: #8b5cf6;
            --accent-cyan: #00D4AA;
            --border-color: #475569;
            --sidebar-width: 300px; /* Aumentado para caber filtros completos */

            /* Paleta específica para botón de cierre de sesiones */
            --claudia-cyan-primary: #00d9ff;
            --claudia-cyan-dark: #00b8d4;
            --claudia-cyan-bright: #00ffff;
            --claudia-dark-navy: #1a2332;
            --claudia-grey-blue: #2d3748;
            --claudia-green-online: #00ff00;

            /* Jerarquía z-index estandarizada */
            --z-base: 1;
            --z-header: 100;
            --z-sidebar: 200;
            --z-input: 300;
            --z-context-banner: 400;
            --z-dropdown: 1000;
            --z-progress: 1500;
            --z-modal: 2000;
            --z-toast: 3000;
            --z-mobile-overlay: 4900;
            --z-mobile-nav: 5000;
        }
        /* Accesibilidad: Reducir animaciones para usuarios sensibles */
        @media (prefers-reduced-motion: reduce) {
            *, *::before, *::after {
                animation-duration: 0.01ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.01ms !important;
                scroll-behavior: auto !important;
            }
        }

        /* =====================================================
           BOTÓN CERRAR OTRAS SESIONES - Estilo Claudia
           ===================================================== */
        .close-sessions-btn {
            width: 36px;
            height: 36px;
            padding: 8px;
            border-radius: 8px;
            background: rgba(45, 55, 72, 0.4);
            border: 1px solid rgba(0, 217, 255, 0.3);
            backdrop-filter: blur(4px);
            -webkit-backdrop-filter: blur(4px);
            cursor: pointer;
            transition: all 200ms ease;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            margin-left: 8px;
            vertical-align: middle;
            position: relative;
        }

        .close-sessions-btn:hover {
            background: rgba(0, 217, 255, 0.15);
            border-color: rgba(0, 217, 255, 0.6);
            box-shadow: 0 0 12px rgba(0, 217, 255, 0.3);
            transform: translateY(-2px);
        }

        .close-sessions-btn:active {
            transform: translateY(0) scale(0.95);
            background: rgba(0, 217, 255, 0.25);
            box-shadow: 0 0 8px rgba(0, 217, 255, 0.5);
            transition: all 100ms ease;
        }

        .close-sessions-btn:focus {
            outline: none;
            box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.4);
        }

        .close-sessions-btn .close-icon {
            width: 20px;
            height: 20px;
            color: var(--claudia-cyan-primary, #00d9ff);
            transition: color 200ms ease, transform 200ms ease;
        }

        .close-sessions-btn:hover .close-icon {
            color: var(--claudia-cyan-bright, #00ffff);
        }

        /* Animación de aparición */
        @keyframes closeBtn-fadeInScale {
            from {
                opacity: 0;
                transform: scale(0.8);
            }
            to {
                opacity: 1;
                transform: scale(1);
            }
        }

        /* Animación de ejecución exitosa */
        @keyframes closeBtn-successPulse {
            0% { transform: scale(1); }
            25% { transform: scale(1.1); }
            50% { transform: scale(0.95); }
            100% { transform: scale(1); }
        }

        .close-sessions-btn.show {
            animation: closeBtn-fadeInScale 300ms ease-out forwards;
        }

        .close-sessions-btn.executing {
            animation: closeBtn-successPulse 600ms ease-out;
        }

        .close-sessions-btn.executing .close-icon {
            animation: close-spin 600ms ease-out;
        }

        @keyframes close-spin {
            from { transform: rotate(0deg); }
            to { transform: rotate(180deg); }
        }

        /* Responsive para móvil */
        @media (max-width: 768px) {
            .close-sessions-btn {
                width: 32px;
                height: 32px;
                padding: 6px;
                margin-left: 4px;
            }
            .close-sessions-btn .close-icon {
                width: 16px;
                height: 16px;
            }
        }


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

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
            background: var(--bg-primary);
            color: var(--text-primary);
            line-height: 1.6;
            height: 100vh;
            display: flex;
            flex-direction: column;
        }

        /* Header - Unified styles */
        .main-header {
            background: var(--bg-secondary);
            padding: 0.75rem 2rem;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: sticky;
            top: 91px;
            z-index: 6000; /* SIEMPRE encima de sidebars (5100) y overlays (5000) */
            gap: 1rem;
        }

        .logo-section {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            flex: 0 0 150px;
        }

        .logo h1 {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--accent-blue);
        }

        .nav-links {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            flex: 1;
        }

        .header-actions {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 1rem;
            flex: 0 0 350px;
        }

        /* Indicador de operadores online */
        /* Indicador de dispositivos conectados - Diseño profesional */
        .online-operators {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 6px 12px;
            background: rgba(0, 212, 170, 0.08);
            border: 1px solid rgba(0, 212, 170, 0.2);
            border-radius: 20px;
            font-size: 0.8rem;
            cursor: default;
            transition: all 0.2s ease;
        }

        .online-operators:hover {
            background: rgba(0, 212, 170, 0.12);
            border-color: rgba(0, 212, 170, 0.3);
        }

        .online-operators .device-icon-svg {
            width: 16px;
            height: 16px;
            stroke: var(--accent-cyan, #00D4AA);
            fill: none;
            stroke-width: 2;
            flex-shrink: 0;
        }

        .online-operators .device-count-text {
            color: var(--accent-cyan, #00D4AA);
            font-weight: 600;
            font-size: 0.85rem;
            white-space: nowrap;
        }

        /* =====================================================
           WebSocket Status Indicator - SVG Icons
           ===================================================== */
        #wsStatusIndicator {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 24px;
            height: 24px;
            cursor: help;
            margin-right: 0.5rem;
        }

        #wsStatusIndicator svg {
            width: 18px;
            height: 18px;
            stroke-width: 2;
            transition: all 0.3s ease;
        }

        #wsStatusIndicator.ws-connected svg {
            stroke: var(--accent-green, #10b981);
            filter: drop-shadow(0 0 4px rgba(16, 185, 129, 0.5));
        }

        #wsStatusIndicator.ws-connecting svg {
            stroke: var(--accent-yellow, #f59e0b);
            animation: pulse 1.5s ease-in-out infinite;
        }

        #wsStatusIndicator.ws-disconnected svg {
            stroke: var(--accent-red, #ef4444);
        }

        #wsStatusIndicator.ws-error svg {
            stroke: var(--accent-red, #ef4444);
            animation: pulse 1s ease-in-out infinite;
        }

        /* =====================================================
           Command Icons - Quick Commands Dropdown
           ===================================================== */
        .dropdown-command-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 14px;
            cursor: pointer;
            transition: all 0.2s ease;
            border-radius: 6px;
            margin: 2px 6px;
        }

        .dropdown-command-item:hover {
            background: rgba(0, 212, 170, 0.1);
        }

        .cmd-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 20px;
            height: 20px;
            flex-shrink: 0;
        }

        .cmd-icon svg {
            width: 18px;
            height: 18px;
            stroke: var(--accent-cyan, #00D4AA);
        }

        .cmd-label {
            font-size: 0.875rem;
            color: var(--text-primary);
        }

        /* Mobile device indicator - visible only on mobile */
        .mobile-device-indicator {
            display: none;
            align-items: center;
            gap: 6px;
            padding: 4px 10px;
            background: rgba(0, 212, 170, 0.15);
            border-radius: 16px;
            font-size: 0.75rem;
            margin-left: auto;
        }

        .mobile-device-indicator .sync-dot {
            width: 6px;
            height: 6px;
            background: var(--accent-green);
            border-radius: 50%;
            animation: pulse-sync 2s infinite;
        }

        .mobile-device-indicator .device-count {
            color: var(--accent-cyan, #00D4AA);
            font-weight: 600;
        }

        @media (max-width: 768px) {
            .mobile-device-indicator {
                display: flex;
            }
        }


        .operator-count {
            color: var(--accent-green);
            font-weight: 600;
        }

        .operator-badge {
            background: var(--accent-green);
            color: var(--bg-primary);
            padding: 2px 8px;
            border-radius: 12px;
            font-size: 0.7rem;
            font-weight: 500;
            transition: color 0.3s ease, background-color 0.3s ease, opacity 0.3s ease;
        }

        .operator-badge.solo {
            background: var(--text-secondary);
            opacity: 0.7;
        }

        .sync-indicator {
            width: 8px;
            height: 8px;
            background: var(--accent-green);
            border-radius: 50%;
            animation: pulse-sync 2s infinite;
            transition: background-color 0.3s ease, opacity 0.3s ease;
        }

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

        /* Estados de conexión WebSocket */
        .sync-indicator.connecting {
            background: #FFA500; /* Naranja */
            animation: pulse-sync 1s infinite;
        }

        .sync-indicator.connected {
            background: var(--accent-green);
            animation: pulse-sync 2s infinite;
        }

        .sync-indicator.disconnected {
            background: #FF6B6B; /* Rojo */
            animation: none;
        }

        .sync-indicator.error {
            background: #FF4444;
            animation: pulse-sync 0.5s infinite;
        }

        .operator-badge.connecting-text {
            color: #FFA500;
            font-style: italic;
        }

        .operator-badge.offline {
            color: #FF6B6B;
        }

        .operator-badge.error {
            color: #FF4444;
        }

        .nav-btn {
            padding: 0.6rem 1.2rem;
            border-radius: 6px;
            color: var(--text-secondary);
            text-decoration: none;
            font-weight: 500;
            font-size: 0.875rem;
            transition: all 0.2s ease;
            background: transparent;
            border: 1px solid transparent;
        }

        .nav-btn:hover {
            color: var(--text-primary);
            background: rgba(0, 212, 170, 0.1);
            border-color: var(--accent-blue);
        }

        .nav-btn.active {
            color: white;
            background: var(--accent-blue);
            border-color: var(--accent-blue);
        }

        /* External link button (SaaS) */
        .nav-btn-external {
            background: linear-gradient(135deg, var(--accent-purple), #7c3aed) !important;
            color: white !important;
            border-color: var(--accent-purple) !important;
        }

        .nav-btn-external:hover {
            background: linear-gradient(135deg, #7c3aed, #6d28d9) !important;
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
        }

        .nav-btn-external::after {
            content: " ↗";
            font-size: 0.7rem;
            opacity: 0.8;
        }

        /* Mobile menu */
        .mobile-menu-toggle {
            display: none;
            background: none;
            border: none;
            color: var(--text-primary);
            font-size: 1.5rem;
            cursor: pointer;
            padding: 0.5rem;
            border-radius: 6px;
        }

        .mobile-nav-overlay {
            display: none;
            position: fixed;
            top: 91px;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 4900;
        }

        .mobile-nav-overlay.active {
            display: block;
        }

        .mobile-nav {
            display: none;
            position: fixed;
            top: 91px;
            left: -280px;
            width: 280px;
            height: 100%;
            background: var(--bg-secondary);
            z-index: 5000;
            transition: left 0.3s ease;
            flex-direction: column;
            border-right: 1px solid var(--border-color);
        }

        .mobile-nav.active {
            left: 0;
        }

        .mobile-nav-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 1rem 1.5rem;
            border-bottom: 1px solid var(--border-color);
        }

        .mobile-nav-header h2 {
            font-size: 1.2rem;
            color: var(--accent-blue);
        }

        .mobile-nav-close {
            background: none;
            border: none;
            color: var(--text-secondary);
            font-size: 1.5rem;
            cursor: pointer;
        }

        .mobile-nav-links {
            display: flex;
            flex-direction: column;
            padding: 1rem;
            gap: 0.5rem;
        }

        .mobile-nav-links .nav-btn {
            width: 100%;
            text-align: left;
            padding: 1rem 1.5rem;
            font-size: 1rem;
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .mobile-nav-links .nav-icon {
            width: 20px;
            height: 20px;
            flex-shrink: 1;
            color: var(--text-secondary);
        }

        .mobile-nav-links .nav-btn:hover .nav-icon {
            color: var(--accent-blue);
        }

        .mobile-nav-links .nav-btn.active .nav-icon {
            color: white;
        }

        @media (max-width: 768px) {
            .nav-links {
                display: none;
            }
            .mobile-menu-toggle {
                display: block;
            }
            .mobile-nav {
                display: flex;
            }
            .main-header {
                padding: 0.75rem 1rem;
            }
            .logo-section {
                flex: 1;
            }
            .header-actions {
                flex: 0 0 auto;
            }
        }

        /* Main Layout with Sidebar */
        .main-layout {
            flex: 1;
            display: flex;
            overflow: hidden;
        }

        /* Sidebar */
        .sidebar {
            width: var(--sidebar-width);
            background: var(--bg-secondary);
            border-right: 1px solid var(--border-color);
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .sidebar-header {
            padding: 1rem;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .sidebar-header h3 {
            font-size: 0.9rem;
            color: var(--text-secondary);
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        .sidebar-toggle {
            background: none;
            border: none;
            color: var(--text-secondary);
            cursor: pointer;
            font-size: 1.2rem;
            padding: 0.25rem;
        }

        .sidebar-toggle:hover {
            color: var(--text-primary);
        }

        /* Sidebar header actions container */
        .sidebar-header-actions {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        /* Notification settings button */
        .notification-settings-btn {
            background: none;
            border: none;
            color: var(--text-secondary);
            cursor: pointer;
            padding: 0.25rem;
            border-radius: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
        }

        .notification-settings-btn:hover {
            color: var(--accent-primary);
            background: rgba(0, 212, 170, 0.1);
        }

        .notification-settings-btn.active {
            color: var(--accent-primary);
            background: rgba(0, 212, 170, 0.15);
        }

        /* Notification Settings Panel */
        .notification-settings-panel {
            display: none;
            position: absolute;
            top: 50px;
            left: 0.5rem;
            right: 0.5rem;
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
            z-index: 100;
            overflow: hidden;
        }

        .notification-settings-panel.visible {
            display: block;
            animation: panelSlideIn 0.2s ease-out;
        }

        @keyframes panelSlideIn {
            from {
                opacity: 0;
                transform: translateY(-10px);
            }
            to {
                opacity: 1;
                transform: translateX(-50%) translateY(0);
            }
        }

        .settings-panel-header {
            padding: 0.75rem 1rem;
            background: rgba(0, 212, 170, 0.1);
            border-bottom: 1px solid var(--border-color);
            font-size: 0.8rem;
            font-weight: 600;
            color: var(--accent-primary);
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        .settings-panel-body {
            padding: 0.75rem 1rem;
        }

        /* Toggle switch styles */
        .settings-toggle {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.5rem 0;
            cursor: pointer;
            border-bottom: 1px solid var(--border-color);
        }

        .settings-toggle:last-of-type {
            border-bottom: none;
        }

        .toggle-label {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.85rem;
            color: var(--text-primary);
        }

        .toggle-label svg {
            color: var(--text-secondary);
        }

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

        .toggle-slider {
            position: relative;
            width: 40px;
            height: 22px;
            background: var(--bg-tertiary);
            border-radius: 11px;
            transition: all 0.3s;
        }

        .toggle-slider::before {
            content: '';
            position: absolute;
            top: 3px;
            left: 3px;
            width: 16px;
            height: 16px;
            background: var(--text-secondary);
            border-radius: 50%;
            transition: all 0.3s;
        }

        .settings-toggle input:checked + .toggle-slider {
            background: var(--accent-primary);
        }

        .settings-toggle input:checked + .toggle-slider::before {
            left: 21px;
            background: white;
        }

        /* Volume slider */
        .settings-volume {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.75rem 0 0.25rem;
            margin-top: 0.5rem;
            border-top: 1px solid var(--border-color);
        }

        .volume-label {
            font-size: 0.8rem;
            color: var(--text-secondary);
            min-width: 50px;
        }

        .settings-volume input[type="range"] {
            flex: 1;
            height: 4px;
            -webkit-appearance: none;
            appearance: none;
            background: var(--bg-tertiary);
            border-radius: 2px;
            outline: none;
        }

        .settings-volume input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 14px;
            height: 14px;
            background: var(--accent-primary);
            border-radius: 50%;
            cursor: pointer;
            transition: transform 0.2s;
        }

        .settings-volume input[type="range"]::-webkit-slider-thumb:hover {
            transform: scale(1.2);
        }

        .settings-volume input[type="range"]::-moz-range-thumb {
            width: 14px;
            height: 14px;
            background: var(--accent-primary);
            border-radius: 50%;
            cursor: pointer;
            border: none;
        }

        .volume-value {
            font-size: 0.75rem;
            color: var(--accent-primary);
            min-width: 35px;
            text-align: right;
            font-weight: 600;
        }

        .server-list {
            flex: 1;
            overflow-y: auto;
            padding: 0.5rem;
        }

        .server-item {
            margin-bottom: 0.25rem;
            border-radius: 8px;
            overflow: hidden;
        }

        .server-header {
            display: flex;
            align-items: center;
            padding: 0.75rem;
            background: var(--bg-card);
            cursor: pointer;
            border-radius: 8px;
            transition: all 0.2s;
            gap: 0.5rem;
            overflow: hidden;
        }

        .server-header:hover {
            background: var(--bg-hover);
        }
        
        .server-item.active {
            border-left: 3px solid var(--accent-cyan, #00D4AA);
            background: rgba(0, 212, 170, 0.08);
            border-radius: 0 8px 8px 0;
        }

        .server-item.active .server-header {
            background: transparent;
        }

        .server-item.active .server-name {
            color: var(--accent-cyan, #00D4AA);
            font-weight: 600;
        }
        
        /* ::before removed - using border-left instead */

        .server-status {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: var(--accent-green);
            flex-shrink: 1;
        }

        .server-status.offline {
            background: var(--accent-red);
        }

        .server-status.warning {
            background: var(--accent-yellow);
        }

        .server-name {
            flex: 1;
            font-weight: 500;
            font-size: 0.9rem;
        }
        .server-role {
            display: none; /* Se muestra en server-details al expandir */
        }

        .server-expand {
            color: var(--text-secondary);
            font-size: 0.8rem;
            transition: transform 0.2s;
        }

        .server-item.expanded .server-expand {
            transform: rotate(180deg);
        }

        /* Métricas mini en el header */
        .server-metrics-mini {
            display: flex;
            gap: 3px;
            margin-left: auto;
            flex-shrink: 0;
        }

        .metric-badge {
            font-size: 0.7rem;
            font-family: 'SF Mono', Monaco, monospace;
            padding: 2px 5px;
            border-radius: 3px;
            background: var(--bg-primary);
            color: var(--text-secondary);
            min-width: 32px;
            text-align: center;
            transition: all 0.3s ease;
        }

        .metric-badge.updating {
            animation: metricPulse 0.5s ease;
        }

        .metric-badge.warning {
            background: rgba(245, 158, 11, 0.2);
            color: #f59e0b;
        }

        .metric-badge.critical {
            background: rgba(239, 68, 68, 0.2);
            color: #ef4444;
        }

        .metric-badge.good {
            background: rgba(0, 212, 170, 0.15);
            color: #00D4AA;
        }

        @keyframes metricPulse {
            0% { transform: scale(1); }
            50% { transform: scale(1.1); }
            100% { transform: scale(1); }
        }

        /* Métricas en tiempo real en detalles */
        .live-metrics {
            background: linear-gradient(135deg, rgba(0, 212, 170, 0.05), rgba(59, 130, 246, 0.05));
            border: 1px solid rgba(0, 212, 170, 0.2);
            border-radius: 8px;
            padding: 12px;
            margin-bottom: 12px;
        }

        .metric-bar {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 8px;
        }

        .metric-bar:last-of-type {
            margin-bottom: 0;
        }

        .metric-bar .metric-label {
            font-size: 0.7rem;
            color: var(--text-secondary);
            width: 35px;
            flex-shrink: 1;
        }

        .metric-progress {
            flex: 1;
            height: 6px;
            background: var(--bg-primary);
            border-radius: 3px;
            overflow: hidden;
        }

        .metric-fill {
            height: 100%;
            border-radius: 3px;
            transition: width 0.5s ease, background 0.3s ease;
        }

        .metric-fill.cpu-fill {
            background: linear-gradient(90deg, #00D4AA, #00ffcc);
        }

        .metric-fill.mem-fill {
            background: linear-gradient(90deg, #3b82f6, #60a5fa);
        }

        .metric-fill.disk-fill {
            background: linear-gradient(90deg, #8b5cf6, #a78bfa);
        }

        .metric-fill.warning {
            background: linear-gradient(90deg, #f59e0b, #fbbf24) !important;
        }

        .metric-fill.critical {
            background: linear-gradient(90deg, #ef4444, #f87171) !important;
        }

        .metric-bar .metric-value {
            font-size: 0.7rem;
            font-family: 'SF Mono', Monaco, monospace;
            color: var(--text-primary);
            min-width: 40px;
            text-align: right;
        }

        .metric-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding-top: 8px;
            border-top: 1px solid var(--border-color);
            margin-top: 8px;
        }

        .metric-row .metric-label {
            font-size: 0.7rem;
            color: var(--text-secondary);
        }

        .metric-row .metric-value {
            font-size: 0.75rem;
            font-family: 'SF Mono', Monaco, monospace;
            color: #00D4AA;
        }

        .server-details {
            display: none;
            background: var(--bg-primary);
            padding: 0.75rem;
            border-radius: 0 0 8px 8px;
            font-size: 0.8rem;
        }

        .server-item.expanded .server-details {
            display: block;
        }

        .detail-row {
            display: flex;
            justify-content: space-between;
            padding: 0.25rem 0;
            border-bottom: 1px solid var(--border-color);
        }

        .detail-row:last-child {
            border-bottom: none;
        }

        .detail-label {
            color: var(--text-secondary);
        }

        .detail-value {
            color: var(--text-primary);
            font-family: monospace;
        }

        .detail-section {
            margin-top: 0.5rem;
            padding-top: 0.5rem;
            border-top: 1px solid var(--border-color);
        }

        .detail-section-title {
            color: var(--accent-cyan);
            font-weight: 500;
            margin-bottom: 0.25rem;
            font-size: 0.75rem;
            text-transform: uppercase;
        }

        .tag-list {
            display: flex;
            flex-wrap: wrap;
            gap: 0.25rem;
            margin-top: 0.25rem;
        }

        .tag {
            background: var(--bg-card);
            color: var(--text-secondary);
            padding: 0.15rem 0.4rem;
            border-radius: 4px;
            font-size: 0.7rem;
        }

        .tag.app { background: var(--accent-blue); color: white; }
        .tag.db { background: var(--accent-purple); color: white; }
        .tag.ai { background: var(--accent-green); color: white; }

        /* =====================================================
           NOTIFICATION SYSTEM - Task Completion Badges
           ===================================================== */

        /* Notification Badge - 20x20px cyan gradient */
        .server-notification-badge {
            display: none;
            min-width: 20px;
            height: 20px;
            padding: 0 5px;
            background: linear-gradient(135deg, #00D4AA, #00B896);
            border-radius: 10px;
            color: white;
            font-size: 11px;
            font-weight: 700;
            line-height: 20px;
            text-align: center;
            margin-left: auto;
            margin-right: 8px;
            box-shadow: 0 2px 6px rgba(0, 212, 170, 0.4);
            animation: badgePop 0.3s ease-out;
            flex-shrink: 0;
        }

        .server-notification-badge.visible {
            display: inline-block;
        }

        @keyframes badgePop {
            0% { transform: scale(0); opacity: 0; }
            70% { transform: scale(1.2); }
            100% { transform: scale(1); opacity: 1; }
        }

        /* Accent Bar - 3px left border on server header when has notifications */
        .server-item.has-notifications .server-header {
            border-left: 3px solid var(--accent-cyan, #00D4AA);
            margin-left: -3px;
        }

        /* Glow Effect - Pulsating for 15 seconds after completion */
        .server-item.task-glow .server-header {
            box-shadow: 0 0 12px rgba(0, 212, 170, 0.5),
                        inset 0 0 8px rgba(0, 212, 170, 0.1);
            animation: serverGlow 2s ease-in-out infinite;
        }

        @keyframes serverGlow {
            0%, 100% {
                box-shadow: 0 0 8px rgba(0, 212, 170, 0.3),
                            inset 0 0 4px rgba(0, 212, 170, 0.05);
            }
            50% {
                box-shadow: 0 0 16px rgba(0, 212, 170, 0.6),
                            inset 0 0 10px rgba(0, 212, 170, 0.15);
            }
        }

        /* Badge count animation on increment */
        .server-notification-badge.bump {
            animation: badgeBump 0.3s ease-out;
        }

        @keyframes badgeBump {
            0% { transform: scale(1); }
            50% { transform: scale(1.3); }
            100% { transform: scale(1); }
        }

        /* Mobile bottom-nav notification badge */
        .bottom-nav-item .server-notification-badge {
            position: absolute;
            top: 2px;
            right: 2px;
            min-width: 16px;
            height: 16px;
            font-size: 10px;
            line-height: 16px;
            padding: 0 4px;
        }

        /* Dropdown server item with notification */
        .dropdown-server-item .server-notification-badge {
            min-width: 18px;
            height: 18px;
            font-size: 10px;
            line-height: 18px;
        }

        /* Add Instance Button - Fixed at bottom of sidebar */
        .add-instance-section {
            flex-shrink: 0;           /* Never shrink */
            padding: 12px;
            padding-bottom: 24px;     /* Extra space from bottom edge */
            border-top: 1px solid var(--border-color);
            background: var(--bg-secondary);  /* Solid background */
            position: sticky;
            bottom: 0;
            z-index: 1001;              /* Above scrolling content */
        }

        .add-instance-btn {
            width: 100%;
            min-height: 44px;         /* Touch-friendly minimum */
            padding: 12px 16px;
            background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
            border: none;
            border-radius: 8px;
            color: white;
            cursor: pointer;
            font-size: 0.9rem;
            font-weight: 500;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            transition: all 0.2s;
        }

        .add-instance-btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
        }

        /* Context Banner */
        .context-banner {
            display: none !important; /* Deshabilitado - redundante con sidebar y bottom-nav */
            background: linear-gradient(90deg, var(--accent-purple), var(--accent-blue));
            padding: 0.5rem 1rem;
            align-items: center;
            gap: 0.75rem;
            font-size: 0.85rem;
        }

        .context-banner.visible {
            display: flex;
        }

        .context-banner .server-icon {
            font-size: 1.2rem;
        }

        .context-banner .server-info {
            flex: 1;
        }

        .context-banner .clear-context {
            background: rgba(255,255,255,0.2);
            border: none;
            color: white;
            padding: 0.25rem 0.5rem;
            border-radius: 4px;
            cursor: pointer;
            font-size: 0.8rem;
        }

        .context-banner .clear-context:hover {
            background: rgba(255,255,255,0.3);
        }

        /* Sidebar collapsed state */
        .sidebar.collapsed {
            width: 50px;
        }

        .sidebar.collapsed .sidebar-header h3,
        .sidebar.collapsed .server-list,
        .sidebar.collapsed .add-instance-section {
            display: none;
        }

        .sidebar.collapsed .sidebar-header {
            justify-content: center;
        }

        /* Main Chat Container */
        .chat-container {
            flex: 1;
            display: flex;
            flex-direction: column;
            max-width: 100%;
            width: 100%;
            padding: 0.5rem;
            overflow: hidden;
        }

        /* Messages Area */
        .messages-area {
            flex: 1;
            overflow-y: auto;
            padding: 0.75rem;
            padding-bottom: 160px; /* Espacio para progress (40px) + input (~96px) + gap (24px) */
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
        }

        .message {
            display: flex;
            gap: 0.75rem;
            max-width: 92%;
            animation: fadeIn 0.3s ease;
        }

        @keyframes fadeIn {
            from { opacity: 0; /* transform handled above */ }
            to { opacity: 1; transform: translateX(-50%) translateY(0); }
        }

        .message.user {
            align-self: flex-end;
            flex-direction: row-reverse;
        }

        .message.assistant {
            align-self: flex-start;
        }

        .message-avatar {
            width: 36px;
            height: 36px;
            min-width: 36px;
            min-height: 36px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            font-weight: 600;
            flex-shrink: 0;
            color: #FFFFFF;
            text-transform: uppercase;
            letter-spacing: -0.5px;
        }

        .message.user .message-avatar {
            /* Color se aplica dinámicamente basado en email del usuario */
            background: var(--user-avatar-color, var(--accent-blue));
        }

        .message.assistant .message-avatar {
            background: linear-gradient(135deg, #00D4AA 0%, #0097A7 100%);
        }

        .message-content {
            background: var(--bg-card);
            padding: 0.75rem 1rem 0.75rem 2rem;
            border-radius: 12px;
            max-width: 100%;
        }

        .message.user .message-content {
            background: var(--accent-blue);
            border-bottom-right-radius: 4px;
        }

        .message.assistant .message-content {
            border-bottom-left-radius: 4px;
        }

        .message-text {
            white-space: pre-wrap;
            word-wrap: break-word;
        }

        /* Copy Message Button - Sticky floating button for assistant messages */
        .message.assistant .message-content {
            position: relative;
        }

        .copy-message-btn {
            position: sticky;
            top: 70px; /* Debajo del header */
            float: right;
            margin: 0 0 -32px 8px; /* Margin-bottom negativo para que el texto no baje */
            width: 32px;
            height: 32px;
            padding: 6px;
            background: rgba(13, 31, 60, 0.95);
            border: 1px solid rgba(0, 212, 170, 0.3);
            border-radius: 6px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            transition: all 0.2s ease;
            z-index: 100;
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
        }

        .copy-message-btn svg {
            width: 18px;
            height: 18px;
            stroke: rgba(255, 255, 255, 0.5);
            fill: none;
            stroke-width: 2;
            stroke-linecap: round;
            stroke-linejoin: round;
            transition: stroke 0.2s ease;
        }

        /* Show on message hover */
        .message.assistant:hover .copy-message-btn {
            opacity: 1;
        }

        .copy-message-btn:hover {
            background: rgba(0, 212, 170, 0.15);
            border-color: rgba(0, 212, 170, 0.3);
        }

        .copy-message-btn:hover svg {
            stroke: var(--accent-cyan, #00D4AA);
        }

        /* Copied state */
        .copy-message-btn.copied {
            opacity: 1;
            background: rgba(16, 185, 129, 0.15);
            border-color: rgba(16, 185, 129, 0.3);
        }

        .copy-message-btn.copied svg {
            stroke: var(--accent-green, #10b981);
        }

        /* Error state */
        .copy-message-btn.error {
            opacity: 1;
            background: rgba(239, 68, 68, 0.15);
            border-color: rgba(239, 68, 68, 0.3);
        }

        .copy-message-btn.error svg {
            stroke: var(--accent-red, #ef4444);
        }

        /* Mobile: always visible */
        @media (max-width: 768px) {
            .copy-message-btn {
                opacity: 0.7;
                width: 36px;
                height: 36px;
            }
        }

        /* Estilos para listas en mensajes - bullets DENTRO del contenedor */
        .message-content ul,
        .message-content ol {
            margin: 0.5rem 0;
            padding-left: 1.25rem;
            list-style-position: inside; /* Bullets dentro del contenedor */
        }

        .message-content li {
            margin: 0.25rem 0;
            padding-left: 0;
            line-height: 1.5;
            text-indent: -0.25rem; /* Ajuste visual para alineación */
            padding-left: 0.25rem;
        }

        /* Listas ordenadas - ajuste para números */
        .message-content ol {
            list-style-type: decimal;
        }

        .message-content ol li {
            text-indent: 0;
            padding-left: 0.25rem;
        }
        /* Tablas y código aprovechan ancho completo */
        .message-content table {
            width: 100%;
            border-collapse: collapse;
            margin: 0.75rem 0;
            font-size: 0.9em;
        }
        
        .message-content table th,
        .message-content table td {
            padding: 0.5rem 0.75rem;
            border: 1px solid var(--border-color);
            text-align: left;
        }
        
        .message-content table th {
            background: var(--bg-secondary);
            font-weight: 600;
        }
        
        .message-content pre {
            width: 100%;
            background: var(--bg-secondary);
            border-radius: 8px;
            padding: 0.75rem;
            margin: 0.5rem 0;
            overflow-x: auto;
        }
        
        .message-content code {
            font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
            font-size: 0.9em;
        }
        
        .message-content pre code {
            background: none;
            padding: 0;
        }
        
        .message-content > p:first-child {
            margin-top: 91px;
        }
        
        .message-content > p:last-child {
            margin-bottom: 0;
        }

        /* Nested lists */
        .message-content ul ul,
        .message-content ol ol,
        .message-content ul ol,
        .message-content ol ul {
            margin: 0.25rem 0;
            padding-left: 1rem;
        }

        /* Lists with emoji bullets - sin bullet nativo */
        .message-content ul:has(.list-bullet) {
            list-style: none;
            padding-left: 0.5rem;
        }

        .message-content ul:has(.list-bullet) li {
            text-indent: 0;
        }

        /* Custom emoji bullets */
        .message-content .list-bullet {
            margin-right: 0.375rem;
        }

        .message-image {
            max-width: 300px;
            max-height: 300px;
            border-radius: 8px;
            margin-top: 0.5rem;
            cursor: pointer;
        }

        .message-time {
            font-size: 0.7rem;
            color: var(--text-secondary);
            margin-top: 0.25rem;
        }

        /* Typing indicator - Enhanced v2.0 */
        .typing-indicator {
            display: none;
            align-self: flex-start;
            padding: 0.75rem 1rem;
            margin: 0.5rem 0;
        }

        .typing-indicator.visible {
            display: flex;
            animation: fadeInUp 0.3s ease;
        }

        @keyframes fadeInUp {
            from {
                opacity: 0;
                /* transform handled above */
            }
            to {
                opacity: 1;
                transform: translateX(-50%) translateY(0);
            }
        }

        .typing-indicator .message {
            background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
            border: 1px solid rgba(0, 212, 170, 0.2);
            border-radius: 16px;
            padding: 12px 16px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        }

        .typing-indicator .message-content {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .typing-dots {
            display: flex;
            gap: 5px;
            align-items: center;
        }

        .typing-dots span {
            width: 8px;
            height: 8px;
            background: linear-gradient(135deg, #00D4AA, #3b82f6);
            border-radius: 50%;
            animation: typingBounce 1.4s infinite ease-in-out;
            box-shadow: 0 0 8px rgba(0, 212, 170, 0.4);
        }

        .typing-dots span:nth-child(2) { animation-delay: 0.16s; }
        .typing-dots span:nth-child(3) { animation-delay: 0.32s; }

        @keyframes typingBounce {
            0%, 80%, 100% {
                transform: scale(0.8) translateY(0);
                opacity: 0.5;
            }
            40% {
                transform: scale(1.2) translateY(-8px);
                opacity: 1;
            }
        }

        /* Typing text label */
        .typing-label {
            color: var(--text-secondary);
            font-size: 13px;
            font-style: italic;
            margin-left: 8px;
            animation: fadeInOut 2s infinite ease-in-out;
        }

        @keyframes fadeInOut {
            0%, 100% { opacity: 0.5; }
            50% { opacity: 1; }
        }

        /* Pulse glow effect on typing */
        .typing-indicator.visible .message {
            animation: typingGlow 2s infinite ease-in-out;
        }

        @keyframes typingGlow {
            0%, 100% {
                box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            }
            50% {
                box-shadow: 0 2px 16px rgba(0, 212, 170, 0.2);
            }
        }

        /* Input Area - Optimizado para máximo espacio de mensajes */
        .input-area {
            position: relative;
            background: var(--bg-secondary);
            border-top: 1px solid var(--border-color);
            padding: 0.5rem 0.75rem; /* Reducido de 1rem a 0.5rem vertical */
        }

        /* Image Preview */
        .image-preview-container {
            display: none;
            flex-wrap: wrap;
            gap: 0.5rem;
            margin-bottom: 0.75rem;
            padding: 0.5rem;
            background: var(--bg-card);
            border-radius: 8px;
        }

        .image-preview-container.has-images {
            display: flex;
        }

        .image-preview {
            position: relative;
            width: 80px;
            height: 80px;
        }

        .image-preview img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 6px;
        }

        .image-preview .remove-btn {
            position: fixed;
            top: -8px;
            right: -8px;
            width: 20px;
            height: 20px;
            background: var(--accent-red);
            color: white;
            border: none;
            border-radius: 50%;
            cursor: pointer;
            font-size: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        /* Input Row - Compacto */
        .input-row {
            display: flex;
            gap: 0.375rem; /* Reducido de 0.5rem */
            align-items: center; /* Centrado vertical */
        }

        .input-wrapper {
            flex: 1;
            position: relative;
            min-height: 72px;
        }

        #messageInput {
            width: 100%;
            min-height: 72px;
            max-height: 150px;
            padding: 0.75rem 1rem;
            background: var(--bg-card);
            border: 2px solid var(--border-color);
            border-radius: 12px;
            color: var(--text-primary);
            font-size: 1rem;
            resize: none;
            font-family: inherit;
            line-height: 1.5;
            box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
            transition: border-color 0.2s ease, box-shadow 0.2s ease,
                        opacity 0.2s ease, background-color 0.2s ease;
        }

        #messageInput:focus {
            outline: none;
            border-color: var(--accent-blue);
            box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1), 0 0 0 3px rgba(0, 212, 170, 0.2);
        }

        #messageInput::placeholder {
            color: var(--text-secondary);
            opacity: 0.7;
        }
        
        @keyframes shake {
            0%, 100% { transform: translateX(0); }
            25% { transform: translateX(-5px); }
            75% { transform: translateX(5px); }
        }
        
        #messageInput.shake {
            animation: shake 0.3s ease-in-out;
            border-color: var(--accent-red) !important;
        }

        /* === ESTILOS MEJORADOS PARA INPUT DESHABILITADO === */
        #messageInput:disabled {
            opacity: 0.85;
            background: rgba(44, 95, 127, 0.15);
            cursor: not-allowed;
            border: 2px solid rgba(0, 212, 170, 0.4);
            animation: pulse-border 2s ease-in-out infinite;
            color: rgba(255, 255, 255, 0.7);
            pointer-events: none;
        }

        #messageInput:disabled::placeholder {
            color: rgba(0, 212, 170, 0.8);
            font-style: italic;
        }

        @keyframes pulse-border {
            0%, 100% {
                border-color: rgba(0, 212, 170, 0.3);
                box-shadow: 0 0 0 0 rgba(0, 212, 170, 0);
            }
            50% {
                border-color: rgba(0, 212, 170, 0.6);
                box-shadow: 0 0 8px 0 rgba(0, 212, 170, 0.2);
            }
        }
        /* === FIN ESTILOS INPUT DESHABILITADO === */

        /* Loading spinner para botón enviar - Propuesta D: sutil y discreto */
        #sendBtn.loading svg {
            display: none;
        }

        #sendBtn.loading::after {
            content: '';
            width: 16px;
            height: 16px;
            border: 2px solid rgba(0, 217, 255, 0.15);
            border-top-color: rgba(0, 217, 255, 0.7);
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

        /* Spinner en estado enabled (fondo cyan) - más contraste */
        #sendBtn.enabled.loading::after {
            border: 2px solid rgba(10, 22, 40, 0.2);
            border-top-color: rgba(10, 22, 40, 0.7);
        }

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

        /* Indicador de procesamiento en input - ELIMINADO (redundante con banner)
           El banner progress-indicator ya muestra estado de procesamiento */

        /* ═══════════════════════════════════════════════════════════
           BOTONES INPUT AREA - Filosofía "Sutileza Funcional" v2.0
           Opacidades: 0.2, 0.4, 0.7, 1.0 | Tamaño fijo 44px
           Duraciones: 100ms, 200ms, 250ms | Scale máx: 1.02
           ═══════════════════════════════════════════════════════════ */

        .input-actions {
            display: flex;
            gap: 8px;
            align-items: center;
        }

        /* === ESTADO BASE: Ambos botones idénticos === */
        .action-btn {
            /* Box model explícito - garantiza 44×44px exactos */
            box-sizing: border-box !important;
            width: 44px !important;
            height: 44px !important;
            margin: 0 !important;
            padding: 0 !important;
            /* Estilo */
            background: transparent;
            border: 1.5px solid rgba(0, 217, 255, 0.4);
            border-radius: 8px;
            color: rgba(0, 217, 255, 0.7);
            cursor: pointer;
            transition: background 200ms ease-out, border-color 200ms ease-out, transform 200ms ease-out;
            /* Layout */
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            flex-grow: 0;
        }

        /* === HOVER: Sutil con scale 1.02 === */
        .action-btn:hover {
            border-color: rgba(0, 217, 255, 0.7);
            transform: scale(1.02);
        }

        /* === ACTIVE: Feedback inmediato === */
        .action-btn:active {
            background: rgba(0, 217, 255, 0.2);
            transform: scale(0.98);
            transition-duration: 100ms;
        }

        /* === ICONOS SVG === */
        .action-btn svg {
            width: 20px;
            height: 20px;
            stroke: currentColor;
            stroke-width: 2;
            fill: none;
        }

        /* === BOTÓN ENVIAR: Estado inactivo (idéntico a attachBtn) === */
        #sendBtn:disabled {
            cursor: not-allowed;
            opacity: 0.5;
        }

        #sendBtn:disabled:hover {
            transform: none;
        }

        /* === BOTÓN ENVIAR: Estado activo (con texto) === */
        #sendBtn.enabled {
            background: #00d9ff;
            border-color: #00d9ff;
            color: #0a1628;
            box-shadow: 0 2px 8px rgba(0, 217, 255, 0.2);
            transition: background 250ms ease-out, border-color 250ms ease-out, box-shadow 250ms ease-out, transform 200ms ease-out;
        }

        #sendBtn.enabled:hover {
            background: #33e0ff;
            box-shadow: 0 4px 12px rgba(0, 217, 255, 0.4);
            transform: scale(1.02);
        }

        #sendBtn.enabled:active {
            background: #00c4e6;
            transform: scale(0.98);
            transition-duration: 100ms;
        }

        /* Model Selector Dropdown - Simplificado */
        .model-selector-wrapper {
            position: relative;
            display: flex;
            align-items: center;
        }

        #modelSelector {
            height: 44px;
            padding: 0 28px 0 12px;
            background: transparent;
            border: 1.5px solid rgba(0, 217, 255, 0.4);
            border-radius: 8px;
            color: rgba(0, 217, 255, 0.7);
            font-size: 0.85rem;
            cursor: pointer;
            appearance: none;
            -webkit-appearance: none;
            min-width: 100px;
            transition: background 0.2s, border-color 0.2s, color 0.2s;
        }

        #modelSelector option {
            background: #0a1628;
            color: #00d9ff;
            padding: 8px;
        }

        #modelSelector:hover {
            background: rgba(0, 217, 255, 0.1);
            border-color: rgba(0, 217, 255, 0.7);
            color: #00d9ff;
        }

        #modelSelector:focus {
            outline: none;
            border-color: #00d9ff;
        }

        .model-selector-wrapper::after {
            content: '';
            position: absolute;
            right: 10px;
            top: 50%;
            transform: translateY(-50%);
            width: 0;
            height: 0;
            border-left: 4px solid transparent;
            border-right: 4px solid transparent;
            border-top: 5px solid rgba(0, 217, 255, 0.7);
            pointer-events: none;
            transition: border-color 0.2s;
        }

        .model-selector-wrapper:hover::after {
            border-top-color: #00d9ff;
        }

        /* ═══════════════════════════════════════════════════════════
           MOBILE MODEL SELECTOR - Badge Mínimo + Menú Flotante
           ═══════════════════════════════════════════════════════════ */

        /* Ocultar dropdown en mobile */
        @media (max-width: 768px) {
            .model-selector-wrapper {
                display: none !important;
            }
        }

        /* Badge mínimo en input */
        .model-badge-mini {
            position: absolute;
            top: 8px;
            right: 8px;
            width: 28px;
            height: 28px;
            border-radius: 6px;
            background: rgba(0, 217, 255, 0.1);
            border: 1px solid rgba(0, 217, 255, 0.3);
            display: none;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            z-index: 1001;
            transition: all 0.2s ease;
        }

        @media (max-width: 768px) {
            .model-badge-mini {
                display: flex !important;
            }
        }

        .model-badge-mini:hover {
            background: rgba(0, 217, 255, 0.2);
            transform: scale(1.05);
        }

        .model-badge-mini:active {
            transform: scale(0.95);
        }

        .model-badge-mini:focus {
            outline: none;
            box-shadow: 0 0 0 2px rgba(0, 217, 255, 0.5);
        }

        .model-badge-mini:focus-visible {
            box-shadow: 0 0 0 2px rgba(0, 217, 255, 0.7);
        }

        .model-badge-mini svg {
            min-width: 18px;
            width: 18px;
            height: 18px;
        }

        /* Overlay para menú - TRANSPARENTE */
        .model-menu-overlay {
            position: fixed;
            top: 91px;
            left: 0;
            right: 0;
            bottom: 0;
            background: transparent;
            z-index: 9998;
            opacity: 0;
            visibility: hidden;
            transition: all 0.15s ease;
        }

        .model-menu-overlay.visible {
            opacity: 1;
            visibility: visible;
        }

        /* Menú flotante - COMPACTO */
        .model-menu-floating {
            position: fixed;
            left: 50%;
            bottom: 130px;
            transform: translateX(-50%) translateY(8px) scale(0.95);
            width: 200px;
            background: rgba(10, 22, 40, 0.98);
            border: 1px solid rgba(0, 217, 255, 0.3);
            border-radius: 10px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
            backdrop-filter: blur(10px);
            z-index: 9999;
            opacity: 0;
            visibility: hidden;
            transition: all 0.2s ease;
            overflow: hidden;
        }

        .model-menu-floating.visible {
            opacity: 1;
            visibility: visible;
            transform: translateX(-50%) translateY(0) scale(1);
        }

        .model-menu-header {
            padding: 8px 12px;
            border-bottom: 1px solid rgba(0, 217, 255, 0.15);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .model-menu-header span {
            font-size: 9px;
            text-transform: uppercase;
            letter-spacing: 1px;
            color: rgba(0, 217, 255, 0.6);
            font-weight: 600;
        }

        .model-menu-close {
            width: 20px;
            height: 20px;
            border: none;
            background: transparent;
            color: rgba(255, 255, 255, 0.5);
            cursor: pointer;
            border-radius: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.15s;
        }

        .model-menu-close:hover {
            background: rgba(255, 68, 68, 0.2);
            color: #ff4444;
        }

        .model-menu-options {
            padding: 4px 0;
        }

        .model-option-item {
            display: grid;
            grid-template-columns: 16px 20px 1fr;
            gap: 8px;
            align-items: center;
            padding: 10px 12px;
            cursor: pointer;
            transition: all 0.15s ease;
            border: none;
            background: transparent;
            width: 100%;
            text-align: left;
        }

        .model-option-item:hover {
            background: rgba(0, 217, 255, 0.08);
        }

        .model-option-item:active {
            background: rgba(0, 217, 255, 0.12);
            transform: scale(0.98);
        }

        .model-option-item:focus {
            outline: none;
            box-shadow: inset 0 0 0 2px rgba(0, 217, 255, 0.4);
        }

        .model-option-item:focus-visible {
            box-shadow: inset 0 0 0 2px rgba(0, 217, 255, 0.6);
        }

        .model-option-item.selected {
            background: rgba(0, 217, 255, 0.05);
        }

        .model-option-check {
            width: 14px;
            height: 14px;
            opacity: 0;
            transition: all 0.2s;
        }

        .model-option-item.selected .model-option-check {
            opacity: 1;
        }

        .model-option-icon {
            width: 18px;
            height: 18px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .model-option-icon svg {
            width: 16px;
            height: 16px;
        }

        .model-option-content {
            display: flex;
            flex-direction: column;
            gap: 1px;
        }

        .model-option-name {
            font-size: 13px;
            font-weight: 500;
            color: #ffffff;
        }

        .model-option-item.selected .model-option-name {
            color: var(--accent-cyan);
            font-weight: 600;
        }

        .model-option-desc {
            font-size: 10px;
            color: rgba(255, 255, 255, 0.5);
            display: none; /* Ocultar descripción en versión compacta */
        }

        .model-option-version {
            font-size: 9px;
            font-family: monospace;
            color: rgba(0, 217, 255, 0.4);
            margin-top: 91px;
        }

        .model-menu-divider {
            height: 1px;
            background: rgba(0, 217, 255, 0.1);
            margin: 8px 16px;
        }

        .model-menu-divider-text {
            font-size: 9px;
            text-transform: uppercase;
            letter-spacing: 1px;
            color: rgba(255, 255, 255, 0.3);
            text-align: center;
            padding: 4px 0;
        }

        /* SVG Icon Colors */
        .icon-auto { color: var(--accent-cyan, #00D4AA); filter: drop-shadow(0 0 4px rgba(0, 212, 170, 0.4)); }
        .icon-haiku { color: var(--accent-green, #10b981); filter: drop-shadow(0 0 3px rgba(16, 185, 129, 0.3)); }
        .icon-sonnet { color: var(--accent-cyan, #00D4AA); filter: drop-shadow(0 0 3px rgba(0, 212, 170, 0.3)); }
        .icon-opus { color: var(--accent-purple, #8b5cf6); filter: drop-shadow(0 0 4px rgba(139, 92, 246, 0.4)); }
        /* Progress indicator SVG icons */
        .progress-indicator .status-icon svg {
            width: 18px;
            height: 18px;
            stroke: var(--accent-cyan, #00D4AA);
        }

        .progress-indicator.completed .status-icon svg {
            stroke: var(--accent-green, #10b981);
        }

        .progress-indicator.error .status-icon svg {
            stroke: #ef4444;
        }

        .progress-indicator.cancelled .status-icon svg {
            stroke: #f59e0b;
        }

        /* Mode icon in model badge */
        .mode-icon {
            width: 14px;
            height: 14px;
            display: inline-block;
            vertical-align: middle;
            margin-right: 4px;
            stroke: currentColor;
        }

        /* Toggle chevron icon */
        .toggle-icon {
            width: 12px;
            height: 12px;
            display: inline-block;
            vertical-align: middle;
            margin-right: 4px;
            transition: transform 0.2s ease;
            stroke: var(--text-secondary);
        }

        /* Icon rotation when expanded - use class on toggle for cross-browser support */
        .reasoning-toggle.expanded .toggle-icon {
            transform: rotate(90deg);
        }

        /* Model badge in messages */
        .model-badge {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 2px 8px;
            border-radius: 4px;
            font-size: 0.7rem;
            font-weight: 500;
            margin-left: 8px;
            opacity: 0.8;
        }

        .model-badge.haiku {
            background: rgba(16, 185, 129, 0.2);
            color: var(--accent-green, #10b981);
        }

        .model-badge.sonnet {
            background: rgba(0, 212, 170, 0.2);
            color: var(--accent-cyan, #00D4AA);
        }

        .model-badge.opus {
            background: rgba(139, 92, 246, 0.2);
            color: var(--accent-purple, #8b5cf6);
        }

        /* Reasoning panel */
        .reasoning-panel {
            margin-top: 8px;
            padding: 12px;
            background: rgba(0, 0, 0, 0.2);
            border-radius: 8px;
            border-left: 3px solid var(--accent-blue);
            font-size: 0.85rem;
        }

        .reasoning-toggle {
            cursor: pointer;
            color: var(--text-muted, #6b7280);
            font-size: 0.75rem;
            display: inline-flex;
            align-items: center;
            gap: 4px;
            margin-top: 8px;
            padding: 4px 8px;
            border-radius: 4px;
            background: rgba(0, 212, 170, 0.1);
            border: 1px solid rgba(0, 212, 170, 0.2);
            transition: all 0.2s ease;
        }

        .reasoning-toggle:hover {
            color: var(--accent-cyan, #00D4AA);
            background: rgba(0, 212, 170, 0.2);
            border-color: rgba(0, 212, 170, 0.4);
        }

        .reasoning-toggle.expanded {
            color: var(--accent-cyan, #00D4AA);
            background: rgba(0, 212, 170, 0.15);
        }

        .reasoning-content {
            max-height: 0;
            overflow: hidden;
            margin-top: 91px;
            opacity: 0;
            transition: max-height 0.3s ease, opacity 0.2s ease, margin-top 0.3s ease;
        }

        .reasoning-content.expanded {
            max-height: 500px;
            opacity: 1;
            margin-top: 8px;
        }

        .reasoning-step {
            margin-bottom: 8px;
            padding: 10px 12px;
            background: rgba(0, 212, 170, 0.05);
            border-radius: 6px;
            border-left: 2px solid var(--accent-cyan, #00D4AA);
        }

        .reasoning-step:last-child {
            margin-bottom: 0;
        }

        .reasoning-icon {
            width: 14px;
            height: 14px;
            display: inline-block;
            vertical-align: middle;
            margin-right: 6px;
            stroke: var(--accent-cyan, #00D4AA);
            flex-shrink: 0;
        }

        .reasoning-step-title {
            font-weight: 600;
            margin-bottom: 4px;
            color: var(--accent-cyan, #00D4AA);
            display: flex;
            align-items: center;
        }

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

        /* Drop Zone */
        .drop-zone {
            position: fixed;
            top: 91px;
            left: 0; right: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 212, 170, 0.1);
            border: 3px dashed var(--accent-blue);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 1000;
            pointer-events: none;
        }

        .drop-zone.active {
            display: flex;
        }

        .drop-zone-text {
            font-size: 1.5rem;
            color: var(--accent-blue);
            background: var(--bg-secondary);
            padding: 2rem 3rem;
            border-radius: 12px;
        }

        /* Help text - Oculto por defecto, visible en drag */
        .help-text {
            display: none; /* Oculto para ahorrar espacio */
            text-align: center;
            font-size: 0.75rem;
            color: var(--text-secondary);
            margin-top: 0.25rem;
        }

        /* Mostrar help text cuando hay drag-over */
        .input-area.drag-over .help-text {
            display: block;
        }

        /* Welcome message */
        .welcome-message {
            text-align: center;
            padding: 3rem;
            color: var(--text-secondary);
        }

        .welcome-message h2 {
            color: var(--accent-blue);
            margin-bottom: 1rem;
        }

        .welcome-message p {
            margin-bottom: 0.5rem;
        }

        /* Error message */
        .error-toast {
            position: fixed;
            bottom: 100px;
            left: 50%;
            transform: translateX(-50%);
            background: var(--accent-red);
            color: white;
            padding: 0.75rem 1.5rem;
            border-radius: 8px;
            display: none;
            z-index: 1000;
            animation: slideUp 0.3s ease;
        }

        .error-toast.visible {
            display: block;
        }

        @keyframes slideUp {
            from { transform: translate(-50%, 20px); opacity: 0; }
            to { transform: translate(-50%, 0); opacity: 1; }
        }

        /* Code blocks */
        .message-content pre {
            background: var(--bg-primary);
            padding: 0.75rem;
            border-radius: 6px;
            overflow-x: auto;
            margin: 0.5rem 0;
        }

        .message-content code {
            font-family: 'Monaco', 'Menlo', monospace;
            font-size: 0.9em;
        }

        /* Mobile responsiveness */
        @media (max-width: 768px) {
            .header {
                padding: 0.75rem 1rem;
            }

            .logo h1 {
                font-size: 1.2rem;
            }

            .nav-btn {
                padding: 0.4rem 0.75rem;
                font-size: 0.8rem;
            }

            .message {
                max-width: 95%;
            }

            .message-image {
                max-width: 200px;
            }

            /* Mobile sidebar - fixed para competir con bottomNav fixed */
            .sidebar {
                position: fixed;
                left: calc(-1 * var(--sidebar-width) - 10px); /* Completamente oculto + margen extra */
                top: 91px;
                height: 100vh;
                z-index: 5100;
                transition: left 0.3s ease;
            }

            .sidebar.mobile-open {
                left: 0; right: 0;
            }

            .sidebar-overlay {
                position: fixed;
                display: none;
                top: 91px;
                left: 0;
                right: 0;
                bottom: 0;
                background: rgba(0,0,0,0.5);
                z-index: 5050;
            }

            .sidebar-overlay.visible {
                display: block;
            }

            .mobile-sidebar-toggle {
                display: flex;
            }

            /* Mobile: add-instance button with safe area */
            .add-instance-section {
                padding-bottom: 16px; /* Reduced for mobile, but still safe */
            }

            /* Layout móvil ULTRA optimizado v2.0 */
            .chat-container {
                padding: 0.25rem;
                padding-top: 0;
                padding-bottom: 0;
            }

            /* Messages-area - espacio para input-area + bottomNav compactos */
            .messages-area {
                padding-bottom: 150px; /* input-area (80px max) + bottomNav (64px) + margin */
            }

            /* Input-area compacto encima del bottomNav */
            .input-area {
                position: fixed;
                bottom: 64px;
                left: 0;
                right: 0;
                margin: 0;
                padding: 6px 10px;
                z-index: 999;
                background: var(--bg-secondary);
                border-top: 1px solid var(--border-color);
                min-height: 48px;
                max-height: 90px;
                overflow: hidden;
            }

            /* Context banner oculto no debe ocupar espacio */
            .context-banner:not(.visible) {
                display: none !important;
            }

            .context-banner.visible {
                position: fixed;
                bottom: calc(64px + 80px); /* bottomNav + input-area */
                left: 0; right: 0;
                right: 12px; /* Alineado con padding-right del messagesArea */
                z-index: 998;
            }
        }

                /* =====================================================
           PROGRESS INDICATOR - Barra Delgada Lohmia Style
           ===================================================== */
        .progress-indicator {
            position: fixed;
            bottom: 120px;
            left: 50%;
            transform: translateX(-50%) translateY(10px);
            width: calc(100% - 350px);
            max-width: 700px;
            height: 40px;
            background: rgba(13, 31, 60, 0.98);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border-top: 1px solid rgba(0, 212, 170, 0.6);
            border-radius: 8px 8px 0 0;
            display: none;
            align-items: center;
            justify-content: space-between;
            padding: 0 20px;
            z-index: 1500;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.2s ease-out,
                        transform 0.2s ease-out,
                        visibility 0.2s ease-out,
                        border-top-color 0.3s ease;
            box-shadow: 0 -4px 20px rgba(0, 212, 170, 0.15);
            font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
            font-size: 13px;
            overflow: visible;
        }

        .progress-indicator.visible {
            display: flex;
            opacity: 1;
            visibility: visible;
            transform: translateX(-50%) translateY(0);
        }

        .progress-indicator .left-section {
            display: flex;
            align-items: center;
            gap: 16px;
        }

        .progress-indicator .right-section {
            display: flex;
            align-items: center;
            gap: 16px;
        }

        .progress-indicator .status-section {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .progress-indicator .status-icon {
            font-size: 16px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            color: #00D4AA;
        }

        .progress-indicator .status-icon svg {
            display: block;
        }

        .progress-indicator .status-text {
            color: #ffffff;
            font-weight: 500;
        }

        .progress-indicator .status-icon.spinning {
            animation: spin 0.8s linear infinite;
        }

        .progress-indicator .status-icon.pulsing {
            animation: pulse 1.5s ease-in-out infinite;
        }

        .progress-indicator .status-icon.typing {
            animation: typing 0.8s ease-in-out infinite;
        }

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

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

        @keyframes typing {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.4; }
        }

        .progress-indicator .divider {
            width: 1px;
            height: 20px;
            background: rgba(44, 95, 127, 0.5); /* #2C5F7F */
        }

        .progress-indicator .timer-section {
            display: flex;
            align-items: center;
            gap: 6px;
            color: #00D4AA;
        }

        .progress-indicator .timer-value {
            color: #00D4AA;
            font-weight: 600;
            min-width: 35px;
        }

        .progress-indicator .tokens-section {
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .progress-indicator .tokens-up {
            color: #2C5F7F;
        }

        .progress-indicator .tokens-down {
            color: #00D4AA;
        }

        .progress-indicator .tokens-value {
            font-weight: 600;
            min-width: 50px;
        }

        .progress-indicator .tokens-value.updating {
            animation: tokenFlash 0.3s ease;
        }

        @keyframes tokenFlash {
            0% { color: #10b981; transform: scale(1.1); }
            100% { color: inherit; transform: scale(1); }
        }

        .progress-indicator .cancel-section {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .progress-indicator .cancel-hint {
            color: #2C5F7F;
            font-size: 11px;
            opacity: 0.8;
        }

        .progress-indicator .cancel-btn {
            background: rgba(239, 68, 68, 0.15);
            border: 1px solid rgba(239, 68, 68, 0.3);
            color: #ef4444;
            width: 22px;
            height: 22px;
            border-radius: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-size: 14px;
            transition: all 0.2s ease;
        }

        .progress-indicator .cancel-btn:hover {
            background: rgba(239, 68, 68, 0.25);
            border-color: #ef4444;
        }

        .progress-indicator.completed {
            border-top-color: #10b981;
        }

        .progress-indicator.completed .status-icon,
        .progress-indicator.completed .status-text {
            color: #10b981;
        }

        .progress-indicator.error {
            border-top-color: #ef4444;
        }

        .progress-indicator.error .status-icon,
        .progress-indicator.error .status-text {
            color: #ef4444;
        }

        .progress-indicator.cancelled {
            border-top-color: #f59e0b;
        }

        .progress-indicator.cancelled .status-icon,
        .progress-indicator.cancelled .status-text {
            color: #f59e0b;
        }

        /* Barra de progreso animada en el borde superior del indicador */
        /* CONTENIDA - usa background-position en vez de left para no salirse del contenedor */
        .progress-indicator::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0; /* Ancho completo del contenedor, no se sale */
            height: 3px;
            background: linear-gradient(90deg, transparent 0%, #00D4AA 20%, #00ffcc 50%, #00D4AA 80%, transparent 100%);
            background-size: 200% 100%;
            animation: progressBarContained 2s ease-in-out infinite;
            z-index: 1;
            border-radius: 8px 8px 0 0;
        }

        @keyframes progressBarContained {
            0% { background-position: 100% 0; }
            100% { background-position: -100% 0; }
        }

        /* ═══════════════════════════════════════════════════════
           PANEL DE OPERACIONES - Claude Code Operations
           ═══════════════════════════════════════════════════════ */

        .expand-ops-btn {
            display: flex;
            align-items: center;
            gap: 4px;
            padding: 4px 8px;
            background: rgba(0, 212, 170, 0.1);
            border: 1px solid rgba(0, 212, 170, 0.3);
            border-radius: 6px;
            color: #00D4AA;
            cursor: pointer;
            font-size: 11px;
            transition: all 0.2s ease;
            margin-left: 8px;
        }

        .expand-ops-btn:hover {
            background: rgba(0, 212, 170, 0.2);
            border-color: #00D4AA;
        }

        .expand-ops-btn.active {
            background: rgba(0, 212, 170, 0.25);
            border-color: #00D4AA;
        }

        .expand-ops-btn.active svg {
            transform: rotate(180deg);
        }

        .expand-ops-btn svg {
            transition: transform 0.2s ease;
        }

        .ops-count {
            background: #00D4AA;
            color: #0a0f1a;
            padding: 1px 5px;
            border-radius: 10px;
            font-weight: 600;
            font-size: 10px;
            min-width: 16px;
            text-align: center;
        }

        .ops-count:empty,
        .ops-count[data-count="0"] {
            display: none;
        }

        .operations-panel {
            position: absolute;
            bottom: 100%;
            left: 0;
            right: 0;
            background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(10, 15, 26, 0.98) 100%);
            border: 1px solid rgba(0, 212, 170, 0.2);
            border-bottom: none;
            border-radius: 12px 12px 0 0;
            max-height: 0;
            overflow: hidden;
            opacity: 0;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            z-index: 100;
            backdrop-filter: blur(12px);
            box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
        }

        .operations-panel.visible {
            max-height: 300px;
            opacity: 1;
        }

        .ops-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 16px;
            border-bottom: 1px solid rgba(0, 212, 170, 0.15);
            background: rgba(0, 212, 170, 0.05);
        }

        .ops-title {
            display: flex;
            align-items: center;
            gap: 8px;
            color: #00D4AA;
            font-size: 12px;
            font-weight: 600;
            letter-spacing: 0.5px;
        }

        .ops-close-btn {
            background: transparent;
            border: none;
            color: #64748b;
            cursor: pointer;
            padding: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 4px;
            transition: all 0.2s;
        }

        .ops-close-btn:hover {
            color: #00D4AA;
            background: rgba(0, 212, 170, 0.1);
        }

        .ops-header-actions {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .ops-stats {
            font-size: 10px;
            color: #64748b;
            padding: 2px 6px;
            background: rgba(0, 0, 0, 0.2);
            border-radius: 4px;
        }

        .ops-stats .stat-ok { color: #22c55e; }
        .ops-stats .stat-err { color: #ef4444; }
        .ops-stats .stat-run { color: #f59e0b; }

        .ops-clear-btn {
            background: transparent;
            border: none;
            color: #64748b;
            cursor: pointer;
            padding: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 4px;
            transition: all 0.2s;
            opacity: 0.5;
        }

        .ops-clear-btn:hover {
            color: #ef4444;
            background: rgba(239, 68, 68, 0.1);
            opacity: 1;
        }

        .ops-clear-btn.has-completed {
            opacity: 1;
            color: #94a3b8;
        }

        .ops-list {
            max-height: 250px;
            overflow-y: auto;
            padding: 8px;
        }

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

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

        .ops-list::-webkit-scrollbar-thumb {
            background: rgba(0, 212, 170, 0.3);
            border-radius: 3px;
        }

        .ops-empty {
            color: #64748b;
            font-size: 12px;
            text-align: center;
            padding: 20px;
            font-style: italic;
        }

        .op-item {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            padding: 8px 10px;
            margin-bottom: 4px;
            background: rgba(30, 41, 59, 0.5);
            border-radius: 8px;
            border-left: 3px solid transparent;
            transition: all 0.2s;
            animation: opSlideIn 0.3s ease;
        }

        @keyframes opSlideIn {
            from {
                opacity: 0;
                transform: translateY(-10px);
            }
            to {
                opacity: 1;
                transform: translateX(-50%) translateY(0);
            }
        }

        .op-item.running {
            border-left-color: #f59e0b;
            background: rgba(245, 158, 11, 0.1);
        }

        .op-item.complete {
            border-left-color: #10b981;
        }

        .op-item.error {
            border-left-color: #ef4444;
            background: rgba(239, 68, 68, 0.1);
        }

        .op-icon {
            font-size: 16px;
            flex-shrink: 0;
            width: 24px;
            text-align: center;
        }

        .op-content {
            flex: 1;
            min-width: 0;
        }

        .op-name {
            color: #e2e8f0;
            font-size: 12px;
            font-weight: 600;
            margin-bottom: 2px;
        }

        .op-detail {
            color: #94a3b8;
            font-size: 11px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            font-family: 'Monaco', 'Menlo', monospace;
        }

        .op-time {
            color: #64748b;
            font-size: 10px;
            flex-shrink: 0;
            text-align: right;
        }

        .op-duration {
            color: #00D4AA;
            font-size: 10px;
            margin-top: 2px;
        }

        /* Indicador de operación activa */
        .op-item.running .op-icon::after {
            content: '';
            display: inline-block;
            width: 6px;
            height: 6px;
            background: #f59e0b;
            border-radius: 50%;
            margin-left: 4px;
            animation: opPulse 1s ease-in-out infinite;
        }

        @keyframes opPulse {
            0%, 100% { opacity: 1; transform: scale(1); }
            50% { opacity: 0.5; transform: scale(0.8); }
        }

        /* Tiempo elapsed para operaciones en curso */
        .op-elapsed {
            color: #f59e0b;
            font-size: 10px;
            font-weight: 600;
            animation: opElapsedPulse 1s ease-in-out infinite;
        }

        @keyframes opElapsedPulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.6; }
        }

        /* Barra de progreso animada */
        .op-progress-bar {
            height: 2px;
            background: linear-gradient(90deg,
                transparent 0%,
                #f59e0b 20%,
                #fbbf24 50%,
                #f59e0b 80%,
                transparent 100%
            );
            background-size: 200% 100%;
            animation: opProgressMove 1.5s linear infinite;
            border-radius: 1px;
            margin-top: 4px;
            opacity: 0.8;
        }

        @keyframes opProgressMove {
            0% { background-position: 100% 0; }
            100% { background-position: -100% 0; }
        }

        /* Animación entrada para nuevo item */
        .op-item.new-item {
            animation: opNewItem 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

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

        /* Transición de running a complete */
        .op-item.complete {
            transition: all 0.3s ease;
        }

        .op-item.complete .op-icon {
            color: #10b981;
        }

        /* Efecto hover mejorado */
        .op-item:hover {
            background: rgba(30, 41, 59, 0.8);
            transform: translateX(2px);
        }

        .op-item:hover .op-detail {
            color: #e2e8f0;
        }

        /* Badge contador con animación de bounce */
        .ops-count {
            background: #00D4AA;
            color: #0a0f1a;
            padding: 1px 5px;
            border-radius: 10px;
            font-weight: 600;
            font-size: 10px;
            min-width: 16px;
            text-align: center;
            transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        .ops-count.updated {
            animation: opsBadgeBounce 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        @keyframes opsBadgeBounce {
            0% { transform: scale(1); }
            50% { transform: scale(1.3); }
            100% { transform: scale(1); }
        }

        /* Mobile: ocultar panel de operaciones */
        @media (max-width: 768px) {
            .expand-ops-btn {
                display: none;
            }
            .operations-panel {
                display: none;
            }
        }

        /* Tablet responsive */
        @media (max-width: 1024px) {
            .progress-indicator {
                left: 50%;
                width: calc(100% - 24px);
                max-width: 700px;
            }
        }

        /* Mobile responsive */
        @media (max-width: 768px) {
            .progress-indicator {
                left: 50%;
                width: calc(100% - 24px);
                max-width: 700px;
                bottom: 170px; /* 64px bottomNav + ~95px input-area + margen */
                padding: 0 12px;
                height: 36px;
                font-size: 11px;
                gap: 8px;
            }

            .progress-indicator .left-section,
            .progress-indicator .right-section {
                gap: 10px;
            }

            .progress-indicator .cancel-hint {
                display: none;
            }

            .progress-indicator .divider {
                height: 14px;
            }

            .progress-indicator .tokens-section {
                gap: 4px;
            }

            .progress-indicator .status-icon {
                font-size: 14px;
            }

            .progress-indicator .tokens-value {
                min-width: 40px;
            }

            /* Tokens visibles en móvil - usuario quiere ver métricas */
            .progress-indicator .tokens-section {
                font-size: 11px;
            }
            .progress-indicator .tokens-section svg {
                width: 10px;
                height: 10px;
            }
        }


        .mobile-sidebar-toggle {
            display: none;
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            color: var(--text-primary);
            padding: 0.5rem;
            border-radius: 6px;
            cursor: pointer;
            margin-right: 0.5rem;
        }

        /* Modal for new instance */
        .modal-overlay {
            display: none;
            position: fixed;
            top: 91px;
            left: 0;
            right: 12px; /* Alineado con padding-right del messagesArea */
            bottom: 0;
            background: rgba(0,0,0,0.7);
            z-index: 2000;
            align-items: center;
            justify-content: center;
        }

        .modal-overlay.visible {
            display: flex;
        }

        .modal {
            background: var(--bg-secondary);
            border-radius: 12px;
            width: 90%;
            max-width: 500px;
            max-height: 80vh;
            overflow: auto;
        }

        .modal-header {
            padding: 1rem 1.5rem;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .modal-header h3 {
            font-size: 1.1rem;
        }

        .modal-close {
            background: none;
            border: none;
            color: var(--text-secondary);
            font-size: 1.5rem;
            cursor: pointer;
        }

        .modal-body {
            padding: 1.5rem;
        }

        .form-group {
            margin-bottom: 1rem;
        }

        .form-group label {
            display: block;
            margin-bottom: 0.5rem;
            color: var(--text-secondary);
            font-size: 0.9rem;
        }

        .form-group input,
        .form-group textarea {
            width: 100%;
            padding: 0.75rem;
            background: var(--bg-primary);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            color: var(--text-primary);
            font-size: 0.9rem;
        }

        .form-group input:focus,
        .form-group textarea:focus {
            outline: none;
            border-color: var(--accent-blue);
        }

        .modal-footer {
            padding: 1rem 1.5rem;
            border-top: 1px solid var(--border-color);
            display: flex;
            gap: 0.5rem;
            justify-content: flex-end;
        }

        .btn-secondary {
            padding: 0.5rem 1rem;
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            color: var(--text-primary);
            cursor: pointer;
        }

        .btn-primary {
            padding: 0.5rem 1rem;
            background: var(--accent-blue);
            border: none;
            border-radius: 6px;
            color: white;
            cursor: pointer;
        }

        .btn-primary:hover {
            background: #2563eb;
        }

        /* =====================================================
           CUSTOM CONFIRM MODAL - Claudia Style
           ===================================================== */
        .confirm-modal-overlay {
            display: none;
            position: fixed;
            top: 91px;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.75);
            z-index: 50000;
            align-items: center;
            justify-content: center;
            animation: confirmFadeIn 0.2s ease;
        }

        .confirm-modal-overlay.visible {
            display: flex;
        }

        @keyframes confirmFadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        @keyframes confirmSlideIn {
            from { transform: scale(0.9) translateY(-20px); opacity: 0; }
            to { transform: scale(1) translateY(0); opacity: 1; }
        }

        .confirm-modal {
            background: var(--bg-secondary);
            border-radius: 12px;
            width: 90%;
            max-width: 400px;
            border: 1px solid var(--claudia-cyan-primary);
            box-shadow: 0 0 30px rgba(0, 217, 255, 0.15), 0 4px 24px rgba(0, 0, 0, 0.4);
            animation: confirmSlideIn 0.25s ease;
        }

        .confirm-modal-header {
            padding: 1rem 1.25rem;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }

        .confirm-modal-icon {
            width: 28px;
            height: 28px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .confirm-modal-icon svg {
            width: 24px;
            height: 24px;
            stroke: var(--claudia-cyan-primary);
            fill: none;
        }

        .confirm-modal-icon.warning svg {
            stroke: var(--accent-yellow);
        }

        .confirm-modal-icon.danger svg {
            stroke: var(--accent-red);
        }

        .confirm-modal-header h4 {
            font-size: 1rem;
            font-weight: 600;
            color: var(--text-primary);
            margin: 0;
        }

        .confirm-modal-body {
            padding: 1.25rem;
        }

        .confirm-modal-message {
            font-size: 0.95rem;
            color: var(--text-secondary);
            line-height: 1.5;
            margin: 0;
            white-space: pre-wrap;
        }

        .confirm-modal-footer {
            padding: 1rem 1.25rem;
            border-top: 1px solid var(--border-color);
            display: flex;
            gap: 0.75rem;
            justify-content: flex-end;
        }

        .confirm-btn {
            padding: 0.6rem 1.25rem;
            border-radius: 6px;
            font-size: 0.9rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .confirm-btn-cancel {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            color: var(--text-secondary);
        }

        .confirm-btn-cancel:hover {
            background: var(--bg-hover);
            color: var(--text-primary);
        }

        .confirm-btn-ok {
            background: var(--claudia-cyan-primary);
            border: none;
            color: var(--bg-primary);
        }

        .confirm-btn-ok:hover {
            background: var(--claudia-cyan-bright);
            box-shadow: 0 0 12px rgba(0, 217, 255, 0.4);
        }

        .confirm-btn-ok.danger {
            background: var(--accent-red);
        }

        .confirm-btn-ok.danger:hover {
            background: #dc2626;
            box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
        }

        /* Prompt modal input */
        .prompt-modal-input {
            width: 100%;
            padding: 0.75rem 1rem;
            margin-top: 0.75rem;
            background: var(--bg-primary);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            color: var(--text-primary);
            font-size: 0.95rem;
            outline: none;
            transition: border-color 0.2s, box-shadow 0.2s;
        }

        .prompt-modal-input:focus {
            border-color: var(--claudia-cyan-primary);
            box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.15);
        }

        .confirm-modal-header h3 {
            font-size: 1rem;
            font-weight: 600;
            color: var(--text-primary);
            margin: 0;
        }

        .confirm-modal-body p {
            color: var(--text-secondary);
            margin: 0;
            font-size: 0.9rem;
        }

        .confirm-modal-actions {
            padding: 1rem 1.25rem;
            border-top: 1px solid var(--border-color);
            display: flex;
            gap: 0.75rem;
            justify-content: flex-end;
        }

        .confirm-modal-btn {
            padding: 0.6rem 1.25rem;
            border-radius: 6px;
            font-size: 0.9rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
            border: none;
        }

        .confirm-modal-btn.cancel {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            color: var(--text-secondary);
        }

        .confirm-modal-btn.cancel:hover {
            background: var(--bg-hover);
            color: var(--text-primary);
        }

        .confirm-modal-btn.confirm {
            background: var(--claudia-cyan-primary);
            color: var(--bg-primary);
        }

        .confirm-modal-btn.confirm:hover {
            background: var(--claudia-cyan-bright);
            box-shadow: 0 0 12px rgba(0, 217, 255, 0.4);
        }

        /* =====================================================
           SESSION PANEL SVG ICONS
           ===================================================== */
        .session-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 18px;
            height: 18px;
            flex-shrink: 0;
        }

        .session-icon svg {
            width: 16px;
            height: 16px;
            stroke: var(--claudia-cyan-primary);
            fill: none;
            stroke-width: 2;
            stroke-linecap: round;
            stroke-linejoin: round;
        }

        .session-icon.mobile svg,
        .session-icon.desktop svg {
            stroke: var(--claudia-cyan-primary);
        }

        .session-icon.server svg {
            stroke: var(--accent-purple);
        }

        .session-icon.location svg {
            stroke: var(--accent-yellow);
        }

        .session-icon.note svg {
            stroke: var(--text-secondary);
        }

        /* Hidden file input */
        #fileInput, #audioInput {
            display: none;
        }

        /* =====================================================
           NEW FEATURES STYLES v2.2
           ===================================================== */

        /* Chat toolbar */
        .chat-toolbar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.5rem 1rem;
            background: var(--bg-secondary);
            border-bottom: 1px solid var(--border-color);
            gap: 0.5rem;
        }

        .toolbar-left, .toolbar-right {
            display: flex;
            gap: 0.5rem;
            align-items: center;
        }

        .toolbar-btn {
            padding: 0.4rem 0.75rem;
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            color: var(--text-secondary);
            cursor: pointer;
            font-size: 0.8rem;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            gap: 0.4rem;
        }

        .toolbar-btn svg {
            width: 18px;
            height: 18px;
            stroke: currentColor;
            flex-shrink: 1;
        }

        .toolbar-btn .btn-label {
            font-size: 0.8rem;
            font-weight: 500;
        }

        .toolbar-btn:hover {
            background: rgba(0, 212, 170, 0.1);
            border-color: rgba(0, 212, 170, 0.3);
            color: var(--lohmia-accent);
        }

        .toolbar-btn:hover svg {
            stroke: var(--lohmia-accent);
        }

        .toolbar-btn.active {
            background: var(--accent-blue);
            color: white;
            border-color: var(--accent-blue);
        }

        /* Mobile: solo iconos */
        @media (max-width: 480px) {
            .toolbar-btn .btn-label {
                display: none;
            }
            .toolbar-btn {
                padding: 0.5rem;
            }
        }

        /* Toolbar More Options Dropdown */
        .toolbar-more {
            position: relative;
            display: none; /* Hidden by default, shown on mobile */
        }

        .toolbar-more-btn {
            padding: 0.5rem;
        }

        .toolbar-dropdown {
            /* FIX: posición correcta */
            position: fixed;
            top: 155px; /* Debajo del toolbar */
            right: 12px; /* Alineado con padding-right del messagesArea */
            min-width: 180px;
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
            z-index: 1000;
            display: none;
            overflow: hidden;
            margin-top: 4px;
        }

        .toolbar-dropdown.visible {
            display: block;
        }

        .dropdown-option {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            width: 100%;
            padding: 0.75rem 1rem;
            background: transparent;
            border: none;
            color: var(--text-primary);
            font-size: 0.85rem;
            cursor: pointer;
            text-align: left;
            transition: background 0.2s;
        }

        .dropdown-option:hover {
            background: rgba(0, 212, 170, 0.1);
        }

        .dropdown-option svg {
            width: 16px;
            height: 16px;
            stroke: var(--text-secondary);
            flex-shrink: 1;
        }

        .dropdown-option:hover svg {
            stroke: var(--lohmia-accent);
        }

        /* Desktop: hide more menu, show desktop-only buttons */
        .toolbar-desktop-only {
            display: flex;
        }

        /* Mobile: show more menu, hide desktop-only buttons */
        @media (max-width: 600px) {
            .toolbar-more {
                display: block;
            }
            .toolbar-desktop-only {
                display: none;
            }
            /* Fix overflow en móvil - reducir padding y gap */
            .chat-toolbar {
                padding: 0.5rem 0.5rem;
                gap: 0.25rem;
            }
            .toolbar-left, .toolbar-right {
                gap: 0.25rem;
            }
            .toolbar-btn {
                padding: 0.4rem;
            }
            /* Mobile toolbar overflow fix */
            .toolbar-right {
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
                max-width: calc(100vw - 140px);
                scrollbar-width: none;
            }
            .toolbar-right::-webkit-scrollbar {
                display: none;
            }
            /* Ocultar botones secundarios en móvil - están en dropdown */
            #historyBtn,
            #galleryBtn,
            #sessionsBtn {
                display: none !important;
            }
        }

        /* Dropdown SVG icons */
        .nav-dropdown-item .icon svg {
            width: 16px;
            height: 16px;
            stroke: currentColor;
            vertical-align: middle;
        }

        .nav-dropdown-item:hover .icon svg {
            stroke: var(--lohmia-accent);
        }

        /* Quick commands panel */
        .quick-commands {
            display: none;
            padding: 0.75rem;
            background: var(--bg-card);
            border-bottom: 1px solid var(--border-color);
            flex-wrap: wrap;
            gap: 0.5rem;
        }

        .quick-commands.visible {
            display: flex;
        }

        .quick-cmd {
            padding: 0.4rem 0.75rem;
            background: var(--bg-secondary);
            border: 1px solid var(--border-color);
            border-radius: 20px;
            color: var(--text-secondary);
            cursor: pointer;
            font-size: 0.75rem;
            transition: all 0.2s;
        }

        .quick-cmd:hover {
            background: var(--accent-purple);
            color: white;
            border-color: var(--accent-purple);
        }

        /* History panel - debajo del header principal */
        .history-panel {
            position: fixed;
            left: 0;
            top: 91px; /* Debajo del main-header (91px de alto) */
            bottom: 0;
            width: var(--sidebar-width);
            max-width: 90vw;
            background: var(--bg-primary);
            border-right: 1px solid var(--border-color);
            transform: translateX(-100%);
            transition: transform 0.3s ease;
            z-index: 5100; /* ENCIMA del panel-overlay (5000) para recibir eventos hover */
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .history-panel.visible {
            transform: translateX(0);
        }

        /* Mobile: adjust for bottomNav */
        @media (max-width: 768px) {
            .history-panel {
                top: 91px; /* En móvil ocupa toda la altura */
                bottom: 64px;
                width: 100%;
                max-width: 100%;
                border-right: none;
                z-index: 5100; /* Encima del overlay para recibir eventos */
            }
        }

        .history-item {
            position: relative;
            padding: 0.75rem 1rem;
            padding-right: 3rem;
            border-bottom: 1px solid var(--border-color);
            cursor: pointer;
            transition: background 0.2s;
        }

        .history-item:hover {
            background: var(--bg-hover);
        }

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

        .history-title {
            font-weight: 500;
            color: var(--text-primary);
            margin-bottom: 0.25rem;
        }

        .history-meta {
            font-size: 0.75rem;
            color: var(--text-secondary);
            display: flex;
            gap: 1rem;
        }

        .history-actions {
            display: flex;
            gap: 0.5rem;
            margin-top: 0.5rem;
        }

        .history-action-btn {
            padding: 0.25rem 0.5rem;
            background: var(--bg-card);
            border: none;
            border-radius: 4px;
            color: var(--text-secondary);
            cursor: pointer;
            font-size: 0.7rem;
        }

        .history-action-btn:hover {
            background: var(--accent-blue);
            color: white;
        }

        .history-action-btn.delete:hover {
            background: var(--accent-red);
        }

        /* Favorites star */
        .favorite-star {
            cursor: pointer;
            font-size: 1rem;
            transition: transform 0.2s;
        }

        .favorite-star:hover {
            transform: scale(1.2);
        }

        .favorite-star.active {
            color: var(--accent-yellow);
        }

        /* Search box in history */
        .history-search {
            padding: 0.75rem;
            border-bottom: 1px solid var(--border-color);
        }

        .history-search input {
            width: 100%;
            padding: 0.5rem 0.75rem;
            background: var(--bg-primary);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            color: var(--text-primary);
            font-size: 0.85rem;
        }

        .history-search input:focus {
            outline: none;
            border-color: var(--accent-blue);
        }

        .history-list-container {
            flex: 1;
            overflow-y: auto;
            padding: 0.5rem 0;
        }

        /* History panel uses same header style as sessions panel */
        .history-panel .panel-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 1rem;
            border-bottom: 1px solid var(--border-color);
            background: var(--bg-secondary);
        }

        .history-panel .panel-header h3 {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            margin: 0;
            font-size: 1rem;
            color: var(--claudia-cyan-primary);
        }

        .history-panel .panel-header h3 svg {
            stroke: var(--claudia-cyan-primary);
        }

        /* Syntax highlighting for code blocks */
        .message-content pre {
            position: relative;
            background: #1a1a2e;
            padding: 1rem;
            border-radius: 8px;
            overflow-x: auto;
            margin: 0.5rem 0;
        }

        .message-content pre code {
            font-family: 'Fira Code', 'Monaco', 'Menlo', monospace;
            font-size: 0.85em;
            line-height: 1.5;
        }

        .code-lang {
            position: fixed;
            top: 0.5rem;
            right: 0.5rem;
            font-size: 0.7rem;
            color: var(--text-secondary);
            background: var(--bg-card);
            padding: 0.15rem 0.4rem;
            border-radius: 4px;
        }

        .copy-code-btn {
            position: fixed;
            top: 0.5rem;
            right: 4rem;
            padding: 0.25rem 0.5rem;
            background: var(--bg-card);
            border: none;
            border-radius: 4px;
            color: var(--text-secondary);
            cursor: pointer;
            font-size: 0.7rem;
            opacity: 0;
            transition: opacity 0.2s;
        }

        .message-content pre:hover .copy-code-btn {
            opacity: 1;
        }

        .copy-code-btn:hover {
            background: var(--accent-blue);
            color: white;
        }

        /* Syntax colors */
        .hljs-keyword { color: #c678dd; }
        .hljs-string { color: #98c379; }
        .hljs-number { color: #d19a66; }
        .hljs-comment { color: #5c6370; font-style: italic; }
        .hljs-function { color: #61afef; }
        .hljs-variable { color: #e06c75; }
        .hljs-operator { color: #56b6c2; }

        /* Tables in markdown - Enhanced with scroll */
        .table-wrapper {
            overflow-x: auto;
            margin: 0.75rem 0;
            border-radius: 8px;
            position: relative;
            -webkit-overflow-scrolling: touch;
        }

        /* Scroll indicator animation */
        .table-wrapper.has-scroll::after {
            content: '→';
            position: fixed;
            top: 50%;
            right: 4px;
            transform: translateY(-50%);
            font-size: 1.2rem;
            color: var(--accent-cyan);
            opacity: 0.7;
            pointer-events: none;
            animation: scrollHint 1.5s ease-in-out infinite;
        }

        @keyframes scrollHint {
            0%, 100% { opacity: 0.7; transform: translateY(-50%) translateX(0); }
            50% { opacity: 1; transform: translateY(-50%) translateX(3px); }
        }

        .table-wrapper.scrolled::after {
            display: none;
        }

        .message-content table {
            border-collapse: collapse;
            margin: 0;
            width: 100%;
            min-width: 100%;
            font-size: 0.85rem;
            background: var(--bg-secondary);
            border-radius: 8px;
            overflow: hidden;
        }

        .message-content th,
        .message-content td {
            border: 1px solid rgba(71, 85, 105, 0.5);
            padding: 0.625rem 0.875rem;
            text-align: left;
            vertical-align: top;
        }

        .message-content th {
            background: linear-gradient(135deg, #2C5F7F 0%, #1e4a5f 100%);
            color: #ffffff;
            font-weight: 600;
            white-space: nowrap;
            position: sticky;
            top: 91px;
            z-index: 1;
        }

        .message-content td {
            word-wrap: break-word;
            overflow-wrap: anywhere;
        }

        .message-content tr:nth-child(even) td {
            background: rgba(45, 55, 72, 0.3);
        }

        .message-content tr:hover td {
            background: rgba(0, 212, 170, 0.1);
        }

        .message-content tr:first-child th:first-child {
            border-top-left-radius: 8px;
        }

        .message-content tr:first-child th:last-child {
            border-top-right-radius: 8px;
        }

        /* Links */
        .message-content a {
            color: var(--accent-blue);
            text-decoration: none;
        }

        .message-content a:hover {
            text-decoration: underline;
        }

        /* Keyboard shortcuts help */
        .shortcuts-help {
            display: none;
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: var(--bg-secondary);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            padding: 1.5rem;
            z-index: 3000;
            min-width: 400px;
        }

        .shortcuts-close {
            position: fixed;
            top: 10px;
            right: 10px;
            background: none;
            border: none;
            font-size: 24px;
            color: var(--text-secondary);
            cursor: pointer;
            padding: 5px 10px;
            line-height: 1;
        }
        .shortcuts-close:hover {
            color: var(--accent-red, #ef4444);
        }
        .shortcuts-help.visible {
            display: block;
        }

        .shortcuts-help h3 {
            margin-bottom: 1rem;
            color: var(--accent-blue);
        }

        .shortcut-row {
            display: flex;
            justify-content: space-between;
            padding: 0.5rem 0;
            border-bottom: 1px solid var(--border-color);
        }

        .shortcut-row:last-child {
            border-bottom: none;
        }

        .shortcut-key {
            background: var(--bg-card);
            padding: 0.2rem 0.5rem;
            border-radius: 4px;
            font-family: monospace;
            font-size: 0.85rem;
        }

        /* Export modal */
        .export-options {
            display: flex;
            gap: 1rem;
            margin-top: 1rem;
        }

        .export-option {
            flex: 1;
            padding: 1rem;
            background: var(--bg-card);
            border: 2px solid var(--border-color);
            border-radius: 8px;
            cursor: pointer;
            text-align: center;
            transition: all 0.2s;
        }

        .export-option:hover {
            border-color: var(--accent-blue);
        }

        .export-option.selected {
            border-color: var(--accent-blue);
            background: rgba(0, 212, 170, 0.1);
        }

        .export-option-icon {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 48px;
            height: 48px;
            margin-bottom: 0.5rem;
        }

        .export-option-icon svg {
            width: 32px;
            height: 32px;
            stroke: var(--accent-cyan, #00D4AA);
        }

        .export-option:hover .export-option-icon svg {
            stroke: var(--accent-cyan, #00D4AA);
            filter: drop-shadow(0 0 4px rgba(0, 212, 170, 0.5));
        }

        /* Server status indicators (real-time) */
        .server-status.checking {
            animation: pulse 1s infinite;
        }

        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.5; }
        }

        /* Notification toast */
        .notification-toast {
            position: fixed;
            top: 80px;
            right: 20px;
            background: var(--bg-secondary);
            border: 1px solid var(--accent-green);
            border-radius: 8px;
            padding: 1rem;
            display: none;
            z-index: 3000;
            max-width: 300px;
            animation: slideIn 0.3s ease;
        }

        .notification-toast.visible {
            display: block;
        }

        @keyframes slideIn {
            from { transform: translateX(100%); opacity: 0; }
            to { transform: translateX(0); opacity: 1; }
        }

        .notification-title {
            font-weight: 600;
            margin-bottom: 0.25rem;
        }

        .notification-body {
            font-size: 0.85rem;
            color: var(--text-secondary);
        }

        /* Conversation title editable */
        .conversation-title {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .conversation-title-input {
            background: transparent;
            border: none;
            color: var(--text-primary);
            font-size: 0.9rem;
            padding: 0.25rem 0.5rem;
            border-radius: 4px;
            min-width: 150px;
            max-width: 300px;
            flex: 1;
            /* Evitar corte abrupto del texto */
            text-overflow: ellipsis;
            overflow: hidden;
            white-space: nowrap;
        }

        .conversation-title-input:focus {
            outline: none;
            background: var(--bg-card);
        }

        /* Mobile: Ajustar ancho del título de conversación */
        @media (max-width: 480px) {
            .conversation-title-input {
                min-width: 100px;
                max-width: 200px;
                font-size: 0.85rem;
            }
        }

        .title-action-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 24px;
            height: 24px;
            padding: 0;
            background: transparent;
            border: none;
            border-radius: 4px;
            color: var(--text-secondary);
            cursor: pointer;
            opacity: 0.6;
            transition: all 0.2s;
        }

        .title-action-btn:hover {
            background: var(--bg-hover);
            color: var(--accent-primary);
            opacity: 1;
        }

        .title-action-btn:active {
            transform: scale(0.9);
        }

        .title-action-btn.generating {
            animation: spin 1s linear infinite;
            pointer-events: none;
        }

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

        /* Empty state for history */
        .history-empty {
            padding: 2rem;
            text-align: center;
            color: var(--text-secondary);
        }

        .history-empty-icon {
            font-size: 3rem;
            margin-bottom: 1rem;
            opacity: 0.5;
        }

        /* History item additional styles */
        .history-item {
            position: relative;
            padding-right: 2.5rem;
        }

        .history-item-header {
            display: flex;
            justify-content: space-between;
            align-items: baseline;
            margin-bottom: 4px;
            gap: 10px;
            width: 100%;
        }

        .history-item-title {
            font-weight: 600;
            font-size: 0.875rem;
            line-height: 1.3;
            color: var(--text-primary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            flex: 1;
            min-width: 0;
        }

        .history-item-date {
            font-size: 0.7rem;
            color: var(--text-muted, #6b7280);
            flex-shrink: 0;
            white-space: nowrap;
            opacity: 0.8;
        }

        .history-item-preview {
            font-size: 0.8rem;
            line-height: 1.4;
            color: var(--text-secondary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            width: 100%;
            opacity: 0.7;
        }

        /* =====================================================
           SWIPE ACTIONS (estilo iOS/Android)
           ===================================================== */
        .history-item-wrapper {
            position: relative;
            overflow: visible;
            isolation: isolate;
        }

        /* ===== DESKTOP: Botones OCULTOS por defecto, aparecen en HOVER ===== */
        /* Contenedor con gradiente para no tapar texto */
        .swipe-actions {
            position: absolute;
            right: 0;
            top: 0;
            bottom: 0;
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 4px;
            padding-right: 8px;
            padding-left: 24px;
            z-index: 1001;
            /* Gradiente sutil: transparente -> fondo */
            background: linear-gradient(to right,
                transparent 0%,
                var(--bg-primary) 40%);
            /* OCULTOS por defecto */
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
            /* Transición suave */
            transition: opacity 0.2s ease, visibility 0.2s ease;
        }

        /* HOVER DESKTOP: Media query explícita para dispositivos con hover */
        @media (hover: hover) and (pointer: fine) {
            .history-item-wrapper:hover .swipe-actions {
                opacity: 1 !important;
                visibility: visible !important;
                pointer-events: auto !important;
            }
        }

        /* Móvil: Cuando el swipe está abierto */
        .history-item-wrapper.swipe-open .swipe-actions {
            opacity: 1;
            visibility: visible;
            pointer-events: auto;
        }

        /* Item principal - texto usa todo el espacio */
        .history-item {
            position: relative;
            transform: translateX(0);
            transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            z-index: 1;
            background: var(--bg-primary);
            width: 100%;
            padding-right: 1rem !important; /* Sin espacio reservado - botones son overlay en hover */
        }

        .history-item.swiping {
            transition: none;
        }

        .history-item.swiped {
            transform: translateX(-150px);
        }

        /* Botones de acción - diseño sutil y elegante */
        .swipe-action {
            width: 24px;
            height: 24px;
            border-radius: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-secondary);
            background: transparent;
            border: none;
            cursor: pointer;
            transition: all 0.15s ease;
            flex: none;
            opacity: 0.6;
        }

        .swipe-action:hover {
            opacity: 1;
            background: var(--bg-hover);
            color: var(--text-primary);
        }

        .swipe-action:active {
            transform: scale(0.95);
        }

        .swipe-action svg {
            width: 14px;
            height: 14px;
            stroke: currentColor;
            fill: none;
            stroke-width: 2;
        }

        /* Color solo al hover - más sutil */
        .swipe-action.favorite:hover {
            color: var(--accent-yellow);
            background: rgba(234, 179, 8, 0.1);
        }

        .swipe-action.favorite.is-fav {
            color: var(--accent-yellow);
            opacity: 1;
        }

        .swipe-action.favorite.is-fav svg {
            fill: currentColor;
        }

        .swipe-action.rename:hover {
            color: var(--accent-cyan);
            background: rgba(0, 212, 170, 0.1);
        }

        .swipe-action.delete:hover {
            color: var(--accent-red);
            background: rgba(239, 68, 68, 0.1);
        }

        /* ===== MÓVIL: Ocultar por defecto, mostrar solo con swipe ===== */
        @media (hover: none) and (pointer: coarse) {
            .history-item-wrapper {
                overflow: hidden;
            }

            .swipe-actions {
                right: 0;
                top: 0;
                height: 100%;
                width: 150px;
                transform: translateX(0);
                gap: 0;
                padding: 0;
                background: none;
                opacity: 0;
                visibility: hidden;
                pointer-events: none;
            }

            .history-item-wrapper.swipe-open .swipe-actions {
                opacity: 1;
                visibility: visible;
                pointer-events: auto;
            }

            .history-item {
                padding-right: 1rem !important;
                z-index: 2;
            }

            /* Móvil: botones con color de fondo */
            .swipe-action {
                width: auto;
                height: 100%;
                border-radius: 0;
                flex: 1;
                opacity: 1;
                color: white;
            }

            .swipe-action.favorite {
                background: var(--accent-yellow);
            }

            .swipe-action.rename {
                background: var(--accent-cyan);
            }

            .swipe-action.delete {
                background: var(--accent-red);
            }

            .swipe-action svg {
                width: 20px;
                height: 20px;
            }
        }

        /* Desktop: desactivar swipe, usar hover */
        @media (hover: hover) and (pointer: fine) {
            /* Desactivar el swipe en desktop */
            .history-item.swiped {
                transform: translateX(0);
            }
        }

        .history-item.active {
            background: rgba(0, 217, 255, 0.08);
            border-left: 3px solid var(--claudia-cyan-primary);
            box-shadow: inset 0 0 0 1px rgba(0, 217, 255, 0.15);
        }

        .history-item.active .history-item-title {
            color: var(--claudia-cyan-primary);
            font-weight: 600;
        }

        /* Device Presence Badges */
        .device-badges {
            display: inline-flex;
            gap: 0.2rem;
            margin-left: 0.5rem;
        }

        .device-badge {
            font-size: 0.8rem;
            opacity: 0.7;
            cursor: help;
        }

        .device-badge.current {
            opacity: 1;
            filter: drop-shadow(0 0 4px var(--accent-cyan));
        }

        .history-item.is-open {
            background: rgba(0, 217, 255, 0.08);
            border-left: 3px solid var(--accent-cyan);
        }

        /* Active Sessions Panel */
        .active-sessions-panel {
            /* Debajo del header principal (91px) */
            position: fixed;
            right: 0;
            top: 91px;
            bottom: 0;
            width: var(--sidebar-width); /* Unificado con sidebar principal */
            max-width: 90vw;
            background: var(--bg-primary);
            border-left: 1px solid var(--border-color);
            transform: translateX(100%);
            transition: transform 0.3s ease;
            z-index: 5001;
            display: flex;
            flex-direction: column;
        }

        /* Mobile: leave space for bottomNav */
        @media (max-width: 768px) {
            .active-sessions-panel {
                bottom: 64px;
                width: 100%;
                max-width: 100%;
                border-left: none;
            }
        }

        /* Panel Overlay - FASE 4 (transparente) */
        .panel-overlay {
            position: fixed;
            top: 91px;
            left: 0;
            right: 0;
            bottom: 0;
            background: transparent;
            z-index: 5000;
            visibility: hidden;
        }

        .panel-overlay.visible {
            visibility: visible;
        }

        @media (max-width: 768px) {
            .panel-overlay {
                bottom: 64px;
            }
        }

        .active-sessions-panel.visible {
            transform: translateX(0);
        }

        .active-sessions-panel .panel-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 1rem;
            border-bottom: 1px solid var(--border-color);
        }

        .active-sessions-panel .panel-header h3 {
            margin: 0;
            color: var(--accent-cyan);
            font-size: 1rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .active-sessions-panel .panel-header h3 svg {
            color: var(--accent-cyan);
            flex-shrink: 0;
        }

        .close-panel-btn {
            width: 28px;
            height: 28px;
            background: rgba(239, 68, 68, 0.1);
            border: 1px solid rgba(239, 68, 68, 0.3);
            border-radius: 6px;
            color: #ef4444;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }

        .close-panel-btn:hover {
            background: rgba(239, 68, 68, 0.2);
            border-color: #ef4444;
        }

        .close-panel-btn svg {
            width: 14px;
            height: 14px;
        }

        .active-sessions-list {
            flex: 1;
            overflow-y: auto;
            padding: 1rem;
        }

        .session-group {
            margin-bottom: 1.25rem;
        }

        .session-group-header {
            font-size: 0.95rem;
            font-weight: 600;
            color: var(--accent-cyan);
            margin-bottom: 0.5rem;
            padding-bottom: 0.5rem;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .session-item {
            background: rgba(26, 35, 50, 0.5);
            border-radius: 8px;
            padding: 0.75rem;
            margin-bottom: 0.5rem;
        }

        .session-title {
            font-size: 0.9rem;
            margin-bottom: 0.5rem;
            color: var(--text-primary);
        }

        .session-devices {
            display: flex;
            flex-direction: column;
            gap: 0.25rem;
        }

        .session-device {
            font-size: 0.8rem;
            color: var(--text-secondary);
            padding: 0.35rem 0.5rem 0.35rem 1rem;
            display: flex;
            align-items: center;
            justify-content: space-between;
            border-radius: 4px;
            transition: background 0.2s;
        }

        .session-device:hover {
            background: rgba(0, 217, 255, 0.05);
        }

        .session-device.is-current {
            color: var(--accent-cyan);
            font-weight: 500;
        }

        /* Botón de cierre individual */
        .session-device-close {
            padding: 2px 6px;
            background: transparent;
            border: 1px solid rgba(255, 102, 102, 0.5);
            color: #ff6666;
            border-radius: 4px;
            font-size: 0.7rem;
            cursor: pointer;
            opacity: 0;
            transition: opacity 0.2s, background 0.2s;
            margin-left: 0.5rem;
        }

        .session-device:hover .session-device-close {
            opacity: 1;
        }

        .session-device-close:hover {
            background: rgba(255, 102, 102, 0.15);
            border-color: #ff6666;
        }

        /* Ocultar botón en dispositivo actual */
        .session-device.is-current .session-device-close {
            display: none;
        }

        .session-summary {
            padding: 0.75rem;
            text-align: center;
            font-size: 0.8rem;
            color: var(--text-secondary);
            border-top: 1px solid var(--border-color);
            margin-top: 1rem;
        }

        .panel-footer {
            padding: 1rem;
            border-top: 1px solid var(--border-color);
        }

        /* Botón outline cyan para acciones secundarias */
        .btn-secondary-outline {
            width: 100%;
            padding: 0.75rem;
            background: transparent;
            border: 1px solid var(--accent-cyan);
            color: var(--accent-cyan);
            border-radius: 8px;
            cursor: pointer;
            font-weight: 500;
            font-size: 0.9rem;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
        }

        .btn-secondary-outline svg {
            flex-shrink: 0;
        }

        .btn-secondary-outline:hover {
            background: rgba(0, 217, 255, 0.1);
            border-color: #33e0ff;
        }

        .btn-secondary-outline:active {
            background: rgba(0, 217, 255, 0.2);
        }

        .sessions-badge {
            position: absolute;
            top: -4px;
            right: -4px;
            background: var(--accent-cyan);
            color: var(--bg-primary);
            font-size: 0.65rem;
            font-weight: 700;
            min-width: 16px;
            height: 16px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0 4px;
        }

        .empty-sessions {
            text-align: center;
            padding: 2rem;
            color: var(--text-secondary);
        }

        /* History grouped by server styles */
        .history-server-group {
            margin-bottom: 16px;
        }
        .history-server-header {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 12px;
            background: rgba(0, 212, 170, 0.1);
            border-left: 3px solid var(--accent-cyan);
            border-radius: 0 8px 8px 0;
            margin-bottom: 8px;
            cursor: pointer;
            transition: background 0.2s;
        }
        .history-server-header:hover {
            background: rgba(0, 212, 170, 0.2);
        }
        .history-server-header .server-icon {
            width: 16px;
            height: 16px;
            color: var(--accent-cyan);
        }
        .history-server-header .server-name {
            font-weight: 600;
            color: var(--text-primary);
            font-size: 13px;
        }
        .history-server-header .server-count {
            margin-left: auto;
            background: rgba(0, 212, 170, 0.2);
            color: var(--accent-cyan);
            padding: 2px 8px;
            border-radius: 10px;
            font-size: 11px;
            font-weight: 500;
        }
        .history-server-header .expand-icon {
            transition: transform 0.2s;
        }
        .history-server-group.collapsed .expand-icon {
            transform: rotate(-90deg);
        }
        .history-server-group.collapsed .history-server-items {
            display: none;
        }
        .history-server-items {
            padding-left: 8px;
        }
        /* ===== NUEVO: Área de filtros rediseñada ===== */
        .history-filter-area {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 8px;
            margin: 0 8px 8px 8px;
            background: var(--bg-tertiary);
            border-radius: 8px;
            width: calc(100% - 16px);
            box-sizing: border-box;
        }

        .history-filter-select {
            flex: 1;
            min-width: 0;
            padding: 8px 28px 8px 10px;
            background: var(--bg-secondary);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            color: var(--text-primary);
            font-size: 12px;
            cursor: pointer;
            appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 8px center;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .history-filter-select:hover {
            border-color: var(--accent-cyan);
        }

        .history-filter-select:focus {
            outline: none;
            border-color: var(--accent-cyan);
            box-shadow: 0 0 0 2px rgba(0, 212, 170, 0.2);
        }

        .history-select-btn {
            padding: 8px;
            background: var(--bg-secondary);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            color: var(--text-secondary);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
            flex-shrink: 0;
            width: 34px;
            height: 34px;
        }

        .history-select-btn:hover {
            background: var(--bg-hover);
            border-color: var(--accent-cyan);
            color: var(--text-primary);
        }

        .history-select-btn.active {
            background: rgba(0, 212, 170, 0.15);
            border-color: var(--accent-cyan);
            color: var(--accent-cyan);
        }

        .history-select-btn svg {
            width: 18px;
            height: 18px;
        }

        /* ===== Barra de selección (aparece en modo selección) ===== */
        .selection-header {
            display: none;
            flex-direction: column;
            gap: 10px;
            padding: 12px 14px;
            background: linear-gradient(135deg, rgba(0, 212, 170, 0.12) 0%, rgba(59, 130, 246, 0.08) 100%);
            border: 1px solid rgba(0, 212, 170, 0.25);
            border-radius: 10px;
            margin: 0 8px 10px 8px;
        }

        .selection-header.visible {
            display: flex;
        }

        .selection-header-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
        }

        .selection-count {
            font-size: 14px;
            color: var(--text-primary);
            font-weight: 600;
        }

        .selection-actions {
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
            justify-content: flex-end;
        }

        .selection-action-btn {
            padding: 8px 12px;
            border: none;
            border-radius: 6px;
            font-size: 12px;
            font-weight: 500;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 6px;
            transition: all 0.15s;
            white-space: nowrap;
        }

        .selection-action-btn.select-all {
            background: rgba(255, 255, 255, 0.1);
            color: var(--text-primary);
            border: 1px solid rgba(255, 255, 255, 0.15);
        }

        .selection-action-btn.select-all:hover {
            background: rgba(255, 255, 255, 0.18);
            border-color: rgba(255, 255, 255, 0.25);
        }

        .selection-action-btn.favorite-selected {
            background: rgba(234, 179, 8, 0.2);
            color: #fbbf24;
            border: 1px solid rgba(234, 179, 8, 0.3);
        }

        .selection-action-btn.favorite-selected:hover:not(:disabled) {
            background: rgba(234, 179, 8, 0.35);
        }

        .selection-action-btn.delete-selected {
            background: rgba(239, 68, 68, 0.2);
            color: #f87171;
            border: 1px solid rgba(239, 68, 68, 0.3);
        }

        .selection-action-btn.delete-selected:hover:not(:disabled) {
            background: rgba(239, 68, 68, 0.35);
        }

        .selection-action-btn:disabled {
            opacity: 0.35;
            cursor: not-allowed;
            filter: grayscale(0.5);
        }

        .selection-action-btn.cancel-selection {
            background: transparent;
            color: var(--text-secondary);
            padding: 6px 8px;
            border: none;
            font-size: 16px;
            font-weight: 400;
        }

        .selection-action-btn.cancel-selection:hover {
            color: var(--text-primary);
            background: rgba(255, 255, 255, 0.1);
        }

        .selection-action-btn svg {
            width: 14px;
            height: 14px;
        }

        /* ===== Checkbox en items (modo selección) ===== */
        .history-item-checkbox {
            position: absolute;
            left: 8px;
            top: 50%;
            transform: translateY(-50%);
            width: 18px;
            height: 18px;
            border: 2px solid var(--border-color);
            border-radius: 4px;
            background: var(--bg-tertiary);
            cursor: pointer;
            display: none;
            align-items: center;
            justify-content: center;
            transition: all 0.15s;
            z-index: 15;
        }

        .selection-mode .history-item-checkbox {
            display: flex;
        }

        .selection-mode .history-item-wrapper {
            padding-left: 34px;
        }

        .history-item-checkbox:hover {
            border-color: var(--accent-cyan);
        }

        .history-item-checkbox.checked {
            background: var(--accent-cyan);
            border-color: var(--accent-cyan);
        }

        .history-item-checkbox.checked::after {
            content: '';
            width: 6px;
            height: 10px;
            border: solid white;
            border-width: 0 2px 2px 0;
            transform: rotate(45deg);
            margin-top: -2px;
        }

        .history-item-wrapper.selected {
            background: rgba(0, 212, 170, 0.1);
            border-radius: 8px;
        }

        /* ===== Modal de confirmación ===== */
        .confirm-modal-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.7);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 10000;
            backdrop-filter: blur(4px);
        }

        .confirm-modal-overlay.visible {
            display: flex;
        }

        .confirm-modal {
            background: var(--bg-secondary);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            padding: 24px;
            max-width: 400px;
            width: 90%;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
        }

        .confirm-modal h3 {
            margin: 0 0 12px;
            font-size: 18px;
            color: var(--text-primary);
        }

        .confirm-modal p {
            margin: 0 0 20px;
            font-size: 14px;
            color: var(--text-secondary);
            line-height: 1.5;
        }

        .confirm-modal-actions {
            display: flex;
            gap: 12px;
            justify-content: flex-end;
        }

        .confirm-modal-btn {
            padding: 10px 20px;
            border: none;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.15s;
        }

        .confirm-modal-btn.cancel {
            background: var(--bg-tertiary);
            color: var(--text-secondary);
        }

        .confirm-modal-btn.cancel:hover {
            background: var(--bg-hover);
            color: var(--text-primary);
        }

        .confirm-modal-btn.danger {
            background: var(--accent-red);
            color: white;
        }

        .confirm-modal-btn.danger:hover {
            background: #dc2626;
        }

        /* ===== Toast notifications ===== */
        .toast-container {
            position: fixed;
            bottom: 100px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 10001;
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .toast {
            padding: 12px 20px;
            background: var(--bg-secondary);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            color: var(--text-primary);
            font-size: 14px;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
            display: flex;
            align-items: center;
            gap: 8px;
            animation: toastIn 0.3s ease;
        }

        .toast.success {
            border-color: var(--accent-cyan);
            background: linear-gradient(135deg, rgba(0, 212, 170, 0.2) 0%, var(--bg-secondary) 100%);
        }

        .toast.error {
            border-color: var(--accent-red);
            background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, var(--bg-secondary) 100%);
        }

        @keyframes toastIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateX(-50%) translateY(0); }
        }

        @keyframes toastOut {
            from { opacity: 1; transform: translateX(-50%) translateY(0); }
            to { opacity: 0; transform: translateY(-20px); }
        }

        /* Legacy - mantener para compatibilidad */
        .history-filter-tabs {
            display: none;
        }

        /* Quick command button */
        .quick-cmd-btn {
            padding: 0.4rem 0.75rem;
            background: var(--bg-secondary);
            border: 1px solid var(--border-color);
            border-radius: 20px;
            color: var(--text-secondary);
            cursor: pointer;
            font-size: 0.75rem;
            transition: all 0.2s;
        }

        .quick-cmd-btn:hover {
            background: var(--accent-purple);
            color: white;
            border-color: var(--accent-purple);
        }

        /* Enhanced code blocks */
        .code-block {
            background: #1a1a2e;
            border-radius: 8px;
            padding: 1rem;
            margin: 0.75rem 0;
            overflow-x: auto;
            position: relative;
        }

        .code-block::before {
            content: attr(data-language);
            position: fixed;
            top: 0.5rem;
            right: 0.75rem;
            font-size: 0.7rem;
            color: var(--text-secondary);
            text-transform: uppercase;
        }

        .code-block code {
            font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
            font-size: 0.85rem;
            line-height: 1.5;
            color: #e2e8f0;
        }

        .inline-code {
            background: var(--bg-card);
            padding: 0.15rem 0.4rem;
            border-radius: 4px;
            font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
            font-size: 0.85em;
            color: var(--accent-cyan);
        }

        /* Markdown tables (legacy - inherit from .message-content table) */
        .md-table {
            width: 100%;
            border-collapse: collapse;
            margin: 0;
            font-size: 0.85rem;
            background: var(--bg-secondary);
            border-radius: 8px;
            overflow: hidden;
        }

        .md-table td {
            padding: 0.625rem 0.875rem;
            border: 1px solid rgba(71, 85, 105, 0.5);
            vertical-align: top;
            word-wrap: break-word;
        }

        .md-table tr:first-child td {
            background: linear-gradient(135deg, #2C5F7F 0%, #1e4a5f 100%);
            color: #ffffff;
            font-weight: 600;
        }

        .md-table tr:nth-child(even):not(:first-child) td {
            background: rgba(45, 55, 72, 0.3);
        }

        .md-table tr:hover:not(:first-child) td {
            background: rgba(0, 212, 170, 0.1);
        }

        /* Mobile responsive tables */
        @media (max-width: 768px) {
            .table-wrapper {
                margin: 0.5rem -0.5rem;
                border-radius: 0;
                width: calc(100% + 1rem);
            }

            .message-content table,
            .md-table {
                font-size: 0.8rem;
            }

            .message-content th,
            .message-content td,
            .md-table td {
                padding: 0.5rem 0.625rem;
            }

            .message-content th {
                font-size: 0.75rem;
            }
        }

        /* Message links */
        .message-text a {
            color: var(--accent-blue);
            text-decoration: none;
        }

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

        /* Server status indicators */
        .server-status.online {
            background: var(--accent-green);
            box-shadow: 0 0 8px var(--accent-green);
        }

        .server-status.offline {
            background: var(--accent-red);
        }

        .server-status.unknown {
            background: var(--accent-yellow);
        }

        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.5; }
        }

        .server-status.online {
            animation: pulse 2s infinite;
        }

        /* =====================================================
           TASK STATUS SYSTEM - Badges & Animations
           ===================================================== */
        
        /* Status badge container in history items */
        .history-item {
            position: relative;
        }
        
        .task-status-badge {
            display: flex;
            align-items: center;
            gap: 4px;
            font-size: 11px;
            margin-left: auto;
            flex-shrink: 1;
        }
        
        .status-indicator {
            width: 16px;
            height: 16px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 1;
        }
        
        .status-indicator svg {
            width: 14px;
            height: 14px;
        }
        
        .status-indicator.processing svg {
            animation: pulse-status 1.5s ease-in-out infinite;
        }
        
        .status-indicator.completed svg {
            color: #00D4AA;
        }
        
        .status-indicator.error svg {
            color: #EF4444;
        }
        
        .status-indicator.idle svg {
            color: #6B7280;
        }
        
        .status-time {
            color: var(--text-secondary);
            font-size: 10px;
        }
        
        @keyframes pulse-status {
            0%, 100% { opacity: 1; transform: scale(1); }
            50% { opacity: 0.5; transform: scale(1.2); }
        }
        
        /* History item header with status */
        .history-item-header {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .history-item-title {
            flex: 1;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        
        /* Task notification toast enhancements */
        .task-toast {
            display: none !important; /* Deshabilitado - no aporta valor */
            position: fixed;
            top: 80px;
            right: 20px;
            padding: 12px 20px;
            border-radius: 8px;
            color: white;
            font-size: 14px;
            z-index: 10000;
            transform: translateX(400px);
            transition: transform 0.3s ease;
            display: flex;
            align-items: center;
            gap: 10px;
            max-width: 350px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.3);
        }
        
        .task-toast.visible {
            transform: translateX(0);
        }
        
        .task-toast.success {
            background: linear-gradient(135deg, #00D4AA, #10B981);
        }
        
        .task-toast.error {
            background: linear-gradient(135deg, #EF4444, #DC2626);
        }
        
        .task-toast-icon {
            width: 20px;
            height: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .task-toast-icon svg {
            width: 18px;
            height: 18px;
        }
        
        .task-toast-text {
            flex: 1;
        }
        
        .task-toast-close {
            background: none;
            border: none;
            color: white;
            opacity: 0.7;
            cursor: pointer;
            font-size: 16px;
            padding: 0;
        }
        
        .task-toast-close:hover {
            opacity: 1;
        }
/* =====================================================
   FEEDBACK BUTTONS - UX IMPROVEMENTS v2.0 COMPLETE
   ===================================================== */

/* Message assistant with space for feedback buttons */
.message.assistant {
    position: relative;
    padding-bottom: 80px; /* Espacio para los botones */
}

/* Message footer container */
.message-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    gap: 12px;
}

/* Feedback buttons container - MEJORAS COMPLETAS */
.feedback-buttons {
    position: absolute;
    bottom: 24px;
    left: 0;
    right: 0;
    display: flex;
    gap: 6px;
    margin-top: 16px; /* Separación del texto */
    padding-top: 16px; /* Padding adicional */
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* Separador visual sutil */
.feedback-buttons::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        to right,
        transparent,
        rgba(255,255,255,0.1) 50%,
        transparent
    );
}

.message.assistant:hover .feedback-buttons,
.message.assistant:focus-within .feedback-buttons {
    opacity: 1;
}

/* Individual feedback button - MEJORAS DE ACCESIBILIDAD */
.feedback-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px; /* WCAG 2.1 touch target */
    min-height: 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    background: rgba(255, 255, 255, 0.05); /* Mejor contraste base */
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-secondary, rgba(255, 255, 255, 0.6));
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.feedback-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.2s ease;
}

.feedback-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    color: var(--text-primary, #fff);
    transform: scale(1.05); /* Feedback visual en hover */
}

.feedback-btn:hover svg {
    transform: scale(1.1);
}

.feedback-btn:active {
    transform: scale(0.98);
}

/* Positive feedback (thumbs up) */
.feedback-btn.feedback-positive:hover,
.feedback-btn.feedback-positive.selected {
    background: rgba(0, 212, 170, 0.15);
    border-color: rgba(0, 212, 170, 0.4);
    color: #00D4AA;
}

.feedback-btn.feedback-positive.selected svg {
    fill: #00D4AA;
}

/* Negative feedback (thumbs down) */
.feedback-btn.feedback-negative:hover,
.feedback-btn.feedback-negative.selected {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

.feedback-btn.feedback-negative.selected svg {
    fill: #ef4444;
}

/* Animation on select */
.feedback-btn.selected {
    transform: scale(1.1);
}

/* Mobile: always visible with improved touch targets */
@media (max-width: 768px) {
    .message.assistant {
        padding-bottom: 100px; /* Más espacio en móvil */
    }

    .feedback-buttons {
        opacity: 1;
        margin-top: 20px; /* Más separación en móvil */
        gap: 12px !important;
        bottom: 20px;
    }

    .feedback-btn {
        min-width: 48px !important; /* Más grande en móvil */
        min-height: 48px !important;
        width: 48px;
        height: 48px;
        padding: 12px !important;
    }

    .feedback-btn svg {
        width: 20px;
        height: 20px;
    }
}

/* Dark theme adjustments */
[data-theme="light"] .feedback-btn {
    border-color: rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.4);
    background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .feedback-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.2);
    color: rgba(0, 0, 0, 0.7);
}

[data-theme="light"] .feedback-buttons::before {
    background: linear-gradient(
        to right,
        transparent,
        rgba(0,0,0,0.1) 50%,
        transparent
    );
}

        /* Ocultar regenerateTitleBtn en móvil - es confuso sin contexto */
        @media (max-width: 600px) {
            #regenerateTitleBtn {
                display: none !important;
            }
        }

/* ============================================
   CLAUDIA BRANCHING SYSTEM STYLES
   ============================================ */

/* Message Actions - botones de editar/regenerar/copiar */
.message-actions {
    display: flex;
    gap: 4px;
    margin-top: 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.message:hover .message-actions {
    opacity: 1;
}

/* En móvil siempre visibles */
@media (max-width: 768px) {
    .message-actions {
        opacity: 1;
    }
}

.msg-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
}

.msg-action:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
}

.msg-action svg {
    width: 14px;
    height: 14px;
}

/* Branch Indicator - navegación entre versiones */
.branch-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    padding: 4px 8px;
    background: rgba(0, 212, 170, 0.1);
    border: 1px solid rgba(0, 212, 170, 0.3);
    border-radius: 12px;
    font-size: 12px;
}

.branch-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: #00d4aa;
    cursor: pointer;
    font-size: 10px;
    transition: all 0.2s ease;
}

.branch-nav:hover:not(:disabled) {
    background: rgba(0, 212, 170, 0.2);
}

.branch-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.branch-count {
    color: #00d4aa;
    font-weight: 500;
    min-width: 30px;
    text-align: center;
}

/* Edit Container - textarea de edición */
.edit-container {
    margin-top: 8px;
}

.edit-textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 1px solid rgba(0, 212, 170, 0.3);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
}

.edit-textarea:focus {
    outline: none;
    border-color: #00d4aa;
    box-shadow: 0 0 0 2px rgba(0, 212, 170, 0.2);
}

.edit-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    justify-content: flex-end;
}

.edit-cancel,
.edit-save {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.edit-cancel {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
}

.edit-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.edit-save {
    background: #00d4aa;
    border: none;
    color: #000;
}

.edit-save:hover {
    background: #00e6b8;
}

/* Regenerating state */
.regenerating {
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

/* Light theme adjustments */
[data-theme="light"] .msg-action {
    border-color: rgba(0, 0, 0, 0.1);
    background: rgba(0, 0, 0, 0.03);
    color: rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .msg-action:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.2);
    color: rgba(0, 0, 0, 0.7);
}

[data-theme="light"] .edit-textarea {
    background: rgba(0, 0, 0, 0.05);
    color: #1a1a2e;
}

[data-theme="light"] .edit-cancel {
    border-color: rgba(0, 0, 0, 0.2);
    color: rgba(0, 0, 0, 0.7);
}

[data-theme="light"] .edit-cancel:hover {
    background: rgba(0, 0, 0, 0.05);
}


        /* ═══════════════════════════════════════════════════════════
   MOBILE EXPAND BUTTON - Botón "+" para acciones multimedia
   ═══════════════════════════════════════════════════════════ */

/* Desktop: OCULTAR completamente el botón expand */
button.mobile-expand-btn,
.input-actions .mobile-expand-btn,
.mobile-expand-btn,
#mobileExpandBtn {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    pointer-events: none !important;
}

/* Desktop: acciones inline */
.expandable-actions {
    display: contents; /* Los botones fluyen normalmente en desktop */
}

/* Mobile: mostrar botón expand, ocultar acciones por defecto */
@media (max-width: 768px) {
    /* Resetear TODAS las propiedades ocultas para móvil */
    button.mobile-expand-btn,
    .input-actions .mobile-expand-btn,
    .mobile-expand-btn,
    #mobileExpandBtn {
        display: flex !important;
        visibility: visible !important;
        width: 44px !important;
        height: 44px !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 1.5px solid rgba(0, 212, 170, 0.5) !important;
        overflow: visible !important;
        position: relative !important;
        left: auto !important;
        pointer-events: auto !important;
        z-index: 10;
        background: transparent;
        border-radius: 8px;
        align-items: center;
        justify-content: center;
    }

            .mobile-expand-btn .icon-plus,
            .mobile-expand-btn .icon-close {
                width: 20px;
                height: 20px;
                transition: transform 0.2s ease;
            }

            .mobile-expand-btn.expanded .icon-plus {
                display: none !important;
            }

            .mobile-expand-btn.expanded .icon-close {
                display: block !important;
            }

            .mobile-expand-btn:not(.expanded) .icon-close {
                display: none !important;
            }

            /* Acciones expandibles - ocultas por defecto */
            .expandable-actions {
                display: none;
                position: absolute;
                bottom: 100%;
                right: 52px;
                background: var(--bg-secondary, #1a1a2e);
                border: 1px solid rgba(0, 212, 170, 0.3);
                border-radius: 12px;
                padding: 8px;
                gap: 8px;
                flex-direction: row;
                box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
                margin-bottom: 8px;
                z-index: 100;
                animation: expandActions 0.2s ease;
            }

            .expandable-actions.expanded {
                display: flex;
            }

            /* Flecha indicadora hacia abajo */
            .expandable-actions::after {
                content: '';
                position: absolute;
                bottom: -8px;
                right: 16px;
                width: 0;
                height: 0;
                border-left: 8px solid transparent;
                border-right: 8px solid transparent;
                border-top: 8px solid var(--bg-secondary, #1a1a2e);
            }

            .expandable-actions::before {
                content: '';
                position: absolute;
                bottom: -10px;
                right: 15px;
                width: 0;
                height: 0;
                border-left: 9px solid transparent;
                border-right: 9px solid transparent;
                border-top: 9px solid rgba(0, 212, 170, 0.3);
            }

            /* Botones dentro del panel expandible */
            .expandable-actions .action-btn {
                width: 40px !important;
                height: 40px !important;
            }

            /* Input wrapper más ancho en mobile */
            .input-wrapper {
                flex: 1;
                min-width: 0;
            }

            /* Input row optimizado */
            .input-row {
                position: relative;
            }

            .input-actions {
                position: relative;
                gap: 6px;
            }
        }

        @keyframes expandActions {
            from {
                opacity: 0;
                transform: translateY(8px);
            }
            to {
                opacity: 1;
                transform: translateX(-50%) translateY(0);
            }
        }

/* ═══════════════════════════════════════════════════════════
   INPUT-ACTIONS OPTIMIZADO PARA DESKTOP
   Fila compacta, altura fija de 44px
   ═══════════════════════════════════════════════════════════ */

/* Desktop: layout horizontal compacto */
@media (min-width: 769px) {
    .input-actions {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        gap: 8px !important;
        height: 44px !important;
        max-height: 44px !important;
    }

    /* Botones de acción compactos */
    .input-actions .action-btn {
        flex-shrink: 0;
    }

    /* Model selector compacto */
    .input-actions .model-selector-wrapper {
        flex-shrink: 0;
    }

    /* Expandable actions como contenedor transparente */
    .input-actions .expandable-actions {
        display: contents !important;
    }

    /* Ocultar file input del flujo visual */
    .input-actions input[type="file"] {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        border: 0;
    }
}
/* =====================================================
   FEEDBACK BUTTONS - UX IMPROVEMENTS v2.0 COMPLETE
   ===================================================== */

/* Message assistant with space for feedback buttons */
.message.assistant {
    position: relative;
    padding-bottom: 80px; /* Espacio para los botones */
}

/* Message footer container */
.message-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    gap: 12px;
}

/* Feedback buttons container - MEJORAS COMPLETAS */
.feedback-buttons {
    position: absolute;
    bottom: 24px;
    left: 0;
    right: 0;
    display: flex;
    gap: 6px;
    margin-top: 16px; /* Separación del texto */
    padding-top: 16px; /* Padding adicional */
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* Separador visual sutil */
.feedback-buttons::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        to right,
        transparent,
        rgba(255,255,255,0.1) 50%,
        transparent
    );
}

.message.assistant:hover .feedback-buttons,
.message.assistant:focus-within .feedback-buttons {
    opacity: 1;
}

/* Individual feedback button - MEJORAS DE ACCESIBILIDAD */
.feedback-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px; /* WCAG 2.1 touch target */
    min-height: 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    background: rgba(255, 255, 255, 0.05); /* Mejor contraste base */
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-secondary, rgba(255, 255, 255, 0.6));
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.feedback-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.2s ease;
}

.feedback-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    color: var(--text-primary, #fff);
    transform: scale(1.05); /* Feedback visual en hover */
}

.feedback-btn:hover svg {
    transform: scale(1.1);
}

.feedback-btn:active {
    transform: scale(0.98);
}
