/* --- IA OMNISCIENTE PREMIUM DESIGN --- */

.ai-operations-container {
    padding: 24px;
    background-color: #0b1120; /* Deep dark blue */
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    border-radius: 12px;
    color: #fff;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 24px;
}

.ai-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 60px;
}

.ai-title-wrap h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #f8fafc;
    margin-bottom: 4px;
}

.ai-title-wrap p {
    color: #64748b;
    font-size: 0.85rem;
}

.heartbeat-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.heartbeat-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
    font-size: 0.75rem;
}

.pulse-ring {
    width: 24px;
    height: 24px;
    border: 3px solid #ef4444;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

.pulse-ring::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid #ef4444;
    top: -2px;
    left: -2px;
    animation: outerPulse 2s infinite;
}

@keyframes outerPulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(2); opacity: 0; }
}

.btn-fit {
    background: #1e293b;
    color: #e2e8f0;
    border: none;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-fit:hover { background: #334155; }

/* AI Hierarchy View */
.ai-tree-root {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 80px;
    padding-bottom: 40px;
    position: relative;
}

.agent-node {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 16px 20px;
    min-width: 200px;
    height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
}

.agent-node.ceo-node {
    border-color: rgba(251, 191, 36, 0.4);
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.1);
}

.label-category {
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 6px;
    display: block;
    text-align: center;
}

.agent-node h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 8px;
    text-align: center;
}

.status-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #cbd5e1;
    text-transform: uppercase;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.dot-green { background: #10b981; box-shadow: 0 0 8px #10b981; }
.dot-blue { background: #3b82f6; box-shadow: 0 0 8px #3b82f6; }
.dot-yellow { background: #f59e0b; box-shadow: 0 0 8px #f59e0b; }

/* Connections */
.ai-tree-root::before {
    content: '';
    position: absolute;
    top: 50px;
    left: 50%;
    width: 2px;
    height: 300px;
    background: linear-gradient(to bottom, #334155, transparent);
    z-index: 0;
}

.nodes-row {
    display: flex;
    justify-content: center;
    gap: 30px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.sub-node-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 60px;
}

/* Icons/Badges on nodes */
.node-icon {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #0f172a;
    padding: 4px;
    border-radius: 50%;
    border: 1px solid #334155;
    color: #f59e0b;
}

/* Activity Feed */
.ai-terminal-bottom {
    margin-top: 40px;
    background: rgba(2, 6, 23, 0.8);
    border-radius: 8px;
    padding: 20px;
    font-family: 'Fira Code', monospace;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.term-line {
    color: #10b981;
    font-size: 13px;
    margin-bottom: 6px;
    opacity: 0.9;
}

@media (max-width: 1024px) {
    .nodes-row { flex-wrap: wrap; }
    .ai-tree-root::before { display: none; }
}

@media (max-width: 768px) {
    .ai-operations-container {
        padding: 16px;
        border-radius: 12px;
    }

    .ai-header {
        flex-direction: column;
        gap: 20px;
        margin-bottom: 40px;
    }

    .heartbeat-wrap {
        align-items: flex-start;
    }

    .ai-title-wrap h2 {
        font-size: 1.25rem;
    }

    .nodes-row {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .agent-node {
        min-width: 100%;
        height: auto;
        min-height: 100px;
    }

    .sub-node-wrap {
        width: 100%;
        gap: 20px;
    }

    .ai-tree-root {
        gap: 40px;
    }

    .ai-terminal-bottom {
        margin-top: 24px;
        padding: 16px;
    }

    .term-line {
        font-size: 12px;
        word-break: break-all;
    }
}

@media (max-width: 480px) {
    .ai-operations-container {
        padding: 12px;
    }

    .ai-title-wrap h2 {
        font-size: 1.1rem;
    }

    .ai-title-wrap p {
        font-size: 0.75rem;
    }

    .agent-node {
        padding: 12px 16px;
    }

    .agent-node h3 {
        font-size: 0.95rem;
    }

    .ai-terminal-bottom {
        padding: 12px;
    }

    .term-line {
        font-size: 11px;
    }

    .btn-fit {
        padding: 4px 10px;
        font-size: 0.7rem;
    }
}
