/* ===================================================================
   Hugo's Signals — Auth Pages
   Split-panel layout: brand left, form right
   Bridges the dark marketing site and the light app UI
   =================================================================== */

/* --- Base --- */
.auth-body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #0f172a;
  -webkit-font-smoothing: antialiased;
}

/* --- Wrapper: side-by-side on desktop, stacked on mobile --- */
.auth-wrapper {
  display: flex;
  min-height: 100vh;
}

/* =========================
   LEFT PANEL — Brand
   ========================= */
.auth-brand-panel {
  flex: 0 0 42%;
  max-width: 520px;
  background: linear-gradient(165deg, #0b1120 0%, #111827 50%, #0f2b1e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2.5rem;
  position: relative;
  overflow: hidden;
}

/* Subtle gradient orb */
.auth-brand-panel::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -80px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.auth-brand-panel::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -60px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.auth-brand-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 360px;
}

/* Logo */
.auth-brand-logo,
.auth-mobile-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  margin-bottom: 2.5rem;
}

.auth-logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #10b981, #3b82f6);
  border-radius: 10px;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.auth-logo-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

/* Headline */
.auth-brand-headline {
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.25;
  color: #fff;
  margin: 0 0 0.75rem;
}

.auth-brand-sub {
  font-size: 0.95rem;
  color: #94a3b8;
  line-height: 1.55;
  margin: 0 0 2rem;
}

/* Feature list */
.auth-brand-features {
  list-style: none;
  padding: 0;
  margin: 0 0 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.auth-brand-features li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: #cbd5e1;
}

.auth-brand-features svg {
  color: #10b981;
  flex-shrink: 0;
}

.auth-brand-footer {
  font-size: 0.75rem;
  color: #475569;
  margin: 0;
}

/* =========================
   RIGHT PANEL — Form
   ========================= */
.auth-form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2.5rem;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.auth-form-inner {
  width: 100%;
  max-width: 400px;
}

/* Mobile-only logo (hidden on desktop) */
.auth-mobile-logo {
  display: none;
  margin-bottom: 2rem;
}

.auth-mobile-logo .auth-logo-text {
  color: #1e293b;
}

/* --- Form Content --- */
.auth-content {
  /* no extra padding — form views handle their own spacing */
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.35rem;
}

.auth-description {
  font-size: 0.9rem;
  color: #64748b;
  margin: 0 0 1.75rem;
  line-height: 1.5;
}

/* --- Form Elements --- */
.auth-form .form-group {
  margin-bottom: 1.15rem;
}

.auth-form .form-label {
  display: block;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
}

.auth-form .form-help {
  display: block;
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 0.2rem;
  margin-bottom: 0.35rem;
}

.auth-form .form-input {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
  color: #0f172a;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.auth-form .form-input::placeholder {
  color: #94a3b8;
}

.auth-form .form-input:focus {
  outline: none;
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

/* Password toggle */
.password-input-container {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-container .form-input {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  color: #94a3b8;
  transition: color 0.15s ease, background 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.password-toggle:hover {
  color: #475569;
  background: #f1f5f9;
}

.password-toggle:focus {
  outline: 2px solid #10b981;
  outline-offset: 2px;
}

.eye-icon {
  width: 18px;
  height: 18px;
  stroke-width: 2px;
}

/* Checkbox */
.auth-form .form-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.auth-form .form-checkbox-input {
  width: 18px;
  height: 18px;
  accent-color: #10b981;
  cursor: pointer;
  flex-shrink: 0;
}

.auth-form .form-checkbox-label {
  font-size: 0.85rem;
  color: #334155;
  cursor: pointer;
  user-select: none;
}

/* Submit button */
.auth-form .btn-submit {
  width: 100%;
  padding: 0.75rem 1rem;
  background: #10b981;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  margin-top: 0.5rem;
  min-height: 46px;
  -webkit-appearance: none;
  appearance: none;
}

.auth-form .btn-submit:hover:not(:disabled) {
  background: #059669;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.auth-form .btn-submit:active:not(:disabled) {
  transform: translateY(0);
}

.auth-form .btn-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

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

.auth-links-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.auth-links a {
  color: #10b981;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.15s ease;
  display: inline-block;
  padding: 0.2rem 0;
}

.auth-links a:hover {
  color: #059669;
  text-decoration: underline;
}

/* --- Flash Messages --- */
.auth-flash-messages {
  margin-bottom: 1.25rem;
}

.auth-flash-message {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.4;
}

.auth-flash-notice {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.auth-flash-alert {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

/* --- Waitlist Banner (shown on login when signups disabled) --- */
.auth-waitlist-banner {
  display: flex;
  gap: 0.85rem;
  padding: 1rem 1.15rem;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(16, 185, 129, 0.06));
  border: 1px solid rgba(99, 102, 241, 0.2);
  margin-bottom: 1.5rem;
}

.auth-waitlist-banner-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.12);
  color: #818cf8;
}

.auth-waitlist-banner-content {
  flex: 1;
  min-width: 0;
}

.auth-waitlist-banner-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #312e81;
  margin: 0 0 0.2rem;
}

.auth-waitlist-banner-text {
  font-size: 0.82rem;
  color: #6b7280;
  line-height: 1.4;
  margin: 0 0 0.5rem;
}

.auth-waitlist-banner-link {
  display: inline-flex;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: #6366f1;
  text-decoration: none;
  transition: color 0.15s;
}

.auth-waitlist-banner-link:hover {
  color: #818cf8;
  text-decoration: underline;
}

/* --- Error Messages --- */
.auth-errors {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.auth-errors h2 {
  font-size: 0.9rem;
  font-weight: 600;
  color: #991b1b;
  margin: 0 0 0.4rem;
}

.auth-errors ul {
  margin: 0;
  padding-left: 1.25rem;
  color: #b91c1c;
}

.auth-errors li {
  font-size: 0.82rem;
  margin-bottom: 0.2rem;
}

/* --- Footer link --- */
.auth-form-footer {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.82rem;
}

.auth-form-footer a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.15s ease;
}

.auth-form-footer a:hover {
  color: #10b981;
}

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 860px) {
  .auth-wrapper {
    flex-direction: column;
  }

  .auth-brand-panel {
    display: none;
  }

  .auth-mobile-logo {
    display: inline-flex;
  }

  .auth-form-panel {
    min-height: 100vh;
    padding: 2rem 1.25rem;
    align-items: flex-start;
    padding-top: 3rem;
  }

  .auth-form-inner {
    max-width: 420px;
  }
}

@media (max-width: 380px) {
  .auth-form-panel {
    padding: 1.5rem 1rem;
    padding-top: 2.5rem;
  }

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

/* Landscape mobile */
@media (max-width: 896px) and (orientation: landscape) {
  .auth-brand-panel {
    display: none;
  }

  .auth-mobile-logo {
    display: inline-flex;
  }

  .auth-form-panel {
    padding: 1.5rem;
    align-items: center;
  }
}
