﻿/* ============================================================
   HÓA HỌC THPT
   FILE: wwwroot/css/site.css
   ============================================================ */


/* ============================================================
   1. BIẾN MÀU CHUNG
   ============================================================ */

:root {
    --navy: #08263d;
    --blue: #0d78b8;
    --cyan: #12b3c7;
    --mint: #dff7f6;
    --ink: #173144;
    --muted: #637786;
    --line: #dbe6ec;
    --soft: #f4f8fa;
    --white: #ffffff;
    --shadow: 0 18px 50px rgba(8, 38, 61, 0.10);
    --radius: 20px;
}


/* ============================================================
   2. RESET CHUNG
   ============================================================ */

* {
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--ink);
    background: #ffffff;
    line-height: 1.6;
}


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


.container {
    width: min( 1180px, calc(100% - 36px) );
    margin: auto;
}


/* ============================================================
   3. HEADER
   ============================================================ */

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(219, 230, 236, 0.8);
}


.nav-wrap {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}


/* ============================================================
   4. LOGO
   ============================================================ */

.brand {
    display: flex;
    align-items: center;
    width: auto;
    flex-shrink: 0;
}


.brand-logo {
    display: block;
    width: auto;
    height: 70px;
    max-width: 100%;
    max-height: 70px;
    object-fit: contain;
    object-position: left center;
    flex-shrink: 0;
}


/* ============================================================
   5. MENU HEADER
   ============================================================ */

.topbar nav {
    display: flex;
    align-items: center;
    gap: 22px;
    font-size: 18px;
    font-weight: 750;
    flex-shrink: 0;
}


    .topbar nav a {
        position: relative;
        padding: 10px 0;
        line-height: 1.2;
        white-space: nowrap;
    }


        .topbar nav a::after {
            content: "";
            position: absolute;
            left: 0;
            right: 100%;
            bottom: 4px;
            height: 2px;
            background: var(--cyan);
            transition: 0.2s;
        }


        .topbar nav a:hover::after {
            right: 0;
        }


.menu-toggle {
    display: none;
    border: 0;
    background: transparent;
    font-size: 30px;
    color: var(--navy);
    cursor: pointer;
}


/* ============================================================
   6. HERO
   ============================================================ */

.hero {
    padding: 74px 0 64px;
    background: radial-gradient( circle at 85% 20%, #d9f7f8 0, transparent 28% ), linear-gradient( 180deg, #f8fcfe, #ffffff );
}


.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: 70px;
}


.eyebrow {
    display: inline-block;
    color: var(--blue);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.8px;
    margin-bottom: 10px;
}


.hero h1,
.section h2 {
    margin: 0;
    color: var(--navy);
    line-height: 1.13;
}


.hero h1 {
    font-size: clamp( 40px, 5vw, 67px );
    letter-spacing: -2.6px;
}


    .hero h1 span {
        color: var(--blue);
    }


.hero-text {
    max-width: 650px;
    color: var(--muted);
    font-size: 17px;
    margin: 22px 0 28px;
}


.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}


/* ============================================================
   7. BUTTON
   ============================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 12px;
    padding: 13px 22px;
    font-weight: 750;
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s;
}


    .btn.primary {
        background: linear-gradient( 135deg, var(--blue), #0b94c0 );
        color: #ffffff;
        box-shadow: 0 10px 24px rgba( 13, 120, 184, 0.22 );
    }


        .btn.primary:hover {
            transform: translateY(-2px);
        }


    .btn.ghost {
        background: #ffffff;
        border: 1px solid var(--line);
        color: var(--navy);
    }


    .btn.full {
        width: 100%;
    }


/* ============================================================
   8. THỐNG KÊ HERO
   ============================================================ */

.hero-stats {
    display: flex;
    gap: 38px;
    margin-top: 36px;
}


    .hero-stats div {
        display: flex;
        flex-direction: column;
    }


    .hero-stats b {
        font-size: 25px;
        color: var(--navy);
    }


    .hero-stats span {
        font-size: 12px;
        color: var(--muted);
    }


/* ============================================================
   9. KHUNG HÓA HỌC HERO
   ============================================================ */

