/* ============================================
   天行中枢 - 登录页面专用样式
   左对齐布局 + 毛玻璃风格
   ============================================ */

.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 8vw;
  position: relative;
  z-index: 2;
}

.login-container {
  width: 100%;
  max-width: 400px;
}

/* ---------- Logo Area ---------- */
.login-logo {
  margin-bottom: 20px;
}

.login-logo h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.login-logo p {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* ---------- Login Card ---------- */
.login-card {
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(40px) saturate(1.5);
  -webkit-backdrop-filter: blur(40px) saturate(1.5);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.login-card h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 22px;
  color: var(--text-primary);
}

/* ---------- Form ---------- */
.login-card .form-group {
  margin-bottom: 16px;
}

.login-card .form-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
  display: block;
}

.login-card .form-input {
  width: 100%;
  padding: 11px 14px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.08);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.login-card .form-input:hover {
  border-color: rgba(148, 163, 184, 0.15);
  background: rgba(30, 41, 59, 0.6);
}

.login-card .form-input:focus {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12), 0 0 12px rgba(99, 102, 241, 0.08);
  background: rgba(30, 41, 59, 0.7);
}

.login-card .form-input::placeholder {
  color: var(--text-muted);
}

/* ---------- Password Toggle ---------- */
.input-wrapper {
  position: relative;
}

.input-wrapper .form-input {
  padding-right: 40px;
}

.toggle-password {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}

.toggle-password:hover {
  color: var(--text-primary);
  background: rgba(148, 163, 184, 0.1);
}

.login-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* ---------- Options Row ---------- */
.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  margin-top: -4px;
}

.login-options label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.15s;
}

.login-options label:hover {
  color: var(--text-primary);
}

.login-options input[type="checkbox"] {
  accent-color: var(--color-primary);
  width: 15px;
  height: 15px;
}

/* ---------- Login Button ---------- */
.login-btn {
  width: 100%;
  padding: 11px;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--color-primary), #7c3aed);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.05em;
}

.login-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(255,255,255,0.12));
  opacity: 0;
  transition: opacity 0.25s;
}

.login-btn:hover::before {
  opacity: 1;
}

.login-btn:hover {
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.45);
  transform: translateY(-1px);
}

.login-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.login-btn .login-icon {
  transition: transform 0.25s;
}

.login-btn:hover .login-icon {
  transform: translateX(2px);
}

/* ---------- Error Message ---------- */
.login-error {
  margin-top: 14px;
  padding: 10px 14px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-sm);
  color: #fca5a5;
  font-size: 0.82rem;
  text-align: center;
  display: none;
}

/* ---------- Footer ---------- */
.login-footer {
  margin-top: 24px;
  color: var(--text-muted);
  font-size: 0.75rem;
  opacity: 0.7;
}

/* ---------- Loading State ---------- */
.login-btn.loading {
  color: transparent;
  pointer-events: none;
}

.login-btn.loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ---------- Decorative Accent ---------- */
.login-accent {
  position: fixed;
  top: -20vh;
  right: -10vw;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(99,102,241,0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

.login-accent-bottom {
  position: fixed;
  bottom: -20vh;
  left: -10vw;
  width: 40vw;
  height: 40vw;
  background: radial-gradient(circle, rgba(124,58,237,0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .login-wrapper {
    justify-content: center;
    padding: 0 24px;
  }

  .login-card {
    padding: 24px;
  }
}
