/* Signup Wizard — design fiel ao Figma LolCombat Onboarding */

*,
*::before,
*::after {
  box-sizing: border-box;
}

.signup-body {
  margin: 0;
  padding: 0;
  font-family: "Open Sans", sans-serif;
  background: linear-gradient(180deg, #ff5922 0%, #ffc3af 100%);
  min-height: 100vh;
}

/* ── Página ── */
.signup-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 16px 40px;
}

.signup-wrapper {
  width: 100%;
  max-width: 740px;
  /* Ocupa o espaço vertical restante e centraliza o card nele — o rodapé
     (irmão seguinte, fora do wrapper) fica sempre na base da tela, em vez de
     subir/descer junto com o card conforme o conteúdo muda de altura. */
  flex: 1;
  display: flex;
  align-items: center;
}
.signup-wrapper--wide {
  width: 100%;
  max-width: 900px;
}
.signup-wrapper--plans {
  width: 100%;
  max-width: 1100px;
}
/* Step4 (pagamento): só 2 colunas (form-grid e os 2 cards de preço), não 3
   como o step1 — não precisa da largura de --plans, que deixava inputs e
   cards largos demais. */
.signup-wrapper--payment {
  width: 100%;
  max-width: 960px;
}
.signup-wrapper--mfa {
  width: 100%;
}
/* Tela de solicitação de redefinição de MFA (mfa_reset_requests/new.html.erb)
   — card mais estreito no Figma que o restante do fluxo signup/mfa (465px
   vs. os 740px padrão de .signup-wrapper), por ter só um campo de texto. */
.signup-wrapper--narrow {
  width: 100%;
  max-width: 465px;
}

/* ── Card laranja (padrão) ── */
.signup-card {
  background: #e94e1b;
  border-radius: 24px;
  box-shadow:
    10px 11px 29.3px 5px rgba(0, 0, 0, 0.25),
    0px 16px 32px rgba(0, 0, 0, 0.08),
    0px 3px 10px rgba(0, 0, 0, 0.08);
  padding: 54px 56px 48px;
  color: #ffffff;
  width: 100%;
}

.signup-card--mfa {
  padding-left: 80px;
  padding-right: 80px;
}

/* Card branco — Etapa Termos */
.signup-card--white {
  background: #ffffff;
  color: #16161b;
}

/* ── Footer de página ── */
.signup-footer {
  margin-top: 16px;
  /* O <p class="signup-footer"> anterior herdava 1em de margin-bottom do UA;
     o <footer> não herda nada, então o espaço no pé da página é reposto aqui. */
  margin-bottom: 1em;
  font-family: "Roboto", sans-serif;
  font-size: 0.75rem;
  color: #e94e1b;
  text-align: center;
}

.signup-footer p {
  margin: 0;
}

/* Linha de links institucionais (política de privacidade / termos de serviço) */
.signup-footer-links {
  margin-top: 4px;
}

.signup-footer a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.signup-footer a:hover {
  text-decoration: none;
}

.signup-footer-sep {
  margin: 0 6px;
  opacity: 0.6;
}

/* ── Step indicator ──
   Cada .step-item é uma unidade autônoma: trilho (::before, z-index:1) atrás do
   círculo (.step-circle, z-index:2), com o rótulo abaixo. Entre os items há um
   gap (o fundo do card aparece).

   Duas regras que sustentam o desenho:
   1. O círculo NUNCA tem a mesma cor do trilho — senão o nó da etapa some dentro
      da própria cápsula e o conjunto lê como uma pílula com um calombo.
   2. Ativo e concluído não se distinguem por matiz: o card destas telas é
      #E94E1B, a própria cor de marca, então um destaque laranja sumiria. A
      distinção vem de forma (anel + escala) e conteúdo (número vs check) — o que
      funciona igual nos dois cards e não depende de percepção de cor (WCAG 1.4.1).
*/
.step-indicator {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  margin: 0 0 40px;
  padding: 0;
  list-style: none;
}

.step-item {
  flex: 1 1 0;
  max-width: 148px;
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* Trilho da etapa — atras do circulo, alinhado ao centro dele (40px / 2) */
.step-item::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 20px;
  height: 10px;
  border-radius: 100px;
  transform: translateY(-50%);
  z-index: 1;
}

/* Circulo — na frente do trilho, e SEMPRE em cor contrastante com ele, senao
   o no da etapa some dentro da propria capsula. */
.step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  font-family: "Roboto", sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1;
}

.step-check {
  font-size: 1.25rem;
  font-variation-settings: "wght" 700;
}

