/* ── 📊 KIỂU MỚI: ô kẻ Excel (anh duyệt đợt 1, 10/11/2026 — theo nếp giao diện POS GLP của anh) ─────────────────────────────
   Trang kiểu mới bọc nội dung trong <div class="kieu-moi">: dải đầu trang cao 58 · một hàng nút · lưới khối (2 cột máy tính,
   1 cột điện thoại) · mỗi khối một bảng kẻ ô (Tên ô · Số đang để · Giới hạn · Nghĩa là). Nền trắng, viền xanh nhạt, bấm ô chỉ
   MỘT viền xanh, nút bo góc 10, không viền đứt, không đoạn chữ xám dài (chữ dài vào nút 📖 Hướng dẫn). Macro ở _excel.html. */
.kieu-moi {
  --x-nen: #ffffff; --x-vien: #b9d3f0; --x-ke: #e1ebf6; --x-dau: #f4f8fd; --x-chu: #16202e; --x-phu: #5b6b82;
  --x-xanh: #0099ff; --x-nut: linear-gradient(#ffffff, #f2f6fb); --x-nut-vien: #c9d8ea; --x-chon: #e8f3ff;
  --x-th: #dcebfd; --x-th-chu: #12509e;
  display: flex; flex-direction: column; min-height: calc(100vh - 93px); color: var(--x-chu);
}
:root:not([data-theme="sang"]) .kieu-moi {
  --x-nen: #172031; --x-vien: #2e4566; --x-ke: #24344d; --x-dau: #1c2840; --x-chu: #e8edf5; --x-phu: #9fb0c8;
  --x-nut: linear-gradient(#22304a, #1b2840); --x-nut-vien: #34496a; --x-chon: #1e3556;
  --x-th: #1f3b63; --x-th-chu: #bcd8ff;
}
.kieu-moi *, .kieu-moi *::before, .kieu-moi *::after { box-sizing: border-box; }

/* dải đầu trang */
.dau-trang { min-height: 58px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 6px 16px;
  border-radius: 12px; color: #fff; background: linear-gradient(90deg, var(--d1, #1d6fd1), var(--d2, #3b9cf0)); }
.dau-trang.xanh-la { --d1: #15803d; --d2: #22c55e; }
.dau-trang .ten { font-size: 22px; font-weight: 800; display: flex; align-items: center; gap: 10px; margin: 0; }
.dau-trang .chip { font-size: 12px; font-weight: 700; background: rgba(255, 255, 255, .22); border-radius: 999px; padding: 2px 10px; }
.dau-trang .chip.tat { background: rgba(127, 29, 46, .55); }
.dau-trang .cac-so { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.dau-trang .oso { background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .35); border-radius: 10px;
  padding: 3px 12px; min-width: 120px; color: #fff; text-decoration: none; }
.dau-trang a.oso:hover { background: rgba(255, 255, 255, .26); }
.dau-trang .oso small { display: block; font-size: 11px; opacity: .92; }
.dau-trang .oso b { display: block; font-size: 17px; white-space: nowrap; }

/* hàng nút */
.hang-nut-x { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 10px 0; }
.nut-x { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; border: 1px solid var(--x-nut-vien); background: var(--x-nut);
  color: var(--x-chu); border-radius: 10px; padding: 7px 14px; font-weight: 600; font-size: 14px; white-space: nowrap;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .08); cursor: pointer; width: auto; text-decoration: none; }
.nut-x:hover { border-color: var(--x-xanh); filter: none; }
.nut-x.xanh { background: linear-gradient(#2f8cf0, #1d6fd1); color: #fff; border-color: #1d6fd1; }
.nut-x.do { background: linear-gradient(#ef4444, #dc2626); color: #fff; border-color: #dc2626; }

/* lưới khối: máy tính 2 cột, kéo tới đáy màn */
/* MỖI KHỐI MỘT HÀNG trải hết bề ngang (anh 10/11/2026: "cho mỗi list là một hàng, chia hai hàng chiều ngang không đủ hiện hết số")
   — trước đây 2 cột. Hai `.cot` trong HTML giữ nguyên, chỉ xếp chồng: khối cột trái trước, cột phải sau. */
.luoi-khoi { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
.luoi-khoi > .cot { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.khoi { border: 1px solid var(--x-vien); border-radius: 10px; overflow: hidden; background: var(--x-nen); scroll-margin-top: 70px; }
.khoi.gian { flex: none; }
/* 🎨 tên khối + hàng tên cột CÓ MÀU (anh 10/11/2026: "tiêu đề màu trắng không thu hút, không giữ mắt"): thanh tên khối nền
   nhạt theo màu riêng của khối (--m) + chữ đậm cùng màu; hàng tên cột nền xanh, chữ xanh đậm. */
.khoi-ten { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; padding: 8px 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--m, #1d6fd1) 35%, var(--x-vien)); border-left: 4px solid var(--m, #1d6fd1);
  background: color-mix(in srgb, var(--m, #1d6fd1) 13%, var(--x-nen)); color: color-mix(in srgb, var(--m, #1d6fd1) 70%, #0b1220); }
.khoi-ten .phai { margin-left: auto; font-weight: 600; font-size: 12px; color: var(--x-phu); white-space: nowrap; }
:root:not([data-theme="sang"]) .kieu-moi .khoi-ten { background: color-mix(in srgb, var(--m, #1d6fd1) 26%, var(--x-nen));
  color: color-mix(in srgb, var(--m, #1d6fd1) 35%, #ffffff); }
:root:not([data-theme="sang"]) .kieu-moi .khoi-ten .phai { color: #c3d0e2; }
.khoi.sang-len { box-shadow: 0 0 0 3px var(--x-xanh); transition: box-shadow .4s; }

/* bảng kẻ ô */
table.x { width: 100%; min-width: 0; border-collapse: collapse; table-layout: fixed; font-size: 14px; }
table.x th { background: var(--x-th, #dcebfd); color: var(--x-th-chu, #12509e); font-size: 12px; font-weight: 800; text-align: center; padding: 6px 8px;
  border-bottom: 1px solid var(--x-vien); border-right: 1px solid var(--x-ke); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table.x td { border-bottom: 1px solid var(--x-ke); border-right: 1px solid var(--x-ke); padding: 0 10px; height: 36px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; color: var(--x-chu); background: transparent; }
table.x th:last-child, table.x td:last-child { border-right: 0; }
table.x tr:last-child td { border-bottom: 0; }
table.x tbody tr { cursor: default; }
table.x tbody tr:hover { background: transparent; }
table.x td.ten-o { font-weight: 600; }
table.x th.c-ten { width: 24%; } table.x th.c-so { width: 15%; } table.x th.c-gioi { width: 12%; }
table.x th.c-game { width: 24%; } table.x th.c-pct { width: 12%; } table.x th.c-gif { width: 12%; }
table.x td.gioi { color: var(--x-phu); font-size: 12px; text-align: center; }
table.x td.nghia { color: var(--x-phu); font-size: 13px; }
table.x td.so { text-align: right; font-weight: 700; }
table.x td.so.rong { text-align: left; font-weight: 600; }
table.x .nghia-x { color: var(--x-phu); font-weight: 400; font-size: 13px; }
table.x td.do, .kieu-moi .chu-do { color: #dc2626; font-weight: 700; }
table.x td.go { padding: 0; }
table.x td.go input[type=text], table.x td.go input[type=password] { width: 100%; height: 36px; border: 0; border-radius: 0; background: transparent; color: var(--x-chu);
  text-align: right; font-weight: 700; font-size: 14px; padding: 0 10px; margin: 0; }
table.x td.go input:focus, table.x td.go input:focus-visible {
  outline: none; border: 0; box-shadow: inset 0 0 0 2px var(--x-xanh); background: var(--x-nen); }
table.x td.go input[type=text]:focus::placeholder { color: transparent; }
table.x td.go.chu input[type=text], table.x td.go.chu input[type=password] { text-align: left; font-weight: 500; }
table.x td.go .gon { display: none; }
table.x td.cong-o { text-align: right; padding: 0 10px; }
table.x td.nut-o { padding: 3px 6px; text-align: right; }
table.x td.nut-o .nut-x { padding: 4px 10px; font-size: 13px; }
/* ô có nút cạnh (đặt quỹ): ô gõ + nút cùng một ô */
table.x td.go .go-nut { display: flex; align-items: center; height: 36px; }
table.x td.go .go-nut input[type=text] { flex: 1; min-width: 0; }
table.x td.go .go-nut .nut-x { margin: 0 4px; padding: 4px 10px; font-size: 13px; }

/* bảng dài trong khối (đã phạt…): cuộn trong khung, hàng tên cột dính trên */
.kieu-moi .cuon-x { max-height: 460px; overflow-y: auto; }
.kieu-moi .cuon-x table.x th { position: sticky; top: 0; z-index: 1; }
.kieu-moi .khoi .thanh-tim { margin-bottom: 8px; }

/* công tắc (ô tích vẽ như công tắc gạt) */
.kieu-moi input[type=checkbox].cong { appearance: none; -webkit-appearance: none; width: 38px; height: 22px; border-radius: 999px;
  background: #cbd5e1; position: relative; cursor: pointer; vertical-align: middle; margin: 0; padding: 0; border: 0; transition: background .15s; }
.kieu-moi input[type=checkbox].cong::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px;
  border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.kieu-moi input[type=checkbox].cong:checked { background: #22c55e; }
.kieu-moi input[type=checkbox].cong:checked::after { left: 19px; }
.kieu-moi input[type=checkbox].cong:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--x-xanh); }

/* hộp 📖 Hướng dẫn (chữ dài dời vào đây) */
dialog.huong-dan-x { width: min(820px, calc(100vw - 24px)); max-height: calc(100vh - 40px); border: 1px solid var(--vien);
  border-radius: 14px; padding: 0; background: var(--the); color: var(--chu); box-shadow: 0 12px 40px rgba(0, 0, 0, .35); }
dialog.huong-dan-x::backdrop { background: rgba(0, 0, 0, .45); }
dialog.huong-dan-x .dau { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 12px 16px; background: var(--the); border-bottom: 1px solid var(--vien); font-weight: 800; font-size: 17px; }
dialog.huong-dan-x .than { padding: 6px 18px 16px; line-height: 1.55; font-size: 15px; }
dialog.huong-dan-x .than h3 { font-size: 15px; margin: 14px 0 4px; }
dialog.huong-dan-x .than p { margin: 4px 0; }

/* điện thoại: một cột, bỏ cột Giới hạn, bảng không ép chiều cao */
@media (max-width: 900px) {
  .luoi-khoi { grid-template-columns: 1fr; }
  .kieu-moi { min-height: 0; }
  .khoi.gian { flex: none; }
  .dau-trang .cac-so { margin-left: 0; width: 100%; }
  .dau-trang .oso { flex: 1; min-width: 0; }
  .dau-trang .oso b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; }
  .khoi-ten { min-width: 0; }
  .khoi-ten .phai { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 600px) {
  /* giữ đủ 4 cột (hàng gộp ô `colspan` cần đủ cột) — cột Giới hạn hẹp, chữ nhỏ xuống dòng */
  table.x th.c-ten { width: 34%; } table.x th.c-so { width: 22%; } table.x th.c-gioi { width: 14%; }
  table.x td.gioi, table.x td.ten-o { white-space: normal; line-height: 1.25; }
  table.x td.gioi { font-size: 11px; padding: 0 4px; }
  table.x td.so.rong { white-space: normal; }
  table.x td.go .go-nut { flex-direction: column; align-items: stretch; height: auto; padding: 4px 0; gap: 4px; }
  table.x td.go .go-nut input[type=text] { height: 30px; flex: none; }
  table.x td.go .go-nut .nut-x { justify-content: center; }
  table.x th { white-space: normal; padding: 4px 3px; }
  table.x td.nghia { white-space: normal; font-size: 12px; line-height: 1.3; padding-top: 4px; padding-bottom: 4px; }
  .hang-nut-x { flex-wrap: nowrap; overflow-x: auto; }
}

/* ── 🏯 Võ Lâm kiểu mới (đợt 4, 10/11/2026) ────────────────────────────────────────────────────────────────────────────
   Trang ngoài: 4 nhóm ô mục, mỗi nhóm một khối; ô mục là ô kẻ (hình trái · tên · dòng nhỏ), bấm là mở cửa sổ như cũ.
   Trong cửa sổ: lưới ô cài đặt `.luoi-cai` thành bảng kẻ ô liền (không còn thẻ bo tròn rời), ô nhập phẳng một viền xanh
   khi bấm, chữ giải thích dưới ô chỉ 2 dòng (bấm / rê chuột xem hết — JS cuối trang Võ Lâm), đoạn giải thích đầu mục
   gom vào dòng "📖 Hướng dẫn mục này" (details.hd-muc). Chỉ đổi DÁNG — không đụng cấu trúc HTML các mục. */
.vl-moi .vl-nhom .luoi-muc { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0; margin: 0; }
.vl-moi .vl-nhom .o-muc { flex-direction: row; align-items: center; justify-content: flex-start; gap: 10px; text-align: left;
  padding: 8px 12px; min-height: 58px; border: 0; border-radius: 0; background: transparent; color: var(--x-chu);
  box-shadow: inset -1px -1px 0 var(--x-ke); font-size: 14px; cursor: pointer; }
.vl-moi .vl-nhom .o-muc:hover { background: var(--x-chon); }
.vl-moi .vl-nhom .o-muc:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--x-xanh); }
.vl-moi .vl-nhom .o-muc .o-anh { width: 34px; height: 34px; }
.vl-moi .vl-nhom .o-muc .o-emo { font-size: 22px; }
.vl-moi .vl-nhom .o-muc .o-ten { display: block; font-weight: 700; flex: 1; min-width: 0; }
.vl-moi .vl-nhom .o-muc .o-phu { display: none; }
.vl-moi .vl-nhom .o-muc { display: grid; grid-template-columns: 34px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; row-gap: 1px; }
.vl-moi .vl-nhom .o-muc .o-anh { grid-row: 1 / 3; }
.vl-moi .vl-nhom .o-muc .o-ten { align-self: end; }
.vl-moi .vl-nhom .o-muc .o-phu { display: block; align-self: start; font-size: 11.5px; color: var(--x-phu);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vl-moi .vl-nhom .o-muc.that .o-phu { color: #16a34a; }
.vl-moi .vl-nhom .o-muc.canh-bao { background: rgba(239, 68, 68, .07); }
.vl-moi .vl-nhom .o-muc.canh-bao .o-phu { color: #dc2626; }

/* cửa sổ */
.vl-moi .cua { background: var(--x-nen); border: 1px solid var(--x-vien); border-radius: 12px; }
.vl-moi .cua-dau { background: var(--x-dau); border-bottom: 1px solid var(--x-vien); border-left: 4px solid #1d6fd1; }
.vl-moi .cua.canh-bao .cua-dau { border-left-color: #dc2626; }
.vl-moi .cua-dong { border-radius: 10px; border-color: var(--x-nut-vien); background: var(--x-nut); }
.vl-moi .cua-than .muc-gop-nhay { background: var(--x-nen); border-bottom-color: var(--x-vien); }
.vl-moi details.hd-muc { margin: 0 0 10px; border: 1px solid var(--x-vien); border-radius: 10px; background: var(--x-dau); }
.vl-moi details.hd-muc > summary { cursor: pointer; padding: 7px 12px; font-weight: 700; font-size: 13.5px; color: var(--x-chu); }
.vl-moi details.hd-muc[open] > summary { border-bottom: 1px solid var(--x-ke); }
.vl-moi details.hd-muc > p { margin: 8px 12px; font-size: 13.5px; line-height: 1.55; color: var(--x-chu); }

/* lưới ô cài đặt → bảng kẻ ô liền */
.vl-moi .luoi-cai { gap: 0; border: 1px solid var(--x-vien); border-radius: 10px; overflow: hidden; background: var(--x-nen); }
.vl-moi .luoi-cai > .o-cai { border: 0; border-radius: 0; background: transparent; padding: 8px 10px 9px; gap: 5px;
  box-shadow: inset -1px -1px 0 var(--x-ke); }
.vl-moi .luoi-cai { margin-right: -1px; }
.vl-moi .o-cai-ten { font-size: 13.5px; font-weight: 700; color: var(--x-chu); }
.vl-moi .o-cai-ten small.gioi { color: var(--x-phu); font-size: 11.5px; }
.vl-moi .o-nhap input, .vl-moi .li-o input, .vl-moi #vl-phan-thuong .pt-dong input, .vl-moi .o-gio-lich {
  border: 1px solid var(--x-nut-vien); border-radius: 6px; background: var(--x-dau); color: var(--x-chu);
  padding: 6px 9px; font-size: 14.5px; font-weight: 700; box-shadow: none; }
.vl-moi .o-nhap input:focus, .vl-moi .li-o input:focus, .vl-moi #vl-phan-thuong .pt-dong input:focus, .vl-moi .o-gio-lich:focus,
.vl-moi .cua-than input[type=text]:focus, .vl-moi .cua-than input:not([type]):focus {
  outline: none; border-color: var(--x-xanh); box-shadow: inset 0 0 0 1px var(--x-xanh); background: var(--x-nen); }
.vl-moi .o-cai > p.phu, .vl-moi .o-cai p.phu.gon2 { color: var(--x-phu); font-size: 12px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; cursor: help; }
.vl-moi .o-cai > p.phu.mo { display: block; -webkit-line-clamp: unset; overflow: visible; }
.vl-moi .o-nhap .don-vi { color: var(--x-phu); }
/* các thanh / thẻ riêng của 📅 🏆 ⚫ cũng phẳng theo */
.vl-moi :is(#vl-lich, #vl-phan-thuong, #vl-tan-thu) .li-thanh { background: var(--x-dau); border-color: var(--x-vien); border-radius: 10px; }
.vl-moi :is(#vl-lich, #vl-phan-thuong, #vl-tan-thu) .li-the { background: var(--x-nen); border-color: var(--x-vien); border-radius: 8px; }
.vl-moi .gb-thanh { background: var(--x-dau); border-color: var(--x-vien); border-radius: 10px; }
@media (max-width: 900px) {
  .vl-moi .vl-nhom .luoi-muc { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vl-moi .vl-nhom .o-muc { padding: 7px 8px; column-gap: 7px; grid-template-columns: 28px minmax(0, 1fr); }
  .vl-moi .vl-nhom .o-muc .o-anh { width: 28px; height: 28px; }
  .vl-moi .vl-nhom .o-muc .o-ten { font-size: 13px; line-height: 1.25; }
}
/* màu nền xen kẽ xanh lá / xanh dương của fieldset trang cũ: trong cửa sổ kiểu mới bỏ đi (lộ thành dải xanh giữa các lưới) */
main.khung .vl-moi .cua-than fieldset.muc:nth-of-type(n) { background: none; border: 0; }

/* ── 📊 TRANG KIỂU CŨ khoác dáng ô kẻ (anh 10/11/2026: "còn rất nhiều chỗ bạn chưa làm kẻ ô") ─────────────────────────────────
   10/11/2026 tối: mọi trang đã VIẾT LẠI bằng macro (_excel.html) — mục này chỉ còn là lưới an toàn cho HTML cũ lỡ sót
   (fieldset.muc · h1 trần · p.phu); trang mới đừng dựa vào đây. Dáng khoác —
   · tiêu đề trang (h1 nằm thẳng trong main) = dải xanh cao 58 như trang kiểu mới
   · mỗi `fieldset.muc` = một khối: nền trắng, viền xanh nhạt, bo 10, tên khung (legend) = thanh tên có màu
   · mọi bảng = bảng kẻ ô: hàng tên cột nền xanh chữ xanh đậm, ô kẻ đường mảnh
   · ô nhập phẳng, bấm ô chỉ MỘT viền xanh; đoạn chữ xám dài gom vào dòng "📖 Hướng dẫn" (excel.js mục ⑤)
   Trang Võ Lâm có dáng riêng (mục trên) nên mọi luật ở đây chừa `.vl-moi`. */
main.khung {
  --x-nen: #ffffff; --x-vien: #b9d3f0; --x-ke: #e1ebf6; --x-dau: #f4f8fd; --x-chu: #16202e; --x-phu: #5b6b82;
  --x-xanh: #0099ff; --x-nut: linear-gradient(#ffffff, #f2f6fb); --x-nut-vien: #c9d8ea; --x-chon: #e8f3ff;
  --x-th: #dcebfd; --x-th-chu: #12509e;
}
:root:not([data-theme="sang"]) main.khung {
  --x-nen: #172031; --x-vien: #2e4566; --x-ke: #24344d; --x-dau: #1c2840; --x-chu: #e8edf5; --x-phu: #9fb0c8;
  --x-nut: linear-gradient(#22304a, #1b2840); --x-nut-vien: #34496a; --x-chon: #1e3556; --x-th: #1f3b63; --x-th-chu: #bcd8ff;
}
main.khung > h1 { min-height: 58px; display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 6px 16px;
  border-radius: 12px; color: #fff; font-size: 22px; font-weight: 800; background: linear-gradient(90deg, #1d6fd1, #3b9cf0); }
main.khung > .nut-back { margin-bottom: 10px; }
main.khung fieldset.muc:not(.vl-moi *):nth-of-type(n) { background: var(--x-nen); border: 1px solid var(--x-vien); border-radius: 10px;
  padding: 0 12px 12px; margin: 0 0 14px; overflow: hidden; }
main.khung fieldset.muc:not(.vl-moi *) > legend { float: left; width: calc(100% + 24px); margin: 0 -12px 10px; padding: 8px 12px;
  font-size: 15px; font-weight: 800; color: color-mix(in srgb, #1d6fd1 70%, #0b1220); background: color-mix(in srgb, #1d6fd1 13%, var(--x-nen));
  border-bottom: 1px solid color-mix(in srgb, #1d6fd1 35%, var(--x-vien)); border-left: 4px solid #1d6fd1; }
main.khung fieldset.muc:not(.vl-moi *):nth-of-type(even) > legend { --m: #16a34a; color: color-mix(in srgb, #16a34a 70%, #0b1220);
  background: color-mix(in srgb, #16a34a 13%, var(--x-nen)); border-left-color: #16a34a; border-bottom-color: color-mix(in srgb, #16a34a 35%, var(--x-vien)); }
main.khung fieldset.muc.canh-bao:not(.vl-moi *) > legend { color: #b91c1c; background: color-mix(in srgb, #dc2626 12%, var(--x-nen)); border-left-color: #dc2626; }
:root:not([data-theme="sang"]) main.khung fieldset.muc:not(.vl-moi *) > legend { color: #cfe3ff; background: color-mix(in srgb, #1d6fd1 26%, var(--x-nen)); }
:root:not([data-theme="sang"]) main.khung fieldset.muc:not(.vl-moi *):nth-of-type(even) > legend { color: #c9f2d6; background: color-mix(in srgb, #16a34a 24%, var(--x-nen)); }
main.khung fieldset.muc:not(.vl-moi *) > legend + * { clear: both; }
main.khung fieldset.muc:not(.vl-moi *) fieldset.muc { margin-bottom: 0; }
/* bảng */
main.khung table:not(.x):not(.vl-moi *) { border-collapse: collapse; background: var(--x-nen); border: 1px solid var(--x-vien); }
main.khung table:not(.x):not(.vl-moi *) th { background: var(--x-th); color: var(--x-th-chu); font-weight: 800; font-size: 12.5px;
  border-bottom: 1px solid var(--x-vien); border-right: 1px solid var(--x-ke); padding: 7px 10px; }
main.khung table:not(.x):not(.vl-moi *) td { border-bottom: 1px solid var(--x-ke); border-right: 1px solid var(--x-ke); padding: 7px 10px; color: var(--x-chu); }
main.khung table:not(.x):not(.vl-moi *) th:last-child, main.khung table:not(.x):not(.vl-moi *) td:last-child { border-right: 0; }
main.khung table:not(.x):not(.vl-moi *) tr:last-child td { border-bottom: 0; }
/* ô nhập */
main.khung :not(.vl-moi *) > input:is([type=text], [type=password], [type=number], [type=search], :not([type])),
main.khung :not(.vl-moi *) > textarea, main.khung :not(.vl-moi *) > select {
  border: 1px solid var(--x-nut-vien); border-radius: 8px; background: var(--x-nen); color: var(--x-chu); box-shadow: none; }
main.khung :not(.vl-moi *) > input:focus, main.khung :not(.vl-moi *) > textarea:focus, main.khung :not(.vl-moi *) > select:focus {
  outline: none; border-color: var(--x-xanh); box-shadow: inset 0 0 0 1px var(--x-xanh); }
/* 📖 chữ dài gom lại */
main.khung details.hd-gom { margin: 0 0 10px; border: 1px solid var(--x-vien); border-radius: 10px; background: var(--x-dau); }
main.khung details.hd-gom > summary { cursor: pointer; padding: 7px 12px; font-weight: 700; font-size: 13.5px; color: var(--x-chu); }
main.khung details.hd-gom[open] > summary { border-bottom: 1px solid var(--x-ke); }
main.khung details.hd-gom > p { margin: 8px 12px; font-size: 13.5px; line-height: 1.55; color: var(--x-chu); }
