.wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 10vh - 25vh);
  padding: 20px;
}

form {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 2vh, 20px);
  padding: 0 clamp(20px, 5vw, 50px);
  padding-top: 5%;
  padding-bottom: 2%;

  width: min(450px, 95vw);
  height: auto;
  min-height: clamp(340px, 45vh, 450px);
  border-radius: 5%;
  border: 1px solid #364153;
  background-color: #1e2838;

  position: relative;
}

.switch {
  position: absolute;
  top: 0;
  left: 0;

  display: flex;
  flex-direction: row;
  width: min(450px, 95vw);
  height: 20%;
}

.rectangle_login {
  display: flex;
  justify-content: center;
  align-items: center;

  width: 50%;
  height: 55px;
  border-bottom: 2px solid #50a2ff;
  border-radius: 20px 0px 0px 0px;
  background-color: #1c2e49;
  color: #50a2ff;
  font-size: clamp(12px, 1.2vw, 15px);
  text-decoration: none;
  cursor: pointer;
}

.rectangle_signup {
  display: flex;
  justify-content: center;
  align-items: center;

  width: 50%;
  height: 55px;
  border-radius: 0px 20px 0px 0px;
  border-bottom: 2px solid #364153;
  color: #666e7e;
  font-size: clamp(12px, 1.2vw, 15px);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.rectangle_signup:hover {
  background-color: #364153;
  color: aliceblue;
}

.form-group-login,
.form-group-password {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
}

form label {
  color: aliceblue;
  font-size: clamp(12px, 1vw, 15px);
}

#id_login,
#id_password {
  background-color: #16202f;
  border: 1px solid #364153;
  color: white;
  width: 100%;
  height: clamp(40px, 5.5vh, 50px);
  padding: 10px;
  border-radius: 13px;
  font-size: clamp(13px, 1vw, 15px);
}

#id_login:focus,
#id_password:focus {
  outline: 2px solid #50a2ff;
}

.password_reset {
  margin-top: clamp(8px, 1.5vh, 15px);
  margin-left: auto;
  text-decoration: none;
  color: #50a2ff;
  font-size: clamp(11px, 0.9vw, 14px);
}

.password_reset:hover {
  color: #93c5ff;
}

form button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;

  width: 100%;
  height: clamp(40px, 5.5vh, 50px);
  border-radius: 10px;

  border: 1px solid #364153;
  background: linear-gradient(135deg, #5082ec, #1f52b8, #0b3ca8);

  color: aliceblue;
  font-family: sans-serif;
  font-size: clamp(13px, 1vw, 15px);
  cursor: pointer;
}

form button:hover {
  box-shadow: 0px 4px 10px rgb(17, 85, 236);
}

.form-error {
  color: #ff6b6b;
  font-size: clamp(11px, 0.9vw, 13px);
  margin-top: 4px;
}

/* ── MOBILE ── */
@media (max-width: 480px) {
  form {
    border-radius: 12px;
    padding: 0 20px;
  }

  .switch {
    margin-top: -45px;
  }
}
