/* ==========================================================================
   TỔ CKĐO — THIẾT KẾ PHẲNG, KHÔNG KHUNG VIỀN, HỌA TIẾT ----<>----
   Triết lý Own / Nexqa UI-11 & UI-12 & Chuẩn UX Portal U.1 (16/10/2026):
   - KHÔNG KHUNG HỘP, KHÔNG VIỀN, BỎ MÀU NỀN CARD (Nội dung thở tự nhiên)
   - Họa tiết riêng ----<>---- (.nx-deco: gạch đứt + hình thoi vàng kim) dưới mọi tiêu đề
   - KHÔNG MÀU ĐỎ: Tiêu cực / chưa đóng = Nâu đất gạch chân nét đứt (.nx-neg) + biểu tượng (✔ Đã đóng · ◐ Còn thiếu · ○ Chưa đóng)
   - Chữ phụ #4b5563 (tương phản 7:1 trên nền sáng), chữ nhãn vàng nâu #854d0e, KHÔNG dùng vàng kim làm chữ
   - Typography rem: Nội dung 1rem (16px, line-height 1.6), Bảng 0.9375rem, Chữ phụ >= 0.8125rem (13px), Nút 1rem min 44px, Tiêu đề 1.5rem, KPI 2.5rem
   - Nút chọn cỡ chữ A- / A / A+ (16px, 18px, 20px) lưu localStorage
   - Mobile: 100dvh, lề 16px, thanh tab đáy 5 mục + "Thêm", không tràn ngang ở 360px, 390px, 430px
   ========================================================================== */

:root {
  color-scheme: light;

  /* Bạc Platinum (Mặc định) */
  --nx-page: #eef1f5;
  --nx-surface: transparent;
  --nx-surface-subtle: rgba(226, 232, 240, 0.45);
  --nx-sunken: #e2e8f0;
  --nx-ink: #1f2329;
  --nx-ink-2: #374151;
  --nx-muted: #4b5563; /* Đổi sang #4b5563 theo U.1 (tương phản >= 7:1) */
  --nx-line: #d3d9e1;
  --nx-accent-ink: #854d0e; /* Đổi sang #854d0e theo U.1 */
  --nx-ok: #047857;
  --nx-bad: #854d0e; /* Nâu đất cho tiêu cực / chưa nộp - KHÔNG DÙNG ĐỎ */
  
  --nx-gold: #d4a017; /* Vàng kim chuẩn cho hình thoi <> trang trí */
  --nx-gold-soft: #d8c27a; /* Gạch đứt vàng kim trang trí */

  --ptsc-navy: #002D62;
  --ptsc-blue: #005EA6;
  --ptsc-cyan: #0284C7;

  /* Họa tiết nền ánh sáng Bạc Platinum */
  --nx-bg-art: 
    radial-gradient(700px 420px at 10% 30%, rgba(246, 215, 122, 0.25), transparent 70%),
    radial-gradient(800px 500px at 90% 70%, rgba(185, 192, 201, 0.35), transparent 70%),
    radial-gradient(1200px 600px at 20% -10%, #ffffff 0%, transparent 60%);

  --text-main: var(--nx-ink);
  --text-secondary: var(--nx-ink-2);
  --text-muted: var(--nx-muted);
  --border-color: var(--nx-line);
  --bg-page: var(--nx-page);
  --bg-surface: transparent;
  --bg-surface-subtle: var(--nx-surface-subtle);
  --text-ok: var(--nx-ok);

  --glass-bg: rgba(238, 241, 245, 0.88);
  --glass-border: rgba(211, 217, 225, 0.8);
}

.dark {
  color-scheme: dark;

  /* Xám Than Chì (Dark Mode) */
  --nx-page: #1c1f24;
  --nx-surface: transparent;
  --nx-surface-subtle: rgba(45, 50, 58, 0.45);
  --nx-sunken: #16181c;
  --nx-ink: #ffffff;
  --nx-ink-2: #d4d7dc;
  --nx-muted: #9aa1ab;
  --nx-line: #3a4048;
  --nx-accent-ink: #fcd34d;
  --nx-ok: #6ee7b7;
  --nx-bad: #d9a066; /* Nâu sáng gạch chân nét đứt trong Dark Mode */
  
  --nx-gold: #f5b301;
  --nx-gold-soft: #7a6a2c;

  --ptsc-navy: #002D62;
  --ptsc-blue: #38BDF8;
  --ptsc-cyan: #38BDF8;

  --nx-bg-art: 
    radial-gradient(700px 420px at 10% 30%, rgba(245, 179, 1, 0.08), transparent 70%),
    radial-gradient(800px 500px at 90% 70%, rgba(154, 161, 171, 0.08), transparent 70%);

  --text-main: var(--nx-ink);
  --text-secondary: var(--nx-ink-2);
  --text-muted: var(--nx-muted);
  --border-color: var(--nx-line);
  --bg-page: var(--nx-page);
  --bg-surface: transparent;
  --bg-surface-subtle: var(--nx-surface-subtle);
  --text-ok: var(--nx-ok);

  --glass-bg: rgba(28, 31, 36, 0.88);
  --glass-border: rgba(58, 64, 72, 0.8);
}

html {
  font-size: clamp(13px, 0.25vw + 12px, 16px);
  overflow-x: hidden !important;
  max-width: 100vw;
  box-sizing: border-box;
}

*, *:before, *:after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow-x: hidden !important;
  overflow-y: hidden;
  font-family: "Be Vietnam Pro", "Segoe UI", sans-serif;
  background-color: var(--nx-page);
  background-image: var(--nx-bg-art);
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--nx-ink);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  user-select: text;
  -webkit-user-select: text;
}

