@import url("https://fonts.googleapis.com/css2?family=Quicksand:wght@300;400;500;600;700&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
  font-size: 62.5%;
}

.login-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 7rem 0;
  background: linear-gradient(
      217deg,
      rgba(252, 248, 238, 1),
      rgba(255, 0, 0, 0) 70.71%
    ),
    linear-gradient(127deg, rgba(237, 246, 239, 1), rgba(0, 255, 0, 0) 70.71%),
    linear-gradient(336deg, rgba(235, 240, 252, 1), rgba(0, 0, 255, 0) 70.71%);
}

.login-header {
  font-size: 32px;
  font-weight: 600;
  text-align: left;
  padding-bottom: 20px;
  font-family: "Poppins", sans-serif;
}

/* FORM STYLING */
.login-form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  width: 400px;
  padding: 40px;
  background-color: #eff7ef;
  border-radius: 10px;
  color: #000;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.login-form h2 {
  font-size: 2rem;
  margin-bottom: 20px;
}

/* INPUT GROUP - For simple forms (signin) */
.input-group {
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}

.input-group input {
  width: 100%;
  padding: 12px;
  margin-bottom: 10px;
  border-radius: 5px;
  border: 1px solid #ccc;
  background-color: #fff;
  transition: background-color 0.3s ease;
  font-size: 1.6rem;
  box-sizing: border-box;
}

.input-group input:focus {
  background-color: #ffffff;
  outline: none;
  border-color: #00cc66;
}

/* FORM GROUP - For Django forms (registration) */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  font-size: 14px;
}

/* Style ALL form inputs for registration */
.login-form input,
.login-form select,
.login-form textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 5px;
  border-radius: 5px;
  border: 1px solid #ccc;
  background-color: #fff;
  transition: all 0.3s ease;
  font-size: 1.6rem;
  box-sizing: border-box;
}

/* Specific styling for different input types */
.login-form textarea {
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
}

.login-form select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23000000%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 12px top 50%;
  background-size: 12px auto;
  padding-right: 30px;
}

.login-form input[type="file"] {
  padding: 8px;
  background-color: #f9f9f9;
}

/* Focus states */
.login-form input:focus,
.login-form select:focus,
.login-form textarea:focus {
  background-color: #ffffff;
  outline: none;
  border-color: #00cc66;
}

/* Password toggle styles for login page */
.input-group {
    position: relative; /* Add this */
  }
  
  .password-toggle {
    position: absolute;
    right: 12px;
    top: 35px;
    cursor: pointer;
    color: #666;
    font-size: 1.6rem;
    z-index: 10;
    background: white;
    padding: 8px;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
  }
  
  .password-toggle:hover {
    color: #007bff;
    background: #f5f5f5;
    border-color: #007bff;
  }
  
  /* Make sure the password input has enough padding on the right */
  .input-group input[type="password"],
  .input-group input[type="text"] {
    padding-right: 45px; /* Make room for the eye icon */
  }

/* Password toggle button styling */
.password-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.password-wrapper input {
  margin-bottom: 0;
}

.password-toggle-btn {
  background: #f0f0f0;
  border: 1px solid #ddd;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 4px;
  font-size: 1.4rem;
  white-space: nowrap;
}

/* BUTTONS */
.login-form button,
.submit-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 5px;
  background-color: #00cc66;
  color: #fff;
  cursor: pointer;
  font-size: 1.4rem;
  margin-top: 10px;
}

.login-form button:hover,
.submit-btn:hover {
  background-color: #00994d;
}

/* Help text and error messages */
.help-text {
  display: block;
  font-size: 0.85em;
  color: #666;
  margin-top: 5px;
}

.error {
  color: #dc3545;
  font-size: 0.85em;
  margin-top: 5px;
  list-style: none;
  padding: 0;
}

.error li {
  margin: 2px 0;
}

/* Messages styling */
.messages {
  margin-bottom: 20px;
}

.alert {
  font-size: 1.4rem;
  padding: 10px;
  border-radius: 5px;
  margin-bottom: 10px;
}

/* Links */
#forgot-password,
.login-link {
  display: block;
  text-align: right;
  margin-top: 10px;
  color: #00994d;
  font-size: 14px;
  text-decoration: none;
}

#forgot-password:hover,
.login-link:hover {
  text-decoration: underline;
}

/* Responsive design */
@media screen and (max-width: 748px) {
  .login-form {
    width: 60vw;
  }
}

@media (max-width: 768px) {
  .signin-section .signin {
    width: 100%;
    padding: 40px;
  }
}