.chemistry-card {
    height: 430px;
    border-radius: 32px;
    background: linear-gradient( 145deg, #092942, #0b5575 );
    position: relative;
    overflow: hidden;
    box-shadow: 0 28px 70px rgba( 8, 38, 61, 0.24 );
}


    .chemistry-card::before {
        content: "";
        position: absolute;
        width: 340px;
        height: 340px;
        border: 1px solid rgba( 255, 255, 255, 0.08 );
        border-radius: 50%;
        right: -85px;
        top: -90px;
    }


/* ============================================================
   10. NGUYÊN TỬ
   ============================================================ */

.atom-visual {
    position: absolute;
    left: 50%;
    top: 47%;
    transform: translate( -50%, -50% );
    width: 270px;
    height: 270px;
}


.nucleus {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate( -50%, -50% );
    width: 88px;
    height: 88px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient( 135deg, #1bd1d0, #7ce2bd );
    color: #063a4a;
    font-weight: 900;
    font-size: 28px;
    box-shadow: 0 0 50px rgba( 27, 209, 208, 0.36 );
}


.orbit {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 240px;
    height: 84px;
    border: 1px solid rgba( 255, 255, 255, 0.42 );
    border-radius: 50%;
    transform: translate( -50%, -50% );
}


.o2 {
    transform: translate( -50%, -50% ) rotate(60deg);
}


.o3 {
    transform: translate( -50%, -50% ) rotate(120deg);
}


.electron {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 14px #ffffff;
}


.e1 {
    left: 15px;
    top: 128px;
}


.e2 {
    right: 55px;
    top: 39px;
}


.e3 {
    right: 52px;
    bottom: 40px;
}


/* ============================================================
   11. PHÂN TỬ
   ============================================================ */

.molecule {
    position: absolute;
    color: #d7faff;
    font-weight: 750;
    background: rgba( 255, 255, 255, 0.08 );
    border: 1px solid rgba( 255, 255, 255, 0.10 );
    padding: 8px 12px;
    border-radius: 12px;
}


.molecule-a {
    left: 28px;
    top: 30px;
}


.molecule-b {
    right: 34px;
    top: 48px;
}


.molecule-c {
    left: 42px;
    bottom: 82px;
}


.formula-strip {
    position: absolute;
    left: 25px;
    right: 25px;
    bottom: 22px;
    padding: 11px 14px;
    text-align: center;
    border-radius: 12px;
    background: rgba( 255, 255, 255, 0.08 );
    color: #dffbff;
    font-size: 13px;
}


/* ============================================================
   12. SECTION CHUNG
   ============================================================ */

.section {
    padding: 82px 0;
}


    .section.alt {
        background: var(--soft);
    }


.section-heading {
    display: flex;
    justify-content: space-between;
    gap: 35px;
    align-items: end;
    margin-bottom: 32px;
}


    .section-heading h2,
    .quiz-layout h2,
    .exam h2 {
        font-size: clamp( 31px, 4vw, 45px );
        letter-spacing: -1.4px;
    }


    .section-heading p {
        max-width: 480px;
        color: var(--muted);
        margin: 0;
    }


/* ============================================================
   13. TAB LỚP
   ============================================================ */

.grade-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 26px;
}


.grade-tab {
    border: 1px solid var(--line);
    background: #ffffff;
    border-radius: 999px;
    padding: 10px 20px;
    font-weight: 750;
    color: var(--muted);
    cursor: pointer;
}


    .grade-tab.active {
        background: var(--navy);
        color: #ffffff;
        border-color: var(--navy);
    }


/* ============================================================
   14. DANH SÁCH BÀI HỌC
   ============================================================ */

.lesson-grid {
    display: grid;
    grid-template-columns: repeat( 3, 1fr );
    gap: 18px;
}


.lesson-card {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    transition: 0.2s;
    position: relative;
    overflow: hidden;
}


    .lesson-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow);
        border-color: #c6dce7;
    }


.lesson-number {
    font-size: 12px;
    font-weight: 800;
    color: var(--blue);
    letter-spacing: 1px;
}


.lesson-card h3 {
    font-size: 19px;
    line-height: 1.35;
    margin: 9px 0 10px;
    color: var(--navy);
}


.lesson-card p {
    color: var(--muted);
    font-size: 14px;
    min-height: 66px;
}


.lesson-card button {
    border: 0;
    background: transparent;
    padding: 0;
    color: var(--blue);
    font-weight: 800;
    cursor: pointer;
}


.lesson-card::before {
    content: "";
    position: absolute;
    right: -18px;
    top: -18px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--mint);
}


/* ============================================================
   15. TRẮC NGHIỆM
   ============================================================ */

.quiz-layout {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 70px;
    align-items: center;
}


    .quiz-layout p {
        color: var(--muted);
        max-width: 450px;
    }


.quiz-meta {
    display: flex;
    justify-content: space-between;
    max-width: 450px;
    font-size: 13px;
    font-weight: 700;
    margin-top: 26px;
}


.progress {
    height: 8px;
    background: #dfe9ee;
    border-radius: 20px;
    max-width: 450px;
    overflow: hidden;
    margin-top: 10px;
}


    .progress div {
        height: 100%;
        width: 20%;
        background: linear-gradient( 90deg, var(--blue), var(--cyan) );
        transition: 0.3s;
    }


.quiz-card {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 26px;
    padding: 30px;
    box-shadow: var(--shadow);
}


.chip {
    display: inline-block;
    background: #e8f6fb;
    color: var(--blue);
    font-size: 11px;
    font-weight: 800;
    padding: 6px 10px;
    border-radius: 999px;
}


.quiz-card h3 {
    font-size: 22px;
    line-height: 1.45;
    margin: 15px 0 20px;
}


.quiz-options {
    display: grid;
    gap: 10px;
}


.quiz-option {
    width: 100%;
    text-align: left;
    border: 1px solid var(--line);
    background: #ffffff;
    border-radius: 13px;
    padding: 13px 15px;
    cursor: pointer;
    font-weight: 400;
    color: var(--ink);
}


    .quiz-option:hover {
        border-color: #8bc6dc;
        background: #f6fcfe;
    }


    .quiz-option.correct {
        border-color: #2eae78;
        background: #eaf9f2;
    }


    .quiz-option.wrong {
        border-color: #e06767;
        background: #fff0f0;
    }


    .quiz-option:disabled {
        cursor: default;
    }


.quiz-explain {
    margin: 15px 0;
    background: #f2f8fb;
    border-left: 4px solid var(--blue);
    padding: 12px 14px;
    border-radius: 9px;
    font-size: 14px;
}


.quiz-card .btn {
    margin-top: 15px;
}


/* ============================================================
   16. BẢNG TUẦN HOÀN
   ============================================================ */

.periodic-wrap {
    display: grid;
    grid-template-columns: 1fr 290px;
    gap: 22px;
    align-items: start;
    overflow-x: auto;
}


.periodic-table {
    display: grid;
    grid-template-columns: repeat( 18, minmax( 42px, 1fr ) );
    gap: 5px;
    min-width: 820px;
}


.element {
    aspect-ratio: 1 / 1;
    border: 1px solid rgba( 8, 38, 61, 0.08 );
    border-radius: 8px;
    padding: 5px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: 0.15s;
    min-width: 42px;
}


    .element:hover,
    .element.active {
        transform: scale(1.08);
        box-shadow: 0 8px 20px rgba( 8, 38, 61, 0.15 );
        z-index: 2;
    }


    .element .z {
        font-size: 9px;
        opacity: 0.7;
    }


    .element b {
        font-size: 16px;
        line-height: 1;
    }


    .element small {
        font-size: 8px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }


.cat-alkali {
    background: #ffd9cf;
}


.cat-alkaline {
    background: #ffe9bd;
}


.cat-transition {
    background: #d8ebff;
}


