/* ==========================================================
   Hệ thống Chuẩn hóa Vận hành — design tokens
   Một màu chủ đạo (xanh), nền trung tính, chữ đậm màu để dễ đọc.
   ========================================================== */
:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #eef2f6;
  --text: #0b1324;          /* tiêu đề & nội dung chính */
  --text-2: #344054;        /* nội dung phụ, nhãn */
  --muted: #5d6779;         /* chú thích */
  --border: #e2e7ee;
  --border-strong: #cfd6e0;
  --primary: #1f5bd8;
  --primary-hover: #1847b0;
  --primary-ink: #ffffff;
  --primary-soft: #ecf2ff;
  --primary-line: #c7d7fb;
  --navy: #0d1b36;
  --good: #067647; --good-soft: #e9f7ef;
  --warn: #b54708; --warn-soft: #fff6ea;
  --bad: #c4231c; --bad-soft: #fdeeed;
  --info: #0b6aa2; --info-soft: #e8f4fb;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .12);
  --radius: 12px;
  --radius-sm: 8px;
  --c-LOG: #2563eb; --c-ECM: #7c3aed; --c-FNB: #c2410c; --c-FAC: #0f766e; --c-MFG: #be185d; --c-ADM: #15803d;
  --c-COS: #a16207; --c-HRM: #be123c; --c-ACC: #0e7490; --c-REC: #7e22ce; --c-POL: #4338ca; --c-OTH: #64748b;
  --ev-busy: #475467; --ev-meeting: #1f5bd8; --ev-leave: #b54708; --ev-focus: #067647;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1120; --surface: #111a2e; --surface-2: #142036; --surface-3: #1a2740; --text: #eef2f8; --text-2: #c9d2e0; --muted: #9aa6ba;
    --border: #233149; --border-strong: #2e3e5b; --primary: #6c9cff; --primary-hover: #8ab0ff; --primary-ink: #08101f; --primary-soft: #182a4d; --primary-line: #29406d;
    --navy: #070e1e; --good: #4ade80; --good-soft: #0f2a1d; --warn: #fbbf24; --warn-soft: #2b2110; --bad: #f87171; --bad-soft: #2d1515; --info: #38bdf8; --info-soft: #0e2434;
    --shadow-sm: none; --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 12px 32px rgba(0,0,0,.5);
    --c-LOG: #60a5fa; --c-ECM: #a78bfa; --c-FNB: #fb923c; --c-FAC: #2dd4bf; --c-MFG: #f472b6; --c-ADM: #4ade80;
    --c-COS: #facc15; --c-HRM: #fb7185; --c-ACC: #22d3ee; --c-REC: #c084fc; --c-POL: #818cf8; --c-OTH: #94a3b8;
    --ev-busy: #94a3b8; --ev-meeting: #6c9cff; --ev-leave: #fbbf24; --ev-focus: #4ade80;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1120; --surface: #111a2e; --surface-2: #142036; --surface-3: #1a2740; --text: #eef2f8; --text-2: #c9d2e0; --muted: #9aa6ba;
  --border: #233149; --border-strong: #2e3e5b; --primary: #6c9cff; --primary-hover: #8ab0ff; --primary-ink: #08101f; --primary-soft: #182a4d; --primary-line: #29406d;
  --navy: #070e1e; --good: #4ade80; --good-soft: #0f2a1d; --warn: #fbbf24; --warn-soft: #2b2110; --bad: #f87171; --bad-soft: #2d1515; --info: #38bdf8; --info-soft: #0e2434;
  --shadow-sm: none; --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 12px 32px rgba(0,0,0,.5);
  --c-LOG: #60a5fa; --c-ECM: #a78bfa; --c-FNB: #fb923c; --c-FAC: #2dd4bf; --c-MFG: #f472b6; --c-ADM: #4ade80;
  --c-COS: #facc15; --c-HRM: #fb7185; --c-ACC: #22d3ee; --c-REC: #c084fc; --c-POL: #818cf8; --c-OTH: #94a3b8;
  --ev-busy: #94a3b8; --ev-meeting: #6c9cff; --ev-leave: #fbbf24; --ev-focus: #4ade80;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14.5px; line-height: 1.55; font-feature-settings: "cv11", "ss01"; text-rendering: optimizeLegibility;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
b, strong { font-weight: 600; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Type scale: rõ đâu là tiêu đề, đâu là nội dung ---------- */
h1 { font-size: 26px; line-height: 1.25; font-weight: 700; letter-spacing: -.02em; margin: 0 0 6px; color: var(--text); }
h2 { font-size: 18px; line-height: 1.35; font-weight: 650; letter-spacing: -.01em; margin: 32px 0 12px; color: var(--text); }
h3 { font-size: 15px; line-height: 1.4; font-weight: 650; margin: 20px 0 8px; color: var(--text); }
p { margin: 0 0 12px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--primary); margin-bottom: 6px; }
.lead { color: var(--text-2); font-size: 14.5px; margin: 0; max-width: 760px; }
.muted { color: var(--muted); }
.hint { font-size: 12.5px; color: var(--muted); }
.mono, .code-tag { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; white-space: nowrap; }
.code-tag { font-weight: 600; color: var(--text); }
.num-tab { font-variant-numeric: tabular-nums; }

.logo { width: 36px; height: 36px; border-radius: 9px; flex-shrink: 0; display: grid; place-items: center; color: #fff; background: var(--primary); }
.logo svg { width: 20px; height: 20px; }

/* ---------- Đăng nhập: trái giới thiệu (gradient), phải form ---------- */
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot-dot { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--primary-line); border-top-color: var(--primary); animation: spin .8s linear infinite; }
.logo-svg { flex-shrink: 0; display: block; filter: drop-shadow(0 4px 10px rgba(37, 99, 235, .35)); }
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr minmax(460px, 1fr); }
.auth-side {
  position: relative; overflow: hidden; color: #fff; display: flex; align-items: center; padding: 56px 64px;
  background: linear-gradient(150deg, #1e3a8a 0%, #2445b8 55%, #2563eb 100%);
}
.auth-side::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.09) 1px, transparent 1px); background-size: 24px 24px; pointer-events: none; }
.side-inner { position: relative; max-width: 580px; }
/* Thứ bậc: logo + tên hệ thống là chủ đạo, khẩu hiệu là dòng phụ */
.side-brand-big { display: flex; align-items: center; gap: 22px; margin-bottom: 26px; }
.side-brand-big .logo-svg { filter: drop-shadow(0 10px 24px rgba(0,0,0,.28)); }
.brand-name { font-size: 40px; line-height: 1.12; letter-spacing: -.025em; font-weight: 800; color: #fff; margin: 0 0 6px; }
.brand-sub { display: block; font-size: 16px; color: #c7d7fe; }
.auth-side .slogan { font-size: 21px; line-height: 1.35; font-weight: 600; color: #fff; margin: 0 0 6px; }
.auth-side .slogan .hl { color: #fde68a; }
.auth-side p { color: #dbe6ff; font-size: 15.5px; margin: 0 0 28px; }
.feats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.feat { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); backdrop-filter: blur(6px); transition: background .15s, transform .15s; }
.feat:hover { background: rgba(255,255,255,.16); transform: translateY(-2px); }
.feat .fi { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; background: var(--tone); color: #0b1324; box-shadow: 0 6px 14px rgba(0,0,0,.18); }
.feat .fi svg { width: 20px; height: 20px; }
.feat b { display: block; font-size: 14.5px; color: #fff; }
.feat span { font-size: 12.5px; color: #cfdcfb; }
.side-stats { display: flex; gap: 32px; margin-top: 30px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.2); }
.side-stats b { display: block; font-size: 26px; color: #fff; line-height: 1.1; }
.side-stats span { font-size: 12.5px; color: #c7d7fe; }
.auth-form { display: flex; flex-direction: column; padding: 28px 48px; background: linear-gradient(180deg, #f6f8fd 0%, #eef2fa 100%); }
.auth-top { display: flex; align-items: center; gap: 12px; }
.auth-top b { display: block; font-size: 15px; color: var(--text); }
.auth-top small { display: block; font-size: 12.5px; color: var(--muted); }
.auth-panel { margin: auto; width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: 0 20px 50px rgba(30, 58, 138, .12); padding: 36px 36px 30px; }
.auth-card { width: 100%; }
.auth-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: #1d4ed8; background: #e7efff; padding: 5px 11px; border-radius: 999px; margin-bottom: 14px; }
.auth-badge svg { width: 14px; height: 14px; }
.auth-card h1 { font-size: 28px; margin-bottom: 6px; }
.auth-card .lead { margin-bottom: 24px; }
.auth-card .field input { height: 46px; font-size: 15px; }
.auth-card .btn.primary { width: 100%; justify-content: center; height: 46px; font-size: 15px; margin-top: 8px; }
.auth-foot { font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; align-items: center; justify-content: center; }
.auth-foot svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--good); }
.in-ic { position: relative; }
.in-ic > svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.in-ic input { width: 100%; padding-left: 40px !important; }
.in-ic:focus-within > svg { color: var(--primary); }
.pw-wrap { position: relative; }
.pw-wrap input { width: 100%; padding-right: 64px !important; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--text-2); cursor: pointer; font: inherit; font-size: 13px; font-weight: 500; padding: 4px 8px; border-radius: 6px; }
.pw-toggle:hover { background: var(--surface-3); }
.form-error { background: var(--bad-soft); color: var(--bad); border: 1px solid color-mix(in srgb, var(--bad) 25%, transparent); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13.5px; margin-bottom: 14px; }
.form-info { background: var(--info-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--info) 25%, transparent); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13.5px; margin-bottom: 14px; }

/* ---------- Khung ứng dụng ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 256px; flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 16px 12px 12px; }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; color: var(--text); text-decoration: none !important; }
.side-brand b { display: block; font-size: 14.5px; line-height: 1.25; }
.side-brand small { display: block; font-size: 12px; color: var(--muted); }
.sidebar nav { display: flex; flex-direction: column; gap: 1px; }
.nav-label { font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 16px 10px 6px; }
.sidebar nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--text-2); font-size: 14px; font-weight: 500; text-decoration: none; transition: background .12s, color .12s; }
.sidebar nav a svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--muted); }
.sidebar nav a:hover { background: var(--surface-3); color: var(--text); }
.sidebar nav a.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.sidebar nav a.active svg { color: var(--primary); }
.nav-count { margin-left: auto; font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--bad); color: #fff; }
.user-card { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface-2); }
.user-card .who { min-width: 0; flex: 1; }
.user-card .who b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-card .who span { font-size: 12px; color: var(--muted); }
.icon-btn { background: none; border: 0; color: var(--text-2); cursor: pointer; padding: 6px; border-radius: 6px; display: grid; place-items: center; }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 12px; color: #fff; flex-shrink: 0; background: var(--a1, #1f5bd8); text-decoration: none !important; }
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }
.avatar.lg { width: 52px; height: 52px; font-size: 17px; }
.faces { display: inline-flex; }
.faces .avatar { border: 2px solid var(--surface); margin-left: -6px; }
.faces .avatar:first-child { margin-left: 0; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 28px; background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar .crumb { font-weight: 600; font-size: 15px; color: var(--text); }
.topbar .spacer { flex: 1; }
.menu-btn { display: none; }
.idle-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); padding: 4px 10px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.idle-chip svg { width: 14px; height: 14px; }
.idle-chip.soon { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, var(--border)); background: var(--warn-soft); }
.role-pill { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); }
.content { padding: 28px 28px 72px; }
.page { max-width: 1240px; margin: 0 auto; }
.scrim { position: fixed; inset: 0; background: rgba(11, 19, 36, .45); z-index: 30; display: none; }
.scrim.open { display: block; }

.page-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.page-head > div:first-child { min-width: 0; flex: 1 1 420px; }
.note { display: flex; gap: 12px; align-items: flex-start; background: var(--primary-soft); border: 1px solid var(--primary-line); padding: 12px 14px; border-radius: var(--radius-sm); margin: 16px 0; font-size: 14px; color: var(--text); }
.note::before { content: "i"; flex-shrink: 0; width: 18px; height: 18px; border-radius: 50%; background: var(--primary); color: var(--primary-ink); font: 700 11px/18px Georgia, serif; text-align: center; margin-top: 2px; }

/* ---------- Thẻ, chỉ số ---------- */
.card-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); min-width: 0; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.card-head h3 { margin: 0; font-size: 15px; }
.card-head .sub { font-size: 12.5px; color: var(--muted); }
.card-head .spacer { flex: 1; }
.card-body { padding: 16px 18px; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 2px; text-decoration: none !important; color: inherit; }
a.tile:hover { border-color: var(--primary-line); box-shadow: var(--shadow); }
.tile .tl { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--text-2); }
.tile .tl svg { width: 16px; height: 16px; color: var(--tone, var(--primary)); }
.tile b { font-size: 28px; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--text); margin-top: 6px; }
.tile .ts { font-size: 12.5px; color: var(--muted); }
.tile.alert b { color: var(--bad); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.grid-2.wide-left { grid-template-columns: 1.4fr 1fr; }

.welcome { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.welcome h1 { font-size: 26px; }
.welcome .lead { color: var(--muted); }

.pipeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.pipe { padding: 12px 10px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); text-align: center; }
.pipe b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.pipe span { font-size: 12.5px; color: var(--text-2); }
.pipe.on { background: var(--good-soft); border-color: color-mix(in srgb, var(--good) 30%, var(--border)); }
.pipe.on b { color: var(--good); }

.bars { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 140px 1fr 32px; align-items: center; gap: 12px; font-size: 13.5px; color: var(--text-2); text-decoration: none !important; padding: 2px 0; border-radius: 6px; }
.bar-row:hover { color: var(--text); }
.bar-row .lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 10px; border-radius: 0 4px 4px 0; background: var(--surface-3); }
.bar-fill { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--primary); transition: width .6s ease-out; min-width: 2px; }
.bar-row:hover .bar-fill { background: var(--primary-hover); }
.bar-row .val { text-align: right; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }

.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); color: inherit; text-decoration: none !important; }
.list-item:last-child { border-bottom: 0; }
a.list-item:hover b { color: var(--primary); }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .grow b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.list-item .grow span { font-size: 12.5px; color: var(--muted); }
.time-pill { font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text); background: var(--surface-3); padding: 4px 8px; border-radius: 6px; white-space: nowrap; }
.empty { text-align: center; padding: 28px 12px; color: var(--muted); font-size: 14px; }
.empty b { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }

/* ---------- Lĩnh vực ---------- */
.dom-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-bottom: 16px; }
.dom-tile { cursor: pointer; text-align: left; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow-sm); transition: border-color .12s, background .12s; display: flex; gap: 10px; align-items: flex-start; }
.dom-tile:hover { border-color: var(--border-strong); }
.dom-tile .sw { width: 10px; height: 10px; border-radius: 3px; background: var(--tone); margin-top: 5px; flex-shrink: 0; }
.dom-tile.on { border-color: var(--tone); background: color-mix(in srgb, var(--tone) 7%, var(--surface)); box-shadow: 0 0 0 1px var(--tone); }
.dom-tile b { display: block; font-size: 13.5px; line-height: 1.35; }
.dom-tile span { font-size: 12.5px; color: var(--muted); }

/* ---------- Nhãn trạng thái ---------- */
.dom { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; color: var(--tone); background: color-mix(in srgb, var(--tone) 10%, transparent); white-space: nowrap; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-draft { background: var(--surface-3); color: var(--text-2); }
.st-pilot { background: var(--info-soft); color: var(--info); }
.st-review { background: var(--warn-soft); color: var(--warn); }
.st-active { background: var(--good-soft); color: var(--good); }
.st-retired { background: var(--bad-soft); color: var(--bad); }
.prio { font-size: 12px; font-weight: 600; white-space: nowrap; }
.prio.hi { color: var(--bad); } .prio.mid { color: var(--warn); } .prio.lo { color: var(--muted); }
.overdue { color: var(--bad); font-weight: 600; }

/* ---------- Bảng ---------- */
.table-wrap { overflow-x: auto; margin: 12px 0 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { padding: 11px 14px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
td { color: var(--text); }
th { background: var(--surface-2); font-size: 12px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--text-2); white-space: nowrap; }
tbody tr:hover td { background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }
td.center, th.center { text-align: center; }
td.actions { white-space: nowrap; text-align: right; }
td .sub { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* ---------- Điều khiển ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0; }
input[type=search], input[type=text], input[type=password], input[type=date], input[type=time], input[type=number], textarea, select {
  font: inherit; font-size: 14px; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 8px 11px; min-height: 38px; transition: border-color .12s, box-shadow .12s; }
input::placeholder, textarea::placeholder { color: #8a94a6; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
input:disabled, textarea:disabled, select:disabled { background: var(--surface-2); color: var(--text-2); cursor: not-allowed; }
input[type=range] { width: 100%; accent-color: var(--primary); }
.search { position: relative; flex: 1; min-width: 200px; }
.search input { width: 100%; padding-left: 36px; }
.search::before { content: ""; position: absolute; left: 12px; top: 50%; width: 15px; height: 15px; transform: translateY(-50%); background: var(--muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E") center/contain no-repeat; }
.btn { display: inline-flex; align-items: center; gap: 7px; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; text-decoration: none !important; white-space: nowrap;
  min-height: 38px; padding: 7px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); transition: background .12s, border-color .12s; }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn:hover { background: var(--surface-2); border-color: #b7c1cf; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); font-weight: 600; }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.good { background: var(--good); border-color: var(--good); color: #fff; font-weight: 600; }
.btn.lg { min-height: 44px; padding: 10px 18px; font-size: 15px; }
.btn.small { min-height: 30px; padding: 4px 10px; font-size: 13px; border-radius: 6px; }
.btn.icon { padding: 4px 8px; }
.btn.danger { color: var(--bad); }
.btn.danger:hover { border-color: var(--bad); background: var(--bad-soft); }
.btn.ghost { background: none; border-color: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--surface-3); }
.btn-group { display: flex; flex-wrap: wrap; gap: 8px; }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn { font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); transition: all .12s; display: inline-flex; align-items: center; gap: 6px; }
.chip-btn:hover { border-color: var(--primary); color: var(--text); }
.chip-btn.on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); font-weight: 600; }
.chip-btn .avatar { width: 20px; height: 20px; font-size: 9px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tab { font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; padding: 10px 14px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; color: var(--text-2); white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.tab .cnt { font-size: 12px; color: var(--muted); font-weight: 500; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 600; color: var(--text); }
.field label .req { color: var(--bad); }
.field textarea { min-height: 72px; resize: vertical; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--primary); }
.strength { height: 4px; border-radius: 999px; background: var(--border); overflow: hidden; }
.strength > div { height: 100%; transition: width .2s, background .2s; }
.switch { position: relative; width: 36px; height: 20px; border-radius: 999px; background: var(--border-strong); border: 0; cursor: pointer; transition: background .15s; flex-shrink: 0; }
.switch::after { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.switch.on { background: var(--good); }
.switch.on::after { transform: translateX(16px); }
.switch:disabled { opacity: .5; cursor: not-allowed; }
.progress-cell { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.pbar { flex: 1; height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.pbar i { display: block; height: 100%; border-radius: 999px; background: var(--primary); }
.pbar.done i { background: var(--good); }
.pbar.late i { background: var(--bad); }
.progress-cell span { font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; width: 36px; text-align: right; }

/* ---------- Modal & thông báo ---------- */
.modal-back { position: fixed; inset: 0; z-index: 60; background: rgba(11, 19, 36, .5); display: grid; place-items: center; padding: 16px; animation: fade .15s both; }
.modal { width: 100%; max-width: 500px; max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 24px; animation: fade .2s both; }
.modal.wide { max-width: 780px; }
.modal h3 { margin: 0 0 4px; font-size: 18px; }
.modal > p.muted, .modal .muted.lead-s { margin-bottom: 16px; }
.modal .foot { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.secret { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 10px 12px; font: 600 15px ui-monospace, Menlo, monospace; }
.secret span { flex: 1; }
.countdown { font-size: 44px; font-weight: 700; text-align: center; color: var(--warn); font-variant-numeric: tabular-nums; margin: 4px 0; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0; }
.compare > div { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; background: var(--surface-2); }
.compare small { display: block; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 4px; }
.compare p { margin: 0; white-space: pre-wrap; font-size: 14px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 16px 22px; font-size: 13.5px; }
.timeline li::before { content: ""; position: absolute; left: 5px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.timeline li::after { content: ""; position: absolute; left: 8px; top: 18px; bottom: 0; width: 2px; background: var(--border); }
.timeline li:last-child::after { display: none; }
.timeline .when { font-size: 12px; color: var(--muted); }
#toasts { position: fixed; right: 20px; bottom: 20px; z-index: 80; display: flex; flex-direction: column; gap: 8px; }
.toast { display: flex; align-items: center; gap: 10px; min-width: 240px; max-width: 400px; padding: 11px 14px; border-radius: 10px; background: #101828; color: #fff; box-shadow: var(--shadow-lg); font-size: 14px; animation: fade .2s both; }
.toast.ok::before { content: "✓"; color: #4ade80; font-weight: 700; }
.toast.bad::before { content: "!"; width: 18px; height: 18px; border-radius: 50%; background: #ef4444; display: grid; place-items: center; font-weight: 700; font-size: 11px; flex-shrink: 0; }

/* ---------- Quy chế ---------- */
.lifecycle { display: grid; grid-template-columns: repeat(5, 1fr); margin: 0 0 8px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 12px 18px; box-shadow: var(--shadow-sm); }
.stage { position: relative; text-align: center; padding: 0 8px; }
.stage::before { content: ""; position: absolute; top: 16px; left: -50%; width: 100%; height: 2px; background: var(--border-strong); }
.stage:first-child::before { display: none; }
.stage .dot { position: relative; z-index: 1; width: 34px; height: 34px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--border-strong); font-weight: 700; color: var(--text-2); font-size: 13.5px; }
.stage b { display: block; font-size: 14px; }
.stage span { display: block; font-size: 12.5px; color: var(--muted); }
.stage.on .dot { background: var(--primary); border-color: var(--primary); color: #fff; }
.stage.on b { color: var(--primary); }
.rules { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.rule { display: flex; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); font-size: 14px; }
.rule .ok { flex-shrink: 0; width: 26px; height: 26px; border-radius: 7px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.rule b { display: block; font-size: 14px; margin-bottom: 2px; }
.rule span { color: var(--text-2); }

/* ---------- Soạn SOP ---------- */
.builder { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.editor { overflow: hidden; }
.part { padding: 16px 20px; border-bottom: 1px solid var(--border); }
.part:last-child { border-bottom: 0; }
.part-title { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; margin: 0 0 14px; cursor: pointer; list-style: none; color: var(--text); }
.part-title::-webkit-details-marker { display: none; }
.part-title::after { content: "▾"; margin-left: auto; color: var(--muted); transition: transform .15s; }
details:not([open]) > .part-title { margin-bottom: 0; }
details:not([open]) > .part-title::after { transform: rotate(-90deg); }
.num { min-width: 26px; height: 26px; padding: 0 6px; border-radius: 7px; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--primary-soft); color: var(--primary); flex-shrink: 0; }
.editor-table { font-size: 13px; }
.editor-table th, .editor-table td { padding: 6px; }
.editor-table th { text-transform: none; letter-spacing: 0; font-size: 12.5px; }
.editor-table input, .editor-table select, .editor-table textarea { width: 100%; padding: 6px 8px; font-size: 13px; min-height: 32px; min-width: 90px; }
.editor-table textarea { min-height: 36px; resize: vertical; min-width: 180px; }
.panel .table-wrap { box-shadow: none; margin: 0 0 10px; }
.preview { position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow: auto; }
.preview-bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 11px 18px; background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: 13px; font-weight: 600; color: var(--text-2); }
.paper { padding: 24px 26px; }
.paper h1 { font-size: 21px; }
.paper h2 { font-size: 16px; margin-top: 24px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.paper h3 { font-size: 14px; }
.paper .table-wrap { box-shadow: none; border-radius: 8px; }
.paper th, .paper td { padding: 7px 10px; font-size: 13px; }
.issues { margin: 14px 18px 0; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 13.5px; }
.issues.ok { background: var(--good-soft); color: var(--good); }
.issues.warn { background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 25%, transparent); color: var(--text); }
.issues.warn b { color: var(--warn); }
.issues ul { margin: 6px 0 0; padding-left: 18px; }
.progress { height: 6px; border-radius: 999px; background: var(--border); overflow: hidden; margin-top: 8px; }
.progress > div { height: 100%; background: var(--primary); border-radius: 999px; transition: width .3s; }
.meta-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 14px 20px; background: var(--surface-2); border-bottom: 1px solid var(--border); }

/* ---------- Phiếu ---------- */
.form-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.form-card { cursor: pointer; text-align: left; font: inherit; color: var(--text); display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-sm); transition: border-color .12s; }
.form-card:hover { border-color: var(--border-strong); }
.form-card.on { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.form-card .fi { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--tone) 12%, transparent); color: var(--tone); flex-shrink: 0; }
.form-card .fi svg { width: 19px; height: 19px; }
.form-card b { display: block; font-size: 14px; }
.form-card span span { font-size: 12.5px; color: var(--muted); }
.form-body { padding: 22px; }
.box { display: inline-block; width: 14px; height: 14px; border: 1.5px solid var(--text); border-radius: 3px; vertical-align: -2px; }
.sign { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 20px; font-size: 13.5px; color: var(--muted); }
.sign div { flex: 1 1 200px; border-top: 1px dashed var(--border-strong); padding-top: 8px; text-align: center; min-height: 70px; }
.print-only { display: none; }

/* ---------- Công việc: Kanban ---------- */
.kanban { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.kcol { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; min-height: 160px; }
.kcol-head { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text); padding: 2px 4px 10px; }
.kcol-head .cnt { margin-left: auto; font-size: 12px; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 0 8px; }
.kcard { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin-bottom: 8px; box-shadow: var(--shadow-sm); cursor: pointer; transition: border-color .12s; }
.kcard:hover { border-color: var(--primary-line); }
.kcard b { display: block; font-size: 13.5px; line-height: 1.4; margin-bottom: 8px; }
.kcard .kmeta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.kcard .kmeta .grow { flex: 1; }

/* ---------- Lịch ---------- */
.cal-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.cal-toolbar .range { font-size: 15px; font-weight: 600; margin: 0 6px; min-width: 210px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--text-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.week { display: grid; grid-template-columns: 52px repeat(7, minmax(110px, 1fr)); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: auto; box-shadow: var(--shadow-sm); }
.week-head { position: sticky; top: 0; z-index: 3; background: var(--surface); border-bottom: 1px solid var(--border); padding: 8px 6px; text-align: center; font-size: 12.5px; color: var(--text-2); }
.week-head b { display: block; font-size: 18px; color: var(--text); line-height: 1.2; }
.week-head.today b { color: #fff; background: var(--primary); border-radius: 50%; width: 32px; height: 32px; line-height: 32px; margin: 2px auto 0; font-size: 15px; }
.week-head.gutter { border-right: 1px solid var(--border); }
.hours { position: relative; border-right: 1px solid var(--border); }
.hours div { height: 48px; font-size: 11.5px; color: var(--muted); text-align: right; padding-right: 6px; transform: translateY(-7px); }
.day-col { position: relative; border-right: 1px solid var(--border); cursor: crosshair; background-image: linear-gradient(var(--border) 1px, transparent 1px); background-size: 100% 48px; }
.day-col:last-child { border-right: 0; }
.day-col.weekend { background-color: var(--surface-2); }
.ev { position: absolute; left: 3px; right: 3px; border-radius: 6px; padding: 3px 6px; font-size: 12px; line-height: 1.3; overflow: hidden; cursor: pointer; color: var(--text); border-left: 3px solid var(--evc); background: color-mix(in srgb, var(--evc) 13%, var(--surface)); }
.ev:hover { background: color-mix(in srgb, var(--evc) 22%, var(--surface)); }
.ev b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev span { color: var(--text-2); font-size: 11.5px; }
.now-line { position: absolute; left: 0; right: 0; height: 2px; background: var(--bad); z-index: 2; pointer-events: none; }
.now-line::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }

.team { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow-x: auto; }
.team-grid { min-width: 760px; }
.team-row { display: grid; grid-template-columns: 210px 1fr 190px; align-items: center; border-bottom: 1px solid var(--border); }
.team-row:last-child { border-bottom: 0; }
.team-row.head { background: var(--surface-2); font-size: 12px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .03em; }
.team-row > div { padding: 10px 14px; }
.team-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.team-who b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-who span { font-size: 12px; color: var(--muted); }
.track { position: relative; height: 26px; border-radius: 6px; background: color-mix(in srgb, var(--good) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--good) 22%, var(--border)); }
.track .blk { position: absolute; top: 2px; bottom: 2px; border-radius: 4px; background: var(--evc); opacity: .85; }
.track .tnow { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--bad); }
.ticks { position: relative; height: 18px; font-size: 11px; color: var(--muted); }
.ticks span { position: absolute; transform: translateX(-50%); }
.free-txt { font-size: 12.5px; color: var(--text-2); }
.free-txt b { color: var(--good); }
.free-now { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.free-now.yes { background: var(--good-soft); color: var(--good); }
.free-now.no { background: var(--surface-3); color: var(--text-2); }

.finder { display: grid; grid-template-columns: 320px 1fr; gap: 16px; align-items: start; }
.heat { display: grid; gap: 2px; font-size: 11.5px; }
.heat-row { display: grid; grid-template-columns: 76px repeat(var(--n), 1fr); gap: 2px; align-items: center; }
.heat-row .dl { font-size: 12.5px; font-weight: 600; color: var(--text); }
.heat-row .hl { color: var(--muted); text-align: left; white-space: nowrap; overflow: visible; }
.hc { height: 26px; border-radius: 3px; background: color-mix(in srgb, var(--primary) var(--p), var(--surface-3)); cursor: pointer; border: 1px solid transparent; }
.hc:hover { border-color: var(--text); }
.hc.off { background: repeating-linear-gradient(135deg, var(--surface-2) 0 4px, var(--surface-3) 4px 8px); cursor: default; }
.hc.pick { outline: 2px solid var(--text); outline-offset: 1px; }
.heat-legend { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-2); margin-top: 10px; }
.heat-legend .ramp { width: 140px; height: 10px; border-radius: 3px; background: linear-gradient(90deg, var(--surface-3), var(--primary)); }
.suggest { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin-bottom: 10px; }
.suggest.best { border-color: var(--good); box-shadow: 0 0 0 1px var(--good); }
.suggest .when b { display: block; font-size: 15px; }
.suggest .when span { font-size: 12.5px; color: var(--text-2); }
.suggest .grow { flex: 1; min-width: 0; font-size: 13px; color: var(--text-2); }
.badge-best { font-size: 11.5px; font-weight: 600; color: var(--good); background: var(--good-soft); padding: 2px 8px; border-radius: 999px; margin-left: 6px; }

/* ==========================================================
   Lớp màu sắc: nền có sắc xanh, menu xanh đậm, icon màu theo trang
   ========================================================== */
body {
  background: linear-gradient(180deg, #e9effa 0px, #f3f6fb 320px) fixed, #f3f6fb;
}
:root[data-theme="dark"] body { background: var(--bg); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body { background: var(--bg); } }

/* Menu trái: xanh đậm, mỗi mục một icon màu */
.sidebar {
  background: linear-gradient(180deg, #13296b 0%, #102257 100%);
  border-right: 0; color: #c9d5f5;
}
.side-brand { color: #fff; }
.side-brand small { color: #9fb2e6; }
.nav-label { color: #8094cc; }
.sidebar nav a { color: #d3dcf5; padding: 7px 10px; }
.sidebar nav a .ni { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; background: color-mix(in srgb, var(--tone) 20%, transparent); color: var(--tone); transition: all .15s; }
.sidebar nav a .ni svg { width: 16px; height: 16px; color: inherit; }
.sidebar nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.sidebar nav a.active { background: rgba(255,255,255,.12); color: #fff; box-shadow: inset 3px 0 0 #60a5fa; }
.sidebar nav a.active .ni { background: var(--tone); color: #fff; box-shadow: 0 4px 12px color-mix(in srgb, var(--tone) 45%, transparent); }
.user-card { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.12); }
.user-card .who b { color: #fff; }
.user-card .who span { color: #9fb2e6; }
.user-card .icon-btn { color: #c9d5f5; }
.user-card .icon-btn:hover { background: rgba(255,255,255,.12); color: #fff; }

.topbar { background: rgba(255,255,255,.78); backdrop-filter: blur(10px); }
:root[data-theme="dark"] .topbar { background: color-mix(in srgb, var(--surface) 85%, transparent); }

/* Tiêu đề trang: icon màu + nền nhẹ theo màu trang */
.page-head { align-items: center; gap: 18px; padding: 20px 22px; border: 1px solid color-mix(in srgb, var(--tone) 22%, var(--border)); border-radius: 18px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--tone) 8%, var(--surface)) 0%, var(--surface) 55%); box-shadow: var(--shadow-sm); }
.page-head > .ph-text { min-width: 0; flex: 1 1 380px; }
.ph-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0; color: #fff;
  background: linear-gradient(135deg, color-mix(in srgb, var(--tone) 75%, #fff), var(--tone)); box-shadow: 0 8px 18px color-mix(in srgb, var(--tone) 40%, transparent); }
.ph-icon svg { width: 26px; height: 26px; }
.page-head .eyebrow { color: color-mix(in srgb, var(--tone) 80%, #0b1324); }

/* Chào mừng trên bảng điều khiển */
.welcome { position: relative; overflow: hidden; display: flex; align-items: center; gap: 24px; padding: 28px 30px; border-radius: 20px; color: #fff; margin-bottom: 18px;
  background: linear-gradient(120deg, #1e3a8a 0%, #2445b8 55%, #2563eb 100%);
  box-shadow: 0 16px 40px rgba(30, 58, 138, .25); }
.welcome::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px); background-size: 22px 22px; pointer-events: none; }
.wl-text { position: relative; flex: 1; min-width: 0; }
.wl-date { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; background: rgba(255,255,255,.15); padding: 4px 10px; border-radius: 999px; margin-bottom: 10px; }
.wl-date svg { width: 14px; height: 14px; }
.welcome h1 { color: #fff; font-size: 28px; }
.welcome p { color: #dbe6ff; margin: 0 0 18px; font-size: 15px; }
.welcome .btn { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.28); color: #fff; box-shadow: none; }
.welcome .btn:hover { background: rgba(255,255,255,.24); }
.welcome .btn.wl-main { background: #fff; color: #1e3a8a; border-color: #fff; font-weight: 600; }
.wl-art { position: relative; opacity: .95; transform: rotate(-8deg); }
.wl-art .logo-svg { filter: drop-shadow(0 18px 30px rgba(0,0,0,.3)); }

/* Ô chỉ số: icon tròn màu + viền trên màu */
.tile { position: relative; overflow: hidden; border-top: 3px solid var(--tone, var(--primary)); transition: transform .15s, box-shadow .15s; }
a.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.tile .tl svg { width: 30px; height: 30px; padding: 7px; border-radius: 9px; background: color-mix(in srgb, var(--tone, var(--primary)) 14%, transparent); color: var(--tone, var(--primary)); }

/* Thẻ: tiêu đề có icon màu */
.card-head { background: linear-gradient(180deg, var(--surface-2), var(--surface)); border-radius: var(--radius) var(--radius) 0 0; }
.ch-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; background: color-mix(in srgb, var(--tone) 14%, transparent); color: var(--tone); }
.ch-ic svg { width: 17px; height: 17px; }

/* Bảng: đầu bảng sắc xanh */
th { background: #f0f5ff; color: #35466e; }
:root[data-theme="dark"] th { background: var(--surface-2); color: var(--text-2); }
.btn.primary { background: linear-gradient(135deg, #3b82f6, #2547c9); border-color: #2547c9; box-shadow: 0 4px 12px rgba(37, 71, 201, .28); }
.btn.primary:hover { background: linear-gradient(135deg, #2f6fe0, #1e3aa8); }
.tab.on { color: #2547c9; border-bottom-color: #2547c9; }
.dom-tile:hover, .form-card:hover, .kcard:hover { transform: translateY(-1px); box-shadow: var(--shadow); }

/* ---------- Logo menu to hơn, nút hướng dẫn, con mắt mật khẩu ---------- */
.side-brand { gap: 12px; padding: 6px 6px 20px; }
.side-brand b { font-size: 17px; line-height: 1.2; letter-spacing: -.01em; }
.side-brand small { font-size: 12.5px; margin-top: 2px; }
.help-btn { color: #0369a1; border-color: #bae6fd; background: #f0f9ff; }
.help-btn:hover { background: #e0f2fe; border-color: #7dd3fc; }
.pw-toggle { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; }
.pw-toggle svg { width: 19px; height: 19px; }
.pw-wrap input { padding-right: 46px !important; }
.opt-row { display: flex; flex-wrap: wrap; gap: 20px; margin: 2px 0 14px; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.seg { display: inline-flex; padding: 3px; background: var(--surface-3); border-radius: 10px; }
.seg button { font: inherit; font-size: 13px; font-weight: 500; border: 0; background: none; color: var(--text-2); padding: 6px 12px; border-radius: 8px; cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow-sm); }

/* ---------- Lịch tháng ---------- */
.month-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.mh { padding: 9px 10px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #35466e; background: #f0f5ff; border-bottom: 1px solid var(--border); text-align: center; }
.mh.wk { color: var(--bad); }
.mc { position: relative; min-height: 112px; padding: 6px 7px 8px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); cursor: pointer; transition: background .12s; min-width: 0; }
.mc:nth-child(7n) { border-right: 0; }
.mc:hover { background: #f5f9ff; }
.mc:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.mc.wk { background: #fbfcfe; }
.mc.out { background: var(--surface-2); }
.mc.out .sd, .mc.out .ld { opacity: .45; }
.mc-top { display: flex; align-items: baseline; justify-content: space-between; gap: 4px; }
.sd { font-size: 18px; font-weight: 700; color: var(--text); line-height: 1.2; }
.mc.wk .sd { color: var(--bad); }
.ld { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ld.key { color: var(--bad); font-weight: 700; }
.mc.today .sd { background: var(--primary); color: #fff; border-radius: 8px; padding: 0 7px; }
.mc.today { background: #f0f6ff; box-shadow: inset 0 0 0 2px var(--primary); }
.hol { font-size: 11px; font-weight: 600; color: var(--bad); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.mchips { display: flex; flex-direction: column; gap: 3px; margin-top: 5px; }
.mchip { font-size: 11.5px; line-height: 1.35; padding: 2px 6px; border-radius: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text);
  background: color-mix(in srgb, var(--evc) 14%, var(--surface)); border-left: 3px solid var(--evc); }
.mchip:hover { background: color-mix(in srgb, var(--evc) 24%, var(--surface)); }
.mchip b { font-weight: 600; font-variant-numeric: tabular-nums; }
.more { font-size: 11.5px; font-weight: 600; color: var(--primary); padding-left: 2px; }
.mdots { display: none; }
.month-side { position: sticky; top: 80px; }
.ov-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ov { padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--tone) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--tone) 20%, var(--border)); }
.ov b { display: block; font-size: 20px; color: var(--text); font-variant-numeric: tabular-nums; }
.ov span { font-size: 12px; color: var(--text-2); }
.day-head { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.day-big { width: 58px; height: 58px; border-radius: 14px; display: grid; place-items: center; font-size: 26px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #3b82f6, #2547c9); flex-shrink: 0; }
.day-head h3 { margin: 0 0 2px; }

/* ---------- Hướng dẫn ---------- */
.help-toc { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.help-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text); font-size: 13.5px; font-weight: 500; text-decoration: none !important; box-shadow: var(--shadow-sm); }
.help-chip:hover { border-color: var(--tone); }
.help-chip .ch-ic { width: 26px; height: 26px; border-radius: 50%; }
.help-chip .ch-ic svg { width: 14px; height: 14px; }
.help-sec { margin-bottom: 14px; scroll-margin-top: 80px; }
.help-sec.flash { box-shadow: 0 0 0 3px color-mix(in srgb, var(--tone) 35%, transparent); }
.help-steps { margin: 0; padding: 0; list-style: none; counter-reset: st; }
.help-steps li { position: relative; padding: 4px 0 12px 40px; counter-increment: st; font-size: 14.5px; }
.help-steps li::before { content: counter(st); position: absolute; left: 0; top: 2px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; color: #fff; background: var(--tone); }

/* ---------- Bộ chọn không gian & chuông nhắc việc ---------- */
.ws-btn { display: inline-flex; align-items: center; gap: 8px; max-width: 280px; padding: 4px 10px 4px 5px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; font: inherit; color: var(--text); text-align: left; box-shadow: var(--shadow-sm); }
.ws-btn:hover { border-color: #7c3aed; }
.ws-btn > svg { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; }
.ws-txt { min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.ws-txt small { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.ws-txt b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; background: #f1eafe; color: #7c3aed; }
.ws-ic.home { background: #e7efff; color: #2547c9; }
.ws-ic svg { width: 17px; height: 17px; }
.ws-pill { display: inline-flex; align-items: center; gap: 5px; margin-left: 10px; padding: 2px 9px; border-radius: 999px; background: #f1eafe; color: #6d28d9; font-size: 11.5px; font-weight: 600; text-transform: none; letter-spacing: 0; vertical-align: 1px; }
.ws-pill svg { width: 12px; height: 12px; }
.ws-pill.sm { margin-left: 0; padding: 0 7px; font-size: 11px; }
.bell-btn { position: relative; width: 38px; height: 38px; border: 1px solid var(--border-strong); background: var(--surface); border-radius: 10px; }
.bell-btn svg { width: 19px; height: 19px; }
.bell-count { position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--muted); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--surface); }
.bell-count.hot { background: var(--bad); }
.pop { position: fixed; z-index: 70; width: 360px; max-width: calc(100vw - 16px); max-height: min(70vh, 560px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); animation: fade .15s both; overflow: hidden; }
.pop.bell-pop { width: 420px; }
.pop-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; font-weight: 600; border-bottom: 1px solid var(--border); }
.ws-pop .pop-head { border-bottom: 0; }
.pop-list { overflow: auto; padding: 4px 6px; flex: 1; }
.pop-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px; border: 0; background: none; border-radius: 10px; cursor: pointer; font: inherit; color: var(--text); }
.pop-item:hover { background: var(--surface-2); }
.pop-item.on { background: #f1eafe; }
.pop-item b { display: block; font-size: 14px; }
.pop-item small { display: block; font-size: 12px; color: var(--muted); }
.pop-foot { padding: 10px 14px; border-top: 1px solid var(--border); display: flex; gap: 8px; align-items: center; }
.pop-foot a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13.5px; }
.pop-foot svg { width: 15px; height: 15px; }
.rem { display: flex; gap: 10px; align-items: flex-start; padding: 10px 8px; border-radius: 10px; cursor: pointer; border-left: 3px solid transparent; }
.rem:hover { background: var(--surface-2); }
.rem.bad { border-left-color: var(--bad); } .rem.warn { border-left-color: #f59e0b; } .rem.info { border-left-color: #3b82f6; }
.rem-ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; background: var(--surface-3); color: var(--text-2); }
.rem.bad .rem-ic { background: var(--bad-soft); color: var(--bad); } .rem.warn .rem-ic { background: var(--warn-soft); color: var(--warn); } .rem.info .rem-ic { background: #e7efff; color: #2547c9; }
.rem-ic svg { width: 16px; height: 16px; }
.rem .grow { min-width: 0; flex: 1; }
.rem b { display: block; font-size: 13.5px; line-height: 1.35; }
.rem small { font-size: 12px; color: var(--muted); }

/* ---------- Danh sách khách hàng ---------- */
.cl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.cl-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px; box-shadow: var(--shadow-sm); cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s; display: flex; flex-direction: column; gap: 14px; }
.cl-card:hover, .cl-card:focus-visible { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: #c4b5fd; outline: none; }
.cl-top { display: flex; gap: 12px; align-items: flex-start; }
.cl-top .grow { min-width: 0; flex: 1; }
.cl-top b { display: block; font-size: 15.5px; line-height: 1.3; }
.cl-top .grow > span { font-size: 12.5px; color: var(--muted); }
.cl-logo { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; font-weight: 700; font-size: 15px; color: #fff; background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.cl-stage-row { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; gap: 8px; }
.cl-stage-row span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage-bar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.stage-bar i { height: 7px; border-radius: 3px; background: var(--surface-3); }
.stage-bar i.doing { background: #f59e0b; } .stage-bar i.done { background: var(--good); }
.cl-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cl-stats div { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; }
.cl-stats b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; }
.cl-stats span { font-size: 11.5px; color: var(--muted); }
.cl-stats .bad b { color: var(--bad); }
.cl-foot { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); padding-top: 10px; border-top: 1px solid var(--border); }

/* ---------- Không gian khách hàng ---------- */
.stage-card { padding: 18px 18px 12px; margin-bottom: 16px; }
.stepper { display: grid; grid-template-columns: repeat(7, 1fr); }
.step-i { position: relative; text-align: center; padding: 0 4px; }
.step-i::before { content: ""; position: absolute; top: 15px; left: -50%; width: 100%; height: 3px; background: var(--surface-3); }
.step-i:first-child::before { display: none; }
.step-i.done::before, .step-i.doing::before { background: var(--good); }
.step-i .dot { position: relative; z-index: 1; width: 32px; height: 32px; margin: 0 auto 8px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: var(--surface); border: 2px solid var(--border-strong); color: var(--text-2); }
.step-i .dot svg { width: 16px; height: 16px; }
.step-i.done .dot { background: var(--good); border-color: var(--good); color: #fff; }
.step-i.doing .dot { background: #fff7ed; border-color: #f59e0b; color: #b45309; }
.step-i.cur .dot { box-shadow: 0 0 0 5px rgba(124, 58, 237, .15); border-color: #7c3aed; }
.step-i b { display: block; font-size: 12.5px; line-height: 1.3; }
.step-i > span:last-child { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.step-i em { font-style: normal; }
.stage-sum { text-align: center; font-size: 13px; color: var(--text-2); margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.stage-sum b { color: var(--good); font-size: 15px; }
.stage-rows { display: flex; flex-direction: column; gap: 10px; }
.stage-row { display: grid; grid-template-columns: 34px minmax(180px, 1.3fr) 150px 150px 150px minmax(160px, 1.4fr); gap: 12px; align-items: end; padding: 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); border-left: 4px solid var(--border-strong); }
.stage-row.doing { border-left-color: #f59e0b; background: #fffdf8; } .stage-row.done { border-left-color: var(--good); background: #f7fdf9; }
.stage-row .dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: var(--surface-3); color: var(--text-2); align-self: center; }
.stage-row.done .dot { background: var(--good); color: #fff; } .stage-row.doing .dot { background: #fef3c7; color: #b45309; }
.stage-row .field { margin: 0; }
.stage-row .field label { font-size: 12px; color: var(--text-2); }
.stage-name { align-self: center; }
.stage-name b { display: block; font-size: 14px; }
.info { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; margin: 0; font-size: 14px; }
.info dt { color: var(--muted); }
.info dd { margin: 0; color: var(--text); word-break: break-word; }
.note-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; box-shadow: var(--shadow-sm); }
.note-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.note-top b { font-size: 15px; }
.note-body { white-space: pre-wrap; margin: 10px 0 0; font-size: 14px; color: var(--text-2); }
.note-foot { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.note-foot a { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; }
.note-foot a svg { width: 15px; height: 15px; }
.note-full { white-space: pre-wrap; font-size: 14.5px; line-height: 1.65; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin: 10px 0; }
.tl-day { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 14px 0 6px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.tl-day:first-child { padding-top: 0; }
.tl-item { display: flex; gap: 12px; align-items: flex-start; padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: 13.5px; }
.tl-item:last-child { border-bottom: 0; }
.tl-item .grow { flex: 1; min-width: 0; }
.tl-detail { color: var(--text-2); font-size: 13px; margin-top: 1px; word-break: break-word; }
.tl-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; background: #7c3aed; }
.tl-dot.e-sop { background: #6366f1; } .tl-dot.e-task { background: #f97316; } .tl-dot.e-record { background: #eab308; } .tl-dot.e-event { background: #14b8a6; } .tl-dot.e-note { background: #0ea5e9; } .tl-dot.e-reminder { background: #94a3b8; }

/* ---------- Đánh giá mức độ chuẩn hóa ---------- */
.scale-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; padding-top: 12px; margin-top: 4px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-2); }
.scale-legend b { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: #e7efff; color: #2547c9; margin-right: 6px; font-size: 11.5px; }
.as-dim { margin-bottom: 12px; }
.as-avg { font-size: 13px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.as-q { display: flex; align-items: center; gap: 16px; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.as-q:last-of-type { border-bottom: 0; }
.as-text { flex: 1; font-size: 14.5px; color: var(--text); }
.as-scale { display: inline-flex; gap: 4px; flex-shrink: 0; }
.as-scale label { position: relative; cursor: pointer; }
.as-scale input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.as-scale span { display: grid; place-items: center; width: 38px; height: 36px; border-radius: 9px; border: 1px solid var(--border-strong); background: var(--surface); font-weight: 600; color: var(--text-2); transition: all .12s; }
.as-scale label:hover span { border-color: #2547c9; color: #2547c9; }
.as-scale input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.as-scale input:checked + span { background: #2547c9; border-color: #2547c9; color: #fff; box-shadow: 0 3px 8px rgba(37, 71, 201, .3); }
.as-bar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 16px; padding: 12px 16px; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(8px); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); }
.as-bar .progress { margin-top: 6px; }
.as-live { font-size: 13.5px; color: var(--text-2); }
.or-line { display: flex; align-items: center; gap: 10px; margin: 6px 0 14px; color: var(--muted); font-size: 12.5px; }
.or-line::before, .or-line::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.ladder { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.rung { padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.rung b { display: block; font-size: 13px; }
.rung span { font-size: 12px; color: var(--muted); line-height: 1.4; }
.rung.past { background: #f0f6ff; border-color: #c7d7fb; }
.rung.on { background: #2547c9; border-color: #2547c9; box-shadow: 0 6px 16px rgba(37, 71, 201, .3); }
.rung.on b, .rung.on span { color: #fff; }
.hb-legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 12.5px; color: var(--text-2); margin-bottom: 12px; }
.hb-legend i { display: inline-block; vertical-align: -2px; margin-right: 6px; }
.sw-now { width: 14px; height: 10px; border-radius: 0 3px 3px 0; background: #2547c9; }
.sw-base { width: 3px; height: 14px; background: var(--text); border-radius: 2px; }
.sw-goal { width: 0; height: 14px; border-left: 2px dashed var(--good); }
.hbars { display: flex; flex-direction: column; gap: 12px; }
.hb-row { display: grid; grid-template-columns: 190px 1fr 64px; gap: 12px; align-items: center; font-size: 13.5px; }
.hb-lbl { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prio-tag { font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--bad); background: var(--bad-soft); padding: 1px 6px; border-radius: 999px; margin-right: 6px; }
.hb-track { position: relative; height: 16px; background: var(--surface-3); border-radius: 0 4px 4px 0; }
.hb-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: #2547c9; border-radius: 0 4px 4px 0; transition: width .7s ease-out; }
.hb-fill:not(.in) { width: 0 !important; }
.hb-goal { position: absolute; top: -4px; bottom: -4px; border-left: 2px dashed var(--good); z-index: 1; }
.hb-base { position: absolute; top: -3px; bottom: -3px; width: 3px; margin-left: -1.5px; background: var(--text); border-radius: 2px; z-index: 2; box-shadow: 0 0 0 2px var(--surface); }
.hb-val { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.hb-val small { display: block; font-size: 11px; font-weight: 600; }
.hb-val small.up { color: var(--good); } .hb-val small.down { color: var(--bad); }
.pkg { padding: 14px 16px; border-radius: 12px; background: #f5f3ff; border: 1px solid #ddd6fe; margin-bottom: 16px; }
.pkg b { display: block; font-size: 16px; color: #5b21b6; }
.pkg p { margin: 6px 0 0; font-size: 14px; color: var(--text-2); }
.rec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.as-detail { margin-bottom: 12px; }
.as-detail .table-wrap { box-shadow: none; margin: 0 0 8px; }
.tl-dot.e-assessment { background: #e11d48; }

/* ---------- Phê duyệt SOP & cổng khách hàng ---------- */
.ws-btn.locked { cursor: default; }
.ws-btn.locked > svg { display: none; }
.ap-group { border: 1px solid var(--border); border-radius: 12px; padding: 4px 12px 2px; margin-bottom: 10px; }
.ap-group-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--text-2); padding: 8px 0 4px; border-bottom: 1px solid var(--border); }
.ap-group-head .hint { margin-left: auto; }
.integrity { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding: 10px 12px; border-radius: 10px; font-size: 13.5px; font-weight: 600; }
.integrity svg { width: 18px; height: 18px; flex-shrink: 0; }
.integrity.ok { background: var(--good-soft); color: var(--good); }
.integrity.bad { background: var(--bad-soft); color: var(--bad); }
.cert { border: 2px solid #16a34a; border-radius: 14px; padding: 18px; background: linear-gradient(180deg, #f6fdf8, var(--surface)); }
.cert-head { display: flex; gap: 12px; align-items: center; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px dashed #86efac; }
.cert-head b { display: block; font-size: 16px; letter-spacing: .04em; color: #166534; }
.cert-head span { font-size: 12.5px; color: var(--muted); }
.cert-sign { display: flex; flex-direction: column; align-items: flex-end; margin-top: 14px; }
.cert-sign span { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.cert-sign b { font-size: 20px; font-family: "Brush Script MT", "Segoe Script", cursive; color: #1e3a8a; font-weight: 400; }
@media print { .cert { -webkit-print-color-adjust: exact; print-color-adjust: exact; break-inside: avoid; } }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .rec-grid { grid-template-columns: 1fr; }
  .ladder { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .stage-row { grid-template-columns: 34px 1fr 1fr; }
  .stage-row .stage-name { grid-column: span 2; }
  .stage-row .stage-note { grid-column: 2 / -1; }
  .month-wrap { grid-template-columns: minmax(0, 1fr); }
  .month-side { position: static; }
  .builder, .grid-2, .grid-2.wide-left, .finder { grid-template-columns: minmax(0, 1fr); }
  .preview { position: static; max-height: none; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .form-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  .auth { grid-template-columns: 1fr; }
  .auth-side { padding: 28px 22px; }
  .brand-name { font-size: 26px; }
  .side-brand-big { gap: 14px; margin-bottom: 10px; }
  .side-brand-big .logo-svg { width: 60px; height: 60px; }
  .auth-side .slogan { font-size: 16px; margin: 0; }
  .feats, .side-stats, .auth-side p { display: none; }
  .side-brand-big { margin-bottom: 16px; }
  .auth-form { padding: 20px 16px 28px; }
  .auth-panel { padding: 26px 20px; margin: 20px auto; }
  .welcome { padding: 22px 18px; }
  .wl-art { display: none; }
  .ph-icon { width: 44px; height: 44px; }
}
@media (max-width: 860px) {
  .sidebar { position: fixed; z-index: 40; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
  .menu-btn { display: grid; }
  .topbar { padding: 0 12px; gap: 8px; }
  .topbar .crumb { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar .role-pill, .idle-chip .lbl { display: none; }
  .help-btn .lbl { display: none; }
  .as-q { flex-direction: column; align-items: stretch; gap: 8px; }
  .as-scale { justify-content: space-between; }
  .as-scale span { width: 52px; height: 40px; }
  .ladder { grid-template-columns: 1fr; }
  .rung:not(.on) span { display: none; }
  .hb-row { grid-template-columns: 1fr 52px; }
  .hb-lbl { grid-column: 1 / -1; }
  .ws-txt small { display: none; }
  .ws-btn { max-width: none; flex: 1; min-width: 0; }
  .topbar .crumb, .topbar .spacer, .help-btn { display: none !important; }
  .idle-chip { padding: 4px 8px; }
  .stepper { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .step-i b, .step-i > span:last-child { display: none; }
  .stage-row { grid-template-columns: 30px 1fr; }
  .stage-row .stage-name, .stage-row .stage-note, .stage-row .field { grid-column: 2 / -1; }
  .info { grid-template-columns: 110px 1fr; }
  .cl-grid { grid-template-columns: 1fr; }
  .pop, .pop.bell-pop { left: 8px !important; right: 8px; width: auto; }
  .month-wrap { grid-template-columns: minmax(0, 1fr); }
  .month-side { position: static; }
  .mc { min-height: 64px; padding: 4px; }
  .sd { font-size: 15px; }
  .ld { font-size: 10px; }
  .mchips, .hol { display: none; }
  .mdots { display: flex; gap: 2px; position: absolute; left: 5px; bottom: 5px; }
  .mdots i { width: 6px; height: 6px; border-radius: 50%; }
  .mc.today .sd { padding: 0 4px; }
  .mh { padding: 7px 2px; font-size: 10.5px; }
  .content { padding: 18px 14px 56px; }
  h1, .welcome h1 { font-size: 22px; }
  .page-head { padding-bottom: 16px; }
  .rules, .grid2, .grid3, .form-cards, .meta-bar, .compare { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: repeat(3, 1fr); }
  .lifecycle { grid-template-columns: 1fr; padding: 16px; gap: 12px; }
  .stage { display: grid; grid-template-columns: 34px 1fr; column-gap: 12px; text-align: left; padding: 0; }
  .stage::before { display: none; }
  .stage .dot { margin: 0; grid-row: span 2; }
  .paper { padding: 18px 14px; }
  .part { padding: 14px; }
  .bar-row { grid-template-columns: 110px 1fr 28px; }
  .week { grid-template-columns: 44px repeat(7, 120px); }
  .table-wrap.stack { border: 0; background: none; box-shadow: none; overflow: visible; }
  .stack table, .stack tbody, .stack tr, .stack td { display: block; }
  .stack thead { display: none; }
  .stack tr { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 10px; box-shadow: var(--shadow-sm); }
  .stack td { padding: 3px 0; border: 0; }
  .stack td.actions { text-align: left; padding-top: 8px; }
  .stack tbody tr:hover td { background: none; }
  .stack td:empty { display: none; }
  .stack td[data-label]:not([data-label=""])::before { content: attr(data-label); display: block; font-size: 11.5px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
  .stack td:first-child::before, .stack td:nth-child(2)::before { display: none !important; }
  .stack td:first-child, .stack td:nth-child(2) { display: inline-block; margin-right: 8px; }
  #toasts { left: 14px; right: 14px; }
  .toast { max-width: none; }
  .suggest { flex-wrap: wrap; }
}
@media (max-width: 480px) { .tiles { grid-template-columns: 1fr 1fr; } .tile b { font-size: 24px; } }

@media print {
  .sidebar, .topbar, .scrim, .toolbar, .no-print, .builder > .editor, .preview-bar, #toasts, .tabs, .form-cards { display: none !important; }
  body { background: #fff; color: #000; font-size: 12px; }
  .content { padding: 0; }
  .builder { display: block; }
  .panel, .table-wrap, .card-box { border-color: #999; box-shadow: none; }
  .preview { position: static; max-height: none; overflow: visible; border: 0; }
  .print-only { display: block; }
  th { background: #eee !important; color: #000; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  input, textarea, select { border: 0; border-bottom: 1px dotted #999; border-radius: 0; padding: 2px; }
  .as-detail, .card-box { break-inside: avoid; }
  .hb-fill { width: auto; }
  .rung.on, .hb-fill, .sw-now { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.print-modal .layout { display: none !important; }
  body.print-modal .modal-back { position: static; background: none; padding: 0; display: block; }
  body.print-modal .modal { max-width: none; max-height: none; box-shadow: none; padding: 0; }
}
.no-link { cursor: default; }
a.no-link:hover { text-decoration: none; }

/* ---------- Menu trái: icon màu đặc + mô tả ngắn ---------- */
.sidebar { width: 272px; }
.sidebar nav a { align-items: center; gap: 11px; padding: 7px 8px; }
.sidebar nav a .ni { width: 34px; height: 34px; border-radius: 10px; color: #fff;
  background: linear-gradient(135deg, color-mix(in srgb, var(--tone) 78%, #fff), var(--tone));
  box-shadow: 0 3px 8px color-mix(in srgb, var(--tone) 45%, transparent), inset 0 1px 0 rgba(255,255,255,.25); }
.sidebar nav a .ni svg { width: 18px; height: 18px; stroke-width: 2.1; }
.sidebar nav a:hover .ni { transform: scale(1.06); }
.sidebar nav a.active .ni { box-shadow: 0 0 0 2px #fff, 0 4px 12px color-mix(in srgb, var(--tone) 55%, transparent); }
.nl { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.nl b { font-size: 13.5px; font-weight: 600; color: #eef2ff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nl small { font-size: 11.5px; color: #93a6d6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.sidebar nav a:hover .nl small, .sidebar nav a.active .nl small { color: #c7d4f5; }
.sidebar nav a.active .nl b { color: #fff; }
.help-btn { width: 38px; height: 38px; border: 1px solid #bae6fd; background: #f0f9ff; color: #0369a1; border-radius: 10px; }
.help-btn:hover { background: #e0f2fe; }
.help-btn svg { width: 19px; height: 19px; }
.pop-note { margin: -4px 14px 8px; font-size: 12.5px; color: var(--muted); }
@media (max-width: 860px) { .help-btn { display: grid !important; } }

/* ---------- Trang hướng dẫn ---------- */
.help-hero { display: flex; gap: 18px; align-items: center; padding: 22px 24px; border-radius: 18px; margin-bottom: 18px; color: #fff; background: linear-gradient(120deg, #0369a1, #0ea5e9 60%, #22d3ee); box-shadow: 0 12px 30px rgba(3, 105, 161, .25); }
.help-hero h1 { color: #fff; margin: 0 0 4px; }
.help-hero p { margin: 0; color: #e0f2fe; }
.hh-ic { width: 60px; height: 60px; border-radius: 16px; display: grid; place-items: center; background: rgba(255,255,255,.18); flex-shrink: 0; }
.hh-ic svg { width: 32px; height: 32px; }
.help-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-bottom: 24px; }
.help-tile { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--tone); color: var(--text); text-decoration: none !important; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s; }
.help-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.help-tile b { font-size: 14.5px; }
.help-tile > span:last-child { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.ht-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--tone) 75%, #fff), var(--tone)); box-shadow: 0 4px 10px color-mix(in srgb, var(--tone) 40%, transparent); flex-shrink: 0; margin-bottom: 4px; }
.ht-ic svg { width: 20px; height: 20px; }
.help-sec2 { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 20px 22px; margin-bottom: 16px; box-shadow: var(--shadow-sm); scroll-margin-top: 80px; border-left: 5px solid var(--tone); }
.help-sec2.flash { box-shadow: 0 0 0 3px color-mix(in srgb, var(--tone) 35%, transparent); }
.hs-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.hs-head > div { flex: 1; }
.hs-head h2 { margin: 0 0 4px; font-size: 19px; }
.hs-head p { margin: 0; color: var(--text-2); font-size: 14px; }
.hs-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.hs-steps li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.hs-num { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; background: var(--tone); flex-shrink: 0; margin-top: 2px; }
.hs-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: var(--tone); background: color-mix(in srgb, var(--tone) 13%, transparent); flex-shrink: 0; }
.hs-ic svg { width: 17px; height: 17px; }
.hs-txt { font-size: 14.5px; line-height: 1.6; padding-top: 3px; }
.hs-tips { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.hs-tips > div { display: flex; gap: 8px; align-items: flex-start; padding: 9px 12px; border-radius: 10px; background: #fffbeb; border: 1px solid #fde68a; font-size: 13.5px; color: #78350f; }
.hs-tips svg { width: 16px; height: 16px; color: #d97706; flex-shrink: 0; margin-top: 2px; }
@media (max-width: 860px) { .help-hero { padding: 18px; } .hs-head { flex-wrap: wrap; } .help-sec2 { padding: 16px; } }

/* ===== Sức khỏe khách hàng ===== */
.h-ring { --p: 0; --ht: var(--primary); position: relative; display: inline-grid; place-items: center; flex-shrink: 0; border-radius: 50%;
  background: conic-gradient(var(--ht) calc(var(--p) * 1%), var(--surface-3) 0); }
.h-ring::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--surface); }
.h-ring b, .cl-top .h-ring b { position: relative; display: block; font-size: 13px !important; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; line-height: 1; }
.h-ring.big { width: 110px; height: 110px; } .h-ring.big::before { inset: 9px; } .h-ring.big b { font-size: 24px !important; }
.cl-badges { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.health-chip { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 13px; padding: 3px 12px 3px 3px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; color: var(--text-2); }
.health-chip:hover { border-color: var(--ht); } .health-chip b { color: var(--ht) !important; font-size: 13px !important; }
.health-chip .h-ring::before { inset: 3px; } .health-chip .h-ring b { font-size: 10.5px !important; color: var(--text) !important; }
.stage-sum { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.stage-sum .spacer { flex: 1; }
.h-head { display: flex; align-items: center; gap: 16px; margin: 6px 0 16px; }
.h-parts { display: grid; gap: 12px; }
.h-part .h-row { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 5px; }
.h-part .pbar { height: 8px; margin-bottom: 3px; }

/* ===== Hồ sơ bàn giao & sao lưu ===== */
.ho-opts, .bk-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0; }
.bk-actions { margin: 0 0 18px; }
.ho-opt, .bk-card { font: inherit; text-align: left; cursor: pointer; display: grid; grid-template-columns: auto 1fr; column-gap: 12px; row-gap: 2px; align-items: center; padding: 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); transition: all .15s; }
.ho-opt:hover, .bk-card:hover { border-color: var(--primary-line); box-shadow: var(--shadow); transform: translateY(-1px); }
.ho-opt:disabled, .bk-card:disabled { opacity: .6; cursor: progress; }
.ho-opt span:last-child, .bk-card span:last-child { grid-column: 2; font-size: 12.5px; color: var(--muted); }
.ho-ic, .bk-ic { grid-row: span 2; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--tone) 80%, #fff), var(--tone)); box-shadow: 0 6px 14px -6px var(--tone); }
.ho-ic svg, .bk-ic svg { width: 22px; height: 22px; }
.bk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.bk-grid div { padding: 10px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); }
.bk-grid b { display: block; font-size: 18px; font-variant-numeric: tabular-nums; } .bk-grid span { font-size: 12px; color: var(--muted); }

/* ===== Bài kiểm tra ===== */
.sec-title { font-size: 15px; margin: 18px 0 10px; }
.qz-list { display: grid; gap: 12px; }
.qz { padding: 16px 18px; border-left: 4px solid var(--border); }
.qz.done { border-left-color: var(--primary); } .qz.ok { border-left-color: var(--good); } .qz.bad { border-left-color: var(--bad); }
.qz-q { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; } .qz-q b { font-size: 14.5px; line-height: 1.45; }
.qz-n { flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; background: color-mix(in srgb, #a855f7 15%, transparent); color: #9333ea; }
.qz.ok .qz-n { background: var(--good-soft); color: var(--good); } .qz.bad .qz-n { background: var(--bad-soft); color: var(--bad); } .qz-n svg { width: 14px; height: 14px; }
.qz-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.qz-opt { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border); cursor: pointer; font-size: 13.5px; transition: all .12s; }
.qz-opt:hover { border-color: var(--primary-line); background: var(--surface-2); }
.qz-opt input { display: none; }
.qz-k { flex-shrink: 0; width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; font-weight: 700; font-size: 12px; background: var(--surface-3); color: var(--text-2); }
.qz-opt:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.qz-opt:has(input:checked) .qz-k { background: var(--primary); color: #fff; }
.qz-bar { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 12px 0; margin-top: 8px; background: linear-gradient(transparent, var(--bg) 35%); }
.qz-result { display: flex; gap: 22px; align-items: center; padding: 22px; margin-bottom: 16px; border-top: 4px solid var(--ht); }
.qz-rv { display: grid; gap: 4px; font-size: 13.5px; padding-left: 36px; }
.qz-rv .good { color: var(--good); font-weight: 600; } .bad-t { color: var(--bad); }
.qz-sops { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.qz-sop { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: inherit; text-decoration: none !important; box-shadow: var(--shadow-sm); }
.qz-sop:hover { border-color: #c084fc; }
.qz-sop .grow { min-width: 0; flex: 1; } .qz-sop .grow b { display: block; font-size: 13.5px; } .qz-sop .grow span { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qs-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #c084fc, #9333ea); flex-shrink: 0; } .qs-ic svg { width: 18px; height: 18px; }
.tr-matrix td.trc { text-align: center; font-weight: 600; font-size: 12.5px; white-space: nowrap; }
.trc.ok { color: var(--good); background: var(--good-soft); } .trc.bad { color: var(--bad); background: var(--bad-soft); } .trc.no { color: var(--muted); }

/* ===== Audit ===== */
.au-items { display: grid; gap: 8px; margin: 12px 0; max-height: 52vh; overflow: auto; padding-right: 4px; }
.au-item { border: 1px solid var(--border); border-left: 4px solid var(--border-strong); border-radius: var(--radius-sm); padding: 10px 12px; }
.au-item[data-r="Đạt"] { border-left-color: var(--good); } .au-item[data-r="Không đạt"] { border-left-color: var(--bad); background: var(--bad-soft); } .au-item[data-r="Không áp dụng"] { border-left-color: var(--muted); }
.au-top { display: flex; gap: 10px; font-size: 13.5px; margin-bottom: 8px; }
.au-src { flex-shrink: 0; font: 600 11.5px ui-monospace, Menlo, monospace; padding: 2px 7px; border-radius: 6px; background: var(--surface-3); color: var(--text-2); height: fit-content; }
.au-res { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.au-res input[type="text"] { flex: 1; min-width: 180px; padding: 6px 10px; }
.au-r input { display: none; }
.au-r span { display: inline-block; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--border-strong); font-size: 12.5px; font-weight: 600; cursor: pointer; color: var(--text-2); }
.au-r.ok input:checked + span { background: var(--good); border-color: var(--good); color: #fff; }
.au-r.bad input:checked + span { background: var(--bad); border-color: var(--bad); color: #fff; }
.au-r.na input:checked + span { background: var(--muted); border-color: var(--muted); color: #fff; }
.au-sum { display: flex; gap: 14px; align-items: center; margin: 4px 0 14px; }

/* ===== Giờ công ===== */
.ts-form-card { padding: 14px 16px; margin-bottom: 16px; }
.ts-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.ts-form .field { margin: 0; } .ts-form .field.grow { flex: 1; min-width: 200px; }
.ts-form input[type="number"] { width: 90px; }
.ts-bars { display: grid; gap: 10px; }
.ts-bar { display: grid; grid-template-columns: minmax(90px, 38%) 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.tb-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-t { height: 10px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.tb-t i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #38bdf8, #0284c7); }
.ts-bar b { font-variant-numeric: tabular-nums; min-width: 40px; text-align: right; }

/* ===== QR & AI ===== */
.qr-label { display: flex; gap: 16px; align-items: center; padding: 14px; border: 2px solid var(--primary-line); border-radius: var(--radius); margin: 12px 0; background: #fff; color: #111; }
.qr-box svg { width: 140px; height: 140px; display: block; }
.qr-label b { display: block; font-size: 17px; color: #1e3a8a; } .qr-label span { display: block; font-size: 14px; } .qr-label small { color: #555; }
.ai-btn { border-color: #c4b5fd; color: #6d28d9; background: linear-gradient(135deg, #faf5ff, #eef2ff); }
.ai-btn:hover { border-color: #8b5cf6; background: linear-gradient(135deg, #f3e8ff, #e0e7ff); }
.ai-steps { padding-left: 20px; line-height: 1.6; font-size: 13.5px; } .ai-steps li { margin-bottom: 8px; }
.btn.loading { opacity: .7; cursor: progress; }
.e-time { background: #0ea5e9; }
@media (max-width: 760px) {
  .ho-opts, .bk-actions, .qz-opts { grid-template-columns: 1fr; }
  .qz-result { flex-direction: column; text-align: center; }
  .ts-form .field, .ts-form .btn { width: 100%; } .ts-form input[type="number"] { width: 100%; }
  .cl-badges { flex-direction: row; align-items: center; }
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ai-btn { background: #1e1638; color: #c4b5fd; border-color: #4c3b8a; } }
:root[data-theme="dark"] .ai-btn { background: #1e1638; color: #c4b5fd; border-color: #4c3b8a; }
.modal h3 > svg { width: 20px; height: 20px; vertical-align: -3px; margin-right: 4px; color: var(--primary); }
.tab > svg { width: 16px; height: 16px; vertical-align: -3px; margin-right: 2px; }
/* Gợi ý tên đăng nhập, phòng ban */
.un-hint { display: block; margin-top: 4px; }
.un-hint.good { color: var(--good); } .un-hint.bad { color: var(--bad); }
.link-btn { font: inherit; font-weight: 600; color: var(--primary); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }
.dept-cell { min-width: 170px; padding: 6px 9px; font-size: 13px; }

/* ===== Kho tài liệu ===== */
.avatar.xs { width: 18px; height: 18px; font-size: 8px; }
.icon-btn.sm { width: 30px; height: 30px; } .icon-btn.sm svg { width: 15px; height: 15px; }
.pop-item.danger b { color: var(--bad); } .pop-item.danger .ws-ic { color: var(--bad); }
.dk-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.dk-bar .spacer { flex: 1; } .dk-bar .search { min-width: 220px; }
.dk-crumb { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 14px; }
.dk-crumb a { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-weight: 600; padding: 4px 8px; border-radius: 8px; }
.dk-crumb a:hover { background: var(--surface-2); color: var(--primary); text-decoration: none; }
.dk-crumb a svg { width: 16px; height: 16px; } .dk-crumb i { color: var(--muted); font-style: normal; } .dk-crumb b { padding: 4px 8px; }
.dk-usage { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); padding: 5px 11px; border-radius: 999px; }
.dk-usage svg { width: 14px; height: 14px; color: #d97706; }
.dk-folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-bottom: 18px; }
.dk-folder { display: flex; align-items: center; gap: 12px; padding: 12px 10px 12px 14px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-sm); cursor: pointer; transition: all .15s; }
.dk-folder:hover { border-color: #fbbf24; transform: translateY(-1px); box-shadow: var(--shadow); }
.dk-folder .grow { flex: 1; min-width: 0; } .dk-folder .grow b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .dk-folder .grow span { font-size: 12px; color: var(--muted); }
.dk-fic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; color: #fff; background: linear-gradient(135deg, #fcd34d, #f59e0b); box-shadow: 0 6px 14px -7px #f59e0b; }
.dk-fic svg { width: 21px; height: 21px; fill: rgba(255,255,255,.25); }
.dk-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.dk-file { position: relative; display: flex; flex-direction: column; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; transition: all .15s; }
.dk-file:hover { box-shadow: var(--shadow); border-color: var(--primary-line); }
.dk-thumb { position: relative; height: 128px; border: 0; padding: 0; cursor: pointer; display: grid; place-items: center; align-content: center; gap: 4px; overflow: hidden;
  background: linear-gradient(135deg, color-mix(in srgb, var(--kc) 14%, var(--surface)), color-mix(in srgb, var(--kc) 4%, var(--surface))); }
.dk-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dk-ext { font: 800 20px/1 Inter, sans-serif; letter-spacing: .02em; color: #fff; background: var(--kc); padding: 9px 12px; border-radius: 10px; box-shadow: 0 8px 16px -8px var(--kc); }
.dk-kind { font-size: 11.5px; font-weight: 600; color: var(--kc); }
.dk-play { position: absolute; inset: auto 10px 10px auto; width: 30px; height: 30px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; font-size: 12px; }
.dk-meta { padding: 10px 12px 12px; display: grid; gap: 3px; min-width: 0; }
.dk-meta b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 4px; }
.dk-meta > span { font-size: 12px; color: var(--muted); }
.dk-by { display: inline-flex; align-items: center; gap: 6px; }
.dk-note { font-style: italic; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dk-act { position: absolute; top: 8px; right: 8px; display: flex; gap: 6px; opacity: 0; transition: opacity .15s; }
.dk-file:hover .dk-act, .dk-act:focus-within { opacity: 1; }
.dk-act .icon-btn { background: var(--surface); box-shadow: var(--shadow); }
@media (hover: none) { .dk-act { opacity: 1; } }
.dk-empty { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 48px 20px; border: 2px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface); color: var(--text-2); }
.dk-empty b { font-size: 16px; color: var(--text); } .dk-empty span { font-size: 13.5px; max-width: 460px; }
.dk-empty-ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #fbbf24, #d97706); margin-bottom: 4px; } .dk-empty-ic svg { width: 26px; height: 26px; }
.dk-prog { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 12px; border-radius: var(--radius); border: 1px solid var(--primary-line); background: var(--primary-soft); }
.dk-prog .grow { flex: 1; } .dk-prog b { font-size: 13.5px; display: block; margin-bottom: 6px; } .dk-prog .pbar { height: 7px; background: var(--surface); }
.dk-prog-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--primary); color: #fff; } .dk-prog-ic svg { width: 18px; height: 18px; }
.dk-pct { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 40px; text-align: right; }
.dk-drop { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: color-mix(in srgb, var(--primary) 18%, transparent); backdrop-filter: blur(2px); pointer-events: none; }
.dk-drop > div { display: grid; justify-items: center; gap: 8px; padding: 36px 48px; border: 3px dashed var(--primary); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }
.dk-drop svg { width: 40px; height: 40px; color: var(--primary); } .dk-drop b { font-size: 18px; } .dk-drop span { font-size: 13px; color: var(--muted); }
.dk-lb { position: relative; }
.dk-lb-top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; } .dk-lb-top b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .dk-lb-top .spacer { flex: 1; }
.dk-lb-body { display: grid; place-items: center; background: #0b1120; border-radius: 10px; min-height: 300px; overflow: hidden; }
.dk-lb-body img, .dk-lb-body video { max-width: 100%; max-height: 72vh; display: block; }
.dk-lb-nav { position: absolute; top: 50%; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); box-shadow: var(--shadow); cursor: pointer; display: grid; place-items: center; }
.dk-lb-nav.prev { left: 10px; } .dk-lb-nav.next { right: 10px; } .dk-lb-nav svg { width: 20px; height: 20px; }
.e-doc { background: #d97706; }
@media (max-width: 760px) {
  .dk-files { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .dk-thumb { height: 104px; } .dk-bar .search { min-width: 0; flex: 1 1 100%; } .dk-bar .spacer { display: none; }
}
.dk-cap { display: inline-block; width: 54px; height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin: 0 2px 0 8px; }
.dk-cap i { display: block; height: 100%; background: linear-gradient(90deg, #fbbf24, #d97706); border-radius: 999px; }
.dk-cap.full i { background: var(--bad); }
.dk-sep { width: 1px; height: 14px; background: var(--border-strong); margin: 0 4px; } .dk-usage b { font-weight: 700; color: var(--text); }
/* Nút gom thao tác (Soạn SOP) */
.menu-btn-x svg:last-child { width: 14px; height: 14px; margin-left: 2px; opacity: .6; }
.menu-pop { min-width: 280px; }
.menu-pop .pop-item small { display: block; font-size: 12px; color: var(--muted); }

/* ===== CRM bán giải pháp (29/11/2026) ===== */
.crm-pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap;
  color: var(--tone); background: color-mix(in srgb, var(--tone) 12%, transparent); border: 1px solid color-mix(in srgb, var(--tone) 30%, transparent); }
.crm-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.crm-col { background: var(--surface-2); border: 1px solid var(--border); border-top: 3px solid var(--tone); border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.crm-col-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 2px 4px 4px; }
.crm-col-head b { font-size: 14px; color: var(--text); }
.crm-col-head span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.crm-col-empty { color: var(--muted); text-align: center; font-size: 13px; padding: 10px 0; }
.crm-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; box-shadow: var(--shadow-sm); transition: box-shadow .15s, border-color .15s; }
.crm-card:hover, .crm-card:focus-visible { border-color: var(--primary-line); box-shadow: var(--shadow); outline: none; }
.crm-card b { font-size: 14px; color: var(--text); line-height: 1.35; }
.crm-card .muted { font-size: 12.5px; }
.crm-card.late { border-left: 3px solid var(--bad); }
.crm-card-row { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.crm-card-row .avatar { margin-left: auto; }
.crm-val { font-size: 13px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.crm-req { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--muted); }
.crm-req svg, .crm-next svg { width: 14px; height: 14px; }
.crm-next { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--text-2); }
.crm-card.late .crm-next, .crm-late { color: var(--bad); font-weight: 600; }
.crm-steps { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; align-items: center; }
.crm-step { font: inherit; font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 6px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); cursor: pointer; }
.crm-step span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--surface-3); color: var(--text-2); }
.crm-step.done span { background: color-mix(in srgb, var(--tone) 18%, transparent); color: var(--tone); }
.crm-step.on { border-color: var(--tone); color: var(--tone); font-weight: 700; background: color-mix(in srgb, var(--tone) 10%, var(--surface)); }
.crm-step.on span { background: var(--tone); color: #fff; }
.crm-step:disabled { cursor: default; }
.crm-step.lost { padding: 6px 12px; color: var(--bad); border-style: dashed; }
.crm-detail { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.crm-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.crm-detail h2 { font-size: 16px; margin: 0; }
.crm-box-head { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; padding: 16px 18px 6px; }
.crm-fitsum { display: flex; flex-wrap: wrap; gap: 6px; }
.crm-area { padding: 6px 18px 12px; }
.crm-area h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 10px 0 6px; }
.crm-req-row { display: flex; gap: 8px; align-items: center; padding: 9px 0; border-top: 1px solid var(--border); }
.crm-req-row .grow { flex: 1; min-width: 0; font-size: 14px; color: var(--text); }
.crm-req-row small { font-size: 12px; }
.crm-req-row select { font: inherit; font-size: 12.5px; padding: 4px 6px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); max-width: 140px; }
.crm-req-row select.crm-fit { color: var(--tone); font-weight: 600; border-color: color-mix(in srgb, var(--tone) 45%, transparent); }
.crm-info, .crm-log { padding: 16px 18px; }
.crm-info dl { margin: 10px 0 0; display: grid; grid-template-columns: max-content 1fr; gap: 8px 14px; font-size: 14px; }
.crm-info dt { color: var(--muted); }
.crm-info dd { margin: 0; color: var(--text); min-width: 0; overflow-wrap: anywhere; }
.crm-log-row { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); font-size: 14px; }
.crm-log-row:first-of-type { border-top: 0; }
.crm-log-row .grow { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.crm-kind { flex: none; font-size: 11.5px; font-weight: 600; color: #7c3aed; background: color-mix(in srgb, #7c3aed 12%, transparent); border-radius: 6px; padding: 2px 7px; height: fit-content; }
@media (max-width: 960px) { .crm-detail { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .crm-req-row { flex-wrap: wrap; } .crm-req-row .grow { flex-basis: 100%; } .crm-board { grid-auto-columns: minmax(78vw, 1fr); } }

/* ===== Báo giá trọn gói (CRM) ===== */
.qt-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.qt-items { padding: 6px 14px 4px; }
.qt-item { display: grid; grid-template-columns: auto minmax(0, 1fr) 170px 96px auto; gap: 12px; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--border); opacity: .55; transition: opacity .15s; }
.qt-item.on { opacity: 1; } .qt-item:last-child { border-bottom: 0; }
.qt-item .field { margin: 0; } .qt-item .field label { font-size: 11.5px; }
.qt-check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.qt-check input { width: 18px; height: 18px; accent-color: #7c3aed; }
.qt-code { min-width: 34px; text-align: center; font-weight: 700; font-size: 12.5px; padding: 4px 6px; border-radius: 8px; background: color-mix(in srgb, #7c3aed 14%, transparent); color: #6d28d9; }
.qt-name { min-width: 0; display: grid; gap: 3px; } .qt-name b { font-size: 14px; } .qt-name small { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.qt-name input { padding: 6px 9px; }
.qt-price input { width: 100%; } .qt-price small { display: block; font-size: 11.5px; }
.qt-add { display: flex; align-items: center; gap: 10px; padding: 10px 18px 16px; }
.qt-side { display: grid; gap: 16px; position: sticky; top: 76px; }
.qt-sum, .qt-opts, .qt-vers { padding: 16px 18px; }
.qt-sum h3, .qt-opts h3, .qt-vers h3 { margin: 0 0 10px; font-size: 15px; }
.qt-sum h4 { margin: 14px 0 6px; font-size: 13.5px; }
.qt-line { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; font-size: 13.5px; border-bottom: 1px dashed var(--border); }
.qt-line b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.qt-line.total { border-bottom: 0; margin-top: 4px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, #7c3aed 10%, var(--surface)); font-size: 15px; }
.qt-line.total b { color: #6d28d9; font-size: 18px; }
.qt-words { margin: 6px 0 0; font-size: 12.5px; font-style: italic; color: var(--text-2); }
.qt-phase-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.qt-phase-row.empty { opacity: .5; } .qt-phase-row .grow { flex: 1; min-width: 0; } .qt-phase-row small { display: block; font-size: 11.5px; color: var(--muted); }
.qt-gd { font-weight: 700; font-size: 12px; padding: 3px 7px; border-radius: 7px; background: var(--surface-3); }
.qt-phase-row b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.qt-ver { display: grid; grid-template-columns: 34px auto 1fr auto; gap: 8px; align-items: center; padding: 8px 6px; border-radius: 8px; color: inherit; text-decoration: none !important; font-size: 13px; }
.qt-ver:hover, .qt-ver.on { background: var(--surface-2); } .qt-ver .crm-pill { justify-self: start; }
.qt-ver-t { font-weight: 700; font-variant-numeric: tabular-nums; }
.crm-quotes { padding: 14px 16px; } .crm-quotes .crm-box-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; } .crm-quotes h2 { margin: 0; }
.qp-table td { vertical-align: top; } .qp-table input, .qp-table textarea { width: 100%; min-width: 0; padding: 6px 8px; font-size: 13px; } .qp-table td:nth-child(3) { min-width: 240px; }
@media (max-width: 1100px) { .qt-layout { grid-template-columns: 1fr; } .qt-side { position: static; } }
@media (max-width: 640px) { .qt-item { grid-template-columns: auto minmax(0, 1fr); } .qt-item .qt-price, .qt-item .qt-phase { grid-column: 2; } }
.crm-quotes .crm-box-head { padding: 0; }
@media (max-width: 640px) { .qt-main .card-head .sub { display: none; } }
/* Logo & thông tin công ty trên báo giá */
.qp-co { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; align-items: start; }
.qp-logo { display: grid; gap: 8px; justify-items: start; }
.qp-logo-box { width: 200px; height: 110px; border: 1px dashed var(--border-strong); border-radius: 10px; display: grid; place-items: center; background: #fff; overflow: hidden; }
.qp-logo-box img { max-width: 180px; max-height: 96px; object-fit: contain; } .qp-logo-box span { font-size: 12.5px; color: #64748b; }
@media (max-width: 640px) { .qp-co { grid-template-columns: 1fr; } }
.qp-table td:nth-child(2) { min-width: 200px; }

/* NextG: chữ G màu xanh lục ngọc trong tên thương hiệu */
.brand-g { background: linear-gradient(90deg, #2dd4bf, #86efac); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-name { font-size: 52px; letter-spacing: -.035em; }
.side-brand b { font-size: 21px; letter-spacing: -.02em; font-weight: 800; }
@media (max-width: 760px) { .brand-name { font-size: 34px; } }
