:root {
  color-scheme: light;
  /* BRAVELO MOTION: azul profundo como base, laranja->magenta como acento.
     primary/background/surface/surfaceAlt/text/textMuted também são
     setados via JS a partir de config.js/colors (applyBranding em app.js)
     -- os valores abaixo são o default/fallback antes do JS rodar e devem
     ficar em sincronia com config.js. accent/accent-2/dark/dark-alt/
     dark-text/dark-muted não são data-driven, só existem aqui. */
  --brand-primary: #0B1E3D;
  --brand-primary-dark: #061224;
  --brand-background: #F5F4F1;
  --brand-surface: #ffffff;
  --brand-surface-alt: #E9EBF1;
  --brand-text: #0F1B33;
  --brand-text-muted: #5C6579;
  --brand-accent: #FF7A45;
  --brand-accent-2: #D6336C;
  --brand-gradient: linear-gradient(135deg, var(--brand-accent) 0%, var(--brand-accent-2) 100%);
  --brand-dark: #0A1730;
  --brand-dark-alt: #142A52;
  --brand-dark-text: #F5F4F1;
  --brand-dark-muted: #A9B4CC;
  --radius: 12px;
  --radius-lg: 20px;
  --font-serif: 'Fraunces', 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --shadow-sm: 0 1px 2px rgba(22, 19, 15, 0.05);
  --shadow-md: 0 24px 48px -24px rgba(22, 19, 15, 0.28);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  background: var(--brand-background);
  color: var(--brand-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

a { color: var(--brand-primary); }

button, input, textarea {
  font-family: inherit;
}

.hidden { display: none !important; }

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem 1.5rem;
  position: sticky;
  top: 0;
  background: rgba(245, 244, 241, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--brand-surface-alt);
  z-index: 10;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.55rem;
  letter-spacing: 0.01em;
  color: var(--brand-primary);
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: block;
}

.brand-wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-tagline {
  display: none;
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--brand-text-muted);
  margin-top: 0.2rem;
}

@media (min-width: 640px) {
  .brand-tagline { display: block; }
}

/* ---------- Navegação principal (header) — BRAVELO MOTION ----------
   Reaproveita showView() já existente (ver setupMainNav() em app.js) --
   não é um router novo. Some em telas <900px (a topbar já fica apertada
   com marca + 6 links + 2 botões) e nas views transacionais do fluxo de
   CNPJ/operador/resgate (ver showView() em app.js). */
.main-nav {
  display: none;
  align-items: center;
  gap: 1.75rem;
}

@media (min-width: 900px) {
  .main-nav { display: flex; }
}

.main-nav .nav-link {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--brand-text-muted);
  text-decoration: none;
  position: relative;
  padding-bottom: 0.2rem;
  transition: color 0.18s ease;
}

.main-nav .nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 2px;
  background: var(--brand-gradient);
  transition: right 0.22s ease;
}

.main-nav .nav-link:hover { color: var(--brand-primary); }
.main-nav .nav-link:hover::after,
.main-nav .nav-link.active::after { right: 0; }
.main-nav .nav-link.active { color: var(--brand-primary); font-weight: 600; }

.btn-sm { padding: 0.6rem 1.1rem; font-size: 0.78rem; }

/* ---------- Páginas próprias (Como funciona / Pontos / Viagens /
   Parceiros / Sobre) — cabeçalho editorial compartilhado ---------- */
.page-hero {
  max-width: 56ch;
  margin: 0 0 2.75rem;
}

.page-hero h1 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  line-height: 1.2;
  color: var(--brand-text);
  margin: 0 0 0.75rem;
}

.page-hero p {
  color: var(--brand-text-muted);
  font-size: 1.05rem;
  margin: 0;
}

/* ---------- /parceiros: grade (nao carrossel) ----------
   Sem "caixa dentro de caixa": nem o grid nem o card têm fundo/borda
   próprios — os logos ficam diretamente sobre o fundo off-white da
   página, separados uns dos outros só por espaçamento generoso (gap),
   nunca por um painel branco/cinza por baixo. Flexbox (não CSS grid) de
   propósito: com grid de colunas fixas, uma contagem que não é múltiplo
   de 3 deixaria uma célula vazia; com flex-wrap + justify-content:center
   a última linha incompleta fica centralizada, sem lógica dependente da
   contagem de itens (funciona igual com 5, 6 ou 9 cards). */
.partners-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.75rem 3rem;
  margin-bottom: 1.5rem;
}

.partner-card {
  flex: 1 1 160px;
  max-width: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.6rem;
}

/* Três por linha no desktop (ex.: 6 itens -> 3+3, nunca célula vazia
   graças ao wrap+centralização acima) -- em telas menores o flex-wrap
   natural reduz para 2 ou 1 por linha sem overflow. */
@media (min-width: 640px) {
  .partner-card { flex-basis: calc(33.3333% - 2rem); max-width: 280px; }
}

/* ---------- Área uniforme de logo real ----------
   Usado no carrossel da home e na grade /parceiros (ver
   partnerCardContent() em app.js). O logo em si nunca é alterado — só a
   área ao redor é padronizada: mesma altura reservada para qualquer
   marca, sem fundo/borda própria (o logo flutua direto sobre o fundo
   off-white da BRAVELO, na cor oficial da marca), object-fit:contain
   para nunca esticar, cortar ou deformar o desenho original. */
.partner-logo-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 60px;
  padding: 0 0.5rem;
}

.partner-logo {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.partner-aux-label {
  display: block;
  margin-top: 0.6rem;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--brand-text-muted);
  text-align: center;
}

/* ---------- Gate de computador (Fase 5.20) ----------
   A landing só é oferecida em telas de computador por enquanto. O corte
   é 100% CSS (funciona mesmo antes do JS terminar de carregar): abaixo
   de 1024px mostramos .desktop-gate e escondemos .app-shell inteiro —
   nunca uma versão cortada/quebrada da landing real. */
.desktop-gate { display: none; }

.desktop-gate-card {
  max-width: 30rem;
  margin: 0 auto;
  padding: 2.5rem 1.75rem;
  text-align: center;
}

.desktop-gate-card .brand-mark {
  width: 44px;
  height: 44px;
  margin: 0 auto 1.25rem;
}