.cat-post {
    background: #dfe7eb;
}


.cat-metalloid {
    background: #dff3cf;
}


.cat-nonmetal {
    background: #ccefe8;
}


.cat-halogen {
    background: #d9f3ff;
}


.cat-noble {
    background: #e5dcff;
}


.cat-lanth {
    background: #ffe0ef;
}


.cat-act {
    background: #f0ddff;
}


.element-detail {
    position: sticky;
    top: 96px;
    background: var(--navy);
    color: #ffffff;
    border-radius: 20px;
    padding: 24px;
    min-height: 280px;
}


.detail-empty {
    color: #b9ceda;
    padding-top: 80px;
    text-align: center;
}


.detail-z {
    font-size: 13px;
    color: #a9dfe6;
}


.detail-symbol {
    font-size: 64px;
    font-weight: 900;
    line-height: 1;
    margin: 10px 0;
}


.detail-name {
    font-size: 22px;
    font-weight: 750;
}


.detail-row {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid rgba( 255, 255, 255, 0.12 );
    padding: 10px 0;
    font-size: 13px;
}


/* ============================================================
   17. Ô TÌM NGUYÊN TỐ
   ============================================================ */

.searchbox input {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 15px;
    min-width: 280px;
    outline: none;
}


    .searchbox input:focus {
        border-color: var(--blue);
        box-shadow: 0 0 0 3px rgba( 13, 120, 184, 0.08 );
    }


/* ============================================================
   18. CHÚ GIẢI BẢNG TUẦN HOÀN
   ============================================================ */

.legend {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 18px;
    color: var(--muted);
    font-size: 12px;
}


    .legend span {
        display: flex;
        align-items: center;
        gap: 6px;
    }


    .legend i {
        width: 12px;
        height: 12px;
        border-radius: 3px;
        background: #cccccc;
    }


    .legend .alkali {
        background: #ffd9cf;
    }


    .legend .alkaline {
        background: #ffe9bd;
    }


    .legend .transition {
        background: #d8ebff;
    }


    .legend .nonmetal {
        background: #ccefe8;
    }


    .legend .halogen {
        background: #d9f3ff;
    }


    .legend .noble {
        background: #e5dcff;
    }


/* ============================================================
   19. CÔNG CỤ
   ============================================================ */

.tool-grid {
    display: grid;
    grid-template-columns: repeat( 3, 1fr );
    gap: 18px;
}


.tool-card {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 24px;
}


.tool-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--mint);
    display: grid;
    place-items: center;
    font-size: 24px;
}


.tool-card h3 {
    margin: 14px 0 2px;
    color: var(--navy);
}


.tool-card > p {
    margin: 0 0 18px;
    color: var(--blue);
    font-weight: 700;
}


.tool-card label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    margin: 10px 0;
}


.tool-card input {
    display: block;
    width: 100%;
    margin-top: 5px;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font: inherit;
    outline: none;
}


    .tool-card input:focus {
        border-color: var(--blue);
    }


.tool-card output {
    display: block;
    margin-top: 12px;
    padding: 11px;
    border-radius: 10px;
    background: #eef7fa;
    color: var(--navy);
    font-weight: 800;
}


.spacer-field {
    height: 72px;
}


/* ============================================================
   20. ÔN THI
   ============================================================ */

.exam {
    background: linear-gradient( 135deg, #07283e, #0a6281 );
    color: #ffffff;
}


.exam-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}


.exam h2 {
    color: #ffffff;
}


.exam p {
    color: #cde6ef;
    max-width: 630px;
}


.eyebrow.light {
    color: #7be6dd;
}


.light-btn {
    background: #ffffff;
    color: var(--navy);
    margin-top: 15px;
}


.exam-checklist {
    background: rgba( 255, 255, 255, 0.08 );
    border: 1px solid rgba( 255, 255, 255, 0.12 );
    border-radius: 22px;
    padding: 12px 22px;
}


    .exam-checklist div {
        display: grid;
        grid-template-columns: 48px 1fr 25px;
        align-items: center;
        padding: 16px 0;
        border-bottom: 1px solid rgba( 255, 255, 255, 0.12 );
    }


        .exam-checklist div:last-child {
            border-bottom: 0;
        }


    .exam-checklist b,
    .exam-checklist strong {
        color: #7be6dd;
    }


/* ============================================================
   21. FOOTER
   ============================================================ */

footer {
    background: #061d2d;
    color: #c9d8df;
    padding-top: 48px;
}


.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 50px;
    padding-bottom: 40px;
}


.footer-brand {
    color: #ffffff;
}


.footer-grid p {
    max-width: 480px;
    color: #8fa8b4;
    font-size: 13px;
}


.footer-grid h4 {
    color: #ffffff;
    margin: 0 0 12px;
}


.footer-grid a {
    display: block;
    color: #a8bdc7;
    font-size: 13px;
    margin: 8px 0;
}


.copyright {
    border-top: 1px solid #183345;
    text-align: center;
    padding: 17px;
    color: #7893a0;
    font-size: 12px;
}

.footer-logo {
    width: auto;
    height: 80px;
    max-width: 100%;
    max-height: 80px;
    object-fit: contain;
    object-position: left center;
    display: block;
}


/* ============================================================
   22. MODAL BÀI HỌC
   ============================================================ */

.modal[hidden] {
    display: none;
}


.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 20px;
}


.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba( 3, 20, 31, 0.72 );
    backdrop-filter: blur(4px);
}


.modal-card {
    position: relative;
    background: #ffffff;
    width: min( 680px, 100% );
    max-height: 86vh;
    overflow: auto;
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 30px 90px rgba( 0, 0, 0, 0.32 );
}


.modal-close {
    position: absolute;
    right: 18px;
    top: 14px;
    border: 0;
    background: #edf4f7;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
}


.modal-card h2 {
    margin: 12px 40px 8px 0;
    color: var(--navy);
    font-size: 30px;
}


.modal-card h3 {
    color: var(--navy);
    margin-top: 24px;
}


