/* ============================================================
   SKYN3T Carousel · Mock: Agents Organigrama
   ------------------------------------------------------------
   Hierarchical node graph (Master → Areas → Specialists) with
   connecting SVG edges and packets animating between them.
   Simplified compact version of the full /crm/ agents panel.
   Scoped under .skc-agents-mock.
   ============================================================ */

.skc-agents-mock {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(33, 153, 234, 0.08), transparent 55%),
        #0a0e13;
    color: #c9d1d9;
    font-family: ui-sans-serif, system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
    box-sizing: border-box;
    overflow: hidden;
}

.skc-agents-mock * { box-sizing: border-box; }

/* Header */
.skc-agents-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
    font-size: 11px;
    color: #c9d1d9;
}

.skc-agents-head .skc-agents-dots { display: flex; gap: 4px; }
.skc-agents-head .skc-agents-dots span {
    width: 6px; height: 6px; border-radius: 9999px;
    background: rgba(255, 255, 255, 0.12);
}

.skc-agents-title { font-weight: 500; color: #e6edf3; }

.skc-agents-meta {
    margin-left: auto;
    font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 9px;
    color: #8b949e;
    display: flex;
    align-items: center;
    gap: 6px;
}

.skc-agents-live {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #34d399;
    font-weight: 600;
}

.skc-agents-live .pd {
    width: 5px; height: 5px; border-radius: 9999px;
    background: #34d399;
    animation: skcAgentsLive 1.5s ease-in-out infinite;
}

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

/* Canvas */
.skc-agents-canvas {
    position: relative;
    flex: 1;
    min-height: 0;
    width: 100%;
    overflow: hidden;
}

.skc-agents-grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
    mask-image: radial-gradient(ellipse at center, black 55%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 55%, transparent 100%);
}

.skc-agents-edges {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    overflow: visible;
    z-index: 1;
}

.skc-agents-edge {
    fill: none;
    stroke: rgba(103, 192, 243, 0.2);
    stroke-width: 1.25;
    stroke-dasharray: 3 3;
    opacity: 0;
    animation: skcAgentsEdgeIn 400ms ease forwards;
}

.skc-agents-edge.is-master {
    stroke: rgba(33, 153, 234, 0.32);
    stroke-width: 1.5;
    stroke-dasharray: none;
}

@keyframes skcAgentsEdgeIn {
    to { opacity: 1; }
}

.skc-agents-packet {
    fill: #2199ea;
    filter: drop-shadow(0 0 3px rgba(33, 153, 234, 0.9));
}

.skc-agents-packet.is-up {
    fill: #34d399;
    filter: drop-shadow(0 0 3px rgba(52, 211, 153, 0.8));
}

/* Nodes */
.skc-agents-nodes {
    position: absolute; inset: 0;
    pointer-events: none;
    z-index: 2;
}

.skc-agents-node {
    position: absolute;
    transform: translate(-50%, -50%);
    background: #11161d;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 400ms ease, transform 400ms ease;
}

.skc-agents-node.is-visible { opacity: 1; }

.skc-agents-node .nd {
    width: 5px;
    height: 5px;
    border-radius: 9999px;
    background: #6b7280;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(107, 114, 128, 0.15);
}

.skc-agents-node .nn {
    font-size: 9.5px;
    color: #e6edf3;
    font-weight: 500;
}

/* Variants */
.skc-agents-node.is-master {
    background: linear-gradient(145deg, rgba(33, 153, 234, 0.2), rgba(33, 153, 234, 0.06));
    border-color: rgba(33, 153, 234, 0.45);
    padding: 6px 11px;
    box-shadow:
        0 0 0 3px rgba(33, 153, 234, 0.08),
        0 4px 14px rgba(0, 0, 0, 0.3);
}

.skc-agents-node.is-master .nd {
    background: #2199ea;
    box-shadow: 0 0 0 2px rgba(33, 153, 234, 0.25);
    animation: skcAgentsMaster 2s ease-in-out infinite;
}

.skc-agents-node.is-master .nn {
    color: #fff;
    font-weight: 600;
    font-size: 10.5px;
}

@keyframes skcAgentsMaster {
    0%, 100% { box-shadow: 0 0 0 2px rgba(33, 153, 234, 0.25); }
    50% { box-shadow: 0 0 0 4px rgba(33, 153, 234, 0.08); }
}

.skc-agents-node.is-area {
    background: linear-gradient(145deg, rgba(103, 192, 243, 0.12), rgba(17, 22, 29, 0.9));
    border-color: rgba(103, 192, 243, 0.32);
}

.skc-agents-node.is-area .nd { background: #67c0f3; }

.skc-agents-node.is-agent {
    background: rgba(17, 22, 29, 0.85);
    border-color: rgba(255, 255, 255, 0.08);
    padding: 3px 6px;
}

.skc-agents-node.is-agent .nn {
    font-size: 9px;
    color: #c9d1d9;
    font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

.skc-agents-node.is-agent .nd { width: 4px; height: 4px; }

/* Status colors on the dot */
.skc-agents-node[data-status="working"] .nd {
    background: #f59e0b;
    animation: skcAgentsWork 0.9s ease-in-out infinite;
}

@keyframes skcAgentsWork {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.5); }
    50% { opacity: 0.7; box-shadow: 0 0 0 4px rgba(245, 158, 11, 0); }
}

.skc-agents-node[data-status="done"] .nd { background: #34d399; }
.skc-agents-node[data-status="idle"] .nd { background: #6b7280; }

/* Legend */
.skc-agents-legend {
    position: absolute;
    left: 10px;
    bottom: 6px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 8.5px;
    color: #8b949e;
    letter-spacing: 0.04em;
    z-index: 3;
    pointer-events: none;
}

.skc-agents-legend span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.skc-agents-legend .ld {
    width: 7px; height: 7px; border-radius: 2px;
}

.skc-agents-legend .ld.is-master { background: #2199ea; }
.skc-agents-legend .ld.is-area { background: #67c0f3; }
.skc-agents-legend .ld.is-agent { background: #6b7280; }

@media (prefers-reduced-motion: reduce) {
    .skc-agents-node { transition: none; }
    .skc-agents-edge,
    .skc-agents-live .pd,
    .skc-agents-node.is-master .nd,
    .skc-agents-node[data-status="working"] .nd { animation: none; }
}
