/*
 * CSS riêng của hệ thống, đặt sau Tabler.
 * Ưu tiên màn Full HD (1920×1080); màn nhỏ hơn chỉ cần không vỡ.
 * Không viết cứng px cho chiều rộng nội dung: dùng %, clamp(), min/max-width.
 */

/* Chữ: Roboto (như NBT), đặt trên máy chủ mình ở assets/vendor/roboto — không gọi Google Fonts. */
:root {
    --tblr-font-sans-serif: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --hachi-khung-toi-da: 1720px;

    /* Màu thương hiệu Hachi: xanh lá (hoa sen xanh trong logo), chữ trắng đặt trên đạt 5:1. Đổi màu chủ đạo của Tabler theo. */
    --hachi-xanh: #15803d;
    --hachi-xanh-dam: #166534;
    --hachi-xanh-sang: #16a34a;
    --tblr-primary: #15803d;
    --tblr-primary-rgb: 21, 128, 61;
    --tblr-primary-lt: #e7f6ec;
    --tblr-primary-lt-rgb: 231, 246, 236;
    --tblr-link-color: #15803d;
    --tblr-link-color-rgb: 21, 128, 61;
    --tblr-link-hover-color: #166534;
    --tblr-link-hover-color-rgb: 22, 101, 52;
}

.btn-primary {
    --tblr-btn-hover-bg: #126b33;
    --tblr-btn-hover-border-color: #126b33;
    --tblr-btn-active-bg: #166534;
    --tblr-btn-active-border-color: #166534;
}

body {
    font-feature-settings: normal;
    margin: 0 !important;
}

/* Thanh cuộn dọc LUÔN hiện để bề rộng trang cố định: trang ngắn / dài, mở modal đều không làm bố cục nhảy ngang
   (bài học layout NBT). */
html {
    overflow-y: scroll;
    margin: 0 !important;
}

body.modal-open {
    padding-right: 0 !important;
}

/* Thanh trên: nền trắng, kẻ dưới — tách rõ với nền xám của nội dung. */
.page > header.navbar {
    background: #fff;
    border-bottom: 1px solid var(--tblr-border-color);
}

/* Khung nội dung: Full HD dùng hết chiều ngang còn lại sau menu; màn 2K trở lên thì canh giữa, không kéo dãn quá. */
.khung-trang {
    max-width: var(--hachi-khung-toi-da);
}

/* ── Thương hiệu ở đầu menu ─────────────────────────────────────────────── */
.thuong-hieu {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    text-decoration: none;
    color: inherit;
    line-height: 1.15;
}

.thuong-hieu-dau {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .3rem .5rem;
    border-radius: 6px;
    background: var(--tblr-primary);
    color: #fff;
    font-weight: 700;
    font-size: .8rem;
    letter-spacing: .04em;
}

.thuong-hieu-chu {
    font-weight: 600;
    font-size: .95rem;
    white-space: nowrap;
}

/* Tên nhóm trong menu trái */
.nhom-menu {
    padding: 1rem 1rem .35rem;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .45);
}

/* Số việc trên menu: nằm trong dòng, sát mép phải (Tabler mặc định treo nó lên góc, bị tràn ra ngoài menu). */
.navbar-vertical .navbar-nav .nav-link .badge {
    position: static;
    transform: none;
    flex-shrink: 0;
    margin-left: auto;
    margin-right: .25rem;
}

/* Số trên chuông ở thanh trên. */
.nav-link .badge-notification {
    position: absolute;
    top: .15rem;
    right: -.15rem;
    transform: none;
}

/* Menu trái chỉ hiện thanh cuộn khi thật sự dài hơn màn hình. */
@media (min-width: 992px) {
    .navbar-vertical.navbar-expand-lg {
        overflow-y: auto;
        overflow-x: hidden;
    }
}

/* Icon trong hộp thông điệp: dùng icon font nên tự đặt cỡ và khoảng cách. */
.alert .alert-icon {
    font-size: 1.35rem;
    line-height: 1;
    margin-right: .6rem;
}

/* ── Chuông ─────────────────────────────────────────────────────────────── */
.khung-chuong {
    width: min(26rem, 92vw);
}

.khung-chuong .list-group {
    max-height: min(60vh, 32rem);
    overflow-y: auto;
}

.list-group-item.chua-doc {
    background: var(--tblr-primary-lt);
}

/* Điện thoại: chuông nằm trên thanh menu tối, sát mép phải. Hộp thông báo neo vào mép phải của chuông thì lấn ra
   ngoài mép trái màn hình (Linh 13/11/2026, ảnh chụp điện thoại). Neo vào cả thanh trên, cách hai mép như nhau. */
@media (max-width: 991.98px) {
    .navbar-vertical .navbar-nav .nav-item.dropdown {
        position: static;
    }

    .navbar-vertical .dropdown-menu.khung-chuong {
        top: 100%;
        left: .5rem;
        right: .5rem;
        width: auto;
        margin-top: 0;
    }

    .navbar-vertical .khung-chuong.dropdown-menu-arrow::before,
    .navbar-vertical .khung-chuong.dropdown-menu-arrow::after {
        display: none;
    }
}

/* Điện thoại: dải nút phạm vi của Công việc (4 nút) rộng hơn màn hình → tách thành các nút rời, xuống dòng được. */
@media (max-width: 575.98px) {
    .btn-group.nhom-pham-vi {
        width: 100%;
        flex-wrap: wrap;
        gap: .375rem;
    }

    .btn-group.nhom-pham-vi > .btn {
        flex: 1 1 auto;
        margin-left: 0;
        border-radius: var(--tblr-border-radius);
    }

    /* Ô chọn trong thanh lọc không được rộng hơn màn hình (tên đơn vị dài). */
    form.d-flex .form-select.w-auto {
        max-width: 100%;
    }
}

/* ── Bảng danh sách ─────────────────────────────────────────────────────── */
/* Cột chính (tên, tiêu đề) luôn đủ rộng để đọc; các cột khác co theo nội dung. */
.table .cot-chinh {
    min-width: 16rem;
    width: 34%;
}

.table .cot-hep {
    width: 1%;
    white-space: nowrap;
}

.table td .hang-phu {
    color: var(--tblr-secondary);
    font-size: .8125rem;
}

/* Dòng không còn dùng / đã xong: nhạt hơn dòng đang cần xử lý. */
.table tr.dong-nhat > td {
    opacity: .6;
}

/* Thụt lề theo cấp trong cây đơn vị */
.thut-cap-1 { padding-left: 1.75rem !important; }
.thut-cap-2 { padding-left: 3.5rem !important; }
.thut-cap-3 { padding-left: 5.25rem !important; }

/* ── Dải thống kê trên danh sách ────────────────────────────────────────── */
.dai-thong-ke {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.5rem;
    align-items: baseline;
    color: var(--tblr-secondary);
}

.dai-thong-ke strong {
    color: var(--tblr-body-color);
    font-size: 1.05rem;
}

/* ── Trang chi tiết: lưới nhãn – giá trị ────────────────────────────────── */
.luoi-thong-tin {
    display: grid;
    grid-template-columns: minmax(9rem, 14rem) 1fr;
    gap: .6rem 1rem;
    margin: 0;
}

.luoi-thong-tin dt {
    color: var(--tblr-secondary);
    font-weight: 400;
}

.luoi-thong-tin dd {
    margin: 0;
    overflow-wrap: anywhere;
}

/* Ảnh đại diện (chữ cái đầu) không bao giờ bị bóp khi đứng trong một hàng flex cạnh nội dung dài (bình luận ticket…, Linh 18/11/2026). */
.avatar {
    flex-shrink: 0;
}

/* ── Lịch sử thay đổi ───────────────────────────────────────────────────── */
.lich-su-danh-sach {
    max-height: 28rem;
    overflow-y: auto;
}

