/* ===== IMG demo v2 — "phòng họp HĐQT": giấy lạnh, mực navy, accent xanh theo nhận diện IMG
 * (logo img.vn: navy #0A253E, tia cyan #00B2E2/#0082CB/#004A87, tia lá #7FBC03/#4A9C2D).
 * Đỏ CHỈ dành cho Critical + nút phê duyệt (không phải màu brand). Series chart giữ bộ đã validate của v1. ===== */
:root {
  /* surfaces — giấy lạnh */
  --paper: #F2F4F8;
  --card: #FFFFFF;
  --sunken: #EAEDF3;
  --line: #D7DDE7;
  --line-soft: #E5E9F0;
  /* ink — mực navy */
  --ink: #16304F;
  --ink-2: #44566F;
  --ink-3: #8794A6;
  --ink-inverse: #EDF1F7;
  /* brand & signature — theme xanh sáng của img.vn (base.css: primary #004A87, action #046ABF, tint #E5F2FF) */
  --navy-deep: #004A87;       /* xanh primary IMG — sidebar, nút điều hành */
  --navy-2: #046ABF;          /* xanh hành động — hover */
  --seal: #B01E24;            /* đỏ — CHỈ Critical + phê duyệt */
  --seal-soft: #F7E6E7;
  /* accent — xanh IMG (chrome điều hành) */
  --accent: #046ABF;            /* text-safe trên trắng (5.5:1) */
  --accent-deep: #004A87;
  --accent-bright: #00B2E2;     /* tia cyan của logo — decor trên nền xanh/trắng, không dùng cho chữ nhỏ */
  --accent-soft: #E5F2FF;       /* tint nền — lấy thẳng từ theme img.vn */
  --accent-line: #B8DCF5;
  /* categorical — GIỮ bộ v1 đã validate (teal WARN contrast → luôn kèm direct label/bảng) */
  --c1: #2E5FA3; --c2: #0AA3AD; --c3: #B77E12; --c4: #7D4FA6; --c5: #C2452D;
  /* status — không dùng lại cho series */
  --good: #1E7F4F; --good-soft: #E3F1EA;
  --warn: #C58A00; --warn-soft: #F9F1DC;
  --serious: #D14B2E; --serious-soft: #FBE9E4;
  /* severity 4 mức (risk) */
  --sev-critical: #B01E24; --sev-critical-soft: #F7E6E7;
  --sev-high: #D14B2E;     --sev-high-soft: #FBE9E4;
  --sev-medium: #C58A00;   --sev-medium-soft: #F9F1DC;
  --sev-low: #46587A;      --sev-low-soft: #EAEDF3;
  /* type */
  --font: 'Be Vietnam Pro', -apple-system, 'Segoe UI', sans-serif;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(22,48,79,.06), 0 4px 16px rgba(22,48,79,.07);
  --shadow-lift: 0 2px 6px rgba(22,48,79,.08), 0 10px 30px rgba(22,48,79,.12);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  font-size: 15px;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; font-size: inherit; color: inherit; background: none; border: none; cursor: pointer; }
select { font-family: inherit; }
.num { font-variant-numeric: tabular-nums; }

/* ===== layout ===== */
.shell { display: flex; height: 100vh; overflow: hidden; }
.sidebar {
  width: 258px; flex: none;
  background: linear-gradient(178deg, var(--navy-deep) 12%, var(--navy-2));
  color: var(--ink-inverse);
  display: flex; flex-direction: column;
}
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.view { flex: 1; overflow-y: auto; padding: 26px 30px 40px; }

