
/* =========================
   GLOBAL
========================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --background: #f5f7fb;
    --white: #ffffff;
    --text: #1e293b;
    --muted: #64748b;
    --border: #e8edf4;
    --sidebar-width: 260px;
}

body {
    font-family: 'Inter', 'Noto Sans Khmer', sans-serif;
    background: var(--background);
    color: var(--text);
}

button, input, select {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    text-decoration: none;
    color: inherit;
}


/* =========================
   DASHBOARD LAYOUT
========================= */

.dashboard {
    display: flex;
    min-height: 100vh;
}


/* =========================
   SIDEBAR
========================= */

.sidebar {
    width: var(--sidebar-width);
    background: #ffffff;
    border-right: 1px solid var(--border);
    padding: 26px 18px;
    position: fixed;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: 0.3s;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 45px;
    padding: 0 8px;
}

.logo-icon {
    width: 43px;
    height: 43px;
    border-radius: 12px;
    background: var(--primary);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-icon i {
    width: 25px;
    height: 25px;
}

.logo h2 {
    font-size: 18px;
    font-weight: 800;
}

.logo span {
    font-size: 10px;
    color: var(--muted);
}

.menu-label {
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 0 12px;
    margin-bottom: 14px;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 14px;
    color: #64748b;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    transition: 0.2s;
}

.nav-link i {
    width: 19px;
    height: 19px;
}

.nav-link:hover,
.nav-link.active {
    background: #eff6ff;
    color: var(--primary);
}

.nav-link.active {
    font-weight: 700;
}

.sidebar-bottom {
    margin-top: auto;
}

.help-card {
    background: #eff6ff;
    border-radius: 12px;
    padding: 17px;
    margin-bottom: 22px;
}

.help-icon {
    color: var(--primary);
    margin-bottom: 10px;
}

.help-card h4 {
    font-size: 13px;
    margin-bottom: 5px;
}

.help-card p {
    font-size: 11px;
    color: var(--muted);
}

.profile {
    border-top: 1px solid var(--border);
    padding: 18px 5px 0;
    display: flex;
    align-items: center;
    gap: 11px;
}

.avatar,
.top-avatar {
    background: #dbeafe;
    color: var(--primary);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
}

.profile-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-info strong {
    font-size: 12px;
}

.profile-info span {
    font-size: 10px;
    color: var(--muted);
}

.profile > i {
    width: 18px;
    color: var(--muted);
}


/* =========================
   MAIN CONTENT
========================= */

.main-content {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    min-width: 0;
}

.topbar {
    height: 85px;
    background: white;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 35px;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.topbar-left h2 {
    font-size: 18px;
}

.topbar-left p {
    font-size: 11px;
    color: var(--muted);
    margin-top: 5px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.date-display {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--muted);
}

.date-display i {
    width: 17px;
}

.icon-btn,
.menu-toggle {
    background: white;
    border: 1px solid var(--border);
    border-radius: 9px;
    width: 38px;
    height: 38px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--muted);
}

.icon-btn:hover {
    color: var(--primary);
    background: #eff6ff;
}

.top-avatar {
    width: 39px;
    height: 39px;
}

.menu-toggle {
    display: none;
}


/* =========================
   CONTENT
========================= */

.content-wrapper {
    max-width: 1500px;
    margin: auto;
    padding: 30px 35px;
}

.welcome-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.welcome-section h1 {
    font-size: 25px;
    margin-bottom: 9px;
}

.welcome-section p {
    font-size: 13px;
    color: var(--muted);
}

.welcome-icon {
    width: 60px;
    height: 60px;
    background: #dbeafe;
    color: var(--primary);
    border-radius: 17px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.welcome-icon i {
    width: 30px;
    height: 30px;
}


/* =========================
   STATISTICS
========================= */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 28px;
}

.stat-card {
    background: white;
    padding: 22px;
    border-radius: 13px;
    border: 1px solid var(--border);
    transition: 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.05);
}

