/**
 * Dashboard Styles
 */

.dashboard-container {
    max-width: 1600px;
    margin: 0 auto;
}

/* Page Header */
.page-header {
    margin-bottom: 32px;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.page-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    margin: 0;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all var(--transition-fast);
}

.stat-card:hover {
    border-color: var(--border-focus);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon svg {
    color: white;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1;
}

.stat-change {
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.stat-change.positive {
    color: var(--success);
}

.stat-change.negative {
    color: var(--danger);
}

.stat-change.neutral {
    color: var(--text-muted);
}

/* Charts Row */
.charts-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.chart-select {
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    outline: none;
    transition: all var(--transition-fast);
}

.chart-select:hover {
    border-color: var(--border-focus);
}

.chart-select:focus {
    border-color: var(--primary);
}

.chart-container {
    position: relative;
    height: 300px;
}

.chart-container canvas {
    max-height: 100%;
}

/* Activity Card */
.activity-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.view-all-link {
    font-size: 14px;
    color: var(--primary);
    font-weight: 500;
    transition: color var(--transition-fast);
}

.view-all-link:hover {
    color: var(--primary-hover);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.activity-loading {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 14px;
}

.activity-item {
    display: flex;
    align-items: start;
    gap: 16px;
    padding: 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.activity-item:hover {
    border-color: var(--border-focus);
    background: var(--bg-hover);
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-icon.primary {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary);
}

.activity-icon.success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.activity-icon.warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.activity-icon.danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.activity-description {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.activity-time {
    font-size: 12px;
    color: var(--text-muted);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state svg {
    width: 80px;
    height: 80px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

/* Responsive */
@media (max-width: 1200px) {
    .charts-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .page-title {
        font-size: 24px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-icon {
        width: 56px;
        height: 56px;
    }
    
    .stat-value {
        font-size: 28px;
    }
    
    .chart-card {
        padding: 20px;
    }
    
    .chart-container {
        height: 250px;
    }
    
    .activity-card {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .page-header {
        margin-bottom: 24px;
    }
    
    .page-title {
        font-size: 20px;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* Loading Animation */
@keyframes shimmer {
    0% {
        background-position: -468px 0;
    }
    100% {
        background-position: 468px 0;
    }
}

.skeleton {
    animation: shimmer 1.2s ease-in-out infinite;
    background: linear-gradient(
        to right,
        var(--bg-tertiary) 0%,
        var(--bg-hover) 20%,
        var(--bg-tertiary) 40%,
        var(--bg-tertiary) 100%
    );
    background-size: 800px 100px;
    border-radius: var(--radius);
}

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
}

.skeleton-title {
    height: 24px;
    width: 60%;
    margin-bottom: 12px;
}