/*
 * ══════════════════════════════════════════════
 *  AI.CSS — Estilos do Painel de IA (Etapas Individuais)
 * ══════════════════════════════════════════════
 *
 *  Propósito : Controla o visual do painel de agentes paralelos,
 *              apresentando cada etapa do serviço em tela cheia individual.
 *              Foca em chat bubbles flutuantes e transições suaves.
 */

:root {
    --color-agent-green: #34d399;
    /* Atendimento (WhatsApp / Esmeralda Claro) */
    --color-agent-amber: #fbbf24;
    /* Financeiro (Amber / Gold Premium) */
    --color-agent-neutral: #cbd5e1;
    /* Dados (Prata/Slate Neutro) */
    --color-agent-blue: #0ea5e9;
    /* Novo Estágio 3 (Dados e Cognição) */
    --color-agent-orange: #fb923c;
    /* Urgência (Âmbar/Laranja) */
}

/* ==========================================
   ESTRUTURA DE CONTÊINER E ETAPAS (FULL-STAGE)
   ========================================== */
.ai-panel-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 280px;
    /* Acomoda perfeitamente os estágios e evita shifting */
    display: flex;
    flex-direction: column;
}

.ai-stage {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px) scale(0.99);
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        visibility 0.5s;
    z-index: 1;
}

.ai-stage.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    z-index: 2;
}

/* ==========================================
   CABEÇALHOS E BADGES DO PAINEL
   ========================================== */
.ai-panel-container .panel-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 0 12px 0;
    border-bottom: none;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

.ai-panel-container .panel-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    animation: node-pulse-anim 1.5s infinite alternate;
}

.ai-panel-container .panel-header-title {
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: -0.01em;
}

.ai-panel-container .panel-header-badge {
    margin-left: auto;
    font-size: 7.5px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 2.5px 6px;
    border-radius: 30px;
}

.ai-panel-container .badge-green {
    color: var(--color-agent-green);
    background: rgba(52, 211, 153, 0.06);
    border: 1px solid rgba(52, 211, 153, 0.15);
}

.ai-panel-container .badge-amber {
    color: var(--color-agent-amber);
    background: rgba(251, 191, 36, 0.06);
    border: 1px solid rgba(251, 191, 36, 0.15);
}

.ai-panel-container .badge-neutral {
    color: var(--color-agent-neutral);
    background: rgba(203, 213, 225, 0.06);
    border: 1px solid rgba(203, 213, 225, 0.15);
}

/* ==========================================
   WIDGET DE INFORMAÇÕES DO AGENTE (HEADER PLANO - SEM CARD)
   ========================================== */
.ai-panel-container .agent-main-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 0 10px 0;
    margin-top: 6px;
    margin-bottom: 8px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.ai-panel-container .agent-icon-box {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.5s ease;
}

.ai-panel-container .agent-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5px;
}

.ai-panel-container .agent-title-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.ai-panel-container .agent-title {
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 500;
    color: #ffffff;
}

.ai-panel-container .agent-subtitle {
    font-size: 8px;
    color: rgba(255, 255, 255, 0.3);
    font-weight: 400;
}

.ai-panel-container .agent-telemetry {
    font-family: var(--font-mono, monospace);
    font-size: 7.5px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

/* Status Badge */
.ai-panel-container .agent-status {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 30px;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.85;
}

.ai-panel-container .status-indicator {
    width: 5px;
    height: 5px;
    border-radius: 50%;
}

/* ==========================================
   ESTILOS ESPECÍFICOS DE AGENTES (TEMAS)
   ========================================== */

/* 1 & 2. Green Theme Elements (Atendimento & Financeiro) */
.ai-panel-container .agent-icon-box.box-green {
    background: rgba(52, 211, 153, 0.06);
    border-color: rgba(52, 211, 153, 0.2);
    color: var(--color-agent-green);
    box-shadow: 0 0 12px rgba(52, 211, 153, 0.08);
}

.ai-panel-container .agent-status.active-green {
    color: var(--color-agent-green);
    background: rgba(52, 211, 153, 0.08);
    border: 1px solid rgba(52, 211, 153, 0.18);
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.04);
}

.ai-panel-container .agent-status.active-green .status-indicator {
    background: var(--color-agent-green);
    box-shadow: 0 0 6px var(--color-agent-green);
    animation: node-pulse-anim 1s infinite alternate;
}

