 /* ==========================================================================
   MBP - LOGIN & CREATE ACCOUNT STYLES
   ========================================================================== */

:root {
  --primary: #4836fc;
  --primary-hover: #3d2ce6;
  --primary-active: #3222d4;
  --primary-glow: rgba(72, 54, 252, 0.45);

  --bg-page: #f2f3f9;
  --bg-card: #ffffff;

  --text-main: #111827;
  --text-muted: #6b7280;
  --text-label: #1e293b;
  --text-placeholder: #9ca3af;

  --border-input: #e2e8f0;
  --border-focus: #4836fc;

  --social-bg: #eef0f4;
  --social-hover: #e2e5ec;

  --radius-card: 28px;
  --radius-banner: 20px;
  --radius-input: 10px;
  --radius-btn: 10px;
  --radius-social: 8px;

  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-page);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow-x: hidden;
}

/* Subtle background aura */
body::before {
  content: '';
  position: fixed;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  background: radial-gradient(circle, rgba(216, 222, 255, 0.45) 0%, rgba(242, 243, 249, 0) 70%);
  z-index: 0;
  pointer-events: none;
}



/* Main Container Card */
.auth-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 940px;
  background: var(--bg-card);
  border-radius: var(--radius-card);
  box-shadow: 0 24px 60px -12px rgba(32, 27, 85, 0.09),
              0 1px 3px rgba(0, 0, 0, 0.03),
              0 0 0 1px rgba(0, 0, 0, 0.02);
  display: grid;
  grid-template-columns: 46% 54%;
  padding: 16px;
  min-height: 570px;
}

/* ==========================================================================
   LEFT HERO BANNER - SILKY MESH GRADIENT
   ========================================================================== */
.hero-banner {
  position: relative;
  border-radius: var(--radius-banner);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 38px 36px 42px 36px;
  background-color: #0b0987;
  isolation: isolate;
  user-select: none;
}

/* Mesh Gradient Layers creating the exact dreamy blend */
.hero-banner::before {
  content: '';
  position: absolute;
  inset: -20px;
  z-index: 1;
  background:
    /* Top-left Cyan / Aqua glow */
    radial-gradient(circle at 16% 12%, rgba(186, 237, 255, 1) 0%, rgba(135, 206, 255, 0.85) 24%, transparent 52%),
    /* Top-right Lavender / Lilac */
    radial-gradient(circle at 92% 16%, rgba(209, 168, 255, 1) 0%, rgba(187, 113, 250, 0.9) 32%, transparent 62%),
    /* Center-Left Deep Royal Indigo */
    radial-gradient(circle at 10% 50%, rgba(12, 9, 158, 1) 0%, rgba(7, 1, 123, 0.95) 45%, transparent 75%),
    /* Center Violet Bridge */
    radial-gradient(circle at 52% 48%, rgba(87, 58, 202, 0.95) 0%, rgba(67, 40, 180, 0.6) 35%, transparent 60%),
    /* Bottom-Right Soft Periwinkle Mist */
    radial-gradient(circle at 86% 82%, rgba(222, 235, 254, 0.95) 0%, rgba(196, 211, 254, 0.75) 40%, transparent 70%),
    /* Bottom-Left Midnight Navy behind white text */
    radial-gradient(circle at 18% 88%, rgba(8, 3, 94, 1) 0%, rgba(12, 9, 140, 0.95) 48%, transparent 75%);
  filter: blur(24px);
  transform: scale(1.08);
  pointer-events: none;
}

/* Subtle overlay grain & depth */
.hero-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background: radial-gradient(ellipse at 50% 100%, rgba(5, 2, 70, 0.25) 0%, transparent 60%);
  pointer-events: none;
}

.hero-banner-top {
  position: relative;
  z-index: 3;
}

.brand-wordmark {
  display: inline-block;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
}

.hero-banner-bottom {
  position: relative;
  z-index: 3;
  max-width: 330px;
}

.banner-tagline {
  display: block;
  font-size: 13.5px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.84);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.banner-title {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.28;
  color: #ffffff;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

/* ==========================================================================
   RIGHT FORM AREA
   ========================================================================== */
.auth-form-container {
  padding: 44px 50px 40px 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-header {
  margin-bottom: 24px;
}

.auth-title {
  font-size: 27px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.028em;
  margin-bottom: 8px;
}

.auth-subtitle {
  font-size: 12.5px;
  line-height: 1.48;
  color: var(--text-muted);
  max-width: 360px;
}

/* Form Groups & Inputs */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-label);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.form-input {
  width: 100%;
  height: 44px;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 13.5px;
  color: #1f2937;
  background: #ffffff;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-input);
  outline: none;
  transition: var(--transition);
}

.form-input::placeholder {
  color: var(--text-placeholder);
  font-size: 13px;
}

.form-input:hover {
  border-color: #cbd5e1;
}

.form-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(72, 54, 252, 0.14);
}

