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: 750px;
    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_input_m2{
    display: flex;
    flex-direction: column;
    width: 100%;
    row-gap: 10px;
    margin-top: 20px;
}

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 */
}

.input_geral {
    width: 100%;
    height: 40px;              /* ✅ consistent height */
    font-size: 16px;
    border: 1px #e0e0e0 solid;
    border-radius: 5px;
    padding-left: 10px;        /* ✅ make space for left icon */
    padding-right: 10px;       /* ✅ 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;
    margin-bottom: 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;
}

.edit_form_div{
    width: 90%;
    display: flex;
    flex-direction: column;
    row-gap: 5px;
    align-items: flex-start;   /* força alinhamento à esquerda */
}

.edit_form_div .check_label {
    display: flex;
    flex-direction: row;
    align-items: center;   /* alinha verticalmente */
    column-gap: 10px;
}

.edit_form_div .check_label input {
    order: 0;              /* garante que o input vem primeiro */
    margin-left: 0;        /* remove qualquer deslocamento */
}

.edit_form_div .check_label p {
    margin: 0;
    font-size: 16px;
}

.check_terms {
    appearance: none;         /* remove estilo padrão */
    -webkit-appearance: none; /* para Safari */
    -moz-appearance: none;    /* para Firefox */
    width: 18px;
    height: 18px;
    border: 2px solid #555;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
}

.check_terms:checked {
    background-color: #5aa900bb;
    border-color: #5aa900;
}

.check_terms:checked::after {
    content: "✓";
    color: white;
    font-size: 12px;
    position: absolute;
    top: 0;
    left: 3px;
}


.check_label p a{
    text-decoration: none;
    color: #5aa900;
}

@media (max-width: 600px) {
    .login{
        height: 750px;
        width: 90%;
        box-sizing: border-box;
        margin: 50px auto;
    }
}