.chat-header{min-height:84px}.chat-current{color:var(--blue)!important;font-weight:700}.chat-shell{max-width:1520px;margin:18px auto 24px;display:grid;grid-template-columns:330px minmax(0,1fr);height:calc(100dvh - 128px);min-height:460px;border:1px solid var(--line);border-radius:20px;overflow:hidden;background:var(--surface);box-shadow:0 10px 40px #00274707}.chat-sidebar{display:flex;flex-direction:column;min-height:0;padding:28px 18px 18px;border-right:1px solid var(--line)}.chat-sidebar-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}.chat-sidebar h1{font-size:27px;letter-spacing:-1px;margin:5px 0 0}.chat-hint,.chat-sidebar-foot{font-size:12px;color:var(--muted);line-height:1.7}.chat-new{margin:14px 0;width:100%;justify-content:center}.chat-search input{width:100%;box-sizing:border-box;border-radius:10px;background:var(--bg);border:1px solid var(--line);padding:12px;color:var(--text)}.chat-rooms{flex:1;overflow:auto;margin-top:16px;min-height:80px}.chat-room{display:flex;align-items:center;gap:12px;width:100%;padding:15px 10px;background:none;border:0;border-radius:12px;text-align:left;color:var(--text);cursor:pointer;min-width:0}.chat-room:hover,.chat-room.selected{background:color-mix(in srgb,var(--blue) 7%,var(--surface))}.chat-avatar{width:42px;height:42px;display:grid;place-items:center;flex-shrink:0;border-radius:14px;font-size:13px;font-weight:700;background:color-mix(in srgb,var(--teal) 12%,var(--surface));color:var(--teal)}.chat-room-copy{min-width:0;flex:1}.chat-room-copy strong{font-size:13px;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-room-copy small{font-size:11px;color:var(--muted);display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:5px}.chat-unread{min-width:20px;height:20px;padding:0 4px;border-radius:20px;display:grid;place-items:center;background:var(--blue);color:white;font-size:10px}.chat-sidebar-foot{margin:12px 4px 0;padding-top:14px;border-top:1px solid var(--line);font-size:10px}.chat-conversation{display:flex;flex-direction:column;min-width:0;min-height:0;position:relative}.chat-empty{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:32px;text-align:center;background:radial-gradient(ellipse at center,color-mix(in srgb,var(--teal) 4%,var(--surface)),var(--surface) 70%)}.chat-empty-icon{font-size:48px;line-height:1;display:grid;place-items:center;border:1px solid var(--line);width:88px;height:88px;border-radius:28px;margin-bottom:26px;color:var(--blue);box-shadow:0 12px 26px #00274708}.chat-empty .eyebrow{font-size:9px;letter-spacing:1.6px}.chat-empty h2{font-size:28px;font-weight:600;letter-spacing:-1px;margin:15px 0}.chat-empty p{color:var(--muted);line-height:1.8;font-size:13px}.chat-empty[hidden],#chat-active[hidden],[hidden]{display:none!important}#chat-active{display:flex;flex:1;flex-direction:column;min-height:0}.chat-peer{padding:20px 26px;display:flex;align-items:center;gap:13px;border-bottom:1px solid var(--line)}.chat-peer>div{min-width:0;overflow-wrap:anywhere}
.chat-peer h2{font-size:15px;margin:0}.chat-peer p{font-size:11px;color:var(--muted);margin:5px 0 0}.chat-private{margin-left:auto;font-size:10px;color:var(--muted)}#chat-back{display:none}.chat-history{flex:1;min-height:0;overflow:auto;padding:25px 28px;scroll-behavior:smooth;background:color-mix(in srgb,var(--bg) 65%,var(--surface))}.chat-message{display:flex;flex-direction:column;align-items:flex-start;margin:0 0 20px}.chat-message.own{align-items:flex-end}.chat-bubble{padding:13px 17px;border-radius:4px 17px 17px 17px;max-width:82%;border:1px solid var(--line);background:var(--surface);min-width:48px;overflow-wrap:anywhere;white-space:pre-wrap;font-size:13px;line-height:1.7}.own .chat-bubble{background:color-mix(in srgb,var(--blue) 9%,var(--surface));border-color:color-mix(in srgb,var(--blue) 14%,var(--line));border-radius:17px 4px 17px 17px}.chat-message-meta{color:var(--muted);font-size:10px;margin:7px 4px;line-height:1.5}.chat-attachment{display:flex;align-items:center;gap:10px;margin-top:8px;color:var(--blue);font-size:12px;font-weight:600;text-decoration:none;overflow-wrap:anywhere;white-space:normal}.chat-attachment small{color:var(--muted);font-weight:400}.chat-compose{padding:15px 25px 9px;border-top:1px solid var(--line)}.chat-compose textarea{width:100%;resize:vertical;max-height:160px;min-height:50px;box-sizing:border-box;background:var(--surface);border:none;color:var(--text);font:inherit;font-size:13px;line-height:1.6;outline-offset:4px}.chat-compose-actions{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-top:8px}.chat-compose-actions>div{display:flex;gap:6px;flex-wrap:wrap}.chat-compose-actions .button{font-size:11px;padding:9px 14px}.chat-compose-note{color:var(--muted);font-size:9px;margin:12px 0 4px}.chat-file-label{padding:9px;margin:8px 0;border-radius:8px;background:var(--bg);font-size:12px;overflow-wrap:anywhere}.chat-emojis{display:flex;flex-wrap:wrap;gap:4px;padding:8px 0}.chat-emojis button{font-size:22px;border:0;border-radius:8px;background:var(--bg);padding:8px;cursor:pointer}.chat-status{font-size:11px;line-height:1.5;padding:8px 24px;color:var(--muted);margin:0;border-top:1px solid var(--line);min-height:30px;box-sizing:border-box}.chat-status.error{color:var(--red,#bd3030)}.chat-older{display:block;margin:0 auto 24px;font-size:11px}.chat-dialog{border:1px solid var(--line);border-radius:18px;padding:28px;background:var(--surface);color:var(--text);max-width:480px;width:calc(100vw - 48px);max-height:80dvh;box-sizing:border-box}.chat-dialog::backdrop{background:#071d2d80;backdrop-filter:blur(4px)}.chat-dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.chat-dialog h2{font-size:23px;margin:8px 0}.chat-dialog p{font-size:12px;color:var(--muted)}.chat-dialog input{width:100%;box-sizing:border-box;padding:12px;border:1px solid var(--line);border-radius:10px;background:var(--bg);color:var(--text);margin:8px 0 16px}.chat-dialog label{font-size:12px}#chat-contacts{max-height:40dvh;overflow:auto}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(min-width:1600px){.chat-shell{margin-top:28px}}@media(max-width:900px){.chat-shell{margin:12px;grid-template-columns:280px minmax(0,1fr);height:calc(100dvh - 120px)}.chat-sidebar{padding:22px 12px}.chat-history{padding:20px 15px}.chat-compose{padding:14px}.chat-peer{padding:18px}.chat-private{display:none}}
@media(max-width:640px){.chat-header{min-height:70px;padding:12px 16px;gap:12px;flex-wrap:nowrap}.chat-header .management-brand{width:125px}.chat-header nav{display:none}.chat-header .button{font-size:10px;padding:8px}.chat-shell{display:flex;height:calc(100dvh - 90px);min-height:350px;margin:0 10px 10px;border-radius:15px}.chat-sidebar{width:100%;box-sizing:border-box;border-right:0}.chat-conversation{display:none;width:100%}.chat-shell.conversation-open .chat-sidebar{display:none}.chat-shell.conversation-open .chat-conversation{display:flex}#chat-back{display:block;padding:7px}.chat-peer{gap:9px;padding:12px}.chat-peer .chat-avatar{width:35px;height:35px;border-radius:10px}.chat-peer h2{font-size:13px}.chat-bubble{max-width:90%}.chat-history{padding:17px 13px}.chat-compose-note{font-size:8px}.chat-status{padding:7px 13px;font-size:10px}.chat-empty h2{font-size:23px}.chat-dialog{padding:20px}.chat-compose-actions .button{padding:8px 10px}}

.chat-date-divider{display:flex;justify-content:center;margin:18px 0 8px;grid-column:1/-1}.chat-date-divider span{padding:6px 14px;border-radius:20px;background:var(--surface-alt,#eaf1f5);color:var(--muted,#506574);font-size:11px;font-weight:600}.chat-message-meta time{white-space:nowrap}
