*{margin:0;padding:0;box-sizing:border-box}html,body{margin:0;padding:0;height:100%;width:100%}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-color:#f5f5f5;color:#333}#app{width:100%;min-height:100vh}.page{min-height:100vh}.page_centered{display:flex;align-items:center;justify-content:center;min-height:100vh;width:100%;margin:0;padding:0;box-sizing:border-box}.page__container{background:#fff;padding:40px;border-radius:8px;box-shadow:0 2px 8px #0000001a;width:90%;max-width:400px;margin:20px}.page__title{margin-bottom:30px;font-size:24px;font-weight:600;text-align:center}.page_chats{display:flex;height:100vh;padding:0}.chats-sidebar{width:300px;background:#fff;border-right:1px solid #e0e0e0;display:flex;flex-direction:column}.chats-sidebar__header{padding:20px;border-bottom:1px solid #e0e0e0}.user-profile{display:flex;align-items:center;gap:12px;padding:12px;background:#f5f5f5;border-radius:8px;margin-bottom:16px}.user-profile__avatar{width:48px;height:48px;border-radius:50%;background:linear-gradient(135deg,#3369f3,#2a5ae0);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:600;font-size:16px;flex-shrink:0}.user-profile__info{flex:1;min-width:0}.user-profile__name{font-weight:600;font-size:14px;color:#333;margin-bottom:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-profile__login{font-size:12px;color:#999;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-profile__link{color:#3369f3;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;transition:background-color .2s;flex-shrink:0}.user-profile__link:hover{background-color:#3369f31a}.chats-sidebar__actions{display:flex;flex-direction:column;gap:8px}.button_secondary{background-color:#f5f5f5;color:#333;border:1px solid #e0e0e0}.button_secondary:hover{background-color:#e8e8e8;border-color:#d0d0d0}.chats-sidebar__list{flex:1;overflow-y:auto}.chats-main{flex:1;display:flex;flex-direction:column;background:#f5f5f5}.chats-main__messages{flex:1;padding:20px;overflow-y:auto;display:flex;flex-direction:column;gap:10px}.chats-main__form{padding:20px;background:#fff;border-top:1px solid #e0e0e0;display:flex;gap:10px}.chat-item{display:flex;padding:15px;border-bottom:1px solid #e0e0e0;cursor:pointer;transition:background-color .2s}.chat-item:hover{background-color:#f5f5f5}.chat-item_active{background-color:#e7f3ff;border-left:3px solid #3369f3}.chat-item__avatar{width:50px;height:50px;border-radius:50%;margin-right:15px;object-fit:cover}.chat-item__avatar_empty{background-color:#e0e0e0}.chat-item__content{flex:1;min-width:0}.chat-item__header{display:flex;justify-content:space-between;align-items:center;margin-bottom:5px}.chat-item__title{font-size:16px;font-weight:600;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-item__time{font-size:12px;color:#999;flex-shrink:0}.chat-item__footer{display:flex;justify-content:space-between;align-items:center}.chat-item__message{font-size:14px;color:#666;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}.chat-item__badge{background-color:#3369f3;color:#fff;border-radius:12px;padding:2px 8px;font-size:12px;font-weight:600;margin-left:10px}.message{max-width:60%;padding:10px 15px;border-radius:12px;background:#fff;margin-bottom:10px;align-self:flex-start}.message_own{background:#e7f3ff;align-self:flex-end}.message__content{margin-bottom:5px;word-wrap:break-word}.message__time{font-size:11px;color:#999;text-align:right}.form{display:flex;flex-direction:column;gap:20px}.input-wrapper{display:flex;flex-direction:column;gap:5px}.input-label{font-size:14px;font-weight:500;color:#333}.input{padding:10px 15px;border:1px solid #e0e0e0;border-radius:4px;font-size:16px;transition:border-color .2s}.input:focus{outline:none;border-color:#3369f3}.input_error{border-color:#f33}.input-error{font-size:12px;color:#f33;margin-top:5px}.button{padding:12px 24px;border:none;border-radius:4px;font-size:16px;font-weight:500;cursor:pointer;transition:background-color .2s}.button_primary{background-color:#3369f3;color:#fff}.button_primary:hover{background-color:#2a5ae0}.button:disabled,.button_primary:disabled{background-color:#ccc;cursor:not-allowed;opacity:.6}.button:disabled:hover,.button_primary:disabled:hover{background-color:#ccc}.link{display:block;text-align:center;margin-top:20px;color:#3369f3;text-decoration:none;font-size:14px}.link:hover{text-decoration:underline}.auth-switch{text-align:center;margin-top:20px}.auth-switch__text{color:#666;margin-right:10px}.auth-switch__button{display:inline-block;text-decoration:none;padding:10px 20px}.chats-main__header{padding:20px;background:#fff;border-bottom:1px solid #e0e0e0}.chats-main__header h2{margin:0;font-size:18px;font-weight:600}.group-panel{position:fixed;top:0;right:0;width:400px;height:100vh;background:#fff;box-shadow:-2px 0 8px #0000001a;z-index:1000;display:flex;flex-direction:column;transition:transform .3s ease}.group-panel_hidden{transform:translate(100%)}.group-panel__header{padding:20px;border-bottom:1px solid #e0e0e0;display:flex;justify-content:space-between;align-items:center}.group-panel__header h3{margin:0;font-size:18px;font-weight:600}.group-panel__close{background:none;border:none;font-size:24px;cursor:pointer;color:#666;padding:0;width:30px;height:30px;display:flex;align-items:center;justify-content:center}.group-panel__close:hover{color:#333}.group-panel__users{padding:20px;flex:1;overflow-y:auto}.group-panel__users h4{margin:0 0 15px;font-size:16px;font-weight:600}.user-checkbox{display:flex;align-items:center;padding:10px;margin-bottom:10px;border:1px solid #e0e0e0;border-radius:4px;cursor:pointer;transition:background-color .2s}.user-checkbox:hover{background-color:#f5f5f5}.user-checkbox input[type=checkbox]{margin-right:10px;cursor:pointer}.user-checkbox span{cursor:pointer}.group-message-form{padding:20px;border-top:1px solid #e0e0e0;display:flex;flex-direction:column;gap:10px}.create-chat-panel{position:fixed;top:0;right:0;width:400px;height:100vh;background:#fff;box-shadow:-2px 0 8px #0000001a;z-index:1000;display:flex;flex-direction:column;transition:transform .3s ease}.create-chat-panel_hidden{transform:translate(100%)}.create-chat-panel__header{padding:20px;border-bottom:1px solid #e0e0e0;display:flex;justify-content:space-between;align-items:center}.create-chat-panel__header h3{margin:0;font-size:18px;font-weight:600}.create-chat-panel__close{background:none;border:none;font-size:24px;cursor:pointer;color:#666;padding:0;width:30px;height:30px;display:flex;align-items:center;justify-content:center}.create-chat-panel__close:hover{color:#333}.create-chat-form{padding:20px;display:flex;flex-direction:column;gap:15px}.create-chat-modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000;display:none;align-items:center;justify-content:center}.create-chat-modal_open{display:flex}.create-chat-modal__overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:#0000007f}.create-chat-modal__content{position:relative;background:#fff;border-radius:8px;width:90%;max-width:500px;max-height:90vh;overflow-y:auto;z-index:1001}.create-chat-modal__header{padding:20px;border-bottom:1px solid #e0e0e0;display:flex;justify-content:space-between;align-items:center}.create-chat-modal__header h3{margin:0;font-size:18px;font-weight:600}.create-chat-modal__close{background:none;border:none;font-size:24px;cursor:pointer;color:#666;padding:0;width:30px;height:30px;display:flex;align-items:center;justify-content:center}.create-chat-modal__close:hover{color:#333}.chat-list__header{padding:10px 15px;border-bottom:1px solid #e0e0e0}.chat-list__select-all{display:flex;align-items:center;gap:8px;cursor:pointer;font-size:14px}.chat-item__checkbox{margin-right:10px;cursor:pointer}.profile__avatar-wrapper{display:flex;justify-content:center;margin-bottom:30px}.profile__avatar-label{width:120px;height:120px;border-radius:50%;border:3px dashed #e0e0e0;display:flex;align-items:center;justify-content:center;cursor:pointer;overflow:hidden;position:relative;transition:border-color .2s,background-color .2s;background-color:#f9f9f9}.profile__avatar-label:hover{border-color:#3369f3;background-color:#f0f6ff}.profile__avatar-preview{width:100%;height:100%;object-fit:cover;border-radius:50%}.profile__avatar-placeholder{text-align:center;color:#999;font-size:14px;padding:10px}.profile__avatar-placeholder_hidden{display:none}
