/* rider-register.css */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #5B21B6;
  --primary-light: #7C3AED;
  --primary-dark: #4C1D95;
  --secondary: #F97316;
  --secondary-light: #FB923C;
  --text-dark: #111827;
  --text-muted: #6B7280;
  --text-light: #9CA3AF;
  --white: #FFFFFF;
  --bg-page: #F8FAFC;
  --success: #10B981;
  --warning: #F59E0B;
  --error: #DC2626;
  --border-light: #E5E7EB;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --transition: all 0.25s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg-page);
  color: var(--text-dark);
  overflow-x: hidden;
}

.app-container {
  max-width: 500px;
  margin: 0 auto;
  background: var(--bg-page);
  min-height: 100vh;
}

/* Header */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--white);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 10;
}

.page-header h1 {
  font-size: 1rem;
  font-weight: 700;
}

.back-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  font-size: 1.2rem;
  color: var(--text-dark);
  cursor: pointer;
  border-radius: 50%;
  transition: var(--transition);
}

.back-btn:hover {
  background: var(--bg-page);
}

.step-indicator {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Progress Bar */
.progress-container {
  padding: 16px 20px 8px;
  position: relative;
}

.progress-bar {
  width: 100%;
  height: 4px;
  background: var(--border-light);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 4px;
  transition: width 0.5s ease;
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  padding: 0 4px;
}

.progress-step {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--border-light);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
  transition: var(--transition);
}

.progress-step.active {
  background: var(--primary);
  color: var(--white);
}

.progress-step.completed {
  background: var(--success);
  color: var(--white);
}

/* Content Container */
.content-container {
  padding: 20px 20px 40px;
}

/* Step Content */
.step-content {
  display: none;
  animation: fadeSlide 0.4s ease;
}

.step-content.active {
  display: block;
}

@keyframes fadeSlide {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.step-header {
  margin-bottom: 24px;
}

.step-header h2 {
  font-size: 1.3rem;
  font-weight: 800;
}

.step-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Form Groups */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.required {
  color: var(--error);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
  background: var(--white);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(91, 33, 182, 0.1);
}

.error-message {
  font-size: 0.7rem;
  color: var(--error);
  min-height: 20px;
  margin-top: 4px;
}

/* Phone Input */
.phone-input-wrapper {
  display: flex;
  gap: 8px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--white);
  transition: var(--transition);
  overflow: hidden;
}

.phone-input-wrapper:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(91, 33, 182, 0.1);
}

.country-code {
  display: flex;
  align-items: center;
  padding: 0 14px;
  background: var(--bg-page);
  border-right: 1px solid var(--border-light);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-dark);
}

.phone-input-wrapper input {
  flex: 1;
  padding: 12px 14px;
  border: none;
  outline: none;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  background: transparent;
}

/* OTP Section */
.otp-section {
  background: var(--bg-page);
  border-radius: var(--radius-sm);
  padding: 16px;
  border: 1px solid var(--border-light);
}

.otp-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.otp-status.verified {
  color: var(--success);
}

.otp-status.verified i {
  color: var(--success);
}

.otp-input-wrapper {
  display: flex;
  gap: 10px;
}

.otp-input-wrapper input {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  outline: none;
  text-align: center;
  letter-spacing: 6px;
}

.otp-input-wrapper input:focus {
  border-color: var(--primary);
}

.verify-otp-btn {
  padding: 10px 20px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.verify-otp-btn:hover {
  background: var(--primary-light);
}

.resend-otp-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 0.75rem;
  cursor: pointer;
  margin-top: 8px;
}

.send-otp-btn {
  width: 100%;
  padding: 12px;
  background: var(--secondary);
  color: var(--white);
  border: none;
  border-radius: 60px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 8px;
}

.send-otp-btn:hover {
  background: var(--secondary-light);
}

/* Upload Groups */
.upload-group .upload-zone {
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-sm);
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--white);
  position: relative;
}

.upload-zone:hover {
  border-color: var(--primary);
  background: rgba(91, 33, 182, 0.02);
}

.upload-zone i {
  font-size: 2rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 8px;
}

.upload-zone p {
  font-size: 0.85rem;
  font-weight: 500;
}