/* 3. Dados (Neutral Slate) */
.ai-panel-container #ai-stage-3 .agent-icon-box.box-neutral {
    background: rgba(203, 213, 225, 0.06);
    border-color: rgba(203, 213, 225, 0.2);
    color: var(--color-agent-neutral);
    box-shadow: 0 0 12px rgba(203, 213, 225, 0.08);
}

.ai-panel-container #ai-stage-3 .agent-status.active-neutral {
    color: var(--color-agent-neutral);
    background: rgba(203, 213, 225, 0.08);
    border: 1px solid rgba(203, 213, 225, 0.18);
    box-shadow: 0 0 10px rgba(203, 213, 225, 0.04);
}

.ai-panel-container #ai-stage-3 .agent-status.active-neutral .status-indicator {
    background: var(--color-agent-neutral);
    box-shadow: 0 0 6px var(--color-agent-neutral);
}

/* ==========================================
   CHAT SYSTEM (1° Demonstração - Flutuante)
   ========================================== */
/* ==========================================
   CHAT SYSTEM (1° Demonstração - Flutuante)
   ========================================== */
.ai-panel-container .chat-console {
    display: flex;
    flex-direction: column;
    gap: 6px;
    /* Espaço denso para acomodar conversa maior sem estourar */
    width: 100%;
    min-height: 120px;
    padding: 2px 4px !important;
    overflow-y: hidden;
    justify-content: flex-start;
}

.ai-panel-container .chat-row {
    display: flex;
    gap: 7px;
    width: 100%;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.ai-panel-container .chat-row.visible {
    opacity: 1;
    transform: translateY(0);
}

.ai-panel-container .chat-row.row-client {
    align-items: flex-start;
    justify-content: flex-start;
}

.ai-panel-container .chat-row.row-agent {
    align-items: flex-start;
    justify-content: flex-end;
}

/* Avatares dos Usuários (Estruturais e Compactos) */
.ai-panel-container .chat-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    /* Tamanho perfeito para ícones Iconify */
    flex-shrink: 0;
    margin-top: 1px;
    user-select: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.ai-panel-container .chat-avatar:hover {
    transform: scale(1.05);
}

.ai-panel-container .avatar-client {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.65);
}

.ai-panel-container .avatar-agent {
    background: rgba(52, 211, 153, 0.08);
    /* Verde WhatsApp */
    border: 1px solid rgba(52, 211, 153, 0.3);
    color: var(--color-agent-green);
}

.ai-panel-container .chat-bubble {
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    padding: 5px 9px;
    font-size: 8px;
    /* Ligeiramente menor para manter tudo super compacto e legível */
    line-height: 1.3;
    max-width: 82%;
}

.ai-panel-container .chat-bubble.bubble-client {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.85);
    border-top-left-radius: 2px;
}

.ai-panel-container .chat-bubble.bubble-agent {
    background: rgba(52, 211, 153, 0.05);
    /* Verde sutil do WhatsApp */
    border: 1px solid rgba(52, 211, 153, 0.14);
    color: #ffffff;
    border-top-right-radius: 2px;
}

.ai-panel-container .bubble-sender {
    font-family: var(--font-mono, monospace);
    font-size: 6px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
    user-select: none;
}

.ai-panel-container .bubble-client .bubble-sender {
    color: rgba(255, 255, 255, 0.35);
}

.ai-panel-container .bubble-agent .bubble-sender {
    color: var(--color-agent-green);
    /* Destaque verde no emissor */
}

/* Indicador de Digitação (Pontinhos do Whatsapp) */
.ai-panel-container .bubble-typing {
    padding: 6px 10px;
    display: inline-flex;
    flex-direction: column;
    min-width: 55px;
    width: auto;
}

.ai-panel-container .typing-dots {
    display: flex;
    align-items: center;
    gap: 3.5px;
    height: 6px;
    margin-top: 1.5px;
}

.ai-panel-container .typing-dots span {
    width: 3.5px;
    height: 3.5px;
    background: var(--color-agent-green);
    border-radius: 50%;
    animation: typing-bounce 1.2s infinite ease-in-out;
}

.ai-panel-container .typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.ai-panel-container .typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing-bounce {

    0%,
    100% {
        transform: translateY(0);
        opacity: 0.35;
    }

    50% {
        transform: translateY(-2px);
        opacity: 1;
    }
}

/* ==========================================
/* ==========================================
   DIAGRAMA DE PROGRESSO DINÂMICO (2° Demonstração)
   ========================================== */
