﻿/* 通用样式已在 common.css 中定义 */
/* 这里是控制台特有的样式 */

.page-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.page-header h1 {
    color: #2c3e50;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.page-description {
    color: #6c757d;
    font-size: 16px;
    margin: 0;
}

/* 统计卡片网格 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #f1f3f4;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.stat-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    font-size: 28px;
}

.stat-icon.danger {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
}

.stat-icon.warning {
    background: linear-gradient(135deg, #feca57, #ff9ff3);
    color: white;
}

.stat-icon.success {
    background: linear-gradient(135deg, #48dbfb, #0abde3);
    color: white;
}

.stat-icon.info {
    background: linear-gradient(135deg, #00d2d3, #54a0ff);
    color: white;
}

.stat-content h3 {
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-number {
    color: #2c3e50;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1;
}

.stat-number span {
    font-size: 16px;
    font-weight: 400;
    color: #6c757d;
}

.stat-change {
    font-size: 13px;
    font-weight: 600;
}

.stat-change.positive {
    color: #28a745;
}

.stat-change.negative {
    color: #dc3545;
}

/* 内容网格 */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: auto auto;
    gap: 24px;
    height: calc(100vh - 200px);
}

.chart-section {
    grid-row: 1 / 3;
}

.alerts-section {
    grid-row: 1;
}

.recent-activities {
    grid-row: 2;
}

.section-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #f1f3f4;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f3f4;
}

.section-header h3 {
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.section-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.time-selector {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
    color: #495057;
}

/* 图表容器 */
.chart-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 16px;
    position: relative;
}

.chart-container::before {
    content: '📊 图表区域)';
    color: #6c757d;
    font-size: 14px;
    text-align: center;
    line-height: 1.5;
    white-space: pre-line;
}

/* 预警列表 */
.alerts-list {
    flex: 1;
    overflow-y: auto;
}

.alert-item {
    display: flex;
    align-items: flex-start;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    border-left: 4px solid;
}

.alert-item.high {
    background: #fff5f5;
    border-left-color: #ff6b6b;
}

.alert-item.medium {
    background: #fffaf0;
    border-left-color: #feca57;
}

.alert-icon {
    font-size: 20px;
    margin-right: 12px;
    margin-top: 2px;
}

.alert-content h4 {
    color: #2c3e50;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.alert-content p {
    color: #6c757d;
    font-size: 13px;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.alert-time {
    color: #adb5bd;
    font-size: 12px;
}

/* 活动列表 */
.activities-list {
    flex: 1;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    padding: 16px 0;
    border-bottom: 1px solid #f1f3f4;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    font-size: 20px;
    margin-right: 12px;
    margin-top: 2px;
}

.activity-content p {
    color: #2c3e50;
    font-size: 14px;
    margin-bottom: 4px;
    line-height: 1.4;
}

.activity-content p strong {
    color: #495057;
}

.activity-time {
    color: #adb5bd;
    font-size: 12px;
}

/* 内容占位符 */
.content-placeholder {
    background: #fff;
    border-radius: 12px;
    padding: 60px 30px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #f1f3f4;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.content-placeholder h3 {
    color: #6c757d;
    font-size: 18px;
    margin-bottom: 12px;
}

.content-placeholder p {
    color: #adb5bd;
    font-size: 14px;
    line-height: 1.5;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .content-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        height: auto;
    }
    
    .chart-section {
        grid-row: 1;
        height: 400px;
    }
    
    .alerts-section {
        grid-row: 2;
    }
    
    .recent-activities {
        grid-row: 3;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .content-grid {
        gap: 16px;
    }
    
    .section-card {
        padding: 20px;
    }
}