.upload-zone span {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.upload-zone input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.preview-container {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-top: 8px;
}

.preview-container img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

.remove-image {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.remove-image:hover {
  background: var(--error);
}

/* Step Navigation */
.step-navigation {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.next-btn, .back-btn-step, .submit-btn {
  padding: 12px 24px;
  border-radius: 60px;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.next-btn, .submit-btn {
  flex: 1;
  background: var(--primary);
  color: var(--white);
  border: none;
  justify-content: center;
}

.next-btn:hover:not(:disabled),
.submit-btn:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
}

.next-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.back-btn-step {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-light);
}

.back-btn-step:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Terms */
.terms-section {
  margin: 16px 0;
}

.checkbox-group {
  margin-bottom: 12px;
}

.checkbox-container {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  position: relative;
  user-select: none;
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  height: 0;
  width: 0;
}

.checkmark {
  width: 20px;
  height: 20px;
  background: var(--white);
  border: 2px solid var(--border-light);
  border-radius: 4px;
  transition: var(--transition);
  flex-shrink: 0;
}

.checkbox-container:hover input ~ .checkmark {
  border-color: var(--primary);
}

.checkbox-container input:checked ~ .checkmark {
  background: var(--primary);
  border-color: var(--primary);
}

.checkbox-container input:checked ~ .checkmark:after {
  content: "";
  position: absolute;
  left: 7px;
  top: 3px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-text {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.checkbox-text a {
  color: var(--primary);
  text-decoration: none;
}

/* Success State */
.success-state {
  text-align: center;
  padding: 20px 0;
  animation: fadeSlide 0.5s ease;
}

.success-icon i {
  font-size: 4rem;
  color: var(--success);
  margin-bottom: 16px;
}

.success-state h2 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.success-state > p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.application-info {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: left;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  margin-bottom: 20px;
}

.app-info-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
}

.app-info-item:last-child {
  border-bottom: none;
}

.app-info-item .label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.app-info-item .value {
  font-weight: 600;
  font-size: 0.85rem;
}

.app-info-item .value.status-pending {
  color: var(--warning);
}

.review-timeline {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
  text-align: left;
  border: 1px solid var(--border-light);
}

.timeline-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  opacity: 0.5;
}

.timeline-item.active {
  opacity: 1;
}

.timeline-item .timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border-light);
  flex-shrink: 0;
}

.timeline-item.active .timeline-dot {
  background: var(--primary);
  animation: pulse-dot 1.2s ease-in-out infinite;
}

.timeline-item span {
  font-size: 0.8rem;
  font-weight: 500;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(91, 33, 182, 0.3); }
  50% { box-shadow: 0 0 0 6px rgba(91, 33, 182, 0); }
}

.security-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.security-item {
  background: rgba(91, 33, 182, 0.05);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  font-weight: 500;
}

.security-item i {
  color: var(--primary);
  font-size: 0.9rem;
}

.dashboard-btn {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 60px;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: var(--transition);
}

.dashboard-btn:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 480px) {
  .content-container {
    padding: 16px 16px 40px;
  }
  
  .step-navigation {
    flex-direction: column;
  }
  
  .security-features {
    grid-template-columns: 1fr 1fr;
  }
}
/* ===== Live camera capture ===== */
.camera-hint { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 12px; }
.camera-frame {
  width: 220px; height: 220px; border-radius: 50%; overflow: hidden;
  margin: 0 auto 16px; background: var(--bg-page); border: 3px solid var(--border-light);
  position: relative; display: flex; align-items: center; justify-content: center;
}
.camera-frame video, .camera-frame img { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.camera-placeholder { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--text-muted); }
.camera-placeholder i { font-size: 2.2rem; }
.camera-placeholder span { font-size: 0.75rem; }
.camera-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.camera-actions .btn { width: auto; flex: none; padding: 10px 18px; border-radius: 60px; font-size: 0.85rem; }
.btn.secondary-cam { background: var(--white); color: var(--primary); border: 1.5px solid var(--primary); box-shadow: none; }
.btn.accent-cam { background: var(--secondary); color: var(--white); border: none; }
