/* ── Auth Pages Style (秒创云品牌版) ── */
/* 明色主题，与主站侧边栏蓝色调统一 */

*, *::before, *::after { box-sizing: border-box; }

.auth-body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #EFF6FF 0%, #F8FAFC 50%, #E0F2FE 100%);
  font-family: 'Fira Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  overflow: hidden;
  position: relative;
}

/* 装饰背景圆 — 简约灰调 */
.auth-body::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -120px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,0,0,0.035) 0%, transparent 70%);
  pointer-events: none;
}
.auth-body::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -80px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,0,0,0.025) 0%, transparent 70%);
  pointer-events: none;
}

.auth-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 20px;
}

.auth-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  padding: 40px 36px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
}

.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo .brand-icon {
  font-size: 36px;
  display: block;
  margin-bottom: 8px;
}

.auth-logo h1 {
  font-size: 24px;
  font-weight: 700;
  color: #1E293B;
  letter-spacing: -0.02em;
  margin: 0 0 2px;
}

.auth-logo .logo-accent {
  color: #3B82F6;
}

.auth-logo p {
  font-size: 13px;
  color: #94A3B8;
  margin: 0;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: #64748B;
}

.form-input {
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 15px;
  font-family: inherit;
  color: #1E293B;
  outline: none;
  width: 100%;
  transition: all 200ms ease;
}

.form-input::placeholder {
  color: #94A3B8;
}

.form-input:focus {
  border-color: #3B82F6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.form-input.error {
  border-color: #EF4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.auth-btn {
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #3B82F6, #2563EB);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 200ms ease;
  position: relative;
  overflow: hidden;
}

.auth-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.auth-btn:active {
  transform: translateY(0);
}

.auth-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.auth-btn .spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 600ms linear infinite;
  margin: 0 auto;
}

.auth-btn.loading .spinner {
  display: block;
}

.auth-btn.loading .btn-text {
  display: none;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.auth-error {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #DC2626;
  display: none;
  text-align: center;
}

.auth-error.show {
  display: flex;
  align-items: center;
  gap: 4px;
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: #94A3B8;
}

.auth-footer a {
  color: #3B82F6;
  text-decoration: none;
  font-weight: 500;
  transition: color 200ms;
}

.auth-footer a:hover {
  color: #2563EB;
  text-decoration: underline;
}

/* 密码可见性切换 */
.password-wrapper {
  position: relative;
}

.password-wrapper .form-input {
  width: 100%;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #94A3B8;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 200ms;
}

.password-toggle:hover {
  color: #475569;
}

/* 响应式 */
@media (max-width: 480px) {
  .auth-card {
    padding: 28px 20px;
  }
}

/* 错误抖动动画 */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.auth-card.shake {
  animation: shake 0.4s ease-in-out;
}

/* 减少动效 */
@media (prefers-reduced-motion: reduce) {
  .auth-card,
  .auth-btn,
  .form-input {
    transition: none;
  }
}
