/* input(1177,24): run-time error CSS1035: Expected colon, found 'thead'
input: run-time error CSS1066: Unexpected end of file encountered */
/* =======================================================
   SPA NAVY – THEME SYSTEM
   Biến màu dùng chung toàn hệ thống
   ======================================================= */

:root {
    --hth-input-border: #e4e8f0;
    --hth-input-bg: #fafbff;
    --hth-input-radius: 9px;
}

/* ── Theme mặc định (HTH Blue – màu hiện tại) ── */
:root,
[data-hth-theme="default"] {
    --hth-primary: #1e5d8a;
    --hth-primary-hover: #154e76;
    --hth-primary-active: #103b5a;
    --hth-primary-light: rgba(30, 93, 138, 0.08);
    --hth-primary-light-15: rgba(30, 93, 138, 0.15);
    --hth-primary-gradient-end: #1e5d8a;
    --hth-table-header: #115f98;
    --hth-table-header-end: #115f98;
    --hth-header-start: #0a3d62;
    --hth-header-end: #1a6aab;
    --hth-background: #f3f3f9;
    --hth-card: #ffffff;
    --hth-sidebar: #0a3d62;
    --hth-sidebar-dropdown: #062a45;
    --hth-sidebar-text: rgba(255, 255, 255, 0.80);
    --hth-sidebar-text-muted: rgba(255, 255, 255, 0.38);
    --hth-sidebar-text-hover: #ffffff;
    --hth-sidebar-hover-bg: rgba(255, 255, 255, 0.09);
    --hth-sidebar-active-bg: rgba(255, 255, 255, 0.13);
    --hth-sidebar-divider: rgba(255, 255, 255, 0.1);
    --hth-sidebar-brand: #ffffff;
    --hth-sidebar-brand-sub: rgba(255, 255, 255, 0.45);
    --hth-sidebar-logo-border: rgba(255, 255, 255, 0.2);
    --hth-sidebar-light: 0;
    --hth-border: #e2e8f0;
    --hth-divider: rgba(226, 232, 240, 0.6);
    --hth-success: #10b981;
    --hth-success-dark: #059669;
    --hth-success-darker: #047857;
    --hth-warning: #f59e0b;
    --hth-danger: #ef4444;
    --hth-danger-dark: #b91c1c;
    --hth-text: #1e293b;
    --hth-text-secondary: #475569;
    --hth-text-muted: #64748b;
    --hth-info: #299cdb;
    --hth-pagination-color: #258cd6;
    --hth-pagination-border: rgb(133, 190, 229);
    --hth-pagination-hover-bg: rgba(37, 140, 214, 0.10);
    --hth-pagination-active-bg: #258cd6;
    --hth-pagination-active-color: #ffffff;
    --hth-pagination-focus-ring: rgba(37, 140, 214, 0.15);
    --hth-topbar-bg: rgba(255, 255, 255, 0.85);
    --hth-topbar-border: rgba(226, 232, 240, 0.8);
    --hth-fixed-col-bg: #f0f4f8;
    --hth-select2-tag: rgb(9, 61, 97);
    --hth-modal-body-bg: #f3f3f9;
    --hth-tab-active: #478cd1;
    --hth-shadow-primary: rgba(10, 61, 98, 0.2);
    --hth-shadow-primary-hover: rgba(10, 61, 98, 0.3);
    --hth-shadow-primary-light: rgba(10, 61, 98, 0.08);

    --vz-primary: #0a3d62;
    --vz-success: #10b981;
    --vz-warning: #f59e0b;
    --vz-danger: #ef4444;
    --vz-body-bg: #f3f3f9;
}

[data-hth-theme="xanh-trang"] {
    /* Palette gốc: #5D887B */
    --hth-base: #456860;
    --hth-primary: #5D887B;
    --hth-primary-hover: #527a6e;
    --hth-primary-active: #476b60;
    --hth-primary-light: rgba(93, 136, 123, 0.10);
    --hth-primary-light-15: rgba(93, 136, 123, 0.16);
    --hth-primary-gradient-end: #7ba396;
    --hth-table-header: #638f82;
    --hth-table-header-end: #7ba396;
    --hth-header-start: #638f82;
    --hth-header-end: #7ba396;
    --hth-background: #f8fbfa;
    --hth-card: #ffffff;
    --hth-sidebar: #456860;
    --hth-sidebar-dropdown: #3a5750;
    --hth-sidebar-text: rgba(255, 255, 255, 0.85);
    --hth-sidebar-text-muted: rgba(255, 255, 255, 0.45);
    --hth-sidebar-text-hover: #ffffff;
    --hth-sidebar-hover-bg: #527a6e;
    --hth-sidebar-active-bg: #5D887B;
    --hth-sidebar-divider: rgba(255, 255, 255, 0.15);
    --hth-sidebar-brand: #ffffff;
    --hth-sidebar-brand-sub: rgba(255, 255, 255, 0.55);
    --hth-sidebar-logo-border: rgba(255, 255, 255, 0.25);
    --hth-sidebar-light: 0;
    --hth-border: #e5ece8;
    --hth-divider: rgba(229, 236, 232, 0.8);
    --hth-success: #5D887B;
    --hth-success-dark: #527a6e;
    --hth-success-darker: #476b60;
    --hth-warning: #f4b740;
    --hth-danger: #e85a5a;
    --hth-danger-dark: #d64545;
    --hth-text: #2d3a36;
    --hth-text-secondary: #5a6b65;
    --hth-text-muted: #8a9a94;
    --hth-info: #6d9989;
    --hth-pagination-color: #5D887B;
    --hth-pagination-border: rgba(93, 136, 123, 0.35);
    --hth-pagination-hover-bg: rgba(93, 136, 123, 0.10);
    --hth-pagination-active-bg: #5D887B;
    --hth-pagination-active-color: #ffffff;
    --hth-pagination-focus-ring: rgba(93, 136, 123, 0.16);
    --hth-topbar-bg: rgba(248, 251, 250, 0.92);
    --hth-topbar-border: rgba(229, 236, 232, 0.9);
    --hth-fixed-col-bg: #f0f5f3;
    --hth-select2-tag: #5D887B;
    --hth-modal-body-bg: #f8fbfa;
    --hth-tab-active: #5D887B;
    --hth-shadow-primary: rgba(93, 136, 123, 0.22);
    --hth-shadow-primary-hover: rgba(93, 136, 123, 0.32);
    --hth-shadow-primary-light: rgba(93, 136, 123, 0.10);
    --vz-primary: #5D887B;
    --vz-success: #5D887B;
    --vz-warning: #f4b740;
    --vz-danger: #e85a5a;
    --vz-body-bg: #f8fbfa;
}

