:root {
    --ink: #f3f4f6;
    --surface: #ffffff;
    --card: #ffffff;
    --border: #252a3a1c;
    --muted: #2d3748;
    --body: #2d3748;
    --text: #2d3748;
    --accent: #002569;
    --accent-dark: #2d3748;
    --green: #22d47b;
    --yellow: #ffd166;
    --red: #ff4d6d;
}

* {
    box-sizing: border-box;
}

#main-content,
#region-main {
    padding: 0 !important;
}

.stat-svg {
    width: 30px;
    height: 30px;

    fill: #002569;
    stroke: #002569;
}

.rp-wrap {
    background: var(--ink);
    min-height: 100vh;
    padding: 28px 20px 60px;
    color: var(--text);
    font-family: "PlusJakartaSans-Regular", sans-serif;
}

.rp-page-head {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px 24px;
    margin-bottom: 20px;
}

.rp-page-title {
    font-family: "PlusJakartaSans-Regular", sans-serif;
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    font-weight: 800;
    color: #2d3748;
    margin: 0 0 6px;
}

.rp-page-sub {
    font-size: .9rem;
    color: #2d3748;
    margin: 0;
}

.rp-page-sub span {
    color: var(--accent);
    font-weight: 700;
}

.rp-grid {
    display: grid;
    gap: 20px;
}

.rp-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.rp-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.rp-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px 24px;
    position: relative;
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
}

.rp-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 40px rgba(0, 0, 0, .12);
}

.rp-section-title {
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
}

.rp-section-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 18px;
    border-radius: 2px;
    background: var(--accent);
    flex-shrink: 0;
}

.stat-top {
    align-items: center;
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.5rem;
}

.stat-label {
    color: var(--accent);
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    color: #2d3748;
    line-height: 1;
    margin-top: 10px;
}

.stat-sub {
    font-size: .78rem;
    color: var(--body);
    margin-top: 8px;
}

.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    margin-top: 8px;
    background: rgba(139, 145, 168, .12);
    color: #2d3748;
}

.stat-badge.pink {
    background: #002569;
    color: white;
}

.stat-accent-line {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, var(--accent), color-mix(in srgb, #002569 70%, transparent));
}

.rp-filter {
    margin-bottom: 20px;
}

.rp-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rp-filter-toggle {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 0;
    background: color-mix(in srgb, #002569 70%, transparent);
    color: white;
    font-size: 22px;
    font-weight: 800;
    cursor: pointer;
    transition: .2s;
    padding: 0px;
}

.rp-filter-toggle:hover {
    background: #002569;
    color: white;
}

.rp-filter-content {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height .35s ease, opacity .25s ease, margin-top .25s ease;
}

.rp-filter-content.active {
    max-height: 500px;
    opacity: 1;
    margin-top: 20px;
}

.rp-filter-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.rp-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rp-field label {
    font-size: .82rem;
    font-weight: 700;
    color: #2d3748;
}

.rp-field input,
.rp-field select {
    width: 100%;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 11px 14px;
    font-size: .9rem;
    transition: .2s;
}

.rp-field input:focus,
.rp-field select:focus {
    outline: none;
    border-color: #002569;
    box-shadow: 0 0 0 4px color-mix(in srgb, #002569 12%, transparent);
}

.rp-filter-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
}

.rp-btn {
    border: 0;
    background: linear-gradient(90deg,
            #002569,
            color-mix(in srgb,
                #002569 72%,
                white)) !important;

    color: white;
    padding: 12px 18px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition:
        transform .2s,
        box-shadow .2s,
        opacity .2s;
}

.rp-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 25px color-mix(in srgb, #002569 28%, transparent);
}

.pie-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
}

.pie-canvas-wrap,
.gauge-canvas-wrap {
    position: relative;
}

.pie-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.pie-center-val,
.gauge-val {
    font-size: 28px;
    font-weight: 800;
    color: #2d3748;
}

.pie-center-lbl,
.gauge-lbl {
    font-size: .68rem;
    color: #2d3748;
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: .8px;
}

.pie-legend {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pie-leg-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pie-leg-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

.dot-primary {
    background: #002569;
}

.pie-leg-name {
    font-size: .82rem;
    color: var(--body);
}

.pie-leg-val {
    font-size: .85rem;
    font-weight: 800;
    color: #2d3748;
    margin-left: auto;
    padding-left: 20px;
}

.gauge-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
}

.gauge-center {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

@media (max-width: 1100px) {
    .rp-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 780px) {

    .rp-grid-4,
    .rp-grid-2 {
        grid-template-columns: 1fr;
    }
}

.rp-users-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.rp-user-row {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
    display: grid;
    grid-template-columns: 1.5fr 120px 2fr;
    gap: 20px;
    align-items: center;
    transition: .2s;
    background: white;
}

.rp-user-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .06);
}

.rp-user-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rp-user-name {
    font-size: 15px;
    font-weight: 800;
    color: #2d3748;
}

.rp-user-email {
    font-size: 13px;
    color: var(--muted);
}

.rp-user-access {
    text-align: center;
}

.rp-user-access-number {
    font-size: 28px;
    font-weight: 800;
    color: #002569;
    line-height: 1;
}

.rp-user-access-label {
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px;
}

.rp-user-courses {
    font-size: 13px;
    line-height: 1.6;
    color: #2d3748;
}

@media (max-width: 900px) {

    .rp-user-row {
        grid-template-columns: 1fr;
    }

    .rp-user-access {
        text-align: left;
    }

}


#id_courseid {
    width: 600px;
}

.rp-ranking-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.rp-ranking-row {
    display: grid;
    grid-template-columns: 70px 1.5fr 1fr;
    gap: 20px;
    align-items: center;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    transition: .2s;
    background: white;
}

.rp-ranking-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .06);
}

.rp-ranking-position {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: color-mix(in srgb,
            #002569 14%,
            white);

    display: flex;
    align-items: center;
    justify-content: center;

    font-weight: 800;
    font-size: 18px;

    color: #002569;
}

.rp-ranking-user {
    display: flex;
    align-items: center;
    gap: 14px;
}

.rp-ranking-avatar img {
    border-radius: 50%;
}

.rp-ranking-user-info {
    display: flex;
    flex-direction: column;
}

.rp-ranking-name {
    font-size: 14px;
    font-weight: 800;
    color: #2d3748;
    text-decoration: none;
}

.rp-ranking-name:hover {
    color: #002569;
}

.rp-medals {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.rp-medal {
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    background: #f5f5f5;
}

.rp-medal.gold {
    background: rgba(255, 209, 102, .18);
    color: #b8860b;
}

.rp-medal.silver {
    background: rgba(189, 195, 199, .18);
    color: #6e6d6c;
}

.rp-medal.bronze {
    background: rgba(206, 126, 0, .18);
    color: #ce7e00;
}

.rp-medal.neutral {
    background: rgba(120, 120, 120, .12);
    color: #444;
}

@media (max-width: 900px) {

    .rp-ranking-row {
        grid-template-columns: 1fr;
    }

    .rp-medals {
        justify-content: flex-start;
    }

}

.sidebar-col,
.fixed-bar {
    display: none !important;
}

@media (min-width: 992px) {
    .col-lg-9 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

@media only screen and (max-width: 500px) {
    #filter .rp-filter-grid {
        display: flex;
        flex-direction: column;
    }

    #form-advanced-div {
        margin: 32px 0px !important;
    }

    .progress-actions .rp-btn {
        font-size: 12px !important;
        padding: 8px;
    }
}