#salesProfileDialog{width:min(860px,95vw);max-height:90dvh;background:var(--surface,#17130f);color:var(--ink);border:1px solid var(--hair);border-radius:16px;padding:20px;overflow:auto}#salesProfileDialog::backdrop{background:#000b}#salesProfileDialog>header{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px}#salesProfileDialog h2{font-size:20px;margin:0}#salesProfileDialog h3{font-size:16px;color:var(--bronze-deep);margin:0 0 14px}.profile-meta{color:var(--muted);margin-bottom:18px}.profile-columns{display:grid;grid-template-columns:1.2fr 1fr;gap:24px}.profile-columns form{min-width:0}.profile-columns label{display:block;font-size:13px;margin-bottom:14px}.profile-columns input{display:block;width:100%;margin-top:6px;box-sizing:border-box}.profile-fields{display:grid;grid-template-columns:1fr 1fr;gap:0 12px}.profile-photo{display:flex;gap:12px;align-items:center}.profile-photo img{width:64px;height:64px;object-fit:cover;border-radius:50%}.profile-photo label{min-width:0}.profile-columns .profile-check{display:flex;align-items:center;gap:8px}.profile-check input{width:16px;height:16px;margin:0}#profileMessage{font-size:13px;white-space:pre-wrap;margin-bottom:0}@media(max-width:650px){.profile-columns{grid-template-columns:1fr}.profile-fields{grid-template-columns:1fr}}
#salesProfileDialog{width:min(960px,95vw);padding:0;box-shadow:0 28px 100px #0009}#salesProfileDialog>header{margin:0;padding:20px 24px;border-bottom:1px solid var(--hair);background:linear-gradient(110deg,#292016,#17130f)}#profileContent{display:grid;grid-template-columns:240px minmax(0,1fr);min-height:470px}.profile-meta{margin:0;padding:28px 18px;border-right:1px solid var(--hair);background:#100e0b;display:flex;flex-direction:column;align-items:center;gap:6px}.profile-meta>strong{color:var(--ink);font-size:16px;text-align:center}.profile-identity-mark{width:64px;height:64px;border:1px solid #9e7950;border-radius:50%;display:grid;place-items:center;background:#352719;color:#e6be8b;font-size:22px;font-weight:700;margin-bottom:8px;text-transform:uppercase}.profile-username{font-size:12px;overflow-wrap:anywhere}.profile-meta nav{width:100%;display:grid;gap:8px;margin-top:24px}.profile-meta nav button{width:100%;display:flex;align-items:center;justify-content:space-between;text-align:left;padding:12px 14px;border-color:transparent;background:transparent;font-size:13px}.profile-meta nav button[aria-pressed=true]{border-color:#715638;background:#342719;color:#e8c394}.profile-columns{display:block;padding:28px;min-width:0}.profile-columns form[hidden]{display:none}.profile-columns h3{font-size:20px;color:var(--ink);margin:0 0 8px}.profile-description{font-size:13px;color:var(--muted);line-height:1.6;margin:0 0 22px}.profile-fields{gap:4px 16px}.profile-columns label{font-size:13px;color:var(--ink)}.profile-columns input{height:44px;border-radius:8px}.profile-columns button[type=submit]{margin-top:12px;min-height:42px;padding-inline:22px}.profile-photo{padding:14px;border:1px solid var(--hair);border-radius:10px;margin:18px 0 22px;background:#100e0b}.profile-photo label{margin:0;width:100%}.profile-photo input{height:auto;font-size:12px;padding:8px}.profile-upload-label{display:none}.profile-columns .profile-check input{height:16px;width:16px}.profile-otp-card{border:1px solid var(--hair);border-radius:10px;background:#100e0b;padding:16px;margin-bottom:20px;display:grid;gap:8px}.profile-otp-card>span{font-size:12px;color:var(--muted)}.profile-otp-card strong{font-size:14px;overflow-wrap:anywhere}.profile-otp-card button{justify-self:start;margin-top:4px}.profile-otp-card p:empty{display:none}.profile-otp-card p{font-size:12px;margin:0;color:var(--bronze-deep)}#profileMessage{margin:0;padding:12px 24px;border-top:1px solid var(--hair);background:#100e0b;min-height:18px}#profileMessage:empty{display:none}@media(max-width:650px){#profileContent{grid-template-columns:1fr;min-height:0}.profile-meta{padding:16px;border-right:0;border-bottom:1px solid var(--hair)}.profile-identity-mark{display:none}.profile-meta nav{display:flex;margin-top:12px;gap:4px}.profile-meta nav button{padding:10px 7px;justify-content:center;font-size:12px}.profile-meta nav button span{display:none}.profile-columns{padding:20px}.profile-fields{grid-template-columns:1fr 1fr}}