[data-hth-theme="hong-nude"] {
    --hth-primary: #d69ca8;
    --hth-primary-hover: #c98897;
    --hth-primary-active: #bc7687;
    --hth-primary-light: #f8e8ec;
    --hth-primary-light-15: rgba(214, 156, 168, 0.15);
    --hth-primary-gradient-end: #c98897;
    --hth-table-header: #d69ca8;
    --hth-table-header-end: #d69ca8;
    --hth-header-start: #d69ca8;
    --hth-header-end: #c98897;
    --hth-background: #fff8f9;
    --hth-card: #ffffff;
    --hth-sidebar: #f7ecef;
    --hth-sidebar-dropdown: #f4ebee;
    --hth-sidebar-text: #403a3d;
    --hth-sidebar-text-muted: #7d7074;
    --hth-sidebar-text-hover: #403a3d;
    --hth-sidebar-hover-bg: rgba(214, 156, 168, 0.12);
    --hth-sidebar-active-bg: rgba(214, 156, 168, 0.2);
    --hth-sidebar-divider: #f4ebee;
    --hth-sidebar-brand: #403a3d;
    --hth-sidebar-brand-sub: #7d7074;
    --hth-sidebar-logo-border: rgba(214, 156, 168, 0.35);
    --hth-sidebar-light: 1;
    --hth-border: #ecdde2;
    --hth-divider: #f4ebee;
    --hth-success: #4caf50;
    --hth-success-dark: #43a047;
    --hth-success-darker: #388e3c;
    --hth-warning: #f4b740;
    --hth-danger: #e85a5a;
    --hth-danger-dark: #d64545;
    --hth-text: #403a3d;
    --hth-text-secondary: #7d7074;
    --hth-text-muted: #a8989c;
    --hth-info: #d69ca8;
    --hth-pagination-color: #d69ca8;
    --hth-pagination-border: #ecdde2;
    --hth-pagination-hover-bg: rgba(214, 156, 168, 0.12);
    --hth-pagination-active-bg: var(--hth-primary);
    --hth-pagination-active-color: #ffffff;
    --hth-pagination-focus-ring: rgba(214, 156, 168, 0.2);
    --hth-topbar-bg: rgba(255, 248, 249, 0.92);
    --hth-topbar-border: rgba(236, 221, 226, 0.9);
    --hth-fixed-col-bg: #fdf5f7;
    --hth-select2-tag: #d69ca8;
    --hth-modal-body-bg: #fff8f9;
    --hth-tab-active: #d69ca8;
    --hth-shadow-primary: rgba(214, 156, 168, 0.25);
    --hth-shadow-primary-hover: rgba(214, 156, 168, 0.35);
    --hth-shadow-primary-light: rgba(214, 156, 168, 0.1);
    --vz-primary: #d69ca8;
    --vz-success: #4caf50;
    --vz-warning: #f4b740;
    --vz-danger: #e85a5a;
    --vz-body-bg: #fff8f9;
}

body {
    background-color: var(--hth-background) !important;
    color: var(--hth-text);
}

.card {
    background-color: var(--hth-card) !important;
    border-color: var(--hth-border) !important;
}

.navbar-menu {
    background: linear-gradient(135deg, var(--hth-sidebar) 0%, var(--hth-sidebar) 100%) !important;
}

.menu-dropdown {
    background: var(--hth-sidebar-dropdown) !important;
}

.navbar-menu .navbar-nav .nav-link {
    color: var(--hth-sidebar-text) !important;
}

.navbar-menu .navbar-nav .nav-link:hover {
    color: var(--hth-sidebar-text-hover) !important;
}

.navbar-menu .navbar-nav .nav-link.flat-parent-link {
    color: var(--hth-sidebar-text) !important;
}

.navbar-menu .navbar-nav .nav-link.flat-parent-link:hover {
    background: var(--hth-sidebar-hover-bg) !important;
    color: var(--hth-sidebar-text-hover) !important;
}

.navbar-menu .navbar-nav .nav-link.flat-parent-link.active,
.navbar-menu .navbar-nav .nav-link.flat-parent-link.active-menu-parent {
    background: var(--hth-sidebar-active-bg) !important;
    color: var(--hth-sidebar-text-hover) !important;
}

.sidebar-flat-children .nav-item .flat-child-link {
    color: var(--hth-sidebar-text) !important;
    font-weight: 400 !important;
}

.sidebar-flat-children .nav-item .flat-child-link span {
    font-weight: 400 !important;
    background: transparent !important;
}

.sidebar-flat-children .nav-item .flat-child-link:hover {
    background: var(--hth-sidebar-hover-bg) !important;
    color: var(--hth-sidebar-text-hover) !important;
}

.sidebar-flat-children .nav-item .flat-child-link.active,
.sidebar-flat-children .nav-item .flat-child-link.active-menu-child {
    background: var(--hth-sidebar-active-bg) !important;
    color: var(--hth-sidebar-text-hover) !important;
    font-weight: 400 !important;
}

.sidebar-flat-children .nav-item .flat-child-link.active span,
.sidebar-flat-children .nav-item .flat-child-link.active-menu-child span {
    background: transparent !important;
    font-weight: 400 !important;
}

.sidebar-section-header {
    color: var(--hth-sidebar-text-muted) !important;
}

.sidebar-brand-name {
    color: var(--hth-sidebar-brand) !important;
}

