/* 数据监控页面样式 */

/* ==================== 图表容器 ==================== */

.chart-container {
    position: relative;
    height: 280px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 16px;
}

.chart-container canvas {
    max-height: 100%;
}

/* ==================== 统计卡片 ==================== */

.stat-card {
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    text-align: center;
    color: white;
}

.stat-card .stat-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.stat-card .stat-number {
    font-size: 28px;
    font-weight: bold;
}

/* ==================== 异常列表 ==================== */

.anomaly-list, .quality-list, .stream-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.anomaly-item, .quality-item, .stream-item {
    padding: 12px;
    background: #f9fafb;
    border-left: 4px solid var(--primary-color);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.anomaly-item:hover, .quality-item:hover, .stream-item:hover {
    background: #f3f4f6;
    transform: translateX(4px);
}

.anomaly-item strong, .quality-item strong, .stream-item strong {
    color: var(--text-primary);
    font-size: 15px;
}

/* ==================== 健康状态徽章 ==================== */

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
}

.badge.bg-success {
    background: #10b981;
    color: white;
}

.badge.bg-warning {
    background: #f59e0b;
    color: white;
}

.badge.bg-danger {
    background: #ef4444;
    color: white;
}

.badge.bg-secondary {
    background: #6b7280;
    color: white;
}

.badge.bg-primary {
    background: #4f46e5;
    color: white;
}

/* ==================== 响应式设计 ==================== */

@media (max-width: 768px) {
    .chart-container {
        height: 220px;
        padding: 12px;
    }

    .stat-card .stat-number {
        font-size: 24px;
    }

    .anomaly-item, .quality-item, .stream-item {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .chart-container {
        height: 200px;
        padding: 8px;
    }

    .stat-card .stat-number {
        font-size: 20px;
    }
}

/* ==================== 深色模式 ==================== */

@media (prefers-color-scheme: dark) {
    .chart-container {
        background: rgba(255, 255, 255, 0.05);
    }

    .anomaly-item, .quality-item, .stream-item {
        background: rgba(255, 255, 255, 0.05);
        border-left-color: var(--primary-color);
    }

    .anomaly-item:hover, .quality-item:hover, .stream-item:hover {
        background: rgba(255, 255, 255, 0.08);
    }
}

/* ==================== 加载动画 ==================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chart-container {
    animation: fadeIn 0.4s ease-out;
}
