/* 微信「我」Tab + 相关二级页 */

.view--settings .view__body {
  background: var(--bg);
}

.view--settings .navbar {
  background: var(--bar-bg);
  box-shadow: none;
}

/* ---------- 资料头 ---------- */

.me-profile {
  width: 100%;
  padding: 24px 16px 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  background: var(--bg-plain);
}

.me-profile:active {
  background: #ececec;
}

[data-theme="dark"] .me-profile:active {
  background: var(--fill);
}

.me-profile .avatar {
  --size: 64px;
  border-radius: 8px;
}

.me-profile__main {
  flex: 1;
  min-width: 0;
}

.me-profile__name {
  display: block;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.35;
}

.me-profile__sub {
  display: block;
  margin-top: 8px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.35;
}

.me-profile__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}

.me-profile__qr {
  display: grid;
  place-items: center;
  color: var(--text-2);
}

.me-profile__qr .icon {
  width: 22px;
  height: 22px;
  fill: currentColor;
  stroke: none;
}

.me-profile__chevron {
  width: 16px;
  height: 16px;
  color: var(--text-3);
  stroke-width: 2.4;
}

/* ---------- 菜单组 ---------- */

.me-group {
  margin-top: 8px;
  background: var(--bg-plain);
}

.me-cell {
  --me-icon: 24px;
  position: relative;
  width: 100%;
  min-height: 56px;
  padding: 0 16px 0 14px;
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  background: var(--bg-plain);
}

.me-cell:active {
  background: #ececec;
}

[data-theme="dark"] .me-cell:active {
  background: var(--fill);
}

.me-cell + .me-cell::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: calc(14px + var(--me-icon) + 16px);
  height: 1px;
  background: var(--separator);
  transform: scaleY(0.5);
}

.me-cell__icon {
  width: var(--me-icon);
  height: var(--me-icon);
  flex: none;
  border-radius: 4px;
  display: grid;
  place-items: center;
  color: var(--on-accent);
}

.me-cell__icon .icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
  stroke: none;
}

.me-cell__icon--service {
  background: var(--accent);
}

.me-cell__icon--fav {
  background: var(--me-fav);
}

.me-cell__icon--moments {
  background: var(--me-moments);
}

.me-cell__icon--cards {
  background: var(--me-cards);
}

.me-cell__icon--sticker {
  background: var(--me-sticker);
}

.me-cell__icon--settings {
  background: var(--me-settings);
}

.me-cell__label {
  flex: 1;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.35;
}

.me-cell__value {
  margin-right: 4px;
  color: var(--text-2);
  font-size: 15px;
}

.me-cell__value[hidden] {
  display: none !important;
}

.me-cell__chevron {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--text-3);
  stroke-width: 2.4;
}

/* ---------- 二级页 ---------- */

.sub-page {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}

.sub-page > .navbar {
  flex: none;
  position: relative;
  background: var(--bar-bg);
  box-shadow: none;
}

.sub-page__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bg);
}

.sub-page__body .msgs-toolbar {
  background: var(--bg-plain);
}

.sub-page__body .search-field {
  background: var(--search-fill);
}

.profile-group {
  margin-top: 8px;
  background: var(--bg-plain);
}

.profile-cell {
  position: relative;
  min-height: 56px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-plain);
}

.profile-cell + .profile-cell::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 16px;
  height: 1px;
  background: var(--separator);
  transform: scaleY(0.5);
}

.profile-cell {
  padding-right: 12px;
}

.profile-cell__label {
  flex: 1;
  color: var(--text);
  font-size: 17px;
}

.profile-cell__value {
  flex: none;
  max-width: 55%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--text-2);
  font-size: 17px;
}

.profile-cell .me-cell__chevron {
  margin-left: 4px;
}

.profile-cell__avatar {
  --size: 56px;
  margin-left: auto;
  border-radius: 8px;
}

.sub-page__body .row--pad {
  padding: 10px 16px;
  background: var(--bg-plain);
}

.profile-cell--link {
  cursor: pointer;
}

.profile-cell--link:active {
  background: var(--fill);
}

/* API 设置表单 */
.api-form {
  margin-top: 8px;
  padding: 16px;
  background: var(--bg-plain);
}

.api-form__hint {
  margin: 0 0 16px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.45;
}

.api-field {
  display: block;
  margin-bottom: 14px;
}

.api-field__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.api-field__label {
  display: block;
  color: var(--text-2);
  font-size: 13px;
}

.api-field__action {
  flex: none;
  padding: 4px 0;
  color: var(--accent);
  font-size: 14px;
  line-height: 1.2;
}

.api-field__action:disabled {
  opacity: 0.5;
}

.api-field__select {
  margin-top: 8px;
}

.api-form__status {
  margin: 8px 0 0;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.4;
}

.api-form__status.is-error {
  color: var(--danger, var(--text-2));
}

.api-field__input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--radius-m);
  background: var(--search-fill);
  color: var(--text);
  font-size: 16px;
  line-height: 1.35;
}

.api-form__save {
  width: 100%;
  margin-top: 8px;
  min-height: 44px;
  border-radius: var(--radius-m);
  background: var(--accent);
  color: var(--on-accent);
  font-size: 17px;
  font-weight: 500;
}
