:root {
  --primary: #cb9754;
  --secondary: #c9b559;
  --white: #ffffff;
  --black: #000000;
  --text-dark: #333;
  --text-medium: #666;
  --text-light: #999;
  --background: linear-gradient(135deg, #f8f5f0 0%, #fff 100%);
  --card-bg: rgba(255, 255, 255, 0.95);
  --shadow: rgba(203, 151, 84, 0.15);
  --shadow-hover: rgba(203, 151, 84, 0.25);
  --border: #e8e8e8;
  --success: #28a745;
  --error: #dc3545;
  --radius: 16px;
  --radius-sm: 8px;
}

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

body {
  font-family: 'Poppins', sans-serif;
  background: var(--background);
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
  padding: 1rem;
}

/* Header aprimorado */
.page-header {
  max-width: 800px;
  margin: 2rem auto;
  text-align: center;
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  padding: 3rem 2rem 2rem;
  border-radius: var(--radius);
  box-shadow: 0 8px 32px var(--shadow);
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
}

.logo {
  width: 120px;
  height: auto;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 4px 8px rgba(203, 151, 84, 0.2));
}

.page-header h1 {
  color: var(--primary);
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.page-header .intro {
  color: var(--text-medium);
  font-size: 1.2rem;
  font-weight: 400;
  max-width: 500px;
  margin: 0 auto;
}

/* Container do formulário */
.container {
  max-width: 800px;
  margin: 0 auto 3rem;
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border-radius: var(--radius);
  box-shadow: 0 12px 48px var(--shadow);
  padding: 3rem;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Indicador de passos melhorado */
.progress-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 3rem;
  position: relative;
}

.progress-wrapper {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.8);
  padding: 1.5rem 2rem;
  border-radius: 50px;
  box-shadow: 0 4px 20px rgba(203, 151, 84, 0.1);
  border: 2px solid rgba(203, 151, 84, 0.1);
}

.step {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  background: var(--white);
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 2;
}

.step.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: var(--white);
  border-color: var(--primary);
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(203, 151, 84, 0.4);
}

.step-label {
  position: absolute;
  top: -35px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-medium);
  white-space: nowrap;
}

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

.step-label {
  display: none;
}

.step.active .step-label {
  display: inline;
}

.connector {
  width: 80px;
  height: 4px;
  background: var(--border);
  margin: 0 1rem;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.connector.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
  animation: fillLine 0.6s ease forwards;
}

/* Form steps */
.form-step {
  display: none;
  animation: fadeIn 0.5s ease;
  min-height: 400px;
}

.form-step.current {
  display: block;
}

.step-title {
  text-align: center;
  margin-bottom: 2rem;
}

.step-title h2 {
  color: var(--primary);
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.step-title p {
  color: var(--text-medium);
  font-size: 1rem;
}

/* Grid para campos */
.form-grid {
  display: grid;
  gap: 1.5rem;
}

.form-grid.two-cols {
  grid-template-columns: 1fr 1fr;
}

.form-group label {
  display: block;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--primary);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

label i {
  font-size: 1rem;
  opacity: 0.8;
}

.checkbox-content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checkbox-icon img {
  width: 30px;  
  height: 30px; 
  object-fit: contain;
}

.checkbox-btn[data-value="Outro"] 
.checkbox-icon img {
  margin-top: 8px;
}

input,
select,
textarea {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  background: var(--white);
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(203, 151, 84, 0.1), 0 4px 16px rgba(203, 151, 84, 0.15);
  transform: translateY(-2px);
}

input[required]:valid,
textarea[required]:valid {
  border-color: var(--success);
}


input:invalid.touched {
  border-color: var(--error);
}

/* Checkbox group aprimorado */
.checkbox-section {
  margin-top: 1rem;
}

.checkbox-section h3 {
  color: var(--primary);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-align: center;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.checkbox-btn {
  position: relative;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.2rem;
  cursor: pointer;
  text-align: center;
  transition: all 0.3s ease;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.checkbox-btn:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(203, 151, 84, 0.15);
}

.checkbox-btn input {
  display: none;
}

.checkbox-btn input:checked+.checkbox-content {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: var(--white);
  border-color: var(--primary);
}

.checkbox-btn.checked {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: var(--white);
  border-color: var(--primary);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 25px rgba(203, 151, 84, 0.3);
}

.checkbox-icon {
  font-size: 1.5rem;
  opacity: 0.8;
}

/* Botões aprimorados */
.buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 3rem;
  gap: 1rem;
}

.btn {
  padding: 1rem 2rem;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  min-width: 140px;
  justify-content: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(203, 151, 84, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(203, 151, 84, 0.4);
}

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

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

#finishBtn {
  display: none;
}

/* Modal aprimorado */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background: var(--white);
  padding: 3rem;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  margin: 1rem;
  position: relative;
  animation: slideUp 0.4s ease;
}

.modal-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: var(--radius) var(--radius) 0 0;
}

.modal-icon {
  font-size: 4rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.modal-content h3 {
  color: var(--primary);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.modal-content p {
  color: var(--text-medium);
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* Footer */
footer {
  text-align: center;
  margin-top: 3rem;
  color: var(--text-light);
  font-size: 0.9rem;
  padding: 2rem;
}

/* Mensagens de erro */
.error-msg {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--error);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: slideDown 0.3s ease;
}

/* Animações */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideDown {
  from {
    transform: translateY(-10px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fillLine {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

/* Responsividade */
@media (max-width: 768px) {
  .page-header {
    padding: 2rem 1.5rem;
    margin: 1rem auto;
  }

  .page-header h1 {
    font-size: 2rem;
  }

  .container {
    padding: 2rem 1.5rem;
    margin: 0 auto 2rem;
  }

  .progress-wrapper {
    padding: 1rem 1.5rem;
  }

  .step {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .connector {
    width: 60px;
  }

  .form-grid.two-cols {
    grid-template-columns: 1fr;
  }

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

  .buttons {
    flex-direction: column-reverse;
    gap: 1rem;
  }

  .btn {
    width: 100%;
  }

  .modal-content {
    padding: 2rem 1.5rem;
  }
}

@media (max-width: 480px) {
  body {
    padding: 0.5rem;
  }

  .page-header .intro {
    font-size: 1rem;
  }

  .step-title h2 {
    font-size: 1.5rem;
  }

  .checkbox-btn {
    padding: 1rem;
  }
}