/* Login Page Styles - Modern Design */
:root {
  --login-card-shadow: 0 10px 40px rgba(var(--bs-dark-rgb), 0.08);
  --login-card-hover-shadow: 0 20px 60px rgba(var(--bs-dark-rgb), 0.15);
  --animation-duration: 0.4s;
  --animation-timing: cubic-bezier(0.4, 0.0, 0.2, 1);
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 10px;
}

[data-bs-theme="dark"] {
  --login-card-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  --login-card-hover-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Login Hero Section */
.login-hero-section {
  background: linear-gradient(135deg, 
    rgba(var(--bs-primary-rgb), 0.05) 0%, 
    rgba(var(--bs-info-rgb), 0.03) 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 2rem 0;
}

.login-hero-section::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -15%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(var(--bs-primary-rgb), 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: float 20s ease-in-out infinite;
}

.login-hero-section::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(var(--bs-info-rgb), 0.06) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(30px, -30px) scale(1.05);
  }
}

/* Login Container */
.login-container {
  position: relative;
  z-index: 1;
}

/* Login Card */
.login-card {
  background: var(--bs-body-bg);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--login-card-shadow);
  border: 1px solid var(--bs-border-color);
  transition: transform var(--animation-duration) var(--animation-timing),
              box-shadow var(--animation-duration) var(--animation-timing);
  animation: slideUp 0.6s ease-out;
}

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

.login-card:hover {
  box-shadow: var(--login-card-hover-shadow);
}

/* Login Header */
.login-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.login-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg, var(--bs-primary) 0%, rgba(var(--bs-primary-rgb), 0.8) 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.75rem;
  box-shadow: 0 4px 16px rgba(var(--bs-primary-rgb), 0.25);
}

.login-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--bs-emphasis-color);
  margin-bottom: 0.375rem;
  background: linear-gradient(135deg, var(--bs-primary) 0%, rgba(var(--bs-primary-rgb), 0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-subtitle {
  font-size: 0.875rem;
  color: var(--bs-secondary-color);
  margin: 0;
}

/* Login Form */
.login-form {
  margin-bottom: 0;
}

.login-form .form-group {
  margin-bottom: 1.5rem;
}

/* Enhanced Form Fields */
.login-form .form-label {
  font-weight: 600;
  color: var(--bs-emphasis-color);
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
}

.login-form .form-control {
  padding: 0.875rem 1rem;
  border-radius: 12px;
  border: 2px solid var(--bs-border-color);
  background: var(--bs-body-bg);
  font-size: 0.9375rem;
  transition: all 0.3s ease;
}

.login-form .form-control:focus {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 4px rgba(var(--bs-primary-rgb), 0.1);
  background: var(--bs-body-bg);
}

.login-form .form-control::placeholder {
  color: var(--bs-secondary-color);
  opacity: 0.6;
}

/* Password Input Wrapper */
.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrapper .form-control {
  padding-right: 3rem;
  flex: 1;
}

.password-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--bs-secondary-color);
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s ease;
  font-size: 1.125rem;
  z-index: 10;
}

.password-toggle:hover {
  color: var(--bs-primary);
  background: rgba(var(--bs-primary-rgb), 0.1);
}

.password-toggle:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), 0.2);
}

