body {
    margin: 0;
    font-family: system-ui, sans-serif;
    min-height: 100vh;
    height: 100%;
    width: 100%;
    overflow-x: hidden;
    background: linear-gradient(to bottom right, rgba(133, 180, 0, 0.5), rgb(255, 255, 255));

    display: grid;
    place-items: center; /* shorthand for centering */
}

.login{
    width: 450px;
    padding-left: 30px;
    padding-right: 30px;
    height: 350px;
    margin: auto;
    background-color: white;
    border-radius: 15px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

h1{
    text-align: center;
    margin-bottom: 0;
    margin-top: 40px;
}

form{
    width: 100%;
    margin: auto;
    align-items: center;
    justify-items: center;
    display: flex;
    flex-direction: column;
    row-gap: 20px;
}

.subtitle{
    margin-top: 5px;
    text-align: center;
    font-size: 16px;
    color: rgb(83, 83, 83);
}

.label_input{
    display: flex;
    flex-direction: column;
    width: 100%;
    row-gap: 10px;
}

label{
    color: black;
    font-weight: 500;
}

.password_input,
.email_input {
    width: 100%;
    height: 40px;              /* ✅ consistent height */
    font-size: 16px;
    border: 1px #e0e0e0 solid;
    border-radius: 5px;
    padding-left: 40px;        /* ✅ make space for left icon */
    padding-right: 40px;       /* ✅ make space for right icon (eye) */
    box-sizing: border-box;    /* ✅ prevents overflow */
}

.login_button{
    width: 100%;
    margin-top: 0px;
    color: white;
    background-color: #5aa900;
    border: none;
    border-radius: 5px;
    height: 37px;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.login_button:hover{
    background-color: rgba(107, 170, 29, 0.84);
}

.login_options{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-items: center;
    text-align: center;
}

.nao{
    margin-top: 20px;
    margin-bottom: 5px;
    color: #535353;
}

.registar{
    text-decoration: none;
    color: #5aa900;
    margin-top: 0;
}

.esqueceu_password{
    text-decoration: none;
    color: #5aa900;
}

.registar:hover,
.esqueceu_password:hover{
    text-decoration: underline;
}

.voltar{
    margin-top: 30px;
    text-decoration: none;
    color: rgb(83, 83, 83);
}

.voltar img{
    width: 10px;
    margin-right: 10px;
}

.voltar:hover{
    text-decoration: underline;
}

.input_wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input_wrapper input {
  width: 100%;
  padding: 13px 40px; /* leave space for icons */
}

.icon_mail,
.icon_eye,
.icon_pass {
    position: absolute;
    top: 50%;                  /* ✅ center vertically */
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
}


.icon_pass.left,
.icon_mail.left {
  left: 15px;
}

.icon_eye.right {
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
}

.icon_mail img {
  width: 14px;
  height: 12px;
}

.icon_pass img {
  width: 12px;
  height: 13px;
}

.icon_eye img {
  width: 18px;
  height: 15px;
}

@media (max-width: 600px) {

    h1{
        font-size: 30px;
    }

    .login{
        height: 350px;
        width: 90%;
        box-sizing: border-box;
        margin: 50px auto;
    }
}