/* =========================
   BASE
========================= */
*{
  margin:0;
  padding:0;
  box-sizing:border-box;
  font-family:'Poppins', sans-serif;
}

:root{
  --amarelo:#ffeb3b;
  --verde1:#2E7D32;
  --verde2:#1B5E20;
  --dourado:#9E7E38;
  --vidro: rgba(255,255,255,.15);
  --shadow: 0 8px 25px rgba(0,0,0,.3);
  --ease: cubic-bezier(.2,.8,.2,1);
}

body{
  background: linear-gradient(135deg, var(--verde1), var(--verde2), var(--dourado));
  min-height:100vh;
  display:flex;
  justify-content:center;
  align-items:center;
  padding:20px;
  overflow-x:hidden;
}

/* =========================
   LAYOUT PRINCIPAL
========================= */
.painel-auth{
  width:min(920px, 100%);
  min-height:620px;
  background: var(--vidro);
  border-radius:25px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(15px);
  overflow:hidden;
  position:relative;
}

.overlay-wrapper,
.forms-wrapper{
  position:absolute;
  top:0;
  width:50%;
  height:100%;
  transition: transform .8s var(--ease);
}

.overlay-wrapper{ left:0; }
.forms-wrapper{ left:50%; }

.painel-auth.modo-login .overlay-wrapper{ transform: translateX(0); }
.painel-auth.modo-login .forms-wrapper{ transform: translateX(0); }

.painel-auth.modo-cadastro .forms-wrapper{ transform: translateX(-100%); }
.painel-auth.modo-cadastro .overlay-wrapper{ transform: translateX(100%); }

/* =========================
   OVERLAY
========================= */
.auth-overlay{
  height:100%;
  position:relative;
  overflow:hidden;
}

.auth-overlay::before{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(135deg, rgba(46,125,50,.92), rgba(27,94,32,.88), rgba(158,126,56,.85));
}

.overlay-conteudo{
  position:relative;
  z-index:2;
  height:100%;
  padding:35px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:14px;
  text-align:center;
  color:#fff;
}

.overlay-conteudo h2{
  font-size: clamp(1.6rem, 2.5vw, 2.4rem);
  font-weight:900;
}

.overlay-conteudo p{
  font-size:14px;
  line-height:1.35;
  opacity:.95;
}

.btn-outline{
  margin-top:8px;
  background: transparent;
  border:2px solid rgba(255,255,255,.85);
  border-radius:12px;
  padding:12px 14px;
  color:#fff;
  font-weight:800;
  cursor:pointer;
  transition: transform .25s ease, background .25s ease;
}

.btn-outline:hover{
  transform: scale(1.03);
  background: rgba(255,255,255,.12);
}

/* =========================
   FORMS (TOPO)
========================= */
.auth-forms{
  height:100%;
  padding:30px 40px;
  color:#fff;
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  gap:14px;
  overflow:hidden;
}

.topo{
  text-align:center;
}

.logo img{
  width:150px;
  height:150px;
  border-radius:50%;
  margin-bottom:15px;
  background:#fff;
  object-fit:cover;
  box-shadow: 0 0 20px var(--amarelo);
  animation: bounce 2s infinite;
}

h1{
  margin-bottom:10px;
  font-size: clamp(1.6rem, 2.6vw, 2rem);
  font-weight:800;
}

.subtitulo{
  margin-bottom:16px;
  font-size:14px;
  opacity:.95;
}

.sessao{
  display:flex;
  justify-content:center;
  gap:12px;
  border-bottom:2px solid rgba(255,255,255,.2);
  padding-bottom:8px;
}

.aba{
  background:transparent;
  border:none;
  cursor:pointer;
  padding:8px 12px;
  font-weight:800;
  color:#ddd;
  font-size:14px;
  transition: all .25s ease;
}

.aba.ativa{
  color: var(--amarelo);
  border-bottom:3px solid var(--amarelo);
}

/* =========================
   SLIDER (DESLIZE + SCROLL DO CADASTRO)
========================= */
.forms-viewport{
  width:100%;
  border-radius:18px;
  overflow:hidden;
  flex: 1 1 auto;
  height: calc(100% - 260px);
  min-height: 240px;
}

.forms-slider{
  display:flex;
  width:200%;
  height:100%;
  transition: transform .75s var(--ease);
  will-change: transform;
  transform: translate3d(0,0,0);
}

.form-slide{
  width:50%;
  height:100%;
  overflow-y:auto;
  padding: 10px 8px 30px;
}

.formulario{
  display:flex;
  flex-direction:column;
  gap:12px;
}

/* scrollbar (Chrome/Edge) */
.form-slide::-webkit-scrollbar{ width: 8px; }
.form-slide::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,.25);
  border-radius: 999px;
}
.form-slide::-webkit-scrollbar-track{ background: transparent; }

/* =========================
   INPUTS / SELECT / BOTÕES
========================= */
input, select{
  width:100%;
  padding:12px;
  border:none;
  border-radius:10px;
  outline:none;
  font-size:14px;
  background: rgba(255,255,255,.9);
  color:#333;
}

input:focus, select:focus{
  box-shadow: 0 0 10px rgba(255,235,59,.7);
}

.select-wrap select{
  cursor:pointer;
  appearance:none;
  -webkit-appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg fill='%23333' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 12px center;
  background-size:20px;
}

button{
  background: linear-gradient(45deg, #66bb6a, #43a047);
  border:none;
  padding:12px;
  color:#fff;
  font-weight:800;
  border-radius:10px;
  cursor:pointer;
  transition: transform .25s ease, filter .25s ease;
}

button:hover{
  transform: scale(1.03);
  filter: brightness(1.05);
}

/* =========================
   ESQUECI SENHA
========================= */
.linha-ajuda{
  display:flex;
  justify-content:flex-end;
  margin-top: 0;
}

.link-ajuda{
  background: transparent;
  border: none;
  padding: 4px 2px;
  color: rgba(255,255,255,.95);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: transform .2s ease, opacity .2s ease;
}

.link-ajuda:hover{
  transform: translateY(-1px);
  opacity: .9;
}

.link-ajuda:focus{
  outline: none;
  box-shadow: 0 0 0 3px rgba(255,235,59,.35);
  border-radius: 6px;
}

/* =========================
   RESPONSIVO
========================= */
@media (max-width: 860px){
  .painel-auth{
    min-height:auto;
    padding-bottom: 10px;
  }

  .overlay-wrapper,
  .forms-wrapper{
    position:relative;
    width:100%;
    left:0;
    transform:none !important;
    transition:none;
  }

  .auth-overlay{
    min-height:220px;
  }

  .auth-forms{
    padding: 22px 18px;
    overflow: visible;
  }

  .forms-viewport{
    height:auto;
    min-height: unset;
    overflow: visible;
  }

  .forms-slider{
    height:auto;
  }

  .form-slide{
    height:auto;
    overflow: visible;
    padding: 10px 2px 10px;
  }

  .linha-ajuda{
    justify-content:center;
  }

  .link-ajuda{
    padding: 8px 6px;
  }

  .logo img{
    width:120px;
    height:120px;
  }
}

/* =========================
   ANIMAÇÃO
========================= */
@keyframes bounce{
  0%,100%{ transform: translateY(0); }
  50%{ transform: translateY(-10px); }
}