.sidebar-brand-sub {
    color: var(--hth-sidebar-brand-sub) !important;
}

.sidebar-logo-circle {
    border-color: var(--hth-sidebar-logo-border) !important;
}

.sidebar-divider {
    border-top-color: var(--hth-sidebar-divider) !important;
}

#page-topbar {
    background: var(--hth-topbar-bg) !important;
    border-bottom-color: var(--hth-topbar-border) !important;
}

html body .table-default-thead-bg,
html body .dataTables_wrapper thead,
html body .DTFC_LeftHeadWrapper thead,
html body .DTFC_RightHeadWrapper thead,
html body .dataTables_scrollHead thead,
html body table:not(.no-custom-header) thead,
.table-default-thead-bg,
.dataTables_wrapper thead,
.DTFC_LeftHeadWrapper thead,
.DTFC_RightHeadWrapper thead {
    background: linear-gradient(135deg, var(--hth-table-header) 0%, var(--hth-table-header-end, var(--hth-table-header)) 100%) !important;
}

html body .table-default-thead-bg tr:not(.filter-row) th,
html body .dataTables_wrapper thead tr:not(.filter-row) th,
html body .DTFC_LeftHeadWrapper thead tr:not(.filter-row) th,
html body .DTFC_RightHeadWrapper thead tr:not(.filter-row) th,
html body .dataTables_scrollHead thead tr:not(.filter-row) th,
html body table:not(.no-custom-header) thead tr:not(.filter-row) th,
.dataTables_wrapper thead tr:not(.filter-row) th,
.DTFC_LeftHeadWrapper thead tr:not(.filter-row) th,
.DTFC_RightHeadWrapper thead tr:not(.filter-row) th {
    background: linear-gradient(135deg, var(--hth-table-header) 0%, var(--hth-table-header-end, var(--hth-table-header)) 100%) !important;
}

.DTFC_LeftBodyWrapper table tbody tr td:first-child,
.DTFC_RightBodyWrapper table tbody tr td:last-child {
    background-color: var(--hth-fixed-col-bg) !important;
}

html body .btn-primary,
html body .btn-add,
html body .btn-outline-primary.btn-add {
    background: var(--hth-primary) !important;
    border-color: var(--hth-primary) !important;
    box-shadow: 0 4px 12px var(--hth-shadow-primary) !important;
}

html body .btn-primary:hover,
html body .btn-add:hover,
html body .btn-outline-primary.btn-add:hover {
    background: var(--hth-primary-hover) !important;
    border-color: var(--hth-primary-hover) !important;
    box-shadow: 0 6px 16px var(--hth-shadow-primary-hover) !important;
}

html body .btn-refresh:hover,
html body .btn-outline-light.btn-refresh:hover {
    border-color: var(--hth-primary) !important;
    color: var(--hth-primary) !important;
    box-shadow: 0 4px 12px var(--hth-shadow-primary-light) !important;
}

html body .btn-toolbar,
html body .btn-outline-light.btn-toolbar {
    border: 1.5px solid var(--hth-border) !important;
    color: var(--hth-text) !important;
    background-color: var(--hth-card) !important;
    background-image: none !important;
    padding: 7px 16px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

html body .btn-toolbar:hover,
html body .btn-outline-light.btn-toolbar:hover,
html body .btn-toolbar:focus,
html body .btn-outline-light.btn-toolbar:focus {
    background-color: var(--hth-primary-light) !important;
    border-color: var(--hth-primary) !important;
    color: var(--hth-primary) !important;
    box-shadow: 0 4px 12px var(--hth-shadow-primary-light) !important;
}

html body .btn-toolbar.show,
html body .btn-outline-light.btn-toolbar.show,
html body .btn-toolbar.active,
html body .btn-outline-light.btn-toolbar.active,
html body .btn-toolbar[aria-expanded="true"],
html body .btn-outline-light.btn-toolbar[aria-expanded="true"] {
    background-color: var(--hth-primary-light) !important;
    border-color: var(--hth-primary) !important;
    color: var(--hth-primary) !important;
    box-shadow: 0 4px 12px var(--hth-shadow-primary-light) !important;
}

html body .btn-toolbar.dropdown-toggle::after {
    border-top-color: currentColor;
    opacity: 0.75;
    margin-left: 0.35em;
}

html body .btn-toolbar i {
    transition: transform 0.2s ease, color 0.2s ease;
}

html body .btn-toolbar:hover i,
html body .btn-toolbar.show i,
html body .btn-toolbar.active i {
    color: var(--hth-primary);
}

html body .btn-success {
    background: linear-gradient(135deg, var(--hth-success) 0%, var(--hth-success-dark) 100%) !important;
}

html body .btn-success:hover {
    background: linear-gradient(135deg, var(--hth-success-dark) 0%, var(--hth-success-darker) 100%) !important;
}

html body .btn-outline-success {
    border-color: var(--hth-success) !important;
    color: var(--hth-success) !important;
}

html body .btn-outline-success:hover {
    background-color: var(--hth-success) !important;
}

html body .btn-delete,
html body .btn-outline-danger.btn-delete,
html body .btn-check-delete-modal.btn-delete {
    background: linear-gradient(135deg, var(--hth-danger-dark) 0%, var(--hth-danger) 100%) !important;
}

html body table.dataTable td a.link-primary {
    background-color: var(--hth-primary-light) !important;
    color: var(--hth-primary) !important;
    border-color: var(--hth-primary-light-15) !important;
}

html body table.dataTable td a.link-primary:hover {
    background-color: var(--hth-primary) !important;
}

html body table.dataTable td a.link-success {
    color: var(--hth-success) !important;
}

html body table.dataTable td a.link-danger {
    color: var(--hth-danger) !important;
}

html body table.dataTable td a.link-warning {
    color: var(--hth-warning) !important;
}

.modal-header:not(.td-modal-header),
.modal-body .card-header:not(.td-card-header):not(.card-header-light) {
    background: linear-gradient(135deg, var(--hth-header-start, var(--hth-primary)) 0%, var(--hth-header-end, var(--hth-primary-gradient-end)) 100%) !important;
}

.td-card-header,
.modal-body .card-header.td-card-header,
.modal-body .card-header.card-header-light {
    background: #f8f9fa !important;
    color: #1a2332 !important;
    border-bottom: 1px solid #e9ecef !important;
}

.td-card-header *,
.card-header.td-card-header * {
    color: #1a2332 !important;
}

.modal-body:not(.td-modal-body) {
    background: var(--hth-modal-body-bg) !important;
}

.active>.page-link,
.page-link.active,
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: var(--hth-pagination-active-bg) !important;
    color: var(--hth-pagination-active-color) !important;
    border-color: var(--hth-pagination-active-bg) !important;
}

