:root {
  --scytales-orange: #EB6823;
  --scytales-orange-hover: #d45a1c;
  --scytales-orange-light: #f3c1a6;
  --scytales-dark: #1a1a1a;
  --scytales-text: #333333;
  --scytales-text-light: #666666;
  --scytales-bg: #fefefe;
  --scytales-card-bg: #ffffff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  min-height: 100%;
  width: 100%;
  font-family: 'Roboto Condensed', sans-serif;
  background-color: var(--scytales-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  touch-action: manipulation;
}

body {
  opacity: 0;
}

button {
  border: none;
  -webkit-tap-highlight-color: transparent;
}

/* Welcome Screen */
#welcome-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #fff8f4 0%, #fef0e8 30%, #fde4d6 60%, var(--scytales-orange-light) 100%);
  background-attachment: fixed;
}

/* Background decorative shapes */
.welcome-bg-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.12;
  pointer-events: none;
}

.welcome-bg-shape--1 {
  width: 500px;
  height: 500px;
  background: var(--scytales-orange);
  top: -200px;
  right: -100px;
  animation: float-shape 20s ease-in-out infinite;
}

.welcome-bg-shape--2 {
  width: 300px;
  height: 300px;
  background: var(--scytales-orange);
  bottom: -100px;
  left: -80px;
  animation: float-shape 15s ease-in-out infinite reverse;
}

.welcome-bg-shape--3 {
  width: 200px;
  height: 200px;
  background: var(--scytales-orange-light);
  top: 50%;
  left: 60%;
  animation: float-shape 18s ease-in-out infinite 3s;
}

@keyframes float-shape {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(20px, -20px) scale(1.05); }
  66% { transform: translate(-15px, 15px) scale(0.95); }
}

/* Content container */
.welcome-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding: 40px 24px;
  max-width: 640px;
  width: 100%;
  z-index: 1;
  animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Logo */
.welcome-logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.welcome-logo {
  max-height: 48px;
  width: auto;
  height: auto;
  filter: brightness(0) saturate(100%);
}

/* Text */
.welcome-text {
  text-align: center;
}

.welcome-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 32px;
  font-weight: 800;
  color: var(--scytales-dark);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.welcome-subtitle {
  font-size: 16px;
  font-weight: 400;
  color: var(--scytales-text-light);
  line-height: 1.5;
  max-width: 360px;
  margin: 0 auto;
}

/* Steps card */
.welcome-card {
  background: var(--scytales-card-bg);
  border-radius: 16px;
  padding: 24px 28px;
  width: 100%;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.04),
    0 4px 12px rgba(235, 104, 35, 0.08);
  border: 1px solid rgba(235, 104, 35, 0.08);
}

.welcome-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.welcome-step {
  display: flex;
  align-items: center;
  gap: 10px;
}

.welcome-step-divider {
  display: none;
}

.welcome-step-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #fff3ec 0%, #ffe8d9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--scytales-orange);
}

.welcome-step-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.welcome-step-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--scytales-orange);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.welcome-step-desc {
  font-size: 14px;
  font-weight: 500;
  color: var(--scytales-dark);
}

.welcome-step-divider {
  width: 1px;
  height: 36px;
  background: rgba(235, 104, 35, 0.15);
  flex-shrink: 0;
}

/* CTA Button */
.start-onboarding-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 320px;
  height: 56px;
  background: linear-gradient(135deg, var(--scytales-orange) 0%, #d45a1c 100%);
  color: #ffffff;
  font-family: 'Montserrat', sans-serif;
  font-size: 18px;
  font-weight: 700;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  outline: none;
  transition: all 0.3s ease;
  box-shadow:
    0 4px 14px rgba(235, 104, 35, 0.35),
    0 1px 3px rgba(235, 104, 35, 0.2);
  position: relative;
  overflow: hidden;
}

.start-onboarding-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left 0.5s ease;
}

.start-onboarding-btn:hover:enabled::before {
  left: 100%;
}

.start-onboarding-btn:hover:enabled {
  transform: translateY(-2px);
  box-shadow:
    0 6px 20px rgba(235, 104, 35, 0.4),
    0 2px 6px rgba(235, 104, 35, 0.2);
}

.start-onboarding-btn:active:enabled {
  transform: translateY(0);
  box-shadow:
    0 2px 8px rgba(235, 104, 35, 0.3);
}

