﻿/* Cỡ chữ bảng dữ liệu dùng chung = cỡ bảng dòng hàng form đơn hàng (.sof-tbl): thân 13px, tiêu đề cột 13px, ô mã (mono) 13px (25/10: không chữ nào trong bảng dưới 13px). Mọi bảng/lưới dùng biến này, không ghi số cố định. */
:root {
    --tbl-fs: 14px;
    --tbl-fs-head: 14px;
    --tbl-fs-mono: 14px;
}

html, body, button {
    font-family: var(--app-font-family);
    /*font-size: calc(.9 * var(--smart-font-size));*/
    font-size: 14px;
}

/*body {
    font-family: "Inter";
}*/
:root, input {
    --bb-header-color: #FFFFFF;
    --bb-header-bg: #FFFFFF; /*#702cf8*/ /*#F6C6CB, #F47920*/
    --bb-dropdown-max-height: 500px;
    --bb-color-smart: var(--st-red);
    font-family: var(--app-font-family);
}

.layout {
    --bb-layout-header-background: var(--bb-header-bg);
    --bb-layout-sidebar-banner-background: #FFFFFF;
    /*Màu backgroud title*/
    /* --bb-layout-sidebar-banner-background: var(--bb-header-bg);*/
    --bb-layout-header-color: var(--bb-header-color);
    /*Màu chữ title*/
    --bb-layout-title-color: black;
    /* Khớp bề rộng với ErpSidebar (sidebar tự tạo): mở 250px, thu gọn 48px */
    --bb-layout-sidebar-width: 250px !important;
    --bb-layout-banner-font-size: 1.3rem !important;
    --bb-layout-headerbar-background: transparent !important;
    --bb-layout-banner-logo-width: 30px !important;
    --bb-layout-sidebar-collapse-width: 48px !important;
    --bb-layout-menu-item-hover-bg: none;
}

.layout:not(.has-footer) {
    --bb-layout-footer-height: 0px;
}

.layout .layout-header {
    z-index: 1000 !important;
}

/* Sidebar thu gọn: khi hover, `.sb-float` bung ra ĐÈ LÊN nội dung — nhưng `.layout-side` của
   thư viện giao diện cũ có `position: sticky; z-index: 5` + `transform` nên nó TỰ TẠO stacking context.
   Hệ quả: `z-index: 900` khai trong ErpSidebar.razor.css chỉ có tác dụng BÊN TRONG `.layout-side`;
   ra ngoài, thứ được đem so là chính `.layout-side` với z-index 5.

   Nội dung trang nằm trong `main.layout-main` (position: relative, z-index: auto) không tạo
   stacking context, nên phần tử sticky bên trong leo thẳng lên cấp `section.layout` — và
   `.voucher-action` của VoucherView cũng khai đúng `z-index: 5`. Bằng điểm thì thứ tự DOM quyết
   định: `.layout-right` đứng SAU `.layout-side` ⇒ toolbar chứng từ vẽ đè lên menu.

   Đo trên browser thật (/sales/orders, Edge, 1280x800, 09/09/2026): tại điểm chồng lấn
   (167.5, 120) `elementFromPoint` trả về `input.e-daterangepicker`, tức ô chọn ngày của toolbar.

   Nâng `.layout-side` lên 900 cho khớp ý đồ đã ghi trong ErpSidebar.razor.css: trên nội dung,
   dưới header (1000) và dưới dialog/popup của Bootstrap (>= 1050).
   Sửa ở đây thay vì hạ z-index của `.voucher-action`: hạ chỗ kia chỉ chữa cho VoucherModule,
   màn nào khác có sticky z-index >= 5 sẽ lại đè lên menu. */
.layout.has-sidebar > .layout-side {
    z-index: 900;
}

.layout .layout-menu .menu {
    --bb-menu-item-hover-bg: none;
    --bb-menu-item-hover-color: var(--bb-color-smart);
}

.layout-header {
    border-bottom: 1px solid var(--bs-border-color);
}

.layout-header .widget {
    margin-right: 2rem;
}

.layout-banner {
    border-bottom: 1px solid var(--bs-border-color);
    background-color: var(--bb-layout-sidebar-banner-background);
}

.tabs-chrome > .tabs-header, .tabs-capsule > .tabs-header {
    --bb-tabs-chrome-item-height: 30px;
    --bb-tabs-item-body-padding: 5px 5px;
}

/*.layout .layout-main {
    padding: 0.5rem;
}*/

.btn {
    /*Khoảng cách buttton và icon*/
    --bb-btn-label-margin-left: 10px !important;
}

/* .layout-banner .layout-logo {
        border: 1px solid var(--bb-header-color);
    }*/

/* ===== Sidebar tự tạo (ErpSidebar) — phương án A =====
   Menus vẫn truyền vào Layout để Tab tra tiêu đề theo URL, nhưng menu built-in
   bị giấu; phần hiển thị là component ErpSidebar đặt trong slot <Side>. */
.layout .layout-menu {
    display: none;
}

