html {
  padding: 0px;
  margin: 0px;
}

@font-face {
  font-family: "Agrnadir";
  src: url("../../../fonts/Agrandir.woff2") format("woff2"),
    url("../../../fonts/Agrandir-Regular.otf") format("opentype");
}

:root {
  --brand: #01373c;
  --bg1: #cdd5d5 ;
  --bg2: #ffffff;
}

/* ================================================= */
/* ESTILOS PADRÃO - MOBILE FIRST                     */
/* Tudo aqui é pensado para telas pequenas primeiro. */
/* ================================================= */

body {
  font-family: "Poppins", "Agrnadir", sans-serif;
  color: var(--brand);
  background: linear-gradient(180deg, var(--bg1) 0%, var(--bg2) 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  margin: 0;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

.main-container {
  margin-left: auto;
  margin-right: auto;
  padding: 0px 1rem;
  max-width: 80rem;
  width: 100%;
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.grid-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  align-items: center;
  width: 100%;
}

.form-column {
  text-align: left;
}

.logo {
  display: flex;
  justify-content: center;
}

.logo img {
  width: 120px;
  height: auto;
}

.form-column-usuario {
  text-align: left;
}

.logo-usuario {
  display: flex;
  justify-content: center;
  margin-top: 0.5rem
}

.logo-usuario img {
  width: 120px;
  height: auto;
}


.welcome-text {
  font-size: 15px;
  line-height: 1;
  margin: 0px;
}

.title {
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 0px;
}

.login-card-description {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 0.5rem;
}

.cpf-form {
  max-width: 36rem;
}

.cpf-form > *:not(:first-child) {
  margin-top: 0.75rem;
}

.input-group,
.input-group-cpf,
.input-group-cod {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
  text-align: left;
}

.input-group-cpf {
  flex-direction: row; /* Mantém lado a lado se precisar */
}
.input-group-cod {
  flex-direction: row; /* Mantém lado a lado se precisar */
  gap: 1rem; /* Gap menor para mobile */
}

.cpf-input {
  width: 100%;
  padding: 1rem 1.5rem;
  background-color: #ffffff;
  border: none;
  border-radius: 18px;
  font-size: 16px;
  font-family: "Poppins", "Agrnadir", sans-serif;
  color: #333;
  transition: all 0.3s ease-in-out;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.cpf-input::placeholder {
  color: #999;
  font-weight: 300;
}

.cpf-input:focus {
  outline: none;
  border-color: #007aff;
  box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.2);
  background-color: #ffffff;
}

.cpf-input.error {
  border-color: #ef4444;
}

.cpf-input.error:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.4);
}

.submit-button,
.submit-button-cpf {
  width: 50%;
  padding: 1rem 2.5rem;
  border: none;
  cursor: pointer;
  border-radius: 18px;
  color: #fff;
  font-weight: 600;
  background-color: var(--brand);
  transition: all 0.3s ease-in-out;
  font-family: "Agrnadir", sans-serif;
  font-size: 1rem;
  box-shadow: 0 4px 10px rgba(0, 55, 60, 0.2);
}

.submit-button:hover,
.submit-button-cpf:hover {
  opacity: 0.95;
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(0, 55, 60, 0.3);
}

.submit-button:active,
.submit-button-cpf:active {
  transform: translateY(0);
  box-shadow: 0 2px 5px rgba(0, 55, 60, 0.2);
}

.submit-button:disabled,
.submit-button-cpf:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.form-note {
  font-size: 1rem;
  color: var(--brand);
  font-weight: bold;
  text-decoration: none;
  padding: 0.5rem;
}

.error-message {
  display: none;
  font-size: 0.875rem;
  color: #dc2626;
  font-weight: 500;
}

.error-message.show {
  display: block;
}

.alt-login-container,
.alt-login-container-cpf {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.alt-login-text {
  font-size: 0.875rem;
  color: #7e9094;
  margin-bottom: 1rem;
  text-align: center;
}

.text-tracked {
  color: var(--brand);
}

.alt-login-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.5rem;
  border-radius: 18px;
  font-weight: 500;
  color: #fff;
  background-color: #9ca3af;
  transition: background-color 0.3s ease-in-out, transform 0.2s ease-in-out;
  text-decoration: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  font-size: 13px;
}

.alt-login-button:hover {
  background-color: #7b8593;
  transform: translateY(-1px);
}

.alt-login-button:active {
  transform: translateY(0);
}

.carousel-column {
  margin-bottom: 1rem;
}

