/* ============================================
   BOR COMMUNITY CANADA — AUTH PAGES (Login/Register)
   Designed by Achiek Kuol
   ============================================ */

/* --- AUTH BODY --- */
.auth-body {
  background: linear-gradient(135deg, #f0f4f0, #e8f5e9);
  min-height: 100vh;
  padding-bottom: 0;
}

/* --- AUTH WRAPPER --- */
.auth-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 68px - 60px);
  padding: 30px 20px;
}

.auth-container {
  display: grid;
  grid-template-columns: 380px 1fr;
  max-width: 900px;
  width: 100%;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

/* --- AUTH BRAND (Left Side) --- */
.auth-brand {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  padding: 48px 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.auth-brand::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(212,160,23,0.12) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.04) 0%, transparent 50%);
}

.auth-brand-content {
  position: relative;
  z-index: 2;
  color: var(--white);
}

.auth-brand-logo {
  font-size: 3rem;
  margin-bottom: 20px;
}

.auth-brand-content h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--white);
}

.auth-brand-content > p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.78);
  line-height: 1.7;
  margin-bottom: 28px;
}

.auth-brand-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.auth-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.88);
}

.auth-feature i {
  color: var(--accent);
  width: 18px;
  font-size: 0.9rem;
}

.auth-brand-tagline {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent);
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.15);
}

/* --- AUTH FORM SECTION (Right Side) --- */
.auth-form-section {
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-form-container {
  width: 100%;
  max-width: 400px;
}

.auth-form-header {
  margin-bottom: 28px;
}

.auth-form-header h1 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}

.auth-form-header p {
  font-size: 0.88rem;
  color: var(--text-light);
}

/* --- FORM --- */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.auth-form-group label i {
  color: var(--primary);
  font-size: 0.78rem;
}

.required { color: #dc2626; }

.auth-input {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  font-size: 0.92rem;
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  transition: var(--transition);
}

.auth-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(27,67,50,0.1);
}

.auth-input::placeholder {
  color: var(--mid-gray);
}

.auth-select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236C757D' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.auth-input-note {
  font-size: 0.72rem;
  color: var(--text-light);
  line-height: 1.4;
}

/* PASSWORD WRAP */
.auth-password-wrap {
  position: relative;
}

.auth-password-wrap .auth-input {
  width: 100%;
  padding-right: 44px;
}

.auth-toggle-pw {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--mid-gray);
  cursor: pointer;
  font-size: 0.9rem;
  transition: var(--transition);
  padding: 4px;
}

.auth-toggle-pw:hover { color: var(--primary); }

/* PASSWORD STRENGTH */
.pw-strength {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.pw-bar {
  flex: 1;
  height: 4px;
  background: var(--light-gray);
  border-radius: 50px;
  overflow: hidden;
}

.pw-bar-fill {
  height: 100%;
  border-radius: 50px;
  transition: width 0.3s ease, background 0.3s ease;
  width: 0%;
  background: var(--mid-gray);
}

.pw-text {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-light);
  flex-shrink: 0;
}

/* PASSWORD MATCH */
.pw-match {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #16a34a;
}

.pw-no-match {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #dc2626;
}

/* FORM OPTIONS */
.auth-form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.auth-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--dark-gray);
  cursor: pointer;
  line-height: 1.4;
}

.auth-checkbox input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  flex-shrink: 0;
  margin-top: 1px;
}

.auth-forgot-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
  transition: var(--transition);
  flex-shrink: 0;
}

.auth-forgot-link:hover { color: var(--primary-light); }

/* SUBMIT */
.auth-submit {
  width: 100%;
  justify-content: center;
  margin-top: 6px;
}

/* ERROR */
.auth-error {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: #991b1b;
}

.auth-error i { color: #dc2626; flex-shrink: 0; }

/* DIVIDER */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 24px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-divider span {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
}

/* ALT ACTIONS */
.auth-alt-actions {
  text-align: center;
}

.auth-alt-actions p {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 10px;
}

.auth-alt-btn {
  width: 100%;
  justify-content: center;
}

/* FOOTER NOTE */
.auth-footer-note {
  margin-top: 24px;
  text-align: center;
}

.auth-footer-note p {
  font-size: 0.72rem;
  color: var(--mid-gray);
  line-height: 1.5;
}

/* --- REGISTRATION STEPS --- */
.reg-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 28px;
}