/* Khối gọn (Linh 18/11/2026): mỗi lần đổi một dòng đầu nhỏ, mỗi ô đổi một dòng. */
.lich-su-dong {
    padding: .5rem 0;
    font-size: .8125rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.lich-su-dong + .lich-su-dong {
    border-top: 1px solid var(--tblr-border-color-translucent, rgba(4, 32, 69, .1));
}

.bang-thay-doi td {
    padding: .15rem .5rem .15rem 0;
    vertical-align: top;
    overflow-wrap: anywhere;
}

.bang-thay-doi .cot-nhan {
    width: 12rem;
    white-space: nowrap;
}

.gia-tri-cu {
    color: var(--tblr-secondary);
    text-decoration: line-through;
    text-decoration-color: rgba(214, 57, 57, .5);
}

.gia-tri-moi {
    font-weight: 500;
}

/* Dòng "Tạo mới": dữ liệu lúc tạo gập lại, vì nó lặp lại chính trang đang xem. */
.lich-su-luc-tao > summary {
    cursor: pointer;
    width: fit-content;
}

.lich-su-luc-tao > summary:hover {
    color: var(--tblr-primary) !important;
}

/* ── Mật khẩu tạm ───────────────────────────────────────────────────────── */
.mat-khau-tam {
    font-size: 1.15rem;
    letter-spacing: .08em;
    padding: .25rem .6rem;
    user-select: all;
}

/* ── Sơ đồ phòng ────────────────────────────────────────────────────────── */
.the-nguoi {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .5rem 0;
}

.the-nguoi + .the-nguoi {
    border-top: 1px solid var(--tblr-border-color);
}

/* ── Màn nhỏ (làm sau; ở đây chỉ giữ cho không vỡ) ──────────────────────── */
@media (max-width: 991.98px) {
    .luoi-thong-tin {
        grid-template-columns: 1fr;
        gap: .1rem;
    }

    .luoi-thong-tin dd {
        margin-bottom: .6rem;
    }

    .bang-thay-doi .cot-nhan {
        width: auto;
        white-space: normal;
    }
}

/* ══ Kiểu thẻ và bảng theo NBT (Linh 11/11/2026: "gần như copy layout từ nbt sang") ═══════════════
   Đầu thẻ thấp, nền xanh xám nhạt; đầu bảng cùng tông. Thẻ có tab giữ khoảng đệm gốc. */
@media screen {
    .page-body .card-header {
        --tblr-card-cap-padding-y: .25rem;
        --tblr-card-cap-padding-x: .8rem;
        min-height: 38px;
        background-color: #dae4ef;
        border-bottom-color: #bfccdb;
    }

    .page-body .card-header .card-title {
        color: #1e293b;
    }

    .page-body .card-header :is(.text-secondary, .text-muted) {
        color: #475569 !important;
    }

    .page-body .card-header:has(.card-header-tabs, .card-header-pills) {
        --tblr-card-cap-padding-y: 1rem;
        --tblr-card-cap-padding-x: 1.25rem;
        min-height: 0;
        background-color: transparent;
    }

    .page-body .card-header:not(:has(.card-header-tabs, .card-header-pills)) .card-actions {
        margin-top: 0;
        margin-bottom: 0;
    }

    .page-body .table thead th {
        background-color: #d9e2ec;
        color: #334155;
    }
}

/* Dòng mời tạo ticket trên thanh trên (như NBT). */
.moi-tao-ticket {
    font-size: .8rem;
    white-space: nowrap;
}

.moi-tao-ticket a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ══ Module Ticket (bố cục theo NBT) ═══════════════════════════════════════════════════════════ */

/* Dải đếm theo trạng thái ở đầu danh sách: mỗi thẻ là một nút lọc. */
.ticket-dem {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
}

.ticket-dem-the {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .35rem .8rem;
    border: 1px solid var(--tblr-border-color);
    border-radius: 6px;
    background: #fff;
    color: var(--tblr-secondary);
    font-size: .8125rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .02em;
    text-decoration: none;
    white-space: nowrap;
}

.ticket-dem-the strong {
    color: var(--tblr-body-color);
}

.ticket-dem-the:hover {
    text-decoration: none;
    border-color: var(--tblr-primary);
}

.ticket-dem-the.dang-chon {
    border-color: var(--tblr-primary);
    box-shadow: inset 0 0 0 1px var(--tblr-primary);
    color: var(--tblr-primary);
}

.ticket-dem-the.can-lam {
    background: var(--tblr-red-lt);
    color: var(--tblr-red);
}

.ticket-dem-the.can-lam strong {
    color: var(--tblr-red);
}

.ticket-dem-cach {
    flex: 1 1 1rem;
}

/* Mã ticket: nhãn viền, chữ đều nét. */
.ticket-ma {
    display: inline-block;
    padding: .1rem .5rem;
    border: 1px solid #c5cdd8;
    border-radius: 4px;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .03em;
    color: var(--tblr-body-color);
    white-space: nowrap;
    text-decoration: none;
    background: #fff;
}

/* Bảng danh sách: cột tiêu đề phải rộng; nhãn "Đang chờ" được xuống dòng. */
.ticket-bang .ticket-cot-tieu-de {
    min-width: 280px;
    width: 40%;
}

.ticket-bang .ticket-cot-cho {
    min-width: 12rem;
    max-width: 20rem;
}

.ticket-bang .ticket-nhan-cho {
    white-space: normal;
    text-align: left;
    line-height: 1.35;
}

.ticket-trich {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Nội dung do người dùng soạn (mô tả, bình luận): một bộ CSS dùng chung ── */
.noi-dung-soan {
    font-size: .9375rem;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.noi-dung-soan > :last-child {
    margin-bottom: 0;
}

.noi-dung-soan p {
    margin: 0 0 .6em;
}

.noi-dung-soan ul,
.noi-dung-soan ol {
    margin: 0 0 .6em;
    padding-left: 1.6em;
}

.noi-dung-soan img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    border: 1px solid var(--tblr-border-color);
}

.noi-dung-soan blockquote {
    margin: 0 0 .6em;
    padding: .25rem .9rem;
    border-left: 3px solid var(--tblr-border-color);
    color: var(--tblr-secondary);
}

.noi-dung-soan pre {
    padding: .6rem .8rem;
    border-radius: 6px;
    white-space: pre-wrap;
}

/* Sơ đồ luồng (Mermaid), assets/js/so-do.js. Chưa vẽ (đang tải, sai cú pháp): hiện dạng chữ trong khung. */
.noi-dung-soan pre.mermaid {
    margin: 0 0 .6em;
    border: 1px solid var(--tblr-border-color);
    background: #f6f8fb;
    color: var(--tblr-body-color);
    font-size: .8125rem;
    line-height: 1.5;
    white-space: pre;
    overflow-x: auto;
    overflow-wrap: normal;
}

.noi-dung-soan pre.so-do-da-ve {
    padding: .75rem;
    background: #fff;
    text-align: center;
    white-space: normal;
    line-height: normal;
    cursor: zoom-in;
}

.noi-dung-soan pre.so-do-da-ve:hover,
.noi-dung-soan pre.so-do-da-ve:focus-visible {
    border-color: var(--hachi-xanh);
    outline: none;
}

.noi-dung-soan pre.so-do-da-ve svg {
    max-width: 100%;
    height: auto;
}

.so-do-loi {
    margin-bottom: .25rem;
    font-size: .8125rem;
    color: var(--tblr-danger);
}

/* Xem to: lớp phủ cả màn hình, sơ đồ trên nền trắng, cuộn được khi rộng hơn màn hình. */
.so-do-dang-mo {
    overflow: hidden;
}

.so-do-phu {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    padding: 3.5rem 2.5rem 2.5rem;
    overflow: auto;
    background: rgba(15, 23, 42, .85);
    cursor: zoom-out;
}

.so-do-phu .so-do-khung {
    margin: auto;
    padding: 1.25rem;
    border-radius: 8px;
    background: #fff;
    cursor: default;
}

.so-do-phu .so-do-khung svg {
    display: block;
    max-width: none;
    height: auto;
}

.so-do-dong {
    position: fixed;
    top: .75rem;
    right: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 1.25rem;
}

.so-do-dong:hover,
.so-do-dong:focus-visible {
    background: rgba(255, 255, 255, .25);
    outline: none;
}

/* Bảng trong nội dung: vừa khít nội dung, cuộn ngang trong khung chứ không đẩy vỡ trang. */
.noi-dung-soan table {
    display: block;
    width: fit-content;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
    margin: 0 0 .6em;
}

.noi-dung-soan th,
.noi-dung-soan td {
    border: 1px solid var(--tblr-border-color);
    padding: .3rem .6rem;
    vertical-align: top;
}

.noi-dung-soan th {
    background: #eef2f7;
}

/* ── Bình luận ── */
.binh-luan {
    display: flex;
    gap: .9rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--tblr-border-color);
    scroll-margin-top: 4.5rem;
}

.binh-luan:target {
    background: #fff8e1;
}

.binh-luan-than {
    flex: 1 1 auto;
    min-width: 0;
}

.binh-luan-dau {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .35rem;
}

.binh-luan-so {
    font-weight: 600;
    color: var(--tblr-secondary);
}

.binh-luan-trich {
    display: block;
    margin-bottom: .5rem;
    padding: .3rem .7rem;
    border-left: 3px solid var(--tblr-primary);
    background: var(--tblr-primary-lt);
    border-radius: 0 4px 4px 0;
    color: var(--tblr-secondary);
    font-size: .8125rem;
    text-decoration: none;
}

.binh-luan-tag {
    margin-top: .5rem;
    font-size: .8125rem;
}

.binh-luan-nut {
    margin-top: .35rem;
}

.ticket-khoi-dong {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
    padding: .9rem 1.25rem;
    background: var(--tblr-green-lt);
    color: #1f6f43;
    border-bottom: 1px solid var(--tblr-border-color);
}

/* ── Tệp đính kèm ── */
.tep-danh-sach {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.tep-anh img {
    display: block;
    height: 6rem;
    width: auto;
    max-width: 14rem;
    object-fit: cover;
    border: 1px solid var(--tblr-border-color);
    border-radius: 6px;
}

.tep-the {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: .3rem .65rem;
    border: 1px solid var(--tblr-border-color);
    border-radius: 6px;
    background: #fff;
    color: var(--tblr-body-color);
    font-size: .8125rem;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.o-tep-vung {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    padding: 1.5rem 1rem;
    border: 1px dashed #c5cdd8;
    border-radius: 6px;
    background: #fbfcfd;
    text-align: center;
    cursor: pointer;
}

.o-tep-vung > i {
    font-size: 1.5rem;
    color: var(--tblr-secondary);
}

.o-tep-gon .o-tep-vung {
    padding: .6rem .75rem;
    justify-content: flex-start;
    text-align: left;
    font-size: .8125rem;
}

.o-tep.dang-keo .o-tep-vung {
    border-color: var(--tblr-primary);
    background: var(--tblr-primary-lt);
}

.o-tep-danh-sach {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .5rem;
}

.o-tep-danh-sach:empty {
    display: none;
}

.o-tep-muc {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    max-width: 100%;
    padding: .25rem 1.7rem .25rem .4rem;
    border: 1px solid var(--tblr-border-color);
    border-radius: 6px;
    background: #fff;
    font-size: .8125rem;
}

.o-tep-muc img {
    height: 2.5rem;
    width: 2.5rem;
    object-fit: cover;
    border-radius: 4px;
}

.o-tep-muc .o-tep-ten {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 14rem;
}

.o-tep-muc .o-tep-go {
    position: absolute;
    top: 50%;
    right: .3rem;
    transform: translateY(-50%);
    border: 0;
    background: none;
    color: var(--tblr-secondary);
    cursor: pointer;
    line-height: 1;
}

/* ── Ô chọn người (tag, hỏi ai, chờ ai) ── */
.chon-nguoi {
    position: relative;
}

.chon-nguoi-da-chon {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
    margin-bottom: .35rem;
}

.chon-nguoi-da-chon:empty {
    display: none;
}

.chon-nguoi-the {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .15rem .25rem .15rem .55rem;
    border-radius: 4px;
    background: var(--tblr-primary-lt);
    color: var(--tblr-primary);
    font-size: .8125rem;
    font-weight: 500;
}

.chon-nguoi-the button {
    border: 0;
    background: none;
    color: inherit;
    cursor: pointer;
    line-height: 1;
    padding: 0 .15rem;
}

.chon-nguoi-danh-sach {
    position: absolute;
    z-index: 20;
    left: 0;
    right: 0;
    top: 100%;
    max-height: 16rem;
    overflow-y: auto;
    margin-top: .2rem;
    border: 1px solid var(--tblr-border-color);
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
}

.chon-nguoi-muc {
    display: block;
    width: 100%;
    padding: .4rem .75rem;
    border: 0;
    background: none;
    text-align: left;
    cursor: pointer;
}

.chon-nguoi-muc:hover,
.chon-nguoi-muc.dang-tro {
    background: var(--tblr-primary-lt);
}

.chon-nguoi-muc small {
    display: block;
    color: var(--tblr-secondary);
}

/* ── Trang chi tiết ── */
.luoi-thong-tin.luoi-hep {
    grid-template-columns: minmax(7rem, 9.5rem) 1fr;
}

.ticket-lich-su {
    max-height: 18rem;
    overflow-y: auto;
    font-size: .8125rem;
}

.ticket-lich-su-dong {
    padding: .3rem 0;
}

.ticket-lich-su-dong + .ticket-lich-su-dong {
    border-top: 1px solid var(--tblr-border-color);
}

.ticket-cho-ai {
    margin: .25rem 0 .6rem 1.75rem;
}

/* Ô viết bình luận đi theo khi cuộn (màn rộng). */
@media (min-width: 1200px) {
    .ticket-o-viet {
        position: sticky;
        top: 1rem;
        z-index: 2;
        border-color: var(--tblr-primary);
    }
}

/* Trình soạn thảo: bo góc cho khớp ô nhập của Tabler. */
.tox.tox-hugerte {
    border-radius: 6px;
    border-color: var(--tblr-border-color);
}

/* ══ Bảng tin (bố cục theo NBT) ═══════════════════════════════════════════════════════════════ */

/* Dòng mời soạn bài: trông như một ô nhập, bấm vào thì ô soạn mở ra. */
.bang-tin-moi-soan {
    flex: 1 1 auto;
    padding: .55rem 1rem;
    border: 1px solid var(--tblr-border-color);
    border-radius: 999px;
    background: var(--tblr-bg-surface-secondary);
    color: var(--tblr-secondary);
    text-align: left;
    cursor: text;
}

.bang-tin-moi-soan:hover {
    background: var(--tblr-bg-surface-tertiary);
}

.bang-tin-ghim .card-header {
    background: var(--tblr-orange-lt);
}

/* Cột phải đi theo khi cuộn (màn rộng). */
@media (min-width: 992px) {
    .bang-tin-loai {
        position: sticky;
        top: 1rem;
    }
}

.bai-tin.bai-quan-trong {
    border-left: 3px solid var(--tblr-orange);
}

.bai-tin.bai-bi-an > .card-body > :not(.alert):not(:first-child) {
    opacity: .55;
}

.bai-tieu-de {
    margin: 0 0 .5rem;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
}

.bai-tieu-de a:hover {
    color: var(--tblr-primary) !important;
    text-decoration: none;
}

/* Dòng bài: bài dài chỉ hiện phần đầu; bang-tin.js thêm .bi-cat khi nội dung thật sự bị cắt. */
.bai-noi-dung-gon {
    position: relative;
    max-height: 21rem;
    overflow: hidden;
}

.bai-noi-dung-gon.bi-cat::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3.5rem;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff);
    pointer-events: none;
}

.bai-chan {
    background: #fff;
    padding-top: .5rem;
    padding-bottom: .75rem;
}

.bai-chan .btn.dang-chon {
    background: var(--tblr-primary-lt);
    color: var(--tblr-primary);
    font-weight: 500;
}

.bai-binh-luan {
    margin-top: .6rem;
    padding-top: .75rem;
    border-top: 1px solid var(--tblr-border-color);
}

.bl-tin {
    display: flex;
    gap: .5rem;
    margin-bottom: .6rem;
    scroll-margin-top: 5rem;
}

.bl-tin-than {
    min-width: 0;
}

.bl-tin-hop {
    display: inline-block;
    max-width: 100%;
    padding: .4rem .75rem;
    border-radius: 12px;
    background: var(--tblr-bg-surface-secondary);
}

.bl-tin:target .bl-tin-hop {
    background: var(--tblr-yellow-lt);
}

.bl-tin-chu {
    overflow-wrap: anywhere;
    line-height: 1.55;
}

.bl-tin-tag {
    color: var(--tblr-primary);
    font-weight: 500;
}

.bl-tin-form {
    display: flex;
    align-items: flex-end;
    gap: .5rem;
    margin: 0;
}

.bl-tin-o {
    position: relative;
    flex: 1 1 auto;
}

.bl-tin-o textarea {
    resize: none;
    overflow-y: auto;
    border-radius: 12px;
}

/* Phần chỉ người quản lý Bảng tin thấy trong ô soạn. */
.bai-o-quan-ly {
    padding: .75rem 1rem;
    border: 1px dashed var(--tblr-border-color);
    border-radius: 6px;
    background: var(--tblr-bg-surface-secondary);
}

.hop-quan-trong {
    border-top: 4px solid var(--tblr-orange);
}

.hop-quan-trong .modal-header {
    height: auto;
    padding-top: 1rem;
    padding-bottom: .85rem;
}

/* ── Quản trị → Zalo: ảnh mã QR đăng nhập nick thông báo ── */
.zalo-qr-anh {
    width: 260px;
    height: 260px;
    padding: .5rem;
    border: 1px solid var(--tblr-border-color);
    border-radius: 8px;
    background: #fff;
    image-rendering: pixelated;
}

/* ══ Trang đăng nhập (bố cục hai nửa theo NBT) ═════════════════════════════════════════════════ */
.trang-dang-nhap {
    overflow-y: auto;
    background: #fff;
}

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

.dn-trai {
    position: relative;
    flex: 0 0 58%;
    display: flex;
    align-items: center;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, var(--hachi-xanh-dam) 0%, var(--hachi-xanh) 55%, var(--hachi-xanh-sang) 100%);
}