.desktop-gate-card .brand-wordmark-mono {
  display: block;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: 0.02em;
  margin-bottom: 1.5rem;
  color: var(--brand-primary);
}

.desktop-gate-card h1 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.4rem;
  line-height: 1.35;
  margin: 0 0 0.75rem;
  color: var(--brand-text);
}

.desktop-gate-card p {
  color: var(--brand-text-muted);
  font-size: 0.95rem;
  margin: 0;
}

@media (max-width: 1023px) {
  .desktop-gate {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    inset: 0;
    background: var(--brand-background);
    z-index: 100;
  }

  .app-shell { display: none; }
}

/* Complemento por detecção real de dispositivo (ver <script> inline no
   <head> de index.html) — cobre casos que o corte só por largura acima
   não pega, como um tablet em paisagem com viewport >= 1024px (ex.: iPad
   clássico, exatamente 1024px). Fora de qualquer media query de largura
   de propósito: precisa se aplicar mesmo quando a tela é larga o
   suficiente para escapar do corte por CSS puro. Sem JavaScript, a classe
   nunca existe e este bloco nunca se aplica — o corte por largura acima
   continua sendo a única defesa, exatamente como já era antes. */
html.is-mobile-device .desktop-gate {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  inset: 0;
  background: var(--brand-background);
  z-index: 100;
}

html.is-mobile-device .app-shell { display: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  border: none;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--brand-primary);
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.82rem;
}

.btn-primary:hover { background: var(--brand-primary-dark); box-shadow: 0 8px 20px -10px rgba(22, 19, 15, 0.5); }

.btn-ghost {
  background: transparent;
  color: var(--brand-text);
  border: 1px solid var(--brand-surface-alt);
}

.btn-ghost:hover { border-color: var(--brand-primary); }

.btn-on-dark {
  background: var(--brand-dark-text);
  color: var(--brand-dark);
}

.btn-on-dark:hover { background: #ffffff; }

/* CTA principal sobre fundo escuro (hero) — .btn-primary (azul profundo)
   quase some contra o próprio fundo azul profundo do hero; usa o
   gradiente laranja->magenta para se destacar como a ação primária. */
.btn-accent {
  background: var(--brand-gradient);
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.82rem;
}

.btn-accent:hover { box-shadow: 0 10px 24px -10px rgba(214, 51, 108, 0.55); }

.btn-block { width: 100%; }

/* ---------- Fluxo discreto (indicador de etapas) ---------- */
.flow-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem 0.5rem;
  padding: 1.1rem 1rem 0;
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-text-muted);
}

@media (min-width: 640px) {
  .flow-steps { gap: 0.6rem; font-size: 0.72rem; padding: 1.1rem 0 0; }
}

.flow-step { display: flex; align-items: center; gap: 0.6rem; }

.flow-step::before {
  content: attr(data-step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid var(--brand-surface-alt);
  font-size: 0.68rem;
  color: var(--brand-text-muted);
}

.flow-step:not(:last-child)::after {
  content: '';
  width: 12px;
  height: 1px;
  background: var(--brand-surface-alt);
  margin-left: 0.4rem;
}

@media (min-width: 640px) {
  .flow-step:not(:last-child)::after { width: 20px; margin-left: 0.6rem; }
}

.flow-step.active { color: var(--brand-primary); font-weight: 600; }
.flow-step.active::before { border-color: var(--brand-primary); background: var(--brand-primary); color: #fff; }
.flow-step.done::before { border-color: var(--brand-accent); background: var(--brand-accent); color: #fff; content: '\2713'; font-size: 0.6rem; }

/* ---------- Hero editorial (landing) ---------- */
.landing-hero {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 2rem 0;
  box-shadow: var(--shadow-md);
}

.hero-panel-dark {
  background: linear-gradient(160deg, var(--brand-dark) 0%, var(--brand-dark-alt) 100%);
  color: var(--brand-dark-text);
  padding: 3.25rem 2rem;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* Conteúdo do hero centralizado no eixo horizontal (título, texto de
     apoio, CTA e, depois do reveal, o card de CNPJ) -- os elementos
     decorativos BRAVELO MOTION (.hero-abstract) continuam absolutos,
     alheios a este eixo. */
  align-items: center;
  text-align: center;
}

@media (min-width: 720px) {
  .hero-panel-dark { padding: 4rem 4.5rem 4.5rem; }
}

.hero-intro {
  position: relative;
  z-index: 1;
  max-width: 560px;
  width: 100%;
}

/* Símbolo oficial BRAVELO (mesmo asset do header/favicon) dentro do hero
   -- selo claro por trás só para garantir contraste no fundo escuro do
   painel, nunca uma alteração de cor do símbolo em si (que usa navy +
   gradiente laranja/magenta, invisível se colocado direto sobre o fundo
   quase-navy do hero). Discreto: menor que o título, não compete com ele. */
.hero-brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  background: var(--brand-surface);
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.45);
}

.hero-brand-mark img { width: 30px; height: 30px; }

.hero-eyebrow {
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-accent);
  font-weight: 600;
  margin: 0 0 0.75rem;
}

.hero-panel-dark h1 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2rem, 3.6vw, 2.9rem);
  line-height: 1.14;
  letter-spacing: -0.015em;
  margin: 0 auto 1.25rem;
  max-width: 19ch;
}

.hero-paragraphs { margin: 0; }

.hero-paragraphs p {
  color: var(--brand-dark-muted);
  font-size: 1rem;
  max-width: 48ch;
  margin: 0 auto 0.8rem;
}

.hero-paragraphs p:last-child { margin-bottom: 0; }

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.75rem;
}

.hero-abstract {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.9;
}

/* Consulta de CNPJ embutida no HERO — escondida por padrão (Fase CTA/Pix):
   a Home mostra só o CTA "Consultar meus pontos" primeiro; o formulário
   só aparece, com um reveal suave, depois do clique (ver
   revealCnpjForm() em app.js). Continua a mesma view/mesmo formulário de
   sempre — nunca uma rota nova. */
