*,*::before,*::after{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}

:root{
  /* Premium Purple & Orange Theme */
  --purple:#42235F;
  --purple-dark:#3B2057;
  --purple-soft:#E8D8F5;
  --purple-gradient:#F6C7E9;
  --orange:#D94A18;
  --orange-dark:#B93D12;
  --orange-light:#F06A30;
  
  /* Background & Surfaces */
  --white:#FFFFFF;
  --surface-soft:#F6F4FA;
  --bg-light:#FAF8FC;
  --cream:var(--surface-soft);
  --light:#F6F4FA;
  
  /* Typography */
  --text:#1A1A2E;
  --text-primary:#1A1A2E;
  --text-secondary:#5A5A6E;
  --muted:#8A8A9E;
  
  /* Effects */
  --border:#E8E0F0;
  --shadow:0 8px 28px rgba(66,35,95,0.12);
  --shadow-o:0 8px 32px rgba(217,74,24,0.3);
  
  --success:#22c55e;
  --error:#ef4444;
  --r:16px;
  --r2:20px;
  
  --o:var(--orange);
  --o2:var(--orange-light);
  --od:var(--orange-dark);
  --ob:var(--purple-dark);
  --navy:var(--purple-dark);
}

html{scroll-behavior:smooth}
body{
  font-family:'DM Sans',sans-serif;
  background:linear-gradient(135deg,var(--surface-soft) 0%,#F0EBF5 100%);
  color:var(--text);
  min-height:100vh;
  display:flex;
  flex-direction:column;
  align-items:center;
  padding-bottom:40px;
  -webkit-font-smoothing:antialiased;
}

/* ── NAVBAR ── */
.navbar{
  position:sticky;top:0;z-index:500;
  width:100%;
  height:58px;
  display:flex;align-items:center;justify-content:space-between;
  padding:0 18px;
  background:linear-gradient(135deg,var(--purple) 0%,var(--purple-dark) 100%);
  box-shadow:0 2px 20px rgba(66,35,95,0.28);
  overflow:hidden;
  margin-bottom:0;
}
.navbar::after{
  content:'';position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(105deg,transparent 30%,rgba(255,255,255,.08) 50%,transparent 70%);
  animation:shim 3.5s ease-in-out infinite;
}
@keyframes shim{0%{transform:translateX(-150%)}100%{transform:translateX(200%)}}
.nav-logo{
  display:flex;align-items:center;gap:10px;
  position:relative;z-index:1;text-decoration:none;
}
.nav-logo img{height:28px;width:auto;object-fit:contain}
.nav-logo-text{
  color:#fff;
  font-family:'Sora',sans-serif;
  font-weight:800;
  font-size:15px;
  letter-spacing:-.3px;
}
.nav-right{display:flex;align-items:center;gap:10px;position:relative;z-index:1}
.nav-back{
  display:flex;align-items:center;gap:6px;
  background:rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.2);
  border-radius:50px;padding:6px 14px;
  color:#fff;font-family:'Sora',sans-serif;font-size:12px;font-weight:600;
  cursor:pointer;text-decoration:none;
  transition:background .2s;
}
.nav-back:hover{background:rgba(255,255,255,.2)}
.nav-back svg{width:14px;height:14px;stroke:#fff;fill:none;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}

/* Status Circles - Yellow & Red */
.status-circles{
  display:flex;align-items:center;gap:8px;
}
.status-circle{
  width:12px;height:12px;border-radius:50%;
  animation:pulse-circle 2s ease-in-out infinite;
}
.status-circle.yellow{
  background:#FFD700;
  box-shadow:0 0 8px rgba(255,215,0,.6);
}
.status-circle.red{
  background:#FF4444;
  box-shadow:0 0 8px rgba(255,68,68,.6);
  animation-delay:.5s;
}
@keyframes pulse-circle{
  0%,100%{transform:scale(1);opacity:1}
  50%{transform:scale(1.2);opacity:.7}
}

/* ── HERO STRIP ── */
.hero-strip{
  width:100%;max-width:520px;
  background:linear-gradient(135deg,var(--purple) 0%,var(--purple-dark) 100%);
  padding:22px 22px 28px;
  position:relative;overflow:hidden;
}
.hero-strip::before{
  content:'';position:absolute;top:-40px;right:-40px;
  width:160px;height:160px;
  background:rgba(255,255,255,.07);border-radius:50%;
}
.hero-strip::after{
  content:'';position:absolute;bottom:-30px;left:-30px;
  width:120px;height:120px;
  background:rgba(0,0,0,.06);border-radius:50%;
}
.hero-strip h1{
  font-family:'Sora',sans-serif;font-size:20px;font-weight:800;
  color:#fff;line-height:1.3;position:relative;z-index:1;
}
.hero-strip p{
  font-size:12.5px;color:rgba(255,255,255,.8);
  margin-top:6px;position:relative;z-index:1;line-height:1.5;
}
.hero-badges{
  display:flex;gap:8px;margin-top:14px;flex-wrap:wrap;
  position:relative;z-index:1;
}
.hero-badge{
  background:rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.2);
  color:#fff;font-family:'Sora',sans-serif;
  font-size:10.5px;font-weight:600;
  padding:4px 10px;border-radius:50px;
  display:flex;align-items:center;gap:4px;
}
.hero-badge svg{width:11px;height:11px;stroke:#fff;fill:none;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}

/* ── STEP PROGRESS ── */
.step-bar{
  width:100%;max-width:520px;
  padding:16px 22px 0;
  display:flex;align-items:center;gap:0;
}
.step-item{
  display:flex;flex-direction:column;align-items:center;gap:5px;
  flex:1;position:relative;
}
.step-item:not(:last-child)::after{
  content:'';position:absolute;top:14px;left:50%;
  width:100%;height:2px;
  background:rgba(66,35,95,0.12);z-index:0;
  transition:background .4s;
}
.step-item.done:not(:last-child)::after{background:var(--orange)}
.step-circle{
  width:28px;height:28px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  font-family:'Sora',sans-serif;font-size:12px;font-weight:700;
  border:2px solid rgba(66,35,95,0.12);background:var(--white);
  color:var(--muted);z-index:1;position:relative;
  transition:all .3s;
}
.step-item.active .step-circle{
  border-color:var(--orange);background:var(--orange);color:#fff;
  box-shadow:0 0 0 4px rgba(217,74,24,.18);
}
.step-item.done .step-circle{
  border-color:var(--orange);background:var(--orange);color:#fff;
}
.step-lbl{font-family:'Sora',sans-serif;font-size:10px;font-weight:600;color:var(--muted)}
.step-item.active .step-lbl,.step-item.done .step-lbl{color:var(--orange)}

/* ── CARD ── */
.card{
  width:100%;max-width:520px;
  background:var(--white);
  border-radius:var(--r2);
  box-shadow:var(--shadow);
  border:1px solid rgba(66,35,95,0.08);
  padding:28px 24px;
  margin-top:20px;
  animation:fadeUp .45s cubic-bezier(.4,0,.2,1) both;
}
@keyframes fadeUp{from{opacity:0;transform:translateY(18px)}to{opacity:1;transform:none}}

.card-title{
  font-family:'Sora',sans-serif;font-size:16px;font-weight:800;
  color:var(--text);margin-bottom:22px;
  display:flex;align-items:center;gap:8px;
}
.card-title svg{width:18px;height:18px;stroke:var(--orange);fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}

.card-subtitle{
  text-align:center;
  color:var(--muted);
  font-size:13px;
  margin-bottom:28px;
  line-height:1.5;
}

/* ── FIELDS ── */
.field{margin-bottom:18px;position:relative}
.field label{
  display:block;font-family:'Sora',sans-serif;
  font-size:11.5px;font-weight:700;
  color:var(--muted);margin-bottom:6px;
  letter-spacing:.3px;text-transform:uppercase;
}
.field-wrap{position:relative}
.field-icon{
  position:absolute;left:14px;top:50%;transform:translateY(-50%);
  pointer-events:none;
}
.field-icon svg{width:16px;height:16px;stroke:var(--muted);fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

input,select{
  width:100%;
  padding:14px 14px 14px 42px;
  border-radius:var(--r);
  border:1.5px solid rgba(66,35,95,0.12);
  background:#fff;
  font-family:'DM Sans',sans-serif;
  font-size:14.5px;
  color:var(--text);
  transition:all .22s;
  box-shadow:inset 0 1px 2px rgba(0,0,0,.04);
  appearance:none;
}
input::placeholder{color:#b0a89e}
input:hover,select:hover{border-color:var(--orange);}
input:focus,select:focus{
  outline:none;
  border-color:var(--orange);
  box-shadow:0 0 0 3px rgba(217,74,24,.14),inset 0 1px 2px rgba(0,0,0,.04);
  background:#fffcf9;
}
input.error{border-color:var(--error);box-shadow:0 0 0 3px rgba(239,68,68,.12)}
input.valid{border-color:var(--success);box-shadow:0 0 0 3px rgba(34,197,94,.1)}

.field-hint{
  font-size:11px;color:var(--error);
  margin-top:4px;font-weight:500;
  display:none;
}
.field-hint.show{display:block}

.row{display:flex;gap:12px}
.row .field{flex:1}
.flatpickr-input{cursor:pointer}

/* ── CARD PREVIEW ── */
.card-preview{
  background:linear-gradient(135deg,var(--purple) 0%,var(--purple-dark) 50%,#2D1B42 100%);
  border-radius:18px;
  padding:22px 20px;
  margin-bottom:22px;
  position:relative;overflow:hidden;
  box-shadow:0 8px 32px rgba(0,0,0,.25);
}
.card-preview::before{
  content:'';position:absolute;top:-30px;right:-30px;
  width:140px;height:140px;
  background:radial-gradient(circle,rgba(217,74,24,.15),transparent 70%);
  border-radius:50%;
}
.cp-chip{width:36px;height:28px;background:linear-gradient(135deg,#d4a017,#f0c040);border-radius:6px;margin-bottom:14px}
.cp-number{
  font-family:'Sora',sans-serif;font-size:16px;font-weight:600;
  color:rgba(255,255,255,.9);letter-spacing:3px;margin-bottom:14px;
}
.cp-bottom{display:flex;justify-content:space-between;align-items:flex-end}
.cp-label{font-size:9px;color:rgba(255,255,255,.45);text-transform:uppercase;letter-spacing:.8px;margin-bottom:2px}
.cp-value{font-family:'Sora',sans-serif;font-size:13px;font-weight:600;color:rgba(255,255,255,.9)}

/* ── OTP INPUTS ── */
.otp-container{
  display:flex;
  justify-content:center;
  gap:10px;
  margin-bottom:28px;
}
.otp-input{
  width:50px !important;
  height:58px !important;
  border:2px solid rgba(66,35,95,0.12) !important;
  border-radius:14px !important;
  background:var(--surface-soft) !important;
  font-family:'Sora',sans-serif !important;
  font-size:24px !important;
  font-weight:700 !important;
  text-align:center !important;
  color:var(--text) !important;
  transition:all .22s !important;
  outline:none !important;
  padding:0 !important;
  line-height:58px !important;
}
.otp-input:focus{
  border-color:var(--orange) !important;
  background:#fff !important;
  box-shadow:0 0 0 3px rgba(217,74,24,.15) !important;
}
.otp-input.filled{
  border-color:var(--orange) !important;
  background:#fff !important;
}
.otp-input.error{
  border-color:var(--error) !important;
  animation:shake .4s ease;
}
@keyframes shake{
  0%,100%{transform:translateX(0)}
  25%{transform:translateX(-5px)}
  75%{transform:translateX(5px)}
}

.timer-row{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:6px;
  margin-bottom:20px;
}
.timer-text{
  font-family:'Sora',sans-serif;
  font-size:12px;
  color:var(--muted);
}
.timer-value{
  font-family:'Sora',sans-serif;
  font-size:12px;
  font-weight:700;
  color:var(--orange);
}

/* ── BUTTON ── */
.btn{
  width:100%;
  padding:15px;
  font-family:'Sora',sans-serif;font-size:14px;font-weight:700;
  border:none;border-radius:var(--r2);
  color:#fff;cursor:pointer;
  background:linear-gradient(135deg,var(--orange),var(--orange-dark));
  box-shadow:var(--shadow-o);
  transition:all .22s;
  display:flex;align-items:center;justify-content:center;gap:8px;
  margin-top:8px;letter-spacing:.2px;
  position:relative;overflow:hidden;
}
.btn::after{
  content:'';position:absolute;inset:0;
  background:linear-gradient(105deg,transparent 30%,rgba(255,255,255,.2),transparent 70%);
  transform:translateX(-150%);
}
.btn:hover::after{transform:translateX(150%);transition:transform .6s}
.btn:hover{transform:translateY(-2px);box-shadow:0 12px 36px rgba(217,74,24,0.4)}
.btn:active{transform:scale(.98)}
.btn svg{width:16px;height:16px;stroke:#fff;fill:none;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
.btn:disabled{opacity:.7;cursor:not-allowed;transform:none}

.btn-secondary{
  width:100%;
  padding:14px;
  font-family:'Sora',sans-serif;font-size:14px;font-weight:700;
  border:2px solid var(--orange);
  border-radius:var(--r2);
  color:var(--orange);cursor:pointer;
  background:transparent;
  transition:all .22s;
  display:flex;align-items:center;justify-content:center;gap:8px;
  letter-spacing:.2px;
  margin-top:12px;
}
.btn-secondary:hover{background:rgba(217,74,24,.08);border-color:var(--orange-dark);color:var(--orange-dark);}
.btn-secondary:active{transform:scale(.98)}
.btn-secondary svg{width:16px;height:16px;stroke:var(--orange);fill:none;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
.btn-secondary:hover svg{stroke:var(--orange-dark);}
.btn-secondary:disabled{opacity:.5;cursor:not-allowed}

.secure-note{
  display:flex;align-items:center;justify-content:center;gap:6px;
  margin-top:14px;
  font-size:11.5px;color:var(--muted);
}
.secure-note svg{width:13px;height:13px;stroke:var(--orange);fill:none;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}

/* ── OTP ERROR POPUP ── */
.otp-error-popup{
  display:none;
  position:fixed;
  inset:0;
  z-index:9999;
  background:rgba(66,35,95,.6);
  backdrop-filter:blur(6px);
  align-items:center;
  justify-content:center;
  padding:20px;
  animation:fadeIn .3s ease;
}
.otp-error-popup.show{display:flex}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}

.otp-error-box{
  background:var(--white);
  border-radius:var(--r2);
  padding:36px 28px;
  max-width:360px;
  width:100%;
  text-align:center;
  animation:scaleIn .3s ease;
  position:relative;
}
@keyframes scaleIn{from{transform:scale(.9);opacity:0}to{transform:scale(1);opacity:1}}

.otp-error-close{
  position:absolute;
  top:12px;
  right:12px;
  width:32px;
  height:32px;
  border-radius:50%;
  background:rgba(217,74,24,.1);
  border:none;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:background .2s;
}
.otp-error-close:hover{background:rgba(217,74,24,.2)}
.otp-error-close svg{width:16px;height:16px;stroke:var(--orange);fill:none;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}

.otp-error-icon{
  width:72px;height:72px;
  background:rgba(217,74,24,.1);
  border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  margin:0 auto 20px;
}
.otp-error-icon svg{width:36px;height:36px;stroke:var(--orange);fill:none;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}

.otp-error-box h3{
  font-family:'Sora',sans-serif;
  font-size:18px;font-weight:800;
  color:var(--text);
  margin-bottom:8px;
}

.otp-error-box p{
  color:var(--muted);
  font-size:14px;
  line-height:1.6;
}

/* ── FINAL ERROR POPUP (After 5 attempts) ── */
.final-error-popup{
  display:none;
  position:fixed;
  inset:0;
  z-index:9999;
  background:rgba(66,35,95,.6);
  backdrop-filter:blur(6px);
  align-items:center;
  justify-content:center;
  padding:20px;
  animation:fadeIn .3s ease;
}
.final-error-popup.show{display:flex}

.final-error-box{
  background:var(--white);
  border-radius:var(--r2);
  padding:36px 28px;
  max-width:340px;
  width:100%;
  text-align:center;
  animation:scaleIn .3s ease;
}

.final-error-icon{
  width:72px;height:72px;
  background:rgba(217,74,24,.1);
  border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  margin:0 auto 24px;
}
.final-error-icon svg{width:36px;height:36px;stroke:var(--orange);fill:none;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}

.final-error-box h3{
  font-family:'Sora',sans-serif;
  font-size:18px;font-weight:800;
  color:var(--text);
  margin-bottom:10px;
}

.final-error-box p{
  color:var(--muted);
  font-size:14px;
  line-height:1.6;
}

/* ── SUCCESS POPUP ── */
.success-popup{
  display:none;
  position:fixed;
  inset:0;
  z-index:9999;
  background:rgba(0,0,0,.4);
  backdrop-filter:blur(4px);
  align-items:center;
  justify-content:center;
  padding:20px;
  animation:fadeIn .2s ease;
}
.success-popup.show{display:flex}

.success-box{
  background:var(--white);
  border-radius:var(--r2);
  padding:32px 28px;
  max-width:320px;
  width:100%;
  text-align:center;
  animation:scaleIn .25s ease;
}

.success-icon{
  width:68px;height:68px;
  background:rgba(217,74,24,.1);
  border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  margin:0 auto 20px;
}
.success-icon svg{width:34px;height:34px;stroke:var(--orange);fill:none;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}

.success-box h3{
  font-family:'Sora',sans-serif;
  font-size:17px;font-weight:800;
  color:var(--orange);
}

.hidden{display:none !important}

/* ── LOADER ── */
#loader{
  display:none;position:fixed;inset:0;z-index:9999;
  background:linear-gradient(135deg,var(--purple) 0%,var(--purple-dark) 100%);
  backdrop-filter:blur(8px);
  flex-direction:column;align-items:center;justify-content:center;gap:20px;
}
.loader-icon-box{
  width:64px;height:64px;border-radius:50%;
  background:linear-gradient(135deg,var(--orange),var(--orange-dark));
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 0 0 0 rgba(217,74,24,.4);
  animation:pulse 1.8s ease-in-out infinite;
}
.loader-icon-box svg{
  width:28px;height:28px;stroke:#fff;fill:none;stroke-width:2;
  animation:spin .9s linear infinite;
}
.loader-title-text{font-family:'Sora',sans-serif;font-size:17px;font-weight:700;color:#fff}
.loader-sub-text{font-size:12.5px;color:rgba(255,255,255,0.7)}
.progress-bar-track{width:240px;height:6px;background:rgba(255,255,255,0.2);border-radius:20px;overflow:hidden}
.progress-bar-fill{height:100%;width:0%;background:linear-gradient(90deg,var(--orange),var(--orange-light));border-radius:20px;transition:width .04s linear}

/* Spin Animation */
@keyframes spin{to{transform:rotate(360deg)}}

/* Pulse Animation */
@keyframes pulse{0%,100%{box-shadow:0 0 0 0 rgba(217,74,24,.4)}50%{box-shadow:0 0 0 16px rgba(217,74,24,0)}}

@media(min-width:520px){
  .hero-strip,.step-bar,.card{border-radius:var(--r2)}
}
@media(max-width:400px){
  .card{padding:20px 16px}
  .row{flex-direction:column;gap:0}
  .otp-input{width:44px !important;height:52px !important;font-size:20px !important;line-height:52px !important}
  .otp-container{gap:8px}
}