/* 思维量化认证页视觉覆盖：只作用于 NewAPI 独立认证布局 */
body:has(#root > .relative.min-h-screen.flex.flex-col) {
  --swq-auth-bg: #f6f6fb;
  --swq-auth-card: rgba(255, 255, 255, .78);
  --swq-auth-card-solid: #fff;
  --swq-auth-border: rgba(90, 71, 190, .14);
  --swq-auth-text: #171426;
  --swq-auth-muted: #716d82;
  --swq-auth-input: rgba(255, 255, 255, .64);
  --swq-auth-purple: #6d4aff;
  --swq-auth-purple-2: #9a6cff;
  --swq-auth-cyan: #45cce6;
  --swq-auth-shadow: 0 30px 90px rgba(61, 43, 145, .14);
}

.dark body:has(#root > .relative.min-h-screen.flex.flex-col) {
  --swq-auth-bg: #0b0a12;
  --swq-auth-card: rgba(22, 20, 32, .76);
  --swq-auth-card-solid: #15131f;
  --swq-auth-border: rgba(167, 139, 250, .17);
  --swq-auth-text: #f7f5ff;
  --swq-auth-muted: #aaa6bb;
  --swq-auth-input: rgba(255, 255, 255, .045);
  --swq-auth-shadow: 0 34px 100px rgba(0, 0, 0, .42);
}

