/* Quản lý Trung tâm — giao diện (làm mới 05/11/2026)
   Ý tưởng "bìa hồ sơ": gáy hồ sơ màu mực chàm (thanh bên), trang giấy (nội dung), mục đang mở là tab hồ sơ nối liền với trang,
   con dấu đỏ cho thương hiệu và số việc cần làm. Chữ: Inter cho giao diện (dày đặc, số thẳng hàng), Lora cho tên trang.
   Mật độ gọn: chữ 14px, ô 32px, dòng bảng thấp; điện thoại: ô nhập 16px (iPhone không phóng to khi chạm). */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/inter-400.woff") format("woff"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/inter-500.woff") format("woff"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600 700; font-display: swap; src: url("/fonts/inter-600.woff") format("woff"); }
@font-face { font-family: "Lora"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/fonts/lora-var.woff") format("woff"); }

:root {
  /* Gáy hồ sơ (thanh bên) */
  --spine: #1d2a4d;
  --spine-2: #26355f;
  --spine-ink: #dfe4f1;
  --spine-muted: #8f9bbd;
  /* Trang giấy */
  --paper: #f2f3f6;
  --paper-2: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --ink: #1b2130;
  --ink-2: #474f66;
  --muted: #697088;
  --line: #d9dde6;
  --line-2: #e8eaf0;
  /* Mực dấu (chính) và dấu đỏ */
  --primary: #2b47a3;
  --primary-hover: #223a88;
  --primary-soft: #e9edf9;
  --seal: #c23a2e;
  --seal-soft: #fbeae8;
  --danger: #b42a20;
  --danger-soft: #fbeae8;
  --amber: #91600f;
  --amber-soft: #fbf1dc;
  --blue: #255da6;
  --blue-soft: #e6eefa;
  --ok: #1e7a4c;
  --ok-soft: #e2f3e9;
  --grey-soft: #eef0f4;
  /* Vai trò màu (giao diện sáng / tối dùng chung tên, khác giá trị — 05/11/2026) */
  --on-accent: #ffffff;          /* chữ trên nền màu chính, đỏ, xanh, vàng */
  --ink-strong: #1d2a4d;         /* số liệu lớn, mã, tiêu đề nhỏ màu mực chàm */
  --line-strong: #c5cbd8;
  --line-dash: #b8bfcf;
  --placeholder: #8a91a5;
  --strong-fill: #1d2a4d;        /* nền đậm của nhãn, bước đang làm (sáng: mực chàm; tối: mực dấu sáng) */
  --on-strong: #ffffff;
  --input-line: #d2d6e0;
  --faint: #a3a9ba;
  --row-hover: #f6f7fb;
  --row-selected: #edf0fb;
  --primary-line: #c3cdec;
  --danger-line: #ecc8c4;
  --danger-faint: #fff9f8;
  --danger-ink: #7c1d16;
  --amber-ink: #6a4309;
  --blue-ink: #1b3f70;
  --ok-ink: #165536;
  --warm-soft: #fffdf6;
  --warm-line: #e3d6b0;
  --ai-soft: #fff8e1;
  --ai-line: #e2b84f;
  --violet: #7a3e9d;
  --violet-soft: #faf6fc;
  --violet-soft-2: #f3e8f7;
  --violet-line: #c9b6d6;
  --bubble-mine: #e1e7f8;
  --bubble-mine-line: #c9d3f0;
  --file-bg: rgba(255, 255, 255, .7);
  --code-bg: rgba(255, 255, 255, .6);
  --toast-bg: #1b2130;
  --overlay: rgba(17, 23, 42, .42);
  --shadow-soft: rgba(22, 30, 54, .1);
  --shadow-deep: rgba(17, 23, 42, .24);
  --focus-ring: rgba(43, 71, 163, .14);
  --danger-ring: rgba(180, 42, 32, .14);
  --selection: rgba(43, 71, 163, .18);
  color-scheme: light;
  /* Tên cũ, giữ để các phần khác dùng chung */
  --bg: var(--paper);
  --cover: var(--spine);
  --cover-2: var(--spine-2);
  --cover-ink: var(--spine-ink);
  --cover-muted: var(--spine-muted);
  --gold: var(--seal);
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(22, 30, 54, 0.06), 0 6px 20px rgba(22, 30, 54, 0.08);
  --font: "Inter", "Segoe UI", "Roboto", "Noto Sans", Arial, sans-serif;
  --font-title: "Lora", "Georgia", "Times New Roman", serif;
  --sidebar-w: 228px;
  --sel-w: 40px;
  --code-w: 96px;
  --ctl-h: 32px;
}

/* ---------------- Giao diện tối (05/11/2026): "hồ sơ dưới đèn bàn" ----------------
   Gáy hồ sơ tối hơn trang để mục đang mở vẫn là tab nối liền với trang; mực dấu sáng lên thành xanh nhạt,
   chữ trên nền màu đổi sang mực tối. Chỉ áp dụng trên màn hình — in ấn luôn dùng bảng màu sáng. */
@media screen {
  :root[data-theme="dark"] {
    --spine: #0d1222;
    --spine-2: #182039;
    --spine-ink: #c9d0e4;
    --spine-muted: #7a85a6;
    --paper: #151a25;
    --paper-2: #1a202c;
    --surface: #1c2230;
    --surface-2: #222938;
    --ink: #e6e9f0;
    --ink-2: #bac0cf;
    --muted: #8f96aa;
    --line: #323a4e;
    --line-2: #282f41;
    --primary: #8fa5f4;
    --primary-hover: #a9bbf8;
    --primary-soft: #232c4c;
    --seal: #c23a2e;             /* số trên menu: chữ trắng trên đỏ vẫn đủ tương phản */
    --seal-soft: #3a2024;
    --danger: #f08b81;
    --danger-soft: #3a2023;
    --amber: #e2b257;
    --amber-soft: #352b17;
    --blue: #82b2f0;
    --blue-soft: #1b2a42;
    --ok: #6bcb98;
    --ok-soft: #173126;
    --grey-soft: #272e3e;
    --on-accent: #0e1326;
    --ink-strong: #eceff6;
    --line-strong: #4a5470;
    --line-dash: #4d5770;
    --placeholder: #7d859b;
    --strong-fill: #8fa5f4;
    --on-strong: #0e1326;
    --input-line: #465069;
    --faint: #626a80;
    --row-hover: #222a3a;
    --row-selected: #26304f;
    --primary-line: #3c4a80;
    --danger-line: #5b3034;
    --danger-faint: #271b1e;
    --danger-ink: #f5b8b0;
    --amber-ink: #edcd8a;
    --blue-ink: #b0cdf3;
    --ok-ink: #a3dec0;
    --warm-soft: #211e17;
    --warm-line: #4a4230;
    --ai-soft: #2e2814;
    --ai-line: #8a6d22;
    --violet: #c6a0e2;
    --violet-soft: #271f31;
    --violet-soft-2: #32263f;
    --violet-line: #54436a;
    --bubble-mine: #25315a;
    --bubble-mine-line: #354380;
    --file-bg: rgba(255, 255, 255, .05);
    --code-bg: rgba(255, 255, 255, .08);
    --toast-bg: #2b3450;
    --overlay: rgba(3, 6, 14, .62);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
    --shadow-soft: rgba(0, 0, 0, .35);
    --shadow-deep: rgba(0, 0, 0, .55);
    --focus-ring: rgba(143, 165, 244, .26);
    --danger-ring: rgba(240, 139, 129, .24);
    --selection: rgba(143, 165, 244, .3);
    color-scheme: dark;
  }
}

/* ---------------- Màu giao diện của đơn vị (Cài đặt hệ thống, 08/11/2026) ----------------
   theme-boot.js đặt các biến --u-* (tính bằng public/js/colors-core.js) lên :root và thêm thuộc tính data-colors khi giao diện
   đang hiện (sáng / tối) có màu riêng. Khung xem trước ở trang Cài đặt dùng cùng cách (.color-preview). Chỉ trên màn hình. */
@media screen {
  :root[data-colors], .color-preview[data-colors] {
    --paper: var(--u-paper);
    --paper-2: var(--u-paper-2);
    --surface: var(--u-surface);
    --surface-2: var(--u-surface-2);
    --ink: var(--u-ink);
    --ink-2: var(--u-ink-2);
    --muted: var(--u-muted);
    --placeholder: var(--u-placeholder);
    --faint: var(--u-faint);
    --line: var(--u-line);
    --line-2: var(--u-line-2);
    --line-strong: var(--u-line-strong);
    --line-dash: var(--u-line-dash);
    --input-line: var(--u-input-line);
    --grey-soft: var(--u-grey-soft);
    --ink-strong: var(--u-ink-strong);
    --toast-bg: var(--u-toast-bg);
    --primary: var(--u-primary);
    --primary-hover: var(--u-primary-hover);
    --primary-soft: var(--u-primary-soft);
    --primary-line: var(--u-primary-line);
    --row-hover: var(--u-row-hover);
    --row-selected: var(--u-row-selected);
    --bubble-mine: var(--u-bubble-mine);
    --bubble-mine-line: var(--u-bubble-mine-line);
    --focus-ring: var(--u-focus-ring);
    --selection: var(--u-selection);
    --strong-fill: var(--u-strong-fill);
    --on-accent: var(--u-on-accent);
    --on-strong: var(--u-on-strong);
    --spine: var(--u-spine);
    --spine-2: var(--u-spine-2);
    --spine-ink: var(--u-spine-ink);
    --spine-muted: var(--u-spine-muted);
    --bg: var(--u-paper);
    --cover: var(--u-spine);
    --cover-2: var(--u-spine-2);
    --cover-ink: var(--u-spine-ink);
    --cover-muted: var(--u-spine-muted);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11" 1, "ss01" 0;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--primary); }
.num, td.num, .tabnum { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.boot { display: grid; place-items: center; height: 100vh; height: 100dvh; color: var(--muted); }
[hidden] { display: none !important; }

/* ---------------- Con dấu (thương hiệu) ---------------- */
.seal-mark { flex: none; display: block; }

/* ---------------- Đăng nhập: trang thị thực ---------------- */
.login {
  min-height: 100vh; min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(300px, 460px) 1fr;
  background: var(--paper);
}
.login-cover {
  position: relative; overflow: hidden;
  background-color: var(--spine);
  /* Vân bảo an kiểu trang hộ chiếu: các vòng sóng mảnh, rất nhạt */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.05' stroke-width='1'%3E%3Cpath d='M0 120 Q30 90 60 120 T120 120 T180 120 T240 120'/%3E%3Cpath d='M0 132 Q30 102 60 132 T120 132 T180 132 T240 132'/%3E%3Cpath d='M0 108 Q30 78 60 108 T120 108 T180 108 T240 108'/%3E%3Ccircle cx='120' cy='120' r='96'/%3E%3Ccircle cx='120' cy='120' r='72'/%3E%3Ccircle cx='0' cy='0' r='72'/%3E%3Ccircle cx='240' cy='240' r='72'/%3E%3Ccircle cx='240' cy='0' r='48'/%3E%3Ccircle cx='0' cy='240' r='48'/%3E%3C/g%3E%3C/svg%3E");
  color: var(--spine-ink);
  padding: 40px 40px 32px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
}
.login-cover .brand { font-size: 15px; font-weight: 600; display: flex; gap: 12px; align-items: center; color: #fff; }
.login-cover h1 { font-family: var(--font-title); font-size: 30px; line-height: 1.22; font-weight: 600; margin: 0 0 14px; color: #fff; max-width: 15em; }
.login-cover p { color: var(--spine-muted); margin: 0; max-width: 34ch; }
.login-cover .foil { display: none; }
/* Dấu "đã duyệt" lớn, nghiêng — chỉ trang trí ở màn hình đăng nhập */
.login-cover::after {
  content: ""; position: absolute; right: -54px; bottom: 74px; width: 200px; height: 200px; border-radius: 50%;
  border: 3px solid rgba(194, 58, 46, .55); box-shadow: inset 0 0 0 7px var(--spine), inset 0 0 0 9px rgba(194, 58, 46, .45);
  transform: rotate(-14deg); pointer-events: none;
}
.login-main { display: grid; place-items: center; padding: 32px 20px; }
.login-card { width: 100%; max-width: 360px; }
.login-card h2 { font-family: var(--font-title); font-size: 24px; margin: 0 0 6px; font-weight: 600; }
.login-card .hint { color: var(--muted); margin: 0 0 22px; }
.login-card .field { margin-bottom: 14px; }
.login-card .btn { width: 100%; justify-content: center; height: 40px; }
@media (max-width: 760px) {
  .login { grid-template-columns: 1fr; }
  .login-cover { padding: 22px 18px 20px; gap: 16px; }
  .login-cover h1 { font-size: 21px; margin-bottom: 6px; }
  .login-cover p { font-size: 13px; }
  .login-cover::after { width: 120px; height: 120px; right: -36px; bottom: auto; top: -30px; }
  .login-cover > div:last-child { display: none; }
}

/* ---------------- Khung ứng dụng: gáy hồ sơ + trang ---------------- */
.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; min-height: 100dvh; }
.sidebar {
  background: var(--spine);
  color: var(--spine-ink);
  position: sticky; top: 0; height: 100vh; height: 100dvh;
  display: flex; flex-direction: column;
  z-index: 40;
}
:is(.sidebar, .pv-sidebar) .brand {
  display: flex; align-items: center; gap: 11px;
  padding: 16px 16px 14px 16px;
  font-weight: 600; font-size: 14.5px; color: #fff; line-height: 1.25;
}
:is(.sidebar, .pv-sidebar) .brand > div { font-family: var(--font-title); font-size: 15.5px; letter-spacing: .005em; min-width: 0; }
:is(.sidebar, .pv-sidebar) .brand small { display: block; font-family: var(--font); font-weight: 400; color: var(--spine-muted); font-size: 12px; margin-top: 1px; letter-spacing: 0; }
.nav { padding: 4px 0 12px 10px; display: flex; flex-direction: column; flex: 1; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
.nav-group { display: flex; flex-direction: column; gap: 1px; }
.nav-group + .nav-group { margin-top: 6px; }
.nav-group-label { font-size: 11.5px; color: var(--spine-muted); padding: 6px 12px 3px; font-weight: 500; }
/* Đầu mục nhóm (23/11/2026): bấm để thu gọn / mở; nhóm thu gọn hiện tổng số việc mới ở đầu mục */
.nav-group-toggle {
  display: flex; align-items: center; gap: 8px; width: calc(100% - 10px); margin: 0; padding: 8px 8px 5px 12px;
  background: transparent; border: 0; border-radius: 6px; cursor: pointer; text-align: left;
  font: inherit; font-size: 12.5px; font-weight: 700; letter-spacing: .01em; color: var(--spine-ink); /* 23/11/2026: đầu mục rõ hơn (trước: 11.5px, chữ mờ) */
}
.nav-group-toggle:hover { background: rgba(255, 255, 255, 0.07); }
.nav-group-toggle:focus-visible { outline: 2px solid var(--spine-ink); outline-offset: -2px; }
.nav-group-name { flex: 1; min-width: 0; }
.nav-group-toggle svg { width: 14px; height: 14px; flex: none; opacity: .85; transition: transform .16s ease; }
.nav-group.collapsed .nav-group-toggle svg { transform: rotate(180deg); }
.nav-group-toggle .nav-group-badge { min-width: 18px; height: 18px; font-size: 10.5px; padding: 0 5px; }
.nav-group:not(.collapsed) .nav-group-badge { display: none; }
.nav-items { display: grid; grid-template-rows: 1fr; grid-template-columns: minmax(0, 1fr); transition: grid-template-rows .16s ease; }
/* Mục con lùi vào, có đường dọc bên trái (23/11/2026); thu gọn nhóm thì đường dọc ẩn theo.
   overflow: hidden chỉ khi thu gọn / đang chuyển — để góc cong của mục đang mở (::before/::after) không bị cắt. */
.nav-items-in {
  min-height: 0; overflow: visible; display: flex; flex-direction: column; gap: 1px;
  margin: 1px 0 2px 12px; padding-left: 6px;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
  border-left-color: color-mix(in srgb, var(--spine-ink) 24%, transparent);
}
.nav-group.collapsed .nav-items-in, .nav-group.nav-anim .nav-items-in { overflow: hidden; }
.nav-group.collapsed .nav-items { grid-template-rows: 0fr; }
.nav-group.collapsed .nav-items-in { visibility: hidden; transition: visibility 0s .16s; }
.nav-pinned { padding-bottom: 4px; margin-bottom: 2px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); margin-right: 10px; }
.nav-pinned a { margin-right: -10px; }
.nav-fold-all {
  align-self: flex-start; margin: 12px 0 0 4px; padding: 4px 8px; border: 0; border-radius: 6px; background: transparent; cursor: pointer;
  font: inherit; font-size: 11.5px; color: var(--spine-muted); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, .25);
}
.nav-fold-all:hover { color: var(--spine-ink); }
.nav-fold-all:focus-visible { outline: 2px solid var(--spine-ink); outline-offset: 1px; }
@media (prefers-reduced-motion: reduce) { .nav-items, .nav-group-toggle svg { transition: none; } .nav-group.collapsed .nav-items-in { transition: none; } }
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 12px; border-radius: 8px 0 0 8px;
  color: var(--spine-ink); text-decoration: none; font-size: 13.5px;
  position: relative;
}
.nav a svg { width: 17px; height: 17px; flex: none; opacity: .78; }
.nav a:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
/* Mục đang mở: tab hồ sơ nối liền với trang giấy */
.nav a[aria-current="page"] { background: var(--paper); color: var(--ink); font-weight: 600; }
.nav a[aria-current="page"] svg { opacity: 1; color: var(--primary); }
.nav a[aria-current="page"]::before, .nav a[aria-current="page"]::after {
  content: ""; position: absolute; right: 0; width: 10px; height: 10px; background: transparent; pointer-events: none;
}
.nav a[aria-current="page"]::before { top: -10px; border-bottom-right-radius: 10px; box-shadow: 4px 4px 0 4px var(--paper); }
.nav a[aria-current="page"]::after { bottom: -10px; border-top-right-radius: 10px; box-shadow: 4px -4px 0 4px var(--paper); }

/* Tài khoản đang dùng: một dòng gọn, bấm mở các việc của tài khoản */
.sidebar .me { position: relative; padding: 10px 10px 12px; border-top: 1px solid rgba(255, 255, 255, 0.08); font-size: 13px; }
.me-toggle {
  width: 100%; display: flex; align-items: center; gap: 10px; text-align: left;
  background: transparent; border: 0; color: var(--spine-ink); padding: 6px; border-radius: 8px; cursor: pointer;
}
.me-toggle:hover, .me-toggle[aria-expanded="true"] { background: rgba(255, 255, 255, 0.07); }
.me-toggle .me-ini {
  width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--spine-ink); color: var(--spine); font-weight: 600; font-size: 12px;
}
.me-toggle .me-text { flex: 1; min-width: 0; }
.sidebar .me strong { display: block; color: #fff; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar .me .me-role { display: block; color: var(--spine-muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-toggle svg { width: 16px; height: 16px; flex: none; opacity: .7; transition: transform .15s ease; }
.me-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.sidebar .me .row { display: flex; flex-direction: column; gap: 1px; margin-top: 6px; }
.sidebar .me .row[hidden] { display: none !important; }
.sidebar .me .row button {
  background: transparent; border: 0; color: var(--spine-ink); text-align: left;
  border-radius: 6px; padding: 6px 10px 6px 46px; font-size: 13px; cursor: pointer;
}
.sidebar .me .row button:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; }
.content { padding: 20px 26px 44px; max-width: 100%; }
/* Kéo mép phải để đổi độ rộng thanh menu (23/11/2026) */
.side-resize {
  position: absolute; top: 0; bottom: 0; right: -4px; width: 8px; z-index: 41;
  cursor: col-resize; touch-action: none; outline: none;
}
.side-resize::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 3px; width: 2px; background: transparent; transition: background .12s;
}
.side-resize:hover::after, .side-resize:focus-visible::after, body.side-resizing .side-resize::after { background: var(--primary); }
body.side-resizing { cursor: col-resize; user-select: none; -webkit-user-select: none; }
body.side-resizing .main { pointer-events: none; }
.nav-label, .nav-group-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar .brand small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* thanh hẹp: dòng phụ một dòng (tên đơn vị vẫn tối đa 2 dòng; đủ khi rê chuột) */

@media (max-width: 900px) {
  .side-resize { display: none; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 270px; transform: translateX(-100%); transition: transform .2s ease; }
  .shell.nav-open .sidebar { transform: translateX(0); box-shadow: 0 0 0 100vmax rgba(15, 20, 38, 0.4); }
  .nav { padding-right: 10px; }
  .nav-pinned { margin-right: 0; }
  .nav-pinned a { margin-right: 0; }
  .nav-group-toggle { width: 100%; }
  .nav a { border-radius: 8px; }
  .nav a[aria-current="page"]::before, .nav a[aria-current="page"]::after { display: none; }
  .topbar {
    display: flex; align-items: center; gap: 10px;
    background: var(--spine); color: #fff; padding: 8px 12px; position: sticky; top: 0; z-index: 30;
  }
  .topbar button { background: transparent; border: 0; color: #fff; padding: 6px; cursor: pointer; display: grid; }
  .topbar .t { font-weight: 600; font-family: var(--font-title); font-size: 15.5px; }
  .content { padding: 14px 12px 40px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------------- Tiêu đề trang ---------------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 14px; }
.page-head h1 { font-family: var(--font-title); font-size: 23px; line-height: 1.2; font-weight: 600; margin: 0; letter-spacing: -0.005em; }
.page-head p { margin: 4px 0 0; color: var(--muted); max-width: 78ch; font-size: 13px; }
.page-head .actions { display: flex; gap: 6px; flex-wrap: wrap; min-width: 0; max-width: 100%; }
.page-head > div { min-width: 0; max-width: 100%; }
.page-head .actions > .tabs { min-width: 0; }
@media (max-width: 600px) { .page-head h1 { font-size: 20px; } }

/* ---------------- Nút ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: var(--ctl-h); padding: 0 12px;
  border-radius: 7px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink);
  cursor: pointer; white-space: nowrap; font-weight: 500; font-size: 13.5px;
  text-decoration: none;
}
.btn:hover { background: var(--paper-2); border-color: var(--line-strong); }
.btn svg { width: 15px; height: 15px; flex: none; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-accent); }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.danger { color: var(--danger); border-color: var(--danger-line); }
.btn.danger:hover { background: var(--danger-soft); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--grey-soft); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 13px; }
.btn.xs { height: 24px; padding: 0 8px; font-size: 12.5px; gap: 4px; border-radius: 6px; }
.btn.xs svg { width: 13px; height: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.busy { position: relative; color: transparent !important; }
.btn.busy::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid currentColor; border-color: var(--on-accent) var(--on-accent) transparent transparent; animation: spin .7s linear infinite;
}
.btn:not(.primary).busy::after { border-color: var(--primary) var(--primary) transparent transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { background: transparent; border: 0; padding: 5px; border-radius: 6px; cursor: pointer; color: var(--ink-2); display: inline-grid; }
.icon-btn:hover { background: var(--grey-soft); color: var(--ink); }
.icon-btn svg { width: 17px; height: 17px; }

/* ---------------- Biểu mẫu ---------------- */
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > label, .field > .label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field label.is-req::after, .field .label.is-req::after { content: '*'; color: var(--danger); margin-left: 3px; }
.field .help { font-size: 12px; color: var(--muted); }
.field .err { font-size: 12.5px; color: var(--danger); }
.input, select.input, textarea.input {
  height: var(--ctl-h); padding: 0 10px;
  border: 1px solid var(--input-line); border-radius: 7px; background: var(--surface);
  width: 100%; min-width: 0; font-size: 13.5px;
}
textarea.input { height: auto; min-height: 72px; padding: 7px 10px; resize: vertical; line-height: 1.45; }
select.input { padding-right: 28px; }
.input:hover { border-color: var(--line-strong); }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--focus-ring); }
.input[readonly] { background: var(--surface-2); }
.input:disabled { background: var(--grey-soft); color: var(--muted); cursor: not-allowed; }
.input:disabled::placeholder { color: transparent; }
.input::placeholder { color: var(--placeholder); }
.has-error .input { border-color: var(--danger); }
.has-error .input:focus { box-shadow: 0 0 0 3px var(--danger-ring); }
/* Điện thoại: ô nhập 16px — iPhone không tự phóng to khi chạm vào ô */
@media (max-width: 900px) {
  .input, select.input, textarea.input { font-size: 16px; }
  .input, select.input { height: 38px; }
  .btn { height: 36px; }
  .btn.sm { height: 32px; }
}
.grid { display: grid; gap: 12px 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.span-all { grid-column: 1 / -1; }
@media (max-width: 700px) {
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
}
.check { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--primary); }

.section-title {
  font-size: 13.5px; font-weight: 600; color: var(--ink);
  margin: 20px 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line-2);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
form > .section-title:first-child, .drawer-body > .section-title:first-child { margin-top: 0; }

/* Danh sách dòng lặp (trường học, kinh nghiệm, gia đình) */
.repeat { display: flex; flex-direction: column; gap: 8px; }
.repeat-row { display: grid; gap: 8px; align-items: start; }
.repeat-row .icon-btn { margin-top: 4px; }
.repeat-empty { color: var(--muted); font-size: 13px; padding: 8px 0; }
/* Trường học: Bậc học | Tên trường | Học từ | Học đến (mọi chương trình) */
.rr-school {
  grid-template-columns: 140px minmax(0, 1.35fr) minmax(0, 1fr) 96px 96px 34px;
  grid-template-areas: "lv nm mj fr to del" "dg dg dg gp gp ."; row-gap: 6px;
}
.rr-school > :nth-child(1) { grid-area: lv; }
.rr-school > :nth-child(2) { grid-area: nm; }
.rr-school > :nth-child(3) { grid-area: mj; }
.rr-school > :nth-child(4) { grid-area: fr; }
.rr-school > :nth-child(5) { grid-area: to; }
.rr-school > :nth-child(6) { grid-area: del; }
.rr-school > :nth-child(7) { grid-area: dg; } /* văn bằng (20/11/2026) */
.rr-school > :nth-child(8) { grid-area: gp; } /* điểm trung bình */
.repeat-row.rr-school { padding: 8px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); }
.repeat-head.rr-school { padding: 0 9px; row-gap: 0; }
.rr-work { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 96px 96px 34px; }
/* Gia đình: 2 dòng cho mỗi người — Quan hệ | Họ tên | Năm sinh, rồi Nghề nghiệp | Nơi ở hiện tại */
.rr-family {
  grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1fr) 96px 34px;
  grid-template-areas: "rel name name year del" "job job home home ." "phn phn spn spn .";
  row-gap: 6px;
}
.rr-family > :nth-child(1) { grid-area: rel; }
.rr-family > :nth-child(2) { grid-area: name; }
.rr-family > :nth-child(3) { grid-area: year; }
.rr-family > :nth-child(4) { grid-area: job; }
.rr-family > :nth-child(5) { grid-area: home; }
.rr-family > :nth-child(6) { grid-area: live; }
.rr-family > :nth-child(7) { grid-area: hlth; }
.rr-family > :nth-child(8) { grid-area: del; }
.rr-family > :nth-child(9) { grid-area: phn; } /* SĐT (20/11/2026) */
.rr-family > :nth-child(10) { grid-area: spn; } /* người bảo lãnh tài chính */
.fam-sponsor { min-height: 34px; display: flex; align-items: center; }
.fam-sponsor .check { font-size: 13px; }
.repeat-row.rr-family { padding: 8px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); }
.repeat-head.rr-family { padding: 0 9px; row-gap: 2px; }
.repeat-head { display: grid; gap: 8px; font-size: 12px; color: var(--muted); font-weight: 600; }
@media (max-width: 700px) {
  .rr-school { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 34px; grid-template-areas: "lv lv del" "nm nm ." "mj mj ." "fr to ." "dg dg ." "gp gp ."; }
  .rr-school > .field[data-key$="major"]::before, .rr-school > .field[data-key$="from_ym"]::before, .rr-school > .field[data-key$="to_ym"]::before { display: block; margin-bottom: 3px; font-size: 12px; font-weight: 600; color: var(--muted); }
  .rr-school > .field[data-key$="major"]::before { content: 'Chuyên ngành'; }
  .rr-school > .field[data-key$="from_ym"]::before { content: 'Học từ'; }
  .rr-school > .field[data-key$="to_ym"]::before { content: 'Học đến'; }
  .rr-family { grid-template-columns: minmax(0, 1fr) 88px 34px; grid-template-areas: "rel year del" "name name ." "job job ." "home home ." "phn phn ." "spn spn ."; }
  .rr-work { grid-template-columns: 1fr 1fr 34px; }
  .rr-work > :first-child { grid-column: 1 / 3; }
  .repeat-head { display: none; }
}

/* Ảnh thẻ */
.photo-box { display: flex; gap: 14px; align-items: flex-start; }
.photo-frame {
  width: 96px; height: 128px; border-radius: 6px; border: 1px dashed var(--line-dash); background: var(--surface-2);
  display: grid; place-items: center; overflow: hidden; color: var(--muted); font-size: 12px; text-align: center; flex: none;
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; }
.photo-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }

/* ---------------- Thẻ, bộ lọc ---------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card-pad { padding: 14px 16px; }
/* Bộ lọc: một dải gọn, nhãn nhỏ phía trên ô */
.filters {
  display: grid; gap: 8px 10px; padding: 10px 12px; margin-bottom: 12px;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  align-items: end; background: var(--paper-2);
}
.filters .field > label { font-size: 12px; font-weight: 500; color: var(--muted); }
.filters .wide { grid-column: span 2; }
.filters .end { display: flex; gap: 6px; align-items: end; }
@media (max-width: 600px) { .filters .wide { grid-column: auto; } }
.range { display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px; align-items: center; }
.range span { color: var(--muted); }

/* ---------------- Bảng ---------------- */
.table-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.table-tools {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 12px; border-bottom: 1px solid var(--line-2);
}
.table-tools .count { color: var(--muted); font-size: 13px; }
.table-tools .count strong { color: var(--ink); }
.table-tools .spacer { flex: 1; }
.table-scroll { overflow: auto; max-height: calc(100vh - 250px); max-height: calc(100dvh - 250px); min-height: 160px; }
table.data { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 100%; font-size: 13.5px; }
table.data th, table.data td {
  text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--line-2);
  vertical-align: top; background: var(--surface);
}
table.data th {
  position: sticky; top: 0; z-index: 2;
  background: var(--paper-2); font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  white-space: nowrap; border-bottom: 1px solid var(--line); padding-top: 7px; padding-bottom: 7px;
}
table.data th.sortable { cursor: pointer; user-select: none; }
table.data th.sortable:hover { color: var(--ink); }
table.data th .arrow { display: inline-block; width: 10px; margin-left: 4px; color: var(--primary); }
table.data tbody tr:hover td { background: var(--row-hover); }
table.data tbody tr.clickable { cursor: pointer; }
table.data tbody tr.selected td { background: var(--row-selected); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data td.nowrap, table.data th.nowrap { white-space: nowrap; }
table.data .sticky { position: sticky; z-index: 1; }
table.data th.sticky { z-index: 3; }
table.data .st-sel { left: 0; width: var(--sel-w); min-width: var(--sel-w); }
table.data .st-code { left: var(--code-left, 0); width: var(--code-w); min-width: var(--code-w); }
table.data .st-name { left: var(--name-left, var(--code-w)); min-width: 170px; box-shadow: 1px 0 0 var(--line); }
table.data td.muted { color: var(--muted); }
.cell-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; min-width: 200px; }
.cell-list li { line-height: 1.35; }
.cell-list .k { color: var(--muted); font-size: 12.5px; margin-right: 4px; }
.cell-sub { color: var(--muted); font-size: 12.5px; }
.thumb { width: 30px; height: 40px; border-radius: 4px; object-fit: cover; background: var(--grey-soft); display: block; border: 1px solid var(--line-2); }
.thumb.empty { display: grid; place-items: center; color: var(--faint); }
.thumb.empty svg { width: 16px; height: 16px; }
/* Mã ứng viên / số chứng từ: như số hồ sơ đóng trên bìa */
.code { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--primary); white-space: nowrap; letter-spacing: .01em; }
.empty-state { padding: 36px 20px; text-align: center; color: var(--muted); }
.empty-state strong { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }
.loading-row td { color: var(--muted); }
.row-actions { display: flex; gap: 4px; flex-wrap: nowrap; }
.pager { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--line-2); flex-wrap: wrap; font-size: 13px; }
.pager .info { color: var(--muted); }
.pager .spacer { flex: 1; }
.pager select { height: 28px; width: auto; }
.pager .pages { display: flex; gap: 4px; }
.pager .pages button { min-width: 28px; height: 28px; border: 1px solid var(--line); background: var(--surface); border-radius: 6px; cursor: pointer; }
.pager .pages button[aria-current="page"] { background: var(--primary); border-color: var(--primary); color: var(--on-accent); }
.pager .pages button[disabled] { opacity: .5; cursor: default; }

