:root {
  --ui-radius: 12px;
  --ui-control-height: 46px;
}

.oauth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 10px;
  color: var(--text-faint);
  font-size: 12px;
  font-weight: 500;
}
.oauth-divider::before,
.oauth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--glass-border);
}

.ui-social-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.ui-social-row .btn-lark,
.ui-social-row .btn-passkey {
  width: 100%;
  min-width: 0;
  height: var(--ui-control-height);
  margin-top: 0;
  border: 1px solid var(--glass-border);
  border-radius: var(--ui-radius);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  background: #ffffff;
  color: #1d1d1f;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}
.ui-social-row.single { grid-template-columns: 1fr; }
.ui-social-row .btn-lark:hover,
.ui-social-row .btn-passkey:hover { background: #f5f7fa; transform: translateY(-1px); }
.ui-social-row .btn-lark:active,
.ui-social-row .btn-passkey:active { transform: scale(0.98); }
.ui-social-row .btn-lark:disabled,
.ui-social-row .btn-passkey:disabled { opacity: 0.5; cursor: not-allowed; }
.ui-social-row .btn-lark .btn-icon-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.ui-social-row .btn-lark .btn-icon-chip svg { width: 18px; height: 18px; display: block; }
.ui-social-row .btn-passkey svg { width: 17px; height: 17px; flex-shrink: 0; }

.ui-hcaptcha,
.h-captcha-holder {
  width: 100%;
  max-width: 100%;
  min-height: 78px;
  overflow: hidden;
}
.ui-hcaptcha > div,
.h-captcha-holder > div { width: 100% !important; max-width: 100% !important; }
.ui-hcaptcha iframe,
.h-captcha-holder iframe {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: 78px !important;
  min-width: 0;
  border: 0;
  border-radius: var(--ui-radius);
}

.btn-spin {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  animation: ui-btn-spin 0.7s linear infinite;
}
@keyframes ui-btn-spin { to { transform: rotate(360deg); } }
button.spinning,
a[data-nav].spinning {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  pointer-events: none;
  opacity: 0.75;
}

.auth-consent-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.65;
  cursor: pointer;
}
.auth-consent-row input {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  margin: 2px 0 0;
  accent-color: var(--accent);
}
.auth-consent-label a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.auth-consent-captcha {
  width: 100%;
  max-width: 100%;
  min-height: 78px;
  margin-top: 16px;
  overflow: hidden;
}
.auth-consent-captcha > div,
.auth-consent-captcha iframe {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: 78px !important;
  border: 0;
  border-radius: var(--ui-radius);
}
.auth-consent-error {
  min-height: 20px;
  margin-top: 8px;
  color: #ff6961;
  font-size: 12px;
  line-height: 1.6;
}

.legal-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin-top: 14px;
  padding: 0 8px;
  font-size: 11px;
  line-height: 1.7;
  color: var(--text-faint);
  text-align: center;
}
.legal-note a {
  color: var(--text-dim);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(120, 120, 128, 0.4);
  transition: color 0.2s ease;
}
.legal-note a:hover { color: var(--accent, #3370ff); }
.login-icp { display: block; margin-top: 5px; color: var(--text-dim); font-size: 11px; line-height: 1.7; text-align: center; text-decoration: none; transition: color 0.2s ease; }
.login-icp:hover { color: var(--accent, #30d158); }
.beian-row { display: flex; justify-content: center; align-items: center; gap: 12px; }
.beian-row .login-icp { margin-top: 0; }
.ga-beian img { height: 14px; width: auto; vertical-align: -3px; margin-right: 3px; }

@media (max-width: 760px) {
  .ui-social-row { grid-template-columns: 1fr; }
}
