.gsp-widget,
.gsp-profile-page,
.gsp-leaderboard {
    font-family: 'Space Grotesk', sans-serif;
    color: #171717;
}

/* ─── Widget ─── */
.gsp-widget {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.gsp-widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.gsp-widget-title { font-weight: 700; font-size: 15px; }
.gsp-current-rank {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #366eff;
    background: #eff6ff;
    padding: 4px 10px;
    border-radius: 20px;
}
.gsp-points-display {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 12px;
}
.gsp-points-value { font-size: 40px; font-weight: 700; color: #366eff; }
.gsp-points-label { font-size: 14px; color: #9ca3af; font-weight: 500; }

.gsp-progress-wrap { margin-bottom: 16px; }
.gsp-progress-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 4px;
}
.gsp-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #366eff, #73ACF8);
    border-radius: 8px;
    transition: width .4s ease;
}
.gsp-progress-wrap small { font-size: 12px; color: #9ca3af; }

.gsp-badges-row { display: flex; flex-wrap: wrap; gap: 8px; }
.gsp-badge-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 500;
}
.gsp-badge-pill img { width: 20px; height: 20px; object-fit: contain; }
.gsp-rank-icon { height: 20px; }

/* ─── Profile page ─── */
.gsp-profile-page { max-width: 800px; margin: 0 auto; }
.gsp-section { margin-top: 32px; }
.gsp-section h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #171717;
}

.gsp-badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
}
.gsp-badge-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    transition: transform .15s;
}
.gsp-badge-card:hover { transform: translateY(-2px); }
.gsp-badge-card.locked { opacity: .45; filter: grayscale(1); }
.gsp-badge-card.earned { border-color: #bbf7d0; background: #f0fdf4; }
.gsp-badge-img { font-size: 36px; margin-bottom: 8px; }
.gsp-badge-img img { width: 48px; height: 48px; object-fit: contain; }
.gsp-badge-name { font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.gsp-badge-desc { font-size: 11px; color: #9ca3af; }

.gsp-history { list-style: none; margin: 0; padding: 0; }
.gsp-history li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
}
.gsp-history li:last-child { border-bottom: none; }
.gsp-history small { color: #9ca3af; margin-left: auto; }

/* ─── Leaderboard ─── */
.gsp-leaderboard {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}
.gsp-leaderboard-header {
    background: linear-gradient(135deg, #366eff, #73ACF8);
    color: #fff;
    padding: 16px 20px;
    font-weight: 700;
    font-size: 16px;
    font-family: 'Space Grotesk', sans-serif;
}
.gsp-leaderboard-list { list-style: none; margin: 0; padding: 0; }
.gsp-leaderboard-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid #e5e7eb;
    font-family: 'Space Grotesk', sans-serif;
}
.gsp-leaderboard-row:last-child { border-bottom: none; }
.gsp-leaderboard-row.is-me { background: #eff6ff; }
.gsp-lb-pos { font-size: 18px; min-width: 36px; }
.gsp-lb-avatar img { width: 32px; height: 32px; border-radius: 50%; }
.gsp-lb-name { flex: 1; font-weight: 500; font-size: 14px; }
.gsp-lb-name em { font-style: normal; color: #366eff; font-size: 12px; }
.gsp-lb-pts { font-weight: 700; color: #366eff; font-size: 14px; white-space: nowrap; }
.gsp-lb-bar { width: 80px; height: 6px; background: #e5e7eb; border-radius: 6px; overflow: hidden; }
.gsp-lb-bar div { height: 100%; background: linear-gradient(90deg, #366eff, #73ACF8); }
.gsp-lb-mypos {
    padding: 12px 20px;
    font-size: 13px;
    color: #9ca3af;
    border-top: 1px solid #e5e7eb;
    text-align: center;
    font-family: 'Space Grotesk', sans-serif;
}

/* ─── Shared type pills (used in history) ─── */
.gsp-type-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}
.gsp-type-points { background: #eff6ff; color: #366eff; }
.gsp-type-badge  { background: #f0fdf4; color: #16a34a; }
.gsp-type-rank   { background: #fefce8; color: #ca8a04; }

/* ─── Tutor Dashboard Sidebar Profile ─── */
.gsp-sidebar-profile {
    padding: 8px 20px 14px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 4px;
}
.gsp-sb-points {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #366eff;
    margin-bottom: 8px;
}
.gsp-sidebar-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.gsp-sb-badge {
    width: 32px;
    height: 32px;
    max-width: 32px;
    max-height: 32px;
    border-radius: 50%;
    object-fit: contain;
}
.gsp-sb-badge-emoji {
    font-size: 24px;
    line-height: 32px;
    display: inline-block;
    width: 32px;
    height: 32px;
    text-align: center;
}
.gsp-sb-more {
    font-size: 12px;
    color: #73ACF8;
    font-weight: 600;
    font-family: 'Space Grotesk', sans-serif;
}

/* ─── My Rewards Page (Tutor Dashboard) ─── */
.gsp-my-rewards-page {
    font-family: 'Space Grotesk', sans-serif;
}
.gsp-mr-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
}
.gsp-mr-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #171717;
    margin: 0 0 16px 0;
}
