/* LSR Chấm công — giao diện theo Frappe HR / frappe-ui (phông Inter, xám trung tính, nút đen, thẻ trắng viền mảnh).
   Trang nhân viên: khung điện thoại như app Frappe HR. Trang quản lý: thanh bên + danh sách như Frappe CRM/Desk. */
@font-face {
  font-family: "InterVar";
  font-weight: 100 900;
  font-display: swap;
  font-style: normal;
  src: url("fonts/Inter.var.woff2") format("woff2");
}
:root {
  --ink-9: #171717; --ink-8: #383838; --ink-7: #525252; --ink-6: #6b6b6b; --ink-5: #8f8f8f; --ink-4: #b4b4b4;
  --nen-0: #fff; --nen-1: #f8f8f8; --nen-2: #f3f3f3; --nen-3: #ededed; --nen-4: #e2e2e2; --nen-5: #c7c7c7;
  --vien-1: #ededed; --vien-2: #e2e2e2; --vien-3: #c7c7c7;
  --xanh-nen: #e4fae9; --xanh-chu: #137949; --xanh-dam: #278f5e;
  --do-nen: #fff0f0; --do-chu: #c92a2a; --do-dam: #e03636;
  --cam-nen: #fff7e5; --cam-chu: #a14c00;
  --lam-nen: #e6f4ff; --lam-chu: #0062bf;
  --bong-1: 0 1px 2px rgba(0,0,0,.06); --bong-2: 0 1px 3px rgba(0,0,0,.08), 0 2px 8px rgba(0,0,0,.05);
  --bong-3: 0 8px 24px rgba(0,0,0,.12), 0 2px 6px rgba(0,0,0,.06);
  --bo: 8px; --bo-lg: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--nen-1); color: var(--ink-8);
  font: 14px/1.45 "InterVar", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
