.ac-auth-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.ac-auth-modal[hidden] {
  display: none !important;
}
.ac-auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
}
.ac-auth-shell {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(920px, 100%);
  height: min(640px, calc(100vh - 48px));
  max-height: calc(100vh - 48px);
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
}
.ac-auth-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #64748b;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}
.ac-auth-brand {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, #4f46e5 0%, #2563eb 42%, #1d4ed8 100%);
  color: #fff;
}
.ac-auth-brand::before,
.ac-auth-brand::after {
  content: '';
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}
.ac-auth-brand::before {
  width: 220px;
  height: 220px;
  top: -60px;
  right: -40px;
}
.ac-auth-brand::after {
  width: 160px;
  height: 160px;
  bottom: 40px;
  left: -30px;
}
.ac-auth-brand-inner {
  position: relative;
  z-index: 1;
  display: flex;
  height: 100%;
  flex-direction: column;
  justify-content: center;
  padding: 42px 34px;
}
.ac-auth-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  font-size: 18px;
  font-weight: 800;
}
.ac-auth-logo img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
}
.ac-auth-tagline {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
}
.ac-auth-lead {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.88);
}
.ac-auth-points {
  margin: 28px 0 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.86);
}
.ac-auth-panel {
  display: flex;
  min-height: 0;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}
.ac-auth-panel-head {
  flex-shrink: 0;
  margin-bottom: 0;
  padding: 28px 30px 0;
  background: #fff;
}
.ac-auth-panel-body {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 16px 30px 24px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.ac-auth-panel-head + .ac-auth-panel-body {
  margin-top: 0;
}
.ac-auth-welcome {
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 800;
  color: #312e81;
}
.ac-auth-tabs {
  display: flex;
  gap: 28px;
  border-bottom: 1px solid #e2e8f0;
}
.ac-auth-tab {
  position: relative;
  margin: 0;
  padding: 0 0 12px;
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.ac-auth-tab.is-active {
  color: #4f46e5;
}
.ac-auth-tab.is-active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  border-radius: 999px;
  background: #4f46e5;
}
.ac-auth-alert {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
}
.ac-auth-alert.is-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.ac-auth-alert.is-success {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.ac-auth-pane {
  display: none;
}
.ac-auth-pane.is-active {
  display: block;
}
.ac-auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 8px;
}
.ac-auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ac-auth-field > span {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
}
.ac-auth-field input {
  width: 100%;
  border: 1px solid #dbe3f0;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  color: #0f172a;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.ac-auth-field input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}
.ac-auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}
.ac-auth-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #475569;
  cursor: pointer;
}
.ac-auth-link,
.ac-auth-fallback a,
.ac-auth-agree a {
  color: #4f46e5;
  text-decoration: none;
}
.ac-auth-link:hover,
.ac-auth-fallback a:hover,
.ac-auth-agree a:hover {
  text-decoration: underline;
}
.ac-auth-submit {
  margin-top: 4px;
  border: 0;
  border-radius: 12px;
  padding: 13px 16px;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.ac-auth-submit:hover:not(:disabled) {
  transform: translateY(-1px);
}
.ac-auth-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.ac-auth-submit--register {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}
.ac-auth-agree {
  margin: 0;
  font-size: 12px;
  color: #64748b;
  line-height: 1.6;
}
.ac-auth-fallback {
  margin: 18px 0 0;
  font-size: 12px;
  color: #94a3b8;
  text-align: center;
}
.ac-turing-mount {
  min-height: 52px;
  overflow: visible;
}
.ac-turing-mount > * {
  max-width: 100%;
}
/* 图灵 popup 层需高于登录弹窗 */
.ac-auth-modal ~ .turing-captcha-popup,
.ac-auth-modal ~ [class*="turing"],
body > div[class*="turing"],
body > div[id*="turing"] {
  z-index: 100001 !important;
}
.ac-auth-slider {
  margin-top: 2px;
  margin-bottom: 4px;
}
body.ac-auth-open {
  overflow: hidden;
}
button.nav-login-btn,
button.nav-register-btn {
  font: inherit;
  cursor: pointer;
}
.ac-mobile-bar button[data-ac-auth-open] {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
}
@media (max-width: 820px) {
  .ac-auth-shell {
    grid-template-columns: 1fr;
    height: calc(100vh - 32px);
    max-height: calc(100vh - 32px);
  }
  .ac-auth-brand {
    display: none;
  }
  .ac-auth-panel-head {
    padding: 22px 18px 0;
  }
  .ac-auth-panel-body {
    padding: 14px 18px 20px;
  }
  .ac-auth-welcome {
    font-size: 18px;
  }
}
