/* 个人中心 — 政务蓝主色 */

.page-profile .app-main {
  background: var(--app-bg);
  padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
}

.page-profile .profile-hero {
  position: relative;
  padding: 14px 16px 20px;
  color: #fff;
  overflow: hidden;
  background: linear-gradient(165deg, #083d96 0%, var(--gov-blue) 55%, #004098 100%);
}

.page-profile .profile-hero__bg {
  position: absolute;
  inset: 0;
  opacity: 0.2;
  background: url("/assets/images/profile-header-bg.svg") center / cover no-repeat;
  pointer-events: none;
}

.page-profile .profile-hero__wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 28px;
  background: linear-gradient(90deg, var(--gov-red) 0%, var(--gov-red) 35%, transparent 35%),
    linear-gradient(90deg, transparent 40%, var(--gov-blue) 60%, var(--gov-blue) 100%);
  opacity: 0.5;
  clip-path: ellipse(120% 100% at 50% 100%);
}

.page-profile .profile-hero__curve {
  position: absolute;
  left: -8px;
  right: -8px;
  bottom: -1px;
  height: 18px;
  background: var(--app-bg);
  border-radius: 16px 16px 0 0;
  z-index: 2;
}

.page-profile .profile-top {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.page-profile .profile-top h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.page-profile .profile-top .btn-setting {
  display: flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  transition: background 0.15s ease;
}

.page-profile .profile-top .btn-setting:active {
  background: rgba(255, 255, 255, 0.28);
}

.page-profile .profile-top .btn-setting svg {
  width: 20px;
  height: 20px;
}

/* 用户信息 */
.page-profile .profile-user {
  position: relative;
  z-index: 3;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.page-profile .profile-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
}

.page-profile .profile-avatar {
  width: 56px;
  height: 56px;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  object-fit: cover;
  background: #e8edf5;
}

.page-profile .profile-avatar-initial {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--gov-blue-deep);
  background: linear-gradient(145deg, #f0f5ff, #d8e6ff);
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
}

.page-profile .profile-user__body {
  flex: 1;
  min-width: 0;
}

.page-profile .profile-user h2 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

.page-profile .profile-user__meta {
  margin: 0 0 6px;
  font-size: 12px;
  opacity: 0.88;
  line-height: 1.4;
}

.page-profile .badge-verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px 3px 8px;
  color: #7a5a00;
  font-size: 11px;
  font-weight: 600;
  background: linear-gradient(90deg, #f8e8a8, #e8c84a);
  border-radius: 20px;
}

.page-profile .profile-auth-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.page-profile .btn-auth-primary,
.page-profile .btn-auth-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  white-space: nowrap;
}

.page-profile .btn-auth-primary {
  color: var(--gov-blue);
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.page-profile .btn-auth-outline {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.page-profile [data-guest-only][hidden],
.page-profile [data-member-only][hidden] {
  display: none !important;
}

/* 邀请区 */
.page-profile .profile-invite--guest .invite-btns {
  opacity: 0.72;
}

.page-profile .profile-invite {
  position: relative;
  z-index: 3;
  margin-top: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  scroll-margin-top: 72px;
}

.page-profile .profile-invite.is-highlight {
  animation: profile-invite-pulse 0.9s ease;
}

@keyframes profile-invite-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
  50% {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35);
  }
}

.page-profile .profile-invite__label {
  display: block;
  font-size: 11px;
  opacity: 0.8;
  margin-bottom: 2px;
}

.page-profile .profile-invite__code {
  display: block;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 2px;
  margin-bottom: 4px;
}

.page-profile .invite-code-tip {
  display: block;
  font-size: 10px;
  opacity: 0.75;
  font-weight: 400;
  line-height: 1.4;
}

.page-profile .invite-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.page-profile .btn-copy {
  padding: 6px 12px;
  color: var(--gov-blue);
  font-size: 12px;
  font-weight: 600;
  background: #fff;
  border: 0;
  border-radius: var(--radius-sm);
}

.page-profile .btn-share {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-sm);
}

.page-profile .btn-share svg {
  width: 14px;
  height: 14px;
}

.page-profile .btn-poster {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  color: #ffe566;
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 229, 102, 0.15);
  border: 1px solid rgba(255, 229, 102, 0.45);
  border-radius: var(--radius-sm);
  text-decoration: none;
}

/* 登记状态条 */
.page-profile .profile-reg-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 14px 10px;
  padding: 12px 14px;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  text-decoration: none;
  color: inherit;
  border-left: 3px solid var(--gov-blue);
}

.page-profile .profile-reg-banner[hidden] {
  display: none !important;
}

.page-profile .profile-reg-banner.is-pending {
  border-left-color: var(--gov-orange);
}

.page-profile .profile-reg-banner.is-approved {
  border-left-color: var(--gov-green);
}

.page-profile .profile-reg-banner.is-rejected {
  border-left-color: var(--gov-red);
}

.page-profile .profile-reg-banner__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: var(--gov-blue);
  border-radius: 10px;
}

.page-profile .profile-reg-banner.is-pending .profile-reg-banner__icon {
  background: var(--gov-orange);
}

.page-profile .profile-reg-banner.is-approved .profile-reg-banner__icon {
  background: var(--gov-green);
}

.page-profile .profile-reg-banner.is-rejected .profile-reg-banner__icon {
  background: var(--gov-red);
}

.page-profile .profile-reg-banner__text {
  flex: 1;
  min-width: 0;
}

.page-profile .profile-reg-banner__text strong {
  display: block;
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 2px;
}

