/* ============================================
   Bar Charts
   ============================================ */
.chart-container {
    padding: var(--space-md) 0;
}

.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: var(--space-md);
    height: 200px;
    padding-bottom: 30px;
    position: relative;
}

.bar-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
}

.bar {
    width: 100%;
    max-width: 48px;
    background: linear-gradient(to top, rgba(52, 211, 153, 0.3), rgba(52, 211, 153, 0.6));
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    position: relative;
    transition: height 0.6s ease;
}

.bar-current {
    background: linear-gradient(to top, rgba(52, 211, 153, 0.5), rgba(52, 211, 153, 0.9));
}

.bar::after {
    content: attr(data-label);
    position: absolute;
    bottom: -24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.bar-val {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent-green);
    white-space: nowrap;
}

.hbar-chart {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    padding: var(--space-md) 0;
}

.hbar-row {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.hbar-label {
    width: 80px;
    font-size: 0.8rem;
    text-align: right;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.hbar-track {
    flex: 1;
    height: 20px;
    background: var(--bg-hover);
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.hbar-fill {
    height: 100%;
    background: linear-gradient(90deg, rgba(52, 211, 153, 0.4), rgba(52, 211, 153, 0.8));
    border-radius: var(--radius-pill);
    transition: width 0.8s ease;
}

.hbar-warn {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.4), rgba(245, 158, 11, 0.8));
}

.hbar-val {
    width: 40px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-green);
}


/* ============================================
   Anomaly & Knowledge
   ============================================ */
.anomaly-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.anomaly-item {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    border-left: 4px solid;
}

.anomaly-high {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.anomaly-mid {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.05);
}

.anomaly-low {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.05);
}

.anomaly-badge {
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.65rem;
    font-weight: 700;
    align-self: start;
    flex-shrink: 0;
}

.anomaly-high .anomaly-badge {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.anomaly-mid .anomaly-badge {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.anomaly-low .anomaly-badge {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.anomaly-body strong {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.anomaly-body p {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.knowledge-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.knowledge-item {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.knowledge-item:hover {
    border-color: var(--border-glow);
}

.knowledge-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.knowledge-item strong {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.knowledge-item p {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

