/* TNH Profile V2 — compact member dashboard */
body:has(#tab-mytrips.active-page) .hdr{display:none!important}
body:has(#tab-mytrips.active-page) #tab-mytrips{padding-top:max(10px,env(safe-area-inset-top))}
#tab-mytrips .main{padding-top:14px!important}
.profile-v2-hero{position:relative;overflow:hidden;margin:0 0 12px;padding:18px;border:1px solid rgba(82,210,240,.18);border-radius:26px;background:linear-gradient(180deg,rgba(6,11,19,.62),rgba(6,11,19,.86)),url('../assets/optimized/IMG_4023-900.webp') center/cover no-repeat;box-shadow:0 18px 45px rgba(0,0,0,.28)}
.profile-v2-hero:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 85% 8%,rgba(56,189,248,.17),transparent 34%),radial-gradient(circle at 10% 100%,rgba(16,185,129,.12),transparent 38%);pointer-events:none}
.profile-v2-topline,.profile-v2-identity,.profile-v2-stats{position:relative;z-index:1}
.profile-v2-topline{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:18px}
.profile-v2-kicker{display:block;color:#38bdf8;font-size:9px;font-weight:900;letter-spacing:1.8px;margin-bottom:3px}.profile-v2-topline h2{margin:0;color:#fff;font-size:22px;line-height:1.15}
.profile-v2-settings{width:38px;height:38px;border:1px solid rgba(148,163,184,.2);border-radius:13px;background:rgba(255,255,255,.045);color:#d9f5ff;font-size:16px}
.profile-v2-identity{display:grid;grid-template-columns:64px minmax(0,1fr) auto;gap:12px;align-items:center}
.profile-v2-avatar-wrap{position:relative;width:64px;height:64px}.profile-v2-avatar{width:64px;height:64px;border-radius:21px;object-fit:cover;border:2px solid rgba(90,218,245,.7);box-shadow:0 8px 22px rgba(0,0,0,.3)}.profile-v2-online{position:absolute;right:-2px;bottom:3px;width:13px;height:13px;border-radius:50%;background:#34d399;border:3px solid #0a1b20}
.profile-v2-name{min-width:0}.profile-v2-name h3{margin:0 0 4px;color:#fff;font-size:19px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.profile-v2-name p{margin:0;color:#7892a0;font-size:11px}
.profile-v2-rank{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:72px}.profile-v2-rank .rank-shield-wrap{width:58px!important;height:58px!important;margin:0!important}.profile-v2-rank .rank-shield-wrap img{width:100%!important;height:100%!important;object-fit:contain}.profile-v2-rank .rank-stars-plain{font-size:13px;white-space:nowrap}.profile-v2-rank>span:last-child{margin-top:2px;color:#f5c86a;font-size:8px;font-weight:800;white-space:nowrap}
.profile-v2-stats{display:grid;grid-template-columns:1fr 1px 1fr 1px 1fr;align-items:center;margin-top:17px;padding:13px 4px 2px;border-top:1px solid rgba(148,163,184,.12)}.profile-v2-stats i{width:1px;height:30px;background:rgba(148,163,184,.14)}.profile-v2-stats div{text-align:center}.profile-v2-stats strong{display:block;color:#e8fbff;font-size:21px;line-height:1}.profile-v2-stats span{display:block;margin-top:5px;color:#738b98;font-size:9px}
.profile-v2-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:0 0 18px}.profile-v2-actions button{display:grid;grid-template-columns:34px 1fr;grid-template-rows:auto auto;column-gap:9px;text-align:left;padding:12px;border:1px solid rgba(148,163,184,.13);border-radius:18px;background:rgba(9,25,30,.78);color:#fff}.profile-v2-actions button>span{grid-row:1/3;display:grid;place-items:center;width:34px;height:34px;border-radius:11px;background:rgba(56,189,248,.1);font-size:16px}.profile-v2-actions b{font-size:11px}.profile-v2-actions small{margin-top:2px;color:#718995;font-size:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.profile-v2-history-head{display:flex;align-items:flex-end;justify-content:space-between;margin:4px 2px 10px}.profile-v2-history-head span{display:block;color:#38bdf8;font-size:8px;font-weight:900;letter-spacing:1.5px}.profile-v2-history-head h3{margin:2px 0 0;color:#fff;font-size:19px}.profile-v2-history-head>strong{color:#718995;font-size:10px;font-weight:600}
#tab-mytrips .profile-v2-filter{margin:0 0 16px;padding:4px;background:rgba(7,20,25,.82);border:1px solid rgba(148,163,184,.12);border-radius:15px;gap:3px}#tab-mytrips .profile-v2-filter .my-payment-filter-btn{min-width:0;flex:1;padding:10px 7px;border-radius:11px;font-size:9px;background:transparent;border:0;box-shadow:none}#tab-mytrips .profile-v2-filter .my-payment-filter-btn.active{background:linear-gradient(135deg,#0ea5e9,#0891b2);color:#fff;box-shadow:0 6px 16px rgba(14,165,233,.2)}
#tab-mytrips .hist-group-title{margin-top:12px;padding:0 3px 8px}#tab-mytrips .hist-card{border-radius:20px!important;min-height:170px;overflow:hidden;border:1px solid rgba(148,163,184,.12);box-shadow:0 12px 28px rgba(0,0,0,.24)}#tab-mytrips .pickup-manage-box{border-radius:0 0 18px 18px!important}
@media(max-width:380px){.profile-v2-identity{grid-template-columns:56px minmax(0,1fr) 64px;gap:9px}.profile-v2-avatar-wrap,.profile-v2-avatar{width:56px;height:56px}.profile-v2-rank .rank-shield-wrap{width:50px!important;height:50px!important}.profile-v2-name h3{font-size:17px}.profile-v2-actions{grid-template-columns:1fr}}

/* Profile identity refinements 2026-09-24 */
.profile-v2-topline{padding-right:0}
.profile-v2-name p.profile-v2-realname{margin:2px 0 0;color:#b7cbd3;font-size:9px;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.profile-v2-name p.profile-v2-phone{margin:2px 0 0;color:#6f8a96;font-size:9px;line-height:1.35;letter-spacing:.15px}
.profile-v2-rank>span:last-child{color:#f5c86a;font-size:8px;font-weight:900;letter-spacing:.2px}

/* 24 Sep 2026 — final profile rank placement + premium logout */
.profile-v2-topline{align-items:center}
.profile-v2-logout{
  position:relative;z-index:2;display:inline-grid;place-items:center;
  width:36px;height:36px;padding:0;border:1px solid rgba(251,113,133,.34);
  border-radius:13px;background:linear-gradient(145deg,rgba(91,24,35,.78),rgba(35,13,20,.9));
  color:#fb7185;font:inherit;cursor:pointer;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.07),0 7px 20px rgba(0,0,0,.22),0 0 0 1px rgba(244,63,94,.04);
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease
}
.profile-v2-logout:hover,.profile-v2-logout:focus-visible{border-color:rgba(251,113,133,.62);box-shadow:inset 0 1px 0 rgba(255,255,255,.09),0 8px 24px rgba(0,0,0,.28),0 0 18px rgba(244,63,94,.16);outline:none}
.profile-v2-logout:active{transform:scale(.94)}
.profile-v2-logout-icon{font-size:17px;line-height:1;filter:drop-shadow(0 0 5px rgba(251,113,133,.22))}
.profile-v2-logout>span:last-child{display:none!important}
.profile-v2-identity{grid-template-columns:64px minmax(0,1fr) 94px}
.profile-v2-rank{min-width:94px;min-height:82px;display:flex;align-items:center;justify-content:center}
.profile-v2-rank .rank-shield-wrap{width:82px!important;height:76px!important;margin:0!important;filter:drop-shadow(0 0 11px rgba(245,200,106,.30))}
.profile-v2-rank .rank-shield-wrap img{width:100%!important;height:100%!important;object-fit:contain}
.profile-v2-rank .rank-stars-plain{display:block;max-width:94px;font-size:15px;line-height:1.3;letter-spacing:-1px;text-align:center;white-space:normal;filter:drop-shadow(0 0 7px rgba(250,204,21,.30))}
.profile-v2-rank-label{display:none!important}
@media(max-width:380px){
  .profile-v2-identity{grid-template-columns:56px minmax(0,1fr) 80px}
  .profile-v2-rank{min-width:80px}
  .profile-v2-rank .rank-shield-wrap{width:70px!important;height:65px!important}
  .profile-v2-rank .rank-stars-plain{max-width:80px;font-size:13px}
  .profile-v2-logout{width:34px;height:34px;border-radius:12px}
}


/* 24 Sep 2026 — FINAL: badge above divider, aligned with Level column */
.profile-v2-identity{
  display:grid!important;
  grid-template-columns:2fr 1fr!important;
  gap:0!important;
  align-items:center!important;
  min-height:88px;
}
.profile-v2-person{
  min-width:0;
  display:flex;
  align-items:center;
  gap:12px;
  padding-right:10px;
}
.profile-v2-rank-above{
  min-width:0;
  min-height:84px;
  display:grid;
  place-items:center;
  align-self:center;
  justify-self:stretch;
  pointer-events:none;
}
.profile-v2-rank-above .rank-shield-wrap{
  width:88px!important;
  height:82px!important;
  margin:0!important;
  filter:drop-shadow(0 0 12px rgba(245,200,106,.34));
}
.profile-v2-rank-above .rank-shield-wrap img{
  width:100%!important;
  height:100%!important;
  object-fit:contain;
}
.profile-v2-rank-above .rank-stars-plain{
  display:block;
  max-width:96px;
  text-align:center;
  font-size:15px;
  line-height:1.25;
  letter-spacing:-1px;
  white-space:normal;
  filter:drop-shadow(0 0 7px rgba(250,204,21,.30));
}
.profile-v2-stats{
  margin-top:14px!important;
  padding-top:13px!important;
}
.profile-v2-stat-rank{
  padding-top:0!important;
  position:static!important;
}
.profile-v2-rank-badge{display:none!important}
@media(max-width:380px){
  .profile-v2-identity{grid-template-columns:2fr 1fr!important;min-height:78px}
  .profile-v2-person{gap:9px;padding-right:6px}
  .profile-v2-avatar-wrap,.profile-v2-avatar{width:56px;height:56px}
  .profile-v2-rank-above{min-height:74px}
  .profile-v2-rank-above .rank-shield-wrap{width:74px!important;height:70px!important}
  .profile-v2-rank-above .rank-stars-plain{max-width:78px;font-size:12px}
}

/* 24 Sep 2026 — FIX: badge occupies the TRUE third column above Level 6 */
.profile-v2-identity{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  column-gap:0!important;
}
.profile-v2-person{
  grid-column:1 / 3!important;
  min-width:0!important;
}
.profile-v2-rank-above{
  grid-column:3!important;
  width:100%!important;
  justify-self:stretch!important;
  place-items:center!important;
  transform:none!important;
  position:static!important;
}
@media(max-width:380px){
  .profile-v2-identity{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .profile-v2-person{grid-column:1 / 3!important}
  .profile-v2-rank-above{grid-column:3!important}
}

/* PROFILE: เปลี่ยนเบาะเอง */
.my-seat-change-note{font-size:13px;color:#9fb3c8;margin:-4px 0 14px}.my-seat-change-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.my-seat-change-cell{min-height:54px;border:1px solid rgba(94,234,212,.24);border-radius:14px;background:rgba(10,38,43,.78);color:#eafffb;font:800 15px/1.1 inherit;box-shadow:inset 0 0 18px rgba(45,212,191,.04)}.my-seat-change-cell small{display:block;font-size:8px;color:#a7f3d0;margin-top:4px}.my-seat-change-cell.is-mine{border-color:#fbbf24;background:rgba(120,72,8,.38);box-shadow:0 0 18px rgba(251,191,36,.12)}.my-seat-change-cell.is-busy{opacity:.38;background:rgba(80,22,30,.58);border-color:rgba(248,113,113,.2)}.my-seat-change-legend{display:flex;align-items:center;justify-content:center;gap:6px;flex-wrap:wrap;margin-top:15px;color:#8fa5b8;font-size:10px}.my-seat-change-legend i{width:9px;height:9px;border-radius:50%;display:inline-block;margin-left:5px}.my-seat-change-legend .mine{background:#fbbf24}.my-seat-change-legend .free{background:#2dd4bf}.my-seat-change-legend .busy{background:#ef4444}
/* ปุ่มเพจผู้จัดทริป (เต็มแถว เด่นด้วยสีทอง) */
.profile-v2-actions .pv2-partner{grid-column:1/-1;border-color:rgba(232,196,120,.55)!important;background:linear-gradient(135deg,rgba(232,196,120,.18),rgba(6,14,22,.6))!important}
.profile-v2-actions .pv2-partner b{color:#f3d48a}
