/* 隐私 / 卡密 / 资料 / 改密 / 实名等 — 移动端子页 */

@media (max-width: 720px) {
  body.mobile-subpage-layout .site-header {
    display: none !important;
  }
}

body.mobile-subpage-layout {
  background: #f5f7fa;
}

body.mobile-subpage-layout .app-shell {
  width: 100%;
  max-width: none;
  padding: 0;
}

body.mobile-subpage-layout .app-shell > main {
  padding: 0;
  max-width: none;
}

.mobile-subpage-shell {
  max-width: 520px;
  margin: 0 auto;
  padding: max(6px, env(safe-area-inset-top, 0px)) 0 16px;
  box-sizing: border-box;
}

body.mobile-tab-shell .mobile-subpage-shell {
  padding-bottom: calc(var(--mobile-tab-bar-clearance, calc(58px + env(safe-area-inset-bottom, 0px))) + 12px);
}

.mobile-subpage-shell .mobile-home-header {
  padding-left: 16px;
  padding-right: 16px;
  margin-bottom: 12px;
}

.mobile-subpage-shell .mobile-home-header--no-search {
  margin-bottom: 14px;
}

/* 返回 + 标题顶栏 */
.mobile-subpage-topbar {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 0 16px;
}

.mobile-subpage-topbar__back {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: #344054;
  text-decoration: none;
  background: #fff;
  border: 1px solid #eef2f6;
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.04);
}

.mobile-subpage-topbar__title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #101828;
  text-align: center;
  line-height: 1.25;
}

.mobile-subpage-topbar__trailing {
  min-width: 40px;
  display: flex;
  justify-content: flex-end;
}

.mobile-subpage-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.mobile-subpage-badge--success {
  color: #027a48;
  background: #ecfdf3;
  border: 1px solid #abefc6;
}

.mobile-subpage-badge--warning {
  color: #b54708;
  background: #fffaeb;
  border: 1px solid #fedf89;
}

.mobile-subpage-badge--danger {
  color: #b42318;
  background: #fef3f2;
  border: 1px solid #fecdca;
}

.mobile-subpage-badge--muted {
  color: #667085;
  background: #f2f4f7;
  border: 1px solid #eaecf0;
}

.mobile-subpage-content {
  padding: 0 16px 8px;
  box-sizing: border-box;
}

.mobile-subpage-content.policy-page,
.mobile-subpage-content.auth-wrap {
  padding-left: 16px;
  padding-right: 16px;
}

.mobile-subpage-content .policy-card,
.mobile-subpage-content .auth-card,
.mobile-subpage-content .card {
  margin-top: 0;
}

/* 通用卡片 */
.mobile-subpage-card {
  margin-bottom: 12px;
  padding: 16px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #eef2f6;
  box-shadow: 0 2px 12px rgba(16, 24, 40, 0.05);
  box-sizing: border-box;
}

.mobile-subpage-card__head {
  margin-bottom: 14px;
}

.mobile-subpage-card__title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 800;
  color: #101828;
  line-height: 1.3;
}

.mobile-subpage-card__desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: #667085;
  font-weight: 500;
}

.mobile-subpage-card__desc--block {
  margin-bottom: 14px;
}

/* 表单 */
.mobile-subpage-form {
  display: grid;
  gap: 14px;
}

.mobile-subpage-field {
  display: grid;
  gap: 8px;
  margin: 0;
}

.mobile-subpage-field--grow {
  flex: 1 1 160px;
  min-width: 0;
}

.mobile-subpage-field__label {
  font-size: 13px;
  font-weight: 700;
  color: #344054;
}

.mobile-subpage-input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid #e4e7ec;
  background: #fff;
  color: #101828;
  font-size: 15px;
  font-weight: 500;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.mobile-subpage-input::placeholder {
  color: #98a2b3;
}

.mobile-subpage-input:focus {
  outline: none;
  border-color: #84caff;
  box-shadow: 0 0 0 3px rgba(30, 128, 255, 0.12);
}

.mobile-subpage-input--readonly {
  cursor: default;
  color: #475467;
  background: #f9fafb;
  border-color: #eaecf0;
}

.mobile-subpage-sms-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
}

.mobile-subpage-sms-row--phone {
  align-items: stretch;
}

.mobile-subpage-sms-row--phone .mobile-subpage-input {
  flex: 1 1 140px;
  min-width: 0;
}

.mobile-subpage-sms-btn {
  flex: 0 0 auto;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid #b2ddff;
  background: #eff8ff;
  color: #175cd3;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.mobile-subpage-sms-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.mobile-subpage-submit {
  width: 100%;
  min-height: 48px;
  margin-top: 2px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #1e80ff 0%, #0066ff 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(30, 128, 255, 0.22);
}

