/* ZapTrace UI v4 — conta: Support, Learn, Profile e páginas de login/cadastro.
   Carrega depois do v4.css. */

/* ---------- Voltar (Support e aula) ---------- */

.suporte__voltar {
  justify-self: start;
  align-self: flex-start;
  gap: 6px;
  min-height: 40px;
  margin-bottom: 0;
  padding: 0 14px 0 10px;
  border-radius: 999px;
  background: var(--superficie);
  border: 1px solid var(--linha);
  color: var(--texto-2);
  font-weight: 700;
  font-size: 0.86rem;
}
.suporte__voltar:hover { color: var(--texto); background: var(--superficie-2); }

/* ---------- Support: início ---------- */

.suporte__hero { padding: 8px 8px 4px; margin-bottom: 0; }
.suporte__hero-titulo { font-family: var(--f-marca); font-size: 1.3rem; font-weight: 800; margin-bottom: 6px; }
.suporte__hero-sub { font-size: 0.9rem; max-width: 34ch; margin: 0 auto; }
.sup-opcoes { gap: 10px; margin-top: 16px; }
.sup-opcao { background: var(--superficie); }
.sup-opcao:hover { background: var(--superficie-2); }
.sup-opcao__texto { flex: 1; }

.sup-historico { margin-top: 24px; gap: 8px; }
.sup-historico__titulo { font-family: var(--f-marca); font-size: 1rem; font-weight: 800; color: var(--texto); }
.sup-historico__titulo .ic { color: var(--texto-2); }
.sup-ticket {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--linha);
  background: var(--superficie);
}
.sup-ticket--respondido { border-left: 3px solid var(--verde); }
.sup-ticket--resolvido { opacity: 0.75; }
.sup-ticket__topo { flex-wrap: wrap; row-gap: 6px; }
.sup-ticket__estado,
.sup-ticket__nova,
.sup-ticket__tag-email { padding: 3px 9px; border-radius: 999px; font-size: 0.7rem; }
.sup-ticket__mensagem {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.88rem;
}

/* ---------- Support: formulários ---------- */

.suporte__form-titulo { gap: 10px; margin: 14px 0 4px; font-family: var(--f-marca); font-size: 1.2rem; font-weight: 800; }
.suporte__form-icone { width: 40px; height: 40px; }
.suporte__form-icone .ic { width: 20px; height: 20px; }
.suporte__form-icone--obs { background: rgba(var(--srv-chamada-rgb), 0.16); }
.suporte__form-icone--reemb { background: rgba(var(--ouro-rgb), 0.16); }
.suporte__form-desc { font-size: 0.9rem; margin-bottom: 16px; }
.suporte__form { gap: 14px; }
.suporte__textarea { min-height: 120px; padding-block: 14px; line-height: 1.5; resize: vertical; }
.suporte__form-status { font-size: 0.86rem; font-weight: 600; min-height: 0; }
.suporte__form-status:empty { display: none; }
.btn.sup-form-anexo__btn { padding: 0 12px; height: 40px; border: 1px dashed var(--linha-forte); color: var(--texto-2); }
.btn.sup-form-anexo__btn:hover { color: var(--texto); border-color: var(--verde); }
.sup-anexo-preview { padding: 8px 12px; border-radius: 12px; }
.sup-anexo-preview__remover { width: 32px; height: 32px; border-radius: 50%; font-size: 1.3rem; }

/* ---------- Questionário de reembolso ---------- */

.quiz { gap: 18px; }
.quiz__topo { gap: 8px; }
.quiz__topo .suporte__form-titulo { margin-top: 10px; }
.quiz__progresso { gap: 8px; margin-top: 2px; }
.quiz__passo { color: var(--ouro-claro); }
.quiz__barra { height: 6px; border-radius: 999px; }
.quiz__barra-fill { border-radius: 999px; background: linear-gradient(90deg, var(--ouro), var(--ouro-claro)); }
.quiz__pergunta { font-family: var(--f-marca); font-size: 1.12rem; font-weight: 800; }
.quiz__opcoes { gap: 8px; }
.quiz__opcao {
  min-height: 52px;
  padding: 12px 16px;
  border: 1px solid var(--linha);
  border-radius: 14px;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
  transition: background 0.15s, border-color 0.15s, transform 0.12s;
}
.quiz__opcao:hover { border-color: rgba(var(--ouro-rgb), 0.45); }
.quiz__opcao:active { transform: scale(0.98); }
.quiz__opcao .ic { flex: none; }
.quiz__opcao--ativa { border-color: var(--ouro); background: rgba(var(--ouro-rgb), 0.1); }
.quiz__opcao--ativa .ic { color: var(--ouro); }

