: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 }

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}

.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}

.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}

.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;
    justify-content:center;
  }
  .visual{
    flex:1;
    order:0;
    max-width:none;
    min-height:550px;
  }
  .main-col{
    flex:0 0 520px;
  }
}

.brand-logo{
  display:flex;
  align-items:center;
  justify-content:center;
  margin:0 0 12px;
  flex-shrink:0;
}

.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;
  min-height:0;
}

@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;
}

.mobile-logo {
  display: none;
  text-align: center;
  margin-bottom: 1.5rem;
}

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

@media (max-width: 768px) {
  .visual {
    display: none;
  }
  .mobile-logo {
    display: block;
  }
}

@media (max-width: 480px) {
  .row {
    flex-direction: column;
    gap: 8px;
  }
  label {
    font-size: 0.9rem;
    line-height: 1.2;
  }
  .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;
}

/* 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);
}

.text-btn:hover {
  opacity: 0.8;
  text-decoration: underline;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.card {
  transition: box-shadow 0.3s ease;
}

.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;
}

/* OTP code input */
#otpCode {
  letter-spacing: 6px;
  font-size: 1.1rem;
  text-align: center;
}

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

/* =========================================================
   AUTH CARDS — SISTEMA DE NAVEGAÇÃO POR CARDS
   ========================================================= */

.auth-container {
  position: relative;
  overflow: hidden;
}

/* Todos os cards ocultos por padrão */
.auth-card {
  display: none;
}

/* Card ativo visível */
.auth-card.active {
  display: block;
}

#cardWelcome .card {
  box-shadow: none;
}

/* =========================================================
   SIGNUP DOTS — Indicador de etapa (dots simples)
   ========================================================= */

.signup-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}

.signup-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
  transition: background 0.3s ease;
}

.signup-dot.active {
  background: var(--violet);
}

/* =========================================================
   SIGNUP SUCCESS CARD
   ========================================================= */

.success-body {
  text-align: center;
  padding: 8px 0;
}

.success-body h1 {
  text-align: center;
}

/* =========================================================
   OTP RESEND BUTTON
   ========================================================= */

#resendOtpBtn {
  display: block;
  margin-top: 12px;
}

#resendOtpBtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  text-decoration: none;
}

/* =========================================================
   BACK BUTTON WRAPPER
   ========================================================= */

.back-btn-wrap {
  margin-top: 8px;
  text-align: center;
}
