        :root {
            /* Cores e Tokens de Alto Contraste */
            --bg-main: #0d0f12;
            --bg-sidebar: #141720;
            --bg-card: #181d28;
            --bg-card-hover: #1e2433;
            --bg-input: #1c212c;
            --bg-msg-user: #222838;
            --text-main: #f8fafc; /* Branco nítido / Alto Contraste */
            --text-body: #e2e8f0; /* Texto de leitura claro */
            --text-muted: #cbd5e1; /* Texto secundário com excelente legibilidade */
            --text-dim: #94a3b8; /* Metadados e carimbos de tempo */
            --primary: var(--tenant-brand-color, #38bdf8); /* Cor dinâmica da marca */
            --accent: color-mix(in srgb, var(--tenant-brand-color, #38bdf8) 85%, black);
            --border-color: rgba(255, 255, 255, 0.14);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Inter', sans-serif;
        }

        body {
            background-color: var(--bg-main);
            color: var(--text-main);
            height: 100vh;
            display: flex;
            overflow: hidden;
        }

        /* Sidebar Limpa e Moderna */
        /* Sidebar Limpa e Moderna (Estilo Gemini) */
        .sidebar {
            width: 290px;
            background-color: var(--bg-sidebar);
            display: flex;
            flex-direction: column;
            padding: 0.75rem 0.65rem 0.5rem 0.65rem;
            height: 100vh;
            overflow: hidden;
            flex-shrink: 0;
            transition: width 0.2s ease;
        }

        /* Listra Grossa de Identidade da Empresa / Tenant (Definida pelo CEO) */
        .tenant-color-stripe {
            width: 100%;
            height: 6px;
            border-radius: 4px;
            background: var(--tenant-brand-color, #38bdf8);
            box-shadow: 0 0 12px var(--tenant-brand-glow, rgba(56, 189, 248, 0.45));
            margin-bottom: 4px;
            flex-shrink: 0;
            transition: background 0.3s ease, box-shadow 0.3s ease;
        }

        .sidebar-header {
            padding: 0.25rem 0.45rem 0.65rem 0.45rem;
            display: flex;
            align-items: center;
            gap: 10px;
            font-weight: 600;
            font-size: 1.15rem;
            color: var(--text-main);
            flex-shrink: 0;
        }

        .kognvs-brand-logo {
            font-family: 'Clash Display', 'Plus Jakarta Sans', sans-serif;
            font-weight: 700;
            font-size: 1.6rem;
            letter-spacing: -0.02em;
            color: var(--text-main);
            text-transform: lowercase;
            user-select: none;
            line-height: 1.1;
        }

        /* Workspace Pill da Empresa Ativa (Sem ícone de seta) */
        .tenant-workspace-pill {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 4px 10px;
            background: rgba(255, 255, 255, 0.04);
            border: 1px solid rgba(255, 255, 255, 0.09);
            border-radius: 6px;
            width: 100%;
            overflow: hidden;
            box-sizing: border-box;
            transition: all 0.2s ease;
        }

        .tenant-workspace-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: var(--tenant-brand-color, #38bdf8);
            box-shadow: 0 0 8px var(--tenant-brand-color, #38bdf8);
            flex-shrink: 0;
            display: inline-block;
            transition: background 0.3s ease, box-shadow 0.3s ease;
        }

        .tenant-workspace-name {
            font-size: 0.78rem;
            font-weight: 600;
            color: var(--text-body);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            letter-spacing: 0.2px;
        }

        /* Botões de Predefinição de Cores da Empresa */
        .color-preset-btn {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            border: 2px solid rgba(255, 255, 255, 0.2);
            cursor: pointer;
            transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
            padding: 0;
        }
        .color-preset-btn:hover {
            transform: scale(1.2);
            border-color: #ffffff;
            box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
        }

        .btn-new-chat {
            background-color: color-mix(in srgb, var(--tenant-brand-color, #38bdf8) 8%, transparent);
            color: var(--tenant-brand-color, #38bdf8);
            border: 1px solid color-mix(in srgb, var(--tenant-brand-color, #38bdf8) 20%, transparent);
            border-radius: 8px;
            padding: 0.5rem 0.75rem;
            display: flex;
            align-items: center;
            gap: 10px;
            cursor: pointer;
            font-size: 0.85rem;
            font-weight: 500;
            transition: all 0.2s ease;
            margin-bottom: 0.5rem;
            width: 100%;
            flex-shrink: 0;
        }

        .btn-new-chat:hover {
            background-color: color-mix(in srgb, var(--tenant-brand-color, #38bdf8) 15%, transparent);
            border-color: color-mix(in srgb, var(--tenant-brand-color, #38bdf8) 35%, transparent);
            color: var(--tenant-brand-color, #38bdf8);
            box-shadow: 0 4px 12px color-mix(in srgb, var(--tenant-brand-color, #38bdf8) 10%, transparent);
            transform: translateY(-1px);
        }

        .btn-stop-op {
            background: rgba(239, 68, 68, 0.1);
            border: 1px solid rgba(239, 68, 68, 0.2);
            color: #ef4444;
            font-size: 0.7rem;
            cursor: pointer;
            font-weight: 600;
            padding: 4px 10px;
            border-radius: 6px;
            display: inline-flex;
            align-items: center;
            gap: 5px;
            transition: all 0.2s ease;
        }

        .btn-stop-op:hover {
            background: rgba(239, 68, 68, 0.2);
            border-color: rgba(239, 68, 68, 0.4);
            transform: scale(1.02);
        }

        .nav-list {
            list-style: none;
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .nav-item {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 0.35rem 0.55rem;
            border-radius: 8px;
            color: var(--text-muted);
            text-decoration: none;
            font-size: 0.80rem;
            line-height: 1.35;
            cursor: pointer;
            transition: background 0.15s, color 0.15s;
        }

        .nav-item:hover {
            background-color: rgba(255, 255, 255, 0.06);
            color: var(--text-main);
        }

        .nav-item.active {
            background-color: rgba(255, 255, 255, 0.09);
            color: #ffffff;
            font-weight: 600;
            border-left: 2.5px solid var(--tenant-brand-color, #38bdf8);
            box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05), 0 2px 8px rgba(0, 0, 0, 0.2);
        }

        /* Indicador de Chat em Processamento Ativo */
        .nav-item.chat-is-processing {
            background: rgba(56, 189, 248, 0.08);
            border-left: 2.5px solid #38bdf8;
            color: #e0f2fe;
        }
        .chat-processing-dot {
            width: 8px;
            height: 8px;
            background: #38bdf8;
            border-radius: 50%;
            margin-right: 8px;
            display: inline-block;
            box-shadow: 0 0 8px #38bdf8;
            animation: pulse-blue 1.4s infinite;
            flex-shrink: 0;
        }
        .chat-status-pill-processing {
            color: #38bdf8;
            font-size: 0.75rem;
            margin-right: 4px;
            display: inline-flex;
            align-items: center;
        }

        /* Indicador de Chat com Pendência / Decisão do CEO (HITL) */
        .nav-item.chat-has-pending-hitl {
            background: rgba(245, 158, 11, 0.08);
            border-left: 2.5px solid #f59e0b;
            color: #fef3c7;
        }
        .nav-item.chat-has-pending-hitl:hover {
            background: rgba(245, 158, 11, 0.14);
        }
        .chat-status-pill-hitl {
            background: rgba(245, 158, 11, 0.16);
            color: #f59e0b;
            border: 1px solid rgba(245, 158, 11, 0.35);
            font-size: 0.62rem;
            font-weight: 700;
            padding: 1px 5px;
            border-radius: 4px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-right: 4px;
            white-space: nowrap;
            animation: pulseSoft 2s infinite ease-in-out;
        }


        .nav-label {
            font-size: 0.72rem;
            font-weight: 500;
            color: #8e918f;
            margin: 0.6rem 0 0.25rem 0.35rem;
            text-transform: none;
            letter-spacing: 0.01em;
        }

        /* Area de Chat */
        .main-content {
            flex: 1;
            display: flex;
            flex-direction: column;
            position: relative;
            min-width: 0; /* Previne overflow flex */
        }

        .topbar {
            height: 60px;
            display: flex;
            align-items: center;
            padding: 0 2rem;
            justify-content: space-between;
        }

        .model-selector {
            display: flex;
            align-items: center;
            gap: 8px;
            color: var(--text-main);
            font-weight: 500;
            font-size: 1.1rem;
            cursor: pointer;
        }
        
        .model-selector i {
            font-size: 0.8rem;
            color: var(--text-muted);
        }

        .user-profile {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background-color: var(--accent);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: 600;
            font-size: 0.9rem;
        }

        /* Mensagens - Correção do Scroll */
        .chat-scroll-area {
            flex: 1;
            overflow-y: auto;
            scroll-behavior: auto;
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 2rem;
            min-height: 0; /* Essencial para o scroll funcionar no flexbox */
        }

        .welcome-screen {
            margin: auto;
            text-align: center;
            animation: fadeIn 0.8s ease;
        }

        .welcome-screen h1 {
            font-size: 2.5rem;
            font-weight: 500;
            background: -webkit-linear-gradient(0deg, #4285f4, #d96570, #a8c7fa);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
            margin-bottom: 0.5rem;
        }

        .message-container {
            width: 100%;
            max-width: 880px;
            display: flex;
            gap: 1.1rem;
            margin-bottom: 2rem;
            animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
        }

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

        .message-container.user {
            flex-direction: row-reverse;
        }

        .avatar {
            width: 38px;
            height: 38px;
            border-radius: 11px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            margin-top: 2px;
            transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            overflow: hidden;
        }

        .avatar.ai {
            background: #0f172a;
            color: #38bdf8;
            border: 1.5px solid rgba(56, 189, 248, 0.45);
            font-size: 1.05rem;
            box-shadow: 0 0 14px rgba(56, 189, 248, 0.2);
        }

        .avatar.ai img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 10px;
            display: block;
            transition: transform 0.25s ease;
        }

        .avatar.ai:hover img {
            transform: scale(1.08);
        }

        .avatar.ai.agent-kognvs {
            border-color: rgba(56, 189, 248, 0.6);
            box-shadow: 0 0 14px rgba(56, 189, 248, 0.25);
        }

        .avatar.ai.agent-joao {
            border-color: rgba(168, 85, 247, 0.6);
            box-shadow: 0 0 14px rgba(168, 85, 247, 0.25);
        }

        .avatar.ai.agent-ana {
            border-color: rgba(16, 185, 129, 0.6);
            box-shadow: 0 0 14px rgba(16, 185, 129, 0.25);
        }

        .avatar.ai.agent-maya {
            border-color: rgba(249, 115, 22, 0.6);
            box-shadow: 0 0 14px rgba(249, 115, 22, 0.25);
        }

        .stepper-avatar-pulse {
            animation: avatar-pulse-glow 2s infinite alternate ease-in-out;
        }

        @keyframes avatar-pulse-glow {
            0% {
                box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
                transform: scale(1);
            }
            100% {
                box-shadow: 0 0 22px rgba(56, 189, 248, 0.55);
                transform: scale(1.04);
            }
        }

        .avatar.user {
            background: linear-gradient(135deg, #334155, #1e293b);
            color: #94a3b8;
            border: 1px solid rgba(255, 255, 255, 0.12);
            font-size: 0.95rem;
        }

        /* Estrutura do corpo da mensagem */
        .message-body-wrap {
            flex: 1;
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .message-body-wrap.user-body-wrap {
            align-items: flex-end;
        }

        .message-header-bar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 4px;
            margin-bottom: 2px;
        }

        .msg-author-info {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .msg-author-name {
            font-size: 0.84rem;
            font-weight: 600;
            color: #f1f5f9;
            letter-spacing: 0.01em;
        }

        .msg-author-badge {
            font-size: 0.68rem;
            font-weight: 500;
            color: #38bdf8;
            background: rgba(56, 189, 248, 0.1);
            border: 1px solid rgba(56, 189, 248, 0.25);
            padding: 1px 7px;
            border-radius: 12px;
            display: inline-flex;
            align-items: center;
            gap: 4px;
            letter-spacing: 0.02em;
        }

        .msg-meta-info {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .msg-timestamp {
            font-size: 0.72rem;
            color: #64748b;
            display: inline-flex;
            align-items: center;
            gap: 4px;
            font-variant-numeric: tabular-nums;
        }

        /* Conteúdo da Mensagem */
        .message-content {
            flex: 1;
            color: var(--text-main);
            font-size: 0.925rem;
            line-height: 1.68;
            max-width: 100%;
            word-break: break-word;
        }

        /* Balão do Usuário */
        .message-content.user-bubble {
            background: linear-gradient(135deg, #272a30 0%, #1e2024 100%);
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: #f1f5f9;
            padding: 0.75rem 1.15rem;
            border-radius: 18px 18px 4px 18px;
            font-size: 0.915rem;
            line-height: 1.55;
            box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
            max-width: 85%;
            white-space: pre-wrap;
        }

        /* Container do Markdown da IA (Card Elegante com acabamento profissional) */
        .message-content.markdown-body {
            background: rgba(22, 24, 28, 0.55);
            border: 1px solid rgba(255, 255, 255, 0.07);
            border-radius: 14px;
            padding: 1.25rem 1.45rem;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
            color: #e2e8f0;
            font-size: 0.925rem;
            line-height: 1.68;
            letter-spacing: -0.006em;
        }

        /* Tipografia de Markdown da IA (Tamanhos proporcionais, modernos e elegantes) */
        .markdown-body h1 {
            font-size: 1.25rem;
            font-weight: 700;
            color: #ffffff;
            letter-spacing: -0.02em;
            line-height: 1.35;
            margin-top: 1.3rem;
            margin-bottom: 0.55rem;
            padding-bottom: 0.35rem;
            border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        }
        .markdown-body h1:first-child {
            margin-top: 0;
        }

        .markdown-body h2 {
            font-size: 1.1rem;
            font-weight: 600;
            color: #f8fafc;
            letter-spacing: -0.015em;
            line-height: 1.4;
            margin-top: 1.15rem;
            margin-bottom: 0.45rem;
        }
        .markdown-body h2:first-child {
            margin-top: 0;
        }

        .markdown-body h3 {
            font-size: 1.0rem;
            font-weight: 600;
            color: #e2e8f0;
            letter-spacing: -0.01em;
            line-height: 1.45;
            margin-top: 0.95rem;
            margin-bottom: 0.35rem;
        }
        .markdown-body h3:first-child {
            margin-top: 0;
        }

        .markdown-body h4, .markdown-body h5, .markdown-body h6 {
            font-size: 0.925rem;
            font-weight: 600;
            color: #cbd5e1;
            margin-top: 0.8rem;
            margin-bottom: 0.3rem;
        }

        .markdown-body p {
            margin-bottom: 0.85rem;
            line-height: 1.68;
            color: #cbd5e1;
        }
        .markdown-body p:last-child {
            margin-bottom: 0;
        }

        .markdown-body strong, .markdown-body b {
            font-weight: 600;
            color: #ffffff;
        }

        .markdown-body em, .markdown-body i {
            color: #e2e8f0;
        }

        .markdown-body a {
            color: #60a5fa;
            text-decoration: none;
            border-bottom: 1px dashed rgba(96, 165, 250, 0.4);
            transition: all 0.2s ease;
        }
        .markdown-body a:hover {
            color: #93c5fd;
            border-bottom-style: solid;
            border-bottom-color: #93c5fd;
        }

        /* Imagens e Criativos Visuais no Chat / Markdown */
        .markdown-body img {
            max-width: 100%;
            max-height: 480px;
            height: auto;
            border-radius: 12px;
            border: 1px solid rgba(255, 255, 255, 0.12);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
            margin: 14px 0;
            display: block;
            object-fit: contain;
            background: rgba(0, 0, 0, 0.25);
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }
        .markdown-body img:hover {
            transform: scale(1.01);
            box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6);
        }

        /* Listas Modernas */
        .markdown-body ul, .markdown-body ol {
            margin-top: 0.4rem;
            margin-bottom: 0.85rem;
            padding-left: 1.4rem;
        }
        .markdown-body li {
            margin-bottom: 0.35rem;
            line-height: 1.62;
            color: #cbd5e1;
        }
        .markdown-body li::marker {
            color: #38bdf8;
        }
        .markdown-body ol li::marker {
            color: #94a3b8;
            font-weight: 600;
        }

        /* Tabelas Markdown Customizadas e Responsivas */
        .table-responsive-wrapper, .markdown-body table {
            width: 100%;
            overflow-x: auto;
            margin: 1.15rem 0;
            border-radius: 10px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            background: rgba(15, 17, 21, 0.85);
            box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
            border-collapse: collapse;
        }

        .kognvs-md-table, .markdown-body table {
            width: 100%;
            border-collapse: collapse;
            font-size: 0.84rem;
            text-align: left;
        }

        .kognvs-md-table th, .markdown-body th {
            background: rgba(30, 34, 44, 0.95);
            color: #93c5fd;
            font-size: 0.75rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            padding: 10px 14px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.12);
            white-space: nowrap;
        }

        .kognvs-md-table td, .markdown-body td {
            padding: 10px 14px;
            color: #cbd5e1;
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
            line-height: 1.55;
            vertical-align: top;
        }

        .kognvs-md-table tr:nth-child(even), .markdown-body tr:nth-child(even) {
            background: rgba(255, 255, 255, 0.015);
        }

        .kognvs-md-table tr:hover td, .markdown-body tr:hover td {
            background: rgba(56, 189, 248, 0.04);
            color: #f8fafc;
        }

        .kognvs-md-table tr:last-child td, .markdown-body tr:last-child td {
            border-bottom: none;
        }

        /* Blocos de Código (Code Blocks) */
        .code-block-wrapper {
            margin: 1.15rem 0;
            border-radius: 10px;
            overflow: hidden;
            background: #0d1117;
            border: 1px solid rgba(255, 255, 255, 0.1);
            box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
        }

        .code-block-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 7px 14px;
            background: rgba(255, 255, 255, 0.03);
            border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        }

        .code-lang-label {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.72rem;
            font-weight: 600;
            color: #94a3b8;
            letter-spacing: 0.05em;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .btn-copy-code {
            background: rgba(255, 255, 255, 0.06);
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: #cbd5e1;
            border-radius: 6px;
            padding: 3px 9px;
            font-size: 0.72rem;
            font-weight: 500;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 5px;
            transition: all 0.2s ease;
        }

        .btn-copy-code:hover {
            background: rgba(255, 255, 255, 0.14);
            color: #ffffff;
            border-color: rgba(255, 255, 255, 0.2);
        }

        .markdown-body pre {
            margin: 1.15rem 0;
            padding: 1rem 1.25rem;
            background: #0d1117;
            border-radius: 10px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            overflow-x: auto;
        }

        .code-block-wrapper pre {
            margin: 0 !important;
            border: none !important;
            border-radius: 0 !important;
            background: transparent !important;
        }

        .markdown-body pre code {
            font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
            font-size: 0.84rem;
            line-height: 1.6;
            padding: 0;
            background: transparent;
            color: #e2e8f0;
        }

        /* Código Inline */
        .markdown-body code {
            font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
            font-size: 0.85em;
            background: rgba(56, 189, 248, 0.08);
            color: #38bdf8;
            border: 1px solid rgba(56, 189, 248, 0.2);
            padding: 1.5px 6px;
            border-radius: 4px;
            font-weight: 500;
        }

        /* Callouts / Blockquotes com personalidade */
        .kognvs-callout, .markdown-body blockquote {
            margin: 1.15rem 0;
            padding: 12px 16px;
            border-radius: 8px;
            font-size: 0.88rem;
            line-height: 1.6;
            display: flex;
            flex-direction: column;
            gap: 6px;
            border-left: 4px solid #6366f1;
            background: rgba(99, 102, 241, 0.07);
            color: #cbd5e1;
        }

        .kognvs-callout.quote-note {
            border-left-color: #38bdf8;
            background: rgba(56, 189, 248, 0.08);
        }

        .kognvs-callout.quote-tip {
            border-left-color: #34d399;
            background: rgba(52, 211, 153, 0.08);
        }

        .kognvs-callout.quote-important {
            border-left-color: #a855f7;
            background: rgba(168, 85, 247, 0.08);
        }

        .kognvs-callout.quote-warning {
            border-left-color: #fbbf24;
            background: rgba(251, 191, 36, 0.08);
        }

        .kognvs-callout.quote-caution {
            border-left-color: #f87171;
            background: rgba(248, 113, 113, 0.08);
        }

        .callout-badge {
            font-size: 0.72rem;
            font-weight: 700;
            letter-spacing: 0.05em;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            margin-bottom: 2px;
        }

        .callout-badge.note { color: #38bdf8; }
        .callout-badge.tip { color: #34d399; }
        .callout-badge.important { color: #c084fc; }
        .callout-badge.warning { color: #fbbf24; }
        .callout-badge.caution { color: #f87171; }

        /* Divisores */
        .kognvs-divider-wrap {
            padding: 0.75rem 0;
        }
        .kognvs-divider {
            border: none;
            height: 1px;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
            margin: 0;
        }

        /* Barra de Ações Rápidas da Resposta */
        .message-actions-toolbar {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-top: 6px;
            padding: 2px 4px;
            opacity: 0.75;
            transition: opacity 0.2s ease;
        }

        .message-body-wrap:hover .message-actions-toolbar {
            opacity: 1;
        }

        .btn-msg-action {
            background: rgba(255, 255, 255, 0.04);
            border: 1px solid rgba(255, 255, 255, 0.07);
            color: #94a3b8;
            border-radius: 7px;
            padding: 4px 10px;
            font-size: 0.74rem;
            font-weight: 500;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 5px;
            transition: all 0.2s ease;
        }

        .btn-msg-action:hover {
            background: rgba(255, 255, 255, 0.1);
            color: #f1f5f9;
            border-color: rgba(255, 255, 255, 0.16);
        }

        .btn-msg-action.copied {
            background: rgba(74, 222, 128, 0.12);
            color: #4ade80;
            border-color: rgba(74, 222, 128, 0.3);
        }

        .btn-msg-action.speaking {
            background: rgba(248, 113, 113, 0.15);
            color: #f87171;
            border-color: rgba(248, 113, 113, 0.3);
        }

        .btn-msg-action.btn-fact-check {
            color: #38bdf8;
            border-color: rgba(56, 189, 248, 0.2);
            background: rgba(56, 189, 248, 0.06);
        }

        .btn-msg-action.btn-fact-check:hover {
            background: rgba(56, 189, 248, 0.16);
            color: #7dd3fc;
            border-color: rgba(56, 189, 248, 0.4);
            box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
        }

        .btn-msg-action.btn-regenerate {
            color: #a78bfa;
            border-color: rgba(167, 139, 250, 0.2);
            background: rgba(167, 139, 250, 0.06);
        }

        .btn-msg-action.btn-regenerate:hover {
            background: rgba(167, 139, 250, 0.16);
            color: #c4b5fd;
            border-color: rgba(167, 139, 250, 0.4);
        }

        .btn-msg-action.loading {
            opacity: 0.7;
            pointer-events: none;
            background: rgba(255, 255, 255, 0.08);
        }

        /* User Message Actions Toolbar */
        .user-body-wrap {
            position: relative;
        }

        .user-actions-toolbar {
            display: flex;
            align-items: center;
            gap: 6px;
            margin-top: 6px;
            justify-content: flex-end;
            opacity: 0;
            transition: opacity 0.2s ease;
        }

        .message-container.user:hover .user-actions-toolbar {
            opacity: 1;
        }

        .btn-user-action {
            background: rgba(255, 255, 255, 0.06);
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: #94a3b8;
            border-radius: 6px;
            padding: 3px 8px;
            font-size: 0.7rem;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 4px;
            transition: all 0.2s ease;
        }

        .btn-user-action:hover {
            background: rgba(255, 255, 255, 0.14);
            color: #f8fafc;
            border-color: rgba(255, 255, 255, 0.22);
        }

        /* Inline Message Editor */
        .user-inline-editor {
            width: 100%;
            background: #18191c;
            border: 1px solid rgba(56, 189, 248, 0.35);
            border-radius: 12px;
            padding: 12px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
            margin-top: 4px;
        }

        .user-inline-editor textarea {
            width: 100%;
            min-height: 70px;
            background: transparent;
            border: none;
            color: #f1f5f9;
            font-size: 0.95rem;
            font-family: inherit;
            resize: vertical;
            outline: none;
            line-height: 1.5;
        }

        .user-inline-editor-footer {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-top: 8px;
            padding-top: 8px;
            border-top: 1px solid rgba(255, 255, 255, 0.08);
        }

        .user-inline-editor-footer .btn-group {
            display: flex;
            gap: 8px;
        }

        .btn-inline-save {
            background: #0284c7;
            color: #fff;
            border: none;
            border-radius: 6px;
            padding: 6px 14px;
            font-size: 0.8rem;
            font-weight: 600;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            transition: all 0.2s ease;
        }

        .btn-inline-save:hover {
            background: #0369a1;
            box-shadow: 0 0 10px rgba(2, 132, 199, 0.4);
        }

        .btn-inline-cancel {
            background: rgba(255, 255, 255, 0.08);
            color: #94a3b8;
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 6px;
            padding: 6px 12px;
            font-size: 0.8rem;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .btn-inline-cancel:hover {
            background: rgba(255, 255, 255, 0.14);
            color: #f1f5f9;
        }

        /* Cartão de Auditoria de Veracidade Factual */
        .chat-fact-check-card {
            margin-top: 14px;
            background: linear-gradient(145deg, #131720, #0f1117);
            border: 1px solid rgba(56, 189, 248, 0.3);
            border-radius: 12px;
            padding: 16px;
            box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 0 0 15px rgba(56, 189, 248, 0.08);
            animation: factCheckSlideDown 0.3s ease-out;
            position: relative;
        }

        @keyframes factCheckSlideDown {
            from { opacity: 0; transform: translateY(-8px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .fact-check-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 12px;
            flex-wrap: wrap;
            gap: 8px;
        }

        .fact-check-title {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 0.88rem;
            font-weight: 700;
            color: #e2e8f0;
        }

        .fact-check-badge-score {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 4px 10px;
            border-radius: 20px;
            font-size: 0.76rem;
            font-weight: 700;
            letter-spacing: 0.3px;
        }

        .fact-check-badge-score.status-verificado {
            background: rgba(16, 185, 129, 0.15);
            color: #34d399;
            border: 1px solid rgba(16, 185, 129, 0.4);
        }

        .fact-check-badge-score.status-atencao {
            background: rgba(245, 158, 11, 0.15);
            color: #fbbf24;
            border: 1px solid rgba(245, 158, 11, 0.4);
        }

        .fact-check-badge-score.status-divergente {
            background: rgba(239, 68, 68, 0.15);
            color: #f87171;
            border: 1px solid rgba(239, 68, 68, 0.4);
        }

        .fact-check-summary {
            font-size: 0.84rem;
            color: #cbd5e1;
            line-height: 1.45;
            margin-bottom: 12px;
            padding: 8px 12px;
            background: rgba(255, 255, 255, 0.03);
            border-radius: 8px;
            border-left: 3px solid #38bdf8;
        }

        .fact-check-items-list {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .fact-check-item {
            background: rgba(255, 255, 255, 0.02);
            border: 1px solid rgba(255, 255, 255, 0.06);
            border-radius: 8px;
            padding: 10px 12px;
            font-size: 0.82rem;
            transition: background 0.2s ease;
        }

        .fact-check-item:hover {
            background: rgba(255, 255, 255, 0.04);
        }

        .fact-check-item-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            margin-bottom: 4px;
        }

        .fact-check-item-claim {
            font-weight: 600;
            color: #f1f5f9;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .fact-tag {
            font-size: 0.7rem;
            padding: 2px 7px;
            border-radius: 4px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.4px;
        }

        .fact-tag.tag-verificado {
            background: rgba(16, 185, 129, 0.2);
            color: #10b981;
        }

        .fact-tag.tag-inconclusivo {
            background: rgba(245, 158, 11, 0.2);
            color: #f59e0b;
        }

        .fact-tag.tag-divergente {
            background: rgba(239, 68, 68, 0.2);
            color: #ef4444;
        }

        .fact-check-item-detail {
            color: #94a3b8;
            font-size: 0.78rem;
            line-height: 1.4;
            margin-top: 4px;
        }

        .fact-check-item-source {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            color: #38bdf8;
            font-size: 0.72rem;
            margin-top: 6px;
            background: rgba(56, 189, 248, 0.08);
            padding: 2px 6px;
            border-radius: 4px;
        }

        .btn-close-fact-check {
            background: transparent;
            border: none;
            color: #64748b;
            cursor: pointer;
            font-size: 0.85rem;
            padding: 4px;
            transition: color 0.2s ease;
        }

        .btn-close-fact-check:hover {
            color: #f1f5f9;
        }

        /* Input Area Fixada no Fundo */
        .input-area-container {
            width: 100%;
            padding: 0 2rem 2rem 2rem;
            display: flex;
            flex-direction: column;
            align-items: center;
            background: linear-gradient(180deg, transparent, var(--bg-main) 30%);
        }

        /* Input Box Estilo Gemini Enterprise */
        .input-box {
            width: 100%;
            max-width: 820px;
            background-color: #1e1f23;
            border-radius: 24px;
            padding: 1rem 1.25rem 0.75rem 1.25rem;
            display: flex;
            flex-direction: column;
            border: 1px solid rgba(255, 255, 255, 0.1);
            transition: all 0.25s ease;
            box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
        }

        .input-box:focus-within {
            background-color: #232429;
            border-color: rgba(255, 255, 255, 0.2);
            box-shadow: 0 8px 36px rgba(0, 0, 0, 0.5);
        }

        .input-box textarea {
            width: 100%;
            background: transparent;
            border: none;
            color: var(--text-main);
            padding: 0;
            font-size: 1rem;
            resize: none;
            outline: none;
            max-height: 180px;
            min-height: 28px;
            overflow-y: auto;
            line-height: 1.5;
            font-family: inherit;
        }

        .input-box textarea::placeholder {
            color: #71767b;
        }

        /* Toolbar Inferior de Ações */
        .input-toolbar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 10px;
            padding-top: 6px;
        }

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

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

        .btn-tool-circle {
            background: rgba(255, 255, 255, 0.05);
            color: #94a3b8;
            border: 1px solid rgba(255, 255, 255, 0.08);
            width: 34px;
            height: 34px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s ease;
            font-size: 0.9rem;
        }

        .btn-tool-circle:hover {
            background: rgba(255, 255, 255, 0.12);
            color: #ffffff;
            border-color: rgba(255, 255, 255, 0.18);
        }

        .btn-send-circle {
            background: rgba(255, 255, 255, 0.06);
            color: #64748b;
            border: none;
            width: 34px;
            height: 34px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s ease;
            font-size: 0.9rem;
        }

        .btn-send-circle.active {
            background: #ffffff;
            color: #0f172a;
            box-shadow: 0 0 12px rgba(255, 255, 255, 0.25);
        }

        .btn-send-circle.active:hover {
            transform: scale(1.06);
            background: #f8fafc;
        }

        .upload-preview-item {
            background-color: rgba(255,255,255,0.08);
            padding: 4px 10px;
            border-radius: 12px;
            font-size: 0.8rem;
            display: flex;
            align-items: center;
            gap: 6px;
            color: #cbd5e1;
        }
        .upload-preview-item i {
            cursor: pointer;
        }

        /* ==========================================================================
           BARRA DE MONITORAMENTO DE LOOPS & CUSTOS DA IA (CEO)
           ========================================================================== */
        .ai-cost-meter-container {
            width: 100%;
            max-width: 820px;
            margin-top: 8px;
            background: rgba(24, 26, 32, 0.85);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 14px;
            padding: 8px 14px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            animation: fadeInCostMeter 0.3s ease-out;
        }

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

        .cost-meter-top {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 6px;
            font-size: 0.78rem;
        }

        .cost-meter-left {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .cost-meter-pulse-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #10b981;
            box-shadow: 0 0 8px #10b981;
            display: inline-block;
            animation: pulseDotAnim 1.6s infinite ease-in-out;
        }

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

        .cost-meter-title {
            color: #cbd5e1;
            font-weight: 500;
            font-size: 0.78rem;
            letter-spacing: 0.2px;
        }

        .cost-meter-turn-badge {
            background: rgba(56, 189, 248, 0.12);
            color: #38bdf8;
            border: 1px solid rgba(56, 189, 248, 0.25);
            padding: 1px 8px;
            border-radius: 10px;
            font-size: 0.72rem;
            font-weight: 600;
        }

        .cost-meter-right {
            display: flex;
            align-items: center;
            gap: 2px;
            font-family: 'JetBrains Mono', monospace, -apple-system, sans-serif;
        }

        .cost-meter-val {
            color: #f8fafc;
            font-weight: 700;
            font-size: 0.8rem;
        }

        .cost-meter-limit {
            color: var(--text-muted, #94a3b8);
            font-size: 0.74rem;
            margin-right: 4px;
        }

        .cost-meter-percent-badge {
            padding: 1px 7px;
            border-radius: 6px;
            font-weight: 700;
            font-size: 0.72rem;
            background: rgba(16, 185, 129, 0.15);
            color: #10b981;
            border: 1px solid rgba(16, 185, 129, 0.25);
            transition: all 0.3s ease;
        }

        .cost-meter-progress-track {
            height: 5px;
            width: 100%;
            background: rgba(255, 255, 255, 0.08);
            border-radius: 4px;
            overflow: hidden;
            position: relative;
        }

        .cost-meter-progress-fill {
            height: 100%;
            border-radius: 4px;
            background: linear-gradient(90deg, #10b981, #06b6d4);
            box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
            transition: width 0.35s ease, background 0.35s ease, box-shadow 0.35s ease;
        }

        .cost-meter-progress-fill.warn {
            background: linear-gradient(90deg, #f59e0b, #f97316);
            box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
        }

        .cost-meter-progress-fill.danger {
            background: linear-gradient(90deg, #ef4444, #dc2626);
            box-shadow: 0 0 12px rgba(239, 68, 68, 0.6);
            animation: dangerGlow 1.2s infinite alternate;
        }

        @keyframes dangerGlow {
            from { box-shadow: 0 0 6px rgba(239, 68, 68, 0.4); }
            to { box-shadow: 0 0 14px rgba(239, 68, 68, 0.8); }
        }

        /* Seletor de Fase: Planejamento vs Execução (Sóbrio) */
        .stage-segmented-control {
            display: flex;
            align-items: center;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 18px;
            padding: 2px;
            gap: 2px;
            user-select: none;
        }
        .stage-seg-btn {
            display: flex;
            align-items: center;
            gap: 5px;
            padding: 4px 10px;
            border-radius: 14px;
            font-size: 0.76rem;
            font-weight: 500;
            color: #94a3b8;
            background: transparent;
            border: 1px solid transparent;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .stage-seg-btn:hover {
            color: #ffffff;
        }
        .stage-seg-btn.stage-plan.active {
            background: rgba(255, 255, 255, 0.12);
            color: #ffffff;
            border-color: rgba(255, 255, 255, 0.15);
            box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
        }
        .stage-seg-btn.stage-exec.active {
            background: rgba(255, 255, 255, 0.12);
            color: #ffffff;
            border-color: rgba(255, 255, 255, 0.15);
            box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
        }

        /* Seletor de Modos */
        .mode-dropdown-container {
            position: relative;
            display: flex;
            align-items: center;
        }

        .btn-mode-toggle {
            background: #1e1f20;
            border: 1px solid rgba(255, 255, 255, 0.14);
            border-radius: 20px;
            padding: 6px 14px;
            color: #e3e3e3;
            cursor: pointer;
            font-size: 0.84rem;
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 6px;
            transition: all 0.2s ease;
            white-space: nowrap;
        }
        .btn-mode-toggle:hover {
            background: rgba(255, 255, 255, 0.08);
            color: #ffffff;
            border-color: rgba(255, 255, 255, 0.28);
        }

        /* Menu Dropdown Estilo Google Gemini (Material 3 Dark) */
        .mode-dropdown-menu {
            display: none;
            position: absolute;
            bottom: calc(100% + 12px);
            right: 0;
            background-color: #1e1f20;
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 24px;
            padding: 8px;
            width: 280px;
            box-shadow: 0 12px 36px rgba(0, 0, 0, 0.65), 0 0 1px rgba(255, 255, 255, 0.1);
            z-index: 100;
            backdrop-filter: blur(20px);
        }
        .mode-dropdown-menu.show {
            display: block;
            animation: fadeIn 0.15s ease;
        }
        .dropdown-category-title {
            font-size: 0.68rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: #8e918f;
            padding: 6px 14px 4px 14px;
        }
        .dropdown-divider {
            height: 1px;
            background: rgba(255, 255, 255, 0.08);
            margin: 6px 6px;
        }

        /* Itens de Ação Simples (Estilo Menu [+] do Gemini com Título & Descrição) */
        .gemini-action-item {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 9px 12px;
            border-radius: 14px;
            cursor: pointer;
            color: #e3e3e3;
            transition: background 0.15s ease;
            user-select: none;
        }
        .gemini-action-item:hover {
            background-color: rgba(255, 255, 255, 0.08);
        }
        .gemini-action-icon {
            font-size: 1.1rem;
            color: #c4c7c5;
            width: 22px;
            text-align: center;
            flex-shrink: 0;
            transition: color 0.15s ease;
        }
        .gemini-action-item:hover .gemini-action-icon {
            color: #ffffff;
        }
        .gemini-action-text {
            display: flex;
            flex-direction: column;
            gap: 2px;
            flex: 1;
        }
        .gemini-action-title {
            font-size: 0.88rem;
            font-weight: 500;
            color: #e3e3e3;
            line-height: 1.25;
        }
        .gemini-action-desc {
            font-size: 0.74rem;
            color: #8e918f;
            line-height: 1.25;
        }

        /* Itens do Seletor de Modo (Estilo Model Selector do Gemini) */
        .gemini-mode-card {
            display: flex;
            flex-direction: column;
            padding: 10px 14px;
            border-radius: 16px;
            border: 1.5px solid transparent;
            cursor: pointer;
            transition: all 0.15s ease;
            margin-bottom: 2px;
        }
        .gemini-mode-card:hover {
            background-color: rgba(255, 255, 255, 0.06);
        }
        .gemini-mode-card.selected {
            border-color: rgba(255, 255, 255, 0.85);
            background-color: rgba(255, 255, 255, 0.04);
        }
        .gemini-mode-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
        }
        .gemini-mode-title {
            font-size: 0.88rem;
            font-weight: 500;
            color: #e3e3e3;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .gemini-mode-card.selected .gemini-mode-title {
            color: #ffffff;
            font-weight: 600;
        }
        .gemini-mode-badge {
            font-size: 0.7rem;
            font-weight: 500;
            color: #c4c7c5;
            background: #333537;
            border-radius: 10px;
            padding: 2px 8px;
        }
        .gemini-mode-desc {
            font-size: 0.76rem;
            color: #8e918f;
            margin-top: 3px;
            line-height: 1.3;
        }

        /* =========================================================
           Seletor Flyout de 2 Colunas: Departamentos & Especialistas (Stripe/Linear Style)
           ========================================================= */
        .specialist-dropdown-container {
            position: relative;
            display: flex;
            align-items: center;
        }

        .btn-specialist-toggle {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 20px;
            padding: 5px 14px;
            color: #cbd5e1;
            cursor: pointer;
            font-size: 0.84rem;
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 8px;
            transition: all 0.2s ease;
        }

        .btn-specialist-toggle:hover {
            background: rgba(255, 255, 255, 0.1);
            color: #ffffff;
            border-color: rgba(255, 255, 255, 0.15);
        }

        .specialist-dropdown-menu {
            display: none;
            position: absolute;
            top: calc(100% + 8px);
            left: 0;
            background-color: #1a1b1e;
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: 16px;
            padding: 0;
            width: 580px;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 1px rgba(255, 255, 255, 0.1);
            z-index: 150;
            backdrop-filter: blur(20px);
            overflow: hidden;
        }

        .specialist-dropdown-menu.show {
            display: flex;
            animation: fadeIn 0.15s ease;
        }

        /* Coluna da Esquerda: Departamentos */
        .flyout-dept-col {
            width: 220px;
            background: #141518;
            border-right: 1px solid rgba(255, 255, 255, 0.07);
            padding: 10px 8px;
            display: flex;
            flex-direction: column;
            gap: 3px;
        }

        .flyout-dept-header {
            font-size: 0.68rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: #64748b;
            padding: 6px 10px 4px 10px;
        }

        .flyout-dept-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 8px 10px;
            border-radius: 8px;
            cursor: pointer;
            color: #94a3b8;
            font-size: 0.82rem;
            font-weight: 500;
            transition: all 0.15s ease;
        }

        .flyout-dept-item:hover {
            background-color: rgba(255, 255, 255, 0.05);
            color: #f1f5f9;
        }

        .flyout-dept-item.active {
            background-color: color-mix(in srgb, var(--tenant-brand-color, #38bdf8) 12%, transparent);
            color: var(--primary);
        }

        .flyout-dept-left {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .flyout-dept-left i {
            font-size: 0.85rem;
            width: 16px;
            text-align: center;
        }

        /* Coluna da Direita: Especialistas */
        .flyout-roles-col {
            flex: 1;
            padding: 12px;
            display: flex;
            flex-direction: column;
            background: #1a1b1e;
        }

        .flyout-roles-header {
            font-size: 0.68rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: #64748b;
            padding: 0 6px 8px 6px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            border-bottom: 1px solid rgba(255, 255, 255, 0.06);
            margin-bottom: 8px;
        }

        .flyout-role-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 9px 10px;
            border-radius: 10px;
            cursor: pointer;
            transition: background 0.15s ease;
        }

        .flyout-role-item:hover {
            background-color: rgba(255, 255, 255, 0.06);
        }

        .flyout-role-item.selected {
            background-color: rgba(255, 255, 255, 0.08);
        }

        .flyout-role-icon {
            width: 32px;
            height: 32px;
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.05);
            color: #94a3b8;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.9rem;
            flex-shrink: 0;
        }

        .flyout-role-item.selected .flyout-role-icon,
        .flyout-role-item:hover .flyout-role-icon {
            background: rgba(168, 199, 250, 0.14);
            color: var(--primary);
        }

        .flyout-role-info {
            display: flex;
            flex-direction: column;
            gap: 2px;
            flex: 1;
        }

        .flyout-role-title {
            font-size: 0.86rem;
            font-weight: 500;
            color: #f1f5f9;
        }

        .flyout-role-desc {
            font-size: 0.73rem;
            color: #94a3b8;
        }

        .flyout-role-item .checkmark-icon {
            font-size: 0.82rem;
            color: #38bdf8;
            opacity: 0;
            transition: opacity 0.15s ease;
        }

        .flyout-role-item.selected .checkmark-icon {
            opacity: 1;
        }

        /* =========================================================
           Menu de Autocomplete de Menções (@sdr, @closer, @juridico)
           ========================================================= */
        .mention-popup {
            position: absolute;
            bottom: calc(100% + 12px);
            left: 20px;
            background: #1e1f23;
            border: 1px solid rgba(255, 255, 255, 0.15);
            border-radius: 14px;
            padding: 6px;
            width: 320px;
            max-height: 280px;
            overflow-y: auto;
            box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 1px rgba(255, 255, 255, 0.1);
            z-index: 200;
            display: none;
            backdrop-filter: blur(16px);
            animation: fadeIn 0.15s ease;
        }
        .mention-popup.show {
            display: block;
        }
        .mention-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 8px 12px;
            border-radius: 10px;
            cursor: pointer;
            transition: background 0.15s ease;
        }
        .mention-item:hover {
            background-color: rgba(255, 255, 255, 0.08);
        }
        .mention-icon {
            width: 30px;
            height: 30px;
            border-radius: 50%;
            background: rgba(168, 199, 250, 0.12);
            color: var(--primary);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.85rem;
            flex-shrink: 0;
        }
        .mention-info {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }
        .mention-title {
            font-size: 0.86rem;
            font-weight: 500;
            color: #f1f5f9;
        }
        .mention-tag {
            font-size: 0.76rem;
            color: #38bdf8;
            font-weight: 600;
            margin-right: 4px;
        }
        .mention-desc {
            font-size: 0.74rem;
            color: #94a3b8;
        }

        /* =========================================================
           Kognvs Stepper & Execution Card (Pilar 1: Stepping & Logs)
           ========================================================= */
        .execution-stepper-card {
            width: 100%;
            max-width: 780px;
            background: linear-gradient(145deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.8));
            backdrop-filter: blur(12px);
            border: 1px solid rgba(148, 163, 184, 0.1);
            border-radius: 16px;
            padding: 1.5rem;
            display: flex;
            flex-direction: column;
            gap: 1.2rem;
            animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
        }

        .stepper-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            border-bottom: 1px solid rgba(255, 255, 255, 0.06);
            padding-bottom: 0.75rem;
        }

        .stepper-header-left {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
        }

        .stepper-working-badge {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .stepper-pulse-dot {
            width: 9px;
            height: 9px;
            border-radius: 50%;
            background-color: #38bdf8;
            box-shadow: 0 0 10px #38bdf8;
            animation: pulse-dot 1.8s infinite ease-in-out;
        }

        @keyframes pulse-dot {
            0% { transform: scale(0.85); opacity: 0.6; box-shadow: 0 0 4px #38bdf8; }
            50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 14px #38bdf8; }
            100% { transform: scale(0.85); opacity: 0.6; box-shadow: 0 0 4px #38bdf8; }
        }

        .stepper-title {
            font-size: 0.95rem;
            font-weight: 600;
            color: #f1f5f9;
            letter-spacing: 0.1px;
        }

        .stepper-persona-badge {
            background: rgba(56, 189, 248, 0.1);
            color: #38bdf8;
            border: 1px solid rgba(56, 189, 248, 0.25);
            border-radius: 16px;
            padding: 2px 9px;
            font-size: 0.75rem;
            font-weight: 500;
        }

        .stepper-timer {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 0.8rem;
            color: #94a3b8;
        }

        .stepper-steps-list {
            display: flex;
            flex-direction: column;
            gap: 0.6rem;
            position: relative;
            padding: 0.25rem 0.25rem 0.25rem 0.5rem;
            border-left: 1px solid rgba(255, 255, 255, 0.08);
            margin-left: 0.6rem;
        }

        .step-row {
            display: flex;
            align-items: center;
            gap: 12px;
            font-size: 0.9rem;
            padding: 2px 0;
            background: transparent;
            transition: all 0.25s ease;
            position: relative;
        }

        .step-row.pending {
            color: #64748b;
            opacity: 0.6;
        }

        .step-row.running {
            color: #f8fafc;
            font-weight: 500;
            background: rgba(56, 189, 248, 0.08);
            border-radius: 6px;
            padding: 6px 10px;
            margin-left: -10px;
            border-left: 2px solid #38bdf8;
        }

        .step-row.done {
            color: #cbd5e1;
        }

        .step-icon-wrap {
            width: 20px;
            height: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.95rem;
            flex-shrink: 0;
            background: #14171c; /* To hide the timeline border behind it */
            border-radius: 50%;
            position: absolute;
            left: -18.5px;
            z-index: 2;
        }

        .step-row.pending .step-icon-wrap {
            color: #64748b;
        }

        .step-row.running .step-icon-wrap {
            color: #38bdf8;
        }

        .step-row.done .step-icon-wrap {
            color: #22c55e;
        }

        .step-text {
            flex: 1;
            display: flex;
            align-items: center;
            gap: 8px;
            padding-left: 14px;
        }

        .step-tool-badge {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            background: rgba(99, 102, 241, 0.12);
            color: #a5b4fc;
            border: 1px solid rgba(99, 102, 241, 0.25);
            border-radius: 12px;
            padding: 1px 7px;
            font-size: 0.72rem;
            font-weight: 500;
        }

        /* Barra de energia/shimmer de trabalho contínuo */
        .stepper-energy-track {
            width: 100%;
            height: 3px;
            background: rgba(255, 255, 255, 0.04);
            border-radius: 3px;
            overflow: hidden;
            position: relative;
            margin: 2px 0;
        }

        .stepper-energy-shimmer {
            display: none;
        }

        @keyframes energy-slide {
            0% { left: -50%; }
            100% { left: 120%; }
        }

        /* Terminal de Logs Opcional (Gaveta Recolhida) */
        .terminal-container {
            border: 1px solid rgba(255, 255, 255, 0.06);
            border-radius: 8px;
            background: #0d0f12;
            overflow: hidden;
            margin-top: 0.25rem;
            transition: all 0.3s ease;
        }

        .terminal-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 6px 12px;
            background: rgba(255, 255, 255, 0.03);
            border-bottom: 1px solid rgba(255, 255, 255, 0.04);
            font-size: 0.73rem;
            color: #94a3b8;
            cursor: pointer;
            user-select: none;
            transition: background 0.2s;
        }

        .terminal-header:hover {
            background: rgba(255, 255, 255, 0.06);
            color: #e2e8f0;
        }

        .terminal-body {
            max-height: 120px;
            overflow-y: auto;
            padding: 8px 12px;
            font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
            font-size: 0.76rem;
            line-height: 1.5;
            color: #94a3b8;
            display: flex;
            flex-direction: column;
            gap: 2px;
            background: #090a0c;
        }

        .terminal-line {
            word-break: break-all;
            white-space: pre-wrap;
        }

        .terminal-line .t-time {
            color: #475569;
            margin-right: 6px;
        }

        .terminal-line.t-err {
            color: #f87171;
        }

        .terminal-line.t-tool {
            color: #38bdf8;
            font-weight: 500;
        }

        .stepper-footer {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding-top: 0.4rem;
            border-top: 1px solid rgba(255, 255, 255, 0.05);
        }

        .stepper-footer-left {
            display: flex;
            align-items: center;
            gap: 12px;
            flex-wrap: wrap;
        }

        .stepper-status-label {
            font-size: 0.82rem;
            color: #94a3b8;
        }

        .btn-toggle-dev-logs {
            background: none;
            border: none;
            color: #64748b;
            font-size: 0.75rem;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 2px 6px;
            border-radius: 4px;
            transition: all 0.2s;
        }

        .btn-toggle-dev-logs:hover {
            color: #94a3b8;
            background: rgba(255, 255, 255, 0.04);
        }

        .btn-abort-action {
            background: rgba(255, 255, 255, 0.04);
            border: 1px solid rgba(255, 255, 255, 0.08);
            color: #94a3b8;
            padding: 4px 12px;
            border-radius: 6px;
            font-size: 0.78rem;
            font-weight: 500;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 5px;
            transition: all 0.2s ease;
        }

        .btn-abort-action:hover {
            background: rgba(239, 68, 68, 0.15);
            color: #fca5a5;
            border-color: rgba(239, 68, 68, 0.3);
        }

        /* Fallback Legacy Loader */
        .gemini-loader {
            display: flex;
            align-items: center;
            gap: 12px;
            color: var(--primary);
            padding: 0.5rem 0;
        }
        
        .loader-dots {
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .loader-dots .dot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background-color: var(--primary);
            animation: dot-wave 1.4s infinite ease-in-out both;
        }

        .loader-dots .dot:nth-child(1) { animation-delay: -0.32s; }
        .loader-dots .dot:nth-child(2) { animation-delay: -0.16s; }
        .loader-dots .dot:nth-child(3) { animation-delay: 0s; }
        
        @keyframes dot-wave {
            0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
            40% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 8px rgba(168, 199, 250, 0.6); }
        }

        .profile-container {
            position: relative;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 0.45rem 0.55rem;
            border-radius: 8px;
            margin-top: auto;
            margin-bottom: 0.25rem;
            flex-shrink: 0;
            border-top: 1px solid rgba(255, 255, 255, 0.06);
        }
        
        .profile-container:hover {
            background-color: rgba(255, 255, 255, 0.05);
        }

        .profile-info {
            display: flex;
            flex-direction: column;
        }

        .profile-name {
            font-size: 0.82rem;
            font-weight: 500;
            color: var(--text-main);
        }

        .profile-badge {
            font-size: 0.70rem;
            color: var(--primary);
        }
        
        .profile-dropdown {
            display: none;
            position: absolute;
            left: 0;
            bottom: 58px;
            background: rgba(20, 21, 25, 0.98);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border: 1px solid rgba(255, 255, 255, 0.09);
            border-radius: 12px;
            width: 245px;
            padding: 7px;
            box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65);
            z-index: 1000;
            animation: profileDropdownFade 0.15s cubic-bezier(0.16, 1, 0.3, 1);
        }
        
        @keyframes profileDropdownFade {
            from { opacity: 0; transform: translateY(4px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        .profile-dropdown.show {
            display: block;
        }
        
        .profile-dropdown-header {
            padding: 5px 8px 4px;
            font-size: 0.67rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: #94a3b8;
            opacity: 0.85;
        }
        
        .profile-dropdown-item {
            padding: 0.48rem 0.65rem;
            color: #cbd5e1;
            text-decoration: none;
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 0.81rem;
            font-weight: 500;
            border-radius: 7px;
            cursor: pointer;
            transition: all 0.12s ease;
            user-select: none;
        }
        
        .profile-dropdown-item i {
            width: 18px;
            text-align: center;
            font-size: 0.84rem;
            color: #94a3b8;
            flex-shrink: 0;
            transition: color 0.12s ease;
        }
        
        .profile-dropdown-item:hover {
            background-color: rgba(255, 255, 255, 0.06);
            color: #ffffff;
        }

        .profile-dropdown-item:hover i {
            color: #f1f5f9;
        }

        .inner-subtabs-nav {
            display: flex;
            gap: 10px;
            border-bottom: 1px solid var(--border-color);
            margin-bottom: 1.5rem;
            padding-bottom: 0px;
        }

        .inner-subtab-btn {
            background: transparent;
            border: none;
            border-bottom: 2px solid transparent;
            color: var(--text-muted);
            padding: 10px 18px;
            font-size: 0.88rem;
            font-weight: 600;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            transition: all 0.2s ease;
            border-radius: 8px 8px 0 0;
        }

        .inner-subtab-btn:hover {
            color: var(--text-main);
            background: rgba(255, 255, 255, 0.03);
        }

        .inner-subtab-btn.active {
            color: var(--text-main);
            border-bottom-color: var(--primary);
            background: rgba(99, 102, 241, 0.08);
        }

        .project-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.35rem 0.55rem;
            color: var(--text-main);
            font-size: 0.81rem;
            font-weight: 500;
            cursor: pointer;
            border-radius: 8px;
            margin-top: 0.25rem;
            transition: background 0.15s;
        }

        .project-header:hover {
            background-color: rgba(255, 255, 255, 0.05);
        }

        .project-header.active-new-chat {
            border: 1px solid var(--primary);
            background-color: rgba(168, 199, 250, 0.05);
        }

        .project-header.drag-over {
            background-color: rgba(255, 255, 255, 0.15);
            border: 1px dashed var(--text-muted);
        }

        .project-header i.fa-chevron-right {
            transition: transform 0.2s;
            font-size: 0.70rem;
        }

        .project-header.open i.fa-chevron-right {
            transform: rotate(90deg);
        }

        .project-chats {
            display: none;
            padding-left: 0.5rem;
            margin-top: 0.1rem;
        }

        .project-chats.open {
            display: block;
        }

        .nav-label-container {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding-right: 0.5rem;
            margin-top: 0.25rem;
        }

        .btn-add-project {
            background: none;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            transition: color 0.2s;
            padding: 2px 4px;
        }

        .btn-add-project:hover {
            color: var(--text-main);
        }

        .chat-options {
            opacity: 0;
            transition: opacity 0.2s;
            background: none;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            padding: 2px 4px;
        }

        .nav-item:hover .chat-options, .project-header:hover .chat-options {
            opacity: 1;
        }

        /* Dropdown Menu Estilo Gemini */
        .kognvs-dropdown {
            position: absolute;
            background-color: #282a2c;
            border: 1px solid rgba(255, 255, 255, 0.15);
            border-radius: 8px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
            padding: 4px 0;
            min-width: 140px;
            z-index: 10000;
            display: none;
            flex-direction: column;
        }

        .kognvs-dropdown-item {
            background: none;
            border: none;
            color: var(--text-main);
            padding: 6px 12px;
            text-align: left;
            font-size: 0.80rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 8px;
            width: 100%;
            transition: background-color 0.15s;
        }

        .kognvs-dropdown-item:hover {
            background-color: rgba(255, 255, 255, 0.08);
        }

        .kognvs-dropdown-item i {
            font-size: 0.82rem;
            width: 14px;
            color: var(--text-muted);
        }

        #sidebar-chat-controls {
            display: flex !important;
            flex-direction: column;
            flex: 1 1 auto;
            min-height: 0;
            overflow: hidden;
        }

        #sidebar-chat-controls[style*="display: none"] {
            display: none !important;
        }

        #projects-container {
            flex: 1 1 auto;
            min-height: 0;
            overflow-y: auto !important;
            overflow-x: hidden;
            padding-right: 4px;
            padding-bottom: 2rem;
            /* Scrollbar suave e visível */
            scrollbar-width: thin;
            scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
        }
        
        #projects-container::-webkit-scrollbar {
            width: 4px;
        }
        #projects-container::-webkit-scrollbar-track {
            background: transparent;
        }
        #projects-container::-webkit-scrollbar-thumb {
            background-color: rgba(255, 255, 255, 0.15);
            border-radius: 4px;
        }
        #projects-container::-webkit-scrollbar-thumb:hover {
            background-color: rgba(255, 255, 255, 0.3);
        }

        .sidebar-divider {
            border: 0;
            height: 1px;
            background-color: var(--border-color);
            margin: 0.6rem 0;
        }

        /* =========================================================
           Multi-View Navigation & Module Tabs
           ========================================================= */
        .sidebar-nav-tabs {
            display: flex;
            flex-direction: column;
            gap: 2px;
            margin-bottom: 0.6rem;
            padding-bottom: 0.5rem;
            border-bottom: 1px solid var(--border-color);
            flex-shrink: 0;
        }

        .nav-tab-btn {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 0.42rem 0.7rem;
            border-radius: 8px;
            color: #cbd5e1;
            background: transparent;
            border: 1px solid transparent;
            font-size: 0.84rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.15s ease;
            text-align: left;
            width: 100%;
        }

        .nav-tab-btn:hover {
            background-color: rgba(255, 255, 255, 0.08);
            color: #ffffff;
        }

        .nav-tab-btn.active {
            background-color: rgba(255, 255, 255, 0.12);
            color: #ffffff;
            font-weight: 600;
            border-color: rgba(255, 255, 255, 0.15);
        }

        .nav-tab-btn i {
            font-size: 0.95rem;
            width: 18px;
            text-align: center;
            opacity: 0.95;
        }

        .nav-tab-badge {
            margin-left: auto;
            background: rgba(255, 255, 255, 0.08);
            color: #94a3b8;
            font-size: 0.7rem;
            padding: 1px 7px;
            border-radius: 9999px;
            font-weight: 600;
            font-family: var(--font-mono, monospace);
            line-height: 1.35;
            border: 1px solid rgba(255, 255, 255, 0.08);
            transition: all 0.15s ease;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 18px;
        }

        .nav-tab-btn:hover .nav-tab-badge,
        .nav-tab-btn.active .nav-tab-badge {
            background: rgba(255, 255, 255, 0.14);
            color: #f1f5f9;
            border-color: rgba(255, 255, 255, 0.16);
        }

        .nav-tab-badge.active-badge {
            background: rgba(255, 255, 255, 0.12);
            color: #f8fafc;
            border-color: rgba(255, 255, 255, 0.18);
        }

        .nav-tab-badge.badge-notif {
            background: rgba(56, 189, 248, 0.12);
            color: #38bdf8;
            border-color: rgba(56, 189, 248, 0.25);
        }

        .nav-tab-badge.badge-warning {
            background: rgba(245, 158, 11, 0.12);
            color: #fbbf24;
            border-color: rgba(245, 158, 11, 0.28);
        }

        /* Sub-Abas Pills */
        .subnav-pill-container {
            display: flex;
            align-items: center;
            gap: 8px;
            background: #0f1219;
            padding: 4px 6px;
            border-radius: 12px;
            border: 1px solid rgba(255, 255, 255, 0.14);
            width: fit-content;
            margin-bottom: 0.5rem;
        }

        .subnav-pill {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 0.5rem 1.05rem;
            border-radius: 8px;
            color: #cbd5e1;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            font-size: 0.85rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .subnav-pill:hover {
            color: #ffffff;
            background: rgba(255, 255, 255, 0.12);
            border-color: rgba(255, 255, 255, 0.25);
        }

        .subnav-pill.active {
            background: #2563eb;
            color: #ffffff;
            border-color: #60a5fa;
            font-weight: 700;
            box-shadow: 0 0 12px rgba(37, 99, 235, 0.45);
        }

        /* =========================================================
           Quadro de Operações & Atividades do Time (Live Feed)
           ========================================================= */
        .live-status-pill {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 4px 10px;
            background: rgba(34, 197, 94, 0.1);
            border: 1px solid rgba(34, 197, 94, 0.25);
            border-radius: 12px;
            color: #4ade80;
            font-size: 0.76rem;
            font-weight: 600;
            letter-spacing: 0.02em;
        }

        .live-dot-pulse {
            width: 7px;
            height: 7px;
            background: #22c55e;
            border-radius: 50%;
            box-shadow: 0 0 8px #22c55e;
            animation: pulseDot 1.8s infinite;
        }

        @keyframes pulseDot {
            0% { transform: scale(0.95); opacity: 0.7; }
            50% { transform: scale(1.3); opacity: 1; }
            100% { transform: scale(0.95); opacity: 0.7; }
        }

        .operacoes-filter-bar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 12px;
            background: #141720;
            border: 1px solid rgba(255, 255, 255, 0.14);
            border-radius: 12px;
            padding: 10px 16px;
            margin-bottom: 1.25rem;
        }

        .filter-group {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }

        .filter-select {
            background: #1c212c;
            border: 1px solid rgba(255, 255, 255, 0.18);
            color: #f8fafc;
            padding: 6px 12px;
            border-radius: 8px;
            font-size: 0.85rem;
            font-weight: 500;
            outline: none;
            cursor: pointer;
            transition: border-color 0.2s;
        }

        .filter-select option {
            background: #1c212c;
            color: #f8fafc;
        }

        .filter-select:focus {
            border-color: var(--primary);
            box-shadow: 0 0 8px rgba(56, 189, 248, 0.25);
        }

        .feed-timeline {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .feed-card {
            background: #1a1b1e;
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 12px;
            padding: 14px 18px;
            transition: all 0.2s ease;
            position: relative;
        }

        .feed-card:hover {
            border-color: rgba(255, 255, 255, 0.16);
            background: #1e1f23;
        }

        .feed-card-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 8px;
            margin-bottom: 8px;
        }

        .feed-card-badges {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }

        .agent-badge-pill {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 3px 10px;
            border-radius: 6px;
            font-size: 0.78rem;
            font-weight: 600;
            background: rgba(168, 199, 250, 0.12);
            color: #93c5fd;
            border: 1px solid rgba(168, 199, 250, 0.2);
        }

        .channel-badge-pill {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 3px 8px;
            border-radius: 6px;
            font-size: 0.72rem;
            font-weight: 500;
            background: rgba(255, 255, 255, 0.05);
            color: #94a3b8;
            border: 1px solid rgba(255, 255, 255, 0.08);
        }

        .feed-time-text {
            font-size: 0.75rem;
            color: #64748b;
        }

        .feed-card-body {
            font-size: 0.88rem;
            color: #e2e8f0;
            line-height: 1.45;
            margin-bottom: 10px;
        }

        .feed-card-footer {
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 8px;
            font-size: 0.75rem;
            color: #94a3b8;
            border-top: 1px solid rgba(255, 255, 255, 0.05);
            padding-top: 8px;
        }

        .tools-tags-container {
            display: flex;
            align-items: center;
            gap: 6px;
            flex-wrap: wrap;
        }

        .tool-tag {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 2px 7px;
            border-radius: 4px;
            background: rgba(255, 255, 255, 0.04);
            color: #cbd5e1;
            font-size: 0.7rem;
            border: 1px solid rgba(255, 255, 255, 0.06);
        }

        .feed-card-details-toggle {
            cursor: pointer;
            color: #38bdf8;
            font-weight: 500;
            background: none;
            border: none;
            font-size: 0.75rem;
            display: flex;
            align-items: center;
            gap: 4px;
            padding: 0;
        }

        .feed-card-details-drawer {
            display: none;
            margin-top: 10px;
            padding: 10px 14px;
            background: #141517;
            border-radius: 8px;
            border: 1px solid rgba(255, 255, 255, 0.06);
            font-size: 0.8rem;
            color: #cbd5e1;
            white-space: pre-wrap;
            max-height: 220px;
            overflow-y: auto;
        }

        .subtab-pane {
            display: none;
            flex-direction: column;
            gap: 2rem;
            animation: fadeIn 0.2s ease;
        }

        .subtab-pane.active {
            display: flex;
        }

        /* Container de Views */
        .content-view {
            display: none;
            width: 100%;
            height: 100%;
            flex-direction: column;
            overflow-y: auto;
            animation: fadeIn 0.25s ease;
        }

        .content-view.active {
            display: flex;
        }

        /* =========================================================
           Dashboard de Automações & Cofre (Pilar 5 e 6)
           ========================================================= */
        .dashboard-container {
            padding: 2rem 3rem;
            max-width: 1200px;
            width: 100%;
            margin: 0 auto;
            display: flex;
            flex-direction: column;
            gap: 2rem;
        }

        .view-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 1rem;
            border-bottom: 1px solid rgba(255, 255, 255, 0.08);
            padding-bottom: 1.5rem;
        }

        .view-header-left h2 {
            font-size: 1.6rem;
            font-weight: 600;
            color: var(--text-main);
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .view-header-left p {
            color: var(--text-muted);
            font-size: 0.95rem;
            margin-top: 4px;
        }

        /* Grid de Métricas */
        .metric-cards-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: 1.25rem;
            margin-bottom: 1.5rem;
        }

        .metric-card {
            background: linear-gradient(145deg, #181d28, #131720);
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: 14px;
            padding: 1.25rem 1.5rem;
            display: flex;
            flex-direction: column;
            gap: 6px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.3);
            transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
        }

        .metric-card:hover {
            transform: translateY(-2px);
            border-color: rgba(56, 189, 248, 0.4);
            box-shadow: 0 8px 25px rgba(0,0,0,0.45);
        }

        /* Team Room Layout (Operações) */
        .department-section {
            background: linear-gradient(to bottom right, rgba(30, 31, 34, 0.4), rgba(20, 21, 23, 0.2));
            border: 1px solid rgba(255, 255, 255, 0.05);
            border-radius: 20px;
            padding: 1.25rem 1.5rem;
        }

        .team-room-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
            gap: 1.25rem;
            margin-bottom: 2rem;
        }

        .team-member-card {
            background: linear-gradient(145deg, #18191c, #131416);
            border: 1px solid rgba(255, 255, 255, 0.05);
            border-radius: 16px;
            padding: 1.25rem;
            display: flex;
            align-items: center;
            gap: 1rem;
            box-shadow: 0 4px 15px rgba(0,0,0,0.15);
            transition: all 0.2s;
        }

        .team-member-card:hover {
            border-color: rgba(255, 255, 255, 0.1);
            background: linear-gradient(145deg, #1c1d21, #151619);
        }

        .member-avatar-wrapper {
            position: relative;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.4rem;
            font-weight: 600;
            color: white;
            flex-shrink: 0;
        }
        
        .member-avatar-wrapper img {
            width: 100%;
            height: 100%;
            border-radius: 50%;
            object-fit: cover;
        }

        .member-status-dot {
            position: absolute;
            bottom: 2px;
            right: 2px;
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background-color: #22c55e;
            border: 2px solid #131416;
        }
        
        .member-status-dot.idle {
            background-color: #eab308;
        }

        @keyframes pulse-green {
            0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
            70% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
            100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
        }

        .member-status-dot.active {
            animation: pulse-green 2s infinite;
        }

        .member-info {
            display: flex;
            flex-direction: column;
            gap: 3px;
        }

        .member-name {
            font-size: 0.95rem;
            font-weight: 600;
            color: var(--text-main);
        }

        .member-role {
            font-size: 0.75rem;
            color: #94a3b8;
            font-weight: 500;
        }

        .member-activity {
            font-size: 0.7rem;
            color: #64748b;
            margin-top: 4px;
        }
        
        /* Social Feed Layout */
        .social-feed-item {
            display: flex;
            gap: 1rem;
            padding: 1.5rem 0;
            border-bottom: 1px solid rgba(255,255,255,0.06);
            animation: fadeIn 0.3s ease;
        }
        
        .social-feed-item:last-child {
            border-bottom: none;
        }

        .feed-item-active-pulse {
            background: rgba(56, 189, 248, 0.04);
            border-radius: 12px;
            padding: 1rem !important;
            margin-bottom: 8px;
            border: 1px solid rgba(56, 189, 248, 0.25) !important;
            box-shadow: 0 0 15px rgba(56, 189, 248, 0.1);
        }
        
        .social-feed-avatar {
            width: 40px;
            height: 40px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.1rem;
            font-weight: 600;
            color: white;
            flex-shrink: 0;
            overflow: hidden;
            border: 1px solid rgba(255, 255, 255, 0.12);
        }

        .social-feed-avatar img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 11px;
        }
        
        .social-feed-content {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 6px;
        }
        
        .social-feed-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .social-feed-author {
            font-size: 0.9rem;
            font-weight: 600;
            color: var(--text-main);
        }
        
        .social-feed-time {
            font-size: 0.75rem;
            color: #64748b;
        }
        
        .social-feed-action {
            font-size: 0.85rem;
            color: #cbd5e1;
            line-height: 1.4;
            background: rgba(255,255,255,0.03);
            padding: 12px 16px;
            border-radius: 0 12px 12px 12px;
            border: 1px solid rgba(255,255,255,0.05);
            display: inline-block;
            margin-top: 4px;
        }
        
        .social-feed-footer {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-top: 8px;
        }

        .metric-card .m-title {
            font-size: 0.82rem;
            color: #cbd5e1;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .metric-card .m-value {
            font-size: 2rem;
            font-weight: 800;
            color: #ffffff;
            line-height: 1.15;
            margin: 2px 0;
        }

        .metric-card .m-sub {
            font-size: 0.82rem;
            color: #cbd5e1;
            font-weight: 500;
            line-height: 1.35;
        }

        /* Seções e Tabelas */
        .section-card {
            background: #18191b;
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 14px;
            overflow: hidden;
            box-shadow: 0 6px 25px rgba(0,0,0,0.25);
        }

        .section-card-header {
            padding: 1.25rem 1.5rem;
            background: #1f2023;
            border-bottom: 1px solid rgba(255, 255, 255, 0.06);
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .section-card-header h3 {
            font-size: 1.1rem;
            font-weight: 600;
            color: var(--text-main);
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .modern-table {
            width: 100%;
            border-collapse: collapse;
            text-align: left;
            font-size: 0.9rem;
        }

        .modern-table th {
            padding: 0.9rem 1.25rem;
            background: rgba(0, 0, 0, 0.2);
            color: var(--text-muted);
            font-weight: 500;
            font-size: 0.8rem;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        }

        .modern-table td {
            padding: 1rem 1.25rem;
            border-bottom: 1px solid rgba(255, 255, 255, 0.04);
            color: var(--text-main);
            vertical-align: middle;
        }

        .modern-table tr:hover td {
            background-color: rgba(255, 255, 255, 0.02);
        }

        .badge-cron {
            background: rgba(168, 199, 250, 0.1);
            color: var(--primary);
            border: 1px solid rgba(168, 199, 250, 0.25);
            padding: 2px 8px;
            border-radius: 6px;
            font-family: 'Consolas', monospace;
            font-size: 0.8rem;
        }

        .badge-status {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 3px 10px;
            border-radius: 12px;
            font-size: 0.78rem;
            font-weight: 500;
        }
        .status-sucesso { background: rgba(34, 197, 94, 0.12); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.25); }
        .status-erro { background: rgba(239, 68, 68, 0.12); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.25); }
        .status-executando { background: rgba(56, 189, 248, 0.12); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.25); }
        .status-pendente { background: rgba(148, 163, 184, 0.12); color: #94a3b8; border: 1px solid rgba(148, 163, 184, 0.25); }

        /* Switch Toggle */
        .switch {
            position: relative;
            display: inline-block;
            width: 40px;
            height: 22px;
        }
        .switch input { opacity: 0; width: 0; height: 0; }
        .slider {
            position: absolute;
            cursor: pointer;
            top: 0; left: 0; right: 0; bottom: 0;
            background-color: #374151;
            transition: .3s;
            border-radius: 22px;
        }
        .slider:before {
            position: absolute;
            content: "";
            height: 16px; width: 16px;
            left: 3px; bottom: 3px;
            background-color: white;
            transition: .3s;
            border-radius: 50%;
        }
        input:checked + .slider { background-color: #3b82f6; }
        input:checked + .slider:before { transform: translateX(18px); }

        /* Botões de Ação */
        .btn-primary-action {
            background: #4285f4;
            color: white;
            border: none;
            padding: 0.65rem 1.25rem;
            border-radius: 8px;
            font-weight: 500;
            font-size: 0.9rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 8px;
            transition: background 0.2s, transform 0.1s;
        }
        .btn-primary-action:hover { background: #3367d6; transform: translateY(-1px); }

        .btn-table-action {
            background: rgba(255, 255, 255, 0.08);
            border: 1px solid rgba(255, 255, 255, 0.16);
            color: #e2e8f0;
            padding: 5px 12px;
            border-radius: 6px;
            font-size: 0.82rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }
        .btn-table-action:hover {
            background: rgba(255, 255, 255, 0.18);
            color: #ffffff;
            border-color: rgba(255, 255, 255, 0.3);
        }
        .btn-table-action.btn-del:hover {
            background: rgba(239, 68, 68, 0.25);
            color: #fca5a5;
            border-color: rgba(239, 68, 68, 0.5);
        }

        /* Formulários do Cofre de Configurações */
        .form-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
            gap: 1.5rem;
            padding: 1.5rem;
        }

        .form-group {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .form-label {
            font-size: 0.85rem;
            font-weight: 500;
            color: var(--text-muted);
        }

        .form-input-wrap {
            position: relative;
            display: flex;
            align-items: center;
        }

        .form-input {
            width: 100%;
            background: #101113;
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 8px;
            padding: 0.65rem 0.9rem;
            color: var(--text-main);
            font-size: 0.9rem;
            outline: none;
            transition: border-color 0.2s;
        }

        .form-input:focus {
            border-color: #4285f4;
        }

        .btn-eye-toggle {
            position: absolute;
            right: 10px;
            background: none;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            padding: 4px;
        }

        /* Modais */
        .modal-backdrop {
            display: none;
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(0, 0, 0, 0.7);
            backdrop-filter: blur(4px);
            z-index: 99999;
            align-items: center;
            justify-content: center;
        }
        .modal-backdrop.show, .modal-backdrop.active {
            display: flex !important;
        }

        .modal-box {
            background: #181d28;
            border: 1px solid rgba(255, 255, 255, 0.16);
            border-radius: 16px;
            width: 90%;
            max-width: 580px;
            box-shadow: 0 20px 60px rgba(0,0,0,0.7);
            overflow: hidden;
            animation: slideUp 0.25s ease;
        }

        .modal-header {
            padding: 1.25rem 1.5rem;
            background: #131720;
            border-bottom: 1px solid rgba(255, 255, 255, 0.12);
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .modal-body {
            padding: 1.5rem;
            display: flex;
            flex-direction: column;
            gap: 1.25rem;
            max-height: 70vh;
            overflow-y: auto;
        }

        .modal-footer {
            padding: 1rem 1.5rem;
            background: #131720;
            border-top: 1px solid rgba(255, 255, 255, 0.12);
            display: flex;
            justify-content: flex-end;
            gap: 10px;
        }

        /* Scrollbar */
        ::-webkit-scrollbar { width: 6px; }
        ::-webkit-scrollbar-track { background: transparent; }
        ::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 10px; }
        ::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.3); }

        /* Estilos do Modal de Projeto & Assets */
        .proj-tab-btn {
            background: none;
            border: none;
            color: var(--text-muted);
            padding: 12px 16px;
            font-size: 0.85rem;
            font-weight: 500;
            cursor: pointer;
            border-bottom: 2px solid transparent;
            display: flex;
            align-items: center;
            gap: 6px;
            transition: all 0.2s;
        }
        .proj-tab-btn:hover {
            color: var(--text-main);
        }
        .proj-tab-btn.active {
            color: #818cf8;
            border-bottom-color: #818cf8;
        }
        .proj-asset-card {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 10px 14px;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.06);
            border-radius: 10px;
            transition: background 0.2s;
        }
        .proj-asset-card:hover {
            background: rgba(255, 255, 255, 0.06);
        }
        .proj-chat-card {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 10px 14px;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.06);
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.2s;
        }
        .proj-chat-card:hover {
            background: rgba(99, 102, 241, 0.1);
            border-color: rgba(99, 102, 241, 0.3);
        }

        /* =========================================================
           Cofre de Conexões & Integrações
           ========================================================= */
        .connections-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
            gap: 1.5rem;
            margin-top: 1rem;
        }

        .connection-card {
            background: #1e1f20;
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 16px;
            padding: 1.5rem;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            transition: all 0.25s ease;
            position: relative;
            overflow: hidden;
        }

        .connection-card:hover {
            border-color: rgba(255, 255, 255, 0.18);
            transform: translateY(-2px);
            box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
        }

        .connection-card-header {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 12px;
            margin-bottom: 1rem;
        }

        .connection-icon-wrap {
            width: 48px;
            height: 48px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
            flex-shrink: 0;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        .connection-info-title {
            font-size: 1.05rem;
            font-weight: 600;
            color: var(--text-main);
            margin-bottom: 2px;
        }

        .connection-info-desc {
            font-size: 0.82rem;
            color: var(--text-muted);
            line-height: 1.4;
        }

        .conn-status-badge {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 4px 10px;
            border-radius: 20px;
            font-size: 0.75rem;
            font-weight: 600;
            letter-spacing: 0.3px;
        }

        .conn-status-badge.conectado {
            background: rgba(16, 185, 129, 0.12);
            color: #34d399;
            border: 1px solid rgba(16, 185, 129, 0.3);
        }

        .conn-status-badge.desconectado {
            background: rgba(148, 163, 184, 0.1);
            color: #94a3b8;
            border: 1px solid rgba(148, 163, 184, 0.2);
        }

        .conn-status-badge.erro {
            background: rgba(239, 68, 68, 0.12);
            color: #f87171;
            border: 1px solid rgba(239, 68, 68, 0.3);
        }

        .conn-status-badge.pausado {
            background: rgba(245, 158, 11, 0.12);
            color: #fbbf24;
            border: 1px solid rgba(245, 158, 11, 0.3);
        }

        .connection-details-box {
            background: rgba(0, 0, 0, 0.25);
            border-radius: 10px;
            padding: 10px 12px;
            margin: 1rem 0;
            border: 1px solid rgba(255, 255, 255, 0.05);
            font-size: 0.8rem;
            color: var(--text-muted);
        }

        .connection-details-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 3px 0;
        }

        .connection-details-row span.val {
            color: var(--text-main);
            font-family: monospace;
            font-size: 0.8rem;
        }

        .connection-card-actions {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-top: auto;
            padding-top: 0.8rem;
            border-top: 1px solid rgba(255, 255, 255, 0.06);
        }

        .filter-pill {
            padding: 6px 12px;
            border-radius: 8px;
            background: transparent;
            color: var(--text-muted);
            border: 1px solid transparent;
            font-size: 0.82rem;
            cursor: pointer;
            transition: all 0.2s;
        }

        .filter-pill:hover {
            color: var(--text-main);
            background: rgba(255, 255, 255, 0.05);
        }

        .filter-pill.active {
            background: rgba(56, 189, 248, 0.15);
            color: #38bdf8;
            border-color: rgba(56, 189, 248, 0.3);
            font-weight: 600;
        }

        /* Catálogo Superior de Integrações Disponíveis */
        .catalog-integrations-section {
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(20, 21, 24, 0.8) 100%);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 16px;
            padding: 1.25rem 1.5rem;
            margin-bottom: 2rem;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
        }

        .catalog-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1rem;
            flex-wrap: wrap;
            gap: 10px;
        }

        .catalog-title {
            font-size: 0.98rem;
            font-weight: 600;
            color: var(--text-main);
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .catalog-subtitle {
            font-size: 0.78rem;
            color: var(--text-muted);
            margin-top: 2px;
        }

        .catalog-items-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
            gap: 10px;
        }

        .catalog-item-btn {
            background: rgba(255, 255, 255, 0.02);
            border: 1px solid rgba(255, 255, 255, 0.06);
            border-radius: 12px;
            padding: 12px 10px;
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
            gap: 8px;
            cursor: pointer;
            transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            user-select: none;
            color: inherit;
        }

        .catalog-item-btn:hover {
            transform: translateY(-3px);
            background: rgba(255, 255, 255, 0.06);
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
        }

        .catalog-item-icon {
            width: 44px;
            height: 44px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.35rem;
            transition: transform 0.2s ease;
        }

        .catalog-item-btn:hover .catalog-item-icon {
            transform: scale(1.08);
        }

        .catalog-item-name {
            font-size: 0.82rem;
            font-weight: 600;
            color: var(--text-main);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 100%;
        }

        .catalog-item-badge {
            font-size: 0.68rem;
            padding: 2px 7px;
            border-radius: 6px;
            background: rgba(255, 255, 255, 0.05);
            color: var(--text-muted);
            border: 1px solid rgba(255, 255, 255, 0.08);
            font-weight: 500;
            transition: all 0.2s;
        }

        .catalog-item-btn:hover .catalog-item-badge {
            background: rgba(56, 189, 248, 0.15);
            color: #38bdf8;
            border-color: rgba(56, 189, 248, 0.3);
        }

        .configured-section-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1rem;
            flex-wrap: wrap;
            gap: 12px;
        }

        .configured-section-title {
            font-size: 1.1rem;
            font-weight: 700;
            color: var(--text-main);
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .configured-count-pill {
            font-size: 0.75rem;
            font-weight: 600;
            padding: 3px 9px;
            border-radius: 12px;
            background: rgba(168, 85, 247, 0.15);
            color: #c084fc;
            border: 1px solid rgba(168, 85, 247, 0.3);
        }

        /* Badges de Governança, Acesso e Expiração */
        .governance-badges-row {
            display: flex;
            align-items: center;
            gap: 6px;
            flex-wrap: wrap;
            margin-top: 6px;
        }

        .access-pill {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            font-size: 0.7rem;
            font-weight: 600;
            padding: 2px 8px;
            border-radius: 6px;
            background: rgba(56, 189, 248, 0.1);
            color: #38bdf8;
            border: 1px solid rgba(56, 189, 248, 0.25);
        }

        .expire-pill {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            font-size: 0.7rem;
            font-weight: 600;
            padding: 2px 8px;
            border-radius: 6px;
        }

        .expire-pill.eterno {
            background: rgba(16, 185, 129, 0.1);
            color: #34d399;
            border: 1px solid rgba(16, 185, 129, 0.25);
        }

        .expire-pill.valido {
            background: rgba(56, 189, 248, 0.1);
            color: #60a5fa;
            border: 1px solid rgba(56, 189, 248, 0.25);
        }

        .expire-pill.expirando {
            background: rgba(245, 158, 11, 0.12);
            color: #fbbf24;
            border: 1px solid rgba(245, 158, 11, 0.3);
        }

        .expire-pill.expirado {
            background: rgba(239, 68, 68, 0.15);
            color: #f87171;
            border: 1px solid rgba(239, 68, 68, 0.35);
        }

        .conn-usecase-row {
            margin-top: 8px;
            padding: 6px 10px;
            background: rgba(0, 0, 0, 0.25);
            border-radius: 8px;
            border: 1px dashed rgba(255, 255, 255, 0.08);
            font-size: 0.76rem;
            color: #cbd5e1;
            display: flex;
            align-items: flex-start;
            gap: 6px;
            line-height: 1.35;
        }

        .governance-section-box {
            background: rgba(255, 255, 255, 0.02);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 12px;
            padding: 14px;
            margin-top: 14px;
        }

        /* Agentes Vivos / Rotinas Contínuas Cards */
        .rotina-viva-card {
            background: #1e1f20;
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 14px;
            padding: 1.25rem;
            margin-bottom: 1rem;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
        }

        .rotina-viva-card:hover {
            border-color: rgba(255, 255, 255, 0.18);
            background: #232427;
        }

        .rotina-viva-left {
            display: flex;
            align-items: center;
            gap: 14px;
            flex: 1;
        }

        .rotina-viva-icon {
            width: 44px;
            height: 44px;
            border-radius: 10px;
            background: rgba(99, 102, 241, 0.12);
            color: #818cf8;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.25rem;
            flex-shrink: 0;
            border: 1px solid rgba(99, 102, 241, 0.25);
        }

        .rotina-viva-title {
            font-weight: 600;
            color: var(--text-main);
            font-size: 0.98rem;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .rotina-viva-desc {
            font-size: 0.83rem;
            color: var(--text-muted);
            margin-top: 2px;
            line-height: 1.4;
        }

        /* =========================================================
           Ações Executivas & Botões Padronizados
           ========================================================= */
        .requires-builder-mode {
            display: inline-flex !important;
        }

        .requires-builder-mode.block {
            display: block !important;
        }

        .requires-builder-mode.flex {
            display: flex !important;
        }

/* File Explorer (Central de Entregáveis) */
.file-explorer-sidebar {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}
.file-explorer-main {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

/* Tree Nodes */
.tree-node-header {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    cursor: pointer;
    border-radius: 6px;
    margin: 2px 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: all 0.2s;
}
.tree-node-header:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-main);
}
.tree-node-header.active {
    background: rgba(129, 140, 248, 0.15);
    color: #818cf8;
    font-weight: 500;
}
.tree-node-header.active i {
    color: #818cf8 !important;
}
.tree-node-children {
    padding-left: 20px;
    display: none;
}
.tree-node-children.open {
    display: block;
}

/* =========================================================
   Windows Explorer Style File Manager (Clean, Compact, Modern)
   ========================================================= */

.file-explorer-container {
    background: #13151a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.file-explorer-sidebar {
    width: 250px;
    background: #16181d;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
}

.file-explorer-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #111317;
    min-width: 0;
}

/* Tree Navigation */
.tree-node-header {
    display: flex;
    align-items: center;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 6px;
    margin: 1px 6px;
    font-size: 0.82rem;
    color: #94a3b8;
    transition: background 0.15s, color 0.15s;
    user-select: none;
}
.tree-node-header:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #f1f5f9;
}
.tree-node-header.active {
    background: rgba(56, 189, 248, 0.12);
    color: #38bdf8;
    font-weight: 500;
}
.tree-node-header.active i {
    color: #38bdf8 !important;
}

/* Explorer Grid View - Windows Explorer Desktop / Folder Layout */
.explorer-content-area.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, 100px);
    grid-auto-rows: max-content;
    gap: 8px 10px;
    padding: 1.2rem;
    align-content: start;
    justify-content: start;
}

.file-grid-item {
    position: relative;
    width: 100px;
    min-height: 105px;
    padding: 8px 6px 6px 6px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    transition: background 0.15s, border-color 0.15s;
    user-select: none;
}

.file-grid-item:hover, .file-grid-item.selected {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}

.file-grid-icon {
    font-size: 2.75rem;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    transition: transform 0.15s;
}

.file-grid-item:hover .file-grid-icon {
    transform: scale(1.04);
}

.file-grid-name {
    font-size: 0.78rem;
    line-height: 1.25;
    font-weight: 400;
    color: #f1f5f9;
    text-align: center;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 100%;
}

/* 3-dots Menu Button on item */
.file-item-more-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 4px;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: #94a3b8;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s, background 0.15s, color 0.15s;
    z-index: 5;
}

.file-grid-item:hover .file-item-more-btn,
.file-list-item:hover .file-item-more-btn,
.file-item-more-btn.active {
    opacity: 1;
}

.file-item-more-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* =========================================================
   macOS Finder Tree View & Collapsible Sidebar Styles
   ========================================================= */

/* Sidebar Section Headers (Collapsible) */
.explorer-sidebar-section {
    margin-bottom: 8px;
}

.explorer-sidebar-section-header {
    padding: 6px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    user-select: none;
    border-radius: 6px;
    margin: 2px 6px;
    transition: background 0.15s, color 0.15s;
}

.explorer-sidebar-section-header:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #94a3b8;
}

.sidebar-section-chevron {
    font-size: 0.65rem;
    color: #64748b;
    transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-section-chevron.expanded {
    transform: rotate(90deg);
    color: #94a3b8;
}

.sidebar-folder-chevron {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.62rem;
    color: #64748b;
    cursor: pointer;
    margin-right: 4px;
    transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1), color 0.15s;
    border-radius: 3px;
    flex-shrink: 0;
}

.sidebar-folder-chevron:hover {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.15);
}

.sidebar-folder-chevron.expanded {
    transform: rotate(90deg);
    color: #f59e0b;
}

/* Finder Tree List View */
.explorer-content-area.file-list-view {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 0.4rem 0.8rem 1.5rem 0.8rem;
}

.file-list-header-row {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    font-size: 0.74rem;
    font-weight: 600;
    color: #64748b;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    user-select: none;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    position: sticky;
    top: 0;
    background: #111317;
    z-index: 5;
}

.file-list-item {
    display: flex;
    align-items: center;
    padding: 5px 10px;
    background: transparent;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.12s ease-out, border-color 0.12s ease-out;
    user-select: none;
    position: relative;
}

.file-list-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.06);
}

.file-list-item.selected {
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.25);
}

.finder-chevron-btn {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    color: #64748b;
    cursor: pointer;
    margin-right: 4px;
    border-radius: 4px;
    flex-shrink: 0;
    transition: background 0.15s;
}

.finder-chevron-btn:hover {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.18);
}

.finder-chevron-btn i {
    transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

.finder-chevron-btn.expanded i {
    transform: rotate(90deg);
    color: #f59e0b;
}

.finder-chevron-spacer {
    width: 18px;
    margin-right: 4px;
    flex-shrink: 0;
    display: inline-block;
}

.finder-empty-subfolder {
    padding: 4px 10px 4px 36px;
    font-size: 0.72rem;
    color: #475569;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}

.file-list-col-name {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.file-list-col-name .file-list-name {
    font-size: 0.82rem;
    color: #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-list-col-date {
    width: 140px;
    font-size: 0.76rem;
    color: #94a3b8;
    flex-shrink: 0;
}

.file-list-col-type {
    width: 130px;
    font-size: 0.76rem;
    color: #94a3b8;
    flex-shrink: 0;
}

.file-list-col-size {
    width: 90px;
    text-align: right;
    font-size: 0.76rem;
    color: #94a3b8;
    padding-right: 10px;
    flex-shrink: 0;
}

.file-list-col-actions {
    width: 32px;
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
}

/* Dropdown Context Menu */
.file-context-menu {
    position: fixed;
    background: #1a1d24;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
    padding: 4px;
    z-index: 99999;
    min-width: 170px;
    backdrop-filter: blur(12px);
    display: none;
    animation: ctxFadeIn 0.12s ease-out;
}

@keyframes ctxFadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.file-context-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 12px;
    font-size: 0.80rem;
    color: #cbd5e1;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
    user-select: none;
}

.file-context-menu-item i {
    width: 16px;
    text-align: center;
    font-size: 0.82rem;
    color: #94a3b8;
}

.file-context-menu-item:hover {
    background: rgba(56, 189, 248, 0.15);
    color: #ffffff;
}

.file-context-menu-item:hover i {
    color: #38bdf8;
}

.file-context-menu-item.danger:hover {
    background: rgba(239, 68, 68, 0.18);
    color: #fca5a5;
}

.file-context-menu-item.danger:hover i {
    color: #ef4444;
}

.file-context-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 4px 0;
}

/* Explorer Status Bar (Windows Style) */
.file-explorer-statusbar {
    padding: 6px 14px;
    background: rgba(0, 0, 0, 0.25);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.74rem;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.view-btn.active {
    background: rgba(255,255,255,0.1) !important;
    color: var(--text-main) !important;
}

/* =========================================================
   DRAG & DROP NATIVO (ESTILO WINDOWS EXPLORER / GOOGLE DRIVE)
   ========================================================= */

.file-grid-item,
.file-list-item {
    cursor: grab;
    user-select: none;
    -webkit-user-drag: element;
}

.file-grid-item:active,
.file-list-item:active {
    cursor: grabbing;
}

/* Item sendo arrastado */
.file-grid-item.dragging,
.file-list-item.dragging {
    opacity: 0.35 !important;
    transform: scale(0.92) !important;
    filter: grayscale(40%) brightness(1.2) !important;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.5) !important;
}

/* Quando o usuário está arrastando um item, os filhos internos não interceptam eventos de mouse */
body.is-dragging-explorer-item .file-grid-item *,
body.is-dragging-explorer-item .file-list-item *,
body.is-dragging-explorer-item .tree-node-header *,
body.is-dragging-explorer-item .breadcrumb-drop-target * {
    pointer-events: none !important;
}

body.is-dragging-explorer-item .file-item-more-btn {
    display: none !important;
}

/* Pasta destino ao passar item por cima (Sem Flicker) */
.file-grid-item.drag-over-target,
.file-list-item.drag-over-target {
    background: rgba(245, 158, 11, 0.25) !important;
    border-radius: 10px !important;
    box-shadow: 0 0 0 2px #f59e0b, 0 8px 24px rgba(245, 158, 11, 0.45) !important;
    transform: scale(1.06) !important;
    transition: transform 0.12s ease-out, background 0.12s ease-out, box-shadow 0.12s ease-out !important;
    z-index: 10;
}

.file-grid-item.drag-over-target .file-grid-icon i,
.file-list-item.drag-over-target .file-list-col-name i {
    transform: scale(1.18);
    color: #fbbf24 !important;
    transition: transform 0.12s ease-out;
}

.file-grid-item.drag-over-target .file-grid-name,
.file-list-item.drag-over-target .file-list-name {
    color: #ffffff !important;
    font-weight: 700 !important;
}

/* Nós da Árvore Lateral como alvo de soltura */
.tree-node-header.drag-over-target {
    background: rgba(245, 158, 11, 0.28) !important;
    color: #fbbf24 !important;
    border-radius: 6px;
    box-shadow: inset 0 0 0 2px #f59e0b, 0 4px 12px rgba(245, 158, 11, 0.3) !important;
    padding-left: calc(var(--pad-left, 10px) + 3px);
}

.tree-node-header.drag-over-target i {
    color: #fbbf24 !important;
    transform: scale(1.15);
}

/* Segmentos do Breadcrumb como alvo de soltura */
.breadcrumb-drop-target.drag-over-target {
    background: rgba(245, 158, 11, 0.3) !important;
    color: #fbbf24 !important;
    padding: 3px 8px;
    border-radius: 6px;
    box-shadow: 0 0 0 1.5px #f59e0b;
}

/* Overlay de Upload Direto do Computador / Windows Desktop */
.explorer-dropzone-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 15, 29, 0.88);
    border: 2px dashed #38bdf8;
    border-radius: 10px;
    z-index: 999;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #38bdf8;
    pointer-events: none;
    backdrop-filter: blur(6px);
    animation: fadeInDropzone 0.15s ease-out;
}

@keyframes fadeInDropzone {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

.explorer-dropzone-overlay i {
    font-size: 3.2rem;
    animation: bounceDropIcon 1.2s infinite ease-in-out;
}

@keyframes bounceDropIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* =========================================================
   MATRIZ DE SUPERPODERES & CAPACIDADES DOS AGENTES
   ========================================================= */

.capacidade-card {
    background: #18191b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
    overflow: hidden;
}

.capacidade-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 255, 255, 0.16);
}

.cap-card-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.cap-icon-wrapper {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.cap-header-info {
    flex: 1;
    min-width: 0;
}

.cap-cat-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 2px;
}

.cap-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.3;
    margin: 0;
}

.cap-status-pill {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.cap-description {
    font-size: 0.84rem;
    color: #94a3b8;
    line-height: 1.45;
    margin: 0;
}

.cap-meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.78rem;
}

.cap-meta-label {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.76rem;
}

.cap-agents-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.cap-agent-badge {
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.25);
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 0.73rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.cap-origin-badge {
    background: rgba(255, 255, 255, 0.04);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 0.73rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.cap-prompts-accordion {
    margin-top: 6px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.cap-prompts-accordion:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.cap-accordion-toggle {
    width: 100%;
    background: transparent;
    border: none;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-main);
    font-size: 0.78rem;
    cursor: pointer;
    transition: background 0.2s ease;
    text-align: left;
}

.cap-accordion-toggle:hover {
    background: rgba(255, 255, 255, 0.04);
}

.cap-accordion-badge {
    background: rgba(56, 189, 248, 0.12);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.25);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 600;
}

.cap-accordion-icon {
    font-size: 0.72rem;
    color: var(--text-muted);
    transition: transform 0.25s ease;
    margin-left: 2px;
}

.cap-accordion-icon.open {
    transform: rotate(180deg);
    color: var(--primary);
}

.cap-accordion-body {
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: 8px 10px 10px 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.18);
}

.cap-accordion-body.open {
    display: flex;
}

.cap-prompt-box {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: border-color 0.2s;
}

.cap-prompt-box:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.cap-prompt-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #cbd5e1;
    font-weight: 600;
}

.cap-prompt-text {
    font-size: 0.78rem;
    color: #94a3b8;
    font-style: italic;
    line-height: 1.35;
}

.btn-cap-use-prompt {
    background: rgba(236, 72, 153, 0.12);
    color: #f472b6;
    border: 1px solid rgba(236, 72, 153, 0.3);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.btn-cap-use-prompt:hover {
    background: #ec4899;
    color: #ffffff;
    border-color: #ec4899;
    transform: scale(1.03);
}

/* =========================================================
   AUTOMAÇÕES COMPLEXAS & PLAYBOOKS TREINADOS (MACRO-WORKFLOWS)
   ========================================================= */

.playbook-card {
    background: linear-gradient(145deg, #161a24, #0f121a);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 16px;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
    transition: all 0.25s ease;
}

.playbook-card:hover {
    border-color: rgba(245, 158, 11, 0.45);
    box-shadow: 0 14px 40px rgba(245, 158, 11, 0.12);
}

.playbook-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
    flex-wrap: wrap;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    padding-bottom: 1.25rem;
}

.playbook-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 280px;
}

.playbook-icon-wrapper {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.playbook-dept-tag {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #f59e0b;
    font-weight: 700;
    margin-bottom: 3px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.playbook-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 4px 0;
    line-height: 1.25;
}

.playbook-sub {
    font-size: 0.86rem;
    color: var(--text-muted);
    margin: 0;
}

.playbook-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 0.78rem;
    font-weight: 700;
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.playbook-overview {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.15rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.playbook-desc-text {
    font-size: 0.9rem;
    color: #cbd5e1;
    line-height: 1.55;
    margin: 0;
}

.playbook-meta-strip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.8rem;
}

.playbook-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
}

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

.playbook-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #cbd5e1;
}