.step-label {
  font-family: "Roboto", sans-serif;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-align: center;
  line-height: 1.3;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Estado so para leitor de tela (concluida / atual / pendente) */
.step-state-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Estados ──
   Ativo e concluido NAO se distinguem por matiz: o card destas telas e
   #E94E1B, a propria cor de marca, entao um destaque laranja sumiria. A
   distincao vem de forma (anel + escala) e conteudo (numero vs check), o que
   funciona igual sobre o card laranja e o branco — e nao depende de percepcao
   de cor (WCAG 1.4.1). */

/* Concluida — trilho escuro, circulo claro com check */
.step-item--done::before {
  background: #16161b;
}
.step-item--done .step-circle {
  background: #ffffff;
  color: #16161b;
}
.step-item--done .step-label {
  color: #ffffff;
}

/* Atual — mesmo trilho percorrido, mas circulo maior e com anel */
.step-item--active::before {
  background: #16161b;
}
.step-item--active .step-circle {
  background: #ffffff;
  color: #16161b;
  transform: scale(1.12);
  /* Era rgba(255,255,255,.4) — sem blur (0 0 0 4px é um anel de borda dura,
     não um glow esmaecido), então virar sólido não muda a aparência. Mesmo
     motivo do .tier-card/.step-item--pending: sem canal alfa, sem mistura
     pra piscar durante o hover+transform dos cards de plano ao lado. */
  box-shadow: 0 0 0 4px #f29476;
}
.step-item--active .step-label {
  color: #ffffff;
  font-weight: 700;
}

/* Pendente — o elemento mais discreto dos tres, mais sutil que o #f5f5f5
   solido de antes (que saltava mais que a etapa ja concluida). Os valores
   abaixo eram rgba(255,255,255, .3 / .9) — mesma cor final, mas capturada
   por amostragem de pixel e fixada como sólida: translúcido aqui força
   recompor a mistura com o fundo do card a cada frame, e um card de plano
   com hover+transform ali do lado (mesma tela) pode disparar essa
   recomposição e piscar uma cor errada por um instante em monitores com
   escala não-nativa (mesmo problema do .tier-card, ver comentário lá). */
.step-item--pending::before {
  background: #ef835f;
}
.step-item--pending .step-circle {
  background: #fdede8;
  color: #5f5f66;
}
/* Branco solido, e nao translucido: 80% de opacidade sobre #E94E1B da 2.9:1.
   A hierarquia do pendente ja e carregada pelo trilho e pelo circulo; o rotulo
   se diferencia pelo peso da fonte, sem custo de contraste. */
.step-item--pending .step-label {
  color: #ffffff;
  font-weight: 500;
}

/* ── Card branco (tela de termos) ──
   Aqui o laranja de marca TEM contraste, entao entra como reforco do anel. */
.signup-card--white .step-item--done .step-label {
  color: #16161b;
}
.signup-card--white .step-item--active .step-label {
  color: #16161b;
}
.signup-card--white .step-item--active .step-circle {
  box-shadow: 0 0 0 4px rgba(233, 78, 27, 0.35);
}
.signup-card--white .step-item--pending::before {
  background: #e4e5e7;
}
/* Borda obrigatoria: aqui o circulo branco fica sobre o trilho #E4E5E7 (1.26:1) E
   sobre o card branco (1.00:1) — sem ela o no simplesmente nao existe.
   #7E838D atende WCAG 1.4.11 (3:1 para elemento nao-textual) nos dois fundos:
   3.81:1 contra o card e 3.02:1 contra o trilho. Inset em vez de border para
   nao alterar a caixa de 40px que alinha o circulo com o trilho. */
.signup-card--white .step-item--pending .step-circle {
  background: #ffffff;
  color: #5f5f66;
  box-shadow: inset 0 0 0 2px #7e838d;
}
.signup-card--white .step-item--pending .step-label {
  color: #5f5f66;
}

/* ── Cabeçalho do card ── */
.signup-card-header {
  text-align: center;
  margin-bottom: 40px;
}

.signup-card-title {
  font-family: "Roboto", sans-serif;
  font-size: 1.75rem;
  font-weight: 500;
  margin: 0 0 8px;
  color: inherit;
}

.signup-card-title--brand {
  font-family: "Archivo Black", sans-serif;
  font-size: 1.125rem;
  color: #e94e1b;
  margin: 0 0 4px;
}

.signup-card-subtitle {
  font-family: "Roboto", sans-serif;
  font-size: 1rem;
  opacity: 0.9;
  margin: 0;
}

/* No card branco, title usa laranja */
.signup-card--white .signup-card-title {
  color: #e94e1b;
}

/* ── Erros ── */
.signup-errors {
  display: flex;
  gap: 10px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 16px;
  /* flex-start funciona pros dois formatos de conteúdo (um <p> de uma linha
     só, em 6 dos 7 usos, e a <ul> de vários erros do step2): o ícone ancora
     no topo, alinhado com a PRIMEIRA linha, em vez de flutuar no centro do
     bloco inteiro — o que ficava errado assim que um <p> de uma linha
     quebrava em duas num viewport estreito (align-items: center centraliza
     na altura total do bloco, não na primeira linha). */
  align-items: flex-start;
  font-size: 0.875rem;
}

.signup-errors .material-symbols-outlined {
  flex-shrink: 0;
  font-size: 1.125rem;
  /* Centraliza o ícone (18px) dentro da altura de uma linha de texto (14px
     × line-height 1.4 = 19.6px) — (19.6 - 18) / 2. Só funciona com a
     line-height explícita abaixo: "normal" (o padrão do navegador) não tem
     um valor em px prévisível pra fazer essa conta bater. */
  margin-top: 0.8px;
}

.signup-errors p,
.signup-errors ul {
  margin: 0;
  line-height: 1.4;
}

.signup-errors ul {
  margin: 0;
  padding: 0 0 0 1rem;
}

.signup-errors ul li {
  margin-bottom: 2px;
}
.signup-errors ul li:last-child {
  margin-bottom: 0;
}

/* ── Form container — 324px fixos, centralizado ── */
.signup-form {
  width: 324px;
  margin: 0 auto;
}

/* ── Inputs com ícone (estilo bottom-border) ── */
.field {
  margin-bottom: 20px;
  position: relative; /* ancora painéis customizados (ex.: modalidade-panel) */
}

.mfa-key-field {
  width: 282px;
  margin-left: auto;
  margin-right: auto;
}

.field-inner {
  display: flex;
  align-items: center;
  background: #ffb59f;
  border-radius: 4px 4px 0 0;
  height: 43px;
  border-bottom: 2px solid rgba(39, 24, 20, 0.45);
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}

.field-inner:focus-within {
  border-bottom-color: #271814;
  box-shadow: inset 0 -1px 0 #271814;
}

.field-icon {
  width: 48px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(39, 24, 20, 0.6);
  flex-shrink: 0;
  font-size: 1.125rem;
  pointer-events: none;
}

.field-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  height: 100%;
  padding: 0 12px 0 0;
  color: #271814;
  font-family: "Roboto", sans-serif;
  font-size: 0.9375rem;
  appearance: none;
  -webkit-appearance: none;
}

.field-input::placeholder {
  color: rgba(39, 24, 20, 0.5);
}

.field-input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 30px #ffb59f inset;
  -webkit-text-fill-color: #271814;
}

/* Mesmo visual de .field-inner/.field-input (fundo salmão, cantos
   arredondados só em cima, borda só embaixo), sem o wrapper .field-inner
   porque aqui não há ícone e o campo precisa de altura livre pra várias
   linhas (redimensionável), não os 43px fixos do campo de uma linha só. */
