/* =============================================
   CodeToFun — Auth Pages (Sign In / Sign Up)
   Shared styles for authentication pages
   ============================================= */

/* Override home.css body for auth gradient */
body.auth-body {
  background: linear-gradient(135deg, #eff6ff, #e0e7ff);
}

.auth-page {
  padding: 3rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-container {
  max-width: 64rem;
  width: 100%;
  margin: 0 auto;
}

.auth-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
  justify-items: center;
}

/* --- Left Panel (hidden on mobile) --- */
.auth-left {
  display: none;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.auth-logo-icon {
  background: #2563eb;
  padding: 0.75rem;
  border-radius: 0.75rem;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-logo-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  display: block;
}

.auth-logo-tag {
  font-size: 0.875rem;
  color: #475569;
}

.auth-left h2 {
  font-size: 1.875rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 1rem;
}

.auth-left > p {
  font-size: 1.063rem;
  color: #334155;
  margin-bottom: 2rem;
  line-height: 1.7;
}

/* Stats grid */
.trust-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.trust-stat {
  background: #fff;
  border-radius: 0.75rem;
  padding: 1.25rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.trust-stat-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.trust-stat-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.trust-stat-icon.ts-blue { background: #dbeafe; color: #2563eb; }
.trust-stat-icon.ts-green { background: #dcfce7; color: #16a34a; }
.trust-stat-icon.ts-purple { background: #f3e8ff; color: #9333ea; }
.trust-stat-icon.ts-orange { background: #ffedd5; color: #ea580c; }

.trust-stat strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}

.trust-stat span {
  font-size: 0.813rem;
  color: #475569;
}

/* Benefits card */
.benefits-card {
  background: #fff;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  margin-bottom: 1.5rem;
}

.benefits-card h3 {
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
}

.benefit-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.875rem;
}

.benefit-row:last-child {
  margin-bottom: 0;
}

.benefit-row svg {
  color: #22c55e;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.benefit-row strong {
  display: block;
  font-size: 0.938rem;
  font-weight: 600;
  color: #0f172a;
}

.benefit-row span {
  font-size: 0.813rem;
  color: #475569;
}

/* Testimonials */
.testimonials-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.testimonial-banner {
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  border-radius: 0.75rem;
  padding: 1.5rem;
  color: #fff;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
}

.testimonial-white {
  background: #fff;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  border: 2px solid #dbeafe;
}

.t-stars {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}

.testimonial-banner p {
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 0.75rem;
  font-style: italic;
  line-height: 1.6;
}

.testimonial-white p {
  color: #334155;
  margin-bottom: 0.75rem;
  font-style: italic;
  line-height: 1.6;
}

.t-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.t-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.t-avatar-light { background: rgba(255, 255, 255, 0.2); color: #fff; }
.t-avatar-blue { background: #dbeafe; color: #2563eb; }

.t-author-name { font-weight: 600; display: block; }
.t-author-role { font-size: 0.813rem; }
.testimonial-banner .t-author-role { color: rgba(255, 255, 255, 0.8); }
.testimonial-white .t-author-name { color: #0f172a; }
.testimonial-white .t-author-role { color: #475569; }

/* --- Right Panel (Form) --- */
.auth-right {
  width: 100%;
  max-width: 28rem;
  margin: 0 auto;
}

.mobile-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.auth-card {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  padding: 2rem;
  border: 2px solid #dbeafe;
}

.auth-card-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.auth-card-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.auth-card-header p {
  color: #475569;
  font-size: 0.938rem;
}

/* Free badge (sign-up) */
.free-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: #dcfce7;
  color: #15803d;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.813rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.free-badge svg { width: 1rem; height: 1rem; }

/* Mobile trust badge */
.mobile-trust {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.mt-item { text-align: center; }
.mt-item strong { display: block; font-weight: 700; color: #2563eb; font-size: 0.938rem; }
.mt-item span { font-size: 0.688rem; color: #475569; }
.mt-divider { width: 1px; height: 2rem; background: #bfdbfe; }

/* Social buttons */
.social-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.social-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.875rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.938rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.social-btn svg {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.btn-google {
  background: #fff;
  color: #334155;
  border: 2px solid #cbd5e1;
}

.btn-google:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.btn-facebook {
  background: #1877F2;
  color: #fff;
}

.btn-facebook:hover {
  background: #166FE5;
  box-shadow: 0 4px 12px rgba(24, 119, 242, 0.3);
}

/* Security badge */
.security-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  font-size: 0.813rem;
  color: #475569;
}

.security-badge svg { color: #16a34a; }

/* Quick benefits (sign-up) */
.quick-benefits {
  background: #eff6ff;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-top: 1rem;
}

.qb-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.813rem;
  color: #334155;
  margin-bottom: 0.5rem;
}

.qb-row:last-child { margin-bottom: 0; }

.qb-row svg {
  width: 0.875rem;
  height: 0.875rem;
  color: #2563eb;
  flex-shrink: 0;
}

/* Divider & links */
.auth-divider {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
  text-align: center;
}

.auth-divider p { font-size: 0.875rem; color: #475569; }
.auth-divider a { color: #2563eb; font-weight: 600; }
.auth-divider a:hover { color: #1d4ed8; }

.back-home {
  display: block;
  text-align: center;
  font-size: 0.875rem;
  color: #64748b;
  margin-top: 1rem;
  transition: color 0.2s;
}

.back-home:hover { color: #334155; }

.auth-footer-note {
  text-align: center;
  font-size: 0.813rem;
  color: #475569;
  margin-top: 1.5rem;
}

.auth-footer-note a { color: #2563eb; }
.auth-footer-note a:hover { text-decoration: underline; }

/* =============================================
   RESPONSIVE — Tablet (640px+)
   ============================================= */
@media (min-width: 640px) {
  .auth-card {
    padding: 2.5rem;
  }
}

/* =============================================
   RESPONSIVE — Desktop (1024px+)
   ============================================= */
@media (min-width: 1024px) {
  .auth-grid {
    grid-template-columns: 1fr auto;
    justify-items: stretch;
  }

  .auth-left { display: block; }
  .mobile-logo { display: none; }
  .mobile-trust { display: none; }

  .auth-right {
    margin: 0;
    width: 26rem;
  }

  .auth-page { padding: 2.5rem 1rem; }
}
