/* ============================================================
   hchopchon.css - HỘP CHỌN DANH SÁCH THẺ dùng chung (HcHopChon.js, 21/10/2026). Tiền tố hchc-.
   KHUÔN CHUẨN hộp "Cấp bổ sung" (cap-hang-b.html, anh chốt 20/10): nền xám đệm 12 · một khung trắng có đầu cột (chữ 15px + biểu tượng +
   gạch xanh 2px + nhãn "Đã chọn n") · thẻ một dòng 36px viền mảnh bo 8 cách 4px · combo nhóm = dòng phẳng · kéo góc dưới phải đổi cỡ.
   ============================================================ */
.hchc { position: fixed; z-index: 1055; top: 8px; background: #f5f6f8; border: 1px solid #d0d5dd; border-radius: 10px; box-shadow: 0 12px 32px rgba(16,24,40,.18);
        padding: 12px; display: flex; flex-direction: column; box-sizing: border-box; font: 14px/1.4 "Segoe UI", Roboto, Arial, sans-serif; color: #101828; --xanh: #1d4ed8; }
.hchc *, .hcdvt * { box-sizing: border-box; }
.hchc-khung { flex: 1; min-height: 0; background: #fff; border: 1px solid #dfe4eb; border-radius: 10px; padding: 10px; display: flex; flex-direction: column; min-width: 0; position: relative; }
.hchc-dau { display: flex; align-items: center; gap: 8px; height: 40px; padding-bottom: 6px; margin: 0 2px 10px; border-bottom: 2px solid var(--xanh); flex: none; }
.hchc-dau .ic { font-size: 19px; color: var(--xanh); } .hchc-dau b { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hchc-dem { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--xanh); background: #e0eaff; border-radius: 999px; padding: 2px 10px; white-space: nowrap; } .hchc-dem:empty { display: none; }
.hchc-loc { display: flex; gap: 6px; margin-bottom: 8px; flex: none; align-items: center; }
.hchc-tim { position: relative; flex: 1; min-width: 0; }
.hchc-tim i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: #98a2b3; font-size: 16px; }
.hchc-tim input { width: 100%; height: 34px; border: 1px solid #d0d5dd; border-radius: 8px; padding: 0 10px 0 32px; font: inherit; font-size: 13.5px; outline: none; background: #fff; }
.hchc-tim input:focus { border-color: #84adff; box-shadow: 0 0 0 3px #dbe5fd; }
.hchc-combo { flex: none; width: 160px; height: 34px; display: flex; align-items: center; gap: 6px; padding: 0 8px 0 10px; border: 1px solid #d0d5dd; border-radius: 8px; background: #fff; font: inherit; font-size: 13px; color: #101828; cursor: pointer; text-align: left; }
.hchc-combo span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hchc-combo i { color: #667085; transition: transform .15s; } .hchc-combo.mo { border-color: #84adff; box-shadow: 0 0 0 3px #dbe5fd; } .hchc-combo.mo i { transform: rotate(180deg); }
.hchc-cbds { display: none; position: absolute; width: 260px; z-index: 2; background: #fff; border: 1px solid #d0d5dd; border-radius: 10px; box-shadow: 0 12px 32px rgba(16,24,40,.18); padding: 4px; }
.hchc-cbds.mo { display: block; max-height: 300px; overflow: auto; }
.hchc-cbds button { display: flex; width: 100%; align-items: center; gap: 9px; padding: 8px 10px; border: 0; background: none; border-radius: 6px; cursor: pointer; font: inherit; font-size: 14px; text-align: left; color: #101828; }
.hchc-cbds button:hover { background: #f2f4f7; } .hchc-cbds button.chon { background: #eef4ff; color: var(--xanh); font-weight: 600; }
.hchc-cbds button i { width: 16px; font-size: 16px; color: var(--xanh); flex: none; } .hchc-cbds button small { margin-left: auto; font-size: 12px; color: #98a2b3; font-weight: 400; }
.hchc-ngay { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #475467; font-weight: 600; white-space: nowrap; flex: none; margin: 0; }
.hchc-ngay input { width: 140px; height: 34px; border: 1px solid #d0d5dd; border-radius: 8px; padding: 0 8px; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.hchc-ngay input:focus { outline: none; border-color: #84adff; box-shadow: 0 0 0 3px #dbe5fd; }
.hchc-ds { display: flex; flex-direction: column; gap: 4px; overflow-y: auto; flex: 1; min-height: 0; padding-right: 2px; }
.hchc-nhom { display: flex; align-items: center; gap: 6px; font-size: 11.5px; text-transform: uppercase; color: #98a2b3; font-weight: 700; padding: 10px 2px 2px; letter-spacing: .3px; flex: none; }
.hchc-nhom:first-child { padding-top: 0; } .hchc-nhom i { font-style: normal; color: #c0c6d0; } .hchc-nhom.chon { color: var(--xanh); }
.hchc-the { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 8px; border: 1px solid #e4e7ec; border-radius: 8px; background: #fff; cursor: pointer; user-select: none; min-width: 0; font-size: 13.5px; color: #344054; flex: none; }
.hchc-the:hover { border-color: #98a2b3; }
.hchc-the .chu { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hchc-the.bat { background: #eef4ff; border-color: #b2ccf5; color: #1d3a8a; font-weight: 600; }
.hchc-the.phu { border-color: #abefc6; box-shadow: inset 3px 0 0 #12b76a; }
.hchc-chip { display: inline-flex; align-items: center; justify-content: center; height: 20px; width: 40px; border-radius: 6px; font-size: 11px; font-weight: 700; flex: none; background: #e0f2fe; color: #026aa2; }
.hchc-chip.DMN { background: #ffedd5; color: #c2410c; } .hchc-chip.GAS { background: #dbeafe; color: #1e40af; } .hchc-chip.VT { background: #f4ebff; color: #6941c6; } .hchc-chip.THE { background: #fef7c3; color: #a15c07; }
.hchc-nhan { font-size: 12px; flex: none; color: #067647; background: #ecfdf3; border-radius: 999px; padding: 1px 9px; font-weight: 600; }
.hchc-rong { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: #98a2b3; font-size: 13px; border: 1.5px dashed #e4e7ec; border-radius: 8px; padding: 30px 0; }
.hchc-rong i { font-size: 30px; color: #d0d5dd; }
.hchc-chan { margin-top: 12px; padding: 0 2px; display: flex; gap: 8px; align-items: center; flex: none; }
.hchc-nut { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 16px; border-radius: 8px; border: 1px solid #d0d5dd; background: #fff; font: inherit; font-size: 13.5px; font-weight: 600; color: #344054; cursor: pointer; white-space: nowrap; min-width: 0; }
/* CÁCH 3 (anh 21/10 khuya): nút phụ HẸP nền trắng bên trái · nút chính RỘNG có màu chiếm phần còn lại, mang luôn tóm tắt */
.hchc-nut.phu { flex: none; width: 112px; } .hchc-nut.chinh { flex: 1; overflow: hidden; } .hchc-nut .tom { font-weight: 500; opacity: .9; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; }
/* MÁY TÍNH (anh 21/10 khuya: nút rộng hết hộp "xấu lắm"): nút vừa chữ dồn phải, chính trước phụ sau - cùng thứ tự "Lưu" "Thoát". Điện thoại giữ cách 3. */
@media (min-width: 641px) {
    .hchc-chan { justify-content: flex-end; }
    .hchc-nut.chinh { flex: none; min-width: 140px; max-width: 70%; } .hchc-nut.phu { width: auto; min-width: 96px; order: 2; }
}
/* chạm đúp nhanh vào −/+ không được phóng to màn (điện thoại, anh 21/10 khuya) */
.hchc, .hcdvt, .hcbg-dd { touch-action: manipulation; }
/* mốc cố định của hộp (o.moc) - nhãn tròn chỉ xem cạnh tiêu đề */
.hchc-moc { display: inline-flex; align-items: center; gap: 5px; flex: none; height: 24px; padding: 0 10px; border-radius: 999px; background: #f2f4f7; border: 1px solid #e4e7ec; font-size: 12.5px; font-weight: 600; color: #344054; white-space: nowrap; cursor: default; }
.hchc-moc i { color: var(--xanh); font-size: 14px; }
/* ô Số lượng | ĐVT trong thẻ (HcSoDvt.o2) */
.hchc-sl { flex: none; display: inline-flex; } .hchc-sl .hcdvt-buoc, .hchc-sl .hcdvt-nhieu { height: 28px; }
.hchc-dvc { flex: none; width: 66px; display: inline-flex; justify-content: center; } .hchc-dvc .hcdvt-dv { height: 28px; min-width: 0; }
.hchc-the.bat .hcdvt-buoc { border-color: #84adff; } .hchc-the.bat .hcdvt-o { color: var(--xanh); }
.hchc-nut:hover { background: #f9fafb; } .hchc-nut i { font-size: 16px; }
.hchc-nut.chinh { background: #1d4ed8; border-color: #1d4ed8; color: #fff; } .hchc-nut:disabled { opacity: .5; cursor: default; }
.hchc-keo { position: absolute; right: 3px; bottom: 3px; width: 16px; height: 16px; cursor: nwse-resize; border-radius: 0 0 8px 0;
            background: linear-gradient(135deg, transparent 0 55%, #98a2b3 55% 62%, transparent 62% 72%, #98a2b3 72% 79%, transparent 79%); }
.hchc-keo:hover { background-color: #e4e7ec; } body.hchc-dangkeo { cursor: nwse-resize; user-select: none; }
.hchc-dau { cursor: move; } body.hchc-dangdoi { cursor: move; user-select: none; }
/* điện thoại: hộp phủ cả màn */
@media (max-width: 640px) {
    .hchc { left: 0 !important; top: 0 !important; width: 100vw !important; height: 100dvh !important; border-radius: 0; border: 0; padding: 8px; }
    .hchc-keo { display: none; }
    .hchc-loc { flex-wrap: wrap; } .hchc-combo { width: 130px; } .hchc-ngay { width: 100%; } .hchc-ngay input { flex: 1; }
    .hchc-tim input, .hchc .hcdvt-o, .hchc-ngay input { font-size: 16px; }
}
@media (max-width: 640px) {
    /* điện thoại: thẻ hai dòng (tên tối đa 2 dòng) như màn Thêm mặt hàng 20/10 */
    .hchc-the { height: auto; min-height: 52px; padding: 6px 8px; flex-wrap: wrap; }
    .hchc-the .chu { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; flex-basis: calc(100% - 50px); }
    .hchc-sl { margin-left: auto; } .hchc-sl .hcdvt-buoc, .hchc-sl .hcdvt-nhieu { height: 38px; width: 120px; } .hchc-sl .hcdvt-buoc button { width: 36px; } .hchc-dvc .hcdvt-dv { height: 38px; font-size: 14px; }
    .hchc-chan { padding-bottom: env(safe-area-inset-bottom); } .hchc-nut { height: 44px; font-size: 15px; }
}
/* khung trái "phu" (tick chọn nhiều) + mục khóa (21/10/2026 - hộp Thêm cửa hàng màn Cấp hàng) */
.hchc-hai { flex: 1; min-height: 0; display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 12px; }
.hchc-hai > .hchc-khung { min-height: 0; }
.hchc-the > .bt { font-size: 17px; color: #667085; width: 20px; flex: 0 0 20px; text-align: center; }
.hchc-ck { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid #c0c6d0; background: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; color: transparent; font-size: 12px; }
.hchc-the.bat .hchc-ck { background: #1d4ed8; border-color: #1d4ed8; color: #fff; } .hchc-the.bat > .bt { color: #1d4ed8; }
.hchc-nhan.cam { color: #b54708; background: #fff4e5; }
.hchc-the.tat { background: #fafbfc; color: #98a2b3; cursor: default; } .hchc-the.tat:hover { border-color: #e4e7ec; } .hchc-the.tat .hchc-chip { opacity: .5; }
.hchc-ly { font-size: 12px; color: #98a2b3; flex: none; }
@media (max-width: 640px) { .hchc-hai { grid-template-columns: 1fr; grid-template-rows: 40% 1fr; } }

/* HAI Ô Số lượng | ĐVT dùng chung (HcSoDvt.o2, anh 21/10 khuya - o-so-luong.html): một ĐVT có −/+, nhiều ĐVT "2/3" bỏ −/+;
   cột ĐVT sửa được = bàn tay + gạch chấm, bấm mở hộp nhiều ĐVT. Màn đặt lại cỡ theo khung của mình (VD .hcbg-dd ô cao 40px). */
.hcdvt-buoc { display: inline-flex; align-items: center; height: 30px; width: 104px; border: 1px solid #d0d5dd; border-radius: 6px; overflow: hidden; background: #fff; vertical-align: middle; box-sizing: border-box; flex: none; }
.hcdvt-buoc button { width: 28px; height: 100%; border: 0; background: #f9fafb; cursor: pointer; color: #475467; display: inline-flex; align-items: center; justify-content: center; padding: 0; flex: none; }
.hcdvt-buoc button:hover { background: #eef4ff; color: #1d4ed8; } .hcdvt-buoc button:disabled { cursor: default; color: #c0c6cf; background: #f9fafb; }
.hcdvt-o { flex: 1; min-width: 0; width: 100%; height: 100%; border: 0; text-align: center; font: inherit; font-size: 13.5px; font-weight: 600; padding: 0 2px; background: #fff; color: #101828; font-variant-numeric: tabular-nums; box-sizing: border-box; }
.hcdvt-buoc .hcdvt-o { border-left: 1px solid #eef0f3; border-right: 1px solid #eef0f3; }
.hcdvt-o:focus { outline: none; background: #eef4ff; } .hcdvt-buoc:focus-within { border-color: #84adff; box-shadow: 0 0 0 3px #dbe5fd; }
.hcdvt-o::placeholder { color: #98a2b3; font-weight: 600; } .hcdvt-o:disabled { background: #f9fafb; color: #98a2b3; }
.hcdvt-don { display: inline-flex; width: 104px; height: 30px; vertical-align: middle; } .hcdvt-don .hcdvt-o { border: 1px solid #d0d5dd; border-radius: 6px; }
.hcdvt-nhieu { display: inline-flex; align-items: center; justify-content: center; width: 104px; height: 30px; border: 1px solid #d0d5dd; border-radius: 6px; background: #f9fafb; font: inherit; font-size: 13.5px; font-weight: 600; color: #101828;
               cursor: pointer; font-variant-numeric: tabular-nums; vertical-align: middle; padding: 0 4px; white-space: nowrap; box-sizing: border-box; flex: none; }
.hcdvt-nhieu:hover { border-color: #84adff; background: #eef4ff; } .hcdvt-nhieu:disabled { cursor: default; color: #98a2b3; } .hcdvt-nhieu.mo { color: #98a2b3; }
.hcdvt-dv { display: inline-flex; align-items: center; justify-content: center; min-width: 60px; height: 30px; padding: 0 6px; border: 0; border-radius: 6px; background: none; font: inherit; font-size: 13px; color: #344054;
            cursor: pointer; text-decoration: underline dotted #b0b7c3; text-underline-offset: 4px; white-space: nowrap; }
.hcdvt-dv:hover { background: #eef4ff; color: #1d4ed8; text-decoration-color: #1d4ed8; } .hcdvt-dv.mo { color: #98a2b3; }
.hcdvt-dv:disabled { cursor: default; text-decoration: none; color: #98a2b3; background: none; }
.hcdvt-xd { font-size: 13px; color: #475467; white-space: nowrap; } .hcdvt-xd.mo { color: #98a2b3; }
.hcdvt-x { font-weight: 600; font-variant-numeric: tabular-nums; } .hcdvt-x.mo { color: #98a2b3; }
.hcdvt-x.khac, .hcdvt-buoc.khac .hcdvt-o, .hcdvt-nhieu.khac, .hcdvt-o.khac { color: #b54708; }
.hcdvt-buoc.doi, .hcdvt-nhieu.doi, .hcdvt-don .hcdvt-o.doi { border-color: #fdb022; box-shadow: 0 0 0 1px #fdb022; }

/* HỘP NHIỀU ĐVT dùng chung (HcSoDvt.moHop, anh 21/10 khuya): tên đậm · thẻ ĐVT lớn → nhỏ (★ mặc định, "= 6 Hộp") · thẻ Tổng · Xong lớn giữa, Hủy nhỏ lệch trái.
   Máy tính: nổi NGAY DƯỚI chỗ bấm (JS đặt vị trí), kéo đầu / kéo góc · điện thoại: phủ từ dưới lên (.dt + nền mờ .hcdvt-nen). */
.hcdvt { position: fixed; z-index: 1070; width: 380px; background: #f5f6f8; border: 1px solid #d0d5dd; border-radius: 10px; box-shadow: 0 12px 32px rgba(16,24,40,.18);
         padding: 10px; font: 14px/1.4 "Segoe UI", Roboto, Arial, sans-serif; color: #101828; box-sizing: border-box; }
.hcdvt .hk { background: #fff; border: 1px solid #dfe4eb; border-radius: 10px; padding: 10px; }
.hcdvt .dau { padding-bottom: 6px; margin: 0 2px 10px; border-bottom: 2px solid #1d4ed8; cursor: move; user-select: none; } .hcdvt .dau b { font-size: 15px; line-height: 1.3; }
.hcdvt .dong { display: grid; grid-template-columns: 104px 1fr auto; align-items: center; gap: 10px; height: 40px; padding: 0 8px; border: 1px solid #e4e7ec; border-radius: 8px; background: #fff; margin-bottom: 5px; }
.hcdvt .dong.co { background: #eef4ff; border-color: #b2ccf5; }
.hcdvt .dong .ten { font-weight: 600; display: inline-flex; align-items: center; gap: 5px; } .hcdvt .dong .ten i { color: #1d4ed8; font-size: 15px; }
.hcdvt .dong .qd { color: #667085; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.hcdvt .tong { display: flex; align-items: center; height: 40px; padding: 0 10px; border-radius: 8px; background: #f0fdf4; border: 1px solid #bbf7d0; margin-top: 8px; color: #166534; }
.hcdvt .tong b { font-weight: 700; } .hcdvt .tong span { margin-left: auto; font-size: 12.5px; color: #4b7a5c; }
.hcdvt .tong.loi { background: #fef3f2; border-color: #fecdca; } .hcdvt .tong.loi span { color: #b42318; font-weight: 600; }
.hcdvt .chan { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-top: 10px; }
.hcdvt .nut { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 16px; border-radius: 8px; border: 1px solid #d0d5dd; background: #fff; font: inherit; font-size: 13px; font-weight: 600; color: #344054; cursor: pointer; white-space: nowrap; }
.hcdvt .nut:hover { background: #f9fafb; } .hcdvt .nut i { font-size: 16px; }
.hcdvt .nut.chinh { background: #1d4ed8; border-color: #1d4ed8; color: #fff; } .hcdvt .nut.chinh:hover { background: #1e40af; }
.hcdvt .nut.huy { justify-self: start; height: 30px; padding: 0 12px; font-size: 12.5px; color: #667085; }
.hcdvt .nut.xong { height: 40px; min-width: 150px; font-size: 14.5px; }
.hcdvt .keo { position: absolute; right: 3px; bottom: 3px; width: 14px; height: 14px; cursor: ew-resize;
              background: linear-gradient(135deg, transparent 0 55%, #98a2b3 55% 62%, transparent 62% 72%, #98a2b3 72% 79%, transparent 79%); }
.hcdvt-nen { position: fixed; inset: 0; z-index: 1069; background: rgba(16,24,40,.45); }
.hcdvt.dt { left: 0; right: 0; bottom: 0; top: auto; width: auto; border: 0; border-radius: 16px 16px 0 0; padding: 12px 12px calc(18px + env(safe-area-inset-bottom)); }
.hcdvt.dt .dau { cursor: default; } .hcdvt.dt .dau b { font-size: 16px; }
.hcdvt.dt .dong { grid-template-columns: 126px 1fr auto; height: 50px; } .hcdvt.dt .dong .ten { font-size: 15px; }
.hcdvt.dt .hcdvt-buoc { width: 126px; height: 40px; } .hcdvt.dt .hcdvt-buoc button { width: 40px; font-size: 18px; } .hcdvt.dt .hcdvt-o { font-size: 16px; }
.hcdvt.dt .tong { height: 46px; font-size: 15px; } .hcdvt.dt .nut.xong { height: 46px; min-width: 180px; font-size: 16px; } .hcdvt.dt .nut.huy { height: 38px; font-size: 14px; }

/* TRẠNG THÁI thẻ (anh 21/10 đêm, mockup hop-them-hang.html): thẻ đứng yên đúng chỗ, màu = dải mép trái 3px + nền nhạt - cũ · sửa · mới · bỏ · đã cấp */
.hchc-the.tt-cu  { background: #eef4ff; border-color: #b2ccf5; box-shadow: inset 3px 0 0 #1d4ed8; color: #1d3a8a; font-weight: 600; }
.hchc-the.tt-sua { background: #fff6ed; border-color: #fdd9a8; box-shadow: inset 3px 0 0 #f79009; color: #93370d; font-weight: 600; }
.hchc-the.tt-moi { background: #ecfdf3; border-color: #abefc6; box-shadow: inset 3px 0 0 #12b76a; color: #05603a; font-weight: 600; }
.hchc-the.tt-bo  { background: #fef3f2; border-color: #fecdca; box-shadow: inset 3px 0 0 #f04438; color: #b42318; }
.hchc-the.tt-bo .chu { text-decoration: line-through; text-decoration-color: #f97066; }
.hchc-the.tt-cap { background: #f9fafb; border-color: #e4e7ec; box-shadow: inset 3px 0 0 #98a2b3; }
.hchc-the.tt-sua .hcdvt-buoc, .hchc-the.tt-sua .hcdvt-nhieu { border-color: #f79009; } .hchc-the.tt-sua .hcdvt-o { color: #b54708; }
.hchc-the.tt-moi .hcdvt-buoc, .hchc-the.tt-moi .hcdvt-nhieu { border-color: #32d583; } .hchc-the.tt-moi .hcdvt-o { color: #067647; }
.hchc-the.tt-bo .hcdvt-buoc { border-color: #fda29b; }
.hchc-nhan { color: #475467; background: #f2f4f7; border: 1px solid #e4e7ec; }

/* thẻ đếm = BỘ LỌC bên trái dòng nút ("Đã chọn" đầu; số 0 thì mờ, không ẩn); đang lọc = nền màu, KHÔNG dấu × (anh 21/10 đêm) */
.hchc-dems { display: flex; gap: 5px; margin-right: auto; flex-wrap: nowrap; min-width: 0; }
.hchc-loct { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 9px; border-radius: 999px; border: 1px solid #d0d5dd; background: #fff;
             font: inherit; font-size: 12px; font-weight: 600; color: #344054; cursor: pointer; white-space: nowrap; flex: none; }
.hchc-loct i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.hchc-loct.chon i { background: #1d4ed8; } .hchc-loct.them i { background: #12b76a; } .hchc-loct.sua i { background: #f79009; } .hchc-loct.bo i { background: #f04438; }
.hchc-loct:hover:not(:disabled) { border-color: #98a2b3; } .hchc-loct:disabled { opacity: .45; cursor: default; }
.hchc-loct.chon.on { background: #eef4ff; border-color: #1d4ed8; color: #1d3a8a; } .hchc-loct.them.on { background: #ecfdf3; border-color: #12b76a; color: #05603a; }
.hchc-loct.sua.on  { background: #fff6ed; border-color: #f79009; color: #93370d; } .hchc-loct.bo.on   { background: #fef3f2; border-color: #f04438; color: #b42318; }
/* nút chính RỘNG CỐ ĐỊNH chỉ chữ "Thêm" / "Cập nhật" (máy tính) - mọi hộp, kể cả hộp hai khung */
@media (min-width: 641px) { .hchc-chan .hchc-nut.chinh { width: 130px; min-width: 130px; max-width: none; } .hchc-chan .hchc-nut.phu { min-width: 84px; } }
/* điện thoại: thẻ đếm một dòng riêng ngay trên hai nút */
@media (max-width: 640px) { .hchc-chan { flex-wrap: wrap; } .hchc-dems { width: 100%; margin: 0 0 2px; flex-wrap: nowrap; overflow-x: auto; } .hchc-loct { height: 34px; font-size: 13.5px; padding: 0 11px; } }
/* hộp HAI khung: dòng nút chia ĐÚNG hai cột như hai khung (.hchc-hai) - thẻ "Đã chọn" mỗi khung thẳng dưới khung ấy, nút dồn phải (anh 21/10 đêm) */
.hchc-chan.hai { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 12px; }
.hchc-chanp { display: flex; align-items: center; gap: 8px; min-width: 0; } .hchc-chanp .hchc-dems { margin-right: auto; }
.hchc-ngat { display: none; }
@media (max-width: 640px) {
    /* điện thoại: hai khung chồng nhau - hai thẻ chung MỘT dòng, nút xuống dòng dưới (cách 3) */
    .hchc-chan.hai { display: flex; flex-wrap: wrap; gap: 8px; } .hchc-chanp { display: contents; }
    .hchc-chan.hai .hchc-dems { width: auto; margin: 0; } .hchc-ngat { display: block; flex-basis: 100%; height: 0; }
}
/* Ô "ĐÃ CHỌN" đầu hộp (HcHopChon.daChon, anh 26/11/2026): trên cùng, rộng hết hộp, tự giãn tới ~4 dòng thẻ rồi cuộn trong ô */
.hchc-dachon { flex: none; display: flex; flex-wrap: wrap; align-items: center; align-content: flex-start; gap: 4px; min-height: 38px; max-height: 128px; overflow-y: auto;
               margin-bottom: 10px; padding: 5px 6px; background: #fff; border: 1px solid #d0d5dd; border-radius: 8px; }
.hchc-dcnhan { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 9px; border-radius: 6px; background: #e3eaf3; color: #1f2a44; font-size: 13px; font-weight: 700; white-space: nowrap; flex: none; }
.hchc-dcnhan i { font-size: 15px; color: var(--xanh); }
.hchc-dctag { display: inline-flex; align-items: center; gap: 3px; height: 26px; max-width: 100%; padding: 0 2px 0 9px; border-radius: 6px; background: #eef4ff; border: 1px solid #b2ccf5; color: #1d3a8a; font-size: 13px; font-weight: 600; }
.hchc-dctag .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.hchc-dctag i { font-size: 14px; }
.hchc-dctag b { font-weight: 400; color: #98a2b3; cursor: pointer; padding: 0 6px; font-size: 15px; } .hchc-dctag b:hover { color: #d92d20; }
.hchc-dctag.cam { background: #fff8eb; border-color: #fedf89; color: #93370d; }
.hchc-dcrong { color: #98a2b3; font-size: 13px; padding: 0 4px; }
.hchc-the.on { border-color: #84adff; box-shadow: 0 0 0 2px #dbe5fd; }   /* dòng đang trỏ bằng ↑ ↓ */
@media (max-width: 640px) { .hchc-dachon { max-height: 98px; } }
/* điện thoại: thẻ TICK (khung trái hộp hai khung) giữ MỘT dòng - luật thẻ hai dòng ở trên chỉ dành cho thẻ có ô số */
@media (max-width: 640px) {
    .hchc-the.hchc-tick { height: 44px; min-height: 0; padding: 0 10px; flex-wrap: nowrap; }
    .hchc-the.hchc-tick .chu { display: block; white-space: nowrap; flex-basis: auto; }
}