.field-textarea {
  display: block;
  width: 100%;
  min-height: 110px;
  background: #ffb59f;
  border: none;
  border-radius: 4px 4px 0 0;
  border-bottom: 2px solid rgba(39, 24, 20, 0.45);
  padding: 12px 16px;
  color: #271814;
  font-family: "Roboto", sans-serif;
  font-size: 0.9375rem;
  resize: vertical;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field-textarea::placeholder {
  color: rgba(39, 24, 20, 0.5);
}

.field-textarea:focus {
  border-bottom-color: #271814;
  box-shadow: inset 0 -1px 0 #271814;
}

/* Botão de mostrar/ocultar senha dentro do .field-inner — mais simples que a
   versão de application.css (absolute-positioned): aqui é só mais um filho
   do flex row do .field-inner, sem precisar de posicionamento manual. */
.field-inner .field-password-toggle {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px 0 4px;
  color: rgba(39, 24, 20, 0.6);
  flex-shrink: 0;
  transition: color 0.15s;
}

.field-inner .field-password-toggle:hover {
  color: #271814;
}

.field-inner .field-password-toggle .material-symbols-outlined {
  font-size: 1.25rem;
}

/* ── Checklist de requisitos de senha (troca de senha obrigatória) ── */
.password-requirements {
  margin: 0 0 24px;
}

/* Encolhe o espaço embaixo do campo "Senha Nova" quando o checklist vem
   logo em seguida — senão soma com a margem do checklist e fica longe
   demais, diferente do Figma (checklist colado ao campo). */
.field:has(+ .password-requirements) {
  margin-bottom: 12px;
}

.password-requirements-title {
  font-family: "Roboto", sans-serif;
  font-size: 0.875rem;
  color: #ffffff;
  margin: 0 0 8px;
}

.password-requirements-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.password-requirement {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 8px;
  font-family: "Roboto", sans-serif;
  font-size: 0.875rem;
  color: #ffffff;
  transition:
    background 0.15s,
    color 0.15s;
}

.password-requirement-icon {
  font-size: 1.125rem;
  flex-shrink: 0;
}

/* Requisito atendido: check preenchido + leve destaque, igual ao Figma */
.password-requirement--met {
  background: rgba(255, 255, 255, 0.15);
}

.password-requirement--met .password-requirement-icon {
  font-variation-settings: "FILL" 1;
}

/* ── Lembrar-me / Esqueceu senha (tela de login do MasterUser) ── */
.remember-forgot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 4px 0 20px;
  flex-wrap: wrap;
  gap: 8px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin: 0;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #ffffff;
}

.remember-me-label {
  font-family: "Roboto", sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: #ffffff;
}

/* ── Configuração de MFA (assistente de 3 etapas) ──
   Estrutura no padrão da Aurea (setup-mfa/fragments/*: LeadRow, SectionTitle,
   ButtonsContainer etc.), recolorido pro laranja/vermelho da marca em vez do
   azul da Aurea — reaproveitando os mesmos tokens visuais do resto do
   onboarding (.field-inner, .btn-primary/.btn-ghost, .signup-errors). */
.mfa-lead {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.mfa-lead-icon {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mfa-lead-icon .material-symbols-outlined {
  color: #e94e1b;
  font-size: 1.5rem;
}

.mfa-lead-text {
  font-family: "Roboto", sans-serif;
  font-size: 0.9375rem;
  color: #ffffff;
  line-height: 1.5;
  margin: 0;
}

.mfa-section-title {
  font-family: "Roboto", sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 16px;
}

.mfa-store-buttons {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.mfa-store-button {
  flex: 1 1 160px;
  display: flex;
  align-items: center;
  gap: 10px;
  /* hsba(0, 0%, 100%, 0.24) do Figma — branco translúcido sobre o card
     laranja, não mais um preenchimento sólido. */
  background: hsla(0, 0%, 100%, 0.24);
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 12px 16px;
  color: #ffffff;
  text-align: left;
  font-family: "Roboto", sans-serif;
  font-size: 0.8125rem;
  transition:
    border-color 0.15s,
    background 0.15s;
  cursor: pointer;
}

.mfa-store-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mfa-store-button strong {
  font-size: 0.9375rem;
}

.mfa-store-button--selected {
  border-color: #ffffff;
  background: hsla(0, 0%, 100%, 0.35);
}

/* Nunca teve hover — .btn-select-btn/.payment-btn-* (mesmo fluxo) já tinham,
   esse ficou pra trás. */
.mfa-store-button:hover {
  background: #ef835f;
}

.mfa-store-button--selected:hover {
  background: #f08b6a;
}

/* width: fit-content + margin auto — abraça só o QR (igual ao QrCodeWrapper
   da Aurea, que também não força largura total), em vez de esticar pra
   preencher o card inteiro com um monte de espaço em branco ao redor. */
.mfa-qr-box {
  background: #ffffff;
  border-radius: 12px;
  padding: 16px;
  width: fit-content;
  margin: 0 auto 16px;
}

.mfa-qr-box svg {
  display: block;
  width: 200px;
  height: 200px;
}

.mfa-countdown {
  font-family: "Roboto", sans-serif;
  font-size: 0.875rem;
  color: #ffffff;
  text-align: center;
  margin: 0 0 24px;
}

.mfa-cant-scan {
  font-family: "Roboto", sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 4px;
  text-align: center;
}

.mfa-manual-key-label {
  font-family: "Roboto", sans-serif;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
  margin: 0 0 8px;
}

/* Sem fundo/borda — igual ao ConfigKeyBox da Aurea (styles.ts:161-179), que
   também é só texto + ícone lado a lado, sem caixa nenhuma. */
.mfa-manual-key-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 auto 24px;
  cursor: pointer;
  font-family: "Roboto", sans-serif;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #ffffff;
  word-break: break-all;
  transition: opacity 0.15s;
}

.mfa-manual-key-box:hover,
.mfa-manual-key-box--copied {
  opacity: 0.7;
}

.mfa-manual-key-box .material-symbols-outlined {
  flex-shrink: 0;
  font-size: 1.125rem;
}

.mfa-warning {
  margin-bottom: 24px;
}

.mfa-warning-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: "Roboto", sans-serif;
  font-weight: 700;
  font-size: 0.9375rem;
  color: #ffffff;
  margin-bottom: 4px;
}

.mfa-warning-icon-badge {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  color: #e94e1b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
}

.mfa-warning p {
  font-family: "Roboto", sans-serif;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
}

.mfa-warning-link {
  color: #ffffff;
  font-weight: 600;
  text-decoration: underline;
}

.mfa-warning-link:hover {
  text-decoration: none;
}

/* Select */
.field-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='rgba(39,24,20,0.65)'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-color: #ffb59f;
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
  cursor: pointer;
  color: #271814;
}

.field-select option {
  background: #ffffff;
  color: #271814;
}

/* Modalidade — painel de opções (aberto) espelhando o MultiSelectInput da
   Aurea (general-inputs/MultiSelectInput/styles.ts: OptionsContainer +
   OptionItem + Checkbox). O gatilho fechado usa exatamente .field-input/
   .field-select como todo o resto do form — só o painel que abre é
   diferente, por isso o <select> nativo (que não dá pra estilizar quando
   aberto, é renderizado pelo SO) fica oculto e serve só pra manter o valor
   no submit; quem o usuário vê e clica é este painel customizado. */
