:root {
  --clr-primary: #f64b4e;
  --clr-danger: #ff7782;
  --clr-success: #41f1b6;
  --clr-dark: #363949;
  --clr-light: rgba(132, 139, 200, 0.18);

  --border-radius: 0.5rem;
  --padding: 0.75rem 1rem;
  --box-shadow: 0 4px 10px var(--clr-light);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--clr-background);
  color: var(--clr-dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-size: cover;
}

img {
  display: block;
  margin: 20px auto;
  width: 60%;
}

.container {
  display: flex;
  flex-direction: column;
  margin: auto;
  justify-content: center;
  align-items: center;
  width: 38%;
  min-height: 100vh;
  background-color: #f9f6f5;
  padding: 2rem 0;
  overflow-y: auto;
}

.form-box {
  background: #fff;
  padding: 2rem;
  margin: 1rem 0;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  max-width: 400px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  display: none;
}

.form-box.active {
  display: block;
}

h2 {
  margin-bottom: 1rem;
  text-align: center;
}

.input_fields {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.input_fields input,
.input_fields select {
  padding: var(--padding);
  border: 1px solid var(--clr-light);
  border-radius: var(--border-radius);
  font-family: inherit;
  font-size: 0.95rem;
}

.input_fields input:focus,
.input_fields select:focus {
  outline: none;
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 2px rgba(115, 128, 236, 0.3);
}

.main_buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

button {
  padding: var(--padding);
  border-radius: var(--border-radius);
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  transition: background 0.2s ease, transform 0.2s ease;
  width: 100%; 
}

button[type="submit"] {
  background: var(--clr-primary);
  color: #fff;
}

button[type="submit"]:hover {
  background: var(--clr-dark);
  transform: translateY(-2px);
}

.forgot-password {
  text-align: center;
  display: block;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--clr-primary);
  font-weight: 500;
  cursor: pointer;
}

.forgot-password:hover {
  text-decoration: underline;
}

.to_signup,
.to_login {
  text-align: center;
  font-size: 0.9rem;
  margin-top: 1rem;
}

.to_signup a,
.to_login a {
  color: var(--clr-primary);
  font-weight: 500;
}

.hidden {
  display: none;
}

#student-dropdown {
  margin-top: 0.5rem;
}

#tutor-dropdown {
  margin-top: 0.5rem;
}

.error-message {
  padding: 12px;
  background: #f8d7da;
  border-radius: 6px;
  font-size: 16px;
  color: #a42834;
  text-align: center;
  margin-bottom: 20px;
}

/* -- PASSWORD EYE STYLE -- */
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrapper input {
  flex: 1;
  padding-right: 2.5rem; /* Make space for the eye icon */
}

.password-toggle {
  position: absolute;
  right: 10px;
  cursor: pointer;
  font-size: 1.1rem;
  user-select: none;
  color: #888;
  transition: color 0.2s ease;
}

.password-toggle:hover {
  color: var(--clr-primary);
}