.hero-cnpj-card {
  position: relative;
  z-index: 1;
  margin-top: 2.5rem;
  max-width: 420px;
  width: 100%;
  /* O card em si fica centralizado no mesmo eixo do título/CTA (herda o
     align-items:center do .hero-panel-dark), mas o texto/formulário lá
     dentro voltam ao alinhamento natural à esquerda -- centralizar label,
     input e texto de formulário prejudicaria a leitura. */
  text-align: left;
  background: var(--brand-surface);
  border-radius: var(--radius);
  padding: 1.75rem 1.75rem 1.5rem;
  box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.5);
  animation: hero-cnpj-reveal 0.4s ease both;
}

.hero-cnpj-collapsed { display: none; }

@keyframes hero-cnpj-reveal {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-cnpj-card { animation: none; }
}

.hero-cnpj-card h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.2rem;
  margin: 0 0 0.5rem;
  color: var(--brand-text);
  line-height: 1.3;
}

.hero-cnpj-card p:not(.cnpj-form-note) {
  color: var(--brand-text-muted);
  font-size: 0.86rem;
  margin: 0 0 1.35rem;
}

.cnpj-hero-form .field { margin-bottom: 1.1rem; }

.cnpj-form-note {
  color: var(--brand-text-muted);
  font-size: 0.78rem;
  margin: 0.9rem 0 0;
  text-align: center;
}

/* ---------- Secoes editoriais (landing, abaixo do hero) ---------- */
.landing-secondary { padding: 4rem 0 0; }

.section-eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-text-muted);
  font-weight: 600;
  margin: 0 0 1.75rem;
}

/* ---------- Beneficios: Viagens / Produtos / Cashback / Hoteis / Experiencias ---------- */
.pillars {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 560px) {
  .pillars { grid-template-columns: repeat(2, 1fr); gap: 2.5rem 3rem; }
}

@media (min-width: 960px) {
  .pillars { grid-template-columns: repeat(5, 1fr); gap: 2.5rem 2rem; }
}

.pillar { position: relative; }

.pillar::before {
  content: '';
  display: block;
  width: 32px;
  height: 2px;
  background: var(--brand-accent);
  margin-bottom: 1.25rem;
}

.pillar-icon {
  width: 30px;
  height: 30px;
  color: var(--brand-accent);
  margin-bottom: 1rem;
}

.pillar h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.3rem;
  margin: 0 0 0.6rem;
  color: var(--brand-text);
}

.pillar p {
  color: var(--brand-text-muted);
  font-size: 0.95rem;
  max-width: 34ch;
  margin: 0;
}

.section-lead {
  color: var(--brand-text-muted);
  font-size: 1.02rem;
  max-width: 56ch;
  margin: 0.75rem 0 2.5rem;
}

.about-us-meta {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-text-muted);
  margin: 0.5rem 0 1.5rem;
}

/* ---------- Suas milhas podem levar você mais longe (Fase 5.20) ----------
   Reposicionado para logo após o hero — primeira prova visual de milhas/
   viagens. Tratamento "as-featured-in" de agência de viagens premium:
   fundo branco liso, hairlines finas (não a borda bronze de 2px de antes,
   que lia como decorativa demais), tipografia como a marca visual em si
   (sem barra de cor, sem ícone, sem círculo — ver relatório da fase:
   arquivos de logo reais pendentes, aguardando decisão sobre fonte). */
.landing-destination-banner {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: 4.5rem;
  padding: 5rem 0;
  /* Sem fundo próprio: a seção fica sobre o off-white da página (mesmo
     fundo do resto da Home), delimitada só por duas hairlines discretas —
     nunca uma segunda camada branca competindo com o conteúdo. */
  border-top: 1px solid var(--brand-surface-alt);
  border-bottom: 1px solid var(--brand-surface-alt);
}

.landing-destination-banner-compact {
  margin-top: 0;
  padding: 4rem 0 3.5rem;
}

.landing-destination {
  text-align: center;
  padding: 0;
}

.landing-destination h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2rem, 3.6vw, 2.75rem);
  max-width: 20ch;
  margin: 0 auto 0.75rem;
  color: var(--brand-text);
  line-height: 1.18;
}

.landing-destination-lead {
  color: var(--brand-text-muted);
  font-size: 1rem;
  max-width: 46ch;
  margin: 0 auto 3rem;
}

/* ---------- Carrossel de programas/destinos ---------- */
.fidelity-carousel {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  max-width: 1120px;
  margin: 0 auto 2rem;
}

.fidelity-track {
  flex: 1;
  display: flex;
  gap: 0;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  padding: 0.5rem 0.25rem;
  scrollbar-width: none;
}

.fidelity-track::-webkit-scrollbar { display: none; }

.fidelity-track:focus-visible {
  outline: 2px solid var(--brand-accent);
  outline-offset: 4px;
}

.fidelity-slide {
  flex: 0 0 auto;
  width: 208px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  border-right: 1px solid var(--brand-surface-alt);
}

.fidelity-slide:last-child { border-right: none; }

.fidelity-company {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.3rem;
  color: var(--brand-text);
  letter-spacing: 0.01em;
  text-align: center;
  line-height: 1.25;
  transition: color 0.25s ease;
  /* Nomes mais longos ("Delta Air Lines", "American Airlines") não podem
     vazar para o slide vizinho: sem uma largura explícita, o span (item
     de um flex column com align-items:center) tende a manter a largura
     do seu conteúdo sem quebrar linha, extrapolando a largura fixa do
     slide. */
  width: 100%;
  max-width: 100%;
}

.fidelity-slide:hover .fidelity-company { color: var(--brand-accent); }

.fidelity-program {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-text-muted);
  margin-top: 0.6rem;
  text-align: center;
}

