/* ============================================
   JETOUR Event System — main.css
   Design: Dark navy + teal + orange accent
   ============================================ */

:root {
  --teal:        #3ECFCF;
  --teal-dark:   #2BA8A8;
  --orange:      #F5A623;
  --navy:        #0A1628;
  --navy-mid:    #0D1F3C;
  --glass-bg:    rgba(13, 31, 60, 0.72);
  --glass-border:rgba(62, 207, 207, 0.18);
  --text-white:  #FFFFFF;
  --text-muted:  rgba(255,255,255,0.6);
  --input-bg:    rgba(255,255,255,0.08);
  --input-border:rgba(62,207,207,0.3);
  --error:       #FF5C5C;
  --success:     #3ECFCF;
  --shadow:      0 8px 32px rgba(0,0,0,0.4);
}

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

html { font-size: 16px; }

body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #000;
  color: var(--text-white);
  min-height: 100vh;
  min-height: -webkit-fill-available; /* iOS Safari 100vh fix */
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Desktop: centre mobile viewport, black surround */
#appShell {
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
  position: relative;
  min-height: 100vh;
  min-height: -webkit-fill-available;
}

/* ============================================
   BACKGROUND LAYERS
   ============================================ */
.bg-layer {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  z-index: 0;
  /* CRITICAL: never intercept touches */
  pointer-events: none;
  -webkit-transition: opacity 0.5s ease;
  transition: opacity 0.5s ease;
}
.bg-main { background-image: url('main-bg.jpg'); background-size: 100%; background-repeat: no-repeat; background-position: center; }
.bg-inner { background-image: url('bg.png'); opacity: 0; }
body.inner-bg .bg-main  { opacity: 0; }
body.inner-bg .bg-inner { opacity: 1; }

/* ============================================
   APP WRAPPER
   ============================================ */
.app {
  position: relative;
  z-index: 2;  /* above bg-layer z-index:0, ensures taps reach buttons */
  min-height: 100vh;
  min-height: -webkit-fill-available;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  width: 100%;
}

/* ============================================
   PAGES
   ============================================ */
.page {
  display: none !important;
  -webkit-flex-direction: column;
  flex-direction: column;
  min-height: 100vh;
  min-height: -webkit-fill-available;
  -webkit-animation: fadeUp 0.35s ease both;
  animation: fadeUp 0.35s ease both;
}
.page.active {
  display: -webkit-flex !important;
  display: flex !important;
}

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

/* ============================================
   PAGE 1 — SPLASH / START
   ============================================ */
#splashPage {
  -webkit-justify-content: flex-start;
  justify-content: flex-start;
  -webkit-align-items: center;
  align-items: center;
  padding: 0;
  text-align: center;
  min-height: 100vh;
  min-height: -webkit-fill-available;
  -webkit-flex-direction: column;
  flex-direction: column;
}

/* Logo block */
.splash-inner {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-align-items: center;
  align-items: center;
  padding: 48px 32px 16px;
  width: 100%;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

/* Car image — fills the middle, no crop, full width */
.splash-car-wrap {
  width: 100%;
  -webkit-flex: 1;
  flex: 1;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  overflow: hidden;
}
.splash-car-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

/* Bottom CTA — no gradient, no padding tricks */
.splash-bottom {
  width: 100%;
  padding: 20px 32px 48px;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

.splash-logo { width: 150px; margin-bottom: 0; }
.splash-headline {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 8px;
}
.splash-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 0;
}
.splash-footer-text {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 14px;
  margin-bottom: 20px;
  line-height: 1.6;
}

/* ============================================
   PAGE 2 — REGISTER / LOGIN
   ============================================ */
#authPage {
  justify-content: center;
  align-items: center;
  padding: 32px 20px;
  min-height: 100vh;
}
.auth-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 36px 28px;
  width: 100%;
  max-width: 480px;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}