.start-onboarding-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.start-onboarding-btn-text {
  color: #ffffff;
}

.start-onboarding-btn-arrow {
  transition: transform 0.3s ease;
  stroke: #ffffff;
}

.start-onboarding-btn:hover:enabled .start-onboarding-btn-arrow {
  transform: translateX(4px);
}

/* Status */
.welcome-status {
  font-size: 14px;
  font-weight: 400;
  color: var(--scytales-text-light);
  padding: 8px 20px;
  background: rgba(235, 104, 35, 0.06);
  border-radius: 8px;
  min-width: 200px;
  text-align: center;
}

/* ========================================
   WIZARD PROGRESS BAR
   ======================================== */
#wizard-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 16777232;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(235, 104, 35, 0.1);
  padding: 16px 20px;
}

.wizard-progress-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 700px;
  margin: 0 auto;
  gap: 0;
}

.wizard-progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.wizard-progress-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 700;
  border: 2px solid #ddd;
  color: #999;
  background: #fff;
  transition: all 0.3s ease;
}

.wizard-progress-label {
  font-size: 11px;
  font-weight: 500;
  color: #999;
  text-align: center;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.wizard-progress-connector {
  flex: 1;
  height: 2px;
  background: #ddd;
  margin: 0 8px;
  margin-bottom: 20px;
  transition: background 0.3s ease;
  min-width: 24px;
  max-width: 60px;
}

/* Active step */
.wizard-progress-step--active .wizard-progress-circle {
  border-color: var(--scytales-orange);
  color: #fff;
  background: var(--scytales-orange);
  box-shadow: 0 2px 8px rgba(235, 104, 35, 0.3);
}

.wizard-progress-step--active .wizard-progress-label {
  color: var(--scytales-orange);
  font-weight: 600;
}

/* Completed step */
.wizard-progress-step--completed .wizard-progress-circle {
  border-color: var(--scytales-orange);
  color: #fff;
  background: var(--scytales-orange);
}

.wizard-progress-step--completed .wizard-progress-label {
  color: var(--scytales-orange);
}

.wizard-progress-connector--completed {
  background: var(--scytales-orange);
}

/* Push FaceTec SDK UI below the wizard progress bar and apply Scytales theming */
#DOM_FT_PRIMARY_TOPLEVEL_mainContainer {
  top: 86px !important;
  height: calc(100vh - 86px) !important;
}

#DOM_FT_overlayContainer {
  background: linear-gradient(160deg, #fff8f4 0%, #fef0e8 30%, #fde4d6 60%, var(--scytales-orange-light) 100%) !important;
}

/* ========================================
   WIZARD STEP SCREENS (shared base)
   ======================================== */
.wizard-step-screen {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  background: linear-gradient(160deg, #fff8f4 0%, #fef0e8 30%, #fde4d6 60%, var(--scytales-orange-light) 100%);
  background-attachment: fixed;
}

.step-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 90px 24px 40px;
  max-width: 480px;
  width: 100%;
  z-index: 1;
  animation: fadeInUp 0.6s ease-out;
}

.step-content--wide {
  max-width: 860px;
}

/* Step navigation buttons */
.step-nav-buttons {
  display: flex;
  gap: 12px;
  width: 100%;
  max-width: 400px;
  justify-content: center;
}

.step-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 28px;
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  outline: none;
  transition: all 0.3s ease;
}

.step-nav-btn--primary {
  background: linear-gradient(135deg, var(--scytales-orange) 0%, #d45a1c 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(235, 104, 35, 0.35);
  flex: 1;
}

.step-nav-btn--primary:hover:enabled {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(235, 104, 35, 0.4);
}

.step-nav-btn--primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.step-nav-btn--secondary {
  background: rgba(235, 104, 35, 0.08);
  color: var(--scytales-orange);
  border: 1px solid rgba(235, 104, 35, 0.2);
}

.step-nav-btn--secondary:hover {
  background: rgba(235, 104, 35, 0.15);
}

/* ========================================
   STEP 1: PORTRAIT PHOTO
   ======================================== */
.portrait-layout {
  display: flex;
  gap: 24px;
  width: 100%;
}

/* Tips card */
.portrait-tips-card {
  flex: 1;
  background: var(--scytales-card-bg);
  border-radius: 16px;
  padding: 24px;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.04),
    0 4px 12px rgba(235, 104, 35, 0.08);
  border: 1px solid rgba(235, 104, 35, 0.08);
}