/* Password Toggle Icon */
.input-wrapper.password-wrapper .form-input {
  padding-right: 42px;
  letter-spacing: 0.8px;
}

.password-toggle-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: var(--transition);
}

.password-toggle-btn:hover {
  color: #475569;
}

/* Primary Action Button */
.btn-primary {
  width: 100%;
  height: 46px;
  margin-top: 20px;
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-btn);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 10px 24px -4px var(--primary-glow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px -4px var(--primary-glow);
}

.btn-primary:active {
  background: var(--primary-active);
  transform: translateY(0);
  box-shadow: 0 6px 16px -2px var(--primary-glow);
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 22px 0 18px 0;
  color: #9ca3af;
  font-size: 11px;
  font-weight: 400;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e5e7eb;
}

.auth-divider span {
  padding: 0 12px;
  letter-spacing: 0.02em;
}

/* Social Buttons */
.social-auth-grid {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 22px;
}

.social-btn {
  flex: 1;
  max-width: 84px;
  height: 36px;
  background: var(--social-bg);
  border: none;
  border-radius: var(--radius-social);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.social-btn:hover {
  background: var(--social-hover);
  transform: translateY(-1px);
}

.social-btn:active {
  transform: translateY(0);
}

/* Footer Link */
.auth-footer {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

.auth-footer .toggle-auth-mode {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  margin-left: 3px;
}

.auth-footer .toggle-auth-mode:hover {
  text-decoration: underline;
  color: var(--primary-hover);
}

/* ==========================================================================
   TOAST NOTIFICATION COMPONENT
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: #1e293b;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  max-width: 90vw;
}

.toast.success {
  background: #065f46;
}

.toast.info {
  background: #1e1b4b;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Spinner for Loading State */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   FORM FEEDBACK (server validation, hints, alerts)
   ========================================================================== */
.form-input.is-invalid {
  border-color: #e11d48;
  background: #fff1f2;
}

.form-error {
  margin-top: 6px;
  font-size: 12px;
  color: #e11d48;
}

.form-hint {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.form-hint.is-available {
  color: #047857;
  font-weight: 600;
}

.form-label-hint {
  font-weight: 400;
  color: var(--text-muted);
}

.form-alert {
  margin-bottom: 16px;
  padding: 10px 14px;
  border-radius: var(--radius-input);
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #be123c;
  font-size: 12.5px;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
  cursor: pointer;
}

.form-check input {
  accent-color: var(--primary);
}

.input-affix .form-input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.input-suffix {
  height: 44px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 12.5px;
  color: var(--text-muted);
  background: #f8fafc;
  border: 1px solid var(--border-input);
  border-left: 0;
  border-radius: 0 var(--radius-input) var(--radius-input) 0;
  white-space: nowrap;
}

.input-affix-start .form-input {
  border-radius: 0 var(--radius-input) var(--radius-input) 0;
}

.input-prefix {
  height: 44px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 12.5px;
  color: var(--text-muted);
  background: #f8fafc;
  border: 1px solid var(--border-input);
  border-right: 0;
  border-radius: var(--radius-input) 0 0 var(--radius-input);
  white-space: nowrap;
}

.link-button {
  background: none;
  border: 0;
  font: inherit;
  font-size: 12px;
}

a.social-btn {
  text-decoration: none;
}

/* Without the Google button, keep the footer link away from the main button. */
.btn-primary + .auth-footer {
  margin-top: 20px;
}

/* E-mail verification and password reset (MBP_01_02, MBP_02_02). */
.form-success {
  margin-bottom: 16px;
  padding: 10px 14px;
  border-radius: var(--radius-input);
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
  font-size: 12.5px;
}

.form-row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.auth-link {
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.auth-link:hover {
  text-decoration: underline;
  color: var(--primary-hover);
}

.auth-note {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.6;
}

.btn-primary + .auth-note,
.auth-note + .auth-footer {
  margin-top: 16px;
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 860px) {
  .auth-wrapper {
    grid-template-columns: 1fr;
    max-width: 480px;
    padding: 12px;
  }

  .hero-banner {
    min-height: 240px;
    padding: 28px 24px;
    margin-bottom: 8px;
  }

  .banner-title {
    font-size: 22px;
  }

  .auth-form-container {
    padding: 28px 20px 24px 20px;
  }

}
