/* Profile-only shell: full-height layout with no delivery header or page scrolling */
body.profile-tab-active #appHeader {
  display: none;
}

body.profile-tab-active #appMain {
  padding: clamp(12px, 2vh, 18px) 16px clamp(14px, 2.2vh, 20px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overscroll-behavior: none;
}

body.profile-tab-active #bottomNav {
  flex: none;
}

body.profile-tab-active .profile-v2 {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.profile-tab-active .profile-v2-title {
  flex: none;
  margin: 0 3px clamp(12px, 1.8vh, 18px);
  font-size: clamp(24px, 3.4vh, 30px);
  line-height: 1.1;
  letter-spacing: -0.5px;
}

body.profile-tab-active .profile-v2-content {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: clamp(12px, 1.8vh, 18px);
  overflow: hidden;
}

body.profile-tab-active .profile-v2-form-card {
  min-height: 0;
  padding: clamp(16px, 2.2vh, 22px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 24px;
}

body.profile-tab-active .profile-v2-form-card h2 {
  flex: none;
  margin-bottom: clamp(10px, 1.4vh, 15px);
  font-size: clamp(18px, 2.4vh, 22px);
}

body.profile-tab-active .profile-v2-group {
  flex: 1;
  min-height: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

body.profile-tab-active .profile-v2-group label {
  margin: 0 0 clamp(5px, .8vh, 8px) 2px;
  font-size: clamp(12px, 1.55vh, 14px);
}

body.profile-tab-active .profile-v2-field {
  height: clamp(48px, 6.3vh, 58px);
  padding: 0 clamp(13px, 2vw, 17px);
  gap: 12px;
  border-radius: 16px;
}

body.profile-tab-active .profile-v2-field svg {
  width: clamp(20px, 2.7vh, 24px);
  height: clamp(20px, 2.7vh, 24px);
}

body.profile-tab-active .profile-v2-field input {
  font-size: clamp(15px, 2vh, 18px);
}

body.profile-tab-active .profile-v2-save {
  flex: none;
  height: clamp(50px, 6.7vh, 60px);
  margin-top: clamp(9px, 1.2vh, 13px);
  border-radius: 18px;
  font-size: clamp(16px, 2.15vh, 19px);
}

body.profile-tab-active .profile-v2-menu-card {
  flex: none;
  border-radius: 24px;
}

body.profile-tab-active .profile-v2-menu-row {
  min-height: clamp(66px, 8.8vh, 78px);
  padding: 0 clamp(14px, 2.4vw, 18px);
}

body.profile-tab-active .profile-v2-menu-left {
  gap: 14px;
}

body.profile-tab-active .profile-v2-menu-icon {
  width: clamp(43px, 5.8vh, 50px);
  height: clamp(43px, 5.8vh, 50px);
  border-radius: 15px;
}

body.profile-tab-active .profile-v2-menu-icon svg {
  width: clamp(21px, 2.9vh, 25px);
  height: clamp(21px, 2.9vh, 25px);
}

body.profile-tab-active .profile-v2-menu-copy strong {
  font-size: clamp(15px, 2.05vh, 18px);
}

body.profile-tab-active .profile-v2-menu-copy small {
  margin-top: 3px;
  font-size: clamp(11px, 1.5vh, 13px);
}

body.profile-tab-active .profile-v2-arrow {
  font-size: clamp(25px, 3.5vh, 31px);
}

body.profile-tab-active .profile-v2-logout {
  flex: none;
  width: 100%;
  height: clamp(52px, 7vh, 62px);
  margin: 0;
  border-radius: 19px;
  font-size: clamp(17px, 2.3vh, 20px);
}

/* Keep the screen usable on genuinely short devices without creating empty space. */
@media (max-height: 620px) {
  body.profile-tab-active #appMain {
    padding-top: 7px;
    padding-bottom: 8px;
  }

  body.profile-tab-active .profile-v2-title {
    margin-bottom: 7px;
    font-size: 20px;
  }

  body.profile-tab-active .profile-v2-content {
    gap: 7px;
  }

  body.profile-tab-active .profile-v2-form-card {
    padding: 10px 12px;
  }

  body.profile-tab-active .profile-v2-form-card h2 {
    margin-bottom: 5px;
    font-size: 15px;
  }

  body.profile-tab-active .profile-v2-group label {
    margin-bottom: 3px;
    font-size: 10px;
  }

  body.profile-tab-active .profile-v2-field {
    height: 36px;
    border-radius: 11px;
  }

  body.profile-tab-active .profile-v2-field input {
    font-size: 13px;
  }

  body.profile-tab-active .profile-v2-save {
    height: 38px;
    margin-top: 5px;
    font-size: 13px;
  }

  body.profile-tab-active .profile-v2-menu-row {
    min-height: 48px;
  }

  body.profile-tab-active .profile-v2-menu-icon {
    width: 33px;
    height: 33px;
  }

  body.profile-tab-active .profile-v2-logout {
    height: 40px;
    font-size: 14px;
  }
}