/* Páginas de acesso (/entrar, /cadastro) no visual v2: mesmo fundo e mesma pílula da landing,
   formulário num painel --glass-strong centralizado. Tokens em tokens.css; decisões em docs/design/DESIGN.md. */

.auth-wrap { max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }
.nav .bar { justify-content: space-between; }
.top-link { font-size: var(--fs-small); color: var(--ink-2); padding-right: 12px; }
.top-link a { display: inline-block; padding: 12px 0; font-weight: 600; color: var(--accent-ink); }

.auth { min-height: calc(100vh - 80px); min-height: calc(100dvh - 80px); display: flex; flex-direction: column; align-items: center; padding: var(--s-5) var(--gutter) 0; }
.auth-col { width: 100%; display: flex; flex-direction: column; align-items: center; }
/* Computador: formulário à esquerda, painel informativo à direita */
@media (min-width: 1024px) {
  .auth { display: grid; grid-template-columns: minmax(0, 480px) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: start; max-width: 1200px; margin-inline: auto; }
  .auth-col { align-items: stretch; }
}
.auth-main { width: 100%; max-width: 480px; padding: clamp(24px, 5vw, 40px); border-radius: var(--r-xl); }
@media (min-width: 640px) { .auth { padding-top: var(--s-7); } }

.display { font-weight: 560; letter-spacing: -.03em; }
.mono { font: 500 .74rem/1.2 var(--f-mono); letter-spacing: .07em; text-transform: uppercase; }
.auth-title { font-size: clamp(2rem, 1.6rem + 1.6vw, 2.6rem); line-height: 1.06; outline: none; }
.auth-lead { margin-top: var(--s-3); color: var(--ink-2); }
.auth-lead strong { color: var(--ink); word-break: break-all; }
.step { color: var(--accent-ink); margin-bottom: var(--s-3); }

.auth-form { display: flex; flex-direction: column; gap: var(--s-4); margin-top: var(--s-6); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .label-row label, .kind legend { font-weight: 600; font-size: .9375rem; }
.label-row { display: flex; justify-content: space-between; align-items: center; }
.field input, .field select {
  width: 100%; height: 48px; padding: 0 14px;
  background: var(--bubble-in); color: var(--ink);
  border: 1px solid var(--hairline); border-radius: var(--r-md);
  font: 400 1rem/1 var(--f-ui);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.field select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.field input:hover, .field select:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--hairline)); }
.field input:focus-visible, .field select:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); border-radius: var(--r-md); }
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: var(--danger); }
.hint { font-size: var(--fs-small); color: var(--ink-3); }
.opt { font-weight: 400; color: var(--ink-3); }
.field-error { display: flex; align-items: flex-start; gap: 6px; font-size: var(--fs-small); color: var(--danger); font-weight: 500; }
.field-error svg { width: 16px; height: 16px; flex: none; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.form-error { padding: var(--s-3) var(--s-4); border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent); border-radius: var(--r-md); background: var(--danger-soft); color: var(--danger); font-weight: 500; font-size: .9375rem; outline: none; }
.form-error:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.code-input { font-family: var(--f-mono) !important; font-size: 1.375rem !important; letter-spacing: .4em; text-align: center; }
.row-2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--s-3); }
.row-actions { display: flex; gap: var(--s-3); margin-top: var(--s-2); }
.row-actions .btn-primary { flex: 1; }
#pass-profile { display: flex; flex-direction: column; gap: var(--s-4); }
#pass-profile[hidden] { display: none; }

.btn-block { width: 100%; min-height: 50px; }
.btn-secondary { background: var(--glass); color: var(--ink); border-color: var(--hairline); }
.btn-secondary:hover { background: var(--accent-soft); }
.btn[aria-busy="true"] { cursor: progress; }
.pw-toggle { min-height: 32px; min-width: 44px; padding: 4px 8px; margin: -6px -8px -6px 0; border: 0; background: none; color: var(--accent-ink); font: 600 var(--fs-small)/1 var(--f-ui); cursor: pointer; border-radius: var(--r-sm); }
.pw-toggle:hover { background: var(--accent-soft); }
@media (pointer: coarse) { .pw-toggle { min-height: 44px; } }

.pw-rules { list-style: none; margin: calc(-1 * var(--s-2)) 0 0; padding: 0; display: grid; gap: 4px; font-size: var(--fs-small); color: var(--ink-2); }
.pw-rules li { display: flex; align-items: center; gap: 8px; }
.rule-ic { width: 14px; height: 14px; flex: none; border-radius: 50%; border: 1.5px solid var(--ink-3); }
.pw-rules li.ok { color: var(--live); }
.pw-rules li.ok .rule-ic { border-color: var(--live); background: var(--live); box-shadow: inset 0 0 0 2px var(--glass-strong); }