.page-profile .profile-reg-banner__text small {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.page-profile .profile-reg-banner__arrow {
  width: 18px;
  height: 18px;
  color: var(--muted);
  flex-shrink: 0;
}

/* 四账户 */
.page-profile .finance-card {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  margin: -6px 14px 12px;
  position: relative;
  z-index: 4;
  padding: 12px 4px 10px;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 12px rgba(26, 45, 77, 0.08);
}

.page-profile .finance-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
  padding: 6px 2px;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: background 0.12s ease, transform 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

.page-profile .finance-item:active {
  background: #f0f4fa;
  transform: scale(0.97);
}

.page-profile .finance-item .fi-icon {
  width: 30px;
  height: 30px;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.page-profile .finance-item .fi-icon svg {
  width: 18px;
  height: 18px;
  color: #fff;
}

.page-profile .finance-item .fi-label {
  font-size: 10px;
  color: #8c94a3;
  line-height: 1.2;
}

.page-profile .finance-item .fi-sub {
  font-size: 9px;
  color: #b0b8c4;
}

.page-profile .finance-item .fi-amt {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 700;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fi-blue .fi-icon {
  background: var(--gov-blue);
}
.fi-blue .fi-amt {
  color: var(--gov-blue);
}
.fi-orange .fi-icon {
  background: var(--gov-orange);
}
.fi-orange .fi-amt {
  color: var(--gov-orange);
}
.fi-gold .fi-icon {
  background: #d4a017;
}
.fi-gold .fi-amt {
  color: #b8860b;
}
.fi-purple .fi-icon {
  background: var(--gov-purple);
}
.fi-purple .fi-amt {
  color: var(--gov-purple);
}

/* 打卡 */
.page-profile .checkin-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 14px 12px;
  padding: 14px 16px;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
}

.page-profile .checkin-card .ci-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef3fc;
  border-radius: 10px;
}

.page-profile .checkin-card .ci-icon svg {
  width: 24px;
  height: 24px;
  color: var(--gov-blue);
}

.page-profile .checkin-card .ci-text {
  flex: 1;
  min-width: 0;
}

.page-profile .checkin-card .ci-text strong {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.page-profile .checkin-card .ci-text small {
  font-size: 12px;
  color: #8c94a3;
}

.page-profile .checkin-card .ci-action {
  text-align: right;
  flex-shrink: 0;
}

.page-profile .checkin-card .ci-days {
  margin: 0 0 8px;
  font-size: 11px;
  color: #8c94a3;
}

.page-profile .checkin-card .ci-days em {
  color: var(--gov-red);
  font-size: 14px;
  font-style: normal;
  font-weight: 700;
}

.page-profile .btn-checkin {
  padding: 7px 14px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  background: var(--gov-blue);
  border: 0;
  border-radius: 20px;
  white-space: nowrap;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.page-profile .btn-checkin.is-done {
  background: #8c94a3;
  cursor: default;
}

.page-profile .btn-checkin:disabled:not(.is-done) {
  opacity: 0.65;
}

/* 功能宫格 */
.page-profile .section-head {
  margin: 0 0 12px;
  padding: 0 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.page-profile .section-head--inset {
  margin: 0;
  padding: 14px 16px 8px;
}

.page-profile .menu-card {
  margin: 0 14px 12px;
  padding: 14px 10px 16px;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
}

.page-profile .menu-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px 6px;
}

.page-profile .menu-grid a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink);
  text-align: center;
  text-decoration: none;
  border-radius: 8px;
  padding: 4px 2px;
  transition: background 0.12s ease;
}

.page-profile .menu-grid a:active {
  background: #f5f7fb;
}

.page-profile .menu-grid .mi {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}

.page-profile .menu-grid .mi svg {
  width: 22px;
  height: 22px;
  color: #fff;
}

.mi--blue {
  background: linear-gradient(145deg, #3d7ee8, var(--gov-blue));
}
.mi--green {
  background: linear-gradient(145deg, #4cb88a, var(--gov-green));
}
.mi--orange {
  background: linear-gradient(145deg, #f0a050, var(--gov-orange));
}
.mi--red {
  background: linear-gradient(145deg, #e84a4e, var(--gov-red));
}
.mi--purple {
  background: linear-gradient(145deg, #8b7ce8, var(--gov-purple));
}
.mi--gold {
  background: linear-gradient(145deg, #e8c050, #d4a017);
}
.mi--cyan {
  background: linear-gradient(145deg, #5eb0e8, #3a8fd9);
}

/* 列表 */
.page-profile .list-card {
  margin: 0 14px 16px;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.page-profile .list-card a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px solid #f0f2f5;
  text-decoration: none;
  color: inherit;
}

.page-profile .list-card a:active {
  background: #f8f9fc;
}

.page-profile .list-card a:last-of-type {
  border-bottom: 0;
}

.page-profile .list-card .li-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}

.page-profile .list-card .li-icon svg {
  width: 20px;
  height: 20px;
  color: #fff;
}

.page-profile .list-card .li-grow {
  flex: 1;
}

.page-profile .list-card .li-right {
  color: #8c94a3;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 2px;
}

.page-profile .list-card .li-right svg {
  width: 18px;
  height: 18px;
}

.page-profile .list-card-logout {
  display: block;
  width: calc(100% - 28px);
  margin: 0 14px 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
}

.page-profile .list-card-logout:active {
  background: #f5f7fb;
}

@media (max-width: 360px) {
  .page-profile .finance-item .fi-amt {
    font-size: 11px;
  }
  .page-profile .profile-invite__code {
    font-size: 17px;
  }
}
