/* Member profile view/edit parity for mobile, desktop and native app wrapper */
.member-profile-full-panel {
  margin-top: 1rem;
  overflow: hidden;
}
.member-profile-full-head {
  gap: 1rem;
  align-items: flex-start;
}
.member-profile-full-grid,
.member-profile-extra-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.member-profile-full-card,
.member-profile-list-card {
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 24px;
  padding: 1.05rem;
  background: linear-gradient(180deg, #fff, #fbfbf8);
  box-shadow: 0 12px 35px rgba(15, 23, 42, .055);
}
.member-profile-identity-card {
  background: radial-gradient(circle at top left, rgba(18, 133, 104, .15), transparent 45%), linear-gradient(135deg, #0f172a, #124b3f);
  color: #fff;
}
.member-profile-identity-card .member-card-muted,
.member-profile-identity-card .member-app-label { color: rgba(255,255,255,.76); }
.member-profile-identity-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.member-profile-identity-card .avatar-preview,
.member-profile-identity-card img.avatar-preview {
  border: 3px solid rgba(255,255,255,.7);
  box-shadow: 0 14px 30px rgba(0,0,0,.18);
}
.member-profile-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
  margin-top: 1rem;
}
.member-profile-kpi-row span {
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 18px;
  padding: .75rem;
  background: rgba(255,255,255,.1);
}
.member-profile-kpi-row strong,
.member-profile-kpi-row em { display: block; }
.member-profile-kpi-row strong { font-size: 1.25rem; }
.member-profile-kpi-row em { font-size: .75rem; opacity: .8; font-style: normal; }
.member-profile-field-list {
  display: grid;
  gap: .55rem;
  margin-top: .75rem;
}
.member-profile-field-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .7rem .78rem;
  border-radius: 16px;
  background: rgba(15, 23, 42, .035);
}
.member-profile-field-row span {
  color: #64748b;
  font-size: .85rem;
}
.member-profile-field-row strong {
  text-align: right;
  color: #111827;
  font-size: .9rem;
  max-width: 62%;
  overflow-wrap: anywhere;
}
.member-profile-extra-grid {
  margin-top: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.member-mini-list,
.member-chip-list {
  display: grid;
  gap: .6rem;
}
.member-mini-list-row {
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 16px;
  padding: .75rem;
  background: #fff;
}
.member-mini-list-row strong,
.member-mini-list-row small { display: block; }
.member-mini-list-row small { color: #64748b; margin-top: .2rem; }
.member-profile-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border-radius: 999px;
  padding: .55rem .8rem;
  background: rgba(18, 133, 104, .1);
  color: #0f766e;
  font-weight: 800;
  width: max-content;
  max-width: 100%;
}
.member-profile-option-button {
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 18px;
  background: #fff;
  color: inherit;
  padding: .85rem;
  text-align: left;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .25rem .7rem;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .04);
}
.member-profile-option-button span { font-size: 1.2rem; grid-row: span 2; }
.member-profile-option-button strong,
.member-profile-option-button small { display: block; }
.member-profile-option-button small { color: #64748b; }
.member-self-profile-modal .modal-card {
  max-height: calc(100vh - 2rem);
  overflow: auto;
}
.member-self-profile-form .profile-upload-box.compact-upload-box {
  margin-bottom: 1rem;
  border-radius: 22px;
}
.member-self-profile-form input,
.member-self-profile-form select,
.member-self-profile-form textarea {
  font-size: 16px;
}
.member-self-check {
  border: 1px solid rgba(18, 133, 104, .18);
  border-radius: 18px;
  padding: .9rem;
  background: rgba(18, 133, 104, .06);
}
@media (max-width: 900px) {
  .member-profile-full-grid,
  .member-profile-extra-grid { grid-template-columns: 1fr; }
  .member-profile-full-head { flex-direction: column; }
  .member-profile-full-head .btn { width: 100%; }
}
@media (max-width: 640px) {
  .member-profile-full-panel { margin-left: -0.25rem; margin-right: -0.25rem; }
  .member-profile-full-card,
  .member-profile-list-card { border-radius: 22px; padding: .9rem; }
  .member-profile-identity-row { align-items: flex-start; }
  .member-profile-kpi-row { grid-template-columns: 1fr 1fr 1fr; gap: .45rem; }
  .member-profile-kpi-row span { padding: .6rem .5rem; border-radius: 14px; }
  .member-profile-field-row { display: grid; gap: .25rem; }
  .member-profile-field-row strong { max-width: 100%; text-align: left; }
  .member-self-profile-card { width: min(96vw, 720px); border-radius: 24px; }
  .member-self-form-grid { grid-template-columns: 1fr !important; }
}

/* Native/mobile profile modal: keep actions above the app dock and safe area */
body.pyrk-native-app.member-self-profile-open .pyrk-native-dock {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(calc(100% + 28px)) !important;
}
body.pyrk-native-app .member-self-profile-modal {
  z-index: 140;
}
@media (max-width: 680px) {
  .member-self-profile-modal {
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: max(10px, env(safe-area-inset-top)) 10px max(14px, env(safe-area-inset-bottom));
  }
  .member-self-profile-card {
    width: 100%;
    max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    padding-bottom: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .member-self-profile-form .modal-actions {
    position: sticky;
    z-index: 8;
    bottom: 0;
    margin: 16px -18px 0;
    padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(15, 23, 42, .08);
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(16px);
    box-shadow: 0 -14px 30px rgba(15, 23, 42, .08);
  }
  .member-self-profile-form .modal-actions .btn {
    min-height: 50px;
  }
  body.pyrk-native-app .member-self-profile-modal {
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
  }
  body.pyrk-native-app .member-self-profile-card {
    max-height: calc(100dvh - 28px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  }
}
