/* =====================================================================
   Painel v2: barra lateral de ícones, topo com faturamento e páginas.
   Carregado depois de app.css (usa as mesmas variáveis de cor).
   ===================================================================== */
:root { --rail: 72px; --rail-open: 232px; }
.shell { grid-template-columns: var(--rail) minmax(0, 1fr); transition: grid-template-columns 0.2s ease; }
body.rail-open .shell { grid-template-columns: var(--rail-open) minmax(0, 1fr); }

/* ---------- Barra lateral ---------- */
.rail {
  position: sticky; top: 0; height: 100vh; z-index: 40; display: flex; flex-direction: column; gap: 6px;
  padding: 14px 12px; border-right: 1px solid var(--line); background: rgba(8, 5, 14, 0.92); backdrop-filter: blur(20px);
}
.rail-brand { display: flex; align-items: center; gap: 12px; padding: 2px 7px 14px; text-decoration: none; }
.rail-brand .lbl b { display: block; font-family: var(--display); font-size: 15px; font-weight: 600; }
.rail-brand .lbl small { font-family: var(--mono); font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--dim); }
.rail nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; overflow-x: hidden; flex: 1; margin: 0 -4px; padding: 0 4px; scrollbar-width: none; }
.rail nav::-webkit-scrollbar { display: none; }
.rail nav a, .rail-btn {
  position: relative; display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 13px; border-radius: 11px; flex: none;
  color: var(--muted); text-decoration: none; font-size: 13.5px; font-weight: 500; border: 1px solid transparent; background: none; cursor: pointer; width: 100%; text-align: left;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.rail nav a svg, .rail-btn svg { width: 18px; height: 18px; }
.rail nav a:hover, .rail-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.rail nav a.on { color: #fff; background: linear-gradient(180deg, rgba(139, 92, 246, 0.28), rgba(109, 40, 217, 0.16)); border-color: var(--accent-line); box-shadow: 0 6px 18px rgba(109, 40, 217, 0.25); }
.rail nav a.on svg { color: var(--p4); }
.rail .sep { display: block; height: 1px; margin: 8px 10px; background: var(--line); flex: none; }
.rail-foot { display: flex; flex-direction: column; gap: 2px; padding-top: 8px; border-top: 1px solid var(--line); }
.rail .lbl { white-space: nowrap; overflow: hidden; }
body:not(.rail-open) .rail .lbl { display: none; }
body:not(.rail-open) .rail-brand { justify-content: center; padding-left: 0; padding-right: 0; }
body:not(.rail-open) .rail nav a, body:not(.rail-open) .rail-btn { justify-content: center; padding: 0; }
/* Rótulo ao passar o mouse (barra recolhida). O nav rola, então a dica usa position fixed via JS-free truque: fica dentro do item */
body:not(.rail-open) .rail [data-tip]:hover::after {
  content: attr(data-tip); position: fixed; left: calc(var(--rail) + 6px); z-index: 70; margin-top: -1px;
  padding: 6px 10px; border-radius: 7px; background: #1a1130; border: 1px solid var(--accent-line); color: #fff;
  font-size: 12px; font-weight: 500; white-space: nowrap; pointer-events: none; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}
.rail-shade { display: none; }

/* ---------- Topo ---------- */
.topbar { height: 68px; gap: 18px; padding: 0 28px; }
.rev {
  display: flex; align-items: center; gap: 12px; flex: 1; max-width: 460px; padding: 8px 14px 8px 8px; border-radius: 14px;
  border: 1px solid var(--accent-line); background: linear-gradient(90deg, rgba(139, 92, 246, 0.12), rgba(139, 92, 246, 0.03)); transition: box-shadow 0.3s;
}
.rev.bump { box-shadow: 0 0 0 1px var(--p3), 0 0 30px rgba(139, 92, 246, 0.5); }
.rev-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; color: #fde68a; background: rgba(251, 191, 36, 0.1); border: 1px solid rgba(251, 191, 36, 0.3); }
.rev-body { flex: 1; min-width: 0; display: grid; gap: 7px; }
.rev-top { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.rev-l { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.rev-top b { font-family: var(--display); font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.rev-goal { margin-left: auto; font-family: var(--mono); font-size: 10.5px; color: var(--dim); }
.rev .track { height: 6px; }
.rev-pct { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--p4); min-width: 34px; text-align: right; }
.greet { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; margin-left: 6px; }
.greet b { font-family: var(--display); font-size: 15px; font-weight: 600; white-space: nowrap; }
.greet span { font-size: 12px; color: var(--dim); white-space: nowrap; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  position: relative; height: 38px; min-width: 38px; padding: 0 11px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.03); color: var(--muted); cursor: pointer; text-decoration: none; font-size: 13px; font-weight: 500;
}
.icon-btn:hover { color: var(--text); border-color: var(--accent-line); background: rgba(139, 92, 246, 0.08); }
.badge { position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--p2); box-shadow: 0 0 0 2px var(--bg), 0 0 10px var(--p2); }
.badge[hidden] { display: none; }
.only-m { display: none; }
.menu-wrap { position: relative; display: inline-flex; }
.me-btn { display: inline-flex; align-items: center; gap: 9px; height: 38px; padding: 0 10px 0 4px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.03); cursor: pointer; font-size: 13px; font-weight: 500; }
.me-btn:hover { border-color: var(--accent-line); }
.me-btn > svg { color: var(--dim); width: 14px; height: 14px; }
.dropdown {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 45; min-width: 220px; padding: 6px; border-radius: 12px;
  background: #110b1e; border: 1px solid var(--line-2); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(139, 92, 246, 0.08); animation: slide 0.15s;
}
.dropdown[hidden] { display: none; }
.dropdown > a, .dropdown > button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; border: 0; background: none; color: var(--muted); font-size: 13px; text-decoration: none; cursor: pointer; text-align: left; white-space: nowrap; }
.dropdown > a:hover, .dropdown > button:hover { background: rgba(139, 92, 246, 0.1); color: var(--text); }
.dropdown > button.danger:hover, #dd-out:hover { background: rgba(248, 113, 113, 0.08); color: var(--red); }
.dd-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.dd-h b { font-size: 13px; }
.dd-me { display: flex; gap: 12px; align-items: center; padding: 10px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.dd-me b { display: block; font-size: 13.5px; }
.dd-me span { font-size: 12px; color: var(--dim); }
.feed-dd { width: 380px; max-width: calc(100vw - 24px); }
.feed-dd .feed { margin: 0; max-height: 420px; }
td .menu-wrap { vertical-align: middle; }
td .dropdown { text-align: left; }

/* Avatar */
.av { width: 30px; height: 30px; border-radius: 9px; flex: none; display: inline-grid; place-items: center; overflow: hidden; font-family: var(--display); font-size: 12px; font-weight: 600; color: var(--p4); background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(109, 40, 217, 0.12)); border: 1px solid var(--accent-line); }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av svg { width: 50%; height: 50%; }
.av.lg { width: 42px; height: 42px; border-radius: 12px; font-size: 15px; }
.av.xl { width: 64px; height: 64px; border-radius: 18px; font-size: 22px; }

