* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 28px;
    margin-bottom: 8px;
}

.subtitle {
    opacity: 0.9;
    font-size: 14px;
}

.header-info {
    font-size: 14px;
    opacity: 0.9;
}

/* 统计卡片 */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    text-align: center;
    border-left: 4px solid;
}

.stat-card.total { border-left-color: #667eea; }
.stat-card.critical { border-left-color: #dc2626; }
.stat-card.severe { border-left-color: #ea580c; }
.stat-card.moderate { border-left-color: #f59e0b; }
.stat-card.mild { border-left-color: #3b82f6; }
.stat-card.normal { border-left-color: #10b981; }

.stat-number {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 8px;
}

.stat-card.total .stat-number { color: #667eea; }
.stat-card.critical .stat-number { color: #dc2626; }
.stat-card.severe .stat-number { color: #ea580c; }
.stat-card.moderate .stat-number { color: #f59e0b; }
.stat-card.mild .stat-number { color: #3b82f6; }
.stat-card.normal .stat-number { color: #10b981; }

.stat-label {
    font-size: 14px;
    color: #666;
}

/* 筛选区域 */
.filter-section {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    font-size: 14px;
    color: #666;
    white-space: nowrap;
}

.filter-group input,
.filter-group select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    min-width: 120px;
}

.btn-primary,
.btn-secondary {
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a67d8;
}

.btn-secondary {
    background: #e5e7eb;
    color: #374151;
}

.btn-secondary:hover {
    background: #d1d5db;
}

/* 表格 */
.table-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #475569;
    font-size: 14px;
}

.data-table tbody tr:hover {
    background: #f8fafc;
}

/* 风险等级标签 */
.risk-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.risk-badge.critical {
    background: #dc2626;
    animation: pulse 2s infinite;
}

.risk-badge.severe {
    background: #ea580c;
}

.risk-badge.moderate {
    background: #f59e0b;
}

.risk-badge.mild {
    background: #3b82f6;
}

.risk-badge.normal {
    background: #10b981;
}

/* 干预状态标签专用颜色 */
.risk-badge.intervention-ongoing {
    background: #f9a8d4;
}

.risk-badge.intervention-completed {
    background: #cbd5e1;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px;
    color: #999;
}

/* 弹窗 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 20px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
}

.close-btn:hover {
    color: #333;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: 60vh;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #eee;
    text-align: right;
}

/* 详情样式 */
.detail-section {
    margin-bottom: 24px;
}

.detail-section h3 {
    font-size: 16px;
    color: #667eea;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0e7ff;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.detail-item {
    display: flex;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
}

.detail-label {
    color: #666;
    width: 100px;
    flex-shrink: 0;
}

.detail-value {
    font-weight: 500;
    color: #333;
}

.score-highlight {
    font-size: 24px;
    font-weight: bold;
    color: #dc2626;
}

/* 风险警告 */
.risk-alert {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.risk-alert.critical {
    background: #fef2f2;
    border-color: #dc2626;
}

.risk-alert-title {
    font-weight: bold;
    color: #dc2626;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.risk-alert-content {
    color: #991b1b;
    font-size: 14px;
    line-height: 1.6;
}

/* 响应式 */
@media (max-width: 768px) {
    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .filter-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-group input,
    .filter-group select {
        flex: 1;
    }
    
    .data-table {
        font-size: 12px;
    }
    
    .data-table th,
    .data-table td {
        padding: 12px 8px;
    }
}
