.auth-fluid .auth-fluid-form-box {
    z-index: inherit !important;
}

@media (min-width: 1400px) {
    html[data-layout=topnav] .container-fluid, html[data-layout=topnav] .container-lg, html[data-layout=topnav] .container-md, html[data-layout=topnav] .container-sm, html[data-layout=topnav] .container-xl, html[data-layout=topnav] .container-xxl {
        max-width: 95% !important;
    }
}

/* Logo size override */
:root {
    --ct-logo-lg-height: 55px;
    --ct-logo-sm-height: 40px;
}

.badge {
    font-size: inherit !important;
}

.modal-overflow-left {
    max-height: calc(100vh - 210px);
    overflow-y: auto;
}

.mdi-16px {
    font-size: 16px;
}


/* Exam paper / Latex content display */
.latex {
    font-family: 'Times New Roman', Times, serif;
    font-size: 17px;
    line-height: 2;
    letter-spacing: 0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

    .latex b {
        font-weight: 700;
    }

    .latex p {
        margin-bottom: 0.6em;
    }

    .latex br {
        display: block;
        margin-top: 0.4em;
        content: "";
    }


/* Responsive table - stacked on mobile */
@media (max-width: 767.98px) {
    .table-responsive-stack thead {
        display: none;
    }

    .table-responsive-stack tbody tr {
        display: block;
        margin-bottom: 0.75rem;
        border: 1px solid #dee2e6;
        padding: 0.5rem;
        background: #fff;
    }

    .table-responsive-stack tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.35rem 0.5rem;
        border: none;
        border-bottom: 1px solid #f1f1f1;
        text-align: right;
    }

        .table-responsive-stack tbody td:last-child {
            border-bottom: none;
            justify-content: flex-end;
        }

        .table-responsive-stack tbody td::before {
            content: attr(data-label);
            font-weight: 600;
            font-size: 0.85em;
            color: #6c757d;
            margin-right: 1rem;
            flex-shrink: 0;
        }

        .table-responsive-stack tbody td:first-child {
            display: flex;
            text-align: right;
            font-weight: 600;
        }

            .table-responsive-stack tbody td:first-child::before {
                font-size: 0.85em;
            }

        .table-responsive-stack tbody td .table-action {
            display: flex;
            justify-content: flex-end;
            width: 100%;
        }

        .table-responsive-stack tbody td .qr-code {
            width: 50px !important;
            height: 50px !important;
        }

            .table-responsive-stack tbody td .qr-code img,
            .table-responsive-stack tbody td .qr-code canvas {
                width: 50px !important;
                height: 50px !important;
            }

        .table-responsive-stack tbody td.td-content-full {
            display: block;
            text-align: left;
            font-weight: normal;
        }

            .table-responsive-stack tbody td.td-content-full::before {
                content: none;
            }
}

/* QR Code styling */
.qr-code {
    display: flex;
    justify-content: center;
    align-items: center;
}

    .qr-code img {
        display: block;
    }