.auth-title {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 6px;
}
.auth-subtitle {
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

/* ============================================
   PAGE 3 — JOURNEY MAP
   ============================================ */
#journeyPage {
  flex-direction: column;
  padding: 0;
}
.journey-topbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 20px 20px 0;
}
.journey-title-row {
  padding: 12px 20px 0;
}
.journey-title-row h1 {
  font-size: 24px;
  font-weight: 700;
}
.journey-body { padding: 16px 20px 100px; }

.progress-box {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 20px;
  backdrop-filter: blur(12px);
}
.progress-box p { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; }
.progress-count { font-size: 36px; font-weight: 700; color: var(--teal); }
.progress-count span { font-size: 18px; color: var(--text-muted); }
.progress-bar {
  width: 100%; height: 6px;
  background: rgba(255,255,255,0.15);
  border-radius: 10px;
  margin-top: 12px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), #6FFFFF);
  border-radius: 10px;
  transition: width 0.5s ease;
  width: 0%;
}

.stations-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 20px;
  backdrop-filter: blur(12px);
}
.stations-card h2 {
  color: var(--teal);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
}
.stations-card > p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 18px;
  line-height: 1.5;
}

/* Map + station pins */
.map-wrap {
  position: relative;
  width: 100%;
  margin-bottom: 20px;
}
.map-wrap img { width: 100%; border-radius: 12px; display: block; }
.map-pin {
  position: absolute;
  font-size: 11px;
  font-weight: 700;
  color: var(--orange);
  text-align: center;
  line-height: 1.2;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}
.map-pin.p1 { top: 78%; left: 40%; transform: translateX(-50%); }
.map-pin.p2 { top: 18%; right: 10%; transform: translateX(0); }
.map-pin.p3 { top: 18%; left: 8%;  transform: translateX(0); }

.station-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.station-tile {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 16px 12px;
  text-align: center;
  transition: all 0.3s ease;
}
.station-tile.completed {
  border-color: var(--teal);
  background: rgba(62,207,207,0.12);
}
.station-tile:last-child:nth-child(odd) {
  grid-column: span 2;
  max-width: 240px;
  margin: 0 auto;
  width: 100%;
}
.station-tile-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.station-tile-name {
  font-size: 13px;
  color: var(--text-white);
  font-weight: 600;
}
.station-tick {
  display: inline-block;
  margin-top: 8px;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid var(--glass-border);
  line-height: 18px;
  font-size: 11px;
}
.station-tile.completed .station-tick {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--navy);
  font-weight: 700;
}

/* Bottom CTA bar — sticky within the page flex column */
.bottom-bar {
  /* Use fixed so it always shows on iOS 12 Safari where sticky is unreliable */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: var(--orange);
  padding: 18px 20px;
  /* Safe area for iPhone X+ notch — no-op on iPad mini 2 */
  padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  text-align: center;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-white);
  z-index: 200;
  letter-spacing: 0.5px;
  -webkit-transition: background 0.2s;
  transition: background 0.2s;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.5);
  /* Tap highlight for iOS */
  -webkit-tap-highlight-color: rgba(0,0,0,0.1);
}
.bottom-bar:active { background: #c8831a; }

/* Journey + congrats pages: pad content so fixed bar doesn't overlap */
#journeyPage {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  min-height: 100vh;
}
.journey-body {
  -webkit-flex: 1;
  flex: 1;
  padding-bottom: 80px;
}

/* ============================================
   PAGE 4 — CONGRATULATIONS
   ============================================ */
