/* Check hàng — màn riêng trong nhóm Kho (check-hang.js, 01/10/2026; bỏ cột Ip). Theo token iTN (không dùng màu Excel của tờ in):
   một bề mặt bảng viền 1px bo 8px, tiêu đề cột chữ mờ trên nền --bg-card-hover, số căn phải tabular-nums, cột Tổng đậm.
   Điện thoại ≤760px: danh sách gọn "Sẵn sàng bán 3 · Đang Spa 1 · Tổng 4", không kéo ngang. Ô bấm ≥44px, focus rõ, bo tối đa 8px. Bản in A4: CSS_IN trong check-hang.js. */
.ch { color: var(--text-main); }
.ch-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ch-dau { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; margin-bottom: 12px; }
.ch-dau-t { min-width: 0; }
.ch-h { margin: 0; }
.ch-tom-cn { color: var(--text-main); font-weight: 600; }
.ch-tom { margin: 4px 0 0; color: var(--text-muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.ch-tom strong { color: var(--text-main); }
.ch-tool { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ch .ch-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 0 14px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-card); color: var(--text-main); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.ch .ch-btn:hover:not(:disabled) { border-color: var(--theme-accent-strong); }
.ch .ch-btn.ch-icon { width: 44px; padding: 0; }
.ch .ch-btn:disabled { opacity: .55; cursor: not-allowed; }
/* Nút chính: Apple Blue (--theme-accent-strong) chữ trắng; graphite / gold-noir chữ tối cho đạt tương phản (như nút chính của phiếu). */
.ch .ch-btn.ch-in { background: var(--theme-accent-strong, #0071e3); border-color: var(--theme-accent-strong, #0071e3); color: #fff; }
html[data-itn-theme="graphite"] .ch .ch-btn.ch-in, html[data-itn-theme="gold-noir"] .ch .ch-btn.ch-in { color: #111; }
.ch-ic { flex: none; }
.ch-cn { display: inline-flex; padding: 2px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-input); }
.ch .ch-cn > button[type] { min-height: 40px; min-width: 44px; padding: 0 14px; border: 0; border-radius: 6px; background: none; color: var(--text-muted); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.ch .ch-cn > button[type][aria-pressed="true"] { background: var(--bg-card); color: var(--text-main); box-shadow: 0 0 0 1px var(--border-color); }
.ch .ch-tt { display: inline-flex; flex: 0 0 auto; flex-direction: row; align-items: center; gap: 8px; min-height: 44px; padding: 0 4px; font-size: 14px; color: var(--text-main); cursor: pointer; }
.ch-tt input { width: 20px; height: 20px; margin: 0; accent-color: var(--theme-accent-strong); }
.ch .ch-btn:focus-visible, .ch .ch-cn button:focus-visible, .ch .ch-mo:focus-visible, .ch-tt input:focus-visible { outline: 2px solid var(--theme-accent-strong); outline-offset: 2px; }

/* Bảng máy tính / tablet: một bề mặt, đường kẻ chỉ để tách dòng. */
.ch-wrap { border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-card); overflow: hidden; }
.ch-bang { width: 100%; border-collapse: collapse; font-size: 15px; }
.ch-bang th, .ch-bang td { padding: 0 12px; height: 48px; border-bottom: 1px solid var(--border-color); text-align: left; vertical-align: middle; }
.ch-bang thead th { height: 44px; color: var(--text-muted); background: var(--bg-card-hover); font-size: 13px; font-weight: 600; white-space: nowrap; }
.ch-bang .so { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ch-bang thead .so { white-space: normal; line-height: 1.25; }
.ch-bang .ch-c-ss { width: 120px; }
.ch-bang .ch-c-spa { width: 180px; }
.ch-bang .ch-c-tg { width: 96px; }
.ch-bang .ch-c-ten { padding: 0 4px; }
.ch-bang thead .ch-c-ten { padding: 0 12px; }
.ch-bang td.ch-c-tong, .ch-bang tfoot .ch-c-tong { font-size: 18px; font-weight: 700; }
.ch-bang tbody tr.ch-dong:hover { background: var(--bg-card-hover); }
.ch-bang tbody tr.ch-dong.is-mo { background: var(--theme-accent-soft); }
.ch-bang tbody tr.ch-imei-dong td { height: auto; padding: 4px 12px 12px 12px; background: var(--theme-accent-soft); }
.ch-bang tfoot th, .ch-bang tfoot td { border-bottom: 0; background: var(--bg-card-hover); font-weight: 700; height: 52px; }
.ch-0 { color: var(--text-muted); font-weight: 400; }
.ch .ch-mo.ch-mo { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 44px; padding: 0 8px; border: 0; border-radius: 8px; background: none; color: var(--text-main); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.ch .ch-mo.ch-mo:hover { border: 0; background: none; }
.ch-chev { flex: none; color: var(--text-muted); transition: transform .15s ease; }
.ch-mo[aria-expanded="true"] .ch-chev { transform: rotate(180deg); }
.ch-imei { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 16px; }
.ch-imei li { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 32px; font-size: 14px; }
.ch-imei-so { font-variant-numeric: tabular-nums; letter-spacing: .02em; color: var(--text-muted); }
.ch-imei-so strong { color: var(--text-main); }
.ch-st { font-size: 12px; font-weight: 600; white-space: nowrap; }
.ch-st.is-ok { color: var(--txt-ok); }
.ch-st.is-spa { color: var(--txt-warn); }
.ch-ds { display: none; }
.ch-ghi { margin: 12px 0 0; font-size: 13px; line-height: 1.5; color: var(--text-muted); }
.ch-ghi strong { color: var(--text-main); font-weight: 600; }
.ch-trong { display: grid; justify-items: center; gap: 6px; padding: 40px 20px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-card); text-align: center; color: var(--text-muted); }
.ch-trong-t { margin: 0; font-size: 16px; font-weight: 700; color: var(--text-main); }
.ch-trong-h { margin: 0 0 8px; font-size: 14px; line-height: 1.45; }
.ch-trong.is-loi .ch-ic { color: var(--txt-bad); }
.ch-cho { display: grid; gap: 10px; padding: 16px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-card); }
.ch-sk { display: block; height: 20px; border-radius: 6px; background: var(--bg-input); animation: ch-nhip 1.4s ease-in-out infinite; }
@keyframes ch-nhip { 50% { opacity: .5; } }

/* Tablet: bớt chữ tiêu đề cột cho gọn. */
@media (max-width: 1100px) {
  .ch-bang .ch-c-ss { width: 96px; }
  .ch-bang .ch-c-spa { width: 112px; }
  .ch-bang .ch-c-tg { width: 76px; }
}
/* Điện thoại: danh sách một bề mặt, không bảng, không kéo ngang. */
@media (max-width: 760px) {
  .ch-dau { align-items: stretch; }
  .ch-tool { width: 100%; }
  .ch-cn { flex: 1 1 100%; }
  .ch .ch-cn > button[type] { flex: 1 1 0; min-height: 44px; }
  .ch .ch-tt { flex: 1 1 auto; }
  .ch .ch-btn.ch-in { flex: 1 1 100%; order: 3; }
  .ch-wrap { display: none; }
  .ch-ds { display: block; list-style: none; margin: 0; padding: 0; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-card); }
  .ch-muc { border-bottom: 1px solid var(--border-color); }
  .ch-muc:last-child { border-bottom: 0; }
  .ch-muc.is-mo { background: var(--theme-accent-soft); }
  .ch-ds .ch-mo.ch-mo { align-items: center; padding: 8px 12px; min-height: 56px; border-radius: 0; }
  .ch-muc-b { display: grid; gap: 2px; flex: 1 1 auto; min-width: 0; }
  .ch-ten { font-weight: 600; overflow-wrap: anywhere; }
  .ch-so { font-size: 14px; font-weight: 400; color: var(--text-muted); font-variant-numeric: tabular-nums; }
  .ch-so strong { color: var(--text-main); font-weight: 700; }
  .ch-so abbr { text-decoration: none; }
  .ch-muc.is-tong { padding: 12px; background: var(--bg-card-hover); border-radius: 0 0 8px 8px; }
  .ch-muc.is-tong .ch-ten { font-weight: 700; }
  .ch-ds .ch-imei { grid-template-columns: 1fr; padding: 0 12px 10px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .ch-sk { animation: none; }
  .ch-chev { transition: none; }
}