.carousel-arrow {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--brand-surface-alt);
  background: var(--brand-surface);
  color: var(--brand-text-muted);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.carousel-arrow:hover { background: var(--brand-primary); color: #fff; border-color: var(--brand-primary); }
.carousel-arrow:focus-visible { outline: 2px solid var(--brand-accent); outline-offset: 2px; }

.programs-disclaimer {
  color: var(--brand-text-muted);
  font-size: 0.78rem;
  max-width: 60ch;
  margin: 0 auto;
}

@media (prefers-reduced-motion: reduce) {
  .fidelity-slide, .fidelity-company { transition: none; }
}

@media (max-width: 640px) {
  .landing-destination-banner { padding: 3.5rem 0; }
  .landing-destination-lead { margin-bottom: 2rem; }
  .fidelity-carousel { gap: 0.5rem; }
  .fidelity-slide { width: 152px; padding: 1.5rem 0.5rem; }
  .fidelity-company { font-size: 1.1rem; }
  .fidelity-program { font-size: 0.7rem; }
  .carousel-arrow { width: 36px; height: 36px; font-size: 1.2rem; }
}

/* ---------- Rede: Pix -> instituições participantes -> programas ----------
   Seção compacta reaproveitando a mesma "as-featured-in banner" já usada
   pelo carrossel de programas (.landing-destination-banner) -- por isso
   herda o mesmo tratamento tipográfico/espaçamento, só adicionando o bloco
   Pix e o segundo carrossel (instituições), separados por .rede-separator.
   Nunca aplica estilo/efeito diretamente sobre uma logo real: só sobre o
   container ao redor (.partner-logo-frame/.rede-pix-logo-frame já fazem
   isso de forma padronizada). */
.landing-rede { margin-top: 0; padding-top: 3.5rem; }

.rede-pix-block {
  max-width: 640px;
  margin: 0 auto 3rem;
  padding: 1.5rem 0;
  /* Sem preenchimento próprio -- só duas hairlines delimitando a faixa,
     igual ao restante do sistema (nunca um painel colorido atrás do
     símbolo do Pix). */
  border-top: 1px solid var(--brand-surface-alt);
  border-bottom: 1px solid var(--brand-surface-alt);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  text-align: left;
}

.rede-pix-logo-frame {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rede-pix-logo { max-width: 100%; max-height: 100%; object-fit: contain; }

.rede-pix-copy h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.2rem;
  color: var(--brand-text);
  margin: 0 0 0.35rem;
  line-height: 1.25;
}

.rede-pix-copy p {
  color: var(--brand-text-muted);
  font-size: 0.94rem;
  margin: 0;
  max-width: 52ch;
}

.rede-carousel-group { margin-bottom: 0; }

.rede-carousel-label {
  text-align: center;
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-accent);
  margin: 0 0 1.25rem;
}

.rede-separator {
  max-width: 220px;
  height: 1px;
  margin: 2.75rem auto;
  background: var(--brand-surface-alt);
}

@media (max-width: 640px) {
  .rede-pix-block { flex-direction: column; text-align: center; padding: 1.5rem; }
  .rede-pix-copy p { max-width: 40ch; }
}

/* ---------- Pix em destaque (só na Home) ----------
   Composição vertical centralizada -- mais peso visual que a faixa
   compacta usada em /parceiros (.rede-pix-block, inalterada acima), sem
   virar "propaganda do Pix": só tipografia, espaçamento e hierarquia,
   nunca cor/efeito sobre a marca oficial. */
.pix-spotlight {
  max-width: 480px;
  margin: 0 auto 3.5rem;
  text-align: center;
}

.pix-spotlight-heading {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-text-muted);
  margin: 0 0 1.25rem;
}

.pix-spotlight-logo-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 1.25rem;
}

.pix-spotlight-logo { max-width: 100%; max-height: 100%; object-fit: contain; }

.pix-spotlight-text {
  color: var(--brand-text-muted);
  font-size: 0.98rem;
  line-height: 1.55;
  margin: 0;
}

/* ---------- /parceiros: instituições participantes vs. programas ----------
   Duas seções com o mesmo tratamento de grade (.partners-grid), separadas
   por .rede-separator -- nunca misturadas na mesma grade, para não sugerir
   que bancos participantes e programas de fidelidade são a mesma coisa. */
.parceiros-section-heading {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.3rem;
  color: var(--brand-text);
  margin: 0 0 1.25rem;
}

/* ---------- Como funciona (jornada: Sua empresa / A Bravelo / Seus benefícios) ----------
   Tratamento editorial (números grandes, linha conectora 01->02->03) em vez
   do grid genérico de "cards" usado nas demais telas — mas reaproveitando
   .steps/.step, que só é usado aqui (ver renderSteps em app.js), então
   essas regras não afetam outra tela. As três etapas são visualmente
   equivalentes: mesma largura, mesmo alinhamento superior, mesma
   linha-base para número/título/texto — nenhum deslocamento vertical
   entre colunas. */
.landing-journey.steps {
  grid-template-columns: 1fr;
  border-top: none;
  gap: 2.5rem;
  position: relative;
}

@media (min-width: 640px) {
  .landing-journey.steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    align-items: start;
  }

  /* linha conectora entre as etapas, só a partir do 2º item — alinhada ao
     centro vertical do número da etapa, mesma altura em todas as colunas
     já que nenhuma tem deslocamento vertical próprio. */
  .landing-journey .step:not(:first-child)::before {
    content: '';
    position: absolute;
    top: 1.6rem;
    left: -0.75rem;
    width: calc(100% - 2.5rem);
    height: 1px;
    background: linear-gradient(to right, var(--brand-accent), var(--brand-surface-alt));
    opacity: 0.6;
  }
}

.landing-journey .step {
  border: none;
  padding: 0;
  position: relative;
  transition: transform 0.25s ease;
  min-width: 0;
}

.landing-journey .step:hover { transform: translateY(-3px); }

.landing-journey .step-number {
  font-family: var(--font-serif);
  font-size: 3.25rem;
  font-weight: 500;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px var(--brand-accent);
  margin-bottom: 0.85rem;
  transition: color 0.25s ease, -webkit-text-stroke 0.25s ease;
}

.landing-journey .step:hover .step-number {
  color: var(--brand-accent);
}

.landing-journey h3 {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.95rem;
}

/* ---------- CTA final ---------- */
.landing-closing {
  margin: 4rem 0 0;
  padding: 3.5rem 0;
  text-align: center;
}

.landing-closing h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.4rem, 2.6vw, 1.8rem);
  max-width: 22ch;
  margin: 0 auto 1.5rem;
  color: var(--brand-text);
  line-height: 1.28;
}

.landing-closing .cnpj-form-note { margin-top: 1rem; }

/* ---------- Sobre: composição editorial institucional ----------
   Bravelo como ecossistema (instituições + parceiros + empresas), não uma
   sequência de cards. Reaproveita .page-hero/.section-eyebrow/.value-copy
   já existentes; só o conteúdo específico desta página ganha regras
   novas abaixo. */
