/* =========================================================
   Table header brand sync — #005b9f
   Mục tiêu: đồng bộ màu head table toàn source.
   File load cuối trong _Host.cshtml để phủ rule cũ.
   ========================================================= */

:root {
    --app-table-header-bg: #005b9f;
    --app-table-header-color: #ffffff;
    --app-table-header-border: #4da3e2;
    --app-table-subheader-bg: #2a92df; /* hàng header phụ (multi-level) */
}

/* ── Main data table headers (thead) ── */
table > thead > tr > th,
table > thead > tr > td,
table thead th,
table thead td,
.table > thead > tr > th,
.table > thead > tr > td {
    background-color: var(--app-table-header-bg) !important;
    color: var(--app-table-header-color) !important;
}

/* Multi-level header: row 2+ lighter blue (giữ phân tầng) */
table > thead > tr:nth-child(n + 2) > th,
table > thead > tr:nth-child(n + 2) > td,
.sub-th {
    background-color: var(--app-table-subheader-bg) !important;
    color: var(--app-table-header-color) !important;
}

/* ── Common app table class prefixes (th / thead tr) ── */
.data-table > thead > tr > th,
.data-table > thead > tr > td,
.data-table th,
.sm-table > thead > tr > th,
.sm-table th,
.a-table > thead > tr > th,
.a-table th,
.t-table > thead > tr > th,
.t-table th,
.lm-table > thead > tr > th,
.lm-table th,
.lm-tkb-table > thead > tr > th,
.lm-tkb-table th,
.rt-table > thead > tr > th,
.rt-table thead th,
.nt-menu-table > thead > tr > th,
.nt-menu-table thead th,
.vnedu-table > thead > tr > th,
.vnedu-table thead th,
.excel-table > thead > tr > th,
.excel-table thead th,
.sync-table th,
.cfg-table thead th,
.mh-table thead th,
.mh-cfg-table thead th,
.ns-table thead th,
.pc-table thead th,
.pc-imp-table thead th,
.pc-grid-table thead th,
.qlhs-table thead th,
.to-table thead th,
.bdd-table thead th,
.inan-table thead th,
.thbd-table thead th,
.hbql-table thead th,
.cts-table thead th,
.nxhb-table th,
.dm-table th,
.tq-table th,
.gvtkb-table th,
.tk-table th,
.khgd-table th,
.gv-table th,
.sdb-tbm-table th,
.sdb-tb-table th,
.sdb-kn-table th,
.sdb-pq-table th,
.sdb-ldb-table th,
.tkb-table th,
.tkb-schedule-table th,
.table-tkb thead th,
.imp-preview-table th,
.ns-import-preview-table th,
.dn-custom-table thead th,
.chmh-header-row th,
.tdtb-table thead th,
.htnx-table thead th,
.td-preview-table thead th {
    background-color: var(--app-table-header-bg) !important;
    color: var(--app-table-header-color) !important;
}

/* thead tr nền (khi page set background trên tr) */
.cfg-table thead tr,
.mh-table thead tr,
.mh-cfg-table thead tr,
.ns-table thead tr,
.pc-table thead tr,
.pc-imp-table thead tr,
.pc-grid-table thead tr,
.qlhs-table thead tr,
.qlhs-ph-list-table thead tr,
.to-table thead tr,
.bdd-table thead tr,
.inan-table thead tr,
.td-preview-table thead tr {
    background-color: var(--app-table-header-bg) !important;
}

/* ── Exceptions ── */

/* Highlight cột "hôm nay" trên TKB — giữ vàng */
.col-today-header {
    background: #fef9c3 !important;
    color: #854d0e !important;
}

/* Key-value detail table (th = label, không phải head bar) */
.cam-detail-table th {
    background-color: transparent !important;
    color: #64748b !important;
}
