/* Isolated Hapycure-style profile module */
.profile-v2 {
  min-height: 100%;
  padding: 4px 0 12px;
  color: var(--ink);
}

.profile-v2-title {
  margin: 4px 2px 12px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.35px;
}

.profile-v2-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile-v2-form-card,
.profile-v2-menu-card {
  border: 1px solid var(--border);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.profile-v2-form-card { padding: 14px; }
.profile-v2-form-card h2 {
  margin-bottom: 12px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.profile-v2-group { margin-bottom: 10px; }
.profile-v2-group label {
  display: block;
  margin: 0 0 6px 2px;
  color: var(--soft);
  font-size: 11px;
  font-weight: 700;
}

.profile-v2-field {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fafcfb;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.profile-v2-field:focus-within { border-color: var(--primary); background: #fff; }
.profile-v2-field.locked { background: var(--surface); }
.profile-v2-field svg {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--primary);
  stroke-width: 2.2;
}
.profile-v2-field input {
  width: 100%;
  min-width: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  -webkit-user-select: text;
  user-select: text;
}
.profile-v2-field input:disabled {
  opacity: 1;
  color: var(--soft);
  -webkit-text-fill-color: var(--soft);
}
.profile-v2-field input::placeholder { color: #9aa59f; font-weight: 550; }

.profile-v2-save {
  width: 100%;
  height: 44px;
  margin-top: 2px;
  border-radius: 15px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(31, 122, 77, .18);
}
.profile-v2-save.edit-mode { background: var(--ink); box-shadow: 0 8px 18px rgba(22, 38, 31, .15); }
.profile-v2-save:active,
.profile-v2-menu-row:active,
.profile-v2-logout:active,
.profile-language-choice:active { transform: scale(.985); }

.profile-v2-menu-card { overflow: hidden; }
.profile-v2-menu-row {
  width: 100%;
  min-height: 62px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.profile-v2-menu-row:last-child { border-bottom: 0; }
.profile-v2-menu-left { min-width: 0; display: flex; align-items: center; gap: 12px; }
.profile-v2-menu-icon {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary);
}
.profile-v2-menu-icon svg { width: 20px; height: 20px; stroke-width: 2.2; }
.profile-v2-menu-copy { min-width: 0; }
.profile-v2-menu-copy strong { display: block; font-size: 14px; font-weight: 800; }
.profile-v2-menu-copy small {
  display: block;
  max-width: 255px;
  margin-top: 3px;
  overflow: hidden;
  color: var(--soft);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.profile-v2-arrow { flex: none; color: #a9b2ad; font-size: 24px; line-height: 1; }

.profile-v2-logout {
  width: 100%;
  height: 48px;
  border-radius: 17px;
  background: var(--ink);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(22, 38, 31, .16);
}

.profile-language-sheet {
  position: fixed;
  inset: 0;
  z-index: 320;
  display: none;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, .38);
  backdrop-filter: blur(2px);
}
.profile-language-sheet.show { display: flex; }
.profile-language-panel {
  width: 100%;
  max-width: 560px;
  padding: 18px 16px calc(22px + env(safe-area-inset-bottom));
  border-radius: 26px 26px 0 0;
  background: #fff;
  animation: profile-sheet-in .24s var(--ease);
}
@keyframes profile-sheet-in { from { transform: translateY(100%); } to { transform: none; } }
.profile-language-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.profile-language-head h2 { font-size: 20px; font-weight: 800; }
.profile-language-close {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  font-size: 22px;
}
.profile-language-choice {
  width: 100%;
  height: 54px;
  margin-top: 10px;
  padding: 0 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid transparent;
  border-radius: 17px;
  background: var(--surface);
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
}
.profile-language-choice.active {
  border-color: #c9e4d3;
  background: var(--primary-soft);
  color: var(--primary);
}
.profile-language-check {
  width: 22px;
  height: 22px;
  display: none;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}
.profile-language-choice.active .profile-language-check { display: grid; }

@media (max-width: 360px) {
  .profile-v2-form-card { padding: 12px; }
  .profile-v2-menu-row { padding: 0 12px; }
  .profile-v2-menu-copy small { max-width: 205px; }
}

@media (prefers-reduced-motion: reduce) {
  .profile-language-panel { animation: none; }
  .profile-v2-save,
  .profile-v2-menu-row,
  .profile-v2-logout,
  .profile-language-choice { transition: none; }
}