/* ==========================================================================
   U.1 TYPOGRAPHY REM ENFORCEMENT & MINIMUM FONT SIZE CLAMP (>= 14px)
   ========================================================================== */
.text-xs,
.text-sm,
[class*="text-[9px]"],
[class*="text-[10px]"],
[class*="text-[11px]"],
[class*="text-[12px]"],
[class*="text-[13px]"] {
  font-size: 0.875rem !important; /* 14px */
  line-height: 1.45rem !important;
}

.ptsc-tag {
  font-size: 0.875rem !important; /* 14px */
}

/* Ensure all text elements inside slide-panel have minimum 14px */
.slide-panel,
.slide-panel p,
.slide-panel span,
.slide-panel div,
.slide-panel li,
.slide-panel td,
.slide-panel th,
.slide-panel button,
.slide-panel a,
.slide-panel label,
.slide-panel code,
.slide-panel input,
.slide-panel select {
  font-size: max(14px, 0.875rem);
}

.text-base {
  font-size: 1rem !important; /* 16px */
  line-height: 1.6rem !important;
}

.text-lg {
  font-size: 1.125rem !important; /* 18px */
  line-height: 1.7rem !important;
}

.text-xl {
  font-size: 1.25rem !important; /* 20px */
  line-height: 1.75rem !important;
}

.text-2xl, h1, h2 {
  font-size: 1.5rem !important; /* 24px */
  line-height: 2rem !important;
}

h3 {
  font-size: 1.25rem !important;
}

h4 {
  font-size: 1.125rem !important;
}

.text-kpi, .kpi-number, [class*="text-3xl"], [class*="text-4xl"] {
  font-size: 2.5rem !important; /* 40px */
  font-weight: 700 !important;
  line-height: 1.15 !important;
}

table, th, td {
  font-size: 0.9375rem !important; /* 15px */
}

/* Selection */
::selection {
  background-color: rgba(0, 94, 166, 0.22);
  color: #002D62;
}
.dark ::selection {
  background-color: rgba(245, 179, 1, 0.28);
  color: #f5b301;
}

.nav-tab-btn,
.slider-nav-arrow,
.dock-dot,
#floatingSlideDock,
button,
.ptsc-tag,
#themeToggleBtn,
.font-size-btn {
  user-select: none;
  -webkit-user-select: none;
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* ==========================================================================
   HỌA TIẾT RIÊNG ----<>---- (NX-DECO)
   ========================================================================== */
.nx-deco {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
}
.nx-deco > i {
  flex: 1;
  border-top: 1.5px dashed var(--nx-gold-soft);
  height: 0;
  opacity: 0.85;
  transition: opacity 0.3s ease;
}
.nx-deco > b {
  width: 7px;
  height: 7px;
  flex: none;
  transform: rotate(45deg);
  background: var(--nx-gold);
  border-radius: 1px;
  box-shadow: 0 0 6px rgba(212, 160, 23, 0.35);
  animation: nxDecoGleam 3.5s ease-in-out infinite;
}
.nx-deco > b.o {
  background: transparent;
  border: 1.5px solid var(--nx-gold);
  width: 6px;
  height: 6px;
  box-shadow: 0 0 4px rgba(212, 160, 23, 0.25);
}
.nx-deco > b:nth-child(2) { animation-delay: 0.2s; }
.nx-deco > b:nth-child(3) { animation-delay: 0.4s; }
.nx-deco > b:nth-child(4) { animation-delay: 0.6s; }

@keyframes nxDecoGleam {
  0%, 100% {
    opacity: 0.85;
    transform: rotate(45deg) scale(1);
    box-shadow: 0 0 4px rgba(212, 160, 23, 0.3);
  }
  50% {
    opacity: 1;
    transform: rotate(45deg) scale(1.18);
    box-shadow: 0 0 10px var(--nx-gold);
  }
}


/* Tiêu cực / nợ: Nâu gạch chân nét đứt */
.nx-neg {
  color: var(--nx-bad) !important;
  font-weight: 600;
  text-decoration: underline dashed;
  text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
}

.ptsc-card,
.bento-card {
  border-radius: 0;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0.5rem 0;
}

.border-beam-box::after,
.spotlight-card::before {
  display: none !important;
}

::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--nx-line);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--nx-gold);
}

