/* ======================================================
   iThinkers Olympiad – Registration Form Stylesheet 2026
   ====================================================== */

:root {
  --navy: #0b1e3d;
  --navy-mid: #142952;
  --blue: #1a60b8;
  --blue-light: #2d7ae0;
  --gold: #e8a020;
  --gold-light: #f5be55;
  --gold-pale: #fdf3e0;
  --white: #ffffff;
  --off-white: #f8fafd;
  --gray-50: #f2f4f8;
  --gray-100: #e4e8f0;
  --gray-200: #c8d0df;
  --gray-400: #7a8aa8;
  --gray-600: #4a5568;
  --red: #e53e3e;
  --green: #38a169;
  --shadow-sm: 0 1px 4px rgba(11,30,61,0.08);
  --shadow-md: 0 4px 16px rgba(11,30,61,0.10);
  --shadow-lg: 0 8px 32px rgba(11,30,61,0.14);
  --radius: 12px;
  --radius-sm: 8px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--off-white);
  color: var(--navy);
  min-height: 100vh;
}

/* ---- HEADER ---- */
.site-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 60%, #1a3a70 100%);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}
.header-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 16px;
  flex-wrap: wrap;
}
.logo-wrap { display: flex; align-items: center; gap: 14px; }
.logo-icon {
  width: 46px; height: 46px;
  background: var(--gold);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  color: var(--navy);
  font-weight: 700;
}
.logo-icon span { color: var(--navy-mid); }
.logo-title {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  color: var(--white);
  font-weight: 700;
  line-height: 1.1;
}
.logo-title span { color: var(--gold-light); }
.logo-sub { font-size: 11px; color: var(--gray-200); letter-spacing: 1px; text-transform: uppercase; margin-top: 2px; }
.header-info { display: flex; gap: 20px; flex-wrap: wrap; }
.header-info span { font-size: 13px; color: var(--gray-200); }

/* ---- PROGRESS BAR ---- */
.progress-bar-wrap {
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
  padding: 16px 24px;
  box-shadow: var(--shadow-sm);
}
.progress-container {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0;
}
.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
}
.step-circle {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--gray-100);
  color: var(--gray-400);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
  font-size: 14px;
  border: 2px solid var(--gray-200);
  transition: all 0.3s;
}
.step-item.active .step-circle {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(26,96,184,0.15);
}
.step-item.done .step-circle {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.step-item.done .step-circle::before { content: '✓'; font-size: 16px; }
.step-item.done .step-circle { font-size: 0; }
.step-label { font-size: 11px; color: var(--gray-400); font-weight: 500; white-space: nowrap; }
.step-item.active .step-label { color: var(--blue); font-weight: 600; }
.step-item.done .step-label { color: var(--green); }
.step-line { flex: 1; height: 2px; background: var(--gray-200); margin: 0 6px; margin-bottom: 18px; transition: background 0.3s; }
.step-line.done { background: var(--green); }

/* ---- MAIN ---- */
.form-main { max-width: 860px; margin: 0 auto; padding: 28px 20px 60px; }

/* ---- SECTION ---- */
.form-section { display: none; animation: fadeIn 0.35s ease; }
.form-section.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.section-header { margin-bottom: 24px; }
.section-badge {
  display: inline-block;
  background: var(--gold-pale);
  color: var(--gold);
  border: 1px solid var(--gold-light);
  font-size: 12px;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.section-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  color: var(--navy);
  margin-bottom: 6px;
}
.section-header p { color: var(--gray-600); font-size: 14px; }

/* ---- FORM CARD ---- */
.form-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
}
.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--gray-50);
}