.mobile-subpage-submit:active {
  transform: translateY(1px);
}

.mobile-subpage-outline-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid #b2ddff;
  background: #eff8ff;
  color: #175cd3;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  box-sizing: border-box;
}

.mobile-subpage-outline-btn__icon,
.mobile-subpage-notice__icon--wechat {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-image: none;
}

.mobile-subpage-notice__icon--wechat svg,
.mobile-subpage-outline-btn__icon--wechat svg {
  display: block;
  width: 20px;
  height: auto;
  max-height: 20px;
  flex-shrink: 0;
}

/* 提示块 */
.mobile-subpage-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.6;
  color: #344054;
}

.mobile-subpage-notice:last-child {
  margin-bottom: 0;
}

.mobile-subpage-notice p {
  margin: 0;
}

.mobile-subpage-notice a {
  color: #1e80ff;
  font-weight: 700;
  text-decoration: none;
}

.mobile-subpage-notice--info {
  background: #eff8ff;
  border: 1px solid #b2ddff;
  color: #175cd3;
}

.mobile-subpage-notice--success {
  background: #ecfdf3;
  border: 1px solid #abefc6;
  color: #027a48;
}

.mobile-subpage-notice--warning {
  background: #fffaeb;
  border: 1px solid #fedf89;
  color: #b54708;
}

.mobile-subpage-notice--danger {
  background: #fef3f2;
  border: 1px solid #fecdca;
  color: #b42318;
}

.mobile-subpage-notice--muted {
  background: #f9fafb;
  border: 1px solid #eaecf0;
  color: #667085;
}

/* 列表菜单 */
.mobile-subpage-menu {
  display: grid;
}

.mobile-subpage-menu__item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 10px 0;
  text-decoration: none;
  color: #344054;
  border-bottom: 1px solid #f0f2f5;
}

.mobile-subpage-menu__item:last-child {
  border-bottom: 0;
}

.mobile-subpage-menu__icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background-color: #eff6ff;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 20px 20px;
}

.mobile-subpage-menu__icon--lock {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e80ff' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E");
}

.mobile-subpage-menu__icon--logout {
  background-color: #fef3f2;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d92d20' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/%3E%3Cpath d='M16 17l5-5-5-5M21 12H9'/%3E%3C/svg%3E");
}

.mobile-subpage-menu__label {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
}

.mobile-subpage-menu__chev {
  flex-shrink: 0;
  font-size: 18px;
  color: #c4cdd5;
  font-weight: 300;
}

.mobile-subpage-menu__item--danger .mobile-subpage-menu__label {
  color: #d92d20;
}

/* —— 编辑资料 —— */
.mobile-profile-card--avatar {
  padding-top: 20px;
  padding-bottom: 18px;
}

.mobile-profile-avatar-form {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.mobile-profile-avatar-picker {
  position: relative;
  display: block;
  cursor: pointer;
}

.mobile-profile-avatar-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.mobile-profile-avatar-ring {
  display: block;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #fff;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.12), 0 0 0 1px rgba(30, 128, 255, 0.12);
}

.mobile-profile-avatar-ring img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.mobile-profile-avatar-badge {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #1e80ff 0%, #0066ff 100%);
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 0 4px 12px rgba(30, 128, 255, 0.28);
}

.mobile-profile-avatar-hint {
  margin: 0;
  font-size: 12px;
  color: #98a2b3;
  text-align: center;
}

.mobile-profile-phone-current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f9fafb;
  border: 1px solid #eaecf0;
}

.mobile-profile-phone-current__label {
  font-size: 13px;
  font-weight: 600;
  color: #667085;
}

.mobile-profile-phone-current__value {
  font-size: 16px;
  font-weight: 800;
  color: #101828;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.mobile-profile-card--menu {
  padding-top: 14px;
  padding-bottom: 8px;
}

.mobile-profile-card--menu .mobile-subpage-card__head {
  margin-bottom: 4px;
}

/* —— 实名认证 —— */
.mobile-realname-content > .mobile-subpage-notice {
  margin-bottom: 12px;
}

.mobile-realname-success {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 12px 8px 8px;
  text-align: center;
}

.mobile-realname-success__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  color: #12b76a;
  background: #ecfdf3;
  border: 1px solid #abefc6;
}

.mobile-realname-success__title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #101828;
}

.mobile-realname-success__desc {
  margin: 0;
  max-width: 280px;
  font-size: 14px;
  line-height: 1.6;
  color: #667085;
}

.mobile-realname-form {
  margin-top: 14px;
}

@media (max-width: 380px) {
  .mobile-subpage-sms-row {
    flex-direction: column;
    align-items: stretch;
  }

  .mobile-subpage-sms-btn {
    width: 100%;
  }
}