.page-link:hover,
.dataTables_wrapper .dataTables_paginate .paginate_button:hover:not(.current):not(.disabled) {
    background: var(--hth-pagination-hover-bg) !important;
    color: var(--hth-pagination-color) !important;
    border-color: var(--hth-pagination-color) !important;
}

/* ── Bootstrap Pagination sync ── */
.pagination {
    --bs-pagination-color: var(--hth-text-secondary);
    --bs-pagination-bg: var(--hth-card);
    --bs-pagination-border-color: var(--hth-border);
    --bs-pagination-hover-color: var(--hth-pagination-color);
    --bs-pagination-hover-bg: var(--hth-pagination-hover-bg);
    --bs-pagination-hover-border-color: var(--hth-pagination-color);
    --bs-pagination-focus-color: var(--hth-pagination-color);
    --bs-pagination-focus-bg: var(--hth-pagination-hover-bg);
    --bs-pagination-focus-box-shadow: 0 0 0 0.2rem var(--hth-pagination-focus-ring);
    --bs-pagination-active-color: var(--hth-pagination-active-color);
    --bs-pagination-active-bg: var(--hth-pagination-active-bg);
    --bs-pagination-active-border-color: var(--hth-pagination-active-bg);
    --bs-pagination-disabled-color: var(--hth-text-muted);
    --bs-pagination-disabled-bg: var(--hth-card);
    --bs-pagination-disabled-border-color: var(--hth-border);
}

html body .page-link {
    border-radius: 8px !important;
    color: var(--hth-text-secondary) !important;
    border-color: var(--hth-border) !important;
    background-color: var(--hth-card) !important;
}

/* ── DataTables Pagination ── */
html body .dataTables_wrapper .dataTables_paginate .paginate_button {
    border: 1px solid var(--hth-border) !important;
    border-radius: 8px !important;
    color: var(--hth-text-secondary) !important;
    background: var(--hth-card) !important;
    background-image: none !important;
    margin: 0 2px !important;
    padding: 6px 12px !important;
    font-size: 13px !important;
    transition: all 0.18s ease !important;
}

html body .dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
html body .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
    background: var(--hth-card) !important;
    color: var(--hth-text-muted) !important;
    border-color: var(--hth-border) !important;
}

/* ── Custom Pagination Bar (nhiều trang dùng chung) ── */
html body #customPaginationBar,
html body .custom-pagination-bar {
    background: var(--hth-card) !important;
    border-color: var(--hth-border) !important;
    color: var(--hth-text) !important;
}

html body #customPaginationBar .pg-left select,
html body .custom-pagination-bar .pg-left select,
html body #customPaginationBar .pg-goto-input,
html body .custom-pagination-bar .pg-goto-input {
    border-color: var(--hth-border) !important;
    background: var(--hth-card) !important;
    color: var(--hth-text) !important;
}

html body #customPaginationBar .pg-left select:focus,
html body .custom-pagination-bar .pg-left select:focus,
html body #customPaginationBar .pg-goto-input:focus,
html body .custom-pagination-bar .pg-goto-input:focus {
    border-color: var(--hth-pagination-color) !important;
    box-shadow: 0 0 0 2px var(--hth-pagination-focus-ring) !important;
}

html body #customPaginationBar .pg-btn,
html body .custom-pagination-bar .pg-btn {
    border-color: var(--hth-border) !important;
    background: var(--hth-card) !important;
    color: var(--hth-text) !important;
}

html body #customPaginationBar .pg-btn:hover:not(.pg-active):not(:disabled),
html body .custom-pagination-bar .pg-btn:hover:not(.pg-active):not(:disabled) {
    background: var(--hth-pagination-hover-bg) !important;
    border-color: var(--hth-pagination-color) !important;
    color: var(--hth-pagination-color) !important;
}

html body #customPaginationBar .pg-btn.pg-active,
html body .custom-pagination-bar .pg-btn.pg-active {
    background: var(--hth-pagination-active-bg) !important;
    color: var(--hth-pagination-active-color) !important;
    border-color: var(--hth-pagination-active-bg) !important;
    box-shadow: 0 2px 8px var(--hth-shadow-primary-light) !important;
}

html body #customPaginationBar .pg-goto-btn,
html body .custom-pagination-bar .pg-goto-btn {
    background: var(--hth-pagination-active-bg) !important;
    color: var(--hth-pagination-active-color) !important;
    border: none !important;
}

html body #customPaginationBar .pg-goto-btn:hover,
html body .custom-pagination-bar .pg-goto-btn:hover {
    background: var(--hth-primary-hover) !important;
    color: var(--hth-pagination-active-color) !important;
}

html body #customPaginationBar .pg-ellipsis,
html body .custom-pagination-bar .pg-ellipsis {
    color: var(--hth-text-muted) !important;
}

.nav-success.nav-tabs-custom .nav-link.active {
    color: var(--hth-tab-active) !important;
}

.nav-success.nav-tabs-custom .nav-link.active::after {
    background-color: var(--hth-tab-active) !important;
}

.text-primary {
    color: var(--hth-primary) !important;
}

.bg-primary {
    background-color: var(--hth-primary) !important;
}

.border-primary {
    border-color: var(--hth-primary) !important;
}

.btn-primary:focus,
.btn-primary:active {
    background-color: var(--hth-primary-active) !important;
}