.layout-side {
    /* Viền phải gom về một mối: .sb (ErpSidebar) tự vẽ 2px theo spec;
       phần logo banner phía trên vẽ viền riêng cùng màu cho liền cột */
    border-right: none;
    display: flex;
    flex-direction: column;
    /* Cho lớp hover-nổi 250px của sidebar thu gọn phủ lên vùng nội dung */
    overflow: visible;
}

.layout-side .layout-banner {
    border-right: 1px solid var(--st-border);
}

/* BB có sẵn hành vi "thu gọn + hover -> bung aside về bề rộng đầy đủ"
   (rule .layout.is-collapsed .layout-side:not(:hover)) làm ĐẨY cả vùng nội dung.
   Ghim aside ở bề rộng thu gọn kể cả khi hover — việc mở tạm 250px là lớp nổi
   position:absolute của ErpSidebar, không đụng layout. */
.layout.is-collapsed .layout-side,
.layout.is-collapsed .layout-side:hover {
    --bb-layout-sidebar-width: var(--bb-layout-sidebar-collapse-width);
}

/* Logo theo sidebar: thu gọn (48px) chỉ hiện logo mini 30px căn giữa; mở rộng hiện logo đầy đủ 132px. */
.layout .layout-banner .logo-full img {
    width: 132px !important;
    height: auto;
    display: block;
}

.layout.is-collapsed .layout-banner {
    padding: 0;
    justify-content: center;
}

.layout.is-collapsed .layout-banner .logo-collapsed {
    width: 30px;
    height: 30px;
    margin: 0 auto;
    object-fit: contain;
    border-radius: 7px;
}

.layout-footer {
    border-top: 1px solid var(--bs-border-color);
}

.dropdown-logout {
    --bb-logout-text-color: var(--bb-header-color);
    --bb-logout-text-max-width: 150px !important;
}

.logout-avatar {
    border-radius: 50%;
}

.dropdown-user img {
    border-radius: 50%;
}

.dropdown-menu {
    max-height: none;
}

.layout-drawer {
    padding: 6px;
    cursor: pointer;
}

/* Nút thu / mở sidebar trên topbar: màu chủ đạo xanh */
.layout-header-bar {
    color: var(--st-primary) !important;
    border-radius: 8px;
    transition: background-color .15s ease;
}

.layout-header-bar:hover {
    background: var(--st-primary-050);
}

.nav-link {
    padding: 4px;
    /*font-size:14px;*/
}

.widget {
    --bb-widget-toggle-color: var(--bb-header-color);
}

.widget .dropdown-menu {
    --bs-dropdown-min-width: 16rem;
}

.widget .dropdown-body h3 {
    color: #666666;
    font-size: 14px;
    margin-bottom: 10px;
}

.widget .dropdown-body h4 {
    color: #444444;
    font-size: 15px;
    margin: 0;
}

.widget .dropdown-body small {
    color: #999999;
    font-size: 14px;
    position: absolute;
    top: 0;
    right: 0;
}

.widget .dropdown-item {
    padding: 0.5rem 1rem;
    min-width: 100px;
}

.widget .dropdown-item > div:not(.progress):last-child {
    width: calc(100% - 40px);
}

.widget .dropdown-item.active,
.widget .dropdown-item:active {
    color: inherit;
}

.widget .dropdown-item:not(:nth-of-type(odd)):active {
    background-color: inherit;
}

.widget .progress {
    height: 7px;
}

.table-cell img {
    width: 46px;
    border-radius: var(--bs-border-radius);
}

.table-cell .progress {
    height: 6px;
    margin-top: .5rem;
}

.user-demo-address {
    margin-top: .25rem;
    font-size: 86%;
    color: #N0c4cc;
}

.table-users {
    height: calc(100% - 93px);
}

.cell-label {
    line-height: 35px;
}

/*.tabs {
    --bb-tabs-item-height: 30px !important;
}*/

.tabs-item .tabs-item-close {
    top: 0px !important;
    right: 0px;
}

.layout .layout-menu .menu {
}

.bb-fs-on, .bb-fs-open .bb-fs-off {
    display: none;
}

.tabs {
    --bb-tabs-item-height: 33px;
}

.menu {
    --bb-menu-active-color: var(--st-red-050);
    --bb-menu-bar-bg: var(--st-red-050);
    --bb-menu-item-hover-bg: none;
    --bb-menu-item-hover-color: #000000;
}

.menu .submenu .nav-link.active {
    color: var(--bb-color-smart);
    background-color: none;
}

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

