/* Auth page (login / register) */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  background: var(--bg);
  overflow: hidden;
}

/* Animated background blobs */
.auth-bg {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden;
}
.auth-blob {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: .35;
  animation: blobFloat 8s ease-in-out infinite alternate;
}
.auth-blob-1 { width: 500px; height: 500px; background: #7C3AED; top: -150px; left: -100px; animation-delay: 0s; }
.auth-blob-2 { width: 400px; height: 400px; background: #06B6D4; bottom: -120px; right: -80px; animation-delay: -3s; }
.auth-blob-3 { width: 300px; height: 300px; background: #4F46E5; top: 40%; left: 40%; animation-delay: -5s; }
@keyframes blobFloat {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(30px, -20px) scale(1.05); }
}

/* Grid overlay */
.auth-grid {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

.auth-wrap {
  width: 100%; max-width: 420px;
  position: relative; z-index: 1;
}

/* Logo + subtitle */
.auth-logo {
  text-align: center; margin-bottom: 28px;
}
.auth-logo img {
  filter: drop-shadow(0 0 20px rgba(124,58,237,.5));
  display: block;
}
.auth-logo h1 {
  font-size: 1.5rem; font-weight: 700; color: var(--text);
}
.auth-logo p {
  font-size: 0.875rem; color: var(--text-2); margin-top: 4px;
}

/* Social proof stats */
.auth-stats {
  display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
  margin-top: 12px;
}
.auth-stat {
  font-size: .78rem; color: var(--text-2);
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 20px; padding: 4px 10px;
}

/* Glassmorphism card */
.auth-card {
  background: rgba(15,15,25,.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 20px;
  padding: 36px;
  box-shadow: 0 24px 64px rgba(0,0,0,.5), 0 0 0 1px rgba(124,58,237,.06) inset;
}

/* Sliding tab indicator */
.auth-tabs {
  display: flex; position: relative;
  margin-bottom: 28px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 10px; padding: 4px; gap: 0;
}
.tab-indicator {
  position: absolute;
  top: 4px; bottom: 4px; left: 4px;
  width: calc(50% - 4px);
  background: var(--primary);
  border-radius: 7px;
  transition: transform .25s ease;
  will-change: transform;
  pointer-events: none;
  box-shadow: 0 4px 14px rgba(124,58,237,.4);
}
.tab-indicator.at-register {
  transform: translateX(100%);
}
.auth-tab {
  flex: 1; padding: 9px;
  background: none; border: none; border-radius: 7px;
  font-size: 0.875rem; font-weight: 600; cursor: pointer;
  color: var(--text-2);
  transition: color .25s ease;
  position: relative; z-index: 1;
}
.auth-tab.active { color: #fff; }
.auth-tab-panel { display: none; }
.auth-tab-panel.active { display: block; }

/* Improved inputs */
.auth-card .form-control {
  background: #161629;
  border: 1px solid #2c2c44;
  color: #fff;
}
.auth-card .form-control::placeholder { color: rgba(255,255,255,.3); }
.auth-card .form-control:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124,58,237,.2);
  outline: none;
  background: #161629;
}

/* Submit button */
.auth-submit {
  width: 100%; margin-top: 8px;
  background: var(--primary); color: #fff;
  border: none; border-radius: 10px;
  padding: 13px; font-size: 0.9375rem; font-weight: 600;
  cursor: pointer;
  transition: background 150ms, transform 200ms ease, box-shadow 200ms ease;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.auth-submit:hover:not(:disabled) {
  background: var(--primary-dim);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(124,58,237,.35);
}
.auth-submit:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: none;
}

/* Error alert */
.auth-error {
  background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.3);
  border-radius: 8px; padding: 10px 14px; font-size: 0.875rem; color: #FCA5A5;
  margin-bottom: 16px; display: none;
}

.auth-footer {
  text-align: center; margin-top: 20px;
  font-size: 0.8125rem; color: var(--text-2);
}
.auth-footer a { color: var(--accent); }

/* Password toggle */
.password-toggle { position: relative; }
.password-toggle input { padding-right: 44px; }
.password-toggle .toggle-btn {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 4px;
  font-size: 14px;
}

/* Remember row */
.remember-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; font-size: 0.8125rem;
}
.remember-row .check-label {
  display: flex; align-items: center; gap: 6px; cursor: pointer; color: var(--text-2);
}
.remember-row input { accent-color: var(--primary); }
.forgot-link { color: var(--accent); font-size: 0.8125rem; }

/* Divider */
.divider-text {
  display: flex; align-items: center; gap: 10px;
  color: var(--text-muted); font-size: 0.75rem; margin: 16px 0;
}
.divider-text::before, .divider-text::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* Feature strip */
.auth-features {
  display: flex; justify-content: center; gap: 6px;
  flex-wrap: wrap; margin-top: 18px;
}
.auth-feature {
  font-size: .72rem; color: var(--text-muted);
  display: flex; align-items: center; gap: 5px;
}
.auth-feature::before {
  content: '✓';
  color: var(--primary); font-weight: 700; font-size: .8rem;
}
.auth-feature:not(:last-child)::after {
  content: '·';
  margin-left: 6px; color: var(--border);
}
