/* User Statistics Dashboard Styles */
.user-statistics-dashboard {
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #c03732;
}

.dashboard-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.8rem;
}

.refresh-info {
    color: #666;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

#refresh-timer {
    font-weight: bold;
    color: #c03732;
    font-family: monospace;
    background: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

#manual-refresh {
    padding: 5px 15px;
    background: #c03732;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

#manual-refresh:hover {
    background: #a0302a;
}

#manual-refresh:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: rgba(255,255,255,0.3);
}

.stat-card h3 {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 10px 0;
    line-height: 1;
}

.stat-change, .stat-percentage, .stat-info {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 10px;
}

.detailed-stats {
    background: white;
    border-radius: 10px;
    padding: 25px;
    margin-top: 30px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.detailed-stats h3 {
    margin-top: 0;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.stats-table {
    overflow-x: auto;
    margin-top: 15px;
}

.stats-table table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.stats-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    background: #f8f8f8;
    border-bottom: 2px solid #ddd;
}

.stats-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

.stats-table tr:hover td {
    background: #f9f9f9;
}

.last-updated {
    text-align: center;
    margin-top: 20px;
    color: #666;
    font-size: 0.9rem;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* Notification styles */
.stats-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 5px;
    color: white;
    z-index: 10000;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    animation: slideIn 0.3s ease;
    max-width: 350px;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-success {
    background: #2EC4B6;
}

.notification-error {
    background: #c03732;
}

/* Responsive styles */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .detailed-stats {
        padding: 15px;
    }
    
    .stats-table table {
        min-width: 100%;
    }

    .refresh-info {
        margin-top: 10px;
    }
}

@media (max-width: 480px) {
    .user-statistics-dashboard {
        padding: 15px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}