.value-copy p {
  color: var(--brand-text-muted);
  font-size: 0.98rem;
  max-width: 62ch;
  margin: 0 0 0.9rem;
}

.value-copy p:last-child { margin-bottom: 0; }

/* Linha do tempo institucional (página /sobre): substitui as duas imagens
   grandes e o diagrama de ecossistema da rodada anterior. Linha vertical
   fina discreta correndo pela coluna do marcador; cada etapa alterna
   miniatura-esquerda/texto-direita e texto-esquerda/miniatura-direita
   (.timeline-item--reverse) -- a miniatura é sempre pequena e secundária,
   nunca ocupa mais espaço que o texto. */
.timeline {
  list-style: none;
  margin: 3.5rem 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.timeline-item {
  display: flex;
  gap: 1.5rem;
}

.timeline-marker {
  position: relative;
  flex-shrink: 0;
  width: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 0.2rem;
}

.timeline-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brand-gradient);
  flex-shrink: 0;
}

.timeline-marker::after {
  content: '';
  position: absolute;
  top: 1.4rem;
  bottom: -3rem;
  width: 1px;
  background: var(--brand-surface-alt);
}

.timeline-item:last-child .timeline-marker::after { display: none; }

.timeline-period {
  margin-top: 0.6rem;
  font-family: var(--font-serif);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--brand-text-muted);
  letter-spacing: 0.03em;
}

.timeline-body {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 2.5rem;
  min-width: 0;
}

.timeline-item--reverse .timeline-body { flex-direction: row-reverse; }

.timeline-media {
  flex: 0 0 auto;
  width: 200px;
  margin: 0;
}

.timeline-media img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--brand-surface-alt);
}

.timeline-content {
  flex: 1;
  min-width: 0;
  max-width: 46ch;
}

.timeline-content h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.25rem;
  margin: 0 0 0.6rem;
  color: var(--brand-text);
}

.timeline-content p {
  color: var(--brand-text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 760px) {
  .timeline-body,
  .timeline-item--reverse .timeline-body {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }
  .timeline-media { width: 100%; max-width: 260px; }
}

.about-closing {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  line-height: 1.35;
  color: var(--brand-text);
  max-width: 40ch;
  margin: 3rem 0;
}

.institutional-data,
.location-section {
  margin: 3rem 0;
  padding-top: 1.75rem;
  border-top: 1px solid var(--brand-surface-alt);
}

.location-address {
  color: var(--brand-text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  white-space: pre-line;
  margin: 0 0 1.25rem;
}

.about-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--brand-surface-alt);
  color: var(--brand-text-muted);
  font-size: 0.78rem;
  line-height: 1.7;
}

.about-footer p { margin: 0; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem 3rem;
}

@media (min-width: 640px) {
  .contact-grid { grid-template-columns: repeat(3, 1fr); }
}

.contact-item .account-label {
  display: block;
  color: var(--brand-text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.contact-item .account-value {
  display: block;
  color: var(--brand-text);
  font-size: 0.95rem;
}

/* ---------- Sections ---------- */
section.view {
  padding: 2rem 0 3rem;
}

.section-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.6rem;
  margin-bottom: 1.75rem;
  text-align: center;
  color: var(--brand-text);
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--brand-surface-alt);
  border: 1px solid var(--brand-surface-alt);
  border-radius: var(--radius);
  overflow: hidden;
}

@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: var(--brand-surface);
  padding: 1.85rem 1.6rem;
}

.card .emoji { display: none; }
.card h3 { margin: 0 0 0.5rem; font-size: 1rem; font-weight: 600; }
.card p { margin: 0; color: var(--brand-text-muted); font-size: 0.9rem; }

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--brand-surface-alt);
}

@media (min-width: 640px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
  .steps { grid-template-columns: repeat(4, 1fr); }
}

.step {
  padding: 1.6rem 1.5rem 1.6rem 0;
  border-bottom: 1px solid var(--brand-surface-alt);
}

@media (min-width: 768px) {
  .step { border-bottom: none; border-right: 1px solid var(--brand-surface-alt); padding-right: 1.5rem; }
  .step:last-child { border-right: none; }
}

.step .step-number {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--brand-accent);
  margin-bottom: 0.6rem;
  background: none;
  width: auto;
  height: auto;
  border-radius: 0;
  display: block;
}

.step h3 { margin: 0 0 0.4rem; font-size: 1rem; }

/* ---------- Forms ---------- */
.form-card {
  background: var(--brand-surface);
  border: 1px solid var(--brand-surface-alt);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 480px;
  margin: 0 auto;
  box-shadow: var(--shadow-sm);
}

.field { margin-bottom: 1.05rem; }

.field label {
  display: block;
  font-size: 0.82rem;
  color: var(--brand-text-muted);
  margin-bottom: 0.45rem;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="password"] {
  width: 100%;
  padding: 0.8rem 0.95rem;
  border-radius: 9px;
  border: 1px solid var(--brand-surface-alt);
  background: var(--brand-background);
  color: var(--brand-text);
  font-size: 1rem;
  transition: border-color 0.15s ease;
}

.field input:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(31, 28, 24, 0.08);
}

.field.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.field.checkbox input { margin-top: 0.2rem; }
.field.checkbox label { color: var(--brand-text); font-size: 0.85rem; }

.field-error {
  color: #9c3d2e;
  font-size: 0.82rem;
  margin-top: 0.35rem;
}