.portrait-tips-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--scytales-dark);
  margin-bottom: 16px;
}

.portrait-tips-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.portrait-tip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  font-weight: 400;
  color: var(--scytales-text);
  line-height: 1.4;
}

.portrait-tip-icon {
  flex-shrink: 0;
  color: var(--scytales-orange);
  margin-top: 1px;
}

/* Capture card (right column) */
.portrait-capture-card {
  flex: 1;
  background: var(--scytales-card-bg);
  border-radius: 16px;
  padding: 24px;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.04),
    0 4px 12px rgba(235, 104, 35, 0.08);
  border: 1px solid rgba(235, 104, 35, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Mode selection */
.portrait-mode-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--scytales-dark);
  margin-bottom: 16px;
  text-align: center;
}

.portrait-mode-options {
  display: flex;
  gap: 12px;
  width: 100%;
}

.portrait-mode-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 12px;
  background: #fff;
  border: 2px solid rgba(235, 104, 35, 0.15);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--scytales-orange);
}

.portrait-mode-btn:hover {
  border-color: var(--scytales-orange);
  background: rgba(235, 104, 35, 0.04);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(235, 104, 35, 0.15);
}

.portrait-mode-btn-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--scytales-dark);
}

.portrait-mode-btn-desc {
  font-size: 11px;
  color: var(--scytales-text-light);
  text-align: center;
  line-height: 1.3;
}

/* Upload dropzone */
.portrait-dropzone {
  width: 100%;
  min-height: 200px;
  border: 2px dashed rgba(235, 104, 35, 0.3);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.portrait-dropzone--dragover {
  border-color: var(--scytales-orange);
  background: rgba(235, 104, 35, 0.06);
}

.portrait-dropzone-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px;
  color: var(--scytales-text-light);
}

.portrait-dropzone-text {
  font-size: 14px;
  font-weight: 500;
}

.portrait-dropzone-or {
  font-size: 12px;
  color: #bbb;
}

.portrait-browse-btn {
  display: inline-block;
  padding: 8px 20px;
  background: rgba(235, 104, 35, 0.1);
  color: var(--scytales-orange);
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.portrait-browse-btn:hover {
  background: rgba(235, 104, 35, 0.2);
}

/* Portrait preview image */
.portrait-preview-img {
  max-width: 100%;
  max-height: 280px;
  border-radius: 10px;
  object-fit: contain;
}

/* Portrait error */
.portrait-error {
  font-size: 13px;
  color: #d32f2f;
  margin-top: 8px;
  text-align: center;
}

/* Portrait action buttons */
.portrait-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  justify-content: center;
}

.portrait-change-btn {
  display: inline-block;
  padding: 8px 20px;
  background: rgba(235, 104, 35, 0.1);
  color: var(--scytales-orange);
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
  margin-top: 12px;
}

.portrait-change-btn:hover {
  background: rgba(235, 104, 35, 0.2);
}

.portrait-back-to-mode-btn {
  display: inline-block;
  padding: 6px 16px;
  background: none;
  color: var(--scytales-text-light);
  font-size: 12px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  margin-top: 12px;
  text-decoration: underline;
}

.portrait-back-to-mode-btn:hover {
  color: var(--scytales-orange);
}

/* Portrait final preview */
.portrait-final-preview-container {
  display: flex;
  justify-content: center;
  padding: 16px;
  background: #f9f9f9;
  border-radius: 14px;
  border: 2px solid rgba(235, 104, 35, 0.12);
}

/* ========================================
   STEP 1: CAMERA MODE
   ======================================== */
.camera-container {
  position: relative;
  width: 100%;
  max-width: 320px;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  margin: 0 auto;
}

.camera-container video {
  width: 100%;
  display: block;
  transform: scaleX(-1);
}

.camera-face-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.camera-face-oval {
  width: 100%;
  height: 100%;
}

.camera-instruction {
  text-align: center;
  font-size: 13px;
  color: var(--scytales-text-light);
  margin-top: 12px;
}

.camera-capture-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 16px auto 0;
  padding: 12px 32px;
  background: linear-gradient(135deg, var(--scytales-orange) 0%, #d45a1c 100%);
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(235, 104, 35, 0.35);
  transition: all 0.2s ease;
}

.camera-capture-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(235, 104, 35, 0.4);
}

