:root{--bg: #f6f7f9;--panel: #ffffff;--border: #e3e6ea;--text: #1d2329;--muted: #6b7480;--accent: #c13584;--urgente: #d93025;--alta: #e8710a;--normal: #1a73e8;--baixa: #9aa0a6;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;color:var(--text);background:var(--bg)}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}.muted{color:var(--muted)}.small{font-size:12px}.right{margin-left:auto}.error{background:#fde8e7;color:var(--urgente);padding:8px 12px;margin:8px;border-radius:6px}.empty{color:var(--muted);padding:24px;text-align:center}.layout{display:grid;grid-template-columns:220px 360px 1fr;height:100vh}.sidebar{background:var(--panel);border-right:1px solid var(--border);padding:16px;overflow-y:auto}.sidebar h1{font-size:18px;margin:0;color:var(--accent)}.sidebar nav{display:flex;flex-direction:column;gap:2px;margin-top:16px}.sidebar nav button{display:flex;justify-content:space-between;border:0;background:none;padding:8px 10px;border-radius:6px;cursor:pointer;text-align:left}.sidebar nav button:hover{background:var(--bg)}.sidebar nav button.active{background:#fbe9f3;color:var(--accent);font-weight:600}.count{color:var(--muted);font-variant-numeric:tabular-nums}.prio-summary{display:flex;flex-wrap:wrap;gap:4px;margin-top:16px}.list{border-right:1px solid var(--border);display:flex;flex-direction:column;overflow:hidden}.filters{display:flex;gap:6px;padding:10px;border-bottom:1px solid var(--border);background:var(--panel);flex-wrap:wrap}.filters input{flex:1 1 100%}.filters input,.filters select{padding:6px 8px;border:1px solid var(--border);border-radius:6px;background:#fff}.filters select{flex:1}.list ul{list-style:none;margin:0;padding:0;overflow-y:auto}.list li{padding:10px 12px;border-bottom:1px solid var(--border);cursor:pointer;background:var(--panel)}.list li:hover{background:#fafbfc}.list li.selected{background:#fbe9f3}.row{display:flex;align-items:center;gap:6px;margin-bottom:4px}.preview{color:var(--muted);font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.unread{background:var(--accent);color:#fff;border-radius:10px;font-size:11px;padding:0 6px}.dot{width:10px;height:10px;border-radius:50%;flex-shrink:0}.dot.prio-urgente{background:var(--urgente)}.dot.prio-alta{background:var(--alta)}.dot.prio-normal{background:var(--normal)}.dot.prio-baixa{background:var(--baixa)}.badge{display:inline-block;font-size:11px;padding:1px 7px;border-radius:10px;background:#eef0f3;color:#3c4043}.badge.prio-urgente{background:#fde8e7;color:var(--urgente)}.badge.prio-alta{background:#fef0e1;color:var(--alta)}.badge.prio-normal{background:#e8f0fe;color:var(--normal)}.badge.neg,.badge.cat-reclamacao{background:#fde8e7;color:var(--urgente)}.badge.cat-lead{background:#e6f4ea;color:#137333}.badge.cat-spam{background:#f1f3f4;color:var(--baixa)}.badge.cat-parceria{background:#f3e8fd;color:#8430ce}.detail{overflow:hidden;display:flex}.conversation{display:flex;flex-direction:column;width:100%;height:100vh}.conversation header{display:flex;justify-content:space-between;gap:16px;padding:14px 18px;background:var(--panel);border-bottom:1px solid var(--border);flex-wrap:wrap}.conversation h2{margin:0 0 4px;font-size:18px}.reasons{margin:6px 0 0;padding-left:18px;font-size:12px;color:var(--muted)}.controls{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:8px;min-width:300px;flex:1;max-width:560px}.controls label{display:flex;flex-direction:column;font-size:11px;color:var(--muted);gap:2px}.controls select,.controls input{padding:5px 6px;border:1px solid var(--border);border-radius:6px;color:var(--text);background:#fff}.messages{flex:1;overflow-y:auto;padding:18px;display:flex;flex-direction:column;gap:8px}.bubble{max-width:70%;padding:8px 12px;border-radius:14px;white-space:pre-wrap;word-break:break-word}.bubble.in{background:var(--panel);border:1px solid var(--border);align-self:flex-start}.bubble.out{background:var(--accent);color:#fff;align-self:flex-end}.audio-label{display:block;font-size:11px;opacity:.7;margin-bottom:2px}.bubble .meta{font-size:10px;opacity:.7;margin-top:4px}.conversation footer{background:var(--panel);border-top:1px solid var(--border);padding:10px 18px}.window{font-size:12px;padding:6px 10px;border-radius:6px;margin-bottom:8px}.window.ok{background:#e6f4ea;color:#137333}.window.warn{background:#fef0e1;color:#b05a00}.window.blocked{background:#fde8e7;color:var(--urgente)}.composer{display:flex;gap:8px;align-items:stretch}.composer .agent{width:120px;padding:6px 8px;border:1px solid var(--border);border-radius:6px}.composer textarea{flex:1;min-height:60px;resize:vertical;padding:8px;border:1px solid var(--border);border-radius:6px}.composer button,.gate button{background:var(--accent);color:#fff;border:0;padding:0 18px;border-radius:6px;cursor:pointer}.composer button:disabled{opacity:.45;cursor:not-allowed}.gate{max-width:320px;margin:15vh auto;display:flex;flex-direction:column;gap:10px}.gate input{padding:8px;border:1px solid var(--border);border-radius:6px}.gate button{padding:10px}@media(max-width:900px){.layout{grid-template-columns:1fr;height:auto}.sidebar,.list{border-right:0}.conversation{height:auto;min-height:80vh}}