.stat-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.stat-icon {
    width: 43px;
    height: 43px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 11px;
}

.stat-icon i {
    width: 22px;
}

.blue {
    background: #eff6ff;
    color: #2563eb;
}

.purple {
    background: #f3e8ff;
    color: #9333ea;
}

.orange {
    background: #fff7ed;
    color: #ea580c;
}

.green {
    background: #dcfce7;
    color: #16a34a;
}

.stat-tag {
    font-size: 10px;
    color: var(--muted);
    background: #f8fafc;
    padding: 6px 9px;
    border-radius: 20px;
}

.stat-card h2 {
    font-size: 27px;
    margin-bottom: 6px;
}

.stat-card p {
    font-size: 12px;
    color: var(--muted);
}


/* =========================
   CONTENT CARDS
========================= */

.content-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 25px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 22px;
}

.section-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    margin-bottom: 7px;
}

.section-header h2 i {
    width: 20px;
    color: var(--primary);
}

.section-header p {
    color: var(--muted);
    font-size: 11px;
}

.section-badge {
    font-size: 11px;
    color: var(--primary);
    background: #eff6ff;
    padding: 8px 13px;
    border-radius: 20px;
}


/* =========================
   TABLE
========================= */

.table-container {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
    font-size: 12px;
}

thead {
    background: #f8fafc;
}

th {
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
}

th, td {
    padding: 15px 13px;
    text-align: left;
    border-bottom: 1px solid #edf1f6;
}

td {
    color: #334155;
}

tbody tr {
    transition: 0.2s;
}

tbody tr:hover {
    background: #f8fbff;
}

tr.clickable {
    cursor: pointer;
}

tr.selected {
    background: #eff6ff;
}

.student-name {
    font-weight: 600;
    color: #1e293b;
}

.gender-badge {
    padding: 5px 9px;
    border-radius: 20px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 10px;
}

.gender-badge.female {
    background: #fce7f3;
    color: #db2777;
}

.rank-badge {
    width: 27px;
    height: 27px;
    border-radius: 8px;
    background: #eff6ff;
    color: #2563eb;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
}

.rank-badge.first {
    background: #fef3c7;
    color: #b45309;
}


/* =========================
   SEARCH & PAGINATION
========================= */

.student-tools {
    display: flex;
    align-items: center;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 0 11px;
    height: 39px;
}

.search-box i {
    width: 16px;
    color: #94a3b8;
}

.search-box input {
    width: 160px;
    border: none;
    outline: none;
    background: transparent;
    font-size: 11px;
}

.pagination-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    gap: 10px;
}

.pagination-top > span {
    font-size: 11px;
    color: var(--muted);
}

.pagination {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pagination span {
    font-size: 11px;
    color: var(--muted);
}

.page-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 8px 11px;
    font-size: 11px;
    color: #475569;
}

.page-btn i {
    width: 14px;
    height: 14px;
}

.page-btn:hover:not(:disabled) {
    background: #eff6ff;
    color: var(--primary);
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.table-hint {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 15px;
    font-size: 11px;
    color: var(--muted);
}

.table-hint i {
    width: 15px;
}


/* =========================
   SCORES
========================= */

.empty-state {
    padding: 35px 15px;
    text-align: center;
    color: var(--muted);
}

.empty-state > i {
    width: 38px;
    height: 38px;
    color: #94a3b8;
    margin-bottom: 13px;
}

.empty-state h3 {
    font-size: 14px;
    color: #475569;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 11px;
}

.score-student {
    background: #eff6ff;
    padding: 14px;
    border-radius: 9px;
    margin-bottom: 17px;
    color: #1e40af;
    font-size: 13px;
}

.score-summary {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
}

.score-summary div {
    background: #f8fafc;
    padding: 13px;
    border-radius: 9px;
    flex: 1;
}

.score-summary span {
    display: block;
    font-size: 10px;
    color: var(--muted);
    margin-bottom: 6px;
}

.score-summary strong {
    font-size: 17px;
    color: var(--primary);
}


/* =========================
   SELECT
========================= */

.select-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border);
    padding: 0 10px;
    border-radius: 8px;
}