.modal-summary {
    color: var(--muted);
}


.modal-card li {
    margin: 8px 0;
}


.note-box {
    background: #eef8fa;
    border-radius: 14px;
    padding: 14px;
    margin-top: 22px;
}


/* ============================================================
   23. RESPONSIVE TABLET / MOBILE MENU
   ============================================================ */

@media (max-width: 950px) {

    .topbar nav {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        right: 0;
        background: #ffffff;
        padding: 18px 28px;
        border-bottom: 1px solid var(--line);
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        box-shadow: 0 10px 25px rgba(8, 38, 61, 0.10);
    }


        .topbar nav.open {
            display: flex;
        }


        .topbar nav a {
            width: 100%;
            padding: 12px 0;
            text-align: left;
            font-size: 17px;
        }


    .menu-toggle {
        display: block;
    }


    .hero-grid,
    .quiz-layout,
    .exam-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }


    .chemistry-card {
        max-width: 620px;
        width: 100%;
        margin: auto;
    }


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


    .periodic-wrap {
        grid-template-columns: 1fr;
    }


    .element-detail {
        position: static;
        min-width: 290px;
    }


    .section-heading {
        align-items: start;
        flex-direction: column;
    }


    .footer-grid {
        grid-template-columns: 1.6fr 1fr 1fr;
    }
}


/* ============================================================
   24. RESPONSIVE ĐIỆN THOẠI
   ============================================================ */

@media (max-width: 650px) {

    .container {
        width: min(calc(100% - 26px), 1180px);
    }


    .nav-wrap {
        height: 76px;
    }


    .brand-logo {
        width: auto;
        height: 62px;
        max-height: 62px;
    }


    .topbar nav {
        top: 76px;
    }


    .hero {
        padding-top: 48px;
    }


        .hero h1 {
            letter-spacing: -1.8px;
        }


    .chemistry-card {
        height: 340px;
    }


    .atom-visual {
        transform: translate(-50%, -50%) scale(0.8);
    }


    .hero-stats {
        gap: 20px;
    }


    .lesson-grid,
    .tool-grid {
        grid-template-columns: 1fr;
    }


    .section {
        padding: 60px 0;
    }


    .quiz-card {
        padding: 22px;
    }


    .grade-tabs {
        overflow: auto;
    }


    .searchbox,
    .searchbox input {
        width: 100%;
        min-width: 0;
    }


    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }


        .footer-grid > div:first-child {
            grid-column: 1 / -1;
        }


    .exam-grid {
        gap: 32px;
    }


    .spacer-field {
        height: 0;
    }
}


.student-question-text {
    margin-top: 22px;
    font-size: 22px;
    line-height: 1.55;
    font-weight: 700;
    color: #0b2740;
    white-space: pre-wrap;
}

.student-choice-list {
    margin-top: 24px;
    display: grid;
    gap: 12px;
}

.student-choice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px 16px;
    border: 1px solid #d9e4ed;
    border-radius: 12px;
    cursor: pointer;
    background: #fff;
}

    .student-choice:hover {
        border-color: #1595d3;
    }

    .student-choice input {
        margin-top: 5px;
    }

.student-choice-letter {
    font-weight: 800;
    color: #0b2740;
}

.student-choice-text {
    flex: 1;
    /* Tuyệt đối không hiện style đáp án từ Word */
    text-decoration: none;
    background: transparent;
    font-weight: 400;
}

.student-question-images {
    margin-top: 18px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.student-question-image {
    max-width: 100%;
    max-height: 430px;
    object-fit: contain;
}

.student-tf-list {
    margin-top: 22px;
    display: grid;
    gap: 14px;
}

.student-tf-row {
    padding: 15px;
    border: 1px solid #d9e4ed;
    border-radius: 12px;
}

.student-tf-statement {
    line-height: 1.5;
}

.student-tf-buttons {
    display: flex;
    gap: 24px;
    margin-top: 12px;
}

.student-short-answer {
    margin-top: 24px;
}

    .student-short-answer label {
        display: block;
        margin-bottom: 8px;
        font-weight: 700;
    }

    .student-short-answer input {
        width: 100%;
        padding: 14px 16px;
        border: 1px solid #cbd9e5;
        border-radius: 10px;
        font-size: 18px;
    }


/* ============================================================
   QUIZ - PHẦN III - TRẢ LỜI NGẮN
   ============================================================ */

.quiz-short-answer {
    display: flex;
    flex-direction: column;
    gap: 12px;
}


.quiz-short-answer-label {
    color: var(--navy);
    font-weight: 800;
    font-size: 15px;
}


.quiz-short-answer-input {
    width: 100%;
    min-height: 50px;
    padding: 0 16px;
    border: 2px solid #cbd9e5;
    border-radius: 12px;
    background: #ffffff;
    color: var(--navy);
    font: inherit;
    font-size: 18px;
    font-weight: 700;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}


    .quiz-short-answer-input:focus {
        border-color: var(--blue);
        box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.10);
    }


    .quiz-short-answer-input.correct {
        border-color: #22c55e;
        background: #f0fdf4;
    }


    .quiz-short-answer-input.wrong {
        border-color: #ef4444;
        background: #fef2f2;
    }


    .quiz-short-answer-input:disabled {
        opacity: 1;
        cursor: default;
    }


.quiz-short-answer-submit {
    width: 100%;
    min-height: 46px;
    border: none;
    border-radius: 12px;
    background: linear-gradient( 135deg, var(--blue), #0b94c0 );
    color: #ffffff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}


    .quiz-short-answer-submit:hover:not(:disabled) {
        filter: brightness(0.96);
    }


    .quiz-short-answer-submit:disabled {
        opacity: 0.65;
        cursor: default;
    }

/* ============================================================
   QUIZ - CÂU ĐÚNG / SAI
   ============================================================ */

.quiz-source-question-label {
    font-weight: 800;
    color: var(--navy);
}


.quiz-tf-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}


.quiz-tf-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 46px 46px;
    align-items: center;
    column-gap: 8px;
    min-height: 50px;
    padding: 8px 10px;
    border-bottom: 1px solid #e5edf2;
    background: #ffffff;
}


