/* ══ HỎI MỤC LƯƠNG (luong-ho-so.js, 27/09/2026) ══════════════════════════════════════════════════════════════
   Form dùng chung: ngăn phải của Bảng lương (dùng khung .bl-ngan có sẵn, rộng 560px) và bước 2 "Thông tin lương" ở Nhân viên.
   Nhóm theo nghiệp vụ bằng đường phân tách (không thẻ lồng thẻ), nhãn trên ô, ô cao 44px, tiền căn phải + dấu phẩy nghìn,
   lỗi ngay dưới đúng ô, thanh Hủy / Lưu cố định. Chỉ dùng token theme (7 theme), bo tối đa 8px. */
.lh-ngan { width: min(560px, 100%); }
.lh-form { display: flex; flex-direction: column; flex: 1; min-height: 0; color: var(--text-main); }
.lh-than { flex: 1; overflow: auto; overscroll-behavior: contain; padding: 4px 18px 16px; }
.lh-nhom { margin: 0; padding: 14px 0 16px; border: 0; border-top: 1px solid var(--border-color); min-width: 0; }
.lh-nhom:first-child, .lh-bao + .lh-nhom { border-top: 0; }
.lh-nhom legend { float: left; width: 100%; padding: 0; margin: 0 0 10px; font-size: 15px; font-weight: 700; }
.lh-phu { margin-left: 6px; font-size: 12px; font-weight: 600; color: var(--text-muted); }
.lh-luoi { clear: both; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.lh-o { display: grid; align-content: start; gap: 5px; min-width: 0; margin: 0; padding: 0; border: 0; }
.lh-n { font-size: 13.5px; font-weight: 600; color: var(--text-main); }
.lh-bb { color: var(--txt-bad); }
.lh-tc { font-size: 12px; font-weight: 400; color: var(--text-muted); }
.lh-o input:not([type=radio]):not([type=checkbox]), .lh-o select { box-sizing: border-box; width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--border-color); border-radius: 8px;
  background: var(--bg-input); color: var(--text-main); font: inherit; font-size: 15px; }
