/* NEW-33 Khách hàng & dự án làm trung tâm: menu nhóm đầu, trang chủ "Danh mục của tôi", danh sách khách, Khách hàng 360.
   Chỉ dùng biến màu của app.css (sáng / tối tự đổi theo :root[data-theme]). */

/* ---- Dùng chung ---- */
.pf-avatar { --h: 240; display: inline-flex; align-items: center; justify-content: center; flex: none; width: 36px; height: 36px; border-radius: 50%;
  font-size: 13px; font-weight: 700; letter-spacing: .02em; color: hsl(var(--h) 55% 30%); background: hsl(var(--h) 70% 90%); }
:root[data-theme="dark"] .pf-avatar { color: hsl(var(--h) 80% 82%); background: hsl(var(--h) 45% 26%); }
.pf-avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.pf-avatar.lg { width: 44px; height: 44px; font-size: 15px; }
.pf-avatar.xl { width: 64px; height: 64px; font-size: 22px; border-radius: var(--radius); }
.pf-avatar.team { color: var(--brand-dark); background: var(--brand-soft); }
.pf-brand { display: block; font-weight: 700; color: var(--ink); line-height: 1.25; overflow-wrap: anywhere; }
.pf-legal { display: block; font-size: 12px; color: var(--muted); line-height: 1.3; overflow-wrap: anywhere; }
.pf-money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pf-bar { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin: 6px 0 2px; min-width: 60px; }
.pf-bar > span { display: block; height: 100%; border-radius: 999px; background: var(--brand); }
.pf-prog-text { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pf-prog-text strong { color: var(--ink); }
.pf-flags { display: flex; flex-wrap: wrap; gap: 6px; }
.pf-flag { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink); }
.pf-flag.bad { background: var(--err-soft); color: var(--err); font-weight: 600; }
.pf-flag.muted { color: var(--muted); }
.badge.info { background: var(--brand-soft); color: var(--brand-dark); }
.badge.team { background: var(--brand-soft); color: var(--brand-dark); }

/* ---- Trang chủ: Danh mục của tôi ---- */
.pf { margin-bottom: 22px; }
.pf-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 12px; }
.pf-head h2 { margin: 0; font-size: 18px; letter-spacing: -.01em; flex: 1; }
.pf-scope { display: flex; gap: 6px; flex-wrap: wrap; }
.pf-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.pf-kpi { display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 12px 14px; text-decoration: none; color: var(--ink); border-top: 3px solid var(--brand); min-width: 0; transition: border-color .1s; }
.pf-kpi:hover { border-color: var(--brand); }
.pf-kpi.good { border-top-color: var(--ok); }
.pf-kpi.bad { border-top-color: var(--err); }
.pf-kpi-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.pf-kpi-value { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; line-height: 1.2; }
.pf-kpi.bad .pf-kpi-value { color: var(--err); }
.pf-kpi-hint { font-size: 12px; color: var(--muted); }
.pf-cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.pf-sec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; min-width: 0; }
.pf-sec-head { display: flex; align-items: center; gap: 10px; }
.pf-sec-head h3 { margin: 0; font-size: 15px; flex: 1; display: flex; align-items: center; gap: 8px; }
.pf-sec-head h3 > .badge:not(.ok):not(.warn):not(.err) { background: var(--accent-soft); color: var(--accent-text); }   /* NEW-70: số đếm = cam thương hiệu */
.pf-sec .hint { font-size: 12px; color: var(--muted); margin: 4px 0 10px; }
.pf-projs { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.pf-proj { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); background: var(--surface);
  transition: border-color .12s, background .12s; min-width: 0; }
