.page-wrap {
    max-width: 1500px;
    margin: auto;
    padding: 22px 14px 40px;
}

.hero {
    background: linear-gradient(120deg, #092d67, #176bc0);
    border-radius: 18px;
    padding: 27px 30px;
    color: white;
    box-shadow: 0 8px 22px rgba(16, 47, 102, .15);
    margin-bottom: 22px;
    position: relative;
    overflow: hidden;
}

.hero h1 {
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    font-weight: 800;
    margin-bottom: 8px;
}

.hero p {
    margin: 0;
    opacity: .93;
    font-size: 1.04rem;
}

.hero-icon {
    font-size: 3.6rem;
    opacity: .95;
}

.stat-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px;
    height: 100%;
    box-shadow: 0 4px 14px rgba(16, 47, 102, .04);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--navy);
    line-height: 1.2;
}

.stat-label {
    color: #61718a;
    font-size: .88rem;
    margin-top: 5px;
}

.section-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(16, 47, 102, .04);
}

.section-title {
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 4px;
}

.section-subtitle {
    color: #6c7b92;
    font-size: .9rem;
}

.badge-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(135px, 1fr));
    gap: 12px;
    margin-bottom: 22px;
}

.badge-card {
    border-radius: 15px;
    padding: 16px 12px;
    text-align: center;
    border: 1px solid rgba(0,0,0,.04);
    min-width: 0;
}

.badge-symbol {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    margin: 0 auto 10px;
    background: rgba(255,255,255,.8);
    border: 2px solid currentColor;
    box-shadow: 0 4px 10px rgba(0,0,0,.07);
    font-size: 2.5rem;
}

.badge-card h6 {
    font-size: .95rem;
    font-weight: 800;
    margin-bottom: 7px;
}

.badge-card p {
    font-size: .8rem;
    line-height: 1.45;
    margin: 0;
}

.badge-beginner {
    color: #984313;
    background: #fff1df;
}
.badge-young {
    color: #087443;
    background: #e4f8eb;
}
.badge-star {
    color: #0754b5;
    background: #e5f1ff;
}
.badge-expert {
    color: #6825a8;
    background: #f2e8ff;
}
.badge-master {
    color: #bd2432;
    background: #ffe8eb;
}
.badge-outstanding {
    color: #805000;
    background: #fff4ce;
}
.badge-none {
    color: #596579;
    background: #edf1f6;
}

.table-responsive {
    border-radius: 12px;
}

#reviewTable {
    margin-bottom: 0;
    vertical-align: middle;
    white-space: nowrap;
}

#reviewTable thead th {
    background: #e5f1ff;
    color: #103c7b;
    font-size: .83rem;
    padding: 13px 10px;
    border-color: #d4e5fa;
}

#reviewTable tbody td {
    padding: 12px 10px;
    border-color: #e5edf7;
    font-size: .9rem;
}

#reviewTable tbody tr:hover {
    background: #f7fbff;
}

.rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #edf2fa;
    font-weight: 800;
    color: #233c65;
}

.rank-1 { background: #fff0b8; color: #8c5a00; }
.rank-2 { background: #e6eaf0; color: #4a5669; }
.rank-3 { background: #ffe0cc; color: #a94c14; }

.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 11px;
    border-radius: 9px;
    font-size: .78rem;
    font-weight: 800;
    white-space: normal;
    line-height: 1.25;
}

.badge-pill .mini-icon {
    font-size: 1.05rem;
}

.rate-track {
    height: 7px;
    min-width: 65px;
    background: #e8eef6;
    border-radius: 20px;
    overflow: hidden;
    margin-top: 5px;
}

.rate-fill {
    height: 100%;
    background: linear-gradient(90deg, #1681dc, #21b6a8);
    border-radius: 20px;
}

.criteria-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #edf1f7;
}

.criteria-row:last-child {
    border-bottom: 0;
}

.criteria-icon {
    width: 43px;
    height: 43px;
    flex: 0 0 43px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background: white;
    border: 1px solid #e1e8f2;
    font-size: 1.55rem;
}

.criteria-row strong {
    display: block;
    margin-bottom: 3px;
    font-size: .87rem;
}

.criteria-row small {
    display: block;
    color: #63728a;
    line-height: 1.45;
}

.year-select {
    max-width: 190px;
}

.form-select, .form-control {
    border-color: #d6e2f0;
}

.empty-state {
    padding: 45px 15px;
    text-align: center;
    color: #6a7890;
}

.empty-state i {
    font-size: 3rem;
    color: #aac2e1;
}

.info-note {
    background: #eef6ff;
    border: 1px solid #d6e8ff;
    border-radius: 12px;
    padding: 13px 15px;
    color: #244b7c;
    font-size: .85rem;
}

@media (max-width: 1200px) {
    .badge-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 650px) {
    .page-wrap { padding: 12px 8px 25px; }
    .hero { padding: 22px 18px; }
    .hero-icon { font-size: 2.5rem; }
    .section-card { padding: 14px; }
    .badge-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .badge-card { padding: 13px 8px; }
    .badge-symbol { width: 62px; height: 62px; font-size: 2rem; }
    .year-select { max-width: 100%; }
}

/* Shared responsive leaderboard styles */
@media (max-width: 767.98px) {
    #reviewTable,
    #reviewTable tbody {
        display: block;
        width: 100%;
    }

    #reviewTable thead {
        display: none;
    }

    #reviewTable tbody tr:not(:has(td[colspan])) {
        display: block;
        margin-bottom: 15px;
        padding: 12px;
        border: 1px solid #dce7f5;
        border-radius: 14px;
        background: #fff;
        box-shadow: 0 3px 12px rgba(16, 47, 102, .06);
    }

    #reviewTable tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        width: 100%;
        padding: 9px 2px;
        border: 0;
        border-bottom: 1px solid #edf1f7;
        white-space: normal;
        text-align: right !important;
    }

    #reviewTable tbody td:last-child {
        border-bottom: 0;
        padding-bottom: 2px;
    }

    #reviewTable tbody td::before {
        content: attr(data-label);
        flex: 0 0 42%;
        max-width: 42%;
        color: #61718a;
        font-size: .78rem;
        font-weight: 700;
        text-align: left;
    }

    #reviewTable tbody td:first-child {
        justify-content: flex-start;
        border-bottom: 1px solid #dce7f5;
        padding-bottom: 12px;
        margin-bottom: 4px;
    }

    #reviewTable tbody td:first-child::before {
        content: "RANK";
        flex-basis: 42%;
    }

    #reviewTable tbody td:nth-child(2) {
        display: block;
        text-align: left !important;
        font-size: 1rem;
        font-weight: 700;
        padding: 10px 2px;
    }

    #reviewTable tbody td:nth-child(2)::before {
        display: block;
        max-width: none;
        margin-bottom: 5px;
        content: "STUDENT NAME";
    }

    #reviewTable .rate-track {
        flex: 1;
        max-width: 100px;
    }

    #reviewTable .badge-pill {
        max-width: 58%;
        justify-content: center;
        text-align: center;
    }

    .year-select {
        width: 145px;
    }

    .section-card {
        padding: 12px;
    }
}

/* Empty state should remain readable on mobile */
@media (max-width: 767.98px) {
    #reviewTable tbody tr:has(td[colspan]) td {
        display: block;
        text-align: center !important;
    }

    #reviewTable tbody tr:has(td[colspan]) td::before {
        content: none;
    }
}