.kind { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-2); margin: 0; padding: 0; border: 0; min-width: 0; }
@media (max-width: 380px) { .kind { grid-template-columns: 1fr; } .kind-opt span { min-height: 44px; } }
.kind legend { padding: 0; margin-bottom: 6px; }
.kind-opt { position: relative; }
.kind-opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.kind-opt span { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 6px var(--s-3); border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--bubble-in); font-weight: 600; line-height: 1.25; text-align: center; transition: border-color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease); }
.kind-opt input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); box-shadow: inset 0 0 0 1px var(--accent); }
.kind-opt input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

.alt { margin-top: var(--s-5); display: flex; flex-direction: column; gap: var(--s-3); }
.alt-sep { display: flex; align-items: center; gap: var(--s-3); color: var(--ink-3); font-size: var(--fs-small); }
.alt-sep::before, .alt-sep::after { content: ""; flex: 1; height: 1px; background: var(--hairline); }
.auth-links { margin-top: var(--s-5); display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-5); }
.linkish { min-height: 44px; padding: 0; border: 0; background: none; color: var(--accent-ink); font: 600 .9375rem/1.3 var(--f-ui); text-decoration: underline; text-underline-offset: .2em; cursor: pointer; text-align: left; }
.linkish:hover { color: var(--accent); }
.notice { margin-top: var(--s-4); padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--warn-soft); color: var(--ink); border: 1px solid color-mix(in srgb, var(--warn) 25%, transparent); font-size: .9375rem; }
.auth-form .notice { margin-top: calc(-1 * var(--s-2)); }
.legal { margin-top: var(--s-4); font-size: var(--fs-small); color: var(--ink-3); }

.why { margin-top: var(--s-4); padding: var(--s-4); border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 var(--r-md) var(--r-md) 0; color: var(--ink-2); font-size: .9375rem; }
.why-t { color: var(--ink); font-weight: 600; margin-bottom: 4px; }
.badge-pending { display: inline-flex; align-items: center; gap: 8px; margin-top: var(--s-5); padding: 6px 12px; border-radius: var(--r-pill); background: var(--warn-soft); color: var(--warn); font-weight: 600; font-size: .9375rem; }
.badge-pending svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
#v-done .btn { margin-top: var(--s-6); }

.auth-foot { display: flex; gap: var(--s-5); padding: var(--s-5) 0; font-size: var(--fs-small); }
.auth-foot a { color: var(--ink-2); display: inline-flex; align-items: center; min-height: 44px; }


/* ---------- Painel informativo (slides de módulos, novidades e ofertas) ---------- */
.promo { display: none; }
@media (min-width: 1024px) {
  .promo { display: flex; flex-direction: column; position: sticky; top: 96px; min-height: min(620px, calc(100vh - 128px)); border-radius: var(--r-xl); padding: clamp(28px, 3.4vw, 44px); overflow: hidden; }
}
.promo-track { position: relative; flex: 1; display: grid; }
.slide { grid-area: 1 / 1; display: flex; flex-direction: column; gap: 14px; opacity: 0; visibility: hidden; transform: translateY(10px); filter: blur(4px);
  transition: opacity .5s var(--ease), transform .5s var(--ease), filter .5s var(--ease), visibility 0s .5s; }
.slide.is-on { opacity: 1; visibility: visible; transform: none; filter: none; transition-delay: 0s; }
.module { display: flex; align-items: center; gap: 10px; }
.module .wm-svg { height: 16px; }
.module i { width: 1px; height: 18px; background: color-mix(in srgb, var(--ink) 18%, transparent); }
.module > span:last-child { font-size: 1.02rem; font-weight: 450; letter-spacing: -.02em; }
.promo-tag { align-self: flex-start; font: 500 .7rem/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; padding: 6px 9px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent-ink); }
.promo-tag.soon { background: var(--warn-soft); color: var(--warn); }
.promo-tag.offer { background: var(--live-soft); color: var(--live); }
.promo-t { font-weight: 560; font-size: clamp(1.8rem, 1.1rem + 1.6vw, 2.5rem); line-height: 1.08; letter-spacing: -.03em; max-width: 15em; text-wrap: balance; }
.promo-t em { font-family: var(--f-accent); font-style: italic; font-weight: 400; color: var(--accent-ink); letter-spacing: -.01em; }
.promo-p { color: var(--ink-2); max-width: 34em; }
.promo-cta { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 600; color: var(--accent-ink); text-decoration: none; }
.promo-cta:hover { text-decoration: underline; text-underline-offset: .2em; }

