@media screen {
  .workspace-nav { max-width:1900px; margin:0 auto; padding:18px clamp(20px,3vw,52px) 0; display:flex; gap:8px; }
  .workspace-nav button { border-color:transparent; background:transparent; color:var(--muted); }
  .workspace-nav button[aria-pressed="true"] { background:var(--bronze-wash); border-color:var(--hair); color:var(--bronze-deep); }
  #customerWorkspace { max-width:1900px; margin:auto; padding:24px clamp(20px,3vw,52px) 40px; }
  .hub-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:22px; flex-wrap:wrap; }
  .hub-heading h1 { margin:0; font-size:27px; letter-spacing:-.8px; }
  .hub-actions,.hub-filters,.hub-pager { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
  /* Yêu cầu xóa khách (Sales gửi, Sales Admin duyệt) */
  .hub-removal-cell { display:inline-flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:6px; }
  td.hub-removal-cell { display:table-cell; min-width:120px; text-align:right; } td.hub-removal-cell > * { margin:2px 0 2px 6px; }
  .hub-count { display:inline-grid; place-items:center; min-width:20px; height:20px; margin-left:4px; padding:0 6px; border-radius:999px; background:#b3261e; color:#fff; font-size:11px; font-weight:800; }
  .hub-reject-note { color:#b3261e; }
  .hub-stats { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; margin-bottom:22px; }
  .hub-stat { padding:20px 24px; border:1px solid var(--hair-soft); border-radius:var(--r-lg); background:var(--surface); }
  .hub-stat span { display:block; font-size:12px; color:var(--muted); margin-bottom:8px; }
  .hub-stat strong { font-size:30px; color:var(--bronze-deep); }
  .hub-filters { padding:18px; border-bottom:1px solid var(--hair-soft); }
  .hub-filters input { flex:1 1 260px; }
  .hub-filters select { width:auto; max-width:100%; }
  .hub-table { width:100%; border-collapse:collapse; min-width:960px; }
  .hub-table th { text-align:left; padding:16px; color:var(--muted); font-size:11px; font-weight:600; background:var(--surface-2); }
  .hub-table td { padding:17px 16px; border-top:1px solid var(--hair-soft); vertical-align:middle; font-size:13px; }
  .hub-table .hub-name { border:0; background:none; padding:0; font-size:14px; color:var(--ink); font-weight:600; text-align:left; min-height:0; }
  .hub-table tr:hover td { background:#c59b6d08; }
  .hub-sub { display:block; font-size:11px; color:var(--muted); margin-top:6px; }
  .hub-svcs { display:flex; flex-wrap:wrap; gap:3px 4px; max-width:340px; }
  .hub-svc { display:inline-flex; align-items:baseline; gap:2px; padding:1px 7px; border-radius:999px; background:#f4eadb; color:#3a2a17; font-size:12px; line-height:18px; white-space:nowrap; }
  .hub-svc b { font-weight:700; color:var(--bronze-deep); font-variant-numeric:tabular-nums; }
  .hub-svcs.unused .hub-svc { background:transparent; box-shadow:inset 0 0 0 1px #d9c6a5; color:var(--muted); }
  /* Danh sách khách: mọi ô một hàng (tên, phụ trách, nguồn, đánh giá…); riêng Dịch vụ được xuống dòng. */
  .hub-list-table td, .hub-list-table .hub-name { white-space:nowrap; }
  .hub-list-table td.hub-svc-cell { white-space:normal; min-width:130px; width:24%; }
  .hub-list-table td.hub-svc-cell .hub-sub { white-space:nowrap; }
  .hub-list-table td.hub-removal-cell { min-width:0; }
  #appView .hub-list-table th, #appView .hub-list-table td { padding-left:8px; padding-right:8px; }
  .hub-table .hub-zalo-cell { white-space:nowrap; text-align:center; }
  .hub-zalo-cell .hub-sub { text-align:center; }
  button.tag.hub-zalo-btn { min-height:0; padding:5px 12px; font-size:12px; border:1px solid transparent; cursor:pointer; }
  button.tag.hub-zalo-btn:hover { border-color:currentColor; }
  .hub-zalo-card { margin-bottom:20px; }
  .hub-zalo-head { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
  .hub-zalo-head h2 { margin:0; }
  .hub-zalo-row h3 { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
  .hub-zalo-row p { margin:6px 0 0; }
  .hub-zalo-row button { margin-top:10px; }
  .hub-pager { justify-content:flex-end; padding:16px; }
  .hub-pager span { color:var(--muted); margin-right:auto; font-size:12px; }
  .hub-tabs { display:flex; gap:6px; overflow:auto; padding-bottom:16px; }
  .hub-tabs button { flex-shrink:0; }
  .hub-tabs button[aria-selected="true"] { background:var(--bronze-wash); color:var(--bronze-deep); border-color:var(--bronze); }
  .hub-grid { display:grid; grid-template-columns:1fr 1fr; gap:20px; }
  .hub-card { padding:24px; border:1px solid var(--hair-soft); border-radius:var(--r-lg); background:var(--surface); min-width:0; }
  .hub-card h2 { margin:0 0 20px; font-size:16px; }
  .hub-card dl { margin:0; }
  .hub-card dl>div { display:grid; grid-template-columns:155px minmax(0,1fr); gap:12px; padding:12px 0; border-bottom:1px solid var(--hair-soft); }
  .hub-card dt { color:var(--muted); font-size:12px; }
  .hub-card dd { margin:0; font-size:13px; overflow-wrap:anywhere; white-space:pre-wrap; }
  .hub-card .field { margin-bottom:16px; }
  .hub-form-grid { display:grid; grid-template-columns:1fr 1fr; gap:0 20px; }
  .hub-form-grid .wide { grid-column:1/-1; }
  .hub-form-grid label,.hub-card label { display:block; margin-bottom:7px; font-size:12px; color:var(--muted); }
  .hub-form-grid input,.hub-form-grid select,.hub-form-grid textarea { width:100%; }
  .hub-entry { padding:18px 0; border-bottom:1px solid var(--hair-soft); }
  .hub-entry:first-child { padding-top:0; }
  .hub-entry h3 { font-size:14px; margin:0 0 8px; }
  .hub-entry p { white-space:pre-wrap; overflow-wrap:anywhere; color:var(--ink-2); font-size:13px; }
  .hub-entry small { color:var(--muted); font-size:11px; }
  .hub-stars { color:var(--bronze-deep); white-space:nowrap; letter-spacing:2px; }
  #hubNotice { margin-bottom:16px; }
  .hub-error { padding:18px; color:var(--crit); }
  .hub-form-footer { display:flex; gap:12px; justify-content:flex-end; margin-top:22px; }
  .hub-condition { padding:14px 0; border-bottom:1px solid var(--hair-soft); }
  .hub-condition label { display:flex; gap:10px; align-items:center; color:var(--ink); }
  .hub-condition input[type="checkbox"] { width:18px; min-height:18px; }
  .hub-condition .hub-form-grid { margin-top:12px; }
  @media(max-width:850px) { .hub-grid { grid-template-columns:1fr; } .hub-heading h1 { font-size:23px; } }
  @media(max-width:600px) {
    #customerWorkspace { padding:20px 14px; } .workspace-nav { padding:14px 14px 0; }
    .hub-stats { gap:8px; } .hub-stat { padding:14px 10px; } .hub-stat strong { font-size:24px; }
    .hub-stat span { font-size:10px; } .hub-card { padding:18px; }
    .hub-card dl>div { grid-template-columns:110px minmax(0,1fr); }
    .hub-form-grid { grid-template-columns:1fr; }
    .hub-filters select { flex:1; min-width:130px; }
    .hub-actions button { font-size:12px; } .hub-filters input { min-width:0; }
  }
}

.hub-preparation .hub-add-document{width:100%;min-height:160px;display:grid;grid-template-columns:32px minmax(0,1fr) 32px;align-items:center;gap:12px;padding:20px;border:1px dashed var(--hair);background:transparent;color:var(--bronze-deep);white-space:normal;text-align:center;border-radius:12px}.hub-add-plus{font-size:36px;font-weight:400}.hub-preparation h2:not(:first-child){margin-top:24px}#hubIntakeBody .ttyt-form{margin:0;border:0}#hubIntakeBody .ttyt-form>.panel-head{display:none}

.hub-medical-history{margin-top:24px;padding-top:20px;border-top:1px solid var(--hair)}

.hub-add-document>span:not(.hub-add-plus){grid-column:2;grid-row:1}.hub-add-document>.hub-add-plus{grid-column:1;grid-row:1}#hubHistoryDialog{width:min(760px,calc(100vw - 24px))}#hubHistoryDialog label{display:block;margin-bottom:6px}#hubHistoryDialog .hub-condition{margin:0 0 14px;padding:14px;border:1px solid var(--hair);border-radius:10px}#hubHistoryDialog .hub-condition>.sm{margin-top:10px}

.hub-heading-actions{display:flex;align-items:center;gap:10px;flex-shrink:0}

.hub-preparation .hub-add-document[hidden],.hub-document-state[hidden]{display:none}.hub-document-state{min-height:160px;border:1px solid var(--hair);border-radius:12px;padding:20px;display:flex;align-items:center;justify-content:space-between;gap:16px;background:var(--surface-2)}.hub-document-content{min-width:0;display:grid;gap:10px;overflow-wrap:anywhere}.hub-document-content>svg{color:var(--bronze-deep)}.hub-document-content>strong{font-size:14px;color:var(--bronze-deep)}.hub-document-content p{margin:0;font-size:13px}.hub-document-content ul{margin:0;padding-left:18px;font-size:13px;line-height:1.7}.hub-document-state>button{flex-shrink:0}@media(max-width:520px){.hub-document-state{align-items:flex-start;flex-direction:column}.hub-document-state>button{align-self:flex-end}}

/* Keep customer preparation compact and unchanged in size after adding data. */

.owner-group{margin:8px 0;border:1px solid var(--hair);border-radius:10px;overflow:hidden}.owner-group>summary{padding:12px 14px;cursor:pointer;color:var(--bronze-deep);font-weight:600}.owner-group>summary .tag{margin-left:8px;font-size:10px}.owner-group-body{border-top:1px solid var(--hair);padding:6px}.owner-group-body .pitem{width:100%}

/* Tao ho so y te ngay tren danh sach khach hang */
.hub-table .hub-create-medical{border-color:var(--bronze);color:var(--bronze-deep);background:transparent;font-weight:600;white-space:nowrap}
.hub-table .hub-create-medical:hover:not(:disabled){background:var(--bronze);color:#17120c}
.hub-table .hub-open-medical{border:0;background:none;padding:0;min-height:0;color:var(--bronze-deep);font-weight:600;font-variant-numeric:tabular-nums;text-decoration:underline;text-decoration-color:rgba(192,154,103,.45);text-underline-offset:4px;cursor:pointer}
.hub-table .hub-open-medical:hover{color:var(--bronze-lift);text-decoration-color:currentColor}

/* Xóa khách */
.hub-table .hub-remove{white-space:nowrap}
/* Ô được điền tự động từ phiếu y tế */
#appView .hub-form-grid input.hub-autofilled,#appView #customerWorkspace .hub-cf input.hub-autofilled{border-color:var(--bronze);box-shadow:0 0 0 1px var(--bronze);background:rgba(192,154,103,.08)}

/* 10/10: chip trạng thái theo màu, sao đánh giá to + lấp lánh, bảng khách hàng căn giữa */
@media screen {
  #appView .tag.hub-st { padding:5px 12px; border:1px solid transparent; border-radius:999px; font-size:12px; font-weight:700; }
  #appView .tag.hub-st-pending { background:#fdecec; border-color:#f5c2bd; color:#b3261e; }
  #appView .tag.hub-st-approved { background:#e6f6ea; border-color:#b4e0c1; color:#15803d; }
  #appView .tag.hub-st-rejected { background:#f0f0f2; border-color:#d4d4d8; color:#3f3f46; }
  #appView .hub-stars { display:inline-flex; align-items:center; font-size:20px; line-height:1; letter-spacing:2px; white-space:nowrap; }
  #appView .hub-stars-on {
    background:linear-gradient(110deg, #a26a16 0%, #e0a32e 32%, #fff3bf 50%, #e0a32e 68%, #a26a16 100%);
    background-size:260% 100%; -webkit-background-clip:text; background-clip:text; color:transparent;
    animation:hub-star-shine 3.2s ease-in-out infinite, hub-star-glow 3.2s ease-in-out infinite;
  }
  #appView .hub-stars-off { color:#d9c6a5; }
  @keyframes hub-star-shine { 0% { background-position:115% 0; } 55%, 100% { background-position:-15% 0; } }
  @keyframes hub-star-glow { 0%, 100% { filter:drop-shadow(0 0 1px rgba(224, 163, 46, .35)); } 30% { filter:drop-shadow(0 0 6px rgba(240, 190, 70, .9)); } }
  @media (prefers-reduced-motion: reduce) { #appView .hub-stars-on { animation:none; filter:drop-shadow(0 0 2px rgba(224, 163, 46, .5)); } }
  #appView .hub-table th, #appView .hub-table td { text-align:center; }
  #appView .hub-table .hub-name { text-align:center; }
  #appView .hub-table .hub-svcs { margin:0 auto; justify-content:center; }
  /* Danh sách khách (23/10): dấu tích xanh = đã duyệt; cụm cột Dịch vụ, mỗi dịch vụ một cột ghi "N lần" */
  #appView .hub-name-line { display:inline-flex; align-items:center; justify-content:center; gap:6px; white-space:nowrap; }
  #appView .hub-ok { display:inline-flex; align-items:center; justify-content:center; flex:0 0 18px; width:18px; height:18px; border-radius:50%; background:#16a34a; color:#fff; font-size:12px; font-weight:800; line-height:1; }
  #appView .tag.hub-st.hub-st-sm { padding:1px 7px; font-size:10.5px; font-weight:700; }
  #appView .hub-list-table th.hub-svc-head { border-bottom:1px solid #d9cbb6; letter-spacing:.06em; }
  #appView .hub-list-table th.hub-svc-sub { padding:8px 8px; font-size:10.5px; line-height:1.25; white-space:nowrap; min-width:64px; }
  #appView .hub-list-table td.hub-svc-n { padding-left:6px; padding-right:6px; font-weight:700; color:var(--bronze-deep); white-space:nowrap; font-variant-numeric:tabular-nums; }
  #appView .hub-list-table td.hub-svc-n.soft { color:var(--muted); font-weight:600; font-size:12px; }
  /* Ghim (23/10): khung bảng cao vừa màn hình, cuộn trong khung; tiêu đề 2 tầng dính trên, cột Khách hàng dính trái */
  #appView .tbl-wrap.hub-list-wrap { max-height:calc(100vh - 150px); overflow:auto; overscroll-behavior:contain; }
  /* Kéo chuột để cuộn bảng (customers.js dragScroll) */
  @media (hover:hover) and (pointer:fine) { #appView .tbl-wrap.hub-list-wrap tbody td { cursor:grab; } }
  #appView .tbl-wrap.hub-list-wrap.is-dragging, #appView .tbl-wrap.hub-list-wrap.is-dragging * { cursor:grabbing !important; user-select:none; }
  #appView .hub-list-table thead th { position:sticky; top:0; z-index:3; box-shadow:inset 0 -1px 0 #d9cbb6; }
  #appView .hub-list-table thead tr + tr th { top:var(--hub-h1, 37px); }
  #appView .hub-list-table tbody td:first-child { position:sticky; left:0; z-index:2; background:#fff; box-shadow:inset -1px 0 0 #e6dccb, 6px 0 8px -6px rgba(58, 42, 23, .18); }
  #appView .hub-list-table thead tr:first-child th:first-child { left:0; z-index:4; box-shadow:inset -1px 0 0 #d9cbb6, inset 0 -1px 0 #d9cbb6, 6px 0 8px -6px rgba(58, 42, 23, .18); }
  /* Cỡ chữ (23/10): tiêu đề bảng to hơn; cột Khách hàng co vừa tên (width 1% = rộng bằng nội dung); số điện thoại to hơn */
  #appView .hub-list-table thead th { font-size:12.5px; letter-spacing:.04em; }
  #appView .hub-list-table th.hub-svc-sub { font-size:11.5px; }
  #appView .hub-list-table thead tr:first-child th:first-child, #appView .hub-list-table tbody td:first-child { width:1%; padding-left:16px; padding-right:16px; }
  #appView .hub-list-table tbody td:first-child .hub-sub { font-size:13px; margin-top:4px; letter-spacing:.02em; }
  /* Thanh chọn sales (23/10): nút từng sales có số khách + số chờ duyệt, cuộn ngang khi nhiều sales */
  #appView .hub-owners { display:flex; gap:8px; padding:12px 16px; overflow-x:auto; border-bottom:1px solid var(--hair-soft, #eee5d8); scrollbar-width:thin; }
  #appView .hub-owners[hidden] { display:none; }
  #appView .hub-owner { flex:0 0 auto; display:inline-flex; align-items:center; gap:8px; min-height:38px; padding:6px 14px; border:1px solid #d9cbb6; border-radius:999px; background:#fff; color:#2b2118; font-size:13.5px; font-weight:600; white-space:nowrap; cursor:pointer; }
  #appView .hub-owner:hover { border-color:var(--bronze-deep, #8a5a24); }
  #appView .hub-owner b { min-width:26px; padding:1px 8px; border-radius:999px; background:#f4eadb; color:var(--bronze-deep, #8a5a24); font-size:12px; font-weight:700; text-align:center; font-variant-numeric:tabular-nums; }
  #appView .hub-owner i { font-style:normal; padding:1px 7px; border-radius:999px; background:#fdecec; color:#b3261e; font-size:11px; font-weight:700; }
  #appView .hub-owner.is-none .hub-owner-name { color:#6b6159; font-style:italic; }
  #appView .hub-owner[aria-selected="true"] { background:#a9783a; border-color:#a9783a; color:#fff; }
  #appView .hub-owner[aria-selected="true"] b { background:rgba(255,255,255,.22); color:#fff; }
  #appView .hub-owner[aria-selected="true"] .hub-owner-name { color:#fff; }
  #appView .hub-pager .hub-pg { min-width:34px; }
  #appView .hub-pager .hub-pg.is-on { background:#a9783a; border-color:#a9783a; color:#fff; }
  #appView .hub-pager .hub-pg-gap { margin:0 2px; color:var(--muted); font-size:12px; }
  /* Sửa hồ sơ — Dịch vụ đã dùng (24/10): ô số cho từng dịch vụ + dòng dịch vụ khác */
  #appView .hub-svc-edit > label small { color:var(--muted); font-weight:500; }
  #appView .hub-svc-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(165px, 1fr)); gap:8px; margin-bottom:10px; }
  #appView .hub-form-grid label.hub-svc-in { display:flex; align-items:center; gap:8px; margin:0; padding:6px 10px; border:1px solid #e3d6c2; border-radius:10px; background:#fffdf9; color:#2b2118; font-size:13px; font-weight:600; }
  #appView .hub-svc-in span { flex:1; min-width:0; }
  #appView .hub-form-grid .hub-svc-in input { width:64px; min-height:32px; padding:3px 6px; text-align:center; }
  #appView .hub-svc-in em, #appView .hub-svc-row em { font-style:normal; color:var(--muted); font-size:12px; min-width:18px; }
  #appView .hub-svc-row { display:grid; grid-template-columns:minmax(0,1fr) 80px auto auto; align-items:center; gap:8px; margin-bottom:8px; }
  #appView .hub-form-grid .hub-svc-row input[data-svc-count] { text-align:center; }
  /* app.css ẩn cột thứ 4 mọi bảng ở ≤480px (bảng xét nghiệm) — bảng khách có tiêu đề 2 tầng nên giữ đủ cột, tránh lệch */
  @media (max-width:480px) { #appView .tbl-wrap .hub-list-table th:nth-child(4), #appView .tbl-wrap .hub-list-table td:nth-child(4) { display:table-cell; } }
  #appView .hub-list-table td.hub-svc-other { white-space:normal; min-width:120px; max-width:200px; font-weight:600; font-size:12px; color:var(--ink); }
}
/* Phiếu ĐKDV trong hồ sơ khách (customers.js dkdvCardHtml — popup Phiếu ĐKDV ở tab Thông tin khách hàng): sản phẩm / dịch vụ đã đăng ký + số lượng, các phiếu; mục phiếu trong Lịch sử hồ sơ */
@media screen {
  #appView .hub-grid > .hub-dk { grid-column:1 / -1; }
  #appView .hub-dk > h2 { flex-wrap:wrap; row-gap:4px; }
  #appView .hub-dk > h2 .hub-dk-stats { color:var(--muted); font-size:12px; font-weight:600; }
  #appView .hub-dk h3 { margin:22px 0 8px; font-size:12px; color:var(--bronze-deep); text-transform:uppercase; letter-spacing:.04em; }
  #appView .hub-dk-empty { margin:0; padding:16px; border:1px dashed var(--hair); border-radius:12px; color:var(--muted); font-size:13px; text-align:center; }
  #appView .hub-dk-wrap { overflow-x:auto; }
  #appView .hub-dk-table { width:100%; border-collapse:collapse; font-size:13px; }
  #appView .hub-dk-table th { padding:9px 10px; text-align:left; color:var(--muted); font-size:11px; font-weight:700; background:var(--surface-2); white-space:nowrap; }
  #appView .hub-dk-table td { padding:10px; border-top:1px solid var(--hair-soft); vertical-align:middle; }
  #appView .hub-dk-table .r { text-align:right; }
  #appView .hub-dk-table td.q { font-weight:800; font-variant-numeric:tabular-nums; white-space:nowrap; }
  #appView .hub-dk-table td small { display:block; margin-top:2px; color:var(--muted); font-size:11px; }
  #appView .hub-dk-table em, #appView .hub-dk-gifts em { font-style:normal; font-weight:700; color:var(--bronze-deep); white-space:nowrap; }
  #appView .hub-dk-orders td:nth-child(-n+3), #appView .hub-dk-orders td:nth-child(n+6) { white-space:nowrap; }
  #appView .hub-dk-orders tr.is-cancel td { color:var(--muted); }
  #appView .hub-dk-orders tr.is-cancel .hub-dk-no { text-decoration:line-through; }
  #appView .hub-dk-gifts { display:flex; flex-wrap:wrap; align-items:center; gap:6px 8px; margin-top:12px; font-size:13px; }
  #appView .hub-dk-gifts span { padding:4px 10px; border-radius:99px; background:var(--bronze-wash); }
  #appView .hub-dk-no { border:0; background:none; padding:0; min-height:0; font:inherit; font-weight:800; color:var(--bronze-deep); text-decoration:underline; text-underline-offset:2px; cursor:pointer; white-space:nowrap; }
  #appView .hub-dk-entry h3 { display:flex; flex-wrap:wrap; align-items:center; gap:4px 6px; }
  #appView .hub-dk-money { display:flex; flex-wrap:wrap; gap:6px 18px; margin:-6px 0 14px; font-size:13px; color:var(--muted); }
  #appView .hub-dk-money b { color:var(--normal); font-variant-numeric:tabular-nums; } #appView .hub-dk-money b.due { color:#b3261e; } #appView .hub-dk-money b.wait { color:var(--high); }
  #appView .hub-dk-table td.q small { display:block; font-weight:600; }
}
/* ===== Giao diện CRM mới (11/2026, docs/SALES-DESKTOP-UI-SYNC.md; phác thảo CustomerList / CustomerDetail) ===== */
@media screen {
  /* Nút ít dùng ẩn, mở qua ⋯ (ui.menuFromButtons bấm lại đúng nút gốc) — mọi cỡ màn, ⋯ luôn hiện */
  #customerWorkspace .hub-more-src, #customerWorkspace #hubRemovalBox > button, #customerWorkspace .hub-list-table td.hub-removal-cell > button:not(.ui-more) { display:none; }
  /* Đầu màn: (← màn cha) · tiêu đề · số đếm · nút bên phải; dòng phụ dưới tiêu đề */
  #appView #customerWorkspace .hub-heading { flex-wrap:wrap; justify-content:flex-start; column-gap:12px; row-gap:6px; }
  #appView #customerWorkspace .hub-heading h1 { margin:0; }
  #appView #customerWorkspace .hub-heading > .hub-actions { margin-left:auto; gap:8px; }
  #appView #customerWorkspace .hub-heading > .hub-sub { flex:0 0 100%; margin:0; color:#6F655A; font-size:13px; }
  #appView #customerWorkspace .hub-back-row { flex:0 0 100%; }
  #appView #customerWorkspace button.hub-back { min-height:0; padding:0; border:0; background:none; color:#8A5F27; font-size:13px; font-weight:600; }
  #appView #customerWorkspace button.hub-back:hover { background:none; color:#6E4A1C; }
  #appView #customerWorkspace .hub-head-count { display:inline-grid; place-items:center; min-width:26px; height:24px; padding:0 8px; box-sizing:border-box; border-radius:12px; background:#F1ECE4; color:#6F655A; font-size:12px; font-weight:700; }
  #appView #customerWorkspace .hub-head-count[hidden] { display:none; }
  #appView #customerWorkspace .hub-count { background:#C2362B; }
  /* Chip trạng thái duyệt */
  #appView #customerWorkspace .tag.hub-st { display:inline-flex; align-items:center; height:24px; padding:0 10px; box-sizing:border-box; border:0; border-radius:12px; font-size:12px; font-weight:600; }
  #appView #customerWorkspace .tag.hub-st-approved { background:#E6F2E8; color:#1F5E2E; }
  #appView #customerWorkspace .tag.hub-st-pending { background:#FFF2E0; color:#8A4B0C; }
  #appView #customerWorkspace .tag.hub-st-rejected { background:#FBE7E5; color:#9B2F23; }
  #appView #customerWorkspace .tag.hub-st.hub-st-sm { height:22px; padding:0 10px; border-radius:11px; font-size:12px; font-weight:600; }
  /* Hàng lọc ngoài thẻ bảng: ô tìm viên thuốc + chọn dạng chip */
  #appView #customerWorkspace .hub-filters { gap:10px; margin:0 0 16px; padding:0; border:0; }
  #appView #customerWorkspace .hub-search { display:flex; align-items:center; gap:8px; flex:1 1 280px; max-width:420px; height:40px; margin:0; padding:0 14px; box-sizing:border-box; border:1px solid #E4DACA; border-radius:20px; background:#fff; color:#6F655A; font-size:14px; font-weight:400; }
  #appView #customerWorkspace .hub-search svg { flex:0 0 16px; }
  #appView #customerWorkspace .hub-search:focus-within { border-color:#9A6A2E; box-shadow:0 0 0 3px #9a6a2e1f; }
  #appView #customerWorkspace .hub-search input { flex:1 1 auto; min-width:0; width:auto; height:38px; padding:0; border:0; outline:0; background:transparent; box-shadow:none; color:#25211C; font-size:14px; }
  #appView #customerWorkspace .hub-filters select { width:auto; height:36px; min-height:36px; padding:0 30px 0 14px; border:1px solid #E4DACA; border-radius:18px; background-color:#fff; color:#25211C; font-size:13px; font-weight:600; }
  #appView #customerWorkspace > .hub-stats { margin:0 0 16px; }
  /* Chip người phụ trách: một hàng, cuộn ngang */
  #appView #customerWorkspace .hub-owners { flex-wrap:nowrap; gap:8px; margin:0 0 16px; padding:0 0 2px; border:0; }
  #appView #customerWorkspace .hub-owner { height:34px; min-height:34px; padding:0 14px; border:1px solid #E4DACA; border-radius:17px; background:#fff; color:#25211C; font-size:13px; font-weight:600; }
  #appView #customerWorkspace .hub-owner:hover { border-color:#B89F7E; background:#fff; }
  #appView #customerWorkspace .hub-owner b { min-width:0; padding:0; border-radius:0; background:none; color:inherit; font-size:12px; font-weight:700; }
  #appView #customerWorkspace .hub-owner i { padding:0; border-radius:0; background:none; color:#8A4B0C; font-size:12px; font-weight:500; }
  #appView #customerWorkspace .hub-owner[aria-selected="true"] { border-color:#EFE2CC; background:#EFE2CC; color:#6E4A1C; }
  #appView #customerWorkspace .hub-owner[aria-selected="true"] b, #appView #customerWorkspace .hub-owner[aria-selected="true"] .hub-owner-name { background:none; color:#6E4A1C; }
  /* Thẻ bảng danh sách */
  #appView #customerWorkspace section.hub-list-card { border:1px solid #E4DACA; border-radius:16px; overflow:hidden; background:#fff; }
  #appView #customerWorkspace .hub-list-card .tbl-wrap { border:0; border-radius:0; }
  #appView #customerWorkspace .hub-list-table th { padding:12px; background:#FAF7F2; color:#6F655A; font-size:13px; font-weight:600; letter-spacing:0; text-align:left; white-space:nowrap; border:0; box-shadow:inset 0 -1px 0 #EFE9DD; }
  #appView #customerWorkspace .hub-list-table td { height:56px; padding:12px; box-sizing:border-box; border:0; border-top:1px solid #EFE9DD; color:#25211C; font-size:14px; text-align:left; vertical-align:middle; }
  #appView #customerWorkspace .hub-list-table tr > :first-child { padding-left:16px; padding-right:16px; }
  #appView #customerWorkspace .hub-list-table tr > :last-child { padding-right:16px; }
  #appView #customerWorkspace .hub-list-table tbody tr:hover td { background:#FAF1E1; }
  #appView #customerWorkspace .hub-list-table tbody td:first-child { background:#fff; box-shadow:inset -1px 0 0 #EFE9DD; }
  #appView #customerWorkspace .hub-list-table tbody tr:hover td:first-child { background:#FAF1E1; }
  #appView #customerWorkspace .hub-list-table thead tr:first-child th:first-child { box-shadow:inset -1px 0 0 #EFE9DD, inset 0 -1px 0 #EFE9DD; }
  #appView #customerWorkspace .hub-list-table .hub-sub { margin-top:2px; color:#6F655A; font-size:12px; letter-spacing:0; }
  #appView #customerWorkspace .hub-list-table tbody td:first-child .hub-sub { font-size:12px; margin-top:2px; letter-spacing:0; }
  #appView #customerWorkspace .hub-list-table .hub-name-line { justify-content:flex-start; gap:8px; }
  #appView #customerWorkspace .hub-list-table .hub-name { height:auto; min-height:0; padding:0; border:0; background:none; color:#25211C; font-size:14px; font-weight:700; line-height:20px; text-align:left; }
  #appView #customerWorkspace .hub-list-table .hub-name:hover { background:none; color:#8A5F27; }
  #appView #customerWorkspace .hub-ok { display:inline-flex; flex:0 0 16px; width:16px; height:16px; border-radius:0; background:none; color:#1F5E2E; }
  #appView #customerWorkspace .hub-list-table th.hub-svc-sub, #appView #customerWorkspace .hub-list-table td.hub-svc-n { min-width:0; text-align:right; }
  #appView #customerWorkspace .hub-list-table td.hub-svc-n { color:#25211C; font-size:14px; font-weight:500; }
  #appView #customerWorkspace .hub-list-table td.hub-svc-n.soft { color:#6F655A; font-size:13px; font-weight:500; }
  #appView #customerWorkspace .hub-list-table td.hub-svc-other { font-size:13px; font-weight:500; text-align:left; }
  #appView #customerWorkspace .hub-list-table .hub-zalo-cell, #appView #customerWorkspace .hub-list-table .hub-zalo-cell .hub-sub { text-align:left; }
  #appView #customerWorkspace button.tag.hub-zalo-btn { height:24px; min-height:24px; padding:0 10px; border:0; border-radius:12px; font-size:12px; font-weight:600; }
  #appView #customerWorkspace button.tag.hub-zalo-btn.info { background:#E7EEF9; color:#24498A; }
  #appView #customerWorkspace button.tag.hub-zalo-btn.brand { background:#F1ECE4; color:#6F655A; }
  #appView #customerWorkspace button.tag.hub-zalo-btn:hover { box-shadow:inset 0 0 0 1px currentColor; }
  #appView #customerWorkspace .hub-stars { font-size:14px; letter-spacing:1px; }
  #appView #customerWorkspace .hub-stars-on { background:none; color:#8A5F27; -webkit-text-fill-color:currentColor; animation:none; filter:none; }
  #appView #customerWorkspace .hub-stars-off { color:#E4DACA; }
  #appView #customerWorkspace .hub-list-table .muted { color:#6F655A; font-size:14px; }
  #appView #customerWorkspace .hub-table .hub-create-medical { height:32px; min-height:32px; padding:0 12px; border:1px solid #E4DACA; border-radius:10px; background:#fff; color:#25211C; font-size:13px; font-weight:600; }
  #appView #customerWorkspace .hub-table .hub-create-medical:hover:not(:disabled) { border-color:#B89F7E; background:#FAF7F2; color:#25211C; }
  #appView #customerWorkspace .hub-table .hub-open-medical { color:#8A5F27; text-decoration:none; }
  #appView #customerWorkspace .hub-table .hub-open-medical:hover { color:#6E4A1C; text-decoration:underline; }
  #appView #customerWorkspace .hub-list-table td.hub-removal-cell { width:1%; text-align:right; }
  #appView #customerWorkspace .hub-list-table td.hub-removal-cell > * { margin:0 0 0 6px; vertical-align:middle; }
  /* Chân bảng */
  #appView #customerWorkspace .hub-pager { gap:6px; padding:12px 16px; border-top:1px solid #EFE9DD; }
  #appView #customerWorkspace .hub-pager span { color:#6F655A; font-size:13px; }
  #appView #customerWorkspace .hub-pager button { height:32px; min-height:32px; min-width:32px; padding:0 12px; border:1px solid #E4DACA; border-radius:10px; background:#fff; color:#25211C; font-size:13px; font-weight:600; }
  #appView #customerWorkspace .hub-pager button.hub-pg { padding:0 8px; font-weight:500; }
  #appView #customerWorkspace .hub-pager button.hub-pg.is-on { border-color:#9A6A2E; background:#9A6A2E; color:#fff; font-weight:700; }
  #appView #customerWorkspace .hub-pager button:disabled { opacity:1; border-color:#EFE9DD; color:#6F655A; font-weight:500; }
  #appView #customerWorkspace .hub-pager .hub-pg-gap { color:#6F655A; font-size:13px; margin:0; }
  /* Hồ sơ khách: 6 tab chữ + gạch dưới */
  #appView #customerWorkspace .hub-tabs { gap:24px; margin:0 0 16px; padding:0; box-shadow:inset 0 -1px 0 #EFE9DD; scrollbar-width:none; }
  #appView #customerWorkspace .hub-tabs button { height:44px; min-height:44px; padding:0; border:0; border-bottom:2px solid transparent; border-radius:0; background:none; box-shadow:none; color:#6F655A; font-size:14px; font-weight:600; white-space:nowrap; }
  #appView #customerWorkspace .hub-tabs button:hover { background:none; color:#25211C; }
  #appView #customerWorkspace .hub-tabs button[aria-selected="true"] { border-bottom-color:#9A6A2E; background:none; color:#25211C; }
  /* Thẻ 2 cột phẳng: tiêu đề 16/700, cặp nhãn 160px – giá trị */
  #appView #customerWorkspace .hub-grid { gap:16px; }
  #appView #customerWorkspace #hubDetail .hub-card { padding:20px 24px; }
  #appView #customerWorkspace #hubDetail .hub-card > h2 { margin:0 0 8px; }
  #appView #customerWorkspace #hubDetail .hub-card dl > div { grid-template-columns:160px minmax(0,1fr); gap:12px; padding:10px 0; border:0; border-top:1px solid #EFE9DD; }
  #appView #customerWorkspace #hubDetail .hub-card dt { color:#6F655A; font-size:13px; }
  #appView #customerWorkspace #hubDetail .hub-card dd { color:#25211C; font-size:14px; }
  #appView #customerWorkspace .hub-grid > #hubVisaCard { grid-row:span 2; align-self:start; }
  /* Thẻ Phiếu ĐKDV: dải tiền, bảng viền nhạt, quà tặng dạng chip */
  #appView #customerWorkspace .hub-dk > h2 { align-items:baseline; gap:12px; }
  #appView #customerWorkspace .hub-dk > h2 .hub-dk-stats { color:#6F655A; font-size:13px; font-weight:500; }
  #appView #customerWorkspace .hub-dk-money { display:flex; flex-wrap:wrap; align-items:center; gap:0; min-height:48px; margin:8px 0 16px; padding:6px 4px; box-sizing:border-box; border-radius:12px; background:#FAF7F2; color:#6F655A; font-size:13px; }
  #appView #customerWorkspace .hub-dk-money > span { display:inline-flex; align-items:baseline; gap:6px; padding:6px 16px; border-left:1px solid #EFE9DD; }
  #appView #customerWorkspace .hub-dk-money > span:first-child { border-left:0; }
  #appView #customerWorkspace .hub-dk-money b { color:#1F5E2E; font-size:15px; font-weight:700; }
  #appView #customerWorkspace .hub-dk-money b.due { color:#9B2F23; }
  #appView #customerWorkspace .hub-dk-money b.wait { color:#8A4B0C; }
  #appView #customerWorkspace .hub-dk-wrap { border:1px solid #EFE9DD; border-radius:12px; }
  #appView #customerWorkspace .hub-dk-table { font-size:14px; }
  #appView #customerWorkspace .hub-dk-table th { padding:10px 12px; border:0; background:#FAF7F2; color:#6F655A; font-size:13px; font-weight:600; }
  #appView #customerWorkspace .hub-dk-table td { padding:12px; border:0; border-top:1px solid #EFE9DD; color:#25211C; }
  #appView #customerWorkspace .hub-dk-table tr > :first-child { padding-left:16px; }
  #appView #customerWorkspace .hub-dk-table tr > :last-child { padding-right:16px; }
  #appView #customerWorkspace .hub-dk-table td.q { font-weight:700; }
  #appView #customerWorkspace .hub-dk-table td small { color:#6F655A; font-size:12px; font-weight:500; }
  #appView #customerWorkspace .hub-dk-table em { color:inherit; font-weight:500; }
  #appView #customerWorkspace .hub-dk-orders tr.is-cancel td { color:#6F655A; }
  #appView #customerWorkspace .hub-dk h3 { margin:16px 0 8px; color:#25211C; font-size:16px; font-weight:700; text-transform:none; letter-spacing:0; }
  #appView #customerWorkspace .hub-dk-no { color:#8A5F27; font-weight:700; text-decoration:none; }
  #appView #customerWorkspace .hub-dk-no:hover { color:#6E4A1C; text-decoration:underline; }
  #appView #customerWorkspace .hub-dk-gifts { gap:8px; margin-top:16px; }
  #appView #customerWorkspace .hub-dk-gifts b { font-size:13px; font-weight:700; }
  #appView #customerWorkspace .hub-dk-gifts span { display:inline-flex; align-items:center; gap:4px; height:28px; padding:0 12px; box-sizing:border-box; border-radius:14px; background:#FFF2E0; color:#8A4B0C; font-size:12px; font-weight:600; }
  #appView #customerWorkspace .hub-dk-gifts em { color:inherit; font-weight:600; }
}
@media screen and (min-width:901px) {
  /* Nút đầu màn: cao 40, bo 10; nút viền nền trắng, nút đặc #9A6A2E */
  #appView #customerWorkspace .hub-heading > .hub-actions > button:not(.ui-more) { height:40px; min-height:40px; padding:0 16px; border-radius:10px; font-size:14px; font-weight:600; }
  #appView #customerWorkspace .hub-heading > .hub-actions > button:not(.ui-more):not(.primary) { border:1px solid #E4DACA; background:#fff; color:#25211C; }
  #appView #customerWorkspace .hub-heading > .hub-actions > button:not(.ui-more):not(.primary):hover { border-color:#B89F7E; background:#FAF7F2; }
  #appView #customerWorkspace .hub-heading > .hub-actions > button.primary { gap:8px; font-weight:700; }
  #appView #customerWorkspace .hub-heading .hub-removal-cell .tag { height:24px; padding:0 10px; border:0; border-radius:12px; font-size:12px; font-weight:600; }
}
#appView #customerWorkspace .hub-heading .hub-removal-cell:empty { display:none; }
/* ===== Điện thoại (≤ 900px, 11/2026, theo CRM mobile): đầu màn 1 nút đặc + ⋯, lọc 1 hàng chip cuộn ngang,
   dải tóm tắt nhãn trên số dưới, bảng khách → thẻ mỗi khách, tab cuộn ngang, thẻ 1 cột. Máy tính (≥ 901px) không đổi. ===== */
#customerWorkspace .hub-chiprow { display:contents; }
@media screen and (min-width:901px) { #appView #customerWorkspace .ui-more.hub-more-mob { display:none; } }
@media screen and (max-width:900px) {
  #appView #customerWorkspace { padding-top:12px; padding-bottom:16px; }
  /* Đầu màn: nút viền vào ⋯ (customers.js thêm chúng vào menu), nút đặc rút gọn chữ */
  #appView #customerWorkspace .hub-heading { flex-wrap:wrap; align-items:center; column-gap:8px; row-gap:6px; min-height:40px; margin-bottom:12px; }
  #appView #customerWorkspace .hub-heading > .hub-actions { flex:0 0 auto; flex-wrap:nowrap; gap:8px; }
  #appView #customerWorkspace :is(.hub-list-head, .hub-detail-head) > .hub-actions > button:not(.primary):not(.ui-more) { display:none; }
  #appView #customerWorkspace .hub-heading > .hub-actions > button:not(.ui-more) { height:40px; min-height:40px; padding:0 14px; border-radius:10px; font-size:14px; font-weight:700; white-space:nowrap; }
  #appView #customerWorkspace .hub-heading > .hub-actions > button:not(.ui-more):not(.primary) { border:1px solid #E4DACA; background:#fff; color:#25211C; font-weight:600; }
  #appView #customerWorkspace .hub-heading > .hub-actions > button.primary { display:inline-flex; align-items:center; gap:6px; }
  #appView #customerWorkspace .hub-long, #appView #customerWorkspace .hub-list-head > .hub-head-count { display:none; }
  @media (min-width:600px) { #appView #customerWorkspace .hub-long { display:inline; } }
  #appView #customerWorkspace .hub-heading h1 { min-width:0; overflow-wrap:anywhere; line-height:1.3; }
  #appView #customerWorkspace .hub-back-row { margin-bottom:-2px; }
  #appView #customerWorkspace button.hub-back { min-height:32px; font-size:14px; }
  /* Có yêu cầu xóa (nút đã vào ⋯): chấm đỏ trên ⋯ */
  #appView #customerWorkspace .hub-list-head:has(#hubRequests:not([hidden]) .hub-count) #hubListMore { position:relative; }
  #appView #customerWorkspace .hub-list-head:has(#hubRequests:not([hidden]) .hub-count) #hubListMore::after { content:""; position:absolute; top:6px; right:6px; width:8px; height:8px; border:2px solid #fff; border-radius:50%; background:#C2362B; }
  /* Chi tiết: hàng 1 tên · nút đặc · ⋯; hàng 2 chip trạng thái · SĐT · Sale */
  #appView #customerWorkspace .hub-detail-head > .hub-back-row { order:0; }
  #appView #customerWorkspace .hub-detail-head > h1 { order:1; flex:1 1 0; }
  #appView #customerWorkspace .hub-detail-head > .hub-actions { order:2; margin-left:auto; }
  #appView #customerWorkspace .hub-detail-head::after { content:""; order:3; flex:0 0 100%; height:0; }
  #appView #customerWorkspace .hub-detail-head > .tag { order:4; flex:0 0 auto; }
  #appView #customerWorkspace .hub-detail-head > #hubRemovalBox { order:5; flex:0 0 auto; }
  #appView #customerWorkspace .hub-detail-head > .hub-sub { order:6; flex:1 1 auto; min-width:0; }
  #appView #customerWorkspace .hub-detail-head > .hub-actions > button.primary { padding:0 12px; font-size:13px; }
  #appView #customerWorkspace .hub-detail-head > .hub-actions > button.primary .hub-ico { width:14px; height:14px; }

  /* Lọc: ô tìm cả hàng, các chọn thành 1 hàng chip cuộn ngang */
  #appView #customerWorkspace .hub-filters { flex-direction:column; flex-wrap:nowrap; align-items:stretch; gap:8px; margin:0 0 12px; }
  #appView #customerWorkspace .hub-search { flex:0 0 auto; max-width:none; height:44px; border-radius:22px; }
  #appView #customerWorkspace .hub-search input { height:42px; font-size:16px; }
  #appView #customerWorkspace .hub-chiprow { display:flex; flex-wrap:nowrap; gap:8px; margin:0 -12px; padding:0 12px 2px; overflow-x:auto; scrollbar-width:none; }
  #appView #customerWorkspace .hub-chiprow::-webkit-scrollbar { display:none; }
  #appView #customerWorkspace .hub-filters .hub-chiprow select { flex:0 0 auto; min-width:0; max-width:none; height:36px; min-height:36px; padding:0 30px 0 14px; border-radius:18px; font-size:16px; font-weight:600; }
  /* Dải tóm tắt: nhãn trên, số dưới */
  #appView #customerWorkspace > .hub-stats { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:0; min-height:0; margin:0 0 12px; padding:8px 0; }
  #appView #customerWorkspace > .hub-stats .hub-stat { display:flex; flex-direction:column; align-items:flex-start; gap:2px; min-width:0; padding:4px 12px; }
  #appView #customerWorkspace > .hub-stats .hub-stat span { margin:0; font-size:12px; line-height:16px; }
  #appView #customerWorkspace > .hub-stats .hub-stat strong { font-size:18px; line-height:24px; }
  /* Chip người phụ trách: cuộn ngang sát mép */
  #appView #customerWorkspace .hub-owners { margin:0 -12px 12px; padding:0 12px 2px; scrollbar-width:none; }
  #appView #customerWorkspace .hub-owners::-webkit-scrollbar { display:none; }
  #appView #customerWorkspace .hub-owner { height:36px; min-height:36px; }

  /* Danh sách khách: mỗi khách một thẻ — tên + SĐT + chip · ⋯ / người phụ trách / nguồn / Zalo · đánh giá · hồ sơ y tế / số lần dịch vụ */
  #appView #customerWorkspace > section.panel.hub-list-card { border:0; border-radius:0; background:none; overflow:visible; }
  #appView #customerWorkspace .tbl-wrap.hub-list-wrap { max-height:none; overflow:visible; border:0; }
  #appView #customerWorkspace .hub-list-table, #appView #customerWorkspace .hub-list-table tbody { display:block; width:100%; min-width:0; }
  #appView #customerWorkspace .hub-list-table thead { display:none; }
  #appView #customerWorkspace .hub-list-table tbody tr { display:flex; flex-wrap:wrap; align-items:center; gap:6px 8px; margin:0 0 10px; padding:12px 12px 12px 14px; border:1px solid #E4DACA; border-radius:16px; background:#fff; }
  #appView #customerWorkspace .hub-list-table tbody tr:hover td, #appView #customerWorkspace .hub-list-table tbody tr:hover td:first-child { background:none; }
  #appView #customerWorkspace .hub-list-table tbody td, #appView #customerWorkspace .hub-list-table tbody td:first-child { position:static; display:block; order:3; width:auto; min-width:0; max-width:none; height:auto; padding:0; border:0; background:none; box-shadow:none; color:#25211C; font-size:13px; text-align:left; white-space:normal; }
  #appView #customerWorkspace .hub-list-table tbody td:empty { display:none; }
  #appView #customerWorkspace .hub-list-table tbody td.hub-name-cell { order:0; flex:1 1 0; }
  #appView #customerWorkspace .hub-list-table .hub-name-line { flex-wrap:wrap; white-space:normal; }
  #appView #customerWorkspace .hub-list-table .hub-name { font-size:15px; line-height:22px; white-space:normal; text-align:left; }
  #appView #customerWorkspace .hub-list-table tbody td.hub-name-cell .hub-sub { margin-top:0; font-size:13px; }
  #appView #customerWorkspace .hub-list-table tbody td.hub-removal-cell { order:1; flex:0 0 auto; display:flex; align-items:center; gap:6px; margin:-4px -4px 0 auto; }
  #appView #customerWorkspace .hub-list-table td.hub-removal-cell > * { margin:0; }
  #appView #customerWorkspace .hub-list-table tbody td.hub-removal-cell { flex-wrap:nowrap; width:auto; text-align:right; }
  #appView #customerWorkspace .hub-list-table td.hub-removal-cell .ui-more { width:40px; min-width:40px; height:40px; min-height:40px; }
  #appView #customerWorkspace .hub-list-table tbody td:is(.hub-owner-cell, .hub-src) { order:2; flex:0 0 100%; color:#6F655A; }
  #appView #customerWorkspace .hub-list-table td:is(.hub-owner-cell, .hub-src)::before { content:attr(data-label) ": "; color:#6F655A; }
  #appView #customerWorkspace .hub-list-table tbody td.hub-owner-cell { color:#25211C; }
  #appView #customerWorkspace .hub-list-table td.hub-owner-cell .hub-sub { display:inline; margin:0; font-size:13px; }
  #appView #customerWorkspace .hub-list-table td.hub-owner-cell .hub-sub:not(:empty)::before { content:" · "; }
  #appView #customerWorkspace .hub-list-table tbody td:is(.hub-zalo-cell, .hub-stars-cell, .hub-med-cell) { order:3; flex:0 0 auto; display:inline-flex; align-items:center; gap:6px; margin-top:2px; }
  #appView #customerWorkspace .hub-list-table td.hub-zalo-cell .hub-sub { margin:0; }
  #appView #customerWorkspace .hub-list-table tbody td:is(.hub-zalo-cell, .hub-stars-cell):has(> .muted) { display:none; }
  #appView #customerWorkspace .hub-list-table .hub-stars { font-size:13px; }
  #appView #customerWorkspace .hub-list-table td.hub-med-cell:has(.hub-open-medical)::before { content:"Hồ sơ y tế"; color:#6F655A; }
  #appView #customerWorkspace .hub-table .hub-create-medical { height:32px; min-height:32px; padding:0 12px; }
  #appView #customerWorkspace .hub-list-table tbody td.hub-svc-n { order:4; flex:0 0 auto; display:inline-flex; align-items:baseline; gap:4px; height:24px; padding:0 10px; box-sizing:border-box; border-radius:12px; background:#FAF7F2; color:#25211C; font-size:12px; font-weight:700; line-height:24px; white-space:nowrap; }
  #appView #customerWorkspace .hub-list-table tbody td.hub-svc-n:empty { display:none; }
  #appView #customerWorkspace .hub-list-table tbody td.hub-svc-n.soft { color:#6F655A; font-size:12px; font-weight:600; }
  #appView #customerWorkspace .hub-list-table tbody td.hub-svc-n[data-label]::before { content:attr(data-label); color:#6F655A; font-weight:500; }
  #appView #customerWorkspace .hub-list-table tbody td.hub-svc-other { height:auto; max-width:100%; white-space:normal; line-height:18px; padding:3px 10px; font-weight:600; }
  /* Chân danh sách */
  #appView #customerWorkspace .hub-pager { flex-wrap:wrap; justify-content:center; gap:6px; padding:4px 0 8px; border:0; }
  #appView #customerWorkspace .hub-pager span { flex:0 0 100%; margin:0 0 4px; text-align:center; }
  #appView #customerWorkspace .hub-pager button { height:40px; min-height:40px; min-width:40px; }

  /* Màn phụ Yêu cầu xóa / Khách đã xóa: bảng → thẻ */
  #appView #customerWorkspace > section.panel:has(#hubRequestList, #hubRemovedList) { border:0; border-radius:0; background:none; box-shadow:none; overflow:visible; }
  #appView #customerWorkspace :is(#hubRequestList, #hubRemovedList) .tbl-wrap { border:0; overflow:visible; }
  #appView #customerWorkspace :is(#hubRequestList, #hubRemovedList) .hub-table, #appView #customerWorkspace :is(#hubRequestList, #hubRemovedList) .hub-table tbody { display:block; width:100%; min-width:0; }
  #appView #customerWorkspace :is(#hubRequestList, #hubRemovedList) .hub-table thead { display:none; }
  #appView #customerWorkspace :is(#hubRequestList, #hubRemovedList) .hub-table tr { display:flex; flex-wrap:wrap; align-items:center; gap:6px 8px; margin:0 0 10px; padding:12px 14px; border:1px solid #E4DACA; border-radius:16px; background:#fff; }
  #appView #customerWorkspace :is(#hubRequestList, #hubRemovedList) .hub-table td { display:block; order:2; flex:0 0 100%; min-width:0; padding:0; border:0; background:none; color:#25211C; font-size:13px; text-align:left; }
  #appView #customerWorkspace :is(#hubRequestList, #hubRemovedList) .hub-table td[data-label]::before { content:attr(data-label) ": "; color:#6F655A; }
  #appView #customerWorkspace :is(#hubRequestList, #hubRemovedList) .hub-table td .hub-sub { display:inline; margin:0 0 0 6px; font-size:12px; }
  #appView #customerWorkspace :is(#hubRequestList, #hubRemovedList) .hub-table td[data-label] .hub-sub:not(.hub-reject-note)::before { content:"· "; }
  #appView #customerWorkspace :is(#hubRequestList, #hubRemovedList) .hub-table td .hub-reject-note { display:block; margin:2px 0 0; }
  #appView #customerWorkspace :is(#hubRequestList, #hubRemovedList) .hub-table td.hub-name-cell { order:0; flex:1 1 0; font-size:15px; }
  #appView #customerWorkspace :is(#hubRequestList, #hubRemovedList) .hub-table td.hub-name-cell .hub-sub { display:block; margin:0; font-size:13px; }
  #appView #customerWorkspace :is(#hubRequestList, #hubRemovedList) .hub-table td:is(.hub-removal-cell, .hub-act-cell) { order:9; flex:0 0 100%; display:flex; flex-wrap:wrap; align-items:center; gap:8px; min-width:0; margin-top:4px; }
  #appView #customerWorkspace :is(#hubRequestList, #hubRemovedList) .hub-table td:is(.hub-removal-cell, .hub-act-cell) > * { margin:0; }
  #appView #customerWorkspace :is(#hubRequestList, #hubRemovedList) .hub-table td button { height:36px; min-height:36px; padding:0 12px; }

  /* Hồ sơ khách: tab cuộn ngang sát mép, thẻ 1 cột */
  #appView #customerWorkspace .hub-tabs { flex-wrap:nowrap; gap:20px; margin:0 -12px 12px; padding:0 12px; overflow-x:auto; }
  #appView #customerWorkspace .hub-tabs::-webkit-scrollbar { display:none; }
  #appView #customerWorkspace .hub-tabs::after { content:""; flex:0 0 1px; }
  #appView #customerWorkspace .hub-grid { grid-template-columns:minmax(0, 1fr); gap:12px; }
  #appView #customerWorkspace .hub-grid > #hubVisaCard { grid-row:auto; }
  #appView #customerWorkspace .hub-card, #appView #customerWorkspace #hubDetail .hub-card { padding:16px; }
  #appView #customerWorkspace #hubDetail .hub-card > h2 { font-size:16px; }
  #appView #customerWorkspace #hubDetail .hub-card dl > div { grid-template-columns:112px minmax(0, 1fr); gap:10px; }
  #appView #customerWorkspace .hub-dk-money { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:0; padding:6px 0; }
  #appView #customerWorkspace .hub-dk-money > span { flex-direction:column; align-items:flex-start; gap:2px; min-width:0; padding:6px 12px; border-left:0; }
  #appView #customerWorkspace .hub-dk-money b { font-size:14px; overflow-wrap:anywhere; }
  #appView #customerWorkspace .hub-dk-table { min-width:520px; }
  #appView #customerWorkspace .hub-entry p { font-size:14px; }

  /* Thêm / sửa khách, nhập Excel: 1 cột, ô nhập ≥ 16px, cao 44 */
  #appView #customerWorkspace .hub-form-grid { grid-template-columns:minmax(0, 1fr); }
  #appView #customerWorkspace :is(#hubCustomerForm, #hubExcel, #hubLegacyForm) :is(input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea) { min-height:44px; font-size:16px; }
  #appView #customerWorkspace :is(#hubCustomerForm, #hubExcel, #hubLegacyForm) input[type=file] { font-size:14px; }
  #appView #customerWorkspace #hubCustomerForm #cf-note { height:88px; }
  #appView #customerWorkspace .hub-form-grid label.hub-svc-in { min-height:44px; padding:4px 10px; }
  #appView #customerWorkspace .hub-form-grid .hub-svc-in input { width:56px; min-height:36px; }
  #appView #customerWorkspace .hub-svc-row { grid-template-columns:minmax(0, 1fr) 64px auto auto; }
  #appView #customerWorkspace :is(#hubExcel, #hubLegacyForm) button.primary { width:100%; min-height:44px; }
  /* Hộp thoại tiền sử bệnh lý: rộng hết màn, bo trên 16, nút lưu dính đáy */
  #appView #hubHistoryDialog { width:100vw; max-width:100vw; max-height:92dvh; margin:auto 0 0; border-radius:16px 16px 0 0; }
  #appView #hubHistoryDialog .btn-row { position:sticky; bottom:0; margin:16px -16px 0 !important; padding:12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); border-top:1px solid #EFE9DD; background:#fff; }
  #appView #hubHistoryDialog .btn-row button { width:100%; min-height:44px; }
  #appView #hubHistoryDialog :is(input, select, textarea) { font-size:16px; }
}

/* 05/11: cột "Khác" (chữ tự do) — tiêu đề căn trái như nội dung; giữ bề rộng tối thiểu để chữ không xuống dòng từng từ ở màn hẹp */
@media (min-width: 901px) {
  #appView #customerWorkspace .hub-list-table th.hub-svc-sub.hub-svc-other-h { text-align: left; min-width: 124px; }
  #appView #customerWorkspace .hub-list-table td.hub-svc-n.hub-svc-other { min-width: 124px; max-width: 220px; text-align: left; white-space: normal; overflow-wrap: break-word; word-break: normal; }
}

/* ===== Thêm / Sửa hồ sơ khách (11/2026, customers.js edit): 3 nhóm trường + cột hồ sơ y tế, không cuộn lồng,
   thanh Lưu dính đáy, lỗi hiện ngay dưới ô ===== */
@media screen {
  #appView #customerWorkspace .hub-cf { --cf-line:#E4DACA; --cf-soft:#EFE9DD; --cf-ink:#25211C; --cf-mute:#6F655A; --cf-tint:#FCFAF7; --cf-on:#F6ECDF; --cf-acc:#9A6A2E; --cf-acc-ink:#8A5F27; --cf-err:#B3261E; }
  #appView #customerWorkspace .hub-cf-layout { display:grid; grid-template-columns:minmax(0, 1fr) minmax(280px, 320px); gap:20px; align-items:start; }
  #appView #customerWorkspace .hub-cf-main { display:grid; gap:16px; min-width:0; }
  #appView #customerWorkspace .hub-cf .hub-card { height:auto; padding:20px 24px 24px; border:1px solid var(--cf-soft); border-radius:16px; background:#fff; overflow:visible; }
  #appView #customerWorkspace .hub-cf .hub-card h2 { margin:0 0 16px; color:var(--cf-ink); font-size:16px; font-weight:700; line-height:22px; }
  #appView #customerWorkspace .hub-cf-grid { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:16px; }
  #appView #customerWorkspace .hub-cf-field { display:flex; flex-direction:column; min-width:0; margin:0; }
  #appView #customerWorkspace .hub-cf-field.span2 { grid-column:span 2; }
  #appView #customerWorkspace .hub-cf-field.span3 { grid-column:span 3; }
  #appView #customerWorkspace .hub-cf-field.wide { grid-column:1 / -1; }
  #appView #customerWorkspace .hub-cf-field > label, #appView #customerWorkspace .hub-cf-lbl { display:block; margin:0 0 6px; color:var(--cf-mute); font-size:13px; font-weight:600; line-height:18px; letter-spacing:0; }
  #appView #customerWorkspace .hub-cf-lbl small { color:var(--cf-mute); font-size:12px; font-weight:500; }
  #appView #customerWorkspace .hub-cf-req { color:var(--cf-err); font-weight:700; }
  #appView #customerWorkspace .hub-cf :is(input:not([type=file]):not([type=hidden]), select, textarea) { width:100%; height:42px; min-height:42px; box-sizing:border-box; padding:0 12px; border:1px solid var(--cf-line); border-radius:10px; background-color:#fff; color:var(--cf-ink); font-size:14px; box-shadow:none; }
  #appView #customerWorkspace .hub-cf select#cf-usage { padding-right:32px; }
  #appView #customerWorkspace .hub-cf textarea#cf-note { height:auto; min-height:88px; padding:10px 12px; line-height:1.5; resize:vertical; }
  #appView #customerWorkspace .hub-cf :is(input:not([type=file]):not([type=hidden]), select, textarea):hover { border-color:#B9A58A; }
  #appView #customerWorkspace .hub-cf :is(input:not([type=file]):not([type=hidden]), select, textarea):focus { border-color:var(--cf-acc); outline:none; box-shadow:0 0 0 3px #9a6a2e24; }
  #appView #customerWorkspace .hub-cf input::placeholder { color:#A39A8F; }
  #appView #customerWorkspace .hub-cf input[type=number] { -moz-appearance:textfield; appearance:textfield; }
  #appView #customerWorkspace .hub-cf input[type=number]::-webkit-inner-spin-button, #appView #customerWorkspace .hub-cf input[type=number]::-webkit-outer-spin-button { -webkit-appearance:none; margin:0; }
  /* Ô có đơn vị (cm, kg, mmHg) */
  #appView #customerWorkspace .hub-cf-unit { position:relative; }
  #appView #customerWorkspace .hub-cf-unit input { padding-right:58px; font-variant-numeric:tabular-nums; }
  #appView #customerWorkspace .hub-cf-unit > span { position:absolute; top:50%; right:12px; transform:translateY(-50%); color:var(--cf-mute); font-size:13px; pointer-events:none; }
  #appView #customerWorkspace .hub-cf-out { display:flex; align-items:center; height:42px; padding:0 12px; box-sizing:border-box; border-radius:10px; background:#F5F1EB; color:var(--cf-ink); font-size:14px; font-weight:700; font-variant-numeric:tabular-nums; }
  /* Lỗi tại ô */
  #appView #customerWorkspace .hub-cf .hub-cf-field.is-invalid :is(input:not([type=file]):not([type=hidden]), select, textarea) { border-color:var(--cf-err); box-shadow:0 0 0 3px #b3261e1a; }
  #appView #customerWorkspace .hub-cf-err { display:block; margin-top:6px; color:var(--cf-err); font-size:12.5px; font-weight:600; line-height:1.35; }
  #appView #customerWorkspace .hub-cf-err[hidden] { display:none; }
  /* Dịch vụ đã dùng: thẻ từng dịch vụ */
  #appView #customerWorkspace .hub-cf .hub-svc-grid { display:grid; grid-template-columns:repeat(8, minmax(0, 1fr)); gap:8px; margin:0 0 10px; }
  #appView #customerWorkspace .hub-cf label.hub-svc-in { display:flex; flex-direction:column; gap:8px; min-width:0; margin:0; padding:10px 8px; border:1px solid var(--cf-soft); border-radius:12px; background:var(--cf-tint); color:var(--cf-ink); font-size:13px; font-weight:600; line-height:18px; cursor:text; transition:border-color .12s, background-color .12s; }
  #appView #customerWorkspace .hub-cf label.hub-svc-in:focus-within { border-color:var(--cf-acc); }
  #appView #customerWorkspace .hub-cf label.hub-svc-in.has-value { border-color:#CFAF86; background:var(--cf-on); }
  #appView #customerWorkspace .hub-cf .hub-svc-in > span:first-child { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  #appView #customerWorkspace .hub-cf .hub-svc-box { display:flex; align-items:center; gap:4px; }
  #appView #customerWorkspace .hub-cf .hub-svc-box input[type=number] { flex:1 1 auto; width:auto; min-width:0; height:36px; min-height:36px; padding:0 4px; text-align:center; font-weight:700; font-variant-numeric:tabular-nums; }
  #appView #customerWorkspace .hub-cf :is(.hub-svc-in, .hub-svc-row) em { flex:0 0 auto; min-width:18px; color:var(--cf-mute); font-size:12px; font-style:normal; font-weight:500; }
  #appView #customerWorkspace .hub-cf .hub-svc-row { display:grid; grid-template-columns:minmax(0, 1fr) 96px auto auto; align-items:center; gap:8px; margin:0 0 8px; }
  #appView #customerWorkspace .hub-cf .hub-svc-row input[data-svc-count] { text-align:center; font-weight:700; }
  #appView #customerWorkspace .hub-cf .hub-svc-row [data-svc-del] { justify-self:start; width:36px; height:36px; min-height:36px; padding:0; border:1px solid var(--cf-line); border-radius:10px; background:#fff; color:var(--cf-mute); font-size:18px; }
  #appView #customerWorkspace .hub-cf .hub-svc-add { align-self:flex-start; height:34px; min-height:34px; padding:0 14px; border:1px dashed var(--cf-line); border-radius:10px; background:#fff; color:var(--cf-acc-ink); font-size:13px; font-weight:600; }
  #appView #customerWorkspace .hub-cf .hub-svc-add:hover { border-color:var(--cf-acc); background:var(--cf-tint); }
  /* Cột hồ sơ y tế: Phiếu y tế · Xét nghiệm máu · Tiền sử bệnh lý */
  #appView #customerWorkspace .hub-cf-side { padding:20px; }
  #appView #customerWorkspace .hub-cf-side .hub-cf-doc + .hub-cf-doc { margin-top:16px; padding-top:16px; border-top:1px solid var(--cf-soft); }
  #appView #customerWorkspace .hub-cf-side .hub-cf-doc > h2 { margin:0 0 10px; font-size:14px; }
  #appView #customerWorkspace .hub-cf-side .hub-add-document { display:flex; align-items:center; justify-content:flex-start; gap:12px; width:100%; height:auto; min-height:56px; box-sizing:border-box; padding:10px 14px; border:1px dashed var(--cf-line); border-radius:12px; background:var(--cf-tint); color:var(--cf-acc-ink); font-size:13px; font-weight:600; line-height:18px; text-align:left; white-space:normal; box-shadow:none; }
  #appView #customerWorkspace .hub-cf-side .hub-add-document:hover { border-color:var(--cf-acc); background:var(--cf-on); }
  #appView #customerWorkspace .hub-cf-side .hub-add-document[hidden] { display:none; }
  #appView #customerWorkspace .hub-cf-side .hub-add-plus { display:grid; place-items:center; flex:0 0 28px; width:28px; height:28px; border-radius:50%; background:#EFE2CF; color:var(--cf-acc-ink); font-size:18px; font-weight:600; line-height:1; }
  #appView #customerWorkspace .hub-cf-side .hub-document-state { display:flex; flex-direction:row; align-items:center; gap:12px; height:auto; min-height:56px; box-sizing:border-box; padding:12px 14px; border:1px solid var(--cf-soft); border-radius:12px; background:var(--cf-tint); }
  #appView #customerWorkspace .hub-cf-side .hub-document-state[hidden] { display:none; }
  #appView #customerWorkspace .hub-cf-side .hub-document-content { flex:1 1 auto; display:grid; grid-template-columns:24px minmax(0, 1fr); column-gap:10px; row-gap:2px; max-height:none; overflow:visible; }
  #appView #customerWorkspace .hub-cf-side .hub-document-content > svg { grid-column:1; grid-row:1 / span 3; align-self:start; color:var(--cf-acc-ink); }
  #appView #customerWorkspace .hub-cf-side .hub-document-content > :not(svg) { grid-column:2; }
  #appView #customerWorkspace .hub-cf-side .hub-document-content > strong { color:var(--cf-acc-ink); font-size:13px; }
  #appView #customerWorkspace .hub-cf-side .hub-document-content :is(p, ul) { margin:0; color:var(--cf-mute); font-size:12.5px; line-height:18px; }
  #appView #customerWorkspace .hub-cf-side .hub-document-content ul { padding-left:16px; }
  #appView #customerWorkspace .hub-cf-side .hub-document-state > button { flex:0 0 auto; align-self:center; height:32px; min-height:32px; padding:0 12px; border:1px solid var(--cf-line); border-radius:8px; background:#fff; color:var(--cf-ink); font-size:13px; font-weight:600; }
  /* Thanh Lưu dính đáy màn */
  #appView #customerWorkspace .hub-cf-bar { position:sticky; bottom:12px; z-index:15; display:flex; flex-wrap:wrap; align-items:center; gap:10px 16px; margin:16px 0 0; padding:12px 16px; border:1px solid var(--cf-soft); border-radius:14px; background:#fffffff2; box-shadow:0 6px 24px #2020271f; backdrop-filter:blur(6px); }
  #appView #customerWorkspace .hub-cf-note { flex:1 1 260px; margin:0; color:var(--cf-mute); font-size:13px; line-height:18px; }
  #appView #customerWorkspace .hub-cf-bar .hub-error { flex:1 1 100%; order:-1; margin:0; padding:8px 12px; border-radius:8px; background:#FBE7E5; color:var(--cf-err); font-size:13px; font-weight:600; }
  #appView #customerWorkspace .hub-cf-bar .hub-error[hidden] { display:none; }
  #appView #customerWorkspace .hub-cf-btns { display:flex; gap:8px; margin-left:auto; }
  #appView #customerWorkspace .hub-cf-btns button { height:40px; min-height:40px; padding:0 18px; border-radius:10px; font-size:14px; font-weight:700; white-space:nowrap; }
  #appView #customerWorkspace .hub-cf-btns #hubCfCancel { border:1px solid var(--cf-line); background:#fff; color:var(--cf-ink); font-weight:600; }
  #appView #customerWorkspace .hub-cf-btns #hubSave { min-width:132px; }
  #appView #customerWorkspace .hub-cf-btns #hubSave[aria-busy=true] { opacity:.7; cursor:progress; }
  #appView #customerWorkspace .hub-cf-note-m { display:none; }
}
/* ≤ 1320px: cột hồ sơ y tế xuống dưới để lưới Dịch vụ đã dùng (8 ô) vẫn một dòng đủ rộng */
@media screen and (max-width:1320px) {
  #appView #customerWorkspace .hub-cf-layout { grid-template-columns:minmax(0, 1fr); }
}
/* ≤ 1000px: 8 ô dịch vụ không đủ chỗ một dòng (< 95px/ô cắt tên) → 4 ô × 2 dòng */
@media screen and (max-width:1000px) {
  #appView #customerWorkspace .hub-cf .hub-svc-grid { grid-template-columns:repeat(4, minmax(0, 1fr)); }
}
/* ≤ 900px: thanh menu dưới (shell .sh-tabbar, cao 64 + cách đáy 8) → thanh Lưu nổi ngay trên nó, chỉ còn nút */
@media screen and (max-width:900px) {
  #appView #customerWorkspace .hub-cf-note-m { display:block; margin:12px 4px 0; }
  #appView #customerWorkspace .hub-cf-bar > .hub-cf-note { display:none; }
  #appView #customerWorkspace .hub-cf-bar { bottom:calc(80px + env(safe-area-inset-bottom, 0px)); margin-top:12px; padding:8px; border-radius:16px; }
}
@media screen and (max-width:760px) {
  #appView #customerWorkspace .hub-cf-grid { grid-template-columns:repeat(2, minmax(0, 1fr)); }
  #appView #customerWorkspace .hub-cf-field.span3 { grid-column:1 / -1; }
}
@media screen and (max-width:560px) {
  #appView #customerWorkspace .hub-cf-layout, #appView #customerWorkspace .hub-cf-main { gap:12px; }
  #appView #customerWorkspace .hub-cf .hub-card { padding:16px; border-radius:14px; }
  #appView #customerWorkspace .hub-cf .hub-card h2 { margin-bottom:12px; }
  #appView #customerWorkspace .hub-cf-grid { grid-template-columns:minmax(0, 1fr); gap:14px; }
  #appView #customerWorkspace .hub-cf-grid.hub-cf-grid-health { grid-template-columns:repeat(2, minmax(0, 1fr)); gap:14px 12px; }
  #appView #customerWorkspace .hub-cf-field.span2, #appView #customerWorkspace .hub-cf-field.span3 { grid-column:auto; }
  #appView #customerWorkspace .hub-cf .hub-svc-grid { grid-template-columns:repeat(2, minmax(0, 1fr)); gap:8px; }
  #appView #customerWorkspace .hub-cf .hub-svc-row { grid-template-columns:minmax(0, 1fr) 64px auto auto; }
  #appView #customerWorkspace .hub-cf-side .hub-document-state { flex-direction:column; align-items:stretch; }
  #appView #customerWorkspace .hub-cf-side .hub-document-state > button { align-self:flex-end; }
  #appView #customerWorkspace .hub-cf-note-m { font-size:12.5px; }
  #appView #customerWorkspace .hub-cf-btns { flex:1 1 100%; }
  #appView #customerWorkspace .hub-cf-btns button { flex:1 1 0; height:44px; min-height:44px; }
}

/* ===== Tab Thông tin khách hàng gọn (11/2026, customers.js renderProfile): 2 thẻ tóm tắt + ô hồ sơ liên quan mở popup ===== */
@media screen {
  #appView #customerWorkspace #hubDetail .hub-pv-top { align-items:stretch; }
  #appView #customerWorkspace #hubDetail .hub-pv-top > .hub-card { padding:18px 22px 20px; }
  #appView #customerWorkspace #hubDetail .hub-pv-top > .hub-card > h2 { margin:0 0 12px; font-size:16px; }
  #appView #customerWorkspace #hubDetail dl.hub-pv-kvs { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:14px 20px; margin:0; }
  #appView #customerWorkspace #hubDetail dl.hub-pv-kvs > .hub-pv-kv { display:block; min-width:0; padding:0; border:0; }
  #appView #customerWorkspace #hubDetail dl.hub-pv-kvs > .hub-pv-kv.wide { grid-column:1 / -1; }
  #appView #customerWorkspace #hubDetail .hub-pv-kv dt { margin:0 0 2px; color:#6F655A; font-size:12.5px; font-weight:500; line-height:18px; }
  #appView #customerWorkspace #hubDetail .hub-pv-kv dd { margin:0; color:#25211C; font-size:14px; font-weight:500; line-height:20px; overflow-wrap:anywhere; white-space:pre-wrap; }
  #appView #customerWorkspace #hubDetail .hub-pv-kv.is-reject dd { color:#9B2F23; }
  #appView #customerWorkspace #hubDetail .hub-pv-kv.hub-pv-note dd { max-height:60px; overflow:auto; }
  #appView #customerWorkspace #hubDetail .hub-pv-id { color:#6F655A; font-size:12.5px; font-variant-numeric:tabular-nums; }
  #appView #customerWorkspace #hubDetail .hub-pv-svcs { display:flex; flex-wrap:wrap; gap:6px; margin:0 0 14px; white-space:normal; }
  #appView #customerWorkspace #hubDetail .hub-pv-svc { display:inline-flex; align-items:center; gap:5px; height:26px; padding:0 10px; border-radius:13px; background:#F6ECDF; color:#25211C; font-size:13px; font-weight:500; }
  #appView #customerWorkspace #hubDetail .hub-pv-svc b { color:#8A5F27; font-weight:700; }
  #appView #customerWorkspace #hubDetail .hub-pv-svc.is-none { background:#F5F1EB; color:#6F655A; }
  #appView #customerWorkspace #hubDetail .hub-pv-svc.is-interest { background:#fff; border:1px dashed #E4DACA; color:#6F655A; }
  /* Ô hồ sơ liên quan */
  #appView #customerWorkspace #hubDetail .hub-pv-tiles { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:12px; margin-top:16px; }
  #appView #customerWorkspace #hubDetail .hub-pv-tile { display:flex; align-items:flex-start; gap:12px; width:100%; min-width:0; height:auto; min-height:76px; box-sizing:border-box; padding:14px 16px; border:1px solid #EFE9DD; border-radius:14px; background:#fff; color:#25211C; text-align:left; white-space:normal; box-shadow:none; cursor:pointer; transition:border-color .12s, background-color .12s; }
  #appView #customerWorkspace #hubDetail .hub-pv-tile > svg { flex:0 0 20px; margin-top:1px; color:#8A5F27; }
  #appView #customerWorkspace #hubDetail .hub-pv-tile:hover:not(:disabled) { border-color:#CFAF86; background:#FCFAF7; }
  #appView #customerWorkspace #hubDetail .hub-pv-tile:disabled { cursor:default; opacity:1; background:#FAF8F5; }
  #appView #customerWorkspace #hubDetail .hub-pv-tile:disabled > svg { color:#B5AA9C; }
  #appView #customerWorkspace #hubDetail .hub-pv-tt { display:flex; flex-direction:column; gap:3px; flex:1 1 auto; min-width:0; }
  #appView #customerWorkspace #hubDetail .hub-pv-tt > b { font-size:14px; font-weight:700; line-height:20px; }
  #appView #customerWorkspace #hubDetail .hub-pv-tt > span { color:#6F655A; font-size:12.5px; font-weight:500; line-height:18px; overflow-wrap:anywhere; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
  #appView #customerWorkspace #hubDetail .hub-pv-tt b.ok { color:#1F5E2E; font-weight:700; } #appView #customerWorkspace #hubDetail .hub-pv-tt b.due { color:#9B2F23; font-weight:700; }
  #appView #customerWorkspace #hubDetail .hub-pv-go { flex:0 0 auto; align-self:center; color:#8A5F27; font-size:22px; line-height:1; }
  /* Popup */
  #appView dialog.hub-pv-dialog { width:min(1240px, calc(100vw - 32px)); max-height:calc(100dvh - 48px); padding:0; border:1px solid #E4DACA; border-radius:18px; background:#fff; color:#25211C; box-shadow:0 12px 40px #20202733; overflow:hidden; }
  #appView dialog.hub-pv-dialog[open] { display:flex; flex-direction:column; }
  #appView dialog.hub-pv-dialog::backdrop { background:rgb(28 23 18 / 38%) !important; }
  #appView dialog.hub-pv-dialog > header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:16px 20px; border-bottom:1px solid #EFE9DD; }
  #appView dialog.hub-pv-dialog > header h2 { margin:0; font-size:17px; font-weight:700; }
  #appView dialog.hub-pv-dialog > header p { margin:2px 0 0; color:#6F655A; font-size:13px; }
  #appView dialog.hub-pv-dialog .hub-pv-close { display:grid; place-items:center; flex:0 0 36px; width:36px; height:36px; min-height:36px; padding:0; border:1px solid #E4DACA; border-radius:10px; background:#fff; color:#25211C; font-size:22px; line-height:1; }
  #appView dialog.hub-pv-dialog .hub-pv-body { flex:1 1 auto; min-height:0; padding:16px 20px 20px; overflow:auto; }
  #appView dialog.hub-pv-dialog .hub-pv-body > .hub-pv-visa > h2:first-child { display:none; }
  #appView dialog.hub-pv-dialog .hub-pv-tabs { position:sticky; top:-16px; z-index:2; display:flex; gap:6px; margin:-16px -20px 16px; padding:10px 20px; overflow-x:auto; border-bottom:1px solid #EFE9DD; background:#fff; scrollbar-width:none; }
  #appView dialog.hub-pv-dialog .hub-pv-tabs button { flex:0 0 auto; height:34px; min-height:34px; padding:0 14px; border:1px solid #E4DACA; border-radius:17px; background:#fff; color:#25211C; font-size:13px; font-weight:600; white-space:nowrap; }
  #appView dialog.hub-pv-dialog .hub-pv-tabs button[aria-selected="true"] { border-color:#EFE2CC; background:#EFE2CC; color:#6E4A1C; }
  #appView dialog.hub-pv-dialog .hub-pv-sec[hidden] { display:none; }
  #appView dialog.hub-pv-dialog dl.hub-pv-kvs { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:12px 20px; margin:0; }
  #appView dialog.hub-pv-dialog .hub-pv-kv.wide { grid-column:1 / -1; }
  #appView dialog.hub-pv-dialog .hub-pv-kv dt { margin:0 0 2px; color:#6F655A; font-size:12.5px; font-weight:500; }
  #appView dialog.hub-pv-dialog .hub-pv-kv dd { margin:0; font-size:14px; overflow-wrap:anywhere; white-space:pre-wrap; }
  #appView dialog.hub-pv-dialog .ttyt-answer-grid { gap:0 20px; }
  #appView dialog.hub-pv-dialog .ttyt-answer { display:grid; grid-template-columns:minmax(110px, 42%) minmax(0, 1fr); align-items:baseline; gap:10px; padding:7px 0; border-bottom:1px solid #F1ECE4; }
  #appView dialog.hub-pv-dialog .ttyt-answer dt { margin:0; color:#6F655A; font-size:12.5px; line-height:18px; }
  #appView dialog.hub-pv-dialog .ttyt-answer dd { margin:0; color:#25211C; font-size:13.5px; line-height:18px; overflow-wrap:anywhere; }
  #appView dialog.hub-pv-dialog .ttyt-answer.is-empty dd { color:#A39A8F; }
  #appView dialog.hub-pv-dialog .ttyt-read-section { margin:0; }
  #appView dialog.hub-pv-dialog .hub-entry { padding:14px 0; }
  #appView dialog.hub-pv-dialog .hub-entry:last-child { border-bottom:0; }
}
@media screen and (max-width:1100px) {
  #appView #customerWorkspace #hubDetail .hub-pv-tiles { grid-template-columns:repeat(2, minmax(0, 1fr)); }
}
@media screen and (max-width:640px) {
  #appView #customerWorkspace #hubDetail .hub-pv-top > .hub-card { padding:16px; }
  #appView #customerWorkspace #hubDetail dl.hub-pv-kvs { grid-template-columns:repeat(2, minmax(0, 1fr)); gap:12px 16px; }
  #appView #customerWorkspace #hubDetail .hub-pv-tiles { grid-template-columns:minmax(0, 1fr); gap:8px; margin-top:12px; }
  #appView #customerWorkspace #hubDetail .hub-pv-tile { min-height:64px; padding:12px 14px; }
  #appView dialog.hub-pv-dialog { width:100vw; max-width:100vw; max-height:92dvh; margin:auto 0 0; border-radius:16px 16px 0 0; }
  #appView dialog.hub-pv-dialog .hub-pv-body { padding:14px 16px calc(16px + env(safe-area-inset-bottom, 0px)); }
  #appView dialog.hub-pv-dialog .hub-pv-tabs { top:-14px; margin:-14px -16px 14px; padding:10px 16px; }
}

/* Nhãn nút rút gọn chỉ dùng trên điện thoại (customers.js: .hub-lbl-long / .hub-lbl-short) */
#customerWorkspace .hub-lbl-short { display:none; }

/* ===== MOBILE 11/2026 (≤ 760px) — docs/MOBILE-UI-SPEC.md ===== */
@media screen and (max-width: 760px) {
  /* ---------- Khung chung ---------- */
  body.sales-shell #appView #customerWorkspace { padding:12px 12px 20px; }
  body.sales-shell #appView #customerWorkspace .hub-lbl-long { display:none; }
  body.sales-shell #appView #customerWorkspace .hub-lbl-short { display:inline; }

  /* ---------- Đầu màn: [←] tiêu đề (≤ 2 dòng) · nút chính · ⋯ ---------- */
  body.sales-shell #appView #customerWorkspace .hub-heading { flex-wrap:nowrap; align-items:center; column-gap:8px; row-gap:8px; min-height:40px; margin:0 0 12px; }
  body.sales-shell #appView #customerWorkspace .hub-detail-head { flex-wrap:wrap; }
  body.sales-shell #appView #customerWorkspace .hub-heading h1 { flex:1 1 0; min-width:0; margin:0; font-size:20px; font-weight:800; line-height:1.25; letter-spacing:-.3px; overflow-wrap:anywhere;
    display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
  body.sales-shell #appView #customerWorkspace .hub-heading > .hub-back-row { flex:0 0 40px; order:0; margin:0; }
  body.sales-shell #appView #customerWorkspace button.hub-back { display:flex; align-items:center; justify-content:center; width:40px; height:40px; min-height:40px; padding:0; border:1px solid var(--m-line); border-radius:50%; background:#fff; color:var(--m-ink); font-size:0; line-height:1; }
  body.sales-shell #appView #customerWorkspace button.hub-back::before { content:""; width:20px; height:20px; background:currentColor; -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5M11 5l-7 7 7 7'/%3E%3C/svg%3E") center / contain no-repeat; mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5M11 5l-7 7 7 7'/%3E%3C/svg%3E") center / contain no-repeat; }
  body.sales-shell #appView #customerWorkspace button.hub-back:active { background:var(--m-wash-2); }
  body.sales-shell #appView #customerWorkspace .hub-heading > .hub-actions { flex:0 0 auto; margin-left:0; gap:8px; }
  body.sales-shell #appView #customerWorkspace .hub-heading > .hub-actions > button:not(.ui-more) { height:40px; min-height:40px; padding:0 14px; border-radius:12px; font-size:14px; font-weight:700; }
  body.sales-shell #appView #customerWorkspace .hub-heading > .hub-actions > button.primary { gap:6px; border-color:var(--m-accent); background:var(--m-accent); color:#fff; }
  body.sales-shell #appView #customerWorkspace .hub-heading > .hub-actions > button.primary svg { width:15px; height:15px; }
  body.sales-shell #appView #customerWorkspace .hub-heading > .hub-actions > .ui-more { width:40px; min-width:40px; height:40px; min-height:40px; padding:0; border:1px solid var(--m-line); border-radius:12px; background:#fff; }
  /* Màn phụ (Nhập Excel…): nút viền duy nhất giữ trên hàng tiêu đề */
  body.sales-shell #appView #customerWorkspace .hub-head2 > .hub-actions > button:not(.primary):not(.ui-more) { border:1px solid var(--m-line); background:#fff; color:var(--m-ink); font-weight:600; }
  /* Chi tiết: hàng 2 = chip trạng thái + nhãn xóa */
  body.sales-shell #appView #customerWorkspace .hub-detail-head > h1 { flex:1 1 0; }
  body.sales-shell #appView #customerWorkspace .hub-detail-head > .tag, body.sales-shell #appView #customerWorkspace .hub-detail-head > #hubRemovalBox { margin-left:48px; }
  body.sales-shell #appView #customerWorkspace .hub-detail-head > #hubRemovalBox:empty, body.sales-shell #appView #customerWorkspace .hub-detail-head > #hubRemovalBox:not(:has(.tag)) { display:none; }
  body.sales-shell #appView #customerWorkspace .hub-detail-head > .tag + #hubRemovalBox { margin-left:0; }
  body.sales-shell #appView #customerWorkspace .hub-detail-head > .hub-actions > button.primary { padding:0 12px; font-size:14px; }

  /* ---------- Tìm + lọc: chip cuộn ngang ---------- */
  body.sales-shell #appView #customerWorkspace .hub-filters { gap:10px; margin:0 0 12px; }
  body.sales-shell #appView #customerWorkspace .hub-search { height:46px; padding:0 14px; border:1px solid var(--m-line); border-radius:12px; }
  body.sales-shell #appView #customerWorkspace .hub-search input { height:44px; min-height:0; font-size:16px; border-radius:0; box-shadow:none !important; }
  body.sales-shell #appView #customerWorkspace .hub-search input::placeholder { color:var(--m-faint); }
  body.sales-shell #appView #customerWorkspace .hub-chiprow { gap:8px; margin:0 -12px; padding:0 12px; }
  body.sales-shell #appView #customerWorkspace .hub-filters .hub-chiprow select { flex:0 0 auto; width:auto; field-sizing:content; height:36px; min-height:36px; padding:0 30px 0 14px; border:1px solid var(--m-line); border-radius:18px; background-color:#fff; background-position:right 10px center; color:var(--m-ink); font-size:16px; font-weight:500; line-height:34px; }
  body.sales-shell #appView #customerWorkspace .hub-filters .hub-chiprow select:has(option:checked:not([value=""])) { border-color:#E3C79E; background-color:var(--m-accent-wash); color:#6E4A1C; }
  body.sales-shell #appView #customerWorkspace .hub-filters .hub-chiprow select:focus { box-shadow:none !important; border-color:var(--m-accent) !important; }

  /* ---------- Dải tóm tắt: 3 ô một hàng, nhãn không xuống dòng ---------- */
  body.sales-shell #appView #customerWorkspace > .hub-stats { padding:10px 0; border:0; border-radius:12px; background:var(--m-wash); }
  body.sales-shell #appView #customerWorkspace > .hub-stats .hub-stat { padding:0 10px; border:0; border-left:1px solid var(--m-line-soft); border-radius:0; background:none; }
  body.sales-shell #appView #customerWorkspace > .hub-stats .hub-stat:first-child { border-left:0; }
  body.sales-shell #appView #customerWorkspace > .hub-stats .hub-stat span { max-width:100%; overflow:hidden; color:var(--m-sub); font-size:12px; white-space:nowrap; text-overflow:ellipsis; }
  body.sales-shell #appView #customerWorkspace > .hub-stats .hub-stat strong { font-size:20px; font-weight:800; line-height:26px; font-variant-numeric:tabular-nums; }

  /* ---------- Thanh chọn sales ---------- */
  body.sales-shell #appView #customerWorkspace .hub-owners { gap:8px; margin:0 -12px 12px; padding:0 12px; }
  body.sales-shell #appView #customerWorkspace .hub-owner { height:36px; min-height:36px; padding:0 14px; border-color:var(--m-line); border-radius:18px; font-size:14px; }
  body.sales-shell #appView #customerWorkspace .hub-owner[aria-selected="true"] { border-color:#E3C79E; background:var(--m-accent-wash); color:#6E4A1C; }

  /* ---------- Thẻ khách (3 tầng, ~112px):
     1) tên + chip duyệt · ⋯   2) SĐT · người phụ trách · nguồn (một dòng, cắt "…")   3) dịch vụ · Zalo · sao · hồ sơ y tế ---------- */
  body.sales-shell #appView #customerWorkspace .hub-list-table tbody tr { position:relative; display:flex; flex-wrap:wrap; align-items:center; gap:6px 0; margin:0 0 10px; padding:12px 6px 12px 14px; border:1px solid var(--m-line); border-radius:14px; background:#fff; }
  body.sales-shell #appView #customerWorkspace .hub-list-table tbody tr::before, body.sales-shell #appView #customerWorkspace .hub-list-table tbody tr::after { content:""; order:3; flex:0 0 100%; height:0; }
  body.sales-shell #appView #customerWorkspace .hub-list-table tbody tr::after { order:7; }
  body.sales-shell #appView #customerWorkspace .hub-list-table tbody td.hub-name-cell { display:contents; }
  body.sales-shell #appView #customerWorkspace .hub-list-table td.hub-name-cell > .hub-name-line { order:0; flex:1 1 0; min-width:0; display:flex; flex-wrap:nowrap; align-items:center; gap:6px; }
  body.sales-shell #appView #customerWorkspace .hub-list-table .hub-name { display:block; flex:0 1 auto; min-width:0; overflow:hidden; text-align:left; font-size:15px; font-weight:700; line-height:22px; white-space:nowrap; text-overflow:ellipsis; }
  /* Chạm vào bất kỳ chỗ trống nào của thẻ = bấm tên khách (mở hồ sơ) */
  body.sales-shell #appView #customerWorkspace .hub-list-table .hub-name::after { content:""; position:absolute; inset:0; z-index:0; border-radius:14px; }
  body.sales-shell #appView #customerWorkspace .hub-list-table tbody tr :is(.ui-more, .hub-zalo-btn, .hub-create-medical, .hub-open-medical, .hub-removal-cell .tag) { position:relative; z-index:1; }
  body.sales-shell #appView #customerWorkspace .hub-list-table .hub-name-line > :is(.hub-ok, .tag) { flex:0 0 auto; }
  /* Ô xóa tách đôi: ⋯ lên hàng 1, nhãn "Chờ duyệt xóa" xuống hàng chip */
  body.sales-shell #appView #customerWorkspace .hub-list-table tbody td.hub-removal-cell { display:contents; }
  body.sales-shell #appView #customerWorkspace .hub-list-table td.hub-removal-cell .ui-more { order:2; flex:0 0 40px; width:40px; min-width:40px; height:40px; min-height:40px; margin:-9px 0 -9px 4px; border:0; background:none; color:var(--m-sub); }
  body.sales-shell #appView #customerWorkspace .hub-list-table td.hub-removal-cell .tag { order:8; display:inline-flex; align-items:center; height:24px; margin:0 4px 0 0; padding:0 8px; border-radius:12px; font-size:12px; }
  /* Hàng 2: một dòng chữ phụ */
  body.sales-shell #appView #customerWorkspace .hub-list-table td.hub-name-cell > .hub-sub,
  body.sales-shell #appView #customerWorkspace .hub-list-table tbody td:is(.hub-owner-cell, .hub-src) { display:block; min-width:0; margin:0; padding:0; overflow:hidden; color:var(--m-sub); font-size:13px; font-weight:400; line-height:18px; white-space:nowrap; text-overflow:ellipsis; letter-spacing:0; }
  body.sales-shell #appView #customerWorkspace .hub-list-table td.hub-name-cell > .hub-sub { order:4; flex:0 0 auto; max-width:50%; color:var(--m-ink); font-variant-numeric:tabular-nums; }
  body.sales-shell #appView #customerWorkspace .hub-list-table tbody td.hub-owner-cell { order:5; flex:0 1 auto; max-width:46%; }
  body.sales-shell #appView #customerWorkspace .hub-list-table tbody td.hub-src { order:6; flex:1 1 0; }
  body.sales-shell #appView #customerWorkspace .hub-list-table td:is(.hub-owner-cell, .hub-src)::before { content:"·"; margin:0 6px; color:var(--m-faint); }
  body.sales-shell #appView #customerWorkspace .hub-list-table td.hub-name-cell > .hub-sub.is-empty { color:var(--m-faint); }
  body.sales-shell #appView #customerWorkspace .hub-list-table tbody td:is(.hub-owner-cell, .hub-src).is-empty { display:none; }
  body.sales-shell #appView #customerWorkspace .hub-list-table td.hub-owner-cell .hub-sub { display:none; }
  /* Hàng 3: chip */
  body.sales-shell #appView #customerWorkspace .hub-list-table tbody td:is(.hub-zalo-cell, .hub-stars-cell, .hub-med-cell, .hub-svc-n) { order:8; flex:0 0 auto; margin:0 4px 0 0; padding:0; }
  body.sales-shell #appView #customerWorkspace .hub-list-table tbody td.hub-svc-n { order:8; height:24px; padding:0 8px; border-radius:12px; background:var(--m-accent-wash); color:#6E4A1C; font-size:12px; font-weight:700; line-height:24px; }
  body.sales-shell #appView #customerWorkspace .hub-list-table tbody td.hub-svc-n.soft { background:var(--m-wash); color:var(--m-sub); font-weight:600; }
  body.sales-shell #appView #customerWorkspace .hub-list-table tbody td.hub-svc-n[data-label]::before { margin-right:4px; color:inherit; font-weight:500; }
  body.sales-shell #appView #customerWorkspace .hub-list-table tbody td.hub-svc-other { height:auto; max-width:100%; padding:3px 9px; overflow-wrap:anywhere; line-height:18px; }
  body.sales-shell #appView #customerWorkspace .hub-list-table tbody td.hub-zalo-cell { order:9; }
  body.sales-shell #appView #customerWorkspace .hub-list-table td.hub-zalo-cell .hub-sub { display:none; }
  body.sales-shell #appView #customerWorkspace button.tag.hub-zalo-btn { height:24px; min-height:24px; padding:0 8px; border-radius:12px; font-size:12px; }
  body.sales-shell #appView #customerWorkspace .hub-list-table tbody td.hub-stars-cell { order:1; margin:0 0 0 6px; }
  body.sales-shell #appView #customerWorkspace .hub-list-table .hub-stars { font-size:13px; letter-spacing:0; }
  body.sales-shell #appView #customerWorkspace .hub-list-table tbody td.hub-med-cell { order:10; margin:0 0 0 auto; }
  body.sales-shell #appView #customerWorkspace .hub-list-table td.hub-med-cell:has(.hub-open-medical)::before { content:none; }
  body.sales-shell #appView #customerWorkspace .hub-table .hub-create-medical { height:32px; min-height:32px; padding:0 9px; border:1px solid var(--m-line); border-radius:10px; background:#fff; color:var(--m-accent-deep); font-size:13px; font-weight:600; }
  body.sales-shell #appView #customerWorkspace .hub-table .hub-open-medical { display:inline-flex; align-items:center; height:32px; min-height:32px; padding:0 4px; color:var(--m-accent-deep); font-size:13px; font-weight:600; }
  /* Chân danh sách */
  body.sales-shell #appView #customerWorkspace .hub-pager { gap:6px; padding:4px 0 8px; }
  body.sales-shell #appView #customerWorkspace .hub-pager span { font-size:13px; }
  body.sales-shell #appView #customerWorkspace .hub-pager span.hub-pg-gap { flex:0 0 auto; margin:0 2px; }
  body.sales-shell #appView #customerWorkspace .hub-pager button { height:40px; min-height:40px; min-width:40px; padding:0 12px; border-color:var(--m-line); border-radius:12px; }
  body.sales-shell #appView #customerWorkspace .hub-pager button.hub-pg.is-on { border-color:var(--m-accent); background:var(--m-accent); }

  /* ---------- Yêu cầu xóa / Khách đã xóa: thẻ cùng kiểu ---------- */
  body.sales-shell #appView #customerWorkspace :is(#hubRequestList, #hubRemovedList) .hub-table tr { gap:4px 8px; padding:14px; border-color:var(--m-line); border-radius:14px; }
  body.sales-shell #appView #customerWorkspace :is(#hubRequestList, #hubRemovedList) .hub-table td { color:var(--m-sub); font-size:13px; line-height:18px; }
  body.sales-shell #appView #customerWorkspace :is(#hubRequestList, #hubRemovedList) .hub-table td.hub-name-cell { color:var(--m-ink); font-size:15px; line-height:22px; }
  body.sales-shell #appView #customerWorkspace :is(#hubRequestList, #hubRemovedList) .hub-table td:is(.hub-removal-cell, .hub-act-cell) { justify-content:flex-end; margin-top:6px; }
  body.sales-shell #appView #customerWorkspace :is(#hubRequestList, #hubRemovedList) .hub-table td button { height:36px; min-height:36px; padding:0 14px; border-radius:10px; }

  /* ---------- Hồ sơ khách: tab gạch chân dính dưới thanh đầu ---------- */
  body.sales-shell #appView #customerWorkspace .hub-tabs { position:sticky; top:52px; z-index:20; gap:20px; margin:0 -12px 12px; padding:0 12px; background:#fff; box-shadow:inset 0 -1px 0 var(--m-line-soft); }
  body.sales-shell #appView #customerWorkspace .hub-tabs button { height:44px; min-height:44px; font-size:14px; font-weight:600; color:var(--m-sub); }
  body.sales-shell #appView #customerWorkspace .hub-tabs button[aria-selected="true"] { border-bottom-color:var(--m-accent); color:var(--m-ink); }
  body.sales-shell #appView #customerWorkspace .hub-card, body.sales-shell #appView #customerWorkspace #hubDetail .hub-card { padding:14px; border:1px solid var(--m-line); border-radius:14px; }
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-card > h2, body.sales-shell #appView #customerWorkspace #hubDetail .hub-pv-top > .hub-card > h2 { margin:0 0 10px; font-size:15px; font-weight:700; }
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-pv-top > .hub-card { padding:14px; }
  body.sales-shell #appView #customerWorkspace #hubDetail dl.hub-pv-kvs { grid-template-columns:repeat(2, minmax(0, 1fr)); gap:10px 14px; }
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-pv-kv dt { font-size:12px; line-height:16px; }
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-pv-kv dd { font-size:14px; line-height:20px; }
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-pv-svcs { margin:0 0 12px; }
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-pv-svc { height:26px; font-size:12.5px; }
  /* Ô tóm tắt hồ sơ liên quan */
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-pv-tiles { gap:10px; margin-top:12px; }
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-pv-tile { gap:12px; min-height:60px; padding:12px 10px 12px 14px; border-color:var(--m-line); border-radius:14px; }
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-pv-tile:disabled { border-color:var(--m-line-soft); background:var(--m-wash); }
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-pv-tile:active:not(:disabled) { background:var(--m-wash); }
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-pv-tt > b { font-size:15px; }
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-pv-go { width:24px; text-align:center; font-size:24px; color:var(--m-faint); }
  /* Đánh giá / Lịch sử giao tiếp / Lịch sử hồ sơ */
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-card .field { margin-bottom:14px; }
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-card > button.primary, body.sales-shell #appView #customerWorkspace #hubDetail form.hub-card button.primary { width:100%; min-height:46px; border-radius:12px; font-size:15px; }
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-card textarea { min-height:96px; }
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-card > .hub-stars { font-size:24px; }
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-zalo-card { margin-bottom:12px; }
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-zalo-head h2 { margin:0; }
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-zalo-row button { min-height:36px; border-radius:10px; }
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-entry { padding:12px 0; }
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-entry:first-child { padding-top:0; }
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-entry h3 { margin:0 0 4px; font-size:15px; line-height:21px; }
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-entry small { color:var(--m-sub); font-size:12px; }
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-entry p { margin:6px 0 0; color:var(--m-ink); font-size:14px; line-height:1.5; }
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-entry p:empty { display:none; }

  /* ---------- Popup hồ sơ liên quan (tấm trượt) ---------- */
  body.sales-shell #appView dialog.hub-pv-dialog { width:100%; max-width:100%; max-height:92dvh; margin:auto 0 0; border:0; border-radius:20px 20px 0 0; }
  body.sales-shell #appView dialog.hub-pv-dialog > header { align-items:flex-start; gap:8px; padding:12px 8px 10px 16px; border-bottom:1px solid var(--m-line-soft); }
  body.sales-shell #appView dialog.hub-pv-dialog > header > div { flex:1 1 auto; min-width:0; padding-top:6px; }
  body.sales-shell #appView dialog.hub-pv-dialog > header h2 { font-size:16px; font-weight:800; line-height:22px; }
  body.sales-shell #appView dialog.hub-pv-dialog > header p { margin-top:2px; font-size:13px; line-height:18px; overflow-wrap:anywhere; }
  body.sales-shell #appView dialog.hub-pv-dialog .hub-pv-close { flex:0 0 40px; width:40px; height:40px; min-height:40px; border:0; border-radius:50%; background:var(--m-wash); color:var(--m-ink); font-size:24px; outline-offset:-2px; }
  body.sales-shell #appView dialog.hub-pv-dialog .hub-pv-close:focus:not(:focus-visible) { outline:0; }
  body.sales-shell #appView dialog.hub-pv-dialog .hub-pv-body { padding:12px 16px calc(20px + env(safe-area-inset-bottom, 0px)); }
  body.sales-shell #appView dialog.hub-pv-dialog .hub-pv-tabs { top:-12px; gap:20px; margin:-12px -16px 12px; padding:0 16px; border-bottom:0; box-shadow:inset 0 -1px 0 var(--m-line-soft); }
  body.sales-shell #appView dialog.hub-pv-dialog .hub-pv-tabs button { height:44px; min-height:44px; padding:0; border:0; border-radius:0; background:none; box-shadow:none; color:var(--m-sub); font-size:14px; font-weight:600; }
  body.sales-shell #appView dialog.hub-pv-dialog .hub-pv-tabs button[aria-selected="true"] { background:none; box-shadow:inset 0 -2px 0 var(--m-accent); color:var(--m-ink); }
  body.sales-shell #appView dialog.hub-pv-dialog dl.hub-pv-kvs { gap:10px 14px; }
  body.sales-shell #appView dialog.hub-pv-dialog .ttyt-answer { grid-template-columns:minmax(0, 46%) minmax(0, 1fr); padding:8px 0; }
  body.sales-shell #appView dialog.hub-pv-dialog .ttyt-answer dt { font-size:13px; }
  body.sales-shell #appView dialog.hub-pv-dialog .ttyt-answer dd { font-size:14px; line-height:20px; }
  /* Phiếu ĐKDV trong popup: tiền 2 cột, bảng → thẻ */
  body.sales-shell #appView #customerWorkspace .hub-pv-body.hub-dk .hub-dk-money { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:0; margin:0 0 14px; padding:10px 0; border-radius:12px; background:var(--m-wash); }
  body.sales-shell #appView #customerWorkspace .hub-pv-body.hub-dk .hub-dk-money > span { display:flex; flex-direction:column; align-items:flex-start; gap:2px; min-width:0; padding:4px 12px; border:0; color:var(--m-sub); font-size:12px; }
  body.sales-shell #appView #customerWorkspace .hub-pv-body.hub-dk .hub-dk-money > span:nth-child(3) { grid-column:1 / -1; margin-top:6px; }
  body.sales-shell #appView #customerWorkspace .hub-pv-body.hub-dk .hub-dk-money b { font-size:16px; font-weight:800; overflow-wrap:anywhere; }
  body.sales-shell #appView #customerWorkspace .hub-pv-body.hub-dk .hub-dk-wrap { overflow:visible; border:0; border-radius:0; }
  body.sales-shell #appView #customerWorkspace .hub-pv-body.hub-dk :is(.hub-dk-table, .hub-dk-table tbody) { display:block; width:100%; min-width:0; }
  body.sales-shell #appView #customerWorkspace .hub-pv-body.hub-dk .hub-dk-table thead { display:none; }
  body.sales-shell #appView #customerWorkspace .hub-pv-body.hub-dk .hub-dk-table tr { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 0; margin:0 0 8px; padding:12px 14px; border:1px solid var(--m-line); border-radius:14px; background:#fff; }
  body.sales-shell #appView #customerWorkspace .hub-pv-body.hub-dk .hub-dk-table td, body.sales-shell #appView #customerWorkspace .hub-pv-body.hub-dk .hub-dk-table tr > :is(:first-child, :last-child) { display:block; min-width:0; padding:0; border:0; color:var(--m-sub); font-size:13px; line-height:18px; text-align:left; white-space:normal; }
  body.sales-shell #appView #customerWorkspace .hub-pv-body.hub-dk .hub-dk-table td small { display:inline; margin:0 0 0 4px; font-size:12px; }
  body.sales-shell #appView #customerWorkspace .hub-pv-body.hub-dk .hub-dk-table td[data-label]::before { content:attr(data-label) ": "; color:var(--m-sub); font-weight:500; }
  /* Sản phẩm đã đăng ký: tên · số lượng / số phiếu · gần nhất */
  body.sales-shell #appView #customerWorkspace .hub-pv-body.hub-dk .hub-dk-table:not(.hub-dk-orders) td:first-child { flex:1 1 calc(100% - 96px); color:var(--m-ink); font-size:14px; line-height:20px; }
  body.sales-shell #appView #customerWorkspace .hub-pv-body.hub-dk .hub-dk-table:not(.hub-dk-orders) td:first-child small { display:block; margin:2px 0 0; }
  body.sales-shell #appView #customerWorkspace .hub-pv-body.hub-dk .hub-dk-table:not(.hub-dk-orders) td.q { flex:0 0 auto; max-width:96px; margin-left:auto; padding-left:8px; color:var(--m-ink); font-size:15px; font-weight:800; text-align:right; }
  body.sales-shell #appView #customerWorkspace .hub-pv-body.hub-dk .hub-dk-table:not(.hub-dk-orders) td[data-label] { flex:0 0 auto; margin-right:12px; }
  /* Các phiếu: số phiếu · trạng thái / ngày · pháp nhân · sale / dịch vụ / tổng · đã thu */
  body.sales-shell #appView #customerWorkspace .hub-pv-body.hub-dk .hub-dk-orders td.hub-dk-c-no { order:0; flex:1 1 calc(100% - 92px); font-size:14px; }
  body.sales-shell #appView #customerWorkspace .hub-pv-body.hub-dk .hub-dk-orders td.hub-dk-c-no .hub-dk-no { display:inline; min-height:0; overflow-wrap:anywhere; white-space:normal; text-align:left; }
  body.sales-shell #appView #customerWorkspace .hub-pv-body.hub-dk .hub-dk-orders td.hub-dk-c-st { order:1; flex:0 0 auto; margin-left:auto; }
  body.sales-shell #appView #customerWorkspace .hub-pv-body.hub-dk .hub-dk-orders td.hub-dk-c-st .tag { height:22px; padding:0 8px; font-size:12px; }
  body.sales-shell #appView #customerWorkspace .hub-pv-body.hub-dk .hub-dk-orders td:is(.hub-dk-c-date, .hub-dk-c-entity, .hub-dk-c-sale) { order:2; flex:0 0 auto; }
  body.sales-shell #appView #customerWorkspace .hub-pv-body.hub-dk .hub-dk-orders td.hub-dk-c-date { flex-basis:auto; }
  body.sales-shell #appView #customerWorkspace .hub-pv-body.hub-dk .hub-dk-orders td.hub-dk-c-date::after, body.sales-shell #appView #customerWorkspace .hub-pv-body.hub-dk .hub-dk-orders td.hub-dk-c-entity::after { content:"·"; margin:0 6px; color:var(--m-faint); }
  body.sales-shell #appView #customerWorkspace .hub-pv-body.hub-dk .hub-dk-orders td.hub-dk-c-items { order:3; flex:0 0 100%; margin-top:2px; color:var(--m-ink); font-size:14px; line-height:20px; }
  body.sales-shell #appView #customerWorkspace .hub-pv-body.hub-dk .hub-dk-orders td:is(.hub-dk-c-total, .hub-dk-c-paid) { order:4; flex:1 1 50%; margin-top:4px; padding-top:8px; border-top:1px solid var(--m-line-soft); color:var(--m-ink); font-size:14px; font-weight:700; }
  body.sales-shell #appView #customerWorkspace .hub-pv-body.hub-dk .hub-dk-orders td.hub-dk-c-paid { text-align:right; }
  body.sales-shell #appView #customerWorkspace .hub-pv-body.hub-dk .hub-dk-orders td:is(.hub-dk-c-total, .hub-dk-c-paid) small { display:block; margin:0; font-weight:500; }
  body.sales-shell #appView #customerWorkspace .hub-pv-body.hub-dk .hub-dk-orders td[data-label]::before { content:attr(data-label); display:block; font-size:12px; font-weight:500; }
  body.sales-shell #appView #customerWorkspace .hub-pv-body.hub-dk h3 { margin:16px 0 8px; font-size:15px; }
  body.sales-shell #appView #customerWorkspace .hub-pv-body.hub-dk .hub-dk-gifts { margin:6px 0 0; }
  body.sales-shell #appView #customerWorkspace .hub-pv-body.hub-dk .hub-dk-gifts > b { flex:0 0 100%; font-size:13px; }
  body.sales-shell #appView #customerWorkspace .hub-pv-body.hub-dk .hub-dk-gifts span { height:auto; min-height:28px; padding:4px 12px; overflow-wrap:anywhere; }

  /* ---------- Thêm / Sửa khách ---------- */
  body.sales-shell #appView #customerWorkspace .hub-cf .hub-card { padding:16px 14px; border-color:var(--m-line); border-radius:14px; }
  body.sales-shell #appView #customerWorkspace .hub-cf .hub-card h2 { margin:0 0 12px; font-size:15px; }
  body.sales-shell #appView #customerWorkspace .hub-cf-grid { gap:14px; }
  body.sales-shell #appView #customerWorkspace .hub-cf :is(input:not([type=file]):not([type=hidden]), select, textarea) { height:46px; min-height:46px; border-color:var(--m-line); border-radius:12px; font-size:16px; }
  body.sales-shell #appView #customerWorkspace .hub-cf textarea#cf-note { height:auto; min-height:96px; }
  body.sales-shell #appView #customerWorkspace .hub-cf-out { height:46px; border-radius:12px; background:var(--m-wash); font-size:16px; }
  body.sales-shell #appView #customerWorkspace .hub-cf-unit > span { right:14px; color:var(--m-sub); font-size:14px; }
  /* Dịch vụ đã dùng: mỗi dịch vụ một hàng — tên bên trái, ô số có đơn vị bên phải, thẳng cột */
  body.sales-shell #appView #customerWorkspace .hub-cf .hub-svc-grid { grid-template-columns:minmax(0, 1fr); gap:0; margin:2px 0 10px; border-top:1px solid var(--m-line-soft); }
  body.sales-shell #appView #customerWorkspace .hub-cf label.hub-svc-in { display:grid; grid-template-columns:minmax(0, 1fr) 112px; align-items:center; gap:12px; min-height:58px; padding:6px 0; border:0; border-bottom:1px solid var(--m-line-soft); border-radius:0; background:none; font-size:15px; font-weight:600; }
  body.sales-shell #appView #customerWorkspace .hub-cf label.hub-svc-in.has-value { background:none; }
  body.sales-shell #appView #customerWorkspace .hub-cf label.hub-svc-in.has-value > span:first-child { color:#6E4A1C; }
  body.sales-shell #appView #customerWorkspace .hub-cf .hub-svc-box { position:relative; display:block; }
  body.sales-shell #appView #customerWorkspace .hub-cf .hub-svc-box input[type=number] { width:100%; height:46px; min-height:46px; padding:0 44px 0 10px; text-align:right; font-size:16px; }
  body.sales-shell #appView #customerWorkspace .hub-cf label.hub-svc-in.has-value .hub-svc-box input { border-color:#CFAF86; background:var(--m-accent-wash); }
  body.sales-shell #appView #customerWorkspace .hub-cf .hub-svc-box em { position:absolute; top:50%; right:12px; min-width:0; transform:translateY(-50%); color:var(--m-sub); font-size:14px; pointer-events:none; }
  body.sales-shell #appView #customerWorkspace .hub-cf .hub-svc-row { grid-template-columns:minmax(0, 1fr) 112px 40px; gap:8px; margin:0 0 8px; }
  body.sales-shell #appView #customerWorkspace .hub-cf .hub-svc-row input[data-svc-count] { grid-column:2; grid-row:1; padding:0 44px 0 10px; text-align:right; }
  body.sales-shell #appView #customerWorkspace .hub-cf .hub-svc-row > em { grid-column:2; grid-row:1; justify-self:end; margin-right:12px; color:var(--m-sub); font-size:14px; pointer-events:none; }
  body.sales-shell #appView #customerWorkspace .hub-cf .hub-svc-row [data-svc-del] { grid-column:3; grid-row:1; width:40px; height:40px; min-height:40px; border-color:var(--m-line); border-radius:12px; font-size:20px; }
  body.sales-shell #appView #customerWorkspace .hub-cf .hub-svc-add { height:40px; min-height:40px; padding:0 14px; border-radius:12px; font-size:14px; }
  /* Cột hồ sơ y tế: một lớp thẻ, ô bên trong không viền */
  body.sales-shell #appView #customerWorkspace .hub-cf-side { padding:16px 14px; }
  body.sales-shell #appView #customerWorkspace .hub-cf-side .hub-cf-doc > h2 { font-size:15px; }
  body.sales-shell #appView #customerWorkspace .hub-cf-side .hub-add-document { min-height:52px; padding:10px 12px; border-color:var(--m-line); font-size:14px; }
  body.sales-shell #appView #customerWorkspace .hub-cf-side .hub-document-state { flex-direction:row; flex-wrap:wrap; align-items:center; gap:10px; padding:12px; border:0; background:var(--m-wash); }
  body.sales-shell #appView #customerWorkspace .hub-cf-side .hub-document-content { flex:1 1 220px; }
  body.sales-shell #appView #customerWorkspace .hub-cf-side .hub-document-state > button { align-self:center; height:36px; min-height:36px; margin-left:auto; padding:0 14px; border-color:var(--m-line); border-radius:10px; }
  /* Dòng quy trình duyệt nằm dưới form, thanh Lưu chỉ còn nút (Hủy hẹp, Lưu rộng) */
  body.sales-shell #appView #customerWorkspace .hub-cf-note-m { margin:12px 2px 0; color:var(--m-sub); font-size:12.5px; line-height:18px; }
  body.sales-shell #appView #customerWorkspace .hub-cf-bar > .hub-cf-note { display:none; }
  body.sales-shell #appView #customerWorkspace .hub-cf-bar .hub-error { margin:0; padding:8px 12px; font-size:13px; }
  body.sales-shell #appView #customerWorkspace .hub-cf-btns { flex:1 1 100%; gap:8px; margin:0; }
  body.sales-shell #appView #customerWorkspace .hub-cf-btns button { height:46px; min-height:46px; border-radius:12px; font-size:15px; }
  body.sales-shell #appView #customerWorkspace .hub-cf-btns #hubCfCancel { flex:0 0 96px; }
  body.sales-shell #appView #customerWorkspace .hub-cf-btns #hubSave { flex:1 1 auto; min-width:0; }

  /* ---------- Nhập Excel / Chuyển dữ liệu trình duyệt ---------- */
  body.sales-shell #appView #customerWorkspace :is(#hubExcel, #hubLegacyForm) .field { margin-bottom:14px; }
  body.sales-shell #appView #customerWorkspace :is(#hubExcel, #hubLegacyForm) input[type=file] { width:100%; max-width:100%; min-height:46px; padding:6px; box-sizing:border-box; border:1px dashed var(--m-line); border-radius:12px; background:var(--m-wash); color:var(--m-sub); font-size:14px; }
  body.sales-shell #appView #customerWorkspace :is(#hubExcel, #hubLegacyForm) input[type=file]::file-selector-button { height:34px; margin-right:10px; padding:0 12px; border:1px solid var(--m-line); border-radius:10px; background:#fff; color:var(--m-ink); font:inherit; font-weight:600; }
  body.sales-shell #appView #customerWorkspace :is(#hubExcel, #hubLegacyForm) button.primary { width:100%; min-height:46px; border-radius:12px; font-size:15px; }
  body.sales-shell #appView #customerWorkspace #hubImportResult { overflow-wrap:anywhere; font-size:14px; }
  body.sales-shell #appView #customerWorkspace .hub-card > p { margin:0 0 12px; font-size:14px; line-height:1.5; overflow-wrap:anywhere; }

  /* ---------- Hộp thoại tiền sử bệnh lý (tấm trượt) ---------- */
  body.sales-shell #appView #hubHistoryDialog { width:100%; max-width:100%; margin:auto 0 0; border:0; border-radius:20px 20px 0 0; }
  body.sales-shell #appView #hubHistoryDialog .intake-dialog-head { min-height:56px; padding:8px 8px 8px 16px; }
  body.sales-shell #appView #hubHistoryDialog .intake-dialog-head h2 { font-size:16px; font-weight:800; line-height:22px; }
  body.sales-shell #appView #hubHistoryDialog .intake-dialog-head button { flex:0 0 auto; min-height:40px; padding:0 14px; border-radius:12px; }
  body.sales-shell #appView #hubHistoryDialog .panel-body { padding:12px 16px 0; }
  body.sales-shell #appView #hubHistoryDialog .hub-condition { margin:0 0 12px; padding:14px; border-color:var(--m-line); border-radius:14px; }
  body.sales-shell #appView #hubHistoryDialog .hub-condition .hub-form-grid { grid-template-columns:minmax(0, 1fr); margin:0; }
  body.sales-shell #appView #hubHistoryDialog .hub-condition .field { margin-bottom:12px; }
  body.sales-shell #appView #hubHistoryDialog .hub-condition > .sm { min-height:36px; margin:0; border-radius:10px; }
  body.sales-shell #appView #hubHistoryDialog #hubAddCondition { width:100%; min-height:44px; border:1px dashed var(--m-line); border-radius:12px; background:#fff; color:var(--m-accent-deep); font-weight:600; }
  body.sales-shell #appView #hubHistoryDialog .btn-row { margin:16px -16px 0 !important; padding:10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); }
  body.sales-shell #appView #hubHistoryDialog .btn-row button { min-height:46px; border-radius:12px; font-size:15px; }

  /* ---------- Hộp thoại xác nhận (Trả sửa, Chuyển sales, Yêu cầu xóa…) ---------- */
  body.sales-shell #hubReviewDialog #hubReviewForm { padding:4px 2px 0; }
  body.sales-shell #hubReviewDialog h2 { margin:0 0 12px; font-size:16px; font-weight:800; line-height:22px; }
  body.sales-shell #hubReviewDialog .btn-row { display:flex; gap:8px; margin-top:14px; }
  body.sales-shell #hubReviewDialog .btn-row button { min-height:46px; border-radius:12px; font-size:15px; }
  body.sales-shell #hubReviewDialog #hubReviewCancel { flex:0 0 96px; }
  body.sales-shell #hubReviewDialog #hubReviewOk { flex:1 1 auto; }
}

/* ===== MOBILE 11/2026 — ĐỢT 2: mật độ & căn chữ (docs/MOBILE-UI-SPEC.md "Đợt 2"), đè lên khối trên ===== */
@media screen and (max-width: 760px) {
  /* ---------- Đầu màn: tiêu đề 1 dòng, cắt "…" ---------- */
  body.sales-shell #appView #customerWorkspace .hub-heading { row-gap:4px; margin:0 0 10px; }
  body.sales-shell #appView #customerWorkspace .hub-heading h1 { display:block; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; overflow-wrap:normal; -webkit-line-clamp:unset; }
  body.sales-shell #appView #customerWorkspace :is(.hub-detail-head, .hub-head2) h1 { font-size:18px; }
  /* Chi tiết: hàng 1 = ← · tên · nút chính (không biểu tượng) · ⋯; hàng 2 = chip thẳng mép trái tên */
  body.sales-shell #appView #customerWorkspace .hub-detail-head > .hub-actions > button.primary .hub-ico { display:none; }
  body.sales-shell #appView #customerWorkspace .hub-detail-head > .hub-actions > button:not(.ui-more) { padding:0 12px; }
  body.sales-shell #appView #customerWorkspace .hub-detail-head > .tag { height:22px; margin-top:-2px; padding:0 8px; font-size:12px; }
  body.sales-shell #appView #customerWorkspace .hub-detail-head > #hubRemovalBox { margin-top:-2px; }
  body.sales-shell #appView #customerWorkspace .hub-detail-head > #hubRemovalBox .tag { height:22px; padding:0 8px; font-size:12px; }

  /* ---------- Lọc · dải số · chọn sales: cách nhau ≤ 10px ---------- */
  body.sales-shell #appView #customerWorkspace .hub-filters { gap:8px; margin:0 0 10px; }
  body.sales-shell #appView #customerWorkspace .hub-search { height:44px; }
  body.sales-shell #appView #customerWorkspace .hub-search input { height:42px; }
  body.sales-shell #appView #customerWorkspace > .hub-stats { margin:0 0 10px; padding:0; }
  body.sales-shell #appView #customerWorkspace > .hub-stats .hub-stat { gap:0; padding:8px 12px; border-left-color:#EADFCF; }
  body.sales-shell #appView #customerWorkspace > .hub-stats .hub-stat span { font-size:12px; font-weight:600; line-height:16px; }
  body.sales-shell #appView #customerWorkspace > .hub-stats .hub-stat strong { font-size:17px; line-height:22px; }
  body.sales-shell #appView #customerWorkspace .hub-owners { margin:0 -12px 10px; }
  body.sales-shell #appView #customerWorkspace .hub-owner { font-size:13px; }

  /* ---------- Thẻ khách — bố cục cố định cho mọi thẻ (≤ 100px):
     1) tên + chip duyệt · sao · ⋯
     2) SĐT · phụ trách · nguồn (…)            [+ Tạo hồ sơ] (luôn ở mép phải)
     3) chip dịch vụ / xóa / Zalo — một dòng, chip dài cắt "…" ---------- */
  body.sales-shell #appView #customerWorkspace .hub-list-table tbody tr { gap:0; margin:0 0 8px; padding:12px 6px 12px 12px; }
  /* Hai dải ngắt hàng cao 4px = khoảng cách giữa các hàng */
  body.sales-shell #appView #customerWorkspace .hub-list-table tbody tr::before, body.sales-shell #appView #customerWorkspace .hub-list-table tbody tr::after { height:4px; }
  body.sales-shell #appView #customerWorkspace .hub-list-table tbody tr::after { order:8; }
  body.sales-shell #appView #customerWorkspace .hub-list-table .hub-name { font-size:15px; line-height:20px; }
  body.sales-shell #appView #customerWorkspace .hub-list-table .hub-name-line > .tag { height:20px; padding:0 7px; font-size:12px; }
  body.sales-shell #appView #customerWorkspace .hub-list-table td.hub-removal-cell .ui-more { margin:-10px 0 -10px 2px; }
  /* Hàng 2: SĐT cố định; phụ trách + nguồn chia phần còn lại (co, cắt "…"); nút hồ sơ y tế cố định mép phải */
  body.sales-shell #appView #customerWorkspace .hub-list-table td.hub-name-cell > .hub-sub { order:4; flex:0 0 auto; max-width:42%; line-height:24px; }
  body.sales-shell #appView #customerWorkspace .hub-list-table tbody td.hub-owner-cell { order:5; flex:2 1 0; max-width:max-content; line-height:24px; }
  body.sales-shell #appView #customerWorkspace .hub-list-table tbody td.hub-src { order:6; flex:1 1 0; max-width:max-content; line-height:24px; }
  body.sales-shell #appView #customerWorkspace .hub-list-table td:is(.hub-owner-cell, .hub-src)::before { margin:0 5px; }
  body.sales-shell #appView #customerWorkspace .hub-list-table tbody td.hub-med-cell { order:7; flex:0 0 auto; margin:-3px 0 -3px auto; padding:0 0 0 8px; }
  body.sales-shell #appView #customerWorkspace .hub-table .hub-create-medical { height:30px; min-height:30px; padding:0 8px; border-radius:9px; font-size:12px; font-weight:600; }
  body.sales-shell #appView #customerWorkspace .hub-table .hub-open-medical { height:30px; min-height:30px; max-width:120px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
  /* Hàng 3: các chip cùng một dòng — gốc 0, giãn tới bề rộng chữ, thiếu chỗ thì co lại và cắt "…" */
  body.sales-shell #appView #customerWorkspace .hub-list-table tbody td:is(.hub-zalo-cell, .hub-svc-n) { order:9; flex:1 1 0; max-width:max-content; min-width:0; margin:0 4px 0 0; overflow:hidden; }
  body.sales-shell #appView #customerWorkspace .hub-list-table tbody td.hub-svc-n { display:block; height:22px; padding:0 8px; border-radius:11px; font-size:12px; font-weight:600; line-height:22px; white-space:nowrap; text-overflow:ellipsis; }
  body.sales-shell #appView #customerWorkspace .hub-list-table tbody td.hub-svc-n b, body.sales-shell #appView #customerWorkspace .hub-list-table tbody td.hub-svc-n[data-label]::before { font-weight:600; }
  body.sales-shell #appView #customerWorkspace .hub-list-table tbody td.hub-svc-n:empty { display:none; }
  body.sales-shell #appView #customerWorkspace .hub-list-table tbody td.hub-svc-other { height:22px; padding:0 8px; overflow-wrap:normal; line-height:22px; }
  body.sales-shell #appView #customerWorkspace .hub-list-table tbody td.hub-svc-other br { display:none; }
  body.sales-shell #appView #customerWorkspace .hub-list-table td.hub-removal-cell .tag { order:10; flex:0 0 auto; height:22px; border-radius:11px; font-weight:600; }
  body.sales-shell #appView #customerWorkspace .hub-list-table tbody td.hub-zalo-cell { order:11; display:block; }
  body.sales-shell #appView #customerWorkspace .hub-list-table tbody td.hub-zalo-cell:has(> .muted) { display:none; }
  body.sales-shell #appView #customerWorkspace button.tag.hub-zalo-btn { display:block; max-width:100%; height:22px; min-height:22px; overflow:hidden; border-radius:11px; font-weight:600; line-height:22px; white-space:nowrap; text-overflow:ellipsis; }
  /* Hàng 3 trống (khách chưa có dịch vụ / Zalo): không để dòng trống */
  body.sales-shell #appView #customerWorkspace .hub-list-table tbody tr:not(:has(td.hub-svc-n:not(:empty), td.hub-zalo-cell > button, td.hub-removal-cell .tag))::after { display:none; }

  /* ---------- Chi tiết: thẻ thông tin gọn (cặp ≈ 36px, hàng cách 8px, padding 12) ---------- */
  body.sales-shell #appView #customerWorkspace .hub-tabs { margin-bottom:10px; }
  body.sales-shell #appView #customerWorkspace .hub-grid { gap:10px; }
  body.sales-shell #appView #customerWorkspace .hub-card, body.sales-shell #appView #customerWorkspace #hubDetail .hub-card, body.sales-shell #appView #customerWorkspace #hubDetail .hub-pv-top > .hub-card { padding:12px; }
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-card > h2, body.sales-shell #appView #customerWorkspace #hubDetail .hub-pv-top > .hub-card > h2 { margin:0 0 8px; font-size:15px; line-height:1.25; }
  body.sales-shell #appView #customerWorkspace #hubDetail dl.hub-pv-kvs { gap:8px 12px; }
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-pv-kv dt { margin:0 0 2px; font-size:12px; font-weight:600; line-height:16px; }
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-pv-kv dd { font-size:14px; font-weight:500; line-height:18px; }
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-pv-kv.hub-pv-opt { display:none; }
  /* Địa chỉ không chiếm cả hàng để không bỏ trống nửa hàng bên cạnh */
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-pv-top .hub-pv-kv.wide:not(.hub-pv-note):not(.is-reject) { grid-column:auto; }
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-pv-svcs { gap:4px; margin:0 0 8px; }
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-pv-svc { height:24px; padding:0 9px; font-size:12px; font-weight:600; }
  /* Ô hồ sơ liên quan: một thẻ chung, mỗi dòng ngăn kẻ mảnh */
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-pv-tiles { gap:0; margin-top:10px; overflow:hidden; border:1px solid var(--m-line); border-radius:14px; background:#fff; }
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-pv-tile { align-items:center; gap:10px; min-height:54px; padding:7px 6px 7px 12px; border:0; border-top:1px solid var(--m-line-soft); border-radius:0; background:#fff; }
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-pv-tile:first-child { border-top:0; }
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-pv-tile:disabled { border-color:var(--m-line-soft); background:#fff; }
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-pv-tile:disabled .hub-pv-tt > b { color:var(--m-sub); }
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-pv-tile > svg { flex:0 0 20px; margin:0; align-self:center; }
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-pv-tt { gap:1px; }
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-pv-tt > b { font-size:15px; line-height:20px; }
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-pv-tt > span { font-size:13px; line-height:16px; text-wrap:balance; }
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-pv-go { width:14px; font-size:22px; }

  /* ---------- Đánh giá / Lịch sử giao tiếp ---------- */
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-card .field { margin-bottom:10px; }
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-card .field > label { margin-bottom:4px; font-size:12px; font-weight:600; }
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-card textarea { height:88px; min-height:88px; }
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-card :is(input:not([type=checkbox]), select) { height:44px; min-height:44px; }
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-card > button.primary, body.sales-shell #appView #customerWorkspace #hubDetail form.hub-card button.primary { min-height:44px; }
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-card > .hub-stars { font-size:20px; }
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-card > p.small { margin:4px 0 0; font-size:13px; }
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-zalo-card { margin-bottom:10px; }
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-zalo-head { gap:8px; }
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-zalo-card > p { margin:6px 0 0; font-size:13px; }
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-entry { padding:8px 0; }
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-entry h3 { margin:0 0 2px; font-size:14px; line-height:1.35; }
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-entry p { margin:4px 0 0; font-size:14px; line-height:1.35; }
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-entry { border-bottom-color:var(--m-line-soft); }
  body.sales-shell #appView #customerWorkspace #hubDetail .hub-pager { padding:8px 0 0; }
  /* Chỉ 1 trang: bỏ hai nút Trước/Sau (đều đang khóa), giữ dòng số kết quả */
  body.sales-shell #appView #customerWorkspace .hub-pager:not(:has(.hub-pg)) button { display:none; }
  body.sales-shell #appView #customerWorkspace .hub-pager:not(:has(.hub-pg)) span { margin:0; }

  /* ---------- Popup hồ sơ liên quan ---------- */
  body.sales-shell #appView dialog.hub-pv-dialog > header { padding:10px 8px 8px 12px; }
  body.sales-shell #appView dialog.hub-pv-dialog > header > div { padding-top:4px; }
  body.sales-shell #appView dialog.hub-pv-dialog .hub-pv-body { padding:10px 12px calc(16px + env(safe-area-inset-bottom, 0px)); }
  body.sales-shell #appView dialog.hub-pv-dialog .hub-pv-tabs { top:-10px; margin:-10px -12px 10px; padding:0 12px; }
  body.sales-shell #appView dialog.hub-pv-dialog dl.hub-pv-kvs { gap:8px 12px; }
  body.sales-shell #appView dialog.hub-pv-dialog .hub-pv-kv dt { font-size:12px; font-weight:600; line-height:16px; }
  body.sales-shell #appView dialog.hub-pv-dialog .hub-pv-kv dd { font-size:14px; line-height:18px; }
  body.sales-shell #appView dialog.hub-pv-dialog .ttyt-answer { padding:6px 0; }
  body.sales-shell #appView dialog.hub-pv-dialog .ttyt-answer dt { font-size:12px; font-weight:600; line-height:16px; }
  body.sales-shell #appView dialog.hub-pv-dialog .ttyt-answer dd { font-size:14px; line-height:18px; }
  body.sales-shell #appView dialog.hub-pv-dialog .hub-entry { padding:10px 0; }
  body.sales-shell #appView #customerWorkspace .hub-pv-body.hub-dk .hub-dk-money { margin:0 0 10px; padding:0; }
  body.sales-shell #appView #customerWorkspace .hub-pv-body.hub-dk .hub-dk-money > span { padding:8px 12px; font-weight:600; }
  body.sales-shell #appView #customerWorkspace .hub-pv-body.hub-dk .hub-dk-money > span:nth-child(3) { margin-top:0; border-top:1px solid #EADFCF; }
  body.sales-shell #appView #customerWorkspace .hub-pv-body.hub-dk .hub-dk-money > span:nth-child(2) { border-left:1px solid #EADFCF; }
  body.sales-shell #appView #customerWorkspace .hub-pv-body.hub-dk .hub-dk-money b { font-size:15px; line-height:20px; }
  body.sales-shell #appView #customerWorkspace .hub-pv-body.hub-dk .hub-dk-table tr { gap:2px 0; margin:0 0 8px; padding:10px 12px; }
  body.sales-shell #appView #customerWorkspace .hub-pv-body.hub-dk .hub-dk-table:not(.hub-dk-orders) td[data-label] { font-size:13px; }
  body.sales-shell #appView #customerWorkspace .hub-pv-body.hub-dk .hub-dk-table:not(.hub-dk-orders) td.q { font-size:14px; }
  body.sales-shell #appView #customerWorkspace .hub-pv-body.hub-dk .hub-dk-table:not(.hub-dk-orders) td[data-label]:last-child { flex:1 1 0; min-width:0; margin-right:0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
  body.sales-shell #appView dialog.hub-pv-dialog > header p { text-wrap:balance; }
  /* Số phiếu dài: 1 dòng, cắt "…" (không gãy giữa mã) */
  body.sales-shell #appView #customerWorkspace .hub-pv-body.hub-dk .hub-dk-orders td.hub-dk-c-no { min-width:0; overflow:hidden; font-size:13px; white-space:nowrap; text-overflow:ellipsis; }
  body.sales-shell #appView #customerWorkspace .hub-pv-body.hub-dk .hub-dk-orders td.hub-dk-c-no .hub-dk-no { white-space:nowrap; overflow-wrap:normal; }
  body.sales-shell #appView #customerWorkspace .hub-pv-body.hub-dk .hub-dk-orders td:is(.hub-dk-c-total, .hub-dk-c-paid) { margin-top:2px; padding-top:6px; font-size:14px; }
  body.sales-shell #appView #customerWorkspace .hub-pv-body.hub-dk h3 { margin:12px 0 8px; }

  /* ---------- Form Thêm / Sửa ---------- */
  body.sales-shell #appView #customerWorkspace .hub-cf-layout, body.sales-shell #appView #customerWorkspace .hub-cf-main { gap:10px; }
  body.sales-shell #appView #customerWorkspace .hub-cf .hub-card { padding:12px; }
  body.sales-shell #appView #customerWorkspace .hub-cf .hub-card h2 { margin:0 0 8px; font-size:15px; line-height:1.25; }
  body.sales-shell #appView #customerWorkspace .hub-cf-grid, body.sales-shell #appView #customerWorkspace .hub-cf-grid.hub-cf-grid-health { gap:10px 12px; }
  /* Cặp ngắn SĐT + Ngày sinh cùng hàng; trường dài chiếm cả hàng */
  body.sales-shell #appView #customerWorkspace .hub-cf-grid { grid-template-columns:repeat(2, minmax(0, 1fr)); }
  body.sales-shell #appView #customerWorkspace .hub-cf-grid > :is(.span2, .span3, .wide), body.sales-shell #appView #customerWorkspace .hub-cf-grid > .hub-cf-field:has(#cf-usage) { grid-column:1 / -1; }
  body.sales-shell #appView #customerWorkspace .hub-cf-field > label, body.sales-shell #appView #customerWorkspace .hub-cf-lbl { margin:0 0 4px; font-size:12px; font-weight:600; line-height:16px; text-wrap:balance; }
  body.sales-shell #appView #customerWorkspace .hub-cf :is(input:not([type=file]):not([type=hidden]), select) { height:44px; min-height:44px; }
  body.sales-shell #appView #customerWorkspace .hub-cf-out { height:44px; }
  body.sales-shell #appView #customerWorkspace .hub-cf-err { margin-top:4px; font-size:12px; }
  body.sales-shell #appView #customerWorkspace .hub-cf label.hub-svc-in { min-height:48px; padding:3px 0; font-size:14px; font-weight:500; }
  body.sales-shell #appView #customerWorkspace .hub-cf .hub-svc-box input[type=number] { height:40px; min-height:40px; }
  body.sales-shell #appView #customerWorkspace .hub-cf .hub-svc-grid { margin:0 0 8px; }
  body.sales-shell #appView #customerWorkspace .hub-cf .hub-svc-row { margin:0 0 6px; }
  body.sales-shell #appView #customerWorkspace .hub-cf textarea#cf-note { min-height:84px; }
  body.sales-shell #appView #customerWorkspace .hub-cf-side { padding:12px; }
  body.sales-shell #appView #customerWorkspace .hub-cf-side .hub-cf-doc + .hub-cf-doc { margin-top:10px; padding-top:10px; }
  body.sales-shell #appView #customerWorkspace .hub-cf-side .hub-cf-doc > h2 { margin:0 0 6px; }
  body.sales-shell #appView #customerWorkspace .hub-cf-side .hub-add-document { min-height:46px; padding:8px 12px; font-size:13px; }
  body.sales-shell #appView #customerWorkspace .hub-cf-side .hub-document-state { gap:6px 10px; min-height:0; padding:10px 12px; }
  body.sales-shell #appView #customerWorkspace .hub-cf-side .hub-document-content :is(p, ul) { font-size:13px; }
  body.sales-shell #appView #customerWorkspace .hub-cf-side .hub-document-state > button { height:32px; min-height:32px; }
  body.sales-shell #appView #customerWorkspace .hub-cf-note-m { margin:8px 2px 0; font-size:13px; }

  /* ---------- Nhập Excel / chuyển dữ liệu / tiền sử ---------- */
  body.sales-shell #appView #customerWorkspace :is(#hubExcel, #hubLegacyForm) .field { margin-bottom:10px; }
  body.sales-shell #appView #customerWorkspace :is(#hubExcel, #hubLegacyForm) .field > label { margin-bottom:4px; font-size:12px; }
  body.sales-shell #appView #customerWorkspace .hub-card > p { margin:0 0 8px; line-height:1.35; }
  body.sales-shell #appView #customerWorkspace :is(#hubImportResult, #hubLegacyResult):empty { display:none; }
  body.sales-shell #appView #hubHistoryDialog .hub-condition { margin:0 0 10px; padding:12px; }
  body.sales-shell #appView #hubHistoryDialog .hub-condition .field { margin-bottom:8px; }
  body.sales-shell #appView #hubHistoryDialog .panel-body { padding:10px 12px 0; }
}
