/* 我的 · 对齐 App ProfileScreen 流式布局（非 Figma 绝对坐标） */

.profile-phone {
  min-height: 100%;
  height: auto;
  max-height: min(100dvh, 100%);
  padding-bottom: 0;
  background: #f8f8f8;
  background-image: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.pf-scroll {
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--tabbar-height) + var(--space-tabbar-bottom) + 16px);
}

/* ---- 头部渐变 ---- */
.pf-header {
  background: linear-gradient(
    180deg,
    #dfffc7 0%,
    #c8f59a 38%,
    #e8f8d0 74%,
    rgba(248, 248, 248, 0) 100%
  );
  padding: 12px 12px 18px;
}

.pf-topbar {
  display: flex;
  align-items: center;
  height: 48px;
}

.pf-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 28px;
  color: #000;
}

.pf-gear {
  margin-left: auto;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.pf-gear img {
  width: 22px;
  height: 22px;
  display: block;
}

.pf-user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.pf-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #fff;
}

.pf-avatar img {
  width: 56px;
  height: 56px;
  display: block;
  object-fit: cover;
}

.pf-user-meta {
  flex: 1;
  min-width: 0;
}

.pf-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pf-name {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 28px;
  color: #000;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pf-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.pf-vip[hidden],
.pf-vip-alt[hidden] {
  display: none !important;
}

.pf-vip {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.18);
  color: #000;
  font-size: 10px;
  font-weight: 500;
  line-height: 14px;
}

.pf-vip-alt {
  background: #000;
  color: #ffe9a2;
}

.pf-invite {
  margin-top: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 400;
  line-height: 17px;
  color: rgba(0, 0, 0, 0.75);
  cursor: pointer;
  font-family: inherit;
}

.pf-copy {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  display: block;
  opacity: 1;
}

/* ---- 白卡 ---- */
.pf-card {
  margin: 0 12px 10px;
  padding: 14px;
  background: #fff;
  border-radius: 14px;
}

.pf-card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 22px;
  color: #140e0e;
}

.pf-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pf-all {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.3);
  text-decoration: none;
}

.pf-all img {
  width: 6px;
  height: 10px;
  opacity: 0.45;
}

/* ---- 资产四格 ---- */
.pf-assets {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  margin-top: 10px;
  min-height: 62px;
}

.pf-asset {
  width: 72px;
  text-align: center;
  text-decoration: none;
  color: #333;
}

.pf-asset b {
  display: block;
  font-size: 18px;
  font-weight: 800;
  line-height: 25px;
  color: #333;
}

.pf-asset span {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.3);
  line-height: 17px;
}

/* ---- 订单五宫格 ---- */
.pf-orders {
  display: flex;
  justify-content: space-evenly;
  margin-top: 8px;
}

.pf-order {
  width: 62px;
  text-align: center;
  text-decoration: none;
  color: #333;
  font-size: 12px;
  line-height: 17px;
}

.pf-order-ico {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 40px;
}

.pf-order-ico img {
  width: 40px;
  height: 40px;
  display: block;
}

.pf-order-ico .oc {
  position: absolute;
  top: -4px;
  right: -8px;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  border-radius: 8px;
  background: #ff2d55;
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  line-height: 16px;
  text-align: center;
  box-sizing: border-box;
}

.pf-order-ico .oc:empty {
  display: none;
}

.pf-order > span:last-child {
  display: block;
  margin-top: 6px;
}

/* ---- 服务列表 ---- */
.pf-services {
  padding-top: 14px;
  padding-bottom: 4px;
}

.pf-services .pf-card-title {
  margin-bottom: 8px;
}

.pf-svc {
  position: relative;
  display: flex;
  align-items: center;
  height: 48px;
  padding: 0 2px;
  text-decoration: none;
  color: #333;
  border-top: 1px solid #f2f2f2;
}

.pf-svc:first-of-type {
  border-top: 0;
}

.pf-svc .si {
  width: 29px;
  height: 29px;
  margin-right: 16px;
  flex-shrink: 0;
}

.pf-svc > span {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  line-height: 14px;
}

.pf-svc .chev {
  width: 6px;
  height: 10px;
  opacity: 0.45;
  flex-shrink: 0;
}

.pf-bottom-spacer {
  height: 12px;
}

/* 底栏固定在 .phone 壳内，不随 pf-scroll 滚动 */
.profile-phone .tabbar {
  position: absolute;
  left: var(--space-tabbar-x);
  right: var(--space-tabbar-x);
  bottom: max(var(--space-tabbar-bottom), env(safe-area-inset-bottom, 0px));
  z-index: 200;
}

@media (max-width: 420px) {
  .profile-phone {
    min-height: 100dvh;
    max-height: none;
    height: 100dvh;
  }

  .pf-scroll {
    padding-bottom: calc(var(--tabbar-height) + max(var(--space-tabbar-bottom), env(safe-area-inset-bottom, 0px)) + 16px);
  }
}
