/* ================================================================
   FinanceBaba — Main Stylesheet
   ================================================================ */

/* ---- Variables ---- */
:root {
  --primary:       #1e40af;
  --primary-dark:  #1e3a8a;
  --primary-light: #eff6ff;
  --secondary:     #f59e0b;
  --secondary-dark:#d97706;
  --success:       #10b981;
  --success-dark:  #059669;
  --danger:        #ef4444;
  --warning:       #f59e0b;
  --dark:          #0f172a;
  --text:          #1e293b;
  --text-muted:    #64748b;
  --border:        #e2e8f0;
  --bg:            #f1f5f9;
  --white:         #ffffff;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow:        0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
  --shadow-lg:     0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);
  --shadow-xl:     0 20px 25px -5px rgba(0,0,0,.1), 0 10px 10px -5px rgba(0,0,0,.04);
  --radius:        14px;
  --radius-sm:     8px;
  --radius-xs:     6px;
  --font:          'Inter', system-ui, -apple-system, sans-serif;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ---- Utilities ---- */
.container    { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.hidden       { display: none !important; }
.req          { color: var(--danger); }
.optional     { color: var(--text-muted); font-size: .85em; font-weight: 400; }
.highlight    { color: var(--primary); font-weight: 700; }
.success-text { color: var(--success); font-weight: 600; }

/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: .95rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .2s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.btn-primary {
  background: var(--primary);
  color: var(--white);
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow); color: var(--white); }

.btn-success {
  background: var(--success);
  color: var(--white);
}
.btn-success:hover { background: var(--success-dark); transform: translateY(-1px); color: var(--white); }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover { background: var(--primary-light); }

.btn-white {
  background: var(--white);
  color: var(--primary);
}
.btn-white:hover { background: #f0f4ff; color: var(--primary); }

.btn-danger { background: var(--danger); color: var(--white); }
.btn-danger:hover { background: #dc2626; color: var(--white); }

.btn-block  { width: 100%; justify-content: center; }
.btn-lg     { padding: 15px 32px; font-size: 1.05rem; }
.btn-sm     { padding: 8px 16px;  font-size: .875rem; }
.btn-xs     { padding: 5px 10px;  font-size: .8rem; }

.btn-arrow  { width: 18px; height: 18px; }

/* ================================================================
   FORMS
   ================================================================ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}
.form-group label {
  font-weight: 600;
  font-size: .9rem;
  color: var(--text);
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;          /* fill the column, not the input's intrinsic size */
  min-width: 0;         /* allow shrinking below the default ~20-char width */
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}
.form-group input:focus,
.form-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30,64,175,.1);
}
.form-group input::placeholder { color: #a1afc0; }
.form-hint { font-size: .8rem; color: var(--text-muted); }
.field-status { font-size: .82rem; font-weight: 500; }
.field-status.valid   { color: var(--success); }
.field-status.invalid { color: var(--danger); }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
/* Grid items must be allowed to shrink, otherwise the input's intrinsic
   width forces the column wider than the card and overflows. */
.form-row .form-group { min-width: 0; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

.input-with-prefix {
  display: flex;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.input-with-prefix:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30,64,175,.1);
}
.input-prefix {
  padding: 12px 14px;
  background: #f8fafc;
  color: var(--text-muted);
  font-weight: 600;
  border-right: 1.5px solid var(--border);
  white-space: nowrap;
}
.input-with-prefix input {
  border: none;
  border-radius: 0;
  flex: 1;
  box-shadow: none !important;
}
.input-with-prefix input:focus { box-shadow: none; }

.form-consent { margin-bottom: 20px; }
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: .9rem;
}
.checkbox-label input[type="checkbox"] {
  width: 16px; height: 16px;
  min-width: 16px; min-height: 16px;
  margin-top: 3px;
  cursor: pointer;
}
.form-note {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: 12px;
  text-align: center;
  justify-content: center;
}
.form-note svg { width: 14px; height: 14px; }

/* ================================================================
   ALERTS
   ================================================================ */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  margin-bottom: 20px;
}
.alert ul { padding-left: 16px; list-style: disc; }
.alert ul li { margin-bottom: 4px; }

.alert-error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.alert-info    { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }

/* ================================================================
   NAVBAR
   ================================================================ */
.navbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--primary), #3b82f6);
  color: var(--white);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: .9rem;
  letter-spacing: .5px;
  flex-shrink: 0;
}
.logo-text { font-size: 1.25rem; font-weight: 800; color: var(--dark); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  color: var(--text-muted);
  font-size: .9rem;
  font-weight: 500;
  text-decoration: none;
  transition: color .2s;
}
.nav-links a:hover { color: var(--primary); }

/* ================================================================
   HERO
   ================================================================ */
.hero {
  position: relative;
  background: linear-gradient(135deg, #0f1e4a 0%, #1e3a8a 50%, #1e40af 100%);
  padding: 70px 0 90px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 440px;
  gap: 60px;
  align-items: center;
  position: relative;
}
.hero-content { color: var(--white); }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  color: #93c5fd;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: .85rem;
  font-weight: 500;
  margin-bottom: 24px;
}
.badge-dot {
  width: 8px; height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .7; transform: scale(1.2); }
}
.hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 18px;
  color: var(--white);
}
.hero-title span { color: #fbbf24; }
.hero-sub {
  font-size: 1.1rem;
  color: #bfdbfe;
  margin-bottom: 36px;
  line-height: 1.7;
}
.hero-stats {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.stat { text-align: center; padding: 0 20px; }
.stat:first-child { padding-left: 0; }
.stat-value { display: block; font-size: 1.6rem; font-weight: 800; color: var(--white); }
.stat-label { display: block; font-size: .8rem; color: #93c5fd; font-weight: 500; margin-top: 2px; }
.stat-divider { width: 1px; height: 40px; background: rgba(255,255,255,.2); }

.trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.trust-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .82rem;
  color: #93c5fd;
}
.trust-badge svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ================================================================
   FORM CARD
   ================================================================ */
.form-card {
  background: var(--white);
  border-radius: 20px;
  padding: 36px 32px;
  box-shadow: var(--shadow-xl);
  position: relative;
}
.form-card-header {
  margin-bottom: 28px;
  text-align: center;
}
.form-card-header h2 { font-size: 1.45rem; font-weight: 700; color: var(--dark); }
.form-card-header p  { color: var(--text-muted); font-size: .9rem; margin-top: 4px; }

/* ================================================================
   SECTIONS
   ================================================================ */
.section { padding: 80px 0; }
.section-alt { background: var(--white); }

.section-header { text-align: center; margin-bottom: 60px; }
.section-badge {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  padding: 5px 14px;
  border-radius: 100px;
  font-size: .8rem;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.section-header h2 { font-size: 2rem; font-weight: 700; color: var(--dark); margin-bottom: 12px; }
.section-header p  { color: var(--text-muted); font-size: 1rem; max-width: 520px; margin: 0 auto; }

/* Steps */
.steps-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}
.step-item {
  text-align: center;
  padding: 28px 24px;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  width: 160px;
  flex-shrink: 0;
  transition: transform .2s, box-shadow .2s;
}
.step-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.step-num {
  display: inline-block;
  width: 28px; height: 28px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  font-size: .8rem;
  font-weight: 700;
  line-height: 28px;
  text-align: center;
  margin-bottom: 10px;
}
.step-icon { font-size: 2rem; margin-bottom: 10px; }
.step-item h3 { font-size: .9rem; font-weight: 600; margin-bottom: 6px; }
.step-item p  { font-size: .8rem; color: var(--text-muted); }
.step-arrow {
  font-size: 1.4rem;
  color: var(--text-muted);
  padding: 0 6px;
  align-self: center;
}

/* Benefits */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.benefit-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 28px 24px;
  border: 1px solid var(--border);
  transition: transform .2s, box-shadow .2s;
}
.benefit-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.benefit-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
}
.benefit-blue   { background: #eff6ff; }
.benefit-green  { background: #f0fdf4; }
.benefit-purple { background: #faf5ff; }
.benefit-orange { background: #fff7ed; }
.benefit-teal   { background: #f0fdfa; }
.benefit-red    { background: #fef2f2; }
.benefit-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 8px; }
.benefit-card p  { font-size: .875rem; color: var(--text-muted); line-height: 1.6; }

/* CTA */
.cta-section {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  padding: 70px 0;
  text-align: center;
  color: var(--white);
}
.cta-section h2 { font-size: 2rem; font-weight: 700; margin-bottom: 12px; }
.cta-section p  { color: #bfdbfe; margin-bottom: 32px; font-size: 1.05rem; }

/* Footer */
.footer { background: var(--dark); padding: 60px 0 0; color: #94a3b8; }
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}
.footer-brand .logo-text { color: var(--white); }
.footer-brand .logo-icon { background: rgba(255,255,255,.1); }
.footer-brand p { margin-top: 14px; font-size: .875rem; line-height: 1.7; }
.footer-links h4, .footer-contact h4 {
  color: var(--white);
  font-size: .9rem;
  font-weight: 600;
  margin-bottom: 14px;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.footer-links a {
  display: block;
  color: #94a3b8;
  font-size: .875rem;
  margin-bottom: 8px;
  transition: color .2s;
}
.footer-links a:hover { color: var(--white); text-decoration: none; }
.footer-contact p { font-size: .875rem; margin-bottom: 6px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 20px 0;
  text-align: center;
  font-size: .8rem;
}

/* ================================================================
   FLOW PAGES (OTP, KYC, Offers, Payment, Success)
   ================================================================ */
.flow-page {
  background: linear-gradient(135deg, #f0f4f8 0%, #e8edf5 100%);
  min-height: 100vh;
  padding: 40px 20px 60px;
}
.flow-container {
  max-width: 520px;
  margin: 0 auto;
}
.flow-container-wide { max-width: 900px; }

/* Progress Steps */
.progress-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 36px;
  overflow-x: auto;
  padding: 0 4px;
}
.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.ps-num {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .85rem;
  transition: all .3s;
}
.ps-label { font-size: .72rem; color: var(--text-muted); font-weight: 500; }
.progress-step.active .ps-num {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 0 0 4px rgba(30,64,175,.15);
}
.progress-step.active .ps-label { color: var(--primary); font-weight: 600; }
.progress-step.completed .ps-num {
  background: var(--success);
  color: var(--white);
}
.progress-line {
  width: 40px; height: 2px;
  background: var(--border);
  flex-shrink: 0;
  align-self: center;
  margin-bottom: 22px;
}
.progress-line.active { background: var(--success); }

/* Flow Card */
.flow-card {
  background: var(--white);
  border-radius: 20px;
  padding: 40px 36px;
  box-shadow: var(--shadow-xl);
  text-align: center;
}
.flow-icon { font-size: 3rem; margin-bottom: 16px; }
.flow-card h1 { font-size: 1.6rem; font-weight: 700; color: var(--dark); margin-bottom: 10px; }
.flow-sub { color: var(--text-muted); margin-bottom: 28px; line-height: 1.6; }
.flow-card .form-group, .flow-card .form-row { text-align: left; }

/* ================================================================
   OTP INPUTS
   ================================================================ */
.otp-inputs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}
.otp-input {
  width: 52px; height: 60px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--dark);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}
.otp-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30,64,175,.12);
}
.otp-input.filled { border-color: var(--primary); background: var(--primary-light); }

.otp-timer {
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  font-weight: 500;
}
.resend-row {
  margin-top: 16px;
  font-size: .875rem;
  color: var(--text-muted);
}
.back-link { margin-top: 16px; font-size: .875rem; }

/* ================================================================
   KYC
   ================================================================ */
.security-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  color: #166534;
  margin-bottom: 24px;
  text-align: left;
}
.security-note svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; }
.kyc-disclaimer { margin-bottom: 20px; text-align: left; }

/* ================================================================
   SEARCH ANIMATION
   ================================================================ */
.search-screen {
  background: var(--white);
  border-radius: 20px;
  padding: 60px 40px;
  box-shadow: var(--shadow-xl);
  text-align: center;
}
.search-animation {
  position: relative;
  width: 120px; height: 120px;
  margin: 0 auto 32px;
}
.search-rings {
  position: absolute;
  inset: 0;
}
.ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid transparent;
}
.ring-1 { border-top-color: var(--primary); animation: spin 1.2s linear infinite; }
.ring-2 { inset: 10px; border-top-color: var(--secondary); animation: spin 1.6s linear infinite reverse; }
.ring-3 { inset: 20px; border-top-color: var(--success); animation: spin 2s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.search-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
}
.search-screen h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 8px; color: var(--dark); }
.search-screen p  { color: var(--text-muted); margin-bottom: 28px; }

