* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
}

h2 {
  color: #091c3a;
}

.login-wrapper {
  display: flex;
  width: 100%;
  max-width: 1260px;
  min-height: 850px;
  background-color: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  margin-bottom: 0;
}

.login-image {
  width: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #091c3a 0%, #1a3a5c 100%);
  padding: 40px;
  position: relative;
  overflow: hidden;
}

/* Decorative elements */
.login-image::before {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  top: -100px;
  right: -100px;
}

.login-image::after {
  content: "";
  position: absolute;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 50%;
  bottom: -50px;
  left: -50px;
}

.login-image img {
  width: 100%;
  height: auto;
  max-width: 450px;
  object-fit: contain;
  display: block;
  position: relative;
  z-index: 1;
  filter: brightness(0) invert(1);
}

.login-form-container {
  width: 50%;
  padding: 30px 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: #fff;
  overflow-y: auto;
}

.login-form-container h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 40px;
  color: #091c3a;
  text-transform: uppercase;
  text-align: center;
  letter-spacing: 1px;
}

.form-stack {
  position: relative;
  width: 100%;
  max-width: 500px;
  min-height: 580px;
  height: auto;
  margin: 0;
}

.data-form {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.input-group {
  position: relative;
  width: 100%;
  margin-bottom: 25px;
}

.toggle-password {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: #6b7280;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.toggle-password:hover {
  opacity: 1;
}

.toggle-password svg {
  display: block;
}

.input-group input {
  width: 100%;
  padding: 10px 0;
  border: none;
  border-bottom: 2px solid #d1d5db;
  outline: none;
  font-size: 16px;
  color: #091c3a;
  background: transparent;
  transition: all 0.3s ease;
}

.input-group input:focus,
.input-group input:valid {
  border-bottom: 2px solid #667eea;
}

.input-group label {
  position: absolute;
  top: -18px;
  left: 0;
  color: #6b7280;
  font-size: 13px;
  font-weight: 500;
  pointer-events: none;
  transition: all 0.3s ease;
}


.input-group.input-error label {
  color: #dc3545; /* Red color for error */
}

.input-group input:focus + label,
.input-group input:valid + label {
  color: #667eea;
}

.company-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  margin-top: 5px;
  border: 1px solid #e2e8f0;
}

.company-suggestions.active {
  display: block;
}

.company-suggestion-item {
  padding: 10px 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #091c3a;
  font-size: 14px;
}

.company-suggestion-item:hover,
.company-suggestion-item.selected {
  background: #f7f9fc;
  color: #667eea;
}

.company-suggestions::-webkit-scrollbar {
  width: 8px;
}

.company-suggestions::-webkit-scrollbar-track {
  background: #f7f9fc;
  border-radius: 8px;
}

.company-suggestions::-webkit-scrollbar-thumb {
  background: #cbd5e0;
  border-radius: 8px;
}

.company-suggestions::-webkit-scrollbar-thumb:hover {
  background: #a0aec0;
}

.login-btn {
  width: 100%;
  padding: 16px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 30px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 25px;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.login-btn:active {
  transform: translateY(0);
}

.login,
.forgot-pass,
.register {
  width: 100%;
  text-align: right;
  margin-top: 15px;
}

.login span,
.forgot-pass span,
.register span {
  font-size: 14px;
  color: #667eea;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.login span:hover,
.forgot-pass span:hover,
.register span:hover {
  color: #764ba2;
  text-decoration: underline;
}

#message {
  width: 100%;
  max-width: 900px;
  padding: 15px 20px;
  margin-top: 20px;
  min-height: 50px;
  font-size: 14px;
  text-align: center;
  font-weight: 500;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

@media (min-width: 1025px) {
  #message {
    max-width: 1260px;
  }
}

/* ---------------------------------------------------------------------- */
/* Tablet Responsiveness */
@media (max-width: 1024px) {
  .login-wrapper {
    max-width: 900px;
    min-height: 900px;
  }

  .login-form-container {
    padding: 20px 40px;
  }

  .form-stack {
    max-width: 450px;
    margin: 0;
  }

  .input-group {
    margin-bottom: 25px;
  }

  .input-group input {
    margin-top: 8px;
  }

  .input-group label {
    top: -25px;
  }

  .login-btn {
    margin-top: 15px;
  }

  .login, .forgot-pass, .register {
    margin-top: 10px;
  }

  .login-image img {
    max-width: 380px;
  }
}

/* Mobile Responsiveness - Keep border and shadow */
@media (max-width: 768px) {
  body {
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  }

  .login-wrapper {
    flex-direction: column;
    height: auto;
    max-width: 600px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  }

  .login-image,
  .login-form-container {
    width: 100%;
  }

  .login-image {
    min-height: 150px;
    max-height: 180px;
    order: -1;
    padding: 20px;
    border-radius: 20px 20px 0 0;
  }

  .login-image img {
    max-width: 280px;
    width: 80%;
  }

  .login-form-container {
    padding: 20px;
    justify-content: flex-start;
    border-radius: 0 0 20px 20px;
    overflow-y: visible;
    height: auto;
    min-height: auto;
  }

  .login-form-container h2 {
    font-size: 24px;
    margin-bottom: 15px;
  }

  .form-stack {
    position: relative;
    max-width: 100%;
    height: auto;
    min-height: auto;
    margin: 0;
  }

  .input-group {
    margin-bottom: 25px;
  }

  .input-group input {
    margin-top: 10px;
  }

  .input-group label {
    top: -22px;
  }

  .login,
  .forgot-pass,
  .register {
    display: block !important;
  }

  #message {
    max-width: 600px;
    margin-top: 20px;
    border-radius: 10px;
    width: 100%;
  }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
  body {
    padding: 15px;
  }

  .login-wrapper {
    max-width: 100%;
    border-radius: 15px;
  }

  .login-image {
    min-height: 180px;
    max-height: 220px;
    padding: 25px;
    border-radius: 15px 15px 0 0;
  }

  .login-image img {
    max-width: 280px;
    width: 75%;
  }

  .login-form-container {
    padding: 25px 20px;
    border-radius: 0 0 15px 15px;
    height: auto;
    min-height: auto;
  }

  .login-form-container h2 {
    font-size: 22px;
    margin-bottom: 18px;
  }

  .input-group {
    margin-bottom: 23px;
  }

  .input-group input {
    font-size: 15px;
    padding: 10px 0;
  }

  .input-group label {
    font-size: 12px;
  }

  .login-btn {
    padding: 12px 15px;
    font-size: 14px;
    margin-top: 15px;
  }

  .login span,
  .forgot-pass span,
  .register span {
    font-size: 12px;
  }

  .login,
  .forgot-pass,
  .register {
    margin-top: 8px;
  }

  .form-stack {
    min-height: auto;
  }

  #message {
    padding: 12px 15px;
    font-size: 13px;
    border-radius: 8px;
  }
}

/* Extra Small Devices */
@media (max-width: 360px) {
  body {
    padding: 10px;
  }

  .login-wrapper {
    border-radius: 12px;
  }

  .login-image {
    min-height: 150px;
    max-height: 180px;
    padding: 20px;
    border-radius: 12px 12px 0 0;
  }

  .login-image img {
    max-width: 240px;
    width: 70%;
  }

  .login-form-container {
    padding: 20px 15px;
    border-radius: 0 0 12px 12px;
    height: auto;
    min-height: auto;
  }

  .login-form-container h2 {
    font-size: 20px;
    margin-bottom: 15px;
  }

  .input-group {
    margin-bottom: 25px;
  }

  .form-stack {
    min-height: auto;
  }
}