/* ==========================================================================
   CAROUSEL SLIDER ENGINE (VIEWPORT & SLIDES)
   ========================================================================== */
#viewportContainer {
  position: relative;
  width: 100vw;
  max-width: 100vw;
  height: calc(100vh - 68px);
  height: calc(100dvh - 68px);
  overflow: hidden;
}

#slidingTrack {
  display: flex;
  height: 100%;
  width: 700vw; /* 7 slides x 100vw */
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.slide-panel {
  flex: 0 0 100vw;
  width: 100vw;
  max-width: 100vw;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1.5rem 3rem 6rem 3rem; /* chừa padding-bottom không che nội dung */
  box-sizing: border-box;
  opacity: 0.95;
  transform: scale(0.995);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.slide-panel.active-slide {
  opacity: 1;
  transform: scale(1);
}

.slide-panel.active-slide > div > * {
  animation: slideStaggerIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.slide-panel.active-slide > div > *:nth-child(1) { animation-delay: 0.04s; }
.slide-panel.active-slide > div > *:nth-child(2) { animation-delay: 0.10s; }
.slide-panel.active-slide > div > *:nth-child(3) { animation-delay: 0.16s; }
.slide-panel.active-slide > div > *:nth-child(4) { animation-delay: 0.22s; }
.slide-panel.active-slide > div > *:nth-child(5) { animation-delay: 0.28s; }
.slide-panel.active-slide > div > *:nth-child(6) { animation-delay: 0.34s; }

@keyframes slideStaggerIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Floating Navigation Arrows */
.slider-nav-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--nx-line);
  backdrop-filter: blur(16px);
  color: var(--nx-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 35;
  transition: all 0.2s ease;
  font-size: 1rem;
}
.slider-nav-arrow:hover {
  border-color: var(--nx-gold);
  color: var(--nx-gold);
  transform: translateY(-50%) scale(1.08);
}
.slider-nav-arrow.prev { left: 16px; }
.slider-nav-arrow.next { right: 16px; }

/* ==========================================================================
   BUTTONS & TAGS (CAO TỐI THIỂU 44PX, FONT 1REM)
   ========================================================================== */
.ptsc-btn-primary, .nx-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 8px;
  background-color: var(--ptsc-navy);
  color: #FFFFFF !important;
  font-weight: 600;
  font-size: 0.9375rem !important;
  min-height: 44px !important;
  padding: 0.5rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.ptsc-btn-primary:hover, .nx-btn-primary:hover {
  background-color: var(--ptsc-blue);
}

.ptsc-btn-secondary, .nx-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--nx-line);
  color: var(--nx-ink);
  font-weight: 600;
  font-size: 0.9375rem !important;
  min-height: 44px !important;
  padding: 0.45rem 1.15rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.ptsc-btn-secondary:hover, .nx-btn-secondary:hover {
  border-color: var(--nx-gold);
  color: var(--nx-gold);
}

.ptsc-btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 8px;
  background-color: var(--nx-bad);
  color: #FFFFFF !important;
  font-weight: 600;
  font-size: 0.9375rem !important;
  min-height: 44px !important;
  padding: 0.5rem 1.25rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Badges / Tags */
.ptsc-tag, .nx-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 28px !important;
  padding: 0 0.65rem !important;
  border-radius: 6px;
  font-size: 0.875rem !important; /* 14px */
  font-weight: 600;
  white-space: nowrap;
}
.ptsc-tag-blue, .nx-tag-gold {
  background: transparent;
  color: var(--nx-accent-ink);
  border: 1px solid var(--nx-gold-soft);
}
.dark .ptsc-tag-blue, .dark .nx-tag-gold {
  color: var(--nx-gold);
  border: 1px solid var(--nx-gold-soft);
}