.finance-diagram {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-top: 10px;
    padding: 2px 2px 2px 32px;
    box-sizing: border-box;
}

/* Espinha Vertical Dorsal do Diagrama */
.finance-diagram .diagram-spine {
    position: absolute;
    left: 14px;
    top: 12px;
    bottom: 12px;
    width: 2px;
    z-index: 1;
}

.finance-diagram .diagram-spine-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    opacity: 0.25;
    border-radius: 1px;
}

.finance-diagram .diagram-spine-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    /* Cresce dinamicamente pelo JS */
    background: #ffffff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 0 0 20px rgba(255, 255, 255, 0.4);
    border-radius: 1px;
    transition: height 0.1s ease;
}

/* Etapa do Diagrama */
.finance-diagram .diagram-step {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    opacity: 0.25;
    transform: translateX(8px) scale(0.98);
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.finance-diagram .diagram-step.active {
    opacity: 1;
    transform: translateX(0) scale(1);
}

/* Nó do Diagrama */
.finance-diagram .diagram-node {
    position: absolute;
    left: -32px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.finance-diagram .node-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(15, 15, 20, 0.95);
    border: 1.5px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.35);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Estado Ativo do Nó */
.finance-diagram .diagram-step.active .node-circle {
    width: 24px;
    height: 24px;
    font-size: 12px;
    border-color: var(--color-agent-green);
    background: rgba(52, 211, 153, 0.1);
    color: var(--color-agent-green);
    box-shadow: 0 0 12px rgba(52, 211, 153, 0.45), inset 0 0 6px rgba(52, 211, 153, 0.2);
}

/* Cartões do Diagrama (Glassmorphism Premium - Sem Cor) */
.finance-diagram .diagram-card {
    flex: 1;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.025);
    border-radius: 10px;
    padding: 7px 11px;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    position: relative;
    overflow: hidden;
}

.finance-diagram .diagram-step.active .diagram-card {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25), inset 0 0 8px rgba(255, 255, 255, 0.02);
}

/* Cabeçalho do Cartão */
.finance-diagram .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.finance-diagram .card-step-num {
    font-family: var(--font-mono, monospace);
    font-size: 6px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.25);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.4s ease;
}

.finance-diagram .diagram-step.active .card-step-num {
    color: var(--color-agent-green);
}

.finance-diagram .card-time {
    font-family: var(--font-mono, monospace);
    font-size: 6.5px;
    color: rgba(255, 255, 255, 0.2);
}

/* Corpo do Cartão */
.finance-diagram .card-body-content {
    display: flex;
    flex-direction: column;
    gap: 1.5px;
}

.finance-diagram .card-title {
    font-family: var(--font-heading);
    font-size: 8.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    transition: color 0.4s ease;
}

.finance-diagram .diagram-step.active .card-title {
    color: #ffffff;
}

.finance-diagram .card-desc {
    font-size: 7.5px;
    color: rgba(255, 255, 255, 0.35);
    margin: 0 0 2px 0;
    transition: color 0.4s ease;
}

.finance-diagram .diagram-step.active .card-desc {
    color: rgba(255, 255, 255, 0.7);
}

/* Tags de Metadados */
.finance-diagram .card-meta {
    display: flex;
    gap: 4px;
    margin-top: 1px;
}

.finance-diagram .meta-tag {
    font-size: 6px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 1.5px 5px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    background: rgba(255, 255, 255, 0.01);
    color: rgba(255, 255, 255, 0.35);
    transition: all 0.4s ease;
}

.finance-diagram .diagram-step.active .tag-payment-method,
.finance-diagram .diagram-step.active .tag-success,
.finance-diagram .diagram-step.active .tag-api,
.finance-diagram .diagram-step.active .tag-sent {
    border-color: rgba(52, 211, 153, 0.22);
    background: rgba(52, 211, 153, 0.06);
    color: var(--color-agent-green);
}

/* Efeito de laser scan rolando no Card do Passo 3 (Emissão da NF-e) */
.finance-diagram .laser-scanner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-agent-green), transparent);
    box-shadow: 0 0 8px var(--color-agent-green);
    opacity: 0;
    pointer-events: none;
}

.finance-diagram .diagram-step.active#finance-step-3 .laser-scanner {
    animation: laser-scan-anim 2.5s infinite linear;
}

@keyframes laser-scan-anim {
    0% {
        top: 0%;
        opacity: 0;
    }

    10% {
        opacity: 0.8;
    }

    90% {
        opacity: 0.8;
    }

    100% {
        top: 100%;
        opacity: 0;
    }
}