.search-steps { text-align: left; max-width: 320px; margin: 0 auto; }
.search-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  color: var(--text-muted);
  font-size: .875rem;
  opacity: 0;
  transform: translateX(-10px);
  transition: all .4s ease;
}
.search-step.visible { opacity: 1; transform: translateX(0); }
.search-step.done    { color: var(--success); }
.ss-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
  transition: background .3s;
}
.search-step.done .ss-dot { background: var(--success); }

/* ================================================================
   OFFERS
   ================================================================ */
.offers-screen { }
.offers-header {
  text-align: center;
  margin-bottom: 36px;
  animation: fadeInUp .5s ease;
}
.offers-success-badge {
  display: inline-block;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  color: #166534;
  border: 1px solid #bbf7d0;
  padding: 8px 20px;
  border-radius: 100px;
  font-size: .9rem;
  font-weight: 600;
  margin-bottom: 12px;
}
.offers-header h1 { font-size: 1.8rem; font-weight: 700; color: var(--dark); margin-bottom: 8px; }
.offers-header p  { color: var(--text-muted); }

.offers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.offer-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  border: 2px solid var(--border);
  transition: all .25s ease;
  cursor: pointer;
  animation: fadeInUp .4s ease backwards;
}
.offer-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
.offer-card:nth-child(1) { animation-delay: .05s; }
.offer-card:nth-child(2) { animation-delay: .10s; }
.offer-card:nth-child(3) { animation-delay: .15s; }
.offer-card:nth-child(4) { animation-delay: .20s; }
.offer-card:nth-child(5) { animation-delay: .25s; }
.offer-card:nth-child(6) { animation-delay: .30s; }
.offer-card:nth-child(7) { animation-delay: .35s; }
.offer-card:nth-child(8) { animation-delay: .40s; }

