:root {
  --primary: #0066cc;
  --primary-focus: #0071e3;
  --primary-on-dark: #2997ff;
  --ink: #1d1d1f;
  --body-on-dark: #ffffff;
  --body-muted: #cccccc;
  --ink-muted-80: #333333;
  --ink-muted-48: #7a7a7a;
  --hairline: #e0e0e0;
  --canvas: #ffffff;
  --parchment: #f5f5f7;
  --black: #000000;
  --alert: #ff3b30;
  --success: #30d158;
  --font-display: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Inter", "PingFang SC", system-ui, sans-serif;
  --font-text: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Inter", "PingFang SC", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  min-height: 100%;
  font-family: var(--font-text);
  color: var(--ink);
  background: var(--parchment);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.site-top { position: sticky; top: 0; z-index: 100; }
.top-domain-bar {
  background: var(--primary);
  color: #fff;
  text-align: center;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.12px;
  line-height: 1;
}
.top-domain-bar .domain-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
}
.top-domain-bar .domain-link:hover { opacity: 0.85; }
.top-domain-bar svg { width: 15px; height: 15px; display: block; }
.top-domain-bar .label-zh { opacity: 0.78; font-weight: 400; }
.global-nav { background: var(--black); color: #fff; height: 56px; }
.global-nav-inner {
  max-width: 1024px;
  height: 100%;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 13px;
}
.global-nav-inner a { color: #fff; opacity: 0.88; }
.global-nav-inner a:hover { opacity: 1; }
.gnav-brand { display: flex; align-items: center; opacity: 1; margin-right: 8px; }
.gnav-brand img { height: 24px; width: auto; }
.gnav-sub {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.72);
  margin-left: 10px;
  padding-left: 10px;
  border-left: 1px solid rgba(255,255,255,0.28);
  line-height: 1;
  white-space: nowrap;
}
.spacer { flex: 1; }
.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 18px;
  border-radius: 9999px;
  opacity: 1;
  white-space: nowrap;
}
.nav-login {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.28);
}
.nav-login:hover { background: rgba(255,255,255,0.08); }
.nav-apply {
  background: var(--primary-on-dark);
  color: #fff;
  border: 1px solid var(--primary-on-dark);
}
.nav-apply:hover { background: #1f8fff; }
.gnav-install {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--primary-on-dark);
  font-size: 13px;
  font-weight: 500;
  opacity: 1;
  white-space: nowrap;
}
.gnav-install svg { width: 13px; height: 13px; }
@media (max-width: 833px) { .gnav-link.collapsible { display: none; } }
@media (max-width: 480px) {
  .global-nav-inner { gap: 12px; padding: 0 14px; }
  .nav-cta { padding: 7px 14px; }
}

.auth-wrap {
  max-width: 1024px;
  margin: 0 auto;
  padding: 56px 22px 80px;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 64px;
  align-items: center;
}
.auth-copy .eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--primary);
  margin-bottom: 16px;
}
.auth-copy h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}
.auth-copy p {
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink-muted-80);
  max-width: 440px;
}

.auth-card {
  background: var(--canvas);
  border-radius: 22px;
  padding: 32px 28px 28px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.08);
}
.auth-card h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}
.auth-card .sub {
  font-size: 14px;
  color: var(--ink-muted-48);
  margin-bottom: 22px;
}

.tabs {
  display: flex;
  background: var(--parchment);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 22px;
}
.tabs button {
  flex: 1;
  height: 36px;
  border: 0;
  background: transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-muted-48);
  cursor: pointer;
}
.tabs button.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

[hidden] { display: none !important; }
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-muted-80);
  margin-bottom: 8px;
}
.phone-box, .field input {
  width: 100%;
  height: 52px;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: #fafafa;
  font-size: 17px;
  font-family: var(--font-text);
  color: var(--ink);
  outline: none;
}
.field input { padding: 0 16px; }
.field input:focus, .phone-box:focus-within {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0,102,204,0.12);
}
.phone-box {
  display: flex;
  align-items: center;
  padding: 0 6px 0 14px;
}
.phone-box .cc {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  padding-right: 12px;
  margin-right: 12px;
  border-right: 1px solid var(--hairline);
  white-space: nowrap;
}
.phone-box input {
  border: 0;
  background: transparent;
  height: 50px;
  padding: 0;
  box-shadow: none;
}
.phone-box input:focus { box-shadow: none; background: transparent; }
.field-row { display: flex; gap: 10px; }
.field-row input { flex: 1; }
.btn-otp {
  height: 52px;
  padding: 0 16px;
  border: 0;
  border-radius: 14px;
  background: rgba(0,102,204,0.1);
  color: var(--primary);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}
.btn-otp:disabled { opacity: 0.5; }

.btn-main {
  width: 100%;
  height: 52px;
  margin-top: 6px;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 17px;
  font-weight: 500;
  cursor: pointer;
}
.btn-main:disabled { opacity: 0.45; }
.btn-main:active { transform: scale(0.98); }

.form-err { color: var(--alert); font-size: 13px; min-height: 18px; margin: 4px 0 8px; }
.auth-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  font-size: 14px;
  color: var(--ink-muted-48);
}
.auth-links a { color: var(--primary); font-weight: 500; }
.panel { display: none; }
.panel.show { display: block; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  background: #1d1d1f;
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  z-index: 80;
}

@media (max-width: 860px) {
  .auth-wrap { grid-template-columns: 1fr; gap: 28px; padding: 28px 16px 48px; }
  .auth-copy h1 { font-size: 36px; }
  .auth-card { padding: 24px 18px; }
}