/* Error Messages */
.login-form .invalid-feedback,
.login-form .error {
  color: var(--bs-danger);
  font-size: 0.875rem;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.login-form .alert {
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  border: none;
  font-size: 0.9375rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.login-form .alert i {
  flex-shrink: 0;
}

/* Remove list styles from error lists */
.login-form .errorlist,
.login-form ul.errorlist {
  list-style: none;
  padding: 0;
  margin: 0;
}

.login-form .errorlist li {
  display: inline;
}

.login-form .invalid-feedback ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.login-form .invalid-feedback li {
  display: inline;
}

/* Login Buttons */
.btn-login {
  width: 100%;
  padding: 0.875rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  margin-bottom: 0.75rem;
}

.btn-login-primary {
  background: linear-gradient(135deg, var(--bs-primary) 0%, rgba(var(--bs-primary-rgb), 0.85) 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(var(--bs-primary-rgb), 0.3);
  padding: 1.125rem 1.5rem;
  font-size: 1.0625rem;
}

.btn-login-primary:hover {
  opacity: 0.9;
  box-shadow: 0 6px 20px rgba(var(--bs-primary-rgb), 0.4);
  transform: translateY(-2px);
  color: white;
}

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

.btn-login-secondary {
  background: var(--bs-body-bg);
  color: var(--bs-primary);
  border: 2px solid var(--bs-primary);
  box-shadow: 0 2px 8px rgba(var(--bs-dark-rgb), 0.05);
}

.btn-login-secondary:hover {
  background: var(--bs-primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(var(--bs-primary-rgb), 0.3);
}

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

/* Additional Links */
.login-links {
  margin-top: 1.5rem;
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--bs-border-color);
}

.login-link {
  color: var(--bs-primary);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.login-link:hover {
  color: var(--bs-primary);
  opacity: 0.8;
  transform: translateX(2px);
}

/* Feature Cards */
.login-features {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.feature-item {
  text-align: center;
  padding: 1rem;
  background: rgba(var(--bs-primary-rgb), 0.04);
  border-radius: 12px;
  border: 1px solid rgba(var(--bs-primary-rgb), 0.1);
  transition: all 0.3s ease;
}

.feature-item:hover {
  background: rgba(var(--bs-primary-rgb), 0.08);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 1.5rem;
  color: var(--bs-primary);
  margin-bottom: 0.5rem;
}

.feature-text {
  font-size: 0.8125rem;
  color: var(--bs-secondary-color);
  font-weight: 500;
  margin: 0;
}

/* Remember Me Checkbox */
.login-form .form-check {
  margin-bottom: 1.5rem;
  padding-left: 1.75rem;
}

.login-form .form-check-input {
  width: 1.125rem;
  height: 1.125rem;
  border: 2px solid var(--bs-border-color);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.login-form .form-check-input:checked {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
}

.login-form .form-check-input:focus {
  box-shadow: 0 0 0 4px rgba(var(--bs-primary-rgb), 0.1);
}

.login-form .form-check-label {
  font-size: 0.9375rem;
  color: var(--bs-body-color);
  cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
  .login-hero-section {
    padding: 1.5rem 0;
  }

  .login-hero-section::before,
  .login-hero-section::after {
    width: 300px;
    height: 300px;
  }

  .login-card {
    padding: 2rem 1.5rem;
  }

  .login-icon {
    width: 56px;
    height: 56px;
    font-size: 1.5rem;
    margin-bottom: 0.875rem;
    border-radius: 14px;
  }

  .login-title {
    font-size: 1.375rem;
  }

  .login-subtitle {
    font-size: 0.8125rem;
  }

  .login-features {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .btn-login {
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
  }
  
  .btn-login-primary {
    padding: 1rem 1.25rem;
    font-size: 1rem;
  }
}

@media (max-width: 576px) {
  .login-card {
    padding: 1.75rem 1.25rem;
    border-radius: 16px;
  }

  .login-icon {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    border-radius: 12px;
  }

  .login-title {
    font-size: 1.25rem;
  }

  .login-subtitle {
    font-size: 0.75rem;
  }

  .login-form .form-control {
    padding: 0.75rem 0.875rem;
    font-size: 0.875rem;
  }

  .btn-login {
    padding: 0.675rem 1rem;
    font-size: 0.8125rem;
  }
  
  .btn-login-primary {
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
  }
}

/* Password Requirements Styles */
.password-requirements {
  padding: 10px;
  background-color: #f8f9fa;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.requirements-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.requirement {
  display: flex;
  align-items: center;
  padding: 4px 0;
  color: #6c757d;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.requirement i {
  margin-right: 8px;
  font-size: 0.8rem;
}

.requirement.valid {
  color: #28a745;
}

.requirement.valid i::before {
  content: "\f26b"; /* bi-check-circle-fill */
}

/* Password Match Indicator */
.password-match {
  padding: 8px 10px;
  border-radius: 8px;
  background-color: #f8f9fa;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.match-indicator {
  display: flex;
  align-items: center;
  color: #6c757d;
  font-size: 0.9rem;
}

.match-indicator i {
  margin-right: 8px;
  font-size: 0.8rem;
}

.match-indicator.valid {
  color: #28a745;
}

.match-indicator.valid i::before {
  content: "\f26b"; /* bi-check-circle-fill */
}

.match-indicator.invalid {
  color: #dc3545;
}

.match-indicator.invalid i::before {
  content: "\f659"; /* bi-x-circle-fill */
}

/* Dark Theme Support for Password Requirements */
[data-bs-theme="dark"] .password-requirements {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .password-requirements .text-muted {
  color: #adb5bd !important;
}

[data-bs-theme="dark"] .requirement {
  color: #adb5bd;
}

[data-bs-theme="dark"] .requirement.valid {
  color: #51cf66;
}

[data-bs-theme="dark"] .password-match {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .match-indicator {
  color: #adb5bd;
}

[data-bs-theme="dark"] .match-indicator.valid {
  color: #51cf66;
}

[data-bs-theme="dark"] .match-indicator.invalid {
  color: #ff6b6b;
}

