﻿/* ============================================================
   QLTS — lớp giao diện bổ sung
   Sáng sạch (mặc định) · sidebar xám đậm + nhấn xanh dương
   khớp nền dữ liệu sáng · danh sách giãn chân trang · dark mode
   ============================================================ */

:root {
  /* Khớp đặc tả UX — xanh navy #1E3A8A */
  --primary: #1e3a8a;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --vang: #d8a820;
  --vang-dam: #8a6608;
  --vang-nhat: #fdf7e6;
  --bg: #f8fafc;
  --surface: #ffffff;
  --border: #cbd5e1;
  --border-light: #e2e8f0;
  --text: #1e293b;
  --text-2: #475569;
  --text-3: #64748b;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 12px 28px rgba(15, 23, 42, 0.07);
  /* Sidebar: xám đậm — tách lớp với vùng dữ liệu trắng/xanh nhạt */
  --sidebar-bg: #2c3645;
  --sidebar-bg-2: #243040;
  --sidebar-text: #c5ced9;
  --sidebar-muted: #8b97a8;
  --sidebar-active: #1e3a8a;
  --sidebar-hover: rgba(255, 255, 255, 0.06);
  color-scheme: light;
}

html[data-theme="dark"] {
  --primary: #5b9fd4;
  --primary-hover: #7eb3de;
  --primary-light: #1a2d42;
  --vang: #f0d060;
  --vang-dam: #f5dfa0;
  --vang-nhat: #3d3420;
  --bg: #0f1419;
  --surface: #1a222d;
  --acrylic: color-mix(in srgb, #1a222d 84%, transparent);
  --mica: #151b24;
  --border: #2a3544;
  --border-light: #1f2834;
  --text: #f1f5f9;
  --text-2: #cbd5e1;
  --text-3: #94a3b8;
  --c-ksk: #fbbf24;
  --c-ksk-bg: #3f2e0a;
  --c-ksk-border: #92400e;
  --c-ksk-done: #4ade80;
  --c-ksk-done-bg: #052e16;
  --c-ksk-done-border: #166534;
  --c-docs: #7dd3fc;
  --c-docs-bg: #082f49;
  --c-docs-border: #075985;
  --c-studying: #93c5fd;
  --c-studying-bg: #172554;
  --c-studying-border: #1d4ed8;
  --c-exam: #c4b5fd;
  --c-exam-bg: #2e1065;
  --c-exam-border: #6d28d9;
  --c-passed: #6ee7b7;
  --c-passed-bg: #022c22;
  --c-passed-border: #047857;
  --c-failed: #fca5a5;
  --c-failed-bg: #450a0a;
  --c-failed-border: #b91c1c;
  --c-dropout: #cbd5e1;
  --c-dropout-bg: #1e293b;
  --c-dropout-border: #475569;
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #f87171;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.32);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.4);
  --sidebar-bg: #121820;
  --sidebar-bg-2: #0c1016;
  --sidebar-text: #a8b4c4;
  --sidebar-muted: #6b7788;
  --sidebar-active: #0b5fb8;
  --sidebar-hover: rgba(255, 255, 255, 0.05);
  color-scheme: dark;
}

html[data-theme="dark"] body,
html[data-theme="dark"] .topbar,
html[data-theme="dark"] .tabbar,
html[data-theme="dark"] .card,
html[data-theme="dark"] .ds-bang,
html[data-theme="dark"] .the-dong,
html[data-theme="dark"] .input,
html[data-theme="dark"] .select,
html[data-theme="dark"] textarea.input,
html[data-theme="dark"] .tbl th,
html[data-theme="dark"] .tbl td,
html[data-theme="dark"] table.tbl-ghim th:first-child,
html[data-theme="dark"] table.tbl-ghim td:first-child,
html[data-theme="dark"] table.tbl-ghim th.ghim,
html[data-theme="dark"] table.tbl-ghim td.ghim {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

html[data-theme="dark"] body,
html[data-theme="dark"] .content {
  background: var(--bg);
}

html[data-theme="dark"] .topbar,
html[data-theme="dark"] .tabbar {
  background: var(--surface);
}

html[data-theme="dark"] table.tbl tbody tr:nth-child(even) td,
html[data-theme="dark"] table.tbl tbody tr:nth-child(even) td.ghim {
  background: #151c26;
}

html[data-theme="dark"] table.tbl tbody tr:nth-child(odd) td,
html[data-theme="dark"] table.tbl tbody tr:nth-child(odd) td.ghim {
  background: var(--surface);
}

@media (hover: hover) and (pointer: fine) {
  html[data-theme="dark"] table.tbl tbody tr:hover td,
  html[data-theme="dark"] table.tbl tbody tr:hover td.ghim {
    background: var(--primary-light);
  }
}

/* ---- Vùng dữ liệu sáng sạch ---- */
body {
  background: var(--bg);
}

.main {
  background: var(--bg);
}

.content {
  background: transparent;
}

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: none;
  min-height: 48px;
}

@media (min-width: 1024px) {
  :root {
    --topbar-h: 52px;
  }
}

.card,
.ds-bang.card {
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  border-radius: 12px;
}

/* ---- Sidebar xám đậm · nhấn xanh dương (tách với nền dữ liệu sáng) ---- */
.sidebar {
  background: linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg-2) 100%) !important;
  color: var(--sidebar-text);
  border-right: 0;
  box-shadow: 2px 0 12px rgba(15, 23, 42, 0.08);
}

