/* Casa da Coxinha — identidade: massa dourada, casca crocante, creme de catupiry. */
:root {
  --massa: #3b2416; --massa2: #5b3a22; --casca: #8a5a2b;
  --dourado: #e8a33d; --dourado-claro: #fbe3b5; --creme: #fffaf2; --papel: #ffffff;
  --linha: #ecdfcb; --linha-forte: #dccab0;
  --tinta: #2b1d14; --tinta2: #5e4a3c; --apagado: #8a7565;
  --verde: #178a62; --verde-claro: #e3f4ec; --ambar: #c47a12; --ambar-claro: #fdf0da;
  --alerta: #c2410c; --alerta-claro: #fff0e6; --cinza-claro: #f3eee6;
  --raio: 14px; --sombra: 0 1px 2px rgba(59,36,22,.06), 0 4px 14px rgba(59,36,22,.06);
  --lateral: 244px;
  font-family: ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color: var(--tinta); -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--creme); }
body { font-size: 16px; line-height: 1.45; overflow-x: hidden; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; color: var(--massa); line-height: 1.15; margin: 0 0 .4em; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1.05rem; }
p { margin: 0 0 .7em; }
a { color: var(--casca); }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { max-width: 100%; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.quebra { overflow-wrap: anywhere; }

/* ---------- botões e campos ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45em; min-height: 44px; padding: .55em 1.1em; border-radius: 999px; border: 1.5px solid var(--linha-forte); background: var(--papel); color: var(--massa); font-weight: 650; cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform .08s, background .15s; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.prim { background: var(--massa); color: #fff; border-color: var(--massa); }
.btn.prim:hover { background: var(--massa2); }
.btn.ouro { background: var(--dourado); border-color: var(--dourado); color: var(--massa); }
.btn.verde { background: var(--verde); border-color: var(--verde); color: #fff; }
.btn.perigo { color: #a32b0a; border-color: #f0c6b4; }
.btn.peq { min-height: 36px; padding: .35em .85em; font-size: .9rem; }
.btn.bloco { width: 100%; }
.btn-texto { background: none; border: 0; color: var(--casca); font-weight: 650; cursor: pointer; padding: .4em .2em; min-height: 36px; }
.campo { display: block; margin-bottom: .85rem; }
.campo > span { display: block; font-size: .88rem; font-weight: 650; color: var(--tinta2); margin-bottom: .3rem; }
.campo small { display: block; color: var(--apagado); font-size: .8rem; margin-top: .25rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=date], select, textarea {
  width: 100%; min-height: 46px; padding: .6em .8em; border: 1.5px solid var(--linha-forte); border-radius: 12px; background: #fff; outline: none; }
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--dourado); box-shadow: 0 0 0 3px rgba(232,163,61,.25); }
.linha-campos { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.check { display: flex; gap: .6rem; align-items: center; min-height: 44px; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--verde); flex: none; }
.dinheiro { position: relative; }
.dinheiro::before { content: "R$"; position: absolute; left: .8em; top: 50%; transform: translateY(-50%); color: var(--apagado); font-weight: 650; pointer-events: none; }
.dinheiro input { padding-left: 2.6em; }

/* campo de data: rótulo dd/mm/aaaa visível, input transparente por cima */
.campo-data { position: relative; display: block; }
.campo-data .rotulo-data { position: absolute; left: .85em; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--tinta); }
.campo-data .rotulo-data.vazio { color: var(--apagado); }
.campo-data input[type=date] { color: transparent; }
.campo-data input[type=date]::-webkit-datetime-edit { color: transparent; }
.campo-data input[type=date]::-webkit-calendar-picker-indicator { opacity: .6; cursor: pointer; }