.reg-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.reg-step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--light-gray);
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  transition: var(--transition);
}

.reg-step.active .reg-step-circle {
  background: var(--primary);
  color: var(--white);
}

.reg-step.completed .reg-step-circle {
  background: #16a34a;
  color: var(--white);
}

.reg-step span {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-light);
}

.reg-step.active span { color: var(--primary); }
.reg-step.completed span { color: #16a34a; }

.reg-step-line {
  width: 40px;
  height: 2px;
  background: var(--light-gray);
  margin: 0 8px;
  margin-bottom: 20px;
}

/* PRIVACY NOTICE */
.reg-privacy-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm);
}

.reg-privacy-notice > i {
  color: #2563eb;
  font-size: 1rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.reg-privacy-notice strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #1e3a5f;
  margin-bottom: 4px;
}

.reg-privacy-notice p {
  font-size: 0.78rem;
  color: #3b82f6;
  line-height: 1.5;
}

/* --- OTP INPUTS --- */
.otp-inputs {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 12px 0;
}

.otp-input {
  width: 48px;
  height: 56px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  font-family: var(--font);
  color: var(--text);
  transition: var(--transition);
}

.otp-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(27,67,50,0.1);
}

/* VERIFY SECTION */
.verify-section {
  text-align: center;
  padding: 20px 0;
}

.verify-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--white);
  margin: 0 auto 18px;
}

.verify-section h3 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}

.verify-section > p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 24px;
}

.verify-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.resend-section {
  text-align: center;
  padding-top: 12px;
}

.resend-section p {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-bottom: 6px;
}

/* PENDING SECTION */
.pending-section {
  text-align: center;
  padding: 20px 0;
}

.pending-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fef9c3, #fde68a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #92400e;
  margin: 0 auto 18px;
  animation: pendingPulse 2s ease-in-out infinite;
}

@keyframes pendingPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.pending-section h3 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}

.pending-section > p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 24px;
  line-height: 1.6;
}

.pending-details {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
  text-align: left;
}

.pending-detail-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--off-white);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--dark-gray);
}

.pending-detail-item i {
  color: var(--primary);
  flex-shrink: 0;
}

.pending-message {
  margin-bottom: 24px;
  padding: 16px;
  background: var(--off-white);
  border-radius: var(--radius-sm);
}

.pending-message p {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-bottom: 8px;
}

.pending-email {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary);
}

/* --- AUTH PAGE FOOTER --- */
.auth-page-footer {
  text-align: center;
  padding: 20px;
  font-size: 0.78rem;
  color: var(--text-light);
}

.auth-page-footer strong { color: var(--accent); }

/* --- AUTH RESPONSIVE --- */
@media (max-width: 768px) {
  .auth-container {
    grid-template-columns: 1fr;
    max-width: 480px;
  }

  .auth-brand {
    padding: 32px 28px;
  }

  .auth-brand-features { display: none; }

  .auth-brand-content h2 { font-size: 1.3rem; }

  .auth-form-section {
    padding: 28px 24px;
  }

  .otp-input {
    width: 40px;
    height: 48px;
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .auth-wrapper {
    padding: 16px;
  }

  .auth-brand {
    padding: 24px 20px;
  }

  .auth-brand-content > p { display: none; }

  .auth-form-section {
    padding: 24px 18px;
  }

  .auth-form-options {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .otp-input {
    width: 36px;
    height: 44px;
    font-size: 1rem;
  }

  .reg-step-line { width: 24px; }
}

/* --- DEMO CREDENTIALS --- */
.demo-credentials {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 4px;
}

.demo-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 12px;
}

.demo-header i { color: #d97706; }

.demo-accounts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.demo-account-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font);
  text-align: left;
  width: 100%;
}

.demo-account-btn:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.demo-role {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.admin-role {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
}

.member-role {
  background: #dbeafe;
  color: #1e3a5f;
}

.demo-creds {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.demo-creds span {
  font-size: 0.78rem;
  color: var(--dark-gray);
  font-family: monospace;
}

.demo-creds span:first-child {
  font-weight: 600;
  color: var(--text);
}

.demo-note {
  font-size: 0.7rem;
  color: var(--text-light);
  text-align: center;
  margin-top: 10px;
}