/* Ảnh hồ sơ (anh-ho-so.js, tiền tố ahs-, 01/10/2026). Một bề mặt duy nhất ở đầu màn Tài khoản: ảnh bìa 3:1 + ảnh đại diện tròn
   + nút Đổi / Gỡ. Token theme, bo tối đa 8px (ảnh đại diện tròn), nút ≥ 44px, không thẻ lồng thẻ. */
.ahs { background: var(--bg-card, #fff); border: 1px solid var(--border-color, #e5e5ea); border-radius: 8px; overflow: hidden; margin-bottom: 16px; color: var(--text-main, #1d1d1f); }
.ahs-bia { position: relative; aspect-ratio: 3 / 1; max-height: 220px; width: 100%; background: var(--bg-card-hover, #f2f2f7); border-bottom: 1px solid var(--border-color, #e5e5ea); display: grid; place-items: center; }
.ahs-bia img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ahs-bia-trong { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted, #6e6e73); }
.ahs-bia.is-dang .ahs-bia-trong { visibility: hidden; }
.ahs-than { display: flex; align-items: flex-end; gap: 14px; padding: 0 20px; margin-top: -40px; position: relative; }
.ahs-av { flex: none; width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; overflow: hidden;
  background: var(--theme-accent-strong, #0071e3); color: #fff; font-size: 36px; font-weight: 700; border: 3px solid var(--bg-card, #fff); }
.ahs-av-img, .ahs-av img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.ahs-ten { min-width: 0; padding-bottom: 6px; }
.ahs-ten h2 { margin: 0; font-size: 18px; line-height: 1.3; color: var(--text-main, #1d1d1f); overflow-wrap: anywhere; }
.ahs-ten p { margin: 2px 0 0; font-size: 13px; color: var(--text-muted, #6e6e73); }
.ahs-nut-hang { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; padding: 14px 20px 0; }
.ahs, .ahs-hop { --itn-nut-bo: 8px; }
/* app-shell.css ép nút phụ / chính thành viên thuốc (999px !important) — khối mới theo luật bo ≤ 8px nên cần bộ chọn mạnh hơn. */
html body .ahs .ahs-nut, html body .ahs-hop .ahs-nut { min-height: 44px; border-radius: 8px !important; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.ahs-nut svg { flex: none; }
.ahs-nut-go { min-height: 44px; padding: 0 10px; border: 0; background: none; border-radius: 8px; color: var(--txt-bad, #c4191e); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.ahs-nut-go:hover:not(:disabled) { background: var(--bg-card-hover, #f2f2f7); }
.ahs-nut-go:disabled, .ahs .ahs-nut:disabled { opacity: .55; cursor: default; }
.ahs-ghi { margin: 10px 20px 0; font-size: 13px; line-height: 1.45; color: var(--text-muted, #6e6e73); }
.ahs-trang-thai { margin: 6px 20px 14px; min-height: 1em; font-size: 13px; color: var(--text-muted, #6e6e73); }
.ahs-trang-thai:empty { margin-top: 0; min-height: 0; margin-bottom: 14px; }
.ahs-loi { display: flex; gap: 6px; align-items: flex-start; margin: 10px 20px 0; font-size: 13px; color: var(--txt-bad, #c4191e); }
.ahs-loi svg { flex: none; margin-top: 1px; }
.ahs-tieu-de { margin: 16px 20px 6px; font-size: 16px; }
.ahs-loi-khoi { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 0 20px 16px; font-size: 14px; color: var(--txt-bad, #c4191e); }
.ahs-loi-khoi > svg { flex: none; }
.ahs-loi-khoi .ahs-nut { color: var(--text-main, #1d1d1f); }
.ahs :focus-visible, .ahs-hop :focus-visible { outline: 3px solid var(--theme-accent-strong, #0071e3); outline-offset: 2px; }
.ahs-co-anh.user-avatar-exec { background: transparent !important; padding: 0; overflow: hidden; }
.user-avatar-exec .ahs-av-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.bt-av.ahs-co-anh { background: transparent !important; overflow: hidden; }
.bt-av .ahs-av-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
html[data-itn-theme="graphite"] .ahs-av, html[data-itn-theme="gold-noir"] .ahs-av { color: var(--bg-app); }

/* Hộp xem trước / xác nhận gỡ: máy tính hộp giữa 480px; điện thoại tấm trượt đáy. */
dialog.ahs-hop { position: fixed; inset: 0; margin: auto; height: fit-content; width: min(480px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 0;
  border: 1px solid var(--border-color, #e5e5ea); border-radius: 8px; background: var(--bg-card, #fff); color: var(--text-main, #1d1d1f); }
dialog.ahs-hop::backdrop { background: rgba(0, 0, 0, .4); }
.ahs-hop-khung { margin: 0; display: block; }
.ahs-hop-dau { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 8px 0 18px; }
.ahs-hop-dau h2, .ahs-hoi h2 { margin: 0; font-size: 18px; font-weight: 700; color: var(--text-main, #1d1d1f); }
.ahs-ic-nut { width: 44px; height: 44px; border: 0; border-radius: 8px; background: none; color: var(--text-main, #1d1d1f); display: grid; place-items: center; cursor: pointer; }
.ahs-ic-nut:hover:not(:disabled) { background: var(--bg-card-hover, #f2f2f7); }
.ahs-hop-than { padding: 12px 18px 4px; }
.ahs-hoi .ahs-hop-than { padding-top: 18px; }
.ahs-hop .ahs-ghi, .ahs-hop .ahs-loi { margin-left: 0; margin-right: 0; }
.ahs-xem { display: grid; place-items: center; background: var(--bg-card-hover, #f2f2f7); border-radius: 8px; overflow: hidden; }
.ahs-xem-dd { padding: 16px; }
.ahs-xem-dd img { width: 200px; height: 200px; max-width: 60vw; max-height: 60vw; border-radius: 50%; object-fit: cover; display: block; }
.ahs-xem-bia img { width: 100%; aspect-ratio: 3 / 1; object-fit: cover; display: block; }
.ahs-xem-cho { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 160px; border-radius: 8px; background: var(--bg-card-hover, #f2f2f7); color: var(--text-muted, #6e6e73); font-size: 14px; }
.ahs-tien { margin-top: 12px; }
.ahs-tien-thanh { height: 6px; border-radius: 3px; background: var(--bg-card-hover, #e5e5ea); overflow: hidden; }
.ahs-tien-thanh span { display: block; height: 100%; background: var(--theme-accent-strong, #0071e3); transition: opacity .15s linear; }
.ahs-tien p { margin: 6px 0 0; font-size: 13px; color: var(--text-muted, #6e6e73); }
.ahs-hop-chan { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 18px 18px; }
.ahs-hoi .ahs-hop-chan { justify-content: flex-end; }
.ahs-hop-chan-phai { display: inline-flex; gap: 8px; margin-left: auto; }

/* Trang cá nhân (01/10 tối): lời giới thiệu + công tắc "Hiện trạng thái truy cập" — ngăn bằng đường kẻ, cùng bề mặt, không thẻ lồng. */
.ahs-them { display: grid; gap: 8px; margin: 14px 20px 0; padding-top: 14px; border-top: 1px solid var(--border-color, #e5e5ea); }
.ahs-nhan { font-size: 14px; font-weight: 600; color: var(--text-main, #1d1d1f); }
.ahs-nhan span { font-weight: 400; color: var(--text-muted, #6e6e73); font-size: 13px; }
.ahs-gt { width: 100%; box-sizing: border-box; min-height: 72px; padding: 10px 12px; border: 1px solid var(--border-color, #e5e5ea); border-radius: 8px; background: var(--bg-input, #fff); color: var(--text-main, #1d1d1f); font: inherit; font-size: 15px; line-height: 1.45; resize: vertical; }
.ahs-gt-hang { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.ahs-gt-tt { font-size: 13px; color: var(--text-muted, #6e6e73); }
.ahs-cong-tac-hang { display: flex; align-items: center; gap: 12px; min-height: 44px; margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--border-color, #e5e5ea); cursor: pointer; }
.ahs-cong-tac-chu { flex: 1; display: grid; gap: 2px; font-size: 14px; color: var(--text-main, #1d1d1f); }
.ahs-cong-tac-chu span { font-size: 13px; line-height: 1.45; color: var(--text-muted, #6e6e73); }
.ahs-cong-tac { flex: none; -webkit-appearance: none; appearance: none; position: relative; width: 48px; height: 28px; margin: 0; border: 1px solid var(--border-color, #e5e5ea); border-radius: 8px; background: var(--bg-input, #f2f2f7); cursor: pointer; }
.ahs-cong-tac::before { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 6px; background: var(--text-muted, #6e6e73); transition: transform .15s ease; }
.ahs-cong-tac:checked { background: var(--theme-accent-strong, #0071e3); border-color: var(--theme-accent-strong, #0071e3); }
.ahs-cong-tac:checked::before { transform: translateX(20px); background: #fff; }
.ahs-cong-tac:disabled { opacity: .6; }
@media (prefers-reduced-motion: reduce) { .ahs-cong-tac::before { transition: none; } }

@media (max-width: 760px) {
  .ahs-them { margin-left: 16px; margin-right: 16px; }
  .ahs-than { padding: 0 16px; margin-top: -32px; gap: 12px; }
  .ahs-av { width: 80px; height: 80px; font-size: 30px; }
  .ahs-ten h2 { font-size: 17px; }
  .ahs-nut-hang { padding: 12px 16px 0; }
  .ahs-nut-hang .ahs-nut { flex: 1 1 calc(50% - 5px); padding-left: 8px; padding-right: 8px; }
  .ahs-ghi, .ahs-loi, .ahs-trang-thai { margin-left: 16px; margin-right: 16px; }
  dialog.ahs-hop { inset: auto 0 0 0; margin: 0; width: 100%; max-width: 100%; border-radius: 8px 8px 0 0; border-bottom: 0; padding-bottom: env(safe-area-inset-bottom); max-height: calc(100dvh - 24px); }
  .ahs-hop-chan .ahs-nut-khac { flex: 1 1 100%; }
  .ahs-hop-chan-phai { flex: 1 1 100%; margin-left: 0; }
  .ahs-hop-chan-phai .ahs-nut { flex: 1 1 50%; }
}
@media (max-width: 360px) { .ahs-nut-hang .ahs-nut { flex-basis: 100%; } }
@media (prefers-reduced-motion: reduce) { .ahs-tien-thanh span { transition: none; } }
