.chat-layout{display:grid;grid-template-columns:190px minmax(0,1fr);height:calc(100dvh - 185px);min-height:570px;border:1px solid #dfe8f2;border-radius:14px;background:#fff;overflow:hidden}.chat-conversations{display:flex;flex-direction:column;gap:16px;padding:17px 12px;background:#f8fafd;border-right:1px solid #e7edf4;min-height:0}.chat-conversations>.btn{justify-content:center;font-size:12px}#chat-thread-list{overflow:auto;flex:1;min-height:0}.chat-thread{display:flex;align-items:center;gap:8px;border:0;background:none;color:#71869b;text-align:left;padding:11px 10px;border-radius:7px;font-size:12px;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:5px}.chat-thread svg{width:15px;height:15px;flex-shrink:0}.chat-thread.active{background:#e6f3fc;color:#2489b8}.chat-local-note{padding:10px 8px 0;color:#9aabba;font-size:10px;line-height:1.8}.chat-workspace{min-width:0;display:flex;flex-direction:column;min-height:0}.chat-model-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 20px;border-bottom:1px solid #edf2f7;flex-shrink:0}.chat-model-bar>div{display:flex;align-items:center;gap:8px;min-width:0;flex-wrap:wrap}.chat-model-bar strong{font-size:12px;font-weight:500;color:#607b92}.chat-model-bar small{color:#9aaabd;font-size:10px}.chat-model-bar .btn{font-size:10px;padding:7px 10px;white-space:nowrap}.chat-model-dot{width:6px;height:6px;background:#82a798;border-radius:50%;flex-shrink:0}.chat-model-dot.busy{background:#009bdc}.chat-messages{flex:1;overflow:auto;padding:25px 28px;min-height:0;scroll-behavior:smooth}.chat-welcome{min-height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:30px 12px;color:#8da0b2}.chat-welcome>span{display:flex;width:54px;height:54px;align-items:center;justify-content:center;border-radius:15px;background:#edf7fd;color:#39a3d2;margin-bottom:15px}.chat-welcome>span svg{width:28px;height:28px}.chat-welcome h2{font-size:19px;color:#455f76;margin:0 0 12px}.chat-welcome p{font-size:12px;max-width:340px;line-height:1.9;margin:0 0 20px}.chat-welcome button{font-size:11px}.chat-message{margin-bottom:25px;max-width:94%}.chat-message.from-user{margin-left:auto}.chat-message-label{font-size:10px;color:#94a5b6;margin:0 0 7px 2px}.chat-message.from-user .chat-message-label{text-align:right}.chat-message-body{font-size:13px;line-height:1.9;color:#435d73;overflow-wrap:anywhere}.chat-message.from-user .chat-message-body{background:#eef7fd;border:1px solid #dfedf7;padding:12px 16px;border-radius:13px 13px 3px 13px;width:fit-content;margin-left:auto}.chat-message-text{white-space:pre-wrap}.chat-message-images{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:8px}.chat-message-images button{padding:0;background:none;border:0;cursor:zoom-in}.chat-message-images img{display:block;max-width:160px;max-height:150px;object-fit:contain;border-radius:7px}.chat-questions{margin:12px 0;padding-left:20px;color:#9b834e;font-size:12px}.chat-draft{border:1px solid #dce8f2;background:#fbfdff;border-radius:11px;padding:16px 18px;margin-top:14px}.chat-draft-head{display:flex;justify-content:space-between;align-items:center}.chat-draft-head strong{font-size:11px;color:#2588b7}.chat-draft-head>span{font-size:10px;color:#a0aebc}.chat-draft h3{font-size:14px;line-height:1.6;color:#3a536a;margin:10px 0 12px}.chat-draft-details{display:flex;gap:15px;flex-wrap:wrap;font-size:11px;color:#91a0af}.chat-draft-details b{font-weight:500;color:#536e85;margin-left:5px}.chat-draft>p{font-size:11px;color:#7d90a3;margin:6px 0}.chat-draft-questions{font-size:11px;color:#ad8c55;margin:10px 0;padding-left:18px}.chat-draft>.btn{font-size:11px;padding:8px 11px;margin-top:9px}.chat-match-label{margin:12px 0 8px;color:#8a9daf}.chat-match-label select{font-size:11px}.chat-duplicate-hint{font-size:11px;color:#b1804a;margin-top:10px}.chat-processing{display:flex;align-items:center;gap:9px;font-size:12px;color:#7895ad;padding:5px 0 15px}.chat-job-note{font-size:11px;color:#99a8b8;text-align:center;padding:5px 0 15px}.chat-composer{border-top:1px solid #e8eff5;padding:14px 20px 16px;flex-shrink:0;background:#fff}.chat-composer textarea{width:100%;display:block;resize:vertical;min-height:72px;max-height:150px;font:inherit;font-size:13px;line-height:1.7;border-color:#e0e8f1;padding:11px 13px;background:#fbfdff;color:#405d75}.chat-composer-actions{display:flex;align-items:center;gap:8px;margin-top:11px}.chat-composer-actions>.btn{font-size:11px;padding:8px 11px}.chat-composer-actions>[data-chat=send]{margin-left:auto}.chat-composer-hint{font-size:10px;color:#9aabba}.chat-cancel{color:#ad7867}.chat-cancel[hidden]{display:none!important}.chat-error{font-size:12px;line-height:1.7;color:#b57964;background:#fff8f3;padding:10px 20px;flex-shrink:0}.chat-error:empty{display:none}.chat-uploads{display:flex;gap:10px;overflow:auto}.chat-uploads:empty{display:none}.chat-upload{position:relative;flex-shrink:0;width:82px;margin-bottom:12px}.chat-upload img{display:block;width:82px;height:65px;object-fit:cover;border-radius:7px;border:1px solid #dce7ef}.chat-upload>button{position:absolute;right:-4px;top:-5px;border-radius:50%;background:#fff;border:1px solid #cfdce6;color:#6c8194;width:22px;height:22px;font-size:17px;line-height:18px;padding:0;box-shadow:0 2px 7px #253e5215}.chat-upload small{font-size:9px;color:#8c9fb1;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:4px}.ai-duplicate-warning{padding:13px 15px;background:#fff8eb;border:1px solid #efdfbd;border-radius:9px;margin:0 0 16px;color:#a17b3f;font-size:12px}.ai-duplicate-warning[hidden]{display:none!important}.ai-duplicate-warning strong{font-size:12px}.ai-duplicate-warning p{font-size:11px;line-height:1.8;margin:8px 0}.ai-duplicate-warning small{font-size:10px}.ai-draft-review-note{font-size:11px;line-height:1.8;color:#917a52;background:#fcf8ee;padding:11px 14px;border-radius:8px;margin-bottom:16px}
@media(max-width:1100px){.chat-layout{grid-template-columns:155px minmax(0,1fr)}.chat-conversations{padding:14px 9px}.chat-messages{padding:20px}.chat-composer-hint{display:none}.chat-model-bar small{display:none}}
@media(max-width:760px){main:has(.chat-layout){padding:20px 12px 90px}.chat-layout{display:flex;flex-direction:column;height:calc(100dvh - 220px);min-height:460px;border-radius:11px}.chat-conversations{flex-direction:row;align-items:center;padding:8px;gap:8px;border-right:0;border-bottom:1px solid #e7edf4;min-height:50px;flex-shrink:0}.chat-conversations>.btn{font-size:10px;padding:8px;white-space:nowrap}#chat-thread-list{display:flex;gap:5px;overflow-x:auto;overflow-y:hidden}.chat-thread{width:auto;max-width:140px;flex-shrink:0;margin:0;font-size:10px;padding:9px 8px}.chat-thread svg,.chat-local-note{display:none}.chat-workspace{flex:1;min-height:0}.chat-model-bar{padding:10px 12px;gap:5px}.chat-model-bar strong{font-size:10px}.chat-model-bar .btn{font-size:9px;padding:6px 8px}.chat-messages{padding:17px 13px}.chat-message{max-width:100%}.chat-message-body{font-size:12px}.chat-message.from-user .chat-message-body{padding:10px 12px}.chat-welcome{padding:20px 8px}.chat-welcome h2{font-size:16px}.chat-welcome p{font-size:11px}.chat-composer{padding:10px 12px}.chat-composer textarea{font-size:12px;min-height:66px}.chat-composer-actions{gap:6px}.chat-composer-actions>.btn{font-size:10px;padding:7px 9px}.chat-draft{padding:13px}.chat-draft h3{font-size:13px}.chat-draft-details{gap:8px}.chat-error{padding:9px 12px;font-size:11px}.chat-message-images img{max-width:130px;max-height:130px}}

.chat-draft .chat-draft-performance{font-size:12px;color:#51738d;margin:0 0 12px;font-weight:500}.chat-draft .chat-supplied-activity{font-size:10px;color:#95a4b4}

.chat-draft-cover{display:block;width:150px;height:95px;object-fit:contain;object-position:left center;background:#f0f5fa;border-radius:6px;margin:12px 0 8px;border:1px solid #e2eaf2}
