/* Phân tích (107, mẫu thiet-ke-phan-tich.html anh Nghĩa duyệt 11/10/2026) — tiền tố pt-. Chỉ dùng token theme của app (sáng / tối đổi theo theme);
   hai màu chuỗi số: --pt-s1 Cần Thơ (màu nhấn theme), --pt-s2 Cà Mau (xanh lơ pha màu chữ để đọc được trên mọi theme), --pt-s3 đường Tổng (màu chữ).
   Ô bấm ≥ 44px, bo 8px; điện thoại 390: thanh tóm tắt + sheet đáy, bảng thành thẻ, không cuộn ngang trang (bảng rộng cuộn TRONG khung). */
/* 21/10/2026 (anh Nghĩa "phần lọc trong phân tích lỗi"): #module-content giữ transform của hiệu ứng vào màn (linearGlideRight, fill both) nên mọi
   position: fixed bên trong (sheet Phạm vi, ngăn kiểm chứng, toast) bị kẹt trong khung → sheet nằm ở ĐÁY TRANG, bấm nút lọc trang nhảy xuống cuối.
   phan-tich.js gắn lớp pt-goc vào khung khi mở màn (gỡ khi rời): tắt hẳn hiệu ứng trượt trên khung (chỉ transform: none chưa đủ — Chromium / WebKit vẫn coi
   phần tử đang chạy keyframes có transform là khối chứa) để lớp phủ bám theo khung nhìn. Màn này vào không trượt / mờ dần — khung xương tải số đã đủ. */
.pt-goc { animation: none !important; transform: none !important; opacity: 1 !important; }
.pt { --pt-s1: var(--theme-accent-strong, var(--theme-accent)); --pt-s2: color-mix(in srgb, #0e9fbf 78%, var(--text-main)); --pt-s3: var(--text-main);
  --pt-ok: var(--txt-ok, var(--theme-success)); --pt-bad: var(--txt-bad, var(--theme-danger)); --pt-acc: var(--txt-accent, var(--theme-accent-strong));
  display: flex; flex-direction: column; gap: 14px; color: var(--text-main); min-width: 0; max-width: 1440px; margin: 0 auto; padding: 4px 0 32px; }
.pt .pt-ic { width: 16px; height: 16px; flex: none; }
.pt-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.pt-muted { color: var(--text-muted); font-weight: 500; font-size: 13px; }
.pt-c { text-align: center; justify-content: center; }
.pt-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 16px; }
.pt-head h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.pt-sub { margin: 2px 0 0; color: var(--text-muted); font-size: 13px; }
.pt-note { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 10px; border-radius: 6px; background: var(--bg-card-hover); border: 1px solid var(--border-color);
  color: var(--text-muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.pt-note .pt-ic { width: 14px; height: 14px; color: var(--pt-acc); }
.pt-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 8px; padding: 14px 16px; min-width: 0; }
.pt-card h3 { margin: 0 0 10px; font-size: 15px; font-weight: 650; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* Dải tab loại báo cáo */
.pt-tabs { display: flex; gap: 4px; overflow-x: auto; padding: 4px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-card); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.pt-tabs::-webkit-scrollbar { display: none; }
.pt-tab { flex: none; min-height: 44px; padding: 0 14px; border: 0; border-radius: 6px; background: transparent; color: var(--text-muted); font: inherit; font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.pt-tab:hover { background: var(--bg-card-hover); }
.pt-tab.is-on { background: var(--theme-accent-soft); color: var(--pt-acc); }
/* Thanh lọc */
.pt-filt { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.pt-filt2 { margin-top: 10px; justify-content: space-between; }
.pt-fo { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--text-muted); flex: 1 1 150px; min-width: 0; }
.pt-w-sm { flex: 0 1 160px; } .pt-w-md { flex: 1 1 200px; } .pt-w-auto { flex: 0 0 auto; }
.pt select, .pt input[type="date"], .pt input[type="number"], .pt input[type="text"] { min-height: 44px; padding: 0 12px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-input);
  color: var(--text-main); font: inherit; font-size: 15px; font-weight: 500; box-sizing: border-box; width: 100%; max-width: 100%; }
.pt-seg { display: inline-flex; border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; background: var(--bg-input); }
.pt-seg button { min-height: 42px; min-width: 64px; padding: 0 14px; border: 0; background: transparent; color: var(--text-muted); font: inherit; font-weight: 600; cursor: pointer; }
.pt-seg button + button { border-left: 1px solid var(--border-color); }
.pt-seg button.is-on { background: var(--theme-accent-soft); color: var(--text-main); }
.pt-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; }
.pt-lbl { font-size: 12.5px; color: var(--text-muted); }
.pt-chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-card); color: var(--text-main);
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.pt-chip.is-on { background: var(--theme-accent-soft); border-color: transparent; color: var(--pt-acc); }
.pt-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pt-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; min-width: 44px; padding: 0 16px; border: 1px solid var(--border-color); border-radius: 8px;
  background: var(--bg-card); color: var(--text-main); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.pt-btn:hover:not(:disabled) { border-color: var(--theme-accent-strong); }