.offer-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.bank-logo {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--primary), #3b82f6);
  color: var(--white);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: .8rem;
  letter-spacing: .5px;
  flex-shrink: 0;
}
.bank-info { flex: 1; }
.bank-info h3 { font-size: .95rem; font-weight: 700; color: var(--dark); }
.offer-tag {
  display: inline-block;
  background: #dcfce7;
  color: #166534;
  font-size: .7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
  margin-top: 2px;
}
.offer-check .check-circle {
  display: none;
  width: 24px; height: 24px;
  background: var(--success);
  color: var(--white);
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 700;
}
.offer-card.selected .check-circle { display: flex; }
.offer-card.selected { border-color: var(--success); background: #f0fdf4; }

.offer-amount {
  text-align: center;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.amount-label { display: block; font-size: .75rem; color: var(--text-muted); font-weight: 500; margin-bottom: 4px; }
.amount-value { font-size: 1.75rem; font-weight: 800; color: var(--primary); }

.offer-details { margin-bottom: 18px; }
.offer-detail {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: .85rem;
}
.od-label { color: var(--text-muted); }
.od-value { font-weight: 600; color: var(--dark); }

.offers-disclaimer {
  margin-top: 24px;
  font-size: .78rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.6;
}

/* ================================================================
   PAYMENT
   ================================================================ */
.order-summary {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-bottom: 24px;
  text-align: left;
}
.summary-title {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: .9rem;
  border-bottom: 1px dashed var(--border);
}
.summary-row:last-of-type { border-bottom: none; }
.summary-val { font-weight: 600; }
.bank-badge-sm {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  font-size: .7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 4px;
}
.summary-divider { border: none; border-top: 2px solid var(--border); margin: 12px 0; }
.summary-total { padding-top: 12px; font-size: 1rem; }
.fee-amount { color: var(--danger); font-size: 1.1rem; font-weight: 800; }
.summary-note { font-size: .75rem; color: var(--text-muted); margin-top: 4px; }

.upi-section { margin-bottom: 24px; text-align: left; }
.upi-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: .95rem;
  margin-bottom: 14px;
}
.upi-title svg { width: 20px; height: 20px; }
.upi-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #1e40af, #3b82f6);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  color: var(--white);
  margin-bottom: 14px;
}
.upi-logo {
  background: rgba(255,255,255,.2);
  padding: 8px 12px;
  border-radius: 6px;
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: 1px;
}
.upi-details { flex: 1; }
.upi-label { font-size: .72rem; opacity: .8; text-transform: uppercase; letter-spacing: .5px; }
.upi-id   { font-size: 1rem; font-weight: 700; letter-spacing: .5px; }
.upi-name { font-size: .8rem; opacity: .8; }
.copy-btn {
  background: rgba(255,255,255,.2);
  border: none;
  color: var(--white);
  padding: 8px 12px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .8rem;
  font-weight: 600;
  transition: background .2s;
}
.copy-btn:hover { background: rgba(255,255,255,.3); }
.copy-btn svg   { width: 14px; height: 14px; }

