:root { --violet:#7300e6; --ink:#223; --muted:#556; --line:#d9dbe8; --bg:#fef7f1; }

html,body{margin:0;font-family:Arial, sans-serif;background:var(--bg);color:var(--ink);height:100%;overflow-x:hidden}
body{display:flex;align-items:center;justify-content:center;padding:20px;box-sizing:border-box}

.wrap{max-width:520px;margin:0 auto;padding:28px}
.card{background:#fff;border-radius:24px;box-shadow:0 6px 22px rgba(0,0,0,.08);padding:28px}
h1{margin:0 0 12px;color:var(--violet);font-size:1.6rem;text-align:left}
p.desc{margin:0 0 18px;color:var(--muted)}
label{display:block;margin:12px 0 6px;font-weight:600;color:#445}
input,select{width:100%;height:40px;border:1px solid var(--line);border-radius:14px;padding:0 12px;box-sizing:border-box;background:#fff}
.row{display:flex;gap:10px}
.row .field,.row .col{flex:1}
.btn{display:inline-block;width:100%;height:44px;border:none;border-radius:14px;background:var(--violet);color:#fff;font-weight:700;margin-top:16px;cursor:pointer}
.btn:disabled{opacity:.6;cursor:not-allowed}
.text-btn{background:none;border:none;color:var(--violet);font-size:.95rem;margin-top:12px;cursor:pointer;text-decoration:none;padding:0;display:inline-block;text-align:center}
.text-buttons-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}  
.hint{font-size:.83rem;color:#6b7280;margin-top:6px}
.msg{margin-top:12px;font-size:.93rem}
.msg.err{color:#b3261e}
.msg.ok{color:#0b8a2b}
.center{ text-align:center }

section{display:none}
section.active{display:block}
button.primary{all:unset;display:inline-block;width:100%;height:44px;border:none;border-radius:14px;background:var(--violet);color:#fff;font-weight:700;margin-top:16px;cursor:pointer;text-align:center;line-height:44px;box-sizing:border-box}
button.primary:disabled{opacity:.6;cursor:not-allowed}

.screen{max-width:520px;margin:0 auto}
.screen .card h1{margin-top:0}

.pwd-container,.pwd-wrap{position:relative}
.pwd-container input,.pwd-wrap input{padding-right:42px}
.toggle-pwd,
.pwd-wrap button{position:absolute;right:10px;top:50%;transform:translateY(-50%);background:none;border:none;cursor:pointer;color:var(--violet);font-size:1.1rem}

.error-msg{color:#b3261e;font-size:.83rem;margin-top:6px;min-height:1em;text-align:left}

.phone-row{display:flex;gap:10px}
#sDDI{width:120px;min-width:120px;height:40px;border-radius:14px}

.modal{
 display:none; position:fixed;inset:0;background:rgba(0,0,0,0.25);
  display:flex;justify-content:center;align-items:center;
  opacity:0;pointer-events:none;transition:opacity .2s ease;z-index:999
}
.modal.visible{display:flex;opacity:1;pointer-events:auto}
.modal-content{
  width:min(520px, 92vw);max-height:90vh;background:#fff;border-radius:24px;
  box-shadow:0 6px 22px rgba(0,0,0,.18);display:flex;flex-direction:column;overflow:hidden
}
.modal-header{padding:12px 18px;display:flex;justify-content:flex-end}
.modal-body{padding:0 24px 24px;overflow-y:auto}
.modal-body h1{padding-top:6px}
.success-body{padding:32px;text-align:center}

#signupModal .modal-content{width:min(560px, 94vw);height:auto;max-height:92vh}

.loader-overlay{position:fixed;inset:0;background:rgba(255,255,255,.65);display:none;justify-content:center;align-items:center;z-index:9999}
.loader-overlay.active{display:flex}
.loader{width:64px;height:64px;border-radius:50%;border:5px solid #fff;border-top-color:var(--violet);animation:spin 1s linear infinite;box-shadow:0 0 0 1px rgba(0,0,0,.05) inset}
@keyframes spin{to{transform:rotate(360deg)}}

.captcha-wrap{margin-top:12px;display:flex;justify-content:center}
.small-note{font-size:.8rem;color:#667;margin-top:6px;text-align:center}

#loginSection h1{margin-bottom:8px}
#enableBioSection h1,#welcomeSection h1{margin-bottom:8px}

.page-wrap{
  display:flex;
  flex-direction:column;
  gap:24px;
  align-items:center;
  max-width:1200px;
  width:100%;
  padding:20px;
  box-sizing:border-box;
  margin:0 auto;
  overflow-x:hidden;
}

.visual{
  order:-1;
  width:100%;
  max-width:540px;
  display:flex;
  flex-direction:column;
}

.main-col{
  width:100%;
  max-width:520px;
}

@media (min-width: 960px){
  .page-wrap{
    flex-direction:row;
    gap:40px;
    align-items:center; /* Centraliza verticalmente */
    justify-content:center;
  }
  .visual{
    flex:1;
    order:0;
    max-width:none;
    min-height:550px; /* Altura fixa ideal para o carrossel */
  }
  .main-col{
    flex:0 0 520px;
  }
}

.brand-logo{
  display:flex;
  align-items:center;
  justify-content:center;
  margin:0 0 12px;
  flex-shrink:0; /* NOVO: impede que a logo seja comprimida */
}

.brand-logo img{ 
  width:150px; 
  height:auto; 
}

@media (min-width:960px){ 
  .brand-logo{ 
    justify-content:flex-start; 
  } 
}

.hero-carousel{
  position:relative;
  width:100%;
  aspect-ratio: 4 / 3;
  border-radius:24px;
  background:rgba(115,0,230,0.04);
  overflow:hidden;
  box-shadow:0 10px 24px rgba(0,0,0,.05);
  flex:1; /* NOVO: faz o carrossel ocupar todo espaço restante */
  min-height:0; /* NOVO: permite que o flex funcione corretamente */
}

/* NOVO: Em desktop, remove aspect-ratio para ocupar altura total */
@media (min-width: 960px){
  .hero-carousel{
    aspect-ratio: auto;
    height:100%;
  }
}

.hero-carousel object{
  position:absolute; inset:0;
  width:100%; height:100%;
  display:block; border:0; overflow:hidden;
  opacity:0;
  transition: opacity .6s ease;
  will-change: opacity;
}
.hero-carousel object.visible{ opacity:1; }

@media (prefers-reduced-motion: reduce){
  .hero-carousel object{ transition:none !important; }
}

.storyset{
  position: fixed;
  right: calc(12px + env(safe-area-inset-right, 0px));
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 1000;
  font-size: .55rem;
  opacity: .3;
}
.storyset:hover{ opacity: 1; }
.storyset a{
  color: inherit;
  text-decoration: none;
}

/* NOVO: Logo mobile dentro do card */
.mobile-logo {
  display: none;
  text-align: center;
  margin-bottom: 1.5rem;
}

.mobile-logo img {
  max-width: 120px;
  height: auto;
}

@media (max-width: 768px) {
  /* Esconder carrossel em mobile */
  .visual {
    display: none;
  }
  
  /* Mostrar logo no card */
  .mobile-logo {
    display: block;
  }
}

@media (max-width: 480px) {
  .row {
    flex-direction: column;
    gap: 8px;
  }
  label {
    font-size: 0.9rem;
    line-height: 1.2;
  }
  .modal-content,
  #signupModal .modal-content {
    width: 96vw;
    max-width: 96vw;
    border-radius: 18px;
  }
  .modal-body {
    padding: 0 16px 16px;
  }
  .phone-row {
    flex-direction: row;
  }
  #sDDI {
    width: 100px;
    min-width: 100px;
  }
}

.hint {
  display: block;
  font-size: 0.85rem;
  color: #7300e6;
  margin-top: 4px;
  font-weight: 400;
}

#sConselhoWrap {
  display: none;
  margin-top: 8px;
}

/* OTP STEP BASE */
.otp-step {
  display: none;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(6px);
  transition:
    max-height .35s ease,
    opacity .25s ease,
    transform .25s ease;
  pointer-events: none;
}

/* OTP STEP ATIVO */
.otp-step.active {
  display: block; /* ADICIONAR ISSO */
  
max-height: 240px; /* suficiente para input + botão + msg */
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ==============================
   OTP MODAL AJUSTES
   ============================== */

#otpModal .modal-content {
  overflow: visible;
}

/* ==============================
   OTP VISUAL REFINES
   ============================== */

#otpStepCode {
  margin-top: 16px;
}

#otpCode {
  letter-spacing: 6px;
  font-size: 1.1rem;
  text-align: center;
}

/* ==============================
   MODAL CLOSE BUTTON
   ============================== */

.modal-header .text-btn {
  font-size: 1.8rem;          /* tamanho do X */
  line-height: 1;
  padding: 6px 10px;          /* área clicável maior */
  margin: 0;
  color: #7300e6;
  font-weight: 400;
  cursor: pointer;
}

.modal-header .text-btn:hover {
  opacity: 0.7;
}

/* ==============================
   OTP TEXT HINT
   ============================== */

.otp-hint {
  margin: 0 0 8px;
  font-size: 0.9rem;
  color: #556;
}

/* ==============================
   MELHORIAS ADICIONAIS
   ============================== */

/* Transições suaves nos inputs */
input:focus, select:focus {
  outline: none;
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(115, 0, 230, 0.1);
  transition: all 0.2s ease;
}

/* Hover nos botões primários */
button.primary:hover:not(:disabled),
.btn:hover:not(:disabled) {
  background: #6200cc;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(115, 0, 230, 0.3);
  transition: all 0.2s ease;
}

button.primary:active:not(:disabled),
.btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(115, 0, 230, 0.2);
}

/* Hover nos text buttons */
.text-btn:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* Animação do loader mais suave */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Melhor espaçamento dos cards */
.card {
  transition: box-shadow 0.3s ease;
}

/* Mensagens de erro/sucesso mais visíveis */
.msg.err {
  background: rgba(179, 38, 30, 0.1);
  padding: 8px 12px;
  border-radius: 8px;
  border-left: 3px solid #b3261e;
}

.msg.ok {
  background: rgba(11, 138, 43, 0.1);
  padding: 8px 12px;
  border-radius: 8px;
  border-left: 3px solid #0b8a2b;
}
/* Esconder steps quando modal não está visível */
.modal:not(.visible) .otp-step {
  display: none !important;
  pointer-events: none !important;
}




/* novo css index novo */

/* =========================================================
   AUTH CARDS – TRANSIÇÕES
   ========================================================= */

.auth-container {
  position: relative;
  min-height: 520px;
}

.auth-card {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(24px);
  transition: opacity .25s ease, transform .35s ease;
}

.auth-card.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

/* Avançar */
.auth-card.forward-enter { transform: translateX(24px); }
.auth-card.forward-leave { transform: translateX(-24px); opacity: 0; }

/* Voltar */
.auth-card.back-enter { transform: translateX(-24px); }
.auth-card.back-leave { transform: translateX(24px); opacity: 0; }

/* Trocas neutras */
.auth-card.fade-enter { transform: translateY(8px); }
.auth-card.fade-leave { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .auth-card {
    transition: none !important;
    transform: none !important;
  }
}