.pt-btn:disabled { opacity: .5; cursor: not-allowed; }
.pt-btn.pt-pri { background: var(--theme-accent-strong); border-color: var(--theme-accent-strong); color: #fff; }
.pt-btn.pt-ghost { background: var(--bg-input); }
.pt-cnt { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--theme-accent-strong); color: #fff; font-size: 11.5px; font-weight: 700; }
.pt-cnt.is-inv { background: #fff; color: var(--theme-accent-strong); }
.pt-link { min-height: 44px; padding: 0; border: 0; background: none; color: var(--pt-acc); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; text-decoration: underline; }
.pt button:focus-visible, .pt select:focus-visible, .pt input:focus-visible, .pt-tbl-wrap:focus-visible { outline: 2px solid var(--theme-accent-strong); outline-offset: 2px; }
/* Chip đang lọc */
.pt-achips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border-color); }
.pt-achip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 4px 0 10px; border-radius: 8px; background: var(--theme-accent-soft); color: var(--text-main); font-size: 13px; font-weight: 600; border: 0; font-family: inherit; }
.pt-achip small { font-weight: 500; color: var(--text-muted); }
.pt-achip-x { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 6px; background: color-mix(in srgb, var(--theme-accent-strong) 18%, transparent); color: var(--pt-acc); font: inherit; font-weight: 700; cursor: pointer; }
.pt-achip-het { background: var(--bg-input); color: var(--pt-acc); padding: 0 12px; border: 1px solid var(--border-color); cursor: pointer; }
/* Lưu bộ lọc */
.pt-luu-w { position: relative; }
.pt-luu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: min(320px, calc(100vw - 32px)); padding: 10px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-card); box-shadow: var(--theme-shadow); display: grid; gap: 10px; }
.pt-luu-ds { display: grid; gap: 4px; max-height: 240px; overflow: auto; }
.pt-luu-dong { display: flex; align-items: center; gap: 4px; }
.pt-luu-mo { flex: 1; min-height: 44px; padding: 4px 10px; border: 0; border-radius: 6px; background: var(--bg-input); color: var(--text-main); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.pt-luu-mo small { display: block; font-weight: 500; font-size: 11.5px; color: var(--text-muted); }
.pt-luu-xoa { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--border-color); border-radius: 6px; background: var(--bg-card); color: var(--text-muted); cursor: pointer; }
.pt-luu-moi { display: flex; gap: 8px; align-items: flex-end; }
/* KPI */
.pt-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pt-kpi { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 8px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; min-width: 0; text-align: left; font: inherit; color: var(--text-main); }
.pt-kpi-t { font-size: 13px; color: var(--text-muted); }
.pt-kpi-t small { color: var(--text-dim); }
.pt-kpi-v { font-size: 26px; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pt-kpi.is-main { background: var(--theme-accent-soft); border-color: transparent; }
.pt-kpi.is-main .pt-kpi-v { color: var(--theme-accent-strong); }
.pt-kpi.is-link { cursor: pointer; position: relative; min-height: 44px; }
.pt-kpi.is-link:hover { border-color: var(--theme-accent-strong); }
.pt-kpi.is-khoa { opacity: .75; }
.pt-delta { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; margin-top: 4px; }
.pt-delta.is-up { color: var(--pt-ok); } .pt-delta.is-down { color: var(--pt-bad); }
.pt-delta em { font-style: normal; color: var(--text-dim); font-weight: 500; }
.pt-lock { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 12.5px; color: var(--text-dim); font-weight: 500; }
.pt-lock .pt-ic { width: 13px; height: 13px; }
.pt-two { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 12px; }
/* Biểu đồ */
.pt-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--text-muted); margin-left: auto; font-weight: 500; }
.pt-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 6px; }
.pt-legend i.pt-b1 { background: var(--pt-s1); } .pt-legend i.pt-b2 { background: var(--pt-s2); } .pt-legend i.pt-ln-i { background: var(--pt-s3); height: 3px; border-radius: 2px; }
.pt-chart { display: block; width: 100%; height: auto; font-family: inherit; }
.pt-chart text { fill: var(--text-muted); font-size: 11.5px; }
.pt-chart .pt-grid { stroke: var(--border-color); stroke-width: 1; }
.pt-chart .pt-ax { stroke: var(--text-dim); }
.pt-chart .pt-b1 { fill: var(--pt-s1); } .pt-chart .pt-b2 { fill: var(--pt-s2); }
.pt-chart .pt-s1-stroke { stroke: var(--pt-s1); } .pt-chart .pt-s2-stroke { stroke: var(--pt-s2); }
.pt-chart .pt-ln { fill: none; stroke: var(--pt-s3); stroke-width: 2; stroke-linejoin: round; }
.pt-chart .pt-dot { fill: var(--bg-card); stroke: var(--pt-s3); stroke-width: 2; }
.pt-chart .pt-val, .pt-chart .pt-t-main { fill: var(--text-main); font-weight: 600; }
.pt-chart .pt-donut-v { fill: var(--text-main); font-size: 20px; font-weight: 700; }
.pt-rank { display: grid; gap: 8px; }
.pt-rank > div { display: grid; grid-template-columns: 22px minmax(0, 150px) minmax(0, 1fr) minmax(0, 150px); align-items: center; gap: 10px; font-size: 13px; }
.pt-rank-n { color: var(--text-dim); font-weight: 700; text-align: right; }
.pt-rank-lb { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Gói BH: tên đầy đủ, được xuống dòng (cột tên rộng hơn) — không cắt "…" */
.pt-rank.is-goi > div { grid-template-columns: 22px minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 110px); }
.pt-rank.is-goi .pt-rank-lb { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; line-height: 1.3; }
.pt-rank-bar { height: 18px; border-radius: 4px; background: var(--bg-input); overflow: hidden; }
.pt-rank-bar b { display: block; height: 100%; background: var(--pt-s1); border-radius: 4px; }
.pt-rank-bar b.is-alt { background: var(--pt-s2); }
.pt-rank-v { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.pt-rank-v small { color: var(--text-dim); font-weight: 500; }
.pt-funnel { display: grid; grid-template-columns: minmax(0, 110px) minmax(0, 1fr) minmax(0, 110px); gap: 8px 12px; align-items: center; font-size: 13px; }
.pt-fl { font-weight: 600; text-align: right; }
.pt-fb2 { height: 34px; display: flex; justify-content: center; }
.pt-fb2 b { display: flex; align-items: center; justify-content: center; height: 100%; border-radius: 6px; background: var(--pt-s1); color: #fff; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 48px; }
.pt-fb2 b.is-alt { background: color-mix(in srgb, var(--pt-s1) 70%, var(--bg-card)); }
.pt-fc { color: var(--text-muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.pt-fc b { color: var(--pt-ok); }
/* Bảng */
.pt-tbl-wrap { overflow: auto; max-width: 100%; -webkit-overflow-scrolling: touch; max-height: 70vh; }
.pt-tb { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.pt-tb th, .pt-tb td { padding: 10px 12px; border-bottom: 1px solid var(--border-color); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; vertical-align: middle; }
.pt-tb th { font-size: 12px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--text-muted); background: var(--bg-input); position: sticky; top: 0; z-index: 1; }
.pt-tb th:first-child, .pt-tb td:first-child, .pt-tb .pt-l { text-align: left; }
.pt-tb th.pt-grp { text-align: center; border-left: 1px solid var(--border-color); }
.pt-tb .pt-sep { border-left: 1px solid var(--border-color); }
.pt-tb tr.pt-tot td { font-weight: 700; background: var(--theme-accent-soft); border-top: 2px solid var(--theme-accent); }
.pt-tb tbody tr:hover td { background: var(--bg-card-hover); }
.pt-tb tbody tr.pt-tot:hover td { background: var(--theme-accent-soft); }
.pt-tb .pt-name { font-weight: 600; text-align: left; white-space: normal; min-width: 180px; }
.pt-tb .pt-rk { width: 44px; text-align: center; }
.pt-th-sx { min-height: 36px; padding: 0; border: 0; background: none; color: inherit; font: inherit; font-weight: 700; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.pt-medal { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--theme-accent-soft); color: var(--pt-acc); font-weight: 800; font-size: 12px; }
.pt-medal.is-g { background: color-mix(in srgb, var(--theme-warning) 24%, transparent); color: var(--txt-warn, var(--theme-warning)); }
.pt-ratio i { display: inline-block; width: 96px; height: 6px; border-radius: 3px; background: var(--bg-input); overflow: hidden; vertical-align: middle; }
.pt-ratio i b { display: block; height: 100%; background: var(--theme-accent-strong); }
.pt-day-h td { text-align: left; font-weight: 700; background: var(--bg-input); color: var(--pt-acc); font-size: 12.5px; }
.pt-exp { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-card); color: var(--pt-acc); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.pt-tb tr.pt-nd td { text-align: left; white-space: normal; background: var(--bg-card-hover); padding: 0 12px 12px; }
.pt-msg-h { display: flex; align-items: center; gap: 8px; padding: 10px 0 6px; font-size: 12.5px; color: var(--text-muted); }
.pt-msg { margin: 0; padding: 12px 14px; border-radius: 8px; background: var(--bg-input); border: 1px solid var(--border-color); white-space: pre-wrap; overflow-wrap: anywhere; font: 13px/1.5 inherit; font-family: inherit; color: var(--text-main); max-width: 820px; }
.pt-pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; color: var(--text-muted); font-size: 12.5px; flex-wrap: wrap; }
.pt-mlist { display: none; }
.pt-mrow { display: grid; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--border-color); }
.pt-mk { font-weight: 700; font-size: 14px; }
.pt-mg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 8px; font-size: 11.5px; color: var(--text-muted); }
.pt-mg b { display: block; font-size: 13.5px; color: var(--text-main); font-variant-numeric: tabular-nums; font-weight: 600; overflow-wrap: anywhere; }
.pt-mrow.is-tot { background: var(--theme-accent-soft); margin: 0 -14px; padding: 10px 14px 12px; border-top: 2px solid var(--theme-accent); border-bottom: 0; }
.pt-anh-ds { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.pt-anh { margin: 0; display: grid; gap: 6px; }
.pt-anh img { width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--border-color); }
.pt-anh figcaption { font-size: 12.5px; color: var(--text-muted); }
/* Lọc thêm: ngăn phải (máy tính) / sheet đáy (điện thoại) */
.pt-drawer-back, .pt-fb-back { position: fixed; inset: 0; z-index: 10040; background: color-mix(in srgb, var(--bg-app) 30%, rgba(8, 12, 20, .55)); }
.pt-fb-back { display: none; }
.pt-drawer { position: fixed; top: 0; right: 0; bottom: var(--itn-tab-h, 0px); z-index: 10050; width: min(420px, 100vw); background: var(--bg-card); border-left: 1px solid var(--border-color); box-shadow: var(--theme-shadow); display: flex; flex-direction: column; }
.pt-drawer-h, .pt-sheet-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 60px; padding: 8px 12px 8px 20px; border-bottom: 1px solid var(--border-color); font-size: 16px; font-weight: 700; }
.pt-sheet-x, .pt-ico-btn { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 22px; background: var(--bg-input); color: var(--text-main); cursor: pointer; }
.pt-ico-btn { border-radius: 8px; background: var(--theme-accent-soft); color: var(--pt-acc); }
.pt-drawer-b { flex: 1; overflow: auto; padding: 6px 20px 16px; display: flex; flex-direction: column; }
.pt-fg { padding: 12px 0; border-bottom: 1px solid var(--border-color); }
.pt-fg-h { display: flex; align-items: center; justify-content: space-between; min-height: 32px; font-size: 13.5px; font-weight: 700; }
.pt-fg-h small { font-weight: 500; color: var(--text-dim); }
.pt-fg .pt-chips { margin-top: 6px; gap: 6px; }
.pt-fg .pt-chip.is-on::before { content: "✓"; margin-right: 5px; }
.pt-cklist { display: grid; gap: 2px; margin-top: 4px; max-height: 300px; overflow: auto; }
.pt-ck { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 13.5px; cursor: pointer; }
.pt-ck input { width: 20px; height: 20px; accent-color: var(--theme-accent-strong); flex: none; }
.pt-range { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin-top: 6px; font-size: 12.5px; color: var(--text-dim); }
.pt-drawer-f { display: flex; gap: 10px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--border-color); background: var(--bg-card); }
.pt-drawer-f .pt-btn { flex: 1; }
/* Thanh tóm tắt + sheet bộ lọc chỉ cho điện thoại */
.pt-fbar, .pt-sheet-h, .pt-sheet-ft { display: none; }
/* Trạng thái */
.pt-empty { display: grid; justify-items: center; gap: 8px; padding: 40px 16px; text-align: center; color: var(--text-muted); border: 1px dashed var(--border-color); border-radius: 8px; background: var(--bg-card); }
.pt-empty > .pt-ic { width: 40px; height: 40px; color: var(--text-dim); }
.pt-empty strong { color: var(--text-main); font-size: 15px; }
.pt-empty p { margin: 0; max-width: 46ch; line-height: 1.5; font-size: 13px; }
.pt-err strong { color: var(--pt-bad); }
.pt-skel { display: grid; gap: 12px; }
.pt-sk { display: block; border-radius: 6px; background: linear-gradient(90deg, var(--bg-input) 0%, color-mix(in srgb, var(--bg-input) 55%, var(--bg-card)) 40%, var(--bg-input) 80%); background-size: 240% 100%; animation: pt-shimmer 1.3s linear infinite; }
@keyframes pt-shimmer { to { background-position: -240% 0; } }
.pt-sk-kpi, .pt-sk-rows { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-card); }
@media (prefers-reduced-motion: reduce) { .pt-sk { animation: none; } }