/* ---------- etiquetas ---------- */
.pill { display: inline-flex; align-items: center; gap: .3em; font-size: .78rem; font-weight: 700; padding: .2em .65em; border-radius: 999px; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-bot { background: var(--verde-claro); color: #0f6b4b; }
.st-aguardando { background: var(--alerta-claro); color: #a8370b; }
.st-dona { background: var(--ambar-claro); color: #8a5208; }
.st-encerrada { background: var(--cinza-claro); color: var(--apagado); }
.tag { display: inline-block; font-size: .75rem; font-weight: 650; padding: .15em .55em; border-radius: 6px; background: var(--cinza-claro); color: var(--tinta2); }
.tag.exemplo { background: #fff3c9; color: #7a5600; }
.tag.falta { background: #fde4dc; color: #9b2c0c; }

/* ---------- login ---------- */
.entrada { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-rows: auto 1fr; background:
  radial-gradient(120% 60% at 100% 0%, rgba(232,163,61,.28), transparent 60%), radial-gradient(90% 50% at 0% 100%, rgba(138,90,43,.16), transparent 60%), var(--creme); }
.entrada-topo { background: var(--massa); color: #fff; padding: 28px 22px 70px; border-radius: 0 0 28px 28px; position: relative; overflow: hidden; }
.entrada-topo::after { content: ""; position: absolute; right: -40px; bottom: -60px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle at 40% 40%, rgba(232,163,61,.5), transparent 65%); }
.entrada-topo h1 { color: #fff; font-size: 1.9rem; margin: 14px 0 6px; }
.entrada-topo p { color: #f3e2c9; max-width: 34ch; margin: 0; }
.entrada-cartao { background: var(--papel); border-radius: 20px; box-shadow: var(--sombra); margin: -48px 16px 24px; padding: 22px 18px; position: relative; z-index: 1; max-width: 460px; width: calc(100% - 32px); justify-self: center; align-self: start; }
.entrada-cartao h2 { font-size: 1.15rem; }
.demo-btns { display: grid; gap: .6rem; margin: .4rem 0 1rem; }
.demo-btns .btn { justify-content: flex-start; padding-left: 1rem; }
.demo-btns .btn small { font-weight: 500; color: inherit; opacity: .8; margin-left: auto; }
.separador { display: flex; align-items: center; gap: .7rem; color: var(--apagado); font-size: .85rem; margin: 1rem 0; }
.separador::before, .separador::after { content: ""; flex: 1; height: 1px; background: var(--linha); }
.erro-form { color: #a32b0a; font-weight: 600; min-height: 1.3em; font-size: .92rem; }
.marca { display: flex; align-items: center; gap: .6rem; color: inherit; text-decoration: none; }
.marca svg, .marca img { width: 38px; height: 38px; flex: none; border-radius: 10px; }
.marca b { font-family: Georgia, serif; font-size: 1.15rem; letter-spacing: .01em; }
.marca small { display: block; font-size: .72rem; opacity: .8; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }

/* ---------- casca do app ---------- */
.layout { min-height: 100vh; }
.lateral { display: none; }
.topo { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .55rem .9rem; background: var(--massa); color: #fff; }
.topo .marca svg, .topo .marca img { width: 32px; height: 32px; }
.topo-acoes { display: flex; gap: .4rem; align-items: center; }
.sino { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; text-decoration: none; border: 0; cursor: pointer; }
.sino .cont { position: absolute; top: -2px; right: -2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--alerta); color: #fff; font-size: .72rem; font-weight: 800; display: flex; align-items: center; justify-content: center; border: 2px solid var(--massa); }
.sino .cont:empty { display: none; }
.quem { font-size: .78rem; color: #f3e2c9; text-align: right; line-height: 1.2; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
main { min-width: 0; padding-bottom: 86px; }
.conteudo { padding: 1rem .9rem 1.5rem; max-width: 1180px; margin: 0 auto; }
.cabecalho { display: flex; align-items: flex-end; justify-content: space-between; gap: .8rem; flex-wrap: wrap; margin-bottom: 1rem; }
.cabecalho p { color: var(--tinta2); margin: 0; max-width: 60ch; }
.cabecalho h1 { margin-bottom: .2rem; }

.baixo { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--papel); border-top: 1px solid var(--linha); padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -4px 18px rgba(59,36,22,.07); }
.baixo a, .baixo button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 62px; font-size: .72rem; font-weight: 650; color: var(--apagado); text-decoration: none; background: none; border: 0; cursor: pointer; position: relative; padding: 4px 2px; }
.baixo svg, .lateral nav svg { width: 24px; height: 24px; }
.baixo .ativo { color: var(--massa); }
.baixo .ativo::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--dourado); }
.baixo .cont { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 18px; height: 18px; border-radius: 9px; background: var(--alerta); color: #fff; font-size: .68rem; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.baixo .cont:empty { display: none; }

.folha-fundo { position: fixed; inset: 0; background: rgba(43,29,20,.45); z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.folha { background: var(--papel); width: 100%; max-width: 560px; border-radius: 22px 22px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); max-height: 92vh; max-height: 92dvh; overflow-y: auto; box-shadow: 0 -10px 40px rgba(0,0,0,.2); }
.folha .alca { width: 44px; height: 5px; border-radius: 3px; background: var(--linha-forte); margin: -6px auto 12px; }
.folha-menu a { display: flex; align-items: center; gap: .8rem; padding: .8rem .4rem; text-decoration: none; color: var(--tinta); font-weight: 650; border-bottom: 1px solid var(--linha); }
.folha-menu a svg { width: 24px; height: 24px; color: var(--casca); }
.folha-menu a span small { display: block; font-weight: 500; color: var(--apagado); font-size: .82rem; }
.folha-acoes { display: flex; gap: .6rem; justify-content: flex-end; flex-wrap: wrap; margin-top: .6rem; }

/* faixa de alerta de conversas aguardando */
.alerta-dona { display: flex; align-items: center; gap: .7rem; background: var(--alerta); color: #fff; padding: .7rem .9rem; text-decoration: none; font-weight: 650; }
.alerta-dona[hidden] { display: none; }
.alerta-dona .ponto { width: 12px; height: 12px; border-radius: 50%; background: #fff; flex: none; animation: pulsa 1.4s infinite; }
.alerta-dona span { flex: 1; }
.alerta-dona em { font-style: normal; background: rgba(255,255,255,.2); padding: .25em .75em; border-radius: 999px; font-size: .88rem; white-space: nowrap; }
@keyframes pulsa { 0%,100% { box-shadow: 0 0 0 0 rgba(255,255,255,.7); } 50% { box-shadow: 0 0 0 7px rgba(255,255,255,0); } }

/* ---------- cartões ---------- */
.cartao { background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio); padding: 1rem; box-shadow: var(--sombra); margin-bottom: 1rem; min-width: 0; }
.cartao > h2:first-child, .cartao > h3:first-child { margin-top: 0; }
.cartao .sub { color: var(--tinta2); font-size: .92rem; margin-top: -.2rem; }
.grade-2 { display: grid; gap: 1rem; }
.vazio-msg { text-align: center; color: var(--apagado); padding: 1.5rem .5rem; }
.aviso { display: flex; gap: .7rem; align-items: flex-start; background: #fff6df; border: 1px solid #f3dca3; border-radius: 12px; padding: .75rem .85rem; color: #6b4a00; font-size: .92rem; margin-bottom: 1rem; }
.aviso svg { flex: none; width: 22px; height: 22px; margin-top: 1px; }
.aviso.info { background: #eef6f2; border-color: #cfe7db; color: #155c43; }
.aviso a { color: inherit; font-weight: 700; }

/* ---------- caixa de conversas ---------- */
.filtros { display: flex; gap: .45rem; overflow-x: auto; padding-bottom: .35rem; margin: 0 -.9rem .6rem; padding-left: .9rem; padding-right: .9rem; scrollbar-width: none; }
.filtros::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: .35em; min-height: 38px; padding: .35em .9em; border-radius: 999px; border: 1.5px solid var(--linha-forte); background: var(--papel); font-weight: 650; font-size: .9rem; cursor: pointer; color: var(--tinta2); }
.chip.ativo { background: var(--massa); border-color: var(--massa); color: #fff; }
.chip .n { font-size: .78rem; background: rgba(0,0,0,.08); border-radius: 999px; padding: 0 .5em; }
.chip.ativo .n { background: rgba(255,255,255,.2); }
.chip.urgente:not(.ativo) { border-color: #f1b28f; color: #a8370b; }
.caixa { display: grid; gap: 1rem; }
.lista-conv { list-style: none; margin: 0; padding: 0; background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio); overflow: hidden; }
.lista-conv li + li { border-top: 1px solid var(--linha); }
.item-conv { display: grid; grid-template-columns: 44px 1fr auto; gap: .7rem; align-items: center; padding: .75rem .8rem; text-decoration: none; color: inherit; position: relative; }
.item-conv:hover { background: #fffcf6; }
.item-conv.sel { background: var(--dourado-claro); }
.item-conv.urg { background: linear-gradient(90deg, var(--alerta-claro), transparent 70%); }
.item-conv.urg::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--alerta); }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--massa); background: var(--dourado-claro); font-size: .95rem; }
.item-conv .meio { min-width: 0; }
.item-conv .nome { font-weight: 750; display: flex; gap: .4rem; align-items: center; min-width: 0; }
.item-conv .nome span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-conv .ultima { color: var(--tinta2); font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-conv .motivo { font-size: .78rem; color: #a8370b; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-conv .lado { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: .3rem; }
.item-conv .hora { font-size: .75rem; color: var(--apagado); white-space: nowrap; }
.busca { margin-bottom: .7rem; }

/* ---------- conversa (bolhas) ---------- */
.chat { display: flex; flex-direction: column; background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio); overflow: hidden; min-width: 0; }
.chat-topo { display: flex; align-items: center; gap: .6rem; padding: .7rem .8rem; border-bottom: 1px solid var(--linha); background: #fffdf8; }
.chat-topo .meio { flex: 1; min-width: 0; }
.chat-topo .nome { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-topo small { color: var(--apagado); display: block; }
.voltar { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--cinza-claro); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--massa); text-decoration: none; flex: none; }
.chat-acoes { display: flex; flex-wrap: wrap; gap: .5rem; padding: .7rem .8rem; border-bottom: 1px solid var(--linha); background: #fffdf8; }
.chat-motivo { padding: .55rem .8rem; background: var(--alerta-claro); color: #8a2f0a; font-size: .88rem; font-weight: 600; border-bottom: 1px solid #f7d6c3; }
.chat-motivo.dona { background: var(--ambar-claro); color: #7a4a06; border-color: #f2dcb2; }
.mensagens { padding: .9rem .7rem; display: flex; flex-direction: column; gap: .45rem; background:
  radial-gradient(circle at 20px 20px, rgba(232,163,61,.07) 2px, transparent 2.5px) 0 0/34px 34px, #fbf5ea; min-height: 280px; overflow-y: auto; }
.bolha { max-width: 86%; padding: .5rem .7rem .35rem; border-radius: 14px; box-shadow: 0 1px 1px rgba(0,0,0,.06); font-size: .95rem; overflow-wrap: anywhere; position: relative; }
.bolha .autor { font-size: .72rem; font-weight: 800; letter-spacing: .02em; margin-bottom: .1rem; }
.bolha .hora { font-size: .68rem; color: var(--apagado); text-align: right; margin-top: .15rem; }
.bolha.cliente { align-self: flex-start; background: #fff; border-top-left-radius: 4px; }
.bolha.cliente .autor { color: var(--casca); }
.bolha.bot { align-self: flex-end; background: #dcf3e8; border-top-right-radius: 4px; }
.bolha.bot .autor { color: #0f6b4b; }
.bolha.dona, .bolha.equipe { align-self: flex-end; background: #fde9c4; border-top-right-radius: 4px; }
.bolha.dona .autor, .bolha.equipe .autor { color: #8a5208; }
.bolha .intencao { display: inline-block; font-size: .68rem; font-weight: 700; color: #0f6b4b; background: rgba(23,138,98,.12); border-radius: 6px; padding: 0 .4em; margin-left: .3em; }
.sistema { align-self: center; font-size: .78rem; color: var(--tinta2); background: rgba(255,255,255,.85); border: 1px solid var(--linha); border-radius: 999px; padding: .25rem .8rem; text-align: center; max-width: 92%; }
.dia-sep { align-self: center; font-size: .72rem; font-weight: 700; color: var(--apagado); background: #fff; border-radius: 8px; padding: .15rem .6rem; }
.compor { display: flex; gap: .5rem; padding: .6rem; border-top: 1px solid var(--linha); background: #fff; align-items: flex-end; }
.compor textarea { min-height: 46px; max-height: 140px; height: 46px; border-radius: 22px; padding: .65em 1em; resize: none; }
.compor .btn { flex: none; width: 46px; height: 46px; min-height: 46px; padding: 0; border-radius: 50%; }
.rapidas { display: flex; gap: .4rem; overflow-x: auto; padding: .5rem .6rem 0; background: #fff; scrollbar-width: none; }
.rapidas::-webkit-scrollbar { display: none; }
.rapidas .chip { min-height: 34px; font-size: .84rem; font-weight: 600; }
.pausado { padding: .7rem .8rem; background: #fff; border-top: 1px solid var(--linha); font-size: .9rem; color: var(--tinta2); text-align: center; }

/* simulador */
.simulador { max-width: 460px; margin: 0 auto; }
.celular { border-radius: 28px; border: 8px solid var(--massa); overflow: hidden; background: var(--massa); box-shadow: 0 12px 30px rgba(59,36,22,.18); }
.celular .chat { border: 0; border-radius: 0; }
.celular .chat-topo { background: var(--massa); color: #fff; border: 0; }
.celular .chat-topo small { color: #f3e2c9; }
.celular .mensagens { min-height: 380px; max-height: 58vh; }
.sugestoes { display: flex; gap: .4rem; flex-wrap: wrap; margin: .8rem 0; }
.sugestoes .chip { min-height: 36px; font-size: .86rem; }

/* ---------- cardápio ---------- */
.cat-titulo { display: flex; align-items: center; gap: .6rem; margin: 1.3rem 0 .6rem; }
.cat-titulo h2 { margin: 0; font-size: 1.15rem; }
.cat-titulo::after { content: ""; flex: 1; height: 1px; background: var(--linha-forte); }
.produtos { display: grid; gap: .7rem; }
.produto { display: grid; grid-template-columns: 1fr auto; gap: .5rem .8rem; background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio); padding: .85rem .9rem; box-shadow: var(--sombra); }
.produto.off { opacity: .65; }
.produto .nome { font-weight: 800; color: var(--massa); }
.produto .desc { font-size: .88rem; color: var(--tinta2); }
.produto .preco { font-weight: 800; font-size: 1.1rem; color: var(--massa); text-align: right; white-space: nowrap; }
.produto .preco small { display: block; font-size: .72rem; font-weight: 600; color: var(--apagado); }
.produto .preco.vazio { color: var(--alerta); font-size: .85rem; }
.produto .tags { grid-column: 1 / -1; display: flex; gap: .35rem; flex-wrap: wrap; align-items: center; }
.produto .acoes { grid-column: 1 / -1; display: flex; gap: .4rem; flex-wrap: wrap; border-top: 1px dashed var(--linha); padding-top: .55rem; }

/* ---------- listas genéricas ---------- */
.lista { list-style: none; margin: 0; padding: 0; }
.lista > li { padding: .8rem 0; border-top: 1px solid var(--linha); }
.lista > li:first-child { border-top: 0; }
.faq-titulo { font-weight: 800; color: var(--massa); display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.faq-resp { font-size: .92rem; color: var(--tinta2); margin: .25rem 0; overflow-wrap: anywhere; }
.palavras { display: flex; flex-wrap: wrap; gap: .3rem; }
.palavras .tag { font-weight: 600; }
.resultado-teste { margin-top: .8rem; }
details.regras summary { cursor: pointer; font-weight: 700; color: var(--casca); min-height: 40px; display: flex; align-items: center; }
details.regras .grupo { margin: .6rem 0; }
details.regras .grupo b { display: block; font-size: .9rem; margin-bottom: .25rem; }

/* ---------- entrega ---------- */
.faixa { display: grid; grid-template-columns: 1fr; gap: .5rem; padding: .8rem 0; border-top: 1px solid var(--linha); }
.faixa:first-child { border-top: 0; }
.faixa .titulo { font-weight: 800; color: var(--massa); display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.faixa .linha { display: grid; grid-template-columns: 1fr auto auto; gap: .5rem; align-items: center; }
.calc-res { margin-top: 1rem; border-radius: var(--raio); border: 1px solid var(--linha); overflow: hidden; }
.calc-res .faixa-res { padding: .9rem 1rem; background: var(--verde-claro); color: #0f5a3f; }
.calc-res.pendente .faixa-res { background: var(--alerta-claro); color: #8a2f0a; }
.calc-res .valor { font-size: 1.7rem; font-weight: 800; font-family: Georgia, serif; }
.calc-res dl { margin: 0; padding: .8rem 1rem; display: grid; grid-template-columns: auto 1fr; gap: .35rem .9rem; font-size: .92rem; }
.calc-res dt { color: var(--apagado); font-weight: 600; }
.calc-res dd { margin: 0; overflow-wrap: anywhere; font-weight: 600; }
.mapinha { display: block; width: 100%; height: auto; background: #f6efe2; border-top: 1px solid var(--linha); }

/* ---------- importar ---------- */
.soltar { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; text-align: center; border: 2px dashed var(--linha-forte); border-radius: var(--raio); padding: 1.4rem 1rem; background: #fffdf8; cursor: pointer; }
.soltar.sobre { border-color: var(--dourado); background: var(--dourado-claro); }
.soltar svg { width: 40px; height: 40px; color: var(--casca); }
.analise-item { border-top: 1px solid var(--linha); padding: .8rem 0; display: grid; gap: .4rem; }
.analise-item:first-child { border-top: 0; }
.analise-item .bolha { max-width: 100%; }
.analise-item .real { font-size: .82rem; color: var(--apagado); }
.analise-item .real b { color: var(--tinta2); }
.passa { font-size: .85rem; font-weight: 700; color: #a8370b; background: var(--alerta-claro); border-radius: 10px; padding: .45rem .7rem; }

/* ---------- painel ---------- */
.numeros { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-bottom: 1rem; }
.numero { background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio); padding: .85rem .9rem; box-shadow: var(--sombra); min-width: 0; }
.numero b { display: block; font-family: Georgia, serif; font-size: 1.9rem; color: var(--massa); line-height: 1.1; }
.numero span { font-size: .84rem; color: var(--tinta2); font-weight: 600; }
.numero .marcador { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .3rem; vertical-align: middle; }
.numero.alerta { background: var(--alerta-claro); border-color: #f6cdb5; }
.numero.alerta b { color: #a8370b; }
.periodo { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; align-items: end; }
.periodo .atalhos { grid-column: 1 / -1; display: flex; gap: .4rem; flex-wrap: wrap; }
.grafico { width: 100%; height: auto; display: block; overflow: visible; }
.grafico text { font-family: inherit; fill: var(--tinta2); font-size: 11px; }
.grafico .eixo { stroke: var(--linha); stroke-width: 1; }
.grafico rect.alvo { fill: transparent; }
.grafico g.coluna:hover rect.alvo { fill: rgba(59,36,22,.05); }
.legenda { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .85rem; color: var(--tinta2); margin: .3rem 0 .6rem; }
.legenda i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; }
.dica { position: fixed; z-index: 70; pointer-events: none; background: var(--massa); color: #fff; font-size: .82rem; padding: .45rem .6rem; border-radius: 8px; box-shadow: 0 4px 14px rgba(0,0,0,.2); max-width: 220px; }
.barras-h { display: grid; gap: .55rem; }
.barra-h { display: grid; grid-template-columns: minmax(0, 9.5rem) 1fr 2.4rem; gap: .5rem; align-items: center; font-size: .88rem; }
.barra-h .rot { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--tinta2); font-weight: 600; }
.barra-h .trilho { height: 14px; background: var(--cinza-claro); border-radius: 0 4px 4px 0; }
.barra-h .enche { height: 100%; background: var(--casca); border-radius: 0 4px 4px 0; min-width: 2px; }
.barra-h .val { text-align: right; font-weight: 750; }
.tabela-wrap { overflow-x: auto; }
table.tab { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.tab th, table.tab td { text-align: left; padding: .45rem .4rem; border-bottom: 1px solid var(--linha); }
table.tab th { color: var(--apagado); font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; }
table.tab td.n, table.tab th.n { text-align: right; }
details.ver-tabela summary { cursor: pointer; color: var(--casca); font-weight: 650; font-size: .88rem; min-height: 36px; display: flex; align-items: center; }
.sem-resp { display: flex; gap: .6rem; align-items: center; justify-content: space-between; padding: .6rem 0; border-top: 1px solid var(--linha); }
.sem-resp:first-child { border-top: 0; }
.sem-resp q { font-weight: 650; overflow-wrap: anywhere; }
.sem-resp small { display: block; color: var(--apagado); }
.downloads { display: flex; gap: .5rem; flex-wrap: wrap; }

/* usuários */
.usuario { display: grid; grid-template-columns: 44px 1fr; gap: .7rem; align-items: center; padding: .8rem 0; border-top: 1px solid var(--linha); }
.usuario:first-child { border-top: 0; }
.usuario .acoes { grid-column: 1 / -1; display: flex; gap: .4rem; flex-wrap: wrap; }
.papel-box { border: 1px solid var(--linha); border-radius: 12px; padding: .75rem .85rem; margin-bottom: .6rem; background: #fffdf8; }
.papel-box b { color: var(--massa); }
.papel-box ul { margin: .3rem 0 0; padding-left: 1.1rem; font-size: .9rem; color: var(--tinta2); }

/* aviso flutuante */
.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 80; background: var(--massa); color: #fff; padding: .7rem 1.1rem; border-radius: 12px; font-weight: 650; box-shadow: 0 8px 24px rgba(0,0,0,.25); max-width: calc(100% - 32px); text-align: center; }
.toast.erro { background: #a32b0a; }
.carregando { padding: 2rem; text-align: center; color: var(--apagado); }

/* ---------- desktop ---------- */
@media (min-width: 720px) {
  .numeros { grid-template-columns: repeat(4, 1fr); }
  .produtos { grid-template-columns: 1fr 1fr; }
  .periodo { grid-template-columns: 180px 180px 1fr; }
  .periodo .atalhos { grid-column: auto; }
  .conteudo { padding: 1.4rem 1.4rem 2rem; }
}
@media (min-width: 1024px) {
  /* coluna lateral pintada também no fundo do grid, para não parecer cortada em página longa */
  .layout { display: grid; grid-template-columns: var(--lateral) minmax(0, 1fr); background: linear-gradient(to right, var(--massa) 0, var(--massa) var(--lateral), var(--creme) var(--lateral)); }
  .lateral { display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; background: var(--massa); color: #fff; padding: 1.2rem .8rem; overflow-y: auto; }
  .lateral .marca { padding: .2rem .5rem 1.2rem; }
  .lateral nav { display: grid; gap: 2px; }
  .lateral nav a { display: flex; align-items: center; gap: .7rem; padding: .62rem .75rem; border-radius: 10px; color: #f3e2c9; text-decoration: none; font-weight: 600; position: relative; }
  .lateral nav a:hover { background: rgba(255,255,255,.07); }
  .lateral nav a.ativo { background: var(--dourado); color: var(--massa); }
  .lateral nav .cont { margin-left: auto; min-width: 22px; height: 22px; border-radius: 11px; background: var(--alerta); color: #fff; font-size: .75rem; font-weight: 800; display: flex; align-items: center; justify-content: center; padding: 0 6px; }
  .lateral nav .cont:empty { display: none; }
  .lateral .rodape { margin-top: auto; padding: 1rem .5rem 0; font-size: .85rem; color: #e3cfb2; border-top: 1px solid rgba(255,255,255,.12); }
  .lateral .rodape b { color: #fff; display: block; }
  .lateral .rodape button { margin-top: .6rem; background: rgba(255,255,255,.1); color: #fff; border: 0; }
  .topo, .baixo { display: none; }
  main { padding-bottom: 0; }
  .caixa.dividida { grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); align-items: start; }
  .caixa.dividida .chat { position: sticky; top: 1rem; max-height: calc(100vh - 5.5rem); }
  .caixa.dividida .mensagens { flex: 1; min-height: 0; }
  .grade-2 { grid-template-columns: 1fr 1fr; align-items: start; }
  .filtros { margin: 0 0 .6rem; padding-left: 0; padding-right: 0; flex-wrap: wrap; }
  .folha-fundo { align-items: center; }
  .folha { border-radius: 20px; }
  .toast { bottom: 24px; }
}
@media (max-width: 1023px) {
  .caixa.com-chat .lista-wrap { display: none; }
  .caixa.com-chat .chat .mensagens { min-height: 50vh; }
}
@media (max-width: 380px) {
  .linha-campos { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* correções de largura no celular */
.entrada { grid-template-columns: minmax(0, 1fr); }
.demo-btns .btn { white-space: normal; text-align: left; }
.caixa { grid-template-columns: minmax(0, 1fr); }
.lista-wrap { min-width: 0; }

/* item da lista: nome + hora em cima, situação + motivo embaixo */
.item-conv { grid-template-columns: 44px minmax(0, 1fr); }
.item-conv .topo-item { display: flex; justify-content: space-between; gap: .5rem; align-items: baseline; }
.item-conv .topo-item .nome { min-width: 0; }
.item-conv .situacao { display: flex; gap: .4rem; align-items: center; min-width: 0; margin: .1rem 0; }
.item-conv .situacao .motivo { min-width: 0; }
.chat-topo .meio small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-topo .meio .pill { margin-top: .2rem; }
.faixa .linha { grid-template-columns: minmax(0, 1fr) auto; }
.faixa .titulo .btn-texto { margin-left: auto; color: #a32b0a; font-size: .88rem; }
.sugestoes .chip { white-space: normal; text-align: left; max-width: 100%; }
@media (min-width: 720px) { .barra-h { grid-template-columns: minmax(0, 12rem) 1fr 2.4rem; } }
#__card h1 { color: #fff; }
