:root{
  --error: #ff4d4f;
}

.signup-page {
  padding: 3rem 0 5rem;
}

.signup-container {
  max-width: 800px;
  margin: 0 auto;
  background-color: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-soft);
  position: relative;
}

.signup-header {
  text-align: center;
  margin-bottom: 2rem;
}

.signup-header h1 {
  font-size: 2rem;
  color: var(--neutral-dark);
  margin-bottom: 0.5rem;
}

.signup-header p {
  color: var(--neutral-medium);
}

.account-type-toggle {
  margin-bottom: 2rem;
}

.account-type-toggle h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--neutral-dark);
  text-align: center;
}

.toggle-container {
  display: flex;
  justify-content: center;
  background-color: var(--gray-light);
  border-radius: var(--radius-lg);
  padding: 0.25rem;
  max-width: 400px;
  margin: 0 auto;
}

.toggle-option {
  flex: 1;
  text-align: center;
  position: relative;
  z-index: 1;
  cursor: pointer;
}

.toggle-option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-label {
  display: block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  transition: var(--transition);
  font-weight: 500;
}

.toggle-option input:checked + .toggle-label {
  background-color: var(--white);
  color: var(--primary-dark);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-option input:not(:checked) + .toggle-label {
  color: var(--neutral-medium);
}

/* Forms */
.form {
  display: none;
}

.form.active {
  display: block;
}

.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--neutral-dark);
}

input,
textarea,
select {
  width: 100%;
  padding: 0.875rem;
  border: 1px solid #ccc;
  border-radius: var(--radius-md);
  background-color: var(--white);
  color: var(--neutral-dark);
  font-family: 'Tajawal', sans-serif;
  transition: var(--transition);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 2px rgba(90, 157, 72, 0.1);
}

textarea {
  resize: vertical;
  min-height: 80px;
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23777777' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 1rem center;
  padding-left: 2.5rem;
}

.error-message {
  display: none;
  color: var(--error);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.error-message.visible {
  display: block;
}

/* Password Input */
.password-input-container {
  position: relative;
}

.toggle-password {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--gray-dark);
  cursor: pointer;
  padding: 0.25rem;
}

/* Password Strength Meter */
.password-strength {
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  font-size: 0.85rem;
  color: var(--gray-dark);
}

.strength-meter {
  flex: 1;
  height: 5px;
  background-color: var(--gray-light);
  border-radius: 5px;
  margin-right: 10px;
  overflow: hidden;
}

.strength-bar {
  height: 100%;
  width: 0;
  transition: var(--transition);
  border-radius: 5px;
}

/* Buttons */
.btn-lg {
  font-size: 1.1rem;
  padding: 0.875rem;
}

.btn-block {
  display: block;
  width: 100%;
}

/* Form Footer */
.form-footer {
  margin-top: 1.5rem;
  text-align: center;
  color: var(--neutral-medium);
  font-size: 0.95rem;
}

.form-footer a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.form-footer a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Loading Spinner */
.loading-spinner-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: var(--radius-lg);
  z-index: 10;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.loading-spinner-container.active {
  visibility: visible;
  opacity: 1;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(90, 157, 72, 0.2);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Success Message */
.success-message {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: var(--radius-lg);
  z-index: 10;
  padding: 2rem;
  text-align: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.success-message.active {
  visibility: visible;
  opacity: 1;
}

.success-icon {
  font-size: 4rem;
  color: var(--success);
  margin-bottom: 1.5rem;
}

.success-message h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--neutral-dark);
}

.success-message p {
  color: var(--neutral-medium);
}

/* Responsive Styles */
@media (max-width: 768px) {
  .signup-container {
    padding: 1.5rem;
    margin: 0 1rem;
  }
  
  .toggle-container {
    max-width: 100%;
  }
}

@media (max-width: 576px) {
  .signup-page {
    padding: 2rem 0;
  }
  
  .signup-header h1 {
    font-size: 1.5rem;
  }
  
  .toggle-label {
    padding: 0.5rem 1rem;
  }
  
  .btn-lg {
    padding: 0.75rem;
  }
}
