/* ==========================================================================
   VTech.DGNL - Phòng thi V-ACT 120 câu (Kế thừa style-baithi.css & CBT ĐHQG TP.HCM)
   ========================================================================== */

:root {
    --color1: #0284c7;
    --color2: #0284c7;
    --primary-navy: #0e2246;
    --primary-blue: #1a56db;
    --color-emerald: #10b981;
    --color-amber: #f59e0b;
    --color-rose: #f43f5e;
    --border-color: #e2e8f0;
    --bg-slate: #f8fafc;
}

.view-de-thi {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    width: 100%;
    max-width: 1366px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ==========================================================================
   BỐ CỤC 2 CỘT RESPONSIVE (CONTAINER-ROW)
   ========================================================================== */
/* ==========================================================================
   CHẾ ĐỘ PHÒNG THI TOÀN MÀN HÌNH (KIOSK EXAM MODE - 100VH KHÔNG CUỘN TRANG)
   ========================================================================== */
body.in-exam-mode header.navbar-custom,
body.in-exam-mode .mobile-bottom-nav,
body.in-exam-mode #pwaInstallFloat {
    display: none !important;
}

body.in-exam-mode {
    overflow: hidden !important;
    height: 100vh;
    background-color: #f1f5f9;
}

    body.in-exam-mode .main-content {
        padding-top: 0 !important;
        margin-top: 0 !important;
        height: calc(100vh - 0.8rem);
        overflow: hidden;
    }

body.in-exam-mode .view-de-thi {
    padding: 0.5rem 1rem !important;
    height: 100vh;
    box-sizing: border-box;
    overflow: hidden;
    width: 100%;
    max-width: 1366px;
    margin: 0 auto;
}

.container-row {
    display: flex;
    gap: 1.25rem;
    position: relative;
    align-items: stretch;
    height: calc(100vh - 1rem);
}

.col-left {
    flex: 1 1 0;
    min-width: 0;
    height: 100%;
}

