/* Giao diện Trasesco App quản lý: ngôn ngữ Liquid Glass.
   Màu Sếp chọn (đặc tả mục 10): #335577 chính, #D12D1A cảnh báo, #FCC800 nhắc nhở,
   #FFFFFF nền, #000000 chữ, #BFBFBF viền; thêm 20/11/2026: #00B050 xanh lá (hoàn thành, đạt),
   #7030A0 tím (tên đăng nhập cán bộ). Các sắc độ khác đều pha từ sáu màu này.
   Người dùng chỉnh độ trong suốt (--glass-a) và phủ màu (--tint, --tint-a) ở nút Giao diện trên thanh trên. */
:root {
  --blue: #335577; --blue-rgb: 51, 85, 119; --blue-dark: #223B54; --blue-soft: rgba(51, 85, 119, .12);
  --red: #D12D1A; --red-rgb: 209, 45, 26; --red-dark: #A3200F; --red-soft: rgba(209, 45, 26, .12);
  --yellow: #FCC800; --yellow-rgb: 252, 200, 0; --yellow-dark: #5C4700; --yellow-soft: rgba(252, 200, 0, .22);
  --white: #FFFFFF; --black: #000000; --gray: #BFBFBF;
  --green: #00B050; --green-rgb: 0, 176, 80; --green-soft: rgba(0, 176, 80, .14); --green-text: #007A38;
  --purple: #7030A0; --purple-rgb: 112, 48, 160;

  --primary: var(--blue); --primary-dark: var(--blue-dark); --primary-soft: var(--blue-soft);
  --danger: var(--red); --danger-soft: var(--red-soft); --danger-text: var(--red-dark);
  --warn: var(--yellow); --warn-soft: var(--yellow-soft); --warn-text: var(--yellow-dark);
  --ok-soft: var(--green-soft); --ok-text: var(--green-text);

  --text: #0B1622; --text-2: #34465A; --text-3: #5E6E80;
  --line: rgba(191, 191, 191, .55); --line-2: rgba(191, 191, 191, .32); --locked: var(--gray);

  /* Kính: người dùng chỉnh */
  --glass-a: .57; --tint: 255, 255, 255; --tint-a: 0;
  --glass-bg: linear-gradient(rgba(var(--tint), var(--tint-a)), rgba(var(--tint), var(--tint-a))), rgba(255, 255, 255, var(--glass-a));
  --glass-blur: blur(26px) saturate(185%);
  --glass-edge: rgba(255, 255, 255, .75);
  --glass-shadow: 0 1px 0 rgba(255, 255, 255, .85) inset, 0 -1px 0 rgba(var(--blue-rgb), .06) inset,
                  0 10px 30px -12px rgba(var(--blue-rgb), .28), 0 2px 6px -2px rgba(0, 0, 0, .06);

  --radius: 12px; --radius-lg: 20px;
  --font: "Be Vietnam Pro", "Hiragino Sans", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
}
/* Tăng tương phản: kính đặc hơn, chữ đen tuyền, viền rõ */
.hc { --glass-a: .9 !important; --text: #000; --text-2: #1C2A38; --text-3: #3A4756; --line: rgba(0, 0, 0, .28); --line-2: rgba(0, 0, 0, .16); }
.hc .blob { opacity: .35; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--text); font: 14px/1.6 var(--font); background: #EEF2F7; min-height: 100vh; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.ti { font-size: 18px; line-height: 1; vertical-align: -3px; }
[hidden] { display: none !important; }

/* ---------- Nền: các khối màu thương hiệu để kính khúc xạ ---------- */
.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background: radial-gradient(1200px 800px at 85% -10%, rgba(var(--blue-rgb), .20), transparent 60%),
              radial-gradient(900px 700px at -10% 110%, rgba(var(--blue-rgb), .16), transparent 60%),
              linear-gradient(160deg, #F6F8FB 0%, #EAF0F6 55%, #F3F1EA 100%); }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; }
.blob.b1 { width: 520px; height: 520px; left: -140px; top: -120px; background: rgba(var(--blue-rgb), .55); }
.blob.b2 { width: 420px; height: 420px; right: -80px; top: 18%; background: rgba(var(--yellow-rgb), .45); }
.blob.b3 { width: 360px; height: 360px; left: 38%; bottom: -160px; background: rgba(var(--red-rgb), .28); }
.blob.b4 { width: 300px; height: 300px; left: 18%; top: 40%; background: rgba(var(--blue-rgb), .25); }

/* ---------- Kính ---------- */
.glass, .card, .stat, .modal, .tabs, .look-panel {
  background: linear-gradient(rgba(var(--tint), var(--tint-a)), rgba(var(--tint), var(--tint-a))), rgba(255, 255, 255, var(--glass-a)); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-edge); box-shadow: var(--glass-shadow); position: relative; }
/* Vệt sáng phản chiếu ở mép trên: ánh sáng đi cùng một hướng trên mọi tấm kính */
.card::before, .stat::before, .modal::before, .sidebar::before, .look-panel::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(165deg, rgba(255, 255, 255, .55) 0%, rgba(255, 255, 255, .08) 32%, transparent 55%); }
.card > *, .stat > * { position: relative; }

/* ---------- Khung trang ---------- */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; gap: 0; }
.sidebar { margin: 12px 0 12px 12px; border-radius: 24px; padding: 18px 12px; position: sticky; top: 12px;
  height: calc(100vh - 24px); overflow-y: auto; display: flex; flex-direction: column; z-index: 6; }
.brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px 18px; color: var(--red); font-weight: 700; font-size: 16px; letter-spacing: .06em; }
.brand:hover { text-decoration: none; }
.brand-logo { width: 38px; height: 38px; border-radius: 50%; flex: none; box-shadow: 0 4px 12px -3px rgba(var(--red-rgb), .5), 0 0 0 2px rgba(255, 255, 255, .9); }
.brand small { display: block; font-size: 11px; font-weight: 500; color: var(--text-3); line-height: 1.2; letter-spacing: 0; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: 11px; color: var(--text-3); padding: 14px 10px 6px; letter-spacing: .04em; text-transform: uppercase; font-weight: 600; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 6px 10px 6px 6px; border-radius: 14px; color: var(--text-2); font-weight: 500;
  border: 1px solid transparent; background: none; font: inherit; font-weight: 500; cursor: pointer; width: 100%; text-align: left; transition: background .15s, box-shadow .15s; }