.profile-photo input::file-selector-button{background:#342719;color:#e8c394;border:1px solid #715638;border-radius:6px;padding:7px 12px;margin-right:12px;cursor:pointer;font:inherit}

.profile-overview[hidden],.profile-editor[hidden]{display:none}.profile-read-fields{display:grid;grid-template-columns:1fr 1fr;gap:0 24px;margin:24px 0}.profile-read-fields>div{padding:16px 0;border-bottom:1px solid var(--hair);min-width:0}.profile-read-fields dt{color:var(--muted);font-size:12px;margin-bottom:7px}.profile-read-fields dd{margin:0;font-size:15px;overflow-wrap:anywhere}.profile-security-summary{border:1px solid var(--hair);border-radius:10px;padding:22px;margin:24px 0;background:#100e0b}.profile-security-summary strong,.profile-masked{display:block}.profile-masked{font-size:24px;letter-spacing:5px;margin-top:12px}.profile-security-summary p{color:var(--muted);font-size:13px}.profile-cancel{margin-left:10px}.profile-edit{margin-top:8px}@media(max-width:480px){.profile-read-fields{grid-template-columns:1fr}}
/* Hợp đồng · Hội nhập & thử việc (xem dữ liệu Hành chính) */
#salesProfileDialog .profile-hr h4{margin:18px 0 8px;font-size:13px;color:var(--ink);}
#salesProfileDialog .profile-hr-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:10px;margin:10px 0;}
#salesProfileDialog .profile-hr-cards>div{display:grid;gap:3px;padding:12px 14px;border:1px solid var(--hair);border-radius:var(--r);background:var(--surface-2);}
#salesProfileDialog .profile-hr-cards span{font-size:12px;color:var(--muted);}#salesProfileDialog .profile-hr-cards strong{font-size:15px;}#salesProfileDialog .profile-hr-cards small{font-size:12px;color:var(--ink-2);}
#salesProfileDialog .profile-hr-notes{list-style:none;margin:8px 0;padding:0;display:grid;gap:6px;font-size:12.5px;}
#salesProfileDialog .profile-hr-notes li{padding:8px 10px;border-radius:8px;border-left:3px solid var(--high);background:var(--high-wash);color:var(--ink);}
#salesProfileDialog .profile-hr-notes li.ok{border-left-color:var(--normal);background:var(--normal-wash);}
#salesProfileDialog .profile-hr-list{list-style:none;margin:0;padding:0;display:grid;gap:8px;}
#salesProfileDialog .profile-hr-list li{display:grid;gap:3px;padding:10px 12px;border:1px solid var(--hair-soft);border-radius:8px;font-size:13px;}
#salesProfileDialog .profile-hr-list li span{color:var(--ink-2);font-size:12.5px;}#salesProfileDialog .profile-hr-list li.ok strong{color:var(--normal);}
#salesProfileDialog .profile-hr-list .sm{justify-self:start;}
#salesProfileDialog .profile-hr-steps{list-style:none;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;margin:10px 0 14px;padding:0;}
#salesProfileDialog .profile-hr-steps li{padding:9px 6px;border-radius:10px;background:var(--surface-3);color:var(--muted);text-align:center;font-size:11.5px;font-weight:600;}
#salesProfileDialog .profile-hr-steps li.done{background:var(--normal-wash);color:var(--normal);}
#salesProfileDialog .profile-hr-steps li.active{background:var(--bronze-wash);color:var(--bronze-deep);box-shadow:inset 0 0 0 1px var(--bronze);}
@media (max-width:700px){#salesProfileDialog .profile-hr-steps{grid-template-columns:repeat(2,minmax(0,1fr));}}

/* ==========================================================================
   Trang cá nhân theo CRM mới (11/2026, phác thảo Profile.dc.html): đầu = ảnh tròn + tên + chức danh,
   tab chữ gạch dưới, nội dung dạng thẻ phẳng. Vẫn là hộp thoại #salesProfileDialog.
   ========================================================================== */
@media (min-width: 901px) {
  dialog#salesProfileDialog { width: min(960px, 95vw); height: min(760px, 90dvh); border: 1px solid #E4DACA; border-radius: 16px; background: #fff; color: #25211C; box-shadow: 0 8px 24px rgba(57, 46, 34, .12); overflow: hidden; }
  dialog#salesProfileDialog[open] { display: flex; flex-direction: column; }
  dialog#salesProfileDialog::backdrop { background: rgba(37, 33, 28, .38); }
  dialog#salesProfileDialog > header { flex: 0 0 auto; padding: 16px 24px; background: #fff; border-bottom: 1px solid #EFE9DD; }
  dialog#salesProfileDialog h2 { font-size: 17px; font-weight: 700; color: #25211C; }
  dialog#salesProfileDialog #profileContent { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; }
  /* Đầu: ảnh tròn + tên + chức danh; hàng tab nằm dưới */
  dialog#salesProfileDialog .profile-meta { flex: 0 0 auto; display: grid; grid-template-columns: 96px minmax(0, 1fr); grid-template-areas: "mark name" "mark dept" "mark user" "nav nav"; column-gap: 20px; row-gap: 2px; align-content: center; align-items: center; justify-items: start; padding: 24px 32px 0; border: 0; background: #fff; }
  dialog#salesProfileDialog .profile-identity-mark { grid-area: mark; align-self: center; width: 96px; height: 96px; margin: 0 0 14px; border: 1px solid #E4DACA; background: #FAF1E1; color: #8A5F27; font-family: 'Cormorant Garamond', Georgia, serif; font-size: 36px; font-weight: 600; }
  dialog#salesProfileDialog .profile-meta > strong { grid-area: name; align-self: end; color: #25211C; font-size: 24px; font-weight: 700; letter-spacing: -.3px; text-align: left; }
  dialog#salesProfileDialog .profile-meta > span:not(.profile-username):not(.profile-identity-mark) { grid-area: dept; color: #6F655A; font-size: 14px; }
  dialog#salesProfileDialog .profile-meta > .profile-username { grid-area: user; align-self: start; color: #6F655A; font-size: 13px; }
  dialog#salesProfileDialog .profile-meta nav { grid-area: nav; width: 100%; display: flex; flex-wrap: wrap; gap: 28px; margin: 0; border-bottom: 1px solid #EFE9DD; }
  dialog#salesProfileDialog .profile-meta nav button, dialog#salesProfileDialog .profile-meta nav button { width: auto; height: 44px; min-height: 0; margin-bottom: -1px; padding: 0; justify-content: flex-start; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; box-shadow: none; color: #6F655A; font-size: 14px; font-weight: 600; }
  dialog#salesProfileDialog .profile-meta nav button:hover, dialog#salesProfileDialog .profile-meta nav button:hover { background: transparent; color: #25211C; }
  dialog#salesProfileDialog .profile-meta nav button[aria-pressed=true], dialog#salesProfileDialog .profile-meta nav button[aria-pressed=true] { background: transparent; border-bottom-color: #9A6A2E; box-shadow: none; color: #25211C; }
  dialog#salesProfileDialog .profile-meta nav button span { display: none; }
  /* Nội dung tab: một thẻ phẳng */
  dialog#salesProfileDialog .profile-columns { flex: 0 0 auto; padding: 24px 32px 32px; }
  dialog#salesProfileDialog .profile-columns > form { max-width: 720px; padding: 20px; border: 1px solid #E4DACA; border-radius: 16px; background: #fff; }
  dialog#salesProfileDialog .profile-columns > form[hidden] { display: none; }
  dialog#salesProfileDialog .profile-columns h3, dialog#salesProfileDialog .profile-columns h3 { margin: 0 0 8px; color: #25211C; font-size: 16px; font-weight: 700; }
  /* Bỏ các dòng giải thích */
  dialog#salesProfileDialog #profileCodeForm .profile-editor > .profile-description:first-child, dialog#salesProfileDialog #profileSignatureForm > .profile-description:not(#signatureStatus), dialog#salesProfileDialog .profile-security-summary p { display: none; }
  dialog#salesProfileDialog .profile-description { margin-bottom: 14px; color: #6F655A; font-size: 13px; }
  /* Thông tin: cặp nhãn - giá trị một cột */
  dialog#salesProfileDialog .profile-read-fields { grid-template-columns: 1fr; gap: 0; margin: 8px 0 16px; }
  dialog#salesProfileDialog .profile-read-fields > div { display: flex; gap: 16px; padding: 12px 0; border-top: 1px solid #EFE9DD; border-bottom: 0; }
  dialog#salesProfileDialog .profile-read-fields dt { flex: 0 0 160px; margin: 0; color: #6F655A; font-size: 13px; }
  dialog#salesProfileDialog .profile-read-fields dd { flex: 1 1 auto; font-size: 14px; }
  dialog#salesProfileDialog .profile-security-summary { display: flex; align-items: center; gap: 16px; margin: 8px 0 16px; padding: 12px 0; border: 0; border-top: 1px solid #EFE9DD; border-radius: 0; background: transparent; }
  dialog#salesProfileDialog .profile-security-summary strong { font-size: 14px; font-weight: 700; }
  dialog#salesProfileDialog .profile-masked { margin: 0 0 0 auto; color: #6F655A; font-size: 14px; letter-spacing: 2px; }
  /* Ô nhập, nút */
  dialog#salesProfileDialog .profile-columns label { color: #25211C; font-size: 13px; font-weight: 600; }
  dialog#salesProfileDialog .profile-columns input { height: 40px; border: 1px solid #E4DACA; border-radius: 10px; background: #fff; }
  dialog#salesProfileDialog .profile-columns input:focus { border-color: #9A6A2E; box-shadow: none; outline: 0; }
  dialog#salesProfileDialog .profile-photo { padding: 0; border: 0; background: transparent; margin: 8px 0 12px; }
  dialog#salesProfileDialog .profile-photo input { height: auto; border: 0; padding: 0; }
  dialog#salesProfileDialog .profile-photo input::file-selector-button { background: #fff; color: #25211C; border: 1px solid #E4DACA; border-radius: 10px; padding: 8px 14px; font-weight: 600; }
  dialog#salesProfileDialog .profile-columns .profile-check input { height: 16px; }
  dialog#salesProfileDialog .profile-columns button[type=submit], dialog#salesProfileDialog .profile-edit { min-height: 40px; border-radius: 10px; font-size: 14px; font-weight: 700; }
  dialog#salesProfileDialog .profile-edit { margin-top: 0; }
  dialog#salesProfileDialog .profile-cancel, dialog#salesProfileDialog .signature-actions button:not(.primary), dialog#salesProfileDialog .profile-otp-card button { min-height: 40px; border-radius: 10px; }
  dialog#salesProfileDialog .profile-otp-card { border: 1px solid #EFE9DD; border-radius: 12px; background: #FAF7F2; }
  dialog#salesProfileDialog .profile-otp-card p { color: #8A5F27; }
  dialog#salesProfileDialog #profileMessage { flex: 0 0 auto; padding: 12px 32px; border-top: 1px solid #EFE9DD; background: #FAF7F2; font-size: 13px; }
  /* Chữ ký */
  dialog#salesProfileDialog .signature-pad { border-radius: 12px; border-color: #E4DACA; }
  /* Hợp đồng, hội nhập: thẻ phẳng, nhãn trạng thái theo token */
  dialog#salesProfileDialog .profile-hr h4 { margin: 18px 0 8px; font-size: 14px; font-weight: 700; color: #25211C; }
  dialog#salesProfileDialog .profile-hr-cards > div { border-color: #EFE9DD; border-radius: 12px; background: #FAF7F2; }
  dialog#salesProfileDialog .profile-hr-cards span, dialog#salesProfileDialog .profile-hr-cards small { color: #6F655A; }
  dialog#salesProfileDialog .profile-hr-notes li { border-left: 0; border-radius: 10px; background: #FFF2E0; color: #8A4B0C; }
  dialog#salesProfileDialog .profile-hr-notes li.ok { background: #E6F2E8; color: #1F5E2E; }
  dialog#salesProfileDialog .profile-hr-list li { border-color: #EFE9DD; border-radius: 12px; }
  dialog#salesProfileDialog .profile-hr-list li span { color: #6F655A; }
  dialog#salesProfileDialog .profile-hr-list li.ok strong { color: #1F5E2E; }
  dialog#salesProfileDialog .profile-hr-steps li { border-radius: 12px; background: #F1ECE4; color: #6F655A; font-size: 12px; }
  dialog#salesProfileDialog .profile-hr-steps li.done { background: #E6F2E8; color: #1F5E2E; }
  dialog#salesProfileDialog .profile-hr-steps li.active { background: #EFE2CC; color: #6E4A1C; box-shadow: none; }
}
@media (min-width: 901px) {
  dialog#salesProfileDialog .signature-actions { align-items: center; justify-content: flex-end; }
  dialog#salesProfileDialog .signature-actions button { margin-top: 0; }
}

/* 05/11: dải 3 số dưới tên (Khách hàng · Phiếu ĐKDV tháng · Hành trình đang chạy) */
@media (min-width: 901px) {
  dialog#salesProfileDialog .profile-meta { grid-template-areas: "mark name" "mark dept" "mark user" "mark stats" "nav nav"; }
  dialog#salesProfileDialog .profile-stats { grid-area: stats; display: flex; flex-wrap: wrap; gap: 4px 24px; margin-top: 10px; color: #6F655A; font-size: 14px; }
  dialog#salesProfileDialog .profile-stats strong { color: #25211C; font-size: 16px; font-weight: 700; }
  dialog#salesProfileDialog .profile-stats[hidden] { display: none; }
}


/* Điện thoại (≤ 900px): hộp thoại toàn màn; ảnh + tên + dải số; tab chữ cuộn ngang */
@media (max-width: 900px) {
  dialog#salesProfileDialog { position: fixed; inset: 0; width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; border-radius: 0; background: #fff; color: #25211C; overflow: hidden; box-shadow: none; }
  dialog#salesProfileDialog[open] { display: flex; flex-direction: column; }
  dialog#salesProfileDialog > header { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 52px; box-sizing: border-box; padding: 4px 12px 4px 16px; background: #fff; border-bottom: 1px solid #EFE9DD; }
  dialog#salesProfileDialog h2 { margin: 0; font-size: 18px; font-weight: 800; color: #25211C; }
  dialog#salesProfileDialog > header button { min-height: 44px; padding: 0 16px; border: 1px solid #E4DACA; border-radius: 10px; background: #fff; color: #25211C; font-size: 14px; font-weight: 600; }
  dialog#salesProfileDialog #profileContent { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  dialog#salesProfileDialog .profile-meta { flex: 0 0 auto; display: grid; grid-template-columns: 64px minmax(0, 1fr); grid-template-areas: "mark name" "mark dept" "mark user" "stats stats" "nav nav"; column-gap: 14px; row-gap: 2px; align-items: center; padding: 16px 16px 0; background: #fff; text-align: left; }
  dialog#salesProfileDialog .profile-identity-mark { grid-area: mark; width: 64px; height: 64px; margin: 0; border: 1px solid #E4DACA; border-radius: 50%; background: #FAF1E1; color: #8A5F27; display: grid; place-items: center; font-size: 22px; font-weight: 700; }
  dialog#salesProfileDialog .profile-meta > strong { grid-area: name; align-self: end; font-size: 20px; font-weight: 700; color: #25211C; text-align: left; }
  dialog#salesProfileDialog .profile-meta > span:not(.profile-username):not(.profile-identity-mark) { grid-area: dept; color: #6F655A; font-size: 14px; }
  dialog#salesProfileDialog .profile-meta > .profile-username { grid-area: user; align-self: start; color: #6F655A; font-size: 13px; }
  dialog#salesProfileDialog .profile-stats { grid-area: stats; display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin: 14px 0 4px; font-size: 12px; color: #6F655A; }
  dialog#salesProfileDialog .profile-stats[hidden] { display: none; }
  dialog#salesProfileDialog .profile-stats > span { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: #FAF7F2; line-height: 1.3; }
  dialog#salesProfileDialog .profile-stats strong { font-size: 18px; font-weight: 700; color: #25211C; }
  dialog#salesProfileDialog .profile-meta nav { grid-area: nav; display: flex; flex-wrap: nowrap; gap: 22px; margin: 8px -16px 0; padding: 0 16px; overflow-x: auto; border-bottom: 1px solid #EFE9DD; scrollbar-width: none; }
  dialog#salesProfileDialog .profile-meta nav::-webkit-scrollbar { display: none; }
  dialog#salesProfileDialog .profile-meta nav button { flex: 0 0 auto; width: auto; height: 48px; min-height: 48px; margin-bottom: -1px; padding: 0; justify-content: flex-start; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; box-shadow: none; color: #6F655A; font-size: 14px; font-weight: 600; white-space: nowrap; }
  dialog#salesProfileDialog .profile-meta nav button[aria-pressed=true] { background: transparent; border-bottom-color: #9A6A2E; color: #25211C; }
  dialog#salesProfileDialog .profile-meta nav button span { display: none; }
  dialog#salesProfileDialog .profile-columns { display: block; flex: 0 0 auto; padding: 16px 16px 24px; }
  dialog#salesProfileDialog .profile-columns > form { padding: 16px; border: 1px solid #E4DACA; border-radius: 16px; background: #fff; }
  dialog#salesProfileDialog .profile-columns > form[hidden] { display: none; }
  dialog#salesProfileDialog .profile-columns h3 { margin: 0 0 8px; font-size: 16px; font-weight: 700; color: #25211C; }
  dialog#salesProfileDialog .profile-read-fields { grid-template-columns: 1fr; gap: 0; margin: 8px 0 16px; }
  dialog#salesProfileDialog .profile-read-fields > div { display: flex; flex-direction: column; gap: 2px; padding: 12px 0; border-top: 1px solid #EFE9DD; border-bottom: 0; }
  dialog#salesProfileDialog .profile-read-fields dt { margin: 0; color: #6F655A; font-size: 13px; }
  dialog#salesProfileDialog .profile-read-fields dd { margin: 0; font-size: 15px; }
  dialog#salesProfileDialog .profile-security-summary { display: flex; align-items: center; gap: 12px; margin: 8px 0 16px; padding: 12px 0; border: 0; border-top: 1px solid #EFE9DD; border-radius: 0; background: transparent; }
  dialog#salesProfileDialog .profile-columns label { display: block; color: #25211C; font-size: 13px; font-weight: 600; }
  dialog#salesProfileDialog .profile-columns input:not([type=file]):not([type=checkbox]) { width: 100%; box-sizing: border-box; height: 44px; min-height: 44px; font-size: 16px; border: 1px solid #E4DACA; border-radius: 10px; background: #fff; }
  dialog#salesProfileDialog .profile-columns button, dialog#salesProfileDialog .profile-edit { min-height: 44px; border-radius: 10px; font-size: 14px; font-weight: 700; }
  dialog#salesProfileDialog .profile-edit, dialog#salesProfileDialog .profile-columns button[type=submit] { width: 100%; }
  dialog#salesProfileDialog .profile-photo { padding: 0; border: 0; background: transparent; }
  dialog#salesProfileDialog .profile-photo input::file-selector-button { min-height: 44px; border-radius: 10px; background: #fff; color: #25211C; border: 1px solid #E4DACA; padding: 0 14px; }
  dialog#salesProfileDialog .profile-otp-card { border: 1px solid #EFE9DD; border-radius: 12px; background: #FAF7F2; }
  dialog#salesProfileDialog .signature-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
  dialog#salesProfileDialog .signature-pad { max-width: 100%; border-radius: 12px; }
  dialog#salesProfileDialog #profileMessage { flex: 0 0 auto; margin: 0; padding: 10px 16px; border-top: 1px solid #EFE9DD; background: #FAF7F2; font-size: 13px; }
  dialog#salesProfileDialog #profileMessage:empty { display: none; }
  dialog#salesProfileDialog .profile-hr-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  dialog#salesProfileDialog .profile-hr-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ===== MOBILE 11/2026 (≤ 760px) — docs/MOBILE-UI-SPEC.md ===== */
@media screen and (max-width: 760px) {
  /* Đầu: tiêu đề + nút đóng tròn ✕ 40px (chữ "Đóng" vẫn là tên nút cho trình đọc màn hình) */
  body.sales-shell dialog#salesProfileDialog > header { min-height:56px; padding:8px 8px 8px 16px; }
  body.sales-shell dialog#salesProfileDialog h2 { font-size:18px; font-weight:800; }
  body.sales-shell dialog#salesProfileDialog > header #profileClose { display:flex; align-items:center; justify-content:center; flex:0 0 40px; width:40px; height:40px; min-height:40px; padding:0; border:0; border-radius:50%; background:#FAF6EF; color:#25211C; font-size:0; }
  body.sales-shell dialog#salesProfileDialog > header #profileClose::before { content:"✕"; font-size:17px; font-weight:600; line-height:1; }
  body.sales-shell dialog#salesProfileDialog > header #profileClose:focus:not(:focus-visible) { outline:0; }
  /* Ảnh + tên */
  body.sales-shell dialog#salesProfileDialog .profile-meta { column-gap:14px; padding:16px 12px 0; border:0; }
  body.sales-shell dialog#salesProfileDialog .profile-identity-mark { width:56px; height:56px; font-size:20px; }
  body.sales-shell dialog#salesProfileDialog .profile-meta { grid-template-columns:56px minmax(0, 1fr); }
  body.sales-shell dialog#salesProfileDialog .profile-meta > strong { font-size:20px; font-weight:800; line-height:1.25; overflow-wrap:anywhere; }
  body.sales-shell dialog#salesProfileDialog .profile-meta > span:not(.profile-username):not(.profile-identity-mark) { font-size:13px; }
  /* Ô số: lưới 2 cột, số 20px/800 trên, nhãn 12px dưới; ô lẻ cuối kéo hết 2 cột */
  body.sales-shell dialog#salesProfileDialog .profile-stats { grid-template-columns:repeat(2, minmax(0, 1fr)); gap:8px; margin:14px 0 4px; }
  body.sales-shell dialog#salesProfileDialog .profile-stats > span { gap:2px; padding:12px; border-radius:12px; background:#FAF6EF; color:#6F655A; font-size:12px; line-height:16px; }
  body.sales-shell dialog#salesProfileDialog .profile-stats > span:last-child:nth-child(odd) { grid-column:1 / -1; }
  body.sales-shell dialog#salesProfileDialog .profile-stats strong { font-size:20px; font-weight:800; line-height:26px; font-variant-numeric:tabular-nums; }
  /* Tab gạch chân, cuộn ngang */
  body.sales-shell dialog#salesProfileDialog .profile-meta nav { gap:20px; margin:8px -12px 0; padding:0 12px; }
  body.sales-shell dialog#salesProfileDialog .profile-meta nav button { height:44px; min-height:44px; border:0; border-radius:0; background:none; box-shadow:none; color:#6F655A; font-size:14px; font-weight:600; }
  body.sales-shell dialog#salesProfileDialog .profile-meta nav button[aria-pressed=true] { box-shadow:inset 0 -2px 0 #9A6A2E; color:#25211C; }
  /* Nội dung tab: phẳng (không khung trong khung), tiêu đề tab không lặp lại */
  body.sales-shell dialog#salesProfileDialog .profile-columns { padding:12px 12px 24px; }
  body.sales-shell dialog#salesProfileDialog .profile-columns > form { padding:0; border:0; border-radius:0; background:none; }
  body.sales-shell dialog#salesProfileDialog .profile-columns > form > h3 { display:none; }
  body.sales-shell dialog#salesProfileDialog .profile-read-fields { margin:0 0 16px; }
  body.sales-shell dialog#salesProfileDialog .profile-read-fields > div { flex-direction:row; align-items:baseline; gap:12px; padding:12px 0; border-top:0; border-bottom:1px solid #EFE8DD; }
  body.sales-shell dialog#salesProfileDialog .profile-read-fields dt { flex:0 0 96px; color:#6F655A; font-size:13px; }
  body.sales-shell dialog#salesProfileDialog .profile-read-fields dd { flex:1 1 auto; min-width:0; font-size:15px; overflow-wrap:anywhere; }
  body.sales-shell dialog#salesProfileDialog .profile-security-summary { margin:0 0 16px; padding:14px 0; border-top:0; border-bottom:1px solid #EFE8DD; }
  /* Form sửa: 1 cột, nhãn trên ô, ô 46px */
  body.sales-shell dialog#salesProfileDialog .profile-fields { grid-template-columns:minmax(0, 1fr); gap:0; }
  body.sales-shell dialog#salesProfileDialog .profile-columns label { margin-bottom:14px; color:#6F655A; font-size:13px; font-weight:600; }
  body.sales-shell dialog#salesProfileDialog .profile-columns input:not([type=file]):not([type=checkbox]) { height:46px; min-height:46px; margin-top:6px; padding:0 12px; border-color:#E2D6C4; border-radius:12px; color:#25211C; font-size:16px; font-weight:400; }
  body.sales-shell dialog#salesProfileDialog .profile-columns input:not([type=file]):not([type=checkbox]):focus { border-color:#9A6A2E; box-shadow:0 0 0 3px #9A6A2E26; outline:0; }
  body.sales-shell dialog#salesProfileDialog .profile-columns input::placeholder { color:#9A8F82; opacity:1; }
  body.sales-shell dialog#salesProfileDialog .profile-photo { display:flex; align-items:center; gap:12px; margin:0 0 14px; }
  body.sales-shell dialog#salesProfileDialog .profile-photo img { flex:0 0 56px; width:56px; height:56px; }
  body.sales-shell dialog#salesProfileDialog .profile-photo label { flex:1 1 auto; min-width:0; margin:0; }
  body.sales-shell dialog#salesProfileDialog .profile-photo input[type=file] { display:block; width:100%; max-width:100%; min-height:46px; margin-top:6px; padding:5px; box-sizing:border-box; border:1px dashed #E2D6C4; border-radius:12px; background:#FAF6EF; color:#6F655A; font-size:14px; }
  body.sales-shell dialog#salesProfileDialog .profile-photo input[type=file]::file-selector-button { min-height:34px; margin-right:10px; padding:0 12px; border:1px solid #E2D6C4; border-radius:10px; background:#fff; color:#25211C; font:inherit; font-weight:600; }
  body.sales-shell dialog#salesProfileDialog .profile-columns .profile-check { display:flex; align-items:center; gap:10px; min-height:40px; margin:0 0 14px; color:#25211C; font-size:14px; font-weight:500; }
  body.sales-shell dialog#salesProfileDialog .profile-columns .profile-check input { width:20px; height:20px; accent-color:#9A6A2E; }
  body.sales-shell dialog#salesProfileDialog .profile-otp-card { gap:6px; margin:0 0 14px; padding:14px; border:0; border-radius:12px; background:#FAF6EF; }
  body.sales-shell dialog#salesProfileDialog .profile-otp-card button { min-height:40px; margin-top:6px; padding:0 14px; border:1px solid #E2D6C4; border-radius:10px; background:#fff; }
  body.sales-shell dialog#salesProfileDialog .profile-description { color:#6F655A; font-size:13px; line-height:1.5; }
  /* Nút: Hủy hẹp bên trái, nút lưu rộng bên phải */
  body.sales-shell dialog#salesProfileDialog .profile-editor { display:grid; grid-template-columns:96px minmax(0, 1fr); grid-auto-flow:row dense; column-gap:8px; }
  body.sales-shell dialog#salesProfileDialog .profile-editor > * { grid-column:1 / -1; min-width:0; }
  body.sales-shell dialog#salesProfileDialog .profile-editor > button[type=submit] { grid-column:2; width:100%; margin:4px 0 0; }
  body.sales-shell dialog#salesProfileDialog .profile-editor > .profile-cancel { grid-column:1; width:100%; margin:4px 0 0; padding:0; }
  body.sales-shell dialog#salesProfileDialog .profile-editor > button, body.sales-shell dialog#salesProfileDialog .profile-edit { min-height:46px; border-radius:12px; font-size:15px; }
  body.sales-shell dialog#salesProfileDialog .profile-cancel { border:1px solid #E2D6C4; background:#fff; color:#25211C; font-weight:600; }
  body.sales-shell dialog#salesProfileDialog .profile-editor > button[type=submit]:not(.primary) { border-color:#9A6A2E; background:#9A6A2E; color:#fff; font-weight:700; }
  /* Chữ ký */
  body.sales-shell dialog#salesProfileDialog .signature-actions { grid-template-columns:96px minmax(0, 1fr); }
  body.sales-shell dialog#salesProfileDialog .signature-actions button { min-height:46px; margin:0; border-radius:12px; font-size:15px; }
  /* Hợp đồng / Hội nhập */
  body.sales-shell dialog#salesProfileDialog .profile-hr-cards { gap:8px; }
  body.sales-shell dialog#salesProfileDialog .profile-hr-cards > div { min-width:0; padding:12px; border:0; border-radius:12px; background:#FAF6EF; overflow-wrap:anywhere; }
  body.sales-shell dialog#salesProfileDialog .profile-hr-list li { padding:12px; border-color:#E2D6C4; border-radius:12px; font-size:14px; }
  body.sales-shell dialog#salesProfileDialog .profile-hr-list li span { font-size:13px; }
  body.sales-shell dialog#salesProfileDialog .profile-hr-notes li { font-size:13px; }
  body.sales-shell dialog#salesProfileDialog .profile-hr-steps li { padding:10px 6px; font-size:12px; }
  body.sales-shell dialog#salesProfileDialog .profile-hr .btn-row button { width:100%; min-height:46px; border-radius:12px; }
  body.sales-shell dialog#salesProfileDialog #profileMessage { padding:10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); }
}

/* ===== MOBILE 11/2026 — ĐỢT 2: mật độ & căn chữ (docs/MOBILE-UI-SPEC.md "Đợt 2") ===== */
@media screen and (max-width: 760px) {
  body.sales-shell dialog#salesProfileDialog > header { min-height:52px; padding:6px 6px 6px 12px; }
  body.sales-shell dialog#salesProfileDialog .profile-meta { row-gap:0; padding:12px 12px 0; }
  body.sales-shell dialog#salesProfileDialog .profile-meta > strong { font-size:18px; line-height:1.25; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  body.sales-shell dialog#salesProfileDialog .profile-meta > span:not(.profile-identity-mark) { font-size:13px; line-height:1.35; }
  /* Dải số: một hộp, 3 cột ngăn kẻ mảnh */
  body.sales-shell dialog#salesProfileDialog .profile-stats { grid-template-columns:repeat(3, minmax(0, 1fr)); gap:0; margin:12px 0 0; overflow:hidden; border-radius:12px; background:#FAF6EF; }
  body.sales-shell dialog#salesProfileDialog .profile-stats > span { gap:0; padding:8px 12px; border-left:1px solid #EADFCF; border-radius:0; background:none; font-size:12px; font-weight:600; line-height:15px; text-wrap:balance; }
  body.sales-shell dialog#salesProfileDialog .profile-stats > span:first-child { border-left:0; }
  body.sales-shell dialog#salesProfileDialog .profile-stats > span:last-child:nth-child(odd) { grid-column:auto; }
  body.sales-shell dialog#salesProfileDialog .profile-stats strong { font-size:17px; line-height:22px; }
  body.sales-shell dialog#salesProfileDialog .profile-meta nav { margin-top:4px; }
  /* Nội dung tab */
  body.sales-shell dialog#salesProfileDialog .profile-columns { padding:10px 12px 16px; }
  body.sales-shell dialog#salesProfileDialog .profile-read-fields { margin:0 0 12px; }
  body.sales-shell dialog#salesProfileDialog .profile-read-fields > div { min-height:36px; box-sizing:border-box; padding:8px 0; }
  body.sales-shell dialog#salesProfileDialog .profile-read-fields dt { font-size:12px; font-weight:600; line-height:18px; }
  body.sales-shell dialog#salesProfileDialog .profile-read-fields dd { font-size:14px; font-weight:500; line-height:18px; }
  body.sales-shell dialog#salesProfileDialog .profile-security-summary { margin:0 0 12px; padding:8px 0; }
  body.sales-shell dialog#salesProfileDialog .profile-security-summary strong { font-size:14px; }
  body.sales-shell dialog#salesProfileDialog .profile-columns label { margin-bottom:10px; font-size:12px; line-height:16px; }
  body.sales-shell dialog#salesProfileDialog .profile-columns input:not([type=file]):not([type=checkbox]) { height:44px; min-height:44px; margin-top:4px; }
  body.sales-shell dialog#salesProfileDialog .profile-photo { margin:0 0 10px; }
  body.sales-shell dialog#salesProfileDialog .profile-photo input[type=file] { min-height:44px; margin-top:4px; }
  body.sales-shell dialog#salesProfileDialog .profile-columns .profile-check { min-height:36px; margin:0 0 8px; }
  body.sales-shell dialog#salesProfileDialog .profile-otp-card { gap:2px; margin:0 0 10px; padding:10px 12px; }
  body.sales-shell dialog#salesProfileDialog .profile-otp-card strong { font-size:14px; }
  body.sales-shell dialog#salesProfileDialog .profile-otp-card button { min-height:36px; margin-top:6px; }
  body.sales-shell dialog#salesProfileDialog .profile-description { margin:0 0 10px; line-height:1.35; text-wrap:pretty; }
  body.sales-shell dialog#salesProfileDialog .profile-editor > button, body.sales-shell dialog#salesProfileDialog .profile-edit { min-height:44px; }
  /* Hợp đồng / Hội nhập */
  body.sales-shell dialog#salesProfileDialog .profile-hr h4 { margin:14px 0 6px; font-size:15px; }
  body.sales-shell dialog#salesProfileDialog .profile-hr-cards { margin:0 0 8px; }
  body.sales-shell dialog#salesProfileDialog .profile-hr-cards > div { gap:1px; padding:8px 12px; }
  body.sales-shell dialog#salesProfileDialog .profile-hr-cards strong { font-size:14px; line-height:1.35; }
  body.sales-shell dialog#salesProfileDialog .profile-hr-notes { gap:4px; margin:0 0 8px; }
  body.sales-shell dialog#salesProfileDialog .profile-hr-notes li { padding:6px 10px; line-height:1.35; }
  /* Danh sách giấy tờ / lịch sử: một thẻ chung, ngăn kẻ mảnh */
  body.sales-shell dialog#salesProfileDialog .profile-hr-list { gap:0; overflow:hidden; border:1px solid #E2D6C4; border-radius:12px; }
  body.sales-shell dialog#salesProfileDialog .profile-hr-list li { gap:1px; padding:8px 12px; border:0; border-top:1px solid #EFE8DD; border-radius:0; line-height:1.35; }
  body.sales-shell dialog#salesProfileDialog .profile-hr-list li:first-child { border-top:0; }
  body.sales-shell dialog#salesProfileDialog .profile-hr-list li .sm, body.sales-shell dialog#salesProfileDialog .profile-hr-list li button { min-height:32px; margin-top:4px; }
  body.sales-shell dialog#salesProfileDialog .profile-hr-list li:has(> span > button) { grid-template-columns:minmax(0, 1fr) auto; align-items:center; column-gap:8px; }
  body.sales-shell dialog#salesProfileDialog .profile-hr-list li > span > button { margin:0; padding:0 10px; font-size:13px; }
  body.sales-shell dialog#salesProfileDialog .profile-hr-steps { gap:4px; margin:0 0 10px; }
  body.sales-shell dialog#salesProfileDialog .profile-hr-steps li { padding:6px; }
}