.camera-preview-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  justify-content: center;
}

/* Camera processing overlay */
.camera-processing-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 14px;
  z-index: 10;
}

.camera-processing-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--scytales-orange);
  border-radius: 50%;
  animation: processing-spin 0.8s linear infinite;
}

@keyframes processing-spin {
  to { transform: rotate(360deg); }
}

.camera-processing-text {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  text-align: center;
}

/* Photo choice UI */
#camera-preview-view > #camera-processing-overlay {
  position: relative;
  min-height: 280px;
  border-radius: 14px;
  max-width: 320px;
  margin: 0 auto;
}

/* Captured photo preview */
#camera-captured-preview {
  text-align: center;
}

.camera-captured-img {
  width: 100%;
  max-width: 280px;
  border-radius: 14px;
  object-fit: contain;
  max-height: 360px;
}

.remove-bg-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 8px 18px;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--scytales-text);
  background: transparent;
  border: 1.5px solid rgba(235, 104, 35, 0.3);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.remove-bg-btn:hover:not(:disabled) {
  border-color: var(--scytales-orange);
  color: var(--scytales-orange);
  background: rgba(235, 104, 35, 0.04);
}

.remove-bg-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.camera-choice-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--scytales-dark);
  text-align: center;
  margin-bottom: 16px;
}

.camera-choice-options {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.camera-choice-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 2px solid rgba(235, 104, 35, 0.15);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #fff;
  max-width: 180px;
}

.camera-choice-option:hover {
  border-color: rgba(235, 104, 35, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(235, 104, 35, 0.12);
}

.camera-choice-option--selected {
  border-color: var(--scytales-orange);
  box-shadow: 0 4px 16px rgba(235, 104, 35, 0.25);
}

.camera-choice-option img {
  width: 140px;
  height: auto;
  border-radius: 8px;
  object-fit: contain;
  max-height: 186px;
}

.camera-choice-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--scytales-text);
}

/* ========================================
   STEP 2: FACETEC VERIFICATION
   ======================================== */
.facetec-info-card {
  background: var(--scytales-card-bg);
  border-radius: 16px;
  padding: 24px;
  width: 100%;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.04),
    0 4px 12px rgba(235, 104, 35, 0.08);
  border: 1px solid rgba(235, 104, 35, 0.08);
}

.facetec-info-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--scytales-dark);
  margin-bottom: 14px;
}

.facetec-info-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0;
}

.facetec-info-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--scytales-text);
  line-height: 1.4;
}

.facetec-info-list li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--scytales-orange);
  flex-shrink: 0;
}

.facetec-step-status {
  font-size: 14px;
  color: #d32f2f;
  padding: 12px 20px;
  background: rgba(211, 47, 47, 0.08);
  border-radius: 8px;
  border: 1px solid rgba(211, 47, 47, 0.2);
  width: 100%;
  text-align: center;
}

/* ========================================
   STEP 3: APPLICATION FORM
   ======================================== */
.form-section {
  background: var(--scytales-card-bg);
  border-radius: 16px;
  padding: 24px;
  width: 100%;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.04),
    0 4px 12px rgba(235, 104, 35, 0.08);
  border: 1px solid rgba(235, 104, 35, 0.08);
  margin-bottom: 16px;
}

.form-section-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--scytales-dark);
  margin-bottom: 18px;
  padding: 0;
}

.form-field {
  margin-bottom: 16px;
}

.form-field:last-child {
  margin-bottom: 0;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--scytales-text);
  margin-bottom: 6px;
}

.form-required {
  color: #d32f2f;
}

.form-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 15px;
  color: var(--scytales-dark);
  background: #f8f8f8;
  border: 1.5px solid #e0e0e0;
  border-radius: 10px;
  outline: none;
  transition: all 0.2s ease;
}

.form-input:focus {
  border-color: var(--scytales-orange);
  box-shadow: 0 0 0 3px rgba(235, 104, 35, 0.12);
  background: #fff;
}

.form-input--rtl {
  direction: rtl;
  text-align: right;
}

.form-input--error {
  border-color: #d32f2f;
  box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
}

.form-field-error {
  font-size: 12px;
  color: #d32f2f;
  margin-top: 4px;
}

#application-form {
  width: 100%;
}

/* ========================================
   STEP 4: CONFIRMATION
   ======================================== */