body:has(#root > .relative.min-h-screen.flex.flex-col) #root > .relative.min-h-screen.flex.flex-col {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100svh;
  color: var(--swq-auth-text);
  background-color: var(--swq-auth-bg);
  background-image:
    linear-gradient(rgba(109, 74, 255, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(109, 74, 255, .055) 1px, transparent 1px),
    radial-gradient(circle at 16% 14%, rgba(109, 74, 255, .18), transparent 30rem),
    radial-gradient(circle at 87% 18%, rgba(69, 204, 230, .1), transparent 26rem);
  background-size: 64px 64px, 64px 64px, auto, auto;
}

body:has(#root > .relative.min-h-screen.flex.flex-col) #root > .relative.min-h-screen.flex.flex-col::before,
body:has(#root > .relative.min-h-screen.flex.flex-col) #root > .relative.min-h-screen.flex.flex-col::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(2px);
}

body:has(#root > .relative.min-h-screen.flex.flex-col) #root > .relative.min-h-screen.flex.flex-col::before {
  top: -160px;
  left: -110px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(124, 58, 237, .2), transparent 68%);
}

body:has(#root > .relative.min-h-screen.flex.flex-col) #root > .relative.min-h-screen.flex.flex-col::after {
  right: -120px;
  bottom: -190px;
  width: 470px;
  height: 470px;
  background: radial-gradient(circle, rgba(14, 165, 233, .12), transparent 68%);
}

/* 品牌栏 */
body:has(#root > .relative.min-h-screen.flex.flex-col) #root > .relative.min-h-screen.flex.flex-col > div:first-child {
  z-index: 2;
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
  padding: 24px 0 10px;
}

body:has(#root > .relative.min-h-screen.flex.flex-col) #root > .relative.min-h-screen.flex.flex-col > div:first-child > div {
  border: 1px solid var(--swq-auth-border);
  background: rgba(109, 74, 255, .08);
  box-shadow: 0 10px 30px rgba(109, 74, 255, .12);
}

body:has(#root > .relative.min-h-screen.flex.flex-col) #root > .relative.min-h-screen.flex.flex-col > div:first-child h1 {
  max-width: min(70vw, 520px);
  overflow: hidden;
  color: var(--swq-auth-text);
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 左侧品牌说明 + 右侧表单 */
body:has(#root > .relative.min-h-screen.flex.flex-col) #root > .relative.min-h-screen.flex.flex-col > .flex-1 {
  display: grid;
  grid-template-columns: minmax(340px, 1fr) minmax(400px, 480px);
  grid-template-rows: 1fr;
  align-items: center;
  width: min(1120px, calc(100% - 64px));
  margin-inline: auto;
  padding: 22px 0 34px;
  gap: clamp(54px, 8vw, 120px);
}

body:has(#root > .relative.min-h-screen.flex.flex-col) #root > .relative.min-h-screen.flex.flex-col > .flex-1::before {
  content: "一个入口，\A连接多模态智能。";
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  max-width: 620px;
  color: var(--swq-auth-text);
  font-size: clamp(46px, 5vw, 68px);
  font-weight: 820;
  line-height: 1.1;
  letter-spacing: -.055em;
  white-space: pre-line;
  transform: translateY(-62px);
}

body:has(#root > .relative.min-h-screen.flex.flex-col) #root > .relative.min-h-screen.flex.flex-col > .flex-1::after {
  content: "SWQ1+ MULTIMODAL API\AOpenAI 格式兼容 · 多模型统一接入\A额度与调用记录清晰可查";
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  color: var(--swq-auth-muted);
  font-size: 14px;
  font-weight: 550;
  line-height: 2;
  letter-spacing: .015em;
  white-space: pre-line;
  transform: translateY(102px);
}

body:has(#root > .relative.min-h-screen.flex.flex-col) #root > .relative.min-h-screen.flex.flex-col > .flex-1 > .w-full {
  grid-column: 2;
  grid-row: 1;
  max-width: 480px;
}

/* 表单卡片 */
body:has(#root > .relative.min-h-screen.flex.flex-col) #root > .relative.min-h-screen.flex.flex-col > .flex-1 > .w-full > div {
  border: 1px solid var(--swq-auth-border);
  border-radius: 24px;
  padding: 34px 36px;
  background: var(--swq-auth-card);
  box-shadow: var(--swq-auth-shadow);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

body:has(#root > .relative.min-h-screen.flex.flex-col) h2 {
  color: var(--swq-auth-text);
  font-size: 28px;
  font-weight: 780;
  letter-spacing: -.04em;
}

body:has(#root > .relative.min-h-screen.flex.flex-col) h2 + p {
  color: var(--swq-auth-muted);
  font-size: 0;
}

body:has(#root > .relative.min-h-screen.flex.flex-col):has(form input[name="confirmPassword"]) h2 + p::before {
  content: "已有账号？ ";
  font-size: 14px;
}

body:has(#root > .relative.min-h-screen.flex.flex-col):has(form input[name="confirmPassword"]) h2 + p a[href="/sign-in"] {
  font-size: 14px;
}

body:has(#root > .relative.min-h-screen.flex.flex-col):has(form input[name="confirmPassword"]) h2 + p a[href="/sign-in"]::after {
  content: "。";
  color: var(--swq-auth-muted);
}

body:has(#root > .relative.min-h-screen.flex.flex-col):has(form input[name="password"]):not(:has(form input[name="confirmPassword"])) h2 + p::before {
  content: "还没有账号？ ";
  font-size: 14px;
}

body:has(#root > .relative.min-h-screen.flex.flex-col):has(form input[name="password"]):not(:has(form input[name="confirmPassword"])) h2 + p a[href="/sign-up"] {
  font-size: 14px;
}

body:has(#root > .relative.min-h-screen.flex.flex-col):has(form input[name="password"]):not(:has(form input[name="confirmPassword"])) h2 + p a[href="/sign-up"]::after {
  content: "。";
  color: var(--swq-auth-muted);
}

body:has(#root > .relative.min-h-screen.flex.flex-col) form label[data-slot="form-label"] {
  color: var(--swq-auth-text);
  font-size: 13px;
  font-weight: 650;
}

body:has(#root > .relative.min-h-screen.flex.flex-col) form input[data-slot="form-control"] {
  height: 46px;
  border-color: var(--swq-auth-border);
  border-radius: 12px;
  padding-inline: 14px;
  color: var(--swq-auth-text);
  background: var(--swq-auth-input);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
}

body:has(#root > .relative.min-h-screen.flex.flex-col) form input[data-slot="form-control"]:focus-visible {
  border-color: rgba(139, 92, 246, .68);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, .12);
}

body:has(#root > .relative.min-h-screen.flex.flex-col) form input::placeholder {
  color: var(--swq-auth-muted);
  opacity: .72;
}

body:has(#root > .relative.min-h-screen.flex.flex-col) form button[type="submit"] {
  min-height: 46px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(105deg, var(--swq-auth-purple), var(--swq-auth-purple-2));
  box-shadow: 0 14px 30px rgba(109, 74, 255, .24);
  font-weight: 720;
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

body:has(#root > .relative.min-h-screen.flex.flex-col) form button[type="submit"]:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 17px 36px rgba(109, 74, 255, .32);
}

/* 协议区域：去除组件自带的中英文混排及重复提示 */
body:has(#root > .relative.min-h-screen.flex.flex-col) form > div:has(#legal-consent) {
  border-color: var(--swq-auth-border);
  border-radius: 12px;
  background: rgba(109, 74, 255, .055);
}

body:has(#root > .relative.min-h-screen.flex.flex-col) label#legal-consent-label span {
  color: var(--swq-auth-muted);
  font-size: 0;
}

body:has(#root > .relative.min-h-screen.flex.flex-col) label#legal-consent-label span::before {
  content: "我已阅读并同意 ";
  font-size: 12px;
}

body:has(#root > .relative.min-h-screen.flex.flex-col) label#legal-consent-label span > a {
  font-size: 12px;
}

body:has(#root > .relative.min-h-screen.flex.flex-col) label#legal-consent-label span > a:first-of-type::after {
  content: " 和 ";
  color: var(--swq-auth-muted);
}

body:has(#root > .relative.min-h-screen.flex.flex-col) label#legal-consent-label span::after {
  content: "。";
  color: var(--swq-auth-muted);
  font-size: 12px;
}

body:has(#root > .relative.min-h-screen.flex.flex-col) form + p {
  display: none;
}

body:has(#root > .relative.min-h-screen.flex.flex-col) a {
  color: var(--swq-auth-purple-2);
  text-underline-offset: 4px;
}

body:has(#root > .relative.min-h-screen.flex.flex-col) #root > .relative.min-h-screen.flex.flex-col > div:last-of-type {
  padding: 12px 20px 24px;
  color: var(--swq-auth-muted);
  font-size: 12px;
}

@media (max-width: 860px) {
  body:has(#root > .relative.min-h-screen.flex.flex-col) #root > .relative.min-h-screen.flex.flex-col > .flex-1 {
    display: flex;
    width: min(100% - 28px, 500px);
    padding: 18px 0 28px;
  }

  body:has(#root > .relative.min-h-screen.flex.flex-col) #root > .relative.min-h-screen.flex.flex-col > .flex-1::before,
  body:has(#root > .relative.min-h-screen.flex.flex-col) #root > .relative.min-h-screen.flex.flex-col > .flex-1::after {
    display: none;
  }

  body:has(#root > .relative.min-h-screen.flex.flex-col) #root > .relative.min-h-screen.flex.flex-col > .flex-1 > .w-full {
    margin-inline: auto;
  }
}

@media (max-width: 520px) {
  body:has(#root > .relative.min-h-screen.flex.flex-col) #root > .relative.min-h-screen.flex.flex-col {
    overflow: auto;
  }

  body:has(#root > .relative.min-h-screen.flex.flex-col) #root > .relative.min-h-screen.flex.flex-col > div:first-child {
    width: calc(100% - 28px);
    padding-top: 18px;
  }

  body:has(#root > .relative.min-h-screen.flex.flex-col) #root > .relative.min-h-screen.flex.flex-col > div:first-child h1 {
    max-width: calc(100vw - 92px);
    font-size: 14px;
  }

  body:has(#root > .relative.min-h-screen.flex.flex-col) #root > .relative.min-h-screen.flex.flex-col > .flex-1 > .w-full > div {
    border-radius: 20px;
    padding: 28px 22px;
  }

  body:has(#root > .relative.min-h-screen.flex.flex-col) h2 {
    font-size: 25px;
  }
}

/* 2026 新版认证布局（grid / h-svh） */
body:has(#root > .relative.grid.h-svh.max-w-none) {
  --swq-auth-bg: #f6f6fb;
  --swq-auth-card: rgba(255, 255, 255, .78);
  --swq-auth-border: rgba(90, 71, 190, .14);
  --swq-auth-text: #171426;
  --swq-auth-muted: #716d82;
  --swq-auth-input: rgba(255, 255, 255, .64);
  --swq-auth-purple: #6d4aff;
  --swq-auth-purple-2: #9a6cff;
  --swq-auth-shadow: 0 30px 90px rgba(61, 43, 145, .14);
}

.dark body:has(#root > .relative.grid.h-svh.max-w-none) {
  --swq-auth-bg: #0b0a12;
  --swq-auth-card: rgba(22, 20, 32, .78);
  --swq-auth-border: rgba(167, 139, 250, .17);
  --swq-auth-text: #f7f5ff;
  --swq-auth-muted: #aaa6bb;
  --swq-auth-input: rgba(255, 255, 255, .045);
  --swq-auth-shadow: 0 34px 100px rgba(0, 0, 0, .42);
}

body:has(#root > .relative.grid.h-svh.max-w-none) #root > .relative.grid.h-svh.max-w-none {
  position: relative;
  isolation: isolate;
  height: auto;
  min-height: 100svh;
  overflow: hidden;
  color: var(--swq-auth-text);
  background-color: var(--swq-auth-bg);
  background-image:
    linear-gradient(rgba(109, 74, 255, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(109, 74, 255, .055) 1px, transparent 1px),
    radial-gradient(circle at 14% 14%, rgba(109, 74, 255, .2), transparent 30rem),
    radial-gradient(circle at 87% 18%, rgba(69, 204, 230, .1), transparent 26rem);
  background-size: 64px 64px, 64px 64px, auto, auto;
}

body:has(#root > .relative.grid.h-svh.max-w-none) #root > .relative.grid.h-svh.max-w-none::before,
body:has(#root > .relative.grid.h-svh.max-w-none) #root > .relative.grid.h-svh.max-w-none::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 420px;
  height: 420px;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(2px);
}

body:has(#root > .relative.grid.h-svh.max-w-none) #root > .relative.grid.h-svh.max-w-none::before {
  top: -150px;
  left: -100px;
  background: radial-gradient(circle, rgba(124, 58, 237, .22), transparent 68%);
}

body:has(#root > .relative.grid.h-svh.max-w-none) #root > .relative.grid.h-svh.max-w-none::after {
  right: -120px;
  bottom: -170px;
  background: radial-gradient(circle, rgba(14, 165, 233, .13), transparent 68%);
}

body:has(#root > .relative.grid.h-svh.max-w-none) #root > .relative.grid.h-svh.max-w-none > a[href="/"] {
  top: 24px;
  left: max(32px, calc((100% - 1180px) / 2));
  gap: 11px;
}

body:has(#root > .relative.grid.h-svh.max-w-none) #root > .relative.grid.h-svh.max-w-none > a[href="/"] > div {
  width: 40px;
  height: 40px;
  border: 1px solid var(--swq-auth-border);
  border-radius: 12px;
  background: rgba(109, 74, 255, .08);
  box-shadow: 0 10px 30px rgba(109, 74, 255, .14);
}

body:has(#root > .relative.grid.h-svh.max-w-none) #root > .relative.grid.h-svh.max-w-none > a[href="/"] img {
  width: 100%;
  height: 100%;
  border-radius: 11px;
}

body:has(#root > .relative.grid.h-svh.max-w-none) #root > .relative.grid.h-svh.max-w-none > a[href="/"] h1 {
  max-width: min(70vw, 520px);
  overflow: hidden;
  color: var(--swq-auth-text);
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:has(#root > .relative.grid.h-svh.max-w-none) #root > .relative.grid.h-svh.max-w-none > .container {
  display: grid;
  grid-template-columns: minmax(340px, 1fr) minmax(400px, 480px);
  grid-template-rows: 1fr;
  align-items: center;
  width: min(1120px, calc(100% - 64px));
  max-width: none;
  min-height: 100svh;
  margin-inline: auto;
  padding: 82px 0 34px;
  gap: clamp(54px, 8vw, 120px);
}

body:has(#root > .relative.grid.h-svh.max-w-none) #root > .relative.grid.h-svh.max-w-none > .container::before {
  content: "一个入口，\A连接多模态智能。";
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  color: var(--swq-auth-text);
  font-size: clamp(46px, 5vw, 68px);
  font-weight: 820;
  line-height: 1.1;
  letter-spacing: -.055em;
  white-space: pre-line;
  transform: translateY(-62px);
}

body:has(#root > .relative.grid.h-svh.max-w-none) #root > .relative.grid.h-svh.max-w-none > .container::after {
  content: "SWQ1+ MULTIMODAL API\AOpenAI 格式兼容 · 多模型统一接入\A额度与调用记录清晰可查";
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  color: var(--swq-auth-muted);
  font-size: 14px;
  font-weight: 550;
  line-height: 2;
  letter-spacing: .015em;
  white-space: pre-line;
  transform: translateY(102px);
}

body:has(#root > .relative.grid.h-svh.max-w-none) #root > .relative.grid.h-svh.max-w-none > .container > div {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  max-width: 480px;
  margin: 0;
  padding: 34px 36px;
  border: 1px solid var(--swq-auth-border);
  border-radius: 24px;
  background: var(--swq-auth-card);
  box-shadow: var(--swq-auth-shadow);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

body:has(#root > .relative.grid.h-svh.max-w-none) h2 {
  color: var(--swq-auth-text);
  font-size: 28px;
  font-weight: 780;
  letter-spacing: -.04em;
}

body:has(#root > .relative.grid.h-svh.max-w-none) h2 + p {
  color: var(--swq-auth-muted);
  font-size: 0;
}

body:has(#root > .relative.grid.h-svh.max-w-none):has(form input[name="confirmPassword"]) h2 + p::before {
  content: "已有账号？ ";
  font-size: 14px;
}

body:has(#root > .relative.grid.h-svh.max-w-none):has(form input[name="confirmPassword"]) h2 + p a[href="/sign-in"] {
  font-size: 14px;
}

body:has(#root > .relative.grid.h-svh.max-w-none):has(form input[name="confirmPassword"]) h2 + p a[href="/sign-in"]::after {
  content: "。";
  color: var(--swq-auth-muted);
}

body:has(#root > .relative.grid.h-svh.max-w-none):has(form input[name="password"]):not(:has(form input[name="confirmPassword"])) h2 + p::before {
  content: "还没有账号？ ";
  font-size: 14px;
}

body:has(#root > .relative.grid.h-svh.max-w-none):has(form input[name="password"]):not(:has(form input[name="confirmPassword"])) h2 + p a[href="/sign-up"] {
  font-size: 14px;
}

body:has(#root > .relative.grid.h-svh.max-w-none):has(form input[name="password"]):not(:has(form input[name="confirmPassword"])) h2 + p a[href="/sign-up"]::after {
  content: "。";
  color: var(--swq-auth-muted);
}

body:has(#root > .relative.grid.h-svh.max-w-none) form label[data-slot="form-label"] {
  color: var(--swq-auth-text);
  font-size: 13px;
  font-weight: 650;
}

body:has(#root > .relative.grid.h-svh.max-w-none) form input[data-slot="form-control"] {
  height: 46px;
  border-color: var(--swq-auth-border);
  border-radius: 12px;
  padding-inline: 14px;
  color: var(--swq-auth-text);
  background: var(--swq-auth-input);
}

body:has(#root > .relative.grid.h-svh.max-w-none) form input[data-slot="form-control"]:focus-visible {
  border-color: rgba(139, 92, 246, .68);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, .12);
}

body:has(#root > .relative.grid.h-svh.max-w-none) form input::placeholder {
  color: var(--swq-auth-muted);
  opacity: .72;
}

body:has(#root > .relative.grid.h-svh.max-w-none) form button[type="submit"] {
  min-height: 46px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(105deg, var(--swq-auth-purple), var(--swq-auth-purple-2));
  box-shadow: 0 14px 30px rgba(109, 74, 255, .24);
  font-weight: 720;
}

body:has(#root > .relative.grid.h-svh.max-w-none) form > div:has(#legal-consent) {
  border-color: var(--swq-auth-border);
  border-radius: 12px;
  background: rgba(109, 74, 255, .055);
}

body:has(#root > .relative.grid.h-svh.max-w-none) label#legal-consent-label span {
  color: var(--swq-auth-muted);
  font-size: 0;
}

body:has(#root > .relative.grid.h-svh.max-w-none) label#legal-consent-label span::before {
  content: "我已阅读并同意 ";
  font-size: 12px;
}

body:has(#root > .relative.grid.h-svh.max-w-none) label#legal-consent-label span > a {
  color: var(--swq-auth-purple-2);
  font-size: 12px;
}

body:has(#root > .relative.grid.h-svh.max-w-none) label#legal-consent-label span > a:first-of-type::after {
  content: " 和 ";
  color: var(--swq-auth-muted);
}

body:has(#root > .relative.grid.h-svh.max-w-none) label#legal-consent-label span::after {
  content: "。";
  color: var(--swq-auth-muted);
  font-size: 12px;
}

body:has(#root > .relative.grid.h-svh.max-w-none) form + p {
  display: none;
}

body:has(#root > .relative.grid.h-svh.max-w-none) a {
  color: var(--swq-auth-purple-2);
  text-underline-offset: 4px;
}

@media (max-width: 860px) {
  body:has(#root > .relative.grid.h-svh.max-w-none) #root > .relative.grid.h-svh.max-w-none > .container {
    display: flex;
    width: min(100% - 28px, 500px);
    padding: 90px 0 30px;
  }

  body:has(#root > .relative.grid.h-svh.max-w-none) #root > .relative.grid.h-svh.max-w-none > .container::before,
  body:has(#root > .relative.grid.h-svh.max-w-none) #root > .relative.grid.h-svh.max-w-none > .container::after {
    display: none;
  }

  body:has(#root > .relative.grid.h-svh.max-w-none) #root > .relative.grid.h-svh.max-w-none > .container > div {
    margin-inline: auto;
  }
}

@media (max-width: 520px) {
  body:has(#root > .relative.grid.h-svh.max-w-none) #root > .relative.grid.h-svh.max-w-none {
    overflow: auto;
  }

  body:has(#root > .relative.grid.h-svh.max-w-none) #root > .relative.grid.h-svh.max-w-none > a[href="/"] {
    top: 18px;
    left: 18px;
  }

  body:has(#root > .relative.grid.h-svh.max-w-none) #root > .relative.grid.h-svh.max-w-none > a[href="/"] h1 {
    max-width: calc(100vw - 88px);
    font-size: 14px;
  }

  body:has(#root > .relative.grid.h-svh.max-w-none) #root > .relative.grid.h-svh.max-w-none > .container > div {
    padding: 28px 22px;
    border-radius: 20px;
  }

  body:has(#root > .relative.grid.h-svh.max-w-none) h2 {
    font-size: 25px;
  }
}