/* Micro-animação do ícone ou cartão do E-mail ao ser exibido */
.finance-diagram .diagram-step.active#finance-step-4 {
    animation: step-bounce-anim 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes step-bounce-anim {
    0% {
        transform: translateY(6px) scale(0.97);
    }

    70% {
        transform: translateY(-1px) scale(1.01);
    }

    100% {
        transform: translateY(0) scale(1);
    }
}

/* ==========================================
   CONSOLES DE TERMINAL DO PAINEL (ETAPA 2 & 3)
   ========================================== */
.ai-panel-container .agent-console {
    margin-top: 4px;
    background: rgba(20, 20, 25, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    padding: 8px 12px;
    font-family: var(--font-mono, monospace);
    font-size: 9px;
    color: rgba(255, 255, 255, 0.35);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.5s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    min-height: 29px;
    box-sizing: border-box;
}

.ai-panel-container .console-prompt {
    color: rgba(255, 255, 255, 0.15);
    margin-right: 6px;
    font-weight: bold;
    user-select: none;
}

.ai-panel-container .console-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.4s ease;
    color: rgba(255, 255, 255, 0.6);
}

/* ==========================================
   DASHBOARD DE COGNIÇÃO DE DADOS (3° Demonstração - Dados & Cognição)
   ========================================== */
.ai-cognition-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    width: 100%;
    height: 380px;
    margin-top: 6px;
    box-sizing: border-box;
    flex-grow: 1;
    min-height: 0;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.ai-stage.active .ai-cognition-grid {
    opacity: 1;
    transform: translateY(0);
}

/* Progressão Pipeline SVG */
.cognition-pipeline-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.pipeline-bg-path {
    stroke: rgba(255, 255, 255, 0.06);
    stroke-width: 1px;
    vector-effect: non-scaling-stroke;
    fill: none;
}

.pipeline-flow-path {
    stroke: rgba(255, 255, 255, 0.35);
    stroke-width: 1px;
    vector-effect: non-scaling-stroke;
    fill: none;
    stroke-linecap: round;
    stroke-dasharray: 4 8;
    animation: pipeline-flow-anim 3s linear infinite;
}

@keyframes pipeline-flow-anim {
    to {
        stroke-dashoffset: -12;
    }
}

.cognition-col {
    display: flex;
    flex-direction: column;
    padding: 8px;
    box-sizing: border-box;
    overflow: hidden;
    justify-content: flex-start;
    gap: 6px;
    z-index: 1; /* Keep columns above the background pipeline SVG */
}

.col-ingestion {
    align-self: start;
    height: 320px;
}

.col-observation {
    align-self: center;
    height: 320px;
}

.col-triage {
    align-self: end;
    height: 320px;
}

.col-header {
    display: flex;
    flex-direction: column;
    gap: 0.5px;
    margin-bottom: 2px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.04);
    padding-bottom: 4px;
}

.col-title {
    font-family: var(--font-heading);
    font-size: 9px;
    font-weight: 600;
    color: #ffffff;
}

.col-subtitle {
    font-size: 7px;
    color: rgba(255, 255, 255, 0.4);
}

/* Coluna 1: Ingestão */
.files-stack {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
    justify-content: center;
}

.file-card {
    position: relative;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.035);
    border-radius: 8px;
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    opacity: 0.35;
    transform: scale(0.96);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.file-card.active {
    opacity: 1;
    transform: scale(1);
    border-color: rgba(14, 165, 233, 0.3);
    background: rgba(14, 165, 233, 0.04);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.05);
}

.file-card-header-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.file-icon {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    flex-shrink: 0;
}

.file-icon.pdf {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
}

.file-icon.jpg {
    background: rgba(52, 211, 153, 0.1);
    color: #34d399;
}

.file-icon.json {
    background: rgba(251, 146, 60, 0.1);
    color: #fb923c;
}

.file-info {
    display: flex;
    flex-direction: column;
    gap: 0.5px;
}

.file-name {
    font-size: 7.5px;
    font-weight: 500;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
}

.file-size {
    font-size: 6px;
    color: rgba(255, 255, 255, 0.3);
}

.file-meta {
    font-size: 6.5px;
    color: rgba(255, 255, 255, 0.55);
    display: flex;
    flex-direction: column;
    gap: 1px;
    border-top: 1px dashed rgba(255, 255, 255, 0.05);
    padding-top: 4px;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease;
}