.sidebar .brand-text strong,
.sidebar .brand-text {
  color: #ffffff;
}

.sidebar .brand-text span {
  color: var(--sidebar-muted);
}

.sidebar-nav a,
.sidebar .nav-item {
  color: var(--sidebar-text);
  border-radius: 8px;
  margin: 1px 8px;
}

.sidebar-nav a:hover,
.sidebar .nav-item:hover {
  background: var(--sidebar-hover);
  color: #fff;
}

.sidebar-nav a.dang-mo,
.sidebar .nav-item.active,
.sidebar .nav-item.dang-mo {
  background: var(--sidebar-active);
  color: #fff;
  box-shadow: 0 2px 8px rgba(11, 95, 184, 0.35);
}

.sidebar-thu,
.sidebar-dong {
  color: var(--sidebar-muted);
}

.sidebar-thu:hover,
.sidebar-dong:hover {
  color: #fff;
}

.sidebar .sidebar-nhom,
.sidebar .nav-group-title,
.sidebar-nav .nhom-tieu-de {
  color: var(--sidebar-muted);
  letter-spacing: 0.04em;
  font-size: 11px;
  text-transform: uppercase;
}

/* ---- Danh sách giãn tới chân trang ---- */
.content:has(.khung-ds) {
  overflow: hidden;
  gap: 8px;
  padding-bottom: calc(var(--tabbar-h) + var(--an-toan-duoi) + 4px);
}

@media (min-width: 1024px) {
  .content:has(.khung-ds) {
    padding-bottom: 8px;
  }
}

.content:has(.khung-ds) > form:not([data-loc]),
.content:has(.khung-ds) > form.form-hop {
  flex: 0 0 auto;
  height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: visible;
  min-height: 0;
}

