:root {
  --primary: #16a596;
  --primary-dark: #138579;
  --primary-light: #e6f7f6;
  --accent: #0b84ff;
  --bg: #f5f7fa;
  --card: #ffffff;
  --text: #1f2937;
  --text-light: #6b7280;
  --border: #e5e7eb;
  --success: #16a34a;
  --danger: #e53935;
  --warning: #f59e0b;
  --radius: 12px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* Wizard Header */
.wizard-header {
  background: var(--primary);
  padding: 24px 0;
  box-shadow: var(--shadow-md);
}

.wizard-steps {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  position: relative;
}

.wizard-steps::before {
  content: '';
  position: absolute;
  top: 22px;
  left: 10%;
  right: 10%;
  height: 3px;
  background: rgba(255, 255, 255, 0.3);
  z-index: 0;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
  opacity: 0.6;
  transition: opacity 0.3s;
}

.step.active,
.step.completed {
  opacity: 1;
}

.step-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  color: white;
  transition: all 0.3s;
}

.step.active .step-circle {
  background: white;
  color: var(--primary);
  transform: scale(1.1);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3);
}

.step.completed .step-circle {
  background: white;
  color: var(--success);
}

.step-label {
  font-size: 13px;
  color: white;
  font-weight: 500;
  text-align: center;
}

/* Wizard Container */
.wizard-container {
  max-width: 1400px;
  margin: 32px auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  min-height: calc(100vh - 200px);
}

/* Progress Sidebar */
.progress-sidebar {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  height: fit-content;
  position: sticky;
  top: 24px;
}

.progress-circle {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto 24px;
}

.progress-circle svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.progress-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 8;
}

.progress-bar {
  fill: none;
  stroke: var(--primary);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 283;
  stroke-dashoffset: 283;
  transition: stroke-dashoffset 0.5s ease;
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
}

.sidebar-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-step {
  padding: 12px 16px;
  border-radius: 8px;
  color: var(--text-light);
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s;
  cursor: default;
}

.sidebar-step.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.sidebar-step.completed {
  color: var(--success);
}

/* Wizard Content */
.wizard-content {
  background: var(--card);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow-sm);
}

.wizard-step {
  display: none;
}

.wizard-step.active {
  display: block;
  animation: fadeIn 0.3s ease-in;
}

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

.step-content h2 {
  font-size: 28px;
  color: var(--text);
  margin-bottom: 8px;
}

.step-description {
  color: var(--text-light);
  margin-bottom: 32px;
  font-size: 16px;
}

/* Hero Section */
.hero-section {
  text-align: center;
  margin-bottom: 40px;
}

.hero-icon {
  font-size: 64px;
  display: block;
  margin-bottom: 16px;
}

.hero-section h1 {
  font-size: 36px;
  color: var(--text);
  margin-bottom: 12px;
}

.subtitle {
  font-size: 18px;
  color: var(--text-light);
}

.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 32px 0;
}

.info-card {
  background: var(--primary-light);
  padding: 20px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 12px;
}

.info-icon {
  font-size: 28px;
}

.info-card p {
  margin: 0;
  color: var(--text);
  font-size: 14px;
}

/* Form Styles */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label,
.form-section h3 {
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
}

.form-section {
  margin-bottom: 32px;
  padding: 24px;
  background: var(--bg);
  border-radius: var(--radius);
}

.form-section h3 {
  font-size: 16px;
  margin-bottom: 16px;
}