.spinner-border.text-primary {
    color: var(--hth-primary) !important;
}

.theme-picker-modal .modal-content {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--hth-border);
}

.theme-picker-modal .modal-header {
    border-bottom: 1px solid var(--hth-divider);
}

.theme-picker-modal .modal-body {
    background: var(--hth-card) !important;
    padding: 1.5rem;
}

.theme-option {
    border: 2px solid var(--hth-border);
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--hth-card);
    position: relative;
}

.theme-option:hover {
    border-color: var(--hth-primary);
    box-shadow: 0 4px 16px var(--hth-shadow-primary-light);
    transform: translateY(-2px);
}

.theme-option.active {
    border-color: var(--hth-primary);
    box-shadow: 0 0 0 3px var(--hth-primary-light);
}

.theme-option-preview {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}

.theme-option-preview span {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.theme-option-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--hth-text);
    margin-bottom: 2px;
}

.theme-option-desc {
    font-size: 12px;
    color: var(--hth-text-secondary);
}

.theme-check-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    color: var(--hth-primary);
    font-size: 20px;
    opacity: 0;
    transition: opacity 0.2s;
}

.theme-option.active .theme-check-icon {
    opacity: 1;
}

/* =======================================================
   FORM CONTROLS – System-wide (Calendar style)
   ======================================================= */
html body .form-label {
    font-size: 12.5px;
    font-weight: 600 !important;
    color: var(--hth-text);
    margin-bottom: 5px;
}

html body .form-control,
html body .form-select {
    border-radius: var(--hth-input-radius);
    border: 1.5px solid var(--hth-input-border);
    font-size: 13.5px;
    padding: 9px 13px;
    transition: border-color .2s, box-shadow .2s;
    background-color: var(--hth-input-bg);
}

html body .form-control-sm,
html body .form-select-sm {
    border-radius: 8px;
    font-size: 13px;
    padding: 6px 10px;
}

html body .form-control:focus,
html body .form-select:focus {
    border-color: var(--hth-primary) !important;
    box-shadow: 0 0 0 3px var(--hth-primary-light-15) !important;
    background-color: var(--hth-card) !important;
    outline: none;
}

html body .input-group:focus-within>.form-control,
html body .input-group:focus-within>.form-select,
html body .input-group:focus-within>.input-group-text {
    border-color: var(--hth-primary) !important;
}

html body .input-group:focus-within {
    box-shadow: 0 0 0 3px var(--hth-primary-light-15);
    border-radius: var(--hth-input-radius);
}

html body .input-group:focus-within>.form-control:focus,
html body .input-group:focus-within>.form-select:focus {
    box-shadow: none !important;
}

html body textarea.form-control {
    resize: vertical;
    min-height: 72px;
}

html body .form-control:disabled,
html body .form-select:disabled {
    background-color: #eff2f7;
}

/* Select2 – single */
html body .select2-container--default .select2-selection--single {
    height: 42px;
    border: 1.5px solid var(--hth-input-border) !important;
    border-radius: var(--hth-input-radius) !important;
    background: var(--hth-input-bg) !important;
    display: flex;
    align-items: center;
    transition: border-color .2s, box-shadow .2s;
    padding: 0;
}

html body .select2-container--default.select2-container--open .select2-selection--single,
html body .select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--hth-primary) !important;
    box-shadow: 0 0 0 3px var(--hth-primary-light-15) !important;
    outline: none;
}

html body .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 40px !important;
    font-size: 13.5px !important;
    color: #495057;
    padding-left: 11px;
}

html body .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px;
    top: 0;
}

/* Select2 – multiple */
html body .select2-container--default .select2-selection--multiple {
    border: 1.5px solid var(--hth-input-border) !important;
    border-radius: var(--hth-input-radius) !important;
    background: var(--hth-input-bg) !important;
    min-height: 42px;
    padding: 3px 6px 3px 6px;
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
}

html body .select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: var(--hth-primary) !important;
    box-shadow: 0 0 0 3px var(--hth-primary-light-15) !important;
    outline: none;
}

html body .select2-container--default .select2-selection--multiple .select2-selection__rendered {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    align-items: center !important;
    gap: 3px !important;
    padding: 2px 4px !important;
    margin: 0 !important;
    line-height: 1.4 !important;
    font-size: 13.5px !important;
    list-style: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
    -ms-overflow-style: none !important; /* IE and Edge */
    scrollbar-width: none !important; /* Firefox */
}

html body .select2-container--default .select2-selection--multiple .select2-selection__rendered::-webkit-scrollbar {
    display: none !important; /* Chrome, Safari, Opera */
}

/* Select2 4.1.x – multiple choice tag */
html body .select2-container--default .select2-selection--multiple .select2-selection__choice {
    background: var(--hth-select2-tag) !important;
    border: 1px solid var(--hth-primary-active) !important;
    border-radius: 6px !important;
    color: #fff !important;
    font-size: 12.5px !important;
    padding: 3px 8px 3px 26px !important; /* left: nhường cho nút x 16px + gap 5px + lề 5px */
    margin: 2px 3px 2px 0 !important;
    position: relative !important;
    display: inline-block !important;
    line-height: 1.4 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 250px !important;
    vertical-align: middle !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
}

/* Nút x – absolute bên trái, giữ nguyên vị trí */
html body .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    position: absolute !important;
    left: 5px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 16px !important;
    height: 16px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.25) !important;
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 12px !important;
    line-height: 1 !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    transition: background .15s, color .15s !important;
    z-index: 1 !important;
}

html body .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    background: rgba(255, 255, 255, 0.48) !important;
    color: #fff !important;
}

/* Text display trong choice (Select2 4.1.x) */
html body .select2-container--default .select2-selection--multiple .select2-selection__choice__display {
    display: inline !important;
    white-space: nowrap !important;
}

html body .select2-container--default .select2-selection--multiple .select2-search--inline {
    display: inline-flex !important;
    flex-grow: 1 !important;
    flex-shrink: 0 !important;
    min-width: 50px !important;
    margin: 0 !important;
    align-items: center !important;
}