.file-card.active .file-meta {
    opacity: 1;
    max-height: 35px;
}

.meta-line {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-laser {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #0ea5e9, transparent);
    box-shadow: 0 0 6px #0ea5e9;
    opacity: 0;
    pointer-events: none;
}

.file-card.active .file-laser {
    animation: file-laser-sweep 2s infinite linear;
}

@keyframes file-laser-sweep {
    0% { top: 0%; opacity: 0; }
    15% { opacity: 0.8; }
    85% { opacity: 0.8; }
    100% { top: 100%; opacity: 0; }
}

/* Coluna 2: Observação */
.observation-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    gap: 8px;
    height: 100%;
}

.radar-observatory {
    width: 95px;
    height: 95px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.04);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.radar-core {
    position: relative;
    width: 85px;
    height: 85px;
}

.radar-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 1px dashed rgba(255, 255, 255, 0.03);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.radar-circle.circle-1 { width: 28px; height: 28px; }
.radar-circle.circle-2 { width: 56px; height: 56px; }
.radar-circle.circle-3 {
    width: 85px;
    height: 85px;
    border-style: solid;
    border-color: rgba(255, 255, 255, 0.07);
}

.radar-crosshair-h {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.02);
}

.radar-crosshair-v {
    position: absolute;
    top: 0;
    left: 50%;
    width: 1px;
    height: 100%;
    background: rgba(255, 255, 255, 0.02);
}

.radar-sweep {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(from 0deg, rgba(14, 165, 233, 0.12) 0deg, transparent 75deg, transparent 360deg);
    transform-origin: center center;
    pointer-events: none;
    animation: radar-spin-anim 4s linear infinite;
}

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

.radar-blip {
    position: absolute;
    width: 3.5px;
    height: 3.5px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 5px #34d399;
    opacity: 0;
}

.radar-blip.blip-1 { top: 22%; left: 68%; animation: blip-flash 3s infinite 0.4s; }
.radar-blip.blip-2 { top: 62%; left: 28%; animation: blip-flash 3s infinite 1.6s; }

@keyframes blip-flash {
    0% { opacity: 0; transform: scale(0.5); }
    10% { opacity: 1; transform: scale(1.2); }
    40% { opacity: 0.8; }
    100% { opacity: 0; transform: scale(0.7); }
}

.telemetry-box {
    width: 100%;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1px 0;
}

.telemetry-wave-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.telemetry-wave-bg {
    stroke: rgba(255, 255, 255, 0.03);
    stroke-width: 0.75;
    fill: none;
}

.telemetry-wave-path {
    stroke: #34d399;
    stroke-width: 1.5;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 20 10;
    animation: telemetry-flow-anim 1.5s linear infinite;
}

@keyframes telemetry-flow-anim {
    to {
        stroke-dashoffset: -30;
    }
}

.status-feeds {
    display: flex;
    gap: 4px;
    width: 100%;
    justify-content: center;
}

.feed-badge {
    display: flex;
    align-items: center;
    gap: 3px;
    border-color: rgba(52, 211, 153, 0.12);
    background: rgba(52, 211, 153, 0.03);
    border: 1px solid rgba(52, 211, 153, 0.12);
    padding: 2.5px 5px;
    border-radius: 5px;
    font-size: 6.5px;
    color: #ffffff;
    transition: all 0.3s ease;
}

.feed-dot {
    width: 3.5px;
    height: 3.5px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 4px #34d399;
    animation: node-pulse-anim 1s infinite alternate;
}

/* Coluna 3: Triagem */
.triage-area {
    position: relative;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: center;
    gap: 6px;
    height: 100%;
}

.triage-folders {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 100%;
    z-index: 2;
}

.triage-folder {
    background: rgba(255, 255, 255, 0.012);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 0 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    height: 28px;
    box-sizing: border-box;
}

.triage-folder.glow-urgency {
    border-color: rgba(251, 146, 60, 0.35);
    background: rgba(251, 146, 60, 0.05);
    box-shadow: 0 0 10px rgba(251, 146, 60, 0.08);
}

.triage-folder.glow-billing {
    border-color: rgba(52, 211, 153, 0.35);
    background: rgba(52, 211, 153, 0.05);
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.08);
}

.triage-folder.glow-support {
    border-color: rgba(14, 165, 233, 0.35);
    background: rgba(14, 165, 233, 0.05);
    box-shadow: 0 0 10px rgba(14, 165, 233, 0.08);
}

