/* trang/nhan-vien.css — kiểu riêng của màn Nhân viên (tiền tố nv-). Thành phần dùng chung: chung.css */

.nv-luu-y-dau { margin-bottom: 14px; }
.nv-tab { margin-bottom: 16px; }
.nv-tam { display: flex; flex-direction: column; }
.nv-tom-tat { font-size: 13px; color: var(--mo); white-space: nowrap; }
.nv-chu-thich { margin-top: 12px; font-size: 13px; line-height: 1.5; color: var(--mo); }
.nv-the-trong { margin-top: 14px; }
.nv-the-trong .trong { min-height: 0; padding: 30px 20px; }
.nv-dan { font-size: 14px; line-height: 1.55; color: var(--muc-2); }

/* ---------- bảng người ---------- */
.nv-nguoi { display: flex; align-items: center; gap: 11px; min-width: 0; }
.nv-nguoi-chu { display: flex; flex-direction: column; min-width: 0; }
.nv-nguoi-ten { display: flex; align-items: center; gap: 7px; min-width: 0; font-weight: 600; }
.nv-ten-chu { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.nv-nguoi-dn { font-size: 12.5px; font-weight: 400; color: var(--mo); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nv-nhom-o { display: flex; flex-wrap: wrap; gap: 4px; }
.nv-tt { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.nv-phu { font-size: 12.5px; color: var(--mo); }
.nv-mk-tam { font-size: 12px; color: var(--cam); font-weight: 600; }
.nv-o-luc { white-space: nowrap; color: var(--muc-2); font-size: 13.5px; }
.nv-o-ghi-chu { max-width: 260px; overflow-wrap: anywhere; }
.nv-dong-khoa .anh-dd { opacity: .5; }
.nv-dong-khoa .nv-ten-chu { color: var(--mo); font-weight: 500; }
.nv-bang-nguoi td.bang-nut > * { margin-left: 6px; vertical-align: middle; }
.nv-bang-nguoi td.bang-chinh { max-width: 300px; }

/* ---------- thẻ chọn vai ---------- */
.nv-vai-luoi { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.nv-vai-the { position: relative; display: flex; align-items: flex-start; gap: 10px; padding: 12px 13px; border: 1px solid var(--vien-2); border-radius: 12px; background: #fff; cursor: pointer; transition: border-color .12s, background-color .12s, box-shadow .12s; min-width: 0; }
.nv-vai-the:hover { border-color: #c9bea8; }
.nv-vai-the > input { width: 17px; height: 17px; margin: 3px 0 0; accent-color: var(--vang-dam); flex: none; }
.nv-vai-the:has(input:checked) { border-color: var(--vang); background: var(--vang-nhat); box-shadow: 0 0 0 1px var(--vang); }
.nv-vai-the:has(input:focus-visible) { box-shadow: var(--vong); }
.nv-vai-the:has(input:checked) .hh-vai-quan_ly { box-shadow: 0 0 0 1px var(--vang); }      /* huy hiệu vàng nhạt trên nền vàng nhạt: thêm viền cho khỏi chìm */
.nv-vai-than { display: flex; flex-direction: column; gap: 7px; min-width: 0; flex: 1; }
.nv-vai-dau { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nv-vai-hop { font-size: 12.5px; color: var(--mo); }
.nv-vai-ds { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; line-height: 1.4; }
.nv-vai-ds > li { display: flex; align-items: flex-start; gap: 6px; }
.nv-vai-ds > li > svg { margin-top: 2px; }
.nv-duoc { color: var(--muc-2); }
.nv-duoc > svg { color: var(--tot); }
.nv-khong { color: var(--mo); }
.nv-khong > svg { color: var(--mo-2); }
.nv-vai-luu-y { font-size: 12.5px; line-height: 1.45; color: var(--cam); font-weight: 600; }
.nv-vai-khoa { cursor: not-allowed; background: var(--nen-2); border-style: dashed; }
.nv-vai-khoa:hover { border-color: var(--vien-2); }
.nv-vai-khoa .nv-vai-ds, .nv-vai-khoa .nv-vai-luu-y { display: none; }
.nv-vai-khoa .huy-hieu { opacity: .6; }
.nv-vai-ly-do { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--mo); font-weight: 600; }

/* ---------- chọn nhóm ---------- */
.nv-nhom-ds { display: flex; flex-wrap: wrap; gap: 8px; }
.nv-nhom-muc { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px 0 11px; border: 1px solid var(--vien-2); border-radius: 10px; background: #fff; cursor: pointer; font-weight: 600; font-size: 14px; transition: border-color .12s, background-color .12s; }
.nv-nhom-muc:hover { border-color: #c9bea8; }
.nv-nhom-muc > input { width: 17px; height: 17px; margin: 0; accent-color: var(--vang-dam); flex: none; }
.nv-nhom-muc:has(input:checked) { border-color: var(--vang); background: var(--vang-nhat); }
.nv-nhom-muc:has(input:focus-visible) { box-shadow: var(--vong); }
.nv-khong-nhom { padding: 11px 13px; border: 1px dashed var(--vien-2); border-radius: 10px; font-size: 13.5px; color: var(--mo); }
.nv-thieu-nhom { font-size: 13px; color: var(--cam); font-weight: 600; margin-top: -6px; }

/* ---------- kết quả: link mời, mật khẩu tạm ---------- */
.nv-link-khoi { display: flex; gap: 8px; align-items: stretch; }
.nv-link-khoi > .o-nhap { flex: 1; font-family: Consolas, "SFMono-Regular", Menlo, monospace; font-size: 13px; background: var(--nen); }
.nv-buoc { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 5px; font-size: 14px; line-height: 1.5; color: var(--muc-2); }
.nv-bi-mat-khoi { display: flex; flex-direction: column; border: 1px solid var(--vien); border-radius: 12px; overflow: hidden; background: var(--nen); }
.nv-bi-mat { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 14px; min-width: 0; }
.nv-bi-mat + .nv-bi-mat { border-top: 1px solid var(--vien); }
.nv-bi-mat-nhan { flex: none; width: 112px; font-size: 13px; color: var(--mo); }
.nv-bi-mat-chu { flex: 1; min-width: 0; font-family: Consolas, "SFMono-Regular", Menlo, monospace; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; user-select: all; }
.nv-bi-mat-to .nv-bi-mat-chu { font-size: 20px; letter-spacing: .04em; }
.nv-hau-qua { margin: 8px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 5px; font-size: 13.5px; line-height: 1.5; color: var(--muc-2); }

/* ---------- đầu hộp sửa ---------- */
.nv-sua-dau { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border: 1px solid var(--vien); border-radius: 12px; background: var(--nen); min-width: 0; }
.nv-sua-chu { flex: 1; min-width: 0; }
.nv-sua-ten { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- tab Vai trò ---------- */
.nv-dan-vai { margin-bottom: 14px; max-width: 78ch; }
.nv-vai-4 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.nv-vai-o { position: relative; padding: 13px 15px; }
.nv-vai-o .the-vai .huy-hieu { min-width: 78px; justify-content: center; }
.nv-vai-toi { border-color: var(--vang); box-shadow: 0 0 0 1px var(--vang); }
.nv-vai-ban { position: absolute; top: -10px; right: 12px; box-shadow: 0 0 0 2px #fff; }
.nv-mt th:not(:first-child) { text-align: center; width: 17%; }
.nv-mt td { vertical-align: top; }
.nv-mt td.bang-chinh { font-weight: 500; line-height: 1.45; }
.nv-mt .nv-mt-toi { background: #fdf8ee; }
.nv-mt tbody tr:hover .nv-mt-toi { background: #faf2e0; }
.nv-mt-muc > td { padding: 9px 14px 7px; background: var(--nen-2); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--mo); }
.nv-mt tbody tr.nv-mt-muc:hover { background: none; }
.nv-mt-o { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.nv-mt-hinh { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; flex: none; }
.nv-mt-duoc .nv-mt-hinh { background: var(--tot-nen); color: var(--tot); }
.nv-mt-khong .nv-mt-hinh { background: var(--xam-nen); color: var(--mo-2); }
.nv-mt-ghi { font-size: 12.5px; line-height: 1.4; color: var(--muc-2); }
.nv-mt-khong .nv-mt-ghi { color: var(--mo); }

/* ---------- máy tính bảng / cửa sổ hẹp: bớt cột "Lần cuối vào" để cột nút không bị cắt ---------- */
.nv-bang .bang-khung { overflow-x: auto; }
@media (min-width: 761px) and (max-width: 1080px) {
  .nv-bang-nguoi { table-layout: fixed; }
  .nv-bang-nguoi th:nth-child(5), .nv-bang-nguoi td.nv-o-luc { display: none; }
  .nv-bang-nguoi th, .nv-bang-nguoi td, .nv-bang-moi th, .nv-bang-moi td { padding-left: 10px; padding-right: 10px; }
  .nv-bang-nguoi th:nth-child(2) { width: 100px; }
  .nv-bang-nguoi th:nth-child(3) { width: 150px; }
  .nv-bang-nguoi th:nth-child(4) { width: 128px; }
  .nv-bang-nguoi th:nth-child(6) { width: 136px; }
  .nv-bang-nguoi td.bang-chinh { max-width: none; }
  .nv-o-ghi-chu { max-width: 170px; }
}
@media (min-width: 761px) and (max-width: 900px) {      /* hẹp nữa: nút Sửa / Tài khoản chỉ còn hình (vẫn có aria-label + gợi ý) */
  .nv-bang-nguoi th:nth-child(6) { width: 92px; }
  .nv-nut-gon > span { display: none; }
  .nv-nut-gon.nut-nho { width: 30px; padding: 0; }
}

/* ---------- điện thoại ---------- */
@media (max-width: 760px) {
  .nv-tom-tat { width: 100%; }
  .nv-bang-nguoi td.bang-chinh { max-width: none; }
  .nv-bang-nguoi td.bang-nut > * { margin-left: 0; }
  .nv-tt { align-items: flex-end; }
  .nv-nhom-o { justify-content: flex-end; }
  .nv-o-ghi-chu { max-width: none; }
  .nv-vai-luoi { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .nv-vai-the { padding: 13px; }
  .nv-vai-the > input, .nv-nhom-muc > input { width: 20px; height: 20px; }
  /* điện thoại: chỉ thẻ đang chọn bung danh sách quyền, thẻ khác thu gọn còn 1 dòng (chạm vào là bung) */
  .nv-vai-the:not(:has(input:checked)) .nv-vai-ds, .nv-vai-the:not(:has(input:checked)) .nv-vai-luu-y { display: none; }
  .nv-nhom-muc { min-height: 46px; flex: 1 1 140px; }
  .nv-link-khoi { flex-direction: column; }
  .nv-link-khoi > .o-nhap { flex: none; }
  .nv-bi-mat { flex-wrap: wrap; gap: 4px 10px; }
  .nv-bi-mat-nhan { width: 100%; }
  .nv-vai-4 { grid-template-columns: minmax(0, 1fr); }
  .nv-mt-muc > td { display: block; padding: 0; background: none; text-align: left; }
  .nv-mt tr.nv-mt-muc { background: var(--nen-2); padding: 8px 14px; }
  .nv-mt td.bang-chinh { font-weight: 650; }
  .nv-mt .nv-mt-toi { background: none; }
  .nv-mt td[data-nhan] { align-items: flex-start; }
  .nv-mt td[data-nhan]::before { font-weight: 600; color: var(--muc-2); padding-top: 2px; }
  .nv-mt-o { flex-direction: row-reverse; align-items: flex-start; text-align: right; gap: 8px; }
}
