/* ===================================================
   FORGE — Auth Styles (Login / Sign-up)
   =================================================== */

/* ── Auth Shell ── */
.auth-shell {
  min-height: 100vh;
  min-height: -webkit-fill-available;
  display: grid;
  grid-template-rows: 1fr;
  position: relative;
  overflow: hidden;
  padding-top: var(--safe-top);
}

/* ── Animated Background ── */
.auth-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.auth-bg-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(255,61,0,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(0,229,255,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(204,255,0,0.04) 0%, transparent 70%),
    var(--bg-primary);
}

.auth-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

/* Floating orbs */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.4;
  animation: float 8s ease-in-out infinite;
}
.orb-1 {
  width: 300px; height: 300px;
  background: var(--orange);
  top: -100px; left: -80px;
  opacity: 0.12;
  animation-duration: 9s;
}
.orb-2 {
  width: 250px; height: 250px;
  background: var(--cyan);
  bottom: -80px; right: -60px;
  opacity: 0.10;
  animation-duration: 11s;
  animation-delay: -3s;
}
.orb-3 {
  width: 180px; height: 180px;
  background: var(--lime);
  top: 40%; left: 60%;
  opacity: 0.06;
  animation-duration: 13s;
  animation-delay: -6s;
}

/* ── Auth Container ── */
.auth-container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--sp-6) var(--sp-5);
  gap: var(--sp-8);
}

/* ── Logo ── */
.auth-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  animation: fadeInUp 0.5s var(--ease-out) both;
}

.auth-logo-mark {
  width: 72px;
  height: 72px;
  border-radius: var(--r-xl);
  background: linear-gradient(135deg, var(--orange), #FF6030);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: white;
  box-shadow: 0 8px 40px rgba(255,61,0,0.4), 0 0 0 1px rgba(255,61,0,0.3);
  letter-spacing: 0.02em;
  position: relative;
  overflow: hidden;
}

.auth-logo-mark::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  animation: shimmerLogo 3s ease-in-out infinite;
}

@keyframes shimmerLogo {
  0% { left: -100%; }
  50%, 100% { left: 200%; }
}

.auth-wordmark {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  letter-spacing: 0.12em;
  line-height: 1;
  background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-tagline {
  font-size: 0.8125rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 500;
}

/* ── Auth Card ── */
.auth-card {
  width: 100%;
  max-width: 400px;
  background: rgba(22, 22, 22, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-medium);
  border-radius: var(--r-2xl);
  padding: var(--sp-8) var(--sp-6);
  box-shadow:
    0 24px 80px rgba(0,0,0,0.6),
    0 0 0 1px rgba(255,255,255,0.04) inset;
  animation: fadeInUp 0.5s var(--ease-out) 0.1s both;
}

/* ── Auth Tab Switcher ── */
.auth-tabs {
  display: flex;
  gap: var(--sp-1);
  background: var(--bg-elevated);
  border-radius: var(--r-xl);
  padding: var(--sp-1);
  margin-bottom: var(--sp-6);
}

.auth-tab {
  flex: 1;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-lg);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--t-fast);
  text-align: center;
}

.auth-tab.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* ── Auth Forms ── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.auth-form-panel {
  display: none;
}
.auth-form-panel.active {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  animation: fadeIn 0.25s ease both;
}

/* Input with icon */
.input-wrap {
  position: relative;
}
.input-wrap .input-icon {
  position: absolute;
  left: var(--sp-4);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.1rem;
  pointer-events: none;
  transition: color var(--t-fast);
}
.input-wrap .form-input {
  padding-left: calc(var(--sp-4) + 1.4rem + var(--sp-3));
}
.input-wrap .form-input:focus ~ .input-icon,
.input-wrap:focus-within .input-icon {
  color: var(--cyan);
}

/* Password toggle */
.input-wrap .btn-toggle-pw {
  position: absolute;
  right: var(--sp-3);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  padding: var(--sp-2);
  border-radius: var(--r-md);
  font-size: 1rem;
  transition: color var(--t-fast);
}
.input-wrap .btn-toggle-pw:hover { color: var(--text-primary); }

/* Error message */
.form-error {
  font-size: 0.8125rem;
  color: var(--orange);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-top: calc(-1 * var(--sp-2));
  min-height: 20px;
}

/* ── Submit Button (full-width) ── */
.auth-submit {
  width: 100%;
  padding: var(--sp-4);
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-heading);
  letter-spacing: 0.1em;
  font-size: 1.2rem;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--orange), #FF6030);
  color: white;
  box-shadow: 0 4px 24px rgba(255,61,0,0.4);
  transition: all var(--t-fast);
  position: relative;
  overflow: hidden;
}
.auth-submit:hover {
  box-shadow: 0 8px 36px rgba(255,61,0,0.55);
  transform: translateY(-1px);
}
.auth-submit:active { transform: translateY(0); }
.auth-submit .btn-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: inherit;
  opacity: 0;
  transition: opacity var(--t-fast);
}
.auth-submit.loading .btn-loader  { opacity: 1; }
.auth-submit.loading .btn-label   { opacity: 0; }

/* ── Divider ── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  color: var(--text-muted);
  font-size: 0.8125rem;
  margin: var(--sp-2) 0;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

/* ── Google Sign-In ── */
.btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--r-lg);
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-weight: 600;
  transition: all var(--t-fast);
}
.btn-google:hover {
  background: var(--bg-card);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}
.btn-google svg { flex-shrink: 0; }

/* ── Forgot Password ── */
.auth-forgot {
  text-align: right;
  font-size: 0.8125rem;
  color: var(--cyan);
  margin-top: calc(-1 * var(--sp-2));
  transition: color var(--t-fast);
}
.auth-forgot:hover { color: var(--lime); }

/* ── Footer ── */
.auth-footer {
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: var(--sp-6);
  animation: fadeInUp 0.5s var(--ease-out) 0.2s both;
}
.auth-footer a {
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-medium);
  padding-bottom: 1px;
}
.auth-footer a:hover { color: var(--text-primary); border-color: var(--text-secondary); }

/* ── Reset Password Panel ── */
.auth-reset-panel {
  display: none;
}
.auth-reset-panel.active {
  display: block;
  animation: fadeIn 0.25s ease both;
}
.auth-back {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: var(--sp-5);
  transition: color var(--t-fast);
}
.auth-back:hover { color: var(--cyan); }

/* ── Responsive ── */
@media (max-width: 420px) {
  .auth-card { padding: var(--sp-6) var(--sp-5); border-radius: var(--r-xl); }
  .auth-container { padding: var(--sp-4); }
}
