/* trang/nhom.css — kiểu riêng của màn Nhóm kênh (tiền tố nk-). Thành phần dùng chung: chung.css */

.nk-luu-y-dau { margin-bottom: 16px; }
.nk-ds { display: flex; flex-direction: column; gap: 16px; }

/* ---------- thẻ nhóm ---------- */
.nk-the { --mau: var(--mo-2); border-top: 3px solid var(--mau); transition: box-shadow .12s, border-color .12s; }
.nk-chua-xep { border-top-color: var(--vien-2); border-style: dashed; border-top-style: dashed; background: #fdfbf7; }
.nk-dau { display: flex; align-items: center; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--vien); }
.nk-mau { width: 14px; height: 14px; border-radius: 4px; background: var(--mau); flex: none; }
.nk-mau-rong { background: transparent; border: 2px dashed var(--mo-2); }
.nk-dau-chu { flex: 1; min-width: 0; }
.nk-ten { font-size: 17px; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; overflow-wrap: anywhere; }
.nk-tom-tat { font-size: 13px; color: var(--mo); margin-top: 1px; line-height: 1.45; }
.nk-dau-nut { display: flex; align-items: center; gap: 6px; flex: none; }

.nk-than { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr) minmax(0, 1.12fr); }
.nk-than-1 { grid-template-columns: minmax(0, 1fr); }
.nk-cot { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px 18px; min-width: 0; }
.nk-cot + .nk-cot { border-left: 1px solid var(--vien); }
.nk-muc { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--mo); }
.nk-rong { padding: 11px 13px; border: 1px dashed var(--vien-2); border-radius: 10px; font-size: 13px; line-height: 1.5; color: var(--mo); }
.nk-ghi-chu { font-size: 12.5px; line-height: 1.5; color: var(--mo); }
.nk-dan { font-size: 13.5px; line-height: 1.5; color: var(--muc-2); }

