body.exam-reading-room {
    margin: 0;
    min-height: 100vh;
    height: 100vh;
    overflow: hidden;
    background: #ffffff;
    color: #1f2937;
    font-family: "Segoe UI", Arial, sans-serif;
}

body.exam-reading-room header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 18px;
    height: 111px;
    padding: 0 32px;
    background: #ffffff;
    border-bottom: 1px solid #eef2f5;
    box-shadow: none;
}

body.exam-reading-room .header-left {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
    color: #111827;
    font-size: 18px;
    font-weight: 700;
}

body.exam-reading-room .header-logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    line-height: 1;
}

body.exam-reading-room .header-left img {
    display: block;
    height: 56px;
    width: auto;
}

body.exam-reading-room .header-left span {
    line-height: 1.25;
}

body.exam-reading-room .btn-thoat {
    display: none !important;
}

body.exam-reading-room .main-container {
    flex: 1 1 auto;
    min-height: 0;
    margin: 4px 24px 0;
    border: 1px solid #eef2f5;
    border-radius: 18px;
    box-shadow: 0 5px 16px rgba(15, 23, 42, 0.028);
    overflow: hidden;
    background: #ffffff;
}

body.exam-reading-room .left-pane {
    width: 50.7%;
    padding: 12px 14px 8px 14px;
    overflow-y: auto;
}

body.exam-reading-room .right-pane {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0;
    overflow-y: auto;
    background: #ffffff;
}

body.exam-reading-room .left-pane::-webkit-scrollbar,
body.exam-reading-room .right-pane::-webkit-scrollbar,
body.exam-reading-room .drawer-body::-webkit-scrollbar {
    width: 6px;
}

body.exam-reading-room .left-pane::-webkit-scrollbar-thumb,
body.exam-reading-room .right-pane::-webkit-scrollbar-thumb,
body.exam-reading-room .drawer-body::-webkit-scrollbar-thumb {
    background: #d3dbe7;
    border-radius: 999px;
}

body.exam-reading-room .resizer {
    width: 1px;
    background: #eef2f5;
    cursor: col-resize;
    position: relative;
}

body.exam-reading-room .resizer::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 88px;
    transform: translate(-50%, -50%);
    border-radius: 999px;
    background: #ccd5df;
}

body.exam-reading-room .passage-title {
    margin-bottom: 8px;
    color: #232d3d;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
}

body.exam-reading-room .passage-content {
    color: #2b3341;
    font-size: 15px;
    line-height: 1.5;
    text-align: justify;
}

body.exam-reading-room .passage-content img {
    max-width: 100%;
    height: auto;
    margin: 14px 0;
    border-radius: 12px;
}

body.exam-reading-room .question-block {
    display: flex;
    gap: 12px;
    padding: 10px 10px 12px 10px;
    border-bottom: 1px solid #eef2f5;
}

body.exam-reading-room .question-block:last-child {
    border-bottom: none;
}

body.exam-reading-room .q-number-badge {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 999px;
    background: #f1f3f6;
    color: #475366;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
}

body.exam-reading-room .q-content {
    flex: 1 1 auto;
    min-width: 0;
}

body.exam-reading-room .q-text {
    color: #222b38;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.42;
}

body.exam-reading-room .q-text img,
body.exam-reading-room .option-text img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

body.exam-reading-room .btn-bookmark {
    width: 34px;
    height: 34px;
    border: 1px solid #d7dee8;
    border-radius: 999px;
    background: #fbfcfd;
    color: #9ca8b7;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    font-size: 17px;
    margin-left: 4px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

body.exam-reading-room .btn-bookmark:hover {
    border-color: #c8d1dc;
    background: #f3f6fa;
    color: #7e8a99;
    transform: translateY(-1px);
}

body.exam-reading-room .btn-bookmark:has(.marked),
body.exam-reading-room .btn-bookmark .marked,
body.exam-reading-room .btn-bookmark.marked {
    border-color: #f7d59b;
    background: #fff6eb;
    color: #f39a18;
    box-shadow: 0 8px 18px rgba(243, 154, 24, 0.18);
}

body.exam-reading-room .btn-bookmark i {
    color: inherit;
}

body.exam-reading-room .option-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
    cursor: pointer;
}

body.exam-reading-room .option-label input {
    display: none;
}

