/* 仪表盘容器 */
.dashboard {
    padding: 20px;
    max-width: 1600px;
    margin: 0 auto;
}

/* 数据总览卡片区域 */
.overview-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.overview-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.overview-card:hover {
    transform: translateY(-2px);
}

.overview-card h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

.overview-card .total-value {
    font-size: 24px;
    font-weight: bold;
    color: #1a73e8;
    margin-bottom: 10px;
}

.overview-card .monthly-value {
    font-size: 16px;
    color: #666;
    margin-bottom: 5px;
}

.overview-card .growth-value {
    font-size: 14px;
}

.growth-value.positive {
    color: #34a853;
}

.growth-value.negative {
    color: #ea4335;
}

/* 图表区域 */
.chart-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.chart-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.chart-title {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.chart-controls {
    display: flex;
    gap: 10px;
}

/* 待办事项区域 */
.todo-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.todo-list {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.todo-list h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

.todo-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.todo-item:last-child {
    border-bottom: none;
}

/* 预警信息区域 */
.warnings-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.warning-item {
    padding: 10px;
    border-left: 4px solid #ea4335;
    background: #fef8f8;
    margin-bottom: 10px;
}

.warning-item:last-child {
    margin-bottom: 0;
}

/* 快捷操作区域 */
.quick-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.action-button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    background: #1a73e8;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.action-button:hover {
    background: #1557b0;
}

/* 折叠/展开功能 */
.dashboard-section {
    margin-bottom: 30px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.section-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.section-toggle i {
    transition: transform 0.3s ease;
}

.section-toggle i.rotated {
    transform: rotate(180deg);
}

.section-content.collapsed {
    display: none;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .chart-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .todo-container {
        grid-template-columns: 1fr;
    }
    
    .overview-cards {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* 错误消息 */
.error-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #ea4335;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 加载动画 */
.loading {
    position: relative;
    min-height: 200px;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1a73e8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
} 