/* ==========================================
   青龙论坛 - 数据中心样式
   版本: 1.0.0
   更新日期: 2026-05-07
   ========================================== */

/* 页面标题 */
.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 4rem 0 3rem;
    margin-top: -1rem;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.page-header p {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 0;
}

.date-display {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
}

/* 核心指标卡片 */
.metrics-section {
    padding: 3rem 0;
    background: var(--body-bg);
}

.metric-card-large {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 1.75rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    height: 100%;
}

.metric-card-large:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.metric-card-large .metric-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.75rem;
    flex-shrink: 0;
}

.metric-card-large .metric-info h3 {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.metric-card-large .metric-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    display: block;
    line-height: 1.2;
    margin-bottom: 0.375rem;
}

.metric-card-large .metric-change {
    font-size: 0.875rem;
    font-weight: 600;
}

.metric-card-large .metric-change.up {
    color: var(--success-color);
}

.metric-card-large .metric-change.down {
    color: var(--danger-color);
}

/* 图表区域 */
.charts-section {
    padding: 3rem 0;
    background: #fff;
}

.chart-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
    height: 100%;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 1rem;
}

.chart-header h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0;
}

.chart-header h3 i {
    color: var(--primary-color);
}

.chart-actions {
    display: flex;
    gap: 0.5rem;
}

.chart-actions .btn {
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.375rem 0.875rem;
}

.chart-actions .btn.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.chart-body {
    padding: 1.5rem;
    height: 350px;
    position: relative;
}

.chart-body canvas {
    max-height: 100%;
}

/* 自定义图例 */
.chart-legend-custom {
    padding: 0 1.5rem 1.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--border-color);
}

.legend-item:last-child {
    border-bottom: none;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-label {
    flex: 1;
    font-size: 0.9375rem;
    color: var(--text-primary);
}

.legend-value {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

/* 数据表格区域 */
.data-table-section {
    padding: 3rem 0 5rem;
    background: var(--body-bg);
}

.table-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.table-card .table {
    margin-bottom: 0;
}

.table-card .table thead th {
    background: var(--light-color);
    border-bottom: 2px solid var(--border-color);
    font-weight: 700;
    color: var(--text-primary);
    padding: 1rem 1.25rem;
    white-space: nowrap;
}

.table-card .table tbody td {
    padding: 1.25rem;
    vertical-align: middle;
    color: var(--text-primary);
}

.table-card .table tbody tr {
    transition: var(--transition);
}

.table-card .table tbody tr:hover {
    background: rgba(13, 110, 253, 0.03);
}

/* 排名徽章 */
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.875rem;
    background: var(--light-color);
    color: var(--text-secondary);
}

.rank-badge.rank-1 {
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    color: #fff;
    box-shadow: 0 2px 8px rgba(255, 170, 0, 0.4);
}

.rank-badge.rank-2 {
    background: linear-gradient(135deg, #c0c0c0, #a0a0a0);
    color: #fff;
}

.rank-badge.rank-3 {
    background: linear-gradient(135deg, #cd7f32, #b87333);
    color: #fff;
}

/* 数据信息 */
.data-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.data-name {
    font-weight: 600;
    color: var(--text-primary);
}

.data-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* 表格分页 */
.table-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.pagination {
    gap: 0.375rem;
}

.page-link {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 500;
    padding: 0.5rem 0.875rem;
    transition: var(--transition);
}

.page-link:hover {
    background: var(--light-color);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.page-item.disabled .page-link {
    color: var(--text-secondary);
    background: var(--light-color);
}

/* 响应式设计 */
@media (max-width: 991.98px) {
    .page-header {
        padding: 3rem 0 2rem;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .chart-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .chart-body {
        height: 300px;
    }
    
    .metric-card-large {
        padding: 1.25rem;
    }
    
    .metric-card-large .metric-icon {
        width: 52px;
        height: 52px;
        font-size: 1.5rem;
    }
    
    .metric-card-large .metric-value {
        font-size: 1.5rem;
    }
}

@media (max-width: 767.98px) {
    .page-header h1 {
        font-size: 1.75rem;
    }
    
    .date-display {
        margin-top: 1rem;
    }
    
    .chart-body {
        height: 250px;
        padding: 1rem;
    }
    
    .table-card .table thead th,
    .table-card .table tbody td {
        padding: 0.875rem;
        font-size: 0.875rem;
    }
    
    .data-desc {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .metric-card-large {
        flex-direction: column;
        text-align: center;
    }
    
    .chart-actions {
        width: 100%;
    }
    
    .chart-actions .btn {
        flex: 1;
    }
}
