/* 登录弹窗：分栏 + 微信 / 手机邮箱（整体略窄，接近常见产品登录框比例） */
.auth-portal-dialog {
  max-width: 720px;
  width: min(720px, calc(100vw - 2rem));
  margin-left: auto;
  margin-right: auto;
}

.auth-portal-content {
  border-radius: 14px;
  overflow: visible;
  box-shadow: 0 20px 64px rgba(15, 23, 42, 0.22);
  position: relative;
}

.auth-portal-split {
  display: flex;
  flex-wrap: wrap;
  min-height: 400px;
  border-radius: 14px;
  overflow: hidden;
}

.auth-portal-brand {
  flex: 0 0 36%;
  max-width: 36%;
  min-width: 0;
  background: linear-gradient(145deg, #e8f0ff 0%, #dfe9fb 50%, #e5eefc 100%);
  position: relative;
  min-height: 200px;
}

.auth-portal-brand::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(45, 114, 241, 0.08) 1px, transparent 1px);
  background-size: 12px 12px;
  pointer-events: none;
}

.auth-portal-brand-inner {
  position: relative;
  z-index: 1;
  padding: 22px 18px 20px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.auth-portal-brand-logo {
  font-size: 1rem;
  margin-bottom: 12px;
}

.auth-portal-brand-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.45;
  margin-bottom: 8px;
}

.auth-portal-brand-sub {
  font-size: 0.75rem;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

.auth-portal-panel {
  flex: 1 1 0;
  min-width: 0;
  background: #fff;
  position: relative;
  padding: 18px 26px 22px;
  box-sizing: border-box;
}

/* 右上角三角扫码角（仅开启微信登录时渲染） */
.auth-portal-panel--wx-corner {
  padding-top: 24px;
}

.auth-portal-qr-fold {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 4;
  width: 56px;
  height: 56px;
  margin: 0;
  border: none;
  cursor: pointer;
  background: #2d72f1;
  clip-path: polygon(100% 0, 100% 100%, 0 0);
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 10px 8px 0 0;
  line-height: 0;
  transition: filter 0.15s ease, background-color 0.15s ease;
}

.auth-portal-qr-fold:hover {
  filter: brightness(1.06);
}

.auth-portal-qr-fold:focus-visible {
  outline: 2px solid rgba(45, 114, 241, 0.5);
  outline-offset: 2px;
}

.auth-portal-qr-fold-icon {
  width: 22px;
  height: 22px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.auth-portal-qr-fold-icon svg {
  display: block;
}

/* 极验：宿主在手机号/邮箱下方；全宽按钮，二级验证为官方居中弹层 */
.auth-portal-geetest-wrap {
  width: 100%;
}

.auth-portal-geetest-mount {
  width: 100%;
  min-height: 48px;
}

.auth-portal-geetest-mount iframe {
  max-width: 100%;
}

/* 协议 + 忘记密码（左协议、右忘记；仅密码 Tab 显示忘记） */
.auth-portal-agree-forgot-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.auth-portal-agree-check {
  flex: 1 1 200px;
  min-width: 0;
}

.auth-portal-forgot-wrap {
  flex-shrink: 0;
  padding-top: 2px;
}

.auth-portal-forgot-btn {
  color: #2d72f1 !important;
  font-weight: 500;
  white-space: nowrap;
}

.auth-portal-forgot-btn:hover {
  color: #1d4ed8 !important;
}

.auth-portal-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.auth-portal-panel-head--form-only {
  justify-content: flex-end;
}

.auth-portal-panel--wx-corner .auth-portal-panel-head {
  padding-right: 48px;
}

.auth-portal-mode-segments {
  display: flex;
  flex: 1;
  min-width: 0;
  padding: 3px;
  border-radius: 10px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.auth-portal-segment {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 6px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.auth-portal-segment:hover {
  color: #334155;
}

.auth-portal-segment--active {
  background: #fff;
  color: #0f172a;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.auth-portal-segment-icon {
  flex-shrink: 0;
}

.auth-portal-close {
  flex-shrink: 0;
  margin-top: 2px;
  opacity: 0.65;
}

.auth-portal-close:hover {
  opacity: 1;
}

.auth-portal-heading {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.auth-portal-muted {
  color: #94a3b8;
  margin-bottom: 16px;
}

/* 验证码 / 密码 Tab 紧挨标题下方 */
.auth-portal-login-tabs-row {
  margin-top: -4px;
}

/* 找回密码：返回 + 标题 */
.auth-portal-reset-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.auth-portal-back-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: #f1f5f9;
  color: #475569;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.auth-portal-back-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.auth-portal-back-btn:focus-visible {
  outline: 2px solid rgba(45, 114, 241, 0.45);
  outline-offset: 2px;
}

.auth-portal-reset-heading {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.auth-portal-qr-wrap {
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.auth-portal-qr-wrap iframe {
  border: none;
}

.auth-portal-mp-qr {
  max-width: 220px;
  height: auto;
}

.auth-portal-agree-hint {
  text-align: center;
}

.auth-portal-tabs {
  display: flex;
  width: 100%;
  padding: 4px;
  border-radius: 10px;
  background: #f1f5f9;
  border: 1px solid #e8edf3;
  gap: 4px;
}

.auth-portal-tabs .auth-portal-tab {
  flex: 1;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #64748b;
  font-weight: 600;
  font-size: 0.875rem;
}

.auth-portal-tabs .auth-portal-tab.active {
  background: #fff;
  color: #0f172a;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.auth-portal-input {
  border-radius: 8px;
  background: #f8fafc;
  border-color: #e2e8f0;
}

.auth-portal-input:focus {
  border-color: #2d72f1;
  box-shadow: 0 0 0 2px rgba(45, 114, 241, 0.15);
  background: #fff;
}

.auth-portal-otp-send {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
}

.auth-portal-pwd-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  min-width: 2rem;
  min-height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.auth-portal-pwd-toggle--eye {
  font-size: 0;
  color: #64748b;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%2394a3b8' stroke-width='1.6'%3E%3Cpath d='M2 12s3.5-5 8-5 8 5 8 5-3.5 5-8 5-8-5-8-5Z'/%3E%3Ccircle cx='10' cy='12' r='2.2' fill='%2394a3b8' stroke='none'/%3E%3C/svg%3E")
    center / 20px 20px no-repeat;
}

.auth-portal-pwd-toggle--eye:hover {
  opacity: 0.85;
}

.auth-portal-pwd-toggle--eye.is-revealed {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%2394a3b8' stroke-width='1.6'%3E%3Cpath d='M3 3l14 14M9.88 9.88A2.5 2.5 0 0112 15c-3.5 0-6-3-6-3s1.1-1.4 2.64-2.32M6.1 6.1C7.67 5.06 9.53 4 12 4c3.5 0 6 3 6 3s-.55.7-1.52 1.62'/%3E%3C/svg%3E");
}

.auth-portal-submit {
  border-radius: 8px;
  font-weight: 600;
  background: #2d72f1;
  border-color: #2d72f1;
}

.auth-portal-submit:hover {
  background: #2563eb;
  border-color: #2563eb;
}

@media (max-width: 767.98px) {
  .auth-portal-brand {
    flex: 1 1 100%;
    max-width: 100%;
    min-height: 140px;
  }

  .auth-portal-dialog {
    width: calc(100vw - 1rem);
    max-width: none;
    margin: 0.5rem;
  }

  .auth-portal-panel {
    padding: 16px 18px 20px;
  }

  .auth-portal-segment span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