a { color: inherit; }
h1, h2, h3 { color: var(--ink-9); margin: 0; letter-spacing: -.01em; }
h1 { font-size: 20px; font-weight: 600; }
h2 { font-size: 16px; font-weight: 600; }
h3 { font-size: 14px; font-weight: 600; }
p { margin: 0; }
code { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 12px; background: var(--nen-2); padding: 1px 5px; border-radius: 4px; }
.an { display: none !important; }
.phu-chu { color: var(--ink-5); }
.chu-nho { font-size: 13px; }
.chu-xs { font-size: 12px; }
.dam { font-weight: 600; color: var(--ink-9); }
.so { font-variant-numeric: tabular-nums; }
.ic { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.ic.to { width: 20px; height: 20px; }

.gia-lap { position: sticky; top: 0; z-index: 50; background: var(--cam-nen); color: var(--cam-chu); text-align: center;
  font-size: 12px; font-weight: 500; padding: 4px; }

/* ── nút ── */
.nut { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 28px; padding: 0 10px;
  border-radius: var(--bo); border: 1px solid transparent; font: inherit; font-size: 14px; font-weight: 500;
  line-height: 1; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background-color .12s, color .12s;
  background: var(--nen-2); color: var(--ink-8); }
.nut:hover { background: var(--nen-3); }
.nut.dac { background: var(--ink-9); color: #fff; }
.nut.dac:hover { background: var(--ink-8); }
.nut.vien { background: var(--nen-0); border-color: var(--vien-2); box-shadow: var(--bong-1); }
.nut.vien:hover { background: var(--nen-1); border-color: var(--vien-3); }
.nut.trong { background: transparent; }
.nut.trong:hover { background: var(--nen-2); }
.nut.do { background: var(--do-nen); color: var(--do-chu); }
.nut.do:hover { background: #ffe1e1; }
.nut.vua { height: 32px; padding: 0 12px; }
.nut.lon { height: 44px; padding: 0 16px; font-size: 15px; border-radius: 10px; }
.nut.rong { width: 100%; }
.nut:disabled { opacity: .55; cursor: wait; }
.nut:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--vien-3); outline-offset: 1px; }

/* ── ô nhập ── */
.o, input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select, textarea {
  font: inherit; font-size: 14px; color: var(--ink-8); background: var(--nen-2); border: 1px solid transparent;
  border-radius: var(--bo); height: 28px; padding: 0 8px; max-width: 100%; transition: background-color .12s, border-color .12s; }
textarea { height: auto; padding: 6px 8px; resize: vertical; min-height: 96px; }
input:hover, select:hover, textarea:hover { background: var(--nen-3); }
input:focus, select:focus, textarea:focus { background: var(--nen-0); border-color: var(--vien-3); outline: none; box-shadow: 0 0 0 2px var(--nen-3); }
input::placeholder, textarea::placeholder { color: var(--ink-4); }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--ink-9); margin: 0; }
.truong { display: flex; flex-direction: column; gap: 6px; }
.truong > span { font-size: 12px; color: var(--ink-6); font-weight: 500; }
.truong .goi-y { font-size: 12px; color: var(--ink-5); }
.hop-chon { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-8); }
.luoi-form { display: grid; gap: 14px; }
.luoi-form.hai { grid-template-columns: 1fr 1fr; }
.hang { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hang.giua { justify-content: center; }
.hang.hai-dau { justify-content: space-between; }
form { margin: 0; }
.trong-dong { display: inline-flex; }

/* ── nhãn ── */
.nhan { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 999px;
  font-size: 12px; font-weight: 500; background: var(--nen-2); color: var(--ink-7); white-space: nowrap; }
.nhan.xanh { background: var(--xanh-nen); color: var(--xanh-chu); }
.nhan.do { background: var(--do-nen); color: var(--do-chu); }
.nhan.cam { background: var(--cam-nen); color: var(--cam-chu); }
.nhan.lam { background: var(--lam-nen); color: var(--lam-chu); }
.cham-mau { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ── thông báo ── */
.bao { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: var(--bo); font-size: 13px;
  background: var(--nen-2); color: var(--ink-7); }
.bao .ic { margin-top: 1px; }
.bao.loi { background: var(--do-nen); color: var(--do-chu); }
.bao.dat { background: var(--xanh-nen); color: var(--xanh-chu); }
.bao.canh { background: var(--cam-nen); color: var(--cam-chu); }
.bao.tin { background: var(--lam-nen); color: var(--lam-chu); }

/* ── thẻ ── */
.the { background: var(--nen-0); border: 1px solid var(--vien-1); border-radius: var(--bo-lg); }
.the.dem { padding: 16px; }
.the-dau { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--vien-1); }
.the-than { padding: 16px; }

/* ═══════════════ NHÂN VIÊN (điện thoại, như app Frappe HR) ═══════════════ */
body.nv { background: var(--nen-2); }
.nv-khung { max-width: 420px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.nv-dau { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between;
  background: var(--nen-0); padding: 14px 16px; padding-top: max(14px, env(safe-area-inset-top)); box-shadow: var(--bong-1); }
.nv-dau h1 { font-size: 20px; font-weight: 700; }
.nv-dau .lui { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; color: var(--ink-9); }
.anh-dai-dien { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--nen-3); color: var(--ink-7); font-weight: 600; font-size: 13px; }
.nv-than { flex: 1; padding: 20px 16px 32px; display: flex; flex-direction: column; gap: 20px; }
.nv-the { background: var(--nen-0); border-radius: var(--bo); padding: 20px 16px; }
.nv-the h2 { font-size: 18px; font-weight: 700; }
.nv-the .phu { margin-top: 6px; font-size: 13px; font-weight: 500; color: var(--ink-5); }
.nv-the .phu a { text-decoration: underline; }
.nut-cham { margin-top: 16px; height: 48px; font-size: 15px; box-shadow: var(--bong-1); }
.nut-khac { margin-top: 8px; font-size: 13px; color: var(--ink-6); height: 32px; }
.nhom-tieu-de { font-size: 13px; font-weight: 600; color: var(--ink-6); margin: 0 0 8px 2px; }
.danh-sach { background: var(--nen-0); border-radius: var(--bo); overflow: hidden; }
.danh-sach > a, .danh-sach > .dong, .danh-sach > form > button {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; text-decoration: none; color: var(--ink-8);
  border: 0; border-bottom: 1px solid var(--vien-1); background: none; font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.danh-sach > :last-child, .danh-sach > form:last-child > button { border-bottom: 0; }
.danh-sach > a:active, .danh-sach > form > button:active { background: var(--nen-1); }
.danh-sach .bieu-tuong { width: 32px; height: 32px; border-radius: 8px; background: var(--nen-2); color: var(--ink-7);
  display: inline-flex; align-items: center; justify-content: center; flex: none; }
.danh-sach .noi { flex: 1; min-width: 0; }
.danh-sach .noi small { display: block; color: var(--ink-5); font-size: 12px; margin-top: 2px; }
.danh-sach .cuoi { color: var(--ink-4); }
.chi-so { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--nen-0); border-radius: var(--bo); }
.chi-so > div { padding: 14px 12px; border-right: 1px solid var(--vien-1); }
.chi-so > div:last-child { border-right: 0; }
.chi-so span { display: block; font-size: 12px; color: var(--ink-5); font-weight: 500; }
.chi-so b { display: block; margin-top: 4px; font-size: 15px; color: var(--ink-9); font-weight: 600; }
.chan-trang { text-align: center; font-size: 12px; color: var(--ink-5); }

/* tấm trượt từ dưới lên (như ion-modal của Frappe HR) */
.man-che { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.35); opacity: 0; transition: opacity .2s; }
.man-che.hien { opacity: 1; }
.tam { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-width: 420px; margin: 0 auto; background: var(--nen-0);
  border-radius: 16px 16px 0 0; box-shadow: var(--bong-3); padding: 10px 16px calc(20px + env(safe-area-inset-bottom));
  transform: translateY(100%); transition: transform .25s cubic-bezier(.2,.8,.2,1); max-height: 94dvh; overflow-y: auto; }