html body .select2-container--default .select2-selection--multiple .select2-search__field {
    font-size: 13px;
    color: #495057;
    width: 100% !important;
    min-width: 30px !important;
    margin: 0 !important;
    border: none !important;
    outline: none !important;
    background: transparent !important;
}

/* Select2 – dropdown */
html body .select2-dropdown {
    border: 1.5px solid var(--hth-primary) !important;
    border-radius: var(--hth-input-radius) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
    font-size: 13.5px;
}

html body .select2-container--default .select2-results__option--highlighted[aria-selected],
html body .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: var(--hth-primary) !important;
    color: #fff !important;
}

html body .select2-container--default .select2-results__option[aria-selected=true]:hover {
    background-color: var(--hth-primary) !important;
}

/* ===== macOS / MacBook-style zoom animation for Bootstrap Modals ===== */
.modal.fade .modal-dialog {
    transition: transform 0.2s cubic-bezier(0.34, 1.3, 0.64, 1), opacity 0.15s ease-out !important;
    transform: scale(0.02) !important;
    opacity: 0 !important;
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.modal.show .modal-dialog,
.modal.fade.show .modal-dialog {
    transform: scale(1) !important;
    opacity: 1 !important;
}

/* ===== Global Premium Modal Styles (from TiepDon) ===== */
.modal-content {
    border: none !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18) !important;
}

.td-modal-header {
    background: var(--hth-card) !important;
    padding: 18px 24px 16px !important;
    border-bottom: 1px solid var(--hth-border) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
}

.td-modal-header-icon {
    width: 40px !important;
    height: 40px !important;
    border-radius: 10px !important;
    background: var(--hth-primary-light) !important;
    color: var(--hth-primary) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 20px !important;
    flex-shrink: 0 !important;
}

.td-modal-header-icon-danger,
.td-modal-header-icon.danger {
    background: rgba(240, 101, 72, .12) !important;
    color: #f06548 !important;
}

.td-modal-title {
    color: var(--hth-text) !important;
    font-size: 16px !important;
    font-weight: 600 !important;
}

.td-modal-sub {
    color: var(--hth-text-secondary) !important;
    font-size: 12px !important;
    margin-top: 2px !important;
}

.td-modal-header .btn-close {
    width: 34px !important;
    height: 34px !important;
    border-radius: 9px !important;
    background-color: var(--hth-primary-light) !important;
    background-image: none !important;
    --bs-btn-close-bg: none !important;
    --vz-btn-close-bg: none !important;
    opacity: 1 !important;
    filter: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
    position: relative !important;
    border: 1px solid var(--hth-primary-light-15) !important;
    transition: background-color .2s ease, border-color .2s ease, transform .3s cubic-bezier(0.34, 1.4, 0.64, 1) !important;
}

.td-modal-header .btn-close::after {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    margin: auto !important;
    width: 0.85em !important;
    height: 0.85em !important;
    background-color: var(--hth-primary) !important;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3E%3C/svg%3E") !important;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3E%3C/svg%3E") !important;
    -webkit-mask-repeat: no-repeat !important;
    mask-repeat: no-repeat !important;
    -webkit-mask-position: center !important;
    mask-position: center !important;
    -webkit-mask-size: contain !important;
    mask-size: contain !important;
    pointer-events: none !important;
}

.td-modal-header .btn-close:hover {
    background-color: var(--hth-primary-light-15) !important;
    border-color: var(--hth-primary) !important;
    transform: rotate(90deg) !important;
}

.td-modal-header .btn-close:focus {
    box-shadow: 0 0 0 3px var(--hth-primary-light-15) !important;
}