#congratsPage {
  flex-direction: column;
  padding: 0;
  min-height: 100vh;
}
.congrats-topbar {
  padding: 12px 16px 0;
}
.congrats-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 28px 24px;
  width: calc(100% - 32px);
  max-width: 448px;
  text-align: center;
  backdrop-filter: blur(16px);
  margin: 8px auto 0;
  flex: 1;
}
/* Congrats bottom bar — sticky inside the flex column */
.congrats-bottom-bar {
  position: sticky !important;
  bottom: 0 !important;
  border-radius: 0 !important;
  margin-top: auto !important;
  width: 100% !important;
  max-width: 480px !important;
  left: auto !important;
  transform: none !important;
}
.congrats-title {
  font-size: 30px;
  font-weight: 700;
  color: var(--orange);
  margin-bottom: 24px;
}
.qr-wrap {
  position: relative;
  display: inline-block;
  width: 200px;
  height: 200px;
  margin: 0 auto 20px;
  padding: 8px;
  background: #fff;
  border-radius: 12px;
}
.qr-wrap img.qr-img {
  width: 184px; height: 184px;
  border-radius: 6px;
  display: block;
  background: #fff;
  transition: opacity 0.5s ease;
}
.qr-wrap .redeemed-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(10,22,40,0.82);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}
.qr-wrap.redeemed .qr-img        { opacity: 0.25; }
.qr-wrap.redeemed .redeemed-overlay { opacity: 1; }
.redeemed-stamp {
  font-size: 22px;
  font-weight: 800;
  color: var(--orange);
  letter-spacing: 3px;
  border: 3px solid var(--orange);
  padding: 8px 18px;
  border-radius: 6px;
  transform: rotate(-12deg);
}
.congrats-body {
  margin-top: 20px;
}
.congrats-body p {
  font-size: 14px;
  color: var(--text-white);
  line-height: 1.7;
  margin-bottom: 8px;
}
.congrats-proceed {
  font-size: 14px;
}
.congrats-uid {
  font-size: 13px;
  color: var(--teal);
  font-weight: 700;
  margin-top: 8px;
}
/* Post-redeem text */
.congrats-ty-title {
  font-size: 20px !important;
  font-weight: 800 !important;
  color: var(--teal) !important;
  margin-bottom: 12px !important;
}
.congrats-ty-sub {
  font-size: 14px !important;
  color: var(--text-muted) !important;
  line-height: 1.7 !important;
}

/* ============================================
   PAGE 5 — TEST DRIVE
   ============================================ */
#testDrivePage {
  flex-direction: column;
  padding: 20px 20px 80px;
}
.testdrive-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 28px 24px;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

/* Test drive success */
.td-success-card {
  text-align: center;
  padding: 20px;
}
.td-success-card h3 {
  color: var(--orange);
  font-size: 22px;
  margin-bottom: 8px;
}
.td-queue-num {
  font-size: 38px;
  font-weight: 800;
  color: var(--teal);
  letter-spacing: 4px;
  margin: 16px 0;
}
.td-qr-wrap {
  position: relative;
  display: inline-block;
  margin: 16px auto;
}
.td-qr-wrap img { width: 180px; height: 180px; border-radius: 8px; background: #fff; display: block; }
.td-qr-wrap .redeemed-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(10,22,40,0.82);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.td-qr-wrap.redeemed .td-qr-wrap img { opacity: 0.25; }
.td-qr-wrap.redeemed .redeemed-overlay { opacity: 1; }

/* ============================================
   SHARED FORM ELEMENTS
   ============================================ */
.section-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  display: block;
}
.divider-label {
  font-size: 18px;
  font-weight: 700;
  color: var(--teal);
  margin: 24px 0 16px;
  text-align: center;
}

.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--teal);
  margin-bottom: 7px;
}
.form-group input,
.form-group select {
  width: 100%;
  padding: 13px 14px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 10px;
  font-size: 14px;
  color: var(--text-white);
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
}
.form-group input:focus,
.form-group select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(62,207,207,0.15);
}
.form-group input::placeholder { color: rgba(255,255,255,0.35); }
.form-group input:disabled,
.form-group select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  border-color: rgba(255,255,255,0.1);
}
/* Custom checkbox — visible tick icon */
.indemnity-group { margin-bottom: 18px; }

