.account-row-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #f2eeff;
  color: #4f35c8;
  font-size: 14px;
  font-weight: 750;
}

.account-security-page {
  min-height: 100dvh;
  padding: 0 0 calc(28px + env(safe-area-inset-bottom));
  background: #faf8f5;
}

.account-security-top {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 58px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  padding: 0 14px;
  border-bottom: 1px solid #eee6df;
  background: rgba(250, 248, 245, .96);
  backdrop-filter: blur(14px);
}

.account-security-top h1 {
  margin: 0;
  color: #28252d;
  font-size: 18px;
  line-height: 1.35;
  text-align: center;
}

.account-security-top button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 22px;
  background: transparent;
  color: #28252d;
  font: inherit;
  font-size: 29px;
}

.account-security-content {
  padding: 16px;
}

.account-security-intro {
  padding: 15px 16px;
  border: 1px solid #e4dcff;
  border-radius: 16px;
  background: linear-gradient(135deg, #f6f3ff, #fff);
}

.account-security-intro b {
  color: #28252d;
  font-size: 16px;
}

.account-security-intro p {
  margin: 5px 0 0;
  color: #655e6c;
  font-size: 12px;
  line-height: 1.6;
}

.account-security-content > h2 {
  margin: 22px 2px 10px;
  color: #28252d;
  font-size: 20px;
  line-height: 1.35;
}

.account-security-card {
  overflow: hidden;
  border: 1px solid #eee6df;
  border-radius: 18px;
  background: #fff;
}

.account-security-row {
  width: 100%;
  min-height: 78px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border: 0;
  border-top: 1px solid #eee6df;
  background: #fff;
  color: #28252d;
  font: inherit;
  text-align: left;
}

.account-security-row:first-child { border-top: 0; }
.account-security-row:disabled { opacity: 1; }
.account-row-icon.is-phone { background: #fff2e8; color: #d96719; }
.account-row-icon.is-wechat { background: #eaf8f1; color: #238455; }

.account-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(145deg, #6c4cf1, #9b82ff);
  color: #fff;
  font-size: 16px;
  font-weight: 750;
}

.account-avatar img,
.account-avatar > span {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  object-fit: cover;
}

.account-row-copy { min-width: 0; }
.account-row-copy b { display: block; font-size: 15px; line-height: 1.45; }
.account-row-copy small { display: block; margin-top: 3px; color: #655e6c; font-size: 12px; line-height: 1.5; }
.account-row-action { color: #4f35c8; font-size: 13px; font-weight: 700; white-space: nowrap; }
.account-row-action.is-muted { color: #817a84; font-weight: 500; }

.account-status-badge {
  display: inline-flex;
  margin-left: 5px;
  padding: 2px 7px;
  border-radius: 8px;
  background: #f2eeff;
  color: #4f35c8;
  font-size: 11px;
  font-weight: 700;
  vertical-align: 1px;
}

.account-status-badge.is-ok { background: #eaf8f1; color: #237950; }
.account-status-badge.is-warn { background: #fff2e8; color: #b55b1d; }
.account-status-badge.is-muted { background: #f2f0ee; color: #655e6c; }

.account-referral-form {
  min-height: 88px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}
.account-referral-form label { min-width: 0; }
.account-referral-form b,.account-referral-form small { display: block; }
.account-referral-form b { font-size: 15px; }
.account-referral-form small { margin-top: 3px; color:#655e6c; font-size:12px; }
.account-referral-form input { width:100%; height:42px; box-sizing:border-box; margin-top:10px; padding:0 12px; border:1px solid #d7ceda; border-radius:11px; font:inherit; text-transform:uppercase; }
.account-referral-form > button { min-width:58px; height:42px; border:0; border-radius:11px; background:#6c4cf1; color:#fff; font:inherit; font-weight:700; }

.account-security-helper {
  margin: 14px 0 0;
  padding: 13px 14px;
  border-radius: 12px;
  background: #f2eeff;
  color: #655e6c;
  font-size: 12px;
  line-height: 1.65;
}

.account-security-helper button {
  display: block;
  min-height: 34px;
  margin: 3px 0 -7px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #4f35c8;
  font: inherit;
  font-weight: 700;
}

.account-security-loading {
  margin: 18px 16px;
  padding: 20px;
  color: #655e6c;
  text-align: center;
}

.account-security-loading b { display: block; margin-bottom: 12px; color: #28252d; }
.account-security-loading button { min-height: 44px; padding: 0 18px; border: 0; border-radius: 12px; background: #6c4cf1; color: #fff; font: inherit; }

.account-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(40, 37, 45, .42);
}

.account-sheet {
  width: 100%;
  max-width: 540px;
  max-height: 88dvh;
  overflow: hidden;
  border-radius: 26px 26px 0 0;
  background: #faf8f5;
  box-shadow: 0 -12px 40px rgba(40, 37, 45, .16);
}

.account-sheet > header {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px 0 20px;
  border-bottom: 1px solid #eee6df;
  background: #fff;
}

.account-sheet > header h2 { margin: 0; font-size: 21px; }
.account-sheet > header button { width: 44px; height: 44px; border: 0; background: transparent; color: #655e6c; font: inherit; font-size: 25px; }
.account-sheet-body { max-height: calc(88dvh - 68px); overflow-y: auto; padding: 18px 18px calc(24px + env(safe-area-inset-bottom)); }

.account-profile-editor {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 18px;
  border: 1px solid #eee6df;
  border-radius: 18px;
  background: #fff;
}

.account-avatar-picker {
  display: grid;
  justify-items: center;
  gap: 7px;
  color: #4f35c8;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.account-avatar-picker > img,
.account-avatar-picker > span:first-child {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid #fff;
  border-radius: 50%;
  background: linear-gradient(145deg, #6c4cf1, #9b82ff);
  color: #fff;
  box-shadow: 0 0 0 2px #ded5ff;
  object-fit: cover;
  font-size: 25px;
}

.account-avatar-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.account-profile-editor > label:last-child,
.account-sheet form > label { display: block; margin-top: 16px; }
.account-profile-editor > label:last-child { margin-top: 0; }
.account-profile-editor label > span,
.account-sheet form > label > span { display: block; margin-bottom: 8px; color: #655e6c; font-size: 13px; font-weight: 650; }

.account-profile-editor input,
.account-sheet form > label > input,
.account-code-field {
  width: 100%;
  height: 52px;
  border: 1.5px solid #bdb3c4;
  border-radius: 13px;
  background: #fff;
  color: #28252d;
  font: inherit;
  font-size: 15px;
}

.account-profile-editor input,
.account-sheet form > label > input { padding: 0 14px; }
.account-code-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; overflow: hidden; }
.account-code-field input { min-width: 0; height: 100%; padding: 0 14px; border: 0; background: transparent; font: inherit; font-size: 15px; outline: none; }
.account-code-field button { min-width: 108px; height: 44px; border: 0; background: transparent; color: #4f35c8; font: inherit; font-size: 14px; font-weight: 750; }

.account-sheet-note,
.account-conflict-note {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f2eeff;
  color: #655e6c;
  font-size: 12px;
  line-height: 1.6;
}

.account-conflict-note { background: #fff7ec; color: #79502e; }
.account-primary { width: 100%; height: 52px; margin-top: 20px; border: 0; border-radius: 14px; background: #6c4cf1; color: #fff; font: inherit; font-size: 16px; font-weight: 750; }
.account-primary:disabled { opacity: .58; }

.account-bind-option {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
  border: 1px solid #eee6df;
  border-radius: 16px;
  background: #fff;
}

.account-bind-option + .account-bind-option { margin-top: 12px; }
.account-bind-option b { display: block; font-size: 15px; }
.account-bind-option p { margin: 5px 0 0; color: #655e6c; font-size: 12px; line-height: 1.55; }
.account-bind-option form { margin: 0; }
.account-bind-option > div { min-width: 0; }
.account-bind-option > div > label { display: block; margin-top: 14px; }
.account-bind-option > div > label > span { display: block; margin-bottom: 7px; color: #655e6c; font-size: 13px; font-weight: 650; }
.account-bind-option > div > label > input { width: 100%; height: 50px; padding: 0 13px; border: 1.5px solid #bdb3c4; border-radius: 12px; font: inherit; }
.account-bind-option .account-primary { grid-column: 1 / -1; }

.account-phone-summary {
  padding: 15px 16px;
  border: 1px solid #eee6df;
  border-radius: 14px;
  background: #fff;
}

.account-phone-summary b { display: block; font-size: 15px; }
.account-phone-summary small { display: block; margin-top: 4px; color: #655e6c; font-size: 12px; }

@media (max-width: 420px) {
  .account-security-content { padding: 14px; }
  .account-security-row { padding: 10px 13px; gap: 10px; }
  .account-profile-editor { grid-template-columns: 76px minmax(0, 1fr); padding: 15px; gap: 13px; }
  .account-avatar-picker > img,
  .account-avatar-picker > span:first-child { width: 68px; height: 68px; }
}
