/* Bảng tin Quy định (gói ban-tin-tuan đợt 1, đổi tên và thêm kho P3 ngày 07/10) — kiểu cho js/ui-bantin.js.
   Màu lấy từ biến theme sẵn có (--primary, --ink, --line, --danger, --warn, --success, --bg) nên đúng ở mọi theme.
   Lớp phủ gắn body: trang 900, ngăn chi tiết 910, hộp chia sẻ và hộp nạp 920; cửa sổ dialog của app nằm ở lớp trên cùng.
   Quy ước: mọi lớp bắt đầu bằng bti- để không đụng lớp của tệp khác. */

/* ---------- mảnh dùng chung ---------- */
.bti-sp { flex: 1 1 auto; }
.bti-hang { display: flex; align-items: center; gap: 6px; min-width: 0; }
.bti-wrap { flex-wrap: wrap; }
.bti-goiy { color: var(--ink-3); font-size: var(--fs-xs, 12px); }
.bti-trong { color: var(--ink-3); padding: 14px 4px; }
.bti-lk { background: none; border: 0; padding: 0; color: var(--link, var(--primary)); font-weight: 600; cursor: pointer; text-decoration: underline; }
button.bti-nho { padding: 3px 9px; font-size: var(--fs-xs, 12px); }
button.bti-x { padding: 2px 7px; line-height: 1.2; }
.bti-chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--card, #fff); color: var(--ink-2); font-size: var(--fs-xs, 12px); font-weight: 600; white-space: nowrap; }
.bti-chip.bti-dan { border-color: var(--danger); color: var(--danger); }
.bti-chip.bti-warn { border-color: var(--warn); color: var(--ink); background: var(--grey, #f4f4f4); }
.bti-chip.bti-ok { border-color: var(--success); color: var(--success); }
.bti-chip.bti-blue { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.bti-chip.bti-gold { border-color: var(--brand); color: var(--brand); }
.bti-nhan-ai { display: inline-block; padding: 1px 7px; border-radius: 5px; border: 1px dashed var(--ink-3); color: var(--ink-2); font-size: 11px; font-weight: 600; white-space: nowrap; }
.bti-lv { display: inline-block; min-width: 42px; text-align: center; padding: 1px 6px; border-radius: 5px; font-size: 11px; font-weight: 800; color: #fff; background: var(--ink-2); }
.bti-lv-cao { background: var(--danger); }
.bti-lv-tb { background: var(--warn); color: var(--ink); }
html[data-theme="luxe"] .bti-lv-tb { background: #C98D33; }   /* luxe: --warn #B7791F dưới chữ --ink chỉ 4,38:1 ⇒ vàng đồng sáng hơn, 5,57:1 (WCAG AA 4,5) */
.bti-lv-thap, .bti-lv-tat { background: var(--ink-2); }
.bti-cat { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 5px; font-size: var(--fs-xs, 12px); font-weight: 600; color: var(--ink); background: var(--primary-soft); border-left: 4px solid var(--primary); white-space: nowrap; }
.bti-c-pda { border-left-color: var(--primary); }
.bti-c-pdn { border-left-color: var(--brand); }
.bti-c-tc { border-left-color: var(--success); }
.bti-c-ns { border-left-color: var(--warn); }
.bti-c-sm { border-left-color: var(--danger); }
i.bti-c-pda, i.bti-c-pdn, i.bti-c-tc, i.bti-c-ns, i.bti-c-sm { display: inline-block; width: 8px; height: 8px; border-radius: 50%; border-left: 0; margin-right: 4px; }
i.bti-c-pda { background: var(--primary); }
i.bti-c-pdn { background: var(--brand); }
i.bti-c-tc { background: var(--success); }
i.bti-c-ns { background: var(--warn); }
i.bti-c-sm { background: var(--danger); }
.bti-chua { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); margin-right: 6px; vertical-align: middle; }
.bti-bao { margin: 8px 0; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--primary-soft); color: var(--ink); font-size: var(--fs-sm, 13px); }
.bti-bao-loi { border-color: var(--danger); background: var(--card, #fff); color: var(--danger); }
.bti-bao-canh { border-color: var(--warn); background: var(--card, #fff); }
.bti-khoi { display: flex; flex-wrap: wrap; gap: 4px; }
.bti-kc { padding: 1px 7px; border-radius: 5px; border: 1px solid var(--line); font-size: var(--fs-xs, 12px); color: var(--ink-2); }
.bti-kc.bti-me { border-color: var(--primary); color: var(--primary); font-weight: 700; }

/* ---------- khối Hôm nay (máy tính) ---------- */
.bti-hn { background: var(--card, #fff); border: 1px solid var(--line); border-left: 4px solid var(--primary); border-radius: 10px; padding: 10px 12px; margin: 0 0 12px; }
.bti-hn-rong { font-size: var(--fs-sm, 13px); color: var(--ink-2); }
.bti-hn-dau { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.bti-hn-t { font-weight: 800; color: var(--ink); font-size: var(--fs-md, 14px); }
.bti-hn-t small { font-weight: 600; color: var(--ink-2); margin-left: 2px; font-size: var(--fs-xs, 12px); }
.bti-hn-mang { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.bti-hn-m { background: none; border: 0; padding: 0; cursor: pointer; }
.bti-hn-ds { list-style: none; margin: 8px 0 0; padding: 0; }
.bti-hn-dong { display: flex; align-items: flex-start; gap: 8px; padding: 7px 4px; border-top: 1px solid var(--line); cursor: pointer; min-width: 0; }
.bti-hn-dong:hover, .bti-hn-dong:focus { background: var(--primary-soft); outline: none; }
.bti-hn-tt { flex: 1 1 auto; min-width: 0; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.bti-hn-tt > span { display: block; font-weight: 400; color: var(--ink-3); font-size: var(--fs-xs, 12px); }
.bti-hn-eff { flex: 0 0 auto; }
/* ban-tin-dot2 §6: dòng báo bản tin tự động chưa phát hành (chỉ người nạp) */
.bti-hn-may { margin-top: 8px; padding: 6px 10px; border: 1px solid var(--warn); border-radius: 8px; background: var(--card, #fff); color: var(--ink); font-size: var(--fs-sm, 13px); overflow-wrap: anywhere; }
.bti-hn-rong.bti-hn-may { margin: 0 0 12px; border-left: 4px solid var(--warn); }
.bti-hn-chan { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-top: 6px; color: var(--ink-3); font-size: var(--fs-xs, 12px); }

/* ---------- trang Bản tin (lớp phủ) ---------- */
/* ban-tin-dot2 §5.1 (BT2-Q5 = a): máy tính chỉ phủ vùng giữa. js/ui-bantin.js đo header, rail, cột phải bằng ResizeObserver
   rồi đặt --bti-tren, --bti-trai, --bti-phai trên body; điện thoại đặt 0 nên vẫn phủ toàn màn. Bốn lớp .bti-trang, .bti-man,
   .bti-ngan, .bti-hp dùng chung ba biến; hộp con căn giữa trong vùng. */
body.bti-khoa { overflow: hidden; }
/* Bổ sung 07/10 (TGĐ: giữ thanh trái khi mở Bản tin): trang mở thì body có lớp bti-dang-mo. Mục rail Bảng tin Quy định sáng như
   .rail-a.on (css/app.css), mục .on của tab bên dưới về kiểu thường (kể cả viền chấm số khi rail thu về icon, như .rail-cha-dot). */
body.bti-dang-mo .rail-a.on:not([data-rail-cha="bantin"]) { background: none; color: var(--rail-ink); font-weight: inherit; box-shadow: none; }
body.bti-dang-mo .rail-a.on:not([data-rail-cha="bantin"]):hover { background: rgba(255, 255, 255, .08); }
body.bti-dang-mo .rail-a.on:not([data-rail-cha="bantin"]) .rail-ic { color: var(--rail-dim); }
body.bti-dang-mo .rail-a.on:not([data-rail-cha="bantin"]) .rail-cha-dot { box-shadow: 0 0 0 2px var(--rail-bg); }
body.bti-dang-mo .rail-a[data-rail-cha="bantin"] { background: var(--rail-on); color: var(--rail-onk); font-weight: 600; box-shadow: inset 3px 0 0 var(--rail-acc); }
body.bti-dang-mo .rail-a[data-rail-cha="bantin"] .rail-ic { color: var(--rail-acc); }
/* Nợ đợt 2 V1-E01 (P3): cột phải ẩn thì nút "‹ Bảng hôm nay" (#shellReopen, css/app.css z-index 51) nằm dưới lớp phủ z 150.
   Khi Bảng tin mở, đưa nút lên 152: trên trang, dưới màn che 155 của ngăn chi tiết và hộp. */
body.bti-dang-mo.shell-v4.right-hide #shellReopen { z-index: 152; }
.bti-trang { position: fixed; top: var(--bti-tren, 0px); left: var(--bti-trai, 0px); right: var(--bti-phai, 0px); bottom: 0; z-index: 150; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); }
.bti-tr-dau { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 16px; background: var(--card, #fff); border-bottom: 3px solid var(--primary); }
.bti-tr-dau h2 { font-size: var(--fs-lg, 16px); color: var(--primary); }
.bti-tr-tt { min-width: 0; }
.bti-mo { color: var(--ink-3); font-size: var(--fs-xs, 12px); display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.bti-tr-than { flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; padding: 12px 16px 40px; }
.bti-tr-luoi { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; max-width: 1500px; margin: 0 auto; }
/* PA1 vòng 2 (YC-03, C14): bố cục theo bề rộng KHUNG Bảng tin (container query), không theo cửa sổ, vì rail trái và cột phải
   "Bảng hôm nay" của app ăn bề ngang (cửa sổ 1238 px chỉ còn khung 700 px). Khung dưới 860 px: một cột, cột phải xuống dưới
   cột chính (cả trang lọc, tìm; thứ tự DOM giữ nguyên). Từ 860 px: hai cột, cột phải co từ 320 px (không dưới 180 px) để cột
   chính luôn từ 600 px; ví dụ khung 860 px thì cột phải 214 px. Cột phải hẹp nên danh sách nguồn quét xếp tên nguồn trên
   nội dung (cột tên rộng theo chữ sẽ ép nội dung còn vài px). Trình duyệt chưa có container query: luôn một cột. */
.bti-trang { container-type: inline-size; container-name: btikhung; }
@container btikhung (min-width: 860px) { .bti-tr-luoi { grid-template-columns: minmax(0, 1fr) clamp(180px, calc(100% - 614px), 320px); } }
@container btikhung (min-width: 860px) { .bti-tr-phai .bti-nguon { grid-template-columns: minmax(0, 1fr); } }
.bti-tr-chinh, .bti-tr-phai { min-width: 0; }
.bti-hai { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 900px) { .bti-hai { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
.bti-hop { background: var(--card, #fff); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
.bti-hop h3 { font-size: var(--fs-md, 14px); margin-bottom: 6px; color: var(--ink); }
.bti-tt { list-style: none; padding: 0; margin: 0; }
.bti-tt li { display: flex; gap: 8px; padding: 4px 0; font-size: var(--fs-sm, 13px); overflow-wrap: anywhere; }
.bti-dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; background: var(--ink-3); }
.bti-dot.bti-dan { background: var(--danger); }
.bti-dot.bti-warn { background: var(--warn); }
.bti-dot.bti-ok { background: var(--success); }
.bti-dot.bti-blue { background: var(--primary); }
.bti-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.bti-kpi { border: 1px solid var(--line); border-radius: 8px; padding: 8px; background: var(--card, #fff); }
.bti-kpi b { display: block; font-size: var(--fs-num, 22px); color: var(--primary); }
.bti-kpi span { color: var(--ink-3); font-size: var(--fs-xs, 12px); }
.bti-kpi.bti-dan b { color: var(--danger); }
.bti-kpi.bti-warn b { color: var(--ink); }
.bti-mchips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 10px; }
.bti-mchips button { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; border: 1px solid var(--line); background: var(--card, #fff); color: var(--ink-2); padding: 4px 10px; }
.bti-mchips button[aria-pressed="true"] { border-color: var(--primary); background: var(--primary); color: var(--primary-ink); }
.bti-mine { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-sm, 13px); color: var(--ink-2); margin-left: 6px; }
.bti-tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 2px solid var(--line); margin-bottom: 8px; }
.bti-tabs button { border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: none; color: var(--ink-2); padding: 8px 12px; margin-bottom: -2px; }
.bti-tabs button[aria-selected="true"] { color: var(--primary); border-bottom-color: var(--primary); }
.bti-loc { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 8px; font-size: var(--fs-sm, 13px); color: var(--ink-2); }
.bti-loc label { display: inline-flex; align-items: center; gap: 4px; }
.bti-loc select { max-width: 220px; }
.bti-nhom { margin: 12px 0 6px; font-weight: 800; color: var(--ink-2); font-size: var(--fs-sm, 13px); }
.bti-ds { display: grid; gap: 10px; }
.bti-the { background: var(--card, #fff); border: 1px solid var(--line); border-left: 5px solid var(--warn); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.bti-s-dan { border-left-color: var(--danger); }
.bti-s-warn { border-left-color: var(--warn); }
.bti-s-ok { border-left-color: var(--success); }
.bti-s-blue { border-left-color: var(--primary); }
.bti-da-doc h4 { font-weight: 600; }
.bti-r1 { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bti-stt { color: var(--ink-3); font-weight: 700; font-size: var(--fs-xs, 12px); }
.bti-eff { margin-left: auto; }
.bti-the h4 { margin: 6px 0 2px; font-size: var(--fs-md, 14px); color: var(--ink); cursor: pointer; overflow-wrap: anywhere; }
.bti-the h4:hover, .bti-the h4:focus { color: var(--primary); text-decoration: underline; outline: none; }
.bti-doc { color: var(--ink-3); font-size: var(--fs-xs, 12px); overflow-wrap: anywhere; }
.bti-g2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 8px; font-size: var(--fs-sm, 13px); color: var(--ink-2); }
@media (min-width: 900px) { .bti-g2 { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); } }
.bti-g2-full { grid-column: 1 / -1; }
.bti-lab { font-size: 11px; font-weight: 800; color: var(--ink-3); text-transform: uppercase; letter-spacing: .02em; margin: 6px 0 3px; }
.bti-prj { display: flex; flex-wrap: wrap; gap: 4px; }
.bti-pc { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 5px; border: 1px solid var(--line); font-size: var(--fs-xs, 12px); font-weight: 700; color: var(--ink); }
.bti-pc i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); }
.bti-pc.bti-dan i { background: var(--danger); }
.bti-pc.bti-warn i { background: var(--warn); }
.bti-pc.bti-ok i { background: var(--success); }
.bti-pc.bti-blue i { background: var(--primary); }
.bti-why { color: var(--ink-3); font-size: var(--fs-xs, 12px); margin-top: 4px; overflow-wrap: anywhere; }
.bti-todo { margin: 0; padding-left: 18px; }
.bti-todo li { margin: 2px 0; }
.bti-ghim { margin-top: 8px; padding: 6px 9px; border-radius: 7px; border: 1px solid var(--brand); color: var(--ink); font-size: var(--fs-sm, 13px); overflow-wrap: anywhere; }
.bti-cf { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); color: var(--ink-3); font-size: var(--fs-xs, 12px); }
.bti-nut-lk { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 6px; border: 1px solid var(--primary); color: var(--primary); font-size: var(--fs-xs, 12px); font-weight: 600; text-decoration: none; background: var(--card, #fff); }
.bti-nut-lk.bti-nut-phu { border-color: var(--line); color: var(--ink-2); }
.bti-kgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-top: 8px; }
.bti-kbox { background: var(--card, #fff); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.bti-kbox.bti-me { border: 2px solid var(--primary); }
.bti-kbox h4 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--fs-sm, 13px); margin-bottom: 4px; }
.bti-kbox h4 small { color: var(--ink-3); font-weight: 600; }
.bti-kbox ul { list-style: none; margin: 0; padding: 0; }
.bti-kbox li { display: flex; gap: 6px; align-items: flex-start; padding: 4px 0; border-top: 1px solid var(--line); cursor: pointer; font-size: var(--fs-sm, 13px); overflow-wrap: anywhere; }
.bti-kbox li:hover, .bti-kbox li:focus { color: var(--primary); outline: none; }
.bti-legend { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; color: var(--ink-3); font-size: var(--fs-xs, 12px); margin-bottom: 6px; }
.bti-cuon-ngang { max-width: 100%; overflow-x: auto; }
.bti-mx, .bti-tg, .bti-match { border-collapse: collapse; font-size: var(--fs-xs, 12px); background: var(--card, #fff); }
.bti-mx th, .bti-mx td, .bti-tg th, .bti-tg td, .bti-match td { border: 1px solid var(--line); padding: 4px 6px; text-align: center; vertical-align: top; }
.bti-tg th, .bti-tg td, .bti-match td { text-align: left; }
.bti-mx th { background: var(--primary-soft); color: var(--ink); }
.bti-mx th.bti-n { min-width: 90px; font-weight: 700; }
.bti-mx th.bti-n span { font-weight: 500; }
.bti-vach { display: block; height: 5px; margin-bottom: 3px; border-left: 0; border-radius: 3px; background: var(--primary); }
.bti-vach.bti-c-pdn { background: var(--brand); }
.bti-vach.bti-c-tc { background: var(--success); }
.bti-vach.bti-c-ns { background: var(--warn); }
.bti-vach.bti-c-sm { background: var(--danger); }
.bti-mx td.bti-p, .bti-mx th.bti-p { text-align: left; min-width: 140px; }
.bti-mx td.bti-p button { display: block; text-align: left; text-decoration: none; }
.bti-mx td.bti-p span { display: block; font-weight: 400; color: var(--ink-3); }
.bti-o { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--line); background: var(--card, #fff); font-weight: 800; padding: 0; color: var(--ink); }
.bti-o.bti-dan { background: var(--danger); border-color: var(--danger); color: #fff; }
.bti-o.bti-warn { background: var(--warn); border-color: var(--warn); color: var(--ink); }
.bti-o.bti-ok { border-color: var(--success); color: var(--success); }
.bti-o.bti-blue { border-color: var(--primary); color: var(--primary); }
.bti-o.bti-none { border-color: transparent; color: var(--ink-3); }
.bti-tl { list-style: none; margin: 8px 0 0; padding: 0; }
.bti-tl li { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 2px 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.bti-tl .bti-d { grid-row: span 2; font-weight: 800; color: var(--ink); }
.bti-tl .bti-d small { display: block; font-weight: 600; color: var(--ink-3); }
.bti-tl li.bti-sap .bti-d, .bti-tl li.bti-sap .bti-d small { color: var(--danger); }
.bti-tl li.bti-qua { opacity: .75; }
.bti-tl .bti-t { font-weight: 600; overflow-wrap: anywhere; }
.bti-tl .bti-s { color: var(--ink-3); font-size: var(--fs-xs, 12px); overflow-wrap: anywhere; }
.bti-note { padding: 8px 10px; border-radius: 8px; background: var(--primary-soft); color: var(--ink); font-size: var(--fs-sm, 13px); }
.bti-h3 { font-size: var(--fs-md, 14px); margin: 14px 0 6px; }
.bti-h4 { font-size: var(--fs-sm, 13px); margin: 8px 0 4px; }
.bti-co, .bti-nguon { display: grid; grid-template-columns: minmax(90px, max-content) minmax(0, 1fr); gap: 4px 10px; font-size: var(--fs-sm, 13px); }
.bti-co dt, .bti-nguon dt { font-weight: 700; color: var(--ink-2); }
.bti-co dd, .bti-nguon dd { color: var(--ink-2); overflow-wrap: anywhere; }
.bti-gui { display: grid; gap: 6px; }
.bti-gui button { display: block; text-align: left; width: 100%; border: 1px solid var(--line); background: var(--card, #fff); border-radius: 8px; padding: 6px 8px; font-weight: 400; }
.bti-gui button:hover { border-color: var(--primary); }
.bti-gui b { display: block; font-size: var(--fs-sm, 13px); overflow-wrap: anywhere; }
.bti-gui small { display: block; color: var(--ink-3); }
.bti-gui q, .bti-srcl q { display: block; color: var(--ink-2); font-style: italic; overflow-wrap: anywhere; }
.bti-buoc { margin: 0; padding-left: 18px; font-size: var(--fs-sm, 13px); }
.bti-buoc li { margin: 4px 0; }
.bti-buoc span { display: block; color: var(--ink-3); font-size: var(--fs-xs, 12px); }

/* ---------- ngăn chi tiết ---------- */
.bti-man { position: fixed; top: var(--bti-tren, 0px); left: var(--bti-trai, 0px); right: var(--bti-phai, 0px); bottom: 0; z-index: 155; background: rgba(0, 0, 0, .28); }
.bti-ngan { position: fixed; top: var(--bti-tren, 0px); right: var(--bti-phai, 0px); bottom: 0; z-index: 160; width: min(680px, calc(100vw - var(--bti-trai, 0px) - var(--bti-phai, 0px))); display: flex; flex-direction: column; background: var(--card, #fff); color: var(--ink); box-shadow: -8px 0 24px rgba(0, 0, 0, .18); }
.bti-ng-dau { padding: 10px 14px; border-bottom: 1px solid var(--line); }
.bti-ng-dau h3 { margin: 6px 0 2px; font-size: var(--fs-lg, 16px); overflow-wrap: anywhere; }
.bti-ng-than { flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; padding: 6px 14px 16px; }
.bti-ng-chan { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); background: var(--card, #fff); }
.bti-sec { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-sm, 13px); color: var(--ink-2); overflow-wrap: anywhere; }
.bti-sec h4 { font-size: var(--fs-sm, 13px); color: var(--ink); margin-bottom: 4px; }
.bti-sec ul { margin: 0; padding-left: 18px; }
.bti-srcl { list-style: none; padding-left: 0 !important; }
.bti-srcl li { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; padding: 3px 0; overflow-wrap: anywhere; }
.bti-srcl a { color: var(--link, var(--primary)); font-weight: 600; overflow-wrap: anywhere; }
.bti-match tr.bti-x td { text-decoration: line-through; color: var(--ink-3); }
.bti-gan { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bti-gan input[type="url"] { flex: 1 1 260px; min-width: 0; }
.bti-gan input[type="text"] { flex: 1 1 140px; min-width: 0; }
.bti-ctabs { display: flex; gap: 2px; border-bottom: 2px solid var(--line); margin-bottom: 8px; }
.bti-ctabs button { border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: none; color: var(--ink-2); padding: 6px 10px; margin-bottom: -2px; }
.bti-ctabs button[aria-selected="true"] { color: var(--primary); border-bottom-color: var(--primary); }
.bti-yk { padding: 7px 0; border-top: 1px solid var(--line); }
.bti-yk-ghim { background: var(--primary-soft); padding: 7px 8px; border-radius: 8px; border: 1px solid var(--brand); margin-bottom: 4px; }
.bti-yk-h { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: var(--fs-xs, 12px); color: var(--ink-3); }
.bti-yk-h b { color: var(--ink); font-size: var(--fs-sm, 13px); }
.bti-yk p { margin-top: 3px; color: var(--ink); overflow-wrap: anywhere; }
.bti-soan { display: grid; gap: 6px; margin-top: 8px; }
.bti-soan textarea { width: 100%; min-height: 76px; resize: vertical; font-family: inherit; }
.bti-soan .bti-hang { flex-wrap: wrap; }

/* ---------- hộp chia sẻ, hộp nạp ---------- */
.bti-man2 { z-index: 165; }
.bti-hp { position: fixed; z-index: 170; left: calc((100vw + var(--bti-trai, 0px) - var(--bti-phai, 0px)) / 2); top: calc((100vh + var(--bti-tren, 0px)) / 2); transform: translate(-50%, -50%); width: min(620px, calc(100vw - var(--bti-trai, 0px) - var(--bti-phai, 0px) - 16px)); max-height: calc(100vh - var(--bti-tren, 0px) - 24px); display: flex; flex-direction: column; background: var(--card, #fff); color: var(--ink); border-radius: 12px; box-shadow: 0 16px 40px rgba(0, 0, 0, .25); }
.bti-hp-dau { padding: 10px 14px; border-bottom: 1px solid var(--line); }
.bti-hp-dau h3 { margin-top: 6px; font-size: var(--fs-lg, 16px); }
.bti-hp-than { flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; padding: 10px 14px; display: grid; gap: 8px; font-size: var(--fs-sm, 13px); }
.bti-hp-than input[type="search"], .bti-hp-than input[type="text"], .bti-hp-than textarea { width: 100%; min-width: 0; font-family: inherit; }
.bti-hp-than textarea { min-height: 70px; resize: vertical; }
.bti-hp-chan { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); }
.bti-dinh { display: flex; gap: 8px; align-items: flex-start; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--primary-soft); }
.bti-dinh b { display: block; overflow-wrap: anywhere; }
.bti-f { font-weight: 700; color: var(--ink-2); }
.bti-to { display: flex; flex-wrap: wrap; gap: 6px; }
.bti-to-c { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 9px; border-radius: 999px; border: 1px solid var(--primary); color: var(--primary); background: var(--card, #fff); font-weight: 600; max-width: 100%; overflow-wrap: anywhere; }
.bti-sugg { display: flex; flex-wrap: wrap; gap: 6px; }
.bti-sg { border-radius: 999px; border: 1px dashed var(--line); background: var(--card, #fff); color: var(--ink-2); padding: 3px 10px; font-weight: 500; max-width: 100%; overflow-wrap: anywhere; text-align: left; }
.bti-sg:hover { border-color: var(--primary); color: var(--primary); }
.bti-opt { display: flex; gap: 8px; align-items: flex-start; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.bti-opt small { display: block; color: var(--ink-3); }

/* ---------- điện thoại ---------- */
.bti-mb-hn { overflow: hidden; }
.bti-mb-hn .bti-hn-dau { cursor: pointer; }
.bti-mb-hn .bti-hn-dong { padding: 8px 2px; }
.bti-mb { display: grid; gap: 8px; min-width: 0; max-width: 100%; overflow-x: hidden; }
.bti-mb-chips { margin: 0; }
.bti-mb-the { cursor: pointer; border-left: 5px solid var(--warn); min-width: 0; }
.bti-mb-tt { margin-top: 4px; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.bti-mb-ct { padding: 2px 2px 20px; }
.bti-mb-h { font-size: var(--fs-lg, 16px); overflow-wrap: anywhere; }
.bti-mb .bti-soan textarea { font-size: 16px; }
@media (max-width: 600px) {
  .bti-tr-dau, .bti-tr-than { padding-left: 10px; padding-right: 10px; }
  .bti-tl li { grid-template-columns: minmax(0, 1fr); }
  .bti-tl .bti-d { grid-row: auto; }
  .bti-hn-dong { flex-wrap: wrap; }
  .bti-eff { margin-left: 0; }
  .bti-co, .bti-nguon { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Bảng tin Quy định P3 (07/10): nhãn hiệu lực, cảnh báo văn bản gốc, tin báo, thẩm định, chip tuần ----------
   Bản dự phòng không dùng color-mix; màu nhạt theo trạng thái nằm trong css/bantin-mau.css (SPEC §5.4).
   Chữ chip dùng --ink trên nền sáng hoặc chữ trắng trên --ink-2 để đủ tương phản 4,5:1; nhãn luôn có chữ. */
.bti-hl-hang { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-bottom: 4px; min-width: 0; }
.bti-hl { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 5px; border: 1px solid var(--line); background: var(--card, #fff); color: var(--ink); font-size: var(--fs-xs, 12px); font-weight: 700; white-space: nowrap; }
.bti-hl-lon { padding: 2px 10px; font-size: var(--fs-sm, 13px); }
.bti-hl-con { border-color: var(--success); }
.bti-hl-mot-phan { border-color: var(--warn); }
.bti-hl-ngung { border-color: var(--danger); }
.bti-hl-het { border-color: var(--ink-2); background: var(--ink-2); color: #fff; }
.bti-hl-chua { border-color: var(--primary); background: var(--primary-soft); }
.bti-hl-du-thao { border-style: dashed; border-color: var(--ink-3); }
.bti-hl-khong { color: var(--ink-2); }
.bti-se { color: var(--ink-2); font-size: var(--fs-xs, 12px); font-style: italic; }
.bti-canh-goc { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 5px; border: 1px solid var(--danger); background: var(--danger); color: #fff; font-size: var(--fs-xs, 12px); font-weight: 800; overflow-wrap: anywhere; }
div.bti-canh-goc { display: block; margin: 2px 0 6px; padding: 6px 10px; }
.bti-nhan-tb { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 5px; border: 1px solid var(--warn); background: var(--card, #fff); color: var(--ink); font-size: var(--fs-xs, 12px); font-weight: 700; overflow-wrap: anywhere; }
.bti-nhan-td { display: inline-block; padding: 1px 7px; border-radius: 5px; border: 1px solid var(--success); background: var(--card, #fff); color: var(--ink); font-size: 11px; font-weight: 700; white-space: nowrap; }
.bti-tc { display: inline-flex; align-items: center; max-width: 100%; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--card, #fff); color: var(--ink); font-size: var(--fs-xs, 12px); font-weight: 600; overflow-wrap: anywhere; }
.bti-tc-moi { border-color: var(--primary); background: var(--primary-soft); }
.bti-tc-doi { border-color: var(--warn); }
.bti-tc-se { border-style: dashed; }
.bti-tc-cu { border-color: var(--brand); }
/* thẻ theo hiệu lực: nét đứt, mờ + gạch ngang (mục hết hiệu lực); màu viền và nền ở bantin-mau.css */
.bti-the.bti-t-mot-phan, .bti-the.bti-t-ngung { border-left-style: dashed; }
.bti-the.bti-t-mot-phan { border-left-color: var(--warn); }
.bti-the.bti-t-ngung { border-left-color: var(--danger); }
.bti-the.bti-t-du-thao { border-style: dashed; }
.bti-the.bti-t-het { border-left-color: var(--ink-3); }
.bti-the.bti-t-tinbao { background: var(--grey, #f4f4f4); }
.bti-t-het .bti-the-than { opacity: .6; }
.bti-t-het .bti-sh, .bti-t-het h4, .bti-t-het .bti-mb-tt { text-decoration: line-through; }
.bti-hn-tt > .bti-hn-nhan { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
/* trang tra cứu: tìm, công tắc tuần, chọn nhiều mục, Xem thêm */
.bti-tim { flex: 0 1 320px; min-width: 160px; }
.bti-thanh-loc { margin-bottom: 8px; }
.bti-loc-tuan { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; font-size: var(--fs-sm, 13px); color: var(--ink-2); }
.bti-cong { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--ink); }
.bti-tuan-so { min-width: 64px; text-align: center; color: var(--ink); }
.bti-chon { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); }
.bti-them { display: flex; justify-content: center; margin: 12px 0; }
/* chi tiết: dòng thời gian hiệu lực, quan hệ có trích dẫn, thẩm định, hộp sửa trạng thái, lịch sử */
.bti-ng-tieu { color: var(--ink-2); font-size: var(--fs-sm, 13px); overflow-wrap: anywhere; }
.bti-h5 { margin: 8px 0 4px; font-size: var(--fs-xs, 12px); font-weight: 800; color: var(--ink-2); text-transform: uppercase; letter-spacing: .02em; }
.bti-moc-ds { list-style: none; margin: 0 0 0 6px; padding: 0 0 0 14px; border-left: 2px solid var(--line); }
.bti-moc { position: relative; padding: 4px 0 4px 4px; color: var(--ink-2); overflow-wrap: anywhere; }
.bti-moc::before { content: ""; position: absolute; left: -21px; top: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--card, #fff); border: 2px solid var(--ink-3); }
.bti-moc-ht { color: var(--ink); }
.bti-moc-ht::before { background: var(--primary); border-color: var(--primary); }
.bti-moc-sau { font-style: italic; }
.bti-moc-sau::before { border-style: dashed; }
.bti-sec ul.bti-qh { list-style: none; padding-left: 0; }
.bti-qh li { padding: 5px 0; border-top: 1px dashed var(--line); overflow-wrap: anywhere; }
.bti-qh-nhan { font-weight: 700; color: var(--ink); }
.bti-trich { margin: 4px 0 2px; padding: 4px 8px; border-left: 3px solid var(--primary); background: var(--primary-soft); color: var(--ink); font-size: var(--fs-xs, 12px); }
.bti-trich b { display: block; }
.bti-sua { display: grid; gap: 4px; margin-top: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--grey, #f4f4f4); }
.bti-sua input[type="text"], .bti-sua input[type="date"], .bti-sua select { width: 100%; min-width: 0; font-family: inherit; }
.bti-cu-rev { font-style: italic; }
.bti-ls h4 { margin: 0; }
.bti-ls-ds { margin: 4px 0 0; padding-left: 18px; color: var(--ink-2); font-size: var(--fs-xs, 12px); }
.bti-cs-ds { margin: 0 0 4px; padding-left: 18px; overflow-wrap: anywhere; }
/* điện thoại: ô tìm + nút Lọc, tấm lọc xếp dọc (375 px không cuộn ngang) */
.bti-mb-tim { display: flex; gap: 6px; align-items: center; min-width: 0; }
.bti-mb-tim input { flex: 1 1 auto; min-width: 0; font-size: 16px; }
.bti-mb-locp { padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--card, #fff); min-width: 0; }
.bti-mb-locp .bti-loc { flex-direction: column; align-items: stretch; }
.bti-mb-locp .bti-loc label { justify-content: space-between; }
.bti-mb-locp .bti-loc select { width: 60%; max-width: 100%; }
.bti-mb .bti-loc-tuan { margin-bottom: 0; }
.bti-mb .bti-hl, .bti-mb-hn .bti-hl { white-space: normal; }
@media (max-width: 600px) {
  .bti-tim { flex: 1 1 100%; }
  .bti-hl { white-space: normal; }
}

/* ---------- PA1 bản 2 (13/10): trang đầu tieuDiem, thẻ lớn tác động lớn + phân tích 3 phần, thẻ theo mức khi lọc hoặc tìm ----------
   Màu theo biến 3 theme. Đầu thẻ đỏ rượu vang --bti-ruou: theme đỏ #8E1D2C (như --brand), xanh đậm và lục bảo đỏ trầm (như dondoc.css);
   điện thoại theme xanh đậm là nền tối nên dùng đỏ sáng hơn (tách khỏi nền thẻ từ 3:1) và chữ phụ trắng. Chữ trắng và chữ phụ --bti-ruou-phu trên đầu thẻ đạt từ 4,5:1
   ở mọi theme (bantin.test.js C13 tính lại). Chữ, viền, nền của phần mới đi qua --bti-chu, --bti-phu, --bti-vien, --bti-nen, --bti-do
   (chữ đỏ), --bti-xanh, --bti-luc: máy tính lấy biến theme chung, điện thoại (#mbApp) lấy biến --m* của theme điện thoại. */
:root { --bti-ruou: #8E1D2C; --bti-ruou-phu: #F6DFE2; --bti-chu: var(--ink); --bti-phu: var(--ink-3); --bti-vien: var(--line); --bti-nen: var(--card, #fff); --bti-do: var(--bti-ruou); --bti-xanh: var(--primary); --bti-luc: var(--success); }
html[data-theme="navy"] { --bti-ruou: #9E2A20; }
html[data-theme="luxe"] { --bti-ruou: #922020; }
#mbApp { --bti-chu: var(--mink, var(--ink)); --bti-phu: var(--msub, var(--ink-3)); --bti-vien: var(--mbd, var(--line)); --bti-nen: var(--msurf, #fff); --bti-do: var(--mtag-red-t, var(--danger)); --bti-xanh: var(--mtag-blue-t, var(--primary)); --bti-luc: var(--mtag-green-t, var(--success)); }
html[data-theme="navy"] #mbApp { --bti-ruou: #D32F2F; --bti-ruou-phu: #FFFFFF; }

/* dải 30 giây, tiêu đề phần */
.bti-td { min-width: 0; }
/* YC-03 (C14): ô theo bề rộng khung (auto-fit, ô từ 150 px). Trong ô: số và chữ cùng hàng khi chữ còn từ 120 px, không đủ thì
   chữ xuống dòng dưới số; ô hẹp dưới khoảng 220 px (nội dung dưới 190 px) luôn xếp cột: số ở trên, chữ rộng hết ô. Chữ không
   bao giờ hẹp hơn 120 px nên không còn vỡ thành từng ký tự dọc. */
.bti-d30 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 2px 0 14px; }
.bti-d30-o { container-type: inline-size; container-name: btid30; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; padding: 10px 12px; border: 1px solid var(--bti-vien); border-left: 4px solid var(--bti-ruou); border-radius: 10px; background: var(--bti-nen); color: var(--bti-chu); font-size: var(--fs-sm, 13px); line-height: 1.35; overflow-wrap: anywhere; }
.bti-d30-so { flex: 0 0 auto; font-size: var(--fs-num, 22px); line-height: 1; color: var(--bti-do); white-space: nowrap; }
.bti-d30-so small { font-size: var(--fs-md, 14px); color: var(--bti-phu); }
.bti-d30-o > span { flex: 1 1 0; min-width: min(120px, 100%); }
@container btid30 (max-width: 190px) { .bti-d30-o > span { flex-basis: 100%; } }
.bti-td-mb .bti-d30 { grid-template-columns: minmax(0, 1fr); }
.bti-td-phan { margin: 0 0 16px; min-width: 0; }
.bti-td-h { margin: 0 0 8px; font-size: var(--fs-md, 14px); font-weight: 800; color: var(--bti-chu); }
.bti-td-h-do { color: var(--bti-do); }
.bti-td-ve { margin: 0 0 8px; }
.bti-huong { flex: 0 0 auto; font-size: 11px; font-weight: 700; white-space: nowrap; color: var(--bti-xanh); }
.bti-huong.bti-h-bat { color: var(--bti-do); }
.bti-huong.bti-h-loi { color: var(--bti-luc); }
.bti-dn { font-size: 11px; font-weight: 600; color: var(--bti-phu); white-space: nowrap; }
.bti-dn.bti-dn-gap { font-weight: 700; color: var(--bti-do); }
.bti-pj { padding: 1px 7px; border: 1px solid var(--bti-vien); border-radius: 999px; font-size: 11px; font-weight: 600; color: var(--bti-chu); white-space: nowrap; }

/* thẻ lớn tác động lớn: đầu đỏ rượu vang, thân 3 phần, chân */
.bti-lon { container-type: inline-size; container-name: btilon; margin: 0 0 14px; min-width: 0; overflow: hidden; border: 1px solid var(--bti-vien); border-radius: 12px; background: var(--bti-nen); color: var(--bti-chu); }
.bti-lon-dau { padding: 12px 14px; background: var(--bti-ruou); color: #fff; }
.bti-lon-nhan { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 6px; }
.bti-lon-cao { padding: 2px 8px; border-radius: 5px; background: #fff; color: var(--bti-ruou); font-size: 11px; font-weight: 800; letter-spacing: .06em; }
.bti-lon-huong, .bti-lon-dau .bti-dn, .bti-lon-dau .bti-dn.bti-dn-gap { padding: 1px 8px; border: 1px solid var(--bti-ruou-phu); border-radius: 999px; color: #fff; font-size: 11px; font-weight: 700; white-space: nowrap; }
.bti-lon-dau h3 { font-size: var(--fs-lg, 16px); line-height: 1.35; color: #fff; cursor: pointer; overflow-wrap: anywhere; }
.bti-lon-dau h3:hover, .bti-lon-dau h3:focus-visible { text-decoration: underline; }
.bti-lon-dau .bti-chua { background: #fff; }
.bti-lon-so { margin-top: 2px; font-size: var(--fs-xs, 12px); color: var(--bti-ruou-phu); overflow-wrap: anywhere; }
.bti-lon-chot { margin-top: 8px; padding: 8px 10px; border-left: 3px solid #fff; border-radius: 0 6px 6px 0; background: rgba(0, 0, 0, .18); font-size: var(--fs-sm, 13px); line-height: 1.45; overflow-wrap: anywhere; }
.bti-lon-chot small { display: block; margin-bottom: 2px; font-size: 11px; font-weight: 800; letter-spacing: .05em; color: var(--bti-ruou-phu); }
.bti-lon-ngan { margin-top: 8px; font-size: var(--fs-sm, 13px); line-height: 1.45; overflow-wrap: anywhere; }
.bti-lon-da { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 8px; font-size: var(--fs-xs, 12px); }
.bti-lon-pj { padding: 1px 8px; border-radius: 999px; background: rgba(255, 255, 255, .16); color: #fff; }
.bti-lon-chan { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 14px; border-top: 1px solid var(--bti-vien); }
.bti-pt-ngan { margin: 10px 0 4px; }
.bti-pt { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0 16px; padding: 4px 14px 12px; }
.bti-pt.bti-pt-doc, .bti-pt-ngan .bti-pt { grid-template-columns: minmax(0, 1fr); }
/* YC-03 (C14): khung thẻ lớn dưới 640 px thì thân 3 phần một cột, xếp dọc theo thứ tự DOM (1, 2, 3) */
@container btilon (max-width: 639px) { .bti-pt { grid-template-columns: minmax(0, 1fr); } }
.bti-pt-cot { min-width: 0; padding-top: 8px; }
.bti-pt-cot h5 { margin: 0 0 6px; font-size: var(--fs-sm, 13px); font-weight: 800; color: var(--bti-chu); }
.bti-pt-cot ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.bti-pt-cot li { font-size: var(--fs-sm, 13px); line-height: 1.45; color: var(--bti-chu); overflow-wrap: anywhere; }
.bti-pt-td { padding-left: 8px; border-left: 3px solid var(--warn); }
.bti-pt-td.bti-pt-cao { border-left-color: var(--bti-ruou); }
.bti-pt-muc { padding: 0 5px; border: 1px solid var(--bti-vien); border-radius: 4px; font-size: 10px; font-weight: 800; color: var(--bti-phu); }
.bti-pt-hang { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 4px; }
.bti-pt-kn, .bti-pt-uu, .bti-pt-khoi { padding: 1px 7px; border: 1px solid var(--bti-vien); border-radius: 999px; font-size: 11px; font-weight: 600; color: var(--bti-chu); white-space: nowrap; }
.bti-pt-kn.bti-pt-cao, .bti-pt-uu.bti-pt-u-ngay { border-color: var(--bti-do); color: var(--bti-do); }
.bti-pt-uu.bti-pt-u-30 { border-color: var(--warn); }
.bti-pt-dh { margin-top: 4px; font-size: var(--fs-xs, 12px); color: var(--bti-phu); }

/* Tác động lớn khác (mở tại chỗ), Đáng chú ý, Tin nhanh */
.bti-td-ds, .bti-td-nhanh { margin: 0; padding: 0; list-style: none; border: 1px solid var(--bti-vien); border-radius: 10px; background: var(--bti-nen); }
.bti-td-ds > li + li, .bti-td-nhanh > li + li { border-top: 1px solid var(--bti-vien); }
.bti-td-dong, .bti-tn { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; width: 100%; min-width: 0; padding: 8px 10px; border: 0; background: none; color: var(--bti-chu); font: inherit; font-size: var(--fs-sm, 13px); font-weight: 600; text-align: left; }
.bti-tn { flex-wrap: nowrap; padding: 6px 10px; font-weight: 400; }
.bti-td-dong-t, .bti-tn-t { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }
.bti-td-dong-t small, .bti-tn-t small { font-weight: 400; color: var(--bti-phu); }
.bti-td-copt { padding: 0 7px; border: 1px solid var(--bti-do); border-radius: 999px; font-size: 11px; font-weight: 700; color: var(--bti-do); white-space: nowrap; }
.bti-td-mui { color: var(--bti-phu); }
.bti-td-mo > .bti-lon, .bti-td-mo > .bti-goiy, .bti-td-mo > .bti-bao { margin: 0 10px 10px; }
@media (hover: hover) { .bti-td-dong:hover, .bti-tn:hover { background: var(--primary-soft); color: var(--ink); } }
.bti-td-luoi { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.bti-td-mb .bti-td-luoi { grid-template-columns: minmax(0, 1fr); }
.bti-tv { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 10px 12px; border: 1px solid var(--bti-vien); border-top: 4px solid var(--bti-xanh); border-radius: 10px; background: var(--bti-nen); color: var(--bti-chu); }
.bti-tv.bti-h-bat { border-top-color: var(--danger); }
.bti-tv.bti-h-loi { border-top-color: var(--bti-luc); }
.bti-tv h4 { font-size: var(--fs-sm, 13px); font-weight: 700; color: var(--bti-chu); cursor: pointer; overflow-wrap: anywhere; }
.bti-tv-y { font-size: var(--fs-xs, 12px); line-height: 1.45; color: var(--bti-phu); overflow-wrap: anywhere; }
.bti-tv-r, .bti-tv-c { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.bti-tv-c { margin-top: auto; }

/* cột phải: Theo dự án của PCG, Sắp có hiệu lực; hướng dẫn + nguồn quét thu gọn */
.bti-td-hop h3 { color: var(--bti-chu); }
.bti-duan-dong { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; align-items: center; gap: 8px; width: 100%; padding: 5px 6px; border: 1px solid transparent; border-radius: 6px; background: none; color: var(--bti-chu); font: inherit; font-size: var(--fs-sm, 13px); font-weight: 400; text-align: left; }
.bti-duan-dong[aria-pressed="true"] { border-color: var(--bti-xanh); font-weight: 700; }
@media (hover: hover) { .bti-duan-dong:hover { border-color: var(--bti-xanh); } }
.bti-duan-ten { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bti-duan-thanh { display: flex; height: 8px; overflow: hidden; border-radius: 4px; background: var(--grey, #f4f4f4); }
.bti-duan-thanh i { display: block; height: 100%; }
.bti-duan-cao { background: var(--danger); }
.bti-duan-tb { background: var(--warn); }
.bti-duan-thap { background: var(--bti-phu); }
.bti-duan-chu { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; font-size: 11px; color: var(--bti-phu); }
.bti-duan-chu i { display: inline-block; width: 8px; height: 8px; margin-right: 4px; border-radius: 2px; vertical-align: middle; }
.bti-shl { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 4px; border: 0; border-top: 1px solid var(--bti-vien); background: none; color: var(--bti-chu); font: inherit; font-size: var(--fs-sm, 13px); font-weight: 400; text-align: left; }
.bti-shl:first-of-type { border-top: 0; }
.bti-shl-n { flex: 0 0 46px; font-size: 11px; line-height: 1.1; text-align: center; color: var(--bti-phu); }
.bti-shl-n b { display: block; font-size: var(--fs-lg, 16px); color: var(--bti-do); }
.bti-shl-t { min-width: 0; overflow-wrap: anywhere; }
.bti-shl-t small { display: block; color: var(--bti-phu); }
details.bti-gon-mo > summary { cursor: pointer; font-size: var(--fs-md, 14px); font-weight: 700; color: var(--ink); }
details.bti-gon-mo[open] > summary { margin-bottom: 6px; }

/* thẻ theo mức khi lọc hoặc tìm (máy chủ có trường PA1) */
.bti-dai-do { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; padding: 3px 8px; border-radius: 6px; background: var(--bti-ruou); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .05em; }
.bti-dai-do .bti-lk { color: #fff; font-size: 11px; letter-spacing: 0; }
.bti-the.bti-m-tb { border-top: 3px solid var(--bti-xanh); }
.bti-the.bti-m-tb.bti-h-bat { border-top-color: var(--danger); }
.bti-the.bti-m-tb.bti-h-loi { border-top-color: var(--bti-luc); }
.bti-y-ngan { margin: 4px 0 2px; font-size: var(--fs-xs, 12px); line-height: 1.45; color: var(--bti-phu); overflow-wrap: anywhere; }
.bti-the.bti-m-thap { padding: 6px 10px; }
.bti-the.bti-m-thap h4 { font-size: var(--fs-sm, 13px); }

/* điện thoại: rãnh thanh dự án và viền trên "bất lợi" theo biến theme điện thoại (theme xanh đậm là nền tối); máy tính giữ nguyên */
#mbApp .bti-duan-thanh { background: var(--mtrack, var(--grey, #f4f4f4)); }
#mbApp .bti-tv.bti-h-bat, #mbApp .bti-the.bti-m-tb.bti-h-bat { border-top-color: var(--bti-do); }

/* YC-04 (C14, 13/10): điện thoại, chữ tối trên nền tối. Theo cách css/thitruong.css (M3): chữ nằm thẳng trên nền màn (gradient
   theo theme) hoặc thẻ nền --msurf của #mbApp dùng --mink, chữ phụ dùng --bti-mphu (theme sáng: --ink-2, vì --msub trên nền màn
   sáng chỉ 4,2:1; xanh đậm nền tối: --msub). Thẻ, chip, hộp nền sáng (.bti-the, .bti-hop, bảng, hộp lọc) giữ chữ tối, chữ phụ
   --ink-2 (--ink-3 trên nền trắng chỉ 4,4:1). Liên kết nằm trên nền màn: --mtag-blue-t (xanh sáng ở theme tối). Bản máy tính không đổi. */
#mbApp { --bti-mphu: var(--ink-2); }
html[data-theme="navy"] #mbApp { --bti-mphu: var(--msub, var(--ink-2)); }
.bti-mb, .bti-mb-hn { color: var(--mink, var(--ink)); }
.bti-mb-hn .bti-hn-t, .bti-mb-hn .bti-hn-tt, .bti-mb .bti-cong, .bti-mb .bti-tuan-so, .bti-mb-ct .bti-sec h4, .bti-mb-ct .bti-moc b { color: var(--mink, var(--ink)); }
.bti-mb-hn .bti-hn-t small, .bti-mb-hn .bti-hn-tt > span, .bti-mb-hn .bti-hn-chan, .bti-mb .bti-loc-tuan, .bti-mb .bti-goiy, .bti-mb .bti-doc, .bti-mb .bti-nhan-ai,
  .bti-mb-hn .bti-nhan-ai, .bti-mb-ct .bti-ng-tieu, .bti-mb-ct .bti-h5, .bti-mb-ct .bti-sec div, .bti-mb-ct .bti-moc { color: var(--bti-mphu); }
.bti-mb .bti-nhan-ai, .bti-mb-hn .bti-nhan-ai { border-color: var(--bti-mphu); }
.bti-mb .bti-td-ve .bti-lk, .bti-mb-ct a, .bti-mb-ct h4 .bti-lk { color: var(--mtag-blue-t, var(--link, var(--primary))); }
.bti-mb .bti-the .bti-doc, .bti-mb .bti-the .bti-goiy, .bti-mb .bti-the .bti-y-ngan, .bti-mb .bti-the .bti-nhan-ai, .bti-mb .bti-hop .bti-goiy, .bti-mb td .bti-goiy,
  .bti-mb .bti-mb-locp .bti-goiy { color: var(--ink-2); }
.bti-mb .bti-the .bti-nhan-ai { border-color: var(--ink-3); }
html[data-theme="navy"] #mbApp .bti-lon-pj { background: rgba(0, 0, 0, .2); }
.bti-mb-ct .bti-qh-nhan { color: var(--mink, var(--ink)); }
.bti-mb-ct .bti-sec li, .bti-mb-ct .bti-kc { color: var(--bti-mphu); }
.bti-mb-ct .bti-sec table, .bti-mb-ct .bti-sec table div { color: var(--ink-2); }
/* ND-2c — nối danh mục: ô lọc DM, mã dự án (liên kết / thị trường / chưa gắn mã), «Theo dự án của PCG», bảng «Bỏ qua» của kết quả nạp.
   Chỉ lớp bti-, chỉ token màu sẵn có; giao diện bên trong ô danh mục do danhmuc.css lo. */
.bti-locdm { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.bti-locdm-o { display: inline-block; min-width: 160px; max-width: 260px; }
.bti-mb-locp .bti-locdm { display: flex; justify-content: space-between; }
.bti-mb-locp .bti-locdm-o { width: 60%; min-width: 0; max-width: 100%; }
.bti-ma-tt, .bti-ma-cho, .bti-chu-cu { overflow-wrap: anywhere; }
.bti-chu-cu { color: var(--bti-phu); }
#mbApp .bti-chu-cu { color: var(--bti-mphu); }
.bti-nhan-dm { display: inline-block; padding: 0 6px; border: 1px solid currentColor; border-radius: 999px; font-size: 11px; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.bti-nhan-cg { font-size: 11px; white-space: nowrap; }
.bti-lon-dau .bti-lon-pj a, .bti-lon-dau .bti-lon-pj .bti-chu-cu { color: inherit; }
.bti-lon-dau .bti-lon-pj a { text-decoration: underline; }
.bti-duan-dong.bti-duan-dm { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); cursor: default; }
@media (hover: hover) { .bti-duan-dm:not(.bti-duan-chon):hover { border-color: transparent; } }
.bti-duan-dm .bti-duan-ten { white-space: normal; overflow: visible; overflow-wrap: anywhere; }
.bti-duan-chon { border-color: var(--bti-xanh); font-weight: 700; }
.bti-duan-loc { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; min-width: 0; padding: 2px 4px; border: 1px solid transparent; border-radius: 6px; background: none; color: inherit; font: inherit; cursor: pointer; }
.bti-duan-loc[aria-pressed="true"] { border-color: var(--bti-xanh); }
@media (hover: hover) { .bti-duan-loc:hover { border-color: var(--bti-xanh); } }
.bti-duan-loc:focus-visible { outline: 2px solid var(--bti-xanh); outline-offset: 1px; }
.bti-duan-nhom { margin: 8px 0 2px; font-size: var(--fs-xs, 12px); font-weight: 700; color: var(--bti-phu); }
.bti-duan-cg { margin-top: 6px; font-size: var(--fs-sm, 13px); color: var(--bti-phu); }
.bti-bq th { padding: 0; border: 1px solid var(--line); background: var(--grey, #f4f4f4); text-align: left; }
.bti-bq-sap { width: 100%; padding: 4px 6px; border: 0; background: none; color: var(--ink); font: inherit; font-weight: 700; text-align: left; white-space: nowrap; cursor: pointer; }
.bti-bq td { max-width: 18em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* KH-03 (review ND-2c v1): dòng Hôm nay không còn role=button vì chứa liên kết danh mục; tiêu đề .bti-hn-ten là nút bàn phím, cả dòng vẫn bấm được bằng chuột.
   Tiêu đề là span con trực tiếp của .bti-hn-tt ⇒ trả lại kiểu chữ tiêu đề (luật «.bti-hn-tt > span» là của dòng phụ). Thẻ Hôm nay điện thoại: nút là .bti-hn-t. */
.bti-hn-dong .bti-hn-tt > .bti-hn-ten { display: inline; font-weight: inherit; color: inherit; font-size: inherit; cursor: pointer; }
.bti-hn-dong:focus-within { background: var(--primary-soft); }
.bti-hn-ten:focus, .bti-mb-hn .bti-hn-t[role="button"]:focus { outline: none; }
.bti-hn-ten:focus-visible, .bti-mb-hn .bti-hn-t[role="button"]:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 3px; }
