html.aq-auth-theme {
  --aq-bg: #ffffff;
  --aq-canvas: #f7f6f2;
  --aq-soft: #fafaf7;
  --aq-ink: #0a0a0a;
  --aq-ink-2: #525252;
  --aq-ink-3: #767673;
  --aq-line: #d4d4d0;
  --aq-line-soft: #e4e4df;
  --aq-stroke: rgba(10, 10, 10, 0.42);
  background: var(--aq-canvas);
  color: var(--aq-ink);
}

html.dark.aq-auth-theme,
html[data-theme='dark'].aq-auth-theme {
  --aq-bg: #171816;
  --aq-canvas: #11120f;
  --aq-soft: #1c1d1a;
  --aq-ink: #f4f4ef;
  --aq-ink-2: #b8b8b0;
  --aq-ink-3: #8f8f87;
  --aq-line: #3d3e39;
  --aq-line-soft: #2b2c29;
  --aq-stroke: rgba(244, 244, 239, 0.48);
}

html.aq-auth-theme body {
  min-height: 100svh;
  background: var(--aq-canvas) !important;
  color: var(--aq-ink);
  font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif !important;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
}

html.aq-auth-theme .aq-auth-shell {
  position: relative !important;
  min-height: 100svh !important;
  height: auto !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 480px) !important;
  max-width: 1280px !important;
  margin: 0 auto !important;
  padding: 120px 40px 64px !important;
  align-items: start !important;
  background: var(--aq-canvas) !important;
  color: var(--aq-ink) !important;
}

html.aq-auth-theme .aq-auth-shell > a[href='/'] {
  position: absolute !important;
  top: 22px !important;
  left: 24px !important;
  z-index: 30 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  color: var(--aq-ink) !important;
  text-decoration: none !important;
}

html.aq-auth-theme .aq-auth-shell > a[href='/'] > div {
  position: relative !important;
  width: 30px !important;
  height: 30px !important;
  display: grid !important;
  place-items: center !important;
  overflow: hidden !important;
  border-radius: 7px !important;
  border: 1px solid var(--aq-line-soft) !important;
  background: var(--aq-bg) !important;
}

html.aq-auth-theme .aq-auth-shell > a[href='/'] img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  border-radius: 0 !important;
}

html.aq-auth-theme .aq-auth-shell > a[href='/'] h1,
html.aq-auth-theme .aq-auth-brand-name {
  display: block !important;
  margin: 0 !important;
  color: var(--aq-ink) !important;
  font-family: 'Noto Serif SC', 'Songti SC', serif !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  line-height: 1.4 !important;
}

.aq-auth-aside {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  min-width: 0;
  padding: 48px 40px 64px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  color: var(--aq-ink);
}

.aq-auth-routing {
  position: relative;
  width: min(600px, 100%);
  height: 118px;
  margin-bottom: 6px;
  overflow: hidden;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

.aq-auth-routing-line {
  position: absolute;
  top: 45px;
  left: 0;
  right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--aq-stroke) 12%, var(--aq-stroke) 96%);
  animation: aq-auth-draw 1.1s linear 0.2s both;
}

.aq-auth-flow-layer {
  position: absolute;
  top: 45px;
  width: 7px;
  border-left: 1px solid var(--aq-stroke);
  border-right: 1px solid var(--aq-stroke);
  background: linear-gradient(180deg, rgba(255,255,255,.32), rgba(255,255,255,.08));
  overflow: hidden;
  transform: skew(-8deg);
  transform-origin: center;
  opacity: .8;
  animation: aq-auth-mirror-grow .5s cubic-bezier(.34,1.56,.64,1) both, aq-auth-layer-flash 6.5s ease-in-out infinite;
}

.aq-auth-flow-layer::after {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 34%;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,.85), transparent);
  opacity: 0;
  animation: aq-auth-glint 6.5s ease-in-out infinite;
}

.aq-auth-flow-layer--1 { left: 34%; height: 60px; margin-top: -30px; animation-delay: 1.4s, 4.6s; }
.aq-auth-flow-layer--2 { left: 47%; height: 82px; margin-top: -41px; animation-delay: 1.55s, 5.45s; }
.aq-auth-flow-layer--3 { left: 60%; height: 60px; margin-top: -30px; animation-delay: 1.7s, 6.3s; }
.aq-auth-flow-layer--1::after { animation-delay: 4.6s; }
.aq-auth-flow-layer--2::after { animation-delay: 5.45s; }
.aq-auth-flow-layer--3::after { animation-delay: 6.3s; }