.select-wrapper i {
    width: 16px;
    color: var(--muted);
}

.select-wrapper select {
    border: none;
    outline: none;
    padding: 10px 0;
    font-size: 11px;
    background: transparent;
    color: #475569;
    min-width: 120px;
}


/* =========================
   LOADING / ERROR
========================= */

.loading {
    padding: 30px;
    text-align: center;
    color: var(--muted);
    font-size: 12px;
}

.error {
    background: #fef2f2;
    color: #b91c1c;
    padding: 14px;
    border-radius: 8px;
    font-size: 12px;
}

.footer {
    display: flex;
    justify-content: space-between;
    padding: 10px 0 20px;
    color: #94a3b8;
    font-size: 10px;
}


/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1100px) {

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

}

@media (max-width: 768px) {

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
        box-shadow: 10px 0 30px rgba(0,0,0,0.1);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .menu-toggle {
        display: flex;
    }

    .topbar {
        padding: 0 16px;
        height: 75px;
    }

    .topbar-left h2 {
        font-size: 14px;
    }

    .topbar-left p {
        font-size: 9px;
    }

    .date-display {
        display: none;
    }

    .content-wrapper {
        padding: 22px 15px;
    }

    .welcome-section h1 {
        font-size: 21px;
    }

    .content-card {
        padding: 17px;
    }

    .section-header {
        align-items: flex-start;
        flex-wrap: wrap;
    }

}

@media (max-width: 480px) {

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .stat-card {
        padding: 14px;
    }

    .stat-card h2 {
        font-size: 22px;
    }

    .stat-tag {
        display: none;
    }

    .pagination-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-box input {
        width: 110px;
    }

    .welcome-icon {
        width: 45px;
        height: 45px;
    }

    .footer {
        flex-direction: column;
        gap: 8px;
    }

    .score-summary {
        flex-wrap: wrap;
    }

}

/* =========================
   GLOBAL
========================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --background: #f5f7fb;
    --white: #ffffff;
    --text: #1e293b;
    --muted: #64748b;
    --border: #e8edf4;
    --sidebar-width: 260px;
}

body {
    font-family: 'Inter', 'Noto Sans Khmer', sans-serif;
    background: var(--background);
    color: var(--text);
}

button, input, select {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    text-decoration: none;
    color: inherit;
}


/* =========================
   DASHBOARD LAYOUT
========================= */

.dashboard {
    display: flex;
    min-height: 100vh;
}


/* =========================
   SIDEBAR
========================= */

.sidebar {
    width: var(--sidebar-width);
    background: #ffffff;
    border-right: 1px solid var(--border);
    padding: 26px 18px;
    position: fixed;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: 0.3s;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 45px;
    padding: 0 8px;
}

