:root {
  --tinta: #1a1a2e;
  --tinta-2: #12121f;
  --rosa: #e11d48;
  --roxo: #9333ea;
  --degrade: linear-gradient(90deg, #e11d48 0%, #c026d3 55%, #9333ea 100%);
  --fundo: #f8fafc;
  --cartao: #ffffff;
  --borda: #e9edf3;
  --titulo: #1a1c2e;
  --texto: #475569;
  --suave: #94a3b8;
  --chip: #fff1f2;
  --verde: #16a34a;
  --sombra: 0 1px 2px rgba(26, 28, 46, .04), 0 12px 32px -16px rgba(26, 28, 46, .14);
  --raio: 16px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  font-family: Inter, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--texto);
  background: #e9edf3;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
h1, h2, h3, p { margin: 0; }
img { display: block; max-width: 100%; }
.degrade { background: var(--degrade); -webkit-background-clip: text; background-clip: text; color: transparent; }

.app {
  position: relative;
  max-width: 480px;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--fundo);
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
}

/* Topo */
.topo {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 20px;
  background: var(--tinta-2);
  color: #fff;
}
.topo__marca { font-weight: 800; font-size: 17px; letter-spacing: -.02em; }
.topo__marca .degrade { background: linear-gradient(90deg, #fb7185, #e879f9 55%, #c084fc); -webkit-background-clip: text; background-clip: text; }
.topo__modo {
  font-size: 12px; font-weight: 600; color: #cbd5e1;
  padding: 8px 12px; min-height: 36px;
  border: 1px solid rgba(255,255,255,.18); border-radius: 999px;
  transition: background .2s, color .2s;
}
.topo__modo[aria-pressed="true"] { background: var(--degrade); color: #fff; border-color: transparent; }

.aviso-exemplo {
  margin: 12px 20px 0; padding: 8px 12px;
  font-size: 12px; color: #92400e; background: #fef3c7; border-radius: 10px;
}

main { padding: 20px; }
.titulo { font-size: 24px; line-height: 1.2; font-weight: 800; letter-spacing: -.02em; color: var(--titulo); }
.sub { margin-top: 4px; font-size: 14px; }
.secao { margin-top: 28px; }
.secao__t { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.secao__t h2 { font-size: 17px; font-weight: 700; color: var(--titulo); letter-spacing: -.01em; }
.secao__t button { font-size: 13px; font-weight: 600; color: var(--rosa); min-height: 32px; }

/* Cartões */
.cartao {
  background: var(--cartao); border: 1px solid var(--borda); border-radius: var(--raio);
  box-shadow: var(--sombra);
}

/* Feed */
.post { padding: 16px; margin-top: 12px; }
.post__cab { display: flex; align-items: center; gap: 10px; }
.avatar {
  flex: 0 0 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--degrade); color: #fff; font-weight: 700; font-size: 14px;
}
.post__quem { font-weight: 600; color: var(--titulo); font-size: 14px; line-height: 1.2; }
.post__quando { font-size: 12px; color: var(--suave); }
.post__tipo { margin-left: auto; }
.post h3 { margin-top: 12px; font-size: 16px; font-weight: 700; color: var(--titulo); letter-spacing: -.01em; }
.post p { margin-top: 6px; }
.post__acao {
  margin-top: 12px; width: 100%; min-height: 44px;
  border-radius: 12px; background: var(--chip); color: var(--rosa); font-weight: 600; font-size: 14px;
}
.post__apagar { margin-top: 10px; font-size: 12px; color: var(--suave); text-decoration: underline; min-height: 32px; }

.selo {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
  background: var(--chip); color: var(--rosa);
}
.selo--premium { background: var(--degrade); color: #fff; }
.selo--novo { background: #dcfce7; color: #166534; }
.selo--cinza { background: #f1f5f9; color: #475569; }

/* Resumo início */
.resumo { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.resumo button { padding: 14px 8px; text-align: center; }
.resumo strong { display: block; font-size: 22px; font-weight: 800; color: var(--titulo); letter-spacing: -.02em; }
.resumo span { font-size: 12px; }

/* Busca e filtros */
.busca {
  display: flex; align-items: center; gap: 10px;
  margin-top: 16px; padding: 0 14px; height: 48px;
  background: #fff; border: 1px solid var(--borda); border-radius: 14px;
}
.busca:focus-within { border-color: var(--rosa); box-shadow: 0 0 0 3px rgba(225, 29, 72, .12); }
.busca svg { flex: 0 0 18px; color: var(--suave); }
.busca input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 16px; }

.chips { display: flex; gap: 8px; margin: 14px -20px 0; padding: 0 20px 4px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; padding: 0 14px; height: 36px; border-radius: 999px;
  background: #fff; border: 1px solid var(--borda);
  font-size: 13px; font-weight: 500; white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s;
}
.chip.ativo { background: var(--tinta); border-color: var(--tinta); color: #fff; }
.chip--premium.ativo { background: var(--degrade); border-color: transparent; }
.contagem { margin-top: 14px; font-size: 13px; color: var(--suave); }

/* Lista de fornecedores */
.forn {
  display: flex; align-items: center; gap: 12px;
  width: 100%; margin-top: 10px; padding: 14px; text-align: left;
  transition: transform .15s, box-shadow .2s;
}
.forn:active { transform: scale(.985); }
.forn__ini {
  flex: 0 0 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  background: #f1f5f9; color: var(--titulo); font-weight: 700; font-size: 15px;
}
.forn--premium .forn__ini { background: var(--degrade); color: #fff; }
.forn__meio { flex: 1; min-width: 0; }
.forn__nome { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--titulo); font-size: 15px; }
.forn__nome span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.forn__info { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.forn__pos { flex: 0 0 26px; font-size: 18px; font-weight: 800; color: var(--suave); text-align: center; }
.salvar { flex: 0 0 40px; height: 40px; display: grid; place-items: center; color: #cbd5e1; border-radius: 10px; }
.salvar svg { width: 22px; height: 22px; }
.salvar.ativo { color: var(--rosa); }
.salvar.ativo svg { fill: currentColor; }

.vazio { margin-top: 32px; padding: 32px 20px; text-align: center; }
.vazio strong { display: block; color: var(--titulo); font-size: 16px; margin-bottom: 4px; }

/* Bônus */
.bonus { display: flex; gap: 14px; align-items: center; width: 100%; margin-top: 10px; padding: 12px; text-align: left; }
.bonus img { flex: 0 0 76px; width: 76px; height: 76px; object-fit: cover; border-radius: 12px; }
.bonus small { font-size: 12px; font-weight: 600; color: var(--rosa); }
.bonus h3 { font-size: 15px; font-weight: 700; color: var(--titulo); line-height: 1.3; }
.bonus p { font-size: 13px; margin-top: 2px; }

/* Abas */
.abas {
  position: fixed; left: 50%; bottom: 0; z-index: 30;
  transform: translateX(-50%);
  width: 100%; max-width: 480px;
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  background: #fff; border-top: 1px solid var(--borda);
}
.abas button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 56px; border-radius: 12px;
  font-size: 11px; font-weight: 500; color: var(--suave);
  transition: color .2s;
}
.abas svg { width: 22px; height: 22px; }
.abas button.ativo { color: var(--rosa); font-weight: 700; }

.fab {
  position: fixed; z-index: 31;
  right: max(20px, calc(50% - 220px)); bottom: calc(88px + env(safe-area-inset-bottom));
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--degrade); color: #fff;
  box-shadow: 0 12px 24px -8px rgba(192, 38, 211, .6);
  transition: transform .15s;
}
.fab:active { transform: scale(.94); }
.fab[hidden] { display: none; }

/* Folha (ficha e formulários) */
.fundo-folha { position: fixed; inset: 0; z-index: 40; background: rgba(18, 18, 31, .55); animation: surge .2s; }
.folha {
  position: fixed; left: 50%; bottom: 0; z-index: 41;
  transform: translateX(-50%);
  width: 100%; max-width: 480px; max-height: 92dvh; overflow-y: auto;
  padding: 10px 20px calc(24px + env(safe-area-inset-bottom));
  background: #fff; border-radius: 24px 24px 0 0;
  animation: sobe .28s cubic-bezier(.2, .8, .2, 1);
}
.folha[hidden], .fundo-folha[hidden] { display: none; }
.folha__puxa { width: 40px; height: 4px; border-radius: 4px; background: #e2e8f0; margin: 0 auto 14px; }
.folha__cab { display: flex; align-items: flex-start; gap: 12px; }
.folha__cab .forn__ini { flex-basis: 52px; height: 52px; font-size: 17px; border-radius: 14px; }
.folha h2 { font-size: 20px; font-weight: 800; color: var(--titulo); letter-spacing: -.02em; line-height: 1.2; }
.folha__selos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.fechar { margin-left: auto; flex: 0 0 40px; height: 40px; border-radius: 50%; background: #f1f5f9; display: grid; place-items: center; color: var(--texto); }

.campos { margin-top: 18px; border: 1px solid var(--borda); border-radius: 14px; }
.campo { display: flex; justify-content: space-between; gap: 16px; padding: 12px 14px; font-size: 14px; }
.campo + .campo { border-top: 1px solid var(--borda); }
.campo span:first-child { color: var(--suave); flex: 0 0 auto; }
.campo span:last-child { color: var(--titulo); font-weight: 600; text-align: right; }

.nota { margin-top: 14px; padding: 14px; border-radius: 14px; background: linear-gradient(135deg, #fff1f2, #faf5ff); }
.nota__t { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--titulo); }
.nota__n { font-size: 20px; font-weight: 800; }
.nota p { margin-top: 6px; font-size: 14px; }
.nota--travada { background: #f8fafc; }

.botoes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 16px; border-radius: 14px;
  font-weight: 700; font-size: 15px; white-space: nowrap; text-decoration: none;
  transition: transform .15s, filter .2s;
}
.btn:active { transform: scale(.97); }
.btn--zap { background: var(--verde); color: #fff; }
.btn--linha { background: #fff; border: 1px solid var(--borda); color: var(--titulo); }
.btn--cheio { background: var(--degrade); color: #fff; width: 100%; margin-top: 18px; }
.btn--largo { grid-column: 1 / -1; }
.link-suave { display: block; width: 100%; margin-top: 14px; min-height: 36px; font-size: 13px; color: var(--suave); text-decoration: underline; text-align: center; }

.minha-nota { margin-top: 18px; }
label.rotulo, .minha-nota label { display: block; font-size: 13px; font-weight: 600; color: var(--titulo); margin: 14px 0 6px; }
.entrada {
  width: 100%; min-height: 48px; padding: 12px 14px;
  border: 1px solid var(--borda); border-radius: 12px; background: #fff; font-size: 16px; outline: 0;
}
.entrada:focus { border-color: var(--rosa); box-shadow: 0 0 0 3px rgba(225, 29, 72, .12); }
textarea.entrada { min-height: 88px; resize: vertical; }
.dupla { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.liga { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding: 12px 14px; border: 1px solid var(--borda); border-radius: 12px; font-weight: 600; color: var(--titulo); font-size: 14px; }
.liga input { width: 22px; height: 22px; accent-color: var(--rosa); }
.erro { margin-top: 6px; font-size: 13px; color: #dc2626; }

.toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 50;
  transform: translateX(-50%);
  padding: 10px 16px; border-radius: 999px;
  background: var(--tinta); color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap;
  animation: surge .2s;
}
.toast[hidden] { display: none; }

@keyframes surge { from { opacity: 0; } }
@keyframes sobe { from { transform: translate(-50%, 100%); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
:focus-visible { outline: 2px solid var(--roxo); outline-offset: 2px; }

/* ---------- Cara da Preciosa: vinho, dourado e vermelho ---------- */
:root {
  --vinho: #3a0a12;
  --vinho-2: #2a060c;
  --ouro: #c9a25a;
  --ouro-claro: #ecd9a8;
  --rosa: #b3122e;
  --roxo: #b3122e;
  --degrade: linear-gradient(135deg, #b3122e 0%, #7a0f20 100%);
  --fundo: #faf6f1;
  --borda: #efe7dc;
  --titulo: #2a1216;
  --texto: #5c4a4c;
  --suave: #a39092;
  --chip: #fbeee9;
  --tinta: #3a0a12;
  --sombra: 0 1px 2px rgba(58, 10, 18, .04), 0 12px 32px -18px rgba(58, 10, 18, .22);
}
body { background: #e9e1d6; }
.titulo, .secao__t h2, .post h3, .folha h2, .bonus h3, .forn__nome, .resumo strong, .capa h1 { font-family: Jost, Inter, sans-serif; }

.topo {
  background: linear-gradient(180deg, #3a0a12, #2a060c);
  border-bottom: 1px solid rgba(201, 162, 90, .45);
  padding: 8px 20px;
}
.topo__marca { display: flex; align-items: center; gap: 10px; }
.topo__marca img { height: 44px; width: auto; }
.topo__marca span {
  padding-left: 10px; border-left: 1px solid rgba(201, 162, 90, .5);
  font-family: Jost, sans-serif; font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ouro-claro); white-space: nowrap;
}
.topo__modo { color: var(--ouro-claro); border-color: rgba(201, 162, 90, .45); font-size: 11px; padding: 6px 10px; white-space: nowrap; }
.topo__modo[aria-pressed="true"] { background: var(--ouro); color: var(--vinho-2); }

.capa {
  display: flex; align-items: center; gap: 14px;
  padding: 16px; border-radius: 20px;
  background: radial-gradient(120% 140% at 0% 0%, #5a1020 0%, #3a0a12 55%, #2a060c 100%);
  border: 1px solid rgba(201, 162, 90, .5);
  box-shadow: var(--sombra);
}
.capa img { flex: 0 0 64px; width: 64px; height: 64px; border-radius: 50%; border: 1px solid var(--ouro); }
.capa h1 { font-size: 20px; line-height: 1.2; font-weight: 600; color: #fff; letter-spacing: -.01em; }
.capa p { margin-top: 2px; font-size: 13px; color: var(--ouro-claro); }
.titulo--2 { margin-top: 28px; font-size: 19px; }
.titulo { font-weight: 700; }

.resumo strong { background: linear-gradient(135deg, #b3122e, #7a0f20); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 700; }

img.avatar { flex: 0 0 40px; width: 40px; height: 40px; object-fit: cover; border: 1px solid var(--ouro); background: var(--vinho); }

.selo--premium { background: var(--vinho); color: var(--ouro-claro); border: 1px solid rgba(201, 162, 90, .6); letter-spacing: .04em; }
.forn--premium { border-color: rgba(201, 162, 90, .55); }
.forn--premium .forn__ini { background: var(--vinho); color: var(--ouro-claro); border: 1px solid var(--ouro); }
.forn__ini { background: #f4ece2; }
.chip--premium.ativo { background: var(--vinho); color: var(--ouro-claro); border-color: var(--ouro); }
.selo--cinza { background: #f4ece2; color: #5c4a4c; }

.nota { background: linear-gradient(135deg, #3a0a12, #2a060c); border: 1px solid rgba(201, 162, 90, .5); }
.nota__t { color: var(--ouro-claro); }
.nota__n { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: var(--ouro); font-family: Jost, sans-serif; }
.nota p { color: #f3e7e2; }

.abas button.ativo { color: var(--rosa); }
.fab { box-shadow: 0 12px 24px -8px rgba(122, 15, 32, .65); border: 1px solid rgba(201, 162, 90, .6); }
.fechar { background: #f4ece2; }
.folha__puxa { background: #e6dbcd; }
.bonus small { color: var(--ouro); letter-spacing: .08em; text-transform: uppercase; font-size: 11px; }
.bonus img { border: 1px solid var(--borda); }
:focus-visible { outline-color: var(--ouro); }

/* ---------- Feed com foto, curtida e publicação de membros ---------- */
.post__foto { width: 100%; margin-top: 12px; border-radius: 14px; max-height: 420px; object-fit: cover; }
.post__foto[hidden] { display: none; }
.avatar--membro { flex: 0 0 40px; height: 40px; background: #f4ece2; color: var(--vinho); border: 1px solid var(--borda); }
.post__pe { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.curtir { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 10px 0 4px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--suave); }
.curtir svg { width: 22px; height: 22px; }
.curtir.ativo { color: var(--rosa); }
.curtir.ativo svg { fill: currentColor; }
.post__apagar { margin-top: 0; }
.foto-campo {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 14px; min-height: 52px; border: 1px dashed var(--ouro); border-radius: 12px;
  color: var(--vinho); font-weight: 600; font-size: 14px; cursor: pointer;
}

/* ---------- Aprovação de publicações ---------- */
.post--pendente { border-style: dashed; border-color: var(--ouro); background: #fffdf8; }
.post__espera { margin: 0 0 12px; padding: 6px 10px; border-radius: 8px; background: #fbf1d9; color: #7a5a12; font-size: 12px; font-weight: 600; }
.fila { margin-top: 16px; padding: 10px 14px; border-radius: 12px; background: var(--vinho); color: var(--ouro-claro); font-size: 13px; font-weight: 600; }
.btn--aprovar { background: var(--degrade); color: #fff; }

/* ---------- Modo captura (print para divulgação) ---------- */
.captura .topo__modo, .captura .minha-nota, .captura .link-suave { display: none; }
.captura .folha { animation: none; max-height: none; }
.captura .fundo-folha { animation: none; }
.captura .segredo, .captura .nota p { filter: blur(5px); user-select: none; }

/* ---------- Login e estados fora do app ---------- */
.abas[hidden] { display: none; }
.topo__modo[hidden] { display: none; }
.entrar { margin-top: 20px; padding: 20px; }
.entrar__msg { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: #fbf1d9; color: #7a5a12; font-size: 14px; }
.btn[disabled] { opacity: .6; pointer-events: none; }
span.btn { cursor: default; }

/* nome do fornecedor inteiro; selos descem para a linha de baixo se faltar espaço */
.forn__nome { flex-wrap: wrap; row-gap: 4px; }
.forn__nome span:first-child { white-space: normal; }
