/*=====================================================================
  1. CƠ BẢN & TYPOGRAPHY
=====================================================================*/
body {
    /* PHẢI có phông dự phòng: google-fonts.css chỉ còn Roboto ở 3 subset latin /
       latin-ext / vietnamese. Ký tự ngoài 3 khoảng đó (− → · ₫ và các dấu toán/mũi
       tên) rơi sang phông hệ thống — khai đúng chuỗi dự phòng thì chúng hiện gọn
       gàng, để trống 'Roboto' một mình là trình duyệt tự chọn phông serif mặc định
       trông rất lạc lõng. */
    font-family: 'Roboto', system-ui, 'Segoe UI', Arial, sans-serif !important;
    font-size: 0.9rem !important;
}
.negative {
    color: red;
}
.zero {
    display: none;
}  
/*=====================================================================
  2. HEADER & MENU CHÍNH
=====================================================================*/
header {
    background: linear-gradient(to right, #003366 0%, #004488 40%, #0055aa 100%);
    color: white !important;
    position: relative;
    z-index: 1000;
    min-height: 56px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

/* Nút dropdown outline nhẹ nhàng, đẹp trên nền gradient */
header .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.4) !important;
    color: white !important;
}
header .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.6) !important;
}

/* Badge thông báo nổi bật hơn trên nền tối */
header .badge-danger {
    background-color: #e74c3c !important;
    font-size: 0.65rem !important;
}

/* Khi thu gọn header (nếu dùng nút toggle) */
header.collapsed {
    min-height: 44px !important;
    padding: 6px 0 !important;
}
header.collapsed img.logo {
    height: 32px !important;
}
header:hover {
    background: linear-gradient(to right, #004488 0%, #0055aa 40%, #0066cc 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
/* ── Main Navigation ─────────────────────────────────────────────── */
nav.main-nav {
    background: #eef3fa;
    border-bottom: 4px solid #c8d8ec;
    border-top: 3px solid transparent;
    box-shadow: 0 -3px 0 rgba(255,255,255,0.18), 0 3px 8px rgba(0,51,102,0.12);
    position: relative;
    z-index: 980; /* < #main-header (1000) de dropdown header (chon du an/user/ngon ngu/thong bao)
                     hien de len nav. Che do multitab nang len 1040 rieng (sheet-manager.css). */
}

/* ── Top-level menu ──────────────────────────────────────────────── */
.main-menu {
    list-style: none;
    padding: 0 2px;
    margin: 0;
    display: flex;
    align-items: stretch;
    min-height: 32px;
    flex-wrap: nowrap;
    overflow: visible; /* QUAN TRONG: phai visible de submenu hien thi duoc */
}

.main-menu-item {
    position: relative;
    flex-shrink: 0;
}

.main-menu-link {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0 10px;
    height: 32px;
    color: #1e3a5f;
    font-size: 0.84rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    border-radius: 6px 6px 0 0;
    transition: color 0.14s, background 0.14s, border-color 0.14s;
    letter-spacing: -0.04em;
}
.main-menu-link:hover {
    color: #003366;
    background: rgba(0,51,102,0.07);
    text-decoration: none;
    border-bottom-color: #4a80c4;
}
.main-menu-link.active,
.main-menu-item.is-active > .main-menu-link {
    color: #1a56a8;
    background: #d6e8fc;
    border-bottom-color: #1565c0;
    font-weight: 700;
}

.main-menu-icon {
    font-size: 0.68rem;
    color: #5c7a9e;
    transition: color 0.14s;
    line-height: 1;
    flex-shrink: 0;
}
.main-menu-link:hover .main-menu-icon {
    color: #1565c0;
}
.main-menu-link.active .main-menu-icon {
    color: #1a56a8;
}

.main-menu-text {
    line-height: 1;
}

.main-menu-arrow {
    font-size: 0.52rem;
    color: #8caac8;
    transition: transform 0.18s, color 0.14s;
    margin-left: 1px;
    flex-shrink: 0;
}
.main-menu-item.has-children:hover .main-menu-arrow {
    transform: rotate(180deg);
    color: #1565c0;
}

/* ── Submenu dropdown ────────────────────────────────────────────── */
.main-submenu {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    min-width: 210px;
    list-style: none;
    padding: 5px 0;
    margin: 0;
    background: #fff;
    border-radius: 0 8px 8px 8px;
    border-top: 2px solid #1565c0;
    border: 1px solid #d0dce8;
    border-top: 2px solid #1565c0;
    box-shadow: 0 6px 24px rgba(0,51,102,0.13), 0 2px 6px rgba(0,0,0,0.07);
    z-index: 2000;
    animation: main-submenu-in 0.13s ease;
}
@keyframes main-submenu-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}
.main-menu-item.has-children:hover .main-submenu {
    display: block;
}

.main-submenu-item + .main-submenu-item {
    border-top: 1px solid #f0f4f8;
}

.main-submenu-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    color: #1e3a5f;
    font-size: 0.78rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.12s, color 0.12s;
}
.main-submenu-link:hover {
    background: #eef4fd;
    color: #1565c0;
    text-decoration: none;
}
.main-submenu-link.active,
.main-submenu-item.is-active > .main-submenu-link {
    background: #dbeafe;
    color: #1d4ed8;
    font-weight: 600;
}