/* ============================================================
   NỘI DUNG a, b, c, d
   ============================================================ */

.quiz-tf-statement {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: start;
    min-width: 0;
    line-height: 1.5;
}


.quiz-tf-prefix {
    font-weight: 800;
    color: var(--navy);
}


.quiz-tf-text {
    min-width: 0;
    color: var(--ink);
    font-weight: 400;
}


/* ============================================================
   KHU VỰC Đ / S
   ============================================================ */

.quiz-tf-choices {
    grid-column: 2 / 4;
    display: grid;
    grid-template-columns: 46px 46px;
    gap: 8px;
}


/* ============================================================
   Ô ĐÚNG / SAI
   ============================================================ */

.quiz-tf-choice {
    width: 42px;
    height: 42px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #8296a6;
    border-radius: 4px;
    background: #ffffff;
    color: var(--navy);
    font-family: inherit;
    font-size: 16px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}


    .quiz-tf-choice:hover:not(:disabled) {
        border-color: var(--blue);
    }


    /* Ô HỌC SINH ĐÃ CHỌN */

    .quiz-tf-choice.selected {
        border-color: var(--blue);
        background: var(--blue);
        color: #ffffff;
    }


    .quiz-tf-choice:disabled {
        cursor: default;
    }


/* ============================================================
   SAU KHI CHẤM
   ============================================================ */

.quiz-tf-row.correct {
    background: #f0fdf4;
}


.quiz-tf-row.wrong {
    background: #fef2f2;
}


.quiz-tf-correct-answer {
    grid-column: 1 / -1;
    margin-top: 5px;
    color: #166534;
    font-size: 13px;
    font-weight: 800;
}


/* ============================================================
   NÚT CHẤM ĐÁP ÁN
   ============================================================ */

.quiz-tf-submit {
    width: 100%;
    min-height: 46px;
    margin-top: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient( 135deg, var(--blue), #0b94c0 );
    color: #ffffff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}


    .quiz-tf-submit:hover:not(:disabled) {
        filter: brightness(0.96);
    }


    .quiz-tf-submit:disabled {
        opacity: 0.65;
        cursor: default;
    }


/* ============================================================
   ĐIỆN THOẠI
   ============================================================ */

@media (max-width: 650px) {

    .quiz-tf-row {
        grid-template-columns: minmax(0, 1fr) 44px 44px;
        column-gap: 6px;
        padding: 8px 4px;
    }


    .quiz-tf-choices {
        grid-column: 2 / 4;
        grid-template-columns: 44px 44px;
        gap: 6px;
    }


    .quiz-tf-choice {
        width: 40px;
        height: 40px;
        font-size: 15px;
    }
}


/* ============================================================
   FORMAT ĐỀ THI TRANG HỌC SINH
   GIỐNG ADMIN / FILE WORD GỐC

   Chỉ in đậm:
   - Câu N.
   - A. B. C. D.
   - a. b. c. d.

   Nội dung còn lại dùng chữ thường.
   ============================================================ */


/* ============================================================
   FORMAT ĐỀ THI TRANG HỌC SINH
   ĐỒNG BỘ VỚI ADMIN

   Cỡ chữ toàn bộ nội dung đề: 14px

   Chỉ in đậm:
   - Câu 1. / Câu 2. / ...
   - A. B. C. D.
   - a. b. c. d.

   Nội dung còn lại:
   - cùng cỡ 14px
   - font-weight 400
   ============================================================ */


/* ============================================================
   1. TOÀN BỘ CÂU HỎI
   ============================================================ */

#quizQuestion {
    font-size: 14px !important;
    line-height: 1.55 !important;
    font-weight: 400 !important;
    color: var(--ink);
}


/* Ghi đè .quiz-card h3 { font-size:22px } ở phía trên */

.quiz-card h3#quizQuestion {
    font-size: 14px !important;
    line-height: 1.55 !important;
    font-weight: 400 !important;
    margin-top: 15px;
    margin-bottom: 16px;
}


/* ============================================================
   2. CÂU N.
   ============================================================ */

.quiz-source-question-label {
    display: inline !important;
    font-size: 14px !important;
    line-height: inherit !important;
    font-weight: 800 !important;
    color: var(--ink);
}


/* ============================================================
   3. NỘI DUNG CÂU HỎI
   ============================================================ */

.quiz-question-text {
    display: inline !important;
    font-size: 14px !important;
    line-height: inherit !important;
    font-weight: 400 !important;
    color: var(--ink);
}


    .quiz-question-text p,
    .quiz-question-text div,
    .quiz-question-text span {
        font-size: inherit !important;
        line-height: inherit !important;
        font-weight: 400 !important;
    }


    /* Chỉ số trên / dưới giữ cùng font với nội dung */

    .quiz-question-text sup,
    .quiz-question-text sub {
        font-weight: inherit;
    }


/* ============================================================
   4. PHẦN I - A / B / C / D
   ============================================================ */

.quiz-option {
    font-size: 14px !important;
    line-height: 1.55 !important;
    font-weight: 400 !important;
    color: var(--ink);
}


    /* Chỉ A. B. C. D. in đậm */

    .quiz-option > strong {
        font-size: inherit !important;
        font-weight: 800 !important;
    }


    .quiz-option sup,
    .quiz-option sub {
        font-weight: inherit;
    }


/* ============================================================
   5. PHẦN II - ĐÚNG / SAI
   ============================================================ */

.quiz-tf-statement {
    font-size: 14px !important;
    line-height: 1.55 !important;
    font-weight: 400 !important;
}


/* Chỉ a. b. c. d. in đậm */

.quiz-tf-prefix {
    font-size: 14px !important;
    line-height: inherit !important;
    font-weight: 800 !important;
    color: var(--ink);
}


/* Nội dung a,b,c,d */

