/* ─────────────────────────────────────────────────────────────────────────────
   css_auth.css  —  Shared styles for all auth/onboarding pages
   Split layout: left hero (purple gradient) + right form panel
   ───────────────────────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── Reset body so no Bootstrap container/main padding bleeds through ── */
body.auth-body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #000;           /* fallback behind the fixed wrapper */
  font-family: 'Inter', 'Segoe UI', sans-serif;
}

/* ── Auth wrapper: fixed overlay that escapes Bootstrap's container ── */
.auth-wrapper {
  position: fixed;
  inset: 0;                   /* top:0 right:0 bottom:0 left:0 */
  display: flex;
  z-index: 10;
  overflow: hidden;
}

/* ── Left hero panel ───────────────────────────────────────────────── */
.auth-hero {
  flex: 0 0 42%;
  background: linear-gradient(145deg, #1e0645 0%, #4c1099 45%, #7c3aed 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 3.5rem;
  position: relative;
  overflow: hidden;
}

/* ── Blob animations ───────────────────────────────────────────────── */
@keyframes blob-float-1 {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(18px, -22px) scale(1.06); }
  66%  { transform: translate(-12px, 14px) scale(0.96); }
  100% { transform: translate(0, 0) scale(1); }
}
@keyframes blob-float-2 {
  0%   { transform: translate(0, 0) scale(1); }
  40%  { transform: translate(-20px, 16px) scale(1.08); }
  70%  { transform: translate(14px, -10px) scale(0.94); }
  100% { transform: translate(0, 0) scale(1); }
}
@keyframes blob-float-3 {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(10px, 20px) scale(1.12); }
  100% { transform: translate(0, 0) scale(1); }
}

/* Decorative blobs */
.auth-hero::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  pointer-events: none;
  animation: blob-float-1 12s ease-in-out infinite;
}
.auth-hero::after {
  content: '';
  position: absolute;
  bottom: -120px;
  left: 20px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  pointer-events: none;
  animation: blob-float-2 16s ease-in-out infinite;
}
.auth-hero-blob {
  position: absolute;
  top: 48%;
  right: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  pointer-events: none;
  animation: blob-float-3 10s ease-in-out infinite;
}

.hero-logo-wrap {
  width: 64px;
  height: 64px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2.25rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}
.hero-logo-wrap img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.hero-title {
  font-size: 2.1rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 0.75rem;
  letter-spacing: -0.6px;
  line-height: 1.15;
}

.hero-subtitle {
  font-size: 0.93rem;
  color: rgba(255, 255, 255, 0.72);
  margin: 0 0 2.25rem;
  line-height: 1.65;
  max-width: 290px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.32rem 0.85rem;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-size: 0.77rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
}

/* ── Right form panel ──────────────────────────────────────────────── */
.auth-form-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2.5rem 2rem;
  background: #fff;
  overflow-y: auto;
  overflow-x: hidden;
  height: 100%;        /* fill the fixed wrapper height */
}
.auth-form-inner {
  width: 100%;
  max-width: 400px;
}

/* ── Headings ──────────────────────────────────────────────────────── */
.auth-eyebrow {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #691cff;
  margin-bottom: 0.4rem;
}
.auth-heading {
  font-size: 2rem;
  font-weight: 800;
  color: #111827;
  margin: 0 0 0.35rem;
  letter-spacing: -0.5px;
  line-height: 1.15;
}
.auth-subheading {
  font-size: 0.875rem;
  color: #6B7280;
  margin: 0 0 2rem;
}

/* ── Form fields ───────────────────────────────────────────────────── */
.auth-field {
  margin-bottom: 1.2rem;
}
.auth-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.38rem;
}
.auth-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.38rem;
}
.auth-label-row label { margin: 0; }

.auth-input-wrap {
  position: relative;
}
.auth-input-wrap .input-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: #9CA3AF;
  font-size: 14px;
  pointer-events: none;
  width: 16px;
  text-align: center;
}
.auth-input-wrap input {
  width: 100%;
  padding: 0.7rem 1rem 0.7rem 2.6rem;
  font-size: 0.875rem;
  font-family: 'Inter', sans-serif;
  border: 1.5px solid #E5E7EB;
  border-radius: 10px;
  background: #FAFAFA;
  color: #111827;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  box-sizing: border-box;
}
.auth-input-wrap input:focus {
  border-color: #691cff;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(105, 28, 255, 0.1);
}
.auth-input-wrap input[readonly] {
  background: #F3F4F6;
  color: #6B7280;
  cursor: default;
}
.auth-input-wrap .eye-toggle {
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #9CA3AF;
  padding: 4px;
  display: flex;
  align-items: center;
  line-height: 1;
  transition: color 0.15s;
}
.auth-input-wrap .eye-toggle:hover { color: #691cff; }

/* ── Social buttons ────────────────────────────────────────────────── */
.btn-social-new {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.65rem 1rem;
  font-size: 0.875rem;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  border: 1.5px solid #E5E7EB;
  border-radius: 10px;
  background: #fff;
  color: #374151;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, color 0.2s;
  margin-bottom: 0.6rem;
  text-align: center;
}
.btn-social-new:hover {
  border-color: #691cff;
  box-shadow: 0 0 0 3px rgba(105, 28, 255, 0.08);
  color: #691cff;
}
.btn-social-new img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
}
.btn-social-new:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* ── Divider ───────────────────────────────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  color: #9CA3AF;
  font-size: 0.78rem;
  font-family: 'Inter', sans-serif;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #E5E7EB;
}

