/* 登录/注册：顶部导航 + 背景图 + 居中卡片（参考阿里云） */

.auth-page {
  min-height: 100vh;
  background: #f5f7fa;
}

.auth-page .header-auth {
  position: relative;
  z-index: 20;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

.auth-header-tip {
  font-size: 14px;
  color: #666;
  margin-right: 8px;
}

.auth-header-link {
  font-size: 14px;
  color: #0064ff;
  text-decoration: none;
  font-weight: 500;
}

.auth-header-link:hover {
  color: #0052d9;
  text-decoration: underline;
}

/* 背景区域：不覆盖顶部 header，从 header 下方开始 */
.auth-bg {
  min-height: calc(100vh - 70px);
  padding: 106px 20px 56px;
  background-color: #eef3fb;
  background-image: url('/static/web/image/login_background.png');
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.auth-center {
  width: 100%;
  max-width: 920px;
}

/* 表单上方文案 */
.auth-hero {
  text-align: center;
  margin-bottom: 28px;
}

.auth-hero-title {
  font-size: 38px;
  font-weight: 700;
  color: #181818;
  line-height: 1.35;
  letter-spacing: 0.5px;
}

.auth-hero-gradient {
  display: inline-block;
  font-weight: 700;
  background: linear-gradient(90deg, #ff6a00 0%, #ff4d4f 35%, #e040fb 70%, #7b61ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.auth-hero-features {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
  color: #666;
  line-height: 1.5;
}

.auth-hero-features li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.auth-hero-features li::before {
  content: '';
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  background: linear-gradient(135deg, #ff6a00 0%, #ff4d4f 100%);
  clip-path: polygon(50% 0%, 61% 38%, 98% 38%, 68% 59%, 79% 96%, 50% 74%, 21% 96%, 32% 59%, 2% 38%, 39% 38%);
}

.auth-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 12px 48px rgba(15, 35, 75, 0.12);
  overflow: hidden;
}

.auth-card-body {
  display: flex;
  min-height: 430px;
}

/* 左侧二维码 */
.auth-qr-panel {
  width: 42%;
  min-width: 280px;
  padding: 36px 28px 32px;
  border-right: 1px solid #ebebeb;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.auth-qr-panel-simple {
  justify-content: center;
}

.auth-qr-panel-forgot .auth-side-title-center {
  align-self: center;
  width: 100%;
  text-align: center;
  margin-bottom: 16px;
}

.auth-qr-panel-forgot .auth-qr-tip-muted {
  text-align: center;
}

.auth-side-title {
  align-self: flex-start;
  font-size: 24px;
  font-weight: 600;
  color: #181818;
  margin-bottom: 28px;
}

.auth-side-title-center {
  align-self: center;
  width: 100%;
  text-align: center;
}

.auth-forgot-pwd-section {
  margin-top: 4px;
}

.auth-forgot-pwd-section .auth-field + .auth-field {
  margin-top: 16px;
}

.auth-qr-tip {
  font-size: 14px;
  line-height: 1.7;
  color: #333;
  margin-bottom: 22px;
}

.auth-qr-tip-muted {
  color: #666;
  margin-bottom: 0;
}

.auth-qr-brand {
  color: #07c160;
  font-weight: 600;
}

.auth-qr-box {
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-qr-img {
  width: 180px;
  height: 180px;
  object-fit: contain;
  display: block;
}

.auth-qr-img[src]:not([src=""]) {
  display: block;
}

.auth-qr-placeholder {
  width: 180px;
  height: 180px;
  border: 1px solid #e5e6eb;
  border-radius: 4px;
  background:
    linear-gradient(45deg, #f7f8fa 25%, transparent 25%),
    linear-gradient(-45deg, #f7f8fa 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f7f8fa 75%),
    linear-gradient(-45deg, transparent 75%, #f7f8fa 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-qr-placeholder-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: linear-gradient(135deg, #07c160 0%, #06ae56 100%);
  opacity: 0.85;
}

.auth-qr-placeholder-text {
  font-size: 12px;
  color: #86909c;
}

/* 右侧表单 */
.auth-card-main {
  flex: 1;
  min-width: 0;
  padding: 36px 48px 40px;
  position: relative;
}

.auth-card-switch {
  position: static;
  flex-shrink: 0;
  font-size: 14px;
  color: #0064ff;
  text-decoration: none;
  line-height: 32px;
}

.auth-card-switch:hover {
  text-decoration: underline;
}

/* 登录 Tab */
.auth-login-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-top: 4px;
  margin-bottom: 4px;
}

.auth-tabs {
  display: flex;
  align-items: flex-end;
  gap: 28px;
  flex-wrap: wrap;
}

.auth-tabs-forgot {
  gap: 24px;
}

.auth-tabs-forgot .auth-tab {
  font-size: 15px;
  white-space: nowrap;
}

.auth-tab {
  border: none;
  background: transparent;
  padding: 0 0 10px;
  font-size: 16px;
  line-height: 1.4;
  color: #666;
  cursor: pointer;
  position: relative;
}

.auth-tab:hover {
  color: #333;
}

.auth-tab.is-active {
  color: #181818;
  font-weight: 600;
}

.auth-tab.is-active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: #0064ff;
  border-radius: 2px;
}

.auth-form-login {
  margin-top: 28px;
}

.auth-input-labeled .auth-input-label {
  flex-shrink: 0;
  width: 72px;
  box-sizing: border-box;
  padding: 0 12px;
  font-size: 14px;
  color: #333;
  border-right: 1px solid #e5e6eb;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  white-space: nowrap;
}

.auth-input-labeled .auth-input {
  padding-left: 12px;
}

.auth-input-password {
  padding-right: 44px;
}

.auth-input-password .auth-input {
  padding-right: 8px;
}

.auth-pwd-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  border: none;
  background: transparent;
  color: #999;
  cursor: pointer;
  padding: 4px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-pwd-toggle:hover {
  color: #666;
}

.auth-pwd-icon {
  display: block;
  flex-shrink: 0;
}

.auth-pwd-icon-hide {
  display: none;
}

.auth-pwd-toggle.is-visible .auth-pwd-icon-show {
  display: none;
}

.auth-pwd-toggle.is-visible .auth-pwd-icon-hide {
  display: block;
}

.auth-form-actions-end {
  justify-content: flex-end;
  margin-top: -4px;
}

.auth-field-tip {
  margin: 6px 0 0;
  font-size: 12px;
  color: #86909c;
  line-height: 1.5;
}

.auth-avatar-upload {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.auth-avatar-label {
  width: 72px;
  flex-shrink: 0;
  font-size: 14px;
  color: #333;
}

.auth-avatar-box {
  width: 72px;
  height: 72px;
  border: 1px dashed #dcdfe6;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fafafa;
}

.auth-avatar-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-avatar-placeholder {
  font-size: 13px;
  color: #86909c;
}

.auth-card-main .auth-card-switch {
  position: absolute;
  top: 28px;
  right: 36px;
}

.auth-card-main:has(.auth-login-head) .auth-card-switch {
  position: static;
}

.auth-card-main:has(.auth-login-head) {
  padding-top: 32px;
}

.auth-form {
  width: 100%;
  max-width: 300px;
  margin-top: 48px;
}

.auth-modal .auth-form,
.auth-modal .auth-form-compact {
  max-width: 280px;
  margin-top: 20px;
  margin-left: auto;
  margin-right: auto;
}

.auth-form-compact {
  margin-top: 56px;
}

.auth-field {
  margin-bottom: 18px;
}

.auth-input-wrap {
  display: flex;
  align-items: center;
  height: 44px;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  position: relative;
}

.auth-input-wrap:focus-within {
  border-color: #0064ff;
  box-shadow: 0 0 0 2px rgba(0, 100, 255, 0.1);
}

.auth-input-prefix {
  flex-shrink: 0;
  padding: 0 12px;
  font-size: 14px;
  color: #666;
  border-right: 1px solid #e5e6eb;
  height: 100%;
  display: flex;
  align-items: center;
}

.auth-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: none;
  outline: none;
  padding: 0 12px;
  font-size: 14px;
  color: #181818;
  background: transparent;
}

.auth-input-full {
  width: 100%;
  padding: 0 12px;
}

.auth-input-with-action {
  position: relative;
  padding-right: 108px;
}

.auth-input-with-action .auth-input-full {
  padding-right: 8px;
}

.auth-code-link {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #0064ff;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  white-space: nowrap;
}

.auth-code-link:hover:not(:disabled) {
  color: #0052d9;
  text-decoration: underline;
}

.auth-code-link:disabled {
  color: #c9cdd4;
  cursor: not-allowed;
  text-decoration: none;
}

.auth-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.auth-checkbox {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: #666;
  cursor: pointer;
  line-height: 1.5;
}

.auth-checkbox input {
  margin-top: 3px;
  flex-shrink: 0;
}

.auth-checkbox-block {
  display: flex;
  margin: 8px 0 20px;
}

.auth-link {
  color: #0064ff;
  text-decoration: none;
}

.auth-link:hover {
  text-decoration: underline;
}

.auth-link:visited,
.auth-link:active {
  color: #0064ff;
}

.auth-btn-primary {
  width: 100%;
  height: 44px;
  border: none;
  border-radius: 4px;
  background: #0064ff;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.auth-form-note {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: #999;
  text-align: center;
}

.auth-form-note--highlight {
  color: #0064ff;
  font-weight: 500;
}

.auth-onboard-links {
  margin: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 14px;
  line-height: 1.6;
  color: #666;
}

.auth-onboard-links__item {
  white-space: nowrap;
  font-weight: 600;
}

.auth-onboard-links .auth-link {
  font-size: inherit;
  font-weight: inherit;
  text-decoration: none;
}

.auth-onboard-links__item--merchant {
  color: #f97316;
}

.auth-onboard-links__item--merchant:hover {
  color: #ea580c;
}

.auth-onboard-links__item--merchant .auth-link,
.auth-onboard-links__item--merchant .auth-link:visited,
.auth-onboard-links__item--merchant .auth-link:active {
  color: inherit;
}

.auth-onboard-links__item--influencer {
  color: #9333ea;
}

.auth-onboard-links__item--influencer:hover {
  color: #7c3aed;
}

.auth-onboard-links__item--influencer .auth-link,
.auth-onboard-links__item--influencer .auth-link:visited,
.auth-onboard-links__item--influencer .auth-link:active {
  color: inherit;
}

.auth-onboard-links__item:hover .auth-link {
  text-decoration: underline;
}

.auth-btn-primary:hover:not(:disabled) {
  background: #0052d9;
}

.auth-btn-primary:disabled {
  background: #91caff;
  cursor: not-allowed;
}

@media (max-width: 860px) {
  .auth-card-body {
    flex-direction: column;
    min-height: auto;
  }

  .auth-qr-panel {
    width: 100%;
    min-width: 0;
    border-right: none;
    border-bottom: 1px solid #ebebeb;
    padding-bottom: 28px;
  }

  .auth-side-title {
    align-self: center;
  }

  .auth-card-main {
    padding: 28px 24px 36px;
  }

  .auth-form,
  .auth-form-compact {
    max-width: none;
    margin-top: 40px;
  }

  .auth-hero-title {
    font-size: 28px;
  }

  .auth-hero-features {
    gap: 10px 20px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .auth-bg {
    padding: 12px 12px 40px;
  }

  .auth-card-switch {
    position: static;
    display: inline-block;
    margin-bottom: 16px;
  }

  .auth-form-compact {
    margin-top: 8px;
  }
}

/* 弹框模式 */
body.auth-modal-open {
  overflow: hidden;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.auth-modal[hidden] {
  display: none;
}

.auth-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.auth-modal__panel {
  position: relative;
  z-index: 1;
  width: min(400px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(15, 35, 75, 0.18);
}

.auth-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 0;
}

.auth-modal__title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #181818;
  line-height: 1.4;
}

.auth-modal__close {
  border: none;
  background: transparent;
  color: #86909c;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  flex-shrink: 0;
}

.auth-modal__close:hover {
  color: #333;
}

.auth-modal__body {
  padding: 24px 22px 24px;
}

.auth-modal__view[hidden] {
  display: none;
}

.auth-modal .auth-login-head {
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  margin-top: 10px;
}

.auth-modal .auth-login-head.auth-login-head--register {
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.auth-modal .auth-login-head--register .auth-onboard-links {
  justify-content: center;
}

.auth-modal .auth-tabs {
  gap: 16px;
  justify-content: center;
  padding-top: 8px;
}

.auth-modal .auth-card-switch {
  align-self: center;
  width: 100%;
  text-align: center;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font-size: 14px;
  color: #0064ff;
  line-height: 1.5;
}

.auth-modal .auth-tabs-login .auth-tab,
.auth-modal .auth-tabs-register .auth-tab {
  font-size: 14px;
  white-space: nowrap;
}

.auth-modal .auth-tabs-forgot .auth-tab {
  font-size: 14px;
}

.auth-link-btn {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font-size: inherit;
  font-family: inherit;
}

.auth-forgot-tip {
  margin: 8px 0 0;
  font-size: 13px;
  color: #666;
  line-height: 1.6;
}

.auth-qr-tab-panel {
  margin-top: 20px;
}

.auth-qr-panel-inline {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: none;
  align-items: center;
}

.auth-qr-panel-inline .auth-qr-tip {
  margin-bottom: 16px;
}

.auth-qr-panel-inline .auth-qr-box {
  margin: 0 auto;
}
