/* Геометрия уведомлений и мессенджера после общих правил раскладки. */
.panel-control-row>[data-action="notifications"]{position:relative;min-height:44px;padding-right:44px;overflow:visible}
[data-action="notifications"]>span:not(.nav-count){min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#notification-count{position:absolute;inset:auto 5px auto auto;top:50%;transform:translateY(-50%);display:inline-flex;align-items:center;justify-content:center;width:34px;min-width:34px;height:22px;box-sizing:border-box;padding:2px 4px;margin:0;line-height:1;font-size:11px;font-variant-numeric:tabular-nums;white-space:nowrap;border-radius:11px;background:#526579;color:#fff}
#notification-count[hidden]{display:none}
.catalog-status{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;min-height:44px;font-size:13px;color:var(--muted)}
.catalog-status[aria-busy=true]>span:before{content:"";display:inline-block;width:10px;height:10px;border:2px solid var(--border);border-top-color:var(--accent);border-radius:50%;margin-right:8px;animation:catalog-spin 1s linear infinite}
@keyframes catalog-spin{to{transform:rotate(360deg)}}
.boost-lot{display:grid;grid-template-columns:minmax(0,1fr) 44px;align-items:start;gap:14px;padding:18px 0}
.boost-lot>[data-lot]{grid-column:1/-1;width:100%}.boost-lot>label{grid-column:1;min-width:0;max-width:none}.boost-lot>.icon-button{grid-column:2;grid-row:2}
.boost-fields{grid-column:1/-1;display:grid;gap:12px;min-width:0}.boost-fields[hidden]{display:none}.boost-fields>.form-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.boost-fields label{width:100%;max-width:none;min-width:0}.boost-fields input{width:100%;min-width:0}.boost-fields small{color:var(--muted);line-height:1.5}
.boost-days{display:flex;gap:10px;flex-wrap:wrap}.boost-days .check-label{width:auto;min-height:38px}.boost-days input{width:auto}
.boost-state{font-size:12px;line-height:1.6;overflow-wrap:anywhere;background:var(--surface-soft);padding:12px;border-radius:12px}
.chat-layout{--telegram-blue:#3390ec;--chat-scene:#dbe6d3;--chat-outgoing:#e3ffc9}
.chat-layout .button:hover{transform:none}.chat-layout .dialog-item{padding:10px 12px;gap:12px}.chat-layout .dialog-item.selected{box-shadow:none}.chat-layout .dialog-item.selected :is(.muted,small,time,.dialog-preview){color:#ffffffbd}.chat-layout .dialog-item .avatar{width:54px;height:54px;min-width:54px;font-size:19px}.chat-layout .dialog-item strong{font-size:16px;font-weight:600}.chat-layout .dialog-item p{font-size:14px;line-height:20px}.chat-layout .chat-header{min-height:64px;padding:8px 18px;background:var(--surface);border-bottom:1px solid var(--border)}.chat-layout .chat-header .avatar{width:42px;height:42px}.chat-layout #chat-heading strong{font-size:16px}.chat-layout .message-bubble{border-radius:12px 12px 12px 3px;box-shadow:0 1px 2px #0002;padding:7px 10px;line-height:1.35;font-size:16px;max-width:min(560px,85%)}.chat-layout .message-bubble.own{border-radius:12px 12px 3px 12px}.chat-layout .message-bubble time{font-size:11px;line-height:16px}.chat-layout .message-date{font-size:12px;padding:5px 12px;border-radius:18px;align-self:center}.chat-layout #chat-send-form{align-items:end;gap:8px;max-width:760px;width:100%;margin:0 auto;padding:10px 16px;background:transparent;border-top:0}.chat-layout #chat-draft{background:var(--surface);border:0;border-radius:20px;box-shadow:0 1px 4px #0002;min-height:48px;padding:14px 18px;font-size:16px;line-height:20px}.chat-layout #chat-send-form .primary{min-width:48px;min-height:48px;border-radius:24px}.chat-layout #chat-send-form .send-label{display:none}.chat-layout #chat-send-form .secondary{min-width:44px;min-height:44px;border-radius:22px}.chat-layout #chat-send-form svg{width:22px;height:22px}
.chat-layout{grid-template-columns:320px minmax(0,1fr);height:min(800px,78dvh);min-height:400px;border-radius:18px;box-shadow:0 4px 22px #142c4312;--chat-scene:color-mix(in srgb,var(--surface-soft) 92%,#78a9b5);--chat-outgoing:color-mix(in srgb,var(--surface) 76%,#7cbb93)}
.chat-sidebar{display:flex;flex-direction:column;overflow:hidden;background:var(--surface)}.chat-sidebar>.search-box{flex-shrink:0}.chat-sidebar #dialog-list{overflow-y:auto;overflow-x:hidden;flex:1;min-height:0;overscroll-behavior:contain}
.dialog-item{border:0;border-radius:10px;padding:12px;gap:12px;margin:3px 8px;min-height:76px;background:transparent;box-shadow:none}.dialog-item:hover{background:var(--surface-soft)}.dialog-item.selected{box-shadow:inset 3px 0 0 var(--accent)}
.dialog-item .avatar{width:46px;height:46px;min-width:46px}.dialog-copy strong{font-size:14px;font-weight:600;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.dialog-copy p{font-size:13px;margin-top:7px;line-height:1.4}.dialog-meta{align-self:stretch;display:flex;flex-direction:column;align-items:flex-end;justify-content:space-between;gap:8px;flex-shrink:0;min-width:32px}.dialog-meta time{font-size:11px;color:var(--muted);font-variant-numeric:tabular-nums}.unread-chip{min-width:24px;height:22px;padding:3px 6px;box-sizing:border-box;display:inline-flex;justify-content:center;align-items:center;font-size:11px;line-height:1;font-variant-numeric:tabular-nums}
.chat-thread{min-height:0;background:var(--chat-scene)}.chat-thread>header{flex-shrink:0;background:var(--surface);min-height:70px;padding:12px 18px}.chat-thread>header>div{min-width:0;flex:1}.chat-thread>header strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-thread>header small{font-size:11px;max-height:32px;overflow:hidden;text-overflow:ellipsis;overflow-wrap:anywhere}.chat-thread>header>.avatar{flex-shrink:0}
.message-list{min-height:0;gap:8px;padding:18px 24px 22px;overflow-x:hidden;scrollbar-gutter:stable;overflow-anchor:none}.message-date{align-self:center;flex-shrink:0;padding:5px 12px;margin:9px 0;color:var(--muted);background:var(--surface);border-radius:18px;font-size:11px;box-shadow:0 1px 3px #00000008}
.message-bubble{flex-shrink:0;max-width:min(82%,620px);min-width:80px;box-sizing:border-box;background:var(--surface);border:0;border-radius:16px 16px 16px 5px;padding:10px 12px 7px;box-shadow:0 1px 2px #0000000c;overflow-wrap:anywhere;line-height:1.55}.message-bubble.own{background:var(--chat-outgoing);border-radius:16px 16px 5px 16px}.message-bubble p{display:inline;white-space:pre-wrap;font-size:14px;line-height:1.55;word-break:normal;overflow-wrap:anywhere}.message-bubble a{color:var(--accent);overflow-wrap:anywhere;word-break:break-word}.message-bubble time{display:inline-block;float:right;font-size:11px;line-height:1.5;margin:7px 0 0 12px;color:var(--muted);font-variant-numeric:tabular-nums}.message-bubble:after{content:"";display:block;clear:both}.message-bubble.system{max-width:90%;min-width:0;box-shadow:none;background:var(--surface-soft);border-radius:12px;text-align:center;padding:7px 12px;color:var(--muted)}.message-bubble.system p{font-size:12px}.message-bubble.system time{float:none;margin:0 0 0 8px}.message-signature{display:block;margin-bottom:3px;font-size:11px;line-height:1.4;font-weight:600;color:var(--muted);overflow-wrap:anywhere}.message-attachment{display:block;margin-top:8px;border-radius:10px;overflow:hidden}.message-attachment img{max-height:240px;max-width:100%;object-fit:contain}
#chat-send-form{flex-shrink:0;grid-template-columns:minmax(0,1fr) auto;align-items:end;border-top:0;gap:10px;padding:12px 16px max(12px,env(safe-area-inset-bottom));background:var(--surface)}
#chat-send-form textarea{border-radius:20px;resize:none;min-height:44px;max-height:160px;padding:11px 14px;line-height:1.5;overflow:auto;background:var(--surface-soft)}#chat-send-form>.button{align-self:end;min-height:44px;height:44px;border-radius:22px;margin:0}#chat-send-status:empty{display:none}#chat-send-status{font-size:11px;line-height:1.5;overflow-wrap:anywhere}
.new-messages{bottom:calc(var(--composer-height,80px) + 12px);right:18px;z-index:1;border-radius:22px;box-shadow:0 3px 12px #00000018}.older-messages{flex-shrink:0;font-size:12px;min-height:36px;margin:8px auto 0;background:var(--surface)}
@media(max-width:1100px){.chat-layout{grid-template-columns:270px minmax(0,1fr)}.message-list{padding:15px}.chat-thread>header .text-button{font-size:0;width:44px;height:44px;flex-shrink:0;padding:10px;overflow:hidden}}
@media(max-width:850px){.panel-control-row>[data-action="notifications"]{flex:0 0 60px;box-sizing:border-box;width:60px;height:44px;padding:8px 34px 8px 8px;gap:0;overflow:visible}.panel-control-row>[data-action="notifications"]>.icon{flex-shrink:0;width:18px;height:18px}#notification-count{width:29px;min-width:29px;right:3px;font-size:11px;top:50%;transform:translateY(-50%)}.panel-control-row>.icon-button{flex-shrink:0}.panel-controls{flex-shrink:0}}
@media(max-width:720px){.chat-layout{display:block;height:calc(100dvh - 175px - var(--chat-keyboard-space,0px));min-height:260px;border-radius:14px}.chat-sidebar{height:100%}.chat-thread{height:100%;display:none}.chat-layout.has-chat .chat-sidebar{display:none}.chat-layout.has-chat .chat-thread{display:flex}.chat-thread>header{min-height:60px;padding:8px 10px;gap:8px}.chat-thread>header>.mobile-back{display:inline-flex;flex-shrink:0}.chat-thread>header>.avatar{width:34px;height:34px}.chat-thread>header strong{font-size:14px}.message-list{padding:12px 10px 18px}.message-bubble{max-width:88%;padding:9px 11px 6px}.message-bubble p{font-size:14px}#chat-send-form{grid-template-columns:minmax(0,1fr) 44px;padding:9px 8px max(9px,env(safe-area-inset-bottom));gap:7px}#chat-send-form>.button{width:44px;padding:10px}.send-label{display:none}.boost-fields>.form-row{grid-template-columns:repeat(2,minmax(0,1fr))}.boost-fields>.form-row>label:last-child{grid-column:1/-1}.catalog-status .button{white-space:nowrap}}
@media(prefers-reduced-motion:reduce){.catalog-status[aria-busy=true]>span:before{animation:none}.dialog-item{transition:none}}
@media(max-width:720px){.chat-layout.has-chat.is-typing{position:fixed;left:0;right:0;top:var(--chat-viewport-top,0px);height:var(--chat-viewport-height,100dvh);min-height:0;border-radius:0;z-index:40}}

/* Общая геометрия Telegram: редактор и две отдельные кнопки в одной строке. */
.chat-layout{grid-template-columns:360px minmax(0,1fr);--chat-scene:#dbe6d3;--chat-outgoing:#e3ffc9}
.chat-layout .chat-thread>header{min-height:64px;padding:8px 18px}
.chat-layout .message-bubble p{line-height:1.35}
.chat-layout #chat-send-form{grid-template-columns:minmax(0,1fr) 44px 48px}
.chat-layout #chat-send-form>.button{align-self:end;width:100%;height:48px;padding:12px}
@media(max-width:1100px){.chat-layout{grid-template-columns:300px minmax(0,1fr)}}
@media(max-width:720px){.chat-layout{display:block}.chat-layout .chat-thread>header{min-height:56px;padding:6px 10px}.chat-layout #chat-send-form{grid-template-columns:minmax(0,1fr) 44px 44px;padding:8px}.chat-layout #chat-send-form>.button{height:44px;padding:10px}}

.chat-sidebar>.search-box{flex-basis:auto}.toast{pointer-events:none}

.chat-layout .dialog-item.selected .dialog-copy p{color:#ffffffbd}
@media(max-width:720px){
 .chat-layout.has-chat{position:fixed;left:0;right:0;top:var(--chat-viewport-top,0px);height:var(--chat-viewport-height,100dvh);min-height:0;border-radius:0;z-index:40}
 body:has(#view-chats:not([hidden]) .chat-layout.has-chat){overflow:hidden}
 .chat-layout.has-chat .message-list{padding-bottom:16px}
}
