:root{--bg:#f4f6fa;--panel:#ffffff;--text:#111827;--muted:#6b7280;--line:#e5e7eb;--brand:#16a34a;--brand-dark:#15803d;--side:#0f172a;--side-text:#cbd5e1;--danger:#dc2626;--warn:#f59e0b;--radius:12px}*{box-sizing:border-box}body,html{margin:0;height:100%}body{font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;background:var(--bg);color:var(--text);font-size:15px;-webkit-font-smoothing:antialiased}a{color:inherit;text-decoration:none}h1{font-size:22px;margin:0 0 4px}h2{font-size:17px;margin:0 0 12px}p{margin:0}.muted{color:var(--muted)}.small{font-size:13px}label{display:block;font-weight:600;font-size:14px;margin:14px 0 6px}.hint{font-weight:400;color:var(--muted);font-size:13px;margin-top:2px}input[type=email],input[type=number],input[type=password],input[type=text],input[type=time],select,textarea{width:100%;border:1px solid var(--line);border-radius:10px;padding:10px 12px;font:inherit;background:#fff;color:var(--text)}textarea{resize:vertical;min-height:90px;line-height:1.45}input:focus,select:focus,textarea:focus{outline:2px solid #86efac;border-color:var(--brand)}.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;border:1px solid transparent;border-radius:10px;padding:10px 16px;font:inherit;font-weight:600;cursor:pointer;background:var(--brand);color:#fff}.btn:hover{background:var(--brand-dark)}.btn:disabled{opacity:.6;cursor:default}.btn.ghost{background:#fff;color:var(--text);border-color:var(--line)}.btn.ghost:hover{background:#f9fafb}.btn.danger{background:#fff;color:var(--danger);border-color:#fecaca}.btn.danger:hover{background:#fef2f2}.btn.sm{padding:6px 10px;font-size:13px}.error{background:#fef2f2;color:#991b1b;border:1px solid #fecaca;border-radius:10px}.error,.ok{padding:10px 12px;margin-top:12px;font-size:14px}.ok{background:#f0fdf4;color:#166534;border:1px solid #bbf7d0;border-radius:10px}.card{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);padding:20px}.auth{min-height:100vh;display:grid;place-items:center;padding:24px;background:linear-gradient(135deg,#0f172a,#14532d)}.auth .card{width:100%;max-width:400px;padding:28px}.auth .logo{font-weight:800;font-size:20px;margin-bottom:18px;display:flex;align-items:center;gap:8px}.auth .btn{width:100%;margin-top:20px}.auth .switch{margin-top:16px;text-align:center;font-size:14px;color:var(--muted)}.auth .switch a{color:var(--brand);font-weight:600}.shell{display:grid;grid-template-columns:230px 1fr;min-height:100vh}.side{background:var(--side);color:var(--side-text);padding:18px 12px;display:flex;flex-direction:column;gap:4px;position:-webkit-sticky;position:sticky;top:0;height:100vh}.side .brand{color:#fff;font-weight:800;font-size:17px;padding:6px 10px 2px}.side .account{font-size:13px;padding:0 10px 14px;color:#94a3b8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.side a.nav{display:flex;align-items:center;gap:10px;padding:10px;border-radius:10px;font-weight:500}.side a.nav:hover{background:#1e293b;color:#fff}.side a.nav.active{background:#14532d;color:#fff}.side .grow{flex:1 1}.side .status{font-size:13px;padding:10px;display:flex;align-items:center;gap:8px}.dot{width:9px;height:9px;border-radius:50%;display:inline-block;background:#94a3b8;flex:none}.dot.on{background:#22c55e}.dot.wait{background:var(--warn)}.dot.off{background:var(--danger)}.side form button{width:100%;background:transparent;border:0;color:var(--side-text);text-align:left;padding:10px;border-radius:10px;font:inherit;cursor:pointer}.side form button:hover{background:#1e293b;color:#fff}.main{padding:24px 28px;min-width:0}.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:18px;flex-wrap:wrap}.board{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(260px,1fr);grid-gap:14px;gap:14px;overflow-x:auto;padding-bottom:12px;align-items:start}.col{background:#eef1f6;border-radius:var(--radius);padding:10px;min-height:200px;transition:background .15s}.col.over{background:#dcfce7}.col-head{display:flex;align-items:center;justify-content:space-between;padding:4px 6px 10px;font-weight:700;font-size:14px}.col-head .count{background:#fff;border-radius:999px;padding:1px 9px;font-size:12px;color:var(--muted);font-weight:600}.col-head .bar{width:10px;height:10px;border-radius:3px;display:inline-block;margin-right:8px}.kcard{background:#fff;border:1px solid var(--line);border-radius:10px;padding:10px 12px;margin-bottom:8px;cursor:-webkit-grab;cursor:grab;display:block}.kcard:hover{border-color:#86efac;box-shadow:0 1px 6px rgba(0,0,0,.06)}.kcard.dragging{opacity:.5}.kcard .top{display:flex;justify-content:space-between;gap:8px;align-items:center}.kcard .name{font-weight:600;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kcard .last{color:var(--muted);font-size:13px;margin-top:4px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.kcard .meta{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px;align-items:center}.tag{font-size:11px;font-weight:600;padding:2px 8px;border-radius:999px;background:#f3f4f6;color:#374151}.tag.warn{background:#fef3c7;color:#92400e}.tag.paused{background:#e0e7ff;color:#3730a3}.tag.money{background:#dcfce7;color:#166534}.badge{background:var(--brand);color:#fff;border-radius:999px;font-size:11px;font-weight:700;padding:1px 7px}.empty{text-align:center;color:var(--muted);font-size:13px;padding:18px 8px}.chat-layout{display:grid;grid-template-columns:320px 1fr 300px;grid-gap:14px;gap:14px;height:calc(100vh - 110px)}.list{overflow-y:auto;padding:6px}.list a{display:block;padding:10px 12px;border-radius:10px}.list a:hover{background:#f3f4f6}.list a.active{background:#dcfce7}.list .row1{display:flex;justify-content:space-between;gap:8px;align-items:center}.chat{display:flex;flex-direction:column;padding:0;overflow:hidden}.chat-head{padding:12px 16px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;gap:8px}.msgs{flex:1 1;overflow-y:auto;padding:16px;background:#efeae2;display:flex;flex-direction:column;gap:6px}.msg{max-width:75%;padding:8px 10px;border-radius:10px;font-size:14px;line-height:1.4;white-space:pre-wrap;word-wrap:break-word;box-shadow:0 1px 1px rgba(0,0,0,.06)}.msg.in{background:#fff;align-self:flex-start}.msg.out{background:#d9fdd3;align-self:flex-end}.msg.out.humano{background:#dbeafe}.msg .who{font-weight:700;margin-bottom:2px}.msg .time,.msg .who{font-size:11px;color:var(--muted)}.msg .time{text-align:right;margin-top:2px}.composer{display:flex;gap:8px;padding:10px;border-top:1px solid var(--line)}.composer textarea{min-height:44px;height:44px}.details{overflow-y:auto}.qr-box{grid-template-columns:300px 1fr;grid-gap:28px;gap:28px;align-items:start}.qr,.qr-box{display:grid}.qr{width:280px;height:280px;border:1px solid var(--line);border-radius:12px;place-items:center;background:#fff}.qr img{width:264px;height:264px}ol.steps{padding-left:20px;line-height:1.8;margin:8px 0 0}.agent-layout{display:grid;grid-template-columns:1fr 380px;grid-gap:18px;gap:18px;align-items:start}.section{margin-bottom:16px}.hours-grid{display:grid;grid-template-columns:110px 70px 1fr 1fr;grid-gap:8px;gap:8px;align-items:center}.hours-grid input[type=time]{padding:7px 8px}.switch-row{display:flex;align-items:center;justify-content:space-between;gap:12px}.toggle{position:relative;width:46px;height:26px;flex:none}.toggle input{opacity:0;width:0;height:0}.toggle span{position:absolute;inset:0;background:#d1d5db;border-radius:999px;cursor:pointer;transition:.2s}.toggle span:before{content:"";position:absolute;width:20px;height:20px;left:3px;top:3px;background:#fff;border-radius:50%;transition:.2s}.toggle input:checked+span{background:var(--brand)}.toggle input:checked+span:before{transform:translateX(20px)}.test-chat{top:20px;flex-direction:column;height:calc(100vh - 60px);padding:0;overflow:hidden}.savebar,.test-chat{position:-webkit-sticky;position:sticky;display:flex}.savebar{bottom:0;background:var(--bg);padding:12px 0;gap:10px;align-items:center}@media (max-width:1100px){.chat-layout{grid-template-columns:260px 1fr}.details{display:none}.agent-layout{grid-template-columns:1fr}.test-chat{position:static;height:520px}}@media (max-width:760px){.shell{grid-template-columns:1fr}.side{position:static;height:auto;flex-direction:row;flex-wrap:wrap;align-items:center;padding:10px}.side .account,.side .grow{display:none}.side a.nav{padding:8px 10px}.main{padding:16px}.chat-layout{grid-template-columns:1fr;height:auto}.chat{height:70vh}.qr-box{grid-template-columns:1fr}.hours-grid{grid-template-columns:90px 50px 1fr 1fr}}.imp{margin:0 4px 14px;padding:10px;border-radius:10px;background:#78350f;color:#fef3c7;font-size:13px;display:flex;flex-direction:column;gap:4px}.imp strong{color:#fff;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.imp button{margin-top:6px;background:#fef3c7;color:#78350f;border:0;border-radius:8px;padding:6px 8px;font:inherit;font-weight:700;cursor:pointer}.stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-gap:12px;gap:12px;margin-bottom:16px}.stat{display:flex;flex-direction:column;gap:4px;padding:14px 16px}.stat strong{font-size:24px}.grid2{display:grid;grid-template-columns:1fr 1fr;grid-gap:0 16px;gap:0 16px}.created{border-color:#bbf7d0;background:#f0fdf4}.copybox{background:#fff;border:1px solid var(--line);border-radius:10px;padding:12px;white-space:pre-wrap;font-family:inherit;font-size:14px;margin:0 0 12px}.table{width:100%;border-collapse:collapse;font-size:14px}.table th{text-align:left;font-size:12px;text-transform:uppercase;letter-spacing:.03em;color:var(--muted);padding:10px 14px;white-space:nowrap}.table td,.table th{border-bottom:1px solid var(--line)}.table td{padding:12px 14px;vertical-align:middle}.table tr:last-child td{border-bottom:0}.row-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}@media (max-width:760px){.grid2,.stats{grid-template-columns:1fr}}