.quiz-tf-text {
    font-size: 14px !important;
    line-height: 1.55 !important;
    font-weight: 400 !important;
    color: var(--ink);
}


    .quiz-tf-text sup,
    .quiz-tf-text sub {
        font-weight: inherit;
    }


/* Hai nút Đ / S
   vẫn giữ vừa đủ để học sinh dễ bấm */

.quiz-tf-choice {
    font-size: 14px !important;
    font-weight: 800 !important;
}


/* ============================================================
   6. PHẦN III - TRẢ LỜI NGẮN
   ============================================================ */

.quiz-short-answer-label {
    font-size: 14px !important;
    line-height: 1.55 !important;
    font-weight: 600 !important;
}


/* Ô học sinh nhập kết quả có thể lớn hơn một chút,
   vì đây là CONTROL chứ không phải nội dung đề */

.quiz-short-answer-input {
    font-size: 16px;
}







/* ============================================================
   HỆ THỐNG ĐỀ KIỂM TRA HỌC SINH
   ============================================================ */

.student-exam-heading {
    margin-bottom: 34px;
}

    .student-exam-heading h2 {
        margin: 0;
        color: var(--navy);
        font-size: clamp(31px, 4vw, 45px);
        letter-spacing: -1.4px;
    }

    .student-exam-heading p {
        margin: 12px 0 0;
        color: var(--muted);
        max-width: 660px;
    }


/* ============================================================
   LOGIN
   ============================================================ */

.student-login-wrap {
    display: flex;
    justify-content: center;
}

.student-login-card {
    width: min(100%, 500px);
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 34px;
    box-shadow: var(--shadow);
}

.student-login-icon {
    width: 58px;
    height: 58px;
    border-radius: 17px;
    background: #e8f6fb;
    color: var(--blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 18px;
}

.student-login-card h3 {
    margin: 0;
    color: var(--navy);
    font-size: 26px;
}

.student-login-note {
    color: var(--muted);
    margin: 8px 0 25px;
}

.student-login-field {
    margin-bottom: 17px;
}

    .student-login-field label {
        display: block;
        margin-bottom: 7px;
        font-weight: 700;
        color: var(--navy);
        font-size: 14px;
    }

    .student-login-field input {
        width: 100%;
        height: 48px;
        border: 1px solid var(--line);
        border-radius: 11px;
        padding: 0 14px;
        font: inherit;
        color: var(--ink);
        background: #ffffff;
        outline: none;
    }

        .student-login-field input:focus {
            border-color: var(--blue);
            box-shadow: 0 0 0 3px rgba(13, 120, 184, 0.10);
        }

.student-password-wrap {
    position: relative;
}

    .student-password-wrap input {
        padding-right: 52px;
    }

.student-password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border: 0;
    background: transparent;
    cursor: pointer;
    border-radius: 8px;
}


/* ============================================================
   STATUS
   ============================================================ */

.student-exam-status {
    padding: 12px 14px;
    border-radius: 10px;
    margin: 13px 0;
    font-size: 14px;
}

    .student-exam-status.info {
        background: #eff8ff;
        color: #075985;
        border: 1px solid #bae6fd;
    }

    .student-exam-status.error {
        background: #fff1f2;
        color: #9f1239;
        border: 1px solid #fecdd3;
    }

    .student-exam-status.success {
        background: #ecfdf5;
        color: #047857;
        border: 1px solid #a7f3d0;
    }


/* ============================================================
   THANH TÀI KHOẢN
   ============================================================ */

.student-account-bar {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 16px 19px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}

.student-account-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.student-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.student-account-left strong {
    display: block;
    color: var(--navy);
}

.student-account-left span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-top: 3px;
}


/* ============================================================
   DANH SÁCH ĐỀ
   ============================================================ */

.student-exam-list-heading {
    margin-bottom: 20px;
}

    .student-exam-list-heading h3 {
        margin: 0;
        color: var(--navy);
        font-size: 28px;
    }

    .student-exam-list-heading p {
        color: var(--muted);
        margin: 8px 0 0;
    }

.student-exam-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.student-exam-item {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 8px 24px rgba(8, 38, 61, 0.055);
}

.student-exam-item-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
}

.student-exam-grade {
    display: inline-flex;
    padding: 5px 10px;
    border-radius: 999px;
    background: #e8f6fb;
    color: var(--blue);
    font-size: 12px;
    font-weight: 800;
}

.student-exam-time {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.student-exam-item h4 {
    color: var(--navy);
    font-size: 20px;
    margin: 15px 0 8px;
}

.student-exam-item p {
    color: var(--muted);
    margin: 0 0 20px;
    min-height: 45px;
}

.student-exam-empty {
    grid-column: 1 / -1;
    padding: 35px;
    background: #ffffff;
    border: 1px dashed var(--line);
    border-radius: 16px;
    text-align: center;
    color: var(--muted);
}


/* ============================================================
   PHÒNG THI
   ============================================================ */

.student-exam-room {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 28px;
    box-shadow: var(--shadow);
}

.student-exam-topbar {
    display: flex;
    justify-content: space-between;
    gap: 25px;
    align-items: flex-start;
    border-bottom: 1px solid var(--line);
    padding-bottom: 20px;
}

.student-back-button {
    border: 0;
    background: transparent;
    color: var(--blue);
    font-weight: 700;
    padding: 0;
    cursor: pointer;
    margin-bottom: 8px;
}

.student-exam-topbar h3 {
    margin: 0;
    color: var(--navy);
    font-size: 25px;
}

.student-current-exam-info {
    color: var(--muted);
    font-size: 14px;
    margin-top: 6px;
}

.student-timer-box {
    min-width: 165px;
    background: #08263d;
    color: #ffffff;
    border-radius: 15px;
    padding: 13px 18px;
    text-align: center;
}

    .student-timer-box span {
        display: block;
        font-size: 11px;
        opacity: 0.8;
    }

    .student-timer-box strong {
        display: block;
        font-size: 27px;
        margin-top: 3px;
        letter-spacing: 1px;
    }

.student-exam-progress-row {
    margin: 22px 0;
}

    .student-exam-progress-row > span {
        font-size: 13px;
        font-weight: 700;
    }

.student-exam-progress {
    height: 8px;
    border-radius: 20px;
    background: #e5edf2;
    overflow: hidden;
    margin-top: 8px;
}

    .student-exam-progress div {
        width: 0;
        height: 100%;
        background: linear-gradient(90deg, var(--blue), var(--cyan));
        transition: width 0.25s;
    }


/* ============================================================
   CÂU HỎI TRONG ĐỀ
   ============================================================ */

.student-exam-question {
    padding: 22px 0;
    border-bottom: 1px solid var(--line);
}

    .student-exam-question:last-child {
        border-bottom: 0;
    }

.student-exam-question-title {
    color: var(--navy);
    font-weight: 750;
    font-size: 17px;
    line-height: 1.6;
    margin-bottom: 14px;
}

.student-exam-choice-list {
    display: grid;
    gap: 10px;
}

.student-exam-choice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 11px;
    padding: 12px 14px;
    cursor: pointer;
}

    .student-exam-choice:hover {
        border-color: #8fcfe6;
        background: #f8fcfe;
    }

    .student-exam-choice input {
        margin-top: 4px;
    }

