/* ========================================
   Willo Campus — Auth Pages (Login/Register)
   ======================================== */

/* ── Global Base ─────────────────────── */
/* Using variables from landing.css */

/* ── Page Layout ─────────────────────── */
.auth-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--landing-bg);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--landing-text);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
}

.auth-columns {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  width: 100%;
  flex: 1;
}

/* ── Split Columns ───────────────────── */
.auth-col-left {
  width: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 80px;
  box-sizing: border-box;
  background: var(--landing-surface);
  transition: background 0.4s ease;
}

.auth-col-right {
  width: 50%;
  background: var(--landing-hero-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.auth-col-right::before,
.auth-col-right::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.6;
  animation: authBlobFloat 8s ease-in-out infinite alternate;
  pointer-events: none;
}

.auth-col-right::before {
  width: 400px;
  height: 400px;
  background: var(--landing-accent-glow);
  top: -10%;
  left: -10%;
  animation-duration: 10s;
}

.auth-col-right::after {
  width: 350px;
  height: 350px;
  background: rgba(139, 92, 246, 0.15); /* Soft purple tint */
  bottom: -15%;
  right: -5%;
  animation-delay: -3s;
  animation-duration: 12s;
}

@keyframes authBlobFloat {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -20px) scale(1.05); }
  100% { transform: translate(-20px, 15px) scale(0.95); }
}

.auth-brand {
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-brand a {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--landing-text);
  text-decoration: none;
  letter-spacing: -0.03em;
  transition: opacity 0.2s;
}

.auth-brand a:hover {
  opacity: 0.85;
}

/* ── Content Container ───────────────── */
.auth-content-container {
  max-width: 380px;
  width: 100%;
  margin: auto 0; /* Align left and center vertically */
  padding: 40px 0;
  animation: authContentIn 0.5s ease both;
}

@keyframes authContentIn {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Toggle Tabs ─────────────────────── */
.auth-toggle {
  display: flex;
  background: var(--landing-bg);
  border-radius: 9999px;
  padding: 4px;
  margin-bottom: 32px;
  border: 1px solid var(--landing-border);
}

.auth-toggle__btn {
  flex: 1;
  text-align: center;
  padding: 10px 16px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--landing-text-secondary);
  text-decoration: none;
  border-radius: 9999px;
  transition: all 0.2s ease;
}

.auth-toggle__btn:hover {
  color: var(--landing-text);
}

.auth-toggle__btn.is-active {
  background: var(--landing-surface);
  color: var(--landing-text);
  box-shadow: 0 1px 3px rgba(34, 52, 73, 0.08), 0 1px 2px rgba(34, 52, 73, 0.04);
}

/* ── Header ──────────────────────────── */
.auth-header {
  margin-bottom: 24px;
}

.auth-title {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--landing-text);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.auth-subtitle {
  font-size: 0.88rem;
  color: var(--landing-text-secondary);
  line-height: 1.5;
}

/* ── Error Alert ─────────────────────── */
.auth-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 6px;
  font-size: 0.82rem;
  margin-bottom: 20px;
  line-height: 1.4;
}

.auth-alert--error {
  background: rgba(229, 62, 62, 0.06);
  color: var(--destructive-red);
  border: 1px solid rgba(229, 62, 62, 0.12);
}

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

.auth-input-group {
  display: flex;
  flex-direction: column;
}

.auth-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-wrapper input {
  width: 100%;
  height: 44px; /* Standard height */
  padding: 12px 16px;
  border: 1px solid var(--landing-border);
  border-radius: 6px; /* md: 6px */
  font-size: 0.88rem;
  font-family: inherit;
  background: var(--landing-surface);
  color: var(--landing-text);
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.auth-input-wrapper input::placeholder {
  color: var(--landing-text-muted);
}

.auth-input-wrapper input:focus {
  outline: none;
  border-color: var(--landing-accent);
  box-shadow: 0 0 0 4px var(--landing-accent-glow);
  transform: translateY(-1px);
}

/* Password input needs extra right padding for the toggle button */
.auth-input-wrapper input[type="password"],
.auth-input-wrapper input.auth-password-input {
  padding-right: 44px;
}

/* ── Password Toggle Button ─────────── */
.auth-password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--landing-text-muted);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
  z-index: 2;
}

.auth-password-toggle:hover {
  color: var(--landing-text);
  background: var(--landing-bg);
}

