/* The chat owns the space below the app navigation. Only its panes scroll. */
body.message-compact{height:var(--chat-viewport-height,100dvh);min-height:0;display:flex;flex-direction:column;overflow:hidden}
body.message-compact>header,body.message-compact>#nav{flex:none}
body.message-compact>footer{display:none}
body.message-compact main#app{flex:1;min-height:0;width:100%;max-width:none;margin:0;padding:4px 6px 6px;overflow:hidden}
.chat-shell{height:100%;min-height:0;display:grid;grid-template-columns:minmax(300px,350px) minmax(0,1fr);border:1px solid #b9cbd8;border-radius:9px;background:#fff;overflow:hidden}
.chat-sidebar{position:relative;display:flex;flex-direction:column;min-height:0;min-width:0;border-right:1px solid #cfdee7;background:#fff}
.chat-tools{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:13px 14px 8px;flex:none}.chat-tools h1{font-size:20px;letter-spacing:0}.chat-tools button{padding:7px 10px;white-space:nowrap}
.chat-search{padding:4px 12px 8px;flex:none}.chat-search input{width:100%;background:#edf1f3;border:1px solid transparent;border-radius:22px;font-size:13px;padding:10px 13px}
.chat-filters{display:flex;flex-wrap:wrap;gap:5px;padding:0 12px 10px;flex:none;border-bottom:1px solid #e3eaef}.chat-filters button{border-radius:20px;padding:5px 9px;font-size:12px;background:#f7f9fa;color:#4e6574;min-height:32px}.chat-filters button.active{background:#d9eeed;border-color:#a9d6d5;color:#126575;font-weight:700}.chat-filters span{font-size:10px}
.chat-contact-scroll{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}.chat-contact-row{display:flex;align-items:center;margin:3px 5px;border-radius:8px;min-width:0}.chat-contact-row:hover{background:#f2f6f8}.chat-contact-row.active{background:#e0f0f2}
.chat-contact{display:flex;align-items:center;gap:10px;flex:1;min-width:0;text-align:left;padding:11px 4px 11px 9px;border:0;background:transparent;border-radius:8px}.chat-contact:hover{background:transparent}.chat-contact-text{flex:1;min-width:0}.chat-contact-title{display:flex;align-items:baseline;gap:5px}.chat-contact-title b{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}.chat-contact-title time{font-size:10px;color:#6d8291;white-space:nowrap}.chat-preview{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px;color:#617581;margin-top:3px}.chat-contact-flags{display:block;font-size:10px;line-height:1.4;color:#597382}.chat-contact-flags:empty{display:none}
.chat-avatar{display:grid;place-items:center;width:39px;height:39px;flex:none;border-radius:50%;background:#d9e9ef;color:#315d77;font-weight:700;font-size:13px}.chat-unread{border-radius:20px;min-width:19px;padding:0 5px;font-size:11px;background:#167c86;color:white;text-align:center}.chat-menu-button{flex:none;border:0;background:transparent;padding:7px 6px;font-size:18px;width:28px;min-height:36px}.chat-empty-list{padding:28px 20px;text-align:center;color:#6b7f8d;font-size:13px}

/* Globaler Hinweis auf neue Nachrichten. Der Status wird aus derselben
   Ungelesen-Zahl gespeist wie die Markierungen in der Gesprächsliste. */
#nav a[href="#nachrichten"],#nav a[href="#kalender"]{position:relative}
html.vgt-has-unread-messages #nav a[href="#nachrichten"]::before{content:"";position:absolute;top:8px;right:8px;width:9px;height:9px;border-radius:50%;background:#58d9ff;border:1px solid #d9f8ff;box-shadow:0 0 0 3px #58d9ff33,0 0 10px 2px #58d9ff;animation:vgt-message-glow 1.8s ease-in-out infinite;pointer-events:none}
html.vgt-has-unread-group-announcements #nav a[href="#gruppen"]::before{content:"";position:absolute;top:8px;right:8px;width:9px;height:9px;border-radius:50%;background:#58d9ff;border:1px solid #d9f8ff;box-shadow:0 0 0 3px #58d9ff33,0 0 10px 2px #58d9ff;animation:vgt-message-glow 1.8s ease-in-out infinite;pointer-events:none}
html.vgt-has-pending-calendar-requests #nav a[href="#kalender"]::before{content:"";position:absolute;top:8px;right:8px;width:9px;height:9px;border-radius:50%;background:#58d9ff;border:1px solid #d9f8ff;box-shadow:0 0 0 3px #58d9ff33,0 0 10px 2px #58d9ff;animation:vgt-message-glow 1.8s ease-in-out infinite;pointer-events:none}
@keyframes vgt-message-glow{0%,100%{box-shadow:0 0 0 2px #58d9ff2e,0 0 7px 1px #58d9ff}50%{box-shadow:0 0 0 4px #58d9ff38,0 0 13px 3px #58d9ff}}
@media(prefers-reduced-motion:reduce){html.vgt-has-unread-messages #nav a[href="#nachrichten"]::before,html.vgt-has-unread-group-announcements #nav a[href="#gruppen"]::before,html.vgt-has-pending-calendar-requests #nav a[href="#kalender"]::before{animation:none}}
.chat-action-menu{position:absolute;z-index:8;right:9px;top:120px;max-width:calc(100% - 18px);width:245px;padding:5px;background:white;border:1px solid #bfced8;border-radius:9px;box-shadow:0 8px 24px #173a5130}.chat-action-menu>button{display:block;width:100%;text-align:left;border:0;padding:9px 12px}.chat-rename{padding:13px}.chat-rename label{margin-top:0}.chat-rename small{display:block;font-size:11px;margin:7px 0}.chat-rename form>div{display:flex;gap:6px;justify-content:flex-end}
.chat-thread{position:relative;display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden;background:#edf3f5}.chat-thread>header.chat-thread-head{display:flex;flex:none;align-items:center;justify-content:flex-start;gap:10px;padding:10px 16px;border:0;border-bottom:1px solid #cedde5;background:#f8fafb;min-height:65px}.chat-heading{flex:1;min-width:0}.chat-heading h2{margin:0;font-size:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-heading small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:11px}.chat-mobile-back{display:none}
.chat-participants{flex:none;padding:5px 17px;background:#f8fafb;font-size:12px;border-bottom:1px solid #e1e9ed}.chat-participants p{max-height:100px;overflow:auto;margin:7px 0;overflow-wrap:anywhere}.chat-thread-hint{flex:none;background:#e2eef1;font-size:12px;padding:5px 12px}.chat-thread-hint:empty{display:none}.chat-thread-hint button{padding:3px 8px;margin-left:6px;font-size:12px}
.chat-bubbles{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:20px 24px;display:flex;flex-direction:column;gap:12px;scrollbar-width:thin;background:radial-gradient(circle at 1px 1px,#d4e1e780 1px,transparent 0) 0 0/22px 22px,#edf3f5}.chat-bubble{position:relative;flex:none;align-self:flex-start;max-width:min(80%,680px);min-width:160px;padding:10px 34px 10px 13px;background:#fff;border:1px solid #d6e1e7;border-radius:4px 12px 12px;box-shadow:0 1px 2px #18374d0b;overflow-wrap:anywhere}.chat-bubble.mine{align-self:flex-end;background:#ddf0ec;border-color:#c3e0da;border-radius:12px 4px 12px 12px}.chat-bubble>small{display:block;font-size:10px;margin-bottom:4px}.chat-bubble>strong{display:block;font-size:13px}.chat-bubble>p{margin:3px 0 0;font-size:14px;line-height:1.5}.chat-bubble .chat-star{position:absolute;top:4px;right:4px;padding:1px 4px;border:0;background:transparent;font-size:21px;color:#9b6c16;min-width:26px;min-height:30px}
.chat-older{align-self:center;flex:none;font-size:12px}.chat-notice{margin:16px;text-align:center;font-size:13px;color:#627888}.chat-welcome{align-items:center;justify-content:center;padding:25px;text-align:center}.chat-welcome-icon{display:block;font-size:40px;color:#5b8998;margin-bottom:14px}.chat-welcome h2{font-size:23px}.chat-welcome p{font-size:14px;margin-bottom:12px}
.chat-compose{display:flex;flex:none;align-items:flex-end;gap:9px;padding:10px 14px;background:#f9fbfc;border-top:1px solid #d0dfe7}.chat-inputs{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.chat-compose .chat-inputs>input,.chat-compose .chat-inputs>textarea{width:100%;margin:0;border:1px solid transparent;background:#e9eef0;border-radius:20px;padding:10px 15px;font-size:14px;line-height:20px;height:42px;min-height:42px;max-height:222px;resize:none}.chat-compose-tools{display:flex;align-items:center;gap:5px}.chat-compose button,.chat-attach-button{flex:none;min-height:42px}.chat-compose-tools>button:not(.primary),.chat-attach-button{display:flex;align-items:center;gap:5px;padding:8px 10px;border:1px solid #d1dde4;border-radius:8px;background:#fff;color:#315a75;cursor:pointer}.chat-attach-button input{display:none}.chat-compose input:focus,.chat-compose textarea:focus,.chat-search input:focus{border-color:#60a8b2;outline:2px solid #80bec766}
.chat-draft-files{display:flex;gap:5px;overflow-x:auto;padding:4px 5px 1px}.chat-draft-files>span{display:flex;align-items:center;gap:5px;flex:none;padding:4px 6px;border-radius:6px;background:#dce9ee;color:#31566e;font-size:11px}.chat-draft-files>span.linked{background:#e7e2f2;color:#514371}.chat-draft-files small{margin:0}.chat-draft-files button{min-width:22px;min-height:22px;padding:0;border:0;background:transparent}.chat-attachment-tools{display:grid;gap:4px}.chat-attachment-tools>button,.chat-attachment-tools>label{justify-content:flex-start}.chat-attachments{display:grid;gap:6px;margin-top:9px}.chat-attachments>div{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:stretch;min-width:0}.chat-attachments button{position:static;display:flex;align-items:center;gap:9px;min-width:0;min-height:44px;padding:7px 10px;border:1px solid #b9ced8;border-radius:7px 0 0 7px;background:#f5fafb;color:#245873;text-align:left;font-size:14px}.chat-attachments button>i{flex:none;font-style:normal}.chat-attachments button>span{display:flex;flex-direction:column;align-items:flex-start;min-width:0;overflow:hidden}.chat-attachments button b{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600}.chat-attachments button small{display:block;margin:1px 0 0;font-size:10px;color:#617987;white-space:nowrap}.chat-attachments>div>a{display:flex;align-items:center;justify-content:center;padding:7px 11px;border:1px solid #b9ced8;border-left:0;border-radius:0 7px 7px 0;background:#fff;color:#245873;text-decoration:none;white-space:nowrap}.chat-attachments button:hover,.chat-attachments>div>a:hover{background:#eaf4f6}
.chat-expanded-shade{position:absolute;inset:0;z-index:35;display:grid;place-items:center;padding:24px;background:#173c5266}.chat-expanded-composer{display:flex;width:min(820px,94%);height:min(620px,88%);flex-direction:column;overflow:hidden;border:1px solid #9eb5c3;border-radius:12px;background:#fff;box-shadow:0 22px 70px #17394e55}.chat-expanded-composer header,.chat-expanded-composer footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 15px;background:#edf4f7}.chat-expanded-composer header small{display:block}.chat-expanded-composer header button{font-size:20px}.chat-expanded-composer textarea{flex:1;width:auto;min-height:0;margin:12px;padding:16px;border:1px solid #b9cbd6;border-radius:8px;resize:none;line-height:1.55}.chat-expanded-composer footer span{font-size:11px;color:#607888}
.chat-picker-host:empty{display:none}.chat-picker-shade{position:absolute;inset:0;z-index:12;background:#2e4a5c30;display:flex;align-items:flex-start;justify-content:center;padding:16px}.chat-picker{display:flex;flex-direction:column;gap:9px;max-height:100%;width:min(510px,100%);padding:16px;background:#fff;border:1px solid #b7cbd7;border-radius:12px;box-shadow:0 9px 30px #203d5530;min-height:0}.chat-picker-title{display:flex;align-items:center;justify-content:space-between;gap:8px;flex:none}.chat-picker h2{font-size:17px;margin:0}.chat-picker-title button{padding:3px 10px;font-size:22px}.chat-picker>input{flex:none;width:100%;margin:0;border-radius:20px;background:#eef3f5}
.chat-recipient-chips{display:flex;flex-wrap:wrap;gap:4px;max-height:80px;overflow:auto;flex:none}.chat-recipient-chips:empty{display:none}.chat-recipient-chips button{font-size:11px;padding:3px 8px;border-radius:14px;background:#e0f0f1}.chat-recipient-results{overflow:auto;min-height:0;flex:1;overscroll-behavior:contain}.chat-recipient-results h3,.chat-recipient-results summary{font-size:12px;font-weight:700;margin:7px 0;padding:5px;background:#eef4f6}.chat-recipient-results details{margin-top:5px}.chat-recipient{display:flex;align-items:center;justify-content:space-between;text-align:left;gap:10px;width:100%;border:0;border-radius:5px;padding:7px 9px;font-size:13px}.chat-recipient.selected{background:#e1f2ef}.chat-recipient-results small{display:block;padding:5px 8px;font-size:11px}.chat-picker-actions{display:flex;align-items:center;justify-content:space-between;gap:8px;flex:none;border-top:1px solid #dce7ec;padding-top:10px}.chat-picker-actions small{font-size:11px}
@media(max-width:1000px){.chat-shell{grid-template-columns:310px minmax(0,1fr)}.chat-bubbles{padding:14px}.chat-bubble{max-width:92%}}
@media(max-width:700px){body.message-compact main#app{padding:0}.chat-shell{display:flex;border-radius:0;border:0}.chat-sidebar{flex:1;width:100%;border:0}.chat-thread{display:none;flex:1;width:100%}.chat-mobile-open .chat-sidebar{display:none}.chat-mobile-open .chat-thread{display:flex}.chat-mobile-back{display:block;border:0;background:transparent;padding:5px;font-size:22px}.chat-thread>header.chat-thread-head{padding:8px;min-height:58px;gap:7px}.chat-thread-head .chat-avatar{width:30px;height:30px;font-size:11px}.chat-thread-head>button:last-child{font-size:12px;padding:6px}.chat-heading h2{font-size:15px}.chat-filters button{padding:6px 10px}.chat-compose{padding:8px;gap:5px}.chat-compose-tools{gap:3px}.chat-compose-tools>button,.chat-attach-button{padding:8px!important;font-size:12px}.chat-compose-tools span{display:none}.chat-bubbles{padding:12px 10px}.chat-picker-shade,.chat-expanded-shade{padding:8px}.chat-picker{padding:11px}.chat-expanded-composer{width:100%;height:100%}.chat-tools{padding:11px 12px}.chat-welcome-icon{font-size:30px}.chat-contact{min-height:72px}}

.chat-library-shade{position:absolute;inset:0;z-index:40;display:grid;place-items:center;padding:18px;background:#173c5266}.chat-library-picker{display:flex;flex-direction:column;width:min(980px,97%);height:min(720px,96%);min-height:0;overflow:hidden;border:1px solid #9db5c3;border-radius:12px;background:#fff;box-shadow:0 22px 70px #17394e55}.chat-library-picker>header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 17px;border-bottom:1px solid #ccdbe4;background:#f8fafb}.chat-library-picker h2{margin:0;font-size:19px}.chat-library-picker header small{display:block;margin-top:3px}.chat-library-picker header button{font-size:22px;padding:4px 10px}.chat-library-toolbar{display:grid;grid-template-columns:auto minmax(180px,1fr) minmax(180px,270px);align-items:center;gap:10px;padding:9px 13px;border-bottom:1px solid #d7e3e9;background:#edf4f7}.chat-library-toolbar>div{display:flex;gap:5px}.chat-library-toolbar button{padding:6px 10px}.chat-library-toolbar nav{display:flex;align-items:center;gap:3px;min-width:0;overflow-x:auto;white-space:nowrap;padding:3px 6px;border:1px solid #b8cad5;border-radius:6px;background:#fff;scrollbar-width:thin}.chat-library-toolbar nav button{flex:none;min-height:29px;border:0;background:transparent;padding:4px 7px;color:#245c79}.chat-library-toolbar nav button:hover{background:#eaf4f8}.chat-library-toolbar nav button.current{background:#dcecf4;color:#163f58;font-weight:700}.chat-library-toolbar nav i{flex:none;font-style:normal;color:#8095a3}.chat-library-toolbar input{width:100%;margin:0;padding:8px 11px;background:#fff}.chat-library-browser{flex:1;min-height:0;overflow:auto;padding:0 12px 12px;background:#f5f8fa;scroll-padding-top:37px}.chat-library-browser table{width:100%;border-collapse:separate;border-spacing:0;background:#fff;border:1px solid #bfd0da;border-radius:0 0 8px 8px;overflow:visible}.chat-library-browser thead{position:relative;z-index:2}.chat-library-browser th{position:sticky;top:0;z-index:2;padding:9px 10px;background:#dce9f0;text-align:left;font-size:12px;color:#294e65;box-shadow:0 1px 0 #8db2c6}.chat-library-browser th:first-child{width:46px}.chat-library-browser th:nth-child(3){width:130px}.chat-library-browser th:nth-child(4){width:100px}.chat-library-browser td{padding:10px;border-top:1px solid #d7e2e8;font-size:13px}.chat-library-browser tbody tr[data-chat-library-folder]{cursor:pointer}.chat-library-browser tbody tr:hover,.chat-library-browser tbody tr.selected{background:#edf7f7}.chat-library-check{text-align:center}.chat-library-check input{width:18px;height:18px;margin:0}.chat-library-name{display:flex;align-items:center;gap:9px;min-width:0}.chat-library-name i{font-style:normal;font-size:18px}.chat-library-name b{overflow-wrap:anywhere}.chat-library-empty{text-align:center;color:#687f8e;padding:35px!important}.chat-library-picker>footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 14px;border-top:1px solid #cddce4;background:#f8fafb}.chat-library-selection{min-width:0;display:flex;align-items:center;gap:10px}.chat-library-selection>b{white-space:nowrap;font-size:12px}.chat-library-selection>span{display:flex;gap:5px;min-width:0;overflow-x:auto}.chat-library-selection em{flex:none;padding:4px 7px;border-radius:5px;background:#e8e3f2;color:#514472;font-size:11px;font-style:normal;max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-library-selection small{margin:0}.chat-library-picker>footer>.primary{flex:none}
@media(max-width:700px){.chat-library-shade{padding:4px}.chat-library-picker{width:100%;height:100%;border-radius:8px}.chat-library-toolbar{grid-template-columns:auto minmax(0,1fr)}.chat-library-toolbar input{grid-column:1/-1}.chat-library-browser{padding:0 6px 6px}.chat-library-browser th:nth-child(3),.chat-library-browser td:nth-child(3){display:none}.chat-library-selection small,.chat-library-selection>span{display:none}}

/* Kompakte Werkzeugleiste im Nachrichtenfenster */
.chat-compose-tools{align-items:stretch;gap:7px}.chat-attachment-tools{display:grid;grid-template-columns:repeat(2,max-content);gap:5px}.chat-attachment-tools>button,.chat-attachment-tools>label{display:flex;align-items:center;justify-content:flex-start;gap:5px;min-height:36px;padding:6px 9px;border:1px solid #c4d4de;border-radius:7px;background:#fff;color:#315a75;cursor:pointer;transition:background .15s,border-color .15s,box-shadow .15s,transform .15s}.chat-attachment-tools>button:hover,.chat-attachment-tools>label:hover{border-color:#6e9eb7;background:#eaf4f7;box-shadow:0 2px 7px #173f5718;transform:translateY(-1px)}.chat-attachment-tools>button:focus-visible,.chat-attachment-tools>label:focus-within{outline:2px solid #5ba5b0;outline-offset:1px}.chat-compose-tools>.primary{align-self:stretch;min-width:74px}.chat-attach-button input{display:none}@media(max-width:700px){.chat-attachment-tools{grid-template-columns:repeat(2,38px)}.chat-attachment-tools>button,.chat-attachment-tools>label{justify-content:center;padding:7px}.chat-attachment-tools span{display:none}.chat-compose-tools>.primary{min-width:62px}}

.chat-draft-files>span.folder-linked{background:#dceefa;color:#285c7a}.chat-folder-links{display:grid;gap:6px;margin-top:9px}.chat-folder-links>button{position:static;display:flex;align-items:center;gap:9px;width:100%;min-width:0;padding:8px 10px;border:1px solid #9fc6dc;border-left:4px solid #438ab6;border-radius:7px;background:#eff8fd;color:#245873;text-align:left;font-size:14px}.chat-folder-links i{font-style:normal;font-size:20px}.chat-folder-links span{display:flex;min-width:0;flex:1;flex-direction:column}.chat-folder-links b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-folder-links small{margin:1px 0 0;color:#587789}.chat-folder-links em{flex:none;font-style:normal;font-size:12px}.chat-folder-links button:disabled{filter:grayscale(1);opacity:.7}.chat-share-summary{padding:10px 12px;border:1px solid #bdd4e1;border-left:4px solid #438ab6;border-radius:7px;background:#f2f8fb}.chat-share-summary h3{margin:0 0 6px}.chat-share-summary p{margin:5px 0 9px}.chat-share-summary dl{display:grid;gap:5px;margin:0}.chat-share-summary dl>div{display:grid;grid-template-columns:180px 1fr;gap:8px;padding-top:5px;border-top:1px solid #d8e6ed}.chat-share-summary dt{font-weight:600}.chat-share-summary dd{margin:0;color:#587080}

.chat-context-row{box-shadow:inset 3px 0 #7b6ab0}.chat-context-row .chat-avatar{background:#ebe7f5;color:#5d4e88}.chat-context-badge{display:inline-flex;width:max-content;margin:3px 0 1px;padding:2px 6px;border-radius:9px;background:#ece7f5;color:#5d4e88;font-size:9px;font-weight:700;letter-spacing:.2px}

.chat-waitlist-row{border-left:4px solid #5a7ea6;background:#f3f7fb}.chat-context-badge.waitlist{background:#dfeaf5;color:#365f87}
