/* Personal messenger themes: deliberately isolated from CRM cards and workflows. */
body{--msg-bg:#0e1723;--msg-panel:#182431;--msg-raised:#213140;--msg-line:#ffffff0e;--msg-ink:#e4edf5;--msg-muted:#8d9faf;--msg-accent:#7bb5df;--msg-in:#1d2d3d;--msg-out:#294e6b;--msg-hover:#ffffff08;--msg-selected:#2c4358;--msg-size:14px;--msg-stars:radial-gradient(circle at 18px 34px,#c5dfff55 .65px,transparent 1px),radial-gradient(circle at 105px 136px,#c5dfff30 .6px,transparent 1px),radial-gradient(circle at 176px 72px,#c5dfff40 .7px,transparent 1.1px)}
body[data-chat-theme=day]{--msg-bg:#e9eff3;--msg-panel:#fff;--msg-raised:#f2f5f7;--msg-line:#152f4512;--msg-ink:#213547;--msg-muted:#677e90;--msg-accent:#347eaa;--msg-in:#fff;--msg-out:#d5e9f4;--msg-hover:#16354c06;--msg-selected:#e3eef6;--msg-stars:radial-gradient(circle at 18px 34px,#43688020 .7px,transparent 1px)}
body[data-chat-theme=forest]{--msg-bg:#101f1b;--msg-panel:#192c26;--msg-raised:#223a31;--msg-line:#ffffff0e;--msg-ink:#e0ece4;--msg-muted:#93afa1;--msg-accent:#9ac8ae;--msg-in:#20362e;--msg-out:#345744;--msg-hover:#ffffff08;--msg-selected:#304e40;--msg-stars:radial-gradient(circle at 18px 34px,#c5efcf22 .7px,transparent 1px)}
body[data-chat-font=small]{--msg-size:12px}body[data-chat-font=large]{--msg-size:16px}
body .chat-workspace,body .quick-chat-widget{color:var(--msg-ink)!important;background:var(--msg-panel)!important;border-color:var(--msg-line)!important;font-family:"Telegram Open Sans","Segoe UI",sans-serif!important}
body .chat-workspace{border-radius:14px!important;overflow:hidden!important;box-shadow:0 8px 28px #172b3d0e!important;grid-template-columns:300px minmax(0,1fr)!important;gap:0!important}
body .chat-workspace>.chat-audience-tabs{margin:0!important;padding:9px 12px!important;max-width:none!important;width:100%!important;justify-self:stretch!important;border:0!important;border-bottom:1px solid var(--msg-line)!important;border-radius:0!important;background:var(--msg-panel)!important;box-sizing:border-box;gap:5px!important}
body .chat-workspace>.chat-audience-tabs button{background:transparent!important;border:0!important;border-radius:7px!important;box-shadow:none!important;color:var(--msg-muted)!important;padding:8px 13px!important;font-size:12px!important;min-height:32px!important}
body .chat-workspace>.chat-audience-tabs button.selected{background:var(--msg-selected)!important;color:var(--msg-ink)!important}
body .chat-workspace>.chat-audience-tabs [data-chat-audience=internal].selected{background:#b66b242b!important;color:#efb56f!important}
body[data-chat-theme=day] .chat-workspace>.chat-audience-tabs [data-chat-audience=internal].selected{color:#995617!important}
body .chat-workspace>.chat-audience-tabs [data-chat-settings]{margin-left:auto!important;width:34px!important;padding:6px!important}
body .chat-sidebar,body .chat-search,body .chat-thread-list{background:var(--msg-panel)!important;color:var(--msg-ink)!important;border-color:var(--msg-line)!important}
body .chat-sidebar{border-right:1px solid var(--msg-line)!important;min-width:0!important}
body .chat-search{padding:12px!important;gap:8px!important}
body .chat-search input[type=text],body .chat-search input:not([type]){background:var(--msg-bg)!important;border:1px solid var(--msg-line)!important;color:var(--msg-ink)!important;border-radius:9px!important;height:36px!important;box-shadow:none!important}
body .chat-search input::placeholder{color:var(--msg-muted)!important}
body .chat-workspace .ux-needs-reply,body .chat-workspace [data-chat-reset]{color:var(--msg-muted)!important;font-size:11px!important;background:transparent!important;border:0!important}
body .chat-workspace .chat-thread,body .chat-workspace .ux-chat-request-heading,body .chat-workspace .ux-chat-car-children,body .chat-workspace .ux-chat-general-row{background:transparent!important;border-color:var(--msg-line)!important;color:var(--msg-ink)!important;box-shadow:none!important}
body .chat-workspace .ux-chat-request-group{border:0!important;border-bottom:1px solid var(--msg-line)!important;border-radius:0!important;background:transparent!important;margin:0!important;padding:0!important}
body .chat-workspace .ux-chat-request-heading{padding:8px 10px!important;gap:5px!important;min-height:70px!important}
body .chat-workspace .ux-request-thread{padding:4px!important;background:transparent!important;color:var(--msg-ink)!important;border:0!important}
body .chat-workspace .ux-chat-expand{color:var(--msg-muted)!important;background:transparent!important;border:0!important;width:23px!important}
body .chat-workspace .has-active-chat>.ux-chat-request-heading,body .chat-workspace .chat-thread.is-active{background:var(--msg-selected)!important}
body .chat-workspace .chat-thread:hover,body .chat-workspace .ux-chat-request-heading:hover{background:var(--msg-hover)!important}
body .chat-workspace .chat-thread{border-radius:8px!important;padding:10px!important;gap:9px!important;min-height:62px!important}
body .chat-workspace .ux-chat-car-children{padding:0 8px 8px 18px!important;border:0!important}
body .chat-workspace .ux-request-number,body .chat-workspace .chat-thread-text strong,body .chat-workspace .ux-request-thread>strong{color:var(--msg-ink)!important;font-size:13px!important;line-height:1.4!important}
body .chat-workspace .chat-thread-text>span,body .chat-workspace .chat-thread-text small,body .chat-workspace .chat-request-preview,body .chat-workspace .ux-car-list-caption,body .chat-workspace .chat-preview-time,body .chat-workspace .ux-chat-no-cars{color:var(--msg-muted)!important;font-size:11px!important}
body .chat-workspace .chat-avatar{background:var(--msg-selected)!important;color:var(--msg-accent)!important;border:0!important;border-radius:50%!important;width:40px!important;height:40px!important;flex:0 0 40px!important}
body .chat-workspace .chat-avatar img{border-radius:50%!important;object-fit:cover!important}
body .chat-conversation{background-color:var(--msg-bg)!important;background-image:var(--msg-stars)!important;background-size:223px 223px,317px 317px,419px 419px!important;min-width:0!important}
body .chat-conversation-head{background:var(--msg-panel)!important;color:var(--msg-ink)!important;border-bottom:1px solid var(--msg-line)!important;min-height:68px!important;padding:10px 18px!important;gap:12px!important;box-shadow:none!important}
body .chat-conversation-head strong{color:var(--msg-ink)!important;font-size:13px!important;line-height:1.4!important;font-weight:600!important;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
body .chat-conversation-head small{color:var(--msg-muted)!important;font-size:10px!important;line-height:1.6!important}
body .chat-workspace .chat-back,body .chat-workspace .secondary,body .chat-workspace select,body .chat-workspace [data-open-card],body .chat-workspace .tg-icon-button{background:transparent!important;color:var(--msg-accent)!important;border-color:var(--msg-line)!important;box-shadow:none!important}
body .chat-workspace select option{background:var(--msg-panel);color:var(--msg-ink)}
body .chat-workspace .ux-chat-controls,body .chat-workspace .ux-chat-quick,body .chat-workspace .ux-chat-pins{background:var(--msg-panel)!important;border-color:var(--msg-line)!important;color:var(--msg-muted)!important;font-size:11px!important;padding:5px 16px!important}
body .chat-workspace .ux-chat-quick a,body .chat-workspace .ux-chat-quick button{color:var(--msg-accent)!important;background:transparent!important}
body .chat-workspace .chat-messages{background:transparent!important;padding:22px 24px!important;gap:10px!important;scrollbar-color:var(--msg-selected) transparent}
body .chat-workspace .chat-message{background:var(--msg-in)!important;color:var(--msg-ink)!important;border:0!important;border-radius:13px 13px 13px 4px!important;box-shadow:0 1px 2px #00000016!important;padding:10px 13px 7px!important;max-width:min(75%,560px)!important;min-width:90px!important;width:fit-content!important;margin:0 auto 0 0!important;font-size:var(--msg-size)!important}
body .chat-workspace .chat-message.is-own{background:var(--msg-out)!important;border-radius:13px 13px 4px 13px!important;margin-left:auto!important;margin-right:0!important}
body .chat-workspace .chat-message>strong{color:var(--msg-accent)!important;font-size:11px!important;line-height:1.5!important;display:block;margin-bottom:4px}
body .chat-workspace .chat-message>p{color:var(--msg-ink)!important;font-size:var(--msg-size)!important;line-height:1.5!important;margin:0 0 5px!important;white-space:pre-wrap;overflow-wrap:anywhere}
body .chat-workspace .chat-message a{color:var(--msg-accent)!important}
body .chat-workspace .chat-message footer{color:var(--msg-muted)!important;font-size:9px!important;margin:4px 0 0!important;gap:9px!important;padding:0!important;border:0!important;background:transparent!important;display:flex!important;align-items:center!important}
body .chat-workspace .chat-message footer button{font-size:9px!important;line-height:16px!important;color:var(--msg-muted)!important;padding:0!important;border:0!important;background:transparent!important;min-height:0!important;height:auto!important;box-shadow:none!important}
body .chat-workspace .chat-message footer time{margin-left:auto!important;white-space:nowrap}
body .chat-workspace .chat-system{background:#38506440!important;color:var(--msg-muted)!important;border:0!important;box-shadow:none!important;font-size:10px!important;line-height:1.5!important;padding:7px 12px!important;border-radius:10px!important;max-width:80%!important;margin:7px auto!important}
body .chat-workspace .chat-system time{font-size:9px!important;opacity:.7}
body .chat-workspace .ux-unread-marker{background:var(--msg-panel)!important;color:var(--msg-accent)!important;font-size:11px!important;border:0!important}
body .chat-workspace .chat-composer{background:transparent!important;border:0!important;padding:10px 18px 14px!important;box-shadow:none!important;flex-shrink:0!important}
body .chat-workspace .chat-compose-row{background:var(--msg-panel)!important;border:1px solid var(--msg-line)!important;border-radius:18px!important;box-shadow:0 2px 10px #00000012!important;padding:5px 7px!important;gap:6px!important;align-items:center!important;outline:none!important}
body .chat-workspace .chat-compose-row:focus-within{border-color:var(--msg-accent)!important}
body .chat-workspace .chat-compose-row textarea{background:transparent!important;color:var(--msg-ink)!important;border:0!important;outline:none!important;box-shadow:none!important;font-size:var(--msg-size)!important;line-height:1.5!important;padding:9px 3px!important;min-height:40px!important;height:44px;max-height:120px!important;resize:none!important}
body .chat-workspace .chat-compose-row textarea::placeholder{color:var(--msg-muted)!important;font-size:12px!important}
body .chat-workspace .chat-attach{color:var(--msg-muted)!important;background:transparent!important;border:0!important;padding:6px!important;width:32px!important;min-width:32px!important;min-height:32px!important;box-shadow:none!important}
body .chat-workspace [data-send]{border:0!important;border-radius:50%!important;background:var(--msg-accent)!important;color:var(--msg-bg)!important;width:36px!important;height:36px!important;min-width:36px!important;min-height:36px!important;padding:8px!important;box-shadow:none!important;display:grid!important;place-items:center!important}
body .chat-workspace [data-send] svg{width:19px!important;height:19px!important;display:block!important}
body .chat-workspace [data-send]:disabled{opacity:.45!important}
body .chat-workspace .chat-error{color:#e9b28b!important;background:transparent!important;font-size:11px!important;margin:0!important}
body .chat-workspace .chat-error:empty{display:none!important}
body .chat-workspace .chat-compose-meta:not(:empty),body .chat-workspace .chat-reply-quote{background:var(--msg-raised)!important;color:var(--msg-muted)!important;border-radius:8px;padding:7px;border-left:2px solid var(--msg-accent)}
body .chat-workspace .chat-welcome{color:var(--msg-muted)!important;background:transparent!important}body .chat-workspace .chat-welcome strong{color:var(--msg-ink)!important}
body .quick-chat-widget{border:1px solid var(--msg-line)!important;border-radius:16px!important;box-shadow:0 16px 60px #07131e40,0 2px 8px #07131e20!important}
body .quick-chat-heading{background:var(--msg-panel)!important;color:var(--msg-muted)!important;border-bottom:1px solid var(--msg-line)!important}
body .quick-chat-heading button{background:transparent!important;color:var(--msg-muted)!important;border:0!important;box-shadow:none!important}
body .quick-chat-widget .chat-workspace{grid-template-columns:1fr!important;border-radius:0!important}
body .quick-chat-widget .chat-conversation-head{padding:8px 12px!important;gap:8px!important;min-height:62px!important}
body .quick-chat-widget .chat-conversation-head strong{font-size:12px!important}
body .quick-chat-widget .chat-messages{padding:14px 12px!important}
body .quick-chat-widget .chat-message{max-width:88%!important}
body .quick-chat-widget .chat-composer{padding:7px 10px 12px!important}
body .quick-chat-widget .chat-workspace>.chat-audience-tabs{padding:5px 8px!important}
body .quick-chat-widget .chat-workspace>.chat-audience-tabs button{padding:6px 9px!important;font-size:11px!important}
body .chat-toast{position:relative!important;padding-right:22px!important}body .chat-toast-close{display:grid!important;place-items:center!important;position:absolute!important;right:5px!important;top:5px!important;width:24px!important;height:24px!important;padding:0!important;border:0!important;border-radius:50%!important;background:transparent!important;color:inherit!important;opacity:.65;font-size:18px!important;min-width:0!important;min-height:0!important}body .chat-toast-close:hover{opacity:1;background:#ffffff20!important}
.b24-avatar img{width:100%;height:100%;border-radius:50%;object-fit:cover}
body .personal-profile-dialog{width:min(580px,calc(100vw - 24px));max-width:580px;max-height:calc(100dvh - 32px);padding:0;border:1px solid #e0e6ed;border-radius:18px;background:#fff;color:#263544;box-shadow:0 24px 90px #111f3340;overflow:auto}body .personal-profile-dialog::backdrop{background:#14253666;backdrop-filter:blur(4px)}
.personal-profile-dialog form{margin:0}.personal-profile-dialog header,.personal-profile-dialog footer{display:flex;align-items:center;justify-content:space-between;padding:20px 24px;border-bottom:1px solid #edf0f4}.personal-profile-dialog header small{font-size:9px;letter-spacing:1.5px;color:#8a96a5}.personal-profile-dialog h2{font-size:23px;margin:4px 0 0}.personal-profile-dialog header button{border:0;background:#f1f4f7;border-radius:8px;width:30px;height:30px;padding:0;font-size:20px;color:#7a8796}.personal-profile-dialog footer{border-top:1px solid #edf0f4;border-bottom:0;justify-content:flex-end;gap:10px;position:sticky;bottom:0;background:#fffffff2;backdrop-filter:blur(8px)}.personal-profile-dialog footer button{font-size:12px;padding:10px 14px;border-radius:8px}.personal-profile-content{padding:24px}.personal-identity{display:flex;align-items:center;gap:18px;margin-bottom:24px}.personal-avatar{width:76px;height:76px;flex:none;border-radius:50%;background:#e8eff4;overflow:hidden}.personal-avatar img{width:100%;height:100%;object-fit:cover}.personal-identity>div>strong{display:block;font-size:15px}.personal-identity small{display:block;color:#8491a0;font-size:11px;margin:4px 0}.personal-photo-label,.personal-identity [data-remove-photo]{display:inline-block;font-size:11px;color:#467ca2;cursor:pointer;margin:7px 9px 7px 0;padding:0;border:0;background:transparent}.personal-identity [data-remove-photo]{color:#8694a1}.personal-fields{display:grid;grid-template-columns:1fr 1fr;gap:14px}.personal-fields label{font-size:12px;font-weight:500}.personal-fields label span{font-weight:400;font-size:10px;color:#9aa6b2}.personal-fields input,.personal-fields select{display:block;width:100%;height:39px;margin-top:7px;padding:8px 10px;border:1px solid #dce4eb;border-radius:8px;background:#fff;color:#314457;font-size:12px;box-sizing:border-box}.personal-profile-content h3{font-size:14px;margin:26px 0 12px}.personal-themes{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:20px}.personal-theme{cursor:pointer;padding:5px;border:1px solid #e2e8ee;border-radius:11px;position:relative}.personal-theme:has(input:checked){border-color:#548eb5;box-shadow:0 0 0 2px #548eb51c}.personal-theme input{position:absolute;right:8px;bottom:10px;accent-color:#548eb5}.personal-theme strong{display:block;font-size:10px;font-weight:500;padding:8px 3px}.personal-theme-preview{display:block;height:75px;border-radius:7px;padding:13px 10px;background:radial-gradient(circle at 12px 20px,#cde8ff88 .7px,transparent 1px) 0 0/33px 33px,#101d2b;box-sizing:border-box}.personal-theme-preview i{display:block;width:64%;height:16px;background:#263b50;border-radius:6px;margin-bottom:8px}.personal-theme-preview i+i{margin-left:auto;background:#37607e}.personal-theme[data-theme=day] .personal-theme-preview{background:#eaf0f4}.personal-theme[data-theme=day] i{background:white}.personal-theme[data-theme=day] i+i{background:#bddcec}.personal-theme[data-theme=forest] .personal-theme-preview{background:#11231b}.personal-theme[data-theme=forest] i{background:#233e30}.personal-theme[data-theme=forest] i+i{background:#416b4f}.personal-hint{font-size:11px;line-height:1.6;color:#8b98a5;margin:17px 0 0}.personal-error{color:#bd4054;font-size:12px;white-space:pre-wrap}.personal-error:empty{display:none}
@media(max-width:700px){body .chat-workspace{grid-template-columns:1fr!important}body .chat-workspace .chat-messages{padding:15px 10px!important}body .chat-workspace .chat-message{max-width:90%!important}body .chat-conversation-head{padding:9px 12px!important}body .chat-workspace .chat-composer{padding:7px 9px 10px!important}.personal-profile-content{padding:18px}.personal-fields{grid-template-columns:1fr}.personal-profile-dialog header,.personal-profile-dialog footer{padding:16px 18px}}
body .chat-workspace .tg-stage-row{background:var(--msg-raised)!important;border-color:var(--msg-line)!important;color:var(--msg-muted)!important;font-size:11px!important;padding:8px 18px!important}body .chat-workspace .tg-next-action{background:transparent!important;color:var(--msg-accent)!important;border:0!important;font-size:11px!important}body .chat-workspace .tg-filter-toggle{background:var(--msg-raised)!important;color:var(--msg-accent)!important;width:36px!important;height:36px!important;border-radius:9px!important}body .chat-workspace .chat-sender{display:flex!important;align-items:center!important;gap:6px!important}body .chat-sender img{width:20px;height:20px;object-fit:cover;border-radius:50%;flex:none}body .personal-profile-dialog footer [data-cancel]{border:1px solid #dce4eb;background:#fff;color:#677a8b;box-shadow:none}.library-data-section{border-bottom:1px solid #eef1f5;padding:10px 0}.library-data-section summary{cursor:pointer;color:#526a81;font-size:12px}
body .sidefoot .personal-sidebar{display:flex;align-items:center;gap:9px;background:transparent;border:0;padding:5px 0;color:inherit;text-align:left;box-shadow:none;width:100%}body .personal-sidebar img{width:30px;height:30px;border-radius:50%;object-fit:cover;flex:none}body .personal-sidebar span{font-size:11px;min-width:0;overflow-wrap:anywhere}body .personal-sidebar small{display:block;font-size:10px;margin-top:3px;opacity:.6}

body .chat-workspace :is(button,input,textarea,select),body .quick-chat-widget :is(button,input,textarea,select){font-family:"Telegram Open Sans","Segoe UI",sans-serif!important}body .chat-workspace .tg-library{background:var(--msg-panel)!important;color:var(--msg-ink)!important}body .chat-workspace .tg-library :is(header,nav){background:var(--msg-panel)!important;border-color:var(--msg-line)!important}body .chat-workspace .tg-library button{background:var(--msg-raised)!important;color:var(--msg-accent)!important;border-color:var(--msg-line)!important}body .chat-workspace .tg-library small{color:var(--msg-muted)!important}
body .quick-chat-widget .ux-chat-controls [data-chat-latest]:after{display:none!important}body .quick-chat-widget .ux-chat-controls [data-chat-latest]{height:30px!important;min-height:30px!important;display:grid!important;place-items:center!important}body .chat-workspace .tg-library a{color:var(--msg-accent)!important}
@media(max-width:700px){body .chat-conversation-head{min-height:72px!important}body .chat-conversation-head small:nth-of-type(n+2){display:none!important}body .chat-conversation-head [data-open-card]{font-size:10px!important;padding:6px!important;min-width:0!important}body .chat-conversation-head .chat-avatar{width:32px!important;height:32px!important;flex-basis:32px!important}body .chat-workspace .ux-chat-controls{flex-wrap:nowrap!important;padding:4px 10px!important}body .chat-workspace .ux-chat-controls [data-chat-latest]{font-size:0!important;width:30px!important;min-width:30px!important;padding:5px!important}body .chat-workspace .ux-chat-controls [data-chat-latest] svg{width:17px;height:17px}}