.form-message {
  border-radius: 9px;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.form-message.error { background: rgba(156, 61, 46, 0.08); color: #7e3226; }
.form-message.success { background: rgba(58, 107, 74, 0.1); color: #2e5940; }

/* ---------- Company result ---------- */
.company-result dt {
  color: var(--brand-text-muted);
  font-size: 0.78rem;
  margin-top: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.company-result dd {
  margin: 0.2rem 0 0;
  font-size: 1.02rem;
}

.badge-ok {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #2e5940;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

/* ---------- Panel ---------- */
.panel-header {
  text-align: center;
  margin-bottom: 2rem;
}

.points-balance {
  text-align: center;
  background: var(--brand-surface);
  border: 1px solid var(--brand-surface-alt);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.points-balance .value {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 500;
  color: var(--brand-primary);
  font-variant-numeric: tabular-nums;
}

.points-balance .label {
  color: var(--brand-text-muted);
  font-size: 0.9rem;
}

.mock-tag {
  display: inline-block;
  font-size: 0.72rem;
  background: var(--brand-surface-alt);
  color: var(--brand-text-muted);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  margin-top: 0.6rem;
}

/* ---------- QR / app section ---------- */
.qr-card {
  text-align: center;
  background: var(--brand-surface);
  border: 1px solid var(--brand-surface-alt);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2.25rem;
  max-width: 440px;
  margin: 0 auto;
  box-shadow: var(--shadow-md);
}

.qr-card img {
  width: 196px;
  height: 196px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--brand-surface-alt);
  padding: 0.75rem;
  margin: 0.5rem 0 1.4rem;
}

.qr-instruction {
  color: var(--brand-text);
  font-size: 0.95rem;
  margin: 0;
}

.store-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

@media (min-width: 480px) {
  .store-buttons { flex-direction: row; justify-content: center; }
}

/* ---------- Status dot ---------- */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: var(--brand-surface);
  border: 1px solid var(--brand-surface-alt);
  font-size: 0.85rem;
}

.dot { width: 9px; height: 9px; border-radius: 50%; background: #a89a83; }
.dot.online { background: #2e5940; }
.dot.offline { background: #9c3d2e; }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--brand-surface-alt);
  padding: 2.5rem 0;
  text-align: center;
  color: var(--brand-text-muted);
  font-size: 0.85rem;
}

/* Contato do rodapé — mesma linguagem visual dos ".contact-item" já
   usados na página /sobre (rótulo pequeno em versalete + valor), só que
   em linha, centralizado, para caber no rodapé compacto sem virar uma
   seção grande nova. */
.footer-contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 0.5rem 2.5rem;
  margin-bottom: 1.25rem;
}

.footer-contact-item {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  color: var(--brand-text);
  text-decoration: none;
}

a.footer-contact-item:hover { color: var(--brand-primary); }

.footer-contact-label {
  color: var(--brand-text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.link-inline {
  background: none;
  border: none;
  color: var(--brand-primary);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0;
}

/* ---------- Painel operador: lista de sessões (cards) ---------- */
.operator-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.btn-danger-ghost {
  background: transparent;
  color: #7e3226;
  border: 1px solid #7e3226;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-danger-ghost:hover { background: rgba(126, 50, 38, 0.08); }

.operator-empty {
  color: var(--brand-text-muted);
  text-align: center;
  padding: 2rem 0;
}

/* ---------- Painel operador: filtros por status ---------- */
.operator-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--brand-surface);
  border: 1px solid var(--brand-surface-alt);
  color: var(--brand-text-muted);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.filter-chip:hover { border-color: var(--brand-primary); color: var(--brand-text); }

.filter-chip.active {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #fff;
}

.filter-chip-count {
  background: rgba(15, 27, 51, 0.08);
  border-radius: 999px;
  padding: 0.05rem 0.45rem;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.filter-chip.active .filter-chip-count { background: rgba(255, 255, 255, 0.22); }

.session-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.session-card {
  background: var(--brand-surface);
  border: 1px solid var(--brand-surface-alt);
  border-left: 4px solid transparent;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.session-card.is-pending-approval {
  border-left-color: var(--brand-accent);
  background: linear-gradient(180deg, rgba(255, 122, 69, 0.05) 0%, var(--brand-surface) 140px);
}

@media (min-width: 720px) {
  .session-card {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }
}

.session-info {
  min-width: 0;
  overflow-wrap: anywhere;
}

.session-flag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--brand-accent-2);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0 0 0.6rem;
}

.session-flag::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-gradient);
  flex-shrink: 0;
}

.session-field-label {
  color: var(--brand-text-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0.7rem 0 0.1rem;
}

.session-field-label:first-of-type { margin-top: 0; }

.session-client {
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0;
}

.session-company {
  font-weight: 600;
  font-size: 0.92rem;
  margin: 0;
  color: var(--brand-text);
}

.session-cnpj {
  color: var(--brand-text-muted);
  font-size: 0.85rem;
  margin: 0;
}

.session-points {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.2rem;
  margin: 0;
  color: var(--brand-primary);
  font-variant-numeric: tabular-nums;
}

.session-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.1rem 0 0;
}

.session-meta {
  margin: 0.2rem 0;
  font-size: 0.9rem;
}

.session-tracking {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--brand-surface-alt);
  font-size: 0.78rem;
  color: var(--brand-text-muted);
}

.session-tracking-item strong { color: var(--brand-text); }

.session-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex-shrink: 0;
  width: 100%;
}

@media (min-width: 960px) {
  .session-actions { width: 220px; }
}

.session-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.session-actions-row .session-danger {
  flex: 1;
  min-width: 130px;
  color: #7e3226;
  border-color: #7e3226;
}

/* ---------- Painel operador: badges de status ---------- */
.status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.status-badge.waiting { background: rgba(255, 122, 69, 0.14); color: #b3491f; }
.status-badge.assigned { background: rgba(58, 107, 74, 0.12); color: #2e5940; }
.status-badge.expired { background: rgba(92, 101, 121, 0.12); color: var(--brand-text-muted); }

/* ---------- Painel operador: detalhe da sessão ---------- */
.session-detail { max-width: 640px; margin-top: 2rem; }

.session-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1.5rem;
  margin-bottom: 1rem;
}

.detail-label {
  color: var(--brand-text-muted);
  font-size: 0.78rem;
  margin: 0 0 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.detail-value {
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.detail-block {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--brand-surface-alt);
}

.detail-block-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.1rem;
  margin: 0 0 1rem;
}

.detail-block-actions {
  display: flex;
  gap: 0.75rem;
}

.detail-block-actions .btn { flex: 1; }

.tracking-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

@media (min-width: 480px) {
  .tracking-grid { grid-template-columns: repeat(3, 1fr); }
}

.activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 280px;
  overflow-y: auto;
  font-size: 0.85rem;
}

.activity-list li {
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--brand-surface-alt);
}

.activity-list li:last-child { border-bottom: none; }

.activity-time {
  display: block;
  color: var(--brand-text-muted);
  font-size: 0.75rem;
}

.activity-empty { color: var(--brand-text-muted); }

/* ---------- Modais (mensagem / limpeza em massa) ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(22, 19, 15, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  z-index: 100;
  overflow-y: auto;
}

.modal-card {
  background: var(--brand-surface);
  border: 1px solid var(--brand-surface-alt);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 2rem;
  max-width: 520px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
}

.modal-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.35rem;
  margin: 0 0 1rem;
}

.bulk-clear-counts {
  display: flex;
  gap: 1.5rem;
  background: var(--brand-background);
  border: 1px solid var(--brand-surface-alt);
  border-radius: 10px;
  padding: 1rem 1.25rem;
}

.bulk-clear-count {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 500;
  margin: 0;
  color: var(--brand-primary);
  font-variant-numeric: tabular-nums;
}

/* ---------- Confirmação visual discreta (toast) ---------- */
.toast {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  background: var(--brand-primary);
  color: #fff;
  padding: 0.85rem 1.25rem;
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 200;
  animation: toast-in 0.25s ease both;
}

.toast.hidden { display: none; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .toast { animation: none; }
}

/* ---------- Mensagem personalizada do operador (cliente) ---------- */
.client-message-overlay {
  position: fixed;
  inset: 0;
  background: rgba(22, 19, 15, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  z-index: 100;
}

.client-message-card {
  position: relative;
  background: var(--brand-surface);
  border: 1px solid var(--brand-surface-alt);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 2rem;
  max-width: 520px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
}

.client-message-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--brand-surface-alt);
  background: var(--brand-surface);
  color: var(--brand-text-muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.client-message-close:hover { border-color: var(--brand-primary); color: var(--brand-primary); }

.client-message-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.3rem;
  margin: 0 2rem 1rem 0;
}

.client-message-text {
  color: var(--brand-text);
  font-size: 0.95rem;
  white-space: pre-wrap;
  margin: 0;
}

/* Altura controlada via JS (ver renderClientMessage/applyFrameHeight em
   app.js) a partir da medida real do conteúdo, reportada pelo próprio
   documento do iframe por postMessage — nunca mais uma altura mínima fixa
   grande demais para mensagens curtas. display:block remove o espaço
   fantasma que <iframe> deixa por padrão (inline) abaixo da borda. */
.client-message-frame {
  display: block;
  width: 100%;
  height: 60px;
  border: 1px solid var(--brand-surface-alt);
  border-radius: 10px;
  transition: height 0.18s ease;
}

@media (prefers-reduced-motion: reduce) {
  .client-message-frame { transition: none; }
}

/* ---------- Area logada: cabecalho (composicao editorial em duas colunas) ---------- */
.dash-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: start;
  padding: 2rem 0 2.5rem;
}

@media (min-width: 860px) {
  .dash-hero {
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    text-align: left;
    border-bottom: 1px solid var(--brand-surface-alt);
    padding-bottom: 3rem;
  }
}

.dash-intro { text-align: center; }

@media (min-width: 860px) {
  .dash-intro {
    text-align: left;
    padding-right: 2.5rem;
    border-right: 1px solid var(--brand-surface-alt);
  }
}

.dash-greeting {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.9rem;
  margin: 0 0 0.4rem;
  color: var(--brand-text);
  line-height: 1.15;
}

.dash-meta {
  color: var(--brand-text-muted);
  font-size: 0.9rem;
  margin: 0 0 1.75rem;
}

.dash-meta-sep {
  margin: 0 0.45rem;
  opacity: 0.55;
}

@media (min-width: 860px) {
  .dash-intro .btn { display: inline-flex; }
}

.dash-explainer {
  color: var(--brand-text-muted);
  font-size: 0.82rem;
  max-width: 34ch;
  margin: 1rem auto 0;
}

@media (min-width: 860px) {
  .dash-explainer { margin: 1rem 0 0; }
}

/* ---------- Destaque de pontos: tipografia, nao um card ---------- */
.points-display {
  text-align: center;
  position: relative;
}

@media (min-width: 860px) {
  .points-display { text-align: right; }
}

.points-display .label {
  color: var(--brand-text-muted);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.points-display .value {
  font-family: var(--font-serif);
  font-size: clamp(2.75rem, 5.4vw, 3.75rem);
  font-weight: 500;
  color: var(--brand-text);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.01em;
}

/* ---------- Area logada (refinamento do fluxo de resgate): composicao
   unica centralizada -- saudacao curta, pontos dominantes, banco emissor
   com destaque proprio, orientacao curta, programas participantes, CTA.
   Substitui o antigo layout de duas colunas (.dash-hero/.account-summary,
   regras mantidas abaixo mas sem uso -- nenhuma outra tela depende
   delas). */
.redemption-hero {
  max-width: 480px;
  margin: 2.5rem auto 3rem;
  text-align: center;
}

.redemption-greeting {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.3rem;
  color: var(--brand-text);
  margin: 0 0 0.4rem;
}

/* Empresa/CNPJ: discreto, bem menor que o saldo -- só contexto, nunca
   competindo com o número de pontos. */
.redemption-account {
  color: var(--brand-text-muted);
  font-size: 0.82rem;
  margin: 0 0 2rem;
}

.redemption-points { margin-bottom: 2rem; }

.redemption-points-label {
  color: var(--brand-text-muted);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  margin: 0 0 0.75rem;
}

.redemption-points-value {
  font-family: var(--font-serif);
  font-weight: 500;
  /* Reduzido moderadamente (era clamp(3rem, 8vw, 4.5rem)) -- continua o
     maior elemento da tela, só não ocupa espaço excessivo. */
  font-size: clamp(2.25rem, 6vw, 3.25rem);
  color: var(--brand-text);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.01em;
  margin: 0;
}

.redemption-issuer {
  display: inline-block;
  margin: 0 auto 2rem;
  padding: 0.85rem 1.75rem;
  border-top: 1px solid var(--brand-surface-alt);
  border-bottom: 1px solid var(--brand-surface-alt);
}

.redemption-issuer-label {
  color: var(--brand-text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  margin: 0 0 0.35rem;
}

.redemption-issuer-value {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.25rem;
  color: var(--brand-accent);
  margin: 0;
}

.redemption-hint {
  color: var(--brand-text-muted);
  font-size: 0.92rem;
  max-width: 40ch;
  margin: 0 auto 0.75rem;
}

.redemption-programs {
  color: var(--brand-text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  margin: 0 0 2rem;
}

/* ---------- Area logada: dados da conta (composicao editorial, sem card) ---------- */
.account-summary {
  max-width: 720px;
  margin: 0 auto;
  padding-top: 0.5rem;
}

.account-summary-title {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-text-muted);
  font-weight: 600;
  margin: 0 0 1.75rem;
  text-align: center;
}

@media (min-width: 860px) {
  .account-summary-title { text-align: left; }
}

.account-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem 3rem;
  text-align: center;
}

@media (min-width: 640px) {
  .account-grid { grid-template-columns: repeat(2, 1fr); text-align: left; }
}

.account-grid .account-row {
  display: block;
  padding: 1.1rem 0 0;
  border-top: 1px solid var(--brand-surface-alt);
}

@media (min-width: 640px) {
  .account-grid .account-row:nth-child(1),
  .account-grid .account-row:nth-child(2) { border-top: none; padding-top: 0; }
}

.account-grid .account-row:first-child { border-top: none; padding-top: 0; }

.account-grid .account-row .account-label {
  display: block;
  color: var(--brand-text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
  white-space: normal;
}

.account-grid .account-row .account-value {
  display: block;
  font-weight: 600;
  text-align: inherit;
  font-variant-numeric: tabular-nums;
  color: var(--brand-text);
}

.account-value-sub {
  display: block;
  font-weight: 400;
  color: var(--brand-text-muted);
  font-size: 0.85rem;
  margin-top: 0.15rem;
}

/* ---------- Compatibilidade: linhas de resumo/QR (renderAccountRows) ---------- */
.account-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--brand-surface-alt);
}

.account-row:first-of-type { border-top: none; padding-top: 0; }

.account-row .account-label {
  color: var(--brand-text-muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

.account-row .account-value {
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Destaque moderado do nome do cliente e da quantidade de pontos na tela
   "Confirmar resgate" -- maior que as demais linhas, sem virar um bloco
   separado nem competir com o título da tela. */
.account-value.account-value-name {
  font-weight: 700;
  font-size: 1.05rem;
}

.account-value.account-value-points {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--brand-primary);
}

/* ---------- Valor disponivel (tela de quantidade) ---------- */
.amount-balance-line {
  color: var(--brand-text-muted);
  font-size: 0.92rem;
  margin: 0 0 1.5rem;
}

.amount-balance-line strong {
  color: var(--brand-text);
  font-variant-numeric: tabular-nums;
}

/* ---------- Selecao unica (responsavel / programa / quantidade) ---------- */
.choice-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.choice-option {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.3rem;
  border: 1px solid var(--brand-surface-alt);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
  background: var(--brand-surface);
}

.choice-option:hover { border-color: var(--brand-primary); transform: translateY(-1px); }

.choice-option:has(input:checked) {
  border-color: var(--brand-primary);
  background: rgba(31, 28, 24, 0.035);
}

.choice-option input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--brand-primary);
  flex-shrink: 0;
}

/* Logo real do programa (não mais o ícone abstrato circular recortado
   por object-fit:cover -- um logo oficial retangular não pode ser
   cortado). Sem moldura própria: a borda do .choice-option já basta,
   evita "caixa dentro de caixa". */
.choice-option .choice-thumb {
  width: 68px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}

.choice-option .choice-label { font-weight: 600; }

.choice-option .choice-sublabel {
  display: block;
  color: var(--brand-text-muted);
  font-size: 0.82rem;
  margin-top: 0.2rem;
  font-weight: 400;
}

/* ---------- Aguardando aprovacao do CNPJ ---------- */
.approval-wait {
  max-width: 460px;
  margin: 3.5rem auto;
  text-align: center;
  padding: 0 1rem;
}

.approval-spinner {
  width: 42px;
  height: 42px;
  margin: 0 auto 2rem;
  border-radius: 50%;
  border: 2px solid var(--brand-surface-alt);
  border-top-color: var(--brand-accent);
  animation: approval-spin 1.1s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .approval-spinner {
    animation: approval-fade 1.8s ease-in-out infinite;
    border-top-color: var(--brand-surface-alt);
  }
}

@keyframes approval-fade {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

.approval-wait h1 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.6rem;
  margin: 0 0 0.75rem;
  line-height: 1.3;
}

.approval-wait .subtitle {
  color: var(--brand-text-muted);
  font-size: 1rem;
  margin: 0 0 1.5rem;
}

.approval-note {
  color: var(--brand-text-muted);
  font-size: 0.82rem;
  margin: 0;
}

/* ---------- Aguardando aprovacao do RESGATE (reaproveita .approval-wait) ---------- */
.waiting-status-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin: 0 0 1.5rem;
}

