.chat-layout{display:flex;align-items:flex-start;gap:18px;max-width:1720px;margin:auto;padding:22px}
.chat-layout .chat-app{flex:1;min-width:0;padding:0;margin:0;color:var(--text)}
.chat-navigation{display:flex;flex-direction:column;align-items:center;position:sticky;top:22px;width:80px;flex-shrink:0;min-height:calc(100dvh - 44px);padding:22px 10px;border:1px solid var(--border);border-radius:24px;background:var(--navigation)}
.chat-nav-brand img{width:44px;height:44px;border-radius:14px}.chat-navigation nav{display:flex;flex-direction:column;gap:14px;margin-top:42px}.chat-navigation nav a{display:grid;place-items:center;width:48px;height:48px;border-radius:14px;color:var(--muted);font-size:21px}.chat-navigation nav a:hover{background:var(--soft)}.chat-navigation nav .is-active{background:#e9f233;color:#111;box-shadow:0 0 25px #e9f23320}
.chat-avatar{position:relative;overflow:hidden;flex-shrink:0}.chat-avatar img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:0}.chat-avatar.has-photo img{opacity:1}.chat-avatar.has-photo .chat-avatar-fallback{visibility:hidden}.chat-avatar-large{width:72px!important;height:72px!important;border-radius:20px!important;font-size:20px!important}.chat-client-avatar{margin-top:20px}.chat-client-avatar+.chat-client-name{margin-top:12px}.chat-thread-title{flex:1;min-width:0}
@media(max-width:700px){.chat-layout{display:block;padding:12px}.chat-navigation{position:static;min-height:0;width:100%;padding:9px 12px;flex-direction:row;justify-content:space-between;margin-bottom:16px;border-radius:16px}.chat-nav-brand img{width:36px;height:36px;border-radius:11px}.chat-navigation nav{flex-direction:row;margin:0;gap:8px}.chat-navigation nav a{width:40px;height:40px;border-radius:11px;font-size:19px}.chat-thread-header>.chat-avatar{width:34px;height:34px;border-radius:11px}.chat-thread-header{gap:9px!important}}
.chat-page-header{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:16px}
.chat-brand{display:flex;align-items:center;gap:13px}.chat-brand img{width:48px;height:48px;border-radius:15px}.chat-brand p{font-size:10px;letter-spacing:.2em;color:var(--accent-text);margin:0 0 4px}.chat-brand h1{font-size:25px;font-weight:500;margin:0}
.chat-page-header nav{display:flex;flex-wrap:wrap;gap:9px;font-size:12px}.chat-page-header nav a,.chat-page-header nav button{padding:10px 14px;border:1px solid var(--border);border-radius:12px;background:var(--soft)}
.chat-connection{display:flex;flex-wrap:wrap;gap:15px;color:var(--muted);font-size:12px;margin:0 0 12px 4px}.chat-connection [role=status]{color:var(--accent-text)}
.chat-workspace{display:grid;grid-template-columns:310px minmax(0,1fr);border:1px solid var(--border);border-radius:24px;overflow:hidden;background:var(--panel);box-shadow:0 20px 60px #0003}.chat-workspace.has-selection{grid-template-columns:310px minmax(0,1fr) 270px}
.chat-sidebar{border-right:1px solid var(--border);min-width:0}.chat-search{padding:18px 15px;border-bottom:1px solid var(--border)}.chat-search input[type=search]{width:100%;border:1px solid var(--border);border-radius:13px;background:var(--soft);color:var(--text);font-size:12px;padding:12px;outline:none}.chat-search input:focus{border-color:#e9f23360}
.chat-filter-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}.chat-filter-chips button{border:1px solid var(--border);border-radius:9px;background:var(--input);padding:7px 9px;font-size:10px;color:var(--muted)}.chat-filter-chips .is-active{color:var(--accent-text);border-color:#e9f23340;background:#e9f2330e}.chat-manager-chips button{font-size:10px;padding:5px 8px}
.chat-dialogs{height:calc(100dvh - 320px);min-height:350px;overflow:auto}.chat-dialog{display:grid;grid-template-columns:40px minmax(0,1fr) auto;align-items:start;gap:10px;padding:15px;border-bottom:1px solid var(--border);transition:background .15s}.chat-dialog:hover{background:var(--input)}.chat-dialog.is-selected{background:#e9f2330b;box-shadow:inset 3px 0 #e9f233}.chat-avatar{display:grid;place-items:center;width:40px;height:40px;background:linear-gradient(140deg,#e9f23335,#ff92542b);border-radius:13px;font-size:12px}
.chat-dialog-copy{min-width:0;display:flex;flex-direction:column;gap:5px}.chat-dialog-copy strong{font-size:13px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-dialog-copy>span{font-size:11px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-dialog-copy small{font-size:10px;color:var(--muted)}.chat-dialog-meta{display:flex;flex-direction:column;align-items:flex-end;gap:9px}.chat-dialog-meta time{font-size:10px;color:var(--muted)}.chat-dialog-meta b{min-width:20px;text-align:center;background:#e9f233;color:#111;border-radius:7px;padding:2px 5px;font-size:10px}.chat-empty-list{padding:40px 20px;text-align:center;font-size:13px;line-height:2;color:var(--text)}.chat-empty-list span{color:var(--muted);font-size:12px}
.chat-main{display:flex;flex-direction:column;min-width:0;height:calc(100dvh - 143px);min-height:590px;position:relative}.chat-thread-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 22px;border-bottom:1px solid var(--border)}.chat-thread-header>div{min-width:0;display:flex;flex-direction:column;gap:5px}.chat-thread-header strong{font-size:15px;font-weight:500;overflow-wrap:anywhere}.chat-thread-header span{font-size:11px;color:var(--muted)}.chat-thread-header>a{font-size:11px;white-space:nowrap;color:var(--accent-text)}.chat-mobile-back{display:none}
.chat-feed{flex:1;overflow:auto;padding:20px;min-height:0;scrollbar-width:thin;scrollbar-color:#ffffff25 transparent}.chat-messages{display:flex;flex-direction:column;gap:14px}.chat-message{display:flex;justify-content:flex-start}.chat-message.is-outgoing{justify-content:flex-end}.chat-bubble{max-width:85%;padding:12px 15px;border:1px solid var(--border);border-radius:17px 17px 17px 5px;background:var(--input)}.is-outgoing .chat-bubble{background:#e9f23318;border-color:#e9f23330;border-radius:17px 17px 5px 17px}.chat-bubble p{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;line-height:1.75;margin:0}.chat-bubble footer{display:flex;justify-content:flex-end;gap:10px;margin-top:8px;font-size:10px;color:var(--muted)}.chat-photo{max-height:240px;max-width:100%;border-radius:10px;object-fit:contain;margin-top:8px}.chat-bubble audio{max-width:100%;width:250px;margin-top:8px}.chat-attachment{display:block;font-size:12px;overflow-wrap:anywhere;padding:6px 0;color:var(--accent-text)}.chat-send-error{font-size:11px;color:var(--warning);margin-top:8px;max-width:320px;overflow-wrap:anywhere}.chat-send-error button{display:block;padding:7px 10px;margin-top:8px;border:1px solid #ffac9140;border-radius:8px}.chat-older{display:block;margin:0 auto 18px;color:var(--muted);font-size:11px;border:1px solid var(--border);border-radius:10px;padding:8px 12px}.chat-new-messages{position:absolute;align-self:center;bottom:205px;background:#e9f233;color:#111;border-radius:12px;padding:9px 13px;font-size:12px;z-index:2}.chat-app [hidden]{display:none!important}
.chat-composer{padding:16px 20px;border-top:1px solid var(--border)}.chat-templates{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:10px}.chat-templates button{font-size:10px;color:var(--muted);padding:6px 9px;border:1px solid var(--border);border-radius:8px}.chat-templates button:hover{color:var(--accent-text);border-color:#e9f23340}.chat-composer form{display:flex;align-items:flex-end;gap:12px;background:var(--soft);border:1px solid var(--border);border-radius:15px;padding:12px}.chat-composer textarea{flex:1;min-width:0;resize:vertical;min-height:58px;max-height:170px;border:0;background:transparent;color:var(--text);outline:none;font-size:13px;line-height:1.6}.chat-composer form button{background:#e9f233;color:#111;border-radius:11px;padding:10px 14px;font-size:12px;font-weight:600;flex-shrink:0}.chat-app button:disabled{opacity:.5;cursor:default}.chat-composer-footer{display:flex;justify-content:space-between;gap:10px;margin-top:7px;font-size:10px;color:var(--muted)}.chat-composer-footer [role=status]{color:var(--accent-text)}
.chat-client{padding:22px 18px;border-left:1px solid var(--border);overflow-y:auto;max-height:calc(100dvh - 143px);min-width:0}.chat-client>details>summary{font-size:14px;font-weight:500;cursor:pointer}.chat-client-name{font-size:15px;margin:22px 0 5px}.chat-client form>a{font-size:11px;color:var(--accent-text)}.chat-client label{display:block;font-size:11px;color:var(--muted);margin:21px 0 8px}.chat-client input[type=tel],.chat-client textarea,.chat-picker summary{width:100%;border:1px solid var(--border);border-radius:12px;background:var(--input);padding:10px 12px;color:var(--text);font-size:12px;outline:none;overflow-wrap:anywhere}.chat-client textarea{resize:vertical}.chat-client small{display:block;font-size:10px;line-height:1.6;color:var(--muted);margin:8px 0 18px}.chat-save{width:100%;background:#e9f233!important;color:#111!important;border:0;border-radius:11px;padding:11px;font-size:12px;font-weight:600;cursor:pointer}.chat-picker details{position:relative}.chat-picker summary{cursor:pointer;list-style:none;padding-right:25px}.chat-picker summary:after{content:'⌄';position:absolute;right:12px;top:8px;color:var(--muted)}.chat-picker summary::-webkit-details-marker{display:none}.chat-picker details>div{position:absolute;z-index:5;left:0;right:0;top:calc(100% + 5px);background:var(--popover);border:1px solid var(--border);border-radius:12px;padding:5px;max-height:220px;overflow:auto;box-shadow:0 10px 25px #0008}.chat-picker button{display:block;width:100%;text-align:left;font-size:12px;padding:10px;border-radius:7px;overflow-wrap:anywhere}.chat-picker button:hover{background:#e9f23315;color:var(--accent-text)}.chat-no-selection{display:flex;flex:1;align-items:center;justify-content:center;flex-direction:column;gap:12px;padding:30px;text-align:center}.chat-no-selection>span{font-size:42px;color:var(--accent-text)}.chat-no-selection h2{font-size:22px}.chat-no-selection p{font-size:13px;color:var(--muted)}
@media(max-width:1200px){.chat-workspace.has-selection{grid-template-columns:270px minmax(0,1fr)}.chat-client{grid-column:1/-1;border-left:0;border-top:1px solid var(--border);max-height:none;padding:18px 22px}.chat-client form{max-width:600px}.chat-sidebar{width:auto}}
@media(max-width:700px){.chat-app{padding:12px}.chat-page-header{align-items:flex-start;flex-direction:column;gap:12px}.chat-brand h1{font-size:22px}.chat-page-header nav{gap:6px}.chat-page-header nav a,.chat-page-header nav button{padding:8px 12px;font-size:11px}.chat-connection{font-size:10px;line-height:1.7}.chat-workspace,.chat-workspace.has-selection{grid-template-columns:minmax(0,1fr);border-radius:18px}.chat-workspace.has-selection .chat-sidebar{display:none}.chat-workspace:not(.has-selection) .chat-main{display:none}.chat-sidebar{border-right:0}.chat-dialogs{height:calc(100dvh - 350px);min-height:300px}.chat-main{height:calc(100dvh - 160px);min-height:530px}.chat-thread-header{padding:14px}.chat-thread-header strong{font-size:13px}.chat-mobile-back{display:block;font-size:10px;color:var(--accent-text);margin-bottom:3px}.chat-thread-header>a{font-size:10px}.chat-feed{padding:15px 12px}.chat-bubble{max-width:91%;padding:10px 12px}.chat-composer{padding:12px}.chat-composer form{gap:8px;padding:10px}.chat-composer form button{font-size:11px;padding:10px}.chat-composer-footer{font-size:9px}.chat-client{grid-column:auto;padding:18px}.chat-new-messages{bottom:195px}}

.chat-wait { color:var(--warning); white-space:nowrap; font-size:11px; }
.bot-switch { margin:0; }.bot-switch button { border:1px solid #e9f23366;border-radius:16px;background:#e9f23318;color:var(--accent-text);padding:12px 16px;cursor:pointer }.bot-switch button[aria-pressed="true"] { background:#e9f233;color:#111; }
.bot-analytics { border:1px solid var(--border);border-radius:28px;background:var(--panel);padding:22px;margin-bottom:20px; }.bot-analytics header { display:flex;justify-content:space-between;gap:16px }.bot-analytics h2 { font-size:20px }.bot-analytics p,.bot-analytics small { color:var(--muted);font-size:12px; }.bot-funnel { display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:20px 0 }.bot-funnel article { background:var(--soft);border-radius:18px;padding:16px;display:flex;flex-direction:column;gap:8px }.bot-funnel strong { font-size:30px;color:var(--accent-text) }.bot-funnel span { font-size:13px }.chat-client select { width:100%;background:var(--popover);color:var(--text);border:1px solid var(--border);padding:12px;border-radius:12px; }
@media(max-width:700px) { .bot-funnel { grid-template-columns:repeat(2,minmax(0,1fr)) }.bot-analytics header { flex-direction:column } }

.chat-thread{display:contents}.chat-opening-history{padding:22px;color:var(--muted);font-size:13px}.chat-loading-line{height:14px;max-width:65%;margin:16px 0;border-radius:9px;background:var(--soft);animation:chat-soft-pulse 1s ease-in-out infinite alternate}.chat-loading-line:nth-child(even){max-width:45%}@keyframes chat-soft-pulse{to{opacity:.35}}@media(prefers-reduced-motion:reduce){.chat-loading-line{animation:none}}

.chat-wait.is-overdue { color:var(--warning); border-color: #ffad86; }

.chat-list-count{display:block;padding:6px 18px;color:var(--muted);font-size:11px}.chat-list-more{padding:10px;border-top:1px solid var(--border);color:var(--accent-text);background:var(--soft);font-size:12px;cursor:pointer}.chat-list-more[hidden]{display:none}.chat-dialog-tags{display:flex!important;flex-wrap:wrap;gap:4px;margin:4px 0}.chat-owner,.chat-tour-kind{display:inline-flex;font-size:10px!important;padding:3px 7px;border-radius:8px;background:var(--soft);color:var(--secondary)!important;max-width:100%;overflow:hidden;text-overflow:ellipsis}.chat-owner.is-mine{background:#e9f23320;color:var(--accent-text)!important}.chat-thread-title .chat-owner{color:var(--accent-text)!important;margin:4px 5px 4px 0}.chat-thread-title .chat-tour-kind{margin:4px 0}.chat-manager-chips{max-height:80px;overflow:auto}.chat-dialog-copy{min-width:0}.chat-dialog-copy>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(min-width:701px){.chat-sidebar{display:flex;flex-direction:column;max-height:calc(100dvh - 143px);min-height:590px}.chat-dialogs{flex:1;height:auto;min-height:180px}.chat-search,.chat-list-count,.chat-list-more{flex-shrink:0}}
.chat-thread-title .chat-owner,.chat-thread-title .chat-tour-kind{align-self:flex-start;max-width:100%}

.chat-thread-actions{flex-shrink:0;align-items:flex-end}.chat-thread-actions a{font-size:11px;color:var(--accent-text)}.chat-close{border:1px solid #e9f23555;border-radius:10px;padding:9px 12px;color:var(--accent-text);background:#e9f23312;font-size:12px;cursor:pointer}.chat-close:hover{background:#e9f23325}.chat-close:disabled{opacity:.55;cursor:wait}@media(max-width:700px){.chat-close{font-size:10px;padding:8px}.chat-thread-actions a{font-size:10px}}

.chat-thread-actions a.chat-dismiss{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border:1px solid var(--border-color, #8885);border-radius:12px;color:var(--accent-text);font-size:28px;line-height:1;text-decoration:none;transition:background .15s ease}.chat-thread-actions a.chat-dismiss:hover{background:#8882}.chat-thread-actions a.chat-dismiss:focus-visible{outline:2px solid var(--accent-text);outline-offset:2px}
.bot-funnel strong a{color:inherit;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:5px}.funnel-details-link{font-size:12px;color:var(--accent-text)}.funnel-evidence .calendar-card{margin-top:16px;overflow-wrap:anywhere;flex-direction:column;align-items:stretch}.funnel-evidence .calendar-primary{align-self:flex-start}.funnel-evidence .calendar-card header{display:flex;flex-wrap:wrap;justify-content:space-between;gap:12px}.funnel-evidence .calendar-source{white-space:pre-wrap;max-height:260px;overflow:auto;border-left:3px solid var(--accent-text);padding-left:14px}.funnel-evidence .calendar-card>small{display:block;margin-top:12px}
.collection-preview{display:flex;gap:8px;overflow:hidden}.collection-preview img{width:64px;height:80px;object-fit:contain;border-radius:10px;background:var(--input)}.collection-sync{display:flex;justify-content:space-between;align-items:center;gap:16px;border:1px solid var(--border);background:var(--panel);padding:20px;border-radius:20px;margin-bottom:20px}.collection-sync p{font-size:12px;color:var(--muted);margin-top:6px}.collection-editor{margin:24px 0}.collection-fields{display:grid;grid-template-columns:1fr 1fr;gap:20px}.collection-fields label{display:block;font-size:13px;color:var(--muted);margin-bottom:8px}.collection-fields input,.collection-fields textarea,.collection-tools>input{width:100%;border:1px solid var(--border);border-radius:12px;background:var(--input);color:var(--text);padding:12px;font-size:14px}.collection-tools{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:20px 0;font-size:12px}.collection-tools>input{max-width:420px}.collection-tools details{position:relative}.collection-tools summary{padding:12px;border:1px solid var(--border);border-radius:12px;cursor:pointer}.collection-tools details>div{position:absolute;z-index:20;min-width:240px;max-height:280px;overflow:auto;background:var(--popover);border:1px solid var(--border);border-radius:14px;padding:8px}.collection-tools details button{display:block;padding:10px;text-align:left;width:100%;border-radius:8px}.collection-tools details button:hover{background:var(--hover)}.collection-products{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;max-height:65vh;overflow:auto;padding:2px;margin-bottom:18px}.collection-product{display:flex;align-items:center;gap:10px;padding:12px;border:1px solid var(--border);border-radius:14px;background:var(--panel);cursor:pointer}.collection-product[hidden]{display:none}.collection-product.is-selected{border-color:var(--accent-text);background:var(--soft)}.collection-product img{width:44px;height:60px;object-fit:contain;border-radius:8px}.collection-product span{min-width:0}.collection-product strong{display:block;font-size:12px;font-weight:500;overflow-wrap:anywhere}.collection-product small{display:block;font-size:10px;color:var(--muted);margin-top:4px}.collection-product input{accent-color:var(--accent-text);flex-shrink:0}@media(max-width:1000px){.collection-products{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:700px){.collection-products,.collection-fields{grid-template-columns:1fr}.collection-sync{align-items:flex-start;flex-direction:column}.collection-tools>input{max-width:none}.collection-sync .calendar-actions{display:flex;flex-direction:column}}
