/* 个人中心页：账户信息与令牌区（对齐虚拟网络表格/输入风格） */

body[data-page='profile'] .profile-dl {
  display: grid;
  gap: 0;
  margin: 0 0 1.25rem;
  border: 1px solid #dce5ec;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #ffffff;
}

body[data-page='profile'] .profile-dl > div {
  display: grid;
  grid-template-columns: minmax(6rem, 8rem) 1fr;
  gap: 0.75rem 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e8eef4;
}

body[data-page='profile'] .profile-dl > div:last-child {
  border-bottom: none;
}

body[data-page='profile'] .profile-dl > div:nth-child(odd) {
  background: #f8fafd;
}

body[data-page='profile'] .profile-dl dt {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: #3b4e62;
}

body[data-page='profile'] .profile-dl dd {
  margin: 0;
  font-size: 0.875rem;
  color: #0f172a;
  word-break: break-word;
}

body[data-page='profile'] .profile-username-dd,
body[data-page='profile'] .profile-email-dd {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

body[data-page='profile'] .profile-username-edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  margin: 0;
  padding: 0;
  border: 1px solid #dce5ec;
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: #3b4e62;
  cursor: pointer;
  flex-shrink: 0;
}

body[data-page='profile'] .profile-username-edit:hover {
  border-color: #94a3b8;
  color: #0f172a;
  background: #f8fafd;
}

body[data-page='profile'] .profile-username-edit:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

body[data-page='profile'] .profile-username-edit i {
  font-size: 0.75rem;
}

/* 修改邮箱：与 #llOtpLoginModal 同款布局 */
#emailModalOverlay.neo-login-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10050;
  align-items: center;
  justify-content: center;
  animation: ll-neo-fadeIn 0.3s ease-out;
}

#emailModalOverlay.neo-login-modal.ll-open {
  display: flex;
}

#emailModalOverlay .neo-login-dialog {
  width: 420px;
  min-width: 320px;
  max-width: calc(100vw - 24px);
  height: auto;
  max-height: 90vh;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  animation: ll-neo-slideDown 0.3s ease-out;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
}

#emailModalOverlay .neo-login-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.1);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  padding: 0;
  z-index: 100;
  transition: background 0.3s;
}

#emailModalOverlay .neo-login-close:hover {
  background: rgba(0, 0, 0, 0.2);
}

#emailModalOverlay .neo-login-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#emailModalOverlay .neo-login-right {
  width: 100%;
  padding: 28px 16px 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#emailModalOverlay .neo-login-right-title {
  margin: 8px 0 20px;
  text-align: center;
}

#emailModalOverlay .neo-login-right-title span {
  font-size: 18px;
  font-weight: 700;
  color: #333;
}

#emailModalOverlay .neo-email-otp-form {
  width: 100%;
  max-width: 320px;
  margin: 0;
}

#emailModalOverlay .neo-form-item {
  margin-bottom: 20px;
}

#emailModalOverlay .neo-form-item input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 14px;
  box-sizing: border-box;
  margin-top: 0;
  background: #fff;
  color: #333;
}

#emailModalOverlay .neo-form-item input:focus {
  outline: none;
  border-color: #0067b8;
  box-shadow: 0 0 0 2px rgba(0, 103, 184, 0.1);
}

#emailModalOverlay .neo-otp-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

#emailModalOverlay .neo-otp-row input {
  flex: 1;
  min-width: 0;
}

#emailModalOverlay .neo-email-otp-send {
  flex-shrink: 0;
  padding: 12px 14px;
  white-space: nowrap;
  background: #fff;
  border: 1px solid #0067b8;
  color: #0067b8;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

#emailModalOverlay .neo-email-otp-send:hover {
  background: #0067b8;
  color: #fff;
}

#emailModalOverlay .neo-email-otp-send:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

#emailModalOverlay .neo-login-submit-btn {
  width: 100%;
  padding: 12px;
  background: #0067b8;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

#emailModalOverlay .neo-login-submit-btn:hover {
  background: #005a9e;
}

#emailModalOverlay .neo-login-submit-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

#emailModalOverlay .ll-otp-msg {
  min-height: 20px;
  font-size: 13px;
  color: #ea6f5a;
  line-height: 1.4;
}

#emailModalOverlay .neo-login-footer {
  flex-shrink: 0;
  width: 100%;
  background: #f4f4f4;
  color: #8c8c8c;
  font-size: 12px;
  text-align: center;
  line-height: 44px;
}

/* 修改邮箱结果确认层 */
.mesh-email-result-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10070;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  padding: 16px;
  box-sizing: border-box;
}

.mesh-email-result-overlay:not([hidden]) {
  display: flex;
}

.mesh-email-result-dialog {
  width: 100%;
  max-width: 360px;
  background: #fff;
  border-radius: 8px;
  padding: 28px 24px 22px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
  text-align: center;
  animation: ll-neo-slideDown 0.28s ease-out;
}

.mesh-email-result-msg {
  margin: 0 0 22px;
  font-size: 16px;
  line-height: 1.5;
  color: #323130;
}

.mesh-email-result--success .mesh-email-result-msg {
  color: #107c10;
  font-weight: 600;
}

.mesh-email-result--error .mesh-email-result-msg {
  color: #d13438;
  font-weight: 600;
}

body[data-shell='app'] .mesh-email-result-dialog .mesh-email-result-confirm.btn {
  display: inline-flex;
  margin: 0 auto;
  width: 100%;
  max-width: 200px;
  padding: 0.55rem 1.15rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm, 6px);
}

body[data-shell='app'] .mesh-email-result-dialog .mesh-email-result-confirm.btn-primary {
  background: linear-gradient(105deg, #1e6f9f, #2388b5);
  color: #ffffff;
  border: none;
  box-shadow: none;
  filter: none;
}

body[data-shell='app'] .mesh-email-result-dialog .mesh-email-result-confirm.btn-primary:hover {
  background: linear-gradient(105deg, #155f89, #1c729b);
  color: #ffffff;
  box-shadow: none;
  filter: none;
  transform: translateY(-1px);
}

body[data-shell='app'] .mesh-email-result-dialog .mesh-email-result-confirm.btn-primary:active {
  transform: scale(0.98);
}

#usernameModalOverlay .mesh-username-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

#usernameModalOverlay .mesh-username-modal__head .mesh-modal-title {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}

#usernameModalOverlay .console-field--solo {
  margin-bottom: 0;
}

#usernameModalOverlay .neo-login-close {
  position: relative;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.1);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  padding: 0;
  z-index: 2;
  transition: background 0.3s;
}

#usernameModalOverlay .neo-login-close:hover {
  background: rgba(0, 0, 0, 0.2);
}

#usernameModalOverlay .neo-login-close .ll-otp-close-icon {
  display: block;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

body[data-page='profile'] .profile-token-panel {
  margin: 0 0 1rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid #dce5ec;
  background: #f8fafd;
}

body[data-page='profile'] .profile-token-panel__head {
  margin-bottom: 0.35rem;
}

body[data-page='profile'] .profile-token-panel__title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: #3b4e62;
}

body[data-page='profile'] .profile-token-panel__hint {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.5;
}

body[data-page='profile'] .profile-token-panel__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

body[data-page='profile'] .profile-token-panel__value {
  flex: 1 1 12rem;
  min-width: 0;
  margin: 0;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: #ffffff;
  font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
  font-size: 0.875rem;
  word-break: break-all;
  color: #0f172a;
}

@media (max-width: 520px) {
  body[data-page='profile'] .profile-dl > div {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  body[data-page='profile'] .profile-token-panel__row {
    flex-direction: column;
    align-items: stretch;
  }
}
