.btn-primary-custom {
  background: var(--primary-green);
  border: 2px solid var(--primary-green);
  color: white;
  padding: 0.625rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  transition: all 0.3s;
}

.btn-primary-custom:hover {
  background: var(--primary-green-dark);
  border-color: var(--primary-green-dark);
}

.btn-outline-green {
  border: 2px solid var(--border-color);
  color: var(--text-dark);
  background: transparent;
  padding: 0.625rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  transition: all 0.3s;
}

.btn-outline-green:hover {
  background: var(--bg-light);
  border-color: var(--bg-light);
}

/* Auth Form Styles */
.auth-wrapper {
  flex-grow: 1;
  padding: 4rem 0;
}

.auth-card {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  max-width: 500px;
  margin: auto;
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-icon {
  font-size: 2rem;
  color: var(--primary-green);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: rgba(74, 124, 89, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.auth-header h2 {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--text-dark);
}

.auth-header p {
  color: var(--text-muted);
  font-size: 1rem;
}

.form-label {
  font-weight: 600;
  color: var(--text-dark);
}

.form-control,
.form-select {
  border-radius: 12px;
  padding: 0.75rem 1.1rem;
  border: 1px solid var(--border-color);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-green);
  box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.1);
}

.btn-full {
  width: 100%;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.auth-footer a {
  color: var(--primary-green);
  font-weight: 600;
  text-decoration: none;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* === NEW STYLES === */
.auth-separator {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 1.5rem 0;
}

.auth-separator::before,
.auth-separator::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}

.auth-separator span {
  padding: 0 1rem;
}

.social-login-group {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: nowrap;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  font-size: 1.25rem;
  text-decoration: none;
  transition: all 0.3s ease;
  min-width: 50px;
  flex: 0 0 auto;
}

.social-btn:hover {
  background-color: var(--bg-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.social-google {
  color: #DB4437;
}

.social-facebook {
  color: #1877F2;
}

.social-linkedin {
  color: #0A66C2;
}

.social-instagram {
  background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.social-discord {
  color: #5865F2;
}

/* Responsive: maintain single line on mobile with smaller buttons */
@media (max-width: 576px) {
  .social-login-group {
    gap: 0.5rem;
  }

  .social-btn {
    padding: 0.65rem;
    font-size: 1.1rem;
    min-width: 45px;
  }
}

/* === END NEW STYLES === */



/* Wide auth card for register form */
.auth-card.auth-card-wide {
  max-width: 1000px !important;
}

/* Required field asterisk */
.form-label.required-field::after {
  content: " *";
  color: #dc3545;
  font-weight: 700;
}

/* Inline field error messages */
.field-error {
  margin-top: 0.3rem;
}

.field-error ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.field-error ul li,
.field-error .form-error-message {
  color: #dc3545;
  font-size: 0.82rem;
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  gap: 0.3rem;
}

.field-error ul li::before {
  content: "•";
  color: #dc3545;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Invalid input border */
.form-control.is-invalid,
.form-select.is-invalid {
  border-color: #dc3545;
  background-image: none;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
}

/* Register page alert messages */
.register-messages {
  margin-bottom: 1.5rem;
}

.register-alert {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.register-alert i {
  font-size: 1rem;
  flex-shrink: 0;
}

.register-alert-error {
  background-color: #fff2f2;
  border: 1px solid #f5c2c7;
  color: #842029;
}

.register-alert-warning {
  background-color: #fff8e6;
  border: 1px solid #ffe08a;
  color: #856404;
}

.register-alert-success {
  background-color: #f0faf3;
  border: 1px solid #a3d9b1;
  color: #1a5c30;
}

/* RTL Support for Arabic - Auth Pages */
html[dir="rtl"] .auth-container {
  direction: rtl;
}

html[dir="rtl"] .auth-card {
  text-align: right;
}

html[dir="rtl"] .auth-header {
  text-align: center;
}

html[dir="rtl"] .form-label {
  text-align: right;
  display: block;
}

html[dir="rtl"] .form-control,
html[dir="rtl"] .form-select {
  text-align: right;
  direction: rtl;
}

html[dir="rtl"] .form-check {
  padding-right: 1.5em;
  padding-left: 0;
}

html[dir="rtl"] .form-check-input {
  float: right;
  margin-right: -1.5em;
  margin-left: 0;
}

html[dir="rtl"] .auth-footer {
  text-align: center;
}

html[dir="rtl"] .social-login {
  flex-direction: row-reverse;
}

html[dir="rtl"] .auth-separator span {
  padding: 0 1rem;
}

html[dir="rtl"] .register-grid {
  direction: rtl;
}

html[dir="rtl"] .otp-inputs {
  direction: ltr;
  /* Keep OTP inputs LTR for better UX */
  justify-content: center;
}

/* Language Switcher in Auth Pages */
.auth-container .language-switcher {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
}

html[dir="rtl"] .auth-container .language-switcher {
  right: auto;
  left: 20px;
}

@media (max-width: 768px) {
  .auth-container .language-switcher {
    position: relative;
    top: 0;
    right: 0;
    margin-bottom: 1rem;
  }

  html[dir="rtl"] .auth-container .language-switcher {
    left: 0;
  }
}


/* Registration Type Toggle Styles */
.registration-type-toggle {
  display: flex;
  gap: 2rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background-color: var(--bg-light);
  border-radius: 8px;
}

.registration-type-toggle .form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.registration-type-toggle .form-check-input {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0;
  cursor: pointer;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.registration-type-toggle .form-check-input:checked {
  background-color: var(--primary-green);
  border-color: var(--primary-green);
}

.registration-type-toggle .form-check-label {
  margin-bottom: 0;
  cursor: pointer;
  font-weight: 500;
  color: var(--text-dark);
  user-select: none;
  transition: color 0.3s ease;
}

.registration-type-toggle .form-check-input:checked + .form-check-label {
  color: var(--primary-green);
  font-weight: 600;
}

/* Responsive registration type toggle */
@media (max-width: 576px) {
  .registration-type-toggle {
    flex-direction: column;
    gap: 1rem;
  }
}

/* Company field wrapper - hidden by default */
#company-wrapper {
  transition: all 0.3s ease;
}

#lastname-wrapper {
  transition: all 0.3s ease;
}

/* Ensure hidden elements stay hidden */
#lastname-wrapper[style*="display: none"],
#company-wrapper[style*="display: none"] {
  display: none !important;
  visibility: hidden;
  height: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

.d-none {
  display: none !important;
}

