/* auth_sync.html · 深色玻璃登录页（紧凑 + 合规页脚不重叠） */

:root {
  --auth-bg: #09090b;
  --auth-text: #fafafa;
  --auth-muted: #a1a1aa;
  --auth-accent: #8b5cf6;
  --auth-input-bg: rgba(0, 0, 0, 0.35);
  --auth-input-border: rgba(255, 255, 255, 0.12);
  --auth-font: 'Inter', 'Nunito', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

body.auth-sync-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: 24px 16px 20px;
  box-sizing: border-box;
  background: var(--auth-bg);
  color: var(--auth-text);
  font-family: var(--auth-font);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-font-smoothing: antialiased;
}

.auth-sync-page .noise,
.auth-sync-page .glow-1,
.auth-sync-page .bg-grid {
  pointer-events: none;
}

.auth-sync-page .noise {
  position: fixed;
  inset: 0;
  z-index: 1;
  opacity: 0.04;
  background-image: url('data:image/svg+xml;utf8,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noise"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noise)"/%3E%3C/svg%3E');
}

.auth-sync-page .glow-1 {
  position: fixed;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.14) 0%, transparent 62%);
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%);
  filter: blur(72px);
  z-index: 0;
}

.auth-sync-page .bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at center, black 35%, transparent 100%);
  -webkit-mask-image: radial-gradient(circle at center, black 35%, transparent 100%);
}

.auth-sync-stack {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 400px;
  gap: 10px;
}

.auth-sync-page .login-container {
  width: 100%;
}

.auth-sync-page .login-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.015) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 22px;
  padding: 28px 26px 22px;
  box-shadow: 0 20px 40px -16px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  animation: authCardRise 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes authCardRise {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.auth-sync-page .logo-box {
  width: auto;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.auth-sync-page .logo-box img {
  width: 160px;
  height: 160px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.35));
}

.auth-sync-page #auth-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 4px;
  text-align: center;
  letter-spacing: -0.02em;
}

.auth-sync-page .subtitle,
.auth-sync-page #auth-subtitle {
  font-size: 12px;
  color: var(--auth-muted);
  margin: 0 0 18px;
  text-align: center;
  line-height: 1.45;
}

.auth-sync-page .auth-mode-tabs {
  display: flex;
  width: 100%;
  gap: 6px;
  margin-bottom: 14px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 3px;
}

.auth-sync-page .auth-mode-tab {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--auth-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 0;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.auth-sync-page .auth-mode-tab.active {
  background: rgba(139, 92, 246, 0.28);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.35);
}

.auth-sync-page .form-group {
  width: 100%;
  margin-bottom: 12px;
}

.auth-sync-page .form-group label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--auth-muted);
  margin-bottom: 6px;
}

.auth-sync-page .input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-sync-page .input-wrapper svg,
.auth-sync-page .input-wrapper i[data-lucide] {
  position: absolute;
  left: 12px;
  width: 16px !important;
  height: 16px !important;
  color: #71717a;
  pointer-events: none;
}

.auth-sync-page input[type="text"],
.auth-sync-page input[type="password"],
.auth-sync-page input[type="email"],
.auth-sync-page input[type="tel"] {
  width: 100%;
  box-sizing: border-box;
  background: var(--auth-input-bg);
  border: 1px solid var(--auth-input-border);
  color: var(--auth-text);
  font-size: 14px;
  font-family: inherit;
  padding: 11px 12px 11px 38px;
  border-radius: 11px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-sync-page input::placeholder {
  color: rgba(255, 255, 255, 0.28);
}

.auth-sync-page input:focus {
  border-color: rgba(139, 92, 246, 0.55);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
}

.auth-sync-page input:-webkit-autofill,
.auth-sync-page input:-webkit-autofill:hover,
.auth-sync-page input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--auth-text);
  caret-color: var(--auth-text);
  box-shadow: 0 0 0 1000px rgba(15, 15, 20, 0.95) inset;
  border: 1px solid rgba(139, 92, 246, 0.45);
  transition: background-color 9999s ease-out 0s;
}

.auth-sync-page .form-group.has-error input {
  border-color: #f87171;
  background: rgba(239, 68, 68, 0.08);
}

.auth-sync-page #signup-email-notice {
  font-size: 11px;
  line-height: 1.45;
  color: var(--auth-muted);
  margin: -4px 0 10px;
}

.auth-sync-page .form-extras {
  width: 100%;
  margin: 8px 0 14px;
}

