/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* 头部样式 */
header {
    background-color: #2c3e50;
    color: white;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header h1 {
    margin-bottom: 15px;
    font-size: 24px;
    font-weight: bold;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

nav ul li a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.3s, color 0.3s;
    font-size: 14px;
}

nav ul li a:hover {
    background-color: rgba(255,255,255,0.2);
}

nav ul li a.active {
    background-color: #3498db;
    color: white;
}

/* 主内容区域 */
main {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 欢迎区域 */
.welcome h2 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 24px;
    font-weight: bold;
}

.welcome p {
    margin-bottom: 30px;
    font-size: 16px;
    line-height: 1.8;
    color: #666;
}

/* 功能卡片 */
.feature-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.card {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #e9ecef;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: #3498db;
}

.card h3 {
    margin-bottom: 10px;
    color: #3498db;
    font-size: 18px;
    font-weight: bold;
}

.card p {
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s, transform 0.2s;
    font-size: 14px;
    font-weight: bold;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

/* 表单样式 */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border-radius: 8px;
    overflow: hidden;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f2f2f2;
    font-weight: bold;
    color: #333;
}

tr:hover {
    background-color: #f5f5f5;
}

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

.stat-card {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border: 1px solid #e9ecef;
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.stat-card h3 {
    margin-bottom: 10px;
    color: #2c3e50;
    font-size: 14px;
    font-weight: bold;
}

.stat-card .value {
    font-size: 28px;
    font-weight: bold;
    color: #3498db;
}

/* 看板区域 */
.dashboard-section {
    margin-bottom: 30px;
}

.dashboard-section h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 18px;
    font-weight: bold;
}

/* 页脚 */
footer {
    text-align: center;
    padding: 20px;
    background-color: #2c3e50;
    color: white;
    margin-top: 30px;
    border-radius: 8px;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        gap: 10px;
    }
    
    .feature-cards {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    main {
        padding: 15px;
    }
    
    header {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    main {
        padding: 10px;
    }
    
    header {
        padding: 10px;
    }
    
    header h1 {
        font-size: 20px;
    }
}

/* 通用样式 */
.section {
    margin: 30px 0;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.section h3 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 18px;
    font-weight: bold;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.action-bar {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.form-section {
    margin: 20px 0;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border: 1px solid #e9ecef;
}

.form-section h4 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 16px;
    font-weight: bold;
}

.form-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

/* 风险等级样式 */
.risk-level {
    padding: 2px 8px;
    border-radius: 4px;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.risk-level.低风险 {
    background-color: #27ae60;
}

.risk-level.中风险 {
    background-color: #f39c12;
}

.risk-level.高风险 {
    background-color: #e74c3c;
}

/* 数据变化样式 */
.change {
    font-size: 12px;
    font-weight: bold;
    margin-top: 5px;
}

.change.positive {
    color: #27ae60;
}

.change.negative {
    color: #e74c3c;
}

/* 仪表盘样式 */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.dashboard-card {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border: 1px solid #e9ecef;
    transition: transform 0.3s, box-shadow 0.3s;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.dashboard-card h4 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 16px;
    font-weight: bold;
}

/* 图表样式 */
.chart-container {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border: 1px solid #e9ecef;
}

.chart-header {
    margin-bottom: 20px;
}

.chart-header h4 {
    color: #2c3e50;
    font-size: 16px;
    font-weight: bold;
}

/* 进度条样式 */
.progress-bar {
    height: 20px;
    background-color: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
    position: relative;
}

.progress-fill {
    height: 100%;
    background-color: #3498db;
    border-radius: 10px;
    transition: width 0.5s ease;
}

.progress-text {
    position: absolute;
    top: 0;
    right: 10px;
    line-height: 20px;
    font-size: 12px;
    color: white;
    font-weight: bold;
}

/* 时间选择器样式 */
.time-selector {
    display: flex;
    gap: 10px;
    align-items: center;
}

.time-selector select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.time-selector select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* 信息行样式 */
.info-row {
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.info-row .label {
    font-weight: bold;
    color: #333;
}

.info-row .value {
    color: #666;
}

/* 记录项样式 */
.record-item {
    margin-bottom: 20px;
    padding: 15px;
    background-color: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.record-item h4 {
    margin-bottom: 5px;
    color: #3498db;
    font-size: 14px;
    font-weight: bold;
}

.record-item p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

/* 分析卡片样式 */
.analysis-card {
    margin-bottom: 20px;
    padding: 15px;
    background-color: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.analysis-card h4 {
    margin-bottom: 10px;
    color: #2c3e50;
    font-size: 14px;
    font-weight: bold;
}

.analysis-result {
    margin-top: 10px;
}

.result-item {
    margin-bottom: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.result-item .label {
    font-weight: bold;
    color: #333;
}

.result-item .value {
    color: #666;
}