/* Statistics Tab Styles */

.stats-header {
    margin-bottom: 40px;
}

.stats-header h2 {
    font-size: 32px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 8px;
}

.stats-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
}

/* Main Stats Grid */
.stats-main-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

@media (min-width: 1400px) {
    .stats-main-grid {
        gap: 24px;
    }
}

.stat-card {
    background: rgba(12, 12, 18, 0.6);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    min-height: 180px;
    justify-content: space-between;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.4s;
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(124, 58, 237, 0.3);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card-primary::before {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1) 0%, transparent 100%);
}

.stat-card-primary:hover {
    border-color: var(--accent);
}

.stat-card-success::before {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, transparent 100%);
}

.stat-card-success:hover {
    border-color: var(--green);
}

.stat-card-warning::before {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, transparent 100%);
}

.stat-card-warning:hover {
    border-color: #f59e0b;
}

.stat-card-info::before {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, transparent 100%);
}

.stat-card-info:hover {
    border-color: #3b82f6;
}

.stat-card-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.stat-card-primary .stat-card-icon {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.2) 0%, rgba(124, 58, 237, 0.05) 100%);
    color: var(--accent);
}

.stat-card-success .stat-card-icon {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.05) 100%);
    color: var(--green);
}

.stat-card-warning .stat-card-icon {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(245, 158, 11, 0.05) 100%);
    color: #f59e0b;
}

.stat-card-info .stat-card-icon {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(59, 130, 246, 0.05) 100%);
    color: #3b82f6;
}

.stat-card-purple .stat-card-icon {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(139, 92, 246, 0.05) 100%);
    color: #8b5cf6;
}

.stat-card-icon svg {
    width: 30px;
    height: 30px;
}


.stat-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-card-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.1;
    word-break: break-word;
}

.stat-card-label {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.3;
}

.stat-card-change {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    margin-top: auto;
}

.stat-card-change svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.stat-card-change.positive {
    background: rgba(16, 185, 129, 0.15);
    color: var(--green);
}

.stat-card-change.negative {
    background: rgba(239, 68, 68, 0.15);
    color: var(--red);
}

.stat-card-change.neutral {
    background: rgba(100, 116, 139, 0.15);
    color: var(--text-secondary);
}

/* Charts Section */
.stats-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.stats-chart-card {
    background: rgba(12, 12, 18, 0.6);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 32px;
    backdrop-filter: blur(10px);
}

.stats-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.stats-chart-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
}

.stats-chart-period {
    display: flex;
    gap: 8px;
}

.period-btn {
    padding: 8px 16px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.period-btn:hover {
    background: rgba(124, 58, 237, 0.1);
    border-color: var(--accent);
    color: var(--accent);
}

.period-btn.active {
    background: linear-gradient(135deg, var(--accent) 0%, #9333ea 100%);
    border-color: var(--accent);
    color: white;
}

.stats-chart-placeholder {
    height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border: 2px dashed var(--border);
    border-radius: 16px;
    color: var(--text-secondary);
}

.stats-chart-placeholder svg {
    width: 64px;
    height: 64px;
    opacity: 0.5;
}

.stats-chart-placeholder p {
    font-size: 14px;
    text-align: center;
    max-width: 300px;
}

/* Additional Stats Grid */
.stats-additional-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stats-mini-card {
    background: rgba(12, 12, 18, 0.6);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    gap: 16px;
    align-items: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
}

.stats-mini-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.2);
}

.stats-mini-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stats-mini-icon svg {
    width: 24px;
    height: 24px;
}

.stats-mini-icon.purple {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.2) 0%, rgba(124, 58, 237, 0.05) 100%);
    color: var(--accent);
}

.stats-mini-icon.green {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.05) 100%);
    color: var(--green);
}

.stats-mini-icon.blue {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(59, 130, 246, 0.05) 100%);
    color: #3b82f6;
}

.stats-mini-icon.orange {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(245, 158, 11, 0.05) 100%);
    color: #f59e0b;
}

.stats-mini-icon.red {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(239, 68, 68, 0.05) 100%);
    color: var(--red);
}

.stats-mini-icon.cyan {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.2) 0%, rgba(6, 182, 212, 0.05) 100%);
    color: #06b6d4;
}

.stats-mini-content {
    flex: 1;
}

.stats-mini-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 4px;
    line-height: 1;
}

.stats-mini-label {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Responsive */
@media (max-width: 768px) {
    .stats-main-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-charts-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-additional-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .stats-chart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}
