/* Shared workspace additions. Compact cards and drag styles are deliberately untouched. */
.ux-home{max-width:1160px}.ux-home-controls,.ux-bulk-toolbar,.ux-chat-controls{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:16px}.ux-home-summary,.ux-onboarding,.ux-home-list article,.ux-checklist,.ux-leave-guard,.ux-inline-confirm,.ux-conflict,.ux-bulk-form{background:#fff;border:1px solid #d6e0ef;border-radius:12px;padding:18px;margin:12px 0;color:#203247}.ux-home-summary p,.ux-muted,.ux-home-list p{color:#72839b}.ux-home-list article{display:flex;justify-content:space-between;align-items:center;gap:16px}.ux-home-list article[hidden]{display:none}.ux-home-list article>div{min-width:0;overflow-wrap:anywhere}.ux-home-list button{flex-shrink:0}.ux-leave-guard,.ux-inline-confirm{border-color:#dfb65a;background:#fffaf0;position:relative;z-index:5}.ux-leave-guard>div,.ux-inline-confirm>div{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.ux-leave-guard p,.ux-inline-confirm p{margin:8px 0}.ux-compare{overflow:auto;max-height:380px}.ux-compare table{width:100%;border-collapse:collapse;font-size:13px}.ux-compare th,.ux-compare td{padding:12px;border-bottom:1px solid #dce4ef;text-align:left;vertical-align:top;overflow-wrap:anywhere;max-width:360px}.ux-compare th{background:#f4f7fb;position:sticky;top:0}.ux-compare input{width:auto;margin-right:6px}.ux-timeline{display:flex;gap:6px;overflow:auto;list-style:none;padding:0;margin:16px 0 22px;counter-reset:step}.ux-timeline li{white-space:nowrap;padding:7px 10px;background:#f1f4f8;color:#71819a;border-radius:6px;font-size:11px}.ux-timeline li.is-done{background:#e6f1ec;color:#33745b}.ux-timeline li.is-current{background:#e9efff;color:#245de2;font-weight:700}.ux-deadline{display:inline-block;border-radius:6px;background:#fff3d4;color:#865c00;padding:6px 9px;margin:6px 0;font-size:12px}.ux-deadline.is-overdue{background:#fee8ea;color:#b62f44}.ux-source-compare{margin:16px 0;padding:14px;border:1px solid #d6e0ef;border-radius:10px}.ux-source-compare>div{display:grid;grid-template-columns:1fr 1fr;gap:20px}.ux-source-compare section{min-width:0}.ux-source-compare pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;line-height:1.7}.ux-source-compare summary{cursor:pointer;font-weight:600}.ux-cover-choices{display:flex;gap:8px;overflow:auto;padding:10px 0}.ux-cover-choice{flex:0 0 100px;padding:5px;background:white;border:1px solid #cdd9ed;border-radius:8px;cursor:pointer}.ux-cover-choice img{width:90px;height:65px;object-fit:cover;border-radius:4px}.ux-cover-choice span{font-size:11px;display:block;padding:4px}.ux-media-viewer{position:absolute;inset:8px;background:#fff;z-index:30;display:flex;flex-direction:column;border:1px solid #ccd7e9;border-radius:12px;box-shadow:0 10px 50px #1c2f4c30;overflow:hidden}.ux-media-viewer>header,.ux-media-viewer>footer{display:flex;gap:10px;align-items:center;justify-content:space-between;padding:12px;background:#f5f7fb;flex-wrap:wrap}.ux-media-viewer>header strong{min-width:0;overflow-wrap:anywhere;flex:1}.ux-media-content{flex:1;min-height:250px;min-width:0;background:#e8edf4;display:grid;place-items:center;overflow:auto}.ux-media-content img,.ux-media-content video{max-width:100%;max-height:65vh;object-fit:contain}.ux-media-content iframe{width:100%;height:100%;min-height:55vh;border:0}.vehicle-workspace,.deal-workspace-dialog,.chat-conversation{position:relative}.ux-connection{position:fixed;bottom:16px;left:50%;transform:translateX(-50%);z-index:1000;max-width:90vw;background:#fff3d4;color:#745100;border:1px solid #e7c968;border-radius:10px;box-shadow:0 4px 20px #20324720;padding:12px 16px;display:flex;align-items:center;gap:12px}.ux-upload-row{display:flex;align-items:center;gap:8px;border-bottom:1px solid #e4eaf3;padding:9px 0;font-size:12px}.ux-upload-row>span{flex:1;min-width:0;overflow-wrap:anywhere}.ux-upload-row small{display:block;color:#72839b;margin-top:4px}.ux-upload-row progress{width:80px;height:7px}.ux-upload-row button{padding:6px!important;font-size:11px!important}.ux-upload-jobs{position:fixed;right:18px;bottom:18px;z-index:80;max-width:460px;width:calc(100vw - 36px);max-height:45vh;overflow:auto;background:white;border:1px solid #ccd8eb;border-radius:12px;box-shadow:0 8px 30px #20324726;padding:14px}.ux-upload-jobs summary{cursor:pointer;font-weight:600}.ux-upload-jobs section{margin-top:12px}.ux-chat-request-group{border-bottom:1px solid #e2e8f1}.ux-chat-request-heading{display:flex;align-items:center}.ux-chat-expand{width:30px;align-self:stretch;border:0;background:transparent;color:#61718b;font-size:23px;cursor:pointer}.ux-request-thread{flex:1;min-width:0}.ux-chat-car-children{margin-left:20px;border-left:2px solid #e2e8f1}.ux-chat-car-children[hidden]{display:none}.ux-chat-car-row{position:relative}.ux-chat-car-row .chat-thread{width:100%}.ux-chat-car-row:has(.ux-internal-thread) .chat-thread{padding-bottom:28px}.ux-internal-thread{position:absolute;right:10px;bottom:5px;background:#f1f3f7;color:#67768c;border:1px solid #dce3ed;border-radius:5px;font-size:10px;padding:2px 6px;cursor:pointer}.chat-avatar img{width:100%;height:100%;object-fit:cover;border-radius:inherit}.ux-needs-reply{display:flex;gap:7px;align-items:center;font-size:12px}.ux-needs-reply input{width:auto!important;min-height:0!important}.ux-chat-pins{max-height:110px;overflow:auto;flex-shrink:0}.ux-chat-pins:empty{display:none}.ux-chat-pins button{display:block;width:100%;text-align:left;background:#eff4ff;border:0;border-bottom:1px solid #d7e2fb;color:#345887;padding:9px 16px;cursor:pointer}.ux-chat-controls{padding:8px 14px;border-bottom:1px solid #e1e7ef;margin:0;font-size:12px}.ux-chat-controls select{max-width:150px}.ux-chat-quick{display:flex;gap:6px;flex-wrap:wrap;margin:6px 0}.ux-chat-quick button{padding:7px 10px!important;font-size:12px!important}.ux-unread-marker{text-align:center;background:#eaf0ff;color:#3263ce;padding:7px;border-radius:6px;font-size:12px;margin:12px 0}.ux-finance-summary{padding:14px;background:#f4f7fb;border:1px solid #dce4f0;border-radius:10px;margin:12px 0}.ux-finance-summary p{margin:7px 0}.ux-finance-summary table{width:100%;font-size:12px;border-collapse:collapse}.ux-finance-summary td,.ux-finance-summary th{padding:8px;text-align:left;border-bottom:1px solid #dce4ef}.ux-discuss-field{border:0;background:transparent;color:#6c83ac;font-size:11px;cursor:pointer;padding:4px 0}.ux-bulk-toolbar input{min-width:200px}.ux-bulk-form label{display:block;margin:12px 0}.ux-bulk-form select{display:block;width:100%;max-width:400px;margin-top:5px}.ux-buyer-autosave{font-size:12px;color:#687c99}
@media(max-width:760px){.ux-source-compare>div{grid-template-columns:1fr}.ux-home-list article{align-items:flex-start;flex-direction:column}.ux-media-viewer{inset:0}.ux-media-viewer>footer{gap:5px}.ux-connection{flex-direction:column;width:90vw}.ux-timeline{margin:12px 0}.ux-chat-controls{gap:5px}.ux-chat-controls button{font-size:11px;padding:7px}.ux-upload-row progress{width:45px}.ux-home-controls button{font-size:12px}}
.ux-invoice-summary{padding:14px;background:#f5f8fc;border:1px solid #dce4f0;border-radius:10px;margin:12px 0}.ux-payment-totals{display:flex;gap:16px;flex-wrap:wrap}.ux-rejected-payment{color:#b2384b}.ux-checklist li{margin:6px 0}.ux-checklist p{color:#71839c;font-size:12px}
.ux-chat-controls select{font:inherit;border:1px solid #cbd8ef;background:white;border-radius:8px;padding:8px;color:#284c84}.chat-search .ux-needs-reply{margin:0}.ux-chat-upload-list:empty{display:none}
/* Messenger hierarchy: request containers, general discussion and car conversations. */
.chat-workspace{grid-template-columns:350px minmax(0,1fr)}
.chat-sidebar{background:#f5f7fb}.chat-thread-list{padding:10px}
.ux-chat-request-group{margin-bottom:12px;border:1px solid #d9e1ec;border-radius:12px;background:#fff;overflow:hidden;box-shadow:0 2px 5px #24334804}
.ux-chat-request-group.has-active-chat{border-color:#aabedf}
.ux-chat-request-heading{background:#edf1f7;min-height:82px;padding:8px 10px 8px 3px;gap:4px}
.ux-chat-expand{width:28px;flex:none;border-radius:6px;color:#556c89;font-size:24px}
.ux-chat-expand:hover{background:#dfe7f2}
.ux-request-thread{border:0;background:transparent;text-align:left;display:flex;flex-direction:column;gap:4px;color:#243348;padding:4px 0;min-width:0;cursor:pointer;flex:1}
.ux-request-number{font-size:10px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:#586f8c}
.ux-request-thread>strong{font-size:14px;font-weight:700;line-height:1.4;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;max-width:100%}
.ux-request-thread>small{font-size:10px;color:#6e819b}
.ux-chat-request-heading>.chat-count{align-self:flex-start;margin-top:6px}
.ux-chat-car-children{margin:0;padding:8px;border:0;background:#fff}
.ux-chat-general-row{position:relative;background:#f5f8fd;border:1px solid #e0e8f3;border-radius:8px;margin-bottom:12px;overflow:hidden}
.ux-chat-general-row:has(.ux-internal-thread) .ux-chat-general{padding-bottom:28px}
.ux-chat-general{border:0;padding:10px;min-height:62px;border-left:3px solid transparent}
.ux-chat-general .chat-avatar{width:32px;height:32px;border-radius:8px;background:#e4ebf8;color:#4c6e9d}
.ux-chat-general .chat-thread-text strong{font-size:12px}
.ux-car-list-caption{display:flex;gap:6px;align-items:center;font-size:9px;letter-spacing:.08em;text-transform:uppercase;color:#8493a7;font-weight:700;padding:0 8px 6px}
.ux-car-list-caption span{background:#edf1f6;padding:2px 5px;border-radius:4px;letter-spacing:0}
.ux-chat-car-row{border:1px solid transparent;border-radius:8px;overflow:hidden;margin:3px 0;background:white}
.ux-chat-car-row .chat-thread{border:0;border-left:3px solid transparent;padding:11px 8px;gap:10px;min-height:90px}
.ux-chat-car-row .chat-avatar{width:48px;height:48px;border-radius:8px;background:#edf1f7;outline:1px solid #00000012;outline-offset:-1px}
.ux-chat-car-row .chat-thread-text{flex:1;gap:4px}
.ux-chat-car-row .chat-thread-text strong{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;white-space:normal;line-height:1.4;font-size:12px;max-height:34px}
.ux-chat-car-row .chat-thread-text small{font-size:10px;color:#586e88;font-variant-numeric:tabular-nums}
.ux-chat-car-row .chat-thread-text>span,.ux-chat-general .chat-thread-text>span{font-size:10px;max-width:100%;color:#7b8da5}
.ux-chat-car-row .chat-thread.is-active,.ux-chat-general.is-active{background:#eaf1fc;border-left-color:#3265cf}
.ux-chat-car-row:has(.is-active){border-color:#c6d7ef}
.ux-chat-car-row .chat-thread:hover,.ux-chat-general:hover{background:#f1f5fc}
.ux-chat-car-row .chat-thread.is-active:hover,.ux-chat-general.is-active:hover{background:#eaf1fc}
.ux-chat-no-cars{font-size:11px;color:#8b99ac;padding:4px 10px 8px}
.ux-internal-thread{right:8px;bottom:5px;padding:3px 7px;font-size:9px}
.chat-conversation-head{box-shadow:0 2px 5px #20304404;z-index:1}
.chat-conversation-head>.chat-avatar{border-radius:9px;width:44px;height:44px}
.chat-conversation[data-chat-kind=request] .chat-conversation-head>.chat-avatar{background:#e4ebf8;color:#486994}
.chat-message{box-shadow:0 1px 2px #20304404}.chat-system{background:#e6edf5;border-radius:8px;padding:5px 12px}
@media(min-width:701px) and (max-width:1100px){.chat-workspace{grid-template-columns:300px minmax(0,1fr)}.chat-conversation-head{flex-wrap:wrap}.chat-conversation-head>div{flex:1;min-width:150px}.chat-conversation-head>[data-open-card]{margin-left:54px}.chat-conversation-head>[data-other-chat]{margin-left:0}}
@media(max-width:700px){.chat-workspace{grid-template-columns:none}.chat-thread-list{padding:10px}.chat-conversation-head>.chat-avatar{width:38px;height:38px}.chat-conversation-head strong{font-size:13px}.chat-conversation-head small{font-size:10px}.ux-chat-request-heading{min-height:76px}.ux-chat-car-row .chat-thread{min-height:84px}.chat-system{max-width:95%;font-size:10px}.chat-message p{font-size:13px}}
.ux-internal-thread.is-active{background:#fff0c5;border-color:#d1af55;color:#795814;font-weight:700}.ux-chat-car-row:has(.ux-internal-thread.is-active){border-color:#ddc47e;background:#fffaf0}.ux-chat-car-row:has(.ux-internal-thread.is-active)>.chat-thread{background:#fffaf0}
/* Request filters use the same sizing and focus treatment as CRM inputs. */
.ux-request-filterbar{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap;padding:0;margin:0 0 20px}
.ux-request-filterbar .request-filter-field{display:flex;flex-direction:column;gap:7px;min-width:200px;margin:0;color:#6d819d;font-size:12px}
.ux-request-filterbar .request-filter-field[hidden]{display:none}
.request-filter-field>span{font-size:11px;font-weight:500;color:#7a8da7}
.ux-request-filterbar select{appearance:none;-webkit-appearance:none;box-sizing:border-box;width:100%;height:44px;min-height:44px;padding:0 38px 0 14px;border:1px solid #cbd8ed;border-radius:9px;background-color:#fff;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23778ba8' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;color:#344d70;font:inherit;font-size:13px;cursor:pointer;line-height:1.4}
.ux-request-filterbar select:hover{border-color:#9eb9df}.ux-request-filterbar select:focus-visible{outline:2px solid #b3ccf3;outline-offset:2px;border-color:#739bd6}
.ux-request-filterbar .request-filter-reset{height:44px;min-height:44px;margin:0;padding:0 15px;color:#7085a4;font-size:12px;background:#fff}
@media(max-width:650px){.ux-request-filterbar{gap:10px}.ux-request-filterbar .request-filter-field{flex:1;min-width:min(200px,100%)}.ux-request-filterbar .request-filter-reset{height:44px;min-height:44px}}
.chat-toast-stack{position:fixed;right:22px;bottom:22px;z-index:20000;display:flex;flex-direction:column;gap:10px;width:350px;max-width:calc(100vw - 24px);pointer-events:none;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif}
.chat-toast{position:relative;background:#fff;border:1px solid #d9e2ed;border-radius:12px;box-shadow:0 5px 24px #20304424;pointer-events:auto;overflow:hidden;animation:chat-toast-enter 160ms ease-out}
.chat-toast-open{display:flex;align-items:flex-start;gap:11px;width:100%;padding:16px 30px 16px 14px;border:0;background:none;text-align:left;color:#243348;cursor:pointer;font:inherit}
.chat-toast-avatar{display:grid;place-items:center;width:44px;height:44px;flex:none;background:#dfeafa;color:#507da8;border-radius:50%;font-size:16px;font-weight:600;overflow:hidden}.chat-toast-avatar img{width:100%;height:100%;object-fit:cover}
.chat-toast-content{display:flex;flex-direction:column;gap:4px;min-width:0}.chat-toast-content strong{font-size:13px;line-height:1.3}.chat-toast-content small{color:#7f92ab;font-size:10px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.chat-toast-content>span{font-size:12px;line-height:1.5;color:#536a85;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.chat-toast-close{position:absolute;right:5px;top:4px;width:28px;height:28px;border:0;border-radius:50%;background:transparent;color:#8a9db3;font-size:18px;cursor:pointer}.chat-toast-close:hover{background:#eff3f8;color:#4e6f95}.chat-toast-open:hover{background:#f8fbff}
@keyframes chat-toast-enter{from{opacity:0;transform:translateX(16px)}to{opacity:1;transform:translateX(0)}}
@media(max-width:650px){.chat-toast-stack{right:12px;bottom:12px;width:330px}}
@media(prefers-reduced-motion:reduce){.chat-toast{animation:none}}

.ux-request-filterbar[hidden]{display:none}.request-filter-wrap{margin:0 0 18px}.request-filter-toggle{height:34px;min-height:34px;padding:0 9px;display:inline-flex;align-items:center;gap:6px}.request-filter-toggle.is-active{background:#eaf1ff;color:#2862dd;border-color:#a9c5f5}.filter-active-count:empty{display:none}.request-filter-wrap .ux-request-filterbar{margin:12px 0 0}

.deal-documents{grid-template-columns:repeat(auto-fill,minmax(175px,1fr));align-items:start}.deal-documents>.deal-empty{grid-column:1/-1}.document-preview-card{min-width:0}.deal-document.document-preview-card,.chat-message .chat-document.document-preview-card{display:flex;flex-direction:column;align-items:stretch;gap:10px;padding:10px;max-width:260px}.deal-document.document-preview-card>span:last-child{display:grid;gap:5px;min-width:0}.file-thumbnail{position:relative;display:block;width:100%;height:150px;min-height:150px;background:#f2f5fa;border:1px solid #dde5ef;border-radius:7px;overflow:hidden}.file-thumbnail img,.file-thumbnail iframe,.file-thumbnail video{display:block;width:100%;height:100%;object-fit:contain;border:0;pointer-events:none}.file-thumbnail-open{position:absolute;right:6px;bottom:6px;display:block;padding:4px 6px;background:#ffffffed;border:1px solid #d9e3ef;border-radius:5px;color:#426b9f;font-size:10px;line-height:14px}.file-extension{display:grid;place-items:center;height:100%;font-size:23px;font-weight:600;color:#7189ac}.deal-document-info{overflow-wrap:anywhere}.chat-message .chat-document.document-preview-card{width:200px}.chat-message .chat-document.document-preview-card .file-thumbnail{height:130px;min-height:130px}@media(max-width:450px){.deal-documents{grid-template-columns:repeat(2,minmax(0,1fr))}.file-thumbnail{height:125px;min-height:125px}.deal-document.document-preview-card{padding:8px}}