.ptsc-tag-ok, .nx-tag-ok {
  background: transparent;
  color: var(--nx-ok);
  border: 1px solid rgba(4, 120, 87, 0.45);
}

.ptsc-tag-unpaid {
  color: var(--nx-bad);
  border: 1px dashed var(--nx-bad);
  background: transparent;
}

/* Nav Pill Sliding Indicator */
#navPillIndicator {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  border-radius: 6px;
  background-color: var(--ptsc-navy);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 1;
}
.dark #navPillIndicator {
  background-color: var(--nx-gold);
}

.nav-tab-btn {
  position: relative;
  z-index: 2;
  font-size: 0.9375rem !important;
  padding: 0.4rem 0.85rem !important;
  transition: color 0.2s ease;
}
.nav-tab-btn.active-tab {
  color: #FFFFFF !important;
}
.dark .nav-tab-btn.active-tab {
  color: #1c1f24 !important;
}

/* Floating Bottom Slide Dock */
#floatingSlideDock {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.45rem 0.85rem;
  border-radius: 9999px;
  background: var(--glass-bg);
  border: 1px solid var(--nx-line);
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.dock-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--nx-line);
  cursor: pointer;
  transition: all 0.25s ease;
}
.dock-dot.active-dot {
  width: 22px;
  border-radius: 9999px;
  background: var(--nx-gold);
}

/* ==========================================================================
   A- / A / A+ FONT SIZE CONTROLS
   ========================================================================== */
.font-size-btn-group {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--nx-line);
  border-radius: 6px;
  overflow: hidden;
  background: var(--nx-surface-subtle);
  height: 36px;
}
.font-size-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 0 9px;
  font-weight: 700;
  font-size: 0.875rem !important;
  cursor: pointer;
  transition: all 0.2s;
  height: 100%;
  min-height: unset !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.font-size-btn:hover {
  background: var(--nx-sunken);
  color: var(--text-main);
}
.font-size-btn.active-size {
  background: var(--ptsc-navy);
  color: #FFFFFF !important;
}
.dark .font-size-btn.active-size {
  background: var(--nx-gold);
  color: #1c1f24 !important;
}

/* Ma trận T1–T12: cột và hàng đều, không nuốt khoảng trống vào tên */
#treasuryTableContainer table.fund-matrix,
#fullscreenMatrixModal table.fund-matrix {
  table-layout: auto !important;
  width: max-content !important;
  min-width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  overflow: visible !important;
  font-size: clamp(11px, 0.45vw + 9px, 14px) !important;
}
.fund-matrix th,
.fund-matrix td {
  padding: 4px 6px !important;
  height: auto !important;
  min-height: 36px !important;
  line-height: 36px !important;
  vertical-align: middle !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
  box-sizing: border-box !important;
}
.fund-matrix thead th {
  position: sticky !important;
  z-index: 8 !important;
  background: #f4f7fb !important;
  box-shadow: inset 0 -1px 0 #c5d0dc;
}
.dark .fund-matrix thead th {
  background: #1b2430 !important;
}
.fund-matrix .fund-matrix-stt {
  width: 46px !important;
  min-width: 46px !important;
  max-width: 46px !important;
  text-align: center !important;
}
.fund-matrix .fund-matrix-name {
  min-width: 9.5rem !important;
  width: auto !important;
  max-width: none !important;
  text-align: left !important;
  font-weight: 400 !important;
  padding-left: 8px !important;
}
.fund-matrix .fund-matrix-date {
  min-width: 5.8rem !important;
  width: auto !important;
  max-width: none !important;
  text-align: center !important;
}
.fund-matrix .fund-matrix-money {
  min-width: 7.8rem !important;
  width: auto !important;
  max-width: none !important;
  text-align: right !important;
  font-variant-numeric: tabular-nums;
}
.fund-matrix tbody td:nth-child(n+3):nth-child(-n+14),
.fund-matrix thead tr.fund-month-row th {
  min-width: 2.4rem !important;
  width: auto !important;
  text-align: center !important;
  padding-left: 4px !important;
  padding-right: 4px !important;
}
.fund-matrix thead th {
  text-align: center !important;
}

/* ==========================================================================
   TAB QUỸ ADMIN ACCESS CONTROL
   ========================================================================== */
.admin-only-btn {
  display: none !important;
}
body.is-admin .admin-only-btn {
  display: inline-flex !important;
}

body.env-production #simCardFrame,
body.env-production #simCardLink {
  display: none !important;
}

/* ==========================================================================
   MOBILE BOTTOM NAVIGATION BAR & RESPONSIVE RULES (@media < 1024px)
   ========================================================================== */