/* Menu chọn cột */
.popover {
  position: absolute; z-index: 60; background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: var(--shadow); padding: 6px; min-width: 220px; max-height: 360px; overflow: auto;
}
.popover .check { display: flex; padding: 5px 6px; border-radius: 5px; }
.popover .check:hover { background: var(--surface-2); }

/* ---------------- Nhãn trạng thái ---------------- */
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  height: 21px; padding: 0 8px; border-radius: 11px;
  font-size: 12px; font-weight: 500; white-space: nowrap;
  background: var(--grey-soft); color: var(--ink-2);
}
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.tag.blue { background: var(--blue-soft); color: var(--blue); }
.tag.green { background: var(--ok-soft); color: var(--ok); }
.tag.amber { background: var(--amber-soft); color: var(--amber); }
.tag.red { background: var(--danger-soft); color: var(--danger); }
.tag.dark { background: var(--strong-fill); color: var(--on-strong); }
.tag.dark::before { background: #ff8b7e; opacity: 1; }
.tag.plain::before { display: none; }

/* Dải "con dấu" 8 loại giấy tờ */
.stamps { display: flex; gap: 4px; align-items: center; }
.stamp {
  width: 32px; height: 24px; border-radius: 4px;
  display: grid; place-items: center;
  font-size: 10.5px; font-weight: 700; letter-spacing: .01em;
  border: 1.5px dashed var(--line-dash); color: var(--muted); background: transparent;
  font-variant-numeric: tabular-nums;
}
.stamp.s-ok { border: 1.5px solid var(--ok); color: var(--on-accent); background: var(--ok); }
.stamp.s-warn { border: 1.5px solid var(--amber); color: var(--amber); background: var(--amber-soft); }
.stamps .tally { margin-left: 8px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stamps .tally small { color: var(--muted); font-weight: 400; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); align-items: center; }
.legend .stamp { width: 26px; height: 20px; font-size: 10px; }
.legend span { display: inline-flex; gap: 6px; align-items: center; }

/* ---------------- Ngăn kéo / hộp thoại ---------------- */
.overlay { position: fixed; inset: 0; background: var(--overlay); z-index: 80; display: flex; justify-content: flex-end; }
.overlay.center { justify-content: center; align-items: center; padding: 16px; overflow-y: auto; }
.drawer {
  width: min(820px, 100%); height: 100%; background: var(--surface);
  display: flex; flex-direction: column; box-shadow: -10px 0 34px var(--shadow-deep);
  animation: slidein .18s ease-out;
}
.drawer.narrow { width: min(560px, 100%); }
@keyframes slidein { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.drawer-head, .modal-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 14px 18px 12px; border-bottom: 1px solid var(--line-2);
}
.drawer-head h2, .modal-head h2 { margin: 0; font-family: var(--font-title); font-size: 19px; line-height: 1.25; font-weight: 600; }
.drawer-head .sub, .modal-head .sub { color: var(--muted); margin-top: 3px; font-size: 12.5px; }
.drawer-body { flex: 1; overflow: auto; padding: 16px 18px 26px; }
.drawer-foot, .modal-foot {
  display: flex; justify-content: flex-end; gap: 6px; padding: 10px 18px;
  border-top: 1px solid var(--line-2); background: var(--paper-2); flex-wrap: wrap;
}
.drawer-foot .left { margin-right: auto; display: flex; gap: 6px; }
.modal {
  width: min(560px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); background: var(--surface); border-radius: 12px;
  display: flex; flex-direction: column; box-shadow: 0 24px 60px var(--shadow-deep); margin: auto;
}
.modal.wide { width: min(1080px, 100%); }
.modal-body { padding: 14px 18px; overflow: auto; }
.modal-body p { margin: 0 0 10px; }

/* Thẻ hộ chiếu (thông tin nhận diện chỉ đọc) */
.idcard {
  display: grid; grid-template-columns: 88px 1fr; gap: 14px;
  padding: 12px; border-radius: 10px; background: var(--paper-2); border: 1px solid var(--line-2); margin-bottom: 16px;
}
.idcard .photo-frame { width: 88px; height: 117px; border-style: solid; }
.idcard h3 { margin: 0; font-family: var(--font-title); font-size: 18px; font-weight: 600; }
.idcard .code { font-size: 13px; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px 16px; margin-top: 8px; }
.kv div { min-width: 0; }
.kv dt { font-size: 12px; color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.kv-block { margin-top: 12px; }
.kv-block h4 { font-size: 12px; color: var(--muted); margin: 0 0 4px; font-weight: 600; }
@media (max-width: 560px) { .idcard { grid-template-columns: 1fr; } }

/* Dòng thời gian (ghi chú, lịch sử) */
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.timeline li { padding: 8px 0 8px 18px; border-left: 2px solid var(--line-2); position: relative; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 13px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--primary); }
.timeline .meta { font-size: 12px; color: var(--muted); }
.timeline .body { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 2px; }
.timeline .empty { color: var(--muted); border: 0; padding-left: 0; }
.timeline .empty::before { display: none; }

/* Bảng giấy tờ trong ngăn kéo */
.doc-grid { display: flex; flex-direction: column; gap: 6px; }
.doc-row { display: grid; grid-template-columns: 210px 150px 130px minmax(0, 1fr); gap: 8px; align-items: center; padding: 7px 10px; border: 1px solid var(--line-2); border-radius: 8px; }
.doc-row .name { font-weight: 600; display: flex; gap: 8px; align-items: center; }
.doc-head { display: grid; grid-template-columns: 210px 150px 130px minmax(0, 1fr); gap: 8px; font-size: 12px; color: var(--muted); font-weight: 600; padding: 0 10px; }
@media (max-width: 760px) {
  .doc-row { grid-template-columns: 1fr 1fr; }
  .doc-row .name { grid-column: 1 / -1; }
  .doc-row > :last-child { grid-column: 1 / -1; }
  .doc-head { display: none; }
}

/* ---------------- Thông báo ---------------- */
.toasts { position: fixed; left: 50%; top: 12px; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 6px; width: max-content; max-width: min(520px, calc(100vw - 24px)); }
.toast {
  background: var(--toast-bg); color: #fff; border-radius: 9px; padding: 10px 13px; box-shadow: var(--shadow); font-size: 13.5px;
  display: flex; gap: 10px; align-items: flex-start; animation: toastin .18s ease-out;
}
.toast.ok { background: #18563b; }
.toast.err { background: #8f2219; }
.toast.warn { background: #6c4709; }
.toast .x { margin-left: auto; background: transparent; border: 0; color: inherit; opacity: .7; cursor: pointer; padding: 0 2px; font-size: 16px; line-height: 1; }
@keyframes toastin { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }

.alert { border-radius: 8px; padding: 9px 12px; margin-bottom: 12px; display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; }
.alert.err { background: var(--danger-soft); color: var(--danger-ink); }
.alert.warn { background: var(--amber-soft); color: var(--amber-ink); }
.alert.info { background: var(--blue-soft); color: var(--blue-ink); }
.handover-note { margin: 6px 0 0; padding: 7px 10px; font-size: 13px; }
.alert.ok { background: var(--ok-soft); color: var(--ok-ink); }
.alert ul { margin: 6px 0 0; padding-left: 18px; }
.alert > svg { width: 17px; height: 17px; flex: none; margin-top: 1px; }

/* ---------------- Dashboard ---------------- */
/* Chỉ số: một dải sổ cái chia ô (không phải các thẻ rời); đường chia vẽ bằng bóng 1px — số ô bao nhiêu cũng gọn */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(176px, 1fr)); margin-bottom: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.stat { background: var(--surface); padding: 12px 16px 13px; min-width: 0; box-shadow: -1px 0 0 var(--line-2), 0 -1px 0 var(--line-2); }
.stat .label { color: var(--ink-2); font-size: 12.5px; font-weight: 600; }
.stat .value { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 3px; line-height: 1.1; color: var(--ink); letter-spacing: -0.01em; }
.stat .note { color: var(--muted); font-size: 12px; margin-top: 3px; }
a.stat { text-decoration: none; color: inherit; }
a.stat:hover { background: var(--paper-2); }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stat .value { font-size: 22px; } }
/* Hai biểu đồ tròn cạnh nhau để so sánh; tin tuyển dụng / tuyển sinh mới nhất ở dưới */
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin-bottom: 12px; }
@media (max-width: 1200px) { .dash-grid { grid-template-columns: 1fr; } }
.dash-jobs .joblist { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 22px; }
@media (max-width: 1000px) { .dash-jobs .joblist { grid-template-columns: 1fr; } }
.dash-adm, .dash-dom { margin-top: 12px; }
.dash-adm .adm-majors, .dash-adm .adm-sch { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card h2 { font-family: var(--font-title); font-size: 16.5px; margin: 0 0 3px; font-weight: 600; }
.card .card-sub { color: var(--muted); font-size: 12.5px; margin: 0 0 10px; }
.pie-wrap { display: grid; grid-template-columns: 200px 1fr; gap: 18px; align-items: center; }
@media (max-width: 620px) { .pie-wrap { grid-template-columns: 1fr; justify-items: center; } }
.pie-wrap svg { width: 200px; height: 200px; }
.pie-legend { width: 100%; border-collapse: collapse; }
.pie-legend td { padding: 2px 4px; border-bottom: 1px solid var(--line-2); font-size: 12.5px; }
.pie-legend td.num { text-align: right; white-space: nowrap; }
.pie-legend .sw { width: 11px; height: 11px; border-radius: 3px; display: inline-block; vertical-align: -1px; margin-right: 8px; }
.pie-legend tr.zero td { color: var(--muted); }
.joblist { list-style: none; margin: 0; padding: 0; }
.joblist li { padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.joblist li:last-child { border-bottom: 0; }
.joblist a { font-weight: 600; text-decoration: none; color: var(--ink); }
.joblist a:hover { color: var(--primary); }
.joblist .meta { color: var(--muted); font-size: 12.5px; }

/* ---------------- Lịch tuyển dụng ---------------- */
.tabs { display: inline-flex; background: var(--grey-soft); border-radius: 8px; padding: 3px; gap: 2px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; border: 0; background: transparent; padding: 5px 12px; border-radius: 6px; cursor: pointer; font-weight: 500; color: var(--ink-2); font-size: 13.5px; white-space: nowrap; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px var(--shadow-soft); }
.cal-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.cal-head h2 { margin: 0 8px 0 0; font-size: 16px; font-weight: 600; min-width: 140px; }
.cal-head .spacer { flex: 1; }
table.cal { width: 100%; border-collapse: collapse; table-layout: fixed; }
table.cal th { font-size: 12.5px; color: var(--ink-2); font-weight: 600; padding: 8px; background: var(--paper-2); border-bottom: 1px solid var(--line); text-align: left; }
table.cal td { height: 112px; vertical-align: top; border: 1px solid var(--line-2); padding: 6px; }
table.cal td.out { background: var(--surface-2); }
table.cal td.out .d { color: var(--faint); }
table.cal td.today { box-shadow: inset 0 0 0 2px var(--gold); }
table.cal .d { font-size: 12.5px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
table.cal .ev {
  display: block; width: 100%; text-align: left; margin-top: 4px; padding: 4px 6px; border-radius: 4px; border: 0; cursor: pointer;
  background: var(--primary-soft); color: var(--ink-strong); font-size: 12px; line-height: 1.3;
  border-left: 3px solid var(--primary);
}
table.cal .ev.adm { background: var(--blue-soft); color: var(--blue-ink); border-left-color: var(--blue); }
table.cal .ev.closed { background: var(--grey-soft); color: var(--muted); border-left-color: var(--faint); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; }
.cal-legend .check { display: inline-flex; align-items: center; gap: 6px; }
.cal-key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; flex: none; background: var(--primary-soft); box-shadow: inset 3px 0 0 var(--primary); }
.cal-key.adm { background: var(--blue-soft); box-shadow: inset 3px 0 0 var(--blue); }
.cal-note { margin: 0; padding: 8px 14px 0; }
.cal-list .cal-li { gap: 6px; align-items: center; text-align: left; height: auto; min-height: 26px; white-space: normal; }
table.cal .ev b { display: block; font-variant-numeric: tabular-nums; }
table.cal .ev span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-list { display: none; }
@media (max-width: 760px) {
  table.cal { display: none; }
  .cal-list { display: block; list-style: none; margin: 0; padding: 0 14px 10px; }
  .cal-list li { padding: 10px 0; border-bottom: 1px solid var(--line-2); }
  .cal-list .d { font-weight: 600; color: var(--ink-strong); }
}
.job-detail dl { display: grid; grid-template-columns: 200px 1fr; gap: 0; margin: 0; border: 1px solid var(--line-2); border-radius: 6px; overflow: hidden; }
.job-detail dt, .job-detail dd { padding: 8px 12px; border-bottom: 1px solid var(--line-2); margin: 0; }
.job-detail dt { background: var(--surface-2); font-weight: 600; color: var(--ink-2); font-size: 13px; }
.job-detail dd { white-space: pre-wrap; overflow-wrap: anywhere; }
.job-detail dl > :nth-last-child(-n+2) { border-bottom: 0; }
@media (max-width: 600px) { .job-detail dl { grid-template-columns: 1fr; } .job-detail dt { border-bottom: 0; padding-bottom: 2px; } }

/* ---------------- Nhập Excel ---------------- */
.steps { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.steps span { padding: 4px 10px; border-radius: 12px; background: var(--grey-soft); color: var(--muted); font-size: 12.5px; }
.steps span.on { background: var(--strong-fill); color: var(--on-strong); }
.dropzone {
  border: 1.5px dashed var(--line-dash); border-radius: 8px; padding: 28px; text-align: center; background: var(--surface-2);
  cursor: pointer;
}
.dropzone.over { border-color: var(--primary); background: var(--primary-soft); }
.dropzone strong { display: block; margin-bottom: 4px; }
.summary-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.summary-chips .chip { padding: 6px 12px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line-2); }
.summary-chips .chip b { font-variant-numeric: tabular-nums; }
.issue-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.issue-table th, .issue-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.issue-table th { background: var(--paper-2); font-weight: 600; color: var(--ink-2); position: sticky; top: 0; }
.issue-scroll { max-height: 260px; overflow: auto; border: 1px solid var(--line-2); border-radius: 6px; margin-bottom: 14px; }
.mode-choice { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.mode-choice label { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.mode-choice label:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.mode-choice label.disabled { opacity: .55; cursor: not-allowed; }
.mode-choice small { display: block; color: var(--muted); }

/* ---------------- Tài khoản ---------------- */
.pw-box { background: var(--cover); color: #fff; border-radius: 8px; padding: 14px 16px; margin: 8px 0 4px; }
.pw-box code { font-size: 20px; letter-spacing: .06em; font-weight: 600; color: #ffd9d4; user-select: all; font-family: inherit; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-check { display: inline-flex; gap: 6px; align-items: center; padding: 6px 10px; border: 1px solid var(--line); border-radius: 16px; cursor: pointer; }
.chip-check:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); color: var(--ink-strong); }
.chip-check input { accent-color: var(--primary); }
.diff { font-size: 12.5px; }
.diff .f { font-weight: 600; color: var(--ink-2); }
.diff del { color: var(--danger); text-decoration: line-through; }
.diff ins { color: var(--ok); text-decoration: none; }

/* Màn hình hẹp: chỉ cố định cột mã để còn chỗ cho dữ liệu khi cuộn ngang */
@media (max-width: 700px) {
  table.data .st-name { position: static; box-shadow: none; min-width: 140px; }
  table.data .st-code { box-shadow: 1px 0 0 var(--line); }
  .table-scroll { max-height: none; }
}

/* Ô mật khẩu có nút con mắt hiện/ẩn */
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 42px; }
.pw-toggle {
  position: absolute; top: 50%; right: 3px; transform: translateY(-50%);
  width: 34px; height: 30px; display: grid; place-items: center;
  border: 0; border-radius: 5px; background: transparent; color: var(--muted); cursor: pointer;
}
.pw-toggle:hover { color: var(--ink); background: var(--grey-soft); }
.pw-toggle[aria-pressed="true"] { color: var(--primary); }
.pw-toggle svg { width: 18px; height: 18px; }
/* Ẩn nút hiện mật khẩu riêng của Edge để không bị hai con mắt */
.pw-wrap input::-ms-reveal, .pw-wrap input::-ms-clear { display: none; }

/* Danh sách ứng viên đăng ký của đơn hàng */
.reg-box { margin-top: 18px; }
.reg-count { display: inline-block; margin-left: 4px; padding: 1px 8px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.reg-status { display: flex; align-items: center; gap: 10px; margin: -2px 0 10px; }
.meter { flex: 0 0 160px; height: 8px; border-radius: 999px; background: var(--grey-soft); overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--primary); border-radius: inherit; }
.meter.full > span { background: var(--amber); }
.reg-empty { padding: 14px; border: 1px dashed var(--line); border-radius: 7px; color: var(--muted); font-size: 13.5px; }
.reg-table { overflow-x: auto; border: 1px solid var(--line-2); border-radius: 7px; }
.reg-table table.data th { position: static; }
.reg-table tr:last-child td { border-bottom: 0; }
.reg-notes { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.reg-notes .tag { font-size: 11.5px; }
.modal.mid { width: min(760px, 100%); }
.pick-info { margin: 8px 0 10px; font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.pick-info.full { color: var(--amber); font-weight: 600; }
.pick-list { display: flex; flex-direction: column; gap: 6px; }
.pick-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 9px 10px; border: 1px solid var(--line-2); border-radius: 7px; }
.pick-row .who { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pick-row > :last-child { flex: none; }
@media (max-width: 560px) { .meter { flex-basis: 100px; } }
@media (max-width: 600px) {
  .reg-table { border: 0; overflow: visible; }
  .reg-table table, .reg-table tbody, .reg-table tr, .reg-table td { display: block; width: 100%; }
  .reg-table thead { display: none; }
  .reg-table tr { border: 1px solid var(--line-2); border-radius: 7px; padding: 8px 10px; margin-bottom: 8px; }
  .reg-table table.data td, .reg-table table.data tbody tr:hover td { border: 0; padding: 2px 0; background: transparent; }
  .reg-table td.stt { display: none; }
  .reg-table td.act { padding-top: 6px; }
}

/* Hồ sơ mở rộng cho chương trình Nhật Bản: chỉ hiện khi biểu mẫu ở chế độ jp-mode */
form:not(.jp-mode) .jp-only { display: none !important; }
form:not(.dom-mode) .dom-only { display: none !important; } /* việc làm trong nước (15/11/2026) */
form:not(.study-mode) .study-only { display: none !important; } /* tài chính du học (20/11/2026) */
/* Khoảng trống học tập (20/11/2026) */
.gap-box { margin-top: 10px; }
.gap-line { display: flex; align-items: flex-start; gap: 7px; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.gap-line svg { flex: none; width: 15px; height: 15px; margin-top: 2px; }
.gap-line.warn { color: var(--amber-ink); }
.jp-wrap { margin-top: 22px; padding: 4px 14px 14px; border: 1px solid var(--warm-line); border-radius: 9px; background: var(--warm-soft); }
.jp-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 10px 0 2px; color: var(--ink-strong); }
.jp-head span { font-size: 12.5px; color: var(--muted); }
.jp-wrap .repeat-row.rr-jprel { background: var(--surface); }
form.jp-mode .rr-family { grid-template-columns: 145px minmax(0, 1fr) minmax(0, 1fr) 96px 34px; grid-template-areas: "rel name name year del" "job job home home ." "live hlth hlth hlth ." "phn phn spn spn ."; }
form.jp-mode .rr-work {
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 96px 96px 34px;
  grid-template-areas: "co po fr to del" "sal desc desc desc ."; row-gap: 6px;
}
form.jp-mode .rr-work > :nth-child(1) { grid-area: co; }
form.jp-mode .rr-work > :nth-child(2) { grid-area: po; }
form.jp-mode .rr-work > :nth-child(3) { grid-area: fr; }
form.jp-mode .rr-work > :nth-child(4) { grid-area: to; }
form.jp-mode .rr-work > :nth-child(5) { grid-area: sal; }
form.jp-mode .rr-work > :nth-child(6) { grid-area: desc; }
form.jp-mode .rr-work > :nth-child(7) { grid-area: del; }
form.jp-mode .repeat-row.rr-work { padding: 8px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--surface); }
form.jp-mode .repeat-head.rr-work { padding: 0 9px; row-gap: 2px; }
.rr-travel { grid-template-columns: 96px 96px minmax(0, 1fr) minmax(0, 1fr) 34px; }
.rr-surgery { grid-template-columns: minmax(0, 1fr) 120px 34px; }
.rr-jprel {
  grid-template-columns: 130px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) 34px;
  grid-template-areas: "rel name name ctry del" "stat stat home note ."; row-gap: 6px;
}
.rr-jprel > :nth-child(1) { grid-area: rel; }
.rr-jprel > :nth-child(2) { grid-area: name; }
.rr-jprel > :nth-child(3) { grid-area: stat; }
.rr-jprel > :nth-child(4) { grid-area: home; }
.rr-jprel > :nth-child(5) { grid-area: note; }
.rr-jprel > :nth-child(6) { grid-area: del; }
.rr-jprel > :nth-child(7) { grid-area: ctry; } /* nước (20/11/2026) */
.repeat-row.rr-jprel { background: var(--surface); }
.repeat-row.rr-jprel { padding: 8px; border: 1px solid var(--line-2); border-radius: 6px; }
.repeat-head.rr-jprel { padding: 0 9px; row-gap: 2px; }
@media (max-width: 700px) {
  .jp-wrap { padding: 4px 10px 12px; }
  form.jp-mode .rr-family { grid-template-columns: minmax(0, 1fr) 88px 34px; grid-template-areas: "rel year del" "name name ." "job job ." "home home ." "live live ." "hlth hlth ." "phn phn ." "spn spn ."; }
  form.jp-mode .rr-work { grid-template-columns: 1fr 1fr 34px; grid-template-areas: "co co del" "po po ." "fr to ." "sal sal ." "desc desc ."; }
  .rr-travel { grid-template-columns: 1fr 1fr 34px; }
  .rr-travel > :nth-child(3), .rr-travel > :nth-child(4) { grid-column: 1 / 3; }
  .rr-jprel { grid-template-columns: 1fr 1fr 34px; grid-template-areas: "rel ctry del" "name name ." "stat stat ." "home home ." "note note ."; }
  .rr-surgery { grid-template-columns: minmax(0, 1fr) 100px 34px; }
}
.jp-card { margin-top: 12px; border: 1px solid var(--warm-line); border-radius: 8px; background: var(--warm-soft); padding: 8px 12px 10px; }
.jp-card > summary { cursor: pointer; font-weight: 600; color: var(--ink-strong); font-size: 13.5px; padding: 2px 0 6px; }
.jp-card .kv { margin-top: 4px; }
.chip-check.disabled { opacity: .45; cursor: not-allowed; border-style: dashed; }
.chip-check.disabled input { cursor: not-allowed; }
.chip-check .chip-sub { color: var(--muted); font-size: 12px; }

/* Bản quyền */
.license-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; padding: 9px 24px; font-size: 13.5px; border-bottom: 1px solid var(--line); }
.license-bar svg { width: 16px; height: 16px; flex: none; }
.license-bar span { flex: 1 1 320px; }
.license-bar a { font-weight: 600; color: inherit; text-decoration: underline; white-space: nowrap; }
.license-bar.err { background: var(--danger-soft); color: var(--danger-ink); }
.license-bar.warn { background: var(--amber-soft); color: var(--amber-ink); }
.license-bar.info { background: var(--blue-soft); color: var(--blue-ink); }
.license-page { display: flex; flex-direction: column; gap: 16px; max-width: 980px; }
.license-head { display: flex; align-items: center; gap: 10px; }
.license-msg { margin: 10px 0 0; }
.license-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 16px; align-items: start; }
.license-ai { margin-top: 16px; }
.license-renew { margin-bottom: 16px; }
.license-renew .section-title { display: flex; align-items: center; justify-content: flex-start; gap: 8px; }
.license-renew .section-title svg { width: 18px; height: 18px; flex: none; color: var(--primary); }
.renew-plans { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 14px; }
.renew-plan { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.renew-plan:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.renew-plan input { margin-top: 3px; flex: none; }
.renew-pay { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.renew-qr { width: 220px; max-width: 100%; flex: none; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px; }
.renew-qr svg { display: block; width: 100%; height: auto; }
.renew-pay > div:last-child { flex: 1 1 280px; min-width: 0; }
.renew-bank { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 8px 0; }
.renew-bank dt { color: var(--muted, #667085); }
.renew-bank dd { margin: 0; overflow-wrap: anywhere; }
/* Mua bản quyền (bản đang dùng thử, 16/11/2026) */
.buy-form { margin: 4px 0 12px; }
.buy-form > .grid + .field { margin-top: 12px; }
.buy-terms { max-height: 220px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; padding: 10px 12px; margin: 6px 0 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); font-size: 13px; line-height: 1.55; }
.buy-terms:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.buy-agree { margin: 4px 0; }
.buy-form > .err { color: var(--danger); font-size: 12.5px; margin-top: 2px; }
.renew-wait::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); margin-right: 8px; vertical-align: middle; animation: kn-pulse 1.2s ease-in-out infinite; }
.install-id { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 6px; }
.install-id code { font-size: 22px; font-weight: 700; letter-spacing: .08em; color: var(--ink-strong); background: var(--grey-soft); padding: 6px 12px; border-radius: 7px; user-select: all; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.input.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; word-break: break-all; }
.license-page .help { font-size: 12.5px; color: var(--muted); margin: 6px 0 10px; }
@media (max-width: 760px) {
  .license-grid { grid-template-columns: 1fr; }
  .license-bar { padding: 9px 14px; }
  .install-id code { font-size: 18px; }
}

/* Sao lưu dữ liệu */
.backup-page { display: flex; flex-direction: column; gap: 16px; max-width: 980px; }
.backup-page > .alert { margin-bottom: 0; }
.backup-fresh { align-items: center; justify-content: space-between; flex-wrap: wrap; }
.backup-fresh > div { flex: 1 1 320px; }
.backup-table { max-height: none; min-height: 0; }
.backup-tips ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.backup-tips code { font-size: 12.5px; background: var(--grey-soft); padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }
.btn.danger-solid { background: var(--danger); border-color: var(--danger); color: var(--on-accent); }
.btn.danger-solid:hover:not(:disabled) { filter: brightness(.94); }
.btn.danger-solid:disabled { opacity: .5; cursor: not-allowed; }
.restore-pick { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 6px 0; }
.restore-pick .input { flex: 1 1 260px; min-width: 0; padding-top: 6px; }
.restore-upload .help { font-size: 12.5px; color: var(--muted); margin: 0 0 6px; }
table.restore-cmp { margin: 12px 0; }
table.restore-cmp th[scope=row] { font-weight: 500; color: var(--muted); }
.restore-warn ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
@media (min-width: 1001px) { .dash-jobs .joblist li { border-bottom: 0; } }

/* ---------------- Quên mật khẩu, mã khôi phục ---------------- */
.link-btn { background: none; border: 0; padding: 0; color: var(--primary); cursor: pointer; font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
.link-btn:hover { color: var(--primary-hover); }
.login-card .forgot-link { display: block; margin: 14px auto 0; }
.forgot-help { margin: 14px 0 0; font-size: 13px; line-height: 1.55; }
.forgot-help svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.forgot-help code { font-size: 12px; background: var(--code-bg); padding: 1px 5px; border-radius: 4px; white-space: nowrap; }
.recovery-input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; }
.recovery-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; margin: 4px 0 14px; padding: 14px 18px 14px 40px; background: var(--grey-soft); border-radius: 8px; }
.recovery-codes li { color: var(--muted); }
.recovery-codes code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 16px; font-weight: 700; letter-spacing: .06em; color: var(--ink-strong); user-select: all; }
@media (max-width: 480px) { .recovery-codes { grid-template-columns: 1fr; } }
.recovery-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.recovery-notes { margin: 0 0 14px; padding-left: 18px; color: var(--ink-2); font-size: 13px; }
.recovery-notes li { margin-bottom: 4px; }
/* Dải nhắc (cùng kiểu dải thông báo bản quyền) */
.notice-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; padding: 9px 24px; font-size: 13.5px; border-bottom: 1px solid var(--line); }
.notice-bar svg { width: 16px; height: 16px; flex: none; }
.notice-bar span { flex: 1 1 320px; }
.notice-bar a { font-weight: 600; color: inherit; text-decoration: underline; white-space: nowrap; }
.notice-bar.warn { background: var(--amber-soft); color: var(--amber-ink); }
@media (max-width: 900px) { .notice-bar { padding: 9px 14px; } }
.notice-bar .bar-x { background: transparent; border: 0; color: inherit; font-size: 18px; line-height: 1; cursor: pointer; padding: 0 4px; opacity: .7; }
.notice-bar .bar-x:hover { opacity: 1; }
.sidebar .me .row { flex-wrap: wrap; }

/* Số chưa đọc trên menu */
.nav-label { flex: 1; min-width: 0; }
.nav-badge {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--gold); color: #ffffff; font-size: 11.5px; font-weight: 700;
  display: inline-grid; place-items: center; font-variant-numeric: tabular-nums;
}
.topbar button { position: relative; }
.topbar button svg { width: 22px; height: 22px; }
.nav-badge.top { position: absolute; top: -2px; right: -6px; min-width: 18px; height: 18px; font-size: 10.5px; padding: 0 4px; }

