/* ============================================================
   Curozip Auth — style.css
   Purple #7c3aed + Cyan #06b6d4 light theme
   Bootstrap 5 overrides + parcel animations
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600&display=swap');

/* ── CSS Tokens ── */
:root {
  --purple: #0f62fe;
  --purple-hover: #0353e9;
  --purple-soft: #e0e8ff;
  --cyan: #ff5500;
  --cyan-soft: #ffece5;
  --bg: #f8f7ff;
  --card: #ffffff;
  --text: #1e1b4b;
  --text-2: #6b7280;
  --border: #e5e7f0;
  --shadow: rgba(124,58,237,0.10);
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 16px;
}

/* ══════════════════════════════════════════
   AUTH CARD LAYOUT
══════════════════════════════════════════ */
.auth-card {
  display: flex;
  width: 100%;
  max-width: 500px;
  min-height: auto;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 64px var(--shadow), 0 4px 16px rgba(0,0,0,0.06);
  animation: cardSlideUp 0.55s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes cardSlideUp {
  from { transform: translateY(28px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ══════════════════════════════════════════
   LEFT PANEL
══════════════════════════════════════════ */
.auth-image {
  width: 42%;
  flex-shrink: 0;
  background: linear-gradient(145deg, #4c1d95 0%, #6d28d9 35%, #7c3aed 65%, #0e7490 100%);
  padding: 32px 28px 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* Decorative blobs */
.blob-1, .blob-2, .blob-3 {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.blob-1 {
  width: 260px; height: 260px;
  top: -80px; right: -80px;
  background: radial-gradient(circle, rgba(6,182,212,0.22) 0%, transparent 70%);
  animation: blobPulse 6s ease-in-out infinite;
}
.blob-2 {
  width: 200px; height: 200px;
  bottom: -60px; left: -60px;
  background: radial-gradient(circle, rgba(167,139,250,0.18) 0%, transparent 70%);
  animation: blobPulse 8s ease-in-out infinite reverse;
}
.blob-3 {
  width: 140px; height: 140px;
  top: 40%; left: 50%;
  background: radial-gradient(circle, rgba(6,182,212,0.12) 0%, transparent 70%);
  animation: blobPulse 5s ease-in-out infinite 2s;
}

@keyframes blobPulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.15); }
}

/* Grid overlay */
.grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

/* Panel logo */
.panel-logo {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
  position: relative;
  z-index: 1;
}
.panel-logo span { color: var(--cyan); }
.panel-logo-sub {
  font-size: 10px;
  font-weight: 500;
  color: rgba(255,255,255,0.5);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 2px;
  position: relative;
  z-index: 1;
}

/* Parcel SVG container */
.parcel-scene {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 0;
  position: relative;
  z-index: 1;
}
.parcel-svg {
  width: 100%;
  max-width: 280px;
  overflow: visible;
}

/* Panel bottom stats */
.panel-bottom {
  margin-top: auto;
  position: relative;
  z-index: 1;
}
.panel-accent-line {
  width: 36px; height: 3px;
  background: var(--cyan);
  border-radius: 2px;
  margin-bottom: 12px;
}
.panel-stats {
  display: flex;
  gap: 8px;
}
.stat-box {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 8px 10px;
  flex: 1;
  text-align: center;
  backdrop-filter: blur(4px);
}
.stat-box .val {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
}
.stat-box .lbl {
  font-size: 9px;
  font-weight: 500;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-top: 2px;
}

/* ══════════════════════════════════════════
   RIGHT PANEL — Form container
══════════════════════════════════════════ */
.auth-form-container {
  flex: 1;
  background: var(--card);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 44px;
  overflow-y: auto;
}

/* Mobile logo */
.mobile-logo {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--purple);
  margin-bottom: 20px;
}
.mobile-logo span { color: var(--cyan); }

/* ── Form headings ── */
.auth-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
  animation: fadeUp 0.4s ease both 0.1s;
}
.auth-sub {
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 24px;
  animation: fadeUp 0.4s ease both 0.18s;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Form fields ── */
.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
  letter-spacing: 0.3px;
}

.form-control {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 14px;
  color: var(--text);
  background: #fafafa;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.form-control:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.12);
  background: #fff;
  outline: none;
}
.form-control::placeholder { color: #b0b7c3; font-size: 13px; }

/* Password input group */
.input-group .form-control {
  border-right: none;
  border-radius: 10px 0 0 10px;
}
.input-group-text {
  background: #fafafa;
  border: 1.5px solid var(--border);
  border-left: none;
  border-radius: 0 10px 10px 0;
  cursor: pointer;
  color: var(--text-2);
  padding: 0 12px;
  transition: color 0.15s;
}
.input-group-text:hover { color: var(--purple); }
.input-group:focus-within .input-group-text {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.12);
}

/* ── Password strength ── */
.strength-bars {
  display: flex;
  gap: 5px;
  margin-top: 7px;
}
.strength-bar {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  transition: background 0.3s;
}
.strength-bar.weak   { background: #ef4444; }
.strength-bar.fair   { background: #f59e0b; }
.strength-bar.strong { background: #10b981; }
.strength-text {
  font-size: 11px;
  font-weight: 600;
  margin-top: 4px;
  transition: color 0.3s;
}
.strength-text.weak   { color: #ef4444; }
.strength-text.fair   { color: #f59e0b; }
.strength-text.strong { color: #10b981; }

/* ── Primary button ── */
.btn-primary {
  background: linear-gradient(135deg, var(--purple) 0%, #6d28d9 100%);
  border: none;
  border-radius: 10px;
  padding: 12px 20px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  width: 100%;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
  box-shadow: 0 4px 14px rgba(124,58,237,0.35);
  animation: btnPulse 4s ease-in-out infinite 2s;
}
.btn-primary:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124,58,237,0.45);
}
.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(124,58,237,0.3);
}

@keyframes btnPulse {
  0%, 100% { box-shadow: 0 4px 14px rgba(124,58,237,0.35); }
  50%       { box-shadow: 0 4px 22px rgba(124,58,237,0.55); }
}

/* ── Google button ── */
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  padding: 11px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.btn-google:hover {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.08);
}

/* ── Divider ── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-2);
  font-size: 11px;
  margin: 16px 0;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Links ── */
.auth-link {
  color: var(--purple);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s;
}
.auth-link:hover { color: var(--purple-hover); text-decoration: underline; }

/* ── Alerts ── */
.alert-danger, .alert-success {
  border: none;
  border-radius: 10px;
  font-size: 13px;
  padding: 11px 14px;
  animation: fadeUp 0.3s ease both;
}
.alert-danger  { background: #fef2f2; color: #dc2626; }
.alert-success { background: #f0fdf4; color: #16a34a; }

/* ══════════════════════════════════════════
   OTP / VERIFY PAGE
══════════════════════════════════════════ */

/* Progress steps */
.otp-steps {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
}
.otp-step {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
}
.otp-step.active  { color: var(--purple); }
.otp-step.done    { color: var(--cyan); }
.step-circle {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  background: #fff;
  transition: all 0.3s;
}
.otp-step.active .step-circle {
  border-color: var(--purple);
  background: var(--purple);
  color: #fff;
}
.otp-step.done .step-circle {
  border-color: var(--cyan);
  background: var(--cyan);
  color: #fff;
}
.step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 8px;
}
.step-line.done { background: var(--cyan); }

/* OTP icon bubble */
.otp-icon-wrap {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--purple-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  margin-bottom: 16px;
  animation: successBounce 0.5s cubic-bezier(0.36,0.07,0.19,0.97) both 0.2s;
}

@keyframes successBounce {
  0%   { transform: scale(0.4) rotate(-6deg); opacity: 0; }
  60%  { transform: scale(1.1) rotate(2deg);  opacity: 1; }
  80%  { transform: scale(0.94) rotate(-1deg); }
  100% { transform: scale(1) rotate(0); }
}

/* OTP digit inputs */
#otp-inputs {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 8px;
}
.otp-digit {
  width: 48px; height: 56px;
  border: 2px solid var(--border);
  border-radius: 12px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--text);
  background: #fafafa;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  caret-color: var(--purple);
  animation: otpPop 0.4s cubic-bezier(0.4,0,0.2,1) both;
}
.otp-digit:nth-child(1) { animation-delay: 0.10s; }
.otp-digit:nth-child(2) { animation-delay: 0.16s; }
.otp-digit:nth-child(3) { animation-delay: 0.22s; }
.otp-digit:nth-child(4) { animation-delay: 0.28s; }
.otp-digit:nth-child(5) { animation-delay: 0.34s; }
.otp-digit:nth-child(6) { animation-delay: 0.40s; }

@keyframes otpPop {
  from { transform: scale(0.6) translateY(14px); opacity: 0; }
  to   { transform: scale(1)   translateY(0);    opacity: 1; }
}
.otp-digit:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
  background: #fff;
  outline: none;
  transform: scale(1.06);
}
.otp-digit.filled {
  border-color: var(--cyan);
  background: var(--cyan-soft);
}

/* Resend */
.resend-area { font-size: 13px; color: var(--text-2); }
#resend-link  { display: none; }

/* ══════════════════════════════════════════
   FORGOT PASSWORD success checklist
══════════════════════════════════════════ */
.success-icon-wrap {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: #f0fdf4;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  margin-bottom: 16px;
  animation: successBounce 0.5s cubic-bezier(0.36,0.07,0.19,0.97) both;
}
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li {
  font-size: 13px; color: var(--text-2);
  padding: 4px 0;
  display: flex; align-items: center; gap: 7px;
  animation: checkItem 0.3s ease both;
}
.checklist li:nth-child(1) { animation-delay: 0.1s; }
.checklist li:nth-child(2) { animation-delay: 0.2s; }
.checklist li:nth-child(3) { animation-delay: 0.3s; }
@keyframes checkItem {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}
.checklist li::before {
  content: '✓';
  width: 18px; height: 18px;
  background: #dcfce7;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: #16a34a; font-weight: 700;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════
   REGISTER — feature list
══════════════════════════════════════════ */
.feature-list { list-style: none; padding: 0; margin: 14px 0 0; }
.feature-list li {
  font-size: 12px; color: var(--text-2);
  display: flex; align-items: center; gap: 7px;
  padding: 3px 0;
}
.feature-list li i { color: var(--cyan); font-size: 13px; }

/* ══════════════════════════════════════════
   MOBILE PARCEL BANNER
══════════════════════════════════════════ */
.mobile-parcel-banner {
  background: linear-gradient(130deg, #0046b8 0%, #0a58e6 45%, #0f62fe 75%, #ff5500 100%);
  border-radius: 0 0 24px 24px;
  margin: -32px -44px 28px;   /* pull to card edges, then space below */
  padding: 18px 20px 14px;
  position: relative;
  overflow: hidden;
}
/* on mobile the form padding is smaller, adjust margin */
.mpb-logo {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
}
.mpb-logo span { color: #ff5500; }
.mpb-svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
  position: relative;
  z-index: 1;
}

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 767.98px) {
  body { padding: 0; align-items: flex-start; background: var(--card); }
  .auth-card {
    border-radius: 0;
    min-height: 100svh;
    box-shadow: none;
  }
  .auth-form-container { padding: 32px 24px 40px; }
  .mobile-parcel-banner { margin: -32px -24px 24px; }

  #otp-inputs { gap: 7px; }
  .otp-digit  { width: 42px; height: 50px; font-size: 20px; }
}

@media (max-width: 400px) {
  .auth-form-container { padding: 24px 16px 32px; }
  #otp-inputs { gap: 5px; }
  .otp-digit  { width: 38px; height: 46px; font-size: 18px; border-radius: 9px; }
  .panel-stats { gap: 5px; }
}

/* ══════════════════════════════════════════
   ALIAS / COMPAT CLASSES
   (used in PHP pages that predate the refactor)
══════════════════════════════════════════ */

/* .subtitle === .auth-sub */
.subtitle {
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 24px;
}

/* .divider === .auth-divider */
.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-2);
  font-size: 11px;
  margin: 16px 0;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.divider span { flex-shrink: 0; }

/* Back button */
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  margin-bottom: 20px;
  transition: color 0.15s;
}
.btn-back:hover { color: var(--purple); }

/* Icon circle */
.icon-circle {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--purple-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  margin-bottom: 16px;
  animation: successBounce 0.5s cubic-bezier(0.36,0.07,0.19,0.97) both 0.2s;
}
.icon-circle.purple { background: var(--purple-soft); }
.icon-circle.cyan   { background: var(--cyan-soft); }
.icon-circle.green  { background: #f0fdf4; }

/* OTP step bars (progress) */
.otp-steps {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
}
.otp-step {
  display: flex;
  align-items: center;
  gap: 6px;
}
.otp-step-bar {
  width: 36px; height: 4px;
  border-radius: 2px;
  background: var(--border);
  transition: background 0.3s;
}
.otp-step-bar.active { background: var(--purple); }
.otp-step-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
}
.otp-step-label.active { color: var(--purple); }
.otp-steps .sep {
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* OTP grid container + digits */
.otp-grid {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
}
.otp-grid input,
.otp-digit {
  width: 48px; height: 56px;
  border: 2px solid var(--border);
  border-radius: 12px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--text);
  background: #fafafa;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  caret-color: var(--purple);
  animation: otpPop 0.4s cubic-bezier(0.4,0,0.2,1) both;
}
.otp-grid input:nth-child(1), .otp-digit:nth-child(1) { animation-delay: 0.10s; }
.otp-grid input:nth-child(2), .otp-digit:nth-child(2) { animation-delay: 0.16s; }
.otp-grid input:nth-child(3), .otp-digit:nth-child(3) { animation-delay: 0.22s; }
.otp-grid input:nth-child(4), .otp-digit:nth-child(4) { animation-delay: 0.28s; }
.otp-grid input:nth-child(5), .otp-digit:nth-child(5) { animation-delay: 0.34s; }
.otp-grid input:nth-child(6), .otp-digit:nth-child(6) { animation-delay: 0.40s; }
.otp-grid input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
  background: #fff;
  outline: none;
  transform: scale(1.06);
}
.otp-grid input.filled,
.otp-grid.cyan-mode input:focus {
  border-color: var(--cyan);
  background: var(--cyan-soft);
  box-shadow: 0 0 0 3px rgba(6,182,212,0.15);
}

/* Success box */
.success-box {
  background: #f8f7ff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.success-box .item {
  font-size: 13px;
  color: var(--text-2);
  padding: 4px 0;
  display: flex; align-items: center; gap: 8px;
}
.success-box .item::before {
  content: '✓';
  width: 18px; height: 18px;
  background: #dcfce7;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: #16a34a; font-weight: 700;
  flex-shrink: 0;
}

/* Cyan auth link */
.auth-link-cyan {
  color: var(--cyan);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s;
}
.auth-link-cyan:hover { color: #0891b2; text-decoration: underline; }

/* Terms checkbox label */
.check-label {
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.5;
}

/* ── Reduced-motion safety ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
