:root{
  --bg:#f4f6f5; --ink:#14201b; --muted:#5d6b65; --line:#dfe5e2; --card:#fff;
  --teal:#0e7c66; --teal2:#e3f3ee; --wa:#008069; --wabg:#efeae2; --out:#d9fdd3; --red:#d6453d; --amber:#b7791f;
  --f:'Manrope',system-ui,sans-serif;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--bg);color:var(--ink);font-family:var(--f);font-size:15px;line-height:1.5}
button{font:inherit;cursor:pointer}
code{background:#eef2f0;border-radius:5px;padding:1px 6px;font-size:.92em}
.hide{display:none!important}

.top{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px max(16px,4vw);background:#fff;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:5}
.brand{display:flex;gap:10px;align-items:center}
.brand b{display:block;font-size:17px;line-height:1.1}
.brand small{color:var(--muted);font-size:12.5px}
.mark{width:36px;height:36px;border-radius:11px;background:var(--teal);color:#fff;display:grid;place-items:center;font-weight:800;font-size:18px}
.top nav{display:flex;gap:14px;align-items:center}
.top nav a{color:var(--teal);font-weight:700;text-decoration:none;font-size:14px}
.ghost{background:none;border:1px solid var(--line);border-radius:999px;padding:7px 14px;font-weight:700;color:var(--ink)}
.ghost:hover{border-color:var(--teal);color:var(--teal)}

.intro{max-width:1220px;margin:0 auto;padding:30px max(16px,4vw) 8px}
.intro h1{font-size:clamp(26px,3.4vw,38px);line-height:1.1;letter-spacing:-.02em;margin:0 0 10px;max-width:22ch}
.intro p{margin:0 0 6px;color:var(--muted);max-width:78ch}
.intro .note{font-size:13px}

.stage{max-width:1220px;margin:0 auto;padding:20px max(16px,4vw) 40px;display:grid;grid-template-columns:400px minmax(0,1fr);gap:28px;align-items:start}
@media (max-width:980px){.stage{grid-template-columns:1fr}.phone-col{justify-self:center;width:100%;max-width:420px}}

/* ---------- celular ---------- */
.phone-col{position:sticky;top:76px}
@media (max-width:980px){.phone-col{position:static}}
.chips{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px}
.chips button{border:1px solid var(--line);background:#fff;border-radius:999px;padding:6px 12px;font-size:13px;font-weight:700;color:var(--ink)}
.chips button:hover{border-color:var(--teal);color:var(--teal)}
.phone{height:min(720px,calc(100vh - 150px));min-height:520px;border-radius:34px;border:10px solid #111;background:var(--wabg);display:flex;flex-direction:column;overflow:hidden;position:relative;box-shadow:0 30px 60px -20px rgba(20,32,27,.35);font-family:system-ui,-apple-system,'Segoe UI',Roboto,sans-serif}
.wa-head{background:var(--wa);color:#fff;display:flex;align-items:center;gap:10px;padding:12px 12px 10px}
.wa-head .back{font-size:26px;line-height:1;opacity:.9}
.wa-head .ava{width:38px;height:38px;border-radius:50%;background:#fff;color:var(--wa);display:grid;place-items:center;font-weight:800}
.wa-head .who{flex:1;min-width:0}
.wa-head b{display:block;font-size:15.5px;font-weight:600}
.wa-head small{font-size:12.5px;opacity:.9}
.wa-head .ico{font-size:20px;opacity:.9}
.wa-body{flex:1;overflow-y:auto;padding:12px 10px 8px;display:flex;flex-direction:column;gap:3px;
  background-color:var(--wabg);background-image:radial-gradient(rgba(0,0,0,.035) 1px,transparent 1px);background-size:14px 14px}
.day{align-self:center;background:#fff;color:#54656f;font-size:11.5px;padding:4px 10px;border-radius:7px;margin:4px 0 8px;box-shadow:0 1px .5px rgba(0,0,0,.13)}
.enc{align-self:center;background:#ffeecd;color:#54656f;font-size:12px;padding:6px 10px;border-radius:7px;text-align:center;max-width:90%;margin-bottom:8px}
.sys{align-self:center;background:#e1f2fb;color:#1d5a74;font-size:12px;font-weight:600;padding:5px 10px;border-radius:7px;margin:8px 0;text-align:center;max-width:92%}
.msg{max-width:82%;padding:6px 9px 7px;border-radius:8px;font-size:14.5px;line-height:1.38;position:relative;box-shadow:0 1px .5px rgba(0,0,0,.13);white-space:pre-wrap;word-wrap:break-word;animation:pop .18s ease-out}
@keyframes pop{from{transform:translateY(4px);opacity:0}to{transform:none;opacity:1}}
.msg.in{align-self:flex-start;background:#fff}
.msg.out{align-self:flex-end;background:var(--out)}
.msg.first.in{border-top-left-radius:0;margin-top:6px}
.msg.first.out{border-top-right-radius:0;margin-top:6px}
.msg .meta{float:right;font-size:11px;color:#667781;margin:6px 0 -4px 10px;display:flex;gap:3px;align-items:center}
.msg .tick{color:#53bdeb;font-size:12px;letter-spacing:-3px}
.msg .from{display:block;font-size:12.5px;font-weight:700;color:#c2410c;margin-bottom:1px}
.msg.typing{display:flex;gap:4px;padding:11px 12px}
.msg.typing i{width:7px;height:7px;border-radius:50%;background:#9aa5a0;animation:blink 1.2s infinite}
.msg.typing i:nth-child(2){animation-delay:.2s}.msg.typing i:nth-child(3){animation-delay:.4s}
@keyframes blink{0%,80%,100%{opacity:.3}40%{opacity:1}}
.audio{display:flex;align-items:center;gap:8px;min-width:220px}
.audio button{width:32px;height:32px;border:0;border-radius:50%;background:none;color:#54656f;font-size:18px;display:grid;place-items:center}
.wave{flex:1;display:flex;align-items:center;gap:2px;height:28px}
.wave i{flex:1;background:#a8b5ad;border-radius:2px;min-width:2px}
.wave.played i{background:#4fa3c7}
.audio .dur{font-size:11.5px;color:#667781}
.audio .av{width:34px;height:34px;border-radius:50%;background:#cfd8d3;display:grid;place-items:center;font-size:15px;color:#fff;position:relative}
.audio .av::after{content:'🎤';position:absolute;right:-4px;bottom:-4px;font-size:12px}
.transc{display:block;font-size:12.5px;color:#54656f;border-top:1px solid rgba(0,0,0,.08);margin-top:5px;padding-top:4px;font-style:italic}
.wa-input{display:flex;gap:6px;align-items:flex-end;padding:7px 7px 9px;background:transparent}
.field{flex:1;background:#fff;border-radius:24px;display:flex;align-items:center;padding:0 14px;min-height:46px;box-shadow:0 1px .5px rgba(0,0,0,.13)}
.field input{border:0;outline:0;font:inherit;font-size:15px;width:100%;background:none}
.round{width:46px;height:46px;flex:0 0 46px;border-radius:50%;border:0;background:var(--wa);color:#fff;display:grid;place-items:center}
.round:disabled{opacity:.5}
.round.red{background:var(--red);width:40px;height:40px;flex-basis:40px;font-size:14px}
.rec{position:absolute;left:0;right:0;bottom:0;background:#fff;display:flex;align-items:center;gap:10px;padding:10px 12px;border-top:1px solid var(--line)}
.rec .dot{width:10px;height:10px;border-radius:50%;background:var(--red);animation:blink 1s infinite}
.rec-hint{flex:1;color:var(--muted);font-size:13px}

/* ---------- painel ---------- */
.panel{display:flex;flex-direction:column;gap:16px;min-width:0}
.panel-head{display:flex;justify-content:space-between;align-items:flex-end;gap:12px;flex-wrap:wrap}
.eyebrow{font-size:11.5px;font-weight:800;letter-spacing:.1em;color:var(--teal)}
.panel h2,.prod h2{margin:2px 0 0;font-size:22px;letter-spacing:-.01em}
.sync{font-size:12.5px;color:var(--muted);display:flex;align-items:center;gap:6px;background:#fff;border:1px solid var(--line);border-radius:999px;padding:5px 11px}
.sync i{width:8px;height:8px;border-radius:50%;background:#22a06b;box-shadow:0 0 0 3px #d6f2e5}
.row2{display:grid;grid-template-columns:1fr 1fr;gap:16px}
@media (max-width:640px){.row2{grid-template-columns:1fr}}
.card{background:var(--card);border:1px solid var(--line);border-radius:16px;padding:16px 18px}
.card-t{font-weight:800;font-size:14.5px;margin-bottom:10px;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.live{font-size:10.5px;font-weight:800;color:#fff;background:var(--teal);border-radius:5px;padding:1px 6px;letter-spacing:.05em}
.pill{display:inline-flex;align-items:center;gap:6px;font-weight:800;font-size:13px;border-radius:999px;padding:5px 12px}
.pill::before{content:'';width:8px;height:8px;border-radius:50%;background:currentColor}
.pill.on{background:#dcf5ea;color:#13734f}
.pill.off{background:#fdecd2;color:#9a5b0f}
.hint{color:var(--muted);font-size:13px;margin:8px 0 10px}
.btn{background:var(--ink);color:#fff;border:0;border-radius:10px;padding:9px 14px;font-weight:800;font-size:13.5px}
.btn.alt{background:var(--teal)}
.btn.sm{padding:8px 12px}
.human{display:flex;gap:6px;margin-top:10px}
.human input{flex:1;min-width:0;border:1px solid var(--line);border-radius:10px;padding:8px 10px;font:inherit;font-size:13.5px}
.kw{font-size:12px;color:var(--muted);margin:10px 0 0}
.ficha{margin:0;display:grid;grid-template-columns:auto 1fr;gap:6px 12px;font-size:13.5px}
.ficha dt{color:var(--muted)}
.ficha dd{margin:0;font-weight:700}
.ficha dd.flash{animation:flash 1.2s}
.ficha .empty{grid-column:1/-1;color:var(--muted)}
.prio-urgente{color:var(--red)}.prio-atencao{color:var(--amber)}
@keyframes flash{0%{background:#fff3b0}100%{background:transparent}}

.tabs{margin-left:auto;display:flex;gap:4px;background:#eef2f0;border-radius:10px;padding:3px}
.tabs button{border:0;background:none;border-radius:8px;padding:5px 10px;font-weight:700;font-size:12.5px;color:var(--muted)}
.tabs button.act{background:#fff;color:var(--ink);box-shadow:0 1px 2px rgba(0,0,0,.08)}
.tabs button .n{display:inline-block;min-width:16px;margin-left:4px;font-size:11px;background:var(--teal);color:#fff;border-radius:8px;padding:0 4px}
.legend{display:flex;gap:14px;font-size:12px;color:var(--muted);margin-bottom:8px;flex-wrap:wrap}
.lg{display:inline-block;width:10px;height:10px;border-radius:3px;margin-right:5px;vertical-align:-1px}
.lg.busy{background:#e4e9e6}.lg.bia{background:var(--teal)}.lg.off{background:repeating-linear-gradient(45deg,#f1f3f2 0 3px,#e2e6e4 3px 6px)}
.grid-wrap{overflow-x:auto}
.grid{display:grid;grid-template-columns:44px repeat(6,minmax(92px,1fr));gap:3px;min-width:600px;font-size:12px}
.gh{text-align:center;padding:4px 2px 6px;font-weight:800;line-height:1.2}
.gh small{display:block;font-weight:700;font-size:10.5px;color:var(--teal);text-transform:uppercase;letter-spacing:.03em}
.gh.today{color:var(--teal)}
.gt{color:var(--muted);text-align:right;padding-right:6px;font-size:11.5px;line-height:30px}
.c{height:30px;border-radius:6px;background:#fafbfa;border:1px dashed #e8ecea}
.c.busy{background:#e4e9e6;border:0;color:#7b8781;font-size:11px;padding:0 6px;line-height:30px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.c.off{background:repeating-linear-gradient(45deg,#f6f7f7 0 4px,#eceeed 4px 8px);border:0}
.c.past{opacity:.45}
.c.bia{background:var(--teal);color:#fff;border:0;font-weight:800;padding:0 6px;line-height:30px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:11.5px}
.c.bia.new{animation:ring 1.6s ease-out 2}
@keyframes ring{0%{box-shadow:0 0 0 0 rgba(14,124,102,.6)}100%{box-shadow:0 0 0 12px rgba(14,124,102,0)}}
.log{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px;max-height:240px;overflow:auto;font-size:13px}
.log li{display:flex;gap:8px;align-items:flex-start}
.log li .t{color:var(--muted);font-size:11.5px;min-width:38px;padding-top:1px}
.log li .k{font-size:10.5px;font-weight:800;border-radius:5px;padding:1px 6px;text-transform:uppercase;letter-spacing:.04em;background:#eef2f0;color:var(--muted);white-space:nowrap}
.log li .k.agendou,.log li .k.remarcou{background:#dcf5ea;color:#13734f}
.log li .k.humano,.log li .k.cancelou{background:#fdecd2;color:#9a5b0f}
.log li .k.audio{background:#e1f2fb;color:#1d5a74}
.log .empty{color:var(--muted)}

/* ---------- produção ---------- */
.prod{max-width:1220px;margin:0 auto;padding:30px max(16px,4vw) 50px;border-top:1px solid var(--line)}
.flow{display:flex;align-items:stretch;gap:8px;flex-wrap:wrap;margin:18px 0 26px}
.node{background:#fff;border:1px solid var(--line);border-radius:14px;padding:12px 14px;min-width:150px;flex:1}
.node b{display:block}.node small{color:var(--muted);font-size:12.5px}
.node.main{border-color:var(--teal);background:var(--teal2)}
.arr{align-self:center;color:var(--teal);font-weight:800;font-size:20px}
@media (max-width:820px){.arr{display:none}}
.cols{display:grid;grid-template-columns:1fr 1fr;gap:24px}
@media (max-width:700px){.cols{grid-template-columns:1fr}}
.cols h3{margin:0 0 8px;font-size:16px}
.cols ul{margin:0;padding-left:18px;display:grid;gap:5px}
.small{font-size:13px;color:var(--muted)}
.foot{text-align:center;color:var(--muted);font-size:12.5px;padding:0 0 30px}
