body {
  background: linear-gradient(135deg, #eef5f9, #f8fbff);
}

html,
body {
  height: 100%;
  margin: 0;
}

.login-container {
  display: flex;
  height: 100vh;
  /* 🔴 important */
  width: 100%;
  overflow: hidden;
  /* prevents scroll */
}


/* LEFT IMAGE */
.login-image {
  flex: 1;
  position: relative;
}

.login-image,
.login-form {
  height: 100vh;
}

.login-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.login-form {
  display: flex;
  flex-direction: column;
  justify-content: center;
}


.image-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px;
}

.image-overlay h2 {
  font-size: 34px;
  margin-bottom: 10px;
}

.image-overlay p {
  font-size: 16px;
  opacity: 0.9;
}

/* FORM */
.login-form {
  flex: 1;
  background: #fff;
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.05);
}

.form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.form-header h2 {
  font-size: 26px;
}

.btn-outline {
  border: 1.5px solid #1f8f8b;
  color: #1f8f8b;
  padding: 8px 14px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  font-size: 14px;
  color: #555;
  display: block;
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid #ddd;
  font-size: 15px;
  transition: 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: #1f8f8b;
  box-shadow: 0 0 0 3px rgba(31, 143, 139, 0.1);
}

.password-group {
  position: relative;
}

.toggle-password {
  position: absolute;
  right: 15px;
  top: 42px;
  cursor: pointer;
  opacity: 0.6;
}

/* ROW */
.form-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.captcha {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.link {
  font-size: 14px;
  color: #1f8f8b;
  text-decoration: none;
  font-weight: 600;
}

/* BUTTON */
.btn-login {
  width: 100%;
  padding: 14px;
}

/* ERROR MESSAGE STYLES */
.error-message {
  display: block;
  color: #dc3545;
  font-size: 13px;
  margin-top: 5px;
  font-weight: 500;
}

.form-group input:invalid {
  border-color: #dc3545;
}

.form-group input:valid {
  border-color: #28a745;
}

@media (max-width: 768px) {
  .login-container {
    flex-direction: column;
    height: 100vh;
  }

  .login-image {
    height: 40vh;
  }

  .login-form {
    height: 60vh;
    overflow-y: auto;
    /* allows scroll only if needed */
  }
}