.quiz__resumo { display: grid; gap: 8px; }
.quiz__resumo-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2px 12px;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--linha);
  border-radius: 14px;
  background: var(--superficie);
  color: var(--texto);
  text-align: left;
  cursor: pointer;
}
.quiz__resumo-item:hover { background: var(--superficie-2); }
.quiz__resumo-rotulo { grid-column: 1; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--texto-3); }
.quiz__resumo-valor { grid-column: 1; min-width: 0; font-size: 0.9rem; font-weight: 600; overflow-wrap: anywhere; }
.quiz__resumo-editar { grid-column: 2; grid-row: 1 / span 2; font-size: 0.82rem; font-weight: 800; color: var(--verde); }

.quiz__fim { gap: 12px; padding: 24px 4px 4px; }
.quiz__fim-selo { width: 64px; height: 64px; background: rgba(0, 230, 118, 0.14); box-shadow: 0 0 0 8px rgba(0, 230, 118, 0.06); }
.quiz__fim-titulo { font-family: var(--f-marca); font-size: 1.35rem; font-weight: 800; }
.quiz__fim-texto { font-size: 0.92rem; }
.quiz__fim-ref { padding: 4px 12px; border-radius: 999px; background: var(--superficie); border: 1px solid var(--linha); font-size: 0.8rem; font-weight: 700; color: var(--texto-2); }

/* ---------- Support: conversa ---------- */

.sup-conversa { display: grid; gap: 12px; }
.sup-chat__cabecalho { gap: 8px; margin-bottom: 0; }
.sup-chat__cabecalho .sup-ticket__estado { padding: 3px 9px; border-radius: 999px; font-size: 0.7rem; }

.sup-chat {
  gap: 4px;
  max-height: min(58dvh, 560px);
  min-height: 180px;
  padding: 14px 12px;
  overscroll-behavior: contain;
}
.sup-chat__msg { margin-bottom: 6px; }
.sup-chat__bolha {
  max-width: 86%;
  padding: 10px 13px;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.5;
}
.sup-chat__msg--minha .sup-chat__bolha {
  background: rgba(0, 230, 118, 0.14);
  border: 1px solid rgba(0, 230, 118, 0.22);
  border-bottom-right-radius: 5px;
}
.sup-chat__msg--outra .sup-chat__bolha {
  background: var(--superficie-2);
  border: 1px solid var(--linha);
  border-bottom-left-radius: 5px;
}
.sup-chat__autor { font-size: 0.66rem; color: var(--texto-2); margin-bottom: 3px; }
.sup-chat__msg--minha .sup-chat__autor { color: var(--verde); }
.sup-chat__hora { font-size: 0.66rem; margin-top: 4px; }
.sup-chat__anexo-img { max-width: min(220px, 100%); border-radius: 10px; }

/* O campo de resposta fica preso ao pé da tela, logo acima do menu de baixo:
   numa conversa longa a pessoa não precisa rolar até o fim para responder. */