.loading-progress circle {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: var(--st-red);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Đang tải...");
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 2000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

@supports not selector(::-webkit-scrollbar) {
    .scroll {
        scrollbar-color: rgba(0, 0, 0, 0.3) rgba(0, 0, 0, 0);
        scrollbar-width: thin;
    }
}

/*Custom css*/
.valid-label {
    font-size: 0.7rem;
    color: red;
}

.box-button {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.btn-coupon {
    font-size: 0.8rem !important;
}

.lbl-custom-coupon {
    font-size: 0.8rem;
}

.lbl-custom-title-coupon {
    font-size: 0.83rem;
}

@media (max-width: 1280px) {
    .lbl-custom-coupon {
        font-size: 0.7rem;
    }
}

.default-tab {
    border: 1px solid #d7d7d7;
}

th {
    padding: 5px 10px;
}

/*td {
    padding: 0px 10px;
}*/

.header-combox-custom {
    padding: 5px 10px;
}

.content-combox-custom {
    padding: 0px 10px;
}



/*==== MEGA MENU (thanh menu ngang trên đầu, cạnh nút thu / mở menu: Hệ thống, Danh mục, Báo cáo) ====
   Mục cấp 1 dạng nút bo tròn cao 28, rê chuột / đang mở nền xanh nhạt chữ xanh chủ đạo;
   khung thả xuống trắng, bo 12, đổ bóng, cuộn khi dài; cột nhóm có tiêu đề xanh + gạch chân,
   mục con rê chuột nền xanh nhạt. Màu theo bảng màu chính: xanh #2563eb. */
.navbar-nav {
    gap: 2px;
    --bs-nav-link-font-weight: 500;
}

.navbar-nav .nav-item {
    margin: 0;
    border: 0;
}

.app-header .navbar {
    padding-top: 0;
    padding-bottom: 0;
}

.navbar-nav .nav-item > .nav-link {
    height: 28px;
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    transition: background-color .15s ease, color .15s ease;
}

.navbar-nav .nav-item > .nav-link:hover,
.navbar-nav .nav-item > .nav-link:focus-visible {
    background: #eef4ff;
    color: #2563eb;
}

.navbar-nav .nav-link.show {
    background: #e0eaff;
    color: #1d4ed8;
}

/* Nút gốc (Danh mục, Hệ thống…) chứa trang đang mở: nền xanh nhạt đậm hơn hover, chữ xanh đậm; mục đang mở trong bảng menu cũng tô */
.navbar-nav .nav-item > .nav-link.active {
    background: #dbeafe;
    color: #1d4ed8;
    box-shadow: inset 0 0 0 1px #bfdbfe;
}

.megamenu .nav-link.active {
    color: #1d4ed8;
    font-weight: 600;
}

.dropdown-toggle::after {
    display: none !important;
}

@media all and (min-width: 992px) {
    .navbar .has-megamenu {
        position: static !important;
    }

    .navbar .megamenu {
        left: 0;
        right: 0;
        width: min(75rem, calc(100vw - 32px));
        margin-top: 6px;
        max-height: calc(100vh - 120px);
        overflow-y: auto;
    }
}

@media (max-width: 1280.98px) {
    .navbar .megamenu {
        width: min(56rem, calc(100vw - 32px));
    }
}

@media (max-width: 991px) {
    .navbar.fixed-top .navbar-collapse, .navbar.sticky-top .navbar-collapse {
        overflow-y: auto;
        max-height: 90vh;
        margin-top: 10px;
    }
}

.megamenu {
    padding: 18px 22px 12px;
    background: #fff;
    border: 1px solid #e6eaf1;
    border-radius: 12px;
    box-shadow: 0 18px 48px rgba(16, 24, 40, .16), 0 2px 6px rgba(16, 24, 40, .06);
    scrollbar-width: thin;
}

.megamenu > .row {
    row-gap: 14px;
}

.col-megamenu {
    height: 100%;
    padding: 2px 4px;
}

.col-megamenu h6,
.col-megamenu h6.title {
    margin: 0 0 8px;
    padding: 0 8px 7px;
    border-bottom: 2px solid #eef4ff;
    color: #2563eb;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .3px;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.col-megamenu ul {
    margin: 0;
}

.col-megamenu li {
    border-radius: 7px;
    transition: background-color .15s ease;
}

.col-megamenu li:hover {
    background: #eef4ff;
}

.col-megamenu a,
.col-megamenu .nav-link {
    display: block;
    padding: 6px 8px;
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
    text-decoration: none;
    line-height: 1.4;
}

.col-megamenu li:hover a,
.col-megamenu a:focus-visible {
    color: #2563eb;
}

/*====END CSS MEGA MENU====*/

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* ô nhập: chỉ viền khi focus, không quầng sáng */
.form-control:focus, .form-check-input:focus {
    box-shadow: none;
    border-color: var(--smart-primary, #007bff);
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

.loading-progress circle {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: #1b6ec2;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

code {
    color: #c02d76;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.card-body {
    height: auto;
}

label {
    text-overflow: ellipsis;
    font-weight: 500;
    white-space: nowrap;
}

.smart-multi-split-button {
    height: 26px;
    margin: 0 2px;
}

.base-view {
    /*padding: 8px 8px 0 8px;*/
    max-width: calc(100vw - 16px);
}

.image-icon {
    width: 68px;
    height: 44px;
    border: 1px solid #c5c5c5;
    align-items: center;
    display: flex;
    justify-content: center;
    border-radius: 4px;
    margin-right: 8px;
    border-color: var(--smart-success);
    color: var(--smart-success);
}

.attach {
}

.toast-container {
    z-index: 99999;
}

.title-dialog {
    font-size: 1.4rem;
    color: #111;
    font-weight: 600;
}

.f2-hint {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 10;
}

.custom-input-dropdown {
    position: relative;
    width: 280px;
    font-family: var(--app-font-family);
}

.custom-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #ccc;
    padding: 10px;
    z-index: 9999;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition:  transform 0.4s ease;
}

.custom-dropdown.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-item {
    /*display: flex;*/
    align-items: center;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
}

/*.dropdown-item:hover {
background-color: #0078d4;
}*/

.dropdown-item input[type="radio"] {
    margin-right: 8px;
    accent-color: #00bcd4;
    width:16px;
    height:16px;
    cursor:pointer;
}

.dropdown-item.selected {
    color: #00bcd4;
    font-weight: 500;
}

[data-title]:hover:after {
    visibility: visible;
    opacity: 1;
    transition: all 0.2s ease 0.6s;
}

[data-title]:after {
    content: attr(data-title);
    background-color: #4b9c2c;
    color: #ffffff;
    font-size: 150%;
    position: absolute;
    padding: 4px 8px 4px 8px;
    visibility: hidden;
}

#gridContainer {
    display: flex;
    height: 100%;
}

#grid-left,
#grid-right {
    height: 100%;
}

.gutter {
    background-color: #ddd;
    background-repeat: no-repeat;
    background-position: 50%;
}

.gutter.gutter-horizontal {
    cursor: col-resize;
    width: 4px;
}

#watermark {
    visibility: hidden;
}

[invisible] {
    visibility: hidden
}

.layout .layout-header, .layout .layout-banner {
    border-bottom: 1px solid var(--st-border);
}

/* ==== THANH TAB (thư viện giao diện cũ: tabs-chrome, tabs-border-card) — tông xanh chủ đạo ====
   Ba lớp màu tách nhau: topbar trắng / dải tab #e6ebf3 (viền trên + dưới) / nội dung #f4f6fa; tab đang mở nền TRẮNG + chữ xanh đậm (không vạch màu trên đầu); tab thường chữ xám, rê chuột nền xanh nhạt. */
.tabs-chrome > .tabs-header {
    --bb-tabs-header-bg-color: #e6ebf3;
    --bb-tabs-item-active-bg-color: #ffffff;
    --bb-tabs-item-hover-bg-color: rgba(255, 255, 255, .6);
    --bb-tabs-item-body-border-radius: 8px;
    --bb-tabs-item-body-padding: 4px 10px;
    background-color: #e6ebf3;
    border-top: 1px solid #d5dce6;
    border-bottom: 1px solid #d5dce6;
}

.tabs-chrome > .tabs-header .tabs-item-wrap .tabs-item {
    color: #5b6577;
    font-size: 14px;
    font-weight: 500;
}

.tabs-chrome > .tabs-header .tabs-item-wrap.active .tabs-item {
    color: var(--st-primary-600);
    font-weight: 700;
}

/* Góc cong chân tab đang mở: cùng màu nền tab đang mở (mặc định BB tô theo nền trang) */
.tabs-chrome > .tabs-header .tabs-item-wrap.active .tab-corner {
    background-color: #ffffff;
}

.tabs-chrome > .tabs-header .tabs-item-wrap:not(.active) .tabs-item:not(.disabled) .tabs-item-body:hover {
    color: var(--st-primary-600);
}

.tabs-chrome > .tabs-header .tabs-item-wrap:not(.active):not(:hover):not(:first-child) .tabs-item:before {
    background-color: #d5dce6;
}

.tabs-chrome > .tabs-header .tabs-item-wrap .tabs-item .tabs-item-close {
    width: 18px;
    height: 18px;
    align-items: center;
    justify-content: center;
    color: #8a94a6;
    transition: background-color .15s ease, color .15s ease;
}

.tabs-chrome > .tabs-header .tabs-item-wrap .tabs-item .tabs-item-close:hover {
    background-color: var(--st-primary-050);
    color: var(--st-primary);
}

.tabs-chrome > .tabs-header .nav-link-bar .nav-link-bar-button {
    color: #5b6577;
}

.tabs-chrome > .tabs-header .nav-link-bar .nav-link-bar-button:hover {
    color: var(--st-primary);
}

/* Khung nội dung của tab dạng thẻ: viền nhạt cùng tông */
.tabs.tabs-border-card {
    --bs-border-color: #e3e8f0;
}

.radio-row {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 8px 12px;
    border-radius: 8px;
}

.radio-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #111827;
}

