.agent-avatar { position: relative; overflow: hidden; flex-shrink: 0; }
.agent-flavor { display: block; color: var(--brand-blue); font-size: 12px; line-height: 1.5; margin-top: 6px; font-weight: 400; }
.flavor-picker { margin: 0; padding: 0; border: 0; min-width: 0; }
.flavor-picker legend { font-weight: 600; color: var(--ink); font-size: 14px; }
.flavor-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.flavor-option { display: flex; align-items: flex-start; gap: 10px; border: 1px solid var(--line); border-radius: 9px; padding: 13px; cursor: pointer; color: var(--label); font-size: 12px; line-height: 1.6; }
.flavor-option input[type=radio] { flex: 0 0 16px; width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--brand-blue); }
.flavor-option:has(input:checked) { background: var(--brand-ice); border-color: var(--brand-blue); color: var(--heading); }
.flavor-option:focus-within { outline: 2px solid var(--brand-blue); outline-offset: 2px; }
@media (max-width: 680px) { .flavor-options { grid-template-columns: 1fr; } }
.agent-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.profile-link { display: flex; align-items: center; gap: 10px; min-width: 0; color: inherit; }
.profile-link:hover strong { text-decoration: underline; }
.collaboration-page { max-width: 1200px; padding: 28px 36px; margin: auto; }
.collaboration-form { max-width: 760px; background: var(--surface); border: 1px solid var(--line); padding: 28px; border-radius: 12px; display: grid; gap: 22px; }
.collaboration-form > .button { justify-self: start; }
.collaboration-form input[type=file] { padding: 12px; }
.collaboration-form .check-field { display: flex; align-items: center; gap: 12px; }
.check-field input, .people-field input { width: 17px; height: 17px; accent-color: var(--brand-blue); }
.field-help { font-size: 12px; color: var(--muted); line-height: 1.6; margin: 8px 0; }
.people-field { border: 1px solid var(--line); padding: 18px; border-radius: 8px; min-width: 0; }
.people-field legend { font-size: 13px; color: var(--ink); font-weight: 600; }
.people-field > div { max-height: 300px; overflow-y: auto; }
.people-field label { display: flex; gap: 10px; align-items: center; padding: 8px 0; font-size: 13px; }
.composer-tabs { display: none; gap: 8px; padding: 4px; margin: 20px 0 8px; border: 1px solid var(--line); background: var(--surface); border-radius: 9px; width: fit-content; }
.js-enabled .composer-tabs { display: flex; }
.composer-tabs button { background: transparent; color: var(--muted); padding: 9px 14px; border: 0; border-radius: 6px; font-size: 12px; }
.composer-tabs button[aria-selected=true] { background: var(--brand-ice); color: var(--heading); font-weight: 600; }
.composer-tabs button[data-composer-tab=note][aria-selected=true] { background: var(--notice-surface); color: var(--notice-ink); }
.message--note { background: var(--notice-surface); border: 1px solid #ead9a6; border-radius: 12px; }
.message--note .message-header { background: var(--notice-surface); border-radius: 12px 12px 0 0; }
.message--note .message-author > span { color: var(--notice-ink); }
.message--note:target { outline: 2px solid #b48623; outline-offset: 3px; }
.note-composer { margin-top: 20px; background: var(--notice-surface); border: 1px solid #ead9a6; padding: 20px; border-radius: 12px; }
.note-composer h2 { font-size: 14px; }
.note-composer .composer-body { margin-top: 15px; }
.note-composer .composer-channel { color: var(--notice-ink); }
[hidden] { display: none !important; }
.chat-filter { display: flex; gap: 24px; margin-bottom: 18px; font-size: 13px; }
.chat-filter a { color: var(--muted); padding: 7px 0; }
.chat-filter a[aria-current] { border-bottom: 2px solid var(--brand-cyan); color: var(--heading); font-weight: 600; }
.chat-home-list { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.chat-list-item { display: block; padding: 18px 20px; border-bottom: 1px solid var(--line-soft); position: relative; color: var(--heading); }
.chat-list-item strong { display: block; font-size: 13px; padding-right: 36px; overflow-wrap: anywhere; }
.chat-list-item:hover, .chat-list-item.is-selected { background: var(--brand-ice); }
.chat-list-item.is-selected { box-shadow: inset 3px 0 var(--brand-cyan); }
.chat-kind { display: block; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; font-size: 10px; margin-bottom: 6px; }
.chat-unread { position: absolute; right: 18px; top: 24px; min-width: 20px; text-align: center; background: var(--brand-blue); color: white; border-radius: 12px; padding: 2px 6px; font-size: 10px; }
.chat-empty { color: var(--muted); padding: 25px; font-size: 13px; line-height: 1.8; }
.chat-workspace { display: grid; grid-template-columns: 270px minmax(0,1fr); min-height: calc(100vh - 70px); }
.chat-conversations { background: var(--surface); border-right: 1px solid var(--line); min-width: 0; }
.chat-conversations h2 { font-size: 16px; padding: 22px 20px 8px; }
.chat-room { display: flex; flex-direction: column; min-width: 0; height: calc(100vh - 70px); position: relative; }
.chat-room-header { background: var(--surface); padding: 20px 28px 15px; border-bottom: 1px solid var(--line-soft); display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.chat-room-header h1 { margin: 0; font-size: 21px; overflow-wrap: anywhere; }
.chat-participants { background: var(--surface); padding: 12px 28px; border-bottom: 1px solid var(--line); font-size: 12px; }
.chat-participants > summary { color: var(--muted); cursor: pointer; }
.chat-participants[open] { max-height: 35vh; overflow-y: auto; }
.participant-list { display: flex; flex-wrap: wrap; gap: 14px; padding: 18px 0; }
.participant-list > div { display: flex; gap: 9px; align-items: center; padding: 8px; border: 1px solid var(--line-soft); border-radius: 8px; }
.participant-list small { display: block; color: var(--muted); margin-top: 4px; }
.participant-list .text-button { margin-left: 8px; }
.chat-actions { display: flex; gap: 10px; align-items: center; }
.chat-history { flex: 1; overflow-y: auto; padding: 22px 28px; min-height: 120px; scroll-behavior: auto; }
.chat-history-link { display: block; text-align: center; padding: 10px; font-size: 12px; }
.chat-message { display: flex; gap: 12px; margin: 0 0 20px; align-items: flex-start; }
.chat-message > div { max-width: 85%; min-width: 0; }
.chat-message header { display: flex; align-items: center; gap: 12px; margin-bottom: 7px; font-size: 12px; flex-wrap: wrap; }
.chat-message time { color: var(--muted); font-size: 10px; }
.chat-message-body { background: var(--surface); border: 1px solid var(--line); border-radius: 0 12px 12px; padding: 13px 16px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.7; }
.chat-message.is-own .chat-message-body { background: var(--brand-ice); border-color: var(--border-strong); }
.chat-message-body a { text-decoration: underline; }
.chat-system { color: var(--muted); padding: 12px 25px; text-align: center; font-size: 11px; }
.chat-system p { margin: 0 0 3px; }
.chat-system time { font-size: 10px; }
.chat-composer { background: var(--surface); padding: 16px 28px 22px; border-top: 1px solid var(--line); }
.chat-composer textarea { resize: vertical; min-height: 75px; max-height: 200px; font-size: 13px; }
.chat-composer-actions { display: flex; justify-content: space-between; gap: 14px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.chat-composer-tools { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.chat-composer-tools .button { display: inline-flex; gap: 6px; align-items: center; }
.chat-composer-tools input[type=file] { max-width: 100%; font-size: 12px; }
.chat-composer .chat-file-help { font-size: 10px; margin: 6px 0 0; }
.chat-emoji-picker { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 3px; padding: 8px; margin-top: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--page-background); max-width: 380px; }
.chat-emoji-picker button { border: 0; background: transparent; border-radius: 6px; padding: 5px 0; font-size: 22px; cursor: pointer; }
.chat-emoji-picker button:hover, .chat-emoji-picker button:focus-visible { background: var(--brand-ice); outline: 2px solid var(--brand-blue); }
.chat-selected-files, .chat-attachments { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.chat-selected-files { max-height: 110px; overflow-y: auto; }
.chat-selected-files li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 7px; font-size: 11px; overflow-wrap: anywhere; }
.chat-selected-files button { flex-shrink: 0; font-size: 11px; }
.chat-attachment { display: flex; align-items: center; gap: 10px; padding: 10px 13px; border: 1px solid var(--border-strong); border-radius: 9px; background: var(--surface); color: var(--heading); }
.chat-attachment:hover { background: var(--brand-ice); }
.chat-attachment strong { font-size: 12px; display: block; overflow-wrap: anywhere; }
.chat-attachment small { display: block; font-size: 10px; color: var(--muted); margin-top: 3px; }
.chat-form-error { color: var(--danger-ink); font-size: 12px; }
.chat-form-error:empty { display: none; }
.chat-connection-status { margin: 0; padding: 4px 28px; font-size: 10px; color: var(--muted); background: var(--page-background); }
.chat-readonly { padding: 20px 28px; background: var(--surface); color: var(--muted); font-size: 12px; margin: 0; }
.new-messages-button { align-self: center; padding: 8px 16px; border: 1px solid var(--border-strong); border-radius: 20px; background: var(--brand-navy); color: white; font-size: 12px; }
.mention-list { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.mention-card { padding: 22px; display: flex; gap: 24px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.mention-card.is-unread { background: var(--brand-ice); box-shadow: inset 3px 0 var(--brand-cyan); }
.mention-card strong { display: block; font-size: 14px; }
.mention-card p { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; color: var(--muted); }
.mention-card time { font-size: 11px; color: var(--muted); }
@media(max-width:1100px) { .chat-workspace { grid-template-columns: 210px minmax(0,1fr); } }
@media(max-width:900px) { .chat-conversations { display: none; } .chat-workspace { grid-template-columns: 1fr; } .chat-room { height: calc(100dvh - 125px); } }
@media(max-width:680px) { .collaboration-page { padding: 22px 14px; } .collaboration-form { padding: 20px; } .chat-history { padding: 18px 14px; } .chat-room-header, .chat-participants, .chat-composer { padding-left: 16px; padding-right: 16px; } .chat-room-header h1 { font-size: 18px; } .chat-message > div { max-width: 90%; } .chat-composer > div { flex-wrap: wrap; } .mention-card { align-items: flex-start; flex-direction: column; gap: 10px; } }

.profile-photo-preview { display: flex; align-items: center; gap: 16px; padding: 20px 28px; color: var(--muted); font-size: 13px; }

.chat-window-controls { display: flex; margin-left: auto; }
.chat-full-page { display: none; }
.chat-popout .sidebar, .chat-popout .mobile-bar, .chat-popout .chat-conversations, .chat-popout .chat-window-launch { display: none !important; }
.chat-popout .app-shell, .chat-popout .chat-workspace { grid-template-columns: minmax(0, 1fr); }
.chat-popout .workspace-topbar { height: 60px; min-height: 60px; padding: 8px 14px; gap: 8px; }
.chat-popout .chat-full-page { display: inline-flex; }
.chat-popout .chat-workspace { min-height: calc(100dvh - 60px); }
.chat-popout .chat-room { height: calc(100dvh - 60px); min-height: 420px; }
.chat-popout .chat-room-header, .chat-popout .chat-participants, .chat-popout .chat-composer { padding-left: 16px; padding-right: 16px; }
.chat-popout .chat-history { padding: 18px 14px; }
.chat-popout .collaboration-page { padding: 22px 16px; }
.chat-popout .chat-room-header h1 { font-size: 19px; }
@media(max-width:430px) { .chat-popout .workspace-topbar .button { padding-left: 6px; padding-right: 6px; font-size: 11px; } }

.tiqv-heading { display: flex; gap: 8px; align-items: start; flex-wrap: wrap; }
.tiqv-heading h2 { font-size: 13px; margin: 0; }
.tiqv-state { display: inline-block; font-size: 10px; padding: 3px 7px; border-radius: 5px; color: var(--notice-ink); background: var(--notice-surface); }
.tiqv-state.is-reviewed { background: var(--brand-ice); color: var(--heading); }
.tiqv-summary { margin: 14px 0; font-size: 12px; line-height: 1.6; }
.tiqv-summary dt { color: var(--muted); font-size: 10px; margin-top: 10px; }
.tiqv-summary dd { margin: 0; overflow-wrap: anywhere; }
.tiqv-editor summary, .tiqv-history summary { cursor: pointer; color: var(--brand-blue); font-size: 12px; padding: 8px 0; }
.tiqv-editor .field { margin-top: 13px; }
.tiqv-editor select, .tiqv-editor textarea { font-size: 12px; width: 100%; min-width: 0; }
.tiqv-history { margin-top: 12px; }
.tiqv-history ol { list-style: none; padding: 0; margin: 4px 0; max-height: 330px; overflow-y: auto; }
.tiqv-history li { border-top: 1px solid var(--line-soft); padding: 12px 0; font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.tiqv-history time { display: block; color: var(--muted); }
.tiqv-warning { background: var(--notice-surface); color: var(--notice-ink); padding: 10px; font-size: 12px; line-height: 1.6; border-radius: 6px; }