.lh-o input:focus-visible, .lh-o select:focus-visible, .lh-form :focus-visible { outline: 2px solid var(--theme-accent-strong); outline-offset: 1px; }
.lh-o [aria-invalid="true"], .lh-cn[aria-invalid="true"] .lh-chon { border-color: var(--txt-bad); box-shadow: 0 0 0 1px var(--txt-bad); }
.lh-tien { position: relative; display: block; }
.lh-tien input { padding-right: 30px !important; text-align: right; font-variant-numeric: tabular-nums; }
.lh-dv { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); font-size: 14px; color: var(--text-muted); pointer-events: none; }
.lh-g { font-size: 12.5px; line-height: 1.4; color: var(--text-muted); }
.lh-rong { grid-column: 1 / -1; margin: 0; }
.lh-loi { display: flex; align-items: flex-start; gap: 4px; font-size: 13px; line-height: 1.35; color: var(--txt-bad); }
.lh-loi .lh-ic { flex: none; margin-top: 1px; }
.lh-cn { grid-column: 1 / -1; }
.lh-cn legend { float: left; width: 100%; padding: 0; margin-bottom: 5px; }
.lh-chon { clear: both; justify-self: start; width: max-content; max-width: 100%; display: inline-flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-input); padding: 2px; }
.lh-chon-o { position: relative; display: inline-flex; }
.lh-chon-o input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.lh-chon-o span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 6px; font-size: 14px; font-weight: 600; color: var(--text-muted); }
.lh-chon-o input:checked + span { background: var(--bg-card); color: var(--text-main); box-shadow: 0 0 0 1px var(--border-color); }
.lh-chon-o input:focus-visible + span { outline: 2px solid var(--theme-accent-strong); outline-offset: 1px; }
.lh-bat { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; font-weight: 600; cursor: pointer; clear: both; }
.lh-bat input { width: 20px; height: 20px; accent-color: var(--theme-accent-strong); margin: 0; }
.lh-nhom > .lh-luoi + .lh-luu-y, .lh-bat + .lh-luoi { margin-top: 10px; }
.lh-luu-y { clear: both; display: flex; align-items: flex-start; gap: 6px; margin: 0 0 12px; font-size: 12.5px; line-height: 1.45; color: var(--text-muted); }
.lh-luu-y .lh-ic { flex: none; margin-top: 1px; }
.lh-luu-y strong { color: var(--text-main); }
.lh-bao { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0 4px; padding: 10px 12px; border-radius: 8px; font-size: 13.5px; line-height: 1.45; }
.lh-bao .lh-ic { flex: none; margin-top: 1px; }
.lh-bao.is-warn { background: color-mix(in srgb, var(--txt-warn) 12%, transparent); color: var(--text-main); }
.lh-bao.is-warn .lh-ic { color: var(--txt-warn); }
.lh-bao.is-bad { background: color-mix(in srgb, var(--txt-bad) 10%, transparent); color: var(--txt-bad); margin: 0 0 10px; }
.lh-lien-ket { display: inline; min-height: 0; padding: 0; border: 0; background: none; color: var(--theme-accent-strong); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.lh-co { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 14px; color: var(--txt-ok); }
.lh-chan { flex: none; padding: 12px 18px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--border-color); background: var(--bg-card); }
.lh-chan-n { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.lh-nut { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 0 16px; border: 1px solid var(--border-color); border-radius: 8px;
  background: var(--bg-card); color: var(--text-main); font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.lh-nut.is-chinh { background: var(--theme-accent-strong); border-color: var(--theme-accent-strong); color: #fff; }
/* Theme tối có màu nhấn sáng → chữ nền tối (giống .ns-primary) */
html[data-itn-theme="graphite"] .lh-nut.is-chinh, html[data-itn-theme="gold-noir"] .lh-nut.is-chinh,
html[data-itn-theme="graphite"] .bl-btn.is-chinh, html[data-itn-theme="gold-noir"] .bl-btn.is-chinh { color: var(--bg-app); }
.lh-nut[disabled] { opacity: .6; cursor: default; }
/* Bước 2 "Thông tin lương" (Nhân viên) — trên trang, không phải ngăn */
.lh-buoc { max-width: 760px; margin: 0 auto; padding: 4px 0 24px; color: var(--text-main); }
.lh-buoc-h h1 { margin: 2px 0 6px; font-size: 26px; }
.lh-buoc-so { margin: 0; font-size: 13px; font-weight: 700; color: var(--theme-accent-strong); letter-spacing: .02em; }
.lh-buoc-p { display: flex; align-items: flex-start; gap: 6px; margin: 0 0 12px; font-size: 14px; line-height: 1.45; color: var(--text-muted); }
.lh-buoc-p .lh-ic { flex: none; margin-top: 2px; color: var(--txt-ok); }
.lh-buoc .lh-form { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 8px; }
.lh-buoc .lh-than { overflow: visible; }
.lh-buoc .lh-chan { position: sticky; bottom: var(--itn-tab-h, 0px); padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); border-radius: 0 0 8px 8px; }
.lh-cho { display: grid; justify-items: center; gap: 10px; padding: 36px 16px; text-align: center; color: var(--text-muted); background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 8px; }
.lh-cho.is-loi .lh-ic { color: var(--txt-bad); }
/* Hộp xác nhận trước khi đổi số tiền */
.lh-hoi-bg { position: fixed; inset: 0; z-index: 10090; background: rgba(15, 23, 42, .32); }
.lh-hoi { position: fixed; z-index: 10100; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(440px, calc(100% - 32px)); box-sizing: border-box; padding: 18px; border-radius: 8px;
  background: var(--bg-card); color: var(--text-main); border: 1px solid var(--border-color); box-shadow: 0 12px 32px rgba(15, 23, 42, .18); }
.lh-hoi h2 { margin: 0 0 10px; font-size: 17px; line-height: 1.35; }
.lh-hoi p { margin: 10px 0 14px; font-size: 13.5px; line-height: 1.45; color: var(--text-muted); }
.lh-doi { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border-color); }
.lh-doi li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border-color); font-size: 14px; }
.lh-so { font-variant-numeric: tabular-nums; text-align: right; }
/* Bảng lương: khối "Thiếu thông tin lương" + nhãn nhỏ dưới tên */
.bl-thieu { margin: 12px 0; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; }
.bl-thieu-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border-color); }
.bl-thieu-h h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; }
.bl-thieu-h h2 .bl-ic { color: var(--txt-warn); }
.bl-thieu-ds { list-style: none; margin: 0; padding: 0; }
.bl-thieu-ds li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--border-color); }
.bl-thieu-ds li:first-child { border-top: 0; }
.bl-thieu-b { display: grid; gap: 2px; min-width: 0; }
.bl-thieu-1 { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-weight: 700; }
.bl-thieu-2 { font-size: 13px; color: var(--text-muted); }
.bl-thieu-2 strong { color: var(--text-main); font-weight: 600; }
.bl-btn.is-chinh { background: var(--theme-accent-strong); border-color: var(--theme-accent-strong); color: #fff; }
.bl-tag { display: block; margin-top: 2px; font-size: 12px; font-weight: 500; color: var(--text-muted); white-space: nowrap; }
.bl-tag.is-warn { color: var(--txt-warn); }
.bl-k-hs { display: grid; gap: 8px; margin: 14px 0 0; padding: 12px 14px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 8px; }
.bl-k-hs p { margin: 0; font-size: 13.5px; line-height: 1.45; }
/* Máy tính 1440 (có thanh bên): bảng lương thêm nhãn "Thiếu thông tin lương" → nút Chi tiết chỉ còn icon, ô bớt đệm để không bị cắt mép phải */
@media (max-width: 1480px) {
  .bl-trang .bl-act .bl-dai { display: none; } .bl-trang .bl-act .bl-btn.bl-sm { padding: 0; width: 44px; }
  .bl-trang .bl-bang th, .bl-trang .bl-bang td { padding-left: 9px; padding-right: 9px; }
  .bl-trang .bl-bang th.bl-c-phu, .bl-trang .bl-bang th.bl-c-cn { white-space: normal; }
  .bl-trang .bl-c-st .bl-st { white-space: normal; max-width: 118px; line-height: 1.3; }
}
@media (max-width: 760px) {
  .lh-ngan { width: 100%; border-left: 0; }
  .lh-than { padding: 4px 16px 16px; }
  .lh-luoi { grid-template-columns: 1fr; }
  .lh-chan { padding-left: 16px; padding-right: 16px; }
  .lh-chan-n .lh-nut { flex: 1 1 0; }
  .lh-buoc-h h1 { font-size: 22px; }
  .bl-thieu-ds li { flex-wrap: wrap; }
  .bl-thieu-ds li .bl-btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) { .lh-form *, .bl-thieu * { transition: none !important; animation: none !important; } }

/* Chỉ tiêu KPI lấy từ màn KPI (04/10/2026): chỉ hiện, không sửa ở đây */
.lh-kpi-v { display: flex; align-items: center; min-height: 44px; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.lh-kpi-v.is-trong { font-weight: 400; color: var(--txt-warn); }
.lh-wide { grid-column: 1 / -1; margin: 0; }
