:root {
  --nen: #faf9f7;
  --the: #ffffff;
  --muc: #1c1c1a;
  --muc-mo: #75746e;
  --muc-nhat: #a8a69f;
  --vien: #e8e6e1;
  --vien-dam: #d6d3cb;
  --chinh: #a9822a;
  --chinh-dam: #8a6a1e;
  --chinh-nhat: #f8f2e3;
  --den: #1a1a18;
  --den-2: #222220;
  --den-3: #2b2b28;
  --moi: #8f8d86;
  --dang-lam: #3a63a8;
  --cho-duyet: #a9822a;
  --lam-lai: #b8483f;
  --hoan-thanh: #3f7d55;
  --huy: #a8a69f;
  --bk: 12px;
  --bk-n: 9px;
  --bong: 0 1px 3px rgba(28,28,26,.04), 0 4px 12px rgba(28,28,26,.025);
  --sidebar: 244px;
}

/* HỆ THỐNG ICON VECTOR ĐỒNG BỘ */
.ic {
  display: inline-block;
  width: 1.15em;
  height: 1.15em;
  vertical-align: -0.18em;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
}
.nut .ic { width: 16px; height: 16px; vertical-align: 0; }
.nut--nho .ic { width: 14px; height: 14px; }
.nut--lon .ic { width: 19px; height: 19px; }
/* Cỡ icon nhỏ dùng chung (đặt sau .nut .ic để luôn thắng) */
.ic.ic--sm { width: 14px; height: 14px; }
.ic.ic--xs { width: 12px; height: 12px; }
.canh-bao-nho > .ic:first-child { vertical-align: -2px; margin-right: 3px; color: var(--cho-duyet); }