.main-submenu-icon {
    width: 16px;
    text-align: center;
    font-size: 0.70rem;
    color: #8caac8;
    flex-shrink: 0;
    transition: color 0.12s;
}
.main-submenu-link:hover .main-submenu-icon,
.main-submenu-link.active .main-submenu-icon {
    color: #1565c0;
}

/* Nút bật/tắt menu — chỉ hiện trên mobile */
.main-nav-toggle { display: none; }

/* ── Responsive: màn nhỏ — menu xổ DỌC, bấm để mở (thay cuộn ngang + hover) ── */
@media (max-width: 768px) {
    nav.main-nav { overflow: visible; }

    /* Nút "Menu chức năng ▾" (ghi đè inline display:none để chỉ hiện ở mobile) */
    .main-nav-toggle {
        display: flex !important; align-items: center; gap: 9px;
        width: 100%; padding: 10px 14px;
        background: #eef3fa; border: none;
        color: #1e3a5f; font-size: 0.85rem; font-weight: 700;
        letter-spacing: -0.02em; cursor: pointer;
    }
    .main-nav-toggle .main-nav-toggle-text { flex: 1; text-align: left; }
    .main-nav-toggle-caret { font-size: 0.7rem; color: #5c7a9e; transition: transform 0.18s; }
    nav.main-nav.open .main-nav-toggle-caret { transform: rotate(180deg); }

    /* Danh sách menu: ẩn mặc định, xổ dọc khi mở */
    .main-menu {
        display: none;
        flex-direction: column; align-items: stretch;
        padding: 0; border-top: 1px solid #d8e3f0;
    }
    nav.main-nav.open .main-menu { display: flex; }

    .main-menu-item { width: 100%; }
    .main-menu-item + .main-menu-item { border-top: 1px solid #e3ebf5; }
    .main-menu-link {
        height: auto; padding: 11px 16px; font-size: 0.84rem;
        border-radius: 0; border-bottom: none; justify-content: flex-start;
    }
    .main-menu-link.active,
    .main-menu-item.is-active > .main-menu-link {
        border-bottom: none; border-left: 3px solid #1565c0; padding-left: 13px;
    }
    /* Mũi tên cho mục có submenu: hiện lại, đẩy sang phải, xoay khi mở */
    .main-menu-arrow { display: inline-block; margin-left: auto; }
    .main-menu-item.submenu-open > .main-menu-link .main-menu-arrow { transform: rotate(180deg); }

    /* Submenu: dropdown hover → accordion bấm-để-xổ (trên cảm ứng không có hover) */
    .main-submenu {
        position: static; display: none;
        min-width: 0; width: 100%;
        background: #f6f9fd; box-shadow: none; border: none; border-radius: 0;
        padding: 0; margin: 0; animation: none;
    }
    .main-menu-item.has-children:hover > .main-submenu { display: none; }
    .main-menu-item.submenu-open > .main-submenu { display: block; }
    .main-submenu-link { padding: 9px 16px 9px 42px; white-space: normal; }
}

/*=====================================================================
  3. USER INFO & DROPDOWN TÀI KHOẢN
=====================================================================*/
.user-info {
    position: absolute;
    top: 0;
    right: 10px;
    padding: 10px;
}

.user-info .dropdown {
    display: inline-block;
    position: relative;
}

.user-info .dropdown button {
    background-color: #004080;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
}

.user-info .dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 360px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    right: 0;
}

.user-info .dropdown-content a {
    color: rgb(32, 85, 0);
    padding: 5px 5px;
    text-decoration: none;
    display: block;
}

.user-info .dropdown-content a:hover {
    background-color: #f1f1f1;
}

.user-info .dropdown:hover .dropdown-content {
    display: block;
}

/*=====================================================================
  4. CHUÔNG THÔNG BÁO (NOTIFICATION)
=====================================================================*/
#notifications-button {
    position: relative;
}