.student-submit-area {
    border-top: 1px solid var(--line);
    margin-top: 18px;
    padding-top: 22px;
    display: flex;
    justify-content: flex-end;
}


/* ============================================================
   KẾT QUẢ
   ============================================================ */

.student-exam-result {
    display: flex;
    justify-content: center;
}

.student-result-card {
    width: min(100%, 520px);
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 35px;
    box-shadow: var(--shadow);
    text-align: center;
}

.student-result-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: #dcfce7;
    color: #15803d;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 31px;
    font-weight: 800;
}

.student-result-card h3 {
    color: var(--navy);
}

.student-result-score span {
    display: block;
    color: var(--muted);
}

.student-result-score strong {
    display: block;
    color: var(--blue);
    font-size: 58px;
    line-height: 1.1;
    margin: 8px 0 18px;
}


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

@media (max-width: 850px) {

    .student-exam-list {
        grid-template-columns: 1fr;
    }

    .student-exam-topbar {
        flex-direction: column;
    }

    .student-timer-box {
        width: 100%;
    }
}


@media (max-width: 650px) {

    .student-login-card,
    .student-exam-room,
    .student-result-card {
        padding: 20px;
        border-radius: 17px;
    }

    .student-account-bar {
        align-items: flex-start;
        flex-direction: column;
    }

        .student-account-bar .btn {
            width: 100%;
        }

    .student-submit-area .btn {
        width: 100%;
    }
}


/* ============================================================
   SỬA HỆ THỐNG ĐỀ KIỂM TRA HỌC SINH
   ============================================================ */

/* QUAN TRỌNG:
   Không để display:flex/grid đè thuộc tính hidden
*/
.student-login-wrap[hidden],
.student-exam-home[hidden],
.student-exam-room[hidden],
.student-exam-result[hidden] {
    display: none;
}


/* ============================================================
   HÌNH ẢNH CÂU HỎI
   ============================================================ */

.student-exam-question-images {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin: 16px 0 20px;
}

.student-exam-question-image {
    display: block;
    width: auto;
    max-width: min(100%, 620px);
    max-height: 520px;
    object-fit: contain;
    border-radius: 10px;
}


/* ============================================================
   ĐÚNG / SAI
   ============================================================ */

.student-exam-tf-list {
    display: grid;
    gap: 12px;
}

.student-exam-tf-row {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px;
}

.student-exam-tf-statement {
    line-height: 1.55;
    margin-bottom: 10px;
}

.student-exam-tf-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

    .student-exam-tf-buttons label {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        cursor: pointer;
        font-weight: 700;
    }


/* ============================================================
   TRẢ LỜI NGẮN
   ============================================================ */

.student-exam-short-answer {
    margin-top: 12px;
}

    .student-exam-short-answer label {
        display: block;
        margin-bottom: 7px;
        font-weight: 700;
    }

    .student-exam-short-answer input {
        width: min(100%, 420px);
        height: 46px;
        border: 1px solid var(--line);
        border-radius: 11px;
        padding: 0 14px;
        font: inherit;
        outline: none;
    }

        .student-exam-short-answer input:focus {
            border-color: var(--blue);
            box-shadow: 0 0 0 3px rgba(13, 120, 184, 0.10);
        }


/* ============================================================
   NÚT NỘP BÀI
   ============================================================ */

#studentSubmitExamButton:disabled {
    opacity: 0.65;
    cursor: wait;
}


@media (max-width: 650px) {

    .student-exam-question-image {
        max-height: 360px;
    }

    .student-exam-tf-buttons {
        gap: 14px;
    }
}


/* ============================================================
   ĐỀ ĐÃ NỘP / LÀM LẠI
   ============================================================ */

.student-exam-submitted-note {
    border: 1px solid #fecaca;
    background: #fff1f2;
    color: #b91c1c;
    border-radius: 11px;
    padding: 12px 14px;
    margin-bottom: 12px;
    display: grid;
    gap: 4px;
    font-size: 13px;
}

    .student-exam-submitted-note strong {
        font-size: 14px;
    }

.student-exam-locked-button {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #ffffff !important;
    opacity: 1 !important;
    cursor: not-allowed !important;
}

.student-retake-approved {
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
    color: #15803d;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 700;
}


/* ============================================================
   CÂU HỎI HỌC SINH GIỐNG NGÂN HÀNG CÂU HỎI
   ============================================================ */

.student-exam-question-title {
    font-weight: 400;
}

    .student-exam-question-title > strong {
        font-weight: 700;
    }


/* ============================================================
   PHẦN CỦA ĐỀ GỐC
   ============================================================ */

.student-exam-part-heading {
    margin: 28px 0 16px;
    padding: 10px 14px;
    border-left: 4px solid var(--blue);
    background: #f3f9fc;
    color: var(--navy);
    font-weight: 800;
    line-height: 1.5;
}


