/* ============================================================
   VERBLISH — Auth Page Stylesheet (auth.css)
   Social-only: Google · Apple · Facebook
   Matches brand: Green #3CB87A | Blue #4AAED9 | Sora + DM Sans
   ============================================================ */

/* ── ==============================
       AUTH BODY & PAGE WRAPPER
   ============================== */
.auth-body {
  min-height: 100vh;
  background: var(--off-white);
  overflow-x: hidden;
}

.auth-page-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

/* ── ==============================
       BACK LINK
   ============================== */
.auth-back-link {
  position: fixed;
  top: 24px;
  left: 24px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 9px 18px;
  border-radius: 99px;
  transition: var(--transition);
  text-decoration: none;
}
.auth-back-link:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  transform: translateX(-3px);
}

/* ── ==============================
       LEFT — BRAND PANEL
   ============================== */
.auth-brand-panel {
  position: relative;
  background: linear-gradient(145deg, #0d1f2d 0%, #1a3a2a 50%, #0d2a1f 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 56px;
  overflow: hidden;
}

/* Decorative blurred orbs */
.auth-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  pointer-events: none;
  z-index: 0;
}
.auth-orb-1 {
  width: 420px;
  height: 420px;
  background: rgba(60, 184, 122, 0.25);
  top: -120px;
  left: -100px;
}
.auth-orb-2 {
  width: 300px;
  height: 300px;
  background: rgba(74, 174, 217, 0.18);
  bottom: 60px;
  right: -80px;
}
.auth-orb-3 {
  width: 200px;
  height: 200px;
  background: rgba(60, 184, 122, 0.12);
  bottom: -60px;
  left: 40%;
}

/* Everything inside brand panel sits above orbs */
.auth-brand-panel > *:not(.auth-orb) {
  position: relative;
  z-index: 1;
}

/* Logo */
.auth-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  margin-bottom: 64px;
}
.auth-logo img {
  height: 40px;
  width: auto;
  border-radius: 8px;
}
.auth-logo span {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--green);
  letter-spacing: -0.5px;
}

/* Brand headline */
.auth-brand-copy {
  margin-bottom: 48px;
}
.auth-brand-headline {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 3vw, 2.8rem);
  color: #fff;
  line-height: 1.15;
  margin-bottom: 18px;
}
.auth-headline-gradient {
  background: linear-gradient(90deg, var(--green) 0%, var(--blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.auth-brand-sub {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.7;
  max-width: 380px;
}

/* Trust pills row */
.auth-trust-pills {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.auth-trust-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  backdrop-filter: blur(8px);
  transition: var(--transition);
}
.auth-trust-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(60, 184, 122, 0.4);
}
.auth-trust-icon {
  font-size: 1.3rem;
  line-height: 1;
}
.auth-trust-val {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  line-height: 1;
}
.auth-trust-lbl {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 2px;
}

/* Testimonial card */
.auth-testimonial {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  backdrop-filter: blur(10px);
  position: relative;
}
.auth-testimonial::before {
  content: '"';
  position: absolute;
  top: -12px;
  left: 24px;
  font-size: 4rem;
  color: var(--green);
  font-family: Georgia, serif;
  line-height: 1;
  opacity: 0.7;
}
.auth-testimonial-quote {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.65;
  font-style: italic;
  margin-bottom: 18px;
  padding-top: 8px;
}
.auth-testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.auth-testimonial-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  flex-shrink: 0;
}
.auth-testimonial-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.88rem;
  color: #fff;
}
.auth-testimonial-role {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 2px;
}

/* ── ==============================
       RIGHT — FORM PANEL
   ============================== */
.auth-form-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 48px;
  background: var(--white);
  overflow-y: auto;
}

/* ── Tabs ── */
.auth-tabs {
  display: flex;
  background: var(--gray-100);
  border-radius: 99px;
  padding: 5px;
  gap: 4px;
  margin-bottom: 36px;
  width: 100%;
  max-width: 400px;
}
.auth-tab {
  flex: 1;
  padding: 10px 20px;
  border-radius: 99px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gray-400);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}
.auth-tab.active {
  background: var(--white);
  color: var(--dark);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
.auth-tab:hover:not(.active) {
  color: var(--gray-700);
}

/* ── Card ── */
.auth-card {
  width: 100%;
  max-width: 400px;
  animation: auth-fade-in 0.45s ease both;
}

@keyframes auth-fade-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.auth-card-header {
  margin-bottom: 32px;
  text-align: center;
}
.auth-card-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.8rem;
  color: var(--dark);
  margin-bottom: 6px;
}
.auth-card-sub {
  font-size: 0.95rem;
  color: var(--gray-400);
}

/* ── ==============================
       SOCIAL BUTTONS  (primary UI)
   ============================== */
.auth-socials {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.auth-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  text-align: center;
}

/* Ripple effect on click */
.auth-social-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0);
  transition: background 0.2s ease;
}
.auth-social-btn:active::after {
  background: rgba(255, 255, 255, 0.18);
}