.main-content.main-left {
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.classify-tabs.fixed-top {
    flex-shrink: 0;
    position: relative;
    top: 0;
    z-index: 15;
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.questions-container {
    flex: 1 1 0;
    overflow-y: auto;
    scroll-behavior: smooth;
    padding-bottom: 3rem;
}

.col-right {
    width: 370px;
    flex-shrink: 0;
    height: 100%;
}

.main-content.main-right {
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ==========================================================================
   HEADER ĐỀ THI & ĐỒNG HỒ ĐẾM NGƯỢC
   ========================================================================== */
.main-header {
    padding: 1.5rem 2rem 1rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.main-header .title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color1);
    letter-spacing: 0.5px;
}

.main-header .lable {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-navy);
    margin: 0.3rem 0;
}

.main-header .time {
    font-size: 0.95rem;
    color: #64748b;
}

/* Fixed Time Bar */
.count-time {
    padding: 1rem 1.6rem;
    display: flex;
    align-items: center;
    gap: 1.6rem;
    background: #fff;
    border-bottom: 1px solid var(--border-color);
}

.count-time.fixed-top {
    position: sticky;
    top: 0;
    z-index: 20;
}

.count-time .time {
    flex: 1 0 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
}

.count-time .time .time-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.count-time .time .time-text .left {
    color: #1e293b;
    font-weight: 600;
    font-size: 0.95rem;
}

.count-time .time .time-text .left i {
    color: var(--color1);
    margin-right: 0.4rem;
}

.count-time .time .time-text .right {
    color: var(--color-rose);
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.count-time .time .time-progress {
    width: 100%;
}

.progress-mini {
    height: 6px;
    border-radius: 10px;
    background: #e2e8f0;
    overflow: hidden;
}

.progress-mini .progress-bar {
    background: linear-gradient(90deg, #10b981 0%, #0284c7 60%, #f43f5e 100%);
    transition: width 0.4s ease;
}

/* ==========================================================================
   STEPPER & TABS 5 PHÂN ĐOẠN V-ACT
   ========================================================================== */
.classify-tabs {
    padding: 0.55rem 0.8rem;
    background: #f1f5f9;
    border-bottom: 1px solid var(--border-color);
}

/* classify-tabs.fixed-top đã tích hợp ở layout */

.classify-tabs .nav {
    display: flex;
    align-items: center;
    width: 100%;
    background: #e2e8f0;
    border-radius: 999px;
    padding: 3px;
    gap: 2px;
}

.classify-tabs .nav > li {
    flex: 1 1 0;
    list-style: none;
}

.classify-tabs .nav > li > .btn {
    color: #475569;
    padding: 0.5rem 0.35rem;
    width: 100%;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    border: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-align: center;
}

.classify-tabs .nav > li.active > .btn {
    background: var(--color1);
    color: #fff;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
}

.classify-tabs .nav > li.done > .btn {
    color: var(--color-emerald);
}

/* ==========================================================================
   CÂU HỎI & NỘI DUNG (SPLIT-SCREEN CHO NGỮ LIỆU DÀI)
   ========================================================================== */
.dt-dang-thuc {
    padding: 0.65rem 1.25rem;
    background: #f8fafc;
    color: var(--primary-navy);
    font-size: 0.98rem;
    font-weight: 700;
    border-bottom: 1px solid var(--border-color);
    border-left: 4px solid var(--color1);
}

.questions {
    border-top: 1px solid var(--border-color);
    width: 100%;
    padding: 0.9rem 1.25rem;
    transition: background 0.2s;
}

.questions:hover {
    background: #fafcff;
}

.questions.highlighted {
    background: #f0fdf4;
    border-left: 3px solid var(--color-emerald);
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.45rem;
}

.question-header .badge {
    font-size: 0.82rem;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-weight: 700;
}

.question-header .btn-flag {
    padding: 0.2rem 0.65rem;
    font-size: 0.82rem;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s;
}

.question-header .btn-flag:hover {
    background: #fffbeb;
    color: var(--color-amber);
    border-color: var(--color-amber);
}

.question-header .btn-flag.active {
    background: #fef3c7;
    color: #b45309;
    border-color: #f59e0b;
    font-weight: 700;
}

.questions-content {
    font-size: 1.02rem;
    line-height: 1.52;
    color: #1e293b;
    margin-bottom: 0.65rem;
    text-align: justify;
}

.questions-content b {
    color: var(--color1);
}

/* Ngữ liệu đọc hiểu chung (Passage / Split Panel) */
.passage-card {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-left: 4px solid var(--color1);
    border-radius: 8px;
    padding: 0.75rem 1.1rem;
    margin-bottom: 0.75rem;
    line-height: 1.55;
    font-size: 0.98rem;
    color: #334155;
}

.passage-card .passage-title {
    font-weight: 700;
    color: var(--primary-navy);
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.88rem;
}
.questions-content img, .passage-card img {
    max-width: 100% !important;
    max-height: 100vh;
} 
/* ==========================================================================
   LỰA CHỌN ĐÁP ÁN (A, B, C, D)
   ========================================================================== */
.question-options-1 {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.option-dt1 {
    width: 100%;
    margin-bottom: 0.15rem;
}

.option-dt1.da-2 {
    width: calc(50% - 0.25rem);
}

.option-dt1.da-4 {
    width: calc(25% - 0.35rem);
}

@media (max-width: 991px) {
    .option-dt1.da-2, .option-dt1.da-4 {
        width: 100%;
    }
}

.check-box.text {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.45rem 0.85rem;
    min-height: 38px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    background: #fff;
    transition: all 0.15s ease;
    width: 100%;
}

.check-box.text:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateX(2px);
}

.check-box.text.selected {
    background: #eff6ff;
    border-color: var(--color1);
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.15);
}

.check-badge {
    width: 26px;
    height: 26px;
    min-width: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    transition: all 0.15s ease;
}

.check-box.text.selected .check-badge {
    background: var(--color1);
    color: #fff;
    border-color: var(--color1);
}

.check-label {
    font-size: 0.98rem;
    color: #1e293b;
    line-height: 1.4;
    flex: 1;
}

/* ==========================================================================
   CỘT PHẢI: PHIẾU TRẢ LỜI & MA TRẬN 120 CÂU
   ========================================================================== */
.col-right .main-header {
    padding: 1.2rem 1.5rem;
}

.col-right .main-header .title {
    font-size: 1.1rem;
    color: var(--primary-navy);
}

.col-right .main-header .lable {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

/* Header Info đề thi cột phải */
.exam-info-card {
    background: #f8fafc;
}

/* Khối Timer & Nộp bài cột phải */
.timer-action-box {
    background: #fff;
}

.timer-action-box.warning-5min {
    background: #fff1f2;
}

.timer-action-box .timer-digits {
    font-size: 1.6rem;
    line-height: 1;
    letter-spacing: 1px;
}

/* Segmented Control 4 nút cân đối 100% không tràn (Sửa lỗi khoanh đỏ) */
.phieu-segmented-filter {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: #f1f5f9;
    padding: 3px;
    border-radius: 10px;
    gap: 3px;
}

.phieu-segmented-filter .seg-btn {
    border: none;
    background: transparent;
    border-radius: 8px;
    padding: 5px 2px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #475569;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.15;
    cursor: pointer;
    transition: all 0.15s ease;
}

.phieu-segmented-filter .seg-btn .badge-count {
    font-size: 0.7rem;
    font-weight: 700;
    margin-top: 2px;
}

.phieu-segmented-filter .seg-btn:hover {
    background: rgba(255, 255, 255, 0.6);
    color: #1e293b;
}

.phieu-segmented-filter .seg-btn.active {
    background: #fff;
    color: var(--primary-navy);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    font-weight: 700;
}

.phieu-segmented-filter .seg-btn.seg-answered.active {
    color: #059669;
}

.phieu-segmented-filter .seg-btn.seg-flagged.active {
    color: #d97706;
}

/* Lưới 120 câu hỏi nhảy nhanh Hiện đại: Đáp án to rõ ràng */
.matrix-grid-wrap {
    flex: 1;
    overflow-y: auto;
    padding: 0.6rem 0.8rem;
}

/* Nhóm phân đoạn trong ma trận câu hỏi */
.slot-group-box {
    margin-bottom: 0.9rem;
}

.slot-group-header {
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    margin-bottom: 0.4rem;
}

.slot-group-header:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.slot-group-header.is-active-slot {
    background: #e0f2fe;
    border-color: #7dd3fc;
}

.slot-group-header.is-active-slot .slot-group-title {
    color: #0284c7 !important;
}

.slot-group-title {
    color: var(--primary-navy);
}

.question-grid-modern {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
    margin-bottom: 1rem;
}

.grid-item-modern {
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    position: relative;
    cursor: pointer;
    transition: all 0.12s ease;
    padding: 2px;
    outline: none;
}

.grid-item-modern:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}

/* Số câu hỏi khi chưa làm */
.grid-item-modern .q-num {
    font-size: 0.92rem;
    font-weight: 700;
    color: #475569;
    transition: all 0.12s;
}

/* Khi đã chọn đáp án: Số câu thu nhỏ lên góc trái, đáp án hiển thị to rõ giữa tâm */
.grid-item-modern.is-answered {
    background: #eff6ff;
    border-color: #3b82f6;
}

.grid-item-modern.is-answered .q-num {
    position: absolute;
    top: 2px;
    left: 4px;
    font-size: 0.62rem;
    font-weight: 600;
    color: #64748b;
}

.grid-item-modern.is-answered .q-ans-badge {
    font-size: 1.15rem;
    font-weight: 800;
    color: #1d4ed8;
    line-height: 1;
}

/* Khi cắm cờ (Flagged) */
.grid-item-modern.is-flagged {
    border-color: #f59e0b;
    border-width: 2px;
    background: #fffbeb;
}

.grid-item-modern.is-flagged .q-flag-icon {
    position: absolute;
    top: 3px;
    right: 4px;
    font-size: 0.65rem;
    color: #f59e0b;
}

.grid-item-modern.is-flagged.is-answered {
    background: #fef3c7;
    border-color: #d97706;
}

/* Khi đang ở câu hỏi hiện tại */
.grid-item-modern.is-current {
    box-shadow: 0 0 0 2.5px #0284c7;
    transform: scale(1.05);
    z-index: 2;
}

/* Cột danh sách dòng câu hỏi kiểu dọc */
.dt-answers-doc-1 {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.dt-answers-doc-1 .question {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    background: #f8fafc;
}

.dt-answers-doc-1 .question:hover {
    background: #f1f5f9;
}

.dt-answers-doc-1 .question label {
    width: 2.2rem;
    font-weight: 700;
    color: #334155;
    font-size: 0.9rem;
    margin: 0;
}

.dt-answers-doc-1 .radio-yesno {
    display: flex;
    gap: 0.6rem;
    flex: 1;
    justify-content: space-between;
}

.mini-opt-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #cbd5e1;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    transition: all 0.1s;
}

.mini-opt-btn:hover {
    border-color: var(--color1);
    color: var(--color1);
}

.mini-opt-btn.active {
    background: var(--color1);
    color: #fff;
    border-color: var(--color1);
}

/* ==========================================================================
   DRAWER PHIẾU TRẢ LỜI CHO MOBILE & TABLET
   ========================================================================== */
.bottom-nav {
    display: none;
    position: fixed;
    z-index: 100;
    width: 100%;
    bottom: 0;
    left: 0;
    text-align: center;
    padding: 0.8rem 1.2rem;
    border-top: 1px solid var(--border-color);
    background: #fff;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
}

.bottom-nav .btn-link {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color1);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@media (max-width: 1199px) {
    .container-row {
        flex-direction: column;
    }

    .col-right {
        width: 100vw;
        height: 100vh;
        background: rgba(15, 23, 42, 0.6);
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1050;
        opacity: 0;
        transition: opacity 0.2s ease;
        padding: 0;
    }

    .col-right.in {
        display: block;
        opacity: 1;
    }

    .col-right .main-content.main-right {
        position: absolute;
        top: 0;
        right: 0;
        width: 360px;
        max-width: 85vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 16px 0 0 16px;
        transform: translate3d(100%, 0, 0);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .col-right.in .main-content.main-right {
        transform: translate3d(0, 0, 0);
    }

    .bottom-nav {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .view-de-thi {
        padding-bottom: 70px;
    }
}



/* ==========================================================================
   TỐI ƯU GIAO DIỆN DI ĐỘNG (MOBILE VIEWPORT <= 768px & <= 576px)
   Giảm tối đa lề màn hình (margin/padding) & nội dung câu hỏi để tối ưu diện tích đọc
   ========================================================================== */
@media (max-width: 768px) {
    /* 1. Lề màn hình ngoài cùng */
    body.in-exam-mode .view-de-thi {
        padding: 0px !important;
        max-width: 100% !important;
    }

    .container-row {
        gap: 0 !important;
    }

    .main-content.main-left {
        border-radius: 8px !important;
        border: 1px solid var(--border-color);
        box-shadow: none !important;
    }

    /* 2. Header đề thi trên mobile */
    .main-header {
        padding: 0.75rem 0.6rem 0.5rem !important;
    }

    .main-header .title {
        font-size: 0.85rem !important;
        line-height: 1.3 !important;
    }

    .main-header .lable {
        font-size: 1.05rem !important;
        margin: 0.2rem 0 !important;
        line-height: 1.35 !important;
    }

    .main-header .time {
        font-size: 0.78rem !important;
        line-height: 1.4 !important;
        display: flex;
        flex-direction: column;
        gap: 0.15rem;
    }

    .main-header .time span + span::before {
        display: none;
    }

    /* 3. Thanh đếm ngược thời gian */
    .count-time {
        padding: 0.45rem 0.6rem !important;
        gap: 0.5rem !important;
    }

    .count-time .time-text {
        font-size: 0.82rem !important;
        margin-bottom: 0.2rem !important;
    }

    .count-time .time-text .right {
        font-size: 1rem !important;
    }

    /* 4. Thanh 5 Tabs phân đoạn trên Mobile */
    .classify-tabs {
        padding: 0.3rem 0.4rem !important;
        top: 0 !important;
        overflow-x: hidden !important;
    }

    .classify-tabs .nav {
        padding: 2px !important;
        gap: 2px !important;
        width: 100% !important;
        min-width: 0 !important;
        display: flex !important;
        flex-wrap: nowrap !important;
    }

    .classify-tabs .nav > li {
        flex: 0 0 auto !important;
        transition: all 0.2s ease;
    }

    .classify-tabs .nav > li.active {
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }

    .classify-tabs .nav > li > .btn {
        padding: 0.4rem 0.45rem !important;
        font-size: 0.76rem !important;
        white-space: nowrap !important;
        text-align: center !important;
        min-width: 32px;
    }

    .classify-tabs .nav > li.active > .btn {
        padding: 0.4rem 0.6rem !important;
        font-weight: 700 !important;
    }

    .btn-mobile-phieu {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        padding: 0 !important;
        border-radius: 50% !important;
        font-size: 0.85rem !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* 5. Khối câu hỏi (Question Container & Item) */
    .dt-dang-thuc {
        padding: 0.45rem 0.6rem !important;
        font-size: 0.92rem !important;
        margin-bottom: 0.35rem !important;
        border-left-width: 3px !important;
    }

    .questions {
        padding: 0.65rem 0.75rem !important; /* Giảm mạnh từ 1.6rem (25.6px) xuống 8-10px */
        border-top: 1px solid #f1f5f9 !important;
    }

    .question-header {
        margin-bottom: 0.35rem !important; /* Giảm từ 0.8rem */
    }

    .question-header .badge {
        font-size: 0.78rem !important;
        padding: 0.25rem 0.5rem !important;
    }

    .question-header .btn-flag {
        font-size: 0.75rem !important;
        padding: 0.2rem 0.5rem !important;
    }

    /* 6. Nội dung đề bài */
    .questions-content {
        font-size: 0.98rem !important;
        line-height: 1.5 !important;
        margin-bottom: 0.55rem !important; /* Giảm mạnh từ 1.2rem */
        text-align: left !important;
        overflow-y: auto;
    }

    /* 7. Ngữ liệu đọc hiểu dài (Passage Card) */
    .passage-card {
        padding: 0.6rem 0.65rem !important; /* Giảm từ 1.2rem 1.4rem */
        margin-bottom: 0.6rem !important; /* Giảm từ 1.4rem */
        font-size: 0.92rem !important;
        line-height: 1.5 !important;
        border-left-width: 3px !important;
        overflow-y: auto;
    }

    .passage-card .passage-title {
        font-size: 0.88rem !important;
        margin-bottom: 0.25rem !important;
    }

    /* 8. Danh sách lựa chọn đáp án A, B, C, D */
    .question-options-1 {
        gap: 0.3rem !important; /* Giảm từ 0.8rem */
    }

    .option-dt1 {
        margin-bottom: 0.15rem !important;
    }

    .check-box.text {
        padding: 0.45rem 0.6rem !important; /* Giảm mạnh từ 0.8rem 1.2rem */
        gap: 0.55rem !important;            /* Giảm từ 1rem */
        border-radius: 8px !important;
        min-height: 40px;
    }

    .check-badge {
        width: 26px !important;
        height: 26px !important;
        min-width: 26px !important;
        font-size: 0.82rem !important;
    }

    .check-label {
        font-size: 0.95rem !important;
        line-height: 1.4 !important;
    }

    /* 9. Bottom Navigation phòng thi cố định ở đáy */
    .bottom-nav {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 0.45rem 0.75rem !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        z-index: 1040 !important;
        background: #fff !important;
        box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1) !important;
        border-top: 1px solid var(--border-color) !important;
    }

    .bottom-nav .bottom-timer {
        font-size: 0.95rem;
    }

    /* 10. Trang kết quả & Lời giải chi tiết trên Mobile */
    .ket-qua-page {
        padding-top: 0.5rem !important;
        padding-bottom: 1.5rem !important;
    }

    .ket-qua-page .container {
        padding-left: 0.4rem !important;
        padding-right: 0.4rem !important;
    }

    .ket-qua-page .card {
        padding: 0.75rem 0.6rem !important;
        border-radius: 10px !important;
    }

    .detail-questions-list .card {
        padding: 0.6rem 0.55rem !important;
        margin-bottom: 0.45rem !important;
    }
}


/* ==========================================================================
   CÁC TÍNH NĂNG CẢI THIỆN UX/UI: SCROLL-SPY, CẢNH BÁO 5 PHÚT, DARK MODE
   ========================================================================== */

/* 1. NÚT TIỆN ÍCH HEADER (THEME TOGGLE & MUTE TOGGLE) */
.btn-tool-exam {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1.5px solid #cbd5e1;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.btn-tool-exam:hover {
    background: #f1f5f9;
    border-color: var(--color1);
    transform: translateY(-1px);
}

/* 2. SCROLL-SPY PHÁT SÁNG CHO 5 PHÂN ĐOẠN */
.classify-tabs .nav > li.active > .btn {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    color: #fff !important;
    box-shadow: 0 0 14px rgba(2, 132, 199, 0.6) !important;
    animation: tabGlow 2.4s infinite ease-in-out;
}

@keyframes tabGlow {
    0%, 100% {
        box-shadow: 0 0 8px rgba(2, 132, 199, 0.45);
    }
    50% {
        box-shadow: 0 0 18px rgba(2, 132, 199, 0.85);
    }
}

/* 3. CẢNH BÁO THỜI GIAN 5 PHÚT CUỐI */
.count-time.warning-5min {
    background: linear-gradient(180deg, #fef2f2 0%, #fee2e2 100%) !important;
    border: 1.5px solid #ef4444 !important;
    animation: pulseWarning 1.2s infinite ease-in-out;
}

.count-time.warning-5min .right {
    color: #dc2626 !important;
    font-weight: 900 !important;
    text-shadow: 0 0 8px rgba(220, 38, 38, 0.25);
}

.count-time.warning-5min .progress-bar {
    background: #ef4444 !important;
}

@keyframes pulseWarning {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
    }
    50% {
        box-shadow: 0 4px 20px rgba(239, 68, 68, 0.5);
    }
}

.badge-time-warning {
    background: #ef4444;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    animation: badgePulse 1s infinite alternate;
    display: inline-flex;
    align-items: center;
}

@keyframes badgePulse {
    from {
        opacity: 0.85;
        transform: scale(0.96);
    }
    to {
        opacity: 1;
        transform: scale(1.04);
    }
}

/* 4. CHẾ ĐỘ NỀN TỐI DỊU MẮT (EYE-CARE DARK MODE PALETTE) */
.view-de-thi.theme-dark {
    background-color: #0b132b !important;
    color: #e2e8f0 !important;
}

.view-de-thi.theme-dark .main-content.main-left,
.view-de-thi.theme-dark .main-content.main-right {
    background: #1c2541 !important;
    border-color: #334155 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

.view-de-thi.theme-dark .main-header {
    background: linear-gradient(180deg, #1c2541 0%, #151d33 100%) !important;
    border-bottom-color: #334155 !important;
}

.view-de-thi.theme-dark .main-header .title {
    color: #38bdf8 !important;
}

.view-de-thi.theme-dark .main-header .lable {
    color: #f8fafc !important;
}

.view-de-thi.theme-dark .main-header .time {
    color: #94a3b8 !important;
}

.view-de-thi.theme-dark .count-time {
    background: #151d33 !important;
    border-bottom-color: #334155 !important;
}

.view-de-thi.theme-dark .count-time .time-text {
    color: #cbd5e1 !important;
}

.view-de-thi.theme-dark .count-time .time-text .right {
    color: #38bdf8 !important;
}

.view-de-thi.theme-dark .count-time.warning-5min {
    background: linear-gradient(180deg, #2b1118 0%, #3b1118 100%) !important;
    border-color: #f43f5e !important;
}

.view-de-thi.theme-dark .count-time.warning-5min .right {
    color: #fb7185 !important;
}

.view-de-thi.theme-dark .btn-tool-exam {
    background: #151d33 !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}

.view-de-thi.theme-dark .btn-tool-exam:hover {
    background: #1c2541 !important;
    border-color: #38bdf8 !important;
}

.view-de-thi.theme-dark .classify-tabs {
    background: #0f172a !important;
    border-bottom-color: #334155 !important;
}

.view-de-thi.theme-dark .classify-tabs .nav {
    background: #1e293b !important;
}

.view-de-thi.theme-dark .classify-tabs .nav > li > .btn {
    color: #94a3b8 !important;
}

.view-de-thi.theme-dark .classify-tabs .nav > li.active > .btn {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    color: #fff !important;
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.7) !important;
}

.view-de-thi.theme-dark .dt-dang-thuc {
    background: #151d33 !important;
    color: #f8fafc !important;
    border-color: #334155 !important;
    border-left-color: #38bdf8 !important;
}

.view-de-thi.theme-dark .questions {
    border-top-color: #27354f !important;
    background: transparent !important;
}

.view-de-thi.theme-dark .questions:hover {
    background: rgba(255, 255, 255, 0.02) !important;
}

.view-de-thi.theme-dark .questions.highlighted {
    background: rgba(16, 185, 129, 0.08) !important;
    border-left-color: #10b981 !important;
}

.view-de-thi.theme-dark .question-header .badge.bg-light {
    background: #151d33 !important;
    color: #94a3b8 !important;
    border-color: #334155 !important;
}

.view-de-thi.theme-dark .question-header .btn-flag {
    background: #151d33 !important;
    border-color: #334155 !important;
    color: #94a3b8 !important;
}

.view-de-thi.theme-dark .question-header .btn-flag:hover {
    background: #2b2315 !important;
    color: #f59e0b !important;
    border-color: #f59e0b !important;
}

.view-de-thi.theme-dark .question-header .btn-flag.active {
    background: #3b2a12 !important;
    color: #fbbf24 !important;
    border-color: #f59e0b !important;
}

.view-de-thi.theme-dark .questions-content {
    color: #f1f5f9 !important;
}

.view-de-thi.theme-dark .passage-card {
    background: #0f172a !important;
    border-color: #334155 !important;
    border-left-color: #38bdf8 !important;
    color: #cbd5e1 !important;
}

.view-de-thi.theme-dark .passage-card .passage-title {
    color: #38bdf8 !important;
}

/* Ô đáp án trắc nghiệm chế độ Dark Mode */
.view-de-thi.theme-dark .check-box.text {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}

.view-de-thi.theme-dark .check-box.text:hover {
    background: #151d33 !important;
    border-color: #64748b !important;
}

.view-de-thi.theme-dark .check-box.text.selected {
    background: rgba(2, 132, 199, 0.22) !important;
    border-color: #38bdf8 !important;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.2) !important;
}

.view-de-thi.theme-dark .check-badge {
    background: #1e293b !important;
    color: #cbd5e1 !important;
    border-color: #334155 !important;
}

.view-de-thi.theme-dark .check-box.text.selected .check-badge {
    background: #0284c7 !important;
    color: #fff !important;
    border-color: #38bdf8 !important;
}

.view-de-thi.theme-dark .check-label {
    color: #f1f5f9 !important;
}

/* MathJax màu chữ sáng trong Dark Mode */
.view-de-thi.theme-dark mjx-container,
.view-de-thi.theme-dark mjx-math {
    color: #f8fafc !important;
}

/* ==========================================================================
   CỘT PHẢI COL-RIGHT (THÔNG TIN ĐỀ, ĐỒNG HỒ, TIẾN ĐỘ & 120 CÂU) DARK MODE
   ========================================================================== */
.view-de-thi.theme-dark .exam-info-card {
    background: #151d33 !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}

.view-de-thi.theme-dark .exam-info-card .text-navy,
.view-de-thi.theme-dark h6.text-navy {
    color: #38bdf8 !important;
}

.view-de-thi.theme-dark .exam-info-card .text-secondary {
    color: #94a3b8 !important;
}

/* Khối đồng hồ đếm ngược */
.view-de-thi.theme-dark .timer-action-box {
    background: #151d33 !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}

.view-de-thi.theme-dark .timer-action-box .text-secondary {
    color: #94a3b8 !important;
}

.view-de-thi.theme-dark .timer-action-box .timer-digits {
    color: #f43f5e !important;
}

.view-de-thi.theme-dark .timer-action-box.warning-5min {
    background: linear-gradient(180deg, #2b1118 0%, #3b1118 100%) !important;
    border-color: #f43f5e !important;
}

/* Khối tiến độ & Bộ lọc trạng thái Segmented Control */
.view-de-thi.theme-dark .progress-filter-box {
    background: #151d33 !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}

.view-de-thi.theme-dark .progress-filter-box .text-secondary {
    color: #94a3b8 !important;
}

.view-de-thi.theme-dark .progress-filter-box .text-navy {
    color: #f8fafc !important;
}

.view-de-thi.theme-dark .phieu-segmented-filter {
    background: #0f172a !important;
    border: 1px solid #334155 !important;
}

.view-de-thi.theme-dark .phieu-segmented-filter .seg-btn {
    color: #94a3b8 !important;
}

.view-de-thi.theme-dark .phieu-segmented-filter .seg-btn:hover {
    background: #1e293b !important;
    color: #f1f5f9 !important;
}

.view-de-thi.theme-dark .phieu-segmented-filter .seg-btn.active {
    background: #0284c7 !important;
    color: #ffffff !important;
}

.view-de-thi.theme-dark .phieu-segmented-filter .seg-btn .badge-count {
    background: #1e293b !important;
    color: #cbd5e1 !important;
}

.view-de-thi.theme-dark .phieu-segmented-filter .seg-btn.active .badge-count {
    background: rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
}

/* Lưới 120 ô câu hỏi nhảy nhanh col-right Dark Mode */
.view-de-thi.theme-dark .matrix-grid-wrap {
    background: #1c2541 !important;
}

.view-de-thi.theme-dark .matrix-grid-wrap::-webkit-scrollbar-thumb {
    background: #334155 !important;
}

.view-de-thi.theme-dark .matrix-grid-wrap::-webkit-scrollbar-thumb:hover {
    background: #475569 !important;
}

.view-de-thi.theme-dark .grid-item-modern {
    background: #151d33 !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}

.view-de-thi.theme-dark .grid-item-modern:hover {
    border-color: #38bdf8 !important;
    background: #1e293b !important;
    transform: translateY(-1px);
}

.view-de-thi.theme-dark .grid-item-modern .q-num {
    color: #cbd5e1 !important;
}

/* Ô đã làm bài trong phòng thi */
.view-de-thi.theme-dark .grid-item-modern.is-answered {
    background: #064e3b !important;
    border-color: #10b981 !important;
    color: #ecfdf5 !important;
}

.view-de-thi.theme-dark .grid-item-modern.is-answered .q-num {
    color: #a7f3d0 !important;
}

.view-de-thi.theme-dark .grid-item-modern.is-answered .q-ans-badge {
    color: #ffffff !important;
    border: none !important;
}

/* Ô cắm cờ xem lại */
.view-de-thi.theme-dark .grid-item-modern.is-flagged {
    border-color: #f59e0b !important;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.4) !important;
}

.view-de-thi.theme-dark .grid-item-modern .q-flag-icon {
    color: #f59e0b !important;
}

/* Ô câu hỏi đang chọn làm */
.view-de-thi.theme-dark .grid-item-modern.is-current {
    box-shadow: 0 0 0 2px #38bdf8 !important;
    border-color: #38bdf8 !important;
}

/* Thanh điều hướng đáy Mobile */
.view-de-thi.theme-dark .bottom-nav {
    background: #1c2541 !important;
    border-top-color: #334155 !important;
}

/* Dark mode cho slot-group-header */
.view-de-thi.theme-dark .slot-group-header {
    background: #151d33 !important;
    border-color: #334155 !important;
}
.view-de-thi.theme-dark .slot-group-header:hover {
    background: #1e293b !important;
}
.view-de-thi.theme-dark .slot-group-header.is-active-slot {
    background: #0c4a6e !important;
    border-color: #0284c7 !important;
}
.view-de-thi.theme-dark .slot-group-header .slot-group-title {
    color: #f1f5f9 !important;
}
.view-de-thi.theme-dark .slot-group-header.is-active-slot .slot-group-title {
    color: #38bdf8 !important;
}

.view-de-thi.theme-dark .slot-group-header .badge {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #94a3b8 !important;
}

.view-de-thi.theme-dark .slot-group-header .badge.bg-success-subtle {
    background: rgba(16, 185, 129, 0.2) !important;
    border-color: #10b981 !important;
    color: #6ee7b7 !important;
}

/* Nền đồng bộ toàn màn hình khi Dark Mode trên màn lớn > 1366px */
body.in-exam-mode:has(.theme-dark) {
    background-color: #0b132b !important;
}


/* ==========================================================================
   GIAO DIỆN XEM KẾT QUẢ & ĐÁP ÁN BÀI THI (.view-ket-qua)
   ========================================================================== */
.view-ket-qua .questions {
    transition: all 0.25s ease;
}

.view-ket-qua .questions.highlighted {
    border-left: 4px solid var(--color1) !important;
    background: #f8fafc;
}

/* Đáp án đúng của đề */
.check-box.text.is-dapan-dung {
    border-color: #10b981 !important;
    background: #ecfdf5 !important;
}
.check-box.text.is-dapan-dung .check-badge {
    background: #10b981 !important;
    color: #fff !important;
    border-color: #10b981 !important;
}

/* Học sinh chọn sai phương án này */
.check-box.text.is-dapan-chon-sai {
    border-color: #ef4444 !important;
    background: #fef2f2 !important;
}
.check-box.text.is-dapan-chon-sai .check-badge {
    background: #ef4444 !important;
    color: #fff !important;
    border-color: #ef4444 !important;
}

/* Học sinh chọn đúng phương án này */
.check-box.text.is-dapan-chon-dung {
    border-color: #059669 !important;
    background: #ecfdf5 !important;
}
.check-box.text.is-dapan-chon-dung .check-badge {
    background: #059669 !important;
    color: #fff !important;
    border-color: #059669 !important;
}

/* Tối ưu chiều cao đồng bộ & chống xô lệch cho các thẻ đáp án */
.view-ket-qua .question-options-1 {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}

.view-ket-qua .option-dt1 {
    display: flex;
    flex-direction: column;
}

.view-ket-qua .check-box.text {
    flex: 1;
    height: 100%;
    min-height: 52px;
}

/* Icon trạng thái đáp án tinh gọn (24px) thay cho huy hiệu chữ dài */
.da-status-icon {
    width: 24px;
    height: 24px;
    min-width: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    margin-left: auto;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

/* Thí sinh chọn đúng: Nền xanh lá, icon trắng */
.da-status-icon.is-correct {
    background: #10b981;
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.3);
}

/* Đáp án đúng (thí sinh không chọn): Nền xanh nhạt, viền xanh lá, icon xanh */
.da-status-icon.is-key {
    background: #d1fae5;
    color: #059669;
    border: 1.5px solid #10b981;
}

/* Thí sinh chọn sai: Nền đỏ, icon trắng */
.da-status-icon.is-wrong {
    background: #ef4444;
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(239, 68, 68, 0.3);
}

/* Khối xem hướng dẫn giải chi tiết */
.loi-giai-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #10b981;
    border-radius: 8px;
    padding: 0.65rem 1rem;
    margin-top: 0.65rem;
    animation: fadeInDown 0.2s ease-in-out;
}

.loi-giai-box .loi-giai-header {
    font-weight: 700;
    color: #047857;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
}

.loi-giai-box .loi-giai-content {
    font-size: 0.95rem;
    color: #1e293b;
    line-height: 1.5;
}

/* Nút bấm xem/thu gọn lời giải */
.btn-toggle-loigiai {
    padding: 0.22rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 20px;
    transition: all 0.15s ease;
}

/* Ma trận 120 câu hỏi cho trang kết quả */
.grid-item-modern.is-correct {
    background: #ecfdf5 !important;
    border-color: #10b981 !important;
}
.grid-item-modern.is-correct .q-num {
    position: absolute;
    top: 2px;
    left: 4px;
    font-size: 0.62rem;
    font-weight: 600;
    color: #047857;
}
.grid-item-modern.is-correct .q-ans-badge {
    font-size: 1.15rem;
    font-weight: 800;
    color: #059669 !important;
    line-height: 1;
}
.grid-item-modern.is-correct .q-status-icon {
    position: absolute;
    top: 3px;
    right: 3px;
    font-size: 0.65rem;
    color: #10b981;
}

.grid-item-modern.is-wrong {
    background: #fef2f2 !important;
    border-color: #ef4444 !important;
}
.grid-item-modern.is-wrong .q-num {
    position: absolute;
    top: 2px;
    left: 4px;
    font-size: 0.62rem;
    font-weight: 600;
    color: #b91c1c;
}
.grid-item-modern.is-wrong .q-ans-badge {
    font-size: 1.15rem;
    font-weight: 800;
    color: #dc2626 !important;
    line-height: 1;
}
.grid-item-modern.is-wrong .q-status-icon {
    position: absolute;
    top: 3px;
    right: 3px;
    font-size: 0.65rem;
    color: #ef4444;
}

.grid-item-modern.is-unanswered {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
}
.grid-item-modern.is-unanswered .q-num {
    font-size: 0.92rem;
    font-weight: 700;
    color: #64748b;
}
.grid-item-modern.is-unanswered .q-status-icon {
    position: absolute;
    top: 3px;
    right: 3px;
    font-size: 0.6rem;
    color: #94a3b8;
}

/* Segmented filter riêng cho kết quả */
.phieu-segmented-filter .seg-btn.seg-correct.active {
    color: #059669;
}
.phieu-segmented-filter .seg-btn.seg-wrong.active {
    color: #dc2626;
}
.phieu-segmented-filter .seg-btn.seg-skipped.active {
    color: #d97706;
}

/* Modal tổng kết kết quả */
.modal-tong-ket-content {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   MODAL BÁO CÁO KẾT QUẢ V-ACT (HIỆN ĐẠI, GỌN GÀNG, TỐI ƯU MOBILE)
   ========================================================================== */
.modal-tong-ket-content {
    background: #f8fafc;
    border-radius: 20px;
    overflow: hidden;
}

.modal-hero-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.28);
}

.scoreboard-hero-card {
    background: #ffffff;
    border-color: #e2e8f0;
}

.shadow-xs {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.modal-segmented-nav {
    background: #f1f5f9;
}

.modal-segmented-nav .tab-seg-item {
    cursor: pointer;
    transition: all 0.2s ease;
}

@media (min-width: 768px) {
    .border-md-end {
        border-right: 1px solid #e2e8f0 !important;
    }
}

@media (max-width: 767.98px) {
    .modal-tong-ket-content {
        border-radius: 0;
    }
    .modal-fullscreen-md-down {
        width: 100vw;
        max-width: none;
        height: 100%;
        margin: 0;
    }
    .modal-fullscreen-md-down .modal-content {
        height: 100%;
        border: 0;
        border-radius: 0;
    }
}


/* ==========================================================================
   CHẾ ĐỘ NỀN TỐI CHO GIAO DIỆN XEM KẾT QUẢ & BÁO CÁO TỔNG KẾT (DARK MODE)
   ========================================================================== */
.view-ket-qua.theme-dark .exam-info-card,
.view-ket-qua.theme-dark .p-3.border-bottom.bg-white,
.view-ket-qua.theme-dark .progress-filter-box {
    background: #151d33 !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}

.view-ket-qua.theme-dark .exam-info-card .text-navy,
.view-ket-qua.theme-dark h6.text-navy {
    color: #38bdf8 !important;
}

.view-ket-qua.theme-dark .exam-info-card .text-secondary {
    color: #94a3b8 !important;
}

.view-ket-qua.theme-dark .phieu-segmented-filter {
    background: #0f172a !important;
    border: 1px solid #334155 !important;
}

.view-ket-qua.theme-dark .phieu-segmented-filter .seg-btn {
    color: #94a3b8 !important;
}

.view-ket-qua.theme-dark .phieu-segmented-filter .seg-btn:hover {
    background: #1e293b !important;
    color: #f1f5f9 !important;
}

.view-ket-qua.theme-dark .phieu-segmented-filter .seg-btn.active {
    background: #0284c7 !important;
    color: #ffffff !important;
}

.view-ket-qua.theme-dark .phieu-segmented-filter .seg-btn .badge-count {
    background: #1e293b !important;
    color: #cbd5e1 !important;
}

.view-ket-qua.theme-dark .phieu-segmented-filter .seg-btn.active .badge-count {
    background: rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
}

/* 120 Ô ma trận câu hỏi Dark Mode */
.view-ket-qua.theme-dark .grid-item-modern {
    background: #151d33 !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}

.view-ket-qua.theme-dark .grid-item-modern:hover {
    border-color: #38bdf8 !important;
    transform: translateY(-1px);
}

.view-ket-qua.theme-dark .grid-item-modern.is-correct {
    background: #064e3b !important;
    border-color: #10b981 !important;
    color: #ecfdf5 !important;
}

.view-ket-qua.theme-dark .grid-item-modern.is-wrong {
    background: #450a0a !important;
    border-color: #ef4444 !important;
    color: #fef2f2 !important;
}

.view-ket-qua.theme-dark .grid-item-modern.is-unanswered {
    background: #1e293b !important;
    border-color: #475569 !important;
    color: #94a3b8 !important;
}

.view-ket-qua.theme-dark .grid-item-modern.is-current {
    box-shadow: 0 0 0 2px #38bdf8 !important;
}

/* Cột trái: 120 câu hỏi & lời giải Dark Mode */
.view-ket-qua.theme-dark .questions {
    background: #151d33 !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}

.view-ket-qua.theme-dark .questions.highlighted {
    background: #1e293b !important;
    border-left: 4px solid #38bdf8 !important;
}

.view-ket-qua.theme-dark .dt-dang-thuc {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #38bdf8 !important;
}

.view-ket-qua.theme-dark .passage-card {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}

.view-ket-qua.theme-dark .passage-card .passage-title {
    color: #38bdf8 !important;
    border-bottom-color: #334155 !important;
}

.view-ket-qua.theme-dark .questions-content {
    color: #f1f5f9 !important;
}

.view-ket-qua.theme-dark .check-box.text {
    background: #1c2541 !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}

.view-ket-qua.theme-dark .check-box.text .check-badge {
    background: #151d33 !important;
    border-color: #475569 !important;
    color: #94a3b8 !important;
}

.view-ket-qua.theme-dark .check-box.text.is-dapan-dung {
    background: #064e3b !important;
    border-color: #10b981 !important;
    color: #ecfdf5 !important;
}

.view-ket-qua.theme-dark .check-box.text.is-dapan-dung .check-badge {
    background: #10b981 !important;
    border-color: #10b981 !important;
    color: #ffffff !important;
}

.view-ket-qua.theme-dark .check-box.text.is-dapan-chon-dung {
    background: #064e3b !important;
    border-color: #059669 !important;
    color: #ecfdf5 !important;
}

.view-ket-qua.theme-dark .check-box.text.is-dapan-chon-dung .check-badge {
    background: #059669 !important;
    border-color: #059669 !important;
    color: #ffffff !important;
}

.view-ket-qua.theme-dark .check-box.text.is-dapan-chon-sai {
    background: #450a0a !important;
    border-color: #ef4444 !important;
    color: #fef2f2 !important;
}

.view-ket-qua.theme-dark .check-box.text.is-dapan-chon-sai .check-badge {
    background: #ef4444 !important;
    border-color: #ef4444 !important;
    color: #ffffff !important;
}

.view-ket-qua.theme-dark .loi-giai-box {
    background: #0f172a !important;
    border-color: #334155 !important;
    border-left: 4px solid #10b981 !important;
    color: #cbd5e1 !important;
}

.view-ket-qua.theme-dark .loi-giai-box .loi-giai-title {
    color: #34d399 !important;
}

.view-ket-qua.theme-dark .loi-giai-box .loi-giai-content {
    color: #e2e8f0 !important;
}

/* Modal Báo Cáo Phân Tích & Tổng Kết Dark Mode */
body.theme-dark .modal-tong-ket-content,
.view-ket-qua.theme-dark .modal-tong-ket-content {
    background: #0b132b !important;
    color: #f1f5f9 !important;
    border: 1px solid #334155 !important;
}

body.theme-dark .modal-tong-ket-content .modal-header,
.view-ket-qua.theme-dark .modal-tong-ket-content .modal-header {
    background: #151d33 !important;
    border-bottom: 1px solid #334155 !important;
}

body.theme-dark .modal-tong-ket-content .modal-header .text-navy,
.view-ket-qua.theme-dark .modal-tong-ket-content .modal-header .text-navy {
    color: #38bdf8 !important;
}

body.theme-dark .modal-tong-ket-content .scoreboard-hero-card,
.view-ket-qua.theme-dark .modal-tong-ket-content .scoreboard-hero-card {
    background: #151d33 !important;
    border: 1px solid #334155 !important;
}

body.theme-dark .modal-tong-ket-content .percentile-banner,
.view-ket-qua.theme-dark .modal-tong-ket-content .percentile-banner {
    background: #0c4a6e !important;
    border: 1px dashed #0284c7 !important;
    color: #38bdf8 !important;
}

body.theme-dark .modal-tong-ket-content .percentile-banner .text-primary,
.view-ket-qua.theme-dark .modal-tong-ket-content .percentile-banner .text-primary {
    color: #38bdf8 !important;
}

body.theme-dark .modal-tong-ket-content .percentile-banner .text-secondary,
.view-ket-qua.theme-dark .modal-tong-ket-content .percentile-banner .text-secondary {
    color: #cbd5e1 !important;
}

body.theme-dark .modal-tong-ket-content .section-row-card,
.view-ket-qua.theme-dark .modal-tong-ket-content .section-row-card {
    background: #1c2541 !important;
    border: 1px solid #334155 !important;
}

body.theme-dark .modal-tong-ket-content .sub-score-card,
.view-ket-qua.theme-dark .modal-tong-ket-content .sub-score-card {
    background: #1c2541 !important;
    border: 1px solid #334155 !important;
}

body.theme-dark .modal-tong-ket-content .text-navy,
.view-ket-qua.theme-dark .modal-tong-ket-content .text-navy {
    color: #f8fafc !important;
}

body.theme-dark .modal-tong-ket-content .chart-container-card,
.view-ket-qua.theme-dark .modal-tong-ket-content .chart-container-card {
    background: #151d33 !important;
    border: 1px solid #334155 !important;
}

body.theme-dark .modal-tong-ket-content .modal-segmented-nav,
.view-ket-qua.theme-dark .modal-tong-ket-content .modal-segmented-nav {
    background: #151d33 !important;
    border: 1px solid #334155 !important;
}

body.theme-dark .modal-tong-ket-content .modal-segmented-nav .tab-seg-item,
.view-ket-qua.theme-dark .modal-tong-ket-content .modal-segmented-nav .tab-seg-item {
    color: #94a3b8 !important;
}

body.theme-dark .modal-tong-ket-content .modal-segmented-nav .tab-seg-item.active,
.view-ket-qua.theme-dark .modal-tong-ket-content .modal-segmented-nav .tab-seg-item.active {
    background: #1e293b !important;
    color: #38bdf8 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

body.theme-dark .modal-tong-ket-content .modal-footer,
.view-ket-qua.theme-dark .modal-tong-ket-content .modal-footer {
    background: #151d33 !important;
    border-top: 1px solid #334155 !important;
}

@media (min-width: 768px) {
    body.theme-dark .border-md-end,
    .view-ket-qua.theme-dark .border-md-end {
        border-right: 1px solid #334155 !important;
    }
}


/* Mẫu số điểm số và text-muted trong Dark Mode (Khắc phục chữ / 1.200 bị chìm màu tối) */
.view-ket-qua.theme-dark .text-muted,
body.theme-dark .modal-tong-ket-content .text-muted {
    color: #94a3b8 !important;
}

.view-ket-qua.theme-dark .score-total-denom,
body.theme-dark .score-total-denom,
.view-ket-qua.theme-dark span.text-muted.fw-bold,
body.theme-dark .modal-tong-ket-content span.text-muted.fw-bold,
body.theme-dark .scoreboard-hero-card span.text-muted.fw-bold {
    color: #cbd5e1 !important;
}

.view-ket-qua.theme-dark .text-dark,
body.theme-dark .modal-tong-ket-content .text-dark {
    color: #f1f5f9 !important;
}