.warning-text {
  color: var(--danger);
  font-size: 14px;
  margin-bottom: 16px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
select {
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s;
  background: white;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

select.full-width {
  width: 100%;
}

/* Pain Map Section */
.pain-map-section {
  display: grid;
  gap: 32px;
}

.body-map-container {
  background: var(--bg);
  padding: 24px;
  border-radius: var(--radius);
}

.view-toggle {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  justify-content: center;
}

.view-btn {
  padding: 10px 24px;
  border: 2px solid var(--border);
  background: white;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.view-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.selected-areas-display {
  background: white;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
}

.selected-areas-display strong {
  color: var(--text);
}

.selected-areas-display span {
  color: var(--text-light);
}

.body-diagram {
  display: none;
  max-width: 400px;
  margin: 0 auto;
}

.body-diagram.active {
  display: block;
}

.body-svg {
  width: 100%;
  height: auto;
}

.body-part {
  fill: #e0e7ff;
  stroke: #6366f1;
  stroke-width: 2;
  cursor: pointer;
  transition: all 0.2s;
}

.body-part:hover {
  fill: #c7d2fe;
  stroke: #4f46e5;
  stroke-width: 3;
}

.body-part.selected {
  fill: var(--primary);
  stroke: var(--primary-dark);
  stroke-width: 3;
}

.body-label {
  font-size: 10px;
  fill: #1f2937;
  pointer-events: none;
  font-weight: 600;
}

.pain-details-section {
  display: grid;
  gap: 24px;
}

/* Slider */
.slider-container {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
}

.slider-label {
  font-size: 12px;
  color: var(--text-light);
  white-space: nowrap;
}

input[type="range"] {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: var(--border);
  outline: none;
  -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  transition: transform 0.2s;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: none;
}

.slider-value {
  text-align: center;
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
  margin-top: 12px;
}

/* Checkbox Grid */
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.checkbox-grid label {
  background: white;
  padding: 12px 16px;
  border-radius: 8px;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
  font-weight: 500;
}

.checkbox-grid label:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.checkbox-grid input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  flex-shrink: 0;
}

/* Review Summary */
.review-summary {
  background: var(--bg);
  padding: 24px;
  border-radius: var(--radius);
  margin-bottom: 24px;
}

.review-section {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.review-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.review-section h3 {
  font-size: 18px;
  color: var(--text);
  margin-bottom: 12px;
}

.review-item {
  display: flex;
  margin-bottom: 8px;
  font-size: 14px;
}

.review-label {
  font-weight: 600;
  color: var(--text);
  min-width: 200px;
}

.review-value {
  color: var(--text-light);
}

/* Consent */
.consent-section {
  background: var(--primary-light);
  padding: 20px;
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: 14px;
}

.consent-label input {
  width: 24px;
  height: 24px;
  margin-top: 2px;
  cursor: pointer;
  flex-shrink: 0;
}

.privacy-notice {
  background: var(--bg);
  padding: 16px;
  border-radius: 8px;
  text-align: center;
}

.privacy-notice p {
  margin: 0;
  color: var(--text-light);
  font-size: 13px;
}

/* Navigation */
.wizard-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 2px solid var(--border);
}

.nav-spacer {
  flex: 1;
}

.save-status {
  font-size: 13px;
  color: var(--text-light);
  margin: 0 16px;
}

/* Buttons */
.btn {
  padding: 12px 32px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border: 2px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border);
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover {
  background: #15803d;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-danger {
  background: var(--danger);
  color: white;
  width: 100%;
}

.btn-danger:hover {
  background: #dc2626;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal[aria-hidden="false"] {
  display: flex;
}

.modal-content {
  background: white;
  padding: 32px;
  border-radius: var(--radius);
  max-width: 500px;
  margin: 20px;
  box-shadow: var(--shadow-lg);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-content h2 {
  color: var(--danger);
  font-size: 24px;
  margin-bottom: 16px;
}

.modal-content p {
  margin-bottom: 24px;
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 1024px) {
  .wizard-container {
    grid-template-columns: 1fr;
  }

  .progress-sidebar {
    position: relative;
    top: 0;
  }

  .wizard-steps::before {
    left: 5%;
    right: 5%;
  }
}

@media (max-width: 768px) {
  .wizard-header {
    padding: 16px 0;
  }

  .wizard-steps {
    padding: 0 16px;
  }

  .step-label {
    display: none;
  }

  .wizard-content {
    padding: 24px;
  }

  .step-content h2 {
    font-size: 24px;
  }

  .form-grid,
  .checkbox-grid {
    grid-template-columns: 1fr;
  }

  .info-cards {
    grid-template-columns: 1fr;
  }

  .wizard-nav {
    flex-wrap: wrap;
    gap: 12px;
  }

  .btn {
    flex: 1 1 100%;
  }

  .nav-spacer {
    display: none;
  }
}
