* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #3f88c5;
  --primary-dark: #2d5a8c;
  --primary-light: #5fa3d9;
  --success-color: #10b981;
  --error-color: #ef4444;
  --border-color: #e5e7eb;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --bg-light: #f9fafb;
  --bg-white: #ffffff;
  --tab-inactive: #d1d5db;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #f0f4f8 0%, #e8f1f8 100%);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  padding: 20px;
}

.form-wrapper {
  max-width: 1000px;
  margin: 0 auto;
}

.form-container {
  background: var(--bg-white);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(63, 136, 197, 0.08);
  overflow: hidden;
  animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* <CHANGE> Modern header with gradient and progress indicator */
.form-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 40px 30px;
}

.header-content {
  text-align: center;
  margin-bottom: 30px;
}

.form-header h1 {
  font-size: 2.2rem;
  margin-bottom: 8px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.form-header p {
  font-size: 1rem;
  opacity: 0.9;
  font-weight: 500;
}

.progress-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.progress-step {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.progress-step.active {
  background: white;
  color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.progress-line {
  flex: 1;
  height: 2px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0;
  max-width: 60px;
}

/* <CHANGE> Tabbed navigation with icons */
.form-tabs {
  display: flex;
  background: #f3f6fb;
  border-bottom: 2px solid var(--border-color);
  padding: 0;
  gap: 0;
}

.tab-btn {
  flex: 1;
  padding: 16px 20px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--tab-inactive);
  font-weight: 500;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
  position: relative;
}

.tab-btn i {
  font-size: 1.1rem;
}

.tab-btn:hover {
  color: var(--primary-color);
  background: rgba(63, 136, 197, 0.05);
}

.tab-btn.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
  background: rgba(63, 136, 197, 0.03);
}

@media (max-width: 768px) {
  .tab-btn span {
    display: none;
  }

  .tab-btn {
    padding: 12px;
  }
}

/* <CHANGE> Tab content with smooth transitions */
.tab-content {
  padding: 40px;
  display: none;
  animation: fadeIn 0.4s ease-out;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.tab-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--border-color);
}

.tab-title i {
  color: var(--primary-color);
  font-size: 1.8rem;
}

.tab-title h2 {
  font-size: 1.6rem;
  color: var(--text-primary);
  font-weight: 600;
}

.form-group {
  margin-bottom: 25px;
}

label {
  display: block;
  margin-bottom: 10px;
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

label i {
  color: var(--primary-color);
  font-size: 0.9rem;
}

.required {
  color: var(--error-color);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="file"],
select,
textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.3s ease;
  color: var(--text-primary);
  background: var(--bg-white);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="file"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(63, 136, 197, 0.1);
  background: rgba(63, 136, 197, 0.02);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

/* <CHANGE> Improved file upload styling */
.file-upload {
  position: relative;
  display: block;
}

.file-upload input[type="file"] {
  display: none;
}

.file-upload-label {
  border: 2px dashed var(--border-color);
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  cursor: pointer;
  background: #fafbfc;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.file-upload-label:hover {
  border-color: var(--primary-color);
  background: rgba(63, 136, 197, 0.05);
}

.file-upload-label i {
  font-size: 2rem;
  color: var(--primary-color);
}

.file-upload-label span:first-of-type {
  font-weight: 500;
  color: var(--text-primary);
}

.file-info {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 5px;
  font-weight: normal;
}

.radio-group,
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 12px;
}

.radio-option,
.checkbox-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.radio-option:hover,
.checkbox-option:hover {
  background: rgba(63, 136, 197, 0.05);
}

input[type="radio"],
input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: var(--primary-color);
  flex-shrink: 0;
}

.radio-option label,
.checkbox-option label {
  margin: 0;
  cursor: pointer;
  flex: 1;
  font-weight: 500;
}

.conditional-input {
  margin-left: 30px !important;
  margin-top: 8px;
  display: none !important;
}

.checkbox-group.declaration {
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  background: rgba(16, 185, 129, 0.05);
  padding: 15px;
  border-radius: 10px;
  border-left: 4px solid var(--success-color);
}

.checkbox-group.declaration input[type="checkbox"] {
  margin-top: 4px;
}

.checkbox-group.declaration label {
  margin: 0;
  font-weight: 500;
  color: var(--text-primary);
}

.char-count {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 8px;
  text-align: right;
}

.error-message {
  display: none;
  color: var(--error-color);
  font-size: 0.85rem;
  margin-top: 5px;
}

.error-message.show {
  display: block;
}

.form-group.error input,
.form-group.error select,
.form-group.error textarea {
  border-color: var(--error-color);
  background-color: rgba(239, 68, 68, 0.05);
}

/* <CHANGE> Improved form actions with navigation buttons */
.form-actions {
  display: flex;
  gap: 15px;
  padding: 40px;
  justify-content: center;
  background: #f9fafb;
  border-top: 1px solid var(--border-color);
}

button {
  font-size: 0.95rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-nav {
  padding: 12px 24px;
  background: var(--bg-light);
  color: var(--text-primary);
  border: 1.5px solid var(--border-color);
}

.btn-nav:hover {
  background: var(--border-color);
  transform: translateY(-1px);
}

.btn-submit {
  padding: 12px 40px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(63, 136, 197, 0.3);
}

.btn-submit:active {
  transform: translateY(0);
}

.success-message {
  background: rgba(16, 185, 129, 0.1);
  border: 1.5px solid var(--success-color);
  color: #047857;
  padding: 20px;
  border-radius: 10px;
  margin-top: 20px;
  text-align: center;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.success-message i {
  font-size: 1.5rem;
}

@media (max-width: 768px) {
  .form-container {
    border-radius: 0;
  }

  .form-header {
    padding: 30px 20px;
  }

  .form-header h1 {
    font-size: 1.6rem;
  }

  .progress-indicator {
    gap: 5px;
  }

  .progress-step {
    width: 35px;
    height: 35px;
    font-size: 0.8rem;
  }

  .progress-line {
    max-width: 40px;
  }

  .tab-content {
    padding: 20px;
  }

  .form-actions {
    flex-direction: column;
    gap: 10px;
    padding: 20px;
  }

  button {
    width: 100%;
  }

  .tab-title {
    flex-direction: column;
    align-items: flex-start;
  }

  .file-upload-label {
    padding: 20px;
  }
}

select {
  -webkit-appearance: none;
  border-radius: 0;
}