.playbook-steps-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.playbook-step-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    transition: all 0.2s ease;
}

.playbook-step-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(245, 158, 11, 0.35);
    transform: translateY(-2px);
}

.step-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.step-num-pill {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #f59e0b;
    color: #000000;
    font-weight: 800;
    font-size: 0.72rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.step-card-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
    margin: 0;
    line-height: 1.3;
}

.step-card-desc {
    font-size: 0.8rem;
    color: #94a3b8;
    line-height: 1.45;
    margin: 0;
    flex: 1;
}

.step-tools-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.step-tool-badge {
    background: rgba(56, 189, 248, 0.08);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.step-output-box {
    background: rgba(0, 0, 0, 0.25);
    border-left: 2px solid #10b981;
    padding: 4px 8px;
    border-radius: 0 4px 4px 0;
    font-size: 0.72rem;
    color: #a7f3d0;
    margin-top: 4px;
}

.playbook-actions-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.btn-playbook-primary {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #000000;
    font-weight: 700;
    font-size: 0.88rem;
    padding: 10px 18px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.btn-playbook-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45);
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

/* =========================================================
   CENTRAL DE NOTIFICAÇÕES & MENSAGERIA DOS AGENTES
   ========================================================= */

.notif-card {
    background: linear-gradient(145deg, #181d28, #131620);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    padding: 1.25rem 1.35rem;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    transition: all 0.2s ease;
    position: relative;
    border-left: 4px solid #38bdf8;
}

.notif-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.24);
}

