/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  height: 100%;
  width: auto;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}


body {
  font-family: 'Opensans' , sans-serif;
  background: linear-gradient(to right, #ebe9fb, #d1c4e9);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.35) 0%, transparent 30%),
    radial-gradient(circle at 90% 80%, rgba(255, 255, 255, 0.25) 0%, transparent 30%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.15) 0%, transparent 40%);
  background-repeat: no-repeat;
  background-size: cover;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  color: #2c2c2c;
  position: relative;
  overflow: auto
}

.toast {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #333;
    color: #fff;
    padding: 10px 14px;
    border-radius: 6px;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    pointer-events: auto; /* ensure clicks pass through */
}

#logoutToast i {
    flex-shrink: 0;
}

#logoutToast p {
    flex-grow: 1;
    margin: 0;
}

#toastClose {
    background: none;
    border: none;
    color: inherit;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    pointer-events: auto; /* make sure it’s clickable */
    cursor: pointer;
}

/* Toast visibility + animations */
.toast.show {
  animation: slideInRight 300ms ease forwards;
}

.toast.hide {
  animation: slideOutRight 300ms ease forwards;
}

.toast.hidden {
  display: none !important; 
}


@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}


/* Floating Animations */
@keyframes float {
  0% { transform: translateY(0); }
  50% { transform: translateY(-20px) rotate(10deg); }
  100% { transform: translateY(0); }
}

@keyframes spin {
  0% { transform: rotate(0deg) translateY(0); }
  50% { transform: rotate(180deg) translateY(-15px); }
  100% { transform: rotate(360deg) translateY(0); }
}

/* Wrapper */
.login-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow: visible;
  /* min-height: 0; */
}

/* Card */
.login-card {
  display: flex;
  flex-direction: row;
  max-width: 1080px;
  width: 100%;
  background-color: #e6e6fa;
  border-radius: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  position: relative;
  z-index: 1;
}

/* Visual Side */
.login-visual {
  background-color: #5d1eca;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  color: #ffffff;
}

.login-visual .logo {
  width: 250px;
  margin-bottom: 1.5rem;
}

.robot-animation {
  width: 100%;
  max-width: 280px;
  height: auto;
}

/* Form Side */
.login-form-container {
  flex: 1;
  padding: 2rem 3rem;
  background-color: #ebe9fb;
}

.login-form-container h2 {
  font-size: 2.2rem;
  color: #5d1eca;
  margin-bottom: 0.5rem;
  text-align: center;
}

.login-form-container .subtext {
  color: #6d6d6d;
  font-size: 1rem;
  margin-bottom: 2rem;
  text-align: center;
}

/* Form Fields */
form .form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: #3e3e3e;
}

.input-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon input {
  width: 100%;
  padding: 0.75rem 0.75rem 0.75rem 2.5rem;
  border: 2px solid #b39ddb;
  border-radius: 12px;
  font-size: 1rem;
  outline: none;
  background-color: #f3f0ff;
  transition: border-color 0.3s ease;
}

.input-icon input:focus {
  border-color: #5d1eca;
  box-shadow: 0 0 0 2px rgba(93, 30, 202, 0.2);
}

.input-inside-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #5d1eca;
  pointer-events: none;
  font-size: 1.1rem;
}

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #5d1eca;
}

/* Messages */
.message {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  flex-direction: column;
}

.message p {
  margin-top: -10px;
  font-size: 0.95rem;
  color: #e53935;
}

.message.success p {
  color: #4caf50;
}

.hidden {
  display: none;
}

/* Login Button */
.login-form-container .login-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: #5d1eca;
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
  margin: 2rem auto 0 auto;
}

.login-form-container .login-button:hover {
  background-color: #7e57c2;
  transform: scale(1.05);
}

.login-button .lucide {
  display: inline-block;
  vertical-align: middle;
  font-size: 1.1rem;
}
.footer {
  width: 100%;
  text-align: center;
  padding: 1.8rem 1rem 1.5rem;
  background: linear-gradient(to right, #ebe9fb, #d1c4e9);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.35) 0%, transparent 30%),
    radial-gradient(circle at 90% 80%, rgba(255, 255, 255, 0.25) 0%, transparent 30%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.15) 0%, transparent 40%);
  background-repeat: no-repeat;
  background-size: cover;
  color: #5d1eca;
  font-size: 0.9rem;
  margin-top: auto;
  z-index: 2;
  position: relative;
  flex-shrink: 0;
  border-top: none; /* remove hard line */
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 15px;
  background: linear-gradient(to right, rgba(255, 255, 255, 0.5), transparent 80%);
  opacity: 0.12;
  z-index: 1;
}

.footer .brand {
  font-weight: bold;
  font-size: 1.05rem;
  color: #5d1eca;
  margin-bottom: 0.3rem;
  letter-spacing: 0.5px;
  position: relative;
  z-index: 2;
}

.footer .tagline {
  font-style: italic;
  color: #7e57c2;
  font-size: 0.88rem;
  margin-bottom: 0.4rem;
  position: relative;
  z-index: 2;
}

.footer .copyright {
  font-size: 0.78rem;
  color: #8e80aa;
  position: relative;
  z-index: 2;
}

.footer .links {
  margin-top: 0.6rem;
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  font-size: 1rem;
  position: relative;
  z-index: 2;
}

.footer .links a {
  color: #5d1eca;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer .links a:hover {
  color: #7e57c2;
}



/* Media Queries */
@media (max-width: 991px) {
  body {
    overflow-y: auto;
    overflow-x: hidden;
  }

  .login-wrapper {
    align-items: flex-start;
    min-height: auto;
  }

  .login-card {
    flex-direction: column;
  }

  .login-visual,
  .login-form-container {
    width: 100%;
    padding: 2rem;
  }

  .login-form-container h2,
  .login-form-container .subtext {
    text-align: center;
  }
}

@media (max-width: 600px) {
  .login-wrapper {
    padding: 1rem;
  }

  .login-card {
    border-radius: 15px;
  }

  .login-visual .logo {
    width: 120px;
  }

  .robot-animation {
    max-width: 200px;
  }

  .login-form-container {
    padding: 1.5rem;
  }

  .login-form-container h2 {
    font-size: 1.5rem;
  }

  .login-form-container .subtext {
    font-size: 0.95rem;
  }

  .login-button {
    width: 100%;
    font-size: 0.95rem;
  }

  .input-icon input {
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .login-card {
    border-radius: 12px;
    padding: 1rem;
  }

  .login-visual {
    padding: 1.5rem 1rem;
  }

  .login-form-container {
    padding: 1.2rem;
  }

  .login-form-container h2 {
    font-size: 1.3rem;
  }

  .login-button {
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
  }

  label {
    font-size: 0.85rem;
  }
}
