/* Helen Pháp lý — Command Center. Purge-proof hand-written CSS (mirror lyly.css tokens/patterns). */
/* AI-MARK[QAI-UI:helen-review] 2026-07-10 20:45 (GMT+7) — CSS Dashboard Helen: hiển thị trạng thái đồng bộ Kho Pháp chế và phân biệt hồ sơ metadata-only để lãnh đạo thấy phạm vi dữ liệu nhưng không nhầm với bản AI đã trích xuất. | rel: HELEN-ORCH:dashboard-shared-inventory, helen.js */
:root { color-scheme: light; }
html, body { height: 100%; }
body { margin: 0; }

/* Ẩn nội dung tới khi auth-guard.js xác nhận xong (pattern chuẩn nền tảng — xem CLAUDE.md §2c) */
html.auth-pending body { visibility: hidden; }

/* scrollbars gọn */
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; }
*::-webkit-scrollbar-track { background: transparent; }

html, body { scrollbar-width: none; -ms-overflow-style: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar { width: 0; height: 0; display: none; }

#helenSidebar, #helenSidebar nav { scrollbar-width: none; -ms-overflow-style: none; }
#helenSidebar::-webkit-scrollbar, #helenSidebar nav::-webkit-scrollbar { width: 0; height: 0; display: none; }

/* AI-MARK[QAI-UI:helen-legal-readable-text] 2026-07-20 17:08 (GMT+7) — mọi đoạn Điều/Khoản/gạch đầu dòng trong Helen
   được tách dòng có marker riêng để pháp chế đọc nguyên văn không bị dồn chữ hoặc ép ngang. | rel: helen.js legalTextHtml */
.helen-legal-text {
  display: block;
  min-width: 0;
  color: inherit;
  font: inherit;
  line-height: 1.62;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.helen-legal-text--compact { line-height: 1.48; }
.helen-legal-text--list {
  display: grid;
  gap: 6px;
}
.helen-legal-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px;
  align-items: start;
}
.helen-legal-line-marker {
  display: inline-block;
  color: #1d4ed8;
  font-weight: 950;
  white-space: nowrap;
}
.helen-legal-line-text { min-width: 0; }

/* AI-MARK[QAI-UI:helen-shell-account-sidebar] 2026-07-31 07:55 (GMT+7) — sidebar Helen mở rộng bằng hover/focus, account dock đáy và link nhanh Backend Pháp chế; không khôi phục topbar/subnav. | rel: UI-L4-Helen, helen.js, QAI-UI:helen-legal-backend-bridge */
/* ── Sidebar rail: thu gọn 4rem, HOVER mở rộng 16rem (overlay, không đẩy nội dung) — mirror .lyly-rail ── */
.helen-rail { width: 4rem; transition: width .2s ease; }
.helen-rail:hover,
.helen-rail:focus-within { width: 16rem; box-shadow: 12px 0 40px rgba(2,6,23,.4); }
.helen-rail nav { overflow-x: hidden; }
.helen-rail .helen-navtext, .helen-rail .helen-group,
.helen-rail .helen-brandtext, .helen-rail .helen-account-label, .helen-rail .helen-account-caret {
  opacity: 0; white-space: nowrap; overflow: hidden;
  transition: opacity .12s ease; pointer-events: none;
}
.helen-rail:hover .helen-navtext, .helen-rail:hover .helen-group,
.helen-rail:hover .helen-brandtext, .helen-rail:hover .helen-account-label, .helen-rail:hover .helen-account-caret,
.helen-rail:focus-within .helen-navtext, .helen-rail:focus-within .helen-group,
.helen-rail:focus-within .helen-brandtext, .helen-rail:focus-within .helen-account-label, .helen-rail:focus-within .helen-account-caret {
  opacity: 1; pointer-events: auto;
}

.helen-brand-logo-wrap {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: .75rem;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(2, 6, 23, .22);
  transition: width .2s ease;
}
.helen-brand-logo { width: 84%; height: 84%; object-fit: contain; }
.helen-brand-logo-wrap:hover { box-shadow: 0 10px 22px rgba(2, 6, 23, .28); }
.helen-brand-logo-wrap:focus-visible { outline: 2px solid #FF6B2B; outline-offset: 2px; }
.helen-rail:hover .helen-brand-logo-wrap,
.helen-rail:focus-within .helen-brand-logo-wrap { width: 5.75rem; }
.helen-rail:hover .helen-brand-logo,
.helen-rail:focus-within .helen-brand-logo { width: 88%; }

.helen-legal-bridge-nav {
  padding: 8px 10px 0;
}
.helen-legal-bridge-link {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 107, 43, .34);
  border-radius: 12px;
  background: rgba(255, 107, 43, .10);
  color: #fed7aa;
  text-decoration: none;
  font-size: 13px;
  font-weight: 850;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.helen-legal-bridge-link svg { color: #fb923c; flex: 0 0 auto; }
.helen-legal-bridge-link:hover {
  background: rgba(255, 107, 43, .18);
  border-color: rgba(251, 146, 60, .66);
  color: #fff7ed;
}

.helen-account-dock { background: rgba(2, 6, 23, .16); }
.helen-account-btn { min-height: 48px; border: 0 !important; background: transparent !important; box-shadow: none !important; transition: background .15s ease, transform .15s ease; }
.helen-account-btn:hover, .helen-account-btn[aria-expanded="true"] { background: rgba(255, 255, 255, .06) !important; }
.helen-account-avatar {
  width: 34px; height: 34px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #FF6B2B, #7C3AED); color: #fff; font-size: 12px; font-weight: 900;
  box-shadow: 0 8px 18px rgba(255, 107, 43, .22);
}
.helen-rail .helen-account-label { max-width: 0; transition: opacity .12s ease, max-width .18s ease; }
.helen-rail:hover .helen-account-label,
.helen-rail:focus-within .helen-account-label { max-width: 158px; }
.helen-account-menu {
  position: absolute; left: .625rem; bottom: calc(100% + 8px); z-index: 80; width: 14.75rem;
  border: 1px solid #dbe4f0; border-radius: 14px; background: #fff; color: #0f172a; padding: 6px;
  box-shadow: 0 -16px 40px rgba(15, 23, 42, .22);
}
.helen-account-menu.hidden { display: none; }
.helen-account-menu::after {
  content: ""; position: absolute; left: 18px; bottom: -7px; width: 12px; height: 12px; transform: rotate(45deg);
  background: #fff; border-right: 1px solid #dbe4f0; border-bottom: 1px solid #dbe4f0;
}

/* nav item active */
.helen-nav-item.active { background: rgba(255,107,43,.14); color: #fff; }
.helen-nav-item.active .helen-nav-ico { color: #FF6B2B; }

/* Gutter đồng nhất cho vùng nội dung (20px mobile → 32px ≥640px) — viết tay purge-safe */
.helen-shell-x { padding-left: 1.25rem; padding-right: 1.25rem; }
.helen-page { padding: .75rem; }
@media (min-width: 640px) {
  .helen-shell-x { padding-left: 2rem; padding-right: 2rem; }
  .helen-page { padding: .75rem .875rem 1rem; }
}
@media (min-width: 1440px) {
  .helen-page { padding-left: 1rem; padding-right: 1rem; }
}

/* fade-in tab */
.helen-pane { animation: helenfade .22s ease; }
@keyframes helenfade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* line clamp helper */
.helen-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ── Empty / loading primitives — mirror .lyly-empty/.lyly-loading ── */
.helen-empty { text-align: center; padding: 40px 20px; color: #64748b; }
.helen-empty-ico { width: 32px; height: 32px; opacity: .4; margin: 0 auto 10px; display: block; }
.helen-empty-title { font-weight: 600; color: #64748b; }
.helen-empty-sub { font-size: 13px; margin-top: 4px; }

.helen-loading { text-align: center; padding: 40px 20px; color: #94a3b8; }
.helen-loading-txt { margin-top: 8px; font-size: 13px; }
.helen-dot { animation: helenblink 1.2s infinite both; }
.helen-dot:nth-child(2) { animation-delay: .2s; }
.helen-dot:nth-child(3) { animation-delay: .4s; }
@keyframes helenblink { 0%,80%,100% { opacity: .25; } 40% { opacity: 1; } }

/* ── AI-MARK[QAI-UI:helen-review] 2026-07-10 22:34 (GMT+7) — CSS cho màn xem nhanh hợp đồng và dải tab dashboard: unified review stage, classification chips, left list toggle, AI identity reader, party cards, fee smart table, executive summary points, controlled highlights, clause summary/detail collapse, floating chat, mobile executive layout | rel: UI-L4-Helen, helen.js viewReviewList/overviewInsightHtml/hldDashboardTabsHtml */

/* Quick overview dashboard */
.hlo-overview { width: 100%; max-width: none; margin: 0; }

.hld-dashboard {
  display: grid; gap: 12px; width: 100%; color: #0f172a;
}
.hld-metrics {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px;
}
.hld-source-strip {
  display: flex; align-items: center; flex-wrap: wrap; gap: 7px 10px;
  border: 1px solid #c7d2fe; border-radius: 8px; background: #f8faff; padding: 10px 12px;
  color: #475569; font-size: 12px; font-weight: 650; line-height: 1.45;
}
.hld-source-strip > svg { color: #2563eb; flex: 0 0 auto; }
.hld-source-strip b { color: #1e3a8a; font-size: 12px; font-weight: 900; }
.hld-source-strip em { color: #92400e; font-size: 11.5px; font-style: normal; font-weight: 800; }
.hld-view-tabs {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0;
  border: 1px solid #dbe4f0; border-radius: 8px; background: #fff; padding: 8px;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.hld-view-tabs-list { display: flex; align-items: center; gap: 6px; min-width: 0; overflow-x: auto; }
.hld-view-tab {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; flex: 0 0 auto;
  border: 1px solid transparent; border-radius: 7px; padding: 0 12px; color: #64748b;
  font-size: 13px; font-weight: 850; text-decoration: none; white-space: nowrap; transition: .15s ease;
}
.hld-view-tab svg { color: #94a3b8; }
.hld-view-tab b {
  min-width: 24px; height: 22px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; background: #eef2f7; color: #475569; font-size: 11px; font-weight: 900;
}
.hld-view-tab:hover { border-color: #fed7aa; background: #fff7ed; color: #c2410c; }
.hld-view-tab:hover svg { color: #f97316; }
.hld-view-tab.is-active { border-color: #fdba74; background: #fff7ed; color: #ea580c; }
.hld-view-tab.is-active svg { color: #f97316; }
.hld-view-tab.is-active b { background: #ff6b2b; color: #fff; }
.hld-view-tabs-note { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; color: #94a3b8; font-size: 11px; font-weight: 750; white-space: nowrap; }
.hld-view-tabs-note svg { color: #f97316; }
.hld-view-tabs-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-width: 0;
}
.hld-backend-link {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid #fed7aa;
  border-radius: 7px;
  padding: 0 10px;
  background: #fff7ed;
  color: #c2410c;
  text-decoration: none;
  font-size: 12px;
  line-height: 1;
  font-weight: 900;
  white-space: nowrap;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.hld-backend-link svg { color: #f97316; flex: 0 0 auto; }
.hld-backend-link:hover {
  border-color: #fb923c;
  background: #ffedd5;
  color: #9a3412;
}
.hld-metric {
  min-height: 76px; display: grid; grid-template-columns: 36px minmax(0, 1fr); align-items: center; gap: 10px;
  border: 1px solid #dbe4f0; background: #fff; border-radius: 8px; padding: 12px; box-shadow: 0 1px 2px rgba(15,23,42,.05);
}
.hld-metric > span {
  width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px;
  background: #f1f5f9; color: #475569;
}
.hld-metric b { display: block; color: #0f172a; font-size: 22px; font-weight: 900; line-height: 1; }
.hld-metric em { display: block; color: #334155; font-size: 12px; font-style: normal; font-weight: 850; margin-top: 4px; overflow-wrap: anywhere; }
.hld-metric small { display: block; color: #94a3b8; font-size: 11px; font-weight: 750; margin-top: 2px; overflow-wrap: anywhere; }
.hld-metric--green > span { background: #ecfdf5; color: #047857; }
.hld-metric--blue > span { background: #eff6ff; color: #1d4ed8; }
.hld-metric--amber > span { background: #fffbeb; color: #b45309; }
.hld-metric--red > span { background: #fef2f2; color: #b91c1c; }
.hld-grid { display: grid; gap: 12px; }
.hld-grid--top { grid-template-columns: 1.05fr 1fr 1fr; }
.hld-grid--wide { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hld-grid--analysis { grid-template-columns: minmax(0, 1.28fr) minmax(360px, .72fr); }
.hld-panel {
  min-width: 0; border: 1px solid #dbe4f0; background: #fff; border-radius: 8px; padding: 14px;
  box-shadow: 0 1px 2px rgba(15,23,42,.05);
}
.hld-panel-head {
  min-height: 28px; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px;
}
.hld-panel-head > div { min-width: 0; display: inline-flex; align-items: center; gap: 7px; color: #0f172a; font-size: 13px; font-weight: 900; }
.hld-panel-head > div svg { color: #ff6b2b; }
.hld-panel-head span { color: #94a3b8; font-size: 11px; font-weight: 800; text-align: right; }
.hld-role-body { display: grid; grid-template-columns: 132px minmax(0, 1fr); align-items: center; gap: 14px; }
.hld-donut {
  width: 128px; height: 128px; border-radius: 50%; display: grid; place-items: center; position: relative;
  box-shadow: inset 0 0 0 1px rgba(15,23,42,.08);
}
.hld-donut::after {
  content: ""; position: absolute; inset: 18px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1px #e2e8f0;
}
.hld-donut b, .hld-donut span { position: relative; z-index: 1; }
.hld-donut b { color: #0f172a; font-size: 28px; font-weight: 900; line-height: 1; align-self: end; }
.hld-donut span { color: #64748b; font-size: 11px; font-weight: 850; align-self: start; margin-top: 2px; }
.hld-legend { display: grid; gap: 8px; }
.hld-legend span {
  display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 7px;
  color: #475569; font-size: 12px; font-weight: 800;
}
.hld-legend b { color: #0f172a; font-size: 13px; font-weight: 900; }
.hld-dot { width: 9px; height: 9px; border-radius: 999px; display: inline-block; }
.hld-dot--green { background: #0f766e; }
.hld-dot--blue { background: #2563eb; }
.hld-dot--amber { background: #f59e0b; }
.hld-bars { display: grid; gap: 10px; }
.hld-bar-row { display: grid; grid-template-columns: minmax(0, 1fr) 76px; gap: 8px; align-items: center; }
.hld-bar-label { grid-column: 1 / 3; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.hld-bar-label span { min-width: 0; color: #334155; font-size: 12px; font-weight: 850; overflow-wrap: anywhere; }
.hld-bar-label b { color: #0f172a; font-size: 12px; font-weight: 900; }
.hld-bar-track { height: 8px; background: #eef2f7; border-radius: 999px; overflow: hidden; }
.hld-bar-fill { display: block; height: 100%; border-radius: inherit; }
.hld-bar-row > em { color: #94a3b8; font-size: 11px; font-style: normal; font-weight: 800; text-align: right; }
.hld-c1 { background: #ff6b2b; }
.hld-c2 { background: #2563eb; }
.hld-c3 { background: #0f766e; }
.hld-c4 { background: #7c3aed; }
.hld-c5 { background: #b45309; }
.hld-c6 { background: #64748b; }
.hld-network-panel { padding-bottom: 14px; }
.hld-network-shell { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 12px; align-items: stretch; }
.hld-network-map {
  min-height: 0; display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 12px; align-items: stretch;
  position: relative; overflow: visible; border: 1px solid #eef2f7; border-radius: 8px; padding: 12px;
  background:
    radial-gradient(circle at 88px 50%, rgba(255,107,43,.10), transparent 24%),
    linear-gradient(180deg, #fbfcfe 0%, #fff 100%);
}
.hld-network-lines { display: none; }
.hld-network-center {
  width: auto; min-height: 100%; position: static; transform: none;
  display: grid; place-items: center; align-content: center; gap: 3px; border-radius: 8px; background: #0f172a; color: #fff;
  box-shadow: 0 18px 42px rgba(15,23,42,.24); z-index: 2; text-align: center; padding: 14px;
}
.hld-network-center b { font-size: 20px; font-weight: 950; line-height: 1; letter-spacing: 0; }
.hld-network-center span { color: #dbeafe; font-size: 13px; font-weight: 850; }
.hld-network-center em { color: #94a3b8; font-size: 10.5px; font-style: normal; font-weight: 800; }
.hld-network-node-grid { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hld-network-node {
  --node-color: #64748b;
  width: auto; min-height: 0; position: static; transform: none;
  display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 9px; align-items: start; z-index: 3;
  border: 1px solid #dbe4f0; border-left: 4px solid var(--node-color); background: rgba(255,255,255,.98); border-radius: 8px;
  padding: 10px; box-shadow: 0 10px 26px rgba(15,23,42,.09);
}
.hld-node-dot {
  width: 10px; height: 10px; border-radius: 999px; background: var(--node-color); margin-top: 5px;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--node-color) 16%, transparent);
}
.hld-network-node b { display: block; color: #0f172a; font-size: 12.5px; font-weight: 950; line-height: 1.22; overflow-wrap: anywhere; }
.hld-network-node em { display: block; color: #475569; font-size: 11px; font-style: normal; font-weight: 850; line-height: 1.25; margin-top: 4px; }
.hld-network-node small { display: block; color: #94a3b8; font-size: 10.5px; font-weight: 800; line-height: 1.25; margin-top: 4px; }
.hld-network-readout {
  min-width: 0; display: grid; gap: 9px; align-content: start; border: 1px solid #eef2f7; background: #fbfcfe; border-radius: 8px; padding: 10px;
}
.hld-net-stat {
  border: 1px solid #e2e8f0; background: #fff; border-radius: 8px; padding: 10px;
}
.hld-net-stat span { display: block; color: #94a3b8; font-size: 10.5px; font-weight: 900; text-transform: uppercase; }
.hld-net-stat b { display: block; color: #0f172a; font-size: 13px; font-weight: 950; line-height: 1.28; margin-top: 5px; overflow-wrap: anywhere; }
.hld-net-stat em { display: block; color: #64748b; font-size: 11.5px; font-style: normal; font-weight: 750; margin-top: 4px; overflow-wrap: anywhere; }
.hld-net-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.hld-net-tags i {
  display: inline-flex; align-items: center; min-height: 24px; border-radius: 999px; background: #eef2ff; color: #3730a3;
  padding: 3px 8px; font-size: 11px; font-style: normal; font-weight: 850;
}
.hld-partner-list { display: grid; gap: 8px; border: 1px solid #eef2f7; border-radius: 8px; padding: 10px; overflow: visible; background: #fbfcfe; }
.hld-partner-row {
  min-height: 92px; display: grid; grid-template-columns: minmax(260px, 1.05fr) minmax(320px, .95fr) minmax(220px, .62fr);
  align-items: stretch; gap: 10px; padding: 12px; background: #fff; border: 1px solid #e2e8f0; border-radius: 8px;
}
.hld-partner-main { min-width: 0; align-self: center; }
.hld-partner-main b { display: block; color: #0f172a; font-size: 13px; font-weight: 950; line-height: 1.28; overflow-wrap: anywhere; }
.hld-partner-main span { display: block; color: #64748b; font-size: 11.5px; font-weight: 750; line-height: 1.45; margin-top: 5px; overflow-wrap: anywhere; }
.hld-partner-rolebox {
  min-width: 0; display: grid; align-content: center; gap: 8px; border: 1px solid #eef2f7; background: #f8fafc; border-radius: 8px; padding: 10px;
}
.hld-partner-rolebox strong { color: #0f172a; font-size: 12px; font-weight: 950; line-height: 1.25; overflow-wrap: anywhere; }
.hld-partner-rolebars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.hld-partner-role {
  min-width: 0; display: grid; gap: 5px; border: 1px solid #e2e8f0; background: #fff; border-radius: 8px; padding: 8px;
}
.hld-partner-role span { color: #64748b; font-size: 10.5px; font-weight: 900; text-transform: uppercase; line-height: 1.15; }
.hld-partner-role b { color: #0f172a; font-size: 12px; font-weight: 950; line-height: 1.15; overflow-wrap: anywhere; }
.hld-partner-role i {
  display: block; min-width: 5%; max-width: 100%; height: 5px; border-radius: 999px; background: #2563eb;
}
.hld-partner-role--a i { background: #0f766e; }
.hld-partner-role--b i { background: #2563eb; }
.hld-partner-signals { min-width: 0; display: grid; grid-template-columns: 1fr; gap: 8px; }
.hld-partner-signals > div {
  min-width: 0; display: grid; align-content: center; gap: 4px; border: 1px solid #eef2f7; background: #fff; border-radius: 8px; padding: 9px 10px;
}
.hld-partner-signals span { color: #94a3b8; font-size: 10.5px; font-weight: 900; text-transform: uppercase; line-height: 1.1; }
.hld-partner-signals b { color: #0f172a; font-size: 12px; font-weight: 950; line-height: 1.25; overflow-wrap: anywhere; }
.hld-partner-signals .is-risk { border-color: #fed7aa; background: #fff7ed; }
.hld-partner-signals .is-risk b { color: #c2410c; }
.hld-partner-signals .is-fee { border-color: #bfdbfe; background: #eff6ff; }
.hld-partner-signals .is-fee b { color: #1d4ed8; }
.hld-partner-signals .is-clear { border-color: #bbf7d0; background: #f0fdf4; }
.hld-partner-signals .is-clear b { color: #0f766e; }
.hld-partner-detail-view { display: grid; gap: 12px; }
.hld-partner-overview {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center;
  border: 1px solid #dbe4f0; background: linear-gradient(180deg,#fff 0%,#fbfcfe 100%);
  border-radius: 8px; padding: 16px; box-shadow: 0 1px 2px rgba(15,23,42,.05);
}
.hld-partner-overview > div:first-child { min-width: 0; }
.hld-partner-overview span {
  display: inline-flex; align-items: center; gap: 6px; color: #ff6b2b; font-size: 11px; font-weight: 900; text-transform: uppercase;
}
.hld-partner-overview h2 { margin: 6px 0 0; color: #0f172a; font-size: 20px; font-weight: 950; line-height: 1.22; overflow-wrap: anywhere; }
.hld-partner-overview p { margin: 6px 0 0; color: #475569; font-size: 12.5px; font-weight: 700; line-height: 1.55; overflow-wrap: anywhere; }
.hld-partner-overview-stats { display: grid; grid-template-columns: repeat(3, minmax(92px, 1fr)); gap: 8px; }
.hld-partner-overview-stats div {
  min-height: 68px; min-width: 0; display: grid; align-content: center; gap: 3px;
  border: 1px solid #e2e8f0; background: #fff; border-radius: 8px; padding: 10px 12px;
}
.hld-partner-overview-stats b { color: #0f172a; font-size: 22px; font-weight: 950; line-height: 1; }
.hld-partner-overview-stats span { color: #64748b; font-size: 10.5px; line-height: 1.2; }
.hld-partner-detail-list { display: grid; gap: 12px; }
.hld-partner-detail-card {
  border: 1px solid #dbe4f0; background: #fff; border-radius: 8px; padding: 14px; box-shadow: 0 1px 2px rgba(15,23,42,.05);
}
.hld-partner-detail-head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; padding-bottom: 11px; border-bottom: 1px solid #eef2f7;
}
.hld-partner-detail-head > div:first-child { min-width: 0; }
.hld-partner-detail-head span { color: #94a3b8; font-size: 10.5px; font-weight: 900; text-transform: uppercase; }
.hld-partner-detail-head h3 { margin: 4px 0 0; color: #0f172a; font-size: 15px; font-weight: 950; line-height: 1.3; overflow-wrap: anywhere; }
.hld-partner-detail-head p { margin: 5px 0 0; color: #475569; font-size: 12px; font-weight: 750; line-height: 1.45; overflow-wrap: anywhere; }
.hld-partner-detail-score {
  min-width: 86px; display: grid; justify-items: center; align-content: center; gap: 2px;
  border: 1px solid #fed7aa; background: #fff7ed; border-radius: 8px; padding: 8px 10px;
}
.hld-partner-detail-score b { color: #c2410c; font-size: 22px; font-weight: 950; line-height: 1; }
.hld-partner-detail-score span { color: #9a3412; font-size: 10.5px; font-weight: 850; text-transform: none; }
.hld-partner-ai-strip {
  display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px; align-items: start;
  border: 1px solid #fed7aa; background: #fffaf5; border-radius: 8px; padding: 9px 10px; margin-top: 10px;
}
.hld-partner-ai-strip > svg { width: 28px; height: 28px; padding: 6px; border-radius: 8px; color: #ea580c; background: #ffedd5; }
.hld-partner-ai-strip b { display: block; color: #9a3412; font-size: 11.5px; font-weight: 900; }
.hld-partner-ai-strip span { display: block; color: #334155; font-size: 12px; font-weight: 700; line-height: 1.45; margin-top: 2px; overflow-wrap: anywhere; }
.hld-partner-mini-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.hld-partner-mini-metrics div {
  min-width: 0; display: grid; gap: 5px; border: 1px solid #eef2f7; background: #fbfcfe; border-radius: 8px; padding: 8px 9px;
}
.hld-partner-mini-metrics span { color: #64748b; font-size: 10.5px; font-weight: 900; text-transform: uppercase; }
.hld-partner-mini-metrics b { color: #0f172a; font-size: 12.5px; font-weight: 950; line-height: 1.15; overflow-wrap: anywhere; }
.hld-partner-mini-metrics i { display: block; min-width: 5%; max-width: 100%; height: 5px; border-radius: 999px; background: #0f766e; }
.hld-partner-mini-metrics div:nth-child(2) i { background: #2563eb; }
.hld-partner-mini-metrics div:nth-child(3) i { background: #ff6b2b; }
.hld-partner-contracts { display: grid; gap: 9px; margin-top: 12px; }
.hld-card-more, .hld-dashboard-more, .hld-focus-action {
  min-width: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
  border: 1px solid #dbe4f0; background: #f8fafc; border-radius: 8px; padding: 9px 10px;
  color: #475569; font-size: 11.5px; font-weight: 750; line-height: 1.45;
}
.hld-card-more button, .hld-dashboard-more button {
  min-height: 30px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid #bfdbfe; background: #fff; color: #1d4ed8; border-radius: 7px; padding: 5px 9px;
  font: inherit; font-weight: 900; cursor: pointer;
}
.hld-card-more button:hover, .hld-dashboard-more button:hover { background: #eff6ff; border-color: #93c5fd; }
.hld-dashboard-more { justify-content: center; background: #fff; }
.hld-partner-contract {
  min-width: 0; border: 1px solid #e2e8f0; border-left: 4px solid #cbd5e1; background: #fff; border-radius: 8px; padding: 11px;
}
.hld-partner-contract--risk { border-left-color: #dc2626; background: linear-gradient(90deg,#fff7f7 0%,#fff 34%); }
.hld-partner-contract--watch { border-left-color: #f97316; background: linear-gradient(90deg,#fff7ed 0%,#fff 34%); }
.hld-partner-contract--clear { border-left-color: #16a34a; }
.hld-partner-contract-head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: start; margin-bottom: 8px;
}
.hld-partner-contract-head b { display: block; color: #0f172a; font-size: 13px; font-weight: 950; line-height: 1.3; overflow-wrap: anywhere; }
.hld-partner-contract-head span { display: block; color: #64748b; font-size: 11.5px; font-weight: 750; line-height: 1.35; margin-top: 3px; overflow-wrap: anywhere; }
.hld-open-contract {
  min-height: 30px; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  border: 1px solid #e2e8f0; background: #fff; color: #334155; border-radius: 8px; padding: 6px 9px;
  font: inherit; font-size: 11.5px; font-weight: 850; cursor: pointer; white-space: nowrap;
}
.hld-open-contract:hover { color: #ff6b2b; border-color: #ffd0bd; background: #fff7ed; }
.hld-partner-contract-facts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 9px; }
.hld-partner-contract-facts span {
  min-height: 25px; display: inline-flex; align-items: center; gap: 5px; border: 1px solid #e2e8f0; background: #f8fafc;
  color: #334155; border-radius: 8px; padding: 4px 8px; font-size: 11.5px; font-weight: 800;
}
.hld-partner-contract-facts .is-risk { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.hld-partner-contract-facts .is-watch { color: #c2410c; background: #fff7ed; border-color: #fed7aa; }
.hld-partner-contract-facts .is-clear { color: #047857; background: #ecfdf5; border-color: #bbf7d0; }
.hld-duty-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.hld-duty-card {
  min-width: 0; border: 1px solid #eef2f7; background: #fbfcfe; border-radius: 8px; padding: 9px 10px;
}
.hld-duty-card--vinatti { border-top: 3px solid #0f766e; }
.hld-duty-card--partner { border-top: 3px solid #2563eb; }
.hld-duty-card--helen { border-top: 3px solid #ff6b2b; background: #fffaf5; }
.hld-duty-card > span { display: block; color: #64748b; font-size: 10.5px; font-weight: 950; text-transform: uppercase; margin-bottom: 6px; }
.hld-duty-card ul { margin: 0; padding: 0; display: grid; gap: 6px; list-style: none; }
.hld-duty-card li {
  position: relative; color: #0f172a; font-size: 12px; font-weight: 700; line-height: 1.42; overflow: visible; overflow-wrap: anywhere; word-break: break-word; white-space: normal; padding-left: 12px;
}
.hld-duty-card li::before {
  content: ""; position: absolute; left: 0; top: .62em; width: 5px; height: 5px; border-radius: 999px; background: #94a3b8;
}
.hld-duty-card li.is-empty { color: #94a3b8; font-weight: 650; }
/* AI-MARK[QAI-UI:helen-focused-contract-cards] 2026-07-13 13:53 (GMT+7) — decision strip + evidence rail dùng chung cho các tab nghiệp vụ: card nêu kết luận trước, nguồn pháp lý xuất hiện một lần để tránh trùng lặp/quá tải. | rel: helen.js, UI-L4-Helen */
.hld-ai-digest {
  min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px;
}
.hld-ai-point {
  min-width: 0; display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 8px; align-items: start;
  border: 1px solid #e2e8f0; border-top: 3px solid #cbd5e1; background: #fff; border-radius: 8px; padding: 9px;
}
.hld-ai-point > svg {
  width: 24px; height: 24px; padding: 5px; border-radius: 8px; color: #64748b; background: #f1f5f9;
}
.hld-ai-point b { display: block; color: #0f172a; font-size: 11px; font-weight: 950; text-transform: uppercase; line-height: 1.25; }
.hld-ai-point span {
  display: block; color: #334155; font-size: 12px; font-weight: 700; line-height: 1.45; margin-top: 3px;
  overflow: visible; overflow-wrap: anywhere; word-break: break-word; white-space: normal;
}
.hld-ai-point--green { border-top-color: #0f766e; background: #f8fffb; }
.hld-ai-point--green > svg { color: #047857; background: #ecfdf5; }
.hld-ai-point--blue { border-top-color: #2563eb; background: #f8fbff; }
.hld-ai-point--blue > svg { color: #1d4ed8; background: #eff6ff; }
.hld-ai-point--purple { border-top-color: #7c3aed; background: #fbf7ff; }
.hld-ai-point--purple > svg { color: #7c3aed; background: #f3e8ff; }
.hld-ai-point--watch, .hld-ai-point--unknown { border-top-color: #ff6b2b; background: #fffaf5; }
.hld-ai-point--watch > svg, .hld-ai-point--unknown > svg { color: #ea580c; background: #ffedd5; }
.hld-ai-point--risk { border-top-color: #dc2626; background: #fff7f7; }
.hld-ai-point--risk > svg { color: #dc2626; background: #fef2f2; }
.hld-ai-point--clear, .hld-ai-point--vinatti { border-top-color: #16a34a; background: #f8fffb; }
.hld-ai-point--clear > svg, .hld-ai-point--vinatti > svg { color: #047857; background: #ecfdf5; }
.hld-ai-point--partner { border-top-color: #2563eb; background: #f8fbff; }
.hld-ai-point--partner > svg { color: #1d4ed8; background: #eff6ff; }
.hld-decision-strip {
  min-width: 0; display: grid; grid-template-columns: minmax(260px, 1.1fr) minmax(220px, .95fr) minmax(220px, .95fr);
  gap: 8px; margin-top: 10px; border: 1px solid #fed7aa; background: linear-gradient(180deg,#fffaf5 0%,#fff 100%);
  border-radius: 10px; padding: 9px;
}
.hld-decision-strip--clear, .hld-decision-strip--strong { border-color: #bbf7d0; background: linear-gradient(180deg,#f8fffb 0%,#fff 100%); }
.hld-decision-strip--risk { border-color: #fecaca; background: linear-gradient(180deg,#fff7f7 0%,#fff 100%); }
.hld-decision-lead, .hld-decision-cell {
  min-width: 0; border: 1px solid rgba(226,232,240,.9); background: rgba(255,255,255,.82); border-radius: 8px; padding: 9px;
}
.hld-decision-lead { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px; align-items: start; }
.hld-decision-lead > svg {
  width: 28px; height: 28px; padding: 6px; border-radius: 9px; color: #ea580c; background: #ffedd5;
}
.hld-decision-strip--clear .hld-decision-lead > svg, .hld-decision-strip--strong .hld-decision-lead > svg { color: #047857; background: #ecfdf5; }
.hld-decision-strip--risk .hld-decision-lead > svg { color: #dc2626; background: #fef2f2; }
.hld-decision-lead b, .hld-decision-cell b {
  display: block; color: #0f172a; font-size: 10.5px; font-weight: 950; line-height: 1.2; text-transform: uppercase; letter-spacing: .01em;
}
.hld-decision-lead span, .hld-decision-cell span {
  display: block; color: #334155; font-size: 12px; font-weight: 760; line-height: 1.45; margin-top: 4px;
  overflow: visible; overflow-wrap: anywhere; word-break: break-word; white-space: normal;
}
.hld-evidence-rail {
  min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center;
  border: 1px solid #bfdbfe; background: #eff6ff; border-radius: 9px; padding: 9px 10px;
}
.hld-evidence-rail > div {
  min-width: 0; display: grid; grid-template-columns: 22px auto minmax(0, 1fr); gap: 7px; align-items: center;
}
.hld-evidence-rail svg { color: #2563eb; }
.hld-evidence-rail b { color: #1e3a8a; font-size: 11.5px; font-weight: 950; line-height: 1.2; white-space: nowrap; }
.hld-evidence-rail > div > div { min-width: 0; display: flex; flex-wrap: wrap; gap: 5px; }
.hld-evidence-rail span {
  display: inline-flex; max-width: 100%; border: 1px solid #bfdbfe; background: #fff; color: #1e40af; border-radius: 999px;
  padding: 3px 7px; font-size: 11px; font-weight: 820; line-height: 1.25; overflow-wrap: anywhere; white-space: normal;
}
.hld-evidence-rail em { color: #64748b; font-size: 11.5px; font-style: normal; font-weight: 760; line-height: 1.35; }
.hld-evidence-rail small {
  grid-column: 1 / -1; color: #64748b; font-size: 11px; font-weight: 750; line-height: 1.35;
}
.hld-evidence-rail .hld-open-contract { background: #fff; }
.hld-commercial-view { display: grid; gap: 12px; }
.hld-commercial-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(420px, .86fr); gap: 16px; align-items: stretch;
  border: 1px solid #dbe4f0; background: linear-gradient(180deg,#fff 0%,#fbfcfe 100%);
  border-radius: 8px; padding: 16px; box-shadow: 0 1px 2px rgba(15,23,42,.05);
}
.hld-commercial-hero > div:first-child { min-width: 0; align-self: center; }
.hld-commercial-hero span {
  display: inline-flex; align-items: center; gap: 6px; color: #ff6b2b; font-size: 11px; font-weight: 900; text-transform: uppercase;
}
.hld-commercial-hero h2 { margin: 6px 0 0; color: #0f172a; font-size: 21px; font-weight: 950; line-height: 1.22; overflow-wrap: anywhere; }
.hld-commercial-hero p { margin: 7px 0 0; color: #475569; font-size: 12.5px; font-weight: 700; line-height: 1.55; overflow-wrap: anywhere; }
.hld-commercial-scoreboard { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-content: center; }
.hld-commercial-pill {
  min-width: 0; min-height: 58px; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 8px;
  border: 1px solid #e2e8f0; background: #fff; border-radius: 8px; padding: 9px 10px;
}
.hld-commercial-pill svg { width: 28px; height: 28px; padding: 6px; border-radius: 8px; background: #f1f5f9; color: #64748b; }
.hld-commercial-pill span { min-width: 0; color: #64748b; font-size: 10.5px; font-weight: 900; line-height: 1.2; }
.hld-commercial-pill b { color: #0f172a; font-size: 20px; font-weight: 950; line-height: 1; }
.hld-commercial-pill--green svg { background: #ecfdf5; color: #047857; }
.hld-commercial-pill--blue svg { background: #eff6ff; color: #1d4ed8; }
.hld-commercial-pill--amber svg { background: #fff7ed; color: #ea580c; }
.hld-commercial-pill--red svg { background: #fef2f2; color: #dc2626; }
.hld-commercial-summary-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(360px, .9fr); gap: 12px; }
.hld-commercial-helen-panel .hld-insight { padding-top: 1px; padding-bottom: 1px; }
.hld-commercial-list-wrap { display: grid; gap: 12px; }
.hld-commercial-card {
  border: 1px solid #dbe4f0; border-left: 4px solid #cbd5e1; background: #fff; border-radius: 8px; padding: 14px;
  box-shadow: 0 1px 2px rgba(15,23,42,.05);
}
.hld-commercial-card--risk { border-left-color: #dc2626; background: linear-gradient(90deg,#fff7f7 0%,#fff 26%); }
.hld-commercial-card--watch { border-left-color: #ff6b2b; background: linear-gradient(90deg,#fffaf5 0%,#fff 26%); }
.hld-commercial-card--clear { border-left-color: #16a34a; }
.hld-commercial-card-head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; padding-bottom: 10px; border-bottom: 1px solid #eef2f7;
}
.hld-commercial-card-head > div { min-width: 0; }
.hld-commercial-card-head span { color: #94a3b8; font-size: 10.5px; font-weight: 900; text-transform: uppercase; }
.hld-commercial-card-head h3 { margin: 4px 0 0; color: #0f172a; font-size: 15px; font-weight: 950; line-height: 1.3; overflow-wrap: anywhere; }
.hld-commercial-card-head p { margin: 5px 0 0; color: #475569; font-size: 12px; font-weight: 750; line-height: 1.45; overflow-wrap: anywhere; }
.hld-commercial-ai-read {
  display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px; align-items: start;
  border: 1px solid #fed7aa; background: #fffaf5; border-radius: 8px; padding: 9px 10px; margin-top: 10px;
}
.hld-commercial-ai-read > svg { width: 28px; height: 28px; padding: 6px; border-radius: 8px; color: #ea580c; background: #ffedd5; }
.hld-commercial-ai-read b { display: block; color: #9a3412; font-size: 11.5px; font-weight: 900; }
.hld-commercial-ai-read span { display: block; color: #334155; font-size: 12px; font-weight: 700; line-height: 1.45; margin-top: 2px; overflow-wrap: anywhere; }
.hld-commercial-facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.hld-commercial-facts span {
  min-height: 26px; display: inline-flex; align-items: center; gap: 5px; border: 1px solid #e2e8f0; background: #f8fafc;
  color: #334155; border-radius: 8px; padding: 4px 8px; font-size: 11.5px; font-weight: 850;
}
.hld-commercial-facts .is-vinatti { color: #047857; background: #ecfdf5; border-color: #bbf7d0; }
.hld-commercial-facts .is-partner { color: #1d4ed8; background: #eff6ff; border-color: #bfdbfe; }
.hld-commercial-facts .is-unknown, .hld-commercial-facts .is-watch { color: #c2410c; background: #fff7ed; border-color: #fed7aa; }
.hld-commercial-facts .is-risk { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.hld-commercial-facts .is-clear { color: #047857; background: #ecfdf5; border-color: #bbf7d0; }
.hld-commercial-grid { display: grid; gap: 10px; margin-top: 11px; }
.hld-commercial-secondary-grid { display: grid; grid-template-columns: minmax(260px, .9fr) minmax(300px, 1fr); gap: 10px; }
.hld-commercial-box {
  min-width: 0; border: 1px solid #eef2f7; background: #fbfcfe; border-radius: 8px; padding: 10px; display: grid; align-content: start; gap: 9px;
}
.hld-commercial-box > div:first-child { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: #0f172a; font-size: 12px; font-weight: 950; }
.hld-commercial-box > div:first-child svg { color: #ff6b2b; }
.hld-commercial-box > div:first-child span { color: #64748b; font-size: 11px; font-weight: 850; }
.hld-commercial-box > strong { color: #0f172a; font-size: 14px; font-weight: 950; line-height: 1.25; overflow-wrap: anywhere; }
.hld-commercial-box > p { margin: 0; color: #64748b; font-size: 12px; font-weight: 700; line-height: 1.45; overflow-wrap: anywhere; }
.hld-commercial-box--provider { border-top: 3px solid #0f766e; }
.hld-commercial-box--fees { border-top: 3px solid #2563eb; background: #f8fbff; }
.hld-commercial-box--fees-focus { padding: 13px; box-shadow: inset 0 0 0 1px rgba(37,99,235,.06); }
.hld-commercial-box--penalty { border-top: 3px solid #ff6b2b; background: #fffaf5; }
.hld-commercial-empty {
  min-height: 40px; display: flex; align-items: center; gap: 7px; color: #94a3b8; font-size: 12px; font-weight: 750; line-height: 1.45;
  border: 1px dashed #dbe4f0; background: rgba(255,255,255,.72); border-radius: 8px; padding: 9px;
}
.hld-commercial-fee-table { display: grid; gap: 9px; }
.hld-commercial-fee-row {
  min-width: 0; display: grid; gap: 10px; border: 1px solid #dbe4f0; background: #fff; border-radius: 8px; padding: 11px;
}
.hld-commercial-fee-row.is-unclear { border-color: #fed7aa; background: #fff7ed; }
.hld-commercial-fee-head { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(110px, auto); gap: 12px; align-items: start; }
.hld-commercial-fee-head div { min-width: 0; }
.hld-commercial-fee-head span, .hld-commercial-fee-facts span { display: block; color: #64748b; font-size: 10.5px; font-weight: 900; text-transform: uppercase; }
.hld-commercial-fee-head b { display: block; color: #0f172a; font-size: 13px; font-weight: 950; line-height: 1.35; margin-top: 3px; overflow-wrap: anywhere; }
.hld-commercial-fee-head strong { color: #c2410c; font-size: 16px; font-weight: 950; line-height: 1.25; text-align: right; overflow-wrap: anywhere; }
.hld-commercial-fee-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 7px; }
.hld-commercial-fee-facts div { min-width: 0; border: 1px solid #eef2f7; background: #fbfcfe; border-radius: 7px; padding: 7px 8px; }
.hld-commercial-fee-facts b { display: block; color: #334155; font-size: 11.5px; font-weight: 850; line-height: 1.38; margin-top: 3px; overflow-wrap: anywhere; }
.hld-commercial-fee-condition { display: grid; gap: 3px; margin: 0; border-left: 3px solid #93c5fd; padding-left: 9px; color: #334155; font-size: 12px; font-weight: 700; line-height: 1.5; overflow-wrap: anywhere; }
.hld-commercial-fee-condition b { color: #1d4ed8; font-size: 11px; font-weight: 950; text-transform: uppercase; }
.hld-commercial-fee-row small { display: block; color: #64748b; font-size: 11px; font-weight: 750; line-height: 1.45; overflow: visible; overflow-wrap: anywhere; word-break: break-word; white-space: normal; }
.hld-commercial-fee-row small b { color: #475569; font-size: 10.5px; font-weight: 950; text-transform: uppercase; margin-right: 6px; }
.hld-commercial-fee-clauses { display: grid; gap: 7px; padding-top: 2px; }
.hld-commercial-fee-clauses > b { color: #1d4ed8; font-size: 11.5px; font-weight: 950; }
.hld-focus-action { border-color: #bfdbfe; background: #eff6ff; }
.hld-focus-action .hld-open-contract { margin-left: auto; background: #fff; }
.hld-commercial-list { margin: 0; padding: 0; display: grid; gap: 6px; list-style: none; }
.hld-commercial-list li {
  position: relative; color: #0f172a; font-size: 12px; font-weight: 700; line-height: 1.45; overflow: visible; overflow-wrap: anywhere; word-break: break-word; white-space: normal; padding-left: 13px;
}
.hld-commercial-list li::before {
  content: ""; position: absolute; left: 0; top: .62em; width: 5px; height: 5px; border-radius: 999px; background: #94a3b8;
}
.hld-commercial-list--fee li::before { background: #2563eb; }
.hld-commercial-list--provider li::before { background: #0f766e; }
.hld-commercial-list--penalty li::before { background: #ff6b2b; }
.hld-commercial-list--helen li::before { background: #b45309; }
.hld-sla-view { display: grid; gap: 12px; }
.hld-sla-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(420px, .86fr); gap: 16px; align-items: stretch;
  border: 1px solid #dbe4f0; background: linear-gradient(180deg,#fff 0%,#fbfcfe 100%);
  border-radius: 8px; padding: 16px; box-shadow: 0 1px 2px rgba(15,23,42,.05);
}
.hld-sla-hero > div:first-child { min-width: 0; align-self: center; }
.hld-sla-hero span { display: inline-flex; align-items: center; gap: 6px; color: #ff6b2b; font-size: 11px; font-weight: 900; text-transform: uppercase; }
.hld-sla-hero h2 { margin: 6px 0 0; color: #0f172a; font-size: 21px; font-weight: 950; line-height: 1.22; overflow-wrap: anywhere; }
.hld-sla-hero p { margin: 7px 0 0; color: #475569; font-size: 12.5px; font-weight: 700; line-height: 1.55; overflow-wrap: anywhere; }
.hld-sla-scoreboard { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-content: center; }
.hld-sla-pill {
  min-width: 0; min-height: 58px; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 8px;
  border: 1px solid #e2e8f0; background: #fff; border-radius: 8px; padding: 9px 10px;
}
.hld-sla-pill svg { width: 28px; height: 28px; padding: 6px; border-radius: 8px; background: #f1f5f9; color: #64748b; }
.hld-sla-pill span { min-width: 0; color: #64748b; font-size: 10.5px; font-weight: 900; line-height: 1.2; }
.hld-sla-pill b { color: #0f172a; font-size: 20px; font-weight: 950; line-height: 1; }
.hld-sla-pill--green svg { background: #ecfdf5; color: #047857; }
.hld-sla-pill--blue svg { background: #eff6ff; color: #1d4ed8; }
.hld-sla-pill--amber svg { background: #fff7ed; color: #ea580c; }
.hld-sla-pill--red svg { background: #fef2f2; color: #dc2626; }
.hld-sla-summary-grid { display: grid; grid-template-columns: minmax(0, .92fr) minmax(420px, 1.08fr); gap: 12px; }
.hld-sla-list-wrap { display: grid; gap: 12px; }
.hld-sla-card {
  border: 1px solid #dbe4f0; border-left: 4px solid #cbd5e1; background: #fff; border-radius: 8px; padding: 14px;
  box-shadow: 0 1px 2px rgba(15,23,42,.05);
}
.hld-sla-card--strong { border-left-color: #0f766e; background: linear-gradient(90deg,#f0fdfa 0%,#fff 24%); }
.hld-sla-card--clear { border-left-color: #16a34a; }
.hld-sla-card--watch { border-left-color: #ff6b2b; background: linear-gradient(90deg,#fffaf5 0%,#fff 24%); }
.hld-sla-card--risk { border-left-color: #dc2626; background: linear-gradient(90deg,#fff7f7 0%,#fff 24%); }
.hld-sla-card-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; padding-bottom: 10px; border-bottom: 1px solid #eef2f7; }
.hld-sla-card-head > div { min-width: 0; }
.hld-sla-card-head span { color: #94a3b8; font-size: 10.5px; font-weight: 900; text-transform: uppercase; }
.hld-sla-card-head h3 { margin: 4px 0 0; color: #0f172a; font-size: 15px; font-weight: 950; line-height: 1.3; overflow-wrap: anywhere; }
.hld-sla-card-head p { margin: 5px 0 0; color: #475569; font-size: 12px; font-weight: 750; line-height: 1.45; overflow-wrap: anywhere; }
.hld-sla-ai-read {
  display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px; align-items: start;
  border: 1px solid #fed7aa; background: #fffaf5; border-radius: 8px; padding: 9px 10px; margin-top: 10px;
}
.hld-sla-ai-read > svg { width: 28px; height: 28px; padding: 6px; border-radius: 8px; color: #ea580c; background: #ffedd5; }
.hld-sla-ai-read b { display: block; color: #9a3412; font-size: 11.5px; font-weight: 900; }
.hld-sla-ai-read span { display: block; color: #334155; font-size: 12px; font-weight: 700; line-height: 1.45; margin-top: 2px; overflow-wrap: anywhere; }
.hld-sla-facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.hld-sla-facts span {
  min-height: 26px; display: inline-flex; align-items: center; gap: 5px; border: 1px solid #e2e8f0; background: #f8fafc;
  color: #334155; border-radius: 8px; padding: 4px 8px; font-size: 11.5px; font-weight: 850;
}
.hld-sla-facts .is-strong, .hld-sla-facts .is-clear, .hld-sla-facts .is-vinatti { color: #047857; background: #ecfdf5; border-color: #bbf7d0; }
.hld-sla-facts .is-partner { color: #1d4ed8; background: #eff6ff; border-color: #bfdbfe; }
.hld-sla-facts .is-watch, .hld-sla-facts .is-unknown { color: #c2410c; background: #fff7ed; border-color: #fed7aa; }
.hld-sla-facts .is-risk { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
/* AI-MARK[QAI-UI:helen-sla-focus] 2026-07-13 08:52 (GMT+7) — bố cục SLA ưu tiên mốc/phản hồi toàn chiều ngang nhưng chỉ hiển thị căn cứ trọng tâm; phần còn lại mở về hồ sơ gốc để tránh quá tải. | rel: QAI-UI:helen-focused-contract-cards */
.hld-sla-grid { display: grid; gap: 10px; margin-top: 11px; }
.hld-sla-secondary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.hld-sla-box { min-width: 0; border: 1px solid #eef2f7; background: #fbfcfe; border-radius: 8px; padding: 10px; display: grid; align-content: start; gap: 9px; }
.hld-sla-box > div:first-child { display: inline-flex; align-items: center; gap: 6px; color: #0f172a; font-size: 12px; font-weight: 950; }
.hld-sla-box > div:first-child svg { color: #ff6b2b; }
.hld-sla-box > strong { color: #0f172a; font-size: 14px; font-weight: 950; line-height: 1.25; overflow-wrap: anywhere; }
.hld-sla-box > p { margin: 0; color: #64748b; font-size: 12px; font-weight: 700; line-height: 1.45; overflow-wrap: anywhere; }
.hld-sla-box--owner { border-top: 3px solid #0f766e; }
.hld-sla-box--time { border-top: 3px solid #2563eb; background: #f8fbff; }
.hld-sla-box--time-focus { padding: 12px; }
.hld-sla-box--ops { border-top: 3px solid #7c3aed; }
.hld-sla-box--risk { border-top: 3px solid #ff6b2b; background: #fffaf5; }
.hld-sla-empty {
  min-height: 40px; display: flex; align-items: center; gap: 7px; color: #94a3b8; font-size: 12px; font-weight: 750; line-height: 1.45;
  border: 1px dashed #dbe4f0; background: rgba(255,255,255,.72); border-radius: 8px; padding: 9px;
}
.hld-sla-timeline { display: flex; flex-wrap: wrap; gap: 6px; }
.hld-sla-timeline span {
  min-height: 26px; display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; border: 1px solid #bfdbfe;
  background: #eff6ff; color: #1d4ed8; padding: 4px 8px; font-size: 11.5px; font-weight: 850; overflow-wrap: anywhere; white-space: normal;
}
.hld-sla-list { margin: 0; padding: 0; display: grid; gap: 6px; list-style: none; }
.hld-sla-list li { position: relative; overflow: visible; color: #0f172a; font-size: 12px; font-weight: 700; line-height: 1.5; overflow-wrap: anywhere; word-break: break-word; white-space: normal; padding-left: 13px; }
.hld-sla-list li::before { content: ""; position: absolute; left: 0; top: .62em; width: 5px; height: 5px; border-radius: 999px; background: #94a3b8; }
.hld-sla-list--owner li::before { background: #0f766e; }
.hld-sla-list--time li::before { background: #2563eb; }
.hld-sla-list--ops li::before { background: #7c3aed; }
.hld-sla-list--risk li::before { background: #ff6b2b; }
@media (max-width: 1180px) {
  .hld-partner-row { grid-template-columns: 1fr; }
  .hld-partner-signals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hld-partner-overview { grid-template-columns: 1fr; }
  .hld-partner-overview-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hld-duty-grid { grid-template-columns: 1fr; }
  .hld-ai-digest { grid-template-columns: 1fr; }
  .hld-decision-strip { grid-template-columns: 1fr; }
  .hld-evidence-rail { grid-template-columns: 1fr; align-items: start; }
  .hld-evidence-rail > div { grid-template-columns: 22px minmax(0, auto) minmax(0, 1fr); }
  .hld-commercial-hero, .hld-commercial-summary-grid, .hld-commercial-secondary-grid { grid-template-columns: 1fr; }
  .hld-commercial-scoreboard { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hld-sla-hero, .hld-sla-summary-grid { grid-template-columns: 1fr; }
  .hld-sla-secondary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hld-sla-scoreboard { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.hld-insights { display: grid; gap: 10px; }
.hld-insight {
  display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 9px; align-items: start;
  border-left: 3px solid #cbd5e1; padding: 2px 0 2px 10px;
}
.hld-insight > svg { margin-top: 2px; color: #64748b; }
.hld-insight b { display: block; color: #0f172a; font-size: 12.5px; font-weight: 900; }
.hld-insight span { display: block; color: #475569; font-size: 12px; font-weight: 650; line-height: 1.5; margin-top: 3px; overflow-wrap: anywhere; }
.hld-insight--green { border-left-color: #0f766e; }
.hld-insight--green > svg { color: #0f766e; }
.hld-insight--blue { border-left-color: #2563eb; }
.hld-insight--blue > svg { color: #2563eb; }
.hld-insight--amber { border-left-color: #f59e0b; }
.hld-insight--amber > svg { color: #b45309; }
.hld-insight--red { border-left-color: #dc2626; }
.hld-insight--red > svg { color: #dc2626; }
.hld-empty-line { color: #94a3b8; font-size: 12.5px; font-weight: 750; padding: 10px 0; }

/* AI-MARK[QAI-UI:helen-law-library] 2026-07-31 15:39 (GMT+7) — tab Thư viện Luật dùng một command surface; "Rà soát sâu toàn kho" là primary action duy nhất, không còn nút scan-all cũ. | rel: helen.js QAI-UI:helen-multilaw-review */
.hll-workspace { display: grid; gap: 12px; color: #0f172a; }
.hll-command {
  display: grid; grid-template-columns: minmax(0, .95fr) minmax(520px, 1.05fr); gap: 14px; align-items: stretch;
  border: 1px solid #dbe4f0; border-radius: 10px; background: #fff; padding: 14px; box-shadow: 0 1px 2px rgba(15,23,42,.05);
}
.hll-command-main {
  min-width: 0; border-radius: 8px; padding: 16px; background:
    linear-gradient(135deg, rgba(15,23,42,.98) 0%, rgba(30,41,59,.96) 100%);
  color: #fff; display: grid; align-content: center; gap: 10px;
}
.hll-kicker { display: inline-flex; align-items: center; gap: 7px; color: #fed7aa; font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .03em; }
.hll-command-main h1 { margin: 0; color: #fff; font-size: 30px; line-height: 1.06; font-weight: 950; letter-spacing: 0; overflow-wrap: anywhere; }
.hll-command-main p { margin: 0; color: #dbe4f0; font-size: 13px; font-weight: 650; line-height: 1.55; max-width: 720px; }
.hll-proof-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 4px; }
.hll-proof-row span {
  display: inline-flex; align-items: center; gap: 6px; min-height: 28px; border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px; background: rgba(255,255,255,.08); color: #fff; padding: 4px 9px; font-size: 11.5px; font-weight: 850;
}
.hll-proof-row svg { color: #fdba74; }
.hll-command-panel { min-width: 0; display: grid; gap: 10px; align-content: start; }
.hll-search {
  min-width: 0; min-height: 44px; display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center;
  border: 1px solid #dbe4f0; border-radius: 8px; background: #fbfcfe; padding: 0 11px; color: #94a3b8;
}
.hll-search input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: #0f172a; font: 750 13px/1.2 "Be Vietnam Pro", sans-serif; }
.hll-search:focus-within { border-color: #fdba74; background: #fff; box-shadow: 0 0 0 3px rgba(255,107,43,.10); }
.hll-command-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.hll-btn, .hll-mini {
  min-width: 0; min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid #dbe4f0; border-radius: 8px; background: #fff; color: #334155; cursor: pointer;
  font: 850 12.5px/1.2 "Be Vietnam Pro", sans-serif; text-decoration: none; transition: .15s ease;
}
.hll-btn:hover, .hll-mini:hover { border-color: #fed7aa; background: #fff7ed; color: #c2410c; transform: translateY(-1px); }
.hll-btn--primary, .hll-mini--primary { border-color: #ff6b2b; background: #ff6b2b; color: #fff; box-shadow: 0 10px 20px rgba(255,107,43,.18); }
.hll-btn--primary:hover, .hll-mini--primary:hover { background: #f05f22; color: #fff; border-color: #f05f22; }
.hll-mini--success { border-color: #bbf7d0; background: #ecfdf5; color: #047857; }
.hll-mini--success:hover { border-color: #86efac; background: #dcfce7; color: #065f46; }
.hll-btn--primary.is-active { border-color: #ea580c; background: #f97316; color: #fff; }
.hll-btn b {
  min-width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; background: rgba(15,23,42,.08); color: inherit; font-size: 10.5px; font-weight: 950;
}
.hll-btn:disabled, .hll-mini:disabled { opacity: .6; cursor: wait; transform: none; }
.hll-spin { animation: hlx-spin 1s linear infinite; }
.hll-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.hll-metric {
  min-width: 0; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 3px 8px; align-items: center;
  border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; padding: 9px;
}
.hll-metric svg { grid-row: 1 / 4; width: 28px; height: 28px; border-radius: 8px; padding: 6px; background: #f1f5f9; color: #475569; }
.hll-metric strong { color: #0f172a; font-size: 22px; font-weight: 950; line-height: 1; }
.hll-metric span { color: #334155; font-size: 11.5px; font-weight: 900; line-height: 1.2; overflow-wrap: anywhere; }
.hll-metric small { color: #94a3b8; font-size: 10.5px; font-weight: 750; line-height: 1.25; overflow-wrap: anywhere; }
.hll-metric--blue svg { background: #eff6ff; color: #2563eb; }
.hll-metric--amber svg { background: #fff7ed; color: #ea580c; }
.hll-metric--red svg { background: #fef2f2; color: #dc2626; }
.hll-metric--green svg { background: #ecfdf5; color: #047857; }
.hll-sync-line {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; border: 1px solid #eef2f7; border-radius: 8px;
  background: #fbfcfe; padding: 9px 10px; color: #64748b; font-size: 11.5px; font-weight: 800;
}
.hll-sync-line em { color: #0f766e; font-style: normal; overflow-wrap: anywhere; }
.hll-viewbar {
  display: flex; align-items: center; gap: 7px; overflow-x: auto; border: 1px solid #dbe4f0; border-radius: 8px;
  background: #fff; padding: 8px; box-shadow: 0 1px 2px rgba(15,23,42,.05);
}
.hll-view {
  flex: 0 0 auto; min-height: 38px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid transparent;
  border-radius: 7px; background: transparent; color: #64748b; padding: 0 11px; cursor: pointer;
  font: 850 12.5px/1.2 "Be Vietnam Pro", sans-serif; white-space: nowrap;
}
.hll-view b { min-width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: #eef2f7; color: #475569; font-size: 11px; }
.hll-view:hover, .hll-view.is-active { border-color: #fed7aa; background: #fff7ed; color: #c2410c; }
.hll-view.is-active b { background: #ff6b2b; color: #fff; }
.hll-note {
  display: flex; align-items: center; gap: 7px; border: 1px solid #bfdbfe; background: #eff6ff; color: #1e3a8a;
  border-radius: 8px; padding: 9px 11px; font-size: 12px; font-weight: 850;
}
.hll-body { min-width: 0; }
.hll-board { display: grid; gap: 12px; align-items: start; }
.hll-law-list { min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: stretch; }
.hll-law-card {
  position: relative; min-width: 0; display: grid; align-content: start; gap: 9px; border: 1px solid #dbe4f0; border-left: 4px solid #94a3b8;
  border-radius: 8px; background: #fff; padding: 12px; box-shadow: 0 1px 2px rgba(15,23,42,.05);
}
.hll-law-card.is-linked { border-left-color: #0f766e; }
.hll-law-card.is-selected { border-color: #ff6b2b; box-shadow: 0 10px 28px rgba(255,107,43,.12); }
.hll-law-open { position: absolute; inset: 0; border: 0; background: transparent; cursor: pointer; border-radius: inherit; }
.hll-law-card > *:not(.hll-law-open) { position: relative; z-index: 1; }
.hll-law-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hll-law-head span, .hll-law-head b {
  min-width: 0; display: inline-flex; align-items: center; border: 1px solid #e2e8f0; border-radius: 999px; background: #f8fafc;
  color: #64748b; padding: 3px 8px; font-size: 10.5px; font-weight: 900; overflow-wrap: anywhere;
}
.hll-law-head b { color: #047857; background: #ecfdf5; border-color: #bbf7d0; flex: 0 0 auto; }
.hll-law-card h2 { margin: 0; color: #0f172a; font-size: 16px; line-height: 1.34; font-weight: 950; overflow-wrap: anywhere; }
.hll-law-card p { margin: 0; color: #64748b; font-size: 12px; font-weight: 700; line-height: 1.48; overflow-wrap: anywhere; }
.hll-law-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.hll-law-tags span, .hll-sev {
  min-height: 24px; display: inline-flex; align-items: center; border: 1px solid #e2e8f0; border-radius: 999px; background: #f8fafc;
  color: #475569; padding: 3px 8px; font-size: 10.8px; font-weight: 850;
}
.hll-sev--high { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.hll-sev--medium { color: #9a3412; background: #fff7ed; border-color: #fed7aa; }
.hll-sev--low { color: #475569; background: #f8fafc; border-color: #e2e8f0; }

/* AI-MARK[QAI-UI:helen-law-effective-radar] 2026-07-30 16:04 (GMT+7) — radar NGÀY HIỆU LỰC: dải cảnh báo đầu
   Thư viện Luật, chip lọc theo mốc, badge đếm ngược trên card luật. KHÔNG dùng line-clamp/nowrap cho phần chữ
   nội dung (guard 2026-07-29-multilaw-citation-truncated-no-expand cấm để trình duyệt tự cắt bằng "…").
   | rel: QAI-LEGAL:law-effective-watcher, QAI-LEGAL:law-effective-dates */
.hll-effbanner {
  width: 100%; display: flex; align-items: center; gap: 9px; text-align: left; cursor: pointer;
  border: 1px solid #fecaca; border-left: 4px solid #dc2626; border-radius: 8px; background: #fef2f2;
  color: #7f1d1d; padding: 10px 12px; font: 850 12.5px/1.45 "Be Vietnam Pro", sans-serif;
}
.hll-effbanner:hover { background: #fee2e2; }
.hll-effbanner--medium, .hll-effbanner--low { border-color: #fed7aa; border-left-color: #ea580c; background: #fff7ed; color: #7c2d12; }
.hll-effbanner--medium:hover, .hll-effbanner--low:hover { background: #ffedd5; }
.hll-effbanner-main { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.hll-effbanner-main strong { font-weight: 950; }
.hll-effbanner-cta {
  flex: 0 0 auto; border: 1px solid currentColor; border-radius: 999px; padding: 3px 10px; font-size: 11px; font-weight: 900;
}
.hll-effbar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 7px; border: 1px solid #dbe4f0; border-radius: 8px;
  background: #fff; padding: 8px 10px; box-shadow: 0 1px 2px rgba(15,23,42,.05);
}
.hll-effbar-label {
  display: inline-flex; align-items: center; gap: 6px; color: #64748b; font: 900 11.5px/1.2 "Be Vietnam Pro", sans-serif;
  text-transform: uppercase; letter-spacing: .03em;
}
.hll-effchip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 30px; border: 1px solid #e2e8f0; border-radius: 999px;
  background: #f8fafc; color: #475569; padding: 0 11px; cursor: pointer;
  font: 850 11.8px/1.2 "Be Vietnam Pro", sans-serif; white-space: nowrap;
}
.hll-effchip b {
  min-width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px;
  background: #e2e8f0; color: #334155; font-size: 10.5px;
}
.hll-effchip:hover { border-color: #fed7aa; background: #fff7ed; color: #c2410c; }
.hll-effchip.is-active { border-color: #ff6b2b; background: #fff7ed; color: #c2410c; }
.hll-effchip.is-active b { background: #ff6b2b; color: #fff; }
.hll-eff {
  min-height: 24px; display: inline-flex; align-items: center; gap: 5px; border: 1px solid #e2e8f0; border-radius: 999px;
  background: #f8fafc; color: #475569; padding: 3px 8px; font-size: 10.8px; font-weight: 850;
}
.hll-eff--now { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.hll-eff--soon { color: #9a3412; background: #fff7ed; border-color: #fed7aa; }
.hll-eff--watch { color: #1e40af; background: #eff6ff; border-color: #bfdbfe; }
.hll-eff--past { color: #7c2d12; background: #fff7ed; border-color: #fdba74; }
.hll-eff--ok { color: #047857; background: #ecfdf5; border-color: #bbf7d0; }
.hll-eff--unknown { color: #7c2d12; background: #fffbeb; border-color: #fde68a; }
.hll-alert-flags { display: grid; gap: 5px; }
.hll-alert-flags span {
  display: flex; align-items: flex-start; gap: 6px; border: 1px solid #fde68a; border-radius: 7px; background: #fffbeb;
  color: #78350f; padding: 7px 9px; font-size: 11.5px; font-weight: 800; line-height: 1.45; overflow-wrap: anywhere;
}
.hll-alert-flags span i { flex: 0 0 auto; margin-top: 2px; }
.hll-linkage {
  display: grid; gap: 4px; border: 1px solid #eef2f7; border-radius: 8px; background: #fbfcfe; padding: 9px;
}
.hll-linkage strong { color: #0f172a; font-size: 12px; font-weight: 900; line-height: 1.35; overflow-wrap: anywhere; }
.hll-linkage small { color: #64748b; font-size: 11.5px; font-weight: 700; line-height: 1.38; overflow-wrap: anywhere; }
.hll-linkage em { color: #b91c1c; font-size: 11px; font-style: normal; font-weight: 900; }
.hll-ai-signal {
  min-width: 0; display: grid; gap: 7px; border: 1px solid #bfdbfe; border-left: 3px solid #2563eb;
  border-radius: 8px; background: #f8fbff; padding: 10px;
}
.hll-ai-signal--high { border-color: #fecaca; border-left-color: #dc2626; background: #fffafa; }
.hll-ai-signal--medium { border-color: #fed7aa; border-left-color: #f97316; background: #fffaf5; }
.hll-ai-signal--low { border-color: #dbe4f0; border-left-color: #64748b; background: #fbfcfe; }
.hll-ai-signal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hll-ai-signal-head span { display: inline-flex; align-items: center; gap: 6px; color: #1d4ed8; font-size: 10.5px; font-weight: 950; text-transform: uppercase; }
.hll-ai-signal-head b { color: #0f172a; font-size: 10.8px; font-weight: 950; }
.hll-ai-signal > strong { color: #0f172a; font-size: 12.5px; font-weight: 950; line-height: 1.34; overflow-wrap: anywhere; }
.hll-ai-signal dl, .hll-alert-evidence, .hll-law-diff dl { display: grid; gap: 6px; margin: 0; min-width: 0; }
.hll-ai-signal dl > div, .hll-alert-evidence > div, .hll-law-diff dl > div {
  display: grid; gap: 2px; border-top: 1px solid rgba(148,163,184,.22); padding-top: 6px; min-width: 0;
}
.hll-ai-signal dt, .hll-alert-evidence dt, .hll-law-diff dt {
  color: #64748b; font-size: 10.3px; font-weight: 950; text-transform: uppercase;
}
.hll-ai-signal dd, .hll-alert-evidence dd, .hll-law-diff dd {
  margin: 0; color: #334155; font-size: 11.5px; font-weight: 750; line-height: 1.42; overflow-wrap: anywhere;
}
.hll-law-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.hll-mini { min-height: 32px; padding: 0 9px; font-size: 11.5px; }
.hll-basis-inline span {
  min-height: 22px; display: inline-flex; align-items: center; border-radius: 999px; border: 1px solid #bfdbfe; background: #eff6ff;
  color: #1d4ed8; padding: 2px 7px; font-size: 10.5px; font-weight: 850;
}
.hll-basis-inline { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.hll-row-list { display: grid; gap: 9px; }
.hll-row {
  min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start;
  border: 1px solid #dbe4f0; border-radius: 8px; background: #fff; padding: 12px; box-shadow: 0 1px 2px rgba(15,23,42,.05);
}
.hll-row h3 { margin: 0; color: #0f172a; font-size: 14px; font-weight: 950; line-height: 1.3; overflow-wrap: anywhere; }
.hll-row p { margin: 4px 0 0; color: #475569; font-size: 12px; font-weight: 750; line-height: 1.45; overflow-wrap: anywhere; }
.hll-row small { display: block; margin-top: 5px; color: #94a3b8; font-size: 11px; font-weight: 750; overflow-wrap: anywhere; }
.hll-row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.hll-alert-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hll-alert-card {
  min-width: 0; display: grid; gap: 9px; border: 1px solid #dbe4f0; border-left: 4px solid #f97316;
  border-radius: 8px; background: #fff; padding: 12px; box-shadow: 0 1px 2px rgba(15,23,42,.05);
}
.hll-alert-card--high { border-left-color: #dc2626; }
.hll-alert-card--low { border-left-color: #64748b; }
.hll-alert-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hll-alert-top span { display: inline-flex; align-items: center; gap: 6px; color: #ea580c; font-size: 10.5px; font-weight: 950; text-transform: uppercase; }
.hll-alert-card h3 { margin: 0; color: #0f172a; font-size: 15px; font-weight: 950; line-height: 1.32; overflow-wrap: anywhere; }
.hll-alert-card small { color: #94a3b8; font-size: 11px; font-weight: 750; overflow-wrap: anywhere; }
.hll-law-diff {
  display: grid; gap: 7px; margin-top: 8px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fbfcfe; padding: 9px;
}
.hll-law-diff section { min-width: 0; display: grid; gap: 6px; }
.hll-law-diff strong { color: #0f172a; font-size: 12px; font-weight: 950; line-height: 1.35; overflow-wrap: anywhere; }
.hll-law-diff--empty { color: #64748b; font-size: 11.5px; font-weight: 750; line-height: 1.45; }
.hll-draft-badge { color: #047857; background: #ecfdf5; border: 1px solid #bbf7d0; border-radius: 999px; padding: 5px 9px; font-size: 11px; font-weight: 900; white-space: nowrap; }
.hll-empty { border: 1px dashed #cbd5e1; border-radius: 8px; background: #fff; }
.hll-error { align-items: center; }
/* AI-MARK[QAI-UI:helen-law-basis-modal-scroll] 2026-07-31 09:27 (GMT+7) — popup căn cứ có scroll tổng trong modal body, 2 pane riêng và header cột HĐ phủ kín nền khi sticky để nội dung không ló sau tiêu đề lúc cuộn. | rel: helen.js openHllBasisModal, helen-ui-copy.test */
body.hll-basis-open, body.hll-appendix-open { overflow: hidden; }
.hll-basis-overlay {
  position: fixed; inset: 0; z-index: 1250; display: flex; align-items: flex-start; justify-content: center; padding: 18px;
  overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  background: rgba(15,23,42,.54); backdrop-filter: blur(6px);
}
.hll-basis-dialog {
  width: min(1740px, calc(100vw - 28px)); height: min(1060px, calc(100dvh - 24px)); max-height: calc(100dvh - 24px); min-height: 0; margin: 0;
  flex: 0 0 auto; display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid #dbe4f0; border-radius: 12px; background: #f8fafc; box-shadow: 0 34px 90px rgba(15,23,42,.34);
}
.hll-basis-head {
  min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start;
  border-bottom: 1px solid #e2e8f0; background: #fff; padding: 16px 18px;
}
.hll-basis-body {
  flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden;
  overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scrollbar-gutter: stable; background: #f8fafc; padding-bottom: 2px;
}
.hll-basis-title { display: grid; gap: 4px; min-width: 0; }
.hll-basis-title > span { display: inline-flex; align-items: center; gap: 7px; color: #ea580c; font-size: 11px; font-weight: 950; text-transform: uppercase; }
.hll-basis-title h2 { margin: 0; color: #0f172a; font-size: 22px; font-weight: 950; line-height: 1.22; letter-spacing: 0; overflow-wrap: anywhere; }
.hll-basis-title p { margin: 0; color: #64748b; font-size: 12.5px; font-weight: 750; line-height: 1.45; overflow-wrap: anywhere; }
.hll-basis-close {
  width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; color: #64748b; cursor: pointer;
}
.hll-basis-close:hover { border-color: #fed7aa; color: #c2410c; background: #fff7ed; }
.hll-basis-strip { flex: 0 0 auto; display: grid; grid-template-columns: repeat(5, minmax(132px, 1fr)); gap: 7px; padding: 8px 12px; background: #fff; border-bottom: 1px solid #eef2f7; }
.hll-basis-strip .hll-metric { padding: 7px 8px; }
.hll-basis-stat {
  appearance: none; -webkit-appearance: none; cursor: pointer; text-align: left; font-family: "Be Vietnam Pro", sans-serif; transition: .15s ease;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.hll-basis-stat:hover { border-color: #fed7aa; background: #fff7ed; color: #c2410c; transform: translateY(-1px); }
.hll-basis-stat:focus-visible { outline: 3px solid rgba(37,99,235,.18); outline-offset: 2px; }
.hll-basis-stat--scan { border-color: #ff6b2b; background: #ff6b2b; color: #fff; box-shadow: 0 10px 20px rgba(255,107,43,.18); }
.hll-basis-stat--scan:hover { border-color: #f05f22; background: #f05f22; color: #fff; }
.hll-basis-stat--scan svg { background: rgba(255,255,255,.18); color: #fff; }
.hll-basis-stat--scan strong, .hll-basis-stat--scan span, .hll-basis-stat--scan small { color: #fff; }
.hll-basis-stat--scan:disabled { opacity: .72; cursor: wait; transform: none; }
.hll-basis-banner {
  display: flex; align-items: center; gap: 8px; margin: 10px 12px 0; border: 1px solid #bfdbfe; border-radius: 8px;
  background: #eff6ff; color: #1e3a8a; padding: 9px 11px; font-size: 12px; font-weight: 850;
}
.hll-basis-banner--error { border-color: #fecaca; background: #fef2f2; color: #991b1b; }
/* AI-MARK[QAI-UI:law-scan-result-in-popup] 2026-07-29 08:18 (GMT+7) — băng báo kết quả rà soát HĐ ngay trong popup | rel: helen.js hllScanLaw */
.hll-basis-banner--done { border-color: #bbf7d0; background: #f0fdf4; color: #166534; }
.hll-basis-assessment {
  flex: 0 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center;
  margin: 8px 12px 0; border: 1px solid #bfdbfe; border-radius: 8px; background: #eff6ff; padding: 9px 11px;
}
.hll-basis-assessment--high { border-color: #fed7aa; background: #fff7ed; }
.hll-basis-assessment--warn { border-color: #fde68a; background: #fffbeb; }
.hll-basis-assessment--watch { border-color: #bfdbfe; background: #eff6ff; }
.hll-basis-assessment--neutral { border-color: #dbe4f0; background: #f8fafc; }
.hll-basis-assessment-kicker { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hll-basis-assessment-label { color: #1d4ed8; font-size: 10.5px; font-weight: 950; text-transform: uppercase; }
.hll-basis-assessment--high .hll-basis-assessment-label { color: #c2410c; }
.hll-basis-assessment--warn .hll-basis-assessment-label { color: #a16207; }
.hll-basis-assessment-kicker em {
  display: inline-flex; align-items: center; min-height: 20px; border: 1px solid currentColor; border-radius: 999px;
  color: #1d4ed8; padding: 2px 7px; font-size: 10px; font-style: normal; font-weight: 950;
}
.hll-basis-assessment--high .hll-basis-assessment-kicker em { color: #c2410c; }
.hll-basis-assessment--warn .hll-basis-assessment-kicker em { color: #a16207; }
.hll-basis-assessment--neutral .hll-basis-assessment-kicker em { color: #64748b; }
.hll-basis-assessment strong { display: block; margin-top: 2px; color: #0f172a; font-size: 13.6px; font-weight: 950; line-height: 1.26; overflow-wrap: anywhere; }
.hll-basis-assessment p,
.hll-basis-assessment-text { margin: 3px 0 0; color: #334155; font-size: 11.7px; font-weight: 750; line-height: 1.42; overflow-wrap: anywhere; }
.hll-basis-assessment-facts {
  min-width: 172px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3px 7px; align-items: baseline;
  border-left: 1px solid #bfdbfe; padding-left: 12px;
}
.hll-basis-assessment-facts b { color: #0f172a; font-size: 15.5px; font-weight: 950; }
.hll-basis-assessment-facts span { color: #64748b; font-size: 10px; font-weight: 850; text-transform: none; }
/* AI-MARK[QAI-UI:helen-law-basis-search] 2026-07-30 15:40 (GMT+7) — thanh tìm kiếm trong popup
   căn cứ: lọc ngay danh sách HĐ/điều khoản, bộ đếm rõ, không cắt chữ trên desktop/mobile.
   | rel: helen.js hllBasisSearchHtml hllBasisApplySearch */
.hll-basis-tools {
  position: sticky; top: 0; z-index: 5; flex: 0 0 auto; min-width: 0;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center;
  margin: 8px 12px 0; border: 1px solid #dbe4f0; border-radius: 8px; background: rgba(255,255,255,.96);
  padding: 9px 10px; box-shadow: 0 8px 22px rgba(15,23,42,.06); backdrop-filter: blur(6px);
}
.hll-basis-search {
  min-width: 0; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; align-items: center;
  border: 1px solid #dbe4f0; border-radius: 8px; background: #f8fafc; padding: 8px 10px; color: #64748b;
}
.hll-basis-search:focus-within { border-color: #93c5fd; background: #fff; box-shadow: 0 0 0 3px rgba(37,99,235,.10); }
.hll-basis-search input {
  min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: #0f172a;
  font-family: "Be Vietnam Pro", sans-serif; font-size: 13px; font-weight: 800; line-height: 1.35;
}
.hll-basis-search input::placeholder { color: #94a3b8; font-weight: 750; }
.hll-basis-tools-meta {
  min-width: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 7px;
  color: #64748b; font-size: 11px; font-weight: 850; white-space: normal;
}
.hll-basis-tools-meta b { color: #0f172a; font-size: 13px; font-weight: 950; }
.hll-basis-tools-meta .hll-mini { min-height: 32px; padding: 6px 9px; }
.hll-basis-contract[hidden], .hll-basis-filter-empty[hidden] { display: none !important; }
/* AI-MARK[QAI-UI:helen-law-basis-reading-flow] 2026-07-31 21:35 (GMT+7) — dải hướng dẫn 3 bước giúp
   người đọc biết thứ tự xem mà không chiếm vùng nội dung chính. | rel: helen.js hllBasisReadingGuideHtml */
.hll-basis-reading-guide {
  flex: 0 0 auto; min-width: 0; display: grid; grid-template-columns: minmax(178px, 1.08fr) repeat(5, auto) minmax(190px, 1fr);
  align-items: center; gap: 8px; margin: 10px 12px 0; border: 1px solid #dbe4f0; border-radius: 10px;
  background: #fff; padding: 8px 10px; box-shadow: 0 4px 14px rgba(15,23,42,.04);
}
.hll-basis-reading-lead, .hll-basis-reading-step, .hll-basis-reading-note { min-width: 0; display: flex; align-items: center; gap: 7px; }
.hll-basis-reading-lead { color: #0f172a; }
.hll-basis-reading-lead svg { flex: 0 0 auto; color: #2563eb; }
.hll-basis-reading-lead span, .hll-basis-reading-step span { min-width: 0; display: grid; gap: 1px; }
.hll-basis-reading-lead b { font-size: 11.5px; font-weight: 950; }
.hll-basis-reading-lead small, .hll-basis-reading-step small { color: #64748b; font-size: 10px; font-weight: 750; line-height: 1.25; white-space: nowrap; }
.hll-basis-reading-step em {
  flex: 0 0 auto; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; font-size: 11px; font-style: normal; font-weight: 950;
}
.hll-basis-reading-step b { color: #0f172a; font-size: 11px; font-weight: 950; white-space: nowrap; }
.hll-basis-reading-step--law em { border: 1px solid #bfdbfe; background: #eff6ff; color: #2563eb; }
.hll-basis-reading-step--contract em { border: 1px solid #99f6e4; background: #f0fdfa; color: #0f766e; }
.hll-basis-reading-step--verdict em { border: 1px solid #fed7aa; background: #fff7ed; color: #c2410c; }
.hll-basis-reading-arrow { display: inline-flex; align-items: center; color: #94a3b8; }
.hll-basis-reading-note { justify-content: flex-end; color: #166534; font-size: 10px; font-weight: 850; line-height: 1.3; }
.hll-basis-reading-note svg { flex: 0 0 auto; }
/* AI-MARK[QAI-UI:helen-law-basis-quick-peek] 2026-07-30 13:51 (GMT+7) — các ô chỉ số đầu popup mở lớp xem nhanh đúng nội dung cần đối chiếu; bỏ fast lane ở giữa để vùng luật/HĐ rộng hơn. | rel: helen.js hllBasisTopStripHtml hllBasisPeekHtml */
.hll-basis-peek-layer {
  position: fixed; inset: 0; z-index: 1270; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(15,23,42,.32); backdrop-filter: blur(2px);
}
.hll-basis-peek-dialog {
  width: min(980px, calc(100vw - 32px)); max-height: min(820px, calc(100dvh - 36px)); min-height: 0;
  display: flex; flex-direction: column; overflow: hidden; border: 1px solid #dbe4f0; border-radius: 10px;
  background: #fff; box-shadow: 0 26px 70px rgba(15,23,42,.28);
}
.hll-basis-peek-head {
  flex: 0 0 auto; min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  border-bottom: 1px solid #eef2f7; background: #fff; padding: 14px 16px;
}
.hll-basis-peek-head > div { min-width: 0; display: grid; gap: 4px; }
.hll-basis-peek-head span {
  display: inline-flex; align-items: center; gap: 7px; color: #1d4ed8; font-size: 10.5px; font-weight: 950; text-transform: uppercase;
}
.hll-basis-peek-head h3 { margin: 0; color: #0f172a; font-size: 18px; font-weight: 950; line-height: 1.25; overflow-wrap: anywhere; word-break: break-word; }
.hll-basis-peek-head p { margin: 0; color: #64748b; font-size: 12px; font-weight: 760; line-height: 1.4; overflow-wrap: anywhere; word-break: break-word; }
.hll-basis-peek-body {
  min-height: 0; display: grid; gap: 10px; padding: 12px; overflow-y: auto; overflow-x: hidden;
  overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scrollbar-gutter: stable;
}
.hll-basis-peek-list { min-width: 0; display: grid; gap: 9px; }
.hll-basis-peek-card {
  min-width: 0; display: grid; gap: 8px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fbfcfe; padding: 10px;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.hll-basis-peek-top { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: start; }
.hll-basis-peek-top > span {
  display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 26px; border-radius: 999px;
  border: 1px solid #bfdbfe; background: #eff6ff; color: #2563eb; font-size: 11px; font-weight: 950;
}
.hll-basis-peek-top strong { display: block; color: #0f172a; font-size: 13.6px; font-weight: 950; line-height: 1.34; overflow-wrap: anywhere; word-break: break-word; }
.hll-basis-peek-top small { display: block; margin-top: 3px; color: #64748b; font-size: 11.2px; font-weight: 760; line-height: 1.38; overflow-wrap: anywhere; word-break: break-word; }
.hll-basis-peek-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; min-width: 0; }
.hll-basis-peek-split { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.hll-basis-peek-split section { min-width: 0; display: grid; align-content: start; gap: 8px; border: 1px solid #eef2f7; border-radius: 8px; background: #fbfcfe; padding: 10px; }
.hll-basis-peek-split h4 { margin: 0; color: #0f172a; font-size: 13px; font-weight: 950; line-height: 1.3; overflow-wrap: anywhere; word-break: break-word; }
.hll-basis-peek-split .hll-basis-articles, .hll-basis-peek-split .hll-basis-maps, .hll-basis-peek-updates { margin-top: 0; }
.hll-basis-grid {
  flex: 1 0 auto; height: clamp(430px, calc(100dvh - 300px), 820px); min-height: 430px;
  display: grid; grid-template-columns: minmax(420px, .95fr) minmax(620px, 1.45fr); gap: 14px; padding: 12px 14px 14px; overflow: hidden;
}
.hll-basis-lawpane, .hll-basis-contractpane {
  position: relative; isolation: isolate; min-width: 0; min-height: 0; display: grid; align-content: start; gap: 12px;
  overflow-y: auto; overflow-x: hidden; overscroll-behavior-y: auto; scrollbar-gutter: stable; padding-right: 2px;
}
.hll-basis-pane-intro {
  min-width: 0; display: grid; gap: 3px; border: 1px solid #dbe4f0; border-radius: 10px; background: #fff; padding: 12px 14px;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.hll-basis-pane-intro span, .hll-basis-step-label { color: #64748b; font-size: 10px; font-weight: 950; letter-spacing: .04em; }
.hll-basis-pane-intro--law span, .hll-basis-pane-intro--law strong { color: #1d4ed8; }
.hll-basis-pane-intro strong { color: #0f172a; font-size: 16px; font-weight: 950; line-height: 1.25; }
.hll-basis-pane-intro small { color: #64748b; font-size: 11px; font-weight: 750; line-height: 1.4; }
.hll-basis-lawpane section, .hll-basis-contractpane {
  border: 1px solid #dbe4f0; border-radius: 8px; background: #fff; padding: 14px; box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.hll-basis-lawpane h3, .hll-basis-contract-head h3 {
  margin: 0; display: flex; align-items: center; gap: 7px; color: #0f172a; font-size: 15px; font-weight: 950; line-height: 1.3;
}
.hll-basis-lawpane h3 svg { color: #ff6b2b; }
.hll-basis-articles, .hll-basis-maps, .hll-basis-contract-list { display: grid; gap: 10px; margin-top: 11px; }
.hll-basis-article, .hll-basis-map-row, .hll-basis-contract {
  min-width: 0; border: 1px solid #eef2f7; border-radius: 8px; background: #fbfcfe; padding: 12px;
}
.hll-basis-article > span, .hll-article-ref {
  display: inline-flex; width: fit-content; max-width: 100%; border-radius: 999px; border: 1px solid #bfdbfe; background: #eff6ff;
  color: #1d4ed8; padding: 4px 9px; font-size: 11.2px; font-weight: 900; overflow-wrap: anywhere;
}
.hll-basis-article strong, .hll-basis-map-row strong, .hll-basis-contract-top strong {
  display: block; margin-top: 7px; color: #0f172a; font-size: 13.4px; font-weight: 950; line-height: 1.38; overflow-wrap: anywhere;
}
.hll-basis-article p, .hll-basis-map-row p, .hll-basis-contract-top span, .hll-basis-clause p, .hll-basis-evaluation {
  margin: 6px 0 0; color: #475569; font-size: 13px; font-weight: 700; line-height: 1.58; overflow-wrap: anywhere;
}
.hll-readable-text, .hll-update-summary, .hll-impact-recommendation {
  margin-top: 6px;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}
.hll-basis-evaluation .helen-legal-text,
.hll-basis-assessment-text .helen-legal-text,
.hll-update-summary .helen-legal-text,
.hll-impact-recommendation .helen-legal-text { margin: 0; }
.hll-impact-coverage {
  margin-top: 6px; color: #0f766e; font-size: 11.5px; font-weight: 850; line-height: 1.42; overflow-wrap: anywhere;
}
.hll-basis-tags, .hll-basis-inline {
  display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px;
}
.hll-basis-tags span, .hll-basis-inline span {
  min-height: 22px; display: inline-flex; align-items: center; border: 1px solid #dbe4f0; border-radius: 999px;
  background: #fff; color: #334155; padding: 2px 7px; font-size: 10.5px; font-weight: 850;
}
.hll-basis-updates { display: grid; gap: 8px; margin-top: 9px; }
.hll-basis-update { min-width: 0; display: grid; gap: 6px; border: 1px solid #eef2f7; border-radius: 8px; background: #fbfcfe; padding: 10px; }
.hll-basis-update .hll-sev { width: fit-content; }
.hll-basis-update strong { color: #0f172a; font-size: 12.5px; font-weight: 950; line-height: 1.35; overflow-wrap: anywhere; word-break: break-word; }
.hll-basis-update small { color: #94a3b8; font-size: 10.8px; font-weight: 750; overflow-wrap: anywhere; word-break: break-word; }
.hll-basis-contract-head {
  position: sticky; top: 0; z-index: 8; display: flex; justify-content: space-between; gap: 10px; align-items: center;
  margin: -14px -14px 10px; border-bottom: 1px solid #eef2f7; background: #fff; padding: 14px 14px 10px;
  box-shadow: 0 10px 18px rgba(15,23,42,.06);
}
.hll-basis-contract-head-copy { min-width: 0; display: grid; gap: 3px; }
.hll-basis-contract-head-copy h3 { margin-top: 1px; }
.hll-basis-contract-head-copy p { margin: 0; color: #64748b; font-size: 10.8px; font-weight: 750; line-height: 1.35; }
.hll-basis-contract-head span { color: #64748b; font-size: 12px; font-weight: 850; }
.hll-basis-contract { display: grid; gap: 10px; background: #fff; }
.hll-basis-contract--high { border-left: 4px solid #f97316; }
.hll-basis-contract--medium { border-left: 4px solid #fbbf24; }
.hll-basis-contract--low { border-left: 4px solid #94a3b8; }
.hll-basis-contract-top { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.hll-basis-contract-heading { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 9px; align-items: start; }
.hll-basis-contract-index {
  display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 24px; border-radius: 6px;
  background: #f1f5f9; color: #475569; font-size: 10px; font-weight: 950; letter-spacing: .03em;
}
.hll-basis-contract-top strong { margin-top: 0; font-size: 14.5px; }
.hll-basis-contract-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; min-width: 0; }
.hll-basis-contract-focus {
  min-width: 0; display: flex; align-items: flex-start; gap: 7px; border: 1px solid #dbeafe; border-radius: 8px;
  background: #f8fbff; color: #475569; padding: 7px 9px; font-size: 11px; font-weight: 750; line-height: 1.4;
}
.hll-basis-contract-focus svg { flex: 0 0 auto; margin-top: 1px; color: #2563eb; }
.hll-basis-contract-focus b { color: #1d4ed8; font-weight: 950; }
.hll-basis-section-label { color: #ea580c; font-size: 11px; font-weight: 950; text-transform: uppercase; }
.hll-basis-section-label--contract { color: #0f766e; }
.hll-basis-section-label--law { color: #1d4ed8; }
.hll-basis-section-label--evaluation { color: #c2410c; }
.hll-basis-clauses { display: grid; gap: 7px; }
.hll-basis-clause { border-left: 3px solid #0f766e; border-radius: 8px; background: #f8fafc; padding: 11px; }
.hll-basis-clause--soft { border-left-color: #94a3b8; }
.hll-basis-clause--matrix {
  display: grid; gap: 8px; border-left-color: #2563eb; background: #fbfdff;
}
.hll-basis-clause strong { display: block; color: #0f172a; font-size: 13.4px; font-weight: 950; line-height: 1.38; overflow-wrap: anywhere; }
.hll-matrix-contract-list { display: grid; gap: 7px; }
.hll-matrix-contract-list section {
  min-width: 0; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; padding: 8px;
}
.hll-matrix-contract-list b {
  display: block; color: #0f766e; font-size: 12px; font-weight: 950; line-height: 1.35; overflow-wrap: anywhere;
}
.hll-basis-evaluation { border-top: 1px solid #eef2f7; padding-top: 8px; color: #334155; }
.hll-basis-extra { border: 1px solid #e2e8f0; border-radius: 8px; background: #f8fafc; }
.hll-basis-extra summary {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer; list-style: none;
  color: #334155; padding: 8px 10px; font-size: 11px; font-weight: 900;
}
.hll-basis-extra summary::-webkit-details-marker { display: none; }
.hll-basis-extra summary > span { min-width: 0; display: inline-flex; align-items: center; gap: 6px; }
.hll-basis-extra-icon { color: #64748b; }
.hll-basis-extra-chevron { flex: 0 0 auto; color: #94a3b8; transition: transform .15s ease; }
.hll-basis-extra[open] .hll-basis-extra-chevron { transform: rotate(180deg); }
.hll-basis-extra-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 10px; border-top: 1px solid #e2e8f0; padding: 10px; }
.hll-basis-empty {
  display: grid; gap: 4px; border: 1px dashed #cbd5e1; border-radius: 8px; background: #f8fafc; color: #64748b;
  padding: 12px; font-size: 12px; font-weight: 750; line-height: 1.45; overflow-wrap: anywhere;
}
.hll-basis-empty--large { min-height: 140px; align-content: center; justify-items: center; text-align: center; }
.hll-basis-empty b { color: #0f172a; font-size: 14px; }
/* AI-MARK[QAI-UI:helen-appendix-approval-popup] 2026-07-30 12:18 (GMT+7) — popup xem/duyệt phụ lục
   trước khi tạo nháp; bố cục đọc đủ căn cứ luật + điều khoản HĐ + draft, chống cắt chữ trên desktop/mobile.
   | rel: QAI-LEGAL:appendix-preview-approval, helen.js hllAppendixPreviewModalHtml */
.hll-appendix-overlay {
  position: fixed; inset: 0; z-index: 1260; display: flex; align-items: flex-start; justify-content: center; padding: 18px;
  overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  background: rgba(15,23,42,.56); backdrop-filter: blur(6px);
}
.hll-appendix-dialog {
  width: min(1540px, calc(100vw - 28px)); height: min(980px, calc(100dvh - 24px)); max-height: calc(100dvh - 24px);
  min-height: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid #dbe4f0; border-radius: 12px;
  background: #f8fafc; box-shadow: 0 34px 90px rgba(15,23,42,.34);
}
.hll-appendix-head {
  min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start;
  border-bottom: 1px solid #e2e8f0; background: #fff; padding: 16px 18px;
}
.hll-appendix-title { display: grid; gap: 4px; min-width: 0; }
.hll-appendix-title > span { display: inline-flex; align-items: center; gap: 7px; color: #ea580c; font-size: 11px; font-weight: 950; text-transform: uppercase; }
.hll-appendix-title h2 { margin: 0; color: #0f172a; font-size: 22px; font-weight: 950; line-height: 1.24; letter-spacing: 0; overflow-wrap: anywhere; word-break: break-word; }
.hll-appendix-title p { margin: 0; color: #64748b; font-size: 12.5px; font-weight: 750; line-height: 1.45; overflow-wrap: anywhere; word-break: break-word; }
.hll-appendix-body {
  flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; overflow-x: hidden;
  overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scrollbar-gutter: stable; padding: 0 12px 12px;
}
.hll-appendix-approval-note {
  display: flex; align-items: center; gap: 8px; margin-top: 10px; border: 1px solid #bbf7d0; border-radius: 8px;
  background: #f0fdf4; color: #166534; padding: 9px 11px; font-size: 12px; font-weight: 850; line-height: 1.45; overflow-wrap: anywhere;
}
.hll-appendix-grid {
  flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(360px, .82fr) minmax(560px, 1.18fr); gap: 12px;
}
.hll-appendix-left {
  min-width: 0; min-height: 0; display: grid; align-content: start; gap: 10px; overflow-y: auto; overflow-x: hidden; scrollbar-gutter: stable;
}
.hll-appendix-panel, .hll-appendix-paper {
  min-width: 0; border: 1px solid #dbe4f0; border-radius: 8px; background: #fff; padding: 13px; box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.hll-appendix-facts { display: grid; gap: 8px; margin: 9px 0 0; }
.hll-appendix-facts > div { min-width: 0; display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 8px; align-items: start; }
.hll-appendix-facts dt { color: #64748b; font-size: 10.5px; font-weight: 950; text-transform: uppercase; }
.hll-appendix-facts dd { margin: 0; color: #0f172a; font-size: 12.6px; font-weight: 850; line-height: 1.45; overflow-wrap: anywhere; word-break: break-word; }
.hll-appendix-evidence-list { display: grid; gap: 8px; margin-top: 9px; }
.hll-appendix-evidence { min-width: 0; display: grid; gap: 6px; border-left: 3px solid #2563eb; border-radius: 8px; background: #fbfdff; padding: 10px; }
.hll-appendix-evidence--contract { border-left-color: #0f766e; background: #f8fffd; }
.hll-appendix-evidence strong { color: #0f172a; font-size: 13px; font-weight: 950; line-height: 1.36; overflow-wrap: anywhere; word-break: break-word; }
.hll-appendix-paper {
  min-height: 0; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; overflow-x: hidden; scrollbar-gutter: stable;
}
.hll-appendix-paper-head { min-width: 0; display: grid; gap: 5px; border-bottom: 1px solid #eef2f7; padding-bottom: 10px; }
.hll-appendix-paper-head span { color: #ea580c; font-size: 10.8px; font-weight: 950; text-transform: uppercase; }
.hll-appendix-paper-head strong { color: #0f172a; font-size: 14px; font-weight: 950; line-height: 1.42; overflow-wrap: anywhere; word-break: break-word; }
.hll-appendix-draft {
  min-width: 0; border: 1px solid #eef2f7; border-radius: 8px; background: #fbfcfe; padding: 13px;
  color: #1f2937; font-size: 13.4px; font-weight: 720; line-height: 1.66; overflow-wrap: anywhere; word-break: break-word;
}
.hll-appendix-draft .helen-legal-line { align-items: start; }
.hll-appendix-draft-text { color: inherit; font-size: inherit; font-weight: inherit; line-height: inherit; }
.hll-appendix-checklist {
  display: grid; gap: 7px; border: 1px solid #bfdbfe; border-radius: 8px; background: #eff6ff; padding: 11px; color: #1e3a8a;
}
.hll-appendix-checklist > div:not(.hll-basis-section-label) { min-width: 0; display: flex; align-items: flex-start; gap: 7px; font-size: 12px; font-weight: 850; line-height: 1.45; overflow-wrap: anywhere; word-break: break-word; }
.hll-appendix-checklist svg { flex: 0 0 auto; margin-top: 1px; color: #2563eb; }
.hll-appendix-actions {
  flex: 0 0 auto; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid #e2e8f0; background: #fff; padding: 12px 18px;
}
@media (max-width: 1180px) {
  .hll-command { grid-template-columns: 1fr; }
  .hll-law-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hll-basis-dialog { width: 100%; height: auto; max-height: none; overflow: visible; }
  .hll-basis-body { overflow: visible; scrollbar-gutter: auto; padding-bottom: 0; }
  .hll-basis-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hll-basis-peek-split { grid-template-columns: 1fr; }
  .hll-basis-grid { grid-template-columns: 1fr; height: auto; min-height: 0; overflow: visible; }
  .hll-basis-lawpane, .hll-basis-contractpane { overflow: visible; overscroll-behavior-y: auto; scrollbar-gutter: auto; padding-right: 0; }
  .hll-basis-contract-head { position: static; }
  .hll-basis-contract-head { margin: 0 0 10px; padding: 0 0 9px; box-shadow: none; }
  .hll-appendix-dialog { width: 100%; height: auto; max-height: none; overflow: visible; }
  .hll-appendix-body { overflow: visible; scrollbar-gutter: auto; }
  .hll-appendix-grid { grid-template-columns: 1fr; min-height: 0; }
  .hll-appendix-left, .hll-appendix-paper { overflow: visible; scrollbar-gutter: auto; }
}
@media (max-width: 820px) {
  .hll-law-list, .hll-metrics, .hll-alert-grid { grid-template-columns: 1fr 1fr; }
  .hll-basis-overlay { padding: 8px; align-items: flex-start; }
  .hll-basis-dialog { width: 100%; height: auto; max-height: none; min-height: 0; margin: 0; overflow: visible; }
  .hll-basis-body { overflow: visible; }
  .hll-appendix-overlay { padding: 8px; align-items: flex-start; }
  .hll-appendix-dialog { width: 100%; height: auto; max-height: none; min-height: 0; margin: 0; overflow: visible; }
  .hll-appendix-head { padding: 12px; }
  .hll-appendix-title h2 { font-size: 18px; }
  .hll-appendix-body { padding: 0 8px 8px; }
  .hll-appendix-facts > div { grid-template-columns: 1fr; gap: 2px; }
  .hll-appendix-actions { padding: 10px 12px; flex-wrap: wrap; }
  .hll-appendix-actions .hll-mini { flex: 1 1 180px; }
  .hll-basis-strip { grid-template-columns: 1fr 1fr; }
  .hll-basis-head { padding: 12px; }
  .hll-basis-title h2 { font-size: 18px; }
  .hll-basis-tools { grid-template-columns: 1fr; }
  .hll-basis-tools-meta { justify-content: flex-start; }
  .hll-basis-assessment { grid-template-columns: 1fr; }
  .hll-basis-assessment-facts { min-width: 0; border-left: 0; border-top: 1px solid #bfdbfe; padding: 8px 0 0; }
  .hll-basis-reading-guide { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hll-basis-reading-lead, .hll-basis-reading-note { grid-column: 1 / -1; }
  .hll-basis-reading-note { justify-content: flex-start; }
  .hll-basis-reading-arrow { display: none; }
  .hll-basis-extra-grid { grid-template-columns: 1fr; }
  .hll-basis-peek-layer { align-items: flex-start; padding: 8px; }
  .hll-basis-peek-dialog { width: 100%; max-height: calc(100dvh - 16px); }
  .hll-basis-peek-head { padding: 12px; }
  .hll-basis-peek-body { padding: 9px; }
  .hll-basis-peek-top { grid-template-columns: auto minmax(0, 1fr); }
  .hll-basis-peek-top .hll-sev { grid-column: 2; justify-self: start; }
  .hll-command { padding: 10px; }
  .hll-command-main h1 { font-size: 24px; }
  .hll-command-actions { grid-template-columns: 1fr; }
  .hll-row { grid-template-columns: 1fr; }
  .hll-row-actions { justify-content: flex-start; }
}
@media (max-width: 520px) {
  .hll-law-list, .hll-alert-grid { grid-template-columns: 1fr; }
  .hll-command { gap: 9px; }
  .hll-command-main { padding: 12px; gap: 8px; }
  .hll-command-main h1 { font-size: 22px; line-height: 1.12; }
  .hll-command-main p { font-size: 12px; line-height: 1.45; }
  .hll-proof-row { gap: 5px; }
  .hll-proof-row span { min-height: 24px; padding: 3px 7px; font-size: 10.5px; }
  .hll-metric { padding: 7px; grid-template-columns: 24px minmax(0, 1fr); }
  .hll-metric svg { width: 24px; height: 24px; padding: 5px; }
  .hll-metric strong { font-size: 18px; }
  .hll-metric span { font-size: 10.5px; }
  .hll-metric small { font-size: 9.8px; }
  .hll-viewbar { display: grid; grid-template-columns: 1fr 1fr; overflow: visible; }
  .hll-view { width: 100%; justify-content: center; white-space: normal; text-align: center; }
  .hll-law-actions { display: grid; grid-template-columns: 1fr; }
  .hll-basis-strip { grid-template-columns: 1fr; padding: 8px; }
  .hll-basis-stat { min-height: 60px; }
  .hll-basis-tools { margin: 8px; padding: 8px; }
  .hll-basis-search { grid-template-columns: 20px minmax(0, 1fr); padding: 7px 8px; }
  .hll-basis-reading-guide { grid-template-columns: 1fr; margin: 8px; }
  .hll-basis-reading-lead, .hll-basis-reading-step, .hll-basis-reading-note { grid-column: auto; }
  .hll-basis-reading-step { padding: 3px 0; }
  .hll-basis-peek-actions { justify-content: stretch; }
  .hll-basis-peek-actions .hll-mini { width: 100%; }
  .hll-basis-grid { padding: 8px; gap: 8px; }
  .hll-basis-contract-top, .hll-basis-contract-head, .hll-basis-contract-actions { align-items: stretch; flex-direction: column; }
  .hll-basis-contract-heading { grid-template-columns: 1fr; gap: 5px; }
}

/* AI-MARK[QAI-UI:helen-contract-lifecycle] 2026-07-20 19:05 (GMT+7) — CSS tab Vòng đời HĐ: timeline end-user, insight Helen, không lộ collection/field backend trên UI. | rel: helen.js viewContractLifecycle, QAI-LEGAL:contract-lifecycle */
.hcl-workspace { display: flex; flex-direction: column; gap: 14px; }
.hcl-command {
  display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(360px, .55fr); gap: 14px; align-items: stretch;
  background: #fff; border: 1px solid #dbe4f0; border-radius: 8px; padding: 14px; box-shadow: 0 1px 2px rgba(15,23,42,.05);
}
.hcl-hero {
  min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 10px;
  border-radius: 8px; background: #122033; color: #e6edf7; padding: 22px;
}
.hcl-hero > span { display: inline-flex; align-items: center; gap: 7px; color: #f7b267; font-size: 11px; font-weight: 950; text-transform: uppercase; letter-spacing: 0; }
.hcl-hero h1 { margin: 0; color: #fff; font-size: 30px; line-height: 1.12; font-weight: 950; letter-spacing: 0; }
.hcl-hero p { margin: 0; max-width: 920px; color: #d8e3f0; font-size: 13.5px; font-weight: 650; line-height: 1.58; overflow-wrap: anywhere; }
.hcl-proof-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 4px; }
.hcl-proof-row span {
  min-width: 0; min-height: 28px; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid rgba(255,255,255,.18); border-radius: 999px; background: rgba(255,255,255,.08);
  color: #f8fafc; padding: 4px 9px; font-size: 11px; font-weight: 850; line-height: 1.2;
}
.hcl-actions { min-width: 0; display: grid; align-content: center; gap: 10px; }
.hcl-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.hcl-search input, .hcl-select {
  min-width: 0; min-height: 40px; border: 1px solid #dbe4f0; border-radius: 8px; background: #fff;
  color: #0f172a; padding: 0 12px; font: 750 12.5px "Be Vietnam Pro", sans-serif; box-shadow: 0 1px 2px rgba(15,23,42,.03);
}
.hcl-select { width: 100%; }
.hcl-mini {
  min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid #dbe4f0; border-radius: 8px; background: #fff; color: #334155; padding: 0 11px;
  font: 850 12px "Be Vietnam Pro", sans-serif; cursor: pointer; transition: border-color .15s, background .15s, color .15s, box-shadow .15s;
}
.hcl-mini:hover:not(:disabled) { border-color: #ffb489; background: #fff7ed; color: #c2410c; box-shadow: 0 8px 18px rgba(255,107,43,.1); }
.hcl-mini:disabled { cursor: wait; opacity: .68; }
.hcl-mini--primary { background: #ff5f2a; border-color: #ff5f2a; color: #fff; }
.hcl-mini--primary:hover:not(:disabled) { background: #ea580c; border-color: #ea580c; color: #fff; }
.hcl-metrics { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.hcl-metric {
  min-width: 0; min-height: 76px; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; align-items: center;
  border: 1px solid #dbe4f0; border-radius: 8px; background: #fff; padding: 11px 12px; box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.hcl-metric > svg { width: 34px; height: 34px; padding: 8px; border-radius: 8px; background: #eff6ff; color: #2563eb; }
.hcl-metric:nth-child(3) > svg { background: #ecfdf5; color: #047857; }
.hcl-metric:nth-child(4) > svg { background: #fff7ed; color: #c2410c; }
.hcl-metric:nth-child(5) > svg, .hcl-metric:nth-child(6) > svg { background: #f8fafc; color: #64748b; }
.hcl-metric section { min-width: 0; display: grid; gap: 2px; }
.hcl-metric strong { color: #0f172a; font-size: 19px; line-height: 1.1; font-weight: 950; overflow-wrap: anywhere; }
.hcl-metric span { color: #334155; font-size: 11px; line-height: 1.25; font-weight: 900; text-transform: uppercase; }
.hcl-metric small { color: #64748b; font-size: 10.5px; line-height: 1.3; font-weight: 750; }
.hcl-ai-strip {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center;
  border: 1px solid #bfdbfe; border-radius: 8px; background: #eff6ff; padding: 13px 15px; box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.hcl-ai-strip--ok { border-color: #bbf7d0; background: #ecfdf5; }
.hcl-ai-strip--warn { border-color: #fed7aa; background: #fff7ed; }
.hcl-ai-copy { min-width: 0; display: grid; gap: 4px; }
.hcl-ai-copy span { display: inline-flex; align-items: center; gap: 7px; color: #2563eb; font-size: 11px; font-weight: 950; text-transform: uppercase; }
.hcl-ai-strip--ok .hcl-ai-copy span { color: #047857; }
.hcl-ai-strip--warn .hcl-ai-copy span { color: #c2410c; }
.hcl-ai-copy strong { color: #0f172a; font-size: 15px; line-height: 1.35; font-weight: 950; overflow-wrap: anywhere; }
.hcl-ai-copy p { margin: 0; color: #334155; font-size: 12.5px; line-height: 1.5; font-weight: 760; overflow-wrap: anywhere; }
.hcl-ai-facts { display: grid; grid-template-columns: repeat(3, minmax(78px, 1fr)); gap: 8px; }
.hcl-ai-facts div { min-width: 0; border-left: 1px solid rgba(37,99,235,.22); padding-left: 12px; }
.hcl-ai-facts strong { display: block; color: #0f172a; font-size: 20px; font-weight: 950; line-height: 1; overflow-wrap: anywhere; }
.hcl-ai-facts span { display: block; margin-top: 5px; color: #64748b; font-size: 10.5px; font-weight: 850; line-height: 1.25; }
.hcl-schema { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.hcl-schema-card {
  min-width: 0; display: grid; gap: 7px; border: 1px solid #dbe4f0; border-top: 3px solid #0f766e;
  border-radius: 8px; background: #fff; padding: 12px; box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.hcl-schema-card:nth-child(2) { border-top-color: #2563eb; }
.hcl-schema-card:nth-child(3) { border-top-color: #ff6b2b; }
.hcl-schema-card:nth-child(4) { border-top-color: #64748b; }
.hcl-schema-card > svg { width: 28px; height: 28px; padding: 6px; border-radius: 8px; background: #f8fafc; color: #0f766e; }
.hcl-schema-card:nth-child(2) > svg { color: #2563eb; }
.hcl-schema-card:nth-child(3) > svg { color: #c2410c; }
.hcl-schema-card:nth-child(4) > svg { color: #475569; }
.hcl-schema-card strong { color: #0f172a; font-size: 13.5px; font-weight: 950; line-height: 1.35; overflow-wrap: anywhere; }
.hcl-schema-card p { margin: 0; color: #475569; font-size: 11.7px; font-weight: 730; line-height: 1.45; overflow-wrap: anywhere; }
.hcl-layout { display: grid; grid-template-columns: minmax(300px, .86fr) minmax(0, 1.5fr) minmax(330px, .92fr); gap: 12px; align-items: start; }
.hcl-panel {
  min-width: 0; display: grid; gap: 10px; border: 1px solid #dbe4f0; border-radius: 8px; background: #fff;
  padding: 12px; box-shadow: 0 1px 2px rgba(15,23,42,.05);
}
.hcl-panel--families, .hcl-panel--detail { position: sticky; top: 12px; max-height: calc(100dvh - 84px); overflow: auto; }
.hcl-panel-head { min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; border-bottom: 1px solid #eef2f7; padding-bottom: 9px; }
.hcl-panel-head span { color: #64748b; font-size: 10.8px; font-weight: 950; text-transform: uppercase; }
.hcl-panel-head strong { min-width: 0; color: #0f172a; font-size: 12.5px; font-weight: 950; line-height: 1.35; text-align: right; overflow-wrap: anywhere; }
.hcl-panel-head--mini { margin-top: 12px; }
.hcl-family-list { display: grid; gap: 8px; }
.hcl-family {
  min-width: 0; display: grid; gap: 7px; border: 1px solid #dbe4f0; border-left: 4px solid #94a3b8;
  border-radius: 8px; background: #fff; padding: 11px; text-align: left; color: inherit; cursor: pointer;
  font-family: "Be Vietnam Pro", sans-serif; transition: border-color .15s, background .15s, box-shadow .15s;
}
.hcl-family:hover, .hcl-family.is-active { border-color: #ffb489; border-left-color: #ff6b2b; background: #fffaf7; box-shadow: 0 8px 20px rgba(255,107,43,.1); }
.hcl-family-top, .hcl-family-dates { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hcl-family-top span {
  width: fit-content; max-width: 100%; border: 1px solid #dbe4f0; border-radius: 999px; background: #f8fafc;
  color: #475569; padding: 2px 7px; font-size: 10.5px; font-weight: 900; line-height: 1.25;
}
.hcl-family-top em { color: #0f766e; font-size: 10.8px; font-style: normal; font-weight: 850; line-height: 1.25; text-align: right; }
.hcl-family strong { color: #0f172a; font-size: 13px; font-weight: 950; line-height: 1.36; overflow-wrap: anywhere; }
.hcl-family small { color: #64748b; font-size: 11.2px; font-style: normal; font-weight: 730; line-height: 1.4; overflow-wrap: anywhere; }
.hcl-family-dates b { min-width: 0; color: #475569; font-size: 10.8px; font-weight: 850; line-height: 1.3; overflow-wrap: anywhere; }
.hcl-timeline-title {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border: 1px solid #eef2f7; border-radius: 8px; background: #fbfcfe; padding: 9px 10px;
}
.hcl-timeline-title span { color: #2563eb; font-size: 11px; font-weight: 950; text-transform: uppercase; }
.hcl-timeline-title strong { min-width: 0; color: #334155; font-size: 11.5px; font-weight: 900; text-align: right; overflow-wrap: anywhere; }
.hcl-tree { min-width: 0; display: grid; gap: 9px; padding: 2px 0 2px 4px; }
.hcl-node { position: relative; min-width: 0; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 9px; align-items: start; }
.hcl-node::before { content: ""; position: absolute; left: 16px; top: 34px; bottom: -9px; width: 2px; background: #dbe4f0; }
.hcl-node:last-child::before { display: none; }
.hcl-node-dot {
  width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px;
  background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; font-size: 10.5px; font-weight: 950; z-index: 1;
}
.hcl-node--signed_scan > .hcl-node-dot, .hcl-node--appendix_scan > .hcl-node-dot { background: #ecfdf5; color: #047857; border-color: #bbf7d0; }
.hcl-node--appendix > .hcl-node-dot, .hcl-node--amendment_appendix > .hcl-node-dot { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.hcl-node--liquidation > .hcl-node-dot { background: #f1f5f9; color: #475569; border-color: #cbd5e1; }
.hcl-node-card {
  min-width: 0; min-height: 76px; display: grid; gap: 8px; border: 1px solid #dbe4f0; border-radius: 8px; background: #fff;
  padding: 11px 12px; text-align: left; color: inherit; cursor: pointer; font-family: "Be Vietnam Pro", sans-serif;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.hcl-node-card:hover, .hcl-node-card.is-active { border-color: #ff9f75; background: #fffaf7; box-shadow: 0 8px 20px rgba(15,23,42,.08); }
.hcl-node-card-head { min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.hcl-node-card-head strong { min-width: 0; color: #0f172a; font-size: 13px; font-weight: 950; line-height: 1.35; overflow-wrap: anywhere; }
.hcl-node-card-head b {
  flex: 0 0 auto; border: 1px solid #dbe4f0; border-radius: 999px; background: #f8fafc;
  color: #475569; padding: 2px 7px; font-size: 10px; font-weight: 900; line-height: 1.25;
}
.hcl-node-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.hcl-node-meta span {
  min-height: 24px; display: inline-flex; align-items: center; gap: 5px; border: 1px solid #eef2f7; border-radius: 999px;
  background: #fbfcfe; color: #64748b; padding: 2px 7px; font-size: 10.8px; font-weight: 800; line-height: 1.2;
}
.hcl-node-alert { color: #b91c1c; font-size: 11px; font-weight: 850; line-height: 1.45; }
.hcl-children { grid-column: 2; display: grid; gap: 9px; margin-top: 8px; padding-left: 14px; border-left: 2px solid #e2e8f0; }
.hcl-detail { display: grid; gap: 10px; }
.hcl-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.hcl-detail-head span { color: #64748b; font-size: 10.8px; font-weight: 950; text-transform: uppercase; }
.hcl-detail-head h3 { margin: 3px 0 0; color: #0f172a; font-size: 17px; font-weight: 950; line-height: 1.28; overflow-wrap: anywhere; }
.hcl-detail-head b { flex: 0 0 auto; border: 1px solid #bbf7d0; border-radius: 999px; background: #ecfdf5; color: #047857; padding: 4px 8px; font-size: 10.8px; font-weight: 950; }
.hcl-insight {
  display: grid; gap: 5px; border: 1px solid #bfdbfe; border-radius: 8px; background: #eff6ff; padding: 10px;
}
.hcl-insight--ok { border-color: #bbf7d0; background: #ecfdf5; }
.hcl-insight--warn { border-color: #fed7aa; background: #fff7ed; }
.hcl-insight span { display: inline-flex; align-items: center; gap: 6px; color: #2563eb; font-size: 10.8px; font-weight: 950; text-transform: uppercase; }
.hcl-insight--ok span { color: #047857; }
.hcl-insight--warn span { color: #c2410c; }
.hcl-insight strong { color: #0f172a; font-size: 12.8px; font-weight: 950; line-height: 1.35; overflow-wrap: anywhere; }
.hcl-insight p { margin: 0; color: #334155; font-size: 11.5px; font-weight: 760; line-height: 1.45; overflow-wrap: anywhere; }
.hcl-detail-section-title {
  display: inline-flex; align-items: center; gap: 7px; color: #334155; font-size: 11.5px; font-weight: 950; text-transform: uppercase;
}
.hcl-facts { display: grid; grid-template-columns: 1fr; gap: 8px; }
.hcl-facts div {
  min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  border: 1px solid #eef2f7; border-radius: 8px; background: #fbfcfe; padding: 9px 10px;
}
.hcl-facts span { color: #64748b; font-size: 11px; font-weight: 900; text-transform: uppercase; }
.hcl-facts strong { color: #0f172a; font-size: 12.5px; font-weight: 950; overflow-wrap: anywhere; }
.hcl-warning { margin: 0; border: 1px solid #fed7aa; border-radius: 8px; background: #fff7ed; color: #9a3412; padding: 9px 10px; font-size: 11.5px; font-weight: 800; line-height: 1.45; }
.hcl-artifacts { display: grid; gap: 8px; }
.hcl-artifact {
  min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center;
  border: 1px solid #dbe4f0; border-radius: 8px; background: #fff; padding: 9px 10px;
}
.hcl-artifact strong { display: block; color: #0f172a; font-size: 12.5px; font-weight: 950; line-height: 1.34; overflow-wrap: anywhere; }
.hcl-artifact span { display: block; margin-top: 3px; color: #64748b; font-size: 11px; font-weight: 730; line-height: 1.35; overflow-wrap: anywhere; }
.hcl-events { display: grid; gap: 7px; }
.hcl-events div { min-width: 0; display: grid; gap: 3px; border: 1px solid #eef2f7; border-radius: 8px; background: #fbfcfe; padding: 8px 9px; }
.hcl-events span { color: #64748b; font-size: 10.5px; font-weight: 850; }
.hcl-events strong { color: #0f172a; font-size: 12px; font-weight: 950; overflow-wrap: anywhere; }
.hcl-events small, .hcl-empty-line { color: #64748b; font-size: 11.5px; font-weight: 730; line-height: 1.45; overflow-wrap: anywhere; }
.hcl-empty { min-height: 168px; align-content: center; }
.hcl-error { align-items: center; }
@media (max-width: 1180px) {
  .hcl-command, .hcl-layout { grid-template-columns: 1fr; }
  .hcl-panel--families, .hcl-panel--detail { position: static; max-height: none; }
  .hcl-metrics, .hcl-schema { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hcl-ai-strip { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .hcl-command { padding: 10px; gap: 10px; }
  .hcl-hero { padding: 15px; }
  .hcl-hero h1 { font-size: 23px; }
  .hcl-search, .hcl-metrics, .hcl-schema, .hcl-artifact, .hcl-ai-facts { grid-template-columns: 1fr; }
  .hcl-actions { gap: 8px; }
  .hcl-panel { padding: 10px; }
  .hcl-family-top, .hcl-family-dates, .hcl-node-card-head { align-items: flex-start; flex-direction: column; }
  .hcl-ai-facts div { border-left: 0; border-top: 1px solid rgba(37,99,235,.18); padding: 8px 0 0; }
}

.hlo-review-stage {
  --hlo-review-head-min: 76px;
  min-height: calc(100dvh - 88px);
  background: #fff; border: 1px solid #dbe4f0; border-radius: 8px; padding: 0; box-shadow: 0 1px 2px rgba(15,23,42,.05);
}
.hlo-filter-menu { position: relative; width: auto; max-width: min(240px, 100%); min-width: 0; }
.hlo-filter-menu summary::-webkit-details-marker { display: none; }
.hlo-filter-trigger {
  min-height: 34px; max-width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 7px; list-style: none;
  border: 1px solid #dbe4f0; background: rgba(255,255,255,.92); color: #334155; border-radius: 8px; padding: 0 10px;
  font-size: 12px; font-weight: 850; cursor: pointer; box-shadow: 0 1px 2px rgba(15,23,42,.05); user-select: none;
}
.hlo-filter-trigger:hover, .hlo-filter-menu[open] .hlo-filter-trigger { color: #ff5f2a; border-color: #ffc5ab; background: #fff7ed; }
.hlo-filter-trigger span { color: #64748b; font-weight: 800; }
.hlo-filter-trigger b { min-width: 0; max-width: 118px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #0f172a; }
.hlo-filter-trigger em {
  min-width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; background: #ff6b2b; color: #fff; padding: 0 6px;
  font-style: normal; font-size: 10.5px; font-weight: 900; line-height: 1;
}
.hlo-filter-chevron { transition: transform .15s ease; }
.hlo-filter-menu[open] .hlo-filter-chevron { transform: rotate(180deg); }
.hlo-filter-menu-pop {
  position: absolute; z-index: 28; top: calc(100% + 8px); right: 0; width: min(280px, calc(100vw - 48px));
  display: grid; gap: 4px; padding: 6px; border: 1px solid #dbe4f0; background: #fff; border-radius: 8px;
  box-shadow: 0 18px 42px rgba(15,23,42,.16);
}
.hlo-filter-item {
  min-height: 36px; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 8px;
  color: #334155; border-radius: 7px; padding: 8px 9px; text-decoration: none; font-size: 12px; font-weight: 800;
}
.hlo-filter-item:hover { background: #f8fafc; color: #ff5f2a; }
.hlo-filter-item.is-active { background: #fff7ed; color: #ff5f2a; }
.hlo-filter-item b {
  min-width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; background: #e2e8f0; color: #334155; font-size: 11px; padding: 0 7px;
}
.hlo-filter-item.is-active b { background: #ff6b2b; color: #fff; }

.hlo-workbench {
  display: grid; grid-template-columns: clamp(340px, 26vw, 460px) minmax(0, 1fr);
  gap: 0; align-items: stretch; min-height: calc(100dvh - 88px);
}
.hlo-overview.is-list-collapsed .hlo-workbench { grid-template-columns: 58px minmax(0, 1fr); }
.hlo-overview.is-list-collapsed .hlo-list-panel { display: none; }
.hlo-list-panel, .hlo-insight-panel {
  border: 0; background: transparent; border-radius: 0; box-shadow: none;
}
.hlo-list-panel {
  position: sticky; top: 12px; max-height: calc(100dvh - 88px); min-height: min(760px, calc(100dvh - 88px));
  padding: 16px 12px 12px; display: flex; flex-direction: column; overflow: hidden;
  border-right: 1px solid #e5edf7;
}
.hlo-list-actions { display: inline-flex; align-items: flex-start; justify-content: flex-end; gap: 7px; flex: 0 0 auto; margin-left: auto; }
.hlo-list-toggle { flex: 0 0 auto; }
.hlo-list-peek {
  width: 42px; height: 42px; position: sticky; top: 12px; margin: 12px 0 0 10px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid #dde5ef; background: #fff; color: #334155; border-radius: 8px; padding: 0;
  font-size: 12px; font-weight: 800; cursor: pointer; box-shadow: 0 1px 2px rgba(15,23,42,.05);
}
.hlo-list-peek:hover { color: #ff6b2b; border-color: #ffd0bd; background: #fff7ed; }
.hlo-list-peek span { display: none; }
.hlo-insight-panel { min-height: min(760px, calc(100dvh - 88px)); overflow: visible; }
.hlo-insight-head {
  min-height: var(--hlo-review-head-min); display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
/* AI-MARK[QAI-UI:helen-review-header-align] 2026-07-15 10:25 (GMT+7) — đồng bộ chiều cao header trái/phải trong màn xem nhanh,
   tránh panel danh sách bị trôi thấp hơn tiêu đề hồ sơ. | rel: UI-L4-Helen, helen.js viewReviewList */
.hlo-panel-head {
  height: var(--hlo-review-head-min); min-height: var(--hlo-review-head-min);
  flex: 0 0 auto; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 0 2px; border-bottom: 1px solid #eef2f7; margin-bottom: 10px;
}
.hlo-panel-head-main { min-width: 0; display: grid; gap: 3px; padding-top: 1px; overflow: hidden; }
.hlo-eyebrow { color: #94a3b8; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.hlo-panel-title { color: #0f172a; font-size: 17px; font-weight: 800; margin-top: 2px; }
.hlo-panel-head-main .hlo-eyebrow, .hlo-panel-head-main .hlo-panel-title, .hlo-panel-sub {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hlo-panel-sub { color: #64748b; font-size: 12px; font-weight: 750; line-height: 1.35; }
.hlo-icon-btn {
  width: 34px; height: 34px; border-radius: 8px; border: 1px solid #e2e8f0; background: #fff; color: #64748b;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: color .15s, border-color .15s, background .15s;
}
.hlo-icon-btn:hover { color: #ff6b2b; border-color: #ffd0bd; background: #fff7ed; }
.hlo-query-pill {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%; border-radius: 999px; background: #f8fafc; color: #475569;
  border: 1px solid #e2e8f0; padding: 5px 10px; font-size: 12px; font-weight: 700; margin-bottom: 10px; overflow-wrap: anywhere;
}
.hlo-contract-list {
  flex: 1 1 auto; min-height: 0; display: grid; align-content: start; gap: 8px; max-height: none;
  overflow: auto; padding-right: 7px; padding-bottom: 12px; scroll-snap-type: y proximity; overscroll-behavior: contain;
}
.hlo-contract {
  position: relative; display: grid; grid-template-columns: 5px minmax(0, 1fr); gap: 9px;
  border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; padding: 9px; cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background .15s, transform .15s; scroll-snap-align: start;
}
.hlo-contract:hover, .hlo-contract.is-active { border-color: #ff9f75; box-shadow: 0 8px 22px rgba(15,23,42,.09); }
.hlo-contract:hover { transform: translateY(-1px); }
.hlo-contract.is-active { background: #fffaf7; border-color: #ff6b2b; box-shadow: 0 10px 26px rgba(255,107,43,.14); }
.hlo-contract-rail { width: 5px; border-radius: 999px; background: #cbd5e1; align-self: stretch; }
.hlo-contract--attention .hlo-contract-rail { background: #ff6b2b; }
.hlo-contract--urgent .hlo-contract-rail { background: #dc2626; }
.hlo-contract--expiry .hlo-contract-rail { background: #2563eb; }
.hlo-contract--ready .hlo-contract-rail { background: #059669; }
.hlo-contract-main { min-width: 0; }
.hlo-contract-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 22px; }
.hlo-contract-kicker { min-width: 0; display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.hlo-contract-source {
  display: inline-flex; align-items: center; gap: 4px; color: #1d4ed8; background: #eff6ff; border: 1px solid #bfdbfe;
  border-radius: 999px; padding: 2px 7px; font-size: 10px; font-weight: 850; white-space: nowrap;
}
.hlo-contract--inventory { border-left-color: #2563eb; }
.hlo-contract--inventory .hlo-contract-rail { background: #2563eb; }
.hlo-contract-state {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; border-radius: 999px; padding: 0 7px;
  font-size: 10px; font-weight: 850; color: #c2410c; background: #fff7ed; border: 1px solid #fed7aa; white-space: nowrap;
}
.hlo-contract--urgent .hlo-contract-state { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.hlo-contract--expiry .hlo-contract-state { color: #1d4ed8; background: #eff6ff; border-color: #bfdbfe; }
.hlo-contract--ready .hlo-contract-state { color: #047857; background: #ecfdf5; border-color: #bbf7d0; }
.hlo-contract-type {
  max-width: 148px; height: 22px; display: inline-flex; align-items: center; border-radius: 999px;
  color: #475569; background: #f8fafc; border: 1px solid #e2e8f0; padding: 0 7px; font-size: 10px; font-weight: 800;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hlo-contract-title {
  color: #0f172a; font-size: 13px; font-weight: 850; line-height: 1.28; margin-top: 6px; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hlo-contract-sub {
  min-width: 0; display: flex; align-items: center; gap: 4px; color: #64748b; font-size: 11px; font-weight: 750;
  margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hlo-party-line { display: grid; grid-template-columns: 1fr; gap: 5px; margin-top: 7px; }
.hlo-party-line span {
  min-width: 0; display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: center; gap: 6px;
  color: #334155; font-size: 11.5px; line-height: 1.3;
}
.hlo-party-line b {
  width: 20px; height: 20px; border-radius: 6px; background: #f1f5f9; color: #475569; display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto; font-size: 10.5px; font-weight: 850;
}
.hlo-party-line--inventory b { background: #eff6ff; color: #1d4ed8; }
.hlo-party-line em { min-width: 0; font-style: normal; white-space: normal; overflow-wrap: anywhere; }
.hlo-contract-metrics {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin-top: 8px;
}
.hlo-contract-metrics span {
  min-width: 0; height: 31px; display: grid; grid-template-columns: 15px minmax(0, 1fr); grid-template-rows: 14px 11px;
  column-gap: 4px; align-items: center; border: 1px solid #eef2f7; background: #fbfcfe; border-radius: 7px; padding: 4px 5px;
}
.hlo-contract-metrics svg { grid-row: 1 / 3; color: #64748b; }
.hlo-contract-metrics b { min-width: 0; color: #0f172a; font-size: 11.5px; font-weight: 850; line-height: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hlo-contract-metrics em { color: #94a3b8; font-size: 9.5px; font-style: normal; font-weight: 800; line-height: 1; text-transform: uppercase; }
.hlo-contract-alerts { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.hlo-contract-alerts span {
  min-height: 20px; display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 2px 7px;
  color: #9a3412; background: #fff7ed; border: 1px solid #fed7aa; font-size: 10px; font-weight: 850; white-space: nowrap;
}

.hlo-signal {
  display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; font-size: 11px; font-weight: 800;
  padding: 3px 10px; white-space: nowrap; border: 1px solid transparent;
}
.hlo-signal--ready { background: #ecfdf5; color: #047857; border-color: #bbf7d0; }
.hlo-signal--attention { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.hlo-signal--urgent { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.hlo-signal--expiry { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }

.hlo-insight { padding: 16px; }
.hlo-insight-title { color: #0f172a; font-size: 19px; font-weight: 800; line-height: 1.3; margin-top: 2px; overflow-wrap: anywhere; }
.hlo-insight-sub { color: #64748b; font-size: 12.5px; font-weight: 700; margin-top: 4px; overflow-wrap: anywhere; }
.hlo-security {
  display: flex; align-items: flex-start; gap: 8px; border: 1px solid #bbf7d0; background: #f0fdf4; color: #166534;
  border-radius: 8px; padding: 9px 10px; font-size: 12px; font-weight: 700; line-height: 1.45; margin-top: 12px;
}
.hlo-security svg { flex: 0 0 auto; margin-top: 1px; }
.hlo-identity {
  border: 1px solid #fed7aa; background: linear-gradient(180deg, #fff7ed 0%, #fff 58%);
  border-radius: 8px; padding: 12px; margin-top: 12px; box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.hlo-identity-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.hlo-identity-title { color: #0f172a; font-size: 16px; font-weight: 900; margin-top: 2px; line-height: 1.22; overflow-wrap: anywhere; }
.hlo-identity-badge {
  display: inline-flex; align-items: center; gap: 5px; color: #c2410c; background: #ffedd5; border: 1px solid #fed7aa;
  border-radius: 999px; padding: 4px 8px; font-size: 11px; font-weight: 800; white-space: nowrap;
}
.hlo-identity-brief {
  color: #334155; font-size: 12.5px; line-height: 1.62; margin-top: 8px; overflow-wrap: anywhere;
  border-left: 3px solid #fdba74; padding-left: 10px;
}
.hlo-identity-signals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.hlo-identity-signal {
  min-width: 0; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 8px; align-items: start;
  border: 1px solid #e2e8f0; border-top: 3px solid #cbd5e1; background: rgba(255,255,255,.94); border-radius: 8px; padding: 9px;
}
.hlo-identity-signal > svg {
  width: 30px; height: 30px; border-radius: 8px; padding: 7px; background: #f8fafc; color: #64748b;
}
.hlo-identity-signal span { display: block; color: #94a3b8; font-size: 10px; font-weight: 900; text-transform: uppercase; line-height: 1.1; }
.hlo-identity-signal b { display: block; color: #0f172a; font-size: 12.5px; font-weight: 950; line-height: 1.22; margin-top: 4px; overflow-wrap: anywhere; }
.hlo-identity-signal em { display: block; color: #64748b; font-size: 11px; font-style: normal; font-weight: 700; line-height: 1.35; margin-top: 4px; overflow-wrap: anywhere; }
.hlo-identity-signal--fee { border-top-color: #2563eb; }
.hlo-identity-signal--fee > svg { background: #dbeafe; color: #2563eb; }
.hlo-identity-signal--warn { border-top-color: #f97316; }
.hlo-identity-signal--warn > svg { background: #ffedd5; color: #ea580c; }
.hlo-identity-signal--risk { border-top-color: #dc2626; }
.hlo-identity-signal--risk > svg { background: #fee2e2; color: #dc2626; }
.hlo-identity-signal--ok { border-top-color: #16a34a; }
.hlo-identity-signal--ok > svg { background: #dcfce7; color: #16a34a; }
.hlo-identity-signal--muted { opacity: .82; }
.hlo-action-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: center;
  border: 1px solid #fed7aa; background: #fffaf5; border-radius: 8px; padding: 9px; margin-top: 12px;
}
.hlo-action-label {
  display: inline-flex; align-items: center; gap: 6px; color: #9a3412; font-size: 11.5px; font-weight: 900; white-space: nowrap;
}
.hlo-action-buttons { min-width: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.hlo-quick-btn {
  min-height: 32px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid #e2e8f0; background: #fff; color: #334155; border-radius: 8px; padding: 7px 10px;
  font-size: 12px; font-weight: 800; cursor: pointer; transition: color .15s, border-color .15s, background .15s, box-shadow .15s;
}
.hlo-quick-btn:hover { color: #ff6b2b; border-color: #ffd0bd; background: #fff7ed; box-shadow: 0 2px 8px rgba(255,107,43,.08); }
.hlo-quick-btn:disabled { cursor: not-allowed; opacity: .45; background: #f8fafc; color: #94a3b8; box-shadow: none; }
.hlo-quick-btn--copy { margin-left: auto; color: #0f172a; }
.hlo-section-anchor { scroll-margin-top: 140px; }
.hlo-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.hlo-field-mini, .hlo-party-mini {
  min-width: 0; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; align-items: start;
  border: 1px solid #e2e8f0; background: linear-gradient(180deg,#fff 0%,#fbfcfe 100%); border-radius: 8px; padding: 11px;
}
.hlo-field-mini > svg, .hlo-party-mini > svg {
  width: 32px; height: 32px; border-radius: 8px; padding: 7px; background: #f1f5f9; color: #64748b;
}
.hlo-field-mini-label { color: #64748b; font-size: 10.5px; font-weight: 900; text-transform: uppercase; line-height: 1.12; }
.hlo-field-mini-value { color: #0f172a; font-size: 14px; font-weight: 900; line-height: 1.32; margin-top: 5px; overflow-wrap: anywhere; }
.hlo-party-mini { border-left: 4px solid #2563eb; }
.hlo-party-name { color: #0f172a; font-size: 14px; font-weight: 900; line-height: 1.32; margin-top: 5px; overflow-wrap: anywhere; }
.hlo-party-role { color: #64748b; font-size: 11.5px; font-weight: 700; line-height: 1.35; margin-top: 5px; overflow-wrap: anywhere; }
.hlo-insight-section { margin-top: 14px; border-top: 1px solid #eef2f7; padding-top: 14px; }
.hlo-section-title { display: flex; align-items: center; gap: 7px; color: #0f172a; font-size: 13px; font-weight: 800; margin-bottom: 9px; }
.hlo-section-title svg { color: #ff6b2b; }
.hlo-muted { color: #94a3b8; font-size: 12.5px; font-weight: 600; padding: 8px 0; }
.hlo-clause-list { display: grid; gap: 8px; }
.hlo-fee-smart { display: grid; gap: 8px; }
.hlo-fee-readout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.hlo-fee-readout div {
  border: 1px solid #fed7aa; background: #fff7ed; border-radius: 8px; padding: 10px; min-width: 0;
}
.hlo-fee-readout span { display: block; color: #9a3412; font-size: 10.5px; font-weight: 900; text-transform: uppercase; }
.hlo-fee-readout b { display: block; color: #0f172a; font-size: 22px; font-weight: 950; line-height: 1; margin-top: 4px; }
.hlo-fee-readout em { display: block; color: #64748b; font-size: 11.5px; font-style: normal; font-weight: 700; line-height: 1.35; margin-top: 5px; }
.hlo-fee-list { display: grid; gap: 8px; }
.hlo-fee-item {
  border: 1px solid #e2e8f0; border-left: 4px solid #ff6b2b; background: #fff; border-radius: 8px; overflow: hidden;
}
.hlo-fee-item-head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, auto); gap: 12px; align-items: start;
  padding: 12px; border-bottom: 1px solid #eef2f7; background: linear-gradient(180deg,#fff 0%,#fbfcfe 100%);
}
.hlo-fee-item-head span { display: block; color: #94a3b8; font-size: 10.5px; font-weight: 900; text-transform: uppercase; }
.hlo-fee-item-head b { display: block; color: #0f172a; font-size: 14px; font-weight: 950; line-height: 1.3; margin-top: 4px; overflow-wrap: anywhere; }
.hlo-fee-item-head em { display: block; color: #64748b; font-size: 11.5px; font-weight: 700; font-style: normal; line-height: 1.35; margin-top: 4px; overflow-wrap: anywhere; }
.hlo-fee-item-head strong {
  color: #c2410c; background: #fff7ed; border: 1px solid #fed7aa; border-radius: 8px; padding: 8px 10px;
  font-size: 13px; font-weight: 950; line-height: 1.25; text-align: right; overflow-wrap: anywhere;
}
.hlo-fee-item-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.hlo-fee-datum { min-width: 0; padding: 10px 12px; border-right: 1px solid #eef2f7; }
.hlo-fee-datum:last-child { border-right: 0; }
.hlo-fee-datum span { display: flex; align-items: center; gap: 6px; color: #64748b; font-size: 10.5px; font-weight: 900; text-transform: uppercase; }
.hlo-fee-datum span svg { color: #94a3b8; }
.hlo-fee-datum b { display: block; color: #0f172a; font-size: 12.5px; font-weight: 850; line-height: 1.38; margin-top: 5px; overflow-wrap: anywhere; }
.hlo-clause-item { border: 1px solid #eef2f7; background: #fff; border-radius: 8px; padding: 12px; }
.hlo-clause-item.has-ai-highlight { border-color: #fed7aa; background: linear-gradient(180deg, #fffaf5 0%, #fff 62%); }
.hlo-clause-top { display: flex; align-items: center; gap: 7px; min-width: 0; }
.hlo-clause-top span { flex: 0 0 auto; border-radius: 6px; background: #fff7ed; color: #ea580c; padding: 2px 7px; font-size: 11px; font-weight: 800; }
.hlo-clause-top b { min-width: 0; color: #0f172a; font-size: 13.5px; overflow-wrap: anywhere; }
.hlo-clause-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.hlo-clause-meta em {
  border: 1px solid #e2e8f0; background: #f8fafc; color: #64748b; border-radius: 999px;
  padding: 3px 8px; font-size: 11px; font-weight: 800; font-style: normal;
}
.hlo-clause-meta .hlo-clause-ai-tag {
  display: inline-flex; align-items: center; gap: 4px; background: #fff7ed; color: #c2410c; border-color: #fed7aa;
}
.hlo-clause-meta .hlo-clause-source {
  display: inline-flex; align-items: center; gap: 4px; color: #1d4ed8; background: #eff6ff; border-color: #bfdbfe;
}
.hlo-clause-summary {
  margin-top: 10px; border: 1px solid #e2e8f0; background: #fbfcfe; border-radius: 8px; padding: 10px;
}
.hlo-clause-summary-label {
  display: flex; align-items: center; gap: 6px; color: #c2410c; font-size: 11px; font-weight: 800; text-transform: uppercase;
}
.hlo-clause-summary p { color: #1f2937; font-size: 13px; line-height: 1.6; margin: 6px 0 0; overflow-wrap: anywhere; }
.hlo-clause-points { display: grid; gap: 6px; margin-top: 9px; }
.hlo-clause-points span {
  display: block; border-left: 3px solid #fdba74; background: #fff; color: #334155; border-radius: 6px;
  padding: 7px 9px; font-size: 12.5px; line-height: 1.5; font-weight: 650; overflow-wrap: anywhere;
}
.hlo-clause-detail { margin-top: 8px; border: 1px solid #eef2f7; border-radius: 8px; background: #fff; overflow: hidden; }
.hlo-clause-detail summary {
  list-style: none; min-height: 38px; display: flex; align-items: center; gap: 8px; padding: 9px 10px;
  color: #334155; font-size: 12px; font-weight: 800; cursor: pointer; user-select: none;
}
.hlo-clause-detail summary::-webkit-details-marker { display: none; }
.hlo-clause-detail summary span { display: inline-flex; align-items: center; gap: 6px; min-width: 0; flex: 1 1 auto; }
.hlo-clause-detail summary b {
  color: #ea580c; background: #fff7ed; border: 1px solid #fed7aa; border-radius: 999px; padding: 3px 8px;
  font-size: 11px; font-weight: 800; white-space: nowrap;
}
.hlo-clause-detail summary .hlo-detail-less { display: none; }
.hlo-clause-detail[open] summary { border-bottom: 1px solid #eef2f7; background: #fffaf7; }
.hlo-clause-detail[open] summary .hlo-detail-more { display: none; }
.hlo-clause-detail[open] summary .hlo-detail-less { display: inline-flex; }
.hlo-clause-detail[open] summary > svg { transform: rotate(180deg); }
.hlo-clause-body { color: #334155; font-size: 13px; line-height: 1.68; padding: 10px; overflow-wrap: anywhere; }
.hlo-clause-body p { margin: 0; }
.hlo-clause-body p + p { margin-top: 8px; border-left: 2px solid #fed7aa; padding-left: 10px; color: #475569; }
.hlo-ai-highlight {
  border-radius: 5px; padding: 0 3px; font-weight: 700; color: #0f172a; background: #fef3c7;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
.hlo-ai-highlight--money { background: #dcfce7; color: #166534; }
.hlo-ai-highlight--time { background: #dbeafe; color: #1d4ed8; }
.hlo-ai-highlight--security { background: #ede9fe; color: #6d28d9; }
.hlo-ai-highlight--risk { background: #fee2e2; color: #b91c1c; }
.hlo-ai-highlight--party { background: #e0f2fe; color: #0369a1; }
.hlo-risk-overview { display: grid; gap: 10px; }
.hlo-risk-status {
  display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; align-items: center;
  border: 1px solid #e2e8f0; background: #fbfcfe; border-radius: 8px; padding: 10px 12px;
}
.hlo-risk-status > svg {
  width: 36px; height: 36px; border-radius: 8px; padding: 8px; background: #f8fafc; color: #64748b;
}
.hlo-risk-status b { display: block; color: #0f172a; font-size: 13px; font-weight: 900; line-height: 1.2; }
.hlo-risk-status span { display: block; color: #64748b; font-size: 12.5px; font-weight: 650; line-height: 1.45; margin-top: 3px; }
.hlo-risk-status.is-critical { border-color: #fecaca; background: #fef2f2; }
.hlo-risk-status.is-critical > svg { background: #fee2e2; color: #dc2626; }
.hlo-risk-status.is-watch { border-color: #fed7aa; background: #fff7ed; }
.hlo-risk-status.is-watch > svg { background: #ffedd5; color: #ea580c; }
.hlo-risk-status.is-clear { border-color: #bbf7d0; background: #f0fdf4; }
.hlo-risk-status.is-clear > svg { background: #dcfce7; color: #16a34a; }
.hlo-risk-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.hlo-risk-metric {
  min-height: 74px; display: grid; align-content: center; gap: 3px;
  border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; padding: 10px 12px;
}
.hlo-risk-metric span { color: #64748b; font-size: 11px; font-weight: 850; text-transform: uppercase; }
.hlo-risk-metric b { color: #0f172a; font-size: 24px; font-weight: 950; line-height: 1; }
.hlo-risk-metric em { color: #94a3b8; font-size: 11px; font-style: normal; font-weight: 750; overflow-wrap: anywhere; }
.hlo-risk-metric--high { border-left: 4px solid #dc2626; }
.hlo-risk-metric--medium { border-left: 4px solid #f97316; }
.hlo-risk-metric--missing { border-left: 4px solid #2563eb; }
.hlo-risk-issues { display: grid; gap: 8px; }
.hlo-risk-issue {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) minmax(190px, .58fr); gap: 10px; align-items: start;
  border: 1px solid #e2e8f0; border-left: 4px solid #94a3b8; border-radius: 8px; background: #fff; padding: 10px;
}
.hlo-risk-issue-icon {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: #f8fafc; color: #64748b;
}
.hlo-risk-issue--high { border-left-color: #dc2626; background: linear-gradient(90deg, #fff7f7 0%, #fff 38%); }
.hlo-risk-issue--high .hlo-risk-issue-icon { background: #fee2e2; color: #dc2626; }
.hlo-risk-issue--medium { border-left-color: #f97316; background: linear-gradient(90deg, #fff7ed 0%, #fff 38%); }
.hlo-risk-issue--medium .hlo-risk-issue-icon { background: #ffedd5; color: #ea580c; }
.hlo-risk-issue--low { border-left-color: #64748b; }
.hlo-risk-issue--missing { border-left-color: #2563eb; background: linear-gradient(90deg, #eff6ff 0%, #fff 38%); }
.hlo-risk-issue--missing .hlo-risk-issue-icon { background: #dbeafe; color: #2563eb; }
.hlo-risk-issue-body { min-width: 0; }
.hlo-risk-issue-body > div { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.hlo-risk-issue-body b { color: #0f172a; font-size: 13px; font-weight: 900; line-height: 1.25; overflow-wrap: anywhere; }
.hlo-risk-issue-body em {
  color: #64748b; background: #f1f5f9; border-radius: 999px; padding: 2px 7px; font-size: 10.5px; font-style: normal; font-weight: 850;
}
.hlo-risk-issue-body span, .hlo-risk-issue-body p {
  display: block; color: #64748b; font-size: 12px; font-weight: 650; line-height: 1.42; margin: 4px 0 0; overflow-wrap: anywhere;
}
.hlo-risk-issue-action {
  align-self: stretch; border: 1px solid #eef2f7; background: #fbfcfe; border-radius: 8px; padding: 9px;
  color: #334155; font-size: 12px; font-weight: 750; line-height: 1.4;
}
.hlo-risk-empty {
  display: flex; align-items: center; gap: 8px; border: 1px solid #bbf7d0; background: #f0fdf4;
  color: #166534; border-radius: 8px; padding: 10px 12px; font-size: 12.5px; font-weight: 800;
}

/* AI-MARK[QAI-UI:helen-legal-native] 2026-07-12 23:51 (GMT+7) — khối phụ lục/đầu mối ở cuối hồ sơ nhanh;
   hiện đầy đủ biểu phí và điều khoản đã phân tích của từng phụ lục, phân biệt rõ dữ liệu chính/bổ sung mà không lộ trường kỹ thuật hay đường dẫn nguồn. | rel: BROKER-CORE:appendix-provenance, QAI-UI:helen-review */
.hlo-section-intro { color: #64748b; font-size: 12px; font-weight: 650; line-height: 1.48; margin: -2px 0 9px; }
.hlo-appendix-section { border-top-color: #bfdbfe; }
.hlo-appendix-list { display: grid; gap: 7px; }
.hlo-appendix-item {
  border: 1px solid #bfdbfe; background: linear-gradient(90deg, #eff6ff 0%, #fff 68%); border-radius: 8px; overflow: hidden;
}
.hlo-appendix-item.is-needs-source { border-color: #fed7aa; background: linear-gradient(90deg, #fff7ed 0%, #fff 68%); }
.hlo-appendix-heading { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 9px 10px; }
.hlo-appendix-heading > svg { color: #2563eb; }
.hlo-appendix-item.is-needs-source .hlo-appendix-heading > svg { color: #c2410c; }
.hlo-appendix-heading b, .hlo-appendix-heading span { display: block; overflow-wrap: anywhere; }
.hlo-appendix-heading b { color: #0f172a; font-size: 12.5px; font-weight: 900; line-height: 1.28; }
.hlo-appendix-heading span { color: #64748b; font-size: 11px; font-weight: 700; margin-top: 2px; }
.hlo-appendix-heading em { color: #1d4ed8; font-size: 10.5px; font-style: normal; font-weight: 850; text-align: right; }
.hlo-appendix-item.is-needs-source .hlo-appendix-heading em { color: #c2410c; }
.hlo-appendix-content { border-top: 1px solid #dbeafe; padding: 10px; }
.hlo-appendix-content-group + .hlo-appendix-content-group { margin-top: 12px; }
.hlo-appendix-content-group > b { display: block; color: #1e3a8a; font-size: 11px; font-weight: 900; margin: 0 0 7px; }
.hlo-appendix-content .hlo-fee-list, .hlo-appendix-content .hlo-clause-list { gap: 7px; }
.hlo-appendix-empty { align-items: flex-start; border-top: 1px solid #fed7aa; color: #9a3412; display: flex; font-size: 11.5px; font-weight: 750; gap: 7px; line-height: 1.45; padding: 10px; }
.hlo-appendix-empty > svg { flex: 0 0 auto; margin-top: 1px; }
.hlo-appendix-clauses { margin-top: 10px; }
.hlo-appendix-clauses > b { display: block; color: #1e3a8a; font-size: 11px; font-weight: 900; margin: 0 0 7px; }
.hlo-contacts-section { border-top-color: #bbf7d0; }
.hlo-contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.hlo-contact-card { min-width: 0; border: 1px solid #dbe4f0; border-left: 4px solid #16a34a; background: #fff; border-radius: 8px; padding: 9px 10px; }
.hlo-contact-card--appendix { border-left-color: #2563eb; background: #f8faff; }
.hlo-contact-card span { display: block; color: #64748b; font-size: 10.5px; font-weight: 850; text-transform: uppercase; }
.hlo-contact-card b { display: block; color: #0f172a; font-size: 12.5px; font-weight: 850; line-height: 1.35; margin-top: 4px; overflow-wrap: anywhere; }
.hlo-insight-empty {
  min-height: 580px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  text-align: center; color: #94a3b8; font-size: 13px; font-weight: 700; padding: 24px;
}
.hlo-error {
  border: 1px solid #fecaca; background: #fef2f2; color: #991b1b; border-radius: 8px; padding: 12px;
  display: flex; align-items: flex-start; gap: 10px; max-width: 760px;
}
.hlo-error span { display: block; color: #b91c1c; font-size: 12.5px; margin-top: 2px; }
.hlo-section-anchor.is-ai-focused,
.hlo-section-anchor.is-helen-focused,
.hld-agent-section.is-helen-focused {
  outline: 2px solid rgba(255,107,43,.78); outline-offset: 3px;
  box-shadow: 0 0 0 7px rgba(255,107,43,.10);
  transition: outline-color .18s ease, box-shadow .18s ease;
}

/* AI-MARK[QAI-UI:helen-agent-router] 2026-07-13 00:34 (GMT+7) — neo bảng hỏi nhanh phía TRÊN nút Helen;
   đuôi hội thoại, glow nhẹ và trạng thái mở/đóng liên kết trực quan với điểm bấm. | rel: HELEN-ORCH:web-chat, QAI-UI:helen-review */
.hag-dock { position: fixed; right: 22px; bottom: 22px; z-index: 55; display: flex; flex-direction: column; align-items: flex-end; gap: 18px; max-width: min(440px, calc(100vw - 44px)); }
.hag-launcher { position: relative; isolation: isolate; min-height: 50px; display: inline-flex; align-items: center; gap: 9px; border: 1px solid rgba(255,255,255,.13); border-radius: 999px; background: linear-gradient(135deg, #182646 0%, #0f172a 56%, #111827 100%); color: #fff; padding: 0 15px 0 10px; font-size: 13px; font-weight: 900; cursor: pointer; box-shadow: 0 16px 36px rgba(15,23,42,.28), inset 0 1px 0 rgba(255,255,255,.11); transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.hag-launcher::before { content: ''; position: absolute; z-index: -1; inset: -5px; border: 1px solid rgba(255,107,43,.34); border-radius: inherit; opacity: 0; transform: scale(.9); transition: opacity .18s ease, transform .18s ease; }
.hag-launcher:hover { background: linear-gradient(135deg, #ff7a3d, #ea580c); transform: translateY(-2px); box-shadow: 0 20px 40px rgba(234,88,12,.27), inset 0 1px 0 rgba(255,255,255,.2); }
.hag-launcher:focus-visible { outline: 3px solid rgba(255,107,43,.45); outline-offset: 3px; }
.hag-launcher.is-active { background: linear-gradient(135deg, #ff7a3d, #ea580c); box-shadow: 0 18px 38px rgba(234,88,12,.28), inset 0 1px 0 rgba(255,255,255,.22); }
.hag-dock.is-open .hag-launcher::before { opacity: 1; transform: scale(1); animation: hag-launcher-pulse 1.9s ease-in-out infinite; }
.hag-launcher-spark { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: rgba(255,255,255,.15); color: #ffd5bd; box-shadow: inset 0 1px 0 rgba(255,255,255,.22); }
.hag-launcher-chevron { margin-left: 1px; color: rgba(255,255,255,.78); transition: transform .18s ease; }
.hag-launcher.is-active .hag-launcher-chevron { transform: rotate(180deg); }
.hag-quick { position: relative; order: -1; width: min(420px, calc(100vw - 44px)); display: grid; gap: 11px; border: 1px solid #dbe4f0; border-radius: 18px; background: linear-gradient(145deg, #fff 0%, #fffaf7 100%); padding: 16px; box-shadow: 0 24px 64px rgba(15,23,42,.25); transform-origin: right bottom; animation: hag-quick-in .2s cubic-bezier(.2,.9,.22,1); }
.hag-quick::after { content: ''; position: absolute; right: 34px; bottom: -9px; width: 17px; height: 17px; border-right: 1px solid #dbe4f0; border-bottom: 1px solid #dbe4f0; background: #fffaf7; transform: rotate(45deg); }
.hag-quick::before { content: ''; position: absolute; right: 41px; bottom: -24px; width: 2px; height: 16px; border-radius: 99px; background: linear-gradient(#ffb17d, rgba(255,107,43,0)); }
.hag-quick > div:first-child { padding-right: 28px; }
.hag-quick b, .hag-quick span { display: block; }
.hag-quick b { color: #0f172a; font-size: 13px; font-weight: 900; line-height: 1.38; }
.hag-quick span { margin-top: 3px; color: #64748b; font-size: 11.5px; font-weight: 650; line-height: 1.45; }
.hag-quick-form { display: grid; grid-template-columns: minmax(0, 1fr) 36px; gap: 7px; align-items: end; border: 1px solid #dbe4f0; border-radius: 12px; background: #f8fafc; padding: 7px 7px 7px 10px; }
.hag-quick-form textarea, .hag-chat-form textarea { width: 100%; resize: none; border: 0; outline: none; background: transparent; color: #0f172a; font: inherit; font-size: 13px; font-weight: 700; line-height: 1.38; min-height: 31px; max-height: 150px; padding: 6px 0; }
.hag-quick-form button, .hag-chat-form button { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 10px; background: #ff6b2b; color: #fff; cursor: pointer; }
.hag-quick-form button:hover, .hag-chat-form button:hover { background: #ea580c; }
.hag-suggestions { display: flex; flex-wrap: wrap; gap: 6px; }
.hag-suggestions button { border: 1px solid #dbe4f0; border-radius: 999px; background: #fff; color: #334155; padding: 5px 8px; font-size: 10.5px; font-weight: 850; cursor: pointer; }
.hag-suggestions button:hover { border-color: #fed7aa; background: #fff7ed; color: #c2410c; }
.hag-close, .hag-icon { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 8px; background: transparent; color: #64748b; cursor: pointer; }
.hag-close { position: absolute; top: 9px; right: 9px; }
.hag-close:hover, .hag-icon:hover { background: #f1f5f9; color: #0f172a; }
.hag-overlay { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 30px; background: rgba(15,23,42,.52); backdrop-filter: blur(5px); }
.hag-chat { position: relative; width: min(1080px, 100%); height: min(780px, calc(100vh - 60px)); min-height: 480px; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; border: 1px solid #cbd5e1; border-radius: 20px; background: #fff; box-shadow: 0 34px 90px rgba(15,23,42,.38); }
.hag-chat > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 24px 17px; border-bottom: 1px solid #e2e8f0; background: linear-gradient(120deg, #fff7ed 0%, #fff 58%); }
.hag-chat > header span { display: inline-flex; align-items: center; gap: 6px; color: #c2410c; font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }
.hag-chat > header h2 { margin: 5px 0 3px; color: #0f172a; font-size: 20px; font-weight: 950; letter-spacing: -.02em; }
.hag-chat > header p { max-width: 720px; margin: 0; color: #64748b; font-size: 12.5px; font-weight: 650; line-height: 1.48; }
.hag-chat-body { display: grid; gap: 12px; align-content: start; overflow: auto; padding: 22px 24px; background: #f8fafc; }
.hag-chat-empty { display: grid; gap: 6px; justify-items: start; color: #64748b; font-size: 13px; font-weight: 650; line-height: 1.5; padding: 10px; }
.hag-chat-empty svg { color: #ea580c; }
.hag-chat-empty b { color: #0f172a; font-size: 14px; font-weight: 900; }
.hag-message { max-width: min(82%, 760px); border-radius: 14px; padding: 11px 13px; white-space: pre-line; overflow-wrap: anywhere; font-size: 13px; font-weight: 650; line-height: 1.56; }
.hag-message--user { justify-self: end; background: #ff6b2b; color: #fff; border-bottom-right-radius: 4px; }
.hag-message--helen { justify-self: start; border: 1px solid #e2e8f0; background: #fff; color: #0f172a; border-bottom-left-radius: 4px; }
.hag-message--typing { display: inline-flex; align-items: center; gap: 5px; min-width: 56px; }
.hag-message--typing span { width: 6px; height: 6px; border-radius: 999px; background: #94a3b8; animation: helenblink 1.2s infinite both; }
.hag-message--typing span:nth-child(2) { animation-delay: .2s; }
.hag-message--typing span:nth-child(3) { animation-delay: .4s; }
.hag-message--file { display: inline-flex; align-items: center; gap: 8px; }
.hag-message--file svg { color: #ea580c; animation: hlx-spin 1s linear infinite; }
.hag-chat-form { display: grid; grid-template-columns: 42px minmax(0, 1fr) 42px; gap: 10px; align-items: end; padding: 14px 18px; border-top: 1px solid #e2e8f0; background: #fff; }
.hag-chat-form textarea { min-height: 38px; padding: 8px 4px; }
.hag-chat-form button { width: 42px; height: 42px; border-radius: 12px; }
.hag-chat-form button:disabled { opacity: .6; cursor: wait; }
.hag-chat-form button:disabled svg { animation: hlx-spin 1s linear infinite; }
.hag-chat-form .hag-chat-attach { border: 1px solid #dbe4f0; background: #f8fafc; color: #475569; }
.hag-chat-form .hag-chat-attach:hover { border-color: #fed7aa; background: #fff7ed; color: #c2410c; }
.hag-chat-form .hag-chat-attach:disabled svg { animation: none; }
.hag-composer-main { min-width: 0; display: grid; gap: 4px; }
.hag-upload-chip { width: fit-content; max-width: 100%; display: inline-flex; align-items: center; gap: 5px; border: 1px solid #bbf7d0; background: #f0fdf4; color: #047857; border-radius: 999px; padding: 4px 8px; font-size: 10.5px; font-weight: 850; overflow-wrap: anywhere; }
.hag-file-drop { position: absolute; inset: 16px; z-index: 4; display: none; align-content: center; justify-items: center; gap: 7px; border: 2px dashed #fb923c; border-radius: 16px; background: rgba(255,247,237,.96); color: #c2410c; pointer-events: none; text-align: center; padding: 24px; }
.hag-file-drop b { color: #9a3412; font-size: 16px; font-weight: 950; }
.hag-file-drop span { color: #64748b; font-size: 12px; font-weight: 700; }
.hag-chat.is-dragging .hag-file-drop { display: grid; }
@keyframes hag-quick-in { from { opacity: 0; transform: translateY(10px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes hag-launcher-pulse { 50% { opacity: .45; transform: scale(1.04); } }

.hlo-chat-dock {
  position: fixed; right: 22px; bottom: 22px; z-index: 45; pointer-events: none;
  display: flex; align-items: flex-end; justify-content: flex-end; max-width: calc(100vw - 44px);
}
.hlo-chat-dock.is-open {
  left: 50%; right: auto; width: min(820px, calc(100vw - 112px)); transform: translateX(-50%);
  justify-content: center;
}
.hlo-chat-dock.is-thread {
  width: min(560px, calc(100vw - 44px));
}
.hlo-chat-dock.is-open.is-thread {
  left: auto; right: 22px; transform: none; justify-content: flex-end;
}
.hlo-chat-launcher {
  min-height: 46px; display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px;
  background: #0f172a; color: #fff; padding: 0 16px; font-size: 13px; font-weight: 800; cursor: pointer;
  box-shadow: 0 16px 36px rgba(15,23,42,.24); pointer-events: auto;
}
.hlo-chat-launcher:hover { background: #ff6b2b; }
.hlo-chat-dock.is-open .hlo-chat-launcher { display: none; }
.hlo-smart-chat-panel {
  display: none; width: 100%; max-height: min(680px, calc(100vh - 96px));
  border: 1px solid #dbe4f0; background: #fff; border-radius: 14px; overflow: hidden;
  box-shadow: 0 24px 64px rgba(15,23,42,.28); pointer-events: auto;
}
.hlo-chat-dock.is-open.is-thread .hlo-smart-chat-panel { display: grid; grid-template-rows: auto minmax(260px, 1fr) auto; }
.hlo-chat-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  padding: 14px 14px 12px; border-bottom: 1px solid #eef2f7; background: #fbfcfe;
}
.hlo-chat-head b { display: block; color: #0f172a; font-size: 13px; font-weight: 850; }
.hlo-chat-head span { display: block; color: #64748b; font-size: 11.5px; font-weight: 700; margin-top: 2px; }
.hlo-chat-body { padding: 14px; overflow: auto; display: grid; gap: 10px; align-content: start; background: #f8fafc; }
.hlo-chat-empty { color: #64748b; display: grid; gap: 6px; justify-items: start; font-size: 12.5px; line-height: 1.45; }
.hlo-chat-empty b { color: #0f172a; font-size: 13px; }
.hlo-chat-msg { max-width: 86%; border-radius: 10px; padding: 9px 11px; font-size: 12.5px; line-height: 1.5; overflow-wrap: anywhere; }
.hlo-chat-msg div { white-space: pre-line; }
.hlo-chat-msg--user { justify-self: end; background: #ff6b2b; color: #fff; }
.hlo-chat-msg--helen { justify-self: start; background: #fff; color: #0f172a; border: 1px solid #e5edf7; }
.hlo-chat-msg--typing { display: inline-flex; align-items: center; gap: 4px; min-width: 58px; }
.hlo-chat-msg--typing span { width: 6px; height: 6px; border-radius: 999px; background: #94a3b8; animation: helenblink 1.2s infinite both; }
.hlo-chat-msg--typing span:nth-child(2) { animation-delay: .2s; }
.hlo-chat-msg--typing span:nth-child(3) { animation-delay: .4s; }
.hlo-ask-bar {
  display: none; width: 100%; pointer-events: auto;
  grid-template-columns: 34px 34px minmax(0, 1fr) 38px 34px; align-items: center; gap: 8px;
  border: 1px solid #dbe4f0; background: rgba(255,255,255,.96); backdrop-filter: blur(12px);
  border-radius: 22px; padding: 8px; box-shadow: 0 24px 64px rgba(15,23,42,.24);
}
.hlo-chat-dock.is-open .hlo-ask-bar { display: grid; }
.hlo-ask-bar.has-focus {
  grid-template-columns: 34px 34px minmax(0, 1fr) minmax(0, auto) 38px 34px;
}
.hlo-ask-bar--thread {
  border: 0; border-top: 1px solid #eef2f7; border-radius: 0; box-shadow: none; backdrop-filter: none;
  background: #fff; padding: 12px 14px; grid-template-columns: 34px minmax(0, 1fr) 38px; align-items: end;
}
.hlo-ask-mark {
  width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; background: #fff7ed; color: #ea580c; border: 1px solid #fed7aa;
}
.hlo-ask-attach {
  width: 34px; height: 34px; border-radius: 999px; border: 1px solid #e2e8f0; background: #fff; color: #64748b;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: 0 0 auto;
}
.hlo-ask-attach:hover { color: #ff6b2b; border-color: #ffd0bd; background: #fff7ed; }
.hlo-ask-attach.has-file { color: #0f766e; border-color: #99f6e4; background: #ecfdf5; }
.hlo-ask-attach:disabled { opacity: .62; cursor: not-allowed; }
.hlo-ask-attach:disabled svg { animation: hlx-spin 1s linear infinite; }
.hlo-ask-bar textarea {
  width: 100%; resize: none; min-height: 36px; max-height: 96px; border: 0; background: transparent;
  padding: 9px 2px; font-size: 13.5px; font-weight: 700; color: #0f172a; outline: none; overflow: hidden; line-height: 1.35;
}
.hlo-ask-bar textarea::placeholder { color: #94a3b8; font-weight: 700; }
.hlo-ask-focus {
  max-width: 190px; min-height: 30px; display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid #fed7aa; background: #fff7ed; color: #c2410c; border-radius: 999px;
  padding: 0 10px; font-size: 11.5px; font-weight: 850; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; justify-self: end;
}
.hlo-ask-send, .hlo-ask-close {
  width: 34px; height: 34px; border: 0; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; flex: 0 0 auto; justify-self: end;
}
.hlo-ask-send { width: 38px; background: #ff6b2b; color: #fff; }
.hlo-ask-send:disabled { opacity: .62; cursor: not-allowed; }
.hlo-ask-send:disabled svg { animation: hlx-spin 1s linear infinite; }
.hlo-ask-close { background: #f8fafc; color: #64748b; border: 1px solid #e2e8f0; }
.hlo-ask-close:hover { color: #ff6b2b; border-color: #ffd0bd; background: #fff7ed; }

@media (max-width: 1180px) {
  .hld-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hld-grid--top, .hld-grid--wide, .hld-grid--analysis { grid-template-columns: 1fr; }
  .hld-network-shell { grid-template-columns: 1fr; }
  .hld-network-readout { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hld-partner-row { grid-template-columns: 1fr; }
  .hld-partner-signals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hlo-review-stage { min-height: 0; }
  .hlo-filter-menu { flex: 0 1 auto; width: auto; max-width: min(240px, 100%); }
  .hlo-filter-trigger { width: auto; justify-content: center; }
  .hlo-filter-menu-pop { width: min(360px, calc(100vw - 48px)); }
  .hlo-workbench { grid-template-columns: 1fr; min-height: 0; }
  .hlo-overview.is-list-collapsed .hlo-workbench { grid-template-columns: 1fr; }
  .hlo-list-peek { position: static; width: 42px; height: 42px; padding: 0; margin: 10px; }
  .hlo-list-panel { position: static; max-height: none; min-height: 0; display: block; overflow: visible; border-right: 0; border-bottom: 1px solid #e5edf7; }
  .hlo-contract-list { max-height: none; overflow: visible; padding-right: 0; padding-bottom: 0; scroll-snap-type: none; }
  .hlo-insight-panel, .hlo-insight-empty { min-height: 0; }
  .hlo-identity-signals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .helen-page { padding: 8px; }
  .hld-dashboard { gap: 10px; }
  .hld-metrics { grid-template-columns: 1fr; }
  .hld-view-tabs { align-items: stretch; flex-direction: column; padding: 7px; }
  .hld-view-tabs-list { width: 100%; }
  .hld-view-tab { min-height: 36px; padding: 0 10px; font-size: 12px; }
  .hld-view-tabs-actions { align-items: stretch; justify-content: space-between; flex-wrap: wrap; width: 100%; }
  .hld-backend-link { flex: 1 1 170px; min-height: 36px; }
  .hld-view-tabs-note { flex: 1 1 210px; padding: 2px 4px 0; white-space: normal; }
  .hld-source-strip { align-items: flex-start; gap: 6px 8px; }
  .hld-source-strip span, .hld-source-strip em { flex-basis: 100%; }
  .hld-role-body { grid-template-columns: 1fr; justify-items: center; }
  .hld-legend { width: 100%; }
  .hld-network-map {
    min-height: 0; display: grid; grid-template-columns: 1fr; gap: 8px; padding: 12px;
  }
  .hld-network-lines { display: none; }
  .hld-network-center, .hld-network-node {
    position: static; transform: none; width: auto; min-height: 0;
  }
  .hld-network-center { border-radius: 8px; padding: 12px; }
  .hld-network-node-grid { grid-template-columns: 1fr; }
  .hld-network-node { grid-template-columns: 12px minmax(0, 1fr); }
  .hld-network-readout { grid-template-columns: 1fr; }
  .hld-partner-overview-stats, .hld-partner-mini-metrics { grid-template-columns: 1fr; }
  .hld-partner-detail-head, .hld-partner-contract-head { grid-template-columns: 1fr; }
  .hld-open-contract { width: fit-content; }
  .hld-commercial-scoreboard { grid-template-columns: 1fr; }
  .hld-commercial-card-head, .hld-commercial-fee-head { grid-template-columns: 1fr; }
  .hld-commercial-fee-head strong { text-align: left; }
  .hld-decision-strip { grid-template-columns: 1fr; }
  .hld-evidence-rail, .hld-evidence-rail > div { grid-template-columns: 1fr; }
  .hld-evidence-rail b { white-space: normal; }
  .hld-sla-scoreboard { grid-template-columns: 1fr; }
  .hld-sla-secondary-grid { grid-template-columns: 1fr; }
  .hld-sla-card-head { grid-template-columns: 1fr; }
  .hld-partner-list { border: 0; gap: 8px; overflow: visible; padding: 0; background: transparent; }
  .hld-partner-row { grid-template-columns: 1fr; border: 1px solid #eef2f7; border-radius: 8px; }
  .hld-partner-rolebars, .hld-partner-signals { grid-template-columns: 1fr; }
  .hlo-review-stage { padding: 0; }
  .hlo-filter-menu-pop { width: calc(100vw - 24px); }
  .hlo-insight { padding: 12px; }
  .hlo-insight-head { align-items: flex-start; }
  .hlo-insight-title { font-size: 17px; }
  .hlo-identity-head { align-items: flex-start; }
  .hlo-identity-signals { grid-template-columns: 1fr; }
  .hlo-security { font-size: 11.5px; }
  .hlo-action-row { grid-template-columns: 1fr; gap: 7px; }
  .hlo-action-buttons { justify-content: flex-start; }
  .hlo-quick-btn { min-height: 38px; }
  .hlo-field-grid, .hlo-risk-metrics, .hlo-contact-grid { grid-template-columns: 1fr; }
  .hlo-appendix-heading { grid-template-columns: 28px minmax(0, 1fr); }
  .hlo-appendix-heading em { grid-column: 2; text-align: left; }
  .hlo-risk-issue { grid-template-columns: 34px minmax(0, 1fr); }
  .hlo-risk-issue-action { grid-column: 2; }
  .hlo-quick-btn--copy { margin-left: 0; }
  .hlo-fee-readout, .hlo-fee-item-grid { grid-template-columns: 1fr; }
  .hlo-fee-item-head { grid-template-columns: 1fr; }
  .hlo-fee-item-head strong { text-align: left; }
  .hlo-fee-datum { border-right: 0; border-bottom: 1px solid #eef2f7; }
  .hlo-fee-datum:last-child { border-bottom: 0; }
  .hlo-clause-item { padding: 11px; }
  .hlo-clause-top { align-items: flex-start; }
  .hlo-chat-dock { left: 12px; right: 12px; bottom: 12px; justify-content: flex-end; }
  .hlo-chat-dock.is-open { left: 12px; right: 12px; width: auto; transform: none; }
  .hlo-chat-dock.is-thread { width: auto; }
  .hlo-chat-dock.is-open.is-thread { left: 12px; right: 12px; width: auto; transform: none; }
  .hlo-smart-chat-panel { max-height: min(560px, calc(100vh - 88px)); }
  .hlo-chat-launcher { min-height: 44px; padding: 0 14px; }
  .hlo-ask-bar { grid-template-columns: 34px 34px minmax(0, 1fr) 38px 34px; border-radius: 18px; }
  .hlo-ask-bar--thread { grid-template-columns: 34px minmax(0, 1fr) 38px; border-radius: 0; }
  .hlo-ask-focus { display: none; }
}
@media (max-width: 460px) {
  .hlo-action-buttons { display: grid; grid-template-columns: 1fr 1fr; }
  .hlo-quick-btn--copy { grid-column: 1 / 3; }
  .hlo-party-line { grid-template-columns: 1fr; gap: 3px; }
  .hlo-filter-trigger span { display: none; }
  .hlo-filter-trigger b { max-width: 112px; }
  .hlo-ask-mark { display: none; }
  .hlo-ask-bar { grid-template-columns: 34px minmax(0, 1fr) 38px 34px; }
  .hlo-ask-bar--thread { grid-template-columns: 34px minmax(0, 1fr) 38px; }
}

@media (max-width: 720px) {
  .hag-dock { right: 12px; bottom: 12px; gap: 16px; max-width: calc(100vw - 24px); }
  .hag-quick { width: min(420px, calc(100vw - 24px)); }
  .hag-overlay { place-items: stretch; padding: 0; }
  .hag-chat { width: 100%; height: 100dvh; min-height: 0; border: 0; border-radius: 0; }
  .hag-chat > header { padding: 17px 16px 14px; }
  .hag-chat > header h2 { font-size: 18px; }
  .hag-chat-body { padding: 16px; }
  .hag-message { max-width: 91%; }
  .hag-chat-form { padding: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .hag-launcher, .hag-launcher::before, .hag-launcher-chevron, .hag-quick { animation: none; transition: none; }
}

/* Danh sách hợp đồng dạng thẻ */
.hlr-list { display: grid; gap: 10px; }
.hlr-card {
  display: flex; align-items: flex-start; gap: 12px;
  border-radius: 16px; background: #fff; border: 1px solid #e2e8f0; box-shadow: 0 1px 3px rgba(2,6,23,.06);
  padding: 14px 16px; cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.hlr-card:hover { border-color: #FF6B2B; box-shadow: 0 4px 14px rgba(255,107,43,.12); }
.hlr-card-icon {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(135deg,#FF6B2B,#f43f5e); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.hlr-card-main { flex: 1 1 auto; min-width: 0; }
.hlr-card-title { font-size: 14px; font-weight: 800; color: #0f172a; line-height: 1.35; }
.hlr-card-sub { font-size: 12.5px; color: #64748b; margin-top: 2px; }
.hlr-card-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; align-items: center; }

/* Badge trạng thái hồ sơ */
.hlr-badge { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 3px 10px; white-space: nowrap; }
.hlr-badge--pending { background: #fef3c7; color: #b45309; }
.hlr-badge--approved { background: #dcfce7; color: #15803d; }
.hlr-badge--legal_review { background: #dbeafe; color: #1d4ed8; }
.hlr-badge--needs_fix { background: #fee2e2; color: #b91c1c; }

/* Badge số trường chưa chắc */
.hlr-lowconf-badge {
  display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; font-size: 11px; font-weight: 700;
  padding: 3px 10px; background: #fff7ed; color: #ea580c; border: 1px solid #fed7aa; white-space: nowrap;
}
.hlr-lowconf-badge--zero { background: #f1f5f9; color: #64748b; border-color: #e2e8f0; }
/* AI-MARK[QAI-UI:helen-review] — badge "Thiếu điều khoản": HĐ 0 clause (needs_source), cần re-upload nguồn tốt hơn/nhập tay */
.hlr-needsrc-badge {
  display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; font-size: 11px; font-weight: 700;
  padding: 3px 10px; background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; white-space: nowrap;
}

/* Toolbar filter (search + đếm) trên list */
.hlr-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.hlr-count { font-size: 12.5px; color: #94a3b8; font-weight: 600; }

/* ── Detail view ── */
.hlr-detail-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  border-radius: 18px; background: linear-gradient(135deg,#fff7f5,#ffffff); border: 1px solid #ffe1d3;
  padding: 16px 18px; margin-bottom: 16px;
}
.hlr-detail-head-main { min-width: 0; flex: 1 1 320px; }
.hlr-detail-title { font-size: 17px; font-weight: 800; color: #0f172a; line-height: 1.35; }
.hlr-detail-sub { font-size: 13px; color: #64748b; margin-top: 3px; }
.hlr-detail-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.hlr-btn { display: inline-flex; align-items: center; gap: 6px; border-radius: 12px; font-size: 13px; font-weight: 700; padding: 9px 15px; cursor: pointer; border: 1px solid transparent; transition: opacity .15s, border-color .15s, background .15s; }
.hlr-btn--primary { background: linear-gradient(135deg,#FF6B2B,#f43f5e); color: #fff; box-shadow: 0 2px 8px rgba(255,107,43,.28); }
.hlr-btn--primary:hover { opacity: .95; }
.hlr-btn--secondary { background: #fff; border-color: #e2e8f0; color: #475569; }
.hlr-btn--secondary:hover { border-color: #FF6B2B; color: #FF6B2B; }
.hlr-btn--ghost { background: transparent; color: #64748b; }
.hlr-btn--ghost:hover { color: #0f172a; }
.hlr-btn:disabled { opacity: .55; cursor: not-allowed; }

/* Section card (Các bên / Thời hạn / Biểu phí / Điều khoản / Tuân thủ / Rủi ro) */
.hlr-section { border-radius: 16px; background: #fff; border: 1px solid #e2e8f0; box-shadow: 0 1px 3px rgba(2,6,23,.06); padding: 16px 18px; margin-bottom: 14px; }
.hlr-section-head { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; color: #0f172a; text-transform: uppercase; letter-spacing: .03em; margin-bottom: 12px; }
.hlr-section-head i, .hlr-section-head svg { color: #FF6B2B; }

/* Field row: label + value + confidence + evidence */
.hlr-field { border-radius: 12px; border: 1px solid #eef2f7; background: #fbfcfe; padding: 10px 12px; margin-bottom: 8px; }
.hlr-field:last-child { margin-bottom: 0; }
.hlr-field--warn { border-color: #fed7aa; background: #fff7ed; }
.hlr-field-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.hlr-field-label { font-size: 11.5px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: .02em; }
.hlr-field-value { font-size: 13.5px; font-weight: 700; color: #0f172a; margin-top: 2px; line-height: 1.45; overflow-wrap: anywhere; }
.hlr-field-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

/* Confidence pill */
.hlr-conf { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; font-size: 10.5px; font-weight: 800; padding: 2px 8px; white-space: nowrap; }
.hlr-conf--high { background: #dcfce7; color: #15803d; }
.hlr-conf--mid { background: #fef3c7; color: #b45309; }
.hlr-conf--low { background: #fee2e2; color: #b91c1c; }

/* Evidence (đường dẫn Điều + trích đoạn nguồn) */
.hlr-evidence { margin-top: 6px; border-radius: 10px; background: #f8fafc; border: 1px dashed #cbd5e1; padding: 7px 9px; font-size: 12px; color: #475569; line-height: 1.45; }
.hlr-evidence b { color: #0f172a; font-weight: 800; }
.hlr-evidence-path { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 800; color: #FF6B2B; text-transform: uppercase; letter-spacing: .02em; margin-bottom: 3px; }

/* Sửa (edit) inline input trong field */
.hlr-edit-input {
  width: 100%; border: 1px solid #e2e8f0; border-radius: 10px; padding: 7px 9px; font-size: 13px; color: #334155;
  background: #fff; outline: none; margin-top: 6px; font-family: inherit;
}
.hlr-edit-input:focus { border-color: #FF6B2B; box-shadow: 0 0 0 3px rgba(255,107,43,.14); }
.hlr-field-edit-btn {
  display: inline-flex; align-items: center; gap: 4px; border: 1px solid #e2e8f0; background: #fff; color: #475569;
  border-radius: 8px; font-size: 11px; font-weight: 700; padding: 4px 9px; cursor: pointer; transition: border-color .15s, color .15s;
}
.hlr-field-edit-btn:hover { border-color: #FF6B2B; color: #FF6B2B; }
.hlr-field-save-row { display: flex; gap: 6px; margin-top: 6px; }

/* Clause hierarchy (path 5.2.a) */
.hlr-clause { border-radius: 10px; border: 1px solid #eef2f7; background: #fff; padding: 9px 11px; margin-bottom: 6px; }
.hlr-clause--sub { margin-left: 18px; background: #fbfcfe; }
.hlr-clause-path { display: inline-flex; align-items: center; font-size: 10.5px; font-weight: 800; color: #FF6B2B; background: #fff7f5; border-radius: 6px; padding: 1px 7px; margin-right: 6px; }
.hlr-clause-title { font-size: 12.5px; font-weight: 700; color: #0f172a; }
.hlr-clause-text { font-size: 12.5px; color: #475569; margin-top: 4px; line-height: 1.5; }
.hlr-clause-text .helen-legal-text,
.hlr-evidence-text .helen-legal-text,
.hlr-risk-text .helen-legal-text { margin: 0; }
.hlr-evidence-text { margin-top: 4px; color: inherit; }
.hlr-risk-text { font-size: 12.5px; margin-top: 4px; }

/* Fee table */
.hlr-fee-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.hlr-fee-table th { text-align: left; color: #94a3b8; font-weight: 700; font-size: 10.5px; text-transform: uppercase; letter-spacing: .03em; padding: 6px 8px; border-bottom: 1px solid #eef2f7; }
.hlr-fee-table td { padding: 8px; border-bottom: 1px solid #f1f5f9; color: #334155; vertical-align: top; }

/* Risk indicator badges */
.hlr-risk { display: flex; align-items: flex-start; gap: 8px; border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; border: 1px solid; }
.hlr-risk--high { background: #fee2e2; border-color: #fecaca; color: #991b1b; }
.hlr-risk--med { background: #fff7ed; border-color: #fed7aa; color: #b45309; }
.hlr-risk--low { background: #f1f5f9; border-color: #e2e8f0; color: #475569; }

/* AI-MARK[QAI-UI:helen-create] — B4 panel "Helen tự soi" (vòng đọc↔tạo): advisory, không chặn duyệt */
.hlr-sr { border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; border: 1px solid; }
.hlr-sr--low { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.hlr-sr--med { background: #fff7ed; border-color: #fed7aa; color: #b45309; }
.hlr-sr--high { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.hlr-sr-head { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 13px; }
.hlr-sr-list { margin: 8px 0 0; padding-left: 18px; }
.hlr-sr-list li { font-size: 12.5px; margin-top: 4px; line-height: 1.5; }
.hlr-sr-ok { font-size: 12.5px; margin-top: 6px; }
.hlr-sr-foot { font-size: 11px; opacity: .8; margin-top: 8px; font-style: italic; }

/* Compliance row (co: true/false) */
.hlr-compliance-row { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-bottom: 1px solid #f1f5f9; }
.hlr-compliance-row:last-child { border-bottom: 0; }
.hlr-compliance-ico { flex-shrink: 0; width: 22px; height: 22px; border-radius: 999px; display: flex; align-items: center; justify-content: center; }
.hlr-compliance-ico--yes { background: #dcfce7; color: #15803d; }
.hlr-compliance-ico--no { background: #fee2e2; color: #b91c1c; }

/* Modal (Yêu cầu sửa) — mirror lyly modal shell */
.helen-modal-card { width: min(560px, 100%); max-height: calc(100vh - 48px); display: flex; flex-direction: column; overflow: hidden; border-radius: 20px; background: #fff; box-shadow: 0 25px 60px rgba(2,6,23,.28); }
.helen-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px; border-bottom: 1px solid #eef2f7; flex: 0 0 auto; }
.helen-modal-body { padding: 16px 18px; overflow: auto; }
.helen-modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 18px 18px; }

@media (max-width: 640px) {
  .hlr-detail-head { flex-direction: column; align-items: stretch; }
  .hlr-detail-actions { width: 100%; }
  .hlr-btn { flex: 1 1 auto; justify-content: center; }
}

/* ── AI-MARK[QAI-UI:helen-create] 2026-07-08 11:06 (GMT+7) — CSS "Tạo hợp đồng": wizard 3 bước (stepper/lưới mẫu/form Bên B/bộ dựng biểu phí) ĐÃ XOÁ
   cùng lúc xoá wizard JS (thay bằng chat split — xem block .hlx-* bên dưới). .hlc-article* GIỮ NGUYÊN — vẫn dùng ở tab "Bản nháp" (draftSectionsHtml/
   draftAppendicesHtml trong helen.js viewDraftDetail) | rel: UI-L4-Helen, QAI-UI:helen-create-chat, helen.js viewDraftDetail */

/* Kết quả bản nháp: từng Điều / Phụ lục — giữ nguyên xuống dòng Helen soạn (pre-wrap) */
.hlc-article { border-radius: 12px; border: 1px solid #eef2f7; background: #fbfcfe; padding: 12px 14px; margin-bottom: 10px; }
.hlc-article:last-child { margin-bottom: 0; }
.hlc-article-head { font-size: 12.5px; font-weight: 800; color: #FF6B2B; text-transform: uppercase; letter-spacing: .02em; margin-bottom: 5px; }
.hlc-article-text { font-size: 13px; color: #334155; line-height: 1.6; overflow-wrap: anywhere; }
.hlc-article-text .helen-legal-text { margin: 0; }

/* ── AI-MARK[QAI-UI:helen-create-chat] 2026-07-08 15:57 (GMT+7) — CSS "Soạn mới" R5: chat surface hiện đại,
   bubble compact, status-card cho Helen, composer kính mờ ở đáy, prompt cards sạch và pháp lý. KHÔNG dùng fixed/sticky (nằm trong flow trang thường,
   chống đè theo UI-STACKING-REGISTRY.md không cần z-index riêng) | rel: UI-L4-Helen, helen.js viewCreateNew, HELEN-ORCH:web-chat */

.hlx-chat-col {
  display: flex; flex-direction: column; background: transparent; border: 0; box-shadow: none; overflow: hidden;
}
/* AI-MARK[QAI-UI:helen-create-chat] 2026-07-08 14:30 (GMT+7) — FIX "input trôi giữa" TRIỆT ĐỂ: #helenMain thành flex-col (.helen-page--chat, bỏ
   padding + magic calc 100vh) → .hlx-create-wrap flex:1 LẤP ĐẦY chính xác (không đoán chiều cao topbar/subnav). Input LUÔN dính đáy viewport. | rel: UI-L4-Helen, helen.js viewCreateNew/renderTab */
/* Cột chính CAP đúng chiều cao viewport khi ở tab chat (shell dùng min-h-screen → nội dung dài đẩy input xuống dưới màn/tràn trên mobile).
   Chỉ bật khi viewCreateNew (helen-col--chat) → tab khác giữ nguyên cuộn trang bình thường. */
#helenMainCol.helen-col--chat { height: 100vh; height: 100dvh; overflow: hidden; }
.helen-page.helen-page--chat {
  padding: 0.75rem 1rem 1rem; display: flex; flex-direction: column; min-height: 0; overflow: hidden;
  background:
    linear-gradient(180deg, rgba(248,250,252,.96), rgba(241,245,249,.92)),
    linear-gradient(135deg, rgba(255,107,43,.04), rgba(14,165,233,.035));
}
@media (min-width: 768px) { .helen-page.helen-page--chat { padding: 1.15rem 2rem 1.35rem; } }
/* Layout FULL-HEIGHT flex: wrap = flex:1 lấp đầy #helenMain (đã là flex-col) → cột chat flex:1 → input dính đáy, không cần header */
.hlx-create-wrap { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; max-width: 1040px; width: 100%; margin: 0 auto; }
.hlx-create-wrap--workspace {
  max-width: none; margin: 0; display: grid; grid-template-columns: minmax(286px, 348px) minmax(0, 1fr);
  gap: 16px; align-items: stretch; width: 100%;
}
.hlx-create-history {
  min-height: 0; overflow: hidden; border: 1px solid rgba(203,213,225,.82); background: rgba(255,255,255,.86);
  border-radius: 18px; display: flex; flex-direction: column; box-shadow: 0 16px 42px rgba(15,23,42,.07);
}
.hlx-history-head {
  flex: 0 0 auto; padding: 14px; border-bottom: 1px solid #e2e8f0; display: flex; flex-direction: column; gap: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,250,252,.92));
}
.hlx-history-title-row { display: grid; gap: 3px; }
.hlx-history-kicker { font-size: 10.5px; font-weight: 850; text-transform: uppercase; letter-spacing: .04em; color: #94a3b8; }
.hlx-history-title { margin-top: 3px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 15px; font-weight: 850; color: #0f172a; }
.hlx-history-title span {
  min-width: 24px; height: 24px; padding: 0 8px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
  background: #fff7ed; border: 1px solid #fed7aa; color: #ea580c; font-size: 12px; font-weight: 850;
}
.hlx-history-actions { display: grid; grid-template-columns: minmax(0, 1fr) 42px; gap: 8px; align-items: center; }
.hlx-history-action {
  min-height: 42px; border-radius: 12px; border: 1px solid #dbe4f0; background: #fff; color: #334155;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 12.5px; font-weight: 850;
  font-family: inherit; cursor: pointer; transition: border-color .15s, background .15s, color .15s, transform .15s;
}
.hlx-history-action:hover { border-color: #fed7aa; background: #fff7ed; color: #ea580c; transform: translateY(-1px); }
.hlx-history-action--primary { border-color: rgba(255,107,43,.38); background: #ff6b2b; color: #fff; }
.hlx-history-action--primary:hover { background: #f05f22; color: #fff; border-color: #f05f22; }
.hlx-thread-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.hlx-thread-item {
  width: 100%; border: 1px solid transparent; background: transparent; border-radius: 12px; padding: 4px;
  display: grid; grid-template-columns: minmax(0, 1fr) 32px 32px; align-items: center; gap: 4px; color: #0f172a;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.hlx-thread-item:hover { background: #f8fafc; border-color: #e2e8f0; }
.hlx-thread-item.is-active { background: #fff7ed; border-color: #fed7aa; box-shadow: inset 3px 0 0 #ff6b2b; }
.hlx-thread-open {
  min-width: 0; border: 0; background: transparent; border-radius: 9px; padding: 8px 8px 8px 10px;
  display: flex; align-items: center; text-align: left; color: inherit; font-family: inherit; cursor: pointer;
}
.hlx-thread-edit-form { min-width: 0; display: grid; gap: 4px; padding: 6px 6px 6px 9px; }
.hlx-thread-title-input {
  width: 100%; min-width: 0; border: 1px solid #bfdbfe; border-radius: 9px; background: #fff;
  color: #0f172a; font: inherit; font-size: 12.5px; font-weight: 850; line-height: 1.25; padding: 7px 8px; outline: none;
}
.hlx-thread-title-input:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.11); }
.hlx-thread-edit,
.hlx-thread-delete,
.hlx-thread-save,
.hlx-thread-cancel {
  width: 32px; height: 32px; border-radius: 9px; border: 1px solid transparent; background: transparent; color: #94a3b8;
  display: inline-flex; align-items: center; justify-content: center; font-family: inherit; cursor: pointer; transition: border-color .15s, background .15s, color .15s;
}
.hlx-thread-edit:hover { border-color: #bfdbfe; background: #eff6ff; color: #2563eb; }
.hlx-thread-save:hover { border-color: #bbf7d0; background: #f0fdf4; color: #16a34a; }
.hlx-thread-cancel:hover { border-color: #e2e8f0; background: #f8fafc; color: #475569; }
.hlx-thread-delete:hover { border-color: #fecdd3; background: #fff1f2; color: #e11d48; }
.hlx-thread-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.hlx-thread-title { display: block; color: #0f172a; font-size: 13px; font-weight: 850; line-height: 1.35; white-space: normal; overflow-wrap: anywhere; }
.hlx-thread-sub { color: #64748b; font-size: 11px; font-weight: 750; line-height: 1.25; }
.hlx-thread-status { color: #0f766e; font-weight: 850; }
.hlx-thread-sync {
  display: flex; align-items: center; gap: 7px; border: 1px solid #e2e8f0; background: #f8fafc; border-radius: 10px;
  color: #64748b; font-size: 11.5px; font-weight: 800; padding: 8px 10px;
}
.hlx-thread-sync svg { animation: hlx-spin 1s linear infinite; }
.hlx-thread-sync.is-error { color: #b91c1c; background: #fff1f2; border-color: #fecdd3; }
.hlx-thread-empty { padding: 14px; border: 1px dashed #cbd5e1; border-radius: 12px; color: #64748b; font-size: 12px; font-weight: 750; text-align: center; }
/* Cột chat: LẤP đầy wrap (flex:1) thay vì chiều cao cố định calc(100vh-230px) → input luôn ở đáy, không trôi giữa/gap dưới */
.hlx-chat-col--solo { width: 100%; margin: 0; flex: 1 1 auto; min-height: 0; }

/* Cột trái — luồng chat */
.hlx-chat-scroll {
  flex: 1 1 auto; overflow-y: auto; padding: 34px 0 20px; display: flex; flex-direction: column; gap: 18px;
  scrollbar-gutter: stable; scroll-behavior: smooth;
}
.hlx-chat-form {
  flex: 0 0 auto; width: min(100%, 960px); margin: 0 auto; display: flex; align-items: flex-end; gap: 10px;
  padding: 9px 10px 9px 16px; border: 1px solid #dbe4f0;
  background: #fff; border-radius: 28px; box-shadow: none;
  backdrop-filter: none;
}
.hlx-chat-textarea {
  flex: 1 1 auto; resize: none; max-height: 160px; min-height: 46px; border: 0; border-radius: 20px; background: transparent;
  padding: 12px 2px; font-size: 14.5px; font-family: inherit; color: #0f172a; outline: none; line-height: 1.5;
}
.hlx-chat-textarea.is-guide-locked { color: #94a3b8; cursor: not-allowed; }
.hlx-chat-form:focus-within { border-color: rgba(255,107,43,.72); box-shadow: none; }
.hlx-chat-icon-btn {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 999px; border: 1px solid #e2e8f0; background: #f8fafc;
  color: #64748b; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: border-color .15s, color .15s, background .15s, transform .15s;
}
.hlx-chat-icon-btn:hover { border-color: rgba(255,107,43,.72); color: #FF6B2B; background: #fff7ed; transform: translateY(-1px); }
.hlx-chat-icon-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.hlx-chat-send-btn {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 999px; border: none; background: linear-gradient(135deg,#ff7a3d,#f24c5d);
  color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 6px 14px rgba(242,76,93,.16);
  transition: transform .15s, opacity .15s, box-shadow .15s;
}
.hlx-chat-send-btn:hover { opacity: .96; transform: translateY(-1px); box-shadow: 0 8px 18px rgba(242,76,93,.20); }
.hlx-chat-send-btn:disabled { opacity: .5; cursor: not-allowed; }

/* Gợi ý mở màn (chưa có tin nhắn nào) */
.hlx-chat-empty { width: 100%; max-width: 920px; margin: auto; padding: 18px 0 8px; color: #475569; }
.hlx-chat-chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; width: min(100%, 900px); margin: 0 auto; }
.hlx-chat-chip {
  min-height: 88px; display: grid; grid-template-columns: 34px 1fr; align-items: start; gap: 12px; border-radius: 18px;
  border: 1px solid rgba(226,232,240,.95); background: rgba(255,255,255,.86); color: #172033; font-size: 12.5px; font-weight: 700;
  line-height: 1.48; padding: 14px 15px; cursor: pointer; text-align: left; box-shadow: 0 10px 30px rgba(15,23,42,.055);
  transition: border-color .15s, background .15s, transform .15s, box-shadow .15s;
}
.hlx-chat-chip i, .hlx-chat-chip svg {
  width: 34px; height: 34px; padding: 8px; border-radius: 12px; color: #FF6B2B; background: #fff7ed; border: 1px solid #fed7aa; flex-shrink: 0;
}
.hlx-chat-chip:hover { border-color: rgba(255,107,43,.72); background: #fff; transform: translateY(-2px); box-shadow: 0 14px 34px rgba(15,23,42,.085); }
.hlx-custom-contract-wrap { display: flex; justify-content: center; margin-top: 16px; }
.hlx-custom-contract-btn {
  width: min(100%, 430px); display: inline-flex; align-items: center; justify-content: center; gap: 11px;
  border: 1px solid rgba(255,107,43,.48); border-radius: 16px; background: #fff; color: #0f172a;
  padding: 13px 16px; cursor: pointer; box-shadow: 0 12px 28px rgba(15,23,42,.06);
  transition: border-color .15s, transform .15s, box-shadow .15s, background .15s;
}
.hlx-custom-contract-btn:hover { border-color: #FF6B2B; background: #fffaf7; transform: translateY(-1px); box-shadow: 0 16px 34px rgba(15,23,42,.085); }
.hlx-custom-contract-btn i, .hlx-custom-contract-btn svg {
  width: 34px; height: 34px; padding: 8px; border-radius: 12px; color: #fff; background: linear-gradient(135deg,#ff7a3d,#f24c5d);
  box-shadow: 0 8px 18px rgba(242,76,93,.18);
}
.hlx-custom-contract-btn span { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; }
.hlx-custom-contract-btn strong { font-size: 13.5px; font-weight: 900; }
.hlx-custom-contract-btn small { color: #64748b; font-size: 11.5px; font-weight: 700; line-height: 1.35; }

/* Bubble hội thoại (user phải / Helen trái) */
.hlx-msg { width: 100%; max-width: 860px; margin: 0 auto; display: flex; align-items: flex-start; gap: 8px; }
.hlx-msg--helen { justify-content: flex-start; }
.hlx-msg--user { justify-content: flex-end; }
.hlx-msg-main { min-width: 0; width: fit-content; max-width: 100%; display: flex; flex-direction: column; gap: 5px; }
.hlx-msg--helen .hlx-msg-main { max-width: min(58%, 540px); }
.hlx-msg--contract .hlx-msg-main { width: min(100%, 760px); max-width: min(76%, 780px); }
.hlx-msg--guide .hlx-msg-main { width: min(100%, 720px); max-width: min(78%, 760px); }
.hlx-msg--user .hlx-msg-main { max-width: min(44%, 420px); align-items: flex-end; }
.hlx-msg-meta { padding: 0 4px; color: #94a3b8; font-size: 11px; font-weight: 750; line-height: 1.2; }
.hlx-msg--user .hlx-msg-meta { color: #64748b; text-align: right; }
.hlx-msg-avatar {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 999px; background: #fff;
  color: #FF6B2B; border: 1px solid #fed7aa; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 18px rgba(15,23,42,.08);
}
.hlx-bubble {
  display: inline-block; width: fit-content; max-width: 100%; min-width: 0; min-height: auto; border-radius: 12px; padding: 8px 11px;
  font-size: 13px; line-height: 1.42; overflow-wrap: anywhere; white-space: normal;
}
.hlx-bubble-text { margin: 0; display: block; white-space: pre-wrap; }
.hlx-bubble--helen {
  background: rgba(255,255,255,.96); color: #172033; border: 1px solid rgba(226,232,240,.95);
  border-bottom-left-radius: 6px; box-shadow: 0 8px 20px rgba(15,23,42,.055);
}
.hlx-bubble--user {
  background: #172033; color: #fff; border: 1px solid rgba(255,255,255,.08);
  border-bottom-right-radius: 6px; padding: 8px 12px; box-shadow: 0 8px 20px rgba(15,23,42,.12);
}
.hlx-bubble--loading { min-width: min(100%, 420px); color: #475569; }
.hlx-typing { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; color: #475569; }
.hlx-typing-dots { display: inline-flex; align-items: center; gap: 4px; padding: 7px 8px; border-radius: 999px; background: #f1f5f9; }
.hlx-typing-dots span { width: 6px; height: 6px; border-radius: 999px; background: #64748b; animation: hlx-typing 1.1s infinite both; }
.hlx-typing-dots span:nth-child(2) { animation-delay: .16s; }
.hlx-typing-dots span:nth-child(3) { animation-delay: .32s; }
@keyframes hlx-typing { 0%, 80%, 100% { opacity: .28; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }
.hlx-bubble--error { background: #fff1f2; color: #b91c1c; border: 1px solid #fecdd3; box-shadow: none; }
.hlx-bubble-artifacts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.hlx-bubble-artifact-chip {
  display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; background: #fff; border: 1px solid #e2e8f0;
  color: #0f172a; font-size: 11px; font-weight: 700; padding: 3px 9px;
}
.hlx-bubble--user .hlx-bubble-artifact-chip { background: rgba(255,255,255,.85); border-color: transparent; }

.hlx-guide-card {
  width: min(100%, 720px); border: 1px solid #dbe4f0; background: rgba(255,255,255,.98); border-radius: 16px;
  padding: 14px; box-shadow: 0 14px 32px rgba(15,23,42,.075);
}
.hlx-guide-head { display: grid; gap: 7px; margin-bottom: 12px; }
.hlx-guide-step {
  width: fit-content; border-radius: 999px; border: 1px solid #fed7aa; background: #fff7ed; color: #ea580c;
  font-size: 10.5px; font-weight: 900; padding: 3px 8px; text-transform: uppercase; letter-spacing: .03em;
}
.hlx-guide-head h3 { margin: 0; font-size: 14.5px; line-height: 1.42; color: #0f172a; font-weight: 850; }
.hlx-guide-head p { margin: 0; color: #64748b; font-size: 12.5px; line-height: 1.48; font-weight: 650; }
.hlx-guide-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.hlx-guide-option {
  min-height: 38px; border: 1px solid #e2e8f0; border-radius: 11px; background: #f8fafc; color: #243044;
  display: flex; align-items: center; gap: 7px; padding: 8px 10px; font: inherit; font-size: 12.2px; font-weight: 780;
  text-align: left; cursor: pointer; transition: border-color .15s, background .15s, color .15s, box-shadow .15s;
}
.hlx-guide-option i, .hlx-guide-option svg { flex: 0 0 auto; color: #94a3b8; }
.hlx-guide-option:hover { border-color: #fed7aa; background: #fff7ed; color: #0f172a; }
.hlx-guide-option.is-selected { border-color: #ff6b2b; background: #fff7ed; color: #c2410c; box-shadow: inset 0 0 0 1px rgba(255,107,43,.18); }
.hlx-guide-option.is-selected i, .hlx-guide-option.is-selected svg { color: #ff6b2b; }
.hlx-guide-custom {
  width: 100%; resize: vertical; min-height: 56px; max-height: 120px; border: 1px solid #dbe4f0; border-radius: 12px;
  background: #fff; color: #0f172a; padding: 10px 11px; font: inherit; font-size: 12.7px; line-height: 1.45; outline: none;
}
.hlx-guide-custom:focus { border-color: rgba(255,107,43,.7); box-shadow: 0 0 0 3px rgba(255,107,43,.1); }
.hlx-guide-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.hlx-guide-skip,
.hlx-guide-next {
  min-height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 11px; font: inherit; font-size: 12px; font-weight: 850; cursor: pointer; transition: background .15s, border-color .15s, transform .15s;
}
.hlx-guide-skip { border: 1px solid #e2e8f0; background: #fff; color: #64748b; }
.hlx-guide-skip:hover { border-color: #cbd5e1; background: #f8fafc; color: #334155; }
.hlx-guide-next { border: 1px solid #ff6b2b; background: #ff6b2b; color: #fff; }
.hlx-guide-next:hover { background: #f05f22; border-color: #f05f22; transform: translateY(-1px); }
.hlx-guide-card.is-answered { padding: 12px 14px; background: #ffffff; }
.hlx-guide-card.is-answered .hlx-guide-head { margin-bottom: 9px; }
.hlx-guide-answer {
  border: 1px solid #bbf7d0; background: #f0fdf4; color: #14532d; border-radius: 12px; padding: 9px 10px;
  display: grid; gap: 3px; font-size: 12.5px; line-height: 1.45;
}
.hlx-guide-answer span { color: #15803d; font-size: 10.5px; font-weight: 900; text-transform: uppercase; letter-spacing: .03em; }
.hlx-guide-answer strong { font-weight: 800; overflow-wrap: anywhere; }

/* AI-MARK[QAI-UI:helen-create-chat] 2026-07-15 10:14 (GMT+7) — preview HĐ rộng hơn, header có chip trạng thái trước nội dung,
   body dạng document sheet có fade khi thu gọn và action bar liền khối; bỏ nút mở thư mục vì trình duyệt không mở Finder/Explorer trực tiếp.
   | rel: UI-L4-Helen, helen.js chatContractCardHtml/applyDraftDone, HELEN-ORCH:web-chat (GET /chat/draft) */
.hlx-doc {
  border-radius: 18px; border: 1px solid #dbe4f0; background: #fff; overflow: hidden; max-width: 100%;
  box-shadow: 0 18px 44px rgba(15,23,42,.09);
}
.hlx-doc-head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: flex-start; gap: 12px; padding: 16px 18px 14px;
  border-bottom: 1px solid #eef2f7; background: linear-gradient(135deg,#fff8f4 0%,#ffffff 42%,#f8fbff 100%);
}
.hlx-doc-title-wrap { min-width: 0; display: grid; gap: 7px; }
.hlx-doc-kicker {
  width: fit-content; display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; border: 1px solid #fed7aa;
  background: #fff7ed; color: #c2410c; padding: 3px 8px; font-size: 10.5px; font-weight: 900; text-transform: uppercase; letter-spacing: .03em;
}
.hlx-doc-kicker i, .hlx-doc-kicker svg { color: #ff6b2b; flex: 0 0 auto; }
.hlx-doc-title { display: inline-flex; align-items: flex-start; gap: 7px; font-size: 15.5px; font-weight: 900; line-height: 1.35; color: #0f172a; overflow-wrap: anywhere; min-width: 0; }
.hlx-doc-title i, .hlx-doc-title svg { flex-shrink: 0; color: #FF6B2B; }
.hlx-doc-version {
  flex-shrink: 0; white-space: nowrap; font-size: 11px; font-weight: 900; color: #FF6B2B;
  background: #fff; border: 1px solid #fed7aa; border-radius: 999px; padding: 4px 10px;
}
.hlx-doc-meta-row {
  display: flex; flex-wrap: wrap; gap: 7px; padding: 10px 18px; border-bottom: 1px solid #eef2f7; background: #f8fafc;
}
.hlx-doc-meta-chip {
  display: inline-flex; align-items: center; gap: 5px; border: 1px solid #e2e8f0; border-radius: 999px; background: #fff;
  color: #475569; padding: 4px 9px; font-size: 11.5px; font-weight: 800; line-height: 1.2;
}
.hlx-doc-meta-chip i, .hlx-doc-meta-chip svg { flex: 0 0 auto; color: #64748b; }
.hlx-doc-meta-chip--saved { color: #047857; background: #ecfdf5; border-color: #bbf7d0; }
.hlx-doc-meta-chip--saved i, .hlx-doc-meta-chip--saved svg { color: #16a34a; }
.hlx-doc-body-wrap {
  position: relative; background: linear-gradient(180deg,#ffffff 0%,#fbfdff 100%); padding: 16px 18px;
}
.hlx-doc-body {
  padding: 17px 18px; font-size: 14.2px; color: #243044; line-height: 1.78; white-space: pre-wrap; overflow-wrap: anywhere;
  max-height: 340px; overflow-y: auto; border: 1px solid #e8eef6; border-radius: 14px; background: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}
.hlx-doc-body.is-expanded { max-height: none; overflow-y: visible; }
.hlx-doc-fade {
  position: absolute; left: 19px; right: 19px; bottom: 17px; height: 72px; border-radius: 0 0 13px 13px;
  background: linear-gradient(180deg,rgba(255,255,255,0),#fff 86%); pointer-events: none;
}
.hlx-doc-footer {
  display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding: 12px 14px 14px;
  border-top: 1px solid #eef2f7; background: #fbfdff;
}
.hlx-doc-actionbar {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 3px; max-width: 100%; padding: 3px;
  border: 1px solid #dbe4f0; border-radius: 14px; background: #fff; box-shadow: 0 8px 20px rgba(15,23,42,.055);
}
.hlx-doc-action {
  min-height: 34px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0;
  border-radius: 10px; background: transparent; color: #475569; padding: 7px 10px; font: inherit; font-size: 12px;
  font-weight: 850; cursor: pointer; transition: background .15s, color .15s, box-shadow .15s, transform .15s;
}
.hlx-doc-action i, .hlx-doc-action svg { flex: 0 0 auto; }
.hlx-doc-action:hover { background: #fff7ed; color: #ea580c; transform: translateY(-1px); }
.hlx-doc-action.is-primary { background: #172033; color: #fff; box-shadow: 0 6px 14px rgba(15,23,42,.14); }
.hlx-doc-action.is-primary:hover { background: #0f172a; color: #fff; }
.hlx-doc-action:disabled {
  opacity: .6; cursor: not-allowed; transform: none; box-shadow: none;
}

/* AI-MARK[QAI-UI:helen-create-chat] — R2b: card "Bản nháp từ chat (web+Telegram)" gộp trên tab Bản nháp */
.hlx-syncdraft { border-radius: 16px; border: 1px solid #bfdbfe; background: #eff6ff; padding: 14px 16px; margin-bottom: 16px; }
.hlx-syncdraft-head { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; color: #1d4ed8; text-transform: uppercase; letter-spacing: .02em; }
.hlx-syncdraft-title { font-size: 14px; font-weight: 700; color: #0f172a; margin-top: 6px; overflow-wrap: anywhere; }
.hlx-syncdraft-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* AI-MARK[QAI-UI:helen-create-chat] 2026-07-08 14:30 (GMT+7) — Timeline "các bước Helen đang thực hiện" (kiểu Claude) hiện trong bubble khi đang
   soạn/chỉnh: mỗi bước pending(xám)→active(spinner cam)→done(check xanh). | rel: UI-L4-Helen, helen.js chatDraftStepsHtml/startDraftSteps */
.hlx-bubble--steps { width: min(100%, 520px); padding: 14px 16px; }
.hlx-steps { display: flex; flex-direction: column; gap: 0; width: 100%; }
.hlx-steps-title { font-size: 12.5px; font-weight: 800; color: #0f172a; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.hlx-steps-title i, .hlx-steps-title svg { color: #FF6B2B; }
.hlx-step { position: relative; display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; font-size: 12.5px; line-height: 1.45; }
.hlx-step:not(:last-child)::after { content: ""; position: absolute; left: 9px; top: 25px; bottom: -5px; width: 1px; background: #e2e8f0; }
.hlx-step-ico { position: relative; z-index: 1; flex: 0 0 auto; width: 19px; height: 19px; border-radius: 999px; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.hlx-step-ico i, .hlx-step-ico svg { width: 12px; height: 12px; }
.hlx-step--pending .hlx-step-ico { background: #eef2f7; color: #94a3b8; }
.hlx-step--pending .hlx-step-label { color: #94a3b8; }
.hlx-step--active .hlx-step-ico { background: #fff7ed; color: #FF6B2B; border: 1px solid #fed7aa; }
.hlx-step--active .hlx-step-label { color: #0f172a; font-weight: 700; }
.hlx-step--active .hlx-step-ico i, .hlx-step--active .hlx-step-ico svg { animation: hlx-spin 1s linear infinite; }
.hlx-step--done .hlx-step-ico { background: #dcfce7; color: #16a34a; }
.hlx-step--done .hlx-step-label { color: #475569; }
@keyframes hlx-spin { to { transform: rotate(360deg); } }
/* AI-MARK[QAI-UI:draft-live-heartbeat] 2026-07-13 — dòng nhịp real-time (thời gian trôi + bước đang làm) dưới thẻ tiến trình */
.hlx-steps-live { display: flex; align-items: center; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed #e2e8f0; font-size: 11.5px; color: #ea580c; font-weight: 600; }
.hlx-steps-live i, .hlx-steps-live svg { color: #FF6B2B; flex-shrink: 0; }
.hlx-steps-live .hlx-spin, .hlx-steps-live i.hlx-spin, .hlx-steps-live svg.hlx-spin { animation: hlx-spin 1s linear infinite; }
.hlx-steps-live b { color: #0f172a; font-weight: 700; }

@media (max-width: 900px) {
  .helen-page.helen-page--chat { padding: .75rem 1rem 1rem; }
  .hlx-create-wrap--workspace { grid-template-columns: 1fr; gap: 12px; }
  .hlx-create-history { max-height: 260px; }
  .hlx-chat-chips { grid-template-columns: 1fr; }
  .hlx-msg--helen .hlx-msg-main { max-width: calc(100% - 42px); }
  .hlx-msg--contract .hlx-msg-main { width: min(100%, 760px); max-width: calc(100% - 42px); }
  .hlx-msg--guide .hlx-msg-main { width: min(100%, 720px); max-width: calc(100% - 42px); }
  .hlx-msg--user .hlx-msg-main { max-width: 88%; }
}
@media (max-width: 560px) {
  .hlx-chat-scroll { padding-top: 18px; gap: 14px; }
  .hlx-chat-chip { min-height: auto; grid-template-columns: 30px 1fr; padding: 12px; }
  .hlx-chat-chip i, .hlx-chat-chip svg { width: 30px; height: 30px; padding: 7px; }
  .hlx-custom-contract-btn { width: 100%; align-items: flex-start; }
  .hlx-doc-head { grid-template-columns: 1fr; padding: 14px; }
  .hlx-doc-meta-row { padding: 9px 14px; }
  .hlx-doc-body-wrap { padding: 12px; }
  .hlx-doc-body { padding: 14px; font-size: 13.5px; line-height: 1.72; max-height: 300px; }
  .hlx-doc-fade { left: 13px; right: 13px; bottom: 13px; }
  .hlx-doc-footer { justify-content: stretch; padding: 10px 12px 12px; }
  .hlx-doc-actionbar { width: 100%; }
  .hlx-doc-action { flex: 1 1 120px; }
  .hlx-guide-options { grid-template-columns: 1fr; }
  .hlx-guide-actions { justify-content: stretch; }
  .hlx-guide-skip, .hlx-guide-next { flex: 1 1 0; }
  .hlx-bubble { font-size: 13px; padding: 8px 11px; line-height: 1.42; }
  .hlx-bubble--user { padding: 8px 12px; }
  .hlx-chat-form { border-radius: 24px; padding: 8px 8px 8px 13px; }
  .hlx-chat-icon-btn { width: 40px; height: 40px; }
  .hlx-chat-send-btn { width: 42px; height: 42px; }
}

/* AI-MARK[QAI-UI:helen-nego-compare] 2026-07-31 15:30 (GMT+7) — CSS THUẦN cho tab "Đàm phán HĐ" chỉ còn Chuỗi V1→Vn +
   So sánh phiên bản; đã dọn CSS màn Hiệu suất. Prefix .hlv- riêng, không đụng .hld/.hlo/.hlx/.hlr/.hag; dùng hex (Helen không có token màu),
   không khai font (Be Vietnam Pro đã set ở index.html); Tailwind Helen là build TĨNH nên KHÔNG dùng class util mới.
   | rel: QAI-UI:helen-version-chain, helen.js viewNegoCompare/viewVersionChain */
.hlv-page { display: flex; flex-direction: column; gap: 14px; }
.hlv-hidden { display: none !important; }
.hlv-head { display: flex; flex-direction: column; gap: 4px; }
.hlv-h1 { font-size: 19px; font-weight: 900; color: #0f172a; letter-spacing: 0; }
.hlv-lead { font-size: 13px; font-weight: 600; color: #475569; line-height: 1.6; max-width: 900px; }
.hlv-h3 { font-size: 14px; font-weight: 900; color: #0f172a; margin: 4px 0; }
.hlv-compare-hero {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr); gap: 14px; align-items: stretch;
  background: #fff; border: 1px solid #dbe4f0; border-radius: 8px; padding: 16px; box-shadow: 0 1px 2px rgba(15,23,42,.05);
}
.hlv-hero-copy {
  min-height: 168px; display: flex; flex-direction: column; justify-content: center; gap: 8px;
  border-radius: 8px; padding: 20px; background: #132033; color: #e5edf7;
}
.hlv-hero-copy .hlv-h1 { color: #fff; font-size: 28px; line-height: 1.18; letter-spacing: 0; }
.hlv-hero-copy .hlv-lead { color: #d8e3f0; max-width: 780px; }
.hlv-eyebrow { font-size: 11px; font-weight: 900; letter-spacing: 0; text-transform: uppercase; color: #f7b267; }
.hlv-hero-metrics { display: grid; grid-template-columns: 1fr; gap: 10px; }
.hlv-hero-metric {
  display: flex; flex-direction: column; justify-content: center; min-height: 48px;
  border: 1px solid #dbe4f0; border-radius: 8px; background: #f8fafc; padding: 11px 13px;
}
.hlv-hero-metric strong { color: #0f172a; font-size: 18px; line-height: 1.1; font-weight: 900; }
.hlv-hero-metric span { margin-top: 3px; color: #64748b; font-size: 11.5px; font-weight: 750; line-height: 1.35; }
.hlv-card { background: #fff; border: 1px solid #dbe4f0; border-radius: 10px; padding: 14px; box-shadow: 0 1px 2px rgba(15,23,42,.05); }
.hlv-label { display: block; font-size: 12px; font-weight: 850; color: #334155; margin-bottom: 5px; }
.hlv-req { color: #dc2626; font-weight: 900; }
.hlv-input {
  width: 100%; min-height: 36px; border: 1px solid #dbe4f0; border-radius: 8px; background: #fff; color: #0f172a;
  padding: 0 10px; font-size: 13px; font-weight: 650;
}
.hlv-input:focus { outline: none; border-color: #ffc5ab; box-shadow: 0 0 0 3px rgba(255,95,42,.12); }
.hlv-input--file { padding: 6px 10px; height: auto; }
.hlv-textarea {
  width: 100%; border: 1px solid #dbe4f0; border-radius: 8px; background: #fff; color: #0f172a;
  padding: 9px 10px; font-size: 13px; font-weight: 600; line-height: 1.6; resize: vertical;
}
.hlv-textarea:focus { outline: none; border-color: #ffc5ab; box-shadow: 0 0 0 3px rgba(255,95,42,.12); }
.hlv-btn {
  min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid #dbe4f0; background: #fff; color: #334155; border-radius: 8px; padding: 0 14px;
  font-size: 12.5px; font-weight: 850; cursor: pointer; white-space: nowrap;
}
.hlv-btn:hover:not(:disabled) { color: #ff5f2a; border-color: #ffc5ab; background: #fff7ed; }
.hlv-btn:disabled { opacity: .55; cursor: not-allowed; }
.hlv-btn--primary { background: #ff5f2a; border-color: #ff5f2a; color: #fff; }
.hlv-btn--primary:hover:not(:disabled) { background: #ea580c; border-color: #ea580c; color: #fff; }
.hlv-srcbar { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px; }
.hlv-srcbar--compare { align-items: center; justify-content: space-between; }
.hlv-src-copy { flex: 1 1 280px; min-width: 0; }
.hlv-src-copy p { margin-top: 3px; color: #64748b; font-size: 12px; font-weight: 700; line-height: 1.45; }
.hlv-src-opts { display: flex; flex-wrap: wrap; gap: 14px; flex: 1 1 320px; }
.hlv-srcbar .hlv-input { flex: 1 1 240px; width: auto; }
.hlv-radio { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 750; color: #334155; cursor: pointer; }
.hlv-radio--panel {
  min-height: 38px; border: 1px solid #dbe4f0; border-radius: 8px; padding: 0 12px; background: #fff;
}
.hlv-radio--panel:has(input:checked) { border-color: #ffb489; background: #fff7ed; color: #c2410c; box-shadow: inset 0 0 0 1px #fed7aa; }
.hlv-workbench { display: flex; flex-direction: column; gap: 12px; }
.hlv-workbench-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-end; }
.hlv-workbench-head p { margin: 0; max-width: 760px; color: #64748b; font-size: 12.5px; font-weight: 700; line-height: 1.5; }
.hlv-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hlv-pick-col { position: relative; min-width: 0; }
.hlv-side-card {
  position: relative; min-width: 0; display: flex; flex-direction: column; gap: 11px;
  border: 1px solid #dbe4f0; border-radius: 8px; background: #fff; padding: 14px;
}
.hlv-side-card::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 4px; border-radius: 8px 0 0 8px; background: #2563eb;
}
.hlv-side-card:nth-child(2)::before { background: #ff5f2a; }
.hlv-side-head { display: flex; align-items: center; gap: 10px; padding-left: 4px; }
.hlv-side-badge {
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
  border-radius: 8px; background: #eff6ff; color: #1d4ed8; font-size: 12px; font-weight: 900;
}
.hlv-side-card:nth-child(2) .hlv-side-badge { background: #fff7ed; color: #c2410c; }
.hlv-side-head b { display: block; color: #0f172a; font-size: 14px; font-weight: 900; }
.hlv-side-head span { display: block; margin-top: 2px; color: #64748b; font-size: 11.5px; font-weight: 700; line-height: 1.35; }
.hlv-mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hlv-mode-btn {
  min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid #dbe4f0; border-radius: 8px; background: #f8fafc; color: #334155; cursor: pointer;
  font-size: 12px; font-weight: 850;
}
.hlv-mode-btn:hover { border-color: #ffc5ab; color: #ea580c; background: #fff7ed; }
.hlv-mode-btn.is-active { border-color: #ff8a55; background: #fff7ed; color: #c2410c; box-shadow: inset 0 0 0 1px #fed7aa; }
.hlv-side-store, .hlv-side-file { position: relative; }
.hlv-dropzone {
  min-height: 76px; display: flex; align-items: center; gap: 11px; border: 1px dashed #b9c6d8; border-radius: 8px;
  padding: 12px; background: #f8fafc; color: #334155; cursor: pointer;
}
.hlv-dropzone:hover { border-color: #ff8a55; background: #fff7ed; }
.hlv-dropzone b { display: block; font-size: 12.5px; font-weight: 900; color: #0f172a; }
.hlv-dropzone em { display: block; margin-top: 2px; color: #64748b; font-size: 11.5px; font-style: normal; font-weight: 700; line-height: 1.35; }
.hlv-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.hlv-results {
  position: absolute; z-index: 30; left: 0; right: 0; top: 68px; max-height: 268px; overflow-y: auto;
  background: #fff; border: 1px solid #dbe4f0; border-radius: 8px; box-shadow: 0 8px 22px rgba(15,23,42,.12);
}
.hlv-result {
  display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; padding: 8px 10px;
  border: 0; border-bottom: 1px solid #eef2f7; background: #fff; cursor: pointer;
}
.hlv-result:hover { background: #fff7ed; }
.hlv-result--empty { color: #64748b; font-size: 12.5px; font-weight: 700; cursor: default; }
.hlv-result-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; font-weight: 850; color: #0f172a; }
.hlv-result-head em { border: 1px solid #dbe4f0; border-radius: 999px; padding: 1px 6px; color: #64748b; font-size: 10.5px; font-style: normal; font-weight: 850; }
.hlv-result-sub { font-size: 11.5px; font-weight: 650; color: #64748b; }
.hlv-picked {
  margin-top: 8px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  border: 1px dashed #dbe4f0; border-radius: 8px; padding: 8px 10px; background: #f8fafc; min-height: 44px;
}
.hlv-picked-empty { font-size: 12.5px; font-weight: 700; color: #94a3b8; }
.hlv-picked-kind { border: 1px solid #dbe4f0; border-radius: 999px; padding: 2px 7px; background: #fff; color: #64748b; font-size: 10.5px; font-weight: 900; }
.hlv-picked-name { font-size: 13px; font-weight: 850; color: #0f172a; word-break: break-word; }
.hlv-picked-sub { font-size: 11.5px; font-weight: 650; color: #64748b; width: 100%; }
.hlv-picked-clear { margin-left: auto; border: 0; background: transparent; color: #94a3b8; font-weight: 900; cursor: pointer; }
.hlv-picked-clear:hover { color: #dc2626; }
.hlv-draft { display: flex; flex-direction: column; gap: 12px; }
.hlv-draft-row { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.hlv-draft-row .hlv-input { flex: 1 1 260px; width: auto; }
.hlv-vers { display: flex; flex-direction: column; gap: 8px; }
.hlv-ver {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  border: 1px solid #dbe4f0; border-radius: 8px; padding: 9px 11px; background: #fff;
}
.hlv-ver--helen { background: #f8fafc; border-style: dashed; }
.hlv-ver-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hlv-ver-no { font-size: 13px; font-weight: 900; color: #0f172a; }
.hlv-ver-no--helen { color: #7c3aed; }
.hlv-ver-meta { font-size: 11.5px; font-weight: 650; color: #64748b; word-break: break-word; }
.hlv-ver-note { font-size: 11.5px; font-weight: 800; color: #b45309; }
.hlv-ver-pick { display: flex; gap: 12px; font-size: 12px; font-weight: 800; color: #334155; }
.hlv-ver-pick label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.hlv-vf { display: flex; flex-direction: column; gap: 9px; border-top: 1px solid #eef2f7; padding-top: 12px; }
.hlv-vf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hlv-vf-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hlv-hint { display: block; margin-top: 4px; font-size: 11.5px; font-weight: 700; color: #64748b; }
.hlv-hint--err { color: #dc2626; }
.hlv-body { display: flex; flex-direction: column; gap: 14px; }
.hlv-empty { font-size: 12.5px; font-weight: 750; color: #64748b; padding: 12px 0; }
.hlv-note { font-size: 12px; font-weight: 700; color: #64748b; line-height: 1.6; }
.hlv-banner { display: flex; gap: 10px; border-radius: 10px; padding: 11px 13px; font-size: 12.5px; font-weight: 700; line-height: 1.6; }
.hlv-banner--limited { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.hlv-banner--empty { background: #f1f5f9; border: 1px solid #dbe4f0; color: #334155; }
.hlv-banner b { font-weight: 900; }
/* AI-MARK[QAI-UI:helen-version-chain] 2026-07-30 22:53 (GMT+7) — loading V1→Vn rút gọn nhịp đọc file/tách cấu trúc/so sánh, không còn meter điểm nhận diện trên màn upload; chip phiên bản vẫn wrap đủ text pháp lý | rel: QAI-LEGAL:contract-version-chain */
.hlv-loading-panel {
  display: flex; flex-direction: column; gap: 16px; overflow: hidden;
  border: 1px solid #dbe4f0; border-radius: 12px; padding: 18px; background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .06);
}
.hlv-loading-main { display: flex; align-items: center; gap: 14px; }
.hlv-loading-orbit {
  position: relative; flex: 0 0 54px; width: 54px; height: 54px; border-radius: 50%;
  border: 2px solid #dbeafe; background: linear-gradient(180deg, #eff6ff, #fff7ed);
}
.hlv-loading-orbit::before {
  content: ""; position: absolute; inset: 8px; border-radius: 50%;
  border: 3px solid transparent; border-top-color: #ff5f2a; border-right-color: #2563eb;
  animation: hlv-spin .95s linear infinite;
}
.hlv-loading-orbit span {
  position: absolute; width: 7px; height: 7px; border-radius: 50%; background: #ff5f2a;
  box-shadow: 0 0 0 5px rgba(255, 95, 42, .12);
  animation: hlv-pulse 1.4s ease-in-out infinite;
}
.hlv-loading-orbit span:nth-child(1) { top: 7px; left: 24px; }
.hlv-loading-orbit span:nth-child(2) { right: 7px; top: 24px; animation-delay: .18s; background: #2563eb; box-shadow: 0 0 0 5px rgba(37, 99, 235, .12); }
.hlv-loading-orbit span:nth-child(3) { bottom: 7px; left: 24px; animation-delay: .36s; background: #059669; box-shadow: 0 0 0 5px rgba(5, 150, 105, .12); }
.hlv-loading-copy h3 { margin: 0 0 4px; font-size: 18px; font-weight: 950; color: #0f172a; }
.hlv-loading-copy p { margin: 0; max-width: 780px; font-size: 13px; font-weight: 750; line-height: 1.55; color: #64748b; }
.hlv-loading-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.hlv-loading-steps li {
  display: flex; align-items: center; gap: 8px; border: 1px solid #e2e8f0; border-radius: 9px; padding: 8px 10px;
  background: #f8fafc; color: #334155; font-size: 12px; font-weight: 850; animation: hlv-pulse 1.55s ease-in-out infinite;
  animation-delay: calc(var(--hlv-step) * .12s);
}
.hlv-loading-steps span {
  display: inline-flex; align-items: center; justify-content: center; width: 21px; height: 21px; border-radius: 999px;
  background: #fff7ed; color: #ea580c; font-size: 11px; font-weight: 950;
}
.hlv-skeleton-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.hlv-skeleton-card { display: flex; flex-direction: column; gap: 9px; border: 1px solid #e2e8f0; border-radius: 10px; padding: 12px; background: #f8fafc; }
.hlv-skeleton-card i, .hlv-skeleton-card b, .hlv-skeleton-card span, .hlv-skeleton-row {
  display: block; overflow: hidden; border-radius: 999px; background: linear-gradient(90deg, #e2e8f0, #f8fafc, #e2e8f0);
  background-size: 220% 100%; animation: hlv-sweep 1.2s ease-in-out infinite;
}
.hlv-skeleton-card i { width: 38px; height: 12px; }
.hlv-skeleton-card b { width: 72%; height: 18px; }
.hlv-skeleton-card span { width: 92%; height: 12px; }
.hlv-skeleton-table { display: flex; flex-direction: column; gap: 8px; }
.hlv-skeleton-row { height: 38px; border-radius: 8px; }
.hvc-loading-main { align-items: flex-start; }
.hvc-loading-orbit { box-shadow: inset 0 0 0 6px rgba(255, 255, 255, .72), 0 12px 26px rgba(37, 99, 235, .12); }
.hvc-loading-orbit b {
  position: absolute; inset: 17px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: #fff; color: #0f172a; font-size: 10px; line-height: 1; font-weight: 950;
}
.hvc-loading-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.hvc-loading-tags span {
  display: inline-flex; align-items: center; min-height: 24px; border: 1px solid #dbeafe; border-radius: 999px; padding: 4px 8px;
  background: #f8fbff; color: #1d4ed8; font-size: 11px; font-weight: 900;
}
.hvc-loading-flow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hvc-loading-flow li {
  display: grid; grid-template-columns: 25px minmax(0, 1fr); grid-template-rows: auto auto; align-items: center;
  gap: 2px 8px; min-height: 58px;
}
.hvc-loading-flow li span { grid-row: 1 / span 2; }
.hvc-loading-flow b { min-width: 0; color: #0f172a; font-size: 12px; line-height: 1.2; font-weight: 950; overflow-wrap: anywhere; }
.hvc-loading-flow em { min-width: 0; color: #64748b; font-size: 10.8px; line-height: 1.25; font-style: normal; font-weight: 740; overflow-wrap: anywhere; }
.hvc-loading-flow li:nth-child(2) span { background: #eff6ff; color: #1d4ed8; }
.hvc-loading-flow li:nth-child(3) span { background: #f0fdf4; color: #15803d; }
.hvc-loading-flow li:nth-child(4) span { background: #fef2f2; color: #b91c1c; }
.hvc-loading-scan {
  position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
  border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px; background: #f8fafc; overflow: hidden;
}
.hvc-loading-scan span {
  display: block; height: 42px; border: 1px solid #dbe4f0; border-radius: 8px;
  background: repeating-linear-gradient(180deg, #fff, #fff 8px, #eff6ff 9px, #eff6ff 10px);
}
.hvc-loading-scan i {
  position: absolute; top: 0; bottom: 0; width: 28%; transform: skewX(-14deg);
  background: linear-gradient(90deg, transparent, rgba(255, 95, 42, .18), rgba(37, 99, 235, .18), transparent);
  animation: hvc-scan 1.35s ease-in-out infinite;
}
.hvc-loading-table .hlv-skeleton-row { height: 32px; }
@keyframes hlv-spin { to { transform: rotate(360deg); } }
@keyframes hlv-pulse { 0%, 100% { opacity: .58; } 50% { opacity: 1; } }
@keyframes hlv-sweep { 0% { background-position: 120% 0; } 100% { background-position: -120% 0; } }
@keyframes hvc-scan { 0% { left: -34%; } 100% { left: 106%; } }
.hlv-cockpit {
  display: flex; flex-direction: column; gap: 12px; border: 1px solid #dbe4f0; border-radius: 12px; padding: 14px;
  background: linear-gradient(180deg, #ffffff, #f8fafc); box-shadow: 0 14px 34px rgba(15, 23, 42, .055);
}
.hlv-cockpit--risk { border-color: #fecaca; background: linear-gradient(180deg, #fff, #fff7ed); }
.hlv-cockpit--warn { border-color: #fed7aa; }
.hlv-cockpit--unknown { border-color: #ddd6fe; }
.hlv-cockpit-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.hlv-eyebrow { display: block; margin-bottom: 3px; font-size: 11px; font-weight: 950; color: #ea580c; text-transform: uppercase; }
.hlv-cockpit-head h3 { margin: 0; font-size: 19px; font-weight: 950; color: #0f172a; }
.hlv-cockpit-head p { margin: 3px 0 0; font-size: 12.5px; font-weight: 750; color: #64748b; }
.hlv-evidence-meter {
  position: relative; display: flex; flex-direction: column; justify-content: center; min-width: 150px; min-height: 58px;
  border: 1px solid #dbe4f0; border-radius: 10px; padding: 9px 12px; background: #fff; overflow: hidden;
}
.hlv-evidence-meter::before {
  content: ""; position: absolute; left: 0; bottom: 0; width: var(--hlv-evidence); height: 4px;
  background: linear-gradient(90deg, #2563eb, #16a34a);
}
.hlv-evidence-meter strong { font-size: 21px; font-weight: 950; color: #0f172a; line-height: 1; }
.hlv-evidence-meter span { margin-top: 3px; font-size: 11.5px; font-weight: 800; color: #64748b; }
.hlv-cockpit-grid { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 10px; }
.hlv-decision-card, .hlv-source-card, .hlv-next-card {
  border: 1px solid #dbe4f0; border-radius: 10px; padding: 12px; background: #fff; min-width: 0;
}
.hlv-decision-tone { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 950; color: #0f172a; }
.hlv-decision-card p, .hlv-next-card p { margin: 0; font-size: 12.5px; font-weight: 720; line-height: 1.55; color: #475569; }
.hlv-change-bars { display: flex; width: 100%; height: 9px; border-radius: 999px; overflow: hidden; margin-top: 12px; background: #e2e8f0; }
.hlv-change-bars span { min-width: 3px; }
.hlv-change-bars .is-add { background: #16a34a; }
.hlv-change-bars .is-rem { background: #dc2626; }
.hlv-change-bars .is-chg { background: #d97706; }
.hlv-change-bars .is-same { background: #cbd5e1; }
.hlv-source-card, .hlv-next-card { display: flex; flex-direction: column; gap: 8px; }
.hlv-source-card b, .hlv-next-card b { font-size: 12.5px; font-weight: 950; color: #0f172a; }
.hlv-source-card div { display: grid; grid-template-columns: 34px 1fr; gap: 4px 8px; padding: 8px; border-radius: 8px; background: #f8fafc; }
.hlv-source-card span { grid-row: span 2; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; background: #fff7ed; color: #ea580c; font-size: 11px; font-weight: 950; }
.hlv-source-card strong { min-width: 0; font-size: 12px; font-weight: 900; color: #0f172a; word-break: break-word; }
.hlv-source-card em { font-size: 11px; font-style: normal; font-weight: 700; color: #64748b; word-break: break-word; }
.hlv-next-card ul { margin: 0; padding-left: 17px; color: #475569; font-size: 12px; font-weight: 750; line-height: 1.55; }
.hlv-cockpit-stats { display: grid; grid-template-columns: repeat(6, minmax(120px, 1fr)); gap: 9px; }
.hlv-stat em { font-size: 10.8px; font-style: normal; font-weight: 700; color: #94a3b8; }
.hlv-evidence-note { border: 1px solid #dbe4f0; border-radius: 9px; padding: 8px 10px; background: #fff; color: #475569; font-size: 12px; font-weight: 780; }
.hlv-summary { display: flex; flex-direction: column; gap: 10px; }
.hlv-ctype { font-size: 12.5px; font-weight: 750; color: #475569; }
.hlv-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.hlv-stat {
  display: flex; flex-direction: column; gap: 3px; border: 1px solid #dbe4f0; border-radius: 10px;
  padding: 10px 12px; background: #fff;
}
.hlv-stat strong { font-size: 20px; font-weight: 900; color: #0f172a; line-height: 1.1; }
.hlv-stat span { font-size: 11.5px; font-weight: 750; color: #64748b; }
.hlv-stat--add { border-left: 3px solid #16a34a; }
.hlv-stat--rem { border-left: 3px solid #dc2626; }
.hlv-stat--chg { border-left: 3px solid #d97706; }
.hlv-stat--them { border-left: 3px solid #dc2626; }
.hlv-stat--unk { border-left: 3px solid #64748b; }
.hlv-stat--flag { border-left: 3px solid #7c3aed; }
.hlv-missing { border: 1px solid #fecaca; background: #fef2f2; color: #991b1b; border-radius: 10px; padding: 10px 13px; font-size: 12.5px; font-weight: 750; }
.hlv-missing ul { margin: 6px 0 0; padding-left: 18px; list-style: disc; }
.hlv-missing li { margin: 2px 0; word-break: break-word; }
.hlv-missing-imp { font-size: 11px; font-weight: 800; color: #b91c1c; }
.hlv-missing--ok { border-color: #bbf7d0; background: #f0fdf4; color: #166534; }
.hlv-negbar { display: flex; flex-direction: column; gap: 9px; border: 1px solid #dbe4f0; border-radius: 10px; padding: 13px; background: #fff; }
.hlv-nstats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.hlv-nstat { display: flex; flex-direction: column; gap: 3px; border: 1px solid #eef2f7; border-radius: 8px; padding: 9px 11px; background: #f8fafc; }
.hlv-nstat strong { font-size: 16px; font-weight: 900; color: #0f172a; }
.hlv-nstat span { font-size: 11.5px; font-weight: 700; color: #64748b; }
.hlv-nstat--unknown strong { color: #94a3b8; font-size: 14px; }
.hlv-nsides { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12.5px; font-weight: 750; color: #475569; }
.hlv-nside b { color: #0f172a; font-weight: 900; }
.hlv-table-block {
  display: flex; flex-direction: column; gap: 10px; border: 1px solid #dbe4f0; border-radius: 12px; padding: 12px;
  background: #fff; box-shadow: 0 14px 34px rgba(15, 23, 42, .045);
}
.hlv-table-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hlv-table-head .hlv-h3 { margin-bottom: 3px; }
.hlv-table-sub { margin: 0; max-width: 720px; font-size: 12px; font-weight: 730; color: #64748b; line-height: 1.55; }
.hlv-table-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hlv-toggle { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 800; color: #334155; cursor: pointer; }
.hlv-table-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.hlv-table-pill {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid #dbe4f0; border-radius: 999px; padding: 5px 9px;
  background: #f8fafc; color: #475569; font-size: 11.5px; font-weight: 850;
}
.hlv-table-pill b { color: #0f172a; font-size: 12.5px; font-weight: 950; }
.hlv-table-pill--add { border-color: #bbf7d0; background: #f0fdf4; color: #166534; }
.hlv-table-pill--rem { border-color: #fecaca; background: #fef2f2; color: #991b1b; }
.hlv-table-pill--chg { border-color: #fde68a; background: #fffbeb; color: #92400e; }
.hlv-table-pill--unk { border-color: #ddd6fe; background: #f5f3ff; color: #5b21b6; }
.hlv-table-pill--flag { border-color: #fecaca; background: #fff7ed; color: #c2410c; }
.hlv-table-scroll { overflow-x: auto; border: 1px solid #dbe4f0; border-radius: 10px; background: #fff; }
.hlv-table { width: 100%; min-width: 880px; border-collapse: collapse; }
.hlv-table th, .hlv-table td { text-align: left; vertical-align: top; padding: 9px 11px; border-bottom: 1px solid #eef2f7; font-size: 12.5px; }
.hlv-table th { position: sticky; top: 0; z-index: 1; background: #f8fafc; font-weight: 900; color: #334155; white-space: nowrap; }
.hlv-table td { color: #334155; font-weight: 650; word-break: break-word; white-space: normal; }
.hlv-row { cursor: pointer; border-left: 4px solid transparent; }
.hlv-row:hover { background: #fff7ed; }
.hlv-row--added { border-left-color: #16a34a; background: #f7fef9; }
.hlv-row--removed { border-left-color: #dc2626; background: #fffafa; }
.hlv-row--changed { border-left-color: #d97706; background: #fffdf4; }
.hlv-row.is-unknown { background: #fbfaff; }
.hlv-row.has-flag { box-shadow: inset 4px 0 0 #dc2626; }
.hlv-row-title { display: grid; grid-template-columns: 26px 1fr; gap: 8px; align-items: flex-start; }
.hlv-row-no {
  display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 8px;
  background: #eef2ff; color: #1d4ed8; font-size: 11px; font-weight: 950;
}
.hlv-row-label { display: block; font-weight: 850; color: #0f172a; }
.hlv-std { display: inline-block; margin-top: 3px; font-size: 10.5px; font-weight: 800; color: #64748b; }
.hlv-chip { display: inline-block; border-radius: 999px; padding: 2px 9px; font-size: 11.5px; font-weight: 850; white-space: nowrap; }
.hlv-chip--st-add { background: #dcfce7; color: #166534; }
.hlv-chip--st-rem { background: #fee2e2; color: #991b1b; }
.hlv-chip--st-chg { background: #fef3c7; color: #92400e; }
.hlv-chip--st-same { background: #f1f5f9; color: #475569; }
.hlv-chip--im-us { background: #dcfce7; color: #166534; }
.hlv-chip--im-neutral { background: #f1f5f9; color: #475569; }
.hlv-chip--im-them { background: #fee2e2; color: #991b1b; }
.hlv-chip--im-unknown { background: #ede9fe; color: #5b21b6; }
.hlv-reasons { margin: 6px 0 0; padding-left: 16px; list-style: disc; }
.hlv-reasons li { margin: 2px 0; font-size: 11.5px; font-weight: 650; color: #475569; word-break: break-word; }
.hlv-noevi { display: block; margin-top: 5px; font-size: 11.5px; font-weight: 750; color: #6d28d9; }
.hlv-risk { display: inline-block; font-size: 11.5px; font-weight: 850; }
.hlv-risk--cao { color: #b91c1c; }
.hlv-risk--tb { color: #b45309; }
.hlv-risk--thap { color: #15803d; }
.hlv-risk--none { color: #94a3b8; }
.hlv-no-flag { display: block; margin-top: 5px; color: #94a3b8; font-size: 11.5px; font-weight: 730; }
.hlv-flags { margin: 6px 0 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 5px; }
.hlv-flag { border-left: 3px solid #7c3aed; padding-left: 8px; font-size: 11.5px; font-weight: 700; color: #4c1d95; word-break: break-word; }
.hlv-flag--cao { border-left-color: #dc2626; color: #991b1b; }
.hlv-cite { font-weight: 850; color: #334155; }
.hlv-excerpt { display: block; margin-top: 4px; font-style: italic; font-weight: 600; color: #64748b; }
.hlv-neg-cell { min-width: 170px; }
.hlv-neg-span { font-size: 11.5px; font-weight: 750; color: #64748b; }
.hlv-neg-round { display: block; font-size: 11px; font-weight: 700; color: #64748b; }
.hlv-cols-block { display: flex; flex-direction: column; gap: 10px; }
.hlv-cols-head { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hlv-cols-head > div { display: flex; flex-direction: column; gap: 2px; border: 1px solid #dbe4f0; border-radius: 8px; padding: 8px 11px; background: #f8fafc; }
.hlv-cols-head b { font-size: 12.5px; font-weight: 900; color: #0f172a; }
.hlv-cols-head span { font-size: 11.5px; font-weight: 650; color: #64748b; word-break: break-word; }
.hlv-pair { display: flex; flex-direction: column; gap: 8px; border: 1px solid #dbe4f0; border-radius: 10px; padding: 12px; background: #fff; }
.hlv-pair.is-hlv-target { border-color: #ff5f2a; box-shadow: 0 0 0 3px rgba(255,95,42,.14); }
.hlv-pair-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.hlv-pair-label { font-size: 13px; font-weight: 900; color: #0f172a; word-break: break-word; }
.hlv-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hlv-col { border: 1px solid #eef2f7; border-radius: 8px; padding: 10px; background: #fff; min-width: 0; }
.hlv-col--add { background: #f0fdf4; border-color: #bbf7d0; }
.hlv-col--rem { background: #fef2f2; border-color: #fecaca; }
.hlv-col--chg { background: #fffbeb; border-color: #fde68a; }
.hlv-col--none { background: #f8fafc; border-style: dashed; }
.hlv-col-head { font-size: 12px; font-weight: 900; color: #0f172a; margin-bottom: 5px; word-break: break-word; }
.hlv-col-text { font-size: 12.5px; font-weight: 620; color: #334155; line-height: 1.66; word-break: break-word; }
.hlv-col-text .helen-legal-text,
.hlv-excerpt .helen-legal-text,
.hlv-khoan-ex .helen-legal-text { margin: 0; }
.hlv-col-none { font-size: 12px; font-weight: 750; color: #94a3b8; }
.hlv-khoan { font-size: 12px; font-weight: 750; color: #334155; }
.hlv-khoan ul { margin: 5px 0 0; padding-left: 17px; list-style: disc; }
.hlv-khoan li { margin: 2px 0; font-weight: 650; word-break: break-word; }
.hlv-khoan-ex { display: block; font-style: italic; font-weight: 600; color: #64748b; }

/* AI-MARK[QAI-UI:helen-version-chain-default] 2026-07-31 15:30 (GMT+7) — selector lớn dưới hero chỉ còn 2 tile Chuỗi V1→Vn + So sánh 2 bản, không còn tile Hiệu suất | rel: helen.js negoModeSwitchHtml */
.hlv-mode-nav {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: stretch;
  border: 1px solid #dbe4f0; border-radius: 8px; padding: 10px; background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .05);
}
.hlv-mode-tile {
  min-height: 88px; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  border: 1px solid #dbe4f0; border-radius: 8px; padding: 11px; background: #f8fafc; color: #334155; text-decoration: none;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease, transform .15s ease;
  min-width: 0;
}
.hlv-mode-tile:hover { transform: translateY(-1px); border-color: #ffb489; background: #fff7ed; box-shadow: 0 10px 22px rgba(15, 23, 42, .08); }
.hlv-mode-tile.is-active { border-color: #ff5f2a; background: #fff7ed; box-shadow: inset 0 0 0 1px #fed7aa, 0 10px 24px rgba(255, 95, 42, .12); }
.hlv-mode-ico {
  display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 8px;
  background: #eff6ff; color: #1d4ed8;
}
.hlv-mode-tile.is-active .hlv-mode-ico { background: #ff5f2a; color: #fff; }
.hlv-mode-text { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.hlv-mode-text b { color: #0f172a; font-size: 14px; line-height: 1.25; font-weight: 950; overflow-wrap: anywhere; }
.hlv-mode-text em { color: #64748b; font-size: 11.5px; line-height: 1.35; font-style: normal; font-weight: 720; overflow-wrap: anywhere; }
.hlv-mode-badge {
  align-self: start; border: 1px solid #dbe4f0; border-radius: 999px; padding: 3px 7px;
  background: #fff; color: #64748b; font-size: 10.8px; font-weight: 900; white-space: nowrap;
}
.hlv-mode-tile.is-active .hlv-mode-badge { border-color: #fed7aa; color: #c2410c; background: #fff; }

/* AI-MARK[QAI-UI:helen-version-chain-redesign] 2026-07-31 16:52 (GMT+7) — CSS prefix .hvc- cho workspace Chuỗi V1→Vn: hero full-width, history list rõ trạng thái và khu phân tích Helen phân cấp theo bằng chứng/timeline. | rel: QAI-LEGAL:contract-version-chain, QAI-UI:helen-version-chain */
.hvc-page { gap: 14px; }
.hvc-page .hvc-hero {
  grid-template-columns: minmax(0, 1.18fr) minmax(360px, .82fr); gap: 0; padding: 0; overflow: hidden;
  border-color: #1c3853; background: #102033; box-shadow: 0 14px 34px rgba(15, 23, 42, .14);
}
.hvc-page .hvc-hero .hlv-hero-copy {
  position: relative; min-height: 230px; justify-content: center; padding: 28px 32px; border-radius: 0;
  overflow: hidden; background: radial-gradient(circle at 90% 12%, rgba(45, 114, 185, .22), transparent 34%), linear-gradient(135deg, #102033 0%, #142b43 100%);
}
.hvc-page .hvc-hero .hlv-hero-copy::after {
  content: ""; position: absolute; width: 230px; height: 230px; right: -92px; bottom: -126px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 50%; box-shadow: 0 0 0 22px rgba(255, 255, 255, .035), 0 0 0 44px rgba(255, 255, 255, .025); pointer-events: none;
}
.hvc-hero-kicker { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hvc-hero-kicker .hlv-eyebrow { margin: 0; }
.hvc-hero-live { display: inline-flex; align-items: center; gap: 5px; border: 1px solid rgba(253, 186, 116, .38); border-radius: 999px; padding: 4px 8px; background: rgba(255, 255, 255, .07); color: #fed7aa; font-size: 10.5px; font-weight: 850; }
.hvc-hero-live svg { color: #fb923c; }
.hvc-page .hvc-hero .hlv-hero-copy .hlv-h1 { position: relative; z-index: 1; max-width: 760px; font-size: clamp(26px, 2.4vw, 34px); letter-spacing: -.02em; }
.hvc-page .hvc-hero .hlv-hero-copy .hlv-lead { position: relative; z-index: 1; max-width: 720px; color: #c9d8e8; font-size: 13.5px; line-height: 1.65; }
.hvc-hero-flow { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; color: #b7c9dc; font-size: 11px; font-weight: 800; }
.hvc-hero-flow span { display: inline-flex; align-items: center; gap: 5px; }
.hvc-hero-flow b { color: #fb923c; font-size: 10px; letter-spacing: .04em; }
.hvc-hero-flow > i { color: #63809d; }
.hvc-hero-panel { display: flex; flex-direction: column; justify-content: center; gap: 14px; min-width: 0; padding: 24px 26px; border-left: 1px solid rgba(148, 163, 184, .2); background: linear-gradient(160deg, #193650 0%, #102033 100%); color: #e2e8f0; }
.hvc-hero-panel-head { display: flex; align-items: center; gap: 11px; min-width: 0; }
.hvc-hero-panel-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: 0 0 auto; border: 1px solid rgba(253, 186, 116, .36); border-radius: 12px; background: rgba(251, 146, 60, .14); color: #fdba74; }
.hvc-hero-panel-head b { display: block; color: #fff; font-size: 14px; line-height: 1.3; font-weight: 950; }
.hvc-hero-panel-head span:not(.hvc-hero-panel-icon) { display: block; margin-top: 3px; color: #a8bfd4; font-size: 11.5px; line-height: 1.4; font-weight: 720; }
.hvc-hero-panel-rule { height: 1px; background: rgba(148, 163, 184, .2); }
.hvc-hero-panel-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.hvc-hero-panel-grid span { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hvc-hero-panel-grid strong { color: #fff; font-size: 12px; line-height: 1.25; font-weight: 900; overflow-wrap: anywhere; }
.hvc-hero-panel-grid em { color: #9fb6ca; font-size: 10.5px; line-height: 1.35; font-style: normal; font-weight: 700; overflow-wrap: anywhere; }
.hvc-hero-panel-note { display: flex; align-items: flex-start; gap: 7px; margin: 0; color: #cbd9e6; font-size: 11px; line-height: 1.5; font-weight: 720; }
.hvc-hero-panel-note svg { flex: 0 0 auto; margin-top: 1px; color: #86efac; }
.hvc-page .hlv-card,
.hvc-page .hlv-banner,
.hvc-page .hvc-upload-panel,
.hvc-page .hvc-history-panel,
.hvc-page .hvc-dropzone,
.hvc-page .hvc-file-row,
.hvc-page .hvc-file-empty,
.hvc-page .hvc-history-row,
.hvc-page .hvc-history-item,
.hvc-page .hvc-history-delete,
.hvc-page .hvc-history-new,
.hvc-page .hvc-new-chain-btn,
.hvc-page .hvc-chain-notice,
.hvc-page .hvc-empty-line,
.hvc-page .hvc-overview,
.hvc-page .hvc-cumulative,
.hvc-page .hvc-transition,
.hvc-page .hvc-change-row,
.hvc-page .hvc-proof,
.hvc-page .hvc-version-chip {
  overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; word-break: break-word;
}
.hvc-page .hvc-workbench { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 450px); gap: 0; align-items: stretch; padding: 0; overflow: hidden; background: #f8fafc; }
.hvc-upload-panel { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.hvc-page .hvc-upload-panel { padding: 20px; background: #fff; }
.hvc-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.hvc-panel-head .hlv-h3 { margin: 0; }
.hvc-panel-head--step { align-items: center; }
.hvc-panel-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hvc-step-badge { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; flex: 0 0 auto; border-radius: 11px; background: #fff1eb; color: #ea580c; font-size: 11px; font-weight: 950; }
.hvc-panel-title p { margin: 3px 0 0; color: #64748b; font-size: 11.5px; line-height: 1.4; font-weight: 720; }
.hvc-panel-format { color: #64748b; font-size: 10.8px; line-height: 1.35; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.hvc-upload-tip { display: flex; align-items: flex-start; gap: 8px; border: 1px solid #dbeafe; border-radius: 10px; padding: 9px 10px; background: #f8fbff; color: #1d4ed8; }
.hvc-upload-tip > svg { flex: 0 0 auto; margin-top: 1px; }
.hvc-upload-tip b { display: block; color: #1e40af; font-size: 11.5px; line-height: 1.35; font-weight: 900; }
.hvc-upload-tip em { display: block; margin-top: 2px; color: #64748b; font-size: 10.8px; line-height: 1.35; font-style: normal; font-weight: 700; }
.hvc-chain-panel {
  display: flex; flex-direction: column; gap: 12px; border: 0; border-left: 1px solid #dbe4f0; border-radius: 0;
  padding: 20px; background: #f8fafc; min-width: 0; box-shadow: none;
}
.hvc-chain-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.hvc-chain-head b { display: block; color: #0f172a; font-size: 13px; font-weight: 950; }
.hvc-chain-head span { display: block; margin-top: 2px; color: #64748b; font-size: 11.5px; line-height: 1.35; font-weight: 740; overflow-wrap: anywhere; }
.hvc-chain-tools { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; }
.hvc-history-count {
  display: inline-flex; align-items: center; justify-content: center; min-height: 28px; border: 1px solid #dbe4f0; border-radius: 999px;
  padding: 4px 8px; background: #f8fafc; color: #475569; font-size: 11px; font-weight: 900; white-space: nowrap;
}
.hvc-icon-btn { flex: 0 0 auto; min-width: 34px; padding-inline: 9px; }
.hvc-history-guide { display: flex; align-items: flex-start; gap: 8px; border: 1px solid #e0e7ff; border-radius: 10px; padding: 9px 10px; background: #f7f8ff; }
.hvc-history-guide-icon { display: inline-flex; align-items: center; justify-content: center; width: 27px; height: 27px; flex: 0 0 auto; border-radius: 8px; background: #e0e7ff; color: #4f46e5; }
.hvc-history-guide b { display: block; color: #312e81; font-size: 11.5px; line-height: 1.35; font-weight: 900; }
.hvc-history-guide span:not(.hvc-history-guide-icon) { display: block; margin-top: 2px; color: #64748b; font-size: 10.8px; line-height: 1.35; font-weight: 700; }
.hvc-history-section { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.hvc-history-section-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #475569; }
.hvc-history-section-head > span { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 950; letter-spacing: .07em; text-transform: uppercase; }
.hvc-history-section-head > span svg { color: #2563eb; }
.hvc-history-section-head em { color: #94a3b8; font-size: 10.5px; font-style: normal; font-weight: 720; text-align: right; }
.hvc-new-chain-btn {
  width: 100%; min-height: 58px; display: grid; grid-template-columns: 34px minmax(0, 1fr) 18px; gap: 9px; align-items: center;
  border: 1px solid #bfdbfe; border-radius: 8px; padding: 9px 10px; background: #eff6ff; color: #1d4ed8; text-align: left;
  cursor: pointer; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease, color .15s ease;
}
.hvc-new-chain-btn:hover:not(:disabled) { border-color: #2563eb; background: #dbeafe; }
.hvc-new-chain-btn.is-active { border-color: #2563eb; background: #2563eb; color: #fff; box-shadow: 0 10px 24px rgba(37, 99, 235, .18); }
.hvc-new-chain-btn.is-active .hvc-history-title,
.hvc-new-chain-btn.is-active .hvc-history-meta,
.hvc-new-chain-btn.is-active .hvc-history-meta strong,
.hvc-new-chain-btn.is-active .hvc-history-meta span,
.hvc-new-chain-btn.is-active .hvc-history-tail { color: #fff; }
.hvc-history-list { display: flex; flex-direction: column; gap: 7px; max-height: 360px; overflow-y: auto; padding: 1px 2px 1px 0; }
.hvc-history-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; align-items: stretch; min-width: 0; }
.hvc-history-item {
  width: 100%; display: grid; grid-template-columns: 34px minmax(0, 1fr) 18px; gap: 9px; align-items: center;
  border: 1px solid #dbe4f0; border-radius: 8px; padding: 9px 10px; background: #fff; color: #334155; text-align: left;
  cursor: pointer; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.hvc-history-item:hover,
.hvc-history-row:hover .hvc-history-item { border-color: #ffb489; background: #fff7ed; }
.hvc-history-row.is-active .hvc-history-item { border-color: #2563eb; background: #eff6ff; box-shadow: inset 0 0 0 1px #bfdbfe; }
.hvc-history-row.is-final .hvc-history-item { border-left: 3px solid #16a34a; }
.hvc-history-mark {
  display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 8px;
  background: #f1f5f9; color: #2563eb; flex: 0 0 auto;
}
.hvc-history-row.is-final .hvc-history-mark { background: #f0fdf4; color: #15803d; }
.hvc-history-row.is-active .hvc-history-mark { background: #dbeafe; color: #1d4ed8; }
.hvc-history-copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.hvc-history-title { color: #0f172a; font-size: 12.7px; line-height: 1.28; font-weight: 950; }
.hvc-history-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: #64748b; font-size: 11px; line-height: 1.25; font-style: normal; font-weight: 760; }
.hvc-history-meta strong {
  display: inline-flex; align-items: center; border-radius: 999px; padding: 2px 6px; background: #fff7ed; color: #c2410c;
  font-size: 10.5px; font-weight: 950;
}
.hvc-history-row.is-final .hvc-history-meta strong { background: #dcfce7; color: #15803d; }
.hvc-history-copy small { color: #94a3b8; font-size: 10.5px; line-height: 1.25; font-weight: 760; }
.hvc-history-tail { justify-self: end; color: #2563eb; }
.hvc-history-delete {
  min-width: 72px; min-height: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  border: 1px solid #fecaca; border-radius: 8px; background: #fff; color: #b91c1c; cursor: pointer;
  font-size: 11.5px; font-weight: 900; transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.hvc-history-delete:hover:not(:disabled) { border-color: #ef4444; background: #fef2f2; color: #991b1b; }
.hvc-history-delete.is-loading svg { animation: hlx-spin 1s linear infinite; }
.hvc-history-delete:disabled,
.hvc-history-item:disabled { opacity: .62; cursor: not-allowed; }
.hvc-history-empty {
  display: flex; align-items: center; gap: 8px; border: 1px dashed #cbd5e1; border-radius: 8px; padding: 9px 10px;
  color: #64748b; background: #fff; font-size: 11.5px; font-weight: 780;
}
.hvc-chain-notice {
  display: flex; align-items: center; gap: 7px; border: 1px solid #bbf7d0; border-radius: 8px; padding: 8px 10px;
  background: #f0fdf4; color: #166534; font-size: 11.5px; line-height: 1.35; font-weight: 820; min-width: 0;
}
.hvc-chain-notice svg { flex: 0 0 auto; }
.hvc-chain-notice--error { border-color: #fed7aa; background: #fff7ed; color: #9a3412; }
.hvc-chain-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.hvc-chain-field span { color: #64748b; font-size: 10.8px; font-weight: 950; text-transform: uppercase; }
.hvc-chain-field select, .hvc-chain-field input {
  width: 100%; min-height: 36px; border: 1px solid #dbe4f0; border-radius: 8px; padding: 7px 9px;
  background: #fff; color: #0f172a; font-size: 12.5px; font-weight: 760; min-width: 0;
}
.hvc-chain-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hvc-chain-actions label {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; border: 1px solid #dbe4f0; border-radius: 999px;
  padding: 5px 9px; background: #fff; color: #334155; font-size: 11.5px; font-weight: 850;
}
.hvc-saved-strip {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border: 1px solid #bfdbfe; border-radius: 8px;
  padding: 9px 11px; background: #eff6ff; color: #1e3a8a; font-size: 12px; font-weight: 850;
}
.hvc-saved-strip span { display: inline-flex; align-items: center; gap: 5px; min-width: 0; overflow-wrap: anywhere; }
.hvc-saved-strip b { font-weight: 950; color: #1d4ed8; }
.hvc-dropzone {
  min-height: 112px; display: flex; align-items: center; gap: 12px; border: 1px dashed #afbdd0; border-radius: 12px;
  padding: 15px; background: linear-gradient(135deg, #fbfdff 0%, #f5f8fc 100%); color: #334155; cursor: pointer; min-width: 0;
}
.hvc-dropzone:hover { border-color: #ff8a55; background: #fff7ed; }
.hvc-dropzone-icon { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; flex: 0 0 auto; border-radius: 12px; background: #dbeafe; color: #2563eb; }
.hvc-dropzone b { display: block; font-size: 13px; font-weight: 950; color: #0f172a; }
.hvc-dropzone em { display: block; margin-top: 3px; color: #64748b; font-size: 11.5px; font-style: normal; font-weight: 720; line-height: 1.35; }
.hvc-dropzone-action { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; color: #2563eb; font-size: 11px; font-weight: 900; white-space: nowrap; }
.hvc-file-list { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.hvc-file-empty {
  display: flex; align-items: center; gap: 8px; border: 1px dashed #cbd5e1; border-radius: 8px; padding: 10px 11px;
  background: #f8fafc; color: #64748b; font-size: 12px; line-height: 1.4; font-weight: 760; min-width: 0;
}
.hvc-file-empty svg { color: #2563eb; flex: 0 0 auto; }
.hvc-file-row {
  display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 9px; align-items: center;
  border: 1px solid #dbe4f0; border-radius: 8px; padding: 8px 10px; background: #fff;
}
.hvc-file-row--high { border-left: 3px solid #16a34a; }
.hvc-file-row--mid { border-left: 3px solid #2563eb; }
.hvc-file-row--low { border-left: 3px solid #d97706; }
.hvc-file-no {
  display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 8px;
  background: #eff6ff; color: #1d4ed8; font-size: 11px; font-weight: 950;
}
.hvc-file-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hvc-file-main b { min-width: 0; color: #0f172a; font-size: 12.5px; font-weight: 900; word-break: break-word; }
.hvc-file-main span { min-width: 0; color: #64748b; font-size: 11.5px; font-weight: 720; word-break: break-word; }
.hvc-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.hvc-actions--primary { padding-top: 2px; }
.hvc-action-hint { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; color: #94a3b8; font-size: 10.5px; font-weight: 720; }
.hvc-body { display: flex; flex-direction: column; gap: 13px; }
.hvc-empty-line {
  display: flex; align-items: center; gap: 8px; border: 1px dashed #cbd5e1; border-radius: 8px;
  padding: 11px 12px; background: #fff; color: #64748b; font-size: 12px; font-weight: 780; min-width: 0;
}
.hvc-empty-line svg { color: #2563eb; flex: 0 0 auto; }
.hvc-empty-state { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(300px, .9fr); gap: 16px; align-items: center; border: 1px solid #dbe4f0; border-radius: 14px; padding: 20px; background: linear-gradient(115deg, #fff 0%, #f8fbff 100%); box-shadow: 0 10px 26px rgba(15, 23, 42, .045); }
.hvc-empty-icon { display: inline-flex; align-items: center; justify-content: center; width: 54px; height: 54px; border-radius: 16px; background: #fff1eb; color: #ea580c; }
.hvc-empty-copy { min-width: 0; }
.hvc-empty-copy .hlv-eyebrow { margin-bottom: 4px; }
.hvc-empty-copy h3 { margin: 0; color: #0f172a; font-size: 17px; line-height: 1.3; font-weight: 950; }
.hvc-empty-copy p { margin: 4px 0 0; color: #64748b; font-size: 12px; line-height: 1.55; font-weight: 720; overflow-wrap: anywhere; }
.hvc-empty-steps { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
.hvc-empty-steps span { display: flex; flex-direction: column; gap: 3px; min-width: 64px; }
.hvc-empty-steps b { color: #2563eb; font-size: 10px; letter-spacing: .06em; }
.hvc-empty-steps em { color: #475569; font-size: 10.5px; line-height: 1.3; font-style: normal; font-weight: 850; }
.hvc-empty-steps > i { color: #94a3b8; flex: 0 0 auto; }
.hvc-overview, .hvc-cumulative, .hvc-transition {
  display: flex; flex-direction: column; gap: 12px; border: 1px solid #dbe4f0; border-radius: 14px; padding: 18px; background: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .045); min-width: 0;
}
.hvc-analysis-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-bottom: 2px; }
.hvc-analysis-head-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hvc-analysis-icon { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; flex: 0 0 auto; border-radius: 13px; background: #fff1eb; color: #ea580c; }
.hvc-analysis-head .hlv-eyebrow { margin-bottom: 3px; }
.hvc-analysis-head h3 { margin: 0; color: #0f172a; font-size: 17px; line-height: 1.25; font-weight: 950; }
.hvc-analysis-head p { margin: 3px 0 0; color: #64748b; font-size: 11.5px; line-height: 1.4; font-weight: 720; overflow-wrap: anywhere; }
.hvc-analysis-status { display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto; border: 1px solid #dbeafe; border-radius: 999px; padding: 6px 9px; background: #f8fbff; color: #2563eb; font-size: 10.8px; font-weight: 900; white-space: nowrap; }
.hvc-decision { border: 1px solid #fed7aa; border-left: 4px solid #f97316; border-radius: 10px; padding: 14px 15px; background: linear-gradient(110deg, #fff7ed 0%, #fffaf5 100%); }
.hvc-decision h3 { margin: 0; color: #0f172a; font-size: 18px; line-height: 1.25; font-weight: 950; }
.hvc-decision p { margin: 5px 0 0; color: #475569; font-size: 12.5px; line-height: 1.55; font-weight: 740; }
.hvc-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.hvc-metric {
  min-height: 66px; display: flex; flex-direction: column; justify-content: center; gap: 3px;
  border: 1px solid #dbe4f0; border-radius: 8px; padding: 9px 11px; background: #f8fafc;
}
.hvc-metric strong { color: #0f172a; font-size: 20px; line-height: 1; font-weight: 950; }
.hvc-metric span { color: #64748b; font-size: 11.5px; line-height: 1.3; font-weight: 780; }
.hvc-metric--change { border-left: 3px solid #d97706; background: #fffbeb; }
.hvc-metric--flag { border-left: 3px solid #dc2626; background: #fff7ed; }
.hvc-proof-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.hvc-proof {
  min-height: 68px; display: flex; flex-direction: column; justify-content: center; gap: 3px;
  border: 1px solid #dbe4f0; border-radius: 8px; padding: 9px 11px; background: #f8fafc; min-width: 0;
}
.hvc-proof span { color: #64748b; font-size: 10.8px; font-weight: 950; text-transform: uppercase; }
.hvc-proof b { color: #0f172a; font-size: 12.5px; line-height: 1.32; font-weight: 950; overflow-wrap: anywhere; }
.hvc-proof em { color: #64748b; font-size: 11px; line-height: 1.35; font-style: normal; font-weight: 730; overflow-wrap: anywhere; }
.hvc-version-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.hvc-version-chip {
  min-height: 78px; display: flex; flex-direction: column; gap: 4px;
  border: 1px solid #dbe4f0; border-radius: 8px; padding: 10px; background: #fff; min-width: 0;
}
.hvc-version-chip b { color: #0f172a; font-size: 14px; font-weight: 950; }
.hvc-version-chip span { color: #334155; font-size: 12px; font-weight: 850; line-height: 1.35; word-break: break-word; }
.hvc-version-chip em { margin-top: auto; color: #64748b; font-size: 11px; font-style: normal; font-weight: 740; }
.hvc-version-chip small { color: #2563eb; font-size: 10.8px; line-height: 1.3; font-weight: 850; }
.hvc-warning p { margin: 4px 0 0; }
.hvc-timeline { position: relative; display: flex; flex-direction: column; gap: 12px; }
.hvc-transition { position: relative; margin-left: 16px; }
.hvc-transition::before {
  content: ""; position: absolute; left: -17px; top: 18px; bottom: -18px; width: 2px; background: #dbe4f0;
}
.hvc-transition:last-child::before { bottom: 18px; }
.hvc-transition-head { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 10px; align-items: center; }
.hvc-transition-head > span {
  display: inline-flex; align-items: center; justify-content: center; min-height: 34px; border-radius: 8px;
  background: #eff6ff; color: #1d4ed8; font-size: 12px; font-weight: 950;
}
.hvc-transition-head b { display: block; color: #0f172a; font-size: 15px; line-height: 1.25; font-weight: 950; }
.hvc-transition-head em { display: block; margin-top: 2px; color: #64748b; font-size: 11.5px; line-height: 1.35; font-style: normal; font-weight: 720; word-break: break-word; }
.hvc-transition-note { margin: -3px 0 0; color: #475569; font-size: 12.5px; line-height: 1.55; font-weight: 740; overflow-wrap: anywhere; }
.hvc-summary-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 7px; }
.hvc-summary-grid span {
  min-height: 48px; display: flex; flex-direction: column; justify-content: center; gap: 2px;
  border: 1px solid #e2e8f0; border-radius: 8px; padding: 7px 9px; background: #f8fafc;
  color: #64748b; font-size: 11px; font-weight: 800;
}
.hvc-summary-grid b { color: #0f172a; font-size: 16px; line-height: 1; font-weight: 950; }
.hvc-missing { border: 1px solid #fecaca; border-radius: 8px; padding: 9px 11px; background: #fef2f2; color: #991b1b; font-size: 12px; font-weight: 780; }
.hvc-missing b { display: block; margin-bottom: 3px; font-weight: 950; }
.hvc-missing span { word-break: break-word; }
.hvc-change-list { display: flex; flex-direction: column; gap: 8px; }
.hvc-change-row { border: 1px solid #e2e8f0; border-radius: 8px; padding: 10px; background: #fff; min-width: 0; }
.hvc-change-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.hvc-change-title b { color: #0f172a; font-size: 12.5px; line-height: 1.35; font-weight: 900; word-break: break-word; }
.hvc-change-title span { display: inline-flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.hvc-reasons { margin: 7px 0 0; padding-left: 17px; color: #475569; font-size: 11.5px; line-height: 1.5; font-weight: 700; }
.hvc-reasons li { margin: 2px 0; word-break: break-word; }
.hvc-flags { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; }
.hvc-flags span { border-left: 3px solid #dc2626; padding-left: 8px; color: #991b1b; font-size: 11.5px; line-height: 1.45; font-weight: 720; word-break: break-word; overflow-wrap: anywhere; }
.hvc-flag-excerpt { display: block; margin-top: 3px; color: #7f1d1d; font-size: 11.2px; line-height: 1.5; font-style: normal; font-weight: 690; white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.hvc-cumulative { border-color: #bfdbfe; background: #f8fbff; }
.hvc-cumulative-head h3 { margin: 0; color: #0f172a; font-size: 18px; font-weight: 950; }
.hvc-cumulative-head p { margin: 4px 0 0; color: #475569; font-size: 12.5px; line-height: 1.55; font-weight: 720; }
.hvc-loading .hlv-loading-steps li:nth-child(2) span { background: #eff6ff; color: #1d4ed8; }
.hvc-loading .hlv-loading-steps li:nth-child(3) span { background: #f0fdf4; color: #15803d; }

@media (max-width: 900px) {
  .hlv-mode-nav { grid-template-columns: 1fr; }
  .hvc-page .hvc-workbench { grid-template-columns: 1fr; }
  .hvc-page .hvc-hero { grid-template-columns: 1fr; }
  .hvc-hero-panel { border-top: 1px solid rgba(148, 163, 184, .2); border-left: 0; }
  .hvc-page .hvc-chain-panel { border-top: 1px solid #dbe4f0; border-left: 0; }
  .hvc-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hvc-proof-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hvc-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hvc-loading-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .hlv-mode-tile { grid-template-columns: 34px minmax(0, 1fr); }
  .hlv-mode-badge { grid-column: 2; justify-self: start; }
  .hvc-page .hvc-hero .hlv-hero-copy { min-height: 0; padding: 22px 20px; }
  .hvc-hero-panel { padding: 20px; }
  .hvc-hero-panel-grid { grid-template-columns: 1fr 1fr; }
  .hvc-hero-flow { align-items: flex-start; flex-direction: column; gap: 6px; }
  .hvc-hero-flow > i { display: none; }
  .hvc-page .hvc-upload-panel, .hvc-page .hvc-chain-panel { padding: 16px; }
  .hvc-panel-head--step { align-items: flex-start; flex-direction: column; }
  .hvc-dropzone-action { display: none; }
  .hvc-action-hint { width: 100%; margin-left: 0; }
  .hvc-empty-state { grid-template-columns: auto minmax(0, 1fr); }
  .hvc-empty-steps { grid-column: 1 / -1; justify-content: flex-start; }
  .hvc-analysis-head { align-items: flex-start; flex-direction: column; }
  .hvc-analysis-status { margin-left: 52px; }
  .hvc-file-row { grid-template-columns: 30px minmax(0, 1fr); }
  .hvc-history-row { grid-template-columns: minmax(0, 1fr) 42px; }
  .hvc-history-delete { min-width: 42px; padding-inline: 8px; }
  .hvc-history-delete-label { display: none; }
  .hvc-metrics, .hvc-summary-grid { grid-template-columns: 1fr 1fr; }
  .hvc-loading-flow, .hvc-loading-scan { grid-template-columns: 1fr; }
  .hvc-loading-main { flex-direction: column; }
  .hvc-transition { margin-left: 0; }
  .hvc-transition::before { display: none; }
  .hvc-transition-head { grid-template-columns: 1fr; }
  .hvc-proof-grid { grid-template-columns: 1fr; }
  .hvc-version-strip { grid-template-columns: 1fr; }
}

/* AI-MARK[QAI-UI:helen-notification-center] 2026-07-21 16:17 (GMT+7) — CSS tab Trung tâm thông báo:
   dashboard cảnh báo định kỳ + trạng thái thiếu; card/metric gọn, còn section guide và prepared alert hiển thị đủ nguồn/checklist để không che text. | rel: QAI-LEGAL:contract-notification-center */
/* AI-MARK[QAI-UI:helen-notification-read-modal] 2026-07-21 09:53 (GMT+7) — unread badge/sidebar + modal explanation compact trong viewport, có source/evidence/next steps và lịch Telegram auto chống trùng. | rel: QAI-LEGAL:contract-notification-read-modal, QAI-LEGAL:contract-notification-telegram-scheduler */
.helen-nav-badge {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
  background: #ef4444; color: #fff; border: 2px solid #0b1534; font-size: 10px; font-weight: 950; line-height: 1;
  box-shadow: 0 6px 16px rgba(239, 68, 68, .34);
}
.helen-nav-badge.is-hidden { display: none; }
.hnc-workspace { display: flex; flex-direction: column; gap: 14px; padding: 18px; min-width: 0; }
.hnc-command {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 480px); gap: 14px; align-items: stretch;
  border: 1px solid #dbe4f0; border-radius: 8px; padding: 14px; background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .055);
}
.hnc-hero { min-width: 0; display: flex; flex-direction: column; gap: 9px; }
.hnc-hero > span {
  display: inline-flex; align-items: center; gap: 7px; width: fit-content; border-radius: 999px; padding: 5px 10px;
  background: #fff7ed; color: #c2410c; font-size: 11.5px; font-weight: 900;
}
.hnc-hero h1 { margin: 0; color: #0f172a; font-size: 30px; line-height: 1.08; font-weight: 950; }
.hnc-hero p { margin: 0; max-width: 980px; color: #475569; font-size: 13px; font-weight: 720; line-height: 1.62; }
.hnc-proof-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 2px; }
.hnc-proof-row span {
  display: inline-flex; align-items: center; gap: 5px; border: 1px solid #e2e8f0; border-radius: 999px; padding: 5px 8px;
  background: #f8fafc; color: #334155; font-size: 11.5px; font-weight: 850;
}
.hnc-actions { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.hnc-search { display: flex; gap: 8px; min-width: 0; }
.hnc-search input, .hnc-select {
  width: 100%; min-height: 38px; border: 1px solid #cbd5e1; border-radius: 8px; padding: 8px 10px;
  background: #fff; color: #0f172a; font-size: 12.5px; font-weight: 750; outline: none;
}
.hnc-search input:focus, .hnc-select:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.hnc-filter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.hnc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; border: 1px solid #dbe4f0;
  border-radius: 8px; padding: 8px 12px; background: #fff; color: #334155; font-size: 12.5px; font-weight: 900; white-space: nowrap;
}
.hnc-btn:hover:not(:disabled) { background: #f8fafc; border-color: #bfdbfe; color: #1d4ed8; }
.hnc-btn:disabled { opacity: .58; cursor: not-allowed; }
.hnc-btn--primary { border-color: #2563eb; background: #2563eb; color: #fff; }
.hnc-btn--primary:hover:not(:disabled) { background: #1d4ed8; color: #fff; }
.hnc-btn--send { border-color: #fed7aa; background: #fff7ed; color: #c2410c; }
.hnc-btn--send:hover:not(:disabled) { background: #ffedd5; border-color: #fb923c; color: #9a3412; }
.hnc-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.hnc-metric {
  display: grid; grid-template-columns: 22px auto minmax(0, 1fr); gap: 7px; align-items: center; min-height: 58px;
  border: 1px solid #dbe4f0; border-radius: 8px; padding: 9px 11px; background: #fff;
}
.hnc-metric i { color: #64748b; }
.hnc-metric strong { min-width: 0; color: #0f172a; font-size: 20px; font-weight: 950; line-height: 1; white-space: nowrap; }
.hnc-metric span { min-width: 0; color: #64748b; font-size: 11.5px; font-weight: 820; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hnc-metric--critical { border-left: 3px solid #dc2626; }
.hnc-metric--high { border-left: 3px solid #ea580c; }
.hnc-metric--unread { border-left: 3px solid #ef4444; background: #fffafa; }
.hnc-metric--time { border-left: 3px solid #2563eb; }
.hnc-metric--missing { border-left: 3px solid #7c3aed; }
.hnc-metric--ok { border-left: 3px solid #16a34a; }
.hnc-metric--warn { border-left: 3px solid #d97706; }
.hnc-metric--prepared { border-left: 3px solid #0ea5e9; background: #f8fbff; }
.hnc-active-filters {
  display: flex; flex-wrap: wrap; align-items: center; gap: 7px; border: 1px solid #dbe4f0; border-radius: 8px; padding: 8px 10px;
  background: #fff; color: #475569; font-size: 12px; font-weight: 820;
}
.hnc-active-filters span, .hnc-active-filters button {
  display: inline-flex; align-items: center; gap: 5px; border: 1px solid #dbe4f0; border-radius: 999px; padding: 5px 8px;
  background: #f8fafc; color: #334155;
}
.hnc-active-filters b { color: #1d4ed8; font-weight: 950; }
.hnc-active-filters button { cursor: pointer; background: #fff; color: #c2410c; font-weight: 950; }
.hnc-active-filters button:hover { border-color: #fed7aa; background: #fff7ed; }
.hnc-dimension-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: 10px; align-items: start; }
.hnc-dimension {
  display: flex; flex-direction: column; gap: 8px; border: 1px solid #dbe4f0; border-radius: 8px; padding: 10px;
  background: #fff; box-shadow: 0 6px 18px rgba(15, 23, 42, .035); min-width: 0;
}
.hnc-dimension-head { display: grid; gap: 2px; min-width: 0; }
.hnc-dimension-head span {
  display: inline-flex; align-items: center; gap: 6px; width: fit-content; color: #2563eb; font-size: 11px; font-weight: 950; text-transform: uppercase;
}
.hnc-dimension-head strong { min-width: 0; color: #0f172a; font-size: 15px; font-weight: 950; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hnc-dimension-head p { margin: 0; min-width: 0; color: #64748b; font-size: 11.5px; font-weight: 720; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hnc-coverage-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.hnc-coverage-card {
  min-height: 58px; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 2px 7px;
  align-items: center; text-align: left; border: 1px solid #dbe4f0; border-radius: 8px; padding: 7px 8px; background: #f8fafc; cursor: pointer;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; min-width: 0;
}
.hnc-coverage-card:hover, .hnc-coverage-card.is-active { border-color: #2563eb; background: #eff6ff; box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .12); }
.hnc-coverage-card span { min-width: 0; color: #0f172a; font-size: 12px; font-weight: 950; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hnc-coverage-card strong { grid-row: span 2; color: #0f172a; font-size: 19px; font-weight: 950; line-height: 1; white-space: nowrap; }
.hnc-coverage-card em { min-width: 0; color: #64748b; font-size: 10.5px; font-style: normal; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hnc-coverage-card.is-covered { background: #fff; }
.hnc-section-guide {
  display: grid; grid-template-columns: minmax(0, .96fr) minmax(0, 1.04fr); gap: 8px; align-items: stretch;
  border: 1px solid #bfdbfe; border-radius: 8px; padding: 9px; background: #eff6ff; min-width: 0;
}
.hnc-section-guide-head { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.hnc-section-guide-head > span {
  display: inline-flex; align-items: center; gap: 5px; width: fit-content; color: #1d4ed8; font-size: 10.5px; font-weight: 950; text-transform: uppercase;
}
.hnc-section-guide-head strong {
  min-width: 0; color: #0f172a; font-size: 12.5px; font-weight: 950; line-height: 1.24; white-space: normal; overflow: visible; text-overflow: clip;
}
.hnc-section-guide-head p {
  margin: 0; min-width: 0; color: #334155; font-size: 11.5px; font-weight: 760; line-height: 1.38; white-space: normal; overflow: visible; text-overflow: clip;
}
.hnc-section-source {
  display: flex; align-items: flex-start; gap: 5px; min-width: 0; color: #1d4ed8; font-size: 10.8px; font-weight: 820; line-height: 1.36; white-space: normal; overflow: visible; text-overflow: clip;
}
.hnc-section-source i { flex: 0 0 auto; margin-top: 1px; }
.hnc-section-checks { list-style: none; margin: 0; padding: 0; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.hnc-section-checks li {
  min-width: 0; display: flex; align-items: center; gap: 5px; border: 1px solid #dbeafe; border-radius: 8px; padding: 5px 6px;
  background: #fff; color: #334155; font-size: 10.8px; font-weight: 840; line-height: 1.28; white-space: normal; overflow: visible; text-overflow: clip;
}
.hnc-section-checks li i { color: #2563eb; flex: 0 0 auto; }
.hnc-section-checks li span { min-width: 0; overflow: visible; text-overflow: clip; white-space: normal; }
.hnc-lane-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.hnc-lane-card {
  min-height: 46px; display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 7px; align-items: center; text-align: left;
  border: 1px solid #dbe4f0; border-radius: 8px; padding: 8px; background: #fff; color: #334155; cursor: pointer;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; min-width: 0;
}
.hnc-lane-card:hover, .hnc-lane-card.is-active { border-color: #2563eb; background: #eff6ff; box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .12); }
.hnc-lane-card i { color: #2563eb; }
.hnc-lane-card span { min-width: 0; color: #0f172a; font-size: 11.8px; font-weight: 920; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hnc-lane-card strong { color: #0f172a; font-size: 16px; font-weight: 950; white-space: nowrap; }
.hnc-workstream-row { display: flex; flex-wrap: nowrap; gap: 6px; overflow-x: auto; padding-bottom: 1px; }
.hnc-workstream-chip {
  display: inline-flex; align-items: center; gap: 5px; min-height: 30px; border: 1px solid #dbe4f0; border-radius: 999px; padding: 5px 8px;
  background: #f8fafc; color: #334155; font-size: 11.5px; font-weight: 900; cursor: pointer; white-space: nowrap; flex: 0 0 auto;
}
.hnc-workstream-chip b {
  min-width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px;
  background: #e2e8f0; color: #0f172a; font-size: 10.5px; font-weight: 950;
}
.hnc-workstream-chip:hover, .hnc-workstream-chip.is-active { border-color: #2563eb; background: #eff6ff; color: #1d4ed8; }
.hnc-note {
  display: flex; align-items: center; gap: 8px; border: 1px solid #bfdbfe; border-radius: 8px; padding: 10px 12px;
  background: #eff6ff; color: #1d4ed8; font-size: 12.5px; font-weight: 850; line-height: 1.5;
}
.hnc-note--schedule { border-color: #bbf7d0; background: #f0fdf4; color: #166534; }
.hnc-board {
  display: flex; flex-direction: column; gap: 12px; border: 1px solid #dbe4f0; border-radius: 8px; padding: 13px;
  background: #fff; box-shadow: 0 12px 30px rgba(15, 23, 42, .045);
}
.hnc-board-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.hnc-board-head span { display: block; color: #ea580c; font-size: 11px; font-weight: 950; text-transform: uppercase; }
.hnc-board-head strong { display: block; margin-top: 2px; color: #0f172a; font-size: 18px; font-weight: 950; }
.hnc-board-head p { margin: 0; max-width: 680px; color: #64748b; font-size: 12.5px; font-weight: 720; line-height: 1.55; }
.hnc-alert-list { display: flex; flex-direction: column; gap: 10px; }
.hnc-alert {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 360px); gap: 12px;
  border: 1px solid #dbe4f0; border-left-width: 4px; border-radius: 8px; padding: 12px; background: #fff; min-width: 0;
  cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.hnc-alert:hover, .hnc-alert:focus-visible { transform: translateY(-1px); border-color: #bfdbfe; box-shadow: 0 16px 34px rgba(15, 23, 42, .09); outline: none; }
.hnc-alert.is-unread { box-shadow: inset 0 0 0 1px rgba(239, 68, 68, .12), 0 12px 28px rgba(15, 23, 42, .055); }
.hnc-alert.is-read { opacity: .92; }
.hnc-alert--critical { border-left-color: #dc2626; background: #fffafa; }
.hnc-alert--high { border-left-color: #ea580c; background: #fffaf5; }
.hnc-alert--medium { border-left-color: #2563eb; }
.hnc-alert--low { border-left-color: #16a34a; }
.hnc-alert-main { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.hnc-alert-kicker { display: flex; flex-wrap: nowrap; gap: 6px; align-items: center; color: #64748b; font-size: 11.5px; font-weight: 850; overflow: hidden; }
.hnc-alert-kicker > span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hnc-read-state {
  display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 3px 7px; font-size: 10.8px; font-weight: 950;
}
.hnc-read-state.is-unread { background: #fee2e2; color: #991b1b; }
.hnc-read-state.is-read { background: #f1f5f9; color: #64748b; }
.hnc-pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 8px; font-size: 11px; font-weight: 950; }
.hnc-pill--critical { background: #fee2e2; color: #991b1b; }
.hnc-pill--high { background: #ffedd5; color: #9a3412; }
.hnc-pill--medium { background: #dbeafe; color: #1d4ed8; }
.hnc-pill--low { background: #dcfce7; color: #166534; }
.hnc-prepared-pill {
  display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 3px 7px;
  background: #e0f2fe; color: #075985; font-size: 10.8px; font-weight: 950; flex: 0 0 auto;
}
/* AI-MARK[QAI-UI:helen-notification-contract-name] 2026-07-28 08:17 (GMT+7) — tên HĐ đã chuẩn hoá dài hơn mã
   cf_ cũ nên cho tối đa 2 dòng (vẫn bounded, tên đầy đủ ở title + popup); dòng định danh giữ 1 dòng.
   | rel: QAI-LEGAL:contract-display-name */
.hnc-alert h3 {
  margin: 0; min-width: 0; color: #0f172a; font-size: 16px; font-weight: 950; line-height: 1.28;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hnc-alert p { margin: 0; min-width: 0; color: #64748b; font-size: 12.5px; font-weight: 760; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hnc-tag-row { display: flex; flex-wrap: nowrap; gap: 6px; overflow: hidden; }
.hnc-tag-row span {
  display: inline-flex; align-items: center; gap: 4px; border: 1px solid #dbe4f0; border-radius: 999px; padding: 4px 7px;
  background: #f8fafc; color: #334155; font-size: 10.8px; font-weight: 880; line-height: 1.2; min-width: 0; max-width: 33%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hnc-tag-row i { color: #2563eb; flex: 0 0 auto; }
.hnc-tag-row span.hnc-derived-tag { border-color: #fed7aa; background: #fff7ed; color: #9a3412; }
.hnc-tag-row span.hnc-derived-tag i { color: #ea580c; }
.hnc-alert-evidence { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; }
.hnc-evidence-row, .hnc-evidence-empty {
  border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 9px; background: #f8fafc; min-width: 0;
}
.hnc-evidence-row span { display: block; color: #94a3b8; font-size: 10.8px; font-weight: 900; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hnc-evidence-row strong { display: block; margin-top: 2px; color: #334155; font-size: 12px; font-weight: 850; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hnc-evidence-row em { display: block; margin-top: 3px; color: #64748b; font-size: 11.5px; font-style: normal; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hnc-evidence-empty { color: #64748b; font-size: 12px; font-weight: 760; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hnc-alert-side { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hnc-due, .hnc-ai-signal, .hnc-next-action {
  border: 1px solid #e2e8f0; border-radius: 8px; padding: 9px 10px; background: #fff; min-width: 0;
}
.hnc-due { display: grid; grid-template-columns: 1fr auto; gap: 3px 8px; align-items: baseline; }
.hnc-due span { color: #c2410c; font-size: 12px; font-weight: 950; }
.hnc-due strong { color: #0f172a; font-size: 15px; font-weight: 950; }
.hnc-due em { grid-column: 1 / -1; min-width: 0; color: #64748b; font-size: 11.5px; font-style: normal; font-weight: 720; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hnc-ai-signal, .hnc-next-action { display: flex; flex-direction: column; gap: 4px; }
.hnc-ai-signal b, .hnc-next-action b { color: #0f172a; font-size: 12px; font-weight: 950; }
.hnc-ai-signal span, .hnc-next-action span { color: #475569; font-size: 12px; font-weight: 720; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hnc-ai-signal small { color: #1d4ed8; font-size: 11px; font-weight: 900; }
.hnc-alert.is-prepared { background: #f8fbff; border-left-color: #0ea5e9; }
.hnc-alert.is-prepared .hnc-alert-kicker { flex-wrap: wrap; overflow: visible; }
.hnc-alert.is-prepared h3,
.hnc-alert.is-prepared p,
.hnc-alert.is-prepared .hnc-evidence-row span,
.hnc-alert.is-prepared .hnc-evidence-row strong,
.hnc-alert.is-prepared .hnc-evidence-row em,
.hnc-alert.is-prepared .hnc-ai-signal span,
.hnc-alert.is-prepared .hnc-next-action span,
.hnc-alert.is-prepared .hnc-due em {
  white-space: normal; overflow: visible; text-overflow: clip;
}
.hnc-open-hint {
  display: inline-flex; align-items: center; gap: 5px; color: #1d4ed8; font-size: 11.5px; font-weight: 900;
}
.hnc-channels { display: flex; flex-wrap: wrap; gap: 6px; }
.hnc-channels span {
  display: inline-flex; align-items: center; gap: 5px; border: 1px solid #dbe4f0; border-radius: 999px; padding: 5px 8px;
  background: #f8fafc; color: #334155; font-size: 11.5px; font-weight: 850;
}
.hnc-empty { padding: 24px 12px; }

.hnc-modal-open { overflow: hidden; }
.hnc-modal-backdrop {
  position: fixed; inset: 0; z-index: 1320; display: flex; align-items: center; justify-content: center;
  padding: 12px 16px; background: rgba(15, 23, 42, .48); overflow: hidden;
}
.hnc-modal {
  width: min(1260px, calc(100vw - 112px)); max-height: calc(100dvh - 48px); display: flex; flex-direction: column;
  border-radius: 8px; border: 1px solid #dbe4f0; background: #fff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, .26); overflow: hidden;
}
.hnc-modal-head {
  display: flex; justify-content: space-between; gap: 12px; padding: 11px 16px; border-bottom: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}
.hnc-modal-head > div { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.hnc-modal-eyebrow {
  display: inline-flex; align-items: center; gap: 6px; width: fit-content; color: #c2410c; font-size: 11.5px; font-weight: 950;
}
.hnc-modal h2 { margin: 0; color: #0f172a; font-size: 18px; font-weight: 950; line-height: 1.2; word-break: break-word; }
.hnc-modal-head p { margin: 0; color: #64748b; font-size: 12px; font-weight: 760; word-break: break-word; }
.hnc-modal-close {
  width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #dbe4f0;
  border-radius: 8px; color: #64748b; background: #fff; flex: 0 0 auto;
}
.hnc-modal-close:hover { color: #0f172a; border-color: #bfdbfe; background: #eff6ff; }
.hnc-modal-strip {
  display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 16px; border-bottom: 1px solid #e2e8f0; background: #fff;
}
.hnc-modal-strip span {
  display: inline-flex; align-items: center; gap: 5px; border: 1px solid #e2e8f0; border-radius: 999px; padding: 4px 8px;
  color: #334155; background: #f8fafc; font-size: 11px; font-weight: 850;
}
.hnc-modal-strip .hnc-pill--critical { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.hnc-modal-strip .hnc-pill--high { background: #ffedd5; color: #9a3412; border-color: #fed7aa; }
.hnc-modal-strip .hnc-pill--medium { background: #dbeafe; color: #1d4ed8; border-color: #bfdbfe; }
.hnc-modal-strip .hnc-pill--low { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.hnc-modal-dashboard-only {
  display: inline-flex; align-items: center; gap: 7px; border: 1px solid #bae6fd; border-radius: 8px; padding: 8px 11px;
  background: #f0f9ff; color: #075985; font-size: 12.5px; font-weight: 900;
}
/* Thêm khối "Hồ sơ hợp đồng" nên nội dung popup có thể cao hơn khung: cho cuộn dọc thay vì CẮT mất
   dòng cuối (nguồn tên / ghi chú tên suy từ tệp). */
.hnc-modal-body { display: flex; flex-direction: column; gap: 8px; padding: 10px 16px 12px; background: #f8fafc; overflow-y: auto; overflow-x: hidden; flex: 1 1 auto; min-height: 0; }
.hnc-modal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.hnc-modal-lower { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 8px; align-items: stretch; }
.hnc-modal-section {
  border: 1px solid #dbe4f0; border-radius: 8px; padding: 9px 10px; background: #fff; min-width: 0;
}
.hnc-modal-section--main { border-left: 3px solid #2563eb; }
.hnc-modal-section h3 {
  margin: 0 0 5px; display: flex; align-items: center; gap: 7px; color: #0f172a; font-size: 12.5px; font-weight: 950;
}
.hnc-modal-section p { margin: 0; color: #334155; font-size: 12.2px; font-weight: 750; line-height: 1.45; word-break: break-word; }
.hnc-modal-section small { display: block; margin-top: 5px; color: #64748b; font-size: 11px; font-weight: 720; line-height: 1.38; word-break: break-word; }
.hnc-grounding-note {
  margin-top: 7px; display: flex; gap: 7px; align-items: flex-start; border: 1px solid #bbf7d0; border-radius: 8px; padding: 7px 9px;
  background: #f0fdf4; color: #166534; font-size: 11.2px; font-weight: 780; line-height: 1.4;
}
.hnc-grounding-note i { flex: 0 0 auto; margin-top: 1px; }
.hnc-modal-classification { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 7px; }
.hnc-modal-classification span {
  display: flex; align-items: center; gap: 5px; border: 1px solid #dbe4f0; border-radius: 8px; padding: 6px 7px;
  background: #fff; color: #334155; font-size: 10.8px; font-weight: 780; line-height: 1.25; min-width: 0;
}
.hnc-modal-classification b { color: #1d4ed8; font-weight: 950; }
.hnc-modal-classification i { color: #2563eb; flex: 0 0 auto; }
/* Khối "Hồ sơ hợp đồng của cảnh báo" trong popup — bảng dữ kiện định danh, KHÔNG cắt chữ. */
.hnc-modal-section--contract { border-left: 3px solid #0ea5e9; }
.hnc-contract-facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 6px; }
.hnc-contract-facts > div { border: 1px solid #e2e8f0; border-radius: 8px; padding: 6px 8px; background: #f8fafc; min-width: 0; }
.hnc-contract-facts dt { color: #94a3b8; font-size: 10.2px; font-weight: 950; text-transform: uppercase; }
.hnc-contract-facts dd { margin: 2px 0 0; color: #334155; font-size: 11.8px; font-weight: 850; line-height: 1.38; word-break: break-word; }
.hnc-contract-note { color: #9a3412 !important; }
.hnc-source-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 6px; }
.hnc-source-card, .hnc-modal-empty-source {
  border: 1px solid #e2e8f0; border-radius: 8px; padding: 7px 8px; background: #f8fafc; min-width: 0;
}
.hnc-source-card span { display: block; color: #94a3b8; font-size: 10.2px; font-weight: 950; text-transform: uppercase; }
.hnc-source-card strong { display: block; margin-top: 2px; color: #334155; font-size: 11.8px; font-weight: 850; line-height: 1.38; word-break: break-word; }
.hnc-source-card em { display: block; margin-top: 2px; color: #64748b; font-size: 11.2px; font-style: normal; font-weight: 720; word-break: break-word; }
.hnc-modal-empty-source { display: flex; gap: 8px; color: #64748b; font-size: 11.5px; font-weight: 760; line-height: 1.4; }
.hnc-step-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.hnc-step-list li { display: grid; grid-template-columns: 21px minmax(0, 1fr); gap: 7px; align-items: start; }
.hnc-step-list li span {
  width: 21px; height: 21px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
  background: #dbeafe; color: #1d4ed8; font-size: 10.5px; font-weight: 950;
}
.hnc-step-list p { margin: 0; color: #334155; font-size: 12.1px; font-weight: 780; line-height: 1.4; word-break: break-word; }
.hnc-modal-actions {
  display: flex; justify-content: flex-end; gap: 8px; padding: 9px 16px; border-top: 1px solid #e2e8f0; background: #fff;
}
.hnc-modal-loading {
  display: flex; align-items: center; gap: 9px; margin: 14px 18px; border: 1px solid #bfdbfe; border-radius: 8px; padding: 14px;
  background: #eff6ff; color: #1d4ed8; font-size: 13px; font-weight: 850;
}
.hnc-modal-loading i, .hnc-btn i[data-lucide="loader-2"] { animation: hnc-spin 1s linear infinite; }
.hnc-modal-error { margin: 14px 18px; }
@keyframes hnc-spin { to { transform: rotate(360deg); } }

/* AI-MARK[QAI-UI:helen-legal-status-report] 2026-08-06 08:13 (GMT+7) — (1) khối TƯ VẤN pháp lý đầu popup cảnh báo
   và (2) màn BÁO CÁO TÌNH TRẠNG PHÁP LÝ toàn danh mục (.hlsr-*). Không dùng transform/filter/opacity ở tổ tiên
   overlay nên KHÔNG tạo stacking-context mới (popup vẫn nổi đúng tầng — xem UI-STACKING-REGISTRY.md).
   | rel: QAI-LEGAL:legal-status-report, QAI-LEGAL:legal-status-advisory, legal/legal-status-advisory.js */
.hnc-btn--mail { border-color: #bfdbfe; background: #eff6ff; color: #1d4ed8; }
.hnc-btn--mail:hover:not(:disabled) { background: #dbeafe; border-color: #60a5fa; color: #1e40af; }

/* ── Khối tư vấn trong popup ──────────────────────────────────────────────── */
.hnc-advisory {
  border: 1px solid #c7d7f0; border-left: 3px solid #1d4ed8; border-radius: 8px; padding: 10px 12px; background: #fff;
  display: flex; flex-direction: column; gap: 9px;
}
.hnc-advisory-head { display: flex; align-items: center; gap: 7px; color: #1d4ed8; font-size: 11px; font-weight: 950; letter-spacing: .5px; text-transform: uppercase; }
.hnc-advisory-verdict { color: #0f172a; font-size: 13px; font-weight: 800; line-height: 1.5; word-break: break-word; }
.hnc-advisory-verdict b { color: #1d4ed8; font-weight: 950; }
.hnc-advisory-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.hnc-advisory-block { border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 10px; background: #f8fafc; min-width: 0; }
.hnc-advisory-block--risk { border-color: #fecaca; background: #fef2f2; }
.hnc-advisory-block h4 {
  margin: 0 0 5px; display: flex; align-items: center; gap: 6px; color: #334155; font-size: 11px; font-weight: 950;
  text-transform: uppercase; letter-spacing: .4px;
}
.hnc-advisory-block--risk h4 { color: #b91c1c; }
.hnc-advisory-block p { margin: 0; color: #334155; font-size: 12.2px; font-weight: 700; line-height: 1.5; word-break: break-word; }
.hnc-advisory-block--risk p { color: #7f1d1d; }
.hnc-advisory-block ul, .hnc-advisory-block ol { margin: 0; padding-left: 17px; color: #334155; font-size: 12.2px; font-weight: 700; line-height: 1.55; }
.hnc-advisory-block li { margin-bottom: 3px; word-break: break-word; }
.hnc-advisory-block li b { color: #0f172a; font-weight: 950; }
/* Thiếu căn cứ là THÔNG TIN QUAN TRỌNG, không phải chỗ trống — tô cam để người đọc thấy ngay Helen đang từ chối suy đoán. */
.hnc-advisory-nobasis { margin: 0; color: #b45309 !important; font-size: 12px; font-weight: 800; line-height: 1.5; }
.hnc-advisory-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; padding-top: 8px; border-top: 1px dashed #dbe4f0; }
.hnc-advisory-meta span { display: inline-flex; align-items: center; gap: 5px; color: #64748b; font-size: 11.2px; font-weight: 750; }
.hnc-advisory-meta b { color: #0f172a; font-weight: 950; }
.hnc-advisory-limit {
  display: flex; align-items: flex-start; gap: 6px; border-radius: 8px; padding: 7px 9px; background: #f1f5f9;
  color: #475569; font-size: 11.2px; font-weight: 720; line-height: 1.45;
}
.hnc-advisory-limit i { flex: 0 0 auto; margin-top: 1px; }

/* ── Màn Báo cáo tình trạng pháp lý toàn danh mục ─────────────────────────── */
.hlsr-workspace { display: flex; flex-direction: column; gap: 14px; padding: 18px; min-width: 0; }
.hlsr-verdict {
  border: 1px solid #dbe4f0; border-left: 3px solid #1d4ed8; border-radius: 8px; padding: 13px 15px; background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .055);
}
.hlsr-verdict-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.hlsr-verdict-head > span { display: inline-flex; align-items: center; gap: 7px; color: #1d4ed8; font-size: 11.5px; font-weight: 950; letter-spacing: .5px; text-transform: uppercase; }
.hlsr-verdict-head em { font-style: normal; color: #64748b; font-size: 12px; font-weight: 780; }
.hlsr-verdict-head em b { color: #0f172a; font-weight: 950; }
.hlsr-verdict > p { margin: 0; color: #1e293b; font-size: 13.5px; font-weight: 750; line-height: 1.6; word-break: break-word; }
.hlsr-verdict-meta { display: flex; flex-wrap: wrap; gap: 7px 16px; margin-top: 10px; padding-top: 9px; border-top: 1px dashed #dbe4f0; }
.hlsr-verdict-meta span { display: inline-flex; align-items: center; gap: 5px; color: #64748b; font-size: 11.5px; font-weight: 780; }
.hlsr-dq {
  display: flex; align-items: flex-start; gap: 7px; margin-top: 9px; border: 1px solid #fed7aa; border-radius: 8px;
  padding: 8px 10px; background: #fff7ed; color: #9a3412; font-size: 11.6px; font-weight: 800; line-height: 1.45;
}
.hlsr-dq i { flex: 0 0 auto; margin-top: 1px; }

.hlsr-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; }
.hlsr-kpi {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px; border: 1px solid #dbe4f0; border-top-width: 3px;
  border-radius: 8px; padding: 10px 12px; background: #fff; cursor: pointer; text-align: left; min-width: 0;
  transition: border-color .14s ease, background .14s ease;
}
.hlsr-kpi:hover { background: #f8fafc; }
.hlsr-kpi.is-active { background: #eff6ff; border-color: #60a5fa; }
.hlsr-kpi strong { color: #0f172a; font-size: 22px; font-weight: 950; line-height: 1.1; }
.hlsr-kpi span { color: #64748b; font-size: 11.5px; font-weight: 800; }
.hlsr-kpi--critical { border-top-color: #dc2626; } .hlsr-kpi--critical i { color: #dc2626; }
.hlsr-kpi--at_risk { border-top-color: #ea580c; } .hlsr-kpi--at_risk i { color: #ea580c; }
.hlsr-kpi--watch { border-top-color: #2563eb; } .hlsr-kpi--watch i { color: #2563eb; }
.hlsr-kpi--healthy { border-top-color: #16a34a; } .hlsr-kpi--healthy i { color: #16a34a; }
.hlsr-kpi--insufficient_data { border-top-color: #94a3b8; } .hlsr-kpi--insufficient_data i { color: #94a3b8; }

.hlsr-section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 12px; margin-bottom: 9px; }
.hlsr-section-head > span { color: #0f172a; font-size: 13.5px; font-weight: 950; }
.hlsr-section-head > small { color: #64748b; font-size: 11.6px; font-weight: 760; }
.hlsr-section-head > .hnc-btn { margin-left: auto; }
.hlsr-categories, .hlsr-board { border: 1px solid #dbe4f0; border-radius: 8px; padding: 13px 15px; background: #fff; min-width: 0; }
.hlsr-category-row { display: flex; flex-wrap: wrap; gap: 8px; }
.hlsr-category {
  display: flex; flex-direction: column; gap: 1px; border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 11px;
  background: #f8fafc; min-width: 132px;
}
.hlsr-category span { color: #475569; font-size: 11.4px; font-weight: 820; }
.hlsr-category strong { color: #0f172a; font-size: 17px; font-weight: 950; line-height: 1.15; }
.hlsr-category small { color: #94a3b8; font-size: 10.8px; font-weight: 760; }

.hlsr-row { border: 1px solid #e2e8f0; border-radius: 8px; margin-bottom: 7px; background: #fff; overflow: hidden; }
.hlsr-row:last-child { margin-bottom: 0; }
.hlsr-row--critical { border-left: 3px solid #dc2626; }
.hlsr-row--at_risk { border-left: 3px solid #ea580c; }
.hlsr-row--watch { border-left: 3px solid #2563eb; }
.hlsr-row--healthy { border-left: 3px solid #16a34a; }
.hlsr-row--insufficient_data { border-left: 3px solid #94a3b8; }
.hlsr-row-head {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto auto; align-items: center; gap: 11px; width: 100%;
  border: 0; background: transparent; padding: 10px 13px; cursor: pointer; text-align: left; font: inherit;
}
.hlsr-row-head:hover { background: #f8fafc; }
.hlsr-status-dot { display: inline-flex; flex: 0 0 auto; }
.hlsr-row--critical .hlsr-status-dot i { color: #dc2626; }
.hlsr-row--at_risk .hlsr-status-dot i { color: #ea580c; }
.hlsr-row--watch .hlsr-status-dot i { color: #2563eb; }
.hlsr-row--healthy .hlsr-status-dot i { color: #16a34a; }
.hlsr-row--insufficient_data .hlsr-status-dot i { color: #94a3b8; }
.hlsr-row-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hlsr-row-name b { color: #0f172a; font-size: 13px; font-weight: 900; line-height: 1.35; word-break: break-word; }
.hlsr-row-name small { color: #64748b; font-size: 11.2px; font-weight: 740; line-height: 1.35; word-break: break-word; }
.hlsr-row-status { color: #334155; font-size: 11.5px; font-weight: 950; white-space: nowrap; }
.hlsr-row-num { color: #64748b; font-size: 11.4px; font-weight: 800; white-space: nowrap; }
.hlsr-row-body { border-top: 1px solid #eef2f7; padding: 11px 13px; background: #f8fafc; display: flex; flex-direction: column; gap: 9px; }
.hlsr-conclusion { display: flex; gap: 8px; align-items: flex-start; }
.hlsr-conclusion i { flex: 0 0 auto; margin-top: 2px; color: #1d4ed8; }
.hlsr-conclusion p { margin: 0; color: #1e293b; font-size: 12.6px; font-weight: 760; line-height: 1.55; word-break: break-word; }
.hlsr-issue-list { display: flex; flex-direction: column; gap: 6px; }
.hlsr-issue {
  display: grid; grid-template-columns: auto auto auto minmax(0, 1fr) auto; align-items: center; gap: 9px; width: 100%;
  border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 10px; background: #fff; cursor: pointer; text-align: left; font: inherit;
}
.hlsr-issue:hover { border-color: #93c5fd; background: #f0f7ff; }
.hlsr-issue b { color: #0f172a; font-size: 12.2px; font-weight: 900; white-space: nowrap; }
.hlsr-issue-due { color: #64748b; font-size: 11.2px; font-weight: 820; white-space: nowrap; }
.hlsr-issue-action { color: #475569; font-size: 11.4px; font-weight: 720; line-height: 1.35; min-width: 0; word-break: break-word; }
.hlsr-issue i { color: #94a3b8; flex: 0 0 auto; }
.hlsr-issue-empty { color: #64748b; font-size: 12px; font-weight: 760; }
.hlsr-row-foot { display: flex; flex-wrap: wrap; gap: 6px 15px; padding-top: 8px; border-top: 1px dashed #dbe4f0; }
.hlsr-row-foot span { display: inline-flex; align-items: center; gap: 5px; color: #64748b; font-size: 11.2px; font-weight: 780; }

/* AI-MARK[QAI-UI:helen-email-conflict-report] 2026-07-21 10:36 (GMT+7) — CSS tab Email đàm phán:
   board Conflict Report gồm policy mailbox, lane agreed/pending/risk và evidence email ↔ hợp đồng. | rel: QAI-LEGAL:contract-email-sync */
.hem-workspace { display: flex; flex-direction: column; gap: 12px; padding: 14px; color: #0f172a; }
.hem-command {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(310px, 390px); gap: 12px; align-items: stretch;
  border: 1px solid #dbe4f0; border-radius: 8px; padding: 14px; background: #fff;
}
.hem-hero { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.hem-hero > span {
  display: inline-flex; align-items: center; gap: 7px; width: fit-content; color: #0f766e; font-size: 12px; font-weight: 950;
}
.hem-hero h1 { margin: 0; color: #0f172a; font-size: 30px; line-height: 1.05; font-weight: 980; letter-spacing: 0; }
.hem-hero p { margin: 0; max-width: 860px; color: #475569; font-size: 13.2px; font-weight: 730; line-height: 1.55; }
.hem-proof-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 3px; }
.hem-proof-row span {
  display: inline-flex; align-items: center; gap: 5px; border: 1px solid #dbe4f0; border-radius: 999px; padding: 5px 8px;
  background: #f8fafc; color: #334155; font-size: 11.2px; font-weight: 860;
}
.hem-proof-row i { color: #0f766e; flex: 0 0 auto; }
.hem-actions { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hem-search { display: flex; gap: 8px; }
.hem-search input, .hem-select {
  width: 100%; min-width: 0; border: 1px solid #dbe4f0; border-radius: 8px; padding: 9px 10px;
  background: #f8fafc; color: #0f172a; font-size: 12.5px; font-weight: 760; outline: none;
}
.hem-search input:focus, .hem-select:focus { border-color: #14b8a6; box-shadow: 0 0 0 3px rgba(20, 184, 166, .14); background: #fff; }
.hem-filter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
/* AI-MARK[QAI-UI:email-single-workspace] 2026-07-28 09:20 (GMT+7) — MÀN DUY NHẤT Email đàm phán: đầu trang thu gọn
   (tiêu đề nhỏ hơn, bỏ hàng chip mô tả, 6 ô số liệu → 1 hàng chip .hem-metric-row), khối chính sách gập lại
   (.hem-policy-fold) và nút quét thu nhỏ + dòng trạng thái tự động (.hem-sync-dock). Chỉ dùng lại hệ màu sẵn có,
   KHÔNG z-index mới. | rel: QAI-UI:email-auto-refresh, QAI-UI:email-negotiations */
.hem-command--tight { padding: 12px 14px; }
.hem-command--tight .hem-hero h1 { font-size: 23px; }
.hem-command--tight .hem-hero p { font-size: 12.6px; }
.hem-sync-dock { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hem-btn--slim { min-height: 30px; padding: 5px 10px; font-size: 11.6px; }
.hem-sync-state { display: inline-flex; align-items: center; gap: 5px; color: #0f766e; font-size: 11px; font-weight: 850; }
.hem-sync-state i { color: #14b8a6; }
.hem-metric-row { display: flex; flex-wrap: wrap; gap: 6px; }
.hem-metric-chip {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid #dbe4f0; border-radius: 999px; padding: 5px 11px;
  background: #fff; color: #475569; font-size: 11.6px; font-weight: 800; white-space: nowrap;
}
.hem-metric-chip b { color: #0f172a; font-size: 13px; font-weight: 950; }
.hem-metric-chip i { color: #0f766e; flex: 0 0 auto; }
.hem-policy-fold { border: 1px solid #dbe4f0; border-radius: 8px; background: #fff; }
.hem-policy-fold > summary {
  display: flex; align-items: center; gap: 7px; padding: 8px 11px; cursor: pointer; list-style: none;
  color: #334155; font-size: 11.8px; font-weight: 850;
}
.hem-policy-fold > summary::-webkit-details-marker { display: none; }
.hem-policy-fold > summary::after { content: '⌄'; margin-left: auto; color: #94a3b8; font-size: 13px; }
.hem-policy-fold[open] > summary::after { content: '⌃'; }
.hem-policy-fold > summary i { color: #0f766e; flex: 0 0 auto; }
.hem-policy-fold > summary span { min-width: 0; overflow-wrap: anywhere; }
.hem-policy-body { border-top: 1px solid #eef2f7; padding: 10px 11px; display: flex; flex-direction: column; gap: 8px; }
.hem-policy-body p { margin: 0; color: #64748b; font-size: 11.6px; font-weight: 730; line-height: 1.5; }
.hem-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid #dbe4f0; border-radius: 8px;
  min-height: 38px; padding: 8px 11px; color: #334155; background: #fff; font-size: 12.2px; font-weight: 900; line-height: 1.1;
}
.hem-btn:hover:not(:disabled) { border-color: #99f6e4; color: #0f766e; background: #f0fdfa; }
.hem-btn:disabled { opacity: .62; cursor: wait; }
.hem-btn--primary { border-color: #0f766e; background: #0f766e; color: #fff; }
.hem-btn--primary:hover:not(:disabled) { border-color: #115e59; background: #115e59; color: #fff; }
.hem-btn--sync { border-color: #fed7aa; color: #9a3412; background: #fff7ed; }
.hem-btn--sync:hover:not(:disabled) { border-color: #fb923c; color: #7c2d12; background: #ffedd5; }
.hem-btn i[data-lucide="loader-2"] { animation: hnc-spin 1s linear infinite; }
.hem-metrics { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.hem-metric {
  min-width: 0; border: 1px solid #e2e8f0; border-radius: 8px; padding: 9px 10px; background: #fff;
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3px 7px; align-items: center;
}
.hem-metric i { grid-row: 1 / span 2; color: #0f766e; }
.hem-metric strong { color: #0f172a; font-size: 18px; font-weight: 980; line-height: 1; }
.hem-metric span { color: #64748b; font-size: 11px; font-weight: 820; line-height: 1.22; word-break: break-word; }
.hem-metric--conflict i, .hem-metric--high i, .hem-metric--risk i { color: #c2410c; }
.hem-metric--agreed i { color: #15803d; }
.hem-metric--pending i { color: #ca8a04; }
.hem-policy {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr); gap: 10px; align-items: stretch;
  border: 1px solid #ccfbf1; border-radius: 8px; padding: 11px 12px; background: #f0fdfa;
}
.hem-policy > div:first-child { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.hem-policy span { color: #0f766e; font-size: 11.5px; font-weight: 930; }
.hem-policy strong { color: #0f172a; font-size: 15px; font-weight: 950; word-break: break-word; }
.hem-policy p { margin: 0; color: #334155; font-size: 12px; font-weight: 740; line-height: 1.45; }
.hem-policy-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.hem-policy-grid span {
  border: 1px solid #99f6e4; border-radius: 8px; padding: 7px 8px; background: #fff; color: #334155;
  display: flex; flex-direction: column; gap: 2px; min-width: 0; word-break: break-word;
}
.hem-policy-grid b { color: #0f766e; font-size: 10.5px; font-weight: 950; text-transform: uppercase; }
.hem-note {
  display: flex; gap: 8px; align-items: flex-start; border: 1px solid #bfdbfe; border-radius: 8px; padding: 9px 10px;
  background: #eff6ff; color: #1e40af; font-size: 12px; font-weight: 790; line-height: 1.45;
}
/* AI-MARK[QAI-UI:helen-email-conflict-report] 2026-07-21 12:03 (GMT+7) — trạng thái "đang xử lý nền" khi request đồng bộ
   quá timeout proxy: nền hổ phách + icon loader quay để phân biệt với note thành công (xanh). | rel: QAI-LEGAL:email-sync-timeout-budget */
.hem-note--pending { border-color: #fcd34d; background: #fffbeb; color: #92400e; }
.hem-note--pending [data-lucide="loader-2"] { animation: hem-spin 1s linear infinite; }
@keyframes hem-spin { to { transform: rotate(360deg); } }
/* AI-MARK[QAI-UI:email-sync-upgrade] 2026-07-22 09:31 (GMT+7) — board Email đàm phán về 1 CỘT DỌC: danh sách báo cáo
   thành lưới thẻ gọn phía trên, detail full ngang phía dưới (thay master-detail 2 cột) → chọn 1 báo cáo là xem full
   hàng ngang. | rel: QAI-LEGAL:email-noise-filter */
.hem-board { display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.hem-list, .hem-detail {
  border: 1px solid #dbe4f0; border-radius: 8px; background: #fff; min-width: 0; width: 100%; max-width: 100%;
}
.hem-list { padding: 10px; }
.hem-list-head {
  display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; border-bottom: 1px solid #e2e8f0; padding: 2px 2px 9px; margin-bottom: 8px;
}
.hem-list-head span { display: block; color: #0f766e; font-size: 11px; font-weight: 950; text-transform: uppercase; }
.hem-list-head strong { display: block; margin-top: 2px; color: #0f172a; font-size: 14px; font-weight: 950; }
.hem-list-head p { margin: 0; max-width: 360px; color: #64748b; font-size: 11.5px; font-weight: 730; line-height: 1.42; }
.hem-report-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.hem-report {
  border: 1px solid #e2e8f0; border-radius: 8px; padding: 10px; background: #fff; cursor: pointer;
  display: flex; flex-direction: column; gap: 8px; min-width: 0;
}
.hem-report:hover, .hem-report.is-selected { border-color: #14b8a6; background: #f8fffd; box-shadow: 0 10px 28px rgba(15, 23, 42, .08); }
.hem-report-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.hem-report-head > div:first-child { min-width: 0; }
.hem-report-head span {
  display: inline-flex; align-items: center; gap: 5px; color: #0f766e; font-size: 11px; font-weight: 900;
}
.hem-report h3 { margin: 4px 0 2px; color: #0f172a; font-size: 14.3px; font-weight: 950; line-height: 1.28; word-break: break-word; }
.hem-report p { margin: 0; color: #64748b; font-size: 11.5px; font-weight: 730; line-height: 1.4; word-break: break-word; }
.hem-report-score {
  min-width: 74px; border: 1px solid #e2e8f0; border-radius: 8px; padding: 7px 8px; background: #f8fafc; text-align: center;
}
.hem-report-score strong { display: block; margin-top: 4px; color: #0f172a; font-size: 19px; font-weight: 980; line-height: 1; }
.hem-report-score em { color: #64748b; font-size: 10.5px; font-style: normal; font-weight: 760; }
.hem-report-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.hem-report-tags span {
  display: inline-flex; align-items: center; gap: 4px; border: 1px solid #dbe4f0; border-radius: 999px; padding: 4px 7px;
  background: #f8fafc; color: #334155; font-size: 10.6px; font-weight: 850;
}
.hem-report-verdict { border-left: 3px solid #14b8a6; padding-left: 8px; }
.hem-pill {
  display: inline-flex; align-items: center; justify-content: center; border: 1px solid #dbe4f0; border-radius: 999px; padding: 4px 8px;
  font-size: 10.8px; font-weight: 950; line-height: 1.1; white-space: nowrap;
}
.hem-pill--high { color: #991b1b; background: #fee2e2; border-color: #fecaca; }
.hem-pill--medium { color: #9a3412; background: #ffedd5; border-color: #fed7aa; }
.hem-pill--low { color: #166534; background: #dcfce7; border-color: #bbf7d0; }
.hem-detail { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.hem-detail--empty { min-height: 320px; align-items: center; justify-content: center; text-align: center; color: #64748b; }
.hem-detail--empty strong { color: #0f172a; font-size: 18px; font-weight: 950; }
.hem-detail--empty p { max-width: 430px; margin: 0; font-size: 12.5px; font-weight: 740; line-height: 1.5; }
.hem-detail-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: flex-start; border-bottom: 1px solid #e2e8f0; padding-bottom: 10px; }
.hem-detail-head span { display: inline-flex; align-items: center; gap: 6px; color: #0f766e; font-size: 11.5px; font-weight: 950; }
.hem-detail-head h2 { margin: 5px 0 3px; color: #0f172a; font-size: 20px; font-weight: 980; line-height: 1.2; word-break: break-word; overflow-wrap: anywhere; }
.hem-detail-head p { margin: 0; color: #64748b; font-size: 12px; font-weight: 760; }
.hem-confidence {
  min-width: 92px; border: 1px solid #ccfbf1; border-radius: 8px; padding: 8px 10px; background: #f0fdfa; text-align: center;
}
.hem-confidence strong { display: block; color: #0f766e; font-size: 20px; font-weight: 980; line-height: 1; }
.hem-confidence span { color: #475569; font-size: 10.8px; font-weight: 820; }
/* AI-MARK[QAI-UI:email-sync-upgrade] 2026-07-22 09:31 (GMT+7) — thẻ HĐ nhận diện đầu detail + bất biến 1 CỘT DỌC: mọi
   con trực tiếp của .hem-detail full ngang, chữ cảnh báo wrap đủ (overflow-wrap anywhere), không split 2 cột. Tái dùng
   token/hex sẵn có (không thêm màu mới), không đụng z-index. | rel: QAI-LEGAL:email-noise-filter */
.hem-detail > *, .hes-section { width: 100%; max-width: 100%; min-width: 0; }
.hes-contract-card { background: #f8fffd; border: 1px solid #ccfbf1; border-radius: 8px; padding: 10px 12px; }
.hes-contract-id { min-width: 0; flex: 1 1 280px; }
.hes-contract-facts { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; }
.hes-contract-facts span { display: inline-flex; align-items: baseline; gap: 5px; color: #334155; font-size: 12px; font-weight: 780; overflow-wrap: anywhere; word-break: break-word; }
.hes-contract-facts span b { color: #0f766e; font-size: 10.2px; font-weight: 950; text-transform: uppercase; letter-spacing: .02em; }
.hes-contract-aside { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; }
.hes-contract-links { display: flex; flex-wrap: wrap; gap: 6px; }
.hem-detail p, .hem-detail small, .hem-detail h2,
.hem-fact p, .hem-source p, .hem-source strong, .hem-source small,
.hes-ai-round > p, .hes-ai-round > small, .hes-diff-before > p, .hes-diff-after > p,
.hem-conflict > p, .hem-conflict-head strong, .hes-diff-item-head strong {
  overflow-wrap: anywhere; word-break: break-word; white-space: normal;
}
.hem-source-policy {
  display: flex; gap: 8px; align-items: flex-start; border: 1px solid #bbf7d0; border-radius: 8px; padding: 8px 10px;
  background: #f0fdf4; color: #166534; font-size: 12px; font-weight: 790; line-height: 1.42;
}
.hem-source-policy i { flex: 0 0 auto; margin-top: 1px; }
.hem-lanes { display: flex; flex-direction: column; gap: 8px; }
.hem-lane {
  border: 1px solid #e2e8f0; border-radius: 8px; padding: 9px; background: #f8fafc; min-width: 0; display: flex; flex-direction: column; gap: 7px;
}
.hem-lane h3, .hem-conflict-board-head span {
  margin: 0; display: flex; align-items: center; gap: 6px; color: #0f172a; font-size: 12.5px; font-weight: 950;
}
.hem-lane--agreed h3 i { color: #15803d; }
.hem-lane--pending h3 i { color: #ca8a04; }
.hem-lane--risk h3 i { color: #c2410c; }
.hem-fact {
  border: 1px solid #e2e8f0; border-radius: 8px; padding: 7px 8px; background: #fff; min-width: 0;
}
.hem-fact span { display: block; color: #0f766e; font-size: 10.5px; font-weight: 950; text-transform: uppercase; }
.hem-fact p { margin: 3px 0 0; color: #334155; font-size: 11.8px; font-weight: 760; line-height: 1.42; word-break: break-word; }
.hem-fact small { display: block; margin-top: 4px; color: #64748b; font-size: 10.6px; font-weight: 710; word-break: break-word; }
.hem-lane-empty {
  border: 1px dashed #cbd5e1; border-radius: 8px; padding: 10px; background: #fff; color: #64748b; font-size: 12px; font-weight: 760; line-height: 1.42;
}
.hem-conflict-board {
  border: 1px solid #e2e8f0; border-radius: 8px; padding: 10px; background: #fff; display: flex; flex-direction: column; gap: 8px;
}
.hem-conflict-board-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hem-conflict-board-head strong { color: #0f172a; font-size: 13px; font-weight: 950; }
.hem-conflict {
  border: 1px solid #e2e8f0; border-radius: 8px; padding: 10px; background: #f8fafc; display: flex; flex-direction: column; gap: 8px; min-width: 0;
}
.hem-conflict--high { border-color: #fecaca; background: #fff7f7; }
.hem-conflict--medium { border-color: #fed7aa; background: #fffaf3; }
.hem-conflict-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hem-conflict-head strong { color: #0f172a; font-size: 13px; font-weight: 950; line-height: 1.3; word-break: break-word; }
.hem-conflict > p { margin: 0; color: #334155; font-size: 12.2px; font-weight: 780; line-height: 1.45; word-break: break-word; }
.hem-evidence-grid { display: flex; flex-direction: column; gap: 8px; }
.hem-source {
  border: 1px solid #dbe4f0; border-radius: 8px; padding: 8px 9px; background: #fff; min-width: 0;
}
.hem-source span { display: flex; align-items: center; gap: 5px; color: #64748b; font-size: 10.5px; font-weight: 950; text-transform: uppercase; }
.hem-source strong { display: block; margin-top: 4px; color: #0f172a; font-size: 12.1px; font-weight: 900; line-height: 1.32; word-break: break-word; }
.hem-source p, .hem-source .helen-legal-text { margin-top: 5px; color: #334155; font-size: 11.7px; font-weight: 740; line-height: 1.45; word-break: break-word; }
.hem-source small { display: block; margin-top: 5px; color: #64748b; font-size: 10.6px; font-weight: 720; word-break: break-word; }
.hem-source--email { border-left: 3px solid #0f766e; }
.hem-source--contract { border-left: 3px solid #2563eb; }
.hem-next {
  display: flex; align-items: flex-start; gap: 6px; border: 1px solid #bfdbfe; border-radius: 8px; padding: 7px 8px;
  background: #eff6ff; color: #1e40af; font-size: 11.5px; font-weight: 800; line-height: 1.4;
}
.hem-next i { flex: 0 0 auto; margin-top: 1px; }

/* AI-MARK[QAI-UI:email-sync-upgrade] 2026-07-22 08:21 (GMT+7) — style nâng cấp tab Email đàm phán (.hes-*): toolbar
   trạng thái/link HĐ, timeline số hạng theo vòng (cuộn ngang, ô đổi giá trị tô cam), diff dự thảo, khối Helen phân tích
   AI, viewer luồng mail (tái dùng khung hnc-modal) và section mail chưa gắn HĐ. Palette tái dùng đúng hex đã có trong
   file — không thêm màu mới, không đổi z-index hệ thống; thêm pill impact + dòng rủi ro trong .hes-ai-round
   (summary_llm object từ worker). | rel: QAI-LEGAL:email-sync-core-upgrade, helen.js hesAiHtml */
.hes-block-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.hes-block-head > span { display: inline-flex; align-items: center; gap: 6px; color: #0f172a; font-size: 12.5px; font-weight: 950; }
.hes-block-head > span i { color: #0f766e; }
.hes-block-head > strong { color: #64748b; font-size: 11px; font-weight: 760; line-height: 1.35; text-align: right; max-width: 460px; white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
.hes-ai-badge {
  display: inline-flex; align-items: center; margin-left: 6px; border: 1px solid #bfdbfe; border-radius: 999px; padding: 1px 6px;
  background: #eff6ff; color: #1d4ed8; font-size: 9.5px; font-weight: 950; font-style: normal; letter-spacing: .04em; white-space: nowrap;
}
.hes-conf { margin-left: 6px; color: #1d4ed8; font-size: 10px; font-weight: 950; white-space: nowrap; }
.hes-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.hes-toolbar-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.hes-toolbar-label { color: #64748b; font-size: 10.5px; font-weight: 950; text-transform: uppercase; white-space: nowrap; }
.hes-status-btn {
  border: 1px solid #dbe4f0; border-radius: 999px; padding: 5px 10px; background: #fff; color: #334155;
  font-size: 11px; font-weight: 850; white-space: nowrap; cursor: pointer;
}
.hes-status-btn:hover:not(:disabled) { border-color: #99f6e4; color: #0f766e; background: #f0fdfa; }
.hes-status-btn.is-active { border-color: #0f766e; background: #0f766e; color: #fff; }
.hes-status-btn:disabled { opacity: .62; cursor: wait; }
.hes-ai-level {
  display: inline-flex; align-items: center; border: 1px solid #dbe4f0; border-radius: 999px; padding: 4px 8px;
  background: #f8fafc; color: #64748b; font-size: 10.6px; font-weight: 900; white-space: nowrap;
}
.hes-ai-level.is-ai { border-color: #bfdbfe; background: #eff6ff; color: #1d4ed8; }
.hes-timeline, .hes-diff, .hes-ai {
  border: 1px solid #e2e8f0; border-radius: 8px; padding: 10px; background: #fff; display: flex; flex-direction: column; gap: 8px; min-width: 0;
}
.hes-timeline-scroll { overflow-x: auto; min-width: 0; }
.hes-timeline-table { border-collapse: collapse; width: max-content; min-width: 100%; }
.hes-timeline-table th, .hes-timeline-table td {
  border: 1px solid #e2e8f0; padding: 6px 8px; text-align: center; font-size: 11.4px; color: #334155; background: #fff; white-space: nowrap;
}
.hes-timeline-table thead th { background: #f8fafc; }
.hes-round-no { display: block; color: #0f766e; font-size: 11px; font-weight: 950; }
.hes-round-date { display: block; color: #64748b; font-size: 10.2px; font-weight: 760; }
.hes-round-attach { display: inline-flex; margin-top: 2px; color: #9a3412; }
.hes-term-col { text-align: left !important; background: #f8fafc !important; max-width: 200px; }
.hes-term-label {
  display: block; max-width: 184px; color: #0f172a; font-weight: 900;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hes-cell { font-weight: 800; }
.hes-cell--empty { color: #cbd5e1; font-weight: 700; }
.hes-cell.is-changed { border-color: #fed7aa; background: #ffedd5; color: #9a3412; font-weight: 950; }
.hes-diff-round { border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 9px; background: #f8fafc; display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.hes-diff-round > header { color: #0f172a; font-size: 12px; font-weight: 800; }
.hes-diff-round > header b { color: #9a3412; font-weight: 950; }
.hes-diff-item { border: 1px solid #e2e8f0; border-radius: 8px; padding: 7px 8px; background: #fff; min-width: 0; cursor: pointer; }
.hes-diff-item:hover { border-color: #fed7aa; }
.hes-diff-item-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.hes-diff-item-head strong { color: #0f172a; font-size: 12px; font-weight: 950; line-height: 1.3; word-break: break-word; }
.hes-diff-cols { display: flex; flex-direction: column; gap: 6px; margin-top: 5px; }
.hes-diff-before, .hes-diff-after { border: 1px solid #e2e8f0; border-radius: 8px; padding: 6px 7px; background: #f8fafc; min-width: 0; }
.hes-diff-before > span, .hes-diff-after > span { display: block; color: #64748b; font-size: 10px; font-weight: 950; text-transform: uppercase; }
.hes-diff-before > p, .hes-diff-after > p { margin: 3px 0 0; color: #334155; font-size: 11.4px; font-weight: 740; line-height: 1.42; word-break: break-word; white-space: normal; }
.hes-diff-before { border-left: 3px solid #cbd5e1; }
.hes-diff-after { border-left: 3px solid #fb923c; background: #fffaf3; }
.hes-diff-item > small { display: block; margin-top: 5px; color: #64748b; font-size: 10.6px; font-weight: 720; line-height: 1.38; }
.hes-diff-addrem { display: flex; gap: 6px; align-items: baseline; border: 1px dashed #cbd5e1; border-radius: 8px; padding: 6px 8px; background: #fff; min-width: 0; }
.hes-diff-addrem > span { color: #64748b; font-size: 10px; font-weight: 950; text-transform: uppercase; white-space: nowrap; }
.hes-diff-addrem > p { margin: 0; color: #334155; font-size: 11.4px; font-weight: 760; line-height: 1.4; word-break: break-word; }
.hes-diff-addrem--added > span { color: #15803d; }
.hes-diff-addrem--removed > span { color: #991b1b; }
.hes-ai { border-left: 3px solid #2563eb; }
.hes-ai-rounds { display: grid; gap: 6px; }
.hes-ai-round { border: 1px solid #e2e8f0; border-radius: 8px; padding: 7px 8px; background: #f8fafc; min-width: 0; }
.hes-ai-round > span { display: block; color: #1d4ed8; font-size: 10.5px; font-weight: 950; text-transform: uppercase; }
.hes-ai-round > span .hem-pill { margin-left: 6px; text-transform: none; vertical-align: middle; }
.hes-ai-round > p { margin: 3px 0 0; color: #334155; font-size: 11.8px; font-weight: 760; line-height: 1.45; word-break: break-word; }
.hes-ai-round > small { display: block; margin-top: 4px; color: #9a3412; font-size: 10.8px; font-weight: 760; line-height: 1.4; word-break: break-word; }
.hes-ai-note { margin: 0; color: #64748b; font-size: 11px; font-weight: 740; line-height: 1.42; }
.hes-fact--ai { border-color: #bfdbfe; background: #eff6ff; }
.hes-fact--ai > span { color: #1d4ed8; display: flex; align-items: center; }
.hes-unassigned { border: 1px solid #dbe4f0; border-radius: 8px; padding: 10px; background: #fff; display: flex; flex-direction: column; gap: 8px; }
.hes-unassigned-grid { display: flex; flex-direction: column; gap: 8px; }
.hes-unassigned-card { border: 1px solid #e2e8f0; border-radius: 8px; padding: 9px; background: #f8fafc; display: flex; flex-direction: column; gap: 7px; min-width: 0; width: 100%; max-width: 100%; }
.hes-unassigned-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; min-width: 0; }
.hes-unassigned-head strong { color: #0f172a; font-size: 12.6px; font-weight: 950; line-height: 1.3; min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
.hes-unassigned-card > p { margin: 0; color: #64748b; font-size: 11.2px; font-weight: 760; }
.hes-unassigned-view { align-self: flex-start; }
.hes-candidates { display: grid; gap: 6px; }
.hes-candidate { border: 1px solid #e2e8f0; border-radius: 8px; padding: 7px 8px; background: #fff; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.hes-candidate-main { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; min-width: 0; }
.hes-candidate-main strong { color: #0f172a; font-size: 11.8px; font-weight: 900; min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
.hes-candidate small { color: #64748b; font-size: 10.6px; font-weight: 720; line-height: 1.38; word-break: break-word; }
.hes-attach-btn { align-self: flex-start; }
.hes-mail-modal { width: min(1100px, calc(100vw - 112px)); }
.hes-mail-layout { display: grid; grid-template-columns: minmax(250px, .42fr) minmax(0, 1fr); gap: 0; overflow: hidden; flex: 1 1 auto; background: #f8fafc; }
.hes-mail-list { border-right: 1px solid #e2e8f0; padding: 10px; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; max-height: calc(100dvh - 190px); }
.hes-mail-item {
  border: 1px solid #e2e8f0; border-radius: 8px; padding: 7px 8px; background: #fff; text-align: left; cursor: pointer;
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.hes-mail-item:hover, .hes-mail-item.is-active { border-color: #14b8a6; background: #f8fffd; }
.hes-mail-item-round { color: #0f766e; font-size: 10.4px; font-weight: 950; text-transform: uppercase; display: inline-flex; align-items: center; gap: 4px; }
.hes-mail-item strong { color: #0f172a; font-size: 11.8px; font-weight: 900; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hes-mail-item small { color: #64748b; font-size: 10.4px; font-weight: 720; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hes-mail-read { padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; max-height: calc(100dvh - 190px); min-width: 0; }
.hes-mail-read-head { display: flex; flex-direction: column; gap: 3px; border-bottom: 1px solid #e2e8f0; padding-bottom: 7px; }
.hes-mail-read-head strong { color: #0f172a; font-size: 13.6px; font-weight: 950; line-height: 1.3; word-break: break-word; }
.hes-mail-read-head small { color: #64748b; font-size: 11px; font-weight: 740; line-height: 1.4; word-break: break-word; }
.hes-mail-body {
  border: 1px solid #e2e8f0; border-radius: 8px; padding: 9px 10px; background: #fff; color: #334155;
  font-size: 12px; font-weight: 680; line-height: 1.52; white-space: pre-wrap; word-break: break-word;
}
.hes-mail-attachments { border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 9px; background: #fff; }
.hes-mail-attachments > span { display: block; color: #0f766e; font-size: 10.6px; font-weight: 950; text-transform: uppercase; }
.hes-mail-attachments ul { list-style: none; margin: 5px 0 0; padding: 0; display: grid; gap: 4px; }
.hes-mail-attachments li { display: flex; align-items: center; gap: 6px; min-width: 0; color: #334155; font-size: 11.2px; }
.hes-mail-attachments li i { color: #9a3412; flex: 0 0 auto; }
.hes-mail-attachments li b { font-weight: 900; color: #0f172a; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hes-mail-attachments li small { color: #64748b; font-size: 10.4px; font-weight: 720; white-space: nowrap; }

/* AI-MARK[QAI-UI:email-sync-upgrade] 2026-07-22 10:41 (GMT+7) — RENDER CÓ CẤU TRÚC lane item + khối các bên:
   rich-text markdown-lite (.hes-rt-p/.hes-rt-list/strong), thẻ item .hes-fact-card (tiêu đề point, badge nhóm/clause/AI,
   detail, 2 dòng đối chiếu email↔HĐ) và section .hes-contract-info + bảng .hes-parties (cuộn ngang khi dài, chữ wrap).
   Tái dùng hex sẵn có trong file (teal/slate/blue/amber) — KHÔNG thêm màu mới, KHÔNG đụng z-index. | rel: QAI-LEGAL:email-llm-extract */
.hes-rt { min-width: 0; }
.hes-rt-p { margin: 0 0 5px; color: #334155; font-size: 11.8px; font-weight: 760; line-height: 1.5; overflow-wrap: anywhere; word-break: break-word; white-space: normal; }
.hes-rt-p:last-child { margin-bottom: 0; }
.hes-rt strong { color: #0f172a; font-weight: 950; }
.hes-rt-list { margin: 3px 0 5px; padding-left: 16px; list-style: disc; display: grid; gap: 3px; }
.hes-rt-list:last-child { margin-bottom: 0; }
.hes-rt-list li { color: #334155; font-size: 11.8px; font-weight: 760; line-height: 1.48; overflow-wrap: anywhere; word-break: break-word; }
.hes-fact-card { border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 9px; background: #fff; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.hes-fact-card--ai { border-color: #bfdbfe; background: #eff6ff; }
.hes-fact-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; min-width: 0; }
.hes-grp-badge { display: inline-flex; align-items: center; border: 1px solid #dbe4f0; border-radius: 999px; padding: 2px 8px; background: #f8fafc; color: #334155; font-size: 9.6px; font-weight: 950; text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; }
.hes-grp--agreed { border-color: #bbf7d0; background: #dcfce7; color: #166534; }
.hes-grp--pending { border-color: #fde68a; background: #fef9c3; color: #92400e; }
.hes-grp--risk { border-color: #fed7aa; background: #ffedd5; color: #9a3412; }
.hes-clause-badge { display: inline-flex; align-items: center; border: 1px solid #bfdbfe; border-radius: 999px; padding: 2px 8px; background: #eff6ff; color: #1d4ed8; font-size: 9.6px; font-weight: 950; white-space: nowrap; }
.hes-fact-point { color: #0f172a; font-size: 12.4px; font-weight: 950; line-height: 1.3; overflow-wrap: anywhere; word-break: break-word; }
.hes-fact-detail { min-width: 0; }
.hes-fact-meta, .hes-fact-src { display: block; color: #64748b; font-size: 10.4px; font-weight: 740; line-height: 1.38; overflow-wrap: anywhere; word-break: break-word; }
.hes-fact-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.hes-fact-cmp { border: 1px solid #e2e8f0; border-radius: 8px; padding: 6px 7px; background: #f8fafc; min-width: 0; }
.hes-fact-cmp > span { display: block; color: #64748b; font-size: 9.8px; font-weight: 950; text-transform: uppercase; }
.hes-fact-cmp > p { margin: 3px 0 0; color: #334155; font-size: 11.4px; font-weight: 780; line-height: 1.42; overflow-wrap: anywhere; word-break: break-word; }
.hes-fact-cmp--email { border-left: 3px solid #0f766e; }
.hes-fact-cmp--contract { border-left: 3px solid #2563eb; }
.hem-conflict-detail { min-width: 0; }
.hem-conflict-detail .hes-rt-p, .hem-conflict-detail .hes-rt-list li { font-size: 12.2px; }
.hes-contract-info { border: 1px solid #e2e8f0; border-radius: 8px; padding: 10px; background: #fff; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hes-info-facts { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.hes-info-facts span { display: inline-flex; align-items: baseline; gap: 5px; color: #334155; font-size: 12px; font-weight: 780; overflow-wrap: anywhere; word-break: break-word; }
.hes-info-facts span b { color: #0f766e; font-size: 10.2px; font-weight: 950; text-transform: uppercase; letter-spacing: .02em; }
.hes-parties-scroll { overflow-x: auto; min-width: 0; border: 1px solid #e2e8f0; border-radius: 8px; }
.hes-parties { border-collapse: collapse; width: 100%; min-width: 640px; }
.hes-parties th, .hes-parties td { border: 1px solid #e2e8f0; padding: 6px 8px; text-align: left; font-size: 11.4px; color: #334155; vertical-align: top; overflow-wrap: anywhere; word-break: break-word; white-space: normal; }
.hes-parties thead th { background: #f8fafc; color: #0f172a; font-weight: 950; white-space: nowrap; }
.hes-parties td:last-child { min-width: 200px; }

/* AI-MARK[QAI-UI:email-sync-upgrade] 2026-07-22 14:28 (GMT+7) — lane item AI-native: badge tác động (.hes-impact-*), khối
   "Helen tóm tắt" / "Trích nguyên văn" (.hes-fact-block/.hes-fact-lbl) + blockquote trích .hes-quote (nghiêng, viền trái,
   pre-wrap) và khối "Helen phân tích tổng quan" .hes-analysis (nền nhẹ + 4 cột bullet). Tái dùng hex sẵn có (teal/slate/blue/
   green/amber/red) — KHÔNG thêm màu lạ, KHÔNG z-index. | rel: QAI-LEGAL:email-llm-extract */
.hes-impact-badge { display: inline-flex; align-items: center; border: 1px solid #dbe4f0; border-radius: 999px; padding: 2px 8px; background: #f8fafc; color: #334155; font-size: 9.6px; font-weight: 950; white-space: nowrap; }
.hes-impact--them { border-color: #fecaca; background: #fee2e2; color: #991b1b; }
.hes-impact--us { border-color: #bbf7d0; background: #dcfce7; color: #166534; }
.hes-impact--neutral { border-color: #e2e8f0; background: #f1f5f9; color: #475569; }
.hes-fact-block { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hes-fact-lbl { display: inline-flex; align-items: center; gap: 4px; color: #64748b; font-size: 9.8px; font-weight: 950; text-transform: uppercase; letter-spacing: .02em; }
.hes-fact-lbl i { color: #0f766e; }
.hes-fact-block--quote .hes-fact-lbl i { color: #1d4ed8; }
/* AI-MARK[QAI-UI:email-vinatti-view] 2026-07-28 10:20 (GMT+7) — khối "Đề xuất cho Vinatti" (hướng sửa có lợi cho mình)
   + đánh dấu DÒNG BÊN MÌNH trong bảng các bên. Dùng lại hệ màu teal thương hiệu, KHÔNG z-index mới. */
.hes-fact-block--rec .hes-fact-lbl i { color: #0f766e; }
.hes-fact-block--rec .hes-fact-detail {
  border-left: 3px solid #14b8a6; border-radius: 0 8px 8px 0; padding: 6px 10px; background: #f0fdfa; color: #115e59;
  font-size: 11.6px; font-weight: 700; line-height: 1.5; overflow-wrap: anywhere;
}
.hes-parties tr.is-vinatti-row > td { background: #f0fdfa; }
.hes-side-tag {
  display: inline-block; margin-left: 6px; border: 1px solid #99f6e4; border-radius: 999px; padding: 1px 7px;
  background: #ccfbf1; color: #115e59; font-size: 9.6px; font-weight: 950; white-space: nowrap;
}
.hes-quote {
  margin: 0; border-left: 3px solid #1d4ed8; border-radius: 0 8px 8px 0; padding: 6px 10px; background: #eff6ff;
  color: #334155; font-size: 11.6px; font-style: italic; font-weight: 640; line-height: 1.5;
  white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word;
}
.hes-analysis { border: 1px solid #bfdbfe; border-left: 3px solid #2563eb; border-radius: 8px; padding: 10px; background: #eff6ff; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hes-analysis-overview { min-width: 0; }
.hes-analysis-overview .hes-rt-p, .hes-analysis-overview .hes-rt-list li { color: #1e293b; font-size: 12px; }
.hes-analysis-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.hes-analysis-col { border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 9px; background: #fff; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.hes-analysis-col > span { display: inline-flex; align-items: center; gap: 5px; color: #0f172a; font-size: 11px; font-weight: 950; text-transform: uppercase; letter-spacing: .02em; }
.hes-analysis-col ul { list-style: disc; margin: 0; padding-left: 16px; display: grid; gap: 3px; }
.hes-analysis-col li { color: #334155; font-size: 11.6px; font-weight: 740; line-height: 1.45; overflow-wrap: anywhere; word-break: break-word; }
.hes-analysis-col--agreed > span i { color: #15803d; }
.hes-analysis-col--pending > span i { color: #ca8a04; }
.hes-analysis-col--risk > span i { color: #c2410c; }
.hes-analysis-col--action > span i { color: #2563eb; }

/* AI-MARK[QAI-UI:email-negotiations] 2026-07-29 16:55 (GMT+7) — QUẢN LÝ CUỘC ĐÀM PHÁN theo HĐ: chuyển chế độ (.hes-mode-switch),
   danh sách cuộc (.hes-nego-list/.hes-nego-card + badge "Có email mới" .hes-nego-new) và màn HỘI THOẠI (.hes-convo) với DÒNG
   THỜI GIAN mail tách theo vòng exchange (.hes-exchange-round) + khối HÀNH VI/BẤT THƯỜNG (.hes-behavior/.hes-anomaly). Tái dùng
   hex sẵn có — KHÔNG màu lạ, KHÔNG z-index. Card cuộn 1 cột full ngang, chữ wrap đủ, không cắt cảnh báo/mail. | rel: QAI-LEGAL:contract-email-negotiations */
.hes-mode-switch { display: inline-flex; gap: 4px; padding: 3px; border: 1px solid #dbe4f0; border-radius: 999px; background: #f8fafc; }
.hes-mode-btn { display: inline-flex; align-items: center; gap: 5px; border: 0; border-radius: 999px; padding: 6px 12px; background: transparent; color: #475569; font-size: 12px; font-weight: 850; cursor: pointer; white-space: nowrap; }
.hes-mode-btn:hover { color: #0f766e; }
.hes-mode-btn.is-active { background: #0f766e; color: #fff; box-shadow: 0 4px 12px rgba(15, 118, 110, .22); }
.hes-nego-list { display: flex; flex-direction: column; gap: 10px; }
.hes-nego-list-head { border-bottom: 1px solid #e2e8f0; padding-bottom: 8px; }
.hes-nego-list-head span { display: block; color: #0f766e; font-size: 11px; font-weight: 950; text-transform: uppercase; }
.hes-nego-list-head strong { display: block; margin-top: 2px; color: #0f172a; font-size: 15px; font-weight: 950; }
.hes-nego-list-head p { margin: 4px 0 0; color: #64748b; font-size: 11.6px; font-weight: 730; line-height: 1.42; }
.hes-nego-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.hes-nego-card { border: 1px solid #e2e8f0; border-radius: 10px; padding: 11px 12px; background: #fff; display: flex; flex-direction: column; gap: 8px; min-width: 0; cursor: pointer; }
.hes-nego-card:hover, .hes-nego-card:focus-visible { border-color: #14b8a6; box-shadow: 0 10px 28px rgba(15, 23, 42, .08); outline: none; }
.hes-nego-card.is-new { border-color: #99f6e4; background: #f8fffd; }
.hes-nego-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; min-width: 0; }
.hes-nego-id { min-width: 0; }
.hes-nego-id h3 { margin: 0; color: #0f172a; font-size: 14.5px; font-weight: 950; line-height: 1.28; overflow-wrap: anywhere; word-break: break-word; }
.hes-nego-id p { margin: 3px 0 0; color: #64748b; font-size: 11.6px; font-weight: 730; line-height: 1.4; overflow-wrap: anywhere; word-break: break-word; }
.hes-nego-new { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; border: 1px solid #fed7aa; border-radius: 999px; padding: 3px 9px; background: #fff7ed; color: #9a3412; font-size: 10px; font-weight: 950; white-space: nowrap; }
.hes-nego-new i { color: #c2410c; }
.hes-nego-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
/* AI-MARK[QAI-UI:email-provisional-negotiation] 2026-07-28 08:12 (GMT+7) — HĐ TẠM dựng từ bản dự thảo trong email (chưa có
   trong kho): pill tím-xanh phân biệt rõ với pill trạng thái đàm phán + khối chú thích kèm nút gắn sang HĐ trong kho.
   Dùng lại hệ màu sẵn có, KHÔNG z-index mới. | rel: QAI-LEGAL:email-new-contract-autoattach */
.hes-pill--provisional { display: inline-flex; align-items: center; gap: 4px; border: 1px solid #c7d2fe; background: #eef2ff; color: #3730a3; }
.hes-pill--provisional i { color: #4f46e5; }
.hes-provisional-note { border-color: #c7d2fe; background: #eef2ff; color: #312e81; align-items: flex-start; }
.hes-provisional-note i { color: #4f46e5; }
.hes-provisional-note b { display: block; font-size: 12.6px; font-weight: 950; }
.hes-provisional-note span { display: block; margin-top: 3px; font-size: 11.6px; font-weight: 720; line-height: 1.45; overflow-wrap: anywhere; }
.hes-provisional-cands { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.hes-provisional-cands-head { width: 100%; color: #4338ca; font-size: 11px; font-weight: 900; }
.hes-provisional-cand { font-size: 11px; }
.hes-contract-provisional-hint { display: inline-flex; align-items: flex-start; gap: 5px; max-width: 260px; color: #4338ca; font-size: 10.8px; font-weight: 780; line-height: 1.4; }
.hes-contract-provisional-hint i { flex: 0 0 auto; margin-top: 1px; color: #6366f1; }
.hes-nego-meta { color: #475569; font-size: 11px; font-weight: 800; }
.hes-nego-risks { display: flex; flex-wrap: wrap; gap: 5px; }
.hes-nego-risk { display: inline-flex; align-items: center; gap: 4px; border: 1px solid #e2e8f0; border-radius: 999px; padding: 2px 8px; background: #f8fafc; color: #475569; font-size: 10.4px; font-weight: 850; white-space: nowrap; }
.hes-nego-risk i { color: #64748b; }
.hes-nego-risk--bad { border-color: #fecaca; background: #fee2e2; color: #991b1b; }
.hes-nego-risk--bad i { color: #c2410c; }
.hes-nego-risk--ok { border-color: #bbf7d0; background: #dcfce7; color: #166534; }
.hes-nego-risk--ok i { color: #15803d; }
.hes-nego-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px; border-top: 1px solid #e2e8f0; padding-top: 7px; }
.hes-nego-latest { display: inline-flex; align-items: center; gap: 5px; color: #64748b; font-size: 10.8px; font-weight: 760; min-width: 0; overflow-wrap: anywhere; }
.hes-nego-latest i { color: #0f766e; flex: 0 0 auto; }
.hes-nego-open { display: inline-flex; align-items: center; gap: 5px; color: #0f766e; font-size: 11px; font-weight: 950; white-space: nowrap; }
.hes-convo { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.hes-convo-back { align-self: flex-start; }
.hes-convo-timeline { border: 1px solid #e2e8f0; border-radius: 8px; padding: 10px; background: #fff; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.hes-convo-thread { display: flex; flex-direction: column; gap: 10px; }
.hes-behavior { border: 1px solid #dbe4f0; border-radius: 8px; padding: 10px; background: #fff; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.hes-behavior-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; min-width: 0; }
.hes-behavior-metric { border: 1px solid #e2e8f0; border-radius: 8px; padding: 9px; background: #f8fafc; min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 7px; row-gap: 3px; align-items: start; }
.hes-behavior-metric i { color: #0f766e; grid-row: span 2; margin-top: 1px; flex: 0 0 auto; }
.hes-behavior-metric span { color: #64748b; font-size: 10.4px; font-weight: 950; text-transform: uppercase; line-height: 1.25; overflow-wrap: anywhere; word-break: break-word; }
.hes-behavior-metric strong { color: #0f172a; font-size: 12px; font-weight: 920; line-height: 1.35; overflow-wrap: anywhere; word-break: break-word; }
.hes-behavior-metric--high { border-color: #fecaca; background: #fff7f7; }
.hes-behavior-metric--high i { color: #dc2626; }
.hes-behavior-metric--medium { border-color: #fed7aa; background: #fff7ed; }
.hes-behavior-metric--medium i { color: #c2410c; }
.hes-behavior-next { display: flex; align-items: flex-start; gap: 7px; border: 1px solid #ccfbf1; border-radius: 8px; padding: 8px 9px; background: #f0fdfa; color: #115e59; font-size: 11.8px; font-weight: 850; line-height: 1.45; min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
.hes-behavior-next i { color: #0f766e; flex: 0 0 auto; margin-top: 1px; }
.hes-coverage { border: 1px solid #dbe4f0; border-radius: 8px; padding: 9px; background: #f8fafc; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hes-coverage-head { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 8px; min-width: 0; }
.hes-coverage-head i { color: #2563eb; margin-top: 2px; flex: 0 0 auto; }
.hes-coverage-head strong { display: block; color: #0f172a; font-size: 12.4px; font-weight: 950; line-height: 1.3; overflow-wrap: anywhere; word-break: break-word; }
.hes-coverage-head span { display: block; margin-top: 2px; color: #64748b; font-size: 11px; font-weight: 780; line-height: 1.4; overflow-wrap: anywhere; word-break: break-word; }
.hes-coverage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 8px; min-width: 0; }
.hes-coverage-card { border: 1px solid #e2e8f0; border-left-width: 3px; border-radius: 8px; padding: 8px 9px; background: #fff; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.hes-coverage-card.is-core { border-left-color: #2563eb; background: #f8fbff; }
.hes-coverage-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hes-coverage-title strong { color: #0f172a; font-size: 12.2px; font-weight: 950; line-height: 1.32; overflow-wrap: anywhere; word-break: break-word; }
.hes-coverage-title span { color: #64748b; font-size: 10.6px; font-weight: 820; line-height: 1.35; overflow-wrap: anywhere; word-break: break-word; }
.hes-coverage-terms, .hes-exchange-topics, .hes-msg-topics { display: flex; flex-wrap: wrap; gap: 5px; min-width: 0; }
.hes-coverage-terms span, .hes-exchange-topics span, .hes-msg-topics span { border: 1px solid #dbeafe; border-radius: 999px; padding: 3px 8px; background: #eff6ff; color: #1d4ed8; font-size: 10.4px; font-weight: 900; line-height: 1.3; overflow-wrap: anywhere; word-break: break-word; white-space: normal; }
.hes-coverage-rounds { display: inline-flex; align-items: flex-start; gap: 4px; color: #475569; font-size: 10.6px; font-weight: 820; line-height: 1.35; overflow-wrap: anywhere; word-break: break-word; }
.hes-coverage-rounds i { color: #0f766e; flex: 0 0 auto; margin-top: 1px; }
.hes-coverage-card p { margin: 0; color: #334155; font-size: 11.4px; font-weight: 720; line-height: 1.45; overflow-wrap: anywhere; word-break: break-word; }
.hes-anomaly-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px; min-width: 0; }
.hes-anomaly { border: 1px solid #e2e8f0; border-left-width: 3px; border-radius: 8px; padding: 8px 9px; background: #f8fafc; min-width: 0; }
.hes-anomaly span { display: block; color: #64748b; font-size: 10px; font-weight: 950; text-transform: uppercase; line-height: 1.25; overflow-wrap: anywhere; word-break: break-word; }
.hes-anomaly strong { display: block; margin-top: 3px; color: #0f172a; font-size: 12.2px; font-weight: 950; line-height: 1.32; overflow-wrap: anywhere; word-break: break-word; }
.hes-anomaly p { margin: 4px 0 0; color: #475569; font-size: 11.5px; font-weight: 720; line-height: 1.45; overflow-wrap: anywhere; word-break: break-word; }
.hes-anomaly--high { border-color: #fecaca; border-left-color: #dc2626; background: #fff7f7; }
.hes-anomaly--high span { color: #991b1b; }
.hes-anomaly--medium { border-color: #fed7aa; border-left-color: #c2410c; background: #fff7ed; }
.hes-anomaly--medium span { color: #9a3412; }
.hes-anomaly--low { border-left-color: #64748b; }
.hes-exchange-list { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.hes-exchange-round { border: 1px solid #dbe4f0; border-radius: 8px; background: #f8fafc; padding: 9px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hes-exchange-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 9px; min-width: 0; }
.hes-exchange-no { display: inline-flex; align-items: center; justify-content: center; min-height: 30px; border: 1px solid #ccfbf1; border-radius: 999px; padding: 5px 10px; background: #f0fdfa; color: #0f766e; font-size: 11px; font-weight: 950; white-space: nowrap; }
.hes-exchange-title { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.hes-exchange-title strong { color: #0f172a; font-size: 13px; font-weight: 950; line-height: 1.3; overflow-wrap: anywhere; word-break: break-word; }
.hes-exchange-title p { margin: 0; color: #64748b; font-size: 10.8px; font-weight: 760; line-height: 1.35; overflow-wrap: anywhere; word-break: break-word; }
.hes-exchange-stats { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; min-width: 0; }
.hes-exchange-stats span { display: inline-flex; align-items: center; gap: 4px; border: 1px solid #e2e8f0; border-radius: 999px; padding: 3px 8px; background: #fff; color: #475569; font-size: 10.6px; font-weight: 850; white-space: nowrap; }
.hes-exchange-stats i { color: #0f766e; flex: 0 0 auto; }
.hes-exchange-context { display: flex; flex-wrap: wrap; gap: 5px; min-width: 0; }
.hes-exchange-context span { display: inline-flex; align-items: flex-start; gap: 4px; border: 1px solid #e2e8f0; border-radius: 8px; padding: 4px 7px; background: #fff; color: #475569; font-size: 10.6px; font-weight: 820; line-height: 1.35; min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
.hes-exchange-context i { color: #0f766e; flex: 0 0 auto; margin-top: 1px; }
.hes-exchange-alerts { display: flex; flex-wrap: wrap; gap: 5px; min-width: 0; }
.hes-exchange-alert { border: 1px solid #e2e8f0; border-radius: 999px; padding: 3px 8px; background: #fff; color: #475569; font-size: 10.4px; font-weight: 900; line-height: 1.3; overflow-wrap: anywhere; word-break: break-word; }
.hes-exchange-alert--high { border-color: #fecaca; background: #fee2e2; color: #991b1b; }
.hes-exchange-alert--medium { border-color: #fed7aa; background: #fff7ed; color: #9a3412; }
.hes-exchange-alert--low { border-color: #cbd5e1; background: #f8fafc; color: #475569; }
.hes-exchange-subjects { display: flex; flex-wrap: wrap; gap: 5px; min-width: 0; }
.hes-exchange-subjects span { border: 1px solid #e2e8f0; border-radius: 999px; padding: 3px 8px; background: #fff; color: #334155; font-size: 10.6px; font-weight: 820; line-height: 1.35; overflow-wrap: anywhere; word-break: break-word; }
.hes-exchange-mails { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hes-msg { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; min-width: 0; }
.hes-msg-avatar { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 999px; background: #0f766e; color: #fff; font-size: 12px; font-weight: 950; flex: 0 0 auto; }
.hes-msg-main { border: 1px solid #e2e8f0; border-radius: 10px; padding: 9px 11px; background: #f8fafc; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.hes-msg-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; min-width: 0; }
.hes-msg-from { color: #0f172a; font-size: 12.6px; font-weight: 950; line-height: 1.3; overflow-wrap: anywhere; word-break: break-word; }
.hes-msg-round { border: 1px solid #ccfbf1; border-radius: 999px; padding: 1px 7px; background: #f0fdfa; color: #0f766e; font-size: 9.6px; font-weight: 950; text-transform: uppercase; white-space: nowrap; }
.hes-msg-date { color: #64748b; font-size: 10.8px; font-weight: 760; margin-left: auto; white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
.hes-msg-to { color: #64748b; font-size: 10.8px; font-weight: 720; overflow-wrap: anywhere; word-break: break-word; }
.hes-msg-subject { color: #0f172a; font-size: 12px; font-weight: 900; line-height: 1.35; overflow-wrap: anywhere; word-break: break-word; }
.hes-msg-topics { margin-top: 1px; }
.hes-msg-text { border-top: 1px solid #e2e8f0; padding-top: 5px; min-width: 0; }
.hes-msg-text .hes-rt-p, .hes-msg-text .hes-rt-list li { font-size: 12px; }
.hes-msg-attachments { border: 1px dashed #cbd5e1; border-radius: 8px; padding: 7px 8px; background: #fff; }
.hes-msg-attachments > span { display: block; color: #0f766e; font-size: 10.4px; font-weight: 950; text-transform: uppercase; }
.hes-msg-attachments ul { list-style: none; margin: 5px 0 0; padding: 0; display: grid; gap: 4px; }
.hes-msg-attachments li { display: flex; align-items: center; gap: 6px; min-width: 0; color: #334155; font-size: 11.2px; flex-wrap: wrap; }
.hes-msg-attachments li i { color: #9a3412; flex: 0 0 auto; }
.hes-msg-attachments li b { font-weight: 900; color: #0f172a; overflow-wrap: anywhere; word-break: break-word; }
.hes-msg-attachments li small { color: #64748b; font-size: 10.4px; font-weight: 720; }

@media (max-width: 720px) {
  .hnc-workspace { padding: 12px; }
  .hnc-command { grid-template-columns: 1fr; padding: 12px; }
  .hnc-hero h1 { font-size: 24px; }
  .hnc-search { flex-direction: column; }
  .hnc-filter-grid, .hnc-dimension-grid, .hnc-coverage-grid, .hnc-lane-grid, .hnc-section-guide, .hnc-section-checks { grid-template-columns: 1fr; }
  .hnc-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hnc-alert { grid-template-columns: 1fr; }
  .hnc-alert-evidence { grid-template-columns: 1fr; }
  .hnc-board-head { flex-direction: column; }
  .hnc-modal-backdrop { align-items: flex-start; padding: 12px; overflow-y: auto; }
  .hnc-modal { width: 100%; max-height: none; }
  .hnc-modal-head { padding: 14px; }
  .hnc-modal-strip { padding: 10px 14px; }
  .hnc-modal-body { padding: 12px 14px 14px; overflow: visible; }
  .hnc-modal-grid { grid-template-columns: 1fr; }
  .hnc-modal-lower { grid-template-columns: 1fr; }
  .hnc-modal-classification { grid-template-columns: 1fr; }
  .hnc-modal-actions { flex-direction: column; padding: 12px 14px; }
  .hnc-modal-actions .hnc-btn { width: 100%; }
  /* AI-MARK[QAI-UI:helen-legal-status-report] 2026-08-06 08:13 (GMT+7) — bản hẹp: khối tư vấn và bảng danh mục
     về 1 cột; hàng hồ sơ bỏ cột số để tên/đối tác không bị bóp cụt. | rel: QAI-LEGAL:legal-status-report */
  .hnc-advisory-grid { grid-template-columns: 1fr; }
  .hlsr-workspace { padding: 12px; }
  .hlsr-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hlsr-row-head { grid-template-columns: auto minmax(0, 1fr) auto; row-gap: 6px; }
  .hlsr-row-num { display: none; }
  .hlsr-issue { grid-template-columns: auto minmax(0, 1fr); row-gap: 4px; }
  .hlsr-issue-action { grid-column: 1 / -1; }
  .hlsr-section-head > .hnc-btn { margin-left: 0; }
  .hem-workspace { padding: 12px; }
  .hem-command, .hem-board, .hem-policy, .hem-detail-head, .hem-evidence-grid { grid-template-columns: 1fr; }
  .hem-hero h1 { font-size: 24px; }
  .hem-search { flex-direction: column; }
  .hem-filter-grid, .hem-lanes { grid-template-columns: 1fr; }
  .hem-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hem-list-head, .hem-conflict-board-head { flex-direction: column; align-items: flex-start; }
  .hem-report-head { grid-template-columns: 1fr; }
  .hem-report-score { width: 100%; }
  .hes-toolbar { flex-direction: column; align-items: stretch; }
  .hes-block-head { flex-direction: column; }
  .hes-block-head > strong { text-align: left; }
  .hes-behavior-grid, .hes-anomaly-list, .hes-coverage-grid { grid-template-columns: 1fr; }
  .hes-exchange-head { grid-template-columns: 1fr; }
  .hes-exchange-stats { justify-content: flex-start; }
  .hes-msg { grid-template-columns: 1fr; }
  .hes-msg-avatar { width: 30px; height: 30px; }
  .hes-msg-date { margin-left: 0; }
  .hes-diff-cols { grid-template-columns: 1fr; }
  .hes-fact-compare { grid-template-columns: 1fr; }
  .hes-unassigned-grid { grid-template-columns: 1fr; }
  .hes-mail-layout { grid-template-columns: 1fr; }
  .hes-mail-list { max-height: 220px; border-right: 0; border-bottom: 1px solid #e2e8f0; }
  .hes-mail-read { max-height: none; }
  .hlv-compare-hero { grid-template-columns: 1fr; padding: 12px; }
  .hlv-hero-copy { min-height: 0; padding: 16px; }
  .hlv-hero-copy .hlv-h1 { font-size: 23px; }
  .hlv-srcbar--compare { align-items: stretch; }
  .hlv-src-copy { flex: 0 0 auto; }
  .hlv-mode-switch { grid-template-columns: 1fr; }
  .hlv-pick, .hlv-vf-grid, .hlv-cols, .hlv-cols-head { grid-template-columns: 1fr; }
  .hlv-results { top: auto; position: static; max-height: 220px; margin-top: 6px; box-shadow: none; }
  /* Cột dọc: flex-basis tính theo CHIỀU CAO — phải trả các item về auto, kẻo basis 320px/240px kéo cao ô rỗng. */
  .hlv-srcbar { flex-direction: column; align-items: stretch; }
  .hlv-src-opts, .hlv-srcbar .hlv-input, .hlv-draft-row .hlv-input { flex: 0 0 auto; width: 100%; }
  .hlv-srcbar .hlv-btn { width: 100%; }
  .hlv-draft-row { flex-direction: column; align-items: stretch; }
  .hlv-ver { flex-direction: column; align-items: flex-start; }
  .hlv-loading-main, .hlv-cockpit-head { align-items: flex-start; }
  .hlv-skeleton-grid, .hlv-cockpit-grid, .hlv-cockpit-stats { grid-template-columns: 1fr; }
  .hlv-evidence-meter { width: 100%; }
  .hlv-table { min-width: 720px; }
}

/* AI-MARK[QAI-UI:helen-multilaw-review] 2026-07-30 13:41 (GMT+7) — màn "Rà soát đa-luật" trong Thư viện Luật:
   chạy toàn kho, dải cảnh báo tự nạp dữ liệu, chip văn bản áp dụng theo nguồn, mục tiêu chí gập/mở với
   2 cột Điều luật ↔ điều khoản HĐ; nhãn kết quả nhỏ được wrap để không cắt chữ. Không overlay nên không cần đăng ký z-index tầng mới.
   rel: QAI-LEGAL:multi-law-checklist, QAI-LEGAL:law-article-citation */
.hll-ml-pick { display: grid; gap: 12px; }
.hll-ml-gate {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border: 1px solid #fed7aa; border-radius: 10px; background: #fff7ed; padding: 11px 12px;
}
.hll-ml-gate strong { display: block; color: #9a3412; font-size: 13px; font-weight: 950; }
.hll-ml-gate span { display: block; margin-top: 2px; color: #7c2d12; font-size: 11.5px; font-weight: 720; overflow-wrap: anywhere; }
.hll-ml-search { max-width: 520px; }
.hll-ml-pick-hint { margin: 0; color: #64748b; font-size: 12.5px; font-weight: 700; }
.hll-ml-pick-list { display: grid; gap: 8px; }
.hll-ml-pick-row {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px; width: 100%;
  padding: 11px 14px; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; cursor: pointer; text-align: left;
}
.hll-ml-pick-row:hover { border-color: #fed7aa; background: #fff7ed; }
.hll-ml-pick-row strong { color: #0f172a; font-size: 13.5px; font-weight: 850; overflow-wrap: anywhere; }
.hll-ml-pick-row span { grid-column: 1; color: #64748b; font-size: 11.5px; font-weight: 700; overflow-wrap: anywhere; }
.hll-ml-pick-row svg { grid-row: 1 / 3; color: #94a3b8; }
.hll-ml-bulk-empty {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 1px solid #fed7aa; border-radius: 10px; background: #fff7ed; padding: 14px;
}
.hll-ml-bulk-empty strong { display: block; color: #9a3412; font-size: 14px; font-weight: 950; }
.hll-ml-bulk-empty span { display: block; margin-top: 3px; color: #7c2d12; font-size: 12px; font-weight: 720; overflow-wrap: anywhere; }
.hll-ml-head--bulk { display: flex; flex-direction: column; gap: 3px; }
.hll-ml-search--wide { max-width: 760px; }
.hll-ml-warn--soft { border-color: #bfdbfe; background: #eff6ff; }
.hll-ml-warn--soft svg { color: #2563eb; }
.hll-ml-warn--soft b { color: #1e3a8a; }
.hll-ml-warn--soft span { color: #334155; }
.hll-ml-bulk-list { display: grid; gap: 8px; }
.hll-ml-bulk-row {
  width: 100%; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(330px, .54fr) auto;
  gap: 10px; align-items: center; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; padding: 12px 14px;
  text-align: left; cursor: pointer; font-family: "Be Vietnam Pro", sans-serif; box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.hll-ml-bulk-row:hover { border-color: #fed7aa; background: #fff7ed; }
.hll-ml-bulk-row > div { min-width: 0; display: grid; gap: 3px; }
.hll-ml-bulk-row strong { color: #0f172a; font-size: 13.5px; font-weight: 950; line-height: 1.32; overflow-wrap: anywhere; }
.hll-ml-bulk-row span { color: #64748b; font-size: 11.5px; font-weight: 750; line-height: 1.35; overflow-wrap: anywhere; }
.hll-ml-bulk-row em { color: #c2410c; font-size: 11.2px; font-style: normal; font-weight: 780; line-height: 1.35; overflow-wrap: anywhere; }
.hll-ml-bulk-row dl {
  min-width: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 0;
}
.hll-ml-bulk-row dl div {
  min-width: 0; display: grid; gap: 1px; border: 1px solid #eef2f7; border-radius: 8px; background: #f8fafc; padding: 6px 7px;
}
.hll-ml-bulk-row dt {
  color: #94a3b8; font-size: 9.8px; font-weight: 900; line-height: 1.18; text-transform: uppercase;
  white-space: normal; overflow-wrap: anywhere;
}
.hll-ml-bulk-row dd {
  margin: 0; color: #0f172a; font-size: 13px; font-weight: 950; line-height: 1.2;
  white-space: normal; overflow-wrap: anywhere;
}
.hll-ml-bulk-row > svg { color: #94a3b8; }
.hll-ml-bulk-row.is-error { cursor: default; grid-template-columns: minmax(0, 1fr) auto minmax(160px, .3fr); background: #f8fafc; }
.hll-ml-bulk-row.is-error b { color: #b91c1c; font-size: 12px; font-weight: 950; }
.hll-ml-bulk-row.is-error small { color: #64748b; font-size: 11px; font-weight: 750; overflow-wrap: anywhere; }

.hll-ml-doc { display: grid; gap: 14px; }
.hll-ml-bar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; }
.hll-ml-bar-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.hll-ml-head h2 { margin: 0 0 4px; color: #0f172a; font-size: 19px; font-weight: 950; overflow-wrap: anywhere; }
.hll-ml-head p { margin: 0; color: #475569; font-size: 12.5px; font-weight: 750; }
.hll-ml-warn {
  display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 10px;
  padding: 12px 14px; border: 1px solid #fed7aa; border-radius: 12px; background: #fff7ed;
}
.hll-ml-warn svg { color: #ea580c; margin-top: 2px; }
.hll-ml-warn b { display: block; color: #9a3412; font-size: 13px; font-weight: 900; }
.hll-ml-warn span { display: block; margin-top: 3px; color: #7c2d12; font-size: 12px; font-weight: 700; overflow-wrap: anywhere; }
.hll-ml-metrics { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

.hll-ml-laws h3, .hll-ml-section h3 {
  display: flex; align-items: center; gap: 7px; margin: 0 0 9px; color: #0f172a; font-size: 14px; font-weight: 900;
}
.hll-ml-laws h3 b, .hll-ml-section h3 b {
  min-width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; background: #eef2f7; color: #475569; font-size: 11px;
}
.hll-ml-chiprow { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 9px; }
.hll-ml-chip {
  display: grid; gap: 4px; padding: 10px 12px; border: 1px solid #e2e8f0; border-left: 3px solid #cbd5e1;
  border-radius: 10px; background: #fff;
}
.hll-ml-chip--blue { border-left-color: #2563eb; }
.hll-ml-chip--amber { border-left-color: #ea580c; }
.hll-ml-chip--green { border-left-color: #047857; }
.hll-ml-chip.is-nodata { background: #f8fafc; border-style: dashed; }
.hll-ml-chip-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.hll-ml-chip-top strong { color: #0f172a; font-size: 12.5px; font-weight: 900; overflow-wrap: anywhere; }
.hll-ml-chip-top em { flex: none; color: #64748b; font-size: 10.5px; font-weight: 800; font-style: normal; }
.hll-ml-chip > span { color: #475569; font-size: 11.5px; font-weight: 700; overflow-wrap: anywhere; }
.hll-ml-chip-eff, .hll-ml-chip-ev {
  display: flex; align-items: flex-start; gap: 5px; color: #7c2d12; font-size: 10.5px; font-weight: 750; overflow-wrap: anywhere;
}
.hll-ml-chip-ev { color: #64748b; font-style: italic; }
.hll-ml-chip-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; }
.hll-ml-chip-foot span { color: #94a3b8; font-size: 10.5px; font-weight: 750; }
.hll-ml-drop {
  flex: none; padding: 2px 8px; border: 1px solid #e2e8f0; border-radius: 999px; background: #fff;
  color: #64748b; font-size: 10.5px; font-weight: 800; cursor: pointer;
}
.hll-ml-drop:hover { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
.hll-ml-excluded { margin-top: 8px; color: #64748b; font-size: 11.5px; font-weight: 750; }
.hll-ml-link { border: 0; background: none; padding: 0; color: #c2410c; font-size: 11.5px; font-weight: 850; cursor: pointer; text-decoration: underline; }

.hll-ml-items { display: grid; gap: 8px; }
.hll-ml-item { border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; overflow: hidden; }
.hll-ml-item--missing { border-color: #fecaca; }
.hll-ml-item.is-open { border-color: #fed7aa; }
.hll-ml-item-head {
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 4px 10px;
  width: 100%; padding: 10px 13px; border: 0; background: none; cursor: pointer; text-align: left;
}
.hll-ml-item-head:hover { background: #fffbf5; }
.hll-ml-item-title { color: #0f172a; font-size: 13px; font-weight: 850; overflow-wrap: anywhere; }
/* AI-MARK[QAI-UI:helen-multi-law-fulltext] 2026-07-29 16:32 (GMT+7) — bỏ nowrap: mục gộp đa-luật mang
   nhiều mã (NH-08 · DLCN-02 · MC-05) nên 1 dòng cứng sẽ bị trình duyệt cắt bằng "…". Cho xuống dòng. */
.hll-ml-item-meta { color: #94a3b8; font-size: 10.5px; font-weight: 750; white-space: normal; overflow-wrap: anywhere; }
.hll-ml-item-head svg { color: #94a3b8; }
.hll-ml-ok {
  display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 999px;
  background: #ecfdf5; color: #047857; font-size: 10.5px; font-weight: 850; white-space: nowrap;
}
.hll-ml-item-body { padding: 0 13px 13px; border-top: 1px dashed #e2e8f0; }
.hll-ml-parts { margin: 10px 0; display: grid; gap: 6px; }
.hll-ml-part { padding: 7px 10px; border-radius: 8px; background: #f8fafc; color: #334155; font-size: 11.5px; font-weight: 700; }
.hll-ml-part b { color: #0f172a; }
.hll-ml-part small { display: block; margin-top: 2px; color: #94a3b8; font-size: 10.5px; }
.hll-ml-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
.hll-ml-cite { padding: 9px 11px; border: 1px solid #dbeafe; border-radius: 10px; background: #f8fbff; margin-bottom: 7px; }
.hll-ml-cite-head { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.hll-ml-cite-head strong { color: #1e3a8a; font-size: 12px; font-weight: 900; overflow-wrap: anywhere; }
.hll-ml-cite-badge { padding: 1px 7px; border-radius: 999px; font-size: 10px; font-weight: 850; font-style: normal; }
.hll-ml-cite-badge--ok { background: #ecfdf5; color: #047857; }
.hll-ml-cite-badge--warn { background: #fff7ed; color: #c2410c; }
.hll-ml-cite-ref { margin-top: 3px; color: #0f172a; font-size: 11.5px; font-weight: 850; }
.hll-ml-cite-text { margin: 4px 0 6px; color: #334155; font-size: 11.5px; font-weight: 650; line-height: 1.5; overflow-wrap: anywhere; }
.hll-ml-clause { margin-bottom: 8px; }
.hll-ml-clause-law { color: #94a3b8; font-size: 10.5px; font-weight: 800; margin-bottom: 3px; }
.hll-ml-clause-hit { padding: 9px 11px; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; margin-bottom: 6px; }
.hll-ml-clause-hit b { display: block; color: #0f172a; font-size: 11.5px; font-weight: 900; }
.hll-ml-clause-hit p,
.hll-ml-clause-hit > div { margin: 3px 0 0; color: #475569; font-size: 11.5px; font-weight: 650; line-height: 1.5; overflow-wrap: anywhere; }
/* AI-MARK[QAI-UI:helen-multi-law-fulltext] 2026-07-29 16:32 (GMT+7) — băng "còn N ký tự + Xem toàn văn".
   Khi đã bung, khối văn bản cuộn riêng để điều luật dài không đẩy bảng đối chiếu 2 cột lệch nhau. */
.hll-ml-more { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; color: #94a3b8; font-size: 10.8px; font-weight: 780; }
.hll-ml-more--err { color: #b91c1c; }
.hll-ml-more button[disabled] { opacity: .6; cursor: default; text-decoration: none; }
.hll-ml-cite.is-full .hll-ml-cite-text,
.hll-ml-clause-hit.is-full > div { max-height: 420px; overflow-y: auto; padding-right: 6px; }
.hll-ml-cite.is-full { border-color: #fdba74; background: #fffbf5; }
.hll-ml-fold {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 13px;
  border: 1px dashed #cbd5e1; border-radius: 12px; background: #f8fafc; cursor: pointer; text-align: left;
}
.hll-ml-fold:hover { border-color: #fed7aa; background: #fff7ed; }
.hll-ml-fold span { color: #0f172a; font-size: 13px; font-weight: 900; }
.hll-ml-fold small { margin-left: auto; color: #94a3b8; font-size: 11px; font-weight: 750; }
.hll-ml-fold + .hll-ml-items { margin-top: 8px; }
.hll-basis-tomulti { margin-top: 9px; }

@media (max-width: 860px) {
  .hll-ml-bulk-empty { align-items: stretch; flex-direction: column; }
  .hll-ml-bulk-row, .hll-ml-bulk-row.is-error { grid-template-columns: 1fr; }
  .hll-ml-bulk-row dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hll-ml-bulk-row > svg { display: none; }
  .hll-ml-2col { grid-template-columns: 1fr; }
  .hll-ml-item-head { grid-template-columns: auto 1fr auto; }
  .hll-ml-item-meta { grid-column: 2 / 4; white-space: normal; }
  .hll-ml-gate { align-items: stretch; flex-direction: column; }
  .hll-ml-gate .hll-mini, .hll-ml-bar .hll-mini { width: 100%; }
  .hll-ml-bar-actions { width: 100%; }
  .hll-ml-warn { grid-template-columns: auto 1fr; }
  .hll-ml-warn button { grid-column: 2; justify-self: start; }
}

/* AI-MARK[QAI-UI:helen-law-ingest-review] 2026-07-30 19:40 (GMT+7) — Đợt 2: 2 popup mới trong Thư viện Luật
   — NẠP TOÀN VĂN văn bản luật (kéo file → Helen đề xuất số hiệu/ngày → Pháp chế xác nhận) và HÀNG CHỜ DUYỆT
   phiếu văn bản mới phát hiện từ Công báo Chính phủ. Dùng chung #helenModalHost, KHÔNG thêm tab/sub-tab
   (guard helen/law-library). KHÔNG dùng nowrap/line-clamp cho vùng chữ nội dung — guard chống cắt chữ.
   | rel: QAI-LEGAL:law-ingest-file, QAI-LEGAL:law-discovery, QAI-LEGAL:law-review-queue */
.hlq-overlay {
  position: fixed; inset: 0; z-index: 1250; display: flex; align-items: flex-start; justify-content: center; padding: 18px;
  overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  background: rgba(15,23,42,.54); backdrop-filter: blur(6px);
}
.hlq-dialog {
  width: min(1180px, calc(100vw - 28px)); max-height: calc(100dvh - 24px); min-height: 0; margin: 0; flex: 0 0 auto;
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid #dbe4f0; border-radius: 12px; background: #f8fafc; box-shadow: 0 34px 90px rgba(15,23,42,.34);
}
.hlq-head {
  display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: start;
  border-bottom: 1px solid #e2e8f0; background: #fff; padding: 16px 18px;
}
.hlq-head h2 { margin: 0; font-size: 17px; font-weight: 950; color: #0f172a; overflow-wrap: anywhere; }
.hlq-head p { margin: 4px 0 0; font-size: 12.5px; font-weight: 700; color: #64748b; line-height: 1.5; overflow-wrap: anywhere; }
.hlq-close {
  flex: 0 0 auto; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid #e2e8f0; border-radius: 8px; background: #f8fafc; color: #475569; cursor: pointer;
}
.hlq-close:hover { background: #fee2e2; border-color: #fecaca; color: #b91c1c; }
.hlq-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px 18px; display: grid; gap: 12px; }
.hlq-foot {
  border-top: 1px solid #e2e8f0; background: #fff; padding: 12px 18px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end;
}

/* Vùng kéo-thả file */
.hlq-drop {
  display: grid; gap: 6px; justify-items: center; text-align: center;
  border: 2px dashed #cbd5e1; border-radius: 10px; background: #fff; padding: 26px 18px; cursor: pointer;
  color: #475569; font-size: 13px; font-weight: 800;
}
.hlq-drop:hover, .hlq-drop.is-over { border-color: #ff6b2b; background: #fff7ed; color: #c2410c; }
.hlq-drop small { font-size: 11.5px; font-weight: 700; color: #94a3b8; }
.hlq-drop input[type="file"] { display: none; }

/* Bảng metadata Helen đề xuất — người sửa được */
.hlq-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.hlq-field { display: grid; gap: 4px; min-width: 0; }
.hlq-field label { font-size: 11px; font-weight: 900; color: #64748b; text-transform: uppercase; letter-spacing: .03em; }
.hlq-field input, .hlq-field select {
  min-height: 36px; border: 1px solid #dbe4f0; border-radius: 8px; background: #fff; padding: 0 10px;
  font: 800 13px/1.4 "Be Vietnam Pro", sans-serif; color: #0f172a; min-width: 0;
}
.hlq-field input:focus, .hlq-field select:focus { outline: none; border-color: #ff6b2b; box-shadow: 0 0 0 3px rgba(255,107,43,.14); }
.hlq-field.is-missing input { border-color: #f59e0b; background: #fffbeb; }
.hlq-field small { font-size: 11px; font-weight: 700; color: #b45309; line-height: 1.45; overflow-wrap: anywhere; }

/* flex-wrap BẮT BUỘC: câu trong note có <b> ⇒ mỗi mẩu chữ là 1 flex item; không wrap thì ở màn hẹp
   trình duyệt bóp từng mẩu thành cột dọc ("48 21 0") — chữ vẫn đủ nhưng KHÔNG đọc được. */
.hlq-note {
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 7px; border: 1px solid #fde68a; border-radius: 8px; background: #fffbeb;
  color: #78350f; padding: 9px 11px; font-size: 12px; font-weight: 800; line-height: 1.5; overflow-wrap: anywhere;
}
.hlq-note--ok { border-color: #bbf7d0; background: #ecfdf5; color: #065f46; }
.hlq-note--err { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
.hlq-note i { flex: 0 0 auto; margin-top: 2px; }

/* Xem trước các Điều đã tách được */
.hlq-articles { display: grid; gap: 7px; }
.hlq-article {
  border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; padding: 9px 11px; min-width: 0;
}
.hlq-article strong { display: block; font-size: 12.5px; font-weight: 950; color: #0f172a; overflow-wrap: anywhere; }
.hlq-article p { margin: 3px 0 0; font-size: 12px; font-weight: 700; color: #475569; line-height: 1.55; overflow-wrap: anywhere; }

/* Hàng chờ duyệt phiếu văn bản mới */
.hlq-card {
  display: grid; gap: 8px; border: 1px solid #dbe4f0; border-left: 4px solid #94a3b8; border-radius: 9px;
  background: #fff; padding: 12px; min-width: 0;
}
.hlq-card--high { border-left-color: #dc2626; }
.hlq-card--med { border-left-color: #ea580c; }
.hlq-card h3 { margin: 0; font-size: 14.5px; font-weight: 950; color: #0f172a; line-height: 1.4; overflow-wrap: anywhere; }
.hlq-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.hlq-tags span {
  min-height: 23px; display: inline-flex; align-items: center; border: 1px solid #e2e8f0; border-radius: 999px;
  background: #f8fafc; color: #475569; padding: 2px 8px; font-size: 10.8px; font-weight: 850;
}
.hlq-src {
  display: inline-flex; align-items: center; gap: 5px; color: #1d4ed8; font-size: 11.5px; font-weight: 850;
  text-decoration: underline; overflow-wrap: anywhere;
}
.hlq-why { font-size: 12.2px; font-weight: 700; color: #475569; line-height: 1.55; overflow-wrap: anywhere; }
.hlq-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.hlq-empty { text-align: center; color: #64748b; font-size: 13px; font-weight: 800; padding: 26px 12px; }

/* AI-MARK[QAI-UI:helen-law-url-paste] 2026-07-31 08:01 (GMT+7) — ô DÁN LINK + băng cảnh báo nguồn chưa xác minh
   + khối đối chiếu nhanh link ↔ hợp đồng. Nằm TRONG popup nạp văn bản luật đã có (không popup/tab mới).
   Danh sách HĐ tái dùng .hll-ml-pick-list/.hll-ml-pick-row và ô tìm tái dùng .hll-search — không vẽ lại component.
   TUYỆT ĐỐI KHÔNG nowrap/line-clamp cho vùng chữ (guard chống cắt chữ). | rel: QAI-LEGAL:law-url-read */
.hlq-link { display: grid; gap: 7px; border: 1px solid #dbe4f0; border-radius: 10px; background: #fff; padding: 11px 12px; }
.hlq-link-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; color: #64748b; }
.hlq-link-row input {
  min-height: 38px; min-width: 0; border: 1px solid #dbe4f0; border-radius: 8px; background: #f8fafc; padding: 0 10px;
  font: 800 13px/1.4 "Be Vietnam Pro", sans-serif; color: #0f172a;
}
.hlq-link-row input:focus { outline: none; border-color: #ff6b2b; background: #fff; box-shadow: 0 0 0 3px rgba(255,107,43,.14); }
.hlq-link-hint { margin: 0; font-size: 11.8px; font-weight: 700; color: #64748b; line-height: 1.55; overflow-wrap: anywhere; }
.hlq-link-allow { display: flex; align-items: flex-start; gap: 7px; font-size: 11.8px; font-weight: 800; color: #475569; line-height: 1.5; cursor: pointer; }
.hlq-link-allow input { margin-top: 2px; flex: 0 0 auto; accent-color: #ff6b2b; }
.hlq-link-allow span { overflow-wrap: anywhere; }

/* Băng ĐỎ: nguồn do người dùng dán, chưa xác minh — không được thành căn cứ trích dẫn */
.hlq-srcwarn {
  display: flex; align-items: flex-start; gap: 8px; border: 1px solid #fecaca; border-left: 4px solid #dc2626;
  border-radius: 9px; background: #fef2f2; color: #7f1d1d; padding: 10px 12px;
}
.hlq-srcwarn i { flex: 0 0 auto; margin-top: 2px; color: #dc2626; }
.hlq-srcwarn div { display: grid; gap: 3px; min-width: 0; }
.hlq-srcwarn b { font-size: 12.6px; font-weight: 950; line-height: 1.5; overflow-wrap: anywhere; }
.hlq-srcwarn span { font-size: 11.8px; font-weight: 750; line-height: 1.55; color: #991b1b; overflow-wrap: anywhere; }
.hlq-srcwarn em { font-size: 11.2px; font-weight: 800; font-style: normal; color: #b91c1c; overflow-wrap: anywhere; }

/* Khối chọn hợp đồng để đối chiếu nhanh */
.hlq-cmp { display: grid; gap: 9px; border: 1px solid #dbe4f0; border-radius: 10px; background: #fff; padding: 11px 12px; }
.hlq-cmp-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.hlq-cmp-head strong { font-size: 13px; font-weight: 950; color: #0f172a; overflow-wrap: anywhere; }

@media (max-width: 780px) {
  .hlq-overlay { padding: 8px; }
  .hlq-dialog { width: 100%; max-height: none; }
  .hlq-meta { grid-template-columns: 1fr; }
  .hlq-foot { justify-content: stretch; }
  .hlq-foot .hll-btn, .hlq-foot .hll-mini { width: 100%; justify-content: center; }
  .hlq-link-row { grid-template-columns: auto minmax(0, 1fr); }
  .hlq-link-row button { grid-column: 2; justify-self: stretch; justify-content: center; }
}

/* AI-MARK[QAI-UI:helen-law-scorecard] 2026-07-30 22:10 (GMT+7) — Đợt 3 Đ12: dải THẺ ĐỘ CHẶT CHẼ theo TỪNG
   bộ luật trong hồ sơ rà soát sâu 1 hợp đồng (BLDS ĐỦ · TT40/2024 THIẾU 3 · BVDLCN CHƯA RÀ), kèm phát hiện
   TRÁI/LỆCH và xung đột giữa các luật. Nằm TRONG màn rà soát sâu đã có — KHÔNG thêm tab/sub-tab.
   Tuyệt đối KHÔNG nowrap/line-clamp cho vùng chữ trích dẫn (guard chống cắt chữ).
   | rel: QAI-LEGAL:contract-law-scorecard, QAI-LEGAL:law-conflict-detect */
.hls-band { display: grid; gap: 10px; border: 1px solid #dbe4f0; border-radius: 10px; background: #fff; padding: 12px; }
.hls-band-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; justify-content: space-between; }
.hls-band-top h3 { margin: 0; font-size: 14px; font-weight: 950; color: #0f172a; }
.hls-total { display: inline-flex; align-items: baseline; gap: 7px; }
.hls-total b { font-size: 26px; font-weight: 950; line-height: 1; color: #0f172a; }
.hls-total span { font-size: 11.5px; font-weight: 850; color: #64748b; }
.hls-rank {
  display: inline-flex; align-items: center; border: 1px solid #e2e8f0; border-radius: 999px; background: #f8fafc;
  color: #475569; padding: 3px 10px; font-size: 11px; font-weight: 900;
}
.hls-rank--chat_che { color: #047857; background: #ecfdf5; border-color: #bbf7d0; }
.hls-rank--kha { color: #9a3412; background: #fff7ed; border-color: #fed7aa; }
.hls-rank--yeu { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.hls-rank--chua_du_du_lieu { color: #78350f; background: #fffbeb; border-color: #fde68a; }

.hls-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); gap: 8px; }
.hls-card {
  display: grid; gap: 6px; align-content: start; min-width: 0; cursor: pointer; text-align: left;
  border: 1px solid #e2e8f0; border-left: 4px solid #94a3b8; border-radius: 8px; background: #fbfcfe; padding: 9px 10px;
}
.hls-card:hover { background: #fff; box-shadow: 0 2px 8px rgba(15,23,42,.08); }
.hls-card.is-open { border-color: #ff6b2b; background: #fff; }
.hls-card--du { border-left-color: #0f766e; }
.hls-card--thieu { border-left-color: #dc2626; }
.hls-card--chua_ra { border-left-color: #f59e0b; }
.hls-card--khong_duoc_trich { border-left-color: #64748b; }
.hls-card strong { font-size: 12.6px; font-weight: 950; color: #0f172a; line-height: 1.35; overflow-wrap: anywhere; }
.hls-card-status { font-size: 11.4px; font-weight: 900; }
.hls-card--du .hls-card-status { color: #047857; }
.hls-card--thieu .hls-card-status { color: #b91c1c; }
.hls-card--chua_ra .hls-card-status { color: #b45309; }
.hls-card--khong_duoc_trich .hls-card-status { color: #475569; }
.hls-card small { font-size: 10.8px; font-weight: 750; color: #64748b; line-height: 1.45; overflow-wrap: anywhere; }

.hls-detail { display: grid; gap: 8px; border: 1px solid #dbe4f0; border-radius: 9px; background: #f8fafc; padding: 11px; }
.hls-detail h4 { margin: 0; font-size: 13px; font-weight: 950; color: #0f172a; overflow-wrap: anywhere; }
.hls-item { border: 1px solid #e2e8f0; border-radius: 7px; background: #fff; padding: 8px 10px; min-width: 0; }
.hls-item b { display: block; font-size: 12px; font-weight: 900; color: #0f172a; overflow-wrap: anywhere; }
.hls-item p { margin: 3px 0 0; font-size: 11.8px; font-weight: 700; color: #475569; line-height: 1.55; overflow-wrap: anywhere; }
.hls-cut {
  display: flex; align-items: center; gap: 6px; border: 1px dashed #cbd5e1; border-radius: 7px; background: #fff;
  color: #64748b; padding: 7px 9px; font-size: 11.4px; font-weight: 800; overflow-wrap: anywhere;
}

/* Phát hiện TRÁI / LỆCH / xung đột giữa các luật */
.hls-finding {
  display: grid; gap: 6px; border: 1px solid #fecaca; border-left: 4px solid #dc2626; border-radius: 8px;
  background: #fff; padding: 10px; min-width: 0;
}
.hls-finding--lech { border-color: #fed7aa; border-left-color: #ea580c; }
.hls-finding--xung_dot { border-color: #bfdbfe; border-left-color: #2563eb; }
.hls-finding-top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.hls-tag {
  display: inline-flex; align-items: center; border-radius: 999px; padding: 2px 9px; font-size: 10.6px; font-weight: 900;
  border: 1px solid currentColor;
}
.hls-tag--trai { color: #b91c1c; background: #fef2f2; }
.hls-tag--lech { color: #9a3412; background: #fff7ed; }
.hls-tag--xung_dot { color: #1d4ed8; background: #eff6ff; }
.hls-tag--tin {
  color: #475569; background: #f8fafc; border-color: #e2e8f0;
}
.hls-finding-why { font-size: 12.2px; font-weight: 750; color: #334155; line-height: 1.6; overflow-wrap: anywhere; }
.hls-quote {
  display: grid; gap: 3px; border-left: 3px solid #e2e8f0; padding-left: 9px; min-width: 0;
}
.hls-quote dt { font-size: 10.6px; font-weight: 900; color: #64748b; text-transform: uppercase; letter-spacing: .03em; }
.hls-quote dd { margin: 0; font-size: 11.9px; font-weight: 700; color: #334155; line-height: 1.6; overflow-wrap: anywhere; }
.hls-uutien {
  display: flex; align-items: flex-start; gap: 6px; border: 1px solid #bfdbfe; border-radius: 7px; background: #eff6ff;
  color: #1e3a8a; padding: 8px 10px; font-size: 11.8px; font-weight: 820; line-height: 1.55; overflow-wrap: anywhere;
}

@media (max-width: 780px) {
  .hls-cards { grid-template-columns: 1fr; }
  .hls-band-top { flex-direction: column; align-items: flex-start; }
}

/* AI-MARK[QAI-UI:helen-law-url-blocked] 2026-07-31 10:45 (GMT+7) — danh sách nguồn thay thế hiện ngay
   dưới ô báo lỗi khi link bị tường chắn bot chặn. Dùng design token sẵn có của popup Nạp (--hlq-*),
   KHÔNG hardcode màu. | rel: QAI-LEGAL:law-url-blocked */
.hlq-alts { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 4px; }
.hlq-alts > b { font-size: 12px; letter-spacing: .02em; opacity: .75; }
.hlq-alt {
  display: block; padding: 8px 10px; border-radius: 10px; text-decoration: none;
  border: 1px solid var(--hll-border, rgba(15, 23, 42, .12));
  background: var(--hll-surface-2, rgba(148, 163, 184, .08));
  color: inherit; transition: border-color .15s ease, background .15s ease;
}
.hlq-alt:hover { border-color: var(--hll-accent, #ea580c); background: var(--hll-surface-3, rgba(234, 88, 12, .06)); }
.hlq-alt-top { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; }
.hlq-alt-top em {
  font-style: normal; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px;
  background: rgba(22, 163, 74, .14); color: #15803d;
}
.hlq-alt-top em.is-warn { background: rgba(234, 88, 12, .14); color: #c2410c; }
.hlq-alt small { display: block; margin-top: 3px; font-size: 12px; line-height: 1.45; opacity: .8; }
@media (prefers-color-scheme: dark) {
  .hlq-alt-top em { background: rgba(34, 197, 94, .18); color: #4ade80; }
  .hlq-alt-top em.is-warn { background: rgba(249, 115, 22, .18); color: #fb923c; }
}

/* AI-MARK[QAI-UI:helen-soi-cap-phan-van] 2026-07-31 19:50 (GMT+7) — kết quả AI soi từng cặp Điều↔điều
   khoản. Mỗi kết luận LUÔN kèm 2 khối trích nguyên văn — không trích thì backend đã hạ về phân vân và
   không hiện ở đây. | rel: QAI-LEGAL:dieu-clause-ai */
.hll-ml-soi { margin: 10px 0 6px; display: flex; flex-direction: column; gap: 8px; }
.hll-ml-soi-head { display: flex; align-items: center; gap: 8px; font-size: 13px; flex-wrap: wrap; }
.hll-ml-soi-head span { opacity: .78; font-size: 12px; }
.hll-ml-soi-row {
  border: 1px solid var(--hll-border, rgba(15, 23, 42, .12));
  border-left-width: 3px; border-radius: 10px; padding: 9px 12px;
  background: var(--hll-surface-2, rgba(148, 163, 184, .07));
}
.hll-ml-soi-row--trai_luat { border-left-color: #dc2626; }
.hll-ml-soi-row--tuan_thu  { border-left-color: #16a34a; }
.hll-ml-soi-row--thieu     { border-left-color: #ea580c; }
.hll-ml-soi-top { display: flex; align-items: center; gap: 8px; font-size: 12px; flex-wrap: wrap; }
.hll-ml-soi-top em {
  font-style: normal; font-weight: 700; font-size: 11px; letter-spacing: .02em;
  padding: 1px 8px; border-radius: 999px; background: rgba(148, 163, 184, .18);
}
.hll-ml-soi-row--trai_luat .hll-ml-soi-top em { background: rgba(220, 38, 38, .14); color: #b91c1c; }
.hll-ml-soi-row--tuan_thu  .hll-ml-soi-top em { background: rgba(22, 163, 74, .14); color: #15803d; }
.hll-ml-soi-row--thieu     .hll-ml-soi-top em { background: rgba(234, 88, 12, .14); color: #c2410c; }
.hll-ml-soi-row p { margin: 5px 0 6px; font-size: 13px; line-height: 1.5; }
.hll-ml-soi-row blockquote {
  margin: 4px 0; padding: 5px 10px; font-size: 12px; line-height: 1.5;
  border-left: 2px solid var(--hll-border, rgba(15, 23, 42, .15));
  background: var(--hll-surface-3, rgba(148, 163, 184, .09)); border-radius: 0 6px 6px 0;
}
.hll-ml-soi-row blockquote b { opacity: .7; }

/* ═══════════════════════ Cổng kết nối MCP (tab "Kết nối MCP") ═══════════════
   AI-MARK[QAI-UI:helen-mcp] 2026-08-11 14:40 (GMT+7) — lớp giao diện cho tab cổng MCP chiều VÀO:
   thẻ endpoint, bảng kết nối, công tắc bật/tắt, khối lệnh copy-paste của hướng dẫn kết nối.
   Tái dùng .hlr-btn / .hlr-edit-input / .helen-modal-card sẵn có (không vẽ lại nút, input, modal).
   ⚠️ Comment CSS PHẢI đóng bằng dấu sao-gạch — gõ nhầm kiểu HTML sẽ NUỐT rule tới comment kế tiếp
   (guard 2026-07-08-css-html-comment-eats-rule). | rel: HELEN-INTG:mcp-routes
   ═══════════════════════════════════════════════════════════════════════════ */
/* Bề ngang: các tab Helen khác chạy FULL WIDTH trong .helen-page (chỉ màn chat mới bó 1040px).
   Bản đầu đặt max-width 1240px mà QUÊN margin-inline:auto ⇒ cả trang dồn sang trái, chừa một
   mảng trắng bên phải. Giữ trần rộng để màn siêu rộng chữ không kéo dài, NHƯNG phải tự căn giữa. */
.hlmcp { padding: 20px 24px 40px; max-width: 1600px; margin-inline: auto; }
.hlmcp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.hlmcp-title { display: flex; align-items: center; gap: 9px; font-size: 20px; font-weight: 800; color: #0f2a66; }
.hlmcp-sub { margin-top: 6px; font-size: 13px; line-height: 1.6; color: #475569; max-width: 900px; }
.hlmcp-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.hlmcp-chip--on { background: rgba(22,163,74,.12); color: #15803d; }
.hlmcp-chip--off { background: rgba(148,163,184,.18); color: #64748b; }

.hlmcp-endpoint {
  margin-top: 16px; padding: 12px 16px; border-radius: 14px; border: 1px solid #e2e8f0;
  background: linear-gradient(135deg, rgba(255,107,43,.05), rgba(15,42,102,.04));
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.hlmcp-endpoint-label { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: #64748b; }
.hlmcp-endpoint-url { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; font-weight: 700; color: #0f2a66; word-break: break-all; }
.hlmcp-endpoint-meta { font-size: 11px; color: #94a3b8; margin-left: auto; }

.hlmcp-panel { margin-top: 18px; }
.hlmcp-panel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 18px 0 12px; }
.hlmcp-panel-title { font-size: 15px; font-weight: 800; color: #0f172a; }
.hlmcp-panel-sub { font-size: 12px; color: #64748b; margin-top: 3px; line-height: 1.55; }

.hlmcp-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.hlmcp-stat { flex: 0 0 auto; min-width: 132px; padding: 12px 16px; border-radius: 14px; background: #fff; border: 1px solid #e2e8f0; }
.hlmcp-stat-num { display: block; font-size: 22px; font-weight: 800; color: #0f2a66; line-height: 1.1; }
.hlmcp-stat-lbl { font-size: 11px; color: #64748b; text-transform: uppercase; letter-spacing: .03em; }

.hlmcp-table-wrap { overflow-x: auto; border: 1px solid #e2e8f0; border-radius: 16px; background: #fff; }
.hlmcp-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 900px; }
.hlmcp-table thead th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: #64748b; padding: 11px 14px; border-bottom: 1px solid #e2e8f0; background: #f8fafc; }
.hlmcp-table td { padding: 13px 14px; border-bottom: 1px solid #f1f5f9; vertical-align: top; }
.hlmcp-table tr:last-child td { border-bottom: 0; }
.hlmcp-row.is-off { background: repeating-linear-gradient(135deg, rgba(148,163,184,.05) 0 8px, transparent 8px 16px); }
.hlmcp-name { font-weight: 700; color: #0f172a; }
.hlmcp-meta { font-size: 11px; color: #94a3b8; margin-top: 3px; line-height: 1.5; }
.hlmcp-note { font-size: 12px; color: #64748b; margin-top: 4px; font-style: italic; }
.hlmcp-ident { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; color: #334155; font-size: 12.5px; }
.hlmcp-tools { font-size: 12.5px; color: #334155; font-weight: 600; }
.hlmcp-usage { font-size: 12.5px; font-weight: 700; color: #0f2a66; }
.hlmcp-warn { color: #c2410c; font-weight: 700; }
.hlmcp-actions-cell { white-space: nowrap; }
.hlmcp-actions-cell > * { margin: 0 3px 4px 0; }

.hlmcp-mini {
  display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 9px;
  border: 1px solid #e2e8f0; background: #fff; color: #475569; font-size: 11.5px; font-weight: 700; cursor: pointer;
}
.hlmcp-mini:hover { border-color: #FF6B2B; color: #FF6B2B; }
.hlmcp-mini:disabled { opacity: .5; cursor: not-allowed; }
.hlmcp-mini--danger:hover { border-color: #dc2626; color: #dc2626; }

.hlmcp-toggle { width: 42px; height: 23px; border-radius: 999px; border: 0; background: #cbd5e1; position: relative; cursor: pointer; vertical-align: middle; transition: background .18s; }
.hlmcp-toggle span { position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; transition: transform .18s; box-shadow: 0 1px 3px rgba(2,6,23,.3); }
.hlmcp-toggle.is-on { background: #16a34a; }
.hlmcp-toggle.is-on span { transform: translateX(19px); }

.hlmcp-empty { padding: 34px 20px; text-align: center; color: #64748b; border: 1px dashed #cbd5e1; border-radius: 16px; background: #fff; }
.hlmcp-empty-title { font-weight: 700; color: #0f172a; margin-top: 8px; }
.hlmcp-empty-desc { font-size: 12.5px; margin-top: 4px; line-height: 1.6; max-width: 620px; margin-left: auto; margin-right: auto; }

.hlmcp-log { margin-top: 20px; padding: 16px 18px; border-radius: 16px; border: 1px solid #e2e8f0; background: #fff; }
.hlmcp-log-title { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 800; color: #0f172a; }
.hlmcp-log-list { margin-top: 10px; display: flex; flex-direction: column; gap: 2px; }
.hlmcp-log-item { display: flex; align-items: center; gap: 9px; font-size: 12px; color: #475569; padding: 5px 8px; border-radius: 8px; flex-wrap: wrap; }
.hlmcp-log-item:nth-child(odd) { background: rgba(148,163,184,.06); }
.hlmcp-log-item.is-err { color: #b91c1c; }
.hlmcp-log-time { color: #94a3b8; font-variant-numeric: tabular-nums; }
.hlmcp-log-tool { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; }
.hlmcp-log-ms { margin-left: auto; color: #94a3b8; }

.hlmcp-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.hlmcp-step { display: flex; gap: 10px; padding: 13px 15px; border-radius: 14px; background: #fff; border: 1px solid #e2e8f0; font-size: 12.5px; line-height: 1.55; color: #475569; }
.hlmcp-step-num { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; background: #0f2a66; color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; }

.hlmcp-gtabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 18px 0 0; border-bottom: 1px solid #e2e8f0; padding-bottom: 8px; }
.hlmcp-gtab { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: #64748b; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.hlmcp-gtab:hover { color: #0f172a; background: rgba(148,163,184,.1); }
.hlmcp-gtab.is-active { background: rgba(255,107,43,.1); color: #c2410c; border-color: rgba(255,107,43,.3); }

.hlmcp-guide { padding: 18px 0 4px; }
.hlmcp-guide h3 { font-size: 15px; font-weight: 800; color: #0f172a; }
.hlmcp-guide h4 { font-size: 13.5px; font-weight: 800; color: #0f172a; margin-top: 18px; }
.hlmcp-guide p { font-size: 13px; line-height: 1.65; color: #475569; margin-top: 7px; }
.hlmcp-guide code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: rgba(148,163,184,.16); padding: 1px 5px; border-radius: 5px; }

.hlmcp-code { margin-top: 12px; border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden; background: #0f172a; }
.hlmcp-code-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; background: #1e293b; color: #e2e8f0; font-size: 11.5px; font-weight: 700; }
.hlmcp-code-head .hlmcp-mini { background: transparent; border-color: rgba(226,232,240,.3); color: #e2e8f0; }
.hlmcp-code-head .hlmcp-mini:hover { border-color: #FF6B2B; color: #FF8A50; }
.hlmcp-pre { margin: 0; padding: 13px 14px; overflow-x: auto; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; line-height: 1.6; color: #e2e8f0; white-space: pre; }
.hlmcp-code-note { padding: 8px 12px; font-size: 11.5px; color: #94a3b8; background: #111c30; border-top: 1px solid rgba(226,232,240,.1); }

.hlmcp-warnbox { display: flex; align-items: flex-start; gap: 8px; margin-top: 14px; padding: 11px 14px; border-radius: 12px; background: rgba(234,88,12,.09); border: 1px solid rgba(234,88,12,.25); color: #9a3412; font-size: 12.5px; line-height: 1.6; }
.hlmcp-ok { display: flex; align-items: center; gap: 7px; margin-top: 14px; font-size: 12.5px; font-weight: 700; color: #15803d; }

.hlmcp-tool-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; margin-top: 14px; }
.hlmcp-tool { padding: 14px 16px; border-radius: 14px; border: 1px solid #e2e8f0; background: #fff; }
.hlmcp-tool-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hlmcp-tool-head code { font-size: 12px; font-weight: 700; color: #0f2a66; background: rgba(15,42,102,.07); }
.hlmcp-tool-title { font-weight: 700; font-size: 13px; color: #0f172a; margin-top: 7px; }
.hlmcp-tool-desc { font-size: 12.5px; line-height: 1.6; color: #475569; margin-top: 5px; }
.hlmcp-tool-args { font-size: 11.5px; color: #94a3b8; margin-top: 8px; }
.hlmcp-tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 800; background: rgba(148,163,184,.18); color: #475569; }
.hlmcp-tag--ai { background: rgba(99,102,241,.14); color: #4338ca; }
.hlmcp-tag--w { background: rgba(234,88,12,.14); color: #c2410c; }

.hlmcp-rules { margin-top: 24px; padding: 16px 20px; border-radius: 16px; background: #fff; border: 1px solid #e2e8f0; }
.hlmcp-rules h3 { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 800; color: #0f172a; }
.hlmcp-rules ul { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.hlmcp-rules li { font-size: 12.5px; line-height: 1.65; color: #475569; padding-left: 16px; position: relative; }
.hlmcp-rules li::before { content: ""; position: absolute; left: 0; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: #FF6B2B; }

.hlmcp-modal { width: min(680px, 100%); }
.hlmcp-form { display: flex; flex-direction: column; gap: 4px; }
/* Trong flex column, input/textarea BỊ CO lại (flex-shrink mặc định = 1) → ô nhập danh sách email
   xẹp thành một vạch. Ghim flex: 0 0 auto cho mọi ô nhập trong form. */
.hlmcp-form input, .hlmcp-form select, .hlmcp-form textarea { flex: 0 0 auto; }
.hlmcp-form textarea { min-height: 62px; margin-top: 6px; }
.hlmcp-lbl { font-size: 11.5px; font-weight: 800; color: #475569; margin-top: 12px; }
.hlmcp-req { color: #dc2626; }
.hlmcp-hint { font-size: 11.5px; color: #94a3b8; line-height: 1.55; margin-top: 4px; }
.hlmcp-check { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; font-weight: 600; color: #334155; margin-top: 12px; cursor: pointer; }
.hlmcp-check input { margin-top: 2px; }
.hlmcp-toolpick { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.hlmcp-toolpick-item { display: flex; align-items: flex-start; gap: 9px; padding: 9px 12px; border-radius: 11px; border: 1px solid #e2e8f0; cursor: pointer; }
.hlmcp-toolpick-item:hover { border-color: #FF6B2B; }
.hlmcp-toolpick-item.is-write { border-style: dashed; }
.hlmcp-toolpick-item input { margin-top: 3px; }
.hlmcp-toolpick-name { font-size: 12.5px; font-weight: 700; color: #0f172a; margin-right: 6px; }
.hlmcp-toolpick-code { display: block; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; color: #94a3b8; margin-top: 3px; }
.hlmcp-quota { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.hlmcp-formerr { color: #b91c1c; font-size: 12.5px; font-weight: 700; margin-top: 10px; min-height: 16px; }
.hlmcp-testlist { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.hlmcp-testlist li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #475569; flex-wrap: wrap; }
.hlmcp-testtools { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.hlmcp-testtools code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; background: rgba(15,42,102,.07); color: #0f2a66; padding: 2px 7px; border-radius: 6px; }

@media (max-width: 720px) {
  .hlmcp { padding: 16px 14px 32px; }
  .hlmcp-quota { grid-template-columns: 1fr; }
  .hlmcp-endpoint-meta { margin-left: 0; }
}