.nav-item:hover { background: rgba(255, 255, 255, .55); color: var(--text); text-decoration: none; }
.nav-item.on { background: rgba(255, 255, 255, .85); color: var(--blue); font-weight: 600; border-color: rgba(255, 255, 255, .95);
  box-shadow: 0 1px 0 #fff inset, 0 6px 16px -8px rgba(var(--blue-rgb), .45); }
.nav-item.on::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--yellow); margin-left: auto; box-shadow: 0 0 0 3px rgba(var(--yellow-rgb), .25); }
.nav-item .count { margin-left: auto; }
.nav-item.on .count + ::after, .nav-item.on:has(.count)::after { display: none; }
.sidebar-foot { margin-top: auto; padding-top: 16px; }
.sidebar-foot form { margin: 0; }

/* Biểu tượng kiểu ứng dụng: ô kính màu, có vệt sáng và bóng đổ */
.app-icon { width: 32px; height: 32px; border-radius: 10px; flex: none; display: inline-flex; align-items: center; justify-content: center; color: #fff; position: relative;
  background: linear-gradient(145deg, var(--c1), var(--c2)); box-shadow: 0 1px 0 rgba(255, 255, 255, .55) inset, 0 -2px 4px rgba(0, 0, 0, .12) inset, 0 4px 10px -4px var(--c2); }