.payment-amount-display {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff7ed;
  border: 1px solid #fde68a;
  padding: 12px 16px;
  border-radius: var(--radius-xs);
  margin-bottom: 14px;
  font-size: .9rem;
}
.pay-amount { font-size: 1.2rem; font-weight: 800; color: var(--secondary-dark); }

.upi-steps { }
.upi-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  font-size: .875rem;
  color: var(--text-muted);
}
.us-num {
  width: 22px; height: 22px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 700;
  flex-shrink: 0;
}
.security-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: 16px;
}
.security-footer svg { width: 14px; height: 14px; color: var(--success); }

/* ================================================================
   SUCCESS PAGE
   ================================================================ */
.success-card {
  background: var(--white);
  border-radius: 20px;
  padding: 50px 40px;
  box-shadow: var(--shadow-xl);
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
}
.success-animation { margin-bottom: 28px; }
.success-circle {
  width: 90px; height: 90px;
  margin: 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--success), #22c55e);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 0 rgba(16,185,129,.3);
  animation: successPulse 1.5s ease forwards;
}
@keyframes successPulse {
  0%   { box-shadow: 0 0 0 0 rgba(16,185,129,.3); transform: scale(.8); }
  50%  { box-shadow: 0 0 0 20px rgba(16,185,129,0); }
  100% { transform: scale(1); }
}
.checkmark { width: 50px; height: 50px; }
.checkmark-circle {
  stroke: rgba(255,255,255,.2);
  stroke-width: 2;
  fill: none;
}
.checkmark-check {
  stroke: var(--white);
  stroke-width: 3;
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: drawCheck .6s .4s ease forwards;
}
@keyframes drawCheck { to { stroke-dashoffset: 0; } }

.success-title { font-size: 1.8rem; font-weight: 800; color: var(--dark); margin-bottom: 10px; }
.success-sub   { color: var(--text-muted); margin-bottom: 28px; line-height: 1.7; }

.ref-box {
  background: linear-gradient(135deg, var(--primary-light), #dbeafe);
  border: 1px solid #93c5fd;
  border-radius: var(--radius-sm);
  padding: 18px;
  margin-bottom: 24px;
}
.ref-label { display: block; font-size: .75rem; font-weight: 600; color: var(--primary); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 6px; }
.ref-code  { display: block; font-size: 1.5rem; font-weight: 800; color: var(--dark); letter-spacing: 2px; font-family: monospace; margin-bottom: 4px; }
.ref-hint  { display: block; font-size: .78rem; color: var(--text-muted); }

.success-summary {
  text-align: left;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 28px;
}
.ss-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: .875rem;
  border-bottom: 1px dashed var(--border);
}
.ss-row:last-child { border-bottom: none; }

.next-steps { text-align: left; margin-bottom: 24px; }
.next-steps h3 { font-size: 1rem; font-weight: 700; margin-bottom: 14px; }
.ns-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.ns-num {
  width: 28px; height: 28px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  flex-shrink: 0;
}
.ns-item strong { display: block; font-size: .9rem; margin-bottom: 2px; }
.ns-item p { font-size: .82rem; color: var(--text-muted); }

/* ================================================================
   SEGMENTED CONTROL (employment type)
   ================================================================ */
.seg-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.seg-option { position: relative; }
.seg-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.seg-option span {
  display: block;
  text-align: center;
  padding: 12px 8px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  transition: all .2s;
  background: var(--white);
}
.seg-option span:hover { border-color: var(--primary); }
.seg-option input:checked + span {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

/* ================================================================
   ELIGIBILITY SCORE CHIP
   ================================================================ */
.score-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border: 1px solid #93c5fd;
  color: #1e40af;
  padding: 8px 18px;
  border-radius: 100px;
  font-size: .9rem;
  margin: 6px 0 10px;
}

/* ================================================================
   TRACKING TIMELINE
   ================================================================ */
.timeline {
  text-align: left;
  margin: 24px 0;
}
.tl-item {
  display: flex;
  gap: 14px;
  position: relative;
  padding-bottom: 22px;
}
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: '';
  position: absolute;
  left: 13px;
  top: 28px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}