.modalidade-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #fff1ed;
  border-radius: 24px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.16);
  z-index: 20;
  max-height: 260px;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  /* Barra de rolagem customizada (Figma): traço cinza-escuro fino, cantos
     arredondados, sem o "trilho" padrão do navegador. No Firefox no Linux
     (scrollbar desenhada pelo tema GTK/SO) o modo "thin" vem com setinhas de
     cima/baixo que o CSS não consegue remover (só dá pra estilizar via
     ::-webkit-scrollbar-* no Chrome/Edge/Safari, abaixo) — ainda assim é
     melhor manter a barra visível com seta do que escondê-la, pra não perder
     a dica visual de que dá pra rolar. */
  scrollbar-width: thin;
  scrollbar-color: #6e6e6e transparent;
}

.modalidade-panel::-webkit-scrollbar {
  width: 6px;
}

.modalidade-panel::-webkit-scrollbar-track {
  background: transparent;
  /* Encolhe a área do track 4px em cima/embaixo, então a barrinha nunca
     encosta nas pontas do painel. Só funciona em navegadores baseados em
     WebKit/Blink (Chrome, Edge, Safari) — o Firefox não suporta
     ::-webkit-scrollbar-* e usa sempre a barra nativa do SO/tema. */
  margin: 4px 0;
}

.modalidade-panel::-webkit-scrollbar-thumb {
  background: #6e6e6e;
  border-radius: 100px;
}

/* Sem as setas de cima/baixo — só a barrinha. */
.modalidade-panel::-webkit-scrollbar-button {
  display: none;
}

/* Precisa vencer o display:flex acima quando o atributo [hidden] está
   presente — regra de autor sempre vence a UA stylesheet por cascata,
   então sem isso o painel ficaria visível mesmo fechado. */
.modalidade-panel[hidden] {
  display: none;
}

/* Reset do <button> que substitui o gatilho fechado: só ajusta o que é
   específico de <button> (largura/alinhamento) — cor e fonte já vêm certas
   de .field-input/.field-select, não devem ser tocadas aqui (um `inherit`
   nessas propriedades pegaria a cor branca do texto ao redor, no fundo
   vermelho, em vez do #271814 do select). */
.modalidade-trigger-btn {
  width: 100%;
  text-align: left;
  /* Com multi-select o texto vira uma lista separada por vírgula e pode passar
     da largura do campo — trunca numa linha só em vez de quebrar o layout. */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Enquanto nada foi escolhido, o texto "Modalidade" é um placeholder, não um
   valor — deve ficar tão claro quanto o ::placeholder dos <input> ao lado
   (rgba(39,24,20,0.5)), e não a cor cheia (#271814) que .field-select usa
   pra opção/valor real selecionado. */
.modalidade-trigger-btn--placeholder {
  color: rgba(39, 24, 20, 0.5);
}

.modalidade-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-family: "Roboto", sans-serif;
  font-size: 1rem;
  color: #271814;
  border-radius: 8px;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
}

.modalidade-option:hover {
  background: #c7c6c6;
  color: #ffffff;
}

.modalidade-option-check {
  display: none;
  font-size: 18px;
  color: inherit;
}

.modalidade-option--selected {
  background: #e94e1b !important;
  color: #ffffff !important;
}

.modalidade-option--selected .modalidade-option-check {
  display: inline-flex;
}

/* Selecionado + hover: mantém texto/check branco, só o fundo escurece pra
   cinza (mesma regra de hover de qualquer item) em vez de continuar vermelho. */
.modalidade-option--selected:hover {
  background: #c7c6c6 !important;
}

/* Botão inline (CNPJ lookup) */
.field-action-btn {
  flex-shrink: 0;
  width: 40px;
  height: 100%;
  background: transparent;
  border: none;
  border-left: 1px solid rgba(39, 24, 20, 0.2);
  color: rgba(39, 24, 20, 0.6);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.field-action-btn:hover {
  background: rgba(39, 24, 20, 0.08);
}
.field-action-btn .material-symbols-outlined {
  font-size: 1.125rem;
}

.field-hint {
  font-size: 0.75rem;
  /* Preto forte em vez de branco translúcido — igual ao ajuste já feito em
     .field-status[data-state="invalid"], pelo mesmo motivo: sobre o fundo
     vermelho do onboarding, texto claro/translúcido fica ilegível. */
  color: #1a1a1a;
  margin-top: 4px;
  padding-left: 2px;
}

.field-status {
  font-size: 0.75rem;
  color: #1a1a1a;
  margin-top: 4px;
  padding-left: 4px;
  min-height: 16px;
}

.field-status[data-state="invalid"] {
  font-weight: 600;
}

/* Colapsa os textos auxiliares do subdomínio enquanto vazios (preenchidos via JS),
   evitando o espaçamento extra antes do próximo campo no estado inicial. */
.field-hint:empty,
.field-status:empty {
  display: none;
}

/* Grid 2 colunas (mantido para outras telas) */
.fields-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
}

/* ── Planos ── */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.plan-card-wrapper {
  position: relative;
}

.plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: #2563eb;
  color: #fff;
  font-family: "Roboto", sans-serif;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
  white-space: nowrap;
  z-index: 1;
}

.plan-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px;
  color: #16161b;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.plan-card--featured {
  box-shadow: 0 0 0 2px #2563eb;
}

.plan-name {
  font-family: "Archivo Black", sans-serif;
  font-size: 1.375rem;
  color: #16161b;
  margin: 0 0 4px;
}

.plan-subtitle {
  font-family: "Roboto", sans-serif;
  font-size: 0.75rem;
  color: #6b7172;
  margin: 0 0 12px;
}

.plan-price-main {
  display: flex;
  align-items: baseline;
  gap: 2px;
  margin-bottom: 2px;
}

.plan-price-currency {
  font-family: "Roboto", sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: #16161b;
}

.plan-price-amount {
  font-family: "Archivo Black", sans-serif;
  font-size: 1.875rem;
  color: #16161b;
  line-height: 1;
}

.plan-price-period {
  font-family: "Roboto", sans-serif;
  font-size: 0.75rem;
  color: #6b7172;
}

.plan-price-alt {
  font-family: "Roboto", sans-serif;
  font-size: 0.75rem;
  color: #6b7172;
  margin: 0 0 12px;
}

.plan-description {
  font-family: "Open Sans", sans-serif;
  font-size: 0.8125rem;
  color: #464a4b;
  margin: 0 0 12px;
}

