/* Executive Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    padding: 24px;
    max-width: 1400px;
    margin: 0 auto;
}

.metric-card {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 140px;
    transition: transform 0.2s;
}

.metric-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.1);
}

.metric-title {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    font-size: 36px;
    font-weight: 700;
    color: #1e293b;
    margin: 8px 0;
}

.metric-diff {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.metric-diff.positive {
    color: #10b981;
}

.metric-diff.negative {
    color: #ef4444;
}

/* Dashboard Charts */
.chart-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    min-height: 400px;
}

.chart-card {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.chart-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

.chart-canvas-container {
    flex: 1;
    position: relative;
    width: 100%;
    min-height: 300px;
}

/* Top Errors List */
.error-list {
    list-style: none;
}

.error-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

.error-name {
    font-weight: 500;
    color: #334155;
    font-size: 14px;
}

.error-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.error-agent {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 12px;
    background: #f1f5f9;
    color: #64748b;
    font-weight: 600;
}

.error-count {
    font-weight: 700;
    color: #ef4444;
}

/* Agent Collaboration View */
.agent-stage {
    min-height: 100vh;
    background: #0f172a;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px;
    overflow: hidden;
}

.agent-vis-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 40px;
}

/* Nodes */
.agent-node {
    width: 160px;
    height: 160px;
    background: rgba(30, 41, 59, 0.8);
    border: 2px solid #334155;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.agent-node.active {
    border-color: #3b82f6;
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.3);
    transform: scale(1.1);
    background: rgba(59, 130, 246, 0.1);
}

.agent-node.success {
    border-color: #10b981;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.agent-node.error {
    border-color: #ef4444;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.2);
}

.agent-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.agent-name {
    font-size: 14px;
    font-weight: 600;
    color: #e2e8f0;
}

.agent-status {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 4px;
}

/* Flow Lines */
.flow-line {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background: #334155;
    z-index: 1;
}

.flow-packet {
    position: absolute;
    top: 50%;
    left: 0;
    width: 12px;
    height: 12px;
    background: #3b82f6;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    display: none;
    box-shadow: 0 0 10px #3b82f6;
}

.flow-packet.animating {
    display: block;
    animation: flowMove 1.5s linear infinite;
}

@keyframes flowMove {
    0% {
        left: 10%;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        left: 90%;
        opacity: 0;
    }
}

/* Comparison Panel */
.comparison-panel {
    display: flex;
    gap: 40px;
    margin-top: 60px;
    width: 100%;
    max-width: 1000px;
}

.comp-card {
    flex: 1;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 24px;
}

.comp-header {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #94a3b8;
}

.comp-stat {
    font-size: 14px;
    color: #cbd5e1;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
}

.comp-stat b {
    color: white;
}

.comp-card.ai-card {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
}

.comp-card.ai-card .comp-header {
    color: #60a5fa;
}

/* Terminal Log */
.terminal-window {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 200px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 12px;
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    color: #94a3b8;
    overflow-y: auto;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.log-entry {
    margin-bottom: 4px;
    padding-left: 12px;
    border-left: 2px solid transparent;
}

.log-entry.info {
    border-left-color: #3b82f6;
    color: #e2e8f0;
}

.log-entry.success {
    border-left-color: #10b981;
    color: #a7f3d0;
}

.log-entry.error {
    border-left-color: #ef4444;
    color: #fecaca;
}

.log-time {
    color: #64748b;
    margin-right: 8px;
}