/* ── Primary CTA button ────────────────────────────────────────────── */
.btn-auth-primary {
  display: block;
  width: 100%;
  padding: 0.8rem;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #5b12e8 0%, #8B5CF6 100%);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: opacity 0.2s, box-shadow 0.2s;
  letter-spacing: 0.01em;
  margin-top: 0.25rem;
}
.btn-auth-primary:hover {
  opacity: 0.9;
  box-shadow: 0 6px 20px rgba(91, 18, 232, 0.38);
}
.btn-auth-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── Back button ───────────────────────────────────────────────────── */
.auth-back {
  background: none;
  border: none;
  color: #6B7280;
  font-size: 0.8rem;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  padding: 0;
  margin-bottom: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: color 0.15s;
}
.auth-back:hover { color: #691cff; }

/* ── Links ─────────────────────────────────────────────────────────── */
.auth-link {
  color: #691cff;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  transition: opacity 0.15s;
}
.auth-link:hover { opacity: 0.75; text-decoration: underline; }

/* ── Footer texts ──────────────────────────────────────────────────── */
.auth-footer-text {
  font-size: 0.82rem;
  color: #6B7280;
  text-align: center;
  margin-top: 1.5rem;
  font-family: 'Inter', sans-serif;
}
.auth-footer-text a {
  color: #691cff;
  font-weight: 600;
  text-decoration: none;
}
.auth-footer-text a:hover { text-decoration: underline; }

.auth-copyright {
  font-size: 0.72rem;
  color: #9CA3AF;
  text-align: center;
  margin-top: 1.75rem;
  font-family: 'Inter', sans-serif;
}

/* ── Validation ────────────────────────────────────────────────────── */
.auth-form-inner .text-danger,
.auth-form-inner .field-validation-error {
  font-size: 0.75rem !important;
  color: #EF4444 !important;
  margin-top: 0.28rem;
  display: block;
}
.auth-form-inner .validation-summary-errors {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  color: #DC2626;
}

/* ── Alert info ────────────────────────────────────────────────────── */
.auth-alert-info {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  color: #1D4ED8;
  font-family: 'Inter', sans-serif;
}

/* ── Wizard chip buttons ───────────────────────────────────────────── */
.auth-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0 1.25rem;
}
.auth-chip {
  padding: 0.35rem 0.85rem;
  border: 1.5px solid #E5E7EB;
  border-radius: 999px;
  background: #fff;
  color: #374151;
  font-size: 0.8rem;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  white-space: nowrap;
}
.auth-chip:hover,
.auth-chip.selected {
  border-color: #691cff;
  background: rgba(105, 28, 255, 0.07);
  color: #691cff;
}

/* ── Step back/next row ────────────────────────────────────────────── */
.auth-nav-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}
.auth-nav-row .btn-auth-secondary {
  flex: 1;
  padding: 0.7rem;
  font-size: 0.875rem;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  color: #374151;
  background: #F9FAFB;
  border: 1.5px solid #E5E7EB;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.auth-nav-row .btn-auth-secondary:hover { border-color: #9CA3AF; }
.auth-nav-row .btn-auth-primary { flex: 1; margin-top: 0; }

/* ── Policy text ───────────────────────────────────────────────────── */
.auth-policy {
  font-size: 0.72rem;
  color: #9CA3AF;
  text-align: center;
  margin-top: 1.25rem;
  line-height: 1.55;
  font-family: 'Inter', sans-serif;
}
.auth-policy a { color: #691cff; text-decoration: none; font-weight: 500; }
.auth-policy a:hover { text-decoration: underline; }

/* ── Loading spinner ───────────────────────────────────────────────── */
@keyframes auth-spin { to { transform: rotate(360deg); } }
.auth-spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  display: inline-block;
  animation: auth-spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}
.btn-auth-primary.loading {
  opacity: 0.75;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── intl-tel-input override ───────────────────────────────────────── */
.auth-form-inner .iti {
  display: block !important;
  width: 100%;
}
.auth-form-inner .iti input[type=tel] {
  width: 100%;
  padding: 0.7rem 1rem 0.7rem 90px !important; /* leave room for flag+dial */
  font-size: 0.875rem;
  font-family: 'Inter', sans-serif;
  border: 1.5px solid #E5E7EB !important;
  border-radius: 10px !important;
  background: #FAFAFA !important;
  color: #111827 !important;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
  height: auto !important;
  box-shadow: none !important;
}
.auth-form-inner .iti input[type=tel]:focus {
  border-color: #691cff !important;
  background: #fff !important;
  box-shadow: 0 0 0 3px rgba(105, 28, 255, 0.1) !important;
}
.auth-form-inner .iti__flag-container {
  border-radius: 10px 0 0 10px;
}
.auth-form-inner .iti__selected-flag {
  border-radius: 8px 0 0 8px;
  padding: 0 8px 0 12px;
  background: transparent !important;
}
.auth-form-inner .iti__selected-flag:hover,
.auth-form-inner .iti__selected-flag:focus {
  background: rgba(0,0,0,0.04) !important;
}

/* ── Mobile ────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .auth-hero { display: none; }
  .auth-form-panel {
    padding: 2.5rem 1.5rem;
    justify-content: flex-start;
    height: 100%;
  }
  .auth-form-inner { max-width: 100%; }
  .auth-heading { font-size: 1.75rem; }
}
