/* LSR Control — bảng theo dõi hệ thống, một màn nền tối duy nhất (có chủ đích, không theo máy).
   Hướng (13/11/2026, lượt "unslop"): khung lặng, màu nằm ở nội dung. Bề mặt, viền, chữ đi từ một
   dải graphite; một màu nhấn oải hương (--nhan) cho mục đang chọn, liên kết, tiêu điểm. Bảy màu
   loại thực thể (--t-*) chỉ xuất hiện dưới dạng chấm: trên bản đồ, chú giải, danh sách. Màu trạng
   thái (--canh / --loi) chỉ cho ngoại lệ; giá trị bình thường ("Đang dùng", "Xác minh") để trung tính.
   Chữ: Plex Sans cho giao diện, Plex Mono cho số và thông tin phụ; chữ thường, hai độ đậm 400/500.
   Lưới 4px; bo góc ô 8, nút 6, thẻ 4.
   Phông: IBM Plex Sans + IBM Plex Mono (SIL OFL 1.1), tự lưu ở /tinh/phong (CSP không cho tải ngoài);
   khối @font-face do tests/tao_phong_css.py sinh ra. */
/*PHONG*/
@font-face { font-family: "Plex Sans"; font-weight: 400; font-display: swap; src: url("phong/ibm-plex-sans-vietnamese-400-normal.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Plex Sans"; font-weight: 500; font-display: swap; src: url("phong/ibm-plex-sans-vietnamese-500-normal.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Plex Sans"; font-weight: 600; font-display: swap; src: url("phong/ibm-plex-sans-vietnamese-600-normal.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Plex Sans"; font-weight: 400; font-display: swap; src: url("phong/ibm-plex-sans-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Plex Sans"; font-weight: 500; font-display: swap; src: url("phong/ibm-plex-sans-latin-ext-500-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Plex Sans"; font-weight: 600; font-display: swap; src: url("phong/ibm-plex-sans-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Plex Sans"; font-weight: 400; font-display: swap; src: url("phong/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex Sans"; font-weight: 500; font-display: swap; src: url("phong/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex Sans"; font-weight: 600; font-display: swap; src: url("phong/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex Mono"; font-weight: 400; font-display: swap; src: url("phong/ibm-plex-mono-vietnamese-400-normal.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Plex Mono"; font-weight: 500; font-display: swap; src: url("phong/ibm-plex-mono-vietnamese-500-normal.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Plex Mono"; font-weight: 600; font-display: swap; src: url("phong/ibm-plex-mono-vietnamese-600-normal.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Plex Mono"; font-weight: 400; font-display: swap; src: url("phong/ibm-plex-mono-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Plex Mono"; font-weight: 500; font-display: swap; src: url("phong/ibm-plex-mono-latin-ext-500-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Plex Mono"; font-weight: 600; font-display: swap; src: url("phong/ibm-plex-mono-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Plex Mono"; font-weight: 400; font-display: swap; src: url("phong/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex Mono"; font-weight: 500; font-display: swap; src: url("phong/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex Mono"; font-weight: 600; font-display: swap; src: url("phong/ibm-plex-mono-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/*HET-PHONG*/

:root {
  color-scheme: dark;
  /* một dải trung tính graphite hơi ấm: nền → bề mặt → viền → chữ */
  --nen: #0c0c0b;
  --o: #141413;
  --o-2: #1b1b19;
  --o-3: #23231f;
  --ke: #262623;
  --ke-2: #34332f;
  --chu: #e2e0d6;
  --chu-phu: #a9a79e;
  --chu-mo: #86847c;
  /* một màu nhấn, dùng ít: mục đang chọn, liên kết, tiêu điểm bàn phím */
  --nhan: #a99ff0;
  --nhan-dam: #c6bff7;
  --nhan-nen: #1e1c2b;
  /* màu mang nghĩa, chỉ cho ngoại lệ */
  --tot: #94b043;
  --canh: #d9ad24;
  --loi: #e0665a;
  /* màu loại thực thể: chỉ xuất hiện ở chấm (đồ thị, chú giải, danh sách) */
  --t-he_thong: #5a9bd8;
  --t-don_vi: #d46a9f;
  --t-agent: #94b043;
  --t-bang: #3fb5aa;
  --t-kpi: #d9ad24;
  --t-quy_trinh: #e07b3a;
  --t-su_kien: #dc5a4e;
  --do-thi-nen: #0f0f0e;
  --r-o: 8px;
  --r-nut: 6px;
  --r-the: 4px;
  --mono: "Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --sans: "Plex Sans", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --nhanh: 160ms cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--ke-2) var(--nen); }
body {
  margin: 0;
  background: var(--nen);
  color: var(--chu);
  font: 13px/1.5 var(--sans);
  padding: 16px;
  padding-bottom: 32px;
  caret-color: var(--nhan);
}
::selection { background: #3a3560; color: #fff; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: var(--nhan); text-decoration-color: color-mix(in srgb, var(--nhan) 45%, transparent); text-underline-offset: 3px; }
a:hover { color: var(--nhan-dam); text-decoration-color: currentColor; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--nhan); outline-offset: 2px; border-radius: 4px; }
.an { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.mo { color: var(--chu-mo); font-size: 12px; }
[hidden] { display: none !important; }

.nut {
  font: 500 12px/18px var(--sans);
  background: var(--o-2);
  border: 1px solid var(--ke-2);
  border-radius: var(--r-nut);
  padding: 4px 12px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  color: var(--chu);
  transition: border-color var(--nhanh), background-color var(--nhanh);
}
.nut:hover { border-color: var(--chu-mo); background: var(--o-3); color: var(--chu); }
.nut:active { background: var(--ke); }
.nut:disabled { opacity: .5; cursor: default; }
.nut-chinh { background: var(--nhan); border-color: var(--nhan); color: #121021; padding: 8px 16px; font-size: 13px; }
.nut-chinh:hover { background: var(--nhan-dam); border-color: var(--nhan-dam); color: #121021; }

.bao-loi {
  max-width: 1480px;
  margin: 0 auto 12px;
  border: 1px solid color-mix(in srgb, var(--canh) 45%, transparent);
  background: #1f1b0e;
  color: #e6c766;
  border-radius: var(--r-nut);
  padding: 8px 12px;
  font-size: 12px;
}

/* ─── nhãn hiệu: chữ + một ô vuông nhỏ màu nhấn ─── */
.hieu { display: flex; align-items: center; gap: 8px; font: 500 14px/20px var(--sans); white-space: nowrap; }
.dau-hieu { width: 12px; height: 12px; border-radius: 3px; background: var(--nhan); flex: none; }

/* ─── đăng nhập ─── */
.trang-dang-nhap { display: grid; place-items: center; min-height: 92vh; }
.khung-dang-nhap {
  background: var(--o);
  border: 1px solid var(--ke);
  border-radius: var(--r-o);
  padding: 32px;
  max-width: 440px;
  display: grid;
  gap: 16px;
  justify-items: start;
}
.khung-dang-nhap h1 { font: 500 20px/1.3 var(--sans); text-wrap: balance; }
.khung-dang-nhap .phu { color: var(--chu-phu); }
.khung-dang-nhap .bao-loi { margin: 0; width: 100%; }

/* ─── đầu trang: một thanh mảnh, không phải một ô ─── */
.dau {
  max-width: 1480px;
  margin: 0 auto 16px;
  padding: 0 4px 16px;
  border-bottom: 1px solid var(--ke);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
}
.dau h1 { font: 400 14px/20px var(--sans); color: var(--chu-phu); padding-left: 16px; border-left: 1px solid var(--ke-2); margin-right: auto; }
.so { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.so div { display: flex; align-items: baseline; gap: 6px; }
.so dt { font-size: 12px; color: var(--chu-mo); }
.so dd { order: -1; font: 500 15px/20px var(--mono); font-variant-numeric: tabular-nums; }
.so .canh dd { color: var(--canh); }
.tuoi { display: flex; align-items: center; gap: 8px; color: var(--chu-mo); font-size: 12px; white-space: nowrap; }
.cham-tuoi { width: 6px; height: 6px; border-radius: 50%; background: var(--ke-2); flex: none; }
.cham-tuoi.tuoi-moi { background: var(--tot); }
.cham-tuoi.tuoi-cu { background: var(--canh); }
.nguoi { display: flex; align-items: center; gap: 12px; color: var(--chu-mo); font-size: 12px; padding-left: 24px; border-left: 1px solid var(--ke); }

/* ─── lưới ô ─── */
.luoi { max-width: 1480px; margin: 0 auto; display: grid; gap: 12px; }
/* khối trên: bản đồ + danh sách bên trái, ô "Đang xem" bên phải bám theo khi cuộn (chỉ trong khối này) */
.tren { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.cot-trai { display: grid; gap: 12px; min-width: 0; }
.duoi { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; }
.o { background: var(--o); border: 1px solid var(--ke); border-radius: var(--r-o); min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.o > * { min-width: 0; }
.o-trang { position: sticky; top: 16px; max-height: calc(100vh - 32px); }
.o-trang .o-than { overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--ke-2) transparent; }
.o-dau {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ke);
  min-height: 48px;
}
.stt { font: 11px/20px var(--mono); color: var(--chu-mo); font-variant-numeric: tabular-nums; }
.o h2 { font: 500 13px/20px var(--sans); }
.o-phu { color: var(--chu-mo); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.o-meta { margin-left: auto; color: var(--chu-mo); font: 11px/20px var(--mono); white-space: nowrap; font-variant-numeric: tabular-nums; }
.o-than { padding: 16px; }
.o-chan { padding: 8px 16px; border-top: 1px solid var(--ke); color: var(--chu-mo); font-size: 12px; }

/* ─── màu theo loại thực thể ─── */
.m-he_thong { --mau: var(--t-he_thong); }
.m-agent { --mau: var(--t-agent); }
.m-bang { --mau: var(--t-bang); }
.m-don_vi { --mau: var(--t-don_vi); }
.m-kpi { --mau: var(--t-kpi); }
.m-quy_trinh { --mau: var(--t-quy_trinh); }
.m-su_kien { --mau: var(--t-su_kien); }
.cham { width: 8px; height: 8px; border-radius: 50%; background: var(--mau, var(--ke-2)); flex: none; display: inline-block; }

/* ─── 01 bản đồ: nơi duy nhất màu được nói nhiều ─── */
.ban-do-than { display: grid; grid-template-columns: 168px minmax(0, 1fr); }
.chu-giai { display: grid; align-content: start; gap: 2px; padding: 12px 8px; border-right: 1px solid var(--ke); }
.loc {
  display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; gap: 8px;
  background: none; border: 0; border-radius: var(--r-nut); padding: 6px 8px; cursor: pointer; text-align: left;
  font-size: 13px; line-height: 20px; color: var(--chu-phu);
  transition: background-color var(--nhanh), color var(--nhanh);
}
.loc:hover { background: var(--o-2); color: var(--chu); }
.loc .dem { font: 11px/20px var(--mono); color: var(--chu-mo); font-variant-numeric: tabular-nums; }
.loc[aria-pressed="true"] { background: var(--o-3); color: var(--chu); box-shadow: inset 0 0 0 1px var(--ke-2); }
.loc[aria-pressed="true"] .dem { color: var(--chu); }
#do-thi { width: 100%; height: 560px; display: block; background: var(--do-thi-nen); }
#do-thi .canh { stroke: #3d3c38; stroke-width: 1; stroke-opacity: .6; }
#do-thi .canh.noi { stroke: #c9c7bc; stroke-opacity: .6; }
#do-thi .canh.lu { stroke-opacity: .28; }
#do-thi.dang-tro .canh.lu { stroke-opacity: .06; }
#do-thi .quang { fill: var(--mau); fill-opacity: .1; pointer-events: none; }
#do-thi .nd { fill: var(--mau); stroke: var(--do-thi-nen); stroke-width: 1.5; cursor: pointer; transition: opacity var(--nhanh); }
#do-thi .nd:hover { stroke: var(--chu); }
#do-thi .nd.chon { stroke: #fff; stroke-width: 2; }
#do-thi .nd.lu { opacity: .45; }
#do-thi .quang.lu { opacity: .3; }
#do-thi.dang-tro .nd.lu, #do-thi.dang-tro .quang.lu { opacity: .1; }
#do-thi .nhan-nd { pointer-events: none; }
#do-thi .nhan-nd rect { fill: #161615; fill-opacity: .92; stroke: var(--ke-2); stroke-width: 1; }
#do-thi .nhan-nd text { font: 10px var(--mono); fill: var(--chu-phu); }
#do-thi .nhan-nd.tam rect { stroke: var(--nhan); }
#do-thi .nhan-nd.tam text { fill: var(--chu); }
#do-thi .an-nhan, #do-thi .de-nhan { display: none; }
#do-thi .nhan-nd.lu { opacity: .5; }
#do-thi.dang-tro .nhan-nd.lu { opacity: 0; }

/* ─── 02 trang thực thể ─── */
.tt-duong { font-size: 12px; color: var(--chu-mo); display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.tt-ten { font: 500 20px/1.3 var(--sans); overflow-wrap: anywhere; text-wrap: balance; }
.tt-phu { color: var(--chu-phu); margin-top: 4px; }
.the-hang { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.the {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--ke-2); background: none; border-radius: var(--r-the);
  padding: 2px 8px; font-size: 12px; line-height: 18px; color: var(--chu-phu); max-width: 100%; min-width: 0;
}
.the-hang .the::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--chu-mo); flex: none; }
.the-hang .the.tot::before { background: var(--chu-phu); }
.the.canh { color: var(--canh); }
.the.canh::before { background: var(--canh); }
.the.loi { color: var(--loi); }
.the.loi::before { background: var(--loi); }
.the.nhan::before { background: var(--nhan); }
button.the { cursor: pointer; color: var(--chu); text-align: left; background: var(--o-2); border-color: var(--ke); transition: border-color var(--nhanh), background-color var(--nhanh); }
button.the:hover { border-color: var(--chu-mo); background: var(--o-3); }
button.the span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
button.the .cham { width: 6px; height: 6px; }
.thuoc-tinh { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 16px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--ke); }
.thuoc-tinh dt { font-size: 12px; line-height: 19.5px; color: var(--chu-mo); }
.thuoc-tinh dd { overflow-wrap: anywhere; }
.nhom { margin-top: 20px; }
.nhom-ten { display: flex; align-items: baseline; gap: 8px; font-size: 12px; color: var(--chu-mo); margin-bottom: 8px; }
.nhom-ten b { font-weight: 500; color: var(--chu-phu); }
.nhom-ten .dem { font: 11px var(--mono); font-variant-numeric: tabular-nums; }
.the-luoi { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }

/* ─── 03 danh sách ─── */
.tim { margin-left: auto; }
.tim input {
  width: min(280px, 62vw);
  background: var(--nen); border: 1px solid var(--ke-2); border-radius: var(--r-nut); padding: 4px 8px;
  font-size: 12px; line-height: 18px;
  transition: border-color var(--nhanh);
}
.tim input::placeholder { color: var(--chu-mo); }
.tim input:hover, .tim input:focus { border-color: var(--chu-mo); }
.bang-cuon { overflow: auto; max-height: 480px; scrollbar-width: thin; scrollbar-color: var(--ke-2) transparent; }
.bang { border-collapse: collapse; width: 100%; font-size: 13px; }
.bang th {
  position: sticky; top: 0; z-index: 1; background: var(--o); text-align: left;
  font-size: 12px; font-weight: 400; color: var(--chu-mo);
  padding: 8px 12px; border-bottom: 1px solid var(--ke); white-space: nowrap;
}
.bang th:first-child, .bang td:first-child { padding-left: 16px; }
.bang th:last-child, .bang td:last-child { padding-right: 16px; }
.bang td { padding: 8px 12px; border-bottom: 1px solid var(--ke); vertical-align: top; }
.bang tbody tr:hover td { background: var(--o-2); }
.bang tr:last-child td { border-bottom: 0; }
.bang tr.chon td, .bang tbody tr.chon:hover td { background: var(--nhan-nen); }
.bang tr.chon td:first-child { box-shadow: inset 2px 0 var(--nhan); }
.bang .ten-o { background: none; border: 0; padding: 0; cursor: pointer; text-align: left; color: var(--chu); font-weight: 500; }
.bang .ten-o:hover { color: var(--nhan-dam); }
.bang .phu-o { color: var(--chu-mo); font-size: 12px; }
.bang .loai-o, .bang .tt-o { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 12px; line-height: 19.5px; color: var(--chu-phu); }
.tt-o::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--chu-mo); flex: none; }
.tt-o.tot::before { background: var(--chu-phu); }
.tt-o.canh::before { background: var(--canh); }
.tt-o.loi::before { background: var(--loi); }
.tt-o.nhan::before { background: var(--nhan); }
.bang .tt-o.canh { color: var(--canh); }
.bang .chu-o { color: var(--chu-phu); font-size: 12px; }
.bang .lk-cot { text-align: right; }
.lk-o { display: flex; align-items: center; justify-content: flex-end; gap: 8px; font: 11px/19.5px var(--mono); font-variant-numeric: tabular-nums; color: var(--chu-phu); }
.thanh { width: 64px; height: 4px; border-radius: 2px; background: var(--o-3); overflow: hidden; flex: none; }
.thanh i { display: block; height: 100%; border-radius: 2px; background: #4d4c46; }
.bang tr.chon .thanh i { background: var(--nhan); }
.lk-o b { font-weight: 400; min-width: 2ch; text-align: right; }

/* ─── 04 cần xử lý ─── */
.vs { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 4px 12px; padding: 16px 0; border-top: 1px solid var(--ke); }
.vs:first-child { border-top: 0; padding-top: 0; }
.vs:last-child { padding-bottom: 0; }
.vs-so { font: 500 20px/1.2 var(--mono); font-variant-numeric: tabular-nums; color: var(--chu-mo); }
.vs-so.co { color: var(--canh); }
.vs h3 { font: 500 13px/1.5 var(--sans); }
.vs p { color: var(--chu-mo); font-size: 12px; margin: 2px 0 8px; }
.them { background: none; border: 0; padding: 8px 0 0; color: var(--nhan); cursor: pointer; font-size: 12px; }
.them:hover { color: var(--nhan-dam); }

/* ─── 05 dòng thời gian ─── */
label.chon { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; color: var(--chu-phu); font-size: 12px; cursor: pointer; min-width: 0; }
label.chon span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
label.chon input { accent-color: var(--nhan); margin: 0; }
.thoi-gian li { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 4px 12px; padding: 12px 0; border-top: 1px solid var(--ke); }
.thoi-gian li:first-child { border-top: 0; padding-top: 0; }
.thoi-gian li:last-child { padding-bottom: 0; }
.thoi-gian .ngay { font: 11px/19.5px var(--mono); color: var(--chu-mo); font-variant-numeric: tabular-nums; }
.thoi-gian .than { display: grid; gap: 4px; justify-items: start; min-width: 0; }
.thoi-gian .than > * { min-width: 0; max-width: 100%; }
.thoi-gian .kieu { font-size: 12px; color: var(--chu-mo); }
.kieu.loi { color: var(--loi); }
.kieu.canh { color: var(--canh); }
.thoi-gian .tieu { background: none; border: 0; padding: 0; cursor: pointer; text-align: left; font-weight: 500; display: block; margin: 0; }
.thoi-gian .tieu:hover { color: var(--nhan-dam); }
.thoi-gian .the-luoi { margin-top: 4px; }

/* ─── 06 bốn tầng + cập nhật ─── */
.tang { display: grid; border: 1px solid var(--ke); border-radius: var(--r-nut); }
.tang li { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 8px 12px; border-top: 1px solid var(--ke); }
.tang li:first-child { border-top: 0; }
.tang .so-tang { font: 11px/19.5px var(--mono); color: var(--chu-mo); }
.tang .mo-ta { color: var(--chu-phu); font-size: 12px; }
.tang .mat-tien { background: var(--nhan-nen); box-shadow: inset 2px 0 var(--nhan); }
.tang .mat-tien .so-tang, .tang .mat-tien .mo-ta { color: var(--chu); }
.ghi { color: var(--chu-mo); font-size: 12px; margin: 16px 0 8px; }
.lien-ket { display: grid; }
.lien-ket li { display: grid; gap: 2px; padding: 8px 0; border-top: 1px solid var(--ke); }
.lien-ket li:last-child { padding-bottom: 0; }
.lien-ket a { font-weight: 500; justify-self: start; }
.lien-ket span { color: var(--chu-mo); font-size: 12px; }

@media (max-width: 1180px) {
  .tren, .duoi { grid-template-columns: minmax(0, 1fr); }
  .o-trang { position: static; max-height: none; }
  .o-trang .o-than { overflow: visible; }
}
@media (max-width: 720px) {
  body { padding: 12px; }
  .dau { gap: 12px 16px; padding: 0 0 12px; }
  .dau h1 { padding-left: 0; border-left: 0; margin-right: 0; flex-basis: 100%; order: 1; }
  .hieu { order: 0; }
  .so { order: 2; flex-basis: 100%; }
  .tuoi { order: 3; }
  .nguoi { order: 4; padding-left: 0; border-left: 0; }
  .ban-do-than { grid-template-columns: minmax(0, 1fr); }
  .chu-giai { grid-template-columns: repeat(2, minmax(0, 1fr)); border-right: 0; border-bottom: 1px solid var(--ke); padding: 8px; }
  #do-thi { height: 380px; }
  .thuoc-tinh { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .thuoc-tinh dt { margin-top: 8px; }
  .thoi-gian li { grid-template-columns: minmax(0, 1fr); }
  .tim { margin-left: 0; width: 100%; }
  .tim input { width: 100%; }
  .thanh { width: 40px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
