/* Job247 - giao diện danh sách công việc */
:root {
  --green: #1fbf7a; --green-d: #16a368; --blue: #2f6fde; --red: #e5484d; --amber: #f59e0b;
  --ink: #1f2329; --text: #3a3f47; --muted: #8a9099; --line: #e6e8eb; --line2: #f0f1f3; --bg: #fff; --bg2: #f6f7f9; --hover: #f4f6f8;
  --navy: #1d3b8b; --shadow: 0 8px 30px rgba(15, 23, 42, .14); --radius: 8px;
  --font: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.45 var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.hidden, [hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }

/* ---------- Thanh trên ---------- */
.top { height: 56px; display: flex; align-items: center; border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 30; padding: 0 16px 0 0; }
.top__logo { width: 243px; flex: 0 0 243px; display: flex; align-items: center; padding-left: 18px; }
.top__brand { display: inline-flex; border-radius: 8px; }
/* Logo Job247: biểu tượng ✓ + chữ Job247 / Giao việc thông minh */
.brand { display: inline-flex; align-items: center; gap: 9px; line-height: 1; color: var(--ink); }
.brand__mark { width: 34px; height: 34px; flex: 0 0 34px; filter: drop-shadow(0 2px 4px rgba(11, 143, 99, .25)); }
.brand__t { display: flex; flex-direction: column; gap: 3px; }
.brand__t b { font-size: 19px; font-weight: 800; letter-spacing: -.3px; }
.brand__t b em { font-style: normal; color: #11a970; }
.brand__t small { font-size: 9px; font-weight: 700; letter-spacing: 1.1px; text-transform: uppercase; color: var(--muted); }
.brand--lg .brand__mark { width: 48px; height: 48px; flex-basis: 48px; }
.brand--lg .brand__t b { font-size: 26px; }
.brand--lg .brand__t small { font-size: 10.5px; letter-spacing: 1.6px; }
.top__nav { display: flex; height: 100%; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.top__nav a { display: flex; align-items: center; padding: 0 13px; font-size: 14.5px; color: var(--ink); white-space: nowrap; }
.top__nav a:hover { color: var(--green-d); }
.top__nav a.is-active { background: var(--green); color: #fff; font-weight: 600; padding: 0 16px; }
.top__right { display: flex; align-items: center; gap: 14px; margin-left: 12px; }
.icon-btn { width: 36px; height: 36px; border: 0; background: none; border-radius: 50%; display: grid; place-items: center; position: relative; color: var(--ink); }
.icon-btn:hover { background: var(--hover); }
.icon-btn svg { width: 22px; height: 22px; }
.badge { position: absolute; top: 2px; right: 1px; min-width: 17px; height: 17px; border-radius: 9px; background: var(--red); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; border: 2px solid #fff; }
.burger { display: none; }

/* ---------- Ảnh đại diện ---------- */
.av { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-size: 10.5px; font-weight: 700; flex: 0 0 auto; letter-spacing: .2px; }
.av--lg { width: 34px; height: 34px; font-size: 12.5px; }
.av--sm { width: 22px; height: 22px; font-size: 9px; }
.av-stack { display: inline-flex; }
.av-stack .av { border: 2px solid #fff; margin-left: -6px; }
.av-stack .av:first-child { margin-left: 0; }
.who { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Bố cục ---------- */
.shell { display: flex; height: calc(100vh - 56px); }
.side { width: 243px; flex: 0 0 243px; border-right: 1px solid var(--line); display: flex; flex-direction: column; background: #fff; position: relative; z-index: 5; transition: margin .22s ease; }
.shell.side-off .side { margin-left: -243px; }
/* Nút thu gọn / mở thanh bên: hình tròn nằm trên mép thanh bên, luôn nhìn thấy kể cả khi đã thu gọn */
.side__toggle { position: absolute; right: -14px; top: 18px; width: 28px; height: 28px; border-radius: 50%; border: 1px solid #dfe2e6; background: #fff; color: #5b616a; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(15, 23, 42, .12); transition: background .15s, color .15s, border-color .15s, transform .22s ease, box-shadow .15s; }
.side__toggle svg { width: 15px; height: 15px; }
.side__toggle:hover { background: var(--green); border-color: var(--green); color: #fff; box-shadow: 0 3px 10px rgba(31, 191, 122, .35); }
.side__toggle:active { transform: scale(.92); }
.side__toggle:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.shell.side-off .side__toggle { right: -34px; }
.shell.side-off .main { padding-left: 34px; transition: padding .22s ease; }
.shell.side-off .side__toggle svg { transform: rotate(180deg); }
.side__toggle::after { content: attr(data-tip); position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%); background: #1f2329; color: #fff; font-size: 12px; padding: 5px 9px; border-radius: 6px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s; }
.side__toggle:hover::after { opacity: 1; transition-delay: .35s; }
.side__menu { padding: 8px 0 10px; border-bottom: 1px solid var(--line); }
.side__menu a { display: flex; align-items: center; gap: 9px; padding: 7px 18px; font-size: 14.5px; color: var(--ink); }
.side__menu a svg { width: 17px; height: 17px; color: #555b63; }
.side__menu a:hover, .side__menu a.is-active { background: var(--hover); }
.side__menu a.is-active { color: var(--green-d); }
.side__search { display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.side__search input { flex: 1; border: 0; padding: 9px 0 9px 2px; outline: 0; font-size: 13.5px; background: none; }
.side__search input::placeholder { color: #b5b9c0; }
.side__search svg { width: 16px; height: 16px; color: #8a9099; margin-right: 14px; }
.side__scroll { flex: 1; overflow-y: auto; }
.side__group { padding: 10px 0 8px; border-bottom: 1px solid var(--line); }
.side__head { display: flex; align-items: center; justify-content: space-between; padding: 6px 14px; color: #6b7280; font-size: 14px; }
.side__head button { border: 0; background: none; color: #8a9099; font-size: 20px; line-height: 1; padding: 0 4px; }
.side__head button:hover { color: var(--ink); }
.side__proj { display: flex; align-items: center; gap: 8px; padding: 7px 14px 7px 6px; font-size: 13.5px; color: var(--ink); }
.side__proj::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--dot, var(--blue)); margin-left: 0; flex: 0 0 5px; }
.side__proj span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side__proj small { color: var(--muted); font-size: 12px; }
.side__proj:hover { background: var(--hover); }
.side__proj.is-active { background: #eef3fb; }
.side__foot a { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink); }
.side__foot a.blue { color: var(--blue); }
.side__foot svg { width: 17px; height: 17px; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.page { flex: 1; overflow: auto; padding: 22px 28px 40px; }
.page h1 { font-size: 24px; color: var(--ink); margin: 0 0 18px; font-weight: 600; }

/* ---------- Đầu trang dự án ---------- */
.ph { display: flex; gap: 14px; padding: 12px 12px 0; border-bottom: 1px solid var(--line); }
.ph__icon { width: 50px; height: 50px; border-radius: 12px; background: var(--pc, #4a7bd8); display: grid; place-items: center; color: #fff; flex: 0 0 50px; margin-top: 2px; }
.ph__icon svg { width: 30px; height: 30px; }
.ph__title { display: flex; align-items: center; gap: 8px; }
.ph__title h1 { margin: 0; font-size: 28px; font-weight: 500; color: var(--ink); line-height: 1.2; }
.ph__title button { border: 0; background: none; padding: 4px; color: var(--ink); display: grid; place-items: center; border-radius: 6px; }
.ph__title button:hover { background: var(--hover); }
.star svg { width: 24px; height: 24px; color: #c4c8cf; }
.star.on svg { color: #f5b301; fill: #f5b301; }
.tabs { display: flex; gap: 22px; margin-top: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 4px 0 7px; font-size: 14.5px; color: var(--ink); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--green-d); }
.tabs a.is-active { color: var(--green-d); border-color: var(--green); font-weight: 600; }

/* ---------- Thanh công cụ ---------- */
.tb { display: flex; align-items: center; gap: 8px; padding: 11px 16px 6px 20px; flex-wrap: wrap; }
.tb__add { display: inline-flex; border: 1px solid #d5d8dd; border-radius: 4px; overflow: hidden; }
.tb__add button { border: 0; background: #fff; padding: 4px 9px; display: inline-flex; align-items: center; gap: 5px; font-size: 14px; color: var(--ink); }
.tb__add button + button { border-left: 1px solid #d5d8dd; padding: 4px 6px; }
.tb__add button:hover { background: var(--hover); }
.tb__add svg { width: 15px; height: 15px; }
.tb__sp { flex: 1; }
.tbtn { border: 0; background: none; padding: 5px 7px; border-radius: 4px; font-size: 12px; color: var(--ink); display: inline-flex; align-items: center; gap: 4px; }
.tbtn.box { border: 1px solid #dfe2e6; padding: 4px 8px; }
.tbtn:hover { background: var(--hover); }
.tbtn.on { color: var(--green-d); }
.tbtn svg { width: 13px; height: 13px; }
.tb__search { display: flex; align-items: center; border: 1px solid #dfe2e6; border-radius: 4px; height: 28px; width: 200px; padding: 0 8px; }
.tb__search input { border: 0; outline: 0; flex: 1; font-size: 13px; min-width: 0; background: none; }
.tb__search input::placeholder { color: #b5b9c0; }
.tb__search svg { width: 15px; height: 15px; color: #8a9099; }
.chips-f { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 20px 4px; }
.chip-f { display: inline-flex; align-items: center; gap: 4px; background: #eef6f1; color: var(--green-d); border-radius: 12px; padding: 2px 4px 2px 10px; font-size: 12px; }
.chip-f button { border: 0; background: none; color: inherit; width: 18px; height: 18px; border-radius: 50%; line-height: 1; }
.chip-f button:hover { background: rgba(0,0,0,.06); }

/* ---------- Bảng danh sách ---------- */
.tw { flex: 1; overflow: auto; position: relative; }
.tw::-webkit-scrollbar { height: 10px; width: 10px; }
.tw::-webkit-scrollbar-thumb { background: #b9bec5; border-radius: 6px; border: 2px solid #fff; }
.tbl { border-collapse: separate; border-spacing: 0; min-width: 100%; table-layout: fixed; }
.tbl th, .tbl td { border-bottom: 1px solid var(--line); height: 38px; padding: 0 10px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 400; background: #fff; }
.tbl thead th { position: sticky; top: 0; z-index: 3; color: var(--ink); font-size: 14px; height: 36px; border-right: 1px solid var(--line2); }
.tbl thead th:first-child { padding-left: 20px; vertical-align: top; padding-top: 4px; }
.tbl .c-title { position: sticky; left: 0; z-index: 2; border-right: 1px solid var(--line); }
.tbl thead .c-title { z-index: 4; }
.tbl td { border-right: 1px solid var(--line2); color: var(--ink); font-size: 13.5px; }
.tbl tr.row:hover td { background: #fafbfc; }
.tbl tr.row.dragging td { opacity: .4; }
.tbl tr.row.drop-before td { box-shadow: inset 0 2px 0 var(--blue); }
.tbl tr.grp td { height: 38px; border-bottom: 1px solid var(--line); background: #fff; }
.grp__in { position: sticky; left: 0; display: inline-flex; align-items: center; gap: 8px; padding-left: 8px; }
.grp__in .caret { border: 0; background: none; width: 18px; height: 18px; display: grid; place-items: center; color: #7b8088; transition: transform .15s; padding: 0; }
.grp__in .caret.off { transform: rotate(-90deg); }
.grp__name { font-size: 17px; font-weight: 500; color: var(--gc); }
.grp__n { color: var(--muted); font-size: 12.5px; }
.grp__more { border: 0; background: none; color: #9aa0a8; padding: 2px 6px; border-radius: 4px; opacity: 0; }
tr.grp:hover .grp__more { opacity: 1; }
.grp__more:hover { background: var(--hover); color: var(--ink); }
tr.grp.drop-into td { background: #f0f6ff; }
.tcell { display: flex; align-items: center; height: 100%; gap: 0; }
.tcell .drag { width: 14px; color: #c0c4ca; cursor: grab; display: grid; place-items: center; flex: 0 0 14px; }
.tcell .drag svg { width: 12px; height: 12px; }
.tcell .idx { width: 26px; color: #8a9099; font-size: 12px; text-align: center; flex: 0 0 26px; }
.check { border: 0; background: none; padding: 0; width: 22px; height: 22px; display: grid; place-items: center; color: #b7bcc3; flex: 0 0 22px; margin: 0 8px 0 4px; border-radius: 50%; }
.check svg { width: 18px; height: 18px; }
.check:hover { color: var(--green); }
.check.done { color: var(--green); }
.check[disabled] { cursor: default; }
.ttl { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.ttl a { overflow: hidden; text-overflow: ellipsis; color: var(--ink); font-size: 14px; }
.ttl a:hover { color: var(--blue); }
.row.is-done .ttl a { color: var(--muted); text-decoration: line-through; }
.subc { display: inline-flex; align-items: center; gap: 3px; color: #555b63; font-size: 13px; flex: 0 0 auto; }
.subc svg { width: 14px; height: 14px; }
.meta-ic { display: inline-flex; align-items: center; gap: 2px; color: #8a9099; font-size: 12px; }
.meta-ic svg { width: 13px; height: 13px; }
.detail-btn { margin-left: auto; border: 0; background: none; color: var(--muted); font-size: 12.5px; display: none; align-items: center; gap: 2px; padding: 3px 4px 3px 8px; white-space: nowrap; }
.detail-btn:hover { color: var(--blue); }
.row:hover .detail-btn { display: inline-flex; }
.cell-ed { cursor: pointer; }
.cell-ed:hover { background: #f5f8ff !important; }
.num { text-align: right !important; font-variant-numeric: tabular-nums; }
.dl { font-size: 12px; }
.dl.late { color: var(--red); font-weight: 600; }
.addrow td { color: var(--muted); }
.addrow input { border: 0; outline: 0; width: 100%; font-size: 13.5px; padding: 0; background: none; }
.addrow .plus { color: #9aa0a8; margin: 0 8px 0 44px; }
.empty { padding: 60px 20px; text-align: center; color: var(--muted); }
.empty svg { width: 56px; height: 56px; color: #d2d6dc; }

/* ---------- Nhãn / chip ---------- */
.chip { display: inline-block; padding: 1px 8px; border-radius: 11px; color: #fff; font-size: 11.5px; font-weight: 600; line-height: 18px; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.chip + .chip { margin-left: 4px; }
.chip--ghost { background: #eef0f3; color: var(--muted); font-weight: 500; }
.pr-0 { background: #22c55e; } .pr-1 { background: #3b82f6; } .pr-2 { background: #f59e0b; } .pr-3 { background: #ef4444; }

/* ---------- Menu nổi, hộp thoại, thông báo nhanh ---------- */
.pop { position: fixed; z-index: 80; background: #fff; border-radius: 8px; box-shadow: var(--shadow); border: 1px solid #e8eaed; min-width: 200px; max-width: 320px; max-height: 360px; overflow: auto; padding: 6px; font-size: 13.5px; }
.pop__search { width: 100%; border: 1px solid #e1e4e8; border-radius: 6px; padding: 6px 8px; margin-bottom: 4px; outline: 0; font-size: 13px; }
.pop__item { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; padding: 7px 8px; border-radius: 6px; text-align: left; color: var(--ink); }
.pop__item:hover, .pop__item.focus { background: var(--hover); }
.pop__item .tick { margin-left: auto; color: var(--green); font-weight: 700; }
.pop__item.danger { color: var(--red); }
.pop__sep { height: 1px; background: var(--line); margin: 5px 0; }
.pop__label { color: var(--muted); font-size: 11.5px; padding: 6px 8px 2px; text-transform: uppercase; letter-spacing: .03em; }
.pop input[type=date], .pop input.pop__in { width: 100%; border: 1px solid #d5d8dd; border-radius: 6px; padding: 6px 8px; outline: 0; }
.pop__row { display: flex; gap: 6px; margin-top: 6px; }
.btn { border: 1px solid #d5d8dd; background: #fff; border-radius: 6px; padding: 6px 12px; font-size: 13.5px; color: var(--ink); display: inline-flex; align-items: center; gap: 6px; justify-content: center; }
.btn:hover { background: var(--hover); }
.btn--pri { background: var(--green); border-color: var(--green); color: #fff; }
.btn--pri:hover { background: var(--green-d); }
.btn--danger { color: var(--red); border-color: #f4c7c9; }
.btn--danger:hover { background: #fdf0f0; }
.btn[disabled] { opacity: .55; cursor: default; }
.btn--sm { padding: 3px 9px; font-size: 12.5px; }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); background: #1f2329; color: #fff; padding: 10px 18px; border-radius: 8px; z-index: 120; font-size: 13.5px; box-shadow: var(--shadow); animation: up .2s; max-width: 90vw; }
.toast.err { background: #c62828; }
@keyframes up { from { opacity: 0; transform: translate(-50%, 8px); } }
.modal-bg { position: fixed; inset: 0; background: rgba(20, 24, 31, .38); z-index: 60; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; overflow: auto; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: #fff; border-radius: 10px; width: 100%; max-width: 520px; box-shadow: var(--shadow); }
.modal--wide { max-width: 720px; }
.modal__h { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal__h h3 { margin: 0; font-size: 16px; color: var(--ink); font-weight: 600; }
.modal__x { border: 0; background: none; font-size: 22px; color: var(--muted); width: 30px; height: 30px; border-radius: 6px; line-height: 1; }
.modal__x:hover { background: var(--hover); }
.modal__b { padding: 16px 18px; }
.modal__f { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); }
.f { margin-bottom: 12px; }
.f label { display: block; font-size: 12.5px; color: #5b616a; margin-bottom: 4px; }
.in, .sel, .ta { width: 100%; border: 1px solid #d5d8dd; border-radius: 6px; padding: 7px 10px; outline: 0; background: #fff; font-size: 14px; }
.in:focus, .sel:focus, .ta:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47, 111, 222, .12); }
.ta { min-height: 80px; resize: vertical; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.err { color: var(--red); font-size: 13px; margin-bottom: 10px; }
.hint { color: var(--muted); font-size: 12.5px; }
.sw { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13.5px; }
.sw input { width: 16px; height: 16px; accent-color: var(--green); }

/* ---------- Cửa sổ chi tiết công việc ---------- */
.dp-bg { position: fixed; inset: 0; z-index: 50; background: rgba(20, 24, 31, .25); display: flex; justify-content: flex-end; animation: fade .15s; }
.dp { width: 690px; max-width: 100%; height: 100%; background: #fff; display: flex; flex-direction: column; box-shadow: -10px 0 30px rgba(0,0,0,.12); animation: slide .2s; }
@keyframes slide { from { transform: translateX(40px); opacity: .4; } }
.dp__bar { display: flex; align-items: center; gap: 4px; height: 56px; padding-left: 18px; border-bottom: 1px solid var(--line); flex: 0 0 56px; }
.dp__done { border: 1px solid #d5d8dd; background: #fff; border-radius: 6px; padding: 4px 10px; display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-size: 14px; }
.dp__done svg { width: 15px; height: 15px; }
.dp__done:hover { border-color: var(--green); color: var(--green-d); }
.dp__done.on { background: var(--green); border-color: var(--green); color: #fff; }
.dp__icons { margin-left: auto; display: flex; align-items: center; gap: 2px; padding-right: 8px; }
.dp__icons button { width: 34px; height: 34px; border: 0; background: none; border-radius: 6px; color: #5b616a; display: grid; place-items: center; }
.dp__icons button:hover { background: var(--hover); color: var(--ink); }
.dp__icons svg { width: 19px; height: 19px; }
.dp__x { width: 64px; height: 100%; border: 0; background: #ececec; color: #555; font-size: 26px; display: grid; place-items: center; }
.dp__x:hover { background: #e0e0e0; }
.dp__body { flex: 1; overflow-y: auto; }
.dp__top { padding: 18px 24px 8px; }
.dp__crumb { font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.dp__crumb a { color: var(--blue); }
.dp__title { width: 100%; border: 1px solid transparent; border-radius: 6px; font-size: 22px; color: var(--ink); padding: 6px 4px; resize: vertical; min-height: 48px; outline: 0; line-height: 1.35; background: none; }
.dp__title:hover:not([readonly]) { border-color: var(--line); }
.dp__title:focus { border-color: var(--blue); }
.props { display: grid; grid-template-columns: 108px 1fr; row-gap: 4px; padding: 8px 24px 14px; align-items: center; }
.props > dt { font-size: 12.5px; color: #4b5058; padding: 7px 0; align-self: start; }
.props > dd { margin: 0; min-height: 32px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.pv { border: 1px solid transparent; background: none; border-radius: 6px; padding: 4px 6px; display: inline-flex; align-items: center; gap: 6px; min-height: 30px; text-align: left; color: var(--ink); font-size: 13.5px; max-width: 100%; }
.pv.ed:hover { border-color: var(--line); background: #fafbfc; cursor: pointer; }
.pv.ph { color: #a5aab2; }
.pv .crumb-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.proj-ic { width: 20px; height: 20px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; }
.proj-ic svg { width: 12px; height: 12px; }
.desc { width: 100%; border: 1px solid transparent; border-radius: 6px; padding: 6px; min-height: 40px; resize: vertical; outline: 0; font-size: 14px; color: var(--ink); line-height: 1.55; background: none; }
.desc:hover:not([readonly]) { border-color: var(--line); }
.desc:focus { border-color: var(--blue); }
.desc[readonly] { resize: none; }
.money-in { border: 1px solid var(--blue); border-radius: 6px; padding: 4px 8px; outline: 0; width: 160px; }
.subs { border-top: 1px solid var(--line); padding: 6px 0 8px; }
.sub { display: flex; align-items: center; gap: 8px; padding: 6px 24px; min-height: 40px; }
.sub:hover { background: #fafbfc; }
.sub__i { color: #6b7280; width: 14px; font-size: 13px; }
.sub .check { margin: 0; }
.sub .check svg { width: 20px; height: 20px; }
.sub .check.done svg circle { fill: var(--green); stroke: var(--green); }
.sub .check.done svg path { stroke: #fff; }
.sub__t { flex: 1; min-width: 0; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.sub__t:hover { color: var(--blue); }
.sub.is-done .sub__t { color: var(--muted); }
.sub__d { font-size: 12.5px; color: var(--green-d); }
.sub__d.late { color: var(--red); }
.flag svg { width: 17px; height: 17px; }
.sub-add { display: flex; align-items: center; gap: 8px; padding: 6px 24px; color: #5b616a; }
.sub-add button { border: 0; background: none; color: #5b616a; display: inline-flex; gap: 6px; align-items: center; font-size: 14px; padding: 4px 0; }
.sub-add button:hover { color: var(--ink); }
.sub-add input { flex: 1; border: 1px solid var(--blue); border-radius: 6px; padding: 6px 8px; outline: 0; }
.sec-h { display: flex; align-items: center; justify-content: space-between; padding: 12px 24px 4px; font-size: 13px; color: #4b5058; font-weight: 600; }
.files { padding: 0 24px 10px; display: grid; gap: 6px; }
.file { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; }
.file__ext { width: 34px; height: 34px; border-radius: 6px; background: #eef3fb; color: var(--blue); font-size: 10px; font-weight: 800; display: grid; place-items: center; text-transform: uppercase; flex: 0 0 34px; }
.file__ext.sub-k { background: #e8f8f0; color: var(--green-d); }
.file__m { flex: 1; min-width: 0; }
.file__m a { display: block; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.file__m a:hover { color: var(--blue); }
.file__m small { color: var(--muted); font-size: 12px; }
.file button { border: 0; background: none; color: #a0a5ad; font-size: 16px; width: 26px; height: 26px; border-radius: 6px; }
.file button:hover { background: #fdf0f0; color: var(--red); }
.composer { display: flex; gap: 10px; align-items: flex-start; }
.composer__box { flex: 1; }
.composer textarea { width: 100%; border: 1px solid #cfd3d9; border-radius: 6px; padding: 9px 11px; min-height: 40px; resize: vertical; outline: 0; background: #fff; font-size: 14px; }
.composer textarea:focus { border-color: var(--blue); }
.composer__act { display: flex; gap: 8px; margin: 8px 0 14px; align-items: center; }
.composer__act .btn { padding: 4px 10px; }
.clip { width: 30px; height: 30px; border-radius: 6px; border: 1px solid #d5d8dd; background: #fff; color: var(--blue); display: grid; place-items: center; }
.clip svg { width: 16px; height: 16px; }
.pending-files { font-size: 12.5px; color: var(--muted); }
.ev { display: flex; gap: 8px; align-items: flex-start; padding: 5px 0; font-size: 12.5px; color: #5b616a; }
.ev svg { width: 14px; height: 14px; flex: 0 0 14px; margin-top: 2px; color: #8a9099; }
.ev__t { flex: 1; min-width: 0; }
.ev__t b { color: #4b5058; }
.ev__d { display: block; font-weight: 600; color: #4b5058; white-space: pre-wrap; margin-top: 2px; }
.ev time { color: #6b7280; white-space: nowrap; font-size: 12px; }
.cm { display: flex; gap: 10px; padding: 10px 0; }
.cm__b { flex: 1; min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
.cm__h { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--muted); margin-bottom: 3px; }
.cm__h b { color: var(--ink); font-size: 13.5px; }
.cm__h button { border: 0; background: none; color: #b0b5bd; font-size: 12px; }
.cm__h button:hover { color: var(--red); }
.cm__t { white-space: pre-wrap; word-wrap: break-word; color: var(--ink); }
.cm__t .mention { color: var(--blue); font-weight: 600; }
.cm .files { padding: 6px 0 0; }
.more { border: 0; background: none; color: var(--ink); padding: 6px 0 8px; font-size: 13.5px; }
.more:hover { color: var(--blue); }
.dp__foot { flex: 0 0 auto; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 14px; padding: 10px 8px; background: #fff; }
.dp__foot > span { font-size: 13.5px; color: var(--ink); }
.dp__foot .add-c { width: 26px; height: 26px; border-radius: 50%; border: 0; background: none; font-size: 20px; color: #555; line-height: 1; }
.dp__foot .add-c:hover { background: var(--hover); }
.mention-pop { position: absolute; z-index: 90; }

/* ---------- Trang chủ, thống kê, nhân sự ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 22px; }
.tile { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; background: #fff; }
.tile small { color: var(--muted); font-size: 12.5px; }
.tile b { display: block; font-size: 26px; color: var(--ink); margin-top: 2px; font-weight: 600; }
.tile.red b { color: var(--red); } .tile.green b { color: var(--green-d); } .tile.amber b { color: var(--amber); }
.card { border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 16px 18px; margin-bottom: 18px; }
.card h2 { font-size: 16px; color: var(--ink); margin: 0 0 12px; font-weight: 600; }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line2); font-size: 13.5px; }
.list-plain li:last-child { border-bottom: 0; }
.list-plain a { color: var(--ink); }
.list-plain a:hover { color: var(--blue); }
.list-plain .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar { display: grid; grid-template-columns: 160px 1fr 90px; gap: 10px; align-items: center; margin: 8px 0; font-size: 13px; }
.bar__t { height: 12px; border-radius: 6px; background: #eef0f3; overflow: hidden; display: flex; }
.bar__t i { display: block; height: 100%; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.dtable { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.dtable th { text-align: left; font-weight: 600; color: #5b616a; font-size: 12.5px; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.dtable td { padding: 9px 10px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
.dtable tr:hover td { background: #fafbfc; }
.role { display: inline-block; padding: 1px 9px; border-radius: 11px; font-size: 11.5px; font-weight: 600; }
.role-admin { background: #fde8e8; color: #c62828; } .role-manager { background: #e7efff; color: #1d4ed8; } .role-staff { background: #e8f8f0; color: #15803d; }
.notif { display: flex; gap: 10px; padding: 11px 12px; border-radius: 8px; cursor: pointer; align-items: flex-start; }
.notif:hover { background: var(--hover); }
.notif.unread { background: #f2f8f5; }
.notif__t { flex: 1; font-size: 13.5px; color: var(--ink); }
.notif__t small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.notif-pop { width: 380px; max-width: calc(100vw - 20px); max-height: 70vh; padding: 0; }
.notif-pop__h { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; }
.notif-pop__h b { color: var(--ink); }
.link { border: 0; background: none; color: var(--blue); font-size: 12.5px; padding: 0; }
.link:hover { text-decoration: underline; }

/* ---------- Bảng (kanban), lịch, tiến độ ---------- */
.board { display: flex; gap: 14px; padding: 12px 20px 20px; overflow-x: auto; height: 100%; align-items: flex-start; }
.col { width: 290px; flex: 0 0 290px; background: #f4f5f7; border-radius: 10px; max-height: 100%; display: flex; flex-direction: column; }
.col__h { padding: 10px 12px; display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--gc); }
.col__h small { color: var(--muted); font-weight: 400; }
.col__b { padding: 0 8px 8px; overflow-y: auto; min-height: 40px; }
.col.drop .col__b { background: #e9f1ff; border-radius: 8px; }
.kc { background: #fff; border-radius: 8px; padding: 9px 10px; margin-bottom: 8px; box-shadow: 0 1px 2px rgba(0,0,0,.08); cursor: pointer; }
.kc:hover { box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.kc__t { color: var(--ink); font-size: 13.5px; margin-bottom: 6px; }
.kc.is-done .kc__t { text-decoration: line-through; color: var(--muted); }
.kc__m { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.kc__m .av { margin-left: auto; }
.cal { padding: 10px 20px 20px; }
.cal__h { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.cal__h b { font-size: 17px; color: var(--ink); min-width: 140px; }
.cal__g { display: grid; grid-template-columns: repeat(7, 1fr); border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
.cal__g > div { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-height: 104px; padding: 4px; font-size: 12px; overflow: hidden; }
.cal__g .dow { min-height: 0; text-align: center; color: var(--muted); font-weight: 600; background: #fafbfc; padding: 6px; }
.cal__g .out { background: #fafbfc; color: #b8bcc3; }
.cal__g .today .dn { background: var(--green); color: #fff; border-radius: 10px; padding: 0 6px; }
.dn { display: inline-block; margin-bottom: 3px; }
.ce { display: block; background: #eef3fb; color: var(--ink); border-left: 3px solid var(--blue); border-radius: 4px; padding: 2px 5px; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.ce.is-done { opacity: .55; text-decoration: line-through; }
.gantt { padding: 10px 20px 20px; overflow: auto; }
.gantt table { border-collapse: collapse; font-size: 12px; }
.gantt th, .gantt td { border: 1px solid var(--line2); padding: 0; height: 30px; }
.gantt th { font-weight: 500; color: var(--muted); min-width: 28px; text-align: center; background: #fafbfc; position: sticky; top: 0; }
.gantt .gt { min-width: 280px; max-width: 280px; padding: 0 10px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: sticky; left: 0; background: #fff; z-index: 1; cursor: pointer; color: var(--ink); }
.gantt .gs td { background: #f6f7f9; font-weight: 600; color: var(--gc); padding: 0 10px; }
.gantt .wk { background: #fbfbfc; }
.gantt .td { background: #fff7e0; }
.gbar { height: 16px; border-radius: 8px; background: var(--blue); margin: 0 1px; }
.gbar.done { background: var(--green); }
.gbar.late { background: var(--red); }
.cfg-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line2); }
.cfg-row .in { padding: 5px 8px; }
.cfg-row input[type=color] { width: 34px; height: 30px; border: 1px solid #d5d8dd; border-radius: 6px; padding: 2px; background: #fff; }
.opt-list { display: grid; gap: 6px; margin: 6px 0; }

/* ---------- Đăng nhập ---------- */
.login { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(160deg, #f3f6fb, #e9f6ef); padding: 20px; }
.login__card { width: 100%; max-width: 380px; background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 30px 28px; }
.login__card .brand { margin-bottom: 24px; }
.login__card h1 { font-size: 21px; margin: 0 0 4px; color: var(--ink); }
.login__card p { color: var(--muted); margin: 0 0 20px; font-size: 13.5px; }
.login__card .btn { width: 100%; padding: 9px; font-size: 15px; }

/* ---------- Điện thoại ---------- */
@media (max-width: 900px) {
  .top__logo { width: auto; flex: 0 0 auto; padding-left: 6px; }
  .burger { display: grid; }
  .side { position: fixed; top: 56px; bottom: 0; left: 0; z-index: 40; margin-left: -243px; box-shadow: var(--shadow); }
  .shell.side-on .side { margin-left: 0; }
  .side__toggle { display: none; }
  .ph__title h1 { font-size: 21px; }
  .tb__search { width: 100%; order: 10; }
  .page { padding: 16px; }
  .cols2 { grid-template-columns: 1fr; }
  .props { grid-template-columns: 92px 1fr; padding: 8px 14px; }
  .dp__top, .sub, .sec-h, .files, .dp-feed, .sub-add { padding-left: 14px; padding-right: 14px; }
  .dp__x { width: 48px; }
  .grid2 { grid-template-columns: 1fr; }
  .bar { grid-template-columns: 100px 1fr 70px; }
}

/* ---------- Ảnh đại diện ---------- */
img.av { object-fit: cover; background: #eef0f3; display: inline-block; }
.av-edit { position: relative; display: inline-block; border: 0; padding: 0; background: none; border-radius: 50%; cursor: pointer; }
.av-edit .av { width: 72px; height: 72px; font-size: 24px; }
.av-edit__cam { position: absolute; right: -2px; bottom: -2px; width: 28px; height: 28px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.18); transition: transform .15s; }
.av-edit__cam svg { width: 15px; height: 15px; }
.av-edit:hover .av-edit__cam { transform: scale(1.08); }
.av-row { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.av-row b { color: var(--ink); display: block; font-size: 15px; }
.avd { display: flex; flex-direction: column; align-items: center; }
.avd__stage { position: relative; width: 260px; height: 260px; border-radius: 14px; background: repeating-conic-gradient(#f1f2f4 0 25%, #fff 0 50%) 0 0 / 20px 20px; border: 2px dashed #d5d8dd; overflow: hidden; cursor: pointer; outline: 0; }
.avd__stage.on { border-style: solid; border-color: #e6e8eb; cursor: grab; }
.avd__stage.on:active { cursor: grabbing; }
.avd__stage.drag, .avd__stage:focus-visible { border-color: var(--green); }
.avd__stage canvas { display: block; touch-action: none; }
.avd__empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; color: var(--muted); font-size: 13px; background: #fafbfc; }
.avd__empty .av, .avd__empty img { width: 96px; height: 96px; border-radius: 50%; font-size: 32px; object-fit: cover; }
.avd__empty p { margin: 0; line-height: 1.5; }
.avd__zoom { display: flex; align-items: center; gap: 10px; width: 260px; margin-top: 12px; color: var(--muted); font-size: 18px; }
.avd__zoom input { flex: 1; accent-color: var(--green); }
.me-head { display: flex; align-items: center; gap: 10px; padding: 8px 8px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.me-head .av { width: 40px; height: 40px; font-size: 14px; }

/* ---------- Bộ chọn ngày / hạn chót + giờ nộp ---------- */
.pop.pop--dtp { padding: 12px; min-width: 0; max-width: none; max-height: none; width: 282px; }
.dtp { font-size: 13px; color: var(--ink); }
.dtp__row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.dtp__lbl { width: 92px; flex: 0 0 92px; color: #5b616a; font-size: 12.5px; }
.dtp__val { flex: 1; min-width: 0; height: 32px; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 8px 0 10px; border: 1px solid #d5d8dd; border-radius: 6px; background: #fff; color: var(--ink); font-size: 13px; text-align: left; }
.dtp__val.ph { color: #a5aab2; }
.dtp__val:hover { border-color: #b8bdc4; }
.dtp__val.on { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47, 111, 222, .12); }
.dtp__x { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: #c4c8cf; color: #fff; font-size: 13px; line-height: 1; cursor: pointer; }
.dtp__x:hover { background: var(--red); }
.dtp__add { border: 0; background: none; color: var(--blue); font-size: 13px; padding: 2px 0 10px; font-weight: 600; }
.dtp__add:hover { text-decoration: underline; }
.dtp__time { flex: 1; height: 32px; border: 1px solid #d5d8dd; border-radius: 6px; padding: 0 8px; outline: 0; font-size: 13px; }
.dtp__time:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47, 111, 222, .12); }
.dtp__time:disabled { background: #f6f7f9; color: #b8bcc3; }
.dtp__quick { display: flex; gap: 5px; margin: -2px 0 10px 102px; }
.dtp__quick button { flex: 1; border: 1px solid #e1e4e8; background: #fff; border-radius: 12px; font-size: 11.5px; padding: 2px 0; color: #4b5058; }
.dtp__quick button:hover:not(:disabled) { border-color: var(--green); color: var(--green-d); }
.dtp__quick button.on { background: var(--green); border-color: var(--green); color: #fff; }
.dtp__quick button:disabled { opacity: .45; cursor: default; }
.dtp__cal { border-top: 1px solid var(--line); padding-top: 8px; }
.dtp__h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.dtp__h b { font-size: 13.5px; font-weight: 600; }
.dtp__h button { width: 28px; height: 28px; border: 0; background: none; border-radius: 50%; font-size: 18px; color: #6b7280; line-height: 1; }
.dtp__h button:hover { background: var(--hover); color: var(--ink); }
.dtp__g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px 0; text-align: center; }
.dtp__g > span { font-size: 11.5px; color: #8a9099; padding: 4px 0; }
.dtp__d { width: 34px; height: 32px; margin: 0 auto; border: 0; background: none; border-radius: 50%; font-size: 13px; color: var(--ink); position: relative; }
.dtp__d:hover { background: #eef3fb; }
.dtp__d.out { color: #c0c4ca; }
.dtp__d.today { box-shadow: inset 0 0 0 2px #c9ccd2; font-weight: 600; }
.dtp__d.range { background: #eaf2fd; border-radius: 0; width: 100%; }
.dtp__d.mark { box-shadow: inset 0 0 0 2px #2f6fde; }
.dtp__d.sel { background: #1e63b6; color: #fff; font-weight: 600; box-shadow: none; }
.dtp__foot { display: flex; gap: 6px; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 10px; }
.dtp__foot [data-ok] { margin-left: auto; }
.in-pair { display: flex; gap: 6px; }
.in-pair .in[type=time] { width: 120px; flex: 0 0 120px; }

/* ---------- Gợi ý khi rê chuột vào dòng ---------- */
.ph-ic { display: inline-grid; place-items: center; color: #9aa0a8; opacity: 0; transition: opacity .12s; vertical-align: middle; }
.ph-ic svg { width: 24px; height: 24px; }
.ph-box { display: block; height: 24px; border-radius: 4px; opacity: 0; transition: opacity .12s; position: relative; }
.ph-box::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; background: #b8bcc3; transform: translate(-50%, -50%); }
.num .ph-box { background: #fff; box-shadow: inset 0 0 0 1px #e3e6ea; }
tr.row:hover .ph-ic, tr.row:hover .ph-box { opacity: 1; }
td.cell-ed:hover .ph-ic { color: var(--blue); }
td.cell-ed:hover .ph-box { box-shadow: inset 0 0 0 1px #c9d6ee; background: #f8fbff; }
.ttl > a { border: 1px solid transparent; border-radius: 4px; padding: 3px 7px; margin-left: -8px; transition: border-color .12s, background .12s; }
tr.row:hover .ttl > a { border-color: #e3e6ea; background: #fff; }

/* ---------- Ô mật khẩu ---------- */
.pw { position: relative; display: flex; align-items: center; }
.pw .pw__in { padding-right: 44px; font-family: inherit; letter-spacing: .02em; }
.pw--gen .pw__in { padding-right: 104px; }
.pw__btns { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); display: flex; gap: 2px; }
.pw__b { position: relative; width: 32px; height: 30px; border: 0; background: none; border-radius: 6px; color: #6b7280; display: grid; place-items: center; }
.pw__b svg { width: 18px; height: 18px; }
.pw__b:hover { background: #eef6f1; color: var(--green-d); }
.pw__b[data-pw-gen] { color: var(--green-d); }
.pw__b::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); right: 0; background: #1f2329; color: #fff; font-size: 11.5px; padding: 4px 8px; border-radius: 5px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .12s; z-index: 3; }
.pw__b:hover::after { opacity: 1; transition-delay: .3s; }
.pw__meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 6px; }
.pw__meter i { height: 4px; border-radius: 2px; background: #e6e8eb; transition: background .2s; }
.pw__meter[data-lvl="1"] i:nth-child(-n+1) { background: var(--red); }
.pw__meter[data-lvl="2"] i:nth-child(-n+2) { background: var(--amber); }
.pw__meter[data-lvl="3"] i:nth-child(-n+3) { background: #52b818; }
.pw__meter[data-lvl="4"] i { background: var(--green); }
.pw__lvl { min-height: 16px; margin-top: 3px; font-size: 12px; }

/* ---------- Chức năng bị khoá theo quyền ---------- */
[data-lock] { cursor: not-allowed !important; }
[data-lock] * { cursor: not-allowed !important; }
dd[data-lock] { position: relative; border-radius: 6px; transition: background .12s; }
dd[data-lock]:hover { background: #f6f7f9; }
/* Dấu ⊗ đỏ hiện ở góc phải mục bị khoá khi rê chuột */
dd[data-lock]::after { content: ""; position: absolute; right: 6px; top: 50%; width: 18px; height: 18px; margin-top: -9px; opacity: 0; transform: scale(.7); transition: opacity .15s, transform .15s;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='%23e5484d'/%3E%3Cpath d='M8.5 8.5l7 7M15.5 8.5l-7 7' stroke='%23fff' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; }
dd[data-lock]:hover::after { opacity: 1; transform: scale(1); }
textarea[data-lock] { background: #fafbfc !important; border: 1px dashed #dfe2e6 !important; color: #4b5058; }
textarea[data-lock]:hover { border-color: #f0b4b6 !important; background: #fff7f7 !important; }
textarea.desc[data-lock]::placeholder { color: #b0b5bd; font-style: italic; }
.dp__done[aria-disabled="true"] { color: #a0a5ad; border-color: #e3e6ea; background: #f6f7f9; }
.dp__done[aria-disabled="true"]:hover { color: var(--red); border-color: #f0b4b6; background: #fff5f5; }
.check[aria-disabled="true"] { color: #d2d6dc; }
.check[aria-disabled="true"]:hover { color: var(--red); }
.add-c[aria-disabled="true"] { color: #c0c4ca; border: 1px dashed #dfe2e6 !important; width: 26px; height: 26px; }
.add-c[aria-disabled="true"]:hover { color: var(--red); border-color: #f0b4b6 !important; background: #fff5f5 !important; }
td[data-lock]:hover { background: #fafbfc !important; }
.lock-tip { position: fixed; z-index: 200; display: flex; align-items: flex-start; gap: 8px; max-width: 300px; padding: 9px 12px; border-radius: 8px; background: #fff; color: #3a3f47; font-size: 12.5px; line-height: 1.45;
  border: 1px solid #f3c3c5; box-shadow: 0 8px 24px rgba(15, 23, 42, .16); pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity .14s, transform .14s; }
.lock-tip.on { opacity: 1; transform: none; }
.lock-tip svg { flex: 0 0 16px; margin-top: 1px; }
.lock-tip::after { content: ""; position: absolute; left: var(--ax, 50%); bottom: -6px; width: 10px; height: 10px; margin-left: -5px; background: #fff; border-right: 1px solid #f3c3c5; border-bottom: 1px solid #f3c3c5; transform: rotate(45deg); }
.lock-tip.below::after { bottom: auto; top: -6px; transform: rotate(225deg); }
.lock-tip.shake { animation: lockshake .35s; }
@keyframes lockshake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }

/* ---------- Dòng hoạt động gọn (Trang chủ) - dùng chung mọi vai trò ---------- */
.feed { list-style: none; margin: 0; padding: 0; max-height: 440px; overflow-y: auto; position: relative; }
.feed__i { position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 7px 6px 7px 0; }
.feed__i + .feed__i::before { content: ""; position: absolute; left: 11px; top: -7px; height: 14px; width: 1.5px; background: #e6e8eb; }
.feed__av { position: relative; flex: 0 0 22px; margin-top: 1px; }
.feed__k { position: absolute; right: -4px; bottom: -3px; width: 13px; height: 13px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 8px; font-weight: 800; line-height: 1; color: #fff; border: 1.5px solid #fff; background: #9aa0a8; }
.k-done { background: var(--green); } .k-assign, .k-create { background: var(--blue); } .k-submit, .k-file { background: var(--amber); } .k-reopen { background: #8e5cd9; }
.feed__b { flex: 1; min-width: 0; }
.feed__l { font-size: 12.5px; line-height: 1.45; color: #5b616a; }
.feed__l b { color: var(--ink); font-weight: 600; }
.feed__q { margin: 3px 0 1px; padding: 3px 8px; border-left: 2px solid #dfe2e6; color: #4b5058; font-size: 12px; line-height: 1.45; background: #fafbfc; border-radius: 0 4px 4px 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.feed__t { display: block; margin-top: 1px; font-size: 11.5px; color: #8a9099; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed__t:hover { color: var(--blue); }
.feed__time { flex: 0 0 auto; font-size: 11px; color: #a0a5ad; white-space: nowrap; margin-top: 2px; }
.card h2 { font-size: 15px; }
.card .list-plain li { font-size: 13px; padding: 7px 0; }
.card .list-plain .hint { font-size: 12px; }

/* ---------- Thông báo (chuông + trang Thông báo) ---------- */
.notif { gap: 10px; padding: 9px 12px 9px 10px; border-radius: 8px; align-items: flex-start; position: relative; }
.notif .av { margin-top: 1px; }
.notif__t { font-size: 12.5px; line-height: 1.45; color: #5b616a; }
.notif__t b { color: var(--ink); font-weight: 600; }
.notif__t small { font-size: 11px; color: #a0a5ad; margin-top: 3px; }
.notif.unread { background: #f3faf6; }
.notif__dot { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-top: 6px; }
.notif-pop__h b { font-size: 14px; }

/* =========================================================
   Cửa sổ chi tiết công việc - bản chỉnh đồng bộ
   ========================================================= */
.dp { width: 700px; }
/* Thanh trên */
.dp__bar { height: 56px; flex: 0 0 56px; padding: 0 8px 0 20px; gap: 10px; background: #fff; border-bottom: 1px solid var(--line); }
.dp__done { height: 32px; padding: 0 14px 0 11px; border-radius: 16px; border: 1.5px solid #cfd4da; font-size: 13.5px; font-weight: 600; color: #3a3f47; gap: 6px; transition: all .15s; }
.dp__done svg { width: 15px; height: 15px; }
.dp__done:hover { border-color: var(--green); color: var(--green-d); background: #f2fbf6; }
.dp__done.on { background: var(--green); border-color: var(--green); color: #fff; box-shadow: 0 2px 8px rgba(31, 191, 122, .3); }
.dp__done.on:hover { background: var(--green-d); }
.dp__state { font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 10px; }
.dp__state.late { background: #fdecec; color: #c62828; }
.dp__icons { gap: 2px; padding-right: 4px; }
.dp__icons button, .dp__x { position: relative; width: 34px; height: 34px; border-radius: 8px; border: 0; background: none; color: #5b616a; display: grid; place-items: center; transition: background .12s, color .12s; }
.dp__icons button:hover { background: #eef6f1; color: var(--green-d); }
.dp__icons svg { width: 18px; height: 18px; }
.dp__sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.dp__x { margin-left: 2px; color: #6b7280; }
.dp__x svg { width: 18px; height: 18px; }
.dp__x:hover { background: #fdecec; color: var(--red); }
/* Chú thích nút (hiện bên dưới) */
.dp__icons [data-tip]::after, .dp__x::after, .composer__clip::after { content: attr(data-tip); position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: #1f2329; color: #fff; font-size: 11.5px; font-weight: 500; padding: 4px 8px; border-radius: 5px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .12s; z-index: 5; }
.dp__x::after { left: auto; right: 0; transform: none; }
.dp__icons [data-tip]:hover::after, .dp__x:hover::after, .composer__clip:hover::after { opacity: 1; transition-delay: .3s; }
/* Tiêu đề */
.dp__top { padding: 18px 24px 4px; }
.dp__crumb { font-size: 12px; margin-bottom: 6px; }
.dp__title { font-size: 20px; font-weight: 600; line-height: 1.4; padding: 6px 8px; margin-left: -8px; width: calc(100% + 8px); resize: none; overflow: hidden; border-radius: 8px; letter-spacing: -.1px; }
.dp__title:hover:not([readonly]) { border-color: #e3e6ea; background: #fafbfc; }
.dp__title:focus { background: #fff; box-shadow: 0 0 0 3px rgba(47, 111, 222, .12); }
.dp__title[data-lock] { border: 1px solid transparent !important; background: none !important; }
.dp__title[data-lock]:hover { background: #fafbfc !important; }
/* Thuộc tính */
.props { padding: 6px 24px 16px; row-gap: 2px; }
.props > dt { font-size: 12.5px; color: #6b7280; padding: 8px 0; }
.props > dd { min-height: 34px; }
.pv { font-size: 13.5px; }
.desc { font-size: 13.5px; padding: 7px 9px; border-radius: 8px; }
/* Khối mục (Việc con / Tệp / Trao đổi) */
.dp-sec { border-top: 1px solid var(--line); padding: 14px 24px 12px; }
.dp-sec__h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; min-height: 28px; }
.dp-sec__t { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #4b5058; }
.dp-sec__t svg { width: 15px; height: 15px; color: #8a9099; }
.dp-sec__t em { font-style: normal; font-weight: 600; letter-spacing: 0; text-transform: none; background: #eef0f3; color: #5b616a; border-radius: 9px; padding: 0 7px; font-size: 11.5px; line-height: 18px; }
.dp-sec__btns { display: flex; gap: 6px; }
.dp-sec__btns .btn { height: 30px; border-radius: 7px; font-weight: 600; }
.dp-prog { width: 110px; height: 6px; border-radius: 3px; background: #eef0f3; overflow: hidden; }
.dp-prog i { display: block; height: 100%; background: var(--green); border-radius: 3px; transition: width .3s; }
.dp-empty-line { margin: 2px 0 4px; color: #a0a5ad; font-size: 12.5px; }
/* Việc con */
.subs { border-top: 0; padding: 0; }
.sub { padding: 6px 8px; margin: 0 -8px; min-height: 38px; border-radius: 8px; }
.sub:hover { background: #f6f8fa; }
.sub__i { color: #a0a5ad; font-size: 12px; width: 16px; text-align: right; }
.sub__t { font-size: 13.5px; }
.sub-add { padding: 4px 0 0; }
.sub-add button { width: 100%; justify-content: flex-start; gap: 7px; padding: 8px 10px; border: 1px dashed #d5d8dd; border-radius: 8px; color: #6b7280; font-size: 13px; }
.sub-add button:hover { border-color: var(--green); color: var(--green-d); background: #f6fcf9; }
/* Tệp */
.dp-sec .files { padding: 0; gap: 6px; }
.file { border-radius: 9px; padding: 8px 10px; transition: border-color .12s, box-shadow .12s; }
.file:hover { border-color: #d5dbe3; box-shadow: 0 2px 6px rgba(15, 23, 42, .05); }
.dp-drop { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; padding: 14px 16px; border: 1.5px dashed #d5d8dd; border-radius: 10px; background: #fafbfc; color: #8a9099; font-size: 12.5px; line-height: 1.5; transition: all .15s; }
.dp-drop svg { flex: 0 0 22px; color: #b0b5bd; }
.dp-drop b { display: block; color: #4b5058; font-size: 13px; }
.dp-drop:hover { border-color: var(--green); background: #f4fbf7; color: #5b616a; }
.dp-drop:hover svg { color: var(--green); }
/* Trao đổi & lịch sử */
.dp-feed { border-top: 1px solid var(--line); background: #f7f8fa; padding: 14px 24px 16px; }
.composer { gap: 10px; align-items: flex-start; margin-bottom: 14px; }
.composer > .av { margin-top: 6px; }
.composer__box { flex: 1; min-width: 0; background: #fff; border: 1px solid #d5d8dd; border-radius: 10px; transition: border-color .12s, box-shadow .12s; }
.composer__box:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47, 111, 222, .12); }
.composer textarea { border: 0 !important; background: none; min-height: 42px; padding: 10px 12px 4px; resize: none; box-shadow: none !important; font-size: 13.5px; }
.composer__act { display: flex; align-items: center; gap: 8px; margin: 0; padding: 4px 6px 6px 6px; }
.composer__clip { position: relative; width: 30px; height: 30px; border: 0; background: none; border-radius: 7px; color: #6b7280; display: grid; place-items: center; }
.composer__clip svg { width: 17px; height: 17px; }
.composer__clip:hover { background: #eef3fb; color: var(--blue); }
.composer__hint { margin-left: auto; font-size: 11px; color: #b0b5bd; }
.composer__act .btn { height: 30px; padding: 0 14px; border-radius: 7px; font-weight: 600; }
.pending-files { font-size: 12px; color: var(--blue); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.ev { position: relative; padding: 6px 0 6px 2px; font-size: 12.5px; gap: 10px; align-items: flex-start; }
.ev svg { width: 14px; height: 14px; color: #a0a5ad; margin-top: 2px; }
.ev__t { color: #6b7280; line-height: 1.5; }
.ev__t b { color: #3a3f47; font-weight: 600; }
.ev__d { font-weight: 500; color: #4b5058; background: #fff; border-left: 2px solid #dfe2e6; padding: 3px 8px; margin-top: 4px; border-radius: 0 4px 4px 0; }
.ev time { font-size: 11px; color: #a0a5ad; margin-top: 2px; }
.cm { padding: 8px 0; gap: 10px; }
.cm > .av { margin-top: 2px; }
.cm__b { border-radius: 10px; border-color: #e6e8eb; padding: 9px 12px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.cm__h { font-size: 11.5px; margin-bottom: 4px; }
.cm__h b { font-size: 13px; }
.cm__t { font-size: 13.5px; line-height: 1.55; }
.more { display: block; width: 100%; margin-top: 6px; padding: 7px; border: 1px solid #e3e6ea; border-radius: 8px; background: #fff; color: #4b5058; font-size: 12.5px; font-weight: 600; }
.more:hover { border-color: var(--green); color: var(--green-d); }
/* Chân: người cộng tác */
.dp__foot { gap: 12px; padding: 10px 20px; min-height: 52px; box-shadow: 0 -2px 8px rgba(15, 23, 42, .04); }
.dp__foot-l { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: #4b5058; }
.dp__foot-l svg { color: #8a9099; }
.dp__foot .add-c { width: 28px; height: 28px; border: 1.5px dashed #cfd4da !important; border-radius: 50%; color: #6b7280; font-size: 17px; display: grid; place-items: center; transition: all .15s; }
.dp__foot .add-c:not([aria-disabled]):hover { border-color: var(--green) !important; border-style: solid !important; color: var(--green-d); background: #f2fbf6; }
@media (max-width: 900px) { .dp-sec, .dp-feed { padding-left: 14px; padding-right: 14px; } .composer__hint { display: none; } }