.khung-ds {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.khung-ds .vung-cuon,
.khung-ds .ds-the.vung-cuon,
.khung-ds .table-wrap.vung-cuon {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

@media (min-width: 768px) {
  .khung-ds > .ds-bang {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  .khung-ds > .ds-bang.card {
    border-radius: 12px;
    overflow: hidden;
  }
}

/* ---- Thanh lọc / pager gọn, sáng ---- */
.ds-dau {
  gap: 6px;
}

.content > .toolbar,
.content > form.toolbar,
.ds-dau > .toolbar,
.ds-dau > form.toolbar {
  padding: 8px 10px;
  gap: 6px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.ds-dau > .chips .chip {
  min-height: 28px;
  padding: 0 10px;
  font-size: 12px;
  border-radius: 999px;
}

.ds-dau > .pager-info,
.ds-dau > .pager {
  font-size: 12.5px;
  color: var(--text-2);
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}
.btn-primary:active:not(:disabled) {
  transform: scale(0.98);
}

/* Nút Lọc đang bật — chấm đỏ báo hiệu theo đặc tả */
.btn-loc-on,
.nut-loc.btn-loc-on {
  position: relative;
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}
.btn-loc-on::after,
.nut-loc.btn-loc-on::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 2px var(--surface);
}
.loc-dem {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: var(--r-full);
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

/* Tên học viên trong bảng — màu chính, có thể kèm avatar */
table.tbl td a.hv-ten,
table.tbl .hv-ten {
  color: #1e3a8a;
  font-weight: 650;
  text-decoration: none;
}
table.tbl td a.hv-ten:hover {
  text-decoration: underline;
}
.hv-ten-hang {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.hv-ten-hang .avatar {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 50%;
  font-size: 11px;
}

/* Grid nội dung 12 cột (vùng chính) */
.content > .tq-trang,
.content > .khung-ds,
.content > .trang-nhieu-bang {
  width: 100%;
  max-width: 100%;
}
.tq-trang,
.tq-luoi {
  gap: var(--gutter, 16px);
}
@media (min-width: 960px) {
  .tq-luoi { gap: var(--k6); }
}
.tq-panel-dau {
  padding: var(--k6);
}
.tq-canh-bao .tq-cb > a,
.tq-canh-bao .tq-cb > div {
  padding: var(--k4) var(--k6);
}
.tq-loi-tat {
  padding: var(--k3) var(--k4);
}
.bd-dau {
  padding: var(--k6);
}

/* Sidebar thu gọn 64px theo đặc tả */
@media (min-width: 1024px) {
  .sidebar.thu-gon {
    width: var(--sidebar-thu, 64px);
  }
}

.tbl th,
.tbl td {
  padding-top: 14px;
  padding-bottom: 14px;
}

.tbl th {
  font-size: 11.5px;
  letter-spacing: 0.02em;
  font-weight: 600;
  color: var(--text-2);
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
}

html[data-theme="dark"] .tbl th {
  background: #151c26;
}

.tbl tbody tr:nth-child(even) td {
  background: #ffffff; /* đặc tả: nền trắng mặc định */
}

@media (hover: hover) and (pointer: fine) {
  table.tbl tbody tr:hover td {
    background: #f0fdf4;
  }
}

html[data-theme="dark"] .tbl tbody tr:nth-child(even) td {
  background: #151c26;
}

/* Thẻ mobile */
.ds-the {
  gap: 8px;
}

.the-dong {
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 12px 12px 12px 14px;
  position: relative;
  background: var(--surface);
}

.the-dong::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--primary);
}

.the-dong.bam:active {
  transform: scale(0.99);
}

.nut-theme {
  min-width: 44px;
  min-height: 44px;
}

.hang-thao-tac .btn-icon {
  color: var(--text-2);
}

.hang-thao-tac .btn-icon:hover {
  color: var(--primary);
  background: var(--primary-light);
}

@media (prefers-reduced-motion: reduce) {
  .the-dong.bam:active {
    transform: none;
  }
}

/* ---- Big update: bảng giá, QR CCCD, tìm nhanh SIS ---- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.topbar-tim {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 200px;
  max-width: 320px;
  flex: 1 1 220px;
  padding: 0 12px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-3);
}
.topbar-tim input {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  outline: none;
  min-width: 0;
}
.topbar-tim input::placeholder { color: var(--text-3); }
@media (max-width: 900px) {
  .topbar-tim { display: none; }
}

.bang-gia-nhom {
  margin: 1.25rem 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.bang-gia-nhom:first-child { margin-top: 0; }
.bang-gia-cuon {
  overflow-x: auto;
  margin-bottom: 0.5rem;
  max-width: 100%;
}
.bang-gia-tbl {
  width: max-content !important;
  max-width: none;
  table-layout: auto;
  border-collapse: collapse;
}
.bang-gia-tbl th.phai,
.bang-gia-tbl td { text-align: right; }
.bang-gia-tbl th[scope="row"] {
  text-align: left;
  white-space: nowrap;
  width: 1%;
  padding-right: 1.25rem;
  vertical-align: middle;
}
.bang-gia-tbl thead th,
.bang-gia-tbl td {
  width: 1%;
  white-space: nowrap;
  vertical-align: middle;
  padding: 0.4rem 0.5rem;
}
.otien-bang-gia {
  width: 8.5rem;
  max-width: 100%;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.cccd-qr-hang {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}
.cccd-qr-hang .input { flex: 1; min-width: 0; }
.cccd-qr-hang .btn { white-space: nowrap; flex-shrink: 0; }

.cccd-qr-dlg {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.cccd-qr-nen {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}
.cccd-qr-hop {
  position: relative;
  width: min(420px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 1rem 1.1rem 1.15rem;
  z-index: 1;
}
.cccd-qr-hop header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.cccd-qr-hop header h3 {
  margin: 0;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
#cccd-qr-reader {
  border-radius: 10px;
  overflow: hidden;
  background: #0f172a;
  min-height: 220px;
}
.cccd-qr-hanh {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}
.cccd-qr-loi {
  margin: 0.65rem 0 0;
  color: var(--danger, #b91c1c);
  font-size: 0.875rem;
}

a.stat-gon {
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
a.stat-gon:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.tc-bang-gia-tip { margin: 0.5rem 0 0; }

html[data-theme="dark"] .cccd-qr-nen {
  background: rgba(0, 0, 0, 0.65);
}

.pct-check.da-thu span { color: var(--text-3); }
.pct-check.da-thu { opacity: 0.85; }

/* ============================================================
   UI polish — responsive / mobile-first (2026-09-23)
   ------------------------------------------------------------
   Bổ sung theo prompt sửa giao diện: không tràn ngang, vùng chạm,
   bảng giá gọn, form học phí trên điện thoại.
   ============================================================ */

.app,
.main,
.content,
.khung-thi,
.khoi-thi {
  max-width: 100%;
}

/* Thanh kỳ: nút + nhập KQ căn hàng, wrap sạch trên mobile */
.kt-hang1 {
  align-items: center;
}

.kt-nut {
  align-items: center;
  row-gap: 6px;
}

.kt-nut .btn,
.tn-nhap-kq .btn,
.tn-nhap-kq .tn-chon-tep {
  min-height: 36px;
}

@media (max-width: 767px) {
  .kt-nut {
    width: 100%;
    margin-left: 0;
  }

  .kt-nut .btn,
  .tn-nhap-kq .btn,
  .tn-nhap-kq .tn-chon-tep {
    min-height: var(--cham);
  }

  .tn-nhap-kq {
    width: 100%;
  }

  .thi-tab > button {
    min-height: var(--cham);
  }
}

/* Bảng giá: ô tiền không tràn khung điện thoại */
@media (max-width: 480px) {
  .otien-bang-gia {
    width: 7.25rem;
    min-width: 0;
  }

  .bang-gia-tbl th[scope="row"] {
    white-space: normal;
    max-width: 9.5rem;
    padding-right: 0.75rem;
  }
}

/* Học phí / danh sách thẻ: khoảng cách thở hơn trên mobile */
@media (max-width: 767px) {
  .ds-the {
    gap: var(--k3);
  }

  .content {
    padding-left: var(--k3);
    padding-right: var(--k3);
  }
}

/* Tab đào tạo (Tiến độ / Tốt nghiệp / Sát hạch): đủ chạm */
.tab-dao-tao a,
.dao-tao-tabs a,
nav[aria-label="Phần đào tạo"] a {
  min-height: 40px;
}

@media (max-width: 767px) {
  nav[aria-label="Phần đào tạo"] a {
    min-height: var(--cham);
  }
}

/* Prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   TỔNG QUAN — bảng điều khiển đầy đủ
   ============================================================ */

.tq-trang {
  display: flex;
  flex-direction: column;
  gap: var(--k4);
  min-width: 0;
  max-width: 100%;
}

.tq-trang > .thanh-ky {
  margin-bottom: 0;
}

.tq-lead {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--text-2);
}

.tq-lead a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tq-stat {
  margin: 0;
}

.tq-luoi {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--k4);
  min-width: 0;
}

@media (min-width: 960px) {
  .tq-luoi {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-items: stretch;
  }
}

.tq-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
  overflow: hidden;
}

