@keyframes chat-fade-scale-in{0%{opacity:0;transform:translateY(-4px)scale(.985)}to{opacity:1;transform:translateY(0)scale(1)}}@keyframes chat-dialog-in{0%{opacity:0;transform:translateY(8px)scale(.98)}to{opacity:1;transform:translateY(0)scale(1)}}@keyframes chat-lightbox-in{0%{opacity:0;transform:scale(.97)}to{opacity:1;transform:scale(1)}}@keyframes chat-message-enter{0%{opacity:0;transform:translateY(8px)scale(.99)}to{opacity:1;transform:translate(0,0)scale(1)}}@keyframes chat-room-enter{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translate(0,0)}}@keyframes chat-badge-pop{0%{opacity:0;transform:scale(.75)}65%{opacity:1;transform:scale(1.08)}to{opacity:1;transform:scale(1)}}.app-viewport{background:var(--background);color:var(--foreground)}.app-session{max-width:1440px}.app-session-content{min-height:0}.app-header{border:1px solid var(--border);min-height:68px;box-shadow:var(--component-shadow);border-radius:16px 16px 0 0;transition:background-color .22s,border-color .22s,box-shadow .22s;background:var(--surface)!important;color:var(--foreground)!important}.app-header-main,.app-header-left,.app-header-actions{min-width:0}.app-header-workspace-divider,.app-header-actions-divider{background:var(--border);width:1px;height:1.5rem}.app-header-workspace-label{white-space:nowrap;color:var(--muted)!important}.app-nav-link{transition:background-color .16s ease, color .16s ease, transform .16s var(--motion-ease);border-radius:.75rem;align-items:center;gap:.55rem;padding:.55rem .85rem;font-size:.875rem;font-weight:600;display:inline-flex;color:var(--muted)!important}.app-nav-link svg{transition:transform .16s var(--motion-ease)}.app-nav-link:hover svg,.app-nav-link:focus-visible svg{transform:translateY(-1px)}.app-nav-link:hover,.app-nav-link:focus-visible,.app-nav-link[aria-current=page]{background:var(--surface-muted)!important;color:var(--foreground)!important}.app-management-link{white-space:nowrap}.app-header-icon-button{min-width:2.5rem;min-height:2.5rem;color:var(--muted);transition:background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s var(--motion-ease);border:1px solid #0000;justify-content:center;align-items:center;display:inline-flex}.app-header-icon-button:hover,.app-header-icon-button:focus-visible{border-color:var(--border);background:var(--surface-muted);color:var(--foreground)}.app-header-icon-button:hover svg,.app-header-icon-button:focus-visible svg{transform:scale(1.08)}.app-header-icon-button:active,.app-user-trigger:active{transform:scale(.95)}.app-header-actions-divider{margin-inline:.25rem}.app-user-trigger{transition:background-color .16s ease, transform .16s var(--motion-ease);border:1px solid #0000;color:var(--foreground)!important;background:0 0!important}.app-user-trigger:hover,.app-user-trigger:focus-visible{background:var(--surface-muted)!important}.app-user-chevron{color:var(--muted)}.app-user-menu{border:1px solid var(--border);box-shadow:var(--component-shadow);background:var(--surface)!important;color:var(--foreground)!important}.app-user-menu a:hover,.app-user-menu button:hover{background:var(--surface-muted)}.app-user-menu-kicker,.app-user-menu-username{color:var(--muted)!important}.app-user-menu-name{color:var(--foreground)!important}.chat-notification-badge{animation:chat-badge-pop .32s var(--motion-ease) both}.auth-screen{background:var(--background);color:var(--foreground)}.auth-card{border:1px solid var(--border);background:var(--surface)!important;color:var(--foreground)!important;box-shadow:var(--component-shadow)!important}.chat-workspace{border:1px solid var(--border);color:var(--foreground);border-top:0;background:var(--surface)!important;box-shadow:var(--component-shadow)!important;border-radius:0 0 16px 16px!important}.chat-workspace-grid{border-top:0}.chat-room-meta,.chat-room-preview,.chat-room-section-title,.chat-room-time{color:var(--muted)}.chat-sidebar-header{padding:.35rem .3rem .4rem}.chat-sidebar-toolbar{min-width:0}.chat-sidebar-close,.chat-search-clear{color:var(--muted);transition:background-color .16s,color .16s}.chat-sidebar-close:hover,.chat-search-clear:hover{background:var(--surface-muted);color:var(--foreground)}.chat-search{border:1px solid var(--border);background:var(--surface-muted);min-height:2.75rem;color:var(--muted)}.chat-search:focus-within{border-color:var(--foreground);box-shadow:0 0 0 3px var(--surface-muted)}.chat-search input{appearance:none;color:var(--foreground)}.chat-search input[type=search]::-webkit-search-cancel-button{appearance:none}.chat-search input[type=search]::-webkit-search-decoration{appearance:none}.chat-search input::placeholder{color:var(--muted)}.chat-filter-tabs{border-bottom:1px solid var(--border);scrollbar-width:none;gap:0;overflow-x:auto}.chat-filter-tabs::-webkit-scrollbar{display:none}.chat-filter-tabs button{color:var(--muted);white-space:nowrap;background:0 0;border-radius:0;flex:1 0 0;padding:.55rem .65rem .65rem;font-size:.72rem;font-weight:700;transition:background-color .16s,color .16s;position:relative}.chat-filter-tabs button:after{background:var(--foreground);content:"";height:2px;transition:transform .16s;position:absolute;bottom:-1px;left:0;right:0;transform:scaleX(0)}.chat-filter-tabs button:hover{background:var(--surface-muted);color:var(--foreground)}.chat-filter-tabs button.is-active{color:var(--foreground)}.chat-filter-tabs button.is-active:after{transform:scaleX(1)}.chat-room-list{scrollbar-color:var(--border) transparent;padding:0 .25rem .5rem}.chat-room-section{padding-top:.95rem}.chat-room-section+.chat-room-section{border-top:1px solid var(--border);margin-top:.55rem;padding-top:1rem}.chat-room-section-title{letter-spacing:.02em;align-items:center;gap:.4rem;padding:.25rem .4rem .6rem;font-size:.72rem;font-weight:800;display:flex}.chat-room-section-title svg{width:.8rem;height:.8rem}.chat-room-items{gap:.45rem;display:grid}.chat-room-item{min-width:0;transition:background-color .16s ease, border-color .16s ease, transform .18s var(--motion-ease);animation:chat-room-enter .24s var(--motion-ease) both;background:0 0;border:1px solid #0000;border-radius:.9rem;align-items:stretch;display:flex}.chat-room-items>.chat-room-item:nth-child(2){animation-delay:25ms}.chat-room-items>.chat-room-item:nth-child(3){animation-delay:45ms}.chat-room-items>.chat-room-item:nth-child(4){animation-delay:65ms}.chat-room-items>.chat-room-item:nth-child(5){animation-delay:85ms}.chat-room-items>.chat-room-item:nth-child(6){animation-delay:.105s}.chat-room-item[data-selected=true]{background:var(--surface-muted);border-color:var(--border)}.chat-room-item:not([data-selected=true]):hover{transform:translate(2px)}.chat-room-item:active{transform:translate(1px)scale(.995)}.chat-room-main:focus-visible{outline:2px solid var(--foreground);outline-offset:-2px}.chat-room-item[data-unread=true] .chat-room-name{font-weight:800}.chat-room-main{padding:.65rem .55rem .65rem .65rem}.chat-room-item[data-section=pinned] .chat-room-main{padding:.75rem .65rem}.chat-room-copy{overflow:hidden}.chat-room-head{line-height:1.2}.chat-room-name{color:var(--foreground);font-size:.84rem}.chat-room-preview{line-height:1.25}.chat-room-time{font-variant-numeric:tabular-nums;font-size:.68rem;line-height:1.2}.chat-room-unread{background:var(--foreground);min-width:1.25rem;height:1.25rem;color:var(--surface);animation:chat-badge-pop .32s var(--motion-ease) both;border-radius:999px;flex:none;justify-content:center;align-items:center;font-size:.65rem;font-weight:800;line-height:1;display:inline-flex}.chat-room-avatar{flex:none;justify-content:center;align-items:center;display:flex}.chat-room-icon,.conversation-group-icon{background:var(--surface-muted);color:var(--foreground)}.chat-room-pin{opacity:0;pointer-events:none;color:var(--muted);align-self:center;transition:background-color .16s,color .16s,opacity .16s,transform .16s;transform:scale(.9)}.chat-room-item:hover .chat-room-pin,.chat-room-item:focus-within .chat-room-pin{opacity:1;pointer-events:auto;transform:scale(1)}.chat-room-pin:hover,.chat-room-item[data-selected=true] .chat-room-pin{color:var(--foreground)}.chat-room-pin:hover{background:var(--surface)}.chat-room-pin:active{transform:scale(.88)}.chat-sidebar-empty{border:1px dashed var(--border);color:var(--muted)}.chat-sidebar-footer{border-color:var(--border)!important}.chat-create-group{border:1px solid var(--border);background:var(--surface-muted);color:var(--foreground);transition:background-color .16s,border-color .16s,transform .16s}.chat-create-group:hover{background:var(--surface);transform:translateY(-1px)}.chat-create-group:active{transform:translateY(0)scale(.98)}.conversation-view{background:var(--surface);min-width:0}.conversation-empty{background:var(--surface-muted);color:var(--foreground)}.conversation-empty-content p,.conversation-header-meta,.conversation-member-count,.conversation-subtitle{color:var(--muted)}.conversation-empty-icon{background:var(--surface);color:var(--foreground)}.conversation-header{border-bottom:1px solid var(--border);background:var(--surface);justify-content:space-between;align-items:center;gap:1rem;transition:background-color .22s,border-color .22s;display:flex}.conversation-header-main{min-width:0;overflow:hidden}.conversation-type-badge{background:var(--surface-muted);color:var(--muted);border-radius:999px;padding:.22rem .48rem;font-size:.65rem;font-weight:800}.chat-message-list{scrollbar-color:var(--border) transparent}.chat-message-row{gap:10px;margin-bottom:5px}.chat-message-row:last-child{animation:chat-message-enter .28s var(--motion-ease) both}.chat-message-content{max-width:min(76%,560px)}.chat-message-sender,.chat-message-time{color:var(--muted)}.chat-message-row[data-own=true] .chat-message-stack{flex-direction:row-reverse}.chat-message-row[data-own=false] .chat-message-content{min-width:0}.chat-message-row[data-own=false] .chat-message-stack{align-items:flex-end}.chat-message-avatar{padding-bottom:.15rem}.chat-message-avatar>button{transition:transform .18s var(--motion-ease)}.chat-message-avatar>button:hover,.chat-message-avatar>button:focus-visible{transform:translateY(-2px)scale(1.04)}.chat-message-bubble{transform-origin:0 100%;transition:transform .18s var(--motion-ease), box-shadow .18s ease}.chat-message-row[data-own=true] .chat-message-bubble{transform-origin:100% 100%}.chat-message-row:hover .chat-message-bubble{transform:translateY(-1px)}.chat-reply-action{color:var(--foreground);transition:background-color .16s ease, color .16s ease, opacity .16s ease, transform .16s var(--motion-ease)}.chat-message-row:hover .chat-reply-action,.chat-message-row:focus-within .chat-reply-action{transform:translate(2px)}.chat-composer{border-top:1px solid var(--border);background:var(--surface);transition:background-color .22s,border-color .22s;position:relative}.chat-composer[data-drag-active=true]{outline:2px dashed var(--foreground);outline-offset:-.45rem}.chat-composer[data-has-attachment=true]{padding-top:.75rem}.chat-composer-form{min-width:0}.chat-composer-input-wrap{min-height:3.5rem;transition:box-shadow .18s ease, transform .18s var(--motion-ease);align-items:center;display:flex}.chat-composer-input-wrap:focus-within{transform:translateY(-1px)}.chat-composer-input-wrap textarea{display:block}.chat-composer-error{margin-bottom:.55rem}.chat-composer-hint{color:var(--muted)}.chat-composer-hint kbd{border:1px solid var(--border);color:var(--foreground);border-bottom-width:2px;border-radius:.3rem;padding:.05rem .3rem;font-size:.65rem}.chat-image-picker{border:1px solid var(--border);background:var(--surface);color:var(--foreground);transition:background-color .16s ease, border-color .16s ease, transform .16s var(--motion-ease)}.chat-image-picker:hover{background:var(--surface-muted);transform:translateY(-1px)scale(1.03)}.chat-image-picker:active{transform:scale(.96)}.chat-send-button{background:var(--color-blue-600);transition:background-color .16s ease, color .16s ease, opacity .16s ease, transform .16s var(--motion-ease);color:var(--color-white)!important}.chat-send-button:not(:disabled):hover{background:var(--color-blue-700);opacity:1;transform:translateY(-1px)scale(1.02)}.chat-send-button:disabled{background:var(--color-blue-600);opacity:.52;color:var(--color-white)!important}.chat-send-button:not(:disabled):active{transform:translateY(0)scale(.97)}.chat-image-preview>div{animation:chat-dialog-in .22s var(--motion-ease) both;border-color:var(--border)!important;background:var(--surface)!important}.chat-reply-preview{border-color:var(--border);background:var(--surface-muted);animation:chat-dialog-in .2s var(--motion-ease) both}.chat-message-image-trigger img{transition:opacity .18s ease, transform .24s var(--motion-ease)}.chat-message-image-trigger:hover img{transform:scale(1.015)}.chat-profile-overlay,.chat-image-lightbox{animation:.18s ease-out both chat-fade-scale-in}.chat-profile-dialog{animation:chat-dialog-in .24s var(--motion-ease) both}.chat-image-lightbox-content{animation:chat-lightbox-in .26s var(--motion-ease) both}.settings-page-header,.settings-content .settings-anchor>section,.admin-hero,.admin-table-card,.app-empty{border:1px solid var(--border);color:var(--foreground);box-shadow:var(--component-shadow);background:var(--surface)!important}.settings-heading-copy h1{color:var(--foreground);letter-spacing:-.03em}.settings-heading-copy p,.settings-nav-note{color:var(--muted)}.settings-page-header{justify-content:space-between;align-items:flex-start;gap:1rem;display:flex}.settings-status-badge{background:var(--surface-muted);color:var(--foreground);border-radius:999px;flex:none;padding:.4rem .7rem;font-size:.7rem;font-weight:800}.settings-layout{grid-template-columns:minmax(10rem,13rem) minmax(0,1fr);align-items:start;gap:1.5rem;display:grid}.settings-nav-panel{position:sticky;top:1rem}.settings-nav{gap:.35rem;display:grid}.settings-nav a,.settings-nav button{color:var(--muted);text-align:left;background:0 0;border:0;border-radius:.75rem;align-items:center;gap:.65rem;padding:.7rem .8rem;font-size:.84rem;font-weight:700;transition:background-color .16s,color .16s;display:flex}.settings-nav a svg,.settings-nav button svg{flex:none;width:1rem;height:1rem}.settings-nav a:hover,.settings-nav a.is-active,.settings-nav button:hover,.settings-nav button.is-active{background:var(--surface-muted);color:var(--foreground)}.settings-nav a:focus-visible,.settings-nav button:focus-visible{outline:2px solid var(--foreground);outline-offset:2px}.settings-nav-note{border-top:1px solid var(--border);margin:1rem 0 0;padding:1rem .8rem 0;font-size:.72rem;line-height:1.65}.settings-anchor{scroll-margin-top:1.5rem}.admin-hero-main{align-items:center}.admin-add-user{white-space:nowrap}.admin-user-table{border-top:1px solid var(--border)}.admin-user-row{border-color:var(--border)!important}.admin-user-actions,.admin-user-security{min-width:8rem}@media (max-width:900px){.settings-layout{grid-template-columns:1fr}.settings-nav-panel{position:static}.settings-nav{scrollbar-width:none;gap:.35rem;padding-bottom:.15rem;display:flex;overflow-x:auto}.settings-nav::-webkit-scrollbar{display:none}.settings-nav a,.settings-nav button{flex:none}.settings-nav-note{display:none}}@media (max-width:760px){.conversation-header-meta{display:none}.admin-user-table{overflow:visible}.admin-user-table table,.admin-user-table tbody{min-width:0;display:block}.admin-user-table thead{display:none}.admin-user-table tbody{padding:.65rem}.admin-user-row{border-radius:.9rem;grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem 1rem;padding:1rem;display:grid;border:1px solid var(--border)!important}.admin-user-row+.admin-user-row{margin-top:.65rem}.admin-user-cell{justify-content:space-between;align-items:center;gap:.75rem;min-width:0;display:flex;padding:0!important}.admin-user-cell:before{color:var(--muted);content:attr(data-label);flex:none;font-size:.68rem;font-weight:800}.admin-user-cell:first-child{border-bottom:1px solid var(--border);grid-column:1/-1;padding-bottom:.75rem!important}.admin-user-cell:first-child:before{display:none}.admin-user-cell:first-child>div{width:100%}.admin-user-cell:nth-child(2),.admin-user-cell:nth-child(4),.admin-user-cell:nth-child(5),.admin-user-cell:nth-child(6){align-items:flex-start}.admin-user-actions,.admin-user-security{align-items:flex-end;min-width:0}.admin-user-actions button,.admin-user-security button{text-align:center;width:100%}}@media (min-width:640px){.chat-message-row:hover .chat-reply-action,.chat-message-row:focus-within .chat-reply-action{opacity:1;pointer-events:auto}}@media (max-width:520px){.settings-page-header{display:block}.settings-status-badge{margin-top:1rem;display:inline-flex}.chat-room-main{padding-left:.5rem}.chat-room-preview{padding-right:.15rem}.chat-composer-hint{display:none}}@media (max-width:640px){.app-header{border-radius:0}.app-header-workspace-divider,.app-header-workspace-label{display:none}.app-management-link{padding-inline:.65rem}.app-management-link .app-nav-link-label{display:none}.app-header-actions-divider{margin-inline:0}.chat-workspace{border-left:0;border-right:0;border-radius:0!important}.chat-message-content{max-width:84%}.chat-composer-row{grid-template-columns:minmax(0,1fr) 2.8rem 3.2rem}.chat-image-picker{width:2.8rem;height:3rem}.chat-send-button{height:3rem;padding-inline:.55rem}}@media (hover:none){.chat-room-pin{opacity:1;pointer-events:auto;transform:scale(1)}}@media (prefers-reduced-motion:reduce){*,:before,:after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important}.chat-sidebar,.chat-notification-menu,.chat-drawer-backdrop{transition-delay:0s!important}.chat-sidebar{transition-duration:.42s!important}.chat-drawer-backdrop{transition-duration:.3s!important}.chat-notification-menu{transition-duration:.16s!important;translate:0!important;scale:1!important}}
