/* Auth Page Styles */
.auth-body {
  background: linear-gradient(135deg, #bb0100 0%, #8b0000 100%);
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.auth-body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('/images/auth-background.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  filter: brightness(0.4);
  opacity: 0;
  z-index: 0;
}

/* Image loaded state - show immediately */
.auth-body.bg-loaded::before {
  opacity: 1;
}

@keyframes fadeInBackground {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.auth-container {
  width: 100%;
  max-width: 340px;
  position: relative;
  z-index: 1;
}

#flashFromCookie {
  display: none;
}

#flashFromCookie.show {
  display: block;
}

.auth-card {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
  padding: 1.55rem;
}

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

.auth-logo {
  max-width: 88px;
  height: auto;
  margin: 0 auto 0.54rem auto;
  display: block;
}

.auth-header h1 {
  color: #bb0100;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.26rem;
}

.auth-header p {
  margin-bottom: 0;
  font-size: 0.7rem;
}

.auth-form h2 {
  font-size: 0.86rem;
  font-weight: 600;
  margin-bottom: 0.32rem;
}

.auth-form .text-muted {
  font-size: 0.8rem;
}

.auth-form .nav-tabs {
  border-bottom: 2px solid #dee2e6;
}

.auth-form .nav-tabs .nav-link {
  color: #6c757d;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.53rem 0.72rem;
  font-size: 0.79rem;
}

.auth-form .nav-tabs .nav-link.active {
  color: #bb0100;
  border-bottom-color: #bb0100;
  background: transparent;
}

.auth-form .btn-primary {
  background: linear-gradient(135deg, #bb0100 0%, #8b0000 100%);
  border: none;
  padding: 0.63rem;
  font-weight: 600;
  font-size: 0.8rem;
}

.auth-form .btn-primary:hover {
  opacity: 0.9;
  box-shadow: 0 0.5rem 1rem rgba(187, 1, 0, 0.25);
}

.auth-form .btn-outline-primary {
  color: #bb0100;
  border-color: #bb0100;
}

.auth-form .btn-outline-primary:hover {
  background-color: #bb0100;
  border-color: #bb0100;
}

.auth-form .form-control {
  padding: 0.63rem;
  border-radius: 0.5rem;
  font-size: 0.8rem;
}

.auth-form .form-control:focus {
  border-color: #bb0100;
  box-shadow: 0 0 0 0.2rem rgba(187, 1, 0, 0.25);
}

.auth-form .fa-4x {
  margin-bottom: 1rem;
}

.auth-form .alert {
  border-radius: 0.5rem;
}

/* Form content animations */
@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

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

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

@keyframes spinnerFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes spinnerFadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.auth-form-content {
  /* Animation removed */
}

.auth-form-content.fade-in-content {
  animation: fadeIn 0.5s ease-in-out;
}

.auth-form-content.fade-out {
  animation: fadeOut 0.5s ease-in-out forwards;
}

.btn-primary.loading {
  pointer-events: none;
}

.btn-primary.loading i {
  animation: spin 1s linear infinite;
  display: inline-block;
  margin-right: 0.5rem;
}

.btn-primary.loading::after {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 0.5rem;
}

.form-control.disabled-input {
  background-color: #e9ecef;
  color: #6c757d;
  cursor: not-allowed;
  opacity: 0.6;
}

.form-control.disabled-input:focus {
  border-color: #dee2e6;
  box-shadow: none;
}

/* Responsive */
@media (max-width: 576px) {
  .auth-card {
    padding: 1.1rem;
  }
  
  .auth-header h1 {
    font-size: 0.8rem;
  }
  
  .auth-form h2 {
    font-size: 0.75rem;
  }
  
  .auth-header h1 {
    font-size: 1rem;
  }
  
  .auth-form h2 {
    font-size: 0.9rem;
  }
}