/* Hai vòng tròn mờ ở góc, cho nền đỡ phẳng. */
.dn-trai::before,
.dn-trai::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, .06);
}

.dn-trai::before {
    width: 26rem;
    height: 26rem;
    top: -13rem;
    left: -9rem;
}

.dn-trai::after {
    width: 34rem;
    height: 34rem;
    right: -12rem;
    bottom: -16rem;
    background: rgba(255, 255, 255, .09);
}

.dn-trai-trong {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 36rem;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* Chữ logo ở nửa trái: bản âm (chữ trắng trên nền xanh) của logo Hachi, kèm khẩu hiệu của hãng. */
.dn-logo-chu {
    display: inline-block;
    margin-bottom: 2.4rem;
}

.dn-logo-ten {
    font-size: 4.2rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: .01em;
}

.dn-logo-ten span {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: .02em;
}

.dn-logo-khau-hieu {
    margin-top: .55rem;
    padding: .34rem .7rem;
    background: #fff;
    color: var(--hachi-xanh);
    font-size: .86rem;
    font-weight: 600;
    letter-spacing: .3em;
    text-transform: uppercase;
    white-space: nowrap;
}

.dn-tieu-de {
    margin: 0 0 1rem;
    font-size: 2.15rem;
    font-weight: 700;
    line-height: 1.25;
}

.dn-mo-ta {
    max-width: 32rem;
    margin-bottom: 2rem;
    font-size: 1.02rem;
    line-height: 1.7;
    opacity: .88;
}

.dn-dang-co {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.1rem 1.5rem;
    margin: 0 0 2rem;
    padding: 0;
    list-style: none;
}

.dn-dang-co li {
    display: flex;
    align-items: flex-start;
    gap: .85rem;
}

.dn-dang-co strong {
    display: block;
    font-size: 1rem;
    font-weight: 600;
}

.dn-dang-co small {
    display: block;
    margin-top: .15rem;
    font-size: .86rem;
    line-height: 1.45;
    opacity: .8;
}

.dn-buoc {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    flex: 0 0 auto;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 9px;
    background: rgba(255, 255, 255, .1);
    color: #ffc94d;
    font-size: 1.2rem;
}

.dn-ba-y {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem 1.75rem;
    padding-top: 1.4rem;
    border-top: 1px solid rgba(255, 255, 255, .2);
    font-size: .92rem;
    opacity: .9;
}

.dn-ba-y i {
    margin-right: .4rem;
    color: #ffc94d;
}

.dn-phai {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem 1rem;
}

.dn-form {
    width: 100%;
    max-width: 25rem;
    margin: auto 0;
}

/* Logo thật phía trên form. Ảnh gốc là hình vuông, chữ nằm ở dải giữa: chỉ cho hiện dải đó. */
.dn-logo-anh {
    width: 13.5rem;
    aspect-ratio: 680 / 187;
    margin: 0 0 2.2rem 0;
    background: url("../img/logo-hachi.png") center / 100% auto no-repeat;
}

.dn-form-tieu-de {
    margin: 0 0 .3rem;
    font-size: 1.6rem;
    font-weight: 700;
}

.dn-form .form-control-lg {
    font-size: 1rem;
}

.dn-hien-mat-khau {
    padding: 0 .15rem;
    border: 0;
    background: none;
    color: var(--tblr-secondary);
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
}

.dn-hien-mat-khau:hover {
    color: var(--tblr-primary);
}

.dn-nut {
    background: linear-gradient(135deg, var(--hachi-xanh-dam), var(--hachi-xanh) 60%, #17883f);
    border: 0;
    box-shadow: 0 6px 16px rgba(21, 128, 61, .28);
}

.dn-nut:hover {
    background: linear-gradient(135deg, var(--hachi-xanh-dam), var(--hachi-xanh));
}

.dn-tro-giup {
    margin-top: 1.5rem;
    padding: .9rem 1rem;
    border: 1px dashed var(--tblr-border-color);
    border-radius: 8px;
}

.dn-chan {
    margin-top: 2rem;
    color: var(--tblr-secondary);
    font-size: .8rem;
    text-align: center;
}

/* Màn hẹp: bỏ nửa trái; logo phía trên form vẫn còn. */
@media (max-width: 991.98px) {
    .dn-trai {
        display: none;
    }

}

/* ══ Trình xem ảnh dùng chung (assets/js/xem-anh.js) ═══════════════════════════════════════════ */
.tep-anh,
.noi-dung-soan img {
    cursor: zoom-in;
}

.noi-dung-soan a img {
    cursor: pointer;
}

.tep-anh img {
    transition: box-shadow .15s, transform .15s;
}

.tep-anh:hover img {
    box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
    transform: translateY(-1px);
}

.xa-phu {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    background: rgba(15, 23, 42, .93);
    user-select: none;
}

.xa-phu.mo {
    display: block;
}

.xa-khung {
    position: absolute;
    inset: 64px 72px 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.xa-khung img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, .5);
    transition: opacity .2s, transform .15s;
    touch-action: none;
}

.xa-khung img.dang-keo {
    cursor: grabbing !important;
}

.xa-tren {
    position: absolute;
    top: 10px;
    left: 16px;
    right: 16px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

.xa-dem {
    min-width: 4rem;
    padding: .2rem .75rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, .45);
    color: rgba(255, 255, 255, .85);
    font-size: .85rem;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.xa-dem[hidden] {
    display: block !important;
    visibility: hidden;
}

.xa-cong-cu {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .55);
}

.xa-cong-cu button,
.xa-cong-cu a,
.xa-dong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: none;
    color: #fff;
    font-size: 1.15rem;
    opacity: .85;
    cursor: pointer;
    text-decoration: none;
}

