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

html, body {
  height: 100%;
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  background: #f4f6fb;
  color: #1a237e;
  /* Ensure the body is the primary scroll container */
  overflow-x: hidden; /* Prevent horizontal scroll */
  overflow-y: auto;   /* Allow vertical scroll for the entire page */
  min-height: 100vh;  /* Ensures body always takes at least full viewport height */
}

/* Container setup */
.container {
  display: flex;
  /* Use min-height instead of height to allow content to push container height */
  min-height: 100vh;
  width: 100vw;
}

/* Left background image */
.bg-img {
  flex: 1;
  background-image: url('assets/bg-img-campus.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  color: white; /* Ensures text color is white */
  padding: 2rem;
  display: flex;
  align-items: flex-end;
  overflow: hidden; /* Ensures no internal overflow creates scrollbars */
}

/* Blue overlay tint - Adjusted opacity for better text contrast */
.bg-img::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(13, 25, 58, 0.7); /* Slightly increased opacity from 0.6 to 0.7 */
  z-index: 1;
}

.left-text {
  position: relative;
  z-index: 2;
  padding-bottom: 2rem;
  /* Added text shadow for enhanced readability */
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5); /* Subtle shadow for better contrast */
}

.left-text h1 {
  font-size: 1.8rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  /* Inherits text-shadow from .left-text */
}

.left-text p {
  font-size: 0.95rem;
  line-height: 1.4;
  /* Inherits text-shadow from .left-text */
}

.left-text .copyright {
  font-size: 0.75rem;
  margin-top: 1rem;
  opacity: 0.7;
  /* Inherits text-shadow from .left-text */
}