/* Nút quay lại trang trước (thân thiện cảm ứng trên điện thoại) */
.quay-lai {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 8px;
  padding: 5px 11px 5px 8px;
  border-radius: 999px;
  border: 1px solid var(--vien);
  background: #fff;
  color: var(--muc-mo);
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.2;
  transition: .14s ease;
  box-shadow: 0 1px 2px rgba(28,28,26,.03);
}
.quay-lai:hover { color: var(--muc); border-color: var(--vien-dam); background: #fdfcfb; }
.quay-lai .ic { width: 14px; height: 14px; vertical-align: 0; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muc);
  background: var(--nen);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
img { max-width: 100%; }
h1,h2,h3,p { margin-top: 0; }
h1 { margin-bottom: 6px; font-size: clamp(1.4rem, 1.8vw, 1.7rem); font-weight: 700; line-height: 1.25; letter-spacing: -.02em; }
h2 { margin-bottom: 4px; font-size: 1rem; font-weight: 700; letter-spacing: -.01em; }
h3 { margin-bottom: 6px; font-size: .9rem; font-weight: 700; }
:focus-visible { outline: 2px solid rgba(169,130,42,.4); outline-offset: 2px; }

/* APP SHELL */
.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 60;
  width: var(--sidebar); height: 100vh;
  display: flex; flex-direction: column;
  background: var(--den); color: #f2f2f0;
  border-right: 1px solid rgba(255,255,255,.05);
}
.sidebar-brand { min-height: 66px; display:flex; align-items:center; justify-content:space-between; padding: 0 18px; border-bottom:1px solid rgba(255,255,255,.07); }
.brand-lockup { display:flex; align-items:center; gap:10px; }
.brand-mark { width:30px; height:30px; border-radius:7px; border:1px solid rgba(169,130,42,.55); color:var(--chinh); display:grid; place-items:center; font-weight:700; font-size:.95rem; }
.brand-copy { display:flex; flex-direction:column; line-height:1.05; }
.brand-copy strong { letter-spacing:.1em; font-size:.86rem; font-weight:700; }
.brand-copy small { color:#6f6e69; font-size:.58rem; letter-spacing:.13em; margin-top:4px; }
.sidebar-close { display:none; border:0; background:transparent; color:#f2f2f0; font-size:1.6rem; line-height:1; cursor:pointer; }
.side-nav { padding: 16px 10px; overflow-y:auto; }
.side-nav-label { padding: 4px 10px 8px; font-size:.63rem; color:#68675f; font-weight:700; text-transform:uppercase; letter-spacing:.12em; }
.side-nav-label--spaced { margin-top:18px; }
.side-link { display:flex; align-items:center; gap:11px; min-height:38px; padding:8px 10px; margin-bottom:2px; border-radius:8px; color:#b3b2ac; font-weight:500; font-size:.87rem; border-left:2px solid transparent; transition:.14s ease; }
.side-link:hover { color:#f2f2f0; background:rgba(255,255,255,.025); }
.side-link.active { color:#f2f2f0; font-weight:600; border-left-color:var(--chinh); background:rgba(255,255,255,.05); }
.side-icon { width:20px; height:20px; display:inline-grid; place-items:center; font-size:.95rem; opacity:.85; flex-shrink:0; }
.side-icon .ic { width:17px; height:17px; vertical-align:0; }
.side-link.active .side-icon { opacity:1; color:var(--chinh); }

.app-main { min-height:100vh; margin-left:var(--sidebar); }
.topbar { position:sticky; top:0; z-index:40; min-height:60px; display:flex; align-items:center; justify-content:space-between; padding:0 28px; background:rgba(250,249,247,.9); backdrop-filter: blur(10px); border-bottom:1px solid var(--vien); }
.menu-button, .topbar-brand-mobile { display:none; }
a.topbar-brand-mobile { color:inherit; text-decoration:none; -webkit-tap-highlight-color:transparent; }
.topbar-right { margin-left:auto; display:flex; align-items:center; gap:16px; }
.topbar-user { display:flex; flex-direction:column; line-height:1.25; text-align:left; }
.topbar-user strong { font-size:.82rem; font-weight:600; }
.topbar-user small { font-size:.7rem; color:var(--muc-mo); }
.topbar-logout { padding:6px 10px; border:1px solid transparent; border-radius:7px; font-size:.76rem; font-weight:600; color:var(--muc-mo); background:transparent; }
.topbar-logout:hover { border-color:var(--vien); color:var(--muc); background:#fff; }

.tai-khoan-menu { position:relative; }
.tai-khoan-nut { display:flex; align-items:center; gap:10px; background:transparent; border:1px solid transparent; cursor:pointer; padding:6px 10px 6px 6px; border-radius:12px; transition:.15s ease; }
.tai-khoan-nut:hover { background:var(--nen); border-color:var(--vien); }
.tai-khoan-avatar { width:32px; height:32px; border-radius:50%; background:var(--chinh); color:#fff; display:grid; place-items:center; font-weight:700; font-size:.85rem; flex:0 0 auto; }
.tai-khoan-chevron { font-size:.68rem; color:var(--muc-nhat); transition:transform .15s ease; }
.tai-khoan-menu.mo .tai-khoan-chevron { transform:rotate(180deg); }
.tai-khoan-dropdown { position:absolute; top:calc(100% + 8px); right:0; background:#fff; border:1px solid var(--vien); border-radius:var(--bk-n); box-shadow:var(--bong); min-width:180px; padding:6px; display:none; z-index:60; }
.tai-khoan-menu.mo .tai-khoan-dropdown { display:block; }
.tai-khoan-dropdown a { display:block; padding:9px 12px; border-radius:8px; color:var(--muc); font-size:.85rem; font-weight:600; text-decoration:none; }
.tai-khoan-dropdown a:hover { background:var(--nen); }
.content-wrap { width:100%; max-width:1360px; margin:0 auto; padding:30px 32px 52px; }

/* PAGE COMMON */
.page-head { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin-bottom:22px; }

/* Banner chào ở Dashboard */
.chao-mung-the {
  position:relative; overflow:hidden; border-radius:var(--bk); margin-bottom:22px;
  padding:26px 28px; background:linear-gradient(120deg, #fff 38%, #f3e0bd 100%);
  border:1px solid var(--vien);
}
.chao-mung-noi-dung { position:relative; z-index:2; max-width:66%; }
.chao-mung-the h1 { margin-bottom:6px; }
.chao-mung-phu { color:var(--muc-mo); font-size:.92rem; margin-bottom:10px; }
.chao-mung-meta { color:var(--muc-mo); font-size:.8rem; }
.chao-mung-trang-tri { position:absolute; inset:0; z-index:1; pointer-events:none; }
.chao-mung-mat-troi { position:absolute; right:58px; top:16px; width:58px; height:58px; opacity:.95; }
.chao-mung-chim { position:absolute; right:18px; bottom:16px; width:130px; height:44px; color:#b98f4e; opacity:.65; }
@media (max-width:680px) {
  .chao-mung-the { padding:18px 16px; }
  .chao-mung-noi-dung { max-width:82%; }
  .chao-mung-mat-troi { right:14px; top:12px; width:42px; height:42px; opacity:.85; }
  .chao-mung-chim { right:10px; bottom:10px; width:92px; height:32px; opacity:.45; }
}
.page-head-copy p { color:var(--muc-mo); margin-bottom:0; font-size:.85rem; }
.page-actions { display:flex; flex-wrap:wrap; gap:8px; }
.tieu-khu { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:26px 0 12px; }
.tieu-khu:first-child { margin-top:0; }
.tieu-khu h1,.tieu-khu h2 { margin:0; }
.dem { display:inline-flex; align-items:center; justify-content:center; min-width:24px; height:22px; padding:0 8px; border:1px solid var(--vien); border-radius:999px; background:transparent; color:var(--muc-mo); font-size:.7rem; font-weight:600; }

/* CARDS */
.the { background:var(--the); border:1px solid var(--vien); border-radius:var(--bk); box-shadow:var(--bong); padding:18px; margin-bottom:14px; }
.the--khong-dem { padding:0; overflow:hidden; }
.the > :last-child { margin-bottom:0; }
.card-title-row { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }

/* DASHBOARD */
.dashboard-hero { background:var(--the); border:1px solid var(--vien); box-shadow:var(--bong); }
.dashboard-hero .subtle { color:var(--muc-mo); }
.dashboard-grid { display:grid; grid-template-columns: repeat(auto-fit,minmax(200px,1fr)); gap:12px; margin-bottom:22px; }
.stat-card { background:#fff; border:1px solid var(--vien); border-radius:var(--bk); padding:16px; box-shadow:var(--bong); }
.stat-card-label { font-size:.72rem; color:var(--muc-mo); font-weight:600; }
.stat-card-value { margin-top:8px; font-size:1.55rem; font-weight:700; letter-spacing:-.03em; }
.stat-card-note { margin-top:3px; font-size:.7rem; color:var(--muc-nhat); }

.stat-card--lienket { display:flex; align-items:center; gap:14px; text-decoration:none; color:inherit; transition:.15s ease; }
.stat-card--lienket:hover { border-color:var(--chinh-dam); box-shadow:0 4px 14px rgba(0,0,0,.06); transform:translateY(-1px); }
button.stat-card { appearance:none; -webkit-appearance:none; font:inherit; cursor:pointer; text-align:left; width:100%; }
.stat-card-icon { width:42px; height:42px; border-radius:12px; display:grid; place-items:center; font-size:1.1rem; flex:0 0 auto; }
.stat-card-icon .ic { width:20px; height:20px; vertical-align:0; }
.stat-card-icon--xanh { background:#e8f0fe; color:#3b6fe0; }
.stat-card-icon--luc { background:#e5f7ec; color:#1f9d55; }
.stat-card-icon--cam { background:#fdeee0; color:#d3762a; }
.stat-card-icon--tim { background:#f0eafb; color:#7c5cd6; }
.stat-card-noi-dung { flex:1; min-width:0; }
.stat-card-mui-ten { color:var(--muc-nhat); font-size:1.1rem; flex:0 0 auto; display:inline-grid; place-items:center; }
.stat-card-mui-ten .ic { width:16px; height:16px; vertical-align:0; }

/* Trợ lý AI — thẻ hợp nhất: header + gợi ý + khung chat + ô nhập */
.tro-ly-the { background:#fff; border:1px solid var(--vien); border-radius:var(--bk); padding:20px; margin-bottom:22px; position:relative; }
.tro-ly-dau { display:flex; align-items:flex-start; gap:14px; margin-bottom:16px; }
.tro-ly-avatar { width:44px; height:44px; border-radius:50%; background:#e8f0fe; color:#3b6fe0; display:grid; place-items:center; font-size:1.3rem; flex:0 0 auto; }
.tro-ly-tieu-de { display:flex; flex-direction:column; gap:2px; min-width:0; }
.tro-ly-tieu-de strong { font-size:1rem; font-weight:800; }
.tro-ly-tieu-de span { font-size:.82rem; color:var(--muc-mo); }
.tro-ly-dang-go::after { content:'▍'; display:inline-block; margin-left:2px; color:var(--chinh-dam); animation:tro-ly-nhay .9s steps(1) infinite; }
@keyframes tro-ly-nhay { 50% { opacity:0; } }
.tro-ly-lap-lanh { margin-left:auto; color:var(--chinh); font-size:1.15rem; opacity:.7; flex:0 0 auto; }

.tro-ly-goi-y-hang { display:flex; flex-wrap:wrap; gap:10px; margin-bottom:16px; }
.tro-ly-goi-y-nut { display:flex; align-items:center; gap:8px; padding:10px 14px; border-radius:12px; border:1px solid var(--vien); background:#fafafa; font-size:.83rem; font-weight:600; color:var(--muc); cursor:pointer; transition:.15s ease; }
.tro-ly-goi-y-nut:hover { border-color:var(--chinh-dam); background:var(--chinh-nhat); }

.tro-ly-khung { display:flex; flex-direction:column; gap:8px; overflow-y:auto; margin-bottom:14px; }
.tro-ly-khung[hidden] { display:none; }

.tro-ly-form { display:flex; align-items:center; gap:10px; border:1px solid var(--vien); border-radius:12px; padding:6px 6px 6px 14px; background:#fafafa; }
.tro-ly-form-icon { color:var(--chinh); font-size:.95rem; }
.tro-ly-form input { flex:1; border:0; background:transparent; padding:8px 0; font-size:.88rem; }
.tro-ly-form input:focus { outline:none; }

/* TASK CARDS (danh sách dạng hàng — dùng ở Dashboard) */
.viec { position:relative; display:block; background:#fff; border:1px solid var(--vien); border-radius:var(--bk-n); padding:13px 15px 13px 17px; margin-bottom:8px; color:var(--muc); box-shadow:none; transition:.14s ease; overflow:hidden; }
.viec:hover { border-color:var(--vien-dam); background:#fdfcfb; }
.viec::before { content:""; position:absolute; left:0; top:0; bottom:0; width:3px; background:var(--moi); }
.viec[data-tt="dang_lam"]::before{background:var(--dang-lam)}
.viec[data-tt="cho_duyet"]::before{background:var(--cho-duyet)}
.viec[data-tt="lam_lai"]::before{background:var(--lam-lai)}
.viec[data-tt="hoan_thanh"]::before{background:var(--hoan-thanh)}
.viec[data-tt="huy"]::before{background:var(--huy)}
.viec-dau { display:flex; align-items:center; gap:8px; margin-bottom:5px; }
.ma-viec { font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:.68rem; color:var(--muc-nhat); font-weight:600; letter-spacing:.03em; }
.viec-ten { font-weight:600; font-size:.92rem; }
.viec-phu { display:flex; flex-wrap:wrap; gap:4px 14px; margin-top:5px; color:var(--muc-mo); font-size:.74rem; }
.viec-phu .qua-han { color:var(--lam-lai); font-weight:600; }

/* TASK CARDS — LƯỚI (trang Công việc) */
.luoi-viec { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-bottom:20px; }
.viec-the {
  display:flex; flex-direction:column; gap:8px;
  min-height:180px; padding:16px; border:1px solid var(--vien); border-radius:var(--bk);
  background:#fff; color:var(--muc); box-shadow:var(--bong);
  position:relative; overflow:hidden; transition:.14s ease;
}
.viec-the::before { content:""; position:absolute; left:0; top:0; right:0; height:3px; background:var(--moi); }
.viec-the[data-tt="dang_lam"]::before{background:var(--dang-lam)}
.viec-the[data-tt="cho_duyet"]::before{background:var(--cho-duyet)}
.viec-the[data-tt="lam_lai"]::before{background:var(--lam-lai)}
.viec-the[data-tt="hoan_thanh"]::before{background:var(--hoan-thanh)}
.viec-the[data-tt="huy"]::before{background:var(--huy)}
.viec-the:hover { border-color:var(--vien-dam); box-shadow:0 4px 14px rgba(28,28,26,.07); transform:translateY(-1px); }
.viec-the-dau { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:2px; }
.viec-the-ten { font-weight:600; font-size:.94rem; line-height:1.35; flex:1; }
.viec-the-giua { display:flex; align-items:center; flex-wrap:wrap; gap:6px 8px; }
.viec-the-cuoi { margin-top:auto; display:flex; align-items:center; justify-content:space-between; gap:8px; padding-top:10px; border-top:1px solid var(--vien); font-size:.73rem; color:var(--muc-mo); }
.viec-the-cuoi .qua-han { color:var(--lam-lai); font-weight:600; }

/* Mức ưu tiên — pill dịu mắt */
.uu-tien { display:inline-flex; align-items:center; gap:5px; padding:2px 8px; border-radius:6px; background:#f3f2ee; font-size:.66rem; font-weight:700; text-transform:uppercase; letter-spacing:.04em; white-space:nowrap; color:var(--muc-mo); }
.uu-tien::before { content:""; width:5px; height:5px; border-radius:50%; background:currentColor; flex:0 0 auto; }
.uu-tien[data-muc="cao"] { color:#a8382f; background:#fcebe9; }
.uu-tien[data-muc="thuong"] { color:var(--muc-mo); background:#f2f0ec; }
.uu-tien[data-muc="thap"] { color:#2b549a; background:#eaf1fd; }

/* Dashboard — 3 cột theo mức độ (Việc hằng ngày) */
.luoi-uu-tien { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin-bottom:20px; align-items:stretch; }
.cot-uu-tien { min-width:0; min-height:100%; }
.cot-uu-tien-dau { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:10px; }
.cot-uu-tien--dang-keo-vao { outline:1.5px dashed var(--chinh-dam); outline-offset:6px; border-radius:var(--bk); }
.viec-the[draggable="true"] { cursor:grab; }
.viec-the[draggable="true"]:active { cursor:grabbing; }

/* Trợ lý AI — khung chat */
.tro-ly-tin { max-width:78%; padding:9px 13px; border-radius:12px; font-size:.87rem; line-height:1.55; white-space:pre-wrap; word-break:break-word; }
.tro-ly-tin--ai { align-self:flex-start; background:#f2f1ee; color:var(--muc); border-bottom-left-radius:3px; }
.tro-ly-tin--nguoi { align-self:flex-end; background:var(--den); color:#fff; border-bottom-right-radius:3px; }

/* Thư viện đối chứng */
.luoi-thu-vien { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:12px; margin-bottom:20px; }
.the-thu-vien { border:1px solid var(--vien); border-radius:var(--bk); background:#fff; box-shadow:var(--bong); overflow:hidden; display:flex; flex-direction:column; }
.the-thu-vien img, .the-thu-vien video { width:100%; height:140px; object-fit:cover; display:block; background:#000; }
.the-thu-vien-am { padding:14px 14px 4px; }
.the-thu-vien-am audio { width:100%; }
.the-thu-vien-file { height:140px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; color:var(--muc-mo); font-size:1.8rem; text-align:center; }
.the-thu-vien-file span { font-size:.73rem; padding:0 10px; }
.the-thu-vien-info { padding:12px; }

/* Lưới chọn loại (VD: chọn loại đề xuất) */
.luoi-chon-loai { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:14px; margin-bottom:22px; }
.the-chon-loai { display:flex; align-items:center; gap:14px; background:var(--the); border:1px solid var(--vien); border-radius:var(--bk); box-shadow:var(--bong); padding:18px; cursor:pointer; transition:.14s ease; }
.the-chon-loai:hover { border-color:var(--chinh); box-shadow:0 4px 14px rgba(169,130,42,.14); transform:translateY(-1px); }
.the-chon-loai-icon { flex:0 0 auto; width:46px; height:46px; border-radius:14px; background:var(--chinh-nhat); color:var(--chinh-dam); display:flex; align-items:center; justify-content:center; font-size:1.3rem; }
.the-chon-loai-icon .ic { width:22px; height:22px; vertical-align:0; }
.the-chon-loai-nd { flex:1; min-width:0; }
.the-chon-loai-nd h3 { margin:0 0 2px; font-size:.95rem; }
.the-chon-loai-nd p { margin:0; font-size:.8rem; color:var(--muc-mo); }

/* Phân trang */
.phan-trang { display:flex; align-items:center; justify-content:center; gap:14px; margin:22px 0 6px; }
.phan-trang-so { font-size:.78rem; color:var(--muc-mo); font-weight:600; }

/* BADGES — pill màu dịu giúp quét trạng thái nhanh trên điện thoại & máy tính */
.nhan { display:inline-flex; align-items:center; gap:5px; min-height:22px; padding:2px 9px; border-radius:999px; background:#f2f0ec; font-size:.7rem; font-weight:600; color:var(--muc-mo); white-space:nowrap; }
.nhan::before { content:""; width:6px; height:6px; border-radius:50%; background:currentColor; flex:0 0 auto; }
.nhan[data-tt="dang_lam"]{color:#2b549a; background:#eaf1fd;}
.nhan[data-tt="cho_duyet"]{color:#8a6a1e; background:#f9f1df;}
.nhan[data-tt="lam_lai"]{color:#a8382f; background:#fcebe9;}
.nhan[data-tt="hoan_thanh"]{color:#286840; background:#e7f5ec;}
.nhan[data-tt="huy"]{color:var(--muc-nhat); background:#f3f2ee;}
.nhan[data-tt="moi"]{color:var(--muc-mo); background:#f2f0ec;}

/* BUTTONS */
.nut { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:40px; padding:9px 14px; border:1px solid transparent; border-radius:var(--bk-n); background:var(--den); color:#fff; font-weight:600; font-size:.82rem; cursor:pointer; transition:.14s ease; }
.nut:hover { background:var(--den-3); }
.nut:active { transform:translateY(1px); }
.nut[disabled] { opacity:.45; cursor:not-allowed; }
.nut--phu { background:transparent; color:var(--muc); border-color:var(--vien-dam); }
.nut--phu:hover { background:#fff; border-color:var(--muc-nhat); }
.nut--xanh { background:#3f7d55; }
.nut--xanh:hover { background:#356a48; }
.nut--do { background:#b8483f; }
.nut--do:hover { background:#9e3c34; }
.nut--vang { background:var(--chinh); color:#fff; }
.nut--vang:hover { background:var(--chinh-dam); }
.nut--rong { width:100%; }
.nut--nho { min-height:34px; padding:7px 11px; font-size:.75rem; }
.hang-nut { display:flex; gap:8px; flex-wrap:wrap; }

/* FORMS */
label { display:block; margin-bottom:5px; font-size:.76rem; font-weight:600; color:var(--muc-mo); }
.o-nhap { margin-bottom:14px; }
.o-mat-khau-bao { position:relative; display:flex; align-items:center; }
.o-mat-khau-bao input { flex:1; padding-right:74px; }
.o-mat-khau-nut { position:absolute; top:50%; transform:translateY(-50%); background:transparent; border:0; cursor:pointer; padding:6px; font-size:.95rem; color:var(--muc-mo); border-radius:6px; line-height:1; }
.o-mat-khau-nut:hover { background:var(--nen); color:var(--muc); }
#nut-hien-key { right:36px; }
#nut-sao-chep-key { right:4px; }
.goi-y { margin-top:5px; font-size:.71rem; color:var(--muc-nhat); font-weight:400; }
input[type=text],input[type=password],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],input[type=month],input[type=search],select,textarea,input[type=file] {
  width:100%; min-height:40px; padding:8px 11px; border:1px solid var(--vien-dam); border-radius:var(--bk-n); background:#fff; color:var(--muc); font-size:14px; font-family:inherit;
  -webkit-appearance:none; appearance:none;
}
input[type=file] { padding:7px 9px; border-style:dashed; }
textarea { min-height:100px; resize:vertical; }
input:focus,select:focus,textarea:focus { outline:none; border-color:var(--chinh); box-shadow:0 0 0 3px rgba(169,130,42,.12); }

/* Date inputs — icon lịch tinh chỉnh theo theme */
input[type=date],input[type=datetime-local],input[type=month] { color-scheme:light; padding-right:8px; }
input[type=date]::-webkit-calendar-picker-indicator,
input[type=datetime-local]::-webkit-calendar-picker-indicator,
input[type=month]::-webkit-calendar-picker-indicator {
  opacity:.55; cursor:pointer; padding:2px; border-radius:5px; transition:.14s ease;
}
input[type=date]::-webkit-calendar-picker-indicator:hover { opacity:.9; background:var(--chinh-nhat); }
input[type=date]::-webkit-datetime-edit-fields-wrapper,
input[type=date]::-webkit-datetime-edit { color:var(--muc); }

/* Select — mũi tên tuỳ biến thay vì icon mặc định trình duyệt */
select {
  padding-right:34px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%2375746e' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 12px center;
}
.hang { display:flex; gap:10px; }
.hang > * { flex:1; min-width:0; }
.o-ngay-loc { flex:0 1 170px; min-width:150px; }
.chon-nhieu { display:grid; gap:2px; max-height:300px; overflow-y:auto; padding:6px; border:1px solid var(--vien); border-radius:var(--bk-n); background:#fdfcfb; }
.chon-nhieu label { display:flex; align-items:center; gap:9px; margin:0; padding:8px; border-radius:6px; font-weight:500; color:var(--muc); cursor:pointer; }
.chon-nhieu label:hover { background:#fff; }
.chon-nhieu input { width:17px; height:17px; accent-color:var(--chinh); }

/* BỘ LỌC danh sách (Công việc, Thư viện) — máy tính: 1 hàng ngang;
   điện thoại: chỉ hiện ô tìm + nút "Lọc", bấm mới mở phần lọc gọn 2 cột. */
.bo-loc { display:flex; flex-direction:column; gap:10px; }
.bo-loc-chi-tiet { display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
.bo-loc-chi-tiet > select { flex:1 1 180px; min-width:0; }
.bo-loc-chi-tiet > .nut { flex:0 0 auto; }
.loc-ngay { display:flex; align-items:center; gap:8px; flex:0 1 auto; }
.loc-ngay label { margin:0; white-space:nowrap; font-size:.8rem; color:var(--muc-nhat); }
.loc-ngay input[type=date] { width:auto; min-width:0; flex:0 1 160px; }
.bo-loc-tim { display:flex; gap:8px; }
.bo-loc-tim input[type=search] { flex:1; min-width:0; }
.bo-loc-tim .nut { flex:0 0 auto; }
.bo-loc-nut { display:none; }
.dem-loc { display:inline-grid; place-items:center; min-width:18px; height:18px; padding:0 5px; margin-left:4px;
  border-radius:9px; background:var(--chinh); color:#fff; font-size:.68rem; font-weight:700; }

/* BẢNG → THẺ trên điện thoại: thêm class "bang-the" vào <table>; nhãn mỗi ô
   lấy tự động từ <th> (app.js). Ô .o-tieu-de làm tiêu đề thẻ, ô .o-rong
   chiếm cả hàng; bảng .bang-the--3 xếp 3 cột. */

/* CHỌN NHIỀU NGÀY (giao việc Hằng ngày) */
.luoi-ngay { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:6px; }
.ngay-o { min-height:36px; border:1px solid var(--vien); border-radius:7px; background:#fff; color:var(--muc); font-weight:600; font-size:.8rem; cursor:pointer; transition:.12s ease; }
.ngay-o:hover { border-color:var(--vien-dam); background:#fdfcfb; }
.ngay-o--chon { background:var(--chinh-nhat); border-color:var(--chinh); color:var(--chinh-dam); }

/* TABLES */
.bang-cuon { overflow-x:auto; -webkit-overflow-scrolling:touch; }
table { width:100%; border-collapse:collapse; font-size:.79rem; }
th,td { padding:11px 13px; text-align:left; border-bottom:1px solid var(--vien); white-space:nowrap; }
th { background:transparent; color:var(--muc-nhat); font-size:.65rem; font-weight:700; text-transform:uppercase; letter-spacing:.06em; border-bottom:1px solid var(--vien-dam); }
tbody tr:hover td { background:#fdfcfb; }
tbody tr:last-child td { border-bottom:0; }
td.so,th.so { text-align:right; font-variant-numeric:tabular-nums; }

/* DETAIL / TIMELINE */
.dong-tt { display:flex; justify-content:space-between; gap:16px; padding:9px 0; border-bottom:1px solid var(--vien); font-size:.8rem; }
.dong-tt:last-child { border-bottom:0; }
.dong-tt span:first-child { color:var(--muc-mo); }
.dong-tt span:last-child { font-weight:600; text-align:right; }
.vong { position:relative; padding-left:24px; margin-bottom:18px; }
.vong::before { content:""; position:absolute; left:6px; top:20px; bottom:-18px; width:1px; background:var(--vien); }
.vong:last-child::before { display:none; }
.vong-so { position:absolute; left:0; top:2px; width:14px; height:14px; border-radius:50%; background:#fff; border:2px solid var(--muc-nhat); }
.vong[data-kq="dat"] .vong-so { border-color:var(--hoan-thanh); background:var(--hoan-thanh); }
.vong[data-kq="lam_lai"] .vong-so { border-color:var(--lam-lai); background:var(--lam-lai); }
.vong-nhan { margin-bottom:6px; color:var(--muc-nhat); font-size:.66rem; font-weight:700; text-transform:uppercase; letter-spacing:.07em; }
.luoi-tep { display:grid; grid-template-columns:repeat(auto-fill,minmax(110px,1fr)); gap:8px; }
.tep { display:block; overflow:hidden; position:relative; border:1px solid var(--vien); border-radius:var(--bk-n); background:#fff; }
.tep img,.tep video { width:100%; height:104px; object-fit:cover; display:block; background:#000; }
.tep-khac { height:104px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; padding:8px; color:var(--muc-mo); font-size:.7rem; text-align:center; }
.tep-am { padding:8px; }
.tep-am audio { width:100%; }
.tep-xoa {
  position:absolute; top:4px; right:4px; width:22px; height:22px;
  border-radius:50%; border:none; background:rgba(28,28,26,.72); color:#fff;
  font-size:.8rem; line-height:1; cursor:pointer; z-index:1;
  display:flex; align-items:center; justify-content:center; padding:0;
}
.tep-xoa:hover { background:var(--lam-lai); }
.chon-sao { display:flex; gap:3px; direction:rtl; justify-content:flex-end; }
.chon-sao input{display:none}.chon-sao label{margin:0;padding:0 2px;font-size:1.8rem;line-height:1;color:var(--vien-dam);cursor:pointer}
.chon-sao input:checked~label,.chon-sao label:hover,.chon-sao label:hover~label{color:var(--chinh)}.sao-hien{color:var(--chinh);letter-spacing:1px}

/* STATUS / EMPTY / ALERTS */
.thong-bao-khu { display:grid; gap:8px; margin-bottom:18px; }
.thong-bao { padding:10px 13px; border:1px solid var(--vien); border-left:2px solid #3a63a8; border-radius:7px; background:#fff; font-size:.8rem; }
.thong-bao--error { border-left-color:var(--lam-lai); }
.thong-bao--success { border-left-color:var(--hoan-thanh); }
.thong-bao--warning { border-left-color:var(--cho-duyet); }
.canh-bao-nho { padding:9px 11px; border:1px solid var(--vien); border-left:2px solid var(--cho-duyet); border-radius:7px; background:#fff; color:var(--muc-mo); font-size:.75rem; }
.trong { padding:34px 18px; border:1px dashed var(--vien-dam); border-radius:var(--bk); background:transparent; color:var(--muc-mo); text-align:center; }
.trong strong { display:block; margin-bottom:4px; color:var(--muc); }
.doi-so { display:flex; gap:10px; flex-wrap:wrap; }
.o-so { flex:1; min-width:110px; padding:15px; border:1px solid var(--vien); border-radius:var(--bk); background:#fff; box-shadow:var(--bong); }
.o-so .con-so { font-size:1.4rem; line-height:1.1; font-weight:700; }
.o-so .mo-ta { margin-top:4px; color:var(--muc-mo); font-size:.71rem; }

/* DETAILS */
details.the > summary { list-style:none; cursor:pointer; }
details.the > summary::-webkit-details-marker { display:none; }
details.the > summary::after { content:"+"; float:right; color:var(--muc-nhat); font-size:1rem; }
details.the[open] > summary::after { content:"−"; }

/* TAB ĐIỀU HƯỚNG (khu Quản trị) */
.tab-quan-tri { display:flex; gap:2px; margin-bottom:20px; padding:0; background:transparent; border:0; border-bottom:1px solid var(--vien); border-radius:0; box-shadow:none; overflow-x:auto; }
.tab-quan-tri-nut { flex:0 0 auto; padding:9px 4px; margin-right:20px; border-radius:0; border-bottom:2px solid transparent; font-weight:600; font-size:.83rem; color:var(--muc-mo); white-space:nowrap; }
.tab-quan-tri-nut:hover { color:var(--muc); }
.tab-quan-tri-nut.active { color:var(--muc); border-bottom-color:var(--chinh); }

/* THẺ NHÂN VIÊN */
.the--them { border:1px dashed var(--chinh); background:var(--chinh-nhat); }
.the--them > summary { font-weight:700; color:var(--chinh-dam); }
.nv-tom-tat { display:flex; align-items:center; gap:12px; cursor:pointer; }
.nv-avatar { width:36px; height:36px; flex:0 0 36px; border-radius:50%; display:grid; place-items:center; background:var(--chinh-nhat); color:var(--chinh-dam); font-weight:700; font-size:.95rem; border:2px solid transparent; }
.nv-thong-tin { display:flex; flex-direction:column; min-width:0; flex:1; gap:2px; }
.nv-thong-tin strong { font-size:.9rem; font-weight:600; }
.nv-thong-tin small { color:var(--muc-mo); font-size:.75rem; }
.nv-nhan-nhom { display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end; align-items:center; }

/* Màu nhãn vai trò — theo ĐÚNG vai trò thật, không phải theo còn làm việc
   hay không (trước đây mọi vai trò đang hoạt động đều ra cùng 1 màu xanh,
   không phân biệt được Admin với Nhân viên chỉ bằng màu sắc). */
.nhan[data-tt="admin"] { color:var(--chinh-dam); background:var(--chinh-nhat); }
.nhan[data-tt="sep"] { color:var(--chinh-dam); background:#fbf5e8; }
.nhan[data-tt="quan_ly"] { color:#2b549a; background:#eaf1fd; }
.nhan[data-tt="nhan_vien"] { color:var(--muc-mo); background:#f2f0ec; }

/* Viền avatar nhuộm theo vai trò, giúp lướt mắt nhận ra cấp bậc nhanh hơn */
.nv-avatar[data-vt="admin"] { border-color:var(--chinh-dam); }
.nv-avatar[data-vt="sep"] { border-color:var(--chinh); }
.nv-avatar[data-vt="quan_ly"] { border-color:#3a63a8; }

/* Hàng nhân viên đã nghỉ việc — mờ hẳn đi để mắt tự động lướt qua, tách
   biệt rõ với người đang làm việc mà không cần đọc kỹ từng dòng chữ */
.the--nv-nghi { opacity:.5; }
.the--nv-nghi:hover { opacity:.8; }
.the--nv-nghi .nv-thong-tin strong { text-decoration:line-through; text-decoration-color:var(--muc-nhat); }

/* Nhóm nhân viên theo bộ phận — bao GỘP cả nhóm trong 1 khối, từng người
   bên trong chỉ cách nhau bằng đường kẻ mỏng thay vì mỗi người 1 thẻ
   riêng (viền + bóng đổ + margin) — đỡ tốn diện tích khi danh sách dài. */
.khoi-nv-bo-phan { background:var(--the); border:1px solid var(--vien); border-radius:var(--bk); box-shadow:var(--bong); padding:4px 16px; margin-bottom:14px; }
.nv-hang { padding:10px 0; border-bottom:1px solid var(--vien); }
.nv-hang:last-child { border-bottom:none; }
.nv-hang[open] { padding-bottom:16px; }
.nv-hang[open] > summary { margin-bottom:12px; }
.nv-hang-form { padding-top:2px; }

/* Tiêu đề nhóm theo bộ phận */
.nhom-bo-phan-tieu-de { display:flex; align-items:center; gap:8px; margin:22px 0 8px; padding-bottom:6px; border-bottom:1px solid var(--vien); }
.nhom-bo-phan-tieu-de:first-of-type { margin-top:4px; }
.nhom-bo-phan-tieu-de h3 { font-size:.78rem; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:var(--chinh-dam); margin:0; }

/* AUTH */
.auth-shell { min-height:100vh; display:grid; place-items:center; padding:24px; background:var(--den); }
.auth-flash { position:fixed; top:18px; left:50%; width:min(460px,calc(100% - 32px)); transform:translateX(-50%); z-index:5; }
.auth-card-wrap { width:min(400px,100%); }
.auth-brand { display:flex; align-items:center; justify-content:center; gap:10px; margin-bottom:26px; color:#fff; }
.auth-brand-copy { display:flex; flex-direction:column; line-height:1.05; }
.auth-brand-copy strong { letter-spacing:.1em; }
.auth-brand-copy small { margin-top:4px; color:#6f6e69; font-size:.58rem; letter-spacing:.13em; }
.auth-card { padding:26px; border:1px solid rgba(255,255,255,.08); border-radius:var(--bk); background:var(--den-2); box-shadow:0 12px 32px rgba(0,0,0,.3); color:#fff; }
.auth-card h1 { color:#fff; font-size:1.3rem; }
.auth-card .auth-sub { color:#8c8b86; font-size:.81rem; }
.auth-card label { color:#b3b2ac; }
.auth-card input[type=text],.auth-card input[type=password] { border-color:rgba(255,255,255,.12); background:rgba(255,255,255,.04); color:#fff; }
.auth-card input:focus { border-color:var(--chinh); box-shadow:0 0 0 3px rgba(169,130,42,.18); }
.auth-card .nut { background:var(--chinh); color:#fff; }
.auth-card .nut:hover { background:var(--chinh-dam); }
.auth-help { margin-top:16px; color:#68675f; font-size:.71rem; text-align:center; }

.sidebar-backdrop { display:none; }

@media (max-width: 1199px) {
  .luoi-viec { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 1023px) {
  :root { --sidebar: 260px; }
  .sidebar { transform:translateX(-100%); transition:transform .2s ease; box-shadow:0 0 0 rgba(0,0,0,0); }
  .sidebar-close { display:block; }
  .sidebar-open .sidebar { transform:translateX(0); box-shadow:20px 0 44px rgba(0,0,0,.18); }
  .sidebar-backdrop { display:block; position:fixed; inset:0; z-index:55; background:rgba(0,0,0,.32); opacity:0; visibility:hidden; transition:.2s ease; }
  .sidebar-open .sidebar-backdrop { opacity:1; visibility:visible; }
  .app-main { margin-left:0; }
  .topbar { min-height:56px; padding:0 16px; }
  .menu-button { display:inline-flex; align-items:center; justify-content:center; width:36px; height:36px; padding:0; border:1px solid var(--vien); border-radius:var(--bk-n); background:#fff; color:var(--muc); cursor:pointer; }
  .topbar-brand-mobile { display:flex; align-items:center; gap:8px; margin-left:10px; font-size:.78rem; letter-spacing:.05em; font-weight:600; }
  .brand-mark--small { width:26px; height:26px; border-radius:6px; font-size:.78rem; }
  .topbar-right { margin-left:auto; }
  .topbar-user { display:none; }
  .content-wrap { padding:22px 16px 40px; }
  .luoi-uu-tien { grid-template-columns:1fr; }
}

@media (max-width: 680px) {
  body { font-size:14px; }
  .content-wrap { padding:16px 12px 32px; }
  .topbar { padding:0 12px; }
  .topbar-brand-mobile strong { font-size:.72rem; }
  .topbar-logout { padding:6px 9px; }
  .page-head { align-items:flex-start; flex-direction:column; margin-bottom:16px; }
  .page-actions { width:100%; }
  .page-actions .nut { flex:1; }
  .the { padding:14px; border-radius:var(--bk-n); }
  .dashboard-grid { grid-template-columns:1fr 1fr; gap:8px; }
  .stat-card { padding:12px; }
  .stat-card--lienket { gap:10px; padding:12px; }
  .stat-card-icon { width:36px; height:36px; border-radius:10px; }
  .stat-card-icon .ic { width:18px; height:18px; }
  .stat-card-value { font-size:1.22rem; margin-top:4px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .stat-card-mui-ten { display:none; }
  .nv-tom-tat { flex-wrap:wrap; row-gap:8px; }
  .nv-nhan-nhom { width:100%; justify-content:flex-start; padding-left:48px; }
  .hang { flex-direction:column; gap:0; }
  table.bang-the, table.bang-the tbody { display:block; }
  table.bang-the thead { display:none; }
  table.bang-the tr { display:grid; grid-template-columns:1fr 1fr; gap:8px 14px; padding:12px 14px;
    border-bottom:1px solid var(--vien); }
  table.bang-the.bang-the--3 tr { grid-template-columns:1fr 1fr 1fr; }
  table.bang-the tr:last-child { border-bottom:0; }
  table.bang-the tbody tr:hover td { background:transparent; }
  table.bang-the td { display:block; padding:0; border:0; white-space:normal; text-align:left !important;
    min-width:0; max-width:none !important; overflow-wrap:anywhere; font-size:.84rem; }
  table.bang-the td[data-nhan]::before { content:attr(data-nhan); display:block; margin-bottom:2px;
    font-size:.64rem; font-weight:700; letter-spacing:.05em; text-transform:uppercase; color:var(--muc-nhat); }
  table.bang-the td.o-tieu-de { grid-column:1 / -1; font-weight:700; font-size:.92rem; }
  table.bang-the td.o-tieu-de::before { display:none; }
  table.bang-the td.o-rong, table.bang-the td[colspan], table.bang-the td:not([data-nhan]) { grid-column:1 / -1; }
  table.bang-the td:empty { display:none; }
  table.bang-the td.o-hanh-dong { text-align:left !important; }
  table.bang-the .ghi-nhan { display:flex; }
  .tab-quan-tri { flex-wrap:wrap; overflow:visible; gap:6px; border-bottom:0; margin-bottom:16px; }
  .tab-quan-tri-nut { margin:0; padding:7px 12px; border:1px solid var(--vien); border-radius:999px; background:#fff; font-size:.8rem; }
  .tab-quan-tri-nut.active { background:var(--chinh-nhat); border-color:var(--chinh); color:var(--chinh-dam); }
  .bo-loc { gap:0; }
  .bo-loc-tim { order:-1; }
  .bo-loc-nut { display:inline-flex; }
  .bo-loc-chi-tiet { display:none; margin-top:10px; grid-template-columns:1fr 1fr; gap:8px; }
  .bo-loc.mo .bo-loc-chi-tiet { display:grid; }
  .bo-loc-chi-tiet > select { width:100%; }
  .bo-loc-chi-tiet > select:last-of-type:nth-of-type(odd) { grid-column:1 / -1; }
  .bo-loc-chi-tiet > .nut { grid-column:1 / -1; }
  .loc-ngay { grid-column:1 / -1; display:grid; grid-template-columns:1fr 1fr; gap:4px 8px; }
  .loc-ngay label { grid-row:1; font-size:.72rem; }
  .loc-ngay input[type=date] { grid-row:2; width:100%; font-size:16px; padding:8px 10px; }
  .bo-loc-tim .nut { padding-left:12px; padding-right:12px; }
  .hang-nut .nut { flex:1 1 auto; }
  .viec { padding:12px 12px 12px 15px; }
  .viec-the { min-height:0; padding:14px; border-radius:10px; }
  .luoi-viec { grid-template-columns:1fr; gap:10px; }
  .luoi-ngay { gap:4px; }
  .ngay-o { min-height:34px; font-size:.76rem; }
  .dong-tt { gap:12px; }
  input[type=text],input[type=password],input[type=number],input[type=tel],input[type=datetime-local],input[type=month],input[type=search],select,textarea,input[type=file] { font-size:16px; }
  .auth-shell { padding:14px; }
  .auth-card { padding:20px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior:auto!important; transition:none!important; animation:none!important; }
}

/* ---- Modal (cửa sổ nhỏ) ---- */
.modal-nen {
  display:none;
  position:fixed; inset:0; z-index:100;
  background:rgba(20,19,16,.5);
  align-items:flex-start; justify-content:center;
  padding:5vh 16px; overflow-y:auto;
}
.modal-nen:not([hidden]) { display:flex; }
body.modal-dang-mo { overflow:hidden; }
.modal-hop {
  background:var(--the); border-radius:var(--bk); box-shadow:0 12px 40px rgba(0,0,0,.22);
  width:100%; max-width:820px; max-height:90vh; display:flex; flex-direction:column;
}
.modal-dau {
  display:flex; align-items:flex-start; justify-content:space-between; gap:12px;
  padding:18px 20px; border-bottom:1px solid var(--vien);
}
.modal-dau h2 { margin:0; font-size:1.05rem; }
.modal-dong {
  appearance:none; border:none; background:transparent; cursor:pointer;
  font-size:1.4rem; line-height:1; color:var(--muc-mo); padding:2px 6px; border-radius:6px;
}
.modal-dong:hover { background:var(--nen); color:var(--muc); }
.modal-than { padding:18px 20px; overflow-y:auto; }

@media (max-width:640px) {
  .modal-nen { padding:0; align-items:stretch; }
  .modal-hop { max-width:none; max-height:100vh; height:100vh; border-radius:0; }
}
/* ---- Ô nhập có dropdown gợi ý (Thanh toán công nợ) ---- */
.combo { position:relative; }
.combo-ds { position:absolute; z-index:40; left:0; right:0; top:calc(100% + 4px); margin:0; padding:4px; list-style:none;
  background:var(--the); border:1px solid var(--vien-dam); border-radius:var(--bk-n); box-shadow:0 6px 18px rgba(28,28,26,.12);
  max-height:260px; overflow-y:auto; display:none; }
.combo.mo .combo-ds { display:block; }
.combo-ds li { padding:9px 10px; border-radius:6px; cursor:pointer; font-size:.9rem; display:flex; justify-content:space-between; gap:8px; }
.combo-ds li.chon, .combo-ds li:hover { background:var(--chinh-nhat); }
.combo-ds li small { color:var(--muc-mo); font-size:.75rem; white-space:nowrap; }
.combo-ds li.trong-ds { color:var(--muc-mo); cursor:default; background:none; }
.loc-nhanh { display:flex; gap:6px; flex-wrap:wrap; }
.cn-anh { display:flex; gap:4px; align-items:center; }
.cn-anh img { width:44px; height:44px; object-fit:cover; border-radius:var(--bk-n); }
.cn-ghi-chu { display:inline-block; padding:2px 8px; border-radius:999px; background:var(--chinh-nhat); color:var(--chinh-dam); font-size:.78rem; font-weight:600; }
.cn-luoi-anh { display:grid; grid-template-columns:repeat(auto-fill, minmax(140px, 1fr)); gap:10px; }
.cn-luoi-anh img { width:100%; aspect-ratio:3/4; object-fit:cover; border-radius:var(--bk-n); border:1px solid var(--vien); }

/* =====================================================================
   REWORK GIAO DIỆN MOBILE — menu 2 khối, thanh menu dưới, Đơn từ,
   lịch chấm công, khối quản lý nhân viên
   ===================================================================== */
input[type=time] {
  width:100%; min-height:40px; padding:8px 11px; border:1px solid var(--vien-dam); border-radius:var(--bk-n);
  background:#fff; color:var(--muc); font-size:14px; font-family:inherit; color-scheme:light;
}
input[readonly] { background:#f6f5f2; color:var(--muc-mo); }

.topbar-chuong { width:38px; height:38px; display:grid; place-items:center; border-radius:50%; border:1px solid var(--vien); background:#fff; color:var(--muc-mo); font-size:1rem; transition:.15s ease; }
.topbar-chuong .ic { width:18px; height:18px; vertical-align:0; }
.topbar-ai { display:none; align-items:center; gap:6px; height:38px; padding:0 12px 0 4px; border-radius:19px; border:1px solid var(--vien); background:#fff; color:var(--muc); font:inherit; font-size:.78rem; font-weight:700; cursor:pointer; white-space:nowrap; }
.topbar-ai img { width:30px; height:30px; border-radius:50%; object-fit:cover; background:#111; }
.topbar-ai .ic { width:18px; height:18px; margin-left:6px; color:var(--chinh); }
@media (max-width: 430px) { .topbar-ai { padding:3px; border-color:var(--chinh); } .topbar-ai span { display:none; } .topbar-ai .ic { margin:0 6px; } }
.topbar-chuong:hover { border-color:var(--vien-dam); color:var(--muc); background:#fdfcfb; }

.nut--lon { min-height:50px; font-size:.95rem; border-radius:12px; }
.nut--den { background:var(--den); color:#fff; }
.nut--vien-do { background:#fff; color:#b8483f; border-color:#e3b3ae; }
.nut--vien-do:hover { background:#fdf3f2; border-color:#b8483f; }
.lien-ket-nho { font-size:.8rem; font-weight:600; color:var(--chinh-dam); }
.trong-rong { text-align:center; color:var(--muc-mo); padding:22px 16px; font-size:.86rem; }
.ghi-chu-xanh { display:flex; gap:8px; align-items:center; padding:10px 12px; border-radius:var(--bk-n); background:#eef7f1; color:#2f6b45; font-size:.8rem; font-weight:500; margin-top:6px; }
.subtle { color:var(--muc-mo); }
.xanh { color:#2f8a4f !important; }
.do { color:#b8483f !important; }
.mo { color:var(--muc-nhat) !important; }

/* ---- Thanh chip (tab) ---- */
.tab-chip { display:flex; gap:6px; overflow-x:auto; margin-bottom:16px; padding-bottom:2px; scrollbar-width:none; }
.tab-chip::-webkit-scrollbar { display:none; }
.tab-chip a { flex:0 0 auto; padding:8px 14px; border:1px solid var(--vien); border-radius:999px; background:#fff; font-size:.82rem; font-weight:600; color:var(--muc-mo); white-space:nowrap; }
.tab-chip a.active { background:var(--den); border-color:var(--den); color:#fff; }
.tab-chip a.active .dem-loc { background:var(--chinh); }
.tab-chip a { display:inline-flex; align-items:center; gap:6px; transition:.14s ease; -webkit-tap-highlight-color:transparent; }
.tab-chip a:not(.active):hover { border-color:var(--vien-dam); color:var(--muc); }
.tab-chip a .ic { width:15px; height:15px; vertical-align:0; }
.tab-chip a .dem-loc { margin-left:0; }
@media (max-width:680px) {
  .tab-chip { margin-left:-2px; margin-right:-2px; padding:0 2px 2px; }
  .tab-chip a { padding:8px 12px; }
}
.hang-loc { margin-bottom:12px; max-width:320px; }

/* ---- Hub (Công việc / Nhân sự) ---- */
.hub-luoi { display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:12px; }
.hub-o { position:relative; display:flex; align-items:center; gap:14px; padding:16px; background:#fff; border:1px solid var(--vien); border-radius:14px; box-shadow:var(--bong); transition:.14s ease; }
.hub-o:hover { border-color:var(--chinh); }
.hub-o:active { transform:scale(.99); }
.hub-icon { width:46px; height:46px; flex:0 0 auto; display:grid; place-items:center; border-radius:12px; background:var(--chinh-nhat); color:var(--chinh-dam); font-size:1.35rem; }
.hub-icon .ic { width:22px; height:22px; vertical-align:0; }
.hub-chu { display:flex; flex-direction:column; min-width:0; line-height:1.35; }
.hub-chu strong { font-size:.95rem; }
.hub-chu small { color:var(--muc-mo); font-size:.76rem; }
.hub-dem { position:absolute; top:10px; right:10px; min-width:22px; height:22px; padding:0 6px; border-radius:11px; background:#d64538; color:#fff; font-size:.72rem; font-weight:700; display:grid; place-items:center; }
.hub-danh-sach a { display:flex; align-items:center; gap:12px; padding:14px 16px; border-bottom:1px solid var(--vien); font-weight:600; font-size:.9rem; transition:.14s ease; }
.hub-danh-sach a:hover { background:#fdfcfb; }
.hub-danh-sach a:last-child { border-bottom:0; }
.hub-danh-sach a span { width:28px; height:28px; border-radius:8px; background:var(--nen); color:var(--muc-mo); display:inline-grid; place-items:center; flex-shrink:0; }
.hub-danh-sach a span .ic { width:16px; height:16px; vertical-align:0; }
.hub-danh-sach a i { margin-left:auto; font-style:normal; color:var(--muc-nhat); font-size:1rem; display:inline-grid; place-items:center; }
.hub-danh-sach a i .ic { width:16px; height:16px; vertical-align:0; }
.ca-nhan-the { display:flex; align-items:center; gap:14px; }
.ca-nhan-avatar { width:58px; height:58px; border-radius:50%; background:var(--chinh); color:#fff; display:grid; place-items:center; font-weight:700; font-size:1.3rem; flex:0 0 auto; }

/* ---- Thanh menu dưới cùng (điện thoại) ---- */
.bottom-nav { display:none; }

/* ---- Đơn từ ---- */
.loai-don-luoi { display:grid; grid-template-columns:repeat(auto-fill,minmax(170px,1fr)); gap:10px; margin-bottom:6px; }
.loai-don-o { display:flex; flex-direction:column; align-items:flex-start; gap:4px; padding:14px; background:#fff; border:1px solid var(--vien); border-radius:14px; box-shadow:var(--bong); transition:.14s ease; }
.loai-don-o:hover { border-color:var(--chinh); transform:translateY(-1px); }
.loai-don-o strong { font-size:.9rem; line-height:1.3; }
.loai-don-o small { font-size:.74rem; color:var(--muc-mo); line-height:1.35; }
.loai-don-icon { width:42px; height:42px; display:grid; place-items:center; border-radius:11px; background:var(--chinh-nhat); color:var(--chinh-dam); font-size:1.25rem; flex:0 0 auto; margin-bottom:4px; }
.loai-don-icon .ic { width:21px; height:21px; vertical-align:0; }

.don-the { background:#fff; border:1px solid var(--vien); border-radius:14px; box-shadow:var(--bong); margin-bottom:10px; overflow:hidden; }
.don-the-dau { display:flex; gap:12px; align-items:flex-start; padding:14px; }
.don-avatar { width:44px; height:44px; border-radius:50%; background:var(--chinh); color:#fff; display:grid; place-items:center; font-weight:700; flex:0 0 auto; }
.don-icon { width:44px; height:44px; border-radius:12px; background:var(--chinh-nhat); color:var(--chinh-dam); display:grid; place-items:center; font-size:1.2rem; flex:0 0 auto; }
.don-icon .ic { width:21px; height:21px; vertical-align:0; }
.don-the-noi-dung { flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.don-the-hang { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.don-the-hang strong { font-size:.95rem; }
.don-loai { padding:1px 9px; border:1.5px solid var(--chinh); border-radius:999px; font-size:.7rem; font-weight:700; color:var(--chinh-dam); background:var(--chinh-nhat); }
.don-the-phu { font-size:.8rem; color:var(--muc-mo); overflow-wrap:anywhere; }
.don-the-nut { display:grid; grid-template-columns:1fr 1fr; gap:10px; padding:0 14px 14px; }
form.the .don-the-nut, .the > .don-the-nut { padding:0; }
.don-the-nut .nut { min-height:44px; font-size:.9rem; border-radius:10px; }

.don-form { max-width:620px; }
.don-form-dau { display:flex; align-items:center; gap:12px; padding-bottom:14px; margin-bottom:14px; border-bottom:1px solid var(--vien); }
.don-form-dau .loai-don-icon { margin:0; }
.don-dong { margin-bottom:12px; }
.don-dong > label, .don-dong--doi label { font-size:.8rem; color:var(--muc); }
.don-dong--doi { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.don-form .nut--lon { margin-top:8px; }

/* ---- Khối Quản lý nhân viên (Trang chủ) ---- */
.ql-the { padding:16px; }
.ql-so-lieu { display:grid; grid-template-columns:repeat(4,1fr); }
.ql-so-lieu a { display:flex; flex-direction:column; align-items:center; gap:2px; padding:4px; border-left:1px solid var(--vien); }
.ql-so-lieu a:first-child { border-left:0; }
.ql-so-lieu strong { font-size:1.9rem; font-weight:800; line-height:1.1; letter-spacing:-.03em; }
.ql-so-lieu span { font-size:.78rem; color:var(--muc-mo); font-weight:500; }
.ql-loc { width:auto; min-height:34px; padding:5px 30px 5px 10px; font-size:.8rem; }
.ql-tim { margin-bottom:6px; }
.ql-dong { display:flex; align-items:center; gap:10px; padding:10px 0; border-bottom:1px solid var(--vien); }
.ql-dong:last-child { border-bottom:0; }
.ql-dong[hidden] { display:none; }
a.ql-dong { color:inherit; text-decoration:none; -webkit-tap-highlight-color:transparent; }
a.ql-dong:hover .ql-dong-ten strong, a.ql-dong:active .ql-dong-ten strong { color:var(--chinh); }
.ql-dong-ten { flex:1; min-width:0; display:flex; flex-direction:column; line-height:1.3; }
.ql-dong-ten strong { font-size:.88rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ql-dong-ten small { font-size:.74rem; color:var(--muc-mo); }
.ql-gio { padding:3px 8px; border-radius:7px; background:#f3f2ee; font-size:.78rem; font-weight:600; font-variant-numeric:tabular-nums; }
.ql-xem-them { width:100%; margin-top:6px; padding:10px; border:0; border-top:1px solid var(--vien); background:transparent; font-weight:700; font-size:.84rem; cursor:pointer; text-align:left; }
.tt-chip { flex:0 0 auto; padding:3px 10px; border-radius:7px; font-size:.74rem; font-weight:700; white-space:nowrap; }
.tt-chip--dung { background:#e6f4ea; color:#257a43; }
.tt-chip--tre { background:#fbe7e5; color:#b8483f; }
.tt-chip--tre_duyet { background:#fff4dc; color:#8a6a1e; }
.tt-chip--nghi { background:#3b7dd8; color:#fff; }
.tt-chip--khong_phep { background:var(--den); color:#fff; }
.tt-chip--chua { background:#f0efeb; color:var(--muc-mo); }
.tt-chip--cty_nghi { background:#fdecea; color:#c0392b; }

/* ---- Chấm công: lịch tháng ---- */
.cc-nguoi { display:flex; align-items:center; gap:12px; padding:12px 14px; }
.cc-nguoi strong { display:block; font-size:.95rem; line-height:1.3; }
.cc-nguoi small { color:var(--muc-mo); font-size:.76rem; }
.cc-dong-ho { display:flex; flex-direction:column; align-items:flex-end; line-height:1.2; }
.cc-dong-ho span { font-size:.72rem; color:var(--muc-mo); }
.cc-dong-ho strong { font-size:1.15rem; font-variant-numeric:tabular-nums; }
.cc-lich { padding:14px; }
.cc-lich-dau { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.cc-lich-dau strong { font-size:1.05rem; }
.cc-lich-dau a, .cc-lich-dau span { width:36px; height:36px; display:grid; place-items:center; border-radius:50%; font-size:1.1rem; color:var(--muc); transition:.14s ease; }
.cc-lich-dau a .ic, .cc-lich-dau span .ic { width:18px; height:18px; vertical-align:0; }
.cc-lich-dau a:hover { background:var(--nen); }
.cc-luoi { display:grid; grid-template-columns:repeat(7,1fr); gap:6px; justify-items:center; }
.cc-thu { font-size:.72rem; font-weight:700; color:var(--muc-mo); padding-bottom:2px; }
.cc-o { position:relative; width:100%; max-width:44px; aspect-ratio:1; border-radius:50%; border:0; display:grid; place-items:center; font:inherit; font-weight:700; font-size:.85rem; cursor:pointer; background:#f0efeb; color:var(--muc-nhat); }
.cc-o--dung { background:#2f9e57; color:#fff; }
.cc-o--tre { background:#d64538; color:#fff; }
.cc-o--som { background:#e8892b; color:#fff; }
.cc-o--nghi_phep { background:#3b7dd8; color:#fff; }
.cc-o--nghi_kp { background:var(--den); color:#fff; }
.cc-o--cty_nghi { background:transparent; color:#c0392b; font-weight:600; opacity:.7; }
.cc-o--trong { background:#fff; color:var(--muc-mo); border:1px dashed var(--vien-dam); }
.cc-o--chua { background:#fff; color:var(--muc); border:1px solid var(--vien-dam); }
.cc-o--hn { box-shadow:0 0 0 3px #fff, 0 0 0 5px var(--chinh); }
.cc-o--chon { outline:2px solid var(--chinh); outline-offset:2px; }
.cc-cham-don { position:absolute; top:-1px; right:-1px; width:9px; height:9px; border-radius:50%; background:var(--chinh); border:2px solid #fff; }
.cc-chu-giai { display:flex; flex-wrap:wrap; justify-content:center; gap:6px 14px; margin:12px 0 4px; font-size:.74rem; color:var(--muc-mo); }
.cc-chu-giai span { display:inline-flex; align-items:center; gap:5px; }
.cc-ch { width:10px; height:10px; border-radius:50%; display:inline-block; }
.cc-ch--dung { background:#2f9e57; } .cc-ch--tre { background:#d64538; } .cc-ch--som { background:#e8892b; } .cc-ch--nghi_phep { background:#3b7dd8; } .cc-ch--nghi_kp { background:var(--den); } .cc-ch--tuong_lai { background:#dcdad4; } .cc-ch--cty_nghi { background:transparent; border:1.5px solid #c0392b; opacity:.7; } .cc-ch--don { width:8px; height:8px; background:var(--chinh); box-shadow:0 0 0 2px #fff, 0 0 0 3px var(--vien-dam); }
.cc-chi-tiet { margin-top:10px; padding:10px 12px; border-radius:10px; background:var(--chinh-nhat); font-size:.82rem; }
.cc-chi-tiet b { display:block; margin-bottom:2px; }
.cc-form { margin-top:12px; }
.cc-ghi-chu { margin-bottom:8px; }
.cc-hom-nay { margin-top:12px; padding:10px 12px; border-radius:10px; background:#f6f5f2; font-size:.86rem; text-align:center; }
.cc-hom-nay .ic { vertical-align:-3px; color:var(--hoan-thanh); }
/* Thống kê tháng kiêm chú thích màu: mỗi ô mang đúng màu ô ngày trên lịch */
.cc-tk { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:6px; margin:16px 0 2px; }
.cc-tk-o { display:flex; flex-direction:column; align-items:center; justify-content:flex-start; gap:3px; min-width:0; padding:9px 3px 8px; border-radius:10px; background:#f3f2ee; }
.cc-tk-o strong { font-size:1.4rem; font-weight:800; line-height:1.05; letter-spacing:-.02em; font-variant-numeric:tabular-nums; color:var(--den); }
.cc-tk-o span { font-size:.68rem; font-weight:600; line-height:1.2; color:var(--muc-mo); text-align:center; }
.cc-tk-o--dung { background:#eaf6ee; } .cc-tk-o--dung strong { color:#2f9e57; }
.cc-tk-o--tre { background:#fcecea; } .cc-tk-o--tre strong { color:#d64538; }
.cc-tk-o--som { background:#fdf1e4; } .cc-tk-o--som strong { color:#d9761a; }
.cc-tk-o--nghi_phep { background:#e9f1fc; } .cc-tk-o--nghi_phep strong { color:#3b7dd8; }
.cc-tk-o--nghi_kp { background:#ecebe7; }
.cc-tk-o--thieu_ra { background:#f3edfc; } .cc-tk-o--thieu_ra strong { color:#7a4cc0; }
/* Viền = tình trạng giờ ra, nền = giờ vào (1 ngày có thể vừa đúng giờ vừa quên ra) */
.cc-o--ra-thieu_ra { box-shadow:inset 0 0 0 3px #8e5cc7, inset 0 0 0 5px #fff; }
.cc-o--ra-som { box-shadow:inset 0 0 0 3px #e8892b, inset 0 0 0 5px #fff; }
.cc-o--hn.cc-o--ra-som { box-shadow:inset 0 0 0 3px #e8892b, inset 0 0 0 5px #fff, 0 0 0 3px #fff, 0 0 0 5px var(--chinh); }
.cc-ch--vien { background:linear-gradient(90deg, #e8892b 50%, #8e5cc7 50%); }
.cc-thieu-ra { display:flex; align-items:center; gap:8px; margin-top:12px; padding:10px 12px; border-radius:10px; background:#f3edfc; color:#5e3a9e; font-size:.8rem; font-weight:600; text-decoration:none; }
.cc-thieu-ra .ic { flex:0 0 auto; }
.cc-chu-giai--phu { margin-top:10px; font-size:.7rem; gap:4px 12px; }
.cc-ca { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; padding:12px 14px; font-size:.84rem; }
.cc-ca strong { font-variant-numeric:tabular-nums; }
@media (max-width:380px) {
  .cc-tk { gap:4px; }
  .cc-tk-o { padding:8px 2px 7px; }
  .cc-tk-o strong { font-size:1.2rem; }
  .cc-tk-o span { font-size:.62rem; }
}

/* ---- Thẻ chấm công hôm nay trên Tổng quan ---- */
.hero-cc { display:flex; align-items:center; gap:14px; }
.hero-cc-noi-dung { flex:1; min-width:0; }
.hero-cc-nhan { font-size:.7rem; text-transform:uppercase; letter-spacing:.08em; color:var(--muc-nhat); font-weight:700; }
.hero-cc-tieu-de { font-size:1.05rem; font-weight:700; margin-top:3px; }
.hero-cc-phu { font-size:.78rem; margin-top:3px; color:var(--muc-mo); }
.stat-card-icon--do { background:#fbe7e5; color:var(--lam-lai); }
@media (max-width:680px) {
  .hero-cc { flex-wrap:wrap; gap:12px; }
  .hero-cc > .nut { width:100%; min-height:44px; }
}

/* ---- Cảnh báo việc 0 sao ---- */
.the-0sao { border-left:3px solid var(--lam-lai); margin-bottom:18px; }
.the-0sao .hero-cc-nhan, .the-0sao .hero-cc-tieu-de { color:var(--lam-lai); }
.ds-0sao { display:flex; flex-direction:column; gap:8px; margin-top:12px; }
.dong-0sao { display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap; padding:9px 11px; border:1px solid var(--vien); border-radius:var(--bk-n); background:#fff; }
.dong-0sao > a { font-weight:600; min-width:0; }
.dong-0sao-phu { display:flex; gap:8px; align-items:center; font-size:.8rem; color:var(--muc-mo); }
.sao-0 { color:var(--lam-lai); font-weight:700; font-size:.72rem; }

/* ---- Meta trên thẻ việc: icon nhỏ trước người nhận / hạn ---- */
.viec-the-cuoi > span, .viec-phu > .viec-meta { display:inline-flex; align-items:center; gap:4px; min-width:0; }
.viec-the-cuoi > span:first-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.viec-the-cuoi .ic, .viec-phu .viec-meta .ic { width:13px; height:13px; color:var(--muc-nhat); }
.viec-the-cuoi .qua-han .ic, .viec-phu .qua-han .ic { color:var(--lam-lai); }

/* ---- Trang chi tiết việc ---- */
.dong-tt > span:first-child .ic { width:14px; height:14px; margin-right:6px; vertical-align:-2px; color:var(--muc-nhat); }
.yeu-cau-hop { background:var(--chinh-nhat); border-left:3px solid var(--chinh); border-radius:var(--bk-n); padding:10px 12px; margin:8px 0 6px; }
.yeu-cau-hop-nhan { display:flex; align-items:center; gap:6px; font-size:.68rem; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:var(--chinh-dam); margin-bottom:4px; }
.yeu-cau-hop-nhan .ic { width:14px; height:14px; }
.ghi-chu-hop { background:var(--nen); border:1px solid var(--vien); border-radius:var(--bk-n); padding:10px 12px; margin-bottom:10px; }
.ghi-chu-hop:last-child { margin-bottom:0; }
.ghi-chu-hop-dau { display:flex; align-items:center; gap:6px; flex-wrap:wrap; font-size:.82rem; font-weight:600; margin-bottom:3px; }
.ghi-chu-hop-dau .ic { width:14px; height:14px; color:var(--muc-nhat); }
.ghi-chu-hop-than { font-size:.88rem; white-space:pre-wrap; }
.ghi-chu-hop-gio { font-size:.72rem; color:var(--muc-nhat); margin-top:4px; }
.ghi-chu-hop--lam-lai { border-left:3px solid var(--lam-lai); }
.ghi-chu-hop--dat { border-left:3px solid var(--hoan-thanh); }

/* ---- Điện thoại / máy tính bảng: menu dưới thay cho sidebar ---- */
@media (max-width: 1023px) {
  .menu-button { display:none; }
  .topbar-brand-mobile { margin-left:0; }
  .content-wrap { padding-bottom:calc(96px + env(safe-area-inset-bottom)); }
  .bottom-nav {
    display:grid; grid-template-columns:repeat(5,1fr); align-items:center;
    position:fixed; left:0; right:0; bottom:0; z-index:80;
    padding:6px 8px calc(6px + env(safe-area-inset-bottom));
    background:rgba(255,255,255,.96); backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px);
    border-top:1px solid var(--vien); box-shadow:0 -4px 20px rgba(28,28,26,.06);
  }
  .bn-muc {
    position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center;
    gap:3px; padding:6px 2px; border-radius:12px;
    font-size:.67rem; font-weight:600; color:var(--muc-mo);
    white-space:nowrap; letter-spacing:-.01em; min-width:0; transition:.15s ease;
  }
  .bn-icon { width:24px; height:24px; display:grid; place-items:center; line-height:1; transition:transform .15s ease; }
  .bn-icon .ic { width:20px; height:20px; vertical-align:0; }
  .bn-muc.active { color:var(--chinh-dam); font-weight:700; }
  .bn-muc.active .bn-icon { color:var(--chinh-dam); transform:translateY(-1px); }
  .bn-muc:not(.bn-muc--giua).active::after {
    content:""; position:absolute; top:1px; width:18px; height:2.5px;
    border-radius:99px; background:var(--chinh);
  }
  .bn-muc--giua {
    margin:0 4px; padding:7px 2px; border-radius:14px;
    background:linear-gradient(135deg, var(--chinh) 0%, var(--chinh-dam) 100%);
    color:#fff; box-shadow:0 4px 12px rgba(169,130,42,.32);
  }
  .bn-muc--giua .bn-icon { color:#fff !important; }
  .bn-muc--giua.active { background:var(--den); color:#fff; box-shadow:0 4px 12px rgba(26,26,24,.28); }
  .bn-dem { position:absolute; top:0; right:calc(50% - 22px); min-width:18px; height:18px; padding:0 5px; border-radius:9px; background:#d64538; color:#fff; font-size:.64rem; font-weight:700; display:grid; place-items:center; border:2px solid #fff; }
  /* Bong bóng AI nổi che nội dung trên điện thoại -> ẩn, mở bằng nút "Trợ lý AI" trên thanh đầu trang */
  body.da-dang-nhap .tl-chat-nut, body.da-dang-nhap .tl-loi-chao { display:none !important; }
  body.da-dang-nhap .topbar-ai { display:inline-flex; }
  .topbar-brand-mobile strong { white-space:nowrap; }
}
@media (max-width: 680px) {
  .hub-luoi { grid-template-columns:1fr; gap:10px; }
  .loai-don-luoi { grid-template-columns:1fr 1fr; }
  .ql-so-lieu strong { font-size:1.6rem; }
  .ql-so-lieu span { font-size:.7rem; }
  input[type=time] { font-size:16px; }
  .don-dong--doi { gap:8px; }
  .cc-luoi { gap:5px; }
}

/* ---- Lương & Khen thưởng ---- */
.luong-thang { display:flex; align-items:center; justify-content:space-between; padding:10px 14px; }
.luong-thang a { width:34px; height:34px; display:grid; place-items:center; border-radius:50%; color:var(--muc); transition:.14s ease; }
.luong-thang a:hover { background:var(--chinh-nhat); color:var(--chinh-dam); }

/* Tổng hợp bảng lương tháng */
.luong-tong { display:flex; flex-direction:column; gap:12px; }
.luong-tong-chinh {
  display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap;
  padding:14px 16px; border-radius:12px;
  background:linear-gradient(135deg, #fffaf0 0%, #f5ebd1 100%);
  border:1px solid #eadcbe;
}
.luong-tong-chinh span { display:block; font-size:.74rem; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:var(--chinh-dam); }
.luong-tong-chinh strong { display:block; font-size:1.6rem; font-weight:800; letter-spacing:-.02em; color:var(--den); font-variant-numeric:tabular-nums; margin-top:2px; }
.luong-tong-luoi { display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:8px; }
.luong-tong-o { display:flex; flex-direction:column; gap:3px; min-width:0; padding:10px 12px; border-radius:10px; background:#f8f7f4; border:1px solid var(--vien); }
.luong-tong-o span { font-size:.72rem; color:var(--muc-mo); font-weight:500; }
.luong-tong-o strong { font-size:1rem; font-weight:700; font-variant-numeric:tabular-nums; color:var(--muc); }
.luong-tong .do, .luong-the-so .do, .luong-nv-ten .do, .luong-toi-o .do { color:#b8483f; }
.luong-tong .xanh, .luong-the-so .xanh, .luong-toi-o .xanh { color:#257a43; }

/* Thẻ lương từng nhân viên / vị trí */
a.luong-the { display:block; color:inherit; text-decoration:none; transition:.15s ease; }
a.luong-the[hidden] { display:none; }
a.luong-the:hover { border-color:var(--vien-dam); box-shadow:0 4px 14px rgba(28,28,26,.06); transform:translateY(-1px); }
.luong-the-dau { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.luong-the-nguoi { display:flex; align-items:center; gap:10px; min-width:0; flex:1; }
.luong-the-dau strong { display:block; font-size:.95rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.luong-the-dau small { display:block; font-size:.76rem; color:var(--muc-mo); margin-top:2px; }
.luong-the-tien { text-align:right; flex:0 0 auto; }
.luong-the-tien strong { font-size:1.12rem; font-weight:800; color:var(--chinh-dam); font-variant-numeric:tabular-nums; }
.luong-thanh-cong { height:5px; border-radius:99px; background:#eeece6; overflow:hidden; margin-top:10px; }
.luong-thanh-cong > span { display:block; height:100%; border-radius:99px; background:linear-gradient(90deg, var(--chinh) 0%, #2f9e57 100%); }
.luong-the-so { display:flex; flex-wrap:wrap; align-items:center; gap:6px 12px; margin-top:9px; padding-top:9px; border-top:1px dashed var(--vien); font-size:.76rem; color:var(--muc-mo); }
.luong-the-so b { color:var(--muc); font-variant-numeric:tabular-nums; }
.luong-chip { display:inline-flex; align-items:center; gap:4px; padding:2px 8px; border-radius:99px; font-size:.72rem; font-weight:600; }
.luong-chip--xanh { background:#eaf6ee; color:#257a43; }
.luong-chip--xanh b { color:#1e6637; }
.luong-chip--do { background:#fcecea; color:#b8483f; }
.luong-chip--do b { color:#9b3a32; }
.luong-tag { display:inline-block; padding:1px 6px; border-radius:6px; background:#fff4dc; color:#8a6a1e; font-size:.68rem; font-weight:700; }

/* Form mẫu lương & vị trí nhân viên */
.luong-khoan { display:flex; flex-direction:column; gap:6px; margin-bottom:6px; }
.luong-khoan-dong { display:grid; grid-template-columns:minmax(0,1fr) 140px 36px; gap:6px; align-items:center; }
.luong-khoan-xoa { width:36px; height:36px; display:grid; place-items:center; border:1px solid var(--vien); border-radius:9px; background:#fff; color:var(--muc-mo); cursor:pointer; transition:.14s ease; flex:0 0 auto; }
.luong-khoan-xoa:hover { color:#b8483f; border-color:#e8b4b0; background:#fdf3f2; }
.luong-khoan-xoa .ic { width:15px; height:15px; }
.luong-form-tong { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:12px 14px; border-radius:10px; background:var(--chinh-nhat); border:1px solid #eadcbe; margin:4px 0; }
.luong-form-tong span { font-size:.82rem; font-weight:600; color:var(--muc); }
.luong-form-tong strong { font-size:1.2rem; font-weight:800; color:var(--chinh-dam); font-variant-numeric:tabular-nums; }
.luong-nv-dong[hidden] { display:none !important; }
.luong-nv-ten { flex:1; min-width:0; display:flex; flex-direction:column; line-height:1.35; }
.luong-nv-ten small { font-size:.74rem; color:var(--muc-mo); }
.luong-nv-ten .luong-sap-toi { color:#8a6a1e; font-weight:600; }
.luong-nv-muc { font-size:.82rem; font-weight:700; color:var(--chinh-dam); font-variant-numeric:tabular-nums; padding:3px 9px; border-radius:8px; background:var(--chinh-nhat); flex:0 0 auto; }
.luong-moc { display:flex; align-items:center; gap:12px; }
.luong-moc strong { display:block; }
.luong-moc small { display:block; font-size:.75rem; color:var(--muc-mo); margin-top:2px; }
.luong-moc--hien-tai { border-left:4px solid var(--chinh); background:#fffdf8; }

/* Khen thưởng & Lương của tôi */
.luong-toi { text-align:center; background:linear-gradient(135deg, #fffaf0 0%, #f5ebd1 100%); border-color:#eadcbe; }
.luong-toi-nhan { display:inline-flex; align-items:center; gap:5px; padding:3px 10px; border-radius:99px; background:rgba(255,255,255,.75); border:1px solid #eadcbe; font-size:.73rem; color:var(--chinh-dam); font-weight:700; }
.luong-toi-so { display:block; font-size:2.1rem; font-weight:800; letter-spacing:-.025em; color:var(--den); font-variant-numeric:tabular-nums; margin:6px 0 10px; }
.luong-toi-cong { max-width:380px; margin:0 auto 12px; text-align:left; background:rgba(255,255,255,.65); padding:8px 12px 10px; border-radius:10px; border:1px solid rgba(234,220,190,.8); }
.luong-toi-cong-dau { display:flex; justify-content:space-between; align-items:center; font-size:.75rem; color:var(--muc-mo); margin-bottom:5px; }
.luong-toi-cong-dau b { color:var(--muc); font-variant-numeric:tabular-nums; }
.luong-toi-cong .luong-thanh-cong { margin-top:0; background:#e6dec8; height:6px; }
.luong-toi-luoi { display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:8px; }
.luong-toi-o { display:flex; flex-direction:column; gap:2px; padding:8px 6px; border-radius:10px; background:rgba(255,255,255,.85); border:1px solid rgba(234,220,190,.8); }
.luong-toi-o span { font-size:.69rem; color:var(--muc-mo); font-weight:600; }
.luong-toi-o b { font-size:.9rem; font-weight:700; color:var(--muc); font-variant-numeric:tabular-nums; }
.luong-toi-du-kien { display:flex; align-items:center; justify-content:center; gap:8px; margin-top:10px; padding:9px 12px; border-radius:10px; background:#fff; border:1px dashed var(--chinh); font-size:.8rem; text-align:left; }
.luong-toi-du-kien .ic { color:var(--chinh); flex:0 0 auto; }
.luong-kt-icon { width:36px; height:36px; flex:0 0 auto; display:grid; place-items:center; border-radius:50%; background:#fff4dc; color:#c08a1e; }
.luong-kt-ly-do { font-size:.84rem; color:var(--muc); margin-top:1px; }
.luong-kt-so { flex:0 0 auto; font-size:.92rem; font-weight:800; color:#257a43; background:#eaf6ee; padding:4px 10px; border-radius:99px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.luong-goi-y-tien { display:flex; flex-wrap:wrap; gap:6px; margin:-4px 0 10px; }
.tab-chip-nut { border:1px solid var(--vien); background:#fff; border-radius:99px; padding:5px 12px; font:inherit; font-size:.76rem; font-weight:600; color:var(--muc); cursor:pointer; transition:.14s ease; }
.tab-chip-nut:hover { border-color:var(--chinh); color:var(--chinh-dam); background:var(--chinh-nhat); }
.tab-chip-nut.active { background:var(--chinh); border-color:var(--chinh); color:#fff; }

/* ---- Phiếu thanh toán lương (xem trên web & in A4) ---- */
.phieu-luong { background:#fff; border:1px solid var(--vien); border-radius:14px; padding:0 20px 22px; max-width:820px; margin:0 auto; color:#1c1c1a; overflow:hidden; box-shadow:var(--bong); }
.pl-banner { display:block; width:calc(100% + 40px); max-width:none; margin:0 -20px 0; height:auto; border-bottom:3px solid var(--chinh); }
.pl-dau { display:flex; justify-content:space-between; align-items:flex-end; gap:12px; text-align:left; border-bottom:1px solid #e7e1d2; padding:12px 0 10px; margin-bottom:0; }
.pl-dau-cty b { display:block; font-size:.95rem; font-weight:800; letter-spacing:.08em; color:var(--den); }
.pl-dau-cty small { display:block; font-size:.72rem; letter-spacing:.06em; color:var(--muc-mo); text-transform:uppercase; }
.pl-dau-so { display:flex; flex-direction:column; align-items:flex-end; font-size:.74rem; color:var(--muc-mo); line-height:1.5; }
.pl-dau-so b { color:var(--den); font-variant-numeric:tabular-nums; }
.pl-tieu-de { text-align:center; padding:16px 0 12px; }
.pl-tieu-de h1 { margin:0; font-size:1.45rem; font-weight:800; letter-spacing:.1em; color:var(--den); }
.pl-tieu-de h1::after { content:""; display:block; width:64px; height:3px; margin:8px auto 0; border-radius:2px; background:var(--chinh); }
.pl-tieu-de .pl-ky { margin-top:8px; font-size:.82rem; color:var(--muc-mo); }
.pl-tt { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:6px 18px; margin-bottom:14px; font-size:.84rem; border:1px solid #e7e1d2; border-radius:10px; padding:8px 14px; background:#fdfbf6; }
.pl-tt div { display:flex; justify-content:space-between; gap:8px; border-bottom:1px dashed #e7e1d2; padding:6px 0; }
.pl-tt div:nth-last-child(-n+2) { border-bottom:0; }
.pl-tt span { color:var(--muc-mo); }
.pl-tt b { text-align:right; }
.pl-bang { width:100%; border-collapse:collapse; font-size:.82rem; min-width:520px; }
.pl-bang th { background:var(--chinh); color:#fff; font-weight:700; padding:8px; text-align:left; }
.pl-bang td { padding:7px 8px; border-bottom:1px solid #eeece6; vertical-align:top; }
.pl-bang th, .pl-bang td { white-space:normal; }
.pl-bang .so { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
.pl-bang td small { display:block; font-size:.72rem; color:var(--muc-mo); }
.pl-bang td small.pl-chi-dt { display:none; }
.pl-nhom td { background:#f6f1e4; font-weight:700; }
.pl-dong-thuong td { color:#1e6637; font-weight:500; background:#f6fbf8; }
.pl-nhom--tru td { background:#fbeceb; color:#9b3a32; }
.pl-tru td { color:#9b3a32; }
.pl-tong td { background:#efe6cf; font-weight:800; }
.pl-thuc-linh { display:flex; justify-content:space-between; align-items:center; margin-top:14px; padding:12px 14px; border-radius:10px; background:var(--den); color:#fff; }
.pl-thuc-linh span { font-weight:700; letter-spacing:.08em; }
.pl-thuc-linh strong { font-size:1.4rem; font-variant-numeric:tabular-nums; color:#f1d58a; }
.pl-bang-chu { margin-top:8px; font-size:.84rem; }
.pl-ky-ten { margin-top:18px; }
.pl-ngay { text-align:right; font-size:.82rem; font-style:italic; margin-bottom:8px; }
.pl-ky-cot { display:grid; grid-template-columns:repeat(3, 1fr); text-align:center; font-size:.84rem; }
.pl-ky-cot div { display:flex; flex-direction:column; }
.pl-ky-cot small { color:var(--muc-mo); font-size:.72rem; }
.pl-ky-cot span { margin-top:56px; font-weight:700; }
.pl-chan { margin-top:18px; padding-top:10px; border-top:1px solid #e7e1d2; font-size:.7rem; color:var(--muc-mo); text-align:center; font-style:italic; }

@media (max-width: 680px) {
  .luong-tong-luoi { grid-template-columns:repeat(2, minmax(0,1fr)); }
  .luong-tong-chinh strong { font-size:1.35rem; }
  .luong-toi-so { font-size:1.75rem; }
  .luong-nv-muc { display:none; }
}
@media (max-width: 600px) {
  .phieu-luong { padding:0 12px 16px; border-radius:10px; }
  .pl-banner { width:calc(100% + 24px); margin:0 -12px; }
  .pl-tieu-de h1 { font-size:1.05rem; letter-spacing:.04em; }
  .pl-tieu-de .pl-ky { font-size:.74rem; }
  .pl-dau { flex-direction:column; align-items:flex-start; gap:4px; }
  .pl-dau-so { flex-direction:row; flex-wrap:wrap; gap:2px 12px; align-items:baseline; }
  .pl-dau-cty b { font-size:.82rem; }
  .pl-tt { grid-template-columns:1fr; padding:6px 12px; }
  .pl-tt div { flex-wrap:wrap; }
  .pl-tt div:nth-last-child(2) { border-bottom:1px dashed #e7e1d2; }
  .luong-khoan-dong { grid-template-columns:minmax(0,1fr) 110px 34px; }
  .pl-bang { min-width:0; font-size:.76rem; }
  .pl-bang .pl-phu { display:none; }
  .pl-bang td small.pl-chi-dt { display:block; }
  .pl-bang th { font-size:.66rem; padding:6px 5px; }
  .pl-bang td { padding:6px 5px; }
  .pl-bang td small { font-size:.66rem; }
  .pl-thuc-linh strong { font-size:1.18rem; }
  .pl-ky-cot { font-size:.74rem; }
  .pl-ky-cot span { margin-top:44px; }
}
@media print {
  @page { size:A4; margin:12mm; }
  body { background:#fff !important; }
  .sidebar, .topbar, .bottom-nav, .khong-in, .tl-chat-nut, .tl-loi-chao, .tl-chat-khung, .flash-wrap, .thong-bao { display:none !important; }
  .app-main, .content-wrap { margin:0 !important; padding:0 !important; max-width:none !important; }
  .phieu-luong { border:0; padding:0 !important; max-width:none; box-shadow:none; }
  .pl-banner { width:100%; margin:0; }
  .pl-tt { display:grid; grid-template-columns:1fr 1fr; }
  .pl-bang { min-width:0; font-size:.8rem !important; }
  .pl-bang .pl-phu { display:table-cell !important; }
  .pl-bang td small.pl-chi-dt { display:none !important; }
  .pl-banner, .pl-tt, .pl-tieu-de h1::after, .pl-bang th, .pl-nhom td, .pl-tong td, .pl-thuc-linh { -webkit-print-color-adjust:exact; print-color-adjust:exact; }
  .pl-ky-ten, .pl-chan { break-inside:avoid; }
}

/* ==== Công việc của tôi / bộ nhiệm vụ (nv-*) ==== */
.nv-ngay-chip { display:inline-flex; align-items:center; gap:6px; padding:7px 12px; border:1px solid var(--vien); border-radius:10px; background:#fff; font-size:.8rem; font-weight:700; }
.nv-phu-de { display:flex; align-items:center; flex-wrap:wrap; gap:6px 8px; margin-top:2px; }
.nv-nguoi { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.nv-nguoi .nv-nguoi-avatar { width:48px; height:48px; font-size:1.15rem; flex:0 0 auto; }
.nv-nguoi-thong-tin { flex:1; min-width:160px; }
.nv-nguoi-ten-hang { display:flex; align-items:center; flex-wrap:wrap; gap:6px 8px; }
.nv-nguoi strong { font-size:1rem; line-height:1.25; }
.nv-nguoi small { display:block; font-size:.76rem; color:var(--muc-mo); margin-top:2px; }
.nv-nguoi-hanh-dong { display:flex; gap:6px; flex-wrap:wrap; }
.nv-giai-doan { display:inline-flex; align-items:center; padding:2px 10px; border-radius:99px; font-size:.7rem; font-weight:800; background:var(--chinh); color:#fff; white-space:nowrap; }
.nv-giai-doan--thu_viec { background:#e9f1fc; color:#2f6fc4; }
.nv-giai-doan--phat_huy { background:#1c1c1a; color:#f1d58a; }
.nv-che-do { display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:6px; margin-bottom:14px; overflow:visible; }
.nv-che-do--2 { grid-template-columns:repeat(2, minmax(0,1fr)); }
.nv-che-do a { display:inline-flex; align-items:center; justify-content:center; gap:5px; padding:8px 6px; text-align:center; }

/* Lịch tháng nhiệm vụ */
.nv-lich-tieu-de { display:flex; align-items:center; gap:8px; }
.nv-hom-nay-nut { padding:3px 10px; border:1px solid var(--chinh); border-radius:99px; background:#fffaf0; color:var(--chinh-dam); font-size:.72rem; font-weight:700; text-decoration:none; }
.nv-luoi { display:grid; grid-template-columns:repeat(7, minmax(0,1fr)); row-gap:4px; margin-top:6px; }
.nv-luoi > div { display:flex; justify-content:center; }
.nv-luoi .nv-tuan-chon { background:#fff6de; }
.nv-luoi .nv-tuan-chon:nth-child(7n+8), .nv-luoi .cc-thu + .nv-tuan-chon { border-radius:12px 0 0 12px; }
.nv-luoi .nv-tuan-chon:nth-child(7n+14), .nv-luoi .nv-tuan-chon:last-child { border-radius:0 12px 12px 0; }
.nv-o-boc { padding:3px 0; }
.nv-o { position:relative; width:100%; max-width:44px; aspect-ratio:1; border-radius:50%; display:flex; flex-direction:column; align-items:center; justify-content:center;
  background:#f2f1ed; color:var(--muc); text-decoration:none; font-weight:800; font-size:.88rem; line-height:1; transition:.12s ease; }
.nv-o:hover { background:#e7e5de; }
.nv-o--nghi { background:transparent; color:#c0392b; opacity:.72; }
.nv-o--hn { background:var(--chinh); color:#fff; }
.nv-o--hn:hover { background:var(--chinh-dam); }
.nv-o--chon { box-shadow:0 0 0 2px #fff, 0 0 0 4px var(--den); }
.nv-cham { position:absolute; bottom:5px; left:50%; transform:translateX(-50%); display:flex; gap:2.5px; }
.nv-cham b, .nv-ch { width:6px; height:6px; border-radius:50%; display:inline-block; }
.nv-ch--hn { background:var(--chinh); }
.nv-cham--co_viec { background:#2f6fe4; }
.nv-cham--qua_han { background:#d64538; }
.nv-cham--xong { background:#2f9e57; }
.nv-o--hn .nv-cham b { box-shadow:0 0 0 1.5px #fff; }

/* Mục tiêu tuần & Điểm tuần */
.nv-tuan-dau { display:flex; align-items:center; gap:8px; padding-bottom:12px; margin-bottom:12px; border-bottom:1px solid var(--vien); }
.nv-tuan-giua { flex:1; min-width:0; }
.nv-tuan-giua h2 { margin:0; font-size:.98rem; line-height:1.25; }
.nv-tuan-giua small { display:block; font-size:.73rem; color:var(--muc-mo); }
.nv-tuan-mui { width:34px; height:34px; flex:0 0 auto; display:grid; place-items:center; border-radius:50%; border:1px solid var(--vien); background:#fafafa; color:var(--muc); transition:.14s ease; }
.nv-tuan-mui:hover { background:var(--chinh-nhat); border-color:var(--chinh); color:var(--chinh-dam); }
.nv-tuan-nay { padding:5px 11px; border:1px solid var(--chinh); border-radius:99px; font-size:.74rem; font-weight:700; color:var(--chinh-dam); text-decoration:none; background:#fffaf0; white-space:nowrap; }
.nv-mt { display:flex; gap:12px; padding:11px 0; border-bottom:1px solid var(--vien); }
.nv-mt:last-of-type { border-bottom:0; }
.nv-mt-icon { width:36px; height:36px; flex:0 0 auto; display:grid; place-items:center; border-radius:10px; background:#f3f2ee; color:var(--muc); }
.nv-mt-icon--xong { background:#eaf6ee; color:#2f9e57; }
.nv-mt-than { flex:1; min-width:0; }
.nv-mt-dong { display:flex; justify-content:space-between; gap:10px; align-items:baseline; }
.nv-mt-dong strong { font-size:.88rem; }
.nv-mt-so { font-size:.8rem; color:var(--muc-mo); white-space:nowrap; font-variant-numeric:tabular-nums; }
.nv-mt-so b { color:var(--den); }
.nv-thanh { height:7px; border-radius:99px; background:#ecebe6; margin:6px 0 5px; overflow:hidden; }
.nv-thanh i { display:block; height:100%; border-radius:99px; background:linear-gradient(90deg, var(--chinh), #e8b931); }
.nv-thanh--xanh i { background:linear-gradient(90deg, #2f9e57, #57c27e); }
.nv-mt-phu { display:flex; align-items:center; gap:8px; font-size:.73rem; color:var(--muc-mo); margin-top:2px; }
.nv-mt-sua { display:flex; align-items:center; gap:6px; }
.nv-mt-sua button { width:28px; height:28px; border-radius:8px; border:1px solid var(--vien-dam); background:#fff; font-weight:800; font-size:.9rem; cursor:pointer; line-height:1; display:grid; place-items:center; }
.nv-mt-sua button:hover { border-color:var(--chinh); background:var(--chinh-nhat); }
.nv-mt-sua span { min-width:20px; text-align:center; font-weight:800; color:var(--den); font-variant-numeric:tabular-nums; }
.nv-xoa { border:0; background:transparent; color:var(--muc-nhat); cursor:pointer; padding:5px; border-radius:6px; }
.nv-xoa:hover { color:#b8483f; background:#fcecea; }
.nv-mt-quan-ly { display:flex; align-items:flex-start; justify-content:space-between; flex-wrap:wrap; gap:8px; margin-top:10px; padding-top:10px; border-top:1px dashed var(--vien); }
.nv-them-mt { flex:1; min-width:220px; }
.nv-them-mt summary { list-style:none; cursor:pointer; font-weight:700; font-size:.83rem; color:var(--chinh-dam); display:inline-flex; align-items:center; gap:6px; padding:6px 0; }
.nv-them-mt summary::-webkit-details-marker { display:none; }
.nv-them-mt form { display:flex; flex-direction:column; gap:8px; margin-top:8px; }
.nv-them-mt-hang { display:grid; grid-template-columns:minmax(0,1fr) 76px auto; gap:6px; }
.nv-chep-mt-form { flex:0 0 auto; }

.nv-diem { display:flex; gap:14px; align-items:center; padding:12px; margin-bottom:10px; border-radius:12px; background:#f8f7f4; border:1px solid var(--vien); }
.nv-diem-so { width:78px; height:78px; flex:0 0 auto; border-radius:50%; display:flex; flex-direction:column; align-items:center; justify-content:center;
  background:radial-gradient(circle at center, #fff 58%, transparent 59%), conic-gradient(var(--chinh) calc(var(--d, 0) * 1%), #e3e1da 0); }
.nv-diem-so strong { font-size:1.45rem; font-weight:800; line-height:1; }
.nv-diem-so span { font-size:.6rem; color:var(--muc-mo); margin-top:2px; }
.nv-diem-ct { flex:1; min-width:0; }
.nv-diem-dong { display:grid; grid-template-columns:auto minmax(0,1fr) 38px; align-items:center; gap:8px; font-size:.76rem; }
.nv-diem-dong > span { white-space:nowrap; min-width:100px; }
.nv-diem-dong small { color:var(--muc-nhat); }
.nv-diem-dong .nv-thanh { margin:3px 0; }
.nv-diem-dong b { text-align:right; font-variant-numeric:tabular-nums; }

/* Việc theo ngày */
.nv-ngay-dau { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.nv-ngay-tieu-de { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.nv-ngay-dau h2 { margin:0; font-size:1.02rem; }
.nv-hn-tag { padding:2px 8px; border-radius:99px; background:var(--chinh-nhat); color:var(--chinh-dam); font-size:.68rem; font-weight:700; }
.nv-nguon { display:flex; gap:6px; overflow-x:auto; margin:10px 0 4px; padding-bottom:2px; scrollbar-width:none; }
.nv-nguon::-webkit-scrollbar { display:none; }
.nv-nguon button { flex:0 0 auto; border:1px solid var(--vien); background:#fff; border-radius:99px; padding:6px 12px; font:inherit; font-size:.75rem; font-weight:700; color:var(--muc-mo); cursor:pointer; white-space:nowrap; transition:.14s ease; }
.nv-nguon button.active { background:var(--den); border-color:var(--den); color:#fff; }
a.nv-viec { display:flex; align-items:center; gap:10px; padding:11px 0; border-bottom:1px solid var(--vien); color:inherit; text-decoration:none; }
a.nv-viec:last-of-type { border-bottom:0; }
a.nv-viec[hidden] { display:none; }
.nv-viec-gio { flex:0 0 auto; padding:4px 8px; border-radius:8px; background:#f3f2ee; font-size:.76rem; font-weight:800; font-variant-numeric:tabular-nums; }
.nv-viec-gio--tre { background:#fcecea; color:#b8483f; }
.nv-viec-ten { flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.nv-viec-ten b { font-size:.88rem; line-height:1.32; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.nv-viec-ten small { font-size:.72rem; color:var(--muc-mo); }
.nv-viec-mui { color:var(--muc-nhat); display:inline-grid; flex:0 0 auto; }
.nv-tag { display:inline-block; padding:1px 6px; border-radius:6px; font-size:.65rem; font-weight:700; background:#f3f2ee; color:var(--muc-mo); }
.nv-tag--hang_ngay { background:#fff4dc; color:#8a6a1e; }
.nv-tag--quan_ly_giao { background:#e9f1fc; color:#2f6fc4; }
.nv-tag--de_xuat { background:#eaf6ee; color:#257a43; }
.nut--vien-vang { background:#fff; color:var(--chinh-dam); border:1.5px solid var(--chinh); }
.nut--vien-vang:hover { background:#fffaf0; }
.nv-ngay-chan { margin-top:12px; padding-top:12px; border-top:1px dashed var(--vien); display:flex; flex-direction:column; gap:6px; }
.nv-ngay-chan small { display:flex; align-items:center; gap:5px; font-size:.73rem; color:var(--muc-mo); }
.nv-dx-nho { display:flex; justify-content:space-between; gap:10px; align-items:center; padding:11px 14px; border-bottom:1px solid var(--vien); text-decoration:none; color:inherit; }
.nv-dx-nho:last-child { border-bottom:0; }
.nv-dx-nho small { color:var(--muc-mo); font-size:.73rem; white-space:nowrap; }

/* Bộ nhiệm vụ hằng ngày thu gọn */
details.nv-bo-khung { padding:0; overflow:hidden; }
details.nv-bo-khung > summary::after { display:none !important; }
.nv-bo-dau { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:14px 16px; cursor:pointer; }
.nv-bo-dau-trai { display:flex; align-items:center; gap:10px; min-width:0; }
.nv-bo-dau-trai > .ic { width:20px; height:20px; color:var(--chinh-dam); flex:0 0 auto; }
.nv-bo-dau-trai strong { display:block; font-size:.92rem; line-height:1.25; }
.nv-bo-dau-trai small { display:block; font-size:.74rem; color:var(--muc-mo); }
.nv-bo { border-top:1px solid var(--vien); }
.nv-bo-dong { display:flex; align-items:center; gap:12px; padding:10px 16px; border-bottom:1px solid var(--vien); }
.nv-bo-dong:last-child { border-bottom:0; }
.nv-bo-dong strong { display:block; font-size:.86rem; }
.nv-bo-dong small { display:block; font-size:.73rem; color:var(--muc-mo); margin-top:1px; }
.nv-bo-icon { width:36px; height:36px; flex:0 0 auto; display:grid; place-items:center; border-radius:10px; background:#e9f1fc; color:#2f6fc4; }
.nv-bo-icon--vang { background:#fff4dc; color:#8a6a1e; }

.nv-dx-dau { display:flex; gap:10px; align-items:flex-start; }
.nv-dx-dau strong { display:block; font-size:.92rem; }
.nv-dx-dau small { display:block; font-size:.74rem; color:var(--muc-mo); }
.nv-dx-nd { margin-top:8px; font-size:.84rem; white-space:pre-wrap; }

/* Cấu hình nhiệm vụ */
.nv-chon-nhan { display:block; margin:12px 0 6px; font-weight:700; font-size:.84rem; }
.nv-gd-tab { display:grid; grid-template-columns:repeat(3, 1fr); gap:8px; }
.nv-gd-tab a, .nv-gd-tab label { text-align:center; padding:9px 6px; border:1px solid var(--vien-dam); border-radius:10px; background:#fff; font-weight:700; font-size:.84rem; color:var(--muc); text-decoration:none; cursor:pointer; transition:.14s ease; }
.nv-gd-tab a.active, .nv-gd-tab label.active { background:var(--chinh); border-color:var(--chinh); color:#fff; }
.nv-gd-tab--nho { margin:6px 0 10px; }
.nv-gd-tab--nho label { padding:7px 4px; font-size:.78rem; }
.nv-gd-tab--nho input { display:none; }
details.nv-mau { padding:0; }
details.nv-mau > summary { list-style:none; display:flex; align-items:center; gap:12px; padding:12px 14px; cursor:pointer; }
details.nv-mau > summary::-webkit-details-marker { display:none; }
details.nv-mau > summary::after { display:none !important; }
.nv-mau-check { width:28px; height:28px; flex:0 0 auto; display:grid; place-items:center; border:2px solid var(--den); border-radius:8px; }
.nv-mau--tat .nv-mau-check { border-color:var(--muc-nhat); color:var(--muc-nhat); }
.nv-mau-ten { flex:1; min-width:0; display:flex; flex-direction:column; }
.nv-mau-ten b { font-size:.9rem; }
.nv-mau-ten small { font-size:.75rem; color:var(--muc-mo); }
.nv-mau-chip { display:flex; flex-wrap:wrap; gap:4px; margin-top:4px; }
.nv-mau-chip i { font-style:normal; font-size:.66rem; font-weight:700; padding:1px 7px; border-radius:6px; background:#e9f1fc; color:#2f6fc4; }
.nv-mau-chip .nv-mau-chip--vang { background:#fff4dc; color:#8a6a1e; }
.nv-mau-chip .nv-mau-chip--xam { background:#f0efeb; color:var(--muc-mo); }
.nv-mau-sua { color:var(--muc-mo); }
.nv-mau-than { padding:12px 14px 14px; display:flex; flex-direction:column; gap:12px; border-top:1px solid var(--vien); }
.nv-thu { display:flex; flex-wrap:wrap; gap:6px; }
.nv-thu label { cursor:pointer; margin:0; }
.nv-thu input { display:none; }
.nv-thu span { display:inline-block; min-width:38px; text-align:center; padding:6px 8px; border-radius:8px; border:1px solid var(--vien-dam); font-weight:700; font-size:.78rem; }
.nv-thu input:checked + span { background:var(--chinh); border-color:var(--chinh); color:#fff; }
.nv-cong-tac { display:flex; flex-direction:column; justify-content:flex-end; gap:6px; }
.nv-cong-tac label { display:flex; align-items:center; gap:8px; font-weight:600; font-size:.84rem; margin:0; }
.nv-cong-tac input { width:18px; height:18px; accent-color:var(--chinh); }
.nv-giao-ngay { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:10px 12px; border-radius:10px; background:#f6f5f1; border:1px solid var(--vien); }
.nv-giao-ngay-nhan { font-size:.8rem; display:inline-flex; align-items:center; gap:5px; white-space:nowrap; }
.nv-giao-ngay select { flex:1; min-width:150px; }
.nv-giao-ngay input[type=date] { width:auto; flex:0 1 150px; }
details.nv-them > summary, details.nv-nhap > summary { cursor:pointer; font-weight:800; color:var(--chinh-dam); display:flex; align-items:center; gap:8px; }
details.nv-them[open] > summary, details.nv-nhap[open] > summary { margin-bottom:12px; }
.nv-tc-luoi { display:grid; grid-template-columns:repeat(3, 1fr); gap:8px; margin-bottom:8px; }
.nv-tc-o { display:flex; flex-direction:column; align-items:center; gap:4px; padding:10px 6px; border-radius:10px; background:#eaf6ee; font-weight:700; font-size:.8rem; margin:0; }
.nv-tc-so { display:flex; align-items:center; gap:2px; font-size:1.2rem; font-weight:800; color:#2f8a4f; }
.nv-tc-so input { width:56px; min-height:34px; text-align:center; font-size:1.1rem; font-weight:800; color:#2f8a4f; border:1px solid #cfe6d6; background:#fff; padding:2px 4px; }
.nv-mang { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-bottom:6px; font-size:.78rem; }
.nv-mang label { margin:0; }
.nv-mang input { display:none; }
.nv-mang i { font-style:normal; display:inline-block; padding:4px 10px; border-radius:14px; border:1px solid var(--vien-dam); font-weight:700; cursor:pointer; }
.nv-mang input:checked + i { background:#fff4dc; border-color:var(--chinh); color:#8a6a1e; }
.nv-tu-dong { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; font-size:.82rem; }

/* Cần duyệt */
.cd-xong { display:flex; flex-direction:column; align-items:center; gap:6px; padding:32px 16px; text-align:center; }
.cd-xong-icon { width:56px; height:56px; display:grid; place-items:center; border-radius:50%; background:#eaf6ee; color:#2f9e57; }
.cd-xong-icon .ic { width:28px; height:28px; }
.cd-xong small { color:var(--muc-mo); }
a.cd-dong { display:flex; align-items:center; gap:10px; padding:12px 14px; border-bottom:1px solid var(--vien); color:inherit; text-decoration:none; transition:.12s ease; }
a.cd-dong:hover { background:#fdfbf6; }
a.cd-dong:last-child { border-bottom:0; }
.cd-dong-ten { flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.cd-dong-ten b { font-size:.88rem; line-height:1.32; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.cd-dong-ten small { font-size:.74rem; color:var(--muc-mo); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cd-dong-nut { flex:0 0 auto; }
.tieu-khu h2 .ic--sm { vertical-align:-2px; color:var(--chinh-dam); }
.cd-tab { display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:6px; overflow:visible; }
.cd-tab a { justify-content:center; display:inline-flex; align-items:center; gap:5px; padding:9px 8px; border-radius:11px; }
.cd-tong-tien { display:flex; align-items:center; gap:6px; margin-bottom:10px; padding:10px 14px; border-radius:10px; background:#fff4dc; border:1px solid #eadcbe; font-size:.85rem; }
.cd-tien { color:var(--chinh-dam); }
.cd-xem-them { display:inline-flex; margin-top:4px; }
.cd-lich-su { margin-top:12px; }

/* Lịch làm việc nhân viên */
.ql-so-lieu > div, .ql-so-lieu > button { display:flex; flex-direction:column; align-items:center; border-left:1px solid var(--vien); padding:6px 4px; gap:2px; }
.ql-so-lieu > div:first-child, .ql-so-lieu > button:first-child { border-left:0; }
.lnv-thong-ke button { appearance:none; border-top:0; border-right:0; border-bottom:0; background:transparent; cursor:pointer; border-radius:8px; transition:.14s ease; }
.lnv-thong-ke button:hover { background:#faf8f2; }
.lnv-thong-ke button.active { background:var(--chinh-nhat); box-shadow:inset 0 0 0 1.5px var(--chinh); }
.lnv-khung { padding:0; overflow:hidden; }
.lnv-bo-loc { padding:12px 14px; border-bottom:1px solid var(--vien); background:#faf9f7; }
a.lnv-dong { display:flex; align-items:center; gap:12px; padding:12px 14px; border-bottom:1px solid var(--vien); color:inherit; text-decoration:none; transition:.12s ease; }
a.lnv-dong:last-child { border-bottom:0; }
a.lnv-dong[hidden] { display:none; }
a.lnv-dong:hover { background:#fdfbf6; }
.lnv-ten { flex:1; min-width:0; display:flex; flex-direction:column; gap:3px; }
.lnv-ten-hang { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.lnv-ten b { font-size:.92rem; }
.lnv-ten small { font-size:.74rem; color:var(--muc-mo); }
.lnv-gd { padding:1px 8px; font-size:.64rem; }
.lnv-so { display:flex; flex-wrap:wrap; gap:5px; margin-top:2px; }
.lnv-chip { font-style:normal; font-size:.71rem; font-weight:600; padding:2px 8px; border-radius:99px; background:#f2f1ed; color:var(--muc-mo); }
.lnv-chip b { color:var(--den); font-variant-numeric:tabular-nums; }
.lnv-chip--xanh { background:#eaf6ee; color:#257a43; }
.lnv-chip--xanh b { color:#1e6637; }
.lnv-chip--do { background:#fcecea; color:#b8483f; font-weight:700; }
.lnv-chip--vang { background:#fff4dc; color:#8a6a1e; font-weight:700; }

@media (max-width: 700px) {
  .cd-tab { grid-template-columns:repeat(2, minmax(0,1fr)); }
  .cd-tab a { font-size:.8rem; padding:9px 10px; justify-content:flex-start; }
  .cd-tab a .dem-loc { margin-left:auto; }
}
@media (max-width: 600px) {
  .nv-diem { gap:12px; padding:10px; }
  .nv-diem-so { width:68px; height:68px; }
  .nv-diem-so strong { font-size:1.25rem; }
  .nv-diem-dong { font-size:.72rem; gap:6px; }
  .nv-diem-dong > span { min-width:88px; }
  .nv-giao-ngay select, .nv-giao-ngay input[type=date], .nv-giao-ngay .nut { width:100%; flex:1 1 100%; }
  .nv-them-mt-hang { grid-template-columns:1fr 72px; }
  .nv-them-mt-hang .nut { grid-column:1 / -1; }
}
@media (max-width: 480px) {
  .nv-che-do:not(.nv-che-do--2) a .ic { display:none; }
  .nv-che-do a { font-size:.76rem; padding:8px 4px; }
}