.sup-chat__responder {
  position: sticky;
  bottom: calc(76px + env(safe-area-inset-bottom));
  z-index: 5;
  margin-top: 0;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--linha-forte);
  border-radius: 20px;
  background: rgba(17, 33, 43, 0.97);
  box-shadow: var(--sombra-elevada);
}
.sup-chat__responder > .dica { padding: 0 4px; font-size: 0.8rem; }
.sup-chat__status { padding: 0 4px; font-size: 0.82rem; font-weight: 600; }
.sup-chat__status:empty { display: none; }
.sup-chat__acoes { align-items: flex-end; gap: 8px; }
.input.sup-chat__input {
  flex: 1;
  min-width: 0;
  height: 44px;
  min-height: 44px;
  max-height: 140px;
  padding: 11px 14px;
  border-width: 1px;
  border-radius: 14px;
  line-height: 1.4;
  resize: none;
  overflow-y: hidden;
}
.input.sup-chat__input::placeholder { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn.sup-chat__btn-anexo { flex: none; width: 44px; height: 44px; padding: 0; justify-content: center; color: var(--texto-2); }
.btn.sup-chat__btn-anexo .ic { width: 20px; height: 20px; }
.btn.sup-chat__btn-enviar { flex: none; height: 44px; padding: 0 16px; gap: 6px; }
.btn.sup-chat__btn-enviar .ic { width: 17px; height: 17px; }
/* Celular: o enviar vira um botão redondo só com o ícone, para o campo de
   texto ganhar a largura e o placeholder caber numa linha. */
@media (max-width: 599px) {
  .btn.sup-chat__btn-enviar { width: 44px; padding: 0; border-radius: 50%; }
  .sup-chat__btn-enviar-texto { display: none; }
}
@media (min-width: 900px) {
  .sup-chat__responder { bottom: 16px; }
}

/* ---------- Learn ---------- */

.tut-hero { display: grid; gap: 12px; margin-bottom: 0; }
.tut-cta {
  gap: 10px;
  margin: -6px 0 0;
  padding: 0 4px;
  border: 0;
  background: none;
}
.tut-cta__icone { width: 26px; height: 26px; background: rgba(0, 230, 118, 0.14); color: var(--verde); }
.tut-cta__icone .ic { width: 13px; height: 13px; }
.tut-cta__texto { font-size: 0.84rem; color: var(--texto-2); }
.tut-grid { gap: 10px; }

.tut-card--destaque { gap: 12px; padding: 12px 12px 14px; }
.tut-card--destaque .tut-card__icone { display: none; }
.tut-card--destaque .tut-card__corpo { padding: 0 4px; gap: 4px; }
.tut-card--destaque .tut-card__badge { justify-content: center; gap: 6px; height: 44px; border-radius: 14px; font-size: 0.92rem; color: #06231a; font-weight: 800; }
.tut-card--destaque .tut-card__badge .ic { width: 16px; height: 16px; }
.tut-card__capa {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background:
    radial-gradient(70% 90% at 80% 10%, rgba(255, 255, 255, 0.18), transparent 60%),
    linear-gradient(135deg, color-mix(in srgb, var(--tut-cor) 80%, #000) 0%, color-mix(in srgb, var(--tut-cor) 35%, #04130c) 100%);
}
.tut-card__capa-marca {
  position: absolute;
  top: 12px;
  left: 12px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}
.tut-card__capa-marca .ic { width: 20px; height: 20px; }
.tut-card__capa-play {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #fff;
  color: color-mix(in srgb, var(--tut-cor) 70%, #000);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35), 0 0 0 8px rgba(255, 255, 255, 0.16);
  transition: transform 0.15s;
}
.tut-card__capa-play .ic { width: 26px; height: 26px; margin-left: 3px; }
.tut-card--destaque:hover .tut-card__capa-play { transform: scale(1.06); }

.tut-card__badge--ir { padding: 7px 12px; border: 1px solid var(--linha-forte); }
@media (max-width: 374px) {
  .tut-card { gap: 12px; padding: 12px; }
  .tut-card__badge--ir { font-size: 0; padding: 0; width: 34px; height: 34px; justify-content: center; }
  .tut-card__badge--ir .ic { width: 16px; height: 16px; }
}
@media (min-width: 600px) {
  .tut-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tut-grid .tut-card { flex-wrap: wrap; align-content: flex-start; }
  .tut-grid .tut-card__corpo { flex-basis: calc(100% - 60px); }
  .tut-grid .tut-card__badge { margin-left: 58px; }
}

.aula { gap: 14px; }
.aula__titulo { font-family: var(--f-marca); font-size: 1.25rem; font-weight: 800; }
.aula__titulo-icone { width: 40px; height: 40px; border-radius: 12px; }
.aula__video-wrap { border-radius: 18px; border: 1px solid var(--linha); box-shadow: var(--sombra-elevada); }
.aula__video { display: block; border-radius: 0; background: #000; }
.aula__desc { font-size: 0.92rem; }

/* ---------- Profile ---------- */

.perfil-topo { gap: 4px; }
.perfil-topo .dica { font-size: 0.86rem; }

.gamif__head { margin-bottom: 14px; }
.gamif__rank { font-family: var(--f-marca); font-size: 1.05rem; font-weight: 800; }
.gamif__rank-icone { width: 34px; height: 34px; }
.gamif__rank-icone .ic { width: 18px; height: 18px; }
.gamif__xp { padding: 4px 10px; border-radius: 999px; background: rgba(var(--ouro-rgb), 0.12); font-size: 0.82rem; }
.gamif__barra { height: 8px; border-radius: 999px; }
.gamif__barra-fill { border-radius: 999px; background: linear-gradient(90deg, #00c964, var(--verde)); }
.gamif__progresso-texto { font-size: 0.76rem; color: var(--texto-2); }
.gamif__conquistas { display: grid; gap: 8px; }
/* Bloqueadas ficam legíveis: o cadeado e a cor apagada já dizem que faltam. */
.gamif__conquista {
  min-height: 56px;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--linha);
  border-radius: 14px;
  background: var(--grafite-950);
  opacity: 1;
}
.gamif__conquista > div { min-width: 0; }
.gamif__conquista strong { font-size: 0.88rem; color: var(--texto-2); }
.gamif__conquista-desc { font-size: 0.76rem; }
.gamif__conquista-icone { width: 34px; height: 34px; color: var(--texto-3); background: var(--superficie-2); }
.gamif__conquista-icone .ic { width: 16px; height: 16px; }
.gamif__conquista--ok { border-color: rgba(0, 230, 118, 0.3); background: rgba(0, 230, 118, 0.06); }
.gamif__conquista--ok strong { color: var(--texto); }
.gamif__conquista-lock .ic { width: 15px; height: 15px; }
/* Two columns only when each card gets ~250px; in the 480px profile column
   that was squeezing titles and descriptions onto three lines. */
.gamif__conquistas { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }

/* ---------- Login, cadastro e definir senha ---------- */

.auth { padding-block: 32px; }
.auth__caixa { gap: 22px; }
.auth .marca img { width: 36px; height: 36px; }
.auth__cartao { padding: 26px 22px; }
.auth__cartao h1 { font-size: 1.5rem; }
.auth__cartao .sub { margin: 6px 0 20px; font-size: 0.92rem; line-height: 1.45; }
.auth__cartao .sub:has(+ form[hidden]) { margin-bottom: 0; }
.auth .form { gap: 16px; }
.auth .btn--bloco { margin-top: 4px; }
.auth__rodape { font-size: 0.92rem; }
.auth__rodape a { display: inline-block; padding: 8px 2px; }
@media (max-width: 374px) {
  .auth__cartao { padding: 22px 16px; }
}

.senha-caixa { position: relative; }
.senha-caixa .input { padding-right: 52px; }
.senha-caixa__olho {
  position: absolute;
  top: 50%;
  right: 4px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--texto-3);
  cursor: pointer;
}
.senha-caixa__olho:hover { color: var(--texto); }
.senha-caixa__olho svg { width: 20px; height: 20px; }

/* Enquanto espera o servidor, o botão mostra que está trabalhando. */
.btn[aria-busy='true'] { position: relative; color: transparent; opacity: 1; }
.btn[aria-busy='true']::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(6, 35, 26, 0.3);
  border-top-color: #06231a;
  border-radius: 50%;
  animation: conta-giro 0.7s linear infinite;
}
@keyframes conta-giro { to { transform: rotate(360deg); } }
@media (min-width: 600px) {
  .tut-card__capa { max-height: 240px; }
}
.sup-chat__reembolso {
  margin-left: auto;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(var(--ouro-rgb), 0.35);
  border-radius: 999px;
  background: rgba(var(--ouro-rgb), 0.08);
  color: var(--ouro-claro);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}
.sup-chat__reembolso:hover { background: rgba(var(--ouro-rgb), 0.16); }