.logo-icon {
    width: 43px;
    height: 43px;
    border-radius: 12px;
    background: var(--primary);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-icon i {
    width: 25px;
    height: 25px;
}

.logo h2 {
    font-size: 18px;
    font-weight: 800;
}

.logo span {
    font-size: 10px;
    color: var(--muted);
}

.menu-label {
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 0 12px;
    margin-bottom: 14px;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 14px;
    color: #64748b;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    transition: 0.2s;
}

.nav-link i {
    width: 19px;
    height: 19px;
}

.nav-link:hover,
.nav-link.active {
    background: #eff6ff;
    color: var(--primary);
}

.nav-link.active {
    font-weight: 700;
}

.sidebar-bottom {
    margin-top: auto;
}

.help-card {
    background: #eff6ff;
    border-radius: 12px;
    padding: 17px;
    margin-bottom: 22px;
}

.help-icon {
    color: var(--primary);
    margin-bottom: 10px;
}

.help-card h4 {
    font-size: 13px;
    margin-bottom: 5px;
}

.help-card p {
    font-size: 11px;
    color: var(--muted);
}

.profile {
    border-top: 1px solid var(--border);
    padding: 18px 5px 0;
    display: flex;
    align-items: center;
    gap: 11px;
}

.avatar,
.top-avatar {
    background: #dbeafe;
    color: var(--primary);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
}

.profile-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-info strong {
    font-size: 12px;
}

.profile-info span {
    font-size: 10px;
    color: var(--muted);
}

.profile > i {
    width: 18px;
    color: var(--muted);
}


/* =========================
   MAIN CONTENT
========================= */

.main-content {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    min-width: 0;
}

.topbar {
    height: 85px;
    background: white;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 35px;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.topbar-left h2 {
    font-size: 18px;
}

.topbar-left p {
    font-size: 11px;
    color: var(--muted);
    margin-top: 5px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.date-display {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--muted);
}

.date-display i {
    width: 17px;
}

.icon-btn,
.menu-toggle {
    background: white;
    border: 1px solid var(--border);
    border-radius: 9px;
    width: 38px;
    height: 38px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--muted);
}

.icon-btn:hover {
    color: var(--primary);
    background: #eff6ff;
}

.top-avatar {
    width: 39px;
    height: 39px;
}

.menu-toggle {
    display: none;
}


/* =========================
   CONTENT
========================= */

.content-wrapper {
    max-width: 1500px;
    margin: auto;
    padding: 30px 35px;
}

.welcome-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.welcome-section h1 {
    font-size: 25px;
    margin-bottom: 9px;
}

.welcome-section p {
    font-size: 13px;
    color: var(--muted);
}

.welcome-icon {
    width: 60px;
    height: 60px;
    background: #dbeafe;
    color: var(--primary);
    border-radius: 17px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.welcome-icon i {
    width: 30px;
    height: 30px;
}


/* =========================
   STATISTICS
========================= */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 28px;
}

.stat-card {
    background: white;
    padding: 22px;
    border-radius: 13px;
    border: 1px solid var(--border);
    transition: 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.05);
}

.stat-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.stat-icon {
    width: 43px;
    height: 43px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 11px;
}

.stat-icon i {
    width: 22px;
}

.blue {
    background: #eff6ff;
    color: #2563eb;
}

.purple {
    background: #f3e8ff;
    color: #9333ea;
}

.orange {
    background: #fff7ed;
    color: #ea580c;
}

.green {
    background: #dcfce7;
    color: #16a34a;
}

.stat-tag {
    font-size: 10px;
    color: var(--muted);
    background: #f8fafc;
    padding: 6px 9px;
    border-radius: 20px;
}

.stat-card h2 {
    font-size: 27px;
    margin-bottom: 6px;
}

.stat-card p {
    font-size: 12px;
    color: var(--muted);
}


/* =========================
   CONTENT CARDS
========================= */

.content-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 25px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 22px;
}

.section-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    margin-bottom: 7px;
}

.section-header h2 i {
    width: 20px;
    color: var(--primary);
}

.section-header p {
    color: var(--muted);
    font-size: 11px;
}

.section-badge {
    font-size: 11px;
    color: var(--primary);
    background: #eff6ff;
    padding: 8px 13px;
    border-radius: 20px;
}


/* =========================
   TABLE
========================= */

.table-container {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
    font-size: 12px;
}

thead {
    background: #f8fafc;
}

th {
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
}

th, td {
    padding: 15px 13px;
    text-align: left;
    border-bottom: 1px solid #edf1f6;
}

td {
    color: #334155;
}

tbody tr {
    transition: 0.2s;
}

tbody tr:hover {
    background: #f8fbff;
}

tr.clickable {
    cursor: pointer;
}

tr.selected {
    background: #eff6ff;
}

.student-name {
    font-weight: 600;
    color: #1e293b;
}

.gender-badge {
    padding: 5px 9px;
    border-radius: 20px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 10px;
}

.gender-badge.female {
    background: #fce7f3;
    color: #db2777;
}

