/* Telegram-inspired messenger, scoped to chats only. */
.workspace:has(.chat-workspace)>.pagehead{margin-bottom:14px;align-items:center}.workspace:has(.chat-workspace)>.pagehead h1{font-size:23px;margin:0}.workspace:has(.chat-workspace)>.pagehead>div>p{display:none}
.chat-workspace{grid-template-columns:340px minmax(0,1fr);height:calc(100dvh - 100px);margin-top:0;border:1px solid #d8e1e9;border-radius:12px;background:#fff;min-height:480px;font-family:Inter,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}
.chat-sidebar{background:#fff;border-color:#dfe5ea}.chat-search{padding:12px;display:grid;grid-template-columns:minmax(0,1fr) 42px;gap:9px;border-bottom:1px solid #edf0f3;background:#fff}.chat-search>input{grid-column:1;border:0;background:#f1f3f5;border-radius:23px;padding:12px 16px;font-size:13px;height:42px}.tg-filter-toggle{grid-column:2;grid-row:1;display:grid;place-items:center;border:0;border-radius:50%;background:#f1f3f5;color:#7b8b99;position:relative;width:42px;height:42px;cursor:pointer}.tg-filter-toggle>span{display:none}.tg-filter-toggle>b:empty{display:none}.tg-filter-toggle>b{position:absolute;right:-1px;top:-2px;background:#3390ec;color:white;font-size:10px;border-radius:9px;min-width:16px;padding:2px}.tg-filter-toggle.has-filters{color:#2786d7;background:#e9f3ff}
.tg-filter-panel{display:none;grid-column:1/-1;gap:10px;padding:4px}.chat-search.filters-open .tg-filter-panel{display:grid;grid-template-columns:1fr 1fr;align-items:center}.tg-filter-panel select{grid-column:1/-1}.tg-filter-panel [data-chat-reset]{padding:7px;font-size:11px}.tg-filter-panel .ux-needs-reply{font-size:11px}.tg-list-top{display:none}
.chat-thread-list{padding:2px 0 10px;background:#fff}.ux-chat-request-group{border:0;border-radius:0;margin:0 0 5px;box-shadow:none;overflow:hidden;background:#fff}.ux-chat-request-group.has-active-chat{border:0}.ux-chat-request-heading{padding:8px 14px 8px 5px;min-height:70px;gap:7px;background:white;border-top:1px solid #f0f2f4}.ux-chat-request-heading:hover{background:#f5f7f9}.ux-chat-expand{border-radius:50%;color:#8a9ba9;width:27px;font-size:22px}.ux-request-thread{gap:3px}.ux-request-number{font-size:10px;color:#6486a5;letter-spacing:.025em;font-weight:600}.ux-request-thread>strong{font-size:14px;color:#223447}.ux-request-thread>small{font-size:11px;color:#90a0ae}.ux-chat-request-heading>.chat-count{margin-top:9px}.chat-count{background:#4b9ddd;font-size:11px;min-width:22px;line-height:16px;padding:2px 6px;text-align:center}
.ux-chat-car-children{padding:0 8px 7px 20px;background:#fff}.ux-chat-general-row{border:0;border-radius:9px;background:transparent;margin:0 0 4px}.ux-chat-general{min-height:62px;border:0;padding:10px;gap:11px;background:transparent}.ux-chat-general .chat-avatar{width:38px;height:38px;border-radius:50%;color:white;background:linear-gradient(150deg,#71b6ef,#3e8acc)}.ux-chat-general .chat-thread-text strong{font-size:13px}.ux-car-list-caption{font-size:10px;font-weight:500;color:#91a3b3;padding:4px 12px;letter-spacing:.04em}.ux-car-list-caption span{background:transparent;padding:0}
.ux-chat-car-row{border:0;border-radius:9px;margin:0;background:white}.ux-chat-car-row .chat-thread{padding:11px 10px;min-height:88px;gap:11px;border:0}.ux-chat-car-row .chat-avatar{width:46px;height:46px;border-radius:50%;background:linear-gradient(145deg,#b0c4d7,#8ba7be);color:white;outline:0}.chat-avatar img{border-radius:inherit;outline:1px solid #0000000d;outline-offset:-1px}.ux-chat-car-row .chat-thread-text strong{font-size:13px;line-height:18px;max-height:36px;font-weight:600}.ux-chat-car-row .chat-thread-text small{font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#7e94a7}.ux-chat-car-row .chat-thread-text>span,.ux-chat-general .chat-thread-text>span{font-size:12px;color:#8494a1;line-height:17px;max-width:100%}.tg-draft-label{font-style:normal;color:#d2655e}.ux-chat-car-row .chat-thread:hover,.ux-chat-general:hover{background:#f4f6f8}.ux-chat-car-row:has(.is-active){border:0}.ux-chat-car-row .chat-thread.is-active,.ux-chat-general.is-active,.ux-chat-car-row .chat-thread.is-active:hover,.ux-chat-general.is-active:hover{border:0;background:#4a99dd;color:white}.ux-chat-car-row .chat-thread.is-active strong,.ux-chat-car-row .chat-thread.is-active small,.ux-chat-car-row .chat-thread.is-active .chat-thread-text>span,.ux-chat-general.is-active strong,.ux-chat-general.is-active .chat-thread-text>span{color:white}.chat-thread.is-active .chat-count{background:white;color:#418ace}.chat-thread.is-active .tg-draft-label{color:#ffe3aa}.ux-internal-thread{background:#f0f3f6;color:#7b8c9d;border:0;font-size:10px;padding:3px 6px;bottom:3px;right:9px}.ux-internal-thread.is-active{background:#fff0c8;color:#8a6727;outline:1px solid #d8bb78}.ux-chat-car-row:has(.ux-internal-thread.is-active),.ux-chat-car-row:has(.ux-internal-thread.is-active)>.chat-thread{background:#fff8e9;border:0}
.chat-conversation{background-color:#dce6d3;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='220' fill='none' stroke='%23768d66' stroke-opacity='.10' stroke-width='1.6'%3E%3Cpath d='M30 34h30v18H39l-9 6zM160 128l22-9 14 17-24 10zM80 154l8-10 30 4 8 12-3 13H81zM86 173v5m31-5v5M35 188l8-12 9 11-8 13zM176 40l10-10 10 10-10 10z'/%3E%3Ccircle cx='111' cy='62' r='10'/%3E%3Cpath d='M104 62h14m-7-7v14M215 183q-10 12 0 22M38 117q10-12 20 0'/%3E%3C/svg%3E")}.chat-conversation.is-internal{background-color:#ece5d6}.chat-conversation-head{padding:12px 20px;gap:12px;background:white;border-bottom:0;box-shadow:0 1px 3px #2030440b;min-height:78px}.chat-conversation-head>.chat-avatar{width:45px;height:45px;border-radius:50%;background:#a9c9df;color:white}.chat-conversation-head strong{font-size:14px;line-height:19px;font-weight:600}.chat-conversation-head small{font-size:11px;color:#8b9aaa;line-height:15px}.chat-conversation-head button{background:transparent;border:0;color:#5b8cac;padding:7px 8px;font-size:11px}.chat-conversation-head button:hover{background:#f1f6fa}.chat-conversation.is-internal .chat-conversation-head{background:#fff9ed}.tg-car-meta{font-variant-numeric:tabular-nums;color:#5b7a93!important}
.tg-stage-row{display:flex;justify-content:space-between;align-items:center;gap:10px;flex:none;background:#f8fafc;border-bottom:1px solid #dce5eb;padding:7px 20px}.tg-stage{color:#5d7f97;font-size:11px}.tg-next-action{background:transparent;border:0;border-radius:5px;color:#278ace;font-size:11px;padding:3px 6px;cursor:pointer}.tg-next-action:hover{background:#e6f2fc}.ux-chat-controls{border-bottom:0;background:#ffffffbd;padding:6px 16px;gap:6px}.ux-chat-controls select{background:transparent;border:0;font-size:11px;max-width:118px;padding:6px}.ux-chat-controls button{background:transparent;border:0;color:#62849c;font-size:11px;padding:5px 9px;min-height:28px}.ux-chat-controls button:hover{background:#eaf2f8}.ux-chat-pins{background:#fff}.ux-chat-pins button{background:#fff;border-left:3px solid #66ace4;color:#638098;font-size:11px;padding:8px 15px;line-height:1.5}.ux-chat-pins button:last-child{border-bottom:0}
.chat-messages{padding:22px clamp(14px,4vw,58px);gap:9px;scroll-behavior:auto}.chat-message{max-width:min(82%,620px);min-width:150px;border:0;border-radius:12px 12px 12px 4px;background:#fff;box-shadow:0 1px 2px #29432120;padding:9px 12px}.chat-message.is-own{background:#e6ffc8;border:0;border-radius:12px 12px 4px 12px}.chat-message>strong{font-size:11px;color:#3791bc;font-weight:600}.chat-message p{color:#25352e;font-size:14px;line-height:1.55;margin:4px 0;white-space:pre-wrap}.chat-message footer{margin-top:4px;color:#96a28e;font-size:10px;gap:9px}.chat-message footer button{font-size:10px;color:#88a17b;opacity:.8}.chat-message footer button:hover{opacity:1;text-decoration:underline}.chat-message.is-own footer{color:#73a15b}.chat-message.is-own>strong{color:#649455}.chat-system{font-size:10px;line-height:1.5;color:#fff;max-width:90%;background:#7d9778a6;border:0;border-radius:10px;padding:5px 11px;margin:4px 0}.chat-system time{color:#ffffffb5;font-size:9px}.chat-document{color:#308ec4!important}.chat-document>span:first-child{display:grid;place-items:center;border-radius:8px;background:#54a7df;color:white;width:38px;height:43px;font-size:23px}.chat-reply-quote{background:#edf5e9;border-left:3px solid #8ab87d;color:#78946d;border-radius:4px}.chat-photo,.chat-video{border-radius:8px;margin-top:7px}.ux-chat-quick button{color:#3384a6;background:#f3faf0;border:0;border-radius:6px;padding:6px 8px!important;font-size:11px!important}.ux-unread-marker{background:#ffffffbb;color:#66895b;border-radius:0;margin:8px -15px;padding:7px;font-size:11px}.tg-found-message{outline:3px solid #83bd61;outline-offset:3px}.chat-message mark,.tg-search-hit mark{background:#ffe79a;color:inherit;border-radius:2px;padding:0 1px}
.chat-composer{background:transparent;border:0;padding:10px clamp(12px,4vw,58px) 18px}.chat-compose-row{border-radius:14px;gap:6px;align-items:flex-end;background:#fff;padding:4px;box-shadow:0 1px 3px #29432120}.chat-compose-row textarea{border:0;background:transparent;min-height:46px;max-height:160px;font-size:14px;line-height:20px;padding:12px 7px;resize:none;border-radius:0}.chat-compose-row textarea:focus{outline:0}.chat-attach{width:40px;height:44px;border:0;background:transparent;border-radius:50%;font-size:25px;color:#98a8b1}.chat-compose-row>.primary{width:44px;height:44px;min-width:44px;border-radius:50%;margin:0;padding:0;font-size:0;background:#3390ec;border:0;box-shadow:none;position:relative}.chat-compose-row>.primary:after{content:'➤';font-size:22px;color:white;display:block;transform:rotate(-20deg);margin-left:3px}.chat-compose-row>.primary:disabled{opacity:.5}.chat-compose-row>.primary:focus-visible{outline:3px solid #a9cdeb;outline-offset:2px}.chat-compose-meta>div{background:#ffffffed;font-size:11px;border-radius:7px;color:#62859d}.chat-error{background:#fff3ec;border-radius:6px;padding:7px;color:#b05c4a}.chat-error:empty{padding:0}.ux-chat-upload-list:not(:empty){background:white;border-radius:9px;padding:5px 12px;margin-bottom:6px}
.tg-search-results{flex:1;overflow:auto;background:white;border-bottom:1px solid #e4eaf0;min-height:140px}.tg-search-results[hidden]{display:none}.tg-search-results:not([hidden])+.chat-thread-list{flex:.65}.tg-search-results>header{padding:10px 16px;color:#7492a8;font-size:11px;background:#f6f8fa}.tg-search-results>p{padding:16px;font-size:12px}.tg-search-hit{width:100%;border:0;border-bottom:1px solid #f0f2f4;background:white;padding:12px 16px;text-align:left;display:flex;flex-direction:column;gap:5px;cursor:pointer}.tg-search-hit:hover{background:#edf5fc}.tg-search-hit>small{color:#6b91af;font-size:11px}.tg-search-hit>span{font-size:13px;color:#2d4051;line-height:1.5;overflow-wrap:anywhere}.tg-search-hit>time{font-size:10px;color:#9aabb8}.tg-search-more{margin:10px;font-size:11px}
.tg-library{position:absolute;inset:0;background:#fff;z-index:20;display:flex;flex-direction:column;overflow:hidden}.tg-library>header{display:flex;gap:12px;align-items:center;padding:16px;border-bottom:1px solid #e4ebf0}.tg-library>header>div{flex:1;min-width:0}.tg-library>header strong{font-size:17px}.tg-library>header small{display:block;color:#8d9ba8;font-size:11px;margin-top:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tg-library-close{background:none;border:0;color:#7294b0;font-size:24px;cursor:pointer}.tg-library>header select{font-size:11px;border:1px solid #e2e9ef;border-radius:7px;padding:8px;max-width:150px}.tg-library-tabs{display:flex;border-bottom:1px solid #e4ebf0;gap:0;padding:0 16px}.tg-library-tabs button{border:0;border-bottom:3px solid transparent;padding:14px 12px;background:none;font-size:12px;color:#8195a7;cursor:pointer}.tg-library-tabs button.selected{border-color:#3998df;color:#3998df}.tg-library-tabs b{font-size:10px;font-weight:500;margin-left:4px}.tg-library-items{flex:1;overflow:auto;padding:16px}.tg-library-items.is-photos{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:12px;align-content:start}.tg-library-file{border-bottom:1px solid #edf1f5;padding:12px 3px;display:flex;flex-direction:column;gap:5px;overflow-wrap:anywhere}.tg-library-file a{color:#368dc4;font-size:13px}.tg-library-file>small{color:#93a3b0;font-size:10px}.tg-library-file>button:first-child{padding:0;border:0;border-radius:7px;overflow:hidden;background:#edf2f6;cursor:pointer}.tg-library-file img{display:block;width:100%;height:140px;object-fit:cover}.tg-library-file video{max-height:260px;width:100%;background:#18242e}.tg-library-jump{align-self:flex-start;padding:3px 0;border:0;background:none;color:#6a9cbd;font-size:10px;cursor:pointer}.tg-library-error{padding:8px 16px;color:#b25f5f;font-size:12px}.tg-library-empty{font-size:13px;color:#90a0af;padding:25px}.tg-library-more{align-self:start;margin-top:12px;font-size:12px}
@media(min-width:701px) and (max-width:1100px){.chat-workspace{grid-template-columns:300px minmax(0,1fr)}.chat-conversation-head{padding:10px 14px}.chat-conversation-head>[data-open-card]{margin-left:52px}.chat-conversation-head>div{min-width:150px}.chat-messages{padding:16px}.chat-composer{padding:10px 16px 14px}}
@media(max-width:700px){body:has(.chat-workspace)>.sidebar,body:has(.chat-workspace) #app>.sidebar{display:none}.workspace:has(.chat-workspace){margin:0;padding:0}.workspace:has(.chat-workspace)>.pagehead{display:none}.chat-workspace{display:block;border:0;border-radius:0;height:100dvh;min-height:0;margin:0}.chat-sidebar,.chat-conversation{height:100%}.chat-search{padding:10px 12px;grid-template-columns:minmax(0,1fr) 42px}.tg-list-top{grid-column:1/-1;display:flex;align-items:center;gap:18px;padding:3px 2px 7px}.tg-list-top a{color:#7297b3;font-size:22px}.tg-list-top strong{font-size:19px;font-weight:600;color:#263f53}.tg-filter-toggle{grid-row:2}.chat-search>input{grid-row:2}.chat-thread-list{padding-top:0}.ux-chat-request-heading{min-height:66px}.ux-chat-car-row .chat-thread{min-height:82px}.chat-conversation-head{padding:9px 10px;gap:9px;min-height:72px}.chat-conversation-head>.chat-avatar{width:37px;height:37px}.chat-conversation-head>div{flex:1;min-width:0}.chat-conversation-head strong{font-size:12px;line-height:17px}.chat-conversation-head small{font-size:9px;line-height:13px}.chat-conversation-head button{padding:5px;font-size:10px}.chat-back{width:24px;flex:none}.chat-conversation-head>[data-other-chat]{display:none}.chat-conversation.is-internal .chat-conversation-head>[data-other-chat]{display:block}.tg-stage-row{padding:6px 12px;gap:6px}.tg-stage{font-size:10px}.tg-next-action{font-size:10px;max-width:65%;text-align:right}.ux-chat-controls{padding:4px 10px;gap:1px}.ux-chat-controls button{font-size:10px;padding:5px}.ux-chat-controls select{max-width:95px;font-size:10px}.chat-messages{padding:14px 10px;gap:9px}.chat-message{max-width:90%;padding:8px 10px}.chat-message p{font-size:13px}.chat-composer{padding:8px 9px max(9px,env(safe-area-inset-bottom))}.chat-compose-row{flex-wrap:nowrap;border-radius:12px;gap:3px}.chat-compose-row textarea{flex-basis:auto;font-size:13px;min-height:44px;padding:11px 4px}.chat-compose-row>.primary{width:40px;min-width:40px;height:40px;margin:2px}.chat-attach{width:32px;height:42px}.tg-library>header{padding:12px;gap:8px}.tg-library>header select{max-width:115px;padding:6px;font-size:10px}.tg-library-items.is-photos{grid-template-columns:repeat(2,minmax(0,1fr))}.tg-library-tabs{padding:0 8px}.tg-library-tabs button{padding:12px 8px;font-size:11px}}
@media(prefers-reduced-motion:reduce){.chat-workspace *{scroll-behavior:auto!important}}
