
        /* ═══════════════════════════════════════
           FOXTANA AI — Design System (Reusable)
           ═══════════════════════════════════════ */
        :root {
            --bg-primary: #07060f;
            --bg-secondary: #0d0c18;
            --bg-card: rgba(255,255,255,0.03);
            --bg-card-hover: rgba(255,255,255,0.06);
            --border: rgba(255,255,255,0.06);
            --border-hover: rgba(255,255,255,0.12);
            --text-primary: #f1f5f9;
            --text-secondary: #94a3b8;
            --text-muted: #64748b;
            --gold: #DAA520;
            --fox: #f97316;
            --sky: #38bdf8;
            --emerald: #10b981;
            --violet: #8b5cf6;
            --rose: #f43f5e;
            --radius: 12px;
            --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        * { box-sizing: border-box; margin: 0; padding: 0; }
        html { scroll-behavior: smooth; }
        body {
            font-family: 'Inter', -apple-system, sans-serif;
            background: var(--bg-primary);
            color: var(--text-primary);
            overflow-x: hidden;
            min-height: 100vh;
            -webkit-font-smoothing: antialiased;
        }

        ::-webkit-scrollbar { width: 6px; }
        ::-webkit-scrollbar-track { background: transparent; }
        ::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

        /* ═══ Background ═══ */
        .bg-grid {
            position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 0;
            background-size: 40px 40px;
            background-image: linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
                              linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
            pointer-events: none;
        }
        .bg-orb {
            position: fixed; border-radius: 50%; filter: blur(140px);
            pointer-events: none; z-index: 0; opacity: 0.8;
        }
        .bg-orb-1 { width: 700px; height: 700px; top: -200px; right: -200px; background: rgba(249,115,22,0.15); animation: float 15s ease-in-out infinite; }
        .bg-orb-2 { width: 600px; height: 600px; bottom: -200px; left: -200px; background: rgba(139,92,246,0.15); animation: float 20s ease-in-out infinite reverse; }
        
        @keyframes float {
            0%, 100% { transform: translateY(0) scale(1); }
            50% { transform: translateY(-30px) scale(1.05); }
        }

        /* ═══ Big Title ═══ */
        .hero-title {
            font-size: clamp(3.5rem, 12vw, 8rem); font-weight: 900;
            letter-spacing: -0.04em; text-align: center;
            background: linear-gradient(135deg, #ffffff 0%, #ffedd5 40%, var(--fox) 80%, var(--rose) 100%);
            -webkit-background-clip: text; -webkit-text-fill-color: transparent;
            transition: font-size 0.4s ease, opacity 0.4s ease;
            line-height: 1; margin-bottom: 0.5rem;
        }
        .hero-title.shrunk {
            font-size: clamp(1.5rem, 3vw, 2rem);
            position: fixed; top: 12px; left: 50%; transform: translateX(-50%);
            z-index: 101; margin: 0;
        }
        .hero-sub {
            text-align: center; font-size: 1rem; color: var(--text-secondary);
            letter-spacing: 0.15em; text-transform: uppercase; font-weight: 600;
            margin-bottom: 2.5rem; transition: opacity 0.3s ease;
        }
        .hero-sub.hidden { opacity: 0; pointer-events: none; }

        /* ═══ Widget ═══ */
        .widget {
            max-width: 640px; width: 90%; margin: 0 auto;
            background: rgba(15,14,26,0.6); border: 1px solid rgba(255,255,255,0.08);
            border-radius: 20px; overflow: hidden;
            backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
            box-shadow: 0 24px 80px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.1);
            transition: transform 0.4s ease, box-shadow 0.4s ease;
        }
        .widget:hover { transform: translateY(-4px); box-shadow: 0 32px 90px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.15); }
        .widget-header {
            padding: 14px 20px; display: flex; align-items: center; gap: 12px;
            border-bottom: 1px solid rgba(255,255,255,0.05); background: rgba(0,0,0,0.2);
        }
        .widget-avatar {
            width: 36px; height: 36px; border-radius: 12px;
            background: linear-gradient(135deg, var(--fox), var(--rose));
            display: flex; align-items: center; justify-content: center;
            font-size: 0.95rem; box-shadow: 0 4px 12px rgba(249,115,22,0.4);
        }
        .widget-info h3 { font-size: 0.95rem; font-weight: 700; letter-spacing: 0.02em; }
        .widget-info .status { font-size: 0.75rem; color: var(--emerald); font-weight: 600; display: flex; align-items: center; gap: 6px; }
        .widget-info .status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 8px var(--emerald); }
        .widget-messages {
            min-height: 280px; max-height: 400px; overflow-y: auto; padding: 20px;
        }
        .widget-messages .w-msg {
            margin-bottom: 16px; animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        }
        .widget-messages .w-msg.bot .w-bubble {
            background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
            border-radius: 14px 14px 14px 4px; padding: 12px 16px;
            font-size: 0.9rem; line-height: 1.5; color: var(--text-primary);
            max-width: 85%; display: inline-block; box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        }
        .widget-messages .w-msg.bot .w-bubble p { margin-bottom: 0.5em; }
        .widget-messages .w-msg.bot .w-bubble p:last-child { margin-bottom: 0; }
        .widget-messages .w-msg.bot .w-bubble code { background: rgba(255,255,255,0.1); padding: 2px 6px; border-radius: 4px; font-size: 0.85rem; }
        .widget-messages .w-msg.bot .w-bubble pre { background: rgba(0,0,0,0.4); border-radius: 8px; padding: 12px; margin: 8px 0; overflow-x: auto; border: 1px solid rgba(255,255,255,0.05); }
        .widget-messages .w-msg.bot .w-bubble pre code { background: none; padding: 0; }
        .widget-messages .w-msg.user { text-align: right; }
        .widget-messages .w-msg.user .w-bubble {
            background: linear-gradient(135deg, rgba(249,115,22,0.15), rgba(244,63,94,0.1)); 
            border: 1px solid rgba(249,115,22,0.25);
            border-radius: 14px 14px 4px 14px; padding: 12px 16px;
            font-size: 0.9rem; color: var(--text-primary);
            display: inline-block; max-width: 85%; text-align: left;
            box-shadow: 0 4px 12px rgba(249,115,22,0.1);
        }
        .w-meta { font-size: 0.65rem; color: var(--text-muted); margin-top: 6px; }
        .widget-input {
            padding: 16px 20px; border-top: 1px solid rgba(255,255,255,0.05);
            display: flex; gap: 10px; align-items: center; background: rgba(0,0,0,0.2);
        }
        .widget-input input {
            flex: 1; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
            border-radius: 12px; padding: 12px 16px;
            color: var(--text-primary); font-size: 0.9rem; font-family: inherit;
            transition: var(--transition);
        }
        .widget-input input:focus { outline: none; border-color: var(--fox); background: rgba(255,255,255,0.08); box-shadow: 0 0 0 2px rgba(249,115,22,0.2); }
        .widget-input input::placeholder { color: var(--text-muted); }
        .widget-input button {
            background: var(--fox); border: none; color: white;
            width: 40px; height: 40px; border-radius: 10px;
            cursor: pointer; font-size: 1rem; transition: var(--transition);
            display: flex; align-items: center; justify-content: center;
        }
        .widget-input button:hover { background: var(--gold); }
        .widget-input button:disabled { opacity: 0.4; cursor: not-allowed; }

        /* ═══ Nav ═══ */
        .nav {
            position: fixed; top: 0; left: 0; right: 0; z-index: 200;
            background: rgba(7,6,15,0.85); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
            border-bottom: 1px solid var(--border);
            padding: 0 1.5rem;
        }
        .nav-inner {
            max-width: 1200px; margin: 0 auto;
            display: flex; align-items: center; justify-content: space-between;
            height: 52px;
        }
        .nav-brand {
            display: flex; align-items: center; gap: 8px;
            text-decoration: none; color: var(--text-primary);
            font-size: 0.9rem;
        }
        .nav-brand span { font-size: 1.1rem; }
        .nav-brand strong {
            background: linear-gradient(135deg, var(--fox), var(--gold));
            -webkit-background-clip: text; -webkit-text-fill-color: transparent;
            font-weight: 800;
        }
        .nav-links {
            display: flex; align-items: center; gap: 20px;
        }
        .nav-links a {
            color: var(--text-secondary); text-decoration: none;
            font-size: 0.78rem; font-weight: 500; transition: var(--transition);
        }
        .nav-links a:hover { color: var(--text-primary); }
        .btn-cta {
            background: linear-gradient(135deg, var(--fox), var(--rose)); color: #fff;
            border: none; padding: 8px 20px; border-radius: 10px;
            font-weight: 700; font-size: 0.8rem; cursor: pointer;
            font-family: inherit; transition: all 0.3s;
            box-shadow: 0 4px 15px rgba(249,115,22,0.3);
        }
        .btn-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(249,115,22,0.5); }

        /* ═══ Landing ═══ */
        #landing { position: relative; z-index: 1; }

        .hero {
            min-height: 100vh; display: flex; flex-direction: column;
            align-items: center; justify-content: center; text-align: center;
            padding: 6rem 1.5rem 3rem;
        }
        .hero-badge {
            display: inline-flex; align-items: center; gap: 6px;
            background: rgba(249,115,22,0.1); border: 1px solid rgba(249,115,22,0.2);
            padding: 6px 16px; border-radius: 20px; font-size: 0.75rem;
            color: var(--fox); font-weight: 600; margin-bottom: 2rem;
        }
        .hero-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--emerald); }
        .hero h1 {
            font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 800;
            line-height: 1.1; letter-spacing: -0.03em; margin-bottom: 1rem;
        }
        .hero h1 .gradient {
            background: linear-gradient(135deg, var(--fox), var(--gold));
            -webkit-background-clip: text; -webkit-text-fill-color: transparent;
        }
        .hero p {
            font-size: 1.1rem; color: var(--text-secondary);
            max-width: 520px; line-height: 1.6; margin-bottom: 2rem;
        }
        .hero-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
        .btn-hero {
            padding: 0.75rem 2rem; border-radius: 12px; font-weight: 700;
            font-size: 0.9rem; cursor: pointer; border: none; font-family: inherit;
            transition: var(--transition); display: flex; align-items: center; gap: 8px;
        }
        .btn-primary {
            background: linear-gradient(135deg, var(--fox), var(--gold));
            color: #1a0e00;
        }
        .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(249,115,22,0.3); }
        .btn-secondary {
            background: var(--bg-card); color: var(--text-primary);
            border: 1px solid var(--border);
        }
        .btn-secondary:hover { border-color: var(--border-hover); background: var(--bg-card-hover); }

        /* ═══ Features ═══ */
        .section { padding: 5rem 1.5rem; max-width: 1200px; margin: 0 auto; position: relative; z-index: 1; }
        .section-label { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.15em; color: var(--rose); text-transform: uppercase; margin-bottom: 0.5rem; }
        .section-title { font-size: 2.2rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 0.75rem; }
        .section-desc { color: var(--text-secondary); font-size: 1rem; max-width: 540px; line-height: 1.6; margin-bottom: 3.5rem; }

        .features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
        .feature-card {
            background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05);
            border-radius: 20px; padding: 2rem;
            transition: var(--transition);
            backdrop-filter: blur(10px);
        }
        .feature-card:hover { 
            border-color: rgba(249,115,22,0.2); background: rgba(255,255,255,0.04); 
            transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.3);
        }
        .feature-icon { font-size: 2rem; margin-bottom: 1rem; }
        .feature-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.5rem; letter-spacing: 0.01em; }
        .feature-card p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; }

        /* ═══ Pricing ═══ */
        .pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
        .price-card {
            background: var(--bg-card); border: 1px solid var(--border);
            border-radius: var(--radius); padding: 1.5rem; position: relative;
            transition: var(--transition);
        }
        .price-card:hover { border-color: var(--border-hover); }
        .price-card.popular { border-color: var(--fox); }
        .price-card.popular::before {
            content: 'POPULAR'; position: absolute; top: -10px; right: 16px;
            background: var(--fox); color: white; font-size: 0.6rem;
            font-weight: 800; padding: 2px 10px; border-radius: 6px;
        }
        .price-tier { font-size: 0.65rem; font-weight: 700; color: var(--text-muted); letter-spacing: 0.05em; text-transform: uppercase; }
        .price-name { font-size: 1.1rem; font-weight: 800; margin: 4px 0; }
        .price-amount { font-size: 2rem; font-weight: 800; margin: 8px 0; }
        .price-amount span { font-size: 0.8rem; font-weight: 500; color: var(--text-muted); }
        .price-desc { font-size: 0.78rem; color: var(--text-secondary); margin-bottom: 1rem; }
        .price-features { list-style: none; margin-bottom: 1.5rem; }
        .price-features li { font-size: 0.78rem; color: var(--text-secondary); padding: 4px 0; display: flex; align-items: center; gap: 6px; }
        .price-features li::before { content: '✓'; color: var(--emerald); font-weight: 700; font-size: 0.7rem; }
        .btn-price {
            width: 100%; padding: 0.6rem; border-radius: 8px; border: 1px solid var(--border);
            background: transparent; color: var(--text-primary); font-size: 0.8rem;
            font-weight: 600; cursor: pointer; font-family: inherit; transition: var(--transition);
        }
        .btn-price:hover { border-color: var(--fox); color: var(--fox); }
        .price-card.popular .btn-price { background: var(--fox); color: white; border-color: var(--fox); }

        /* ═══ Footer ═══ */
        footer {
            text-align: center; padding: 3rem 1.5rem;
            font-size: 0.75rem; color: var(--text-muted);
            border-top: 1px solid var(--border); position: relative; z-index: 1;
        }

        /* ═══ Modals ═══ */
        .modal {
            display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(0,0,0,0.6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
            z-index: 1000; align-items: center; justify-content: center;
        }
        .modal.active { display: flex; animation: fadeInModal 0.3s ease; }
        @keyframes fadeInModal { from { opacity: 0; } to { opacity: 1; } }
        .modal-content {
            background: var(--bg-secondary); border: 1px solid var(--border);
            border-radius: 20px; width: 90%; max-width: 400px;
            padding: 2rem; position: relative;
            box-shadow: 0 20px 60px rgba(0,0,0,0.5);
            animation: slideUpModal 0.3s ease;
        }
        @keyframes slideUpModal { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
        .modal-close {
            position: absolute; top: 16px; right: 16px; background: none; border: none;
            color: var(--text-muted); font-size: 1.5rem; cursor: pointer; transition: var(--transition);
        }
        .modal-close:hover { color: var(--text-primary); transform: scale(1.1); }
        .modal-header h2 { font-size: 1.25rem; font-weight: 800; margin-bottom: 1rem; color: var(--fox); text-align: center; }

        /* ═══ Chat App ═══ */
        #chat-app { display: none; height: 100vh; }
        .chat-layout { display: flex; height: 100%; }

        /* Sidebar */
        .sidebar {
            width: 260px; background: var(--bg-secondary);
            border-right: 1px solid var(--border);
            display: flex; flex-direction: column; flex-shrink: 0;
        }
        .sidebar-header { padding: 1rem; border-bottom: 1px solid var(--border); }
        .btn-new-chat {
            width: 100%; padding: 0.6rem; border-radius: 8px;
            background: var(--bg-card); border: 1px solid var(--border);
            color: var(--text-primary); font-size: 0.8rem; font-weight: 600;
            cursor: pointer; font-family: inherit; transition: var(--transition);
            display: flex; align-items: center; gap: 8px; justify-content: center;
        }
        .btn-new-chat:hover { border-color: var(--fox); }
        .sidebar-chats { flex: 1; overflow-y: auto; padding: 0.5rem; }
        .chat-group-label { font-size: 0.65rem; font-weight: 700; color: var(--text-muted); padding: 8px 8px 4px; text-transform: uppercase; letter-spacing: 0.05em; }
        .chat-item {
            padding: 8px 12px; border-radius: 8px; font-size: 0.8rem;
            color: var(--text-secondary); cursor: pointer; transition: var(--transition);
            overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
        }
        .chat-item:hover { background: var(--bg-card-hover); color: var(--text-primary); }
        .chat-item.active { background: var(--bg-card-hover); color: var(--text-primary); }
        .sidebar-footer {
            padding: 0.75rem 1rem; border-top: 1px solid var(--border);
            display: flex; align-items: center; gap: 10px;
        }
        .user-avatar {
            width: 32px; height: 32px; border-radius: 50%;
            background: linear-gradient(135deg, var(--fox), var(--gold));
            display: flex; align-items: center; justify-content: center;
            font-size: 0.7rem; font-weight: 800; color: #1a0e00; flex-shrink: 0;
        }
        .user-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
        .user-info { flex: 1; min-width: 0; }
        .user-name { font-size: 0.78rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .user-tier { font-size: 0.65rem; color: var(--text-muted); }
        .btn-signout {
            background: none; border: none; color: var(--text-muted);
            cursor: pointer; font-size: 0.75rem; padding: 4px;
        }
        .btn-signout:hover { color: var(--rose); }

        /* Right Sidebar */
        .sidebar-right {
            width: 240px; background: var(--bg-secondary);
            border-left: 1px solid var(--border);
            display: flex; flex-direction: column; flex-shrink: 0;
            padding: 1rem 0;
        }
        @media (max-width: 1024px) {
            .sidebar-right { display: none; }
        }

        /* Chat main */
        .chat-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
        .chat-header {
            padding: 0.75rem 1.5rem; border-bottom: 1px solid var(--border);
            display: flex; align-items: center; justify-content: space-between;
            background: rgba(7,6,15,0.9); backdrop-filter: blur(12px);
        }
        .chat-header-left { display: flex; align-items: center; gap: 12px; }
        .chat-header h2 { font-size: 0.9rem; font-weight: 700; }
        .model-select {
            background: var(--bg-card); border: 1px solid var(--border);
            color: var(--text-secondary); padding: 4px 10px; border-radius: 6px;
            font-size: 0.72rem; font-family: inherit; cursor: pointer;
        }
        .backend-status {
            font-size: 0.7rem; display: flex; align-items: center; gap: 6px;
            color: var(--text-muted);
        }
        .status-dot { width: 6px; height: 6px; border-radius: 50%; }
        .dot-green { background: var(--emerald); }
        .dot-red { background: var(--rose); }

        /* Messages */
        .chat-messages { flex: 1; overflow-y: auto; padding: 1.5rem; }
        .message { max-width: 720px; margin: 0 auto 1.25rem; display: flex; gap: 12px; animation: fadeIn 0.3s ease; }
        @keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
        .msg-avatar {
            width: 32px; height: 32px; border-radius: 10px; flex-shrink: 0;
            display: flex; align-items: center; justify-content: center; font-size: 0.85rem;
        }
        .msg-bot .msg-avatar { background: linear-gradient(135deg, var(--fox), var(--gold)); }
        .msg-user .msg-avatar { background: var(--bg-card); border: 1px solid var(--border); }
        .msg-content { flex: 1; min-width: 0; }
        .msg-name { font-size: 0.75rem; font-weight: 700; margin-bottom: 4px; }
        .msg-text { font-size: 0.88rem; line-height: 1.65; color: var(--text-primary); }
        .msg-text p { margin-bottom: 0.75em; }
        .msg-text p:last-child { margin-bottom: 0; }
        .msg-text code { background: rgba(255,255,255,0.08); padding: 2px 6px; border-radius: 4px; font-size: 0.82rem; }
        .msg-text pre { background: rgba(0,0,0,0.4); border: 1px solid var(--border); border-radius: 8px; padding: 1rem; overflow-x: auto; margin: 0.75em 0; }
        .msg-text pre code { background: none; padding: 0; font-size: 0.8rem; }
        .msg-meta { font-size: 0.65rem; color: var(--text-muted); margin-top: 6px; display: flex; gap: 12px; }

        /* Typing */
        .typing-indicator { display: flex; gap: 4px; padding: 8px 0; }
        .typing-indicator span {
            width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted);
            animation: bounce 1.2s infinite;
        }
        .typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
        .typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
        @keyframes bounce { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-6px); } }

        /* Input */
        .chat-input-area { padding: 1rem 1.5rem; border-top: 1px solid var(--border); background: var(--bg-secondary); }
        .chat-disclaimer {
            max-width: 720px; margin: 8px auto 0; font-size: 0.65rem;
            color: var(--text-muted); text-align: center;
        }

        /* Welcome */
        .welcome {
            max-width: 520px; margin: 0 auto; text-align: center;
            padding-top: 15vh;
        }
        .welcome h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 0.5rem; }
        .welcome h2 .gradient {
            background: linear-gradient(135deg, var(--fox), var(--gold));
            -webkit-background-clip: text; -webkit-text-fill-color: transparent;
        }
        .welcome p { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 2rem; }
        .suggestions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
        .suggestion {
            background: var(--bg-card); border: 1px solid var(--border);
            border-radius: 10px; padding: 0.6rem 1rem; font-size: 0.78rem;
            color: var(--text-secondary); cursor: pointer; transition: var(--transition);
        }
        .suggestion:hover { border-color: var(--fox); color: var(--text-primary); }

        /* Mobile */
        .btn-menu { display: none; background: none; border: none; color: var(--text-primary); font-size: 1.2rem; cursor: pointer; }
        @media (max-width: 768px) {
            .nav-links { display: none; }
            .btn-menu { display: block; }
            .sidebar { position: fixed; left: -260px; z-index: 200; height: 100%; transition: var(--transition); }
            .sidebar.open { left: 0; }
            .hero h1 { font-size: 2.2rem; }
            .features-grid { grid-template-columns: 1fr; }
            .pricing-grid { grid-template-columns: 1fr; }
            .pipeline-grid { grid-template-columns: 1fr !important; }
        }

        /* Sidebar Sections */
        .sidebar-section { padding: 0.5rem 0.75rem; }
        .sidebar-section-title {
            font-size: 0.65rem; font-weight: 700; color: var(--text-muted);
            text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; padding: 0 4px;
        }
        .sidebar-project {
            display: flex; align-items: center; gap: 8px;
            padding: 7px 10px; border-radius: 8px; font-size: 0.78rem;
            color: var(--text-secondary); cursor: pointer; transition: var(--transition);
        }
        .sidebar-project:hover { background: var(--bg-card-hover); color: var(--text-primary); }
        .sidebar-project.active { background: var(--bg-card-hover); color: var(--text-primary); border-left: 2px solid var(--fox); }
        .project-icon { font-size: 0.85rem; }
        .sidebar-agent {
            display: flex; align-items: center; gap: 8px;
            padding: 6px 10px; border-radius: 6px; font-size: 0.75rem;
            color: var(--text-secondary);
        }
        .agent-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
        .agent-badge {
            margin-left: auto; font-size: 0.58rem; text-transform: uppercase;
            border: 1px solid var(--emerald); color: var(--emerald); padding: 1px 6px;
            border-radius: 4px; letter-spacing: 0.04em; font-weight: 600;
        }

        /* Pipeline Cards */
        .pipeline-grid {
            display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
            max-width: 480px; margin: 0 auto;
        }
        .pipeline-card {
            background: var(--bg-card); border: 1px solid var(--border);
            border-radius: 14px; padding: 1.2rem; cursor: pointer;
            transition: all 0.3s ease; text-align: left;
        }
        .pipeline-card:hover {
            border-color: var(--fox); transform: translateY(-3px);
            box-shadow: 0 8px 25px rgba(255,140,50,0.15);
        }
        .pipeline-icon { font-size: 1.6rem; margin-bottom: 8px; }
        .pipeline-title { font-size: 0.85rem; font-weight: 700; margin-bottom: 4px; }
        .pipeline-desc { font-size: 0.7rem; color: var(--text-muted); line-height: 1.3; }

        /* Model selector at bottom */
        .model-pill { flex-shrink: 0; display: flex; align-items: center; }
        .model-pill .model-select {
            background: transparent; border: none;
            color: var(--text-muted); padding: 8px 4px 8px 12px;
            font-size: 0.8rem; font-family: inherit; cursor: pointer;
            transition: var(--transition); appearance: none;
            font-weight: 600;
        }
        .model-pill .model-select:hover { color: var(--text-primary); }
        .model-pill .model-select:focus { outline: none; color: var(--text-primary); }
        .model-pill .model-select optgroup {
            background: var(--bg-secondary); color: var(--text-muted); font-weight: 700;
        }
        .model-pill .model-select option {
            background: var(--bg-secondary); color: var(--text-primary); font-weight: 500; padding: 4px;
        }
        .chat-input-row {
            display: flex; align-items: center; gap: 8px;
            background: rgba(255,255,255,0.03); border: 1px solid var(--border);
            padding: 4px 8px; border-radius: 20px; transition: var(--transition);
        }
        .chat-input-row:focus-within {
            border-color: rgba(255,255,255,0.2); background: rgba(255,255,255,0.05);
            box-shadow: 0 4px 20px rgba(0,0,0,0.2);
        }
        .chat-input {
            flex: 1; background: transparent; border: none; color: var(--text-primary);
            padding: 10px 4px; font-family: inherit; font-size: 0.95rem;
            resize: none; max-height: 120px; overflow-y: auto; line-height: 1.4;
        }
        .chat-input:focus { outline: none; }
        .chat-input::placeholder { color: var(--text-muted); }
        .btn-send {
            background: var(--text-primary); color: var(--bg-primary);
            border: none; width: 34px; height: 34px; border-radius: 50%;
            display: flex; align-items: center; justify-content: center;
            cursor: pointer; transition: var(--transition); flex-shrink: 0;
            margin-right: 4px;
        }
        .btn-send:hover { transform: scale(1.05); background: white; }
        .btn-send:disabled { opacity: 0.3; cursor: not-allowed; transform: none; }

        /* ═══ Smooth Auth Transitions ═══ */
        #landing, #chat-app { transition: opacity 0.5s ease, transform 0.5s ease; }
        #landing.fade-out { opacity: 0; transform: translateY(-20px); pointer-events: none; }
        #chat-app.fade-in { opacity: 1; transform: translateY(0); }
        #chat-app { opacity: 0; transform: translateY(20px); }

        /* Welcome banner on landing after login */
        .auth-welcome-banner {
            position: fixed; top: 0; left: 0; right: 0;
            background: linear-gradient(135deg, rgba(255,140,50,0.15), rgba(255,200,50,0.08));
            backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
            border-bottom: 1px solid rgba(255,140,50,0.2);
            padding: 12px 24px; display: flex; align-items: center; justify-content: space-between;
            z-index: 300; animation: slideDown 0.4s ease;
        }
        @keyframes slideDown { from { transform: translateY(-100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
        .auth-welcome-banner .welcome-left { display: flex; align-items: center; gap: 12px; }
        .auth-welcome-banner .welcome-avatar {
            width: 36px; height: 36px; border-radius: 50%; overflow: hidden;
            border: 2px solid var(--fox); display: flex; align-items: center; justify-content: center;
            background: var(--surface); font-weight: 700; color: var(--fox);
        }
        .auth-welcome-banner .welcome-avatar img { width: 100%; height: 100%; object-fit: cover; }
        .auth-welcome-banner .welcome-text { font-size: 0.9rem; color: var(--text-primary); }
        .auth-welcome-banner .welcome-text strong { color: var(--fox); }
        .auth-welcome-banner .welcome-actions { display: flex; gap: 8px; align-items: center; }
        .btn-go-full {
            background: linear-gradient(135deg, var(--fox), var(--gold)); color: #1a0e00;
            border: none; padding: 8px 20px; border-radius: 8px; font-weight: 700;
            font-size: 0.82rem; cursor: pointer; font-family: inherit;
            transition: all 0.3s; box-shadow: 0 2px 12px rgba(255,140,50,0.3);
        }
        .btn-go-full:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(255,140,50,0.5); }
        .btn-balance {
            background: rgba(255,255,255,0.06); color: var(--fox); border: 1px solid rgba(255,140,50,0.3);
            padding: 6px 14px; border-radius: 8px; font-size: 0.78rem; font-weight: 600;
            cursor: default; font-family: inherit;
        }
        .btn-signout-sm {
            background: none; border: none; color: var(--text-muted); cursor: pointer;
            font-size: 0.8rem; padding: 6px 10px; border-radius: 6px; font-family: inherit;
        }
        .btn-signout-sm:hover { color: var(--text-primary); background: rgba(255,255,255,0.05); }


    