.radio-item input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: #3b82f6;
}

.label-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.smart-logo {
    max-width: 70%;
    height: auto;
}

img {
    vertical-align: middle;
    border-style: none;
}

.row {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}

.title-login {
    font-size: 24px;
    font-weight: bold;
    font-style: normal;
    font-stretch: normal;
    line-height: 1.21;
    letter-spacing: normal;
    text-align: center;
    color: #333;
}

.mw-496 {
    max-width: 496px;
}

.padding-card-custom {
    padding-left: 48px !important;
    padding-right: 48px !important;
    border: 1px solid #dadce0;
    border-radius: 8px !important;
}

.mt-14px {
    margin-top: 22px;
}

.mb-65 {
    margin-bottom: 60px !important;
}

.text-wrap {
    text-wrap: inherit;
}
.text-left {
    text-align: left !important;
}

.text-right {
    text-align: right !important;
}

.center-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 100vh;
}

.center-screen-register {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.show-saler-button {
    color: #3779e8;
    margin-right: 8px;
    cursor: pointer;
}

.show-saler-note {
    color: #757575;
}

.wrap-register a {
    color: #3779e8;
    text-decoration: none;
}

.wrap-success {
    width: 100%;
    border-radius: 4px;
    padding: 40px;
    background: #fff;
    position: relative;
    max-width: 640px;
}

.wrap-success .success-form-des {
    border-radius: 4px;
    color: #212121;
    line-height: 24px;
    font-size: 16px;
    width: 100%;
    text-align: left;
    margin-top: 24px;
}

.success-form {
    text-align: center;
}

.success-bg {
    width: 116px;
    margin: 0 auto;
    height: 116px;
    margin-bottom: 24px;
    display: block;
}

.reg-icon-success {
    background-image: url(../assets/success.svg);
}

.reg-icon-warning {
    background-image: url(../assets/warning.svg);
}

.success-form-title {
    font-size: 24px;
    font-weight: 700;
    line-height: 29px;
    text-align: center;
    display: block;
    margin-bottom: 8px;
}
.row-is-create td {
    background-color: #BBF7C1 !important;
    color: #b00000;
}
.row-is-confirm td {
    background-color: #fcd89a !important;
    color: #1F1F1F;
}
.row-is-cancel td {
    background-color: #FE6D7A66 !important;
    color: #b00000;
}
.row-is-print td {
    background-color: #a8e5f7 !important;
    color: #b00000;
}

.success-account-info {
    text-align: center;
    padding: 15px;
    border-radius: 4px;
}

.promo-lib-icon-nodata {
    display: inline-block;
    width: 80px;
    height: 80px;
    background-image: url(../assets/Icon_Empty.svg);
    background-repeat: no-repeat;
    background-position: -399px 0;
    background-size: 797px !important;
}

.wrap-no-data-grid .text-nodata {
    color: #586074;
    font-weight: 500;
    padding-top: 8px;
    font-style: italic;
}

/* NoRecordsTemplate của SfComboBox — popup render ở CUỐI <body> nên KHÔNG ăn CSS isolation,
   bắt buộc phải để ở đây. Dùng cho combobox "Menu báo cáo" ở /system/config-report: gõ không
   ra menu nào thì đưa luôn lối khai báo menu mới vào chỗ trống đó. */
.norecord-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 8px;
}

    .norecord-action .norecord {
        color: #586074;
        font-style: italic;
    }
