/* TD-120 (bản sau 8.6.0) Phần A: hạng mục Bảo hiểm xã hội (#/bhxh). Chỉ lớp .bh-*, không sửa CSS chung.
   Máy tính là chính; điện thoại (dưới 640 px, TD-121 quyết định 22): bảng thành thẻ, nút tối thiểu 44 px, số chính to. */
.mwrap.bh { max-width: none; }   /* TD-202: giãn theo khung chính (trần 2400 px) */   /* máy tính là chính: bảng nhiều cột cần khổ rộng hơn .mwrap chung (720 px) */
.bh .bh-card { margin-bottom: 14px; }
.bh .bh-card h3 { margin: 0 0 8px; }
.bh .bh-tabs { flex-wrap: wrap; margin-bottom: 12px; }
.bh .bh-loc { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 12px; }
.bh .bh-loc input[type=search], .bh .bh-loc input[type=text] { min-width: 220px; flex: 1 1 220px; max-width: 360px; }
.bh .bh-loc .btn.pri { margin-left: auto; }
.bh .bh-click { cursor: pointer; }
.bh .bh-click:hover td { background: var(--soft, #F8F7F4); }
.bh tr.bh-huy td { color: var(--muted, #5F646B); text-decoration: line-through; text-decoration-color: var(--line3, #CFCCC5); }
.bh tr.bh-huy td:last-child { text-decoration: none; }
.bh .bh-so { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 6px 0 14px; }
.bh .bh-o { background: var(--surface, #fff); border: 1px solid var(--line, #E4E2DD); border-radius: var(--r, 10px); padding: 10px 12px; }
.bh .bh-o.t-ok { border-left: 4px solid var(--ok, #1B6B45); }
.bh .bh-o.t-warn { border-left: 4px solid var(--yellow, #FBB614); background: var(--warn-soft, #FFF1D1); }
.bh .bh-o.t-bad { border-left: 4px solid var(--bad, #A1261A); background: var(--bad-soft, #FCE8E6); }
.bh .bh-lon-so { font-size: var(--fs-2xl, 26px); font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.bh .bh-o .pill { margin-top: 4px; margin-right: 4px; }
.bh .bh-form { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.bh .bh-nc { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 6px 0; }
.bh .bh-mono { font-family: ui-monospace, Consolas, monospace; letter-spacing: .03em; }
.bh .bh-hai { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.bh .bh-tong { text-align: right; margin-top: 4px; }
.bh .bh-goiy { color: var(--info, #1F5A85); }
.bh .bh-goiy > div { margin-top: 6px; }
.bh .bh-chk { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 6px 0; }
.bh .bh-do { color: var(--bad, #A1261A); margin: 12px 0 6px; }
.bh .bh-day { position: sticky; bottom: 0; background: var(--bg, #F5F4F1); padding: 8px 0; z-index: 2; }
.bh .bh-o-tl { width: 64px; text-align: right; }
.bh .bh-tyle .tbl-wrap { overflow-x: auto; }
.bh .bh-trang { justify-content: center; }
/* TD-198: bảng sửa Tỷ lệ đóng (8 cột số) nằm trong hộp thoại – ngoài .bh nên ô số trước đây giãn hết cỡ, bảng tràn khỏi hộp thoại */
.modal .bh-tyle { max-width: 100%; }
.modal .bh-tyle .tbl-wrap { overflow-x: auto; }
.modal .bh-tyle table { width: auto; min-width: 100%; }
.modal .bh-tyle th, .modal .bh-tyle td { padding: 6px 3px; white-space: normal; }
.modal .bh-tyle th { font-size: var(--fs-sm, 13px); line-height: 1.25; vertical-align: bottom; }
.modal .bh-tyle th:first-child, .modal .bh-tyle td:first-child { min-width: 92px; }
.modal .bh-tyle input.bh-o-tl { width: 56px; min-width: 0; padding-left: 6px; padding-right: 6px; text-align: right; }
ul.bh-cb { margin: 0; padding-left: 18px; }
ul.bh-cb li { margin: 4px 0; }
.modal .bh-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.modal .bh-goiy { color: var(--info, #1F5A85); }
/* TD-168: mã thẻ BHYT hiện chữ hoa khi gõ; dòng tiêu đề nhóm "Địa chỉ nhận bản giấy" trong biểu mẫu hồ sơ */
input.bh-hoa { text-transform: uppercase; }
.bh .bh-nhom { margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--line, #E4E2DD); }

@media (max-width: 640px) {
  .bh .bh-tbl table, .bh .bh-tbl tbody { display: block; width: 100%; }
  .bh .bh-tbl thead { display: none; }
  body:has(.mwrap.bh) .tbl-fh, body:has(.mwrap.bh) .tbl-fx { display: none !important; }   /* bảng đã thành thẻ: không cần dòng tiêu đề nổi, thanh cuộn ngang (ui.js) */
  .bh .tbl-bar { display: none; }
  .bh .bh-tbl tr { display: block; background: var(--surface, #fff); border: 1px solid var(--line, #E4E2DD); border-radius: var(--r, 10px); margin: 0 0 8px; padding: 6px 10px; }
  .bh .bh-tbl td { display: flex; justify-content: space-between; gap: 10px; border: 0; padding: 4px 0; text-align: right; min-height: 28px; }
  .bh .bh-tbl td::before { content: attr(data-label); color: var(--muted, #5F646B); text-align: left; flex: 0 0 auto; font-size: var(--fs-sm, 13px); }
  .bh .bh-tbl td[data-label=""]::before { content: none; }
  .bh .bh-tbl td.n { justify-content: space-between; }
  .bh .btn, .bh select, .bh input[type=text], .bh input[type=search], .bh input[type=date] { min-height: 44px; }
  .bh .bh-loc input[type=search], .bh .bh-loc input[type=text], .bh .bh-loc select { max-width: none; flex: 1 1 100%; }
  .bh .bh-loc .btn.pri { margin-left: 0; flex: 1 1 100%; }
  .bh .bh-so { grid-template-columns: 1fr 1fr; }
  .bh .bh-hai { grid-template-columns: 1fr; }
  .bh .bh-lon { width: 100%; }
  .bh .bh-tabs { overflow-x: auto; flex-wrap: nowrap; }
}
