/* Modern color variables */
:root {
  --primary-color: #4a90e2;
  --secondary-color: #5c6ac4;
  --background-color: #f5f7fa;
  --text-color: #2d3748;
  --error-color: #e53e3e;
  --success-color: #38a169;
  --input-bg: #ffffff;
  --input-border: #e2e8f0;
  --box-shadow: rgba(0, 0, 0, 0.1);
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  background: linear-gradient(180deg, #929292, #000000); /* Blue gradient */
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 20px;
}

.login-container {
  background: linear-gradient(180deg, #036300, #48e002); /* Blue gradient */
  padding: 2.5rem;
  border-radius: 1rem;
  box-shadow: 0 10px 25px var(--box-shadow);
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  /* removed align-items to not interfere with form group width */
  text-align: center;
  animation: fadeIn 0.5s ease-out;
}

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

h1 {
  color: white;
  font-size: 1.875rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.logo-container img {
  max-width: 200px;
  height: auto;
  margin-bottom: 1.5rem;
  background-color: white;
  padding: 5px;
  border-radius: 5px;
}

.form-group {
  margin-bottom: 1.5rem;
  width: 100%; /* Ensure form groups take the full container width */
  display: flex; /* Use flexbox to control inner items */
  flex-direction: column; /* Stack items vertically */
}

label {
  display: block;
  color: rgb(2, 2, 2);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  text-align: left;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-color);
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 0.5rem;
  transition: all 0.2s ease-in-out;
  box-sizing: border-box; /* To include padding and border in width */
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.btn-primary {
  width: 100%;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: rgb(3, 3, 3);
  background-color: transparent;
  border: 1px solid rgb(0, 0, 0);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  text-align: center; /* Keep button text centered */
  box-sizing: border-box; /* To include padding and border in width */
}

.btn-primary:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

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

.password-toggle {
  position: relative;
}

.password-toggle .toggle-icon {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: var(--text-color);
  opacity: 0.5;
  transition: opacity 0.2s;
}

.password-toggle .toggle-icon:hover {
  opacity: 1;
}

/* Error message styling */
.alert {
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  animation: slideIn 0.3s ease-out;
}

.alert-danger {
  background-color: #fff5f5;
  color: var(--error-color);
  border: 1px solid #fed7d7;
}

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

/* Responsive adjustments */
@media (max-width: 480px) {
  .login-container {
    padding: 1.5rem;
  }

  h1 {
    font-size: 1.5rem;
  }
}

.form-check {
  margin-bottom: 1rem;
}

.form-check-input {
  margin-right: 0.5rem;
}

/* Copyright Styling */
.copyright {
  color: #ddd;
  font-size: 0.8rem;
  margin-top: 1rem;
}