/* ==== NỀN VÙNG NỘI DUNG ====
   Tô một màu nền (--st-page = #f4f6fa, trùng nền các màn mới) cho cả vùng nội dung và thân tab,
   để trang ngắn hơn chiều cao màn hình không bị nửa trên xám / nửa dưới trắng. */
.layout .layout-main,
.layout .layout-main > .tabs,
.layout .layout-main > .tabs > .tabs-body,
.layout .layout-main .tabs-body-content {
    background-color: var(--st-page);
}

/* Khung gốc của từng màn (con trực tiếp của thân tab: .ob, .nxt, McRoot…) trong suốt để lộ nền chung phía sau,
   không tự tô nền riêng gây lệch màu; thẻ / bảng / ô nhập bên trong vẫn giữ nền trắng của chúng. */
.layout .layout-main .tabs-body-content > *,
.layout .layout-main .tabs-body-content > * > .ob-wrap,
.layout .layout-main .tabs-body-content > .nxt > .wrap {
    background-color: transparent;
}

/* Nút đóng của popup (PopupInstance, Options.CloseButton): nút HTML thường, không dùng <smart-button>. */
.smart-popup .smart-popup-title .smart-popup-close {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #8a94a6;
    line-height: 1;
    cursor: pointer;
}

/* Biểu tượng X: nhỏ hơn ô nút và căn đúng tâm (font Material mặc định 24px, dòng cao lệch tâm) */
.smart-popup .smart-popup-title .smart-popup-close .material-icons {
    display: block;
    width: 18px;
    height: 18px;
    font-size: 18px;
    line-height: 18px;
    text-align: center;
}

.smart-popup .smart-popup-title .smart-popup-close:hover {
    background: #fdecec;
    color: #dc2626;
}

.smart-popup.smart-popup-rtl .smart-popup-title .smart-popup-close {
    right: unset;
    left: 8px;
}

/* ==== KHUNG ỨNG DỤNG (thay Layout của thư viện giao diện cũ) ====
   Thanh bên (logo + ErpSidebar) | cột chính: header (nút thu gọn, MegaMenu, topbar) + SmartTabs.
   Số đo giữ như layout cũ: sidebar 250px / thu gọn 48px, header 50px; sidebar z-index 900 (trên nội dung,
   dưới header 1000 và dưới popup >= 1050) để lớp hover-nổi của ErpSidebar phủ lên vùng nội dung. */
