:root{--bg: #f4f6fb;--surface: #ffffff;--surface-2: #f0f3f9;--border: #e3e8f1;--text: #1b2236;--muted: #6b7690;--brand: #7c5cff;--brand-2: #22c3a6;--warn: #f59e0b;--danger: #ef4444;--ok: #16a34a;--bubble-out: #dcf8e8;--bubble-in: #ffffff;--radius: 16px;--shadow: 0 1px 2px rgba(20, 30, 60, .04), 0 8px 24px rgba(20, 30, 60, .06)}@media (prefers-color-scheme: dark){:root:not([data-theme=light]){--bg: #0d1120;--surface: #161c2e;--surface-2: #1d2540;--border: #262f4d;--text: #e8ecf7;--muted: #8d97b3;--bubble-out: #1f3b35;--bubble-in: #1d2540;--shadow: 0 8px 24px rgba(0, 0, 0, .35)}}:root[data-theme=dark]{--bg: #0d1120;--surface: #161c2e;--surface-2: #1d2540;--border: #262f4d;--text: #e8ecf7;--muted: #8d97b3;--bubble-out: #1f3b35;--bubble-in: #1d2540}*{box-sizing:border-box}html,body,#root{height:100%}body{margin:0;font-family:Inter,system-ui,-apple-system,Segoe UI,sans-serif;background:var(--bg);color:var(--text);-webkit-font-smoothing:antialiased}button,input,select,textarea{font:inherit;color:inherit}h1,h2,h3{margin:0;letter-spacing:-.01em}h1{font-size:26px}h2{font-size:18px}h3{font-size:16px}p{margin:0}code{background:var(--surface-2);padding:1px 6px;border-radius:6px;font-size:12px}.muted{color:var(--muted)}.small{font-size:12px}.mobile-only{display:none}.shell{display:grid;grid-template-columns:240px 1fr;height:100vh}.sidebar{background:linear-gradient(180deg,#1d1f3d,#14162b);color:#e6e9f7;padding:22px 14px;display:flex;flex-direction:column;gap:22px}.brand{display:flex;gap:12px;align-items:center;padding:0 8px}.brand strong{display:block;font-size:16px}.brand span{font-size:12px;opacity:.6}.brand-logo{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;color:#fff;background:linear-gradient(135deg,var(--brand),var(--brand-2));box-shadow:0 6px 18px #7c5cff59}.brand-logo.big{width:64px;height:64px;border-radius:20px;margin:0 auto 8px}.sidebar nav{display:flex;flex-direction:column;gap:4px}.sidebar nav button{display:flex;align-items:center;gap:12px;padding:10px 12px;border:0;background:transparent;color:#b9bfdc;border-radius:12px;cursor:pointer;text-align:left;font-size:14px}.sidebar nav button:hover{background:#ffffff0f;color:#fff}.sidebar nav button.active{background:#7c5cff38;color:#fff}.sidebar-foot{margin-top:auto;display:flex;flex-direction:column;gap:10px;font-size:13px}.sidebar-foot .me{display:flex;gap:8px;align-items:center;opacity:.75;overflow:hidden;text-overflow:ellipsis}.demo-pill{display:flex;gap:8px;align-items:center;padding:8px 12px;border-radius:999px;background:#22c3a626;color:#7fe7d3;font-size:12px}.main{overflow:auto;min-width:0}button{cursor:pointer}.primary{display:inline-flex;gap:8px;align-items:center;justify-content:center;background:linear-gradient(135deg,var(--brand),#9b7dff);color:#fff;border:0;padding:10px 18px;border-radius:12px;font-weight:600;box-shadow:0 6px 16px #7c5cff4d}.primary:disabled{opacity:.5;cursor:not-allowed}.primary.ok{background:var(--ok);box-shadow:none}.ghost{display:inline-flex;gap:6px;align-items:center;background:transparent;border:1px solid var(--border);padding:8px 12px;border-radius:10px;color:var(--muted)}.ghost:hover{color:var(--text);background:var(--surface-2)}.ghost.danger:hover{color:var(--danger)}.ghost.small,.primary.small{padding:6px 10px;font-size:13px}.icon-btn{background:transparent;border:0;padding:6px;border-radius:10px;color:var(--muted)}label{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:500;margin-bottom:14px}input[type=text],input:not([type]),input[type=email],input[type=password],input[type=number],select,textarea{background:var(--surface-2);border:1px solid var(--border);border-radius:12px;padding:10px 12px;outline:none;width:100%}input:focus,select:focus,textarea:focus{border-color:var(--brand);box-shadow:0 0 0 3px #7c5cff26}textarea{resize:vertical;line-height:1.5}input[type=range]{accent-color:var(--brand)}.hint{font-size:12px;color:var(--muted);font-weight:400}.error{background:#ef44441a;color:var(--danger);padding:10px 12px;border-radius:10px;font-size:13px}.switch{position:relative;display:inline-flex;align-items:center;gap:10px;cursor:pointer;margin:0;flex-direction:row;font-weight:500}.switch input{position:absolute;opacity:0;pointer-events:none}.switch .track{width:42px;height:24px;border-radius:999px;background:var(--border);position:relative;transition:.2s}.switch .thumb{position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0003;transition:.2s}.switch input:checked+.track{background:linear-gradient(135deg,var(--brand),var(--brand-2))}.switch input:checked+.track .thumb{transform:translate(18px)}.switch.sm .track{width:34px;height:20px}.switch.sm .thumb{width:14px;height:14px}.switch.sm input:checked+.track .thumb{transform:translate(14px)}.spinner{width:28px;height:28px;border-radius:50%;border:3px solid var(--border);border-top-color:var(--brand);animation:spin .8s linear infinite;margin:40vh auto}@keyframes spin{to{transform:rotate(360deg)}}.splash{height:100vh}.login{min-height:100vh;display:grid;place-items:center;padding:16px;background:radial-gradient(circle at 20% 10%,rgba(124,92,255,.18),transparent 40%),radial-gradient(circle at 80% 90%,rgba(34,195,166,.18),transparent 40%),var(--bg)}.login-card{width:min(380px,100%);background:var(--surface);border:1px solid var(--border);border-radius:22px;padding:32px 28px;box-shadow:var(--shadow);text-align:center}.login-card h1{margin-bottom:4px}.login-card label{text-align:left}.login-card button.primary{width:100%;margin-top:6px}.page{padding:28px 32px;max-width:1200px;margin:0 auto}.page-head{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;margin-bottom:22px;flex-wrap:wrap}.page-head p{margin-top:4px}.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:20px;box-shadow:var(--shadow)}.card-row{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px}.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:18px;align-items:start}.grid-2.tight{gap:12px}.center{text-align:center}.empty{color:var(--muted);text-align:center}.inbox{display:grid;grid-template-columns:340px 1fr;height:100vh}.conv-list{border-right:1px solid var(--border);background:var(--surface);display:flex;flex-direction:column;min-height:0}.conv-list header{padding:18px 16px 10px;display:flex;flex-direction:column;gap:12px}.search{position:relative}.search svg{position:absolute;left:12px;top:50%;transform:translateY(-50%);color:var(--muted)}.search input{padding-left:38px}.chips{display:flex;gap:6px;flex-wrap:wrap}.chip{border:1px solid var(--border);background:transparent;border-radius:999px;padding:5px 11px;font-size:12px;color:var(--muted)}.chip.on{background:var(--brand);border-color:var(--brand);color:#fff}.conv-list ul{list-style:none;margin:0;padding:6px;overflow:auto;flex:1}.conv-list li{display:flex;gap:12px;padding:12px;border-radius:14px;cursor:pointer;align-items:flex-start}.conv-list li:hover{background:var(--surface-2)}.conv-list li.sel{background:linear-gradient(90deg,#7c5cff24,#7c5cff0a)}.conv-list li.empty{cursor:default;justify-content:center}.conv-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}.conv-body .row{display:flex;justify-content:space-between;align-items:center;gap:8px}.conv-body strong{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.conv-body time{font-size:11px;color:var(--muted);white-space:nowrap}.preview{font-size:13px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.badge{background:var(--brand);color:#fff;font-size:11px;font-weight:700;min-width:20px;height:20px;border-radius:999px;display:grid;place-items:center;padding:0 6px}.tags{display:flex;gap:6px;flex-wrap:wrap}.tag{font-size:10px;padding:2px 8px;border-radius:999px;background:var(--surface-2);color:var(--muted);font-weight:600}.tag.human{background:#22c3a626;color:#13917a}.tag.warn{background:#f59e0b26;color:#b26a00}.avatar{border-radius:50%;color:#fff;display:grid;place-items:center;font-weight:700;flex-shrink:0}.chat{display:flex;flex-direction:column;min-width:0;min-height:0;height:100vh;background:var(--bg);background-image:radial-gradient(var(--border) 1px,transparent 1px);background-size:22px 22px}.chat-empty{margin:auto;text-align:center}.chat-empty h3{margin-bottom:6px}.chat-head{display:flex;align-items:center;gap:12px;padding:14px 20px;background:var(--surface);border-bottom:1px solid var(--border);flex-wrap:wrap}.chat-head .who{flex:1;min-width:120px;display:flex;flex-direction:column}.chat-head .who span{font-size:12px;color:var(--muted);display:flex;align-items:center;gap:4px}.chat-head select{width:auto;padding:7px 10px;border-radius:10px}.switch-label{font-size:12px;color:var(--muted)}.messages{flex:1;overflow:auto;padding:22px 20px;display:flex;flex-direction:column;gap:10px}.bubble{max-width:min(560px,80%);padding:10px 14px 6px;border-radius:16px;box-shadow:0 1px 2px #0000000d;background:var(--bubble-in);border:1px solid var(--border);animation:pop .25s ease-out}.bubble.outbound{align-self:flex-end;background:var(--bubble-out);border-color:transparent;border-bottom-right-radius:4px}.bubble.inbound{align-self:flex-start;border-bottom-left-radius:4px}.bubble.outbound.bot,.bubble.bot-sim{border-left:3px solid var(--brand)}.bubble.outbound.agent{border-right:3px solid var(--brand-2)}.bubble p{white-space:pre-wrap;line-height:1.5;font-size:14px}.bubble time{display:block;text-align:right;font-size:11px;color:var(--muted);margin-top:4px}.who-tag{font-size:11px;color:var(--muted);font-weight:600;display:block;margin-bottom:2px}.ticks.read{color:var(--brand-2)}.ticks.failed{color:var(--danger)}@keyframes pop{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}.composer{display:flex;gap:10px;align-items:flex-end;padding:14px 18px;background:var(--surface);border-top:1px solid var(--border)}.composer textarea{flex:1;max-height:140px;border-radius:16px}.composer input{flex:1;border-radius:999px}.send{width:44px;height:44px;border-radius:50%;border:0;display:grid;place-items:center;color:#fff;flex-shrink:0;background:linear-gradient(135deg,var(--brand),var(--brand-2))}.send:disabled{opacity:.45;cursor:not-allowed}.playground h3{display:flex;align-items:center;gap:8px;margin-bottom:4px}.phone{margin-top:14px;border-radius:20px;overflow:hidden;border:1px solid var(--border);background:var(--bg);display:flex;flex-direction:column;height:460px}.phone-head{background:#075e54;color:#fff;padding:12px 14px;display:flex;align-items:center;gap:10px;font-weight:600}.phone-head .dot{width:8px;height:8px;border-radius:50%;background:#25d366}.phone-body{flex:1;overflow:auto;padding:14px;display:flex;flex-direction:column;gap:8px;background:var(--bg)}.phone-empty{margin:auto;color:var(--muted);font-size:13px;text-align:center}.phone form.composer{border-radius:0}.typing{display:flex;gap:4px;padding:12px 14px}.typing span{width:7px;height:7px;border-radius:50%;background:var(--muted);animation:blink 1.2s infinite}.typing span:nth-child(2){animation-delay:.2s}.typing span:nth-child(3){animation-delay:.4s}@keyframes blink{0%,80%,to{opacity:.2}40%{opacity:1}}.kb-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:16px}.kb.off{opacity:.55}.kb p{font-size:14px;color:var(--muted);line-height:1.5;white-space:pre-wrap}.kb-actions{display:flex;justify-content:space-between;margin-top:14px}.kb .card-row{margin-bottom:8px}.modal-bg{position:fixed;top:0;right:0;bottom:0;left:0;background:#0a0e1e80;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);display:grid;place-items:center;padding:16px;z-index:10}.modal{width:min(520px,100%)}.modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:6px}.tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:14px;margin-bottom:18px}.tile{display:flex;flex-direction:column;gap:8px}.tile strong{font-size:30px;letter-spacing:-.02em}.tile.warn strong{color:var(--warn)}.bars{height:220px;display:flex;align-items:flex-end;gap:12px;margin-top:18px}.bar-col{flex:1;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:6px}.bar{width:100%;border-radius:10px 10px 4px 4px;background:linear-gradient(180deg,var(--brand),var(--brand-2));min-height:4px}.bar-val{font-size:11px;color:var(--muted)}.bar-label{font-size:11px;color:var(--muted);text-transform:capitalize}.ring{width:180px;height:180px;border-radius:50%;margin:18px auto 12px;display:grid;place-items:center;background:conic-gradient(var(--brand) calc(var(--p) * 1%),var(--surface-2) 0);position:relative}.ring:before{content:"";position:absolute;top:16px;right:16px;bottom:16px;left:16px;border-radius:50%;background:var(--surface)}.ring span{position:relative;font-size:34px;font-weight:700}@media (max-width: 900px){.shell{grid-template-columns:1fr;height:auto}.sidebar{flex-direction:row;align-items:center;padding:10px 12px;gap:10px;position:sticky;top:0;z-index:5}.brand span,.sidebar-foot .me,.sidebar nav span{display:none}.sidebar nav{flex-direction:row;flex:1;justify-content:space-around}.sidebar nav button{padding:8px}.sidebar-foot{margin:0;flex-direction:row}.sidebar-foot .demo-pill{display:none}.grid-2{grid-template-columns:1fr}.page{padding:20px 16px}.inbox{grid-template-columns:1fr;height:calc(100vh - 62px)}.conv-list{border-right:0}.inbox.has-selection .conv-list{display:none}.inbox:not(.has-selection) .chat{display:none}.chat{height:auto;flex:1}.mobile-only{display:inline-block}.bubble{max-width:88%}.chat-head .switch-label{display:none}}
