/* =============================================
   PROFILE PAGE — Premium redesign v2
   ============================================= */

.profile-page {
  gap: 14px;
  padding-top: calc(16px + env(safe-area-inset-top));
}

/* ── Top bar ── */
.profile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.profile-top__spacer { flex: 1; }

.profile-top__icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--text);
  background: var(--surface-strong);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-sm);
  font-size: 15px;
  transition: var(--transition);
}

.profile-top__icon:active { transform: scale(.94); opacity: .8; }

/* ── Hero (avatar + name) ── */
.profile-hero {
  padding: 8px 0 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.profile-avatar {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 26px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow:
    0 0 0 4px var(--bg-0),
    0 0 0 6px color-mix(in srgb, var(--primary) 30%, transparent),
    0 16px 32px color-mix(in srgb, var(--primary) 24%, transparent);
}

.profile-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.profile-name {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -.03em;
  line-height: 1.2;
}

.profile-username {
  font-size: 13px;
  color: var(--muted);
}

.profile-chip {
  min-height: 28px;
  padding: 0 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 8px 20px color-mix(in srgb, var(--primary) 24%, transparent);
}

.profile-date {
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
}

/* ── Wallet Card ── */
.profile-wallet {
  min-height: 96px;
  padding: 16px 18px;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  background: linear-gradient(135deg, #0d1f2d 0%, #1a3a4a 55%, #0e2233 100%);
  box-shadow: 0 16px 40px rgba(8,18,28,.24);
  border: 1px solid rgba(255,255,255,.06);
  position: relative;
  overflow: hidden;
}

.profile-wallet::before {
  content: "";
  position: absolute;
  top: -30px;
  left: -20px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
}

.profile-wallet::after {
  content: "";
  position: absolute;
  bottom: -40px;
  right: 60px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255,255,255,.03);
}

.profile-wallet__copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
}

.profile-wallet__copy span {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,.60);
  letter-spacing: .03em;
  text-transform: uppercase;
}

.profile-wallet__copy strong {
  font-size: 22px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -.03em;
}

.profile-wallet__icon {
  position: relative;
  z-index: 1;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 22px;
  color: rgba(255,255,255,.88);
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.08);
}

/* ── Stats Grid ── */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.profile-stat {
  min-height: 90px;
  padding: 14px 12px;
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-soft);
}

.profile-stat__ico {
  width: 32px;
  height: 32px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 13px;
}

.profile-stat__ico--pink { background: linear-gradient(135deg, var(--rose), #fb9db4); }
.profile-stat__ico--green { background: linear-gradient(135deg, var(--primary), var(--primary-2)); }
.profile-stat__ico--blue { background: linear-gradient(135deg, var(--sky), #93c5fd); }
.input-box i{
  color: var(--jade);
}
.profile-stat__copy {
  display: grid;
  gap: 3px;
  min-width: 0;
  margin-top: 8px;
}

.profile-stat__copy small {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.2;
}

.profile-stat__copy strong {
  font-size: 17px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -.03em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Menu ── */
.profile-menu {
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-soft);
}

.profile-row {
  width: 100%;
  min-height: 56px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  transition: background var(--transition);
}

.profile-row:last-child { border-bottom: 0; }

.profile-row:active { background: var(--surface-soft); }

.profile-row span {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 800;
}

.profile-row > span > i {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: inline-grid;
  place-items: center;
  font-size: 12px;
  color: #fff;
  background: var(--primary);
  flex-shrink: 0;
}

.profile-row > .fa-chevron-left {
  color: var(--muted);
  font-size: 11px;
}

/* Different icon colors for variety */
.profile-row:nth-child(1) > span > i { background: color-mix(in srgb, var(--primary) 100%, transparent); }
.profile-row:nth-child(2) > span > i { background: color-mix(in srgb, var(--sky) 100%, transparent); }
.profile-row:nth-child(3) > span > i { background: color-mix(in srgb, var(--gold) 100%, transparent); }
.profile-row:nth-child(4) > span > i { background: color-mix(in srgb, var(--purple) 100%, transparent); }
.profile-row:nth-child(5) > span > i { background: color-mix(in srgb, var(--rose) 100%, transparent); }
.profile-row:nth-child(6) > span > i { background: color-mix(in srgb, var(--emerald) 100%, transparent); }

/* ── Modals ── */
.profile-modal .modal-sheet {
  width: min(100%, 390px);
  border-radius: 28px;
  padding: 20px;
}

.profile-modal__head { margin-bottom: 16px; }

.profile-form { gap: 12px; }

/* ── Invite sheet ── */
.profile-modal__sheet--invite {
  display: grid;
  gap: 14px;
}

.invite-code {
  min-height: 68px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: .14em;
  border: 2px dashed var(--muted);
}

.invite-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  text-align: center;
}

@media (max-width: 374px) {
  .profile-stat { min-height: 82px; padding: 12px 10px; }
  .profile-stat__copy strong { font-size: 15px; }
  .profile-row { min-height: 52px; padding: 0 14px; }
  .profile-row span { font-size: 12px; }
}

/* ── Profile Premium Enhancements ── */
.profile-avatar {
  transition: transform .25s var(--ease-spring), box-shadow .25s ease;
}
.profile-avatar:active { transform: scale(.96); }

.profile-stat {
  transition: transform .18s var(--ease);
}
.profile-stat:active { transform: scale(.97); }

.profile-row {
  transition: background .15s ease;
}
.profile-row:active { background: color-mix(in srgb, var(--primary) 6%, transparent); }

/* Wallet card elevation */
.profile-wallet {
  transition: transform .2s var(--ease);
}