.carousel-mobile {
  display: block; /* Garante que ele seja visível */
  margin-top: 1.5rem;
}
.carousel-desktop {
  display: none; /* Esconde a versão de desktop */
}

.carousel {
  width: 100%;
  border-radius: 28px;
  overflow: hidden; /* Garante que as imagens respeitem as bordas arredondadas */
}

/* --- ALTERAÇÃO #2 --- */
/* Controlamos o tamanho da imagem e do slide aqui */
.carousel-cell {
  width: 100%;
  height: 200px;
  border-radius: 28px;
}

.carousel-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Garante que a imagem cubra o espaço sem distorcer */
}

.site-footer {
  text-align: center;
  font-size: 14px;
  color: #6c757d;
  flex-shrink: 0;
}

.form-wrapper {
  position: relative;
  width: 100%;
  height: auto;
  min-height: 500px;
  overflow: hidden;
}

#login-form-container,
#esqsenha-form-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 1rem;
}

#login-form-container {
  transform: translateX(0%);
}

#esqsenha-form-container {
  transform: translateX(100%);
  display: block !important;
}

.form-wrapper.slide-to-forgot #login-form-container {
  transform: translateX(-100%);
}

.form-wrapper.slide-to-forgot #esqsenha-form-container {
  transform: translateX(0%);
}

#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.85);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loading-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #fff;
  padding: 30px 40px;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.spinner {
  width: 50px;
  height: 50px;
  border: 6px solid #f3f3f3;
  border-top: 6px solid var(--brand);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

#loading-message {
  margin-top: 20px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--brand);
  text-align: center;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.esqMsg {
  display: none;
  text-align: center;
}

.esqMsg > h4 {
  color: green;
  font-size: 2rem;
  margin-bottom: 0px;
}

.btn-container {
  display: flex;
  justify-content: center;
}

.btn-container-senha {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

/* =============================================================== */
/* ESTILOS PARA DESKTOP (E TELAS MAIORES)                          */
/* O @media (min-width) AUMENTA e MODIFICA os estilos para desktop */
/* =============================================================== */

@media (min-width: 992px) {
  .main-container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .grid-container {
    grid-template-columns: 1.1fr 1fr;
    padding: 0;
    gap: 10.5rem;
  }

  .form-column {
    text-align: left;
    height: 550px;
  }
  
   .form-column-usuario {
    text-align: left;
    height: 740px;
  }
  
  .logo {
    justify-content: center;
    margin-bottom: 4rem;
  }

  .logo-usuario {
    justify-content: center;
    margin-bottom: 1.5rem;
  }

  .logo-usuario img {
    width: 160px;
  }

  .logo img {
    width: 160px;
  }

  .welcome-text {
    font-size: 15px;
  }

  .title {
    font-size: 25px;
  }

  .login-card-description {
    font-size: 15px;
  }

  .input-group-cod {
    gap: 2.5rem;
  }

  .cpf-input {
    font-size: 15px;
  }

  .submit-button,
  .submit-button-cpf {
    font-size: 1.05rem;
  }

  .carousel-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
  }

  .carousel-mobile {
    display: none;
  }
  .carousel-desktop {
    display: flex; /* Reativa a versão de desktop */
    flex-direction: column;
    align-items: center;
  }

  .carousel {
    width: 100%;
    aspect-ratio: 4 / 5;
    border-radius: 28px;
    box-shadow: 0 25px 50px rgba(0, 55, 60, 0.15);
    position: relative;
  }

  .carousel-cell {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 28px;
    overflow: hidden;
  }

  .carousel-cell img {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 28px;
  }

  .slide-content {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    color: #fff;
    text-align: left;
    padding: 2.5rem;
  }

  .slide-content .text-light {
    font-size: 1.125rem;
  }

  .slide-content .slide-title {
    font-size: 52px;
  }

  .slide-content .slide-title.small {
    font-size: 44px;
  }

  .flickity-page-dots {
    position: absolute;
    bottom: -2.5rem;
    width: 100%;
    text-align: center;
  }

  .flickity-page-dots .dot {
    width: 12px;
    height: 12px;
    background-color: #a0aec0;
    opacity: 0.8;
    transition: background-color 0.3s;
    margin: 0 4px;
  }

  .flickity-page-dots .dot.is-selected {
    background-color: var(--brand);
    opacity: 1;
  }

  .flickity-prev-next-button {
    display: none;
  }

  .form-wrapper {
    height: 540px;
  }

  .alt-login-container {
    margin-top: 0.5rem;
  }

  .btn-container {
    display: flex;
    justify-content: center;
  }

  .btn-container-senha {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
  }
}
