/* 仪表盘特有样式 */

/* 页面标题 */
.dashboard-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.dashboard-subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 30px;
}

/* 数据卡片容器 */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

/* 数据卡片样式 */
.dashboard-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #1890ff;
}

.dashboard-card.card-green::before {
    background: #52c41a;
}

.dashboard-card.card-orange::before {
    background: #faad14;
}

.dashboard-card.card-red::before {
    background: #f5222d;
}

.dashboard-card-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 36px;
    color: rgba(24, 144, 255, 0.1);
}

.dashboard-card.card-green .dashboard-card-icon {
    color: rgba(82, 196, 26, 0.1);
}

.dashboard-card.card-orange .dashboard-card-icon {
    color: rgba(250, 173, 20, 0.1);
}

.dashboard-card.card-red .dashboard-card-icon {
    color: rgba(245, 34, 45, 0.1);
}

.dashboard-card-title {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.dashboard-card-value {
    font-size: 28px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.dashboard-card-desc {
    font-size: 12px;
    color: #999;
}

.dashboard-card-change {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-left: 5px;
}

.dashboard-card-change.positive {
    background: #f6ffed;
    color: #52c41a;
}

.dashboard-card-change.negative {
    background: #fff2f0;
    color: #f5222d;
}

/* 图表容器 */
.dashboard-charts {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

@media (min-width: 992px) {
    .dashboard-charts {
        grid-template-columns: 2fr 1fr;
    }
}

.chart-container {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.chart-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.chart-content {
    height: 300px;
}

/* 统计数据容器 */
.dashboard-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

@media (min-width: 768px) {
    .dashboard-stats {
        grid-template-columns: 1fr 1fr;
    }
}

/* 最近活动表格 */
.recent-activities {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.activity-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.activity-link {
    font-size: 12px;
    color: #1890ff;
    text-decoration: none;
}

.activity-link:hover {
    color: #40a9ff;
}

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

.activity-table th,
.activity-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.activity-table th {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    background: #fafafa;
}

.activity-table td {
    font-size: 14px;
    color: #333;
}

.activity-table tr:last-child td {
    border-bottom: none;
}

.activity-type {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.activity-type.login {
    background: #e6f7ff;
    color: #1890ff;
}

.activity-type.update {
    background: #f6ffed;
    color: #52c41a;
}

.activity-type.delete {
    background: #fff2f0;
    color: #f5222d;
}

.activity-type.create {
    background: #fffbe6;
    color: #faad14;
}

.activity-time {
    font-size: 12px;
    color: #999;
}

/* 快捷操作区域 */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.quick-action-item {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #f0f0f0;
}

.quick-action-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-color: #1890ff;
}

.quick-action-icon {
    font-size: 32px;
    color: #1890ff;
    margin-bottom: 10px;
}

.quick-action-text {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

/* 进度条样式 */
.progress-container {
    margin-bottom: 20px;
}

.progress-title {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
}

.progress-bar {
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #1890ff;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-fill.green {
    background: #52c41a;
}

.progress-fill.orange {
    background: #faad14;
}

.progress-fill.red {
    background: #f5222d;
}

/* 日历组件样式 */
.dashboard-calendar {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.calendar-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

/* 提醒事项样式 */
.reminders {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.reminder-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.reminder-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.reminder-item {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

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

.reminder-icon {
    font-size: 16px;
    color: #faad14;
    margin-top: 2px;
}

.reminder-content {
    flex: 1;
}

.reminder-text {
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
}

.reminder-time {
    font-size: 12px;
    color: #999;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .dashboard-cards {
        grid-template-columns: 1fr;
    }
    
    .dashboard-card {
        padding: 15px;
    }
    
    .dashboard-card-value {
        font-size: 24px;
    }
    
    .chart-container {
        padding: 15px;
    }
    
    .chart-content {
        height: 250px;
    }
    
    .recent-activities {
        padding: 15px;
    }
    
    .activity-table th,
    .activity-table td {
        padding: 8px;
        font-size: 12px;
    }
    
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .quick-action-item {
        padding: 15px;
    }
    
    .quick-action-icon {
        font-size: 24px;
    }
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
    .dashboard-card,
    .chart-container,
    .recent-activities,
    .quick-action-item,
    .dashboard-calendar,
    .reminders {
        background: #1f1f1f;
        color: #fff;
    }
    
    .dashboard-card-title,
    .dashboard-card-desc,
    .chart-title,
    .activity-title,
    .activity-table th,
    .progress-title,
    .calendar-title,
    .reminder-title,
    .reminder-time {
        color: #ccc;
    }
    
    .dashboard-card-value,
    .activity-table td,
    .quick-action-text,
    .reminder-text {
        color: #fff;
    }
    
    .dashboard-card-icon {
        color: rgba(24, 144, 255, 0.05);
    }
    
    .dashboard-card::before {
        filter: brightness(0.8);
    }
}