:root {
  --bg: #f3f5f9; --panel: #fff; --line: #e1e6ee; --text: #131a26; --muted: #647084;
  --brand: #5b4bff; --brand-dark: #4335d6; --brand-soft: #eceaff;
  --green: #12a150; --red: #e5484d; --orange: #d98200; --purple: #7c5cff; --gray: #7b8794; --blue: #1c7ed6;
  --side: #0f1524; --wa: #dcf8c6; --wa-bg: #ece5dd;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font: 14.5px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--text); background: var(--bg); }
h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 16px; margin: 0 0 10px; }
h3 { font-size: 16px; margin: 10px 0; }
h4 { font-size: 13px; margin: 16px 0 6px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
p { margin: 0 0 10px; }
a { color: var(--brand-dark); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.pad { padding: 30px; }
.grow { flex: 1; }
.hidden { display: none !important; }

/* ---------- estrutura ---------- */
.layout { display: flex; min-height: 100vh; }
.side { width: 216px; flex: none; background: var(--side); color: #fff; padding: 18px 10px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh; }
.logo { font-weight: 800; font-size: 20px; padding: 0 10px 16px; letter-spacing: -.02em; }
.logo span { color: #8f84ff; }
.logo.big { font-size: 30px; color: var(--text); padding: 0 0 6px; }
.logo.big span { color: var(--brand); }
.side a { color: #b9c2d3; text-decoration: none; padding: 8px 10px; border-radius: 8px; display: flex; gap: 10px; align-items: center; }
.side a:hover { background: #1a2236; color: #fff; }
.side a.on { background: var(--brand); color: #fff; }
.side .foot { margin-top: auto; padding: 10px; font-size: 12.5px; color: #8591a6; }
.side .foot button { margin-top: 8px; width: 100%; }
.content { flex: 1; min-width: 0; }
.main { padding: 26px 28px; max-width: 1180px; }
.banner { background: #fff4d6; border-bottom: 1px solid #f0d98c; padding: 9px 28px; font-size: 13.5px; }
.head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 14px; }
.card.narrow { max-width: 420px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.cards .card { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.stat b { display: block; font-size: 24px; }
.stat.hl { border-color: var(--green); background: #f1fbf5; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.tight { gap: 6px; flex-wrap: nowrap; }
.row.wrap { flex-wrap: wrap; }
.row.end { justify-content: flex-end; margin-top: 14px; }
.between { justify-content: space-between; }
.col { display: flex; flex-direction: column; gap: 6px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

button, .btn { font: inherit; border: 1px solid var(--line); background: #fff; color: var(--text); padding: 7px 13px; border-radius: 8px; cursor: pointer; text-decoration: none; display: inline-block; white-space: nowrap; }
button:hover, .btn:hover { border-color: #b4bdcb; }
button.primary, .btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
button.primary:hover, .btn.primary:hover { background: var(--brand-dark); }
button.primary.red { background: var(--red); border-color: var(--red); }
button.danger, button.red { color: var(--red); }
button.link { border: 0; background: none; padding: 0; color: var(--brand-dark); text-decoration: underline; }
button.icon { padding: 5px 9px; }
button.block { width: 100%; margin-top: 6px; }
button.space { margin-top: 18px; }
button:disabled { opacity: .55; cursor: default; }

label { display: block; font-size: 12.5px; font-weight: 600; margin: 0 0 4px; }
.field { margin: 10px 0; }
.hint { font-size: 12px; color: var(--muted); margin: 4px 0; }
input, select, textarea { font: inherit; width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text); min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid #c9c3ff; border-color: var(--brand); }
textarea { resize: vertical; }
input[type=checkbox] { width: auto; }
input.num { width: 84px; flex: none; }
select.auto { width: auto; }
label.check { display: flex; gap: 8px; align-items: center; font-weight: 500; font-size: 13.5px; margin: 8px 0; cursor: pointer; }
code, .code { font: 12.5px/1.5 ui-monospace, Consolas, monospace; background: #eef1f6; border-radius: 6px; padding: 2px 6px; word-break: break-all; }
pre.code { padding: 12px; white-space: pre-wrap; margin: 8px 0 0; }
details { margin: 12px 0; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
summary { cursor: pointer; font-weight: 600; font-size: 13px; }

.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; font-size: 13px; margin: 0; white-space: nowrap; flex: none; }
.flow > .row.between { flex-wrap: nowrap; align-items: flex-start; }
.switch input { position: absolute; opacity: 0; width: 0; }
.switch i { width: 36px; height: 20px; border-radius: 99px; background: #c5ccd8; position: relative; transition: background .15s; flex: none; }
.switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch input:checked + i { background: var(--green); }
.switch input:checked + i::after { left: 18px; }
.switch input:focus-visible + i { outline: 2px solid var(--brand); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
td.msg { max-width: 360px; white-space: pre-wrap; word-break: break-word; }
.scroll { overflow-x: auto; }

.tag { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: #eef1f6; color: var(--muted); white-space: nowrap; }
.tag.ok { background: #dff5e8; color: #0b7a3b; }
.tag.bad { background: #fde4e4; color: #c0343a; }
.tag.wait { background: #fdf1d3; color: #9a6500; }
.tag.info { background: #dcebfb; color: #1864ab; }

.chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0 10px; }
.chips button { font-size: 11.5px; padding: 2px 8px; border-radius: 99px; background: var(--brand-soft); border-color: transparent; color: var(--brand-dark); }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.tabs button.on { background: var(--side); color: #fff; border-color: var(--side); }
.note { background: #fdf6e3; border: 1px solid #f0dfa8; border-radius: 8px; padding: 9px 11px; font-size: 12.5px; margin: 10px 0; }
.error { color: var(--red); font-size: 13.5px; margin-top: 8px; min-height: 18px; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--side); color: #fff; padding: 10px 18px; border-radius: 99px; z-index: 60; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); }

.modal { position: fixed; inset: 0; background: rgba(15, 21, 36, .55); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; z-index: 50; }
.modal > div { background: #fff; border-radius: 14px; padding: 22px; width: 100%; max-width: 560px; }
.modal > div.wide { max-width: 860px; }
.ask { font-size: 15px; margin-bottom: 12px; }
.qr { text-align: center; padding: 10px 0; }
.qr img { width: 280px; height: 280px; }
.paircode { font: 700 34px/1.2 ui-monospace, Consolas, monospace; letter-spacing: .12em; padding: 22px 0 10px; }

.auth { max-width: 380px; margin: 9vh auto; padding: 0 16px; }

/* ---------- telas ---------- */
.bar { display: grid; grid-template-columns: 170px 1fr 170px; gap: 10px; align-items: center; padding: 5px 0; }
.bartrack { height: 10px; background: #eef1f6; border-radius: 99px; overflow: hidden; }
.bartrack i { display: block; height: 100%; background: var(--brand); border-radius: 99px; min-width: 2px; }
.barvalue { font-size: 12.5px; color: var(--muted); text-align: right; }

.flowname { font-weight: 700; font-size: 15.5px; color: var(--text); text-decoration: none; }
.flowname:hover { color: var(--brand-dark); }
.flowstats { display: flex; gap: 16px; font-size: 12.5px; color: var(--muted); }
.flowstats b { color: var(--text); font-size: 15px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.pick { text-align: left; white-space: normal; padding: 14px; display: flex; flex-direction: column; gap: 6px; height: 100%; }
.pick:hover { border-color: var(--brand); background: var(--brand-soft); }
.timeline > div, .tline { padding: 3px 0; }
.webhook { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); display: flex; flex-direction: column; gap: 6px; }

.chat { background: var(--wa-bg); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; }
.chat.inset { max-height: 260px; }
.bubble { max-width: 86%; padding: 7px 10px; border-radius: 9px; white-space: pre-wrap; word-break: break-word; font-size: 13.5px; box-shadow: 0 1px 1px rgba(0, 0, 0, .12); align-self: flex-end; background: var(--wa); }
.bubble.in { align-self: flex-start; background: #fff; }
.bubble.sms.out { background: #d6e8fb; }
.btime { display: block; font-size: 10.5px; color: var(--muted); text-align: right; margin-top: 2px; }

.clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- construtor de fluxos ---------- */
.builder { height: 100vh; display: flex; flex-direction: column; background: #fff; }
.bbar { display: flex; align-items: center; gap: 12px; padding: 9px 14px; border-bottom: 1px solid var(--line); box-shadow: 0 1px 6px rgba(15, 21, 36, .06); z-index: 5; }
.bname { border-color: transparent; font-size: 17px; font-weight: 600; max-width: 420px; }
.bname:hover { border-color: var(--line); }
.bbody { flex: 1; display: flex; min-height: 0; position: relative; }
.bpanel { width: 340px; flex: none; border-right: 1px solid var(--line); padding: 14px; overflow: hidden auto; background: #fafbfd; }
.bpanel .row.tight { flex-wrap: wrap; }
.bpanel .row.tight > input:not(.num) { flex: 1; width: auto; }
.bpanel h3 { margin-top: 4px; }
.pcard { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.pcard h4 { margin: 0 0 2px; color: var(--text); text-transform: none; font-size: 14.5px; letter-spacing: 0; }
.pgroup { font-size: 12px; color: var(--muted); margin: 10px 0 6px; }
.palette { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.palette button { display: flex; align-items: center; gap: 8px; white-space: normal; text-align: left; padding: 9px 10px; font-size: 13px; line-height: 1.2; }
.palette button:hover { border-color: var(--brand); background: var(--brand-soft); }
/* Gaveta do criador de fluxos: só existe no celular (veja o fim do arquivo). */
.bsheet-head, .bfab { display: none; }
.rule { border: 1px solid var(--line); border-radius: 8px; padding: 8px; margin: 8px 0; display: flex; flex-direction: column; gap: 6px; background: #fff; }
.idx { width: 20px; text-align: center; font-weight: 700; color: var(--muted); flex: none; }

.canvas { flex: 1; position: relative; overflow: hidden; cursor: grab; touch-action: none; user-select: none;
  background-color: #f6f7fb; background-image: radial-gradient(#cfd5e1 1.2px, transparent 1.2px); background-size: 22px 22px; }
.canvas.panning { cursor: grabbing; }
.canvas.connecting, .canvas.connecting .node { cursor: crosshair; }
.layer { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-origin: 0 0; }
.edges { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.edges .hit { pointer-events: stroke; cursor: pointer; }
.elabel { position: absolute; transform: translate(-50%, -50%); font-size: 10.5px; font-weight: 700; color: #fff; padding: 1px 7px; border-radius: 99px; white-space: nowrap; cursor: pointer; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.zoom { position: absolute; right: 14px; bottom: 14px; display: flex; flex-direction: column; gap: 4px; z-index: 4; }
.zoom button { width: 34px; padding: 5px 0; font-weight: 700; box-shadow: 0 2px 6px rgba(15, 21, 36, .1); }
.bsim ~ .zoom { right: 14px; }

.c-green { background: var(--green); } .c-red { background: var(--red); } .c-gray { background: var(--gray); }
.c-orange { background: var(--orange); } .c-purple { background: var(--purple); } .c-dark { background: #0f172a; }

.node { position: absolute; width: 264px; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; box-shadow: 0 2px 8px rgba(15, 21, 36, .07); cursor: grab; font-size: 12.5px; }
.node:hover { border-color: #b4bdcb; }
.node.sel { border-color: var(--brand); box-shadow: 0 0 0 3px #d9d5ff, 0 4px 14px rgba(15, 21, 36, .12); z-index: 2; }
.node.running { border-color: var(--orange); box-shadow: 0 0 0 3px #ffe2b0; }
.nhead { display: flex; align-items: center; gap: 8px; padding: 9px 10px 7px; }
.nicon { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; flex: none; background: #eef1f6; }
.nimg { display: block; width: calc(100% - 12px); max-height: 150px; object-fit: cover; border-radius: 8px; margin: 2px 6px; pointer-events: none; }
.pimg { display: block; max-width: 100%; max-height: 220px; border-radius: 10px; border: 1px solid var(--line); margin: 4px 0 8px; }
.t-image .nicon { background: #d9f7e3; }
[data-theme=dark] .t-image .nicon { background: #123524; }
.bpanel audio { width: 100%; height: 38px; margin: 4px 0 8px; }
.presence { align-items: center; margin-top: 10px; }
.presence label.check { margin: 0; }
.t-whatsapp .nicon, .t-audio .nicon { background: #d9f7e3; } .t-sms .nicon { background: #dcebfb; } .t-trigger .nicon { background: #dff3ff; }
.t-wait .nicon { background: #fdf1d3; } .t-condition .nicon, .t-random .nicon { background: #ebe7ff; } .t-handoff .nicon, .t-webhook .nicon { background: #ffe5ea; }
.ntitle { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.ntitle small { font-size: 9.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.ntitle b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nhits { font-size: 11px; font-weight: 700; color: var(--brand-dark); background: var(--brand-soft); padding: 1px 7px; border-radius: 99px; }
.nbtn { border: 0; background: none; padding: 2px 5px; color: var(--muted); font-size: 12px; opacity: 0; }
.node:hover .nbtn, .node.sel .nbtn { opacity: 1; }
.nbtn:hover { color: var(--text); background: #eef1f6; }
.nbody { padding: 2px 10px 8px; display: flex; flex-direction: column; gap: 4px; }
.nbody:empty { display: none; }
.nbody .bubble { align-self: stretch; max-width: none; font-size: 12px; background: var(--wa); border-radius: 8px; box-shadow: none; outline: 6px solid var(--wa-bg); margin: 6px; }
.nbody .bubble.sms { background: #d6e8fb; outline-color: #eef3f9; }
.nline { overflow-wrap: anywhere; }
.nline.strong { font-weight: 600; font-size: 13.5px; }
.nports { border-top: 1px solid var(--line); padding: 5px 0; }
.nports:empty { display: none; }
.prow { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 2.5px 0 2.5px 10px; position: relative; color: var(--muted); font-size: 11.5px; }
.plabel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.port { width: 13px; height: 13px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(15, 21, 36, .18); flex: none; }
.port.out { margin-right: -7px; cursor: crosshair; opacity: .55; transition: transform .1s, opacity .1s; }
.port.out.on, .port.out:hover { opacity: 1; }
.port.out:hover { transform: scale(1.5); }
.port.in { position: absolute; left: -7px; top: 18px; background: #0f172a; }
.t-note { background: #fff8d6; border-color: #f0dfa8; width: 220px; }
.t-note .nhead { padding-bottom: 2px; }
.t-trigger { border-color: #9fd3f5; }

.bsim { width: 340px; flex: none; border-left: 1px solid var(--line); padding: 12px; display: flex; flex-direction: column; gap: 8px; background: #fafbfd; min-height: 0; }
.bsim .chat { flex: 1; min-height: 0; }
.bsim .row.tight { flex-wrap: wrap; }
.bsim .row.tight input { flex: 1; }
.simhead { display: flex; justify-content: space-between; align-items: center; }
.simstatus { font-size: 12.5px; background: #fff4d6; border: 1px solid #f0d98c; border-radius: 8px; padding: 6px 9px; }

@media (max-width: 820px) {
  .layout { flex-direction: column; }
  .side { width: auto; height: auto; position: static; flex-direction: row; flex-wrap: wrap; padding: 10px; }
  .side .logo { padding: 6px 10px; width: 100%; }
  .side .foot { margin: 0; width: 100%; }
  .main { padding: 16px; }
  .cols { grid-template-columns: 1fr; }
  .bar { grid-template-columns: 130px 1fr; }
  .barvalue { grid-column: 1 / -1; text-align: left; }
  .bpanel { width: 260px; }
  .bsim { position: absolute; right: 0; top: 0; bottom: 0; z-index: 6; }
}

/* ---------- topo, tema e menu que minimiza ---------- */
.topbar { display: flex; justify-content: flex-end; padding: 10px 28px 0; }
.topbar.floating { position: fixed; top: 0; right: 0; padding: 14px 18px; }
.themesw { display: inline-flex; border: 1px solid var(--line); border-radius: 99px; overflow: hidden; background: var(--panel); flex: none; }
.themesw button { border: 0; border-radius: 0; background: none; padding: 5px 12px; font-size: 12.5px; color: var(--muted); }
.themesw button.on { background: var(--brand); color: #fff; font-weight: 600; }
.side a em, .side .foot em { font-style: normal; }
/* Ícones do menu (icons.js): cinza claro, brancos no item aberto; WhatsApp e Instagram na cor da marca. */
.navicon { display: grid; place-items: center; width: 22px; height: 22px; flex: none; }
.ico { display: block; }
.side a .ico { opacity: .85; }
.side a:hover .ico, .side a.on .ico { opacity: 1; }
.brand-wa { color: #25d366; }
.brand-ig { color: #f0498f; }
.brand-fb { color: #2f8cff; }
.side a.on .brand-wa, .side a.on .brand-ig, .side a.on .brand-fb { color: #fff; }
.tileicon .brand-fb { color: #0a7cff; }
.side .foot .logout { display: flex; align-items: center; justify-content: center; gap: 6px; }

/* ---------- aba Planos e checkout em janela ---------- */
.pl-current h2 { margin: 4px 0 2px; font-size: 26px; }
.pl-current > .row { margin-bottom: 8px; }
.pl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.pl-card { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.pl-card h3 { margin: 0; font-size: 20px; }
.pl-card p { margin: 0; }
.pl-card.featured { border-color: var(--brand); box-shadow: 0 16px 40px color-mix(in srgb, var(--brand) 18%, transparent); }
.pl-card.mine { border-color: #16a34a; }
.pl-badge { position: absolute; top: -11px; left: 22px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 4px 10px; border-radius: 99px; }
.pl-price { margin: 6px 0; }
.pl-price b { font-size: 30px; letter-spacing: -.02em; }
.pl-price span { color: var(--muted); font-size: 13px; }
.pl-list { list-style: none; margin: 4px 0 8px; padding: 0; display: flex; flex-direction: column; gap: 8px; flex: 1; font-size: 13.5px; }
.pl-list li { position: relative; padding-left: 22px; }
.pl-list li::before { content: '✓'; position: absolute; left: 0; color: #16a34a; font-weight: 800; }
.ck-steps { display: flex; gap: 6px; margin: 4px 0 16px; }
.ck-steps span { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); padding-top: 8px; border-top: 3px solid var(--line); }
.ck-steps span.on { color: var(--text); border-top-color: var(--brand); }
.ck-steps b { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: 11px; background: var(--line); color: var(--muted); }
.ck-steps span.on b { background: var(--brand); color: #fff; }
.ck-summary { display: flex; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--bg); margin-bottom: 12px; }
.ck-summary div { display: flex; flex-direction: column; gap: 2px; }
.ck-summary div:last-child { text-align: right; }
.ck-summary span { font-size: 12px; color: var(--muted); }
.ck-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.ck-method { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 14px 16px; border-radius: 12px; text-align: left; white-space: normal; }
.ck-method span { font-size: 12.5px; color: var(--muted); font-weight: 400; }
.ck-method.on { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.cols3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ck-card { margin-bottom: 4px; }
.ck-pix { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; margin-bottom: 12px; }
.ck-pix img { background: #fff; padding: 8px; border-radius: 12px; image-rendering: pixelated; }
.ck-pix .row { width: 100%; }
.ck-pix input { flex: 1; min-width: 0; font-family: monospace; font-size: 12px; }
.ck-waiting { color: var(--muted); font-size: 13px; animation: ck-pulse 1.6s ease-in-out infinite; }
@keyframes ck-pulse { 50% { opacity: .45; } }
@media (max-width: 900px) { .pl-grid { grid-template-columns: 1fr; } .ck-methods { grid-template-columns: 1fr; } }

/* ---------- botão de suporte no WhatsApp (painel, canto inferior direito) ---------- */
.wa-float { position: fixed; right: 24px; bottom: 24px; z-index: 30; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%;
  background: #25d366; color: #fff; text-decoration: none; box-shadow: 0 10px 28px rgba(37, 211, 102, .4), 0 4px 10px rgba(0, 0, 0, .2); transition: transform .15s ease, box-shadow .15s ease; }
.wa-float:hover { transform: translateY(-2px) scale(1.05); box-shadow: 0 14px 34px rgba(37, 211, 102, .5), 0 4px 10px rgba(0, 0, 0, .2); }
.wa-float .ico { color: #fff; width: 30px; height: 30px; }
/* bolinha de "online" com um pulso suave */
.wa-dot { position: absolute; top: 3px; right: 3px; width: 14px; height: 14px; border-radius: 50%; background: #22c55e; border: 2.5px solid #fff; }
.wa-dot::after { content: ''; position: absolute; inset: -2.5px; border-radius: 50%; border: 2px solid #22c55e; animation: wa-ping 1.8s ease-out infinite; }
@keyframes wa-ping { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(2.2); opacity: 0; } }
/* balão com o texto, aparece ao passar o mouse */
.wa-tip { position: absolute; right: 72px; top: 50%; transform: translate(6px, -50%); opacity: 0; pointer-events: none; transition: opacity .15s ease, transform .15s ease;
  white-space: nowrap; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; box-shadow: 0 10px 28px rgba(0, 0, 0, .18);
  display: flex; flex-direction: column; gap: 1px; text-align: left; }
.wa-tip b { font-size: 13px; }
.wa-tip span { font-size: 11.5px; color: #16a34a; font-weight: 600; }
.wa-float:hover .wa-tip, .wa-float:focus-visible .wa-tip { opacity: 1; transform: translate(0, -50%); }
@media (prefers-reduced-motion: reduce) { .wa-dot::after { animation: none; } }
/* Em Conversas o canto inferior é o campo de resposta: lá o botão não aparece. */
.page-conversas .wa-float { display: none; }
@media (max-width: 820px) { .wa-float { right: 16px; bottom: 16px; width: 54px; height: 54px; } .wa-float .ico { width: 27px; height: 27px; } .wa-tip { display: none; } }

/* Item "IA" do menu: letras com o degradê correndo e saltinho alternado (como o selo da landing), brilho piscando */
.nav-ia { display: inline-flex; font-weight: 700; letter-spacing: .03em; }
.nav-ia span { display: inline-block; color: transparent; -webkit-background-clip: text; background-clip: text;
  background-image: linear-gradient(92deg, #a79dff, #e08bff, #ff9be6, #e08bff, #a79dff); background-size: 400% 100%;
  animation: lp-flow 2.4s linear infinite, lp-ia-hop 1.8s ease-in-out infinite; }
.nav-ia span + span { animation-delay: -.5s, .18s; }
.side a.on .nav-ia span { background-image: linear-gradient(92deg, #ffffff, #ffd9f6, #ffffff, #e9e4ff, #ffffff); }
.ico.spark { color: #d0a6ff; filter: drop-shadow(0 0 4px rgba(192, 139, 255, .55)); animation: nav-twinkle 2.6s ease-in-out infinite; transform-origin: center; }
.side a.on .ico.spark { color: #fff; }
.tileicon .ico.spark { color: var(--brand); }
@keyframes nav-twinkle { 0%, 100% { transform: scale(1) rotate(0deg); } 50% { transform: scale(1.15) rotate(12deg); } }
@media (prefers-reduced-motion: reduce) { .nav-ia span, .ico.spark { animation: none; } }

/* Menu em grupos, mais compacto */
.navlist { display: flex; flex-direction: column; gap: 12px; flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: none; }
.navlist::-webkit-scrollbar { display: none; }
.navgroup { display: flex; flex-direction: column; gap: 1px; }
.navtitle { padding: 2px 10px 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #5f6b82; }
.side a { padding: 6px 10px; font-size: 13.5px; gap: 9px; }
.navicon { width: 18px; height: 18px; }
.side a .ico { width: 18px; height: 18px; }
.side .foot .footinfo { display: block; margin: 0 -10px; padding: 8px 10px; border-radius: 10px; color: #8591a6; }
.side .foot .footinfo:hover { background: #1a2236; }
.side .foot .footinfo.on { background: #1f2740; color: #fff; }
.footmini { display: none !important; }
.layout.mini .footmini { display: flex !important; justify-content: center; }
.layout.mini .navtitle { display: none; }
.layout.mini .navgroup + .navgroup { border-top: 1px solid #1f2940; padding-top: 10px; }
.layout.mini .side a .ico { width: 20px; height: 20px; }
/* Celular: barra no topo com o logo e o botão ☰; o menu completo, com os mesmos grupos do computador,
   abre numa gaveta lateral (mesmos ícones, mesma animação da IA). Tocar fora fecha. */
.navburger, .navshade { display: none; }
.navburger { border: 0; background: none; color: #fff; padding: 6px; border-radius: 10px; place-items: center; }
.navburger .when-open, .layout.menu-open .navburger .when-closed { display: none; }
.layout.menu-open .navburger .when-open { display: block; }
[data-theme=dark] .navburger { background: none; }
@media (max-width: 820px) {
  .side, .layout.mini .side { position: sticky; top: 0; z-index: 40; width: auto; height: auto; flex-direction: row; flex-wrap: nowrap; align-items: center; justify-content: space-between; padding: 10px 14px; }
  .sidetop, .layout.mini .sidetop { width: auto; padding: 0; flex-direction: row; }
  .sidetop .chev { display: none; }
  .side .logo, .layout.mini .sidetop .logo { width: auto; padding: 0; font-size: 20px; }
  .layout.mini .sidetop .logo span { display: inline; }
  .navburger { display: grid; }
  .side .navlist, .side .foot { display: none; }
  .layout.menu-open .side { position: fixed; top: 0; bottom: 0; left: 0; width: 280px; z-index: 50; flex-direction: column; align-items: stretch; justify-content: flex-start;
    gap: 6px; padding: 16px 12px; overflow-y: auto; box-shadow: 12px 0 40px rgba(0, 0, 0, .45); }
  .layout.menu-open .sidetop { justify-content: space-between; padding: 0 0 10px; }
  .layout.menu-open .navburger { position: absolute; top: 12px; right: 10px; }
  /* Na gaveta quem rola é ela inteira: a lista não encolhe, senão os últimos itens (Canais, Minha conta…)
     ficavam escondidos atrás do rodapé numa rolagem sem barra. */
  .layout.menu-open .side .navlist { display: flex; flex: none; overflow: visible; }
  .layout.menu-open .side .foot { display: block; padding: 10px 0 0; }
  .layout.menu-open .navshade { display: block; position: fixed; inset: 0; z-index: 45; background: rgba(5, 8, 15, .5); }
  /* Se o menu estava minimizado no computador, na gaveta ele aparece completo */
  .layout.menu-open .side a { justify-content: flex-start; padding: 9px 10px; font-size: 14.5px; }
  .layout.menu-open .side a em { display: inline; }
  .layout.menu-open .side .nav-ia { display: inline-flex; }
  .layout.menu-open .navtitle { display: block; }
  .layout.menu-open .navgroup + .navgroup { border-top: 0; padding-top: 0; }
  .layout.menu-open .side .foot .footinfo { display: block; }
  .layout.menu-open .footmini { display: none !important; }
  .layout.menu-open .side .foot em { display: inline; }
  .layout.menu-open .side .foot .logout { width: 100%; margin-top: 8px; }
}
.tileicon { color: var(--brand); }
[data-theme=dark] .tileicon { color: #a9a1ff; }
.tileicon .brand-wa { color: #1fb655; }
.tileicon .brand-ig { color: #e1306c; }
.sidetop { display: flex; align-items: center; justify-content: space-between; width: 100%; border: 0; background: none; color: #fff; padding: 0 10px 16px 0; border-radius: 8px; }
.sidetop .logo { padding: 0 10px; }
.sidetop .chev { color: #8591a6; font-size: 16px; transition: transform .15s; }
.sidetop:hover .chev { color: #fff; }
/* Menu minimizado: só no computador. No celular essas regras vinham depois das do celular e venciam,
   e a barra do topo virava um quadradinho "VL ☰" quando o logo era tocado. */
@media (min-width: 821px) {
  .side { transition: width .15s; }
  .layout.mini .side { width: 62px; padding-left: 8px; padding-right: 8px; }
  .layout.mini .side a { justify-content: center; padding: 9px 0; }
  .layout.mini .side a em, .layout.mini .side .foot em, .layout.mini .footinfo, .layout.mini .sidetop .logo span { display: none; }
  .layout.mini .sidetop { flex-direction: column; gap: 6px; padding: 0 0 12px; }
  .layout.mini .sidetop .logo { padding: 0; font-size: 17px; }
  .layout.mini .sidetop .chev { transform: rotate(180deg); }
  .layout.mini .side .foot { padding: 10px 0; }
  .layout.mini .side a .navicon { width: 24px; height: 24px; }
  .layout.mini .side a .ico { width: 21px; height: 21px; }
}
/* Celular: uma barra só no topo (logo, Claro/Escuro e ☰). O seletor de tema sobe para dentro dela e o
   logo grande da página Início some, para não parecer que há dois menus. */
@media (max-width: 820px) {
  .side, .layout.mini .side { min-height: 56px; }
  .content > .topbar { position: fixed; top: 0; right: 58px; height: 56px; z-index: 41; padding: 0; align-items: center; }
  .content > .topbar .themesw button { padding: 4px 10px; font-size: 12px; }
  .page-inicio .hero { display: none; }
}

/* ---------- página Início ---------- */
.hero { text-align: center; padding: 6px 0 18px; }
.hero-logo { font-size: 44px; letter-spacing: .04em; padding: 0; color: var(--text); line-height: 1.1; }
.hero-logo span { color: var(--brand); }
.hero p { margin: 4px 0 0; }
h2.section { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 22px 0 10px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.tile { display: flex; gap: 12px; align-items: flex-start; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; text-decoration: none; color: var(--text); transition: border-color .12s, transform .12s, box-shadow .12s; }
.tile:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(15, 21, 36, .1); }
.tileicon { width: 42px; height: 42px; border-radius: 10px; background: var(--brand-soft); display: grid; place-items: center; font-size: 20px; flex: none; }
.tile b { font-size: 15px; }
.tilenum { margin-top: 6px; font-size: 12.5px; font-weight: 600; color: var(--brand-dark); }

/* ---------- tema escuro ---------- */
:root[data-theme=dark] {
  color-scheme: dark;
  --bg: #0a0d16; --panel: #141a29; --line: #273149; --text: #e6eaf2; --muted: #96a2ba;
  --brand-soft: #262052; --side: #070a12; --wa: #0f5a47; --wa-bg: #0b141a;
}
[data-theme=dark] a, [data-theme=dark] button.link, [data-theme=dark] .chips button, [data-theme=dark] .nhits, [data-theme=dark] .tilenum, [data-theme=dark] .flowname:hover { color: #a9a1ff; }
[data-theme=dark] .side a { color: #b9c2d3; }
[data-theme=dark] .side a:hover, [data-theme=dark] .side a.on, [data-theme=dark] .btn.primary { color: #fff; }
[data-theme=dark] .side { border-right: 1px solid var(--line); }
[data-theme=dark] .flowname, [data-theme=dark] .tile { color: var(--text); }
[data-theme=dark] button, [data-theme=dark] .btn, [data-theme=dark] input, [data-theme=dark] select, [data-theme=dark] textarea { background: #1b2336; }
[data-theme=dark] button:hover, [data-theme=dark] .btn:hover, [data-theme=dark] .node:hover { border-color: #40507a; }
[data-theme=dark] button.primary, [data-theme=dark] .btn.primary { background: var(--brand); }
[data-theme=dark] button.primary.red { background: var(--red); }
[data-theme=dark] button.link, [data-theme=dark] .themesw button, [data-theme=dark] .sidetop, [data-theme=dark] .nbtn { background: none; }
[data-theme=dark] .themesw button.on { background: var(--brand); }
[data-theme=dark] .chips button { background: var(--brand-soft); }
[data-theme=dark] input:focus, [data-theme=dark] select:focus, [data-theme=dark] textarea:focus { outline-color: #4a3fd0; }
[data-theme=dark] code, [data-theme=dark] .code, [data-theme=dark] .tag, [data-theme=dark] .bartrack, [data-theme=dark] .nicon, [data-theme=dark] .nbtn:hover { background: #222b40; }
[data-theme=dark] .tag.ok { background: #123524; color: #6ee7a0; }
[data-theme=dark] .tag.bad { background: #3d1a1d; color: #ff9a9e; }
[data-theme=dark] .tag.wait { background: #3b2f10; color: #f5c453; }
[data-theme=dark] .tag.info { background: #132c47; color: #7cc0ff; }
[data-theme=dark] .note, [data-theme=dark] .banner, [data-theme=dark] .simstatus { background: #2e250e; border-color: #5c4a17; color: #f1dfae; }
[data-theme=dark] .stat.hl { background: #0f2a1c; }
[data-theme=dark] .switch i { background: #3a4763; }
[data-theme=dark] .switch input:checked + i { background: var(--green); }
[data-theme=dark] .tabs button.on { background: var(--brand); border-color: var(--brand); }
[data-theme=dark] .toast { background: #2a3450; }
[data-theme=dark] .modal > div, [data-theme=dark] .builder, [data-theme=dark] .pcard, [data-theme=dark] .rule { background: var(--panel); }
[data-theme=dark] .bpanel, [data-theme=dark] .bsim { background: #0f1420; }
[data-theme=dark] .bubble { color: #e9edef; }
[data-theme=dark] .bubble.in { background: #202c33; }
[data-theme=dark] .bubble.sms.out, [data-theme=dark] .nbody .bubble.sms { background: #1d3a5c; }
[data-theme=dark] .nbody .bubble.sms { outline-color: #141d2b; }
[data-theme=dark] .btime { color: #9fb0b8; }
[data-theme=dark] .canvas { background-color: #0c111d; background-image: radial-gradient(#2a3450 1.2px, transparent 1.2px); }
[data-theme=dark] .node { background: #182033; box-shadow: 0 2px 10px rgba(0, 0, 0, .35); }
[data-theme=dark] .node.sel { border-color: var(--brand); box-shadow: 0 0 0 3px #3b3470, 0 4px 14px rgba(0, 0, 0, .4); }
[data-theme=dark] .node.running { border-color: var(--orange); box-shadow: 0 0 0 3px #5c4410; }
[data-theme=dark] .port { border-color: #182033; }
[data-theme=dark] .port.in, [data-theme=dark] .c-dark { background: #cbd5e1; }
[data-theme=dark] .elabel.c-dark { color: #0f172a; }
[data-theme=dark] .t-note { background: #3a3312; border-color: #6b5a1c; }
[data-theme=dark] .t-trigger { border-color: #2b5d85; }
[data-theme=dark] .t-whatsapp .nicon, [data-theme=dark] .t-audio .nicon { background: #123524; }
[data-theme=dark] .t-sms .nicon { background: #132c47; }
[data-theme=dark] .t-trigger .nicon { background: #10324a; }
[data-theme=dark] .t-wait .nicon { background: #3b2f10; }
[data-theme=dark] .t-condition .nicon, [data-theme=dark] .t-random .nicon { background: #2a2452; }
[data-theme=dark] .t-handoff .nicon, [data-theme=dark] .t-webhook .nicon { background: #3d1a24; }
[data-theme=dark] .tile:hover { box-shadow: 0 6px 18px rgba(0, 0, 0, .4); }

/* ---------- telas largas (Full HD em diante) ---------- */
/* O conteúdo ocupa a largura disponível até um limite e fica centralizado, em vez de encostar na esquerda. */
.main { max-width: 1560px; margin: 0 auto; width: 100%; }
.topbar, .banner { padding-left: max(28px, calc((100% - 1560px) / 2 + 28px)); padding-right: max(28px, calc((100% - 1560px) / 2 + 28px)); }
.topbar.floating { padding: 14px 18px; }
/* Métricas e blocos de acesso em colunas fixas, para as linhas fecharem certinhas (8 métricas, 10 blocos). */
@media (min-width: 1100px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1500px) {
  .tiles { grid-template-columns: repeat(5, 1fr); }
  .main { padding: 30px 36px; }
  .hero-logo { font-size: 52px; }
  .stat b { font-size: 28px; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
}
@media (min-width: 821px) and (max-width: 1499px) {
  .tiles { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
}

/* ---------- página Canais: uma área por tipo (WhatsApp, SMS, E-mail) ---------- */
.chsection { --ch: var(--brand); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; margin-bottom: 18px; overflow: hidden; }
.chsection.whatsapp { --ch: #25d366; }
.chsection.sms { --ch: #1c7ed6; }
.chsection.email { --ch: #f08c00; }
.chhead { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, color-mix(in srgb, var(--ch) 13%, transparent), transparent 70%); flex-wrap: wrap; }
.chhead h2 { margin: 0 0 2px; font-size: 18px; }
.chsummary { font-size: 12.5px; font-weight: 600; color: var(--muted); background: var(--bg); border: 1px solid var(--line); border-radius: 99px; padding: 3px 10px; white-space: nowrap; }
.chicon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; color: #fff; background: var(--brand); }
.chicon svg { width: 26px; height: 26px; }
.chicon.whatsapp { background: #25d366; }
.chicon.sms { background: #1c7ed6; }
.chicon.email { background: #f08c00; }
.chgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 14px; padding: 16px 18px; }
.chempty { padding: 22px 18px; color: var(--muted); text-align: center; }
.chcard { border: 1px solid var(--line); border-left: 4px solid var(--ch); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; background: var(--bg); }
.chcard.off { border-left-color: var(--gray); }
.chtop { display: flex; align-items: center; gap: 12px; }
.chtop .chicon { width: 40px; height: 40px; border-radius: 50%; }
.chtop .chicon svg { width: 23px; height: 23px; }
.chcard.off .chicon { background: var(--gray); }
.chname { flex: 1; min-width: 0; }
.chnumber { font-size: 18px; font-weight: 700; letter-spacing: .01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chstatus { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: #fdf1d3; color: #9a6500; white-space: nowrap; flex: none; }
.chstatus i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.chstatus.connected { background: #dff5e8; color: #0b7a3b; }
.chstatus.connected i { box-shadow: 0 0 0 3px rgba(18, 161, 80, .2); }
.chstatus.disconnected, .chstatus.error { background: #fde4e4; color: #c0343a; }
.chbadges { display: flex; gap: 6px; flex-wrap: wrap; }
.chfacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.chfact { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.chfact span { font-size: 11px; color: var(--muted); }
.chfact b { font-size: 16px; }
.chactions { display: flex; gap: 8px; flex-wrap: wrap; }
.chcard details { margin: 0; background: var(--panel); }
.chcard details .row { margin-top: 6px; flex-wrap: wrap; }
[data-theme=dark] .chstatus { background: #3b2f10; color: #f5c453; }
[data-theme=dark] .chstatus.connected { background: #123524; color: #6ee7a0; }
[data-theme=dark] .chstatus.disconnected, [data-theme=dark] .chstatus.error { background: #3d1a1d; color: #ff9a9e; }
@media (max-width: 820px) { .chgrid { grid-template-columns: 1fr; } }
.chfacts { grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); }
.chfact b { white-space: nowrap; font-size: 15px; }

/* ---------- e-mail ---------- */
.bubble.email.out { background: #fff3dc; }
.nbody .bubble.email { background: #fff3dc; outline-color: #f6efe2; }
.t-email .nicon { background: #ffe9c2; }
.mailpreview { background: #fff; color: #131a26; border: 1px solid var(--line); border-radius: 10px; padding: 14px; font-size: 13px; line-height: 1.5; }
.mailsubject { font-weight: 700; font-size: 14px; padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px solid #e1e6ee; }
.mailbody { white-space: pre-wrap; overflow-wrap: anywhere; }
.mailbutton { display: inline-block; margin-top: 12px; background: #5b4bff; color: #fff; font-weight: 700; padding: 8px 16px; border-radius: 8px; }
.mailfoot { margin-top: 14px; padding-top: 8px; border-top: 1px solid #e1e6ee; font-size: 11px; color: #647084; }
[data-theme=dark] .bubble.email.out, [data-theme=dark] .nbody .bubble.email { background: #4a3710; }
[data-theme=dark] .nbody .bubble.email { outline-color: #1d1a12; }
[data-theme=dark] .t-email .nicon { background: #3b2f10; }
/* 11 blocos de acesso na Início: 4 colunas fecham melhor que 5. */
@media (min-width: 1500px) { .tiles { grid-template-columns: repeat(4, 1fr); } }

/* ---------- tela de login (e página de descadastro): tudo centralizado ---------- */
.auth { max-width: 400px; min-height: 100vh; margin: 0 auto; padding: 24px 16px; display: flex; flex-direction: column; justify-content: center; text-align: center; }
.auth .logo.big { font-size: 42px; letter-spacing: .04em; padding: 0 0 4px; }
.auth > p { margin-bottom: 18px; }
.auth .card { text-align: left; padding: 22px; margin-bottom: 0; box-shadow: 0 10px 30px rgba(15, 21, 36, .08); }
.auth .card h1 { text-align: center; margin-bottom: 10px; }
.auth button.block { margin-top: 12px; padding: 10px; }

/* ---------- login/cadastro e uso do plano ---------- */
.authtabs { display: flex; gap: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 4px; margin-bottom: 6px; }
.authtabs button { flex: 1; border: 0; background: none; color: var(--muted); font-weight: 600; }
.authtabs button.on { background: var(--brand); color: #fff; }
[data-theme=dark] .authtabs button { background: none; }
[data-theme=dark] .authtabs button.on { background: var(--brand); }
.planbox { margin-top: 14px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 10px; text-align: center; }
.usage { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.usagerow { display: grid; grid-template-columns: 90px 1fr 80px; gap: 10px; align-items: center; font-size: 13px; }
.usagerow b { text-align: right; font-size: 13px; }
.usagerow .bartrack i.near { background: var(--orange); }
.usagerow .bartrack i.full { background: var(--red); }
.usage.compact { gap: 5px; margin: 6px 0 0; }
.usage.compact .usagerow { grid-template-columns: 58px 1fr 52px; gap: 6px; font-size: 11px; }
.usage.compact .usagerow b { font-size: 11px; font-weight: 600; color: #b9c2d3; }
.usage.compact .bartrack { height: 5px; background: #26323e; }
.planname { margin-top: 6px; color: #b9c2d3; font-weight: 600; }
.side .footinfo .clip { max-width: 180px; }

/* ---------- administração ---------- */
.bigcode { font-size: 18px; padding: 8px 14px; letter-spacing: .04em; }
.modal .chfacts { margin-bottom: 4px; }

.center-link { display: block; margin: 12px auto 0; }
.auth .card h2 { text-align: center; }
.auth .card > p { text-align: center; }

/* Minha conta: os dados podem quebrar linha (nome de loja e e-mail longos). */
.card > .chfacts { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-bottom: 6px; }
.card > .chfacts .chfact b { white-space: normal; overflow-wrap: anywhere; }

/* ---------- anexos nas conversas ---------- */
.bmedia { display: block; max-width: 300px; max-height: 300px; border-radius: 8px; margin-bottom: 4px; }
audio.bmedia { width: 280px; height: 40px; }
.bfile { display: inline-block; font-weight: 600; color: #1c4fb5; text-decoration: none; padding: 4px 0; overflow-wrap: anywhere; }
[data-theme=dark] .bubble .bfile { color: #9cc4ff; }
.attach { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--brand-soft); border-radius: 8px; padding: 7px 11px; font-size: 13px; }
.bfile { display: block; }
.bubble img.bmedia { max-width: 100%; }

/* ---------- página IA ---------- */
.aigrid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 14px; align-items: start; }
.aiside { position: sticky; top: 14px; display: flex; flex-direction: column; gap: 8px; }
.aitest { height: 46vh; min-height: 280px; }
.aiside .row.tight input { flex: 1; }
.faq { border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.upsell ul { margin: 0 0 12px; padding-left: 20px; }
.upsell li { margin: 5px 0; }
.bnote { align-self: center; max-width: 92%; text-align: center; font-size: 12.5px; background: #fff4d6; color: #5c4a17; border: 1px dashed #e0c877; border-radius: 8px; padding: 6px 10px; white-space: pre-wrap; }
[data-theme=dark] .bnote { background: #2e250e; color: #f1dfae; border-color: #5c4a17; }
.t-ai .nicon { background: #ebe7ff; }
[data-theme=dark] .t-ai .nicon { background: #2a2452; }
@media (max-width: 1100px) { .aigrid { grid-template-columns: 1fr; } .aiside { position: static; } }

/* Botão de confirmação de ação destrutiva (Excluir, Bloquear…): fundo vermelho com texto branco.
   Sem isto, a regra de "texto vermelho" dos botões de perigo deixava o texto invisível sobre o fundo. */
button.primary.red, .btn.primary.red, [data-theme=dark] button.primary.red { background: var(--red); border-color: var(--red); color: #fff; }
button.primary.red:hover, [data-theme=dark] button.primary.red:hover { background: #cc3b40; border-color: #cc3b40; }

/* ---------- página de apresentação (landing) ---------- */
.lp { min-height: 100vh; background: var(--bg); }
.lp-wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.lp button { font-size: 14.5px; }
.lp-logo { border: 0; background: none; padding: 0; font-weight: 800; font-size: 24px; letter-spacing: -.01em; color: var(--text); }
.lp-logo span { color: var(--brand); }
[data-theme=dark] .lp-logo { background: none; }
[data-theme=dark] .lp-logo span { color: #8f84ff; }

.lp-nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.lp-nav .lp-wrap { display: flex; align-items: center; gap: 18px; height: 64px; }
.lp-nav nav { display: flex; gap: 2px; margin: 0 auto; }
.lp-nav nav button, .lp-footer nav button, .lp-login { border: 0; background: none; color: var(--muted); font-weight: 600; padding: 8px 12px; border-radius: 8px; }
.lp-nav nav button:hover, .lp-footer nav button:hover, .lp-login:hover { color: var(--text); background: var(--brand-soft); }
[data-theme=dark] .lp-nav nav button, [data-theme=dark] .lp-footer nav button, [data-theme=dark] .lp-login { background: none; }
[data-theme=dark] .lp-nav nav button:hover, [data-theme=dark] .lp-footer nav button:hover, [data-theme=dark] .lp-login:hover { background: var(--brand-soft); }
.lp-actions { display: flex; align-items: center; gap: 8px; }
.lp button.big { padding: 12px 22px; font-size: 15.5px; border-radius: 10px; }

.lp-hero { padding: 72px 0 56px; background: radial-gradient(900px 420px at 78% 0%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 70%); }
.lp-hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 48px; align-items: center; }
.lp-pill, .lp-eyebrow { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-dark); }
.lp-pill { background: var(--brand-soft); padding: 5px 12px; border-radius: 99px; }
[data-theme=dark] .lp-pill, [data-theme=dark] .lp-eyebrow { color: #a9a1ff; }
.lp-hero h1 { font-size: clamp(34px, 4.6vw, 54px); line-height: 1.08; letter-spacing: -.025em; margin: 18px 0 16px; }
.lp-hero h1 em { font-style: normal; color: var(--brand); }
[data-theme=dark] .lp-hero h1 em { color: #8f84ff; }
.lp-sub { font-size: 18px; line-height: 1.55; color: var(--muted); max-width: 540px; margin-bottom: 26px; }
.lp-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.lp-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.lp-list li { position: relative; padding-left: 26px; }
.lp-list li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--green); font-weight: 800; }
.lp-list.inline { flex-direction: row; flex-wrap: wrap; gap: 8px 22px; font-size: 13.5px; color: var(--muted); }

.lp-node { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--bg); }
.lp-node i { width: 30px; height: 30px; border-radius: 50%; flex: none; }
.lp-node i.sky { background: #4cc2ff; } .lp-node i.orange { background: #ffb02e; } .lp-node i.green { background: #25d366; }
.lp-node small { display: block; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

.lp-section { padding: 64px 0; scroll-margin-top: 64px; }
.lp-head { text-align: center; max-width: 640px; margin: 0 auto 34px; }
.lp-section h2 { font-size: clamp(26px, 3vw, 34px); letter-spacing: -.02em; line-height: 1.15; margin: 10px 0 10px; }
.lp-section p { color: var(--muted); font-size: 16px; line-height: 1.55; }
.lp-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.lp-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 22px; transition: transform .15s, border-color .15s; }
.lp-card:hover { transform: translateY(-3px); border-color: var(--brand); }
.lp-icon { width: 42px; height: 42px; border-radius: 11px; background: var(--brand-soft); display: grid; place-items: center; font-size: 20px; }
.lp-card h3, .lp-step h3 { font-size: 17px; margin: 14px 0 6px; }
.lp-card p, .lp-step p { font-size: 14.5px; margin: 0; }

.lp-split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.lp-split .lp-list { margin: 18px 0; }
.lp-tag { display: inline-block; font-size: 12.5px; font-weight: 700; color: var(--brand-dark); background: var(--brand-soft); padding: 5px 12px; border-radius: 99px; }
[data-theme=dark] .lp-tag { color: #a9a1ff; }
.lp-chat { border-radius: 18px; padding: 22px; gap: 10px; box-shadow: 0 24px 60px rgba(15, 21, 36, .12); }
.lp-chat .bubble { font-size: 14.5px; }

.lp-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.lp-step { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.lp-step > span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; font-size: 17px; }

.lp-plans { display: grid; grid-template-columns: repeat(2, minmax(0, 360px)); gap: 18px; justify-content: center; }
.lp-plan { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.lp-plan.featured { border-color: var(--brand); box-shadow: 0 18px 50px color-mix(in srgb, var(--brand) 22%, transparent); }
.lp-plan h3 { margin: 0; font-size: 18px; }
.lp-price { font-size: 34px; font-weight: 800; letter-spacing: -.02em; }
.lp-price small { font-size: 14px; font-weight: 500; color: var(--muted); }
.lp-plan .lp-list { flex: 1; font-size: 14.5px; }
.lp-plan button.block { margin-top: 4px; padding: 11px; }
.lp-badge { position: absolute; top: -12px; right: 20px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 99px; }

.lp-faq { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.lp-faq details { margin: 0; background: var(--panel); border-radius: 12px; padding: 14px 18px; }
.lp-faq summary { font-size: 15.5px; }
.lp-faq p { margin: 10px 0 2px; font-size: 14.5px; }

.lp-final { text-align: center; padding: 56px 24px; margin: 20px 0 64px; border-radius: 22px; color: #fff; background: linear-gradient(135deg, #6a5bff, #3a2ad0); }
.lp-final h2 { font-size: clamp(24px, 3vw, 32px); letter-spacing: -.02em; margin: 0 0 10px; }
.lp-final p { color: rgba(255, 255, 255, .85); font-size: 16px; margin-bottom: 22px; }
.lp-final button.primary, [data-theme=dark] .lp-final button.primary { background: #fff; border-color: #fff; color: #3a2ad0; }
.lp-final button.primary:hover { background: #eceaff; }

.lp-footer { border-top: 1px solid var(--line); padding: 26px 0 34px; }
.lp-footer .lp-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.lp-footer nav { display: flex; flex-wrap: wrap; gap: 2px; margin-right: auto; }
.auth a.logo { display: block; text-decoration: none; }
.auth a.center-link { text-align: center; text-decoration: none; }

@media (max-width: 900px) {
  .lp-nav nav { display: none; }
  .lp-actions { margin-left: auto; }
  .lp-hero { padding: 44px 0 36px; }
  .lp-hero-grid, .lp-split { grid-template-columns: 1fr; gap: 32px; }
  .lp-cards, .lp-steps { grid-template-columns: 1fr; }
  .lp-plans { grid-template-columns: minmax(0, 420px); }
  .lp-section { padding: 44px 0; }
}
/* Celular: o "Claro | Escuro" vira um botão só, com sol ou lua, que troca para o outro tema. */
@media (max-width: 520px) {
  .lp-nav .themesw { border-radius: 10px; }
  .lp-nav .themesw button.on { display: none; }
  .lp-nav .themesw button { font-size: 0; padding: 6px 9px; line-height: 1; }
  .lp-nav .themesw button::before { font-size: 16px; }
  .lp-nav .themesw button:first-child::before { content: '☀'; }
  .lp-nav .themesw button:last-child::before { content: '☾'; }
  .lp-nav .lp-actions { gap: 6px; }
}
/* Celular: os links das seções quebram em linhas, todos à vista (antes corriam para o lado e Planos/Dúvidas sumiam). */
@media (max-width: 600px) {
  .lp-nav nav { flex-wrap: wrap; justify-content: center; overflow: visible; gap: 2px 0; }
  .lp-nav nav button { padding: 5px 10px; font-size: 13px; }
}

/* ---------- login em duas colunas ---------- */
.auth2 { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); background: var(--bg); }
.auth-brand { position: relative; overflow: hidden; color: #fff; padding: 48px 56px; display: flex; flex-direction: column;
  background:
    radial-gradient(620px 420px at 82% 12%, rgba(255, 255, 255, .16), transparent 70%),
    radial-gradient(520px 520px at 8% 96%, rgba(20, 8, 90, .55), transparent 70%),
    linear-gradient(140deg, #6f5cff 0%, #5140e8 45%, #3722b8 100%); }
/* pontilhado discreto por cima do degradê */
.auth-brand::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .13) 1.2px, transparent 1.2px); background-size: 26px 26px; mask-image: linear-gradient(180deg, #000, transparent 85%); pointer-events: none; }
.auth-logo { position: relative; font-weight: 800; font-size: 30px; letter-spacing: -.01em; color: #fff; text-decoration: none; }
.auth-logo span { color: #cfc9ff; }
.auth-logo.mobile { display: none; color: var(--text); margin-bottom: 22px; }
.auth-logo.mobile span { color: var(--brand); }
.auth-pitch { position: relative; margin-top: auto; max-width: 520px; padding-bottom: 12px; }
.auth-pill { display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; border: 1px solid rgba(255, 255, 255, .45); border-radius: 99px; padding: 5px 14px; }
.auth-pitch h1 { font-size: clamp(30px, 3.5vw, 46px); line-height: 1.1; letter-spacing: -.025em; margin: 18px 0 14px; }
.auth-pitch p { font-size: 16.5px; line-height: 1.55; color: rgba(255, 255, 255, .84); margin: 0; }
.auth-glass { position: absolute; display: flex; align-items: center; gap: 12px; width: 250px; padding: 14px 16px; border-radius: 16px; background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .24); backdrop-filter: blur(6px); box-shadow: 0 18px 40px rgba(20, 8, 90, .25); animation: auth-float 7s ease-in-out infinite; }
.auth-glass span { width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .92); display: grid; place-items: center; font-size: 18px; flex: none; }
.auth-glass div { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.auth-glass b { font-size: 13px; }
.auth-glass i { display: block; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .5); }
.auth-glass i.short { width: 60%; background: rgba(255, 255, 255, .28); }
.auth-glass.g1 { top: 19%; left: 9%; }
.auth-glass.g2 { top: 27%; right: 8%; animation-delay: -2.3s; }
.auth-glass.g3 { top: 44%; left: 30%; animation-delay: -4.6s; }
@keyframes auth-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .auth-glass { animation: none; } }

.auth-side { position: relative; display: flex; align-items: center; justify-content: center; padding: 72px 28px 40px; }
.auth-box { width: 100%; max-width: 430px; }
.auth-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--brand-dark); }
[data-theme=dark] .auth-eyebrow { color: #a9a1ff; }
.auth-box > h1 { font-size: 30px; letter-spacing: -.02em; margin: 10px 0 8px; }
.auth-box > p { margin-bottom: 22px; font-size: 15px; }
.auth-box .card { padding: 26px; border-radius: 16px; margin-bottom: 0; box-shadow: 0 14px 40px rgba(15, 21, 36, .08); }
.auth-box .card input { padding: 12px 13px; border-radius: 10px; }
.auth-box .card label { font-size: 13.5px; margin-bottom: 6px; }
.auth-box .card .field { margin: 14px 0; }
.auth-box button.block { margin-top: 14px; padding: 13px; border-radius: 10px; font-size: 15px; letter-spacing: .02em; }
.auth-box .authtabs { margin-bottom: 4px; }
.auth-box a.center-link { display: block; text-align: center; margin-top: 18px; text-decoration: none; }
.pw { position: relative; }
.pw input { padding-right: 46px !important; }
.pw button { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); border: 0; background: none; font-size: 16px; padding: 6px 8px; opacity: .7; }
.pw button:hover { opacity: 1; }
[data-theme=dark] .pw button { background: none; }

@media (max-width: 900px) {
  .auth2 { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-logo.mobile { display: inline-block; }
  .auth-side { padding-top: 64px; align-items: flex-start; }
}

/* O painel da marca ocupa sempre a altura da tela, mesmo quando o formulário (cadastro) rola. */
.auth2 { align-items: start; }
.auth-brand { position: sticky; top: 0; height: 100vh; }
.auth-side { min-height: 100vh; }

/* ---------- landing: abertura centralizada com a palavra que troca ---------- */
.lp-hero { padding: 76px 0 60px; text-align: center; background:
  radial-gradient(760px 380px at 50% -6%, color-mix(in srgb, var(--brand) 20%, transparent), transparent 70%); }
.lp-hero-center { display: flex; flex-direction: column; align-items: center; }
.lp-hero h1 { font-size: clamp(32px, 6.2vw, 66px); line-height: 1.08; letter-spacing: -.03em; margin: 22px 0 18px; max-width: 900px; }
.lp-hero h1 > span { display: block; }
/* Palavra animada: as letras entram em cascata e o degradê corre por elas sem parar. */
.lp-rotate { position: relative; padding-bottom: .12em; white-space: nowrap; }
.lp-rotate::before { content: ''; position: absolute; left: 50%; top: 50%; width: min(60%, 420px); height: 70%; transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, #a25bff 45%, transparent), transparent); filter: blur(22px); z-index: -1; animation: lp-glow 2.8s ease-in-out infinite; pointer-events: none; }
.lp-hero-center { isolation: isolate; }
.lp-rotate > span { display: inline-block; transform-origin: 50% 100%; color: transparent; -webkit-background-clip: text; background-clip: text;
  background-image: linear-gradient(92deg, #5b4bff, #a25bff, #ff6ad5, #a25bff, #5b4bff); background-size: 400% 100%;
  animation: lp-letter-in .55s cubic-bezier(.2, 1.4, .4, 1) both, lp-flow 3.2s linear infinite;
  animation-delay: calc(var(--i) * 45ms), calc(var(--i) * -160ms); }
[data-theme=dark] .lp-rotate > span { background-image: linear-gradient(92deg, #8f84ff, #c08bff, #ff8fe0, #c08bff, #8f84ff); }
.lp-rotate.out > span { animation: lp-letter-out .3s ease-in both, lp-flow 3.2s linear infinite; animation-delay: calc(var(--i) * 25ms), calc(var(--i) * -160ms); }
@keyframes lp-letter-in { from { opacity: 0; transform: perspective(400px) translateY(.55em) rotateX(-80deg) scale(.8); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes lp-letter-out { from { opacity: 1; transform: none; filter: none; } to { opacity: 0; transform: perspective(400px) translateY(-.45em) rotateX(70deg); filter: blur(6px); } }
@keyframes lp-flow { to { background-position: 133.33% 0; } }
@keyframes lp-glow { 0%, 100% { opacity: .35; transform: translate(-50%, -50%) scale(.9); } 50% { opacity: .8; transform: translate(-50%, -50%) scale(1.1); } }
@media (prefers-reduced-motion: reduce) { .lp-rotate > span, .lp-rotate.out > span, .lp-rotate::before { animation: none; } }
.lp-hero .lp-sub { max-width: 620px; margin: 0 auto 28px; font-size: clamp(16px, 2.2vw, 19px); }
.lp-hero .lp-cta { justify-content: center; margin-bottom: 20px; }
.lp-hero .lp-list.inline { justify-content: center; }
/* miniatura do fluxo deitada, logo abaixo dos botões */

/* ---------- landing no celular e no tablet ---------- */
@media (max-width: 900px) {
  /* os botões das seções viram uma faixa que desliza na horizontal, logo abaixo do logo */
  .lp-nav .lp-wrap { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 8px; gap: 8px 12px; }
  .lp-nav nav { display: flex; order: 3; width: 100%; margin: 0; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .lp-nav nav::-webkit-scrollbar { display: none; }
  .lp-nav nav button { white-space: nowrap; padding: 6px 12px; font-size: 13.5px; }
  .lp-section { scroll-margin-top: 104px; }
  .lp-hero { padding: 44px 0 40px; }
  .lp-split > .lp-chat { order: 2; }
  .lp-head { margin-bottom: 24px; }
}
@media (max-width: 600px) {
  .lp-wrap { padding: 0 16px; }
  .lp-actions .primary { padding: 7px 11px; font-size: 13.5px; }
  .lp-login { padding: 7px 8px; }
  .lp-hero .lp-cta { flex-direction: column; align-self: stretch; }
  .lp-hero .lp-cta button { width: 100%; }
  .lp-hero .lp-list.inline { flex-direction: column; align-items: center; gap: 6px; }
  .lp-card, .lp-step { padding: 18px; }
  .lp-plan { padding: 22px; }
  .lp-price { font-size: 30px; }
  .lp-chat { padding: 14px; }
  .lp-final { padding: 40px 18px; margin: 8px 0 44px; border-radius: 18px; }
  .lp-final button.big { width: 100%; }
  .lp-footer .lp-wrap { flex-direction: column; align-items: flex-start; }
  .lp-footer nav { margin: 0 0 0 -12px; }
}

/* ---------- seletor de tema sem ícones: dois textos discretos, o ativo em destaque suave ---------- */
.themesw { gap: 2px; padding: 3px; overflow: visible; background: color-mix(in srgb, var(--line) 55%, transparent); }
.themesw button { border-radius: 99px; padding: 3px 11px; font-size: 11.5px; font-weight: 500; letter-spacing: .01em; line-height: 1.4; box-shadow: none; }
.themesw button.on, [data-theme=dark] .themesw button.on { background: var(--panel); color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(15, 21, 36, .14); }
[data-theme=dark] .themesw button.on { background: color-mix(in srgb, var(--brand) 38%, var(--panel)); color: #fff; }

/* canal que o plano não inclui, nas barras de uso */
.usagerow.off .bartrack { display: none; }
.usagerow.off b { grid-column: 2 / 4; font-weight: 500; color: var(--muted); }

/* ---------- landing: três planos em cartões (nome, para quem é, preço, botão, o que está incluído) ---------- */
.lp-plans { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; max-width: 1080px; margin: 0 auto; }
.lp-plan { padding: 0; gap: 0; overflow: hidden; border-radius: 18px; }
.lp-plan-head { position: relative; padding: 26px 20px 20px; text-align: center; border-bottom: 1px solid var(--line); }
.lp-plan-head h3 { margin: 0 0 4px; font-size: 22px; letter-spacing: -.01em; }
.lp-plan-head p { margin: 0; font-size: 13.5px; color: var(--muted); }
.lp-plan.featured { transform: translateY(-8px); }
.lp-plan.featured .lp-plan-head { background: linear-gradient(135deg, #5b4bff, #8a5bff); border-bottom-color: transparent; padding-top: 40px; }
.lp-plan.featured .lp-plan-head h3, .lp-plan.featured .lp-plan-head p { color: #fff; }
.lp-plan.featured .lp-plan-head p { opacity: .88; }
.lp-badge { top: 10px; left: 50%; right: auto; transform: translateX(-50%); background: rgba(255, 255, 255, .2); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.lp-plan-body { display: flex; flex-direction: column; flex: 1; padding: 24px 24px 28px; }
.lp-price { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 0 4px; margin-bottom: 18px; font-size: inherit; }
.lp-price b { font-size: 56px; line-height: 1; font-weight: 800; letter-spacing: -.04em; color: var(--brand); }
[data-theme=dark] .lp-price b { color: #a79dff; }
.lp-price small { margin-top: 8px; font-size: 15px; font-weight: 600; color: var(--muted); }
.lp-price span { flex-basis: 100%; margin-top: 6px; text-align: center; font-size: 13.5px; color: var(--muted); }
.lp-plan button.block { margin: 0; padding: 13px; }
.lp-included { margin: 24px 0 14px; text-align: center; font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.lp-plan .lp-list { gap: 12px; font-size: 14px; color: var(--muted); }
.lp-plan .lp-list b { color: var(--text); font-weight: 600; }
.lp-plan .lp-list .lp-plus { color: var(--brand); }
[data-theme=dark] .lp-plan .lp-list .lp-plus { color: #a79dff; }
.lp-plan .lp-list li::before { content: ""; top: 2px; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--brand);
  background: no-repeat center / 9px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.4l2.3 2.3 4.7-5' fill='none' stroke='%237c6cff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.lp-plans-note { max-width: 720px; margin: 26px auto 0; text-align: center; font-size: 13px; color: var(--muted); }
@media (max-width: 900px) {
  .lp-plans { grid-template-columns: minmax(0, 440px); justify-content: center; }
  .lp-plan.featured { transform: none; }
}
@media (max-width: 600px) { .lp-plan { padding: 0; } .lp-plan-body { padding: 20px 18px 24px; } .lp-price b { font-size: 48px; } }

/* ---------- landing: fluxo de demonstração (blocos arrastáveis ligados por setas) ---------- */
.lp-flow { margin-top: 48px; width: 100%; max-width: 980px; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 60px rgba(15, 21, 36, .12); overflow: hidden; }
.lp-flow-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.lp-flow-bar b { color: var(--text); }
.lp-flow-bar button { flex: none; font-size: 13px; }
.lp-flow-canvas { position: relative; height: 300px; overflow: hidden; user-select: none;
  background: radial-gradient(color-mix(in srgb, var(--muted) 28%, transparent) 1px, transparent 1.4px) 0 0 / 22px 22px, var(--bg); }
.lp-flow-canvas svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.lp-flow-canvas svg path { fill: none; stroke: var(--brand); stroke-width: 2; stroke-dasharray: 6 5; animation: lp-dash 1.2s linear infinite; }
.lp-flow-canvas svg marker path { fill: var(--brand); stroke: none; animation: none; }
@keyframes lp-dash { to { stroke-dashoffset: -22; } }
.lp-flow-canvas .lp-node { position: absolute; background: var(--panel); cursor: grab; touch-action: none; box-shadow: 0 4px 14px rgba(15, 21, 36, .08); transition: box-shadow .15s, border-color .15s; }
.lp-flow-canvas .lp-node:hover { border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); }
.lp-flow-canvas .lp-node.dragging { cursor: grabbing; z-index: 3; border-color: var(--brand); box-shadow: 0 14px 34px color-mix(in srgb, var(--brand) 28%, transparent); }
.lp-flow-canvas .lp-node > div { min-width: 0; }
.lp-flow-canvas .lp-node b { display: block; font-size: 13.5px; line-height: 1.3; }
.lp-node i.purple { background: #8a5bff; }
.lp-flow-label { position: absolute; transform: translate(-50%, -50%); z-index: 1; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 99px; color: #fff; white-space: nowrap; pointer-events: none; }
.lp-flow-label.ok { background: var(--green); } .lp-flow-label.no { background: var(--red); }
.lp-flow-canvas.narrow .lp-node { padding: 10px 11px; gap: 9px; }
.lp-flow-canvas.narrow .lp-node i { width: 22px; height: 22px; }
@media (prefers-reduced-motion: reduce) { .lp-flow-canvas svg path { animation: none; } }
@media (max-width: 600px) { .lp-flow { margin-top: 34px; } .lp-flow-bar { padding: 10px 14px; font-size: 12.5px; } }

/* ---------- landing: logo um pouco maior e o "IA" do selo com letras animadas ---------- */
.lp button.lp-logo { font-size: 30px; line-height: 1; }
@media (max-width: 600px) { .lp button.lp-logo { font-size: 26px; } }
.lp-pill { display: inline-flex; align-items: center; white-space: pre; }
/* ---------- landing: bloco do Instagram (Reels com comentário → conversa no direct) ---------- */
.lp-ig { width: 100%; max-width: 380px; margin: 0 auto; background: var(--panel); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; box-shadow: 0 24px 60px rgba(15, 21, 36, .12); }
.lp-ig-reel { position: relative; height: 190px; background: linear-gradient(135deg, #feda75, #fa7e1e 25%, #d62976 55%, #962fbf 80%, #4f5bd5); }
.lp-ig-play { position: absolute; inset: 0; display: grid; place-items: center; font-size: 34px; color: rgba(255, 255, 255, .85); }
.lp-ig-comment { position: absolute; left: 14px; right: 14px; bottom: 14px; display: flex; gap: 10px; align-items: center; background: rgba(255, 255, 255, .94); color: #131a26; border-radius: 14px; padding: 9px 12px; font-size: 13.5px; }
.lp-ig-comment i { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; flex: none; background: var(--brand); color: #fff; font-style: normal; font-weight: 700; font-size: 12px; }
.lp-ig-dm { padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.lp-ig-top { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.lp-ig-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; }
.lp-ig-b { max-width: 82%; padding: 9px 13px; border-radius: 18px; font-size: 13.5px; }
.lp-ig-b.out { align-self: flex-start; background: var(--bg); border: 1px solid var(--line); }
.lp-ig-b.in { align-self: flex-end; color: #fff; background: linear-gradient(135deg, #7c5cff, #c13584); }
.lp-ig-btn { display: block; margin-top: 8px; text-align: center; border: 1px solid #c13584; color: #c13584; border-radius: 99px; padding: 5px 10px; font-weight: 600; font-size: 12.5px; }
.lp-ig-url { color: #3b82f6; }
[data-theme=dark] .lp-ig-url { color: #60a5fa; }
/* os balões entram um depois do outro quando o bloco aparece na tela */
.lp-ig .s1, .lp-ig .s2, .lp-ig .s3, .lp-ig .s4 { opacity: 0; transform: translateY(10px); }
.lp-ig.play .s1 { animation: lp-ig-in .5s ease forwards .2s; }
.lp-ig.play .s2 { animation: lp-ig-in .5s ease forwards .9s; }
.lp-ig.play .s3 { animation: lp-ig-in .5s ease forwards 1.6s; }
.lp-ig.play .s4 { animation: lp-ig-in .5s ease forwards 2.2s; }
@keyframes lp-ig-in { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .lp-ig .s1, .lp-ig .s2, .lp-ig .s3, .lp-ig .s4 { opacity: 1; transform: none; animation: none; } }
.lp-ig-steps { list-style: none; padding: 0; margin: 22px 0; display: flex; flex-direction: column; gap: 14px; }
.lp-ig-steps li { display: flex; align-items: center; gap: 12px; }
.lp-ig-steps li > span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; flex: none; color: #fff; font-weight: 700; font-size: 13px; background: linear-gradient(135deg, #7c5cff, #c13584); }
.lp-ig-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.lp-ig-chips span { font-size: 12.5px; padding: 5px 12px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); }
@media (max-width: 900px) { .lp-split > .lp-ig { order: 2; } }

/* ---------- landing: canais com símbolo colorido (faixa e planos) ---------- */
.lp-ch { display: inline-flex; align-items: center; gap: 8px; }
.lp-ch > i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; flex: none; color: #fff; box-shadow: 0 4px 12px rgba(15, 21, 36, .15); }
.lp-ch .ico { color: #fff; width: 16px; height: 16px; }
.lp-ch.wa > i { background: #25d366; }
.lp-ch.ig > i { background: linear-gradient(135deg, #feda75, #fa7e1e 25%, #d62976 55%, #962fbf 80%, #4f5bd5); }
.lp-ch.fb > i { background: linear-gradient(135deg, #0099ff, #a033ff); }
.lp-ch.sms > i { background: #64748b; }
.lp-ch.mail > i { background: #7c5cff; }
.lp-ch b { font-size: 14px; font-weight: 600; }
.lp-channels { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 14px 26px; padding: 22px 24px; margin: 8px 0 0; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.lp-channels > span { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.lp-channels > div { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 22px; }
.lp-plan-channels { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; font-size: 13px; color: var(--muted); }
.lp-plan-channels > div { display: flex; gap: 6px; }
.lp-plan-channels .lp-ch > i { width: 28px; height: 28px; }

/* ---------- landing: seções no formato texto + maquete ---------- */
/* No celular as seções viram uma coluna: o texto vem primeiro e a maquete depois, dos dois lados. */
@media (max-width: 900px) { .lp-split.reverse > :first-child { order: 2; } }
.lp-split .lp-tag { margin-top: 4px; }
.lp-card-mock { width: 100%; max-width: 440px; margin: 0 auto; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 18px; box-shadow: 0 24px 60px rgba(15, 21, 36, .12); display: flex; flex-direction: column; gap: 10px; }
.lp-mock-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.lp-mock-head > div { display: flex; flex-direction: column; flex: 1; }
.lp-mock-head span { font-size: 12px; color: var(--muted); }
.lp-badge-ok { font-size: 11.5px !important; font-weight: 700; color: #16a34a !important; background: color-mix(in srgb, #16a34a 14%, transparent); padding: 4px 10px; border-radius: 99px; }
/* recuperação: linha do tempo do pedido */
.lp-tl-row { display: grid; grid-template-columns: 12px 1fr auto; gap: 12px; align-items: center; padding: 6px 2px; position: relative; }
.lp-tl-row > i { width: 12px; height: 12px; border-radius: 50%; }
.lp-tl-row > i.bad { background: var(--red); } .lp-tl-row > i.wait { background: var(--orange); } .lp-tl-row > i.ok { background: #16a34a; box-shadow: 0 0 0 4px color-mix(in srgb, #16a34a 20%, transparent); }
.lp-tl-row + .lp-tl-row::before { content: ''; position: absolute; left: 7.5px; top: -10px; height: 16px; border-left: 1.5px dashed var(--line); }
.lp-tl-row div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lp-tl-row b { font-size: 14px; }
.lp-tl-row span { font-size: 12.5px; color: var(--muted); }
.lp-tl-row time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
/* messenger */
.lp-fb-avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: #fff; font-weight: 800; background: linear-gradient(135deg, #0099ff, #a033ff); flex: none; font-size: 15px !important; }
.lp-fbm .lp-mock-head { justify-content: flex-start; }
.lp-mock-head .lp-fb-avatar { color: #fff; }
.lp-fb-greet { margin: 4px 0 0; text-align: center; font-size: 13px; color: var(--muted); }
.lp-fb-ice { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.lp-fb-ice span { font-size: 12.5px; padding: 6px 12px; border-radius: 99px; border: 1px solid #0a7cff; color: #0a7cff; }
.lp-fb-b { max-width: 80%; padding: 9px 13px; border-radius: 18px; font-size: 13.5px; }
.lp-fb-b.in { align-self: flex-end; color: #fff; background: linear-gradient(135deg, #0099ff, #a033ff); }
.lp-fb-b.out { align-self: flex-start; background: var(--bg); border: 1px solid var(--line); }
.lp-fb-qr { align-self: flex-start; }
.lp-fb-qr span { display: inline-block; font-size: 12.5px; font-weight: 600; padding: 6px 12px; border-radius: 99px; border: 1px solid #0a7cff; color: #0a7cff; }
/* conversas */
.lp-in-tabs { display: flex; gap: 6px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.lp-in-tabs span { font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 5px 10px; border-radius: 8px; }
.lp-in-tabs span.on { background: var(--brand-soft); color: var(--brand); }
.lp-in-tabs em { font-style: normal; font-size: 10.5px; background: var(--brand); color: #fff; padding: 1px 6px; border-radius: 99px; }
.lp-in-row { display: flex; align-items: center; gap: 12px; padding: 6px 0; }
.lp-in-row > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.lp-in-row > div > span:not(.stage) { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.lp-in-top { display: flex; align-items: center; gap: 8px; }
.lp-in-top b { font-size: 14px; }
.lp-in-top .lp-ch > i { width: 18px; height: 18px; box-shadow: none; }
.lp-in-top .lp-ch .ico { width: 11px; height: 11px; }
.lp-in-row > em { font-style: normal; min-width: 20px; height: 20px; border-radius: 99px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
/* sms e e-mail */
.lp-mail-wrap { position: relative; width: 100%; max-width: 440px; margin: 0 auto; padding-bottom: 40px; }
.lp-mail { gap: 12px; }
.lp-mail-meta { display: flex; flex-direction: column; gap: 2px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.lp-mail-meta span { font-size: 13px; color: var(--muted); }
.lp-mail p { margin: 0; font-size: 14px; }
.lp-mail-btn { align-self: flex-start; background: var(--brand); color: #fff; font-weight: 700; font-size: 13.5px; padding: 10px 18px; border-radius: 10px; }
.lp-mail small { font-size: 11.5px; color: var(--muted); text-decoration: underline; }
.lp-sms { position: absolute; right: -10px; bottom: 0; max-width: 250px; background: #e9edf3; color: #131a26; border-radius: 18px 18px 4px 18px; padding: 10px 14px; font-size: 13px; box-shadow: 0 16px 40px rgba(15, 21, 36, .18); display: flex; flex-direction: column; gap: 3px; }
.lp-sms small { font-size: 10.5px; color: #647084; font-weight: 600; }
@media (max-width: 600px) { .lp-sms { position: static; margin: 12px 0 0 auto; } .lp-mail-wrap { padding-bottom: 0; } }

/* ---------- landing: o palco do construtor de fluxos (escuro no tema escuro; versão clara logo abaixo) ---------- */
.lp-stage { position: relative; margin: 40px 0; padding: 96px 0 88px; color: #e8ecf6; overflow: hidden;
  background: radial-gradient(900px 420px at 15% 0%, rgba(124, 92, 255, .28), transparent 60%), radial-gradient(800px 420px at 90% 100%, rgba(37, 211, 102, .16), transparent 60%), #070a12; }
.lp-stage::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1.4px) 0 0 / 26px 26px; mask-image: radial-gradient(ellipse at center, #000 40%, transparent 85%); }
.lp-stage .lp-wrap { position: relative; }
.lp-stage-head { text-align: center; max-width: 720px; margin: 0 auto 40px; }
.lp-stage-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #9ff0bf;
  padding: 6px 14px; border-radius: 99px; background: rgba(37, 211, 102, .1); border: 1px solid rgba(37, 211, 102, .3); }
.lp-stage-eyebrow .ico { color: #25d366; }
/* Selo "com IA" ao lado do selo do WhatsApp: letras animadas como no selo da abertura */
.lp-stage-tags { display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; }
.lp-stage-ai { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #d9c8ff;
  padding: 6px 14px; border-radius: 99px; background: linear-gradient(135deg, rgba(124, 92, 255, .16), rgba(255, 106, 213, .12)); border: 1px solid rgba(168, 120, 255, .4);
  box-shadow: 0 0 22px rgba(168, 120, 255, .25); }
.lp-stage-ai .lp-ia { font-size: 1.15em; }
[data-theme=light] .lp-stage-ai { color: #6d3fd6; border-color: rgba(124, 92, 255, .35); box-shadow: 0 0 18px rgba(124, 92, 255, .15); }
.lp-stage h2 { font-size: clamp(30px, 4.6vw, 52px); line-height: 1.08; letter-spacing: -.03em; margin: 18px 0 14px; color: #fff; }
.lp-grad { background: linear-gradient(92deg, #a79dff, #e08bff 45%, #6ee7a8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp-stage-head p { font-size: 17px; color: #a3adc2; margin: 0; }
.lp-stage .lp-flow { max-width: none; margin: 0; background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .1); border-radius: 22px;
  box-shadow: 0 0 0 1px rgba(124, 92, 255, .15), 0 40px 120px rgba(0, 0, 0, .55), 0 0 80px rgba(124, 92, 255, .18); backdrop-filter: blur(6px); }
.lp-stage .lp-flow-bar { color: #a3adc2; border-bottom-color: rgba(255, 255, 255, .08); justify-content: flex-start; }
.lp-stage .lp-flow-bar b { color: #fff; }
.lp-stage .lp-flow-bar button { margin-left: auto; color: #c4bdff; background: none; }
.lp-dots { display: flex; gap: 6px; margin-right: 6px; }
.lp-dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .15); }
.lp-stage .lp-flow-canvas { background: radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1.4px) 0 0 / 22px 22px, transparent; }
.lp-stage .lp-flow-canvas svg path { stroke: #8f84ff; stroke-width: 2; filter: drop-shadow(0 0 6px rgba(143, 132, 255, .7)); }
.lp-stage .lp-flow-canvas svg marker path { fill: #8f84ff; filter: none; }
.lp-pulse { fill: #fff; filter: drop-shadow(0 0 6px #b8f5d0) drop-shadow(0 0 12px #25d366); }
.lp-stage .lp-node { background: rgba(20, 26, 41, .82); border: 1px solid rgba(255, 255, 255, .1); color: #e8ecf6; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); backdrop-filter: blur(8px); }
.lp-stage .lp-node small { color: #8b96ad; }
.lp-stage .lp-node:hover { border-color: rgba(143, 132, 255, .6); }
.lp-stage .lp-node.dragging { border-color: #8f84ff; box-shadow: 0 0 0 1px #8f84ff, 0 20px 50px rgba(124, 92, 255, .45); }
.lp-node i.pink { background: #f472b6; }
.lp-stage .lp-node i { box-shadow: 0 0 14px currentColor; }
.lp-node-tag { display: inline-block; margin-top: 4px; font-style: normal; font-size: 10.5px; font-weight: 600; color: #6ee7a8; animation: lp-tag-blink 1.6s ease-in-out infinite; }
@keyframes lp-tag-blink { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
.lp-stage-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 28px; }
.lp-stage-chips span { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: #d6dcea; padding: 8px 16px; border-radius: 99px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); }
.lp-stage-chips i { font-style: normal; }
.lp-stage-cta { display: flex; justify-content: center; margin-top: 30px; }
.lp-stage-cta .primary { box-shadow: 0 12px 40px rgba(124, 92, 255, .45); }
@media (prefers-reduced-motion: reduce) { .lp-pulse { display: none; } .lp-node-tag { animation: none; } }
@media (max-width: 600px) { .lp-stage { padding: 64px 0 56px; margin: 24px 0; } .lp-stage-chips span { font-size: 12.5px; padding: 7px 12px; } }
/* ---------- landing no celular: tudo centralizado ---------- */
@media (max-width: 900px) {
  .lp-split-text { display: flex; flex-direction: column; align-items: center; text-align: center; }
  .lp-split-text .lp-list, .lp-split-text .lp-ig-steps { align-items: center; }
  .lp-split-text .lp-list li { text-align: left; }
  .lp-split-text .lp-ig-steps li { text-align: left; }
  .lp-ig-chips { justify-content: center; }
  .lp-channels { flex-direction: column; text-align: center; }
  .lp-step { text-align: center; }
  .lp-step > span { margin: 0 auto; }
  .lp-stage-head, .lp-stage-chips { text-align: center; justify-content: center; }
  .lp-plan-channels { justify-content: center; }
  .lp-faq summary { text-align: center; }
  .lp-faq details p { text-align: center; }
  .lp-footer .lp-wrap { flex-direction: column; align-items: center; text-align: center; }
  .lp-footer nav { margin: 0; justify-content: center; }
}

/* Tema claro: o mesmo palco em versão clara (luz lilás e verde sobre fundo quase branco, blocos de vidro branco). */
[data-theme=light] .lp-stage { color: var(--text);
  background: radial-gradient(900px 420px at 15% 0%, rgba(124, 92, 255, .16), transparent 60%), radial-gradient(800px 420px at 90% 100%, rgba(37, 211, 102, .12), transparent 60%), #f7f6ff; }
[data-theme=light] .lp-stage::before { background: radial-gradient(rgba(91, 75, 255, .14) 1px, transparent 1.4px) 0 0 / 26px 26px; }
[data-theme=light] .lp-stage h2 { color: #131a26; }
[data-theme=light] .lp-grad { background-image: linear-gradient(92deg, #5b4bff, #a24bd6 45%, #12a150); }
[data-theme=light] .lp-stage-head p { color: #5b6578; }
[data-theme=light] .lp-stage-eyebrow { color: #0f7a3d; background: rgba(37, 211, 102, .12); border-color: rgba(18, 161, 80, .3); }
[data-theme=light] .lp-stage-eyebrow .ico { color: #12a150; }
[data-theme=light] .lp-stage .lp-flow { background: rgba(255, 255, 255, .7); border-color: rgba(91, 75, 255, .18);
  box-shadow: 0 0 0 1px rgba(124, 92, 255, .08), 0 40px 100px rgba(60, 50, 140, .16), 0 0 80px rgba(124, 92, 255, .12); }
[data-theme=light] .lp-stage .lp-flow-bar { color: #5b6578; border-bottom-color: rgba(19, 26, 38, .08); }
[data-theme=light] .lp-stage .lp-flow-bar b { color: #131a26; }
[data-theme=light] .lp-stage .lp-flow-bar button { color: var(--brand); }
[data-theme=light] .lp-dots i { background: rgba(19, 26, 38, .14); }
[data-theme=light] .lp-stage .lp-flow-canvas { background: radial-gradient(rgba(91, 75, 255, .12) 1px, transparent 1.4px) 0 0 / 22px 22px, transparent; }
[data-theme=light] .lp-stage .lp-flow-canvas svg path { stroke: #6a5bff; filter: drop-shadow(0 0 4px rgba(106, 91, 255, .35)); }
[data-theme=light] .lp-stage .lp-flow-canvas svg marker path { fill: #6a5bff; filter: none; }
[data-theme=light] .lp-pulse { fill: #6a5bff; filter: drop-shadow(0 0 6px rgba(106, 91, 255, .7)); }
[data-theme=light] .lp-stage .lp-node { background: rgba(255, 255, 255, .9); border-color: rgba(19, 26, 38, .08); color: #131a26; box-shadow: 0 10px 30px rgba(60, 50, 140, .1); }
[data-theme=light] .lp-stage .lp-node small { color: #7a8497; }
[data-theme=light] .lp-stage .lp-node i { box-shadow: none; }
[data-theme=light] .lp-node-tag { color: #12a150; }
[data-theme=light] .lp-stage-chips span { color: #39445a; background: rgba(255, 255, 255, .8); border-color: rgba(19, 26, 38, .08); box-shadow: 0 4px 14px rgba(60, 50, 140, .06); }

/* Com o Instagram o selo ficou mais longo: no celular a letra diminui um pouco para caber numa linha. */
@media (max-width: 600px) { .lp-hero .lp-pill { font-size: 10.5px; letter-spacing: .04em; padding: 5px 10px; } }
.lp-ia { display: inline-flex; font-size: 1.25em; font-weight: 800; letter-spacing: .04em; line-height: 1; }
.lp-ia > span { display: inline-block; color: transparent; -webkit-background-clip: text; background-clip: text;
  background-image: linear-gradient(92deg, #5b4bff, #c04bff, #ff6ad5, #c04bff, #5b4bff); background-size: 400% 100%;
  animation: lp-flow 2.4s linear infinite, lp-ia-hop 1.8s ease-in-out infinite; }
.lp-ia > span + span { animation-delay: -.5s, .18s; }
[data-theme=dark] .lp-ia > span { background-image: linear-gradient(92deg, #a79dff, #e08bff, #ff9be6, #e08bff, #a79dff); }
@keyframes lp-ia-hop { 0%, 55%, 100% { transform: none; } 25% { transform: translateY(-3px) scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .lp-ia > span { animation: none; } }

/* Entre 900 e 1060 px o cabeçalho da landing não cabe em uma linha: as seções descem para a faixa de baixo, como no celular. */
@media (max-width: 1060px) {
  .lp-nav .lp-wrap { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 8px; gap: 8px 12px; }
  .lp-nav nav { display: flex; order: 3; width: 100%; margin: 0; overflow-x: auto; scrollbar-width: none; }
  .lp-nav nav::-webkit-scrollbar { display: none; }
  .lp-nav nav button { white-space: nowrap; }
  .lp-nav .lp-actions { margin-left: auto; }
  .lp-section { scroll-margin-top: 104px; }
}

/* ---------- Conversas: lista | conversa | ficha do cliente ---------- */
/* Cores das etapas: cada etiqueta usa a sua --c para a bolinha, o texto e um fundo bem leve. */
.stg-novo { --c: #3b82f6; } .stg-atendimento { --c: #8b5cf6; } .stg-negociando { --c: #f59e0b; } .stg-pagamento { --c: #eab308; }
.stg-fechado { --c: #16a34a; } .stg-pos_venda { --c: #0d9488; } .stg-perdido { --c: #94a3b8; } .stg-none { --c: var(--muted); }
.stage { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; line-height: 1; padding: 5px 10px; border-radius: 99px; white-space: nowrap;
  color: color-mix(in srgb, var(--c) 82%, var(--text)); background: color-mix(in srgb, var(--c) 13%, transparent); border: 0; }
.stage i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); flex: none; }
.stage.sm { font-size: 11px; padding: 3px 8px; gap: 5px; }
.stage em { font-style: normal; opacity: .7; font-weight: 500; }

.avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; flex: none; font-size: 14px; font-weight: 700; letter-spacing: .02em; color: #fff; }
.avatar.big { width: 64px; height: 64px; font-size: 22px; }
.av0 { background: linear-gradient(135deg, #6a5bff, #9b7bff); } .av1 { background: linear-gradient(135deg, #0ea5e9, #38bdf8); } .av2 { background: linear-gradient(135deg, #10b981, #34d399); }
.av3 { background: linear-gradient(135deg, #f59e0b, #fbbf24); } .av4 { background: linear-gradient(135deg, #ec4899, #f472b6); } .av5 { background: linear-gradient(135deg, #64748b, #94a3b8); }

.cv { display: grid; grid-template-columns: 320px minmax(0, 1fr) 280px; height: calc(100vh - 150px); min-height: 540px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; position: relative; }
.cv-list { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); }
.cv-search { padding: 14px 14px 10px; }
.cv-search input { width: 100%; border-radius: 10px; background: var(--bg); border-color: transparent; }
.cv-modes { display: flex; gap: 4px; padding: 0 14px 10px; }
.cv-modes button { flex: 1; border: 0; background: none; border-radius: 8px; padding: 6px 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.cv-modes button.on { background: var(--brand-soft); color: var(--brand); }
.cv-modes em { font-style: normal; margin-left: 5px; font-size: 11px; background: var(--brand); color: #fff; border-radius: 99px; padding: 1px 6px; }
/* filtro por canal e o símbolo do canal no canto da foto */
.cv-channels { display: flex; gap: 4px; padding: 0 14px 10px; overflow-x: auto; scrollbar-width: none; }
.cv-channels::-webkit-scrollbar { display: none; }
.cv-channels button { display: inline-flex; align-items: center; gap: 6px; flex: none; border: 1px solid var(--line); background: none; border-radius: 99px; padding: 5px 11px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.cv-channels button.on { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.cv-channels .wa .ico { color: #25d366; } .cv-channels .ig .ico { color: #e1306c; } .cv-channels .fb .ico { color: #0a7cff; }
[data-theme=dark] .cv-channels button { background: none; }
[data-theme=dark] .cv-channels button.on { background: var(--brand-soft); color: #c4bdff; }
.cv-av { position: relative; flex: none; }
.cv-via { position: absolute; right: -3px; bottom: -3px; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--panel); }
.cv-via .ico { color: #fff; width: 10px; height: 10px; }
.cv-via.wa { background: #25d366; } .cv-via.ig { background: linear-gradient(135deg, #fa7e1e, #d62976 50%, #962fbf); } .cv-via.fb { background: linear-gradient(135deg, #0099ff, #a033ff); }
.cv-via.sms { background: #64748b; } .cv-via.mail { background: #7c5cff; }
.cv-stages { display: flex; gap: 6px; padding: 0 14px 12px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); flex: none; }
.cv-stages::-webkit-scrollbar { display: none; }
.cv-stages .stage { cursor: pointer; opacity: .75; }
.cv-stages .stage:hover, .cv-stages .stage.on { opacity: 1; }
.cv-stages .stage.on { box-shadow: inset 0 0 0 1.5px var(--c); }
.cv-items { overflow-y: auto; flex: 1; }
.cv-item { display: flex; gap: 12px; width: 100%; text-align: left; border: 0; border-radius: 0; background: none; padding: 12px 14px; border-left: 3px solid transparent; white-space: normal; }
.cv-item:hover { background: color-mix(in srgb, var(--brand) 5%, transparent); }
.cv-item.on { background: color-mix(in srgb, var(--brand) 9%, transparent); border-left-color: var(--brand); }
.cv-item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cv-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.cv-line b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-time { font-size: 11.5px; color: var(--muted); flex: none; }
.cv-preview { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-item.unread .cv-preview { color: var(--text); font-weight: 600; }
.cv-item.unread .cv-time { color: var(--brand); font-weight: 600; }
.cv-badge { flex: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.cv-tags { display: flex; gap: 6px; margin-top: 3px; flex-wrap: wrap; }
.cv-human { font-size: 11px; font-weight: 600; color: var(--orange); }
.cv-none { color: var(--muted); font-size: 13px; text-align: center; padding: 28px 14px; }

.cv-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.cv-empty { display: grid; place-items: center; color: var(--muted); }
.cv-top { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.cv-who { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.cv-who b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-who span { font-size: 12.5px; color: var(--muted); }
.cv-actions { display: flex; align-items: center; gap: 8px; }
.stage-select { appearance: none; -webkit-appearance: none; border: 0; border-radius: 99px; padding: 7px 28px 7px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer;
  color: color-mix(in srgb, var(--c) 82%, var(--text)); background: color-mix(in srgb, var(--c) 13%, transparent) no-repeat right 11px center / 9px
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23889' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); }
/* No tema escuro, a regra geral de botões e campos pinta o fundo: aqui ela é desfeita para os itens da caixa de entrada. */
[data-theme=dark] .stage-select { background: color-mix(in srgb, var(--c) 18%, transparent) no-repeat right 11px center / 9px
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23aab' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); }
[data-theme=dark] .cv-item, [data-theme=dark] .cv-modes button { background: none; }
[data-theme=dark] .cv-item:hover { background: color-mix(in srgb, var(--brand) 8%, transparent); }
[data-theme=dark] .cv-item.on { background: color-mix(in srgb, var(--brand) 16%, transparent); }
[data-theme=dark] .cv-modes button.on { background: var(--brand-soft); color: #c4bdff; }
[data-theme=dark] .cv-stages .stage { background: color-mix(in srgb, var(--c) 18%, transparent); }
.cv-bot { display: inline-flex; align-items: center; gap: 7px; border-radius: 99px; padding: 6px 12px; font-size: 12.5px; font-weight: 600; background: none; }
.cv-bot i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 25%, transparent); }
.cv-bot.off i { background: var(--orange); box-shadow: 0 0 0 3px color-mix(in srgb, var(--orange) 25%, transparent); }
[data-theme=dark] .cv-bot { background: none; }
.cv-info, .cv-back { border: 0; background: none; font-size: 18px; padding: 4px 8px; color: var(--muted); }
.cv-info { display: none; }
[data-theme=dark] .cv-info, [data-theme=dark] .cv-back { background: none; }

.cv-thread { flex: 1; overflow-y: auto; padding: 18px 22px; display: flex; flex-direction: column; gap: 6px; background: var(--wa-bg); }
.cv-thread .bubble { max-width: 72%; font-size: 14px; padding: 8px 12px; border-radius: 12px; }
.cv-day { align-self: center; margin: 10px 0 4px; }
.cv-day span { font-size: 11.5px; font-weight: 600; color: var(--muted); background: var(--panel); padding: 4px 12px; border-radius: 99px; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); text-transform: capitalize; }

.cv-compose { position: relative; border-top: 1px solid var(--line); padding: 10px 14px 12px; display: flex; flex-direction: column; gap: 8px; }
.cv-input { display: flex; align-items: flex-end; gap: 6px; }
.cv-input .icon { border: 0; background: none; font-size: 18px; padding: 8px; border-radius: 10px; color: var(--muted); }
.cv-input .icon:hover { background: var(--bg); }
[data-theme=dark] .cv-input .icon { background: none; }
.cv-input textarea { flex: 1; resize: none; min-height: 42px; max-height: 160px; border-radius: 12px; background: var(--bg); border-color: transparent; padding: 10px 14px; line-height: 1.4; }
.cv-send { border-radius: 12px; padding: 10px 18px; }
.cv-quick { position: absolute; left: 14px; right: 14px; bottom: calc(100% - 4px); max-height: 280px; overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(15, 21, 36, .16); padding: 6px; z-index: 5; }
.cv-quick button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; text-align: left; border: 0; background: none; border-radius: 8px; padding: 8px 10px; white-space: normal; }
.cv-quick button:hover { background: var(--brand-soft); }
.cv-quick button span { font-size: 12.5px; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
[data-theme=dark] .cv-quick button { background: none; }
[data-theme=dark] .cv-quick button:hover { background: var(--brand-soft); }
.cv-blocked { border-top: 1px solid var(--line); padding: 16px 20px; font-size: 13px; color: var(--muted); text-align: center; }

.cv-side { border-left: 1px solid var(--line); overflow-y: auto; padding: 22px 18px; display: flex; flex-direction: column; gap: 12px; background: var(--panel); }
.cv-profile { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding-bottom: 6px; }
.cv-profile b { font-size: 16px; margin-top: 4px; }
.cv-profile > span:not(.stage) { font-size: 13px; color: var(--muted); }
.cv-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cv-facts div, .cv-field { background: var(--bg); border-radius: 10px; padding: 8px 6px; text-align: center; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cv-facts span, .cv-field span { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.cv-facts b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-field { text-align: left; padding: 8px 10px; }
.cv-field b { font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.cv-side h4 { margin: 6px 0 0; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); display: flex; justify-content: space-between; }
.cv-orders { display: flex; flex-direction: column; gap: 6px; }
.cv-order { display: flex; justify-content: space-between; gap: 8px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; }
.cv-order > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cv-order > div:last-child { align-items: flex-end; }
.cv-order span { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-side textarea { resize: vertical; font-size: 13px; border-radius: 10px; background: var(--bg); border-color: transparent; }
.cv-saved { color: var(--green); text-transform: none; letter-spacing: 0; font-weight: 600; }
.cv-links { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: auto; padding-top: 8px; font-size: 13px; }
.cv-links .link { padding: 0; font-size: 13px; }

/* Telas médias: a ficha do cliente vira uma gaveta aberta pelo botão ⓘ. */
@media (max-width: 1280px) {
  .cv { grid-template-columns: 300px minmax(0, 1fr); }
  .cv-info { display: inline-block; }
  .cv-side { position: absolute; top: 0; right: 0; bottom: 0; width: 290px; z-index: 6; box-shadow: -12px 0 32px rgba(15, 21, 36, .14); transform: translateX(105%); transition: transform .2s ease; }
  .cv.side-open .cv-side { transform: none; }
}
/* Celular: ou a lista, ou a conversa aberta (com o botão ← para voltar). */
@media (max-width: 760px) {
  .cv { grid-template-columns: 1fr; height: calc(100vh - 120px); border-radius: 12px; }
  .cv.has-current .cv-list { display: none; }
  .cv:not(.has-current) .cv-main { display: none; }
  .cv-list { border-right: 0; }
  .cv-top { padding: 10px 12px; gap: 8px; }
  .cv-top .avatar { width: 34px; height: 34px; font-size: 12px; }
  .cv-bot { padding: 6px 8px; font-size: 0; gap: 0; }
  .cv-bot i { margin: 0 2px; }
  .stage-select { max-width: 120px; }
  .cv-thread { padding: 14px 12px; }
  .cv-thread .bubble { max-width: 86%; }
  .cv-send { padding: 10px 14px; }
}

/* ---------- Instagram ---------- */
.bubble.instagram.out { background: linear-gradient(135deg, #7c5cff, #c13584); color: #fff; }
.bubble.instagram.out .btime { color: rgba(255, 255, 255, .75); }
.bubble.messenger.out { background: linear-gradient(135deg, #0099ff, #a033ff); color: #fff; }
.bubble.messenger.out .btime { color: rgba(255, 255, 255, .75); }
/* Aba Messenger: mesmo layout da aba Instagram (classes ig-*), nas cores do Messenger. */
.fb .ig-tabs button.on { border-bottom-color: #0a7cff; }
.fb .ig-starters button:hover { border-color: #0a7cff; }
.fb .ig-icon { background: linear-gradient(135deg, color-mix(in srgb, #0099ff 16%, transparent), color-mix(in srgb, #a033ff 16%, transparent)); }
.fb .ig-flag { color: #0a7cff; }
.fb .ig-bubble.in { background: linear-gradient(135deg, #0099ff, #a033ff); }
.fb .ig-qr { border-color: #0a7cff; color: #0a7cff; }
.fb .ig-avatar { background: linear-gradient(135deg, #0099ff, #a033ff); }
.fb .ig-notice { background: linear-gradient(135deg, color-mix(in srgb, #0099ff 9%, transparent), color-mix(in srgb, #a033ff 9%, transparent)); border-color: color-mix(in srgb, #0a7cff 25%, var(--line)); }
.ig-notice { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; padding: 12px 16px; border-radius: 14px; font-size: 13.5px;
  background: linear-gradient(135deg, color-mix(in srgb, #7c5cff 9%, transparent), color-mix(in srgb, #c13584 9%, transparent)); border: 1px solid color-mix(in srgb, #c13584 25%, var(--line)); }
.ig-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.ig-stat { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.ig-stat b { font-size: 24px; letter-spacing: -.02em; }
.ig-stat span { font-size: 12.5px; color: var(--muted); }
.ig-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.ig-tabs button { border: 0; border-radius: 0; background: none; padding: 10px 14px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.ig-tabs button.on { color: var(--text); border-bottom-color: #c13584; }
[data-theme=dark] .ig-tabs button { background: none; }
.ig-empty { text-align: center; padding: 34px 20px; }
.ig-empty h3 { margin: 0 0 4px; }
.ig-starters { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin-top: 16px; text-align: left; }
.ig-starters button { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 16px; border-radius: 14px; white-space: normal; text-align: left; }
.ig-starters button:hover { border-color: #c13584; }
.ig-starters button span:last-child { font-size: 12.5px; color: var(--muted); font-weight: 400; }
.ig-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; flex: none; font-size: 18px;
  background: linear-gradient(135deg, color-mix(in srgb, #7c5cff 16%, transparent), color-mix(in srgb, #c13584 16%, transparent)); }

.ig-list { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.ig-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.ig-row:last-child { border-bottom: 0; }
.ig-row.off { opacity: .55; }
.ig-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.ig-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12.5px; color: var(--muted); }
.ig-meta > span:not(.ig-kw):not(.ig-flag) + span:not(.ig-kw):not(.ig-flag)::before { content: '·'; margin-right: 6px; }
.ig-kw { background: var(--bg); border: 1px solid var(--line); border-radius: 99px; padding: 2px 8px; color: var(--text); font-size: 12px; }
.ig-flag { color: #c13584; font-weight: 600; font-size: 12px; }
.ig-link { display: flex; gap: 8px; align-items: center; font-size: 12.5px; min-width: 0; }
.ig-link code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ig-nums { display: flex; gap: 14px; flex: none; }
.ig-num { display: flex; flex-direction: column; align-items: center; font-size: 11px; color: var(--muted); min-width: 46px; }
.ig-num b { font-size: 16px; color: var(--text); }
.ig-err { align-self: center; font-size: 11.5px; color: var(--red); font-weight: 600; }
.ig-row-actions { display: flex; align-items: center; gap: 8px; flex: none; }

.ig-editor { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; }
.ig-form h4 { margin: 16px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ig-preview label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.ig-phone { position: sticky; top: 0; border: 1px solid var(--line); border-radius: 22px; padding: 12px; min-height: 380px; display: flex; flex-direction: column; gap: 8px; background: var(--bg); }
.ig-phone-top { text-align: center; font-size: 12.5px; font-weight: 700; padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.ig-bubble { max-width: 88%; padding: 8px 12px; border-radius: 18px; font-size: 13px; white-space: pre-wrap; word-break: break-word; }
.ig-bubble.out { align-self: flex-start; background: var(--panel); border: 1px solid var(--line); }
.ig-bubble.in { align-self: flex-end; background: linear-gradient(135deg, #7c5cff, #c13584); color: #fff; }
.ig-bubble.event { align-self: center; background: none; color: var(--muted); font-size: 11.5px; padding: 2px 8px; }
.ig-url { color: #3b82f6; word-break: break-all; }
[data-theme=dark] .ig-url { color: #60a5fa; }
.ig-bubble.in .ig-url { color: #fff; text-decoration: underline; }
.ig-qr { margin-top: 8px; text-align: center; border: 1px solid #c13584; color: #c13584; border-radius: 99px; padding: 5px 10px; font-weight: 600; font-size: 12.5px; }

.ig-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.ig-grid .card { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.ig-grid h3 { margin: 0; }
.ig-ice { display: flex; gap: 10px; align-items: flex-start; }
.ig-ice .grow { display: flex; flex-direction: column; gap: 6px; }
.ig-ice-n { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--bg); font-size: 12px; font-weight: 700; color: var(--muted); flex: none; margin-top: 6px; }
.ig-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
.ig-profile { display: flex; align-items: center; gap: 14px; }
.ig-profile > div { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.ig-avatar { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; color: #fff; font-weight: 800; font-size: 20px;
  background: linear-gradient(135deg, #feda75, #fa7e1e 30%, #d62976 60%, #962fbf 85%, #4f5bd5); flex: none; }
.ig-copy { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: 12.5px; }
.ig-copy span { color: var(--muted); }
.ig-copy code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ig-table { overflow-x: auto; margin-top: 12px; }

@media (max-width: 900px) {
  .ig-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ig-editor, .ig-grid { grid-template-columns: 1fr; }
  .ig-phone { position: static; min-height: 0; }
  .ig-row { flex-wrap: wrap; }
  .ig-nums { order: 3; width: 100%; justify-content: space-around; }
  .ig-copy { grid-template-columns: 1fr auto; }
  .ig-copy span { grid-column: 1 / -1; }
}

/* ---------- criador de fluxos no celular ----------
   O desenho ocupa a tela toda. O painel (blocos, gatilho e edição do bloco) vira uma gaveta que sobe de
   baixo: abre pelo botão "＋ Blocos" ou tocando num bloco; fecha no ✕ ou tocando no fundo do desenho.
   Os blocos viram uma grade de ícones com o nome embaixo. */
@media (max-width: 820px) {
  .builder { height: 100dvh; }
  .bbar { flex-wrap: wrap; gap: 6px 8px; padding: 8px 10px; }
  /* Linha 1: ✕ e o nome do fluxo. Linha 2: ativo, Testar e Salvar. */
  .bbar .bname { flex: 1 1 calc(100% - 60px); min-width: 0; max-width: none; font-size: 15px; padding: 6px 8px; }
  .bbar .grow, .bbar .themesw, .bbar > .tag:empty { display: none; }
  .bbar > .tag { order: 5; width: 100%; text-align: center; }
  .bbar .switch { font-size: 13px; margin-right: auto; }
  .bbar > button { padding: 6px 11px; }

  .bpanel { position: fixed; left: 0; right: 0; bottom: 0; width: auto; max-height: 72dvh; z-index: 30; border-right: 0;
    border-top: 1px solid var(--line); border-radius: 18px 18px 0 0; padding: 0 14px 18px; display: flex; flex-direction: column;
    box-shadow: 0 -10px 40px rgba(5, 8, 15, .35); transform: translateY(105%); transition: transform .22s ease; }
  .sheet-open .bpanel { transform: none; }
  .bsheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; position: sticky; top: 0; z-index: 2; order: -2;
    margin: 0 -14px 6px; padding: 16px 14px 10px; background: inherit; border-bottom: 1px solid var(--line); }
  .bsheet-head .grip { position: absolute; top: 6px; left: 50%; width: 38px; height: 4px; margin-left: -19px; border-radius: 99px; background: var(--line); }
  .bsheet-head b { font-size: 15px; }
  .bsheet-head .icon { padding: 4px 10px; }
  .bpanel > h3 { margin-top: 8px; }
  /* Pelo botão "＋ Blocos" o que interessa primeiro são os blocos; gatilho e envio vêm depois. */
  .bpanel .pblocks { order: -1; }
  .bpanel > p.muted.small { display: none; }

  .palette { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
  .palette button { flex-direction: column; justify-content: flex-start; gap: 6px; text-align: center; padding: 12px 4px 10px; border-radius: 14px; min-height: 84px; }
  .palette .picon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; font-size: 20px; background: var(--brand-soft); }
  .palette .pname { font-size: 11.5px; font-weight: 600; line-height: 1.2; }

  .bfab { display: block; position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 4; padding: 11px 22px; border-radius: 99px;
    font-weight: 700; box-shadow: 0 8px 24px rgba(91, 75, 255, .45); }
  .sheet-open .bfab { display: none; }
  .zoom { bottom: 18px; }
}
