/* ==========================================================================
   EVER Sales — giao diện bên trong theo CRM mới (crm.evervietnam.com, 10/2026):
   nền sáng, màu nhấn đồng #a9783a, viền mảnh, thanh đầu 44px + thanh biểu tượng 56px.
   Chỉ trang Sales tải file này (nạp cuối cùng, phủ lên workspace.css — trang Chuyên gia giữ nguyên).
   Trang đăng nhập không đổi.
   ========================================================================== */
@media screen {
  /* ---------- 1. Bộ màu (thay bộ màu tối của workspace.css) ---------- */
  body:has(#appView:not([hidden])) {
    color-scheme: light;
    --paper: #ffffff; --surface: #ffffff; --surface-2: #f7f7f8; --surface-3: #f0f0f2;
    /* Chữ phụ đậm gần đen, viền đậm hơn để rõ nét trên nền trắng (yêu cầu 03/10). */
    --ink: #000000; --ink-2: #050505; --muted: #111113; --muted-2: #1c1c20;
    --hair: #85858f; --hair-soft: #a3a3ac;
    --bronze: #a9783a; --bronze-deep: #8a5f2a; --bronze-lift: #c4955a; --bronze-wash: #f6efe5;
    --navy-900: #ffffff; --navy-800: #f7f7f8; --navy-700: #a9783a; --navy-600: #8a5f2a;
    --crit: #b3261e; --crit-wash: #fdecea; --high: #a2560b; --high-wash: #fdf1e3;
    --low: #1a4fc4; --low-wash: #e9effc; --normal: #15713f; --normal-wash: #e7f4ec;
    --info: #2563a5; --info-wash: #e9f1fa;
    --shadow-1: 0 1px 2px #18181b0d; --shadow-2: 0 4px 16px #18181b14; --shadow-3: 0 12px 40px #20202724;
    --sh-line: #a3a3ac; --sh-rail: #f0f0f2; --sh-bar: #f4efee; --sh-bar-line: #dcd3d1;
    --bar-h: 44px;
    background: #fff;
    color: var(--ink);
    font-weight: 500;
  }
  #appView ::placeholder, .overlay ::placeholder, dialog ::placeholder { color: #2a2a2e; opacity: 1; }
  #appView label, #appView .lbl, .overlay label, #appView small, #appView .muted, #appView .hub-sub { color: var(--muted); }

  /* ---------- 2. Thành phần dùng chung đang gắn cứng màu tối ---------- */
  #appView .panel, .overlay .modal { background: var(--surface); border-color: var(--hair); box-shadow: none; }
  #appView input, #appView select, #appView textarea, .overlay input, .overlay select, .overlay textarea,
  dialog input, dialog select, dialog textarea {
    background-color: #fff; border-color: #6e6e78; color: var(--ink);
  }
  #appView input:focus, #appView select:focus, #appView textarea:focus, .overlay input:focus, .overlay textarea:focus { border-color: var(--bronze); outline: none; box-shadow: 0 0 0 3px #a9783a1f; }
  #appView button, .overlay button, dialog button { background-color: #fff; border-color: #77777f; color: var(--ink-2); }
  #appView button:hover, .overlay button:hover, dialog button:hover { background-color: var(--surface-2); color: var(--ink); }
  #appView button.ghost, .overlay button.ghost { background: transparent; border-color: transparent; color: var(--bronze-deep); }
  #appView button.ghost:hover, .overlay button.ghost:hover { background: var(--bronze-wash); }
  #appView button.primary, #appView button.bronze, .overlay button.primary, .overlay button.bronze, dialog button.primary, dialog button.bronze {
    background: var(--bronze); border-color: var(--bronze); color: #fff;
  }
  #appView button.primary:hover, #appView button.bronze:hover, .overlay button.primary:hover, .overlay button.bronze:hover, dialog button.bronze:hover { background: var(--bronze-deep); border-color: var(--bronze-deep); color: #fff; }
  #appView button.danger, .overlay button.danger, dialog button.danger { background: var(--crit-wash); border-color: #f3c3be; color: var(--crit); }
  #appView button.danger:hover, .overlay button.danger:hover { background: #fbdcd8; }
  #appView th { background: var(--surface-2); color: #000; font-weight: 700; border-bottom: 1px solid var(--hair); }
  #appView td { border-color: var(--hair-soft); }
  #appView tbody tr:hover { background: #fafafa; }
  #appView .notice { border-color: var(--hair); }
  #appView #detailEmpty, #appView #caseEmpty { background: var(--surface-2); }
  #appView .pitem:hover { background: var(--surface-2); }
  #appView .pitem[aria-current="true"], #appView .pitem[aria-selected="true"] { background: var(--bronze-wash); border-color: #e3cfb4; box-shadow: inset 3px 0 var(--bronze); }
  #appView .patient-banner { background: #fbf8f4; border-color: #ece2d4; }
  #appView .tabs { background: var(--surface-2); border-color: var(--hair); }
  #appView .tab:hover { background: #fff; }
  #appView .tab[aria-selected="true"] { background: #fff; border-color: var(--hair); color: var(--bronze-deep); box-shadow: var(--shadow-1); }
  #appView .section-title { color: var(--bronze-deep); }
  .overlay { background: #18181b59; backdrop-filter: blur(2px); }
  .overlay .modal { border-color: var(--hair); }
  dialog { background: #fff; color: var(--ink); border-color: var(--hair); }
  dialog::backdrop { background: #18181b59 !important; }
  .toast.info { background: #29292d; color: #fff !important; border-color: #29292d; }
  :root .toast { color: #fff; }
  .nav-badge { color: #fff; }
  .wb-day[aria-pressed="true"], .wb-slot[aria-pressed="true"] { color: #fff; }
  .hr-menu, .mobile-menu, .notice-panel { background: #fff; border-color: var(--hair); box-shadow: var(--shadow-3); }
  .hub-table .hub-create-medical:hover:not(:disabled) { color: #fff; }
  .ttyt-nav button[aria-pressed="true"] { background: var(--bronze); color: #fff; }
  .sent-record-nav .sent-record-advice, .sent-record-nav .sent-record-advice[aria-pressed="true"] { color: #fff; box-shadow: none; }
  .care-view { background: var(--surface-2); }
  .ttyt-card { background: var(--surface-2); }
  .lab-latest { color: var(--normal); }
  .cp-dialog { background: #fff; color: var(--ink); border-color: var(--hair); }
  .cp-steps li.is-done::before { color: #fff; }

  /* Trang cá nhân (hộp thoại) */
  #salesProfileDialog { background: #fff; color: var(--ink); box-shadow: var(--shadow-3); }
  #salesProfileDialog > header { background: #fbf8f4; }
  #salesProfileDialog .profile-photo input::file-selector-button { background: var(--bronze-wash); color: var(--bronze-deep); border-color: #e3cfb4; }
  #salesProfileDialog::backdrop { background: #18181b59; }
  #salesProfileDialog .profile-meta { background: var(--surface-2); }
  #salesProfileDialog .profile-identity-mark { background: var(--bronze); border-color: var(--bronze); color: #fff; }
  #salesProfileDialog .profile-meta strong { color: var(--ink); }
  #salesProfileDialog .profile-meta nav button { background: transparent; border-color: transparent; color: var(--ink-2); }
  #salesProfileDialog .profile-meta nav button:hover { background: #ececef; color: var(--ink); }
  #salesProfileDialog .profile-meta nav button[aria-pressed=true] { background: #fff; border-color: var(--hair); color: var(--bronze-deep); box-shadow: var(--shadow-1); }
  #salesProfileDialog .profile-photo, #salesProfileDialog .profile-otp-card, #salesProfileDialog #profileMessage, #salesProfileDialog .profile-security-summary { background: var(--surface-2); }

  /* Zalo Sales / hộp thư Zalo */
  .ld-tabs { background: var(--surface-2); border-color: var(--hair); }
  .ld-tabs button[aria-selected="true"] { background: #fff; border-color: var(--hair); color: var(--bronze-deep); box-shadow: var(--shadow-1); }
  .ld-card { box-shadow: inset 0 3px #d4d4d8; }
  .ld-card:hover { background: #fafafa; border-color: #e3cfb4; }
  .ld-card.s-online { box-shadow: inset 0 3px var(--normal); }
  .ld-card.s-offline, .ld-card.s-qr_pending { box-shadow: inset 0 3px var(--high); }
  .ld-card.s-expired, .ld-card.s-banned { box-shadow: inset 0 3px var(--crit); }
  .ld-account { background: #fbf8f4; border-color: #ece2d4; }
  .ld-emergency { background: var(--crit-wash); border-color: #f3c3be; color: #7a1a14; }
  .ld-emergency strong { color: var(--crit); }
  .ld-alerts button:hover, .ld-conv:hover, .zin-note-open:hover { background: var(--surface-2); }
  .ld-conv[aria-current="true"] { background: var(--bronze-wash); border-color: #e3cfb4; box-shadow: inset 3px 0 var(--bronze); }
  .ld-msg.in .ld-bubble { background: var(--surface-3); color: var(--ink); }
  .ld-msg.out .ld-bubble { background: #f1e4d2; color: #2b1d0c; }
  .ld-msg.by-leader .ld-bubble { box-shadow: inset 0 0 0 1px #d9a35b; }
  .ld-msg-type { background: #0000000f; }
  .zquote { background: #0000000a; }
  .zav { background-color: #efe4d4; color: var(--bronze-deep); border-color: #e3cfb4; }
  .zst-grid button:hover, .zst-emoji button:hover { background: var(--surface-2); }
  .ld-kpi.is-alert { border-color: #f1d3a8; }
  .ld-by-leader { color: #a2560b; }

  /* ---------- Trang chủ (11/2026, như CRM): lời chào + tháng này + việc cần làm + truy cập nhanh; cột phải tài khoản ---------- */
  #appView .sh-home { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; max-width: 1088px; margin: 0 auto; padding: 20px clamp(0px, 4vw, 64px) 48px; box-sizing: border-box; color: #25211C; }
  #appView .shh-main { flex: 999 1 560px; max-width: 720px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
  #appView .shh-side { flex: 1 1 280px; max-width: 320px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
  #appView .shh-hero { display: flex; flex-direction: column; gap: 6px; padding: 30px 28px; border-radius: 20px; background: linear-gradient(115deg, #2B2118 0%, #4A3524 55%, #7A5634 100%); color: #FBF3E6; }
  #appView .shh-date { font-size: 13px; color: #E9D9C2; }
  #appView .shh-hero h1 { margin: 0; color: #FBF3E6; font-size: 28px; font-weight: 800; letter-spacing: -.4px; line-height: 1.25; }
  #appView .shh-summary { margin: 0; min-height: 22px; color: #FBF3E6; font-size: 15px; }
  #appView .shh-summary strong { color: #fff; }
  #appView .shh-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
  #appView .shh-act { display: inline-flex; align-items: center; gap: 8px; height: 40px; min-height: 40px; padding: 0 16px; border: 1px solid rgba(255, 255, 255, .28); border-radius: 10px; background: rgba(255, 255, 255, .12); color: #FBF3E6; font-size: 14px; font-weight: 700; box-shadow: none; }
  #appView .shh-act:hover { background: rgba(255, 255, 255, .2); color: #fff; }
  #appView .shh-act.is-primary { border-color: #F3DFC1; background: #F3DFC1; color: #25211C; }
  #appView .shh-act.is-primary:hover { background: #fff; color: #25211C; }
  #appView .shh-act .shell-ico, #appView .shh-act svg { width: 16px; height: 16px; flex: 0 0 16px; }
  #appView .sh-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
  #appView .sh-sec-head h2 { margin: 0; color: #25211C; font-size: 16px; font-weight: 700; letter-spacing: 0; }
  #appView .shh-stats, #appView .shh-quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
  #appView .shh-stat { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 14px 16px; border: 1px solid #E4DACA; border-radius: 16px; background: #fff; }
  #appView .shh-stat-label { display: flex; align-items: center; gap: 6px; color: #6F655A; font-size: 12px; font-weight: 600; }
  #appView .shh-stat-label svg { width: 14px; height: 14px; flex: 0 0 14px; }
  #appView .shh-stat-val { color: #6F655A; font-size: 13px; }
  #appView .shh-stat-val strong { color: #25211C; font-size: 26px; font-weight: 800; line-height: 1.1; }
  #appView .shh-stat-sub { min-height: 16px; color: #6F655A; font-size: 12px; }
  #appView .shh-stat-sub.is-warn { color: #9B2F23; font-weight: 600; }
  #appView .sh-list { border: 1px solid #E4DACA; border-radius: 16px; overflow: hidden; background: #fff; }
  #appView .sh-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-top: 1px solid #EFE9DD; }
  #appView .sh-row:first-child { border-top: 0; }
  #appView .sh-row-ico { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; background: #FBF6ED; color: #946A2B; }
  #appView .sh-row.is-warn .sh-row-ico { background: #FBE7E5; color: #9B2F23; }
  #appView .sh-row-ico svg { width: 20px; height: 20px; }
  #appView .sh-row-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  #appView .sh-row-text strong { color: #25211C; font-size: 14px; font-weight: 700; }
  #appView .sh-row-text > span { color: #6F655A; font-size: 13px; }
  #appView .sh-row-tag { font-weight: 600; }
  #appView .sh-row.is-warn .sh-row-tag { color: #9B2F23; }
  #appView .sh-row-btn { flex: 0 0 auto; height: 34px; min-height: 34px; padding: 0 16px; border: 0; border-radius: 10px; background: #9A6A2E; color: #fff; font-size: 14px; font-weight: 700; box-shadow: none; }
  #appView .sh-row-btn:hover { background: #7E5523; color: #fff; }
  #appView .sh-list-empty { padding: 16px; color: #6F655A; font-size: 14px; }
  #appView .shh-qcard { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 4px; min-height: 128px; padding: 16px; box-sizing: border-box; border: 1px solid #E4DACA; border-radius: 16px; background: #fff; color: #25211C; text-align: left; box-shadow: none; }
  #appView .shh-qcard:hover, #appView .shk-card:hover { border-color: #B89F7E; background: #fff; }
  #appView .shh-qcard strong { margin-top: auto; font-size: 14px; font-weight: 700; }
  #appView .shk-metric { min-height: 16px; color: #8A5F27; font-size: 12px; font-weight: 600; }
  #appView .shk-ico { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; border-radius: 10px; background: #FBF6ED; color: #946A2B; }
  #appView .shk-ico svg { width: 20px; height: 20px; }
  #appView .shh-account { display: flex; align-items: center; gap: 12px; }
  #appView .shh-account .shell-avatar.is-static { display: grid; place-items: center; flex: 0 0 56px; width: 56px; height: 56px; border: 1px solid #E4DACA; border-radius: 50%; overflow: hidden; background: #FAF1E1; color: #8A5F27; font-family: 'Cormorant Garamond', Georgia, serif; font-size: 22px; font-weight: 600; }
  #appView .shh-acc-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
  #appView .shh-acc-text strong { color: #25211C; font-size: 14px; font-weight: 700; }
  #appView .shh-acc-text small { color: #6F655A; font-size: 13px; }
  #appView .sh-link, .sh-panel .sh-link { min-height: 0; height: auto; padding: 4px 0; border: 0; background: transparent; color: #8A5F27; font-size: 13px; font-weight: 600; box-shadow: none; }
  #appView .sh-link:hover, .sh-panel .sh-link:hover { background: transparent; color: #6E4A1C; text-decoration: underline; }
  #appView .sh-link.is-muted { color: #6F655A; font-size: 12px; font-weight: 500; }
  #appView .sh-box { padding: 16px; border: 1px solid #E4DACA; border-radius: 16px; background: #fff; }
  #appView .sh-box > h2, #appView .sh-box .sh-sec-head h2 { margin: 0 0 6px; color: #25211C; font-size: 15px; font-weight: 700; }
  #appView .sh-box .sh-sec-head { margin-bottom: 6px; }
  #appView .sh-mini { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
  #appView .sh-mini-ico { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; background: #FBF6ED; color: #946A2B; }
  #appView .sh-mini-ico svg { width: 18px; height: 18px; }
  #appView .sh-mini-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
  #appView .sh-mini-text strong { color: #25211C; font-size: 14px; font-weight: 700; }
  #appView .sh-mini-text small { color: #6F655A; font-size: 12px; }
  #appView .sh-date-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 0 0 40px; width: 40px; height: 44px; border-radius: 10px; background: #FBF6ED; line-height: 1.1; }
  #appView .sh-date-tile strong { color: #25211C; font-size: 15px; }
  #appView .sh-date-tile small { color: #6F655A; font-size: 10px; }
  #appView .shh-foot { color: #6F655A; font-size: 12px; }

  /* Trang khu (Khách hàng, Báo cáo, Hành chính): thẻ chức năng có số liệu + cột phải "Cần xử lý" */
  #appView .shk { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; padding: 12px clamp(0px, 3vw, 48px) 48px; color: #25211C; }
  #appView .shk-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
  #appView .shk-title { margin: 0; color: #25211C; font-size: 24px; font-weight: 700; letter-spacing: -.3px; }
  #appView .shk-group h2 { margin: 0 0 12px; color: #25211C; font-size: 16px; font-weight: 700; }
  #appView .shk-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
  #appView .shk-card { display: flex; align-items: center; justify-content: flex-start; gap: 14px; min-height: 84px; padding: 16px; box-sizing: border-box; border: 1px solid #E4DACA; border-radius: 16px; background: #fff; color: #25211C; text-align: left; box-shadow: none; }
  #appView .shk-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
  #appView .shk-text strong { font-size: 15px; font-weight: 700; }
  #appView .shk-text .shk-metric { font-size: 13px; }
  #appView .shk-side { flex: 1 1 280px; max-width: 320px; min-width: 0; padding-top: 52px; }
  @media (max-width: 760px) {
    #appView .sh-home, #appView .shk { gap: 24px; padding: 8px 0 32px; }
    #appView .shh-hero { padding: 22px 18px; }
    #appView .shh-hero h1 { font-size: 22px; }
    #appView .shk-side { padding-top: 0; }
  }

  /* ---------- 3. Khung CRM cho màn hình rộng (≥ 901px): menu trái 72px, rê chuột bung 244px, không có thanh đầu ---------- */
  @media (min-width: 901px) {
    body.sales-shell:has(#appView:not([hidden])) { --bar-h: 0px; }
    body.sales-shell #appView { padding-top: 0; }
    body.sales-shell #appView .appbar { position: static; height: 0; min-height: 0; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; overflow: visible; backdrop-filter: none; }
    body.sales-shell #appView .appbar > :not(.workspace-nav):not(.nt-wrap) { display: none !important; }
    body.sales-shell #appView .appbar .nt-wrap > .notice-btn { display: none !important; }

    body.sales-shell #appView .workspace-nav {
      position: fixed; z-index: 55; top: 0; left: 0; bottom: 0; width: 72px; max-width: none; margin: 0; padding: 20px 12px 16px; box-sizing: border-box;
      display: flex; flex-direction: column; align-items: stretch; gap: clamp(2px, calc(1.4vh - 4px), 10px);
      background: #FAF6EF; border-right: 1px solid #EDE4D6; overflow: hidden auto; scrollbar-width: none; transition: width .16s ease, box-shadow .16s ease;
    }
    body.sales-shell #appView .workspace-nav::-webkit-scrollbar { display: none; }
    body.sales-shell:not(.sh-panel-open):not(:has(#noticePanel:not([hidden]))):not(:has(#shellAccount:not([hidden]))) #appView .workspace-nav:is(:hover, :has(:focus-visible)) { width: 244px; box-shadow: 4px 0 24px #392e221f; }
    body.sales-shell #appView .workspace-nav > button,
    body.sales-shell #appView .workspace-nav > .hr-wrap > #hrNav {
      position: relative; display: flex; align-items: center; justify-content: flex-start; gap: 16px; flex-shrink: 0; width: 100%; height: 48px; min-height: 48px;
      margin: 0; padding: 0 11px; border: 0; border-radius: 10px; background: transparent; color: #25211C; box-shadow: none;
      font-size: 16px; font-weight: 400; line-height: 1.2; text-align: left; white-space: nowrap; overflow: visible; cursor: pointer;
    }
    body.sales-shell #appView .workspace-nav > .hr-wrap { display: block; position: static; width: 100%; flex-shrink: 0; }
    body.sales-shell #appView .workspace-nav > button:hover,
    body.sales-shell #appView .workspace-nav > .hr-wrap > #hrNav:hover { background: #F5F0E8; color: #25211C; }
    body.sales-shell #appView .workspace-nav > button[aria-pressed="true"],
    body.sales-shell #appView .workspace-nav > .hr-wrap > #hrNav[aria-pressed="true"],
    body.sales-shell.sh-panel-open #appView #shSearchNav,
    body.sales-shell:has(#noticePanel:not([hidden])) #appView #shNotifNav,
    body.sales-shell #appView #shMoreNav[aria-expanded="true"] { background: #EFE2CC; color: #6E4A1C; font-weight: 700; }
    /* Đang mở khung trượt / Xem thêm: chỉ mục đó sáng. */
    body.sales-shell:is(.sh-panel-open, :has(#noticePanel:not([hidden])), :has(#shellAccount:not([hidden]))) #appView .workspace-nav :is(button[aria-pressed="true"], #hrNav[aria-pressed="true"]) { background: transparent; color: #25211C; font-weight: 400; }
    body.sales-shell #appView .workspace-nav :is(button, #hrNav) > .shell-ico { flex: 0 0 26px; width: 26px; height: 24px; }
    body.sales-shell #appView .workspace-nav :is(button[aria-pressed="true"], #hrNav[aria-pressed="true"]) > .shell-ico { color: #8A5F27; }
    body.sales-shell #appView .workspace-nav .nav-label { position: static; width: auto; height: auto; overflow: hidden; clip: auto; min-width: 0; text-overflow: ellipsis; opacity: 0; transition: opacity .12s ease; }
    body.sales-shell:not(.sh-panel-open) #appView .workspace-nav:is(:hover, :has(:focus-visible)) .nav-label { opacity: 1; transition-delay: .05s; }
    body.sales-shell #appView .workspace-nav .nav-badge {
      position: absolute; top: 4px; left: 26px; right: auto; min-width: 18px; height: 18px; margin: 0; padding: 0 5px; box-sizing: border-box;
      border: 2px solid #FAF6EF; border-radius: 9px; background: #C2362B; color: #fff; font-size: 10px; font-weight: 700; line-height: 14px; text-align: center;
    }
    body.sales-shell #appView .workspace-nav > .sh-grouped,
    body.sales-shell #appView #hrMenu { display: none !important; }
    /* Thứ tự như CRM: logo · Trang chủ · Tìm kiếm · Khách hàng · Lịch hẹn · Phiếu ĐKDV · Check-in · Báo cáo · Đại lý & CTV · Zalo · Hành chính · Thông báo · Cá nhân · Xem thêm */
    body.sales-shell #appView .workspace-nav > * { order: 20; }
    body.sales-shell #appView #shLogo { order: 0; }
    body.sales-shell #appView #homeNav { order: 1; margin-top: auto; }
    body.sales-shell #appView #shSearchNav { order: 2; }
    body.sales-shell #appView #custNav { order: 3; }
    body.sales-shell #appView #bookingsNav { order: 4; }
    body.sales-shell #appView #dkdvNav { order: 5; }
    body.sales-shell #appView #checkinsNav { order: 6; }
    body.sales-shell #appView #repNav, body.sales-shell #appView #reportsNav { order: 7; }
    body.sales-shell #appView #partnersNav { order: 8; }
    body.sales-shell #appView #zaloNav, body.sales-shell #appView #zaloInboxNav { order: 9; }
    body.sales-shell #appView .workspace-nav > .hr-wrap { order: 10; }
    body.sales-shell #appView #shNotifNav { order: 11; }
    body.sales-shell #appView #shMeNav { order: 12; margin-bottom: auto; }
    body.sales-shell #appView #shMoreNav { order: 13; }
    body.sales-shell #appView #shLogo { height: 48px; min-height: 48px; margin-bottom: 8px; padding: 0 11px; color: #25211C; font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 600; }
    body.sales-shell #appView #shLogo:hover { background: transparent; }
    body.sales-shell #appView #shLogo .sh-mono { display: inline-block; width: 26px; font-size: 30px; text-align: center; }
    body.sales-shell #appView #shLogo .sh-word { display: none; font-size: 26px; letter-spacing: 2px; }
    body.sales-shell:not(.sh-panel-open) #appView .workspace-nav:is(:hover, :has(:focus-visible)) #shLogo .sh-mono { display: none; }
    body.sales-shell:not(.sh-panel-open) #appView .workspace-nav:is(:hover, :has(:focus-visible)) #shLogo .sh-word { display: inline; }
    body.sales-shell #appView #shMeNav .shell-avatar { display: grid; place-items: center; flex: 0 0 26px; width: 26px; height: 26px; box-sizing: border-box; border: 1.5px solid currentColor; border-radius: 50%; overflow: hidden; background: transparent; font-size: 9px; font-weight: 700; }
    body.sales-shell .shell-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }

    /* Nội dung nằm cạnh menu 72px, nền trắng phẳng */
    body.sales-shell #customerWorkspace,
    body.sales-shell #workWorkspace,
    body.sales-shell #medicalWorkspace { margin-left: 72px; }
    body.sales-shell #customerWorkspace, body.sales-shell #workWorkspace { padding-top: 24px; }
    body.sales-shell #appView .shell { padding-top: 24px; }

    /* Khung trượt Thông báo / Tìm kiếm: 397px cạnh menu */
    body.sales-shell .notice-panel, body.sales-shell .sh-panel {
      position: fixed !important; top: 0 !important; bottom: 0 !important; left: 72px !important; right: auto !important; z-index: 58;
      width: 397px !important; max-width: calc(100vw - 72px); max-height: none !important; margin: 0 !important; padding: 24px 0 16px !important; box-sizing: border-box;
      display: flex; flex-direction: column; gap: 12px; overflow: hidden auto;
      background: #fff; color: #25211C; border: 0 !important; border-right: 1px solid #EFE9DD !important; border-radius: 0 16px 16px 0 !important; box-shadow: 4px 0 24px #392e221f !important;
    }
    body.sales-shell .notice-panel[hidden], body.sales-shell .sh-panel[hidden] { display: none !important; }
  }

  /* Khung Tìm kiếm (chỉ màn rộng có nút mở) */
  .sh-panel-head h2 { margin: 0; padding: 0 24px; color: #25211C; font-size: 24px; font-weight: 700; letter-spacing: -.3px; }
  .shs-field { display: flex; align-items: center; gap: 8px; margin: 4px 24px 8px; height: 40px; padding: 0 14px; box-sizing: border-box; border: 1px solid #E4DACA; border-radius: 20px; color: #6F655A; background: #fff; }
  .shs-field:focus-within { border-color: #9A6A2E; }
  .shs-field input { flex: 1 1 auto; min-width: 0; height: 36px; padding: 0 !important; border: 0 !important; outline: 0; background: transparent !important; box-shadow: none !important; color: #25211C; font: inherit; font-size: 14px; }
  .shs-results { display: flex; flex-direction: column; padding: 0 12px; }
  .shs-results .sh-sec-head { display: flex; align-items: baseline; justify-content: space-between; margin: 8px 12px 4px; }
  .shs-results .sh-sec-head h3 { margin: 0; color: #25211C; font-size: 15px; font-weight: 700; }
  .shs-results .sh-list-empty { padding: 12px; color: #6F655A; font-size: 14px; }
  .shs-item { display: flex; align-items: center; justify-content: flex-start !important; gap: 12px; width: 100%; min-height: 56px; padding: 8px 12px; border: 0 !important; border-radius: 10px; background: transparent !important; color: #25211C !important; text-align: left; box-shadow: none !important; cursor: pointer; }
  .shs-item:hover, .shs-item:focus-visible { background: #F5F0E8 !important; }
  .shs-ico { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%; background: #FBF6ED; color: #946A2B; }
  .shs-ico svg { width: 20px; height: 20px; }
  .shs-ico .shell-avatar.sm { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #FAF1E1; color: #8A5F27; font-family: 'Cormorant Garamond', Georgia, serif; font-size: 18px; font-weight: 600; }
  .shs-text { display: flex; flex-direction: column; min-width: 0; }
  .shs-text strong { font-size: 14px; font-weight: 700; }
  .shs-text small { color: #6F655A; font-size: 12px; }
  .sh-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

  /* Thông báo trong khung trượt: tiêu đề lớn, chip lọc, nhóm theo thời gian */
  @media (min-width: 901px) {
    body.sales-shell .notice-panel .nt-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 24px; border: 0; }
    body.sales-shell .notice-panel .nt-head strong { color: #25211C; font-size: 24px; font-weight: 700; letter-spacing: -.3px; }
    body.sales-shell .notice-panel .nt-head .linklike, body.sales-shell .notice-panel .nt-desktop { color: #8A5F27; font-size: 13px; font-weight: 600; }
    body.sales-shell .notice-panel .nt-desktop { margin: 0 24px; text-align: left; }
    body.sales-shell .notice-panel .nt-list { margin: 0; padding: 0 12px; max-height: none; list-style: none; }
    body.sales-shell .notice-panel .nt-item { display: flex; align-items: flex-start; gap: 12px; width: 100%; min-height: 64px; padding: 10px 12px; border: 0; border-radius: 10px; background: transparent; text-align: left; }
    body.sales-shell .notice-panel .nt-item:hover { background: #F5F0E8; }
    body.sales-shell .notice-panel .nt-item.is-unread { background: #FBF6ED; }
    body.sales-shell .notice-panel .nt-body strong { color: #25211C; font-size: 14px; font-weight: 700; }
    body.sales-shell .notice-panel .nt-body span, body.sales-shell .notice-panel .nt-body small { color: #6F655A; }
    body.sales-shell .notice-panel .nt-empty { margin: 0 24px; }
  }
  .nt-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 24px; }
  .nt-chips button { height: 34px; min-height: 34px; padding: 0 14px; border: 1px solid #E4DACA !important; border-radius: 17px; background: #fff !important; color: #25211C !important; font-size: 13px; font-weight: 600; box-shadow: none !important; }
  .nt-chips button[aria-pressed="true"] { border-color: #EFE2CC !important; background: #EFE2CC !important; color: #6E4A1C !important; }
  .nt-group { margin: 8px 24px 2px; color: #25211C; font-size: 15px; font-weight: 700; }

  /* Xem thêm: menu nổi trên nút ≡ ở đáy menu */
  body.sales-shell .shell-account {
    position: fixed; z-index: 65; left: 12px; bottom: 72px; width: 266px; padding: 8px; box-sizing: border-box;
    background: #fff; color: #25211C; border: 1px solid #EFE9DD; border-radius: 16px; box-shadow: 0 8px 24px #392e221f;
  }
  body.sales-shell .shell-account-head { display: flex; align-items: center; gap: 10px; padding: 10px 8px 12px; }
  body.sales-shell .shell-account-head .shell-avatar.is-static { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; border: 1px solid #E4DACA; border-radius: 50%; overflow: hidden; background: #FAF1E1; color: #8A5F27; font-size: 14px; font-weight: 700; }
  body.sales-shell .shell-account-head strong { display: block; font-size: 14px; font-weight: 700; line-height: 1.4; }
  body.sales-shell .shell-account-head small { display: block; color: #6F655A; font-size: 12px; }
  body.sales-shell .shell-account-divider { height: 1px; margin: 6px 8px; background: #EFE9DD; }
  body.sales-shell .shell-account button[role="menuitem"] {
    display: flex; align-items: center; justify-content: flex-start; gap: 12px; width: 100%; min-height: 42px; padding: 10px; border: 0; border-radius: 10px;
    background: transparent; color: #25211C; font-size: 14px; font-weight: 500; text-align: left; box-shadow: none;
  }
  body.sales-shell .shell-account button[role="menuitem"]:hover, body.sales-shell .shell-account button[role="menuitem"]:focus-visible { background: #F5F0E8; }
  body.sales-shell .shell-account button[role="menuitem"] svg { width: 20px; height: 20px; flex: 0 0 20px; }

  /* Màn hẹp: giữ menu ⋮ như cũ, chỉ đổi sang nền sáng; ẩn các mục của khung mới */
  @media (max-width: 900px) {
    body.sales-shell .sh-tool, body.sales-shell .sh-khu, body.sales-shell .sh-logo, body.sales-shell .shell-account { display: none !important; }
    body.sales-shell #appView .appbar { background: var(--sh-bar); border-bottom: 1px solid var(--sh-bar-line); color: #000; backdrop-filter: none; }
    body.sales-shell #appView .appbar .who { color: var(--ink-2); }
    body.sales-shell #appView .appbar .avatar { background: var(--bronze); color: #fff; border: 0; }
    body.sales-shell #appView .appbar .mobile-menu-btn, body.sales-shell #appView .appbar .notice-btn { background: transparent; border-color: transparent; color: #000; }
  }
}
/* ---------- Lớp chung theo CRM mới (11/2026, docs/SALES-DESKTOP-UI-SYNC.md): thẻ phẳng viền #E4DACA, đầu màn một dòng,
   bảng đầu nền #FAF7F2 chữ thường, ô số thành dải tóm tắt, nút đặc #9A6A2E. Thay lớp "có hồn" 03/10. ---------- */
@media screen {
  body:has(#appView:not([hidden])) {
    --card-line: #E4DACA; --card-shadow: none; --warm: #FAF7F2; --warm-line: #EFE9DD;
    --ui-ink: #25211C; --ui-muted: #6F655A; --ui-line: #E4DACA; --ui-hair: #EFE9DD; --ui-solid: #9A6A2E; --ui-solid-hover: #7E5523; --ui-link: #8A5F27;
    --ui-pill: #EFE2CC; --ui-pill-ink: #6E4A1C; --ui-soft: #FAF7F2; --ui-hover: #FAF1E1;
  }
  /* Nút đặc / viền */
  #appView button.primary, #appView button.bronze, .overlay button.primary, .overlay button.bronze, dialog button.primary, dialog button.bronze { background: var(--ui-solid); border-color: var(--ui-solid); color: #fff; }
  #appView button.primary:hover, #appView button.bronze:hover, .overlay button.primary:hover, .overlay button.bronze:hover, dialog button.primary:hover, dialog button.bronze:hover { background: var(--ui-solid-hover); border-color: var(--ui-solid-hover); color: #fff; }
  #appView button:not(.primary):not(.bronze):not(.ghost):not(.danger):not(.linklike):not([class*="sh-"]):not([class*="shh-"]):not([class*="shk-"]) { border-color: var(--ui-line); }
  #appView input, #appView select, #appView textarea, .overlay input, .overlay select, .overlay textarea, dialog input, dialog select, dialog textarea { border-color: var(--ui-line); }
  #appView input:focus, #appView select:focus, #appView textarea:focus, .overlay input:focus, .overlay select:focus, .overlay textarea:focus, dialog input:focus, dialog select:focus, dialog textarea:focus { border-color: var(--ui-solid); box-shadow: 0 0 0 3px #9a6a2e1f; }
  /* Đầu màn: một dòng, không khung, không vạch đồng */
  #appView .hub-heading, #appView .ld-head { position: relative; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
  #appView .hub-heading::before, #appView .ld-head::before { content: none; }
  #appView .hub-heading h1 { color: var(--ui-ink); font-size: 24px; font-weight: 700; letter-spacing: -.3px; line-height: 1.3; }
  #appView .hub-heading .hub-sub { color: var(--ui-muted); font-size: 13px; }
  /* Thẻ */
  #appView .hub-card { border: 1px solid var(--ui-line); border-radius: 16px; box-shadow: none; background: #fff; }
  #appView .hub-card > h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding-bottom: 0; border-bottom: 0; color: var(--ui-ink); font-size: 16px; font-weight: 700; }
  #appView .hub-card > h2::before { content: none; }
  /* Ô số liệu → dải tóm tắt một dòng (màn nghiệp vụ, như CRM) */
  #appView .hub-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 0; min-height: 48px; padding: 6px 4px; border: 0; border-radius: 12px; background: var(--ui-soft); }
  #appView .hub-stat { position: static; display: flex; align-items: baseline; gap: 6px; min-height: 0; padding: 6px 16px; overflow: visible; border: 0; border-left: 1px solid var(--ui-hair); border-radius: 0; background: none; box-shadow: none; }
  #appView .hub-stat:first-child { border-left: 0; }
  #appView .hub-stat::before { content: none; }
  #appView .hub-stat span { color: var(--ui-muted); font-size: 13px; font-weight: 500; text-transform: none; letter-spacing: 0; }
  #appView .hub-stat strong { color: var(--ui-ink); font-size: 15px; font-weight: 700; }
  #appView .hub-stat:nth-child(2) strong { color: #1F5E2E; }
  #appView .hub-stat:nth-child(3) strong { color: #8A4B0C; }
  /* Khung danh sách / panel */
  #appView #customerWorkspace > section.panel, #appView #customerWorkspace .panel, #appView .panel { border: 1px solid var(--ui-line); border-radius: 16px; box-shadow: none; }
  #appView .panel > .panel-head:not(.lab-file-head):not(.care-file-head):not(.ttyt-head) { position: relative; padding-left: 16px; border-radius: 15px 15px 0 0; background: #fff; border-bottom: 1px solid var(--ui-hair); color: var(--ui-ink); font-weight: 700; }
  #appView .panel > .panel-head:not(.lab-file-head):not(.care-file-head):not(.ttyt-head)::before { content: none; }
  #appView .shell > aside.panel > .panel-head { padding-left: 16px; }
  #appView .panel.lab-file, #appView .panel.care-file, #appView .panel.ttyt-saved { border-top: 1px solid var(--ui-line); }
  #appView .lab-file-head, #appView .care-file-head, #appView .ttyt-head { background: #fff; border-radius: 15px 15px 0 0; }
  #appView #detailEmpty, #appView #caseEmpty { box-shadow: none; border-color: var(--ui-line); background: var(--ui-soft); }
  #appView .ld-kpi, #appView .ld-card { border-color: var(--ui-line); border-radius: 16px; box-shadow: none; background: #fff; }
  #appView .ld-card, #appView .ld-card.s-online, #appView .ld-card.s-offline, #appView .ld-card.s-qr_pending, #appView .ld-card.s-expired, #appView .ld-card.s-banned { box-shadow: none; }
  #appView .rq-tabs { border-color: var(--ui-line); background: var(--ui-soft); }
  #appView .hub-card label, #appView .hub-card .lbl { color: var(--ui-ink); font-weight: 600; font-size: 13px; }
  #appView .ci-photo { border: 1.5px dashed var(--ui-line); background: var(--ui-soft); }
  #appView .hub-card .wb-list { display: grid; gap: 0; }
  #appView .hub-card .wb-item { padding: 12px 4px; border: 0; border-top: 1px solid var(--ui-hair); border-radius: 0; background: none; }
  #appView .hub-card .wb-item:first-child { border-top: 0; }
  #appView .hub-card .wb-item:hover { border-color: var(--ui-hair); box-shadow: none; background: none; }
  #appView .wb-item span:not(.tag), #appView .wb-item small { color: var(--ui-muted); }
  #appView .wb-item a.button, #appView .wb-item .button { border-color: var(--ui-line); background: #fff; }
  /* Bảng: đầu nền nhạt, chữ thường, kẻ dòng mảnh */
  #appView th, #appView .hub-table th { background: var(--ui-soft); color: var(--ui-muted); font-size: 13px; font-weight: 600; text-transform: none; letter-spacing: 0; border-bottom: 1px solid var(--ui-hair); }
  #appView td, #appView .hub-table td { border-color: var(--ui-hair); }
  #appView .hub-table td { border-top-color: var(--ui-hair); }
  #appView tbody tr:hover { background: var(--ui-hover); }
  #appView .hub-table-wrap, #appView .tbl-wrap { border-color: var(--ui-line); border-radius: 16px; }
  /* Chip trạng thái */
  #appView .tag { border-radius: 12px; font-weight: 600; text-transform: none; letter-spacing: 0; }
  #appView .tag.warn { background: #FFF2E0; color: #8A4B0C; border: 0; }
  #appView .tag.ok { background: #E6F2E8; color: #1F5E2E; border: 0; }
  /* Tab chung (Hồ sơ sức khỏe, Zalo…): chữ + gạch dưới đồng */
  #appView .tabs { gap: 4px; padding: 0; border: 0; border-bottom: 1px solid var(--ui-hair); border-radius: 0; background: none; }
  #appView .tab { margin-bottom: -1px; padding: 10px 14px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; color: var(--ui-muted); font-weight: 600; box-shadow: none; }
  #appView .tab:hover { background: none; color: var(--ui-ink); }
  #appView .tab[aria-selected="true"] { border-color: var(--ui-solid); background: none; color: var(--ui-ink); box-shadow: none; }
  .ld-tabs { border-color: var(--ui-hair); background: none; }
  .ld-tabs button[aria-selected="true"] { border-color: var(--ui-solid); background: none; color: var(--ui-ink); box-shadow: none; }
}
/* Màn rộng: lề nội dung module 32px, đầu màn một dòng */
@media screen and (min-width: 901px) {
  body.sales-shell #workWorkspace, body.sales-shell #customerWorkspace { padding-left: 32px; padding-right: 32px; box-sizing: border-box; }
  #appView .hub-heading { min-height: 40px; margin-bottom: 16px; align-items: center; }
}

/* ---------- Chữ đen sâu, đường kẻ rõ (03/10, áp dụng mọi trang). Màu chữ phụ lấy từ token (đã gần đen);
   :where() để không đè các màu trạng thái (đỏ/xanh/cam) đã khai báo riêng. ---------- */
@media screen {
  :where(#appView, .overlay, dialog) { color: #000; }
  :where(#appView) :where(td, small, p, time, li, .hub-sub, .muted) { font-weight: 500; }
  #appView th { color: #000; }
  #appView td, #appView th { border-color: #a8a8b0; }
  #appView .hub-table td { border-top: 1px solid #a8a8b0; }
}
/* Ô "+ Thêm …" (xét nghiệm, phiếu y tế, bảng tư vấn, tư vấn chuyên gia, kế hoạch): thấp bằng một dòng dữ liệu, dấu + nằm cạnh chữ */
@media screen {
  #appView :is(#labChoose, #newIntakeBtn, #newPlanBtn, #newConsultBtn, #careChoose) {
    flex-direction: row; gap: 10px; min-height: 58px; height: auto; padding: 10px 18px; border-radius: 15px; font-size: 14px; font-weight: 600;
  }
  #appView :is(#labChoose, #newIntakeBtn, #newPlanBtn, #newConsultBtn, #careChoose) .lab-plus { font-size: 26px; font-weight: 400; line-height: 1; }
  #appView :is(#labChoose, #newIntakeBtn, #newPlanBtn, #newConsultBtn, #careChoose):hover { background: var(--bronze-wash); }
}
/* Dòng thời gian: đường dọc đi qua đúng tâm các chấm, nối từ chấm này tới chấm kế tiếp; chấm thẳng hàng với dòng ngày */
@media screen {
  #appView .tl { padding-left: 30px; }
  #appView .tl::before { display: none; }
  #appView .tl-item { position: relative; }
  #appView .tl-dot { left: -30px; top: 0; width: 16px; height: 16px; box-sizing: border-box; z-index: 1; }
  #appView .tl-item:not(:last-child)::after {
    content: ""; position: absolute; left: -23px; top: 8px; bottom: -8px; width: 2px; background: var(--hair);
  }
  #appView .tl-when { display: block; line-height: 16px; }
}

/* ---------- Màu còn sót từ nền tối (10/10): chữ trắng / neon trên nền sáng. Chỉ trang Sales
   (trang Chuyên gia vẫn nền tối, dùng chung app.css, lab-import.css, sent-records.css, intake-form.css). ---------- */
@media screen {
  body:has(#appView:not([hidden])) { --lab-low: var(--low); --lab-high: var(--crit); }
  .tag.lab-low { background: var(--low-wash); color: var(--low); }
  .tag.lab-high { background: var(--crit-wash); color: var(--crit); }
  tr.abn-low td:first-child { box-shadow: inset 3px 0 0 var(--low); }
  tr.abn-high td:first-child { box-shadow: inset 3px 0 0 var(--crit); }
  .lab-file tr.abn-low td.num b { color: var(--low); }
  .lab-file tr.abn-high td.num b { color: var(--crit); }
  .record-detail .record-question { color: var(--ink); }
  .record-detail .record-response, .record-high td:last-child { color: var(--crit); }
  .ttyt-ocr-warn { color: var(--crit); }
  .ttyt-ocr-warn .ttyt-ocr-peek { border-color: #e7a59f; background: var(--crit-wash); color: var(--crit); }
  .cp-bar { background: var(--surface-3); }
  /* Chữ phụ xám nhạt (lịch công, giải trình, chữ ký) → đậm hơn, vẫn nhẹ hơn chữ chính */
  .pa-weekend-label, .pa-fund-note, .pa-day.c-weekend .pa-num { color: #5f5346; }
  .xp-meta small, .xp-signs strong.pending, .xp-none-needed.is-future, #profileSignatureForm .signature-guide { color: #5c554d; }
  .xp-note textarea::placeholder { color: #6b6560; }
}

/* ---------- Hộp thoại "Xác nhận tăng ca" (như CRM): nổi ngay trên trang Công & phép ---------- */
@media screen {
  dialog.ot-pop { width: min(720px, calc(100vw - 24px)); max-height: calc(100dvh - 48px); padding: 0; border: 1px solid #cbbda9; border-radius: 18px; background: #fff; color: #000; box-shadow: var(--shadow-3); overflow: hidden; }
  dialog.ot-pop::backdrop { background: rgb(28 23 18 / 35%) !important; }
  .ot-pop-panel { display: flex; flex-direction: column; max-height: calc(100dvh - 50px); }
  .ot-pop-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid #cbbda9; background: #fff; }
  .ot-pop-head h2 { margin: 0; font-size: 18px; font-weight: 700; color: #171717; }
  .ot-pop-head p { margin: 6px 0 0; color: #171717; font-size: 12px; line-height: 1.5; }
  dialog.ot-pop .ot-pop-close { display: grid; place-items: center; flex-shrink: 0; width: 34px; height: 34px; min-height: 34px; padding: 0; border: 1px solid #cbbda9; border-radius: 10px; background: #fff; color: #171717; font-size: 22px; line-height: 1; }
  dialog.ot-pop .ot-pop-close:hover { background: #faf5ed; }
  .ot-pop-body { padding: 16px 18px 18px; overflow: auto; }
  .ot-pop-body .rq-paper { border-color: #e3d6c4; background: #fdfaf6; }
  /* Danh sách ngày tăng ca chờ xác nhận */
  .ot-pick-cols, .ot-pick-day { display: grid; grid-template-columns: minmax(0, 1fr) 140px 18px; gap: 12px; align-items: center; }
  .ot-pick-cols { padding: 0 10px 8px; border-bottom: 1px solid #e3d6c4; color: #171717; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
  .ot-pick { display: flex; flex-direction: column; }
  dialog.ot-pop .ot-pick-day { width: 100%; min-height: 46px; padding: 10px; border: 0; border-bottom: 1px solid #efe6da; border-radius: 0; background: #fff; color: #000; text-align: left; font: inherit; }
  dialog.ot-pop .ot-pick-day:last-child { border-bottom: 0; }
  dialog.ot-pop .ot-pick-day:hover { background: #faf5ed; }
  dialog.ot-pop .ot-pick-day:focus-visible { outline: 2px solid var(--bronze); outline-offset: -2px; border-radius: 6px; }
  .ot-pick-date { font-size: 13px; font-weight: 700; white-space: nowrap; }
  .ot-pick-punch { font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .ot-pick-day > span:last-child { color: var(--bronze-deep); font-size: 20px; line-height: 1; text-align: right; }
  .ot-pick-empty { margin: 0; padding: 18px 8px; font-size: 13px; line-height: 1.6; }
  @media (max-width: 560px) { .ot-pick-cols, .ot-pick-day { grid-template-columns: minmax(0, 1fr) auto 14px; } .ot-pop-body { padding: 12px; } }
}

/* Cột "Cần xử lý" của trang khu: dòng gọn (không ô icon, nút nhỏ) */
@media screen {
  #appView .shk-side .sh-row { gap: 10px; padding: 12px 14px; }
  #appView .shk-side .sh-row-ico { display: none; }
  #appView .shk-side .sh-row-btn { height: 32px; min-height: 32px; padding: 0 12px; font-size: 13px; }
}

/* Menu "⋯" dùng chung (ui.menu) */
@media screen {
  .ui-menu { position: fixed; z-index: 120; min-width: 180px; max-width: 320px; padding: 6px; box-sizing: border-box; background: #fff; border: 1px solid #EFE9DD; border-radius: 12px; box-shadow: 0 8px 24px #392e221f; }
  .ui-menu button { display: flex; align-items: center; justify-content: flex-start; width: 100%; min-height: 38px; padding: 8px 12px; border: 0 !important; border-radius: 8px; background: transparent !important; color: #25211C !important; font: inherit; font-size: 14px; font-weight: 500; text-align: left; box-shadow: none !important; cursor: pointer; white-space: nowrap; }
  .ui-menu button:hover, .ui-menu button:focus-visible { background: #F5F0E8 !important; outline: none; }
  .ui-menu button.is-danger { color: #9B2F23 !important; }
  /* Nút ⋯ (module dùng class ui-more) */
  #appView .ui-more { display: inline-grid; place-items: center; width: 32px; min-width: 32px; height: 32px; min-height: 32px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: #6F655A; font-size: 18px; line-height: 1; box-shadow: none; }
  #appView .ui-more:hover, #appView .ui-more[aria-expanded="true"] { background: #F5F0E8; color: #25211C; }
  #appView .ui-more.is-lg { width: 40px; min-width: 40px; height: 40px; min-height: 40px; border: 1px solid #E4DACA; background: #fff; color: #25211C; }
}

/* ==========================================================================
   Điện thoại / màn hẹp (≤ 900px), như CRM mobile 03/11: thanh đầu 52px (Tìm kiếm · EVER SALES · chuông),
   thanh tab nổi 5 mục ở đáy (Trang chủ · Khách hàng · Phiếu ĐKDV/Báo cáo · Zalo/Lịch hẹn · Menu),
   Menu ⋮ cũ thành bảng trượt trên thanh tab; Thông báo / Tìm kiếm mở toàn màn.
   ========================================================================== */
.sh-mtool, .sh-mword, .sh-tabbar { display: none; }
@media screen and (max-width: 900px) {
  body.sales-shell #appView { padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
  body.sales-shell #appView .appbar { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; gap: 4px; height: 52px; min-height: 52px; padding: 0 6px; background: #fff; border-bottom: 1px solid #EFE9DD; backdrop-filter: none; }
  body.sales-shell #appView .appbar #appBrand, body.sales-shell #appView .appbar .who, body.sales-shell #appView .appbar #mobileMenuBtn { display: none !important; }
  body.sales-shell #appView .appbar .spacer { flex: 1 1 auto; }
  body.sales-shell #appView .appbar .nt-wrap { order: 5; margin-left: auto; }
  body.sales-shell .sh-mtool { display: grid; place-items: center; order: -2; width: 44px; height: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 12px; background: transparent; color: #25211C; box-shadow: none; }
  body.sales-shell .sh-mword { display: block; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 4px 8px; border: 0; background: transparent; color: #25211C; font-family: "Cormorant Garamond", Georgia, serif; font-size: 24px; font-weight: 600; letter-spacing: 2px; white-space: nowrap; box-shadow: none; }
  body.sales-shell #appView .appbar .notice-btn { width: 44px; height: 44px; min-height: 44px; border: 0; border-radius: 12px; background: transparent; color: #25211C; }
  body.sales-shell #appView .appbar .notice-btn svg { width: 22px; height: 22px; }
  body.sales-shell #appView .appbar .notice-btn .nav-badge { top: 4px; right: 4px; min-width: 18px; height: 18px; border: 2px solid #fff; background: #C2362B; color: #fff; font-size: 10px; line-height: 14px; }

  /* Thanh tab nổi */
  body.sales-shell .sh-tabbar { position: fixed; z-index: 66; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); display: grid; grid-template-columns: repeat(var(--tabs, 5), minmax(0, 1fr)); gap: 2px; height: 64px; padding: 6px; box-sizing: border-box; background: #fff; border: 1px solid #EFE9DD; border-radius: 24px; box-shadow: 0 8px 24px #392e221f; }
  body.sales-shell .sh-tabbar button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 0; min-height: 50px; padding: 2px; border: 0; border-radius: 18px; background: transparent; color: #6F655A; box-shadow: none; }
  body.sales-shell .sh-tabbar button[aria-current="page"] { background: #FAF1E1; color: #6E4A1C; }
  body.sales-shell .sh-tab-ico { position: relative; display: grid; place-items: center; height: 24px; }
  body.sales-shell .sh-tab-ico svg { width: 22px; height: 22px; }
  body.sales-shell .sh-tab-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; font-weight: 600; letter-spacing: 0; }
  body.sales-shell .sh-tabbar .nav-badge { position: absolute; top: -4px; left: 14px; min-width: 16px; height: 16px; margin: 0; padding: 0 4px; box-sizing: border-box; border: 2px solid #fff; border-radius: 8px; background: #C2362B; color: #fff; font-size: 9px; font-weight: 700; line-height: 12px; }

  /* Menu (⋮ cũ): bảng trượt trên thanh tab */
  body.sales-shell .mobile-menu { position: fixed; z-index: 67; top: auto !important; left: 8px !important; right: 8px !important; bottom: calc(80px + env(safe-area-inset-bottom, 0px)); width: auto !important; max-height: min(70vh, 560px); padding: 8px; border: 1px solid #EFE9DD; border-radius: 16px; background: #fff; box-shadow: 0 8px 24px #392e221f; }
  body.sales-shell .mobile-menu button, body.sales-shell .mobile-menu a { min-height: 46px; border-radius: 10px; color: #25211C; font-size: 15px; font-weight: 500; }
  body.sales-shell .mobile-menu button[aria-current="true"] { background: #FAF1E1; color: #6E4A1C; font-weight: 700; }
  body.sales-shell .mobile-menu .mm-group { margin: 10px 12px 4px; color: #6F655A; font-size: 12px; font-weight: 700; text-transform: none; letter-spacing: 0; }
  body.sales-shell .mobile-menu hr { border-top-color: #EFE9DD; }

  /* Thông báo / Tìm kiếm: toàn màn dưới thanh đầu */
  body.sales-shell .notice-panel, body.sales-shell .sh-panel {
    position: fixed !important; z-index: 64; top: 52px !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
    width: auto !important; max-width: none !important; max-height: none !important; margin: 0 !important; padding: 16px 0 calc(96px + env(safe-area-inset-bottom, 0px)) !important;
    display: flex; flex-direction: column; gap: 12px; overflow: hidden auto; background: #fff; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; color: #25211C;
  }
  body.sales-shell .notice-panel[hidden], body.sales-shell .sh-panel[hidden] { display: none !important; }
  body.sales-shell .sh-panel-head h2, body.sales-shell .notice-panel .nt-head strong { font-size: 18px; font-weight: 800; }
  body.sales-shell .sh-panel-head h2 { padding: 0 16px; }
  body.sales-shell .shs-field { margin: 0 16px 4px; }
  body.sales-shell .shs-field input { font-size: 16px; }
  body.sales-shell .notice-panel .nt-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 16px; border: 0; }
  body.sales-shell .notice-panel .nt-head .linklike, body.sales-shell .notice-panel .nt-desktop { color: #8A5F27; font-size: 13px; font-weight: 600; }
  body.sales-shell .notice-panel .nt-desktop { margin: 0 16px; text-align: left; }
  body.sales-shell .nt-chips { flex-wrap: nowrap; overflow-x: auto; padding: 0 16px 2px; scrollbar-width: none; }
  body.sales-shell .nt-chips button { flex: 0 0 auto; }
  body.sales-shell .nt-group { margin: 8px 16px 2px; }
  body.sales-shell .notice-panel .nt-list { margin: 0; padding: 0 8px; max-height: none; list-style: none; }
  body.sales-shell .notice-panel .nt-item { display: flex; align-items: flex-start; gap: 12px; width: 100%; min-height: 64px; padding: 10px 8px; border: 0; border-radius: 10px; background: transparent; text-align: left; }
  body.sales-shell .notice-panel .nt-item.is-unread { background: #FBF6ED; }
  body.sales-shell .notice-panel .nt-body strong { color: #25211C; font-size: 14px; font-weight: 700; }
  body.sales-shell .notice-panel .nt-body span, body.sales-shell .notice-panel .nt-body small { color: #6F655A; }

  /* Nội dung: tiêu đề màn 18/800, lề 12px */
  body.sales-shell #workWorkspace, body.sales-shell #customerWorkspace { padding-left: 12px; padding-right: 12px; box-sizing: border-box; }
  #appView .hub-heading h1 { font-size: 18px; font-weight: 800; letter-spacing: -.2px; }
  #appView .hub-heading { margin-bottom: 12px; }
  /* Trang chủ trên điện thoại: nút băng chào và Truy cập nhanh cuộn ngang */
  #appView .shh-actions { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -18px; padding-right: 18px; }
  #appView .shh-act { flex: 0 0 auto; }
  #appView .shh-quick { display: flex; overflow-x: auto; gap: 10px; scrollbar-width: none; }
  #appView .shh-quick .shh-qcard { flex: 0 0 140px; min-height: 116px; }
  #appView .shh-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #appView .shh-hero h1 { font-size: 20px; }
  #appView .shk-cards { grid-template-columns: 1fr; }
}

/* Khung trượt: các khối không bị co (chip lọc thông báo bị bẹp khi danh sách dài) */
@media screen {
  body.sales-shell .notice-panel > *, body.sales-shell .sh-panel > * { flex-shrink: 0; }
}
/* Điện thoại: thông báo nổi nằm trên thanh tab */
@media screen and (max-width: 900px) {
  body.sales-shell .toast-host { bottom: calc(84px + env(safe-area-inset-bottom, 0px)) !important; }
}

/* ==========================================================================
   Trang chủ = bảng điều khiển theo vai trò (05/11): dòng chào + nút nhanh, hàng ô số, lưới 12 cột các khung.
   Dùng hết bề rộng (tối đa 1760px) để một màn xem được nhiều, các khung dài tự cuộn bên trong.
   ========================================================================== */
@media screen {
  #appView .sh-home.shd { display: flex; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 16px; max-width: 1760px; margin: 0 auto; padding: 8px 0 40px; box-sizing: border-box; color: #25211C; }
  #appView .shd-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
  #appView .shd-hello h1 { margin: 0; color: #25211C; font-size: 24px; font-weight: 700; letter-spacing: -.3px; line-height: 1.3; }
  #appView .shd-hello p { margin: 2px 0 0; color: #6F655A; font-size: 13px; }
  #appView .shd-actions { display: flex; flex-wrap: wrap; gap: 8px; }
  #appView .shd-act { display: inline-flex; align-items: center; gap: 8px; height: 40px; min-height: 40px; padding: 0 16px; border: 1px solid #E4DACA; border-radius: 10px; background: #fff; color: #25211C; font-size: 14px; font-weight: 600; box-shadow: none; }
  #appView .shd-act:hover { border-color: #B89F7E; background: #FAF7F2; color: #25211C; }
  #appView .shd-act.is-primary { border-color: #9A6A2E; background: #9A6A2E; color: #fff; }
  #appView .shd-act.is-primary:hover { border-color: #7E5523; background: #7E5523; color: #fff; }
  #appView .shd-act svg { width: 16px; height: 16px; flex: 0 0 16px; }

  /* Hàng ô số */
  #appView .shd-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
  #appView .shd-kpi { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 4px; min-width: 0; min-height: 0; padding: 12px 14px; box-sizing: border-box; border: 1px solid #E4DACA; border-radius: 14px; background: #fff; color: #25211C; text-align: left; box-shadow: none; cursor: pointer; }
  #appView .shd-kpi:hover { border-color: #B89F7E; background: #fff; color: #25211C; }
  #appView .shd-kpi-label { display: flex; align-items: center; gap: 6px; max-width: 100%; color: #6F655A; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #appView .shd-kpi-label svg { width: 14px; height: 14px; flex: 0 0 14px; }
  #appView .shd-kpi-val { color: #6F655A; font-size: 12px; white-space: nowrap; }
  #appView .shd-kpi-val strong { color: #25211C; font-size: 22px; font-weight: 800; line-height: 1.15; }
  #appView .shd-kpi-sub { max-width: 100%; min-height: 15px; color: #6F655A; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #appView .shd-kpi.is-ok .shd-kpi-val strong { color: #1F5E2E; }
  #appView .shd-kpi.is-warn .shd-kpi-val strong { color: #8A4B0C; }
  #appView .shd-kpi.is-danger .shd-kpi-val strong, #appView .shd-kpi.is-danger .shd-kpi-sub { color: #9B2F23; }

  /* Lưới khung */
  #appView .shd-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
  #appView .shd-panel { display: flex; flex-direction: column; min-width: 0; padding: 14px 16px; box-sizing: border-box; border: 1px solid #E4DACA; border-radius: 16px; background: #fff; }
  #appView .shd-panel { grid-column: span var(--span, 4); }
  #appView .shd-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
  #appView .shd-panel-head h2 { margin: 0; color: #25211C; font-size: 15px; font-weight: 700; }
  #appView .shd-panel-body { flex: 1 1 auto; min-height: 0; }
  #appView .shd-scroll { max-height: 336px; overflow: auto; scrollbar-width: thin; }
  #appView .shd-panel .sh-list { border: 0; border-radius: 0; }
  #appView .shd-panel .sh-row { padding: 10px 2px; }
  #appView .shd-panel .sh-row-ico { flex-basis: 36px; width: 36px; height: 36px; }
  #appView .shd-panel .sh-row-btn { height: 32px; min-height: 32px; padding: 0 12px; font-size: 13px; }
  #appView .shd-line { display: flex; align-items: center; justify-content: flex-start; gap: 12px; width: 100%; min-height: 52px; padding: 8px 2px; box-sizing: border-box; border: 0; border-top: 1px solid #EFE9DD; border-radius: 0; background: transparent; color: #25211C; text-align: left; box-shadow: none; }
  #appView .shd-line:first-child { border-top: 0; }
  #appView button.shd-line { cursor: pointer; }
  #appView button.shd-line:hover { background: #FAF1E1; color: #25211C; }
  #appView .shd-line .sh-mini-text { flex: 1 1 auto; }
  #appView .shd-line .sh-mini-text strong, #appView .shd-line .sh-mini-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #appView .sh-mini-ico.is-warn { background: #FFF2E0; color: #8A4B0C; } #appView .sh-mini-ico.is-danger { background: #FBE7E5; color: #9B2F23; }
  #appView .shd-amt { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex: 0 0 auto; }
  #appView .shd-amt strong { font-size: 14px; font-weight: 700; }
  #appView .shd-chip { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 11px; font-size: 11px; font-weight: 600; white-space: nowrap; flex: 0 0 auto; }
  #appView .shd-chip.is-ok { background: #E6F2E8; color: #1F5E2E; } #appView .shd-chip.is-warn { background: #FFF2E0; color: #8A4B0C; }
  #appView .shd-chip.is-info { background: #E7EEF9; color: #24498A; } #appView .shd-chip.is-muted { background: #F1ECE4; color: #6F655A; }

  /* Doanh số theo Sale: cột ngang một màu, số ghi ngay bên phải, rê chuột xem chi tiết */
  #appView .shd-bars { display: flex; flex-direction: column; gap: 2px; }
  #appView .shd-bar { display: grid; grid-template-columns: minmax(110px, 30%) minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 7px 2px; border-top: 1px solid #EFE9DD; }
  #appView .shd-bar:first-child { border-top: 0; }
  #appView .shd-bar:hover { background: #FAF1E1; }
  #appView .shd-bar-name { display: flex; flex-direction: column; min-width: 0; }
  #appView .shd-bar-name strong { font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #appView .shd-bar-name small { color: #6F655A; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #appView .shd-bar-track { height: 10px; border-radius: 0 4px 4px 0; background: #F4EEE5; overflow: hidden; }
  #appView .shd-bar-fill { display: block; height: 100%; border-radius: 0 4px 4px 0; background: #9A6A2E; }
  #appView .shd-bar-val { display: flex; flex-direction: column; align-items: flex-end; min-width: 64px; }
  #appView .shd-bar-val strong { font-size: 13px; font-weight: 700; }
  #appView .shd-bar-val small { color: #6F655A; font-size: 11px; }

  /* Visa: 7 bước + 4 số */
  #appView .shd-flow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin: 4px 0 12px; }
  #appView .shd-flow-step { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; border-radius: 10px; background: #FAF7F2; text-align: center; }
  #appView .shd-flow-step strong { color: #6F655A; font-size: 18px; font-weight: 800; }
  #appView .shd-flow-step.has { background: #FAF1E1; } #appView .shd-flow-step.has strong { color: #25211C; }
  #appView .shd-flow-step small { color: #6F655A; font-size: 10.5px; line-height: 1.25; }
  #appView .shd-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; color: #6F655A; font-size: 13px; }
  #appView .shd-facts strong { color: #25211C; font-size: 15px; font-weight: 800; }
  #appView .shd-facts .is-danger, #appView .shd-facts .is-danger strong { color: #9B2F23; }
}
/* Màn vừa: lưới 6 cột (2 khung một hàng) */
@media screen and (min-width: 901px) and (max-width: 1279px) {
  #appView .shd-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  #appView .shd-panel { grid-column: span 3; }
}
/* Màn rất rộng: khung cao hơn để thấy nhiều dòng hơn */
@media screen and (min-width: 1680px) { #appView .shd-scroll { max-height: 420px; } }
/* Điện thoại: một cột, ô số 2 cột */
@media screen and (max-width: 900px) {
  #appView .sh-home.shd { gap: 12px; padding: 4px 0 24px; }
  #appView .shd-hello h1 { font-size: 18px; font-weight: 800; }
  #appView .shd-actions { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; width: 100%; }
  #appView .shd-act { flex: 0 0 auto; }
  #appView .shd-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  #appView .shd-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  #appView .shd-panel { grid-column: auto; }
  #appView .shd-scroll { max-height: none; }
  #appView .shd-bar { grid-template-columns: minmax(96px, 36%) minmax(0, 1fr) auto; }
}
/* Bảng điều khiển: ô số luôn một hàng ở máy tính; tiêu đề khung một dòng; 7 bước visa tự xuống dòng khi khung hẹp */
@media screen and (min-width: 1100px) { #appView .shd-kpis { grid-template-columns: repeat(var(--n, 6), minmax(0, 1fr)); } }
@media screen {
  #appView .shd-panel-head h2 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #appView .shd-panel-head .sh-link { flex: 0 0 auto; white-space: nowrap; }
  #appView .shd-flow { grid-template-columns: repeat(auto-fit, minmax(54px, 1fr)); }
}

/* ==========================================================================
   TINH CHỈNH GIAO DIỆN — G0 (15/11/2026), mẫu duyệt 2 màn: Trang chủ + Thông tin khách hàng.
   Giữ nhận diện kem ấm + đồng; tinh chỉnh "nghiệp" hơn: viền nhẹ hơn (#E4DACA → #E4DACA),
   bo góc 14px, đổ bóng tóc rất nhẹ thay cho thẻ phẳng, số liệu tabular-nums, nhịp dọc đều.
   Chỉ CSS trong file này (nạp cuối) — không đổi HTML/JS, không đụng các module khác.
   ========================================================================== */
@media screen {
  body:has(#appView:not([hidden])) {
    --g0-line: #E4DACA;          /* viền thẻ chính (nhẹ hơn --ui-line) */
    --g0-line-strong: #CDBFA4;   /* viền khi rê chuột / chọn */
    --g0-hair: #EFE9DD;          /* kẻ ngăn trong thẻ */
    --g0-r: 14px;                /* bo góc thống nhất (thay 16px) */
    --g0-shadow: 0 1px 2px rgba(62, 47, 24, .05);
    --g0-shadow-hover: 0 3px 12px rgba(62, 47, 24, .09);
  }

  /* ---------- Trang chủ (bảng điều khiển) ---------- */
  #appView .shd-kpi {
    border-color: var(--g0-line); border-radius: var(--g0-r); box-shadow: var(--g0-shadow);
    transition: border-color .12s ease, box-shadow .12s ease;
  }
  #appView .shd-kpi:hover { border-color: var(--g0-line-strong); box-shadow: var(--g0-shadow-hover); }
  #appView .shd-kpi:focus-visible { outline: 2px solid #9A6A2E; outline-offset: 2px; }
  #appView .shd-kpi-val, #appView .shd-kpi-val strong { font-variant-numeric: tabular-nums; }
  #appView .shd-panel { border-color: var(--g0-line); border-radius: var(--g0-r); box-shadow: var(--g0-shadow); }
  #appView .shd-panel-head { padding-bottom: 10px; margin-bottom: 2px; border-bottom: 1px solid var(--g0-hair); }
  #appView .shd-panel-body { padding-top: 4px; }
  #appView .shd-act { border-color: var(--g0-line); transition: border-color .12s ease, box-shadow .12s ease, background .12s ease; }
  #appView .shd-act:hover { border-color: var(--g0-line-strong); box-shadow: var(--g0-shadow); }
  #appView .shd-act.is-primary { box-shadow: var(--g0-shadow); }
  #appView .shd-bar-track { background: #F1EBDF; }
  #appView .shd-line { border-top-color: var(--g0-hair); }
  #appView .shd-flow-step { background: #FBF8F2; box-shadow: inset 0 0 0 1px var(--g0-hair); }
  #appView .shd-flow-step.has { background: #FAF1E1; box-shadow: inset 0 0 0 1px #EBDCC2; }

  /* ---------- Thông tin khách hàng (danh sách) ---------- */
  #appView #customerWorkspace section.hub-list-card { border-color: var(--g0-line); border-radius: var(--g0-r); box-shadow: var(--g0-shadow); }
  #appView #customerWorkspace .hub-list-table th { background: #FBF8F2; box-shadow: inset 0 -1px 0 var(--g0-hair); }
  #appView #customerWorkspace .hub-list-table td { border-top-color: var(--g0-hair); }
  #appView #customerWorkspace .hub-list-table tbody td:first-child { box-shadow: inset -1px 0 0 var(--g0-hair); }
  #appView #customerWorkspace .hub-list-table thead tr:first-child th:first-child { box-shadow: inset -1px 0 0 var(--g0-hair), inset 0 -1px 0 var(--g0-hair); }
  #appView #customerWorkspace .hub-search { border-color: var(--g0-line); transition: border-color .12s ease, box-shadow .12s ease; }
  #appView #customerWorkspace .hub-search:hover { border-color: var(--g0-line-strong); }
  #appView #customerWorkspace .hub-filters select { border-color: var(--g0-line); }
  #appView #customerWorkspace .hub-filters select:hover { border-color: var(--g0-line-strong); }
  #appView #customerWorkspace .hub-owner { border-color: var(--g0-line); transition: border-color .12s ease, background .12s ease; }
  #appView #customerWorkspace .hub-owner:hover { border-color: var(--g0-line-strong); }
  #appView #customerWorkspace .hub-owner[aria-selected="true"] { border-color: #E9D8BC; box-shadow: var(--g0-shadow); }
  #appView #customerWorkspace .hub-pager { border-top-color: var(--g0-hair); }
  #appView #customerWorkspace .hub-pager button { border-color: var(--g0-line); }
  #appView #customerWorkspace .hub-pager button:not(:disabled):hover { border-color: var(--g0-line-strong); }
  #appView #customerWorkspace .hub-pager button:disabled { border-color: var(--g0-hair); }
  /* Dải tóm tắt số: kẻ ngăn nhẹ hơn, số dùng tabular-nums cho thẳng hàng */
  #appView #customerWorkspace > .hub-stats { border: 1px solid var(--g0-hair); border-radius: var(--g0-r); background: #FBF8F2; }
  #appView #customerWorkspace > .hub-stats .hub-stat { border-left-color: var(--g0-line); }
  #appView #customerWorkspace .hub-stat strong { font-variant-numeric: tabular-nums; }
  /* Nút đầu màn trang danh sách */
  #appView #customerWorkspace .hub-heading > .hub-actions > button:not(.ui-more):not(.primary) { border-color: var(--g0-line); }
  #appView #customerWorkspace .hub-heading > .hub-actions > button:not(.ui-more):not(.primary):hover { border-color: var(--g0-line-strong); box-shadow: var(--g0-shadow); }
  /* Thẻ chi tiết hồ sơ khách (cùng nhịp với danh sách) */
  #appView #customerWorkspace #hubDetail .hub-card { border-color: var(--g0-line); border-radius: var(--g0-r); box-shadow: var(--g0-shadow); }
  #appView #customerWorkspace #hubDetail .hub-card dl > div { border-top-color: var(--g0-hair); }
}

/* ==========================================================================
   TINH CHỈNH GIAO DIỆN — G1 (15/11/2026): hợp nhất token TOÀN APP sau khi G0 được duyệt.
   Một bộ biến duy nhất cho mọi màn Sales: viền --ui-line #E4DACA (nhẹ hơn #E4DACA cũ),
   kẻ ngăn --ui-hair #EFE9DD, bo góc 14px, đổ bóng tóc. Các luật cũ đã dùng var(--ui-line) /
   var(--ui-hair) tự đổi theo; thêm lớp phủ cho điểm còn gắn cứng #E4DACA trong file này.
   Không đổi HTML/JS/src, không đụng medical.css (hệ --m-* riêng, G3 rà sau) và mobile.css.
   ========================================================================== */
@media screen {
  body:has(#appView:not([hidden])) {
    --ui-line: #E4DACA;
    --ui-hair: #EFE9DD;
    --card-line: #E4DACA;
    --ui-r: 14px;
    --ui-shadow: 0 1px 2px rgba(62, 47, 24, .05);
    --ui-shadow-hover: 0 3px 12px rgba(62, 47, 24, .09);
  }

  /* Thẻ / khung / bảng dùng chung: bo góc 14px + bóng tóc thay cho phẳng cứng */
  #appView .panel, #appView .hub-card, #appView .ld-kpi, #appView .ld-card,
  #appView .hub-table-wrap, #appView .tbl-wrap, #appView .rq-tabs {
    border-radius: var(--ui-r); border-color: var(--ui-line); box-shadow: var(--ui-shadow);
  }
  #appView .panel > .panel-head:not(.lab-file-head):not(.care-file-head):not(.ttyt-head) { border-radius: 13px 13px 0 0; border-bottom-color: var(--ui-hair); }
  .overlay .modal, dialog { border-radius: var(--ui-r); }
  dialog.ot-pop { border-radius: 18px; }

  /* Các điểm trong shell.css còn gắn cứng viền cũ #E4DACA → về token mới */
  #appView .shh-stat, #appView .sh-list, #appView .shh-qcard, #appView .shk-card, #appView .sh-box,
  #appView .shh-account .shell-avatar.is-static, #appView .shd-kpi, #appView .shd-panel,
  .shs-field, .nt-chips button, #appView .ui-more.is-lg { border-color: var(--ui-line); }
  #appView .shh-qcard:hover, #appView .shk-card:hover, #appView .shd-kpi:hover { border-color: var(--g0-line-strong, #CDBFA4); }
  .shs-field:focus-within { border-color: #9A6A2E; }

  /* Thẻ khu / trang chủ: bóng tóc + chuyển động hover nhất quán */
  #appView .shh-stat, #appView .shh-qcard, #appView .shk-card, #appView .sh-box, #appView .shd-kpi, #appView .shd-panel { box-shadow: var(--ui-shadow); }
  #appView .shh-qcard, #appView .shk-card, #appView .shd-kpi, #appView .shd-act { transition: border-color .12s ease, box-shadow .12s ease, background .12s ease; }
  #appView .shh-qcard:hover, #appView .shk-card:hover { box-shadow: var(--ui-shadow-hover); }

  /* Dải tóm tắt số (.hub-stats) trên mọi màn: khung kẻ ngăn nhẹ, số thẳng hàng */
  #appView .hub-stats { border: 1px solid var(--ui-hair); border-radius: 12px; background: #FBF8F2; }
  #appView .hub-stats .hub-stat { border-left-color: var(--ui-line); }
  #appView .hub-stat strong { font-variant-numeric: tabular-nums; }

  /* Bảng: đầu bảng và kẻ dòng dùng token mới (mọi module) */
  #appView th, #appView .hub-table th { border-bottom-color: var(--ui-hair); }
  #appView td, #appView .hub-table td { border-color: var(--ui-hair); }

  /* Tab gạch dưới dùng chung: kẻ ngăn nhẹ hơn */
  #appView .tabs, .ld-tabs { border-bottom-color: var(--ui-hair); }
}

/* ==========================================================================
   TINH CHỈNH GIAO DIỆN — G2 (15/11/2026): khung ứng dụng, sau khi G1 được duyệt.
   - Menu trái: viền/bóng theo token, hiệu ứng chuyển mượt, vòng focus khi dùng bàn phím.
   - Khung trượt Tìm kiếm / Thông báo + menu tài khoản: kẻ ngăn & bóng theo token.
   - Nút "quay lại" đầu màn con: một kiểu chung (đồng 13px/600, gạch chân khi rê).
   - Dải màn 761–900px (máy tính bảng / cửa sổ hẹp): lề 20px, tiêu đề 20px, ô số nhiều cột,
     thanh tab đáy & menu ⋮ gom giữa tối đa 560px thay vì giãn hết chiều ngang.
   Chỉ CSS; không đổi HTML/JS/src; không đụng medical.css (G3 rà sau) và mobile.css.
   ========================================================================== */
@media screen and (min-width: 901px) {
  /* Menu trái */
  body.sales-shell #appView .workspace-nav { border-right-color: var(--ui-line); }
  body.sales-shell:not(.sh-panel-open):not(:has(#noticePanel:not([hidden]))):not(:has(#shellAccount:not([hidden]))) #appView .workspace-nav:is(:hover, :has(:focus-visible)) { box-shadow: var(--ui-shadow-hover); }
  body.sales-shell #appView .workspace-nav > button,
  body.sales-shell #appView .workspace-nav > .hr-wrap > #hrNav { border-radius: 12px; transition: background .12s ease, color .12s ease; }
  body.sales-shell #appView .workspace-nav :is(button, #hrNav):focus-visible { outline: 2px solid #9A6A2E; outline-offset: -2px; }

  /* Khung trượt Tìm kiếm / Thông báo */
  body.sales-shell .notice-panel, body.sales-shell .sh-panel { border-right-color: var(--ui-line) !important; box-shadow: 8px 0 28px rgba(62, 47, 24, .08) !important; }

  /* Menu tài khoản */
  body.sales-shell .shell-account { border-color: var(--ui-line); box-shadow: var(--ui-shadow-hover); }
  body.sales-shell .shell-account-head .shell-avatar.is-static { border-color: var(--ui-line); }
  body.sales-shell .shell-account-divider { background: var(--ui-hair); }

  /* Nút quay lại đầu màn con: một kiểu chung (các module đang lệch 13/14px, hover chưa thống nhất) */
  #appView :is(button.jn-back, .vs-back, .hh-back, button.dk-back, button.hub-back, .jn-crumb) { font-size: 13px; font-weight: 600; }
  #appView :is(button.jn-back, .vs-back, .hh-back, button.dk-back, button.hub-back):hover { text-decoration: underline; text-underline-offset: 3px; }
}

/* Dải 761–900px: máy tính bảng ngang / cửa sổ hẹp — thở hơn điện thoại, không giãn như màn rộng */
@media screen and (min-width: 761px) and (max-width: 900px) {
  body.sales-shell #workWorkspace, body.sales-shell #customerWorkspace { padding-left: 20px; padding-right: 20px; }
  #appView .hub-heading h1 { font-size: 20px; }
  #appView .shd-hello h1 { font-size: 20px; }
  #appView .shd-kpis { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
  #appView .shh-stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  /* Thanh tab đáy + menu ⋮: gom giữa tối đa 560px */
  body.sales-shell .sh-tabbar { left: 50%; right: auto; width: min(560px, calc(100% - 16px)); transform: translateX(-50%); }
  body.sales-shell .mobile-menu { left: 50% !important; right: auto !important; width: min(560px, calc(100% - 16px)) !important; transform: translateX(-50%); }
}

/* ==========================================================================
   TRANG KHU BÁO CÁO — dải số nóng đầu trang (nâng cấp Báo cáo, 15/11/2026):
   tái dùng ô .shd-kpi của Trang chủ, xếp lưới tự co theo bề rộng.
   ========================================================================== */
@media screen {
  /* Mặc định tự co theo nội dung; khi đủ rộng (>760px) ép đúng số thẻ một hàng —
     Chủ dự án 16/11: có đủ 5 chip (kể cả Ký duyệt) thì 5 chip nằm gọn 1 hàng, không tụt hàng. */
  #appView .shk-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 4px 0 22px; }
  #appView .shk-kpis .shd-kpi { transition: border-color .15s ease, box-shadow .15s ease; }
  #appView .shk-kpis .shd-kpi:hover { border-color: #CDBFA4; box-shadow: 0 4px 14px rgba(58, 44, 26, .08); }
}
@media screen and (min-width: 761px) {
  #appView .shk-kpis { grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); }
}
@media screen and (max-width: 760px) {
  #appView .shk-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
}