.notif-card.notif-unread {
    background: linear-gradient(145deg, #1d2332, #161922);
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 15px rgba(245, 158, 11, 0.1);
}

.notif-card.type-urgente { border-left-color: #ef4444; }
.notif-card.type-aprovacao { border-left-color: #f59e0b; }
.notif-card.type-pergunta { border-left-color: #06b6d4; }
.notif-card.type-lembrete { border-left-color: #a855f7; }
.notif-card.type-sucesso { border-left-color: #10b981; }
.notif-card.type-relatorio { border-left-color: #38bdf8; }
.notif-card.type-info { border-left-color: #818cf8; }

.notif-card-pending-action {
    border-color: rgba(245, 158, 11, 0.45);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), #181d28 45%);
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.12);
}

.notif-card-pending-action:hover {
    border-color: rgba(245, 158, 11, 0.7);
    box-shadow: 0 8px 30px rgba(245, 158, 11, 0.22);
}

.notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.notif-agent-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.notif-agent-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.25);
}

.notif-agent-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #ffffff;
}

.notif-badges-group {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.76rem;
    flex-wrap: wrap;
}

.notif-type-pill {
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
}

.notif-type-pill.type-urgente { background: rgba(239, 68, 68, 0.22); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.45); }
.notif-type-pill.type-aprovacao { background: rgba(245, 158, 11, 0.22); color: #fde68a; border: 1px solid rgba(245, 158, 11, 0.45); }
.notif-type-pill.type-pergunta { background: rgba(6, 182, 212, 0.22); color: #a5f3fc; border: 1px solid rgba(6, 182, 212, 0.45); }
.notif-type-pill.type-lembrete { background: rgba(168, 85, 247, 0.22); color: #f3e8ff; border: 1px solid rgba(168, 85, 247, 0.45); }
.notif-type-pill.type-sucesso { background: rgba(16, 185, 129, 0.22); color: #bbf7d0; border: 1px solid rgba(16, 185, 129, 0.45); }
.notif-type-pill.type-relatorio { background: rgba(56, 189, 248, 0.22); color: #bae6fd; border: 1px solid rgba(56, 189, 248, 0.45); }
.notif-type-pill.type-info { background: rgba(129, 140, 248, 0.22); color: #c7d2fe; border: 1px solid rgba(129, 140, 248, 0.45); }

.notif-status-pill {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.74rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.notif-status-pill.pending { background: rgba(245, 158, 11, 0.25); color: #fef08a; border: 1px solid rgba(245, 158, 11, 0.6); animation: pulseSoft 2s infinite ease-in-out; }
.notif-status-pill.approved { background: rgba(16, 185, 129, 0.25); color: #bbf7d0; border: 1px solid rgba(16, 185, 129, 0.6); }
.notif-status-pill.rejected { background: rgba(239, 68, 68, 0.25); color: #fecaca; border: 1px solid rgba(239, 68, 68, 0.6); }
.notif-status-pill.answered { background: rgba(6, 182, 212, 0.25); color: #a5f3fc; border: 1px solid rgba(6, 182, 212, 0.6); }

@keyframes pulseSoft {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(0.98); }
}

.notif-channel-pill {
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.16);
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.74rem;
}

.notif-time {
    font-size: 0.8rem;
    color: #cbd5e1;
    font-weight: 500;
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 5px;
}

.notif-unread-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f59e0b;
    box-shadow: 0 0 8px #f59e0b;
    display: inline-block;
}

.notif-title {
    font-size: 1.08rem;
    font-weight: 700;
    color: #ffffff;
    margin: 2px 0 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.4;
}

.notif-body-text {
    font-size: 0.93rem;
    color: #e2e8f0;
    line-height: 1.6;
    margin: 0;
    word-break: break-word;
}

.notif-body-text p {
    color: #e2e8f0;
    margin-bottom: 8px;
    line-height: 1.6;
}

.notif-body-text p:last-child {
    margin-bottom: 0;
}

.notif-body-text a {
    color: #38bdf8 !important;
    text-decoration: underline !important;
    font-weight: 600 !important;
    transition: color 0.15s ease;
}

.notif-body-text a:hover {
    color: #7dd3fc !important;
}

.notif-body-text strong, .notif-body-text b {
    color: #ffffff !important;
    font-weight: 700 !important;
}

.notif-body-text em, .notif-body-text i {
    color: #f1f5f9;
    font-style: italic;
}

.notif-body-text code {
    background: rgba(255, 255, 255, 0.12);
    color: #38bdf8;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.88em;
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.notif-body-text pre {
    background: #0f1219;
    color: #f8fafc;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    overflow-x: auto;
    margin: 8px 0;
}

.notif-body-text ul, .notif-body-text ol {
    margin: 6px 0 8px 18px;
    color: #e2e8f0;
}

.notif-body-text li {
    margin-bottom: 4px;
    line-height: 1.5;
}

.notif-decision-banner {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.88rem;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 0;
    font-weight: 500;
}

.notif-decision-banner strong {
    color: #ffffff;
    font-weight: 700;
}

.notif-decision-banner.pending { background: rgba(245, 158, 11, 0.16); border: 1.5px solid rgba(245, 158, 11, 0.5); color: #fef08a; }
.notif-decision-banner.question { background: rgba(6, 182, 212, 0.16); border: 1.5px solid rgba(6, 182, 212, 0.5); color: #e0f2fe; }
.notif-decision-banner.reminder { background: rgba(168, 85, 247, 0.16); border: 1.5px solid rgba(168, 85, 247, 0.5); color: #f3e8ff; }
.notif-decision-banner.approved { background: rgba(16, 185, 129, 0.16); border: 1.5px solid rgba(16, 185, 129, 0.5); color: #dcfce7; }
.notif-decision-banner.rejected { background: rgba(239, 68, 68, 0.16); border: 1.5px solid rgba(239, 68, 68, 0.5); color: #fee2e2; }
.notif-decision-banner.answered { background: rgba(56, 189, 248, 0.16); border: 1.5px solid rgba(56, 189, 248, 0.5); color: #e0f2fe; }

.notif-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
}

.notif-action-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 7px 15px;
    border-radius: 8px;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.notif-action-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-1px);
}

.notif-action-btn.btn-hitl-approve {
    background: linear-gradient(135deg, #059669, #047857);
    color: #ffffff;
    border: 1px solid #34d399;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(5, 150, 105, 0.4);
}

.notif-action-btn.btn-hitl-approve:hover {
    background: #059669;
    color: #ffffff;
    box-shadow: 0 0 15px rgba(52, 211, 153, 0.6);
    transform: translateY(-1px);
}

.notif-action-btn.btn-hitl-reject {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: #ffffff;
    border: 1px solid #f87171;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(220, 38, 38, 0.4);
}

.notif-action-btn.btn-hitl-reject:hover {
    background: #dc2626;
    color: #ffffff;
    box-shadow: 0 0 15px rgba(248, 113, 113, 0.6);
    transform: translateY(-1px);
}

.notif-action-btn.btn-hitl-reply {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #ffffff;
    border: 1px solid #38bdf8;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(2, 132, 199, 0.4);
}

.notif-action-btn.btn-hitl-reply:hover {
    background: #0284c7;
    color: #ffffff;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.6);
    transform: translateY(-1px);
}

.notif-secondary-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.metric-highlight-pending {
    border-color: rgba(245, 158, 11, 0.6) !important;
    background: linear-gradient(145deg, rgba(245, 158, 11, 0.18), #181d28) !important;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.12);
}

.metric-highlight-pending .m-title {
    color: #fbbf24 !important;
    font-weight: 700;
}

.metric-highlight-pending .m-value {
    color: #fbbf24 !important;
    font-weight: 800;
}

.metric-highlight-pending .m-sub {
    color: #fde68a !important;
    font-weight: 500;
}

.pill-highlight-pending.active {
    background: #f59e0b !important;
    color: #000000 !important;
    border-color: #fbbf24 !important;
    font-weight: 800 !important;
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.45);
}

/* ==========================================================================
   LIVE COLLABORATION DOCK (CHAT EXECUTION PIPELINE)
   ========================================================================== */
.stepper-collab-dock {
    margin: 4px 0 8px 0;
    padding: 0;
    background: transparent;
    border: none;
}

.collab-dock-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #94a3b8;
}

.collab-pipeline-track {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 2px 6px 2px;
    scrollbar-width: none;
}
.collab-pipeline-track::-webkit-scrollbar { display: none; }

.collab-node {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    background: transparent;
    border: none;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.collab-node.active {
    color: #38bdf8;
}

.collab-node.done {
    color: #10b981;
}

.collab-node.waiting {
    opacity: 0.55;
}

.collab-avatar-wrap {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #38bdf8;
    position: relative;
    flex-shrink: 0;
}

.collab-node.active .collab-avatar-wrap {
    animation: avatarPulseGlow 1.8s infinite alternate;
}

@keyframes avatarPulseGlow {
    0% { box-shadow: 0 0 4px rgba(56, 189, 248, 0.4); transform: scale(1); }
    100% { box-shadow: 0 0 14px rgba(56, 189, 248, 0.85); transform: scale(1.06); }
}

.collab-avatar-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.collab-node-info {
    display: flex;
    flex-direction: column;
}

.collab-node-name {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
    white-space: nowrap;
}

.collab-node-status {
    font-size: 0.65rem;
    color: var(--text-muted);
    line-height: 1.2;
    margin-top: 1px;
    white-space: nowrap;
}

.collab-connector {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 0.7rem;
    position: relative;
    padding: 0 2px;
    flex-shrink: 0;
}

.collab-connector.active {
    color: #38bdf8;
    animation: beamFlow 1.2s infinite linear;
}

@keyframes beamFlow {
    0% { transform: translateX(-2px); opacity: 0.5; }
    50% { transform: translateX(2px); opacity: 1; text-shadow: 0 0 8px #38bdf8; }
    100% { transform: translateX(-2px); opacity: 0.5; }
}

/* ==========================================================================
   OPEN SPACE EXECUTIVO VIVO (11 DEPARTAMENTOS & FEED EM TEMPO REAL)
   ========================================================================== */
.open-space-grid-11 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    margin-bottom: 2rem;
}

.dept-live-card {
    background: rgba(24, 25, 27, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.dept-live-card:hover {
    border-color: rgba(56, 189, 248, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.dept-live-card.active-working {
    border-color: rgba(56, 189, 248, 0.6) !important;
    background: radial-gradient(circle at top right, rgba(56, 189, 248, 0.12) 0%, rgba(24, 25, 27, 0.95) 75%) !important;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.25) !important;
    animation: deptBreathingBorder 2.4s infinite ease-in-out;
}

@keyframes deptBreathingBorder {
    0% { border-color: rgba(56, 189, 248, 0.4); box-shadow: 0 0 10px rgba(56, 189, 248, 0.15); }
    50% { border-color: rgba(56, 189, 248, 0.9); box-shadow: 0 0 22px rgba(56, 189, 248, 0.4); }
    100% { border-color: rgba(56, 189, 248, 0.4); box-shadow: 0 0 10px rgba(56, 189, 248, 0.15); }
}

.dept-live-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.dept-live-title-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dept-live-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.dept-live-name {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--text-main);
    line-height: 1.2;
}

.dept-live-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.dept-live-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.68rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
}

.dept-live-status-pill.status-working {
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.35);
    color: #38bdf8;
}

.dept-live-status-pill.status-idle {
    background: rgba(100, 116, 139, 0.12);
    border-color: rgba(100, 116, 139, 0.25);
    color: #94a3b8;
}

.dept-live-roles-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 8px 0 12px 0;
}

.dept-role-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

.dept-role-chip:hover {
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.38);
    color: #38bdf8;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(56, 189, 248, 0.2);
}

.dept-role-chip:active {
    transform: translateY(0);
}

.dept-live-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 8px;
    margin-top: 4px;
}

.dept-metric-count {
    font-size: 0.72rem;
    color: var(--text-muted);
}
.dept-metric-count strong {
    color: var(--text-main);
}

.btn-dept-talk {
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-dept-talk:hover {
    background: #38bdf8;
    color: #0f172a;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}

/* Ticker de Atividades e Handoffs da Equipe */
.team-live-stream-card {
    background: rgba(24, 25, 27, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 2rem;
}

.stream-timeline-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.stream-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    font-size: 0.82rem;
    transition: all 0.2s ease;
}

.stream-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.09);
}

.stream-icon-badge {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.stream-content {
    flex: 1;
}

.stream-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* =========================================================
   Cofre de Credenciais de Acesso & Portais (Enterprise Keychain)
   ========================================================= */
.credentials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 12px;
}

.cred-card {
    background: rgba(30, 31, 35, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
}

.cred-card:hover {
    border-color: rgba(245, 158, 11, 0.4);
    background: rgba(30, 31, 35, 0.9);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.cred-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.cred-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #f1f5f9;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cred-badge {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.cred-info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: #cbd5e1;
}

.cred-info-label {
    color: var(--text-muted);
    font-size: 0.75rem;
    min-width: 60px;
}

.cred-info-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    word-break: break-all;
}

.cred-card-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Card Interativo de Credencial Detectada no Chat */
.chat-credential-prompt-card {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(30, 31, 35, 0.95));
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 14px;
    padding: 12px 16px;
    margin: 10px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.2s ease;
}

.ccp-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #f59e0b;
}

.ccp-body {
    font-size: 0.82rem;
    color: #e2e8f0;
    line-height: 1.4;
}

.ccp-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.btn-ccp-save {
    background: #f59e0b;
    color: #0f172a;
    border: none;
    border-radius: 8px;
    padding: 5px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
}

.btn-ccp-save:hover {
    background: #d97706;
    color: #ffffff;
}

.btn-ccp-dismiss {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 5px 12px;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-ccp-dismiss:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

/* =========================================================
   Filtros Rápidos de Telemetria de Custos (Pills)
   ========================================================= */
.btn-filter-pill {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: #cbd5e1;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-filter-pill:hover {
    background: rgba(255, 255, 255, 0.09);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.btn-filter-pill.active {
    background: rgba(16, 185, 129, 0.18) !important;
    color: #34d399 !important;
    border-color: #10b981 !important;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.3) !important;
}

/* =========================================================
   Executive SaaS Schedule Builder (Frequência Amigável)
   ========================================================= */
.scheduler-type-tabs {
    display: flex;
    gap: 6px;
    background: rgba(15, 18, 25, 0.95);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 14px;
    overflow-x: auto;
}

.scheduler-type-tab {
    flex: 1;
    min-width: fit-content;
    padding: 7px 12px;
    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.scheduler-type-tab:hover {
    color: #f1f5f9;
    background: rgba(255, 255, 255, 0.05);
}

.scheduler-type-tab.active {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.scheduler-panel {
    background: rgba(22, 23, 27, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.weekday-selector {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.weekday-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: #cbd5e1;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s ease;
}

.weekday-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.weekday-btn.active {
    background: #38bdf8 !important;
    color: #0f172a !important;
    border-color: #38bdf8 !important;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.45);
}

.time-preset-pill {
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    cursor: pointer;
    transition: all 0.15s ease;
}

.time-preset-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.25);
}

.time-preset-pill.active {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border-color: #10b981;
}

.scheduler-summary-box {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(56, 189, 248, 0.08));
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 14px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.template-badge-pill {
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.template-badge-pill:hover {
    background: rgba(56, 189, 248, 0.12);
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.3);
    transform: translateY(-1px);
}

.badge-freq-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(56, 189, 248, 0.08);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.22);
    padding: 1px 7px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}

/* =========================================================
   Aba de Agentes & Especialistas (Matriz Corporativa)
   ========================================================= */
.agent-dept-section {
    background: rgba(24, 25, 27, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 18px 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
}

.agent-dept-section:hover {
    border-color: rgba(255, 255, 255, 0.14);
}

.agent-dept-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 16px;
}

.agent-dept-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.agent-dept-icon-wrap {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.agent-dept-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.agent-dept-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.agent-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 16px;
}

.agent-cfg-card {
    background: rgba(30, 31, 35, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s ease;
    position: relative;
}

.agent-cfg-card:hover {
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.agent-cfg-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 12px;
}

.agent-cfg-avatar-wrap {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

.agent-cfg-avatar-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.agent-cfg-title-wrap {
    flex: 1;
    min-width: 0;
}

.agent-cfg-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.agent-cfg-name {
    font-weight: 700;
    font-size: 0.96rem;
    color: var(--text-main);
}

.agent-cfg-tag {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(56, 189, 248, 0.12);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.25);
    white-space: nowrap;
}

.agent-cfg-role {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 2px;
}

.agent-cfg-scope-box {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.82rem;
    color: #cbd5e1;
    line-height: 1.45;
    margin-bottom: 12px;
}

.agent-cfg-scope-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.agent-cfg-details-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.agent-cfg-detail-item {
    font-size: 0.78rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.agent-cfg-detail-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

.agent-cfg-tools-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.agent-cfg-tool-tag {
    font-size: 0.72rem;
    font-weight: 500;
    padding: 2px 7px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.agent-cfg-model-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #a78bfa;
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.25);
    padding: 2px 8px;
    border-radius: 6px;
    width: fit-content;
}

.agent-cfg-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: auto;
}

.dept-filter-pill-btn {
    font-size: 0.78rem;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
}

.dept-filter-pill-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

.dept-filter-pill-btn.active {
    background: rgba(139, 92, 246, 0.2);
    color: #c084fc;
    border-color: rgba(139, 92, 246, 0.4);
    font-weight: 600;
}

/* ========================================= */
/* IA THOUGHT PROCESS (RACIOCÍNIO COLAPSÁVEL) */
/* ========================================= */
.ia-thought-process {
    background-color: rgba(255, 255, 255, 0.03);
    border-left: 3px solid #6366f1;
    border-radius: 6px;
    margin-bottom: 16px;
    margin-top: 8px;
    overflow: hidden;
}

.ia-thought-process summary {
    cursor: pointer;
    padding: 10px 14px;
    font-weight: 500;
    color: #a1a1aa;
    user-select: none;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    list-style: none; /* Remove seta nativa em alguns browsers */
}

.ia-thought-process summary::-webkit-details-marker {
    display: none;
}

.ia-thought-process summary:hover {
    color: #e2e8f0;
    background-color: rgba(255, 255, 255, 0.05);
}

.thought-content {
    padding: 12px 14px;
    font-size: 0.85rem;
    color: #a1a1aa;
    font-style: italic;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background-color: rgba(0, 0, 0, 0.1);
}

.thought-content p {
    margin-bottom: 8px;
}

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



/* Animações Kognvs Typing Indicator */
@keyframes kognvs-typing {
    0%, 80%, 100% { transform: scale(0); opacity: 0.3; }
    40% { transform: scale(1); opacity: 1; }
}
@keyframes pulse-blue { 0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.7); } 70% { transform: scale(1.1); box-shadow: 0 0 0 7px rgba(56, 189, 248, 0); } 100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); } }
@keyframes pulse-purple { 0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.75); } 70% { transform: scale(1.1); box-shadow: 0 0 0 7px rgba(168, 85, 247, 0); } 100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(168, 85, 247, 0); } }
@keyframes pulse-green { 0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.75); } 70% { transform: scale(1.1); box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); } 100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
@keyframes pulse-amber { 0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.75); } 70% { transform: scale(1.1); box-shadow: 0 0 0 7px rgba(245, 158, 11, 0); } 100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); } }