/* ---------- kênh ---------- */
.nk-vung-kenh { display: flex; flex-direction: column; gap: 6px; }
.nk-vung-luoi { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.nk-kenh { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 48px; padding: 6px 6px 6px 8px; border: 1px solid var(--vien); border-radius: 10px; background: #fff; transition: border-color .12s, box-shadow .12s, opacity .12s; }
.nk-kenh[draggable="true"] { cursor: grab; }
.nk-kenh[draggable="true"]:hover { border-color: var(--vien-2); box-shadow: var(--bong); }
.nk-kenh[draggable="true"]:active { cursor: grabbing; }
.nk-keo { color: var(--mo-2); flex: none; margin-right: -4px; }
.nk-kenh-chu { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.nk-kenh-ten { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nk-kenh-phu { font-size: 12.5px; color: var(--mo); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nk-kenh-loi { border-color: #f0c2bd; background: #fffaf9; }
.nk-kenh-loi .nk-kenh-phu b { color: var(--do); font-weight: 600; }
.nk-kenh.nk-dang-keo { opacity: .4; }
.nk-nut-chuyen { color: var(--mo); }
.nk-nut-chuyen:hover { color: var(--muc); }
.nk-cham-rong { background: transparent; border: 1.5px dashed var(--mo-2); }

/* đang kéo 1 kênh: các nhóm khác hiện là chỗ thả được */
.nk-keo-man .nk-the:not(.nk-nguon) { border-color: var(--vien-2); box-shadow: 0 0 0 2px rgba(184, 147, 90, .16); }
.nk-keo-man .nk-the.nk-tha { border-color: var(--vang); box-shadow: 0 0 0 3px rgba(184, 147, 90, .45), var(--bong); background: #fffcf5; }
.nk-keo-man .nk-the * { pointer-events: none; }
.nk-keo-man .nk-the .nk-dang-keo { pointer-events: auto; }

/* ---------- thành viên ---------- */
.nk-ds-nguoi { display: flex; flex-direction: column; gap: 2px; }
.nk-nguoi { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; min-width: 0; padding: 5px 0; }
.nk-nguoi-ten { flex: 1 1 96px; min-width: 0; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nk-nguoi-khoa .nk-nguoi-ten { color: var(--mo); font-weight: 500; }
.nk-nguoi-khoa .anh-dd { opacity: .55; }

/* ---------- cách làm việc ---------- */
.nk-cong-tac { display: flex; }
.nk-chia-dau { font-size: 13.5px; font-weight: 600; color: var(--muc-2); margin-top: 4px; }
.nk-chia { display: flex; flex-direction: column; gap: 6px; }
.nk-chia-muc { display: flex; align-items: flex-start; gap: 10px; padding: 9px 11px; border: 1px solid var(--vien-2); border-radius: 10px; background: #fff; cursor: pointer; transition: border-color .12s, background-color .12s; }
.nk-chia-muc:hover { border-color: #c9bea8; }
.nk-chia-muc > input { width: 16px; height: 16px; margin: 3px 0 0; accent-color: var(--vang-dam); flex: none; }
.nk-chia-muc:has(input:checked) { border-color: var(--vang); background: var(--vang-nhat); }
.nk-chia-muc:has(input:focus-visible) { box-shadow: var(--vong); }
.nk-chia-muc:has(input:disabled) { opacity: .6; cursor: progress; }
.nk-chia-chu { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nk-chia-ten { font-weight: 650; font-size: 14px; }
.nk-chia-mo-ta { font-size: 12.5px; line-height: 1.45; color: var(--mo); }
.nk-doc { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border: 1px solid var(--vien); border-radius: 10px; background: #fdfbf7; }
.nk-doc-dau { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nk-doc-ten { font-weight: 600; font-size: 14px; flex: 1 1 auto; min-width: 0; }

/* ---------- giải thích vai ở cuối màn ---------- */
.nk-vai { margin-top: 18px; }
.nk-vai-luoi { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 26px; }
.nk-vai-luoi .the-vai .huy-hieu { min-width: 78px; justify-content: center; }

/* ---------- hộp chọn người / chọn kênh ---------- */
.nk-hop-than { display: flex; flex-direction: column; gap: 12px; }
.nk-chon-ds { display: flex; flex-direction: column; border: 1px solid var(--vien); border-radius: 12px; overflow: hidden; background: #fff; }
.nk-chon-dong { display: flex; align-items: center; gap: 11px; min-height: 54px; padding: 8px 12px; border-bottom: 1px solid var(--vien); cursor: pointer; min-width: 0; }
.nk-chon-ds > .nk-chon-dong:last-of-type { border-bottom: 0; }
.nk-chon-dong:hover { background: #fdfaf4; }
.nk-chon-dong > input { width: 18px; height: 18px; margin: 0; accent-color: var(--vang-dam); flex: none; }
.nk-chon-dong:has(input:checked) { background: var(--vang-nhat); }
.nk-chon-dong: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 */
.nk-chon-dong:has(input:focus-visible) { box-shadow: inset 0 0 0 2px var(--vang); }
.nk-chon-chu { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.nk-chon-ten { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nk-chon-khoa { color: var(--do); font-weight: 500; }
.nk-chon-phu { font-size: 12.5px; color: var(--mo); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nk-chon-ds > .nk-rong { border: 0; border-radius: 0; text-align: center; }
.nk-dem { font-size: 13.5px; color: var(--muc-2); }
.nk-giai-vai { border: 1px solid var(--vien); border-radius: 12px; background: #fdfbf7; }
.nk-giai-vai > summary { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 13px; font-size: 13.5px; font-weight: 600; color: var(--vang-chu); cursor: pointer; list-style: none; border-radius: 12px; }
.nk-giai-vai > summary::-webkit-details-marker { display: none; }
.nk-giai-vai > summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .12s; flex: none; margin-left: 2px; }
.nk-giai-vai[open] > summary::before { transform: rotate(45deg); }
.nk-giai-vai-than { display: flex; flex-direction: column; gap: 10px; padding: 4px 13px 13px; }
.nk-giai-vai-than .huy-hieu { min-width: 78px; justify-content: center; }
.nk-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); }

/* ---------- chọn màu ---------- */
.nk-bang-mau { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.nk-o-mau { width: 32px; height: 32px; border-radius: 50%; background: var(--mau); color: #fff; display: inline-flex; align-items: center; justify-content: center; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--vien-2); flex: none; transition: box-shadow .12s, transform .06s; }
.nk-o-mau > svg { display: none; }
.nk-o-mau:hover { box-shadow: 0 0 0 2px var(--mo-2); }
.nk-o-mau.chon { box-shadow: 0 0 0 2px var(--muc); }
.nk-o-mau.chon > svg { display: block; }
.nk-o-mau:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--muc), var(--vong); border-radius: 50%; }
.nk-mau-khac-khoi { width: 32px; height: 32px; border-radius: 50%; overflow: hidden; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--vien-2); flex: none; cursor: pointer; position: relative; background: conic-gradient(#b3261e, #d35400, #b8860b, #4a7c2a, #2e7d6b, #2c5b8a, #8e44ad, #c2185b, #b3261e); }
.nk-mau-khac-khoi.chon { box-shadow: 0 0 0 2px var(--muc); }
.nk-mau-khac-khoi:not(.chon) > .nk-mau-khac { opacity: 0; }
.nk-mau-khac { position: absolute; inset: -8px; width: calc(100% + 16px); height: calc(100% + 16px); padding: 0; border: 0; background: none; cursor: pointer; }

/* ---------- màn hẹp / điện thoại ---------- */
@media (max-width: 1000px) {
  .nk-than { grid-template-columns: minmax(0, 1fr); }
  .nk-cot + .nk-cot { border-left: 0; border-top: 1px solid var(--vien); }
}
@media (max-width: 760px) {
  .nk-dau { padding: 12px 14px; gap: 10px; flex-wrap: wrap; }
  .nk-dau-chu { flex-basis: calc(100% - 26px); }
  .nk-dau-nut { width: 100%; }
  .nk-dau-nut > .nut:not(.nut-bt) { flex: 1 1 auto; }
  .nk-cot { padding: 14px 14px 16px; }
  .nk-kenh { min-height: 56px; }
  .nk-vung-luoi { grid-template-columns: minmax(0, 1fr); }
  .nk-vai-luoi { grid-template-columns: minmax(0, 1fr); }
  .nk-chia-muc { padding: 12px; }
  .nk-chon-dong { min-height: 60px; }
  .nk-chon-dong > input, .nk-chia-muc > input { width: 20px; height: 20px; }
  .nk-o-mau, .nk-mau-khac-khoi { width: 44px; height: 44px; }
}
