/* Chứng từ máy thu (06/10/2026, API 090) — dùng lại khung .ctd của chung-tu.css (một bề mặt, bo 8px, nút 44px, token theme). Tiền tố mtc-.
   Thêm: dòng máy thu, 2 ô CCCD cạnh nhau (điện thoại 1 cột), ô CCCD không ảnh (dữ liệu nhạy cảm), dòng báo cáo bot, khối cấu hình group máy thu. */
.ctd.mtc .mtc-may { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 0 0 8px; font-size: 14px; font-variant-numeric: tabular-nums; }
.ctd.mtc .mtc-may strong { font-weight: 650; }
.ctd.mtc .mtc-may span { color: var(--text-muted); }
.ctd.mtc .mtc-imei { color: var(--text-main); font-weight: 600; }
.ctd .mtc-bc, .mtc-ngan { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 10px; font-size: 13px; line-height: 1.45; color: var(--text-muted); }
.ctd .mtc-bc .ctd-ic, .mtc-ngan .ctd-ic { width: 16px; height: 16px; margin-top: 2px; flex: none; stroke: currentColor; fill: none; }
.ctd .mtc-bc.is-ok, .mtc-ngan.is-ok { color: var(--txt-ok, #1d7a3a); }
.ctd .mtc-bc.is-bad { color: var(--txt-bad, #c0262d); }
.mtc-ngan.is-warn { color: var(--txt-warn, #9a5200); }
.ctd.mtc .mtc-muc h4 .ctd-ic { width: 16px; height: 16px; }
.ctd.mtc .mtc-co, .ctd.mtc .mtc-thieu { display: inline-flex; align-items: center; gap: 3px; margin-left: auto; padding: 1px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.ctd.mtc .mtc-co { color: var(--txt-ok, #1d7a3a); background: color-mix(in srgb, var(--txt-ok, #1d7a3a) 12%, transparent); }
.ctd.mtc .mtc-co .ctd-ic { width: 13px; height: 13px; }
.ctd.mtc .mtc-thieu { color: var(--txt-warn, #9a5200); background: color-mix(in srgb, var(--txt-warn, #9a5200) 12%, transparent); }
.ctd.mtc .mtc-2 { display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; }
.ctd.mtc .mtc-cccd { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; min-width: 0; }
.ctd.mtc .mtc-cccd-ic { display: grid; place-items: center; width: 64px; height: 44px; flex: none; border-radius: 8px; border: 1px solid var(--border-color); background: var(--bg-card-hover, rgba(0,0,0,.04)); color: var(--txt-ok, #1d7a3a); }
.ctd.mtc .mtc-cccd-ic .ctd-ic { width: 26px; height: 26px; }
.ctd.mtc .mtc-cccd-b { display: flex; flex-direction: column; flex: 1; min-width: 0; font-size: 14px; }
.ctd.mtc .mtc-khoa-nho { display: inline-flex; align-items: center; gap: 4px; }
.ctd.mtc .mtc-khoa-nho .ctd-ic { width: 13px; height: 13px; }
.ctd.mtc .mtc-luoi-1 { grid-template-columns: repeat(auto-fill, minmax(104px, 140px)); }
.ctd-nhan.mtc-nhan { margin-top: 2px; }
/* Khối cấu hình (màn Telegram tự động, cùng kiểu thẻ .bct-the). */
.mtc-cfg .mtc-cfg-h4 { margin: 14px 0 6px; font-size: 13px; font-weight: 650; color: var(--text-muted); }
.mtc-cfg .mtc-tin-ds { list-style: none; margin: 0; padding: 0; }
.mtc-cfg .mtc-tin { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 8px 0; border-top: 1px solid var(--border-color); font-size: 13px; }
.mtc-cfg .mtc-tin > span:nth-child(2) { color: var(--text-muted); flex: 1; min-width: 180px; }
.mtc-cfg .mtc-tin .mtc-ok { color: var(--txt-ok, #1d7a3a); }
.mtc-cfg .mtc-tin button { min-height: 44px; }
.mtc-cfg .mtc-tin button:focus-visible { outline: 2px solid var(--theme-accent-strong, #0071e3); outline-offset: 2px; }
.mtc-cfg-goc:empty { display: none; }
.mtc-cfg-goc { margin-top: 14px; }
@media (max-width: 760px) {
  .ctd.mtc .mtc-2 { grid-template-columns: 1fr; }
  .ctd.mtc .ctd-them .ctd-btn { flex: 1 1 140px; }
}
/* Nhắc ngay sau khi lập hóa đơn có thu máy (dải xác nhận ở chi tiết hóa đơn). */
.mtc-nhac { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 10px 0 0; padding: 10px 12px; border-left: 3px solid var(--txt-warn, #9a5200); border-radius: 8px; background: var(--bg-card-hover, rgba(0,0,0,.04)); color: var(--text-main); font-size: 14px; line-height: 1.45; }
.mtc-nhac span { flex: 1 1 260px; }
.backend-mode .mtc-nhac .mtc-nhac-nut, .mtc-nhac .mtc-nhac-nut { min-height: 44px; padding: 0 16px; border: 1px solid var(--theme-accent-strong, #0071e3); border-radius: 8px; background: var(--theme-accent-strong, #0071e3); color: #fff; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.mtc-nhac .mtc-nhac-nut:focus-visible { outline: 2px solid var(--theme-accent-strong, #0071e3); outline-offset: 2px; }
@media (max-width: 760px) { .mtc-nhac .mtc-nhac-nut { width: 100%; } }
/* Khối Group máy thu nằm NGOÀI khung .bct của màn Báo cáo Telegram → chép luật ô / nút của bao-cao-tg.css (cùng token, 44px, bo 8px). */
.mtc-cfg-w { color: var(--text-main); overflow-wrap: anywhere; }
.mtc-cfg h3 { margin: 0; font-size: 16px; font-weight: 650; }
.mtc-cfg input, .mtc-cfg button { font: inherit; font-size: 14px; min-height: 44px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--border-color); background: var(--bg-input); color: var(--text-main); box-sizing: border-box; }
.mtc-cfg button { cursor: pointer; }
.mtc-cfg button.bct-chinh { background: var(--theme-accent-strong, #0071e3); border-color: var(--theme-accent-strong, #0071e3); color: #fff; font-weight: 600; }
.mtc-cfg button[disabled] { opacity: .6; cursor: progress; }
.mtc-cfg button:focus-visible, .mtc-cfg input:focus-visible { outline: 2px solid var(--theme-accent-strong, #0071e3); outline-offset: 2px; }
/* 091 — "Khách không có căn cước": ô tick (44px, cùng token), lý do ngắn; đã tick thì 2 ô CCCD mờ (vẫn bấm được — tải nếu có, không bắt buộc). */
.ctd.mtc .mtc-kc { margin: 4px 0 12px; padding: 10px 12px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-card-hover, rgba(0,0,0,.04)); }
.ctd.mtc .mtc-kc.is-co { border-color: color-mix(in srgb, var(--txt-ok, #1d7a3a) 45%, var(--border-color)); }
.ctd.mtc .mtc-kc-o { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; cursor: pointer; }
.ctd.mtc .mtc-kc-o input { flex: none; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--theme-accent-strong, #0071e3); cursor: pointer; }
.ctd.mtc .mtc-kc-o input:disabled { cursor: not-allowed; }
.ctd.mtc .mtc-kc-o input:focus-visible { outline: 2px solid var(--theme-accent-strong, #0071e3); outline-offset: 2px; }
.ctd.mtc .mtc-kc-t { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.ctd.mtc .mtc-kc-ly { margin: 8px 0 0 32px; }
.ctd.mtc .mtc-kc-lb { display: block; margin: 0 0 4px; font-size: 13px; color: var(--text-muted); }
.ctd.mtc .mtc-kc-hang { display: flex; flex-wrap: wrap; gap: 8px; }
.ctd.mtc .mtc-kc-hang input { flex: 1 1 220px; min-width: 0; min-height: 44px; padding: 0 12px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-input, var(--bg-card)); color: var(--text-main); font: inherit; font-size: 16px; box-sizing: border-box; }
.ctd.mtc .mtc-kc-hang input:focus-visible { outline: 2px solid var(--theme-accent-strong, #0071e3); outline-offset: 1px; }
.ctd.mtc .mtc-kc-meta { display: block; margin: 6px 0 0 32px; }
.ctd.mtc .mtc-kc-doc { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: 14px; }
.ctd.mtc .mtc-kc-doc .ctd-ic { width: 16px; height: 16px; margin-top: 2px; flex: none; }
.ctd.mtc .mtc-kc:not(:has(.mtc-kc-o)) .mtc-kc-meta { margin-left: 24px; }
.ctd.mtc .mtc-muc.is-mo { opacity: .6; }
.ctd.mtc .mtc-muc.is-mo:focus-within, .ctd.mtc .mtc-muc.is-mo:hover { opacity: 1; }
.ctd.mtc .mtc-kbb { display: inline-flex; align-items: center; margin-left: auto; padding: 1px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; color: var(--text-muted); background: color-mix(in srgb, var(--text-muted) 12%, transparent); }
.ctd.mtc .mtc-kc-ghi { margin: 0 0 8px; }
.ctd-nhan.mtc-nhan-kc { color: var(--text-muted); }
@media (max-width: 760px) { .ctd.mtc .mtc-kc-ly, .ctd.mtc .mtc-kc-meta { margin-left: 0; } .ctd.mtc .mtc-kc-hang .ctd-btn { flex: 1 1 100%; } }
/* 094 — Thông tin người bán (bảng kê 01/TNDN): lưới 2 cột (điện thoại 1 cột), nhãn nguồn từng ô — Đọc từ QR (xanh) · Sửa tay (cam) · Cần nhập tay (đỏ). */
.ctd.mtc .mtc-nb { margin: 4px 0 12px; padding: 10px 12px; border: 1px solid var(--border-color); border-radius: 8px; }
.ctd.mtc .mtc-nb h4 { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 14px; font-weight: 650; }
.ctd.mtc .mtc-nb h4 .ctd-ic { width: 16px; height: 16px; }
.ctd.mtc .mtc-nb-tt { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0 0 8px; font-size: 13px; }
.ctd.mtc .mtc-nb-ghi { display: inline-flex; align-items: center; gap: 4px; margin: 6px 0 0; }
.ctd.mtc .mtc-nb-ghi .ctd-ic { width: 13px; height: 13px; }
.ctd.mtc .mtc-nb-doc { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 8px; font-size: 13px; line-height: 1.45; color: var(--text-muted); }
.ctd.mtc .mtc-nb-doc .ctd-ic { width: 16px; height: 16px; margin-top: 2px; flex: none; }
.ctd.mtc .mtc-nb-doc.is-ok { color: var(--txt-ok, #1d7a3a); }
.ctd.mtc .mtc-nb-doc.is-can { color: var(--txt-bad, #c0262d); }
.ctd.mtc .mtc-nb-luoi { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin: 0 0 10px; }
.ctd.mtc .mtc-nb-o { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ctd.mtc .mtc-nb-o.is-rong { grid-column: 1 / -1; }
.ctd.mtc .mtc-nb-o label { flex: 0 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); }
.ctd.mtc .mtc-nb-o input, .ctd.mtc .mtc-nb-o select { width: 100%; min-width: 0; min-height: 44px; padding: 0 12px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-input, var(--bg-card)); color: var(--text-main); font: inherit; font-size: 16px; box-sizing: border-box; }
.ctd.mtc .mtc-nb-o input:disabled, .ctd.mtc .mtc-nb-o select:disabled { opacity: .65; }
.ctd.mtc .mtc-nb-o input:focus-visible, .ctd.mtc .mtc-nb-o select:focus-visible { outline: 2px solid var(--theme-accent-strong, #0071e3); outline-offset: 1px; }
.ctd.mtc .mtc-nb-n { display: inline-flex; align-items: center; padding: 0 7px; border-radius: 6px; font-size: 11.5px; font-weight: 650; line-height: 1.6; }
.ctd.mtc .mtc-nb-n.is-qr { color: var(--txt-ok, #1d7a3a); background: color-mix(in srgb, var(--txt-ok, #1d7a3a) 13%, transparent); }
.ctd.mtc .mtc-nb-n.is-tay { color: var(--txt-warn, #9a5200); background: color-mix(in srgb, var(--txt-warn, #9a5200) 13%, transparent); }
.ctd.mtc .mtc-nb-n.is-can { color: var(--txt-bad, #c0262d); background: color-mix(in srgb, var(--txt-bad, #c0262d) 11%, transparent); }
.ctd.mtc .mtc-nb-n.is-idle { color: var(--text-muted); background: var(--bg-card-hover, rgba(0,0,0,.05)); }
.ctd.mtc .mtc-nb-nut { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 760px) { .ctd.mtc .mtc-nb-luoi { grid-template-columns: 1fr; } .ctd.mtc .mtc-nb-nut .ctd-btn { flex: 1 1 140px; } .ctd.mtc .mtc-nb-nut .ctd-btn.ctd-chinh { flex-basis: 100%; } }
/* 095 — gán ảnh "Chứng từ đơn" vào máy thu: dòng nhắc, nhãn "Từ Chứng từ đơn", hộp chọn ảnh (lưới bản nhỏ, ô bấm ≥ 44px, ảnh đã gán mờ + ghi rõ). */
.ctd.mtc .mtc-goi { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 10px; padding: 10px 12px; border-left: 3px solid var(--theme-accent-strong, #0071e3); border-radius: 8px; background: var(--bg-card-hover, rgba(0,0,0,.04)); font-size: 13px; line-height: 1.45; color: var(--text-main); }
.ctd.mtc .mtc-goi .ctd-ic { width: 16px; height: 16px; margin-top: 2px; flex: none; color: var(--theme-accent-strong, #0071e3); }
.ctd .mtc-tu-ct { color: var(--theme-accent-strong, #0071e3); font-weight: 600; }
.ctd .mtc-ct .mtc-ct-phu { margin: 0 0 10px; line-height: 1.45; }
.ctd .mtc-ct-luoi { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; margin: 0; padding: 0; }
.ctd .mtc-ct-o { display: flex; flex-direction: column; gap: 3px; width: 100%; min-height: 44px; padding: 6px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-card); color: var(--text-main); font: inherit; text-align: left; cursor: pointer; }
.ctd .mtc-ct-o:hover:not([disabled]) { border-color: var(--theme-accent-strong, #0071e3); }
.ctd .mtc-ct-o:focus-visible { outline: 2px solid var(--theme-accent-strong, #0071e3); outline-offset: 2px; }
.ctd .mtc-ct-o[disabled] { cursor: default; }
.ctd .mtc-ct-o.is-gan .ctd-anh { opacity: .45; }
.ctd .mtc-ct-o[aria-busy="true"] { border-color: var(--theme-accent-strong, #0071e3); }
.ctd .mtc-ct-ghi { font-size: 12px; font-weight: 600; color: var(--theme-accent-strong, #0071e3); }
.ctd .mtc-ct-o.is-gan .mtc-ct-ghi, .ctd .mtc-ct-o[disabled]:not([aria-busy]) .mtc-ct-ghi { color: var(--text-muted); }
@media (max-width: 760px) { .ctd .mtc-ct-luoi { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Một hồ sơ: ảnh đã phân loại ở trên, nguồn và tệp bổ sung ở dưới. */
.mtc-ho-so { border: 1px solid var(--border-color); border-radius: 8px; margin-top: 16px; }
.mtc-ho-so > .mtc-goc > .ctd, .mtc-ho-so > .ctd-goc > .ctd { border: 0; margin: 0; }
/* 17/10: phần 1 (hóa đơn mới) trên, phần 2 (máy thu khách) dưới; phần đã đủ bị ẩn (gốc rỗng) thì không kẻ đường thừa. */
.mtc-ho-so > .ctd-goc:not(:empty) + .mtc-goc:not(:empty) { border-top: 1px solid var(--border-color); }
.ctd-hai-phan-dau { margin: 0; padding: 12px 16px; font-size: 14px; line-height: 1.45; border-bottom: 1px solid var(--border-color); border-radius: 8px 8px 0 0; background: color-mix(in srgb, var(--theme-accent-strong, #0071e3) 7%, transparent); }