.app-shell {
    display: flex;
    height: 100vh;
    overflow: hidden;
    background: var(--st-page, #f4f6fa);
}

.app-side {
    flex: none;
    width: 250px;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 900;
    overflow: visible;
    background: #fff;
    transition: width .2s ease;
}

.app-shell.is-collapsed .app-side {
    width: 48px;
}

.app-side .layout-banner {
    flex: none;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border-right: 1px solid var(--st-border);
    border-bottom: 1px solid var(--st-border);
    background: #fff;
}

.app-side .layout-banner .logo-full img {
    width: auto !important;
    height: 36px;
    display: block;
}

.app-shell.is-collapsed .app-side .layout-banner {
    padding: 0;
    justify-content: center;
}

.app-shell.is-collapsed .app-side .layout-banner .logo-collapsed {
    width: 30px;
    height: 30px;
    margin: 0 auto;
    object-fit: contain;
    border-radius: 7px;
}

.app-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.app-header {
    flex: none;
    height: 42px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 10px 0 6px;
    position: relative;
    z-index: 1000;
    background: var(--bb-header-bg, #fff);
    border-bottom: 1px solid var(--st-border);
}

.app-header .layout-header-bar {
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    font-size: 16px;
    cursor: pointer;
}

/* Khoảng trống giữa mega menu và các nút bên phải của thanh đầu trang. */
.app-header-sp {
    flex: 1;
    min-width: 0;
}

.app-content {
    flex: 1;
    min-height: 0;
}

/* Vùng trang (thay khung tab cũ): cao hết phần còn lại, tự cuộn; trang dùng chiều cao 100% của khung này. */
/* ===== Nút thao tác của màn (hàng tiêu đề trang, thanh công cụ) — mẫu: [↻] [⇥] [⚙] [⏷] … [Thêm ▾] =====
   pa-icon: nút phụ vuông 28 chỉ biểu tượng (chữ trong nút chỉ để đọc màn hình — ẩn bằng font-size 0; bắt buộc có title / aria-label),
            nền trắng viền xám, rê chuột nền xám nhạt; đang bật (.on / aria-pressed) viền + biểu tượng xanh.
   pa-btn:  nút phụ có chữ (thao tác riêng của màn, vd Duyệt đơn chờ duyệt) cùng kiểu viền xám, cao 28.
   pa-primary: nút chính "Thêm" nền xanh lá #16a34a chữ trắng; pa-split = nhóm [Thêm][▾] dính liền (pa-caret là nút mũi tên).
   Chọn qua #layout-content + lặp lớp để thắng CSS cô lập của từng màn và quy tắc cỡ nút chung của hàng tiêu đề. */
#layout-content .pa-icon.pa-icon,
#layout-content .pa-btn.pa-btn {
    height: 28px;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid #d8dee9;
    border-radius: 6px;
    background: #fff;
    color: #475569;
    cursor: pointer;
    box-shadow: none;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

#layout-content .pa-icon.pa-icon {
    position: relative;
    width: 28px;
    min-width: 28px;
    padding: 0;
    font-size: 0;
    /* Chữ ẩn (chỉ để đọc màn hình) vẫn là phần tử con: bỏ khoảng cách để biểu tượng nằm đúng giữa nút. */
    gap: 0;
}

#layout-content .pa-icon.pa-icon > span:not(.pa-badge):not(.slt-badge) {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

#layout-content .pa-btn.pa-btn {
    padding: 0 10px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

#layout-content .pa-icon.pa-icon > svg {
    width: 16px;
    height: 16px;
    flex: none;
}

#layout-content .pa-btn.pa-btn > svg {
    width: 14px;
    height: 14px;
    flex: none;
}

#layout-content .pa-icon.pa-icon:hover:not(:disabled),
#layout-content .pa-btn.pa-btn:hover:not(:disabled) {
    background: #f1f5f9;
    border-color: #c3cad6;
    color: #1f2937;
}

#layout-content .pa-icon.pa-icon.on,
#layout-content .pa-icon.pa-icon[aria-pressed="true"] {
    border-color: #93b4f5;
    background: #eef4ff;
    color: #2563eb;
}

#layout-content .pa-icon.pa-icon:disabled,
#layout-content .pa-btn.pa-btn:disabled,
#layout-content .pa-primary.pa-primary:disabled {
    opacity: .45;
    cursor: not-allowed;
}

/* Số đếm (vd số bộ lọc đang áp dụng) gắn góc trên phải của nút biểu tượng. */
#layout-content .pa-icon.pa-icon .pa-badge,
#layout-content .pa-icon.pa-icon .slt-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: #2563eb;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 16px;
    display: inline-grid;
    place-items: center;
}

#layout-content .pa-primary.pa-primary {
    height: 28px;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px;
    border: 1px solid #16a34a;
    border-radius: 6px;
    background: #16a34a;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

#layout-content .pa-primary.pa-primary:hover:not(:disabled) {
    background: #15803d;
    border-color: #15803d;
}

#layout-content .pa-primary.pa-primary > svg {
    width: 14px;
    height: 14px;
}

/* Nhóm [Thêm][▾]: nút chính bo trái, nút mũi tên bo phải, vạch ngăn trắng mờ. */
#layout-content .pa-split.pa-split {
    position: relative;
    display: inline-flex;
}

#layout-content .pa-split.pa-split > .pa-primary:first-child {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

#layout-content .pa-split.pa-split > .pa-caret {
    width: 26px;
    padding: 0;
    justify-content: center;
    border-left-color: rgba(255, 255, 255, .45);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Nhóm nút phụ [Nhập …][▾] (pa-btn): cùng kiểu viền xám, hai nút dính liền chung một vạch ngăn. */
