/* Contextual collaboration UI */
.app[data-view="chat"] .screen{min-height:0}
@media(max-width:600px){.app:not([data-view="start"]) .header-right .demo-tag{display:none}}
.header-menu{display:none}.discussion-button{margin-top:16px;margin-bottom:16px}.actions .discussion-button{margin:0}.chat-badge{position:absolute;top:2px;left:calc(50% + 5px);min-width:15px;height:15px;border:2px solid white;border-radius:9px;padding:0 3px;background:#e15353;color:#fff;font-size:8px;line-height:11px;font-weight:600}.dock-chat{position:relative}
.app[data-view="chat"] .screen{padding-bottom:22px;overflow:hidden}.app[data-view="chat"] .view{height:100%}.chat-page{height:100%;display:flex;flex-direction:column;min-height:0}.chat-page-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px}.chat-page-heading .btn{width:auto;min-width:0}.chat-page-heading .lead{font-size:12px}.chat-demo-note{display:flex;gap:8px;align-items:flex-start;padding:10px 12px;margin-bottom:16px;border:1px solid #dce6f4;background:#edf3fc;border-radius:7px;color:#5e718e;font-size:11px;line-height:1.6}.chat-demo-note .ic{width:14px;height:14px;margin-top:2px}.chat-demo-note b{font-weight:600}.chat-workspace{display:grid;grid-template-columns:minmax(270px,330px) minmax(0,1fr);flex:1;min-height:0;border:1px solid var(--line);border-radius:11px;overflow:hidden;background:var(--surface)}
.chat-inbox{display:flex;flex-direction:column;min-height:0;border-right:1px solid var(--line)}.chat-inbox-controls{padding:18px 16px 0}.chat-inbox-controls .search{height:39px;margin-bottom:14px;background:#f8fafc}.chat-filter-tabs{display:flex;gap:14px;border-bottom:1px solid var(--line)}.chat-filter-tabs button{border:0;border-bottom:2px solid transparent;background:transparent;padding:0 0 12px;font-size:11px;color:var(--ink-3);cursor:pointer}.chat-filter-tabs button.on{color:var(--accent);border-color:var(--accent);font-weight:600}.chat-list{overflow:auto;flex:1;min-height:0;padding:7px}.chat-thread-row{display:flex;align-items:flex-start;gap:11px;text-align:left;width:100%;border:1px solid transparent;border-radius:8px;padding:14px 10px;background:transparent;cursor:pointer}.chat-thread-row:hover{background:#f8faff}.chat-thread-row.selected{background:var(--accent-soft);border-color:#dce7ff}.chat-thread-icon{height:36px;width:36px;border-radius:9px;background:#eef3fb;color:#5a7ba7;display:grid;place-items:center;flex:none}.chat-thread-icon.incoming{background:#f3effc;color:#8962bd}.chat-thread-icon.stock{background:#edf6f2;color:#3d8b72}.chat-thread-icon .ic{width:18px;height:18px}.chat-thread-row>.main{flex:1;min-width:0}.chat-row-top{display:flex;gap:8px;justify-content:space-between;align-items:center}.chat-row-top b{font-size:12px;font-weight:600;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.chat-row-top time{font-size:9px;color:var(--ink-3);flex:none}.chat-row-preview{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:11px;color:var(--ink-3);margin-top:7px;line-height:1.6}.chat-row-bottom{display:flex;justify-content:space-between;align-items:center;margin-top:9px;font-size:9px;color:var(--ink-3)}.chat-unread{display:inline-flex;min-width:17px;height:17px;padding:0 5px;align-items:center;justify-content:center;border-radius:9px;color:#fff;background:var(--accent);font-size:9px}.chat-inbox-foot{display:flex;align-items:center;gap:7px;font-size:9px;color:var(--ink-3);padding:15px;border-top:1px solid var(--line)}.chat-inbox-foot .ic{height:13px;width:13px}.chat-empty-list{font-size:12px;text-align:center;color:var(--ink-3);padding:30px 16px}
.chat-detail{display:flex;flex-direction:column;min-height:0;min-width:0;background:#fbfcfe}.chat-detail-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 22px;background:var(--surface);border-bottom:1px solid var(--line)}.chat-detail-head h2{font-size:14px;font-weight:600;line-height:1.4;margin:0;overflow-wrap:anywhere}.chat-detail-head p{font-size:10px;color:var(--ink-3);margin:5px 0 0}.chat-detail-head p span{color:#8c9db3}.chat-status-button{display:flex;gap:5px;align-items:center;flex:none;padding:7px 9px;border:1px solid var(--line);background:#fff;border-radius:6px;font-size:10px;color:var(--ink-2);cursor:pointer}.chat-status-button .ic{width:14px;height:14px}.chat-status-button.completed{background:var(--ok-soft);color:var(--ok);border-color:#d4eade}.chat-pinned{padding:14px 22px 0}.chat-reference{display:flex;align-items:center;gap:11px;width:100%;border:1px solid #dfe7f3;border-radius:8px;padding:12px;background:#fff;text-align:left;cursor:pointer;min-width:0}.chat-reference:hover{border-color:#b7caed;background:#fbfcff}.chat-reference:disabled{cursor:default;opacity:.7}.chat-ref-icon{width:32px;height:32px;border-radius:7px;background:#f0f4fb;color:#6584b0;display:grid;place-items:center;flex:none}.chat-ref-icon .ic{width:16px;height:16px}.chat-reference .main{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}.chat-reference .main b{font-size:12px;font-weight:600;line-height:1.4;overflow-wrap:anywhere}.chat-reference .main>span:last-child{font-size:10px;color:var(--ink-3);line-height:1.5;overflow-wrap:anywhere}.chat-ref-kind{font-size:8px;color:var(--accent);letter-spacing:.06em;text-transform:uppercase}.chat-reference>.ic{width:13px;height:13px;color:var(--ink-3)}.chat-reference.compact{padding:10px;gap:8px}.chat-reference.compact .main b{font-size:11px}.chat-reference.compact .main>span:last-child{font-size:9px}
.chat-messages{padding:24px 22px;overflow:auto;flex:1;min-height:0;overscroll-behavior:contain}.chat-message{display:flex;align-items:flex-end;gap:9px;margin-bottom:20px}.chat-avatar{display:grid;place-items:center;width:28px;height:28px;flex:none;border-radius:8px;background:#e9eef5;color:#6d7e96;font-size:9px;font-weight:600;margin-bottom:19px}.chat-message-content{max-width:85%;min-width:0}.chat-message-author{font-size:10px;color:var(--ink-2);margin:0 0 6px 1px}.chat-bubble{padding:12px 14px;background:var(--surface);border:1px solid var(--line);border-radius:10px 10px 10px 2px;min-width:0}.chat-bubble p{font-size:13px;line-height:1.7;margin:0;white-space:pre-wrap;overflow-wrap:anywhere}.chat-bubble .chat-reference+p{margin-top:10px}.chat-message-meta{font-size:8px;color:#7d8c9f;margin:5px 1px 0}.chat-message.mine{flex-direction:row-reverse}.chat-message.mine .chat-avatar{display:none}.chat-message.mine .chat-bubble{background:#edf3ff;border-color:#dae5fb;border-radius:10px 10px 2px 10px}.chat-message.mine .chat-message-author,.chat-message.mine .chat-message-meta{text-align:right}.chat-system{text-align:center;font-size:10px;color:var(--ink-3);margin:17px 0}.chat-empty-conversation{text-align:center;padding:35px 20px;color:var(--ink-3)}.chat-empty-conversation b{font-size:14px;font-weight:500;color:var(--ink-2)}.chat-empty-conversation p{font-size:12px;line-height:1.7}.chat-detail-placeholder{margin:auto;text-align:center;padding:30px;max-width:400px;color:var(--ink-3)}.chat-detail-placeholder>span{display:grid;place-items:center;width:60px;height:60px;margin:0 auto 20px;border:1px solid var(--line);border-radius:16px;background:white;color:#849bc0}.chat-detail-placeholder>span .ic{height:28px;width:28px}.chat-detail-placeholder h2{font-size:18px;color:var(--ink-2);font-weight:500;letter-spacing:-.3px}.chat-detail-placeholder p{font-size:12px;line-height:1.9}.chat-detail-placeholder .btn{width:auto;margin-top:8px}
.chat-composer{padding:14px 20px 12px;background:var(--surface);border-top:1px solid var(--line)}.chat-compose-row{display:flex;align-items:flex-end;gap:9px}.chat-compose-row textarea{flex:1;min-width:0;min-height:42px;max-height:120px;resize:vertical;border:1px solid var(--line);border-radius:8px;padding:11px 12px;font:inherit;font-size:13px;line-height:1.5;color:var(--ink);background:#fafbfd}.chat-compose-row textarea:focus{outline:2px solid #dce7ff;outline-offset:0;border-color:#8eafea}.chat-attach-button{height:42px;width:35px;flex:none;background:white}.chat-send.btn{width:auto;min-width:0;padding:11px 12px;min-height:42px;flex:none}.chat-compose-hint{font-size:9px;color:var(--ink-3);margin:8px 0 0 44px}.chat-attachment-preview{display:flex;gap:8px;align-items:center;padding-bottom:12px}.chat-attachment-preview .chat-reference{flex:1;min-width:0}.chat-attachment-preview .iconbtn{flex:none}.chat-closed{font-size:12px;color:var(--ink-3);text-align:center;padding:8px}.chat-kind-tabs{display:flex;gap:7px;margin:23px 0 15px}.chat-kind-tabs .segb{display:flex;align-items:center;gap:6px;padding:9px 11px}.chat-kind-tabs .ic{width:15px;height:15px}
@media(min-width:1000px) and (max-width:1200px){.chat-workspace{grid-template-columns:275px minmax(0,1fr)}.chat-status-button{font-size:9px}.chat-detail-head{padding:15px}.chat-pinned{padding:12px 15px 0}.chat-messages{padding:20px 15px}.chat-composer{padding:12px}.chat-message-content{max-width:90%}.chat-send.btn span{display:none}}
@media(max-width:999.98px){.header-menu{display:grid;width:29px;height:29px;border:0;background:transparent}.header-menu .ic{height:17px;width:17px}.app[data-view="chat"] .screen{padding:18px 16px 16px}.chat-page-heading{margin-bottom:15px}.chat-page-heading .h1{font-size:25px}.chat-page-heading .lead{font-size:11px}.chat-page-heading .btn{font-size:11px;padding:10px 12px}.chat-demo-note{font-size:10px;line-height:1.5;margin-bottom:13px;padding:9px 10px}.chat-workspace{display:flex}.chat-inbox{width:100%;border:0}.chat-detail{display:none}.thread-open .chat-inbox{display:none}.thread-open .chat-detail{display:flex;width:100%}.thread-open .chat-page-heading{display:none}.thread-open .chat-demo-note{font-size:9px;padding:7px 9px;margin-bottom:9px}.chat-inbox-controls{padding:16px 15px 0}.chat-thread-row{padding:15px 12px;gap:13px}.chat-row-top b{font-size:13px}.chat-row-preview{font-size:12px}.chat-row-bottom{font-size:10px}.chat-thread-icon{width:39px;height:39px}.chat-inbox-foot{font-size:10px}.chat-detail-head{padding:14px 13px;gap:8px}.chat-detail-head h2{font-size:12px}.chat-detail-head p{font-size:9px}.chat-status-button{font-size:9px;padding:7px}.chat-status-button .ic{width:12px;height:12px}.chat-pinned{padding:11px 12px 0}.chat-reference{padding:10px;gap:8px}.chat-reference .main b{font-size:11px}.chat-reference .main>span:last-child{font-size:9px}.chat-messages{padding:18px 12px}.chat-message{gap:7px;margin-bottom:17px}.chat-message-content{max-width:86%}.chat-bubble{padding:10px 12px}.chat-bubble p{font-size:13px;line-height:1.6}.chat-composer{padding:11px 10px 9px}.chat-compose-row{gap:7px}.chat-compose-row textarea{font-size:16px;min-height:42px;padding:9px 10px;resize:none;height:44px}.chat-send.btn{padding:11px;min-height:42px}.chat-send.btn span{display:none}.chat-compose-hint{font-size:8px;margin-left:0;line-height:1.5}.chat-attach-button{width:32px}.chat-kind-tabs .segb{font-size:11px;padding:9px}.chat-inbox-controls .search input{font-size:16px}.app[data-view="chat"]{height:100dvh}.app[data-view="chat"] .mobile-dock{padding-top:4px;padding-bottom:max(6px,env(safe-area-inset-bottom))}}
@media(max-width:360px){.header-right{gap:3px}.header-menu{width:25px}.chat-detail-head h2{font-size:11px}.chat-detail-head p{font-size:8px}.chat-status-button{font-size:8px;padding:6px}.chat-message-content{max-width:87%}.chat-avatar{width:22px;height:22px;font-size:8px}.chat-bubble p{font-size:12px}.chat-demo-note{font-size:9px}.chat-page-heading .btn{padding:9px}.chat-page-heading .lead{max-width:175px}.chat-kind-tabs{gap:5px}.chat-kind-tabs .segb{font-size:10px;padding:8px}}