.app-icon::before { content: ""; position: absolute; inset: 1px 1px 50% 1px; border-radius: 9px 9px 14px 14px / 9px 9px 8px 8px; background: linear-gradient(rgba(255, 255, 255, .5), rgba(255, 255, 255, .05)); }
.app-icon .ti { font-size: 18px; vertical-align: 0; position: relative; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25)); }
.app-icon.blue { --c1: #5A7DA0; --c2: #335577; }
.app-icon.navy { --c1: #335577; --c2: #1A2E42; }
.app-icon.red { --c1: #EA5A45; --c2: #D12D1A; }
.app-icon.yellow { --c1: #FFDD55; --c2: #E0B000; color: #000; }
.app-icon.yellow .ti { filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .6)); }
.app-icon.slate { --c1: #7E95AD; --c2: #4A6683; }
.app-icon.gray { --c1: #D6D6D6; --c2: #9C9C9C; color: #000; }
.app-icon.gray .ti { filter: none; }
.app-icon.lg { width: 56px; height: 56px; border-radius: 16px; }
.app-icon.lg .ti { font-size: 30px; }
.app-icon.ho_so_noi { --c1: #7E95AD; --c2: #4A6683; } .app-icon.ho_so_ngoai { --c1: #5A7DA0; --c2: #335577; }
.app-icon.visa, .app-icon.phat_sinh { --c1: #EA5A45; --c2: #D12D1A; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin: 12px 16px 6px; border-radius: 20px; position: sticky; top: 12px; z-index: 8; }
.search { flex: 1; max-width: 560px; position: relative; }
.search .ti { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.search input { width: 100%; height: 40px; border: 1px solid rgba(255, 255, 255, .9); border-radius: 14px; background: rgba(255, 255, 255, .7); padding: 0 12px 0 40px; font: inherit; color: var(--text);
  box-shadow: 0 1px 2px rgba(var(--blue-rgb), .12) inset; }
.search input:focus { outline: 3px solid rgba(var(--blue-rgb), .2); border-color: var(--blue); background: #fff; }
.inline-search { max-width: 300px; margin-left: auto; }
.inline-search input { height: 36px; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn { position: relative; width: 40px; height: 40px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; color: var(--text-2); background: transparent; border: 1px solid transparent; cursor: pointer; }
.icon-btn:hover { background: rgba(255, 255, 255, .7); border-color: rgba(255, 255, 255, .95); text-decoration: none; color: var(--blue); }
.icon-btn .ti { font-size: 20px; vertical-align: 0; }
.icon-btn .dot { position: absolute; top: 5px; right: 5px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; line-height: 17px; text-align: center; box-shadow: 0 0 0 2px #fff; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 4px; border-radius: 14px; }
.user-chip .who { line-height: 1.25; }
.user-chip .who b { display: block; font-size: 13px; font-weight: 600; }
.user-chip .who span { font-size: 11px; color: var(--text-3); }
.menu-btn { display: none; }
.content { padding: 14px 28px 56px; max-width: 1320px; width: 100%; }

/* ---------- Bảng điều khiển giao diện ---------- */
.look { position: relative; }
.look-panel { position: absolute; right: 0; top: 48px; width: 290px; border-radius: 20px; padding: 16px; z-index: 40; display: flex; flex-direction: column; gap: 14px;
  --glass-a: .97; --tint-a: 0; box-shadow: var(--glass-shadow), 0 24px 48px -16px rgba(26, 46, 66, .45); }
.look-panel > * { position: relative; }
.look-title { font-weight: 600; display: flex; gap: 8px; align-items: center; color: var(--blue); }
.look-row { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); }
.look-row > span { display: flex; justify-content: space-between; }
.look-row b { color: var(--text); font-weight: 600; }
.look input[type=range] { width: 100%; accent-color: var(--blue); }
.swatches { display: flex; gap: 8px; }
.sw { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; cursor: pointer; box-shadow: 0 0 0 1px var(--gray), 0 3px 8px -3px rgba(0, 0, 0, .3); }
.sw.on { box-shadow: 0 0 0 2px var(--black), 0 3px 8px -3px rgba(0, 0, 0, .3); }
.sw.none { background: conic-gradient(#fff 0 25%, #E9EDF2 0 50%, #fff 0 75%, #E9EDF2 0) 0 0 / 10px 10px; }
.sw.blue { background: var(--blue); } .sw.red { background: var(--red); } .sw.yellow { background: var(--yellow); } .sw.gray { background: var(--gray); } .sw.green { background: var(--green); }
.look-switch { display: flex; gap: 9px; align-items: center; font-size: 13px; cursor: pointer; }

/* ---------- Chữ ---------- */
h1 { font-size: 24px; font-weight: 700; margin: 0 0 4px; letter-spacing: -.015em; color: var(--black); }
h2 { font-size: 15px; font-weight: 600; margin: 0 0 12px; color: var(--black); }
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 6px 0 20px; }
.page-head .sub { color: var(--text-2); font-size: 13px; }
.page-head .actions { margin: 0 0 0 auto; }
.muted { color: var(--text-3); font-size: 12.5px; }
.jp, .jp-text { color: var(--text-2); font-weight: 400; }
.pre { white-space: normal; }

/* ---------- Thẻ, lưới ---------- */
.card { border-radius: var(--radius-lg); padding: 20px 22px; margin-bottom: 16px; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.card-head .link { margin-left: auto; font-size: 13px; font-weight: 500; }
.row { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.row > .col { flex: 1 1 340px; min-width: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { border-radius: var(--radius-lg); padding: 14px 16px 14px 16px; color: var(--text); display: block; overflow: hidden; transition: transform .15s, box-shadow .15s; }
a.stat:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--glass-shadow), 0 16px 30px -18px rgba(var(--blue-rgb), .55); }
.stat .label { font-size: 12.5px; color: var(--text-2); display: flex; align-items: center; gap: 7px; font-weight: 500; }
.stat .num { font-size: 28px; font-weight: 700; color: var(--blue); line-height: 1.25; margin-top: 4px; letter-spacing: -.02em; }
.stat::after { content: ""; position: absolute; right: -24px; top: -24px; width: 86px; height: 86px; border-radius: 50%; background: var(--accent, rgba(var(--blue-rgb), .14)); }
.stat.tone-blue { --accent: rgba(var(--blue-rgb), .18); }
.stat.tone-yellow { --accent: rgba(var(--yellow-rgb), .45); }
.stat.tone-red { --accent: rgba(var(--red-rgb), .2); }
.stat.tone-red .num { color: var(--red); }
.stat.tone-gray { --accent: rgba(191, 191, 191, .45); }
.stat.tone-navy { --accent: rgba(26, 46, 66, .2); }
.stat .label .ti { width: 26px; height: 26px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; vertical-align: 0; color: #fff; background: var(--blue); }
.stat.tone-yellow .label .ti { background: var(--yellow); color: #000; }
.stat.tone-red .label .ti { background: var(--red); }
.stat.tone-gray .label .ti { background: var(--gray); color: #000; }
.stat.tone-navy .label .ti { background: #1A2E42; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 18px; }

/* ---------- Tab ---------- */
.tabs { display: flex; gap: 4px; align-items: center; padding: 5px; border-radius: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.tab { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 12px; color: var(--text-2); font-weight: 500; }
.tab:hover { background: rgba(255, 255, 255, .6); text-decoration: none; }
.tab.on { background: var(--blue); color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 6px 14px -6px rgba(var(--blue-rgb), .7); }
.tab.on .count.soft { background: rgba(255, 255, 255, .25); color: #fff; }
.tabs .inline-search { margin: 0 0 0 auto; }

/* ---------- Bảng, danh sách ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
th { font-size: 11.5px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .03em; border-bottom: 1px solid var(--line); white-space: nowrap; }
table tr:hover td { background: rgba(255, 255, 255, .55); }
tr:last-child td { border-bottom: 0; }
.overdue td { background: rgba(var(--red-rgb), .06); }
.list-item { display: flex; align-items: center; gap: 12px; padding: 11px 6px; border-top: 1px solid var(--line-2); border-radius: 10px; }
.list-item:first-child { border-top: 0; }
a.list-item:hover { background: rgba(255, 255, 255, .55); text-decoration: none; }
.list-item .grow { flex: 1; min-width: 0; }
.date-box { width: 46px; text-align: center; line-height: 1.15; flex: none; padding: 6px 0; border-radius: 12px; background: rgba(255, 255, 255, .75); border: 1px solid #fff; box-shadow: 0 3px 8px -4px rgba(var(--blue-rgb), .4); }
.date-box b { display: block; font-size: 17px; color: var(--red); }
.date-box span { font-size: 10.5px; color: var(--text-2); font-weight: 600; }
.empty { color: var(--text-3); text-align: center; padding: 22px 0; }
.empty .ti { display: block; font-size: 30px; margin: 0 auto 6px; color: var(--gray); }

/* ---------- Người: avatar ---------- */
.avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(145deg, #5A7DA0, var(--blue)); color: #fff; font-weight: 600; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; flex: none; object-fit: cover;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .9), 0 3px 8px -3px rgba(var(--blue-rgb), .6); }
.avatar.lg { width: 64px; height: 64px; font-size: 20px; }
.person { display: flex; align-items: center; gap: 10px; }
.person b { font-weight: 600; display: block; }
.person .muted { display: block; line-height: 1.3; }

/* ---------- Hồ sơ: đầu trang và tiến trình ---------- */
.profile-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.profile-head .info { flex: 1; min-width: 220px; }
.profile-head h1 { margin: 0; }
.profile-head .meta { color: var(--text-2); font-size: 13px; display: flex; gap: 6px 14px; flex-wrap: wrap; margin-top: 2px; }
.profile-head .date-box { width: 64px; padding: 10px 0; }
.profile-head .date-box b { font-size: 24px; }
.photo-frame { width: 72px; height: 96px; border-radius: 12px; object-fit: cover; border: 2px solid #fff; box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .4); }
.steps { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin-top: 18px; }
.step { font-size: 12px; color: var(--text-3); text-align: center; }
.step::before { content: ""; display: block; height: 7px; border-radius: 4px; background: rgba(191, 191, 191, .5); margin-bottom: 7px; }
.step.done { color: var(--text-2); }
.step.done::before { background: linear-gradient(90deg, #5A7DA0, var(--blue)); }
.step.now { color: var(--black); font-weight: 600; }
.step.now::before { background: var(--yellow); box-shadow: 0 0 0 3px rgba(var(--yellow-rgb), .3); }
.kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 14px; margin: 0; }
.kv dt { color: var(--text-3); font-size: 13px; }
.kv dd { margin: 0; }
.photo { width: 120px; border-radius: 12px; border: 2px solid #fff; box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .4); }

/* ---------- Nút ---------- */
.btn { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 17px; border-radius: 13px; border: 1px solid rgba(255, 255, 255, .25); color: #fff; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap;
  background: linear-gradient(180deg, #46698C, var(--blue) 55%, #2B4A69);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 -1px 0 rgba(0, 0, 0, .15) inset, 0 8px 18px -8px rgba(var(--blue-rgb), .8); transition: transform .1s, filter .15s; }
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.secondary { background: rgba(255, 255, 255, .72); color: var(--text); border-color: rgba(255, 255, 255, .95); box-shadow: 0 1px 0 #fff inset, 0 4px 12px -6px rgba(var(--blue-rgb), .35); }
.btn.secondary:hover { color: var(--blue); background: #fff; filter: none; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--blue); box-shadow: none; }
.btn.ghost:hover { background: rgba(255, 255, 255, .6); }
.btn.danger { background: linear-gradient(180deg, #E5503C, var(--red) 55%, #B52412); box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 8px 18px -8px rgba(var(--red-rgb), .8); }
.btn.warn { background: linear-gradient(180deg, #FFDB4D, var(--yellow)); color: #000; box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 8px 18px -8px rgba(var(--yellow-rgb), .9); }
.btn.small { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 11px; }
.btn:disabled { background: #F2F3F5; border-color: var(--gray); color: #6B7280; cursor: not-allowed; box-shadow: none; filter: none; }
.btn .ti { font-size: 17px; vertical-align: 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 4px 0 18px; }
.actions form { margin: 0; display: flex; gap: 8px; align-items: center; }
.sticky-actions { position: sticky; bottom: 12px; z-index: 5; padding: 10px; border-radius: 18px; background: rgba(255, 255, 255, var(--glass-a)); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-edge); box-shadow: var(--glass-shadow); }

/* ---------- Nhãn ---------- */
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 20px; font-size: 11.5px; font-weight: 600; background: rgba(191, 191, 191, .35); color: var(--text-2); white-space: nowrap; border: 1px solid rgba(255, 255, 255, .7); }
.tag.ok { background: var(--ok-soft); color: var(--ok-text); }
.tag.info { background: var(--blue-soft); color: var(--blue); }
.tag.warn { background: var(--yellow); color: #000; }
.tag.danger { background: var(--red); color: #fff; }
.count { background: var(--yellow); color: #000; border-radius: 10px; padding: 0 7px; font-size: 11px; font-weight: 700; line-height: 19px; box-shadow: 0 2px 6px -2px rgba(var(--yellow-rgb), .9); }
.count.soft { background: rgba(var(--blue-rgb), .12); color: var(--blue); box-shadow: none; }

/* ---------- Thông báo ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; border-radius: 14px; padding: 11px 14px; margin-bottom: 14px; font-size: 13.5px;
  background: rgba(var(--blue-rgb), .1); color: var(--blue-dark); border: 1px solid rgba(var(--blue-rgb), .18); border-left: 4px solid var(--blue); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.alert.error { background: rgba(var(--red-rgb), .09); color: var(--red-dark); border-color: rgba(var(--red-rgb), .2); border-left-color: var(--red); }
.alert.warning { background: rgba(var(--yellow-rgb), .2); color: var(--yellow-dark); border-color: rgba(var(--yellow-rgb), .45); border-left-color: var(--yellow); }
.alert.success { background: var(--ok-soft); color: var(--ok-text); border-color: rgba(var(--green-rgb), .3); border-left-color: var(--ok-text); }
.alert.info { background: rgba(var(--blue-rgb), .1); }

/* ---------- Form ---------- */
.input, select.input, textarea.input { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid rgba(191, 191, 191, .8); border-radius: 12px; font: inherit; background: rgba(255, 255, 255, .78); color: var(--text);
  box-shadow: 0 1px 2px rgba(var(--blue-rgb), .1) inset; }
textarea.input { min-height: 80px; resize: vertical; }
.input.small { width: 96px; }
.input:focus { outline: 3px solid rgba(var(--blue-rgb), .18); border-color: var(--blue); background: #fff; }
.input:disabled { background: rgba(191, 191, 191, .18); color: var(--text-2); }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; margin-bottom: 5px; font-size: 13px; color: var(--text); }
.field .help { color: var(--text-3); font-size: 12px; margin-top: 4px; }
.field .err, .errorlist { color: var(--red-dark); font-size: 12.5px; margin: 4px 0 0; padding: 0; list-style: none; font-weight: 500; }
.req { color: var(--red); }
.radio-inline > div { display: flex; gap: 10px; flex-wrap: wrap; }
.radio-inline > div > div label { display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(191, 191, 191, .8); border-radius: 13px; padding: 9px 16px; font-weight: 500; cursor: pointer; margin: 0; background: rgba(255, 255, 255, .7); }
.radio-inline > div > div label:has(input:checked) { border-color: var(--blue); background: rgba(255, 255, 255, .95); color: var(--blue); font-weight: 600; box-shadow: 0 0 0 3px rgba(var(--blue-rgb), .15), 0 6px 14px -8px rgba(var(--blue-rgb), .6); }
.radio-inline input[type=radio] { accent-color: var(--blue); width: 16px; height: 16px; margin: 0; }
input[type=checkbox] { accent-color: var(--blue); width: 16px; height: 16px; vertical-align: -3px; }
input[type=file].input { padding: 7px; }
.formset-row { background: rgba(255, 255, 255, .45); border: 1px solid rgba(255, 255, 255, .85); border-radius: 14px; padding: 14px 14px 2px; margin-bottom: 10px; }
.formset-row .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.checks { list-style: none; padding: 0; margin: 0 0 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 6px; }
.checks label { display: flex; gap: 9px; align-items: center; padding: 9px 11px; border: 1px solid rgba(191, 191, 191, .7); border-radius: 12px; cursor: pointer; background: rgba(255, 255, 255, .6); }
.checks label:has(input:checked) { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(var(--blue-rgb), .14); }
.section-title { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 10px; margin: 0 0 14px; color: var(--black); }
.section-title .num { width: 28px; height: 28px; border-radius: 9px; background: linear-gradient(145deg, #5A7DA0, var(--blue)); color: #fff; font-size: 13px; display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .4) inset, 0 4px 10px -4px rgba(var(--blue-rgb), .8); }

/* ---------- Ảnh học viên: hướng dẫn chụp ---------- */
.photo-guide { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 14px; }
.photo-demo { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); flex: none; }
.guide-list { list-style: none; margin: 0; padding: 0; flex: 1 1 280px; display: flex; flex-direction: column; gap: 9px; }
.guide-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--text-2); }
.guide-list li .ti { flex: none; width: 28px; height: 28px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: rgba(var(--yellow-rgb), .3); color: #000; font-size: 16px; vertical-align: 0; }
.guide-list b { color: var(--text); }
.photo-pick { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.photo-pick .field { flex: 1 1 260px; }
.photo-preview { width: 96px; height: 128px; object-fit: cover; border-radius: 12px; border: 2px solid #fff; box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .45); }

/* ---------- Hộp thoại ---------- */
.modal { width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 48px); border-radius: 24px; padding: 20px 22px; color: var(--text); --glass-a: .86; }
.modal > form { position: relative; display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - 90px); }
.modal::backdrop { background: rgba(26, 46, 66, .35); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.modal-head { display: flex; align-items: flex-start; gap: 12px; justify-content: space-between; }
.modal-head h2 { margin: 0 0 2px; }
.modal-search { max-width: none; flex: none; }
.cand-list { overflow-y: auto; max-height: 46vh; padding: 2px; margin: 0; }
.modal-foot { display: flex; gap: 8px; justify-content: space-between; flex-wrap: wrap; padding-top: 4px; }

/* ---------- Trang đang xây dựng ---------- */
.soon { display: flex; gap: 18px; align-items: center; }
.soon h2 { margin-bottom: 4px; }

/* ---------- Trang công khai: đăng nhập, học viên khai ---------- */
.public { min-height: 100vh; }
.public-top { padding: 10px 16px; margin: 12px auto 0; max-width: 712px; border-radius: 20px; display: flex; align-items: center; }
.public-top .brand { padding: 0; }
.public-top .look { margin-left: auto; }
.narrow { max-width: 712px; margin: 0 auto; padding: 22px 16px 60px; }
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.auth .card { width: 100%; max-width: 410px; padding: 30px 30px 26px; border-radius: 28px; --glass-a: .62; }
.auth-logo { display: block; width: 150px; margin: 0 auto 18px; }
.auth h1 { text-align: center; }
.auth .lead { text-align: center; margin: 0 0 22px; }
.consent { background: rgba(255, 255, 255, .5); border: 1px solid rgba(255, 255, 255, .85); border-radius: 14px; padding: 12px 16px; font-size: 13px; color: var(--text-2); margin-bottom: 14px; }
.btn.block { width: 100%; justify-content: center; height: 48px; font-size: 15px; border-radius: 15px; }

/* Trình duyệt không có hiệu ứng kính: dùng nền trắng đặc để chữ vẫn rõ */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass, .card, .stat, .modal, .tabs, .look-panel, .sticky-actions { background: #fff; }
}
@media (prefers-reduced-transparency: reduce) {
  :root { --glass-a: .95; }
}

/* ---------- Điện thoại ---------- */
.scrim { display: none; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; height: auto; width: 270px; margin: 8px; z-index: 30; transform: translateX(-110%); transition: transform .22s ease; --glass-a: .9; }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(26, 46, 66, .35); z-index: 20; }
  .menu-btn { display: inline-flex; }
  .topbar { margin: 8px 8px 4px; padding: 8px 10px; top: 8px; }
  .user-chip .who { display: none; }
  .content { padding: 8px 16px 48px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 12px; }
  .page-head .actions { margin-left: 0; }
  .hide-sm { display: none; }
  .person b { word-break: normal; }
  .look-panel { position: fixed; right: 8px; left: 8px; top: 70px; width: auto; }
  .tabs .inline-search { flex: 1 1 100%; max-width: none; }
  .blob { filter: blur(50px); }
}

/* ---------- Hồ sơ: bảng kiểm giấy tờ ---------- */
.progress { display: inline-block; width: 120px; height: 8px; border-radius: 4px; background: rgba(191, 191, 191, .45); overflow: hidden; vertical-align: middle; box-shadow: 0 1px 1px rgba(0, 0, 0, .08) inset; }
.progress > span { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #5A7DA0, var(--blue)); }
.progress.lg { width: 180px; height: 10px; }
.card-head .progress { margin-left: auto; }
.doc-table td { vertical-align: top; }
.doc-table td:nth-child(2) { min-width: 220px; }
/* Số thứ tự giấy tờ: cột hẹp, căn giữa, giống nhau ở mọi bảng (Hồ sơ nội, Hồ sơ ngoại, Visa) */
.doc-table .doc-no { width: 44px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text-2); }
/* Tên hai dòng: tiếng Nhật trên, tiếng Việt dưới (giống ô chọn Công ty tiếp nhận) */
.tl-1 { display: block; font-weight: 600; line-height: 1.35; color: var(--text); }
.tl-2 { display: block; font-size: 12.5px; color: var(--text-3); line-height: 1.3; }
.doc-table .input { min-height: 34px; padding: 5px 9px; font-size: 13px; }
.doc-table .status-select { min-width: 118px; }
.input.tiny { width: 56px; text-align: center; }
.doc-actions { white-space: nowrap; text-align: right; }
.doc-actions .btn { margin-left: 4px; }
.doc-warn { margin: 6px 0 0; padding: 6px 10px 6px 26px; font-size: 12px; color: var(--yellow-dark); background: rgba(var(--yellow-rgb), .18); border-radius: 10px; border-left: 3px solid var(--yellow); }
tr.st-da_tao td:first-child { box-shadow: 3px 0 0 var(--yellow) inset; }
tr.st-da_ky td:first-child { box-shadow: 3px 0 0 var(--blue) inset; }
tr.st-da_nop td:first-child { box-shadow: 3px 0 0 var(--green-text) inset; }
tr.st-khong td { opacity: .55; }
.tag.soft { background: rgba(191, 191, 191, .3); }
.milestones { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0 16px; }
.passed { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 14px; }
a.tag:hover { text-decoration: none; filter: brightness(.97); }
.status-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.status-pill .ti { font-size: 15px; vertical-align: 0; }
.status-pill.chua { background: rgba(var(--red-rgb), .1); color: var(--red-dark); }
.status-pill.da_tao { background: rgba(var(--yellow-rgb), .3); color: #000; }
.status-pill.da_co { background: var(--green-soft); color: var(--green-text); }
tr.inactive td { opacity: .5; }
.doc-actions form { display: inline; margin: 0; }
.doc-actions label.btn { margin-left: 4px; }
tr.st-da_tao td:first-child { box-shadow: 3px 0 0 var(--yellow) inset; }
tr.st-da_co td:first-child { box-shadow: 3px 0 0 var(--green-text) inset; }
tr.st-chua td:first-child { box-shadow: 3px 0 0 rgba(var(--red-rgb), .55) inset; }
.tattoo-box { background: rgba(255,255,255,.5); border: 1px dashed var(--gray); border-radius: 14px; padding: 12px 14px 2px; margin-bottom: 12px; }

/* ---------- Thông tin còn thiếu: luôn đỏ để cán bộ nhận ra ngay ---------- */
.missing, .empty.missing { color: var(--red) !important; font-weight: 600; }
.status-pill.da_tao { background: var(--green-soft); color: var(--green-text); }
tr.st-da_tao td:first-child { box-shadow: 3px 0 0 var(--green-text) inset; }

/* ---------- Ô chọn hai dòng: tiếng Nhật trên, phiên âm dưới ---------- */
.pick { position: relative; }
.pick-btn { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; cursor: pointer; min-height: 52px; padding-top: 6px; padding-bottom: 6px; }
.pick-btn .pick-txt { flex: 1; min-width: 0; }
.pick-btn .ti { color: var(--text-3); }
.pick-l1 { display: block; font-weight: 600; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-l2 { display: block; font-size: 12.5px; color: var(--text-3); line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-empty { color: var(--text-3); }
.pick-pop { position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 40px -16px rgba(var(--blue-rgb), .45); padding: 8px; }
.pick-pop input { width: 100%; margin-bottom: 6px; }
.pick-list { max-height: 320px; overflow: auto; }
.pick-opt { padding: 7px 10px; border-radius: 10px; cursor: pointer; }
.pick-opt:hover, .pick-opt.act { background: var(--blue-soft); }
.pick-opt.sel .pick-l1 { color: var(--blue); }
.pick-none { padding: 10px; color: var(--text-3); font-size: 13px; }
/* Mục không bắt buộc (nếu có): không tô đỏ */
tr.st-chua.opt td:first-child { box-shadow: 3px 0 0 var(--gray) inset; }
tr.st-chua.opt td:first-child > b { color: inherit; }
tr.st-chua.opt .status-pill.chua { background: rgba(191, 191, 191, .35); color: var(--text-2); }

/* =====================================================================
   Quy chuẩn chữ và màu (Sếp chốt 18/11/2026)
   Tiêu đề chính: IN HOA có dấu, nền hơi khác. Mục con: chữ thường, cùng một bộ màu.
   Chưa có: vàng (còn thời gian), đỏ (đã quá hạn hoặc gấp).
   ===================================================================== */
h1 { text-transform: uppercase; letter-spacing: .01em; font-size: 22px; }
.card-head, .card > h2:first-child, .section-title {
  text-transform: uppercase; letter-spacing: .02em; font-size: 14px; font-weight: 700; color: var(--blue-dark);
  background: linear-gradient(90deg, rgba(var(--blue-rgb), .11), rgba(var(--blue-rgb), .03));
  border-radius: 12px; padding: 9px 12px; margin: -6px -8px 14px; }
.card-head h2 { font-size: 14px; font-weight: 700; color: var(--blue-dark); }
.card-head .muted, .card-head .count, .card-head input, .card-head select, .card-head .btn { text-transform: none; letter-spacing: 0; }
.section-title .num { text-transform: none; }
/* Mục con trong bảng giấy tờ: chữ thường, không đậm, một màu */
.doc-table td:nth-child(2) > b { font-weight: 500; color: var(--text); }

/* Trạng thái chưa có: vàng là còn thời gian, đỏ là gấp */
.status-pill.chua { background: var(--yellow); color: #000; }
.urgent .status-pill.chua, .status-pill.chua.urgent { background: var(--red); color: #fff; }
tr.st-chua td:first-child { box-shadow: 3px 0 0 var(--yellow) inset; }
.urgent tr.st-chua td:first-child { box-shadow: 3px 0 0 var(--red) inset; }

/* Khung HỒ SƠ CÒN THIẾU / CẦN BỔ SUNG: chữ đỏ, nền vàng, danh sách đánh số chia cột */
.alert.missing { display: block; background: rgba(var(--yellow-rgb), .32); color: var(--red); border: 1px solid rgba(var(--yellow-rgb), .8); border-left: 4px solid var(--red); padding: 12px 16px 10px; }
.alert.missing .missing-title { font-weight: 700; text-transform: uppercase; letter-spacing: .02em; margin-bottom: 6px; display: flex; gap: 8px; align-items: center; }
.alert.missing .missing-title small { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--text-2); }
.alert.missing ol, .alert.missing .missing-list { margin: 0; padding-left: 0; list-style: none; columns: 3 200px; column-gap: 28px; color: var(--red); font-weight: 400; }
.alert.missing li { break-inside: avoid; padding: 1px 0; }
.alert.missing .missing-sub { font-weight: 600; margin: 8px 0 4px; color: var(--red-dark); }
.alert.missing.calm { border-left-color: var(--yellow); }
.ok-text { color: var(--green-text); font-weight: 600; }
.warn-text { color: var(--yellow-dark); font-weight: 600; }
.stat.tone-green .num { color: var(--green-text); }
.score-grid th, .score-grid td { padding: 6px 4px; text-align: center; }
.score-grid td:first-child, .score-grid th:first-child { text-align: left; white-space: nowrap; }
.score-grid .input { min-width: 46px; padding: 6px 4px; text-align: center; min-height: 34px; }
.alert.missing .missing-sub { text-transform: uppercase; font-size: 12px; letter-spacing: .02em; }
.alert.missing .missing-list + .missing-sub { margin-top: 10px; }
/* Chữ cái nhóm (A, B, C, D) cùng kiểu ô số mục của Cửa sổ khai thông tin */
h2.grp { display: flex; align-items: center; gap: 10px; }
h2.grp .num { width: 28px; height: 28px; border-radius: 9px; background: linear-gradient(145deg, #5A7DA0, var(--blue)); color: #fff; font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; box-shadow: 0 4px 10px -4px rgba(var(--blue-rgb), .7); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; }
.filters .input { width: auto; min-height: 36px; max-width: 280px; }
.filters .pick { width: 280px; max-width: 100%; }
.filters .pick-btn { width: 100%; max-width: none; }
.report-chart { color: var(--text); display: block; max-width: 100%; height: auto; }

/* ---------- Dashboard Làm báo cáo (thẻ A, B, C) ---------- */
.dash-filters { padding: 12px 14px; }
.dash-filters .filters { margin: 0; }
.dash-date { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }
.dash-date .input { width: auto; }
.dash-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(var(--blue-rgb), .12); color: var(--blue); font-size: 13px; font-weight: 500; }
.chip:hover { background: rgba(var(--red-rgb), .12); color: var(--red); text-decoration: none; }
.dash-kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.dash-kpis .num { font-size: 26px; }
.delta { display: block; font-size: 12px; font-weight: 600; margin-top: 2px; }
.delta.up { color: var(--green-text); }
.delta.down { color: var(--red); }
.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.dash-grid .span2 { grid-column: span 2; }
.dash-grid .card { margin-bottom: 0; }
.dash-grid + .card, .card + .dash-grid { margin-top: 14px; }
.chart { height: 280px; width: 100%; }
.chart.tall { height: 360px; }
@media (max-width: 860px) { .dash-grid { grid-template-columns: 1fr; } .dash-grid .span2 { grid-column: auto; } }

/* Ô chọn hai dòng đang mở: đưa khung chứa nó lên trên các thẻ phía sau (thẻ kính tạo lớp chồng riêng nên che mất danh sách) */
.card:has(.pick-pop:not([hidden])), .filters:has(.pick-pop:not([hidden])), form:has(.pick-pop:not([hidden])) { position: relative; z-index: 35; }
.card.pick-open, form.pick-open { position: relative; z-index: 35; }

/* Bảng phân quyền mục menu */
.perm-matrix th.perm-col { vertical-align: bottom; text-align: center; padding: 6px 4px; min-width: 52px; }
.perm-matrix th.perm-col span { display: inline-block; writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; font-size: 12px; }
.perm-matrix td.perm-col { text-align: center; }
.perm-matrix td.perm-col input { width: 18px; height: 18px; accent-color: var(--blue); cursor: pointer; }
.perm-matrix td.perm-col .ti { color: var(--green-text); }
.perm-matrix td:first-child { min-width: 170px; }

/* Ảnh chân dung: tình trạng sửa ảnh theo prompt */
.photo-col { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.photo-ai { font-size: 11.5px; color: var(--text-3); text-align: center; max-width: 130px; line-height: 1.3; }
.photo-ai.da_sua { color: var(--green-text); }
.photo-ai.loi { color: var(--red); font-weight: 600; }
.photo-ai.cho { color: var(--blue); }
.photo-ai-actions { display: flex; gap: 8px; font-size: 11.5px; flex-wrap: wrap; justify-content: center; }
.photo-ai-actions a, .linklike { background: none; border: 0; padding: 0; color: var(--blue); cursor: pointer; font: inherit; display: inline-flex; align-items: center; gap: 2px; }

/* Tên đăng nhập cán bộ: tím #7030A0 */
.login-name { color: var(--purple); font-weight: 600; }
/* Gửi khách giấy đòi tiền PQL */
.mail-view { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: rgba(255, 255, 255, .6); display: grid; gap: 4px; }
.mail-body { white-space: pre-wrap; font-family: inherit; margin: 8px 0 0; padding-top: 8px; border-top: 1px dashed var(--line); line-height: 1.6; }
#mail-edit .field span, .send-plan .field > span { display: block; font-weight: 600; font-size: 13px; margin-bottom: 5px; }
.send-plan { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.send-plan .field { margin: 0; }
.send-plan fieldset { border: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.send-plan .radio { display: inline-flex; gap: 6px; align-items: center; font-weight: 500; }
.send-plan .radio input { accent-color: var(--blue); }
/* Phát sinh */
.incident-form .span-all { grid-column: 1 / -1; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
.chips .tag { text-decoration: none; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; margin: 0; }
.kv dt { color: var(--text-3); } .kv dd { margin: 0; }
.log-form { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.log-form .input[name=text], .log-form .input[name=result] { flex: 1 1 260px; }
.file-list { list-style: none; padding: 0; margin: 0 0 6px; display: grid; gap: 4px; }
.inline-search.filters select { width: auto; min-height: 34px; }
@media (max-width: 640px) { .kv { grid-template-columns: 1fr; } }
/* Thanh lọc dưới các thẻ: ô chọn và ô tìm tách riêng, không chồng lên nhau */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 0 0 14px; }
.filter-bar > select, .filter-bar .fb-pick { width: auto; min-width: 180px; }
.filter-bar .input { min-height: 38px; }
.filter-bar .search { flex: 1 1 220px; max-width: 360px; margin-left: auto; }
.incident-form .span-half { grid-column: span 2; }
@media (max-width: 640px) { .incident-form .span-half { grid-column: 1 / -1; } }
/* Nút đỏ, vùng xóa */
.danger-zone { border-left: 4px solid var(--red); }
.test-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
/* Chuyển tiếng Nhật: hai cột Việt | Nhật */
.ja-table td { vertical-align: top; }
.ja-table td .input { width: 100%; }
.ja-table td .tag, .ja-table td .missing { display: inline-block; margin-top: 4px; font-size: 12px; }
.ja-trio { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 6px; }
@media (max-width: 640px) { .ja-trio { grid-template-columns: 1fr; } }

/* =====================================================================
   Làm mới kiểu iOS (Sếp yêu cầu 20/11/2026). Giữ quy chuẩn 18/11: tiêu đề IN HOA trên dải màu,
   ô số / chữ cái, cột STT. Thay đổi: ô nhập cao 44px nền xám nhạt như iOS, nút bo tròn,
   thẻ chọn kiểu segmented, bảng thoáng, menu đang chọn tô nền, khoảng cách đều.
   ===================================================================== */
:root { --fill: rgba(118, 118, 128, .10); --fill-2: rgba(118, 118, 128, .16); --radius-lg: 24px; --ctl-h: 44px; }
body { font-size: 14.5px; letter-spacing: -.003em; }
h1 { font-size: 26px; font-weight: 800; letter-spacing: .005em; }
.page-head { margin: 8px 0 22px; align-items: center; }
.page-head .sub { font-size: 13.5px; max-width: 900px; line-height: 1.55; }

/* Thẻ kính */
.card { padding: 22px 24px; margin-bottom: 18px; }
.card-head, .card > h2:first-child, .section-title { border-radius: 14px; padding: 10px 14px; margin: -8px -10px 16px; min-height: 44px; }
.section-title .num { width: 30px; height: 30px; border-radius: 10px; box-shadow: 0 4px 10px -4px rgba(var(--blue-rgb), .7); }

/* Ô nhập, ô chọn, ô chọn hai dòng: cùng chiều cao, cùng nền */
.input, select.input, textarea.input, .pick-btn {
  min-height: var(--ctl-h); border-radius: 12px; border: 1px solid transparent; background: var(--fill);
  padding: 10px 14px; font-size: 14.5px; transition: background .15s, box-shadow .15s, border-color .15s; }
.input:hover, .pick-btn:hover { background: var(--fill-2); }
.input:focus, .pick-btn:focus { outline: none; background: #fff; border-color: rgba(var(--blue-rgb), .55); box-shadow: 0 0 0 4px rgba(var(--blue-rgb), .14); }
textarea.input { min-height: 96px; line-height: 1.55; }
select.input { appearance: none; -webkit-appearance: none; padding-right: 38px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235E6E80' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 9l4-4 4 4'/%3E%3Cpath d='M16 15l-4 4-4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
select.input:focus { background-color: #fff; }
.pick-btn { padding-top: 5px; padding-bottom: 5px; }
.pick-btn .pick-l2 { font-size: 12px; }
.input.small { min-height: 36px; }
.doc-table .input, .score-grid .input { min-height: 34px; }
.field { margin-bottom: 16px; }
.field label, #mail-edit .field span, .send-plan .field > span { font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.grid { gap: 2px 18px; align-items: start; }
.field .help { font-size: 12px; }
input[type=checkbox], input[type=radio] { accent-color: var(--blue); }

/* Nút: bo tròn như iOS */
.btn { height: 42px; padding: 0 20px; border-radius: 999px; font-weight: 600; letter-spacing: -.005em; transition: filter .15s, transform .1s, background .15s; }
.btn.small { height: 34px; padding: 0 14px; border-radius: 999px; }
.btn.secondary { background: var(--fill); border-color: transparent; box-shadow: none; color: var(--blue-dark); }
.btn.secondary:hover { background: var(--fill-2); color: var(--blue); }
.btn.ghost:hover { background: var(--fill); }
.icon-btn { border-radius: 999px; }
.icon-btn:hover { background: var(--fill); }

/* Thẻ chọn: segmented control */
.tabs { padding: 4px; gap: 2px; border-radius: 14px; background: var(--fill); box-shadow: none; border: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
.tab { padding: 7px 16px; border-radius: 10px; font-weight: 600; color: var(--text-2); transition: background .15s, color .15s; }
.tab:hover { background: rgba(255, 255, 255, .5); }
.tab.on { background: #fff; color: var(--blue-dark); box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 4px 12px -6px rgba(var(--blue-rgb), .45); }
.tab.on .count.soft { background: var(--blue); color: #fff; }

/* Bảng: thoáng, đường kẻ thụt vào kiểu danh sách iOS */
th, td { padding: 13px 12px; }
th { font-size: 11.5px; letter-spacing: .04em; background: transparent; }
td { border-bottom: 0; background-image: linear-gradient(var(--line-2), var(--line-2)); background-repeat: no-repeat; background-size: calc(100% - 12px) 1px; background-position: right bottom; }
tr:last-child td { background-image: none; }
table tr:hover td { background-color: rgba(var(--blue-rgb), .045); }
th.stt, td.stt { width: 48px; text-align: center; color: var(--text-3); font-variant-numeric: tabular-nums; }
td.stt { font-weight: 600; }

/* Menu bên trái: mục đang chọn tô nền xanh nhạt */
.nav-item { padding: 6px 10px 6px 6px; border-radius: 12px; }
.nav-item.on { background: rgba(var(--blue-rgb), .12); color: var(--blue-dark); border-color: transparent; box-shadow: none; }
.nav-item.on::after { display: none; }

/* Ô thống kê, nhãn, thanh lọc */
.stat { padding: 16px 18px; }
.stat .num { font-size: 30px; }
.tag { border-radius: 999px; padding: 3px 10px; }
.filter-bar { gap: 10px; }
.filter-bar > select.input { min-width: 170px; width: auto; }
.chips .tag { padding: 5px 12px; font-size: 12.5px; }
.alert { border-radius: 14px; }

/* Phát sinh: ba ô trên một hàng cho nghiệp đoàn, công ty, chương trình */
.incident-form .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.incident-form .span-half { grid-column: span 1; }
@media (max-width: 900px) { .incident-form .grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .incident-form .grid { grid-template-columns: 1fr; } }
.filter-bar .fb-pick .pick-btn { min-width: 200px; }
@media (max-width: 640px) {
  .filter-bar > select.input, .filter-bar .fb-pick, .filter-bar .search { flex: 1 1 100%; max-width: none; min-width: 0; margin: 0; }
  .filter-bar .fb-pick .pick-btn { width: 100%; }
  .tabs { width: 100%; }
}
select[data-all] ~ .pick-btn .pick-empty { color: var(--text); }
/* Ô khoá (lấy theo dữ liệu khác, không sửa tại đây) */
.input:disabled, .pick-btn:disabled { background: rgba(191, 191, 191, .22); color: var(--text-2); cursor: not-allowed; }
.field.locked label::after { content: " · tự điền"; color: var(--text-3); font-weight: 500; }