.xa-cong-cu button:hover,
.xa-cong-cu a:hover,
.xa-dong:hover,
.xa-cong-cu button:focus-visible,
.xa-cong-cu a:focus-visible,
.xa-dong:focus-visible {
    background: rgba(255, 255, 255, .18);
    opacity: 1;
    outline: none;
}

.xa-dong {
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, .45);
    font-size: 1.35rem;
}

.xa-muc {
    min-width: 44px;
    color: rgba(255, 255, 255, .85);
    font-size: .78rem;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.xa-gach {
    width: 1px;
    height: 20px;
    margin: 0 2px;
    background: rgba(255, 255, 255, .25);
}

.xa-nut {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    font-size: 1.6rem;
    transform: translateY(-50%);
    cursor: pointer;
}

.xa-nut[hidden] {
    display: none;
}

.xa-nut:hover,
.xa-nut:focus-visible {
    background: rgba(255, 255, 255, .3);
    outline: none;
}

.xa-truoc {
    left: 12px;
}

.xa-sau {
    right: 12px;
}

.xa-chu {
    position: absolute;
    bottom: 14px;
    left: 50%;
    max-width: 80%;
    overflow: hidden;
    color: rgba(255, 255, 255, .78);
    font-size: .82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
    transform: translateX(-50%);
}

@media (max-width: 575.98px) {
    .xa-khung {
        inset: 64px 8px 48px;
    }

    .xa-nut {
        width: 40px;
        height: 40px;
        background: rgba(0, 0, 0, .35);
    }

    .xa-muc,
    .xa-gach {
        display: none;
    }
}

/* ══ Module Công việc: bảng kanban ═════════════════════════════════════════════════════════════ */
.cv-bang {
    display: grid;
    grid-template-columns: repeat(4, minmax(15rem, 1fr));
    gap: .75rem;
    align-items: start;
    overflow-x: auto;
    padding-bottom: .25rem;
}

.cv-cot {
    display: flex;
    flex-direction: column;
    min-height: 12rem;
    border: 1px solid var(--tblr-border-color);
    border-radius: 8px;
    background: var(--tblr-bg-surface-secondary);
    transition: background .15s, box-shadow .15s;
}

.cv-cot.dang-tro {
    background: var(--tblr-primary-lt);
    box-shadow: inset 0 0 0 2px var(--tblr-primary);
}

.cv-cot-dau {
    display: flex;
    align-items: center;
    padding: .65rem .85rem;
    border-bottom: 1px solid var(--tblr-border-color);
    font-weight: 600;
}

.cv-cot-than {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    max-height: calc(100vh - 21rem);
    min-height: 8rem;
    overflow-y: auto;
    padding: .6rem;
}

.cv-cot-rong {
    padding: 1.25rem .5rem;
    color: var(--tblr-secondary);
    font-size: .8125rem;
    text-align: center;
}

.cv-the {
    display: block;
    padding: .6rem .7rem;
    border: 1px solid var(--tblr-border-color);
    border-left: 3px solid var(--tblr-border-color);
    border-radius: 6px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
    transition: box-shadow .15s, transform .15s;
}

.cv-the:hover {
    color: inherit;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
    transform: translateY(-1px);
}

.cv-the[draggable="true"] {
    cursor: grab;
}

.cv-the.dang-keo {
    opacity: .45;
}

.cv-the.dang-gui {
    opacity: .6;
    pointer-events: none;
}

.cv-the.cv-uu-tien-khan { border-left-color: var(--tblr-red); }
.cv-the.cv-uu-tien-cao { border-left-color: var(--tblr-orange); }
.cv-the.cv-uu-tien-thuong { border-left-color: var(--tblr-blue); }

.cv-the.cv-qua-han {
    background: #fff8f8;
}

.cv-the-ten {
    font-weight: 500;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

/* Thông báo nhanh ở góc khi kéo thẻ không hợp lệ. */
.cv-bao-nhanh {
    position: fixed;
    left: 50%;
    bottom: 1.5rem;
    z-index: 1080;
    max-width: min(34rem, 92vw);
    padding: .7rem 1rem;
    border-radius: 8px;
    background: #1d273b;
    color: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
    opacity: 0;
    transform: translate(-50%, 1rem);
    transition: opacity .2s, transform .2s;
    pointer-events: none;
}

.cv-bao-nhanh.hien {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* Trang việc */
.cv-can-lam {
    border-left-width: 3px;
}

.cv-dau-ra {
    padding: .6rem .85rem;
    border-radius: 6px;
    background: var(--tblr-bg-surface-secondary);
}

@media (max-width: 991.98px) {
    .cv-bang {
        grid-template-columns: repeat(4, 16rem);
    }
}

/* ══ Checklist báo cáo: dải các bước ═══════════════════════════════════════════════════════════ */
.bc-buoc {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.5rem;
}

.bc-buoc-muc {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: var(--tblr-secondary);
}

.bc-buoc-so {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border: 1px solid var(--tblr-border-color);
    border-radius: 50%;
    background: #fff;
    font-size: .8125rem;
    font-weight: 600;
}

.bc-buoc-muc.da-qua {
    color: var(--tblr-green);
}

.bc-buoc-muc.da-qua .bc-buoc-so {
    border-color: var(--tblr-green);
    background: var(--tblr-green);
    color: #fff;
}

.bc-buoc-muc.dang-o {
    color: var(--tblr-body-color);
    font-weight: 600;
}

.bc-buoc-muc.dang-o .bc-buoc-so {
    border-color: var(--tblr-primary);
    background: var(--tblr-primary);
    color: #fff;
}

/* ══ Bản đồ nghiệp vụ ══════════════════════════════════════════════════════════════════════════ */
.nv-nhom-ten {
    margin: 0 0 .15rem;
    font-size: 1.15rem;
    font-weight: 700;
}

.nv-the.nv-khong_lam,
.nv-the.nv-chua_lam {
    background: var(--tblr-bg-surface-secondary);
}

.nv-buoc {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .25rem .35rem;
    font-size: .8125rem;
}

.nv-buoc span {
    padding: .1rem .5rem;
    border: 1px solid var(--tblr-border-color);
    border-radius: 999px;
    background: #fff;
}

.nv-ds {
    margin: .25rem 0 0;
    padding: 0;
    list-style: none;
    font-size: .8125rem;
}

.nv-ds li {
    display: flex;
    gap: .4rem;
    padding: .1rem 0;
}

.nv-ds i {
    flex: 0 0 auto;
    margin-top: .15rem;
}

/* ══ Dự án – Hợp đồng ══════════════════════════════════════════════════════════════════════════ */
/* Bốn số của một hợp đồng, nằm ngang. */
.da-bon-so {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem 1.25rem;
}

.da-bon-so > div {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.da-bon-so span {
    color: var(--tblr-secondary);
    font-size: .8125rem;
}

.da-bon-so strong {
    font-size: 1.15rem;
    font-variant-numeric: tabular-nums;
}

.da-bon-so small {
    color: var(--tblr-secondary);
    overflow-wrap: anywhere;
}

/* Đầu mỗi nhóm đợt (Thực hiện / Nghiệm thu / Thanh toán) trong thẻ hợp đồng. */
.da-dot-dau {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .5rem 1rem;
    border-top: 1px solid var(--tblr-border-color);
    background: var(--tblr-bg-surface-secondary);
    font-weight: 600;
}

@media (max-width: 767.98px) {
    .da-bon-so {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ══ Tình hình ban — menu Quản lý phòng (chép từ NBT dept_dashboard/_tinh_hinh, Linh 13/11/2026) ══════════ */
.min-width-0 { min-width: 0; }

/* Bốn ô số đầu trang. */
.thp-tong { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.thp-o { background: var(--tblr-bg-surface); border: 1px solid var(--tblr-border-color); border-radius: 6px; padding: .7rem .9rem;
    display: flex; gap: .75rem; align-items: center; min-width: 0; }
.thp-o:hover { border-color: var(--tblr-primary); }
.thp-o .thp-o-so { font-size: 1.75rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.thp-o .thp-o-nhan { font-size: .8rem; color: var(--tblr-secondary); line-height: 1.25; }
.thp-o-icon { width: 2.5rem; height: 2.5rem; border-radius: 6px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 1.35rem; }

/* Một dòng việc: số lớn · tên + ai làm · mốc · mũi tên; bấm mở bảng hồ sơ. */
.thp-viec { border-top: 1px solid var(--tblr-border-color); }
.thp-viec:first-of-type { border-top: 0; }
.thp-viec > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 3.4rem minmax(0, 1fr) auto 1.25rem; gap: .75rem;
    align-items: center; padding: .6rem .9rem; }
.thp-viec > summary::-webkit-details-marker { display: none; }
.thp-viec > summary:hover { background: var(--tblr-bg-surface-secondary); }
.thp-viec > summary:focus-visible { outline: 2px solid var(--tblr-primary); outline-offset: -2px; }
.thp-so { font-size: 1.45rem; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; border-radius: 6px; padding: .2rem 0;
    background: #eef2f7; color: #1e293b; }
.thp-so.thp-so-tre { background: #fde8e8; color: #b42318; }
.thp-ten { font-weight: 600; line-height: 1.3; }
.thp-ai { font-size: .78rem; color: var(--tblr-secondary); }
.thp-moc { display: flex; flex-direction: column; align-items: flex-end; gap: .15rem; font-size: .75rem; color: var(--tblr-secondary); white-space: nowrap; }
.thp-mui { transition: transform .15s; color: #94a3b8; }
.thp-viec[open] .thp-mui { transform: rotate(180deg); }
.thp-mo { padding: 0 .9rem .8rem; }
.thp-cach { font-size: .8rem; background: #f1f5f9; border-radius: 6px; padding: .45rem .6rem; margin-bottom: .5rem; display: flex; gap: .5rem; align-items: flex-start; }
.thp-khung { max-height: 26rem; overflow: auto; border: 1px solid var(--tblr-border-color); border-radius: 6px; }
.thp-bang { margin: 0; font-size: .82rem; }
.thp-bang thead th { position: sticky; top: 0; background: #f1f5f9; z-index: 1; font-size: .72rem; }
.thp-bang .thp-ma { font-weight: 600; white-space: nowrap; }
.thp-bang .thp-de { white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.thp-on { font-size: .8rem; color: #2f7d32; padding: .55rem .9rem; border-top: 1px solid var(--tblr-border-color); }

/* Cột phải: chỉ số theo kỳ, người của ban. */
.thp-chiso td { padding: .45rem .6rem; vertical-align: middle; }
.thp-chiso .thp-gt { font-weight: 700; font-size: 1.05rem; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.thp-chiso .thp-ss { text-align: right; white-space: nowrap; font-size: .75rem; }
.thp-chang { display: grid; grid-template-columns: minmax(0, 12rem) minmax(0, 1fr) 3rem; gap: .5rem .6rem; align-items: center; font-size: .82rem; }
.thp-chang .thp-thanh { height: .6rem; background: #eef2f7; border-radius: 3px; overflow: hidden; }
.thp-chang .thp-thanh span { display: block; height: 100%; background: var(--tblr-primary); }
.thp-chang .thp-dem { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }

@media (max-width: 1199.98px) {
    .thp-tong { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767.98px) {
    .thp-tong { gap: .5rem; }
    .thp-o { padding: .55rem .6rem; gap: .5rem; }
    .thp-o .thp-o-so { font-size: 1.4rem; }
    .thp-o-icon { display: none; }
    .thp-viec > summary { grid-template-columns: 2.8rem minmax(0, 1fr) 1rem; gap: .55rem; padding: .55rem .6rem; }
    .thp-viec > summary .thp-moc { grid-column: 2; align-items: flex-start; flex-direction: row; flex-wrap: wrap; gap: .4rem; }
    .thp-viec > summary .thp-mui { grid-column: 3; grid-row: 1; }
    .thp-mo { padding: 0 .6rem .6rem; }
    .thp-bang thead { display: none; }
    .thp-bang, .thp-bang tbody, .thp-bang tr, .thp-bang td { display: block; width: 100%; }
    .thp-bang tr { padding: .45rem .55rem; border-bottom: 1px solid var(--tblr-border-color); }
    .thp-bang > tbody > tr > td { border: 0; padding: .05rem 0; }
    .thp-bang > tbody > tr > td.thp-de { text-align: left; }
    .thp-bang > tbody > tr > td[data-nhan]::before { content: attr(data-nhan) ": "; color: var(--tblr-secondary); }
    .thp-chang { grid-template-columns: minmax(0, 9rem) minmax(0, 1fr) 2.5rem; }
}

/* ── Lịch công việc (cong_viec/lich.php) ───────────────────────────────── */
.lich-cv { table-layout: fixed; min-width: 840px; }
.lich-cv th { font-weight: 600; color: var(--tblr-secondary); background: var(--tblr-bg-surface-secondary); }
.lich-cv-o { height: 7.2rem; vertical-align: top; padding: .35rem .4rem !important; overflow: hidden; }
.lich-cv-so { font-weight: 600; font-variant-numeric: tabular-nums; }
/* Ô của bảng Tabler tô nền bằng biến --tblr-table-bg: đặt biến, không đặt background trực tiếp (bị đè). */
.lich-cv-ngoai { --tblr-table-bg: var(--tblr-bg-surface-secondary); opacity: .55; }
.lich-cv-nghi { --tblr-table-bg: #e9edf3; }
.lich-cv-hom-nay { outline: 2px solid var(--tblr-primary); outline-offset: -2px; }
.lich-cv-hom-nay .lich-cv-so { color: var(--tblr-primary); }
.lich-cv-viec { display: block; font-size: .78rem; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.lich-cv-viec:hover { text-decoration: underline; }
.lich-cv-mau-nghi { display: inline-block; width: .9rem; height: .9rem; vertical-align: -2px; background: #e9edf3; border: 1px solid var(--tblr-border-color); }

/* ══ Menu hai cột (Linh 18/11/2026, chép NBT) ═══════════════════════════════════════════════════
 * Cột 1 (.ray-vung): vùng, ô vuông icon bo góc nhẹ + chữ dưới. Cột 2 (aside): mục của vùng đang chọn, ô Tìm chức năng ở đầu.
 * Chỉ máy tính ≥ 992px; điện thoại: cột 1 ẩn, menu xổ hiện mọi vùng nối tiếp, tên vùng ở đầu mỗi vùng.
 * html.menu-an: cột 2 thu lại, nội dung giãn ra (assets/js/menu.js nhớ trên máy). */
:root {
    --hachi-ray: 76px;
}

.ray-vung,
.menu-thu {
    display: none;
}

.menu-tim {
    padding: .5rem .85rem .6rem;
}

.menu-tim-o {
    display: flex;
    align-items: center;
    gap: .45rem;
    height: 2.15rem;
    margin: 0;
    padding: 0 .6rem;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: .5rem;
    background: rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .55);
    cursor: text;
}

.menu-tim-o:focus-within {
    border-color: rgba(255, 255, 255, .5);
    background: rgba(255, 255, 255, .12);
}

.menu-tim-o input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #fff;
    font-size: .85rem;
}

.menu-tim-o input::placeholder {
    color: rgba(255, 255, 255, .5);
}

.menu-tim-o input::-webkit-search-cancel-button {
    filter: invert(1);
    opacity: .6;
}

.menu-tim-kq:not([hidden]) {
    display: block;
    padding: .15rem .6rem 1rem;
}

.menu-tim-muc {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    padding: .45rem .6rem;
    border-radius: 6px;
    color: rgba(255, 255, 255, .86);
    text-decoration: none;
}

.menu-tim-muc:hover,
.menu-tim-muc.dang {
    background: rgba(255, 255, 255, .1);
    color: #fff;
    text-decoration: none;
}

.menu-tim-muc > i {
    margin-top: .15rem;
    opacity: .7;
}

.menu-tim-ten {
    display: block;
    font-size: .875rem;
}

.menu-tim-muc small {
    display: block;
    color: rgba(255, 255, 255, .5);
    font-size: .72rem;
}

.menu-tim-rong {
    padding: .75rem .6rem;
    color: rgba(255, 255, 255, .55);
    font-size: .85rem;
}

#menu-trai.dang-tim .menu-vung {
    display: none !important;
}

@media (min-width: 992px) {
    .ray-vung {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 1031;
        display: flex;
        flex-direction: column;
        width: var(--hachi-ray);
        padding: .75rem 0 .5rem;
        border-right: 1px solid rgba(255, 255, 255, .06);
        background: #0a3319;
    }

    .ray-vung-ds {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        gap: .15rem;
        overflow-x: hidden;
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: rgba(255, 255, 255, .2) transparent;
    }

    .ray-vung-nut {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: .3rem;
        width: 100%;
        padding: .35rem .2rem;
        border: 0;
        background: none;
        color: rgba(255, 255, 255, .72);
        cursor: pointer;
    }

    .ray-vung-o {
        position: relative;
        display: flex;
        flex: none;
        align-items: center;
        justify-content: center;
        width: 2.5rem;
        height: 2.5rem;
        border: 1px solid rgba(255, 255, 255, .2);
        border-radius: .55rem;
        font-size: 1.3rem;
        transition: background-color .15s, border-color .15s, color .15s;
    }

    .ray-vung-nut:hover .ray-vung-o {
        border-color: rgba(255, 255, 255, .45);
        background: rgba(255, 255, 255, .08);
        color: #fff;
    }

    .ray-vung-nut:hover .ray-vung-chu {
        color: #fff;
    }

    .ray-vung-nut:focus-visible {
        outline: none;
    }

    .ray-vung-nut:focus-visible .ray-vung-o {
        box-shadow: 0 0 0 2px rgba(255, 255, 255, .6);
    }

    .ray-vung-nut.dang .ray-vung-o {
        border-color: transparent;
        background: var(--tt-dai, #16a34a);
        color: #fff;
        box-shadow: 0 6px 16px -8px rgba(34, 197, 94, .9);
    }

    .ray-vung-nut.dang .ray-vung-chu {
        color: #fff;
        font-weight: 600;
    }

    .ray-vung-chu {
        max-width: 4.4rem;
        font-size: .68rem;
        line-height: 1.15;
        text-align: center;
    }

    .ray-vung-cham {
        position: absolute;
        top: -.3rem;
        right: -.3rem;
        width: .7rem;
        height: .7rem;
        border: 2px solid #0a3319;
        border-radius: 50%;
        background: var(--tt-vang, #fbbf24);
    }

    .ray-vung-thu {
        display: flex;
        flex: none;
        align-items: center;
        justify-content: center;
        width: 2.75rem;
        height: 2.25rem;
        margin: .35rem auto 0;
        border: 0;
        border-radius: .5rem;
        background: transparent;
        color: rgba(255, 255, 255, .5);
        font-size: 1.3rem;
    }

    .ray-vung-thu:hover {
        background: rgba(255, 255, 255, .08);
        color: #fff;
    }

    .ray-vung-thu .ti-layout-sidebar-left-expand,
    .menu-an .ray-vung-thu .ti-layout-sidebar-left-collapse {
        display: none;
    }

    .menu-an .ray-vung-thu .ti-layout-sidebar-left-expand {
        display: inline;
    }

    /* Cột 2 dời sang phải cột 1; nội dung và thanh trên dời theo. */
    .page > aside.navbar-vertical.navbar-expand-lg {
        left: var(--hachi-ray);
    }

    .page > aside.navbar-vertical.navbar-expand-lg ~ .navbar,
    .page > aside.navbar-vertical.navbar-expand-lg ~ .page-wrapper {
        margin-left: calc(var(--hachi-ray) + 15rem);
    }

    .menu-an .page > aside.navbar-vertical.navbar-expand-lg {
        display: none;
    }

    .menu-an .page > aside.navbar-vertical.navbar-expand-lg ~ .navbar,
    .menu-an .page > aside.navbar-vertical.navbar-expand-lg ~ .page-wrapper {
        margin-left: var(--hachi-ray);
    }

    .menu-thu {
        position: absolute;
        top: .9rem;
        right: .5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 2rem;
        height: 2rem;
        border: 0;
        border-radius: .45rem;
        background: transparent;
        color: rgba(255, 255, 255, .5);
        font-size: 1.15rem;
    }

    .menu-thu:hover {
        background: rgba(255, 255, 255, .1);
        color: #fff;
    }

    .menu-tim {
        margin-top: .25rem;
        padding-top: .75rem;
        border-top: 1px solid rgba(255, 255, 255, .1);
    }

    .menu-vung.vung-an,
    .menu-vung-ten {
        display: none !important;
    }
}

/* Điện thoại: tên vùng ở đầu mỗi vùng, đậm hơn tên nhóm trong vùng. */
@media (max-width: 991.98px) {
    .menu-vung-ten {
        color: rgba(255, 255, 255, .8) !important;
    }
}

/* Báo cáo Sale (TikTag TK-0012 BL 184): lưới tháng, mỗi nguồn ba ô. Ô số đếm hẹp, ô doanh số rộng hơn; vạch ngăn giữa các nguồn. */
.bh-so-sale .bh-o-so {
    min-width: 3.75rem;
}

.bh-so-sale .bh-o-tien {
    min-width: 7rem;
}

.bh-so-sale .bh-nhom-nguon {
    border-left: 1px solid var(--tblr-border-color);
}

.bh-so-sale tr.bh-hom-nay > td {
    background: var(--tblr-primary-lt);
}

/* Chi phí MKT: ô số đã đối soát (TikTag TK-0049 BL 208); lệch với bill TK thì nền đỏ nhạt. */
.bh-o-ds {
    min-width: 7rem;
}

td.bh-lech {
    background: var(--tblr-red-lt);
}

/* Doanh số phiên live (TikTag TK-0062): dòng tiêu đề từng ngày. */
.live-doanh-so tr.live-ds-ngay > td {
    background: var(--tblr-bg-surface-secondary);
    border-top: 2px solid var(--tblr-border-color);
}

/* Báo cáo Net (TikTag TK-0060): khung biểu đồ, thanh tỷ trọng top 10 shop. */
.net-bieu-do {
    min-height: 300px;
}

.net-bieu-do-nho {
    min-height: 220px;
}

.net-ty-trong {
    width: 4.5rem;
}

.net-ten-top {
    max-width: 26rem;
}

.net-the .h2 {
    white-space: nowrap;
}

/* Mời MCN (TikTag TK-0067): bio KOC mở xem tại chỗ, giữ xuống dòng như trên TikTok. */
.mcn-bio summary {
    cursor: pointer;
}

.mcn-bio > div {
    white-space: pre-line;
    max-width: 22rem;
}

/* Lưới cả tháng (TikTag TK-0059; TikTag TK-0055 BL 267): ô đã có số đang bị sửa thì viền, nền vàng (assets/js/luoi-thang.js). */
.form-control.bh-o-sua-so-cu,
.form-check-input.bh-o-sua-so-cu {
    border-color: var(--tblr-warning);
    background-color: var(--tblr-yellow-lt);
    box-shadow: 0 0 0 .125rem rgba(var(--tblr-warning-rgb), .35);
}

/* Báo cáo doanh số sàn (TikTag TK-0047): 16 cột mỗi kênh, ô hẹp hơn để vừa màn 1920. */
.vhs-luoi .bh-o-tien {
    min-width: 5.5rem;
}

.vhs-luoi .bh-o-so {
    min-width: 3.25rem;
}

.vhs-luoi th,
.vhs-luoi td {
    padding-left: .25rem;
    padding-right: .25rem;
}

/* ══ Điện thoại (Linh 19/11/2026: "Tối ưu mobile các page") ═══════════════════════════════════════
 * .bang-the  — bảng danh sách: dưới 768px mỗi dòng thành một thẻ; ô đầu làm tiêu đề, ô sau có nhãn lấy từ tên cột
 *              (hachi.js chép vào data-nhan). Ô không muốn nhãn: data-nhan="".
 * .bang-ghim — bảng lưới số (báo cáo theo ngày, theo người): vẫn cuộn ngang, cột đầu đứng yên. */
.bang-ghim > thead > tr:first-child > :first-child,
.bang-ghim > tbody > tr > :first-child,
.bang-ghim > tfoot > tr > :first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    box-shadow: inset -1px 0 0 var(--tblr-border-color);
}

.bang-ghim > thead > tr:first-child > :first-child {
    z-index: 3;
}

/* Ô ghim phải có nền đặc, kẻo ô cuộn qua lộ ra phía sau. Dòng có màu riêng: phủ đúng màu đó lên nền trắng. */
.bang-ghim > tbody > tr > :first-child,
.bang-ghim > tfoot > tr > :first-child {
    background-color: var(--tblr-bg-surface, #fff);
}

.bang-ghim > * > tr[class*="bg-"] > :first-child {
    background-color: inherit;
}

.bang-ghim > tbody > tr.bh-hom-nay > :first-child {
    background: linear-gradient(var(--tblr-primary-lt), var(--tblr-primary-lt)), var(--tblr-bg-surface, #fff);
}

@media (max-width: 767.98px) {
    table.bang-the > thead {
        display: none;
    }

    table.bang-the,
    table.bang-the > tbody,
    table.bang-the > tfoot,
    table.bang-the > tbody > tr,
    table.bang-the > tfoot > tr {
        display: block;
        width: 100%;
    }

    table.bang-the > tbody > tr,
    table.bang-the > tfoot > tr {
        padding: .6rem 1rem;
        border-bottom: 1px solid var(--tblr-border-color);
    }

    table.bang-the > tbody > tr > td,
    table.bang-the > tfoot > tr > td {
        display: block;
        position: relative;
        width: 100% !important;
        min-width: 0 !important;
        min-height: 1.6rem;
        padding: .2rem 0 .2rem 38% !important;
        border: 0;
        text-align: left !important;
        white-space: normal !important;
    }

    table.bang-the > * > tr > td::before {
        content: attr(data-nhan);
        position: absolute;
        top: .25rem;
        left: 0;
        width: 35%;
        color: var(--tblr-secondary);
        font-size: .8125rem;
        font-weight: 400;
        line-height: 1.4;
    }

    table.bang-the > * > tr > td:first-child,
    table.bang-the > * > tr > td:not([data-nhan]),
    table.bang-the > * > tr > td[data-nhan=""] {
        padding-left: 0 !important;
    }

    table.bang-the > * > tr > td:first-child {
        padding-bottom: .35rem !important;
    }

    table.bang-the > * > tr > td:first-child::before {
        content: none;
    }

    table.bang-the > * > tr > td:empty {
        display: none;
    }

    table.bang-the :is(.form-control, .form-select) {
        width: 100%;
        max-width: none;
    }

    /* Cắt chữ, không xuống dòng: dành cho cột hẹp trên máy tính; trong thẻ thì cho xuống dòng. */
    table.bang-the :is(.text-truncate, .text-nowrap) {
        max-width: none;
        overflow: visible;
        white-space: normal !important;
    }
}

/* Báo lịch bận trên điện thoại: mỗi ngày một khối, 10 ca xếp 5 × 2, ô ghi giờ ca (data-ca). */
@media (max-width: 767.98px) {
    .live-lich-ban > thead {
        display: none;
    }

    .live-lich-ban,
    .live-lich-ban > tbody {
        display: block;
    }

    .live-lich-ban > tbody > tr {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: .35rem;
        padding: .6rem .75rem;
        border-bottom: 1px solid var(--tblr-border-color);
    }

    .live-lich-ban > tbody > tr > td {
        display: block;
        min-width: 0;
        padding: 0 !important;
        border: 0;
    }

    .live-lich-ban > tbody > tr > td.cot-hep {
        grid-column: 1 / -1;
        padding-bottom: .1rem !important;
    }

    .live-lich-ban .live-ban-nut {
        min-height: 3rem;
        padding: .2rem .1rem;
        font-size: .75rem;
        line-height: 1.25;
    }

    .live-lich-ban .live-ban-nut::before {
        content: attr(data-ca);
        display: block;
        color: var(--tblr-secondary);
        font-size: .6875rem;
        font-weight: 400;
    }
}

/* Bảng lương mẫu live (TikTag TK-0064): 14 cột số vừa bề ngang Full HD; số không xuống dòng, dòng phụ nhỏ. */
.live-luong th { white-space: nowrap; }
.live-luong td.text-end { white-space: nowrap; }
.live-luong .cot-ten { min-width: 15rem; }
.live-luong .hang-phu { font-size: .75rem; }
/* Bấm tiêu đề cột: hiện cách tính (TikTag TK-0090). */
.live-luong th[data-cach-tinh] { cursor: help; text-decoration: underline dotted; text-underline-offset: 3px; }
.cach-tinh-hop { position: absolute; z-index: 1080; max-width: 22rem; padding: .6rem .75rem; background: var(--tblr-bg-surface, #fff);
    border: 1px solid var(--tblr-border-color); border-radius: var(--tblr-border-radius); box-shadow: var(--tblr-box-shadow-dropdown, 0 .5rem 1rem rgba(0,0,0,.15));
    font-size: .8125rem; line-height: 1.45; color: var(--tblr-body-color); }
.cach-tinh-hop .tieu-de { font-weight: 600; margin-bottom: .25rem; }

/* Số có lý do (ngân sách giảm, TikTag TK-0049): rê chuột thấy lý do. */
.bh-co-ly-do {
    border-bottom: 1px dotted var(--tblr-secondary);
    cursor: help;
}

/* Biểu đồ cột theo ngày (assets/js/bieu-do.js; TikTag TK-0049 BL 224). Màu theo bảng màu đã chạy kiểm (skill dataviz, nền trắng, đạt mọi
 * bước, kể cả mù màu): ô 1 xanh #2a78d6 = Doanh số, ô 2 cam #eb6834 = Chi phí. Chữ, số luôn màu chữ, không mang màu chuỗi. */
.bd-khung { position: relative; }
.bd-vung { overflow-x: auto; }
.bd-svg { display: block; outline: none; }
.bd-svg:focus-visible { outline: 2px solid var(--tblr-primary); outline-offset: 2px; border-radius: 4px; }
.bd-cot-ds { fill: #2a78d6; }
.bd-cot-cp { fill: #eb6834; }
.bd-mau-ds { background: #2a78d6; }
.bd-mau-cp { background: #eb6834; }
.bd-luoi { stroke: #e6e7e9; stroke-width: 1; }
.bd-day { stroke: #c3c2b7; stroke-width: 1; }
.bd-chu { fill: #667382; font-size: 11px; font-variant-numeric: tabular-nums; }
.bd-chu-dam { fill: #1d273b; font-weight: 600; }
.bd-nen { fill: rgba(42, 120, 214, .07); }
.bd-chu-giai { display: inline-flex; align-items: center; gap: 6px; margin-right: 16px; color: var(--tblr-secondary); font-size: .8125rem; }
.bd-chu-giai .bd-o { width: 10px; height: 10px; border-radius: 2px; }
.bd-goi {
    position: absolute; z-index: 5; pointer-events: none; min-width: 180px; padding: 8px 10px;
    background: #fff; border: 1px solid rgba(11, 11, 11, .1); border-radius: 6px; box-shadow: 0 4px 14px rgba(0, 0, 0, .08); font-size: 12px;
}
.bd-goi-ngay { color: var(--tblr-secondary); margin-bottom: 4px; }
.bd-goi-dong { display: flex; align-items: center; gap: 8px; white-space: nowrap; line-height: 1.6; }
.bd-goi-dong strong { font-variant-numeric: tabular-nums; color: #1d273b; }
.bd-goi .bd-khoa { display: inline-block; width: 12px; height: 2px; border-radius: 1px; }

/* Biểu đồ tròn tỷ lệ doanh số (TikTag TK-0049 BL 234). Màu theo thứ tự cố định của đối tượng: sáu ô đầu bảng màu dataviz (đã chạy kiểm
   các cặp liền nhau, kể cả ô cuối cạnh ô đầu khi khép vòng); "Khác" xám. Chữ dùng màu chữ, không dùng màu phần. */
.bd-tron { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.bd-tron-hinh { flex: 0 0 200px; }
.bd-tron-chu { flex: 1 1 240px; min-width: 0; margin: 0; padding: 0; list-style: none; }
.bd-tron-chu li { display: flex; align-items: center; gap: 8px; padding: 3px 6px; border-radius: 4px; font-size: .8125rem; cursor: default; }
.bd-tron-chu li.is-chon { background: rgba(42, 120, 214, .07); }
.bd-tron-ten { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-tron-tl { flex: 0 0 3.5rem; text-align: right; color: var(--tblr-secondary); font-variant-numeric: tabular-nums; }
.bd-tron-gt { flex: 0 0 7.5rem; text-align: right; font-weight: 500; color: #1d273b; font-variant-numeric: tabular-nums; }
.bd-tron .bd-o, .bd-goi .bd-o { display: inline-block; flex: 0 0 10px; width: 10px; height: 10px; border-radius: 2px; }
.bd-tron-phan path { stroke: #fff; stroke-width: 2; stroke-linejoin: round; transition: opacity .12s; }
.bd-tron-mot path { stroke: none; }
.bd-tron-phan.bd-mo path { opacity: .3; }
.bd-tron-tong { font-size: 16px; }
.bd-goi-them { max-width: 260px; white-space: normal; line-height: 1.4; margin-top: 2px; }
.bd-tron-1 { fill: #2a78d6; } .bd-mau-tron-1 { background: #2a78d6; }
.bd-tron-2 { fill: #eb6834; } .bd-mau-tron-2 { background: #eb6834; }
.bd-tron-3 { fill: #1baf7a; } .bd-mau-tron-3 { background: #1baf7a; }
.bd-tron-4 { fill: #eda100; } .bd-mau-tron-4 { background: #eda100; }
.bd-tron-5 { fill: #e87ba4; } .bd-mau-tron-5 { background: #e87ba4; }
.bd-tron-6 { fill: #008300; } .bd-mau-tron-6 { background: #008300; }
.bd-tron-0 { fill: #a3a9b1; } .bd-mau-tron-0 { background: #a3a9b1; }
@media (max-width: 575.98px) {
    .bd-tron-hinh { margin: 0 auto; }
    .bd-tron-tl { flex-basis: 3rem; }
    .bd-tron-gt { flex-basis: 6.25rem; }
}

/* So với cùng kỳ (TikTag TK-0049 BL 224): tăng tốt xanh lá, xấu đỏ, trung tính xám; luôn kèm mũi tên và dấu, không chỉ màu. */
.ss-tot { color: #006300; }
.ss-xau { color: #d03b3b; }
.ss-vua { color: var(--tblr-secondary); }
.ss-bang td, .ss-bang th { font-variant-numeric: tabular-nums; }

.bh-o-pb {
    min-width: 8.5rem;
}

/* Tổng kết tháng MKT (TikTag TK-0052): ô chỉ số so với tháng trước; chữ đánh giá giữ xuống dòng như khi gõ. */
.tk-o { padding: 12px 14px; border: 1px solid var(--tblr-border-color); border-radius: 6px; }
.tk-o .h2 { font-variant-numeric: tabular-nums; }
.tk-chu { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Thuộc tính hidden luôn ẩn, kể cả phần tử có lớp d-flex / d-block của Tabler: lớp tiện ích cũng !important và nạp sau nên đè mất.
   Lỗi đã gặp: dải đỏ "Có số mới sau khi bạn mở trang" (TikTag TK-0059) hiện ngay khi mở Báo cáo Sale, Chi phí MKT từ 21/11 tới 22/11/2026.
   Phần tử cố ý giữ chỗ khi ẩn thì đặt luật riêng có độ ưu tiên cao hơn (như .xa-dem[hidden]). */
[hidden] { display: none !important; }

/* Nhóm gập được trong menu trái (Bán hàng: mỗi dự án một nhóm, TikTag TK-0059 BL 306): tên nhóm là nút, mục con thụt vào.
   li là flex cột để nút giãn hết bề ngang mà vẫn giữ lề của mục menu (giao-dien.css), không tràn ra làm cột menu cuộn ngang. */
.menu-gap {
    display: flex;
    flex-direction: column;
}
.menu-gap-nut {
    background: none;
    border: 0;
    text-align: left;
    font-weight: 600;
}
.menu-gap-mui {
    margin-left: auto;
    opacity: .6;
    transition: transform .15s;
}
.menu-gap-nut[aria-expanded="true"] .menu-gap-mui { transform: rotate(180deg); }
aside.navbar-vertical.navbar-expand-lg .navbar-collapse .navbar-nav .menu-gap-con > .nav-link { padding-left: 2.2rem; }

/* Đặt phòng họp (TikTag TK-0039 BL 382): lưới tuần, cột ngày, hàng giờ; mỗi giờ cao --ph-cao, lịch đặt tuyệt đối theo phút. */
.ph-khung { overflow-x: auto; }
.ph-luoi { --ph-cao: 46px; display: grid; grid-template-columns: 3.5rem repeat(7, minmax(7.5rem, 1fr)); min-width: 900px; }
.ph-dau { padding: .45rem .5rem; border-bottom: 1px solid var(--tblr-border-color); border-left: 1px solid var(--tblr-border-color); background: var(--tblr-bg-surface-secondary); position: sticky; top: 0; z-index: 2; }
.ph-dau-gio { border-left: 0; }
.ph-dau.ph-hom-nay { box-shadow: inset 0 -2px 0 var(--tblr-primary); }
.ph-dau.ph-hom-nay .fw-bold { color: var(--tblr-primary); }
.ph-dau.ph-nghi { background: #e3e8ef; }
.ph-cot-gio { position: relative; }
.ph-nhan-gio { height: var(--ph-cao); font-size: .75rem; color: var(--tblr-secondary); text-align: right; padding-right: .4rem; transform: translateY(-.5em); font-variant-numeric: tabular-nums; }
.ph-nhan-gio:first-child { transform: none; }
.ph-ngay {
    position: relative; height: calc(var(--ph-so-gio) * var(--ph-cao)); border-left: 1px solid var(--tblr-border-color);
    background-image: linear-gradient(to bottom, var(--tblr-border-color) 1px, transparent 1px),
                      linear-gradient(to bottom, transparent calc(var(--ph-cao) / 2), #eef1f5 calc(var(--ph-cao) / 2), #eef1f5 calc(var(--ph-cao) / 2 + 1px), transparent calc(var(--ph-cao) / 2 + 1px));
    background-size: 100% var(--ph-cao);
}
.ph-ngay.ph-nghi { background-color: #f1f3f7; }
.ph-ngay.ph-dat-duoc { cursor: copy; }
.ph-ngay.ph-dat-duoc:hover { background-color: rgba(var(--tblr-primary-rgb), .04); }
.ph-lich {
    position: absolute; left: 3px; right: 3px; top: calc(var(--ph-tu) * var(--ph-cao) / 60 + 1px); height: calc(var(--ph-dai) * var(--ph-cao) / 60 - 2px);
    min-height: 18px; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 0;
    padding: 2px 6px; border: 0; border-left: 3px solid var(--tblr-primary); border-radius: 4px; background: #dbe7fb; color: var(--tblr-body-color);
    font-size: .78rem; line-height: 1.3; cursor: default; z-index: 1;
}
button.ph-lich { cursor: pointer; }
button.ph-lich:hover { background: #c9dbf8; }
.ph-lich.ph-da-qua { background: #eceff3; border-left-color: #a5afbd; color: var(--tblr-secondary); }
.ph-lich-gio { font-weight: 600; font-variant-numeric: tabular-nums; }
.ph-lich-nd, .ph-lich-nguoi { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-lich-nguoi { color: var(--tblr-secondary); }
/* Lịch dưới 1 giờ: một dòng "giờ · nội dung", người dùng phòng xem ở chữ khi rê chuột và bảng bên dưới. */
.ph-lich.ph-lich-ngan { flex-direction: row; align-items: center; gap: .35rem; white-space: nowrap; padding-top: 0; padding-bottom: 0; }
.ph-lich.ph-lich-ngan .ph-lich-nd { flex: 1 1 auto; min-width: 0; }
.ph-lich.ph-lich-ngan .ph-lich-nguoi { display: none; }
.ph-bay-gio { position: absolute; left: 0; right: 0; top: calc(var(--ph-phut) * var(--ph-cao) / 60); border-top: 2px solid var(--tblr-red); z-index: 1; pointer-events: none; }
.ph-mau { display: inline-block; width: .9rem; height: .7rem; border-radius: 2px; vertical-align: middle; }
.ph-mau-lich { background: #dbe7fb; border-left: 3px solid var(--tblr-primary); }
.ph-mau-qua { background: #eceff3; border-left: 3px solid #a5afbd; }
.ph-mau-nghi { background: #e3e8ef; }