/* Right form section */
.auth-form {
  flex: 1;
  background: linear-gradient(120deg, #f7f9fb 60%, #e3e7fa 100%);
  display: flex;
  flex-direction: column; /* Changed to column to allow content to flow naturally */
  align-items: center;
  justify-content: center; /* This centers the form-box vertically */
  padding: 3.5rem 2rem;
  min-height: 100vh;
  /* Removed overflow-y: auto here to prevent nested scrollbars */
  /* Let the body handle the primary scroll */
}

.form-box {
  background: #fff;
  border-radius: 2rem;
  box-shadow: 0 8px 32px 0 rgba(30, 42, 90, 0.13), 0 2px 8px 0 rgba(30, 42, 90, 0.06);
  padding: 3rem 2.2rem 2.5rem 2.2rem;
  /* Changed margin to padding-bottom to avoid pushing outside viewport on tall content */
  /* Or, you can keep margin-top/bottom but ensure the auth-form has enough vertical space */
  margin: 2.5rem 0; /* Keep margins if auth-form can handle overflow */
  max-width: 480px;
  width: 100%;
  position: relative;
  transition: box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  /* Remove justify-content: center from form-box itself if you want content to start from top */
  /* If you want contents to be spaced out, consider adding gap or margins to elements */
}
.form-box:hover {
  box-shadow: 0 12px 40px 0 rgba(30, 42, 90, 0.18), 0 4px 16px 0 rgba(30, 42, 90, 0.09);
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: #1a237e;
  margin-bottom: 1.5rem;
  letter-spacing: 0.5px;
}

.tabs {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  background: #f1f1f1;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(26,35,126,0.04);
}

.tabs .tab {
  flex: 1;
  padding: 0.7rem 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: #1a237e;
  transition: background 0.2s, color 0.2s;
}

.tabs .tab.active {
  background: #fff;
  color: #1a237e;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(26,35,126,0.04);
}

h2 {
  font-size: 2.1rem;
  font-weight: 900;
  margin: 1.5rem 0 0.8rem;
  color: #1a237e;
  letter-spacing: 0.5px;
  text-align: center;
}

.subtext {
  font-size: 1.13rem;
  margin-bottom: 2.2rem;
  color: #4a5568;
  text-align: center;
}

form label {
  font-size: 1.13rem;
  color: #1a237e;
  font-weight: 600;
  margin-bottom: 0.4rem;
  display: block;
  margin-top: 1.2rem;
}

form input, form select {
  width: 100%;
  padding: 1.15rem 1.2rem;
  margin-bottom: 0.3rem;
  border: 1.5px solid #d1d5e7;
  border-radius: 1.1rem;
  font-size: 1.13rem;
  background: #f7f9fb;
  color: #1a237e;
  transition: border 0.2s, box-shadow 0.2s, background 0.2s;
  outline: none;
  box-shadow: none;
}

form input:focus, form select:focus {
  border: 1.5px solid #3949ab;
  box-shadow: 0 0 0 2px #e3e7fa;
  background: #f0f4ff;
}

.input-password {
  position: relative;
}

.input-password input {
  padding-right: 2.5rem;
}

.icon-eye {
  position: absolute;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.3rem;
  height: 1.3rem;
  /* background: url('assets/eye.svg') no-repeat center/contain; */
  opacity: 0.5;
  cursor: pointer;
}

/* Checkbox and forgot password */
.row {
  display: flex;
  gap: 1.3rem;
  margin-bottom: 0.2rem;
}

.row a {
  text-decoration: none;
  color: #1a237e;
  font-weight: 500;
}

.radio-row {
  gap: 2.5rem;
  justify-content: flex-start;
  margin-bottom: 1.5rem;
  margin-top: 0.7rem;
}

.radio-row label {
  font-weight: 600;
  font-size: 1.13rem;
  color: #1a237e;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.radio-row input[type="radio"] {
  accent-color: #3949ab;
  width: 1.1rem;
  height: 1.1rem;
  margin-right: 0.4rem;
}

.sign-in {
  width: 100%;
  padding: 1.15rem;
  background: linear-gradient(90deg, #3949ab 0%, #1a237e 100%);
  color: #fff;
  border: none;
  border-radius: 1.1rem;
  font-size: 1.18rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 2.2rem;
  margin-bottom: 0.7rem;
  box-shadow: 0 2px 8px rgba(26,35,126,0.10);
  transition: background 0.2s, box-shadow 0.2s;
}

.sign-in:hover, .sign-in:focus {
  background: linear-gradient(90deg, #1a237e 0%, #3949ab 100%);
  box-shadow: 0 6px 24px rgba(26,35,126,0.13);
}

.password-hint {
  color: #6b7280;
  font-size: 1.01rem;
  margin-bottom: 0.7rem;
  margin-top: 0.3rem;
}

/* Form view animations - Reverted to a simpler display/opacity control */
/* If you need complex transitions between forms, you'd likely use JS to manage classes */
.form-view {
  /* Removed position: absolute; */
  /* By default, hide it */
  display: none;
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
  width: 100%; /* Ensure it takes full width when visible */
}

.form-view.animate-in {
  display: block; /* Show the form */
  opacity: 1;
  /* Removed transform properties, let content flow naturally */
  pointer-events: auto;
}

.form-view.animate-out {
  display: none; /* Hide the form */
  opacity: 0;
  pointer-events: none;
}

.form-views {
  position: relative; /* Keep relative if you have truly absolutely positioned children later */
  /* Removed min-height, let content define height */
  width: 100%; /* Ensure this container takes full width */
}

/* Input and label styling - Consolidated */
form label {
  font-size: 0.97rem;
  color: #222;
  margin-bottom: 0.2rem;
  display: block;
  font-weight: 500;
}

.input-password {
  position: relative;
}

.input-password input {
  padding-right: 2.2rem;
}

.icon-eye {
  position: absolute;
  right: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.2rem;
  height: 1.2rem;
  background: url('assets/eye.svg') no-repeat center/contain;
  opacity: 0.5;
  cursor: pointer;
}

/* Checkbox and forgot password - Consolidated */
.row label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.93rem;
  color: #444;
  font-weight: 400;
}

.row .forgot {
  color: #1a237e;
  text-decoration: none;
  font-size: 0.93rem;
  font-weight: 500;
  transition: color 0.2s;
}

.row .forgot:hover {
  color: #0d193a;
}

/* Mobile Responsive */
@media (max-width: 900px) {
  .container {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
  }
  .auth-form {
    min-height: unset; /* Allow it to shrink if content is small */
    padding: 2rem 0.5rem;
    overflow-y: visible;

  }
  .form-box {
    padding: 1.2rem 0.5rem 1.5rem 0.5rem;
    max-width: 98vw;
    margin: 1.5rem auto; /* Adjust margins for smaller screens */
  }
  /* Ensure the name row also stacks */
  form .name-row {
    flex-direction: column;
    gap: 0.5rem;
  }
  form .name-row > div {
    margin: 0 !important;
  }
  h2 {
    font-size: 1.3rem;
  }
}

/* College dropdown styling */
select {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  background: #fff;
  color: #222;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

/* Adjust row for first/last name */
/* Used .name-row to avoid conflict with general .row */
form .name-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

form .name-row > div {
  flex: 1; /* Makes each div take equal space */
}

/* Responsive: stack first/last name on mobile */
@media (max-width: 600px) {
  /* This block should already be covered by the 900px media query, but kept for clarity */
  .form-box {
    padding: 1.2rem 0.5rem 1.5rem 0.5rem;
    max-width: 98vw;
  }
  form .name-row {
    flex-direction: column;
    gap: 0.5rem;
  }
  form .name-row > div {
    margin: 0 !important;
  }
  h2 {
    font-size: 1.3rem;
  }
}

#alumni-fields, #student-fields {
  margin-top: 0.7rem;
  margin-bottom: 0.7rem;
}

/* Make sure the form itself takes full width within the form-box */
.form-box form {
  width: 100%;
}