        :root {
            --bg-primary: #ffffff;
            --bg-secondary: #f5f5f7;
            --bg-tertiary: #f0f0f2;
            --bg-hover: #e8e8ed;
            --bg-sidebar: rgba(245, 245, 247, 0.8);
            --border: rgba(0, 0, 0, 0.06);
            --border-strong: rgba(0, 0, 0, 0.1);
            --text-primary: #1d1d1f;
            --text-secondary: #6e6e73;
            --text-muted: #aeaeb2;
            --accent: #6366f1;
            --accent-hover: #4f46e5;
            --accent-light: rgba(99, 102, 241, 0.08);
            --success: #34c759;
            --warning: #f59e0b;
            --error: #ff3b30;
            --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
            --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.06);
            --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.08);
            --radius-sm: 8px;
            --radius-md: 12px;
            --radius-lg: 16px;
            --radius-xl: 20px;
            --duration-fast: 0.12s;
            --duration-normal: 0.2s;
            --duration-slow: 0.3s;
        }

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

        body {
            background: var(--bg-primary);
            color: var(--text-primary);
            font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', system-ui, sans-serif;
            height: 100vh;
            overflow: hidden;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }

        /* ===== SOLO MODE — Landing ===== */
        .solo-layout {
            display: flex; flex-direction: column; height: 100vh;
            background: linear-gradient(180deg, #fbfbfd 0%, #f5f5f7 100%);
        }

        /* Landing state — scrollable */
        .solo-landing {
            flex: 1; overflow-y: auto;
            display: flex; flex-direction: column; align-items: center;
            transition: opacity 0.3s ease, transform 0.3s ease;
        }
        .solo-landing.fade-out {
            opacity: 0; transform: translateY(-12px); pointer-events: none;
        }

        /* Landing nav */
        .landing-nav {
            display: flex; align-items: center; justify-content: space-between;
            padding: 16px 32px; width: 100%; flex-shrink: 0;
        }
        .landing-nav .logo {
            font-size: 22px; font-weight: 700; letter-spacing: -0.5px;
            color: var(--text-primary);
        }
        .landing-nav-links { display: flex; gap: 8px; align-items: center; }
        .landing-nav-link {
            font-size: 14px; font-weight: 500; color: var(--text-secondary);
            text-decoration: none; padding: 8px 16px; border-radius: 8px;
            transition: all 0.15s;
        }
        .landing-nav-link:hover { background: var(--bg-hover); color: var(--text-primary); }
        .landing-nav-link.muted { color: var(--text-secondary); }
        .landing-nav-link.muted:hover { background: var(--bg-hover); color: var(--text-primary); }
        .landing-nav-cta {
            font-size: 14px; font-weight: 600; color: white;
            background: var(--accent); text-decoration: none;
            padding: 8px 20px; border-radius: 8px; transition: all 0.15s;
        }
        .landing-nav-cta:hover { background: var(--accent-hover); }

        /* Hero area — two-column layout */
        .solo-hero {
            flex-shrink: 0;
            padding: 32px 32px 48px;
            width: 100%; max-width: 1120px; margin: 0 auto;
        }
        .solo-hero-content {
            display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
            align-items: center;
        }
        .solo-hero-text { display: flex; flex-direction: column; }
        .solo-landing-card {
            width: 100%; text-align: left;
        }
        .solo-landing-card .greeting {
            color: var(--text-primary); font-size: 36px;
            font-weight: 700; letter-spacing: -0.8px; line-height: 1.2;
            margin-bottom: 20px;
        }

        /* Value prop items */
        .value-props {
            display: flex; flex-direction: column; gap: 10px;
            margin-bottom: 28px;
        }
        .value-prop-item {
            display: flex; align-items: center; gap: 10px;
            font-size: 15px; color: var(--text-secondary); font-weight: 400;
        }
        .value-prop-item svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; }

        /* Hero search section */
        .hero-search-section {
            text-align: left;
        }
        .hero-search-label {
            font-size: 13px; font-weight: 600; color: var(--text-primary);
            margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px;
        }
        .solo-landing-card .chat-input-wrapper {
            text-align: left;
        }
        .browse-cta {
            display: inline-block; background: var(--accent); color: white;
            font-size: 16px; font-weight: 600; padding: 14px 32px;
            border-radius: 12px; text-decoration: none;
            transition: all 0.2s;
        }
        .browse-cta:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }
        .browse-cta-secondary {
            display: inline-block; font-size: 13px; color: var(--text-muted);
            text-decoration: none; margin-top: 12px; transition: color 0.15s;
        }
        .browse-cta-secondary:hover { color: var(--accent); }

        /* Suggestion chips */
        .chips-section { margin-top: 16px; }
        .chips-label {
            font-size: 12px; font-weight: 500; color: var(--text-muted);
            margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.3px;
        }
        .example-chips {
            display: flex; flex-wrap: wrap; gap: 8px;
        }
        .example-chip {
            display: inline-flex; align-items: center; gap: 6px;
            font-size: 13px; font-weight: 500; color: var(--text-secondary);
            background: var(--bg-primary); border: 1px solid var(--border-strong);
            padding: 7px 14px; border-radius: 20px; text-decoration: none;
            transition: all 0.15s; cursor: pointer;
        }
        .example-chip svg { width: 14px; height: 14px; flex-shrink: 0; }
        .example-chip:hover {
            border-color: var(--accent); color: var(--accent);
            background: var(--accent-light); transform: translateY(-1px);
        }

        /* Hero email preview visual */
        .solo-hero-visual {
            display: flex; justify-content: center; align-items: center;
        }
        .hero-email-preview {
            background: white; border-radius: 12px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), 0 1px 4px rgba(0, 0, 0, 0.05);
            overflow: hidden; width: 100%; max-width: 480px;
            animation: floatIn 0.6s ease-out;
        }
        @keyframes floatIn {
            from { opacity: 0; transform: translateY(16px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .email-preview-header {
            display: flex; gap: 6px; padding: 10px 14px;
            background: var(--bg-secondary); border-bottom: 1px solid var(--border);
        }
        .email-preview-dot {
            width: 10px; height: 10px; border-radius: 50%;
            background: var(--border-strong);
        }
        .email-preview-bar {
            padding: 12px 16px; border-bottom: 1px solid var(--border);
            font-size: 13px; line-height: 1.6;
        }
        .email-preview-from, .email-preview-subject { color: var(--text-secondary); }
        .email-preview-from strong, .email-preview-subject strong { color: var(--text-primary); font-weight: 600; }
        .email-muted { color: var(--text-muted); font-size: 12px; }
        .email-preview-body { padding: 16px; }
        .email-preview-greeting {
            font-size: 13px; color: var(--text-secondary); margin-bottom: 12px;
        }
        .email-preview-table { font-size: 12px; }
        .ept-header {
            display: grid; grid-template-columns: 100px 50px 1fr;
            gap: 8px; padding: 6px 0; font-weight: 600; color: var(--text-primary);
            border-bottom: 1px solid var(--border);
        }
        .ept-row {
            display: grid; grid-template-columns: 100px 50px 1fr;
            gap: 8px; padding: 8px 0; color: var(--text-secondary);
            border-bottom: 1px solid var(--border);
        }
        .ept-row:last-child { border-bottom: none; }
        .score-high { color: #16a34a; font-weight: 600; }
        .score-med { color: var(--warning); font-weight: 600; }
        .email-preview-footer {
            font-size: 11px; color: var(--text-muted); margin-top: 12px;
            font-style: italic;
        }

        /* ─── Social proof bar ─── */
        .social-proof-bar {
            width: 100%; border-top: 1px solid var(--border);
            border-bottom: 1px solid var(--border);
            padding: 24px 32px; background: white;
        }
        .social-proof-inner {
            max-width: 800px; margin: 0 auto;
            display: flex; justify-content: center; align-items: center; gap: 40px;
        }
        .proof-stat { text-align: center; }
        .proof-number {
            font-size: 22px; font-weight: 700; color: var(--text-primary);
            letter-spacing: -0.5px;
        }
        .proof-label {
            font-size: 12px; color: var(--text-muted); font-weight: 500;
            margin-top: 2px;
        }
        .proof-divider {
            width: 1px; height: 32px; background: var(--border-strong);
        }

        /* ─── Landing sections (reusable) ─── */
        .landing-section {
            width: 100%; max-width: 1040px; margin: 0 auto;
            padding: 64px 32px;
        }
        .section-headline {
            text-align: center; margin-bottom: 48px;
        }
        .section-headline h2 {
            font-size: 28px; font-weight: 700; letter-spacing: -0.5px;
            color: var(--text-primary); margin-bottom: 10px;
        }
        .section-headline p {
            font-size: 16px; color: var(--text-secondary);
            font-weight: 400; line-height: 1.5; max-width: 520px; margin: 0 auto;
        }

        /* ─── Example output showcase ─── */
        .showcase-container {
            background: white; border-radius: var(--radius-lg);
            border: 1px solid var(--border-strong);
            box-shadow: var(--shadow-lg); overflow: hidden;
        }
        .showcase-tabs {
            display: flex; border-bottom: 1px solid var(--border);
            background: var(--bg-secondary);
        }
        .showcase-tab {
            flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
            padding: 14px 16px; font-size: 14px; font-weight: 500;
            color: var(--text-secondary); background: none; border: none;
            cursor: pointer; transition: all 0.15s;
            border-bottom: 2px solid transparent;
        }
        .showcase-tab:hover { color: var(--text-primary); background: rgba(0,0,0,0.02); }
        .showcase-tab.active {
            color: var(--accent); border-bottom-color: var(--accent);
            background: white;
        }
        .showcase-tab svg { flex-shrink: 0; }
        .showcase-preview { padding: 24px; }
        .showcase-email { font-size: 14px; line-height: 1.6; }
        .showcase-email.hidden { display: none; }
        .se-subject {
            font-size: 16px; font-weight: 700; color: var(--text-primary);
            padding-bottom: 16px; margin-bottom: 16px;
            border-bottom: 1px solid var(--border);
        }
        .se-section { margin-bottom: 20px; }
        .se-title {
            font-size: 13px; font-weight: 600; color: var(--text-primary);
            text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px;
        }
        .se-metrics {
            display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
        }
        .se-metric {
            text-align: center; padding: 16px 12px;
            background: var(--bg-secondary); border-radius: var(--radius-sm);
        }
        .se-metric-value {
            font-size: 24px; font-weight: 700; color: var(--text-primary);
            letter-spacing: -0.5px;
        }
        .se-metric-value.color-success { color: #16a34a; }
        .se-metric-value.color-warning { color: var(--warning); }
        .se-metric-label {
            font-size: 12px; color: var(--text-muted); margin-top: 4px;
        }
        .se-table { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
        .se-table-header {
            display: grid; grid-template-columns: 1fr 60px 1.5fr 1fr;
            gap: 8px; padding: 10px 14px; font-size: 12px; font-weight: 600;
            color: var(--text-primary); background: var(--bg-secondary);
            border-bottom: 1px solid var(--border);
        }
        .se-table-row {
            display: grid; grid-template-columns: 1fr 60px 1.5fr 1fr;
            gap: 8px; padding: 10px 14px; font-size: 13px;
            color: var(--text-secondary); border-bottom: 1px solid var(--border);
        }
        .se-table-row:last-child { border-bottom: none; }
        .color-success { color: #16a34a; font-weight: 600; }
        .color-warning { color: var(--warning); font-weight: 600; }
        .se-bullets { padding-left: 0; }
        .se-bullet {
            padding: 8px 0 8px 20px; font-size: 14px; color: var(--text-secondary);
            position: relative; border-bottom: 1px solid var(--border);
        }
        .se-bullet:last-child { border-bottom: none; }
        .se-bullet::before {
            content: ''; position: absolute; left: 0; top: 14px;
            width: 6px; height: 6px; border-radius: 50%;
            background: var(--accent);
        }
        .se-bullets.numbered { counter-reset: bullets; }
        .se-bullets.numbered .se-bullet { padding-left: 28px; }
        .se-bullets.numbered .se-bullet::before {
            counter-increment: bullets;
            content: counter(bullets); background: var(--accent); color: white;
            width: 18px; height: 18px; border-radius: 50%;
            font-size: 11px; font-weight: 600; text-align: center;
            line-height: 18px; top: 10px;
        }
        .se-footer {
            font-size: 13px; color: var(--text-muted); font-style: italic;
            padding-top: 12px; border-top: 1px solid var(--border);
        }

        /* ─── How it works — 3 steps ─── */
        .steps-row {
            display: flex; align-items: flex-start; justify-content: center; gap: 0;
        }
        .step-card {
            flex: 1; max-width: 280px; text-align: center;
            padding: 24px 20px;
        }
        .step-number {
            display: inline-flex; align-items: center; justify-content: center;
            width: 28px; height: 28px; border-radius: 50%;
            background: var(--accent); color: white;
            font-size: 14px; font-weight: 700; margin-bottom: 16px;
        }
        .step-icon {
            width: 48px; height: 48px; border-radius: 14px;
            display: flex; align-items: center; justify-content: center;
            margin: 0 auto 16px;
        }
        .step-icon svg { width: 24px; height: 24px; }
        .step-icon.blue { background: rgba(99, 102, 241, 0.1); color: var(--accent); }
        .step-icon.purple { background: rgba(175, 82, 222, 0.1); color: #af52de; }
        .step-icon.green { background: rgba(52, 199, 89, 0.1); color: var(--success); }
        .step-card h3 {
            font-size: 16px; font-weight: 600; letter-spacing: -0.2px;
            color: var(--text-primary); margin-bottom: 8px;
        }
        .step-card p {
            font-size: 14px; line-height: 1.55; color: var(--text-secondary);
        }
        .step-connector {
            display: flex; align-items: center; padding-top: 64px;
            color: var(--text-muted); flex-shrink: 0;
        }
        .step-connector svg { width: 20px; height: 20px; }

        /* ─── Benefits grid ─── */
        .benefits-grid {
            display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
        }
        .benefit-card {
            background: white; border: 1px solid var(--border);
            border-radius: var(--radius-lg); padding: 28px 24px;
            transition: box-shadow 0.25s ease, transform 0.25s ease;
        }
        .benefit-card:hover {
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
            transform: translateY(-2px);
        }
        .benefit-icon {
            width: 48px; height: 48px; border-radius: 14px;
            display: flex; align-items: center; justify-content: center;
            margin-bottom: 16px;
        }
        .benefit-icon svg { width: 24px; height: 24px; }
        .benefit-icon.orange { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
        .benefit-icon.teal { background: rgba(90, 200, 250, 0.1); color: #5ac8fa; }
        .benefit-icon.red { background: rgba(255, 59, 48, 0.08); color: var(--error); }
        .benefit-text h3 {
            font-size: 16px; font-weight: 600; letter-spacing: -0.2px;
            color: var(--text-primary); margin-bottom: 6px;
        }
        .benefit-text p {
            font-size: 14px; line-height: 1.55; color: var(--text-secondary);
        }

        /* ─── Catalog preview ─── */
        .catalog-preview {
            display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
        }
        .preview-card {
            display: flex; align-items: center; gap: 16px;
            background: white; border: 1px solid var(--border-strong);
            border-radius: var(--radius-lg); padding: 20px;
            cursor: pointer; transition: all 0.2s;
        }
        .preview-card:hover {
            border-color: var(--accent); box-shadow: var(--shadow-md);
            transform: translateY(-2px);
        }
        .preview-card-icon {
            width: 44px; height: 44px; border-radius: 12px;
            display: flex; align-items: center; justify-content: center;
            flex-shrink: 0; background: rgba(99, 102, 241, 0.1); color: var(--accent);
        }
        .preview-card-icon.purple { background: rgba(175, 82, 222, 0.1); color: #af52de; }
        .preview-card-icon.green { background: rgba(52, 199, 89, 0.1); color: var(--success); }
        .preview-card-icon.amber { background: rgba(245, 158, 11, 0.1); color: #d97706; }
        .preview-card-icon svg { width: 22px; height: 22px; }
        .preview-card-info { flex: 1; min-width: 0; }
        .preview-card-name {
            font-size: 15px; font-weight: 600; color: var(--text-primary);
            margin-bottom: 4px;
        }
        .preview-card-desc {
            font-size: 13px; color: var(--text-secondary); line-height: 1.4;
            display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
            overflow: hidden;
        }
        .preview-card-price {
            font-size: 15px; font-weight: 600; color: var(--text-primary);
            white-space: nowrap; flex-shrink: 0;
        }
        .preview-card-price span { font-size: 12px; font-weight: 400; color: var(--text-muted); }

        /* ─── Pricing summary ─── */
        .pricing-summary {
            max-width: 560px; margin: 0 auto;
        }
        .pricing-summary-card {
            background: var(--bg-primary); border: 1px solid var(--border-strong);
            border-radius: var(--radius-lg); padding: 40px;
            box-shadow: var(--shadow-md); text-align: center;
        }
        .pricing-summary-range {
            display: flex; align-items: center; justify-content: center;
            gap: 32px; margin-bottom: 32px;
        }
        .pricing-range-start, .pricing-range-end { text-align: center; }
        .pricing-range-price {
            font-size: 36px; font-weight: 700; color: var(--text-primary);
            letter-spacing: -1px; line-height: 1;
        }
        .pricing-range-label {
            font-size: 13px; color: var(--text-muted); margin-top: 4px;
        }
        .pricing-range-freq {
            font-size: 13px; font-weight: 600; color: var(--accent);
            margin-top: 4px;
        }
        .pricing-range-arrow {
            color: var(--text-muted);
        }
        .pricing-range-arrow svg { width: 32px; height: 32px; }
        .pricing-summary-details {
            display: flex; flex-direction: column; gap: 12px;
            margin-bottom: 28px; text-align: left;
        }
        .pricing-detail-item {
            display: flex; align-items: center; gap: 10px;
            font-size: 14px; color: var(--text-secondary);
        }
        .pricing-detail-item svg { color: var(--success); flex-shrink: 0; }
        .pricing-browse-cta {
            display: inline-block; background: var(--accent); color: white;
            font-size: 15px; font-weight: 600; padding: 12px 28px;
            border-radius: var(--radius-sm); text-decoration: none;
            transition: all 0.2s;
        }
        .pricing-browse-cta:hover { background: var(--accent-hover); transform: translateY(-1px); }

        /* ─── Final CTA ─── */
        .final-cta-section {
            width: 100%; padding: 64px 32px;
            background: linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(175, 82, 222, 0.06) 100%);
            border-top: 1px solid var(--border);
        }
        .final-cta-inner {
            max-width: 560px; margin: 0 auto; text-align: center;
        }
        .final-cta-inner h2 {
            font-size: 28px; font-weight: 700; letter-spacing: -0.5px;
            color: var(--text-primary); margin-bottom: 12px;
        }
        .final-cta-inner p {
            font-size: 16px; color: var(--text-secondary); line-height: 1.5;
            margin-bottom: 24px;
        }

        /* ─── Footer ─── */
        .landing-footer {
            width: 100%; padding: 32px; border-top: 1px solid var(--border);
            background: var(--bg-secondary);
        }
        .footer-inner {
            max-width: 1040px; margin: 0 auto;
            display: flex; justify-content: space-between; align-items: center;
        }
        .footer-brand { display: flex; align-items: center; gap: 16px; }
        .footer-brand .logo { font-size: 18px; }
        .footer-tagline { font-size: 13px; color: var(--text-muted); }
        .footer-links { display: flex; gap: 20px; }
        .footer-links a {
            font-size: 13px; color: var(--text-secondary);
            text-decoration: none; transition: color 0.15s;
        }
        .footer-links a:hover { color: var(--accent); }

        /* ─── Landing responsive ─── */
        @media (max-width: 768px) {
            .solo-hero { padding: 24px 20px 32px; }
            .solo-hero-content { grid-template-columns: 1fr; gap: 32px; }
            .solo-landing-card { text-align: center; }
            .solo-landing-card .greeting { font-size: 28px; }
            .value-props { align-items: center; }
            .hero-search-section { text-align: center; }
            .hero-search-label { text-align: center; }
            .hero-email-preview { max-width: 400px; margin: 0 auto; }
            .social-proof-inner { flex-wrap: wrap; gap: 20px; }
            .proof-divider { display: none; }
            .landing-section { padding: 48px 20px; }
            .steps-row { flex-direction: column; align-items: center; }
            .step-connector { padding-top: 0; transform: rotate(90deg); }
            .benefits-grid { grid-template-columns: 1fr; }
            .catalog-preview { grid-template-columns: 1fr; }
            .se-table-header, .se-table-row { grid-template-columns: 1fr 50px 1fr; }
            .se-table-header span:last-child, .se-table-row span:last-child { display: none; }
            .se-metrics { grid-template-columns: repeat(3, 1fr); gap: 8px; }
            .se-metric { padding: 12px 8px; }
            .se-metric-value { font-size: 18px; }
            .showcase-tab { font-size: 12px; padding: 10px 8px; }
            .pricing-summary-card { padding: 28px 20px; }
            .pricing-summary-range { gap: 20px; }
            .pricing-range-price { font-size: 28px; }
            .footer-inner { flex-direction: column; gap: 16px; text-align: center; }
            .landing-nav-link { display: none; }
            .ept-header, .ept-row { grid-template-columns: 80px 40px 1fr; }
        }
        @media (max-width: 480px) {
            .solo-landing-card .greeting { font-size: 24px; }
            .showcase-tab svg { display: none; }
        }

        /* Conversation state — full chat */
        .solo-chat-mode {
            display: flex; flex-direction: column; height: 100vh;
        }
        .solo-chat-header {
            padding: 16px 24px; text-align: center; flex-shrink: 0;
            border-bottom: 1px solid var(--border);
            background: var(--bg-primary);
        }
        .solo-chat-header .logo {
            font-size: 20px; font-weight: 600; letter-spacing: -0.5px;
            color: var(--text-primary);
        }
        .solo-chat-header .logo span { color: var(--accent); }

        /* ===== TEAM MODE ===== */
        .team-layout {
            display: grid; grid-template-columns: 260px 1fr 300px; height: 100vh;
            background: var(--bg-primary);
        }

        /* Left Pane — Sidebar */
        .left-pane {
            background: var(--bg-sidebar);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border-right: 1px solid var(--border);
            display: flex; flex-direction: column; overflow: hidden; min-height: 0;
        }
        .left-pane .sidebar-scroll {
            flex: 1; overflow-y: auto; min-height: 0;
        }
        .left-pane .sidebar-scroll::-webkit-scrollbar { width: 4px; }
        .left-pane .sidebar-scroll::-webkit-scrollbar-track { background: transparent; }
        .left-pane .sidebar-scroll::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.08); border-radius: 2px; }
        .left-pane .logo-bar {
            padding: 22px 24px 18px; font-size: 22px; font-weight: 600;
            letter-spacing: -0.5px; color: var(--text-primary);
        }
        .left-pane .logo-bar span { color: var(--accent); }
        .nav-section { padding: 4px 12px; }
        .nav-label {
            font-size: 11px; font-weight: 600; text-transform: uppercase;
            letter-spacing: 0.8px; color: var(--text-muted); padding: 16px 12px 6px;
        }
        .nav-item {
            display: flex; align-items: center; gap: 10px; padding: 8px 12px;
            border-radius: var(--radius-sm); cursor: pointer; color: var(--text-secondary);
            transition: all var(--duration-normal) ease; font-size: 14px; font-weight: 400;
            position: relative;
        }
        .nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
        .nav-item.active {
            background: var(--accent-light); color: var(--accent); font-weight: 500;
        }
        .nav-item.active::before {
            content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px;
            width: 3px; border-radius: 0 2px 2px 0; background: var(--accent);
        }
        .status-dot {
            width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
        }
        .status-dot.online { background: var(--success); }
        .status-dot.offline { background: var(--text-muted); }
        .status-dot.suspended { background: var(--warning); }
        .status-dot.working { background: var(--warning); animation: pulse 1.5s infinite; }
        @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
        .nav-spacer { flex: 1; }
        .nav-item.hire-btn {
            color: var(--text-muted); font-size: 13px; gap: 8px;
            border: 1px dashed var(--border); margin-top: 4px;
            justify-content: center; transition: all 0.2s;
        }
        .nav-item.hire-btn:hover {
            border-color: var(--accent); color: var(--accent); background: transparent;
        }
        .nav-item.hire-btn svg { opacity: 0.6; }
        .nav-item.hire-btn:hover svg { opacity: 1; }

        /* Agent avatar */
        .avatar {
            width: 32px; height: 32px; border-radius: 50%;
            display: flex; align-items: center; justify-content: center;
            font-size: 14px; font-weight: 600; color: #fff; flex-shrink: 0;
            letter-spacing: -0.5px;
        }
        .avatar.sm { width: 24px; height: 24px; font-size: 11px; }
        .avatar.lg { width: 40px; height: 40px; font-size: 17px; }

        /* Main Chat Area */
        .main-area {
            display: flex; flex-direction: column; overflow: hidden; min-height: 0;
            background: var(--bg-primary);
        }
        .main-header {
            padding: 16px 28px; border-bottom: 1px solid var(--border);
            display: flex; align-items: center; gap: 12px; flex-shrink: 0;
            background: var(--bg-primary);
        }
        .main-header-info { display: flex; flex-direction: column; gap: 1px; }
        .main-header h2 {
            font-size: 17px; font-weight: 600; color: var(--text-primary);
            letter-spacing: -0.2px; display: flex; align-items: center; gap: 8px;
        }
        .main-header .header-status {
            width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
        }
        /* Reconnection banner */
        .reconnect-banner {
            display: none; align-items: center; justify-content: center; gap: 8px;
            padding: 8px 16px; background: var(--warning); color: #fff;
            font-size: 13px; font-weight: 500; flex-shrink: 0;
        }
        .reconnect-banner.show { display: flex; }
        .reconnect-dot { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: pulse 1.2s infinite; }

        /* Confirm modal */
        .confirm-overlay {
            display: none; position: fixed; inset: 0; z-index: 1000;
            background: rgba(0,0,0,0.25); justify-content: center; align-items: center;
        }
        .confirm-overlay.show { display: flex; }
        .confirm-box {
            background: var(--bg-primary); border-radius: var(--radius-lg);
            padding: 28px 32px; max-width: 360px; width: 90%;
            box-shadow: var(--shadow-lg); text-align: center;
        }
        .confirm-box h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
        .confirm-box p { font-size: 14px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 20px; }
        .confirm-actions { display: flex; gap: 10px; justify-content: center; }
        .confirm-actions button {
            padding: 8px 20px; border-radius: var(--radius-sm); font-size: 14px;
            font-weight: 500; cursor: pointer; font-family: inherit; border: 1px solid var(--border);
            background: var(--bg-secondary); color: var(--text-primary); transition: all 0.15s;
        }
        .confirm-actions button:hover { background: var(--bg-hover); }
        .confirm-actions button.danger { background: var(--warning); color: #fff; border-color: var(--warning); }
        .confirm-actions button.danger:hover { opacity: 0.85; }

        /* Toast notification */
        .toast {
            position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
            background: var(--text-primary); color: #fff; padding: 10px 20px;
            border-radius: var(--radius-xl); font-size: 13px; font-weight: 500;
            opacity: 0; transition: all 0.3s ease; z-index: 999; pointer-events: none;
        }
        .toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
        .toast.error { background: var(--error); }

        /* Typing fade-out */
        .typing-indicator.fade-out { animation: fadeOut 0.3s ease forwards; }
        @keyframes fadeOut { to { opacity: 0; transform: translateY(-4px); } }

        /* Sidebar paused badge */
        .sidebar-badge {
            font-size: 10px; font-weight: 600; text-transform: uppercase;
            letter-spacing: 0.3px; padding: 1px 6px; border-radius: 4px;
            background: rgba(245, 158, 11, 0.12); color: var(--warning);
        }
        .unread-dot {
            width: 8px; height: 8px; border-radius: 50%;
            background: var(--accent); flex-shrink: 0;
        }

        /* Chat Messages */
        .chat-messages {
            flex: 1; overflow-y: auto; padding: 28px 24px;
            display: flex; flex-direction: column; min-height: 0;
            background: var(--bg-primary);
        }
        .chat-messages::-webkit-scrollbar { width: 6px; }
        .chat-messages::-webkit-scrollbar-track { background: transparent; }
        .chat-messages::-webkit-scrollbar-thumb {
            background: rgba(0, 0, 0, 0.1); border-radius: 3px;
        }
        .chat-messages::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, 0.2); }

        .chat-messages-inner {
            max-width: 720px; width: 100%; margin: 0 auto;
            display: flex; flex-direction: column; gap: 16px;
        }

        .message {
            max-width: 82%; padding: 12px 16px; border-radius: var(--radius-lg);
            line-height: 1.65; font-size: 15px; word-break: break-word;
            letter-spacing: -0.1px;
        }

        /* Assistant messages */
        .message.assistant {
            align-self: flex-start;
            background: var(--bg-secondary);
            color: var(--text-primary);
            border-bottom-left-radius: 4px;
            border-left: 3px solid var(--border-strong);
        }
        .message.assistant p { margin: 0 0 10px 0; }
        .message.assistant p:last-child { margin-bottom: 0; }
        .message.assistant strong { color: var(--text-primary); font-weight: 600; }
        .message.assistant em { font-style: italic; color: var(--text-secondary); }
        .message.assistant code {
            background: rgba(0, 0, 0, 0.05); padding: 2px 6px; border-radius: 5px;
            font-size: 13px; font-family: 'SF Mono', 'Menlo', 'Monaco', 'Consolas', monospace;
            color: var(--error);
        }
        .message.assistant ul, .message.assistant ol {
            margin: 6px 0 10px 0; padding-left: 22px;
        }
        .message.assistant li { margin: 3px 0; }
        .message.assistant h3, .message.assistant h4 {
            font-size: 15px; font-weight: 600; margin: 12px 0 6px 0;
            color: var(--text-primary); letter-spacing: -0.1px;
        }
        .message.assistant .md-h1 {
            font-size: 16px; font-weight: 700; margin: 16px 0 8px 0;
        }
        .message.assistant .md-h2 {
            font-size: 15px; font-weight: 650; margin: 14px 0 6px 0;
        }

        /* Rating bar */
        .rating-bar {
            display: flex; align-items: center; gap: 4px;
            margin-top: 8px; padding-top: 6px;
            border-top: 1px solid var(--border-light);
            opacity: 0; transition: opacity 0.15s;
        }
        .message.assistant:hover .rating-bar { opacity: 1; }
        .rating-bar:has(.selected) { opacity: 1; }
        .rate-btn {
            background: none; border: none; cursor: pointer;
            padding: 4px; border-radius: 4px; color: var(--text-muted);
            transition: color 0.15s, background 0.15s;
            display: flex; align-items: center;
        }
        .rate-btn:hover { color: var(--text-secondary); background: var(--bg-secondary); }
        .rate-btn.selected.rate-up { color: #16a34a; }
        .rate-btn.selected.rate-down { color: #dc2626; }
        .feedback-input {
            font-size: 12px; padding: 4px 8px; border: 1px solid var(--border);
            border-radius: 6px; font-family: var(--font-family); outline: none;
            flex: 1; max-width: 200px; color: var(--text-primary);
            background: var(--bg-primary);
        }
        .feedback-input:focus { border-color: var(--accent); }

        /* User messages */
        .message.user {
            align-self: flex-end;
            background: var(--accent);
            color: white;
            border-bottom-right-radius: 4px;
            white-space: pre-wrap;
            font-weight: 400;
        }

        /* System messages */
        .message.system {
            align-self: center; background: transparent;
            color: var(--text-muted); font-size: 12px;
            padding: 6px 14px; max-width: 100%;
        }
        .scheduled-label {
            font-size: 11px; font-weight: 600; text-transform: uppercase;
            letter-spacing: 0.04em; color: var(--text-muted);
            margin-bottom: 6px;
        }

        /* Option buttons */
        .option-group {
            max-width: 720px; width: 100%; align-self: flex-start; margin-top: 10px;
        }
        .option-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
        .option-btn {
            background: var(--bg-primary); border: 1.5px solid var(--border-strong);
            color: var(--text-primary); padding: 9px 18px; border-radius: var(--radius-xl);
            font-size: 13px; cursor: pointer; transition: all 0.2s ease;
            font-family: inherit; font-weight: 400; text-align: left;
        }
        .option-btn:hover {
            border-color: var(--accent); color: var(--accent);
            background: var(--accent-light);
        }
        .option-btn.sent {
            border-color: var(--accent); background: var(--accent-light);
            color: var(--accent); font-weight: 500;
        }
        .option-btn:disabled { cursor: default; opacity: 0.7; }
        .option-btn:disabled:hover { background: var(--bg-primary); border-color: var(--border-strong); color: var(--text-primary); }
        .option-btn:disabled.sent:hover {
            background: var(--accent-light); border-color: var(--accent); color: var(--accent);
        }
        .option-hint {
            margin-top: 8px; font-size: 12px; color: var(--text-muted);
        }

        /* Typing indicator — iMessage style bubble (agent composing reply) */
        .typing-indicator {
            align-self: flex-start;
            background: var(--bg-secondary);
            border-radius: 18px;
            padding: 12px 18px;
            display: flex; align-items: center; gap: 5px;
            margin: 6px 0;
        }
        .typing-indicator .dot {
            width: 8px; height: 8px;
            background: var(--text-muted);
            border-radius: 50%;
            animation: typingBounce 0.8s infinite ease-in-out;
        }
        .typing-indicator .dot:nth-child(2) { animation-delay: 0.1s; }
        .typing-indicator .dot:nth-child(3) { animation-delay: 0.2s; }
        @keyframes typingBounce {
            0%, 60%, 100% { transform: translateY(0); opacity: 0.35; }
            30% { transform: translateY(-5px); opacity: 1; }
        }

        /* Working indicator — spinner + status text (agent using tools) */
        .working-indicator {
            align-self: flex-start; display: flex; align-items: center; gap: 8px;
            color: var(--text-muted); font-size: 13px; padding: 10px 14px;
            margin: 6px 0;
        }
        .working-indicator .wi-spinner {
            width: 14px; height: 14px; border: 2px solid var(--border-strong);
            border-top-color: var(--accent); border-radius: 50%;
            animation: spin 0.8s linear infinite; flex-shrink: 0;
        }

        /* Chat Input */
        .chat-input-area {
            padding: 12px 24px 20px; border-top: 1px solid var(--border);
            flex-shrink: 0; background: var(--bg-primary);
        }
        .chat-input-container { max-width: 720px; margin: 0 auto; }
        .chat-input-wrapper {
            display: flex; gap: 0;
            background: var(--bg-primary);
            border: 1.5px solid var(--border-strong);
            border-radius: 22px;
            padding: 4px 5px 4px 4px; align-items: center;
            box-shadow: var(--shadow-sm);
            transition: border-color 0.2s ease, box-shadow 0.2s ease;
        }
        .chat-input-wrapper:focus-within {
            border-color: var(--accent);
            box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08);
        }
        .chat-input {
            flex: 1; background: transparent; border: none;
            color: var(--text-primary); padding: 10px 18px;
            font-size: 15px; font-family: inherit;
            resize: none; outline: none !important; max-height: 120px;
            line-height: 1.5;
        }
        .chat-input::placeholder { color: var(--text-secondary); }
        .send-btn {
            background: var(--accent); color: white; border: none;
            width: 36px; height: 36px; border-radius: 50%;
            cursor: pointer; display: flex; align-items: center; justify-content: center;
            transition: all 0.2s ease; flex-shrink: 0;
            padding: 0;
        }
        .send-btn svg { width: 18px; height: 18px; }
        .send-btn:hover { background: var(--accent-hover); transform: scale(1.05); }
        .send-btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }
        /* Tool status bar (single updating line) */
        .tool-status-bar {
            align-self: flex-start; display: flex; align-items: center; gap: 8px;
            color: var(--text-muted); font-size: 12px; padding: 6px 12px;
            background: var(--bg-secondary); border-radius: var(--radius-sm);
            transition: opacity 0.3s ease;
        }
        .tool-status-bar .spinner {
            width: 12px; height: 12px; border: 2px solid var(--border-strong);
            border-top-color: var(--accent); border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }
        @keyframes spin { to { transform: rotate(360deg); } }

        /* Right Pane */
        .right-pane {
            background: var(--bg-secondary); border-left: 1px solid var(--border);
            overflow-y: auto; padding: 0;
        }
        .right-pane::-webkit-scrollbar { width: 6px; }
        .right-pane::-webkit-scrollbar-track { background: transparent; }
        .right-pane::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.08); border-radius: 3px; }

        /* Right pane tabs */
        .rp-tabs {
            display: flex; border-bottom: 1px solid var(--border);
            background: var(--bg-primary); position: sticky; top: 0; z-index: 2;
        }
        .rp-tab {
            flex: 1; padding: 12px 8px; text-align: center; font-size: 11px;
            font-weight: 500; color: var(--text-muted); cursor: pointer;
            border-bottom: 2px solid transparent; transition: all 0.2s;
            text-transform: uppercase; letter-spacing: 0.5px;
        }
        .rp-tab:hover { color: var(--text-secondary); }
        .rp-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
        .rp-panel { display: none; padding: 20px; }
        .rp-panel.active { display: block; }

        .context-section { margin-bottom: 24px; }
        .context-section h3 {
            font-size: 11px; font-weight: 600; text-transform: uppercase;
            letter-spacing: 0.8px; color: var(--text-muted); margin-bottom: 10px;
        }
        .context-item {
            display: flex; justify-content: space-between;
            padding: 6px 0; font-size: 13px;
        }
        .context-item .label { color: var(--text-secondary); }
        .context-item .value { color: var(--text-primary); font-weight: 500; }
        .tag {
            display: inline-block; background: var(--bg-primary);
            padding: 4px 12px; border-radius: var(--radius-xl);
            font-size: 12px; margin: 3px 4px 3px 0; color: var(--text-secondary);
            border: 1px solid var(--border);
        }

        /* Skills section */
        .skills-list { display: flex; flex-wrap: wrap; gap: 4px; }
        .skill-tag {
            display: inline-block; background: var(--bg-primary);
            padding: 4px 10px; border-radius: var(--radius-xl);
            font-size: 12px; color: var(--text-secondary);
            border: 1px solid var(--border);
            cursor: default;
        }
        .skill-tag:hover { background: var(--bg-hover); color: var(--text-primary); }

        /* Job description — collapsible */
        .job-desc-header {
            display: flex; justify-content: space-between; align-items: center;
            cursor: pointer; user-select: none;
        }
        .job-desc-header h3 { margin-bottom: 0; }
        .job-desc-toggle {
            font-size: 12px; color: var(--text-muted); transition: transform 0.2s;
        }
        .job-desc-toggle.open { transform: rotate(90deg); }
        .job-desc-body {
            overflow: hidden; max-height: 0;
            transition: max-height 0.3s ease, padding 0.3s ease;
            padding-top: 0;
        }
        .job-desc-body.open {
            max-height: 50vh; padding-top: 10px;
            overflow-y: auto;
        }
        .job-desc-body::-webkit-scrollbar { width: 4px; }
        .job-desc-body::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
        .job-desc-body::-webkit-scrollbar-track { background: transparent; }
        .job-desc {
            font-size: 13px; line-height: 1.65; color: var(--text-secondary);
        }
        .job-desc p { margin: 0 0 10px; }
        .job-desc h3, .job-desc h4 { font-size: 13px; font-weight: 600; margin: 14px 0 6px 0; color: var(--text-primary); }
        .job-desc .md-h1 { font-size: 15px; font-weight: 700; margin: 16px 0 8px 0; }
        .job-desc .md-h2 { font-size: 14px; font-weight: 650; margin: 14px 0 6px 0; }
        .job-desc ul, .job-desc ol { margin: 4px 0 10px 0; padding-left: 20px; }
        .job-desc li { margin: 2px 0; }
        .job-desc strong { color: var(--text-primary); }
        .edit-desc-btn {
            display: inline-flex; align-items: center; gap: 5px;
            margin-top: 10px; padding: 6px 14px;
            background: var(--bg-primary); border: 1px solid var(--border-strong);
            border-radius: var(--radius-xl); font-size: 12px; font-weight: 500;
            color: var(--text-secondary); cursor: pointer;
            transition: all 0.2s; font-family: inherit;
        }
        .edit-desc-btn:hover {
            border-color: var(--accent); color: var(--accent);
            background: var(--accent-light);
        }

        /* Schedule card */
        .sched-card {
            background: var(--bg-primary); border-radius: var(--radius-md);
            padding: 14px 16px; margin-bottom: 10px;
            border: 1px solid var(--border); transition: box-shadow 0.2s;
        }
        .sched-card:hover { box-shadow: var(--shadow-sm); }
        .sched-time {
            display: flex; align-items: center; gap: 6px;
            font-size: 12px; font-weight: 600; color: var(--accent);
            margin-bottom: 6px;
        }
        .sched-time svg { flex-shrink: 0; }
        .sched-task {
            font-size: 13px; color: var(--text-secondary); line-height: 1.5;
            display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
            overflow: hidden;
        }
        .sched-card.expanded .sched-task {
            -webkit-line-clamp: unset; overflow: visible;
        }

        /* Live activity — single status line */
        @keyframes spin { to { transform: rotate(360deg); } }
        .activity-status {
            display: flex; align-items: center; gap: 10px; padding: 10px 0;
            font-size: 13px; animation: fadeIn 0.2s ease;
        }
        @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
        .activity-status .mini-spinner {
            width: 14px; height: 14px; border: 2px solid var(--border-strong);
            border-top-color: var(--accent); border-radius: 50%; flex-shrink: 0;
            animation: spin 0.8s linear infinite;
        }
        .activity-status-text {
            color: var(--text-primary); font-weight: 500; line-height: 1.4;
        }
        .activity-done-status {
            display: flex; align-items: center; gap: 8px; padding: 10px 0;
            font-size: 13px; color: var(--success); font-weight: 500;
            animation: fadeIn 0.2s ease;
        }
        .activity-done-status svg { flex-shrink: 0; }
        .activity-empty {
            color: var(--text-muted); font-size: 13px; padding: 12px 0;
            display: flex; flex-direction: column; align-items: center; gap: 6px;
            text-align: center;
        }
        .activity-empty svg { opacity: 0.3; }
        /* Recent tasks */
        .activity-item {
            display: flex; gap: 12px; padding: 10px 0;
            border-bottom: 1px solid var(--border); font-size: 13px;
        }
        .activity-item:last-child { border-bottom: none; }
        .activity-dot {
            width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex-shrink: 0;
        }
        .activity-dot.done { background: var(--success); }
        .activity-dot.fail { background: var(--error); }
        .activity-dot.pending { background: var(--text-muted); opacity: 0.4; }
        .activity-body { flex: 1; min-width: 0; }
        .activity-label { color: var(--text-primary); font-weight: 500; }
        .activity-meta { color: var(--text-muted); font-size: 11px; margin-top: 2px; }

        /* File tree — sleeker */
        .file-item {
            display: flex; align-items: center; gap: 10px; padding: 8px 12px;
            border-radius: var(--radius-sm); cursor: pointer; font-size: 13px;
            color: var(--text-secondary); transition: all 0.15s;
        }
        .file-item:hover { background: var(--bg-hover); color: var(--text-primary); }
        .file-icon {
            width: 28px; height: 28px; border-radius: 6px; display: flex;
            align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0;
        }
        .file-icon.dir { background: rgba(99, 102, 241, 0.08); color: var(--accent); }
        .file-icon.file { background: var(--bg-tertiary); color: var(--text-muted); }
        .file-icon.mem { background: rgba(175, 82, 222, 0.1); color: #af52de; }
        .file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .file-meta { font-size: 11px; color: var(--text-muted); flex-shrink: 0; }
        .file-empty {
            color: var(--text-muted); font-size: 13px; padding: 20px 0; text-align: center;
            display: flex; flex-direction: column; align-items: center; gap: 6px;
        }
        .file-empty svg { opacity: 0.3; }

        /* File viewer overlay */
        .file-viewer-overlay {
            position: fixed; inset: 0; background: rgba(0,0,0,0.35);
            backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
            display: flex; align-items: center; justify-content: center; z-index: 100;
        }
        .file-viewer {
            background: var(--bg-primary); border-radius: var(--radius-lg);
            box-shadow: 0 20px 60px rgba(0,0,0,0.15); width: 680px; max-height: 80vh;
            display: flex; flex-direction: column; overflow: hidden;
        }
        .file-viewer-header {
            display: flex; align-items: center; gap: 8px;
            padding: 16px 20px; border-bottom: 1px solid var(--border);
            font-size: 14px; font-weight: 600;
        }
        .file-viewer-header span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .file-viewer-action {
            background: none; border: none; cursor: pointer;
            color: var(--text-muted); padding: 4px 8px; border-radius: 6px;
            display: flex; align-items: center; justify-content: center; flex-shrink: 0;
        }
        .file-viewer-action:hover { background: var(--bg-hover); color: var(--text-primary); }
        .file-viewer-close {
            background: none; border: none; font-size: 18px; cursor: pointer;
            color: var(--text-muted); padding: 4px 8px; border-radius: 6px; flex-shrink: 0;
        }
        .file-viewer-close:hover { background: var(--bg-hover); color: var(--text-primary); }
        .file-viewer-content {
            padding: 20px; overflow-y: auto; font-size: 13px;
            font-family: 'SF Mono', 'Menlo', monospace; white-space: pre-wrap;
            line-height: 1.6; color: var(--text-primary); background: var(--bg-secondary);
        }

        /* Run history */
        .run-item {
            display: flex; justify-content: space-between; align-items: center;
            padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 12px;
        }
        .run-item:last-child { border-bottom: none; }
        .run-time { color: var(--text-muted); }
        .run-badge {
            padding: 2px 8px; border-radius: var(--radius-xl);
            font-size: 11px; font-weight: 600; text-transform: uppercase;
            background: rgba(52, 199, 89, 0.1); color: #248a3d;
        }

        /* Overview */
        .overview { padding: 32px; overflow-y: auto; flex: 1; }
        .stats-grid {
            display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
            gap: 16px; margin-bottom: 36px;
        }
        .stat-card {
            background: var(--bg-primary); border: 1px solid var(--border);
            border-radius: var(--radius-md); padding: 24px;
            box-shadow: var(--shadow-sm); border-left: 3px solid var(--border-strong);
        }
        .stat-card.stat-agents { border-left-color: var(--accent); }
        .stat-card.stat-deliveries { border-left-color: var(--warning); }
        .stat-card.stat-tasks { border-left-color: var(--success); }
        .stat-card .label {
            font-size: 12px; color: var(--text-muted); text-transform: uppercase;
            letter-spacing: 0.5px; font-weight: 500;
        }
        .stat-card .value {
            font-size: 32px; font-weight: 600; margin-top: 8px;
            letter-spacing: -1px; color: var(--text-primary);
        }
        .agent-grid {
            display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 16px;
        }
        .agent-card {
            background: var(--bg-primary); border: 1px solid var(--border);
            border-radius: var(--radius-md); padding: 22px; cursor: pointer;
            transition: all 0.25s ease; box-shadow: var(--shadow-sm);
        }
        .agent-card:hover {
            border-color: var(--accent); box-shadow: var(--shadow-md);
            transform: translateY(-2px);
        }
        .agent-card h4 {
            margin-bottom: 8px; display: flex; align-items: center; gap: 8px;
            font-weight: 600; font-size: 15px; letter-spacing: -0.1px;
        }
        .agent-card p {
            color: var(--text-secondary); font-size: 13px; line-height: 1.5;
        }
        .agent-card .meta {
            margin-top: 14px; display: flex; gap: 16px; font-size: 12px;
            color: var(--text-muted); font-weight: 500;
        }

        /* Training Materials upload */
        .training-section { margin-top: 4px; }
        .upload-zone {
            border: 2px dashed var(--border-strong);
            border-radius: var(--radius-md);
            padding: 24px 16px;
            text-align: center;
            cursor: pointer;
            transition: all 0.2s ease;
            background: var(--bg-primary);
            margin-bottom: 12px;
        }
        .upload-zone:hover, .upload-zone.dragover {
            border-color: var(--accent);
            background: var(--accent-light);
        }
        .upload-zone svg { color: var(--text-muted); margin-bottom: 8px; }
        .upload-zone .upload-label {
            font-size: 13px; color: var(--text-secondary); font-weight: 500;
        }
        .upload-zone .upload-hint {
            font-size: 11px; color: var(--text-muted); margin-top: 4px;
        }
        .upload-zone input[type="file"] { display: none; }
        .ref-file-item {
            display: flex; align-items: center; gap: 10px; padding: 8px 10px;
            border-radius: var(--radius-sm); font-size: 13px;
            border: 1px solid var(--border); margin-bottom: 6px;
            background: var(--bg-primary);
        }
        .ref-file-item .ref-file-name {
            flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis;
            white-space: nowrap; color: var(--text-primary); font-weight: 400;
        }
        .ref-file-item .ref-file-size {
            font-size: 11px; color: var(--text-muted); flex-shrink: 0;
        }
        .ref-file-item .ref-file-delete {
            background: none; border: none; color: var(--text-muted);
            cursor: pointer; padding: 2px 6px; border-radius: 4px;
            font-size: 14px; line-height: 1; flex-shrink: 0;
        }
        .ref-file-item .ref-file-delete:hover { color: var(--error); background: rgba(255,59,48,0.06); }
        .ref-file-count {
            font-size: 11px; color: var(--text-muted); text-align: right; margin-top: 4px;
        }

        /* Email address display */
        .email-display {
            display: flex; align-items: center; gap: 8px;
            background: var(--bg-primary); border: 1px solid var(--border);
            border-radius: var(--radius-sm); padding: 8px 12px;
            cursor: pointer; transition: all 0.2s;
        }
        .email-display:hover { border-color: var(--accent); }
        .email-display .email-text {
            flex: 1; font-size: 13px; color: var(--accent); font-weight: 500;
            font-family: 'SF Mono', 'Menlo', monospace;
        }
        .email-display .copy-icon { color: var(--text-muted); flex-shrink: 0; }
        .email-display .copy-icon:hover { color: var(--accent); }
        .copied-toast {
            font-size: 11px; color: var(--success); font-weight: 500;
            margin-top: 4px; opacity: 0; transition: opacity 0.2s;
        }
        .copied-toast.show { opacity: 1; }

        /* Tier badges */
        .tier-badge {
            font-size: 11px; font-weight: 600; letter-spacing: 0.3px;
            padding: 2px 8px; border-radius: 6px; text-transform: uppercase;
        }
        .tier-badge.tier-focused { background: var(--accent-light); color: var(--accent); }
        .tier-badge.tier-active { background: rgba(16, 185, 129, 0.1); color: #10b981; }
        .tier-badge.tier-always_on { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }

        /* Improvement timeline */
        .improvement-item { padding: 8px 0; border-bottom: 1px solid var(--border); }
        .improvement-item:last-child { border-bottom: none; }
        .improvement-text { font-size: 13px; color: var(--text-primary); line-height: 1.4; }
        .improvement-date { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

        /* Idea prompt */
        .idea-prompt {
            text-align: center;
            margin-top: 18px;
        }
        .idea-btn {
            background: none; border: none;
            color: var(--accent); font-size: 14px; font-weight: 500;
            cursor: pointer; font-family: inherit;
            padding: 6px 2px;
            transition: color 0.2s;
        }
        .idea-btn:hover { color: var(--accent-hover); }

        /* Example chips — chat context (option pills in conversation) */
        .solo-chat-mode .example-chips,
        .team-layout .example-chips {
            display: flex; flex-wrap: wrap; gap: 10px;
            justify-content: center;
            margin-top: 20px;
        }
        .solo-chat-mode .example-chip,
        .team-layout .example-chip {
            background: var(--accent-light);
            border: 1.5px solid var(--accent);
            border-radius: var(--radius-xl);
            padding: 9px 18px;
            font-size: 14px; color: var(--accent);
            font-weight: 500;
            cursor: pointer; transition: all 0.2s;
            font-family: inherit; text-decoration: none;
        }
        .solo-chat-mode .example-chip:hover,
        .team-layout .example-chip:hover {
            background: var(--accent); color: #fff;
        }

        /* Onboarding prompt */
        .onboarding-prompt {
            align-self: center; max-width: 480px; width: 100%;
            background: var(--accent-light); border: 1px solid rgba(99,102,241,0.15);
            border-radius: var(--radius-md); padding: 16px 20px;
            text-align: center; margin: 8px 0;
        }
        .onboarding-prompt p {
            font-size: 13px; color: var(--text-primary); margin-bottom: 10px;
            line-height: 1.5;
        }
        .onboarding-prompt .onboard-btn {
            background: var(--accent); color: white; border: none;
            padding: 8px 20px; border-radius: var(--radius-xl);
            font-size: 13px; font-weight: 500; cursor: pointer;
            font-family: inherit; transition: all 0.2s;
        }
        .onboarding-prompt .onboard-btn:hover { background: var(--accent-hover); }
        .onboarding-prompt .onboard-dismiss {
            background: none; border: none; color: var(--text-muted);
            font-size: 12px; cursor: pointer; margin-left: 12px;
            font-family: inherit;
        }

        /* Chat file upload */
        .chat-upload-btn {
            background: none; border: none; color: var(--text-muted);
            cursor: pointer; padding: 6px; border-radius: 6px;
            display: flex; align-items: center; justify-content: center;
            transition: color 0.2s; flex-shrink: 0;
            width: 34px; height: 34px;
        }
        .chat-upload-btn:hover { color: var(--accent); }
        .chat-file-pill {
            display: inline-flex; align-items: center; gap: 8px;
            background: var(--accent-light); border: 1px solid rgba(99,102,241,0.15);
            border-radius: 10px; padding: 8px 14px; margin: 4px 0;
            font-size: 12px; color: var(--accent); font-weight: 500;
            align-self: flex-end; max-width: 300px;
            transition: all 0.3s ease;
        }
        .chat-file-pill svg { flex-shrink: 0; }
        .chat-file-pill .file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .chat-file-pill .file-size { font-size: 11px; color: var(--text-muted); font-weight: 400; white-space: nowrap; }
        .chat-file-pill .pill-status { display: flex; align-items: center; flex-shrink: 0; }
        .chat-file-pill .pill-spinner {
            width: 12px; height: 12px; border: 2px solid rgba(99,102,241,0.2);
            border-top-color: var(--accent); border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }
        .chat-file-pill.uploading { opacity: 0.7; }
        .chat-file-pill.uploaded { border-color: rgba(34,197,94,0.3); background: rgba(34,197,94,0.06); }
        .chat-file-pill.uploaded .pill-status svg { color: #22c55e; }
        .chat-file-pill.failed { border-color: rgba(239,68,68,0.3); background: rgba(239,68,68,0.04); color: var(--error); opacity: 0.8; }
        .chat-file-pill.failed .file-name { text-decoration: line-through; }
        .chat-file-pill.failed .pill-status svg { color: var(--error); }
        .chat-file-group { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; margin: 6px 0; }
        .chat-drop-overlay {
            position: absolute; inset: 0;
            background: rgba(99,102,241,0.06);
            border: 2px dashed var(--accent);
            border-radius: var(--radius-md);
            display: flex; align-items: center; justify-content: center;
            font-size: 15px; color: var(--accent); font-weight: 500;
            z-index: 100; pointer-events: none;
        }

        /* View transitions */
        .fade-in { animation: viewFadeIn 0.3s ease forwards; }
        @keyframes viewFadeIn {
            from { opacity: 0; transform: translateY(8px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* Connecting indicator */
        .ws-connecting {
            display: flex; align-items: center; justify-content: center; gap: 8px;
            padding: 6px 0; font-size: 12px; color: var(--text-muted); font-weight: 500;
            margin-top: 8px;
        }
        .ws-connecting .mini-spinner {
            width: 12px; height: 12px; border: 2px solid var(--border-strong);
            border-top-color: var(--accent); border-radius: 50%;
            animation: spin 0.8s linear infinite; flex-shrink: 0;
        }
        .send-btn.connecting { background: var(--text-muted); pointer-events: none; }
        .send-btn.connecting svg { display: none; }
        .send-btn.connecting::after {
            content: ''; width: 14px; height: 14px;
            border: 2px solid rgba(255,255,255,0.3);
            border-top-color: white; border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }

        /* Code block wrapper with copy button */
        .code-block-wrapper { position: relative; margin: 8px 0; }
        .code-block-wrapper pre { margin: 0 !important; }
        .code-copy-btn {
            position: absolute; top: 8px; right: 8px;
            background: rgba(255,255,255,0.85); border: 1px solid rgba(0,0,0,0.08);
            border-radius: 6px; padding: 3px 10px; font-size: 11px;
            color: var(--text-secondary); cursor: pointer; opacity: 0;
            transition: opacity 0.15s, background 0.15s; font-family: inherit;
            backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
        }
        .code-block-wrapper:hover .code-copy-btn { opacity: 1; }
        .code-copy-btn:hover { background: rgba(255,255,255,0.95); }
        .code-copy-btn.copied { color: var(--success); }

        /* File download links in chat messages */
        .file-download-link {
            display: inline-flex; align-items: center; gap: 4px;
            color: var(--accent); text-decoration: none; font-weight: 500;
            background: var(--accent-light); padding: 2px 8px; border-radius: 6px;
            border: 1px solid rgba(99,102,241,0.12); transition: all 0.15s;
            cursor: pointer; font-size: inherit;
        }
        .file-download-link:hover { background: rgba(99,102,241,0.12); border-color: rgba(99,102,241,0.25); }
        .file-download-link svg { flex-shrink: 0; opacity: 0.6; }

        /* Syntax highlighting */
        .code-block-wrapper code .kw { color: #8b5cf6; font-weight: 500; }
        .code-block-wrapper code .str { color: #059669; }
        .code-block-wrapper code .cm { color: #9ca3af; font-style: italic; }
        .code-block-wrapper code .num { color: #d97706; }
        .code-block-wrapper code .fn { color: #2563eb; }

        /* Chat transition during agent switch */
        .chat-messages-inner.loading { opacity: 0.3; transition: opacity 0.2s; }

        .hidden { display: none !important; }

        /* Hired card animation */
        @keyframes hiredAppear {
            0%   { opacity: 0; transform: scale(0.72) translateY(14px); }
            65%  { transform: scale(1.04) translateY(-3px); }
            100% { opacity: 1; transform: scale(1) translateY(0); }
        }
        @keyframes hiredPulse {
            0%, 100% { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.3); }
            50%       { box-shadow: 0 0 0 6px rgba(52, 199, 89, 0); }
        }
        .hired-card {
            display: flex; align-items: center; gap: 12px;
            background: rgba(52, 199, 89, 0.07);
            border: 1.5px solid rgba(52, 199, 89, 0.25);
            color: #248a3d; padding: 12px 18px;
            border-radius: 14px; max-width: 82%; align-self: center;
            animation: hiredAppear 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
                       hiredPulse 0.9s ease-out 0.5s 1;
        }
        .hired-check {
            width: 28px; height: 28px; border-radius: 50%;
            background: rgba(52, 199, 89, 0.18);
            display: flex; align-items: center; justify-content: center; flex-shrink: 0;
        }
        .hired-name { font-size: 13px; font-weight: 600; }
        .hired-label { font-size: 11px; color: rgba(36, 138, 61, 0.65); margin-top: 1px; }

        /* Scope handoff button */
        .scope-handoff-wrap { align-self: flex-start; margin-top: 6px; }
        .scope-handoff-btn {
            display: inline-flex; align-items: center; gap: 6px;
            background: var(--accent-light); border: 1.5px solid var(--accent);
            color: var(--accent); padding: 8px 18px; border-radius: var(--radius-xl);
            font-size: 13px; font-weight: 500; cursor: pointer;
            font-family: inherit; transition: all 0.2s ease;
        }
        .scope-handoff-btn:hover { background: var(--accent); color: white; }
        .scope-handoff-btn:disabled { opacity: 0.5; cursor: not-allowed; }
        .scope-handoff-btn svg { width: 14px; height: 14px; flex-shrink: 0; }

        /* Suspend / Resume button */
        .suspend-btn, .delete-agent-btn {
            font-size: 12px; padding: 4px 12px; border-radius: 8px; cursor: pointer;
            font-family: inherit; font-weight: 500; border: 1px solid var(--border);
            background: transparent; color: var(--text-secondary); transition: all 0.15s;
        }
        .suspend-btn:hover { border-color: var(--warning); color: var(--warning); }
        .suspend-btn.resuming { border-color: var(--success); color: var(--success); }
        .suspend-btn.resuming:hover { background: var(--success); color: white; }
        .delete-agent-btn:hover { border-color: var(--error, #e53e3e); color: var(--error, #e53e3e); }

        /* Hire another prompt */
        .hire-another-wrap { align-self: center; margin: 14px 0 4px; }
        .hire-another-btn {
            display: inline-flex; align-items: center; gap: 7px;
            background: transparent; border: 1px solid var(--border);
            color: var(--text-secondary); padding: 7px 16px; border-radius: 20px;
            font-size: 12px; cursor: pointer; font-family: inherit;
            transition: all 0.2s ease;
        }
        .hire-another-btn:hover { border-color: var(--accent); color: var(--accent); }
        .hire-another-btn:disabled { opacity: 0.4; cursor: not-allowed; }
        .knowledge-prompt-wrap { align-self: flex-start; max-width: 720px; margin: 10px 0 4px; }
        .knowledge-prompt-btns { display: flex; gap: 8px; flex-wrap: wrap; }

        /* Schedule next-run label + run-now row */
        .sched-footer {
            display: flex; align-items: center; justify-content: space-between;
            margin-top: 6px;
        }
        .sched-next {
            font-size: 11px; color: var(--text-muted);
        }
        .run-now-btn {
            font-size: 11px; font-weight: 600;
            color: var(--accent); background: transparent;
            border: 1px solid var(--accent); border-radius: 100px;
            padding: 3px 12px; cursor: pointer;
            opacity: 0; transition: opacity 0.15s, background 0.15s, color 0.15s;
        }
        .sched-card:hover .run-now-btn { opacity: 1; }
        .run-now-btn:hover {
            background: var(--accent); color: #fff;
        }
        .run-now-btn:disabled {
            opacity: 0.5; cursor: not-allowed;
        }

        /* Active task item */
        .active-task-item {
            display: flex; gap: 10px; padding: 9px 0;
            border-bottom: 1px solid var(--border); font-size: 13px;
        }
        .active-task-item:last-child { border-bottom: none; }
        .active-task-spinner {
            width: 8px; height: 8px; border-radius: 50%;
            background: var(--warning); margin-top: 5px; flex-shrink: 0;
            animation: pulse 1.5s infinite;
        }

        /* --- Mobile hamburger & overlay --- */
        .mobile-nav-toggle {
            display: none; background: none; border: none; color: var(--text-primary);
            padding: 8px; cursor: pointer; flex-shrink: 0;
        }
        .rp-toggle-btn {
            display: none; background: none; border: none; color: var(--text-muted);
            padding: 8px; cursor: pointer; flex-shrink: 0; border-radius: 8px;
        }
        .rp-toggle-btn:hover { background: var(--bg-secondary); color: var(--text-primary); }
        .mobile-overlay {
            display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4);
            z-index: 99; opacity: 0; transition: opacity 0.2s;
        }
        .mobile-overlay.show { opacity: 1; }

        /* --- Responsive breakpoints --- */
        @media (max-width: 1024px) {
            .team-layout { grid-template-columns: 260px 1fr; }
            .right-pane {
                position: fixed; right: -320px; top: 0; bottom: 0; width: 310px;
                z-index: 101; transition: right 0.25s ease;
                box-shadow: -2px 0 12px rgba(0,0,0,0.08);
            }
            .right-pane.open { right: 0; }
            .rp-toggle-btn { display: flex; }
        }
        @media (max-width: 768px) {
            .team-layout { grid-template-columns: 1fr; }
            .left-pane {
                position: fixed; left: -280px; top: 0; bottom: 0; width: 260px;
                z-index: 100; transition: left 0.25s ease;
            }
            .left-pane.open { left: 0; }
            .mobile-nav-toggle { display: flex; }
            .mobile-overlay.show { display: block; }
            .main-header { padding-left: 4px; }
            .solo-landing-card { padding: 0 16px; }
            .solo-landing-card .greeting { font-size: 24px; }
            .browse-cta { font-size: 15px; padding: 12px 28px; }
            .landing-nav { padding: 12px 16px; }
            .landing-nav-link { font-size: 13px; padding: 6px 12px; }
            .example-chips { flex-wrap: wrap; }
            .example-chip { font-size: 12px; padding: 6px 10px; }
            .chat-input-area { padding: 8px 12px; }
        }
        @media (max-width: 480px) {
            .landing-nav-link.muted { display: none; }
            .solo-landing-card .greeting { font-size: 22px; }
            .value-tagline { font-size: 14px; }
            .browse-cta { width: 100%; text-align: center; }
        }

        /* Keyboard focus indicator — only shows when navigating with keyboard */
        *:focus-visible {
            outline: 2px solid var(--accent);
            outline-offset: 2px;
        }
        /* Inputs inside wrappers rely on the wrapper border for focus feedback */
        .chat-input:focus-visible,
        .chat-input-wrapper *:focus-visible {
            outline: none;
        }
        /* Skip link (hidden until focused) */
        .skip-link {
            position: absolute; top: -40px; left: 8px; z-index: 200;
            background: var(--accent); color: #fff; padding: 8px 16px;
            border-radius: 0 0 8px 8px; font-size: 13px; font-weight: 600;
            text-decoration: none; transition: top 0.2s;
        }
        .skip-link:focus { top: 0; }