.auth-sync-page .checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
}

.auth-sync-page .checkbox-group input {
  display: none;
}

.auth-sync-page .custom-checkbox {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-sync-page .custom-checkbox svg,
.auth-sync-page .custom-checkbox i {
  width: 11px !important;
  height: 11px !important;
  color: transparent;
}

.auth-sync-page .checkbox-group input:checked + .custom-checkbox {
  background: var(--auth-accent);
  border-color: var(--auth-accent);
}

.auth-sync-page .checkbox-group input:checked + .custom-checkbox svg,
.auth-sync-page .checkbox-group input:checked + .custom-checkbox i {
  color: #fff;
}

.auth-sync-page .checkbox-label {
  font-size: 11px;
  line-height: 1.5;
  color: var(--auth-muted);
}

.auth-sync-page .checkbox-label a {
  color: #c4b5fd;
  text-decoration: none;
  font-weight: 600;
}

.auth-sync-page .checkbox-label a:hover {
  text-decoration: underline;
}

.auth-sync-page .btn-submit,
.auth-sync-page .btn-primary {
  width: 100%;
  border: none;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.35);
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}

.auth-sync-page .btn-submit:hover,
.auth-sync-page .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(124, 58, 237, 0.42);
}

.auth-sync-page .btn-submit:disabled,
.auth-sync-page .btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.auth-sync-page .btn-secondary,
.auth-sync-page .btn-back {
  width: 100%;
  margin-top: 10px;
  padding: 11px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.04);
  color: var(--auth-text);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-sync-page .bottom-links {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.auth-sync-page .link-btn {
  background: none;
  border: none;
  color: #a78bfa;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.auth-sync-page .link-btn:hover {
  color: #c4b5fd;
  text-decoration: underline;
}

.auth-sync-page #auth-error-msg,
.auth-sync-page #verify-error-msg {
  display: none;
  width: 100%;
  box-sizing: border-box;
  font-size: 12px;
  color: #fda4af;
  background: rgba(225, 29, 72, 0.1);
  border: 1px solid rgba(225, 29, 72, 0.28);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  text-align: center;
}

.auth-sync-page #auth-error-msg.visible,
.auth-sync-page #verify-error-msg.visible {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.auth-sync-page .info-box {
  width: 100%;
  box-sizing: border-box;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 14px;
  color: #fcd34d;
  font-size: 12px;
}

.auth-sync-page .sync-badge {
  background: rgba(52, 211, 153, 0.1);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.28);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 auto 14px;
}

.auth-sync-page .auth-env-status {
  margin: 0;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.28);
  font-family: ui-monospace, monospace;
  text-align: center;
}

.auth-sync-page .spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: authSpin 0.7s linear infinite;
}

@keyframes authSpin {
  to { transform: rotate(360deg); }
}

.auth-sync-page .hidden {
  display: none !important;
}

.auth-sync-page .step-dots {
  display: none;
}

.auth-sync-page #step-auth,
.auth-sync-page #step-verify,
.auth-sync-page #step-sync {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.auth-sync-page .web-compliance-footer--auth-compact {
  flex: 0 0 auto;
  width: 100%;
  margin: 0;
  padding: 0 4px 2px;
  font-size: 10px;
  line-height: 1.6;
  background: transparent !important;
  border-top: none !important;
  box-shadow: none !important;
  color: #71717a;
  text-align: center;
}

.auth-sync-page .web-compliance-footer--auth-compact .web-compliance-footer__entity {
  font-size: 10px;
  color: #52525b;
  font-weight: 600;
  margin-bottom: 2px;
}

.auth-sync-page .web-compliance-footer--auth-compact .web-compliance-footer__links {
  margin: 4px 0 2px;
  line-height: 1.7;
}

.auth-sync-page .web-compliance-footer--auth-compact a {
  color: #7c3aed;
  font-size: 10px;
}

.auth-sync-page .web-compliance-footer--auth-compact .web-compliance-footer__icp {
  font-size: 9px;
  color: #52525b;
  margin-top: 2px;
}

.auth-sync-page.role-student .btn-submit,
.auth-sync-page.role-student .btn-primary {
  background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
  box-shadow: 0 8px 20px rgba(234, 88, 12, 0.3);
}

@media (max-width: 480px) {
  body.auth-sync-page {
    padding: 16px 12px;
  }

  .auth-sync-page .login-card {
    padding: 24px 20px 18px;
  }
}