/* ---- FORM GRID ---- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-group { display: flex; flex-direction: column; gap: 6px; }
.field-group.full { grid-column: 1 / -1; }
label { font-size: 13px; font-weight: 500; color: var(--gray-600); }
.req { color: var(--red); }
.field-note { font-size: 11px; color: var(--gray-400); margin-top: 2px; }

input, select, textarea {
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  color: var(--navy);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26,96,184,0.1);
}
input::placeholder, textarea::placeholder { color: var(--gray-200); }
.upper { text-transform: uppercase; }
textarea { resize: vertical; }

.phone-wrap { display: flex; align-items: center; border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm); overflow: hidden; }
.phone-wrap:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(26,96,184,0.1); }
.phone-code { padding: 10px 12px; background: var(--gray-50); color: var(--gray-600); font-size: 14px; font-weight: 500; border-right: 1.5px solid var(--gray-200); white-space: nowrap; }
.phone-wrap input { border: none; box-shadow: none; flex: 1; }
.phone-wrap input:focus { border: none; box-shadow: none; }

/* ---- OTP SOURCE ---- */
.otp-source-card {
  background: linear-gradient(135deg, #e8f0fe 0%, #f0f7ff 100%);
  border: 1.5px solid #b3d0f5;
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 20px;
}
.otp-source-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 6px; color: var(--navy); }
.otp-source-card p { font-size: 13px; color: var(--gray-600); margin-bottom: 16px; }
.radio-group { display: flex; gap: 14px; flex-wrap: wrap; }
.radio-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: white;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  cursor: pointer;
  flex: 1;
  min-width: 200px;
  transition: border-color 0.2s;
}
.radio-card:has(input:checked) { border-color: var(--blue); background: #f0f5ff; }
.radio-card input { accent-color: var(--blue); }
.radio-title { font-size: 13px; font-weight: 500; }
.radio-num { font-size: 16px; font-weight: 600; color: var(--blue); margin-top: 3px; }

/* ---- OTP STEP ---- */
.otp-card { text-align: center; padding: 40px; max-width: 500px; margin: 0 auto; }
.otp-icon { font-size: 48px; margin-bottom: 16px; }
.otp-card h3 { font-size: 18px; color: var(--navy); margin-bottom: 10px; }
.otp-card h3 span { color: var(--blue); }
.otp-desc { font-size: 14px; color: var(--gray-600); margin-bottom: 28px; }
.otp-input-row { display: flex; gap: 10px; justify-content: center; margin-bottom: 16px; }
.otp-box {
  width: 52px; height: 58px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  border: 2px solid var(--gray-200);
  border-radius: 10px;
  color: var(--navy);
  padding: 0;
  transition: all 0.2s;
}
.otp-box:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(26,96,184,0.12); background: #f0f5ff; }
.otp-error { color: var(--red); font-size: 13px; margin-bottom: 10px; }
.otp-timer { font-size: 13px; color: var(--gray-400); margin-bottom: 16px; }
.btn-resend { background: none; border: none; color: var(--blue); cursor: pointer; font-size: 14px; font-weight: 500; text-decoration: underline; margin-bottom: 16px; }

/* ---- ENROLLMENT ---- */
.enrollment-choice { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.choice-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: 2px solid var(--gray-200);
  border-radius: 40px;
  background: white;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-600);
  transition: all 0.2s;
  text-decoration: none;
}
.choice-btn:hover { border-color: var(--blue); color: var(--blue); }
.choice-btn.active { border-color: var(--blue); background: #f0f5ff; color: var(--blue); }
.choice-btn.download-btn { border-color: var(--gold); color: var(--gold); }
.choice-btn.download-btn:hover { background: var(--gold-pale); }
.choice-icon { font-size: 16px; }

.pricing-note {
  background: var(--gold-pale);
  border: 1px solid var(--gold-light);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--navy);
  margin-bottom: 16px;
}
.subjects-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.subj-pill {
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13px;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 6px;
}
.subj-pill span { color: var(--blue); font-weight: 600; font-size: 12px; }
.subj-pill.highlight { background: #fff8e1; border-color: var(--gold-light); }
.subj-availability { font-size: 12px; color: var(--gray-600); display: flex; flex-direction: column; gap: 4px; }

/* Subject Checkboxes */
.subject-selector { margin-top: 20px; }
.subj-label { font-size: 13px; font-weight: 500; color: var(--gray-600); display: block; margin-bottom: 10px; }
.select-class-msg { color: var(--gray-400); font-size: 13px; font-style: italic; }
.subject-checkboxes { display: flex; flex-wrap: wrap; gap: 8px; }
.subj-check-item {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.15s;
}
.subj-check-item:has(input:checked) { background: #f0f5ff; border-color: var(--blue); color: var(--blue); }
.subj-check-item input { accent-color: var(--blue); }
.subj-price { font-size: 11px; color: var(--gray-400); margin-left: 2px; }
.subj-check-item:has(input:checked) .subj-price { color: var(--blue); }

.btn-add-student {
  margin-top: 16px;
  background: var(--navy);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 11px 22px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  font-family: 'DM Sans', sans-serif;
}
.btn-add-student:hover { background: var(--blue); }

/* Roster Table */
.roster-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.student-count { background: var(--navy); color: white; border-radius: 20px; padding: 4px 14px; font-size: 12px; font-weight: 500; }
.table-wrap { overflow-x: auto; }
.roster-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.roster-table th { background: var(--navy); color: white; padding: 10px 12px; text-align: left; font-weight: 500; font-size: 12px; white-space: nowrap; }
.roster-table td { padding: 10px 12px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
.roster-table tr:hover td { background: var(--gray-50); }
.total-row td { font-weight: 600; background: var(--gold-pale); }
.total-label { text-align: right; }
.del-btn { background: none; border: none; color: var(--red); cursor: pointer; font-size: 16px; padding: 2px 6px; }

/* Upload Zone */
.upload-zone {
  border: 2.5px dashed var(--gray-200);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--gray-50);
}
.upload-zone:hover { border-color: var(--blue); background: #f0f5ff; }
.upload-icon { font-size: 40px; margin-bottom: 12px; }
.upload-text { font-size: 15px; font-weight: 500; color: var(--navy); margin-bottom: 6px; }
.upload-sub { font-size: 13px; color: var(--gray-400); }
.upload-note { font-size: 13px; color: var(--gray-600); margin-bottom: 16px; }
.upload-note a { color: var(--blue); }
.upload-success { color: var(--green); font-weight: 600; font-size: 15px; margin-bottom: 12px; }
#upload-summary { font-size: 13px; color: var(--gray-600); line-height: 1.7; }

/* ---- PAYMENT STEP ---- */
.summary-card table { width: 100%; font-size: 14px; }
.summary-card td { padding: 8px 0; border-bottom: 1px solid var(--gray-100); }
.summary-card td:first-child { color: var(--gray-600); width: 200px; }
.summary-card td:last-child { font-weight: 500; }

.payment-methods { display: flex; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.pay-option {
  display: flex;
  align-items: center;
  gap: 12px;
  background: white;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  cursor: pointer;
  flex: 1;
  min-width: 180px;
  transition: border-color 0.2s;
}
.pay-option:has(input:checked) { border-color: var(--blue); background: #f0f5ff; }
.pay-title { font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.pay-desc { font-size: 12px; color: var(--gray-400); }
.payment-detail-box {
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-bottom: 20px;
}
.upi-grid { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.qr-box {
  width: 100px; height: 100px;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--gray-400);
  text-align: center;
}
.bank-row { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; font-size: 14px; }
.bank-row span { color: var(--gray-600); min-width: 130px; }
.bank-details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.fee-table-wrap { overflow-x: auto; margin-bottom: 16px; }
.fee-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.fee-table th { background: var(--navy); color: white; padding: 9px 14px; text-align: left; font-size: 12px; }
.fee-table td { padding: 9px 14px; border-bottom: 1px solid var(--gray-100); }
.fee-totals { background: var(--navy); color: white; border-radius: var(--radius-sm); padding: 16px 20px; font-size: 14px; }
.fee-totals > div { display: flex; justify-content: space-between; padding: 4px 0; }
.fee-totals .grand-total { font-size: 18px; font-weight: 700; color: var(--gold-light); border-top: 1px solid rgba(255,255,255,0.2); margin-top: 8px; padding-top: 10px; }

.payment-confirm-card { background: var(--gray-50); border: 1px solid var(--gray-100); margin-top: 16px; }

.declaration-box {
  background: white;
  border: 1.5px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 20px;
}
.declaration-check { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; font-size: 13px; color: var(--gray-600); line-height: 1.6; }
.declaration-check input { margin-top: 3px; accent-color: var(--blue); flex-shrink: 0; }
.declaration-check a { color: var(--blue); }

/* ---- BUTTONS ---- */
.btn-row { display: flex; gap: 12px; justify-content: flex-end; margin-top: 8px; }
.btn-next, .btn-submit {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-light) 100%);
  color: white;
  border: none;
  border-radius: 40px;
  padding: 13px 30px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(26,96,184,0.3);
}
.btn-next:hover, .btn-submit:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(26,96,184,0.4); }
.btn-submit { background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%); box-shadow: 0 4px 12px rgba(22,163,74,0.3); }
.btn-back {
  background: white;
  color: var(--gray-600);
  border: 1.5px solid var(--gray-200);
  border-radius: 40px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.2s;
}
.btn-back:hover { background: var(--gray-50); border-color: var(--gray-400); }

/* ---- SUCCESS ---- */
.success-wrap { text-align: center; padding: 60px 20px; max-width: 540px; margin: 0 auto; }
.success-icon { font-size: 72px; margin-bottom: 20px; animation: bounce 0.6s ease; }
@keyframes bounce { 0%,100%{transform:scale(1)} 50%{transform:scale(1.15)} }
.success-wrap h2 { font-family: 'Playfair Display', serif; font-size: 32px; color: var(--navy); margin-bottom: 14px; }
.success-wrap p { color: var(--gray-600); font-size: 15px; line-height: 1.7; margin-bottom: 20px; }
.success-ref {
  background: var(--gold-pale);
  border: 1.5px solid var(--gold-light);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--navy);
}
.success-note { font-size: 13px; }

/* ---- FOOTER ---- */
.site-footer {
  background: var(--navy);
  color: var(--gray-200);
  text-align: center;
  padding: 18px;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 40px;
}

/* ---- SCHOOL CODE ---- */
.school-code-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.school-code-input {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--navy);
  border: 2px solid var(--gray-200);
  max-width: 280px;
}
.school-code-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26,96,184,0.1);
}
.school-code-input.code-valid   { border-color: var(--green); background: #f0fff4; }
.school-code-input.code-invalid { border-color: var(--red);   background: #fff5f5; }
.code-status { font-size: 22px; flex-shrink: 0; }
.code-note { margin-top: 6px; font-size: 12px; color: var(--gray-400); line-height: 1.5; }
.code-note a { color: var(--blue); text-decoration: none; }
.code-note a:hover { text-decoration: underline; }
.code-locked {
  background: var(--gold-pale);
  border: 1.5px solid var(--gold-light);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--navy);
  margin-top: 8px;
  display: none;
}
.code-locked.visible { display: flex; align-items: center; gap: 10px; }

/* ---- HELPERS ---- */
.hidden { display: none !important; }

/* ---- RESPONSIVE ---- */
@media (max-width: 600px) {
  .form-grid { grid-template-columns: 1fr; }
  .field-group.full { grid-column: 1; }
  .otp-input-row { gap: 6px; }
  .otp-box { width: 42px; height: 50px; font-size: 18px; }
  .bank-details-grid { grid-template-columns: 1fr; }
  .header-info { display: none; }
  .progress-container { gap: 0; }
  .step-label { font-size: 9px; }
  .otp-card { padding: 24px 16px; }
}

@media print {
  .site-header, .progress-bar-wrap, .btn-row, .btn-back, .btn-next, .btn-submit { display: none; }
  .form-section { display: block !important; }
  body { background: white; }
}