.pf-proj:hover { border-color: var(--brand); background: var(--hover); }
.pf-proj.late { box-shadow: inset 4px 0 0 var(--err); }
.pf-proj-top { display: flex; align-items: flex-start; gap: 10px; }
.pf-proj-names { flex: 1; min-width: 0; }
.pf-pname { font-size: 13px; color: var(--ink); word-break: break-word; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pf-proj .pf-brand { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pf-proj .pf-bar { margin-top: auto; }
.pf-flags .pf-flag { align-self: flex-start; }
.pf-clist { list-style: none; margin: 8px 0 0; padding: 0; }
.pf-clist li { border-bottom: 1px solid var(--line); }
.pf-clist li:last-child { border-bottom: 0; }
.pf-clist a { display: flex; align-items: center; gap: 10px; padding: 9px 2px; text-decoration: none; color: var(--ink); min-width: 0; }
.pf-clist a:hover { background: var(--hover); }
.pf-clist .pf-client-names { flex: 1; min-width: 0; }
.pf-clist .pf-brand, .pf-clist .pf-legal { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-cstat { text-align: right; font-size: 12px; color: var(--muted); white-space: nowrap; display: flex; flex-direction: column; }
.pf-cstat strong { color: var(--ink); font-size: 13px; }
.pf-clients td { vertical-align: middle; }
.pf-client, .cl-name { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.pf-client-names, .cl-name-text { min-width: 0; }
.pf-empty { background: var(--surface); border: 1px dashed var(--btn-border); border-radius: var(--radius); padding: 16px; color: var(--ink); }
.pf-empty-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.home-more { grid-column: 1 / -1; text-align: center; }
.home-more-item:not([hidden]) { display: contents; }
@media (max-width: 1200px) { .pf-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .pf-cols { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .pf-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pf-kpi-value { font-size: 20px; } .pf-projs { grid-template-columns: 1fr; } }

/* ---- Danh sách khách ---- */
.cl-seg { display: flex; gap: 6px; margin-left: auto; }
.cl-count { margin: 0 0 8px; font-size: 13px; }
.cl-table td { vertical-align: middle; }
.cl-table .cl-name .pf-brand { font-size: 15px; }
.cl-code { font-variant-numeric: tabular-nums; }
.cl-sub { font-size: 12px; white-space: nowrap; }
.cl-owner { font-size: 13px; }
.th-sort { all: unset; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; text-transform: inherit; letter-spacing: inherit; }
.th-sort:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.th-sort.on { color: var(--brand-dark); }
.th-sort span { opacity: .7; font-size: 10px; }
table.data th.num .th-sort { justify-content: flex-end; }
.cl-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-bottom: 12px; }
.cl-card { display: grid; gap: 8px; align-content: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px; text-decoration: none; color: var(--ink); min-width: 0; transition: border-color .12s, transform .12s; }
.cl-card:hover { border-color: var(--brand); }
.cl-card-top { display: flex; gap: 12px; align-items: center; }
.cl-card-top .pf-brand { font-size: 16px; }
.cl-card-stats { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); }
.cl-card-stats strong { color: var(--ink); }
.cl-card-foot { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 8px; }
@media (max-width: 760px) { .cl-seg { margin-left: 0; } .cl-table td, .cl-table th { white-space: normal; } }

/* ---- Khách hàng 360 ---- */
.c360-head { display: flex; align-items: center; gap: 16px 22px; flex-wrap: wrap; margin-bottom: 14px; }
.c360-id { display: flex; align-items: center; gap: 14px; flex: 1 1 360px; min-width: 0; }
.c360-titles { min-width: 0; }
.c360-titles h1 { margin: 0; font-size: 28px; line-height: 1.15; letter-spacing: -.02em; overflow-wrap: anywhere; }
.c360-legal-line { color: var(--muted); font-size: 13px; margin-top: 2px; overflow-wrap: anywhere; }
.c360-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.c360-owners { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.c360-person { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.c360-person > span:last-child { display: flex; flex-direction: column; line-height: 1.25; }
.c360-person .muted { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.c360-person .c360-note { text-transform: none; letter-spacing: 0; }
.c360-assign { border: 1px dashed var(--warn); background: var(--warn-soft); color: var(--ink); border-radius: var(--radius); padding: 8px 12px; font-size: 13px; cursor: pointer; }
button.c360-assign:hover { border-style: solid; }
span.c360-assign { cursor: default; border-color: var(--line); background: var(--surface-2); }
.c360-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.c360-money { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.c360-m { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px 14px; display: flex; flex-direction: column; min-width: 0; }
.c360-m-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.c360-m-value { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.3; }
.c360-m-hint { font-size: 11px; color: var(--muted); }
.c360-m.warn { box-shadow: inset 0 3px 0 var(--warn), var(--shadow); }
.c360-m.bad .c360-m-value { color: var(--err); }
.c360-m.good .c360-m-value { color: var(--ok-text); }
.c360-nomoney { grid-column: 1 / -1; margin: 0; padding: 10px 14px; background: var(--surface-2); border-radius: var(--radius); }
.c360-grid { display: grid; grid-template-columns: 230px minmax(0, 1fr) 360px; grid-template-areas: "about main side"; gap: 16px; align-items: start; }
.c360-main { grid-area: main; display: grid; gap: 14px; min-width: 0; }
.c360-side { grid-area: side; display: grid; gap: 14px; min-width: 0; }
.c360-about { grid-area: about; min-width: 0; }
.c360-sec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; min-width: 0; }
.c360-sec-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.c360-sec-head h2 { margin: 0; font-size: 16px; flex: 1; display: flex; align-items: center; gap: 8px; }
.c360-sub { font-size: 12px; }
.c360-empty { padding: 12px; color: var(--muted); background: var(--surface-2); border-radius: var(--radius); font-size: 13px; }
.c360-pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.c360-pcard { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: grid; gap: 6px; background: var(--surface); border-left: 4px solid var(--brand); }
.c360-pcard.ended { border-left-color: var(--line); opacity: .85; }
.c360-pcard.late { border-left-color: var(--err); }
.c360-pcard-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.c360-pname { font-size: 17px; font-weight: 700; text-decoration: none; word-break: break-word; overflow-wrap: anywhere; flex: 1 1 200px; min-width: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.c360-pmeta { font-size: 12px; }
.c360-pfoot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.c360-open { margin-left: auto; }
.c360-more { margin-top: 10px; }
.c360-more > summary { cursor: pointer; color: var(--brand-dark); font-size: 13px; font-weight: 600; padding: 4px 0; }
.c360-more .c360-pcards { margin-top: 10px; }
.c360-chart { width: 100%; height: auto; display: block; }
.c360-chart .base { stroke: var(--line); stroke-width: 1; }
.c360-chart .c360-bar path { fill: var(--brand); opacity: .78; }
.c360-chart .c360-bar.now path { opacity: 1; }
.c360-chart .c360-bar .hit { fill: transparent; }
.c360-chart .c360-bar:hover path, .c360-chart .c360-bar:focus path { opacity: 1; fill: var(--brand-dark); }
.c360-chart .c360-bar:focus { outline: none; }
.c360-chart .c360-bar:focus .hit { stroke: var(--brand); stroke-width: 1.5; }
.c360-chart text { font-size: 11px; fill: var(--muted); font-family: var(--font); }
.c360-chart text.val { fill: var(--ink); font-weight: 600; }
.c360-list { list-style: none; margin: 0; padding: 0; }
.c360-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.c360-list li:last-child { border-bottom: 0; }
.c360-li-main { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.c360-li-sub { display: block; font-size: 12px; }
.c360-list .num { font-variant-numeric: tabular-nums; min-width: 72px; text-align: right; }
.c360-people { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.c360-people li { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; }
.c360-pp { min-width: 0; display: grid; gap: 2px; }
.c360-mail { overflow-wrap: anywhere; }
.c360-tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.c360-tasks li { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; padding: 8px; border-radius: var(--radius); background: var(--surface-2); }
.c360-tasks li.late { background: var(--err-soft); }
.c360-task { flex: 1; min-width: 0; }
.c360-alert { margin: 0 0 8px; color: var(--err); font-weight: 600; font-size: 13px; }
.c360-bad { color: var(--err); }
dl.kv.c360-kv { display: block; font-size: 13px; margin: 0; }
dl.kv.c360-kv dt { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; margin-top: 10px; }
dl.kv.c360-kv dt:first-child { margin-top: 0; }
dl.kv.c360-kv dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.c360-timeline .chatter-composer { position: static; }
.c360-legal { margin-top: 16px; }
.c360-legal > summary { cursor: pointer; padding: 2px 0; }
.c360-legal[open] > summary { margin-bottom: 14px; }
@media (max-width: 1360px) {
  .c360-grid { grid-template-columns: minmax(0, 1fr) 340px; grid-template-areas: "main about" "main side"; }
  .c360-money { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .c360-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "side" "about"; }
}
@media (max-width: 560px) {
  .c360-money { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .c360-titles h1 { font-size: 22px; }
  .pf-avatar.xl { width: 48px; height: 48px; font-size: 17px; border-radius: var(--radius); }
  .c360-pcards { grid-template-columns: 1fr; }
  .c360-m-value { font-size: 17px; }
  .c360-chart text { font-size: 19px; }
}
.pf-auto { margin: -6px 0 12px; font-size: 13px; }

/* ===== NEW-62: Lãi lỗ hai cột Dự kiến / Thực tế (js/pnl.js — tab Tiền, Khách hàng 360) ===== */
.pnl { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px; margin: 0 0 12px; min-width: 0; }
.pnl-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 6px; }
.pnl-head h4 { margin: 0; }
.pnl-head .muted { font-size: 12px; }
.pnl-acc { margin: 0 0 8px; font-size: 13px; }
.pnl-fee, .pj-fee-hint { margin: 0 0 8px; font-size: 12.5px; color: var(--muted, #667085); }   /* NEW-72 */
.pnl-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.pnl-col { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; background: var(--surface-2); min-width: 0; }
.pnl-col h5 { margin: 0 0 2px; font-size: 14px; }
.pnl-hint { margin: 0 0 8px; font-size: 12px; color: var(--muted); line-height: 1.45; }
.pnl-row { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; font-size: 13px; }
.pnl-row strong { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.pnl-row.pnl-sub { padding-left: 10px; color: var(--muted); font-size: 12px; }
.pnl-row.pnl-sub strong { font-weight: 500; }
.pnl-row.pnl-cost { border-top: 1px dashed var(--line); margin-top: 2px; }
.pnl-row.pnl-margin { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 6px; font-size: 14px; }
.pnl-row.pnl-margin strong { color: var(--ok-text); }
.pnl-row.pnl-margin.neg strong { color: var(--err); }
.pnl-pct { font-weight: 500; color: var(--muted); }
.pnl-foot { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.pnl-line { white-space: normal; }
@media (max-width: 420px) { .pnl { padding: 10px; } .pnl-cols { grid-template-columns: 1fr; } }
.c360-pnl { grid-column: 1 / -1; }                                     /* NEW-62: bảng lãi lỗ hai cột mở dưới dải tiền */
.c360-pnl > summary { cursor: pointer; font-size: 13px; color: var(--brand-dark); padding: 2px 0 6px; }
.c360-pnl .pnl { margin-bottom: 0; }
/* NEW-102: tách New / Old (Pnl.newOld / Pnl.newOldLine) */
.pnl-no-t { width: 100%; }
.pnl-no-t th[scope="row"] { font-weight: 500; text-align: left; }
.pnl-no-t td, .pnl-no-t th { font-variant-numeric: tabular-nums; }
.pnl-no-sub { font-weight: 400; font-size: 11.5px; }
.pnl-no-t .pnl-pos { color: var(--ok-text); }
.pnl-no-t .pi-neg { color: var(--err); }
.pnl-no-extra { margin: 6px 0 0; }
.c360-no { grid-column: 1 / -1; }
.c360-no .pnl { margin-bottom: 0; }
.pnl-no-line { display: inline-flex; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; }
.pnl-no-sep { color: var(--line); }
.pf-no { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: -6px 0 14px; font-size: 13px; color: var(--muted); }
.pf-no b { color: var(--ink); }
.pf-no[hidden] { display: none; }
.pj-no-tbl { margin: 0 0 12px; }
.home-scope { flex-wrap: wrap; row-gap: 6px; }
.home-scope .pf-noseg { margin-left: 8px; }
.pf-kpi-no { display: block; font-size: 11.5px; }

/* ---- NEW-71: Việc của tôi theo bản mẫu C-home — dải số liệu một khung, hai cột (việc · dự án / khách), dòng dự án gọn ---- */
.home-scope { display: flex; }
.home-scope .pf-scope { display: inline-flex; gap: 0; border: 1px solid var(--line); border-radius: var(--radius-btn); overflow: hidden; margin: 0; }
.home-scope .pf-scope .chip { border: 0; border-left: 1px solid var(--line); border-radius: 0; min-height: 32px; padding: 0 12px; font-weight: 500; color: var(--muted); background: var(--surface); }
.home-scope .pf-scope .chip:first-child { border-left: 0; }
.home-scope .pf-scope .chip.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.home-scope .pf-scope .chip.on::before { content: none; }
#homePortfolio.pf { margin-bottom: 16px; }
.pf-kpis { gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.pf-kpi { flex-direction: row; align-items: center; gap: 12px; padding: 12px 16px; border: 0; border-left: 1px solid var(--line); border-radius: 0; box-shadow: none; border-top: 0; }
.pf-kpi:first-child { border-left: 0; }
.pf-kpi:hover { background: var(--hover); border-color: var(--line); }
.pf-kpi-ic { width: 36px; height: 36px; border-radius: var(--radius); background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex: none; }
.pf-kpi.bad .pf-kpi-ic { background: var(--err-soft); color: var(--err); }
.pf-kpi-txt { display: flex; flex-direction: column; min-width: 0; }
.pf-kpi-value { font-size: 20px; line-height: 26px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-kpi-label { font-size: 12px; font-weight: 500; color: var(--muted); line-height: 16px; }
.pf-kpi-hint { font-size: 11px; line-height: 15px; }
.home-g { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 16px; align-items: start; }
.home-main #homeTasksHead { margin: 0 0 10px; }
.home-main #homeTasksHead h2 { font-size: 15px; }
.home-main .home-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
.home-side { display: grid; gap: 16px; min-width: 0; }
.home-card, .hm-panel { padding: 0; overflow: hidden; }
.home-card > h3, .hm-panel .pf-sec-head { padding: 10px 16px; border-bottom: 1px solid var(--line); margin: 0; min-height: 46px; }
.home-card > h3 { font-size: 15px; }
.home-card > .hint, .hm-panel > .hint { margin: 8px 16px; }
.home-card > .table-wrap { border: 0; border-radius: 0; box-shadow: none; }
.home-card > .home-done, .hm-panel > .home-done, .hm-panel > .pf-empty { margin: 12px 16px; }
.home-card > p.muted, .home-card > .all, .hm-more { margin: 8px 16px 12px !important; font-size: 12px; }
.home-card table.data td, .home-card table.data th { padding: 8px 12px; }
.hm-panel .btn.link, .home-card .all .btn { border-color: transparent; background: none; color: var(--brand); font-weight: 600; }
.hm-panel .btn.link:hover, .home-card .all .btn:hover { background: var(--hover); }
/* việc hẹn nhóm Quá hạn / Hôm nay / Sắp tới */
table.hm-due tr.hm-g td { background: var(--surface-2); font-weight: 700; height: 34px; padding: 6px 12px; border-top: 1px solid var(--line); }
table.hm-due tr.hm-g.late td { color: var(--err); }
table.hm-due .hm-n { color: var(--muted); font-weight: 500; }
table.hm-due tr.hm-row td { height: 40px; }
table.hm-due td.hm-ic { width: 36px; padding-right: 0; }
table.hm-due .hm-s { font-size: 12px; }
table.hm-due td.hm-d { white-space: nowrap; }
.act-c { width: 20px; height: 20px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; flex: none; vertical-align: middle; }
.act-c .ic { width: 12px; height: 12px; stroke-width: 2.25; }
.act-c.late { background: var(--err); }
.act-c.today { background: var(--accent); }
.act-c.plan { background: var(--ok); }
.act-c.none { background: transparent; color: var(--muted); border: 1px solid var(--line); }
/* Dự án của tôi: dòng gọn */
.hm-panel .pf-projs { display: block; }
.mp.pf-proj { display: block; padding: 12px 16px; border: 0; border-bottom: 1px solid var(--line-2); border-radius: 0; gap: 0; }
.mp.pf-proj:last-child { border-bottom: 0; }
.mp.pf-proj.late { box-shadow: inset 3px 0 0 var(--err); }
.mp-a { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mp-a .pf-brand { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; min-width: 0; }
.mp-a .act-c { margin-left: auto; }
.mp-s { font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-p { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.mp-p .pf-bar { flex: 1; margin: 0; }
.mp-p b { color: var(--ink); font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }
.mp-v { white-space: nowrap; font-variant-numeric: tabular-nums; }
.mp-f { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.mp-late { color: var(--err); font-weight: 600; display: inline-flex; align-items: center; gap: 3px; }
.mp-dot { color: var(--line); }
.hm-panel .pf-clist { margin: 0; padding: 0 16px; }
@media (max-width: 1200px) { .home-g { grid-template-columns: minmax(0, 1fr) 340px; } .pf-kpi { padding: 10px 12px; gap: 10px; } }
@media (max-width: 1000px) { .home-g { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .pf-kpi { border-left: 0; border-top: 1px solid var(--line); } .pf-kpi:first-child, .pf-kpi:nth-child(2) { border-top: 0; } .pf-kpi:nth-child(even) { border-left: 1px solid var(--line); } }
.pf-kpi.good, .pf-kpi.bad { border-top-color: var(--line); }
.home-main #homeTasksHead { height: 0; margin: 0; overflow: hidden; }   /* mốc cuộn của "Việc cần làm" (?focus=tasks); tiêu đề đã có ở control panel */
table.hm-due tr.hm-g.late td, table.hm-due tr.hm-row.late td { background: var(--surface); box-shadow: none; }
table.hm-due tr.hm-g.late td { background: var(--err-soft); }
table.hm-due tr.hm-row:hover td { background: var(--hover); }
table.hm-due .btn { white-space: nowrap; }
