/* ==========================================================================
   Atividades para Crianças Autistas — loja de materiais em PDF
   Identidade tirada das capas dos e-books: as quatro cores das peças de
   puzzle (vermelho, azul, amarelo, verde), o azul-marinho dos títulos,
   Poppins bem pesada, pílulas arredondadas, tiles com borda colorida e
   fundo pastel, e a onda colorida no rodapé das capas.
   Visual limpo e previsível: pouca animação, contraste alto, foco visível.
   ========================================================================== */

:root {
  /* Marca */
  --navy: #15429a;           /* "CRIANÇAS AUTISTAS" */
  --navy-dark: #0e2f70;
  --navy-deep: #0b2456;

  /* Peças do puzzle */
  --red: #e5452c;
  --blue: #1f6fd6;
  --yellow: #f5b20c;
  --green: #2e9e4f;

  /* Tons pastel dos tiles */
  --red-soft: #fce9e6;
  --blue-soft: #e6eefa;
  --yellow-soft: #fef5de;
  --green-soft: #e7f4eb;

  /* Cores das coleções (uma por e-book) */
  --orange: #e07a1f;
  --purple: #7a4bc4;
  --gold: #b8860b;
  --rust: #a64b2a;
  --raspberry: #c43d6b;

  /* Alias usados pelos templates */
  --brand: var(--navy);
  --brand-dark: var(--navy-dark);
  --brand-mid: var(--blue);
  --brand-soft: var(--blue-soft);

  /* Superfícies */
  --bg: #ffffff;
  --bg-alt: #f6f8fc;
  --surface: #ffffff;
  --surface-2: #f6f8fc;

  /* Texto */
  --ink: #1d2433;
  --ink-2: #3f4757;
  --muted: #6b7280;
  --line: #e3e8f0;

  /* Estados */
  --ok: #2e9e4f;
  --warn: #b77f00;
  --danger: #d23b2a;

  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(21, 66, 154, .05), 0 8px 24px rgba(21, 66, 154, .07);
  --shadow-hover: 0 4px 10px rgba(21, 66, 154, .08), 0 18px 40px rgba(21, 66, 154, .14);
  --max: 1200px;

  --font: "Poppins", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;

  /* Peça de puzzle usada como decoração */
  --piece-red: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%23e5452c' d='M10 25H32a11 11 0 1 1 21 0H75V47a11 11 0 1 1 0 21V90H10Z'/%3E%3C/svg%3E");
  --piece-blue: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%231f6fd6' d='M10 25H32a11 11 0 1 1 21 0H75V47a11 11 0 1 1 0 21V90H10Z'/%3E%3C/svg%3E");
  --piece-yellow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%23f5b20c' d='M10 25H32a11 11 0 1 1 21 0H75V47a11 11 0 1 1 0 21V90H10Z'/%3E%3C/svg%3E");
  --piece-green: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%232e9e4f' d='M10 25H32a11 11 0 1 1 21 0H75V47a11 11 0 1 1 0 21V90H10Z'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; transition: color .15s; }
a:hover { color: var(--blue); }
img { max-width: 100%; display: block; }

:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; border-radius: 6px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* Faixa com as quatro cores das peças */
.puzzle-stripe {
  height: 5px;
  background: linear-gradient(90deg,
    var(--red) 0 25%, var(--blue) 25% 50%, var(--yellow) 50% 75%, var(--green) 75% 100%);
}

/* ---------- Header ---------- */
.topbar {
  background: var(--navy);
  color: #fff;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .3px;
  text-align: center;
  padding: 8px 12px;
}
.topbar .dot { display: inline-block; margin: 0 10px; opacity: .6; }
.topbar { position: relative; }
.lang-switch { display: inline-flex; gap: 4px; margin-left: 14px; vertical-align: middle; }
.lang-switch button {
  border: 1px solid rgba(255, 255, 255, .45); background: transparent; color: #fff;
  font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .6px; line-height: 1;
  padding: 4px 9px; border-radius: 999px; cursor: pointer;
}
.lang-switch button:hover, .lang-switch button:focus-visible { background: rgba(255, 255, 255, .16); border-color: #fff; }
.lang-switch button.on { background: #fff; color: var(--navy); border-color: #fff; cursor: default; }
@media (min-width: 1000px) { .lang-switch { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); margin: 0; } }

.header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 20px;
  max-width: var(--max);
  margin: 0 auto;
}

.logo { display: flex; align-items: center; gap: 12px; }
.logo:hover { color: inherit; }
.logo img { height: 52px; width: auto; }
.logo-mark { width: 46px; height: 46px; flex: none; display: block; }
.logo-mark svg { width: 100%; height: 100%; display: block; }
.logo-text { line-height: 1.1; }
.logo-name {
  font-size: 19px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -.2px;
}
.logo-tagline {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2.4px;
  color: var(--muted);
  font-weight: 600;
}

.searchbar { flex: 1; display: flex; min-width: 0; } /* sem min-width a busca nao encolhe abaixo da largura natural do campo e a pagina rola de lado no celular */
.searchbar input {
  flex: 1;
  min-width: 0;
  border: 2px solid var(--line);
  border-right: 0;
  border-radius: 999px 0 0 999px;
  padding: 11px 20px;
  font-size: 14px;
  font-family: inherit;
  background: var(--bg-alt);
  outline: none;
  transition: border-color .15s, background .15s;
}
.searchbar input:focus { border-color: var(--blue); background: #fff; }
.searchbar button {
  border: 0;
  background: var(--navy);
  color: #fff;
  padding: 0 24px;
  border-radius: 0 999px 999px 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  font-family: inherit;
  transition: background .15s;
}
.searchbar button:hover { background: var(--navy-dark); }

.header-actions { display: flex; align-items: center; gap: 18px; font-size: 14px; font-weight: 500; }
.cart-link {
  position: relative;
  font-weight: 700;
  color: var(--navy);
  border: 2px solid var(--navy);
  border-radius: 999px;
  padding: 6px 16px;
}
.cart-link:hover { background: var(--navy); color: #fff; }
.badge {
  position: absolute;
  top: -9px;
  right: -9px;
  background: #cf3a22;
  color: #fff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  padding: 1px 7px;
  border: 2px solid #fff;
}

/* Menu do usuario: so existe no celular (bloco "max-width: 560px" abaixo). Daqui para cima os wrappers nao entram no layout e o nav fica como sempre foi. */
.user-menu, .menu-items { display: contents; }
.user-toggle, .menu-lang, .cart-icon { display: none; }

.nav { background: #fff; border-bottom: 1px solid var(--line); overflow-x: auto; }
.nav-inner { display: flex; gap: 6px; padding: 10px 20px; max-width: var(--max); margin: 0 auto; }
.nav a {
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--ink-2);
  padding: 7px 15px;
  border-radius: 999px;
  border: 2px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
}
.nav a:hover { background: var(--blue-soft); color: var(--navy); }
.nav a:nth-of-type(4n+2):hover { background: var(--red-soft); color: var(--red); }
.nav a:nth-of-type(4n+3):hover { background: var(--yellow-soft); color: var(--warn); }
.nav a:nth-of-type(4n+4):hover { background: var(--green-soft); color: var(--green); }

/* ---------- Layout ---------- */
main { padding: 28px 0 40px; }
.grid { display: grid; gap: 20px; }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.listing { display: grid; grid-template-columns: 262px 1fr; gap: 26px; align-items: start; }
.split { display: grid; grid-template-columns: 1fr 390px; gap: 26px; align-items: start; }

.card {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 20px; }

h1 {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 6px;
  letter-spacing: -.5px;
  color: var(--navy);
}
h2 { font-size: 21px; font-weight: 800; margin: 0 0 16px; color: var(--navy); letter-spacing: -.2px; }
h3 { font-size: 14px; font-weight: 700; margin: 0 0 12px; color: var(--ink); }
.section-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 48px 0 18px; }
.section-title h2 { margin: 0; font-size: 26px; }
.section-title > a {
  font-size: 13px;
  font-weight: 700;
  color: var(--blue);
  white-space: nowrap;
}
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }

/* "ATIVIDADES PARA" das capas */
.eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 4px;
}

/* Pílula "E-BOOK" */
.pill {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  padding: 7px 22px;
  border-radius: 999px;
}

/* Tile de ícone: borda colorida + fundo pastel, como nas capas */
.tile {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--blue-soft);
  border: 2px solid var(--blue);
  color: var(--blue);
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 800;
  flex: none;
}
.tile svg { width: 26px; height: 26px; }
.tile.red { background: var(--red-soft); border-color: var(--red); color: var(--red); }
.tile.blue { background: var(--blue-soft); border-color: var(--blue); color: var(--blue); }
.tile.yellow { background: var(--yellow-soft); border-color: var(--yellow); color: #c48a00; }
.tile.green { background: var(--green-soft); border-color: var(--green); color: var(--green); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #fff;
  border: 2px solid var(--line);
  box-shadow: var(--shadow);
  padding: 52px 48px 0;
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  width: 90px;
  height: 90px;
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
}
.hero::before { background-image: var(--piece-blue); top: -18px; left: -18px; transform: rotate(-18deg); }
.hero::after { background-image: var(--piece-red); top: 26px; right: -22px; transform: rotate(24deg); width: 74px; height: 74px; }

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 40px;
  align-items: center;
}
.hero .pill { margin-bottom: 18px; }
.hero h1 {
  font-size: 46px;
  line-height: 1.08;
  letter-spacing: -1px;
  margin: 0;
  text-transform: uppercase;
}
.hero h1 .accent { display: block; color: var(--red); }
.hero-sub { color: var(--ink-2); font-size: 16px; margin: 16px 0 26px; max-width: 46ch; }
.hero-sub em { color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-art {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 380px;
  justify-self: center;
  width: 100%;
}
.hero-art .tile { width: auto; height: auto; aspect-ratio: 5/4; border-radius: 18px; }
.hero-art .tile svg { width: 46%; height: 46%; }
.hero-art .puzzle-logo { grid-column: 1 / -1; justify-self: center; width: 92px; height: 92px; margin-bottom: 6px; }

.hero-wave {
  position: relative;
  margin: 44px -48px 0;
  background: var(--navy);
  color: #fff;
  text-align: center;
  padding: 34px 20px 20px;
}
.hero-wave::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 22px;
  background: #fff;
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
}
.hero-wave strong { display: block; font-size: 15px; font-weight: 700; }
.hero-wave span { display: block; font-size: 12px; letter-spacing: 1.5px; opacity: .85; margin-top: 4px; }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 22px; }
.stat { display: flex; align-items: center; gap: 14px; }
.stat > span:not(.tile) { display: block; }
.stat .value { display: block; font-size: 16px; font-weight: 800; line-height: 1.25; color: var(--navy); }
.stat .label { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.35; }

