.sidebar{width:var(--sidebar-width);min-width:var(--sidebar-width);background:var(--bg-secondary);border-right:1px solid var(--border);display:flex;flex-direction:column;height:100vh;height:100dvh;height:var(--app-height,100dvh);position:relative;z-index:10;overflow:hidden;overflow-x:hidden}
.sidebar-header{display:flex;align-items:center;justify-content:space-between;padding:16px 12px;border-bottom:1px solid var(--border)}
.sidebar-logo{font-size:18px;font-weight:700;color:var(--accent)}
.search-bar{padding:8px 12px;border-bottom:1px solid var(--border);position:relative}
.search-input{width:100%;background:var(--bg-tertiary);border:1px solid var(--border);border-radius:10px;padding:10px 14px;color:var(--text-primary);font-size:14px;outline:none;font-family:inherit}
.search-input:focus{border-color:var(--accent)}
.search-results{position:absolute;top:100%;left:12px;right:12px;background:var(--bg-secondary);border:1px solid var(--border);border-radius:12px;z-index:100;max-height:300px;overflow-y:auto;box-shadow:0 8px 30px var(--shadow)}
.search-result-item{display:flex;align-items:center;gap:12px;padding:12px 16px;cursor:pointer;transition:background .15s;color:var(--text-primary)}
.search-result-item:hover{background:var(--bg-tertiary)}
.chats-list{flex:1;overflow-y:auto;overflow-x:hidden;overscroll-behavior-x:none;-webkit-overflow-scrolling:touch}
.chat-item{display:flex;align-items:center;gap:12px;padding:12px 16px;cursor:pointer;transition:background .15s}
.chat-item:hover{background:rgba(176,110,243,.08)}
.chat-item.active{background:rgba(176,110,243,.15)}
.chat-item-avatar-wrap{position:relative;flex-shrink:0}
.chat-item-img{width:48px;height:48px;border-radius:50%;object-fit:cover}
.chat-avatar-placeholder{width:48px;height:48px;border-radius:50%;background:linear-gradient(135deg,var(--accent),var(--accent-hover));display:flex;align-items:center;justify-content:center;font-size:20px;font-weight:700;color:white;flex-shrink:0}
.online-indicator{position:absolute;bottom:2px;right:2px;width:12px;height:12px;background:var(--success);border-radius:50%;border:2px solid var(--bg-secondary)}
.chat-item-info{flex:1;min-width:0}
.chat-item-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:3px}
.chat-item-name{font-size:15px;font-weight:600;color:var(--text-primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-item-time{font-size:11px;color:var(--text-muted);flex-shrink:0}
.chat-item-preview{font-size:13px;color:var(--text-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sidebar-menu{position:absolute;top:60px;right:12px;background:var(--bg-secondary);border:1px solid var(--border);border-radius:12px;z-index:100;box-shadow:0 8px 30px var(--shadow);min-width:220px;overflow:hidden}
.menu-item{padding:13px 18px;cursor:pointer;font-size:14px;color:var(--text-primary);transition:background .15s;display:flex;align-items:center;gap:10px}
.menu-item:hover{background:var(--bg-tertiary)}
.donate-btn{color:var(--accent)!important;font-weight:600}
.logout-btn{color:var(--danger)!important}
.members-list{display:flex;flex-wrap:wrap;gap:8px;padding:8px 0}
.member-tag{background:var(--bg-tertiary);border-radius:20px;padding:4px 12px;font-size:13px;display:flex;align-items:center;gap:6px;color:var(--accent)}
.member-tag button{background:none;border:none;color:var(--text-muted);cursor:pointer;font-size:14px;padding:0;line-height:1}
@media(max-width:768px){.sidebar{position:absolute;left:0;top:0;width:100vw;max-width:100vw;height:100vh;height:100dvh;height:var(--app-height,100dvh);z-index:50}.sidebar.hidden{display:none}.sidebar-menu{position:fixed;top:56px;right:10px;z-index:1300}}