.rank-badge {
    width: 27px;
    height: 27px;
    border-radius: 8px;
    background: #eff6ff;
    color: #2563eb;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
}

.rank-badge.first {
    background: #fef3c7;
    color: #b45309;
}


/* =========================
   SEARCH & PAGINATION
========================= */

.student-tools {
    display: flex;
    align-items: center;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 0 11px;
    height: 39px;
}

.search-box i {
    width: 16px;
    color: #94a3b8;
}

.search-box input {
    width: 160px;
    border: none;
    outline: none;
    background: transparent;
    font-size: 11px;
}

.pagination-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    gap: 10px;
}

.pagination-top > span {
    font-size: 11px;
    color: var(--muted);
}

.pagination {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pagination span {
    font-size: 11px;
    color: var(--muted);
}

.page-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 8px 11px;
    font-size: 11px;
    color: #475569;
}

.page-btn i {
    width: 14px;
    height: 14px;
}

.page-btn:hover:not(:disabled) {
    background: #eff6ff;
    color: var(--primary);
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.table-hint {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 15px;
    font-size: 11px;
    color: var(--muted);
}

.table-hint i {
    width: 15px;
}


/* =========================
   SCORES
========================= */

.empty-state {
    padding: 35px 15px;
    text-align: center;
    color: var(--muted);
}

.empty-state > i {
    width: 38px;
    height: 38px;
    color: #94a3b8;
    margin-bottom: 13px;
}

.empty-state h3 {
    font-size: 14px;
    color: #475569;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 11px;
}

.score-student {
    background: #eff6ff;
    padding: 14px;
    border-radius: 9px;
    margin-bottom: 17px;
    color: #1e40af;
    font-size: 13px;
}

.score-summary {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
}

.score-summary div {
    background: #f8fafc;
    padding: 13px;
    border-radius: 9px;
    flex: 1;
}

.score-summary span {
    display: block;
    font-size: 10px;
    color: var(--muted);
    margin-bottom: 6px;
}

.score-summary strong {
    font-size: 17px;
    color: var(--primary);
}


/* =========================
   SELECT
========================= */

.select-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border);
    padding: 0 10px;
    border-radius: 8px;
}

.select-wrapper i {
    width: 16px;
    color: var(--muted);
}

.select-wrapper select {
    border: none;
    outline: none;
    padding: 10px 0;
    font-size: 11px;
    background: transparent;
    color: #475569;
    min-width: 120px;
}


/* =========================
   LOADING / ERROR
========================= */

.loading {
    padding: 30px;
    text-align: center;
    color: var(--muted);
    font-size: 12px;
}

.error {
    background: #fef2f2;
    color: #b91c1c;
    padding: 14px;
    border-radius: 8px;
    font-size: 12px;
}

.footer {
    display: flex;
    justify-content: space-between;
    padding: 10px 0 20px;
    color: #94a3b8;
    font-size: 10px;
}


/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1100px) {

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

}

@media (max-width: 768px) {

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
        box-shadow: 10px 0 30px rgba(0,0,0,0.1);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .menu-toggle {
        display: flex;
    }

    .topbar {
        padding: 0 16px;
        height: 75px;
    }

    .topbar-left h2 {
        font-size: 14px;
    }

    .topbar-left p {
        font-size: 9px;
    }

    .date-display {
        display: none;
    }

    .content-wrapper {
        padding: 22px 15px;
    }

    .welcome-section h1 {
        font-size: 21px;
    }

    .content-card {
        padding: 17px;
    }

    .section-header {
        align-items: flex-start;
        flex-wrap: wrap;
    }

}

@media (max-width: 480px) {

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .stat-card {
        padding: 14px;
    }

    .stat-card h2 {
        font-size: 22px;
    }

    .stat-tag {
        display: none;
    }

    .pagination-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-box input {
        width: 110px;
    }

    .welcome-icon {
        width: 45px;
        height: 45px;
    }

    .footer {
        flex-direction: column;
        gap: 8px;
    }

    .score-summary {
        flex-wrap: wrap;
    }

}