.tam.hien { transform: translateY(0); }
.tam .tay-cam { width: 36px; height: 4px; border-radius: 4px; background: var(--nen-4); margin: 0 auto 14px; }
.dong-ho { text-align: center; }
.dong-ho b { display: block; font-size: 28px; font-weight: 700; color: var(--ink-9); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.dong-ho span { font-size: 13px; color: var(--ink-5); font-weight: 500; }
.o-vi-tri { display: flex; align-items: center; gap: 10px; margin: 16px 0 12px; padding: 12px; border-radius: var(--bo);
  background: var(--nen-1); border: 1px solid var(--vien-1); font-size: 13px; }
.o-vi-tri .ic { color: var(--ink-6); }
.o-vi-tri.dat { background: var(--xanh-nen); border-color: transparent; color: var(--xanh-chu); }
.o-vi-tri.dat .ic { color: var(--xanh-chu); }
.o-vi-tri.loi { background: var(--do-nen); border-color: transparent; color: var(--do-chu); }
.o-vi-tri.loi .ic { color: var(--do-chu); }
.camera { position: relative; width: 100%; aspect-ratio: 3 / 4; max-height: 52dvh; background: #0b0b0b; border-radius: var(--bo-lg); overflow: hidden; }
.camera video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.khung-mat { position: absolute; left: 50%; top: 46%; width: 58%; aspect-ratio: 3 / 4; transform: translate(-50%, -50%);
  border: 2px solid rgba(255,255,255,.85); border-radius: 50%; box-shadow: 0 0 0 999px rgba(0,0,0,.28); pointer-events: none; }
.mui-ten { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.92); color: var(--ink-9); display: flex; align-items: center; justify-content: center; }
.mui-ten.trai { left: 12px; } .mui-ten.phai { right: 12px; }
.buoc-chup { display: flex; gap: 6px; justify-content: center; margin: 12px 0 6px; }
.buoc-chup i { width: 24px; height: 4px; border-radius: 4px; background: var(--nen-4); }
.buoc-chup i.xong { background: var(--ink-9); }
.huong-dan { text-align: center; font-size: 15px; font-weight: 500; color: var(--ink-9); margin: 6px 0 14px; min-height: 22px; }
.ket-qua { text-align: center; padding: 8px 0 4px; }
.ket-qua .vong { width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 12px; display: flex; align-items: center; justify-content: center; }
.ket-qua .vong .ic { width: 28px; height: 28px; stroke-width: 2.25; }
.ket-qua.dat .vong { background: var(--xanh-nen); color: var(--xanh-chu); }
.ket-qua.canh .vong { background: var(--cam-nen); color: var(--cam-chu); }
.ket-qua.loi .vong { background: var(--do-nen); color: var(--do-chu); }
.ket-qua h3 { font-size: 17px; }
.ket-qua p { margin-top: 6px; color: var(--ink-6); font-size: 14px; }
.gia-lap-vi-tri { font-size: 12px; color: var(--cam-chu); }
.gia-lap-vi-tri select { margin-top: 6px; width: 100%; }

/* trang đăng nhập / các bước */
.dang-nhap { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 24px 20px; gap: 24px; }
.thuong-hieu { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.thuong-hieu img { width: 52px; height: 52px; border-radius: 14px; }
.thuong-hieu h1 { font-size: 22px; font-weight: 700; }
.thuong-hieu p { color: var(--ink-6); font-size: 14px; max-width: 300px; }
.the-dang-nhap { background: var(--nen-0); border-radius: var(--bo-lg); padding: 20px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--bong-1); }
.buoc-so { display: flex; gap: 6px; }
.buoc-so i { flex: 1; height: 4px; border-radius: 4px; background: var(--nen-4); }
.buoc-so i.xong { background: var(--ink-9); }
.ds-y { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.ds-y li { display: flex; gap: 10px; font-size: 14px; color: var(--ink-7); }
.ds-y li .ic { margin-top: 2px; color: var(--ink-6); }
.ds-y b { color: var(--ink-9); font-weight: 600; }
.dong-lich-su { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--vien-1); }
.dong-lich-su:last-child { border-bottom: 0; }
.ngay-o { width: 44px; text-align: center; flex: none; }
.ngay-o b { display: block; font-size: 17px; color: var(--ink-9); line-height: 1.1; }
.ngay-o span { font-size: 11px; color: var(--ink-5); font-weight: 500; text-transform: uppercase; }
.dong-lich-su .noi { flex: 1; min-width: 0; }
.dong-lich-su .noi div { font-size: 14px; color: var(--ink-8); font-variant-numeric: tabular-nums; }
.dong-lich-su .noi small { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.dong-lich-su .gio { font-weight: 600; color: var(--ink-9); font-variant-numeric: tabular-nums; }

/* ═══════════════ QUẢN LÝ (máy tính, như Frappe CRM / Desk) ═══════════════ */
body.ql { background: var(--nen-0); }
.ql-khung { display: flex; min-height: 100vh; }
.ql-ben { width: 224px; flex: none; background: var(--nen-1); border-right: 1px solid var(--vien-1); display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; }
.gia-lap + .ql-khung .ql-ben { top: 24px; height: calc(100vh - 24px); }
.ql-app { display: flex; align-items: center; gap: 10px; padding: 12px 12px 10px; }
.ql-app img { width: 28px; height: 28px; border-radius: 7px; }
.ql-app b { display: block; font-size: 14px; color: var(--ink-9); font-weight: 600; line-height: 1.2; }
.ql-app small { display: block; font-size: 12px; color: var(--ink-5); }
.ql-menu { display: flex; flex-direction: column; gap: 1px; padding: 6px 8px; flex: 1; overflow-y: auto; }
.ql-menu .nhom { font-size: 12px; color: var(--ink-5); font-weight: 500; padding: 12px 8px 4px; }
.ql-menu a { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 8px; border-radius: 6px; text-decoration: none;
  font-size: 14px; color: var(--ink-7); }
.ql-menu a:hover { background: var(--nen-3); }
.ql-menu a.dang { background: var(--nen-0); color: var(--ink-9); font-weight: 500; box-shadow: var(--bong-1); }
.ql-menu a .ic { color: var(--ink-6); }
.ql-menu a .dem { margin-left: auto; font-size: 12px; background: var(--ink-9); color: #fff; border-radius: 999px; padding: 0 6px; line-height: 18px; }
.ql-nguoi { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--vien-1); }
.ql-nguoi .ten { flex: 1; min-width: 0; font-size: 13px; color: var(--ink-8); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ql-chinh { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ql-dau { position: sticky; top: 0; z-index: 5; height: 48px; flex: none; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 0 20px; border-bottom: 1px solid var(--vien-1); background: var(--nen-0); }
.gia-lap + .ql-khung .ql-dau { top: 24px; }
.vet { display: flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 600; color: var(--ink-9); min-width: 0; }
.vet a { color: var(--ink-5); text-decoration: none; font-weight: 500; }
.vet a:hover { color: var(--ink-8); }
.vet .ic { color: var(--ink-4); }
.ql-noi { padding: 20px; display: flex; flex-direction: column; gap: 20px; max-width: 1400px; width: 100%; }
.thanh-loc { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.thanh-loc .truong { flex-direction: row; align-items: center; gap: 6px; }

/* thẻ số liệu */
.so-lieu { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.so-lieu > div, .so-lieu > a { border: 1px solid var(--vien-1); border-radius: var(--bo-lg); padding: 14px 16px; text-decoration: none; background: var(--nen-0); }
.so-lieu > a:hover { border-color: var(--vien-2); box-shadow: var(--bong-1); }
.so-lieu span { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-6); }
.so-lieu b span { display: inline; }
.so-lieu b { display: block; margin-top: 6px; font-size: 24px; font-weight: 600; color: var(--ink-9); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

/* danh sách dạng bảng (ListView) */
.ds-bang { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.ds-bang thead th { position: sticky; top: 48px; z-index: 2; background: var(--nen-2); color: var(--ink-5); font-weight: 400; font-size: 13px;
  text-align: left; height: 30px; padding: 0 10px; white-space: nowrap; }
.ds-bang thead th:first-child { border-radius: var(--bo) 0 0 var(--bo); }
.ds-bang thead th:last-child { border-radius: 0 var(--bo) var(--bo) 0; }
.ds-bang tbody td { height: 42px; padding: 6px 10px; border-bottom: 1px solid var(--vien-1); color: var(--ink-8); vertical-align: middle; }
.ds-bang tbody tr:hover td { background: var(--nen-1); }
.ds-bang tbody tr.mo td { color: var(--ink-5); }
.ds-bang tbody tr.gach td:not(:last-child) { text-decoration: line-through; color: var(--ink-5); }
.ds-bang td.phai, .ds-bang th.phai { text-align: right; }
.ds-bang td.so, .ds-bang th.so { font-variant-numeric: tabular-nums; }
.ds-bang .ten-dong { display: flex; align-items: center; gap: 10px; }
.ds-bang .ten-dong a { color: var(--ink-9); text-decoration: none; font-weight: 500; }
.ds-bang .ten-dong a:hover { text-decoration: underline; }
.ds-bang .ten-dong small { display: block; color: var(--ink-5); font-size: 12px; }
.ds-bang .thao-tac { display: flex; gap: 4px; justify-content: flex-end; flex-wrap: wrap; }
.ds-bang td.trong-rong { text-align: center; color: var(--ink-5); height: 96px; }
.ds-bang td.ma { font-family: ui-monospace, Consolas, monospace; font-size: 12px; color: var(--ink-6); max-width: 360px; word-break: break-word; }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--nen-3); color: var(--ink-7); flex: none;
  display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; }
.tieu-de-muc { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.tieu-de-muc p { color: var(--ink-5); font-size: 13px; }
details.gap > summary { list-style: none; cursor: pointer; }
details.gap > summary::-webkit-details-marker { display: none; }
details.gap > summary .ic.mo-ra { transition: transform .15s; }
details.gap[open] > summary .ic.mo-ra { transform: rotate(90deg); }

/* lịch ca */
.cuon-ngang { overflow-x: auto; border: 1px solid var(--vien-1); border-radius: var(--bo-lg); }
.bang-lich { border-collapse: separate; border-spacing: 0; font-size: 13px; min-width: 100%; }
.bang-lich th, .bang-lich td { border-bottom: 1px solid var(--vien-1); border-right: 1px solid var(--vien-1); padding: 4px; text-align: center; white-space: nowrap; }
.bang-lich thead th { background: var(--nen-1); color: var(--ink-6); font-weight: 500; height: 44px; line-height: 1.25; }
.bang-lich thead th span { display: block; font-size: 11px; color: var(--ink-5); font-weight: 400; }
.bang-lich .dinh { position: sticky; left: 0; z-index: 1; background: var(--nen-0); text-align: left; padding: 4px 12px; min-width: 180px; font-weight: 500; color: var(--ink-9); }
.bang-lich thead .dinh { background: var(--nen-1); }
.bang-lich .hom-nay { background: #fafafa; }
.bang-lich thead .hom-nay { color: var(--ink-9); box-shadow: inset 0 -2px 0 var(--ink-9); }
.bang-lich thead .cuoi-tuan { color: var(--do-chu); }
.bang-lich select { height: 26px; font-size: 12px; padding: 0 4px; background: transparent; width: 100%; min-width: 84px; }
.bang-lich select.co { background: var(--nen-2); color: var(--ink-9); font-weight: 500; }
.bang-lich tr:last-child td { border-bottom: 0; }
.bang-lich td:last-child, .bang-lich th:last-child { border-right: 0; }

/* hộp thoại */
dialog { border: 0; padding: 0; border-radius: var(--bo-lg); box-shadow: var(--bong-3); width: min(520px, calc(100vw - 32px)); color: var(--ink-8); }
dialog::backdrop { background: rgba(0,0,0,.3); }
.hop-dau { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 0; }
.hop-dau h2 { font-size: 18px; }
.hop-than { padding: 16px 20px; }
.hop-chan { display: flex; justify-content: flex-end; gap: 8px; padding: 0 20px 18px; }

/* ảnh */
.luoi-anh { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.luoi-anh figure { margin: 0; border: 1px solid var(--vien-1); border-radius: var(--bo-lg); overflow: hidden; background: var(--nen-0); }
.luoi-anh img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; background: var(--nen-2); }
.luoi-anh figcaption { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.anh-nho { display: flex; gap: 4px; }
.anh-nho img { width: 36px; height: 48px; object-fit: cover; border-radius: 6px; border: 1px solid var(--vien-1); display: block; }
.anh-mau-lon img { width: 120px; height: 160px; object-fit: cover; border-radius: var(--bo); border: 1px solid var(--vien-1); }
.dong-thong-tin { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0; border: 1px solid var(--vien-1); border-radius: var(--bo-lg); }
.dong-thong-tin > div { padding: 12px 16px; border-right: 1px solid var(--vien-1); }
.dong-thong-tin > div:last-child { border-right: 0; }
.dong-thong-tin span { display: block; font-size: 12px; color: var(--ink-5); }
.dong-thong-tin b { display: block; margin-top: 4px; font-size: 15px; color: var(--ink-9); font-weight: 600; font-variant-numeric: tabular-nums; }
.hai-cot { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }

@media (max-width: 900px) {
  .ql-khung { flex-direction: column; }
  .ql-ben { position: static; width: 100%; height: auto; border-right: 0; border-bottom: 1px solid var(--vien-1); }
  .ql-menu { flex-direction: row; flex-wrap: wrap; flex: none; }
  .ql-menu .nhom { display: none; }
  .ql-nguoi { display: none; }
  .ql-dau, .gia-lap + .ql-khung .ql-dau { position: static; }
  .ds-bang thead th { top: 0; }
  .hai-cot, .luoi-form.hai { grid-template-columns: 1fr; }
  .ql-noi { padding: 14px; }
}
