/* Restrito — Login / Recuperação de senha (Figma Admin) */

html:has(body.restrito-auth),
body.restrito-auth {
  height: 100%;
  margin: 0;
  overflow: hidden;
}

.restrito-auth {
  position: relative;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  background-color: #4DA391;
  font-family: 'Lato', 'Nunito', sans-serif;
  overflow: hidden;
}

.restrito-auth__background {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  background-color: #4DA391;
  background-image: url('/img/background-restrito.png');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  pointer-events: none;
}

.restrito-auth__background::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: rgba(77, 163, 145, 0.16);
}

.restrito-auth__page {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.restrito-auth__main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  min-height: 0;
  overflow: hidden;
}

.restrito-auth__card {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  width: 100%;
  max-width: 46rem;
  max-height: calc(100dvh - 2rem);
  padding: 2rem 2.5rem;
  background-color: #FFFFFF;
  border-radius: 8px;
  box-shadow: 0 0 14px rgba(58, 59, 69, 0.1);
  overflow: hidden;
}

.restrito-auth__brand {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.restrito-auth__logo {
  display: block;
  width: 100%;
  max-width: 20rem;
  max-height: 5.75rem;
  height: auto;
  object-fit: contain;
}

.restrito-auth__content {
  flex: 0 0 18.75rem;
  width: 100%;
  max-width: 18.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  min-height: 0;
}

.restrito-auth__title {
  margin: 0;
  width: 100%;
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.2;
  text-align: center;
  color: #171717;
}

.restrito-auth__subtitle {
  margin: 0;
  width: 100%;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.35;
  text-align: center;
  color: #585861;
}

.restrito-auth__form-area {
  width: 100%;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(209, 211, 226, 0.5);
}

.restrito-auth__form-area form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  margin: 0;
}

.restrito-auth__field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  width: 100%;
  margin-bottom: 0;
}

.restrito-auth__label {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.25rem;
  color: #858796;
}

.restrito-auth__input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.restrito-auth__input,
.restrito-auth__select {
  width: 100%;
  height: 2rem;
  padding: 0.375rem 0.875rem;
  font-size: 0.875rem;
  font-family: inherit;
  color: #585861;
  background-color: #FFFFFF;
  border: 1px solid #D1D3E2;
  border-radius: 1.5rem;
  outline: none;
  box-shadow: none;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.restrito-auth__select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23858796' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  cursor: pointer;
}

.restrito-auth__input:focus,
.restrito-auth__select:focus {
  border-color: #4DA391;
  box-shadow: 0 0 0 0.2rem rgba(77, 163, 145, 0.15);
}

.restrito-auth__input.invalid-form,
.restrito-auth__select.invalid-form {
  border-color: #E74A3B;
}

.restrito-auth__input--password {
  padding-right: 2.5rem;
}

.restrito-auth__toggle-password {
  position: absolute;
  right: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.125rem;
  height: 1.125rem;
  padding: 0;
  border: none;
  background: transparent;
  color: #858796;
  cursor: pointer;
  line-height: 1;
  font-size: 0.875rem;
}

.restrito-auth__toggle-password:hover {
  color: #585861;
}

.restrito-auth__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  width: 100%;
  height: 2.125rem;
  padding: 0.375rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  line-height: 1.25rem;
  text-align: center;
  border-radius: 1.5rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, color 0.15s ease-in-out;
}

.restrito-auth__btn--primary {
  color: #FFFFFF;
  background-color: #4DA391;
  box-shadow: 0 0 3px rgba(58, 59, 69, 0.1);
}

.restrito-auth__btn--primary:hover,
.restrito-auth__btn--primary:focus {
  color: #FFFFFF;
  background-color: #3A8771;
}

.restrito-auth__btn--outline {
  color: #4DA391;
  background-color: #FFFFFF;
  border-color: #4DA391;
  box-shadow: 0 0 6px rgba(58, 59, 69, 0.1);
}

.restrito-auth__btn--outline:hover,
.restrito-auth__btn--outline:focus {
  color: #3A8771;
  border-color: #3A8771;
  text-decoration: none;
}

.restrito-auth__btn .spinner-border {
  width: 0.875rem;
  height: 0.875rem;
}

.restrito-auth__link {
  display: block;
  width: 100%;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: normal;
  text-align: center;
  color: #4DA391;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.restrito-auth__link--underline {
  text-decoration: underline;
}

.restrito-auth__link:hover {
  color: #3A8771;
  text-decoration: underline;
}

@media (max-height: 760px) {
  .restrito-auth__card {
    gap: 1.5rem;
    padding: 1.25rem 1.75rem;
  }

  .restrito-auth__logo {
    max-width: 16rem;
    max-height: 4.5rem;
  }

  .restrito-auth__content {
    gap: 0.75rem;
  }

  .restrito-auth__form-area form {
    gap: 0.625rem;
  }
}

@media (max-width: 991.98px) {
  html:has(body.restrito-auth),
  body.restrito-auth {
    overflow: auto;
  }

  .restrito-auth {
    height: auto;
    min-height: 100dvh;
    overflow: auto;
  }

  .restrito-auth__page {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  .restrito-auth__main {
    padding: 1.5rem 1rem;
    overflow: visible;
  }

  .restrito-auth__card {
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem;
    max-height: none;
    overflow: visible;
  }

  .restrito-auth__brand {
    width: 100%;
  }

  .restrito-auth__logo {
    max-width: 14rem;
    max-height: 4rem;
  }

  .restrito-auth__content {
    flex: 1 1 auto;
    max-width: 100%;
  }
}