#notification-count {
    display: inline-block;
    position: absolute;
    top: 0;
    right: 0;
    background: red;
    color: white;
    border-radius: 50%;
    padding: 0 5px;
    font-size: 12px;
    height: 18px;
    width: 18px;
    line-height: 18px;
    text-align: center;
}

#notifications-list {
    max-height: 300px;
    overflow-y: auto;
    display: none;
    right: 0;
    left: auto;
}

.notification-item {
    cursor: pointer;
    padding: 10px;
    width: 500px;
    border-bottom: 1px solid #ddd;
    background-color: #fff;
    color: #0432eb;
}

.notification-item.unread {
    font-weight: bold;
    background-color: #f8f9fa; /* ưu tiên màu này */
}

.dropdown-menu-noti {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    display: none;
    float: left;
    min-width: 10rem;
    padding: .5rem 0;
    margin: .125rem 0 0;
    font-size: 1rem;
    color: #212529;
    text-align: left;
    list-style: none;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, .15);
    border-radius: .25rem;
}

.dropdown-menu {
    padding-top: 12px !important;
    width: 350px;
}

.dropdown-menu.show {
    display: block !important;
    z-index: 1000;
}

/*=====================================================================
  5. NÚT BUTTON CHUNG
=====================================================================*/
.btn {
    padding: .175rem .375rem !important;
}

.btn-sm {
    padding: .175rem .375rem !important;
}

.btn-secondary {
    background-color: #004080 !important;
    color: white;
    display: inline-block;
}

.btn-primary {
    background-color: #2d6a9f !important;
    border-color: #1a3a5c !important;
    color: #fff !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: #1a3a5c !important;
    border-color: #122840 !important;
}

.btn-block + .btn-block {
    margin-top: 0 !important;
}

.reply-button {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    margin-top: 10px;
}

.reply-button:hover {
    background-color: #0056b3;
}

/*=====================================================================
  6. NỘI DUNG CHÍNH
=====================================================================*/
.content {
    padding: 20px;
}
.ui-autocomplete {
    z-index: 1056 !important; /* Cao hơn z-index mặc định của modal Bootstrap (1050) */
    position: absolute; /* Đảm bảo vị trí tuyệt đối */
    max-height: 200px; /* Giới hạn chiều cao nếu cần */
    overflow-y: auto; /* Cuộn nếu quá dài */
    overflow-x: hidden; /* Ẩn cuộn ngang */
    border: 1px solid #ccc; /* Viền để dễ nhìn */
    background-color: white; /* Nền trắng */
}  
#messageModal {
    z-index: 1055;
}
#messageModal .modal-backdrop {
    z-index: 1050;
}
/*=====================================================================
  7. COMMENT & REPLY
=====================================================================*/
.comment {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 10px;
    background-color: #f9f9f9;
    color: #333;
}

.comment .replies {
    margin-left: 20px;
    border-left: 2px solid #ddd;
    padding-left: 10px;
}

.reply-form {
    display: none;
    margin-top: 10px;
}

.reply-form textarea {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ddd;
    margin-bottom: 10px;
}

/*=====================================================================
  8. DANH SÁCH FILE EXCEL
=====================================================================*/
.file-container {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    background-color: #f9f9f9;
}

.excel-icon {
    width: 32px;
    height: 32px;
    margin-right: 10px;
}