.tl-item:last-child::before { display: none; }
.tl-item.done::before { background: var(--success); }
.tl-marker {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  flex-shrink: 0;
  z-index: 1;
}
.tl-item.done .tl-marker {
  background: var(--success);
  color: var(--white);
}
.tl-body strong {
  display: block;
  font-size: .92rem;
  color: var(--dark);
}
.tl-body span {
  font-size: .82rem;
  color: var(--text-muted);
}

/* ================================================================
   ANIMATIONS
   ================================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1024px) {
  .hero-inner    { grid-template-columns: 1fr; gap: 40px; }
  .footer-inner  { grid-template-columns: 1fr 1fr; }
  .benefits-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .hero          { padding: 50px 0 60px; }
  .hero-title    { font-size: 1.85rem; }
  .hero-stats    { gap: 0; justify-content: flex-start; flex-wrap: wrap; }
  .stat          { padding: 8px 12px; }
  .stat-value    { font-size: 1.25rem; }
  .stat-divider  { display: none; }
  .flow-card     { padding: 28px 20px; }
  .flow-page     { padding: 28px 12px 48px; }
  .steps-grid    { flex-direction: column; align-items: center; }
  .step-arrow    { transform: rotate(90deg); padding: 4px 0; }
  .step-item     { width: 100%; max-width: 320px; }
  .form-card     { padding: 24px 16px; }
  .nav-links a:not(.btn-sm) { display: none; }
  /* Offers grid: single column on tablet */
  .offers-grid   { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
  /* UPI card stacks on tablet */
  .upi-card      { flex-wrap: wrap; gap: 10px; }
  /* Summary rows: allow value to wrap */
  .summary-row   { align-items: flex-start; flex-wrap: wrap; gap: 4px; }
  .summary-val   { text-align: right; }
}

@media (max-width: 480px) {
  .hero          { padding: 40px 0 50px; }
  .hero-title    { font-size: 1.55rem; }
  .hero-sub      { font-size: .95rem; }
  .trust-badges  { flex-direction: column; gap: 6px; }
  .hero-badge    { font-size: .78rem; }

  /* OTP: shrink inputs to fit 6 on small screens (fits 320px with 16px padding each side) */
  .otp-inputs    { gap: 7px; }
  .otp-input     { width: 40px; height: 50px; font-size: 1.2rem; border-radius: 6px; }

  /* Flow card */
  .flow-card     { padding: 24px 16px; border-radius: 16px; }
  .flow-icon     { font-size: 2.4rem; }
  .flow-card h1  { font-size: 1.35rem; }

  /* Progress: hide labels, compress lines */
  .progress-steps { gap: 0; padding: 0; }
  .progress-line  { width: 16px; }
  .ps-num         { width: 28px; height: 28px; font-size: .78rem; }
  .ps-label       { display: none; }

  /* UPI card: stack vertically */
  .upi-card          { flex-direction: column; align-items: flex-start; }
  .copy-btn          { width: 100%; justify-content: center; }
  .payment-amount-display { flex-direction: column; gap: 4px; text-align: center; }
  .pay-amount        { font-size: 1.4rem; }

  /* Success card */
  .success-card  { padding: 28px 16px; }
  .ref-code      { font-size: 1.2rem; letter-spacing: 1px; }

  /* Benefits / Footer */
  .benefits-grid { grid-template-columns: 1fr; }
  .footer-inner  { grid-template-columns: 1fr; gap: 24px; }
  .section       { padding: 56px 0; }

  /* Form card */
  .form-card     { padding: 20px 14px; }
  .form-card-header h2 { font-size: 1.2rem; }

  /* Offer cards: reduce padding */
  .offer-card    { padding: 18px 16px; }
  .amount-value  { font-size: 1.5rem; }
}

/* Extra small (320px) */
@media (max-width: 360px) {
  .otp-inputs  { gap: 5px; }
  .otp-input   { width: 36px; height: 46px; font-size: 1.1rem; }
  .hero-title  { font-size: 1.35rem; }
  .flow-card   { padding: 20px 12px; }
  .flow-page   { padding: 20px 8px 40px; }
  .container   { padding: 0 12px; }
  .btn-block   { font-size: .875rem; padding: 12px 16px; }
  .progress-line { width: 10px; }
}
