html {
  width: 100vw;
  height: 100vh;
}

body {
  width: 100%;
  height: 100%;

  padding: 32px 128px;

  display: flex;
  justify-content: center;
  align-items: center;

  background-color: var(--cor-background);
}

/* MAIN CARD */

.login-container {
  width: 100%;
  height: 100%;

  max-height: 600px;

  min-width: calc(
    216px + 448px
  ); /* Soma do .side-img min-width e .side-form min-width */
  max-width: 1120px;

  display: flex;
  flex-direction: row;

  overflow: hidden;

  background-color: var(--white);
  box-shadow: 0 0 10px 8px rgba(0, 0, 0, 0.1);

  border: none;
  border-radius: 16px;
}

/* LEFT */

.side-img {
  width: 30%;
  height: 100%;

  min-width: 216px;

  padding: 16px;

  background-image: url(../assets/img/bg/bg.png);
  background-size: auto 100%;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 0 10px 8px rgba(0, 0, 0, 0.1);
  background-color: var(--gray-100);
}

@media (min-width: 1120px) {
  .side-img {
    background-position: top;
    background-size: auto 100%;
  }
}

.side-img img {
  width: auto;
  height: 48px;
}

/* RIGHT */

.side-form {
  width: 70%;
  height: 100%;

  min-width: calc(320px + padding);

  padding: 64px;

  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  background: transparent;
}

/* FORM CONTENT */

/* Titulo do formulario */

.logo-mobile {
  display: none;
}

.form-title {
  width: 320px;
  text-align: center;
  margin-bottom: 32px;
}

.form-title h1 {
  font-size: 16pt;
  color: var(--gray-800);
}

.form-title p {
  font-size: 12pt;
  color: var(--gray-600);
}

/* Estilos para o Toast Notification */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 6px;
    color: white;
    font-weight: 500;
    z-index: 1000;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s, transform 0.3s;
    max-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: none;
}

.toast.visible {
    opacity: 1;
    transform: translateY(0);
    display: block;
}

.toast.sucesso {
    background-color: #4CAF50;
}

.toast.erro {
    background-color: #F44336;
}

/* Estilos para o formulário de login */
.form-group {
    position: relative;
    margin-bottom: 20px;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    border-color: #4a90e2;
    outline: none;
}

.form-group label {
    position: absolute;
    top: 12px;
    left: 12px;
    font-size: 16px;
    color: #999;
    pointer-events: none;
    transition: all 0.3s;
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label {
    top: -8px;
    left: 8px;
    font-size: 12px;
    background-color: white;
    padding: 0 4px;
    color: #4a90e2;
}

.form-group.erro input {
    border-color: #f44336;
}

.form-group.erro label {
    color: #f44336;
}

.mensagem-erro {
    color: #f44336;
    margin-bottom: 15px;
    text-align: center;
}

/* Botão de login */
#loginButton {
    width: 100%;
    padding: 12px;
    background-color: #4a90e2;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: background-color 0.3s;
}

#loginButton:hover {
    background-color: #357abD;
}

#loginButton:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.btn-loading {
    display: none;
}
/* Botão estilizado para acompanhar os inputs */

#loginForm button {
  width: 320px;
  padding: 12px;
  font-size: 16px;
  font-weight: 500;
  border: 2px solid var(--cor-primaria);
  background-color: transparent;
  color: var(--cor-primaria);
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

#loginForm button:hover,
#loginForm button:focus {
  background-color: var(--cor-primaria);
  color: var(--white);
}

#loginButton {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.btn-loading {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 16px;
}

.btn-text {
  display: inline-block;
}

/* Icone de olho do input senha */

.toggle-password {
  position: absolute;
  right: 12px;
  top: 57%;
  transform: translateY(-50%);
  cursor: pointer;
  z-index: 2;
}

.toggle-password img {
  width: 20px;
  height: 20px;
  opacity: 0.6;
  /* sem cor */
}

.toggle-password img:hover {
  opacity: 1;
}

.mensagem-erro {
  color: var(--cor-erro);
  margin-top: 1rem;
  text-align: center;
}

@media (max-width: 800px) {
  body {
    padding: 16px;

    background-image: url(../assets/img/bg/bg.png);
    background-size: auto 130%;
    background-position: center;
    background-repeat: no-repeat;
  }

  .side-img {
    display: none;
  }

  .side-form {
    width: 100%;
    height: 100%;

    padding: 16px;
  }

  .logo-mobile {
    width: auto;
    height: 48px;

    display: block;

    position: absolute;

    top: 16px;
    left: 16px;
  }

  .form-title {
    width: 100%;
  }

  .form-group {
    width: 100%;
  }

  #loginForm button {
    width: 100%;
  }

  .login-container {
    max-width: none;
    min-width: 100%;

    justify-content: center;
  }
}