.file-container p {
    margin: 0 10px 0 0;
}

/*=====================================================================
  9. DATATABLES CUSTOM STYLE
=====================================================================*/
.dataTables_wrapper {
    width: 100%;
}

table.dataTable,
table.dataTable th,
table.dataTable td {
    border: 1px solid #ddd;
    min-width: 50px;
}

table.dataTable thead th,
table.dataTable thead td,
table.dataTable>thead>tr>th:not(.sorting_disabled),
table.dataTable>thead>tr>td:not(.sorting_disabled) {
    padding: 5px 5px;
    border-bottom: 1px solid #e6f7ff;
    text-align: center;
    /* Bootstrap đặt .table thead th{vertical-align:bottom} — không khai lại thì
       tiêu đề dính đáy ô, lệch hẳn khi một cột wrap 2-3 dòng */
    vertical-align: middle;
    background-color: #2d6a9f;
    color: #fff;
    font-weight: 600;
    font-size: 0.82rem;
}
table.dataTable.table-sm>thead>tr>th:not(.sorting_disabled) {
    padding-right: 5px !important;
}

/* Body – sạch sẽ, hover mượt */
table.dataTable tbody td {
    padding: 5px 5px !important;
    font-size: 0.86rem;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s ease;
    align-content: center;
}

table.dataTable tbody tr:hover {
    background-color: #f0f7ff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
/* Zebra nhẹ nhàng */
table.dataTable tbody tr:nth-child(even) {
    background-color: #fafbff;
}

table.dataTable tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

/* Cột số liệu */
table.dataTable tbody td.text-right {
    font-variant-numeric: tabular-nums;
    font-weight: 400;
    color: #10387a;
}

/* Nút trong bảng */
table.dataTable .btn-sm {
    padding: 5px 11px;
    font-size: 0.78rem;
    border-radius: 8px;
    font-weight: 500;
}

/* Scrollbar MẢNH + MỜ nằm trong bảng (track trong suốt, thumb bán trong suốt) */
.dataTables_scrollBody {
    scrollbar-width: thin;                          /* Firefox */
    scrollbar-color: rgba(100,116,139,.45) transparent;
}
.dataTables_scrollBody::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}
.dataTables_scrollBody::-webkit-scrollbar-track {
    background: transparent;
}
.dataTables_scrollBody::-webkit-scrollbar-thumb {
    background: rgba(100,116,139,.35);
    border-radius: 99px;
}
.dataTables_scrollBody::-webkit-scrollbar-thumb:hover {
    background: rgba(71,85,105,.6);
}
.dataTables_scrollBody::-webkit-scrollbar-corner {
    background: transparent;                        /* góc giao 2 thanh không còn ô vuông */
}

/* Đường viền dọc giữa các cột – mờ nhẹ, chỉ trong body và header */
table.dataTable thead th,
table.dataTable tbody td {
    border-right: 1px solid #e2e8f0 !important;   /* màu xám rất nhạt */
}

/* Bỏ viền ngoài cùng bên phải (để bảng không bị viền kép) */
table.dataTable thead th:last-child,
table.dataTable tbody td:last-child {
    border-right: none !important;
}

/* Đường viền ngang giữa các dòng – mờ nhẹ */
table.dataTable tbody tr {
    border-bottom: 1px solid #e2e8f0;
}

/* Header có đường kẻ dưới nhạt phân cách với body */
table.dataTable thead tr {
    border-bottom: 1px solid #a8c4e0;
}

/* Khi hover dòng: làm nổi bật viền ngang dưới để tăng cảm giác tương tác */
table.dataTable tbody tr:hover {
    border-bottom: 1px solid #bfdbfe !important;  /* xanh nhạt khi hover */
}

/* Tùy chọn: làm mờ viền trong header nếu muốn nhẹ nhàng hơn */
table.dataTable {
    border-spacing: 0 !important;
}

table.dataTable thead th {
    background-clip: padding-box !important;
}

