:root {
  --blue-dark: #0a2a5e;
  --blue-mid: #1a4fb5;
  --blue-btn: #1565c0;
  --accent: #00c6ff;
  --accent2: #e8f4ff;
  --surface: #f5f8ff;
  --card-bg: #ffffff;
  --border: #dce6f5;
  --label: #334b72;
  --muted: #8299b8;
  --req: #e53935;
  --success: #00897b;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-card: 0 2px 20px rgba(10, 42, 94, .09);
  --shadow-deep: 0 8px 40px rgba(10, 42, 94, .14);
  --ff-head: 'Sora', sans-serif;
  --ff-body: 'DM Sans', sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--surface);
  font-family: var(--ff-body);
  color: #1a2d50;
  min-height: 100vh;
}

/* ── PAGE HEADER ───────────────────────────────── */
.page-header {
  background: linear-gradient(135deg, #051232 0%, #0a2a5e 55%, #1255a8 100%);
  padding: 48px 20px 36px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 70% 40%, rgba(0, 198, 255, .12) 0%, transparent 70%);
  pointer-events: none;
}

.page-header .badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 198, 255, .15);
  border: 1px solid rgba(0, 198, 255, .35);
  color: var(--accent);
  font-family: var(--ff-head);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 5px 16px;
  border-radius: 50px;
  margin-bottom: 16px;
}

.page-header h1 {
  font-family: var(--ff-head);
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -.3px;
  margin-bottom: 8px;
}

.page-header p {
  color: rgba(255, 255, 255, .65);
  font-size: .92rem;
}

/* ── STEPS ─────────────────────────────────────── */
.steps-wrap {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 12px rgba(10, 42, 94, .07);
}

.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 480px;
  margin: 0 auto;
  padding: 14px 0;
  gap: 0;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.step-dot {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #e8edf5;
  color: #8299b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  transition: all .3s ease;
}

.step.active .step-dot {
  background: var(--blue-dark);
  color: #fff;
  box-shadow: 0 4px 14px rgba(10, 42, 94, .35);
}

.step.done .step-dot {
  background: var(--success);
  color: #fff;
}

.step-label {
  font-family: var(--ff-head);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--muted);
}

.step.active .step-label {
  color: var(--blue-dark);
}

.step.done .step-label {
  color: var(--success);
}

.step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  min-width: 28px;
  margin: 0 6px;
  margin-bottom: 16px;
}

/* ── MAIN WRAP ─────────────────────────────────── */
.main-wrap {
  max-width: 800px;
  margin: 32px auto 60px;
  padding: 0 16px;
}

/* ── FORM SECTION CARD ─────────────────────────── */
.form-section {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
  margin-bottom: 24px;
  overflow: hidden;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 24px;
  background: linear-gradient(90deg, #f0f5ff 0%, #fff 100%);
  border-bottom: 1px solid var(--border);
}

.section-head i {
  font-size: 1.1rem;
  color: var(--blue-mid);
  width: 36px;
  height: 36px;
  background: var(--accent2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.section-head h2 {
  font-family: var(--ff-head);
  font-size: .98rem;
  font-weight: 700;
  color: var(--blue-dark);
  flex: 1;
}

.section-head .badge-count {
  background: var(--blue-dark);
  color: #fff;
  font-family: var(--ff-head);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .6px;
  padding: 3px 11px;
  border-radius: 50px;
  text-transform: uppercase;
}

.section-body {
  padding: 24px;
}

/* ── FORM CONTROLS ─────────────────────────────── */
.form-label {
  font-family: var(--ff-head);
  font-size: .78rem;
  font-weight: 700;
  color: var(--label);
  letter-spacing: .4px;
  text-transform: uppercase;
  margin-bottom: 7px;
  display: block;
}

.req {
  color: var(--req);
  margin-left: 2px;
}

.opt {
  color: var(--muted);
  font-weight: 400;
  text-transform: none;
  font-size: .75rem;
}

.form-control,
.form-select {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--ff-body);
  font-size: .88rem;
  color: #1a2d50;
  padding: 10px 14px;
  background: #fafcff;
  transition: border-color .2s, box-shadow .2s;
  height: auto;
}

.form-control::placeholder {
  color: #b0bfd8;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--blue-mid);
  box-shadow: 0 0 0 3px rgba(26, 79, 181, .12);
  background: #fff;
  outline: none;
}

.form-control.is-invalid,
.form-select.is-invalid {
  border-color: var(--req);
  box-shadow: 0 0 0 3px rgba(229, 57, 53, .10);
}

.invalid-feedback {
  font-size: .76rem;
  color: var(--req);
  margin-top: 5px;
  display: none;
}

.form-control.is-invalid~.invalid-feedback,
.form-select.is-invalid~.invalid-feedback {
  display: block;
}

.was-validated .form-control:invalid~.invalid-feedback,
.was-validated .form-select:invalid~.invalid-feedback {
  display: block;
}

.input-group-text {
  background: var(--accent2);
  border: 1.5px solid var(--border);
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  color: var(--blue-mid);
  font-family: var(--ff-head);
  font-size: .78rem;
  font-weight: 700;
  padding: 10px 14px;
}

.input-group .form-control {
  border-left: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.input-group .form-control:focus {
  border-left: none;
}

textarea.form-control {
  min-height: 90px;
  resize: vertical;
}

/* ── PROFILE UPLOAD ────────────────────────────── */
.profile-upload-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.profile-preview {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--accent2);
  border: 2.5px dashed var(--blue-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
  position: relative;
}

.profile-preview:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0, 198, 255, .12);
}

.profile-preview i {
  font-size: 2rem;
  color: var(--blue-mid);
}

.profile-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.profile-preview .overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 42, 94, .5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .2s;
}