.plan-limit-badge {
  display: inline-block;
  background: rgba(233, 78, 27, 0.12);
  color: #c83e12;
  font-family: "Roboto", sans-serif;
  font-size: 0.6875rem;
  font-weight: 600;
  border-radius: 100px;
  padding: 4px 12px;
  margin-bottom: 12px;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.plan-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "Open Sans", sans-serif;
  font-size: 0.8125rem;
  color: #16161b;
}

.plan-features .material-symbols-outlined {
  font-size: 1rem;
  color: #3d8e6f;
  flex-shrink: 0;
}

.plan-trial {
  display: inline-block;
  font-family: "Roboto", sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: #3d8e6f;
  background: #e8f5ef;
  border-radius: 4px;
  padding: 2px 8px;
  margin-bottom: 12px;
}

/* Botão Selecionar — dentro do card branco */
.btn-selecionar {
  width: 100%;
  padding: 10px 16px;
  border-radius: 100px;
  border: 2px solid #16161b;
  background: transparent;
  color: #16161b;
  font-family: "Roboto", sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-selecionar:hover {
  background: #16161b;
  color: #fff;
}

/* ── Termos ── */
.terms-scroll-area {
  height: 320px;
  overflow-y: auto;
  border: 1px solid #e4e5e7;
  border-radius: 8px;
  padding: 16px 20px;
  background: #ffffff;
  font-family: "Open Sans", sans-serif;
  font-size: 0.875rem;
  line-height: 1.65;
  color: #16161b;
  margin-bottom: 20px;
}

.terms-scroll-area h2 {
  font-family: "Archivo Black", sans-serif;
  font-size: 1.125rem;
  margin: 0 0 4px;
}

.terms-scroll-area h3 {
  font-family: "Roboto", sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #464a4b;
  margin: 16px 0 4px;
}

.terms-scroll-area p {
  margin: 0 0 8px;
}

/* ── Checkout (step 4) ── */
.checkout-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px;
  font-family: "Roboto", sans-serif;
  font-size: 0.9rem;
  opacity: 0.9;
}

.checkout-loading .material-symbols-outlined {
  font-size: 2.5rem;
  color: rgba(255, 255, 255, 0.9);
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
.rotating {
  animation: rotate 1s linear infinite;
}

.checkout-footer {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

.btn-cancel {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: "Roboto", sans-serif;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.15s;
}

.btn-cancel:hover {
  color: #fff;
}

/* ── Checkout return ── */
.return-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}

.return-icon .material-symbols-outlined {
  font-size: 3.5rem;
  opacity: 0.95;
}

.return-brand {
  font-family: "Roboto", sans-serif;
  font-weight: 800;
  font-size: 1.75rem;
  color: #ffffff;
  text-align: center;
  margin: 0 0 24px;
}

.return-description {
  font-size: 1.5rem;
  opacity: 1;
  margin-top: 16px;
}

.return-plan-label {
  font-family: "Roboto", sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 16px;
  text-align: left;
}

.return-plan-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
}

.return-plan-row .payment-card-wrapper {
  /* 394px = largura do card no Figma ("Compra feita_cartao") — largura
     maior que o padrão do step4 pra caber "Somente R$ ... por mês" numa
     linha só. */
  max-width: 420px;
  flex-basis: 394px;
}

.return-subscription-number {
  text-align: left;
  min-width: 260px;
  max-width: 340px;
  flex: 1;
}

/* Mesmo visual dos campos .field-input do step2 (fundo salmão, cantos
   arredondados só em cima, borda só embaixo) — não reusa a classe
   .field-input direto porque aquela tem altura fixa de 43px para uma linha
   só, e aqui é uma <div> exibindo um UUID longo que quebra em 2 linhas. */
.return-subscription-number-box {
  background: #ffb59f;
  border-radius: 4px 4px 0 0;
  border-bottom: 2px solid rgba(39, 24, 20, 0.45);
  padding: 12px 16px;
  color: #271814;
  font-family: "Roboto", sans-serif;
  font-size: 0.9375rem;
  width: 100%;
  box-sizing: border-box;
  word-break: break-all;
}

.return-subscription {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Roboto", sans-serif;
  font-size: 0.875rem;
  margin: 16px 0;
}

.return-subscription strong {
  font-family: "Roboto", sans-serif;
  font-size: 1rem;
  letter-spacing: 0.05em;
}

/* ── Botões ── */
.btn-primary,
.btn-ghost {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 100px;
  font-family: "Roboto", sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
  line-height: 1;
  border: none;
}

/* Primário no card laranja: fundo branco */
.btn-primary {
  background: #ffffff;
  color: #16161b;
}

.btn-primary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-primary:disabled {
  background: rgba(255, 255, 255, 0.35);
  color: rgba(255, 255, 255, 0.5);
  cursor: not-allowed;
}

/* Ghost no card laranja: borda branca */
.btn-ghost {
  background: transparent;
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
}

.btn-ghost:hover {
  /* 0.1 sozinho é sutil demais pra notar contra o gradiente laranja — soma
     a borda ficando sólida como segundo sinal, mesmo recurso do .tier-card. */
  background: rgba(255, 255, 255, 0.2);
  border-color: #ffffff;
}

/* Só nas telas de troca de senha/MFA (Figma pede "Voltar"/"Habilitar
   Autenticação" em texto normal, não caixa alta) — não mexe no
   text-transform: uppercase padrão usado no resto do fluxo (pagamento,
   planos, termos), que já foi confirmado como intencional. */
.btn-normal-case {
  text-transform: none;
}

/* Primário no card branco: laranja */
.btn-primary--on-white {
  background: #e94e1b;
  color: #ffffff;
  border: none;
}

.btn-primary--on-white:hover:not(:disabled) {
  background: #c83e12;
  box-shadow: 0 4px 12px rgba(200, 62, 18, 0.3);
}

/* Ghost no card branco: borda escura */
.btn-ghost--on-white {
  background: transparent;
  color: #16161b;
  border: 1.5px solid rgba(22, 22, 27, 0.4);
}

.btn-ghost--on-white:hover {
  background: rgba(22, 22, 27, 0.06);
}

.btn-full {
  width: 100%;
}
.btn-center {
  align-self: center;
}

.form-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.form-actions--row {
  flex-direction: row;
  justify-content: center;
}

/* Botões do par (Voltar/Confirmar etc.) com a mesma largura, em vez de cada
   um encolher pro tamanho do próprio texto — mesmo tratamento de
   .form-actions--split, só que centralizado em vez de nas pontas. */
