.qx-auth-wrap {
  max-width: 440px;
  margin: 0 auto;
  padding: 8px 0 32px;
}

.qx-auth-card {
  background: var(--qx-card);
  border-radius: var(--qx-radius);
  box-shadow: var(--qx-shadow);
  padding: 24px 20px;
}

.qx-auth-logo {
  text-align: center;
  margin-bottom: 20px;
}

.qx-auth-logo img {
  max-height: 52px;
  width: auto;
}

.qx-auth-tabs {
  display: flex;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--qx-border);
}

.qx-auth-tabs button {
  flex: 1;
  padding: 12px 8px;
  border: none;
  background: none;
  font-size: 15px;
  color: var(--qx-text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.qx-auth-tabs button.is-active {
  color: var(--qx-brand);
  font-weight: 600;
  border-bottom-color: var(--qx-brand);
}

.qx-auth-tip {
  font-size: 12px;
  color: var(--qx-text-muted);
  margin: 0 0 16px;
  line-height: 1.5;
}

/* 登录/注册页统一输入框（含密码框容器内） */
.qx-auth-card .qx-input,
.qx-auth-card .qx-field input[type="text"],
.qx-auth-card .qx-field input[type="password"],
.qx-auth-card .qx-field input[type="tel"],
.qx-auth-card .qx-pwd-wrap input[type="password"],
.qx-auth-card .qx-pwd-wrap input[type="text"] {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 48px;
  min-height: 48px;
  padding: 0 14px;
  margin: 0;
  border: 1px solid var(--qx-border);
  border-radius: var(--qx-radius-sm);
  font-size: 16px;
  line-height: normal;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  background: #fff;
  color: var(--qx-text);
}

.qx-auth-card .qx-input:focus,
.qx-auth-card .qx-field input:focus,
.qx-auth-card .qx-pwd-wrap input:focus {
  border-color: var(--qx-brand);
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 150, 136, 0.15);
}

.qx-field {
  margin-bottom: 16px;
}

/* 验证码行：与下方登录按钮拉开间距 */
.qx-field-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 20px;
}

.qx-field-row .qx-field {
  flex: 1;
  margin-bottom: 0;
  min-width: 0;
}

.qx-field-code .qx-link-code {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  padding: 0 10px;
  height: 48px;
  font-size: 14px;
  color: var(--qx-brand);
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid var(--qx-border);
  border-radius: var(--qx-radius-sm);
  background: var(--qx-bg);
  box-sizing: border-box;
}

.qx-field-submit {
  margin-top: 4px;
  margin-bottom: 0;
}

.qx-auth-error {
  display: none;
  padding: 10px 12px;
  margin-bottom: 12px;
  background: #fff3f0;
  color: var(--qx-danger);
  border-radius: var(--qx-radius-sm);
  font-size: 13px;
}

.qx-auth-error:not(:empty) {
  display: block;
}

.qx-auth-links {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--qx-text-secondary);
}

.qx-auth-links a {
  color: var(--qx-brand);
  text-decoration: none;
}

.qx-auth-social {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--qx-border);
  text-align: center;
}

.qx-auth-social p {
  font-size: 12px;
  color: var(--qx-text-muted);
  margin: 0 0 12px;
}

.qx-auth-social .qx-btn {
  margin: 4px;
}

/* 密码框 + 显示按钮 */
.qx-pwd-wrap {
  position: relative;
  display: block;
  width: 100%;
  margin-bottom: 16px;
  box-sizing: border-box;
}

.qx-pwd-wrap input[type="password"],
.qx-pwd-wrap input[type="text"] {
  padding-right: 58px;
}

.qx-pwd-toggle {
  position: absolute;
  right: 4px;
  top: 4px;
  bottom: 4px;
  height: auto;
  min-width: 48px;
  padding: 0 12px;
  margin: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--qx-brand);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.qx-pwd-toggle:active {
  opacity: 0.7;
}

.qx-pwd-wrap .qx-security-level {
  margin-top: 8px;
  padding-left: 2px;
  font-size: 12px;
  clear: both;
}

.qx-security-level .lev {
  margin-right: 6px;
  color: var(--qx-text-muted);
}

.qx-security-level.security-level-weak .lev1 { color: var(--qx-danger); }
.qx-security-level.security-level-medium .lev2 { color: var(--qx-warning); }
.qx-security-level.security-level-strong .lev3 { color: var(--qx-success); }

.qx-auth-pane {
  display: none;
}

.qx-auth-pane.is-active {
  display: block;
}

.qx-auth-agreement {
  margin: 0 0 16px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--qx-text-muted);
}

.qx-auth-agreement a {
  color: var(--qx-brand);
}

/* v2 登录/注册：成功/提示弹层（替代未加载 common.css 的旧 modal） */
.hide {
  display: none !important;
}

#modal-dialog-cover {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

#modal-dialog.qx-auth-modal-host {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 9001;
  width: min(360px, calc(100vw - 32px));
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  min-width: 0;
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.qx-auth-modal {
  background: var(--qx-card);
  border-radius: var(--qx-radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  padding: 28px 24px 24px;
  text-align: center;
  animation: qx-auth-modal-in 0.28s ease-out;
}

@keyframes qx-auth-modal-in {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.qx-auth-modal-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  position: relative;
}

.qx-auth-modal-icon--success {
  background: var(--qx-brand-light);
  color: var(--qx-brand);
}

.qx-auth-modal-icon--success::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 46%;
  width: 12px;
  height: 22px;
  margin: -11px 0 0 -8px;
  border: solid currentColor;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
  box-sizing: border-box;
}

.qx-auth-modal-icon--warning,
.qx-auth-modal-icon--info {
  background: #fff8e6;
  color: var(--qx-warning);
}

.qx-auth-modal-icon--warning::before,
.qx-auth-modal-icon--info::before {
  content: '!';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  margin-top: -14px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}

.qx-auth-modal-icon--error {
  background: #fff3f0;
  color: var(--qx-danger);
}

.qx-auth-modal-icon--error::before,
.qx-auth-modal-icon--error::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22px;
  height: 3px;
  margin: -1.5px 0 0 -11px;
  background: currentColor;
  border-radius: 2px;
}

.qx-auth-modal-icon--error::before {
  transform: rotate(45deg);
}

.qx-auth-modal-icon--error::after {
  transform: rotate(-45deg);
}

.qx-auth-modal-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
  color: var(--qx-text);
}

.qx-auth-modal-msg {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--qx-text-secondary);
}

.qx-auth-modal-countdown {
  margin: 0 0 16px;
  font-size: 12px;
  color: var(--qx-text-muted);
}

.qx-auth-modal .qx-auth-modal-ok {
  margin-top: 8px;
}

.qx-link-code.disabled {
  pointer-events: none;
  opacity: 0.55;
  color: var(--qx-text-muted);
}
