/* ===== AGENT TELEMETRY ===== */
.agent-telemetry {
    min-height: auto;
    padding: 5rem 3rem;
    background: linear-gradient(180deg, var(--black) 0%, var(--near-black) 100%);
    border-bottom: 1px solid var(--border-subtle);
}

.telemetry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.telemetry-header h2 {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.3em;
    color: var(--text-tertiary);
    text-transform: uppercase;
}

.telemetry-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6875rem;
    color: var(--text-tertiary);
}

.telemetry-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
}

.telemetry-dot.pulse {
    animation: telemetryPulse 2s ease-in-out infinite;
}

@keyframes telemetryPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.4);
        opacity: 1;
    }
    50% {
        box-shadow: 0 0 12px 4px rgba(45, 212, 191, 0.2);
        opacity: 0.8;
    }
}

.telemetry-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* Agent Cards */
.agent-card {
    --agent-color: var(--gold);
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: 2px;
    padding: 1.5rem;
    position: relative;
    transition: all 0.3s ease;
}

.agent-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--agent-color);
    opacity: 0.6;
}

.agent-card:hover {
    border-color: var(--agent-color);
    transform: translateY(-2px);
}

.agent-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-subtle);
}

.agent-icon {
    font-size: 1.25rem;
}

.agent-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: 0.1em;
}

.agent-role {
    font-size: 0.6875rem;
    color: var(--text-tertiary);
    margin-left: auto;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.agent-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.status-indicator.active {
    background: var(--green);
    box-shadow: 0 0 8px var(--green);
    animation: workingPulse 1.5s ease-in-out infinite;
}

.status-indicator.recent {
    background: #eab308;
    box-shadow: 0 0 4px rgba(234, 179, 8, 0.5);
}

.status-indicator.idle {
    background: var(--text-tertiary);
}

.status-indicator.offline {
    background: #6b7280;
    opacity: 0.6;
}

.status-indicator.unknown {
    background: var(--red, #ef4444);
}

/* Legacy support */
.status-indicator.working {
    background: var(--green);
    box-shadow: 0 0 8px var(--green);
    animation: workingPulse 1.5s ease-in-out infinite;
}

@keyframes workingPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.agent-task {
    font-size: 0.9375rem;
    color: var(--text);
    line-height: 1.5;
    margin-bottom: 0.75rem;
    min-height: 3em;
}

/* Current Task - Now Section */
.agent-current {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-subtle);
}

.current-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.625rem;
    color: var(--agent-color, var(--gold));
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0.25rem;
    opacity: 0.8;
}

.current-task {
    font-size: 0.9375rem;
    color: var(--text);
    line-height: 1.4;
}

/* Task History */
.agent-history {
    margin-bottom: 0.75rem;
    min-height: 4rem;
}

.history-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.5625rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0.5rem;
}

.history-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--border-subtle);
}

.history-item:last-child {
    border-bottom: none;
}

.history-item.empty,
.history-item.loading {
    color: var(--text-tertiary);
    font-style: italic;
    font-size: 0.75rem;
    justify-content: center;
}

.history-task {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.3;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.history-time {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.625rem;
    color: var(--text-tertiary);
    white-space: nowrap;
    flex-shrink: 0;
}

.agent-time {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6875rem;
    color: var(--text-tertiary);
}

/* Responsive */
@media (max-width: 900px) {
    .agent-telemetry {
        padding: 2rem 1rem;
    }

    .telemetry-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        margin-bottom: 1.5rem;
    }

    .telemetry-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .agent-card {
        padding: 1.25rem;
    }

    .agent-header {
        margin-bottom: 0.5rem;
        padding-bottom: 0.5rem;
    }

    .agent-current {
        margin-bottom: 0.75rem;
        padding-bottom: 0.5rem;
    }

    .agent-history {
        min-height: auto;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .telemetry-dot.pulse,
    .status-indicator.working {
        animation: none;
    }
}