/* ---------------- Ảnh đại diện chữ ---------------- */
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: inline-grid; place-items: center;
  color: #fff; font-weight: 600; font-size: 14px; letter-spacing: .02em;
}
.avatar.sm { width: 30px; height: 30px; font-size: 11.5px; }
.avatar svg { width: 20px; height: 20px; }
.avatar.sm svg { width: 16px; height: 16px; }
/* Ảnh đại diện bằng ảnh (25/11/2026) */
.avatar.lg { width: 96px; height: 96px; font-size: 32px; }
.avatar.has-img, .me-ini.has-img { background: var(--surface-2); overflow: hidden; }
.avatar img, .me-ini img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.acc-name { display: flex; align-items: center; gap: 10px; }
.acc-avatar-row { display: flex; align-items: center; gap: 14px; }
.av-current { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.av-current .help { margin: 0; }
.av-editor { display: grid; justify-items: center; gap: 10px; margin-bottom: 12px; }
.av-canvas { width: 260px; height: 260px; max-width: 100%; border-radius: 12px; background: var(--surface-2); touch-action: none; cursor: grab; }
.av-canvas:active { cursor: grabbing; }
.av-canvas:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.av-zoom-row { display: flex; align-items: center; gap: 8px; width: 260px; max-width: 100%; color: var(--muted); }
.av-zoom-row svg { width: 18px; height: 18px; flex: none; }
.av-zoom { flex: 1; }
.av-editor .help { text-align: center; max-width: 300px; margin: 0; }

/* ---------------- Danh sách chọn người ---------------- */
.picker { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.picker-tools { display: grid; grid-template-columns: minmax(0, 1fr) 170px; gap: 8px; padding: 8px; border-bottom: 1px solid var(--line-2); background: var(--surface-2); }
.picker-tools.one { grid-template-columns: 1fr; }
@media (max-width: 520px) { .picker-tools { grid-template-columns: 1fr; } }
.picker-list { max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; }
.picker-list.tall { max-height: min(420px, 55vh); }
.modal-body > .picker-list { border: 1px solid var(--line); border-radius: 8px; margin-top: 10px; }
.picker-row { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-bottom: 1px solid var(--line-2); cursor: pointer; text-align: left; }
.picker-row:last-child { border-bottom: 0; }
.picker-row:hover { background: var(--surface-2); }
.picker-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); flex: none; }
.picker-row.as-btn { background: var(--surface); border: 0; border-bottom: 1px solid var(--line-2); width: 100%; font: inherit; }
.picker-row.as-btn:hover { background: var(--primary-soft); }
.picker-row.marked { background: var(--danger-soft); }
.picker-row.marked .pr-main > span:first-child { text-decoration: line-through; }
div.picker-row { cursor: default; }
.pr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.picker-group { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; background: var(--surface-2); font-size: 12.5px; font-weight: 600; color: var(--ink-2); border-bottom: 1px solid var(--line-2); position: sticky; top: 0; z-index: 1; }
.picker-foot { display: flex; align-items: center; gap: 6px; padding: 7px 10px; border-top: 1px solid var(--line-2); background: var(--surface-2); flex-wrap: wrap; }
.picker-foot .spacer { flex: 1; }
.picker-empty { padding: 16px 12px; text-align: center; }

