/**
 * ================================================================
 * DASHBOARD MODERNE - CSS
 * ================================================================
 */

:root {
    --primary: #667eea;
    --secondary: #764ba2;
    --success: #06d6a0;
    --danger: #ef476f;
    --warning: #ffd166;
    --info: #118ab2;
    --gold: #ffd700;
}

* {
    font-family: 'Poppins', sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

/* ==================== NAVBAR ==================== */
.navbar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.3rem;
}

.nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

/* ==================== CONTAINER ==================== */
.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* ==================== HEADER ==================== */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.welcome-section h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
}

.welcome-section p {
    color: #6c757d;
    margin: 0.5rem 0 0 0;
}

.premium-badge {
    background: linear-gradient(135deg, var(--gold) 0%, #ffed4e 100%);
    color: #2c3e50;
    padding: 1rem 1.5rem;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

.premium-title {
    font-weight: 700;
    font-size: 1.1rem;
}

.premium-expires {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* ==================== QUICK STATS ==================== */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

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

.stat-primary .stat-icon {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.stat-success .stat-icon {
    background: linear-gradient(135deg, var(--success) 0%, #00b894 100%);
}

.stat-warning .stat-icon {
    background: linear-gradient(135deg, var(--warning) 0%, #f4a261 100%);
}

.stat-info .stat-icon {
    background: linear-gradient(135deg, var(--info) 0%, #0d7a9f 100%);
}

.stat-content {
    flex: 1;
}

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

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

/* ==================== CARDS ==================== */
.card-modern {
    background: white;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.card-header-modern {
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header-modern h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
}

.card-body-modern {
    padding: 1.5rem;
}

/* ==================== XP DISPLAY ==================== */
.xp-display {
    text-align: center;
}

.xp-circle {
    width: 150px;
    height: 150px;
    margin: 0 auto 1.5rem;
    position: relative;
}

.xp-circle svg {
    transform: rotate(-90deg);
}

.xp-bg {
    fill: none;
    stroke: #e9ecef;
    stroke-width: 10;
}

.xp-progress {
    fill: none;
    stroke: url(#xpGradient);
    stroke-width: 10;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease;
}

.xp-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.xp-level {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.xp-label {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 0.3rem;
}

.xp-bar-container {
    height: 10px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.xp-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 10px;
    transition: width 1s ease;
}

.xp-text {
    font-size: 0.9rem;
    color: #6c757d;
}

/* ==================== BADGES ==================== */
.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 1rem;
}

.badge-item {
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.badge-item:hover {
    transform: scale(1.05);
    background: #e9ecef;
}

.badge-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.badge-item.unlocked .badge-icon {
    filter: none;
}

.badge-item.locked .badge-icon {
    filter: grayscale(100%);
    opacity: 0.3;
}

.badge-name {
    font-size: 0.75rem;
    color: #6c757d;
    font-weight: 500;
}

/* ==================== LOADING ==================== */
.loading-spinner {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

.loading-spinner i {
    font-size: 2rem;
    display: block;
    margin-bottom: 1rem;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        text-align: center;
    }
    
    .welcome-section h1 {
        font-size: 1.5rem;
    }
    
    .quick-stats {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        justify-content: center;
    }
}