:root {
  --primary-color: #4a91e2;
  --white-color: #ffffff;
  --light-gray: #f4f7fa;
  --text-dark: #212529;
  --text-light: #6b7280;
  --border-color: #dee2e6;
  --error-color: #dc3545;
  --success-color: #198754;
  --font-family: "Poppins", sans-serif;
}

/* --- The Wrapper for all Auth Pages --- */
.auth-page-wrapper {
  font-family: var(--font-family);
  background-color: var(--white-color); /* Default mobile background */
  width: 100%;
  min-height: 100vh;
  padding: 3rem 0; /* Vertical spacing for mobile */
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* Align to top on mobile */
  align-items: center;
}

/* The main content box */
.auth-container {
  width: 100%;
  max-width: 550px;
  padding: 0 1.5rem; /* Horizontal padding for mobile content */
  text-align: center;
}

.auth-logo {
  max-width: 160px;
  margin: 0 auto 1.5rem auto;
}

.auth-container h1 {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
}

.auth-container p {
  color: var(--text-light);
  margin-bottom: 2.5rem;
  font-size: 1rem;
  max-width: 450px;
  margin-left: auto;
  margin-right: auto;
}
/* --- Choice Cards (signup-choice.html) --- */
.choice-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.choice-card {
  border: 1px solid var(--border-color);
  background-color: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  text-decoration: none; 
}
.choice-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(74, 145, 226, 0.1);
}
.choice-card i {
  font-size: 2.5rem;
  color: var(--primary-color);
  width: 50px; 
  text-align: center;
}
.choice-card h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark); 
}
.choice-card span {
  font-size: 0.9rem;
  color: var(--text-light);
  font-weight: 400;
}

/* --- Form Styles (signup-supplier & signup-provider) --- */
.form-group {
  margin-bottom: 1.25rem;
  text-align: left;
}
.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-dark);
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  font-family: var(--font-family);
  transition: all 0.2s ease;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(74, 145, 226, 0.2);
}
.password-group { position: relative; }

/* Password Validation Checklist */
.password-validation {
    font-size: 0.85rem;
    margin-top: 0.75rem;
    padding-left: 0.5rem;
    color: var(--text-light);
    line-height: 1.6;
}
.password-validation span::before {
    content: '•';
    margin-right: 8px;
    color: #ced4da;
    transition: color 0.2s ease;
}
.password-validation .valid::before {
    content: '✓'; 
    color: var(--success-color);
}
.password-validation .invalid::before {
    content: '✗'; 
    color: var(--error-color);
}

.terms-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}
.terms-group input { width: auto; }
.terms-group label { margin-bottom: 0; } 

/* --- General Auth Page Elements --- */
.btn-auth {
  width: 100%;
  padding: 15px;
  border-radius: 8px;
  background-color: var(--primary-color);
  color: var(--white-color);
  font-size: 1.1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}
/*.btn-auth:hover {
  background-color: var(--brand-color-dark);
  box-shadow: 0 4px 15px rgba(74, 145, 226, 0.2);
}*/
.btn-auth:disabled {
  background-color: #adb5bd;
  cursor: not-allowed;
  box-shadow: none;
}
.auth-link {
  margin-top: 1.5rem;
  font-size: 0.9rem;
}
.auth-link a {
  color: var(--primary-color);
  font-weight: 500;
  text-decoration: none;
}
.auth-link a:hover {
    text-decoration: underline;
}

.modal {
  position: fixed; inset: 0;
  background-color: rgba(0,0,0,0.4);
  display: flex; justify-content: center; align-items: center;
  z-index: 9999;
}
.modal.hidden { display: none; }

.modal-content {
  background: #fff;
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}
.modal-content h3 { margin-bottom: 0.5rem; font-size: 1.25rem; }
.modal-content p { margin-bottom: 1rem; }
.modal-content input {
  padding: 12px; font-size: 1rem; width: 100%;
  border-radius: 8px; border: 1px solid #ccc; margin-bottom: 1rem;
}
.modal-actions {
  display: flex; justify-content: space-between; gap: 1rem;
}
.modal-actions button {
  flex: 1; padding: 0.75rem;
  border: none; border-radius: 8px;
  cursor: pointer; font-weight: 600;
}
#otp-submit { background-color: #4A91E2; color: #fff; }
#otp-cancel { background-color: #eee; color: #333; }
.error-message { color: red; font-size: 0.9rem; margin-top: 0.5rem; }
.hidden { display: none; }

@media (min-width: 768px) {
  .auth-page-wrapper {
    background-color: var(--light-gray);
    justify-content: center;
    padding: 2rem;
  }

  .auth-container {
    background-color: var(--white-color);
    padding: 2.5rem 3rem;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
  }

  .auth-container h1 {
    font-size: 2rem;
  }
}

@media (max-width: 576px) {
  .auth-container {
    padding: 1rem;
  }

  .auth-container h1 {
    font-size: 1.5rem;
  }

  .form-group input,
  .form-group textarea {
    font-size: 0.95rem;
    padding: 10px 12px;
  }
}