#layout-content .pa-split.pa-split > .pa-btn:first-child {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

#layout-content .pa-split.pa-split > .pa-btn.pa-caret {
    margin-left: -1px;
    border-left-color: #d8dee9;
}

/* Hàng tiêu đề trang (thay thanh tab cũ): nằm ngoài card, trên nền trang; tên trang bên trái, các nút thao tác của màn
   (SmartPageActions: Nạp lại, Nhập / Xuất Excel, In, "…", Thêm) bên phải, cỡ gọn.
   Cao 38, đệm trên 6, hai bên 8 — bằng dải tab trang (SmartPageTabs) của màn Người dùng; khung nội dung
   bên dưới cách 6, hai bên 8, đáy 8, các khung xếp chồng cách nhau 8. */
.app-page-head {
    flex: none;
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px 0;
    background: #f4f6fa;
}

/* Màn tự vẽ đầu trang riêng (lớp app-own-head ở khung gốc của màn, vd dải tab của Người dùng) thì ẩn hàng tiêu đề trang. */
#layout-content:has(> .app-page .app-own-head) > .app-page-head {
    display: none;
}

/* Dưới dải tab reuse: hàng tên trang + nút thao tác của màn. Tên trang đứng trước (bên trái, co lại / cắt … khi hẹp), nhóm nút đứng sau và luôn căn phải;
   nhóm nút được ưu tiên chỗ, hẹp quá thì tự cuộn ngang. */
.app-tabs .app-page-head {
    flex-wrap: nowrap;
    align-content: flex-start;
    /* Cao = đệm trên 6 + nút 28, không đệm dưới: khoảng cách dưới hàng nút do khung nội dung bên dưới tạo, bằng khoảng cách trên tới dải tab. */
    box-sizing: border-box;
    height: 34px;
    min-height: 0;
    overflow: hidden;
}

.app-tabs .app-page-head > .app-page-title {
    flex: 1 1 0;
}

.app-tabs .app-page-head > .app-page-actions {
    /* Chừa 6px trên / phải (bù bằng lề âm) để số đếm góc nút (vd số mục Rà soát, lệch -6px ra ngoài nút) không bị vùng cuộn cắt mất; nút vẫn đứng yên vị trí. */
    padding: 6px 6px 0 0;
    margin: -6px -6px 0 auto;
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
}

.app-tabs .app-page-head:not(:has(.app-page-title)):not(:has(.app-page-actions > *)) {
    display: none;
}

.app-page-title {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-page-actions {
    flex: none;
    display: flex;
    align-items: center;
    gap: 6px;
    /* Bảng màu chung của các màn (như .sm-page.ob) để nút của màn đưa lên đây vẫn đúng màu. */
    --bg: #f4f6fa;
    --card: #fff;
    --sh-md: 0 4px 16px rgba(16, 24, 40, .10);
    --line: #e6eaf1;
    --line-hover: #d8dee9;
    --txt: #1f2937;
    --txt2: #5b6577;
    --pri: #2563eb;
    --pri-hover: #1d4ed8;
    --ok: #16a34a;
    --ok-strong: #15803d;
    --dan: #dc2626;
    --dan-soft: #fdecec;
    --dan-line: #f3c7c7;
    --r-sm: 7px;
    font: 14px/1.5 Inter, "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

/* Nút trên hàng tiêu đề gọn lại (cao 28, chữ 12.5) bất kể kiểu nút của từng màn — chọn qua #layout-content để thắng CSS cô lập của màn. */
#layout-content .app-page-actions :is(button, a) {
    height: 28px;
    min-height: 28px;
    font-size: 14px;
    border-radius: 7px;
}

#layout-content .app-page-actions :is(button, a) > svg {
    width: 13px;
    height: 13px;
}

/* Vùng trang: cao xác định (phần còn lại sau thanh trên + hàng tiêu đề trang), nên khung gốc của màn đặt height: 100% là vừa đúng.
   Màn danh sách: khung gốc height: 100% + min-height: 0 + flex dọc, chỉ vùng dòng bảng cuộn — trang không có thanh cuộn dọc.
   Form nhập liệu / báo cáo dài / tổng quan để cao tự nhiên, khung này tự cuộn. */
.app-page {
    flex: 1;
    min-height: 0;
    height: 100%;
    overflow: auto;
    background: #f4f6fa;
}

/* ===== Bộ lớp màn danh sách cao vừa màn hình (dùng khi CSS riêng của màn khó đặt) =====
   lf-root: khung gốc của màn (con trực tiếp của .app-page) — cao đúng vùng trang, xếp dọc, không tự cuộn.
   lf-fill: khối giãn hết phần còn lại (khung bọc, card bảng) — xếp dọc, được co dưới chiều cao nội dung.
   lf-scroll: vùng dòng của bảng — giãn hết phần còn lại, tự cuộn hai chiều (tiêu đề cột .g.thead dính trên, dòng tổng .g.tsum dính dưới).
   lf-none: thanh công cụ, hàng tiêu đề, phân trang — giữ cao theo nội dung. */