.aq-auth-server {
  position: absolute;
  top: 21px;
  left: calc(92% - 2px);
  width: 34px;
  height: 48px;
  border: 1px solid var(--aq-stroke);
  border-radius: 4px;
  background: rgba(255,255,255,.38);
  animation: aq-auth-end-in .5s cubic-bezier(.34,1.56,.64,1) 1.95s both;
}

.aq-auth-server-unit { position: absolute; left: 4px; right: 4px; height: 1px; background: var(--aq-stroke); opacity: .8; animation: aq-auth-draw .3s linear both; }
.aq-auth-server-unit--1 { top: 16px; animation-delay: 2.25s; }
.aq-auth-server-unit--2 { top: 32px; animation-delay: 2.4s; }
.aq-auth-server-led { position: absolute; top: 7px; right: 5px; width: 3px; height: 3px; border-radius: 50%; background: var(--aq-stroke); opacity: .35; animation: aq-auth-end-in .4s ease-out 2.5s both, aq-auth-led 6.5s ease-out 7.9s infinite; }

.aq-auth-flow { position: absolute; top: 44px; left: 0; height: 2px; display: flex; align-items: center; gap: 5px; will-change: transform; animation: aq-auth-flow-run 6.5s linear 2.4s infinite; opacity: 0; }
.aq-auth-flow span { height: 2px; border-radius: 1px; background: rgba(10,10,10,.62); }
.aq-auth-flow span:nth-child(1) { width: 14px; }
.aq-auth-flow span:nth-child(2) { width: 6px; }
.aq-auth-flow span:nth-child(3) { width: 10px; }
.aq-auth-flow span:nth-child(4) { width: 4px; }
.aq-auth-flow span:nth-child(5) { width: 9px; }

.aq-auth-flow-label { position: absolute; top: 95px; color: var(--aq-ink-2); font-size: 11px; letter-spacing: .06em; white-space: nowrap; animation: aq-auth-label-in .8s ease-out both; }
.aq-auth-flow-label--src { left: 1%; animation-delay: 2s; }
.aq-auth-flow-label--gw { left: 47%; margin-left: -33px; animation-delay: 2.15s; }
.aq-auth-flow-label--up { left: calc(92% - 28px); animation-delay: 2.3s; }

@keyframes aq-auth-draw { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes aq-auth-mirror-grow { from { transform: skew(-8deg) scaleY(0); } to { transform: skew(-8deg) scaleY(1); } }
@keyframes aq-auth-layer-flash { 0%, 7%, to { opacity: .8; } 3.5% { opacity: 1; } }
@keyframes aq-auth-glint { 0% { transform: translateY(-110%); opacity: 0; } 2% { opacity: 1; } 9% { opacity: 1; } 12%, to { transform: translateY(340%); opacity: 0; } }
@keyframes aq-auth-end-in { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: scale(1); } }
@keyframes aq-auth-led { 0%, 12%, to { opacity: .35; } 3% { opacity: 1; box-shadow: 0 0 5px rgba(10,10,10,.45); } }
@keyframes aq-auth-flow-run { 0% { transform: translateX(-80px); opacity: 0; } 5% { opacity: 1; } 82% { opacity: 1; } 88%, to { transform: translateX(487px); opacity: 0; } }
@keyframes aq-auth-label-in { from { opacity: 0; transform: translateY(6px); } to { opacity: .85; transform: translateY(0); } }