.td-modal-body {
    background: var(--hth-modal-body-bg, #f8f9fc) !important;
    padding: 20px 24px !important;
}

.td-modal-footer {
    background: var(--hth-card) !important;
    border-top: 1px solid var(--hth-border) !important;
    padding: 14px 24px !important;
}

/* ===== Reusable Premium DataTable Styling (from TiepDon) ===== */
.premium-datatable-wrap .dataTables_scrollHead thead tr th,
.premium-datatable-wrap .DTFC_LeftHeadWrapper thead tr th,
.premium-datatable-wrap .DTFC_RightHeadWrapper thead tr th,
.premium-datatable-wrap table.dataTable thead tr th,
.premium-datatable-wrap table:not(.no-custom-header) thead tr th,
table.premium-datatable thead tr th {
    background: var(--hth-primary) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
    padding: 10px 10px !important;
    vertical-align: middle !important;
    white-space: nowrap;
    letter-spacing: 0;
    text-transform: none;
    box-sizing: border-box !important;
}

.premium-datatable-wrap .dataTables_scrollHead,
.premium-datatable-wrap .DTFC_LeftHeadWrapper,
.premium-datatable-wrap .DTFC_RightHeadWrapper,
.premium-datatable-wrap thead,
table.premium-datatable thead {
    background: var(--hth-primary) !important;
}

/* Fix DataTables scrollX outer container double scroll & column sync */
.table-card,
.table-responsive:has(.dataTables_wrapper),
.card-body-table:has(.dataTables_wrapper) {
    overflow-x: visible !important;
}

.dataTables_wrapper {
    width: 100% !important;
    overflow-x: hidden !important;
}

.dataTables_scroll {
    width: 100% !important;
}

.dataTables_scrollHead {
    overflow: hidden !important;
    width: 100% !important;
}

.dataTables_scrollBody {
    overflow-x: auto !important;
    overflow-y: visible !important;
    width: 100% !important;
}

/* ===== Mã trong bảng (mã cơ sở, mã order, mã phiếu thu, mã voucher…) =====
   Dùng chung: <span class="hth-code">DN-HC</span>
   Bọc trong <a> thì tự có hiệu ứng hover. Màu theo theme (--hth-primary). */
.hth-code {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid #dbe3ec;
    border: 1px solid color-mix(in srgb, var(--hth-primary, #1e5d8a) 20%, #e2e8f0);
    background: #f5f8fb;
    background: color-mix(in srgb, var(--hth-primary, #1e5d8a) 5%, #ffffff);
    color: var(--hth-primary-active, #103b5a);
    font-family: ui-monospace, "Cascadia Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace !important;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: .02em;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

a .hth-code,
a.hth-code {
    cursor: pointer;
}

a:hover .hth-code,
a.hth-code:hover {
    border-color: var(--hth-primary, #1e5d8a);
    background: var(--hth-primary, #1e5d8a);
    color: #fff;
}
/* Đặt ở đây (trước khối .dataTables_scrollBody thead th bên dưới) vì khối đó đang
   thiếu dấu '}' nên mọi rule phía sau bị trình duyệt hiểu là CSS lồng và không có hiệu lực. */

.dataTables_scrollBody thead,
.dataTables_scrollBody thead tr,
.DTFC_LeftBodyWrapper thead tr,
.DTFC_RightBodyWrapper thead tr {
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 0 !important;
}

.dataTables_scrollBody thead th,
.dataTables_scrollBody thead td,
.DTFC_LeftBodyWrapper thead th,
.DTFC_LeftBodyWrapper thead td,
.DTFC_RightBodyWrapper thead th,
.DTFC_RightBodyWrapper thead td {
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    border-top: none !important;
    border-bottom: none !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    line-height: 0 !important;
    font-size: 0 !important;
    visibility: hidden !important;
    box-sizing: border-box !important;
.dataTables_scrollBody thead tr th *,
.dataTables_scrollBody thead tr td *,
.dataTables_scrollBody thead tr th::before,
.dataTables_scrollBody thead tr th::after,
.DTFC_LeftBodyWrapper thead tr th::before,
.DTFC_LeftBodyWrapper thead tr th::after,
.DTFC_RightBodyWrapper thead tr th::before,
.DTFC_RightBodyWrapper thead tr th::after {
    display: none !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

.premium-datatable-wrap table.dataTable tbody td,
.premium-datatable-wrap .td-data-table tbody td,
table.premium-datatable tbody td {
    font-size: 13px !important;
    color: var(--hth-text, #495057) !important;
    border-color: #e9ecef !important;
    padding: 10px 10px !important;
    vertical-align: middle !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
}

table.dataTable tbody td > *,
.td-data-table tbody td > *,
.table tbody td > * {
    max-width: 100%;
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    display: inline-block;
    vertical-align: middle;
}

.premium-datatable-wrap table.dataTable tbody tr:hover td,
.premium-datatable-wrap .td-data-table tbody tr:hover td,
table.premium-datatable tbody tr:hover td {
    background-color: #fafbfc !important;
}

/* Sorting arrows styling */
.premium-datatable-wrap .dataTables_scrollHead thead tr:not(.filter-row) th.sorting::before,
.premium-datatable-wrap .dataTables_scrollHead thead tr:not(.filter-row) th.sorting::after,
.premium-datatable-wrap .dataTables_scrollHead thead tr:not(.filter-row) th.sorting_asc::before,
.premium-datatable-wrap .dataTables_scrollHead thead tr:not(.filter-row) th.sorting_asc::after,
.premium-datatable-wrap .dataTables_scrollHead thead tr:not(.filter-row) th.sorting_desc::before,
.premium-datatable-wrap .dataTables_scrollHead thead tr:not(.filter-row) th.sorting_desc::after,
table.premium-datatable thead tr:not(.filter-row) th.sorting::before,
table.premium-datatable thead tr:not(.filter-row) th.sorting::after,
table.premium-datatable thead tr:not(.filter-row) th.sorting_asc::before,
table.premium-datatable thead tr:not(.filter-row) th.sorting_asc::after,
table.premium-datatable thead tr:not(.filter-row) th.sorting_desc::before,
table.premium-datatable thead tr:not(.filter-row) th.sorting_desc::after {
    opacity: 0.45;
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 0.8em;
}

.premium-datatable-wrap .dataTables_scrollHead thead tr:not(.filter-row) th.sorting_asc::before,
.premium-datatable-wrap .dataTables_scrollHead thead tr:not(.filter-row) th.sorting_desc::after,
table.premium-datatable thead tr:not(.filter-row) th.sorting_asc::before,
table.premium-datatable thead tr:not(.filter-row) th.sorting_desc::after {
    opacity: 1 !important;
    color: #ffffff !important;
    font-size: 0.9em;
}

.premium-datatable-wrap .dataTables_scrollHead thead tr:not(.filter-row) th:hover::before,
.premium-datatable-wrap .dataTables_scrollHead thead tr:not(.filter-row) th:hover::after,
table.premium-datatable thead tr:not(.filter-row) th:hover::before,
table.premium-datatable thead tr:not(.filter-row) th:hover::after {
    opacity: 0.85;
    color: #ffffff !important;
}

/* Hide sorting icons specifically for the filter row */
.premium-datatable-wrap table.dataTable thead tr.filter-row th::after,
.premium-datatable-wrap table.dataTable thead tr.filter-row th::before,
table.premium-datatable thead tr.filter-row th::after,
table.premium-datatable thead tr.filter-row th::before {
    display: none !important;
}

/* ===== System-wide link color matching primary HTH colors ===== */
a:not(.btn):not(.nav-link):not(.dropdown-item):not(.page-link):not(.btn-close):not(.list-inline-item a) {
    color: var(--hth-primary, #0a3d62);
    text-decoration: none;
    transition: color 0.15s ease-in-out;
}

a:not(.btn):not(.nav-link):not(.dropdown-item):not(.page-link):not(.btn-close):not(.list-inline-item a):hover {
    color: var(--hth-primary-hover, #1a6aab);
    text-decoration: none;
}

a:hover {
    text-decoration: none !important;
}

/* ===== Fix input-group quick search button border radius ===== */
.input-group>.form-control+.btn,
.input-group>.form-control+button,
[id^="btnQuickSearch"] {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

/* ===== Enhanced Stat Cards ===== */
.td-stat-card {
    background: var(--hth-card, #fff);
    border: 1px solid var(--hth-border, #e8edf2);
    border-radius: 14px;
    padding: 20px 18px 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    height: 100%;
    box-shadow: 0 2px 16px rgba(15, 23, 42, 0.07);
    transition: box-shadow 0.22s ease, transform 0.22s ease;
    position: relative;
    overflow: hidden;
}

.td-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    border-radius: 14px 0 0 14px;
}

.td-stat-card:hover {
    box-shadow: 0 6px 24px rgba(15, 23, 42, 0.13);
    transform: translateY(-2px);
}

/* Accent bars per icon color */
.td-stat-card:has(.td-stat-icon-green)::before   { background: var(--hth-primary, #5D887B); }
.td-stat-card:has(.td-stat-icon-olive)::before   { background: #527a6e; }
.td-stat-card:has(.td-stat-icon-blue)::before    { background: #1e88e5; }
.td-stat-card:has(.td-stat-icon-orange)::before  { background: #f57c00; }

.td-stat-icon {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 24px;
}

.td-stat-icon-green {
    background: rgba(93, 136, 123, 0.13);
    color: var(--hth-primary, #5D887B);
    box-shadow: 0 4px 12px rgba(93, 136, 123, 0.18);
}

.td-stat-icon-olive {
    background: rgba(82, 122, 110, 0.12);
    color: #527a6e;
    box-shadow: 0 4px 12px rgba(82, 122, 110, 0.15);
}

.td-stat-icon-blue {
    background: #e3f2fd;
    color: #1e88e5;
    box-shadow: 0 4px 12px rgba(30, 136, 229, 0.18);
}

.td-stat-icon-orange {
    background: #fff3e0;
    color: #f57c00;
    box-shadow: 0 4px 12px rgba(245, 124, 0, 0.18);
}

.td-stat-content {
    flex: 1;
    min-width: 0;
}

.td-stat-label {
    font-size: 11px;
    font-weight: 400;
    color: var(--hth-text-muted, #94a3b8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.td-stat-value {
    font-size: 21px;
    font-weight: 400;
    color: var(--hth-text, #1e293b);
    line-height: 1.2;
    margin-top: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.02em;
}

.td-stat-sub {
    font-size: 11.5px;
    color: var(--hth-text-secondary, #64748b);
    margin-top: 3px;
    line-height: 1.2;
    font-weight: 400;
}

/* ===== Fix Sort dropdown-toggle height to match sibling buttons ===== */
.td-sort-dropdown-wrap {
    display: inline-flex;
    align-items: stretch;
}

.td-sort-dropdown-wrap .btn.dropdown-toggle {
    height: 100%;
    white-space: nowrap;
}

html body .hstack .dropdown-toggle.btn-toolbar {
    height: 38px;
}

/* ===== Sort dropdown menu (global – dùng chung Report + TiepDon) ===== */
.td-sort-menu {
    min-width: 240px;
    padding: 8px 0;
    border-radius: 10px;
    border: 1px solid var(--hth-border, #e9ecef);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.td-sort-group-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--hth-text-muted, #6c757d);
}

.td-sort-group-header i {
    font-size: 14px;
    color: var(--hth-primary);
}

.td-sort-menu .td-sort-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px 8px 28px;
    font-size: 13px;
    color: var(--hth-text, #212529);
    transition: background-color .15s ease, color .15s ease;
    cursor: pointer;
}

.td-sort-menu .td-sort-item i {
    font-size: 15px;
    color: var(--hth-text-muted, #868e96);
}

.td-sort-menu .td-sort-item:hover,
.td-sort-menu .td-sort-item:focus {
    background-color: var(--hth-primary-light, rgba(93, 136, 123, 0.12));
    color: var(--hth-primary);
}

/* Table summary footer strip (Global) */
.td-table-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 28px;
    padding: 14px 16px;
    margin-top: 0;
    border-top: 1px solid var(--hth-border, #e8edf2);
    background: var(--hth-card, #fff);
    border-radius: 0 0 12px 12px;
}

.td-table-summary-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.td-table-summary-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.td-ts-icon-green {
    background: rgba(93, 136, 123, 0.15);
    color: var(--hth-primary, #5D887B);
}

.td-ts-icon-blue {
    background: #e3f2fd;
    color: #1e88e5;
}

.td-ts-icon-orange {
    background: #fff3e0;
    color: #f57c00;
}

.td-ts-icon-olive {
    background: rgba(93, 136, 123, 0.12);
    color: #527a6e;
}

.td-table-summary-label {
    color: var(--hth-text-secondary, #64748b);
    font-weight: 500;
}

.td-table-summary-val {
    font-weight: 700;
    color: var(--hth-text, #334155);
}

.td-ts-val-sales {
    color: #e05252;
}

.td-ts-val-revenue {
    color: #188038;
}

.td-sort-menu .td-sort-item:hover i,
.td-sort-menu .td-sort-item:focus i {
    color: var(--hth-primary);
}

.td-sort-menu .td-sort-item.active {
    background-color: var(--hth-primary-light, rgba(93, 136, 123, 0.15));
    color: var(--hth-primary);
    font-weight: 600;
}

.td-sort-menu .td-sort-item.active i {
    color: var(--hth-primary);
}

.td-sort-menu .dropdown-divider {
    margin: 6px 0;
    border-color: var(--hth-border, #e9ecef);
}

/* ── Dynamic Layout Scaling cho màn hình HD / Laptop (< 1600px) & Full HD 125% Display Scale ── */
@media (max-width: 1599.98px), (-webkit-min-device-pixel-ratio: 1.2), (min-resolution: 115dpi) {
    :root {
        font-size: 13.5px;
    }
    /* Đã loại bỏ zoom: 0.85 vì thuộc tính zoom phi chuẩn trên Chromium/Edge làm chữ bị mờ, nhòe và mất ClearType */
    .btn:not(.btn-lg) {
        font-size: 12px;
        padding: 0.3rem 0.65rem;
    }
    .form-control, .form-select {
        font-size: 12.5px;
        padding: 0.3rem 0.65rem;
    }
}