/* Isca — painel. Sem etapa de build: CSS puro, servido direto de /public. */
:root {
  --paper: #f6f4ef;
  --surface: #ffffff;
  --ink: #10192b;
  --muted: #5d6578;
  --line: #e4e0d6;
  --line-strong: #cfc9bb;
  --accent: #ff5a3c;
  --accent-dark: #d9432a;
  --accent-soft: #ffe9e3;
  --ok: #1a8a5c;
  --ok-soft: #e0f3ea;
  --warn: #9a6a12;
  --warn-soft: #fbf0d6;
  --radius: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -.015em; text-wrap: balance; }
h1 { font-size: 26px; }
h2 { font-size: 17px; }
p { margin: 0; }
code, pre { font-family: var(--mono); font-size: 13px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }

/* marca */
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 20px; letter-spacing: -.03em; text-decoration: none; }
.brand i { width: 22px; height: 22px; border-radius: 50%; border: 5px solid var(--accent); border-bottom-color: transparent; transform: rotate(-45deg); display: inline-block; }

/* estrutura */
.shell { display: grid; grid-template-columns: 216px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--ink); color: #e9e6df; padding: 22px 14px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; }
.side .brand { color: #fff; padding: 0 8px; }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.side nav a { padding: 9px 10px; border-radius: 8px; text-decoration: none; color: #c5c9d3; font-weight: 500; }
.side nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.side nav a.on { background: rgba(255, 255, 255, .12); color: #fff; }
.side nav.foot { margin-top: auto; }
.side .acct { padding: 12px 10px 0; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 13px; }
.side .acct strong { display: block; color: #fff; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side .acct button { margin-top: 6px; padding: 0; border: 0; background: none; color: #c5c9d3; font: inherit; text-decoration: underline; cursor: pointer; }
/* ocupa a largura disponível; só para de crescer em telas muito largas, e aí fica centralizado */
.main { padding: 30px 34px 60px; max-width: 1760px; width: 100%; margin: 0 auto; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.head p { margin-top: 4px; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }

/* superfícies */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card.flush { padding: 0; overflow: hidden; }
.card > h2 { margin-bottom: 12px; }
.flash { background: var(--ok-soft); color: #0d5c3c; border: 1px solid #b9e2cf; border-radius: var(--radius); padding: 10px 14px; margin-bottom: 18px; }
.notice { background: var(--warn-soft); color: #6b4a0b; border: 1px solid #ecd9a4; border-radius: var(--radius); padding: 10px 14px; font-size: 13px; }

/* números */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat span { display: block; font-size: 13px; color: var(--muted); }
.stat strong { display: block; font-size: 28px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.25; }
.stat small { color: var(--muted); }

/* botões e campos */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.sm { min-height: 30px; padding: 0 10px; font-size: 13px; }
.btn.ghost { border-color: transparent; background: none; }
.btn.ghost:hover { background: rgba(16, 25, 43, .06); }
.btn.danger { color: #b42318; }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
label.f, div.f { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; }
label.f small, div.f small { font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], input[type=date], select, textarea {
  width: 100%; min-height: 38px; padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--ink); font: inherit;
}
textarea { min-height: 76px; resize: vertical; }
input[type=color] { width: 38px; height: 38px; padding: 2px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; cursor: pointer; }

/* tabelas */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 10px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td a.name { font-weight: 600; text-decoration: none; }
td a.name:hover { text-decoration: underline; }
.empty { padding: 36px 20px; text-align: center; color: var(--muted); }
/* ações da linha: numa linha só quando cabe; quebram em vez de cortar quando a tela é estreita */
.actions { justify-content: flex-end; gap: 6px; }
.actions form { display: contents; }
.col-name { min-width: 210px; }
.narrow-only { display: none; }

dialog.ask { width: calc(100% - 32px); max-width: 460px; padding: 22px; border: 0; border-radius: 14px; background: var(--surface); color: var(--ink); box-shadow: 0 24px 60px rgba(8, 12, 24, .28); }
dialog.ask::backdrop { background: rgba(11, 18, 32, .55); }
dialog.ask form { display: flex; flex-direction: column; gap: 12px; }
.choice { display: flex; flex-direction: column; gap: 8px; }
.choice button { display: block; width: 100%; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.choice button[hidden] { display: none; }
.choice button:hover { border-color: var(--ink); }
.choice button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.choice button strong { display: block; }
.choice button.danger strong { color: #b42318; }
.choice button.danger:hover { border-color: #b42318; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: #eceae4; color: #454c5e; white-space: nowrap; }
.badge.active { background: var(--ok-soft); color: #0d5c3c; }
.badge.paused { background: var(--warn-soft); color: #6b4a0b; }
.badge.active::before, .badge.paused::before, .badge.draft::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.snippet { display: flex; gap: 10px; align-items: stretch; }
.snippet pre { flex: 1; margin: 0; padding: 12px 14px; background: var(--ink); color: #e9e6df; border-radius: 8px; overflow-x: auto; white-space: pre; }
ol.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }

/* barras horizontais dos relatórios */
.bars { display: flex; flex-direction: column; gap: 8px; }
.bars .b { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 4px 10px; align-items: center; font-size: 14px; }
.bars .b span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bars .b em { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: #eceae4; position: relative; overflow: hidden; }
.bars .b em i { position: absolute; inset: 0 auto 0 0; background: var(--ink); border-radius: 3px; }
.chart { width: 100%; height: auto; display: block; }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; }

/* entrada / escolha de conta */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 30px 16px; }
.gate .box { width: 100%; max-width: 860px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 22px; }
.gate h1 { font-size: 32px; margin: 14px 0 6px; }
.acct-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.acct-list button { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; font: inherit; text-align: left; cursor: pointer; }
.acct-list button:hover { border-color: var(--ink); }
.acct-list strong { display: block; }

/* nova campanha */
.pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.pick label { position: relative; display: block; padding: 14px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: #fff; cursor: pointer; }
.pick label:hover { border-color: var(--ink); }
.pick input { position: absolute; opacity: 0; }
.pick label:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.pick label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.pick strong { display: block; }
.pick .shape { height: 74px; margin-bottom: 10px; border-radius: 6px; background: #eceae4; position: relative; overflow: hidden; }
.pick .shape::after { content: ""; position: absolute; background: var(--ink); border-radius: 3px; }
.pick .shape.popup::after { inset: 18px 30%; }
.pick .shape.bar::after { inset: 0 0 auto 0; height: 14px; border-radius: 0; }
.pick .shape.slidein::after { right: 8px; bottom: 8px; width: 34%; height: 40px; }
.pick .shape.fullscreen::after { inset: 0; border-radius: 0; }

/* ------------------------------------------------------------------ editor */
.ed { display: grid; grid-template-rows: auto auto minmax(0, 1fr); height: 100vh; background: var(--paper); }
.ed-top { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--ink); color: #fff; }
.ed-top a.back { color: #c5c9d3; text-decoration: none; font-size: 22px; line-height: 1; padding: 0 4px; }
.ed-top input.title { flex: 0 1 300px; min-width: 120px; background: rgba(255, 255, 255, .1); border-color: transparent; color: #fff; font-weight: 600; }
.ed-top .grow { flex: 1; }
.ed-top .badge { background: rgba(255, 255, 255, .14); color: #fff; }
.ed-top select { width: auto; background: rgba(255, 255, 255, .1); border-color: transparent; color: #fff; }
.ed-top select option { color: var(--ink); }
.ed-top .btn { border-color: rgba(255, 255, 255, .28); background: transparent; color: #fff; }
.ed-top .btn.primary { background: var(--accent); border-color: var(--accent); }
.ed-top .saved { font-size: 13px; color: #c5c9d3; min-width: 110px; text-align: right; }
.ed-tabs { display: flex; align-items: center; gap: 4px; padding: 0 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.ed-tabs button { padding: 12px 14px; border: 0; border-bottom: 2px solid transparent; background: none; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; }
.ed-tabs button.on { color: var(--ink); border-bottom-color: var(--accent); }
.ed-tabs .grow { flex: 1; }
.ed-tabs button.undo { display: inline-flex; align-items: center; gap: 6px; margin-right: 8px; padding: 6px 10px; border: 0; border-radius: 8px; font-size: 13px; }
.ed-tabs button.undo:hover:not(:disabled) { background: rgba(16, 25, 43, .06); color: var(--ink); }
.ed-tabs button.undo:disabled { opacity: .38; cursor: default; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; background: #fff; }
.seg button { padding: 6px 12px; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 0; }
.seg button.on { background: var(--ink); color: #fff; }

.ed-body { display: grid; grid-template-columns: 236px minmax(0, 1fr) 316px; min-height: 0; }
.ed-body.single { grid-template-columns: minmax(0, 1fr); overflow-y: auto; }
.ed-left, .ed-right { background: var(--surface); overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.ed-left { border-right: 1px solid var(--line); }
.ed-right { border-left: 1px solid var(--line); }
.ed-left h3, .ed-right h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.palette { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.palette button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border: 1px dashed var(--line-strong); border-radius: 8px; background: #fff; font: inherit; font-size: 13px; font-weight: 600; cursor: grab; }
.palette button:hover { border-style: solid; border-color: var(--ink); }
.palette button b { font-size: 18px; line-height: 1; font-weight: 700; color: var(--accent-dark); }
.layers { display: flex; flex-direction: column; gap: 4px; }
.layers .l { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 13px; cursor: grab; }
.layers .l.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.layers .l.over { border-top: 3px solid var(--accent); }
.layers .l span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.layers .l button { border: 0; background: none; padding: 0 4px; font: inherit; color: var(--muted); cursor: pointer; }
.layers .l button:hover { color: #b42318; }
.layers .end { height: 14px; border-radius: 4px; }
.layers .end.over { background: var(--accent-soft); outline: 1px dashed var(--accent); }

.ed-canvas { position: relative; overflow: auto; padding: 22px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.stage { position: relative; width: 100%; max-width: 980px; height: 620px; flex: 0 0 auto; border: 1px solid var(--line-strong); border-radius: 12px; overflow: hidden; background: #fff; transition: max-width .2s ease; }
.stage.mobile { max-width: 390px; height: 700px; }
.stage .fake { position: absolute; inset: 0; padding: 26px; display: flex; flex-direction: column; gap: 12px; opacity: .55; pointer-events: none; }
.stage .fake i { display: block; height: 12px; border-radius: 6px; background: #e4e0d6; }
.stage .fake i.t { height: 26px; width: 55%; background: #cfc9bb; }
/* container-type deixa a prévia medir a própria área (usado pelo modo "apenas imagem") */
.stage .host { position: absolute; inset: 0; container-type: size; }
.hint { font-size: 13px; color: var(--muted); text-align: center; }

.props { display: flex; flex-direction: column; gap: 12px; }
.props .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.props .color { display: flex; align-items: center; gap: 8px; }
.props .color input[type=text] { flex: 1; font-family: var(--mono); font-size: 13px; }
.props .check { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; }
.props .check input { width: 16px; height: 16px; accent-color: var(--accent); }
.fieldcard { border: 1px solid var(--line); border-radius: 8px; padding: 10px; display: flex; flex-direction: column; gap: 8px; background: #fbfaf7; }
.fieldcard .top { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 700; }
.sep { height: 1px; background: var(--line); border: 0; margin: 2px 0; }

.rules { width: 100%; max-width: 760px; margin: 0 auto; padding: 26px 20px 60px; display: flex; flex-direction: column; gap: 16px; }
.rules .card h2 { margin-bottom: 4px; }
.rules .card > p { margin-bottom: 14px; }
.opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.opts label { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; cursor: pointer; font-size: 14px; }
.opts label:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.opts input { margin-top: 3px; accent-color: var(--accent); }
.opts small { display: block; color: var(--muted); font-size: 12px; }
.group { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.group small { font-weight: 400; color: var(--muted); }
.group .notice { font-weight: 400; }
.conds { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.cond { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 8px; align-items: center; width: 100%; }
.testout { font-weight: 400; color: var(--muted); }
.testout.yes { color: var(--ok); font-weight: 600; }
.testout.no { color: #b42318; font-weight: 600; }
[hidden] { display: none !important; }

.modal { position: fixed; inset: 0; z-index: 50; background: rgba(11, 18, 32, .55); display: grid; place-items: center; padding: 20px; }
.modal .sheet { width: 100%; max-width: 760px; max-height: 86vh; overflow: auto; background: var(--surface); border-radius: 14px; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.tpl { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.tpl button { text-align: left; padding: 14px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: #fff; font: inherit; cursor: pointer; }
.tpl button:hover { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.tpl strong { display: block; margin-bottom: 4px; }

@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 10px; }
  .side nav { flex-direction: row; flex-wrap: wrap; }
  .side nav.foot { margin-top: 0; }
  .side .acct { margin: 0 0 0 auto; border: 0; padding: 0; }
  .main { padding: 20px 16px 50px; }
}
/* telas estreitas: a coluna Formato vai para baixo do nome e as células ficam mais justas */
@media (max-width: 1150px) {
  .wide-only { display: none; }
  .narrow-only { display: inline; }
  .col-name { min-width: 150px; }
  th, td { padding-left: 10px; padding-right: 10px; }
}
@media (max-width: 900px) {
  .grid2, .grid3, .gate .box { grid-template-columns: 1fr; }
  .ed-body { grid-template-columns: 1fr; overflow-y: auto; }
  .ed-left, .ed-right { border: 0; border-top: 1px solid var(--line); overflow: visible; }
  .ed-canvas { order: -1; overflow: visible; }
}
/* as colunas rolam; nenhum item pode encolher para caber (a troca Bloco / Aparência geral sumia) */
.ed-left > *, .ed-right > * { flex-shrink: 0; }
.ed-right .seg { align-self: flex-start; }

/* ------------------------------------------------------- etapa 2: contas e planos */
.auth { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 18px; }
.auth .brand { align-self: center; color: var(--ink); }
.auth h1 { font-size: 24px; margin-bottom: 4px; }
.center { text-align: center; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.check input { accent-color: var(--accent); }
.side .pill { margin-left: 6px; padding: 1px 7px; border-radius: 99px; background: rgba(255, 255, 255, .14); color: #fff; font-size: 11px; font-weight: 600; }
.side .acct strong { margin-bottom: 2px; }
.side .muted-on-dark { display: block; color: #9aa1b2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side .acct-links { display: flex; gap: 14px; margin-top: 8px; }
.side .acct-links a, .side .acct-links button { margin: 0; padding: 0; border: 0; background: none; color: #c5c9d3; font: inherit; text-decoration: underline; cursor: pointer; }
.notice.verify { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.usage { display: flex; flex-direction: column; gap: 8px; }
.meter { height: 8px; border-radius: 4px; background: #eceae4; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--ink); border-radius: 4px; }
.usage.near .meter i { background: #c98a12; }
.usage.over { border-color: #f1b4ad; }
.usage.over .meter i { background: #b42318; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.plan { display: flex; flex-direction: column; gap: 12px; }
.plan.current { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.plan ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.plan .btn { align-self: flex-start; }
.btn[disabled] { opacity: .5; cursor: default; }

/* marca: "isca" + "leads" mais leve */
.brand b { font-weight: inherit; }
.brand b span { font-weight: 500; opacity: .7; }

/* tela de API */
.docs { display: flex; flex-direction: column; gap: 10px; }
.docs h3 { margin: 12px 0 0; font-size: 15px; }
.docs pre { margin: 0; padding: 12px 14px; background: var(--ink); color: #e9e6df; border-radius: 8px; overflow-x: auto; }
.docs td, .docs th { padding: 9px 12px; }
.docs .table-wrap { border: 1px solid var(--line); border-radius: 8px; }
.newkey { border-color: var(--ok); box-shadow: 0 0 0 1px var(--ok); }

/* análise com IA (relatório) */
.ai-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.ai-head h2 { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.ai-head > div:first-child { flex: 1 1 320px; }
.ai-mark { color: var(--accent); font-size: 15px; }
.ai-run { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.ai-run small { font-size: 12px; }
.ai-result { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 16px; }
.ai-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.pill { display: inline-flex; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; background: #eceae4; color: #454c5e; }
.pill.ok { background: var(--ok-soft); color: #0d5c3c; }
.pill.warn { background: var(--warn-soft); color: #6b4a0b; }
.pill.bad { background: #fde4e1; color: #a52a17; }
.ai-summary { font-size: 16px; line-height: 1.55; max-width: 78ch; }
.ai-sub { font-size: 14px; margin: 18px 0 8px; }
.ai-points { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.ai-points li { border: 1px solid var(--line); border-left: 3px solid #b8b2a4; border-radius: 8px; padding: 10px 12px; font-size: 14px; }
.ai-points li.positivo { border-left-color: var(--ok); }
.ai-points li.alerta { border-left-color: var(--accent); }
.ai-points strong { display: block; margin-bottom: 2px; }
.ai-points span { color: var(--muted); }
.ai-tests { margin: 0 0 10px; padding-left: 20px; display: flex; flex-direction: column; gap: 12px; }
.ai-tests li { padding-left: 4px; font-size: 14px; }
.ai-tests .t { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 3px; font-size: 15px; }
.ai-tests p { margin-top: 2px; max-width: 90ch; }
.ai-teaser { margin: 14px 0 0; padding-left: 18px; color: var(--muted); font-size: 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 32px; max-width: 820px; }
.ai-empty { margin-top: 12px; }
.ai-history { margin-top: 14px; font-size: 14px; }
.ai-history summary { cursor: pointer; color: var(--muted); }
.ai-history ul { margin: 8px 0 0; padding-left: 18px; }
@media (max-width: 700px) { .ai-run { align-items: stretch; width: 100%; } .ai-teaser { grid-template-columns: 1fr; } }

/* sugestões de texto com IA (editor) */
.ai-suggest { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; padding: 1px 7px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--ink); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.ai-suggest:hover { border-color: var(--accent); color: var(--accent-dark); }
.ai-suggest[disabled] { opacity: .55; cursor: default; }
.ai-suggest i { font-style: normal; color: var(--accent); }
.f-head { display: flex; align-items: center; gap: 8px; }
.ai-box { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; }
.ai-box .opt { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fbfaf7; font: inherit; font-size: 13px; font-weight: 500; color: var(--ink); cursor: pointer; }
.ai-box .opt:hover { border-color: var(--accent); background: var(--accent-soft); }
.ai-box .opt small { display: block; margin-top: 2px; color: var(--muted); font-weight: 400; }
.ai-box .msg { font-size: 12px; font-weight: 400; color: var(--muted); }
.ai-box .msg a { color: var(--accent-dark); }
.ai-box .foot { display: flex; justify-content: space-between; font-size: 12px; font-weight: 400; color: var(--muted); }
.ai-box .foot button { border: 0; background: none; padding: 0; font: inherit; color: var(--muted); text-decoration: underline; cursor: pointer; }

/* configurações */
.subnav { display: flex; gap: 4px; flex-wrap: wrap; margin: -6px 0 20px; border-bottom: 1px solid var(--line); }
.subnav a { padding: 9px 12px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 600; text-decoration: none; }
.subnav a:hover { color: var(--ink); }
.subnav a.on { color: var(--ink); border-bottom-color: var(--accent); }
.facts { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.facts > div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); font-size: 14px; }
.facts > div:last-child { border-bottom: 0; padding-bottom: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; text-align: right; font-weight: 600; }
.roles { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 6px; }
.roles legend { font-size: 13px; font-weight: 600; margin-bottom: 6px; padding: 0; }
.role-opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 8px; cursor: pointer; font-size: 14px; }
.role-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.role-opt input { margin-top: 3px; }
.role-opt small { display: block; color: var(--muted); font-size: 13px; }
.checks { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.danger-zone { border-color: #f1c4bd; }
.btn.danger-solid { background: #b42318; border-color: #b42318; color: #fff; }
.btn.danger-solid:hover { background: #8f1c13; border-color: #8f1c13; }
.side .muted-on-dark { font-size: 12.5px; }

/* documentação da API */
.docs-link { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; text-decoration: none; }
.docs-link:hover { border-color: var(--ink); }
.docs-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 22px; align-items: start; }
.docs-toc { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.docs-toc strong { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
.docs-toc a { padding: 5px 8px; border-radius: 6px; color: var(--ink); text-decoration: none; }
.docs-toc a:hover { background: rgba(16, 25, 43, .06); }
.docs section { display: flex; flex-direction: column; gap: 10px; padding-bottom: 22px; border-bottom: 1px solid var(--line); scroll-margin-top: 20px; }
.docs section:last-child { border-bottom: 0; padding-bottom: 0; }
.docs section + section { padding-top: 6px; }
.docs ul, .docs ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.docs p, .docs li { max-width: 80ch; }
.docs .verb { display: inline-block; margin-right: 6px; padding: 1px 7px; border-radius: 5px; background: var(--ok-soft); color: #0d5c3c; font: 700 12px var(--mono); vertical-align: 2px; }
.docs h3 code, .docs h3 { font-family: var(--mono); font-size: 14px; }
@media (max-width: 900px) { .docs-layout { grid-template-columns: 1fr; } .docs-toc { position: static; flex-direction: row; flex-wrap: wrap; } .docs-toc strong { width: 100%; } }
.legal-links { text-align: center; font-size: 13px; color: var(--muted); margin-top: 6px; }
.legal-links a { color: var(--muted); }
.gate .check { align-items: flex-start; font-size: 14px; } .gate .check input { margin-top: 3px; }

/* termos e privacidade */
.legal-page { background: var(--paper); }
.legal-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; max-width: 820px; margin: 0 auto; padding: 22px 20px 0; }
.legal-top .brand { color: var(--ink); }
.legal-top nav { display: flex; gap: 16px; font-size: 14px; }
.legal-top nav a { color: var(--muted); text-decoration: none; }
.legal-top nav a.on { color: var(--ink); font-weight: 600; }
.legal { max-width: 820px; margin: 20px auto 60px; padding: 34px 40px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); line-height: 1.65; }
.legal h1 { font-size: 30px; }
.legal h2 { font-size: 18px; margin: 30px 0 8px; }
.legal h3 { font-size: 15px; margin: 18px 0 6px; }
.legal p { margin: 0 0 10px; max-width: 72ch; }
.legal ul { margin: 0 0 10px; padding-left: 20px; max-width: 72ch; }
.legal li { margin-bottom: 4px; }
.legal .legal-meta { color: var(--muted); font-size: 13px; margin: 6px 0 22px; }
.legal mark { background: #fff1b8; color: #6b4a0b; padding: 0 3px; border-radius: 3px; }
.legal .table-wrap { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 10px; }
@media (max-width: 700px) { .legal { padding: 22px 18px; margin: 14px 12px 40px; } }
.docs-layout > * { min-width: 0; }

/* página inicial (iscaleads.com.br) */
.site { min-height: 100vh; display: flex; flex-direction: column; background: var(--paper); }
.site-top { display: flex; justify-content: space-between; align-items: center; width: 100%; max-width: 1120px; margin: 0 auto; padding: 22px 20px; }
.site-top .brand { color: var(--ink); }
.site-hero { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; width: 100%; max-width: 1120px; margin: 0 auto; padding: 30px 20px 60px; }
.site-eyebrow { color: var(--accent-dark); font-weight: 700; font-size: 14px; letter-spacing: .02em; margin-bottom: 12px; }
.site-copy h1 { font-size: clamp(34px, 5vw, 54px); line-height: 1.05; letter-spacing: -.035em; max-width: 14ch; }
.site-sub { font-size: 18px; line-height: 1.55; color: var(--muted); max-width: 46ch; margin: 18px 0 26px; }
.site-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.btn.lg { min-height: 46px; padding: 0 20px; font-size: 16px; }
.site-art { display: flex; justify-content: center; }
.mock { width: 100%; max-width: 460px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 30px 60px -30px rgba(16, 25, 43, .35); overflow: hidden; }
.mock-bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #faf9f6; }
.mock-bar i { width: 9px; height: 9px; border-radius: 50%; background: #dcd7cc; }
.mock-bar span { flex: 1; height: 16px; margin-left: 8px; border-radius: 99px; background: #eeebe4; }
.mock-page { position: relative; padding: 26px 24px 120px; display: flex; flex-direction: column; gap: 12px; }
.mock-page b { display: block; height: 10px; border-radius: 99px; background: #eeebe4; }
.mock-page b.short { width: 60%; }
.mock-pop { position: absolute; left: 50%; top: 54%; transform: translate(-50%, -50%); width: 78%; padding: 20px; border-radius: 12px; background: #fff; box-shadow: 0 20px 50px -14px rgba(16, 25, 43, .45); display: flex; flex-direction: column; gap: 8px; }
.mock-pop small { color: var(--accent); font-weight: 800; font-size: 10px; letter-spacing: .08em; }
.mock-pop strong { font-size: 18px; letter-spacing: -.02em; }
.mock-input { padding: 9px 10px; border: 1px solid var(--line-strong); border-radius: 7px; color: #9aa1b2; font-size: 13px; }
.mock-btn { padding: 10px; border-radius: 7px; background: var(--accent); color: #fff; font-weight: 700; font-size: 13px; text-align: center; }
.site-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; width: 100%; max-width: 1120px; margin: 0 auto; padding: 20px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); }
.site-foot nav { display: flex; gap: 16px; }
.site-foot a { color: var(--muted); }
@media (max-width: 860px) { .site-hero { grid-template-columns: 1fr; gap: 32px; padding-top: 10px; } .site-art { order: 2; } }
