/* 综合态势页面样式 */
.dashboard-container {
    padding: 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
}

/* 页面标题 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 10px;
}

.page-header h2 {
    color: #2c3e50;
    font-size: 24px;
    font-weight: 600;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-actions {
    display: flex;
    gap: 10px;
}

.refresh-btn {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.refresh-btn i {
    animation: none;
    transition: transform 0.3s ease;
}

.refresh-btn:hover i {
    transform: rotate(180deg);
}

/* KPI指标卡片区域 */
.kpi-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.kpi-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.kpi-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.kpi-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    background: linear-gradient(45deg, #3498db, #2980b9);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.kpi-icon.alarm {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.kpi-content {
    flex: 1;
}

.kpi-value {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 4px;
    line-height: 1;
}

.kpi-label {
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 8px;
}

.kpi-trend {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

.kpi-trend.positive {
    color: #27ae60;
}

.kpi-trend.negative {
    color: #e74c3c;
}

.kpi-trend.stable {
    color: #f39c12;
}

/* 图表区域 */
.charts-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.chart-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

.chart-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    transition: all 0.3s ease;
}

.chart-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

.chart-card.wide {
    grid-column: span 2;
}

.chart-card.full-width {
    grid-column: 1 / -1;
}

.chart-header {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(90deg, rgba(52, 152, 219, 0.05), rgba(41, 128, 185, 0.05));
}

.chart-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.chart-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-btn {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.chart-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.time-selector {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    background: white;
    cursor: pointer;
}

.legend-items {
    display: flex;
    gap: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #7f8c8d;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.status-indicators {
    display: flex;
    gap: 10px;
}

.status-indicator {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    color: white;
}

.status-indicator.urgent {
    background: #e74c3c;
}

.status-indicator.warning {
    background: #f39c12;
}

.status-indicator.info {
    background: #3498db;
}

.chart-content {
    padding: 20px;
}

.chart {
    width: 100%;
    height: 300px;
}

/* 地图容器特殊样式 */
#overviewMap {
    width: 100%;
    height: 400px !important;
    min-height: 400px;
}

/* 告警列表容器特殊样式 */
#alarmList {
    height: 400px !important;
    min-height: 400px;
}

/* 告警滚动列表 */
.alarm-scroll-list {
    height: 400px;
    overflow-y: auto;
    padding: 0;
    position: relative;
}

.alarm-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
}

.alarm-item:hover {
    background: rgba(52, 152, 219, 0.05);
    transform: translateX(5px);
}

.alarm-item:last-child {
    border-bottom: none;
}

.alarm-status {
    width: 8px;
    height: 40px;
    border-radius: 4px;
    flex-shrink: 0;
}

.alarm-status.urgent {
    background: linear-gradient(180deg, #e74c3c, #c0392b);
    animation: pulse 2s infinite;
}

.alarm-status.warning {
    background: linear-gradient(180deg, #f39c12, #e67e22);
}

.alarm-status.info {
    background: linear-gradient(180deg, #3498db, #2980b9);
}

.alarm-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
    flex-shrink: 0;
}

.alarm-icon.urgent {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
}

.alarm-icon.warning {
    background: linear-gradient(45deg, #f39c12, #e67e22);
}

.alarm-icon.info {
    background: linear-gradient(45deg, #3498db, #2980b9);
}

.alarm-details {
    flex: 1;
    min-width: 0;
}

.alarm-title {
    font-weight: 600;
    font-size: 14px;
    color: #2c3e50;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.alarm-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #7f8c8d;
}

.alarm-time {
    display: flex;
    align-items: center;
    gap: 4px;
}

.alarm-location {
    display: flex;
    align-items: center;
    gap: 4px;
}

.alarm-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.action-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.3s ease;
}

.action-btn.locate {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
}

.action-btn.detail {
    background: linear-gradient(45deg, #2ecc71, #27ae60);
    color: white;
}

.action-btn:hover {
    transform: scale(1.1);
}

/* 滚动条样式 */
.alarm-scroll-list::-webkit-scrollbar {
    width: 6px;
}

.alarm-scroll-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.alarm-scroll-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #3498db, #2980b9);
    border-radius: 3px;
}

.alarm-scroll-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #2980b9, #3498db);
}

/* 动画效果 */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

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

.kpi-card, .chart-card {
    animation: slideIn 0.6s ease forwards;
}

.kpi-card:nth-child(1) { animation-delay: 0.1s; }
.kpi-card:nth-child(2) { animation-delay: 0.2s; }
.kpi-card:nth-child(3) { animation-delay: 0.3s; }
.kpi-card:nth-child(4) { animation-delay: 0.4s; }

/* 响应式设计 */
@media (max-width: 1200px) {
    .chart-card.wide {
        grid-column: span 1;
    }
    
    .legend-items {
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 768px) {
    .dashboard-container {
        padding: 10px;
    }
    
    .kpi-section {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .chart-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .page-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .chart-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .alarm-meta {
        flex-direction: column;
        gap: 4px;
    }
}