/* ============================================================
   BẢNG WORD - HỌC SINH
   ĐỒNG BỘ NGÂN HÀNG
   ============================================================ */

.student-exam-word-tables {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 12px 0 18px;
}


    .student-exam-word-tables .chem-word-table-wrap {
        display: block;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 8px;
        box-sizing: border-box;
        -webkit-overflow-scrolling: touch;
        scrollbar-gutter: stable;
    }


    .student-exam-word-tables .chem-word-table {
        border-collapse: collapse;
        width: max-content;
        min-width: 100%;
        max-width: none;
        table-layout: auto;
        background: #ffffff;
    }


        .student-exam-word-tables .chem-word-table td,
        .student-exam-word-tables .chem-word-table th {
            border: 1px solid #222222;
            padding: 7px 10px;
            vertical-align: middle;
            text-align: center;
            min-width: 145px;
            white-space: nowrap;
            font-weight: 400;
        }


            .student-exam-word-tables .chem-word-table td:first-child,
            .student-exam-word-tables .chem-word-table th:first-child {
                min-width: 220px;
                text-align: left;
            }


    /* Chỉ số trên */

    .student-exam-word-tables sup {
        font-size: 0.72em;
        line-height: 0;
        vertical-align: super;
        position: static;
    }


    /* Chỉ số dưới */

    .student-exam-word-tables sub {
        font-size: 0.72em;
        line-height: 0;
        vertical-align: sub;
        position: static;
    }


    /* ============================================================
   THANH CUỘN
   ============================================================ */

    .student-exam-word-tables .chem-word-table-wrap::-webkit-scrollbar {
        height: 10px;
    }


    .student-exam-word-tables .chem-word-table-wrap::-webkit-scrollbar-track {
        background: #e8eef2;
        border-radius: 999px;
    }


    .student-exam-word-tables .chem-word-table-wrap::-webkit-scrollbar-thumb {
        background: #9fb6c4;
        border-radius: 999px;
    }


        .student-exam-word-tables .chem-word-table-wrap::-webkit-scrollbar-thumb:hover {
            background: #7896a8;
        }


/* ============================================================
   ĐÚNG / SAI
   ============================================================ */

.student-exam-tf-buttons input[type="radio"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}


.student-exam-tf-buttons label {
    user-select: none;
}


/* ============================================================
   MOBILE / ZOOM
   ============================================================ */

@media (max-width: 700px) {

    .student-exam-word-tables .chem-word-table td,
    .student-exam-word-tables .chem-word-table th {
        min-width: 125px;
    }


        .student-exam-word-tables .chem-word-table td:first-child,
        .student-exam-word-tables .chem-word-table th:first-child {
            min-width: 180px;
        }
}



/* ============================================================
   PHÚC KHẢO - HỌC SINH
   ============================================================ */

.student-submitted-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 12px;
}


.student-appeal-button {
    background: #fff7ed;
    border: 1px solid #fb923c;
    color: #c2410c;
}


    .student-appeal-button:hover:not(:disabled) {
        background: #ffedd5;
    }


    .student-appeal-button:disabled {
        cursor: default;
        opacity: 0.62;
    }


    .student-appeal-button.graded {
        background: #ecfdf5;
        border-color: #86efac;
        color: #166534;
    }


    .student-appeal-button.expired {
        background: #f1f5f9;
        border-color: #cbd5e1;
        color: #64748b;
    }


.student-appeal-final-score {
    margin-top: 4px;
    color: #166534;
    font-weight: 700;
}


.student-appeal-deadline {
    margin-top: 4px;
    color: #b45309;
    font-size: 13px;
}


/* ============================================================
   MODAL
   ============================================================ */

.student-appeal-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.55);
}


.student-appeal-dialog {
    width: min(760px, 100%);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 24px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.25);
}


.student-appeal-dialog-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}


    .student-appeal-dialog-header h3 {
        margin: 0;
        color: var(--navy);
        font-size: 24px;
    }


    .student-appeal-dialog-header p {
        margin: 6px 0 0;
        color: var(--muted);
    }


.student-appeal-close {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 9px;
    background: #f1f5f9;
    cursor: pointer;
    font-size: 18px;
}


.student-appeal-warning {
    margin: 18px 0;
    padding: 12px 14px;
    border: 1px solid #fed7aa;
    border-radius: 10px;
    background: #fff7ed;
    color: #9a3412;
    line-height: 1.5;
}


.student-appeal-question-list {
    display: grid;
    gap: 8px;
    max-height: 330px;
    overflow-y: auto;
    padding-right: 5px;
}


.student-appeal-question {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
    border: 1px solid #dbe6ec;
    border-radius: 10px;
    cursor: pointer;
}


    .student-appeal-question:hover {
        border-color: var(--blue);
        background: #f8fcfe;
    }


    .student-appeal-question input {
        margin-top: 4px;
    }


    .student-appeal-question strong {
        display: block;
        color: var(--navy);
    }


    .student-appeal-question small {
        display: block;
        margin-top: 4px;
        color: var(--muted);
        line-height: 1.45;
    }


.student-appeal-field {
    margin-top: 20px;
}


    .student-appeal-field label {
        display: block;
        margin-bottom: 7px;
        font-weight: 700;
        color: var(--navy);
    }


    .student-appeal-field textarea {
        width: 100%;
        resize: vertical;
        min-height: 130px;
        padding: 12px 14px;
        border: 1px solid var(--line);
        border-radius: 10px;
        outline: none;
        font: inherit;
    }


        .student-appeal-field textarea:focus {
            border-color: var(--blue);
            box-shadow: 0 0 0 3px rgba(13, 120, 184, 0.10);
        }


.student-appeal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}


@media (max-width: 650px) {

    .student-submitted-actions {
        grid-template-columns: 1fr;
    }


    .student-appeal-modal {
        padding: 10px;
    }


    .student-appeal-dialog {
        padding: 18px;
        max-height: calc(100vh - 20px);
    }
}