:root {
  /* Marca LaLe (Canva): lilás #CB6CE6 e verde-água #5CE6DE. Tons mais escuros para botões com texto branco. */
  --lilas: #CB6CE6;
  --agua: #5CE6DE;
  --roxo: #9B3FBF;
  --roxo-claro: #F4E2FB;
  --rosa: #CB6CE6;
  --verde: #14998F;
  --verde-claro: #DDF8F6;
  --amarelo: #f59e0b;
  --amarelo-claro: #fef3c7;
  --vermelho: #dc2626;
  --vermelho-claro: #fee2e2;
  --azul: #2563eb;
  --azul-claro: #dbeafe;
  --texto: #3B1A52;
  --texto-suave: #6b5b85;
  --fundo: #FBF5FE;
  --cartao: #ffffff;
  --borda: #EED3F7;
  --sombra: 0 4px 0 rgba(155, 63, 191, .2);
  --raio: 22px;
  --fonte: 19px;
}
body.pequeno { --fonte: 22px; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: var(--fonte);
  color: var(--texto);
  background: var(--fundo);
  padding-bottom: 104px;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
body.pequeno .so-grande { display: none !important; }
body.grande .so-pequeno { display: none !important; }

/* Topo */
.topo {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px; background: var(--lilas); color: #fff;
  border-bottom: 4px solid var(--agua);
}
.perfil-atual {
  display: flex; align-items: center; gap: 10px; border: 0; background: rgba(255,255,255,.18);
  border-radius: 999px; padding: 6px 16px 6px 8px; color: #fff; font-weight: 800;
}
#avatar-atual { font-size: 1.6em; }
.topo-direita { display: flex; gap: 10px; align-items: center; }
.cofrinho-topo { background: rgba(255,255,255,.18); padding: 6px 12px; border-radius: 999px; font-weight: 800; }
.botao-icone { border: 0; background: rgba(255,255,255,.18); color: #fff; border-radius: 50%; width: 48px; height: 48px; font-size: 1.3em; }

main { max-width: 1100px; margin: 0 auto; padding: 16px; outline: none; }
h1 { font-size: 1.6em; margin: 6px 0 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
h2 { font-size: 1.2em; margin: 18px 0 10px; }
.dica { color: var(--texto-suave); margin: -6px 0 14px; }
.falar { border: 0; background: var(--roxo-claro); border-radius: 50%; width: 42px; height: 42px; font-size: .8em; flex: none; }

/* Menu de baixo */
.menu {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 10;
  display: flex; justify-content: space-around; gap: 4px;
  background: #fff; border-top: 3px solid var(--borda);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  overflow-x: auto;
}
.menu button {
  flex: 1 0 auto; min-width: 70px; border: 0; background: transparent; border-radius: 16px;
  display: flex; flex-direction: column; align-items: center; font-size: .62em; font-weight: 800; color: var(--texto-suave); padding: 4px 6px;
}
.menu button span { font-size: 2.1em; line-height: 1.2; }
.menu button.ativo { background: var(--roxo-claro); color: var(--roxo); }

/* Botões */
.botao {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 60px; padding: 10px 22px; border: 0; border-radius: var(--raio);
  background: var(--roxo); color: #fff; font-weight: 800; box-shadow: var(--sombra);
  text-decoration: none; transition: transform .08s;
}
.botao:active { transform: translateY(3px); box-shadow: none; }
.botao.verde { background: var(--verde); box-shadow: 0 4px 0 #0b5c5655; }
.botao.rosa { background: var(--rosa); }
.botao.claro { background: var(--roxo-claro); color: var(--roxo); }
.botao.vermelho { background: var(--vermelho); }
.botao.grande { min-height: 76px; font-size: 1.2em; width: 100%; }
.botao[disabled] { opacity: .45; pointer-events: none; }
.linha-botoes { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.linha-botoes > * { flex: 1 1 140px; }

/* Cartões */
.cartao { background: var(--cartao); border: 3px solid var(--borda); border-radius: var(--raio); padding: 16px; margin-bottom: 14px; }
.grade { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
body.pequeno .grade { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }

/* Escolha de perfil */
.perfis { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-top: 20px; }
.perfil {
  border: 4px solid var(--borda); background: #fff; border-radius: 30px; padding: 26px 10px;
  display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 900; font-size: 1.3em; box-shadow: var(--sombra);
}
.perfil .avatar { font-size: 4em; }
.perfil small { font-weight: 700; color: var(--texto-suave); font-size: .6em; }

/* Produtos na loja */
.produto {
  position: relative; border: 3px solid var(--borda); background: #fff; border-radius: var(--raio);
  padding: 10px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px;
  box-shadow: var(--sombra); font-weight: 800;
}
.produto .imagem { width: 100%; aspect-ratio: 1; border-radius: 16px; background: var(--roxo-claro); display: grid; place-items: center; font-size: 3.6em; overflow: hidden; }
.produto .imagem img { width: 100%; height: 100%; object-fit: cover; }
.produto .preco { color: var(--verde); font-size: 1.2em; }
.produto .selo { position: absolute; top: 8px; right: 8px; background: var(--vermelho); color: #fff; border-radius: 999px; padding: 2px 10px; font-size: .7em; }
.produto .selo.pouco { background: var(--amarelo); }
.produto[disabled] { opacity: .5; }
.produto .no-carrinho { position: absolute; top: 8px; left: 8px; background: var(--roxo); color: #fff; border-radius: 50%; width: 38px; height: 38px; display: grid; place-items: center; }

.loja { display: grid; gap: 16px; grid-template-columns: 1fr 360px; align-items: start; }
@media (max-width: 860px) { .loja { grid-template-columns: 1fr; } }
.carrinho { position: sticky; top: 84px; }
.item-carrinho { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 2px dashed var(--borda); }
.item-carrinho .nome { flex: 1; font-weight: 700; }
.qtd { display: flex; align-items: center; gap: 6px; }
.qtd button { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--roxo-claro); font-size: 1.2em; font-weight: 900; }
.total { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.5em; font-weight: 900; margin: 12px 0; }
.total .valor { color: var(--verde); }
.carrinho-vazio { text-align: center; color: var(--texto-suave); padding: 20px 0; font-size: 1.1em; }
.carrinho-vazio span { font-size: 3em; display: block; }

.buscar { display: flex; gap: 10px; margin-bottom: 14px; }
.buscar input { flex: 1; }

/* Formulários */
label { display: block; font-weight: 800; margin: 12px 0 6px; }
input, select, textarea {
  width: 100%; min-height: 56px; padding: 10px 14px; border: 3px solid var(--borda); border-radius: 16px; background: #fff;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--roxo); }
textarea { min-height: 90px; }
.campo-dinheiro { position: relative; }
.campo-dinheiro::before { content: "R$"; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-weight: 800; color: var(--texto-suave); }
.campo-dinheiro input { padding-left: 48px; font-weight: 800; font-size: 1.15em; }
.duas-colunas { display: grid; gap: 0 14px; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .duas-colunas { grid-template-columns: 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; }
.check input { width: 32px; min-height: 32px; flex: none; }

.emojis { display: flex; flex-wrap: wrap; gap: 6px; }
.emojis button { width: 54px; height: 54px; border-radius: 14px; border: 3px solid var(--borda); background: #fff; font-size: 1.5em; }
.emojis button.escolhido { border-color: var(--roxo); background: var(--roxo-claro); }

.foto-produto { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.foto-produto .previa { width: 140px; height: 140px; border-radius: 20px; background: var(--roxo-claro); display: grid; place-items: center; font-size: 4em; overflow: hidden; border: 3px dashed var(--roxo); }
.foto-produto .previa img { width: 100%; height: 100%; object-fit: cover; }

/* Precificação */
.precificar { background: var(--amarelo-claro); border-color: #fcd34d; }
.barra-preco { display: flex; height: 46px; border-radius: 14px; overflow: hidden; margin: 10px 0; font-weight: 800; font-size: .8em; }
.barra-preco div { display: grid; place-items: center; color: #fff; white-space: nowrap; overflow: hidden; }
.barra-preco .custo { background: var(--vermelho); }
.barra-preco .lucro { background: var(--verde); }
input[type=range] { min-height: 40px; padding: 0; border: 0; accent-color: var(--roxo); }

/* Pagamento */
.formas { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
.forma { border: 4px solid var(--borda); border-radius: 26px; background: #fff; padding: 18px 8px; font-weight: 900; font-size: 1.1em; display: flex; flex-direction: column; align-items: center; gap: 4px; box-shadow: var(--sombra); }
.forma span { font-size: 2.6em; }
.forma small { font-weight: 700; color: var(--texto-suave); font-size: .7em; }
.dinheiros { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 10px 0; }
.dinheiros button { border: 0; padding: 12px 14px; border-radius: 12px; font-weight: 900; min-width: 82px; }
.dinheiros .nota { background: #bbf7d0; border: 3px solid #16a34a; }
.dinheiros .moeda { background: #fde68a; border: 3px solid #d97706; border-radius: 50%; min-width: 66px; height: 66px; padding: 0; }
.qr { display: block; margin: 10px auto; width: 240px; max-width: 80%; image-rendering: pixelated; border-radius: 12px; border: 6px solid #fff; box-shadow: 0 0 0 3px var(--borda); }
.codigo-copiar { word-break: break-all; font-family: ui-monospace, monospace; font-size: .6em; background: var(--roxo-claro); padding: 10px; border-radius: 12px; }
.grande-numero { font-size: 2.2em; font-weight: 900; text-align: center; margin: 6px 0; }
.troco { background: var(--verde-claro); border-radius: 18px; padding: 14px; text-align: center; font-weight: 800; }
.festa { text-align: center; padding: 10px 0; }
.festa .emoji-festa { font-size: 5em; animation: pulo .6s ease-in-out infinite alternate; display: inline-block; }
@keyframes pulo { to { transform: translateY(-14px) rotate(8deg); } }
.etiqueta-modo { display: inline-block; background: var(--amarelo-claro); color: #92400e; border-radius: 999px; padding: 4px 12px; font-size: .7em; font-weight: 800; }

/* Estoque */
.lista-linha { display: flex; align-items: center; gap: 12px; padding: 12px; border-bottom: 2px dashed var(--borda); }
.lista-linha:last-child { border-bottom: 0; }
.lista-linha .mini { width: 56px; height: 56px; border-radius: 14px; background: var(--roxo-claro); display: grid; place-items: center; font-size: 1.8em; overflow: hidden; flex: none; }
.lista-linha .mini img { width: 100%; height: 100%; object-fit: cover; }
.lista-linha .info { flex: 1; min-width: 0; }
.lista-linha .info b { display: block; }
.lista-linha .info small { color: var(--texto-suave); }
.semaforo { font-weight: 900; padding: 4px 12px; border-radius: 999px; white-space: nowrap; }
.semaforo.ok { background: var(--verde-claro); color: var(--verde); }
.semaforo.pouco { background: var(--amarelo-claro); color: #b45309; }
.semaforo.acabou { background: var(--vermelho-claro); color: var(--vermelho); }

/* Dinheiro */
.resumo { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.resumo .cartao { margin: 0; text-align: center; }
.resumo .icone { font-size: 2.4em; }
.resumo .valor { font-size: 1.6em; font-weight: 900; }
.resumo .rotulo { font-weight: 800; color: var(--texto-suave); }
.cartao.entrada { background: var(--verde-claro); border-color: #86efac; }
.cartao.saida { background: var(--vermelho-claro); border-color: #fca5a5; }
.cartao.lucro { background: var(--amarelo-claro); border-color: #fcd34d; }
.cartao.info { background: var(--azul-claro); border-color: #93c5fd; }
.abas { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.abas button { border: 3px solid var(--borda); background: #fff; border-radius: 999px; padding: 8px 18px; font-weight: 800; }
.abas button.ativo { background: var(--roxo); border-color: var(--roxo); color: #fff; }
.grafico { display: flex; align-items: flex-end; gap: 6px; height: 180px; padding-top: 10px; }
.grafico .dia { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 2px; font-size: .55em; color: var(--texto-suave); }
.grafico .barras { display: flex; align-items: flex-end; gap: 2px; height: 100%; width: 100%; justify-content: center; }
.grafico .b { width: 45%; border-radius: 6px 6px 0 0; min-height: 2px; }
.grafico .b.entrou { background: var(--verde); }
.grafico .b.saiu { background: var(--vermelho); }
.legenda { display: flex; gap: 16px; font-size: .8em; font-weight: 700; }
.legenda i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; margin-right: 4px; vertical-align: middle; }
.meta-barra { height: 34px; background: var(--roxo-claro); border-radius: 999px; overflow: hidden; margin: 10px 0; }
.meta-barra div { height: 100%; background: linear-gradient(90deg, var(--rosa), var(--roxo)); border-radius: 999px; transition: width .6s; }
.positivo { color: var(--verde); }
.negativo { color: var(--vermelho); }

/* Aprender */
.licoes { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.licao { border: 3px solid var(--borda); background: #fff; border-radius: var(--raio); padding: 16px; }
.licao .icone { font-size: 2.6em; }
.licao h3 { margin: 6px 0; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.licao p { margin: 6px 0; line-height: 1.4; }
.exemplo { background: var(--amarelo-claro); border-radius: 14px; padding: 10px; font-size: .9em; }
.quiz-opcoes { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.quiz-opcoes button { min-height: 70px; border-radius: 20px; border: 3px solid var(--borda); background: #fff; font-weight: 900; font-size: 1.2em; }
.quiz-opcoes button.certo { background: var(--verde-claro); border-color: var(--verde); }
.quiz-opcoes button.errado { background: var(--vermelho-claro); border-color: var(--vermelho); }
.estrelas { font-size: 1.4em; }

/* Etiquetas (tela) */
.etiquetas-previa { display: flex; flex-wrap: wrap; gap: 10px; }
.etiqueta { background: #fff; border: 2px dashed #999; border-radius: 6px; padding: 4px 6px; text-align: center; color: #000; font-family: Arial, sans-serif; display: flex; flex-direction: column; justify-content: center; align-items: center; overflow: hidden; }
.etiqueta .e-nome { font-weight: 700; font-size: 11px; line-height: 1.1; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.etiqueta .e-preco { font-weight: 900; font-size: 16px; }
.etiqueta .e-loja { font-size: 8px; }
.etiqueta svg { max-width: 100%; height: auto; }

/* Janela */
.janela { position: fixed; inset: 0; z-index: 50; background: rgba(31, 18, 53, .55); display: grid; place-items: center; padding: 12px; }
.janela-caixa { position: relative; background: var(--fundo); border-radius: 28px; padding: 22px 18px 18px; width: min(560px, 100%); max-height: 92vh; overflow: auto; }
.fechar { position: absolute; top: 10px; right: 10px; border: 0; background: var(--roxo-claro); border-radius: 50%; width: 44px; height: 44px; font-weight: 900; }
.camera { width: 100%; border-radius: 18px; background: #000; aspect-ratio: 4/3; object-fit: cover; }

.aviso { position: fixed; left: 50%; bottom: 112px; transform: translateX(-50%); z-index: 60; background: var(--texto); color: #fff; padding: 14px 22px; border-radius: 999px; font-weight: 800; max-width: 92vw; text-align: center; }
.aviso.erro { background: var(--vermelho); }
.aviso.ok { background: var(--verde); }

.tabela { width: 100%; border-collapse: collapse; font-size: .85em; }
.tabela th, .tabela td { text-align: left; padding: 8px 6px; border-bottom: 2px solid var(--borda); }
.tabela td.num, .tabela th.num { text-align: right; }

/* Impressão de etiquetas */
.area-impressao { display: none; }
@media print {
  body { padding: 0; background: #fff; }
  body > *:not(.area-impressao) { display: none !important; }
  .area-impressao { display: block; }
  .area-impressao .etiqueta { border: 0; border-radius: 0; page-break-after: always; break-after: page; }
}

/* Celular */
.perfil-atual, .cofrinho-topo { white-space: nowrap; }
@media (max-width: 520px) {
  body { --fonte: 17px; }
  body.pequeno { --fonte: 19px; }
  .grade, body.pequeno .grade { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .produto .imagem { font-size: 3em; }
  .menu { justify-content: stretch; }
  .menu button { min-width: 0; flex: 1 1 0; padding: 4px 2px; font-size: .55em; }
  .topo { padding: 8px 12px; }
  .perfil-atual { padding: 4px 12px 4px 6px; font-size: .9em; }
  #avatar-atual { font-size: 1.3em; }
  .cofrinho-topo { font-size: .85em; }
  .botao-icone { width: 42px; height: 42px; }
}
.barra-carrinho { display: none; }
@media (max-width: 860px) {
  .barra-carrinho:not([hidden]) {
    display: flex; justify-content: space-between; align-items: center; position: fixed; left: 10px; right: 10px; bottom: 92px; z-index: 11;
    border: 0; border-radius: 999px; background: var(--verde); color: #fff; font-weight: 900; padding: 14px 22px; box-shadow: 0 6px 16px rgba(0,0,0,.25);
  }
}

/* Pedidos da loja virtual */
.menu button { position: relative; }
.bolinha {
  position: absolute; top: 2px; right: 18%; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 999px; background: var(--rosa); color: #fff; font-size: 1.1em; line-height: 22px;
}
.pedido.destaque { border: 3px solid var(--verde); }
.pedido-topo { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.selo { background: var(--roxo-claro); color: var(--roxo); border-radius: 999px; padding: 2px 12px; font-weight: 800; font-size: .8em; }
.selo.pago { background: var(--verde-claro); color: var(--verde); }
.selo.pendente { background: var(--amarelo-claro); color: #92400e; }
.itens-pedido { margin: 6px 0 10px; padding-left: 22px; }
#nome-atual { max-width: 52vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
