/* ═══════════════════════════════════════════════════════
   NasajTools — Auth Pages (Login / Signup / Forgot Password)
   Uses main.css variables. Supports dark + light mode.
   ═══════════════════════════════════════════════════════ */

/* ── Page Layout ── */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.auth-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 60px;
}

.auth-split {
  display: flex;
  align-items: center;
  gap: 60px;
  max-width: 1000px;
  width: 100%;
}

/* ── Auth Card (Form Side) ── */
.auth-card {
  flex: 1;
  max-width: 460px;
  width: 100%;
  background: var(--tool-card-bg);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 44px 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary-gradient);
}

.light-mode .auth-card {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

/* ── Card Header ── */
.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  background: var(--primary-gradient);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(58, 90, 254, 0.3);
}

.auth-logo i {
  font-size: 1.5rem;
  color: #fff;
}

.auth-title {
  font-size: 1.75rem;
  font-weight: 800;
  background: var(--hero-heading-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 8px;
}

.auth-subtitle {
  font-size: 0.95rem;
  color: var(--dark-text);
  opacity: 0.7;
  line-height: 1.5;
}

/* ── Social / OAuth Buttons ── */
.auth-social-group {
  margin-bottom: 24px;
}

.auth-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 14px 20px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.06);
  color: var(--dark-text);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: inherit;
}

.auth-social-btn:hover {
  background: rgba(58, 90, 254, 0.1);
  border-color: rgba(58, 90, 254, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(58, 90, 254, 0.15);
}

.auth-social-btn img {
  width: 22px;
  height: 22px;
}

.light-mode .auth-social-btn {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.12);
  color: #1e1e2a;
}

.light-mode .auth-social-btn:hover {
  background: rgba(58, 90, 254, 0.06);
  border-color: rgba(58, 90, 254, 0.3);
}

/* ── Divider ── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.auth-divider span {
  font-size: 0.82rem;
  color: var(--dark-text);
  opacity: 0.5;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

/* ── Form Elements ── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-field {
  position: relative;
}

.auth-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dark-text);
  opacity: 0.8;
  margin-bottom: 6px;
}

.auth-field input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.06);
  color: var(--dark-text);
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.25s ease;
  outline: none;
}

.auth-field input:focus {
  border-color: var(--primary-medium);
  background: rgba(58, 90, 254, 0.06);
  box-shadow: 0 0 0 3px rgba(58, 90, 254, 0.12);
}

.auth-field input::placeholder {
  color: var(--dark-text);
  opacity: 0.35;
}

.light-mode .auth-field input {
  background: #f8f9fb;
  border-color: rgba(0, 0, 0, 0.1);
  color: #1e1e2a;
}

.light-mode .auth-field input:focus {
  background: #fff;
  border-color: var(--primary-medium);
}

/* ── Password Toggle ── */
.auth-password-wrapper {
  position: relative;
}

.auth-password-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--dark-text);
  opacity: 0.4;
  cursor: pointer;
  font-size: 1rem;
  transition: opacity 0.2s;
  padding: 4px;
}

.auth-password-toggle:hover {
  opacity: 0.8;
}

/* ── Extras Row (Remember / Forgot) ── */
.auth-extras {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
}

.auth-extras a {
  color: var(--primary-medium);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s;
}

.auth-extras a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* ── Submit Button ── */
.auth-submit {
  width: 100%;
  padding: 15px 24px;
  border-radius: 12px;
  border: none;
  background: var(--primary-gradient);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  position: relative;
  overflow: hidden;
}

.auth-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(58, 90, 254, 0.4);
}

.auth-submit:active {
  transform: translateY(0);
}

.auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ── Loading Spinner on Button ── */
.auth-submit .spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: authSpin 0.6s linear infinite;
  margin: 0 auto;
}

.auth-submit.loading .spinner {
  display: inline-block;
}

.auth-submit.loading .btn-text {
  display: none;
}

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

/* ── Footer Link ── */
.auth-footer-link {
  text-align: center;
  margin-top: 24px;
  font-size: 0.9rem;
  color: var(--dark-text);
  opacity: 0.7;
}

.auth-footer-link a {
  color: var(--primary-medium);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s;
}

.auth-footer-link a:hover {
  text-decoration: underline;
}

/* ── Welcome Bonus Badge ── */
.auth-bonus {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  margin-bottom: 24px;
}

.auth-bonus i {
  color: #10b981;
  font-size: 1.1rem;
}

.auth-bonus span {
  font-size: 0.85rem;
  color: #10b981;
  font-weight: 600;
}

/* ── Alert Messages ── */
.auth-alert {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 500;
  display: none;
  align-items: center;
  gap: 8px;
  animation: authSlideIn 0.3s ease;
}

.auth-alert.show {
  display: flex;
}

.auth-alert.error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #ef4444;
}

.auth-alert.success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #10b981;
}

@keyframes authSlideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Illustration Side ── */
.auth-illustration {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 440px;
}

.auth-illustration-graphic {
  width: 100%;
  max-width: 360px;
  margin-bottom: 32px;
  position: relative;
}

.auth-illustration-graphic .art-blob {
  width: 280px;
  height: 280px;
  border-radius: 42% 58% 65% 35% / 45% 42% 58% 55%;
  background: linear-gradient(135deg, rgba(58, 90, 254, 0.15), rgba(108, 140, 255, 0.08));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  animation: blobFloat 6s ease-in-out infinite;
}

.auth-illustration-graphic .art-blob i {
  font-size: 5rem;
  color: var(--primary-medium);
  opacity: 0.7;
}

@keyframes blobFloat {
  0%, 100% { border-radius: 42% 58% 65% 35% / 45% 42% 58% 55%; transform: translateY(0); }
  33% { border-radius: 55% 45% 38% 62% / 52% 60% 40% 48%; transform: translateY(-12px); }
  66% { border-radius: 48% 52% 55% 45% / 38% 55% 45% 62%; transform: translateY(6px); }
}

.auth-illustration h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark-text);
  margin-bottom: 12px;
}

.auth-illustration p {
  font-size: 0.95rem;
  color: var(--dark-text);
  opacity: 0.6;
  line-height: 1.6;
  max-width: 320px;
}

.auth-features {
  list-style: none;
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--dark-text);
  opacity: 0.75;
}

.auth-features li i {
  color: #10b981;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* ── Success State (Email Verification / Password Reset) ── */
.auth-success-state {
  text-align: center;
  padding: 20px 0;
  display: none;
}

.auth-success-state.show {
  display: block;
}

.auth-success-state .success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.auth-success-state .success-icon i {
  font-size: 2rem;
  color: #10b981;
}

.auth-success-state h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark-text);
  margin-bottom: 8px;
}

.auth-success-state p {
  font-size: 0.9rem;
  color: var(--dark-text);
  opacity: 0.65;
  line-height: 1.6;
  margin-bottom: 24px;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .auth-illustration {
    display: none;
  }

  .auth-split {
    justify-content: center;
  }

  .auth-card {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .auth-wrapper {
    padding: 100px 16px 40px;
  }

  .auth-card {
    padding: 32px 24px;
    border-radius: 20px;
  }

  .auth-title {
    font-size: 1.4rem;
  }

  .auth-social-btn {
    padding: 12px 16px;
    font-size: 0.9rem;
  }

  .auth-field input {
    padding: 12px 14px;
  }

  .auth-submit {
    padding: 13px 20px;
  }
}