/* 12/10/2026 — bổ sung theo mẫu (đợt 2) */
.pt-noi { display: flex; flex-direction: column; gap: 14px; min-width: 0; }   /* nhịp KPI → biểu đồ → bảng cách đều như mẫu */
.pt-kpi-v small { font-size: 14px; font-weight: 600; color: var(--text-muted); margin-left: 2px; }
.pt-chua { display: inline-flex; align-items: center; font-size: 13px; font-weight: 600; color: var(--text-dim); font-style: italic; }
.pt-kpi .pt-chua { font-size: 15px; }
.pt-spark { display: block; width: 100%; height: 30px; margin-top: 6px; overflow: visible; }
.pt-spark polyline { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.pt-spark.pt-sp1 polyline { stroke: var(--pt-s1); } .pt-spark.pt-sp2 polyline { stroke: var(--pt-s2); }
.pt-spark.pt-sp1 circle { fill: var(--pt-s1); } .pt-spark.pt-sp2 circle { fill: var(--pt-s2); }
.pt-card h3.pt-h3-2 { margin-top: 16px; }
.pt-rank-bar b.is-dim { background: var(--text-dim); }
.pt-name-btn { min-height: 44px; padding: 0; border: 0; background: none; color: var(--pt-acc); font: inherit; font-weight: 600; text-align: left; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.pt-sx-chips { gap: 6px; }
.pt-sx-chips .pt-chip { font-weight: 600; }
.pt-tb tr.pt-khac td { color: var(--text-dim); }
.pt-tb .pt-name small { display: block; font-weight: 500; color: var(--text-dim); font-size: 11.5px; }
.pt-cell-d { font-size: 12px; font-weight: 700; }
.pt-cell-d.is-down { color: var(--pt-bad); }
.pt-ratio { display: inline-flex; align-items: center; gap: 8px; justify-content: flex-end; }
.pt-ratio.is-ok i b { background: var(--theme-success); } .pt-ratio.is-warn i b { background: var(--theme-warning); }
.pt-tb td .pt-ratio i { width: 64px; }
.pt-du { border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-card); }
.pt-du > summary { display: flex; align-items: center; min-height: 44px; padding: 0 16px; font-weight: 600; cursor: pointer; color: var(--pt-acc); }
.pt-du > .pt-card { border: 0; border-top: 1px solid var(--border-color); border-radius: 0 0 8px 8px; }
.pt-heat { border-collapse: separate; border-spacing: 3px; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.pt-heat th { font-weight: 600; color: var(--text-muted); padding: 2px 4px; text-align: center; }
.pt-heat td { min-width: 32px; height: 30px; padding: 0 4px; border-radius: 4px; text-align: center; color: var(--text-main);
  background: color-mix(in srgb, var(--pt-s1) var(--pt-a, 0%), var(--bg-input)); }
.pt-heat td.is-dam { color: #fff; font-weight: 700; }
.pt-range-1 { grid-template-columns: minmax(0, 1fr); }
.pt-achips-thanh { display: none; }

@media (max-width: 1100px) { .pt-two { grid-template-columns: minmax(0, 1fr); } .pt-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Điện thoại 390 (mẫu Khung 3 / 3b / D2) */
@media (max-width: 640px) {
  .pt { gap: 12px; }
  .pt-head h2 { font-size: 22px; }
  .pt-note { white-space: normal; }
  .pt-tab { min-height: 44px; padding: 0 10px; font-size: 13px; }
  .pt-fb { padding: 0; border: 0; background: none; }
  .pt-fbar { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 6px 0 12px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 8px; }
  .pt-fs { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pt-fs small { display: block; font-weight: 500; color: var(--text-muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
  .pt-fb-full { display: none; }
  .pt-fb-back { display: block; }
  .pt-fb-full.is-mo { display: flex; flex-direction: column; gap: 12px; position: fixed; left: 0; right: 0; bottom: var(--itn-tab-h, 0px); z-index: 10050; max-height: 88vh; overflow: auto; padding: 0 16px calc(16px + env(safe-area-inset-bottom, 0px));
    background: var(--bg-card); border-radius: 22px 22px 0 0; box-shadow: var(--theme-shadow); }
  .pt-fb-full.is-mo .pt-sheet-h, .pt-fb-full.is-mo .pt-sheet-ft { display: flex; }
  .pt-fb-full.is-mo .pt-sheet-h { padding: 8px 0; position: sticky; top: 0; background: var(--bg-card); z-index: 1; }
  .pt-fb-full.is-mo .pt-sheet-ft { position: sticky; bottom: 0; background: var(--bg-card); padding-top: 8px; }
  .pt-fb-full.is-mo .pt-sheet-ft .pt-btn { flex: 1; }
  .pt-fb-full .pt-fo, .pt-fb-full .pt-w-sm, .pt-fb-full .pt-w-md { flex: 1 1 100%; }
  .pt-fb-full .pt-seg { display: flex; } .pt-fb-full .pt-seg button { flex: 1; }
  .pt-filt2 { flex-direction: column; align-items: stretch; }
  .pt-acts .pt-btn, .pt-acts .pt-luu-w { flex: 1 1 auto; }
  .pt-luu-w .pt-btn { width: 100%; }
  .pt-luu { position: static; width: auto; margin-top: 8px; box-shadow: none; }
  .pt-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pt-kpi { padding: 12px 14px; }
  .pt-kpi-v { font-size: 20px; }
  .pt-card { padding: 12px 14px; }
  .pt-rank > div { grid-template-columns: 18px minmax(0, 1fr) minmax(0, 90px); }
  .pt-rank-bar { grid-column: 2 / -1; grid-row: 2; height: 10px; }
  .pt-funnel { grid-template-columns: minmax(0, 80px) minmax(0, 1fr) minmax(0, 80px); font-size: 12px; }
  .pt-tbl-chinh { display: none; }
  .pt-mlist { display: block; }
  .pt-drawer { top: auto; left: 0; width: 100%; max-height: 88vh; border-left: 0; border-radius: 22px 22px 0 0; }
  .pt-anh-ds { grid-template-columns: minmax(0, 1fr); }
  /* Mẫu Khung 3: chip "Đang lọc" ngay dưới thanh tóm tắt, cuộn ngang trong dải (trang không cuộn ngang). */
  .pt-achips-thanh { display: flex; flex-wrap: nowrap; overflow-x: auto; margin-top: 8px; padding: 0 0 2px; border-top: 0; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .pt-achips-thanh::-webkit-scrollbar { display: none; }
  .pt-achips-thanh .pt-achip { flex: none; white-space: nowrap; }
  .pt-sx-chips { margin-left: 0; width: 100%; }
}

/* 12/10/2026: mục chưa làm được (chưa có dữ liệu) — hiện mờ, có lý do */
.pt-chua-ds { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pt-chua-ds li { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 8px 10px; border: 1px dashed var(--border-color, currentColor); border-radius: 8px; opacity: .85; }
.pt-chua-ten { font-weight: 600; color: var(--text-muted); }
.pt-chua-nhan { font-size: 12px; font-weight: 700; color: var(--text-muted); border: 1px solid var(--border-color, currentColor); border-radius: 6px; padding: 1px 6px; align-self: start; }
.pt-chua-ds small { grid-column: 1 / -1; color: var(--text-muted); font-size: 12px; }
.pt-fg.pt-chua { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.pt-fg.pt-chua > .pt-fg-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; width: 100%; }
.pt-chua-ten { font-style: normal; }
.pt-chua-ds small { font-style: normal; }
/* 12/10/2026 — Tài chính · Trả góp: ô Tổng hợp thứ 9 (Trả góp) đứng một mình ở hàng cuối thì trải hết chiều ngang; thẻ cơ cấu khoản vay; chỉ số "Chưa được" dưới ô KPI. */
.pt-kpis > .pt-kpi:last-child:nth-child(4n+1) { grid-column: 1 / -1; }
.pt-tg-o { border-bottom: 0; padding-top: 4px; }
.pt-tg-o .pt-mg { font-size: 12px; }
.pt-tg-chu { margin: 6px 0 0; font-size: 12px; }
.pt-chua-cs { margin: 10px 0 0; flex-direction: row; flex-wrap: wrap; }
.pt-chua-cs li { flex: 1 1 260px; }