/* Mini-interface de cada slide: fragmento do produto, entra em cascata */
.demo { margin-top: 6px; padding: 16px; border-radius: var(--r-lg); background: var(--glass-strong); border: 1px solid var(--hairline); display: grid; gap: 10px; max-width: 520px; }
.demo > * { opacity: 0; transform: translateY(8px); }
.slide.is-on .demo > * { animation: rise .45s var(--ease) forwards; }
.slide.is-on .demo > *:nth-child(2) { animation-delay: .35s; } .slide.is-on .demo > *:nth-child(3) { animation-delay: .7s; }
.slide.is-on .demo > *:nth-child(4) { animation-delay: 1.05s; } .slide.is-on .demo > *:nth-child(5) { animation-delay: 1.4s; }
@keyframes rise { to { opacity: 1; transform: none; } }
.d-label { font: 500 .68rem/1.2 var(--f-mono); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.d-wave { display: flex; align-items: center; gap: 3px; height: 30px; }
.d-wave span { flex: 1; max-width: 5px; height: 100%; border-radius: 3px; background: linear-gradient(var(--accent), var(--violet)); transform: scaleY(.3); }
.slide.is-on .d-wave span { animation: dbar 1.1s ease-in-out infinite; }
@keyframes dbar { 0%, 100% { transform: scaleY(.2); } 50% { transform: scaleY(var(--h, .8)); } }
.d-field { display: grid; grid-template-columns: 26px 1fr; gap: 8px; padding: 9px 11px; border-radius: var(--r-md); background: var(--accent-soft); font-size: .9rem; }
.d-field b { font: 600 .78rem/1.8 var(--f-mono); color: var(--accent-ink); }
.d-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-md); border: 1px solid var(--hairline); background: var(--glass); font-size: .9rem; }
.d-row span:first-child { flex: 1; min-width: 0; }
.d-row small { color: var(--ink-3); font-size: .78rem; }
.d-chip { font: 550 .74rem/1 var(--f-ui); padding: 5px 9px; border-radius: var(--r-pill); white-space: nowrap; }
.d-chip.ok { background: var(--live-soft); color: var(--live); }
.d-chip.warn { background: var(--warn-soft); color: var(--warn); }
.d-chip.red { background: var(--danger-soft); color: var(--danger); }
.d-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.d-pill { padding: 6px 11px; border-radius: 12px; border: 1px dashed var(--accent); font-size: .84rem; font-weight: 600; background: var(--glass); }
.d-pill small { display: block; font-weight: 450; color: var(--ink-3); font-size: .74rem; }
.d-b { max-width: 86%; padding: 8px 11px; border-radius: 14px; font-size: .86rem; line-height: 1.4; }
.d-b.in { background: var(--bubble-in); border: 1px solid var(--hairline); border-bottom-left-radius: 5px; }
.d-b.out { justify-self: end; background: var(--bubble-out); border-bottom-right-radius: 5px; }
.d-sys { justify-self: center; font: 500 .72rem var(--f-mono); color: var(--live); background: var(--live-soft); padding: 5px 9px; border-radius: var(--r-pill); }

/* Rodapé do painel: pontos e barra de tempo */
.promo-foot { display: flex; align-items: center; gap: 14px; margin-top: 24px; }
.promo-foot[hidden] { display: none; }
.promo-dots { display: flex; gap: 6px; }
.promo-dot { width: 28px; height: 28px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; border-radius: 50%; }
.promo-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: color-mix(in srgb, var(--ink) 22%, transparent); transition: width .25s var(--ease), background .25s; }
.promo-dot[aria-current="true"]::before { width: 22px; border-radius: 4px; background: var(--accent); }
.promo-bar { flex: 1; height: 2px; border-radius: 2px; background: var(--hairline); overflow: hidden; }
.promo-bar i { display: block; height: 100%; width: 0; background: var(--accent); }
.promo-bar i.run { animation: pfill var(--dur, 7s) linear forwards; }
.promo.paused .promo-bar i.run { animation-play-state: paused; }
@keyframes pfill { to { width: 100%; } }
.promo-pause { min-height: 32px; padding: 0 10px; border: 1px solid var(--hairline); border-radius: var(--r-pill); background: transparent; color: var(--ink-2); font: 600 .78rem/1 var(--f-ui); cursor: pointer; }
.promo-pause:hover { background: var(--accent-soft); }
@media (prefers-reduced-motion: reduce) {
  .slide, .slide.is-on { transition: none; filter: none; transform: none; }
  .demo > * { opacity: 1; transform: none; animation: none !important; }
}

/* página de uma coluna só (ex.: confirmar e-mail) */
@media (min-width: 1000px) { .auth.auth-single { display: flex; } }
.auth-single .auth-col { width: min(480px, 100%); }
