.form-manager {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  font-family: inherit;
}

.form-section {
  margin-bottom: 2.5rem;
  padding: 1.5rem;
  border-radius: 0.35rem;
  background-color: #f8f9fa;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  border: 2px solid #354954;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--color-primary, #003333);
}

.section-description {
  margin-bottom: 1.5rem;
  color: #666;
  font-size: 0.95rem;
}

.fields-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.field-wrapper {
  display: flex;
  flex-direction: column;
}

.field-wrapper.full-width {
  grid-column: 1 / -1;
}

.field-label {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--color-primary, #003333);
  transition: all 0.3s ease;
}

.field-wrapper:focus-within .field-label {
  color: #2784a7;
  transform: translateY(-2px);
  font-weight: 600;
}

.field-wrapper.required .field-label::after {
  content: " *";
  color: #d9534f;
}

.form-input,
.form-textarea,
.form-select {
  padding: 0.8rem 1rem;
  border: 2px solid #2784a7;
  border-radius: 0.35rem;
  font-size: 1rem;
  font-family: inherit;
  width: 100%;
  background-color: white;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
  transform: scale(1);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: #2784a7;
  box-shadow: 0 0 0 3px rgba(0, 116, 116, 0.15);
  outline: none;
  transform: scale(1.02);
  background-color: #fefefe;
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
  overflow-y: hidden;
  overflow-x: hidden;
}

.options-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.option-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.option-label {
  font-size: 0.95rem;
  color: #333;
  cursor: pointer;
}

.option-wrapper input[type="checkbox"],
.option-wrapper input[type="radio"] {
  width: auto;
  margin: 0;
}

.error-message {
  color: #d9534f;
  font-size: 0.85rem;
  margin-top: 0.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  display: none;
  transform: translateY(-10px);
  max-height: 0;
}

.error-message.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
  max-height: 50px;
  animation: slideInError 0.3s ease-out;
}

@keyframes slideInError {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.form-actions {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}

.submit-button {
  background: linear-gradient(135deg, #2784a7, #1e6b8a);
  color: #ffffff;
  border: 2px solid #2784a7;
  border-radius: 0.5rem;
  padding: 0.9rem 2.5rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(39, 132, 167, 0.2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.submit-button:hover {
  background: linear-gradient(135deg, #1e6b8a, #155a75);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(39, 132, 167, 0.4);
}

.submit-button:active {
  transform: translateY(-1px) scale(0.98);
  box-shadow: 0 3px 12px rgba(39, 132, 167, 0.3);
}

.submit-button.submitting {
  background: linear-gradient(135deg, #6c757d, #495057);
  color: #ffffff;
  cursor: wait;
  animation: pulse 1.5s infinite;
  border-color: #6c757d;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.form-response {
  margin-top: 1.5rem;
  text-align: center;
  min-height: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.success-message {
  color: #28a745;
  padding: 1rem;
  border-radius: 0.35rem;
  background-color: rgba(40, 167, 69, 0.1);
  border: 1px solid #28a745;
  transition: all 0.3s ease-in-out;
  opacity: 0;
  display: none;
  transform: translateY(-10px);
  margin-bottom: 1rem;
}

.success-message.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.error-message-global {
  color: var(--color-error, #d9534f);
  padding: 1rem;
  border-radius: 0.35rem;
  background-color: rgba(217, 83, 79, 0.1);
  transition: all 0.3s ease-in-out;
  border: 1px solid #d9534f;
  opacity: 0;
  display: none;
  transform: translateY(-10px);
  margin-bottom: 1rem;
  font-weight: 500;
}

.error-message-global.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.invalid {
  border-color: #d9534f !important;
  box-shadow: 0 0 0 3px rgba(217, 83, 79, 0.15) !important;
}

@media (width < 768px) {
  .fields-container {
    grid-template-columns: 1fr;
  }
  
  .form-section {
    padding: 1.25rem;
  }
  
  .form-manager {
    padding: 0 1rem;
  }
}