:root{--bg: #f5f7fb;--surface: #ffffff;--surface-2: #f0f3f9;--text: #111827;--muted: #6b7280;--border: #e3e7ef;--brand: #2563eb;--brand-soft: #e8efff;--success: #16a34a;--danger: #dc2626;--warn: #d97706;--note: #fff7d6;--note-border: #f2d675;--bot-bg: #efe9ff;--bot-border: #d6c8ff;--shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);--radius: 12px;color-scheme:light}@media(prefers-color-scheme:dark){:root{--bg: #0b1220;--surface: #131c2e;--surface-2: #1b2539;--text: #e8edf6;--muted: #94a3b8;--border: #26324a;--brand: #3b82f6;--brand-soft: #1c2c4d;--note: #3a3216;--note-border: #6b5a1d;--bot-bg: #2a2348;--bot-border: #43397a;--shadow: 0 1px 3px rgba(0, 0, 0, .4);color-scheme:dark}}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;font-size:14px;background:var(--bg);color:var(--text)}a{color:var(--brand);text-decoration:none}h1{font-size:22px;margin:0}h2{font-size:16px;margin:0 0 12px}h3{font-size:15px;margin:0}h4{font-size:13px;margin:18px 0 8px;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}code,kbd,.mono{font-family:ui-monospace,Cascadia Code,Consolas,monospace;font-size:12.5px}kbd{border:1px solid var(--border);border-bottom-width:2px;border-radius:4px;padding:0 4px;background:var(--surface)}.row{display:flex;align-items:center}.between{justify-content:space-between}.end{justify-content:flex-end}.gap{gap:10px}.gap-sm{gap:6px}.grow{flex:1;min-width:0}.stack{display:flex;flex-direction:column;gap:12px}.stack>h2,.stack>p,.stack>ol{margin:0}.wide{max-width:760px}.muted{color:var(--muted)}.small{font-size:12px}.right{text-align:right}.nowrap{white-space:nowrap}.ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.pad{padding:16px}.pad-top{padding-top:12px}.error{color:var(--danger);margin:0}.success-text{color:var(--success);margin:0}.warn-text{color:var(--warn)}.center-screen{min-height:100%;display:grid;place-items:center;padding:16px}.empty{padding:32px 16px;text-align:center;color:var(--muted)}.full{width:100%}.input{font:inherit;color:var(--text);background:var(--surface);border:1px solid var(--border);border-radius:8px;padding:8px 10px;min-width:0}.input:focus{outline:2px solid var(--brand);outline-offset:-1px}textarea.input{resize:vertical}.input.compact{padding:5px 8px;max-width:170px}.emoji-input{width:56px;text-align:center}.btn{font:inherit;font-weight:600;border:1px solid var(--border);background:var(--surface);color:var(--text);border-radius:8px;padding:7px 12px;cursor:pointer;white-space:nowrap;display:inline-flex;align-items:center;justify-content:center;gap:6px}.btn:hover{background:var(--surface-2)}.btn:disabled{opacity:.55;cursor:default}.btn.primary{background:var(--brand);border-color:var(--brand);color:#fff}.btn.primary:hover{filter:brightness(1.08)}.btn.success{background:var(--success);border-color:var(--success);color:#fff}.btn.ghost{background:transparent;border-color:transparent}.btn.ghost:hover{background:var(--surface-2)}.btn.small{padding:4px 8px;font-size:12px}.icon-btn{border:0;background:transparent;color:var(--text);width:32px;height:32px;border-radius:8px;cursor:pointer;font-size:16px;flex-shrink:0}.icon-btn:hover,.icon-btn.on{background:var(--surface-2)}.icon-btn:disabled{opacity:.3;cursor:default}.field{display:flex;flex-direction:column;gap:5px}.field>span{font-size:12px;font-weight:600;color:var(--muted)}.field.row{flex-direction:row;align-items:center}.switch-row{display:flex;align-items:center;gap:8px;cursor:pointer;padding:6px 0}.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);padding:16px}.card.narrow{max-width:420px}.badge{display:inline-block;padding:1px 8px;border-radius:999px;background:var(--surface-2);border:1px solid var(--border);font-size:11.5px;white-space:nowrap;color:var(--text)}.tabs{display:flex;gap:4px;flex-wrap:wrap}.tab{font:inherit;border:0;background:transparent;color:var(--muted);padding:6px 10px;border-radius:8px;cursor:pointer;font-weight:600;display:inline-flex;gap:6px;align-items:center}.tab:hover{background:var(--surface-2)}.tab.active{color:var(--brand);background:var(--brand-soft)}.tab .count{font-size:11px;color:inherit;opacity:.85}.tabs.underline{border-bottom:1px solid var(--border);margin-bottom:16px;gap:0}.tabs.underline .tab{border-radius:0;border-bottom:2px solid transparent;padding:10px 14px}.tabs.underline .tab.active{background:transparent;border-bottom-color:var(--brand)}.tags{display:flex;flex-wrap:wrap;gap:6px;align-items:center}.tag{display:inline-flex;align-items:center;gap:4px;background:var(--brand-soft);color:var(--brand);padding:2px 8px;border-radius:999px;font-size:12px;margin-right:4px}.tag button{border:0;background:none;color:inherit;cursor:pointer;padding:0;font-size:14px;line-height:1}.tag-input{border:0;background:transparent;color:var(--text);font:inherit;min-width:90px;flex:1;padding:4px 0}.tag-input:focus{outline:none}.avatar{position:relative;display:inline-grid;place-items:center;border-radius:50%;color:#fff;font-weight:700;flex-shrink:0}.avatar-dot{position:absolute;right:-1px;bottom:-1px;width:30%;height:30%;min-width:9px;min-height:9px;border-radius:50%;background:#9ca3af;border:2px solid var(--surface)}.avatar-dot.on{background:#22c55e}.shell{display:flex;height:100%}.sidebar{width:76px;flex-shrink:0;background:var(--surface);border-right:1px solid var(--border);display:flex;flex-direction:column;align-items:center;padding:12px 6px;gap:4px}.brand{width:38px;height:38px;border-radius:10px;background:var(--brand);color:#fff;display:grid;place-items:center;font-weight:800;font-size:18px;margin-bottom:12px}.brand.big{width:56px;height:56px;font-size:26px;border-radius:14px;margin:0 auto 8px}.nav-item{width:100%;display:flex;flex-direction:column;align-items:center;gap:2px;padding:8px 2px;border-radius:10px;color:var(--muted);font:inherit;border:0;background:transparent;cursor:pointer}.nav-item:hover{background:var(--surface-2);color:var(--text)}.nav-item.active{background:var(--brand-soft);color:var(--brand)}.nav-icon{font-size:20px;line-height:1}.nav-label{font-size:10.5px;font-weight:600}.sidebar-spacer{flex:1}.me{position:relative}.me-button{border:0;background:transparent;cursor:pointer;position:relative;padding:4px}.presence-dot{position:absolute;right:3px;bottom:3px;width:12px;height:12px;border-radius:50%;border:2px solid var(--surface)}.presence-dot.on{background:#22c55e}.presence-dot.away{background:#f59e0b}.me-menu{position:absolute;bottom:0;left:52px;width:230px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:0 10px 30px #0000002e;padding:12px;z-index:50;display:flex;flex-direction:column;gap:4px}.me-name{font-weight:700}.me-menu .btn{justify-content:flex-start}.page{flex:1;min-width:0;height:100%;overflow:hidden}.scroll-page{height:100%;overflow-y:auto;padding:24px;display:flex;flex-direction:column;gap:22px}.page-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.login{width:100%;max-width:380px;display:flex;flex-direction:column;gap:14px;text-align:center;padding:28px}.login .field{text-align:left}.login p{margin:-8px 0 4px}.inbox{display:flex;height:100%}.conv-list{width:340px;flex-shrink:0;border-right:1px solid var(--border);background:var(--surface);display:flex;flex-direction:column;min-height:0}.conv-list-head{padding:16px 14px 10px;display:flex;flex-direction:column;gap:10px;border-bottom:1px solid var(--border)}.conv-list-head h2{margin:0;font-size:18px}.conv-items{overflow-y:auto;flex:1}.conv-item{display:flex;gap:10px;padding:12px 14px;border-bottom:1px solid var(--border);color:var(--text);border-left:3px solid transparent}.conv-item:hover{background:var(--surface-2)}.conv-item.active{background:var(--brand-soft);border-left-color:var(--brand)}.conv-item.unread strong{font-weight:800}.conv-item.unread .ellipsis.muted{color:var(--text)}.conv-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}.unread-badge{background:var(--brand);color:#fff;border-radius:999px;font-size:11px;font-weight:700;min-width:20px;height:20px;display:grid;place-items:center;padding:0 6px;flex-shrink:0}.conv-empty{flex:1;display:grid;place-items:center}.inbox-views{width:220px;flex-shrink:0;background:var(--surface);border-right:1px solid var(--border);overflow-y:auto;padding:14px 8px;display:flex;flex-direction:column;gap:1px}.inbox-views h2{margin:0 8px 8px;font-size:18px}.view-item{display:flex;align-items:center;gap:8px;width:100%;border:0;background:transparent;color:var(--text);font:inherit;padding:7px 8px;border-radius:8px;cursor:pointer;text-align:left}.view-item:hover{background:var(--surface-2)}.view-item.active{background:var(--brand-soft);color:var(--brand);font-weight:600}.view-icon{width:20px;text-align:center;flex-shrink:0}.view-count{font-size:11.5px;font-weight:700;color:var(--muted)}.view-item.active .view-count{color:var(--brand)}.view-section{display:flex;justify-content:space-between;border:0;background:none;color:var(--muted);font:inherit;font-size:11.5px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;padding:14px 8px 4px;cursor:pointer}.views-select{display:none;max-width:160px}.pad-x{padding:0 8px}.wrap{flex-wrap:wrap}.dir.in{color:var(--success)}.dir.out{color:var(--muted)}.assignee-chip{margin-left:auto;display:inline-flex}.unassigned-dot{width:20px;height:20px;border-radius:50%;border:1px dashed var(--muted);display:grid;place-items:center;font-size:11px}.stage-stepper{display:flex;align-items:center;gap:2px}.stage-stepper .input{max-width:190px}.popover-wrap{position:relative}.popover{position:absolute;right:0;top:calc(100% + 6px);z-index:40;width:260px;max-height:60vh;overflow-y:auto;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:0 10px 30px #0000002e;padding:10px;display:flex;flex-direction:column;gap:2px}.popover p{margin:0 0 6px}.popover-title{font-weight:700;margin-bottom:4px}.menu-item{display:block;width:100%;text-align:left;border:0;background:none;color:var(--text);font:inherit;padding:8px 10px;border-radius:8px;cursor:pointer}.menu-item:hover{background:var(--surface-2)}.menu-item.danger{color:var(--danger)}.mini-count{font-size:10px;font-weight:700;margin-left:1px;vertical-align:super}.chips{display:flex;flex-wrap:wrap;gap:6px}.chip{font:inherit;border:1px solid var(--border);background:var(--surface);color:var(--text);padding:6px 12px;border-radius:999px;cursor:pointer}.chip.on{background:var(--brand);border-color:var(--brand);color:#fff}.search-bar{display:flex;align-items:center;gap:8px;padding:6px 14px;background:var(--surface);border-bottom:1px solid var(--border)}.msg.dim,.system-msg.dim{opacity:.3}.msg.match .bubble{outline:2px solid #f59e0b;outline-offset:2px}.ticks{letter-spacing:-2px;margin-left:2px}.ticks.seen{color:#3b82f6;font-weight:700}.mention{font-weight:700;color:var(--brand)}.msg.agent .mention{color:#fff;text-decoration:underline}.composer-tools{display:flex;align-items:center;gap:2px;margin-bottom:4px}.emoji-pop{position:absolute;bottom:calc(100% - 4px);left:12px;z-index:10;display:grid;grid-template-columns:repeat(8,36px);gap:2px;padding:8px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:0 10px 30px #0000002e}.emoji-pop button{border:0;background:none;font-size:20px;cursor:pointer;border-radius:6px;height:36px}.emoji-pop button:hover{background:var(--surface-2)}.toasts{position:fixed;right:16px;bottom:16px;z-index:200;display:flex;flex-direction:column;gap:8px;max-width:min(380px,calc(100vw - 32px))}.toast{background:var(--text);color:var(--bg);padding:12px 14px;border-radius:var(--radius);box-shadow:0 10px 30px #00000040;font-size:13.5px;line-height:1.4}.team-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:12px}.team-card{display:flex;flex-direction:column;gap:12px}.member-avatars{display:flex;flex-wrap:wrap;gap:10px}.member{display:flex;flex-direction:column;align-items:center;gap:2px;width:52px}.checklist{display:flex;flex-direction:column;gap:2px;max-height:260px;overflow-y:auto;border:1px solid var(--border);border-radius:8px;padding:6px 10px}.conversation{flex:1;min-width:0;display:flex;flex-direction:column;background:var(--bg)}.conv-head{display:flex;align-items:center;gap:10px;padding:10px 14px;background:var(--surface);border-bottom:1px solid var(--border);flex-wrap:wrap}.conv-head .back{display:none}.conv-title{display:flex;flex-direction:column;min-width:0;flex:1}.conv-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.messages{flex:1;overflow-y:auto;padding:18px;display:flex;flex-direction:column;gap:8px}.msg{display:flex;flex-direction:column;max-width:min(72%,620px)}.msg.contact{align-self:flex-start}.msg.agent,.msg.note{align-self:flex-end;align-items:flex-end}.bubble{padding:9px 13px;border-radius:14px;line-height:1.45;overflow-wrap:anywhere}.bubble .text{white-space:pre-wrap}.msg.contact .bubble{background:var(--surface);border:1px solid var(--border);border-bottom-left-radius:4px}.msg.agent .bubble{background:var(--brand);color:#fff;border-bottom-right-radius:4px}.msg.agent .bubble a{color:#fff;text-decoration:underline}.msg.bot{align-self:flex-end;align-items:flex-end}.msg.bot .bubble{background:var(--bot-bg);color:var(--text);border:1px solid var(--bot-border);border-bottom-right-radius:4px}.bot-bar{display:flex;align-items:center;gap:8px;padding:6px 14px;background:var(--surface);border-bottom:1px solid var(--border);font-size:12.5px}.bot-bar.active{background:var(--bot-bg);justify-content:space-between}.badge.bot{background:var(--bot-bg);border-color:var(--bot-border)}.msg.note .bubble{background:var(--note);border:1px dashed var(--note-border);border-bottom-right-radius:4px}.note-label{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;opacity:.7;margin-bottom:2px}.bubble img{display:block;max-width:260px;max-height:260px;border-radius:8px;margin-bottom:4px}.file-link{display:inline-block;font-weight:600}.meta{font-size:11px;color:var(--muted);padding:3px 4px 0}.system-msg{align-self:center;font-size:12px;color:var(--muted);background:var(--surface-2);padding:4px 12px;border-radius:999px;text-align:center}.day-sep{align-self:center;font-size:12px;color:var(--muted);margin:8px 0}.day-sep span{display:inline-block}.day-sep span:first-letter{text-transform:uppercase}.typing-line{font-size:12px;color:var(--muted);font-style:italic}.closed-banner{background:var(--surface-2);color:var(--muted);text-align:center;font-size:12px;padding:6px;border-top:1px solid var(--border)}.composer{position:relative;background:var(--surface);border-top:1px solid var(--border);padding:8px 12px 12px}.composer.note{background:var(--note)}.composer-tabs{display:flex;align-items:center;gap:4px;margin-bottom:6px}.composer-tabs .hint{margin-left:auto}.composer-row{display:flex;gap:8px;align-items:flex-end}.composer-row textarea{resize:none;max-height:200px}.snippet-pop{position:absolute;bottom:calc(100% - 4px);left:12px;right:12px;list-style:none;margin:0;padding:6px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:0 10px 30px #0000002e;z-index:10;max-height:320px;overflow-y:auto}.snippet-pop li.snippet-pop-head{position:sticky;top:-6px;background:var(--surface);cursor:default;padding:4px 10px 6px}.snippet-pop li{padding:7px 10px;border-radius:8px;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.snippet-pop li.active,.snippet-pop li:hover{background:var(--brand-soft)}.contact-panel{width:320px;flex-shrink:0;border-left:1px solid var(--border);background:var(--surface);overflow-y:auto;padding:14px 16px}.panel-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.contact-editor{display:flex;flex-direction:column;gap:12px}.facts{display:grid;grid-template-columns:auto 1fr;gap:4px 10px;font-size:12px;margin:4px 0 0}.facts dt{color:var(--muted)}.facts dd{margin:0}.history{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:4px}.history a{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 10px;border-radius:8px;color:var(--text);font-size:13px}.history a:hover,.history a.current{background:var(--surface-2)}.status-pill{font-size:11px;padding:1px 8px;border-radius:999px;font-weight:600}.status-pill.open{background:#dcfce7;color:#166534}.status-pill.closed{background:var(--surface-2);color:var(--muted)}.stage-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:12px}.stage-card{color:var(--text);display:flex;flex-direction:column;gap:6px}.stage-card:hover{border-color:var(--brand)}.stage-name{font-weight:700;font-size:15px}.stage-count{font-size:30px;font-weight:800}.stage-meta{display:flex;gap:12px;flex-wrap:wrap}.kpis{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:12px}.kpi{color:var(--text);display:flex;flex-direction:column;gap:2px}.kpi-value{font-size:24px;font-weight:800}.kpi-label{color:var(--muted);font-size:12.5px;font-weight:600}.kpi.warn .kpi-value{color:var(--warn)}a.kpi:hover{border-color:var(--brand)}.two-col{display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:start}.list{list-style:none;margin:0;padding:0}.list-row{display:flex;align-items:center;gap:10px;padding:9px 4px;border-bottom:1px solid var(--border);color:var(--text)}.list li:last-child .list-row,.list li.list-row:last-child{border-bottom:0}a.list-row:hover{background:var(--surface-2)}.filters{display:flex;gap:10px;flex-wrap:wrap}.table-wrap{padding:0;overflow-x:auto}.table{width:100%;border-collapse:collapse}.table th{text-align:left;font-size:12px;color:var(--muted);font-weight:600;padding:10px 12px;border-bottom:1px solid var(--border);white-space:nowrap}.table td{padding:10px 12px;border-bottom:1px solid var(--border);max-width:260px}.table tbody tr{cursor:pointer}.table tbody tr:hover,.table tbody tr.selected{background:var(--surface-2)}.table tr:last-child td{border-bottom:0}.table tr.inactive{opacity:.55}.modal-backdrop,.drawer-backdrop{position:fixed;inset:0;background:#0f172a73;z-index:100}.modal-backdrop{display:grid;place-items:center;padding:16px}.modal{width:100%;background:var(--surface);border-radius:var(--radius);padding:18px;max-height:calc(100vh - 32px);overflow-y:auto}.modal-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.drawer{position:absolute;right:0;top:0;bottom:0;width:min(420px,100%);background:var(--surface);padding:16px 18px;overflow-y:auto;display:flex;flex-direction:column;gap:14px;box-shadow:-10px 0 30px #0003}.copy-box{display:flex;gap:8px;align-items:flex-start}.copy-box .input{flex:1}.steps{margin:0;padding-left:20px;line-height:1.7}.callout{border-radius:var(--radius);padding:12px 14px;line-height:1.5}.callout.warn{background:#fef3c7;color:#78350f;border:1px solid #fcd34d}@media(prefers-color-scheme:dark){.callout.warn{background:#3b2f12;color:#fde68a;border-color:#6b5a1d}.status-pill.open{background:#14361f;color:#86efac}}section .btn{align-self:flex-start}.hours{display:flex;flex-direction:column;gap:6px}.hours-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.hours-row .switch-row,.hours-row .input{width:120px}.status-badge{font-size:11.5px;font-weight:700;padding:2px 9px;border-radius:999px;white-space:nowrap}.status-badge.published{background:#dcfce7;color:#166534}.status-badge.stopped{background:#fee2e2;color:#991b1b}.status-badge.draft{background:var(--surface-2);color:var(--muted)}.wf-head{display:grid;grid-template-columns:1fr 1fr;gap:12px}.wf-head .full-row{grid-column:1 / -1}.steps{display:flex;flex-direction:column;gap:12px}.step{border-left:4px solid var(--border);padding:12px 14px;display:flex;flex-direction:column;gap:10px}.step.t-message{border-left-color:#3b82f6}.step.t-question,.step.t-csat{border-left-color:#8b5cf6}.step.t-assign{border-left-color:#10b981}.step.t-set_stage,.step.t-add_tag{border-left-color:#f59e0b}.step.t-business_hours,.step.t-wait{border-left-color:#06b6d4}.step.t-run_workflow,.step.t-goto{border-left-color:#ec4899}.step.t-close,.step.t-end{border-left-color:#ef4444}.step.highlight{box-shadow:0 0 0 2px var(--brand)}.step-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.step-num{font-weight:800;color:var(--muted);min-width:28px}.step-type{font-size:12px;font-weight:700;color:var(--muted);white-space:nowrap}.step-name{flex:1;min-width:160px;font-weight:600}.step-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:10px}.option-row{display:grid;grid-template-columns:56px 1.3fr 1fr 1fr 32px;gap:6px;align-items:center}.option-head{font-size:11px;color:var(--muted);font-weight:600}.start-badge{background:var(--brand);color:#fff;font-size:11px;font-weight:700;padding:1px 8px;border-radius:999px}.add-step{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.plain-fieldset{border:0;padding:0;margin:0;min-width:0;display:flex;flex-direction:column;gap:22px}.link-btn{border:0;background:none;color:var(--brand);cursor:pointer;font:inherit;font-size:12px;margin-left:6px;padding:0}.sticky-bar{position:sticky;top:-24px;z-index:5;background:var(--bg);padding:12px 0;display:flex;gap:10px;align-items:center;flex-wrap:wrap;border-bottom:1px solid var(--border)}.wf-editor{height:100%;display:flex;flex-direction:column;min-height:0}.wf-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:10px 16px;background:var(--surface);border-bottom:1px solid var(--border)}.wf-name{font-weight:700;font-size:16px;min-width:200px;max-width:360px}.wf-trigger{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:8px 16px;background:var(--surface-2);border-bottom:1px solid var(--border)}.trigger-pill{background:#fef3c7;color:#92400e;font-weight:700;font-size:12px;padding:4px 10px;border-radius:999px;white-space:nowrap}.segmented{display:inline-flex;border:1px solid var(--border);border-radius:8px;overflow:hidden}.segmented button{font:inherit;font-size:13px;border:0;background:var(--surface);color:var(--muted);padding:6px 10px;cursor:pointer}.segmented button.on{background:var(--brand-soft);color:var(--brand);font-weight:600}.wf-body{flex:1;display:flex;min-height:0}.wf-side{width:460px;max-width:100%;flex-shrink:0;overflow-y:auto;border-left:1px solid var(--border);background:var(--bg);padding:12px}.wf-side .step{box-shadow:none}.step-actions{border-top:1px solid var(--border);padding-top:10px}.flow-scroll{flex:1;overflow:auto;position:relative;background-color:var(--bg);background-image:radial-gradient(var(--border) 1px,transparent 1px);background-size:18px 18px}.flow-zoom{position:sticky;top:10px;left:10px;z-index:6;display:inline-flex;align-items:center;gap:2px;background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:2px 6px;margin:10px;box-shadow:var(--shadow)}.flow-sizer{position:relative;margin:0 auto 40px}.flow-canvas{position:absolute;left:0;top:0;transform-origin:0 0}.flow-lines{position:absolute;inset:0;pointer-events:none;overflow:visible}.flow-line{fill:none;stroke:#94a3b8;stroke-width:2}.flow-line.add{stroke-dasharray:4 4;stroke:var(--border)}.flow-line.jump{stroke-dasharray:6 4;stroke:#ec4899}.flow-line.secondary{stroke:#f59e0b}.arrow-head{fill:#94a3b8}.flow-label{position:absolute;transform:translate(-50%);max-width:200px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:11.5px;font-weight:600;background:var(--surface);border:1px solid var(--border);color:var(--text);padding:2px 9px;border-radius:999px;z-index:2}.flow-label.secondary{color:#b45309;border-color:#fcd34d}.flow-node{position:absolute;display:flex;flex-direction:column;gap:6px;text-align:left;font:inherit;color:var(--text);background:var(--surface);border:1px solid var(--border);border-top:4px solid var(--border);border-radius:12px;padding:10px 12px;cursor:pointer;box-shadow:var(--shadow);overflow:hidden;z-index:3}.flow-node:hover{border-color:var(--brand)}.flow-node.selected{outline:3px solid var(--brand);outline-offset:1px}.flow-node-head{display:flex;align-items:center;gap:6px;font-weight:700;font-size:13.5px}.flow-node-icon{font-size:16px}.flow-node-num{font-size:11px;color:var(--muted);font-weight:600}.flow-node-body{font-size:12.5px;color:var(--muted);line-height:1.35;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;white-space:pre-line}.flow-start{position:absolute;top:6px;right:34px}.flow-node.t-message{border-top-color:#3b82f6}.flow-node.t-question,.flow-node.t-csat{border-top-color:#8b5cf6}.flow-node.t-ai_agent{border-top-color:#d946ef}.flow-node.t-branch{border-top-color:#0ea5e9}.flow-node.t-assign{border-top-color:#10b981}.flow-node.t-set_stage,.flow-node.t-add_tag,.flow-node.t-update_contact,.flow-node.t-add_note{border-top-color:#f59e0b}.flow-node.t-business_hours,.flow-node.t-wait{border-top-color:#06b6d4}.flow-node.t-run_workflow,.flow-node.t-goto,.flow-node.t-http_request{border-top-color:#ec4899}.flow-node.t-close,.flow-node.t-end{border-top-color:#ef4444}.flow-slot{position:absolute;width:160px;display:flex;justify-content:center;z-index:4}.flow-add{width:34px;height:34px;border-radius:50%;border:2px dashed var(--brand);background:var(--surface);color:var(--brand);font-size:20px;font-weight:700;cursor:pointer;line-height:1}.flow-add:hover{background:var(--brand);color:#fff;border-style:solid}.flow-jump{font:inherit;font-size:12px;font-weight:600;border:1px dashed #ec4899;color:#be185d;background:var(--surface);border-radius:999px;padding:5px 10px;cursor:pointer;max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.flow-end{font-size:12px;color:var(--muted)}.flow-empty{display:flex;flex-direction:column;align-items:center;gap:12px;padding:80px 16px}.flow-orphans{margin:0 16px 24px;padding:12px;background:var(--surface);border:1px dashed var(--border);border-radius:var(--radius);display:flex;flex-direction:column;gap:8px}.step-menu{width:250px}.step-menu-icon{display:inline-block;width:22px;text-align:center}.popover.up{top:auto;bottom:calc(100% + 6px)}.flow-slot .popover{left:50%;right:auto;transform:translate(-50%)}.option-card{display:flex;flex-direction:column;gap:6px;padding:8px;border:1px solid var(--border);border-radius:10px;background:var(--surface-2)}.opt-key{width:52px;text-align:center}.template-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:8px}.template{font:inherit;text-align:left;display:flex;flex-direction:column;gap:4px;padding:10px 12px;border:1px solid var(--border);border-radius:10px;background:var(--surface);color:var(--text);cursor:pointer}.template.on{border-color:var(--brand);box-shadow:0 0 0 2px var(--brand-soft)}.btn.danger{color:var(--danger)}.emoji-pop{display:flex;flex-direction:column;grid-template-columns:none;width:330px;padding:6px;gap:6px}.emoji-tabs{display:flex;gap:2px;border-bottom:1px solid var(--border);padding-bottom:4px}.emoji-tabs button{flex:1;border:0;background:none;font-size:18px;cursor:pointer;border-radius:6px;padding:4px}.emoji-tabs button.on{background:var(--brand-soft)}.emoji-grid{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:2px;max-height:210px;overflow-y:auto;overflow-x:hidden}.emoji-grid button{border:0;background:none;font-size:21px;cursor:pointer;border-radius:6px;height:36px;padding:0;min-width:0}.emoji-grid button:hover{background:var(--surface-2)}.icon-btn.busy{animation:pulse 1s infinite}@keyframes pulse{50%{opacity:.4}}.composer-tools .popover{left:0;right:auto}.wand-menu{width:auto;min-width:290px;max-height:none}.wand-columns{display:flex;gap:4px;align-items:flex-start}.wand-col{display:flex;flex-direction:column;min-width:260px}.wand-col.sub{min-width:170px;border-left:1px solid var(--border);padding-left:4px}.menu-item.active{background:var(--surface-2)}.menu-item.row{display:flex}.menu-sep{font-size:11px;font-weight:700;text-transform:uppercase;color:var(--muted);padding:8px 10px 2px}.assist-btn{margin-left:8px;color:#7c3aed}.ai-undo{display:flex;align-items:center;gap:8px;background:var(--bot-bg);border:1px solid var(--bot-border);border-radius:8px;padding:5px 10px;margin-bottom:6px;font-size:12.5px}.ai-undo span{flex:1}.ai-error{position:absolute;bottom:calc(100% + 6px);left:0;width:260px;background:#fee2e2;color:#991b1b;border-radius:8px;padding:8px 10px;font-size:12.5px;z-index:30;cursor:pointer}.summary-box{white-space:pre-wrap;background:var(--surface-2);border-radius:10px;padding:12px 14px;line-height:1.5}.menu-item:disabled{opacity:.45;cursor:default}.collapse-btn{font-size:18px;font-weight:700;color:var(--muted)}.ai-card{border-left:4px solid #d946ef}.history a.history-item{flex-direction:column;align-items:stretch;gap:4px}.history-summary{font-size:12px;color:var(--muted);white-space:pre-line;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.no-margin{margin:0}.dash{height:100%;display:flex;flex-direction:column;min-height:0}.dash-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 24px;background:var(--surface);border-bottom:1px solid var(--border)}.dash-head h1{font-size:18px}.dash-body{flex:1;overflow-y:auto;padding:20px 24px 32px;display:flex;flex-direction:column;gap:22px}.dash-section h2{font-size:20px;margin:0 0 12px}.lifecycle-row{display:flex;gap:12px;overflow-x:auto;padding-bottom:10px;scroll-snap-type:x proximity}.lifecycle-row::-webkit-scrollbar{height:8px}.lifecycle-row::-webkit-scrollbar-thumb{background:var(--border);border-radius:999px}.lc-card{flex:0 0 220px;display:flex;flex-direction:column;gap:8px;color:var(--text);scroll-snap-align:start;padding:14px 16px}.lc-card:hover{border-color:var(--brand)}.lc-name{font-weight:600;font-size:14px}.lc-count{font-size:24px;font-weight:800;display:flex;align-items:baseline;gap:8px}.lc-trend{font-size:12px;font-weight:600;color:var(--success)}.lc-stats{display:flex;gap:12px}.dash-cols{display:grid;grid-template-columns:1fr 1fr;gap:20px;align-items:stretch}.dash-card{display:flex;flex-direction:column;gap:12px;padding:18px 18px 10px}.dash-card h2{font-size:17px;margin:0}.dash-card .tabs.underline{margin-bottom:0}.dash-list{display:flex;flex-direction:column;flex:1}.dash-row{display:flex;align-items:center;gap:12px;padding:12px 4px;border-bottom:1px solid var(--border);color:var(--text)}.dash-row:last-child{border-bottom:0}a.dash-row:hover{background:var(--surface-2)}.dash-foot{border-top:1px solid var(--border);padding-top:8px}.block{display:block}.member-avatar{position:relative;display:inline-flex;flex-shrink:0}.member-avatar .presence-dot{right:-1px;bottom:-1px}.presence-dot.off{background:#9ca3af}.state-text.on{color:var(--success)}.state-text.away{color:var(--warn)}.state-text.off{color:var(--muted)}.compact-kpis{grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}.compact-kpis .kpi{padding:12px 14px}.compact-kpis .kpi-value{font-size:20px}@media(max-width:1000px){.dash-cols{grid-template-columns:1fr}}@media(max-width:640px){.dash-head,.dash-body{padding-left:16px;padding-right:16px}}.agent-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px}.agent-card{display:flex;flex-direction:column;gap:8px;cursor:pointer;min-height:220px}.agent-card:hover{border-color:var(--brand)}.agent-emoji{width:44px;height:44px;border-radius:12px;background:var(--bot-bg);display:grid;place-items:center;font-size:24px}.small-emoji{width:36px;height:36px;font-size:20px}.ellipsis-3{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;flex:1}.wide-templates{grid-template-columns:repeat(auto-fill,minmax(200px,1fr))}.agent-editor{height:100%;display:flex;flex-direction:column;min-height:0}.agent-body{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) 400px;gap:16px;padding:16px;overflow:hidden}.agent-main{overflow-y:auto;padding-right:4px}.instructions{font-size:13px;line-height:1.5;min-height:320px}.skill-card{display:flex;flex-direction:column;gap:8px;border:1px solid var(--border);border-radius:10px;padding:10px 12px}.skill-card.on{border-color:#c4b5fd;background:var(--bot-bg)}.agent-tester{display:flex;flex-direction:column;gap:8px;min-height:0}.tester-messages{flex:1;min-height:200px;overflow-y:auto;display:flex;flex-direction:column;gap:8px;padding:8px;background:var(--bg);border-radius:10px}.tester-messages .msg{max-width:88%}.ai-chip{background:var(--bot-bg);border-color:var(--bot-border)}@media(max-width:1100px){.agent-body{grid-template-columns:1fr;overflow-y:auto}.agent-main{overflow:visible}.agent-tester{min-height:480px}}.status-badge.sending{background:#dbeafe;color:#1e40af}.status-badge.scheduled{background:#fef3c7;color:#92400e}.broadcast-grid{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:16px;align-items:start}.broadcast-side{position:sticky;top:0}.phone-preview{background:var(--surface-2);border-radius:18px;padding:12px;display:flex;flex-direction:column;gap:10px}.push-preview{background:var(--surface);border-radius:12px;padding:10px 12px;display:flex;flex-direction:column;gap:2px;font-size:13px;box-shadow:var(--shadow)}.bubble-preview{align-self:flex-start;max-width:90%;background:var(--surface);border:1px solid var(--border);border-radius:14px 14px 14px 4px;padding:9px 12px;white-space:pre-wrap;font-size:13.5px}.bubble-preview img,.detail-img{display:block;max-width:100%;max-height:220px;border-radius:8px;margin-bottom:4px}@media(max-width:1000px){.broadcast-grid{grid-template-columns:1fr}.broadcast-side{position:static}}.kpi.good .kpi-value,.score.good{color:var(--success)}.kpi.bad .kpi-value,.score.bad{color:var(--danger)}.score.warn{color:var(--warn)}.score{font-weight:700}.compact-table td,.compact-table th{padding:7px 8px}.dist{display:flex;flex-direction:column;gap:8px}.dist-row{display:grid;grid-template-columns:52px 1fr 34px;align-items:center;gap:8px}.dist-label{font-weight:600;white-space:nowrap}.dist-track{height:14px;background:var(--surface-2);border-radius:999px;overflow:hidden}.dist-bar{display:block;height:100%;border-radius:999px;min-width:2px}.dist-bar.s5,.dist-bar.s4{background:#22c55e}.dist-bar.s3{background:#f59e0b}.dist-bar.s2,.dist-bar.s1{background:#ef4444}.dist-n{text-align:right;font-weight:700}.comment-row{align-items:flex-start}.score-pill{font-weight:700;font-size:12px;padding:2px 8px;border-radius:999px;background:var(--surface-2);white-space:nowrap}.score-pill.good{background:#dcfce7;color:#166534}.score-pill.warn{background:#fef3c7;color:#92400e}.score-pill.bad{background:#fee2e2;color:#991b1b}.stat-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px}.stat{background:var(--surface-2);border-radius:10px;padding:10px 12px;display:flex;flex-direction:column;gap:2px}.stat strong{font-size:20px}.range-row{display:flex;align-items:center;gap:10px}.range-row input[type=range]{flex:1}.range-value{min-width:48px;text-align:right;font-weight:700}.knowledge-item{display:flex;flex-direction:column;gap:8px;border:1px solid var(--border);border-radius:10px;padding:10px}.provider-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:8px}@media(max-width:1100px){.inbox-views{display:none}.views-select{display:block}}@media(max-width:1200px){.contact-panel{position:fixed;right:0;top:0;bottom:0;z-index:60;box-shadow:-10px 0 30px #0003}}@media(max-width:900px){.two-col{grid-template-columns:1fr}.conv-list{width:100%;border-right:0}.inbox.has-selection .conv-list{display:none}.inbox:not(.has-selection) .conv-empty{display:none}.conv-head .back{display:inline-block}.collapse-btn{display:none}.wf-side{position:fixed;inset:0;z-index:70;width:100%}.hide-sm,.composer-tabs .hint{display:none}}@media(max-width:640px){.shell{flex-direction:column-reverse}.sidebar{width:100%;flex-direction:row;padding:4px 6px;border-right:0;border-top:1px solid var(--border);justify-content:space-around}.brand,.sidebar-spacer{display:none}.nav-item{width:auto;flex:1;padding:6px 2px}.me-menu{left:auto;right:0;bottom:52px}.page{height:auto;flex:1;min-height:0}.scroll-page{padding:16px}.contact-panel{width:100%}.wf-head{grid-template-columns:1fr}.option-row{grid-template-columns:48px 1fr 32px}.option-row>:nth-child(3),.option-row>:nth-child(4){grid-column:2 / 3}.option-head{display:none}.msg{max-width:88%}.input.compact{max-width:130px}}.snippet-table td{vertical-align:top}.snippet-body{white-space:pre-wrap;min-width:280px;max-width:560px}.snippet-body .link-btn{margin-left:6px}.snippet-form{border:1px solid var(--border);border-radius:12px;padding:14px;background:var(--surface-2)}.snippet-menu{width:380px;max-width:calc(100vw - 32px)}.snippet-menu-list{max-height:340px;overflow-y:auto;display:flex;flex-direction:column}.snippet-item{display:block;text-align:left;white-space:normal}.snippet-preview{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin-top:2px}.card.snippets-card{max-width:none}.conv-sep{display:flex;align-items:center;gap:10px;margin:18px 0 8px;color:var(--muted);font-size:12px;font-weight:600}.conv-sep:before,.conv-sep:after{content:"";flex:1;border-top:1px dashed var(--border)}.conv-sep.current{color:var(--brand)}.conv-sep.current:before,.conv-sep.current:after{border-top-color:var(--brand)}.newer-conv{position:sticky;top:0;z-index:3;width:100%;margin-bottom:8px;padding:10px 14px;border:1px solid var(--brand);border-radius:10px;background:var(--brand-soft);color:var(--brand);font-weight:600;cursor:pointer;text-align:left}.report-filters{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.report-filters input[type=date]{width:auto}.report-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:24px}.bar-chart,.hbars{margin:0;display:flex;flex-direction:column;gap:10px}.bar-chart figcaption,.hbars figcaption{font-weight:700;font-size:14px}.bar-plot{position:relative;display:flex;align-items:flex-end;gap:2px;height:180px;padding:0 0 22px;border-bottom:1px solid var(--border)}.bar-chart.small .bar-plot{height:140px}.bar-max{position:absolute;top:-4px;left:0}.bar-col{position:relative;flex:1;min-width:0;height:100%;display:flex;align-items:flex-end;justify-content:center;outline:none}.bar-col:hover,.bar-col:focus{background:var(--surface-2);border-radius:4px 4px 0 0}.bar{width:100%;max-width:28px;background:var(--brand);border-radius:4px 4px 0 0}.bar-label{position:absolute;bottom:-20px;font-size:11px;color:var(--muted);white-space:nowrap}.bar-tip{display:none;position:absolute;bottom:calc(100% + 4px);left:50%;transform:translate(-50%);z-index:5;white-space:nowrap;background:var(--surface);color:var(--text);border:1px solid var(--border);box-shadow:0 6px 18px #00000026;border-radius:8px;padding:6px 10px;font-size:12.5px}.bar-col:hover .bar-tip,.bar-col:focus .bar-tip{display:block}.bar-col:first-child .bar-tip,.bar-col:nth-child(2) .bar-tip{left:0;transform:none}.bar-col:last-child .bar-tip{left:auto;right:0;transform:none}.hbar-row{display:grid;grid-template-columns:minmax(120px,190px) 1fr auto;align-items:center;gap:10px;font-size:13.5px}.hbar-track{height:12px;background:var(--surface-2);border-radius:4px;overflow:hidden}.hbar{display:block;height:100%;background:var(--brand);border-radius:0 4px 4px 0}.hbar-value{min-width:70px;text-align:right;white-space:nowrap}@media(max-width:640px){.hbar-row{grid-template-columns:1fr auto}.hbar-track{grid-column:1 / -1;grid-row:2}}.related-box{border:1px solid var(--warn);border-radius:10px;padding:8px 12px;margin:10px 0;background:var(--surface-2)}.related-box h4{margin:0 0 4px}.related-box ul{margin:6px 0 0;padding-left:18px}.no-web-chat{position:sticky;top:0;z-index:3;margin-bottom:8px}@media(max-width:900px){.conv-head .conv-exit{display:none}}.bell-icon{position:relative;display:inline-block}.bell-count{position:absolute;top:-6px;right:-10px;min-width:18px;height:18px;padding:0 4px;border-radius:9px;background:var(--danger);color:#fff;font-size:11px;font-weight:700;line-height:18px;text-align:center;border:2px solid var(--surface)}.bell-panel{position:fixed;left:84px;bottom:16px;width:360px;max-height:min(560px,calc(100vh - 32px));display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:0 12px 36px #0003;z-index:120}.bell-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px 14px;border-bottom:1px solid var(--border)}.bell-empty{padding:14px;margin:0}.bell-list{list-style:none;margin:0;padding:6px;overflow-y:auto}.bell-item{width:100%;display:flex;gap:10px;align-items:flex-start;text-align:left;border:0;background:transparent;color:var(--text);font:inherit;font-size:13.5px;padding:10px;border-radius:10px;cursor:pointer}.bell-item:hover{background:var(--surface-2)}.bell-item.unread{background:var(--brand-soft)}.bell-kind{font-size:18px;line-height:1.2}.bell-text{display:flex;flex-direction:column;gap:2px;min-width:0;overflow-wrap:anywhere}@media(max-width:640px){.bell-panel{left:8px;right:8px;bottom:64px;width:auto}}.unverified-badge{display:inline-block;margin-right:6px;padding:1px 8px;border-radius:999px;font-size:11.5px;font-weight:700;vertical-align:middle;background:#fef3c7;color:#92400e;border:1px solid #fcd34d}.verified-badge{display:inline-block;margin-right:6px;padding:1px 8px;border-radius:999px;font-size:11.5px;font-weight:700;vertical-align:middle;background:#dcfce7;color:#166534;border:1px solid #86efac}.verify-ok{margin:0;padding:10px 12px;border-radius:8px;background:#dcfce7;color:#166534}