/* Card de Resposta Interrompida por Reload */
.chat-pending-retry-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(56, 189, 248, 0.05);
    border: 1px dashed rgba(56, 189, 248, 0.25);
    border-radius: 10px;
    padding: 10px 16px;
    margin: 16px 0;
    color: #cbd5e1;
    font-size: 0.85rem;
    gap: 12px;
    animation: fadeIn 0.3s ease-out;
}
.chat-pending-retry-card .cprc-text {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: #94a3b8;
}
.btn-cprc-retry {
    background: #0284c7;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    transition: all 0.2s;
}
.btn-cprc-retry:hover {
    background: #0369a1;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

/* Botão Flutuante de Rolar para Baixo durante Stream */
.btn-scroll-bottom-floating {
    position: absolute;
    bottom: 95px;
    left: 50%;
    transform: translateX(-50%);
    background: #0284c7;
    color: #ffffff;
    border: 1px solid rgba(56, 189, 248, 0.4);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45), 0 0 12px rgba(56, 189, 248, 0.35);
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    z-index: 50;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    animation: fadeIn 0.25s ease-out;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-scroll-bottom-floating:hover {
    background: #0369a1;
    transform: translateX(-50%) scale(1.04);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 16px rgba(56, 189, 248, 0.5);
}

/* ==========================================================================
   MENU DE OPÇÕES DO CHAT (...) ESTILO GOOGLE GEMINI ENTERPRISE
   ========================================================= */
.btn-chat-header-options {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted, #94a3b8);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-chat-header-options:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main, #f8fafc);
    border-color: rgba(255, 255, 255, 0.18);
}

.chat-options-flyout {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 275px;
    background: rgba(20, 21, 25, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(16px);
    z-index: 1000;
    animation: scaleInMenu 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scaleInMenu {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.chat-cost-summary-card {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 9px 11px;
    margin-bottom: 4px;
}

.ccsc-title {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ccsc-val {
    font-size: 1.05rem;
    font-weight: 600;
    color: #f1f5f9;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    margin-top: 3px;
    letter-spacing: -0.02em;
}

.ccsc-sub {
    font-size: 0.7rem;
    color: #64748b;
    margin-top: 1px;
}

.gemini-action-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 9px;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.12s ease;
    color: #cbd5e1;
    user-select: none;
}

.gemini-action-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.gemini-action-item.danger-subtle {
    color: #94a3b8;
}

.gemini-action-item.danger-subtle:hover {
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
}

.gemini-action-item.danger-subtle:hover .gemini-action-icon,
.gemini-action-item.danger-subtle:hover .gemini-action-title,
.gemini-action-item.danger-subtle:hover .gemini-action-desc {
    color: #ef4444 !important;
}

.gemini-action-icon {
    font-size: 0.82rem;
    width: 18px;
    text-align: center;
    color: #94a3b8;
    flex-shrink: 0;
    transition: color 0.12s ease;
}

.gemini-action-item:hover .gemini-action-icon {
    color: #f1f5f9;
}

.gemini-action-text {
    flex: 1;
    min-width: 0;
}

.gemini-action-title {
    font-size: 0.79rem;
    font-weight: 500;
    line-height: 1.2;
    color: inherit;
}

.gemini-action-desc {
    font-size: 0.68rem;
    color: #64748b;
    margin-top: 1px;
    line-height: 1.2;
}

/* ==========================================================================
   TÍTULO DO CHAT EDITÁVEL NA TOPBAR
   ========================================================= */
.chat-topbar-title-container {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    max-width: 460px;
}

.chat-topbar-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: #cbd5e1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    padding: 3px 6px;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.chat-topbar-title:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.btn-edit-chat-title {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 0.72rem;
    cursor: pointer;
    padding: 3px 5px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    opacity: 0;
}

.chat-topbar-title-container:hover .btn-edit-chat-title {
    opacity: 0.8;
}

.btn-edit-chat-title:hover {
    opacity: 1;
    color: #f1f5f9;
    background: rgba(255, 255, 255, 0.08);
}

.input-edit-chat-title {
    background: rgba(15, 16, 20, 0.95);
    border: 1px solid rgba(56, 189, 248, 0.4);
    border-radius: 6px;
    color: #ffffff;
    font-size: 0.84rem;
    padding: 3px 8px;
    outline: none;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.15);
    min-width: 180px;
    max-width: 380px;
}




