/* OneKasb Assistant 2.5.44 — Internal Chat */
#internalChatNav{position:relative;display:flex!important;align-items:center;justify-content:space-between;gap:10px}
.chatUnreadBadge{display:inline-flex;align-items:center;justify-content:center;min-width:24px;height:24px;padding:0 7px;border-radius:999px;background:#960018;color:#fff;font-size:12px;font-weight:800;line-height:1}
.chatUnreadBadge[hidden]{display:none!important}
.chatHeaderAvatar{display:inline-flex;vertical-align:middle;margin-inline-end:2px}
.chatAvatar{position:relative;display:inline-flex;align-items:center;justify-content:center;flex:0 0 40px;width:40px;height:40px;border-radius:50%;overflow:hidden;background:#ececee;color:#555;font-size:13px;font-weight:800;border:1px solid rgba(0,0,0,.07)}
.chatAvatar img{width:100%;height:100%;object-fit:cover;display:block}.chatAvatar>span{display:flex;width:100%;height:100%;align-items:center;justify-content:center}
.chatAvatar.headerSize{width:32px;height:32px;flex-basis:32px;font-size:10px}.chatAvatar.mentionSize{width:30px;height:30px;flex-basis:30px;font-size:9px}.chatAvatar.managerSize{width:46px;height:46px;flex-basis:46px;font-size:13px}
.internalChat{max-width:1120px;margin:0 auto;padding:4px 0 24px}.chatTopbar{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin:0 0 14px}.chatTopbar h1{margin:2px 0 5px;font-size:24px}.chatTopbar p{margin:0}.chatLiveStatus{display:flex;align-items:center;gap:7px;color:#72727a;font-size:13px}.chatLiveStatus i{display:block;width:8px;height:8px;border-radius:50%;background:#5d9a68;box-shadow:0 0 0 4px rgba(93,154,104,.1)}
.chatTopActions{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}.chatTopActions button,.chatOlder,.chatMessageFoot button,.chatReplyDraft button,.chatFileDraft button,.chatAvatarUser button{min-height:38px;padding:8px 13px;border-radius:9px;font-size:13px}
.dangerGhost{color:#8d1427!important;border-color:#d8a9b1!important;background:#fff!important}.dangerGhost:hover{background:#fff5f6!important}
.chatMessagePanel{border:1px solid #e0e0e3;border-radius:16px;background:#f6f6f7;overflow:hidden}.chatMessages{height:min(62vh,650px);min-height:460px;overflow-y:auto;padding:18px 18px 22px;scroll-behavior:smooth;background:linear-gradient(180deg,#f7f7f8 0%,#f3f3f4 100%)}
.chatOlder{display:block;margin:12px auto 0;background:#fff}.chatOlder[hidden]{display:none}.chatDateSeparator{position:sticky;top:8px;z-index:3;width:max-content;max-width:85%;margin:12px auto;padding:5px 11px;border:1px solid #dedee1;border-radius:999px;background:rgba(255,255,255,.92);backdrop-filter:blur(5px);color:#777;font-size:12px}
.chatMessage{display:flex;align-items:flex-start;justify-content:flex-start;gap:10px;margin:12px 0;direction:ltr}.chatMessage.mine{flex-direction:row-reverse;justify-content:flex-start}.chatBubble{position:relative;direction:rtl;text-align:right;min-width:190px;max-width:min(72%,680px);padding:10px 12px 8px;border:1px solid #d9d9de;border-radius:14px 14px 14px 5px;background:#f0f0f2;color:#25252a;box-shadow:0 1px 2px rgba(0,0,0,.025)}.chatMessage.mine .chatBubble{border-color:#d7a8b1;background:#faecef;border-radius:14px 14px 5px 14px}.chatMessage.adminMessage:not(.mine) .chatBubble{border-inline-start:3px solid #960018}.chatMessage.mine .chatMessageHead strong{color:#7d1021}.chatMessage.flash .chatBubble{animation:chatFlash 1.2s ease}@keyframes chatFlash{0%,100%{box-shadow:0 1px 2px rgba(0,0,0,.02)}40%{box-shadow:0 0 0 4px rgba(150,0,24,.12)}}
.chatMessageHead{display:flex;align-items:center;gap:7px;margin-bottom:5px}.chatMessageHead strong{font-size:13px}.chatRoleBadge{display:inline-flex;padding:2px 6px;border-radius:999px;background:#f4e4e7;color:#8e1024;font-size:10px;font-weight:800}.chatMessageText{white-space:pre-wrap;word-break:break-word;font-size:15px;line-height:1.8}.chatMention{color:#960018;font-weight:800;background:#f8eaed;border-radius:5px;padding:0 3px}
.chatReplyQuote{display:block;width:100%;text-align:right;border:0!important;border-inline-start:3px solid #aaa!important;border-radius:6px!important;background:#f5f5f6!important;padding:6px 9px!important;margin:0 0 8px!important;color:#555!important}.chatReplyQuote strong,.chatReplyQuote span{display:block}.chatReplyQuote strong{font-size:11px;margin-bottom:2px}.chatReplyQuote span{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chatFileChip{display:flex;align-items:center;gap:9px;margin-top:8px;padding:9px 10px;border:1px solid #e0e0e3;border-radius:10px;background:#f7f7f8;color:inherit;text-decoration:none}.chatFileChip>span:first-child{font-size:20px}.chatFileChip>span:last-child{min-width:0}.chatFileChip strong,.chatFileChip small{display:block}.chatFileChip strong{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chatFileChip small{color:#777;margin-top:2px;font-size:11px}.chatFileChip.deleted{opacity:.75}.chatMessageFoot{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-top:6px;color:#888}.chatMessageFoot time{font-size:10px}.chatMessageFoot button{min-height:28px!important;padding:2px 7px!important;border:0!important;background:transparent!important;color:#777!important;font-size:11px!important}.chatMessageFoot button:hover{color:#960018!important}
.chatTyping{height:26px;padding:5px 12px;color:#777;font-size:12px}.chatTyping.active:before{content:'•••';display:inline-block;letter-spacing:2px;margin-inline-end:6px;color:#960018}.chatReplyDraft,.chatFileDraft{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:5px 0;padding:8px 11px;border:1px solid #ddd;border-radius:10px;background:#fafafa}.chatReplyDraft[hidden],.chatFileDraft[hidden]{display:none}.chatReplyDraft>div,.chatFileDraft>span{min-width:0}.chatReplyDraft strong,.chatReplyDraft span{display:block}.chatReplyDraft strong{font-size:12px;color:#960018}.chatReplyDraft span{font-size:12px;color:#666;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chatReplyDraft button,.chatFileDraft button{min-width:34px;min-height:34px;padding:3px 8px}
.chatComposer{display:grid;grid-template-columns:42px minmax(0,1fr) 84px;align-items:end;gap:9px;padding:12px;border:1px solid #dedee1;border-radius:14px;background:#fff}.chatAttach{width:42px;height:42px;padding:0!important;border-radius:10px!important;font-size:21px!important}.chatInputWrap{position:relative;min-width:0}.chatComposer textarea{width:100%;min-height:44px;max-height:135px;resize:vertical;border:1px solid #d7d7da;border-radius:10px;padding:10px 12px;font:inherit;font-size:15px;line-height:1.55;background:#fff}.chatComposer textarea:focus{outline:2px solid rgba(150,0,24,.12);border-color:#aa5361}.chatSend{height:42px;min-width:84px}.chatNote{margin:8px 2px 0;color:#888;font-size:11px}
.chatMentionMenu{position:absolute;right:0;left:0;bottom:calc(100% + 7px);z-index:20;max-height:260px;overflow:auto;border:1px solid #d8d8dc;border-radius:12px;background:#fff;box-shadow:0 12px 30px rgba(0,0,0,.1);padding:5px}.chatMentionMenu[hidden]{display:none}.chatMentionMenu button{display:flex;width:100%;align-items:center;gap:9px;padding:7px;border:0;background:#fff;text-align:right;border-radius:8px}.chatMentionMenu button:hover{background:#f5f5f6}.chatMentionMenu button>span:last-child{display:block}.chatMentionMenu strong,.chatMentionMenu small{display:block}.chatMentionMenu strong{font-size:13px}.chatMentionMenu small{font-size:10px;color:#888;margin-top:1px}
.chatEmpty{display:flex;min-height:300px;align-items:center;justify-content:center;flex-direction:column;gap:5px;color:#888}.chatEmpty strong{color:#555;font-size:15px}.chatEmpty span{font-size:12px}
.chatAvatarDialog{width:min(720px,calc(100% - 24px));max-height:78vh;border:0;border-radius:16px;padding:18px;box-shadow:0 22px 70px rgba(0,0,0,.2)}.chatAvatarDialog::backdrop{background:rgba(20,20,25,.42)}.chatDialogHead{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.chatDialogHead h2{margin:2px 0}.chatDialogHead button{width:38px;height:38px;padding:0;font-size:20px}.chatAvatarUsers{display:grid;gap:8px;margin-top:15px}.chatAvatarUser{display:grid;grid-template-columns:46px minmax(0,1fr) auto;align-items:center;gap:11px;padding:10px;border:1px solid #e0e0e3;border-radius:11px}.chatAvatarUser>div:nth-child(2){min-width:0}.chatAvatarUser strong,.chatAvatarUser small{display:block}.chatAvatarUser small{color:#888;font-size:11px;margin-top:2px}.chatAvatarUser>div:last-child{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
@media(max-width:760px){.internalChat{padding-top:0}.chatTopbar{align-items:stretch;flex-direction:column;gap:10px}.chatTopActions{justify-content:flex-start}.chatMessages{height:58vh;min-height:430px;padding:13px 10px 18px}.chatMessage{gap:7px}.chatAvatar{width:34px;height:34px;flex-basis:34px;font-size:10px}.chatBubble{max-width:82%;min-width:140px}.chatComposer{grid-template-columns:42px minmax(0,1fr) 72px;padding:9px;gap:7px}.chatSend{min-width:72px}.chatAvatarUser{grid-template-columns:42px minmax(0,1fr)}.chatAvatarUser>div:last-child{grid-column:1/-1;justify-content:flex-start}.chatAvatar.managerSize{width:42px;height:42px;flex-basis:42px}}
@media(max-width:420px){.chatMessageText{font-size:14px}.chatBubble{max-width:86%;padding:9px 10px}.chatComposer{grid-template-columns:40px minmax(0,1fr)}.chatSend{grid-column:2;height:38px;width:100%}.chatAttach{width:40px;height:40px}.chatTopbar h1{font-size:21px}}

/* 2.5.79.0 — Multi-group chat */
.internalChat.multi{max-width:1280px}.chatWorkspace{display:grid;grid-template-columns:290px minmax(0,1fr);gap:14px}.chatGroupsPane{border:1px solid #e0e0e3;border-radius:16px;background:#fff;overflow:hidden;min-height:620px}.chatGroupsTitle{display:flex;align-items:center;justify-content:space-between;padding:13px 14px;border-bottom:1px solid #ececef}.chatGroupsTitle strong{font-size:14px}.chatGroupsTitle span{font-size:11px;color:#888}.chatGroups{display:grid;gap:6px;padding:8px;max-height:72vh;overflow:auto}.chatGroupItem{display:grid!important;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:9px;width:100%;padding:8px!important;border:1px solid transparent!important;border-radius:12px!important;background:#fff!important;text-align:right!important;color:#25252a!important}.chatGroupItem:hover{background:#f7f7f8!important}.chatGroupItem.active{border-color:#d7a8b1!important;background:#fff5f6!important}.chatGroupItem.dissolved{opacity:.72}.chatGroupThumb,.chatGroupImage{display:inline-flex;align-items:center;justify-content:center;overflow:hidden;border-radius:50%;background:#ececee;color:#555;font-weight:800;border:1px solid rgba(0,0,0,.07)}.chatGroupThumb{width:42px;height:42px;font-size:11px}.chatGroupImage{width:52px;height:52px;font-size:15px;flex:0 0 52px}.chatGroupThumb img,.chatGroupImage img{width:100%;height:100%;object-fit:cover}.chatGroupItemText{display:block;min-width:0}.chatGroupItemText strong,.chatGroupItemText small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chatGroupItemText strong{font-size:13px}.chatGroupItemText small{font-size:10px;color:#888;margin-top:3px}.chatGroupUnread{display:inline-flex;align-items:center;justify-content:center;min-width:23px;height:23px;padding:0 6px;border-radius:999px;background:#960018;color:#fff;font-size:10px;font-weight:800}.chatGroupsEmpty{padding:28px 12px;text-align:center;color:#888;font-size:12px}.chatRoom{min-width:0}.chatRoomHead{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;margin-bottom:10px;border:1px solid #e0e0e3;border-radius:14px;background:#fff}.chatGroupIdentity{display:flex;align-items:center;gap:10px;min-width:0}.chatGroupIdentity h2{margin:2px 0 3px;font-size:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chatGroupIdentity small{color:#960018;font-weight:800;font-size:10px}.chatGroupIdentity p{margin:0;color:#888;font-size:10px}.chatDissolved{margin:0 0 10px;padding:10px 12px;border:1px solid #e7c3c9;border-radius:11px;background:#fff5f6;color:#8f1427;font-size:12px}.systemMessage .chatBubble{background:#fff8f9;border-color:#d8b3ba}.chatFileRow{display:flex;align-items:center;gap:7px}.chatFileRow .chatFileChip{flex:1;min-width:0}.chatDeleteFile{border:1px solid #e2bdc3!important;background:#fff!important;color:#8d1427!important;border-radius:8px!important;padding:6px 8px!important;font-size:10px!important;white-space:nowrap}.chatDialog{width:min(760px,calc(100% - 24px));max-height:86vh;overflow:auto;border:0;border-radius:16px;padding:18px;box-shadow:0 22px 70px rgba(0,0,0,.22)}.chatDialog::backdrop{background:rgba(20,20,25,.46)}.chatDialogBody{display:grid;gap:14px;margin-top:14px}.chatDialogActions{display:flex;justify-content:flex-end;gap:8px}.chatDialogActions button,.chatSettingSection button,.chatMemberSetting button,.chatLinkRow button{min-height:38px;padding:8px 12px;border-radius:9px;font:inherit;font-size:12px}.chatSettingSection{display:grid;gap:10px;padding:12px;border:1px solid #e1e1e4;border-radius:12px;background:#fff}.chatSettingSection h3{margin:0;font-size:14px}.chatSettingField{display:grid;gap:6px}.chatSettingField span{font-size:11px;font-weight:800;color:#555}.chatSettingField input,.chatSettingField textarea,.chatCrmAdd input,.chatMemberLink input,.chatLinkRow input{width:100%;border:1px solid #d9d9dd;border-radius:9px;padding:9px 10px;font:inherit;background:#fff}.chatUserChecks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.chatUserCheck{display:flex;align-items:center;gap:7px;padding:8px 9px;border:1px solid #e4e4e7;border-radius:9px}.chatUserCheck input{accent-color:#960018}.chatCrmAdd{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px}.chatCrmResults{display:grid;gap:5px}.chatCrmResult{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;text-align:right!important;background:#fff!important;border:1px solid #e2e2e5!important;border-radius:9px!important;padding:8px 10px!important}.chatCrmResult strong,.chatCrmResult small{display:block}.chatCrmResult small{color:#888}.chatSelectedCrm{display:flex;gap:6px;flex-wrap:wrap}.chatCrmChip{display:inline-flex;align-items:center;gap:5px;padding:5px 8px;border-radius:999px;background:#f3f3f5;font-size:11px}.chatCrmChip button{width:22px;height:22px;min-height:22px!important;padding:0!important;border:0!important;background:transparent!important}.chatMemberSetting{display:grid;grid-template-columns:46px minmax(0,1fr) auto;align-items:center;gap:10px;padding:9px 0;border-bottom:1px solid #eee}.chatMemberSetting:last-child{border-bottom:0}.chatMemberSetting>div:nth-child(2){min-width:0}.chatMemberSetting strong,.chatMemberSetting small{display:block}.chatMemberSetting small{font-size:10px;color:#888;margin-top:2px}.chatMemberSetting>div:nth-child(3){display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}.chatMemberLink{grid-column:2/-1;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px}.chatHelp{margin:0;color:#777;font-size:11px;line-height:1.8}.chatLinkRow{display:grid;grid-template-columns:150px minmax(0,1fr) auto;gap:7px;align-items:center}.dangerZone{border-color:#ecc9cf;background:#fffafa}.chatGroupImageControls{display:flex;gap:7px;flex-wrap:wrap;align-items:center}.chatGroupImageControls input{max-width:280px}.chatSettingsLoading{padding:30px;text-align:center;color:#888}
@media(max-width:900px){.chatWorkspace{grid-template-columns:240px minmax(0,1fr)}.chatGroupsPane{min-height:560px}.chatUserChecks{grid-template-columns:1fr}.chatLinkRow{grid-template-columns:1fr}.chatLinkRow strong{grid-column:1/-1}}
@media(max-width:720px){.chatWorkspace{grid-template-columns:1fr}.chatGroupsPane{min-height:0}.chatGroups{display:flex;overflow-x:auto;max-height:none;padding:7px}.chatGroupItem{min-width:210px}.chatRoomHead{align-items:flex-start}.chatMemberSetting{grid-template-columns:42px minmax(0,1fr)}.chatMemberSetting>div:nth-child(3),.chatMemberLink{grid-column:1/-1;justify-content:flex-start}.chatCrmAdd{grid-template-columns:1fr}.chatGroupImage{width:46px;height:46px;flex-basis:46px}}
