/* Authentic Ads: tokens do handoff de design. Escuro é o padrão; claro sobrescreve em [data-t="light"]. */
:root {
  --bg: #0B0B0A; --panel: #141413; --panel2: #1A1A18; --panel3: #222220;
  --ink: #F2F0E9; --ink2: #B4B2A8; --muted: #84837A; --line: #2A2926;
  --accent: #F7C61A; --accentInk: #2A2000; --accentSoft: #241F0D; --accentText: #F7C61A;
  --green: #7FBE9B; --greenBg: #131F19; --wine: #D97B7F; --wineBg: #231517;
  --nav: #0F1A13; --navLine: #1E2C22; --navInk: #EDEADE; --navMuted: #8C9686;
  --shadow: 0 1px 0 rgba(255,255,255,.02), 0 8px 24px rgba(0,0,0,.32);
  --f: Archivo, system-ui, -apple-system, "Segoe UI", sans-serif;
  --fb: "Archivo Black", Archivo, system-ui, sans-serif;
  --fm: "JetBrains Mono", ui-monospace, Consolas, monospace;
  color-scheme: dark;
}
[data-t="light"] {
  --bg: #F2F0EA; --panel: #FFFFFF; --panel2: #FAF8F2; --panel3: #F1EFE7;
  --ink: #17170F; --ink2: #4B4A42; --muted: #7A7970; --line: #E4E0D5;
  --accentSoft: #FBF1D1; --accentText: #6B4E00;
  --green: #215139; --greenBg: #E9EFE9; --wine: #8A1C27; --wineBg: #F8EAE8;
  --navLine: #22301F;
  --shadow: 0 1px 2px rgba(23,23,15,.04), 0 10px 24px rgba(23,23,15,.06);
  color-scheme: light;
}
@keyframes pulseDot { 0%, 100% { opacity: 1 } 50% { opacity: .25 } }

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 400 14px/1.5 var(--f); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
a { color: var(--accentText); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; }
.muted { color: var(--muted); }
.mono { font-family: var(--fm); font-variant-numeric: tabular-nums; }
.num { font-family: var(--fm); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.kicker, .lbl { font: 600 10px/1.2 var(--f); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.kicker { letter-spacing: .2em; }

/* ---------- marca ---------- */
.marca { display: flex; align-items: center; gap: 12px; }
.marca-a { width: 38px; height: 38px; border-radius: 50%; border: 2.5px solid var(--accent); display: grid; place-items: center; flex: none;
  font: 18px/1 var(--fb); color: var(--accent); }
.marca-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.marca-txt b { font: 14px/1 var(--fb); letter-spacing: .02em; color: var(--navInk); font-weight: normal; }
.marca-txt small { font: 600 9px/1 var(--f); letter-spacing: .24em; color: var(--accent); }
.marca-g .marca-a { width: 46px; height: 46px; font-size: 21px; }

/* ---------- casca ---------- */
.app { display: grid; grid-template-columns: 254px minmax(0, 1fr); min-height: 100vh; }
.sb { background: var(--nav); border-right: 1px solid var(--navLine); display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sb-brand { padding: 22px 20px 18px; border-bottom: 1px solid var(--navLine); }
.sb-nav { padding: 14px 12px; display: flex; flex-direction: column; gap: 2px; }
.sb-grupo { font: 600 9px/1 var(--f); letter-spacing: .2em; text-transform: uppercase; color: var(--navMuted); padding: 14px 10px 8px; }
.sb-grupo:first-child { padding-top: 6px; }
.sb-item { display: block; padding: 10px 12px; border-radius: 9px; font: 500 13px/1.2 var(--f); color: #D6D2C4; }
.sb-item:hover { background: #16241B; text-decoration: none; }
.sb-item.on { background: #1B2E21; color: #F7C61A; font-weight: 700; box-shadow: inset 3px 0 0 #F7C61A; }
.sb-foot { margin-top: auto; padding: 16px 16px 18px; border-top: 1px solid var(--navLine); display: flex; flex-direction: column; gap: 8px; }
.sb-wa { display: flex; align-items: center; gap: 8px; font: 500 11px/1.3 var(--f); color: var(--navMuted); }
.sb-wa:hover { text-decoration: none; color: var(--navInk); }
.dot-wa { width: 7px; height: 7px; border-radius: 50%; background: var(--navMuted); flex: none; }
.sb-wa.ok .dot-wa { background: #86BE9B; animation: pulseDot 2.4s ease-in-out infinite; }
.sb-wa.mal { color: #E3A0A3; }
.sb-wa.mal .dot-wa { background: #D97B7F; }
.sb-link { background: none; border: 0; padding: 0; text-align: left; font: 500 11px/1 var(--f); color: var(--navMuted); cursor: pointer; }
.sb-link:hover { color: var(--navInk); }
.sb-veu { display: none; }

.coluna { min-width: 0; display: flex; flex-direction: column; }
.hd { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line);
  padding: 18px 30px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.hd-menu { display: none; }
.hd-titulo { min-width: 250px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.hd-titulo h1 { font: 23px/1.1 var(--fb); letter-spacing: -.01em; font-weight: normal; }
.hd-acoes { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hd-div { width: 1px; height: 30px; background: var(--line); }
.hd-user { display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
.hd-user-txt { display: flex; flex-direction: column; gap: 3px; }
.hd-user-txt b { font: 600 12px/1 var(--f); }
.hd-user-txt small { font: 400 10px/1 var(--f); color: var(--muted); }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--ink2);
  cursor: pointer; display: grid; place-items: center; font-size: 15px; }
.icon-btn:hover { border-color: var(--accent); color: var(--accentText); }
.content { padding: 26px 30px 60px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }

/* ---------- avatar ---------- */
.av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none;
  font: 700 12px/1 var(--f); background: var(--panel3); color: var(--ink2); }
.av-y { background: var(--accent); color: var(--accentInk); }
.av-38 { width: 38px; height: 38px; }
.av-42 { width: 42px; height: 42px; font-size: 13px; }

/* ---------- controles ---------- */
.seg { display: inline-flex; gap: 2px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 4px; }
.seg button { border: 0; background: none; color: var(--ink2); padding: 7px 14px; border-radius: 7px; cursor: pointer; font: 500 12px/1.2 var(--f); white-space: nowrap; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--accent); color: var(--accentInk); font-weight: 700; }
.seg.sm button { padding: 6px 12px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: transparent;
  color: var(--ink); border-radius: 9px; padding: 10px 16px; font: 600 12px/1.2 var(--f); cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--accent); color: var(--accentText); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accentInk); font-weight: 700; }
.btn.primary:hover { opacity: .88; color: var(--accentInk); }
.btn.vinho { background: var(--wine); border-color: var(--wine); color: #fff; font-weight: 700; }
[data-t="dark"] .btn.vinho { color: #2A0B0D; }
.btn.vinho:hover { opacity: .88; }
.btn.perigo:hover { border-color: var(--wine); color: var(--wine); }
.btn.sm { padding: 7px 12px; border-radius: 7px; font-size: 11px; }
.btn.grande { padding: 14px; border-radius: 10px; font-size: 13px; width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accentText); cursor: pointer; font: 600 12px/1.2 var(--f); }

.campo { display: flex; flex-direction: column; gap: 7px; font: 600 10px/1.2 var(--f); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.campo .dica { font: 400 11px/1.4 var(--f); letter-spacing: 0; text-transform: none; }
input, select, textarea { background: var(--panel3); border: 1px solid var(--line); border-radius: 9px; color: var(--ink);
  padding: 11px 13px; font: 400 13px/1.3 var(--f); letter-spacing: 0; text-transform: none; width: 100%; min-height: 40px; }
textarea { resize: vertical; min-height: 110px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; accent-color: var(--accent); }
input.mono, textarea.mono { font-family: var(--fm); }
::placeholder { color: var(--muted); }

.chips { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.chip { border: 1px solid var(--line); background: transparent; color: var(--ink2); border-radius: 20px; padding: 7px 14px;
  font: 600 12px/1.2 var(--f); cursor: pointer; white-space: nowrap; }
.chip:hover { border-color: var(--accent); color: var(--accentText); }
.chip.on { border-color: var(--accent); background: var(--accentSoft); color: var(--accentText); }
.chip:disabled { opacity: .45; cursor: default; }

/* ---------- selos ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; font: 700 10px/1 var(--f); letter-spacing: .06em; padding: 5px 8px;
  border-radius: 5px; white-space: nowrap; background: var(--panel3); color: var(--muted); }
.pill.verde { background: var(--greenBg); color: var(--green); }
.pill.amarelo { background: var(--accentSoft); color: var(--accentText); }
.pill.vinho { background: var(--wineBg); color: var(--wine); }
.pill.cheio { background: var(--accent); color: var(--accentInk); }
.pill.mono { font-family: var(--fm); letter-spacing: 0; }
.etapa { display: inline-flex; align-items: center; font: 700 10px/1 var(--f); letter-spacing: .06em; padding: 5px 8px; border-radius: 5px;
  color: var(--ink); white-space: nowrap; background: color-mix(in srgb, var(--c) 15%, transparent); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); }
.bola { width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--muted)); flex: none; display: inline-block; }

/* ---------- cartões e seções ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); min-width: 0; }
.card-pad { padding: 22px; }
.card-h { padding: 20px 22px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.card-h h2, .h2 { font: 700 15px/1.2 var(--f); }
.card-h .sub, .sub { font: 400 12px/1.5 var(--f); color: var(--muted); margin-top: 4px; }
.card-f { padding: 14px 22px; border-top: 1px solid var(--line); background: var(--panel2); border-radius: 0 0 14px 14px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.nota { font: 400 11px/1.5 var(--f); color: var(--muted); display: flex; align-items: center; gap: 8px; }
.nota .bola { width: 7px; height: 7px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; align-items: start; }
.grid2.largo { grid-template-columns: repeat(auto-fit, minmax(390px, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.fim { justify-content: flex-end; }
.entre { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

.bloco { border-radius: 14px; padding: 20px 22px; border: 1px solid var(--line); background: var(--panel); }
.bloco.vinho { background: var(--wineBg); border-color: transparent; }
.bloco.verde { background: var(--greenBg); border-color: transparent; }
.bloco.amarelo { background: var(--accentSoft); border-color: transparent; }
.bloco.aviso { border-left: 3px solid var(--wine); border-radius: 11px; }
.bloco.aviso-a { border-left: 3px solid var(--accent); border-radius: 11px; }
.bloco .lbl { margin-bottom: 8px; }
.bloco.vinho .lbl { color: var(--wine); }
.bloco.verde .lbl { color: var(--green); }
.bloco.amarelo .lbl { color: var(--accentText); }
.bloco p { margin: 0; font: 400 12px/1.6 var(--f); color: var(--ink2); }
.grande-num { font: 38px/1 var(--fb); }

/* ---------- KPIs ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.kpi .v { font: 32px/1 var(--fb); white-space: nowrap; }
.kpi .apoio { font: 400 11px/1.3 var(--f); color: var(--muted); }
.kpi .apoio.bom { color: var(--green); }
.kpi .apoio.ruim { color: var(--wine); }
.kpi.roas { border-top: 3px solid var(--accent); }
.kpi.roas .lbl, .kpi.roas .v { color: var(--accentText); }
.kpi.mini { gap: 8px; }
.kpi.mini .v { font: 700 18px/1.2 var(--f); }
.kpi.erro { background: var(--wineBg); }
.kpi.erro .lbl, .kpi.erro .v { color: var(--wine); }

/* ---------- funil ---------- */
.funil { display: flex; flex-direction: column; gap: 12px; padding: 22px; }
.funil-l { display: grid; grid-template-columns: minmax(96px, 150px) minmax(110px, 1fr) auto; gap: 14px; align-items: center; }
.funil-l .nome { font: 600 12px/1.3 var(--f); }
.trilha { background: var(--panel3); height: 30px; border-radius: 6px; min-width: 110px; overflow: hidden; }
.barra { height: 100%; border-radius: 6px; display: flex; align-items: center; justify-content: flex-end; padding: 0 10px;
  font: 700 11px/1 var(--fm); color: #2A2000; transition: width .4s ease; min-width: 36px; }
.barra.escura { color: #F2F0E9; }
.funil-l .custo { font: 400 11px/1 var(--fm); color: var(--muted); white-space: nowrap; }
.tres-num { display: flex; gap: 28px; flex-wrap: wrap; }
.tres-num b { font: 700 20px/1 var(--f); display: block; }
.tres-num span { font: 400 11px/1.3 var(--f); color: var(--ink2); }

/* ---------- tabelas ---------- */
.tbl { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { background: var(--panel2); text-align: left; font: 600 10px/1.2 var(--f); letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  padding: 13px 16px; white-space: nowrap; }
th.num { text-align: right; }
td { border-top: 1px solid var(--line); padding: 13px 16px; font: 400 13px/1.35 var(--f); color: var(--ink2); vertical-align: middle; }
td.num { font: 400 13px/1 var(--fm); }
td .forte, .forte { font: 600 13px/1.25 var(--f); color: var(--ink); }
td .sub2, .sub2 { font: 400 11px/1.3 var(--f); color: var(--muted); margin-top: 3px; }
tr.clica { cursor: pointer; }
tr.clica:hover td { background: var(--panel2); }
.vazio { padding: 34px 22px; text-align: center; color: var(--muted); font: 400 13px/1.5 var(--f); }

/* ---------- conversas ---------- */
.busca { display: flex; align-items: center; gap: 10px; background: var(--panel3); border: 1px solid var(--line); border-radius: 10px; padding: 0 14px; }
.busca span { color: var(--muted); font-size: 15px; }
.busca input { border: 0; background: transparent; padding: 11px 0; min-height: 0; }
.busca input:focus { outline: none; }
.lista { max-height: 660px; overflow-y: auto; }
.item { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 12px; padding: 16px 18px; border-top: 1px solid var(--line); cursor: pointer; align-items: start; }
.item:first-child { border-top: 0; }
.item:hover { background: var(--panel2); }
.item.on { background: var(--panel2); box-shadow: inset 3px 0 0 var(--accent); }
.item .nome { font: 600 13px/1.3 var(--f); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.item .nome span { overflow: hidden; text-overflow: ellipsis; }
.item .prev { font: 400 12px/1.4 var(--f); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 3px 0 8px; }
.item .meta { display: flex; gap: 8px; align-items: center; font: 400 10px/1.3 var(--f); color: var(--muted); flex-wrap: wrap; }
.item .hora { font: 400 10px/1 var(--fm); color: var(--muted); white-space: nowrap; padding-top: 3px; }

.conv-cab { padding: 20px 22px; display: flex; align-items: center; gap: 14px; }
.conv-cab .nome { font: 700 15px/1.2 var(--f); }
.conv-cab .fone { font: 400 12px/1.2 var(--fm); color: var(--muted); margin-top: 5px; }
.origem { background: var(--greenBg); padding: 18px 22px; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px 18px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.origem .v { font: 500 12px/1.4 var(--f); color: var(--ink); margin-top: 6px; word-break: break-word; }
.origem .v.mono { font: 400 11px/1.4 var(--fm); word-break: break-all; }
.thread { background: var(--panel2); padding: 18px 22px; display: flex; flex-direction: column; gap: 12px; max-height: 480px; overflow-y: auto; }
.dia { align-self: center; font: 600 10px/1 var(--f); letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  background: var(--panel3); padding: 6px 12px; border-radius: 20px; }
.bolha { align-self: flex-start; max-width: 78%; background: var(--panel); border: 1px solid var(--line); border-radius: 14px 14px 14px 4px;
  padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.bolha.sai { align-self: flex-end; background: var(--greenBg); border-radius: 14px 14px 4px 14px; }
.bolha .txt { font: 400 13px/1.5 var(--f); color: var(--ink); white-space: pre-wrap; word-break: break-word; }
.bolha .hora { font: 500 10px/1 var(--fm); color: var(--muted); align-self: flex-end; }
.bolha .veio { font: 600 10px/1.3 var(--f); letter-spacing: .1em; text-transform: uppercase; color: var(--accentText); }
.bolha .frase { display: flex; align-items: center; gap: 8px; padding-top: 6px; border-top: 1px dashed var(--line); flex-wrap: wrap; }
.bolha .frase b { font: 700 9px/1 var(--f); letter-spacing: .08em; background: var(--accent); color: var(--accentInk); padding: 3px 6px; border-radius: 4px; }
.bolha .frase span { font: 500 10px/1.3 var(--f); color: var(--ink2); }
.bolha img, .bolha video { max-width: min(280px, 100%); max-height: 320px; border-radius: 9px; display: block; background: var(--panel3); }
.bolha .doc { font: 600 12px/1.3 var(--f); }
.audio { display: flex; align-items: center; gap: 12px; min-width: min(280px, 60vw); }
.audio .play { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); border: 0; color: var(--accentInk); font-size: 13px;
  cursor: pointer; flex: none; display: grid; place-items: center; }
.onda { display: flex; align-items: center; gap: 3px; height: 26px; flex: 1; cursor: pointer; }
.onda i { width: 2px; border-radius: 2px; background: var(--accent); opacity: .32; flex: none; }
.onda i.tocou { opacity: 1; }
.audio .dur { font: 500 11px/1 var(--fm); color: var(--muted); flex: none; }
.audio-leg { font: 500 10px/1.3 var(--f); color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.midia-erro { font: 500 11px/1.4 var(--f); color: var(--wine); }
.acoes { padding: 16px 22px 20px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }

/* ---------- kanban ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.col { background: var(--panel2); border: 1px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; max-height: calc(100vh - 230px); min-width: 0; }
.col.alvo { outline: 2px dashed var(--accent); outline-offset: -2px; }
.col-h { display: flex; align-items: center; gap: 9px; padding: 15px 16px; border-bottom: 1px solid var(--line); font: 700 12px/1 var(--f); }
.col-h .qtd { margin-left: auto; font: 400 11px/1 var(--fm); background: var(--panel3); color: var(--ink2); padding: 4px 7px; border-radius: 5px; }
.col-b { padding: 12px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; min-height: 90px; }
.kc { background: var(--panel); border: 1px solid var(--line); border-radius: 11px; padding: 13px; cursor: grab; }
.kc:hover { border-color: var(--accent); }
.kc .forte { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kc .orig { font: 400 10px/1.3 var(--f); color: var(--muted); margin: 5px 0 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kc .pe { display: flex; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding-top: 9px;
  font: 400 10px/1 var(--fm); color: var(--muted); }
.mais { font: 400 11px/1.3 var(--f); color: var(--muted); text-align: center; padding: 4px; }

/* ---------- lote e integração ---------- */
.conf-l { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 13px 22px; border-top: 1px solid var(--line); }
.conf-l .mono { font-size: 12px; color: var(--ink); }
.conf-l .quem { font: 500 12px/1.3 var(--f); color: var(--ink); }
.contadores { display: flex; gap: 14px; font: 500 11px/1 var(--f); }
.contadores .ok { color: var(--green); }
.contadores .nao { color: var(--wine); }
.mapa { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.mapa-c { background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.mapa-c .ev { font: 600 11px/1 var(--fm); color: var(--accentText); }
.mapa-c select { font-weight: 500; }
.mapa-c p { margin: 0; font: 400 11px/1.5 var(--f); color: var(--muted); }
.drop { border: 1px dashed var(--line); border-radius: 12px; background: var(--panel2); padding: 26px 20px; text-align: center; display: flex;
  flex-direction: column; gap: 8px; align-items: center; cursor: pointer; }
.drop:hover, .drop.arrastando { border-color: var(--accent); }
.drop b { font: 700 13px/1.3 var(--f); }
.drop span { font: 400 11px/1.4 var(--f); color: var(--muted); }
.prev-l { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 12px 14px; border-top: 1px solid var(--line); }
.prev-l:first-child { border-top: 0; }
.prev-box { border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.receb { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--panel2); }
.receb .ev { font: 600 11px/1 var(--fm); color: var(--accentText); }
.copiar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }

/* ---------- funil e frases ---------- */
.etapa-l { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px 18px; align-items: center; padding: 16px 22px;
  border-top: 1px solid var(--line); cursor: pointer; }
.etapa-l:hover { background: var(--panel2); }
.etapa-l.arrastando { opacity: .4; }
.etapa-l.sobre { box-shadow: inset 0 2px 0 var(--accent); }
.etapa-nome { display: flex; align-items: center; gap: 10px; font: 600 13px/1.2 var(--f); color: var(--ink); }
.alca { font: 400 11px/1 var(--fm); color: var(--muted); cursor: grab; user-select: none; }
.frase-cx { background: var(--panel3); border: 1px solid var(--line); border-radius: 7px; padding: 9px 11px; font: 400 12px/1.35 var(--f); color: var(--ink2);
  margin-top: 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.valor-p { font: 600 13px/1 var(--fm); color: var(--ink); margin-top: 7px; }

/* ---------- conexão ---------- */
.qr-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding: 30px 26px; }
.qr { width: 222px; height: 222px; background: #fff; border-radius: 12px; display: grid; place-items: center; padding: 8px; }
.qr img { width: 206px; height: 206px; }
.qr-ok { width: 206px; height: 206px; border-radius: 16px; background: var(--greenBg); display: grid; place-items: center; font: 64px/1 var(--fb); color: var(--green); }
.pill-ok { display: inline-flex; align-items: center; gap: 8px; background: var(--greenBg); color: var(--green); font: 600 11px/1 var(--f); padding: 8px 14px; border-radius: 20px; }
.pill-ok .dot-wa { background: var(--green); animation: pulseDot 2.4s ease-in-out infinite; }
.passos { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; }
.passos li { display: flex; gap: 12px; align-items: flex-start; font: 400 13px/1.55 var(--f); color: var(--ink2); }
.passos li span { width: 25px; height: 25px; border-radius: 50%; background: var(--accent); color: var(--accentInk); font: 700 11px/1 var(--f);
  display: grid; place-items: center; flex: none; }
.dados4 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 22px; }
.dados4 .v { font: 600 13px/1.3 var(--f); color: var(--ink); margin-top: 6px; }

/* ---------- configurações ---------- */
.radio-c { display: flex; gap: 14px; align-items: flex-start; border: 1px solid var(--line); border-radius: 11px; padding: 14px 16px; cursor: pointer; background: var(--panel2); }
.radio-c .r { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); background: var(--panel3); flex: none; margin-top: 1px; }
.radio-c.on { border-color: var(--accent); background: var(--accentSoft); }
.radio-c.on .r { border: 4px solid var(--accent); background: var(--panel); }
.radio-c b { font: 700 13px/1.2 var(--f); display: block; }
.radio-c small { font: 400 11px/1.5 var(--f); color: var(--muted); display: block; margin-top: 4px; }
.toggle-l { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 16px 0; border-top: 1px solid var(--line); }
.toggle-l b { font: 600 13px/1.3 var(--f); display: block; }
.toggle-l small { font: 400 11px/1.5 var(--f); color: var(--muted); display: block; margin-top: 3px; }
.toggle { width: 44px; height: 25px; border-radius: 20px; background: var(--line); border: 0; padding: 3px; cursor: pointer; display: flex; justify-content: flex-start; flex: none; }
.toggle i { width: 19px; height: 19px; border-radius: 50%; background: var(--panel); display: block; }
.toggle.on { background: var(--accent); justify-content: flex-end; }
.toggle.on i { background: var(--accentInk); }
.servidor { background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.servidor b { font: 600 13px/1.3 var(--f); display: block; }
.servidor small { font: 400 11px/1.3 var(--f); color: var(--green); }
.servidor small.n { color: var(--muted); }

/* ---------- usuários ---------- */
.user-l { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 16px 22px; border-top: 1px solid var(--line); }
.regras { list-style: none; margin: 0; padding: 0; }
.regras li { display: flex; gap: 12px; align-items: baseline; padding: 14px 0; border-top: 1px solid var(--line); font: 400 12px/1.6 var(--f); color: var(--ink2); }
.regras li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; transform: translateY(-2px); }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--bg); }
.login-card { width: min(880px, 100%); display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); border-radius: 18px; overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow); }
.login-marca { background: #0F1A13; padding: 38px; display: flex; flex-direction: column; gap: 40px; justify-content: space-between; }
.login-texto h2 { font: 26px/1.15 var(--fb); color: #EDEADE; font-weight: normal; }
.login-texto p { font: 400 13px/1.6 var(--f); color: #8C9686; margin: 14px 0 0; }
.login-pills { display: flex; gap: 10px; flex-wrap: wrap; }
.login-pills span { border: 1px solid #2C3A2E; color: #F7C61A; font: 700 9px/1 var(--f); letter-spacing: .14em; padding: 7px 12px; border-radius: 20px; }
.login-form { background: var(--panel); padding: 38px; display: flex; flex-direction: column; gap: 16px; justify-content: center; }
.login-form h3 { font: 700 19px/1.2 var(--f); }
.login-form > .muted { margin: -8px 0 4px; font-size: 12px; }
.login-form .nota { justify-content: center; text-align: center; }
.erro { color: var(--wine); font: 500 12px/1.4 var(--f); margin: 0; }

/* ---------- modal e aviso ---------- */
.modal { position: fixed; inset: 0; background: rgba(5, 6, 5, .62); display: grid; place-items: center; padding: 16px; z-index: 60; }
.modal-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); width: min(480px, 100%);
  max-height: 90vh; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.modal-card h2 { font: 700 16px/1.25 var(--f); }
.modal-acoes { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 12px 18px;
  border-radius: 10px; font: 600 12px/1.4 var(--f); z-index: 70; max-width: calc(100% - 32px); box-shadow: var(--shadow); }
.toast.ruim { background: var(--wine); color: #fff; }
.historico { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.historico li { display: flex; gap: 10px; align-items: baseline; font: 400 12px/1.5 var(--f); color: var(--ink2); }
.historico .bola { transform: translateY(1px); }

/* ---------- celular ---------- */
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sb { position: fixed; z-index: 50; left: 0; top: 0; width: 262px; transform: translateX(-100%); transition: transform .2s ease; }
  .sb.aberta { transform: none; }
  .sb-veu.aberta { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 40; }
  .hd { padding: 12px 16px; gap: 10px; }
  .hd-menu { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; font-size: 16px; }
  .hd-titulo { min-width: 0; }
  .hd-titulo h1 { font-size: 19px; }
  .hd-user-txt, .hd-div { display: none; }
  .hd-acoes { width: 100%; order: 3; justify-content: space-between; }
  .hd-acoes .seg { overflow-x: auto; max-width: calc(100% - 100px); scrollbar-width: none; }
  .hd-acoes .seg::-webkit-scrollbar { display: none; }
  .lista { max-height: none; }
  .origem { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 16px; }
  .conv-cab { padding: 16px; gap: 12px; }
  .acoes, .thread { padding-left: 16px; padding-right: 16px; }
  .content { padding: 18px 16px 50px; }
  .grid2, .grid2.largo { grid-template-columns: minmax(0, 1fr); }
  .funil-l { grid-template-columns: 90px minmax(80px, 1fr); }
  .funil-l .custo { grid-column: 2; }
  .conf-l { grid-template-columns: minmax(0, 1fr) auto; }
  .conf-l .mono { grid-column: 1 / -1; }
  .user-l { grid-template-columns: 38px minmax(0, 1fr); }
  .user-l > :nth-child(n+3) { grid-column: 2; justify-self: start; }
  .receb, .prev-l { grid-template-columns: minmax(0, 1fr) auto; }
  .bolha { max-width: 92%; }
  .login-marca, .login-form { padding: 28px 24px; }
}

/* ---------- complementos das telas ---------- */
.card-h.sem-linha { border-bottom: 0; padding-bottom: 4px; }
.lista-topo { padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 14px; border-bottom: 1px solid var(--line); }
.voltar { display: none; }
details.det summary, .det-erro summary { cursor: pointer; font: 600 12px/1.3 var(--f); color: var(--ink2); }
details.det summary:hover, .det-erro summary:hover { color: var(--accentText); }
details pre, .det-erro pre { background: var(--panel3); border: 1px solid var(--line); border-radius: 9px; padding: 12px; margin: 10px 0 0;
  font: 400 11px/1.5 var(--fm); color: var(--ink2); white-space: pre-wrap; word-break: break-word; max-height: 220px; overflow: auto; }
.det-erro { margin-top: 6px; }
.det-erro summary { font-size: 11px; color: var(--muted); }
code { font: 400 11px/1.4 var(--fm); background: var(--panel3); padding: 1px 5px; border-radius: 4px; }
.passos li b { color: var(--ink); }
.mapa-c select { min-width: 0; }

@media (max-width: 900px) {
  .voltar { display: grid; flex: none; }
  .conversas.com-sel .lista-card { display: none; }
  .conversas:not(.com-sel) #detalhe { display: none; }
  .thread { max-height: 60vh; }
  .kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .kpi .v { font-size: 26px; }
}
.chip.on:disabled { opacity: 1; }
.forte a, a.forte { color: var(--ink); }
.forte a:hover, a.forte:hover { color: var(--accentText); }