.congrats-checkmark {
  animation: scaleIn 0.6s ease-out 0.3s both;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.confirmation-info-card {
  background: var(--scytales-card-bg);
  border-radius: 16px;
  padding: 28px 24px;
  width: 100%;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.04),
    0 4px 12px rgba(235, 104, 35, 0.08);
  border: 1px solid rgba(235, 104, 35, 0.08);
  text-align: center;
}

.confirmation-email-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
}

.confirmation-email-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, #fff3ec 0%, #ffe8d9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--scytales-orange);
}

.confirmation-message {
  font-size: 15px;
  color: var(--scytales-text);
  line-height: 1.6;
  margin: 0;
  text-align: left;
}

.confirmation-status-link {
  display: inline-block;
  padding: 12px 28px;
  background: linear-gradient(135deg, var(--scytales-orange) 0%, #d45a1c 100%);
  color: #ffffff;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 700;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px rgba(235, 104, 35, 0.35);
}

.confirmation-status-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(235, 104, 35, 0.4);
}

/* Theme transition overlay */
#theme-transition-overlay {
  height: 100%;
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  display: none;
  pointer-events: none;
}

#theme-transition-overlay-img {
  display: block;
  position: absolute;
}

/* Keep wrapping-box-container for SDK compatibility */
.wrapping-box-container {
  display: none;
  position: fixed;
  margin: 0 auto;
  width: calc(100% - 20px);
  height: auto;
  color: #fff;
  padding: 10px;
  z-index: 1;
  opacity: 0;
}

.display-none {
  display: none;
}

/* SDK animation styles (required) */
.pseudo-fullscreen-activity-indicator-svg {
  animation: rotate 2s linear infinite;
}

.pseudo-fullscreen-activity-indicator-svg .path {
  stroke: rgb(43, 43, 43);
  stroke-width: 4;
  stroke-linecap: round;
  fill: none;
  animation: stretch-stroke 1.5s ease-in-out infinite;
}

.pseudo-fullscreen-activity-indicator-svg__offwhite {
  animation: rotate 2s linear infinite;
}

.pseudo-fullscreen-activity-indicator-svg__offwhite .path {
  stroke: rgb(238, 246, 248);
  stroke-width: 4;
  stroke-linecap: round;
  fill: none;
  animation: stretch-stroke 1.5s ease-in-out infinite;
}

@keyframes rotate {
  100% { transform: rotate(360deg); }
}

@keyframes stretch-stroke {
  0% { stroke-dasharray: 1, 150; stroke-dashoffset: 0; }
  50% { stroke-dasharray: 90, 150; stroke-dashoffset: -35; }
  100% { stroke-dasharray: 90, 150; stroke-dashoffset: -135; }
}

.pseudo-fullscreen-success-svg,
.pseudo-fullscreen-unsuccess-svg,
.pseudo-fullscreen-success-svg__offwhite,
.pseudo-fullscreen-unsuccess-svg__offwhite {
  border-radius: 50%;
  transform: translateZ(0);
}

.pseudo-fullscreen-success-svg .circlePath,
.pseudo-fullscreen-unsuccess-svg .circlePath,
.pseudo-fullscreen-success-svg__offwhite .circlePath,
.pseudo-fullscreen-unsuccess-svg__offwhite .circlePath {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  animation: reveal-stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards, pseudo-fullscreen-circle-fill .3s ease-in-out .3s forwards;
}

.pseudo-fullscreen-success-svg .circlePath,
.pseudo-fullscreen-unsuccess-svg .circlePath {
  stroke: rgb(43, 43, 43);
}

.pseudo-fullscreen-success-svg__offwhite .circlePath,
.pseudo-fullscreen-unsuccess-svg__offwhite .circlePath {
  stroke: rgb(238, 246, 248);
}