.custom-checkbox-label {
  display: flex;
  align-items: flex-start;
  flex-wrap: nowrap;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  line-height: 1;
}
/* Hide native checkbox */
.custom-checkbox-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
/* Custom box */
.custom-checkbox-box {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 6px;
  border: 2px solid var(--input-border);
  background: var(--input-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
  margin-top: 1px;
  flex-shrink: 0;
}
/* Tick SVG — hidden by default */
.custom-checkbox-tick {
  width: 12px;
  height: 10px;
  opacity: 0;
  transition: opacity 0.15s ease;
}
/* When checked */
.custom-checkbox-label input[type="checkbox"]:checked ~ .custom-checkbox-box {
  background: var(--teal);
  border-color: var(--teal);
}
.custom-checkbox-label input[type="checkbox"]:checked ~ .custom-checkbox-box .custom-checkbox-tick {
  opacity: 1;
}
.custom-checkbox-text {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  font-weight: 400;
  flex: 1;
  min-width: 0;
}
.link-teal {
  color: var(--teal);
  text-decoration: underline;
}
.link-teal:hover { color: #6FFFFF; }
.form-group select option { background: var(--navy-mid); color: var(--text-white); }

.slot-unavailable { color: var(--orange) !important; font-style: italic; }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: block;
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  -webkit-transition: all 0.2s ease;
  transition: all 0.2s ease;
  letter-spacing: 0.3px;
  font-family: inherit;
  /* iOS: remove grey tap flash, ensure tappable */
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  appearance: none;
  touch-action: manipulation;
}
.btn-teal { background: var(--teal); color: var(--navy); }
.btn-teal:hover { background: var(--teal-dark); transform: translateY(-1px); }
.btn-teal:active { transform: translateY(0); }
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--teal);
  color: var(--teal);
}
.btn-orange { background: var(--orange); color: #fff; }
.btn-orange:hover { background: #e0941a; }
.btn-sm {
  display: inline-block;
  width: auto;
  padding: 8px 18px;
  font-size: 13px;
  border-radius: 8px;
}

.btn-logout-inline {
  background: transparent;
  border: 1.5px solid rgba(62,207,207,0.4);
  border-radius: 8px;
  color: var(--teal);
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}
.btn-logout-inline:hover { background: rgba(62,207,207,0.1); }
.btn-back-icon {
  background: none;
  border: none;
  color: var(--teal);
  font-size: 22px;
  cursor: pointer;
  padding: 4px 8px 4px 0;
  line-height: 1;
}

/* ============================================
   LOADER
   ============================================ */
#loader {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(10,22,40,0.75);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
}
.spinner {
  width: 44px; height: 44px;
  border: 3px solid rgba(62,207,207,0.2);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader-text { color: var(--text-muted); font-size: 14px; margin-top: 14px; }

/* ============================================
   ALERTS
   ============================================ */
.alert-container {
  position: fixed;
  top: 16px; right: 16px;
  z-index: 10000;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.alert {
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  animation: slideIn 0.3s ease;
  backdrop-filter: blur(10px);
}
@keyframes slideIn {
  from { transform: translateX(360px); opacity: 0; }
  to   { transform: translateX(0);     opacity: 1; }
}
.alert-success { background: rgba(62,207,207,0.15); border: 1px solid var(--teal); color: var(--teal); }
.alert-error   { background: rgba(255,92,92,0.15);  border: 1px solid var(--error); color: var(--error); }
.alert-close   { cursor: pointer; font-size: 18px; opacity: 0.7; flex-shrink: 0; }
.alert-close:hover { opacity: 1; }

/* ============================================
   TIMESLOT GRID
   ============================================ */
.slot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}
.slot-btn {
  padding: 12px 8px;
  border-radius: 10px;
  border: 1.5px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text-white);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  font-family: inherit;
}
.slot-btn:hover:not(.full) { border-color: var(--teal); background: rgba(62,207,207,0.1); }
.slot-btn.selected { border-color: var(--teal); background: rgba(62,207,207,0.2); color: var(--teal); }
.slot-btn.full { opacity: 0.45; cursor: not-allowed; border-color: var(--orange); color: var(--orange); }
.slot-count { font-size: 11px; font-weight: 400; color: var(--text-muted); margin-top: 2px; }
.slot-btn.full .slot-count { color: var(--orange); }

/* ============================================
   QR STATION ROW (Journey page — per QR)
   ============================================ */
.station-qr-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}
.station-qr-item {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: background 0.2s;
}
.station-qr-item:hover { background: rgba(255,255,255,0.08); }
.station-qr-item.completed { border-color: var(--teal); background: rgba(62,207,207,0.06); }
.station-qr-thumb {
  width: 72px; height: 72px;
  flex-shrink: 0;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  padding: 4px;
}
.station-qr-thumb img { width: 100%; height: 100%; display: block; border-radius: 4px; }
.station-qr-info { flex: 1; }
.station-qr-info h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}
.station-qr-info p { font-size: 12px; color: var(--text-muted); }
.station-qr-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}
.badge-done { background: var(--teal); color: var(--navy); }
.badge-pending { background: rgba(255,255,255,0.1); color: var(--text-muted); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (min-width: 480px) {
  #splashPage { padding: 80px 48px 64px; }
  .auth-card, .testdrive-card { padding: 44px 40px; }
}
@media (max-width: 360px) {
  .splash-headline { font-size: 26px; }
  .station-tiles { grid-template-columns: 1fr; }
  .station-tile:last-child:nth-child(odd) { grid-column: span 1; max-width: 100%; }
}

/* ============================================
   DESKTOP CENTERING OVERRIDES
   ============================================ */
#loader {
  /* Already fixed; confirm max-width constraint */
}
.alert-container {
  max-width: 440px;
  right: auto;
  left: 50%;
  transform: translateX(calc(-50% + 160px));
}
@media (max-width: 480px) {
  .alert-container {
    left: auto;
    right: 16px;
    transform: none;
    max-width: calc(100vw - 32px);
  }
}