body.exam-reading-room .custom-radio,
body.exam-reading-room .custom-checkbox {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    background: #f1f3f6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

body.exam-reading-room .custom-radio {
    border-radius: 999px;
}

body.exam-reading-room .custom-checkbox {
    border-radius: 12px;
}

body.exam-reading-room .option-label input:checked + .custom-radio,
body.exam-reading-room .option-label input:checked + .custom-checkbox {
    background: #2d8cff;
    box-shadow: inset 0 0 0 8px #2d8cff, 0 0 0 6px rgba(45, 140, 255, 0.12);
}

body.exam-reading-room .option-label input:checked + .custom-checkbox::after {
    content: "✓";
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
}

body.exam-reading-room .option-text {
    padding-top: 4px;
    color: #2b3341;
    font-size: 15px;
    line-height: 1.42;
}

body.exam-reading-room .ds-table {
    width: 100%;
    margin-top: 8px;
    border-collapse: collapse;
    border: 1px solid #eef2f5;
    border-radius: 18px;
    overflow: hidden;
}

body.exam-reading-room .ds-table th,
body.exam-reading-room .ds-table td {
    border: 1px solid #eef2f5;
    padding: 10px 8px;
}

body.exam-reading-room .ds-table th {
    background: #fbfcfe;
    color: #334155;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
}

body.exam-reading-room .ds-table td {
    color: #2b3341;
    font-size: 15px;
    line-height: 1.38;
}

body.exam-reading-room .ds-table td:nth-child(1) {
    width: 70%;
}

body.exam-reading-room .ds-table td:nth-child(2),
body.exam-reading-room .ds-table td:nth-child(3) {
    width: 15%;
    text-align: center;
}

body.exam-reading-room .radio-ds {
    width: 20px;
    height: 20px;
    accent-color: #2d8cff;
}

body.exam-reading-room .input-dien-khuyet {
    width: min(var(--blank-width, 120px), 100%);
    min-width: 96px;
    max-width: min(360px, 100%);
    padding: 4px 10px 5px;
    margin: 0 5px 3px;
    border: none;
    border-bottom: 2px solid #9fc8ff;
    border-radius: 0;
    outline: none;
    background: transparent;
    color: #163b74;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
}

body.exam-reading-room .input-dien-khuyet:focus {
    border-bottom-color: #2d8cff;
}

body.exam-reading-room .input-dien-khuyet.input-dung {
    border: 1px solid #34a853 !important;
    border-bottom-width: 2px !important;
    border-radius: 8px;
    background: #e6f4ea !important;
}

body.exam-reading-room .input-dien-khuyet.input-sai {
    border: 1px solid #ea4335 !important;
    border-bottom-width: 2px !important;
    border-radius: 8px;
    background: #fce8e6 !important;
}

body.exam-reading-room .bottom-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 560px;
    gap: 14px;
    padding: 0;
    margin: 4px 24px 10px;
    background: transparent;
    border-top: none;
    box-shadow: none;
}

body.exam-reading-room .bot-left,
body.exam-reading-room .bot-right {
    min-height: 62px;
    padding: 8px 12px;
    border: 1px solid #eef2f5;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 5px 16px rgba(15, 23, 42, 0.03);
}

body.exam-reading-room .bot-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

body.exam-reading-room .bot-right {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

body.exam-reading-room .nav-btn {
    min-height: 52px;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
}

body.exam-reading-room .nav-btn:hover:not(:disabled),
body.exam-reading-room .btn-menu-red:hover {
    transform: translateY(-1px);
}

body.exam-reading-room .nav-btn:disabled {
    opacity: 0.48;
    cursor: not-allowed;
    transform: none;
}

body.exam-reading-room .nav-btn:not(.primary) {
    width: 52px;
    min-width: 52px;
    background: #f3f4f6;
    color: #748093;
}

body.exam-reading-room .nav-btn.primary {
    min-width: 170px;
    padding: 0 22px;
    background: #16386e;
    color: #ffffff;
}

body.exam-reading-room .nav-btn.primary:hover:not(:disabled) {
    background: #102b55;
}

body.exam-reading-room .timer-text {
    color: #6f7d90;
    font-size: 15px;
    white-space: nowrap;
}

body.exam-reading-room .timer-big {
    color: #173c77;
    font-size: 25px;
    font-weight: 600;
    letter-spacing: -0.03em;
}

body.exam-reading-room .btn-menu-red {
    min-width: 256px;
    min-height: 54px;
    padding: 0 22px;
    border: none;
    border-radius: 14px;
    background: #d51b29;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.18s ease, transform 0.18s ease;
}

body.exam-reading-room .btn-menu-red:hover {
    background: #b91621;
}

body.exam-reading-room .drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.44);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s ease;
    z-index: 34;
}

body.exam-reading-room .drawer-overlay.show {
    opacity: 1;
    visibility: visible;
}

body.exam-reading-room .drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 520px;
    max-width: 100vw;
    background: #ffffff;
    box-shadow: -18px 0 44px rgba(15, 23, 42, 0.18);
    transform: translateX(100%);
    transition: transform 0.24s ease;
    z-index: 35;
    display: flex;
    flex-direction: column;
}

body.exam-reading-room .drawer.open {
    transform: translateX(0);
}

body.exam-reading-room .drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 24px 30px 20px;
    border-bottom: 1px solid #eef2f5;
}