.pseudo-fullscreen-success-svg .checkmarkPath,
.pseudo-fullscreen-unsuccess-svg .crossPath1,
.pseudo-fullscreen-unsuccess-svg .crossPath2,
.pseudo-fullscreen-success-svg__offwhite .checkmarkPath,
.pseudo-fullscreen-unsuccess-svg__offwhite .crossPath1,
.pseudo-fullscreen-unsuccess-svg__offwhite .crossPath2 {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.pseudo-fullscreen-success-svg .checkmarkPath,
.pseudo-fullscreen-success-svg__offwhite .checkmarkPath {
  stroke: rgb(59, 195, 113);
}

.pseudo-fullscreen-unsuccess-svg .crossPath1,
.pseudo-fullscreen-unsuccess-svg .crossPath2,
.pseudo-fullscreen-unsuccess-svg__offwhite .crossPath1,
.pseudo-fullscreen-unsuccess-svg__offwhite .crossPath2 {
  stroke: rgb(195, 72, 59);
}

.pseudo-fullscreen-success-svg .checkmarkPath,
.pseudo-fullscreen-success-svg__offwhite .checkmarkPath {
  animation: reveal-stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.6s forwards;
}

.pseudo-fullscreen-unsuccess-svg .crossPath1,
.pseudo-fullscreen-unsuccess-svg__offwhite .crossPath1 {
  animation: reveal-stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.6s forwards;
}

.pseudo-fullscreen-unsuccess-svg .crossPath2,
.pseudo-fullscreen-unsuccess-svg__offwhite .crossPath2 {
  animation: reveal-stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) 0.6s forwards;
}

@keyframes reveal-stroke {
  100% { stroke-dashoffset: 0; }
}

@keyframes pseudo-fullscreen-circle-fill {
  100% { stroke-width: 52; }
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
  .portrait-layout {
    flex-direction: column;
  }

  .step-content--wide {
    max-width: 480px;
  }

  .portrait-mode-options {
    flex-direction: column;
  }

  .welcome-steps {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .welcome-title {
    font-size: 28px;
  }
}

@media (max-width: 520px) {
  .welcome-content,
  .step-content {
    padding: 80px 16px 32px;
    gap: 18px;
  }

  .welcome-content {
    padding-top: 24px;
  }

  .welcome-title {
    font-size: 24px;
  }

  .welcome-subtitle {
    font-size: 14px;
  }

  .welcome-card {
    padding: 18px 16px;
  }

  .welcome-steps {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .welcome-step {
    gap: 12px;
  }

  .welcome-step-icon {
    width: 34px;
    height: 34px;
    min-width: 34px;
  }

  .welcome-step-icon svg {
    width: 18px;
    height: 18px;
  }

  .welcome-step-desc {
    font-size: 13px;
  }

  .welcome-step-label {
    font-size: 10px;
  }

  .start-onboarding-btn {
    height: 50px;
    font-size: 16px;
    max-width: 100%;
  }

  .congrats-checkmark svg {
    width: 48px;
    height: 48px;
  }

  /* Progress bar responsive */
  #wizard-progress {
    padding: 12px 12px;
  }

  .wizard-progress-circle {
    width: 26px;
    height: 26px;
    font-size: 11px;
  }

  .wizard-progress-label {
    font-size: 9px;
  }

  .wizard-progress-connector {
    margin: 0 4px;
    margin-bottom: 18px;
    min-width: 16px;
  }

  /* Form responsive */
  .form-section {
    padding: 18px 16px;
  }

  .portrait-tips-card,
  .portrait-capture-card {
    padding: 18px 16px;
  }

  .step-nav-buttons {
    flex-direction: column;
    max-width: 100%;
  }

  .step-nav-btn {
    width: 100%;
  }

  /* Background shapes smaller on mobile */
  .welcome-bg-shape--1 {
    width: 300px;
    height: 300px;
    top: -150px;
    right: -80px;
  }

  .welcome-bg-shape--2 {
    width: 200px;
    height: 200px;
  }

  .welcome-bg-shape--3 {
    width: 120px;
    height: 120px;
  }

  .camera-choice-options {
    gap: 10px;
  }

  .camera-choice-option {
    padding: 8px;
    max-width: 150px;
  }

  .camera-choice-option img {
    width: 120px;
    max-height: 160px;
  }
}

@media (max-width: 360px) {
  .welcome-title {
    font-size: 20px;
  }

  .welcome-subtitle {
    font-size: 13px;
  }

  .wizard-progress-label {
    font-size: 8px;
  }

  .wizard-progress-circle {
    width: 22px;
    height: 22px;
    font-size: 10px;
    border-width: 1.5px;
  }

  .wizard-progress-connector {
    min-width: 10px;
    margin-bottom: 16px;
  }
}

@media (max-height: 600px) {
  .welcome-content {
    gap: 16px;
    padding: 20px 16px;
  }

  .welcome-card {
    padding: 16px 14px;
  }

  .welcome-bg-shape--1 {
    width: 300px;
    height: 300px;
  }
}