.aq-auth-eyebrow,
.aq-auth-support-eyebrow {
  margin: 0;
  color: var(--aq-ink-3);
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.aq-auth-aside-title { margin: 0; display: flex; flex-direction: column; gap: 8px; color: var(--aq-ink); font-family: 'Noto Serif SC', 'Songti SC', serif; font-size: clamp(40px, 4.5vw, 64px); font-weight: 700; line-height: 1.15; letter-spacing: -.015em; }
.aq-auth-aside-title-faint { color: var(--aq-ink-2); font-weight: 500; }
.aq-auth-pitch { max-width: 42ch; margin: 0; color: #3a3a3a; font-size: 15px; line-height: 1.85; }
html.dark.aq-auth-theme .aq-auth-pitch { color: var(--aq-ink-2); }

.aq-auth-pledges { list-style: none; padding: 24px 0 0; margin: 0; display: flex; flex-direction: column; gap: 15px; border-top: 1px solid var(--aq-line); }
.aq-auth-pledges li { display: flex; align-items: center; gap: 12px; color: var(--aq-ink); font-size: 14px; white-space: nowrap; }
.aq-auth-pledges svg { flex: 0 0 auto; width: 18px; height: 18px; }

.aq-auth-support { margin-top: -2px; padding-top: 22px; border-top: 1px solid var(--aq-line); }
.aq-auth-support-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.aq-auth-support-dot { width: 6px; height: 6px; border-radius: 999px; background: var(--aq-ink); box-shadow: 0 0 0 3px rgba(10,10,10,.08); animation: aq-auth-support-blink 2.6s ease-in-out infinite; }
@keyframes aq-auth-support-blink { 0%, to { opacity: 1; } 50% { opacity: .3; } }
.aq-auth-support > p { max-width: 40ch; margin: 0 0 14px; color: #3a3a3a; font-size: 13.5px; line-height: 1.7; }
html.dark.aq-auth-theme .aq-auth-support > p { color: var(--aq-ink-2); }
.aq-auth-support-ticket { display: inline-flex; align-items: center; gap: 9px; min-height: 38px; padding: 0 14px; border: 1px solid var(--aq-line); border-radius: 999px; color: var(--aq-ink); font-size: 13px; text-decoration: none; transition: background .18s, border-color .18s, transform .18s; }
.aq-auth-support-ticket svg { width: 16px; height: 16px; }
.aq-auth-support-ticket:hover { background: rgba(10,10,10,.06); border-color: var(--aq-ink); transform: translateY(-1px); }
.aq-auth-fineprint { max-width: 42ch; margin: -8px 0 0; color: var(--aq-ink-3); font-size: 12px; line-height: 1.7; }

html.aq-auth-theme .aq-auth-shell > .aq-auth-card-wrap {
  grid-column: 2;
  grid-row: 1;
  width: 100% !important;
  min-height: 0;
  padding: 0 !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: center !important;
}

html.aq-auth-theme .aq-auth-shell > .aq-auth-card-wrap > .aq-auth-card {
  width: 100% !important;
  max-width: 480px !important;
  margin: 0 !important;
  padding: 44px 40px 24px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  border: 1px solid var(--aq-line) !important;
  border-radius: 18px !important;
  background: linear-gradient(180deg, var(--aq-bg), color-mix(in srgb, var(--aq-bg) 94%, #f7f2e8)) !important;
  box-shadow: 0 30px 60px -28px rgba(0,0,0,.14) !important;
  color: var(--aq-ink) !important;
}

html.aq-auth-theme .aq-auth-card > .w-full {
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 28px !important;
}

/* The official form container uses Tailwind's space-y utility. Once it
   becomes a flex column, clear those inherited margins and use one gap. */
html.aq-auth-theme .aq-auth-card > .w-full > * {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.aq-auth-card-brand { margin: 0 0 0; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.aq-auth-card-brand strong { color: var(--aq-ink); font-family: 'Noto Serif SC', 'Songti SC', serif; font-size: 26px; font-weight: 700; letter-spacing: .04em; line-height: 1.5; }
.aq-auth-card-brand span { color: var(--aq-ink-2); font-family: Fraunces, 'Noto Serif SC', serif; font-size: 13px; font-style: italic; line-height: 1.5; }

html.aq-auth-theme .aq-auth-card > .w-full > .space-y-2,
html.aq-auth-theme .aq-auth-card > .w-full > .space-y-3 { text-align: center !important; }
html.aq-auth-theme .aq-auth-card > .w-full > .space-y-2 h2,
html.aq-auth-theme .aq-auth-card > .w-full > .space-y-3 h2 { margin: 0 !important; color: var(--aq-ink) !important; font-family: 'Noto Serif SC', 'Songti SC', serif !important; font-size: 26px !important; font-weight: 700 !important; line-height: 1.5 !important; letter-spacing: .02em !important; text-align: center !important; }
html.aq-auth-theme .aq-auth-card > .w-full > .space-y-2 p,
html.aq-auth-theme .aq-auth-card > .w-full > .space-y-3 p { margin: 8px 0 0 !important; color: var(--aq-ink-2) !important; font-size: 14px !important; line-height: 1.6 !important; text-align: center !important; }
html.aq-auth-theme .aq-auth-card > .w-full > .space-y-2 p[hidden],
html.aq-auth-theme .aq-auth-card > .w-full > .space-y-3 p[hidden] { display: none !important; }

html.aq-auth-theme .aq-auth-card form { width: 100% !important; display: flex !important; flex-direction: column !important; gap: 20px !important; margin: 0 !important; }
html.aq-auth-theme .aq-auth-card form > [data-slot='form-item'] { position: relative; display: grid; gap: 8px; }
html.aq-auth-theme .aq-auth-card form label { color: var(--aq-ink) !important; font-size: 13px !important; font-weight: 500 !important; letter-spacing: .02em; }
html.aq-auth-theme .aq-auth-card input { width: 100% !important; min-height: 44px !important; height: 44px !important; padding: 0 14px !important; border: 1px solid var(--aq-line) !important; border-radius: 10px !important; background: var(--aq-bg) !important; color: var(--aq-ink) !important; font-family: 'Noto Sans SC', sans-serif !important; font-size: 14.5px !important; transition: border-color .18s, box-shadow .18s !important; }
html.aq-auth-theme .aq-auth-card input.aq-auth-input-with-icon { padding-left: 44px !important; }
html.aq-auth-theme .aq-auth-card input:focus { outline: none !important; border-color: var(--aq-ink) !important; box-shadow: 0 0 0 3px rgba(10,10,10,.08) !important; }
html.aq-auth-theme .aq-auth-card input::placeholder { color: #a2a39f !important; opacity: 1 !important; }
html.dark.aq-auth-theme .aq-auth-card input::placeholder { color: #898a83 !important; }
.aq-auth-field { position: relative; width: 100%; }
.aq-auth-field-icon { position: absolute; z-index: 2; left: 14px; top: 50%; display: grid; place-items: center; width: 18px; height: 18px; color: #8e8f8b; transform: translateY(-50%); pointer-events: none; }
.aq-auth-field-icon svg { width: 18px; height: 18px; }
html.aq-auth-theme .aq-auth-card .relative.rounded-md { position: relative; }
html.aq-auth-theme .aq-auth-card .relative.rounded-md > button { color: #8e8f8b !important; }
html.aq-auth-theme .aq-auth-card .relative.rounded-md > button:hover { color: var(--aq-ink) !important; background: transparent !important; }

html.aq-auth-theme .aq-auth-card form button[type='submit'] { width: 100% !important; min-height: 46px !important; height: 46px !important; margin-top: 0 !important; justify-content: center !important; gap: 8px !important; border: 1px solid var(--aq-ink) !important; border-radius: 999px !important; background: var(--aq-ink) !important; color: var(--aq-bg) !important; font-family: 'Noto Sans SC', sans-serif !important; font-size: 14.5px !important; font-weight: 500 !important; transition: background .18s, transform .18s !important; }
html.aq-auth-theme .aq-auth-card form button[type='submit']:hover:not(:disabled) { background: #262626 !important; transform: translateY(-1px); }
html.aq-auth-theme .aq-auth-card form button[type='submit'] svg { width: 18px !important; height: 18px !important; }
html.aq-auth-theme .aq-auth-card a { color: var(--aq-ink) !important; text-decoration: underline !important; text-underline-offset: 3px; text-decoration-color: var(--aq-ink-3); }
html.aq-auth-theme .aq-auth-card a:hover { color: #000 !important; text-decoration-color: var(--aq-ink); }
html.aq-auth-theme .aq-auth-card [data-slot='form-item'] > p,
html.aq-auth-theme .aq-auth-card .text-muted-foreground { color: var(--aq-ink-2) !important; font-size: 12px !important; }

.aq-auth-card-footer { margin-top: -8px; text-align: center; color: var(--aq-ink-2); font-size: 13px; }
.aq-auth-card-footer a { margin-left: 4px; font-weight: 500; }
.aq-auth-copyright { margin: 0 !important; padding-top: 8px; color: var(--aq-ink-3) !important; text-align: center; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 11px !important; line-height: 1.5; }

.aq-auth-tools { position: fixed; top: 22px; right: 24px; z-index: 40; display: flex; align-items: center; gap: 18px; color: var(--aq-ink-2); }
.aq-auth-language { position: relative; }
.aq-auth-tool-button,
.aq-auth-home-link { min-height: 32px; padding: 5px 8px; border: 0; border-radius: 8px; display: inline-flex; align-items: center; gap: 6px; background: transparent; color: var(--aq-ink-2); font-family: 'Noto Sans SC', sans-serif; font-size: 13px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.aq-auth-tool-button:hover,
.aq-auth-home-link:hover { color: var(--aq-ink); background: rgba(10,10,10,.05); }
.aq-auth-flag { font-size: 15px; line-height: 1; }
.aq-auth-chevron { color: var(--aq-ink-3); font-size: 14px; transform: translateY(-1px); }
.aq-auth-language-menu { position: absolute; top: calc(100% + 8px); right: 0; width: 190px; padding: 6px; border: 1px solid var(--aq-line); border-radius: 10px; display: grid; gap: 2px; background: var(--aq-bg); box-shadow: 0 18px 44px rgba(0,0,0,.14); }
.aq-auth-language-menu[hidden] { display: none; }
.aq-auth-language-menu button { min-height: 34px; padding: 0 9px; border: 0; border-radius: 6px; display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 6px; background: transparent; color: var(--aq-ink-2); font-size: 12px; text-align: left; cursor: pointer; }
.aq-auth-language-menu button b { color: var(--aq-ink-3); font-size: 10px; font-weight: 600; }
.aq-auth-language-menu button:hover,
.aq-auth-language-menu button[aria-checked='true'] { background: rgba(10,10,10,.07); color: var(--aq-ink); }

.aq-auth-floating-support { position: fixed; right: 38px; bottom: 24px; z-index: 50; min-height: 48px; padding: 0 17px; display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--aq-line); border-radius: 999px; background: color-mix(in srgb, var(--aq-bg) 88%, transparent); color: var(--aq-ink); box-shadow: 0 14px 35px rgba(0,0,0,.09); font-size: 13px; text-decoration: none; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: transform .18s, box-shadow .18s, background .18s; }
.aq-auth-floating-support svg { width: 20px; height: 20px; }
.aq-auth-floating-support:hover { transform: translateY(-2px); box-shadow: 0 18px 40px rgba(0,0,0,.14); background: var(--aq-bg); }

@media (max-width: 1099px) {
  html.aq-auth-theme .aq-auth-shell { grid-template-columns: minmax(0, 1fr) minmax(400px, 460px) !important; }
  .aq-auth-aside { padding-left: 32px; padding-right: 28px; }
  .aq-auth-aside-title { font-size: clamp(40px, 5.4vw, 58px); }
}

@media (max-width: 820px) {
  html.aq-auth-theme .aq-auth-shell { grid-template-columns: 1fr !important; max-width: none !important; padding: 88px 20px 34px !important; }
  .aq-auth-aside { display: none; }
  html.aq-auth-theme .aq-auth-shell > .aq-auth-card-wrap { grid-column: 1; padding: 0 !important; min-height: 0; }
  html.aq-auth-theme .aq-auth-shell > a[href='/'] { top: 18px !important; left: 18px !important; }
  .aq-auth-tools { top: 15px; right: 14px; gap: 4px; }
  .aq-auth-home-link span { display: none; }
  .aq-auth-floating-support { right: 16px; bottom: 16px; min-height: 44px; padding-inline: 14px; }
}

@media (max-width: 560px) {
  html.aq-auth-theme .aq-auth-shell { padding: 78px 12px 24px !important; }
  html.aq-auth-theme .aq-auth-shell > .aq-auth-card-wrap { padding: 0 !important; }
  html.aq-auth-theme .aq-auth-shell > .aq-auth-card-wrap > .aq-auth-card { padding: 34px 22px 22px !important; border-radius: 14px !important; }
  .aq-auth-card-brand strong { font-size: 24px; }
  html.aq-auth-theme .aq-auth-card > .w-full { gap: 24px !important; }
  html.aq-auth-theme .aq-auth-card form { gap: 17px !important; }
  .aq-auth-floating-support span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .aq-auth-routing *, .aq-auth-support-dot, .aq-auth-floating-support { animation: none !important; transition: none !important; }
}