.waiting-status-row .account-label { margin: 0; }

.waiting-details {
  text-align: left;
  border-top: 1px solid var(--brand-surface-alt);
  padding-top: 1rem;
}

.waiting-details .account-row { font-size: 0.88rem; }
.waiting-details .account-value { font-weight: 600; font-size: 0.9rem; }

/* ---------- Banco Emissor dos Pontos (tela de empresa identificada) ---------- */
.issuer-line {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--brand-surface-alt);
}

/* ---------- Aviso discreto de ambiente de demonstracao ---------- */
.env-disclaimer {
  text-align: center;
  color: var(--brand-text-muted);
  font-size: 0.78rem;
  margin: 1.5rem 0 0;
}

/* ---------- Entrada progressiva (microinteracao discreta) ---------- */
section.view:not(.hidden) {
  animation: view-enter 0.42s ease both;
}

@keyframes view-enter {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  section.view:not(.hidden) { animation: none; }
}

/* ---------- Reveal ao rolar (Fase 5.19) ----------
   Aplicado a seções marcadas com .reveal em index.html; a classe
   .reveal-visible é adicionada via IntersectionObserver em app.js
   (setupRevealOnScroll). Com prefers-reduced-motion, a animação nunca
   roda: o JS já pula o observer, e aqui garantimos que .reveal comece
   visível para não depender de JS para aparecer. */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