/* ---------------- Chat nội bộ ---------------- */
.chat {
  display: grid; grid-template-columns: 320px minmax(0, 1fr);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; min-height: 420px;
}
.chat-side { display: flex; flex-direction: column; border-right: 1px solid var(--line); min-height: 0; background: var(--surface); }
.chat-side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 14px 10px; flex-wrap: wrap; }
.chat-side-head h1 { font-size: 18px; font-weight: 600; margin: 0; }
.chat-side-head .actions { display: flex; gap: 6px; }
.chat-search { padding: 0 14px 10px; border-bottom: 1px solid var(--line-2); }
.chat-list { flex: 1; overflow-y: auto; min-height: 0; }
.chat-item {
  display: flex; gap: 10px; align-items: center; width: 100%;
  padding: 10px 14px; border: 0; border-bottom: 1px solid var(--line-2); background: transparent;
  text-align: left; cursor: pointer; font: inherit; color: inherit;
}
.chat-item:hover { background: var(--surface-2); }
.chat-item.active { background: var(--primary-soft); }
.ci-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ci-top, .ci-bottom { display: flex; gap: 8px; align-items: baseline; min-width: 0; }
.ci-title { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ci-time { color: var(--muted); font-size: 12px; white-space: nowrap; }
.ci-last { flex: 1; min-width: 0; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-item.unread .ci-last { color: var(--ink); font-weight: 600; }
.chat-item.unread .ci-time { color: var(--primary); font-weight: 600; }
.ci-unread { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--primary); color: var(--on-accent); font-size: 11.5px; font-weight: 700; display: inline-grid; place-items: center; }
.chat-empty { padding: 28px 18px; text-align: center; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.chat-empty strong { color: var(--ink); }

.chat-thread { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--paper-2); }
.chat-placeholder { margin: auto; padding: 24px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 6px; max-width: 360px; }
.chat-placeholder svg { width: 44px; height: 44px; color: var(--faint); }
.chat-placeholder strong { color: var(--ink); font-size: 15px; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
.chat-head h2 { margin: 0; font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-main { flex: 1; min-width: 0; }
.chat-back { display: none; }
.chat-msgs { flex: 1; overflow-y: auto; min-height: 0; padding: 14px 18px 8px; display: flex; flex-direction: column; gap: 3px; }
.chat-more { align-self: center; margin-bottom: 8px; }
.msg-day { align-self: center; margin: 12px 0 6px; }
.msg-day span { background: var(--grey-soft); color: var(--ink-2); font-size: 12px; padding: 3px 10px; border-radius: 10px; }
.msg-system { align-self: center; text-align: center; color: var(--muted); font-size: 12.5px; margin: 6px 0; max-width: 80%; }
.msg-system .msg-time { margin-left: 6px; }
.msg { display: flex; gap: 8px; align-items: flex-end; max-width: 78%; margin-top: 6px; }
.msg.cont { margin-top: 0; }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg-av-space { width: 30px; flex: none; }
.msg-col { display: flex; flex-direction: column; min-width: 0; }
.msg.mine .msg-col { align-items: flex-end; }
.msg-name { font-size: 12px; color: var(--muted); margin: 0 0 2px 10px; }
.bubble {
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px 14px 14px 4px;
  padding: 7px 11px 5px; overflow-wrap: anywhere; box-shadow: 0 1px 1px var(--shadow-soft);
}
.msg.cont.theirs .bubble { border-top-left-radius: 6px; }
.msg.mine .bubble { background: var(--bubble-mine); border-color: var(--bubble-mine-line); border-radius: 14px 14px 4px 14px; }
.msg.cont.mine .bubble { border-top-right-radius: 6px; }
.msg-text { white-space: pre-wrap; }
.bubble a { color: var(--blue); }
.msg-time { display: inline-block; font-size: 11px; color: var(--muted); margin-left: 8px; vertical-align: -1px; white-space: nowrap; float: right; margin-top: 3px; }
.msg-seen { align-self: flex-end; font-size: 11.5px; color: var(--muted); margin: 2px 2px 0; }
.chat-composer { display: flex; gap: 8px; align-items: flex-end; padding: 10px 14px; border-top: 1px solid var(--line); background: var(--surface); }
.chat-composer textarea.input.chat-input { min-height: 40px; height: 40px; max-height: 150px; resize: none; line-height: 1.4; padding: 9px 14px; border-radius: 20px; }
.chat-send { height: 40px; width: 44px; padding: 0; justify-content: center; border-radius: 20px; flex: none; }
.chat-send svg { width: 18px; height: 18px; }
@media (max-width: 900px) {
  .chat { grid-template-columns: minmax(0, 1fr); }
  .chat-side { border-right: 0; }
  .chat.show-thread .chat-side { display: none; }
  .chat:not(.show-thread) .chat-thread { display: none; }
  .chat-back { display: inline-grid; margin-left: -6px; }
  .msg { max-width: 88%; }
  .chat-msgs { padding: 10px 10px 6px; }
  .chat-head { padding: 8px 10px; }
  .chat-composer { padding: 8px 10px; }
}

/* ---------------- Công việc ---------------- */
.task-tabs { margin-bottom: 12px; }
.task-tabs .tabs { flex-wrap: wrap; }
.tab-badge { margin-left: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--gold); color: #ffffff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; vertical-align: 1px; }
.task-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.task-filters .wide { grid-column: 1 / -1; }
@media (max-width: 600px) { .task-filters { grid-template-columns: minmax(0, 1fr); } }
.seg-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; background: var(--surface); }
.seg button { border: 0; border-right: 1px solid var(--line-2); background: transparent; padding: 0 11px; height: 34px; cursor: pointer; font-weight: 500; color: var(--ink-2); display: inline-flex; gap: 6px; align-items: center; }
.seg button:last-child { border-right: 0; }
.seg button:hover { background: var(--surface-2); }
.seg button[aria-pressed="true"] { background: var(--primary); color: var(--on-accent); }
.seg .n { font-size: 11.5px; font-variant-numeric: tabular-nums; background: var(--grey-soft); color: var(--ink-2); border-radius: 8px; padding: 0 6px; line-height: 17px; }
.seg button[aria-pressed="true"] .n { background: rgba(255, 255, 255, .22); color: var(--on-accent); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 17px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 500; color: var(--ink-2); }
.chip svg { width: 15px; height: 15px; }
.chip.danger { color: var(--danger); border-color: var(--danger-line); }
.chip[aria-pressed="true"] { background: var(--danger); border-color: var(--danger); color: var(--on-accent); }
.task-list { display: flex; flex-direction: column; min-height: 120px; }
.task-list.loading { opacity: .55; }
.task-item {
  display: grid; grid-template-columns: minmax(0, 1fr) 120px 150px 110px; gap: 12px; align-items: center;
  width: 100%; padding: 11px 16px 11px 13px; border: 0; border-bottom: 1px solid var(--line-2); border-left: 3px solid transparent;
  background: var(--surface); text-align: left; cursor: pointer; font: inherit; color: inherit;
}
.task-item:hover { background: var(--row-hover); }
.task-item:last-child { border-bottom: 0; }
.task-item.unseen { border-left-color: var(--gold); background: var(--warm-soft); }
.task-item.st-green .ti-title, .task-item.st-red .ti-title { color: var(--muted); }
.task-item.st-red .ti-title { text-decoration: line-through; }
.ti-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ti-title { font-weight: 600; overflow-wrap: anywhere; }
.ti-meta { color: var(--muted); font-size: 12.5px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ti-cmt { display: inline-flex; align-items: center; gap: 3px; }
.ti-cmt svg { width: 13px; height: 13px; }
.ti-status, .ti-pri { display: flex; }
.ti-status { justify-content: flex-end; }
.dot-new { display: inline-block; margin-right: 6px; padding: 0 6px; border-radius: 8px; background: var(--gold); color: #ffffff; font-size: 11px; font-weight: 700; line-height: 17px; vertical-align: 1px; }
.due { display: inline-flex; flex-direction: column; line-height: 1.25; }
.due small { font-size: 12px; color: var(--muted); }
.due.none { color: var(--muted); font-size: 13px; }
.due.over { color: var(--danger); font-weight: 600; }
.due.over small { color: var(--danger); }
.due.today, .due.today small { color: var(--amber); font-weight: 600; }
.due.soon small { color: var(--amber); }
@media (max-width: 760px) {
  .task-item { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main status" "due pri"; row-gap: 6px; }
  .ti-main { grid-area: main; }
  .ti-status { grid-area: status; align-self: start; }
  .ti-due { grid-area: due; }
  .ti-pri { grid-area: pri; justify-content: flex-end; }
  .due { flex-direction: row; gap: 6px; align-items: baseline; }
}
.task-tags { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.task-tags .due { flex-direction: row; gap: 6px; align-items: baseline; padding-left: 4px; }
.task-actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 8px; margin-bottom: 4px; }
.task-desc { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 7px; padding: 10px 12px; }
.task-timeline .ev-line { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.task-timeline .ev-line .tag { height: 20px; font-size: 12px; }
.task-timeline .body.comment { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 7px 10px; margin-top: 5px; }
.task-timeline li.ev-comment.mine .body.comment { background: var(--primary-soft); border-color: var(--primary-line); }
.task-timeline li.ev-status .body { color: var(--ink-2); font-style: italic; }
.task-timeline li.ev-comment::before { border-color: var(--blue); }
.task-timeline li.ev-status::before { border-color: var(--gold); }
.task-timeline li.ev-edit::before { border-color: var(--muted); }
.ev-old { text-decoration: line-through; color: var(--muted); }
.ev-new { font-weight: 600; }
.task-comment { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.row-end { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.due-quick { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 4px; }
@media (max-width: 600px) {
  .seg { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: thin; }
  .seg button { flex: none; }
}

/* ---------------- Ảnh trong chat ---------------- */
.chat-attach { width: 40px; height: 40px; flex: none; display: inline-grid; place-items: center; color: var(--primary); }
.chat-attach svg { width: 22px; height: 22px; }
.chat-attach[disabled] { opacity: .45; cursor: not-allowed; }
.chat-tray { display: flex; gap: 8px; align-items: center; padding: 10px 14px 0; background: var(--surface); border-top: 1px solid var(--line); overflow-x: auto; }
.chat-tray:not([hidden]) + .chat-composer { border-top: 0; }
.tray-item { position: relative; width: 64px; height: 64px; flex: none; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--grey-soft); }
.tray-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tray-item.busy img { opacity: .55; }
.tray-item.err { outline: 2px solid var(--danger); outline-offset: -2px; }
.tray-x { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .62); color: #fff; font-size: 14px; line-height: 20px; padding: 0; cursor: pointer; }
.tray-note { color: var(--muted); font-size: 12.5px; white-space: nowrap; padding-left: 4px; }
.bubble.has-img { padding: 4px 4px 4px; }
.bubble.has-img .msg-text { display: block; padding: 5px 7px 0; }
.bubble.has-img > .msg-time { float: none; display: block; text-align: right; margin: 0; padding: 3px 6px 1px 0; }
.msg-img { display: block; padding: 0; border: 0; background: transparent; cursor: zoom-in; border-radius: 11px; overflow: hidden; max-width: 100%; }
.msg-img img { display: block; max-width: 100%; height: auto; border-radius: 11px; background: var(--grey-soft); }
.msg-img.broken { display: inline-flex; gap: 6px; align-items: center; padding: 10px 12px; color: var(--muted); cursor: default; }
.msg-img.broken svg { width: 18px; height: 18px; }
.msg.sending .msg-img img { max-width: 160px; max-height: 160px; opacity: .55; }
.msg.sending .msg-time { float: none; display: block; text-align: right; }
.chat-thread.drop { outline: 3px dashed var(--primary); outline-offset: -8px; }
.chat-thread.drop .chat-msgs { opacity: .6; }
.img-viewer { position: fixed; inset: 0; z-index: 120; background: rgba(12, 16, 30, .94); display: flex; flex-direction: column; }
.iv-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; color: #fff; }
.iv-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.iv-meta strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iv-meta span { color: #b8bfd0; font-size: 12.5px; }
.iv-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border: 0; border-radius: 7px; background: rgba(255, 255, 255, .13); color: #fff; text-decoration: none; cursor: pointer; font: inherit; }
.iv-btn:hover { background: rgba(255, 255, 255, .22); }
.iv-btn svg { width: 18px; height: 18px; }
.iv-stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: 0 12px 12px; }
.iv-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }
.iv-caption { color: var(--spine-ink); text-align: center; padding: 0 16px 18px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 25vh; overflow-y: auto; }
@media (max-width: 600px) { .iv-btn span { display: none; } .chat-tray { padding: 8px 10px 0; } }

/* Tệp PDF, Word, Excel trong chat */
.doc-badge {
  width: 40px; height: 48px; flex: none; border-radius: 6px; display: inline-grid; place-items: end center; padding-bottom: 6px;
  color: #fff; font-size: 10.5px; font-weight: 700; letter-spacing: .02em; position: relative; background: #697088;
  clip-path: polygon(0 0, 72% 0, 100% 22%, 100% 100%, 0 100%);
}
.doc-badge::after { content: ""; position: absolute; top: 0; right: 0; width: 28%; height: 22%; background: rgba(255, 255, 255, .35); }
.doc-badge.pdf { background: #c8372d; }
.doc-badge.word { background: #2b5fb4; }
.doc-badge.excel { background: #1e7a4c; }
.bubble.has-file { padding: 6px 6px 4px; min-width: 240px; max-width: 360px; }
.bubble.has-file .msg-text { display: block; padding: 6px 4px 0; }
.bubble.has-file > .msg-time { float: none; display: block; text-align: right; margin: 0; padding: 3px 4px 1px 0; }
.msg-file { display: flex; gap: 10px; align-items: center; padding: 6px; border-radius: 9px; background: var(--file-bg); border: 1px solid var(--line-2); }
.msg.mine .msg-file { background: var(--file-bg); border-color: var(--bubble-mine-line); }
.mf-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mf-name { font-weight: 600; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; line-height: 1.3; }
a.mf-name:hover { color: var(--primary); text-decoration: underline; }
.mf-meta { font-size: 12px; color: var(--muted); }
.mf-actions { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.mf-actions .btn svg { width: 14px; height: 14px; }
.msg.sending .msg-file { opacity: .6; }
.tray-doc { position: relative; display: flex; align-items: center; gap: 8px; flex: none; width: 220px; height: 64px; padding: 6px 26px 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); }
.tray-doc .doc-badge { width: 32px; height: 40px; font-size: 9.5px; padding-bottom: 5px; }
.tray-doc.err { outline: 2px solid var(--danger); outline-offset: -2px; }
.td-main { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.td-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-size { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tray-doc .tray-x { top: 4px; right: 4px; }
@media (max-width: 600px) { .bubble.has-file { min-width: 0; max-width: 100%; } .tray-doc { width: 190px; } }

/* ---------------- Nhắc việc, lịch hẹn ---------------- */
.toast .toast-link { color: #fff; font-weight: 700; text-decoration: underline; margin-left: 4px; }
.toast svg { width: 15px; height: 15px; vertical-align: -2px; }
.rem-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; max-width: 1000px; }
@media (max-width: 760px) { .rem-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rem-stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; color: var(--ink-2); font-size: 13px; display: flex; flex-direction: column; }
.rem-stat strong { font-size: 24px; font-weight: 600; color: var(--ink-strong); font-variant-numeric: tabular-nums; line-height: 1.15; }
.rem-stat.red strong { color: var(--danger); }
.rem-stat.amber strong { color: var(--amber); }
.rem-body { display: flex; flex-direction: column; gap: 12px; max-width: 1000px; }
.rem-day { padding: 12px 14px; }
.rem-day h2 { display: flex; align-items: center; gap: 8px; font-size: 15px; margin: 0 0 6px; }
.rem-day.over h2 { color: var(--danger); }
.rem-day.today { border-color: var(--primary-line); box-shadow: 0 0 0 2px var(--primary-soft); }
.rem-count { min-width: 22px; height: 20px; padding: 0 7px; border-radius: 10px; background: var(--grey-soft); color: var(--ink-2); font-size: 12px; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
.rem-day.over .rem-count { background: var(--danger-soft); color: var(--danger); }
.rem-empty { padding: 4px 0 2px; }
.rem-item { display: grid; grid-template-columns: 30px 84px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line-2); }
.rem-day h2 + .rem-item, .rem-day p + .rem-item { border-top: 0; }
.rem-ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.rem-ic svg { width: 16px; height: 16px; }
.rem-item.k-task .rem-ic { background: var(--blue-soft); color: var(--blue); }
.rem-item.k-interview .rem-ic, .rem-item.k-admission_deadline .rem-ic, .rem-item.k-admission_interview .rem-ic { background: var(--amber-soft); color: var(--amber); }
.rem-item.k-passport .rem-ic { background: var(--violet-soft-2); color: var(--violet); }
.rem-item.overdue .rem-ic { background: var(--danger-soft); color: var(--danger); }
.rem-item.done { opacity: .7; }
.rem-time { font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.rem-item.overdue .rem-time { color: var(--danger); }
.rem-main { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.rem-title { font-weight: 600; overflow-wrap: anywhere; }
.rem-title a { color: var(--ink); text-decoration: none; }
.rem-title a:hover { color: var(--primary); text-decoration: underline; }
.rem-sub { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.rem-kind { font-weight: 600; color: var(--ink-2); }
.rem-day.done summary { cursor: pointer; font-weight: 600; padding: 2px 0; }
@media (max-width: 640px) {
  .rem-item { grid-template-columns: 30px minmax(0, 1fr); grid-template-areas: "ic time" "ic main" ". act"; row-gap: 2px; }
  .rem-ic { grid-area: ic; align-self: start; }
  .rem-time { grid-area: time; }
  .rem-main { grid-area: main; }
  .rem-item > .row-actions { grid-area: act; }
}
.appt-box { margin: 12px 0 4px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface-2); }
.appt-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.appt-list { display: flex; flex-direction: column; gap: 4px; }
.appt-row { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line-2); }
.appt-row:first-child { border-top: 0; }
.appt-when { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; white-space: nowrap; }
.appt-when svg { width: 15px; height: 15px; color: var(--primary); }
.appt-row.overdue .appt-when { color: var(--danger); }
.appt-row.done { opacity: .65; }
.appt-row.done .appt-main > span:first-child { text-decoration: line-through; }
.appt-main { min-width: 0; display: flex; flex-direction: column; }
@media (max-width: 560px) { .appt-row { grid-template-columns: 1fr; } }
.cand-pick { position: relative; }
.cand-results { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 5; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); max-height: 260px; overflow-y: auto; }
.cand-row { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; gap: 8px; width: 100%; padding: 8px 10px; border: 0; border-bottom: 1px solid var(--line-2); background: transparent; text-align: left; cursor: pointer; font: inherit; }
.cand-row:hover { background: var(--primary-soft); }
.cand-chip { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 36px; padding: 0 4px 0 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--primary-soft); }

/* ---------------- Trợ lý AI ---------------- */
.ai-page { max-width: 1100px; display: flex; flex-direction: column; gap: 12px; }
.ai-page .page-head { margin-bottom: 4px; }
.ai-page .section-title { margin: 10px 0 0; }
.ai-page .section-title input[type="month"] { width: auto; height: 32px; }
.ai-master { font-size: 15px; margin-bottom: 10px; }
.ai-master + div .alert { margin-bottom: 0; }
.ai-providers { display: flex; flex-direction: column; gap: 10px; }
.ai-prov { padding: 12px 16px 14px; }
.ai-prov-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.ai-prov-head .spacer { flex: 1; }
.ai-prov-name strong { font-size: 15px; }
.ai-pos { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 10px; background: var(--grey-soft); color: var(--ink-2); white-space: nowrap; }
.ai-pos.main { background: var(--strong-fill); color: var(--on-strong); }
.ai-prov-foot { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.ai-test { font-size: 13px; color: var(--muted); flex: 1; min-width: 200px; }
.ai-test.ok { color: var(--ok); font-weight: 600; }
.ai-test.err { color: var(--danger); }
.ai-grid { align-items: start; }
.ai-grid h2 { font-size: 15px; margin: 0 0 8px; }
.ai-checks { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.ai-privacy svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.ai-usage h2 { font-size: 14px; margin: 6px 0 6px; }
.ai-usage table.data th, .ai-store table.data th { position: static; }
.ai-btn svg { color: var(--violet); }
.ai-post { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 860px) { .ai-post { grid-template-columns: 1fr; } }
.ai-opts { display: flex; flex-direction: column; gap: 12px; }
.ai-opts .seg { flex-wrap: wrap; }
.ai-note { display: flex; gap: 4px; align-items: center; margin: 0; }
.ai-note svg { width: 15px; height: 15px; flex: none; }
.ai-result { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
textarea.input.ai-out { min-height: 340px; font-size: 14px; line-height: 1.55; }
.ai-result-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ai-result-bar .spacer { flex: 1; }
.ai-meta { font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ai-meta.err { color: var(--danger); }
.ai-warn { margin: 0; font-size: 13px; }

/* ---------------- AI tạo ảnh, video (31/10/2026) ---------------- */
.aim .ai-opts .ai-opts { gap: 12px; }
.aim .ai-note svg { color: var(--violet); }
.aim-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 12px; align-items: start; }
.aim-grid:empty { display: none; }
.aim-empty { margin: 0; padding: 28px 12px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius-sm); }
.aim-card { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.aim-card.st-done { border-color: var(--ok); }
.aim-media { position: relative; width: 100%; max-height: 420px; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; }
.aim-media img, .aim-media video { width: 100%; height: 100%; object-fit: contain; display: block; background: #111; }
.aim-wait, .aim-fail { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px; text-align: center; font-size: 13px; color: var(--ink-2); }
.aim-fail { color: var(--danger); overflow-wrap: anywhere; }
.aim-fail svg { width: 20px; height: 20px; }
.aim-wait .spin { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--primary); border-color: var(--primary) var(--primary) transparent transparent; animation: spin .8s linear infinite; }
.aim-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12.5px; color: var(--muted); padding: 8px 10px 0; }
.aim-exp { color: var(--ink-2); }
.aim-acts { display: flex; gap: 6px; padding: 8px 10px 10px; flex-wrap: wrap; }
.aim-store { margin: 0; font-size: 13px; }
.aim-store svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.ai-media-models { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 12px; padding-top: 10px; border-top: 1px dashed var(--line-2); }
.ai-media-store { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }

/* ---------------- Đăng ký online (28/10/2026) ---------------- */
.tabs button .n { margin-left: 6px; font-size: 11.5px; background: var(--gold); color: #fff; border-radius: 8px; padding: 0 6px; line-height: 17px; display: inline-block; font-variant-numeric: tabular-nums; }
.filters .su-status-field { grid-column: 1 / -1; }
.su-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.su-item { display: flex; gap: 12px; align-items: center; text-align: left; width: 100%; padding: 12px 14px; cursor: pointer; border: 1px solid var(--line); }
.su-item:hover { border-color: var(--primary); }
.su-item.st-new { border-left: 3px solid var(--blue); }
.su-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.su-name { font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.su-sub { color: var(--ink-2); overflow-wrap: anywhere; }
.su-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.su-more { display: flex; justify-content: center; margin: 10px 0; }
.su-status { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.su-msg { white-space: pre-wrap; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 8px 10px; }
.su-dups { margin-top: 14px; }
.su-dups ul { margin: 6px 0; padding-left: 18px; }
.su-dups li { margin: 4px 0; }
.su-dups li .btn { margin-left: 6px; }
.su-consent { margin-top: 14px; font-size: 13px; color: var(--ink-2); }
.su-consent summary { cursor: pointer; display: flex; align-items: center; gap: 6px; }
.su-consent summary svg { width: 15px; height: 15px; }
.su-consent p { white-space: pre-wrap; background: var(--surface-2); padding: 8px 10px; border-radius: var(--radius-sm); }
.su-forms-head { display: flex; gap: 12px; align-items: flex-end; justify-content: space-between; margin: 12px 0; flex-wrap: wrap; }
.su-base { font-size: 13px; background: var(--grey-soft); padding: 2px 6px; border-radius: 4px; overflow-wrap: anywhere; }
.su-forms { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 12px; }
.su-form { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.su-form-head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.su-form-head strong { font-size: 15px; overflow-wrap: anywhere; }
.su-form-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--ink-2); }
.su-form-meta svg { width: 14px; height: 14px; vertical-align: -2px; }
.su-progs { display: flex; flex-wrap: wrap; gap: 4px; }
.chip-static { font-size: 12px; background: var(--primary-soft); color: var(--primary); border-radius: 10px; padding: 1px 8px; }
.su-url code { display: block; font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 4px; padding: 4px 8px; overflow-wrap: anywhere; user-select: all; }
.su-url.su-center code { text-align: center; margin: 10px auto 0; max-width: 460px; }
.su-form-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.su-qr { width: min(300px, 80vw); margin: 0 auto; border: 1px solid var(--line-2); border-radius: 6px; overflow: hidden; }
.su-qr svg { display: block; width: 100%; height: auto; }
.su-center { text-align: center; }
.su-consent-preview { font-size: 13px; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 8px 10px; margin: 0; white-space: pre-wrap; }
.su-prog-checks { flex-direction: column; gap: 6px; }
@media (max-width: 640px) {
  .su-item { flex-direction: column; align-items: stretch; }
  .su-side { flex-direction: row; align-items: center; justify-content: flex-start; }
}

/* Tờ in mã QR (chỉ hiện khi in) */
.print-sheet { display: none; }
@media print {
  body.printing > *:not(.print-sheet) { display: none !important; }
  body.printing { background: #fff; }
  .print-sheet { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 18mm 14mm; font-family: var(--font); color: #000; }
  .print-sheet .ps-org { font-size: 16pt; font-weight: 700; letter-spacing: .02em; margin-bottom: 6mm; color: var(--spine); }
  .print-sheet h1 { font-size: 24pt; margin: 0 0 4mm; }
  .print-sheet .ps-intro { font-size: 12pt; max-width: 150mm; margin: 0 0 6mm; }
  .print-sheet .ps-qr { width: 110mm; }
  .print-sheet .ps-qr svg { display: block; width: 100%; height: auto; }
  .print-sheet .ps-cta { font-size: 15pt; font-weight: 600; margin: 6mm 0 2mm; }
  .print-sheet .ps-url { font-size: 11pt; font-family: monospace; }
  .print-sheet .ps-contact { font-size: 12pt; margin-top: 5mm; }
}

/* ---------------- Bản scan giấy tờ ---------------- */
.scan-box { margin-top: 14px; }
.scan-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.scan-bar select { width: auto; min-width: 200px; height: 32px; }
.scan-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chip.sm { height: 28px; padding: 0 10px; font-size: 13px; }
.chip .n { font-size: 11.5px; background: var(--grey-soft); color: var(--ink-2); border-radius: 8px; padding: 0 6px; line-height: 17px; }
.chip[aria-pressed="true"] .n { background: rgba(255, 255, 255, .25); color: var(--on-accent); }
.scan-chips .chip[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--on-accent); }
.scan-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 8px; }
.scan-card { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 4px 10px; border: 1px solid var(--line-2); border-radius: var(--radius); padding: 8px; background: var(--surface); }
.scan-thumb { width: 64px; height: 64px; border: 1px solid var(--line-2); border-radius: 5px; padding: 0; background: var(--surface-2); cursor: zoom-in; overflow: hidden; display: grid; place-items: center; grid-row: span 2; }
.scan-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-thumb.pdf { cursor: pointer; }
.scan-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.scan-info .tag { align-self: flex-start; }
.scan-name { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scan-actions { display: flex; gap: 2px; flex-wrap: wrap; }
.scan-actions .btn.xs { height: 26px; }
.scan-empty { color: var(--muted); font-size: 13px; padding: 6px 0; grid-column: 1 / -1; }
.scan-count { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; font-size: 11.5px; padding: 0 6px; height: 20px; display: inline-flex; align-items: center; gap: 2px; margin-left: 6px; cursor: pointer; color: var(--ink-2); }
.scan-count svg { width: 12px; height: 12px; }

/* ---------------- AI đọc CCCD / hộ chiếu ---------------- */
.idr-note { display: flex; gap: 10px; align-items: flex-start; }
.idr-note svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.idr-slots { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0; }
@media (max-width: 640px) { .idr-slots { grid-template-columns: 1fr; } }
.idr-slot { display: flex; flex-direction: column; gap: 6px; border: 1px dashed var(--line); border-radius: var(--radius); padding: 10px; }
.idr-frame { height: 150px; border-radius: 6px; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; color: var(--faint); }
.idr-frame > svg { width: 52px; height: 52px; }
.idr-frame img { max-width: 100%; max-height: 150px; object-fit: contain; }
.idr-agree { align-items: flex-start; margin-bottom: 10px; }
.idr-agree input { margin-top: 2px; }
.idr-agree.need { color: var(--danger); font-weight: 600; }
.idr-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.idr-result { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.idr-doc { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.idr-table td { vertical-align: top; }
.idr-table tr.idr-diff td { background: var(--amber-soft); }
.idr-warn { color: var(--amber); }
.idr-save { align-items: flex-start; }
.idr-apply { display: flex; justify-content: flex-end; }
/* Đọc ảnh tuyển dụng / tuyển sinh (01/11/2026) */
.pr-bar { display: flex; gap: 12px; align-items: center; padding: 10px 12px; margin-bottom: 14px; border: 1px dashed var(--violet-line); border-radius: var(--radius); background: var(--violet-soft); }
.pr-bar > svg { width: 22px; height: 22px; flex: none; color: var(--violet); }
.pr-bar > div { flex: 1; min-width: 0; }
.pr-drop { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 14px; margin: 12px 0; border: 1.5px dashed var(--line); border-radius: var(--radius); background: var(--surface-2); }
.pr-drop > svg { width: 28px; height: 28px; flex: none; color: var(--faint); }
.pr-drop > div { flex: 1; min-width: 200px; }
.pr-drop.over { border-color: var(--violet); background: var(--violet-soft); }
.pr-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-bottom: 12px; }
.pr-thumb { position: relative; height: 140px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface-2); overflow: hidden; display: grid; place-items: center; }
.pr-thumb img { max-width: 100%; max-height: 140px; object-fit: contain; }
.pr-thumb .icon-btn { position: absolute; top: 4px; right: 4px; background: var(--surface); }
.pr-val { white-space: pre-wrap; max-height: 9.5em; overflow: auto; overflow-wrap: anywhere; }
@media (max-width: 700px) { .pr-bar { flex-wrap: wrap; } .pr-bar .btn { width: 100%; justify-content: center; } }
/* Đọc ảnh hồ sơ ứng viên (01/11/2026) */
.ai-btns { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.cr-sensitive { align-items: flex-start; margin-bottom: 10px; font-size: 13px; }
.cr-sensitive input { margin-top: 2px; flex: none; }
.cr-list { border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; }
.cr-row { align-items: flex-start; overflow-wrap: anywhere; }
.cr-row input { margin-top: 2px; flex: none; }
.repeat-row.ai-filled-row, .repeat-row.rr-family.ai-filled-row { background: var(--ai-soft); border-radius: 6px; box-shadow: 0 0 0 4px var(--ai-soft); }
.input.ai-filled, .ai-filled.input { background: var(--ai-soft); border-color: var(--ai-line); }
.ai-sub { border-left: 3px solid var(--line); padding: 4px 0 4px 12px; margin: 8px 0; display: flex; flex-direction: column; gap: 6px; }
.ai-ack, .kn-ack { align-items: flex-start; background: var(--amber-soft); padding: 8px 10px; border-radius: var(--radius-sm); font-size: 13px; }
.ai-ack input, .kn-ack input { margin-top: 2px; flex: none; }

/* ---------------- CV tiếng Nhật / tiếng Hàn (Đợt 3) ---------------- */
.cvf-top { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 12px; }
.cvf-status { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cvf-ai { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; }
.cvf-ai-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cvf-ai-head svg { width: 17px; height: 17px; color: var(--primary); }
.cvf-ai p { margin: 0; }
.cvf-ai .check { align-items: flex-start; }
.cvf-ai .check input { margin-top: 3px; flex: none; }
.cvf-opts { display: flex; flex-direction: column; gap: 8px; }
.cvf-list { display: flex; flex-direction: column; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; }
.cvf-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 12px; padding: 10px 12px; border-top: 1px solid var(--line-2); align-items: start; }
.cvf-row:first-child { border-top: 0; }
.cvf-row.missing { background: var(--danger-faint); }
.cvf-row.missing .input { border-color: var(--danger-line); }
.cvf-label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cvf-vi { margin-top: 3px; white-space: pre-wrap; overflow-wrap: anywhere; }
.cvf-dst { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.cvf-dst .input { width: 100%; }
.cvf-dst textarea.input { resize: vertical; min-height: 54px; }
.cvf-sens { font-size: 11px; height: 18px; }
.cvf-foot-note { margin-top: 14px; }
@media (max-width: 640px) { .cvf-row { grid-template-columns: 1fr; gap: 6px; } }

/* ---------------- Báo cáo KPI (Đợt 3) ---------------- */
.rp-filters .help { max-width: 260px; }
.rp-period { margin: -4px 0 12px; color: var(--ink-2); font-weight: 500; }
.rp-body { transition: opacity .15s; }
.rp-body.loading { opacity: .55; pointer-events: none; }
.stats.rp-stats.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1200px) { .stats.rp-stats.five { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1000px) { .stats.rp-stats.five { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .stats.rp-stats, .stats.rp-stats.five { grid-template-columns: 1fr; } }
.rp-stats .delta.up { color: var(--ok); }
.rp-stats .delta.down { color: var(--danger); }
.rp-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 12px; margin-bottom: 12px; }
.rp-grid.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 1200px) { .rp-grid, .rp-grid.two { grid-template-columns: 1fr; } }
.rp-grid > .card, .rp-body > .card { margin: 0; }
.rp-body > .card { margin-bottom: 12px; }
.rp-card-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.rp-card-head h2 { margin-bottom: 2px; }
.rp-table td.num, .rp-table th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rp-table tfoot td { font-weight: 600; border-top: 2px solid var(--line); background: var(--surface-2); }
.rp-table tr.zero td { color: var(--muted); }
.rp-rate > div { display: inline-flex; gap: 8px; align-items: center; justify-content: flex-end; }
.rp-mini { width: 56px; height: 6px; border-radius: 3px; background: var(--grey-soft); overflow: hidden; display: inline-block; }
.rp-mini span { display: block; height: 100%; background: var(--primary); border-radius: 3px; }
.rp-target { min-width: 92px; }
.rp-progress { height: 5px; border-radius: 3px; background: var(--grey-soft); margin: 4px 0 2px auto; width: 80px; overflow: hidden; }
.rp-progress span { display: block; height: 100%; background: var(--blue); border-radius: 3px; }
.rp-progress span.done { background: var(--ok); }
.rp-defs { margin-top: 4px; }
/* Báo cáo hồ sơ (29/10/2026): chỉ tiêu ngay trên thẻ số liệu (KPI của nhân viên hồ sơ); dòng tài chính trong bảng giấy tờ */
.rp-stat-target { margin-top: 6px; }
.rp-stat-target .rp-progress { margin: 4px 0 0; width: 100%; max-width: 180px; }
.rp-table tr.rp-fin td { border-top: 1px dashed var(--line); }
.rp-table tr.rp-fin + tr.rp-fin td { border-top: 0; }
.rp-targets td.rp-na { text-align: center; vertical-align: middle; color: var(--muted); }
.rp-stack { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
.rp-stack > .card { margin: 0; }
.rp-zero { margin: 10px 0 0; }
.rp-funnel { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.rp-frow { display: grid; grid-template-columns: minmax(120px, 0.9fr) minmax(0, 1.4fr) 82px; gap: 10px; align-items: center; }
.rp-flabel { font-size: 13px; color: var(--ink-2); }
.rp-fbar { height: 14px; background: var(--grey-soft); border-radius: 4px; overflow: hidden; }
.rp-fbar span { display: block; height: 100%; background: var(--primary); border-radius: 0 4px 4px 0; }
.rp-fval { text-align: right; font-variant-numeric: tabular-nums; display: flex; gap: 6px; justify-content: flex-end; align-items: baseline; }
.rp-fval span { color: var(--muted); font-size: 12px; }
.rp-lost { margin-top: 14px; color: var(--muted); font-size: 13px; }
@media (max-width: 520px) { .rp-frow { grid-template-columns: 1fr 72px; } .rp-fbar { grid-column: 1 / -1; grid-row: 2; } }
.rp-targets-head { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 12px; }
.rp-targets-head .field { margin: 0; }
.rp-tin { width: 96px; text-align: right; margin-left: auto; }
.rp-tfield { margin: 0; align-items: flex-end; }
.rp-tfield.has-error .rp-tin { border-color: var(--danger); background: var(--danger-soft); }

/* Biểu đồ đường */
.viz-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); margin: 8px 0 4px; }
.viz-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.viz-legend .key, .viz-tip .key { width: 14px; height: 2px; border-radius: 1px; display: inline-block; }
.viz-box { width: 100%; min-height: 260px; }
.viz-line { display: block; max-width: 100%; height: auto; overflow: visible; }
.viz-line .grid { stroke: var(--line-2); stroke-width: 1; }
.viz-line .axis { stroke: var(--line); stroke-width: 1; }
.viz-line .tick { fill: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.viz-line .end-label { fill: var(--ink-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.viz-line .dot { stroke: var(--surface); stroke-width: 2; }
.viz-line .cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.viz-line .hit { cursor: crosshair; outline: none; }
.viz-line .hit:focus-visible { stroke: var(--primary); stroke-width: 1.5; }
.viz-tip { position: fixed; z-index: 95; pointer-events: none; background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 7px; padding: 8px 10px; font-size: 12.5px; min-width: 150px; }
.viz-tip-title { color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.viz-tip-row { display: flex; align-items: center; gap: 8px; line-height: 1.6; }
.viz-tip-row b { font-variant-numeric: tabular-nums; min-width: 28px; text-align: right; }

/* ---------------- Xác thực 2 lớp ---------------- */
.otp-input { font-size: 20px; letter-spacing: .25em; text-align: center; font-variant-numeric: tabular-nums; }
.otp-remember { align-items: flex-start; font-size: 13px; color: var(--ink-2); margin: 0 0 16px; }
.otp-remember input { margin-top: 2px; flex: none; }
.otp-links { display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.otp-help { margin-top: 14px; }
.otp-card { max-width: 460px; }
.otp-setup { display: flex; flex-direction: column; gap: 14px; }
.otp-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; color: var(--ink-2); }
.otp-qr-row { display: grid; grid-template-columns: 172px minmax(0, 1fr); gap: 14px; align-items: start; }
.otp-qr { width: 172px; height: 172px; border: 1px solid var(--line); border-radius: 8px; padding: 6px; background: #fff; }
.otp-qr svg { width: 100%; height: 100%; display: block; }
.otp-qr-side p { margin: 0 0 8px; }
.otp-secret { display: inline-block; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; font-weight: 700; letter-spacing: .08em; padding: 6px 8px; background: var(--grey-soft); border-radius: 6px; user-select: all; overflow-wrap: anywhere; margin-bottom: 8px; }
@media (max-width: 480px) { .otp-qr-row { grid-template-columns: 1fr; justify-items: center; } }
.otp-codes p { margin: 0 0 8px; }
.otp-codes .check { margin-top: 10px; }
.otp-done { margin-top: 12px; display: flex; justify-content: flex-end; }
.otp-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line-2); }
.otp-devices { list-style: none; padding: 0; margin: 0 0 6px; display: flex; flex-direction: column; gap: 6px; }
.otp-devices li { padding: 8px 10px; background: var(--surface-2); border-radius: 6px; }
.otp-devices .tag { margin-left: 8px; }
.otp-policy { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 14px; }
.warn-text { color: var(--amber); }

/* ---------------- Đối tác ---------------- */
.pt-stats .rem-stat { text-align: left; font: inherit; cursor: pointer; }
.pt-stats .rem-stat:hover { border-color: var(--primary); }
.pt-progs { max-width: 260px; white-space: normal; }
.pt-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.pt-kpis > div { border: 1px solid var(--line-2); border-radius: 6px; padding: 8px 10px; font-size: 12.5px; color: var(--ink-2); display: flex; flex-direction: column; }
.pt-kpis strong { font-size: 20px; font-weight: 600; color: var(--ink-strong); line-height: 1.2; }
.pt-links { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.pt-note-form { border: 1px dashed var(--line); border-radius: 6px; padding: 10px 12px; margin-bottom: 10px; display: grid; gap: 8px; }
.pt-note-form .end { display: flex; justify-content: flex-end; }
.pt-notes { display: grid; gap: 8px; }
.pt-note { border-left: 3px solid var(--line); padding: 4px 0 4px 10px; }
.pt-note-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.pt-note-head .btn { margin-left: auto; }
.pt-note-body { white-space: pre-wrap; margin-top: 2px; }
@media (max-width: 720px) { .pt-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------------- Sau xuất cảnh ---------------- */
.ac-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); max-width: none; }
.ac-stats .rem-stat { text-align: left; font: inherit; cursor: pointer; }
.ac-stats .rem-stat:hover { border-color: var(--primary); }
@media (max-width: 1100px) { .ac-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .ac-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ac-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.ac-job { max-width: 240px; white-space: normal; }
.ac-overdue { color: var(--danger); font-weight: 600; }
.ac-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.ac-head .btn { margin-left: auto; }
.ac-quick { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.ac-issue { align-items: flex-start; }
.ac-save { display: flex; justify-content: flex-end; margin-top: 10px; }
.ac-flags { display: flex; flex-direction: column; gap: 8px; padding-top: 22px; }
.pt-note.issue { border-left-color: var(--danger); }
/* Sau xuất cảnh — phần 10 (21/11/2026): tab trong ngăn chi tiết, sự cố, học tập, cơ hội, về nước, cài đặt */
.rem-stat.blue strong { color: var(--blue); }
.pt-note.lost { border-left-color: var(--amber); }
.ac-head-sub { display: flex; align-items: center; gap: 6px 16px; flex-wrap: wrap; margin: -4px 0 10px; }
.ac-head-sub svg, .ac-care svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
.ac-care { display: inline-flex; align-items: center; gap: 4px; }
/* .tabs.pt-tabs (khai báo sau) đặt top / padding — tăng độ ưu tiên để phủ phần nội dung cuộn phía trên thanh tab */
.drawer .tabs.ac-tabs { overflow-x: auto; top: -16px; padding-top: 16px; margin-top: -10px; }
@media (max-width: 600px) { .drawer .tabs.ac-tabs { top: -14px; padding-top: 14px; } }
.ac-pane { min-height: 120px; }
.ac-intro { margin: 0 0 10px; }
.ac-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.ac-cards { display: grid; gap: 8px; }
.ac-card { display: grid; gap: 4px; text-align: left; font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--amber); border-radius: 6px; padding: 9px 12px; }
button.ac-card { cursor: pointer; }
button.ac-card:hover { border-color: var(--primary); }
.ac-card.serious { border-left-color: var(--danger); }
.ac-card.done { border-left-color: var(--line); }
.ac-card.static { border-left-color: var(--blue); }
.ac-card.static.done { border-left-color: var(--line); }
.ac-card-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ac-card-head .code { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink-2); }
.ac-card-tools { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.ac-card-tools select.input { width: auto; min-width: 150px; height: 32px; }
.ac-card .pre, .ac-study .pre { white-space: pre-wrap; }
.ac-states { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.ac-states legend { font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 0; margin-bottom: 4px; width: 100%; }
.ac-flags .ac-states { padding-top: 0; }
.ac-informed .btn.xs { margin-top: 4px; }
.ac-inc-title { margin: 0 0 8px; font-size: 16px; }
.ac-block { margin-top: 14px; }
.section-sub { font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 10px 0 4px; }
.ac-jobs { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ac-jobs li { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.ac-study td { vertical-align: top; }
.ac-markets { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 16px; }
.ac-market { display: grid; grid-template-columns: 1fr 70px auto; align-items: center; gap: 6px; font-size: 14px; }
@media (max-width: 600px) { .ac-card-tools select.input { min-width: 0; flex: 1; } }

/* ---------------- Thông báo đẩy, cài ứng dụng ---------------- */
.push-panel { display: grid; gap: 18px; }
.push-sec h3 { font-size: 14px; font-weight: 600; margin: 0 0 8px; }
.push-state { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.push-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.push-kinds { display: grid; gap: 6px; margin-top: 6px; }
.push-kinds .check { align-items: flex-start; }
.push-kinds .check input { margin-top: 2px; flex: none; }
.push-dev { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-2); }
.push-dev > svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.push-dev > div { flex: 1; min-width: 0; }
.push-dev .tag { margin-left: 6px; }

/* ---------------- Đào tạo ngoại ngữ ---------------- */
.tr-tabs { margin-bottom: 14px; }
.tr-tabs .tabs { flex-wrap: wrap; }
.empty-note { padding: 14px; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); text-align: center; background: var(--surface-2); }
.tr-ok { color: var(--ok); font-weight: 500; }
.tr-warn { color: var(--amber); font-weight: 500; font-size: 12.5px; }
.tr-rate { font-weight: 600; font-variant-numeric: tabular-nums; }
.tr-rate.ok { color: var(--ok); }
.tr-rate.warn { color: var(--amber); }
.tr-rate.bad { color: var(--danger); }
.tr-prog { display: flex; flex-direction: column; gap: 3px; min-width: 110px; }
.tr-bar { height: 6px; border-radius: 3px; background: var(--grey-soft); overflow: hidden; }
.tr-bar span { display: block; height: 100%; background: var(--primary); border-radius: 3px; }
.tr-clip { max-width: 360px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Buổi học hôm nay */
.tr-today { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 14px; }
.tr-today-head { margin-bottom: 8px; }
.tr-today-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.tr-today-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; align-items: start; border: 1px solid var(--line-2); border-radius: 8px; padding: 10px 12px; background: var(--surface-2); }
.tr-today-card.done { background: var(--ok-soft); border-color: transparent; }
.tr-today-time { font-weight: 600; color: var(--ink-strong); font-size: 15px; grid-row: span 2; padding-top: 1px; }
.tr-today-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tr-today-card .btn { grid-column: 2; justify-self: start; margin-top: 4px; }
.tr-unmarked-box { margin-top: 10px; }
.tr-unmarked-box summary { cursor: pointer; color: var(--amber); font-weight: 600; }
.tr-unmarked { margin-top: 6px; }
.tr-unmarked-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line-2); }
.tr-unmarked-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Ngăn lớp học */
.tr-info { margin-bottom: 12px; }
.tr-info summary { cursor: pointer; font-weight: 600; color: var(--ink-2); margin-bottom: 8px; }
.tr-pane-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.tr-roster { display: flex; flex-direction: column; }
.tr-roster-row { display: grid; grid-template-columns: 36px minmax(170px, 1fr) minmax(0, auto) auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line-2); }
.tr-roster-row:first-child { border-top: 0; }
.tr-roster-row.off { opacity: .7; }
.tr-roster-row .thumb { width: 36px; height: 48px; }
.tr-roster-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tr-roster-side { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; justify-content: flex-end; max-width: 380px; }
.tr-sessions { display: flex; flex-direction: column; }
.tr-session { display: grid; grid-template-columns: 28px 92px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 7px 6px; border-top: 1px solid var(--line-2); }
.tr-session:first-child { border-top: 0; }
.tr-session-n { color: var(--muted); text-align: right; font-size: 12.5px; }
.tr-session-when { display: flex; flex-direction: column; }
.tr-session-main { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; min-width: 0; }
.tr-session.today { background: var(--blue-soft); border-radius: 6px; }
.tr-session.cancelled .tr-session-when strong { text-decoration: line-through; color: var(--muted); }
.tr-session.done .tr-session-n { color: var(--ok); }
@media (max-width: 640px) {
  .tr-roster-row { grid-template-columns: 36px minmax(0, 1fr) auto; }
  .tr-roster-side { grid-column: 2 / -1; justify-content: flex-start; max-width: none; }
  .tr-session { grid-template-columns: 24px 84px minmax(0, 1fr); }
  .tr-session-state, .tr-session .row-actions { grid-column: 3; }
  .tr-unmarked-row { grid-template-columns: 1fr auto; }
  .tr-unmarked-name { grid-column: 1; grid-row: 2; }
}

/* Lịch tuần khi mở lớp */
.tr-sched { display: flex; flex-direction: column; gap: 8px; }
.tr-days button { min-width: 44px; justify-content: center; }
.tr-slots { display: flex; flex-direction: column; gap: 6px; }
.tr-slot { display: grid; grid-template-columns: 80px 120px auto 120px; gap: 8px; align-items: center; }
.tr-slot-day { font-weight: 600; color: var(--ink-2); }
.tr-preview { margin: 4px 0 8px; padding: 8px 12px; border-radius: 6px; background: var(--primary-soft); color: var(--ink-strong); font-size: 13px; }
@media (max-width: 520px) { .tr-slot { grid-template-columns: 70px minmax(0, 1fr) auto minmax(0, 1fr); } }

/* Phiếu điểm danh */
.att-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0 10px; }
.att-summary { display: flex; flex-wrap: wrap; gap: 6px; }
.att-count { display: inline-flex; gap: 4px; align-items: baseline; font-size: 12.5px; color: var(--ink-2); background: var(--grey-soft); border-radius: 10px; padding: 1px 8px; }
.att-count.att-present strong { color: var(--ok); }
.att-count.att-late strong { color: var(--amber); }
.att-count.att-excused strong { color: var(--blue); }
.att-count.att-absent strong { color: var(--danger); }
.att-count.att-none { background: var(--amber-soft); }
.att-list { display: flex; flex-direction: column; margin-bottom: 12px; }
.att-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 6px 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line-2); }
.att-row:first-child { border-top: 0; }
.att-row .thumb { width: 36px; height: 48px; }
.att-name { display: flex; flex-direction: column; min-width: 0; }
.att-name strong { overflow: hidden; text-overflow: ellipsis; }
.att-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.att-seg button { border: 0; border-right: 1px solid var(--line-2); background: transparent; height: 38px; min-width: 56px; padding: 0 8px; cursor: pointer; font-weight: 500; color: var(--ink-2); font-size: 13px; }
.att-seg button:last-child { border-right: 0; }
.att-seg button:disabled { cursor: default; }
.att-seg button:not(:disabled):hover { background: var(--surface-2); }
.att-seg button.att-present[aria-checked="true"] { background: var(--ok); color: var(--on-accent); }
.att-seg button.att-late[aria-checked="true"] { background: var(--amber); color: var(--on-accent); }
.att-seg button.att-excused[aria-checked="true"] { background: var(--blue); color: var(--on-accent); }
.att-seg button.att-absent[aria-checked="true"] { background: var(--danger); color: var(--on-accent); }
.att-note { grid-column: 2 / -1; height: 32px; }
@media (max-width: 520px) {
  .att-row { grid-template-columns: 36px minmax(0, 1fr); }
  .att-seg { grid-column: 1 / -1; width: 100%; }
  .att-seg button { flex: 1; min-width: 0; height: 42px; }
  .att-note { grid-column: 1 / -1; }
}

/* Ngoại ngữ và lớp học của ứng viên */
.tr-box { margin: 12px 0 4px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface-2); }
.tr-box-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.tr-langs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.tr-langs li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.tr-langs li strong { min-width: 90px; }
.tr-noclass { margin-top: 6px; }
.tr-enrolls { margin-top: 8px; display: flex; flex-direction: column; }
.tr-enroll { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 7px 0; border-top: 1px solid var(--line-2); align-items: center; }
.tr-enroll-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; align-items: flex-start; }
.tr-enroll-side { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; justify-content: flex-end; max-width: 300px; }
.tr-lang-rows { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.tr-lang-row { position: relative; border: 1px solid var(--line-2); border-radius: 8px; padding: 10px 44px 4px 12px; }
.tr-lang-del { position: absolute; top: 8px; right: 6px; }
.tr-pick-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 8px; margin-top: 10px; max-height: 52vh; overflow: auto; }
.tr-pick { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--line-2); align-items: center; }
.tr-pick:first-child { border-top: 0; }
.tr-pick-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tr-pick-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.tr-cand { display: grid; grid-template-columns: auto 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 12px; border-top: 1px solid var(--line-2); cursor: pointer; }
.tr-cand:first-child { border-top: 0; }
.tr-cand.off { opacity: .6; cursor: default; }
.tr-cand input { width: 16px; height: 16px; accent-color: var(--primary); }
.tr-cand-main { display: flex; flex-direction: column; min-width: 0; }
.tr-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tr-chips .cand-chip { height: 32px; }
@media (max-width: 560px) {
  .tr-enroll, .tr-pick { grid-template-columns: 1fr; }
  .tr-enroll-side, .tr-pick-side { justify-content: flex-start; align-items: flex-start; max-width: none; }
  .tr-cand { grid-template-columns: auto 34px minmax(0, 1fr); }
  .tr-cand .tag { grid-column: 3; justify-self: start; }
}

/* Danh mục ngôn ngữ */
.tr-lang-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.tr-lang-card { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.tr-lang-card.off { opacity: .7; }
.tr-lang-card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tr-lang-card-head .btn { margin-left: auto; }
.tr-chiplist { display: flex; flex-wrap: wrap; gap: 4px; }
.tr-kv { margin-top: 4px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.tr-sched-cell { min-width: 150px; }
.tr-days { align-self: flex-start; }
.tr-slot { grid-template-columns: 80px 132px 12px 132px; justify-content: start; }
.tr-class-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.tr-class-card { text-align: left; font: inherit; cursor: pointer; padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; color: inherit; }
.tr-class-card:hover { border-color: var(--primary); }
.tr-class-card.off { opacity: .7; }
.tr-class-card-head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.att-extra { margin-top: 4px; }
@media (max-width: 520px) { .tr-slot { grid-template-columns: 64px minmax(0, 1fr) 10px minmax(0, 1fr); } }
.tr-sched { margin-bottom: 12px; }

/* ---------------- Đào tạo, Đợt B: kiểm tra, nhận xét, kỳ thi, báo cáo ---------------- */
.tr-warn-tag { display: inline-flex; align-items: center; gap: 3px; }
.tr-warn-tag svg, .tr-enroll-side .tag svg { width: 12px; height: 12px; }
.tr-rate-cell { display: flex; flex-direction: column; gap: 2px; }
/* Danh sách bài kiểm tra */
.tt-list { display: flex; flex-direction: column; }
.tt-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) minmax(120px, auto) auto; gap: 10px; align-items: center; padding: 8px 4px; border-top: 1px solid var(--line-2); }
.tt-row:first-child { border-top: 0; }
.tt-row.future { opacity: .8; }
.tt-date { display: flex; flex-direction: column; line-height: 1.25; }
.tt-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tt-stat { display: flex; flex-direction: column; gap: 1px; align-items: flex-end; text-align: right; }
.tt-score { display: inline-flex; align-items: baseline; gap: 4px; flex-wrap: wrap; }
.tt-score .tag { margin-left: 2px; }
.tt-parts { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface-2); }
.tt-part { display: grid; grid-template-columns: minmax(0, 1fr) 120px auto; gap: 8px; align-items: end; }
.tt-part .field { margin: 0; }
@media (max-width: 640px) {
  .tt-row { grid-template-columns: 46px minmax(0, 1fr); }
  .tt-stat { grid-column: 2; align-items: flex-start; text-align: left; }
  .tt-row .row-actions { grid-column: 2; }
}
/* Phiếu nhập điểm */
.sc-list { display: flex; flex-direction: column; margin-bottom: 12px; }
.sc-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto auto; gap: 6px 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line-2); }
.sc-row:first-child { border-top: 0; }
.sc-row .thumb { width: 36px; height: 48px; }
.sc-parts { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-end; }
.sc-part { display: flex; flex-direction: column; gap: 1px; font-size: 12px; max-width: 110px; }
.sc-part .cell-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-in { width: 76px; height: 38px; text-align: center; font-size: 15px; }
.sc-total { font-weight: 600; color: var(--ink-strong); padding-bottom: 9px; min-width: 44px; }
.sc-absent { font-size: 13px; white-space: nowrap; }
.sc-note { grid-column: 2 / -1; height: 32px; }
.sc-err { grid-column: 2 / -1; color: var(--danger); font-size: 12.5px; }
@media (max-width: 560px) {
  .sc-row { grid-template-columns: 36px minmax(0, 1fr) auto; }
  .sc-parts { grid-column: 1 / -1; }
  .sc-absent { grid-column: 3; grid-row: 1; }
  .sc-note, .sc-err { grid-column: 1 / -1; }
  .sc-part { flex: 1 1 0; min-width: 0; max-width: none; }
  .sc-in { width: 100%; }
}
/* Học viên trong lớp */
.st-head { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 12px; align-items: center; margin-bottom: 12px; }
.st-head .thumb { width: 54px; height: 72px; }
.st-head > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.st-scores { display: flex; flex-direction: column; }
.st-score { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line-2); }
.st-score:first-child { border-top: 0; }
.st-score-main { display: flex; flex-direction: column; min-width: 0; }
.st-cm-form { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 8px; }
@media (max-width: 560px) { .st-cm-form { grid-template-columns: 1fr; } }
.st-cm { border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 10px; margin-top: 8px; background: var(--surface-2); }
.st-cm-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.st-cm-head .icon-btn { margin-left: auto; }
.st-cm-body { margin-top: 4px; white-space: pre-wrap; }
.st-att { display: flex; flex-wrap: wrap; gap: 4px; }
.st-att-day { display: inline-flex; flex-direction: column; align-items: center; min-width: 44px; padding: 3px 4px; border-radius: 6px; font-size: 11.5px; background: var(--grey-soft); color: var(--ink-2); }
.st-att-day strong { font-size: 13px; }
.st-att-day.att-present { background: var(--ok-soft); }
.st-att-day.att-present strong { color: var(--ok); }
.st-att-day.att-late { background: var(--amber-soft); }
.st-att-day.att-late strong { color: var(--amber); }
.st-att-day.att-excused { background: var(--blue-soft); }
.st-att-day.att-excused strong { color: var(--blue); }
.st-att-day.att-absent { background: var(--danger-soft, #fde8e8); }
.st-att-day.att-absent strong { color: var(--danger); }
/* Hồ sơ ứng viên: điểm, nhận xét, kỳ thi */
.tr-enroll-tests, .tr-enroll-cm { font-size: 12.5px; color: var(--ink-2); }
.tr-enroll-cm { font-style: italic; }
.tr-enroll-cm .tag { font-style: normal; }
.tr-exams { list-style: none; margin: 8px 0 0; padding: 6px 0 0; border-top: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 4px; }
.tr-exams li { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.tr-exams li > svg { width: 14px; height: 14px; color: var(--gold); }
/* Kỳ thi */
.ex-levels { gap: 6px; }
.check.chip { border: 1px solid var(--line); border-radius: 14px; padding: 3px 10px 3px 6px; background: var(--surface); font-size: 13px; }
.check.chip:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.tr-pick-side select.sm { height: 32px; width: auto; min-width: 110px; }
/* Cài đặt cảnh báo */
.tr-settings { margin-top: 14px; padding: 12px 14px; }
.tr-settings h3 { margin: 0 0 4px; font-size: 15px; }
.grid.g2.tight { gap: 8px; }
/* Báo cáo đào tạo */
.rp-tabs { margin-bottom: 10px; }
.stats.rp-stats.rp-money { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) { .stats.rp-stats.rp-money { grid-template-columns: 1fr; } }
.rp-bad { color: var(--danger); }
.stats.rp-stats.six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 1400px) { .stats.rp-stats.six { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 1000px) { .stats.rp-stats.six { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .stats.rp-stats.six { grid-template-columns: 1fr; } }
/* Hồ sơ dừng (10/11/2026): KPI tuyển sinh 7 ô (có đăng ký online), KPI hồ sơ 3 × 3; hàng "Hồ sơ dừng" trong bảng bước hồ sơ */
.stats.rp-stats.seven { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (min-width: 1400px) { .stats.rp-stats.seven { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
@media (max-width: 1000px) { .stats.rp-stats.seven { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stats.rp-stats.nine { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 700px) { .stats.rp-stats.nine { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .stats.rp-stats.seven, .stats.rp-stats.nine { grid-template-columns: repeat(2, minmax(0, 1fr)); } } /* điện thoại: 2 cột cho gọn */
.rp-fsep { font-size: 12px; font-weight: 600; color: var(--ink-2); border-top: 1px dashed var(--line); padding-top: 8px; margin-top: 2px; }
.rp-frow.stop .rp-fbar span { background: var(--danger); }
.rp-lost-stop { margin-top: 4px; color: var(--danger-ink); }
.rp-table td.rp-stop-n { color: var(--danger-ink); font-weight: 600; }
.dossier-stop strong { display: block; }
/* Lần xử lý hồ sơ (10/11/2026 chiều): các lần trước kèm kết quả, lý do; nhãn "Lần 2" ở danh sách */
.dossier-attempts { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; background: var(--surface-2); }
.dossier-attempts .da-head { font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.dossier-attempts ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.dossier-attempts li { padding-left: 10px; border-left: 3px solid var(--danger-line); }
.dossier-attempts li.current { border-left-color: var(--primary); }
.dossier-attempts .da-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.dossier-attempts .da-reason { font-size: 13px; margin-top: 2px; overflow-wrap: anywhere; }
.dossier-reopen { margin-top: 2px; }
.ds-cell { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.attempt-chip { font-size: 11.5px; font-weight: 600; padding: 1px 6px; border-radius: 10px; border: 1px solid var(--primary-line); color: var(--primary); white-space: nowrap; }
.timeline li.voided .body { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.timeline li.voided .body + .body { text-decoration: none; }
.rp-trend-table { margin-top: 8px; }
.rp-trend-table summary { cursor: pointer; color: var(--ink-2); font-size: 13px; }
.rp-body .table-scroll { min-height: 0; }
/* CV tiếng nước ngoài: 5 ngôn ngữ */
.cvf-langs button { height: 32px; padding: 0 10px; font-size: 13px; }
@media (max-width: 640px) {
  .cvf-langs { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .cvf-langs button { justify-content: center; text-align: center; height: auto; min-height: 38px; padding: 6px 8px; line-height: 1.25; border-bottom: 1px solid var(--line-2); }
  .cvf-langs button:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* ---------------- Kết nối AI cá nhân (01/11/2026) ---------------- */
.kn-card { margin-bottom: 14px; }
.kn-card h2 { display: flex; align-items: center; gap: 8px; font-size: 16px; margin: 0 0 6px; }
.kn-card h2 svg { width: 18px; height: 18px; color: var(--violet); }
.kn-copy { display: flex; gap: 8px; align-items: center; }
.kn-copy .input { flex: 1; min-width: 0; }
.kn-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 12px 20px; margin: 12px 0 4px; }
.kn-steps h3, .kn-sub { font-size: 14px; margin: 0 0 6px; }
.kn-sub { margin-top: 14px; }
.kn-steps ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; line-height: 1.5; }
.kn-privacy { margin: 12px 0 0; font-size: 13px; }
.kn-privacy svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.kn-consent { max-width: 620px; }
.kn-app { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.kn-app strong { font-size: 17px; }
.kn-app-icon { width: 44px; height: 44px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; flex: none; }
.kn-app-icon svg { width: 22px; height: 22px; }
.kn-perms { list-style: none; padding: 0; margin: 10px 0 16px; display: flex; flex-direction: column; gap: 8px; }
.kn-perms li { display: flex; gap: 8px; align-items: flex-start; line-height: 1.45; }
.kn-perms svg { width: 16px; height: 16px; flex: none; margin-top: 3px; color: var(--primary); }
.kn-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.kn-actions.start { justify-content: flex-start; margin: 6px 0; }
.btn.kn-chatgpt { background: #0d0d0d; color: #fff; border-color: #0d0d0d; font-weight: 600; }
.btn.kn-chatgpt:hover { background: #2a2a2a; }
.btn.kn-grok-btn { background: #111; color: #fff; border-color: #111; font-weight: 600; letter-spacing: .01em; }
.btn.kn-grok-btn:hover { background: #333; }
.kn-device { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 10px; }
.kn-steps-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.kn-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 28px; font-weight: 700; letter-spacing: .18em; padding: 10px 16px; border: 1.5px dashed var(--line); border-radius: var(--radius); background: var(--surface-2); align-self: flex-start; user-select: all; }
.kn-wait::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); margin-right: 8px; vertical-align: middle; animation: kn-pulse 1.2s ease-in-out infinite; }
@keyframes kn-pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .kn-wait::before { animation: none; } }
.kn-card .table-scroll, .ai-grid .table-scroll { min-height: 0; }
/* ChatGPT: chọn cách đăng nhập (02/11/2026), ô dán địa chỉ khi chạy local */
.kn-methods { display: flex; flex-direction: column; gap: 6px; }
.kn-methods .check { align-items: flex-start; }
.kn-methods input { margin-top: 3px; flex: none; }
.kn-paste { margin: 0; }
.kn-paste .kn-copy .input { min-width: 0; }
/* Claude Code, Grok Build: MCP riêng (02/11/2026) */
.kn-code-card .kn-steps li .kn-copy, .kn-grokb-card .kn-steps li .kn-copy { margin-top: 6px; }
.kn-code-card .kn-steps li > .btn, .kn-grokb-card .kn-steps li > .btn { margin: 4px 0; }
.kn-grokb-card > .kn-steps { margin: 4px 0 12px; }
.kn-lan { margin: 12px 0; padding-top: 12px; border-top: 1px solid var(--line, #e5e7eb); }
.kn-lan-form { max-width: 440px; margin: 6px 0; }
.kn-lan-form .field { margin-top: 8px; }
.kn-lan-result .alert { margin: 8px 0; }
.kn-lan ol > li { margin-bottom: 8px; }
.kn-reauth { margin: 14px 0 4px; max-width: 420px; }
.kn-reauth .field { margin-top: 8px; }
/* Mã API OpenAI cá nhân (03/11/2026) */
.kn-okey-card > .kn-steps { margin: 10px 0 12px; }
.kn-okey-form { max-width: 520px; }
.kn-okey-form .kn-actions { justify-content: flex-start; margin-top: 8px; }
.kn-okey-status { margin: 10px 0; }
.kn-okey-status .kn-actions { justify-content: flex-start; margin-top: 8px; }

/* Phân hệ Tài chính (04/11/2026) */
.fin-box { margin-top: 6px; }
.fin-box .section-title, .fin-sched .section-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fin-sums { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin: 8px 0 10px; }
.fin-tile { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--surface); min-width: 0; }
.fin-tile .label { font-size: 12px; color: var(--muted); font-weight: 600; }
.fin-tile .value { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 2px; overflow-wrap: anywhere; }
.fin-tile .note { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.fin-tile.warn .value { color: var(--amber); }
.fin-tile.bad .value, .fin-bad-text { color: var(--danger); }
.stat.fin-bad .value { color: var(--danger); }
.stat .value.fin-value { font-size: 22px; }
.fin-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.fin-sub { margin: 12px 0 4px; font-size: 13px; color: var(--ink-2); }
table.fin-table td.num, table.fin-table th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.fin-table td { vertical-align: top; }
table.fin-edit td { padding: 4px; }
table.fin-edit .input { min-width: 0; }
table.fin-edit td:nth-child(2) .input { min-width: 170px; }
table.fin-edit td:nth-child(3) .input { min-width: 120px; }
.fin-cancelled { margin-top: 6px; font-size: 13px; color: var(--muted); }
.fin-srcs { display: grid; gap: 6px; margin-bottom: 10px; }
.fin-fx { margin-top: 10px; }
.fin-fx summary { cursor: pointer; color: var(--ink-2); font-size: 13px; margin-bottom: 8px; }
.fin-files { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fin-inline { display: flex; gap: 6px; align-items: center; }
.fin-inline .input { max-width: 320px; }
.fin-allocs { margin: 4px 0; padding-left: 18px; }
.fin-sumline { margin: 4px 2px 8px; font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.fin-month { margin-bottom: 14px; }
.err-text { color: var(--danger); }
.fin-sched { margin-top: 10px; }
.fin-clip svg { width: 14px; height: 14px; vertical-align: -2px; }
.fin-box table.fin-table td:first-child, .fin-sched table.fin-table td:nth-child(2) { min-width: 150px; }
.modal-foot .fin-foot-left { margin-right: auto; display: flex; gap: 8px; flex-wrap: wrap; }
/* Đợt 2 tài chính */
a.stat.dash-fin { text-decoration: none; color: inherit; }
a.stat.dash-fin .value { font-size: 22px; font-variant-numeric: tabular-nums; }
/* Phân hệ Tài chính Đợt 2 (04/11/2026) */
.tabs.fin-tabs { display: flex; flex-wrap: nowrap; width: 100%; max-width: 100%; margin: 0 0 14px; background: transparent; padding: 0; border-radius: 0; gap: 0; border-bottom: 1px solid var(--line); }
.tabs.fin-tabs button { border-radius: 0; padding: 8px 12px 9px; margin-bottom: -1px; border-bottom: 2px solid transparent; }
.tabs.fin-tabs button[aria-selected="true"] { background: transparent; box-shadow: none; color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.tabs.fin-subtabs { display: flex; flex-wrap: wrap; width: fit-content; max-width: 100%; margin: 0 0 12px; }
.fin-qr-wrap { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin: 12px 0 6px; }
.fin-qr { flex: none; width: 190px; height: 190px; border: 1px solid var(--line); border-radius: 8px; padding: 6px; background: #fff; }
.fin-qr svg { width: 100%; height: 100%; display: block; }
.fin-qr-wrap .kv { flex: 1 1 260px; }
.fin-bank-row { align-items: end; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.fin-bank-end { display: flex; gap: 8px; align-items: center; padding-bottom: 6px; }
.fin-caps table.fin-table .input { max-width: 150px; }
.fin-desc { max-width: 420px; overflow-wrap: anywhere; font-size: 13px; }
.fin-cap { margin: 4px 0 8px; }
/* Phân hệ Tài chính Đợt 3 (04/11/2026) */
.fin-bank-row { grid-template-columns: minmax(0, 2fr) minmax(0, 1.3fr) minmax(0, 2fr) minmax(0, 1fr) auto; }
@media (max-width: 760px) { .fin-bank-row { grid-template-columns: 1fr; } }
.fin-url { font-size: 12.5px; overflow-wrap: anywhere; background: var(--grey-soft); padding: 4px 6px; border-radius: 5px; }
.fin-payos { margin-top: 12px; }
.fin-cands { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 12px; margin: 6px 0 4px; max-height: 220px; overflow: auto; }
/* Phí đối tác theo từng ứng viên, theo Đối ngoại (15/11/2026) */
.fin-warn-text { color: var(--amber); }
.fin-candrows { display: grid; gap: 6px; }
.fin-candrows .table-scroll { max-height: 280px; overflow: auto; }
.fin-candrows td:first-child, .fin-candrows th:first-child { width: 32px; }
.fin-candrows td:last-child { width: 170px; }
.fin-candrows td:last-child .input { width: 100%; }
.fin-cand-each { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.fin-cand-each .input { width: 170px; }
.fin-cand-total { font-weight: 600; font-size: 13px; }
.fin-cand-list { margin-top: 3px; font-size: 12.5px; }
.fin-cand-list summary { cursor: pointer; color: var(--primary); width: max-content; }
.fin-cand-list ul { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.fin-cand-list li { display: grid; gap: 0; }
.fin-cand-amt { white-space: nowrap; font-variant-numeric: tabular-nums; }
.fin-charge-cell { min-width: 230px; }
.fin-inv .input { min-width: 0; }
.fin-connect .fin-inline .input { max-width: none; flex: 1; }
.fin-gl table.fin-table td:first-child { width: 62%; }

/* Kết nối ngoài — khóa API, Javis OS (05/11/2026) */
.ext-page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.ext-steps { margin: 6px 0 10px; padding-left: 20px; line-height: 1.75; }
.ext-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; background: var(--grey-soft); padding: 1px 6px; border-radius: 4px; word-break: break-all; }
.ext-pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; background: var(--grey-soft); padding: 10px 12px; border-radius: var(--radius-sm); white-space: pre-wrap; word-break: break-all; margin: 6px 0; }
.ext-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.ext-acts { display: flex; gap: 4px; flex-wrap: wrap; }
.ext-chips { display: flex; flex-wrap: wrap; gap: 6px 10px; }
.ext-ack { align-items: flex-start; line-height: 1.45; }
.ext-ack input { margin-top: 2px; flex: none; }
.ext-copy { display: flex; gap: 8px; align-items: center; }
.ext-copy .input { flex: 1; min-width: 0; }
.ext-secret { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
table.ext-table tr.muted td { color: var(--muted); }
.danger-text { color: var(--danger); }
@media (max-width: 640px) { .ext-copy { flex-wrap: wrap; } }
/* Kết nối ngoài Đợt B: Zalo Bot, Telegram; Kết nối chat của nhân viên */
.ext-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 16px; }
.ext-grid > * { min-width: 0; }
.ext-bot .field { margin-bottom: 10px; }
.ext-cmds { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 4px 16px; margin: 8px 0; font-size: 13.5px; }
.ext-log summary { cursor: pointer; }
.cl-panel { display: grid; gap: 12px; }
.cl-card { display: grid; gap: 8px; }
.cl-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cl-head svg { width: 18px; height: 18px; flex: none; color: var(--primary); }
.cl-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cl-code { display: grid; gap: 8px; }
.cl-digits { font-size: 34px; font-weight: 700; letter-spacing: .28em; font-variant-numeric: tabular-nums; color: var(--primary); }
.cl-prefs { display: grid; gap: 6px; border-top: 1px solid var(--line-2); padding-top: 8px; }
.cl-prefs > .btn { justify-self: start; }
.cl-checks { display: grid; gap: 4px; }
.cl-quiet { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cl-time { width: 72px; text-align: center; }
/* Zalo OA (Đợt C) */
.zoa-box { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; margin: 10px 0; display: grid; gap: 8px; }
.zoa-box .appt-head .row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.zoa-line { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.zoa-msgs { margin: 0; }
.zoa-msgs li.zoa-in .body { color: var(--ink); font-weight: 500; }
.zoa-reply { display: grid; gap: 6px; }
.zoa-reply .row-actions { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; }
.zoa-url { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; max-width: 100%; }
.zoa-map-row { margin-bottom: 8px; }
.zoa-map-ctl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.zoa-params td { vertical-align: top; }
.zoa-skip { margin: 4px 0 0; padding-left: 18px; max-height: 200px; overflow: auto; }
@media (max-width: 640px) { .zoa-map-ctl { grid-template-columns: minmax(0, 1fr); } }

/* ---------------- Giao diện mới (05/11/2026): tinh chỉnh chung ---------------- */
.license-bar, .notice-bar { padding: 7px 26px; font-size: 13px; }
@media (max-width: 900px) { .license-bar, .notice-bar { padding: 7px 12px; font-size: 12.5px; } }
/* Hộp thoại cao trên điện thoại: không mất đầu / chân hộp thoại sau thanh công cụ của trình duyệt */
@media (max-width: 600px) {
  .overlay.center { padding: 8px; align-items: flex-start; }
  .modal { max-height: calc(100dvh - 16px); }
  .drawer-head, .modal-head { padding: 12px 14px 10px; }
  .drawer-body { padding: 14px 14px 22px; }
  .modal-body { padding: 12px 14px; }
  .drawer-foot, .modal-foot { padding: 8px 14px; }
}


/* ---------------- Cài đặt hệ thống (05/11/2026): logo, tên đơn vị, giao diện ---------------- */
.brand-logo { display: block; flex: none; width: auto; object-fit: contain; border-radius: 7px; }
.brand-logo.on-light { background: #fff; padding: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .06); }
.brand .brand-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.login-cover .brand .brand-name { -webkit-line-clamp: 3; }

.settings-page { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; align-items: start; }
.settings-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.settings-page .field { max-width: 520px; }
.settings-preview { position: sticky; top: 14px; }
.pv-label { font-size: 12px; font-weight: 600; color: var(--ink-2); margin: 12px 0 6px; }
.pv-sidebar { background: var(--spine); border-radius: 9px; }
.pv-sidebar .brand { padding: 14px; }
.pv-tab {
  display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; max-width: 100%;
  border: 1px solid var(--line); border-bottom: 0; border-radius: 9px 9px 0 0; background: var(--surface-2);
  font-size: 12.5px; color: var(--ink-2); box-shadow: inset 0 -1px 0 var(--line);
}
.pv-tab > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pv-fav { width: 16px; height: 16px; object-fit: contain; flex: none; }
.logo-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.logo-now { display: flex; gap: 8px; flex: none; }
.logo-stage { width: 88px; height: 72px; border-radius: 9px; background: var(--spine); display: grid; place-items: center; }
.logo-stage.light { background: #f2f3f6; box-shadow: inset 0 0 0 1px #d9dde6; }
.logo-side { display: flex; flex-direction: column; gap: 8px; min-width: min(200px, 100%); flex: 1; }
.set-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
form.card .set-actions { margin-top: 14px; }
.opt-row { border: 0; padding: 0; margin: 14px 0 0; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.opt-row legend { font-size: 12.5px; font-weight: 600; color: var(--ink-2); padding: 0; margin-bottom: 6px; }
.opt-row .check { align-items: flex-start; }
.opt-row .check input { margin-top: 2px; flex: none; }
.name-fields { margin: 10px 0 12px 23px; display: flex; flex-direction: column; gap: 6px; }
.name-suggest { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.name-suggest .chip { height: 28px; font-size: 12.5px; padding: 0 10px; }
.muted-field { opacity: .55; }
.theme-mine { margin: 10px 0 0; }
@media (max-width: 1040px) {
  .settings-page { grid-template-columns: minmax(0, 1fr); }
  .settings-preview { position: static; }
}
@media (max-width: 640px) { .name-fields { margin-left: 0; } }

/* Chọn giao diện: thẻ có hình thu nhỏ (gáy hồ sơ + trang) */
.theme-opts { display: grid; gap: 8px; }
.theme-opts.row { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.theme-opt {
  display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); cursor: pointer;
}
.theme-opt:hover { border-color: var(--line-strong); }
.theme-opt:has(input:checked) { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); background: var(--primary-soft); }
.theme-opt:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.theme-opt input { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); }
.theme-opt-text { display: flex; flex-direction: column; min-width: 0; }
/* Mã ứng viên (18/11/2026): thẻ chọn cách đặt mã không có hình thu nhỏ */
.theme-opt.cc-opt { grid-template-columns: auto minmax(0, 1fr); }
.cc-parts { margin-top: 12px; }
.cc-sample { margin-top: 10px; padding: 8px 10px; border-radius: 8px; background: var(--surface-2, var(--primary-soft)); font-size: 13.5px; }
.cc-manual { margin-top: 12px; align-items: flex-start; }
.theme-opt-text span { font-size: 12.5px; color: var(--muted); }
.theme-opt:has(input:checked) .theme-opt-text span { color: var(--ink-2); }
.theme-swatch { width: 48px; height: 34px; border-radius: 6px; display: flex; overflow: hidden; flex: none; box-shadow: 0 0 0 1px var(--line); }
.theme-swatch .sw-spine { width: 12px; flex: none; }
.theme-swatch .sw-page { flex: 1; padding: 6px 5px; display: flex; flex-direction: column; gap: 4px; }
.theme-swatch .sw-page i { display: block; height: 3px; border-radius: 2px; }
.theme-swatch .sw-page i:nth-child(1) { width: 62%; }
.theme-swatch .sw-page i:nth-child(2) { width: 88%; }
.theme-swatch .sw-page i:nth-child(3) { width: 48%; }
.t-light .sw-spine { background: #1d2a4d; }
.t-light .sw-page { background: #f2f3f6; }
.t-light .sw-page i { background: #c9cede; }
.t-light .sw-page i:nth-child(1) { background: #2b47a3; }
.t-dark .sw-spine { background: #0d1222; }
.t-dark .sw-page { background: #1c2230; }
.t-dark .sw-page i { background: #3b4459; }
.t-dark .sw-page i:nth-child(1) { background: #8fa5f4; }
.t-auto .sw-spine { background: linear-gradient(135deg, #1d2a4d 50%, #0d1222 50%); }
.t-auto .sw-page { background: linear-gradient(135deg, #f2f3f6 50%, #1c2230 50%); }
.t-auto .sw-page i { background: #8a93a8; }

::selection { background: var(--selection); }

/* ---------------- Cài đặt hệ thống: màu giao diện (08/11/2026) ---------------- */
.cp-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.cp-preset { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px 0 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); cursor: pointer; font-weight: 500; }
.cp-preset:hover { border-color: var(--line-strong); }
.cp-preset[aria-pressed="true"] { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); background: var(--primary-soft); }
.cp-preset:disabled { cursor: not-allowed; opacity: .6; }
.cp-chips { display: inline-flex; border-radius: 5px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.cp-chips i { width: 9px; height: 22px; display: block; }
.cp-modes button.has-err::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); display: inline-block; }
.cp-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 300px); gap: 18px; margin-top: 14px; align-items: start; }
.cp-fields { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.cp-row { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 3px 10px; align-items: center; }
.cp-label { font-weight: 600; font-size: 13px; }
.cp-inputs { display: flex; gap: 6px; align-items: center; }
.cp-swatch { width: 42px; height: var(--ctl-h); padding: 2px; border: 1px solid var(--input-line); border-radius: 6px; background: var(--surface); cursor: pointer; flex: none; }
.cp-swatch:disabled { cursor: not-allowed; }
.cp-hex.input { width: 104px; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 13px; }
.cp-hex.bad { border-color: var(--danger); }
.cp-hint, .cp-msg { grid-column: 2; }
.cp-msg:empty { display: none; }
.cp-msg.err { color: var(--danger-ink); font-size: 12.5px; display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.cp-suggest { gap: 6px; }
.cp-dot { width: 12px; height: 12px; border-radius: 3px; display: inline-block; box-shadow: 0 0 0 1px rgba(0, 0, 0, .25); }
.cp-status { margin: 12px 0 0; }
/* Khung mẫu: dùng biến màu thật (--paper, --surface, --primary…) đặt riêng trên khung */
.color-preview { display: grid; grid-template-columns: 96px minmax(0, 1fr); border-radius: 10px; overflow: hidden; border: 1px solid var(--line); min-height: 214px; font-size: 12px; color: var(--ink); background: var(--paper); }
.cpv-side { background: var(--spine); color: var(--spine-ink); padding: 10px 0 10px 8px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cpv-side b { color: var(--spine-muted); font-weight: 600; font-size: 10.5px; padding: 0 6px 4px; }
.cpv-side span { padding: 5px 6px; border-radius: 6px 0 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cpv-side span.on { background: var(--paper); color: var(--ink); font-weight: 600; }
.cpv-page { padding: 10px; min-width: 0; }
.cpv-title { font-family: var(--font-title); font-size: 14px; color: var(--ink-strong); margin-bottom: 6px; }
.cpv-card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px; display: flex; flex-direction: column; gap: 5px; }
.cpv-text { font-weight: 600; }
.cpv-muted { color: var(--muted); }
.cpv-muted a { color: var(--primary); }
.cpv-row { display: flex; justify-content: space-between; gap: 6px; padding: 4px 6px; border-radius: 5px; border-top: 1px solid var(--line-2); }
.cpv-row.sel { background: var(--row-selected); border-top-color: transparent; }
.cpv-actions { display: flex; gap: 5px; align-items: center; margin-top: 3px; flex-wrap: wrap; }
.cpv-input { flex: 1 1 80px; border: 1px solid var(--input-line); border-radius: 5px; padding: 3px 6px; color: var(--placeholder); background: var(--surface); min-width: 0; }
.cpv-btn { background: var(--primary); color: var(--on-accent); border-radius: 5px; padding: 3px 10px; font-weight: 600; }
.cpv-btn2 { border: 1px solid var(--line-strong); border-radius: 5px; padding: 3px 8px; color: var(--ink); background: var(--surface); }
@media (max-width: 960px) { .cp-body { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) {
  .cp-row { grid-template-columns: minmax(0, 1fr); }
  .cp-hint, .cp-msg { grid-column: 1; }
}

/* Xóa ứng viên, Thùng rác (11/11/2026) */
.icon-btn.danger:hover { background: var(--danger-soft); color: var(--danger); }
.del-list { margin: 0 0 12px; padding: 10px 14px; list-style: none; background: var(--danger-faint); border: 1px solid var(--danger-line); border-radius: 8px; max-height: 240px; overflow: auto; }
.del-list li { padding: 3px 0; }
.del-list li + li { border-top: 1px dashed var(--danger-line); }
.del-list .code { color: var(--ink-2); margin-right: 4px; }
.trash-search { margin-bottom: 12px; }
.trash-search .input { width: 100%; max-width: 360px; }
.trash-box.loading { opacity: .55; }
.trash-table td { vertical-align: top; }
.trash-note { margin-top: 10px; }
.trash-table td:nth-child(5) { min-width: 150px; }

/* Chương trình đăng ký (13/11/2026) */
.programs-page.loading { opacity: .55; }
.prog-sec { margin-bottom: 16px; }
.prog-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.prog-sec-head h2 { margin: 0; }
.prog-table td { vertical-align: top; }
.prog-sec .table-scroll { max-height: none; min-height: 0; } /* cả trang cuộn, không cuộn trong từng nhóm */
.prog-table tr.zero td strong { color: var(--ink-2); }
/* Điện thoại: mỗi chương trình là một khối (không cuộn ngang bảng) */
@media (max-width: 760px) {
  .prog-table thead { display: none; }
  .prog-table, .prog-table tbody, .prog-table tr, .prog-table td { display: block; }
  table.data.prog-table tr { padding: 10px 0; border-bottom: 1px solid var(--line-2); }
  .prog-table tr:last-child { border-bottom: 0; }
  table.data.prog-table td { padding: 3px 0; border: 0; white-space: normal; }
  .prog-table td[data-label]::before { content: attr(data-label) ": "; color: var(--ink-2); }
  .prog-table td.prog-act { padding-top: 8px; }
  .prog-sec-head { display: block; }
}

/* Chat: thu hồi / gỡ tin nhắn (13/11/2026) */
.msg-act { align-self: center; flex: none; width: 30px; height: 30px; opacity: 0; transition: opacity .12s; color: var(--muted); }
.msg:hover .msg-act, .msg:focus-within .msg-act, .msg-act:focus-visible { opacity: 1; }
.msg-act:hover { color: var(--ink); }
.msg-act svg { width: 16px; height: 16px; }
@media (hover: none) { .msg-act { opacity: .7; } }
.bubble.recalled, .msg.mine .bubble.recalled { background: transparent; border-style: dashed; box-shadow: none; color: var(--muted); }
.bubble.recalled .msg-text { font-style: italic; }
@media (prefers-reduced-motion: reduce) { .msg-act { transition: none; } }
/* Chat: xóa cuộc trò chuyện ở phía mình (13/11/2026) */
.ch-clear { color: var(--muted); flex: none; }
.ch-clear:hover { color: var(--danger); }

/* Biểu tượng ứng dụng vẽ từ logo (15/11/2026): xem trước màn hình điện thoại */
.app-icon-mark { display: block; flex: none; border-radius: 22%; object-fit: cover; }
.pv-phone { display: flex; align-items: flex-start; gap: 18px; padding: 14px; border-radius: 9px; background: linear-gradient(160deg, #3b4a6b, #1f2a40); }
.pv-app { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 64px; color: #fff; font-size: 11px; text-align: center; }
.pv-app span { max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-app .app-icon-mark, .pv-app .seal-mark { box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.pv-app .seal-mark { border-radius: 22%; background: #f2f3f6; }

/* Việc làm trong nước (15/11/2026): quy trình giới thiệu – nhận việc – bảo hành trong đơn tuyển dụng */
.pl-actions { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.pl-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 10px; }
.pl-table td { vertical-align: top; }
.pl-table td .tag + .cell-sub, .pl-table td > div + div { margin-top: 3px; }
.pl-table tr.pl-warn td:first-child { box-shadow: inset 3px 0 0 var(--amber); }
.pl-table .act-in { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.pl-log-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 260px; overflow: auto; }
.pl-log-list li { border-left: 2px solid var(--line); padding-left: 10px; }

/* Cho thuê lại lao động (15/11/2026) */
.ls-intro { max-width: 860px; margin-bottom: 14px; }
.ls-list { margin: 6px 0 4px; padding-left: 20px; display: grid; gap: 3px; }
.ls-table td { vertical-align: top; }
.ls-table td > .cell-sub, .ls-table td > div + div { margin-top: 2px; }
.ls-bad { color: var(--danger); }
.ls-warn { color: var(--amber); }
.ls-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ls-subcard { margin-top: 14px; background: var(--surface-2); }
.ls-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.ls-foot { align-items: center; justify-content: flex-end; margin-top: 10px; }
.ls-foot > .cell-sub { margin-right: auto; }
.ls-note { margin: 10px 2px 0; max-width: 860px; }
.ls-inline { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.ls-inline .field { margin: 0; width: 160px; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
/* Phụ cấp trong hồ sơ người lao động */
.ls-allow { display: grid; gap: 6px; margin-bottom: 6px; }
.ls-allow-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) auto auto auto 32px; gap: 8px; align-items: center; }
.ls-allow-row .check { font-size: 12.5px; white-space: nowrap; }
@media (max-width: 700px) { .ls-allow-row { grid-template-columns: 1fr 1fr; } .ls-allow-row .icon-btn { justify-self: end; } }
/* Chọn ứng viên */
.ls-pick { display: grid; gap: 2px; max-height: 240px; overflow: auto; margin-top: 6px; border: 1px solid var(--line-2); border-radius: 8px; padding: 4px; }
.ls-pick:empty { display: none; }
.ls-pick-item { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; text-align: left; background: none; border: 0; padding: 6px 8px; border-radius: 6px; color: var(--ink); cursor: pointer; font: inherit; }
.ls-pick-item:hover, .ls-pick-item:focus-visible { background: var(--surface-2); }
.ls-pick-item .tag { margin-left: auto; }
.ls-picked { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.ls-picked .btn { margin-left: auto; }
/* Bảng chấm công: ô nhập gọn */
.ls-ts td { padding-top: 5px; padding-bottom: 5px; vertical-align: middle; }
.ls-ts td:first-child { min-width: 170px; }
.ls-ts th { white-space: normal; vertical-align: bottom; line-height: 1.25; font-size: 12px; }
.ls-ts th.num { text-align: right; }
.ls-ts .input { height: 30px; padding: 3px 7px; width: 68px; }
.ls-ts .input.num { text-align: right; }
.ls-ts .input.ls-money { width: 108px; }
.ls-ts td:last-child .input { width: 100%; min-width: 150px; }
.ls-ts tr.ls-empty-row td:first-child { box-shadow: inset 3px 0 0 var(--amber); }
@media (max-width: 900px) { .ls-ts .input { height: 34px; } }
/* Bảng lương */
.ls-pay tr.ls-neg td:last-child { color: var(--danger); }
.ls-slip td:last-child { white-space: nowrap; }
.ls-slip tr:has(strong) td { background: var(--surface-2); }
/* Cài đặt */
.ls-settings { max-width: 980px; }
.ls-ins { max-width: 640px; }
.ls-ins td { vertical-align: middle; }
.ls-ins .input { max-width: 110px; }
.ls-brackets { display: grid; gap: 6px; }
.ls-bracket { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ls-bracket .input { width: 150px; }
.ls-bracket .input[aria-label] { width: 70px; }

/* Khoán việc (16/11/2026) */
.pc-items { display: grid; gap: 6px; margin-bottom: 6px; }
.pc-item-row { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, .9fr) minmax(0, .9fr) minmax(0, 1.1fr) minmax(0, 1.1fr) 32px; gap: 8px; align-items: center; }
.pc-item-head { font-size: 12px; color: var(--muted); }
tr.pc-off td { color: var(--muted); }
.pc-sum { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin-bottom: 12px; }
.pc-sum:empty { display: none; }
.pc-sum .stat .value { font-size: 20px; }
.pc-logs tr.pc-day td { border-top: 2px solid var(--line); }
.pc-logs tbody tr:first-child td { border-top: 0; }
.pc-form { display: grid; gap: 12px; }
.pc-form > .field, .pc-form .grid > .field { margin: 0; }
.pc-modes { display: grid; gap: 6px; }
.pc-modes .check { align-items: flex-start; }
.pc-qty { display: flex; align-items: center; gap: 8px; }
.pc-qty .input { max-width: 180px; }
.pc-unit { color: var(--muted); font-size: 13px; white-space: nowrap; }
.pc-people-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.pc-people-bar > .cell-sub { margin-right: auto; }
.pc-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 14px; max-height: 340px; overflow: auto; border: 1px solid var(--line-2); border-radius: 8px; padding: 8px; }
.pc-person { display: flex; align-items: center; gap: 8px; min-height: 34px; }
.pc-person > .check, .pc-person > span:first-child { flex: 1; min-width: 0; }
.pc-person .input { height: 30px; padding: 3px 7px; }
.pc-wt { width: 58px; }
.pc-q { width: 96px; }
.pc-acc .input.pc-q { width: 100px; }
.pc-acc td .input:not(.pc-q) { min-width: 150px; height: 30px; padding: 3px 7px; }
.pc-adj { display: grid; gap: 6px; margin-bottom: 6px; }
.pc-adj-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) 32px; gap: 8px; align-items: center; }
.pc-pending { margin: 0 0 12px; }
.pc-pending li .btn { margin-left: 6px; }
@media (max-width: 720px) {
  .pc-item-row { grid-template-columns: 1fr 1fr; }
  .pc-item-row > :first-child { grid-column: 1 / -1; }
  .pc-item-head { display: none; }
  .pc-adj-row { grid-template-columns: 1fr 1fr 32px; }
}
/* Hoa hồng cộng tác viên (15/11/2026) */
.cm-table td { vertical-align: top; }
.cm-table td > .cell-sub { margin-top: 2px; }
.cm-table td:first-child input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--primary); }
.cm-payouts { margin-top: 14px; }
/* Cổng doanh nghiệp — mục trong ngăn đối tác (15/11/2026) */
.pt-portal .table-scroll { margin-top: 6px; min-height: 0; max-height: none; }
.cm-payouts .table-scroll { min-height: 0; }
.pt-confirms { margin: 4px 0 0; padding-left: 18px; display: grid; gap: 4px; }

/* Trợ lý hướng dẫn (16/11/2026): nút tròn màu gáy hồ sơ ở góc dưới (kéo thả), khung hỏi đáp có đầu màu gáy như một tab hồ sơ.
   z-index 70 < lớp phủ ngăn kéo / hộp thoại (80): khi mở biểu mẫu, nút nằm dưới lớp phủ, không che nút Lưu. */
.asst-fab { position: fixed; z-index: 70; width: 48px; height: 48px; padding: 0; border-radius: 50%; border: 2px solid var(--surface); background: var(--spine); color: #fff;
  display: grid; place-items: center; box-shadow: 0 6px 18px rgba(20, 30, 60, .28); cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none; }
.asst-fab svg { width: 24px; height: 24px; }
.asst-fab:hover { background: var(--spine-2); }
.asst-fab:focus-visible { outline: 3px solid var(--primary-line); outline-offset: 2px; }
.asst.dragging .asst-fab { cursor: grabbing; box-shadow: 0 12px 30px rgba(20, 30, 60, .36); }
.asst.open .asst-fab { background: var(--primary); }
.asst-panel { position: fixed; z-index: 70; width: min(380px, calc(100vw - 32px)); max-height: 600px; display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 48px var(--shadow-deep); overflow: hidden; }
.asst-head { display: flex; align-items: center; gap: 2px; padding: 10px 8px 10px 14px; background: var(--spine); color: var(--spine-ink); }
.asst-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.asst-title strong { font-family: "Lora", Georgia, serif; font-size: 15.5px; font-weight: 600; color: #fff; }
.asst-sub { font-size: 12px; color: var(--spine-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asst-icon { width: 30px; height: 30px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--spine-ink); display: grid; place-items: center; cursor: pointer; flex: none; }
.asst-icon:hover, .asst-icon:focus-visible { background: var(--spine-2); }
.asst-icon svg { width: 17px; height: 17px; }
.asst-list { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 180px; background: var(--paper-2); overscroll-behavior: contain; }
.asst-msg { max-width: 92%; padding: 9px 11px; border-radius: 10px; font-size: 13.5px; line-height: 1.5; overflow-wrap: anywhere; }
.asst-msg.me { align-self: flex-end; background: var(--primary); color: var(--on-accent); border-bottom-right-radius: 3px; white-space: pre-wrap; }
.asst-msg.bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--line-2); border-bottom-left-radius: 3px; color: var(--ink); }
.asst-msg.err { border-color: var(--danger-line); background: var(--danger-faint); color: var(--danger-ink); }
.asst-msg.wait { color: var(--muted); display: flex; align-items: center; gap: 8px; }
.asst-msg > p, .asst-md p { margin: 0 0 6px; }
.asst-msg > p:last-child, .asst-md p:last-child { margin-bottom: 0; }
.asst-md ul, .asst-md ol { margin: 0 0 6px; padding-left: 20px; }
.asst-md li { margin: 2px 0; }
.asst-md li > ul, .asst-md li > ol { margin: 2px 0 0; }
.asst-md code { font-size: 12px; background: var(--grey-soft); padding: 0 4px; border-radius: 4px; }
.asst-md .asst-h { font-weight: 600; }
.asst-md a, .asst-go { color: var(--primary); font-weight: 500; }
.asst-sugs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.asst-sug { border: 1px solid var(--primary-line); background: var(--primary-soft); color: var(--primary); border-radius: 14px; padding: 4px 10px; font: inherit; font-size: 12.5px; line-height: 1.35; cursor: pointer; text-align: left; }
.asst-sug:hover { border-color: var(--primary); }
.asst-src { margin-top: 8px; padding-top: 6px; border-top: 1px dashed var(--line); display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; font-size: 12px; }
.asst-src-label { color: var(--muted); }
.asst-chip { border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); border-radius: 6px; padding: 2px 7px; font: inherit; font-size: 12px; cursor: pointer; text-align: left; }
.asst-chip[aria-expanded="true"] { border-color: var(--primary-line); color: var(--primary); }
.asst-src-body { flex-basis: 100%; font-size: 12.5px; background: var(--surface-2); border-radius: 6px; padding: 8px; color: var(--ink-2); max-height: 260px; overflow: auto; }
.asst-note { color: var(--muted); font-size: 12.5px; }
.asst-cut { margin: 8px 0 0; padding: 6px 8px; border-radius: 6px; background: var(--amber-soft); color: var(--ink-2); }
/* Hỏi số liệu (17/11/2026): dữ liệu trợ lý đã đọc để trả lời */
.asst-used { margin: 8px 0 0; padding-top: 6px; border-top: 1px dashed var(--line); font-size: 12px; color: var(--ink-2); }
.asst-used-fail { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line); }
.asst-res { border-left: 3px solid var(--primary-line); padding-left: 8px; margin: 8px 0 2px; font-size: 12.5px; }
.asst-res.clip { max-height: 170px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 65%, transparent); mask-image: linear-gradient(#000 65%, transparent); }
.asst-res-title { font-weight: 600; color: var(--ink-strong); margin-bottom: 3px; }
.asst-more { border: 0; background: none; color: var(--primary); font: inherit; font-size: 12px; padding: 2px 0; cursor: pointer; }
.asst-go { display: inline-block; font-size: 12px; margin: 4px 10px 0 0; }
.asst-res-acts { display: flex; align-items: baseline; gap: 12px; }
.asst-res-acts .asst-go { margin: 0; }
.asst-compose { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--line-2); background: var(--surface); align-items: flex-end; }
.asst-input { flex: 1; resize: none; border: 1px solid var(--input-line); border-radius: 8px; padding: 7px 10px; font: inherit; font-size: 13.5px; line-height: 1.4; background: var(--surface); color: var(--ink); min-height: 36px; max-height: 120px; }
.asst-input:focus { outline: 2px solid var(--primary-line); outline-offset: 0; border-color: var(--primary); }
.asst-send { width: 36px; height: 36px; padding: 0; border: 0; border-radius: 8px; background: var(--primary); color: var(--on-accent); display: grid; place-items: center; cursor: pointer; flex: none; }
.asst-send:hover { background: var(--primary-hover); }
.asst-send svg { width: 18px; height: 18px; }
.asst-foot { font-size: 11px; line-height: 1.4; color: var(--muted); padding: 0 10px 8px; background: var(--surface); }
.asst-dots { display: inline-flex; gap: 3px; }
.asst-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); animation: asst-dot 1s infinite ease-in-out; }
.asst-dots i:nth-child(2) { animation-delay: .15s; }
.asst-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes asst-dot { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .asst-dots i { animation: none; opacity: .7; } }
@media (max-width: 640px) {
  .asst-fab { width: 44px; height: 44px; }
  .asst-panel { left: 8px; right: 8px; bottom: 8px; width: auto; max-height: none; height: min(80vh, 640px); }
  .asst-input { font-size: 16px; }
  .asst.open .asst-fab { display: none; } /* khung gần kín màn hình: đóng bằng nút X ở đầu khung */
}
@media print { .asst { display: none !important; } }

/* ---- Tổ chức, phân quyền; danh mục dùng chung (19/11/2026) ---- */
.drawer.wide { width: min(920px, 100%); }
.org-toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.org-branch { margin-bottom: 12px; }
.org-unit { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 6px 0; }
.org-unit.off { opacity: .6; }
.org-unit-main .tag { margin-left: 6px; }
.org-depts { border-left: 2px solid var(--line); margin: 6px 0 0 6px; padding-left: 14px; }
.org-depts .org-unit + .org-unit { border-top: 1px dashed var(--line); }
.org-empty { margin: 4px 0 0 22px; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 14px; align-items: start; }
.cat-sec { margin-bottom: 14px; }
.cat-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.cat-head h2 { margin: 0; }
.cat-head .btn { margin-left: auto; }
.cat-help { margin: 0 0 8px; }
.cat-sec .table-scroll { max-height: none; min-height: 0; }
.cap-title { margin: 18px 0 6px; font-size: 15px; }
.cap-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.cap-group { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px 10px; margin: 0; min-width: 0; }
.cap-group legend { font-weight: 600; font-size: 13px; padding: 0 4px; }
.cap-item { display: flex; align-items: flex-start; gap: 7px; padding: 4px 0; font-size: 13px; line-height: 1.35; cursor: pointer; }
.cap-item input { margin-top: 2px; flex: none; }
.cap-item.disabled { color: var(--faint); cursor: not-allowed; }
.cap-item .cap-add { margin-left: auto; flex: none; font-size: 11px; }
@media (max-width: 600px) { .cat-grid { grid-template-columns: 1fr; } .cap-picker { grid-template-columns: 1fr; } }

.flow-doc { margin-bottom: 12px; }
.flow-levels { display: grid; gap: 10px; }
.flow-level { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.flow-level-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }

/* Email gửi đi, kênh gửi thông báo (19/11/2026) */
.mail-state { margin: 0 0 12px; }
.mail-test { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.mail-test .field { flex: 1 1 260px; margin: 0; }
.mail-h3 { font-size: 14px; margin: 18px 0 8px; }
.mail-counts { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.mail-counts strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.mail-counts .mail-bad strong { color: var(--danger); }
.mail-err { color: var(--danger); max-width: 360px; overflow-wrap: anywhere; }
.ch-table th.ch-col, .ch-table td.ch-col { text-align: center; width: 120px; }
.ch-table td:first-child { min-width: 240px; }

/* Phiên đăng nhập, lịch sử đăng nhập, quên mật khẩu qua email (19/11/2026) */
.sess-sec { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.sess-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.sess-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.sess-hist { margin-top: 12px; }
.sess-hist summary { cursor: pointer; font-weight: 600; font-size: 13.5px; padding: 4px 0; }
.sess-h3 { font-size: 14px; margin: 18px 0 8px; }
.sess-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.sess-filter .input[type=search] { flex: 1 1 240px; }
.sess-filter select { flex: 0 0 auto; width: auto; }
.lp-form { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.lp-form h3 { font-size: 14px; margin: 10px 0 6px; }
.forgot-alt { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 10px; }

/* Mã tự động khác (19/11/2026) */
.cr-rows { display: grid; gap: 12px; }
.cr-row { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.cr-row .grid { margin: 8px 0 4px; }
.cr-title { margin: 0; }

/* Tìm kiếm toàn hệ thống (19/11/2026) */
.nav-search {
  display: flex; align-items: center; gap: 9px; margin: 0 12px 8px; padding: 7px 10px;
  background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.10); border-radius: 8px;
  color: var(--spine-muted); font: inherit; font-size: 13px; cursor: pointer; text-align: left;
}
.nav-search:hover, .nav-search:focus-visible { background: rgba(255, 255, 255, 0.11); color: #fff; }
.nav-search svg { width: 16px; height: 16px; flex: none; }
.nav-search span { flex: 1; }
.nav-search kbd { font: inherit; font-size: 11px; padding: 1px 6px; border-radius: 5px; border: 1px solid rgba(255, 255, 255, 0.18); color: var(--spine-muted); }
.topbar .top-search { margin-left: auto; }
.search-input { width: 100%; font-size: 15px; padding: 10px 12px; }
.search-hint { margin: 8px 2px 0; }
.search-results { margin-top: 8px; max-height: min(60vh, 520px); overflow-y: auto; }
.search-group { font-size: 12px; color: var(--muted); font-weight: 600; padding: 10px 6px 4px; }
.search-item { display: flex; align-items: flex-start; gap: 10px; padding: 8px 8px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.search-item svg { width: 17px; height: 17px; flex: none; margin-top: 2px; color: var(--muted); }
.search-item > span { display: flex; flex-direction: column; min-width: 0; }
.search-item strong { font-weight: 600; overflow-wrap: anywhere; }
.search-item:hover, .search-item[aria-selected="true"] { background: var(--primary-soft); }
.search-item[aria-selected="true"] svg { color: var(--primary); }
@media (max-width: 900px) { .nav-search { display: none; } }

/* Ghi chú, tệp đính kèm, nhắc tên (@) trên bản ghi (19/11/2026) */
.notes-box { margin-top: 14px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; background: var(--surface); }
.notes-box > summary { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 10px 0; font-weight: 600; list-style: none; }
.notes-box > summary::-webkit-details-marker { display: none; }
.notes-box > summary svg { width: 17px; height: 17px; color: var(--primary); }
.notes-box[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.notes-body { padding-bottom: 12px; }
.note-compose { margin-bottom: 12px; }
.note-compose-wrap { position: relative; }
.note-input { width: 100%; resize: vertical; min-height: 64px; }
.note-compose-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.note-files-chosen { display: flex; gap: 4px; flex-wrap: wrap; min-width: 0; }
.mention-pop { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; margin-top: 2px; max-height: 220px; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(15, 20, 38, 0.14); padding: 4px; }
.mention-opt { display: block; width: 100%; text-align: left; background: transparent; border: 0; padding: 6px 8px; border-radius: 6px; cursor: pointer; font: inherit; color: var(--ink); }
.mention-opt[aria-selected="true"], .mention-opt:hover { background: var(--primary-soft); }
.note-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
/* Chỉ áp cho mục ghi chú trong danh sách — lớp "note" còn dùng cho dòng phụ trong ô số liệu (.stat .note, .fin-tile .note) */
.note-list > .note { padding: 8px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line-2); }
.note-list > .note.deleted { background: transparent; border: 1px dashed var(--line); }
.note-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.note-acts { margin-left: auto; display: flex; gap: 10px; }
.note-body { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 4px; line-height: 1.5; }
.mention { color: var(--primary); font-weight: 600; }
.note-files { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.note-file { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); text-decoration: none; font-size: 12.5px; max-width: 100%; }
.note-file img { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; }
.note-file svg { width: 15px; height: 15px; flex: none; }
.note-file span:first-of-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.note-edit { margin-top: 6px; display: grid; gap: 6px; }
.link-btn.danger { color: var(--danger); }

/* Bộ lọc đã lưu (19/11/2026) */
.filters .end:has(.saved-filters) { grid-column: 1 / -1; justify-content: flex-end; flex-wrap: wrap; }
.saved-filters { display: flex; gap: 4px; align-items: center; }
.saved-filter-sel { width: auto; max-width: 220px; }

/* Hôm nay của bạn — đầu trang Dashboard (19/11/2026) */
.home-today { margin-bottom: 14px; }
.home-today h2 { font-family: var(--font-title); font-size: 16px; font-weight: 600; margin: 0 0 8px; }
.home-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
@media (max-width: 600px) {
  .home-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-card { padding: 8px 10px 8px 12px; }
  .home-val { font-size: 19px; }
  .home-hint { display: none; }
}
.home-card {
  display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 10px 14px; border-radius: 10px; background: var(--surface);
  border: 1px solid var(--line); border-left: 4px solid var(--ok); color: var(--ink); text-decoration: none; min-width: 0;
}
.home-card.warn { border-left-color: var(--amber); }
.home-card.bad { border-left-color: var(--danger); }
.home-card:hover, .home-card:focus-visible { border-color: var(--primary); border-left-color: var(--primary); }
.home-val { font-family: var(--font-title); font-size: 22px; font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; }
.home-card.bad .home-val { color: var(--danger); }
.home-lbl { font-weight: 600; font-size: 13px; }
.home-hint { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }

/* ---------------- Khách tiềm năng (19/11/2026, phần 5) ---------------- */
.tag.violet { background: var(--violet-soft-2); color: var(--violet); }
.filters .ld-stage-field { grid-column: 1 / -1; }
.filters .ld-unc { align-self: end; justify-self: start; }
.ld-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.ld-row { display: flex; gap: 12px; align-items: center; padding: 10px 14px; cursor: pointer; border: 1px solid var(--line); border-left: 3px solid var(--line-2); text-align: left; }
.ld-row:hover, .ld-row:focus-visible { border-color: var(--primary); }
.ld-row.st-new { border-left-color: var(--blue); }
.ld-row.st-contacted, .ld-row.st-appointment { border-left-color: var(--amber); }
.ld-row.st-consulting { border-left-color: var(--violet); }
.ld-row.st-won { border-left-color: var(--ok); }
.ld-row.st-lost { border-left-color: var(--danger); opacity: .85; }
.ld-row.unc { background: var(--danger-faint, var(--surface)); }
.ld-sel input { width: 18px; height: 18px; accent-color: var(--primary); }
.ld-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ld-name { font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ld-name .code { font-weight: 500; font-size: 12px; color: var(--muted); }
.ld-sub { color: var(--ink-2); overflow-wrap: anywhere; }
.ld-side { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex: none; text-align: right; }
.ld-late { color: var(--danger); font-weight: 600; }
.ld-call { flex: none; }
.ld-bulk { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; padding: 8px 12px; background: var(--primary-soft); border: 1px solid var(--primary-line); border-radius: var(--radius-sm); position: sticky; top: 0; z-index: 2; }
.ld-tools { flex-wrap: wrap; margin-bottom: 10px; }
.ld-box { padding: 12px 14px; margin: 12px 0; display: flex; flex-direction: column; gap: 10px; }
.ld-box .section-title { margin: 0; }
.ld-next[hidden] { display: none; }
.ld-consent { align-items: flex-start; }
.ld-consent-method { margin: 6px 0 0 26px; max-width: 360px; }
.ld-qr-box { flex-direction: row; align-items: center; gap: 16px; flex-wrap: wrap; }
.ld-qr { width: 150px; flex: none; border: 1px solid var(--line-2); border-radius: 6px; overflow: hidden; background: #fff; }
.ld-qr svg { display: block; width: 100%; height: auto; }
.ld-url { display: inline-block; font-size: 12.5px; overflow-wrap: anywhere; word-break: break-all; user-select: all; margin-bottom: 6px; }
.ld-att { display: flex; flex-direction: column; gap: 4px; }
.ld-att-row { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; background: var(--surface); }
.ld-att-row.in { border-color: var(--ok); background: var(--ok-soft); }
.ld-att-row input { width: 20px; height: 20px; accent-color: var(--ok); flex: none; }
.ld-map { display: flex; flex-direction: column; gap: 6px; }
.ld-map-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) auto; gap: 6px; align-items: center; }
.ld-map-row.fb-page { grid-template-columns: minmax(140px, 1fr) minmax(200px, 2fr) minmax(120px, 1.2fr) auto auto; }
.ld-rp { padding: 12px 14px; margin-top: 12px; }
.ld-rp-grid { align-items: start; }
.ld-reasons { list-style: none; margin: 0; padding: 0; }
.ld-reasons li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px dashed var(--line-2); }
.ld-hist { margin: 12px 0; padding: 10px 14px; }
.ld-hist summary { cursor: pointer; }
.ld-acts li.k-system .body, .ld-acts li.k-assign .body, .ld-acts li.k-stage .body { color: var(--ink-2); }
.ev-nums { font-variant-numeric: tabular-nums; }
.fb-actions { flex-wrap: wrap; align-items: center; }
.fb-days { display: inline-flex; gap: 6px; align-items: center; }
.fb-days input { width: 72px; }
@media (max-width: 700px) {
  .ld-row { flex-wrap: wrap; align-items: flex-start; }
  .ld-main { flex-basis: calc(100% - 80px); }
  .ld-side { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; width: 100%; text-align: left; gap: 6px 10px; }
  .ld-call { position: absolute; right: 10px; top: 10px; }
  .ld-row { position: relative; padding-right: 54px; }
  .ld-map-row, .ld-map-row.fb-page { grid-template-columns: 1fr auto; }
  .ld-tools .btn { flex: 1 1 auto; }
}

/* ---------------------------------------------------------------- Kho giấy tờ hồ sơ (20/11/2026, phần 6) */
.doc-row .name:has(.dv-name) { flex-direction: column; align-items: stretch; gap: 3px; }
.dv-name { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.dv-det { margin-left: auto; width: 26px; height: 26px; }
.dv-det svg { width: 15px; height: 15px; }
.dv-req { font-size: 11px; }
.dv-sum { font-size: 12px; font-weight: 400; color: var(--muted); line-height: 1.35; overflow-wrap: anywhere; }
.dv-exp { color: var(--ink-2, var(--ink)); }
.dv-exp.warn { color: var(--amber-ink); font-weight: 600; }
.dv-exp.bad { color: var(--danger-ink); font-weight: 600; }
.doc-row.dv-row-expired { border-color: var(--danger-line); background: var(--danger-faint); }
.dv-add { margin-top: 8px; max-width: 320px; }
.dv-comp { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; background: var(--surface); }
.dv-comp.empty { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 13px; background: var(--surface-2, var(--paper)); }
.dv-comp.empty svg { width: 16px; height: 16px; }
.dv-comp-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.dv-pct { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink-strong); }
.dv-bar { height: 8px; border-radius: 4px; background: var(--grey-soft); margin: 6px 0 8px; overflow: hidden; }
.dv-bar span { display: block; height: 100%; background: var(--amber); border-radius: 4px; transition: width .3s; }
.dv-comp.ok .dv-bar span { background: var(--ok); }
.dv-comp.low .dv-bar span { background: var(--seal); }
.dv-missing { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.dv-pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 10px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dv-pill.ok { background: var(--ok-soft); color: var(--ok-ink); }
.dv-pill.mid { background: var(--amber-soft); color: var(--amber-ink); }
.dv-pill.low { background: var(--danger-soft); color: var(--danger-ink); }
.dv-ho { margin-top: 14px; }
.dv-ho-bar { margin-bottom: 8px; }
.dv-ho-list { display: flex; flex-direction: column; gap: 6px; }
.dv-ho-row { display: flex; gap: 10px; justify-content: space-between; align-items: flex-start; border: 1px solid var(--line-2, var(--line)); border-radius: 8px; padding: 8px 10px; }
.dv-ho-row.cancelled { opacity: .7; background: var(--grey-soft); }
.dv-ho-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dv-ho-act { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.dv-items { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.dv-item { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) 70px minmax(0, 1fr) 32px; gap: 6px; align-items: start; }
.dv-item-k { display: flex; flex-direction: column; gap: 4px; }
.dv-sign { margin-top: 12px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.dv-sign summary { cursor: pointer; font-weight: 600; font-size: 13.5px; }
.sig-wrap { margin-top: 8px; }
.sig-pad { display: block; width: 100%; max-width: 560px; aspect-ratio: 3 / 1; height: auto; border: 1px dashed var(--line-dash); border-radius: 6px; background: #fff; touch-action: none; cursor: crosshair; }
.sig-tools { display: flex; justify-content: space-between; align-items: center; gap: 8px; max-width: 560px; margin-top: 4px; }
.dv-new-link { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.dv-new-link > div:first-child { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.dv-link-row { display: flex; gap: 6px; }
.dv-link-row .input { flex: 1; min-width: 0; font-family: var(--mono, monospace); font-size: 12.5px; }
.dv-qr { width: 132px; height: 132px; flex: none; background: #fff; padding: 4px; border-radius: 6px; }
.dv-qr svg { width: 100%; height: 100%; display: block; }
.chip-checks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.dv-link { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; border-bottom: 1px solid var(--line-2, var(--line)); padding: 8px 0; }
.dv-order { margin-top: 14px; }
.dv-cl-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.dv-cl-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1.5fr) 32px; gap: 6px; align-items: center; }
.dv-cl-bar { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.scan-card.pending { border-color: var(--ai-line); background: var(--ai-soft); }
.scan-card.rejected { opacity: .8; }
.scan-card.rejected .scan-thumb { display: grid; place-items: center; color: var(--muted); }
@media (max-width: 720px) {
  .dv-item { grid-template-columns: 1fr 1fr; }
  .dv-item-k { grid-column: 1 / -1; }
  .dv-item > :last-child { justify-self: end; }
  .dv-cl-row { grid-template-columns: 1fr 1fr 32px; }
  .dv-cl-row .input:not(select) { grid-column: 1 / -1; grid-row: 2; }
  .dv-ho-row { flex-direction: column; }
  .dv-ho-act { justify-content: flex-start; }
}

/* Hồ sơ đầy đủ chia theo tab (20/11/2026, phần 6.1) */
.name-latin { letter-spacing: .04em; font-size: 12.5px; }
.pt-head { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 14px; align-items: start; margin-bottom: 14px; }
.pt-head .photo-frame { width: 88px; height: 117px; border-style: solid; }
.pt-id h3 { margin: 0; font-family: var(--font-title); font-size: 19px; font-weight: 600; }
.pt-id .code { font-size: 13px; }
.pt-tools { margin-top: 8px; flex-wrap: wrap; }
.tabs.pt-tabs { display: flex; flex-wrap: nowrap; width: 100%; background: transparent; padding: 0; border-radius: 0; gap: 0; border-bottom: 1px solid var(--line); margin-bottom: 14px; position: sticky; top: -1px; z-index: 2; background: var(--surface); }
.tabs.pt-tabs button { border-radius: 0; padding: 8px 11px 9px; margin-bottom: -1px; border-bottom: 2px solid transparent; }
.tabs.pt-tabs button[aria-selected="true"] { background: transparent; box-shadow: none; color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.pt-pane { min-height: 220px; }
.pt-pane > .kv { margin-top: 0; }
.pt-block { margin-top: 14px; }
.pt-block h4 { font-size: 12.5px; color: var(--muted); margin: 0 0 5px; font-weight: 600; }
.pt-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.pt-tag { margin-left: 6px; }
.pt-link { border: 0; background: none; padding: 0; color: var(--primary); font: inherit; font-weight: 500; cursor: pointer; text-align: left; }
.pt-link:hover { text-decoration: underline; }
.pt-docs td { vertical-align: top; }
.pt-pane .tr-box, .pt-pane .scan-box { margin-top: 14px; }
.pt-timeline .meta { display: flex; align-items: center; gap: 6px; }
.pt-timeline .meta svg { width: 13px; height: 13px; flex: none; }
.pt-timeline li.tl-money::before { border-color: var(--ok); }
.pt-timeline li.tl-zalo::before { border-color: var(--blue); }
.pt-timeline li.tl-lead::before { border-color: var(--amber-ink); }
@media (max-width: 700px) {
  .pt-head { grid-template-columns: 64px minmax(0, 1fr); gap: 10px; }
  .pt-head .photo-frame { width: 64px; height: 85px; }
}

/* Mẫu xuất hồ sơ, bộ giấy tờ tệp nén (20/11/2026, phần 6.5) */
.ds-tpl td { vertical-align: top; }
.tpl-fields { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; margin: 4px 0 10px; }
.tpl-chip { font: 12.5px/1.5 var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace); background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; padding: 0 6px; color: var(--ink); }
button.tpl-chip { cursor: pointer; }
button.tpl-chip:hover { border-color: var(--primary); color: var(--primary); }
.tpl-h { font-size: 13px; margin: 16px 0 6px; color: var(--ink-strong); }
.tpl-h4 { font-size: 12.5px; margin: 12px 0 4px; color: var(--muted); font-weight: 600; }
.tpl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.tpl-list li { display: grid; grid-template-columns: minmax(0, 210px) minmax(0, 1fr); gap: 8px; align-items: baseline; font-size: 13px; }
.tpl-list li .tpl-chip { justify-self: start; }
.dx-sec { margin-bottom: 18px; }
.dx-sec h3 { font-size: 15px; margin: 0 0 8px; }
.dx-tpls { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 8px; }
.dx-tpls li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 12px; }
.dx-tpls li + li { border-top: 1px solid var(--line-2); }
.dx-prev { margin: -4px 0 10px; overflow-wrap: anywhere; }
.dx-go { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
@media (max-width: 700px) {
  .tpl-list li { grid-template-columns: 1fr; gap: 2px; }
}

/* ---- Phần 7 (20/11/2026): đối tác — hợp đồng, điều khoản tiền, lịch sử hợp tác, đánh giá; đơn hàng — tiến trình, tiến độ, gợi ý ứng viên */
.px-box { margin-top: 16px; }
.px-box .section-title .btn { margin-left: auto; }
.px-sub { font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin: 8px 0 4px; }
.px-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.px-item { display: flex; gap: 10px; justify-content: space-between; align-items: flex-start; border: 1px solid var(--line-2); border-radius: 6px; padding: 8px 10px; }
.px-item.off { opacity: .7; }
.px-main { min-width: 0; }
.px-side { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; flex: none; }
.px-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.px-kpis .px-kpi.warn strong { color: var(--danger); }
@media (max-width: 900px) { .px-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .px-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .px-item { flex-direction: column; } .px-side { justify-content: flex-start; } }
.px-years td, .px-years th { white-space: nowrap; }
.px-rating { color: var(--amber); letter-spacing: .04em; }
.px-stars { display: flex; gap: 2px; }
.px-star { border: 0; background: none; font-size: 24px; line-height: 1; color: var(--line); cursor: pointer; padding: 2px 3px; border-radius: 4px; }
.px-star.on { color: var(--amber); }
.px-star:focus-visible { outline: 2px solid var(--primary); }
.jb-progress { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 10px 0 4px; }
.jb-progress > div { border: 1px solid var(--line-2); border-radius: 6px; padding: 6px 10px; font-size: 12.5px; color: var(--ink-2); }
.jb-progress strong { display: block; font-size: 18px; font-weight: 600; color: var(--ink-strong); }
.jb-progress .meter { margin-top: 4px; flex: none; width: 100%; height: 6px; }
@media (max-width: 560px) { .jb-progress { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.phase-steps { display: flex; flex-wrap: wrap; gap: 4px; margin: 2px 0; padding: 0; list-style: none; }
.phase-steps li { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--grey-soft); color: var(--ink-2); }
.phase-steps li.done { background: var(--primary-soft); color: var(--primary); }
.phase-steps li.now { background: var(--primary); color: var(--on-accent); font-weight: 600; }
.phase-steps li.cancel { background: var(--danger-soft); color: var(--danger); font-weight: 600; }
select.input.reg-result { width: 112px; min-width: 112px; height: 30px; padding: 0 26px 0 8px; font-size: 13px; }
.reg-state .reg-res { margin-top: 6px; }
.p7-grid { display: grid; gap: 8px; }
.p7-grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.p7-grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.p7-grid .field { margin: 0; }
.reg-result.pass { border-color: var(--ok); color: var(--ok); font-weight: 600; }
.reg-result.fail { border-color: var(--danger); color: var(--danger); font-weight: 600; }
.reg-result.reserve { border-color: var(--amber); color: var(--amber); font-weight: 600; }
.sg-row .sg-ok { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.sg-crit { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 10px; }
.terms-list { margin: 0; padding-left: 18px; display: grid; gap: 2px; }
.pj-code { display: block; flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; font-size: 12.5px; background: var(--grey-soft); border-radius: 5px; padding: 6px 8px; }
.pj-preview { margin-bottom: 8px; }
/* Danh sách đăng ký: nhiều nút ở tiêu đề xuống dòng trên điện thoại / ngăn hẹp (20/11/2026) */
.reg-box > .section-title { flex-wrap: wrap; }
.reg-box > .section-title .row-actions { flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 560px) { .reg-box > .section-title .row-actions { justify-content: flex-start; } }
.reg-box > .section-title > span:first-child { flex: 1 1 auto; min-width: 13em; }
/* ---------------------------------------------------------------- Quy trình xử lý hồ sơ (20/11/2026, phần 8): Kanban, ngăn hồ sơ, lịch, đoàn, cài đặt */
.pk-filters .end { align-self: end; }
.pk-mode button { display: inline-flex; align-items: center; gap: 6px; }
.pk-mode svg { width: 15px; height: 15px; }
.pk-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 10px; }
.pk-board { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 12px; align-items: flex-start; scroll-snap-type: x proximity; }
.pk-col { flex: 0 0 272px; max-width: 272px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 8px; display: flex; flex-direction: column; max-height: calc(100vh - 250px); min-height: 160px; scroll-snap-align: start; }
.pk-col.drop { border-color: var(--primary); box-shadow: inset 0 0 0 2px var(--primary-line); background: var(--primary-soft); }
.pk-col-head { padding: 9px 10px 8px; border-bottom: 1px solid var(--line-2); position: sticky; top: 0; }
.pk-col-title { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; line-height: 1.3; }
.pk-col-title strong { font-weight: 600; color: var(--ink-strong); }
.pk-no { flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--strong-fill); color: var(--on-strong); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pk-col-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 6px; font-size: 12px; }
.pk-count { font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; padding: 0 7px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.pk-cards { padding: 8px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; flex: 1; }
.pk-empty { font-size: 12.5px; color: var(--faint); text-align: center; padding: 18px 4px; border: 1px dashed var(--line); border-radius: 6px; }
.pk-more { text-align: center; padding: 4px; }
.pk-card { display: block; width: 100%; text-align: left; font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--line-strong); border-radius: 6px; padding: 8px 10px; cursor: pointer; box-shadow: 0 1px 1px var(--shadow-soft); }
.pk-card:hover { border-color: var(--primary-line); border-left-color: var(--primary); }
.pk-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.pk-card[draggable="true"] { cursor: grab; }
.pk-card.dragging { opacity: .45; }
.pk-card.due-ok { border-left-color: var(--ok); }
.pk-card.due-warn { border-left-color: var(--amber); background: linear-gradient(var(--amber-soft), var(--amber-soft)) top / 100% 3px no-repeat, var(--surface); }
.pk-card.due-over { border-left-color: var(--danger); background: linear-gradient(var(--danger-soft), var(--danger-soft)) top / 100% 3px no-repeat, var(--surface); }
.pk-card.st-paused { border-left-color: var(--amber); border-style: dashed; border-left-style: solid; }
.pk-card.st-stopped, .pk-card.st-done { opacity: .78; }
.pk-card-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.pk-card .code { font-size: 12px; }
.pk-name { font-weight: 600; color: var(--ink-strong); margin: 2px 0 1px; line-height: 1.3; overflow-wrap: anywhere; }
.pk-card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 6px; font-size: 12px; color: var(--ink-2); }
.pk-card-foot > span { display: inline-flex; align-items: center; gap: 3px; }
.pk-card-foot svg { width: 13px; height: 13px; }
.pk-who { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block !important; }
.pk-who svg { vertical-align: -2px; margin-right: 2px; }
.pk-due { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: 10px; white-space: nowrap; background: var(--grey-soft); color: var(--ink-2); }
.pk-due svg { width: 12px; height: 12px; }
.pk-due.ok { background: var(--ok-soft); color: var(--ok-ink); }
.pk-due.warn { background: var(--amber-soft); color: var(--amber-ink); }
.pk-due.over, .pk-due.stopped { background: var(--danger-soft); color: var(--danger-ink); }
.pk-due.paused { background: var(--amber-soft); color: var(--amber-ink); }
.pk-due.done { background: var(--ok-soft); color: var(--ok-ink); }
.pk-docs { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.pk-bar { display: inline-block; width: 38px; height: 5px; border-radius: 3px; background: var(--grey-soft); overflow: hidden; }
.pk-bar i { display: block; height: 100%; background: var(--danger); }
.pk-docs.mid .pk-bar i { background: var(--amber); }
.pk-docs.ok .pk-bar i { background: var(--ok); }
.pk-table td { vertical-align: top; }
.pk-table tr.pk-row-over td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
/* Ngăn chi tiết một hồ sơ */
.pk-sum { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 12px 20px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface-2); margin-bottom: 14px; }
.pk-sum h3 { margin: 2px 0 6px; font-size: 17px; color: var(--ink-strong); }
.pk-sum-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; }
.pk-sum-kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; margin: 0; font-size: 13px; align-items: center; }
.pk-sum-kv dt { color: var(--muted); }
.pk-sum-kv dd { margin: 0; }
.pk-sum-kv select { max-width: 100%; }
.pk-grid { align-items: start; }
.pk-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.pk-steps li { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0 7px; position: relative; }
.pk-steps li:not(:last-child)::after { content: ""; position: absolute; left: 11px; top: 31px; bottom: -7px; width: 2px; background: var(--line-2); }
.pk-steps .pk-step-no { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface); font-size: 12px; font-weight: 600; color: var(--ink-2); position: relative; z-index: 1; font-variant-numeric: tabular-nums; }
.pk-steps .pk-step-no svg { width: 13px; height: 13px; }
.pk-steps li.done .pk-step-no { background: var(--primary); border-color: var(--primary); color: var(--on-accent); }
.pk-steps li.done:not(:last-child)::after { background: var(--primary-line); }
.pk-steps li.current .pk-step-no { border-color: var(--primary); color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.pk-steps li.current .pk-step-body strong { color: var(--primary); }
.pk-step-body { flex: 1; min-width: 0; font-size: 13.5px; }
.pk-steps li .btn { flex: none; opacity: 0; }
.pk-steps li:hover .btn, .pk-steps li .btn:focus-visible { opacity: 1; }
@media (hover: none) { .pk-steps li .btn { opacity: 1; } }
.pk-conds, .pk-unmet { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 5px; font-size: 13.5px; }
.pk-conds li, .pk-unmet li { display: flex; gap: 6px; align-items: flex-start; }
.pk-conds svg, .pk-unmet svg { flex: none; width: 16px; height: 16px; margin-top: 2px; }
.pk-conds li.ok svg { color: var(--ok); }
.pk-conds li.na svg { color: var(--faint); }
.pk-conds li.no svg, .pk-unmet li svg { color: var(--danger); }
.pk-tl li.k-override::before, .pk-tl li.k-stop::before { border-color: var(--danger); }
.pk-tl li.k-pause::before { border-color: var(--amber); }
.pk-tl li.k-auto::before, .pk-tl li.k-sync::before { border-color: var(--faint); }
.drawer-foot .pk-acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; flex: 1; }
.pk-box { border: 1px solid var(--line-2); border-radius: 8px; padding: 2px 12px 10px; margin: 0 0 14px; background: var(--surface-2); }
.pk-box .section-title { margin-top: 8px; }
.pk-box-row { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
@media (max-width: 720px) {
  .pk-sum { grid-template-columns: 1fr; }
  .pk-col { flex-basis: 84vw; max-width: 84vw; max-height: none; }
}
/* Lịch */
table.cal .ev.pk-interview { background: var(--primary-soft); border-left-color: var(--primary); }
table.cal .ev.pk-school_interview { background: var(--blue-soft); color: var(--blue-ink); border-left-color: var(--blue); }
table.cal .ev.pk-exam { background: var(--violet-soft-2); color: var(--ink-strong); border-left-color: var(--violet); }
table.cal .ev.pk-flight { background: var(--amber-soft); color: var(--amber-ink); border-left-color: var(--amber); }
.cal-key.pk-school_interview { background: var(--blue-soft); box-shadow: inset 3px 0 0 var(--blue); }
.cal-key.pk-exam { background: var(--violet-soft-2); box-shadow: inset 3px 0 0 var(--violet); }
.cal-key.pk-flight { background: var(--amber-soft); box-shadow: inset 3px 0 0 var(--amber); }
/* Đoàn xuất cảnh */
.pk-gform .field { margin: 0; }
.pk-gform { margin-bottom: 14px; gap: 10px 12px; }
.pk-bulk { align-items: end; flex-wrap: wrap; margin-bottom: 8px; gap: 8px; }
.pk-bulk .field { margin: 0; min-width: 240px; }
.pk-bulk .spacer { flex: 1; }
/* Cài đặt quy trình */
.ps-page { display: flex; flex-direction: column; gap: 14px; }
.ps-proc-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 10px; }
.ps-proc-head h2 { margin: 0 0 4px; font-size: 16px; }
.ps-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 4px; }
.ps-proc.zero { opacity: .72; }
.ps-steps td { font-size: 13px; vertical-align: top; }
.ps-reasons { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.ps-reason { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ps-reason .input { flex: 1 1 260px; }
.pse-help { margin: 6px 0 10px; font-size: 13px; }
.pse-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.pse-step { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--surface); }
.pse-head { display: flex; gap: 6px; align-items: center; }
.pse-head .pk-step-no { flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--strong-fill); color: var(--on-strong); font-weight: 600; font-size: 13px; }
.pse-name { flex: 1; margin: 0; }
.pse-name > label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.pse-grid { margin-top: 8px; gap: 8px 10px; }
.pse-grid .field { margin: 0; }
.pse-more { margin-top: 8px; border-top: 1px dashed var(--line-2); padding-top: 6px; }
.pse-more > summary { cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--ink-2); padding: 2px 0; }
.pse-cond { display: flex; flex-direction: column; gap: 8px; padding: 8px 0 2px; }
.pse-inline { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; font-size: 13.5px; }
.pse-inline .input { width: auto; flex: 0 1 220px; }
.pse-inline input[type=number] { width: 90px; flex: none; }
.pse-docs { margin: 4px 0 6px; }
.pse-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 14px; background: var(--primary-soft); color: var(--ink-strong); font-size: 12.5px; border: 1px solid var(--primary-line); }
.pse-chip-x { border: 0; background: none; cursor: pointer; padding: 2px; border-radius: 50%; color: var(--ink-2); display: inline-grid; place-items: center; }
.pse-chip-x svg { width: 12px; height: 12px; }
.pse-chip-x:hover { background: var(--primary-line); }
.pse-step > .field { margin: 8px 0 0; }
@media (max-width: 720px) { .pse-grid.g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .pk-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pk-filters .wide, .pk-filters .end { grid-column: 1 / -1; }
  .drawer-foot .pk-acts { justify-content: stretch; }
  .drawer-foot .pk-acts .btn { flex: 1 1 auto; }
}

/* ---- Giai đoạn 1 phần 12 (20/11/2026): hoa hồng theo quy tắc, chi khác, tỷ giá theo ngày, công nợ tổng hợp ---- */
.cm-checks { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.cm-checks .check { margin: 0; }
.cm-prov td { color: var(--muted); }
.cm-prov td strong { font-weight: 500; }
.cm-ref { margin-bottom: 14px; }
.cm-ref > summary { cursor: pointer; font-weight: 600; }
.cm-ref-head { display: flex; justify-content: flex-end; margin: 8px 0; }
.cm-split-rows { display: grid; gap: 8px; margin: 10px 0 8px; }
.cm-split-row { display: grid; grid-template-columns: minmax(0, 1fr) 84px auto auto; gap: 8px; align-items: center; }
.cm-split-row .input { min-width: 0; }
.rfp-proc { margin-top: 14px; }
.cm-ref .table-scroll, .rfp-proc .table-scroll, .fin-rf-groups .table-scroll { min-height: 0; }
.rfp-proc h3 { margin: 0 0 2px; font-size: 15px; }
.rfp-table { table-layout: fixed; min-width: 560px; }
.rfp-table th:nth-child(1) { width: 40%; }
.rfp-table th:nth-child(2) { width: 22%; }
.rfp-items { margin: 6px 0; padding-left: 20px; }
.rfp-items li { margin: 2px 0; }
.rfp-preset { display: grid; gap: 8px; justify-items: start; margin-top: 8px; }
.rf-mode { font-size: 12px; }
.fin-terms { white-space: pre-line; max-width: 280px; }
.fin-fx-form { align-items: end; margin-bottom: 8px; }
.fin-dep .field { margin-top: 0; }
@media (max-width: 720px) {
  .fin-fx-form.g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cm-ref-head { justify-content: flex-start; }
}
.zoa-pay-days { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 2px 0 10px 26px; font-size: 13px; }

/* ---------------- Báo cáo quản trị (20/11/2026, phần 16) ---------------- */
.mg-tabs { margin-bottom: 10px; }
.mg-filters .field select { min-width: 0; }
.stats.mg-stats.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stats.mg-stats.n3, .stats.mg-stats.n5, .stats.mg-stats.n6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats.mg-stats.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .stats.mg-stats.n4, .stats.mg-stats.n5, .stats.mg-stats.n6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .stats.mg-stats.n2, .stats.mg-stats.n3, .stats.mg-stats.n4, .stats.mg-stats.n5, .stats.mg-stats.n6 { grid-template-columns: 1fr; } }
/* Con số bấm được (mở danh sách chi tiết): gạch chân nhạt, đậm lên khi rê chuột */
.mg-num { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: inherit;
  text-decoration: underline; text-decoration-color: var(--line-strong); text-decoration-thickness: 1px; text-underline-offset: 4px; }
.mg-num:hover, .mg-num:focus-visible { color: var(--primary); text-decoration-color: currentColor; }
.stat .value.mg-num { display: inline-block; font-size: 26px; font-weight: 600; line-height: 1.1; margin-top: 3px; }
@media (max-width: 700px) { .stat .value.mg-num { font-size: 22px; } }
.mg-hint { display: inline-flex; vertical-align: -2px; margin-left: 4px; color: var(--faint); cursor: help; }
.mg-hint svg { width: 13px; height: 13px; }
.mg-intro { color: var(--ink-2); margin: 0 0 10px; }
.mg-ignored { color: var(--amber-ink); font-size: 12.5px; margin: 6px 0 10px; }
.mg-group { margin-bottom: 12px; }
.mg-group .stats { margin: 4px 0 0; }
.mg-sec { margin-bottom: 12px; }
.mg-table td.mg-warn, .mg-table td.mg-warn .mg-num { color: var(--danger-ink); font-weight: 600; }
.mg-chart { margin: 4px 0 6px; }
.mg-cols { width: 100%; height: auto; max-height: 260px; display: block; }
.mg-cols .grid { stroke: var(--line-2); }
.mg-cols .axis { stroke: var(--line-strong); }
.mg-cols .tick { fill: var(--muted); font-size: 11px; }
.mg-cols rect.hit { cursor: pointer; }
.mg-cols rect.hit:hover { opacity: .78; }
.mg-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--ink-2); margin-bottom: 4px; }
.mg-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.mg-toggle { font-size: 13px; margin: 2px 0 8px; }
.mg-bars { margin: 2px 0 12px; }
.mg-bars .rp-flabel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mg-secnote { margin: 8px 0 0; }
.mg-note { margin-bottom: 12px; }
.mg-count { color: var(--ink-2); margin: 0 0 8px; }
.mg-drill tr.clickable:focus-visible td { box-shadow: inset 0 0 0 2px var(--focus-ring); }
.mg-sch { margin-bottom: 10px; }
.mg-sch p { margin: 4px 0; }
.mg-sch.off { opacity: .72; }
.mg-sch h2 .tag { margin-left: 8px; vertical-align: 2px; }
.mg-sch-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.mg-sch-form .wide { grid-column: 1 / -1; }
@media (max-width: 600px) { .mg-sch-form { grid-template-columns: 1fr; } .mg-sch .rp-card-head { flex-direction: column; } .mg-sch-acts { justify-content: flex-start; } }

/* SMS Brandname (20/11/2026, Giai đoạn 1 phần 17): mẫu tin, nội dung gửi, chèn thông tin */
.sms-box { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; margin: 10px 0; display: grid; gap: 8px; }
.sms-box .appt-head .row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.sms-text { white-space: pre-wrap; word-break: break-word; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--ink); font-size: 14px; line-height: 1.5; }
.sms-body { white-space: pre-wrap; word-break: break-word; max-width: 46ch; color: var(--ink-2); }
.sms-ta { font-family: inherit; line-height: 1.5; resize: vertical; }
.sms-vars { display: flex; flex-wrap: wrap; gap: 6px; }
.sms-vars .chip { padding: 4px 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink-2); font-size: 13px; cursor: pointer; }
.sms-vars .chip:hover { border-color: var(--primary-line); color: var(--primary); }
.sms-vars .chip:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.sms-log-filter { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.sms-log-filter .input { width: auto; min-width: 160px; }
.sms-kinds td { vertical-align: top; }
.sms-edit { display: grid; gap: 14px; }
.sms-edit .help { margin: 4px 0 0; }
.sms-checks { display: grid; gap: 6px; justify-items: start; margin: 4px 0; }
.sms-card .table-scroll { min-height: 0; }

/* Đào tạo bổ sung (21/11/2026, Giai đoạn 2 phần 9): giáo dục định hướng, ký túc xá, giờ dạy */
.tr-more-intro { margin: 0 0 12px; max-width: 80ch; }
.tr-more-table { min-height: 0; margin-bottom: 14px; }
.tr-more-table tr.click { cursor: pointer; }
.tr-more-table tr.click:hover td { background: var(--surface-2); }
.tr-more-table tr.off td { color: var(--muted); }
.tr-more-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tr-cand-inline { display: flex; align-items: center; gap: 8px; }
.tr-head-info { margin-bottom: 10px; }
.tr-sub-title { margin: 12px 0 4px; font-weight: 600; font-size: 13px; color: var(--ink-2); }
.tr-dorm-stats { margin-bottom: 8px; }
.tr-dorm-fee { margin-top: 14px; display: grid; gap: 8px; }
.tr-dorm-fee .input.num { text-align: right; }
.tr-hours-total td { background: var(--surface-2); }

/* ---------------- Hợp đồng, tuân thủ (21/11/2026, Giai đoạn 2 phần 13) ---------------- */
button.stat { border: 0; text-align: left; font: inherit; cursor: pointer; color: inherit; }
button.stat:hover { background: var(--paper-2); }
button.stat.active { background: var(--primary-soft); }
.stat.amber .value { color: var(--amber); }
.stat.red .value { color: var(--danger); }
.ct-pick { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 8px; }
.ct-fixed { padding: 8px 0; font-weight: 600; }
.ct-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.ct-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.ct-acts { flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.ct-docs { display: grid; gap: 8px; }
.ct-doc { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--radius); }
.ct-doc > svg { width: 22px; height: 22px; color: var(--muted); }
.ct-hist { margin-top: 14px; }
.ct-hist > summary { cursor: pointer; font-weight: 600; }
.ct-hist-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.ct-box { margin-top: 14px; }
/* Cổng học viên trong ngăn hồ sơ (21/11/2026, GĐ2 phần 14) */
.hvp-box { margin-top: 14px; }
.hvp-box .section-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.hvp-box > .cell-sub { margin: 2px 0; }
.hvp-thread { margin-top: 8px; }
.hvp-msgs { max-height: 320px; overflow: auto; }
.hvp-msgs li.hvp-in .body { border-left: 3px solid var(--primary); padding-left: 8px; }
.hvp-msgs li.hvp-out .body { border-left: 3px solid var(--line-2); padding-left: 8px; color: var(--ink-2); }
.hvp-msgs .meta .btn { margin-left: 6px; }
.hvp-reply { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; margin-top: 8px; }
.hvp-who { display: grid; gap: 8px; margin: 10px 0; }
.hvp-code { margin-top: 12px; padding: 12px; border: 1px dashed var(--line-2); border-radius: var(--radius); text-align: center; }
.hvp-checks > label.check { display: flex; margin: 4px 0; }
.hvp-ul { list-style: none; padding: 0; margin: 6px 0 10px; display: grid; gap: 6px; font-size: 14px; }
.hvp-url { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 4px; }
.hvp-url code { overflow-wrap: anywhere; }
.hvp-big { font-size: 30px; font-weight: 700; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
@media (max-width: 720px) { .hvp-reply { grid-template-columns: 1fr; } }
.ct-warn { color: var(--amber); }
.ct-sample { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.ct-sample .input { width: auto; max-width: 100%; }
.ct-guide { margin-top: 12px; }
.ct-guide > summary { cursor: pointer; font-weight: 600; }
.ct-guide h4 { margin: 12px 0 4px; font-size: 13.5px; }
.ct-guide h5 { margin: 8px 0 2px; font-size: 12.5px; color: var(--ink-2); }
.ct-fields { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 24px; font-size: 13px; }
.ct-fields li { break-inside: avoid; margin: 2px 0; }
.ct-fields code { font-size: 12px; background: var(--paper-2); padding: 1px 4px; border-radius: 4px; }
.ct-table td { vertical-align: top; }
.ct-filters .end { grid-column: -3 / -1; justify-content: flex-end; flex-wrap: wrap; }
.ct-pane .table-scroll { min-height: 0; }
.ct-report .table-scroll { max-height: none; }
.px-approval { margin: 10px 0; }
.px-approval > summary { cursor: pointer; font-weight: 600; margin-bottom: 6px; }
@media (max-width: 720px) {
  .ct-pick { grid-template-columns: 1fr; }
  .ct-fields { columns: 1; }
  .ct-doc { grid-template-columns: auto minmax(0, 1fr); }
  .ct-doc > :last-child { grid-column: 1 / -1; }
  .ct-filters .end { grid-column: 1 / -1; }
}

/* ---- Nhân sự CBNV (21/11/2026, GĐ2 phần 15) ---- */
.span-2 { grid-column: span 2; }
@media (max-width: 640px) { .span-2 { grid-column: 1 / -1; } }
.hr-subtabs { margin: 4px 0 12px; }
.hr-pane > .section-title:first-child { margin-top: 0; }
.hr-pane .section-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.hr-form .section-title { margin-top: 14px; }
.hr-allow { display: grid; gap: 6px; margin-bottom: 6px; }
.hr-allow-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto auto auto; gap: 8px; align-items: center; }
@media (max-width: 640px) { .hr-allow-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .hr-allow-row .check { font-size: 13px; } }
.hr-quick { align-self: end; flex-wrap: wrap; gap: 4px; padding-bottom: 2px; }
.hr-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: hrstep; }
.hr-steps li { display: flex; gap: 10px; justify-content: space-between; align-items: flex-start; border: 1px solid var(--line-2); border-radius: var(--radius); padding: 10px 12px; counter-increment: hrstep; }
.hr-steps li::before { content: counter(hrstep); flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--grey-soft); color: var(--ink-2); display: grid; place-items: center; font-size: 12px; font-weight: 600; }
.hr-steps li.done::before { background: var(--strong-fill); color: var(--on-strong); }
.hr-step-main { flex: 1; min-width: 0; }
.hr-apply { margin-top: 8px; }
.hr-chg-rows { display: grid; gap: 4px; }
.hr-me-head { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.hr-me-head h2 { margin: 0 0 2px; font-size: 18px; }
.hr-params { display: grid; gap: 12px; }
.hr-params > * { min-width: 0; }
.hr-param-vals { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 6px 0; }
.hr-param-vals span { overflow-wrap: anywhere; }
.hr-param-vals b { font-variant-numeric: tabular-nums; }
.hr-brackets { display: grid; gap: 6px; }
.hr-bracket-row { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 120px) auto; gap: 8px; align-items: center; }
.hr-guide { margin-top: 8px; }
.hr-guide code { font-size: 12.5px; }

/* ---------------------------------------------------------------- Nhân sự — Đợt B: chấm công, đơn từ, bảng công (21/11/2026) */
.hr-inline { display: inline-flex; gap: 6px; align-items: center; font-weight: 400; }
.hr-inline .input { width: auto; }
.hr-att-card { display: grid; gap: 12px; }
.hr-att-head { display: flex; gap: 16px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; }
.hr-att-date { margin: 0 0 2px; font-size: 18px; }
.hr-att-times { display: flex; gap: 0; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; }
.hr-att-times > div { padding: 8px 16px; min-width: 96px; }
.hr-att-times > div + div { border-left: 1px solid var(--line-2); }
.hr-att-times .label { color: var(--ink-2); font-size: 12px; font-weight: 600; }
.hr-att-times .value { font-size: 24px; font-weight: 600; line-height: 1.15; }
.hr-punch-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn.hr-punch-btn { height: 56px; padding: 0 28px; font-size: 17px; border-radius: 12px; min-width: 220px; justify-content: center; }
.btn.hr-punch-btn svg { width: 22px; height: 22px; }
.hr-att-msg:empty { display: none; }
.hr-punch-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.hr-punch-list li { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; padding: 6px 0; border-top: 1px solid var(--line-2); }
.hr-punch-list li:first-child { border-top: 0; }
.hr-att-help { margin: 0; }
.hr-photo-prev img { max-width: 100%; max-height: 220px; border-radius: var(--radius-sm); margin: -4px 0 10px; display: block; }
.hr-gps { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.hr-field-list { display: grid; gap: 10px; }
.hr-field-item { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 10px; border: 1px solid var(--line-2); border-radius: var(--radius); }
.hr-field-photo { display: block; width: 96px; height: 96px; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); }
.hr-field-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hr-field-photo.empty { display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.hr-field-main { display: grid; gap: 3px; min-width: 0; align-content: start; }
.hr-field-main .row-actions { margin-top: 4px; }
.hr-reason { max-width: 280px; overflow-wrap: anywhere; }
.hr-rq-info p { margin: 0; }
.hr-mini-list { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.hr-mini-list .tag { margin-left: 6px; }
.hr-ts-actions { margin: 10px 0; flex-wrap: wrap; }
.hr-leave-stats { margin-bottom: 12px; }
.hr-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin: 12px 0 6px; }
.hr-cal-wd { font-size: 12px; font-weight: 600; color: var(--ink-2); text-align: center; padding: 2px 0; }
.hr-cal-cell { min-height: 68px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 4px 6px; display: flex; flex-direction: column; gap: 1px; align-items: flex-start; background: var(--surface); text-align: left; font: inherit; color: inherit; min-width: 0; overflow: hidden; }
button.hr-cal-cell { cursor: pointer; }
button.hr-cal-cell:hover { border-color: var(--primary-line); }
.hr-cal-cell.blank { border: 0; background: transparent; }
.hr-cal-cell.rest { background: var(--surface-2); }
.hr-cal-d { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.hr-cal-sym { font-weight: 700; font-size: 14px; }
.hr-cal-time { font-size: 11.5px; color: var(--ink-2); }
.hr-cal-flag { font-size: 11px; color: var(--amber-ink); }
.hr-cal-cell.t-ok .hr-cal-sym { color: var(--ok); }
.hr-cal-cell.t-leave .hr-cal-sym, .hr-cal-cell.t-trip .hr-cal-sym { color: var(--blue); }
.hr-cal-cell.t-leave, .hr-cal-cell.t-trip { background: var(--blue-soft); }
.hr-cal-cell.t-hol { background: var(--ok-soft); }
.hr-cal-cell.t-off .hr-cal-sym { color: var(--ink-2); }
.hr-cal-cell.t-bad { background: var(--danger-soft); }
.hr-cal-cell.t-bad .hr-cal-sym { color: var(--danger); }
.hr-cal-cell.t-warn { background: var(--amber-soft); }
.hr-cal-cell.t-warn .hr-cal-sym { color: var(--amber-ink); }
.hr-cal-cell.adj { box-shadow: inset 0 0 0 2px var(--primary-line); }
.hr-cal-key { margin-top: 4px; }
.hr-fb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hr-fb-list li { border: 1px solid var(--line-2); border-radius: var(--radius); padding: 8px 10px; display: grid; gap: 4px; justify-items: start; }
.hr-fb-reply { border-left: 3px solid var(--primary-line); padding-left: 8px; }
.hr-roster th, .hr-roster td { padding: 4px; }
.hr-roster .hr-roster-sel { min-width: 58px; height: 30px; padding: 0 4px; font-size: 12.5px; }
.hr-sched .input { min-width: 64px; }
@media (max-width: 700px) {
  .btn.hr-punch-btn { width: 100%; min-width: 0; }
  .hr-punch-row > .btn { flex: 1 1 100%; justify-content: center; }
  .hr-att-times { width: 100%; }
  .hr-att-times > div { flex: 1; }
  .hr-cal { gap: 2px; }
  .hr-cal-cell { min-height: 48px; padding: 3px; }
  .hr-cal-time, .hr-cal-flag { display: none; }
  .hr-cal-sym { font-size: 12px; }
  .hr-field-item { grid-template-columns: 72px minmax(0, 1fr); }
  .hr-field-photo { width: 72px; height: 72px; }
}

/* ---------------------------------------------------------------- Nhân sự — Đợt C: bảng lương, phiếu lương, KPI (22/11/2026) */
.hr-pay-table td, .hr-pay-table th { white-space: nowrap; }
.hr-pay-table td:first-child { white-space: normal; min-width: 180px; }
.hr-slip tr.hr-slip-head td { font-weight: 700; background: var(--surface-2); }
.hr-slip tr.hr-slip-sub td { font-weight: 600; }
.hr-slip td:first-child { width: 48px; color: var(--ink-2); }
.hr-item-form { display: grid; gap: 6px; margin-top: 8px; padding: 10px; border: 1px dashed var(--line); border-radius: var(--radius); }
.hr-item-form > .btn { justify-self: start; }
.hr-bank-cols, .hr-kpi-metrics { display: grid; gap: 6px; margin-bottom: 8px; }
.hr-bank-col { display: grid; grid-template-columns: 20px minmax(0, 1fr) minmax(0, 1fr) auto auto; gap: 6px; align-items: center; }
.hr-kpi-metric { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr) 90px 80px auto auto; gap: 6px; align-items: center; }
.hr-notice { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.hr-notice .input { width: 180px; }
@media (max-width: 700px) {
  .hr-bank-col { grid-template-columns: 20px minmax(0, 1fr) auto auto; }
  .hr-bank-col > .input:nth-of-type(2) { grid-column: 2 / -1; }
  .hr-kpi-metric { grid-template-columns: minmax(0, 1fr) 70px 64px auto auto; }
  .hr-kpi-metric > input:not(.num) { grid-column: 1 / -1; order: 5; }
  .hr-kpi-metric > input:not(.num)[style*="hidden"] { display: none; }
}

/* Giai đoạn 2 phần 17 (22/11/2026): hóa đơn điện tử M-invoice */
.ei-card .table-scroll, .ei-scroll { min-height: 0; }
.ei-sumline { margin: 4px 2px 8px; font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ei-table td:first-child { width: 32px; }
.ei-lines td { vertical-align: middle; }
.ei-lines td:first-child .input { min-width: 220px; }
.ei-lines td.num { min-width: 110px; }
.ei-tools { margin: 0 0 8px; }
.ei-tools select { width: auto; max-width: 100%; }
@media (max-width: 640px) {
  .ei-tools select { flex: 1 1 100%; }
}

/* 22/11/2026: tab Biểu mẫu & mã QR trong Khách tiềm năng (gộp trang Đăng ký online); chân phần mềm — phiên bản */
.su-tab-head { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin: 2px 0 6px; }
.su-tab-head p { margin: 4px 0; max-width: 70ch; }
.su-tab-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.su-pending { margin-bottom: 14px; }
/* Chân phần mềm: phiên bản (22/11/2026) */
.app-ver { font-size: 11.5px; line-height: 1.3; letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.sidebar .me .app-ver { color: var(--spine-muted); opacity: .8; padding: 6px 10px 0; }
.login { position: relative; }
.login > .app-ver { position: absolute; right: 18px; bottom: 12px; color: var(--muted); }
@media (max-width: 760px) { .login > .app-ver { position: static; text-align: center; padding: 0 0 16px; } }
/* Tổng quan của cộng tác viên (22/11/2026, GĐ3 phần 2) */
.ctvh-miss { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.ctvh-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.ctvh-side { display: grid; gap: 12px; }
.ctvh h2 { font-size: 15px; margin: 0 0 10px; }
.ctvh-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.ctvh-bars li { display: grid; grid-template-columns: 118px minmax(0, 1fr) 34px; gap: 10px; align-items: center; font-size: 13px; }
.ctvh-bar { height: 10px; background: var(--paper-2); border-radius: 5px; overflow: hidden; }
.ctvh-bar-fill { display: block; height: 100%; border-radius: 5px; background: var(--blue); min-width: 2px; }
.ctvh-bar-fill.tone-green { background: var(--ok); }
.ctvh-bar-fill.tone-red { background: var(--seal); opacity: .75; }
.ctvh-bar-fill.tone-amber { background: var(--amber); opacity: .8; }
.ctvh-bar-fill.tone-violet { background: var(--primary); opacity: .7; }
.ctvh-bar-n { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.ctvh-list { list-style: none; margin: 0; padding: 0; }
.ctvh-list li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 7px 0; border-top: 1px solid var(--line-2); }
.ctvh-list li:first-child { border-top: 0; }
.ctvh-list .cell-sub { margin-left: auto; }
.ctvh-fee { color: var(--ink-2); font-size: 12.5px; }
.ctvh-money { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 10px; }
.ctvh-money dt { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.ctvh-money dd { margin: 2px 0; font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .ctvh-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .ctvh-money { grid-template-columns: minmax(0, 1fr); } .ctvh-bars li { grid-template-columns: 96px minmax(0, 1fr) 28px; } }
/* Cổng doanh nghiệp mở rộng — ngăn đối tác (22/11/2026, GĐ3 phần 2) */
.pt-req-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 8px; }
.pt-req-list li { border: 1px solid var(--line-2); border-radius: 6px; padding: 8px 10px; display: grid; gap: 3px; }
.pt-req-head { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.pt-req-list .row-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.pt-stars { color: var(--amber); letter-spacing: 1px; margin-right: 6px; }
tr.pt-norehire td:first-child { box-shadow: inset 3px 0 0 var(--seal); }
.ls-portal { display: flex; gap: 8px; align-items: flex-start; }
/* Ô Xã/Phường chọn trong danh mục đơn vị hành chính (22/11/2026) */
.addr-combo { position: relative; }
.addr-combo-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 2px); max-height: 280px; overflow-y: auto; margin: 0; padding: 4px 0; list-style: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 28px rgba(20, 30, 60, .16); }
.addr-combo-list[hidden] { display: none; }
.addr-combo-list li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 12px; cursor: pointer; font-size: 14px; }
.addr-combo-list li[aria-selected="true"], .addr-combo-list li:hover { background: var(--row-selected); }
.addr-combo-list .addr-prov { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.addr-combo-list .addr-empty { color: var(--muted); cursor: default; }
.addr-combo-list .addr-empty:hover { background: none; }
.addr-note { color: var(--amber); font-size: 12.5px; margin-top: 4px; }

/* Giai đoạn 3 phần 3 (22/11/2026): KPI và đánh giá — kỳ tháng / quý, chỉ tiêu nhóm, giao chỉ tiêu, đánh giá định kỳ */
.kpi-views { margin-bottom: 12px; max-width: 100%; overflow-x: auto; }
.kpi-views .seg { flex-wrap: nowrap; }
.kpi-views .seg button { white-space: nowrap; }
.kpi-sum span { display: inline-block; margin-right: 10px; white-space: nowrap; }
.kpi-sum em, .kpi-items em { font-style: normal; color: var(--muted); }
.kpi-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 3px 0 2px; }
.kpi-items td:first-child { min-width: 200px; white-space: normal; }
.kpi-pct { min-width: 92px; }
.meter.kpi-meter { display: block; flex: none; width: 100%; max-width: 120px; height: 6px; margin: 4px 0 0 auto; }
.meter.kpi-meter.done > span { background: var(--ok); }
.kpi-team-table { width: 100%; }
.kpi-team-table td:first-child { min-width: 0; }
.kpi-team-table .kpi-pct { min-width: 72px; }
.kpi-goal-sec { margin-top: 4px; }
.kpi-goals th.num { min-width: 120px; white-space: normal; }
.kpi-goals td:first-child { min-width: 180px; }
.kpi-teams { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.kpi-team { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.kpi-team-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.kpi-team-head h3 { margin: 0; font-size: 15px; }
.kpi-team-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 8px 10px; background: var(--surface-2); border-radius: var(--radius); }
.kpi-team-stats > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kpi-team-stats strong { font-variant-numeric: tabular-nums; color: var(--ink-strong); }
.kpi-crit { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 12px; }
.kpi-crit-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.kpi-crit-list li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--line-2); }
.kpi-appr section + section { margin-top: 4px; }
.kpi-tiers { display: grid; gap: 6px; }
.hr-kpi-metrics > .btn, .kpi-tiers > .btn { justify-self: start; }
.kpi-tier { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.kpi-tier .input { width: 80px; }
.kpi-tier span { color: var(--ink-2); font-size: 13px; }
.kpi-opt { font-size: 12.5px; white-space: nowrap; }
.section-h { font-size: 16px; margin: 22px 0 10px; }
@media (max-width: 560px) {
  .kpi-teams { grid-template-columns: 1fr; }
  .kpi-team-stats { grid-template-columns: 1fr 1fr; }
}

/* Giai đoạn 3 phần 4 (22/11/2026): báo cáo cơ quan — lịch nộp, kiểm tra dữ liệu, sổ đã nộp */
.cpl-views { margin-bottom: 12px; max-width: 100%; overflow-x: auto; }
.cpl-views .seg { flex-wrap: nowrap; }
.cpl-views .seg button { white-space: nowrap; }
.cpl-cal td:first-child { min-width: 240px; white-space: normal; }
.cpl-cal tr[data-status="overdue"] td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.cpl-cal tr[data-status="due"] td:first-child { box-shadow: inset 3px 0 0 var(--amber); }
.cpl-late { color: var(--danger); font-weight: 600; }
.cpl-check.warn { border-left: 3px solid var(--amber); }
.cpl-issues { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cpl-issues li { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line-2); }
.cpl-issues li:last-child { border-bottom: 0; padding-bottom: 0; }
.cpl-issues .btn { flex: none; }
.cpl-ok { color: var(--ok); margin: 0; display: flex; align-items: center; gap: 6px; }
.cpl-people { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.cpl-people li { padding: 7px 0; border-bottom: 1px solid var(--line-2); }
.cpl-people a { color: var(--ink); text-decoration: none; }
.cpl-people a:hover strong { text-decoration: underline; }
.px-item.cpl-picked { outline: 2px solid var(--primary-line); outline-offset: 2px; border-radius: var(--radius); }
.ct-report .link-btn { font-size: inherit; }

/* Giai đoạn 3 phần 5 (22/11/2026): BHXH điện tử — hồ sơ kê khai theo đợt */
.ib-card .seg { margin: 8px 0 10px; max-width: 100%; overflow-x: auto; flex-wrap: nowrap; }
.ib-card .table-scroll, .drawer .ib-items-wrap, .pbx-card .table-scroll { min-height: 0; }
.ib-card .seg button { white-space: nowrap; }
.ib-late { color: var(--danger); font-weight: 600; }
.ib-warn { color: var(--danger); }
.ib-warn + .ib-warn { margin-top: 2px; }
.ib-ok { color: var(--ok); }
.ib-items td:nth-child(1) { min-width: 150px; }
.ib-items td:nth-child(2) { min-width: 130px; }
.ib-items td:nth-child(3) { min-width: 165px; }
.ib-items td:nth-child(6) { min-width: 220px; white-space: normal; }
.ib-plan { min-width: 150px; padding-top: 4px; padding-bottom: 4px; }
.ib-to { width: 92px; margin-top: 2px; padding-top: 4px; padding-bottom: 4px; }
.ib-rej { margin: 4px 0 12px; }
.ib-rej summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.ib-rej > div { display: grid; gap: 4px; padding: 8px 0 0 4px; }

/* Tổng đài IP: báo cuộc gọi đến, nhật ký cuộc gọi, cài đặt */
.pbx-pop { position: fixed; right: 16px; bottom: 84px; z-index: 96; width: min(340px, calc(100vw - 32px)); background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-left: 4px solid var(--primary); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 12px 12px 14px; display: grid; gap: 8px; }
.pbx-pop-head { display: flex; align-items: center; gap: 8px; }
.pbx-pop-head svg { width: 18px; height: 18px; color: var(--primary); flex: none; }
.pbx-pop-num { margin-left: auto; font-weight: 700; letter-spacing: .02em; }
.pbx-pop-head .icon-btn { margin-right: -4px; }
.pbx-pop-body { display: grid; gap: 4px; justify-items: start; }
.pbx-pop-body .btn { margin-top: 4px; }
.pbx-pop + .pbx-pop { bottom: 260px; }
@media (prefers-reduced-motion: no-preference) { .pbx-pop { animation: pbx-in .18s ease-out; } }
@keyframes pbx-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.filters .pbx-seg-field { grid-column: 1 / -1; }
.pbx-seg-field .seg { max-width: 100%; overflow-x: auto; flex-wrap: nowrap; }
.pbx-seg-field .seg button { white-space: nowrap; }
.pbx-calls td:nth-child(3) { min-width: 180px; }
.pbx-card .grid, .pbx-card > .field { margin-bottom: 10px; }
.pbx-late { color: var(--danger); font-weight: 600; }
.pbx-audio { width: 220px; height: 32px; }
.pbx-card + .pbx-card { margin-top: 14px; }
.pbx-card .check { display: flex; margin: 6px 0; }
.pbx-ack { align-items: flex-start; }
.pbx-grid { grid-template-columns: 120px repeat(2, minmax(0, 1fr)); }
.pbx-hook { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 4px; }
.pbx-url { display: block; word-break: break-all; margin-top: 10px; }
.pbx-test { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.pbx-test .input { width: 130px; }
.pbx-ext { width: 120px; }
.pbx-last pre { max-height: 220px; overflow: auto; }
@media (max-width: 640px) { .pbx-grid { grid-template-columns: 1fr; } .pbx-test { margin-left: 0; } }

/* Đọc giấy tờ: quét mã QR trên CCCD bằng camera / ảnh (22/11/2026, GĐ3 phần 6) */
.idr-tabs { margin-bottom: 12px; flex-wrap: wrap; }
.idr-cam { position: relative; border-radius: var(--radius); overflow: hidden; background: #0d1220; aspect-ratio: 4 / 3; max-height: 360px; margin: 10px 0; }
.idr-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.idr-aim { position: absolute; inset: 14% 22%; border: 2px solid rgba(255, 255, 255, .85); border-radius: 10px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .28); pointer-events: none; }
@media (max-width: 640px) { .idr-aim { inset: 12% 14%; } }
.hr-qr { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; padding: 8px 10px; border: 1px dashed var(--line); border-radius: var(--radius); }

/* Ký hợp đồng điện tử (22/11/2026, GĐ3 phần 6) */
.es-intro { margin: 0 0 8px; }
.es-req { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.es-req.old { background: var(--surface-2); }
.es-req-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.es-signers { list-style: none; margin: 6px 0 0; padding: 0; }
.es-signers li { display: flex; justify-content: space-between; gap: 6px 10px; align-items: flex-start; flex-wrap: wrap; padding: 7px 0; border-top: 1px dashed var(--line); }
.es-signers li > .row-actions { flex-wrap: wrap; }
.es-sg-main { min-width: 0; }
.es-role { color: var(--muted); font-size: 12.5px; }
.es-foot { margin-top: 6px; flex-wrap: wrap; }
.es-older { margin-top: 8px; }
.es-older > summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.es-presig, .es-scan-sig { margin: 4px 0; }
.es-sigs { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.es-sigs li { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; }
.es-sigs li svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.es-sigs li.ok svg { color: var(--ok); }
.es-sigs li.bad svg { color: var(--danger); }
.es-sigs li.bad strong { color: var(--danger); }
.es-rows { display: flex; flex-direction: column; gap: 6px; }
.es-row { display: grid; grid-template-columns: 1fr 1.4fr 1fr 1.3fr auto; gap: 8px; align-items: end; padding-bottom: 6px; border-bottom: 1px dashed var(--line); }
.es-row > .btn { margin-bottom: 6px; }
@media (max-width: 760px) { .es-row { grid-template-columns: 1fr 1fr; } .es-row > .btn { justify-self: end; } }
.es-link { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; margin-top: 10px; }
.es-link-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 560px) { .es-link { flex-direction: column; align-items: stretch; } .es-link .dv-qr { align-self: center; } }
.es-signform { display: flex; flex-direction: column; gap: 10px; }
.es-pad-wrap { display: flex; flex-direction: column; gap: 4px; }
.es-pad-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.es-pad { width: 100%; height: 190px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; touch-action: none; cursor: crosshair; display: block; }
.field.has-error .es-pad { border-color: var(--danger); }
.es-consent { align-items: flex-start; }
.es-consent input { margin-top: 3px; }
.es-events { margin: 8px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.es-hash { font-size: 11.5px; word-break: break-all; }
.es-verify { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.es-mini { margin: 6px 0 0; padding-left: 18px; }

/* Bảo vệ dữ liệu cá nhân (23/11/2026) */
.pd-head { margin-bottom: 12px; }
.pd-pane { display: flex; flex-direction: column; gap: 14px; }
.pd-tools { display: flex; gap: 8px; margin: 8px 0; max-width: 420px; }
.pd-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pd-checks li { display: flex; gap: 10px; align-items: flex-start; }
.pd-checks svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.pd-checks .is-ok svg { color: var(--ok); }
.pd-checks .is-todo svg { color: var(--amber); }
.pd-consent { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.pd-consent.is-ok, .pd-consent.is-todo { flex-direction: row; align-items: center; gap: 8px; }
.pd-consent.is-ok { border-color: transparent; background: var(--ok-soft); color: var(--ok); }
.pd-consent.is-todo { border-color: transparent; background: var(--amber-soft); color: var(--amber); }
.pd-consent > svg { width: 17px; height: 17px; flex: none; }
.pd-consent-line { display: flex; gap: 9px; align-items: flex-start; cursor: pointer; line-height: 1.5; }
.pd-consent-line input { margin-top: 4px; flex: none; }
.pd-consent-line small { display: block; color: var(--muted); }
.pd-consent-text, .pd-text p { white-space: pre-wrap; font-size: 13px; line-height: 1.55; color: var(--ink-2); background: var(--surface-2); border-radius: 6px; padding: 9px 11px; margin: 0; max-width: 72ch; }
.pd-text { margin-top: 10px; }
.pd-text summary, .pd-hist summary { cursor: pointer; color: var(--primary); font-size: 13px; }
.pd-cand { display: flex; flex-direction: column; gap: 8px; }
.pd-hist ul { margin: 6px 0 0; padding-left: 18px; font-size: 13px; }
.pd-actions { justify-content: flex-end; margin-top: 10px; }
.pd-pick { display: flex; flex-direction: column; gap: 6px; }
.pd-pick-list { display: flex; flex-direction: column; gap: 2px; max-height: 220px; overflow: auto; }
.pd-pick-item { display: flex; justify-content: space-between; gap: 8px; text-align: left; border: 0; background: var(--surface-2); padding: 7px 10px; border-radius: 6px; cursor: pointer; color: var(--ink); }
.pd-pick-item:hover, .pd-pick-item:focus-visible { background: var(--primary-soft); }
.pd-pick-item small { color: var(--muted); }
.pd-pick-chosen, .pd-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pd-chips .chip-x { border: 0; background: transparent; margin-left: 4px; cursor: pointer; color: inherit; font-size: 14px; line-height: 1; }
.pd-kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 14px; }
.pd-people { max-width: 260px; }
.text-red { color: var(--danger); }
.count-pill { margin-left: 8px; font-size: 12px; font-variant-numeric: tabular-nums; background: var(--grey-soft); color: var(--ink-2); border-radius: 9px; padding: 0 8px; line-height: 19px; font-weight: 600; }
.verify-state { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.verify-state.is-ok > span { color: var(--ok); }
.verify-state.is-bad > span { color: var(--danger); font-weight: 600; }
.pd-enc-box { display: flex; flex-direction: column; gap: 6px; }
.pd-enc { display: flex; flex-direction: column; gap: 6px; max-width: 520px; }
.pd-bar { height: 8px; border-radius: 4px; background: var(--grey-soft); overflow: hidden; }
.pd-bar > span { display: block; height: 100%; background: var(--primary); transition: width .4s ease; }
.pd-enc-msg { margin: 2px 0; }
.pd-enc-act { margin-top: 2px; }
@media (prefers-reduced-motion: reduce) { .pd-bar > span { transition: none; } }

/* Nhập dữ liệu cũ từ Excel (23/11/2026, Đợt 2) */
.di-steps { display: flex; gap: 6px; list-style: none; margin: 0 0 14px; padding: 0; counter-reset: di; flex-wrap: wrap; }
.di-steps li { counter-increment: di; display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 600; padding-right: 10px; }
.di-steps li::before { content: counter(di); display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-strong); font-size: 12px; }
.di-steps li.on { color: var(--ink-strong); }
.di-steps li.on::before { background: var(--primary); border-color: var(--primary); color: var(--on-accent); }
.di-stage { display: flex; flex-direction: column; gap: 14px; }
.di-guide { margin: 0 0 8px; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; line-height: 1.5; max-width: 90ch; }
.di-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.di-filter { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.di-table { max-height: 52vh; }
.di-table td { vertical-align: top; }
.di-msg { margin: 0; padding-left: 16px; font-size: 12.5px; line-height: 1.45; }
.di-error .di-msg { color: var(--danger); }
.di-skip td { color: var(--muted); }
.stat .value.di-money { font-size: 18px; line-height: 1.5; white-space: nowrap; }

/* Đăng nhập một lần — OpenID Connect (24/11/2026) */
.sso-login { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.sso-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12.5px; margin-bottom: 2px; }
.sso-or::before, .sso-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.login-card .sso-btn { justify-content: flex-start; gap: 10px; text-decoration: none; padding-left: 12px; }
.login-card .sso-btn > span:last-child { flex: 1; text-align: center; margin-right: 22px; }
.sso-mark { flex: none; width: 20px; height: 20px; display: inline-grid; place-items: center; }
.sso-g { border-radius: 50%; border: 1.5px solid var(--line-strong); font: 700 12px/1 Arial, sans-serif; color: #4285f4; }
.sso-ms { grid-template-columns: 1fr 1fr; gap: 2px; width: 16px; height: 16px; }
.sso-ms i { display: block; width: 100%; height: 100%; }
.sso-ms i:nth-child(1) { background: #f25022; } .sso-ms i:nth-child(2) { background: #7fba00; }
.sso-ms i:nth-child(3) { background: #00a4ef; } .sso-ms i:nth-child(4) { background: #ffb900; }
.sso-key svg { width: 16px; height: 16px; color: var(--primary); }
.sso-sec { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.sso-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sso-links li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--surface-2); border-radius: 6px; }
.sso-link-text { flex: 1; min-width: 0; }
.sso-link-text .cell-sub { overflow-wrap: anywhere; }
.sso-link-text .tag { margin-left: 6px; }
.sso-card { margin-bottom: 16px; }
.sso-card > p.cell-sub { max-width: 95ch; line-height: 1.5; margin: 0 0 12px; }
.sso-redirect { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; background: var(--surface-2); border-radius: 8px; margin-bottom: 12px; }
.sso-copy { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sso-copy .ext-code { padding: 3px 8px; }
.sso-issuer { font-size: 12.5px; overflow-wrap: anywhere; }
.sso-table td { vertical-align: top; }
.sso-acts { display: flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: nowrap; }
.sso-table .link-btn { white-space: nowrap; }
.sso-op-on { margin-bottom: 12px; font-weight: 600; }
.sso-checks { display: flex; flex-direction: column; gap: 8px; }
.sso-adv summary { cursor: pointer; color: var(--muted); font-size: 13px; margin: 2px 0 8px; }
.sso-endpoints { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; margin: 4px 0 0; font-size: 13px; }
.sso-endpoints dt { color: var(--muted); }
.sso-endpoints dd { margin: 0; overflow-wrap: anywhere; }
.sso-guide { font-size: 13px; line-height: 1.5; }
.oidc-hint { margin-bottom: 14px; }
.oidc-card .row-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.oidc-card .row-actions .btn { width: auto; flex: 1; text-decoration: none; }

/* Nhập tệp máy chấm công (24/11/2026, Đợt 3) — dùng chung CBNV và cho thuê lại */
.ai-card { margin-bottom: 16px; }
.ai-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.ai-more { margin-top: 10px; }
.ai-more summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.ai-guide { margin: 0 0 14px; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; line-height: 1.5; max-width: 90ch; }
.ai-file { padding: 14px; border: 1.5px dashed var(--line-strong); border-radius: 8px; }
.ai-summary { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.ai-errors { margin: 0 0 12px; font-size: 13px; }
.ai-errors summary { cursor: pointer; color: var(--danger); }
.ai-errors ul { margin: 6px 0 0; padding-left: 18px; max-height: 160px; overflow: auto; }
.ai-table { max-height: 46vh; margin-bottom: 10px; }
.ai-table td { vertical-align: top; }
.ai-table select { min-width: 220px; }
.ai-unmatched td:first-child { box-shadow: inset 3px 0 0 var(--amber); }
.ai-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ai-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--surface-2); border-radius: 6px; }
.ai-list li.undone { opacity: .65; }
.ai-list-main { flex: 1; min-width: 0; }
.ai-list-main strong { overflow-wrap: anywhere; }

/* Chấm công lao động cho thuê lại (24/11/2026, Đợt 3) */
.la-bar { margin-bottom: 12px; }
.la-bar-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.la-info { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; max-width: 80ch; }
.la-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.la-days { display: flex; gap: 14px; flex-wrap: wrap; }
.la-sites { display: flex; flex-direction: column; gap: 8px; }
.la-site { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.4fr) 110px minmax(0, 1.6fr) auto; gap: 8px; align-items: end; padding: 10px; background: var(--surface-2); border-radius: 8px; }
.la-site .field { margin: 0; }
@media (max-width: 900px) { .la-site { grid-template-columns: 1fr 1fr; } }
.la-compute td { vertical-align: top; }
.la-days-table .la-rest td { background: var(--surface-2); }
.la-pending { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.la-pending li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.la-pending-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.la-src { color: var(--primary); min-width: 200px; }
/* Mẫu vai trò theo đặc tả (24/11/2026, Đợt 5) */
.role-tpl-list { display: grid; gap: 10px; }
.role-tpl { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.role-tpl-main { min-width: 0; }
.role-tpl-main p { margin: 4px 0 0; font-size: 13px; line-height: 1.45; max-width: 80ch; }
.role-tpl-act { flex: none; }
@media (max-width: 640px) { .role-tpl { flex-direction: column; } }
/* Thuế TNCN: chứng từ khấu trừ (24/11/2026, Đợt 5) */
.pit-bar { align-items: center; gap: 10px; margin-bottom: 12px; }
.pit-hint { max-width: 62ch; }
.pit-months { display: grid; gap: 6px; margin: 6px 0 12px; }

/* ---------------- Hướng dẫn sử dụng (25/11/2026) ---------------- */
.guide { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 22px; align-items: start; }
.guide-nav { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 12px; }
.guide-search { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; background: var(--surface); }
.guide-search svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.guide-search .input { border: 0; padding-left: 0; box-shadow: none; background: transparent; }
.guide-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.guide-all { margin: 10px 0 8px; font-size: 13px; }
.guide-ch-list, .guide-sec-list { list-style: none; margin: 0; padding: 0; }
.guide-ch { display: flex; gap: 8px; align-items: baseline; padding: 6px 8px; border-radius: 6px; color: var(--ink); text-decoration: none; font-size: 14px; line-height: 1.35; }
.guide-ch:hover { background: var(--surface-2); }
.guide-ch.active { background: var(--primary-soft); color: var(--ink-strong, var(--ink)); font-weight: 600; }
.guide-ch.other { color: var(--muted); }
.guide-no { flex: none; min-width: 22px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.guide-sec-list { margin: 2px 0 8px 30px; border-left: 1px solid var(--line-2); }
.guide-sec { display: block; padding: 4px 8px; font-size: 13px; color: var(--ink-2, var(--muted)); text-decoration: none; line-height: 1.35; border-left: 2px solid transparent; margin-left: -1px; }
.guide-sec.lv3 { padding-left: 20px; font-size: 12.5px; }
.guide-sec:hover { color: var(--ink); background: var(--surface-2); }
.guide-sec.active { color: var(--primary); border-left-color: var(--primary); }
.guide-hidden-note { margin: 10px 8px 0; }
.guide-toc-btn { display: none; margin-bottom: 10px; }
.guide-doc { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 22px 28px 28px; min-width: 0; }
.guide-doc:focus { outline: none; }
.guide-ch-head { border-bottom: 1px solid var(--line-2); padding-bottom: 14px; margin-bottom: 16px; }
.guide-ch-kicker { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.guide-ch-title { font-family: var(--font-title); font-size: 25px; line-height: 1.25; margin: 2px 0 0; font-weight: 600; }
.guide-open { margin-top: 10px; }
.guide-ch-head .alert { margin: 10px 0 0; }
.g-md { max-width: 82ch; font-size: 14.5px; line-height: 1.65; color: var(--ink); }
.g-md p { margin: 0 0 10px; }
.g-md .g-h { font-family: var(--font-title); scroll-margin-top: 14px; }
.g-md .g-h:focus { outline: none; }
.g-md h3 { font-size: 20px; margin: 26px 0 8px; padding-top: 6px; border-top: 1px solid var(--line-2); }
.g-md h3:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.g-md h4 { font-size: 16.5px; margin: 18px 0 6px; }
.g-md h5 { font-size: 14.5px; margin: 14px 0 4px; font-family: var(--font); font-weight: 700; }
.g-md ul, .g-md ol { margin: 0 0 10px; padding-left: 22px; }
.g-md li { margin: 3px 0; }
.g-md li > ul, .g-md li > ol { margin: 4px 0 4px; }
.g-md code { font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 4px; padding: 0 4px; overflow-wrap: anywhere; }
.g-md .g-pre { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 6px; padding: 10px 12px; overflow: auto; font-size: 12.5px; }
.g-md .g-pre code { background: none; border: 0; padding: 0; }
.g-md a { color: var(--primary); }
.g-md .g-quote { margin: 0 0 10px; padding: 6px 12px; border-left: 3px solid var(--line); color: var(--ink-2, var(--muted)); }
.g-table-wrap { overflow-x: auto; margin: 4px 0 14px; }
.g-table { border-collapse: collapse; font-size: 13.5px; line-height: 1.5; min-width: 60%; }
.g-table th, .g-table td { border: 1px solid var(--line-2); padding: 6px 9px; text-align: left; vertical-align: top; }
.g-table th { background: var(--surface-2); font-weight: 600; }
.guide-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 26px; border-top: 1px solid var(--line-2); padding-top: 14px; }
.guide-pg { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 8px; text-decoration: none; color: var(--ink); }
.guide-pg:hover { border-color: var(--primary); }
.guide-pg.next { text-align: right; }
.guide-results { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.guide-result { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 8px; text-decoration: none; color: var(--ink); }
.guide-result:hover { border-color: var(--primary); }
.guide-result-title { display: flex; gap: 6px; align-items: baseline; font-weight: 600; flex-wrap: wrap; }
.guide-result-sec { font-weight: 500; color: var(--ink-2, var(--muted)); }
.guide-snippet { font-size: 13px; color: var(--ink-2, var(--muted)); line-height: 1.5; }
.guide-results mark, .guide-result mark { background: #fde68a; color: inherit; border-radius: 2px; padding: 0 1px; }
.guide-help-link { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--primary); text-decoration: none; white-space: nowrap; }
.guide-help-link:hover { text-decoration: underline; }
.guide-help-link svg { width: 15px; height: 15px; }
.guide-print-all { display: none; }
@media (max-width: 900px) {
  .guide { grid-template-columns: minmax(0, 1fr); }
  .guide-nav { display: none; position: static; max-height: none; }
  .guide.toc-open .guide-nav { display: block; }
  .guide-toc-btn { display: inline-flex; }
  .guide-doc { padding: 16px 14px 20px; }
  .guide-ch-title { font-size: 21px; }
  .g-md h3 { font-size: 18px; }
}
@media print {
  .shell:has(.guide) .sidebar, .shell:has(.guide) .topbar, .shell:has(.guide) .license-bar, .guide-nav, .guide-toc-btn, .guide-pager,
  .guide-head .actions, .guide-head p, .asst, .toast-wrap { display: none !important; }
  .shell:has(.guide) .content { padding: 0; }
  .guide { display: block; }
  .guide-doc { border: 0; padding: 0; }
  .g-md { max-width: none; font-size: 11pt; color: #000; }
  .g-md h3 { break-after: avoid; }
  .g-table th, .g-table td { border-color: #999; }
  .guide-open { display: none; }
  body.guide-printing-all > *:not(.guide-print-all) { display: none !important; }
  body.guide-printing-all { background: #fff; }
  body.guide-printing-all .guide-print-all { display: block; color: #000; }
  .guide-print-all > h1 { font-family: var(--font-title); font-size: 24pt; }
  .guide-print-ch { break-before: page; }
}
