Alignment of text Area

Pink is my container green is my field area grey is my group in which I embed the textbox.

But all of these are aligned on left side and they are not aligned on right side. My white color text area is no showing 15px margin on right side in the gray box as in left side.

All elements should be on same alignment as on left side, but left side everything is out of the boundary.

Please help me to ménage this problem.

.container {
  position: absolute;
  width: 420px;
  height: 150px;
  background-color: hotpink;
}

fieldset {
  position: relative;
  margin-top: 10px;
  margin-left: 10px;
  margin-bottom: 10px;
  margin-right: 10px;
  background-color: green;
  height: auto;
}

.form-group {
  margin-top: 10px;
  width: 390px;
  height: 45px;
  border-radius: 2px;
  background-color: #eeefef;
  border: solid 1.5px #b3b3b3c9;
  border: solid 1px #b3b3b3c9;
  border: solid 2px #b3b3b3c9;
}

input[type="text"] {
  position: absolute;
  margin-left: 15px;
  margin-right: 15px;
  width: 370px;
}
<div class="container">
  <form>
    <fieldset>
      <div class="form-group">
        <input type="text">
      </div>


    </fieldset>
  </form>
</div>

Answer

You cannot have margin and full width together.

Also you have to consider the margin + width and box-sizing:

* {
  box-sizing: border-box;
}

.container {
  position: absolute;
  width: 455px;
  height: 150px;
  background-color: hotpink;
  /* box-shadow: 
            0 0 0 2px #000,
    0 0 0 3px #999,
    0 0 0 9px #fa0,
    0 0 0 10px #666,
    0 0 0 16px #fd0,
    0 0 0 18px #000,
    0 2px 6px 18px ragbag(0,0,0,0.5);
    background-color: red;
*/
}

fieldset {
  position: relative;
  margin-top: 10px;
  margin-left: 10px;
  margin-bottom: 10px;
  margin-right: 10px;
  background-color: green;
  height: auto;
}

.form-group {
  margin-top: 10px;
  width: 405px;
  height: 45px;
  border-radius: 2px;
  background-color: #eeefef;
  /* box-shadow:
                0 0 0 4px #b3b3b3,
                0 0 0 1px #b3b3b3c9,
                0 0 0 2px #e5e5e5,
                0 0 0 3.5px #f5f5f5,
                0 0 0 3px #f9f9f9;
            */
  border: solid 1.5px #b3b3b3c9;
  border: solid 1px #b3b3b3c9;
  border: solid 2px #b3b3b3c9;
}

input[type="text"] {
  position: absolute;
  margin-left: 15px;
  margin-right: 15px;
  width: 370px;
}
<div class="container">
  <form>
    <fieldset>
      <div class="form-group">
        <input type="text">
      </div>
    </fieldset>
  </form>
</div>