:root {
  --custom-green: #2AAC32;
}

/* Login page specific styles with blurred background */
.login-form-container {
  position: relative;
  background: url('../assets/municipal-hall.webp') no-repeat center center !important;
  background-size: cover !important;
  z-index: 1;
  padding: 2rem 1rem;
}

.login-form-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: inherit;
  filter: blur(8px);
  z-index: -1;
}

.login-form-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.3);
  z-index: -1;
}

.login-form-container .card {
  width: 400px;
  border-radius: 15px;
  border: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2), 0 1px 3px rgba(0, 0, 0, 0.08);
  background-color: rgba(255, 255, 255, 0.9); /* Slightly transparent card */
  backdrop-filter: blur(5px);
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.login-form-container .card-body {
  border-radius: 15px;
  padding: 2.5rem;
  padding: 3rem 2rem;
}

/* Logo container styling - Cache Bust v2.0 */
.logo-container {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Login-specific logo overrides - Won't affect other pages */
.login-form-container .logo-image,
.login-form-container img.logo-image,
.login-form-container .text-center .logo-image,
.login-form-container .mb-4 .logo-image {
  width: 100px !important;
  height: 100px !important;
  max-width: 100px !important;
  max-height: 100px !important;
  min-width: 100px !important;
  min-height: 100px !important;
}

/* Mobile specific overrides - Login page only */
@media screen and (max-width: 768px) {
  .login-form-container .logo-image,
  .login-form-container img.logo-image,
  .login-form-container .text-center .logo-image,
  .login-form-container .mb-4 .logo-image {
    width: 80px !important;
    height: 80px !important;
    max-width: 80px !important;
    max-height: 80px !important;
    min-width: 80px !important;
    min-height: 80px !important;
  }
}

/* Logo styling - Clean and maintainable approach */
.logo-image {
  width: 100px;
  height: 100px;
  object-fit: contain;
  object-position: center;
  display: block;
  margin: 0 auto 1.5rem auto;
  background-color: white;
  padding: 10px;
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  animation: none;
  transition: none;
  flex-shrink: 0;
  aspect-ratio: 1 / 1;
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(42, 172, 50, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(42, 172, 50, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(42, 172, 50, 0);
  }
}


/* Form styling */
.form-control {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 2px solid #dee2e6;
  background-color: #fff;
  transition: all 0.3s ease;
  width: 100%;
  font-size: 0.95rem;
  border-radius: 8px;
  border: 1px solid #ddd;
  padding: 0.75rem 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:hover {
  border-color: #b8bfc6;
}

.form-control:focus {
  box-shadow: 0 0 0 0.25rem rgba(42, 172, 50, 0.25);
  border-color: var(--custom-green);
  outline: none;
  border-color: #2AAC32;
  box-shadow: 0 0 0 0.2rem rgba(42, 172, 50, 0.25);
}

.form-label {
  font-weight: 600;
  color: #495057;
  margin-bottom: 0.5rem;
  display: block;
  font-size: 0.95rem;
}

/* Button styling */
.custom-btn {
  background-color: var(--custom-green);
  color: white;
  padding: 0.75rem;
  border-radius: 8px;
  font-weight: 600;
  border: none;
  transition: all 0.3s ease;
  font-size: 1rem;
  background-color: #2AAC32;
  border-color: #2AAC32;
  color: white;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.custom-btn:hover {
  background-color: #239b2a;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  background-color: #218838;
  border-color: #218838;
  transform: translateY(-2px);
}

.custom-text {
  color: var(--custom-green);
  font-weight: 600;
  font-size: 1.25rem;
  color: #2AAC32;
  font-weight: 600;
  letter-spacing: 0.5px;
  /* Remove any text animations */
  animation: none !important;
  text-shadow: none;
}

/* Additional styles for better visual hierarchy */
.text-muted {
  font-size: 0.9rem;
  opacity: 0.8;
}

.text-center a {
  font-weight: 500;
  transition: all 0.3s ease;
}

.text-center a:hover {
  opacity: 0.9;
  text-decoration: underline !important;
}


/* Animation keyframes */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Add animation to login card */
.login-form-container .card {
  /* ...existing card styles... */
  animation: fadeIn 0.5s ease-out;
}

/* Error message styling */
.login-error {
  background-color: rgba(220, 53, 69, 0.1);
  color: #dc3545;
  padding: 0.75rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  text-align: center;
  animation: shake 0.5s ease-in-out;
}

/* Success message styling */
.login-success {
  background-color: rgba(42, 172, 50, 0.1);
  color: var(--custom-green);
  padding: 0.75rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  text-align: center;
  animation: fadeIn 0.5s ease-out;
}

/* Form input focus animation */
.form-control:focus {
  /* ...existing focus styles... */
  transform: translateY(-2px);
}

/* Button animation */
.custom-btn:active {
  transform: translateY(1px);
}

/* Link hover animation */
.text-center a {
  /* ...existing link styles... */
  position: relative;
}

.text-center a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: var(--custom-green);
  transition: width 0.3s ease;
}

.text-center a:hover::after {
  width: 100%;
}

.alert {
  max-width: 90%;
  width: 500px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.alert-success {
  background-color: #d4edda;
  border-color: #c3e6cb;
  color: #155724;
  animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
  from {
      transform: translate(-50%, -100%);
      opacity: 0;
  }
  to {
      transform: translate(-50%, 0);
      opacity: 1;
  }
}
.forgot-password-link {
  color: #2AAC32;
  transition: all 0.2s ease;
}
.forgot-password-link:hover {
  color: #218838;
  text-decoration: underline !important;
}
.custom-btn {
  background-color: #2AAC32;
  color: white;
  transition: all 0.2s ease;
}
.custom-btn:hover {
  background-color: #218838;
  color: white;
}
.modal-content {
  border-radius: 10px;
  border: none;
}
.modal-header {
  border-radius: 10px 10px 0 0;
}
.forgot-password-link {
  color: #2AAC32;
  transition: all 0.2s ease;
}
.forgot-password-link:hover {
  color: #218838;
  text-decoration: underline !important;
}
.custom-btn {
  background-color: #2AAC32;
  color: white;
  transition: all 0.2s ease;
}
.custom-btn:hover {
  background-color: #218838;
  color: white;
}
.modal-content {
  border-radius: 10px;
  border: none;
}
.modal-header {
  border-radius: 10px 10px 0 0;
}
/* Password container and toggle button styling - matches login page */
.password-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-toggle-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 8px;
    z-index: 10;
    transition: all 0.3s ease;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.password-toggle-btn:hover {
    color: #495057;
    background-color: rgba(0, 0, 0, 0.05);
}

.password-toggle-btn:focus {
    outline: none;
    color: #007bff;
    background-color: rgba(0, 123, 255, 0.1);
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.password-toggle-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.password-toggle-btn i {
    font-size: 1rem;
    transition: all 0.2s ease;
}

/* Ensure form control has proper padding for the button */
.password-container .form-control {
    padding-right: 3rem;
}

/* Focus state for password inputs */
.password-container .form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Validation states styling */
.password-container .form-control.is-valid {
    border-color: #28a745;
    padding-right: 3rem;
    background-image: none; /* Remove default validation icon since we have toggle button */
}

.password-container .form-control.is-invalid {
    border-color: #dc3545;
    padding-right: 3rem;
    background-image: none; /* Remove default validation icon since we have toggle button */
}

/* Custom validation feedback positioning */
.password-container + .invalid-feedback,
.password-container + .valid-feedback {
    display: block;
    margin-top: 0.25rem;
}

/* Hover effect for the entire password container */
.password-container:hover .form-control {
    border-color: #b0b0b0;
}

.password-container:hover .password-toggle-btn {
    color: #495057;
}

/* Active/focus state for container */
.password-container:focus-within .form-control {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.password-container:focus-within .password-toggle-btn {
    color: #007bff;
}

/* Animation for icon change */
.password-toggle-btn i.bi-eye,
.password-toggle-btn i.bi-eye-slash {
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .password-toggle-btn {
        width: 28px;
        height: 28px;
        right: 8px;
        padding: 6px;
    }
    
    .password-container .form-control {
        padding-right: 2.5rem;
    }
}

/* Responsive adjustments */
@media (max-width: 576px) {
  .card {
      margin: 0 15px;
      padding: 0;
  }
  
  .card-body {
      padding: 25px 15px;
  }
  
  h4.custom-text {
      font-size: 1.25rem;
  }
  
  .logo-image {
      width: 60px !important;
      height: 60px !important;
      min-width: 60px !important;
      min-height: 60px !important;
      max-width: 60px !important;
      max-height: 60px !important;
  }
}

@media (max-width: 768px) {
    .login-form-container .card-body {
        padding: 2rem 1.5rem;
    }
    
    .custom-text {
        font-size: 1.25rem;
    }
    
    .logo-image {
        width: 80px !important;
        height: 80px !important;
        min-width: 80px !important;
        min-height: 80px !important;
        max-width: 80px !important;
        max-height: 80px !important;
        margin-bottom: 1rem !important;
    }
}

@media (max-width: 480px) {
    .login-form-container {
        padding: 1rem 0.5rem;
    }
    
    .login-form-container .card-body {
        padding: 1.5rem 1rem;
    }
    
    .custom-text {
        font-size: 1.1rem;
    }
    
    .logo-image {
        width: 70px !important;
        height: 70px !important;
        min-width: 70px !important;
        min-height: 70px !important;
        max-width: 70px !important;
        max-height: 70px !important;
    }
}

/* Remove any global animations that might cause blinking */
* {
    animation-duration: 0s !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
}

/* Disable specific animations */

/* Remove any Bootstrap or other framework animations */
.fade {
    transition: opacity 0.15s linear !important;
}

/* Ensure no elements have blinking cursor except inputs */
*:not(input):not(textarea) {
    cursor: default;
}

input, textarea {
    cursor: text;
}

button, .btn, a {
    cursor: pointer;
}