/* AMASS Client Care — Medical Minimalism · Quiet Luxury
   V11 — HỆ THỐNG THIẾT KẾ AMASS (một nguồn token cho Client App + Admin Portal, xem docs/V11-HE-THONG-THIET-KE.md):
   nền Ivory / Off-white · chữ Charcoal · nhấn Sage · Champagne tiết chế (chỉ trang trí / hạng thẻ) · cảnh báo Amber & nguy hiểm Đỏ đất (tách hẳn Champagne)
   Font: Noto Sans cho toàn bộ chữ & số (đủ dấu tiếng Việt, số dễ đọc); serif Cormorant chỉ dùng cho chữ thương hiệu "AMASS". */
:root {
  --ivory: #f7f3ec;
  --paper: #fffdf9;
  --sand: #efe8dc;
  --nude: #e3d6c4;
  --line: #e5ddd0;
  --line-2: #d8cdbd;
  --ink: #22201d;
  --ink-2: #3a3631;
  --muted: #7b7369;
  --soft: #a69d91;
  --sage: #66806a;
  --sage-2: #8da08f;
  --sage-soft: #e5ece4;
  --olive: var(--sage);     /* tên cũ — giữ để không vỡ giao diện đang dùng */
  --olive-2: var(--sage-2);
  --champagne: #b8a47c;
  --ok: #4f6b52;
  --warn: #b0661c;          /* amber — cảnh báo, khác hẳn Champagne */
  --danger: #a3392c;
  --info: #3f6a86;
  --tap: 44px;              /* chiều cao chạm tối thiểu trên thiết bị cảm ứng */
  --radius: 18px;
  --radius-s: 12px;
  --shadow: 0 1px 2px rgba(34, 32, 29, .04), 0 8px 24px -12px rgba(34, 32, 29, .12);
  --brand-serif: 'Cormorant Garamond', 'Cormorant', Georgia, 'Times New Roman', serif;
  --sans: 'Noto Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --serif: var(--sans);     /* tiêu đề dùng cùng font Noto Sans — một hệ chữ duy nhất */
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 15px; line-height: 1.55; color: var(--ink); background: var(--ivory); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
h1, h2, .serif { font-family: var(--serif); font-weight: 600; }
h1 { font-size: 28px; line-height: 1.2; }
h2 { font-size: 22px; line-height: 1.25; }
.brand { font-family: var(--brand-serif); }
h3 { font-size: 17px; }
h4 { font-size: 15px; }
p { margin: 0 0 .7em; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.soft { color: var(--soft); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.eyebrow { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.num { font-variant-numeric: tabular-nums; }
.ic { flex: none; display: block; }
.hidden { display: none !important; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack > * + * { margin-top: 12px; }
.stack-lg > * + * { margin-top: 22px; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.mt { margin-top: 16px; } .mt-s { margin-top: 8px; } .mt-l { margin-top: 28px; }
.divider { height: 1px; background: var(--line); margin: 18px 0; border: 0; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent; cursor: pointer; font-weight: 500; font-size: 14.5px; text-decoration: none; transition: background .15s, border-color .15s, opacity .15s; white-space: nowrap; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover:not(:disabled) { background: #000; }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover:not(:disabled) { background: var(--sand); }
.btn-soft { background: var(--sand); color: var(--ink); }
.btn-danger { background: transparent; border-color: #d9b9b2; color: var(--danger); }
.btn-olive { background: var(--olive); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 13px; }
.link { background: none; border: 0; padding: 0; color: var(--olive); font-weight: 500; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; position: relative; color: var(--ink); }
.icon-btn:hover { background: var(--sand); }
.badge-dot { position: absolute; top: 6px; right: 6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--danger); color: #fff; font-size: 10px; line-height: 16px; text-align: center; font-weight: 600; }

/* ---------- Pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 500; line-height: 20px; white-space: nowrap; border: 1px solid transparent; }
.pill-line { border-color: var(--line-2); color: var(--muted); }
.pill-ok { background: var(--sage-soft); color: var(--ok); }
.pill-warn { background: #fbe9d6; color: #96540f; }
.pill-danger { background: #f6e0dc; color: var(--danger); }
.pill-info { background: #e3edf3; color: var(--info); }
.pill-mute { background: var(--sand); color: var(--soft); }
.pill-ink { background: var(--ink); color: var(--paper); }
.pill-gold { background: #efe6d2; color: #8a7448; }
.pill-demo { background: #fbe9d6; border: 1px dashed var(--warn); color: #96540f; font-size: 10px; letter-spacing: .08em; padding: 0 7px; font-weight: 600; }

/* ---------- Cards ---------- */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card-flat { background: var(--sand); border-radius: var(--radius); padding: 18px; }
.card-ink { background: var(--ink); color: var(--paper); border-radius: var(--radius); padding: 20px; }
.card-ink .muted { color: #b9b1a5; }
.card-link { display: block; text-decoration: none; color: inherit; cursor: pointer; transition: border-color .15s, transform .15s; }
.card-link:hover { border-color: var(--line-2); }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 10px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 28px 0 12px; }
.section-title h3 { font-family: var(--serif); font-size: 18px; font-weight: 600; }
.list { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.list-item { display: flex; align-items: center; gap: 14px; padding: 15px 16px; text-decoration: none; color: inherit; border: 0; background: none; width: 100%; text-align: left; cursor: pointer; }
.list-item + .list-item { border-top: 1px solid var(--line); }
.list-item:hover { background: #fbf8f2; }
.list-item .chev { color: var(--soft); }
.kv { display: grid; grid-template-columns: minmax(110px, 40%) 1fr; gap: 9px 14px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-weight: 500; }
.kv-left dd { text-align: left; }

/* ---------- Art ---------- */
.art { display: block; width: 100%; height: 100%; color: var(--olive-2); }
.art-box { background: linear-gradient(160deg, #efe7da, #e6dccb); border-radius: var(--radius); overflow: hidden; position: relative; aspect-ratio: 16/9; }
.art-box .art { opacity: .9; }
.art-box .art-caption { position: absolute; left: 12px; bottom: 10px; font-size: 10.5px; color: var(--muted); letter-spacing: .04em; }
.art-thumb { width: 64px; height: 64px; flex: none; border-radius: 14px; overflow: hidden; background: linear-gradient(160deg, #efe7da, #e3d8c6); }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.field .lbl { color: var(--ink-2); font-weight: 500; }
.field .req { color: var(--danger); }
.field .hint { color: var(--soft); font-size: 12px; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=search], input[type=datetime-local], select, textarea {
  width: 100%; min-height: 46px; padding: 11px 14px; border: 1px solid var(--line-2); border-radius: var(--radius-s); background: var(--paper); font: inherit; font-size: 15px; color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
select[multiple] { min-height: 100px; }
input:focus, select:focus, textarea:focus { border-color: var(--sage); box-shadow: 0 0 0 3px rgba(102, 128, 106, .18); }
:focus-visible { outline: 2px solid var(--sage); outline-offset: 2px; }
.invalid { border-color: var(--danger) !important; }
.field-error { color: var(--danger); font-size: 12px; }
.form-alert { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius-s); background: #f5e6e2; color: var(--danger); font-size: 13.5px; margin-bottom: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-section { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.check { flex-direction: row; align-items: center; gap: 10px; }
.check input { width: 18px; height: 18px; accent-color: var(--olive); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line-2); background: var(--paper); padding: 8px 14px; border-radius: 999px; font-size: 13.5px; cursor: pointer; text-align: left; line-height: 1.35; }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.notice { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--radius-s); background: var(--sand); font-size: 13.5px; color: var(--ink-2); }
.notice .ic { margin-top: 2px; color: var(--olive); }
.notice-warn { background: #f4ebda; }
.notice-warn .ic { color: var(--warn); }
.notice-danger { background: #f5e6e2; }
.notice-danger .ic { color: var(--danger); }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }

/* ---------- States ---------- */
.state { text-align: center; padding: 48px 20px; color: var(--muted); }
.state h4 { color: var(--ink); margin: 10px 0 4px; font-size: 16px; }
.state .ic { margin: 0 auto; color: var(--champagne); }
.state-error .ic { color: var(--danger); }
.spinner { display: inline-block; width: 26px; height: 26px; border: 2px solid var(--line-2); border-top-color: var(--olive); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--sand), #f6f1e8, var(--sand)); background-size: 200% 100%; animation: sk 1.3s infinite; border-radius: var(--radius); }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- Toast & modal ---------- */
#toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(90px + var(--safe-b)); z-index: 100; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { display: flex; gap: 10px; align-items: center; background: var(--ink); color: var(--paper); padding: 12px 16px; border-radius: 14px; font-size: 14px; box-shadow: var(--shadow); animation: up .25s ease; transition: opacity .4s, transform .4s; }
.toast-error { background: var(--danger); }
.toast.out { opacity: 0; transform: translateY(8px); }
@keyframes up { from { opacity: 0; transform: translateY(10px); } }
.modal-wrap { position: fixed; inset: 0; background: rgba(34, 32, 29, .38); z-index: 90; display: flex; align-items: flex-end; justify-content: center; animation: fade .18s ease; }
.modal-wrap.out { opacity: 0; transition: opacity .18s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--paper); width: 100%; max-width: 560px; max-height: 92vh; display: flex; flex-direction: column; border-radius: 22px 22px 0 0; animation: up .22s ease; padding-bottom: var(--safe-b); }
.modal-wide { max-width: 860px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 8px 22px; }
.modal-head h3 { font-family: var(--serif); font-size: 23px; font-weight: 500; }
.modal-body { padding: 8px 22px 16px; overflow-y: auto; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 12px 22px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
@media (min-width: 640px) { .modal-wrap { align-items: center; } .modal { border-radius: 22px; } }

/* =========================================================
   CLIENT APP
   ========================================================= */
.client-body { background: #e9e2d6; }
.app { max-width: 520px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; background: var(--ivory); position: relative; display: flex; flex-direction: column; }
@media (min-width: 640px) { .app { box-shadow: 0 0 0 1px var(--line), 0 30px 60px -30px rgba(34, 32, 29, .25); } }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px; padding: calc(10px + var(--safe-t)) 14px 10px; background: rgba(247, 243, 236, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar .title { flex: 1; text-align: center; font-weight: 500; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand { font-family: var(--brand-serif); font-size: 22px; letter-spacing: .26em; font-weight: 500; }
.brand small { display: block; font-family: var(--sans); font-size: 9px; letter-spacing: .3em; color: var(--muted); margin-top: -2px; }
.view { flex: 1; padding: 6px 18px calc(110px + var(--safe-b)); }
.view.no-tab { padding-bottom: calc(40px + var(--safe-b)); }
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 520px; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); padding: 8px 6px calc(8px + var(--safe-b)); background: rgba(255, 253, 249, .95); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
.tab { display: flex; flex-direction: column; align-items: center; gap: 3px; text-decoration: none; color: var(--soft); font-size: 10.5px; font-weight: 500; padding: 4px 0; }
.tab.on { color: var(--ink); }
.tab-book .tab-circle { width: 46px; height: 46px; border-radius: 50%; background: var(--ink); color: var(--paper); display: flex; align-items: center; justify-content: center; margin-top: -20px; box-shadow: 0 8px 18px -8px rgba(34, 32, 29, .5); }
.page-head { padding: 12px 0 18px; }
.page-head h1 { margin-top: 6px; }
.page-head p { color: var(--muted); margin-top: 8px; }
.demo-banner { margin: 0 -18px 12px; padding: 7px 18px; background: #f1e9d8; color: #7d6a43; font-size: 11.5px; text-align: center; letter-spacing: .02em; }

/* Home */
.hello { padding: 18px 0 8px; }
.hello h1 { font-size: 36px; }
.hello .tag { color: var(--muted); font-size: 13px; margin-top: 4px; }
.member-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 6px; border-radius: 99px; background: var(--paper); border: 1px solid var(--line); font-size: 12px; font-weight: 500; text-decoration: none; }
.member-chip .dot { width: 18px; height: 18px; border-radius: 50%; background: linear-gradient(135deg, #cdb98f, #8f7a52); }
.metric-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.metric { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 12px; text-decoration: none; color: inherit; }
.metric .v { font-size: 17px; font-weight: 600; margin-top: 2px; font-variant-numeric: tabular-nums; }
.metric .k { font-size: 11px; color: var(--muted); line-height: 1.3; }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quick a { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px 12px; border-radius: 16px; background: var(--paper); border: 1px solid var(--line); text-decoration: none; font-size: 12.5px; font-weight: 500; line-height: 1.3; min-height: 86px; }
.quick a .ic { color: var(--olive); }
.next-appt { display: grid; grid-template-columns: 62px 1fr; gap: 14px; align-items: center; }
.date-block { text-align: center; border-radius: 14px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); padding: 8px 0; }
.card .date-block, .card-flat .date-block { background: var(--sand); border-color: var(--line); }
.date-block .d { font-family: var(--serif); font-size: 30px; line-height: 1; }
.date-block .m { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; opacity: .7; margin-top: 4px; }
.progress { height: 4px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--olive); border-radius: 99px; }
.card-ink .progress { background: rgba(255, 255, 255, .15); }
.card-ink .progress > span { background: var(--champagne); }
.hscroll { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -18px; padding: 2px 18px 6px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; flex: 0 0 78%; }
.tile { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; display: flex; flex-direction: column; }
.tile .art-box { border-radius: 0; aspect-ratio: 16/8; }
.tile-body { padding: 14px 16px 16px; }
.tile-body h4 { font-family: var(--serif); font-size: 20px; font-weight: 500; line-height: 1.2; }
.care-note { border-left: 2px solid var(--champagne); padding: 2px 0 2px 12px; }
.care-note + .care-note { margin-top: 12px; }

/* Membership card */
.mcard { position: relative; border-radius: 22px; padding: 22px; min-height: 210px; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; box-shadow: 0 24px 40px -24px rgba(34, 32, 29, .45); }
.mcard .art { position: absolute; inset: 0; opacity: .22; }
.mcard > * { position: relative; }
.mcard-ivory { background: linear-gradient(135deg, #fbf8f2, #ece3d4); color: var(--ink); }
.mcard-sand { background: linear-gradient(135deg, #e8dcc6, #c9b58f); color: #2b2620; }
.mcard-charcoal { background: linear-gradient(135deg, #2c2a26, #151412); color: #f1ebe0; }
.mcard-charcoal .art { color: #b8a47c; opacity: .3; }
.mcard-olive { background: linear-gradient(135deg, #7a7958, #4e4d36); color: #f5f1e8; }
.mcard .tier { font-family: var(--serif); font-size: 30px; line-height: 1; }
.mcard .mono { font-family: var(--serif); letter-spacing: .3em; font-size: 15px; }
.mcard .meta { display: grid; grid-template-columns: 1fr auto; gap: 4px; font-size: 12px; }
.mcard .meta b { display: block; font-size: 14px; font-weight: 500; letter-spacing: .02em; }

/* Booking */
.steps { display: flex; gap: 6px; margin: 4px 0 18px; }
.steps span { flex: 1; height: 3px; border-radius: 3px; background: var(--line); }
.steps span.on { background: var(--ink); }
.days { display: flex; gap: 8px; overflow-x: auto; margin: 0 -18px; padding: 2px 18px 8px; scrollbar-width: none; }
.days::-webkit-scrollbar { display: none; }
.day { flex: 0 0 62px; border: 1px solid var(--line-2); background: var(--paper); border-radius: 16px; padding: 10px 0; text-align: center; cursor: pointer; }
.day .w { font-size: 11px; color: var(--muted); }
.day .n { font-family: var(--serif); font-size: 24px; line-height: 1.1; }
.day .c { font-size: 10px; color: var(--olive); }
.day.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.day.on .w, .day.on .c { color: #cfc6b8; }
.day.full { opacity: .45; }
.slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.slot { border: 1px solid var(--line-2); background: var(--paper); border-radius: 12px; padding: 10px 0; text-align: center; font-variant-numeric: tabular-nums; cursor: pointer; font-size: 14px; }
.slot:disabled { opacity: .35; cursor: not-allowed; text-decoration: line-through; }
.slot.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.option { display: flex; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); cursor: pointer; width: 100%; text-align: left; }
.option + .option { margin-top: 8px; }
.option.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.option:disabled { opacity: .5; cursor: not-allowed; }
.avatar { width: 42px; height: 42px; flex: none; border-radius: 50%; background: var(--sand); display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 17px; color: var(--ink-2); }
.radio { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-2); flex: none; }
.on > .radio { border: 6px solid var(--ink); }
.sticky-cta { position: sticky; bottom: calc(80px + var(--safe-b)); padding-top: 12px; background: linear-gradient(transparent, var(--ivory) 30%); margin-top: 16px; }
.view.no-tab .sticky-cta { bottom: calc(12px + var(--safe-b)); }

/* Journey timeline */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ''; position: absolute; left: 8px; top: 8px; bottom: 8px; width: 1px; background: var(--line-2); }
.tl-item { position: relative; padding-bottom: 14px; }
.tl-dot { position: absolute; left: -26px; top: 18px; width: 17px; height: 17px; border-radius: 50%; background: var(--paper); border: 1.5px solid var(--line-2); display: flex; align-items: center; justify-content: center; }
.tl-item.done .tl-dot { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.tl-item.booked .tl-dot { border-color: var(--olive); background: #e7eadc; }
.tl-item.review .tl-dot { border-color: var(--warn); background: #f3e8d2; }
.tl-item.cancelled { opacity: .5; }
.tl-card { display: block; text-decoration: none; color: inherit; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.tl-item.next .tl-card { border-color: var(--ink); }
.milestone { font-family: var(--serif); font-size: 20px; color: var(--olive); margin-right: 6px; }
.step-list { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.step-list li { counter-increment: s; display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.step-list li:first-child { border-top: 0; }
.step-list li::before { content: counter(s); width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line-2); display: flex; align-items: center; justify-content: center; font-size: 12px; flex: none; color: var(--muted); }
.tabs { display: flex; gap: 6px; overflow-x: auto; margin: 0 -18px 16px; padding: 0 18px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button, .tabs a { border: 1px solid var(--line-2); background: transparent; padding: 7px 14px; border-radius: 99px; font-size: 13px; cursor: pointer; white-space: nowrap; text-decoration: none; }
.tabs .on { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* Wallet */
.balance-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.balance { border-radius: 16px; padding: 14px; background: var(--paper); border: 1px solid var(--line); }
.balance .k { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.balance .v { font-size: 19px; font-weight: 600; margin-top: 6px; font-variant-numeric: tabular-nums; }
.balance .s { font-size: 11.5px; color: var(--soft); margin-top: 2px; }
.tag-letter { width: 18px; height: 18px; border-radius: 6px; background: var(--sand); display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 600; color: var(--ink-2); }
.txn { display: flex; gap: 12px; align-items: center; }
.txn .t-ic { width: 38px; height: 38px; border-radius: 12px; background: var(--sand); display: flex; align-items: center; justify-content: center; flex: none; color: var(--olive); }
.amount-pos { color: var(--ok); }
.amount-neg { color: var(--ink); }
.receipt { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; position: relative; }
.receipt::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 8px; background: radial-gradient(circle at 6px 8px, var(--ivory) 5px, transparent 5.5px) repeat-x; background-size: 14px 8px; }

/* Article */
.article-body p { font-size: 16px; line-height: 1.75; color: var(--ink-2); }
.notif { display: flex; gap: 12px; padding: 14px 16px; }
.notif.unread { background: #fbf6ec; }
.notif .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--champagne); margin-top: 7px; flex: none; }
.notif.read .dot { background: transparent; }

/* Login */
.login { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; padding: calc(40px + var(--safe-t)) 24px calc(30px + var(--safe-b)); background: var(--ivory); position: relative; overflow: hidden; }
.login .art { position: absolute; left: 0; right: 0; top: 0; height: 46%; opacity: .5; color: var(--champagne); }
.login-inner { position: relative; margin-top: auto; }
.login .brand-xl { font-family: var(--serif); font-size: 44px; letter-spacing: .3em; line-height: 1; }
.login .tagline { font-family: var(--serif); font-size: 21px; font-style: italic; color: var(--ink-2); margin: 18px 0 26px; line-height: 1.3; }
.demo-list { display: grid; gap: 8px; }
.demo-acc { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px dashed var(--champagne); border-radius: 14px; background: var(--paper); cursor: pointer; text-align: left; width: 100%; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* fixes */
.card-ink.card-link { color: var(--paper); }
.card-ink .date-block .d, .card-ink .date-block .m { color: var(--paper); }
.num { white-space: nowrap; }
.login .art { height: 34%; opacity: .35; }
h1, h2, .serif, .milestone, .date-block .d, .day .n, .mcard .tier, .stat .v { font-variant-numeric: lining-nums; font-feature-settings: "lnum" 1; }


/* =========================================================
   V2 — Membership cards, feedback, technology library, team
   ========================================================= */
.mcard-champagne { background: linear-gradient(135deg, #f1e4cc 0%, #dcc49a 55%, #c9ad7f 100%); color: #2e2619; }
.mcard-champagne .art { color: #8f7448; opacity: .28; }
.mcard-graphite { background: linear-gradient(135deg, #4a4946 0%, #2f2e2c 60%, #232220 100%); color: #ecebe7; }
.mcard-graphite .art { color: #a9a7a1; opacity: .22; }
.mcard-noir { background: radial-gradient(120% 140% at 85% 0%, #2a2620 0%, #0f0e0d 55%, #070707 100%); color: #efe6d4; box-shadow: inset 0 0 0 1px rgba(201, 173, 127, .45), 0 24px 40px -24px rgba(0, 0, 0, .6); }
.mcard-noir .art { color: #c9ad7f; opacity: .35; }
.mcard-noir .tier, .mcard-noir .mono { color: #d9c193; }
.mcard-ivory_olive { background: linear-gradient(135deg, #f8f4ea 0%, #e9e3d1 60%, #d5d2b8 100%); color: #3d3c2a; box-shadow: inset 0 0 0 1px rgba(107, 106, 76, .25), 0 24px 40px -24px rgba(34, 32, 29, .35); }
.mcard-ivory_olive .art { color: #6b6a4c; opacity: .25; }
.mcard::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .18) 45%, transparent 60%); pointer-events: none; }
.mcard-sm { min-height: 120px; padding: 14px; border-radius: 16px; }
.mcard-sm .tier { font-size: 20px; }
.card-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tier-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border-radius: 99px; font-size: 11.5px; font-weight: 500; border: 1px solid var(--line); background: var(--paper); }
.tier-chip i { width: 16px; height: 16px; border-radius: 50%; display: inline-block; }
.tone-champagne { background: linear-gradient(135deg, #e7d3ad, #c9ad7f); } .tone-graphite { background: linear-gradient(135deg, #55534f, #262523); }
.tone-noir { background: #0f0e0d; box-shadow: inset 0 0 0 2px #c9ad7f; } .tone-ivory_olive { background: linear-gradient(135deg, #f1ecdd, #8a8862); }
.tone-ivory { background: #ece3d4; } .tone-sand { background: #c9b58f; } .tone-charcoal { background: #2c2a26; } .tone-olive { background: #6b6a4c; }

.metric-big { font-family: var(--serif); font-size: 30px; line-height: 1.05; font-variant-numeric: lining-nums; }
.fin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fin { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 14px; text-decoration: none; color: inherit; }
.fin .k { font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.fin .v { font-size: 18px; font-weight: 600; margin-top: 6px; font-variant-numeric: tabular-nums; }
.fin .s { font-size: 11px; color: var(--soft); margin-top: 2px; }
.fin.wide { grid-column: 1 / -1; }
.fin.alert { border-color: #e2c79a; background: #fbf4e6; }
.fin-hero { background: var(--ink); color: var(--paper); border-radius: 20px; padding: 20px; }
.fin-hero .k { color: #b9b1a5; font-size: 12px; }
.ledger-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 8px 0; border-top: 1px solid var(--line); }
.ledger-row:first-child { border-top: 0; }
.ledger-row.out { color: var(--soft); }

/* Feedback */
.fb-section { margin-top: 22px; }
.fb-q { padding: 14px 0; border-top: 1px solid var(--line); }
.fb-q:first-of-type { border-top: 0; }
.fb-q .prompt { font-size: 14.5px; font-weight: 500; }
.stars { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.stars button { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--paper); cursor: pointer; font-size: 15px; font-variant-numeric: tabular-nums; }
.stars button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.stars .na { width: auto; padding: 0 12px; font-size: 12.5px; }
.skip { font-size: 12px; color: var(--soft); }
.highlight-list { list-style: none; padding: 0; margin: 0; }
.highlight-list li { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; padding: 6px 0; }
.highlight-list li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; margin-top: 7px; background: var(--champagne); flex: none; }
.highlight-list li.symptom::before { background: var(--danger); }
.highlight-list li.doctor::before { background: var(--olive); }

/* Technology library */
.tech-hero { position: relative; border-radius: 22px; overflow: hidden; background: radial-gradient(120% 100% at 80% 0%, #2c2a25, #121110); color: #eee6d6; padding: 22px 20px 20px; min-height: 230px; display: flex; flex-direction: column; justify-content: flex-end; }
.tech-hero .art { position: absolute; inset: 0; color: #b8a47c; opacity: .25; }
.tech-hero > * { position: relative; }
.tech-hero h1 { color: #f6efe2; }
.tech-hero .eyebrow { color: #b9ae9a; }
.viewer { position: relative; border-radius: 20px; overflow: hidden; background: radial-gradient(100% 90% at 50% 20%, #232120, #121110); aspect-ratio: 4/3.4; touch-action: none; user-select: none; }
.viewer canvas { display: block; width: 100% !important; height: 100% !important; cursor: grab; }
.viewer canvas:active { cursor: grabbing; }
.viewer .vlabel { position: absolute; transform: translate(-50%, -50%); font-size: 10.5px; letter-spacing: .03em; color: #efe6d4; background: rgba(18, 17, 16, .72); border: 1px solid rgba(201, 173, 127, .4); padding: 3px 8px; border-radius: 99px; pointer-events: none; white-space: nowrap; transition: opacity .2s; }
.viewer .vbar { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.viewer .vbar button { border: 1px solid rgba(239, 230, 212, .25); background: rgba(18, 17, 16, .7); color: #efe6d4; border-radius: 99px; padding: 6px 11px; font-size: 11.5px; cursor: pointer; display: inline-flex; gap: 5px; align-items: center; }
.viewer .vbar button.on { background: #efe6d4; color: #1a1918; }
.viewer .vtop { position: absolute; top: 10px; left: 12px; right: 12px; display: flex; justify-content: space-between; align-items: center; color: #b9ae9a; font-size: 11px; pointer-events: none; }
.viewer .vtop button { pointer-events: auto; }
.viewer-fallback { color: #d9cfbd; padding: 24px; font-size: 13px; text-align: center; display: flex; align-items: center; justify-content: center; height: 100%; }
.viewer-note { font-size: 11.5px; color: var(--muted); margin-top: 8px; }
.media-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.media-slot { border-radius: 14px; overflow: hidden; border: 1px dashed var(--line-2); background: repeating-linear-gradient(135deg, #f3ede3, #f3ede3 10px, #efe8dc 10px, #efe8dc 20px); aspect-ratio: 4/3; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 10px; gap: 6px; color: var(--muted); font-size: 11.5px; line-height: 1.35; }
.media-slot .ic { color: var(--champagne); }
.media-slot.has { border: 1px solid var(--line); padding: 0; background: var(--sand); }
.media-slot.has img { width: 100%; height: 100%; object-fit: cover; }
.claim { padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.6; }
.claim:first-child { border-top: 0; }
.claim .src { font-size: 11.5px; color: var(--soft); margin-top: 4px; }
.tech-card { display: grid; grid-template-columns: 92px 1fr; gap: 14px; align-items: center; padding: 12px; border-radius: 18px; background: var(--paper); border: 1px solid var(--line); text-decoration: none; color: inherit; }
.tech-card .thumb { width: 92px; height: 92px; border-radius: 14px; overflow: hidden; background: radial-gradient(100% 100% at 70% 0%, #2c2a25, #121110); color: #b8a47c; }
.tech-card .thumb .art { opacity: .6; }

/* Team */
.portrait { width: 64px; height: 64px; border-radius: 18px; background: linear-gradient(160deg, #ece3d4, #d9ccb7); display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 26px; color: var(--ink-2); flex: none; overflow: hidden; }
.portrait-lg { width: 100%; height: auto; aspect-ratio: 4/3; border-radius: 22px; font-size: 64px; flex-direction: column; gap: 6px; }
.portrait-lg small { font-family: var(--sans); font-size: 11px; color: var(--muted); }
.person { display: flex; gap: 14px; align-items: flex-start; padding: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; text-decoration: none; color: inherit; }
.person + .person { margin-top: 10px; }
.filter-row { display: flex; gap: 8px; overflow-x: auto; margin: 0 -18px 10px; padding: 0 18px; scrollbar-width: none; }
.filter-row::-webkit-scrollbar { display: none; }
.filter-row select, .filter-row input { min-height: 38px; padding: 6px 10px; font-size: 13px; width: auto; flex: none; border-radius: 99px; }
.share-box { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, .08); border: 1px dashed rgba(201, 173, 127, .5); font-family: ui-monospace, Menlo, monospace; font-size: 13px; word-break: break-all; }
.option.on .radio { border: 6px solid var(--ink); }
.tier-chip { text-decoration: none; color: inherit; }

.vbar-out { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.vbar-out button { border: 1px solid var(--line-2); background: var(--paper); color: var(--ink); border-radius: 99px; padding: 7px 12px; font-size: 12.5px; cursor: pointer; }
.vbar-out button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.viewer { aspect-ratio: 1 / 1; }
@media (min-width: 640px) { .viewer { aspect-ratio: 4 / 3.2; } }
.viewer .vlabel { font-size: 10px; padding: 2px 7px; }

/* Ảnh thực tế AMASS */
.photo { display: block; width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.art-thumb .photo, .art-box .photo { border-radius: inherit; }
.photo-hero { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--sand); }
.photo-hero .photo { aspect-ratio: 4 / 3; height: auto; }
.photo-hero figcaption { font-size: 11.5px; color: var(--muted); padding: 8px 12px; background: var(--paper); }
.photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.photo-grid figure { margin: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.photo-grid .ph { aspect-ratio: 1 / 1; background: #f4f4f2; }
.photo-grid figcaption { font-size: 11px; color: var(--muted); padding: 8px 10px; line-height: 1.4; }
.photo-grid figcaption b { color: var(--ink-2); font-weight: 500; }
.tech-hero.has-photo { min-height: 360px; }
.tech-hero .hero-photo { position: absolute; inset: 0; background: #f2f2f0; }
.tech-hero .hero-photo .photo { object-fit: contain; padding: 18px 18px 150px; }
.tech-hero.has-photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18,17,16,0) 35%, rgba(18,17,16,.92) 78%); pointer-events: none; }
.tech-hero.has-photo > :not(.hero-photo) { z-index: 1; }
.tech-card .thumb-photo { background: #f2f2f0; }
.tech-card .thumb-photo .photo { object-fit: contain; }
.lightbox { position: fixed; inset: 0; z-index: 120; background: rgba(12,11,10,.92); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; animation: fade .18s ease; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 82vh; border-radius: 12px; object-fit: contain; }
.lightbox p { color: #e9e2d6; font-size: 13px; margin-top: 12px; text-align: center; max-width: 520px; }
.lightbox .icon-btn { position: absolute; top: calc(12px + var(--safe-t)); right: 12px; color: #fff; }
.tech-hero.has-photo { min-height: 0; padding-top: 0; justify-content: flex-start; }
.tech-hero.has-photo::after { display: none; }
.tech-hero.has-photo .hero-photo { position: relative; inset: auto; height: 300px; margin: 0 -20px 18px; background: linear-gradient(180deg, #f6f5f2, #e9e6df); }
.tech-hero.has-photo .hero-photo .photo { object-fit: contain; padding: 16px; }

/* ===== V3: Membership benefits, feedback 5 phần, requests, engagement ===== */
.metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.metric-grid .metric { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.metric-grid .metric .k { font-size: 12px; color: var(--muted); }
.metric-grid .metric .v { font-family: var(--serif); font-size: 21px; margin-top: 4px; }
@media (min-width: 640px) { .metric-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.gift-row { padding: 12px 0; border-top: 1px solid var(--line); }
.gift-row:first-child { border-top: 0; padding-top: 4px; }
.progress-sm { height: 5px; }
.benefit-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; font-size: 13px; }
.benefit-list .pill { font-size: 10px; padding: 1px 7px; margin-right: 4px; }
.tier-policy .mcard-sm { min-height: 92px; }
.checks { display: grid; gap: 8px; }
.check-opt { display: flex; gap: 10px; align-items: center; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; }
.check-opt .box { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line-2, #cfc5b4); display: grid; place-items: center; color: transparent; flex: none; }
.check-opt.on { border-color: var(--ink); background: #f6f1e7; }
.check-opt.on .box { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.check-opt:disabled { cursor: default; opacity: .85; }
.req-row { display: block; padding: 10px 0; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.req-row:first-of-type { border-top: 0; }
.reply { padding: 10px 12px; border-radius: 12px; background: #f6f1e7; margin-top: 8px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 8px; }
.prep-card .btn { margin-top: 12px; }
.milestones { display: grid; gap: 8px; }
.ms { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.ms .ic { color: var(--champagne, #b39363); flex: none; }
.care-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.eng-card { border-left: 3px solid var(--champagne, #b39363); }
.eng-feedback_open, .eng-needs_review { border-left-color: #8a6d3b; }
.highlight-list { margin: 6px 0 0; padding-left: 18px; font-size: 13px; }

/* V11 — cỡ chạm tối thiểu trên điện thoại / máy tính bảng (con trỏ thô) */
@media (pointer: coarse) {
  .btn-sm { min-height: 40px; padding: 0 16px; }
  .chip { min-height: 40px; display: inline-flex; align-items: center; }
  .icon-btn { width: var(--tap); height: var(--tap); }
  .link.xs, button.link { min-height: 32px; }
}
/* Số tiền & số liệu: chữ số cùng độ rộng, dễ so sánh */
.money, .kpi-v, .big, .num, .tbl .r { font-variant-numeric: tabular-nums; }
/* V11 — thành phần dùng chung */
.meta-line { color: var(--soft); margin-top: 6px; line-height: 1.45; }
.ok-t { color: var(--ok); } .warn-t { color: var(--warn); }
.draft-note { margin-bottom: 12px; align-items: center; }
.offline-bar { position: fixed; left: 0; right: 0; top: 0; z-index: 80; background: var(--warn); color: #fff; text-align: center; font-size: 13px; padding: 6px 12px; }