.form-actions--row .btn-primary,
.form-actions--row .btn-ghost {
  flex: 1 1 0;
  max-width: 220px;
}

/* #password-edit-form fica FORA de .form-actions (ver comentário na view) —
   sem essa largura os botões (livres pra crescer até 220px cada + gap)
   ultrapassam os 324px do .signup-form com os inputs logo acima. */
#password-edit-form + .form-actions--row {
  width: 324px;
  margin-left: auto;
  margin-right: auto;
}

.form-actions--split {
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.form-actions--split .btn-primary,
.form-actions--split .btn-ghost {
  flex: 1;
  max-width: 160px;
}

/* ── Info box ── */
.signup-info {
  display: flex;
  gap: 10px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 0.9rem;
  align-items: flex-start;
}

.signup-info .material-symbols-outlined {
  flex-shrink: 0;
  font-size: 1.125rem;
}

/* Sem isso, a margem padrão do navegador no <p> (~1em) empurra o texto pra
   baixo do ícone — mesmo problema já corrigido em .signup-errors p. */
.signup-info p {
  margin: 0;
  line-height: 1.4;
}

/* ── Card de plano pré-selecionado (step 1 — fluxo 3 etapas) ── */
.selected-plan-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid #fff;
  border-radius: 20px;
  padding: 20px 24px;
  margin-bottom: 32px;
  color: #fff;
}

.selected-plan-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.selected-plan-name {
  font-family: "Roboto", sans-serif;
  font-weight: 700;
  font-size: 1rem;
}

.selected-plan-trial {
  font-family: "Roboto", sans-serif;
  font-size: 0.75rem;
  opacity: 0.85;
}

.selected-plan-price {
  display: flex;
  align-items: baseline;
  gap: 2px;
  white-space: nowrap;
}

.selected-plan-price .price-currency {
  font-family: "Roboto", sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
}

.selected-plan-price .price-amount {
  font-family: "Archivo Black", sans-serif;
  font-size: 1.375rem;
}

.selected-plan-price .price-period {
  font-family: "Roboto", sans-serif;
  font-size: 0.75rem;
  opacity: 0.85;
}

/* ── Card de resumo do plano escolhido (step 2 — fluxo por grupo, 4 etapas) ── */
.selected-plan-group-card {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 16px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid #000000;
  border-radius: 20px;
  width: 402px;
  max-width: 100%;
  padding: 28px 20px;
  margin: 0 auto 32px;
}

.selected-plan-group-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.selected-plan-group-name {
  font-family: "Roboto", sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1.2;
  color: #ffffff;
  text-transform: uppercase;
  margin: 0;
}

.selected-plan-group-subtitle {
  font-family: "Roboto", sans-serif;
  font-size: 0.9375rem;
  color: #000000;
  margin: 0;
}

.selected-plan-group-price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  text-align: right;
  /* Sem white-space:nowrap: se ainda assim não coubesse, é melhor a linha
     secundária quebrar dentro da própria coluna do que estourar o card. */
  min-width: 0;
}

.selected-plan-group-price-main {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 2px 4px;
}

.selected-plan-group-price-currency {
  font-family: "Roboto", sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
  color: #ffffff;
}

.selected-plan-group-price-amount {
  font-family: "Roboto", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
}

.selected-plan-group-price-period {
  font-family: "Roboto", sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
}

.selected-plan-group-price-secondary {
  font-family: "Roboto", sans-serif;
  font-size: 0.75rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
}

.selected-plan-group-price-secondary-amount {
  font-family: "Roboto", sans-serif;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #ffffff;
}

/* ── Cards de Tier (step 2 — escolha de ProductGroup) ─────────────────────── */
.tiers-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.tier-card-wrapper {
  position: relative;
}

.tier-badge {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  transition: transform 0.15s ease;
  background: #ffffff;
  color: #333333;
  font-family: "Roboto", sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 8px 24px;
  border-radius: 100px;
  white-space: nowrap;
  z-index: 1;
}

/* O badge é irmão do .tier-card (não filho) — ancorado no .tier-card-wrapper,
   que nunca se move. Sem isto, ele fica pra trás quando só o card sobe no
   hover, "descolando" do canto do card. */
.tier-card-wrapper:hover .tier-badge {
  transform: translateX(-50%) translateY(-6px);
}

/* Mesmo padrão visual do .payment-card (step4 — seleção de forma de
   pagamento): já resolve hover/seleção pra cards clicáveis nesse mesmo
   wizard, então em vez de inventar um novo é só reaproveitar. */
.tier-card {
  /* Cor sólida equivalente à mistura rgba(255,255,255,.45) sobre o gradiente
     de fundo desta tela (capturada por amostragem real de pixel) — não
     rgba: um card translúcido força o Chrome a recompor a mistura com o
     gradiente por trás a cada frame, e em monitores com escala não-nativa
     isso pode piscar uma cor errada por um instante durante o hover (o
     transform promove o card a uma camada de GPU própria). Sólida, não tem
     mistura nenhuma pra dar errado. */
  background: #f39d81;
  border: 1px solid #000000;
  border-radius: 20px;
  padding: 32px;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: 100%;
  box-sizing: border-box;
  min-width: 0;
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.15);
  transition: background 0.15s, border-width 0.15s, box-shadow 0.2s ease, transform 0.15s ease;
}

/* Só feedback visual — quem de fato seleciona o plano é o .tier-select-btn
   dentro do card, não o card em si (ver form_with por card no step1).
   Gatilho no :hover do .tier-card-wrapper (que nunca se move) em vez do
   .tier-card, mesmo cuidado do .payment-card equivalente — o translateY
   aqui move o próprio .tier-card, então se o hover fosse decidido nele
   mesmo, subir tiraria o cursor de dentro do card perto da borda de baixo,
   soltando e re-acionando o hover num loop (piscando). Com o gatilho no
   wrapper (que não se move) isso não acontece. */
.tier-card-wrapper:hover .tier-card {
  background: #f5af98; /* equivalente sólido de rgba(255,255,255,.55), mesmo motivo acima */
  box-shadow: 0 20px 32px rgba(0, 0, 0, 0.22);
  transform: translateY(-6px);
}

.tier-card--selected {
  background: #ff3f00;
  border-width: 3px;
  box-shadow: 0 20px 24px rgba(0, 0, 0, 0.35);
}

