/* 管理后台样式 */

/* 全局样式优化 */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-radius: 0.5rem;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --box-shadow-lg: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* 图表容器样式 */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
    margin-bottom: 2rem;
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
    border: 1px solid #e9ecef;
}

.chart-container canvas {
    max-height: 300px !important;
}

/* 确保图表不会无限延伸 */
#orderTrendChart,
#venueDistributionChart,
#userGrowthChart,
#revenueChart {
    max-height: 300px !important;
    height: 300px !important;
}

/* 统计卡片优化 */
.stat-card {
    background: #fff;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-lg);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

.stat-change {
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

.stat-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

/* 图表头部样式 */
.chart-header h5 {
    color: var(--dark-color);
    font-weight: 600;
}

.chart-header p {
    font-size: 0.875rem;
}

/* 图表洞察样式 */
.chart-insights {
    background: #f8f9fa;
    border-radius: 0.375rem;
    padding: 1rem;
}

.insight-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

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

/* 活动流样式 */
.activity-feed {
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    padding: 1rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s ease;
}

.activity-item:hover {
    background-color: #f8f9fa;
}

.activity-avatar {
    flex-shrink: 0;
}

.activity-meta {
    margin-top: 0.5rem;
}

/* 待办事项样式 */
.todo-list {
    max-height: 300px;
    overflow-y: auto;
}

.todo-item {
    transition: all 0.2s ease;
}

.todo-item:hover {
    background-color: #f8f9fa;
}

.todo-item.completed {
    opacity: 0.6;
    text-decoration: line-through;
}

/* 面包屑导航样式 */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: #6c757d;
}

/* 快捷操作面板样式 */
#quick-actions .card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* 页面标题样式 */
#page-title {
    color: var(--dark-color);
    font-weight: 700;
}

#page-subtitle {
    font-size: 0.875rem;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .stat-card {
        padding: 1rem;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .chart-container {
        padding: 1rem;
    }
    
    .activity-item {
        padding: 0.75rem;
    }
}
.sidebar {
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.sidebar .nav-link {
    color: rgba(255,255,255,0.8);
    padding: 12px 20px;
    border-radius: 8px;
    margin: 4px 12px;
    transition: all 0.3s ease;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: white;
    background-color: rgba(255,255,255,0.1);
    transform: translateX(5px);
}

.sidebar .nav-link i {
    width: 20px;
    margin-right: 10px;
}

.main-content {
    background-color: #f8f9fa;
    min-height: 100vh;
}

.content-header {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--dark-color);
}

.stat-label {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

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

/* 商家后台样式 */
.merchant-sidebar {
    background: linear-gradient(180deg, #28a745 0%, #20c997 100%);
}

.merchant-sidebar .nav-link {
    color: rgba(255,255,255,0.8);
    padding: 12px 20px;
    border-radius: 8px;
    margin: 4px 12px;
    transition: all 0.3s ease;
}

.merchant-sidebar .nav-link:hover,
.merchant-sidebar .nav-link.active {
    color: white;
    background-color: rgba(255,255,255,0.1);
    transform: translateX(5px);
}

.merchant-sidebar .nav-link i {
    width: 20px;
    margin-right: 10px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        min-height: auto;
    }
    
    .stat-card {
        margin-bottom: 15px;
    }
    
    .chart-container {
        padding: 15px;
    }
}

/* 表格样式增强 */
.table-hover tbody tr:hover {
    background-color: rgba(0,123,255,0.05);
}

/* 按钮样式增强 */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* 模态框样式增强 */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.modal-header .btn-close {
    filter: invert(1);
}

/* 表单样式增强 */
.form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

/* 徽章样式增强 */
.badge {
    font-size: 0.75rem;
    padding: 0.5em 0.75em;
    border-radius: 6px;
}

/* 进度条样式增强 */
.progress {
    height: 8px;
    border-radius: 4px;
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: 4px;
}

/* 卡片样式增强 */
.card {
    border-radius: 12px;
    border: none;
    overflow: hidden;
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    font-weight: 600;
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