/* ===== sidebar ===== */
.brand { padding: 18px 18px 14px; border-bottom: 1px solid rgba(0,178,226,.22); }
/* PNG lockup gồm cả tagline bitmap — crop còn phần emblem + wordmark (hàng 0–192/281), tagline render lại bằng HTML cho nét */
.brand-logo { display: block; width: 172px; aspect-ratio: 500 / 192; object-fit: cover; object-position: top; }
.brand-tagline { margin-top: 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; color: rgba(255,255,255,.95); }
.nav { flex: 1; padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.nav-item {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  color: rgba(237,241,247,.8); font-size: 13.5px; font-weight: 500;
  text-align: left; transition: background .15s, color .15s;
}
.nav-item i { font-size: 17px; flex: none; }
.nav-item:hover { background: rgba(237,241,247,.08); color: #fff; }
.nav-item.active { background: rgba(0,178,226,.13); color: #fff; }
.nav-item.active::before {
  content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 3px;
  border-radius: 2px; background: var(--accent-bright);
}
.nav-item.active i { color: var(--accent-bright); }
.nav-item.locked { display: none; }
.sidebar-foot { padding: 12px 14px 16px; border-top: 1px solid rgba(237,241,247,.12); }
.scope-btn {
  width: 100%; display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: var(--radius-sm);
  background: rgba(237,241,247,.08); color: rgba(237,241,247,.85); font-size: 12.5px; font-weight: 600;
}
.scope-btn i { font-size: 16px; color: var(--accent-bright); }
.scope-btn:hover { background: rgba(237,241,247,.16); color: #fff; }
.demo-note { margin-top: 10px; font-size: 10.5px; color: rgba(237,241,247,.42); text-align: center; }

/* ===== topbar + bộ lọc toàn cục ===== */
.topbar {
  min-height: 58px; flex: none;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 8px 24px; background: var(--card);
  border-bottom: 1px solid var(--line);
  box-shadow: inset 0 -2px 0 rgba(0,178,226,.28);
}
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); min-width: 0; flex: 1 1 240px; overflow: hidden; white-space: nowrap; }
.crumbs .crumb { color: var(--ink-3); }
.crumbs .crumb.link { cursor: pointer; }
.crumbs .crumb.link:hover { color: var(--c1); text-decoration: underline; }
.crumbs .crumb.here { color: var(--ink); font-weight: 600; }
.crumbs .sep { color: var(--line); }
.topbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* segmented control (kỳ, pháp nhân) */
.seg { display: flex; gap: 2px; background: var(--sunken); border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.seg button {
  padding: 4px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 600; color: var(--ink-3);
  transition: background .15s, color .15s; white-space: nowrap;
}
.seg button:hover { color: var(--ink-2); }
.seg button.active { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.seg button.active.accent { color: var(--accent-deep); box-shadow: inset 0 0 0 1px var(--accent-line), var(--shadow); }

/* nút vai */
.role-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--sunken); border: 1px solid var(--line);
  font-size: 12px; font-weight: 600; color: var(--ink-2); white-space: nowrap;
}
.role-btn:hover { border-color: var(--accent-line); background: var(--accent-soft); color: var(--ink); }
.role-btn i { font-size: 15px; color: var(--accent); }
.role-btn .caret { font-size: 11px; color: var(--ink-3); }

.icon-btn {
  width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; border: 1px solid var(--line); background: var(--sunken);
  color: var(--ink-3); font-size: 15px;
}
.icon-btn:hover { color: var(--ink); border-color: var(--ink-3); }

.btn-scenario {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: var(--radius-sm);
  background: var(--navy-deep); color: #fff; font-size: 12.5px; font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(0,178,226,.45);
}
.btn-scenario i { font-size: 15px; color: var(--accent-bright); }
.btn-scenario:hover { background: var(--navy-2); }

/* role banner */
.role-banner {
  padding: 8px 24px; font-size: 12.5px;
  background: var(--accent-soft); border-bottom: 1px solid var(--accent-line); color: var(--ink-2);
  display: flex; align-items: center; gap: 8px;
}
.role-banner[hidden] { display: none; }
.role-banner i { color: var(--accent); }
.role-banner b { color: var(--ink); }
.role-banner .back { margin-left: auto; color: var(--accent-deep); font-weight: 700; cursor: pointer; }
.role-banner .back:hover { text-decoration: underline; }

/* ===== cards & grids ===== */
.grid { display: grid; gap: 16px; }
.card {
  background: var(--card); border: 1px solid var(--line-soft);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 20px;
}
/* hiệu ứng vào trang — card trượt nhẹ lên như demo Thái Nguyên */
@keyframes cardIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.view .card { animation: cardIn .38s ease both; }
.view > *:nth-child(2) .card, .view > .card:nth-child(2) { animation-delay: .05s; }
.view > *:nth-child(3) .card, .view > .card:nth-child(3) { animation-delay: .1s; }
.view > *:nth-child(n+4) .card, .view > .card:nth-child(n+4) { animation-delay: .15s; }
@media (prefers-reduced-motion: reduce) { .view .card { animation: none; } }
.card-title {
  font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 11px;
  display: flex; align-items: center; gap: 6px;
}
.card-title::before { content: ""; width: 3px; height: 11px; border-radius: 2px; background: var(--accent-bright); flex: none; }
.card-title.plain::before { display: none; }
.hero-num { font-size: 30px; font-weight: 800; letter-spacing: -.01em; line-height: 1.1; }
.hero-sub { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.delta-up { color: var(--good); font-weight: 600; }
.delta-down { color: var(--serious); font-weight: 600; }

/* ===== tables ===== */
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th {
  text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-3); padding: 9px 11px; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.tbl td { padding: 10px 11px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr.click:hover { background: var(--sunken); }
.tbl .r { text-align: right; }
.tbl tfoot td { border-top: 2px solid var(--line); font-weight: 700; }

/* pills & badges */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.pill i { font-size: 12px; }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.serious { background: var(--serious-soft); color: var(--serious); }
.pill.neutral { background: var(--sunken); color: var(--ink-2); }
.pill.accent { background: var(--accent-soft); color: var(--accent-deep); }
.badge-entity { display: inline-block; padding: 1px 7px; border-radius: 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .03em; }
.badge-entity.img { background: #E3EAF5; color: var(--c1); }
.badge-entity.ipd { background: #E0F2F3; color: #0B7A82; }
.badge-entity.mhl { background: #F0E9F7; color: var(--c4); }
.src-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; font-weight: 600; color: var(--c1);
  background: #E3EAF5; padding: 1px 7px; border-radius: 4px; cursor: pointer;
}
.src-tag:hover { text-decoration: underline; }
.label-tag { font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 1px 6px; border-radius: 3px; }
.label-tag.quyche { background: var(--sunken); color: var(--ink-2); }
.label-tag.dexuat { background: #E0F2F3; color: #0B7A82; }
.label-tag.mophong { background: var(--accent-soft); color: var(--accent-deep); }

/* progress bar */
.bar { height: 8px; border-radius: 4px; background: var(--sunken); overflow: hidden; min-width: 60px; }
.bar > i { display: block; height: 100%; border-radius: 4px; background: var(--c1); }
.bar.teal > i { background: var(--c2); }
.bar.accent > i { background: var(--c3); }

/* band chip — bậc hưởng lương (QĐ 93) */
.band { display: inline-flex; align-items: baseline; gap: 4px; padding: 3px 10px; border-radius: var(--radius-sm); font-weight: 800; font-size: 15px; }
.band small { font-size: 10.5px; font-weight: 600; opacity: .75; }
.band.b0 { background: var(--serious-soft); color: var(--serious); }
.band.b80 { background: var(--warn-soft); color: var(--warn); }
.band.b90 { background: #E3EAF5; color: var(--c1); }
.band.b100 { background: var(--good-soft); color: var(--good); }
.band.b110 { background: var(--good); color: #fff; }

/* xếp loại 6 cấu phần: A+ A B C D */
.grade { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; padding: 2px 8px; border-radius: var(--radius-sm); font-weight: 800; font-size: 13px; letter-spacing: .02em; }
.grade.gAp { background: var(--accent-deep); color: #fff; }
.grade.gA { background: var(--good-soft); color: var(--good); }
.grade.gB { background: #E3EAF5; color: var(--c1); }
.grade.gC { background: var(--warn-soft); color: var(--warn); }
.grade.gD { background: var(--serious-soft); color: var(--serious); }

/* ===== masked money — lương ẩn mặc định ===== */
.masked {
  display: inline-flex; align-items: center; gap: 5px;
  font-weight: 700; letter-spacing: .12em; color: var(--ink-3);
  background: var(--sunken); border: 1px dashed var(--line);
  padding: 1px 8px; border-radius: 4px; font-size: 12.5px; cursor: help;
}
.masked i { font-size: 12px; letter-spacing: 0; color: var(--accent); }
.btn-unmask {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: var(--radius-sm);
  background: var(--accent-soft); border: 1px solid var(--accent-line);
  color: var(--accent-deep); font-weight: 700; font-size: 13px;
}
.btn-unmask i { font-size: 15px; }
.btn-unmask:hover { background: #F0E5C8; }

/* ===== nút Xác nhận kiểu đóng dấu — đỏ CHỈ ở đây + Critical ===== */
.btn-approve {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--seal); color: var(--seal); font-weight: 700; font-size: 13px;
  background: #fff; transition: all .15s;
}
.btn-approve:hover { background: var(--seal-soft); }
.btn-approve:disabled { opacity: .45; cursor: default; }
.stamp {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border: 2px solid var(--seal); border-radius: var(--radius-sm);
  color: var(--seal); font-weight: 800; font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  transform: rotate(-4deg); background: var(--seal-soft);
}
@keyframes stampIn { 0% { transform: rotate(-4deg) scale(2.2); opacity: 0; } 60% { transform: rotate(-4deg) scale(.94); opacity: 1; } 100% { transform: rotate(-4deg) scale(1); } }
.stamp.animate { animation: stampIn .45s cubic-bezier(.2,.8,.3,1.1); }

/* ===== alerts / risk — 4 mức severity ===== */
.alert-item {
  display: flex; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-soft); margin-bottom: 8px; cursor: pointer;
  background: var(--card); transition: border-color .15s;
}
.alert-item:hover { border-color: var(--c1); }
.alert-item i { font-size: 17px; flex: none; margin-top: 1px; }
.alert-item .t { font-weight: 600; font-size: 12.5px; }
.alert-item .d { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.alert-item.critical { border-left: 3px solid var(--sev-critical); }
.alert-item.critical i { color: var(--sev-critical); }
.alert-item.high i { color: var(--sev-high); }
.alert-item.medium i { color: var(--sev-medium); }
.alert-item.low i { color: var(--sev-low); }
/* tương thích class v1 */
.alert-item.warn i { color: var(--warn); }
.alert-item.serious i { color: var(--serious); }

.sev { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.sev.critical { background: var(--sev-critical); color: #fff; }
.sev.high { background: var(--sev-high-soft); color: var(--sev-high); }
.sev.medium { background: var(--sev-medium-soft); color: var(--sev-medium); }
.sev.low { background: var(--sev-low-soft); color: var(--sev-low); }

/* ===== cây M-C-K-N ===== */
.mckn-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 24px; height: 21px; padding: 0 7px; border-radius: 6px; flex: none;
  font-size: 11px; font-weight: 800; color: #fff; letter-spacing: .03em;
}
/* 4 tầng phân biệt bằng hue: M xanh IMG → C teal → K hổ phách → N xám navy (không dùng màu tối sầm) */
.mckn-badge.m { background: #046ABF; }
.mckn-badge.c { background: #0AA3AD; }
.mckn-badge.k { background: #B77E12; }
.mckn-badge.n { background: #5C6B84; }
.tree-row {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer;
}
.tree-row:hover { background: var(--sunken); }
.tree-row.selected { background: var(--accent-soft); border-color: var(--accent-line); }
.tree-row .code { font-size: 11px; font-weight: 700; color: var(--ink-3); font-variant-numeric: tabular-nums; flex: none; }
.tree-row .name { font-size: 13px; font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-toggle {
  width: 20px; height: 20px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 4px; color: var(--ink-3); font-size: 12px;
}
.tree-toggle:hover { background: var(--line-soft); color: var(--ink); }
.tree-kids { border-left: 1px solid var(--line-soft); margin-left: 20px; padding-left: 8px; }

/* ===== gantt-lite ===== */
.gantt-row { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; align-items: center; gap: 12px; padding: 6px 0; }
.gantt-row .glabel { font-size: 12px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gantt-track { position: relative; height: 16px; border-radius: 4px; background: var(--sunken); }
.gantt-bar { position: absolute; top: 4px; height: 8px; border-radius: 4px; background: var(--c1); min-width: 4px; }
.gantt-bar.plan { top: 1px; height: 4px; background: var(--line); }
.gantt-bar.late { background: var(--serious); }
.gantt-ms { position: absolute; top: 3px; width: 10px; height: 10px; transform: translateX(-5px) rotate(45deg); background: var(--accent-bright); border: 1px solid var(--accent-deep); border-radius: 2px; }
.gantt-ms.done { background: var(--good); border-color: var(--good); }
.gantt-today { position: absolute; top: -2px; bottom: -2px; width: 1.5px; background: var(--seal); opacity: .6; }

/* ===== chart containers ===== */
.chart { width: 100%; height: 260px; }
.chart.tall { height: 340px; }
.chart.short { height: 180px; }
.radar-box { width: 100%; height: 300px; }
.chart-fallback { height: auto !important; }
.chart-fallback .fallback-note { font-size: 11px; color: var(--ink-3); margin-bottom: 6px; display: flex; align-items: center; gap: 5px; }

/* heatmap cell (phối hợp / coverage) */
.hm { display: grid; gap: 3px; }
.hm-cell {
  min-width: 26px; height: 26px; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 10.5px; font-weight: 600; background: var(--sunken); color: var(--ink-2);
  cursor: default;
}
.hm-cell.click { cursor: pointer; }
.hm-cell.click:hover { outline: 1.5px solid var(--accent-bright); }

/* ===== drawer (hỗ trợ tab) ===== */
.drawer-scrim { position: fixed; inset: 0; background: rgba(15,31,56,.38); z-index: 40; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(620px, 94vw); z-index: 41;
  background: var(--card); box-shadow: -8px 0 32px rgba(15,31,56,.2);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .25s ease;
}
.drawer.open { transform: translateX(0); }
.drawer.drawer-wide { width: min(1120px, 94vw); }
.drawer-head {
  padding: 15px 20px 13px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: linear-gradient(180deg, #FBF9F3, var(--card));
}
.drawer-head h3 { font-size: 15px; font-weight: 700; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.drawer-close { font-size: 20px; color: var(--ink-3); padding: 4px; }
.drawer-close:hover { color: var(--ink); }
.drawer-tabs {
  display: flex; gap: 2px; padding: 0 14px; border-bottom: 1px solid var(--line);
  background: var(--card); overflow-x: auto; flex: none;
}
.drawer-tab {
  padding: 10px 12px 8px; font-size: 12.5px; font-weight: 600; color: var(--ink-3);
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.drawer-tab:hover { color: var(--ink-2); }
.drawer-tab.active { color: var(--accent-deep); border-bottom-color: var(--accent-bright); }

/* scenario / role drawer */
.scn-step {
  display: flex; gap: 12px; padding: 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-soft); margin-bottom: 8px; cursor: pointer;
}
.scn-step:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.scn-step.done { opacity: .55; }
.scn-step .no {
  width: 26px; height: 26px; flex: none; border-radius: 50%;
  background: var(--navy-deep); color: var(--accent-bright); font-weight: 700; font-size: 12.5px;
  display: flex; align-items: center; justify-content: center;
}
.scn-step .t { font-weight: 600; font-size: 13px; }
.scn-step .d { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.scn-reset { width: 100%; padding: 9px; border-radius: var(--radius-sm); border: 1px dashed var(--line); color: var(--ink-3); font-weight: 600; margin-top: 6px; }
.scn-reset:hover { color: var(--ink); border-color: var(--ink-3); }

/* info panel phạm vi demo */
.caveat {
  display: flex; gap: 10px; padding: 12px; border-radius: var(--radius-sm);
  background: var(--accent-soft); border: 1px solid var(--accent-line); margin-bottom: 10px;
}
.caveat i { color: var(--accent-deep); font-size: 17px; flex: none; margin-top: 1px; }
.caveat .t { font-weight: 700; font-size: 12.5px; color: var(--ink); }
.caveat .d { font-size: 12px; color: var(--ink-2); margin-top: 2px; line-height: 1.55; }

/* ===== tooltip ===== */
.tipbox {
  position: fixed; z-index: 100; max-width: 320px;
  background: var(--navy-deep); color: var(--ink-inverse);
  border-radius: 8px; padding: 10px 12px; font-size: 12px; line-height: 1.55;
  box-shadow: 0 8px 24px rgba(15,31,56,.35); pointer-events: none;
  border-top: 2px solid var(--accent-bright);
}
.tipbox .tip-head { font-weight: 700; margin-bottom: 3px; color: #fff; display: flex; gap: 6px; align-items: center; }
.tipbox .tip-head i { color: var(--accent-bright); }
[data-tip] { cursor: help; }
.tip-i { font-size: 13px; color: var(--ink-3); vertical-align: -1px; margin-left: 4px; }

/* ===== toast ===== */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 90;
  background: var(--navy-deep); color: #fff; padding: 10px 18px; border-radius: 999px;
  font-size: 13px; font-weight: 600; box-shadow: 0 8px 24px rgba(15,31,56,.4);
  border: 1px solid rgba(0,178,226,.5);
}

/* ===== misc ===== */
.muted { color: var(--ink-3); }
.small { font-size: 12.5px; }
.mt8 { margin-top: 8px; } .mt14 { margin-top: 14px; } .mt20 { margin-top: 20px; }
.row { display: flex; align-items: center; gap: 10px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.err-screen { padding: 60px; text-align: center; color: var(--serious); font-weight: 600; white-space: pre-wrap; }
.boot-screen { max-width: 560px; margin: 60px auto; text-align: center; }
.boot-screen i { font-size: 40px; color: var(--accent); }
.boot-screen h2 { font-size: 17px; margin: 12px 0 8px; }
.boot-screen p { font-size: 13px; color: var(--ink-2); line-height: 1.6; }
.v2-empty {
  padding: 70px 20px; text-align: center; color: var(--ink-3); font-weight: 600;
  border: 1px dashed var(--line); border-radius: var(--radius); background: var(--card);
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ============================================================================
 * VAI TRÒ v2 — dropdown chọn vai (neo dưới nút vai) + dải role banner giàu.
 * Append cuối file: các rule .role-banner ở đây GHI ĐÈ bản một-dòng phía trên
 * (cùng độ đặc hiệu, khai báo sau thắng). Không sửa rule cũ.
 * ==========================================================================*/

/* nav bị khoá theo vai */
.nav-item.locked { opacity: .4; pointer-events: none; }

/* ---- dropdown vai ---- */
.role-menu {
  position: fixed; z-index: 1200; min-width: 300px; max-width: 340px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lift); overflow: hidden;
  opacity: 0; transform: translateY(-6px) scale(.99); transform-origin: top right;
  transition: opacity .2s ease, transform .2s ease;
}
.role-menu.open { opacity: 1; transform: translateY(0) scale(1); }
.role-item {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  padding: 11px 14px; border-bottom: 1px solid var(--line-soft); transition: background .15s;
}
.role-item:last-of-type { border-bottom: none; }
.role-item:hover { background: var(--accent-soft); }
.role-item .ri-ic {
  width: 34px; height: 34px; flex: none; border-radius: 9px; background: var(--sunken);
  display: flex; align-items: center; justify-content: center; color: var(--accent); font-size: 17px;
}
.role-item.on .ri-ic { background: var(--accent); color: #fff; }
.role-item .ri-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.role-item .ri-name { font-weight: 600; font-size: 13.5px; color: var(--ink); }
.role-item.on .ri-name { color: var(--accent-deep); }
.role-item .ri-sub { font-size: 11.5px; color: var(--ink-3); line-height: 1.35; }
.role-item .ri-tick { flex: none; font-size: 16px; color: var(--accent); opacity: 0; }
.role-item.on { background: var(--accent-soft); }
.role-item.on .ri-tick { opacity: 1; }
.role-menu-foot {
  padding: 9px 14px; font-size: 11px; color: var(--ink-3); line-height: 1.4;
  background: var(--sunken); border-top: 1px solid var(--line-soft);
}
.role-menu-foot i { color: var(--accent); margin-right: 4px; }

/* ---- dải role banner giàu (ghi đè bản một-dòng) ---- */
.role-banner {
  position: relative; display: block; flex: none;
  margin: 12px 24px 0; padding: 13px 46px 14px 16px;
  border: 1px solid var(--accent-line); border-left: 4px solid var(--accent);
  border-radius: var(--radius); background: var(--accent-soft); color: var(--ink-2);
  font-size: 12.5px; overflow: visible;
}
.role-banner.rb--ok     { background: var(--good-soft);   border-color: #C1E0CF; border-left-color: var(--good); }
.role-banner.rb--accent { background: var(--accent-soft); border-color: var(--accent-line); border-left-color: var(--accent); }
.role-banner.rb--warn   { background: var(--warn-soft);   border-color: #EEDCAF; border-left-color: var(--warn); }
.role-banner.rb--teal   { background: #E4F5F6; border-color: #B7E6E9; border-left-color: #0AA3AD; }
.role-banner.rb--gov    { background: #F1EBF7; border-color: #D9C9E9; border-left-color: #7D4FA6; }
.role-banner .rb-close {
  position: absolute; top: 10px; right: 12px; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(22,48,79,.06); color: var(--ink-3);
  display: flex; align-items: center; justify-content: center; font-size: 13px;
}
.role-banner .rb-close:hover { background: rgba(22,48,79,.13); color: var(--ink); }
.role-banner .rb-close i { color: inherit; }
.role-banner .rb-top { display: flex; align-items: center; gap: 12px; }
.role-banner .rb-ava {
  width: 40px; height: 40px; flex: none; border-radius: 50%;
  background: var(--card); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; font-size: 20px; color: var(--accent-deep);
}
.role-banner .rb-ava i { color: inherit; }
.role-banner .rb-id { flex: 1; min-width: 0; }
.role-banner .rb-name { font-size: 14px; color: var(--ink-2); }
.role-banner .rb-name b { color: var(--ink); font-weight: 700; }
.role-banner .rb-role { font-size: 12px; color: var(--ink-3); margin-top: 1px; }
.role-banner .rb-tag {
  display: inline-flex; align-items: center; gap: 5px; flex: none; white-space: nowrap;
  padding: 4px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 600; color: #fff;
}
.role-banner .rb-tag i { color: #fff; font-size: 13px; }
.role-banner .rb-tag-ok     { background: var(--good); }
.role-banner .rb-tag-accent { background: var(--accent); }
.role-banner .rb-tag-warn   { background: var(--warn); }
.role-banner .rb-tag-teal   { background: #0AA3AD; }
.role-banner .rb-tag-gov    { background: #7D4FA6; }
.role-banner .rb-back {
  flex: none; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
  padding: 6px 12px; border-radius: var(--radius-sm);
  background: var(--card); border: 1px solid var(--line); color: var(--ink-2); font-size: 12px; font-weight: 600;
}
.role-banner .rb-back:hover { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent-deep); }
.role-banner .rb-back i { color: inherit; font-size: 14px; }
.role-banner .rb-scope { margin-top: 10px; font-size: 12px; color: var(--ink-3); }
.role-banner .rb-scope i { color: var(--ink-3); }
.role-banner .rb-scope b { color: var(--ink); font-weight: 600; }
.role-banner .rb-cols { display: flex; gap: 26px; margin-top: 10px; flex-wrap: wrap; }
.role-banner .rb-col { flex: 1; min-width: 240px; }
.role-banner .rb-h { font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; display: flex; align-items: center; gap: 5px; }
.role-banner .rb-h i { color: inherit; }
.role-banner .rb-li { position: relative; padding: 2px 0 2px 19px; font-size: 12px; color: var(--ink-2); }
.role-banner .rb-yes::before { content: "\2713"; position: absolute; left: 2px; color: var(--good); font-weight: 700; }
.role-banner .rb-no::before  { content: "\2715"; position: absolute; left: 2px; color: var(--serious); font-weight: 700; }
@media (max-width: 760px) {
  .role-banner .rb-top { flex-wrap: wrap; }
  .role-banner .rb-back { margin-left: 0; }
  .role-menu { min-width: 260px; }
}

/* ===== Dashboard "wow" — mở màn phòng họp HĐQT (4 hạng mục) =====
 * Bản tin điều hành · Dải nhiệt 5×6 · count-up + realtime pulse · Chờ quyết hôm nay.
 * Chỉ token màu sẵn có; không gauge/confetti/rainbow. ===== */

/* khối mở màn: bản tin (trái) + dải nhiệt (phải, rộng hơn) */
.dash-open { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(0, 1.45fr); gap: 14px; align-items: stretch; }
.dash-stack { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* --- HẠNG MỤC 1: Bản tin điều hành --- */
.brief-card { border: 1px solid var(--line-soft); border-left: 3px solid var(--accent-bright); display: flex; flex-direction: column; }
.brief-tag { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.brief-auto { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  color: var(--accent-deep); background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 999px; padding: 3px 9px; }
.brief-auto i { font-size: 12px; color: var(--accent-bright); }
.brief-hello { font-size: 16px; font-weight: 800; color: var(--ink); letter-spacing: -.01em; }
.brief-sub { font-size: 12px; color: var(--ink-3); margin: 2px 0 11px; line-height: 1.45; }
.brief-lines { display: flex; flex-direction: column; gap: 9px; }
.brief-line { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; font-family: inherit;
  border: 1px solid var(--line-soft); border-radius: var(--radius-sm); background: var(--card); padding: 10px 12px; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.brief-line:hover { border-color: var(--accent-line); box-shadow: var(--shadow); transform: translateX(2px); }
.brief-line .bl-ic { width: 28px; height: 28px; flex: none; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; }
.brief-line.good .bl-ic { background: var(--good-soft); color: var(--good); }
.brief-line.warn .bl-ic { background: var(--warn-soft); color: var(--warn); }
.brief-line.serious .bl-ic { background: var(--serious-soft); color: var(--serious); }
.brief-line .bl-tx { flex: 1; min-width: 0; font-size: 12.5px; line-height: 1.45; color: var(--ink-2); }
.brief-line .bl-tx b { color: var(--ink); }
.brief-line .bl-go { flex: none; color: var(--accent); font-size: 15px; }
/* fade-up lần lượt (stagger 200ms/câu) — KHÔNG typing từng ký tự */
.brief-line { opacity: 0; animation: briefUp .5s cubic-bezier(.22,.61,.36,1) forwards; }
@keyframes briefUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* --- HẠNG MỤC 2: Dải nhiệt 5 Mục tiêu × 6 tháng --- */
.heat-card { display: flex; flex-direction: column; }
.heat-legend { display: inline-flex; flex-wrap: wrap; gap: 11px; font-size: 10.5px; color: var(--ink-3); font-weight: 600; }
.heat-legend span { display: inline-flex; align-items: center; gap: 4px; }
.heat-legend .hm-lg { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.hm-lg.good { background: var(--good-soft); box-shadow: inset 0 0 0 1px var(--good); }
.hm-lg.warn { background: var(--warn-soft); box-shadow: inset 0 0 0 1px var(--warn); }
.hm-lg.serious { background: var(--serious-soft); box-shadow: inset 0 0 0 1px var(--serious); }
.hm-lg.na { background: var(--sunken); box-shadow: inset 0 0 0 1px var(--line); }
/* dải nhiệt: ô đặc liền khối, số % của KR lệch nhất ngay trong ô — đọc như bảng nhiệt thật, không phải chấm rời */
.heat-grid { display: grid; grid-template-columns: minmax(200px, 1.4fr) repeat(6, 1fr); gap: 3px; margin-top: 8px; }
.hm-corner { background: transparent; border: none; }
.hm-colh { text-align: center; font-size: 11px; font-weight: 800; color: var(--ink-3); align-self: center; padding-bottom: 3px; }
.hm-colh.t6 { color: var(--accent-deep); }
.hm-rowlabel { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding-right: 10px; }
.hm-mcode { font-size: 10px; font-weight: 800; color: var(--accent-deep); letter-spacing: .04em; }
.hm-mname { font-size: 11px; font-weight: 600; color: var(--ink-2); line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hm-cell { position: relative; height: 40px; width: 100%; border-radius: 6px; border: none;
  cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0;
  font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums;
  transition: filter .12s, box-shadow .12s; }
.hm-cell.good { background: color-mix(in srgb, var(--good) 16%, #fff); color: var(--good); }
.hm-cell.warn { background: color-mix(in srgb, var(--warn) 20%, #fff); color: #8A6100; }
.hm-cell.serious { background: color-mix(in srgb, var(--serious) 20%, #fff); color: var(--serious); }
.hm-cell.na-cell { background: var(--sunken); color: var(--ink-3); cursor: default; font-weight: 600; }
.hm-cell:not(.na-cell):hover { filter: brightness(.96); box-shadow: var(--shadow); }
.hm-cell.t6 { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 55%, transparent); }
.hm-cell.t6:not(.na-cell):hover { box-shadow: inset 0 0 0 2px var(--accent), var(--shadow); }

/* --- HẠNG MỤC 4: Chờ quyết hôm nay --- */
.decide-card { border-left: 3px solid var(--accent); }
.decide-list { display: flex; flex-direction: column; gap: 8px; }
.decide-row { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; font-family: inherit;
  border: 1px solid var(--line-soft); border-radius: var(--radius-sm); background: var(--card); padding: 10px 12px; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.decide-row:hover { border-color: var(--accent-line); box-shadow: var(--shadow); transform: translateX(2px); }
.decide-row[disabled] { cursor: default; opacity: .8; }
.decide-row[disabled]:hover { border-color: var(--line-soft); box-shadow: none; transform: none; }
.decide-row .dc-ic { width: 30px; height: 30px; flex: none; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 16px;
  background: var(--accent-soft); color: var(--accent-deep); }
.decide-row.good .dc-ic { background: var(--good-soft); color: var(--good); }
.decide-row.warn .dc-ic { background: var(--warn-soft); color: var(--warn); }
.decide-row.serious .dc-ic { background: var(--seal-soft); color: var(--seal); }
.decide-row.done { background: var(--good-soft); border-color: color-mix(in srgb, var(--good) 22%, transparent); }
.decide-row .dc-tx { flex: 1; min-width: 0; font-size: 12.5px; line-height: 1.4; color: var(--ink-2); }
.decide-row .dc-tx b { color: var(--ink); }
.decide-row .dc-go { flex: none; color: var(--accent); font-size: 15px; }

/* --- HẠNG MỤC 3: realtime pulse (mẫu aifbpulse) --- */
.rt-pulse { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--good); margin-right: 5px; vertical-align: baseline;
  box-shadow: 0 0 0 0 rgba(30,127,79,.55); animation: rtpulse 1.8s ease-out infinite; }
@keyframes rtpulse { 0% { box-shadow: 0 0 0 0 rgba(30,127,79,.55); } 70% { box-shadow: 0 0 0 7px rgba(30,127,79,0); } 100% { box-shadow: 0 0 0 0 rgba(30,127,79,0); } }

@media (max-width: 1100px) { .dash-open { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
  .brief-line { opacity: 1; animation: none; }
  .rt-pulse { animation: none; }
  .brief-line:hover, .decide-row:hover, .hm-cell:not(.na-cell):hover { transform: none; }
}

/* ===== UEB (đánh giá cá nhân theo UEB) ===== */
.ueb-info { background: var(--sunken); box-shadow: none; }
.ueb-info .small { line-height: 1.6; color: var(--ink-2); }

/* bộ lọc */
.ueb-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.ueb-fl { display: flex; flex-direction: column; gap: 4px; }
.ueb-fl > span { font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-3); }
.ueb-fl select {
  padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: 12.5px; background: var(--card); color: var(--ink); font-family: inherit;
}
.ueb-fl select:disabled { background: var(--sunken); color: var(--ink-3); cursor: not-allowed; }

/* card tổng quan */
.ueb-ov-grid { display: flex; gap: 22px; flex-wrap: wrap; align-items: stretch; }
.ueb-ov-main { flex: 1; min-width: 240px; }
.ueb-ov-label { font-size: 11.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-3); }
.ueb-ov-score { font-size: 46px; font-weight: 800; line-height: 1.05; color: var(--accent-deep); font-variant-numeric: tabular-nums; }
.ueb-ov-grade { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.ueb-rawnote { font-size: 11px; color: var(--serious); font-weight: 600; }
.ueb-ov-weights { margin-top: 10px; font-size: 12.5px; color: var(--ink-2); }
.ueb-ov-groups { display: flex; gap: 14px; flex-wrap: wrap; align-items: stretch; }
.ueb-ov-g {
  min-width: 150px; background: var(--sunken); border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm); padding: 12px 16px; border-top: 2px solid var(--accent-bright);
}
.ueb-ov-g .l { font-size: 11.5px; color: var(--ink-3); font-weight: 600; }
.ueb-ov-g .v { font-size: 26px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.ueb-under { font-size: 11px; color: var(--serious); font-weight: 700; margin-top: 2px; }

/* badge xếp loại */
.ueb-grade { display: inline-flex; align-items: center; padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.ueb-grade.xuat-sac { background: var(--good-soft); color: var(--good); box-shadow: inset 0 0 0 1px #BFE4CD; }
.ueb-grade.tot { background: #E1F0EE; color: #0A7C86; box-shadow: inset 0 0 0 1px #B7DEDB; }
.ueb-grade.hoan-thanh { background: var(--warn-soft); color: var(--warn); box-shadow: inset 0 0 0 1px #EBD9A6; }
.ueb-grade.khong { background: var(--seal-soft); color: var(--seal); box-shadow: inset 0 0 0 1px #E6C9CB; }

/* 5 con đếm */
.ueb-counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-top: 16px; }
.ueb-count { text-align: center; padding: 10px 8px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); background: var(--card); }
.ueb-count .v { font-size: 22px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.ueb-count .l { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.ueb-count.ok .v { color: var(--good); }
.ueb-count.late .v { color: var(--serious); }
.ueb-count.eviden .v { color: #C05A00; }
.ueb-count.review .v { color: var(--accent-deep); }

/* note điều kiện chặn */
.ueb-blocks { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.ueb-block { display: flex; gap: 9px; align-items: flex-start; padding: 10px 13px; border-radius: var(--radius-sm); font-size: 12.5px; line-height: 1.5; }
.ueb-block i { font-size: 17px; flex: none; margin-top: 1px; }
.ueb-block.do { background: var(--serious-soft); border-left: 3px solid var(--serious); color: var(--ink); }
.ueb-block.do i { color: var(--serious); }
.ueb-block.cam { background: var(--warn-soft); border-left: 3px solid var(--warn); color: var(--ink); }
.ueb-block.cam i { color: var(--warn); }
.ueb-noblock { margin-top: 14px; display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--good); }
.ueb-noblock i { font-size: 17px; }

/* cấu hình trọng số */
.ueb-cfg-row { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; margin-top: 6px; }
.ueb-cfg-field { display: flex; flex-direction: column; gap: 4px; }
.ueb-cfg-field label { font-size: 11px; font-weight: 700; color: var(--ink-3); }
.ueb-cfg-field input { width: 92px; padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 14px; font-family: inherit; background: var(--card); color: var(--ink); font-variant-numeric: tabular-nums; }
.ueb-range { flex: 1; min-width: 160px; accent-color: var(--accent); align-self: center; }
.ueb-reset { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--accent-deep); border-radius: 999px; font-size: 12px; font-weight: 700; cursor: pointer; }
.ueb-reset:hover { background: #D6EBFB; }

/* bảng nhiều cột — chữ nhỏ hơn 1 nấc, zebra */
.ueb-table-wrap { overflow-x: auto; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); }
.ueb-tbl { width: 100%; border-collapse: collapse; font-size: 12px; min-width: 1000px; }
.ueb-tbl th, .ueb-tbl td { padding: 8px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line-soft); }
.ueb-tbl th { background: var(--sunken); font-size: 10.5px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; position: sticky; top: 0; }
.ueb-tbl th.r, .ueb-tbl td.r { text-align: right; }
.ueb-tbl tbody tr:nth-child(even) { background: var(--paper); }
.ueb-tbl tbody tr:hover { background: var(--accent-soft); }
.ueb-tbl .ueb-code { font-weight: 700; color: var(--accent-deep); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ueb-tbl .ueb-soft { color: var(--ink-2); }
.ueb-tbl .ueb-link { color: var(--ink-2); white-space: nowrap; font-size: 11px; }
.ueb-tbl .ueb-total { font-weight: 800; color: var(--ink); }
.ueb-empty { color: var(--serious); font-style: italic; }
.ueb-zero { color: var(--serious); font-weight: 800; }
.ueb-cap { display: inline-block; font-size: 9.5px; font-weight: 700; color: #C05A00; background: var(--warn-soft); padding: 1px 5px; border-radius: 3px; vertical-align: 1px; cursor: help; }
.ueb-qhnt { display: inline-block; font-size: 9.5px; font-weight: 700; color: var(--serious); background: var(--serious-soft); padding: 1px 6px; border-radius: 3px; vertical-align: 1px; white-space: nowrap; cursor: help; }
.ueb-tt { display: inline-block; font-size: 9.5px; font-weight: 700; color: var(--accent-deep); background: var(--accent-soft); padding: 1px 6px; border-radius: 3px; vertical-align: 1px; }
.ueb-cnt { display: inline-block; font-size: 11px; font-weight: 700; color: var(--ink-3); background: var(--sunken); padding: 1px 8px; border-radius: 999px; margin-left: 4px; }

/* badge trạng thái */
.ueb-st { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 700; white-space: nowrap; }
.ueb-st.ok { background: var(--good-soft); color: var(--good); }
.ueb-st.doing { background: var(--warn-soft); color: var(--warn); }
.ueb-st.late { background: var(--serious-soft); color: var(--serious); }
.ueb-st.eviden { background: #FBEBDB; color: #C05A00; }
.ueb-st.review { background: var(--accent-soft); color: var(--accent-deep); }

/* chú giải thang xếp loại */
.ueb-legend-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ===== MCKN BOARDS (kanban + gantt) ===== */
/* bộ chuyển chế độ Cây · Kanban · Gantt */
.mckn-modes { display: inline-flex; gap: 4px; padding: 4px; background: var(--sunken); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px; }
.mm-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 7px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.mm-btn i { font-size: 15px; }
.mm-btn:hover { color: var(--accent-deep); }
.mm-btn.active { background: var(--card); color: var(--accent-deep); box-shadow: var(--shadow); }
.mckn-board-host { padding: 14px; }

/* ---- Kanban ---- */
.kb-filters { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.kb-flabel { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.kb-sel { border: 1px solid var(--line); background: var(--card); border-radius: 8px; padding: 7px 10px; font-size: 12.5px; color: var(--ink); font-weight: 600; cursor: pointer; max-width: 320px; }
.kb-note { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; color: var(--accent-deep); background: var(--accent-soft); border: 1px solid var(--accent-line); padding: 4px 9px; border-radius: 999px; }
.kb-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; align-items: start; }
.kb-col { background: var(--sunken); border: 1px solid var(--line-soft); border-radius: 10px; min-height: 120px; display: flex; flex-direction: column; transition: background .12s, border-color .12s; }
.kb-col.kb-over { background: var(--accent-soft); border-color: var(--accent-line); }
.kb-col-head { display: flex; align-items: center; gap: 7px; padding: 10px 12px; font-size: 12px; font-weight: 800; color: var(--ink); border-bottom: 1px solid var(--line-soft); }
.kb-col-head b { margin-left: auto; font-size: 12px; color: var(--ink-3); background: var(--card); border: 1px solid var(--line-soft); padding: 0 8px; border-radius: 999px; }
.kb-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.kb-dot.ns { background: var(--ink-3); } .kb-dot.ip { background: var(--c1); } .kb-dot.lt { background: var(--serious); } .kb-dot.dn { background: var(--good); }
.kb-col-body { display: flex; flex-direction: column; gap: 8px; padding: 10px; min-height: 60px; }
.kb-empty { font-size: 11.5px; color: var(--ink-3); text-align: center; padding: 14px 0; font-style: italic; }
.kb-card { background: var(--card); border: 1px solid var(--line-soft); border-radius: 9px; padding: 10px 11px; cursor: pointer; box-shadow: var(--shadow); }
.kb-card:hover { border-color: var(--accent-line); box-shadow: var(--shadow-lift); }
.kb-card.dragging { opacity: .45; }
.kb-card-top { display: flex; align-items: center; gap: 8px; }
.kb-badges { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; }
.kb-prio { width: 9px; height: 9px; border-radius: 50%; background: var(--serious); box-shadow: 0 0 0 3px var(--serious-soft); }
.kb-od { font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; color: var(--serious); background: var(--serious-soft); padding: 1px 6px; border-radius: 4px; }
.kb-card-name { font-size: 12.5px; font-weight: 600; color: var(--ink); line-height: 1.35; margin: 7px 0 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kb-card-owner { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--ink-2); margin-bottom: 8px; }
.kb-card-owner i { font-size: 13px; color: var(--c1); flex: none; }
.kb-card-prog { display: flex; align-items: center; gap: 7px; }
.kb-card-prog b { font-size: 11px; font-variant-numeric: tabular-nums; min-width: 30px; text-align: right; }
.kb-bar { flex: 1; height: 6px; border-radius: 4px; background: var(--sunken); overflow: hidden; }
.kb-bar-fill { display: block; height: 100%; border-radius: 4px; }
.kb-foot { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--ink-3); font-style: italic; margin-top: 12px; }
.kb-foot i { font-size: 14px; font-style: normal; }
@media (max-width: 1080px) { .kb-board { grid-template-columns: repeat(2, 1fr); } }

/* ---- Gantt ---- */
.gt-filters { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.gt-legend { display: inline-flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-2); }
.gt-legend > span { display: inline-flex; align-items: center; gap: 5px; }
.gt-lg { width: 11px; height: 8px; border-radius: 2px; display: inline-block; }
.gt-lg-today i { display: inline-block; width: 2px; height: 13px; background: var(--seal); vertical-align: -2px; }
.gt-wrap { overflow-x: auto; border: 1px solid var(--line-soft); border-radius: 10px; }
.gt-inner { min-width: 940px; }
.gt-row { display: grid; grid-template-columns: 320px 1fr; align-items: stretch; }
.gt-left { position: sticky; left: 0; z-index: 2; background: var(--card); border-right: 1px solid var(--line); padding: 8px 12px; min-width: 0; }
.gt-track { position: relative; min-height: 34px; background-image: repeating-linear-gradient(to right, transparent 0, transparent calc(12.5% - 1px), var(--line-soft) calc(12.5% - 1px), var(--line-soft) 12.5%); }
.gt-head { position: sticky; top: 0; z-index: 3; }
.gt-head .gt-left, .gt-head .gt-track { background: var(--sunken); font-size: 11px; font-weight: 800; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--line); }
.gt-head-left { display: flex; align-items: center; }
.gt-months { display: grid; grid-template-columns: repeat(8, 1fr); }
.gt-mcell { display: flex; align-items: center; justify-content: center; border-left: 1px solid var(--line-soft); }
.gt-mcell:first-child { border-left: none; }
.gt-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--seal); z-index: 1; pointer-events: none; }
.gt-group { border-bottom: 1px solid var(--line-soft); }
.gt-grouprow .gt-left { background: var(--accent-soft); }
.gt-grouprow .gt-track { background-color: color-mix(in srgb, var(--accent-soft) 55%, transparent); }
.gt-left-k { display: flex; align-items: center; gap: 8px; }
.gt-kname { font-size: 12px; font-weight: 800; color: var(--accent-deep); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gt-kcount { margin-left: auto; font-size: 10.5px; font-weight: 700; color: var(--ink-3); flex: none; }
.gt-groupbar { position: absolute; top: 50%; transform: translateY(-50%); height: 6px; border-radius: 3px; background: repeating-linear-gradient(45deg, var(--accent-line), var(--accent-line) 4px, transparent 4px, transparent 8px); border: 1px solid var(--accent-line); z-index: 1; }
.gt-row[data-id] { cursor: pointer; }
.gt-row[data-id]:hover .gt-left { background: var(--sunken); }
.gt-row[data-id]:hover .gt-track { background-color: rgba(4,106,191,.04); }
.gt-left-n { display: flex; flex-direction: column; gap: 2px; justify-content: center; }
.gt-nline { display: flex; align-items: center; gap: 7px; min-width: 0; }
.gt-nname { font-size: 12px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gt-nsub { font-size: 10.5px; color: var(--ink-3); padding-left: 31px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gt-odtag { color: var(--serious); font-weight: 800; }
.gt-bar { position: absolute; top: 50%; transform: translateY(-50%); height: 14px; border-radius: 5px; background: var(--bar); z-index: 1; overflow: hidden; box-shadow: var(--shadow); }
.gt-bar-fill { display: block; height: 100%; background: rgba(0,0,0,.28); border-radius: 5px 0 0 5px; }
.gt-bar.od { outline: 1.5px solid var(--serious); outline-offset: 0; }
.gt-slip { position: absolute; top: 50%; transform: translateY(-50%); height: 8px; border-radius: 3px; z-index: 0; background: repeating-linear-gradient(45deg, var(--serious-soft), var(--serious-soft) 3px, transparent 3px, transparent 6px); border: 1px dashed var(--serious); }

/* ---- nav 8+1: separator + mục Giới thiệu & phạm vi (tinh gọn 13→9, 07/2026) ---- */
.nav-sep{height:1px;background:rgba(255,255,255,.12);margin:8px 6px}
.nav-item.nav-intro{color:#9db6d0;font-size:12.5px}
.nav-item.nav-intro.active{color:#fff}
