/* Giao diện theo mockup: thanh bên xanh đậm, nội dung nền sáng, thẻ bo góc, nhãn màu nhạt. */
:root {
  --nen: #f3f6fb; --the: #ffffff; --chu: #1f2a37; --chu-phu: #5b6b7f; --vien: #e3e9f2;
  --ben: #0d2a4d; --ben-2: #0a2140; --ben-chu: #d8e3f3; --chinh: #1d5bd8; --chinh-dam: #1848ad; --chinh-nhat: #e8f0ff;
  --tieu-de-bang: #eef3fb; --bo: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: "Segoe UI", Roboto, Arial, sans-serif; font-size: 14px; color: var(--chu); background: var(--nen); }
a { color: var(--chinh); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0; }
h2 { font-size: 16px; margin: 0 0 12px; }
h3 { font-size: 14px; margin: 0 0 8px; }

/* ---------- bố cục ---------- */
.khung { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.ben { background: linear-gradient(180deg, var(--ben), var(--ben-2)); color: var(--ben-chu); display: flex; flex-direction: column; }
.logo { display: flex; gap: 10px; align-items: center; padding: 18px 18px 14px; color: #fff; }
.logo b { display: block; font-size: 18px; letter-spacing: .5px; }
.logo small { font-size: 12px; opacity: .8; }
.menu { list-style: none; margin: 8px 0; padding: 0 10px; }
.menu a { display: flex; gap: 12px; align-items: center; padding: 11px 12px; color: var(--ben-chu); border-radius: 8px; margin-bottom: 4px; }
.menu a:hover { background: rgba(255,255,255,.08); text-decoration: none; }
.menu a.dang-chon { background: var(--chinh); color: #fff; font-weight: 600; }
.menu svg { width: 18px; height: 18px; flex: none; }
.ben-cuoi { margin-top: auto; padding: 14px 18px; font-size: 12px; opacity: .7; }
.dong-menu { display: none; }

.tren { display: flex; align-items: center; gap: 16px; padding: 12px 24px; background: var(--the); border-bottom: 1px solid var(--vien); position: sticky; top: 0; z-index: 5; }
.tren .tieu-de-trang { flex: 1; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.tren .tieu-de-trang h1 { font-size: 20px; }
.tren .tieu-de-trang span { color: var(--chu-phu); }
.chuong { position: relative; cursor: pointer; }
.chuong svg { width: 22px; height: 22px; color: var(--chu-phu); }
.chuong .so { position: absolute; top: -6px; right: -8px; background: #e02424; color: #fff; font-size: 11px; border-radius: 10px; padding: 0 5px; }
.hop-tb { display: none; position: absolute; right: 0; top: 30px; width: 340px; background: #fff; border: 1px solid var(--vien); border-radius: var(--bo); box-shadow: 0 8px 24px rgba(15,40,80,.12); padding: 8px; }
.chuong:focus-within .hop-tb, .chuong:hover .hop-tb { display: block; }
.hop-tb a { display: block; padding: 8px; border-radius: 6px; color: var(--chu); font-size: 13px; }
.hop-tb a.moi { font-weight: 600; }
.nguoi { display: flex; align-items: center; gap: 10px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: #3b5b86; color: #fff; display: grid; place-items: center; font-weight: 600; }
.nguoi small { display: block; color: var(--chu-phu); }

.noi-dung { padding: 20px 24px 8px; }
.chan { display: flex; justify-content: space-between; padding: 14px 24px; color: var(--chu-phu); font-size: 12px; }

/* ---------- thành phần ---------- */
.the { background: var(--the); border: 1px solid var(--vien); border-radius: var(--bo); padding: 16px 18px; margin-bottom: 16px; }
.the-dau { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.the-dau h2 { margin: 0; }
.luoi { display: grid; gap: 16px; }
.luoi-2 { grid-template-columns: 1fr 1fr; } .luoi-3 { grid-template-columns: repeat(3, 1fr); }
.luoi-4 { grid-template-columns: repeat(4, 1fr); } .luoi-6 { grid-template-columns: repeat(6, 1fr); }
.chinh-phu { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; }
@media (max-width: 1200px) { .chinh-phu { grid-template-columns: 1fr; } .luoi-6 { grid-template-columns: repeat(3, 1fr); } }

.loc { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 16px; }
.loc label { display: block; font-weight: 600; margin-bottom: 4px; font-size: 13px; }
.o-nhap, select, input[type=text], input[type=url], input[type=number], input[type=date], input[type=search], input[type=password], input[type=email], input[type=tel], input:not([type]), textarea {
  width: 100%; padding: 8px 10px; border: 1px solid #cfd8e6; border-radius: 8px; font: inherit; background: #fff; color: inherit; }
textarea { min-height: 80px; }
.hang-tim { display: flex; gap: 10px; margin-bottom: 14px; }
.hang-tim input { flex: 1; padding: 10px 12px; }
.nut { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--chinh); background: #fff; color: var(--chinh); cursor: pointer; font: inherit; font-weight: 600; white-space: nowrap; }
.nut:hover { background: var(--chinh-nhat); text-decoration: none; }
.nut-chinh { background: var(--chinh); color: #fff; }
.nut-chinh:hover { background: var(--chinh-dam); }
.nut-do { border-color: #d92d20; color: #d92d20; }
.nut-nho { padding: 4px 10px; font-size: 13px; }
.nut:disabled { opacity: .5; cursor: not-allowed; }

table.bang { width: 100%; border-collapse: collapse; }
.bang th { background: var(--tieu-de-bang); text-align: left; font-weight: 600; padding: 9px 10px; font-size: 13px; border-bottom: 1px solid var(--vien); white-space: nowrap; }
.bang td { padding: 9px 10px; border-bottom: 1px solid #edf1f7; vertical-align: top; }
.bang tr:hover td { background: #fafcff; }
.bang tr.chon td { background: #eef4ff; }
.cuon-ngang { overflow-x: auto; }
.nho { font-size: 12px; color: var(--chu-phu); }
.dam { font-weight: 600; }

.nhan { display: inline-block; padding: 2px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.nhan-xanh { background: #def7e7; color: #11703a; } .nhan-do { background: #fde4e1; color: #b42318; }
.nhan-vang { background: #fff1d6; color: #9a5b00; } .nhan-cam { background: #ffe7d1; color: #b54708; }
.nhan-lam { background: #e3edff; color: #1d4ed8; } .nhan-tim { background: #efe5ff; color: #6b21a8; }
.nhan-tim-nhat { background: #f4edff; color: #7e4ab8; } .nhan-xam { background: #eceff3; color: #475467; }

.chi-so { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--vien); border-radius: var(--bo); padding: 14px; }
.chi-so .bieu-tuong { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; font-size: 18px; font-weight: 700; }
.chi-so b { font-size: 22px; display: block; }
.chi-so span { color: var(--chu-phu); font-size: 13px; }

.tab { display: flex; gap: 4px; border-bottom: 1px solid var(--vien); margin-bottom: 16px; flex-wrap: wrap; }
.tab a { padding: 10px 16px; color: var(--chu-phu); border-bottom: 3px solid transparent; font-weight: 600; }
.tab a.dang-chon { color: var(--chinh); border-color: var(--chinh); }
.tab a:hover { text-decoration: none; color: var(--chinh); }

.thong-tin { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; }
.thong-tin dt { color: var(--chu-phu); } .thong-tin dd { margin: 0; }
.day-thong-tin { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; padding-top: 12px; border-top: 1px solid var(--vien); margin-top: 12px; }
.day-thong-tin div small { display: block; color: var(--chu-phu); margin-bottom: 4px; }

.phan-trang { display: flex; gap: 6px; justify-content: center; margin-top: 14px; align-items: center; }
.phan-trang a, .phan-trang span { min-width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--vien); border-radius: 8px; padding: 0 8px; background: #fff; }
.phan-trang .dang-chon { background: var(--chinh); color: #fff; border-color: var(--chinh); }

.thong-diep { padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; }
.thong-diep.success { background: #def7e7; color: #11703a; } .thong-diep.error { background: #fde4e1; color: #b42318; }
.thong-diep.warning { background: #fff1d6; color: #9a5b00; } .thong-diep.info { background: #e3edff; color: #1d4ed8; }
.ghi-chu { background: #f7f9fc; border: 1px dashed #cfd8e6; border-radius: 8px; padding: 10px 14px; color: var(--chu-phu); font-size: 13px; }
.canh-bao { background: #fff8e6; border: 1px solid #ffe2a8; border-radius: 8px; padding: 10px 14px; }

/* dòng thời gian */
.dong-tg { display: flex; align-items: flex-start; margin: 10px 0 4px; overflow-x: auto; }
.moc { flex: 1; min-width: 150px; text-align: center; position: relative; padding-top: 22px; }
.moc::before { content: ""; position: absolute; top: 7px; left: 0; right: 0; border-top: 2px solid #b8c6dc; }
.moc:first-child::before { left: 50%; } .moc:last-child::before { right: 50%; }
.moc i { position: absolute; top: 0; left: calc(50% - 8px); width: 16px; height: 16px; border-radius: 50%; background: #9fb0c8; border: 3px solid #fff; box-shadow: 0 0 0 1px #9fb0c8; }
.moc.xanh i { background: #16a34a; box-shadow: 0 0 0 1px #16a34a; } .moc.lam i { background: var(--chinh); box-shadow: 0 0 0 1px var(--chinh); }
.moc.do i { background: #d92d20; box-shadow: 0 0 0 1px #d92d20; }
.moc b { display: block; } .moc span { color: var(--chu-phu); font-size: 13px; }

/* so sánh điều khoản */
.so-sanh { display: grid; grid-template-columns: 1fr 40px 1fr; gap: 8px; align-items: stretch; }
.so-sanh .cot { border: 1px solid var(--vien); border-radius: var(--bo); overflow: hidden; }
.so-sanh .cot > div:first-child { padding: 10px 14px; font-weight: 600; }
.so-sanh .cu > div:first-child { background: #eef4ff; } .so-sanh .moi > div:first-child { background: #fff0ee; color: #b42318; }
.so-sanh .than { padding: 12px 14px; white-space: pre-wrap; background: #fffaf0; line-height: 1.6; }
.so-sanh ins { background: #ffe1dc; color: #b42318; text-decoration: none; font-weight: 600; }
.so-sanh del { color: #98a2b3; }
.mui-ten { display: grid; place-items: center; color: var(--chinh); font-size: 22px; }

/* cây điều khoản */
.cay { max-height: 520px; overflow: auto; font-size: 13px; }
.cay details { margin-left: 10px; } .cay summary { cursor: pointer; padding: 3px 0; }
.cay a { display: block; padding: 3px 6px; border-radius: 6px; color: var(--chu); }
.cay a.dang-chon { background: var(--chinh-nhat); color: var(--chinh); font-weight: 600; }

/* hộp thoại */
.phu-mo { position: fixed; inset: 0; background: rgba(15,30,60,.45); display: none; z-index: 20; }
.phu-mo.hien { display: grid; place-items: center; }
.hop-thoai { background: #fff; border-radius: 14px; width: min(1180px, 95vw); max-height: 92vh; overflow: auto; padding: 18px 22px; }
.hop-thoai-dau { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }

/* văn bản hợp nhất */
.vb-hop-nhat { line-height: 1.7; }
.vb-hop-nhat .chuong-hn { font-weight: 700; margin-top: 14px; text-transform: uppercase; }
.vb-hop-nhat .dieu-hn { font-weight: 700; margin-top: 10px; }
.vb-hop-nhat .khoan-hn { margin-left: 14px; } .vb-hop-nhat .diem-hn { margin-left: 28px; }
.vb-hop-nhat .nhan-gc { background: #e3edff; color: #1d4ed8; border-radius: 4px; padding: 0 5px; font-size: 12px; cursor: pointer; border: 0; font-weight: 600; }
.vb-hop-nhat .da-sua { background: #fffaf0; }

.dang-nhap { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(160deg, var(--ben), #1d4f8f); }
.dang-nhap .the { width: 380px; padding: 28px; }
#so-do { height: 380px; border: 1px solid var(--vien); border-radius: var(--bo); background: #fbfcfe; }
.chu-giai { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.chu-giai li { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.chu-giai i { width: 34px; border-top: 2px solid; }
pre.json { background: #f7f9fc; border: 1px solid var(--vien); border-radius: 8px; padding: 10px; font-size: 12px; overflow: auto; max-height: 260px; }

/* Nhật ký: JSON xuống dòng, không tràn khung */
pre.json { white-space: pre-wrap; word-break: break-word; overflow-x: hidden; }

/* ---------- Giai đoạn 6: ô chat hỏi đáp (góc Form 1) ---------- */
.cb-mo { position: fixed; right: 24px; bottom: 24px; z-index: 15; display: inline-flex; gap: 8px; align-items: center;
  padding: 12px 18px; border: 0; border-radius: 999px; background: var(--chinh); color: #fff; font: inherit; font-weight: 600;
  box-shadow: 0 8px 24px rgba(29,91,216,.35); cursor: pointer; }
.cb-mo:hover { background: var(--chinh-dam); }
.cb-khung { position: fixed; right: 24px; bottom: 84px; z-index: 16; width: min(440px, calc(100vw - 32px));
  height: min(640px, calc(100vh - 120px)); display: flex; flex-direction: column; background: #fff;
  border: 1px solid var(--vien); border-radius: 14px; box-shadow: 0 16px 40px rgba(15,40,80,.22); overflow: hidden; }
.cb-khung[hidden] { display: none; }
.cb-dau { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 12px 14px;
  background: linear-gradient(180deg, var(--ben), var(--ben-2)); color: #fff; }
.cb-dau small { display: block; font-size: 12px; opacity: .8; margin-top: 2px; }
.cb-dong { background: transparent; border: 0; color: #fff; font-size: 16px; cursor: pointer; }
.cb-tuy-chon { display: flex; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--vien); background: var(--tieu-de-bang); }
.cb-tuy-chon label { flex: 1; font-size: 12px; color: var(--chu-phu); display: flex; flex-direction: column; gap: 3px; }
.cb-tuy-chon select, .cb-tuy-chon input { padding: 5px 8px; font-size: 13px; }
.cb-tin { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; background: var(--nen); }
.cb-nguoi { align-self: flex-end; max-width: 85%; background: var(--chinh); color: #fff; padding: 8px 12px; border-radius: 12px 12px 2px 12px; white-space: pre-wrap; }
.cb-may { align-self: flex-start; max-width: 96%; background: #fff; border: 1px solid var(--vien); padding: 10px 12px; border-radius: 12px 12px 12px 2px; }
.cb-may p { margin: 0 0 8px; }
.cb-khong { border-color: #f5c16c; background: #fffaf0; }
.cb-chu { white-space: pre-wrap; line-height: 1.55; }
.cb-so { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; margin: 0 1px; border-radius: 10px;
  background: var(--chinh-nhat); color: var(--chinh); font-size: 12px; font-weight: 700; vertical-align: 1px; }
.cb-so:hover { background: var(--chinh); color: #fff; text-decoration: none; }
.cb-trich { list-style: none; margin: 10px 0 0; padding: 8px 0 0; border-top: 1px dashed var(--vien); display: grid; gap: 8px; font-size: 13px; }
.cb-trich li { display: flex; gap: 8px; align-items: flex-start; }
.cb-goi-y { display: grid; gap: 6px; }
.cb-goi-y button { text-align: left; background: var(--chinh-nhat); border: 1px solid #cfdcf7; color: var(--chinh-dam); border-radius: 8px; padding: 6px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.cb-dg { margin-top: 8px; font-size: 12px; color: var(--chu-phu); display: flex; gap: 6px; align-items: center; }
.cb-dg button { border: 1px solid var(--vien); background: #fff; border-radius: 6px; padding: 2px 8px; font: inherit; cursor: pointer; }
.cb-cho { color: var(--chu-phu); font-style: italic; }
.cb-nhap { display: flex; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--vien); }
.cb-nhap textarea { flex: 1; resize: none; }
.cb-chan { padding: 6px 14px 10px; font-size: 11.5px; color: var(--chu-phu); }

/* Màn hình 1366–1536px: không để bảng rộng đẩy cả trang tràn ngang */
.khung > main, .chinh-phu > *, .luoi > * { min-width: 0; }
.the:has(> table.bang), .the:has(> form > table.bang) { overflow-x: auto; }

/* =====================================================================
   PHIÊN BẢN 1.2 – theo Yêu cầu sửa lần 1 (L1) và lần 2 (L2)
   ===================================================================== */

/* ---------- L1-10: nút thu gọn / mở rộng menu ---------- */
.nut-menu { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--vien); border-radius: 8px; background: #fff; color: var(--chu-phu); cursor: pointer; }
.nut-menu:hover { background: var(--chinh-nhat); color: var(--chinh); }
.nut-menu svg { width: 20px; height: 20px; }
.khung { transition: grid-template-columns .2s; }
body.menu-thu-gon .khung { grid-template-columns: 68px 1fr; }
body.menu-thu-gon .chu-menu, body.menu-thu-gon .logo > div { display: none; }
body.menu-thu-gon .logo { justify-content: center; padding: 18px 0 14px; }
body.menu-thu-gon .menu { padding: 0 8px; }
body.menu-thu-gon .menu a { justify-content: center; padding: 11px 0; }
.ben { position: sticky; top: 0; height: 100vh; overflow-y: auto; }

/* ---------- L1-13: hộp thông báo hiện khoảng 5 dòng, có thanh cuộn dọc ---------- */
.hop-tb { z-index: 30; padding: 0; overflow: hidden; }
.hop-tb-dau { padding: 10px 12px; font-weight: 600; border-bottom: 1px solid var(--vien); background: var(--tieu-de-bang); }
.hop-tb-ds { max-height: 292px; overflow-y: auto; padding: 4px 6px; overscroll-behavior: contain; }
.hop-tb-ds a { border-bottom: 1px solid #f0f3f8; border-radius: 0; line-height: 1.35; }
.hop-tb-ds a:last-child { border-bottom: 0; }

/* ---------- L1-2, L1-8: thanh ngang phân nhóm loại văn bản ---------- */
.thanh-nhom { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; }
.thanh-nhom a, .thanh-nhom button { display: inline-flex; gap: 6px; align-items: center; padding: 6px 14px; border: 1px solid var(--vien); border-radius: 999px; background: #fff; color: var(--chu); font: inherit; font-size: 13px; cursor: pointer; }
.thanh-nhom a:hover, .thanh-nhom button:hover { border-color: var(--chinh); color: var(--chinh); text-decoration: none; }
.thanh-nhom .dang-chon { background: var(--chinh); border-color: var(--chinh); color: #fff; }
.thanh-nhom b { font-size: 12px; background: rgba(0,0,0,.06); border-radius: 999px; padding: 0 7px; }
.thanh-nhom .dang-chon b { background: rgba(255,255,255,.25); }

/* ---------- L2-1..L2-4: bảng gọn, xem đủ cột ---------- */
.bang th.cot-hep, .bang td.cot-hep { min-width: 76px; max-width: 104px; white-space: normal; overflow-wrap: break-word; }
[hidden] { display: none !important; }
/* Bảng gọn: lề ô hẹp, tiêu đề cột được xuống dòng – để xem đủ cột trên màn hình 1366px */
.bang-gon th, .bang-gon td { padding: 8px 6px; }
.bang-gon th { white-space: normal; vertical-align: bottom; }
.chinh-phu.nhat-ky { grid-template-columns: 1fr 340px; }
.bang-gon .nhan { white-space: normal; text-align: center; }
.bang-cuon { max-height: 440px; overflow: auto; border: 1px solid var(--vien); border-radius: 8px; }
.bang-cuon .bang th { position: sticky; top: 0; z-index: 1; }

/* ---------- Kho nội bộ: nút, tổng hợp ngang, tiến trình đồng bộ (L1-1, L1-5, L2-3) ---------- */
.hang-nut { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hang-nut form { margin: 0; }
.nut-tong-kho { background: #0d2a4d; border-color: #0d2a4d; color: #fff; letter-spacing: .3px; }
.nut-tong-kho:hover { background: #163d6e; color: #fff; }
.tong-hop-ngang { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 12px; }
.chip { display: inline-flex; gap: 6px; align-items: center; padding: 3px 10px; border-radius: 999px; background: var(--tieu-de-bang); font-size: 13px; }
.tien-trinh { display: flex; flex-direction: column; gap: 6px; margin: 0 0 12px; padding: 10px 12px; border-radius: 8px; background: #f3f7ff; border: 1px solid #d6e2fb; }
.tien-trinh-thanh { height: 8px; border-radius: 99px; background: #dde6f5; overflow: hidden; }
.tien-trinh-thanh i { display: block; height: 100%; width: 35%; border-radius: 99px; background: var(--chinh); }
.tien-trinh.dang-chay .tien-trinh-thanh i { animation: chay-tien-trinh 1.2s ease-in-out infinite; }
.tien-trinh.thanh-cong { background: #effaf3; border-color: #bfe8cf; } .tien-trinh.thanh-cong .tien-trinh-thanh i { width: 100%; background: #16a34a; }
.tien-trinh.that-bai { background: #fff4f2; border-color: #f7c6bf; } .tien-trinh.that-bai .tien-trinh-thanh i { width: 100%; background: #d92d20; }
.tien-trinh-nhan { font-size: 13px; font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
@keyframes chay-tien-trinh { 0% { transform: translateX(-100%); } 100% { transform: translateX(290%); } }

/* ---------- L2-5: hộp thoại "Xem nội dung điều khoản" rộng hết khung bên phải, 2 cột cuộn độc lập ---------- */
.phu-mo.hien { place-items: center end; padding: 2vh 12px; }
.hop-thoai { width: calc(100vw - 236px - 24px); max-width: none; height: 96vh; max-height: 96vh; display: flex; flex-direction: column; overflow: hidden; }
body.menu-thu-gon .hop-thoai { width: calc(100vw - 68px - 24px); }
.hop-thoai-dau { flex: none; }
#hop-thoai-than { flex: 1; min-height: 0; overflow: auto; }
#hop-thoai-than:has(> .dk-khung) { overflow: hidden; }
.dk-khung { display: grid; grid-template-columns: 300px 1fr; gap: 18px; height: 100%; min-height: 0; }
.dk-trai { display: flex; flex-direction: column; min-height: 0; }
.dk-trai .cay { flex: 1; max-height: none; min-height: 0; overflow: auto; border: 1px solid var(--vien); border-radius: 8px; padding: 4px; }
.dk-phai { min-height: 0; overflow: auto; padding-right: 6px; }
.dk-phai.dang-tai { opacity: .45; transition: opacity .15s; }
body.dang-mo-hop { overflow: hidden; }

/* ---------- L2-6: điều hướng nhiều nội dung thay đổi trong hộp thoại ---------- */
.dieu-huong { flex: none; margin: 0 0 10px; padding: 8px 10px; border: 1px solid #d6e2fb; background: #f5f8ff; border-radius: 10px; }
.dh-thanh { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dh-nhan { flex: 1; min-width: 200px; font-size: 13px; }
.dh-ds { margin: 8px 0 0; padding: 4px 4px 4px 28px; max-height: 132px; overflow-y: auto; background: #fff; border: 1px solid var(--vien); border-radius: 8px; font-size: 13px; }
.dh-ds li { padding: 2px 0; }
.dh-ds a { color: var(--chu); display: block; padding: 2px 6px; border-radius: 6px; }
.dh-ds a.dang-chon { background: var(--chinh-nhat); color: var(--chinh); font-weight: 600; }

/* ---------- Lược đồ quan hệ (L1-6, L1-7, L1-14) ---------- */
.chinh-phu.luoc-do { grid-template-columns: 1fr 320px; }
.luoc-do #so-do { height: 560px; }
.chu-giai details summary { cursor: pointer; display: flex; gap: 10px; align-items: center; list-style: none; }
.chu-giai details summary::-webkit-details-marker { display: none; }
.chu-giai details p { margin: 4px 0 6px 44px; font-size: 12.5px; color: var(--chu-phu); line-height: 1.5; }
.chu-giai i { flex: none; }
.chu-giai-nhom { margin: 10px 0 2px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--chu-phu); }
.khung-cuon { max-height: 70vh; overflow: auto; padding-right: 8px; }

/* ---------- L1-12: chế độ xem trên điện thoại / máy tính bảng ---------- */
.man-che { display: none; }
@media (max-width: 900px) {
  .khung, body.menu-thu-gon .khung { grid-template-columns: 1fr; }
  .ben { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; z-index: 40; transform: translateX(-100%); transition: transform .2s; }
  body.menu-mo .ben { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.35); }
  body.menu-mo .man-che { display: block; position: fixed; inset: 0; background: rgba(15,30,60,.45); z-index: 35; }
  body.menu-thu-gon .chu-menu, body.menu-thu-gon .logo > div { display: revert; }
  .tren { padding: 10px 12px; gap: 10px; flex-wrap: wrap; }
  .tren .tieu-de-trang h1 { font-size: 17px; }
  .tren .tieu-de-trang span { display: none; }
  .nguoi-ten { display: none; }
  .hop-tb { position: fixed; left: 8px; right: 8px; top: 60px; width: auto; }
  .noi-dung { padding: 12px; }
  .chan { flex-direction: column; gap: 4px; padding: 12px; }
  .loc, .luoi-2, .luoi-3, .luoi-4 { grid-template-columns: 1fr 1fr !important; }
  .loc > div[style*="span"] { grid-column: 1 / -1 !important; }
  .luoi-6 { grid-template-columns: repeat(2, 1fr) !important; }
  .chinh-phu, .chinh-phu.luoc-do, .chinh-phu[style] { grid-template-columns: 1fr !important; }
  .hang-tim { flex-wrap: wrap; } .hang-tim input { flex-basis: 100%; }
  .the-dau form { flex-wrap: wrap; } .the-dau form select { max-width: 100%; }
  .cb-mo { right: 12px; bottom: 12px; padding: 9px 14px; font-size: 13px; }
  .the { padding: 12px; }
  .day-thong-tin { grid-template-columns: repeat(2, 1fr); }
  .thong-tin { grid-template-columns: 110px 1fr; }
  .the:has(table.bang) { overflow-x: auto; }
  .luoc-do #so-do { height: 420px; }
  .phu-mo.hien { place-items: stretch; padding: 0; }
  .hop-thoai, body.menu-thu-gon .hop-thoai { width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; padding: 12px; }
  .dk-khung { grid-template-columns: 1fr; grid-template-rows: 180px 1fr; }
  .so-sanh { grid-template-columns: 1fr; } .so-sanh .mui-ten { transform: rotate(90deg); }
  .ss-hang { grid-template-columns: 1fr !important; }
}
@media (max-width: 520px) {
  .loc, .luoi-2, .luoi-3, .luoi-4, .luoi-6 { grid-template-columns: 1fr !important; }
  .day-thong-tin { grid-template-columns: 1fr; }
}
/* ---------- v1.3 – Form 8 Soạn công văn ---------- */
.soan-buoc { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 12px 16px; }
.soan-buoc div { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.soan-buoc b { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--chinh); color: #fff; display: grid; place-items: center; }
.soan-loc { grid-template-columns: 1.2fr 1.5fr auto; align-items: end; }
.soan-luoi { display: grid; grid-template-columns: minmax(280px, 1fr) 1.6fr; gap: 16px; align-items: start; }
.soan-luoi-ban { grid-template-columns: 1.7fr minmax(260px, 1fr); }
.soan-luoi > * { min-width: 0; }
.bang-tep td.nx { min-width: 180px; }
.soan-luoi > .the, .soan-luoi > div > .the { margin-bottom: 16px; }
.ds-mau { list-style: none; margin: 0; padding: 0; }
.ds-mau li a { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; padding: 9px 10px; border-radius: 8px; color: inherit; border: 1px solid transparent; }
.ds-mau li a:hover { background: #f3f6fb; text-decoration: none; }
.ds-mau li.dang-chon a { background: #e8efff; border-color: #bcd0ff; }
.ds-mau .ma-mau { grid-row: span 2; font-size: 12px; font-weight: 700; color: var(--chinh); padding-top: 2px; }
.ds-mau .nho { grid-column: 2; }
.ds-truong li { margin-bottom: 4px; }
.mau-chi-tiet { margin-top: 12px; border-top: 1px dashed var(--vien); padding-top: 8px; }
.mau-chi-tiet summary { cursor: pointer; font-weight: 600; color: var(--chinh); }
.mau-chi-tiet h4 { margin: 12px 0 4px; }
.mau-chi-tiet p { margin: 0 0 6px; }
.khong-sao-chep { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.chu-nghieng { font-style: italic; }
.o-truong { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.o-truong label { font-weight: 600; }
.o-truong textarea, .o-truong input { width: 100%; box-sizing: border-box; }
.bat-buoc { color: #b42318; }
.tai-len-soan { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 10px 0; }
.xac-nhan { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; flex-basis: 100%; }
.xem-du-thao { border: 1px solid var(--vien); border-radius: 8px; padding: 18px 22px; background: #fff; max-height: 70vh; overflow: auto; font-family: "Times New Roman", serif; font-size: 15px; line-height: 1.55; }
.xem-du-thao h3, .xem-du-thao h4, .xem-du-thao h5 { font-family: inherit; margin: 14px 0 6px; }
.xem-du-thao p { margin: 0 0 8px; text-align: justify; }
.xem-du-thao .gach { padding-left: 18px; }
.xem-du-thao mark.o-trong { background: #fff1d6; }
.can-kiem-tra { background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 10px 14px; margin-bottom: 12px; }
.xoa-ban { text-align: right; margin-top: -4px; }
@media (max-width: 900px) {
  .soan-buoc { grid-template-columns: 1fr 1fr; }
  .soan-loc, .soan-luoi, .soan-luoi-ban { grid-template-columns: minmax(0, 1fr); }
  .xem-du-thao { padding: 12px; font-size: 14px; } .xem-du-thao p { text-align: left; }
}
@media print { .khong-sao-chep, .mau-chi-tiet { display: none !important; } }

@media print {
  .ben, .tren, .chan, .thanh-nhom, .tab, .cb-mo, .cb-khung, .nut { display: none !important; }
  .khung { display: block; } .khung-cuon { max-height: none; overflow: visible; }
}

/* ---------- YC L2-7: Đề xuất cập nhật văn bản nội bộ (2 cột) ---------- */
.ss-hang { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.ss-dau { position: sticky; top: 62px; z-index: 3; background: var(--tieu-de-bang); border-radius: 8px; padding: 8px 12px; font-weight: 700; font-size: 13px; letter-spacing: .3px; margin-bottom: 10px; }
.ss-dau > div:last-child { color: #b42318; }
.ss-khoi { border: 1px solid var(--vien); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; background: #fff; }
.ss-khoi.bi-tac-dong { border-left: 4px solid #f5a524; }
.ss-khoi.da-sua { border-left-color: #d92d20; background: #fffdfb; }
.ss-khoi.bo-sung { border-left: 4px solid #16a34a; }
.ss-vi-tri { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; margin-bottom: 8px; font-size: 13.5px; }
.than-cu { white-space: pre-wrap; line-height: 1.6; background: #f6f8fc; border: 1px solid #e3e9f2; border-radius: 8px; padding: 9px 11px; color: #33404f; }
.ss-hang textarea { line-height: 1.6; min-height: 70px; resize: vertical; border-color: #f0b8ae; background: #fffaf8; }
.ss-hang textarea[readonly] { background: #f7f7f7; border-color: var(--vien); }
.xem-truoc { font-size: 12.5px; line-height: 1.55; margin-top: 6px; color: var(--chu-phu); white-space: pre-wrap; }
.xem-truoc ins, ins.ins-mau { background: #ffe1dc; color: #b42318; text-decoration: none; font-weight: 600; }
.xem-truoc del { color: #98a2b3; }
.ss-nut { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.ss-ly-do { margin-top: 8px; font-size: 12.5px; color: var(--chu-phu); }
.ss-ly-do summary { cursor: pointer; color: var(--chinh); }
.ss-ly-do div { margin-top: 4px; padding: 6px 10px; background: #f7f9fc; border-radius: 6px; }
.thanh-hanh-dong { position: sticky; bottom: 0; z-index: 4; box-shadow: 0 -6px 18px rgba(15,40,80,.08); }
.thanh-hanh-dong .tach { flex: 1; }
.nut-xanh, a.nut-xanh { background: #16a34a; border-color: #16a34a; color: #fff; } .nut-xanh:hover { background: #12813b; color: #fff; }
.the-ra-soat-nb { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 4px 0 10px; padding: 8px 10px; border-radius: 8px; background: #f3f7ff; border: 1px solid #d6e2fb; }
.cb-ngoai { border-color: #9ec5fe; background: #f3f8ff; }

/* ---------- v1.3 – YC L3-2: phản hồi tức thì khi bấm ---------- */
a, button, .nut, summary, select, label { touch-action: manipulation; }
.nut:active, .thanh-nhom a:active, .menu a:active { transform: translateY(1px); filter: brightness(.95); }
#thanh-tai { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 100; background: var(--chinh); opacity: 0; pointer-events: none; }
#thanh-tai.dang { opacity: 1; animation: thanh-tai 1.4s ease-out forwards; }
@keyframes thanh-tai { 0% { width: 0; } 30% { width: 55%; } 100% { width: 88%; } }
.khung { transition: none; }

/* ---------- v1.3 – YC L3-1: bộ lọc thu gọn được ---------- */
details.bo-loc > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 6px 0; font-weight: 600; color: var(--chinh); user-select: none; }
details.bo-loc > summary::-webkit-details-marker { display: none; }
details.bo-loc .bo-loc-mui { margin-left: auto; transition: transform .15s; }
details.bo-loc:not([open]) .bo-loc-mui { transform: rotate(-90deg); }
details.bo-loc[open] > summary { margin-bottom: 8px; }
.nut-tai { padding: 2px 8px; font-size: 12.5px; }

/* ---------- v1.3 – YC L3-8: gom văn bản nội bộ bị tác động ---------- */
.khoi-vbnb { background: #fbfcfe; border-left: 4px solid #f5a524; }
.khoi-vbnb .the-ra-soat-nb { margin: 10px 0 6px; }
details.chi-tiet-rs > summary { cursor: pointer; color: var(--chinh); font-size: 13px; padding: 4px 0; }

/* ---------- v1.4 – YC L4-6: phóng to khung hỏi đáp ---------- */
.cb-nut-dau { display: flex; gap: 4px; align-items: center; }
.cb-phong-to { font-size: 18px; line-height: 1; }
.cb-khung.cb-lon { right: 24px; left: 24px; top: 24px; bottom: 24px; width: auto; max-height: none; height: auto; z-index: 60; }
@media (max-width: 900px) { .cb-khung.cb-lon { left: 8px; right: 8px; top: 8px; bottom: 8px; } }
/* ---------- v1.4 – YC L4-1: chân hộp thông báo ---------- */
.hop-tb-chan { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--vien); font-size: 13px; }
.hop-tb-chan form { margin: 0; }
.chon-so-dong { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.chon-so-dong select { width: auto; }

/* ---------- v1.4 – Form 8: tự tạo prompt, hạn mức ---------- */
.han-muc-soan { margin: -8px 0 12px; }
.chon-cong-thuc { border: 1px solid var(--vien); border-radius: 8px; padding: 8px 12px; margin: 12px 0; display: grid; gap: 6px; }
.chon-cong-thuc legend { font-weight: 600; padding: 0 4px; }
.chon-cong-thuc label { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.ct-gioi-thieu { padding: 8px 0; border-bottom: 1px dashed var(--vien); }
.luoi-prompt { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 14px; }
.the-prompt { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.the-prompt h3 { margin: 0; font-size: 16px; }
.the-prompt textarea { width: 100%; box-sizing: border-box; font-size: 13.5px; line-height: 1.5; }
@media (max-width: 900px) { .luoi-prompt { grid-template-columns: minmax(0, 1fr); } }

/* ---------- v1.4 – tham số, xóa dữ liệu ---------- */
.bang-tham-so input { width: 100%; box-sizing: border-box; }
.xoa-nhom { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--vien); border-radius: 8px; margin-bottom: 8px; }
.xoa-nhom input { margin-top: 4px; }
/* v1.5 – ô được hệ thống gợi ý sẵn */
.o-goi-y { background: #e8f5ee !important; border-color: #16a34a !important; }
/* v1.5 – YC L5-8: Bản soạn của tôi hiện ~6 dòng, cuộn dọc xem bản cũ */
.cuon-doc-6 { max-height: 330px; overflow-y: auto; }
.cuon-doc-6 thead th { position: sticky; top: 0; z-index: 1; }
.chon-mot label { display: block; margin: 4px 0; }
.phan-prompt textarea { font-family: inherit; }
.nhan-nhnn { font-size: 11px; }
/* v1.5 – A3 phản hồi có nội dung trong ô chat */
.cb-ly-do { display: grid; gap: 4px; width: 100%; }
.cb-ly-do select, .cb-ly-do input { font-size: 12px; padding: 4px 6px; }
.cb-dg { flex-wrap: wrap; }

/* v1.5.1 – Trợ lý AI */
.tro-ly { display: grid; grid-template-columns: 270px 1fr; gap: 14px; align-items: start; }
.tro-ly-ben { position: sticky; top: 70px; }
.tro-ly-ds { max-height: 300px; overflow-y: auto; margin: 10px 0 0; display: flex; flex-direction: column; gap: 2px; }
.tro-ly-ds a { display: flex; flex-direction: column; padding: 6px 8px; border-radius: 6px; color: var(--chu); }
.tro-ly-ds a:hover { background: var(--tieu-de-bang); text-decoration: none; }
.tro-ly-ds a.dang-chon { background: #e3edff; }
.tro-ly-hm { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--vien); font-size: 13px; display: grid; gap: 3px; }
.tro-ly-khung { display: flex; flex-direction: column; min-height: 60vh; }
.tro-ly-tin { flex: 1; display: flex; flex-direction: column; gap: 10px; max-height: 62vh; overflow-y: auto; padding: 4px; }
.tin { padding: 10px 12px; border-radius: 10px; max-width: 92%; }
.tin-nguoi { align-self: flex-end; background: #e3edff; }
.tin-ai { align-self: flex-start; background: #f6f8fb; border: 1px solid var(--vien); }
.tin-ai p { margin: 0 0 6px; } .tin-ai ul { margin: 0 0 6px 18px; padding: 0; }
.tin-dau { margin-bottom: 4px; }
.nhan-nguon { display: inline-block; font-size: 11px; font-weight: 600; padding: 0 5px; border-radius: 4px; background: #dbe7ff; color: #1d4ed8; }
.tin-nguon ul { margin: 6px 0 0 16px; padding: 0; }
.tro-ly-chao { margin: auto; text-align: center; max-width: 560px; }
.tro-ly-hoi { margin-top: 10px; border-top: 1px solid var(--vien); padding-top: 10px; }
.tro-ly-hoi textarea { width: 100%; resize: vertical; }
.tro-ly-tuy-chon { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 6px; font-size: 13px; }
.tro-ly-tuy-chon button { margin-left: auto; }
/* v1.6.2 (01/11/2026 – 20h) – chủ đề Văn bản / Khác, nút Internet từng câu */
.tro-ly-chu-de { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 0 0 6px; }
.tro-ly-chu-de .nut.dang-chon { background: var(--chinh); color: #fff; border-color: var(--chinh); }
.tro-ly-internet { display: inline-flex; gap: 4px; align-items: center; cursor: pointer; }
#tro-ly-dang-viet { margin-top: 8px; }
.chu-do { color: #b42318; }
@media (max-width: 900px) { .tro-ly { grid-template-columns: 1fr; } .tro-ly-ben { position: static; } .tro-ly-tin { max-height: none; } }

/* ================= v1.6 ================= */
/* ← Trở về / → Tiến, đường dẫn */
.dh-trang { display: inline-flex; gap: 4px; flex: none; }
.nut-dh { width: 34px; height: 34px; border: 1px solid var(--vien); border-radius: 8px; background: #fff; color: var(--chu); font-size: 17px; line-height: 1; cursor: pointer; }
.nut-dh:hover { border-color: var(--chinh); color: var(--chinh); }
.nut-dh:disabled { opacity: .4; cursor: default; }
.duong-dan { font-size: 13px; color: var(--phu, #667085); margin: -4px 0 12px; }
.duong-dan a { color: var(--chinh); }
.duong-dan span { color: var(--chu); font-weight: 600; }
/* chọn không gian (Quản trị cao nhất, Lãnh đạo) */
.chon-kg { margin: 0; }
.chon-kg select { max-width: 300px; padding: 6px 8px; border: 1px solid var(--chinh); border-radius: 8px; background: var(--chinh-nhat); color: var(--chinh); font: inherit; font-size: 13px; font-weight: 600; }
.chip-kg { background: var(--chinh-nhat); color: var(--chinh); font-weight: 600; white-space: nowrap; max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
/* mục trước / mục sau trên trang chi tiết */
.mt-ms { display: flex; justify-content: space-between; gap: 8px; margin: 0 0 12px; flex-wrap: wrap; }
.mt-ms .nho { align-self: center; }
/* ngân sách AI */
.thanh-nho { height: 4px; background: #eef2f7; border-radius: 4px; overflow: hidden; margin-top: 3px; }
.thanh-nho i { display: block; height: 100%; background: var(--chinh); }
.chu-cam { color: #b54708; }
.bang-ngan-sach td { vertical-align: top; }
/* sửa lỗi 1.5.1: khung Hỏi đáp phóng to (z 60) che hộp Xem điều khoản – hộp thoại luôn nằm trên cùng */
.phu-mo { z-index: 70; }
/* Bộ nhớ cá nhân, kiểm tra trước khi duyệt */
.ghi-nho li { display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--vien); }
.co-bat-thuong { background: #fff8eb; }
.nut-ghim { border: 0; background: none; cursor: pointer; font-size: 13px; color: var(--chinh); padding: 2px 4px; }
@media (max-width: 760px) { .dh-trang, .chon-kg, .chip-kg { display: none; } }
@media print { .dh-trang, .duong-dan, .chon-kg, .mt-ms { display: none !important; } }
.form-doc label { display: block; margin: 0 0 10px; font-size: 13px; color: var(--phu, #475467); }
.form-doc label input:not([type=checkbox]), .form-doc label select { display: block; width: 100%; margin-top: 4px; }
.form-doc label input[type=checkbox] { margin-right: 6px; }

/* ===== Bản 1.6 hoàn chỉnh ===== */
.thanh-ho-tro { background: #b45309; color: #fff; padding: 8px 16px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 14px; position: sticky; top: 0; z-index: 60; }
.thanh-ho-tro form { margin: 0 0 0 auto; }
.thanh-ho-tro .nut { background: #fff; color: #b45309; border-color: #fff; }
.thanh-goi { background: #fff7e6; border-bottom: 1px solid #f5d38a; color: #7a4b00; padding: 6px 16px; font-size: 14px; }
.chu-do { color: #b42318; }
.ho-tro-form { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; margin: 8px 0; padding: 10px; border: 1px dashed #d97706; border-radius: 8px; background: #fffbeb; }
.ho-tro-form label { flex: 1; min-width: 260px; }
.ho-tro-form input { width: 100%; }
tr.dang-chon td { background: var(--chinh-nhat, #eef4ff); font-weight: 600; }
/* bộ chọn tệp cộng dồn */
.tep-chon { margin-top: 6px; font-size: 13px; }
.tep-chon ul { list-style: none; padding: 0; margin: 4px 0; max-height: 180px; overflow: auto; }
.tep-chon li { display: flex; gap: 8px; align-items: center; padding: 3px 6px; border-bottom: 1px solid #eee; }
.tep-chon .tep-ten { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tep-chon .tep-bo { border: 0; background: #fde8e8; color: #b42318; border-radius: 50%; width: 22px; height: 22px; cursor: pointer; line-height: 1; }
.tep-chon .tep-loi { color: #b42318; margin-top: 4px; }
.tep-nhac { margin: 2px 0 0; color: #777; }
/* Danh sách gợi ý */
.goi-y-hop { position: fixed; z-index: 90; width: min(430px, calc(100vw - 16px)); max-height: 70vh; overflow: auto; background: #fff; border: 1px solid #d0d7e2; border-radius: 10px; box-shadow: 0 12px 32px rgba(0,0,0,.18); padding: 12px 14px; }
.goi-y-dau { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.goi-y-nhom { margin: 8px 0; }
.goi-y-nhom p { margin: 2px 0 4px; }
.goi-y-mau { display: block; width: 100%; text-align: left; margin: 3px 0; padding: 6px 8px; border: 1px solid #d0d7e2; border-radius: 6px; background: #f7f9fc; cursor: pointer; font: inherit; font-size: 13px; }
.goi-y-mau:hover { background: #eaf1ff; border-color: #9fb8e8; }
.cb-nut-gui { display: flex; flex-direction: column; gap: 4px; }
.cb-ai { margin: 6px 0; }
/* cửa sổ Nguồn tham khảo */
.nguon-mo { position: fixed; inset: 0; z-index: 80; background: rgba(15, 23, 42, .45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.nguon-mo[hidden] { display: none; }
.nguon-hop { background: #fff; border-radius: 12px; width: min(1000px, 100%); height: min(640px, 100%); display: flex; flex-direction: column; box-shadow: 0 20px 48px rgba(0,0,0,.25); }
.nguon-thanh { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid #e5e7eb; }
.nguon-khung { display: grid; grid-template-columns: 280px 1fr; flex: 1; min-height: 0; }
.nguon-ds { list-style: none; margin: 0; padding: 6px; overflow-y: auto; border-right: 1px solid #e5e7eb; }
.nguon-ds a { display: block; padding: 6px 8px; border-radius: 6px; color: inherit; text-decoration: none; font-size: 13px; }
.nguon-ds a:hover { background: #f3f6fb; }
.nguon-ds a.dang-chon { background: #e6efff; font-weight: 700; }
.nguon-xem { overflow-y: auto; padding: 12px 16px; }
.nguon-dau { margin-bottom: 6px; }
.nguon-noi-dung { background: #fafbfd; border: 1px solid #eef0f4; border-radius: 8px; padding: 8px 12px; line-height: 1.55; }
.nguon-noi-dung .thut-1 { margin-left: 14px; }
.nguon-noi-dung .thut-2 { margin-left: 28px; }
body.dang-mo-nguon { overflow: hidden; }
@media (max-width: 760px) { .nguon-khung { grid-template-columns: 1fr; grid-template-rows: 140px 1fr; } .nguon-ds { border-right: 0; border-bottom: 1px solid #e5e7eb; } }

/* v1.6.1 – Tổng kho trên máy chủ: bộ lọc Bộ/ngành, ngày */
.tk-loc-dong { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 8px; }
.tk-loc-dong label { display: inline-flex; gap: 6px; align-items: center; }
.tk-loc-dong input[type=date] { width: auto; }
.chip-chon { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border: 1px solid var(--vien, #d6dde8);
  border-radius: 999px; font-size: 13px; background: var(--nen-nhat, #f6f8fb); cursor: pointer; }
.chip-chon:has(input:checked) { background: #e7f0ff; border-color: #2f6fde; color: #1d4fb0; font-weight: 600; }
.tk-cq-khac { display: inline-block; }
.tk-cq-khac summary { cursor: pointer; color: #2f6fde; }
.tk-cq-luoi { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 12px; margin-top: 6px;
  padding: 8px; border: 1px solid var(--vien, #d6dde8); border-radius: 8px; background: #fff; max-width: 980px; }

/* v1.6.1 – Gợi ý của tôi */
.goi-y-hop { width: min(470px, calc(100vw - 16px)); }
.goi-y-cua-toi { background: #fffaf0; border: 1px solid #f3dfb2; border-radius: 8px; padding: 8px 10px; }
.goi-y-dong { display: flex; gap: 4px; align-items: stretch; }
.goi-y-dong .goi-y-mau { flex: 1; }
.goi-y-xoa { border: 1px solid #e5c7c7; background: #fff; color: #b42318; border-radius: 6px; margin: 3px 0; padding: 0 9px; cursor: pointer; }
.goi-y-xoa:hover { background: #fdecec; }
.goi-y-them { display: flex; gap: 6px; margin-top: 6px; }
.goi-y-them input { flex: 1; font-size: 13px; }
.goi-y-bao { color: #1d4fb0; margin: 4px 0 0; }
.goi-y-mac-dinh { margin-top: 10px; }
.nut-luu-goi-y { border: 0; background: none; cursor: pointer; font-size: 15px; line-height: 1; color: #b7791f; padding: 0 2px; }
.nut-luu-goi-y.da-luu { color: #d69e2e; }
.cb-nguoi .nut-luu-goi-y { color: #ffe08a; margin-left: 6px; }

/* v1.6.1 – nút ? hướng dẫn theo trang */
.nut-help { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--chinh, #2f6fde); background: #fff;
  color: var(--chinh, #2f6fde); font: 700 14px/1 Inter, system-ui, sans-serif; cursor: pointer; vertical-align: 3px; margin-left: 6px; padding: 0; }
.nut-help:hover, .nut-help:focus-visible { background: var(--chinh, #2f6fde); color: #fff; }
.hd-trang-phu { position: fixed; inset: 0; z-index: 95; background: rgba(15, 30, 60, .35); display: flex; align-items: flex-start;
  justify-content: center; padding: 70px 16px 16px; }
.hd-trang-phu[hidden] { display: none; }
.hd-trang-hop { background: #fff; border-radius: 12px; box-shadow: 0 18px 48px rgba(0,0,0,.25); width: min(640px, 100%);
  max-height: calc(100vh - 100px); overflow: auto; padding: 16px 20px; line-height: 1.6; }
.hd-trang-dau { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 17px; margin-bottom: 6px; }
.hd-trang-hop ol, .hd-trang-hop ul { margin: 4px 0 8px 20px; }
.hd-trang-md { margin: 4px 0 10px; }
.hd-trang-luu-y { background: #fff8e6; border-left: 3px solid #e0a100; padding: 6px 10px; border-radius: 6px; }
.bang .nhan { white-space: nowrap; }

/* v1.6.1 (19/10/2026) – Gửi Email cho Admin, Thư từ khách hàng, đề nghị vào hỗ trợ */
.gui-email { grid-template-columns: 1fr 420px; }
.ge-luoi { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.ge-luoi label { display: flex; flex-direction: column; gap: 4px; }
.ge-rong { grid-column: 1 / -1; }
.ge-luoi label.nho { flex-direction: row; align-items: center; gap: 6px; }
.ge-dem { align-self: flex-end; }
.ge-dem.het { color: #b42318; font-weight: 600; }
.ge-tt { white-space: pre-wrap; font-family: inherit; font-size: 12px; line-height: 1.5; background: #f6f8fb; border: 1px solid var(--vien); border-radius: 8px; padding: 8px 10px; margin: 6px 0; }
.ge-xem { border: 1px solid var(--vien); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; background: #fbfcfe; }
.the-ho-tro { border-left: 5px solid #f59e0b; background: #fffaf0; }
@media (max-width: 1200px) { .gui-email { grid-template-columns: 1fr; } .ge-luoi { grid-template-columns: 1fr; } }

/* v1.6.1 (19/10/2026) – Trợ lý AI: ẩn / hiện cột trái */
.tro-ly-khung { position: relative; }
.nut-an-ben { display: inline-block; width: auto; align-self: flex-start; border: 1px solid var(--vien); background: var(--the); color: var(--chu-phu); border-radius: 999px; font-size: 12px;
  padding: 3px 10px; cursor: pointer; margin: 0 0 8px; }
.nut-an-ben:hover { color: var(--chinh); border-color: var(--chinh); }
.nut-an-ben .hien { display: none; }
.tro-ly.an-ben { grid-template-columns: 1fr; }
.tro-ly.an-ben .tro-ly-ben { display: none; }
.tro-ly.an-ben .nut-an-ben .an { display: none; }
.tro-ly.an-ben .nut-an-ben .hien { display: inline; }
.tk-loc-ngang { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.tk-loc-ngang input, .tk-loc-ngang select { width: auto; flex: 0 1 auto; }
.tk-loc-ngang input[type=search] { flex: 1 1 200px; }

/* v1.6.2 – Tình trạng hệ thống: tài nguyên máy chủ */
.tai-nguyen{margin-bottom:16px}
.tn-luoi{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:12px}
.tn-o{border:1px solid var(--vien,#e3e7ee);border-radius:10px;padding:12px 14px;display:flex;flex-direction:column;gap:5px}
.tn-so{font-size:20px;font-weight:700;color:#13294b}
.tn-vach{height:8px;border-radius:5px;background:#e8edf4;overflow:hidden}
.tn-vach i{display:block;height:100%;border-radius:5px;background:#1f9d55}
.tn-vach i.tn-canh_bao{background:#e0a100}.tn-vach i.tn-loi{background:#d64545}

/* ---------- v1.6.2 – thẻ: thu gọn / mở rộng, phóng to toàn màn hình, thu gọn tất cả ---------- */
.the-co-cc { position: relative; }
.the-cc { position: absolute; top: 12px; right: 12px; display: inline-flex; gap: 4px; z-index: 2; }
.the-co-cc.cc-1 > .the-td, .the-co-cc.cc-1 > .the-dau { padding-right: 38px; }
.the-co-cc.cc-2 > .the-td, .the-co-cc.cc-2 > .the-dau { padding-right: 72px; }
.the-co-cc.cc-1 > .danh-cho { margin-right: 38px; } .the-co-cc.cc-2 > .danh-cho { margin-right: 72px; }
.the-nut { width: 28px; height: 28px; display: inline-grid; place-items: center; padding: 0; border: 1px solid var(--vien); border-radius: 7px;
  background: #fff; color: var(--chu-phu); font-size: 14px; line-height: 1; cursor: pointer; }
.the-nut:hover { background: #eef4ff; color: var(--chinh); border-color: #bcd0ff; }
.the-nut:focus-visible, .the-nut-chu:focus-visible { outline: 2px solid var(--chinh); outline-offset: 1px; }
.the.the-gon > :not(.the-td):not(.the-cc):not(.danh-cho):not(.the-dau) { display: none !important; }
.the.the-gon > .the-dau > :not(h2):not(h3):not(b):not(:has(h2, h3)) { display: none !important; }
.the.the-gon > .the-dau > :has(h2, h3) > :not(h2):not(h3):not(:has(h2, h3)) { display: none !important; }
.the.the-gon > .the-td, .the.the-gon > .the-dau { margin-bottom: 0; }
.the.the-gon { padding-top: 12px; padding-bottom: 12px; }
.the.the-gon .the-td { color: var(--chu-phu); }
.thanh-the { display: inline-flex; gap: 6px; margin-left: auto; }
.duong-dan.co-thanh-the { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.duong-dan.co-thanh-the > .thanh-the { margin-left: auto; }
.hang-thanh-the { display: flex; justify-content: flex-end; margin: -6px 0 10px; }
.the-nut-chu { border: 1px solid var(--vien); background: #fff; border-radius: 16px; padding: 3px 10px; font-size: 12px; color: var(--chu-phu); cursor: pointer; }
.the-nut-chu:hover { color: var(--chinh); border-color: #bcd0ff; background: #eef4ff; }
.the-nen-phong { position: fixed; inset: 0; background: rgba(15, 30, 60, .55); z-index: 69; }
body.co-toan-man { overflow: hidden; }
.the.the-toan-man { position: fixed; inset: 16px; z-index: 70; margin: 0; overflow: auto; max-width: none; max-height: none;
  box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.the.the-toan-man .the-cc { position: fixed; top: 28px; right: 28px; z-index: 72; }
.the.the-toan-man [data-the-phong] { background: #b42318; color: #fff; border-color: #b42318; width: 34px; height: 34px; font-size: 16px; }
.the.the-toan-man [data-the-gon] { display: none; }
.the.the-toan-man .khung-cuon, .the.the-toan-man .xem-du-thao { max-height: none; }
.the.the-toan-man #so-do, .the.the-toan-man .so-do { height: calc(100vh - 150px) !important; }
.the.the-toan-man canvas { max-height: calc(100vh - 150px); }
@media print { .the.the-gon > * { display: revert !important; } .the-cc, .thanh-the, .hang-thanh-the { display: none !important; } }

/* ---------- v1.6.2 – điện thoại: gọn, đẹp ---------- */
@media (max-width: 900px) {
  .the-nut { width: 34px; height: 34px; font-size: 16px; }
  .the-co-cc > .the-dau h2, .the-co-cc > .the-td { cursor: pointer; }
  .the-dau-loc { margin-bottom: 10px; }
  .the-dau-loc h2 { font-size: 15px; color: var(--chinh); }
  .the.the-toan-man { inset: 0; border-radius: 0; }
  .the.the-toan-man .the-cc { top: 10px; right: 10px; }
  .the-co-cc.cc-1 > .the-td, .the-co-cc.cc-1 > .the-dau { padding-right: 42px; }
  .the-co-cc.cc-2 > .the-td, .the-co-cc.cc-2 > .the-dau { padding-right: 80px; }
  .the-co-cc > .the-td, .the-co-cc > .the-dau { min-height: 34px; display: flex; align-items: center; flex-wrap: wrap; }   /* tiêu đề không bị nút ⛶ ▴ che dòng dưới */
  .the > h2, .the-dau h2 { font-size: 16px; }
  .tren { flex-wrap: nowrap !important; gap: 8px !important; padding: 8px 10px !important; }
  .tren .tieu-de-trang { flex: 1 1 auto; min-width: 0; }
  .tren .tieu-de-trang h1 { font-size: 15px !important; line-height: 1.25; overflow-wrap: anywhere; }
  .tren .nut-help { width: 22px; height: 22px; font-size: 12px; }
  .nguoi { position: relative; flex: none; }
  .nguoi .avatar { width: 32px; height: 32px; font-size: 12px; cursor: pointer; }
  .nguoi-hop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 45; width: min(280px, calc(100vw - 20px)); background: #fff;
    border: 1px solid var(--vien); border-radius: 12px; box-shadow: 0 12px 32px rgba(15,30,60,.18); padding: 12px; display: grid; gap: 10px; }
  .nguoi-hop[hidden] { display: none; }
  .nguoi-hop .nguoi-ten { display: block !important; font-weight: 600; }
  .nguoi-hop .chon-kg, .nguoi-hop .chip-kg { display: block !important; }
  .nguoi-hop .chon-kg select { width: 100%; }
  .nguoi-hop-nut { display: flex; gap: 8px; flex-wrap: wrap; }
  .nguoi-hop-nut .nut, .nguoi-hop-nut form { flex: 1 1 auto; } .nguoi-hop-nut form .nut { width: 100%; }
  .the-dau-loc { grid-column: 1 / -1; }
  .duong-dan.co-thanh-the { font-size: 12px; }
  .thanh-the .the-nut-chu { padding: 4px 9px; }
  table.bang th, table.bang td { padding: 7px 8px; font-size: 13px; }
  .chi-so { padding: 10px; gap: 10px; }
  .chi-so .bieu-tuong { width: 34px; height: 34px; font-size: 15px; }
  .chi-so b { font-size: 19px; }
}
@media (max-width: 520px) {
  .luoi-6, .luoi:has(> .chi-so) { grid-template-columns: 1fr 1fr !important; gap: 8px !important; }
  .chi-so { flex-direction: column; align-items: flex-start; }
  .chi-so .nho { font-size: 11px; }
  .duong-dan.co-thanh-the > .thanh-the { margin-left: 0; width: 100%; justify-content: flex-end; }
}
.the-dau-bang { margin-bottom: 8px; } .the-dau-bang h2 { font-size: 15px; color: var(--chu-phu); font-weight: 600; }
.the.the-gon > .the-dau-bang { margin-bottom: 0; }

/* ---------- v1.6.2 – Tự tạo Prompt 1 màn hình ---------- */
.tt-luoi { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.o-nhan { font-weight: 600; font-size: 13px; margin: 2px 0 4px; }
.ct-chon { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 6px; }
.ct-chon label { border: 1px solid var(--vien); border-radius: 20px; padding: 6px 14px; cursor: pointer; font-weight: 600; background: #fff; }
.ct-chon label.chon, .ct-chon label:has(input:checked) { background: var(--chinh); border-color: var(--chinh); color: #fff; }
.ct-chon label:focus-within { outline: 2px solid var(--chinh); outline-offset: 2px; }
.ct-chon input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ct-mo-ta { background: #eef4ff; border-radius: 8px; padding: 8px 12px; font-size: 13px; margin: 6px 0 12px; }
.ct-mo-ta b { color: var(--chinh-dam, #1d4ed8); }
.tt-o { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.tt-o .rong { grid-column: 1 / -1; }
.tt-o label { display: block; font-weight: 600; margin-bottom: 4px; font-size: 13px; }
.tt-o .phan { font-weight: 500; color: var(--chinh); font-size: 12px; margin-left: 4px; }
.tt-o input, .tt-o select, .tt-o textarea { width: 100%; box-sizing: border-box; }
.tt-o input[name$="_khac"] { margin-top: 6px; }
.tep-o { border: 1px dashed #9db4d8; border-radius: 8px; padding: 8px 10px; margin-top: 6px; font-size: 13px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tep-o input[type=file] { width: auto; max-width: 100%; }
.xem-truoc { white-space: pre-wrap; background: #f8fafc; border: 1px solid var(--vien); border-radius: 8px; padding: 10px 12px; font-size: 12.5px; line-height: 1.55; max-height: 560px; overflow: auto; }
.xem-truoc .td { display: block; font-weight: 700; color: var(--chinh-dam, #1d4ed8); margin-top: 6px; }
.tu { background: #fef3c7; border-radius: 3px; padding: 0 2px; }
.kq-prompt { width: 100%; box-sizing: border-box; min-height: 260px; font-size: 13px; line-height: 1.55; font-family: inherit; }
@media (max-width: 900px) {
  .tt-luoi { grid-template-columns: minmax(0, 1fr); }
  .tt-o { grid-template-columns: 1fr; }
  .xem-truoc { max-height: 320px; }
}

/* v1.6.2 (29/10) – hộp tiến trình đọc tệp tải lên (mọi nơi) */
.hop-tien-trinh-tep { position: fixed; inset: 0; background: rgba(15, 23, 42, .35); display: flex; align-items: center; justify-content: center; z-index: 2000; padding: 16px; }
.hop-tien-trinh-tep[hidden] { display: none; }
.hop-tt-than { background: var(--the); border-radius: 12px; padding: 18px 20px; width: min(480px, 100%); box-shadow: 0 12px 40px rgba(0,0,0,.2); }
.hop-tt-than .tien-trinh { margin: 10px 0 8px; }
.tt-dong { font-weight: 600; min-height: 1.4em; }
/* v1.6.2 (30/10) – mục 4: hàng thẻ quản trị: mỗi nhóm một dòng, các mục thưa, cách nhau “ - ” */
.tab-quan-tri { display: grid; gap: 6px; margin: 0 0 16px; padding: 10px 14px; border: 1px solid var(--vien); border-radius: 10px; background: var(--the); }
.tab-quan-tri .tq-tong { justify-self: start; margin-bottom: 2px; }
.tab-quan-tri .nhom-tab { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 2px; line-height: 1.6; }
.tab-quan-tri .nhom-tab > b { font-size: 14px; color: var(--chu); margin-right: 8px; min-width: 128px; }
.tab-quan-tri .ngan, .the-qt .ngan { color: var(--chu-phu); padding: 0 8px; user-select: none; }
.muc-qt { white-space: nowrap; display: inline-flex; align-items: center; }
.tab-quan-tri a { padding: 3px 8px; border-radius: 6px; font-size: 14px; color: var(--chinh); }
.tab-quan-tri a.dang-chon { background: var(--chinh); color: #fff; }
.tab-quan-tri a .dem { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: #d92d20; color: #fff; font-size: 11px; text-align: center; margin-left: 3px; }
.dem-menu { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: #d92d20; color: #fff; font-size: 11px; text-align: center; font-weight: 700; }
/* v1.6.2 (30/10) – mục 5: tổng quan chỉ tên chức năng, in đậm, cách nhau “ - ” */
.the-qt { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 0; line-height: 1.7; }
.the-qt a { font-weight: 700; font-size: 15px; color: var(--chinh); padding: 2px 4px; border-radius: 6px; }
.the-qt a:hover { background: #eef4ff; text-decoration: none; }
.loc label > input, .loc label > select, .loc label > textarea { margin-top: 4px; font-weight: 400; }

/* v1.6.2 (30/10) – mục 1: điện thoại – nút ✕ đóng menu; khối Hướng dẫn / Quản trị hệ thống dời lên, dễ chạm */
@media (max-width: 900px) {
  .ben .logo { position: relative; padding-right: 52px; }
  .dong-menu { display: grid; place-items: center; position: absolute; top: 12px; right: 10px; width: 36px; height: 36px; border-radius: 50%;
    border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.08); color: #fff; font-size: 18px; cursor: pointer; }
  .dong-menu:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
  .ben-cuoi { margin-top: 18px; padding: 14px 20px calc(72px + env(safe-area-inset-bottom, 0px)); font-size: 14px; opacity: .85; }
  .ben-cuoi a { padding: 6px 0; }
  .tab-quan-tri .nhom-tab > b { min-width: 0; width: 100%; }
}
.cv-treo { display: inline-flex; gap: 8px; align-items: center; color: #b42318; font-size: 13px; font-weight: 600; margin-left: 8px; }
.cv-treo[hidden] { display: none; }
.nut-do { border-color: #d92d20 !important; color: #b42318 !important; }
/* v1.6.2 (30/10) – mục 6: trang Sao lưu */
.sl-tao { display: grid; gap: 12px; }
.sl-pham-vi { border: 0; padding: 0; margin: 0; display: flex; gap: 18px; flex-wrap: wrap; }
.sl-pham-vi legend { font-weight: 600; margin-bottom: 4px; }
.sl-khach[hidden], [data-sl-tk][hidden] { display: none; }
.sl-ds-kg { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 16px; max-height: 320px; overflow: auto;
  border: 1px solid var(--vien); border-radius: 8px; padding: 10px 12px; }
.sl-nhom-kg { display: grid; gap: 2px; }
.sl-nhom-kg label { display: flex; gap: 6px; align-items: baseline; }
.sl-phong { padding-left: 22px; }
.sl-don { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; margin: 4px 0 12px; }
.sl-don form { display: flex; gap: 8px; align-items: center; }
.sl-thao-tac { white-space: nowrap; }

/* v1.6.2 (31/10/2026) – Quản trị hệ thống → Tối ưu chatbot */
.tab-toi-uu a { padding: 8px 12px; }
.bang tr.mo td { opacity: .55; }
.bang tr.dang-chon td { background: #eef4ff; }
.bieu-do-cot { display: flex; align-items: flex-end; gap: 8px; height: 150px; padding: 4px 0 0; border-bottom: 1px solid var(--vien); }
.bieu-do-cot .cot { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.bieu-do-cot .cot i { display: block; width: 70%; max-width: 40px; min-height: 2px; background: var(--chinh); border-radius: 4px 4px 0 0; }
.bieu-do-cot .cot .so { font-size: 12px; color: var(--chu-phu); margin-bottom: 2px; }
.bieu-do-cot { margin-bottom: 4px; }
.tra-loi-thu { margin-top: 8px; padding: 10px 12px; background: #f8fafc; border: 1px solid var(--vien); border-radius: 8px; max-height: 360px; overflow: auto; }
.chon-cau-hinh { margin-top: 8px; padding: 6px 10px; border: 1px dashed var(--vien); border-radius: 8px; }
.chon-cau-hinh summary { cursor: pointer; }
form.xu-ly-nhanh { display: inline-flex; gap: 4px; margin: 4px 0 0; flex-wrap: wrap; }
form.xu-ly-nhanh select { width: 190px; padding: 3px 6px; font-size: 13px; }
form.xu-ly-nhanh input { width: 110px; padding: 3px 6px; font-size: 13px; }
@media (max-width: 760px) { .tab-toi-uu a { padding: 6px 8px; font-size: 13px; } }

/* v1.6.2 (01/11/2026) – Kho kiến thức (chung / của đơn vị) */
.kt-dau { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 8px; }
.kt-dung { margin-left: auto; }
.tab-kt .dem { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: #d92d20; color: #fff; font-size: 11px; text-align: center; }
.kt-cach { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.kt-o { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.kt-o h2 { margin: 0; }
.kt-o > .nut { align-self: flex-start; margin-top: auto; }
.kt-nhan { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin: 6px 0; }
.kt-nhan label { font-size: 13px; font-weight: 600; }
.kt-nganh { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.kt-nganh .nhan-o { font-size: 13px; font-weight: 600; margin-right: 4px; }
.kt-loc { grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr auto; align-items: end; }
.kt-thao-tac { white-space: nowrap; }
.kt-thao-tac form { display: inline; margin: 0; }
.kt-chia-se { display: flex !important; flex-direction: column; gap: 6px; max-width: 760px; margin-top: 8px; padding: 10px; border: 1px dashed var(--vien); border-radius: 8px; white-space: normal; min-width: 280px; }
tr[hidden] { display: none !important; }
.kt-trong { padding: 22px; text-align: center; color: var(--chu-phu); }
.kt-trong .nut { margin-left: 8px; }
.kt-doan { padding-left: 22px; max-height: 520px; overflow: auto; } .kt-doan li { margin-bottom: 8px; font-size: 14px; }
.kt-ket-qua { border-top: 1px solid var(--vien); padding: 10px 0; } .kt-ket-qua > div + div { margin-top: 4px; font-size: 14px; }
.kt-dx textarea { font-size: 14px; }
@media (max-width: 760px) { .kt-nhan, .kt-loc { grid-template-columns: 1fr; } .tab-kt a { padding: 6px 8px; font-size: 13px; } }