body.exam-reading-room .drawer-header h3 {
    margin: 0;
    color: #111827;
    font-size: 18px;
    font-weight: 700;
}

body.exam-reading-room .close-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: #6b7280;
    font-size: 24px;
    cursor: pointer;
}

body.exam-reading-room .drawer-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 24px 30px 18px;
}

body.exam-reading-room .info-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    color: #4b5563;
    font-size: 15px;
}

body.exam-reading-room .info-bold {
    color: #111827;
    font-weight: 500;
}

body.exam-reading-room .timer-drawer {
    color: #173c77;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.03em;
}

body.exam-reading-room .btn-submit-drawer {
    min-width: 94px;
    min-height: 54px;
    border: none;
    border-radius: 14px;
    background: #d51b29;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

body.exam-reading-room .legend-strip {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 22px 0 18px;
    color: #465365;
    font-size: 14px;
}

body.exam-reading-room .legend-text {
    margin-right: 2px;
    font-weight: 600;
}

body.exam-reading-room .legend-pill {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

body.exam-reading-room .legend-pill.pending {
    background: #f1f3f6;
    color: #6e7a8c;
}

body.exam-reading-room .legend-pill.done {
    background: #2d8cff;
    color: #ffffff;
}

body.exam-reading-room .legend-pill.marked {
    background: #ffffff;
    border: 2px solid #f39a18;
    color: #7b4a00;
}

body.exam-reading-room .grid-questions {
    display: grid;
    grid-template-columns: repeat(8, 44px);
    gap: 12px;
    justify-content: flex-start;
}

body.exam-reading-room .grid-btn {
    width: 44px;
    height: 44px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: #f1f3f6;
    color: #7c8797;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.16s ease, background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

body.exam-reading-room .grid-btn:hover {
    transform: translateY(-1px);
}

body.exam-reading-room .grid-btn.da-lam {
    background: #2d8cff;
    color: #ffffff;
}

body.exam-reading-room .grid-btn.danh-dau {
    border: 2px solid #f39a18;
}

body.exam-reading-room .grid-btn.hien-tai {
    background: #112d59;
    color: #ffffff;
    border: 2px solid #f39a18;
}

body.exam-reading-room .grid-btn.btn-dung {
    background: #4caf50;
    color: #ffffff;
}

body.exam-reading-room .grid-btn.btn-sai {
    background: #f44336;
    color: #ffffff;
}

body.exam-reading-room .drawer-footer {
    padding: 18px 30px 22px;
    border-top: 1px solid #eef2f5;
}

body.exam-reading-room .progress-bar {
    height: 6px;
    margin: 10px 0 6px;
    background: #edf1f6;
    border-radius: 999px;
    overflow: hidden;
}

body.exam-reading-room .progress-fill {
    height: 100%;
    background: #d71b2b;
    transition: width 0.24s ease;
}

body.exam-reading-room .connection-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #37a55e;
    font-size: 14px;
    font-weight: 600;
}

body.exam-reading-room .connection-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #43c46d;
    box-shadow: 0 0 0 4px rgba(67, 196, 109, 0.14);
}

@media (max-width: 1280px) {
    body.exam-reading-room .bottom-bar {
        grid-template-columns: minmax(0, 1fr) 500px;
    }

    body.exam-reading-room .drawer {
        width: 500px;
    }
}

@media (max-width: 1040px) {
    body.exam-reading-room {
        height: auto;
        overflow: auto;
    }

    body.exam-reading-room header {
        min-height: 78px;
        padding: 14px 18px;
    }

    body.exam-reading-room .header-left {
        font-size: 16px;
    }

    body.exam-reading-room .header-left img {
        height: 48px;
    }

    body.exam-reading-room .main-container {
        margin: 18px;
        flex-direction: column;
    }

    body.exam-reading-room .left-pane,
    body.exam-reading-room .right-pane {
        width: 100%;
        padding: 18px;
    }

    body.exam-reading-room .resizer {
        display: none;
    }

    body.exam-reading-room .bottom-bar {
        grid-template-columns: 1fr;
        margin: 16px 18px 18px;
    }

    body.exam-reading-room .bot-left,
    body.exam-reading-room .bot-right {
        flex-wrap: wrap;
    }

    body.exam-reading-room .drawer {
        width: min(100vw, 420px);
    }

    body.exam-reading-room .grid-questions {
        grid-template-columns: repeat(6, 44px);
    }
}

@media (max-width: 640px) {
    body.exam-reading-room .main-container,
    body.exam-reading-room .bottom-bar {
        margin-left: 12px;
        margin-right: 12px;
    }

    body.exam-reading-room .question-block {
        padding: 18px 14px 22px;
    }

    body.exam-reading-room .grid-questions {
        grid-template-columns: repeat(5, 44px);
    }
}
