/* Theme Mos: approved account layout. */
html .profile-v2 { color: var(--pc-ivory); font-family: var(--pc-sans); }
html .profile-v2 svg { width: 20px; height: 20px; flex: 0 0 auto; stroke-width: 1.6; }
html .profile-v2 a { text-decoration: none; }
html .profile-v2 a:focus-visible, html .profile-v2 button:focus-visible {
  outline: 2px solid var(--pc-gold); outline-offset: 4px;
}
html .profile-v2 button { cursor: pointer; }
html .profile-v2 .pv-eyebrow { color: var(--pc-gold); font: 500 10px/1.5 var(--pc-sans); letter-spacing: .12em; }
html .profile-v2 .pv-grid { display: grid; grid-template-columns: minmax(260px, .32fr) minmax(0, 1fr); align-items: start; gap: 32px; }
html .profile-v2 .pv-sidebar, html .profile-v2 .pv-main { display: flex; min-width: 0; flex-direction: column; gap: 22px; }
html .profile-v2 .pv-card { border: 1px solid var(--pc-line); border-radius: 8px; background: #111315; }

/* บัตรโลหะ: สีเงินเป็นผิวหลัก ทองด้านเป็นรายละเอียด */
html .profile-v2 .pv-member {
  position: relative; isolation: isolate; overflow: hidden; padding: 24px; min-height: 350px;
  border-color: #64696d; background: linear-gradient(105deg, #30363a 0%, #171c20 34%, #0d1115 70%, #101417 100%);
  box-shadow: inset 0 1px 0 #c5c8cc33, 0 10px 28px #0003;
}
html .profile-v2 .pv-member::before, html .profile-v2 .pv-member::after {
  content: ""; position: absolute; z-index: -1; width: 350px; height: 350px;
  right: -196px; top: -205px; border: 1px solid #c5c8cc26; border-radius: 50%;
  box-shadow: 0 18px 0 0 #12171b, 0 19px 0 0 #c5c8cc1a, 0 40px 0 0 #12171b, 0 41px 0 0 #c5c8cc14;
}
html .profile-v2 .pv-member::after { right: -222px; top: -175px; opacity: .6; }
html .profile-v2 .pv-member-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
html .profile-v2 .pv-member-top > span { font: 500 10px/1.5 var(--pc-sans); letter-spacing: .09em; color: var(--pc-gold); }
html .profile-v2 .pv-member-top svg { color: var(--pc-gold); width: 22px; height: 22px; }
html .profile-v2 .pv-tier { width: fit-content; margin: 10px auto 0; padding: 3px 9px; color: #d3d7db; border: 1px solid #c5c8cc30; border-radius: 999px; background: #0c10165c; font-size: 9px; letter-spacing: .08em; line-height: 1.5; }
html .profile-v2 .pv-tier::before { content: ""; display: inline-block; width: 5px; height: 5px; margin-right: 7px; border-radius: 50%; background: #c5c8cc; vertical-align: 1px; }
html .profile-v2 .pv-member-center { display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 22px 0; text-align: center; }
html .profile-v2 .pv-avatar { display: grid; place-items: center; width: 76px; height: 76px; border: 1px solid #555b614f; outline: 1px solid #555b6129; outline-offset: 6px; border-radius: 50%; color: var(--pc-gold-light); font-family: var(--pc-sans); font-size: 34px; font-weight: 600; background: #11171b73; }
html .profile-v2 .pv-member-name { margin: 0 0 6px; font-size: 22px; font-weight: 600; line-height: 1.4; }
html .profile-v2 .pv-phone { color: #a5a7a5; font-size: 13px; letter-spacing: .05em; }
html .profile-v2 .pv-member-bottom { border-top: 1px solid #c5c8cc22; padding-top: 16px; }
html .profile-v2 .pv-member-id { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; color: #a5a7a5; font-size: 11px; }
html .profile-v2 .pv-member-id strong { color: var(--pc-gold-light); font: 400 24px/1 var(--pc-sans); }
html .profile-v2 .pv-progress-label { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 8px; color: #a5a7a5; font-size: 9px; }
html .profile-v2 .pv-progress { height: 3px; margin-top: 8px; background: #5d63664f; border-radius: 2px; }
html .profile-v2 .pv-progress span { display: block; width: 38%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #aa8d53, #e8d6a6); }

html .profile-v2 .pv-bank { padding: 22px; }
html .profile-v2 .pv-bank-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; color: var(--pc-grey); font-size: 12px; }
html .profile-v2 .pv-bank-heading svg:first-child { color: var(--pc-gold); }
html .profile-v2 .pv-bank-heading svg:last-child { width: 14px; height: 14px; }
html .profile-v2 .pv-bank-name { font-size: 14px; color: var(--pc-silver); }
html .profile-v2 .pv-account-number { margin-top: 6px; color: var(--pc-gold-light); font: 400 26px/1.3 var(--pc-sans); letter-spacing: .05em; }
html .profile-v2 .pv-concierge { display: flex; align-items: center; gap: 14px; padding: 16px; transition: border-color .2s; }
html .profile-v2 .pv-concierge:hover { border-color: var(--pc-line-gold); }
html .profile-v2 .pv-concierge > svg:first-child { color: var(--pc-gold); width: 25px; height: 25px; }
html .profile-v2 .pv-concierge > div { min-width: 0; flex: 1; }
html .profile-v2 .pv-concierge strong { display: block; font-size: 12px; font-weight: 400; }
html .profile-v2 .pv-concierge small { display: block; margin-top: 3px; color: var(--pc-grey); font-size: 10px; }
html .profile-v2 .pv-concierge > svg:last-child { color: var(--pc-gold); width: 15px; height: 15px; }

html .profile-v2 .pv-wallet { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 192px; padding: 28px; border-color: #6e5d396e; background: radial-gradient(ellipse at 0 50%, #cdb57b14, transparent 65%), radial-gradient(circle at 90% 20%, #cdb57b0b 0 6px, transparent 9px), radial-gradient(circle at 83% 29%, #cdb57b0a 0 9px, transparent 13px), radial-gradient(circle at 87% 42%, #cdb57b08 0 5px, transparent 8px), #111315; }
html .profile-v2 .pv-wallet-label { display: flex; align-items: center; gap: 8px; color: var(--pc-grey); font-size: 13px; }
html .profile-v2 .pv-refresh { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; border: 0; background: transparent; color: var(--pc-grey); }
html .profile-v2 .pv-refresh:hover { color: var(--pc-gold-light); }
html .profile-v2 .pv-refresh svg { width: 16px; height: 16px; }
/* ใช้ font family/น้ำหนักเดียวกับยอดเงินและตัวเลขหน้าแรก; serif ใช้เฉพาะงานตกแต่งแบรนด์ */
html .profile-v2 .pv-balance { display: flex; align-items: baseline; gap: 12px; margin-top: 12px; color: var(--pc-gold-light); font: 300 54px/1.1 var(--pc-sans); font-variant-numeric: tabular-nums; white-space: nowrap; }
html .profile-v2 .pv-currency { font-size: 24px; }
html .profile-v2 .pv-balance small { margin-left: 2px; color: var(--pc-grey); font: 400 10px/1 var(--pc-sans); }
html .profile-v2 .pv-wallet-actions { flex: 0 1 360px; }
html .profile-v2 .pv-action-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
html .profile-v2 .pv-action { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 10px 16px; border-radius: 5px; border: 1px solid #cdb57b80; color: var(--pc-on-gold); background: var(--pc-gold-grad); font-size: 14px; font-weight: 600; transition: filter .2s; }
html .profile-v2 .pv-action:hover { filter: brightness(1.08); }
html .profile-v2 .pv-action-silver { color: #202326; border-color: #c5c8cc80; background: linear-gradient(110deg, #d6d9dc, #b7bbc0); }
html .profile-v2 .pv-wallet-caption { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 12px; color: var(--pc-grey); font-size: 10px; }
html .profile-v2 .pv-wallet-caption svg { width: 13px; height: 13px; }

html .profile-v2 .pv-info { overflow: hidden; }
html .profile-v2 .pv-info-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--pc-line); }
html .profile-v2 .pv-info-heading h2 { margin: 0; font-size: 17px; font-weight: 600; }
html .profile-v2 .pv-joined { display: flex; gap: 12px; font-size: 11px; }
html .profile-v2 .pv-joined span { color: var(--pc-grey); }
html .profile-v2 .pv-joined time { color: var(--pc-silver); }
html .profile-v2 .pv-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 24px 0; }
html .profile-v2 .pv-metric { min-width: 0; padding: 0 24px; border-left: 1px solid var(--pc-line); }
html .profile-v2 .pv-metric:first-child { border-left: 0; }
html .profile-v2 .pv-metric dt { display: flex; align-items: center; gap: 8px; color: var(--pc-grey); font-size: 11px; white-space: nowrap; }
html .profile-v2 .pv-metric svg { width: 17px; height: 17px; color: var(--pc-silver); }
html .profile-v2 .pv-metric:first-child svg, html .profile-v2 .pv-metric:last-child svg { color: var(--pc-gold); }
html .profile-v2 .pv-metric dd { margin: 20px 0 0; color: #d4d7da; font: 400 32px/1.1 var(--pc-sans); font-variant-numeric: tabular-nums; }

html .profile-v2 .pv-services { padding-top: 3px; }
html .profile-v2 .pv-services-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
html .profile-v2 .pv-services-heading h2 { margin: 0; font-size: 18px; font-weight: 600; }
html .profile-v2 .pv-services-heading > span { font-size: 9px; }
html .profile-v2 .pv-service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
html .profile-v2 .pv-service { display: flex; min-width: 0; align-items: center; gap: 12px; min-height: 94px; padding: 18px 16px; border: 1px solid var(--pc-line); border-radius: 5px; background: #111315; transition: border-color .2s, background .2s; }
html .profile-v2 .pv-service:hover { border-color: var(--pc-line-gold); background: #161819; }
html .profile-v2 .pv-service-icon { display: grid; place-items: center; flex: 0 0 36px; height: 36px; border: 1px solid #34383c; border-radius: 5px; color: var(--pc-silver); background: #101418; }
html .profile-v2 .pv-service-icon svg { width: 21px; height: 21px; color: inherit; }
html .profile-v2 .pv-service-copy { flex: 1; min-width: 0; }
html .profile-v2 .pv-service-copy strong { display: block; font-size: 13px; font-weight: 600; }
html .profile-v2 .pv-service-copy small { display: block; margin-top: 5px; color: var(--pc-grey); font-size: 10px; line-height: 1.6; }
html .profile-v2 .pv-service > svg { width: 14px; height: 14px; color: var(--pc-grey); }
html .profile-v2 .pv-banner { display: flex; align-items: center; justify-content: flex-end; min-height: 72px; margin-top: 32px; padding: 14px 24px; border-radius: 3px; background: linear-gradient(90deg, #0d0e1077, #0d0e1044 50%, #0d0e10e6), url('../assets/images/auth-panel-mobile.webp') center 44% / cover; }
html .profile-v2 .pv-banner p { margin: 0; color: var(--pc-gold-light); font: 500 27px/1.2 var(--pc-serif); text-align: right; }
html .profile-v2 .pv-signature { display: flex; align-items: center; gap: 18px; margin-top: 28px; color: var(--pc-gold); font-size: 9px; letter-spacing: .06em; }
html .profile-v2 .pv-signature::before, html .profile-v2 .pv-signature::after { content: ""; height: 1px; flex: 1; background: linear-gradient(90deg, #c5c8cc50, #c5c8cc9c); }

@media (max-width: 1199px) and (min-width: 768px) {
  html .profile-v2 .pv-grid { grid-template-columns: 260px minmax(0, 1fr); gap: 24px; }
  html .profile-v2 .pv-wallet { flex-wrap: wrap; padding: 24px; gap: 20px; }
  html .profile-v2 .pv-wallet-actions { flex-basis: 100%; }
  html .profile-v2 .pv-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 24px; }
  html .profile-v2 .pv-metric:nth-child(3) { border-left: 0; }
  html .profile-v2 .pv-service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html .profile-v2 .pv-service { padding: 16px 12px; gap: 10px; }
  html .profile-v2 .pv-service-icon { flex-basis: 30px; height: 32px; }
}
/* Desktop typography: เพิ่มขนาดข้อมูลย่อยให้ใช้งานจริงได้ ไม่ย่อเพื่อความสวยอย่างเดียว */
@media (min-width: 768px) {
  html .profile-v2 .pv-eyebrow { font-size: 12px; }
  html .profile-v2 .pv-member-top > span { font-size: 12px; }
  html .profile-v2 .pv-tier { font-size: 11px; }
  html .profile-v2 .pv-phone { font-size: 15px; }
  html .profile-v2 .pv-member-id { font-size: 13px; }
  html .profile-v2 .pv-progress-label { font-size: 11px; }
  html .profile-v2 .pv-bank-heading { font-size: 14px; }
  html .profile-v2 .pv-bank-name { font-size: 16px; }
  html .profile-v2 .pv-account-number { font-size: 29px; }
  html .profile-v2 .pv-concierge strong { font-size: 14px; }
  html .profile-v2 .pv-concierge small { font-size: 12px; }
  html .profile-v2 .pv-wallet-label { font-size: 14px; }
  html .profile-v2 .pv-balance small { font-size: 12px; }
  html .profile-v2 .pv-action { font-size: 15px; }
  html .profile-v2 .pv-wallet-caption { font-size: 12px; }
  html .profile-v2 .pv-info-heading h2 { font-size: 19px; }
  html .profile-v2 .pv-joined { font-size: 13px; }
  html .profile-v2 .pv-metric dt { font-size: 13px; white-space: normal; }
  html .profile-v2 .pv-metric dd { font-size: 34px; }
  html .profile-v2 .pv-service-copy strong { font-size: 15px; }
  html .profile-v2 .pv-service-copy small { font-size: 12px; }
  html .profile-v2 .pv-services-heading > span, html .profile-v2 .pv-signature { font-size: 11px; }
}
@media (max-width: 767px) {
  html .profile-v2 .pv-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  html .profile-v2 .pv-sidebar, html .profile-v2 .pv-main { display: contents; }
  html .profile-v2 .pv-member { order: 1; min-height: 0; padding: 20px; }
  html .profile-v2 .pv-wallet { order: 2; }
  html .profile-v2 .pv-info { order: 3; }
  html .profile-v2 .pv-bank { order: 4; }
  html .profile-v2 .pv-services { order: 5; }
  html .profile-v2 .pv-concierge { order: 6; }
  html .profile-v2 .pv-logout { order: 7; }
  html .profile-v2 .pv-tier { position: static; margin: 10px 0 0; font-size: 8px; }
  html .profile-v2 .pv-member-top > svg { display: none; }
  html .profile-v2 .pv-member-center { flex-direction: row; gap: 20px; padding: 22px 0 20px; text-align: left; }
  html .profile-v2 .pv-avatar { width: 54px; height: 54px; flex: 0 0 54px; font-size: 28px; outline-offset: 4px; }
  html .profile-v2 .pv-member-name { font-size: 19px; margin-bottom: 4px; }
  html .profile-v2 .pv-phone { font-size: 12px; }
  html .profile-v2 .pv-member-bottom { padding-top: 12px; }
  html .profile-v2 .pv-member-id { margin-bottom: 6px; }
  html .profile-v2 .pv-member-id strong { font-size: 21px; }
  html .profile-v2 .pv-wallet { flex-direction: column; align-items: stretch; gap: 22px; min-height: 0; padding: 22px; }
  html .profile-v2 .pv-wallet-actions { flex-basis: auto; }
  html .profile-v2 .pv-wallet-label { justify-content: space-between; font-size: 12px; }
  html .profile-v2 .pv-balance { margin-top: 7px; font-size: 48px; }
  html .profile-v2 .pv-action-buttons { gap: 10px; }
  html .profile-v2 .pv-action { min-height: 46px; font-size: 13px; padding-inline: 10px; }
  html .profile-v2 .pv-wallet-caption { margin-top: 10px; font-size: 10px; }
  html .profile-v2 .pv-info-heading { display: block; padding: 18px 20px; }
  html .profile-v2 .pv-info-heading h2 { font-size: 16px; }
  html .profile-v2 .pv-joined { margin-top: 8px; font-size: 10px; }
  html .profile-v2 .pv-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-block: 20px; row-gap: 22px; }
  html .profile-v2 .pv-metric { padding-inline: 20px; }
  html .profile-v2 .pv-metric:nth-child(3) { border-left: 0; }
  html .profile-v2 .pv-metric dt { font-size: 12px; white-space: normal; }
  html .profile-v2 .pv-metric dd { margin-top: 12px; font-size: 29px; }
  html .profile-v2 .pv-bank { padding: 20px; }
  html .profile-v2 .pv-bank-heading { margin-bottom: 14px; }
  html .profile-v2 .pv-services { padding-top: 6px; }
  html .profile-v2 .pv-services-heading { margin-bottom: 14px; }
  html .profile-v2 .pv-services-heading h2 { font-size: 17px; }
  html .profile-v2 .pv-services-heading > span { font-size: 8px; }
  html .profile-v2 .pv-service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  html .profile-v2 .pv-service { position: relative; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 12px; padding: 16px; min-height: 132px; }
  html .profile-v2 .pv-service-icon { flex: none; width: 32px; height: 32px; }
  html .profile-v2 .pv-service-icon svg { width: 19px; height: 19px; }
  html .profile-v2 .pv-service-copy strong { font-size: 13px; }
  html .profile-v2 .pv-service-copy small { margin-top: 4px; font-size: 11px; }
  html .profile-v2 .pv-service > svg { position: absolute; top: 24px; right: 14px; width: 12px; height: 12px; }
  html .profile-v2 .pv-banner { min-height: 88px; margin-top: 26px; padding: 16px; background-position: 38% center; }
  html .profile-v2 .pv-banner p { max-width: 140px; font-size: 24px; }
  html .profile-v2 .pv-signature { gap: 10px; margin-top: 24px; font-size: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html .profile-v2 a { transition: none; }
}

/* Subtle accents: ฐานดำ/เงินเดิม เพิ่มทองเฉพาะเส้นบางและลายไอคอน */
html .profile-v2 .pv-wallet { border-color: #514732; }
html .profile-v2 .pv-service-icon { color: var(--pc-gold); border-color: #514732; }

/* จับคู่ไอคอนกับกลุ่มข้อความสองบรรทัด ให้มีน้ำหนักและแนวกลางใกล้กัน */
html .profile-v2 .pv-service-icon { flex: 0 0 44px; width: 44px; height: 44px; }
html .profile-v2 .pv-service-icon svg { width: 26px; height: 26px; }
html .profile-v2 .pv-service-copy { display: grid; align-content: center; gap: 4px; }
html .profile-v2 .pv-service-copy small { margin-top: 0; }
html .profile-v2 .pv-service > svg { width: 16px; height: 16px; }
@media (max-width: 767px) {
  html .profile-v2 .pv-service { min-height: 152px; }
  html .profile-v2 .pv-service-icon { flex: none; width: 40px; height: 40px; }
  html .profile-v2 .pv-service-icon svg { width: 24px; height: 24px; }
  html .profile-v2 .pv-service-copy { flex: none; }
  html .profile-v2 .pv-service > svg { top: 28px; right: 16px; }
}

/* ออกจากระบบ: ปุ่มรองสีแดงหม่น กรอบครบ และกึ่งกลางจริงทั้ง v1/v2 */
html body[data-page="profile"] button.mos-logout {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 48px; min-height: 48px; padding: 0 16px;
  border: 1px solid #8d6259; border-radius: 6px;
  background: #1b1517; color: #e9afa5;
  letter-spacing: normal; text-align: center;
  box-shadow: inset 0 1px 0 #ffffff08;
}
html body[data-page="profile"] button.mos-logout .mos-logout-label { display: block; line-height: inherit; letter-spacing: normal; }
html body[data-page="profile"] button.mos-logout svg { width: 20px; height: 20px; flex: 0 0 20px; stroke-width: 1.8; color: inherit; }
@media (hover: hover) and (pointer: fine) {
  html body[data-page="profile"] button.mos-logout:not(:disabled):hover {
    color: #f8cbc2; background-color: #2a1c1f; border-color: #b87b70;
    box-shadow: inset 0 1px 0 #ffffff0d, 0 4px 12px #0002;
  }
}
html body[data-page="profile"] button.mos-logout:not(:disabled):focus-visible {
  outline: 2px solid #e9afa5; outline-offset: 3px;
  box-shadow: 0 0 0 4px #e9afa51a;
}
html body[data-page="profile"] button.mos-logout:not(:disabled):not([aria-disabled="true"]):is(:active, .mos-is-pressed) {
  color: #f8cbc2; background-color: #211619; border-color: #b87b70;
  box-shadow: inset 0 2px 5px #0004;
}
@media (max-width: 767px) {
  html body[data-page="profile"] button.mos-logout { height: 52px; min-height: 52px; }
}