/* ============================================
   FILE UPLOAD WITH PREVIEW
   ============================================ */
.file-upload-zone {
  border: 2px dashed var(--input-border);
  border-radius: 12px;
  background: var(--input-bg);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  overflow: hidden;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.file-upload-zone:hover {
  border-color: var(--teal);
  background: rgba(62,207,207,0.06);
}
.file-upload-zone.has-file {
  border-color: var(--teal);
  border-style: solid;
}
.file-upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 16px;
  text-align: center;
}
.file-upload-icon  { font-size: 28px; line-height: 1; }
.file-upload-text  { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.file-upload-text small { font-size: 11px; opacity: 0.7; }

/* Preview area */
.file-preview-wrap {
  position: relative;
  width: 100%;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.file-preview-img {
  max-height: 140px;
  max-width: 100%;
  border-radius: 8px;
  object-fit: contain;
  display: block;
  border: 1px solid rgba(62,207,207,0.2);
}
.file-preview-pdf {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 0;
}
.file-preview-name {
  font-size: 12px;
  color: var(--teal);
  font-weight: 600;
  word-break: break-all;
  text-align: center;
  max-width: 200px;
}
.file-remove-btn {
  background: rgba(255,92,92,0.15);
  border: 1px solid var(--error);
  color: var(--error);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}
.file-remove-btn:hover { background: rgba(255,92,92,0.28); }

/* ============================================
   E-SIGNATURE PAD
   ============================================ */
.sig-container {
  position: relative;
  border: 2px solid var(--input-border);
  border-radius: 12px;
  background: rgba(255,255,255,0.96);
  overflow: hidden;
}
.sig-canvas {
  display: block;
  width: 100%;
  height: 150px;
  cursor: crosshair;
  touch-action: none;
}
.sig-clear-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0,0,0,0.12);
  border: none;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}
.sig-clear-btn:hover { background: rgba(0,0,0,0.22); }
.sig-container.has-sig { border-color: var(--teal); }

/* TD greeting */
.td-greeting {
  font-size: 16px;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 20px;
  padding: 14px 16px;
  background: rgba(62,207,207,0.08);
  border: 1px solid rgba(62,207,207,0.2);
  border-radius: 10px;
}

/* Congrats page reuses journey-topbar, journey-title-row and progress-box classes */

/* Registration privacy note */
.reg-privacy-note {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 14px;
  line-height: 1.5;
}

/* Congrats page — extra spacing below title */
#congratsPage .journey-title-row {
  padding-bottom: 14px;
}