/* ── BO GÓC BẢNG (không viền ngoài) ──────────────────────────────────────────
   border-radius KHÔNG hoạt động khi border-collapse: collapse (Bootstrap mặc định)
   → chuyển separate, và vì separate không vẽ viền khai trên <tr>, các đường kẻ
   ngang chuyển xuống từng ô + triệt border-left/top của Bootstrap để không nhân
   đôi nét. Kết quả nhìn Y NHƯ CŨ, chỉ thêm 4 góc bo. */
table.dataTable {
    border-collapse: separate !important;
    /* separate vẽ viền của chính <table> thành khung riêng (collapse thì gộp vào ô)
       → phải triệt, không thì hiện thêm khung #ddd thẳng góc đè lên vùng bo */
    border: 0 !important;
    border-radius: 6px;
    overflow: hidden;
}
table.dataTable th, table.dataTable td {
    border-left: 0 !important;
    border-top: 0 !important;
}
table.dataTable thead th { border-bottom: 1px solid #a8c4e0; }
table.dataTable tbody td { border-bottom: 1px solid #e2e8f0; }
table.dataTable tbody tr:hover td { border-bottom-color: #bfdbfe; }
table.dataTable thead tr:first-child th:first-child { border-top-left-radius: 6px; }
table.dataTable thead tr:first-child th:last-child  { border-top-right-radius: 6px; }
table.dataTable tbody tr:last-child td:first-child { border-bottom-left-radius: 6px; }
table.dataTable tbody tr:last-child td:last-child  { border-bottom-right-radius: 6px; }

/* Bảng CUỘN (DataTables tách head/body): bo TRÊN ở head, DƯỚI ở body — góc ăn đủ 4
   (radius trên Ô vẫn giữ để góc tròn cả khi ô bị ghim sticky đè lên vùng bo) */
.dataTables_scroll table.dataTable { border-radius: 0; overflow: visible; }
.dataTables_scrollHead { border-top-left-radius: 6px; border-top-right-radius: 6px; overflow: hidden; }
.dataTables_scrollBody { border-bottom-left-radius: 6px; border-bottom-right-radius: 6px; }

/* Sort icon màu trắng trên nền header xanh đậm */
table.dataTable thead .sorting:after,
table.dataTable thead .sorting_asc:after,
table.dataTable thead .sorting_desc:after {
    color: rgba(255,255,255,0.6);
}

/* Filter row — nền xám nhạt, chữ tối */
table.dataTable thead tr.filters th {
    background-color: #f0f4f8 !important;
    color: #333 !important;
}

/* SUM / SUB-TOTAL rows — nền xám nhạt, chữ xanh đậm */
table.dataTable thead tr.totals th,
table.dataTable thead tr.sub-totals th,
table.dataTable thead tr.subtotals th {
    background-color: #eef2f7 !important;
    color: #2d6a9f !important;
    font-weight: 700;
    font-size: 0.82rem;
}
/* Canh phải: hàng tổng chỉ chứa nhãn + số, canh giữa thì tổng không thẳng cột với
   dòng chi tiết. Viết dạng con-trực-tiếp cho ngang sức luật căn giữa của thead
   (table.dataTable>thead>tr>th:not(.sorting_disabled)) — .text-right trần thua nó. */
table.dataTable > thead > tr.totals > th,
table.dataTable > thead > tr.sub-totals > th,
table.dataTable > thead > tr.subtotals > th {
    text-align: right;
}

/* Status badges dùng chung */
.badge-dat      { background:#d4edda; color:#155724; border:1px solid #c3e6cb; border-radius:4px; padding:2px 7px; font-size:.76rem; font-weight:600; white-space:nowrap; }
.badge-khongdat { background:#f8d7da; color:#721c24; border:1px solid #f5c6cb; border-radius:4px; padding:2px 7px; font-size:.76rem; font-weight:600; white-space:nowrap; }
.badge-na       { background:#e2e3e5; color:#383d41; border:1px solid #d6d8db; border-radius:4px; padding:2px 7px; font-size:.76rem; white-space:nowrap; }

/* Btn extra small */
.btn-xs { padding:2px 7px !important; font-size:.75rem !important; line-height:1.4; border-radius:3px; }

/* Page header gradient */
.page-header-gradient {
    background: linear-gradient(135deg, #1a3a5c 0%, #2d6a9f 100%);
    color: #fff; border-radius: 8px; padding: 14px 18px; margin-bottom: 14px;
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}
.page-header-gradient h3,
.page-header-gradient h4 { margin: 0; font-weight: 700; color: #fff; }

/* Summary cards */
.summary-cards { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:14px; }
.summary-card  { flex:1; min-width:110px; background:#fff; border:1px solid #e0e0e0; border-radius:8px; padding:10px 14px; box-shadow:0 1px 4px rgba(0,0,0,.06); text-align:center; }
.summary-card .card-val { font-size:1.4rem; font-weight:700; line-height:1.2; }
.summary-card .card-lbl { font-size:.7rem; color:#666; text-transform:uppercase; letter-spacing:.5px; }
.summary-card.green  .card-val { color:#28a745; }
.summary-card.red    .card-val { color:#dc3545; }
.summary-card.blue   .card-val { color:#007bff; }
.summary-card.orange .card-val { color:#fd7e14; }
.summary-card.gray   .card-val { color:#6c757d; }
/*=====================================================================
  10. TOOLBAR & FILTER TRÊN DATATABLES
=====================================================================*/
.toolbar {
    display: flex;
    align-items: center;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 10px;
    background-color: #f8f9fa;
    margin-bottom: 20px;
}

.toolbar .btn {
    margin-right: 10px;
    font-size: 0.95rem;
    padding: .175rem .375rem !important;
}

.toolbar .btn i {
    margin-right: 5px;
}
.form-group {
    margin: 0px;
}

.form-control {
    padding: 5px 5px;
    font-size: 0.9rem;
    margin-right: 5px;
    height: 32px !important;
}
.action-btn {
    height: 30px;
    padding: 0 10px;
    margin-right: 10px;
    font-size: 0.95rem;
}
.action-btn i {
    margin-right: 5px;
}

/* Filter cột */
table.dataTable thead tr.filters .filter-wrapper {
    position: relative;
}

table.dataTable thead tr.filters .column-filter {
    width: 100%;
    padding: 3px 20px 3px 5px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.82rem;
    background: #ffffff;
    transition: all 0.25s ease;
}

/* Viền xanh đậm khi focus input lọc */
table.dataTable thead tr.filters .column-filter:focus {
    border-color: #4b84d3 !important;  /* xanh đậm, nổi bật */
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);  /* bóng nhẹ để tăng tương tác, tùy chọn */
    outline: none;  /* bỏ outline đen mặc định browser */
}

table.dataTable thead tr.filters .filter-icon {
    position: absolute;
    right: 3px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    color: #94a3b8;
    pointer-events: none;
}

table.dataTable thead tr.filters .filter-icon.filtered {
    color: #3b82f6;
    font-weight: bold;
}

.text-right {
    text-align: right;
}

/* Cột truncate với tooltip */
.col-truncate {
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: default;
}

/*=====================================================================
  11. MODAL (mapping, import, ...)
=====================================================================*/
@media (min-width: 1200px) {
    .modal-lg,
    .modal-xl {
        max-width: 80%;
        width: 80%;
        margin: 1rem auto;
    }
}
label {
    margin: 5px;
}
/*=====================================================================
  12. KHÁC (nav HDSD, jquery ui, project search...)
=====================================================================*/
nav.paging,
nav.nav_guide {
    background-color: white;
}

.ui-widget-content {
    z-index: 999;
}

#project-search-header,
#project-search-home {
    pointer-events: auto !important;
    user-select: auto !important;
}

#project-select,
#project-select-home {
    display: block !important;
}

/* OVERLAY LOADING NHẸ & HIỆN ĐẠI HƠN */
.overlay {
    background: rgba(255, 255, 255, 0.85) !important; /* Nền trắng mờ */
    backdrop-filter: blur(4px); /* Làm mờ nền (hiệu ứng glass, hiện đại) - hỗ trợ tốt trên Chrome/Edge */
}

.spinner {
    width: 50px;
    height: 50px;
    border: 6px solid #e9ecef;
    border-top: 6px solid #007bff;
    margin: 0 auto;
}

.overlay-message {
    color: #333;
    font-size: 1rem;
    margin-top: 15px;
}