/* Cards pastel da base da capa */
.stat-row .stat { border: 0; box-shadow: none; }
.stat-row .stat:nth-child(1) { background: var(--red-soft); }
.stat-row .stat:nth-child(1) .value { color: var(--red); }
.stat-row .stat:nth-child(2) { background: var(--blue-soft); }
.stat-row .stat:nth-child(2) .value { color: var(--blue); }
.stat-row .stat:nth-child(3) { background: var(--yellow-soft); }
.stat-row .stat:nth-child(3) .value { color: #b07c00; }
.stat-row .stat + .stat { margin-top: 0; }

/* Categorias: cada coleção com uma cor, como os e-books */
.cat-grid .card + .card { margin-top: 0; }
.cat-card { --c: var(--blue); --c-soft: var(--blue-soft); border-color: var(--c-soft); transition: border-color .15s, transform .15s, box-shadow .15s; }
.cat-card .tile { background: var(--c-soft); border-color: var(--c); color: var(--c); }
.cat-card .value { color: var(--navy); }
.cat-card .arrow { color: var(--c); font-size: 22px; font-weight: 700; }
.cat-card:hover { border-color: var(--c); color: inherit; box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.cat-card:nth-child(6n+1) { --c: var(--red); --c-soft: var(--red-soft); }
.cat-card:nth-child(6n+2) { --c: var(--blue); --c-soft: var(--blue-soft); }
.cat-card:nth-child(6n+3) { --c: #d79a00; --c-soft: var(--yellow-soft); }
.cat-card:nth-child(6n+4) { --c: var(--green); --c-soft: var(--green-soft); }
.cat-card:nth-child(6n+5) { --c: var(--purple); --c-soft: #efe8fa; }
.cat-card:nth-child(6n+6) { --c: var(--orange); --c-soft: #fcefe2; }

/* Faixa de chamada no fim da home */
.cta-band {
  margin-top: 56px;
  border-radius: 28px;
  background: var(--navy);
  color: #fff;
  padding: 40px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band::before,
.cta-band::after {
  content: "";
  position: absolute;
  width: 80px;
  height: 80px;
  background-size: contain;
  background-repeat: no-repeat;
}
.cta-band::before { background-image: var(--piece-yellow); left: -14px; bottom: -10px; transform: rotate(14deg); }
.cta-band::after { background-image: var(--piece-green); right: -12px; top: -10px; transform: rotate(-30deg); }
.cta-band h2 { color: #fff; font-size: 24px; letter-spacing: 1.5px; text-transform: uppercase; margin: 0 0 6px; }
.cta-band p { margin: 0 0 22px; opacity: .9; }
.cta-band .btn { background: #fff; color: var(--navy); }
.cta-band .btn:hover { background: var(--yellow-soft); color: var(--navy); }

/* ---------- Painel do administrador ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 4px; }
.kpi { display: flex; flex-direction: column; gap: 4px; border-left: 6px solid var(--blue); }
.kpi + .kpi { margin-top: 0; }
.kpi.ok { border-left-color: var(--green); }
.kpi.warn { border-left-color: var(--yellow); }
.kpi-label { font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.kpi-value { font-size: 27px; font-weight: 800; color: var(--navy); line-height: 1.15; }
.kpi.ok .kpi-value { color: var(--green); }
.kpi.warn .kpi-value { color: #b07c00; }
.kpi-hint { font-size: 12px; color: var(--muted); }

.bar-row + .bar-row { margin-top: 14px; }
.bar-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 4px; }

/* ---------- Produto ---------- */
.product-card {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s, transform .2s, border-color .2s;
  position: relative;
  box-shadow: var(--shadow);
}
.product-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); border-color: #c9d6ee; }
.product-card .thumb { aspect-ratio: 4/5; background: var(--bg-alt); overflow: hidden; border-bottom: 2px solid var(--line); }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card .body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-card .name { font-size: 14.5px; font-weight: 700; line-height: 1.35; color: var(--navy); }
.product-card .name:hover { color: var(--blue); }
.product-card .brand { font-size: 12px; text-transform: uppercase; letter-spacing: 1.6px; color: var(--muted); font-weight: 600; }
.format {
  align-self: flex-start;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--green);
  background: var(--green-soft);
  border-radius: 999px;
  padding: 2px 10px;
}
.price { font-size: 20px; font-weight: 800; color: var(--ink); }
.price-old { font-size: 13px; color: var(--muted); text-decoration: line-through; margin-right: 6px; }
.installment { font-size: 12px; color: var(--muted); }
.tag {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  background: #cf3a22;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 11px;
  border-radius: 999px;
  border: 2px solid #fff;
}
.tag.out { background: var(--muted); }
.rating { color: var(--yellow); font-size: 14px; letter-spacing: 1px; }

/* ---------- Botões / forms ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px solid transparent;
  background: var(--navy);
  color: #fff;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  font-family: inherit;
  cursor: pointer;
  transition: transform .12s, background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--navy-dark); color: #fff; transform: translateY(-1px); }
.btn.block { width: 100%; }
.btn.accent { background: #cf3a22; }  /* contraste 4,9:1 com texto branco (WCAG AA pede 4,5:1) */
.btn.accent:hover { background: #b32f19; }
.btn.pdp-download { background: #1f7a3a; animation: pdp-download-pulse 1.8s ease-in-out infinite; }
.btn.pdp-download:hover { background: #1d6f35; animation-play-state: paused; }
@keyframes pdp-download-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(46, 158, 79, .45); }
  50% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(46, 158, 79, 0); }
}
.btn.ghost { background: #fff; border-color: var(--line); color: var(--navy); }
.btn.ghost:hover { border-color: var(--navy); color: var(--navy); background: #fff; }
.btn.small { padding: 7px 15px; font-size: 12px; letter-spacing: .5px; }
.btn.danger { background: var(--danger); }  /* cancelar / apagar: o ÚNICO vermelho dos botões */
.btn.danger:hover { background: #a82a16; }
/* Cores dos botões (regra do dono, 24/11): confirmação VERDE (.go), voltar CINZA CLARO (.back), avançar AZUL (o .btn padrão), cancelar VERMELHO (.danger). */
.btn.go { background: #1f7a3a; }
.btn.go:hover { background: #17612e; }
.btn.back { background: #e6e9ef; border-color: #d3d9e2; color: #2b3647; }
.btn.back:hover { background: #d8dde6; border-color: #c3cad6; color: #2b3647; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }

.field,
input[type="text"], input[type="email"], input[type="password"], input[type="tel"],
input[type="number"], select, textarea {
  width: 100%;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field:focus, input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(31, 111, 214, .12); }
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--navy); }

/* Janela "Baixar gratis" sobre a pagina da atividade gratuita (static/js/free-modal.js).
   Pensada para o CELULAR: folha que sobe do rodape, ocupa a largura toda, respeita a area segura do aparelho e
   tem o botao grande, ao alcance do polegar. A partir de 640 px ela vira um cartao centralizado. */
html.free-modal-open { overflow: hidden; }
.free-modal {
  position: fixed; inset: auto 0 0 0; margin: 0;
  width: 100%; max-width: none; max-height: min(88vh, 560px); max-height: min(88dvh, 560px);
  overflow-y: auto; overscroll-behavior: contain;
  padding: 0; border: 0; border-radius: 22px 22px 0 0;
  background: #fff; color: var(--ink); box-shadow: 0 -12px 40px rgba(11, 36, 86, .30);
}
.free-modal::backdrop { background: rgba(11, 36, 86, .6); }
.free-modal[open] { animation: free-modal-sheet .26s cubic-bezier(.2, .8, .2, 1); }
@keyframes free-modal-sheet { from { transform: translateY(100%); } to { transform: none; } }
.free-modal-card {
  position: relative; text-align: center;
  padding: 12px 20px calc(22px + env(safe-area-inset-bottom, 0px));
}
.free-modal-card::before {  /* a alca da folha: avisa que da para arrastar para baixo */
  content: ""; display: block; width: 44px; height: 5px; margin: 0 auto 18px;
  border-radius: 3px; background: var(--line);
}
.free-modal-card h2 { margin: 12px 8px 22px; font-size: 22px; line-height: 1.25; overflow-wrap: anywhere; }
.free-modal-card .btn { min-height: 56px; font-size: 17px; }
.free-modal-card .tiny { line-height: 1.5; }
.free-modal-close {
  position: absolute; top: 6px; right: 8px; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 10px; background: transparent; color: var(--ink-2);
  font-size: 28px; line-height: 1; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.free-modal-close:hover { color: var(--navy); background: var(--blue-soft); }
.free-modal-close:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.free-modal [hidden] { display: none !important; }
/* Tela de obrigado (static/js/free-modal.js troca o conteudo da janela por ela depois do download): confirma, destaca a atividade paga e,
   so no Brasil, pede o WhatsApp com aceite. Mais alta que a janela de antes, entao ela cresce e rola se faltar tela. */
.free-modal:has(.free-thanks:not([hidden])) { max-height: min(92vh, 760px); max-height: min(92dvh, 760px); }
.free-thanks { text-align: center; }
.free-thanks-check { margin: 6px 0 0; font-weight: 800; letter-spacing: .4px; color: var(--green); }
.free-thanks h2 { margin: 6px 8px 8px; font-size: 22px; line-height: 1.25; outline: none; }
.free-thanks-offer {
  display: flex; flex-direction: column; gap: 4px; margin: 16px 0 6px; padding: 14px; text-align: left;
  border: 2px solid var(--line); border-radius: 14px; background: var(--bg-alt); color: var(--ink);
}
.free-thanks-offer:hover { border-color: var(--blue); color: var(--ink); }
.free-thanks-offer strong { color: var(--navy); font-size: 16px; line-height: 1.3; }
.free-thanks-price { font-weight: 700; font-size: 13.5px; }
.free-thanks-offer .btn { margin-top: 8px; min-height: 48px; display: flex; align-items: center; justify-content: center; }
/* A oferta paga do caminho do gratis (templates/catalog/_oferta_paga.html): o "de" riscado e o selo, so quando ha desconto real no cadastro. */
.free-offer-was { color: var(--muted); font-weight: 600; margin-right: 4px; }
.free-offer-off { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 999px; background: var(--green); color: #fff; font-size: 11.5px; font-weight: 800; }
/* A mesma oferta na pagina da atividade gratuita, abaixo do "Baixar gratis": separada do botao por uma linha, para nao competir com ele. */
.pdp-free-offer { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.pdp-free-offer .free-thanks-offer { margin: 0; }
.free-thanks-next { margin: 14px 0 6px; padding-top: 14px; border-top: 1px solid var(--line); text-align: center; }
.free-thanks-next .btn { min-height: 48px; display: flex; align-items: center; justify-content: center; margin-top: 8px; }
.free-thanks-next p { margin: 6px 0 4px; }
.free-thanks-contact { margin: 14px 0 6px; padding-top: 14px; border-top: 1px solid var(--line); text-align: left; }
.free-thanks-contact h3 { margin: 0 0 8px; font-size: 16px; line-height: 1.3; }
.free-thanks-contact .field { min-height: 48px; margin: 4px 0 6px; font-size: 17px; }
.free-thanks-consent { display: flex; align-items: flex-start; gap: 10px; margin: 6px 0 12px; line-height: 1.45; }
.free-thanks-consent input { flex: none; width: 22px; height: 22px; margin-top: 1px; }
.free-thanks-consent a { color: var(--blue); text-decoration: underline; }
.free-thanks-contact .btn { min-height: 50px; }
.free-thanks-trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; } /* isca de robo: so eles preenchem */
.free-thanks-status { margin: 10px 0 0; font-weight: 600; color: var(--ink-2); }
.free-thanks-close { margin-top: 8px; min-height: 44px; }
@media (min-width: 640px) {
  .free-modal {
    inset: 0; margin: auto; width: min(92vw, 420px); max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px); border-radius: 18px; box-shadow: 0 24px 60px rgba(11, 36, 86, .35);
  }
  .free-modal[open] { animation: free-modal-card .22s ease-out; }
  .free-modal-card { padding: 24px 24px 24px; }
  .free-modal-card::before { display: none; }
  .free-modal-card h2 { margin-top: 18px; }
}
@keyframes free-modal-card { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .free-modal[open] { animation: none; } }

/* Campo de senha com olho (static/js/password-toggle.js): o botao fica dentro do campo, a direita. */
.pw-field { position: relative; display: block; }
.pw-field input[data-pw-eye] { padding-right: 48px; }  /* vale tambem com a senha visivel (type=text) */
.pw-toggle {
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; padding: 0;
  border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); cursor: pointer;
}
.pw-toggle:hover { color: var(--navy); background: var(--blue-soft); }
.pw-toggle:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.pw-toggle svg { width: 20px; height: 20px; display: block; }
label { font-size: 13px; font-weight: 600; display: block; margin-bottom: 6px; color: var(--ink-2); }
.form-row { margin-bottom: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.errorlist { color: var(--danger); font-size: 12px; list-style: none; padding: 0; margin: 5px 0 0; }
.helptext { font-size: 12px; color: var(--muted); }
code { background: var(--bg-alt); border-radius: 6px; padding: 1px 6px; font-size: 13px; }

/* ---------- Mensagens ---------- */
.messages { max-width: var(--max); margin: 18px auto 0; padding: 0 20px; }
.message {
  padding: 13px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 9px;
  border: 2px solid;
  background: #fff;
}
.message.success { border-color: var(--green); background: var(--green-soft); }
.message.info { border-color: var(--blue); background: var(--blue-soft); }
.message.warning { border-color: var(--yellow); background: var(--yellow-soft); }
.message.error { border-color: var(--red); background: var(--red-soft); }

/* ---------- Tabelas / carrinho ---------- */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted); padding: 0 0 12px; font-weight: 700; }
td { padding: 16px 0; border-top: 2px solid var(--line); vertical-align: middle; }

.line-item { display: flex; gap: 14px; align-items: center; }
.line-item img { width: 56px; height: 70px; object-fit: cover; border-radius: 8px; background: var(--bg-alt); border: 2px solid var(--line); }
.qty { display: flex; align-items: center; gap: 6px; }
.qty input { width: 64px; text-align: center; }

/* Seletor de quantidade: - na esquerda, + na direita, alvos de toque de 42px. */
.qty-stepper {
  display: inline-flex;
  align-items: stretch;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #fff;
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}
.qty-stepper:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(31, 111, 214, .12); }
.qty .qty-stepper input, .qty-stepper input {
  width: 52px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  text-align: center;
  font-weight: 700;
  -moz-appearance: textfield;
  appearance: textfield;
}
.qty-stepper input::-webkit-outer-spin-button, .qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-btn {
  flex: none;
  width: 42px;
  min-height: 42px;
  border: 0;
  background: var(--bg-alt);
  color: var(--navy);
  font: inherit;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background .15s;
}
.qty-btn:hover:not(:disabled) { background: var(--blue-soft); }
.qty-btn:disabled { opacity: .35; cursor: not-allowed; }

.totals { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.totals div { display: flex; justify-content: space-between; }
.totals .grand { border-top: 2px solid var(--line); padding-top: 13px; font-size: 21px; font-weight: 800; color: var(--navy); }
.discount { color: var(--green); }

.progress { height: 10px; background: var(--blue-soft); border-radius: 999px; overflow: hidden; margin-top: 9px; }
.progress > div { height: 100%; background: var(--blue); border-radius: 999px; }

/* ---------- Filtros ---------- */
.filters { position: sticky; top: 130px; }
.filter-group + .filter-group { border-top: 2px solid var(--line); margin-top: 16px; padding-top: 16px; }
.filter-group h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--navy); }
.filter-group label { font-weight: 500; display: flex; align-items: center; gap: 9px; margin-bottom: 8px; cursor: pointer; font-size: 13.5px; }
.filter-group input[type="checkbox"] { width: 16px; height: 16px; }
.chip {
  display: inline-block;
  background: var(--green-soft);
  color: var(--green);
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 12px;
  font-weight: 700;
  margin: 0 6px 6px 0;
}

/* ---------- Detalhe do produto ---------- */
.breadcrumb a { color: var(--blue); font-weight: 600; }
.gallery-main { background: var(--bg-alt); border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/5; border: 2px solid var(--line); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 9px; margin-top: 12px; flex-wrap: wrap; }
.gallery-thumbs img { width: 60px; height: 75px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid var(--line); transition: border-color .15s; }
.gallery-thumbs img:hover { border-color: var(--blue); }
.variant-options { display: flex; flex-wrap: wrap; gap: 9px; }
.variant-options input { display: none; }
.variant-options label {
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 8px 18px;
  cursor: pointer;
  font-weight: 600;
  margin: 0;
  background: #fff;
  transition: all .15s;
}
.variant-options input:checked + label { border-color: var(--navy); background: var(--blue-soft); color: var(--navy); }
.variant-options input:disabled + label { opacity: .4; cursor: not-allowed; text-decoration: line-through; }

/* ---------- Pagina do produto: topo e compra (templates/catalog/product_detail.html) ---------- */
/* No celular o topo vira uma coluna na ordem de decisao: painel de compra (nome, preco, quantidade e botao) e so depois a galeria. Desktop e tablet nao mudam. */
.pdp-top > * { min-width: 0; } /* a fileira de miniaturas nao pode forcar a coluna da galeria a ser mais larga que o cartao */
.pdp-thumb { display: none; } /* so existe no celular: a miniatura ao lado do nome abre a galeria numa janela */

/* "Sobre o material": botao expansivel (static/js/disclosure.js). O texto inteiro esta no HTML; a altura anima de 0 ate o conteudo. Sem JavaScript fica aberto. */
.pdp-about { margin-top: 26px; border-top: 1px solid var(--line); padding-top: 6px; }
.pdp-about h2 { margin: 0; }
.pdp-about-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 52px; padding: 8px 0;
  border: 0; background: none; font: inherit; color: inherit; letter-spacing: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.pdp-about-toggle:hover { color: var(--blue); }
.pdp-about-toggle:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 8px; }
.pdp-about-chevron { flex: none; transition: transform .25s ease; }
.pdp-about.is-open .pdp-about-chevron { transform: rotate(180deg); }
.pdp-about-body { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .25s ease; }
.pdp-about-inner { min-height: 0; overflow: hidden; }
.pdp-about-inner p { margin: 4px 0 10px; }
html.js .pdp-about:not(.is-open) .pdp-about-body { grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows .25s ease, visibility 0s linear .25s; } /* fechado: fora da tabulacao e dos leitores de tela */
html:not(.js) .pdp-about-chevron { display: none; }

/* Galeria da atividade em janela (static/js/gallery-modal.js): tela cheia, imagem inteira (contain) e botoes de 48px (escuros com borda clara: aparecem sobre a imagem branca). */
html.gallery-modal-open { overflow: hidden; }
.gallery-modal { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(8, 20, 48, .97); color: #fff; }
.gallery-modal[open] { display: flex; animation: gallery-fade .18s ease-out; }
.gallery-modal::backdrop { background: rgba(8, 20, 48, .97); }
@keyframes gallery-fade { from { opacity: 0; } to { opacity: 1; } }
.gallery-stage { flex: 1; display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 0; padding: 68px 14px 56px; box-sizing: border-box; }
.gallery-stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 10px; background: #fff; }
.gallery-close, .gallery-nav {
  position: absolute; width: 48px; height: 48px; padding: 0; border: 2px solid rgba(255, 255, 255, .75); border-radius: 50%; background: rgba(8, 20, 48, .62); color: #fff;
  display: flex; align-items: center; justify-content: center; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background .15s;
}
.gallery-close:hover, .gallery-nav:hover { background: rgba(8, 20, 48, .85); }
.gallery-close:focus-visible, .gallery-nav:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.gallery-close { top: calc(10px + env(safe-area-inset-top, 0px)); right: 10px; font-size: 32px; line-height: 1; }
.gallery-nav { top: 50%; margin-top: -24px; }
.gallery-prev { left: 10px; }
.gallery-next { right: 10px; }
.gallery-count { position: absolute; left: 0; right: 0; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); margin: 0; text-align: center; font-size: 14px; font-weight: 600; letter-spacing: .4px; }
.pdp-price { margin: 18px 0; }
.pdp-price .price { font-size: 30px; }
.pdp-buy-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } /* quando a coluna e estreita a quantidade fica em cima e o botao embaixo, em vez de estourar o cartao */
.pdp-buy-row .btn { flex: 1 1 140px; }
.pdp-qty-label { margin: 0; }

.specs { width: 100%; font-size: 14px; }
.specs td { padding: 10px 0; }
.specs td:first-child { color: var(--muted); width: 40%; }

.review { border-top: 2px solid var(--line); padding: 16px 0; }
.review:first-of-type { border-top: 0; }

.info-list { display: flex; flex-direction: column; gap: 14px; }
.info-item { display: flex; gap: 12px; align-items: flex-start; }
.info-item .tile { width: 40px; height: 40px; border-radius: 12px; }
.info-item .tile svg { width: 20px; height: 20px; }
.info-item h3 { margin: 0 0 2px; }
.info-item p { margin: 0; }

/* ---------- Checkout ---------- */
.steps { display: flex; gap: 10px; font-size: 13px; margin-bottom: 22px; flex-wrap: wrap; align-items: center; }
.steps span { color: var(--muted); font-weight: 500; }
.steps .on { color: var(--navy); font-weight: 700; }

.radio-card {
  display: flex;
  align-items: center;
  gap: 11px;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  background: #fff;
  transition: all .15s;
}
.radio-card:hover { border-color: #c9d6ee; }
.radio-card:has(input:checked) { border-color: var(--navy); background: var(--blue-soft); }
.radio-card label { margin: 0; font-weight: 500; }
.radio-card input[type="radio"] { width: 16px; height: 16px; }

.status-pill { display: inline-block; padding: 4px 13px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff; }
.st-pending { background: var(--warn); }
.st-paid { background: var(--green); }
.st-processing { background: var(--blue); }
.st-shipped { background: var(--navy); }
.st-delivered { background: var(--green); }
.st-canceled { background: var(--danger); }
.st-refunded { background: var(--muted); }
.st-free { background: var(--purple); }
.st-queued { background: var(--navy); }
.st-sent { background: var(--blue); }
.st-failed { background: var(--danger); }

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { border-left: 2px solid var(--line); padding: 0 0 18px 18px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--blue); border: 2px solid #fff; }
.timeline li:nth-child(4n+2)::before { background: var(--red); }
.timeline li:nth-child(4n+3)::before { background: var(--yellow); }
.timeline li:nth-child(4n+4)::before { background: var(--green); }
.timeline li:last-child { border-left-color: transparent; }

.pix-box {
  background: var(--bg-alt);
  border: 2px dashed #c9d6ee;
  border-radius: var(--radius-sm);
  padding: 16px;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
  word-break: break-all;
  color: var(--ink-2);
}

/* Pix: a frase que diz que o pedido sai assim que o Pix cair fica em azul; no celular nao ha QR (o comprador copia o codigo) nem a linha "Pix · Pendente". */
.pix-pay-hint { color: var(--blue); font-weight: 700; font-size: 15px; background: var(--blue-soft); border-radius: var(--radius-sm); padding: 10px 12px; }
/* Valor da atividade entre a frase e o copia e cola: verde e pulsando, o mesmo movimento do botao Baixar (pdp-download-pulse). */
.pix-amount { margin: 10px 0; padding: 12px 14px; border-radius: var(--radius-sm); background: #1f7a3a; color: #fff; text-align: center; font-size: 17px; font-weight: 700; animation: pdp-download-pulse 1.8s ease-in-out infinite; }
.pix-amount strong { font-size: 22px; font-weight: 800; }
@media (max-width: 720px) {
  .pix-qr-wrap, .pay-meta-pix { display: none; }
}

/* ---------- Footer ---------- */
.footer {
  position: relative;
  background: var(--navy-deep);
  color: #d5def0;
  margin-top: 70px;
  padding: 56px 0 26px;
  font-size: 14px;
}
.footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 26px;
  background: var(--bg);
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
}
.footer h4 { color: #fff; font-size: 13px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; margin: 0 0 14px; }
.footer a { color: #d5def0; }
.footer a:hover { color: var(--yellow); }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-brand .logo-mark { width: 38px; height: 38px; }
.footer-brand h4 { margin: 0; letter-spacing: .5px; text-transform: none; font-size: 16px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 30px; padding-top: 18px; font-size: 12px; color: #9fb0d0; }
.footer-bottom .motto { letter-spacing: 1.5px; }

.empty { text-align: center; padding: 64px 20px; color: var(--muted); }
.empty h2 { margin-bottom: 8px; }
.pagination { display: flex; gap: 7px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
.pagination a, .pagination span {
  padding: 8px 15px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
}
.pagination a:hover { border-color: var(--navy); color: var(--navy); }
.pagination .current { background: var(--navy); color: #fff; border-color: var(--navy); }

.htmx-request { opacity: .55; transition: opacity .1s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .product-card:hover, .cat-card:hover, .btn:hover { transform: none; }
}

@media (max-width: 960px) {
  .cols-4 { grid-template-columns: repeat(2, 1fr); }
  .cols-3 { grid-template-columns: repeat(2, 1fr); }
  .listing, .split, .stat-row, .hero-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .filters { position: static; }
  .header-inner { flex-wrap: wrap; gap: 14px; }
  .searchbar { order: 3; flex-basis: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .hero { padding: 38px 24px 0; }
  .hero h1 { font-size: 34px; }
  .hero-wave { margin: 36px -24px 0; }
  .hero-art { max-width: 320px; }
  h1 { font-size: 26px; }
  .section-title h2 { font-size: 22px; }
}

@media (max-width: 560px) {
  .cols-4, .cols-3, .cols-2, .kpi-grid { grid-template-columns: 1fr; }
  .header-actions { gap: 12px; font-size: 13px; flex-wrap: wrap; }
  .hero h1 { font-size: 28px; }
}

/* Tablet (561 a 960 px): a coluna lateral da pagina do produto desce para baixo do conteudo e ocupa a largura toda; os cards "Voce tambem pode gostar" em UMA coluna
   davam capas de 680 x 850 px. Em 2 colunas ficam do tamanho de um card de lista. (No celular, <= 560 px, segue uma coluna; no desktop a lateral tem 390 px.) */
@media (min-width: 561px) and (max-width: 960px) {
  .pdp > aside .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.pdp-b { display: none; } /* a versao B so existe no celular (<= 560 px): a regra do bloco abaixo a mostra */

/* Celular: cabecalho de uma linha so (logo + botao de usuario), sem a faixa azul, sem a busca e SEM ficar fixo (em 3 linhas ele tinha ~190px e,
   fixo, escondia quase um terco da tela), e a pagina do produto com titulo, preco e botao de compra antes da galeria. */
@media (max-width: 560px) {
  .topbar { display: none; } /* a troca de idioma/pais vai para dentro do menu do usuario (.menu-lang) */
  /* A busca volta como 2a linha do cabecalho (auditoria de 30/10): em 1 linha so ela nao cabe ao lado do logo e dos dois botoes. O cabecalho segue estatico. */
  html.js .header-inner { flex-wrap: wrap; }
  html.js .searchbar { order: 3; flex: 1 1 100%; } /* (a grade abaixo, em `html.js .header-inner`, e quem manda: a busca fica na 2a linha) */
  .header { position: static; }
  .header-inner { padding: 10px 20px; gap: 10px 14px; }
  .logo-mark { width: 40px; height: 40px; }
  .nav-inner { padding: 6px 20px; gap: 4px; }
  .nav a { padding: 6px 13px; }

  /* Menu do usuario (templates/base.html, static/js/user-menu.js): dois botoes redondos lado a lado, usuario (abre Entrar / Criar conta ou as opcoes da conta)
     e carrinho (um link sempre a vista, so o icone, com o contador). Tudo sob `html.js`: sem JavaScript o menu nao tem como abrir, entao as acoes ficam em linha como antes. */
  /* Grade de 2 linhas: logo e botoes (usuario, carrinho) na 1a, busca na 2a, sempre dentro da tela. Com `flex-wrap: nowrap` os tres itens ficavam na MESMA linha e a
     busca estourava a largura (a pagina ficava mais larga que o celular e o botao Buscar era cortado). O logo encolhe (o texto quebra em 2 linhas) para dar lugar aos botoes. */
  html.js .header-inner { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  html.js .header-inner .logo { min-width: 0; }
  html.js .searchbar { grid-column: 1 / -1; grid-row: 2; order: 0; }
  html.js .user-menu { display: flex; align-items: center; gap: 10px; flex: none; position: relative; } /* `relative`: o painel do menu se ancora nos botoes (1a linha), nao no fim do cabecalho */
  html.js .header-actions { display: contents; } /* o link do carrinho vira item do .user-menu, ao lado do botao de usuario; .menu-items sai do fluxo (painel) */
  html:not(.js) .user-toggle { display: none; }
  .user-toggle, html.js .cart-link {
    display: inline-flex; align-items: center; justify-content: center; position: relative;
    width: 44px; height: 44px; padding: 0; border: 2px solid var(--navy); border-radius: 50%;
    background: #fff; color: var(--navy); cursor: pointer; transition: background .15s, color .15s; -webkit-tap-highlight-color: transparent;
  }
  .user-toggle:focus-visible, html.js .cart-link:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
  .user-toggle[aria-expanded="true"] { background: var(--navy); color: #fff; }
  html.js .cart-link:hover { background: var(--navy); color: #fff; }
  html.js .cart-link .cart-icon { display: block; width: 22px; height: 22px; }
  html.js .cart-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } /* o nome do link continua para leitores de tela */
  html.js .cart-link .badge { top: -7px; right: -7px; }
  html.js .menu-items {
    display: none; position: absolute; top: calc(100% - 2px); right: 54px; z-index: 60; /* 54 = 44 do carrinho + 10 de espaco, a partir da borda do .user-menu: o painel fica embaixo do botao de usuario */
    flex-direction: column; align-items: stretch; gap: 2px;
    min-width: 220px; max-width: calc(100vw - 94px); max-height: calc(100vh - 80px); max-height: calc(100dvh - 80px); overflow-y: auto;
    padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 16px;
    box-shadow: 0 14px 34px rgba(11, 36, 86, .2); font-size: 16px; font-weight: 500;
  }
  html.js .user-menu.is-open .menu-items { display: flex; }
  html.js .menu-items > a {
    display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 14px;
    border: 0; border-radius: 10px; color: var(--ink); font-weight: 600;
  }
  html.js .menu-items > a:hover, html.js .menu-items > a:focus-visible { background: var(--blue-soft); color: var(--navy); }
  html.js .menu-items form .btn { width: 100%; min-height: 48px; margin-top: 4px; font-size: 15px; }

  /* Idioma / pais: era a faixa azul do topo; agora fecha o menu. Botoes de 40px de altura para o toque. */
  .menu-lang { display: block; flex: 1 1 100%; margin-top: 6px; padding: 12px 6px 4px; border-top: 1px solid var(--line); }
  html.js .menu-lang { flex: none; }
  .menu-lang-label { display: block; margin: 0 8px 8px; font-size: 12px; font-weight: 600; letter-spacing: .4px; color: var(--muted); }
  .menu-lang .lang-switch { display: flex; gap: 6px; margin: 0; }
  .menu-lang .lang-switch button { flex: 1; min-height: 40px; font-size: 13px; color: var(--navy); border-color: var(--line); }
  .menu-lang .lang-switch button:hover, .menu-lang .lang-switch button:focus-visible { background: var(--blue-soft); border-color: var(--navy); }
  .menu-lang .lang-switch button:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
  .menu-lang .lang-switch button.on { background: var(--navy); color: #fff; border-color: var(--navy); }

  .pdp-breadcrumb { margin: -10px 0 12px; }
  .pdp-crumb-current { display: none; } /* o nome do produto e o titulo logo abaixo: repetir gasta uma linha da primeira tela */
  .pdp-card { padding: 12px; }
  .pdp-top { gap: 16px; }
  .pdp-info { order: 1; } /* o painel de compra vem antes da galeria (o HTML segue a mesma ordem de antes: so a ordem visual muda) */
  .pdp-gallery { order: 2; }

  /* Painel de compra: miniatura a esquerda de nome, resumo e preco; embaixo quantidade e botao na largura toda.
     `display: contents` em .pdp-buy, no formulario e na linha de compra deixa esses itens na grade do painel sem mexer no HTML. */
  .pdp-info { display: grid; grid-template-columns: 68px minmax(0, 1fr); column-gap: 12px; align-content: start; padding: 12px; background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius); }
  .pdp-buy, .pdp-buy form, .pdp-buy-row { display: contents; }
  .pdp-thumb { /* botao que abre a galeria: miniatura com um selo de lupa (e do numero de imagens, quando ha mais de uma) */
    display: block; position: relative; grid-column: 1; grid-row: 1 / span 3; align-self: start; width: 68px; aspect-ratio: 4 / 5; padding: 0;
    border: 2px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; -webkit-tap-highlight-color: transparent;
  }
  .pdp-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
  .pdp-thumb:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
  .pdp-thumb-zoom {
    position: absolute; right: -7px; bottom: -7px; display: inline-flex; align-items: center; gap: 3px; min-width: 26px; height: 26px; padding: 0 6px; box-sizing: border-box;
    justify-content: center; border: 2px solid #fff; border-radius: 999px; background: var(--navy); color: #fff; font-size: 12px; font-weight: 700; line-height: 1;
  }
  html.js .pdp-gallery { display: none; } /* as imagens abrem na janela da miniatura; sem JavaScript a galeria continua na pagina */
  .pdp-facts { display: none; } /* Formato, Impressao e Pagamento: so desktop e tablet (o formato e o pagamento ja aparecem junto do preco) */
  .pdp-about { margin-top: 16px; }
  .pdp-id, .pdp-short, .pdp-price { grid-column: 2; }
  .pdp-no-thumb .pdp-id, .pdp-no-thumb .pdp-short, .pdp-no-thumb .pdp-price { grid-column: 1 / -1; } /* sem imagem o texto usa a largura toda */
  .pdp-buy > :not(.pdp-price), .pdp-buy form > *, .pdp-buy-row > * { grid-column: 1 / -1; }
  .pdp-id h1 { font-size: 19px; line-height: 1.25; overflow-wrap: anywhere; hyphens: auto; } /* palavra longa ("Socioemocionais") em 320 px nao pode passar da borda do painel */
  .pdp-short { margin: 4px 0 0; font-size: 13.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } /* resumo longo nao empurra o botao: 2 linhas; o texto inteiro esta em "Sobre o material" */
  .pdp-price { margin: 6px 0 0; }
  .pdp-price .price { font-size: 28px; line-height: 1.1; }
  .pdp-buy .qty { margin-top: 10px; justify-content: space-between; }
  .pdp-buy .btn { margin-top: 10px; min-height: 50px; width: 100%; letter-spacing: .4px; }
  .pdp-buy form > .tiny { margin: 8px 0 0; text-align: center; font-size: 12px; }
  .qty-btn { width: 44px; min-height: 44px; }

  /* Experimento A/B da primeira tela, versao B (templates/catalog/product_detail.html, "pdp-b"): a promessa e a amostra por dentro entram antes do preco e o
     que a pessoa recebe fica logo depois do botao. A miniatura passa a cobrir so o nome e o resumo; o resto do painel usa a largura toda. */
  .pdp-info-b .pdp-thumb { grid-row: 1 / span 2; }
  .pdp-info-b .pdp-price { grid-column: 1 / -1; }
  .pdp-b-top, .pdp-b-gets { display: block; grid-column: 1 / -1; }
  .pdp-b-promise { margin: 10px 0 0; font-size: 14px; line-height: 1.3; color: var(--navy); }
  .pdp-b-more { display: none; margin: 6px 0 0; padding: 6px 0; border: 0; background: none; color: var(--blue); font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
  .pdp-b-row { display: flex; align-items: center; gap: 12px; margin-top: 10px; } /* ate 2 imagens por dentro (a maioria dos e-books: capa + amostras): ficam ao lado do texto e a primeira tela nao cresce tanto */
  .pdp-b-row .pdp-b-text { flex: 1 1 0; min-width: 0; }
  .pdp-b-row .pdp-b-promise { margin: 0; }
  .pdp-b-row .pdp-b-peek-title { display: none; }
  html.js .pdp-b-row .pdp-b-peek { order: -1; flex: none; margin-top: 0; }
  html.js .pdp-b-row .pdp-b-more { display: inline-block; }
  .pdp-b-peek { display: none; } /* sem JavaScript a galeria inteira ja esta na pagina */
  html.js .pdp-b-peek { display: block; margin-top: 8px; }
  .pdp-b-peek-title { margin: 0 0 4px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); }
  .pdp-b-strip { display: flex; gap: 8px; margin: 0; padding: 0 0 2px; list-style: none; overflow-x: auto; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
  .pdp-b-strip li { flex: none; scroll-snap-align: start; }
  .pdp-b-strip button { display: block; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .pdp-b-strip button:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
  .pdp-b-strip img { display: block; width: 84px; height: 105px; object-fit: cover; }
  .pdp-b-gets { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
  .pdp-b-gets-title { margin: 0 0 6px; font-size: 15px; }
  .pdp-b-gets ul { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.45; }
  .pdp-b-gets li + li { margin-top: 2px; }
}

/* Celular deitado: a tela e baixa (~375px) e o cabecalho fixo de ~136px ocuparia mais de um terco dela. */
@media (max-width: 960px) and (max-height: 520px) {
  .header { position: static; }
}

/* ---------- Gestão do catálogo ---------- */
.filter-bar {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 14px;
  align-items: end;
  margin-top: 4px;
  padding: 18px 20px;
}
.filter-bar label { font-size: 12px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted); }
.filter-bar-actions { display: flex; gap: 8px; }

.catalog-table th:last-child, .catalog-table td:last-child { text-align: right; }
.catalog-table .line-item img { width: 44px; height: 56px; }
.catalog-table .no-image {
  width: 44px;
  height: 56px;
  flex: none;
  border: 2px dashed var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  line-height: 1.1;
}
.catalog-table .chip { margin-left: 6px; background: var(--yellow-soft); color: #b07c00; }
.price-form { display: flex; gap: 6px; align-items: center; }
.price-form input { width: 90px; text-align: right; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }

@media (max-width: 960px) {
  .filter-bar { grid-template-columns: 1fr; }
  .catalog-table { font-size: 13px; }
  .row-actions { justify-content: flex-start; }
}

/* A tabela do catalogo e larga: colunas apertadas nao podem quebrar os rotulos. */
.status-pill { white-space: nowrap; }
.catalog-table th, .catalog-table td { padding-right: 14px; }
.catalog-table th:last-child, .catalog-table td:last-child { padding-right: 0; }
.catalog-table thead th { white-space: nowrap; }

/* ---------- Tabelas responsivas (carrinho e gestao do catalogo) ---------- */
/* Filhos de grid nao podem ser mais largos que a coluna, senao a pagina rola de lado. */
.split > *, .listing > * { min-width: 0; }
.cart-table th.num, .cart-table td.num { text-align: right; }
.cart-table td:last-child { text-align: right; }
.cart-table .line-item > div { min-width: 0; overflow-wrap: anywhere; }
.cart-footer { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.remove-text { display: none; }

@media (max-width: 720px) {
  .stack-table, .stack-table tbody, .stack-table tr, .stack-table td { display: block; width: 100%; }
  .stack-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .stack-table tr { border-top: 2px solid var(--line); padding: 14px 0; }
  .stack-table tr:first-child { border-top: 0; padding-top: 0; }
  .stack-table td {
    border: 0;
    padding: 6px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    text-align: right;
  }
  .stack-table td[data-label]::before {
    content: attr(data-label);
    flex: none;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--muted);
    text-align: left;
  }
  .stack-table td.cell-main { display: block; text-align: left; padding-top: 0; }
  .stack-table td.cell-actions { justify-content: flex-end; text-align: right; }
  /* Celulas com varias linhas (pill + avisos): o rotulo vai em cima, o conteudo embaixo. */
  .stack-table td.cell-block { display: block; text-align: left; }
  .stack-table td.cell-block::before { display: block; margin-bottom: 3px; }
  .confirm-box[open] > form { min-width: 0; width: 100%; }
  .catalog-table th:last-child, .catalog-table td:last-child,
  .cart-table td:last-child { padding-right: 0; }
  .catalog-table th, .catalog-table td { padding-right: 0; }
  .stack-table .price-form { justify-content: flex-end; }
  .stack-table .price-form input { width: 110px; }
  .stack-table .row-actions { justify-content: flex-start; }
  .stack-table td.cell-actions .row-actions { width: 100%; }
  .remove-text { display: inline; }
  .cart-footer .btn, .cart-footer form { flex: 1 1 100%; }
  .cart-footer form .btn { width: 100%; }
}

/* ---------- Cadastro de e-book ---------- */
.ebook-form { margin-top: 18px; }
.ebook-form h2 { display: flex; align-items: center; gap: 10px; }
.ebook-form .step {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 14px;
  display: grid;
  place-items: center;
  flex: none;
}
.ebook-form section:nth-of-type(2) .step { background: var(--red); }
.ebook-form section:nth-of-type(3) .step { background: var(--green); }
.ebook-form textarea { resize: vertical; }
.ebook-form input[type="file"] { font-size: 13px; width: 100%; }

.upload-grid { display: grid; grid-template-columns: 200px 1fr; gap: 22px; align-items: start; }
.dropzone {
  aspect-ratio: 4/5;
  border: 2px dashed #c9d6ee;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--navy);
  font-weight: 500;
  cursor: pointer;
  overflow: hidden;
  margin-bottom: 8px;
  transition: border-color .15s, background .15s;
}
.dropzone:hover { border-color: var(--blue); background: var(--blue-soft); }
.dropzone img { width: 100%; height: 100%; object-fit: cover; }
.gallery-preview { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.gallery-preview img { width: 56px; height: 70px; object-fit: cover; border-radius: 8px; border: 2px solid var(--line); }

.check-row { display: flex; align-items: center; gap: 9px; font-weight: 500; margin-top: 14px; cursor: pointer; }
.check-row input { width: 16px; height: 16px; }

.preview-card { box-shadow: none; }
.preview-card:hover { transform: none; box-shadow: none; }
.preview-card .thumb { display: block; }
.preview-card .thumb img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 960px) {
  .upload-grid { grid-template-columns: 1fr; }
  .dropzone { max-width: 220px; }
}

/* ---------- Login e recuperação de senha ---------- */
.auth-box { max-width: 440px; margin: 0 auto; }
.auth-icon { width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 14px; }
.auth-icon svg { width: 28px; height: 28px; }
.forgot-link { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--blue); }
.forgot-link:hover { text-decoration: underline; }

/* Etapas do "esqueci a senha": e-mail -> codigo -> senha nova */
.reset-steps {
  list-style: none;
  display: flex;
  gap: 8px;
  padding: 0;
  margin: 0 0 14px;
  justify-content: center;
  counter-reset: passo;
}
.reset-steps li {
  counter-increment: passo;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg-alt);
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
}
.reset-steps li::before { content: counter(passo) ". "; }
.reset-steps li.on { color: #fff; background: var(--navy); border-color: var(--navy); }
.reset-steps li.done { color: var(--green); background: var(--green-soft); border-color: var(--green-soft); }

.code-input {
  width: 250px !important;
  max-width: 100%;
  margin: 4px auto 0;
  display: block;
  text-align: center;
  font-size: 32px !important;
  font-weight: 800;
  letter-spacing: 10px;
  padding: 10px 0 10px 10px !important;
  color: var(--navy);
}
.reset-help {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
  font-size: 13px;
  font-weight: 600;
}
.reset-help a { color: var(--blue); }
.link-button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--blue);
  cursor: pointer;
}
.link-button:hover, .reset-help a:hover { text-decoration: underline; }
.hint-ok { color: var(--green); font-weight: 600; }
.hint-bad { color: var(--danger); font-weight: 600; }

/* ---------- Menu do painel ---------- */
.painel-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 6px;
  margin-bottom: 18px;
  background: var(--bg-alt);
  border: 2px solid var(--line);
  border-radius: 999px;
  width: fit-content;
  max-width: 100%;
}
.painel-nav a {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
  padding: 7px 16px;
  border-radius: 999px;
}
.painel-nav a:hover { background: #fff; color: var(--navy); }
.painel-nav a.on { background: var(--navy); color: #fff; }

/* ---------- Painel: barra lateral + miolo (templates/core/painel_base.html, static/js/painel-shell.js) ---------- */
.page-scripts { display: contents; }
.painel .wrap { max-width: 1440px; }
/* Tres colunas em tela larga (menu | conteudo | funil de vendas). Em tela media o funil desce para baixo do menu; no celular abre junto com o menu. */
.painel-shell {
  --painel-top: 96px; display: grid; grid-template-columns: 224px minmax(0, 1fr); grid-template-areas: "side main" "funnel main"; grid-template-rows: auto 1fr;
  column-gap: 28px; row-gap: 14px; align-items: start; margin-top: 8px;
}
.painel-main { grid-area: main; min-width: 0; outline: none; transition: opacity .15s; }
.painel-main[aria-busy="true"] { opacity: .45; pointer-events: none; }
.painel-side { grid-area: side; padding: 10px; background: #fff; border: 2px solid var(--line); border-radius: var(--radius); }
.painel-right { grid-area: funnel; min-width: 0; }
@media (min-width: 1200px) {
  .painel-shell { grid-template-columns: 224px minmax(0, 1fr) 216px; grid-template-areas: "side main funnel"; grid-template-rows: auto; }
  .painel-side { position: sticky; top: var(--painel-top); max-height: calc(100vh - var(--painel-top) - 12px); overflow-y: auto; margin-bottom: 18px; }
  .painel-right { position: sticky; top: var(--painel-top); margin-bottom: 18px; }
}
@media (min-width: 1760px) { .painel .wrap { max-width: 1700px; } }  /* a coluna extra nao tira espaco do conteudo */
.painel-side-toggle { display: none; }
.painel-side-title { margin: 14px 10px 4px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.painel-side-list > .painel-side-title:first-child { margin-top: 4px; }
.painel-side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.painel-side ul a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.painel-side ul a:hover { background: var(--bg-alt); color: var(--navy); }
.painel-side ul a.on { background: var(--navy); color: #fff; }
.painel-side ul a.is-pending { background: var(--blue-soft); color: var(--navy); }
.painel-side ul a.on.is-pending { background: var(--navy); color: #fff; }
.painel-side-icon { flex: none; opacity: .85; }
/* Barra fina no topo enquanto a tela troca (o miolo fica meio apagado, a barra lateral continua clicavel). */
.painel-shell.is-loading::before {
  content: ""; position: fixed; z-index: 60; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--yellow), var(--blue), transparent); background-size: 50% 100%; background-repeat: no-repeat;
  animation: painel-load 1s ease-in-out infinite;
}
@keyframes painel-load { from { background-position: -50% 0; } to { background-position: 150% 0; } }
.painel-status { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (prefers-reduced-motion: reduce) {
  .painel-main { transition: none; }
  .painel-shell.is-loading::before { animation: none; background-size: 100% 100%; }
}
@media (max-width: 900px) {
  .painel-shell { grid-template-columns: minmax(0, 1fr); grid-template-areas: "side" "funnel" "main"; grid-template-rows: auto; row-gap: 0; }
  .painel-side { position: relative; top: auto; max-height: none; overflow: visible; margin-bottom: 14px; padding: 6px; border-radius: 16px; }
  .painel-right { margin-bottom: 14px; }
  .js .painel-shell:not(:has(.painel-side.is-open)) .painel-right { display: none; }  /* no celular o funil abre junto com o menu */
  .painel-side-toggle {
    display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 12px;
    background: none; font: inherit; font-size: 15px; font-weight: 800; color: var(--navy); text-align: left; cursor: pointer;
  }
  .painel-side-toggle:hover { background: var(--bg-alt); }
  .painel-side-hint { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--muted); }
  .painel-side-toggle::after {
    content: ""; flex: none; width: 8px; height: 8px; margin-left: 4px; border: solid var(--muted); border-width: 0 2px 2px 0;
    transform: rotate(45deg) translateY(-2px); transition: transform .15s;
  }
  .painel-side-toggle[aria-expanded="true"]::after { transform: rotate(-135deg); }
  .painel-side-list { margin-top: 6px; padding-top: 4px; border-top: 2px solid var(--line); }
  .js .painel-side:not(.is-open) .painel-side-list { display: none; }
  .painel-side ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .painel-side ul a { padding: 10px 12px; }
}

/* ---------- Analytics: links rastreados (templates/analytics/tracked_links.html) ---------- */
.lk-copy { display: flex; gap: 6px; align-items: center; min-width: 220px; }
.lk-url { flex: 1; min-width: 0; padding: 7px 9px; font: 12px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink-2); background: var(--bg-alt); border: 1px solid var(--line); border-radius: 8px; }
.lk-block { margin-top: 14px; }
.lk-dest { margin: 0 0 4px; font-size: 15px; color: var(--navy); }
.lk-row { display: grid; grid-template-columns: minmax(180px, 280px) minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
.lk-label { font-weight: 600; color: var(--ink-2); }
@media (max-width: 700px) { .lk-row { grid-template-columns: minmax(0, 1fr) auto; } .lk-label { grid-column: 1 / -1; } }
.lk-result { margin-top: 14px; padding: 12px; background: var(--blue-soft); border-radius: var(--radius-sm); }

/* ---------- Painel: card lateral do funil de vendas (templates/core/_painel_funil.html, apps/analytics/reports/sales_funnel.py) ---------- */
.pf-card { padding: 12px 12px 10px; background: #fff; border: 2px solid var(--line); border-radius: var(--radius); }
.pf-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 8px; }
.pf-title { margin: 0; font-size: 14px; font-weight: 800; letter-spacing: 0; color: var(--navy); white-space: nowrap; }
.pf-badge { padding: 2px 8px; border-radius: 999px; background: var(--yellow-soft); color: #7a5600; font-size: 10.5px; font-weight: 800; letter-spacing: 0; white-space: nowrap; }
.pf-live { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 800; color: #23803f; white-space: nowrap; }
.pf-dot { width: 8px; height: 8px; border-radius: 50%; background: #23803f; box-shadow: 0 0 0 0 rgba(35, 128, 63, .5); animation: pf-pulse 1.8s ease-out infinite; }
.pf-live[data-state="error"] { color: var(--muted); }
.pf-live[data-state="error"] .pf-dot { background: #9aa3b2; animation: none; box-shadow: none; }
.pf-live[data-state="expired"] { color: var(--danger); }
.pf-live[data-state="expired"] .pf-dot { background: var(--danger); animation: none; box-shadow: none; }
@keyframes pf-pulse { 0% { box-shadow: 0 0 0 0 rgba(35, 128, 63, .5); } 70% { box-shadow: 0 0 0 7px rgba(35, 128, 63, 0); } 100% { box-shadow: 0 0 0 0 rgba(35, 128, 63, 0); } }
@media (prefers-reduced-motion: reduce) { .pf-dot { animation: none; } }
.pf-periods { display: flex; gap: 4px; margin: 8px 0 6px; }
.pf-periods button {
  flex: 1; padding: 4px 0; font: inherit; font-size: 11.5px; font-weight: 700; color: var(--ink-2); background: #fff;
  border: 1.5px solid var(--line); border-radius: 999px; cursor: pointer;
}
.pf-periods button:hover { border-color: var(--navy); color: var(--navy); }
.pf-periods button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.pf-period { margin: 2px 0 10px; font-size: 12px; color: var(--muted); }
.pf-period span { display: block; }
.pf-num small.is-small { opacity: .55; }
.pf-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.pf-stage {
  --c: var(--navy); width: var(--w); margin: 0 auto; min-height: 48px; padding: 5px 0 7px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; line-height: 1.15; color: #fff; background: var(--c);
  clip-path: polygon(0 0, 100% 0, calc(100% - var(--cut)) 100%, var(--cut) 100%);
}
.pf-visitors { --c: var(--navy-dark); }
.pf-leads { --c: var(--navy); }
.pf-opportunities { --c: var(--blue); }
.pf-sales { --c: #23803f; }
.pf-customers { --c: #1b6a3a; }
.pf-repeat { --c: #14532d; }
.pf-has-tip { position: relative; list-style: none; }
.pf-has-tip > .pf-stage { cursor: help; outline: none; }
.pf-tip {
  display: none; position: absolute; z-index: 6; left: 50%; top: calc(100% + 2px); transform: translateX(-50%); width: min(100%, 230px); box-sizing: border-box;
  padding: 8px 10px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 22px rgba(15, 35, 80, .18); font-size: 11.5px; line-height: 1.35; color: var(--ink-2);
}
.pf-has-tip:hover .pf-tip, .pf-has-tip:focus-within .pf-tip { display: block; }
.pf-tip p { margin: 0; }
.pf-tip-title { font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--navy); }
.pf-lines { list-style: none; margin: 3px 0 0; padding: 0; display: grid; gap: 4px; }
.pf-line { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; color: var(--ink); }
.pf-line b { color: var(--navy); }
.pf-doors { list-style: none; margin: 2px 0 0; padding: 0 0 0 8px; display: grid; gap: 1px; border-left: 2px solid var(--line); }
.pf-door { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; font-weight: 500; }
.pf-door b { color: var(--navy); }
.pf-tip-note { margin-top: 6px !important; font-size: 10.5px; color: var(--muted); }
.pf-foot { margin: 5px 0 0; font-size: 10.5px; color: var(--muted); text-align: center; }
.pf-cold { margin: 10px 0 2px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 11.5px; line-height: 1.5; color: var(--ink-2); text-align: center; }
.pf-cold b { color: var(--navy); font-size: 13px; }
.pf-cold span[data-cold-item] { white-space: nowrap; }
.pf-cold span[data-cold-item="reachable"] b { color: #23803f; }
.pf-cold a { font-weight: 700; color: var(--navy); white-space: nowrap; }
.pf-name { font-size: 11px; font-weight: 700; letter-spacing: .01em; }
.pf-num { font-size: 12px; white-space: nowrap; }
.pf-num b { font-size: 18px; font-weight: 800; }
.pf-num small { display: block; margin-top: 1px; font-size: 10px; font-weight: 600; opacity: .92; }  /* a porcentagem vai numa linha propria: "50% das oportunidades" nao cabe ao lado do numero */
.pf-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.pf-total { margin: 8px 0 2px; font-size: 12px; color: var(--ink-2); text-align: center; }
.pf-total b { color: var(--navy); font-size: 14px; }
.pf-help { margin-top: 6px; font-size: 12px; color: var(--ink-2); }
.pf-help summary { cursor: pointer; color: var(--navy); font-weight: 700; }
.pf-help dl { margin: 6px 0 0; }
.pf-help dt { margin-top: 6px; font-weight: 800; color: var(--ink); }
.pf-help dd { margin: 0; color: var(--muted); }
.pf-help p { margin: 8px 0 0; color: var(--muted); }
.pf-help .pf-note { margin: 8px 0 0; padding-top: 8px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }

/* ---------- WhatsApp: conexao ---------- */
.wpp-status { text-align: center; }
.wpp-status .pix-box { text-align: left; white-space: pre; }
.qr-box {
  width: 296px;
  height: 296px;
  margin: 18px auto;
  padding: 14px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  display: grid;
  place-items: center;
}
.qr-box img { width: 264px; height: 264px; image-rendering: pixelated; }
.wpp-actions { display: flex; gap: 10px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
.how-to { padding-left: 20px; margin: 0 0 14px; font-size: 14px; }
.how-to li + li { margin-top: 8px; }

/* ---------- WhatsApp: conversas ---------- */
.chat-layout { display: grid; grid-template-columns: 330px 1fr; gap: 20px; align-items: start; }
.chat-layout .card + .card { margin-top: 0; }
.chat-sidebar { padding: 14px; }
.chat-search { margin-bottom: 10px; }
.new-chat { margin-bottom: 10px; border: 2px dashed var(--line); border-radius: var(--radius-sm); padding: 8px 12px; }
.new-chat summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--blue); }
.new-chat form { margin-top: 10px; }
.chat-list { max-height: 560px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.chat-item { display: flex; gap: 10px; padding: 10px 8px; border-radius: var(--radius-sm); }
.chat-item:hover { background: var(--bg-alt); color: inherit; }
.chat-item.on { background: var(--blue-soft); }
.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
  background: var(--navy);
}
img.chat-avatar { object-fit: cover; background: var(--bg-alt); border: 2px solid var(--line); }
.chat-avatar.lg { width: 52px; height: 52px; font-size: 20px; }
.chat-item:nth-child(4n+2) .chat-avatar { background: var(--red); }
.chat-item:nth-child(4n+3) .chat-avatar { background: #d79a00; }
.chat-item:nth-child(4n+4) .chat-avatar { background: var(--green); }
.chat-item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.chat-item-top, .chat-item-bottom { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.chat-item-top strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item-bottom .tiny { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-unread { background: var(--green); color: #fff; font-size: 11px; font-weight: 800; border-radius: 999px; padding: 1px 7px; flex: none; }

.chat-main { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.chat-main > .empty { padding: 80px 20px; }
.chat-header { padding: 16px 20px; border-bottom: 2px solid var(--line); display: flex; align-items: center; gap: 14px; }
.chat-header h2 { margin: 0; font-size: 18px; }
.chat-header p { margin: 2px 0 0; }
.chat-thread {
  height: 460px;
  overflow-y: auto;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f2f5fb;
}
.chat-day { text-align: center; margin: 6px 0; }
.chat-day span { font-size: 11px; font-weight: 700; color: var(--muted); background: #fff; border-radius: 999px; padding: 3px 12px; }
.bubble {
  max-width: 72%;
  padding: 8px 12px 6px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  align-self: flex-start;
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.bubble.out { align-self: flex-end; background: #dff3e6; border-color: #c4e6cf; }
.bubble.failed { background: var(--red-soft); border-color: var(--red); }
.bubble-line { font-weight: 700; color: var(--green); }
.chat-line { display: inline-block; font-size: 10px; font-weight: 700; color: var(--green); background: rgba(37, 211, 102, .12); border-radius: 8px; padding: 0 6px; margin-right: 4px; }
.chat-reply-line { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.chat-reply-line select.field { width: auto; min-width: 140px; }
.bubble-tag { display: block; font-size: 10.5px; font-weight: 700; color: var(--green); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 2px; }
.bubble-meta { font-size: 11px; color: var(--muted); text-align: right; margin-top: 2px; }
.ticks { font-weight: 700; margin-left: 2px; }
.ticks-read { color: var(--blue); }
.ticks-failed { color: var(--danger); }
.chat-reply { display: flex; gap: 10px; padding: 12px 16px 0; align-items: flex-end; }
.chat-list.htmx-request { opacity: 1; } /* a consulta automatica nao apaga a lista (a regra geral .htmx-request fazia a tela "piscar" a cada 8 s) */
.chat-main { transition: opacity .15s; }
.chat-main.is-loading { opacity: .55; pointer-events: none; transition-delay: .15s; }
.chat-error { margin: 0; padding: 10px 16px 0; font-size: 13px; font-weight: 700; color: var(--danger); }
.chat-error[hidden] { display: none; }
.chat-reply textarea { resize: none; min-height: 46px; max-height: 160px; }
.chat-main > .tiny { padding: 0 16px 12px; }

/* ---------- WhatsApp: promocoes ---------- */
.campaign-step { border-top: 2px solid var(--line); margin-top: 18px; padding-top: 16px; }
.test-row { display: flex; gap: 10px; align-items: flex-end; }
.phone-preview { background: #f2f5fb; border-radius: var(--radius-sm); padding: 14px; display: flex; flex-direction: column; }
.phone-preview .bubble { max-width: 100%; }
.audience-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
a.audience-row:hover { color: inherit; background: var(--bg-alt); }

@media (max-width: 960px) {
  .chat-layout { grid-template-columns: 1fr; }
  .chat-list { max-height: 260px; }
  .bubble { max-width: 88%; }
  .test-row { flex-direction: column; align-items: stretch; }
}

/* Aviso de status que tambem e link (ex.: "WhatsApp desconectado - conectar") */
.section-title > a.status-pill, a.status-pill { color: #fff; }
a.status-pill:hover { color: #fff; filter: brightness(1.08); }

/* ---------- Visitas: gráficos ---------- */
/* Paleta conferida com o validador do guia de dados (contraste e daltonismo):
   azul #1f6fd6, âmbar #b07c00, roxo #7a4bc4, verde #2e9e4f, nesta ordem. */
.period-picker { display: flex; gap: 6px; }
.period-picker button {
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-2);
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
}
.period-picker button:hover { border-color: var(--navy); color: var(--navy); }
.period-picker button.on { background: var(--navy); border-color: var(--navy); color: #fff; }

.chart-card h2 { margin-bottom: 4px; }
.chart {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 180px;
  margin: 18px 0 4px;
  padding-top: 10px;
  border-bottom: 2px solid var(--line);
}
.chart-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; min-width: 0; }
.chart-bar {
  background: #1f6fd6;
  border-radius: 4px 4px 0 0;
  min-height: 2px;
  transition: background .15s;
}
.chart-col:hover .chart-bar { background: var(--navy); }
.chart-tick {
  font-size: 10px;
  color: var(--muted);
  text-align: center;
  margin-top: 6px;
  white-space: nowrap;
  overflow: hidden;
}
.chart-days .chart-col { gap: 0; }
.chart-table { margin-top: 12px; }
.chart-table summary { font-size: 12.5px; font-weight: 700; color: var(--blue); cursor: pointer; }
.chart-table table { margin-top: 8px; max-width: 320px; font-size: 13px; }
.chart-table td { padding: 4px 0; border-top: 1px solid var(--line); }

.hbars { display: flex; flex-direction: column; gap: 12px; }
.hbar-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.hbar-track { height: 10px; background: var(--bg-alt); border-radius: 999px; overflow: hidden; }
.hbar-fill { height: 100%; background: #1f6fd6; border-radius: 999px; }
/* Aparelhos e outras categorias: ordem fixa de cores, nunca ciclada. */
.hbars-cat .hbar:nth-child(1) .hbar-fill { background: #1f6fd6; }
.hbars-cat .hbar:nth-child(2) .hbar-fill { background: #b07c00; }
.hbars-cat .hbar:nth-child(3) .hbar-fill { background: #7a4bc4; }
.hbars-cat .hbar:nth-child(4) .hbar-fill { background: #2e9e4f; }

@media (max-width: 960px) {
  .chart { height: 140px; }
  .chart-hours .chart-tick { display: none; }
}

/* ---------- Horario comercial e mensagens automaticas ---------- */
.when-options { display: flex; gap: 10px; flex-wrap: wrap; }
.when-options .radio-card { flex: 1; min-width: 200px; margin-bottom: 0; }
.schedule-row { margin-top: 12px; }
.schedule-row input { max-width: 280px; }
.auto-block { border-top: 2px solid var(--line); padding-top: 14px; margin-top: 14px; }
.auto-block:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.auto-block .check-row { margin: 0 0 10px; }
.rules-table { margin-bottom: 8px; }
.rules-table .rule-off td { opacity: .6; }
.split-text { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 16px; align-items: start; }
@media (max-width: 800px) { .split-text { grid-template-columns: 1fr; } }
.shortcut-box { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--bg-alt); }
.shortcut-box summary { cursor: pointer; font-weight: 700; font-size: 13.5px; }
.shortcut-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.shortcut-list code { font-size: 12.5px; }
.wpp-bubble { white-space: pre-wrap; background: #dcf8c6; color: #1b1b1b; border-radius: 12px; padding: 10px 12px; max-width: 520px; font-size: 14px; line-height: 1.45; word-break: break-word; }
[data-theme="dark"] .wpp-bubble { background: #25503a; color: #f1f1f1; }
.rule-form { border-top: 2px solid var(--line); margin-top: 16px; padding-top: 16px; }
.queue-row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }

/* ---------- Programa de afiliados ---------- */
.status-pill.aff-pending, .status-pill.aff-payout-pending { background: var(--warn); }
.status-pill.aff-available { background: var(--blue); }
.status-pill.aff-paid, .status-pill.aff-payout-paid { background: var(--green); }
.status-pill.aff-canceled, .status-pill.aff-payout-failed { background: var(--muted); }
.status-pill.aff-reversed { background: var(--danger); }

/* ---------- Carrossel promocional flutuante (home) ---------- */
.promo {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  width: min(390px, calc(100vw - 32px));
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 6px 16px rgba(21, 66, 154, .14), 0 22px 56px rgba(21, 66, 154, .24);
  animation: promo-in .45s cubic-bezier(.2, .8, .2, 1) both;
}
.promo[hidden] { display: none; }
@keyframes promo-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

.promo-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  border-radius: 24px;
}
.promo-track::-webkit-scrollbar { display: none; }
.promo-track:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.promo-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 14px;
  padding: 22px 22px 58px;
  border: 2px solid var(--line);
  border-radius: 24px;
}
.promo-blue { background: var(--blue-soft); }
.promo-yellow { background: var(--yellow-soft); }
.promo-body .eyebrow { margin-bottom: 6px; }
.promo-body h2 { font-size: 20px; line-height: 1.2; margin: 0 28px 8px 0; color: var(--navy); }
.promo-body p { color: var(--ink-2); font-size: 14px; margin: 0 0 16px; }
.promo-body .btn { padding: 10px 20px; font-size: 12.5px; }
.promo-art {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
}
.promo-blue .promo-art { color: var(--blue); }
.promo-yellow .promo-art { color: #b07c00; }
.promo-art svg { width: 58%; height: 58%; }

.promo-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: #fff;
  color: var(--navy);
  font: inherit; font-size: 22px; font-weight: 700; line-height: 1;
  cursor: pointer;
  display: grid; place-items: center;
  transition: border-color .15s, background .15s;
}
.promo-close:hover { border-color: var(--navy); }

.promo-controls {
  position: absolute;
  left: 0; right: 0; bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.promo-controls[hidden] { display: none; }
.promo-arrow, .promo-pause {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: #fff;
  color: var(--navy);
  font: inherit; font-size: 18px; font-weight: 700; line-height: 1;
  cursor: pointer;
  display: grid; place-items: center;
  transition: border-color .15s, background .15s;
}
.promo-pause { font-size: 11px; }
.promo-arrow:hover, .promo-pause:hover { border-color: var(--navy); }
.promo-close:focus-visible, .promo-arrow:focus-visible, .promo-pause:focus-visible, .promo-dots button:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.promo-dots { display: flex; gap: 8px; }
.promo-dots button {
  width: 10px; height: 10px; padding: 0;
  border-radius: 999px;
  border: 0;
  background: #b9c4d8;
  cursor: pointer;
  transition: width .2s, background .2s;
}
.promo-dots button.on { width: 26px; background: var(--navy); }

@media (max-width: 560px) {
  /* No celular o card de cadastro NAO flutua: fixo no rodape ele cobria o botao "Ver os e-books" da primeira tela. Fica no fluxo, logo abaixo do hero. */
  .promo { position: static; width: auto; margin: 16px 12px 0; animation: none; box-shadow: var(--shadow); }
  .promo-slide { padding: 18px 18px 56px; }
  .promo-art { display: none; }
  .promo-slide { grid-template-columns: 1fr; }
  .promo-body .btn { width: 100%; }
}

/* ---------- Analytics (painel) ---------- */
.an-tabs {
  display: flex; gap: 4px; flex-wrap: wrap; align-items: center;
  margin: 0 0 18px; padding: 0 0 8px; border-bottom: 2px solid var(--line);
}
.an-tabs a { font-size: 13px; font-weight: 700; color: var(--ink-2); padding: 7px 14px; border-radius: 10px; }
.an-tabs a:hover { background: var(--bg-alt); color: var(--navy); }
.an-tabs a.on { background: var(--blue-soft); color: var(--navy); box-shadow: inset 0 -3px 0 var(--blue); }
.an-tabs .an-tab-legacy { margin-left: auto; font-weight: 600; color: var(--muted); }
/* Segundo nivel do menu do Analytics: as telas do grupo aberto. */
.an-subtabs { display: flex; flex-wrap: wrap; gap: 4px; margin: -4px 0 16px; padding-left: 4px; }
.an-subtabs a { font-size: 12.5px; font-weight: 600; color: var(--ink-2); padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); }
.an-subtabs a:hover { background: var(--bg-alt); color: var(--navy); }
.an-subtabs a.on { background: var(--navy); border-color: var(--navy); color: #fff; }

.an-filters { margin-bottom: 20px; }
.an-filter-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.an-filter-row > div { min-width: 150px; flex: 1; }
.an-filter-row label, .an-search label, .an-inline label {
  display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted); margin-bottom: 4px;
}
.an-filter-actions { display: flex; gap: 8px; flex: 0 0 auto !important; min-width: 0 !important; }
.an-more { margin-top: 12px; }
.an-more summary { font-size: 12.5px; font-weight: 700; color: var(--blue); cursor: pointer; }
.an-more .an-filter-row { margin-top: 12px; }
.an-inline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.an-inline .field { max-width: 380px; }
.an-search { margin-bottom: 18px; }
.an-example { font-size: 15px; margin-bottom: 20px; }
.an-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.an-card-head h2 { margin-bottom: 4px; }

.an-kpis { grid-template-columns: repeat(5, 1fr); margin-bottom: 4px; }
.an-two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; align-items: start; }
.an-two > .card + .card { margin-top: 0; }
.an-two + .card, .card + .an-two, .kpi-grid + .an-two { margin-top: 20px; }
.an-two > * { min-width: 0; } /* sem isto uma tabela larga estica a coluna unica do celular e a pagina ganha rolagem lateral */
@media (max-width: 1100px) { .an-kpis { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .an-two { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .an-kpis { grid-template-columns: repeat(2, 1fr); } }
.kpi-grid.jr-ritmo { grid-template-columns: repeat(4, 1fr); }  /* Jornada do cliente: os quatro cards de ritmo, numa linha so */
@media (max-width: 1100px) { .kpi-grid.jr-ritmo { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .kpi-grid.jr-ritmo { grid-template-columns: 1fr; } }

/* resumo: blocos de indicadores e "o que fazer agora" */
.an-block-title { display: flex; gap: 12px; align-items: baseline; margin: 22px 0 8px; font-size: 13px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.an-block-title a { text-transform: none; letter-spacing: 0; font-weight: 600; }
/* Resumo em cinco faixas (Fase 1 da revisao do Analytics) */
.an-chip { display: inline-block; padding: 2px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-alt); color: var(--ink-2); font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; line-height: 1.5; }
.an-chip.ok { background: var(--green-soft); border-color: #b9dcc4; color: #1f6d37; }
.an-chip.warn { background: var(--yellow-soft); border-color: #f0d68a; color: #7a5600; }
a.an-chip { text-decoration: none; }
.an-chip.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.an-base-line { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 0; }
.an-recent .an-when { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.an-table.an-recent th.num, .an-table.an-recent td.num { padding-right: 22px; }
.an-recent td strong { white-space: nowrap; }
@media (max-width: 640px) {
  /* celular: cada pedido vira um mini-cartao (numero e valor em cima; quando e situacao embaixo; origem no fim), sem rolar de lado */
  .an-table.an-recent thead { display: none; }
  .an-table.an-recent, .an-table.an-recent tbody { display: block; }
  .an-table.an-recent tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 0; border-top: 1px solid var(--line); }
  .an-table.an-recent tbody tr:first-child { border-top: 0; padding-top: 0; }
  .an-table.an-recent td { display: block; padding: 0; border: 0; }
  .an-table.an-recent td:nth-child(2) { grid-column: 1; grid-row: 1; }
  .an-table.an-recent td:nth-child(3) { grid-column: 2; grid-row: 1; text-align: right; font-weight: 700; }
  .an-table.an-recent td:nth-child(1) { grid-column: 1; grid-row: 2; font-size: 12px; align-self: center; }
  .an-table.an-recent td:nth-child(4) { grid-column: 2; grid-row: 2; text-align: right; }
  .an-table.an-recent td:nth-child(5) { grid-column: 1 / -1; grid-row: 3; font-size: 12px; color: var(--muted); }
}
.an-kpis.an-kpis-6 { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 1280px) { .an-kpis.an-kpis-6 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .an-kpis.an-kpis-6 { grid-template-columns: repeat(2, 1fr); } }
.an-st { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.an-st-ok { background: var(--green-soft); color: #1f6d37; }
.an-st-wait { background: var(--yellow-soft); color: #7a5600; }
.an-st-no { background: var(--red-soft); color: #a02a1a; }
.an-st-info { background: var(--bg-alt); color: var(--ink-2); border: 1px solid var(--line); }
.an-checks td:nth-child(3) { white-space: nowrap; }
.an-origin-tabs { margin: 20px 0 12px; }
.an-base-tabs { margin: 4px 0 8px; }
.an-table.an-sales th.num, .an-table.an-sales td.num { padding-right: 18px; }
/* Afiliados no celular: cada afiliado vira um cartao (o nome em cima; cliques, vendas, a receber e ja pago em duas colunas, cada um com o seu rotulo), sem rolar de lado. */
@media (max-width: 640px) {
  .an-table.an-affiliates thead { display: none; }
  .an-table.an-affiliates, .an-table.an-affiliates tbody { display: block; }
  .an-table.an-affiliates tr { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; padding: 14px 0; border-top: 1px solid var(--line); }
  .an-table.an-affiliates tbody tr:first-child { border-top: 0; padding-top: 0; }
  .an-table.an-affiliates td { display: block; padding: 0; border: 0; text-align: left; white-space: normal; }
  .an-table.an-affiliates td:first-child { grid-column: 1 / -1; }
  .an-table.an-affiliates td[data-label]::before { content: attr(data-label); display: block; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); margin-bottom: 2px; }
}
.an-journey { margin-top: 6px; }
.an-journey > summary { cursor: pointer; color: var(--blue); font-weight: 600; }
.an-journey-body { margin-top: 8px; min-width: 260px; white-space: normal; }
.an-journey-body .an-day { margin: 6px 0 2px; font-size: 12px; }
.an-lost { margin: 14px 0 0; padding: 10px 14px; border-left: 5px solid var(--red); border-radius: 10px; background: var(--red-soft); font-size: 14px; color: var(--navy-dark); }
.an-actions-more { margin: 12px 0 0; }
.an-actions { margin-bottom: 4px; position: relative; }
.an-actions[hidden] { display: none; }
.an-actions > h2 { padding-right: 44px; }
.an-actions-close {
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid var(--line); background: #fff; color: var(--muted);
  font: inherit; font-size: 22px; font-weight: 700; line-height: 1;
  display: grid; place-items: center; cursor: pointer;
  transition: border-color .15s, color .15s;
}
.an-actions-close:hover, .an-actions-close:focus-visible { border-color: var(--navy); color: var(--navy); }
.an-action-list { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 10px; }
.an-action { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-left: 6px solid var(--blue); background: var(--bg-alt); border-radius: 10px; }
.an-action.high { border-left-color: var(--red); background: var(--red-soft); }
.an-action.medium { border-left-color: var(--yellow); background: var(--yellow-soft); }
.an-action-tag { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.an-action-title { font-size: 15.5px; color: var(--navy-dark); }
/* ---------- Explorar: contexto, mapa, ranking e estados de carregamento ---------- */
.ex-context { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 16px; margin: 4px 0 16px; }
.ex-crumbs { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; font-size: 16px; }
.ex-crumbs li + li::before { content: "›"; margin-right: 6px; color: var(--muted); }
.ex-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ex-chip { background: var(--blue-soft); color: var(--navy-dark); border-radius: 999px; padding: 4px 12px; font-size: 12.5px; font-weight: 700; }
.ex-note { margin: 0 0 10px; }
.ex-dash { position: relative; transition: opacity .15s; min-height: 120px; }
.ex-dash.htmx-request { opacity: .5; pointer-events: none; }
.ex-dash.htmx-request::before { content: "Atualizando…"; position: absolute; top: 0; left: 50%; transform: translateX(-50%); z-index: 2; background: var(--navy); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 14px; border-radius: 0 0 10px 10px; }
.ex-status:empty { display: none; }
.ex-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.ex-head h2 { margin: 0; }
.ex-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.ex-pill { border: 2px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 700; color: var(--ink-2); text-decoration: none; }
.ex-pill:hover { border-color: var(--navy); color: var(--navy); }
.ex-pill.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.ex-two { display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px; align-items: start; margin-top: 14px; }
.ex-map { display: block; width: 100%; height: auto; max-height: 520px; }
.ex-uf { cursor: pointer; outline: none; }
.ex-uf path { fill: #e8edf6; stroke: #fff; stroke-width: 1; stroke-linejoin: round; transition: fill .15s; }
.ex-uf.s1 path { fill: #cfdcf5; }
.ex-uf.s2 path { fill: #a9c2ee; }
.ex-uf.s3 path { fill: #7fa3e6; }
.ex-uf.s4 path { fill: #4f80dc; }
.ex-uf.s5 path { fill: #1f5fc9; }
.ex-uf:hover path, .ex-uf:focus path { stroke: var(--navy-dark); stroke-width: 2.5; }
.ex-uf.is-selected path { stroke: var(--navy-dark); stroke-width: 3; }
.ex-uf.is-muted path { opacity: .45; }
/* Mapa dos municipios de um estado: as mesmas cores e divisas do mapa dos estados. O tracado tem ~10.000 unidades, entao o traco e fixo em px. */
.ex-mapnav { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; }
.ex-maptitle { font-size: 15px; }
.ex-map.is-cities path { stroke-width: .6px; vector-effect: non-scaling-stroke; stroke-linejoin: round; fill-rule: evenodd; }
.ex-map path.ex-c { fill: #e8edf6; stroke: #fff; }
.ex-map path.ex-c.s1 { fill: #cfdcf5; }
.ex-map path.ex-c.s2 { fill: #a9c2ee; }
.ex-map path.ex-c.s3 { fill: #7fa3e6; }
.ex-map path.ex-c.s4 { fill: #4f80dc; }
.ex-map path.ex-c.s5 { fill: #1f5fc9; }
.ex-map.is-cities .ex-uf:hover path, .ex-map.is-cities .ex-uf:focus path { stroke: var(--navy-dark); stroke-width: 2px; }
.ex-map.is-cities .ex-uf.is-selected path, .ex-map.is-cities path.ex-c.is-selected { stroke: var(--navy-dark); stroke-width: 2.5px; }
.ex-map.is-cities .ex-uf.is-muted path, .ex-map.is-cities path.ex-c.is-muted { opacity: .45; }
.ex-map .ex-outline { fill: none; stroke: var(--navy-dark); stroke-width: 1.6px; vector-effect: non-scaling-stroke; stroke-linejoin: round; pointer-events: none; }
.ex-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.ex-legend-bar { width: 120px; height: 10px; border-radius: 999px; background: linear-gradient(90deg, #cfdcf5, #1f5fc9); }
.ex-legend-none { margin-left: 8px; display: inline-flex; align-items: center; gap: 4px; }
.ex-legend-none i { width: 12px; height: 12px; border-radius: 3px; background: #e8edf6; border: 1px solid #cdd6e6; }
.ex-rank-head { display: flex; justify-content: space-between; padding-bottom: 8px; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.ex-rank-row { display: grid; grid-template-columns: 24px minmax(0, 1.1fr) minmax(0, 1.4fr) auto; gap: 10px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.ex-rank-pos { color: var(--muted); }
.ex-rank-label a { font-weight: 700; }
.ex-rank-bar { height: 10px; border-radius: 999px; background: #d8e4fb; overflow: hidden; }
.ex-rank-bar i { display: block; height: 100%; border-radius: 999px; background: #2e6be6; }
.ex-rank-val { font-weight: 700; font-variant-numeric: tabular-nums; }
.ex-delta { margin-left: 4px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.ex-delta.up { color: var(--green); }
.ex-delta.down { color: var(--danger); }
.ex-delta.none { color: var(--muted); font-weight: 500; }
.ex-table th a { color: inherit; text-decoration: none; }
.ex-table th a.on { color: var(--navy); }
.ex-table tr.ex-none td { color: var(--muted); font-style: italic; }
.ex-table tfoot th { border-top: 2px solid var(--line); border-bottom: 0; color: var(--navy-dark); font-size: 13px; }
.ex-quality { margin-top: 8px; }
@media (max-width: 900px) { .ex-two { grid-template-columns: 1fr; } .ex-rank-row { grid-template-columns: 22px minmax(0, 1fr) auto; } .ex-rank-bar { display: none; } }

/* velocidade das páginas: faixa do número (boa / pode melhorar / ruim) */
.sp-good { color: var(--green); }
.sp-medium { color: #b07c00; }
.sp-poor { color: var(--danger); }
/* gráfico do resumo: sessões (azul) e gasto (laranja) lado a lado, cada um na sua escala */
.chart-days .chart-col { position: relative; }
.chart-pair { flex: 1; min-height: 0; display: flex; align-items: flex-end; gap: 1px; }
.chart-pair .chart-bar { flex: 1; }
.chart-bar-spend { background: var(--orange); }
.chart-col:hover .chart-bar-spend { background: var(--rust); }
.chart-sale { position: absolute; top: -12px; left: 0; right: 0; text-align: center; font-size: 10px; font-weight: 800; color: var(--green); }

.an-scroll { overflow-x: auto; }
.an-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.an-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); padding: 8px 10px 8px 0; white-space: nowrap; border-bottom: 2px solid var(--line); }
.an-table td { padding: 10px 10px 10px 0; border-top: 1px solid var(--line); vertical-align: top; }
.an-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.an-table th.num { padding-right: 0; }
.an-table td.num:last-child { padding-right: 0; }

/* funil */
.an-funnel { display: flex; flex-direction: column; gap: 4px; }
.an-funnel-step { position: relative; min-height: 48px; display: flex; align-items: center; border-radius: 12px; background: var(--bg-alt); overflow: hidden; }
.an-funnel-bar { position: absolute; inset: 0 auto 0 0; border-radius: 12px; opacity: .9; }
.an-funnel-bar.st-0 { background: #cfe0fb; } .an-funnel-bar.st-1 { background: #b6d0f7; }
.an-funnel-bar.st-2 { background: #9bbcf2; } .an-funnel-bar.st-3 { background: #7ea8ec; }
.an-funnel-bar.st-4 { background: #f5d77f; } .an-funnel-bar.st-5 { background: #9fdcb0; }
.an-funnel-bar.st-6 { background: #62c585; } .an-funnel-bar.st-7 { background: #3fae68; }
.an-funnel-text { position: relative; display: flex; gap: 10px; align-items: baseline; padding: 10px 14px; flex-wrap: wrap; }
.an-funnel-text strong { font-size: 20px; color: var(--navy-dark); font-variant-numeric: tabular-nums; }
.an-funnel-arrow { padding: 2px 0 2px 16px; font-size: 13px; color: var(--ink-2); }
.an-funnel-picker { margin-bottom: 20px; }

/* respostas e fatos */
.an-qa { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 28px; margin: 12px 0 0; }
.an-qa dt { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.an-qa dd { margin: 2px 0 0; font-size: 14px; }
.an-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px 24px; margin: 12px 0 0; }
.an-facts dt { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.an-facts dd { margin: 2px 0 0; font-size: 14px; }
@media (max-width: 760px) { .an-qa { grid-template-columns: 1fr; } }
.an-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.an-list code { font-size: 12px; background: var(--bg-alt); padding: 1px 6px; border-radius: 6px; word-break: break-all; }

/* linha do tempo da jornada */
.an-day { margin: 18px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--navy); }
.an-day:first-of-type { margin-top: 8px; }
.an-timeline { list-style: none; margin: 0; padding: 0; }
.an-timeline li { display: grid; grid-template-columns: 74px 1fr; gap: 12px; padding: 0 0 12px 16px; border-left: 2px solid var(--line); position: relative; font-size: 14px; }
.an-timeline li::before { content: ""; position: absolute; left: -7px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--blue); border: 2px solid #fff; }
.an-timeline time { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12.5px; padding-top: 2px; }
.an-timeline .an-t-session::before { background: var(--navy); }
.an-timeline .an-t-page::before { background: #b9c4d8; width: 9px; height: 9px; left: -5.5px; top: 7px; }
.an-timeline .an-t-page .an-t-text { color: var(--ink-2); font-size: 13px; }
.an-timeline .an-t-event::before { background: var(--yellow); }
.an-timeline .an-t-message::before { background: #25a06b; }
.an-timeline .an-t-order::before { background: var(--green); width: 14px; height: 14px; left: -8px; top: 4px; }
.an-timeline .an-t-order .an-t-text { font-weight: 700; color: var(--navy-dark); }
.an-timeline .an-t-key::before { background: var(--green); width: 14px; height: 14px; left: -8px; top: 4px; }
.an-timeline .an-t-key .an-t-text { font-weight: 700; color: var(--navy-dark); }

/* mapa de calor */
.an-heat-layout { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.an-heat-layout .card + .card { margin-top: 20px; }
@media (max-width: 1000px) { .an-heat-layout { grid-template-columns: 1fr; } }
.an-heat-stage { overflow: auto; max-height: 78vh; border: 2px solid var(--line); border-radius: 12px; background: #fff; margin: 12px 0; }
.an-heat-inner { position: relative; }
.an-heat-inner iframe { display: block; width: 100%; height: 700px; border: 0; background: #fff; }
.an-heat-inner canvas { position: absolute; inset: 0 auto auto 0; width: 100%; pointer-events: none; }

/* Marcar venda como paga: formulario recolhido (pagador, comprovante, valor) */
.confirm-box { position: relative; }
.confirm-box > summary { list-style: none; cursor: pointer; display: inline-block; }
.confirm-box > summary::-webkit-details-marker { display: none; }
.confirm-box[open] > form { display: flex; flex-direction: column; gap: 6px; min-width: 260px; margin-top: 6px; padding: 10px; border: 2px solid var(--line); border-radius: var(--radius-sm); background: #fff; }

/* Analytics > Acessos: grade dia da semana x hora e graficos de horario */
.chart-hours .chart-col, .chart-week .chart-col { gap: 0; }
.chart-week { max-width: 460px; }
.an-heat-wrap { overflow-x: auto; margin-top: 8px; }
.an-heat { border-collapse: separate; border-spacing: 2px; width: 100%; min-width: 640px; font-size: 11px; }
.an-heat th { font-weight: 600; color: var(--muted); text-align: center; padding: 2px 0; }
.an-heat th.row { text-align: left; padding-right: 8px; white-space: nowrap; color: var(--ink-2); }
.an-heat td { height: 24px; min-width: 20px; border-radius: 4px; text-align: center; color: var(--navy); }
.an-heat .l0 { background: var(--bg-alt); }
.an-heat .l1 { background: #dbe9fb; }
.an-heat .l2 { background: #a9ccf4; }
.an-heat .l3 { background: #5b9be8; color: #fff; }
.an-heat .l4 { background: #1f6fd6; color: #fff; }

/* ---------- Selo "Nova atividade" (partials/badge_nova.html; some sozinho apos 20 dias) ---------- */
.badge-nova {
  display: inline-block;
  background: var(--yellow);
  color: #3b2d00;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  padding: 4px 11px;
  border-radius: 999px;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(20, 30, 60, .18);
  white-space: nowrap;
}
.product-card .badge-nova { position: absolute; top: 12px; right: 12px; z-index: 1; }

/* Selo "Atividade grátis": verde, para nao confundir com desconto (vermelho) nem com novidade (amarelo) */
.badge-gratis {
  display: inline-block;
  background: var(--green);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  padding: 4px 11px;
  border-radius: 999px;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(20, 30, 60, .18);
  white-space: nowrap;
}
.product-card > .badge-gratis { position: absolute; top: 12px; left: 12px; z-index: 1; }
.price.price-free { color: var(--green); }

/* Paginacao das tabelas do Analytics (ex.: acessos por cidade) */
.an-pager { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-top:14px; font-size:13px; }
.an-pager a, .an-pager .on, .an-pager .off, .an-pager .gap { padding:6px 12px; border-radius:10px; line-height:1.2; min-width:36px; text-align:center; }
.an-pager a { font-weight:700; color:var(--ink-2); border:1px solid var(--line); }
.an-pager a:hover { background:var(--bg-alt); color:var(--navy); }
.an-pager .on { font-weight:700; background:var(--blue-soft); color:var(--navy); box-shadow:inset 0 -3px 0 var(--blue); }
.an-pager .off { color:#98a2b3; border:1px dashed var(--line); }
.an-pager .gap { padding:6px 2px; min-width:0; color:#98a2b3; }
@media (max-width:480px) { .an-pager a, .an-pager .on, .an-pager .off { padding:8px 11px; } }

/* ---------- Lista de produtos: filtros recolhidos + atividades em destaque no celular ---------- */
/* Titulo + lupa: a lupa abre os filtros e a ordenacao (templates/catalog/product_list.html, static/js/product-filters.js). */
.listing-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.listing-head h1 { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.filters-toggle, .filters-close {
  position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0;
  border: 2px solid var(--navy); border-radius: 50%; background: #fff; color: var(--navy); cursor: pointer;
  transition: background .15s, color .15s; -webkit-tap-highlight-color: transparent;
}
.filters-toggle:hover, .filters-close:hover { background: var(--blue-soft); }
.filters-toggle:focus-visible, .filters-close:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.filters-toggle[aria-expanded="true"] { background: var(--navy); color: #fff; } /* aberto: preenchido */
.filters-toggle .filters-count { position: absolute; top: -7px; right: -7px; border: 2px solid #fff; box-sizing: content-box; }
html:not(.js) .filters-toggle, html:not(.js) .filters-close { display: none; } /* sem JavaScript o painel ja aparece aberto (noscript) */
.filters-close { width: 40px; height: 40px; border-width: 0; background: transparent; color: var(--ink-2); font-size: 28px; line-height: 1; }
.filters-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1;
}
.filters-count[hidden] { display: none; }

.filters-panel { margin: 8px 0 18px; }
.filters-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.filters-panel-head h2 { margin: 0; font-size: 18px; }
.filters-panel[hidden] { display: none; }
.filters-panel form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 22px;
  align-items: start;
}
.filters-panel .filter-group + .filter-group { border-top: 0; margin-top: 0; padding-top: 0; }
.filters-panel .filter-actions { grid-column: 1 / -1; display: flex; gap: 10px; flex-wrap: wrap; }

.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-bottom: 14px; }
.active-filters .chip { margin: 0 6px 0 0; }
.active-filters-clear { font-size: 12.5px; font-weight: 700; color: var(--blue); padding: 6px 4px; }

/* O botao "Ver atividade" so aparece onde nao ha mouse para passar por cima: celular e tablet. */
.card-cta { display: none; margin-top: 12px; text-align: center; }

@media (max-width: 960px) {
  .card-cta { display: block; min-height: 46px; padding-top: 12px; padding-bottom: 12px; font-size: 14px; }
  .filters-panel .field { min-height: 44px; }
  .filters-panel form { gap: 18px; }
  .filters-panel .filter-actions .btn { flex: 1 1 140px; min-height: 44px; }
  .filter-group label { padding: 4px 0; margin-bottom: 4px; }
  .listing-grid .grid { gap: 18px; }
  .listing-grid .product-card { box-shadow: var(--shadow-hover); }
  .listing-grid .product-card .name { font-size: 16.5px; }
  .listing-grid .product-card .price { font-size: 23px; }
  .listing-grid .product-card .body { padding: 16px 18px 20px; gap: 8px; }
}

/* Card da lista no celular: o mesmo desenho do painel de compra da atividade (miniatura a esquerda de nome, resumo e preco; botao na largura toda embaixo).
   `display: contents` no .body deixa os textos como itens da grade do card sem mexer no HTML (o card segue igual na home e nos relacionados). */
.listing-grid .product-card .short {
  margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
@media (max-width: 560px) {
  .filters-panel { padding: 16px; }
  .listing-grid .grid { gap: 12px; }
  .listing-grid .product-card { display: grid; grid-template-columns: 84px minmax(0, 1fr); column-gap: 12px; align-content: start; padding: 12px; box-shadow: var(--shadow); }
  .listing-grid .product-card:hover { transform: none; }
  .listing-grid .product-card .thumb { grid-column: 1; grid-row: 1 / span 6; align-self: start; width: 84px; border: 2px solid var(--line); border-radius: 10px; }
  .listing-grid .product-card .body { display: contents; }
  .listing-grid .product-card .name, .listing-grid .product-card .short, .listing-grid .product-card .rating, .listing-grid .product-card .body > div { grid-column: 2; margin: 0; }
  .listing-grid .product-card .name { font-size: 16px; }
  .listing-grid .product-card .short { margin-top: 4px; }
  .listing-grid .product-card .rating { margin-top: 4px; }
  .listing-grid .product-card .body > div { margin-top: 8px !important; } /* o recuo automatico do preco (margin-top: auto no HTML) so vale no card vertical */
  .listing-grid .product-card .price { font-size: 24px; line-height: 1.1; }
  .listing-grid .product-card > .tag, .listing-grid .product-card > .badge-gratis, .listing-grid .product-card > .badge-nova {
    position: static; grid-column: 2; justify-self: start; margin: 0 0 6px; font-size: 11px; padding: 2px 9px; border-width: 1px; box-shadow: none;
  }
  .listing-grid .product-card .card-cta { grid-column: 1 / -1; min-height: 48px; margin-top: 12px; }
}

/* ===== Monitor ao vivo (painel do administrador) =====
   Mobile primeiro: uma coluna; a partir de 900px, vendas e metricas a esquerda e produtos a direita.
   Paleta: amarelo da marca no cartao de vendas, branco nos demais, cinza claro de fundo e cinza extra-claro nas celulas. */
.mon {
  --mon-bg: #eceef2;
  --mon-cell: #f4f5f7;
  --mon-ink: #111318;
  --mon-label: #4a5060;
  --mon-line: rgba(17, 19, 24, .14);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  max-width: 560px;
  margin: 0 auto 24px;
  padding: 14px;
  background: var(--mon-bg);
  border-radius: var(--radius);
  color: var(--mon-ink);
}
.mon-card { background: #fff; border-radius: var(--radius); padding: 18px; box-shadow: 0 1px 2px rgba(17, 19, 24, .06); overflow: hidden; }
.mon-title { margin: 0 0 12px; font-size: 17px; line-height: 1.25; color: var(--mon-ink); }

.mon-sales { background: var(--yellow); padding: 0; }
.mon-sales-body { padding: 18px 18px 16px; }
.mon-sales-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; margin-bottom: 12px; }
.mon-sales .mon-title { margin: 0; }
.mon-live { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; color: var(--mon-ink); }
.mon-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); flex: none; box-shadow: 0 0 0 0 rgba(229, 69, 44, .55); animation: mon-pulse 1.8s ease-out infinite; }
.mon-stale { font-weight: 700; }
.mon[data-stale] .mon-dot { background: #8a8f9c; animation: none; box-shadow: none; }
@keyframes mon-pulse { 70% { box-shadow: 0 0 0 9px rgba(229, 69, 44, 0); } 100% { box-shadow: 0 0 0 0 rgba(229, 69, 44, 0); } }
@media (prefers-reduced-motion: reduce) { .mon-dot { animation: none; } }
.mon-sales-value {
  padding: 16px;
  border: 1px solid var(--mon-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .42);
}
.mon-sales-value strong { display: block; font-size: clamp(26px, 8vw, 34px); line-height: 1.1; color: var(--mon-ink); font-variant-numeric: tabular-nums; }
.mon-last { margin: 6px 0 0; font-size: 13px; font-weight: 600; color: var(--mon-ink); }
.mon-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%;
  padding: 14px 18px; border-top: 1px solid var(--mon-line); background: rgba(17, 19, 24, .06);
  color: var(--mon-ink); font-weight: 700; text-decoration: none;
}
.mon-cta:hover, .mon-cta:focus-visible { background: rgba(17, 19, 24, .12); }

.mon-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
.mon-cell { display: flex; flex-direction: column; justify-content: space-between; gap: 8px; min-height: 84px; padding: 12px; background: var(--mon-cell); border-radius: 12px; }
.mon-cell dt { margin: 0; font-size: 12.5px; line-height: 1.25; color: var(--mon-label); }
.mon-cell dd { margin: 0; text-align: center; font-size: 22px; line-height: 1.15; font-weight: 700; color: var(--mon-ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

.mon-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mon-list li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; padding: 10px 12px; background: var(--mon-cell); border-radius: 12px; }
.mon-rank { grid-row: span 2; font-weight: 700; color: var(--mon-label); }
.mon-name { font-weight: 600; overflow-wrap: anywhere; }
.mon-units { grid-column: 3; grid-row: 1; font-weight: 700; font-variant-numeric: tabular-nums; }
.mon-money { grid-column: 2 / 4; grid-row: 2; font-size: 13px; color: var(--mon-label); font-variant-numeric: tabular-nums; }
.mon-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 180px; text-align: center; color: var(--mon-label); }
.mon-empty p { margin: 0; color: var(--mon-ink); font-weight: 600; }
.mon-empty-ico { color: #9aa1b0; }

.mon-tabbar { position: sticky; bottom: 0; z-index: 5; margin: 0 -14px -14px; padding: 6px 14px 10px; background: #fff; border-top: 1px solid var(--mon-line); border-radius: 0 0 var(--radius) var(--radius); }
.mon-tabbar a { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; font-weight: 700; color: var(--mon-ink); text-decoration: none; }
.mon-sparkles { color: var(--blue); flex: none; }

@media (min-width: 900px) {
  .mon { max-width: 980px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .mon-sales, .mon-metrics { grid-column: 1; }
  .mon-products { grid-column: 2; grid-row: 1 / span 2; }
  .mon-tabbar { grid-column: 1 / -1; }
}

/* ===== Botao e painel flutuante "Ao vivo" (painel do administrador) =====
   Fixo no canto inferior direito, acima do conteudo e abaixo de nada do painel. Nao e modal: nao escurece nem trava a tela. */
.av-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 70;
  right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; gap: 9px;
  min-height: 48px; padding: 0 20px;
  border: 2px solid transparent; border-radius: 999px;
  background: var(--navy); color: #fff;
  font: inherit; font-size: 13.5px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(21, 66, 154, .22), 0 16px 40px rgba(21, 66, 154, .22);
  transition: transform .12s, background .15s;
}
.av-fab:hover, .av-fab:focus-visible { background: var(--navy-dark); transform: translateY(-1px); }
.av-fab.is-open { background: #fff; color: var(--navy); border-color: var(--navy); }
.av-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); flex: none; box-shadow: 0 0 0 0 rgba(229, 69, 44, .55); animation: mon-pulse 1.8s ease-out infinite; }
@media (prefers-reduced-motion: reduce) { .av-dot { animation: none; } }

.av-panel {
  position: fixed; right: 20px; bottom: 84px; z-index: 70;
  right: max(20px, env(safe-area-inset-right)); bottom: calc(84px + env(safe-area-inset-bottom));
  width: min(420px, calc(100vw - 24px)); max-height: min(78vh, 680px);
  display: flex; flex-direction: column;
  background: #fff; border-radius: 22px; overflow: hidden;
  box-shadow: 0 6px 16px rgba(21, 66, 154, .14), 0 22px 56px rgba(21, 66, 154, .26);
  animation: promo-in .25s cubic-bezier(.2, .8, .2, 1) both;
}
.av-panel[hidden] { display: none; }
.av-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px 10px 18px; background: var(--navy); color: #fff; }
.av-title { display: inline-flex; align-items: center; gap: 9px; margin: 0; font-size: 16px; color: #fff; }
.av-close {
  width: 34px; height: 34px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .55); background: transparent; color: #fff;
  font: inherit; font-size: 22px; font-weight: 700; line-height: 1;
  display: grid; place-items: center; cursor: pointer;
}
.av-close:hover, .av-close:focus-visible { background: rgba(255, 255, 255, .16); border-color: #fff; }
.av-body { overflow-y: auto; overscroll-behavior: contain; background: #eceef2; }
.av-note { margin: 0; padding: 28px 18px; text-align: center; color: var(--muted); }

/* o monitor dentro do painel: sempre uma coluna (as regras de 900 px olham a janela, nao o painel) */
.av-body .mon { max-width: none; margin: 0; border-radius: 0; grid-template-columns: minmax(0, 1fr); padding: 12px; gap: 12px; }
.av-body .mon-sales, .av-body .mon-metrics, .av-body .mon-products, .av-body .mon-tabbar { grid-column: auto; grid-row: auto; }
.av-body .mon-tabbar { margin: 0 -12px -12px; padding: 4px 12px 8px; border-radius: 0; }

@media (max-width: 560px) {
  .av-panel { left: 8px; right: 8px; width: auto; max-height: calc(100vh - 150px); }
}
@media print { .av-fab, .av-panel { display: none; } }

/* Seletor de pais do painel (Brasil | Reino Unido): botoes lado a lado, o ativo preenchido. */
.pais-switch { display: inline-flex; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.pais-switch a {
  font-size: 13px; font-weight: 700; line-height: 1; padding: 7px 14px; border-radius: 999px;
  color: var(--navy); text-decoration: none;
}
.pais-switch a:hover, .pais-switch a:focus-visible { background: rgba(0, 0, 0, .06); }
.pais-switch a.on { background: var(--navy); color: #fff; cursor: default; }
.pais-switch a .tiny { opacity: .8; font-weight: 600; }
.finance-table th, .finance-table td { white-space: nowrap; }
.an-pais { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }


/* Assistente do painel (static/js/assistant.js): chat, mobile primeiro. */
.as-layout { display: grid; gap: 14px; margin-top: 12px; }
.as-side .as-history > summary { cursor: pointer; font-weight: 700; padding: 6px 2px; }
.as-history ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; max-height: 240px; overflow: auto; }
.as-history li a { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.as-history li.on a, .as-history li a:hover { background: var(--blue-soft); }
.as-h-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.as-main { display: grid; gap: 12px; min-width: 0; }
.as-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.as-inline { display: inline; }
.as-link { background: none; border: 0; padding: 0; color: var(--blue); cursor: pointer; font: inherit; text-decoration: underline; }
.as-thread { display: grid; gap: 12px; min-height: 180px; }
.as-empty { text-align: center; padding: 28px 12px; color: var(--ink-2); }
.as-msg { display: flex; }
.as-user { justify-content: flex-end; }
.as-bubble { max-width: min(100%, 760px); padding: 12px 14px; border-radius: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.as-user .as-bubble { background: var(--navy); color: #fff; border-bottom-right-radius: 4px; }
.as-assistant .as-bubble { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; width: 100%; }
.as-md > :first-child { margin-top: 0; }
.as-md > :last-child { margin-bottom: 0; }
.as-md h3, .as-md h4, .as-md h5 { margin: 14px 0 6px; font-size: 16px; }
.as-md p { margin: 8px 0; }
.as-md ul, .as-md ol { margin: 8px 0; padding-left: 22px; }
.as-md blockquote { margin: 8px 0; padding: 6px 12px; border-left: 3px solid var(--line); color: var(--ink-2); }
.as-md code { background: var(--blue-soft); padding: 1px 5px; border-radius: 5px; font-size: .92em; }
.as-md pre { background: #0b2456; color: #fff; padding: 10px 12px; border-radius: 10px; overflow: auto; }
.as-md pre code { background: none; padding: 0; }
.as-table { overflow-x: auto; margin: 8px 0; }
.as-table table { border-collapse: collapse; font-size: 14px; min-width: 100%; }
.as-table th, .as-table td { border: 1px solid var(--line); padding: 6px 9px; text-align: left; white-space: nowrap; }
.as-table th { background: var(--blue-soft); }
.as-tools { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.as-tools li { font-size: 12px; background: var(--blue-soft); color: var(--navy); padding: 3px 9px; border-radius: 999px; }
.as-tools li.running { opacity: .7; }
.as-tools li.error { background: var(--red-soft); color: var(--red); }
.as-thinking { animation: as-pulse 1.2s ease-in-out infinite; }
@keyframes as-pulse { 50% { opacity: .45; } }
.as-error { color: var(--red); font-weight: 600; }
.as-usage { margin: 8px 0 0; }
.as-quick { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
.as-chip { flex: 0 0 auto; border: 1px solid var(--line); background: #fff; color: var(--navy); border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 14px; cursor: pointer; min-height: 40px; }
.as-chip:hover { background: var(--blue-soft); }
.as-composer { position: sticky; bottom: 0; display: flex; gap: 8px; align-items: flex-end; padding: 10px 0 calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--bg, #fff); }
.as-composer textarea { flex: 1; resize: none; min-height: 48px; max-height: 180px; border: 2px solid var(--line); border-radius: 14px; padding: 12px 14px; font: inherit; font-size: 16px; }
.as-composer .btn { min-height: 48px; }
.as-foot { margin: 0; }
@media (min-width: 900px) {
  .as-layout { grid-template-columns: 260px minmax(0, 1fr); align-items: start; }
  .as-history ul { max-height: 60vh; }
}

.as-provider { display: flex; gap: 14px; border: 0; margin: 0; padding: 0 0 6px; flex: 0 0 100%; }
.as-provider label { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 600; cursor: pointer; min-height: 32px; }
.as-composer { flex-wrap: wrap; }

/* Linha extra do monitor Ao vivo: downloads de atividades gratis de hoje. */
.mon-note { margin: 4px 4px 0; font-size: 13px; color: var(--mon-ink, var(--ink-2)); }

/* Depoimentos na pagina do produto (templates/catalog/_depoimentos.html) e o formulario /depoimento/ (templates/catalog/testimonial_form.html). */
.pdp-proof { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.pdp-proof h2 { margin-bottom: 12px; }
.pdp-proof-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 720px) { .pdp-proof-list { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } }
.pdp-proof-item { margin: 0; padding: 14px 16px; background: var(--bg-alt); border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: var(--radius); }
.pdp-proof-item blockquote { margin: 0; }
.pdp-proof-item blockquote p { margin: 0; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.pdp-proof-by { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.testimonial-card { max-width: 640px; margin: 24px auto; }
.testimonial-row { margin-top: 14px; }
.testimonial-row label { display: block; margin-bottom: 6px; font-weight: 600; }
.testimonial-consent label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 14px; line-height: 1.45; }
.testimonial-consent input { flex: none; width: 22px; height: 22px; margin-top: 2px; }
.testimonial-form .btn { margin-top: 16px; }
.testimonial-form textarea.field { resize: vertical; }
.testimonial-trap { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.testimonial-form .field-error { margin: 6px 0 0; color: #b3261e; font-size: 14px; }
.st-skipped { background: var(--muted, #8a8f98); }

/* Landing do Combo (/combo/): hero com preco e botao verde, previa rolavel, passos, o que vem dentro e botao fixo no rodape do celular. */
.combo { max-width: 720px; margin: 0 auto; padding-bottom: 24px; }
.combo-hero { text-align: center; }
.combo-hero h1 { margin: 0 0 12px; font-size: 1.45rem; line-height: 1.18; font-weight: 800; color: var(--navy); }
@media (max-width: 480px) { .combo-hero { padding: 16px 14px; } }
/* Carrossel das paginas do PDF (static/js/combo-carousel.js): 3 paginas a vista, passa sozinho assim que a pagina abre */
.combo-carousel { margin: 0 -2px 14px; }
.combo-carousel-track { display: flex; gap: 10px; margin: 0; padding: 6px 4px 10px; list-style: none; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.combo-carousel-track::-webkit-scrollbar { display: none; }
.combo-carousel-track li { flex: 0 0 calc((100% - 20px) / 3); scroll-snap-align: start; }  /* exatamente 3 paginas a vista, como no desenho */
.combo-carousel-track img { display: block; width: 100%; height: auto; border-radius: 10px; background: #fff; border: 1px solid var(--line); box-shadow: 0 3px 10px rgba(11, 36, 86, .14); }
.combo-carousel-dots { display: flex; justify-content: center; gap: 8px; min-height: 10px; margin-top: 2px; }
.combo-carousel-dot { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%; background: #c7ceda; transition: background .2s; }
.combo-carousel-dot.on { background: #5b6478; }
.combo-checks { margin: 0 0 14px; padding: 0; list-style: none; display: grid; gap: 7px; text-align: left; }
.combo-checks li { position: relative; padding-left: 25px; font-size: .84rem; line-height: 1.35; color: var(--ink); }
.combo-checks li::before { content: ""; position: absolute; left: 0; top: 1px; width: 17px; height: 17px; background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232e9e4f' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5l5 5L20 6.5'/%3E%3C/svg%3E"); }
/* Preco como no desenho: "De R$ 160,00 / por apenas" a esquerda, o preco grande a direita e a etiqueta embaixo do preco */
.combo-price-row { display: flex; align-items: flex-end; justify-content: center; gap: 12px; margin: 6px 0 14px; text-align: left; }
.combo-from { display: flex; flex-direction: column; padding-bottom: 5px; color: #6b7388; font-size: .8rem; line-height: 1.25; white-space: nowrap; }
.combo-from s { font-weight: 600; }
.combo-price-col { display: flex; flex-direction: column; align-items: flex-start; }
.combo-price-now { font-size: 2rem; line-height: 1.05; font-weight: 800; color: var(--navy); }
.combo-price-note { margin: 6px 0 0; padding: 3px 11px; border-radius: 999px; background: #dff0fb; color: var(--navy); font-size: .78rem; font-weight: 600; white-space: nowrap; }
/* O botao do Combo: verde, de ponta a ponta, em maiusculas */
.combo-hero .pdp-download { width: 100%; padding: 15px 18px; font-size: 1rem; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; border-radius: 999px; }
.js .buy-phone-collapsed { display: none; }  /* o WhatsApp aparece no 1o toque no botao (static/js/buy-phone.js); sem JavaScript ele ja vem aberto */
/* Landing do Combo: so o logo no topo (sem barra de aviso, busca, menu, conta nem categorias), como no desenho */
body:has(#combo, #landing-atividade) .topbar, body:has(#combo, #landing-atividade) .searchbar, body:has(#combo, #landing-atividade) .user-menu, body:has(#combo, #landing-atividade) nav.nav { display: none; }
body:has(#combo, #landing-atividade) .header-inner { justify-content: center; }
.combo-gallery h2 { margin: 0 0 12px; text-align: center; font-size: 1.15rem; color: var(--navy); }
.combo-gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 0; padding: 0; list-style: none; }
.combo-gallery-grid img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); background: #fff; box-shadow: 0 3px 10px rgba(11, 36, 86, .12); }
@media (min-width: 640px) { .combo-gallery-grid { grid-template-columns: repeat(4, 1fr); } }
@media (prefers-reduced-motion: reduce) { .combo-carousel-dot { transition: none; } }
.combo-kicker { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--green); }
.combo-hero h1 { margin: 0 0 8px; font-size: 1.55rem; line-height: 1.2; color: var(--navy); }
.combo-sub { margin: 0 0 14px; color: #44506a; }
.combo-facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 14px; padding: 0; list-style: none; }
.combo-facts li { padding: 6px 12px; border-radius: 999px; background: #eef6f0; font-size: 13px; }
.combo-price { margin: 0 0 12px; display: flex; flex-direction: column; align-items: center; }
.combo-price strong { font-size: 2.1rem; line-height: 1.1; color: var(--navy); }
.combo-note { margin-top: 10px; }
.combo-section { margin-top: 26px; }
.combo-section h2 { margin: 0 0 6px; font-size: 1.15rem; color: var(--navy); }
.combo-steps { margin: 8px 0 0; padding: 0; list-style: none; counter-reset: passo; display: grid; gap: 10px; }
.combo-steps li { counter-increment: passo; display: grid; grid-template-columns: 34px 1fr; column-gap: 12px; align-items: start; }
.combo-steps li::before { content: counter(passo); grid-row: 1 / 3; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--green); color: #fff; font-weight: 700; }
.combo-steps strong { color: var(--navy); }
.combo-steps span { color: #44506a; font-size: 14px; }
.combo-group { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin-top: 8px; background: #fff; }
.combo-group summary { cursor: pointer; font-weight: 600; color: var(--navy); }
.combo-group ul { margin: 8px 0 0; padding-left: 18px; columns: 1; }
.combo-group p { margin: 8px 0 0; color: #44506a; }
.combo-final { max-width: 420px; margin-left: auto; margin-right: auto; }
.combo-sticky { display: none; }
@media (max-width: 760px) {
  .combo { padding-bottom: 88px; }  /* espaco para o botao fixo */
  .combo-sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 14px rgba(0, 0, 0, .08); }
  .combo-sticky-price { font-size: 1.25rem; font-weight: 700; color: var(--navy); }
  .combo-sticky .btn { flex: 1; max-width: 220px; }
  .combo-sticky.combo-sticky-off { transform: translateY(110%); pointer-events: none; }
  .combo-sticky { transition: transform .2s ease; }
}

/* ---------- WhatsApp: conversas (atualizacao sem recarregar) ---------- */
.chat-thread-wrap { position: relative; }
.chat-new-pill {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  border: 0; border-radius: 999px; padding: 7px 16px; background: var(--navy, #12348a); color: #fff;
  font-size: 12.5px; font-weight: 700; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); cursor: pointer;
}
.chat-new-pill[hidden] { display: none; }

/* "O que voce recebe" e "Quem faz e como" (pagina da atividade paga). A garantia de 7 dias saiu em 08/11/2026. */
.pdp-gets, .pdp-maker { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 20px; }
.pdp-gets ul, .pdp-maker ul { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.pdp-peek { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 20px; }
.pdp-peek ul { list-style: none; margin: 10px 0 0; padding: 0 0 6px; display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; }
.pdp-peek li { flex: none; width: 150px; scroll-snap-align: start; }
.pdp-peek img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: zoom-in; }
.in-app-notice { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--yellow-soft); line-height: 1.45; font-size: 13px; }

/* Landing publica do programa de afiliados (/afiliados/) */
.aff-hero { text-align: center; padding: 28px 20px; }
.aff-hero h1 { font-size: 1.7rem; line-height: 1.25; margin: 10px 0; }
.aff-lead { max-width: 640px; margin: 0 auto 16px; color: var(--ink-2); }
.aff-section { margin-top: 28px; }
.aff-steps, .aff-rules { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 10px; }
.aff-steps li span { display: block; color: var(--ink-2); }
.aff-kit { display: grid; gap: 12px; margin-top: 12px; }
.aff-text { white-space: pre-line; font-size: 14px; }
.aff-section details { margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.aff-section summary { font-weight: 700; cursor: pointer; }

/* Portas de entrada (/para-familias/, /para-escolas/, /para-terapeutas/) */
.aud-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.aud-tabs a { padding: 8px 16px; border-radius: 999px; border: 2px solid var(--line); font-weight: 700; font-size: 14px; color: var(--navy); }
.aud-tabs a.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.aud-hero { padding: 26px 20px; }
.aud-hero h1 { font-size: 1.6rem; line-height: 1.25; margin: 10px 0; }
.aud-lead { color: var(--ink-2); max-width: 680px; }
.aud-points { display: grid; gap: 12px; margin-top: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.aud-section { margin-top: 26px; }
.aud-cta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.aud-cta p:first-child { flex: 1 1 100%; margin: 0; }
.aud-doors { margin-top: 26px; }
.aud-door { display: block; color: inherit; transition: transform .15s; }
.aud-door:hover { transform: translateY(-2px); }
.aud-door h3 { color: var(--navy); margin: 0 0 4px; }

/* Oferta da trilha no carrinho (venda adicional) */
.cart-bump { margin-top: 16px; background: var(--yellow-soft); border: 1px solid #f0dca0; }
.cart-bump p { margin: 0 0 6px; }

/* Amostra de 3 paginas em troca do e-mail (pagina da atividade paga) */
.pdp-sample { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 20px; }
.pdp-sample-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.pdp-sample-row .field { flex: 1 1 220px; min-width: 0; }
.pdp-sample-consent { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; line-height: 1.4; }
.combo-license { margin: 8px 0 12px; line-height: 1.4; }

/* Checkout simples (Brasil, Pix) no celular: sem busca nem menu de categorias e com o botao Gerar Pix fixo, junto do total */
.checkout-produto { margin: 0 0 12px; color: var(--muted); }
@media (max-width: 760px) {
  body.checkout-enxuto .searchbar, body.checkout-enxuto .nav { display: none; }
  body.checkout-enxuto main { padding-bottom: 88px; }  /* espaco para o botao fixo */
  body.checkout-enxuto .av-fab { bottom: calc(84px + env(safe-area-inset-bottom)); }  /* o botao "Ao vivo" (so do administrador) nao cobre o Gerar Pix */
  body.checkout-enxuto .av-panel { bottom: calc(148px + env(safe-area-inset-bottom)); }
}

/* Cadastro: aviso de que o e-mail ou WhatsApp digitado já tem conta (static/js/signup-check.js). Informativo (azul), nunca vermelho. */
.signup-exists { margin: 6px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--blue-soft); border: 1px solid var(--blue); font-size: .85rem; line-height: 1.45; color: var(--ink); }
.signup-exists a { font-weight: 700; text-decoration: underline; }
/* Cadastro que voltou com erro: aviso no topo do formulário (a tela rola até o campo: static/js/signup-errors.js). */
.form-alert { margin: 0 0 16px; padding: 10px 14px; border-radius: 10px; background: var(--red-soft); border: 1px solid var(--danger); font-size: .9rem; line-height: 1.45; color: var(--ink); }
.form-alert p { margin: 0; }
.form-alert .errorlist { margin: 0; }
/* Cadastro: as duas senhas digitadas são diferentes (static/js/signup-password.js). */
.pw-mismatch { margin: 6px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--red-soft); border: 1px solid var(--danger); font-size: .85rem; font-weight: 600; line-height: 1.45; color: var(--danger); }

/* ---------- Funil de vendas: o quadro das pessoas por etapa (Analytics > Vendas e clientes) ----------
   Uma faixa de colunas que rola de lado; cada coluna tem o seu topo colorido e os cards das pessoas daquela etapa.
   As cores dos topos sao as mesmas barras do funil (.an-funnel-bar.st-N), para as duas telas falarem a mesma lingua. */
.fv-board { display: flex; gap: 12px; margin: 14px 0 0; padding: 0 0 10px; list-style: none; overflow-x: auto; scroll-snap-type: x proximity; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.fv-board > li { flex: 0 0 min(92%, 260px); height: clamp(420px, 72vh, 660px); scroll-snap-align: start; display: flex; flex-direction: column; min-width: 0; }  /* altura fixa: o quadro nao cresce com a quantidade de cards */
.fv-col { display: flex; flex-direction: column; height: 100%; min-height: 0; border: 2px solid var(--line); border-radius: 12px; background: var(--bg-alt); overflow: hidden; }
.fv-col-head { flex: none; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.fv-col-head.st-0 { background: #cfe0fb; } .fv-col-head.st-1 { background: #b6d0f7; }
.fv-col-head.st-2 { background: #9bbcf2; } .fv-col-head.st-3 { background: #7ea8ec; }
.fv-col-head.st-4 { background: #f5d77f; } .fv-col-head.st-5 { background: #9fdcb0; }
.fv-col-head.st-6 { background: #62c585; } .fv-col-head.st-7 { background: #3fae68; }
.fv-col-title { display: flex; gap: 8px; align-items: baseline; justify-content: space-between; margin: 0; font-size: 14px; font-weight: 800; color: var(--navy-deep); }
.fv-col-title strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.fv-col-what { margin: 4px 0 0; font-size: 11px; line-height: 1.4; color: #2b3a52; }
/* So a lista rola, por dentro da coluna; chegar ao fim dela nao arrasta a pagina junto (overscroll-behavior). */
.fv-col-body { flex: 1 1 0; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.fv-col-body:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.fv-cards { margin: 0; padding: 10px; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.fv-cards:empty { display: none; }
.fv-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; }
.fv-card-name { display: block; font-size: 13px; font-weight: 700; color: var(--navy-dark); overflow-wrap: anywhere; }
a.fv-card-name:hover { text-decoration: underline; }
.fv-card-line { margin: 3px 0 0; font-size: 11px; line-height: 1.45; color: var(--ink-2); overflow-wrap: anywhere; }
.fv-card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.fv-tag { padding: 1px 7px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-alt); font-size: 10px; font-weight: 700; color: var(--ink-2); }
.fv-tag.money { background: var(--green-soft); border-color: #b9dcc4; color: #1f6d37; }
.fv-tag.quiet { background: var(--yellow-soft); border-color: #f0d68a; color: #7a5600; }
.fv-col-empty { margin: 0; padding: 14px 10px; font-size: 12px; color: var(--muted); text-align: center; }
.fv-col-more { margin: 0; padding: 0 10px 10px; font-size: 11px; }
.fv-note { flex: none; border-bottom: 1px solid var(--line); background: var(--surface); }
.fv-note > summary { padding: 6px 12px; font-size: 11px; font-weight: 700; color: var(--navy); cursor: pointer; }
.fv-note-body { max-height: 170px; overflow-y: auto; overscroll-behavior-y: contain; }
.fv-msg { margin: 0; padding: 8px 10px; border-top: 1px dashed var(--line); font-size: 11px; line-height: 1.45; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface); }
.fv-hint { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
@media (min-width: 900px) { .fv-board > li { flex: 0 0 248px; } }
.fv-card-path { color: var(--navy-dark); font-weight: 600; }
/* O olho do card e a janela com o historico da pessoa (static/js/jornada.js). */
.fv-card-top { display: flex; align-items: center; gap: 7px; }
.fv-card-top .fv-card-name { flex: 1; min-width: 0; }
.fv-avatar { position: relative; flex: none; display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; overflow: hidden; background: var(--bg-alt); color: var(--muted); }
.fv-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fv-ver { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin: 0 -5px 0 0; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--blue-soft); color: var(--navy); cursor: pointer; }
.fv-ver:hover { border-color: var(--blue); }
.fv-ver:focus-visible, .jr-modal-fechar:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
@media (pointer: coarse) { .fv-ver { width: 36px; height: 44px; } }
html:has(.jr-modal[open]) { overflow: hidden; }
.jr-modal { width: min(960px, calc(100% - 32px)); max-width: none; height: min(88vh, 900px); height: min(88dvh, 900px); max-height: none; padding: 0; border: 0; border-radius: 14px; background: var(--bg-alt); color: inherit; overflow: hidden; }
.jr-modal::backdrop { background: rgba(11, 36, 86, .6); }
.jr-modal-card { display: flex; flex-direction: column; height: 100%; }
.jr-modal-topo { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
.jr-modal-topo > div { flex: 1; min-width: 0; }
.jr-modal-topo .fv-avatar { width: 52px; height: 52px; }
.jr-modal-topo h2 { margin: 2px 0 0; font-size: 18px; overflow-wrap: anywhere; }
.jr-modal-fechar { flex: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 26px; line-height: 1; color: var(--navy); cursor: pointer; }
.jr-modal-corpo { flex: 1 1 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 14px 16px 24px; }
.jr-modal-corpo [data-jr-modal-aviso]:empty { display: none; }
.jr-modal-acoes { flex-wrap: wrap; margin-bottom: 12px; }
.jr-resumo { margin-bottom: 12px; }
.jr-resumo h3 { margin: 0 0 4px; font-size: 14px; }
.jr-resumo p { margin: 3px 0 0; overflow-wrap: anywhere; }
/* Os cartoes da pessoa ficam menores dentro da janela: no celular, dois por linha sem passar da largura. */
.jr-modal .card { padding: 14px; }
.jr-modal .kpi-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 0 0 12px; }
.jr-modal .kpi { min-width: 0; padding: 10px 12px; overflow-wrap: anywhere; }
.jr-modal .kpi-value { font-size: 1.2rem; }
@media (max-width: 640px) { .jr-modal .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .jr-modal { width: 100%; height: 100%; height: 100dvh; margin: 0; border-radius: 0; } .jr-modal-corpo { padding: 12px 10px 24px; } }
/* O card que acabou de mudar de coluna se destaca por um instante (so a borda: nada se mexe de lugar). */
.fv-card.fv-chegou { animation: fv-chegou 2.4s ease-out; }
@keyframes fv-chegou { 0%, 35% { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); } 100% { border-color: var(--line); box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .fv-card.fv-chegou { animation: none; border-color: var(--blue); } }
/* Tabelas da Jornada: titulo que ordena e barra de paginacao (static/js/jornada.js) */
.jr-th { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; text-align: inherit; cursor: pointer; }
.jr-th:hover { text-decoration: underline; }
.jr-th::after { content: "↕"; opacity: .35; font-size: 11px; }
[aria-sort="ascending"] > .jr-th::after { content: "▲"; opacity: 1; }
[aria-sort="descending"] > .jr-th::after { content: "▼"; opacity: 1; }
.an-table tr[hidden] { display: none; }
.jr-acao { min-width: 240px; }  /* o conselho e longo: espremido, esticava a linha inteira */
.jr-barra { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 10px 0; }
.jr-por { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.jr-por .field { width: auto; margin: 0; padding-top: 4px; padding-bottom: 4px; }
.jr-paginas { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.jr-barra .btn[disabled] { opacity: .45; cursor: default; }
.fv-next { margin: 0; padding: 7px 10px; border-top: 1px dashed var(--line); background: var(--blue-soft); font-size: 11px; line-height: 1.45; color: #1b3a63; }
/* Ficha de cada etapa da Jornada (objetivo, o que se espera, exclusões, quando para) */
.fv-ficha { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 0 0 6px; padding: 7px 10px; border-left: 3px solid var(--line); background: var(--bg-alt); border-radius: 0 8px 8px 0; }
.fv-ficha dt { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); white-space: nowrap; }
.fv-ficha dd { margin: 0; font-size: 11px; line-height: 1.45; color: var(--ink-2); }
