/* Entrar / criar conta — layout próprio (a base de cores, fontes e botões vem de portal.css) */
:root { --campo: 50px; }
body { margin: 0; background: #fff; }

/* modo inicial já vem do <head>: nada de "piscar" links de todos os modos */
html[data-modo="criar"] [data-show]:not([data-show~="criar"]),
html[data-modo="entrar"] [data-show]:not([data-show~="entrar"]),
html[data-modo="senha"] [data-show]:not([data-show~="senha"]),
html[data-google="off"] .so-google,
html[data-modo="senha"] .so-google { display: none !important; }
html[data-perfil="cliente"] [data-perfil-show="montador"],
html[data-perfil="montador"] [data-perfil-show="cliente"] { display: none !important; }

.acesso { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 1fr; }

/* ---------- painel da marca */
.marca-lado { position: relative; overflow: hidden; color: #fff; background: #14122B; isolation: isolate; }
.marca-lado__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: opacity .35s ease; }
.marca-lado::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(20, 18, 43, .55) 0%, rgba(20, 18, 43, .1) 32%, rgba(20, 18, 43, .55) 62%, rgba(26, 20, 66, .96) 100%); }
.marca-lado__in { height: 100%; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; padding: 22px 20px 26px; }
.marca-lado__logo img { height: 30px; width: auto; display: block; }
.marca-lado__rotulo { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22); backdrop-filter: blur(8px); padding: 6px 12px; border-radius: 999px; }
.marca-lado h2 { color: #fff; font-size: clamp(1.45rem, 2.4vw + .6rem, 2.5rem); line-height: 1.12; letter-spacing: -.02em; margin: 12px 0 0; max-width: 17ch; }
.marca-lado__lista { list-style: none; padding: 0; margin: 20px 0 0; display: none; gap: 12px; }
.marca-lado__lista li { display: flex; gap: 12px; align-items: flex-start; font-size: .98rem; line-height: 1.45; color: rgba(255, 255, 255, .9); }
.marca-lado__lista svg { flex: none; width: 22px; height: 22px; margin-top: 1px; padding: 4px; border-radius: 50%; background: rgba(155, 140, 255, .28); color: #E3DEFF; }
.marca-lado__rodape { display: none; font-size: .82rem; color: rgba(255, 255, 255, .62); }

/* ---------- formulário */
.form-lado { display: flex; flex-direction: column; padding: 28px 20px 24px; }
.form-lado__in { width: 100%; max-width: 408px; margin: 0 auto; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.form-lado h1 { font-size: 1.7rem; line-height: 1.2; letter-spacing: -.02em; color: var(--tinta); margin: 0; }
.form-lado .sub { color: var(--suave); margin: 8px 0 24px; font-size: .98rem; }
.form-lado__rodape { width: 100%; max-width: 408px; margin: 28px auto 0; font-size: .78rem; color: var(--suave); text-align: center; line-height: 1.6; }
.form-lado__rodape a { color: var(--suave); text-decoration: underline; text-underline-offset: 2px; }

/* perfil: controle segmentado */
.segmento { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: #F2F1F8; border-radius: 14px; margin-bottom: 22px; }
.segmento button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border: 0; border-radius: 10px; background: none; font: inherit; font-size: .92rem; font-weight: 700; color: var(--suave); cursor: pointer; transition: background .15s, color .15s, box-shadow .15s; }
.segmento button svg { width: 18px; height: 18px; }
.segmento button[aria-selected="true"] { background: #fff; color: var(--tinta); box-shadow: 0 1px 2px rgba(23, 23, 28, .06), 0 4px 12px -6px rgba(52, 38, 140, .3); }
.segmento button[aria-selected="true"] svg { color: var(--lilas); }

/* Google */
.btn-google { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: var(--campo); border: 1.5px solid #DADCE0; border-radius: 12px; background: #fff; color: #1F1F1F; font: inherit; font-weight: 700; font-size: .98rem; text-decoration: none !important; cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s; }
.btn-google:hover { background: #F8F9FB; border-color: #C7CAD1; box-shadow: 0 2px 10px -6px rgba(0, 0, 0, .25); }
.btn-google svg { width: 20px; height: 20px; }
.btn-google[aria-busy="true"] { pointer-events: none; opacity: .75; }
.divisor { display: flex; align-items: center; gap: 14px; margin: 22px 0; color: var(--suave); font-size: .82rem; }
.divisor::before, .divisor::after { content: ""; flex: 1; height: 1px; background: var(--linha); }

/* campos */
.f { display: grid; gap: 16px; }
.f-campo { display: grid; gap: 6px; }
.f-campo label { font-size: .88rem; font-weight: 700; color: var(--tinta); display: flex; justify-content: space-between; align-items: baseline; }
.f-campo label .link { font-size: .84rem; }
.f-campo input { width: 100%; height: var(--campo); padding: 0 14px; border: 1.5px solid var(--linha); border-radius: 12px; background: #fff; font: inherit; font-size: 1rem; color: var(--tinta); transition: border-color .15s, box-shadow .15s; }
.f-campo input::placeholder { color: #A3A2B3; }
.f-campo input:hover { border-color: #D3D0E2; }
.f-campo input:focus { outline: none; border-color: var(--lilas); box-shadow: 0 0 0 4px var(--lilas-50); }
.f-campo input[aria-invalid="true"] { border-color: var(--vermelho); box-shadow: 0 0 0 4px var(--vermelho-50); }
.senha2 { position: relative; }
.senha2 input { padding-right: 52px; }
.senha2 button { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 10px; background: none; color: var(--suave); cursor: pointer; }
.senha2 button:hover { background: var(--lilas-50); color: var(--lilas-700); }
.senha2 button svg { width: 20px; height: 20px; }
.senha2 .olho-fechado { display: none; }
.senha2 button[aria-pressed="true"] .olho-aberto { display: none; }
.senha2 button[aria-pressed="true"] .olho-fechado { display: block; }

/* força da senha */
.forca { display: grid; gap: 8px; margin-top: 2px; }
.forca__barras { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.forca__barras i { height: 4px; border-radius: 4px; background: var(--linha); transition: background .2s; }
.forca[data-nivel="1"] i:nth-child(-n+1) { background: var(--vermelho); }
.forca[data-nivel="2"] i:nth-child(-n+2) { background: #E0A100; }
.forca[data-nivel="3"] i { background: var(--verde); }
.forca__regras { display: flex; flex-wrap: wrap; gap: 6px 14px; list-style: none; padding: 0; margin: 0; font-size: .8rem; color: var(--suave); }
.forca__regras li { display: inline-flex; align-items: center; gap: 6px; }
.forca__regras li::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid #CFCDDC; box-sizing: border-box; }
.forca__regras li.ok { color: var(--verde); }
.forca__regras li.ok::before { border: 0; background: var(--verde) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 10px no-repeat; }

/* botão principal com carregando */
.btn-prim { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: var(--campo); margin-top: 6px; border: 0; border-radius: 12px; background: var(--lilas); color: #fff; font: inherit; font-size: 1rem; font-weight: 800; cursor: pointer; box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 8px 20px -10px rgba(91, 70, 220, .8); transition: background .15s, transform .05s; }
.btn-prim:hover { background: var(--lilas-600); }
.btn-prim:active { transform: translateY(1px); }
.btn-prim[aria-busy="true"] { pointer-events: none; color: transparent; }
.btn-prim[aria-busy="true"]::after, .btn-google[aria-busy="true"]::after { content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: gira .7s linear infinite; }
.btn-google { position: relative; }
.btn-google[aria-busy="true"]::after { border-color: rgba(0, 0, 0, .15); border-top-color: var(--lilas); right: 16px; }
@keyframes gira { to { transform: rotate(360deg); } }

.troca { margin: 22px 0 0; text-align: center; font-size: .94rem; color: var(--suave); }
.link { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: var(--lilas-700); cursor: pointer; text-decoration: none; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.link:disabled { color: var(--suave); font-weight: 600; cursor: default; text-decoration: none; }
.voltar-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 18px; font-size: .9rem; }
.voltar-link svg { width: 16px; height: 16px; }

/* aviso de erro / informação */
.alerta { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: .9rem; line-height: 1.45; margin-bottom: 18px; background: var(--vermelho-50); color: #9B2C2C; border: 1px solid #F6CACA; }
.alerta svg { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.alerta--info { background: var(--lilas-50); color: var(--lilas-700); border-color: var(--lilas-100); }
.alerta[hidden] { display: none; }

/* passo do código */
.icone-topo { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--lilas-50); color: var(--lilas); margin-bottom: 18px; }
.icone-topo svg { width: 28px; height: 28px; }
.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 6px 0 4px; }
.otp input { width: 100%; height: 60px; padding: 0; text-align: center; font: inherit; font-size: 1.6rem; font-weight: 800; color: var(--tinta); border: 1.5px solid var(--linha); border-radius: 12px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.otp input:focus { outline: none; border-color: var(--lilas); box-shadow: 0 0 0 4px var(--lilas-50); }
.otp input:not(:placeholder-shown) { border-color: #C9C1F7; background: #FCFBFF; }
.reenviar { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; font-size: .9rem; color: var(--suave); }

/* ---------- celular: faixa com a imagem no topo */
@media (max-width: 1023px) {
  .marca-lado { min-height: 210px; border-radius: 0 0 24px 24px; }
  .marca-lado__in { justify-content: space-between; }
  .marca-lado h2 { font-size: 1.35rem; max-width: 22ch; }
  .marca-lado__rotulo { font-size: .66rem; padding: 5px 10px; }
  .form-lado { padding-top: 26px; }
  .form-lado__in { justify-content: flex-start; }
}

/* ---------- PC: duas colunas */
@media (min-width: 1024px) {
  .acesso { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
  .marca-lado { min-height: 100vh; position: sticky; top: 0; height: 100vh; }
  .marca-lado__in { padding: 36px 48px 44px; }
  .marca-lado__lista { display: grid; }
  .marca-lado__rodape { display: block; margin-top: 26px; }
  .form-lado { padding: 40px 48px 28px; min-height: 100vh; }
  .form-lado h1 { font-size: 1.95rem; }
}
@media (min-width: 1440px) {
  .marca-lado__in { padding: 44px 64px 56px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- cadastro em etapas (/comecar/) no mesmo layout */
.etapas { list-style: none; padding: 0; margin: 22px 0 0; display: none; gap: 4px; counter-reset: e; }
.etapas li { display: flex; gap: 14px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; color: rgba(255, 255, 255, .62); transition: background .2s; }
.etapas li b { display: block; color: inherit; font-size: 1rem; }
.etapas li small { display: block; font-size: .85rem; opacity: .85; margin-top: 2px; }
.etapas__n { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .85rem; border: 1.5px solid rgba(255, 255, 255, .35); }
.etapas li.atual { background: rgba(255, 255, 255, .1); color: #fff; backdrop-filter: blur(6px); }
.etapas li.atual .etapas__n { background: #fff; color: var(--lilas-700); border-color: #fff; }
.etapas li.feita { color: rgba(255, 255, 255, .85); }
.etapas li.feita .etapas__n { background: var(--verde); border-color: var(--verde); color: #fff; }
.acesso--wizard .form-lado__in { max-width: 520px; }
.acesso--wizard .wizard { width: 100%; max-width: none; margin: 0; padding: 0; }
.acesso--wizard .cartao { background: none; border: 0; box-shadow: none; padding: 0; }
.acesso--wizard .cartao h1, .acesso--wizard .cartao h2 { font-size: 1.7rem; letter-spacing: -.02em; color: var(--tinta); }
.acesso--wizard .wizard__topo { margin-bottom: 22px; }
.acesso--wizard input, .acesso--wizard select, .acesso--wizard textarea { border-radius: 12px; }
.acesso--wizard input:not([type=range]):not([type=checkbox]):not([type=radio]), .acesso--wizard select { height: var(--campo); }
.acesso--wizard .btn--primario { min-height: var(--campo); border-radius: 12px; }
@media (min-width: 1024px) {
  .etapas { display: grid; }
  .acesso--wizard .wizard__topo { display: none; }
}
@media (max-width: 1023px) {
  .acesso--wizard .marca-lado { min-height: 150px; }
}
.acesso--wizard .wizard__titulo { font-size: 1.85rem; line-height: 1.2; letter-spacing: -.02em; color: var(--tinta); margin: 0; }
.acesso--wizard .wizard__titulo + .suave { margin: 8px 0 24px; font-size: .98rem; }
.acesso--wizard .campo label { font-size: .88rem; font-weight: 700; color: var(--tinta); }