/* Carregando */
.loading { display: flex; justify-content: center; gap: 6px; padding: 70px 0; }
.loading span { width: 8px; height: 8px; border-radius: 50%; background: var(--p2); animation: ld 1s infinite ease-in-out; }
.loading span:nth-child(2) { animation-delay: 0.15s; } .loading span:nth-child(3) { animation-delay: 0.3s; }
@keyframes ld { 0%, 100% { opacity: 0.25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-5px); } }

/* ---------- Estrutura das páginas ---------- */
.main { padding: 26px 28px 64px; }
.main > * + * { margin-top: 16px; }
.phead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.main > .phead + * { margin-top: 0; }
.phead h1 { font-size: 26px; letter-spacing: -0.03em; }
.phead p { margin: 6px 0 0; color: var(--muted); font-size: 13.5px; max-width: 720px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.period { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-left: auto; }
.period .seg button, .seg button { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; flex: none; }
.custom-dates { display: flex; align-items: center; gap: 8px; }
.custom-dates[hidden] { display: none; }
.custom-dates input { width: 150px; padding: 6px 10px; }
.filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fsel { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.02); color: var(--muted); }
.fsel svg { width: 14px; height: 14px; }
.fsel select { width: auto; border: 0; background: transparent; padding: 0 4px 0 0; box-shadow: none; font-size: 12.5px; cursor: pointer; color: inherit; }
.fsel.on { border-color: var(--accent-line); background: rgba(139, 92, 246, 0.1); color: var(--p4); }
.subtabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.subtabs a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.subtabs a:hover { color: var(--text); }
.subtabs a.on { color: #fff; border-color: var(--p2); }
.subtabs a.on svg { color: var(--p3); }
#tab > * + * { margin-top: 16px; }
.grid.split-main { grid-template-columns: minmax(0, 1.9fr) minmax(280px, 1fr); align-items: start; }
.col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.grid > * { min-width: 0; }
.nowrap { flex-wrap: nowrap !important; white-space: nowrap; }
.cnt { font-family: var(--mono); font-size: 10.5px; color: var(--dim); margin-left: 4px; }
.seg button.on .cnt { color: var(--p4); }
.seg.wide { display: flex; width: 100%; }
.seg.wide button { flex: 1; justify-content: center; gap: 8px; padding: 9px 12px; }
.search { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line-2); background: rgba(0, 0, 0, 0.3); color: var(--dim); min-width: 240px; }
.search:focus-within { border-color: var(--p2); box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15); }
.search input { border: 0; background: transparent; padding: 0; box-shadow: none !important; font-size: 13px; }
.search.sm { height: 32px; min-width: 210px; text-transform: none; letter-spacing: 0; font-family: Inter, sans-serif; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who b { display: block; font-weight: 600; font-size: 13px; }
.who span { display: block; font-size: 11.5px; color: var(--dim); }
.big-val { font-family: var(--display); font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }
.red { color: var(--red); }
.pre { white-space: pre-wrap; }
.row.nowrap input, .row.nowrap select { flex: 1; min-width: 0; }

/* Cabeçalho de cartão */
.ch { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.card .ch h3 { margin: 0; justify-content: flex-start; }
.ch h3 svg { color: var(--p3); }
.ch input { width: auto; padding: 6px 10px; font-size: 12.5px; }
.card.flat { background: rgba(255, 255, 255, 0.015); padding: 16px; }
.card.flat::before { display: none; }
.card.flat + .grid, .card.flat + .card { margin-top: 14px; }

/* Indicadores */
.stat { position: relative; min-width: 0; padding: 18px 20px; border-radius: var(--r); border: 1px solid var(--line); background: linear-gradient(180deg, var(--panel-2), var(--panel)); }
.stat.hero { border-color: var(--accent-line); background: radial-gradient(420px 170px at 100% 0, rgba(139, 92, 246, 0.32), transparent 70%), linear-gradient(180deg, #170e2b, #0f0a1c); }
.stat.warn { border-color: rgba(251, 191, 36, 0.25); background: radial-gradient(360px 150px at 100% 0, rgba(251, 191, 36, 0.1), transparent 70%), linear-gradient(180deg, var(--panel-2), var(--panel)); }
.st-top { display: flex; align-items: center; gap: 10px; }
.st-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; color: var(--p3); background: rgba(139, 92, 246, 0.1); border: 1px solid var(--accent-line); }
.stat.warn .st-ic { color: var(--amber); background: rgba(251, 191, 36, 0.08); border-color: rgba(251, 191, 36, 0.3); }
.st-l { font-size: 12.5px; color: var(--muted); font-weight: 500; flex: 1; min-width: 0; }
.st-v { font-family: var(--display); font-size: 27px; font-weight: 600; letter-spacing: -0.03em; margin-top: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-s { font-size: 12px; color: var(--dim); margin-top: 5px; }
.delta { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 99px; font-family: var(--mono); font-size: 10.5px; font-weight: 600; color: var(--muted); background: rgba(255, 255, 255, 0.05); white-space: nowrap; }
.delta svg { width: 11px; height: 11px; stroke-width: 2.2; }
.delta.up { color: var(--green); background: rgba(74, 222, 128, 0.1); }
.delta.down { color: var(--red); background: rgba(248, 113, 113, 0.1); }

/* Leitura rápida */
.ins-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.ins { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 11px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.02); }
.ins.warn { border-color: rgba(251, 191, 36, 0.28); background: linear-gradient(180deg, rgba(251, 191, 36, 0.06), transparent); }
.ins.good { border-color: rgba(74, 222, 128, 0.25); background: linear-gradient(180deg, rgba(74, 222, 128, 0.05), transparent); }
.ins-k { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; }
.ins.warn .ins-k { color: var(--amber); } .ins.good .ins-k { color: var(--green); }
.ins-k svg { width: 13px; height: 13px; }
.ins b { font-size: 14px; font-weight: 600; }
.ins p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.55; flex: 1; }
.ins a { display: inline-flex; align-items: center; gap: 4px; color: var(--p3); font-size: 12.5px; font-weight: 500; text-decoration: none; margin-top: 4px; }
.ins a:hover { color: var(--p4); }
.ins a svg { width: 13px; height: 13px; }
.ins-empty { display: flex; gap: 12px; align-items: center; color: var(--muted); font-size: 13px; line-height: 1.55; }
.ins-empty svg { color: var(--green); width: 20px; height: 20px; }

/* Gráficos */
svg.chart { width: 100%; display: block; overflow: visible; }
svg.chart .gl { stroke: rgba(255, 255, 255, 0.05); stroke-width: 1; }
svg.chart .b-gen { fill: rgba(196, 181, 253, 0.22); }
svg.chart .b-paid { fill: #8b5cf6; }
svg.chart .b-prev { fill: rgba(255, 255, 255, 0.1); }
svg.chart .l-prev { fill: none; stroke: #fbbf24; stroke-width: 1.6; stroke-dasharray: 4 4; opacity: 0.8; }
svg.chart .l-rev { fill: none; stroke: #a78bfa; stroke-width: 2.2; }
svg.chart .dotc { fill: #0c0816; stroke: #c4b5fd; stroke-width: 2; }
svg.chart g:hover .b-paid { fill: #a78bfa; }
.legend { flex-wrap: wrap; }
.legend i { border-radius: 2px; }
.legend i.lg-gen { width: 9px; height: 9px; background: rgba(196, 181, 253, 0.35); }
.legend i.lg-paid { width: 9px; height: 9px; background: #8b5cf6; }
.legend i.lg-prev { width: 9px; height: 9px; background: rgba(255, 255, 255, 0.16); }
.legend i.lg-line { width: 14px; height: 0; border-top: 2px dashed #fbbf24; background: none; }
.legend i.lg-line2 { width: 14px; height: 2px; background: #a78bfa; }
.strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 16px; border-top: 1px solid var(--line); }
.strip > div { padding: 14px 16px 0; border-left: 1px solid var(--line); display: grid; gap: 3px; }
.strip > div:first-child { border-left: 0; padding-left: 0; }
.strip span { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.strip b { font-family: var(--display); font-size: 18px; font-weight: 600; }
.strip small { font-size: 12px; color: var(--muted); }
.mini-sum { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; font-size: 12.5px; }
.mini-sum b { font-family: var(--display); font-size: 22px; font-weight: 600; }
.minibars { display: flex; align-items: flex-end; gap: 3px; }
.minibars > div { flex: 1; height: 100%; display: flex; align-items: flex-end; border-radius: 4px; background: rgba(255, 255, 255, 0.025); }
.minibars i { display: block; width: 100%; min-height: 2px; border-radius: 4px; background: linear-gradient(180deg, #a78bfa, #6d28d9); }
.minibars > div:hover i { background: #c4b5fd; }
.mb-axis { display: flex; justify-content: space-between; margin-top: 8px; font-family: var(--mono); font-size: 10px; color: var(--dim); }
.hbs { display: grid; gap: 14px; }
.hb-t { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 7px; font-size: 13px; }
.hb-t > span { display: inline-flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-t b { font-family: var(--mono); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.hb-t small { color: var(--dim); font-weight: 400; margin-left: 4px; }
.rk { width: 20px; height: 20px; border-radius: 6px; flex: none; display: inline-grid; place-items: center; font-family: var(--mono); font-size: 10.5px; color: var(--p4); background: rgba(139, 92, 246, 0.12); border: 1px solid var(--accent-line); }

/* ---------- Financeiro ---------- */
.tx-list { display: grid; max-height: 640px; overflow-y: auto; margin: 0 -8px; }
.tx { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto auto auto; gap: 14px; align-items: center; padding: 11px 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.035); border-radius: 8px; }
.tx:hover { background: rgba(139, 92, 246, 0.04); }
.tx-m { min-width: 0; }
.tx-m b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-m span { display: block; font-size: 11.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-d { display: grid; text-align: right; font-size: 11.5px; gap: 2px; }
.tx-v { font-family: var(--display); font-size: 14px; font-weight: 600; min-width: 92px; text-align: right; }
.tx-v.ok { color: var(--green); }
.meth { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.ch + .meth { border-top: 0; padding-top: 0; }
.meth-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--p3); background: rgba(139, 92, 246, 0.1); border: 1px solid var(--accent-line); }
.meth b { font-size: 13px; }
.meth span { display: block; font-size: 11.5px; color: var(--dim); margin: 2px 0 7px; }
dl.sum { display: grid; grid-template-columns: auto 1fr; gap: 0; margin: 0; font-size: 13px; }
dl.sum dt, dl.sum dd { padding: 10px 0; border-top: 1px solid var(--line); }
dl.sum dt:first-of-type, dl.sum dt:first-of-type + dd { border-top: 0; padding-top: 0; }
dl.sum dt { color: var(--muted); padding-right: 14px; }
dl.sum dd { margin: 0; text-align: right; font-weight: 600; word-break: break-word; }
dl.sum.review dd { text-align: left; font-weight: 500; padding-left: 18px; }
dl.sum.review { margin-bottom: 18px; }

/* ---------- Cartões (robôs, fluxos, perfis, campanhas) ---------- */
.bot-grid, .flow-grid, .px-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.bot-card, .flow-card, .px-card, .rm-card {
  position: relative; display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: 14px; min-width: 0;
  border: 1px solid var(--line); background: linear-gradient(180deg, var(--panel-2), var(--panel)); transition: border-color 0.15s;
}
.bot-card:hover, .flow-card:hover, .px-card:hover, .rm-card:hover { border-color: var(--accent-line); }
.bot-card.off, .px-card.off, .rm-card.off { opacity: 0.68; }
.bot-card.bad { border-color: rgba(248, 113, 113, 0.35); }
.bot-card.add { align-items: center; justify-content: center; text-align: center; min-height: 230px; cursor: pointer; color: var(--muted); border: 1px dashed var(--accent-line); background: rgba(139, 92, 246, 0.03); font: inherit; gap: 8px; }
.bot-card.add:hover { background: rgba(139, 92, 246, 0.08); color: var(--text); }
.bot-card.add > svg { width: 26px; height: 26px; color: var(--p3); padding: 10px; box-sizing: content-box; border-radius: 14px; border: 1px solid var(--accent-line); background: rgba(139, 92, 246, 0.1); }
.bot-card.add b { font-family: var(--display); font-size: 15px; color: var(--text); }
.bot-card.add span { font-size: 12.5px; max-width: 240px; line-height: 1.5; }
.bc-head { display: flex; align-items: center; gap: 12px; }
.bc-id { flex: 1; min-width: 0; }
.bc-id b { display: block; font-family: var(--display); font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-id a { font-size: 12px; color: var(--p3); text-decoration: none; }
.bc-id a:hover { color: var(--p4); }
.bphoto { position: relative; width: 46px; height: 46px; border-radius: 50%; flex: none; overflow: hidden; display: grid; place-items: center; background: linear-gradient(135deg, #8b5cf6, #4c1d95); border: 2px solid rgba(196, 181, 253, 0.35); }
.bphoto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.bphoto.has img { opacity: 1; }
.bphoto.has .ini { visibility: hidden; }
.bphoto .ini { font-family: var(--display); font-weight: 600; font-size: 15px; color: #fff; }
.bphoto.lg { width: 76px; height: 76px; }
.bphoto.lg .ini { font-size: 24px; }
.bc-warn { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-size: 12.5px; color: #fecaca; border: 1px solid rgba(248, 113, 113, 0.3); background: rgba(248, 113, 113, 0.07); }
.bc-warn > svg { color: var(--red); }
.bc-warn span { flex: 1; }
.bc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-radius: 11px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.25); }
.bc-stats > div { padding: 10px 12px; border-left: 1px solid var(--line); min-width: 0; }
.bc-stats > div:first-child { border-left: 0; }
.bc-stats span { display: block; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.bc-stats b { display: block; font-family: var(--display); font-size: 16px; font-weight: 600; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-flow { display: flex; align-items: center; gap: 10px; }
.bc-flow > span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.bc-flow > span svg { color: var(--p3); width: 14px; height: 14px; }
.bc-flow select { padding: 7px 10px; font-size: 12.5px; }
.bc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.pf-photo { display: flex; gap: 16px; align-items: center; padding: 14px; margin-bottom: 18px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.25); }
.pf-photo b { display: block; font-size: 13.5px; }
.pf-photo > div > span { display: block; font-size: 12px; color: var(--dim); margin: 3px 0 10px; line-height: 1.5; }

/* Interruptor */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-size: 13px; color: var(--muted); position: relative; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.switch i { position: relative; width: 36px; height: 20px; flex: none; border-radius: 99px; background: rgba(255, 255, 255, 0.1); border: 1px solid var(--line-2); transition: background 0.2s, border-color 0.2s; }
.switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #cfc8de; transition: transform 0.2s, background 0.2s; }
.switch input:checked + i { background: linear-gradient(180deg, #8b5cf6, #6d28d9); border-color: rgba(196, 181, 253, 0.45); }
.switch input:checked + i::after { transform: translateX(16px); background: #fff; }
.switch input:focus-visible + i { box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.3); }
.switch input:checked ~ span { color: var(--text); }
.field label.switch, .field label.chip, .field label.btn { font-family: Inter, system-ui, sans-serif; font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--muted); }
.field label.switch { justify-self: start; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 99px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.02); font-size: 12.5px; color: var(--muted); transition: 0.15s; }
.chip span small { color: var(--dim); font-size: 11px; }
.chip:hover span { border-color: var(--accent-line); color: var(--text); }
.chip input:checked + span { border-color: var(--p2); background: rgba(139, 92, 246, 0.16); color: #fff; }
.chip input:checked + span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--p3); box-shadow: 0 0 8px var(--p2); }
.chip-s { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px; font-size: 11.5px; color: var(--p4); border: 1px solid var(--accent-line); background: rgba(139, 92, 246, 0.08); white-space: nowrap; }
.chip-s svg { width: 12px; height: 12px; }

/* ---------- Fluxos ---------- */
.fc-head { display: flex; align-items: center; gap: 12px; }
.fc-head > div { flex: 1; min-width: 0; }
.fc-head b { display: block; font-family: var(--display); font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-head > div > span { font-size: 12px; color: var(--dim); }
.fc-ic { width: 40px; height: 40px; border-radius: 11px; flex: none; display: grid; place-items: center; color: var(--p4); background: rgba(139, 92, 246, 0.12); border: 1px solid var(--accent-line); }
.fc-ic.n8n { color: var(--amber); background: rgba(251, 191, 36, 0.08); border-color: rgba(251, 191, 36, 0.3); }
.fc-bots { display: flex; flex-wrap: wrap; gap: 6px; min-height: 24px; align-items: center; }
.fc-bots .dim { display: inline-flex; align-items: center; gap: 6px; }
.fc-bots .dim svg { width: 13px; height: 13px; }
.fc-steps { display: flex; align-items: center; padding: 10px 12px; border-radius: 10px; background: rgba(0, 0, 0, 0.25); border: 1px solid var(--line); overflow: hidden; }
.fc-steps > span { width: 28px; height: 28px; flex: none; border-radius: 8px; display: grid; place-items: center; color: var(--p3); background: rgba(139, 92, 246, 0.1); border: 1px solid var(--accent-line); }
.fc-steps > span svg { width: 14px; height: 14px; }
.fc-steps > i { flex: 1; min-width: 6px; max-width: 26px; height: 1px; background: var(--accent-line); }
.fc-steps em { font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--dim); margin-left: 8px; }
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.editor .steps { display: grid; }
.ed-side { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 14px; }
.add-list { display: grid; gap: 6px; }
.add-list .btn { justify-content: flex-start; }
.add-list .btn svg { color: var(--p3); }
.title-in { font-family: var(--display); font-size: 22px; font-weight: 600; letter-spacing: -0.02em; padding: 4px 8px; margin-left: -8px; background: transparent; border-color: transparent; width: min(480px, 60vw); }
.title-in:hover { border-color: var(--line-2); }
.phead .title-in + p { margin-top: 2px; }

/* ---------- Remarketing ---------- */
.rm-group { display: grid; gap: 12px; }
.rm-gh { display: flex; align-items: center; gap: 10px; }
.rm-gh > svg { color: var(--p3); }
.rm-gh b { font-family: var(--display); font-size: 15px; font-weight: 600; }
.rm-gh span { font-size: 12px; }
.rm-gh .btn { margin-left: auto; }
.rm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.rm-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.rm-h > div { min-width: 0; }
.rm-h b { display: block; font-family: var(--display); font-size: 15px; font-weight: 600; }
.rm-h > div > span { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--dim); margin-top: 2px; }
.rm-h span svg { width: 13px; height: 13px; }
.rm-msg { margin: 0; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.25); font-size: 12.5px; color: var(--muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; }
.rm-sched { display: flex; align-items: center; gap: 10px; }
.rm-sched > svg { color: var(--p3); }
.rm-sched > div { flex: 1; min-width: 0; }
.rm-sched b { display: block; font-size: 13px; }
.rm-sched span { font-size: 11.5px; color: var(--dim); }

/* Assistente */
.wz-steps { display: flex; gap: 6px; margin: -4px 0 20px; overflow-x: auto; padding-bottom: 2px; }
.wz-steps button { flex: 1; display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); color: var(--dim); font-size: 12px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.wz-steps button > span { width: 22px; height: 22px; border-radius: 7px; flex: none; display: grid; place-items: center; font-family: var(--mono); font-size: 11px; border: 1px solid var(--line-2); }
.wz-steps button > span svg { width: 12px; height: 12px; }
.wz-steps button.done { color: var(--muted); }
.wz-steps button.done > span { color: var(--green); border-color: rgba(74, 222, 128, 0.35); background: rgba(74, 222, 128, 0.07); }
.wz-steps button.cur { color: #fff; border-color: var(--accent-line); background: rgba(139, 92, 246, 0.12); }
.wz-steps button.cur > span { color: #fff; border-color: var(--p2); background: var(--p1); }
.wz-body { min-height: 260px; }
.aud-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.aud { display: flex; flex-direction: column; gap: 5px; padding: 14px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.02); cursor: pointer; transition: 0.15s; }
.aud:hover { border-color: var(--accent-line); }
.aud.on { border-color: var(--p2); background: rgba(139, 92, 246, 0.12); box-shadow: 0 0 0 1px var(--p2) inset; }
.aud-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: var(--p3); background: rgba(139, 92, 246, 0.1); border: 1px solid var(--accent-line); margin-bottom: 4px; }
.aud b { font-size: 13.5px; }
.aud > span:last-child { font-size: 12px; color: var(--dim); line-height: 1.45; }
.aud-count { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--accent-line); background: rgba(139, 92, 246, 0.07); font-size: 13px; color: var(--muted); }
.aud-count svg { color: var(--p3); }
.aud-count b { color: #fff; font-family: var(--display); font-size: 16px; }
.msg-ed { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; align-items: start; }
.tg-prev { border-radius: 14px; overflow: hidden; border: 1px solid var(--line-2); background: #0e1621; }
.tg-top { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: #17212b; font-size: 13px; }
.tg-top svg { color: #8ab4f8; }
.tg-bubble { margin: 14px 12px 16px; padding: 8px 10px; border-radius: 12px 12px 12px 4px; background: #182533; font-size: 13px; line-height: 1.5; color: #e8eef4; min-height: 40px; word-break: break-word; }
.tg-img { height: 120px; margin: -2px -4px 8px; border-radius: 8px; display: grid; place-items: center; color: #5b6b7c; background: #22303d; }
.tg-btn { display: block; margin-top: 8px; padding: 7px; border-radius: 8px; text-align: center; font-size: 12.5px; font-weight: 500; color: #fff; background: rgba(255, 255, 255, 0.1); }

/* ---------- Links ---------- */
.table.links td { vertical-align: top; }
.url-row { display: flex; align-items: center; gap: 6px; margin-top: 4px; min-width: 0; }
.url-row .mono { color: var(--dim); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px; }
.url-row > .dim { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; }
.stack { display: grid; gap: 2px; }
.stack small { font-size: 11.5px; }
.muted-row td { opacity: 0.55; }
.muted-row td:nth-child(2), .muted-row td:last-child { opacity: 1; }
.btn.xs { padding: 3px 7px; font-size: 11.5px; border-radius: 6px; }
.btn.xs.icon { padding: 4px; }
.btn.xs svg { width: 13px; height: 13px; }
.btn.red { background: linear-gradient(180deg, #ef4444, #b91c1c); border-color: rgba(254, 202, 202, 0.3); color: #fff; }
.btn.red:hover { filter: brightness(1.1); }
.code.big { padding: 12px 14px; font-size: 12px; line-height: 1.6; }
pre.code { margin: 0 0 14px; overflow-x: auto; white-space: pre; word-break: normal; color: var(--p4); }

/* ---------- Modais e formulários ---------- */
.modal.wide { width: min(860px, 100%); }
.modal-x { position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.03); color: var(--muted); cursor: pointer; z-index: 2; }
.modal-x:hover { color: var(--text); border-color: var(--accent-line); }
.modal h2 { padding-right: 40px; }
.modal h2 + .msub { margin-top: -12px; }
.msub { margin: 0 0 20px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.fgrid > .field { grid-column: 1 / -1; }
.fgrid > .field.half { grid-column: auto; }
.mfoot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.modal .notice { margin-bottom: 14px; }
.howto { margin: 0 0 18px; padding-left: 20px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.howto b { color: var(--text); }

/* Escolha de plataforma / gateway */
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-top: 14px; }
.pick { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; padding: 16px; border-radius: 12px; text-align: left; cursor: pointer; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.02); color: var(--text); font: inherit; transition: 0.15s; }
.pick:hover { border-color: var(--p2); background: rgba(139, 92, 246, 0.1); transform: translateY(-1px); }
.pick-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--p3); background: rgba(139, 92, 246, 0.1); border: 1px solid var(--accent-line); margin-bottom: 6px; }
.pick b { font-size: 14px; }
.pick > span:not(.pick-ic) { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.pick small { font-size: 11.5px; color: var(--dim); line-height: 1.45; }
.pick-grid .empty { border: 1px dashed var(--line-2); border-radius: 12px; display: grid; justify-items: center; gap: 6px; }
.pick-grid .empty > svg { width: 26px; height: 26px; color: var(--p3); }

/* Logo do gateway (monograma ou imagem) */
.gw-logo { --s: 52px; width: var(--s); height: var(--s); flex: none; border-radius: calc(var(--s) * 0.28); display: grid; place-items: center; overflow: hidden; background: linear-gradient(145deg, var(--c1), var(--c2)); box-shadow: 0 8px 24px -10px var(--c2), inset 0 1px 0 rgba(255, 255, 255, 0.25); color: #fff; font-family: var(--display); font-weight: 700; font-size: calc(var(--s) * 0.36); letter-spacing: -0.03em; }
.gw-logo.img { background: #fff; }
.gw-logo img { width: 100%; height: 100%; object-fit: cover; }
.pick .gw-logo { margin-bottom: 6px; }

/* Página de gateways em cards */
.gw-sec { border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, 0.012); padding: 18px; margin-top: 18px; }
.gw-sec-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.gw-sec-h h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; }
.gw-sec-h h3 svg { width: 15px; height: 15px; color: var(--p3); }
.gw-sec-h .dim { font-size: 12px; }
.cnt { display: inline-grid; place-items: center; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 9px; background: rgba(139, 92, 246, 0.16); color: var(--p4); font-family: var(--mono); font-size: 10.5px; font-weight: 600; }
.gwc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 14px; }
.gwc { display: flex; flex-direction: column; border: 1px solid var(--line-2); border-radius: 14px; background: linear-gradient(180deg, rgba(139, 92, 246, 0.05), rgba(255, 255, 255, 0.01) 40%); padding: 14px; transition: border-color 0.15s, transform 0.15s; }
.gwc:hover { border-color: var(--accent-line); }
.gwc[hidden] { display: none; }
.gwc-top { display: flex; align-items: center; gap: 8px; min-height: 26px; }
.gwc-n { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.06); font-family: var(--mono); font-size: 11px; font-weight: 600; }
.gwc-role { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--muted); }
.gwc-role.pri { color: #fff; border-color: transparent; background: linear-gradient(135deg, var(--p1), var(--p2)); box-shadow: 0 0 16px -4px var(--p2); }
.gwc-n:first-child:has(+ .gwc-role.pri) { background: linear-gradient(135deg, var(--p1), var(--p2)); }
.gwc-ord { margin-left: auto; display: flex; gap: 2px; }
.gwc-ord button { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; border: 0; background: none; color: var(--muted); cursor: pointer; }
.gwc-ord button:hover:not(:disabled) { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.gwc-ord button:disabled { opacity: 0.25; cursor: default; }
.gwc-ord svg { width: 14px; height: 14px; }
.gwc-id { display: grid; justify-items: center; gap: 10px; padding: 14px 0 16px; text-align: center; }
.gwc-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.gwc-name b { font-size: 15px; }
.gwc-kind { display: inline-flex; align-items: center; gap: 4px; font-family: var(--mono); font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 6px; color: var(--p4); background: rgba(139, 92, 246, 0.14); border: 1px solid var(--accent-line); }
.gwc-kind svg { width: 11px; height: 11px; }
.gw-scope { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; padding: 3px 10px; border-radius: 20px; color: var(--green); background: rgba(74, 222, 128, 0.08); border: 1px solid rgba(74, 222, 128, 0.22); }
.gw-scope.sp { color: var(--p4); background: rgba(139, 92, 246, 0.1); border-color: var(--accent-line); }
.gw-scope svg { width: 12px; height: 12px; }
.gwc-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); padding-top: 12px; text-align: center; }
.gwc-stats div { display: grid; gap: 3px; }
.gwc-stats div + div { border-left: 1px solid var(--line); }
.gwc-stats span { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.gwc-stats b { font-size: 14px; font-variant-numeric: tabular-nums; }
.gwc-act { display: flex; justify-content: center; flex-wrap: wrap; gap: 0; border-top: 1px solid var(--line); margin-top: 12px; padding-top: 10px; }
.gwc-act button { display: inline-flex; align-items: center; gap: 4px; padding: 6px; border-radius: 8px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 11.5px; white-space: nowrap; cursor: pointer; transition: 0.12s; }
.gwc-act button svg { width: 13px; height: 13px; }
.gwc-act button:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.gwc-act button.go { color: var(--green); }
.gwc-act button.danger:hover { color: var(--red); background: rgba(248, 113, 113, 0.08); }
.gwc.off .gwc-id { opacity: 0.55; filter: grayscale(0.6); }
.gwc.off { background: rgba(255, 255, 255, 0.01); }
.gw-reg { display: flex; flex-wrap: wrap; gap: 6px; }
.gw-reg button { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 8px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.02); color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
.gw-reg button svg { width: 13px; height: 13px; }
.gw-reg button.on { color: #fff; border-color: var(--p2); background: rgba(139, 92, 246, 0.14); }
.gw-empty { display: flex; gap: 10px; align-items: center; padding: 16px; border-radius: 12px; border: 1px dashed rgba(251, 191, 36, 0.35); color: var(--amber); font-size: 13px; }
.gw-empty svg { width: 16px; height: 16px; flex: none; }
.gw-sec + .notice { margin-top: 18px; }

/* Saque pelo painel */
.po { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.po > *, .po input, .po select { min-width: 0; max-width: 100%; }
.po-bal { color: var(--text); }
.po-amt { display: flex; align-items: center; gap: 10px; padding: 0 12px 0 16px; height: 60px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(0, 0, 0, 0.25); transition: border-color 0.15s; }
.po-amt:focus-within { border-color: var(--p2); box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15); }
.po-amt > span { font-family: var(--mono); color: var(--muted); font-size: 14px; }
.po-amt input { flex: 1; min-width: 0; border: 0 !important; background: none !important; box-shadow: none !important; padding: 0 !important; font-family: var(--display); font-size: 26px; font-weight: 600; color: var(--text); outline: none; }
.po-max { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--accent-line); background: rgba(139, 92, 246, 0.14); color: var(--p4); cursor: pointer; }
.po-max:hover { background: rgba(139, 92, 246, 0.25); color: #fff; }
.po-dest { display: grid; gap: 6px; }
.po-acc { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(74, 222, 128, 0.25); background: rgba(74, 222, 128, 0.06); font-size: 13px; }
.po-acc svg { width: 16px; height: 16px; color: var(--green); flex: none; }
.po-key { display: grid; gap: 6px; }
.po-key[hidden] { display: none; }
.po-keyrow { display: grid; grid-template-columns: 150px 1fr; gap: 8px; }
.po-key small { color: var(--dim); font-size: 11.5px; }
.po-go { width: 100%; justify-content: center; height: 46px; font-size: 14px; }
.po-eta { margin: -6px 0 0; text-align: center; font-size: 11.5px; color: var(--dim); }
.po-hist { border-top: 1px solid var(--line); padding-top: 12px; display: grid; gap: 6px; }
.po-hist-h { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
.po-w { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; font-size: 12.5px; }
.po-w > span:first-child { color: var(--muted); font-family: var(--mono); font-size: 11.5px; }
.po-pin { font-family: var(--mono) !important; font-size: 22px !important; letter-spacing: 0.5em; text-align: center; height: 52px; }
.po-pin::placeholder { letter-spacing: 0.35em; color: var(--dim); }
.po-pinhead { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--accent-line); background: rgba(139, 92, 246, 0.08); }
.po-pinhead svg { width: 20px; height: 20px; color: var(--p4); flex: none; margin-top: 2px; }
.po-pinhead div { display: grid; gap: 4px; font-size: 13px; }
.po-pinhead span { color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.po-fee { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding: 10px 14px; border-radius: 10px; border: 1px dashed var(--line-2); font-size: 13px; color: var(--muted); }
.po-fee b { color: var(--text); font-family: var(--mono); }
@media (max-width: 520px) { .po-keyrow { grid-template-columns: 1fr; } }

/* Configurar gateway: só as chaves, escopo e avançado */
.gw-form { display: grid; gap: 16px; }
.gw-form [hidden] { display: none !important; }
.gw-form .field { margin: 0; }
.gw-form .field small { display: block; margin-top: 6px; }
.gw-title { display: flex; gap: 14px; align-items: center; padding-right: 44px; margin-bottom: 6px; }
.gw-title .pick-ic { margin: 0; flex: none; width: 42px; height: 42px; }
.gw-title h2 { margin: 0; padding: 0; line-height: 1.25; }
.gw-title h2 + .msub { margin: 5px 0 0; line-height: 1.45; }
.gw-sep { display: flex; align-items: center; gap: 10px; color: var(--muted); font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; margin-top: 4px; }
.gw-sep::before, .gw-sep::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.gw-sep span { display: inline-flex; align-items: center; gap: 6px; }
.gw-sep svg { width: 13px; height: 13px; }
.scope { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.scope button { display: grid; justify-items: center; gap: 4px; padding: 16px 10px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.02); color: var(--muted); font: inherit; cursor: pointer; transition: 0.15s; }
.scope button svg { width: 18px; height: 18px; }
.scope button b { font-size: 13.5px; color: var(--text); }
.scope button small { font-size: 11.5px; color: var(--dim); }
.scope button:hover { border-color: var(--accent-line); }
.scope button.on { border-color: var(--p2); background: rgba(139, 92, 246, 0.14); color: var(--p3); box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.25), 0 0 24px -8px rgba(139, 92, 246, 0.6); }
.scope-info { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.02); font-size: 12.5px; color: var(--muted); }
.scope-info svg { width: 16px; height: 16px; color: var(--p3); flex: none; }
.scope-info b { color: var(--text); }
.scope-pick { display: grid; gap: 8px; }
.scope-pick small { font-size: 11.5px; }
.gw-adv { border: 1px solid var(--line); border-radius: 10px; padding: 0 14px; }
.gw-adv[open] { padding-bottom: 14px; }
.gw-adv summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; padding: 12px 0; font-size: 12.5px; color: var(--muted); }
.gw-adv summary::-webkit-details-marker { display: none; }
.gw-adv summary svg { width: 14px; height: 14px; }
.gw-adv[open] summary { color: var(--text); }
.gw-adv .field + .field, .gw-adv summary + .field { margin-top: 12px; }
.gw-form .btn.pri:disabled { opacity: 0.45; cursor: not-allowed; }

/* ---------- Gateways ---------- */
.gw-list { display: grid; gap: 10px; }
.gw-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 18px; align-items: center; padding: 14px 18px 14px 12px; border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(180deg, var(--panel-2), var(--panel)); }
.gw-card.off { opacity: 0.62; }
.gw-ord { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.gw-ord > span { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--p4); }
.gw-main { min-width: 0; }
.gw-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gw-h b { font-family: var(--display); font-size: 15px; font-weight: 600; }
.gw-h .dim { font-size: 12px; }
.gw-role { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--dim); }
.gw-role.pri { color: #fff; border-color: var(--p2); background: var(--p1); box-shadow: 0 0 14px rgba(139, 92, 246, 0.35); }
.gw-role.fb { color: var(--p4); border-color: var(--accent-line); background: rgba(139, 92, 246, 0.08); }
.gw-stats { display: flex; gap: 22px; }
.gw-stats > div { display: grid; gap: 2px; text-align: right; }
.gw-stats span { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.gw-stats b { font-family: var(--display); font-size: 15px; font-weight: 600; white-space: nowrap; }
.gw-act { display: flex; align-items: center; gap: 6px; }

/* ---------- Ferramentas ---------- */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.tool { position: relative; display: flex; flex-direction: column; padding: 20px; border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(180deg, var(--panel-2), var(--panel)); }
.tool:hover { border-color: var(--accent-line); }
.tool p { margin: 0 0 14px; font-size: 12.5px; color: var(--muted); line-height: 1.55; flex: 1; }
.tool-h { display: flex; justify-content: space-between; align-items: flex-start; }
.tool-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.tool-tags span { font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em; padding: 3px 8px; border-radius: 6px; color: var(--dim); border: 1px solid var(--line-2); }
.tool > .btn { align-self: flex-start; }
.tool.locked .ico { color: var(--dim); background: rgba(255, 255, 255, 0.03); border-color: var(--line-2); }
.tool.locked h4, .tool.locked p { opacity: 0.75; }
.unlock { display: grid; gap: 8px; font-size: 12px; color: var(--muted); }

/* ---------- Trackeamento e raspadinha ---------- */
.px-h { display: flex; align-items: center; gap: 12px; }
.px-h > div { flex: 1; min-width: 0; }
.px-h b { display: block; font-family: var(--display); font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.px-h > div > span { font-size: 12px; color: var(--dim); }
.px-ic { width: 40px; height: 40px; flex: none; border-radius: 11px; display: grid; place-items: center; color: var(--p4); background: rgba(139, 92, 246, 0.12); border: 1px solid var(--accent-line); }
.px-ic.meta { color: #93c5fd; background: rgba(59, 130, 246, 0.1); border-color: rgba(59, 130, 246, 0.3); }
.px-ic.tiktok { color: #f0abfc; background: rgba(236, 72, 153, 0.08); border-color: rgba(236, 72, 153, 0.3); }
.px-ic.google { color: #fde68a; background: rgba(251, 191, 36, 0.08); border-color: rgba(251, 191, 36, 0.3); }
.px-ev { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-radius: 11px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.25); }
.px-ev > div { padding: 10px 12px; border-left: 1px solid var(--line); min-width: 0; }
.px-ev > div:first-child { border-left: 0; }
.px-ev span { display: block; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.px-ev b { display: block; font-family: var(--display); font-size: 16px; font-weight: 600; margin-top: 3px; }
.px-ev small { font-size: 10.5px; }
.px-ev .no b { color: var(--dim); font-size: 13px; }
.px-flows { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 12px; }
.px-flows > svg { color: var(--p3); width: 14px; height: 14px; }
.px-err { display: flex; gap: 8px; align-items: flex-start; padding: 9px 11px; border-radius: 9px; font-size: 12px; color: #fecaca; border: 1px solid rgba(248, 113, 113, 0.3); background: rgba(248, 113, 113, 0.06); word-break: break-word; }
.px-err svg { color: var(--red); margin-top: 1px; }
.px-err em { color: var(--dim); font-style: normal; margin-left: 4px; }
.steps4 { gap: 10px; }
.steps4 .step { border-radius: 11px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.2); }
.prz { display: grid; gap: 6px; }
.prz > div { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; padding: 7px 10px; border-radius: 8px; background: rgba(255, 255, 255, 0.025); }
.prz em { font-style: normal; font-family: var(--mono); font-size: 11.5px; color: var(--p4); }
#prz { display: grid; gap: 6px; }
.pz-h, .pz { display: grid; grid-template-columns: 1.3fr 1.4fr 1fr 70px 90px 30px; gap: 6px; align-items: center; }
.pz-h span { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
.pz input, .pz select { padding: 7px 9px; font-size: 12.5px; }
.modal .seg.wide { margin-bottom: 18px; }

/* ---------- Ranking ---------- */
.grid.rank-top { grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); align-items: stretch; }
.podium { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 12px; padding-top: 10px; }
.pod { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; min-width: 0; }
.pod b { font-size: 13.5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod .tag { margin-left: 4px; }
.pod-v { font-family: var(--display); font-size: 15px; font-weight: 600; color: var(--p4); }
.pod-v .dim { display: inline-flex; align-items: center; gap: 5px; font-family: Inter, sans-serif; font-size: 12px; }
.pod-n { position: absolute; top: 46px; left: calc(50% + 18px); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-size: 11px; font-weight: 700; color: #0b0614; background: #c4b5fd; border: 2px solid var(--panel); }
.pod.p1 .pod-n { background: #fde68a; } .pod.p2 .pod-n { background: #e5e7eb; } .pod.p3 .pod-n { background: #fdba74; }
.pod.p1 .av { box-shadow: 0 0 0 2px #fbbf24, 0 0 26px rgba(251, 191, 36, 0.35); }
.pod.me .av { box-shadow: 0 0 0 2px var(--p2), 0 0 22px rgba(139, 92, 246, 0.45); }
.pod-base { width: 100%; margin-top: 8px; border-radius: 12px 12px 4px 4px; display: grid; place-items: center; border: 1px solid var(--accent-line); background: linear-gradient(180deg, rgba(139, 92, 246, 0.22), rgba(139, 92, 246, 0.03)); }
.pod-base span { font-family: var(--display); font-size: 22px; font-weight: 700; color: rgba(255, 255, 255, 0.85); }
.pod.p1 .pod-base { height: 120px; border-color: rgba(251, 191, 36, 0.4); background: linear-gradient(180deg, rgba(251, 191, 36, 0.2), rgba(139, 92, 246, 0.05)); }
.pod.p2 .pod-base { height: 86px; }
.pod.p3 .pod-base { height: 62px; }
.empty-pod { opacity: 0.45; }
.empty-pod .av { color: var(--dim); background: rgba(255, 255, 255, 0.03); border-color: var(--line-2); }
.mp { display: flex; align-items: center; gap: 16px; }
.mp-n { font-family: var(--display); font-size: 40px; font-weight: 700; letter-spacing: -0.04em; background: linear-gradient(180deg, #fff, #a78bfa); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mp b { display: block; font-family: var(--display); font-size: 19px; font-weight: 600; }
.mp span { font-size: 12px; color: var(--dim); }
.me-pos .split { border-top: 0; padding-bottom: 4px; }
.np { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.np b { font-family: var(--display); font-size: 17px; font-weight: 600; }
.np span { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.award-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.award { border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(180deg, var(--panel-2), var(--panel)); display: grid; gap: 6px; }
.award.ok { border-color: rgba(251, 191, 36, 0.3); }
.award .badge { position: static; width: 38px; height: 38px; border-radius: 10px; background: transparent; margin-bottom: 6px; }
.award.ok .badge { box-shadow: 0 0 20px rgba(251, 191, 36, 0.15); }
.award:not(.ok) .badge { box-shadow: none; }
.award.ok .bar i { background: linear-gradient(90deg, #f59e0b, #fde68a); }

/* ---------- Configurações ---------- */
.av-edit { display: flex; align-items: center; gap: 18px; padding: 16px; margin-bottom: 18px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.25); }
.av-edit b { display: block; font-size: 14px; }
.av-edit > div > span { display: block; font-size: 12px; color: var(--dim); margin-top: 3px; }
.notif { display: grid; margin: 4px 0 18px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.nt { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-top: 1px solid var(--line); }
.nt:first-child { border-top: 0; }
.nt > svg { color: var(--p3); }
.nt > div { flex: 1; }
.nt b { display: block; font-size: 13.5px; }
.nt > div > span { font-size: 12px; color: var(--dim); }

/* ---------- Dashboard ---------- */
/* Log de atividade em tempo real */
.lg-head, .lg-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) 130px 120px; gap: 14px; align-items: center; }
.lg-head { padding: 0 12px 8px; border-bottom: 1px solid var(--line); }
.lg-head span { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.lg-head span:nth-child(3), .lg-head span:nth-child(4) { text-align: right; }
.lg-list { max-height: 520px; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.lg-row { position: relative; padding: 11px 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.035); border-radius: 10px; }
.lg-row:hover { background: rgba(139, 92, 246, 0.05); }
.lg-row.fresh { animation: lgIn 2.4s ease; }
@keyframes lgIn { 0% { opacity: 0; transform: translateY(-6px); background: rgba(139, 92, 246, 0.22); } 15% { opacity: 1; transform: none; } 100% { background: transparent; } }
.lg-row.sale.fresh { animation-name: lgSale; }
@keyframes lgSale { 0% { opacity: 0; transform: translateY(-6px); background: rgba(74, 222, 128, 0.2); } 15% { opacity: 1; transform: none; } 100% { background: transparent; } }
.lg-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: var(--muted); background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line-2); }
.lg-row.lead .lg-ic { color: var(--p3); background: rgba(139, 92, 246, 0.1); border-color: var(--accent-line); }
.lg-row.pix .lg-ic { color: var(--amber); background: rgba(251, 191, 36, 0.08); border-color: rgba(251, 191, 36, 0.3); }
.lg-row.sale .lg-ic { color: var(--green); background: rgba(74, 222, 128, 0.08); border-color: rgba(74, 222, 128, 0.3); }
.lg-row.fail .lg-ic { color: var(--red); background: rgba(248, 113, 113, 0.08); border-color: rgba(248, 113, 113, 0.3); }
.lg-m { min-width: 0; display: grid; gap: 2px; }
.lg-m > b { font-size: 13.5px; font-weight: 600; }
.lg-row.sale .lg-m > b { color: var(--green); }
.lg-row.pix .lg-m > b { color: #fde68a; }
.lg-who { font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-who .dim { font-size: 12px; }
.lg-d { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-d svg { width: 12px; height: 12px; }
.lg-v { text-align: right; font-family: var(--display); font-size: 14.5px; font-weight: 600; white-space: nowrap; }
.lg-row.sale .lg-v { color: var(--green); }
.lg-t { display: grid; text-align: right; gap: 1px; }
.lg-t b { font-family: var(--mono); font-size: 12.5px; font-weight: 600; }
.lg-t span { font-family: var(--mono); font-size: 11px; color: var(--dim); }
.lg-empty { display: flex; align-items: center; gap: 12px; padding: 26px 12px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.lg-empty[hidden] { display: none; }
.lg-empty svg { color: var(--p3); width: 20px; height: 20px; }
@media (max-width: 860px) {
  .lg-head { display: none; }
  .lg-row { grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; }
  .lg-v { grid-column: 2; grid-row: 2; text-align: left; font-size: 13px; }
  .lg-t { grid-column: 3; grid-row: 1 / span 2; }
  .lg-ic { width: 34px; height: 34px; }
}
.dash-bots { display: grid; gap: 4px; margin: 0 -8px; }
.db { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 10px; text-decoration: none; }
.db:hover { background: rgba(139, 92, 246, 0.06); }
.db .bphoto { width: 34px; height: 34px; }
.db .bphoto .ini { font-size: 12px; }
.db > div { flex: 1; min-width: 0; }
.db b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db > div > span { font-size: 11.5px; color: var(--dim); }
.tx.mini { grid-template-columns: 30px minmax(0, 1fr) auto; }
#txl .tx { grid-template-columns: 30px minmax(0, 1fr) auto auto auto 28px; }
.tx.mini .tx-v { min-width: 0; }

/* ---------- Responsivo ---------- */
@media (max-width: 1280px) {
  .greet { display: none; }
  .gw-card { grid-template-columns: auto minmax(0, 1fr) auto; }
  .gw-stats { grid-column: 2 / -1; justify-content: flex-start; }
  .gw-stats > div { text-align: left; }
}
@media (max-width: 1100px) {
  .grid.split-main, .grid.rank-top, .editor { grid-template-columns: minmax(0, 1fr); }
  .ed-side { position: static; }
  .strip { grid-template-columns: 1fr 1fr; }
  .strip > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .msg-ed { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .shell, body.rail-open .shell { grid-template-columns: minmax(0, 1fr); }
  .rail { position: fixed; left: 0; top: 0; bottom: 0; width: var(--rail-open); transform: translateX(-100%); transition: transform 0.22s ease; }
  body.rail-mobile .rail { transform: none; box-shadow: 30px 0 80px rgba(0, 0, 0, 0.6); }
  body.rail-mobile .imp-bar { z-index: 0; }
  body .rail .lbl { display: block !important; }
  body .rail nav a, body .rail-btn { justify-content: flex-start !important; padding: 0 13px !important; }
  body .rail-brand { justify-content: flex-start !important; padding: 2px 7px 14px !important; }
  body .rail [data-tip]:hover::after { display: none; }
  #rail-toggle { display: none; }
  body.rail-mobile .rail-shade { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(2, 1, 5, 0.6); backdrop-filter: blur(3px); }
  .only-m { display: inline-flex; }
  .hide-s { display: none; }
  .topbar { padding: 0 14px; gap: 10px; height: 62px; }
  .rev { padding: 6px 10px 6px 6px; gap: 8px; }
  .rev-ic { width: 28px; height: 28px; }
  .rev-goal { display: none; }
  .main { padding: 18px 14px 60px; }
  .phead h1 { font-size: 22px; }
  .period { margin-left: 0; width: 100%; }
  .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .search { min-width: 0; width: 100%; }
  .tx, #txl .tx { grid-template-columns: 30px minmax(0, 1fr) auto 28px; }
  .tx.mini { grid-template-columns: 30px minmax(0, 1fr) auto; }
  .tx-d, .tx .tag { display: none; }
  .fgrid { grid-template-columns: 1fr; }
  .fgrid > .field.half { grid-column: 1 / -1; }
  .bot-grid, .flow-grid, .px-grid, .rm-grid { grid-template-columns: 1fr; }
  .gw-card { grid-template-columns: 1fr; }
  .gw-ord { flex-direction: row; }
  .gw-stats, .gw-act { grid-column: auto; }
  .pz-h { display: none; }
  .pz { grid-template-columns: 1fr 1fr; }
  .podium { gap: 6px; }
  .av.xl { width: 52px; height: 52px; }
  .pod-n { top: 34px; left: calc(50% + 12px); }
  .feed-dd { position: fixed; top: 64px; right: 12px; left: 12px; width: auto; }
}
