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

:root {
  --bg-main: #1e3a8a;
  --bg-form: #3b82f6;
  --bg-welcome: #2563eb;
  --white: #ffffff;
  --success: #22c55e;
  --error: #ef4444;
  --social-google: #db4437;
  --social-facebook: #4267B2;
}

* {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* WRAPPER */
.wrapper {
  width: 85%;
  max-width: 900px;
  margin: 60px auto;
  display: flex;
  flex-wrap: wrap;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 40px 120px rgba(0,0,0,0.4);
  background: #f0f4f8;
}

/* FORM BOX */
.form-box {
  width: 50%;
  background: linear-gradient(135deg, var(--bg-form), var(--bg-main));
  padding: 60px 50px;
  color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.form-box h2 {
  text-align: center;
  font-size: 36px;
  margin-bottom: 40px; /* spacing below heading */
}

/* INPUT BOX */
.input-box {
  position: relative;
  margin: 25px 0;
}

.input-box input {
  width: 100%;
  height: 50px;
  background: transparent;
  border: none;
  border-bottom: 2px solid rgba(255,255,255,0.6);
  outline: none;
  color: var(--white);
  font-size: 16px;
  padding-left: 40px;
}

.input-box label {
  position: absolute;
  left: 40px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.8);
  pointer-events: none;
  transition: 0.3s;
}

.input-box input:focus ~ label,
.input-box input:valid ~ label {
  top: -6px;
  font-size: 13px;
  color: #dbeafe;
}

.input-box i {
  position: absolute;
  top: 50%;
  left: 10px;
  transform: translateY(-50%);
  font-size: 18px;
}

/* BUTTON */
.btn {
  width: 100%;
  height: 50px;
  margin-top: 30px;
  border-radius: 40px;
  border: none;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(135deg, #60a5fa, #2563eb);
  color: white;
  transition: 0.3s;
}

.btn:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 30px rgba(96,165,250,0.6);
}

/* LINKS BELOW FORM */
.logreg-link {
  margin-top: 25px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px; /* adds spacing between links */
}

.logreg-link a {
  color: #dbeafe;
  text-decoration: none;
  font-weight: 500;
  transition: 0.3s;
}

.logreg-link a:hover {
  text-decoration: underline;
}

/* WELCOME BOX */
.welcome-box {
  width: 50%;
  background: linear-gradient(135deg, var(--bg-welcome), var(--bg-main));
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
}

.welcome-box h2 {
  font-size: 34px;
  margin-bottom: 25px;
}

/* ALERT MESSAGES */
.message {
  position: fixed;
  top: 25px;
  left: 50%;
  transform: translateX(-50%);
  padding: 16px 28px;
  border-radius: 14px;
  font-weight: 600;
  color: white;
  z-index: 9999;
  animation: toast 6s ease forwards;
  box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}

.message.success { background: #10b981; } /* brighter green */
.message.error { background: #ef4444; } /* bright red */

/* TOAST ANIMATION */
@keyframes toast {
  0% { opacity: 0; transform: translate(-50%, -20px); }
  10% { opacity: 1; transform: translate(-50%, 0); }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -20px); }
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .wrapper { flex-direction: column; height: auto; }
  .form-box, .welcome-box { width: 100%; }
  .form-box { padding: 40px 25px; }
}
.password-box {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 18px;
    user-select: none;
}

.lock-icon {
    position: absolute;
    right: 45px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
}