.auth-password-toggle svg {
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.auth-password-toggle .icon-eye-off {
  display: none;
}

.auth-password-toggle.is-visible .icon-eye {
  display: none;
}

.auth-password-toggle.is-visible .icon-eye-off {
  display: block;
}

/* ── Forgot Link ─────────────────────── */
.auth-options {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

.auth-forgot {
  font-size: 0.78rem;
  color: var(--landing-text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.auth-forgot:hover {
  color: var(--landing-text);
  text-decoration: underline;
}

/* ── Buttons ─────────────────────────── */
.auth-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 44px; /* h-11: 44px */
  border: none;
  border-radius: 6px; /* md: 6px */
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  background: var(--landing-accent);
  color: var(--landing-accent-text);
  box-shadow: 0 4px 14px var(--landing-accent-glow);
  transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
  margin-top: 8px;
}

.auth-submit:hover {
  background: var(--landing-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--landing-accent-glow);
}

.auth-submit:active {
  transform: scale(0.98);
}

.auth-google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 44px;
  border: 1px solid var(--landing-border);
  border-radius: 6px;
  background: var(--landing-surface);
  color: var(--landing-text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, transform 0.1s;
}

.auth-google-btn:hover {
  background: var(--landing-surface-hover);
  border-color: var(--landing-text-secondary);
}

.auth-google-btn:active {
  transform: scale(0.98);
}

.auth-google-icon {
  width: 18px;
  height: 18px;
}

.auth-coming-soon {
  text-align: center;
  font-size: 0.75rem;
  color: var(--landing-text-muted);
  margin-top: 8px;
}

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

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

.auth-divider span {
  font-size: 0.75rem;
  color: var(--landing-text-muted);
}

/* ── Footer ──────────────────────────── */
.auth-footer-container {
  width: 100%;
}

/* ── Illustration (Right Column) ─────── */
.auth-illustration {
  position: relative;
  width: 340px;
  height: 500px;
  transform: rotate(-15deg);
}

.ill-card {
  position: absolute;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(34, 52, 73, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
  animation: cardFloat 6s ease-in-out infinite;
}

@keyframes cardFloat {
  0% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0); }
}

.ill-card:hover {
  transform: translateY(-10px) scale(1.05) !important;
  box-shadow: 0 20px 40px rgba(34, 52, 73, 0.15);
  z-index: 10;
}

.ill-card--1 {
  width: 140px;
  height: 180px;
  background: linear-gradient(135deg, rgba(34, 52, 73, 0.1), rgba(34, 52, 73, 0.02));
  top: 0;
  left: 20px;
  animation-delay: 0s;
}

.ill-card--2 {
  width: 150px;
  height: 220px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.4));
  top: 30px;
  right: -10px;
  animation-delay: -1.5s;
}

.ill-card--3 {
  width: 165px;
  height: 245px;
  background: linear-gradient(135deg, rgba(97, 108, 121, 0.15), rgba(97, 108, 121, 0.05));
  top: 200px;
  left: -20px;
  animation-delay: -3s;
}

.ill-card--4 {
  width: 140px;
  height: 195px;
  background: linear-gradient(135deg, rgba(34, 52, 73, 0.08), rgba(34, 52, 73, 0.01));
  top: 280px;
  right: 15px;
  animation-delay: -4.5s;
}

/* ── Responsive Layout ───────────────── */
@media (max-width: 992px) {
  .auth-col-left {
    width: 100%;
    padding: 40px 32px;
  }
  .auth-col-right {
    display: none;
  }
  .auth-content-container {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .auth-col-left {
    padding: 32px 20px;
  }
  .auth-toggle {
    margin-bottom: 24px;
  }
}

/* ── Validation Styles ──────────────── */
.auth-field-error {
  font-size: 0.75rem;
  color: var(--destructive-red, #e53e3e);
  margin-top: 6px;
  padding-left: 2px;
  line-height: 1.4;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.25s ease, max-height 0.3s ease, margin 0.3s ease;
}

.auth-field-error.is-visible {
  opacity: 1;
  max-height: 40px;
  margin-top: 6px;
}

.auth-input-wrapper input.is-invalid {
  border-color: var(--destructive-red, #e53e3e);
  box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

.auth-input-wrapper input.is-invalid:focus {
  border-color: var(--destructive-red, #e53e3e);
  box-shadow: 0 0 0 4px rgba(229, 62, 62, 0.15);
}

.auth-input-wrapper input.is-valid {
  border-color: #38a169;
  box-shadow: 0 0 0 3px rgba(56, 161, 105, 0.1);
}

.auth-input-wrapper input.is-valid:focus {
  border-color: #38a169;
  box-shadow: 0 0 0 4px rgba(56, 161, 105, 0.15);
}

/* Shake animation for invalid submit */
@keyframes authShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.auth-form.is-shaking {
  animation: authShake 0.4s ease;
}

/* Password strength meter */
.auth-password-strength {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

.auth-password-strength__bar {
  flex: 1;
  height: 3px;
  border-radius: 3px;
  background: var(--landing-border);
  transition: background 0.3s ease;
}

.auth-password-strength__bar.is-filled-weak {
  background: #e53e3e;
}

.auth-password-strength__bar.is-filled-medium {
  background: #ecc94b;
}

.auth-password-strength__bar.is-filled-strong {
  background: #38a169;
}

.auth-password-strength__label {
  font-size: 0.7rem;
  color: var(--landing-text-muted);
  margin-top: 4px;
  transition: color 0.3s ease;
}

