/* U107: eine gemeinsame Priority-CI für Kundengespräche, keine Fachrechte in CSS. */
.chat-inbox{display:grid;grid-template-columns:270px minmax(0,1fr);grid-template-rows:minmax(0,1fr);height:min(850px,calc(100dvh - 180px));min-height:640px;min-width:0;overflow:hidden;background:var(--surface);border:1px solid var(--border);border-radius:24px;box-shadow:var(--shadow)}
.chat-sidebar{display:flex;flex-direction:column;min-height:0;min-width:0;padding:22px 14px 16px;background:var(--glass);border-right:1px solid var(--border)}
.chat-sidebar-title{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 8px}.chat-sidebar h2{font-size:21px;margin:0;font-weight:500}.chat-list-count{padding:4px 8px;border-radius:9px;background:var(--surface-alt);font-size:11px;color:var(--ink-dim)}
.chat-sidebar header>p{font-size:12px;color:var(--ink-dim);margin:8px 8px 20px}.chat-search{display:grid;gap:6px;font-size:11px;color:var(--ink-dim);padding:0 6px}.chat-search input{font:inherit;font-size:13px;background:var(--surface-alt);border:1px solid transparent;color:var(--ink);border-radius:12px;padding:12px;width:100%;box-sizing:border-box}.chat-search input:focus{outline:2px solid var(--accent);outline-offset:1px}
.chat-list-filters{display:flex;gap:5px;border-radius:12px;background:var(--surface-alt);margin:14px 6px 8px;padding:4px}.chat-list-filters button{flex:1;font:inherit;font-size:12px;min-height:40px;border:0;border-radius:9px;color:var(--ink-dim);background:transparent;cursor:pointer;transition:background 160ms,color 160ms,box-shadow 160ms}.chat-list-filters button[aria-pressed=true]{background:var(--surface);color:var(--ink);box-shadow:0 2px 7px #25262109}.chat-list-filters button:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.chat-thread-list{min-height:0;overflow:auto;margin:6px 0 8px;display:flex;flex-direction:column;gap:4px;flex:1;overscroll-behavior:contain}.chat-thread{font:inherit;display:flex;align-items:center;gap:10px;text-align:left;width:100%;border:1px solid transparent;border-radius:13px;padding:12px 8px;background:transparent;color:var(--ink);cursor:pointer;min-width:0;transition:background 160ms,border-color 160ms}.chat-thread:hover{background:var(--surface-alt)}.chat-thread.is-active{background:var(--accent-dim);border-color:#dfc45955}.chat-thread:focus-visible,.chat-reply-button:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.chat-avatar{height:40px;width:40px;flex:0 0 40px;border-radius:50%;background:var(--surface-alt);display:grid;place-items:center;color:var(--ink);font-weight:500;font-size:12px}.chat-thread.is-active .chat-avatar{background:var(--surface)}.chat-avatar svg{width:20px;height:20px;stroke-width:1.6}.chat-thread-copy{flex:1;min-width:0}.chat-thread-copy strong,.chat-thread-copy>span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-thread-copy strong{font-size:13px;font-weight:500}.chat-thread-copy>span{font-size:11px;color:var(--ink-dim);margin-top:5px}.chat-thread-meta{display:grid;justify-items:end;gap:7px;font-size:10px;color:var(--ink-dim)}.chat-unread{min-width:20px;height:20px;padding:0 5px;box-sizing:border-box;border-radius:50px;background:var(--accent);color:var(--accent-ink);display:grid;place-items:center;font-size:10px;font-weight:600}.chat-sidebar-status{font-size:11px;line-height:1.5;min-height:16px;color:var(--ink-dim);margin:5px 7px}
.chat-detail{min-height:0;min-width:0;display:flex;flex-direction:column;padding:0}.chat-detail [data-inbox-chat]{flex:1;min-height:0;display:flex;flex-direction:column}.chat-detail .customer-chat{flex:1;height:auto;min-height:0;padding:0}.chat-welcome{margin:auto;padding:26px;text-align:center;max-width:370px;color:var(--ink-dim);line-height:1.6;font-size:13px}.chat-welcome .chat-avatar{margin:auto;width:60px;height:60px;background:var(--accent-dim)}.chat-welcome h3{color:var(--ink);font-size:24px;font-weight:500}
.customer-chat{display:flex;flex-direction:column;min-width:0;min-height:640px;height:min(800px,calc(100dvh - 240px));gap:0}.chat-conversation-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 22px;border-bottom:1px solid var(--border);flex-shrink:0}.chat-conversation-identity{display:flex;align-items:center;gap:11px;min-width:0}.chat-conversation-identity>div{min-width:0}.chat-conversation-head h3{margin:0;font-size:16px;font-weight:500;overflow-wrap:anywhere}.chat-conversation-head p{font-size:11px;color:var(--ink-dim);margin:4px 0 0;line-height:1.4}.chat-head-actions{display:flex;gap:7px;flex-shrink:0}.chat-head-actions .btn{display:inline-flex;align-items:center;gap:7px;min-height:40px;font-size:12px}.chat-head-actions svg,.customer-chat-submit svg{width:17px;height:17px;stroke-width:1.6;flex-shrink:0}.chat-icon-button{padding:10px!important;min-width:40px}.chat-header-back{display:none!important}
.chat-workspace{display:grid;grid-template-columns:minmax(0,1fr);min-height:0;flex:1;position:relative}.chat-room{display:flex;flex-direction:column;min-height:0;min-width:0;padding:0 22px 16px;background:var(--surface)}.customer-chat-list{flex:1;min-height:120px;max-height:none;display:block;overflow:auto;overscroll-behavior:contain;padding:24px 0 12px;background:transparent;border:0;border-radius:0}.chat-history-top{text-align:center}.chat-history-top .btn{font-size:11px;margin-bottom:12px}[data-chat-messages]{display:flex;flex-direction:column;gap:12px}
.customer-chat-message{display:grid;grid-template-columns:28px minmax(0,1fr);column-gap:9px;align-items:start;max-width:min(88%,600px);padding:0;border:0;background:transparent;align-self:flex-start;border-radius:0;overflow-wrap:anywhere;min-width:0}.customer-chat-message.is-own{grid-template-columns:minmax(0,1fr) 28px;align-self:flex-end;background:transparent}.chat-message-avatar{display:grid;place-items:center;width:28px;height:28px;background:var(--surface-alt);border-radius:50%;font-size:9px;font-weight:500;margin-top:2px;color:var(--ink-dim)}.customer-chat-message.is-own .chat-message-avatar{grid-column:2;grid-row:1;background:var(--accent-dim);color:var(--accent-ink)}
.chat-bubble{grid-column:2;grid-row:1;border:1px solid var(--border);border-radius:4px 16px 16px 16px;background:var(--surface-alt);padding:11px 14px;min-width:0;color:var(--ink)}.customer-chat-message.is-own .chat-bubble{grid-column:1;background:var(--nav-active,#282a25);color:var(--nav-active-ink,#fff);border-color:transparent;border-radius:16px 4px 16px 16px}.chat-bubble header{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:nowrap;font-size:10px}.chat-bubble header strong{font-weight:500;color:inherit}.customer-chat-message time{font-size:10px;white-space:nowrap;color:var(--ink-dim)}.customer-chat-message.is-own time{color:#ffffffa8}.chat-bubble p{font-size:14px;line-height:1.55;white-space:pre-wrap;margin:7px 0 0;color:inherit}.chat-bubble blockquote{margin:7px 0;padding:8px 10px;background:var(--glass);border:1px solid var(--border);border-radius:9px;font-size:11px}.chat-bubble blockquote strong,.chat-bubble blockquote span{display:block}.chat-bubble blockquote span{margin-top:3px;white-space:pre-wrap}.is-own .chat-bubble blockquote{background:#ffffff12;border-color:#ffffff25}
.chat-reply-button{padding:0;background:transparent;color:inherit;opacity:.55;border:0;cursor:pointer;min-height:40px;min-width:40px;flex:0 0 40px;display:grid;place-items:center;border-radius:10px;transition:opacity 160ms,background 160ms}.chat-reply-button svg{width:16px;height:16px}.chat-reply-button:hover,.chat-reply-button:focus-visible{opacity:1;background:#25262108}.is-own .chat-reply-button:hover,.is-own .chat-reply-button:focus-visible{background:#ffffff14}.chat-day{align-self:center;margin:8px 0;font-size:10px;color:var(--ink-dim);padding:5px 10px;border:1px solid var(--border);border-radius:50px;background:var(--glass)}.chat-empty{display:grid;place-items:center;min-height:200px;margin:0;padding:24px 14px;text-align:center;line-height:1.6;font-size:13px;color:var(--ink-dim)}
.chat-download{display:grid;grid-template-columns:22px minmax(0,1fr);column-gap:8px;align-items:center;text-align:left;width:100%;margin-top:8px;white-space:normal;word-break:break-word;font-size:12px;padding:10px;min-height:44px}.chat-download svg{width:19px;height:19px;grid-row:span 2;stroke-width:1.6}.chat-download small{font-size:10px;color:var(--ink-dim)}.is-own .chat-bubble .chat-download{background:#ffffff0d;color:inherit;border-color:#ffffff30}.is-own .chat-bubble .chat-download small{color:#ffffffaa}
.customer-chat-form{margin:0;flex-shrink:0}.chat-input-label{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.chat-composer{border:1px solid var(--border);border-radius:17px;background:var(--surface);padding:5px 10px 10px;box-shadow:0 4px 16px #25262105;transition:border-color 160ms,box-shadow 160ms}.chat-composer:focus-within{border-color:#d3b336;box-shadow:0 0 0 3px #ffcb1410}.chat-composer textarea{font:inherit;font-size:13px;color:var(--ink);background:transparent;border:0;outline:none;border-radius:0;width:100%;box-sizing:border-box;padding:12px 4px 5px;margin:0;resize:none;min-height:44px;max-height:124px;overflow:auto;line-height:1.5;display:block}.customer-chat-submit{display:flex;align-items:center;justify-content:space-between;flex-wrap:nowrap;gap:8px;margin-top:4px}.customer-chat-submit>div{display:flex;align-items:center;gap:8px;min-width:0}.customer-chat-submit small{font-size:10px;color:var(--ink-dim)}.customer-chat-submit .btn{width:auto;flex:0 0 auto;display:inline-flex;align-items:center;gap:7px;min-height:40px;font-size:12px}.customer-chat-submit [data-chat-attach]{background:transparent;border-color:transparent;padding-left:7px}.customer-chat-submit [data-chat-attach]:hover{background:var(--surface-alt)}
.chat-composer-meta{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;padding-top:6px;flex-shrink:0}.customer-chat [data-chat-status]{font-size:10px;min-height:16px;margin:0;max-width:65%;color:var(--ink-dim);line-height:1.5}.chat-footnote{font-size:10px;line-height:1.5;color:var(--ink-dim);margin:0;text-align:right}.chat-footnote>span{display:block}.chat-reply-draft{padding:8px 10px;background:var(--surface-alt);border:1px solid var(--border);border-radius:11px;display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:11px;overflow-wrap:anywhere;margin-bottom:7px}.chat-reply-draft>span{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.chat-reply-draft .btn{min-width:40px;min-height:40px;padding:0}.chat-files-draft{display:grid;gap:5px;margin:6px 0;max-height:126px;overflow:auto;overscroll-behavior:contain}.chat-file-draft{display:flex;align-items:center;justify-content:space-between;gap:10px;border:1px solid var(--border);padding:6px 10px;border-radius:10px;background:var(--surface-alt);font-size:11px;min-width:0}.chat-file-draft>span{min-width:0;overflow-wrap:anywhere}.chat-file-draft .btn{flex-shrink:0;font-size:11px}.chat-new{align-self:center;margin:6px 0;font-size:11px;min-height:40px}.customer-chat [hidden]{display:none!important}[data-chat-drag=true]{outline:2px solid var(--accent);outline-offset:3px;border-radius:18px}
.chat-inspector{min-width:0;min-height:0;overflow:auto;padding:16px 18px;background:var(--glass);border-left:1px solid var(--border);overscroll-behavior:contain;animation:chat-detail-in 200ms ease-out}.chat-inspector-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.chat-inspector h4{font-size:13px;font-weight:500;margin:0}.chat-inspector-head .btn{min-height:40px;min-width:40px;padding:0;font-size:19px}.chat-inspector-profile{padding:22px 0;text-align:center}.chat-inspector-profile .chat-avatar{height:56px;width:56px;margin:0 auto 12px;background:var(--accent-dim)}.chat-inspector-profile>strong{display:block;font-weight:500;font-size:15px;overflow-wrap:anywhere}.chat-inspector-profile>p{font-size:11px;color:var(--ink-dim);line-height:1.6}.chat-inspector-profile .btn{font-size:11px;margin-top:8px}.chat-inspector-section{padding:18px 0;border-top:1px solid var(--border)}.chat-inspector-section h4{display:flex;align-items:center;justify-content:space-between;gap:8px}.chat-inspector-section h4>span{font-size:10px;border-radius:7px;padding:3px 6px;background:var(--surface-alt)}.chat-inspector-section p,.chat-inspector-empty{font-size:11px;line-height:1.6;color:var(--ink-dim)}.chat-inspector-hint{margin:7px 0 14px}.chat-shared-file{padding-bottom:10px}.chat-shared-file>.chat-download{font-size:11px}.chat-shared-file>small{font-size:10px;color:var(--ink-dim);display:block;margin:6px 3px}.chat-workspace.has-details{grid-template-columns:minmax(0,1fr) 238px}
.chat-typing-space{height:22px;flex-shrink:0;display:flex;align-items:center;padding-inline:4px;color:var(--ink-dim);font-size:10px}.chat-typing-dots{display:inline-flex;gap:3px;margin-left:7px;vertical-align:middle}.chat-typing-dots i{height:3px;width:3px;border-radius:50%;background:currentColor;animation:chat-typing 1.2s ease-in-out infinite}.chat-typing-dots i:nth-child(2){animation-delay:150ms}.chat-typing-dots i:nth-child(3){animation-delay:300ms}.chat-message-sent{animation:chat-sent 240ms cubic-bezier(.2,.8,.2,1)}.chat-message-arrived{animation:chat-arrived 260ms cubic-bezier(.2,.8,.2,1)}.chat-is-sending svg{opacity:.65}
@keyframes chat-sent{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}@keyframes chat-arrived{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}@keyframes chat-typing{0%,70%,100%{opacity:.4;transform:translateY(0)}35%{opacity:1;transform:translateY(-2px)}}@keyframes chat-detail-in{from{opacity:0;transform:translateX(8px)}to{opacity:1;transform:translateX(0)}}
@media(max-width:1299px){.chat-workspace.has-details{grid-template-columns:minmax(0,1fr)}.chat-workspace.has-details>.chat-room{display:none}.chat-inspector{border-left:0;padding:18px 24px}.chat-inspector-profile{padding:14px 0}.chat-inspector-profile .chat-avatar{height:48px;width:48px}.chat-inspector-section{max-width:580px;width:100%;margin:auto}.chat-workspace.has-details .chat-inspector-head{max-width:580px;width:100%;margin:auto}}
@media(max-width:1050px){.chat-inbox{grid-template-columns:235px minmax(0,1fr)}.chat-conversation-head{padding:16px}.chat-room{padding-inline:16px}.customer-chat-submit small{display:none}.customer-chat-message{max-width:94%}}
@media(max-width:720px){.chat-inbox{display:block;height:auto;min-height:580px}.chat-sidebar{border:none;min-height:560px}.chat-detail{display:none;min-height:590px}.chat-inbox.has-conversation .chat-sidebar{display:none}.chat-inbox.has-conversation .chat-detail{display:flex}.chat-header-back{display:inline-flex!important;padding:8px!important;min-width:40px;min-height:40px}.customer-chat{height:auto;min-height:590px}.chat-detail .customer-chat{min-height:590px}.chat-workspace{flex:1}.chat-room{padding:0 12px 12px}.customer-chat-list{min-height:270px;max-height:420px;padding-top:20px}.chat-conversation-head{padding:13px 12px;gap:8px}.chat-conversation-identity{gap:7px}.chat-conversation-identity>.chat-avatar{display:none}.chat-conversation-head h3{font-size:14px}.chat-conversation-head p{font-size:10px}.chat-head-actions .btn span{display:none}.chat-head-actions .btn{padding:10px;min-width:40px}.customer-chat-message{max-width:96%;column-gap:7px}.chat-bubble{padding:10px 12px}.chat-composer{padding:4px 6px 7px}.customer-chat-submit .btn{font-size:11px;min-height:42px;padding:8px 10px}.customer-chat-submit [data-chat-attach]{padding-left:6px}.chat-footnote{font-size:9px}.chat-composer-meta{gap:6px}.chat-inspector{min-height:490px;padding:14px 18px}.chat-shared-file .chat-download{min-height:44px}}
@media(prefers-reduced-motion:reduce){.chat-thread,.chat-list-filters button,.chat-composer,.chat-reply-button{transition:none}.chat-message-sent,.chat-message-arrived,.chat-typing-dots i,.chat-inspector{animation:none}}

/* Freier Aktionsbereich neben dem festen Aufgabenzeit-Knopf. */
@media(min-width:721px){.chat-detail .customer-chat-submit{padding-right:40px}}

/* T-C8 (18.10.2026): kompaktere Nachrichten, sauberer Knopf zum Verwerfen einer Antwort. Name steht auf beiden Seiten in der Blase. */
[data-chat-messages]{gap:8px}
.chat-bubble{padding:8px 12px}
.customer-chat-list{padding:16px 0 8px}
.customer-chat{min-height:520px}
.chat-reply-clear{flex:none;display:inline-grid;place-items:center;width:32px;height:32px;padding:0;border:1px solid var(--stroke);border-radius:50%;background:var(--surface);color:var(--ink-dim);cursor:pointer;transition:background var(--motion-fast,160ms),color var(--motion-fast,160ms)}
.chat-reply-clear:hover{background:var(--surface-alt);color:var(--ink)}
.chat-reply-clear:focus-visible{outline:3px solid #aa7e00;outline-offset:2px}