/* Table action buttons - align right */
.table-action {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

    .table-action .action-icon {
        font-size: 1.2rem;
    }

/* Table vertical alignment */
.table td,
.table th {
    vertical-align: top;
}

.table-responsive-stack th:last-child,
.table-responsive-stack td:last-child {
    text-align: right;
}

/* Border bottom only on mobile */
@media (min-width: 768px) {
    .border-bottom-mobile {
        border-bottom: none !important;
    }
}

/* Accordion - override active state to white/black tone */
.accordion-button:not(.collapsed) {
    color: #313a46;
    background-color: #f8f9fa;
    box-shadow: none;
}

.accordion-button:focus {
    border-color: #dee2e6;
    box-shadow: none;
}




/* Score table - borderless inputs, show border on focus */
.score-table input[type="number"],
.score-table input[type="text"] {
    font-size: 16px;
    padding: 4px 2px;
    min-width: 55px;
    border: 1px solid transparent;
    background: transparent;
    text-align: center;
}
.score-table input[type="number"]:focus,
.score-table input[type="text"]:focus {
    border: 1px solid #86b7fe;
    background: #fff;
    outline: 0;
    box-shadow: 0 0 0 0.15rem rgba(13,110,253,.15);
}



/* ===== Trang Báo cáo Tiêu chí (MyCriteriaReport) =====
   Tông trắng đen: chỉ dùng thang xám, không màu nhấn. */

/* --- Utility --- */
.cr-ink { color: #111; }
.cr-muted { color: #6b6b6b; }
.cr-faint { color: #9a9a9a; }

/* --- Nút hướng dẫn nhỏ ở đầu trang --- */
.cr-howto-toggle { display: inline-flex; align-items: center; gap: .4rem; font-size: .82rem;
                   color: #6b6b6b; text-decoration: none; padding: .25rem .5rem;
                   border: 1px solid #d8d8d8; border-radius: 2px; background: #fafafa; }
.cr-howto-toggle:hover { color: #111; border-color: #111; background: #fff; }
.cr-howto-toggle i { font-size: 1rem; }

/* --- Khối hướng dẫn sử dụng (collapse) --- */
.cr-howto { border: 1px solid #e3e3e3; border-radius: 2px; background: #fff; }
.cr-howto-body { padding: .9rem; }
.cr-step { display: flex; gap: .7rem; margin-bottom: .8rem; }
.cr-step:last-child { margin-bottom: 0; }
.cr-step-num { flex: 0 0 22px; height: 22px; border: 1px solid #111; border-radius: 50%;
               font-size: .72rem; font-weight: 700; display: flex; align-items: center;
               justify-content: center; background: #111; color: #fff; }
.cr-step-title { font-weight: 600; font-size: .88rem; line-height: 1.35; }
.cr-step-desc { font-size: .82rem; color: #6b6b6b; line-height: 1.5; }

/* --- Nhãn bước trên các vùng điều khiển --- */
.cr-stage { display: inline-flex; align-items: center; gap: .4rem; font-size: .7rem;
            letter-spacing: .04em; text-transform: uppercase; font-weight: 700; color: #111; }
.cr-stage-dot { width: 16px; height: 16px; border-radius: 50%; background: #111; color: #fff;
                font-size: .62rem; display: flex; align-items: center; justify-content: center; }
.cr-hint { font-size: .82rem; color: #6b6b6b; line-height: 1.5; }

/* --- Bảng danh sách --- */
.cr-table { border-collapse: collapse; width: 100%; }
.cr-table thead th { font-size: .78rem; letter-spacing: .04em; text-transform: uppercase;
                     color: #6b6b6b; font-weight: 700; border-bottom: 1.5px solid #111;
                     padding: .5rem .6rem; background: #fff; }
.cr-table tbody td { padding: .55rem .6rem; border-bottom: 1px solid #ededed; font-size: .9rem; vertical-align: middle; }
.cr-table tbody tr:hover td { background: #fafafa; }
.cr-group-row td { background: #f4f4f4 !important; border-top: 1px solid #d8d8d8;
                   border-bottom: 1px solid #d8d8d8; font-weight: 700; font-size: .82rem;
                   letter-spacing: .01em; padding: .45rem .6rem !important; }
.cr-code { font-variant-numeric: tabular-nums; font-weight: 600; }

/* Trạng thái */
.cr-status { display: inline-block; font-size: .78rem; padding: .1rem .45rem; border-radius: 2px;
             letter-spacing: .02em; white-space: nowrap; }
.cr-status--empty { border: 1px dashed #b5b5b5; color: #9a9a9a; }
.cr-status--draft { border: 1px solid #6b6b6b; color: #3d3d3d; }
.cr-status--done { border: 1px solid #111; background: #111; color: #fff; font-weight: 600; }

/* Nút mở modal */
.cr-open-btn { border: 1px solid #111; background: #fff; color: #111; border-radius: 2px;
               padding: .18rem .5rem; font-size: .82rem; text-decoration: none; white-space: nowrap; }
.cr-open-btn:hover { background: #111; color: #fff; }

/* Trạng thái rỗng */
.cr-empty { text-align: center; padding: 3.2rem 1rem; color: #9a9a9a; }
.cr-empty i { font-size: 2.6rem; display: block; margin-bottom: .6rem; color: #d5d5d5; }
.cr-empty-title { font-size: .95rem; color: #3d3d3d; font-weight: 600; margin-bottom: .25rem; }
.cr-empty-desc { font-size: .82rem; max-width: 460px; margin: 0 auto; line-height: 1.6; }

/* --- Modal Biên soạn --- */
.cr-col { overflow-y: auto; max-height: calc(100vh - 190px); padding: 0 .8rem; }
.cr-col--left { padding-right: 0; border-right: none; }
.cr-col--right { padding-left: 0; }

.cr-panel { border: 1px solid #e3e3e3; border-radius: 2px; margin-bottom: .9rem; }
.cr-panel-head { padding: .5rem .7rem; background: #fafafa; border-bottom: 1px solid #e3e3e3;
                 display: flex; align-items: center; }
.cr-panel-body { padding: .7rem; }

/* Hướng dẫn tiêu chí — chỉ đọc */
.cr-guide { white-space: pre-wrap;}
.cr-guide--empty { color: #b5b5b5; font-style: italic; }
.cr-guide-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .04em;
                  color: #9a9a9a; font-weight: 700; margin-bottom: .18rem; display: block; }

/* Chip phạm vi minh chứng */
.cr-chip { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid #111;
           border-radius: 2px; padding: .15rem .2rem .15rem .5rem; font-size: .78rem;
           margin: 0 .3rem .3rem 0; background: #fff; }
.cr-chip-x { border: none; background: none; color: #6b6b6b; line-height: 1; padding: 0 .25rem;
             font-size: .95rem; cursor: pointer; }
.cr-chip-x:hover { color: #111; }

/* --- Vùng soạn thảo Quill --- */
.cr-editor { border: 1px solid #d8d8d8; border-radius: 2px; min-height: 118px; background: #fff; }
.cr-editor .ql-editor { font-size: .875rem; line-height: 1.6; min-height: 118px; }
.cr-editor-label { display: flex; align-items: center; gap: .55rem; margin-bottom: .35rem; }
.cr-editor-num { width: 22px; height: 22px; border-radius: 50%; background: gray; color: #fff;
                 font-size: .7rem; font-weight: 700; display: flex; align-items: center;
                 justify-content: center; flex-shrink: 0; }
.cr-editor-name { font-size: .85rem; font-weight: 600;}

/* --- Thẻ trích dẫn trong editor --- */
.report-citation-chip { display: inline-block; border: 1px solid #111; border-radius: 2px;
                        padding: 0 .25rem; font-size: .78em; cursor: pointer;
                        background: #f4f4f4; color: #111; font-variant-numeric: tabular-nums; }
.report-citation-chip:hover { background: #111; color: #fff; }
.report-citation-chip--unknown { border-style: dashed; border-color: #b5b5b5; color: #9a9a9a;
                                 background: #fff; cursor: not-allowed; }
.report-citation-chip--unknown:hover { background: #fff; color: #9a9a9a; }

/* --- Trình xem minh chứng --- */
.evidence-viewer-toolbar { display: flex; align-items: center; gap: .5rem; padding: .45rem .6rem;
                           border-bottom: 1px solid #e3e3e3; flex-wrap: wrap; font-size: .78rem;
                           background: #fafafa; }
.evidence-viewer-file-name { font-weight: 600; color: #111; }
.evidence-viewer-page-info { font-variant-numeric: tabular-nums; color: #6b6b6b; }
.evidence-viewer-toolbar button { border: 1px solid #111; background: #fff; color: #111;
                                  border-radius: 2px; width: 24px; height: 22px; line-height: 1; }
.evidence-viewer-toolbar button:disabled { border-color: #d8d8d8; color: #d8d8d8; }
.evidence-viewer-download { margin-left: auto; color: #111; text-decoration: underline; }
.evidence-viewer-status { flex-basis: 100%; color: #6b6b6b; font-size: .74rem; }
.evidence-viewer-viewport { overflow: auto; max-height: calc(100vh - 300px); min-height: 340px;
                            text-align: center; background: #f4f4f4; }
.evidence-viewer-viewport .evidence-viewer-text-layer { opacity: 0.2; }
.evidence-viewer-viewport .evidence-viewer-text-layer span { color: transparent; }
.evidence-viewer-viewport .evidence-viewer-text-layer mark.evidence-viewer-highlight { color: #fff; opacity: 1; }
.evidence-viewer-highlight { background: #111; color: #fff; }
.evidence-viewer-fallback { padding: 2.4rem 1rem; color: #6b6b6b; font-size: .85rem; }
.evidence-viewer-fallback a { color: #111; text-decoration: underline; }

/* --- Khung chat --- */
.cr-chat-log { max-height: 230px; overflow-y: auto; }
.cr-bubble { padding: .45rem .65rem; border-radius: 2px; margin-bottom: .35rem;
             font-size: .84rem; line-height: 1.55; white-space: pre-wrap; }
.cr-bubble--user { border: 1px solid #ededed; background: #fff; margin: 1rem; }
.cr-bubble--ai { border: 1px solid #ededed; background: #fafafa; margin-right: 1.6rem; }

/* --- Bộ_Chỉnh_Sửa_Đoạn --- */
.cr-refine-bar { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center;
                 border: 1px solid #111; border-radius: 2px; padding: .35rem .5rem;
                 margin-bottom: .35rem; background: #fafafa; }
.cr-refine-bar-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .03em;
                       color: #9a9a9a; font-weight: 700; margin-right: .2rem; }
.cr-refine-bar button { border: 1px solid #111; background: #fff; color: #111;
                        border-radius: 2px; padding: .2rem .5rem; font-size: .75rem; white-space: nowrap; }
.cr-refine-bar button:hover:not(:disabled) { background: #111; color: #fff; }
.cr-refine-bar button:disabled { opacity: .35; cursor: not-allowed; }
.cr-refine-bar input { border: 1px solid #d8d8d8; border-radius: 2px; padding: .2rem .45rem;
                       font-size: .75rem; flex: 1 1 140px; min-width: 120px; }
.cr-refine-bar input:disabled { background: #f4f4f4; }

/* --- Nút hành động --- */
.cr-btn { border: 1px solid #111; background: #fff; color: #111; border-radius: 2px;
          padding: .3rem .7rem; font-size: .85rem; white-space: nowrap; }
.cr-btn:hover:not(:disabled) { background: #f4f4f4; }
.cr-btn--solid { background: #111; color: #fff; }
.cr-btn--solid:hover:not(:disabled) { background: #333; }
.cr-btn:disabled { border-color: #d8d8d8; color: #b5b5b5; background: #fff; }
.cr-btn--solid:disabled { background: #d8d8d8; border-color: #d8d8d8; color: #fff; }

/* --- Thông báo --- */
.cr-note { border: 1px solid #111; border-left-width: 3px; border-radius: 2px;
           padding: .5rem .65rem; font-size: .85rem; line-height: 1.55; margin-bottom: .7rem;
           background: #fff; color: #3d3d3d; }
.cr-note--soft { border-color: #d8d8d8; border-left-color: #6b6b6b; background: #fafafa; }