.folder-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 7.5px;
    color: rgba(255, 255, 255, 0.65);
    min-width: 0;
    flex: 1;
    margin-right: 8px;
}

.folder-header iconify-icon {
    font-size: 10px;
    flex-shrink: 0;
}

.folder-urgency .folder-header iconify-icon { color: #fb923c; }
.folder-billing .folder-header iconify-icon { color: #34d399; }
.folder-support .folder-header iconify-icon { color: #38bdf8; }

.folder-title {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.folder-body {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.folder-counter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 12px;
    height: 12px;
    line-height: 1;
    font-family: var(--font-mono, monospace);
    font-size: 7.5px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.triage-folder.glow-urgency .folder-counter {
    color: #fb923c;
    background: rgba(251, 146, 60, 0.1);
    border-color: rgba(251, 146, 60, 0.25);
}

.triage-folder.glow-billing .folder-counter {
    color: #34d399;
    background: rgba(52, 211, 153, 0.1);
    border-color: rgba(52, 211, 153, 0.25);
}

.triage-folder.glow-support .folder-counter {
    color: #38bdf8;
    background: rgba(14, 165, 233, 0.1);
    border-color: rgba(14, 165, 233, 0.25);
}

.triage-cards-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.triage-mini-card {
    position: absolute;
    left: -120px;
    background: rgba(15, 15, 20, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45);
    border-radius: 5px;
    padding: 2.5px 5px;
    display: flex;
    align-items: center;
    gap: 3.5px;
    font-size: 6.5px;
    font-weight: 500;
    color: #ffffff;
    opacity: 0;
    transform: scale(0.85);
    transition: transform 0.1s ease, opacity 0.2s ease;
    z-index: 5;
    pointer-events: none;
    white-space: nowrap;
}

.triage-mini-card.card-urgency {
    top: 6px;
    border-color: rgba(251, 146, 60, 0.3);
}

.triage-mini-card.card-billing {
    top: 36px;
    border-color: rgba(52, 211, 153, 0.3);
}

.triage-mini-card.card-support {
    top: 67px;
    border-color: rgba(14, 165, 233, 0.3);
}

.triage-mini-card iconify-icon {
    font-size: 8px;
}

.triage-mini-card.card-urgency iconify-icon { color: #fb923c; }
.triage-mini-card.card-billing iconify-icon { color: #34d399; }
.triage-mini-card.card-support iconify-icon { color: #38bdf8; }

/* Blue Theme Definitions */
.ai-panel-container .badge-blue {
    color: var(--color-agent-blue);
    background: rgba(14, 165, 233, 0.06);
    border: 1px solid rgba(14, 165, 233, 0.15);
}

.ai-panel-container .box-blue {
    background: rgba(14, 165, 233, 0.06);
    border-color: rgba(14, 165, 233, 0.2);
    color: var(--color-agent-blue);
    box-shadow: 0 0 12px rgba(14, 165, 233, 0.08);
}

.ai-panel-container .agent-status.active-blue {
    color: var(--color-agent-blue);
    background: rgba(14, 165, 233, 0.08);
    border: 1px solid rgba(14, 165, 233, 0.18);
    box-shadow: 0 0 10px rgba(14, 165, 233, 0.04);
}

.ai-panel-container .agent-status.active-blue .status-indicator {
    background: var(--color-agent-blue);
    box-shadow: 0 0 6px var(--color-agent-blue);
    animation: node-pulse-anim 1s infinite alternate;
}

/* Animações Gerais */
@keyframes node-pulse-anim {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.2);
        opacity: 1;
    }
}

@keyframes sound-bar {
    0% {
        height: 2px;
    }

    100% {
        height: 10px;
    }
}

/* ==========================================
   CLEAN FLOATING PANEL OVERRIDES
   ========================================== */
.services-panel-clean#panel-ai-placeholder {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    /* Centraliza verticalmente o painel por completo */
    height: 100% !important;
}

.services-panel-clean#panel-ai-placeholder .panel-grid,
.services-panel-clean#panel-ai-placeholder .panel-shimmer,
.services-panel-clean#panel-ai-placeholder .panel-corner {
    display: none !important;
}

.services-panel-clean#panel-ai-placeholder .panel-header {
    display: none !important;
    /* Esconde o header original do contêiner externo para usar os internos customizados */
}

.services-panel-clean#panel-ai-placeholder .panel-body {
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}