#chatPanelBody{position:relative}.chat-drag-over:after{content:'+ Добавить сюда';position:absolute;inset:8px;z-index:65;display:grid;place-items:center;border:2px dashed var(--blue);border-radius:10px;background:#eaf3fff2;color:var(--blue);font-size:22px;font-weight:600;pointer-events:none}
.chat-composer-extras{grid-column:1/-1;min-width:0;width:100%;flex:0 0 100%}.chat-composer-extras[hidden]{display:none!important}.chat-pending-files{display:flex;gap:8px;overflow-x:auto;max-width:100%;padding:4px 0;scroll-snap-type:x proximity}.chat-pending-file{position:relative;flex:0 0 150px;min-width:0;padding:8px 30px 8px 9px;border:1px solid var(--line);border-radius:7px;background:var(--bg);scroll-snap-align:start}.chat-pending-file>span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.chat-pending-file small{display:block;font-size:10px;color:var(--muted)}.chat-pending-file>button{position:absolute;right:3px;top:3px;min-height:26px;width:26px;padding:0}
.chat-reply-draft{display:flex;justify-content:space-between;align-items:center;border-left:3px solid var(--blue);background:var(--blueSoft);padding:6px 8px;margin-bottom:5px;gap:8px}.chat-reply-draft>span{min-width:0}.chat-reply-draft strong,.chat-reply-draft small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-reply-draft strong{font-size:12px}.chat-reply-draft small{font-size:11px}.chat-reply-draft>button{min-height:28px;padding:3px 8px}
.chat-quote{display:block;width:100%;text-align:left;margin:5px 0;border:0;border-left:3px solid var(--blue);border-radius:3px;padding:6px 8px;background:#326bb510;min-height:0}.chat-quote strong,.chat-quote span{display:block;font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-quote span{font-weight:400}.chat-reply-action{display:block;min-height:26px!important;padding:3px 0!important;background:transparent;border:0;color:var(--blue);font-size:11px;opacity:0}.chat-bubble:is(:hover,:focus-within) .chat-reply-action{opacity:1}.chat-file-group{position:relative;max-width:100%;margin:6px 0}.chat-file-tiles{display:flex;gap:6px;overflow-x:auto;max-width:100%;padding-bottom:3px}.chat-file-tile{flex:0 0 145px;min-width:0;padding:8px;border:1px solid var(--line);border-radius:7px;background:#ffffff80}.chat-file-name{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px}.chat-file-download{display:block;font-size:11px;margin-top:5px;opacity:0}.chat-download-all{padding:3px 5px!important;min-height:26px!important;font-size:11px;opacity:0}.chat-file-group:is(:hover,:focus-within) :is(.chat-file-download,.chat-download-all){opacity:1}.chat-match{background:#ffdf8a;color:inherit;font-weight:700;padding:0}.chat-bubble{overflow-anchor:none}.chat-stream{overflow-anchor:none;scrollbar-gutter:stable}
@media(hover:none){.chat-reply-action,.chat-file-download,.chat-download-all{opacity:1}}
@media(max-width:650px){.chat-composer-extras{grid-column:1/-1;max-height:150px;overflow-y:auto}.chat-file-tile{flex-basis:125px}.chat-pending-file{flex-basis:135px}}
@media(prefers-reduced-motion:reduce){.chat-stream{scroll-behavior:auto}}
.chat-composer-extras{grid-row:1}.chat-composer:has(>.chat-composer-extras:not([hidden])) :is(textarea,.chat-clip,button.primary){grid-row:2}
.chat-files-day+.chat-files-day{margin-top:18px}.chat-files-day>h3{position:sticky;top:0;z-index:1;margin:0 0 8px;padding:7px 10px;font-size:13px;background:var(--bg);border-radius:5px}
.chat-files-message{border:1px solid var(--line);border-radius:8px;padding:10px 12px;margin-bottom:8px}.chat-files-message>header{display:flex;justify-content:space-between;align-items:start;gap:10px}.chat-files-message>header>div{min-width:0}.chat-files-message>header strong{font-size:13px}.chat-files-message>header p{font-size:12px;line-height:1.4;margin:5px 0 0;white-space:pre-wrap;overflow-wrap:anywhere}.chat-files-message>header button{flex-shrink:0}.chat-files-message-items{list-style:none;padding:0;margin:8px 0 0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.chat-files-message-items>li{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0;border-radius:5px;background:var(--bg);padding:8px}.chat-files-message-items>li>div{min-width:0}.chat-files-message-items a{font-size:12px;overflow-wrap:anywhere}.chat-files-message-items>li>a{flex-shrink:0;font-size:11px}.chat-files-message-items small{font-size:10px}
@media(max-width:650px){.chat-files-message{padding:8px}.chat-files-message-items{grid-template-columns:minmax(0,1fr)}.chat-files-message>header button{font-size:11px;padding:5px 6px}}
.chat-file-name,.chat-dialog-file-name{color:var(--text);cursor:text;user-select:text}.chat-file-preview{display:block;min-height:26px!important;padding:3px 0!important;margin-top:4px;border:0;background:transparent;color:var(--blue);font-size:11px}.chat-dialog-file-name{display:block;overflow-wrap:anywhere;font-size:12px}

.chat-file-tile{flex-basis:195px;width:195px;display:flex;flex-direction:column;gap:6px;padding:9px}.chat-file-name,.chat-dialog-file-name{line-height:1.4;min-width:0}.chat-file-thumbnail{height:100px;width:100%;padding:0;display:grid;place-items:center;overflow:hidden;border:0;border-radius:5px;background:#eaf0f8;flex-shrink:0}.chat-file-thumbnail img{display:block;width:100%;height:100%;object-fit:contain}.chat-file-format{color:#4b709e;font-size:22px;font-weight:700;letter-spacing:1px}.chat-file-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:auto;min-height:30px}.chat-file-actions :is(.chat-file-preview,.chat-file-download){display:block;opacity:1;margin:0;white-space:nowrap;font-size:11px}.chat-download-all{opacity:1;margin-top:4px}.chat-files-message-items{grid-template-columns:repeat(auto-fill,minmax(190px,1fr))}.chat-files-message-items>li{padding:0;align-items:stretch}.chat-files-message-items>li>.chat-file-tile{width:100%;flex:1;min-width:0}.chat-files-message-items .chat-dialog-file-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-upload-progress{grid-column:1/-1;flex:0 0 100%;width:100%;font-size:12px;color:var(--blue);padding:5px 0}.chat-upload-progress span{display:block}.chat-upload-progress progress{display:block;width:100%;height:5px;margin-top:5px;accent-color:var(--blue)}
@media(max-width:650px){.chat-file-tile{flex-basis:180px;width:180px}.chat-files-message-items{grid-template-columns:repeat(auto-fill,minmax(160px,1fr))}.chat-file-actions{gap:6px}}
.chat-file-thumbnail iframe{display:block;width:100%;height:100%;border:0;pointer-events:none;background:white}.chat-file-thumbnail img{font-size:11px;color:var(--muted)}

/* Keep conversation tiles lightweight and put all message actions on one row. */
.chat-file-tile{flex-basis:180px;width:180px;padding:7px;gap:5px}.chat-file-thumbnail{height:76px}.chat-file-format{font-size:19px}.chat-file-group{margin:5px 0}.chat-file-actions{gap:5px;min-height:28px}.chat-file-actions :is(.chat-file-preview,.chat-file-download){display:inline-flex;align-items:center;justify-content:center;min-height:28px!important;padding:4px 6px!important;border:1px solid #c5d4e6;border-radius:5px;background:#fff;color:#285a98;text-decoration:none;font-size:11px;font-weight:500;line-height:1.3}.chat-file-actions :is(.chat-file-preview,.chat-file-download):hover{background:#edf4ff;border-color:#7fa4d0}.chat-message-actions{display:flex;align-items:center;gap:8px;margin-top:5px;min-height:28px}.chat-message-actions .chat-reply-action{display:inline-flex;align-items:center;justify-content:center;gap:5px;margin-left:auto;opacity:1;white-space:nowrap;min-height:28px!important;padding:4px 7px!important;font-size:11px;border:1px solid #c5d4e6;border-radius:5px;background:#ffffffb0;color:#285a98}.chat-reply-action svg{width:15px;height:15px;flex-shrink:0}.chat-message-actions .chat-download-all{margin:0;min-height:28px!important;padding:4px 7px!important;white-space:nowrap;border-radius:5px;font-size:11px}.chat-bubble .chat-read-state{margin-top:3px!important}.chat-history-more{display:block;margin:3px auto 10px;font-size:12px;min-height:30px;padding:5px 10px}.chat-files-more{display:block;margin:12px auto 0}.chat-file-thumbnail img{max-width:100%;max-height:100%}
@media(max-width:650px){.chat-file-tile{flex-basis:172px;width:172px}.chat-file-actions :is(.chat-file-preview,.chat-file-download){padding:4px 5px!important}}

.chat-history-navigation{display:flex;justify-content:center;flex-wrap:wrap;gap:6px}.chat-history-navigation .chat-history-more{margin:3px 0 10px}

.chat-message-meta{display:flex;align-items:baseline;justify-content:space-between;gap:12px;min-width:0;margin-bottom:4px}.chat-message-meta>small:first-child{min-width:0;overflow-wrap:anywhere;line-height:1.4}.chat-bubble .chat-message-meta>.chat-read-state{flex:0 0 auto;align-self:flex-start;white-space:nowrap;margin:0!important;line-height:1.4}

.chat-files-message{width:max-content;max-width:88%;min-width:min(220px,88%);background:#fff;margin-right:auto}.chat-files-message.mine{margin-left:auto;margin-right:0;background:var(--blueSoft,#e6f0ff);border-color:#cbdced}.chat-files-message .chat-files-message-items{display:flex;gap:6px;overflow-x:auto;max-width:100%;padding-bottom:2px}.chat-files-message-items>li{flex:0 0 180px;min-width:0}.chat-files-message>header>div{flex:1}.chat-files-message>header p{max-width:70ch}@media(max-width:650px){.chat-files-message{max-width:94%;min-width:min(220px,94%)}.chat-files-message-items>li{flex-basis:172px}}

.chat-search-suggestions{display:grid;gap:4px;padding:6px;border:1px solid var(--line);border-radius:7px;background:#fff}
.chat-search-suggestions[hidden]{display:none}
.chat-search-suggestions>button{display:grid;gap:2px;text-align:left;min-width:0;padding:5px 8px;border:0;background:#f5f8fc}
.chat-search-suggestions strong{font-size:11px;color:var(--muted)}
.chat-search-suggestions span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.chat-group-members { position: relative; flex: 0 0 auto; }
.chat-group-members > summary {
 display: grid;
 place-items: center;
 width: 38px;
 height: 36px;
 border: 1px solid var(--line, #d9e1eb);
 border-radius: 6px;
 cursor: pointer;
 list-style: none;
}
.chat-group-members > summary::-webkit-details-marker { display: none; }
.chat-group-members-list {
 display: none;
 position: absolute;
 top: 100%;
 right: 0;
 z-index: 20;
 width: min(240px, 65vw);
 max-height: min(300px, 45vh);
 overflow: auto;
 padding: 6px;
 background: var(--card, #fff);
 border: 1px solid var(--line, #d9e1eb);
 border-radius: 6px;
 box-shadow: 0 4px 14px #152c4826;
}
.chat-group-members[open] > .chat-group-members-list { display: grid; }
@media (hover: hover) {
 .chat-group-members:hover > .chat-group-members-list { display: grid; }
}
.chat-group-members-list a { overflow-wrap: anywhere; padding: 7px 9px; }
