/* Tab Khách hàng (tiền tố kh-). Theo design/KhachHang*.dc.html, PhoneKhachHang, KichHoatThe, KichHoatGoi.
   iPad 1180 là cỡ gốc; máy tính ≥ 1300px rộng hơn cột giữa; điện thoại < 768px xếp 1 cột, lướt cả trang. */
.kh-goc { display: flex; flex-direction: column; gap: 14px; height: 100%; min-height: 480px; }
.kh-the-khung { background: #fff; border: 1px solid var(--vien); border-radius: 16px; min-width: 0; }
.kh-nhan { padding: 4px 8px; font-size: calc(13px * var(--co-chu)); font-weight: 700; color: #8A8372; }
.kh-loi { background: #FFF5F4; border: 1px solid #E3B4AE; color: var(--canh-bao); border-radius: 10px; padding: 8px 10px; font-size: calc(13px * var(--co-chu)); font-weight: 500; line-height: 1.4; }

/* ===== Hàng trên: 3 ô chọn + ô tìm ===== */
.kh-tren { display: flex; align-items: center; gap: 12px; flex: none; }
.kh-seg { display: inline-flex; padding: 4px; border-radius: 14px; background: #E9E6DB; gap: 4px; flex: none; }
.kh-seg button { height: 38px; padding: 0 18px; border-radius: 10px; border: 0; background: none; font-weight: 700; font-size: calc(14px * var(--co-chu)); color: #5B5446; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.kh-seg button b { font-weight: 700; opacity: .55; margin-left: 2px; }
.kh-seg button.on { background: #fff; color: var(--xanh-dam); box-shadow: 0 1px 3px rgba(17, 57, 23, .18); }
.kh-tim { display: flex; align-items: center; gap: 10px; height: 48px; width: 330px; margin-left: auto; padding: 0 10px 0 14px; background: #fff; border: 1.5px solid var(--xanh-rung); border-radius: 12px; color: var(--chu-phu); min-width: 0; }
.kh-tim:focus-within { box-shadow: 0 0 0 3px rgba(45, 102, 53, .15); }
.kh-tim input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 16px; font-weight: 400; color: var(--chu); -webkit-appearance: none; appearance: none; }
.kh-tim.co-chu input { font-weight: 700; }
.kh-tim input::-webkit-search-cancel-button { display: none; }
.kh-tim input::placeholder { font-weight: 400; color: var(--chu-phu); }
.kh-tim-goi-y { font-size: calc(12px * var(--co-chu)); color: var(--chu-phu); white-space: nowrap; }
.kh-xoa-tim { width: 32px; height: 32px; border-radius: 9px; border: 0; background: var(--kem); color: var(--nau); display: inline-flex; align-items: center; justify-content: center; flex: none; }

/* ===== Thân: 3 cột ===== */
.kh-than { display: grid; gap: 16px; flex: 1; min-height: 0; grid-template-rows: minmax(0, 1fr); }
/* 2 bảng cạnh nhau (anh Ân dặn 30/10/2026): danh sách khách bên trái; bên phải thông tin khách, lướt xuống là thẻ, gói đã mua (tab Thẻ, gói) rồi lịch sử sử dụng */
.kh-l-khach .kh-than, .kh-l-the .kh-than, .kh-l-goi .kh-than { grid-template-columns: minmax(0, 3fr) minmax(340px, 2fr); grid-template-rows: minmax(0, 1fr); }
.kh-phai { min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 1px; -webkit-overflow-scrolling: touch; }
.kh-phai > * { flex: none; }
.kh-phai > .kh-cho-chon { flex: 1; }
.kh-phai .kh-cot-ct, .kh-phai .kh-ls, .kh-phai .kh-cot-the { overflow: visible; }
.kh-phai .kh-khach-nho { grid-column: auto; }
.kh-cho-chon { display: flex; align-items: center; justify-content: center; }

/* Danh sách khách */
.kh-cot-ds { padding: 10px; display: flex; flex-direction: column; gap: 4px; overflow: hidden; }
.kh-cot-ds.dang-tai .kh-bang-cuon { opacity: .5; pointer-events: none; }
.kh-av { width: 36px; height: 36px; border-radius: 50%; background: var(--avatar); color: var(--xanh-rung); font-weight: 700; font-size: calc(14px * var(--co-chu)); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.kh-av.lon { width: 48px; height: 48px; font-size: calc(18px * var(--co-chu)); }
.kh-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 700; white-space: nowrap; flex: none; }
.kh-tag.moi { color: #2B4C70; background: #E2EBF5; }
.kh-tag.cu { color: #5B4A86; background: #EEEAF6; }
.kh-tag.than-thiet { color: #7A4E05; background: #FBEBC8; }
.kh-tag.doan { color: #1D4A27; background: #DDEFDF; }
.kh-tag.xam { color: #6B6557; background: #ECEAE3; }

/* Chi tiết khách (tab Khách hàng) */
.kh-cot-ct { padding: 16px 18px; display: flex; flex-direction: column; overflow-y: auto; }
.kh-ct-dau { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.kh-ct-ten { font-size: calc(17px * var(--co-chu)); display: block; }
.kh-ct-dau .kh-tag { margin-top: 3px; }
.kh-hang { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid #F0ECE2; font-size: calc(13.5px * var(--co-chu)); }
.kh-hang span { width: 110px; flex: none; color: var(--chu-phu); }
.kh-hang b { font-weight: 500; min-width: 0; overflow-wrap: anywhere; }

/* Lịch sử sử dụng */
.kh-ls { padding: 16px 18px; display: flex; flex-direction: column; overflow-y: auto; min-height: 0; }
.kh-ls-tieu { margin: 0 0 6px; font-size: calc(16px * var(--co-chu)); font-weight: 700; color: var(--xanh-dam); }
.kh-ls-ds { list-style: none; margin: 0; padding: 0; }
.kh-ls-ds li { border-bottom: 1px solid #EEEAE0; }
.kh-ls-ds li:last-child { border-bottom: 0; }
.kh-ls-dong { width: 100%; display: flex; gap: 10px; padding: 12px 0; background: none; border: 0; text-align: left; border-radius: 8px; }
button.kh-ls-dong:hover { background: #FAFAF7; }
.kh-cham-ls { width: 8px; height: 8px; border-radius: 50%; background: var(--xanh-rung); margin-top: 6px; flex: none; }
.kh-ls-chu { flex: 1; min-width: 0; font-size: calc(13px * var(--co-chu)); line-height: 1.45; display: flex; flex-direction: column; }
.kh-ls-dau { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.kh-ls-dau b:first-child { font-weight: 700; }
.kh-ls-tien { color: var(--xanh-dam); font-weight: 700; flex: none; white-space: nowrap; }
.kh-ls-dang { color: var(--xanh-dam); flex: none; white-space: nowrap; }
.kh-ls-do { color: var(--canh-bao); flex: none; white-space: nowrap; }
.kh-ls-xam { color: var(--chu-phu); flex: none; white-space: nowrap; }
.kh-ls-tom { color: var(--chu-phu); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Cột giữa của tab thẻ, gói */
.kh-giua { display: contents; }
.kh-khach-nho { grid-column: 1 / -1; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.kh-khach-nho-dau { display: flex; align-items: center; gap: 12px; }
.kh-khach-nho-dau > span { min-width: 0; display: flex; flex-direction: column; }
.kh-khach-nho-dau b { font-size: calc(17px * var(--co-chu)); }
.kh-khach-nho-phu { font-size: calc(12.5px * var(--co-chu)); color: var(--chu-phu); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kh-chip-hang { display: flex; flex-wrap: wrap; gap: 8px; flex: none; }
.kh-phu-ngan { display: none; }

/* ===== Thẻ, gói đã mua ===== */
.kh-cot-the { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; min-height: 0; }
.kh-the-tren { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kh-the-tren h3 { margin: 0; font-size: calc(16px * var(--co-chu)); font-weight: 700; color: var(--xanh-dam); }
.kh-the-tren span { font-size: calc(12px * var(--co-chu)); color: var(--chu-phu); }
.kh-the-ds { display: flex; flex-direction: column; gap: 12px; padding: 6px; }
.kh-the { border-radius: 16px; background: linear-gradient(135deg, #113917, #2D6635); color: #F0FBF2; }
.kh-the.xam { background: linear-gradient(135deg, #D9D6CE, #ECEAE4); color: #6B6557; }
.kh-the.chon { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--xanh-rung); }
.kh-the-dau { width: 100%; display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: 0; background: none; color: inherit; text-align: left; border-radius: 16px; }
.kh-the-hang { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.kh-the-ten { font-size: calc(14px * var(--co-chu)); line-height: 1.3; }
.kh-the-ma { font-size: 11px; letter-spacing: .08em; opacity: .75; white-space: nowrap; }
.kh-the-ma.chua-co { letter-spacing: 0; font-style: italic; }
.kh-the-so { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; min-width: 0; }
.kh-the-so b { font-size: calc(24px * var(--co-chu)); flex: none; }
.kh-the-so span { font-size: calc(12px * var(--co-chu)); opacity: .85; overflow: hidden; text-overflow: ellipsis; }
.kh-thanh { display: block; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .25); overflow: hidden; }
.kh-thanh i { display: block; height: 6px; border-radius: 3px; background: #9CD27A; }
.kh-the.xam .kh-thanh i { background: #B3AFA4; }
.kh-giu { align-self: flex-start; font-size: calc(12px * var(--co-chu)); font-weight: 700; padding: 3px 9px; border-radius: 8px; background: rgba(255, 255, 255, .2); }
.kh-dung { margin: 0 14px 12px; padding: 10px; border-radius: 12px; background: rgba(255, 255, 255, .12); display: flex; flex-direction: column; gap: 8px; }
.kh-dung-hang { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: calc(13px * var(--co-chu)); }
.kh-buoc { display: inline-flex; align-items: center; gap: 2px; background: #fff; color: var(--xanh-dam); border-radius: 10px; padding: 3px; }
.kh-buoc button { width: 38px; height: 38px; border-radius: 8px; border: 0; background: none; color: var(--xanh-rung); display: inline-flex; align-items: center; justify-content: center; }
.kh-buoc button:disabled { opacity: .35; }
.kh-buoc b { min-width: 30px; text-align: center; font-size: calc(16px * var(--co-chu)); }
.kh-nut-sang { width: 100%; height: 46px; border-radius: 12px; border: 0; background: #F0FBF2; color: var(--xanh-dam); font-weight: 700; font-size: calc(14.5px * var(--co-chu)); display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.kh-nut-sang:disabled { opacity: .6; }
.kh-nut-chu { width: 100%; min-height: 40px; background: none; border: 0; color: #F0FBF2; font-weight: 500; font-size: calc(13px * var(--co-chu)); text-decoration: underline; text-underline-offset: 3px; }
.kh-dung-bao { font-size: calc(13px * var(--co-chu)); line-height: 1.5; }
.kh-them-hd { display: flex; flex-direction: column; gap: 8px; }
.kh-them-kq { display: flex; flex-direction: column; gap: 8px; font-size: calc(13.5px * var(--co-chu)); }
.kh-them-tin { font-size: calc(13px * var(--co-chu)); opacity: .85; }

/* ===== Kích hoạt thẻ, gói (hộp thoại) ===== */
.kh-kh-form { display: flex; flex-direction: column; gap: 14px; }
.kh-cho-ds { list-style: none; margin: 0; padding: 0; max-height: 178px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.kh-cho-ds button { width: 100%; min-height: 52px; padding: 8px 12px; border-radius: 12px; border: 1.5px solid var(--vien-dam); background: #fff; text-align: left; display: flex; flex-direction: column; gap: 1px; }
.kh-cho-ds button.on { border-color: var(--xanh-rung); background: #F0FBF2; }
.kh-cho-ds b { font-size: calc(14px * var(--co-chu)); }
.kh-cho-ds span { font-size: calc(12.5px * var(--co-chu)); color: var(--chu-phu); }
.kh-cho .kh-nhan { padding-left: 0; }
.kh-kh-hero { display: flex; align-items: center; gap: 16px; padding: 14px; border-radius: 16px; background: linear-gradient(135deg, #113917, #2D6635); color: #F0FBF2; }
.kh-kh-the-nho { width: 120px; height: 76px; flex: none; border-radius: 10px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .35); padding: 9px 10px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.kh-kh-the-nho img { height: 20px; width: auto; align-self: flex-start; filter: brightness(0) invert(1); }
.kh-kh-the-nho b { font-size: 11px; letter-spacing: .08em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kh-kh-hero-chu { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kh-kh-hero-chu b { font-size: calc(17px * var(--co-chu)); line-height: 1.25; }
.kh-kh-hero-chu span { font-size: calc(13px * var(--co-chu)); opacity: .9; }
.kh-o-nhap { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.kh-o-nhap label { font-size: 13px; font-weight: 700; color: var(--nau); }
.kh-o-nhap label i { color: var(--canh-bao); font-style: normal; }
.kh-o-ma, .kh-o-doc { height: 48px; width: 100%; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1.5px solid var(--vien-dam); border-radius: 10px; background: var(--ban-ghi); color: var(--chu-phu); min-width: 0; text-align: left; }
.kh-o-ma:focus-within { border-color: var(--xanh-rung); background: #fff; box-shadow: 0 0 0 3px rgba(45, 102, 53, .15); }
.kh-o-ma input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 16px; color: var(--chu); }
.kh-o-ma span { font-size: calc(12px * var(--co-chu)); white-space: nowrap; }
#kh-ma { font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
#kh-ma::placeholder { font-weight: 400; letter-spacing: 0; text-transform: none; color: #A39C8B; }
.kh-o-doc { justify-content: space-between; cursor: pointer; }
.kh-o-doc b { color: var(--chu); font-size: calc(16px * var(--co-chu)); font-weight: 500; }
.kh-giu-sdt { flex: none; height: 32px; padding: 0 10px; border-radius: 8px; border: 0; background: var(--kem); color: var(--xanh-rung); font-size: calc(12px * var(--co-chu)); font-weight: 700; }
.kh-o-nhap.co-loi .kh-o-ma { border-color: #D9534F; background: #FFF5F4; }
.kh-kh-hai { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kh-luu-y { padding: 12px 14px; border-radius: 10px; background: #FFF6E1; color: #7A4E05; font-size: calc(13px * var(--co-chu)); line-height: 1.5; }
.kh-kh-hops { display: flex; flex-wrap: wrap; gap: 10px; }   /* ô lẻ cuối hàng giãn hết hàng, nằm giữa */
.kh-kh-hop { flex: 1 1 150px; min-width: 0; padding: 10px 14px; border-radius: 12px; background: #F0FBF2; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.kh-kh-hop.rong { flex-basis: 100%; }
.kh-kh-hop span { font-size: calc(13px * var(--co-chu)); font-weight: 700; color: var(--chu-phu); }
.kh-kh-hop b { font-size: calc(17px * var(--co-chu)); color: var(--xanh-dam); }
.kh-kh-xong { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px 0 2px; text-align: center; }
.kh-kh-xong .kh-kh-hops { width: 100%; margin-top: 8px; text-align: left; }
.kh-kh-dau-tich { width: 56px; height: 56px; border-radius: 50%; background: #E3F1E5; color: var(--xanh-rung); display: inline-flex; align-items: center; justify-content: center; }
.kh-kh-xong-tieu { font-size: calc(18px * var(--co-chu)); color: var(--xanh-dam); }
.kh-kh-xong-phu { font-size: calc(13.5px * var(--co-chu)); color: var(--chu-phu); }
.kh-chan { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; }
.kh-chan-chu { flex: 1; min-width: 0; font-size: calc(13px * var(--co-chu)); color: var(--chu-phu); line-height: 1.4; }
.kh-chan-nut { display: flex; gap: 10px; flex: none; }
.kh-nut-xanh, .kh-nut-phu { height: 48px; padding: 0 24px; border-radius: 12px; font-weight: 700; font-size: calc(15px * var(--co-chu)); display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; border: 1.5px solid transparent; flex: none; }
.kh-nut-xanh { background: var(--xanh-rung); color: #fff; }
.kh-nut-phu { background: #fff; border-color: var(--vien-dam); color: var(--chu); }
.kh-nut-xanh:disabled { opacity: .5; cursor: not-allowed; }

/* ===== iPad dọc: 2 bảng chồng nhau (trên: danh sách, dưới: thông tin khách và lịch sử) ===== */
@media (min-width: 768px) and (max-width: 1023px) {
  .kh-l-khach .kh-than, .kh-l-the .kh-than, .kh-l-goi .kh-than { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 5fr) minmax(0, 6fr); }
}
/* ===== Máy tính: cột giữa rộng hơn ===== */

/* ===== Điện thoại: 1 cột, lướt cả trang ===== */
@media (max-width: 767px) {
  .kh-goc { height: auto; min-height: 0; gap: 10px; }
  .kh-tren { flex-direction: column-reverse; align-items: stretch; gap: 10px; }
  .kh-tim { width: 100%; margin-left: 0; }
  .kh-tim-goi-y { display: none; }
  .kh-seg { display: flex; }
  .kh-seg button { flex: 1; justify-content: center; padding: 0 6px; font-size: calc(13.5px * var(--co-chu)); }
  .kh-than, .kh-l-khach .kh-than, .kh-l-the .kh-than, .kh-l-goi .kh-than { display: flex; flex-direction: column; gap: 12px; }
  .kh-cho-chon { grid-column: auto; }
  .kh-cot-ds { background: none; border: 0; padding: 0; overflow: visible; }
  .kh-cot-ct, .kh-ls, .kh-cot-the { overflow: visible; }
  .kh-cot-the { background: none; border: 0; padding: 0; }
  .kh-the-tren { display: none; }
  .kh-the-ds { padding: 4px 6px; }
  .kh-giua, .kh-phai { display: contents; }
  .kh-khach-nho { order: 1; padding: 12px 14px; display: flex; align-items: center; gap: 10px; }
  .kh-khach-nho-dau { flex: 1; min-width: 0; }
  .kh-chip-hang { margin-top: 0; flex: none; }
  .kh-chip-hang .kh-tag.xam, .kh-phu-dai { display: none; }
  .kh-phu-ngan { display: block; font-size: calc(12.5px * var(--co-chu)); }
  .kh-cot-the { order: 2; }
  .kh-giua .kh-ls { order: 3; }
  .kh-hang span { width: 104px; }
  /* Chữ trên điện thoại không nhỏ hơn 13px (chữ thường 14px trở lên); nhãn chip giữ cỡ nhỏ như thiết kế */
  .kh-nhan { font-size: calc(13px * var(--co-chu)); }
  .kh-hang, .kh-ls-chu, .kh-the-ten, .kh-dung-hang, .kh-dung-bao, .kh-them-kq, .kh-o-nhap label, .kh-luu-y, .kh-chan-chu { font-size: 14px; }
  .kh-khach-nho-phu, .kh-phu-ngan, .kh-the-so span, .kh-the-ma, .kh-giu, .kh-cho-ds span, .kh-kh-hero-chu span { font-size: calc(13px * var(--co-chu)); }
  .kh-tag { font-size: calc(12px * var(--co-chu)); }
  .kh-kh-hero { flex-direction: column; align-items: flex-start; gap: 12px; }
  .kh-kh-hai { grid-template-columns: 1fr; }
  .kh-chan { flex-direction: column; align-items: stretch; gap: 12px; }
  .kh-chan-nut { flex-direction: column; }
  .kh-nut-xanh, .kh-nut-phu { width: 100%; }
}
/* Tab Khách hàng không còn ô Thẻ, Gói: ô tìm nằm trái, rộng hơn */
.kh-tren.chi-tim .kh-tim { margin-left: 0; width: min(520px, 100%); }

/* Thẻ, gói chờ kích hoạt trong cột của khách + chọn ngày kích hoạt (Hôm nay / Ngày mai) */
.kh-the-cho { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 14px; border: 1.5px dashed #B9D4BD; background: #F7FBF7; }
.kh-cho-dau { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kh-cho-dau b { font-size: calc(14.5px * var(--co-chu)); }
.kh-cho-nhan { flex: none; padding: 2px 9px; border-radius: 999px; background: #FFF3D6; color: #8A5A00; font-size: calc(12px * var(--co-chu)); font-weight: 700; }
.kh-cho-phu { font-size: calc(12.5px * var(--co-chu)); color: var(--chu-phu); line-height: 1.4; }
.kh-ngay-kh { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kh-ngay-kh button { min-height: 44px; border-radius: 10px; border: 1.5px solid var(--vien-dam); background: #fff; color: var(--chu); font: inherit; font-weight: 700; font-size: calc(14px * var(--co-chu)); display: inline-flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.2; cursor: pointer; }
.kh-ngay-kh button small { font-weight: 500; font-size: calc(12px * var(--co-chu)); color: var(--chu-phu); }
.kh-ngay-kh button.on { border-color: var(--xanh-rung); background: #EAF6EC; color: var(--xanh-dam); }
.kh-nut-xanh-cho { width: 100%; height: 46px; border-radius: 12px; border: 0; background: var(--xanh-rung); color: #fff; font: inherit; font-weight: 700; font-size: calc(14.5px * var(--co-chu)); display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.kh-nut-xanh-cho:disabled { opacity: .6; }
.kh-hop-ngay { flex: 1 1 100%; display: flex; flex-direction: column; gap: 6px; font-size: calc(13px * var(--co-chu)); color: var(--chu-phu); }

/* Bảng khách ở ô Thẻ, gói: STT, Tên, SĐT, Đối tượng, Địa chỉ, Trạng thái, Còn lại, Ngày kích hoạt, Ghi chú */
.kh-bang-cuon { flex: 1; min-height: 0; overflow: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--vien); border-radius: 12px; }
.kh-bang { width: 100%; min-width: 700px; table-layout: fixed; border-collapse: separate; border-spacing: 0; font-size: calc(13px * var(--co-chu)); }
.kh-bang th { position: sticky; top: 0; z-index: 2; background: #F5F2E9; text-align: left; padding: 9px 10px; font-size: calc(13px * var(--co-chu)); font-weight: 700; color: var(--chu-phu); border-bottom: 1px solid var(--vien); }
.kh-bang td { padding: 8px 10px; background: #fff; border-bottom: 1px solid #EEEAE0; vertical-align: middle; line-height: 1.3; }
.kh-bang tbody tr { cursor: pointer; }
.kh-bang tbody tr:hover td { background: #FAF8F2; }
.kh-bang tbody tr.on td { background: #F0FBF2; }
.kh-bang tbody tr.on td.stt { box-shadow: inset 3px 0 0 var(--xanh-rung); }
.kh-bang .stt { width: 52px; text-align: center; color: var(--chu-phu); position: sticky; left: 0; z-index: 1; }
.kh-bang th.stt { z-index: 3; }
.kh-bang .ten { position: sticky; left: 52px; z-index: 1; box-shadow: 1px 0 0 var(--vien); }
.kh-bang th.ten { z-index: 3; }
.kh-bang .so { white-space: nowrap; }
.kh-bang td { overflow-wrap: anywhere; }
.kh-bang-ten { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: var(--chu); text-align: left; cursor: pointer; }
.kh-bang-goi-y { display: none; margin: 0 2px 6px; font-size: 12.5px; color: var(--chu-phu); }
.kh-ghi { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kh-trong { color: var(--chu-phu); }
.kh-o { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; white-space: nowrap; }
.kh-o b { color: var(--xanh-dam); font-size: calc(13px * var(--co-chu)); }
.kh-o small { font-size: calc(11.5px * var(--co-chu)); color: var(--chu-phu); }
.kh-o small.cam { color: #8A5A00; }
.kh-tt { padding: 2px 8px; border-radius: 999px; font-weight: 700; font-size: calc(11.5px * var(--co-chu)); white-space: nowrap; }
.kh-tt.da { background: #E6F4E8; color: #1F6B2B; }
.kh-tt.chua { background: #FFF3D6; color: #8A5A00; }
.kh-tt.het { background: #EEEBE3; color: #6B6557; }
@media (max-width: 767px) {
  .kh-cot-ds.bang { background: #fff; border: 1px solid var(--vien); border-radius: 16px; padding: 8px; }
  .kh-bang .stt { position: static; }
  .kh-bang .ten { left: 0; }
  .kh-bang th.stt { position: static; }
  .kh-bang td, .kh-bang th { padding: 10px 10px; }
  .kh-bang-ten { font-size: 14px; }
  .kh-bang-goi-y { display: block; }
}

/* Khung hẹp (iPad, cửa sổ nhỏ): bảng bỏ 2 cột Đối tượng, Địa chỉ (xem mh/khach-hang/danh-sach.js, useKhungHep) nên hẹp hơn; thẻ khách nhỏ cho chip xuống dòng */
@media (min-width: 768px) and (max-width: 1299px) { .kh-bang { min-width: 560px; } }
.kh-phai .kh-khach-nho { flex-wrap: wrap; row-gap: 8px; }