.lf-root {
    box-sizing: border-box;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.lf-fill {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.lf-scroll {
    flex: 1 1 0;
    min-height: 0;
    overflow: auto;
}

.lf-scroll > .g.thead {
    position: sticky;
    top: 0;
    z-index: 4;
}

.lf-scroll > .g.tsum {
    position: sticky;
    bottom: 0;
    z-index: 3;
}

.lf-none {
    flex: none;
}

.app-denied {
    margin: 24px;
    padding: 16px 18px;
    border: 1px solid var(--st-border);
    border-radius: 10px;
    background: #fff;
    color: #5b6577;
}

/* Khung gốc của từng màn trong tab trong suốt để lộ nền chung (như .tabs-body-content cũ). */
.app-content .stab-pane > *,
.app-content .stab-pane > * > .ob-wrap,
.app-content .stab-pane > .nxt > .wrap {
    background-color: transparent;
}


/* Thanh nút đáy form chứng từ (…-act): khi bên phải không còn nút thao tác nào (vd đơn đã hoàn thành),
   đẩy cụm In / Nhân bản / Lịch sử sang phải và bỏ các khoảng đệm (…-grow) đang chiếm chỗ. */
:has(> .ob-btn.histfill):not(:has(> [class$="-grow"] ~ .ob-btn)) > [class$="-grow"] {
    display: none;
}

:has(> .ob-btn.histfill):not(:has(> [class$="-grow"] ~ .ob-btn)) > :is(.printfill, .dupfill, .histfill):not(:is(.printfill, .dupfill, .histfill) ~ *) {
    margin-left: auto;
}

/* Bảng chi tiết dưới danh sách (sau nút thu / mở chi tiết): dòng Cộng (tfoot) dính đáy vùng cuộn, như dòng Tổng cộng của bảng danh sách. */
:is(.sdt-dock, .us-dt-dock) ~ * tfoot > tr > :is(td, th) {
    position: sticky;
    bottom: 0;
    /* trên mọi ô thân bảng (kể cả ô cột # / Chức năng ghim của các dòng cuộn qua, z 2), dưới ô đang mở menu (z 60) */
    z-index: 55;
}

/* Ô dòng Cộng nằm ở cột ghim (# / Chức năng): lt-grid đặt z 5 — nâng lên trên các ô dòng Cộng khác khi cuộn ngang. */
:is(.sdt-dock, .us-dt-dock) ~ * table[data-lt-id][data-lt-id][data-lt-id] > tfoot > tr > :is(td, th):is(.c-idx, [data-lt-ci="0"]) {
    z-index: 56;
}

/* Nền mặc định cho ô dòng Cộng khi trang chưa đặt (độ ưu tiên 0, nền riêng của trang vẫn thắng) — dính đáy cần nền đặc để không lộ dòng phía sau. */
:where(.sdt-dock, .us-dt-dock) ~ * :where(tfoot > tr > td, tfoot > tr > th) {
    background-color: #eef2f7;
}

/* Ô # của dòng Cộng (bảng chi tiết): luôn trên ô # của các dòng cuộn qua (lt-grid / sm-page đặt z 1–5) và cùng nền với dòng Cộng, không lộ số thứ tự phía sau. */
:is(.sdt-dock, .us-dt-dock) ~ * tfoot > tr > :is(td, th).c-idx {
    z-index: 56 !important;
    background-color: var(--lt-row-bg, #eef2f7) !important;
}

/* Nhãn nhỏ cạnh tên mục menu (vd "beta") */
.menu-badge {
    margin-left: 4px;
    padding: 0 4px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    line-height: 13px;
    letter-spacing: .02em;
    text-transform: lowercase;
    color: #b45309;
    background: #fef3c7;
    vertical-align: super;
}

/* Mã trong ô bảng / lưới: chip nền xanh nhạt đứng trước tên (thay cho "MÃ - Tên") */
.code-chip {
    display: inline-block;
    margin-right: 6px;
    padding: 0 7px;
    border-radius: 5px;
    background: #eef4ff;
    color: #1e40af;
    font-weight: 600;
    font-size: 14px;
    line-height: 20px;
    vertical-align: middle;
    white-space: nowrap;
}

/* Màn rộng (>= 1920px): phóng cả giao diện 15/14 để chữ tăng một cỡ (14px -> 15px) */
@media (min-width: 1920px) {
    html {
        zoom: 1.0714;
    }
}

/* Nút Xuất Excel của báo cáo (pa-btn pa-excel): nền xanh lá Excel #16a34a chữ trắng; biểu tượng xl-ic giữ ô trắng, dấu X xanh */
#layout-content .pa-btn.pa-btn.pa-excel {
    border-color: #16a34a;
    background: #16a34a;
    color: #fff;
}

#layout-content .pa-btn.pa-btn.pa-excel:hover:not(:disabled) {
    border-color: #15803d;
    background: #15803d;
    color: #fff;
}

#layout-content .pa-btn.pa-excel > svg {
    color: #fff;
}

#layout-content .pa-btn.pa-excel > svg.xl-ic [stroke="#fff"] {
    stroke: #16a34a;
}

#layout-content .pa-btn.pa-excel:hover:not(:disabled) > svg.xl-ic [stroke="#fff"] {
    stroke: #15803d;
}