header {
  height: 64px !important;
  max-height: 64px !important;
  overflow: visible !important;
}

#mobileBottomNav {
  display: none;
}

@media (max-width: 1023.98px) {
  header {
    height: 64px !important;
    max-height: 64px !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  #ambientGlow {
    display: none !important;
  }

  #headerNavTabs {
    display: none !important;
  }

  .slider-nav-arrow {
    display: none !important;
  }

  #floatingSlideDock {
    display: none !important;
  }

  #viewportContainer {
    height: calc(100vh - 64px - 56px) !important;
    height: calc(100dvh - 64px - 56px) !important;
    width: 100vw !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  .slide-panel {
    padding: 1rem 1rem 5.5rem 1rem !important; /* Lề 16px = 1rem */
    width: 100vw !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
  }

  #mobileBottomNav {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100vw;
    height: 56px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--nx-line);
    z-index: 50;
    align-items: center;
    justify-content: space-around;
    padding: 0;
  }

  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
    color: var(--text-muted);
    font-size: 0.8125rem;
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
    gap: 3px;
    padding: 0;
    min-height: unset !important;
  }
  .mobile-nav-item i {
    font-size: 1.15rem;
  }
  .mobile-nav-item.active {
    color: var(--ptsc-blue);
    font-weight: 700;
  }
  .dark .mobile-nav-item.active {
    color: var(--nx-gold);
  }

  /* Table responsive wrapper */
  .table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ==========================================================================
   ĐIỆN THOẠI (< 640px): không tràn ngang, bảng thành thẻ, bỏ khung cuộn lồng nhau
   ========================================================================== */
html, body {
  overflow-x: clip;
}

@media (max-width: 1023.98px) {
  /* khung cuộn lồng trong trang cuộn (max-h-[...] overflow-y-auto) làm kẹt ngón tay trên điện thoại */
  .slide-panel [class*="max-h-["] {
    max-height: none !important;
    overflow-y: visible !important;
  }
  .mobile-nav-item {
    min-height: 48px;
  }
  .mobile-nav-item span {
    font-size: 0.75rem;
    line-height: 1;
  }
  #mobileBottomNav {
    height: calc(56px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
}

@media (max-width: 639.98px) {
  html body table.sheet-table.m-cards,
  html body table.sheet-table.m-cards tbody,
  html body table.sheet-table.m-cards tr,
  html body table.sheet-table.m-cards td {
    display: block;
    width: 100%;
  }
  html body table.sheet-table.m-cards thead {
    display: none;
  }
  html body table.sheet-table.m-cards tr {
    margin: 0 0 0.75rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--nx-line);
    border-radius: 10px;
    background: var(--nx-page, #fff);
  }
  html body table.sheet-table.m-cards td {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.35rem 0 !important;
    border: 0 !important;
    border-bottom: 1px dashed var(--nx-line) !important;
    text-align: right !important;
    white-space: normal !important;
    word-break: break-word;
    height: auto !important;
    min-height: 0 !important;
    line-height: 1.45 !important;
  }
  html body table.sheet-table.m-cards td[data-label="STT"] {
    display: none;
  }
  html body table.sheet-table.m-cards td:last-child {
    border-bottom: 0 !important;
  }
  html body table.sheet-table.m-cards td::before {
    content: attr(data-label);
    flex: 0 0 38%;
    text-align: left;
    font-weight: 600;
    color: var(--text-muted);
  }
  html body table.sheet-table.m-cards td.m-full,
  html body table.sheet-table.m-cards td:not([data-label]) {
    display: block;
    text-align: left !important;
  }
  html body table.sheet-table.m-cards td.m-full::before,
  html body table.sheet-table.m-cards td:not([data-label])::before {
    content: none;
  }
  html body table.sheet-table.m-cards td input,
  html body table.sheet-table.m-cards td select {
    max-width: 60%;
  }

  /* Ma trận quỹ 12 tháng: cuộn ngang, cột tên đứng yên, bỏ cột STT cho rộng chỗ */
  html body table.fund-matrix .fund-matrix-stt {
    display: none;
  }
  html body .fund-matrix .fund-matrix-name {
    position: sticky !important;
    left: 0;
    z-index: 7 !important;
    min-width: 0 !important;
    width: 8.5rem !important;
    max-width: 8.5rem !important;
    white-space: normal !important;
    line-height: 1.25 !important;
    background: var(--nx-page, #fff) !important;
    box-shadow: 2px 0 0 var(--nx-line);
  }
  html body .fund-matrix thead .fund-matrix-name {
    z-index: 9 !important;
  }
}