/* Google */
.auth-google {
  background: var(--white);
  color: #3c4043;
  border-color: var(--gray-200);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}
.auth-google:hover {
  border-color: #4285F4;
  box-shadow: 0 4px 16px rgba(66, 133, 244, 0.18);
  transform: translateY(-2px);
}

/* Apple */
.auth-apple {
  background: #000;
  color: #fff;
  border-color: #000;
}
.auth-apple:hover {
  background: #1a1a1a;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  transform: translateY(-2px);
}

/* Facebook */
.auth-facebook {
  background: #1877F2;
  color: #fff;
  border-color: #1877F2;
}
.auth-facebook:hover {
  background: #0d65d9;
  box-shadow: 0 4px 16px rgba(24, 119, 242, 0.35);
  transform: translateY(-2px);
}

/* Social icon */
.auth-social-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Loading state */
.auth-social-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
}

/* ── Spinner ── */
.auth-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: auth-spin 0.7s linear infinite;
  vertical-align: middle;
}
/* Spinner for Google (dark bg) */
.auth-google .auth-spinner {
  border-color: rgba(0, 0, 0, 0.15);
  border-top-color: #3c4043;
}

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

/* ── Divider (hidden — email removed) ── */
.auth-divider {
  display: none;
}

/* ── Email form (hidden — social-only) ── */
.auth-email-form {
  display: none !important;
}

/* ── Switch text ── */
.auth-switch-text {
  text-align: center;
  font-size: 0.88rem;
  color: var(--gray-400);
  margin-top: 24px;
}
.auth-switch-text a {
  color: var(--green);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}
.auth-switch-text a:hover {
  color: var(--green-dark);
  text-decoration: underline;
}

/* ── Separator between socials and switch text ── */
.auth-social-note {
  text-align: center;
  font-size: 0.78rem;
  color: var(--gray-400);
  margin-top: 20px;
  line-height: 1.5;
}
.auth-social-note a {
  color: var(--green);
  text-decoration: none;
}
.auth-social-note a:hover {
  text-decoration: underline;
}

/* ── ==============================
       SUCCESS CARD
   ============================== */
.auth-success-card {
  text-align: center;
}
.auth-success-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  animation: auth-bounce 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}
@keyframes auth-bounce {
  0%   { transform: scale(0.5); opacity: 0; }
  60%  { transform: scale(1.15); opacity: 1; }
  80%  { transform: scale(0.95); }
  100% { transform: scale(1); }
}
.auth-success-animate {
  animation: auth-fade-in 0.5s ease both;
}
.auth-success-card .auth-submit-btn {
  margin-top: 24px;
}

/* ── Footer note ── */
.auth-footer-note {
  margin-top: 32px;
  font-size: 0.78rem;
  color: var(--gray-400);
  text-align: center;
  max-width: 400px;
}
.auth-footer-note a {
  color: var(--green);
  text-decoration: none;
}
.auth-footer-note a:hover {
  text-decoration: underline;
}

/* ── ==============================
       TOAST NOTIFICATION
   ============================== */
.auth-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--dark);
  color: var(--white);
  padding: 12px 24px;
  border-radius: 99px;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
  white-space: nowrap;
}
.auth-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.auth-toast-error {
  background: #ef4444;
}
.auth-toast-success {
  background: var(--green);
}

/* ── ==============================
       SHAKE ANIMATION (validation)
   ============================== */
@keyframes auth-shake {
  0%  { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
  100%{ transform: translateX(0); }
}

/* ── ==============================
       RESPONSIVE
   ============================== */

/* Tablet */
@media (max-width: 900px) {
  .auth-page-wrapper {
    grid-template-columns: 1fr;
  }

  .auth-brand-panel {
    display: none; /* hide on mobile — clean, focused form */
  }

  .auth-form-panel {
    min-height: 100vh;
    padding: 48px 28px;
    justify-content: center;
  }

  .auth-back-link {
    color: var(--green);
    background: var(--green-light);
    border-color: var(--green-light);
  }
  .auth-back-link:hover {
    background: #c0ecd5;
  }
}

/* Mobile */
@media (max-width: 480px) {
  .auth-form-panel {
    padding: 40px 20px;
  }

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

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

  .auth-card-title {
    font-size: 1.5rem;
  }

  .auth-social-btn {
    font-size: 0.88rem;
    padding: 13px 16px;
  }

  .auth-back-link {
    top: 16px;
    left: 16px;
    font-size: 0.78rem;
    padding: 7px 14px;
  }

  .auth-footer-note {
    margin-top: 24px;
  }
}

/* Very small screens */
@media (max-width: 360px) {
  .auth-social-btn {
    gap: 8px;
    font-size: 0.82rem;
  }
}

/* ── ==============================
       ACCESSIBILITY
   ============================== */
.auth-social-btn:focus-visible,
.auth-tab:focus-visible,
.auth-back-link:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .auth-card,
  .auth-social-btn,
  .auth-trust-pill,
  .auth-back-link {
    transition: none;
    animation: none;
  }
  .auth-spinner {
    animation: none;
    border-top-color: currentColor;
  }
}