.tier-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tier-name {
  font-family: "Roboto", sans-serif;
  font-weight: 800;
  font-size: 2.25rem; /* 36px */
  line-height: 1.25;
  color: #ffffff;
  margin: 0;
}

.tier-subtitle {
  font-family: "Roboto", sans-serif;
  font-size: 0.75rem; /* 12px */
  letter-spacing: 0.4px;
  color: #000000;
  margin: 0;
}

.tier-price-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tier-price-line {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.tier-price-currency {
  font-family: "Roboto", sans-serif;
  font-size: 1rem; /* 16px */
  font-weight: 300;
  color: rgba(255, 255, 255, 0.8);
}

.tier-price-amount {
  font-family: "Roboto", sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: #ffffff;
  line-height: 1;
}

.tier-price-period {
  font-family: "Roboto", sans-serif;
  font-size: 0.875rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.8);
}

.tier-price-alt {
  font-family: "Roboto", sans-serif;
  font-size: 0.875rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
}

.tier-description {
  font-family: "Roboto", sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.4px;
  color: #ffffff;
  text-align: left;
  margin: 0;
}

.tier-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  height: 28px;
  background: #ffb59f;
  color: #444748;
  font-family: "Roboto", sans-serif;
  font-size: 0.75rem; /* 12px */
  font-weight: 500;
  letter-spacing: 0.4px;
  border-radius: 100px;
  padding: 0 12px;
  text-align: center;
}

.tier-trial {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-family: "Roboto", sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 100px;
  padding: 4px 12px;
  align-self: flex-start;
}

.tier-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.tier-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Roboto", sans-serif;
  font-size: 0.875rem; /* 14px */
  font-weight: 400;
  color: #ffffff;
}

.tier-features .material-symbols-outlined {
  font-size: 16px;
  color: #000000;
  flex-shrink: 0;
  /* Círculo preenchido com o check vazado, em vez do contorno padrão. */
  font-variation-settings:
    "FILL" 1,
    "wght" 400,
    "GRAD" 0,
    "opsz" 24;
}

.tier-select-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 40px;
  background: #fffaf9;
  color: #444748;
  border: none;
  border-radius: 100px;
  font-family: "Roboto", sans-serif;
  font-size: 0.875rem; /* 14px */
  font-weight: 500;
  letter-spacing: 0.1px;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s ease;
}

.tier-select-btn:hover {
  opacity: 0.9;
}

.tier-select-btn:active {
  transform: scale(0.96);
  opacity: 0.85;
}

/* ═══════════════════════════════════════════════════════════════════
   Step 4 — Pagamento (Card Elements custom)
   ═══════════════════════════════════════════════════════════════════ */

/* Cards de seleção de forma de pagamento */
.payment-cards-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 46px;
  margin-bottom: 48px; /* espaço pro badge de desconto sobreposto */
}

/* Irmão de .payment-cards-grid e do <form>, largura cheia do step — mesma
   posição da Aurea (PaymentInput "Número de parcelas" fora do DataContainer
   de 2 colunas). */
.payment-charge-summary {
  margin-bottom: 24px;
}

.payment-card-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 1 380px;
  max-width: 460px;
}

.payment-card {
  /* Mesma cor sólida (e mesmo motivo) do .tier-card — amostrada por pixel
     real, equivalente a rgba(255,255,255,.45) sobre este mesmo gradiente. */
  background: #f39d81;
  border: 1px solid #000000;
  border-radius: 20px;
  overflow: hidden;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  flex: 1;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s,
    border-width 0.15s,
    box-shadow 0.2s ease,
    transform 0.15s ease;
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.15);
  box-sizing: border-box;
}

/* Hover lift — mesmo efeito e mesmo cuidado do .tier-card (step1): gatilho no
   :hover do .payment-card-wrapper, que nunca se move, e não no .payment-card
   em si, senão o próprio elemento que sobe decide se está em hover e entra
   num loop de piscar perto da borda de baixo. */
.payment-card-wrapper:hover .payment-card {
  background: #f5af98; /* equivalente sólido de rgba(255,255,255,.55) */
  box-shadow: 0 20px 32px rgba(0, 0, 0, 0.22);
  transform: translateY(-6px);
}

.payment-card--selected {
  background: #ff3f00;
  border-width: 3px;
  box-shadow: 0 20px 24px rgba(0, 0, 0, 0.35);
}

/* .payment-card-wrapper:hover .payment-card (acima) tem mais classes na
   cadeia que .payment-card--selected sozinho — sem repetir aqui, o hover
   genérico ganharia da cascata e apagaria o vermelho sólido do selecionado
   ao passar o mouse nele (mesmo ajuste do .tier-card--selected). */
.payment-card-wrapper:hover .payment-card--selected {
  background: #ff3f00;
  box-shadow: 0 20px 24px rgba(0, 0, 0, 0.35);
  transform: translateY(-6px);
}

/* Card da tela de compra concluída (checkout_return) — spec do Figma
   ("Compra feita_cartao"): fundo branco 20% opacidade, não o laranja sólido
   do card selecionado no step4 (contextos diferentes: escolha ativa de
   pagamento vs. resumo de uma compra já finalizada). */
.return-plan-row .payment-card--selected {
  background: hsla(0, 0%, 100%, 0.2);
}

.payment-card-badge-bar {
  background: #ffffff;
  color: #000000;
  font-family: "Roboto", sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  text-align: center;
  padding: 10px 16px;
}

/* Badge de desconto sobreposto à borda inferior do card */
.payment-discount-badge {
  position: absolute;
  bottom: -16px;
  left: 50%;
  transform: translateX(-50%);
  transition: transform 0.15s ease;
  background: #000000;
  color: #ffffff;
  font-family: "Roboto", sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  padding: 6px 20px;
  border-radius: 100px;
  white-space: nowrap;
  z-index: 2;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

/* Mesmo motivo do .tier-badge: irmão do .payment-card, ancorado na wrapper
   que não se move — sem isto o "-X%" fica pra trás quando só o card sobe. */
.payment-card-wrapper:hover .payment-discount-badge {
  transform: translateX(-50%) translateY(-6px);
}

.payment-card-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 24px 28px;
  flex: 1;
}

.payment-card-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.payment-card-name {
  font-family: "Roboto", sans-serif;
  font-weight: 800;
  font-size: 2rem; /* 32px */
  line-height: 1.2;
  color: #ffffff;
  text-transform: uppercase;
  margin: 0;
}

.payment-card-subtitle {
  font-family: "Roboto", sans-serif;
  font-size: 0.8125rem;
  color: #000000;
  margin: 0;
}

