/* =====================================================================
   SkaleBoot — tema "dark premium neon"
   ===================================================================== */
:root {
  /* paleta azul-marinho e preto: cada superfície um tom acima da anterior */
  --bg:#050B14;        /* fundo principal */
  --inner:#050B14;     /* fundo da área de conteúdo */
  --bg2:#081321;       /* fundo secundário (lateral, topo) */
  --panel:#0D1B2E;     /* cards e painéis */
  --panel2:#10223A;    /* superfícies internas */
  --surface:#10223A;
  --hover:#142A45;     /* passar o mouse */
  --field:#081524;     /* campos de texto e busca */
  --line:#1A304A;      /* bordas */
  --line2:#152A42;     /* bordas internas */
  --div:#14263D;       /* divisórias */
  --text:#E2EAF4; --text2:#C3CFDE; --muted:#91A2B8; --faint:#71839A;
  --accent:#087BFA; --accent2:#13C8E8; --accent-soft:rgba(8,123,250,.14);
  --danger:#ff5a72; --warn:#f5b13d; --ok:#2fd39a; --blue:#3ea0ff; --violet:#8b7dff;
  --radius:14px; --r-sm:8px; --r-md:10px;
  --shadow:0 1px 2px rgba(0,0,0,.35), 0 8px 24px rgba(0,0,0,.22);
  --glow:none; --top:60px;
}
* { box-sizing:border-box; }
html, body { background:var(--bg); }
body { margin:0; font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; color:var(--text); font-size:14px; -webkit-font-smoothing:antialiased; }
a { color:var(--accent2); }
::selection { background:rgba(8,120,249,.45); }
::-webkit-scrollbar { width:10px; height:10px; } ::-webkit-scrollbar-thumb { background:var(--line2); border-radius:10px; border:2px solid #000; }
::-webkit-scrollbar-track { background:transparent; }

/* ---------- ícones ---------- */
svg.ico { width:20px; height:20px; stroke:currentColor; fill:none; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; flex:none; }

/* ---------- logotipo ---------- */
.logo { display:flex; align-items:center; gap:9px; font-weight:800; font-size:25px; letter-spacing:-.2px; color:var(--text); }
.logo img { width:46px; height:46px; filter:drop-shadow(0 0 8px rgba(0,200,255,.35)); }
.logo span { color:var(--accent); }
.logo.big { font-size:30px; justify-content:center; } .logo.big img { width:56px; height:56px; }

/* ---------- elementos base ---------- */
.card { background:var(--panel); border:1px solid var(--line); border-radius:var(--radius); padding:20px; margin-bottom:16px; box-shadow:var(--glow); position:relative; }
h2 { margin:0 0 12px; font-size:17px; font-weight:700; }
label { display:block; color:var(--muted); margin:12px 0 5px; font-size:13px; }
input, select, textarea { width:100%; background:var(--field); color:var(--text); border:1px solid var(--line2); border-radius:10px; padding:10px 12px; font:inherit; outline:none; transition:border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color:var(--accent); box-shadow:0 0 0 3px rgba(8,120,249,.18); }
input::placeholder, textarea::placeholder { color:var(--faint); }
select option { background:var(--panel); }
textarea.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size:12px; min-height:360px; }
input[type=checkbox], input[type=radio] { width:auto; accent-color:var(--accent); }
.btn { background:linear-gradient(180deg, #1a8bff, var(--accent)); color:#fff; border:0; border-radius:10px; padding:10px 16px; font-weight:600; cursor:pointer;
  font-size:14px; text-decoration:none; display:inline-block; box-shadow:0 0 18px rgba(8,120,249,.35); transition:filter .15s, transform .05s; }
.btn:hover { filter:brightness(1.12); } .btn:active { transform:translateY(1px); }
.btn.ghost { background:var(--panel); color:var(--text); border:1px solid var(--line); font-weight:500; box-shadow:none; }
.btn.ghost:hover { border-color:var(--accent); }
.btn.danger { background:transparent; color:var(--danger); border:1px solid rgba(255,77,106,.55); box-shadow:none; }
.btn.small { padding:6px 11px; font-size:12.5px; }
.btn.wide { width:100%; margin-top:18px; padding:12px; }
.row { display:flex; gap:10px; align-items:center; flex-wrap:wrap; } .row.between { justify-content:space-between; }
.grid2 { display:grid; grid-template-columns:1fr 1fr; gap:0 18px; }
.grid3f { display:grid; grid-template-columns:repeat(3,1fr); gap:0 16px; }
table { width:100%; border-collapse:collapse; }
th, td { text-align:left; padding:11px 8px; border-bottom:1px solid var(--line2); vertical-align:top; }
th { color:var(--muted); font-weight:500; font-size:12px; text-transform:uppercase; letter-spacing:.04em; }
.pill { display:inline-block; padding:2px 9px; border-radius:999px; font-size:12px; background:var(--hover); color:var(--muted); margin:1px 3px 1px 0; border:1px solid var(--line2); }
.st-active { background:rgba(8,120,249,.15); color:#5fb0ff; border-color:rgba(8,120,249,.35); }
.st-completed { background:rgba(0,200,255,.12); color:var(--accent2); border-color:rgba(0,200,255,.3); }
.st-expired, .st-pending { background:rgba(255,176,32,.12); color:var(--warn); border-color:rgba(255,176,32,.3); }
.st-legacy, .st-idle, .st-new { color:var(--muted); }
.st-approved { background:rgba(22,224,160,.12); color:var(--ok); border-color:rgba(22,224,160,.3); }
.st-refunded, .st-canceled { background:rgba(255,77,106,.12); color:var(--danger); border-color:rgba(255,77,106,.3); }
.muted { color:var(--muted); } .small { font-size:12px; } .hidden { display:none !important; }
.err { color:var(--danger); min-height:18px; }
.qr { background:#fff; padding:12px; border-radius:14px; width:max-content; box-shadow:0 0 30px rgba(0,200,255,.25); }
.dot { width:10px; height:10px; border-radius:50%; display:inline-block; background:var(--danger); margin-right:6px; }
.dot.on { background:var(--accent2); box-shadow:0 0 10px var(--accent2); } .dot.wait { background:var(--warn); }
#toast { position:fixed; bottom:22px; right:22px; background:var(--panel); border:1px solid var(--accent); padding:12px 18px; border-radius:12px; display:none; z-index:50; box-shadow:0 0 24px rgba(8,120,249,.35); }
.check { display:flex; align-items:center; gap:8px; margin-top:12px; color:var(--text); } .check input { width:auto; }
code { background:var(--hover); padding:1px 6px; border-radius:6px; font-size:12px; color:var(--accent2); }
.money { font-variant-numeric:tabular-nums; }

/* ---------- tela de acesso ---------- */
#auth { min-height:100vh; display:grid; place-items:center; position:relative; overflow:hidden; background:var(--bg); }
#auth::before { content:""; position:absolute; inset:-30% -10% auto auto; width:900px; height:600px; pointer-events:none;
  background:radial-gradient(closest-side, rgba(8,120,249,.35), transparent 70%); filter:blur(30px); }
.authbox { width:min(420px, 92vw); background:var(--panel); border:1px solid var(--line); border-radius:18px; padding:32px; position:relative; box-shadow:0 0 50px rgba(8,120,249,.12); }
.authbox h2 { margin-top:20px; }

/* ---------- layout ---------- */
#app { display:flex; min-height:100vh; background:var(--inner); }
main { flex:1; min-width:0; padding:28px 32px 48px; max-width:1500px; position:relative; z-index:1; }
/* ---------- barra lateral ---------- */
#side { width:270px; flex:none; background:#000; border-right:1px solid var(--line); display:flex; flex-direction:column; position:sticky; top:0; height:100vh; z-index:2; overflow:hidden; transition:width .15s; }
.sbtop { display:flex; align-items:center; justify-content:space-between; padding:18px 18px 12px; }
.collapse { background:none; border:0; color:var(--muted); cursor:pointer; padding:4px; border-radius:8px; }
.collapse:hover { color:var(--text); background:#08111f; }
.company { margin:6px 16px 10px; padding:11px 14px; border:1px solid var(--line); border-radius:12px; background:var(--field); display:flex; align-items:center; justify-content:space-between; cursor:pointer; }
.company .cn { font-weight:700; font-size:14.5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } .company .cl { color:var(--muted); font-size:12.5px; margin-top:2px; }
.sbsearch { padding:0 16px 8px; position:relative; }
.sbsearch input { padding:9px 12px 9px 36px; font-size:13.5px; background:var(--field); border-color:var(--line2); font-style:italic; }
.sbsearch svg { position:absolute; left:28px; top:10px; width:17px; height:17px; color:var(--muted); }
#side nav { flex:1; overflow:auto; padding:2px 14px; position:relative; z-index:1; }
#side nav .grp { color:var(--muted); font-size:12px; font-weight:600; text-transform:uppercase; letter-spacing:.07em; margin:16px 10px 6px; }
#side nav button { display:flex; align-items:center; gap:12px; width:100%; background:none; border:0; color:var(--text2); padding:9px 12px; cursor:pointer;
  font-size:15px; border-radius:10px; text-align:left; position:relative; margin:1px 0; }
#side nav button i { font-style:normal; display:grid; place-items:center; color:var(--text2); }
#side nav button:hover { background:var(--hover); color:#fff; }
#side nav button.on { background:linear-gradient(90deg, #0a6cf0, var(--accent)); color:#fff; font-weight:600; box-shadow:0 0 22px rgba(8,120,249,.45); }
#side nav button.on i { color:#fff; }
.badge { margin-left:auto; background:var(--accent2); color:#00121f; font-size:11px; border-radius:99px; padding:1px 7px; font-style:normal; font-weight:700; }
.sdot { margin-left:auto; width:10px; height:10px; border-radius:50%; background:var(--danger); }
.sdot.on { background:var(--accent); box-shadow:0 0 10px var(--accent); }
.sbbottom { border-top:0; padding:24px 16px 16px; display:flex; flex-direction:column; gap:12px; position:relative; z-index:1; background:transparent; }
.me { display:flex; gap:12px; align-items:center; min-width:0; } .me .mi { min-width:0; }
.me .mi div { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } .me .mi div:first-child { font-weight:700; font-size:14.5px; }
.av { width:40px; height:40px; border-radius:50%; background:linear-gradient(180deg, #1a8bff, #0646b8); color:#fff; display:grid; place-items:center; font-weight:700; flex:none; box-shadow:0 0 14px rgba(8,120,249,.5); }
.sbbottom .row .btn { flex:1; text-align:center; display:flex; align-items:center; justify-content:center; gap:5px; }
body.mini #side { width:76px; } body.mini #side .logo span, body.mini #side .logo b, body.mini #side .company, body.mini #side .sbsearch, body.mini #side nav span, body.mini #side nav .grp,
body.mini #side .badge, body.mini #side .mi, body.mini #side .sbbottom .row { display:none; }
body.mini .sbtop { flex-direction:column; gap:8px; } body.mini #side nav button { justify-content:center; } body.mini .logo img { width:38px; height:38px; }

/* ---------- cabeçalho de página ---------- */
.phead { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; margin-bottom:18px; }
.phead h1 { margin:0; font-size:30px; font-weight:800; letter-spacing:-.3px; } .phead p { margin:6px 0 0; font-size:17px; color:var(--text2); }
.phead p.muted { color:var(--muted); font-size:15px; }
.alert { display:flex; justify-content:space-between; align-items:center; gap:10px; border:1px solid rgba(255,176,32,.45); background:rgba(255,176,32,.08); padding:11px 15px; border-radius:12px; margin-bottom:16px; }
.toolbar { display:flex; gap:10px; align-items:center; margin-bottom:20px; }
.seg { display:inline-flex; background:var(--field); border:1px solid var(--line); border-radius:12px; padding:4px; }
.seg button { background:none; border:0; color:var(--text2); padding:8px 18px; border-radius:9px; cursor:pointer; font-size:15px; }
.seg button.on { background:linear-gradient(180deg, #1a8bff, var(--accent)); color:#fff; font-weight:600; box-shadow:0 0 16px rgba(8,120,249,.5); }
.iconbtn { width:44px; height:44px; display:grid; place-items:center; background:var(--field); border:1px solid var(--line); border-radius:12px; color:var(--text); cursor:pointer; }
.iconbtn:hover { border-color:var(--accent); }

/* ---------- cartões de indicadores ---------- */
.kpis { display:grid; grid-template-columns:repeat(4, 1fr); gap:18px; margin-bottom:20px; }
.kpi { background:var(--panel); border:1px solid var(--line); border-radius:16px; padding:16px 22px 18px; box-shadow:var(--glow); }
.kpi .top { display:flex; justify-content:space-between; align-items:flex-start; }
.kpi .ic { width:46px; height:46px; border-radius:11px; display:grid; place-items:center; color:var(--kc, var(--accent2));
  background:color-mix(in srgb, var(--kc, var(--accent)) 26%, #020a18); box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--kc, var(--accent)) 30%, transparent); }
.kpi .ic svg { width:24px; height:24px; }
.kpi .var { font-size:13px; font-weight:700; color:var(--accent2); background:rgba(0,200,255,.08); border:1px solid rgba(0,200,255,.28); border-radius:99px; padding:3px 10px; }
.kpi .var.down { color:var(--danger); background:rgba(255,77,106,.08); border-color:rgba(255,77,106,.3); }
.kpi .v { font-size:32px; font-weight:800; margin-top:12px; color:var(--vc, var(--text)); letter-spacing:-.4px; }
.kpi .l { color:var(--text2); font-size:15px; margin-top:4px; }

/* ---------- gráficos ---------- */
.grid21 { display:grid; grid-template-columns:1.42fr 1fr; gap:18px; } .grid3 { display:grid; grid-template-columns:1fr 1.05fr 1.1fr; gap:18px; }
.ch2 { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; margin-bottom:8px; }
.ch2 .tt { display:flex; gap:12px; align-items:flex-start; } .ch2 .tt > svg { width:28px; height:28px; color:var(--accent2); margin-top:2px; }
.ch2 h2 { margin:0; font-size:18px; } .ch2 p { margin:3px 0 0; color:var(--text2); font-size:13.5px; }
.cardh { display:flex; align-items:center; gap:12px; margin-bottom:14px; } .cardh svg { width:28px; height:28px; color:var(--accent2); } .cardh h2 { margin:0; font-size:19px; }
.chartwrap { display:grid; grid-template-columns:auto 1fr; gap:10px; }
.yaxis { display:flex; flex-direction:column; justify-content:space-between; color:var(--text2); font-size:12.5px; text-align:right; height:170px; padding-top:4px; }
.chart { display:flex; align-items:flex-end; gap:5px; height:170px; padding-top:10px; position:relative;
  background-image:linear-gradient(to top, rgba(7,54,90,.55) 1px, transparent 1px); background-size:100% 20%; }
.chart .b { flex:1; background:linear-gradient(180deg, #00e1ff, #00a8ff 40%, var(--accent)); border-radius:3px 3px 0 0; min-height:3px; position:relative;
  box-shadow:0 0 14px rgba(0,200,255,.55); }
.chart .b.z { background:#0fb7e6; box-shadow:0 0 6px rgba(0,200,255,.5); max-width:22px; margin:0 auto; }
.chart .b:hover::after { content:attr(data-t); position:absolute; bottom:100%; left:50%; transform:translateX(-50%); background:var(--panel);
  border:1px solid var(--accent); padding:4px 8px; border-radius:7px; white-space:nowrap; font-size:12px; margin-bottom:6px; z-index:2; }
.chartx { display:flex; justify-content:space-between; color:var(--text2); font-size:14px; margin-top:10px; padding-left:34px; }
.frow { display:flex; justify-content:space-between; align-items:center; padding:9px 4px; border-bottom:1px solid var(--line2); font-size:15px; }
.frow:last-child { border:0; } .frow b { font-size:17px; }
.fbar { height:7px; background:transparent; border-radius:9px; margin-top:5px; overflow:hidden; }
.fbar i { display:block; height:100%; background:linear-gradient(90deg, var(--accent), var(--accent2)); border-radius:9px; box-shadow:0 0 10px rgba(0,200,255,.6); }
.shortcuts { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.shortcuts button { display:flex; align-items:center; gap:12px; background:var(--field); border:1px solid var(--line); color:var(--text); border-radius:12px; padding:14px; cursor:pointer; font-size:15px; text-align:left; }
.shortcuts button svg { color:var(--accent2); width:24px; height:24px; }
.shortcuts button:hover { border-color:var(--accent); box-shadow:0 0 16px rgba(8,120,249,.25); }

/* ---------- configurações / integrações ---------- */
.cfgwrap { display:grid; grid-template-columns:240px 1fr; gap:18px; align-items:start; }
.subnav { position:sticky; top:16px; background:var(--panel); border:1px solid var(--line); border-radius:14px; padding:8px; }
.subnav .grp { color:var(--muted); font-size:11px; text-transform:uppercase; letter-spacing:.07em; margin:10px 8px 4px; font-weight:600; }
.subnav button { display:block; width:100%; text-align:left; background:none; border:0; color:var(--text2); padding:9px 11px; border-radius:9px; cursor:pointer; font-size:13.5px; }
.subnav button:hover { color:#fff; background:var(--hover); }
.subnav button.on { color:#fff; background:linear-gradient(90deg, #0a6cf0, var(--accent)); font-weight:600; box-shadow:0 0 16px rgba(8,120,249,.4); }
.cfgp, .intp { display:none; } .cfgp.on, .intp.on { display:block; }
.warnbox { border:1px solid rgba(255,176,32,.4); background:rgba(255,176,32,.07); padding:10px 12px; border-radius:10px; font-size:13px; }
.aiout { margin-top:12px; background:var(--field); border:1px solid var(--line); border-radius:12px; padding:12px; white-space:pre-wrap; }
.qrow { display:grid; grid-template-columns:160px 1fr auto; gap:8px; margin-bottom:8px; align-items:start; }

/* ---------- chats (inbox) ---------- */
.inbox { display:grid; grid-template-columns:320px 1fr 290px; height:100vh; overflow:hidden; background:var(--panel); }
section.full { margin:-28px -32px -48px; }
.ibList { border-right:1px solid var(--line); display:flex; flex-direction:column; min-height:0; background:var(--field); }
.ibHead { padding:12px; border-bottom:1px solid var(--line2); }
.chips { display:flex; gap:5px; margin-top:9px; flex-wrap:wrap; }
.chips button { background:transparent; border:1px solid var(--line2); color:var(--muted); border-radius:99px; padding:4px 11px; cursor:pointer; font-size:12px; }
.chips button.on { color:#fff; border-color:var(--accent); background:var(--accent-soft); }
.ibConvs { overflow:auto; flex:1; }
.conv { padding:12px 14px; border-bottom:1px solid var(--line2); cursor:pointer; }
.conv:hover { background:var(--hover); } .conv.on { background:linear-gradient(90deg, rgba(8,120,249,.22), rgba(8,120,249,.04)); box-shadow:inset 3px 0 0 var(--accent); }
.conv .t { display:flex; justify-content:space-between; gap:6px; } .conv .t b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.conv .p { color:var(--muted); font-size:12.5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; margin:3px 0 4px; }
.ibChat { display:flex; flex-direction:column; min-height:0; background:var(--field); }
.chatEmpty { margin:auto; }
.chatHead { display:flex; justify-content:space-between; align-items:center; padding:12px 16px; border-bottom:1px solid var(--line); background:var(--panel); }
.chMsgs { flex:1; overflow:auto; padding:16px; display:flex; flex-direction:column; gap:7px;
  background:radial-gradient(1200px 400px at 100% 0, rgba(8,120,249,.06), transparent); }
.msg { max-width:72%; padding:8px 11px; border-radius:12px; white-space:pre-wrap; word-wrap:break-word; font-size:14px; }
.msg.in { background:var(--hover); align-self:flex-start; border-top-left-radius:3px; border:1px solid var(--line2); }
.msg.out { background:linear-gradient(180deg, #0a5fd0, #0749a8); align-self:flex-end; border-top-right-radius:3px; }
.msg.out.human { background:linear-gradient(180deg, #0b3e75, #082c55); border:1px solid #0d4f8f; }
.msg .meta { font-size:10.5px; color:#a9c3e3; margin-top:3px; text-align:right; }
.msg .who { font-size:11px; font-weight:700; color:#bfe3ff; margin-bottom:3px; } .msg .who.bot { color:#9ff0ff; }
.daysep { align-self:center; color:var(--muted); font-size:11px; background:var(--panel); border:1px solid var(--line2); padding:3px 11px; border-radius:99px; margin:6px 0; }
.composer { display:flex; gap:7px; padding:10px 12px; border-top:1px solid var(--line); background:var(--panel); position:relative; align-items:flex-end; }
.composer textarea { resize:none; min-height:42px; max-height:140px; }
.ibtn { background:var(--field); border:1px solid var(--line); color:var(--text); border-radius:10px; width:42px; height:42px; cursor:pointer; font-size:17px; flex:none; display:grid; place-items:center; }
.ibtn:hover { border-color:var(--accent); }
.pop { position:absolute; bottom:60px; left:12px; background:var(--panel); border:1px solid var(--line); border-radius:12px; padding:6px; z-index:10;
  box-shadow:0 10px 40px rgba(0,0,0,.7), 0 0 20px rgba(8,120,249,.15); min-width:210px; max-height:320px; overflow:auto; }
.pop button { display:block; width:100%; text-align:left; background:none; border:0; color:var(--text); padding:9px 10px; border-radius:8px; cursor:pointer; font-size:13.5px; }
.pop button:hover { background:var(--hover); }
.pop.wide { left:230px; width:320px; } .pop.wide button small { display:block; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pop.emoji { left:58px; width:290px; display:flex; flex-wrap:wrap; gap:2px; } .pop.emoji button { width:34px; padding:5px; text-align:center; font-size:19px; }
.recbar { display:flex; align-items:center; gap:10px; padding:9px 14px; background:#1a0710; border-top:1px solid var(--line); }
.recdot { width:10px; height:10px; border-radius:50%; background:var(--danger); animation:blink 1s infinite; }
@keyframes blink { 50% { opacity:.2; } }
.mimg { max-width:260px; max-height:300px; border-radius:9px; display:block; }
.mvid { max-width:300px; border-radius:9px; display:block; }
.maud { display:flex; align-items:center; gap:6px; } .maud audio { height:36px; max-width:260px; }
.spd { background:rgba(0,0,0,.35); border:1px solid rgba(255,255,255,.15); color:#fff; border-radius:6px; padding:3px 7px; cursor:pointer; font-size:11px; font-weight:700; }
.mdoc { display:flex; align-items:center; gap:8px; background:rgba(0,0,0,.25); padding:8px 10px; border-radius:9px; color:var(--text); text-decoration:none; }
.ibSide { border-left:1px solid var(--line); padding:16px; overflow:auto; background:var(--field); }
.ibSide h3 { font-size:12px; color:var(--muted); font-weight:600; margin:16px 0 6px; text-transform:uppercase; letter-spacing:.05em; }
.tag { display:inline-flex; align-items:center; gap:4px; background:var(--accent-soft); border:1px solid rgba(8,120,249,.35); border-radius:99px; padding:2px 4px 2px 10px; font-size:12px; margin:2px; }
.tag button { background:none; border:0; color:var(--muted); cursor:pointer; padding:0 4px; }

/* ---------- kanban ---------- */
.board { display:flex; gap:14px; overflow-x:auto; padding-bottom:12px; align-items:flex-start; }
.col { background:var(--panel); border:1px solid var(--line); border-radius:14px; min-width:270px; width:270px; display:flex; flex-direction:column; max-height:calc(100vh - 160px); }
.col.over { border-color:var(--accent2); box-shadow:0 0 22px rgba(0,200,255,.3); }
.col .ch { padding:12px 14px; font-weight:700; display:flex; justify-content:space-between; border-bottom:1px solid var(--line2); }
.col .cards { padding:9px; overflow:auto; display:flex; flex-direction:column; gap:9px; min-height:60px; }
.kcard { background:var(--field); border:1px solid var(--line2); border-radius:11px; padding:10px 12px; cursor:grab; }
.kcard:hover { border-color:var(--accent); }
.kcard .n { font-weight:600; } .kcard .p { color:var(--muted); font-size:12px; margin-top:2px; }

/* ---------- permissões ---------- */
body.agent .mgr { display:none !important; }

/* ---------- responsivo ---------- */
@media (max-width: 1200px) { .grid21, .grid3 { grid-template-columns:1fr; } .kpis { grid-template-columns:repeat(2,1fr); } }
@media (max-width: 900px) {
  body:not(.mini) #side { width:76px; } #side .logo span, #side .logo b, #side .company, #side .sbsearch, #side nav span, #side nav .grp, #side .mi, #side .sbbottom .row { display:none; }
  #side nav button { justify-content:center; } main { padding:18px; } section.full { margin:-18px; }
  .cfgwrap, .grid2, .grid3f, .kpis { grid-template-columns:1fr; } .subnav { position:static; }
  .inbox { grid-template-columns:1fr; height:auto; } .ibSide { display:none; }
  .phead h1 { font-size:24px; }
}
.btn svg.ico { width:15px; height:15px; }
.company svg.ico { width:20px; height:20px; color:var(--text2); }
.collapse svg.ico { width:20px; height:20px; }

/* linha curva de luz entre o menu e o perfil */
.sbbottom::before { content:""; position:absolute; left:0; right:-1px; top:-8px; height:24px; pointer-events:none;
  background:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 270 24' preserveAspectRatio='none'><path d='M0 22 C 80 21, 170 14, 270 3' stroke='%2366c6ff' stroke-width='2.4' fill='none' stroke-linecap='round'/></svg>") no-repeat;
  background-size:100% 100%; filter:drop-shadow(0 0 4px var(--accent)) drop-shadow(0 0 10px rgba(8,120,249,.9)); }

.codebox { background:var(--field); border:1px solid var(--line); border-radius:10px; padding:12px 14px; font:12.5px/1.55 ui-monospace,Consolas,monospace; color:#9fd8ff; white-space:pre-wrap; word-break:break-word; overflow:auto; max-width:100%; }
.cfgbody { min-width:0; }

.sendsplit { display:flex; }
.sendsplit #btnSend { border-top-right-radius:0; border-bottom-right-radius:0; }
.sendsplit .sarrow { border-top-left-radius:0; border-bottom-left-radius:0; padding:0 10px; margin-left:1px; font-size:12px; }
.pop.sched { left:auto; right:12px; min-width:240px; }
.schedbar { display:flex; align-items:center; justify-content:space-between; gap:8px; margin:0 12px 6px; padding:7px 10px; border:1px solid var(--accent); background:rgba(8,120,249,.12); border-radius:10px; font-size:12.5px; }
.schedbar.hidden, .chSched.hidden { display:none; }
.chSched { border-top:1px solid var(--line); padding:8px 12px; max-height:180px; overflow:auto; background:rgba(5,11,20,.6); }
.schedhd { font-size:12px; color:var(--accent2); margin-bottom:6px; font-weight:600; }
.schedit { display:flex; align-items:center; gap:8px; padding:6px 8px; border:1px dashed var(--line); border-radius:10px; margin-bottom:6px; }
.schedit.fail { border-color:#ff4d6a; }
.schedit .ic { font-size:16px; }
.schedit .tx { flex:1; min-width:0; }
.schedit .pv { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:13px; }

/* ===== Kanban (quadros, colunas, cartões) ===== */
.kbwrap { background:var(--panel); border:1px solid var(--line); border-radius:16px; display:flex; flex-direction:column; height:calc(100vh - 150px); min-height:420px; overflow:hidden; }
.kbbar { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 14px; border-bottom:1px solid var(--line2); }
.kbboardbtn { background:var(--surface); border:1px solid var(--line); color:var(--text); border-radius:10px; padding:7px 12px; font-weight:700; cursor:pointer; font-size:14px; }
.kbboardbtn:hover { border-color:var(--accent); }
.kbtools { display:flex; align-items:center; gap:6px; }
.kbsearch { display:flex; align-items:center; gap:6px; background:var(--field); border:1px solid var(--line); border-radius:10px; padding:0 10px; font-size:13px; }
.kbsearch input { border:0; background:transparent; padding:7px 0; width:170px; outline:none; }
.kbmem { width:34px; height:34px; border-radius:50%; border:1px solid var(--line); background:var(--surface); color:var(--text); cursor:pointer; display:flex; align-items:center; justify-content:center; padding:0; }
.kbmem.on, .kbtools .ibtn.on { border-color:var(--accent2); box-shadow:0 0 0 2px rgba(0,200,255,.18); }
.kbmain { flex:1; display:flex; min-height:0; }
.kbboard { flex:1; display:flex; gap:12px; overflow:auto; padding:14px; align-items:flex-start; }
.kbcol { flex:0 0 272px; width:272px; display:flex; flex-direction:column; max-height:100%; border-radius:14px; background:var(--panel); border:1px solid var(--line2); transition:border-color .15s, box-shadow .15s; }
.kbcol.over { border-color:var(--accent); box-shadow:0 0 0 2px rgba(8,120,249,.25); }
.kbch { display:flex; align-items:center; gap:7px; padding:11px 10px 9px 14px; font-weight:700; font-size:14px; }
.kbcn { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; cursor:text; }
.kbcount { color:var(--muted); font-weight:600; font-size:12.5px; }
.kbsort { color:var(--accent2); font-size:12px; }
.kbdots { margin-left:auto; background:none; border:0; color:var(--muted); cursor:pointer; font-size:17px; padding:2px 6px; border-radius:8px; line-height:1; }
.kbdots:hover { background:var(--surface); color:var(--text); }
.kbdots.sm { font-size:15px; padding:0 4px; }
.kbcards { padding:2px 9px 4px; overflow-y:auto; display:flex; flex-direction:column; gap:8px; min-height:14px; }
.kbcard { background:var(--panel); border:1px solid var(--line2); border-radius:11px; padding:9px 10px 8px; cursor:grab; transition:border-color .12s, transform .12s; }
.kbcard:hover { border-color:var(--accent); }
.kbcard.dragging { opacity:.4; transform:rotate(1.5deg); }
.kbtop { display:flex; align-items:center; gap:7px; }
.kbname { font-weight:600; font-size:13.5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; cursor:pointer; }
.kbname:hover { color:var(--accent2); text-decoration:underline; }
.kbdesc { font-size:12.5px; color:var(--text2); margin:5px 0 0; white-space:pre-wrap; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.kbtags { display:flex; flex-wrap:wrap; gap:4px; margin-top:6px; }
.kbtags .pill { font-size:10.5px; padding:1px 7px; }
.kbfoot { display:flex; align-items:center; gap:6px; margin-top:7px; }
.kbmemb { cursor:pointer; display:inline-flex; }
.kbst { font-size:10.5px; color:#16e0a0; }
.kbav { width:22px; height:22px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; font-size:10px; font-weight:700; color:#fff; flex:0 0 auto; }
.kbav.empty { background:var(--surface); border:1px dashed var(--line); font-size:11px; }
.kbph { height:42px; border:2px dashed var(--accent); border-radius:11px; background:rgba(8,120,249,.08); }
.kbadd { background:none; border:0; color:var(--muted); padding:8px 14px 11px; text-align:left; cursor:pointer; font-size:13px; border-radius:0 0 14px 14px; }
.kbadd:hover { color:var(--accent2); background:rgba(8,120,249,.06); }
.kbnewcol { flex:0 0 auto; }
.kbplus { width:38px; height:38px; border-radius:10px; border:1px dashed var(--line); background:transparent; color:var(--muted); font-size:20px; cursor:pointer; }
.kbplus:hover { border-color:var(--accent); color:var(--accent2); }
.kbcol.newc { padding:8px; }
.kbedit { display:flex; gap:4px; align-items:center; flex:1; min-width:0; }
.kbedit input { padding:5px 8px; font-size:13.5px; flex:1; min-width:0; }
.kbedit button { background:var(--surface); border:1px solid var(--line); color:var(--text); border-radius:7px; width:26px; height:26px; cursor:pointer; flex:0 0 auto; }
.kbmenu { position:fixed; z-index:60; min-width:220px; background:var(--panel); border:1px solid var(--line); border-radius:12px; padding:6px; box-shadow:0 14px 36px rgba(0,0,0,.55); max-height:60vh; overflow:auto; }
.kbmenu.hidden { display:none; }
.kbmenu button { display:flex; align-items:center; gap:8px; width:100%; text-align:left; background:none; border:0; color:var(--text); padding:8px 10px; border-radius:8px; cursor:pointer; font-size:13.5px; }
.kbmenu button:hover:not(:disabled) { background:var(--hover); }
.kbmenu button:disabled { opacity:.5; cursor:default; }
.kbmenu button.danger { color:#ff6b81; }
.kbmenu .ok { margin-left:auto; color:var(--accent2); }
.kbmenu .kbsep { height:1px; background:var(--line2); margin:5px 2px; }
.kbmenu .kbprimary { background:var(--accent); color:#fff; justify-content:center; font-weight:600; }
.kbmenu .kbprimary:hover { background:#1a86ff; }
.kbside { flex:0 0 300px; border-left:1px solid var(--line2); padding:12px 14px; display:flex; flex-direction:column; overflow:auto; background:var(--panel); }
.kbside.hidden { display:none; }
.kbsh { display:flex; align-items:center; justify-content:space-between; margin-bottom:6px; }
.kbrule { display:grid; grid-template-columns:1fr 1fr 1fr auto; gap:5px; margin-bottom:6px; align-items:center; }
.kbrule select, .kbrule input { padding:6px; font-size:12.5px; min-width:0; }
.modal { position:fixed; inset:0; background:rgba(0,0,0,.6); z-index:70; display:flex; align-items:center; justify-content:center; padding:16px; }
.modal.hidden { display:none; }
.modalbox { background:var(--panel); border:1px solid var(--line); border-radius:16px; padding:18px 20px; width:100%; max-width:480px; max-height:92vh; overflow:auto; box-shadow:0 20px 60px rgba(0,0,0,.6); }
.mhead { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; margin-bottom:6px; }
.mhead h2 { margin:0 0 2px; font-size:18px; }
.kbpick { border:1px solid var(--line); border-radius:10px; padding:6px; display:flex; flex-direction:column; gap:6px; }
.kbpick > input { border:0; background:var(--field); }
.kbpicklist { max-height:220px; overflow:auto; display:flex; flex-direction:column; }
.kbpicklist button { display:flex; align-items:center; gap:8px; background:none; border:0; color:var(--text); padding:7px 8px; border-radius:8px; cursor:pointer; text-align:left; font-size:13px; }
.kbpicklist button:hover { background:var(--hover); }
.kbpicklist .kbprimary { background:var(--accent); color:#fff; justify-content:center; font-weight:600; margin-top:4px; }
.kbpicked { display:flex; align-items:center; gap:9px; padding:4px; }
.kbpicked .kbav { width:30px; height:30px; font-size:12px; }
@media (max-width: 760px) { .kbsearch input { width:90px; } .kbside { position:absolute; right:0; top:0; bottom:0; z-index:5; } .kbmain { position:relative; } }

/* ===== Etiquetas ===== */
.tagtable td, .tagtable th { vertical-align:middle; }
.tagtable th.sortable { cursor:pointer; user-select:none; }
.tagtable th.sortable:hover { color:var(--text); }
.tagname { font-weight:600; }
.tagedit { background:none; border:0; cursor:pointer; opacity:0; padding:2px 4px; font-size:12px; border-radius:6px; transition:opacity .12s; }
.tagedit:hover { background:var(--surface); }
.tagrow:hover .tagedit { opacity:.8; }
.tagedit.del:hover { background:rgba(255,77,106,.15); }
.tagcolors { display:flex; flex-wrap:wrap; gap:7px; }
.tagcolors button { border:1px solid; border-radius:8px; padding:5px 11px; font-size:12.5px; font-weight:600; cursor:pointer; transition:transform .1s, box-shadow .1s; }
.tagcolors button.on { box-shadow:0 0 0 2px currentColor; transform:scale(1.05); }
.err { color:#ff4d6a; font-size:12px; margin-top:4px; }
.err.hidden { display:none; }
input.invalid { border-color:#ff4d6a !important; }
.tag { display:inline-flex; align-items:center; gap:3px; border:1px solid; border-radius:999px; padding:2px 9px; font-size:12px; font-weight:600; margin:0 4px 4px 0; }
.tag button { background:none; border:0; color:inherit; cursor:pointer; padding:0 0 0 2px; font-size:13px; opacity:.7; }
.tag button:hover { opacity:1; }
.kbtags .tag { font-size:10.5px; padding:1px 7px; margin:0; }

/* ===== Fluxos (lista no estilo do modelo) ===== */
.flwrap { display:flex; gap:14px; align-items:flex-start; }
.flside { flex:0 0 220px; background:var(--panel); border:1px solid var(--line); border-radius:14px; padding:8px; position:sticky; top:12px; }
.flnav, .flfolder { display:flex; align-items:center; gap:8px; width:100%; background:none; border:0; color:var(--text); padding:8px 9px; border-radius:9px; cursor:pointer; font-size:13.5px; text-align:left; }
.flnav:hover, .flfolder:hover { background:var(--hover); }
.flnav.on, .flfolder.on { background:rgba(8,120,249,.16); color:#fff; }
.flnav.over, .flfolder.over { outline:2px dashed var(--accent); background:rgba(8,120,249,.12); }
.flnav .t, .flfolder .t { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.flnav .c, .flfolder .c { color:var(--muted); font-size:12px; }
.flfolder .kbdots { margin-left:0; opacity:0; }
.flfolder:hover .kbdots { opacity:1; }
.flsep { height:1px; background:var(--line2); margin:6px 2px; }
.flfh { display:flex; align-items:center; justify-content:space-between; padding:4px 9px; color:var(--muted); font-size:11.5px; text-transform:uppercase; letter-spacing:.06em; }
.ibtn.sm { width:24px; height:24px; font-size:13px; }
.flempty { text-align:center; padding:16px 8px 10px; display:flex; flex-direction:column; align-items:center; gap:5px; font-size:13px; }
.flempty .ic { width:38px; height:38px; border-radius:10px; background:var(--surface); display:flex; align-items:center; justify-content:center; font-size:19px; margin-bottom:4px; }
.flempty .btn { margin-top:6px; }
.flmain { flex:1; min-width:0; }
.flbar { display:flex; align-items:center; gap:8px; margin-bottom:10px; flex-wrap:wrap; }
.flfilter { background:transparent; border:1px solid transparent; color:var(--text); border-radius:9px; padding:6px 10px; cursor:pointer; font-size:13px; font-weight:600; }
.flfilter:hover, .flfilter.on { border-color:var(--line); background:var(--surface); }
.flfilter.on { color:var(--accent2); }
.flbulk { display:flex; align-items:center; gap:6px; padding:3px 8px; border:1px solid var(--accent); border-radius:10px; background:rgba(8,120,249,.1); font-size:12.5px; }
.flbulk.hidden { display:none; }
.fltable { background:var(--panel); border:1px solid var(--line); border-radius:14px; overflow:auto; }
.fltable table { width:100%; }
.fltable th { font-size:12px; font-weight:600; text-transform:none; letter-spacing:0; color:var(--muted); white-space:nowrap; }
.fltable th.sortable { cursor:pointer; user-select:none; }
.fltable th.sortable:hover { color:var(--text); }
.fltable .srt { opacity:.7; margin-left:2px; }
.fltable th.num, .fltable td.num { text-align:right; }
.flrow td { padding-top:11px; padding-bottom:11px; }
.flrow:hover { background:rgba(8,120,249,.05); }
.flrow.sel { background:rgba(8,120,249,.1); }
.flrow[draggable=true] { cursor:default; }
.flname a { color:var(--text); text-decoration:none; font-weight:600; font-size:13.5px; text-transform:uppercase; letter-spacing:.01em; }
.flname a:hover { color:var(--accent2); }
.flfoldtag { margin-left:8px; font-size:11px; color:var(--muted); }
.flcon { display:inline-flex; width:24px; height:24px; align-items:center; justify-content:center; border-radius:50%; background:var(--surface); border:1px solid var(--line2); margin-right:3px; font-size:12px; cursor:help; }
.flwho { display:flex; align-items:center; gap:7px; font-size:13px; }
.wadot { width:22px; height:22px; border-radius:50%; background:#25D366; display:inline-flex; align-items:center; justify-content:center; box-shadow:0 0 10px rgba(37,211,102,.35); vertical-align:middle; }
@media (max-width: 900px) { .flwrap { flex-direction:column; } .flside { position:static; width:100%; flex-basis:auto; } }


/* =====================================================================
   Moldura profissional: barra de topo fixa + lateral com divisórias finas
   ===================================================================== */
#app { display:flex; height:100vh; min-height:0; overflow:hidden; background:var(--inner); }
.shell { flex:1; min-width:0; display:flex; flex-direction:column; height:100vh; }
main { flex:1; min-height:0; overflow:auto; padding:24px 28px 40px; max-width:none; }
main > section { max-width:1500px; margin-left:auto; margin-right:auto; }
main > section.full { max-width:none; }

/* barra de topo */
.topbar { flex:none; height:var(--top); display:flex; align-items:center; justify-content:space-between; gap:12px; padding:0 20px 0 28px;
  background:var(--panel); border-bottom:1px solid var(--div); position:relative; z-index:30; }
.tbleft h1 { margin:0; font-size:18px; font-weight:700; letter-spacing:-.1px; }
.tbright { display:flex; align-items:center; gap:6px; }
.tbchip { display:flex; align-items:center; gap:7px; height:32px; padding:0 12px; border-radius:99px; border:1px solid var(--div); background:var(--field); color:var(--text); font-size:12.5px; font-weight:600; cursor:pointer; margin-right:6px; }
.tbchip .dot { width:8px; height:8px; border-radius:50%; background:var(--muted); }
.tbchip.ok .dot { background:#16e0a0; box-shadow:0 0 0 3px rgba(22,224,160,.15); }
.tbchip.wait .dot { background:#ffb020; } .tbchip.bad { border-color:rgba(255,77,106,.5); color:#ff8da0; } .tbchip.bad .dot { background:#ff4d6a; }
.tbicon { position:relative; width:36px; height:36px; border-radius:50%; border:0; background:transparent; color:var(--text2); cursor:pointer; display:grid; place-items:center; }
.tbicon:hover { background:var(--hover); color:#fff; }
.tbbadge { position:absolute; top:1px; right:0; min-width:17px; height:17px; padding:0 4px; border-radius:99px; background:#e5304f; color:#fff; font-size:10.5px; font-weight:700; display:grid; place-items:center; border:2px solid var(--panel); }
.tbav { position:relative; border:0; background:none; padding:0; margin-left:6px; cursor:pointer; border-radius:50%; }
.tbav .av { width:36px; height:36px; font-size:13px; box-shadow:none; border:2px solid var(--surface); }
.tbav:hover .av { border-color:var(--accent); }
.tbav .online { position:absolute; right:0; top:0; width:10px; height:10px; border-radius:50%; background:#16e0a0; border:2px solid var(--panel); }
.tbmenu { position:absolute; right:16px; top:calc(var(--top) - 4px); min-width:250px; background:var(--panel); border:1px solid var(--div); border-radius:12px; padding:6px; box-shadow:0 16px 40px rgba(0,0,0,.6); z-index:40; }
.tbmenu.hidden { display:none; }
.tbmenu button { display:flex; align-items:center; gap:9px; width:100%; text-align:left; background:none; border:0; color:var(--text); padding:9px 10px; border-radius:8px; cursor:pointer; font-size:13.5px; }
.tbmenu button:hover { background:var(--hover); } .tbmenu button.danger { color:#ff6b81; }
.tbmenu .kbsep { height:1px; background:var(--div); margin:5px 2px; }
.tbuser { display:flex; align-items:center; gap:10px; padding:8px 8px 6px; }
.tbuser .av { width:38px; height:38px; font-size:13px; box-shadow:none; }
.tbuser b { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* lateral */
#side { width:248px; background:var(--field); border-right:1px solid var(--div); height:100vh; position:relative; }
.sbtop { height:var(--top); flex:none; padding:0 14px 0 18px; border-bottom:1px solid var(--div); }
.logo { font-size:21px; gap:8px; } .logo img { width:34px; height:34px; filter:none; }
.sbsearch { padding:12px 12px 4px; }
.sbsearch svg { left:24px; top:22px; }
.sbsearch input { font-style:normal; border-radius:9px; }
#side nav { padding:2px 10px 10px; }
#side nav .grp { font-size:11px; margin:16px 10px 5px; letter-spacing:.08em; }
#side nav button { font-size:14px; padding:8px 12px; border-radius:8px; gap:11px; color:var(--text2); }
#side nav button i svg { width:18px; height:18px; }
#side nav button:hover { background:var(--hover); color:#fff; }
#side nav button.on { background:rgba(8,120,249,.14); color:#fff; font-weight:600; box-shadow:inset 3px 0 0 var(--accent); }
#side nav button.on i { color:var(--accent2); }
.sbbottom { padding:12px; border-top:1px solid var(--div); gap:0; }
.company { margin:0; padding:9px 10px; gap:10px; border:1px solid var(--div); border-radius:10px; background:var(--panel); justify-content:flex-start; }
.company:hover { border-color:var(--line); background:var(--hover); }
.company .cav { width:32px; height:32px; border-radius:8px; flex:none; background:linear-gradient(180deg,#1a8bff,#0646b8); color:#fff; display:grid; place-items:center; font-weight:700; font-size:12.5px; }
.company .cn { font-size:13.5px; } .company .cl { font-size:12px; }
.company > i { margin-left:auto; color:var(--muted); transform:rotate(-90deg); display:grid; }
body.mini #side { width:68px; }
body.mini #side .company { justify-content:center; padding:8px; } body.mini #side .company > div, body.mini #side .company > i { display:none; }
body.mini .sbtop { flex-direction:row; justify-content:center; padding:0; } body.mini .sbtop .collapse { display:none; }
body.mini #side .logo { cursor:pointer; } body.mini #side nav { padding:8px; } body.mini #side nav button.on { box-shadow:none; }

/* cabeçalho das páginas: o título fica na barra de topo */
.phead { margin-bottom:16px; align-items:center; min-height:0; }
.phead h1 { display:none; }
.phead p { margin:0; font-size:14px; }
#tab-inicio .phead h1 { display:block; font-size:24px; font-weight:800; }
#tab-inicio .phead p { margin-top:4px; font-size:14.5px; color:var(--muted); }

/* cartões e divisórias mais limpos */
.card, .kpi { box-shadow:none; border-color:var(--div); }
.card:hover { border-color:var(--div); }

/* telas de altura total (Chat ao vivo) e Kanban */
section.full { margin:-24px -28px -40px; }
.inbox { height:calc(100vh - var(--top)); background:var(--inner); }
.ibList { border-right:1px solid var(--div); }
.ibSide { border-left:1px solid var(--div); }
.ibHead, .chatHead { border-bottom:1px solid var(--div); }
.chatHead { min-height:58px; }
.composer { border-top:1px solid var(--div); }
.chMsgs { background:var(--field); }
.kbwrap { height:calc(100vh - var(--top) - 96px); border-color:var(--div); }
.kbbar { border-bottom-color:var(--div); }
.flside, .fltable { border-color:var(--div); }

@media (max-width: 900px) {
  #side { width:68px; } .topbar { padding:0 12px; } .tbchip span:last-child { display:none; } .tbchip { padding:0 10px; margin-right:0; }
  main { padding:16px; } section.full { margin:-16px; }
  .sbbottom .company > div, .sbbottom .company > i { display:none; } .sbbottom .company { justify-content:center; }
}
.sbbottom::before, .sbbottom::after { display:none !important; content:none !important; }
#tab-kanban .phead { display:none; }
.kbwrap { height:calc(100vh - var(--top) - 48px); }
body.mini #side .company { display:flex !important; }
@media (max-width: 900px) { #side .company { display:flex !important; } }

/* ===== Chat ao vivo: painéis separados e arredondados ===== */
.inbox { display:grid; grid-template-columns:210px 330px minmax(0,1fr) 300px; gap:10px; padding:10px; height:calc(100vh - var(--top)); background:var(--inner); }
.ibp { background:var(--panel); border:1px solid var(--div) !important; border-radius:14px; display:flex; flex-direction:column; min-height:0; overflow:hidden; }
.ibph { display:flex; align-items:center; justify-content:space-between; padding:14px 16px 8px; flex:none; }
.ibph h3 { margin:0; font-size:17px; font-weight:700; letter-spacing:-.1px; }
.ibphr { display:flex; gap:4px; } .tbicon.sm { width:30px; height:30px; font-size:15px; }
.ibfbody { overflow:auto; padding:0 8px 10px; }
.ibfg { color:var(--muted); font-size:12px; margin:12px 8px 4px; }
.ibf { display:flex; align-items:center; gap:9px; width:100%; background:none; border:0; color:var(--text); padding:7px 8px; border-radius:9px; cursor:pointer; font-size:13.5px; text-align:left; }
.ibf:hover { background:var(--hover); } .ibf.on { background:rgba(8,120,249,.16); font-weight:600; }
.ibf .ic { width:22px; display:inline-flex; justify-content:center; flex:none; font-size:14px; }
.ibf .t { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } .ibf .c { color:var(--muted); font-size:12px; }
.ibList { border-right:0 !important; background:var(--panel); }
.ibHead { padding:0 12px 10px; border-bottom:1px solid var(--div); }
.ibsearch { display:flex; align-items:center; gap:7px; background:var(--field); border:1px solid var(--div); border-radius:10px; padding:0 10px; font-size:13px; }
.ibsearch input { border:0; background:transparent; padding:8px 0; outline:none; }
.ibtabs { display:flex; gap:6px; margin-top:9px; }
.ibtabs button { background:transparent; border:1px solid var(--div); color:var(--muted); border-radius:8px; padding:4px 10px; font-size:12.5px; cursor:pointer; }
.ibtabs button.on { color:#fff; background:var(--surface); border-color:var(--line); }
.ibtabs b { background:#e5304f; color:#fff; border-radius:99px; padding:0 6px; font-size:10.5px; margin-left:3px; }
.ibtabs b:empty { display:none; }
.ibConvs { padding:4px 6px 8px; }
.conv { display:flex; align-items:flex-start; gap:10px; padding:10px; border-bottom:0; border-radius:10px; margin:2px 0; position:relative; }
.conv:hover { background:var(--hover); }
.conv.on { background:rgba(8,120,249,.16); box-shadow:none; }
.conv .cav { position:relative; width:38px; height:38px; border-radius:50%; flex:none; display:grid; place-items:center; color:#fff; font-weight:700; font-size:13px; }
.conv .cmem { position:absolute; right:-3px; bottom:-3px; width:17px; height:17px; border-radius:50%; font-size:9px; display:grid; place-items:center; border:2px solid var(--panel); }
.conv .cbody { flex:1; min-width:0; }
.conv .t b { font-size:13.5px; font-weight:600; } .conv .tm { color:var(--muted); font-size:11.5px; flex:none; }
.conv .p { margin:2px 0 0; font-size:12.5px; }
.conv.unread .t b { color:#fff; } .conv.unread .p { color:var(--text2); }
.conv .cst { margin-top:5px; display:flex; gap:4px; } .conv .cst .pill { font-size:10.5px; padding:1px 7px; }
.conv .udot { position:absolute; right:12px; bottom:14px; width:8px; height:8px; border-radius:50%; background:var(--accent2); }
.ibChat { background:var(--field); }
.chatHead { padding:10px 14px; background:var(--panel); }
.chwho { display:flex; align-items:center; gap:10px; min-width:0; }
.chwho .kbav { width:34px; height:34px; font-size:12px; }
.chMsgs { background:var(--field); }
.composer { background:var(--panel); border-radius:0; }
.ibSideWrap { background:var(--panel); }
.ibSide { border-left:0 !important; padding:0 16px 16px; background:transparent; }
.ibSide h3:first-child { margin-top:4px; }
@media (max-width: 1350px) { .inbox { grid-template-columns:190px 300px minmax(0,1fr); } .ibSideWrap { display:none; } }
@media (max-width: 1000px) { .inbox { grid-template-columns:280px minmax(0,1fr); } .ibFilters { display:none; } }
@media (max-width: 700px) { .inbox { grid-template-columns:1fr; height:auto; } }

/* ===== caixa de mensagem ampla (Chat ao vivo) ===== */
.composer { display:block; padding:10px 12px 12px; background:var(--panel); border-top:1px solid var(--div); }
.cbox { border:1px solid var(--div); border-radius:14px; background:var(--field); padding:10px 12px 8px; transition:border-color .15s, box-shadow .15s; cursor:text; }
.cbox:focus-within { border-color:var(--accent); box-shadow:0 0 0 3px rgba(8,120,249,.15); }
.cbox textarea { width:100%; border:0 !important; background:transparent !important; box-shadow:none !important; outline:none; resize:none; min-height:46px; max-height:180px; padding:2px 2px 6px; font-size:14px; line-height:1.45; }
.cbar { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.cgrp { display:flex; align-items:center; gap:4px; }
.cic { width:34px; height:34px; border-radius:50%; border:0; background:transparent; color:var(--text2); cursor:pointer; display:grid; place-items:center; }
.cic:hover { background:var(--surface); color:#fff; }
.cchan { display:inline-flex; align-items:center; gap:6px; font-size:13px; font-weight:600; color:var(--text2); margin-right:6px; }
.wadot.sm { width:18px; height:18px; box-shadow:none; }
.cbar .sendsplit .btn { height:34px; padding:0 14px; font-size:13.5px; }
.cbar .sendsplit .sarrow { padding:0 9px; }
.composer .pop { bottom:calc(100% - 4px); }
.composer .pop.sched { right:12px; }
.flimp { border:1px solid var(--div); border-radius:12px; padding:10px 12px; margin:12px 0 4px; background:var(--field); }
.warnbox { border:1px solid rgba(255,176,32,.45); background:rgba(255,176,32,.08); color:#ffd27a; border-radius:10px; padding:9px 12px; font-size:13px; margin:10px 0; }

/* menu ⌄ das conversas + números clicáveis */
.conv .cside { display:flex; flex-direction:column; align-items:flex-end; gap:6px; min-width:18px; }
.conv .cpin { font-size:11px; opacity:.8; }
.conv .cmenu { opacity:0; background:none; border:0; color:var(--muted); cursor:pointer; width:22px; height:22px; padding:0; display:grid; place-items:center; border-radius:50%; position:absolute; right:10px; bottom:10px; transition:opacity .12s; }
.conv:hover .cmenu { opacity:1; } .conv .cmenu:hover { background:rgba(255,255,255,.08); color:var(--text); }
.ctxm { position:fixed; z-index:9999; min-width:230px; background:#0d1726; border:1px solid var(--line); border-radius:12px; padding:6px; box-shadow:0 14px 40px rgba(0,0,0,.55); }
.ctxm button { display:flex; align-items:center; gap:12px; width:100%; background:none; border:0; color:var(--text); text-align:left; padding:10px 12px; border-radius:8px; cursor:pointer; font-size:14px; }
.ctxm button:hover { background:rgba(255,255,255,.07); }
.ctxm button span { width:20px; text-align:center; }
.plink { color:#53bdeb; cursor:pointer; }
.plink:hover { text-decoration:underline; }
.conv .cside .udot { position:static; }
.conv:hover .cside .udot { visibility:hidden; }

/* colunas do Kanban arrastáveis */
.kbcol > .kbch[draggable="true"] { cursor:grab; }
.kbcol > .kbch[draggable="true"]:active { cursor:grabbing; }
.kbch .kbgrip { color:var(--muted); font-size:13px; letter-spacing:-1px; opacity:0; margin-left:-8px; width:8px; transition:opacity .12s; }
.kbcol:hover .kbch .kbgrip { opacity:.7; }
.kbcol.coldrag { opacity:.35; }
.kbcolph { flex:none; width:272px; min-height:120px; border:2px dashed var(--accent,var(--accent)); border-radius:12px; background:rgba(8,120,249,.08); }

/* =====================================================================
   ACABAMENTO PREMIUM — mesma estrutura, superfícies com profundidade
   (paleta central em :root; aqui só o acabamento dos componentes)
   ===================================================================== */

/* ---------- tipografia ---------- */
body { font-family:"Inter", "Geist", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; color:var(--text); font-size:14px; line-height:1.5;
  font-feature-settings:"cv11", "ss01", "ss03"; letter-spacing:-.006em; text-rendering:optimizeLegibility; }
h1, h2, h3 { color:var(--text); letter-spacing:-.015em; }
h2 { font-size:16px; font-weight:600; }
b, strong { font-weight:600; }
label { color:var(--muted); font-size:12.5px; font-weight:500; }
.muted { color:var(--muted); } .small { font-size:12px; }
th { color:var(--faint); font-size:11px; font-weight:600; letter-spacing:.06em; }
td { color:var(--text2); }
td b, td strong { color:var(--text); }
code { background:var(--surface); color:var(--accent2); }
::selection { background:rgba(8,123,250,.4); }
::-webkit-scrollbar-thumb { background:#1A304A; border:2px solid transparent; background-clip:padding-box; }
::-webkit-scrollbar-thumb:hover { background:#24405F; background-clip:padding-box; }

/* ---------- ícones (Lucide): mesmo traço, tamanho e alinhamento ---------- */
svg.ico { stroke-width:1.75; }
.inl > svg.ico, i.inl svg.ico, svg.ico.inl { width:15px; height:15px; vertical-align:-3px; margin-right:6px; }
.chev svg.ico, svg.ico.chev { width:14px; height:14px; margin-left:4px; vertical-align:-2px; opacity:.75; }
i[data-ic] { font-style:normal; display:inline-grid; place-items:center; }

/* ---------- moldura: topo e lateral ---------- */
.topbar { background:var(--bg2); border-bottom:1px solid var(--div); }
.tbleft h1 { font-size:17px; font-weight:600; color:var(--text); }
.tbicon { color:var(--muted); } .tbicon:hover { background:var(--hover); color:var(--text); }
.tbicon svg.ico { width:19px; height:19px; }
.tbchip { background:var(--field); border-color:var(--line2); color:var(--text2); }
.tbmenu, .kbmenu, .ctxm, .pop, #flMenu { background:var(--panel); border:1px solid var(--line); box-shadow:0 18px 48px rgba(0,0,0,.5); }
.tbmenu button, .kbmenu button, .ctxm button, .pop button { color:var(--text2); gap:10px; }
.tbmenu button:hover, .kbmenu button:hover:not(:disabled), .ctxm button:hover, .pop button:hover { background:var(--hover); color:var(--text); }
.tbmenu button svg.ico, .kbmenu button svg.ico, .ctxm button svg.ico, .pop button svg.ico, #flMenu button svg.ico { width:16px; height:16px; color:var(--muted); flex:none; }
.tbmenu button.danger svg.ico, .kbmenu button.danger svg.ico, #flMenu button.danger svg.ico { color:currentColor; }
.ctxm button { font-size:13.5px; padding:9px 11px; } .ctxm button span { width:auto; display:grid; place-items:center; }
.pop button, #flMenu button, .kbmenu button { display:flex; align-items:center; }
#side { background:var(--bg2); border-right:1px solid var(--div); }
.sbtop { border-bottom-color:var(--div); }
#side nav .grp { color:var(--faint); font-size:10.5px; font-weight:600; letter-spacing:.09em; }
#side nav button { color:var(--text2); font-weight:500; }
#side nav button i { color:var(--muted); }
#side nav button:hover { background:var(--hover); color:var(--text); }
#side nav button:hover i { color:var(--text2); }
#side nav button.on { background:var(--accent-soft); color:var(--text); font-weight:600; box-shadow:inset 2px 0 0 var(--accent); }
#side nav button.on i { color:var(--accent); }
.sbsearch input { background:var(--field); border-color:var(--line2); }
.sbbottom { border-top-color:var(--div); }
.company { background:var(--panel); border-color:var(--line2); } .company:hover { background:var(--hover); border-color:var(--line); }
.av, .tbav .av { box-shadow:none; }
.badge { background:var(--accent); color:#fff; }
.sdot.on { box-shadow:none; }

/* ---------- cards e painéis ---------- */
.card, .kpi, .kbwrap, .fltable, .flside, .subnav, .authbox { background:var(--panel); border:1px solid var(--line2); box-shadow:var(--shadow); }
.card:hover { border-color:var(--line2); }
.modalbox { background:var(--panel); border:1px solid var(--line); box-shadow:0 24px 64px rgba(0,0,0,.6); }
.modal { background:rgba(2,6,12,.7); backdrop-filter:blur(2px); }
.alert { border-color:rgba(245,177,61,.35); background:rgba(245,177,61,.07); color:#f3d9a6; }
.alert .alrow { display:flex; align-items:center; gap:9px; } .alert .alrow svg.ico { width:17px; height:17px; color:var(--warn); }
.warnbox { border-color:rgba(245,177,61,.32); background:rgba(245,177,61,.06); color:#f0d29b; }
#toast { background:var(--panel); border:1px solid var(--line); box-shadow:0 14px 40px rgba(0,0,0,.5); display:none; align-items:center; gap:9px; color:var(--text); font-size:13.5px; padding:11px 16px; }
#toast[style*="block"] { display:flex !important; }
#toast svg.tic { width:17px; height:17px; color:var(--ok); }

/* ---------- botões ---------- */
.btn { background:var(--accent); color:#fff; font-weight:600; font-size:13.5px; border-radius:var(--r-md); box-shadow:0 1px 0 rgba(255,255,255,.08) inset, 0 1px 2px rgba(0,0,0,.3);
  display:inline-flex; align-items:center; justify-content:center; gap:7px; transition:background .15s, border-color .15s, color .15s, transform .05s; }
.btn:hover { background:#2a8dff; filter:none; } .btn:active { background:#0668d6; transform:translateY(1px); }
.btn.ghost { background:var(--surface); color:var(--text2); border:1px solid var(--line); font-weight:500; box-shadow:none; }
.btn.ghost:hover { background:var(--hover); border-color:#24405F; color:var(--text); }
.btn.danger { background:transparent; color:var(--danger); border:1px solid rgba(255,90,114,.4); }
.btn.danger:hover { background:rgba(255,90,114,.08); }
.btn svg.ico { width:15px; height:15px; }
.iconbtn, .ibtn { background:var(--surface); border:1px solid var(--line); color:var(--text2); }
.iconbtn:hover, .ibtn:hover { background:var(--hover); border-color:#24405F; color:var(--text); }
.ibtn svg.ico, .iconbtn svg.ico { width:17px; height:17px; }
.seg { background:var(--field); border:1px solid var(--line2); }
.seg button { color:var(--muted); font-size:13.5px; font-weight:500; }
.seg button:hover { color:var(--text); }
.seg button.on { background:var(--surface); color:var(--text); font-weight:600; box-shadow:0 1px 2px rgba(0,0,0,.35), inset 0 0 0 1px var(--line); }
.subnav button { display:flex; align-items:center; gap:10px; color:var(--text2); }
.subnav button svg.ico { width:16px; height:16px; color:var(--muted); }
.subnav button:hover { background:var(--hover); color:var(--text); }
.subnav button.on { background:var(--accent-soft); color:var(--text); box-shadow:inset 2px 0 0 var(--accent); }
.subnav button.on svg.ico { color:var(--accent); }
.subnav .grp { color:var(--faint); }

/* ---------- campos ---------- */
input, select, textarea { background:var(--field); border:1px solid var(--line2); color:var(--text); }
input:hover, select:hover, textarea:hover { border-color:var(--line); }
input:focus, select:focus, textarea:focus { border-color:var(--accent); box-shadow:0 0 0 3px rgba(8,123,250,.16); }
input::placeholder, textarea::placeholder { color:var(--faint); }
select option { background:var(--panel); }
.kbsearch, .ibsearch { background:var(--field); border:1px solid var(--line2); }
.kbsearch:focus-within, .ibsearch:focus-within { border-color:var(--accent); }
.kbsearch svg.ico, .ibsearch svg.ico { width:15px; height:15px; color:var(--faint); }
.kbsearch input, .ibsearch input { background:transparent; border:0; box-shadow:none !important; }

/* ---------- etiquetas e status ---------- */
.pill { font-size:11px; font-weight:500; padding:1px 8px; background:var(--surface); border-color:var(--line); color:var(--muted); }
.pill svg.ico { width:11px; height:11px; vertical-align:-1px; margin-right:3px; }
.st-paused { color:var(--warn); border-color:rgba(245,177,61,.3); background:rgba(245,177,61,.08); }
.st-active { background:rgba(8,123,250,.12); color:#6cb2ff; border-color:rgba(8,123,250,.3); }
.tag { font-size:11px; font-weight:600; padding:1px 8px; }
.dot.on { box-shadow:none; }
.sdotx { display:inline-block; width:7px; height:7px; border-radius:50%; background:var(--faint); margin-right:6px; vertical-align:1px; }
.sdotx.ok { background:var(--ok); } .sdotx.wait { background:var(--warn); }
.tbchip.ok .dot { box-shadow:0 0 0 3px rgba(47,211,154,.14); }

/* ---------- Dashboard: brilho no papel de parede, nunca dentro dos cards ---------- */
/* fundo "universo" em todas as telas: estrelas suaves, pontinhos e nebulosa */
:root {
  --space-img: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='700' height='700'%3E%3Cdefs%3E%3CradialGradient id='sg'%3E%3Cstop offset='0' stop-color='%23bfe9ff' stop-opacity='.9'/%3E%3Cstop offset='1' stop-color='%2313C8E8' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='227' cy='106' r='0.4' fill='%239fd8ff' opacity='0.18'/%3E%3Ccircle cx='66' cy='408' r='0.8' fill='%23ffffff' opacity='0.23'/%3E%3Ccircle cx='304' cy='49' r='0.4' fill='%23ffffff' opacity='0.34'/%3E%3Ccircle cx='579' cy='87' r='0.5' fill='%239fd8ff' opacity='0.37'/%3E%3Ccircle cx='663' cy='404' r='0.65' fill='%23ffffff' opacity='0.17'/%3E%3Ccircle cx='33' cy='601' r='0.55' fill='%239fd8ff' opacity='0.30'/%3E%3Ccircle cx='82' cy='216' r='0.5' fill='%239fd8ff' opacity='0.19'/%3E%3Ccircle cx='447' cy='261' r='0.8' fill='%239fd8ff' opacity='0.40'/%3E%3Ccircle cx='42' cy='144' r='0.8' fill='%23cfe6ff' opacity='0.30'/%3E%3Ccircle cx='326' cy='646' r='0.55' fill='%23ffffff' opacity='0.25'/%3E%3Ccircle cx='489' cy='171' r='0.8' fill='%23cfe6ff' opacity='0.26'/%3E%3Ccircle cx='613' cy='511' r='0.55' fill='%23ffffff' opacity='0.36'/%3E%3Ccircle cx='83' cy='293' r='0.55' fill='%23cfe6ff' opacity='0.20'/%3E%3Ccircle cx='295' cy='673' r='0.4' fill='%239fd8ff' opacity='0.42'/%3E%3Ccircle cx='552' cy='573' r='0.55' fill='%239fd8ff' opacity='0.39'/%3E%3Ccircle cx='348' cy='558' r='0.4' fill='%23cfe6ff' opacity='0.44'/%3E%3Ccircle cx='332' cy='465' r='0.4' fill='%23cfe6ff' opacity='0.41'/%3E%3Ccircle cx='453' cy='695' r='0.65' fill='%23cfe6ff' opacity='0.25'/%3E%3Ccircle cx='621' cy='243' r='0.65' fill='%239fd8ff' opacity='0.27'/%3E%3Ccircle cx='82' cy='41' r='0.55' fill='%23ffffff' opacity='0.20'/%3E%3Ccircle cx='279' cy='642' r='0.65' fill='%23cfe6ff' opacity='0.18'/%3E%3Ccircle cx='281' cy='194' r='0.5' fill='%239fd8ff' opacity='0.44'/%3E%3Ccircle cx='195' cy='291' r='0.55' fill='%23cfe6ff' opacity='0.39'/%3E%3Ccircle cx='670' cy='106' r='0.5' fill='%239fd8ff' opacity='0.20'/%3E%3Ccircle cx='163' cy='339' r='0.8' fill='%23cfe6ff' opacity='0.21'/%3E%3Ccircle cx='3' cy='293' r='0.55' fill='%23cfe6ff' opacity='0.36'/%3E%3Ccircle cx='667' cy='483' r='0.8' fill='%239fd8ff' opacity='0.48'/%3E%3Ccircle cx='473' cy='38' r='0.8' fill='%23cfe6ff' opacity='0.29'/%3E%3Ccircle cx='276' cy='337' r='0.65' fill='%23ffffff' opacity='0.17'/%3E%3Ccircle cx='689' cy='308' r='0.4' fill='%23ffffff' opacity='0.27'/%3E%3Ccircle cx='72' cy='397' r='0.8' fill='%23cfe6ff' opacity='0.19'/%3E%3Ccircle cx='430' cy='49' r='0.5' fill='%23ffffff' opacity='0.36'/%3E%3Ccircle cx='444' cy='669' r='0.8' fill='%23ffffff' opacity='0.28'/%3E%3Ccircle cx='81' cy='342' r='0.65' fill='%23cfe6ff' opacity='0.32'/%3E%3Ccircle cx='60' cy='72' r='0.55' fill='%23cfe6ff' opacity='0.41'/%3E%3Ccircle cx='580' cy='113' r='0.4' fill='%239fd8ff' opacity='0.22'/%3E%3Ccircle cx='253' cy='483' r='0.4' fill='%23cfe6ff' opacity='0.42'/%3E%3Ccircle cx='685' cy='604' r='0.55' fill='%23ffffff' opacity='0.33'/%3E%3Ccircle cx='249' cy='156' r='0.8' fill='%23cfe6ff' opacity='0.42'/%3E%3Ccircle cx='446' cy='429' r='0.5' fill='%23cfe6ff' opacity='0.43'/%3E%3Ccircle cx='518' cy='159' r='0.8' fill='%239fd8ff' opacity='0.32'/%3E%3Ccircle cx='20' cy='20' r='0.55' fill='%23ffffff' opacity='0.32'/%3E%3Ccircle cx='485' cy='670' r='0.65' fill='%239fd8ff' opacity='0.43'/%3E%3Ccircle cx='692' cy='669' r='0.55' fill='%23ffffff' opacity='0.18'/%3E%3Ccircle cx='159' cy='138' r='0.5' fill='%239fd8ff' opacity='0.32'/%3E%3Ccircle cx='588' cy='336' r='0.55' fill='%23ffffff' opacity='0.43'/%3E%3Ccircle cx='584' cy='84' r='0.65' fill='%23ffffff' opacity='0.42'/%3E%3Ccircle cx='335' cy='125' r='0.55' fill='%239fd8ff' opacity='0.18'/%3E%3Ccircle cx='277' cy='281' r='0.4' fill='%23ffffff' opacity='0.40'/%3E%3Ccircle cx='695' cy='19' r='0.8' fill='%239fd8ff' opacity='0.47'/%3E%3Ccircle cx='102' cy='579' r='0.65' fill='%23cfe6ff' opacity='0.38'/%3E%3Ccircle cx='109' cy='384' r='0.4' fill='%239fd8ff' opacity='0.15'/%3E%3Ccircle cx='455' cy='369' r='0.5' fill='%23ffffff' opacity='0.30'/%3E%3Ccircle cx='578' cy='148' r='0.55' fill='%239fd8ff' opacity='0.22'/%3E%3Ccircle cx='168' cy='411' r='0.55' fill='%23ffffff' opacity='0.34'/%3E%3Ccircle cx='43' cy='518' r='0.65' fill='%239fd8ff' opacity='0.38'/%3E%3Ccircle cx='294' cy='642' r='0.8' fill='%23ffffff' opacity='0.20'/%3E%3Ccircle cx='366' cy='13' r='0.65' fill='%239fd8ff' opacity='0.42'/%3E%3Ccircle cx='3' cy='559' r='0.5' fill='%239fd8ff' opacity='0.20'/%3E%3Ccircle cx='508' cy='390' r='0.55' fill='%239fd8ff' opacity='0.39'/%3E%3Ccircle cx='389' cy='549' r='0.4' fill='%23ffffff' opacity='0.46'/%3E%3Ccircle cx='174' cy='194' r='0.4' fill='%239fd8ff' opacity='0.33'/%3E%3Ccircle cx='20' cy='626' r='0.4' fill='%239fd8ff' opacity='0.31'/%3E%3Ccircle cx='681' cy='424' r='0.5' fill='%23cfe6ff' opacity='0.39'/%3E%3Ccircle cx='356' cy='565' r='0.8' fill='%239fd8ff' opacity='0.48'/%3E%3Ccircle cx='366' cy='613' r='0.55' fill='%23ffffff' opacity='0.47'/%3E%3Ccircle cx='588' cy='96' r='0.4' fill='%23cfe6ff' opacity='0.29'/%3E%3Ccircle cx='51' cy='168' r='0.4' fill='%23cfe6ff' opacity='0.22'/%3E%3Ccircle cx='549' cy='628' r='0.5' fill='%239fd8ff' opacity='0.48'/%3E%3Ccircle cx='462' cy='100' r='0.5' fill='%23ffffff' opacity='0.49'/%3E%3Ccircle cx='523' cy='66' r='0.65' fill='%239fd8ff' opacity='0.21'/%3E%3Ccircle cx='583' cy='113' r='0.65' fill='%23cfe6ff' opacity='0.50'/%3E%3Ccircle cx='237' cy='137' r='0.55' fill='%23cfe6ff' opacity='0.18'/%3E%3Ccircle cx='14' cy='388' r='0.65' fill='%23cfe6ff' opacity='0.40'/%3E%3Ccircle cx='232' cy='437' r='0.8' fill='%23ffffff' opacity='0.49'/%3E%3Ccircle cx='690' cy='552' r='0.4' fill='%23cfe6ff' opacity='0.18'/%3E%3Ccircle cx='28' cy='545' r='0.55' fill='%23cfe6ff' opacity='0.41'/%3E%3Ccircle cx='595' cy='473' r='0.55' fill='%239fd8ff' opacity='0.29'/%3E%3Ccircle cx='643' cy='399' r='0.55' fill='%23ffffff' opacity='0.18'/%3E%3Ccircle cx='560' cy='128' r='0.4' fill='%23ffffff' opacity='0.24'/%3E%3Ccircle cx='444' cy='561' r='0.4' fill='%23ffffff' opacity='0.36'/%3E%3Ccircle cx='47' cy='604' r='0.65' fill='%239fd8ff' opacity='0.15'/%3E%3Ccircle cx='292' cy='641' r='0.8' fill='%239fd8ff' opacity='0.20'/%3E%3Ccircle cx='497' cy='657' r='0.5' fill='%23ffffff' opacity='0.24'/%3E%3Ccircle cx='141' cy='218' r='0.55' fill='%23ffffff' opacity='0.34'/%3E%3Ccircle cx='203' cy='350' r='0.5' fill='%23ffffff' opacity='0.24'/%3E%3Ccircle cx='696' cy='26' r='0.4' fill='%239fd8ff' opacity='0.41'/%3E%3Ccircle cx='685' cy='360' r='0.5' fill='%23ffffff' opacity='0.48'/%3E%3Ccircle cx='461' cy='455' r='0.65' fill='%23cfe6ff' opacity='0.34'/%3E%3Ccircle cx='679' cy='215' r='0.5' fill='%23cfe6ff' opacity='0.49'/%3E%3Ccircle cx='139' cy='617' r='0.5' fill='%23cfe6ff' opacity='0.29'/%3E%3Ccircle cx='687' cy='586' r='0.4' fill='%239fd8ff' opacity='0.17'/%3E%3Ccircle cx='616' cy='302' r='0.4' fill='%23cfe6ff' opacity='0.18'/%3E%3Ccircle cx='609' cy='469' r='0.55' fill='%239fd8ff' opacity='0.36'/%3E%3Ccircle cx='205' cy='322' r='0.5' fill='%23ffffff' opacity='0.24'/%3E%3Ccircle cx='194' cy='655' r='3.5' fill='url(%23sg)' opacity='.55'/%3E%3Ccircle cx='194' cy='655' r='1' fill='%23fff' opacity='.8'/%3E%3Ccircle cx='662' cy='381' r='3.5' fill='url(%23sg)' opacity='.55'/%3E%3Ccircle cx='662' cy='381' r='1' fill='%23fff' opacity='.8'/%3E%3Ccircle cx='181' cy='657' r='3.5' fill='url(%23sg)' opacity='.55'/%3E%3Ccircle cx='181' cy='657' r='1' fill='%23fff' opacity='.8'/%3E%3Ccircle cx='224' cy='255' r='3.5' fill='url(%23sg)' opacity='.55'/%3E%3Ccircle cx='224' cy='255' r='1' fill='%23fff' opacity='.8'/%3E%3Ccircle cx='21' cy='272' r='3.5' fill='url(%23sg)' opacity='.55'/%3E%3Ccircle cx='21' cy='272' r='1' fill='%23fff' opacity='.8'/%3E%3Ccircle cx='333' cy='352' r='3.5' fill='url(%23sg)' opacity='.55'/%3E%3Ccircle cx='333' cy='352' r='1' fill='%23fff' opacity='.8'/%3E%3Cg opacity='.55'%3E%3Cpath d='M159 347.0 L159.2 353 L159 359.0 L158.0 353Z M152.6 353 L159 353.6 L164.6 353 L159 352.4Z' fill='%23e6f6ff'/%3E%3Ccircle cx='159' cy='353' r='4' fill='url(%23sg)'/%3E%3C/g%3E%3Cg opacity='.55'%3E%3Cpath d='M33 193.1 L33.8 199 L33 205.1 L32.6 199Z M27.2 199 L33 199.7 L39.2 199 L33 198.5Z' fill='%23e6f6ff'/%3E%3Ccircle cx='33' cy='199' r='4' fill='url(%23sg)'/%3E%3C/g%3E%3C/svg%3E"),
    radial-gradient(900px 480px at 95% 8%, rgba(8,123,250,.14), transparent 65%),
    radial-gradient(620px 380px at 30% 35%, rgba(70,60,190,.05), transparent 70%),
    radial-gradient(700px 420px at 70% 85%, rgba(19,200,232,.045), transparent 70%),
    radial-gradient(circle at 1px 1px, rgba(145,170,200,.07) 1px, transparent 1.4px);
  --space-size: 700px 700px, auto, auto, auto, 26px 26px;
  --space-pos: 0 0, 0 0, 0 0, 0 0, 0 0;
  --space-rep: repeat, no-repeat, no-repeat, no-repeat, repeat;
  --space-att: fixed, fixed, fixed, fixed, fixed;
}
main { background-color:#03070f; background-image:var(--space-img); background-size:var(--space-size);
  background-position:var(--space-pos); background-repeat:var(--space-rep); background-attachment:var(--space-att); }
/* Dashboard: o mesmo universo + a linha do topo */
main.dash { background-image:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='760' height='240' viewBox='0 0 760 240'%3E%3Cdefs%3E%3ClinearGradient id='pf' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23020610'/%3E%3Cstop offset='.75' stop-color='%2303101f'/%3E%3Cstop offset='1' stop-color='%230a2a52'/%3E%3C/linearGradient%3E%3ClinearGradient id='rim' gradientUnits='userSpaceOnUse' x1='112' y1='0' x2='430' y2='0'%3E%3Cstop offset='0' stop-color='%23087BFA' stop-opacity='0'/%3E%3Cstop offset='.45' stop-color='%23087BFA' stop-opacity='.75'/%3E%3Cstop offset='.55' stop-color='%233fb0ff'/%3E%3Cstop offset='1' stop-color='%2313C8E8'/%3E%3C/linearGradient%3E%3ClinearGradient id='core' gradientUnits='userSpaceOnUse' x1='112' y1='0' x2='520' y2='0'%3E%3Cstop offset='0' stop-color='%239fdcff' stop-opacity='0'/%3E%3Cstop offset='.4' stop-color='%23b9e6ff' stop-opacity='.7'/%3E%3Cstop offset='.6' stop-color='%23ffffff'/%3E%3Cstop offset='1' stop-color='%23c8f6ff'/%3E%3C/linearGradient%3E%3Cfilter id='b1' x='-30%25' y='-60%25' width='160%25' height='220%25'%3E%3CfeGaussianBlur stdDeviation='16'/%3E%3C/filter%3E%3Cfilter id='b2' x='-30%25' y='-60%25' width='160%25' height='220%25'%3E%3CfeGaussianBlur stdDeviation='4.5'/%3E%3C/filter%3E%3C/defs%3E%3Cpath d='M 110 -10 C 128 80, 220 168, 400 172 C 540 175, 662 112, 790 40' fill='none' stroke='url(%23rim)' stroke-width='70' opacity='.10' filter='url(%23b1)'/%3E%3Cpath d='M 110 -10 C 128 80, 220 168, 400 172 C 540 175, 662 112, 790 40 L 790 -10 Z' fill='url(%23pf)'/%3E%3Cpath d='M 110 -10 C 128 80, 220 168, 400 172 C 540 175, 662 112, 790 40' fill='none' stroke='url(%23rim)' stroke-width='20' opacity='.32' filter='url(%23b1)'/%3E%3Cpath d='M 110 -10 C 128 80, 220 168, 400 172 C 540 175, 662 112, 790 40' fill='none' stroke='url(%23rim)' stroke-width='6' opacity='.55' filter='url(%23b2)'/%3E%3Cpath d='M 110 -10 C 128 80, 220 168, 400 172 C 540 175, 662 112, 790 40' fill='none' stroke='url(%23core)' stroke-width='1.6' opacity='.85' stroke-linecap='round'/%3E%3C/svg%3E"), var(--space-img);
  background-size:760px 240px, var(--space-size);
  background-position:right top calc(var(--top) - 22px), var(--space-pos);
  background-repeat:no-repeat, var(--space-rep);
  background-attachment:fixed, var(--space-att); }
.inbox { background:transparent !important; }
.kbwrap { background:var(--panel); }
.kpi { border-radius:16px; padding:18px 22px; }
.kpi .ic { width:42px; height:42px; border-radius:11px; background:color-mix(in srgb, var(--kc, var(--accent)) 14%, var(--panel)); box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--kc, var(--accent)) 22%, transparent); }
.kpi .ic svg { width:21px; height:21px; }
.kpi .v { font-size:28px; font-weight:700; letter-spacing:-.025em; color:var(--vc, var(--text)); }
.kpi .l { color:var(--muted); font-size:13.5px; font-weight:500; }
.kpi .var { font-size:12px; font-weight:600; color:var(--ok); background:rgba(47,211,154,.08); border-color:rgba(47,211,154,.24); }
.ch2 h2, .cardh h2 { font-size:16px; font-weight:600; } .ch2 p { color:var(--muted); font-size:13px; }
.ch2 .tt > svg, .cardh svg { width:22px; height:22px; color:var(--accent2); }
.chart { background-image:linear-gradient(to top, rgba(26,48,74,.7) 1px, transparent 1px); }
.chart .b { background:linear-gradient(180deg, var(--accent2), var(--accent)); box-shadow:none; border-radius:4px 4px 0 0; }
.chart .b.z { background:var(--line); box-shadow:none; }
.chart .b:hover::after { background:var(--panel); border-color:var(--line); }
.yaxis, .chartx { color:var(--faint); font-size:12px; }
.frow { border-bottom-color:var(--line2); color:var(--text2); font-size:14px; } .frow b { color:var(--text); font-size:15px; }
.fbar { background:var(--surface); } .fbar i { box-shadow:none; }
.shortcuts button { background:var(--surface); border:1px solid var(--line2); color:var(--text2); font-size:14px; font-weight:500; }
.shortcuts button svg { width:20px; height:20px; color:var(--accent2); }
.shortcuts button:hover { background:var(--hover); border-color:var(--line); box-shadow:none; color:var(--text); }
#tab-inicio .phead h1 { font-size:24px; font-weight:700; letter-spacing:-.02em; }

/* ---------- Chats ao vivo: cada área com sua superfície ---------- */
.inbox { background:var(--bg); gap:8px; padding:8px; }
.ibp { border:1px solid var(--line2) !important; box-shadow:var(--shadow); }
.ibFilters { background:#0A1627; }
.ibList { background:var(--panel); }
.ibChat { background:#071120; }
.ibSideWrap, .ibSideWrap.ibp { background:#0B1829; }
.ibph h3 { font-size:15px; font-weight:600; color:var(--text); }
.ibfg { color:var(--faint); font-size:10.5px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; margin:14px 8px 5px; }
.ibf { color:var(--text2); font-size:13px; }
.ibf .ic svg.ico { width:16px; height:16px; color:var(--muted); }
.ibf .ic .kbav svg.ico { width:12px; height:12px; }
.ibf:hover { background:var(--hover); color:var(--text); }
.ibf.on { background:var(--accent-soft); color:var(--text); }
.ibf.on .ic svg.ico { color:var(--accent); }
.ibf .c { color:var(--faint); font-variant-numeric:tabular-nums; }
.ibHead { border-bottom:1px solid var(--line2); }
.ibtabs button { border-color:var(--line2); color:var(--muted); background:transparent; font-weight:500; }
.ibtabs button:hover { color:var(--text); }
.ibtabs button.on { background:var(--surface); border-color:var(--line); color:var(--text); }
.conv { transition:background .12s; }
.conv:hover { background:var(--hover); }
.conv.on { background:rgba(8,123,250,.14); box-shadow:inset 2px 0 0 var(--accent); }
.conv .t b { color:var(--text2); font-weight:500; }
.conv.unread .t b { color:var(--text); font-weight:600; }
.conv .p { color:var(--faint); } .conv.unread .p { color:var(--text2); }
.conv .tm { color:var(--faint); } .conv.unread .tm { color:var(--accent2); }
.conv .lastout svg.ico { width:14px; height:14px; color:var(--faint); vertical-align:-3px; margin-right:2px; }
.conv .cav { box-shadow:inset 0 0 0 1px rgba(255,255,255,.08); }
.conv .cmem { border-color:var(--panel); }
.conv .udot { width:9px; height:9px; background:var(--accent); box-shadow:0 0 0 2px var(--panel); }
.conv .cpin { display:grid; place-items:center; opacity:1; }
.conv .cpin svg.ico { width:13px; height:13px; color:var(--faint); transform:rotate(35deg); }
.conv .cmenu { width:24px; height:24px; color:var(--muted); background:var(--surface); box-shadow:0 0 0 1px var(--line); }
.conv .cmenu svg.ico { width:15px; height:15px; }
.conv .cmenu:hover { background:var(--hover); color:var(--text); }
.chatHead { background:#0B182A; border-bottom:1px solid var(--line2) !important; }
.chwho b { color:var(--text); font-weight:600; }
.chMsgs { background:#071120; background-image:radial-gradient(900px 360px at 100% 0, rgba(8,123,250,.05), transparent 70%); }
.msg { font-size:13.5px; line-height:1.5; box-shadow:0 1px 1px rgba(0,0,0,.25); }
.msg.in { background:#13233A; border:1px solid #1D334E; color:var(--text); }
.msg.out { background:#0E2B4F; border:1px solid #1B4370; color:#E6EEF8; }
.msg.out.human { background:#112E4B; border:1px solid #234766; }
.msg .meta { color:rgba(214,228,245,.62); font-size:10.5px; }
.msg .who { display:flex; align-items:center; gap:5px; font-size:11px; font-weight:600; color:#b7d4f5; }
.msg .who.bot { color:#93e6f3; }
.msg .who svg.ico { width:12px; height:12px; }
.msg .transc svg.ico { width:13px; height:13px; vertical-align:-2px; margin-right:5px; opacity:.8; }
.daysep { background:#0B182A; border-color:var(--line2); color:var(--faint); font-weight:500; }
.plink { color:#5cc6f2; }
#chAuto .btn { font-size:12.5px; }
.composer { background:#0B182A; border-top:1px solid var(--line2) !important; }
.cbox { background:var(--field); border:1px solid var(--line); }
.cbox:focus-within { border-color:var(--accent); box-shadow:0 0 0 3px rgba(8,123,250,.14); }
.cic { color:var(--muted); width:32px; height:32px; }
.cic svg.ico { width:18px; height:18px; }
.cic:hover { background:var(--hover); color:var(--text); }
.cchan { color:var(--text2); font-weight:500; font-size:12.5px; }
.sendsplit .sarrow svg.ico { width:14px; height:14px; }
.ibSide h3 { color:var(--faint); font-size:10.5px; letter-spacing:.08em; }
.schedhd { display:flex; align-items:center; gap:6px; color:var(--accent2); } .schedhd svg.ico { width:14px; height:14px; }
.schedit { border-color:var(--line); } .schedit .ic svg.ico { width:16px; height:16px; color:var(--muted); }
.schedit .btn.ghost { padding:5px 8px; }
.schedbar { border-color:rgba(8,123,250,.45); background:rgba(8,123,250,.09); }
.recbar { background:#1d0d16; border-top-color:var(--line2); }
.mdoc { gap:8px; } .mdoc svg.ico { width:16px; height:16px; }

/* ---------- Kanban ---------- */
.kbwrap { border-radius:16px; }
.kbbar { border-bottom-color:var(--line2); }
.kbboardbtn, .kbmem { background:var(--surface); border-color:var(--line); color:var(--text); }
.kbboardbtn:hover, .kbmem:hover { background:var(--hover); }
.kbmem svg.ico { width:16px; height:16px; color:var(--muted); }
.kbboard { background:var(--bg2); }
.kbcol { background:var(--panel); border-color:var(--line2); }
.kbch { color:var(--text); font-weight:600; font-size:13.5px; }
.kbcount { color:var(--faint); font-weight:500; }
.kbcard { background:var(--surface); border-color:#1C3553; box-shadow:0 1px 2px rgba(0,0,0,.3); }
.kbcard:hover { border-color:#2A4B70; }
.kbname { color:var(--text); font-weight:600; }
.kbdesc { color:var(--muted); }
.kbav.empty { background:var(--surface); border:1px dashed #2A4B70; color:var(--faint); }
.kbav.empty svg.ico { width:12px; height:12px; }
.kbadd { color:var(--faint); } .kbadd:hover { color:var(--text); background:var(--hover); }
.kbplus { border-color:var(--line); color:var(--muted); } .kbplus:hover { border-color:var(--accent); color:var(--text); }
.kbdots { color:var(--faint); } .kbdots:hover { background:var(--hover); color:var(--text); }
.kbside { background:var(--panel); border-left-color:var(--line2); }

/* ---------- Fluxos, etiquetas, tabelas ---------- */
.flnav, .flfolder { color:var(--text2); }
.flnav > span:first-child, .flfolder > span:first-child { display:grid; place-items:center; color:var(--muted); }
.flnav svg.ico, .flfolder svg.ico { width:16px; height:16px; }
.flnav:hover, .flfolder:hover { background:var(--hover); color:var(--text); }
.flnav.on, .flfolder.on { background:var(--accent-soft); color:var(--text); }
.flnav.on svg.ico, .flfolder.on svg.ico { color:var(--accent); }
.flempty .ic { background:var(--surface); color:var(--muted); } .flempty .ic svg.ico { width:19px; height:19px; }
.flfilter { color:var(--text2); font-weight:500; } .flfilter:hover, .flfilter.on { background:var(--surface); border-color:var(--line); }
.flfilter.on { color:var(--text); }
.flname a { color:var(--text); font-weight:600; letter-spacing:.005em; }
.flname a:hover { color:var(--accent2); }
.flfav svg.ico { width:13px; height:13px; color:#ff6b86; fill:#ff6b86; vertical-align:-2px; }
.flfoldtag { display:inline-flex; align-items:center; gap:4px; color:var(--faint); } .flfoldtag svg.ico { width:12px; height:12px; }
.flcon { background:var(--surface); border-color:var(--line); color:var(--accent2); }
.flcon svg.ico { width:13px; height:13px; }
.flrow:hover { background:rgba(8,123,250,.045); } .flrow.sel { background:rgba(8,123,250,.09); }
tr:hover > td { transition:background .1s; }
.tagedit svg.ico { width:14px; height:14px; color:var(--muted); }
.tagedit:hover { background:var(--hover); }
.flbulk { border-color:rgba(8,123,250,.5); background:rgba(8,123,250,.08); }
.codebox, .aiout, .flimp { background:var(--field); border-color:var(--line2); }
.qr { box-shadow:0 0 0 1px var(--line); }
.wadot { box-shadow:none; }
.logo img { filter:none; }
#auth::before { background:radial-gradient(closest-side, rgba(8,123,250,.22), transparent 70%); }

/* barra do composer: nunca passa da caixa */
.cbar { gap:6px; min-width:0; } .cbar .cgrp { gap:2px; min-width:0; }
.cbar .sendsplit { flex:none; } .cbar .sendsplit .btn { padding:0 12px; } .cbar .sendsplit .sarrow { padding:0 7px; }
@media (max-width: 1650px) { .cchan { font-size:0; gap:0; margin-right:2px; } }
/* universo também no fundo da área de mensagens (um pouco mais escuro, para as mensagens ficarem legíveis) */
.ibChat, .chMsgs { background-color:#060f1d;
  background-image:linear-gradient(rgba(6,15,29,.45), rgba(6,15,29,.45)), var(--space-img);
  background-size:auto, var(--space-size); background-position:0 0, var(--space-pos);
  background-repeat:no-repeat, var(--space-rep); background-attachment:fixed, var(--space-att); }


/* ===== seletor de tema no topo (sol / lua) ===== */
.themeseg { display:inline-flex; align-items:center; gap:2px; padding:3px; border-radius:10px; background:var(--field); border:1px solid var(--line2); margin-right:4px; }
.themeseg button { width:30px; height:26px; display:grid; place-items:center; border:0; border-radius:7px; background:transparent; color:var(--faint); cursor:pointer; transition:background .15s, color .15s; }
.themeseg button svg.ico { width:15px; height:15px; }
.themeseg button:hover { color:var(--text); }
.themeseg button.on { background:var(--surface); color:var(--text); box-shadow:0 1px 2px rgba(0,0,0,.25), inset 0 0 0 1px var(--line); }

/* =====================================================================
   TEMA CLARO — mesma estrutura, superfícies brancas e cinza-claro
   ===================================================================== */
html.light {
  --bg:#F3F5F9; --inner:#F3F5F9; --bg2:#FFFFFF; --panel:#FFFFFF; --panel2:#F4F7FB; --surface:#F4F7FB; --hover:#EEF3F9;
  --field:#FFFFFF; --line:#E1E7EF; --line2:#E8EDF3; --div:#E6EBF1;
  --text:#0F1B2D; --text2:#334155; --muted:#64748B; --faint:#94A3B8;
  --accent-soft:rgba(8,123,250,.09); --shadow:0 1px 2px rgba(16,24,40,.05), 0 4px 16px rgba(16,24,40,.05);
  color-scheme:light;
}
html.light, html.light body { background:var(--bg); }
html.light main, html.light main.dash, html.light .ibChat, html.light .chMsgs {
  background:#F3F5F9 radial-gradient(circle at 1px 1px, rgba(100,116,139,.13) 1px, transparent 1.4px) 0 0 / 24px 24px fixed; }
html.light main.dash { background-image:radial-gradient(900px 420px at 95% -5%, rgba(8,123,250,.07), transparent 65%), radial-gradient(circle at 1px 1px, rgba(100,116,139,.13) 1px, transparent 1.4px);
  background-size:auto, 24px 24px; background-attachment:fixed, fixed; }
html.light ::-webkit-scrollbar-thumb { background:#CBD5E1; background-clip:padding-box; }
html.light ::-webkit-scrollbar-thumb:hover { background:#94A3B8; background-clip:padding-box; }
html.light ::selection { background:rgba(8,123,250,.2); }
/* moldura */
html.light .topbar { background:#FFFFFF; border-bottom-color:var(--div); }
html.light #side { background:#FFFFFF; border-right-color:var(--div); }
html.light #side nav button:hover { color:var(--text); }
html.light #side nav button.on { background:rgba(8,123,250,.09); color:#0B5FD6; box-shadow:inset 2px 0 0 var(--accent); }
html.light #side nav button.on i, html.light #side nav button.on i svg { color:var(--accent); }
html.light .collapse:hover, html.light .tbicon:hover { background:var(--hover); color:var(--text); }
html.light .tbmenu, html.light .kbmenu, html.light .ctxm, html.light .pop, html.light #flMenu, html.light .rpop { box-shadow:0 12px 32px rgba(16,24,40,.12); }
html.light .modal { background:rgba(15,23,42,.35); }
html.light .modalbox { box-shadow:0 24px 60px rgba(16,24,40,.18); }
html.light .tbchip.bad { color:#d6334f; }
html.light .themeseg button.on { background:#FFFFFF; box-shadow:0 1px 2px rgba(16,24,40,.12), inset 0 0 0 1px var(--line); }
/* textos que eram brancos fixos */
html.light .seg button.on, html.light .subnav button:hover, html.light .subnav button.on, html.light .flnav.on, html.light .flfolder.on,
html.light .ibtabs button.on, html.light .conv.unread .t b, html.light .cic:hover, html.light .chips button.on { color:var(--text); }
html.light .subnav button.on, html.light .flnav.on, html.light .flfolder.on { color:#0B5FD6; }
html.light .st-active { color:#0B5FD6; }
html.light .btn.ghost:hover, html.light .iconbtn:hover, html.light .ibtn:hover { border-color:#CBD5E1; }
html.light .seg button.on { background:#FFFFFF; box-shadow:0 1px 2px rgba(16,24,40,.1), inset 0 0 0 1px var(--line); }
html.light .company .cav, html.light .av, html.light .kbav, html.light .conv .cav { color:#fff; }
html.light .codebox { color:#0B5FD6; }
html.light .plink { color:#0B6BD6; }
html.light .alert { background:#FFF8EB; border-color:#F5D9A0; color:#7A5200; }
html.light .warnbox { background:#FFF8EB; border-color:#F5D9A0; color:#7A5200; }
/* dashboard */
html.light .chart { background-image:linear-gradient(to top, #E6EBF1 1px, transparent 1px); }
html.light .chart .b.z { background:#E2E8F0; }
html.light .kpi .var { color:#059669; background:rgba(5,150,105,.08); border-color:rgba(5,150,105,.2); }
/* chat ao vivo */
html.light .ibFilters, html.light .ibList, html.light .ibSideWrap, html.light .ibSideWrap.ibp { background:#FFFFFF; }
html.light .chatHead, html.light .composer, html.light .daysep { background:#FFFFFF; }
html.light .conv.on { background:rgba(8,123,250,.08); }
html.light .conv .udot { box-shadow:0 0 0 2px #fff; }
html.light .msg { box-shadow:0 1px 1px rgba(16,24,40,.06); }
html.light .msg.in { background:#FFFFFF; border-color:#E1E7EF; color:var(--text); }
html.light .msg.out { background:#E4EFFE; border-color:#C8DCFA; color:#0F1B2D; }
html.light .msg.out.human { background:#EEF4FB; border-color:#D6E2F0; }
html.light .msg .meta { color:#64748B; }
html.light .msg .who { color:#1D4ED8; } html.light .msg .who.bot { color:#0E7490; }
html.light .recbar { background:#FFF1F3; }
html.light .cbox { background:#FFFFFF; }
/* kanban */
html.light .kbboard { background:#F3F5F9; }
html.light .kbcol { background:#EEF2F7; border-color:#E3E9F0; }
html.light .kbcard { background:#FFFFFF; border-color:var(--line); box-shadow:0 1px 2px rgba(16,24,40,.06); }
html.light .kbcard:hover { border-color:#CBD5E1; }
html.light .kbav.empty { border-color:#CBD5E1; background:#F8FAFC; }
html.light .kbcolph { background:rgba(8,123,250,.05); }
/* login */
html.light #auth { background:#F3F5F9; }

/* barra lateral: letras mais encorpadas (inspiração Leona) */
#side nav button { font-size:14.5px; font-weight:600; letter-spacing:-.01em; color:var(--text2); }
#side nav button.on { font-weight:700; }
#side nav button i svg, #side nav button svg.ico { stroke-width:2; width:19px; height:19px; }
#side nav .grp { font-weight:700; font-size:11px; letter-spacing:.07em; }
html.light #side nav button { color:#1E293B; }
html.light #side nav button i, html.light #side nav button i svg { color:#334155; }
html.light #side nav button.on, html.light #side nav button.on i, html.light #side nav button.on i svg { color:#0B5FD6; }
html.light #side nav .grp { color:#64748B; }

/* tema claro: menu lateral em cinza-escuro suave (não preto) */
html.light #side nav button { color:#3F4A5A; }
html.light #side nav button i, html.light #side nav button i svg { color:#566173; }
html.light #side nav button:hover { color:#1F2937; }
html.light #side nav .grp { color:#8A94A6; }
/* tema claro: cards com borda azul brilhante suave */
html.light .card, html.light .kpi, html.light .ibp, html.light .kbwrap, html.light .fltable, html.light .flside, html.light .subnav, html.light .modalbox {
  border:1px solid rgba(8,123,250,.30) !important;
  box-shadow:0 0 0 3px rgba(8,123,250,.05), 0 4px 18px rgba(8,123,250,.10), 0 1px 2px rgba(16,24,40,.04) !important; }
html.light .card:hover, html.light .kpi:hover { border-color:rgba(8,123,250,.5) !important;
  box-shadow:0 0 0 3px rgba(8,123,250,.08), 0 6px 24px rgba(8,123,250,.16), 0 1px 2px rgba(16,24,40,.04) !important; }
html.light .kpi, html.light .card { transition:box-shadow .2s, border-color .2s; }

/* rascunho de anexos na caixa de mensagem */
.draftbar { display:flex; flex-wrap:wrap; align-items:flex-end; gap:8px; padding:4px 2px 8px; border-bottom:1px solid var(--line2); margin-bottom:6px; }
.draft { position:relative; border:1px solid var(--line); border-radius:10px; background:var(--surface); padding:6px; display:flex; align-items:center; }
.draft img, .draft video { display:block; height:84px; max-width:150px; object-fit:cover; border-radius:7px; background:#000; }
.draft.k-audio { padding:4px 30px 4px 4px; } .draft audio { height:36px; width:260px; }
.draft .dfile { display:flex; align-items:center; gap:7px; padding:6px 28px 6px 6px; font-size:12.5px; color:var(--text2); max-width:220px; }
.draft .dfile span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } .draft .dfile svg.ico { width:18px; height:18px; color:var(--accent2); flex:none; }
.draft .dx { position:absolute; top:-7px; right:-7px; width:22px; height:22px; border-radius:50%; border:1px solid var(--line); background:var(--panel); color:var(--muted); display:grid; place-items:center; cursor:pointer; padding:0; }
.draft .dx:hover { color:var(--danger); border-color:var(--danger); } .draft .dx svg.ico { width:12px; height:12px; }
.draft.k-audio .dx, .draft:has(.dfile) .dx { top:50%; right:6px; transform:translateY(-50%); }
.dhint { flex-basis:100%; font-size:11.5px; color:var(--faint); }
#btnRecSend svg.ico { width:14px; height:14px; }
/* Kanban: colunas e cartões mais destacados do fundo */
.kbcol { background:#0B1729; border-color:#203A59; }
.kbcard { background:#10223A; border-color:#264565; }
.kbcard:hover { border-color:#33597F; }
html.light .kbboard { background:#F3F5F9; }
html.light .kbcol { background:#E6EBF2; border-color:#C9D3DF; }
html.light .kbcard { background:#FFFFFF; border-color:#C5D0DD; box-shadow:0 1px 3px rgba(16,24,40,.08); }
html.light .kbcard:hover { border-color:#9FB2C8; }

/* mensagens agendadas: reloginho na caixa + tela própria (estilo BotConversa) */
.ibChat { position:relative; }
.cic.schedbtn { position:relative; }
.schdot { position:absolute; top:5px; right:5px; width:8px; height:8px; border-radius:50%; background:#ff4d6a; box-shadow:0 0 0 2px var(--field); }
.schedpanel { position:absolute; inset:0; z-index:5; display:flex; flex-direction:column; background:var(--panel); border-radius:inherit; }
.schedpanel.hidden { display:none; }
.sphead { display:flex; align-items:center; gap:10px; padding:14px 16px; border-bottom:1px solid var(--line2); }
.sphead b { font-size:15px; font-weight:600; }
.spback { width:30px; height:30px; display:grid; place-items:center; border:0; border-radius:8px; background:transparent; color:var(--muted); cursor:pointer; }
.spback:hover { background:var(--hover); color:var(--text); } .spback svg.ico { width:18px; height:18px; transform:rotate(90deg); }
.spbody { flex:1; overflow:auto; padding:16px 18px; display:flex; flex-direction:column; gap:10px; }
.spday { align-self:center; font-size:12px; font-weight:600; color:var(--muted); margin:6px 0 2px; }
.spmsg { position:relative; align-self:flex-end; max-width:72%; background:var(--surface); border:1px solid var(--line); border-radius:12px 12px 4px 12px; padding:8px 12px 6px; }
.spmsg.fail { border-color:rgba(255,90,114,.45); }
.spwho { font-size:11.5px; font-weight:600; color:var(--accent2); margin-bottom:2px; }
.sptx { font-size:13.5px; color:var(--text); white-space:pre-wrap; word-break:break-word; }
.spmedia { display:flex; align-items:center; gap:7px; font-size:13px; color:var(--text2); } .spmedia svg.ico { width:16px; height:16px; color:var(--accent2); }
.sperr { font-size:11.5px; color:var(--danger); margin-top:3px; }
.spmeta { display:flex; align-items:center; justify-content:flex-end; gap:4px; font-size:11px; color:var(--faint); margin-top:3px; } .spmeta svg.ico { width:11px; height:11px; }
.spact { position:absolute; top:50%; right:calc(100% + 6px); transform:translateY(-50%); display:flex; gap:2px; opacity:0; transition:opacity .12s; }
.spmsg:hover .spact { opacity:1; }
.spact button { width:28px; height:28px; display:grid; place-items:center; border:1px solid var(--line); border-radius:8px; background:var(--panel); color:var(--muted); cursor:pointer; }
.spact button:hover { color:var(--text); background:var(--hover); } .spact button.del:hover { color:var(--danger); }
.spact svg.ico { width:14px; height:14px; }
.spempty { margin:auto; display:flex; flex-direction:column; align-items:center; gap:6px; color:var(--muted); text-align:center; font-size:13px; }
.spempty svg.ico { width:28px; height:28px; color:var(--faint); } .spempty b { color:var(--text2); font-weight:600; }
.spfoot { padding:10px 12px 12px; border-top:1px solid var(--line2); }
.spbox { border:1px solid var(--accent); border-radius:12px; background:var(--field); padding:8px 10px; }
.spbox textarea { width:100%; border:0; background:transparent; resize:none; box-shadow:none !important; padding:2px; color:var(--text); font:inherit; font-size:13.5px; }
.spbar { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:4px; }
.spbar .btn svg.ico { width:14px; height:14px; }

/* Piloto manual (perfil do lead) */
.pm { border:1px solid var(--line); border-radius:12px; background:var(--surface); margin:4px 0 6px; overflow:hidden; }
.pmhd { display:flex; align-items:center; gap:9px; width:100%; padding:10px 12px; background:transparent; border:0; color:var(--text); cursor:pointer; font:inherit; text-align:left; }
.pmhd b { font-size:13.5px; font-weight:600; flex:1; }
.pmic { width:26px; height:26px; border-radius:8px; display:grid; place-items:center; background:rgba(245,177,61,.14); color:#f5b13d; } .pmic svg.ico { width:15px; height:15px; }
.pmcnt { font-size:11px; color:var(--faint); font-weight:600; }
.pmchev { width:16px !important; height:16px !important; color:var(--muted); transition:transform .15s; }
.pm.open .pmchev { transform:rotate(180deg); }
.pmbody { display:none; padding:0 8px 8px; border-top:1px solid var(--line2); }
.pm.open .pmbody { display:block; }
.pmrow { display:flex; align-items:center; gap:6px; padding:7px 6px; margin-top:6px; border-radius:9px; background:var(--panel); border:1px solid var(--line2); cursor:grab; }
.pmrow.drag { opacity:.4; } .pmrow.before { box-shadow:0 -2px 0 var(--accent); } .pmrow.after { box-shadow:0 2px 0 var(--accent); }
.pmi { width:24px; height:24px; flex:none; display:grid; place-items:center; color:#f5b13d; } .pmi svg.ico { width:17px; height:17px; }
.pmrow.t-mic .pmi, .pmrow.t-video .pmi { color:var(--accent2); }
.pmn { flex:1; min-width:0; font-size:13px; font-weight:600; color:#f5c66a; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; display:flex; flex-direction:column; }
.pmrow.t-mic .pmn, .pmrow.t-video .pmn { color:#52d4ee; }
.pmn small { display:flex; align-items:center; gap:3px; font-size:10.5px; font-weight:500; color:var(--ok); } .pmn small svg.ico { width:11px; height:11px; }
.pmrow button { width:28px; height:28px; flex:none; display:grid; place-items:center; border:0; border-radius:7px; background:transparent; color:var(--muted); cursor:pointer; padding:0; }
.pmrow button:hover { background:var(--hover); color:var(--text); }
.pmrow button.go { color:var(--accent); } .pmrow button svg.ico { width:16px; height:16px; }
.pmrow button.ex.on svg.ico { transform:rotate(180deg); }
.pmitems { margin:4px 4px 2px 34px; display:flex; flex-direction:column; gap:4px; font-size:12px; color:var(--text2); }
.pmitems div { display:flex; align-items:center; gap:6px; min-width:0; } .pmitems span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pmitems svg.ico { width:13px; height:13px; color:var(--faint); flex:none; }
.pmhint { font-size:11px; color:var(--faint); margin:8px 4px 0; }
.pmempty { display:flex; flex-direction:column; gap:8px; align-items:flex-start; font-size:12px; color:var(--muted); padding:8px 4px 2px; line-height:1.5; }
html.light .pmn { color:#B7791F; } html.light .pmrow.t-mic .pmn, html.light .pmrow.t-video .pmn { color:#0E7490; }

/* Piloto manual: confirmação de envio (estilo Zap Voice) */
.pmmodal { position:fixed; inset:0; z-index:9998; background:rgba(2,6,12,.6); backdrop-filter:blur(2px); display:grid; place-items:center; }
.pmbox { width:min(460px, 94vw); background:var(--panel); border:1px solid var(--line); border-radius:16px; padding:22px 24px 20px; box-shadow:0 24px 64px rgba(0,0,0,.55); }
.pmbox h3 { display:flex; align-items:center; gap:10px; font-size:17px; font-weight:600; margin:0 0 14px; }
.pmbox h3 svg.ico { width:22px; height:22px; color:var(--accent2); }
.pmline { display:flex; align-items:center; gap:12px; padding:11px 2px; border-bottom:1px solid var(--line2); font-size:13.5px; }
.pmline > span { display:flex; align-items:center; gap:9px; width:140px; color:var(--muted); font-weight:500; flex:none; }
.pmline > span svg.ico { width:15px; height:15px; color:var(--faint); }
.pmline b { display:flex; align-items:center; gap:8px; font-weight:500; color:var(--text); min-width:0; }
.pmline .kbav { width:26px; height:26px; font-size:10px; }
.pmknow { margin-top:14px; border:1px solid var(--line); border-radius:10px; }
.pmknow summary { list-style:none; display:flex; align-items:center; gap:10px; padding:12px 14px; cursor:pointer; font-weight:600; font-size:13.5px; }
.pmknow summary::-webkit-details-marker { display:none; }
.pmknow summary svg.ico { width:17px; height:17px; color:var(--warn); }
.pmknow summary .kchev { margin-left:auto; color:var(--muted); transition:transform .15s; } .pmknow[open] summary .kchev { transform:rotate(180deg); }
.pmknow ul { margin:0; padding:0 16px 12px 36px; font-size:12.5px; color:var(--text2); display:flex; flex-direction:column; gap:5px; }
.pmbtns { display:flex; justify-content:flex-end; gap:10px; margin-top:18px; }
/* bolinha amarela girando enquanto envia */
.pmfab { position:absolute; top:76px; left:14px; z-index:4; width:46px; height:46px; border-radius:50%; border:0; padding:0; cursor:pointer;
  background:radial-gradient(circle at 35% 30%, #f7d36a, #c9961a); color:#3a2a00; display:grid; place-items:center; box-shadow:0 4px 18px rgba(245,177,61,.35); }
.pmfab.hidden { display:none; }
.pmfab > svg.ico, .pmfab i svg { width:20px; height:20px; position:relative; z-index:1; }
.pmfab .ring { position:absolute; inset:-5px; width:56px; height:56px; transform:rotate(-90deg); }
.pmfab .ring circle { fill:none; stroke-width:3; }
.pmfab .ring .trk { stroke:rgba(245,177,61,.18); }
.pmfab .ring .bar { stroke:#13C8E8; stroke-linecap:round; stroke-dasharray:119.4; stroke-dashoffset:119.4; transition:stroke-dashoffset .9s linear; }
.pmfab:not(.done) .ring { animation:pmspin 2.4s linear infinite; }
.pmfab:not(.done) .ring .bar { stroke-dasharray:30 89.4; transition:none; }
.pmfab.done { background:radial-gradient(circle at 35% 30%, #4ee0a6, #13a36e); color:#032; box-shadow:0 4px 18px rgba(47,211,154,.35); }
.pmfab.done .ring .bar { stroke:#2fd39a; }
@keyframes pmspin { from { transform:rotate(-90deg); } to { transform:rotate(270deg); } }
/* painel lateral com o progresso */
.pmprog { display:flex; flex-direction:column; gap:12px; }
.pmback { align-self:flex-start; display:flex; align-items:center; gap:4px; background:none; border:0; color:var(--muted); cursor:pointer; font:inherit; font-size:12.5px; padding:2px 0; }
.pmback:hover { color:var(--text); } .pmback svg.ico { width:15px; height:15px; transform:rotate(90deg); }
.pmph { display:flex; align-items:center; gap:10px; } .pmph small { display:block; font-size:11px; color:var(--muted); text-transform:uppercase; letter-spacing:.06em; font-weight:600; } .pmph b { font-size:15px; }
.pmbar { height:8px; border-radius:99px; background:var(--surface); overflow:hidden; border:1px solid var(--line2); }
.pmbar i { display:block; height:100%; background:linear-gradient(90deg, #f5b13d, #13C8E8); border-radius:99px; transition:width .9s linear; }
.pmmeta { display:flex; justify-content:space-between; font-size:12px; color:var(--muted); font-variant-numeric:tabular-nums; }
.pmsteps { display:flex; flex-direction:column; gap:2px; max-height:calc(100vh - 360px); overflow:auto; }
.pmstep { display:flex; align-items:center; gap:8px; padding:7px 6px; border-radius:8px; font-size:12.5px; color:var(--text2); }
.pmstep.s-sending { background:rgba(19,200,232,.08); color:var(--text); }
.pmstep.s-wait { color:var(--faint); }
.pmstep .ti svg.ico { width:14px; height:14px; color:var(--muted); }
.pmstep .tl { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pst { width:18px; height:18px; flex:none; display:grid; place-items:center; border-radius:50%; }
.pst svg.ico { width:12px; height:12px; }
.pst.ok { background:rgba(47,211,154,.16); color:var(--ok); } .pst.err { background:rgba(255,90,114,.16); color:var(--danger); }
.pst.wait { color:var(--faint); } .pst.skip { color:var(--faint); }
.pst.spin { border:2px solid rgba(19,200,232,.25); border-top-color:var(--accent2); animation:pmspin2 .8s linear infinite; }
@keyframes pmspin2 { to { transform:rotate(360deg); } }
.pmstop { align-self:flex-start; }
html.light .pmmodal { background:rgba(15,23,42,.35); }

/* adicionar etiqueta (perfil do lead) */
.tagpickbtn { display:flex; align-items:center; gap:8px; width:100%; margin-top:8px; padding:9px 12px; border-radius:10px; border:1px solid var(--line); background:var(--field); color:var(--text2); font:inherit; font-size:13px; cursor:pointer; text-align:left; }
.tagpickbtn span { flex:1; } .tagpickbtn:hover { border-color:var(--accent); color:var(--text); }
.tagpickbtn svg.ico { width:15px; height:15px; color:var(--muted); } .tagpickbtn .chev { margin:0; }
.tagpick { position:fixed; z-index:9999; background:var(--panel); border:1px solid var(--line); border-radius:12px; box-shadow:0 16px 44px rgba(0,0,0,.5); padding:8px; }
.tpsearch { display:flex; align-items:center; gap:7px; padding:0 9px; border:1px solid var(--line2); border-radius:9px; background:var(--field); margin-bottom:6px; }
.tpsearch:focus-within { border-color:var(--accent); } .tpsearch svg.ico { width:14px; height:14px; color:var(--faint); }
.tpsearch input { border:0 !important; background:transparent !important; box-shadow:none !important; padding:8px 0; width:100%; font-size:13px; }
.tplist { display:flex; flex-direction:column; gap:2px; max-height:260px; overflow:auto; }
.tplist button { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:7px 8px; border:0; border-radius:8px; background:transparent; cursor:pointer; color:var(--text2); font:inherit; font-size:13px; text-align:left; }
.tplist button:hover { background:var(--hover); }
.tplist small { color:var(--faint); font-size:11px; }
.tplist .tpnew { justify-content:flex-start; color:var(--accent2); } .tplist .tpnew svg.ico { width:14px; height:14px; }
.tpempty { font-size:12px; color:var(--faint); padding:8px; }
html.light .tagpick { box-shadow:0 12px 32px rgba(16,24,40,.14); }

/* Anotações (perfil do lead) */
.nt { border:1px solid var(--line); border-radius:12px; background:var(--surface); margin:4px 0 6px; overflow:hidden; }
.nt.open .pmchev { transform:rotate(180deg); }
.nt .pmbody { display:none; padding:8px; }
.nt.open .pmbody { display:block; }
.pmic.nti { background:rgba(139,125,255,.15); color:#a99cff; }
.nt textarea { width:100%; resize:vertical; min-height:56px; font-size:13px; }
.ntbar { display:flex; align-items:center; justify-content:space-between; gap:8px; margin:6px 0 4px; }
.ntitem { margin-top:8px; padding:9px 10px; border-radius:9px; background:var(--panel); border:1px solid var(--line2); border-left:3px solid #8b7dff; }
.nttx { font-size:13px; color:var(--text); white-space:pre-wrap; word-break:break-word; }
.ntmeta { display:flex; align-items:center; justify-content:space-between; gap:6px; margin-top:5px; font-size:11px; color:var(--faint); }
.ntact { display:flex; gap:2px; opacity:0; transition:opacity .12s; } .ntitem:hover .ntact { opacity:1; }
.ntact button { width:24px; height:24px; display:grid; place-items:center; border:0; border-radius:6px; background:transparent; color:var(--muted); cursor:pointer; padding:0; }
.ntact button:hover { background:var(--hover); color:var(--text); } .ntact svg.ico { width:13px; height:13px; }
.ntitem textarea { width:100%; font-size:13px; }

/* automação do lead (perfil) */
.autobtn { display:flex; align-items:center; gap:8px; width:100%; padding:10px 12px; margin:4px 0 8px; border-radius:10px; border:1px solid; font:inherit; font-size:13.5px; font-weight:600; cursor:pointer; text-align:left; }
.autobtn small { font-weight:500; font-size:11px; opacity:.8; margin-left:2px; }
.autobtn .chev { margin-left:auto !important; }
.autobtn svg.ico { width:16px; height:16px; flex:none; }
.autobtn.off { background:rgba(229,72,77,.12); border-color:rgba(229,72,77,.45); color:#ff6b7d; }
.autobtn.on { background:rgba(47,211,154,.10); border-color:rgba(47,211,154,.4); color:#38d9a0; }
.autobtn:hover { filter:brightness(1.12); }
.automenu { position:fixed; z-index:9999; background:var(--panel); border:1px solid var(--line); border-radius:12px; padding:6px; box-shadow:0 16px 44px rgba(0,0,0,.5); display:flex; flex-direction:column; max-height:70vh; overflow:auto; }
.automenu button { display:flex; align-items:center; gap:9px; background:none; border:0; color:var(--text2); text-align:left; padding:9px 10px; border-radius:8px; font:inherit; font-size:13.5px; cursor:pointer; }
.automenu button:hover { background:var(--hover); color:var(--text); }
.automenu button svg.ico { width:15px; height:15px; color:var(--ok); }
.automenu .amg { font-size:11px; color:var(--faint); font-weight:600; letter-spacing:.04em; padding:10px 10px 4px; border-top:1px solid var(--line2); margin-top:4px; }
.automenu button:first-child + .amg, .automenu .amg:first-child { border-top:0; margin-top:0; }
.automenu .amcustom span { margin-left:auto; } .automenu .amcustom span svg.ico { color:var(--muted); transform:rotate(-90deg); }
html.light .autobtn.off { color:#d0313f; } html.light .autobtn.on { color:#0f9f6e; }
/* seletor WhatsApp / Notas na caixa de mensagem */
button.cchan { background:none; border:0; cursor:pointer; font:inherit; display:flex; align-items:center; gap:6px; padding:4px 6px; border-radius:7px; }
button.cchan:hover { background:var(--hover); }
button.cchan .chev { width:13px !important; height:13px !important; }
.notedot { width:18px; height:18px; border-radius:50%; display:grid; place-items:center; background:#f5b13d; color:#2a1d00; }
.notedot svg.ico { width:11px; height:11px; }
.composer.notemode .cbox { background:rgba(245,177,61,.10); border-color:rgba(245,177,61,.55); }
.composer.notemode .cbox:focus-within { box-shadow:0 0 0 3px rgba(245,177,61,.15); }
.composer.notemode #btnSend { background:#d9951c; } .composer.notemode #btnSend:hover { background:#eaa52a; }
.composer.notemode .sarrow, .composer.notemode #btnMic, .composer.notemode #btnSchedList, .composer.notemode .cic[title^="Anexar arquivo"], .composer.notemode .cic[title="Respostas rápidas"] { display:none; }
.composer.notemode #btnSend { border-radius:var(--r-md) !important; }
/* nota na conversa */
.msg.note { align-self:flex-end; background:rgba(245,177,61,.12); border:1px solid rgba(245,177,61,.45); color:var(--text); }
.msg.note .who { color:#f5b13d; } .msg.note .meta { color:rgba(245,177,61,.75); }
html.light .msg.note { background:#FFF6E3; border-color:#F2CC7A; } html.light .msg.note .who { color:#B7791F; } html.light .msg.note .meta { color:#B7791F; }
/* linha "Notas" no perfil e painel */
.ntrow { display:flex; align-items:center; gap:9px; width:100%; padding:10px 12px; margin:4px 0 6px; border:1px solid var(--line); border-radius:12px; background:var(--surface); color:var(--text); font:inherit; cursor:pointer; text-align:left; }
.ntrow b { flex:1; font-size:13.5px; font-weight:600; } .ntrow:hover { border-color:#8b7dff; }
.ntrow .ntchev { width:16px !important; height:16px !important; color:var(--muted); transform:rotate(-90deg); }
.ntpanel { display:flex; flex-direction:column; gap:8px; }
.nthead { display:flex; align-items:center; gap:8px; margin-bottom:4px; } .nthead b { font-size:15px; font-weight:600; flex:1; }
.nthead .pmback svg.ico { transform:rotate(90deg); }
.ntpanel textarea { width:100%; resize:vertical; min-height:56px; font-size:13px; }
.ntwho { display:flex; align-items:center; gap:8px; } .ntwho > div { flex:1; display:flex; flex-direction:column; line-height:1.25; }
.ntwho b { font-size:12.5px; } .ntwho small { font-size:11px; color:var(--faint); } .ntwho .kbav { width:24px; height:24px; font-size:10px; }
.ntpanel .nttx { margin-top:6px; }

/* automação pausada: só o nome em vermelho */
.conv .t b.paused, .conv.unread .t b.paused, td .paused { color:#ff5a6e !important; }
html.light .conv .t b.paused, html.light td .paused { color:#d0313f !important; }

/* rastreio: modelo pronto e acompanhamento periódico */
.tplbox { display:flex; align-items:center; gap:16px; padding:14px 16px; margin:12px 0 18px; border-radius:12px; border:1px solid rgba(8,123,250,.35); background:rgba(8,123,250,.07); }
.tplbox > div { flex:1; display:flex; flex-direction:column; gap:3px; } .tplbox b { font-size:14px; } .tplbox span { font-size:12.5px; color:var(--muted); }
.tplbox .btn { flex:none; } .tplbox .btn svg.ico { width:15px; height:15px; }
.perdays { display:flex; gap:6px; flex-wrap:wrap; margin-top:10px; }
.perday { position:relative; margin:0; cursor:pointer; }
.perday input { position:absolute; opacity:0; pointer-events:none; }
.perday span { display:grid; place-items:center; width:46px; height:34px; border-radius:9px; border:1px solid var(--line); background:var(--field); color:var(--muted); font-size:13px; font-weight:600; transition:all .12s; }
.perday input:checked + span { background:var(--accent-soft); border-color:var(--accent); color:var(--text); }

.pxrow{border:1px solid var(--line);border-radius:12px;padding:12px 14px;margin:10px 0;background:rgba(255,255,255,.02)}

/* Dashboard estilo Leona */
.dfilt{padding:16px 18px}.dfilt .cardh{margin-bottom:8px}
.dfic{width:30px;height:30px;border-radius:8px;display:grid;place-items:center;background:#2563eb;color:#fff}.dfic svg{width:16px;height:16px}
.dfrow{display:grid;grid-template-columns:auto minmax(220px,1fr) auto;gap:16px;align-items:end}
.dfrow select{width:100%}.dfend{display:flex;justify-content:flex-end}
.dbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:12px 0 4px;flex-wrap:wrap}
.dbar .btn svg{width:14px;height:14px;margin-right:6px;vertical-align:-2px}
select.mini{padding:4px 8px;min-width:76px}
.kwarn{color:var(--warn);font-weight:600}
.curpill{display:inline-block;padding:2px 8px;border-radius:999px;font-size:11px;font-weight:700;color:#34d399;background:rgba(22,199,132,.12);border:1px solid rgba(22,199,132,.35)}
.mono{font-family:ui-monospace,Menlo,monospace;font-size:11px}
@media (max-width:760px){.dfrow{grid-template-columns:1fr}}
.fbpill{background:rgba(251,191,36,.12)!important;color:#fbbf24!important;border:1px solid rgba(251,191,36,.4)!important;font-size:10px!important}
#prList .tagedit{opacity:1!important;visibility:visible!important}
.opgrid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:6px}
.opcard{display:flex;flex-direction:column;gap:4px;text-align:left;padding:14px;border-radius:12px;border:1px solid var(--line);background:rgba(255,255,255,.02);color:var(--text);cursor:pointer}
.opcard span{font-size:12px;color:var(--muted)}.opcard:hover{border-color:var(--accent)}.opcard.on{border-color:var(--accent);background:rgba(8,120,249,.12)}
.opcard:last-child:nth-child(odd){grid-column:1/-1}
#opBtn svg{width:14px;height:14px;margin-right:6px;vertical-align:-2px}
.pill.cod-scheduled{color:#38bdf8;background:rgba(56,189,248,.12)}.pill.cod-delivered{color:#a78bfa;background:rgba(167,139,250,.12)}
.pill.cod-received{color:#16e0a0;background:rgba(22,224,160,.12)}.pill.cod-frustrated{color:#ff4d6a;background:rgba(255,77,106,.12)}

/* =====================================================================
   ACABAMENTO PROFISSIONAL (paleta grafite neutra, letras mais leves)
   Só cores/tons/peso de letra — nada muda de lugar.
   ===================================================================== */
html:not(.light) {
  --bg:#07090D; --inner:#07090D; --bg2:#0A0D12;
  --panel:#0E1218; --panel2:#121821; --surface:#121821; --hover:#151C26; --field:#0A0E14;
  --line:rgba(255,255,255,.075); --line2:rgba(255,255,255,.06); --div:rgba(255,255,255,.06);
  --text:#E6E9EE; --text2:#A9B2BF; --muted:#7D8796; --faint:#5E6876;
  --accent:#3B82F6; --accent2:#60A5FA; --accent-soft:rgba(59,130,246,.12);
  --ok:#22C55E; --warn:#F59E0B; --danger:#EF4444; --blue:#60A5FA; --violet:#8B5CF6;
  --shadow:0 1px 0 rgba(255,255,255,.03) inset, 0 1px 2px rgba(0,0,0,.4);
}
body { font-family:"Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; letter-spacing:-.006em; }
html:not(.light) main, html:not(.light) main.dash { background-color:#07090D; }
h1 { font-weight:650; letter-spacing:-.02em; } h2 { font-weight:600; }
.logo span { color:var(--accent2); }

/* barra lateral: cinza suave, só o ativo em destaque */
html:not(.light) #side { background:var(--bg2) !important; border-right:1px solid var(--line2) !important; }
#side nav button { font-weight:500 !important; font-size:13.5px !important; }
html:not(.light) #side nav button { color:#9AA3AF !important; }
html:not(.light) #side nav button i, html:not(.light) #side nav button svg { color:#7D8796 !important; }
html:not(.light) #side nav button:hover { background:rgba(255,255,255,.04) !important; color:var(--text) !important; }
html:not(.light) #side nav button.on { background:rgba(59,130,246,.12) !important; color:var(--text) !important; font-weight:600 !important; box-shadow:inset 2px 0 0 var(--accent) !important; }
html:not(.light) #side nav button.on i, html:not(.light) #side nav button.on svg { color:var(--accent2) !important; }
#side .grp { font-weight:600 !important; font-size:11px !important; letter-spacing:.08em !important; }
html:not(.light) #side .grp { color:var(--faint) !important; }
html:not(.light) header, html:not(.light) .topbar { background:var(--bg2) !important; border-color:var(--line2) !important; }

/* cartões e superfícies */
html:not(.light) .card, html:not(.light) .kpi, html:not(.light) .kbwrap, html:not(.light) .fltable, html:not(.light) .flside, html:not(.light) .subnav, html:not(.light) .modalbox, html:not(.light) .authbox {
  background:var(--panel) !important; border:1px solid var(--line) !important; box-shadow:var(--shadow) !important; }

/* números neutros: a cor fica só para subir/cair */
.kpi .v { color:var(--text) !important; font-weight:650 !important; font-size:28px !important; letter-spacing:-.02em; }
.kpi .l { color:var(--muted) !important; font-size:13.5px !important; }
.kpi .ic { width:38px !important; height:38px !important; background:color-mix(in srgb, var(--text) 5%, transparent) !important; box-shadow:inset 0 0 0 1px var(--line) !important; color:var(--text2) !important; }
.kpi .ic svg { width:19px !important; height:19px !important; }
.kpi .var { color:#16A34A !important; background:rgba(34,197,94,.08) !important; border-color:rgba(34,197,94,.22) !important; font-weight:600 !important; font-size:12px !important; }
html:not(.light) .kpi .var { color:#4ADE80 !important; }
.kpi .var.down { color:#EF4444 !important; background:rgba(239,68,68,.08) !important; border-color:rgba(239,68,68,.22) !important; }
html:not(.light) .kpi .var.down { color:#F87171 !important; }
.dfic { background:color-mix(in srgb, var(--text) 6%, transparent) !important; color:var(--text2) !important; }

/* controles */
html:not(.light) .seg { background:var(--field) !important; border-color:var(--line) !important; }
html:not(.light) .seg button.on { background:#1A212C !important; color:var(--text) !important; box-shadow:inset 0 0 0 1px rgba(255,255,255,.08) !important; }
.btn:not(.ghost):not(.danger) { background:var(--accent) !important; background-image:none !important; box-shadow:none !important; border-color:var(--accent) !important; }
.btn:not(.ghost):not(.danger):hover { filter:brightness(1.08); }
html:not(.light) input, html:not(.light) select, html:not(.light) textarea { background:var(--field) !important; border-color:rgba(255,255,255,.08) !important; color:var(--text); }
html:not(.light) input:focus, html:not(.light) select:focus, html:not(.light) textarea:focus { border-color:rgba(59,130,246,.55) !important; box-shadow:0 0 0 3px rgba(59,130,246,.15) !important; outline:none; }

/* tema claro: mesmas regras de sobriedade */
html.light #side nav button { color:#475569 !important; }
html.light #side nav button.on { background:rgba(59,130,246,.10) !important; color:#0F172A !important; box-shadow:inset 2px 0 0 #3B82F6 !important; }
html.light #side nav button.on i, html.light #side nav button.on svg { color:#2563EB !important; }

/* ---- Chats ao vivo e Kanban na paleta grafite (com profundidade entre fundo, painel e cartão) ---- */
html:not(.light) .inbox { background:var(--bg); }
html:not(.light) .ibFilters, html:not(.light) .ibList, html:not(.light) .ibSideWrap, html:not(.light) .ibSideWrap.ibp { background:#0E1218 !important; }
html:not(.light) .ibp { border-color:rgba(255,255,255,.07) !important; }
html:not(.light) .ibChat, html:not(.light) .chMsgs { background-color:#0A0D12 !important;
  background-image:linear-gradient(rgba(10,13,18,.72), rgba(10,13,18,.72)), var(--space-img) !important; }
html:not(.light) .chatHead, html:not(.light) .composer, html:not(.light) .daysep { background:#0E1218 !important; }
html:not(.light) .conv.on { background:rgba(59,130,246,.10); }
html:not(.light) .ibf.on { background:rgba(59,130,246,.12); }
html:not(.light) .msg.in { background:#161C25; border-color:rgba(255,255,255,.07); }
html:not(.light) .msg.out { background:#16273D; border-color:rgba(96,165,250,.18); color:#E6EBF2; }
html:not(.light) .msg.out.human { background:#1A2433; border-color:rgba(255,255,255,.09); }
html:not(.light) .msg .who { color:#A9B8CC; } html:not(.light) .msg .who.bot { color:#7DD3FC; }
html:not(.light) .chSched { background:rgba(10,13,18,.6); }
html:not(.light) .ctxm { background:#11161E; border-color:rgba(255,255,255,.08); }
html:not(.light) .collapse:hover { background:rgba(255,255,255,.05); }
html:not(.light) .subnav button.on { background:rgba(59,130,246,.12); color:var(--text); box-shadow:inset 2px 0 0 var(--accent); }
/* Kanban: fundo > coluna > cartão, cada um um tom acima */
html:not(.light) .kbcol { background:#131820 !important; border-color:rgba(255,255,255,.08) !important; }
html:not(.light) .kbcard { background:#1B222D !important; border-color:rgba(255,255,255,.10) !important; box-shadow:0 1px 2px rgba(0,0,0,.35) !important; }
html:not(.light) .kbcard:hover { border-color:rgba(96,165,250,.45) !important; }

/* ---- mídia nas conversas: foto/vídeo sem caixa ao redor, áudio em caixa escura ---- */
.msg.bare { background:none !important; border:none !important; box-shadow:none !important; padding:0 !important; position:relative; }
.msg.bare .mimg, .msg.bare .mvid { border-radius:12px; max-width:280px; box-shadow:0 2px 10px rgba(0,0,0,.35); }
.msg.bare .meta { position:absolute; right:8px; bottom:8px; margin:0; padding:2px 7px; border-radius:99px; background:rgba(0,0,0,.55); color:#fff !important; font-size:10.5px; pointer-events:none; }
.msg.bare:has(.mvid) .meta { bottom:auto; top:8px; } /* não cobre os controles do vídeo */
html:not(.light) .msg.aud { background:#11161E !important; border-color:rgba(255,255,255,.07) !important; }
html:not(.light) .msg.aud audio { color-scheme:dark; }
html.light .msg.aud { background:#EEF1F5 !important; }
/* legenda de foto/vídeo e todas as mensagens escritas no mesmo tom escuro do áudio */
.msg.bare.cap { display:flex; flex-direction:column; gap:6px; max-width:360px; }
.msg.bare.cap .meta { position:static; background:none; padding:0; color:var(--faint) !important; text-align:right; margin-top:4px; }
.msg.bare.cap.out { align-items:flex-end; }
.msg.bare .capbox { padding:9px 12px; border-radius:12px; max-width:100%; overflow-wrap:anywhere; }
html:not(.light) .msg.out, html:not(.light) .msg.out.human, html:not(.light) .msg.bare .capbox { background:#11161E !important; border:1px solid rgba(255,255,255,.07) !important; color:var(--text) !important; }
html:not(.light) .msg.bare.out, html:not(.light) .msg.bare.in { background:none !important; border:none !important; }
html:not(.light) .msg.in .capbox, html:not(.light) .msg.in:not(.bare) { background:#161C25 !important; }
html.light .msg.bare .capbox { background:#fff; border:1px solid #E1E7EF; }

/* =====================================================================
   TEMA CLARO PROFISSIONAL: fundo cinza-gelo, cartões brancos com borda e sombra
   reais (profundidade), letras grafite, mensagens em cinza claro
   ===================================================================== */
html.light {
  --bg:#EEF1F5; --inner:#EEF1F5; --bg2:#F8FAFC; --panel:#FFFFFF; --panel2:#F5F7FA; --surface:#F5F7FA; --hover:#F1F4F8;
  --field:#FFFFFF; --line:#DDE3EA; --line2:#E5E9EF; --div:#E7EBF0;
  --text:#111827; --text2:#374151; --muted:#6B7280; --faint:#9CA3AF;
  --accent:#2563EB; --accent2:#3B82F6; --accent-soft:rgba(37,99,235,.08);
  --shadow:0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.04);
}
html.light, html.light body { background:var(--bg); }
html.light main, html.light main.dash { background:#EEF1F5 !important; background-image:none !important; }
/* cartões: sai o brilho azul, entra borda cinza + sombra discreta */
html.light .card, html.light .kpi, html.light .ibp, html.light .kbwrap, html.light .fltable, html.light .flside, html.light .subnav, html.light .modalbox, html.light .authbox {
  background:#FFFFFF !important; border:1px solid #DDE3EA !important; box-shadow:0 1px 2px rgba(16,24,40,.06), 0 2px 8px rgba(16,24,40,.04) !important; }
html.light .card:hover, html.light .kpi:hover { border-color:#CBD3DD !important; box-shadow:0 2px 4px rgba(16,24,40,.07), 0 8px 20px rgba(16,24,40,.06) !important; }
/* barra lateral e topo */
html.light #side { background:#F8FAFC !important; border-right:1px solid #E5E9EF !important; }
html.light header, html.light .topbar { background:#FFFFFF !important; border-color:#E5E9EF !important; }
html.light #side nav button { color:#4B5563 !important; }
html.light #side nav button i, html.light #side nav button svg { color:#6B7280 !important; }
html.light #side nav button:hover { background:#EEF1F5 !important; color:#111827 !important; }
html.light #side nav button.on { background:#E8EFFD !important; color:#111827 !important; font-weight:600 !important; box-shadow:inset 2px 0 0 #2563EB !important; }
html.light #side nav button.on i, html.light #side nav button.on svg { color:#2563EB !important; }
html.light #side .grp { color:#9CA3AF !important; }
html.light .logo { color:#111827; }
/* números e ícones */
html.light .kpi .v { color:#111827 !important; }
html.light .kpi .ic { background:#F3F5F8 !important; box-shadow:inset 0 0 0 1px #E5E9EF !important; color:#4B5563 !important; }
/* controles */
html.light .seg { background:#F3F5F8 !important; border:1px solid #E5E9EF !important; }
html.light .seg button.on { background:#FFFFFF !important; color:#111827 !important; box-shadow:0 1px 2px rgba(16,24,40,.08), inset 0 0 0 1px #DDE3EA !important; }
html.light input, html.light select, html.light textarea { background:#FFFFFF !important; border-color:#D5DCE4 !important; color:#111827; }
html.light input:focus, html.light select:focus, html.light textarea:focus { border-color:#2563EB !important; box-shadow:0 0 0 3px rgba(37,99,235,.12) !important; outline:none; }
html.light .btn.ghost { background:#FFFFFF; border-color:#D5DCE4; color:#374151; }
/* Chats ao vivo */
html.light .inbox { background:#EEF1F5; }
html.light .ibFilters, html.light .ibList, html.light .ibSideWrap, html.light .ibSideWrap.ibp { background:#FFFFFF !important; }
html.light .ibChat, html.light .chMsgs { background:#F4F6F9 !important; background-image:none !important; }
html.light .chatHead, html.light .composer { background:#FFFFFF !important; }
html.light .daysep { background:#FFFFFF !important; border-color:#E5E9EF; color:#6B7280; }
html.light .conv.on { background:#EEF3FD; }
html.light .ibf.on { background:#E8EFFD; }
html.light .msg.out, html.light .msg.out.human, html.light .msg.aud, html.light .msg.bare .capbox { background:#E9EDF2 !important; border:1px solid #DCE2E9 !important; color:#111827 !important; }
html.light .msg.in, html.light .msg.in .capbox { background:#FFFFFF !important; border:1px solid #E1E6EC !important; color:#111827 !important; }
html.light .msg.bare.out, html.light .msg.bare.in { background:none !important; border:none !important; }
html.light .msg .who { color:#4B5563 !important; } html.light .msg .who.bot { color:#2563EB !important; }
html.light .msg .meta { color:#8A93A1 !important; }
html.light .msg.aud audio { color-scheme:light; }
/* Kanban: quadro branco > coluna cinza > cartão branco */
html.light .kbboard { background:#FFFFFF !important; }
html.light .kbcol { background:#F3F5F8 !important; border:1px solid #E3E8EE !important; }
html.light .kbcard { background:#FFFFFF !important; border:1px solid #DDE3EA !important; box-shadow:0 1px 2px rgba(16,24,40,.06) !important; }
html.light .kbcard:hover { border-color:#93B4F5 !important; }
/* Dashboard: cor só nos cartões de dinheiro/resultado (lucro verde, gasto azul...); contagens em branco */
html:not(.light) { --k-green:#4ADE80; --k-blue:#60A5FA; --k-violet:#A78BFA; --k-amber:#FBBF24; --k-teal:#2DD4BF; --k-red:#F87171; --k-pink:#F472B6; }
html.light { --k-green:#16A34A; --k-blue:#2563EB; --k-violet:#7C3AED; --k-amber:#D97706; --k-teal:#0D9488; --k-red:#DC2626; --k-pink:#DB2777; }
html .kpi.tint .v, html.light .kpi.tint .v { color:var(--vc) !important; }
html .kpi.tint .ic, html.light .kpi.tint .ic { color:var(--vc) !important; background:color-mix(in srgb, var(--vc) 12%, transparent) !important; box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--vc) 25%, transparent) !important; }

/* ================= Acabamentos em azul (inspirado no GeraChat: fundo azul clarinho + texto/ícone azul) ================= */
html:not(.light) { --acc:#3B82F6; --acc-txt:#93C5FD; --acc-ic:#60A5FA; --acc-soft:rgba(59,130,246,.14); --acc-line:rgba(59,130,246,.38); --av-ct:#2563EB; }
html.light { --acc:#2563EB; --acc-txt:#1D4ED8; --acc-ic:#2563EB; --acc-soft:#EAF1FE; --acc-line:#BFD3FB; --av-ct:#2563EB; }

/* 1. item ativo da barra lateral: retângulo azul clarinho, texto e ícone azuis (sem a faixinha lateral) */
html:is(.light, :not(.light)) #side nav button.on, html.light #side nav button.on { background:var(--acc-soft) !important; color:var(--acc-txt) !important; box-shadow:none !important; font-weight:600; border-radius:8px; }
html:is(.light, :not(.light)) #side nav button.on i, html:is(.light, :not(.light)) #side nav button.on i svg, html.light #side nav button.on i, html.light #side nav button.on i svg { color:var(--acc-ic) !important; }
html:is(.light, :not(.light)) .subnav button.on, html.light .subnav button.on, html:is(.light, :not(.light)) .flnav.on, html.light .flnav.on, html:is(.light, :not(.light)) .flfolder.on, html.light .flfolder.on { background:var(--acc-soft) !important; color:var(--acc-txt) !important; box-shadow:none !important; }
html:is(.light, :not(.light)) .ibf.on, html.light .ibf.on { background:var(--acc-soft) !important; color:var(--acc-txt) !important; }
html:is(.light, :not(.light)) .ibf.on .ic svg.ico, html:is(.light, :not(.light)) .ibf.on svg.ico { color:var(--acc-ic) !important; }

/* 2. avatares de contato: bolinha azul cheia com iniciais brancas */
.cav, #chAv, .kbtop .kbav, .kbpicked .kbav { color:#fff !important; font-weight:600; }

/* 3. botões: principal azul cheio; secundário branco/grafite com contorno */
html:is(.light, :not(.light)) .btn:not(.ghost):not(.danger) { background:var(--acc) !important; border-color:var(--acc) !important; color:#fff !important; }
html:is(.light, :not(.light)) .btn.ghost:hover, html.light .btn.ghost:hover { border-color:var(--acc-line) !important; color:var(--acc-txt); }

/* 4. abas e filtros selecionados: contorno azul + fundo azul clarinho + contador em bolinha azul */
html:is(.light, :not(.light)) .ibtabs button.on, html.light .ibtabs button.on { background:var(--acc-soft) !important; border-color:var(--acc-line) !important; color:var(--acc-txt) !important; font-weight:600; }
html:is(.light, :not(.light)) .ibtabs button.on b { background:var(--acc); }
html:is(.light, :not(.light)) .seg button.on, html.light .seg button.on { background:var(--acc-soft) !important; color:var(--acc-txt) !important; box-shadow:inset 0 0 0 1px var(--acc-line) !important; }
html:is(.light, :not(.light)) .ibf.on .n, html:is(.light, :not(.light)) .ibf.on .cnt, html:is(.light, :not(.light)) .ibf.on b { color:var(--acc-txt); }

/* 5. etiquetas pequenas de destaque (badges) como pílula azul */
html:is(.light, :not(.light)) .badge { background:var(--acc) !important; color:#fff !important; }

/* 7. gráfico de barras em azul */
html:is(.light, :not(.light)) .chart .b, html.light .chart .b { background:var(--acc) !important; box-shadow:none !important; }
html:is(.light, :not(.light)) .chart .b:hover { background:var(--acc-ic) !important; }
html:is(.light, :not(.light)) .chart .b.z { background:var(--acc-line) !important; }

/* 8. ícones dos títulos dos cartões num quadradinho azul clarinho */
html:is(.light, :not(.light)) .ch2 .tt > i, html:is(.light, :not(.light)) .ch2 .tt > svg { display:grid; place-items:center; width:34px !important; height:34px !important; flex:none; border-radius:9px; background:var(--acc-soft); color:var(--acc-ic) !important; padding:7px; box-sizing:border-box; }
html:is(.light, :not(.light)) .ch2 .tt > i svg { width:20px; height:20px; color:var(--acc-ic); }

/* foco dos campos em azul */
html:is(.light, :not(.light)) input:focus, html:is(.light, :not(.light)) select:focus, html:is(.light, :not(.light)) textarea:focus { border-color:var(--acc-line) !important; box-shadow:0 0 0 3px var(--acc-soft) !important; outline:none; }
html:is(.light, :not(.light)) .dfic, html.light .dfic { background:var(--acc-soft) !important; color:var(--acc-ic) !important; border-color:transparent !important; }
html:is(.light, :not(.light)) .dfic svg, html.light .dfic svg { color:var(--acc-ic) !important; }

/* fonte: botões e campos herdam a fonte do painel (antes caíam em Arial, por isso a letra parecia fina) */
button, input, select, textarea { font-family:inherit; }
/* menu lateral no estilo GeraChat: preto acinzentado, letra média (500), ícones no mesmo tom */
html.light #side nav button { color:#2F343B !important; font-weight:500 !important; font-size:14.5px !important; letter-spacing:-.005em; }
html.light #side nav button i, html.light #side nav button i svg { color:#3F4650 !important; }
html.light #side nav button i svg { stroke-width:1.8; }
html.light #side nav button:hover { color:#111827 !important; }
html:not(.light) #side nav button { color:#D3D7DE !important; font-weight:500 !important; font-size:14.5px !important; }
html:not(.light) #side nav button i, html:not(.light) #side nav button i svg { color:#A3AAB5 !important; }
html:is(.light, :not(.light)) #side nav button.on { color:var(--acc-txt) !important; font-weight:600 !important; }
html:is(.light, :not(.light)) #side nav button.on i, html:is(.light, :not(.light)) #side nav button.on i svg { color:var(--acc-ic) !important; }

/* caixas de seleção e campos: mesmo preto acinzentado e letra média do menu lateral */
html.light select, html.light input:not([type=checkbox]):not([type=radio]):not([type=range]), html.light textarea { color:#2F343B; font-weight:500; }
html:not(.light) select, html:not(.light) input:not([type=checkbox]):not([type=radio]):not([type=range]), html:not(.light) textarea { color:#D3D7DE; font-weight:500; }
html input::placeholder, html textarea::placeholder { font-weight:400; }
/* painel Perfil do chat: textos, botões e valores no mesmo padrão */
html.light .ibSide label, html.light .ibSide .btn.ghost { color:#2F343B; }
html.light .ibSide label, html.light .ibSide .btn.ghost, html.light .ibSide button:not(.btn) { font-weight:500; }
html:not(.light) .ibSide label, html:not(.light) .ibSide .btn.ghost, html:not(.light) .ibSide button:not(.btn) { color:#D3D7DE; font-weight:500; }

/* ===== Chat ao vivo: abas de status, chips, filtro ativo, etiquetas, coluna recolhível ===== */
.ibphl { display:flex; align-items:center; gap:6px; }
.ibexpand { display:none !important; }
.inbox.fcollapsed { grid-template-columns:330px minmax(0,1fr) 300px !important; }
.inbox.fcollapsed .ibFilters { display:none !important; }
.inbox.fcollapsed .ibexpand { display:inline-grid !important; }
@media (max-width: 1350px) { .inbox.fcollapsed { grid-template-columns:300px minmax(0,1fr) !important; } }
.ibcollapse svg { transform:rotate(90deg); }
.ibstatus { display:flex; gap:2px; padding:0 12px; border-bottom:1px solid var(--line2); flex:none; }
.ibstatus button { flex:1; display:flex; align-items:center; justify-content:center; gap:5px; background:none; border:0; border-bottom:2px solid transparent; margin-bottom:-1px; padding:8px 2px 9px; font-size:12.5px; font-weight:500; color:var(--muted); cursor:pointer; white-space:nowrap; }
.ibstatus button .n { font-size:10.5px; font-weight:600; min-width:18px; padding:0 5px; border-radius:99px; background:var(--hover); color:var(--muted); line-height:17px; }
.ibstatus button:hover { color:var(--text); }
.ibstatus button.on { color:var(--acc-txt); border-bottom-color:var(--acc); font-weight:600; }
.ibstatus button.on .n { background:var(--acc); color:#fff; }
.ibactive { display:flex; align-items:center; justify-content:space-between; gap:8px; margin:6px 12px 2px; padding:6px 10px; border-radius:8px; background:var(--acc-soft); color:var(--acc-txt); font-size:12px; border:1px solid var(--acc-line); }
.ibactive span { display:flex; align-items:center; gap:6px; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ibactive svg.ico { width:13px; height:13px; flex:none; }
.ibactive button { background:none; border:0; color:var(--acc-txt); font-weight:600; cursor:pointer; font-size:12px; padding:0; text-decoration:underline; text-underline-offset:2px; }
.ibactive.hidden { display:none; }
.ibfgt { display:flex; align-items:center; justify-content:space-between; width:calc(100% - 16px); background:none; border:0; cursor:pointer; text-align:left; padding:0; font-family:inherit; }
.ibfgt .chev svg { width:13px; height:13px; transition:transform .15s; }
.ibfgt.open .chev svg { transform:rotate(180deg); }
.ibf .tdot { width:9px; height:9px; border-radius:50%; display:inline-block; }
.cpause { display:inline-grid; place-items:center; margin-left:5px; vertical-align:-2px; color:#D97706; }
.cpause svg.ico { width:13px; height:13px; }
.conv .cst { flex-wrap:wrap; }
.conv .cst .tag { font-size:10px; padding:0 6px; line-height:16px; border-radius:99px; border:1px solid; font-weight:600; max-width:110px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.conv .cst .tag.more { color:var(--muted); border-color:var(--line); background:var(--hover); }
.ibempty { text-align:center; padding:36px 18px; color:var(--muted); display:flex; flex-direction:column; align-items:center; gap:6px; }
.ibempty .ei svg.ico { width:34px; height:34px; color:var(--muted); opacity:.7; }
.ibempty b { color:var(--text); font-size:14px; font-weight:600; }
.ibempty p { margin:0 0 6px; font-size:12.5px; }
.ctnm { color:inherit; }
.ibstatus { justify-content:space-between; padding:0 14px; gap:6px; }
.ibstatus button { flex:none; padding:8px 0 9px; font-size:12.5px; gap:4px; }
.ibstatus button .n { min-width:16px; padding:0 4px; font-size:10px; line-height:16px; }

/* ===== Contatos (estilo GeraChat) ===== */
.cthead { align-items:flex-start; }
.ctbtns { gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.ctbtns .btn { display:inline-flex; align-items:center; gap:6px; }
.ctbtns .btn svg.ico { width:16px; height:16px; }
#ctActBtn.dim { opacity:.75; }
.ctfilters { display:flex; gap:8px; flex-wrap:wrap; margin:4px 0 14px; }
.ctf { display:flex; align-items:center; gap:9px; background:var(--panel); border:1px solid var(--line2); border-radius:10px; padding:5px 10px 5px 12px; min-width:170px; cursor:pointer; position:relative; }
.ctf > svg.ico, .ctf > i svg { width:17px; height:17px; color:var(--muted); flex:none; }
.ctf > span { display:flex; flex-direction:column; min-width:0; flex:1; }
.ctf small { font-size:10.5px; color:var(--muted); line-height:1.2; }
.ctf select { border:0 !important; background:transparent !important; padding:0 18px 0 0 !important; height:auto !important; min-height:0 !important; font-size:13.5px; box-shadow:none !important; cursor:pointer; width:100%; }
.ctf b { font-size:13.5px; font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ctf .chev svg { width:14px; height:14px; color:var(--muted); }
.ctf:hover { border-color:var(--acc-line); }
.ctsearch { flex:1; min-width:220px; display:flex; align-items:center; gap:8px; background:var(--panel); border:1px solid var(--line2); border-radius:10px; padding:0 12px; }
.ctsearch svg { width:16px; height:16px; color:var(--muted); flex:none; }
.ctsearch input { border:0 !important; background:transparent !important; box-shadow:none !important; padding:10px 0 !important; width:100%; }
.ctbar { display:flex; align-items:flex-end; justify-content:space-between; gap:10px; margin-bottom:10px; flex-wrap:wrap; }
.ctbar > div:first-child span { color:var(--muted); }
.ctselinfo { font-size:12.5px; color:var(--acc-txt); background:var(--acc-soft); border:1px solid var(--acc-line); padding:5px 10px; border-radius:8px; }
.ctselinfo a { cursor:pointer; text-decoration:underline; text-underline-offset:2px; }
.ctselinfo.hidden { display:none; }
.ctselall { display:inline-flex !important; align-items:center; gap:6px; } .ctselall svg { width:15px; height:15px; } .ctselall.hidden { display:none !important; }
.ctview { display:flex; border:1px solid var(--line2); border-radius:8px; overflow:hidden; background:var(--panel); }
.ctview button { background:none; border:0; padding:6px 9px; cursor:pointer; color:var(--muted); display:grid; place-items:center; }
.ctview button svg { width:16px; height:16px; }
.ctview button.on { background:var(--acc-soft); color:var(--acc-ic); }
.ctperpage { width:auto !important; padding:6px 30px 6px 10px !important; font-size:12.5px; }
.cttable { padding:0 !important; overflow:hidden; }
.cttable table { width:100%; border-collapse:collapse; margin:0; }
.cttable th { text-align:left; font-size:12.5px; font-weight:600; color:var(--text2); padding:12px 14px; border-bottom:1px solid var(--line2); background:var(--hover); text-transform:none; letter-spacing:0; }
.cttable td { padding:11px 14px; border-bottom:1px solid var(--line2); vertical-align:middle; }
.cttable tr:last-child td { border-bottom:0; }
.cttable tbody tr { cursor:pointer; } .cttable tbody tr:hover td { background:var(--hover); }
.cttable tbody tr.sel td { background:var(--acc-soft); }
.cttable .ckc { width:44px; text-align:center; }
.srth { cursor:pointer; user-select:none; } .srt { color:var(--muted); font-size:11px; margin-left:3px; } .srt.on { color:var(--acc-ic); }
.ctwho { display:flex; align-items:center; gap:11px; } .ctwho b { font-weight:600; display:flex; align-items:center; gap:5px; }
.ctwho .wa svg { width:14px; height:14px; color:#25D366; }
.ctav { width:52px; height:52px; border-radius:50%; background:var(--av-ct); color:#fff; display:grid; place-items:center; font-weight:600; font-size:17px; flex:none; }
.ctav.sm { width:36px; height:36px; font-size:13px; }
.ctph { font-variant-numeric:tabular-nums; letter-spacing:.02em; color:var(--text2); }
.cttags { display:flex; flex-wrap:wrap; gap:4px; }
.cttags .tag { font-size:10.5px; padding:1px 8px; border-radius:99px; border:1px solid; font-weight:600; max-width:200px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cttags .tag.more { color:var(--muted); border-color:var(--line); background:var(--hover); }
.ctdots { background:none; border:0; color:var(--muted); font-size:18px; line-height:1; cursor:pointer; padding:4px 8px; border-radius:6px; }
.ctdots:hover { background:var(--hover); color:var(--text); }
.ctgrid { display:grid; grid-template-columns:repeat(auto-fill, minmax(210px, 1fr)); gap:12px; }
.ctcard { position:relative; background:var(--panel); border:1px solid var(--line2); border-radius:12px; padding:20px 14px 14px; display:flex; flex-direction:column; align-items:center; gap:5px; text-align:center; cursor:pointer; box-shadow:var(--shadow); }
.ctcard:hover { border-color:var(--acc-line); } .ctcard.sel { border-color:var(--acc); box-shadow:0 0 0 1px var(--acc); }
.ctcard .ctchk { position:absolute; left:12px; top:12px; } .ctcard .ctdots { position:absolute; right:6px; top:8px; }
.ctcard b { font-weight:600; margin-top:6px; display:flex; align-items:center; } .ctcard .cttags { justify-content:center; margin:2px 0; }
.ctpager { display:flex; align-items:center; justify-content:center; gap:14px; margin:14px 0 6px; font-size:13px; color:var(--muted); }
.ctpager:empty { display:none; }
.cttagpick { padding:6px; max-height:320px; overflow:auto; }
.cttagpick label { display:flex; align-items:center; gap:8px; padding:6px 8px; border-radius:6px; cursor:pointer; } .cttagpick label:hover { background:var(--hover); }
.cttagpick .tag { font-size:11px; padding:1px 8px; border-radius:99px; border:1px solid; font-weight:600; }
.ctpickft { display:flex; justify-content:flex-end; gap:6px; padding:8px 4px 2px; border-top:1px solid var(--line2); margin-top:4px; }
.ctimpres { margin-top:12px; padding:10px 12px; border-radius:8px; background:var(--acc-soft); color:var(--acc-txt); font-size:13px; }
.ctimpres.err { background:rgba(220,38,38,.1); color:#DC2626; }
.ctfilters { align-items:stretch; }
.ctf { height:48px; box-sizing:border-box; margin:0; }
.ctsearch { height:48px; box-sizing:border-box; }

/* ===== Vendas por segmento ===== */
.segtabs { display:flex; gap:2px; padding:3px; border-radius:10px; background:var(--panel); border:1px solid var(--line2); }
.segtabs button { background:none; border:0; padding:7px 12px; border-radius:7px; font-size:13px; font-weight:500; color:var(--text2); cursor:pointer; white-space:nowrap; }
.segtabs button:hover { color:var(--text); }
.segtabs button.on { background:var(--acc-soft); color:var(--acc-txt); font-weight:600; box-shadow:inset 0 0 0 1px var(--acc-line); }
.segpill { font-weight:600; }
.segpill.seg-lowticket { color:#0D9488; border-color:rgba(13,148,136,.35); background:rgba(13,148,136,.08); }
.segpill.seg-antecipado { color:var(--acc-txt); border-color:var(--acc-line); background:var(--acc-soft); }
.segpill.seg-afterpay { color:#B45309; border-color:rgba(217,119,6,.35); background:rgba(217,119,6,.08); }
html:not(.light) .segpill.seg-lowticket { color:#2DD4BF; } html:not(.light) .segpill.seg-afterpay { color:#FBBF24; }
#sShip.hidden { display:none; }
/* segmento: um botão só, que abre as opções para baixo */
.segdd { position:relative; }
.segbtn { display:flex; align-items:center; gap:9px; background:var(--panel); border:1px solid var(--line2); border-radius:10px; padding:5px 10px 5px 12px; cursor:pointer; min-width:170px; text-align:left; height:42px; box-sizing:border-box; }
.segbtn:hover, .segdd.open .segbtn { border-color:var(--acc-line); }
.segbtn > svg.ico, .segbtn > i svg { width:17px; height:17px; color:var(--acc-ic); flex:none; }
.segbtn > span { display:flex; flex-direction:column; flex:1; line-height:1.2; }
.segbtn small { font-size:10.5px; color:var(--muted); }
.segbtn b { font-size:13.5px; font-weight:600; color:var(--text); }
.segbtn .chev svg { width:14px; height:14px; color:var(--muted); transition:transform .15s; }
.segdd.open .segbtn .chev svg { transform:rotate(180deg); }
.segmenu { position:absolute; top:calc(100% + 6px); left:0; right:0; min-width:190px; z-index:30; background:var(--panel); border:1px solid var(--line2); border-radius:10px; padding:5px; box-shadow:0 12px 30px rgba(0,0,0,.25); display:flex; flex-direction:column; gap:2px; }
.segmenu.hidden { display:none; }
.segmenu button { background:none; border:0; text-align:left; padding:8px 10px; border-radius:7px; font-size:13.5px; font-weight:500; color:var(--text2); cursor:pointer; }
.segmenu button:hover { background:var(--hover); color:var(--text); }
.segmenu button.on { background:var(--acc-soft); color:var(--acc-txt); font-weight:600; }
html.light .segmenu { box-shadow:0 12px 30px rgba(16,24,40,.12); }
.segmenu.right { left:auto; right:0; }
.dbar .segbtn { height:38px; min-width:180px; }
/* "Ao vivo" do Dashboard */
.livebadge { display:inline-flex; align-items:center; gap:7px; font-size:12.5px; color:var(--muted); }
.livebadge .ldot { width:8px; height:8px; border-radius:50%; background:#22C55E; box-shadow:0 0 0 0 rgba(34,197,94,.5); animation:livePulse 2s infinite; }
@keyframes livePulse { 0% { box-shadow:0 0 0 0 rgba(34,197,94,.45); } 70% { box-shadow:0 0 0 7px rgba(34,197,94,0); } 100% { box-shadow:0 0 0 0 rgba(34,197,94,0); } }
/* período personalizado */
.dfrow > div:first-child { position:relative; }
#mSeg button[data-d="custom"] { display:inline-flex; align-items:center; gap:5px; }
#mSeg button[data-d="custom"] svg { width:14px; height:14px; }
.custompop { position:absolute; top:calc(100% + 6px); left:0; z-index:40; width:340px; background:var(--panel); border:1px solid var(--line2); border-radius:12px; padding:14px; box-shadow:0 14px 34px rgba(0,0,0,.3); }
.custompop.hidden { display:none; }
html.light .custompop { box-shadow:0 14px 34px rgba(16,24,40,.14); }
.cpq { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:10px; }
.cpq button { background:var(--hover); border:1px solid var(--line2); border-radius:99px; padding:5px 11px; font-size:12.5px; font-weight:500; color:var(--text2); cursor:pointer; }
.cpq button:hover { border-color:var(--acc-line); color:var(--acc-txt); background:var(--acc-soft); }
.cpr { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.cpr input { width:100%; box-sizing:border-box; }
html:not(.light) .cpr input { color-scheme:dark; }

/* ===== janela de informações do contato (estilo BotConversa) ===== */
.cdbox { width:440px; max-width:94vw; max-height:90vh; overflow-y:auto; padding:0 !important; }
.cdhead { position:sticky; top:0; z-index:2; display:flex; align-items:center; gap:10px; padding:14px 14px 12px 16px; background:var(--panel); border-bottom:1px solid var(--line2); }
.cdhead .ctav.sm { width:34px; height:34px; font-size:12.5px; }
.cdwho { display:flex; flex-direction:column; flex:1; min-width:0; line-height:1.25; }
.cdwho b { font-size:14.5px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cdwho span { font-size:12px; color:var(--muted); font-variant-numeric:tabular-nums; }
.cdhead .ibtn { width:32px; height:32px; display:grid; place-items:center; font-size:16px; }
.cdhead .ibtn svg { width:17px; height:17px; }
.cdtop { padding:12px 16px 14px; display:flex; flex-direction:column; gap:8px; border-bottom:1px solid var(--line2); }
.cdsel { display:flex; align-items:center; gap:10px; padding:4px 8px; border-radius:8px; cursor:pointer; }
.cdsel:hover { background:var(--hover); }
.cdsel .cdic svg { width:18px; height:18px; color:var(--muted); }
.cdsel > span:last-child { display:flex; flex-direction:column; flex:1; }
.cdsel small { font-size:11px; color:var(--muted); }
.cdsel select { border:0 !important; background:transparent !important; box-shadow:none !important; padding:0 !important; height:auto !important; min-height:0 !important; font-size:14px; cursor:pointer; width:100%; }
.cdauto { margin-top:4px; width:100%; padding:11px; border-radius:9px; font-weight:600; font-size:13.5px; cursor:pointer; border:1px solid; }
.cdauto.on { background:rgba(34,197,94,.12); color:#16A34A; border-color:rgba(34,197,94,.3); }
.cdauto.off { background:rgba(220,38,38,.08); color:#DC2626; border-color:rgba(220,38,38,.3); }
html:not(.light) .cdauto.on { background:rgba(34,197,94,.14); color:#4ADE80; } html:not(.light) .cdauto.off { background:rgba(248,113,113,.1); color:#F87171; }
.cdsec { border-bottom:1px solid var(--line2); }
.cdsh { display:flex; align-items:center; justify-content:space-between; padding:13px 16px; cursor:pointer; user-select:none; }
.cdsh:hover { background:var(--hover); }
.cdsh b { font-size:13.5px; font-weight:600; }
.cdsr { display:flex; align-items:center; gap:8px; color:var(--muted); }
.cdn { font-size:12px; color:var(--muted); min-width:10px; text-align:right; }
.cdplus { background:none; border:0; color:var(--muted); cursor:pointer; padding:2px; border-radius:6px; display:grid; place-items:center; }
.cdplus:hover { color:var(--acc-ic); background:var(--acc-soft); }
.cdplus svg, .cdchev svg { width:15px; height:15px; }
.cdchev { display:grid; place-items:center; transition:transform .15s; }
.cdsec.open .cdchev { transform:rotate(180deg); }
.cdsb { padding:0 16px 14px; display:flex; flex-direction:column; gap:7px; }
.cdrow { display:flex; align-items:baseline; gap:10px; font-size:12.5px; }
.cdrow > span { color:var(--muted); min-width:150px; flex:none; }
.cdrow > b { font-weight:500; color:var(--text); word-break:break-word; display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.cdch b { font-size:13px; font-weight:600; }
.cdwa svg { width:16px; height:16px; color:#25D366; }
.cdwin { display:flex; gap:8px; align-items:flex-start; margin-top:4px; padding:9px 11px; border-radius:8px; background:rgba(34,197,94,.1); color:#15803D; font-size:12px; line-height:1.4; }
.cdwin svg { width:15px; height:15px; flex:none; margin-top:1px; }
html:not(.light) .cdwin { color:#86EFAC; background:rgba(34,197,94,.12); }
.cdempty { font-size:12.5px; color:var(--muted); }
.cdpill { font-size:11px; padding:1px 8px; border-radius:99px; background:var(--acc-soft); color:var(--acc-txt); font-weight:600; }
.cdfull { width:100%; }
.cdadd { display:flex; gap:6px; align-items:center; }
.cdadd input, .cdadd select { flex:1; min-width:0; }
.cdadd .btn { display:inline-flex; align-items:center; gap:5px; white-space:nowrap; } .cdadd .btn svg { width:14px; height:14px; }
.cdnote { padding:8px 10px; border-radius:8px; background:rgba(245,158,11,.09); border:1px solid rgba(245,158,11,.25); font-size:12.5px; }
.cdnote small { display:block; margin-top:3px; color:var(--muted); font-size:11px; }
.cdx { background:none; border:0; color:inherit; cursor:pointer; font-size:13px; padding:0 0 0 4px; opacity:.7; } .cdx:hover { opacity:1; }
.cdsb .cttags .tag { font-size:11px; padding:1px 8px; }
/* janela do contato: Membro/Chat limpos (sem caixinhas), seta à direita; botão de automação com menu "Parar agora / Ligar agora" */
.cdtop { gap:4px; padding:10px 12px 14px; }
.cdsel { position:relative; padding:8px 10px; border-radius:10px; gap:12px; }
.cdsel select { appearance:none; -webkit-appearance:none; -moz-appearance:none; background:none !important; background-image:none !important; border:0 !important; outline:none; color:var(--text) !important; font-weight:600 !important; font-size:14px; padding:0 22px 0 0 !important; margin:0; line-height:1.3; position:relative; z-index:1; }
.cdsel select:focus { box-shadow:none !important; }
.cdsel select option { background:var(--panel); color:var(--text); font-weight:500; }
.cdsel small { font-size:11.5px; margin-bottom:1px; }
.cdselchev { position:absolute; right:12px; top:50%; transform:translateY(-50%); color:var(--muted); pointer-events:none; display:grid; }
.cdselchev svg { width:15px; height:15px; }
.cdsel .cdic svg { width:19px; height:19px; }
.cdautowrap { position:relative; margin-top:6px; }
.cdauto { margin-top:0; border-radius:10px; padding:12px; font-size:13.5px; letter-spacing:.1px; transition:filter .12s; }
.cdauto:hover { filter:brightness(1.08); }
.cdauto.on { background:#123524; color:#4ADE80; border:1px solid rgba(74,222,128,.18); }
.cdauto.off { background:#3A1518; color:#F87171; border:1px solid rgba(248,113,113,.2); }
html.light .cdauto.on { background:#E8F7EE; color:#15803D; border-color:#BFE6CD; }
html.light .cdauto.off { background:#FDECEC; color:#B91C1C; border-color:#F5C2C2; }
.cdautomenu { position:absolute; left:0; right:0; top:calc(100% + 6px); z-index:5; background:var(--panel); border:1px solid var(--line2); border-radius:10px; padding:5px; box-shadow:0 12px 28px rgba(0,0,0,.35); }
html.light .cdautomenu { box-shadow:0 12px 28px rgba(16,24,40,.14); }
.cdautomenu.hidden { display:none; }
.cdautomenu button { width:100%; text-align:left; background:none; border:0; padding:10px 12px; border-radius:7px; font-size:13.5px; font-weight:500; color:var(--text); cursor:pointer; }
.cdautomenu button:hover { background:var(--hover); }
/* bordas mais finas e discretas na janela inteira */
.cdbox { border-radius:14px !important; border:1px solid var(--line2) !important; }
.cdhead { border-bottom-color:var(--line2); border-radius:14px 14px 0 0; }
.cdsec { border-bottom:1px solid var(--line2); }
.cdsec:last-child { border-bottom:0; }
html:not(.light) .cdsec, html:not(.light) .cdtop, html:not(.light) .cdhead { border-color:rgba(255,255,255,.06); }
html:is(.light, :not(.light)) .cdsel select, html:is(.light, :not(.light)) .ctf select, html:is(.light, :not(.light)) .ctsearch input { background:transparent !important; border:0 !important; box-shadow:none !important; }
/* topo da janela: ícones soltos, sem caixinha (igual BotConversa) */
.cdhead .ibtn { background:none !important; border:0 !important; box-shadow:none !important; color:var(--text2); border-radius:8px; }
.cdhead .ibtn:hover { background:var(--hover) !important; color:var(--text); }
.cdsel { padding:7px 10px; }
.cdtop label.cdsel { margin:0 !important; }
html:is(.light, :not(.light)) .cdsel select { height:22px !important; min-height:0 !important; line-height:22px; }
/* Filtros do Dashboard: barra de período mais curta e Produto compacto ao lado */
.dfrow { display:flex !important; align-items:flex-end; gap:14px; flex-wrap:wrap; }
.dfrow > div:nth-child(2) { width:230px; flex:none; }
.dfrow .dfend { margin-left:auto; }
#mSeg { display:inline-flex; }
#mSeg button { padding:6px 12px; font-size:13px; }
#mSeg button[data-d="custom"] { padding:6px 11px; }
html:is(.light, :not(.light)) #mProd { height:38px !important; min-height:0 !important; padding:0 30px 0 12px !important; font-size:13px; border-radius:9px; }

/* ===== Agentes de IA ===== */
.agtabs { display:flex; gap:4px; margin:4px 0 14px; }
.agtabs button { background:none; border:1px solid transparent; padding:6px 14px; border-radius:8px; font-size:13px; font-weight:500; color:var(--text2); cursor:pointer; }
.agtabs button.on { background:var(--acc-soft); color:var(--acc-txt); border-color:var(--acc-line); font-weight:600; }
.aggrid { display:grid; grid-template-columns:repeat(auto-fill, minmax(300px, 1fr)); gap:12px; }
.agcard { background:var(--panel); border:1px solid var(--line2); border-radius:12px; padding:16px; display:flex; flex-direction:column; gap:10px; box-shadow:var(--shadow); }
.agct { display:flex; align-items:center; gap:11px; }
.agav { width:40px; height:40px; border-radius:11px; display:grid; place-items:center; background:var(--acc-soft); color:var(--acc-ic); font-weight:700; flex:none; }
.agav svg { width:20px; height:20px; }
.agcn { display:flex; flex-direction:column; flex:1; min-width:0; } .agcn b { font-size:15px; font-weight:600; } .agcn span { font-size:12px; color:var(--muted); }
.agdesc { margin:0; font-size:13px; color:var(--text2); display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; min-height:36px; }
.agmeta { display:flex; flex-wrap:wrap; gap:6px; } .agmeta span { display:inline-flex; align-items:center; gap:4px; font-size:11.5px; color:var(--text2); background:var(--hover); padding:3px 8px; border-radius:99px; }
.agmeta svg { width:12px; height:12px; }
.agact { display:flex; gap:6px; } .agact .btn { display:inline-flex; align-items:center; gap:5px; } .agact .btn svg { width:14px; height:14px; }
.agcard audio { width:100%; height:34px; }
.sw { position:relative; width:38px; height:22px; flex:none; cursor:pointer; } .sw input { display:none; }
.sw span { position:absolute; inset:0; border-radius:99px; background:var(--line); transition:.15s; }
.sw span::after { content:""; position:absolute; left:3px; top:3px; width:16px; height:16px; border-radius:50%; background:#fff; transition:.15s; }
.sw input:checked + span { background:#22C55E; } .sw input:checked + span::after { left:19px; }
.agbox { max-width:560px; width:94vw; } .agbox.wide { max-width:1080px; padding:18px 20px !important; }
.agtpls { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.agtpl { display:flex; flex-direction:column; gap:4px; text-align:left; padding:14px; border-radius:10px; border:1px solid var(--line2); background:var(--hover); color:var(--text); cursor:pointer; }
.agtpl:hover { border-color:var(--acc-line); background:var(--acc-soft); } .agtpl b { font-size:14px; } .agtpl span { font-size:12px; color:var(--muted); }
.agedgrid { display:grid; grid-template-columns:minmax(0, 1.25fr) minmax(0, 1fr); gap:18px; }
.agsecs { display:flex; gap:2px; border-bottom:1px solid var(--line2); margin-bottom:12px; overflow-x:auto; }
.agsecs button { background:none; border:0; border-bottom:2px solid transparent; padding:8px 11px; font-size:13px; font-weight:500; color:var(--muted); cursor:pointer; white-space:nowrap; }
.agsecs button.on { color:var(--acc-txt); border-bottom-color:var(--acc); font-weight:600; }
.agsecbody { max-height:58vh; overflow-y:auto; padding-right:4px; }
.agsecbody textarea, .agsecbody input, .agsecbody select { width:100%; box-sizing:border-box; }
.agsecbody .hint { font-size:11.5px; color:var(--muted); margin-top:3px; }
.agchk { display:flex; gap:10px; align-items:flex-start; padding:9px 0; cursor:pointer; } .agchk input { width:auto !important; margin-top:3px; }
.agchk span { display:flex; flex-direction:column; } .agchk b { font-size:13.5px; font-weight:600; } .agchk small { font-size:12px; color:var(--muted); }
.agtrig { border:1px solid var(--line2); border-radius:10px; padding:10px 12px; margin-bottom:10px; background:var(--hover); }
.agtrh { display:flex; justify-content:space-between; align-items:center; }
.agh3 { font-size:14px; margin:18px 0 4px; }
.agtest { display:flex; flex-direction:column; border:1px solid var(--line2); border-radius:12px; padding:12px; background:var(--hover); min-height:440px; }
.agth { display:flex; justify-content:space-between; align-items:center; margin-bottom:8px; } .agth b { display:flex; align-items:center; gap:6px; font-size:14px; } .agth svg { width:15px; height:15px; }
.agmsgs { flex:1; overflow-y:auto; display:flex; flex-direction:column; gap:6px; padding:6px 2px; max-height:52vh; }
.agm { max-width:85%; padding:8px 11px; border-radius:10px; font-size:13px; line-height:1.4; }
.agm.in { align-self:flex-end; background:var(--acc); color:#fff; border-bottom-right-radius:3px; }
.agm.out { align-self:flex-start; background:var(--panel); border:1px solid var(--line2); border-bottom-left-radius:3px; }
.agnote { align-self:center; font-size:11.5px; color:var(--muted); background:var(--panel); border:1px solid var(--line2); padding:3px 10px; border-radius:99px; }
.agempty { margin:auto; font-size:12.5px; color:var(--muted); text-align:center; padding:20px; }
.agtin { display:flex; gap:6px; margin-top:8px; } .agtin input { flex:1; } .agtin .btn svg { width:15px; height:15px; }
@media (max-width: 900px) { .agedgrid { grid-template-columns:1fr; } .agtpls { grid-template-columns:1fr; } }
.deppill { display:inline-flex; align-items:center; gap:6px; padding:5px 6px 5px 12px; border-radius:99px; background:var(--acc-soft); color:var(--acc-txt); border:1px solid var(--acc-line); font-size:13px; font-weight:600; }
.deppill button { background:none; border:0; color:inherit; cursor:pointer; font-size:15px; line-height:1; padding:0 4px; opacity:.7; } .deppill button:hover { opacity:1; }

/* ===== Disparos ===== */
#bcList tr { cursor:pointer; } #bcList tr:hover td { background:var(--hover); }
.bcprog { display:flex; align-items:center; gap:10px; min-width:130px; font-variant-numeric:tabular-nums; font-size:12.5px; }
.bar { flex:1; height:6px; border-radius:99px; background:var(--hover); overflow:hidden; min-width:60px; }
.bar i { display:block; height:100%; background:var(--acc); border-radius:99px; transition:width .3s; }
.bcst { display:inline-flex; align-items:center; gap:6px; font-size:11.5px; font-weight:600; padding:3px 10px; border-radius:99px; border:1px solid; }
.bcst::before { content:""; width:6px; height:6px; border-radius:50%; background:currentColor; }
.bcst.run { color:#D97706; background:rgba(217,119,6,.08); border-color:rgba(217,119,6,.3); }
.bcst.pause { color:#DC2626; background:rgba(220,38,38,.07); border-color:rgba(220,38,38,.3); }
.bcst.done { color:#16A34A; background:rgba(22,163,74,.08); border-color:rgba(22,163,74,.3); }
html:not(.light) .bcst.run { color:#FBBF24; } html:not(.light) .bcst.pause { color:#F87171; } html:not(.light) .bcst.done { color:#4ADE80; }
.bcbox { width:520px; max-width:94vw; max-height:90vh; overflow:auto; }
.bcbox.wide { width:900px; }
.bcgrid { display:grid; grid-template-columns:1fr 1fr; gap:12px 20px; margin:6px 0 14px; }
.bcgrid small, .bcwiz small { display:block; font-size:11.5px; color:var(--muted); margin-bottom:2px; }
.bcgrid b { font-size:13.5px; font-weight:600; }
.bcpline { display:flex; justify-content:space-between; font-size:12.5px; margin:4px 0 6px; }
.bar.bcbig { height:8px; margin-bottom:14px; }
.bcitems { border:1px solid var(--line2); border-radius:10px; max-height:300px; overflow:auto; }
.bcih { display:flex; align-items:center; gap:7px; padding:10px 12px; font-size:12.5px; font-weight:600; border-bottom:1px solid var(--line2); position:sticky; top:0; background:var(--panel); }
.bcih svg { width:15px; height:15px; }
.bci { display:flex; align-items:center; gap:10px; padding:8px 12px; border-bottom:1px solid var(--line2); } .bci:last-child { border-bottom:0; }
.bci > div { flex:1; min-width:0; } .bci b { display:block; font-size:13px; font-weight:600; } .bci small { color:var(--muted); font-size:11.5px; }
.bcis { font-size:11px; font-weight:600; padding:2px 9px; border-radius:99px; border:1px solid; white-space:nowrap; }
.bcis.pend { color:#D97706; border-color:rgba(217,119,6,.3); background:rgba(217,119,6,.08); }
.bcis.ok { color:#16A34A; border-color:rgba(22,163,74,.3); background:rgba(22,163,74,.08); }
.bcis.err { color:#DC2626; border-color:rgba(220,38,38,.3); background:rgba(220,38,38,.07); }
.bcwiz { display:grid; grid-template-columns:200px 1fr; gap:18px; min-height:420px; }
.bcside { display:flex; flex-direction:column; gap:4px; border-right:1px solid var(--line2); padding-right:14px; }
.bcstep { display:flex; align-items:center; gap:10px; background:none; border:0; text-align:left; padding:9px 10px; border-radius:8px; font-size:13.5px; font-weight:500; color:var(--muted); cursor:default; }
.bcstep .n { width:22px; height:22px; border-radius:50%; display:grid; place-items:center; font-size:11.5px; font-weight:700; background:var(--hover); color:var(--muted); flex:none; }
.bcstep .n svg { width:13px; height:13px; }
.bcstep.on { background:var(--acc-soft); color:var(--acc-txt); font-weight:600; } .bcstep.on .n { background:var(--acc); color:#fff; }
.bcstep.done { color:var(--text); cursor:pointer; } .bcstep.done .n { background:#16A34A; color:#fff; }
.bcmain h3 { margin:0 0 6px; font-size:15px; }
.bcmain input:not([type=checkbox]), .bcmain select { width:100%; box-sizing:border-box; }
.bcfilters { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-bottom:8px; }
.bcfilters select { width:auto !important; } .bcfilters .ctsearch { min-width:150px; height:38px; }
.bcdate { display:flex; align-items:center; gap:6px; padding:0 8px; border:1px solid var(--line2); border-radius:9px; height:38px; }
.bcdate svg { width:15px; height:15px; color:var(--muted); } .bcdate input { width:128px !important; border:0 !important; background:transparent !important; box-shadow:none !important; padding:0 !important; height:auto !important; }
html:not(.light) .bcdate input, html:not(.light) .bcmain input[type=datetime-local] { color-scheme:dark; }
.bclist { border:1px solid var(--line2); border-radius:10px; max-height:330px; overflow:auto; }
.bclh { display:flex; align-items:center; gap:10px; padding:9px 12px; font-size:12.5px; font-weight:600; border-bottom:1px solid var(--line2); position:sticky; top:0; background:var(--panel); z-index:1; }
.bclh a { margin-left:auto; color:var(--acc-txt); cursor:pointer; font-weight:500; text-decoration:underline; text-underline-offset:2px; }
.bcrow { display:flex; align-items:center; gap:10px; padding:8px 12px; border-bottom:1px solid var(--line2); cursor:pointer; } .bcrow:hover { background:var(--hover); } .bcrow:last-child { border-bottom:0; }
.bcrow b { display:block; font-size:13px; font-weight:600; } .bcrow small { color:var(--muted); font-size:11.5px; }
.bcpager { display:flex; align-items:center; justify-content:flex-end; gap:6px; margin-top:8px; font-size:12px; color:var(--muted); }
.bcselbar { display:flex; align-items:center; gap:8px; margin-top:10px; padding:9px 12px; border-radius:9px; background:var(--acc-soft); color:var(--acc-txt); border:1px solid var(--acc-line); font-size:13px; font-weight:500; }
.bcselbar svg { width:15px; height:15px; } .bcselbar b { margin-left:auto; background:var(--acc); color:#fff; border-radius:99px; padding:0 9px; font-size:12px; }
.bctip { display:flex; gap:9px; margin-top:16px; padding:11px 13px; border-radius:9px; background:rgba(217,119,6,.08); border:1px solid rgba(217,119,6,.25); font-size:12.5px; line-height:1.45; }
.bctip svg { width:16px; height:16px; flex:none; color:#D97706; margin-top:1px; }

/* ===== Equipe e Departamentos (estilo BotConversa) ===== */
.tmbar { display:flex; align-items:center; gap:12px; margin-bottom:12px; flex-wrap:wrap; }
.tmtabs { display:flex; gap:4px; padding:3px; border-radius:10px; background:var(--panel); border:1px solid var(--line2); }
.tmtabs button { background:none; border:0; padding:7px 14px; border-radius:7px; font-size:13px; font-weight:500; color:var(--text2); cursor:pointer; }
.tmtabs button.on { background:var(--acc-soft); color:var(--acc-txt); font-weight:600; box-shadow:inset 0 0 0 1px var(--acc-line); }
.tmshow { margin:0 !important; font-size:13px; } .tmshow.hidden { display:none; }
#tmAddBtn { display:inline-flex; align-items:center; gap:6px; } #tmAddBtn svg { width:16px; height:16px; }
.tmtable th.pc, .tmtable td.pc, .tmbox th.pc, .tmbox td.pc { text-align:center; width:74px; }
.tmtable td.pc { position:relative; white-space:nowrap; }
.tmtable tr.off td { opacity:.55; }
.tmwho { display:flex; align-items:center; gap:7px; } .tmwho b { font-weight:600; }
.pd { display:inline-block; width:8px; height:8px; border-radius:50%; background:#22C55E; flex:none; }
.pd.away { background:#F59E0B; }
.tmtune { background:none; border:0; padding:0 0 0 4px; color:var(--muted); cursor:pointer; vertical-align:middle; } .tmtune svg { width:14px; height:14px; } .tmtune:hover { color:var(--acc-ic); }
.tmlegend { display:flex; align-items:center; gap:6px; font-size:12px; color:var(--muted); margin-top:8px; } .tmlegend .pd + * {} .tmlegend .pd:nth-of-type(2) { margin-left:10px; } .tmlegend.hidden { display:none; }
.tmbox { width:560px; max-width:94vw; max-height:90vh; overflow:auto; }
.tmbox:has(.tdowner), .tmbox:has(.tdm) { width:820px; }
.tmbox input:not([type=checkbox]) { width:100%; box-sizing:border-box; }
.tmsec { font-size:13px; font-weight:600; margin:16px 0 8px; } .tmsec.sub { font-size:11.5px; font-weight:500; color:var(--muted); margin:12px 0 6px; }
.tmgrid { display:grid; grid-template-columns:1fr 1fr; gap:6px 16px; } .tmgrid .radio { margin:0; }
.tminbox { display:flex; align-items:center; justify-content:space-between; margin-top:16px; padding-top:12px; border-top:1px solid var(--line2); font-size:13px; }
.tdowner { display:flex; align-items:center; gap:10px; margin-top:10px; padding:10px 12px; border:1px solid var(--line2); border-radius:10px; }
.tdowner b { display:block; font-size:13px; } .tdowner small { color:var(--muted); font-size:11.5px; }
.okk { color:#16A34A; font-weight:700; } .nok { color:var(--muted); opacity:.6; }
.tbmenu .prs { display:flex; align-items:center; gap:10px; } .tbmenu .prs .chk { margin-left:auto; color:var(--acc-ic); visibility:hidden; } .tbmenu .prs.on .chk { visibility:visible; }
.tbav .online.away { background:#F59E0B; }
#side nav button.noperm { display:none !important; }

.tmvis{display:flex;align-items:flex-start;gap:8px;margin:6px 0}.tmvis span{display:flex;flex-direction:column;gap:1px}.tmvis small{font-size:12px}.tmvis input{margin-top:3px}
.tmseen{display:block;font-size:11.5px;color:var(--muted);margin-top:2px}
#tmBox label.tmvis{display:flex;justify-content:flex-start;align-items:flex-start;text-align:left;width:100%;gap:10px;cursor:pointer}
#tmBox label.tmvis input{flex:0 0 auto;width:auto;margin:3px 0 0}
#tmBox label.tmvis span{flex:1;align-items:flex-start}

.shcode{display:flex;gap:8px}.shcode input{flex:1;font-family:ui-monospace,Consolas,monospace;font-size:14px;letter-spacing:.2px}
#flModalBox .codein{width:100%;font-family:ui-monospace,Consolas,monospace;font-size:14px}

/* ===== Facebook (Meta Ads) ===== */
#tab-facebook .phead { align-items:center; }
.fbcard { padding:0; overflow:hidden; }
.fbtop { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:16px 18px 10px; flex-wrap:wrap; }
.fbtools { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.fbtools select, .fbtools input[type=date] { width:auto; height:36px; padding:0 10px; }
.fbsearch { display:flex; align-items:center; gap:6px; border:1px solid var(--line); border-radius:9px; padding:0 8px; height:36px; background:var(--card); min-width:320px; }
.fbsearch svg { width:15px; height:15px; color:var(--muted); flex:none; }
.fbsearch select { border:0; background:var(--acc-soft); color:var(--acc-txt); font-size:12px; font-weight:600; height:24px; padding:0 6px; border-radius:6px; width:auto; }
.fbsearch input { border:0; background:none; height:32px; padding:0 4px; flex:1; min-width:120px; box-shadow:none !important; }
.fblv { display:flex; justify-content:space-between; align-items:center; padding:0 18px; border-bottom:1px solid var(--line2); }
.fblvtabs { display:flex; gap:2px; }
.fblvtabs button { background:none; border:0; border-bottom:2px solid transparent; padding:10px 12px; font-size:13.5px; font-weight:500; color:var(--text2); cursor:pointer; margin-bottom:-1px; }
.fblvtabs button.on { color:var(--acc-txt); border-bottom-color:var(--accent); font-weight:600; }
.fbacts { display:flex; justify-content:space-between; align-items:center; padding:10px 18px; gap:8px; }
.fbacts .btn svg { width:14px; height:14px; margin-right:4px; vertical-align:-2px; }
.fbacts .btn[disabled] { opacity:.5; cursor:not-allowed; }
#fbMsg { padding:0 18px; } #fbMsg .warnbox { margin:0 0 10px; }
.fbempty { padding:14px 0 16px; display:flex; flex-direction:column; gap:4px; font-size:13.5px; }
.fbempty a { color:var(--acc-txt); font-weight:600; margin-top:4px; }
.fbtable { overflow-x:auto; }
.fbtable table { width:100%; border-collapse:collapse; font-size:13px; min-width:1100px; }
.fbtable th { text-align:left; font-size:12px; font-weight:600; color:var(--text2); padding:10px 12px; border-bottom:1px solid var(--line2); border-top:1px solid var(--line2); background:var(--panel); white-space:nowrap; }
.fbtable th small { display:block; font-weight:500; color:var(--muted); font-size:10.5px; }
.fbtable td { padding:10px 12px; border-bottom:1px solid var(--line2); vertical-align:middle; }
.fbtable .num { text-align:right; white-space:nowrap; }
.fbtable tfoot td { background:var(--panel); border-bottom:0; }
.fbname { font-weight:600; max-width:340px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.fbpair { display:flex; flex-direction:column; align-items:flex-end; line-height:1.35; }
.fbpair span { color:var(--muted); font-size:12px; }
.fbpair .pos { color:#16a34a; } .fbpair .neg { color:#dc2626; }
.fbv { display:inline-flex; align-items:center; gap:6px; font-size:12.5px; white-space:nowrap; }
.fbv i { width:7px; height:7px; border-radius:50%; background:#9ca3af; }
.fbv.ok i { background:#22c55e; } .fbv.wait i { background:#f59e0b; } .fbv.bad i { background:#ef4444; }
.sw.sm { width:32px; height:18px; } .sw.sm span::after { width:12px; height:12px; }
.fbinfo { margin:14px 0; padding:12px 14px; border:1px solid var(--line2); border-radius:10px; color:var(--text2); font-size:13px; background:var(--panel); }
.fbnone { padding:36px 0 20px; text-align:center; }
.fbprof { border:1px solid var(--line2); border-radius:12px; padding:14px; margin-top:12px; }
.fbprofh { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.fbaccs { width:100%; margin-top:12px; font-size:13px; }
.fbaccs th { font-size:12px; }
#fbPx > .card { display:block; }
.chip .xbtn { border:0; background:none; cursor:pointer; color:inherit; padding:0 0 0 4px; }
.sw.sm input:checked + span::after { left:17px; }
.fbtable table { min-width:980px; }
.fbtable th, .fbtable td { padding:10px 9px; }
.fbtable th:first-child, .fbtable td:first-child { padding-left:18px; }
.fbtable th:last-child, .fbtable td:last-child { padding-right:18px; }
.fbname { max-width:260px; }
#fbSelInfo .chip { display:inline-flex; align-items:center; gap:4px; font-size:12px; font-weight:600; padding:4px 8px; border-radius:99px; background:var(--acc-soft); color:var(--acc-txt); border:1px solid var(--acc-line); margin-left:4px; }
.fbmanual { margin-top:16px; border-top:1px solid var(--line2); padding-top:12px; }
.fbmanual summary { cursor:pointer; font-size:13px; font-weight:600; color:var(--text2); }
.fbmanual h2 { font-size:15px; }

/* confirmação de envio/leitura (igual ao WhatsApp): cinza = enviada/entregue, azul = visualizada */
.msg .meta .ack { display:inline-flex; vertical-align:-3px; margin-left:4px; color:var(--muted); }
.msg .meta .ack svg { width:16px; height:16px; stroke-width:2; }
.msg .meta .ack.read, html.light .msg .meta .ack.read { color:#53BDEB !important; }
html.light .msg .meta .ack.read { color:#34B7F1 !important; }
.maud .trb { font-weight:700; margin-left:4px; } .maud .trb[disabled] { opacity:.6; cursor:wait; }

/* player de áudio próprio (sem a "pílula" do navegador) */
.maud { display:flex; align-items:center; gap:10px; min-width:230px; max-width:320px; }
.maud audio { display:none !important; }
.maud .apl { width:38px; height:38px; flex:none; border-radius:50%; border:0; cursor:pointer; display:grid; place-items:center;
  background:var(--accent); color:#fff; }
.maud .apl svg { width:16px; height:16px; margin-left:2px; } .maud .apl.on svg { margin-left:0; }
.maud .apl:hover { filter:brightness(1.08); }
.maud .apmid { flex:1; min-width:110px; display:flex; flex-direction:column; gap:6px; }
.maud .aptrack { position:relative; height:4px; border-radius:4px; background:rgba(127,140,133,.35); cursor:pointer; }
.maud .aptrack::before { content:''; position:absolute; inset:-7px 0; }
.maud .aptrack i { position:absolute; left:0; top:0; bottom:0; width:0; border-radius:4px; background:var(--accent); }
.maud .aptime { font-size:11.5px; color:var(--muted); font-variant-numeric:tabular-nums; }
.maud .spd { flex:none; }
/* ondinha do áudio */
.maud .apwave { display:flex; align-items:center; gap:2px; height:26px; cursor:pointer; }
.maud .apwave i { flex:1; min-width:2px; max-width:4px; border-radius:2px; background:rgba(127,140,133,.55); transition:background .12s; }
.maud .apwave i.p { background:var(--accent); }
.maud .apmid { gap:3px; }

/* logo ScalyBot: "S" azul (sem fundo) + "Bot" em azul forte espelhado, puxando para o preto */
html.light .logo img { content:url(/logo-light.svg?v=2); }
.logo img { border-radius:0 !important; }
.logo span, html:is(.light, :not(.light)) .logo span {
  background:linear-gradient(180deg, #6FB2FF 0%, #1F7BFF 42%, #0B4FD1 70%, #062A73 100%); -webkit-background-clip:text; background-clip:text;
  color:transparent !important; -webkit-text-fill-color:transparent; }
html.light .logo span { background-image:linear-gradient(180deg, #2F86FF 0%, #0B5FE0 50%, #06307E 100%) !important; -webkit-background-clip:text !important; background-clip:text !important; }

/* nomes dos fluxos: branco mais opaco, no tom do texto da barra lateral */
html:not(.light) .flname a { color:#BCC3CD !important; font-weight:500; }
html:not(.light) .flname a:hover { color:#E6EAF0 !important; }
html.light .flname a { color:#374151 !important; font-weight:500; }

/* ===== Integrações de IA (catálogo Ativas / Disponíveis) ===== */
.aisearch { display:flex; align-items:center; gap:8px; border:1px solid var(--line); border-radius:9px; padding:0 10px; height:38px; margin:12px 0 18px; background:var(--field, var(--panel)); }
.aisearch svg { width:15px; height:15px; color:var(--muted); }
.aisearch input { border:0 !important; background:none !important; box-shadow:none !important; height:34px; padding:0; flex:1; }
.aisec { display:flex; justify-content:space-between; align-items:center; margin:14px 0 10px; font-size:11.5px; font-weight:600; letter-spacing:.06em; color:var(--text2); }
.aisec b { color:var(--text); margin-left:3px; }
.aiempty { border:1px dashed var(--line); border-radius:12px; padding:22px; text-align:center; color:var(--muted); font-size:13px; }
.aigrid { display:grid; grid-template-columns:repeat(auto-fill, minmax(215px, 1fr)); gap:12px; }
.aicard { border:1px solid var(--line); border-radius:12px; padding:14px; display:flex; flex-direction:column; gap:6px; background:var(--panel); min-height:170px; }
.aicard.act { border-color:var(--acc-line, var(--accent)); }
.aihead { display:flex; justify-content:space-between; align-items:center; }
.ailogo { width:28px; height:28px; border-radius:8px; display:grid; place-items:center; color:#fff; font-weight:800; font-size:13px; }
.aicat { font-size:9.5px; font-weight:600; letter-spacing:.06em; color:var(--muted); border:1px solid var(--line); border-radius:6px; padding:2px 6px; }
.ainame { font-size:14px; margin-top:4px; }
.aidesc { font-size:12.5px; color:var(--muted); margin:0; line-height:1.45; flex:1; }
.aikey { display:flex; justify-content:space-between; gap:8px; font-size:12px; color:var(--text2); background:var(--panel2, var(--hover)); border-radius:7px; padding:6px 8px; }
.aikey code { color:var(--muted); }
.aitags { display:flex; gap:5px; flex-wrap:wrap; } .aitags:empty { display:none; }
.aitag { font-size:11px; font-weight:600; padding:2px 8px; border-radius:99px; border:1px solid var(--line); color:var(--text2); }
.aitag.on { color:var(--acc-txt, var(--accent)); border-color:var(--acc-line, var(--accent)); background:var(--acc-soft, transparent); }
.aiacts { display:flex; justify-content:flex-end; align-items:center; gap:6px; margin-top:4px; }
.aiacts .ibtn svg { width:15px; height:15px; }
.pwrap { display:flex; gap:6px; align-items:center; } .pwrap input { flex:1; }
.ailogo { box-shadow:inset 0 0 0 1px rgba(255,255,255,.18); }
.aigrid > .aiempty { grid-column:1 / -1; }