.profile-preview:hover .overlay {
  opacity: 1;
}

.profile-preview .overlay i {
  font-size: 1.2rem;
  color: #fff;
}

#profileInput {
  display: none;
}

.profile-hint {
  font-size: .74rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}

/* ── DIVIDER ───────────────────────────────────── */
.field-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0 16px;
  grid-column: 1 / -1;
}

.field-group-label {
  font-family: var(--ff-head);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--blue-dark);
  padding: 3px 12px;
  border-radius: 50px;
  display: inline-block;
  margin-bottom: 16px;
}

/* ── SUBMIT SECTION ────────────────────────────── */
.submit-section {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
  padding: 24px;
}

.submit-section .security-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .82rem;
  color: var(--muted);
  margin-bottom: 20px;
  background: var(--surface);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.submit-section .security-note i {
  color: var(--success);
  font-size: .95rem;
  margin-top: 1px;
  flex-shrink: 0;
}

.submit-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-submit {
  background: linear-gradient(135deg, var(--blue-mid), var(--blue-dark));
  color: #fff;
  font-family: var(--ff-head);
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  padding: 13px 32px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 18px rgba(10, 42, 94, .28);
  transition: all .25s;
  flex: 1;
  justify-content: center;
  min-width: 180px;
}

.btn-submit:hover {
  background: linear-gradient(135deg, #0d47a1, #051a4a);
  box-shadow: 0 6px 24px rgba(10, 42, 94, .4);
  transform: translateY(-1px);
}

.btn-submit:active {
  transform: translateY(0);
}

.btn-reset {
  background: transparent;
  color: var(--muted);
  font-family: var(--ff-head);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  padding: 13px 22px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all .2s;
}

.btn-reset:hover {
  border-color: var(--req);
  color: var(--req);
  background: #fff5f5;
}

/* ── PINCODE LOADER ────────────────────────────── */
.pincode-loading {
  display: none;
  font-size: .75rem;
  color: var(--blue-mid);
  margin-top: 5px;
}

.pincode-loading i {
  animation: spin .8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── GENDER PILLS ──────────────────────────────── */
.gender-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.gender-option {
  flex: 1;
  min-width: 80px;
}

.gender-option input[type="radio"] {
  display: none;
}

.gender-option label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fafcff;
  font-family: var(--ff-head);
  font-size: .78rem;
  font-weight: 600;
  color: var(--label);
  cursor: pointer;
  transition: all .2s;
  text-align: center;
}

.gender-option input[type="radio"]:checked+label {
  border-color: var(--blue-mid);
  background: var(--accent2);
  color: var(--blue-dark);
  box-shadow: 0 0 0 2px rgba(26, 79, 181, .15);
}

.gender-option label:hover {
  border-color: var(--blue-mid);
  background: var(--accent2);
}

/* ── CARD TYPE ─────────────────────────────────── */
.cardtype-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cardtype-option {
  flex: 1;
  min-width: 110px;
}

.cardtype-option input[type="radio"] {
  display: none;
}

.cardtype-option label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fafcff;
  cursor: pointer;
  transition: all .2s;
  text-align: center;
}

.cardtype-option label i {
  font-size: 1.3rem;
  color: var(--muted);
}

.cardtype-option label span {
  font-family: var(--ff-head);
  font-size: .76rem;
  font-weight: 700;
  color: var(--label);
}

.cardtype-option input[type="radio"]:checked+label {
  border-color: var(--blue-mid);
  background: var(--accent2);
  box-shadow: 0 0 0 2px rgba(26, 79, 181, .15);
}

.cardtype-option input[type="radio"]:checked+label i {
  color: var(--blue-mid);
}

.cardtype-option input[type="radio"]:checked+label span {
  color: var(--blue-dark);
}

.cardtype-option label:hover {
  border-color: var(--blue-mid);
  background: var(--accent2);
}

/* ── RESPONSIVE ────────────────────────────────── */
@media (max-width: 575px) {
  .section-body {
    padding: 16px;
  }

  .section-head {
    padding: 14px 16px;
  }

  .submit-section {
    padding: 16px;
  }

  .btn-submit {
    min-width: auto;
  }

  .steps-wrap {
    padding: 0 8px;
  }
}