.payment-card-type {
  font-family: "Roboto", sans-serif;
  font-size: 0.875rem; /* 14px */
  font-weight: 700;
  letter-spacing: 0.25px;
  color: #ffffff;
  margin: 4px 0 0;
}

.payment-card-price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  text-align: right;
  min-width: 0;
}

/* Linha principal do preço com prefixo (até 12x de), R$, valor, período */
.payment-card-price-main {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 4px;
}

.payment-card-price-prefix {
  font-family: "Roboto", sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
  width: 100%;
  text-align: right;
}

.payment-card-price-currency {
  font-family: "Roboto", sans-serif;
  font-size: 1rem;
  font-weight: 400;
  color: #ffffff;
}

.payment-card-price-amount {
  font-family: "Roboto", sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.payment-card-price-period {
  font-family: "Roboto", sans-serif;
  font-size: 1rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
}

.payment-card-price-secondary {
  font-family: "Roboto", sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  color: #ffffff;
}

/* ── Form layout 2 colunas ───────────────────────────────────────── */
.payment-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  margin-bottom: 24px;
}

.payment-form-section {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.payment-form-title {
  font-family: "Inter", "Roboto", sans-serif;
  font-size: 1.125rem; /* 18px */
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 8px;
}

/* Título + badge "Pagamento Seguro" lado a lado (mesmo padrão da Aurea) */
.payment-form-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.payment-form-title-row .payment-form-title {
  margin: 0;
}

.payment-secure-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #ffffff;
  font-family: "Inter", "Roboto", sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
}

.payment-secure-badge .material-symbols-outlined {
  font-size: 16px;
  color: #fcbc05;
}

/* Stripe Elements wrapper — bordas + bg semi-transparente */
.payment-input,
.StripeElement {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid #ffffff;
  border-radius: 4px;
  padding: 14px 16px;
  color: #333333;
  font-family: "Inter", "Roboto", sans-serif;
  font-size: 1rem;
  width: 100%;
  box-sizing: border-box;
}

.payment-input::placeholder {
  color: rgba(51, 51, 51, 0.5);
}

.payment-input:focus,
.StripeElement--focus {
  border-color: #16161b;
  outline: none;
}

.StripeElement--invalid {
  border-color: #c83e12;
}

.payment-input-label {
  display: block;
  font-family: "Inter", "Roboto", sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 4px;
}

.payment-input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Bandeiras aceitas */
.payment-card-brands {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid #ffffff;
  border-radius: 4px;
  padding: 12px 16px;
  font-family: "Inter", sans-serif;
  font-size: 0.75rem;
  color: #16161b;
}

.payment-card-brands-icons {
  display: flex;
  margin-left: auto;
  gap: 6px;
}

.payment-card-brands-icons span {
  display: inline-block;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #16161b;
  letter-spacing: 0.5px;
}

/* Dropdown nativo de parcelas */
.payment-installments-select {
  width: 100%;
  height: 58px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid #ffffff;
  border-radius: 4px;
  color: #333333;
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath stroke='%23333' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m1 1 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.payment-installments-select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Botões inferiores */
.payment-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}

.payment-btn-cancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 10px 24px;
  border: 1px solid #ffffff;
  background: transparent;
  border-radius: 100px;
  color: #ffffff;
  font-family: "Roboto", sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
}

/* Era transparente (mostra o laranja do .signup-card por trás) — um hover
   translúcido aqui teria o mesmo risco de mistura alfa que já corrigimos no
   .tier-card/.step-indicator. Cor sólida já capturada por amostragem real
   (branco 10% sobre o laranja do card). */
.payment-btn-cancel:hover {
  background: #ea5f31;
}

.payment-btn-pay {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  min-width: 120px;
  padding: 10px 24px;
  background: #fffaf9;
  color: #444748;
  border: none;
  border-radius: 100px;
  font-family: "Roboto", sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}

/* Mesmo padrão do .btn-primary:hover — aqui é branco translúcido sobre um
   fundo já quase branco (#fffaf9), sem o salto de matiz que causa o problema
   em telas com escala não-nativa, então não precisa de versão sólida. */
.payment-btn-pay:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.payment-btn-pay:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.payment-error {
  background: rgba(200, 62, 18, 0.2);
  border: 1px solid #c83e12;
  border-radius: 8px;
  padding: 12px 16px;
  color: #ffffff;
  font-size: 0.875rem;
  margin-bottom: 16px;
}

.signup-cancel-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 999;
}

.signup-cancel-modal-overlay[hidden] {
  display: none;
}

.signup-cancel-modal-card {
  width: 100%;
  max-width: 480px;
  background: #ffffff;
  border-radius: 32px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.24);
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.signup-cancel-modal-text {
  font-family: "Roboto", sans-serif;
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.3;
  color: #16161b;
  text-align: center;
  margin: 0;
}

.signup-cancel-modal-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
}

/* Overlay durante troca de forma de pagamento */
[data-controller="signup-step4"] {
  position: relative;
}

[data-controller="signup-step4"].is-switching::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(233, 78, 27, 0.55);
  z-index: 10;
  border-radius: 16px;
}

[data-controller="signup-step4"].is-switching::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 48px;
  height: 48px;
  margin: -24px 0 0 -24px;
  border: 3px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  z-index: 11;
}

/* Respeita o atributo HTML `hidden` mesmo quando o elemento tem display flex/grid */
[data-controller="signup-step4"] [hidden] {
  display: none !important;
}

/* Loading state */
.payment-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 40px;
  text-align: center;
  color: #ffffff;
}

.payment-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── Responsivo ── */
@media (max-width: 900px) {
  .step-indicator {
    gap: 6px;
  }
  .step-item {
    max-width: 110px;
  }
  .plans-grid {
    grid-template-columns: 1fr;
  }
  .tiers-grid {
    grid-template-columns: 1fr;
  }
  .payment-form-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 560px) {
  .step-indicator {
    gap: 4px;
    margin-bottom: 28px;
  }
  .step-item {
    max-width: none;
    gap: 6px;
  }
  .step-item::before {
    top: 16px;
    height: 8px;
  }
  .step-circle {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
  }
  .step-check {
    font-size: 1rem;
  }
  .step-label {
    font-size: 0.625rem;
  }

  .signup-page {
    padding: 32px 12px 32px;
  }
  .signup-card {
    padding: 24px 18px;
  }
  .fields-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .payment-input-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .step-item--done .step-label,
  .step-item--pending .step-label {
    display: none;
  }
}