.tq-panel-dau {
  display: flex;
  align-items: center;
  gap: var(--k2);
  padding: var(--k3) var(--k4);
  border-bottom: 1px solid var(--border-light);
  min-height: 48px;
}

.tq-panel-dau h2 {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: var(--k2);
}

.tq-panel-dau h2 i {
  color: var(--primary);
  font-size: 13px;
}

.tq-trong {
  margin: 0;
  padding: var(--k5) var(--k4);
  color: var(--text-3);
  font-size: 13.5px;
}

.tq-canh-bao {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tq-cb > a,
.tq-cb > div {
  display: flex;
  align-items: flex-start;
  gap: var(--k3);
  padding: var(--k3) var(--k4);
  border-bottom: 1px solid var(--border-light);
  color: inherit;
  text-decoration: none;
  min-height: var(--cham);
}

.tq-cb:last-child > a,
.tq-cb:last-child > div {
  border-bottom: 0;
}

.tq-cb > a:hover {
  background: var(--primary-light);
}

.tq-cb-ico {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: var(--r);
  background: var(--border-light);
  color: var(--text-2);
  font-size: 13px;
}

.tq-cb.nghiem .tq-cb-ico {
  background: var(--c-failed-bg);
  color: var(--c-failed);
}

.tq-cb.nhac .tq-cb-ico {
  background: var(--vang-nhat);
  color: var(--vang-dam);
}

.tq-cb-chu {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tq-cb-chu strong {
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.35;
  color: var(--text);
}

.tq-cb-chu small {
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-3);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

.tq-cb > a > .fa-chevron-right {
  flex: 0 0 auto;
  margin-top: 8px;
  color: var(--text-3);
  font-size: 11px;
}

.tq-panel-chan {
  margin: 0;
  padding: var(--k2) var(--k4) var(--k3);
  font-size: 12.5px;
  color: var(--text-3);
  border-top: 1px solid var(--border-light);
}

.tq-loi-tat {
  list-style: none;
  margin: 0;
  padding: var(--k2);
  display: grid;
  gap: 4px;
}

.tq-loi-tat a {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--k2);
  padding: 8px 10px;
  border-radius: var(--r);
  color: inherit;
  text-decoration: none;
  min-height: var(--cham);
}

.tq-loi-tat a:hover {
  background: var(--primary-light);
}

.tq-loi-tat li.nhan a {
  background: color-mix(in srgb, var(--c-failed-bg) 70%, transparent);
}

.tq-loi-tat li.nhan a:hover {
  background: var(--c-failed-bg);
}

.tq-lt-ico {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: var(--r);
  background: var(--border-light);
  color: var(--primary);
  font-size: 14px;
}

.tq-lt-chu {
  min-width: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tq-loi-tat b {
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.tq-db-dau {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--k2) var(--k3);
  margin-bottom: var(--k3);
}

.tq-db-tieu {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.tq-tinh-trang {
  margin: 0;
}

.tq-stat-ht {
  padding: 0 var(--k3) var(--k3);
}

.tq-ht-goi {
  margin: 0;
  padding: 0 var(--k4) var(--k4);
}

/* Biểu đồ: ô đọc + biến động không bị đẩy sát mép / tràn */
.bd-dau {
  flex-wrap: wrap;
  row-gap: var(--k2);
}

.bd-doc {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  max-width: 100%;
}

.bd-doc .bien-dong {
  max-width: 100%;
  justify-content: flex-end;
}

@media (max-width: 639px) {
  .bd-dau {
    flex-direction: column;
    align-items: stretch;
  }

  .bd-doc {
    align-items: flex-start;
    text-align: left;
  }

  .bd-doc .bien-dong {
    justify-content: flex-start;
  }
}



