/* Authentication Pages Custom Styles */

.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 2rem 0;
}

.auth-card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  max-width: 500px;
  width: 100%;
  margin: 0 auto;
  animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 2rem;
  text-align: center;
  color: white;
}

.auth-body {
  padding: 2rem;
}

.form-control {
  border-radius: 12px;
  border: 2px solid #e1e5e9;
  padding: 12px 16px;
  transition: all 0.3s ease;
  font-family: inherit;
}

.form-control:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-control.is-valid {
  border-color: #28a745;
}

.form-control.is-invalid {
  border-color: #dc3545;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 12px;
  padding: 12px 24px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
  background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.btn-primary:active {
  transform: translateY(0);
}

.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  border: 2px solid #e1e5e9;
  border-radius: 12px;
  margin: 0 5px;
  color: #666;
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-btn:hover {
  border-color: #667eea;
  color: #667eea;
  transform: translateY(-2px);
  text-decoration: none;
}

.divider {
  text-align: center;
  margin: 1.5rem 0;
  position: relative;
}

.divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #e1e5e9;
}

.divider span {
  background: white;
  padding: 0 1rem;
  color: #666;
  font-size: 14px;
}

.forgot-password,
.register-link a,
.login-link a {
  color: #667eea;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
}

.forgot-password:hover,
.register-link a:hover,
.login-link a:hover {
  text-decoration: underline;
  color: #5a6fd8;
}

.register-link,
.login-link {
  text-align: center;
  margin-top: 1.5rem;
}

.logo-container {
  margin-bottom: 1rem;
}

.logo-container img {
  max-width: 150px;
  height: auto;
  filter: brightness(0) invert(1);
}

.password-strength {
  font-size: 12px;
  margin-top: 5px;
  font-weight: 500;
}

.strength-weak {
  color: #dc3545;
}

.strength-medium {
  color: #ffc107;
}

.strength-strong {
  color: #28a745;
}

.terms-text {
  font-size: 14px;
  color: #666;
  line-height: 1.5;
}

.terms-text a {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
}

.terms-text a:hover {
  text-decoration: underline;
}

.form-row {
  display: flex;
  gap: 15px;
}

.form-col {
  flex: 1;
}

/* Form validation styles */
.was-validated .form-control:valid {
  border-color: #28a745;
}

.was-validated .form-control:invalid {
  border-color: #dc3545;
}

.was-validated .form-check-input:valid {
  border-color: #28a745;
}

.was-validated .form-check-input:invalid {
  border-color: #dc3545;
}

/* Loading state */
.btn-loading {
  position: relative;
  color: transparent !important;
}

.btn-loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin-left: -10px;
  margin-top: -10px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .auth-container {
    padding: 1rem;
  }

  .auth-header,
  .auth-body {
    padding: 1.5rem;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .logo-container img {
    max-width: 120px;
  }
}

@media (max-width: 576px) {
  .auth-header h2 {
    font-size: 1.5rem;
  }

  .auth-header p {
    font-size: 0.9rem;
  }

  .social-btn {
    width: 40px;
    height: 40px;
  }
}

/* RTL specific adjustments */
[dir="rtl"] .form-control {
  text-align: right;
}

[dir="rtl"] .position-absolute.end-0 {
  left: 16px;
  right: auto;
}

/* Focus states for better accessibility */
.form-control:focus,
.btn:focus,
.social-btn:focus {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

/* Success message styling */
.alert-success {
  background-color: #d4edda;
  border-color: #c3e6cb;
  color: #155724;
  border-radius: 12px;
}

/* Error message styling */
.alert-danger {
  background-color: #f8d7da;
  border-color: #f5c6cb;
  color: #721c24;
  border-radius: 12px;
}
