/* SIU CRM v10 — chat palette and unread emphasis from the supplied reference. No remote assets. */
:root{--ink:#1e293b;--muted:#64748b;--line:#e2e8f0;--blue:#2563eb;--rail:#172a3a;--surface:#f5f7fb}
body.crm-app,body.crm-workspace{font-family:"Segoe UI Variable","Segoe UI",system-ui,-apple-system,BlinkMacSystemFont,Arial,sans-serif;font-size:15px;line-height:1.5;color:var(--ink)}
.crm-app button,.crm-app input,.crm-app select,.crm-app textarea{font-family:inherit;letter-spacing:normal}
.crm-app button,.crm-app .primary{border-radius:9px;font-weight:600}.crm-app .primary:hover{background:#1d4ed8}
.crm-app aside h2{letter-spacing:.6px}.crm-app aside nav a{font-size:12px;font-weight:500;gap:7px}.crm-app aside nav a.on{background:#28475f;box-shadow:inset 3px 0 #7bbcff}.crm-app .brand-symbol{background:#edf5ff;color:#234369}
.crm-workspace .conversation-workspace{background:#f5f7fb;position:relative}
.crm-workspace .conversation-workspace.with-inbox{grid-template-columns:290px 330px minmax(0,1fr)}
.crm-workspace .conversation-workspace.single-record{grid-template-columns:350px minmax(0,1fr)}
.crm-workspace .inbox-panel,.crm-workspace .record-panel{box-shadow:none;border-color:var(--line)}
.crm-workspace .inbox-heading{padding:24px 20px 18px}.crm-workspace .ws-eyebrow{font-size:10px;letter-spacing:1.4px;color:#7b889b}.crm-workspace .inbox-heading h1{font-size:26px;letter-spacing:-.7px;margin-top:7px;color:#172a3a}.crm-workspace .inbox-heading h1 span{background:#edf2f8;color:#52647d;padding:3px 8px;font-size:12px;font-weight:600}
.crm-workspace .inbox-search{margin:0 16px 14px}.crm-workspace .inbox-search input{font-size:14px;background:#f7f9fc;border-color:#e4eaf2;border-radius:10px;min-height:42px}.crm-workspace .inbox-filters{padding:0 16px 18px;gap:5px;flex-wrap:wrap}.crm-workspace .inbox-filters button{font-size:12px;min-height:32px;padding:6px 9px;border:0;background:#f3f6fa;color:#5b6b80;border-radius:7px}.crm-workspace .inbox-filters button.selected{background:#e8efff;color:#2456b8}.crm-workspace .inbox-caption{font-size:10px;letter-spacing:1px;background:#fff;color:#7b889b;padding:12px 18px}
.crm-workspace .thread-item{padding:17px 15px;gap:11px;border-bottom:1px solid #f0f3f7;align-items:flex-start}.crm-workspace .thread-item.active{background:#edf3ff;box-shadow:inset 3px 0 #3478ed}.crm-workspace .thread-item:hover{background:#f4f7fd}.crm-workspace .thread-item .contact-avatar{width:38px;height:38px;font-size:15px;margin-top:2px}.crm-workspace .thread-title{font-size:14px;letter-spacing:-.15px;font-weight:650;color:#25364c}.crm-workspace .thread-client{font-size:12px;color:#64748b}.crm-workspace .thread-preview{font-size:13px;color:#66758b;margin-top:2px}.crm-workspace .thread-meta{display:flex;flex-direction:column;align-items:flex-end;gap:5px;max-width:52px;font-size:11px;color:#7b889b;white-space:nowrap}.crm-workspace .thread-stage{display:none}.crm-workspace .unread-dot{font-size:13px;color:#2d73eb}.crm-workspace .inbox-bottom{font-size:11px;color:#7b889b;background:#fafbfd;padding:13px 16px}
.crm-workspace .record-heading{background:#fff;color:#1e293b;padding:22px 20px 0}.crm-workspace .record-topline{margin-bottom:17px}.crm-workspace .record-back,.crm-workspace .record-switch{color:#6a7c91}.crm-workspace .record-heading h1{font-size:22px;letter-spacing:-.6px;font-weight:650;margin-bottom:9px}.crm-workspace .record-subtitle{color:#7b889b}.crm-workspace .record-badge{color:#57708a;background:#f5f7fb;border-color:#e3eaf2;font-size:10px;padding:2px 6px}.crm-workspace .record-pipeline{margin-top:20px;color:#7b889b;font-size:12px}.crm-workspace .stage-picker-toggle{color:#23587d;background:#edf5fa;border:1px solid #deebf3;border-radius:8px;padding:9px 11px;font-size:14px;font-weight:600}.crm-workspace .stage-picker-toggle:hover{background:#e2eff8}.crm-workspace .stage-progress{margin-top:12px;padding-bottom:16px}.crm-workspace .stage-progress span{background:#e5ebf2}.crm-workspace .stage-progress span.reached{background:#80b6da}.crm-workspace .stage-progress span.current{background:#3478ed}
.crm-workspace .configure-card{background:#fff;color:#718198;text-align:right;font-size:11px;padding:0 20px 12px}.crm-workspace .record-panel>.archive-record{font-size:11px}.crm-workspace .record-tabs{background:#fff;border-color:#e8edf4;padding:0 20px;gap:20px}.crm-workspace .record-tabs button{color:#7b889b;font-size:13px;padding:12px 0;min-height:43px}.crm-workspace .record-tabs button.selected{color:#2563eb;border-bottom-color:#2563eb}.crm-workspace .record-scroll{padding:14px 18px}.crm-workspace .record-field{grid-template-columns:96px minmax(0,1fr);min-height:54px;font-size:12px;gap:9px;padding:7px 0}.crm-workspace .record-field>span:first-child{color:#718198;font-weight:400}.crm-workspace .record-field input,.crm-workspace .record-field select{font-size:13px;font-weight:400;border:1px solid #e3e9f1;border-radius:7px;min-height:38px;padding:8px;background:#fcfdff;color:#334155}.crm-workspace .record-field input:focus,.crm-workspace .record-field select:focus{border-color:#88aff6;outline:2px solid #e5eeff}.crm-workspace .record-divider{color:#8a96a7;font-size:10px;letter-spacing:1.1px;margin-top:22px}.crm-workspace .record-save{padding:13px 16px;border-color:#e8edf4}.crm-workspace .record-save>span{font-size:11px;color:#7b889b}.crm-workspace .record-save button{font-size:13px;min-height:37px;padding:9px 15px}
.crm-workspace .conversation-panel{background:#f5f7fb;overflow:hidden}.crm-workspace .conversation-top{height:78px;padding:0 24px;border-color:#e5ebf3;gap:12px}.crm-workspace .conversation-top strong{font-size:16px;color:#26374d;font-weight:650;letter-spacing:-.2px}.crm-workspace .conversation-top small{font-size:12px;color:#8290a3;margin-top:3px}.crm-workspace .conversation-tools{gap:7px}.crm-workspace .conversation-top .outline-button{font-size:12px;border:1px solid #e4eaf2;color:#576b85;border-radius:8px;padding:8px 10px;min-height:35px}.crm-workspace .conversation-top .outline-button svg{width:16px;height:16px}.crm-workspace .conversation-top .communication-call button:disabled{display:none}.crm-workspace .thread-actions{background:#fff;border-bottom:1px solid #e9eef5;padding:0 24px;max-height:112px;overflow:auto}.crm-workspace .thread-actions:empty{display:none}.crm-workspace .thread-actions form{display:flex;align-items:center;justify-content:flex-end;gap:7px;padding:9px 0;flex-wrap:wrap;margin:0}.crm-workspace .thread-actions form>span{flex:1;font-size:12px;color:#65778e;min-width:150px}.crm-workspace .thread-actions button{font-size:11px;min-height:28px;padding:5px 8px;background:#f2f6fa;color:#5b728c;border-radius:6px}
.crm-workspace .history-toolbar{padding:12px 24px;border:0;min-height:52px;gap:10px}.history-heading{display:flex;align-items:center;gap:14px;flex-wrap:wrap}.history-heading>.selected{font-size:13px;font-weight:600;color:#64748b}.chat-sync-status{font-size:11px;color:#7c8b9e;display:inline-flex;gap:6px;align-items:center}.chat-sync-status::before{content:"";display:inline-block;width:6px;height:6px;border-radius:50%;background:#b6c1cf}.chat-sync-status[data-state=online]::before{background:#37a47e}.chat-sync-status[data-state=offline]{color:#9d642c}.chat-sync-status[data-state=offline]::before{background:#d09b41}.crm-workspace .history-toolbar input{font-size:12px;color:#64748b}.crm-workspace .conversation-timeline{padding:14px 26px 20px;scroll-behavior:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#ccd6e2 transparent}.crm-workspace .timeline-day{font-size:11px;color:#8190a4;background:#edf1f6;border:0;border-radius:6px;padding:4px 10px;margin:8px auto 22px}.crm-workspace .timeline-event{color:#8795a8;font-size:12px;margin-bottom:24px}.crm-workspace .timeline-event strong{color:#6b7f96}.crm-workspace .timeline-event small{color:#8795a8}
.crm-workspace .message-bubble,.crm-workspace .note-bubble{width:fit-content;min-width:155px;max-width:82%;padding:13px 16px;margin:12px 0;border-radius:14px 14px 14px 4px;border:1px solid #e3e9f2;background:#fff;box-shadow:0 2px 3px #233a5a03;overflow-wrap:anywhere}.crm-workspace .message-bubble.own{margin-left:auto;border-radius:14px 14px 4px 14px;background:#e9f1ff;border-color:#d9e6fc}.crm-workspace .message-bubble strong{font-size:12px;color:#415876;font-weight:600}.crm-workspace .message-bubble>small{font-size:11px;color:#8391a5}.crm-workspace .message-bubble p{font-size:15px;line-height:1.6;color:#26374d;margin:7px 0 9px;white-space:pre-wrap}.crm-workspace .message-bubble time{display:block;text-align:right;font-size:11px;color:#7186a1}.crm-workspace .note-bubble{background:#fffaf0;border-color:#ede3c9;max-width:88%}.crm-workspace .note-bubble.own{margin-left:auto}.crm-workspace .note-bubble p{font-size:15px;line-height:1.6}.crm-workspace .note-meta{font-size:11px}.crm-workspace .note-bubble time{font-size:11px}
.new-messages-bar{position:relative;height:0;z-index:5;flex-shrink:0;display:flex;justify-content:center}.new-messages-bar button{position:absolute;bottom:12px;border:1px solid #ceddf4;border-radius:20px;background:#fff;color:#2563eb;font-size:12px;min-height:34px;padding:7px 16px;box-shadow:0 4px 16px #253e6818}.new-messages-bar button:hover{background:#edf3ff}
.crm-workspace .composer-wrap{background:#fff;border-top:1px solid #e2e8f0;padding:10px 22px 18px;flex-shrink:0}.crm-workspace .composer-top{padding:0 0 8px;border:0;color:#94a0b0;min-height:30px}.crm-workspace .composer-top select{font-size:13px;font-weight:600;color:#334a68;background:#f3f6fb;padding:5px 9px;border-radius:6px;min-height:30px;max-width:230px}.crm-workspace .composer-top>span{font-size:11px;color:#8a97a8}.crm-workspace .message-composer{padding:0}.crm-workspace .message-composer>label{display:flex;align-items:center;gap:10px;font-size:11px;color:#8391a5;margin:0 0 9px}.crm-workspace .message-composer select{margin:0;flex:1;min-width:0;border:0;min-height:30px;font-size:12px;padding:4px 6px;background:#fff;color:#436686}.crm-workspace .message-composer textarea,.crm-workspace .note-composer textarea{resize:vertical;font-size:15px;line-height:1.6;min-height:86px;max-height:180px;padding:12px 14px;border:1px solid #e0e7f0;border-radius:10px;background:#fbfcfe;color:#26374d;display:block}.crm-workspace .message-composer textarea:focus{outline:2px solid #e4edff;border-color:#99b9ee;background:#fff}.crm-workspace .message-composer textarea::placeholder,.crm-workspace .note-composer textarea::placeholder{color:#94a0b1}.crm-workspace .message-footer{margin-top:10px;gap:12px}.crm-workspace .message-footer small{font-size:11px;color:#8090a5;line-height:1.4;overflow-wrap:anywhere}.crm-workspace .message-footer button{display:flex;align-items:center;gap:7px;font-size:13px;min-height:38px;padding:9px 17px;white-space:nowrap}.crm-workspace .message-footer button svg{width:16px;height:16px}.crm-workspace .note-composer{border:0;box-shadow:none;background:transparent}.crm-workspace .note-composer textarea{background:#fffdf7;border-color:#ede3c9}.crm-workspace .composer-notice{font-size:11px;margin:2px 0 9px;color:#997a3a}.crm-workspace .composer-bottom{padding:10px 0 0}.crm-workspace .composer-bottom button{font-size:13px}.crm-workspace .composer-bottom>span{color:#8a97a8;font-size:11px}.crm-workspace .channel-panel{border-color:#e0e8f2;border-radius:12px;box-shadow:0 12px 36px #243b5920}.crm-workspace .record-toggle,.crm-workspace .record-close,.crm-workspace .chat-list-back{display:none}
@media(min-width:1650px){.crm-workspace .conversation-workspace.with-inbox{grid-template-columns:315px 350px minmax(0,1fr)}.crm-workspace .record-field{grid-template-columns:104px minmax(0,1fr)}.crm-workspace .message-bubble{max-width:75%}}
@media(max-width:1250px){.crm-workspace .conversation-workspace.with-inbox{grid-template-columns:270px minmax(0,1fr)}.crm-workspace .conversation-workspace.single-record{grid-template-columns:minmax(0,1fr)}.crm-workspace .record-panel{display:none}.crm-workspace .record-toggle{display:inline-flex}.crm-workspace .record-close{display:inline-flex}.crm-workspace .record-visible .record-panel{display:flex;position:absolute;inset:0 0 0 auto;z-index:25;width:min(370px,100%);height:100%;min-height:0;box-shadow:-14px 0 40px #1d355d20;border-left:1px solid #dbe4ef}.crm-workspace .record-visible .record-panel .record-switch{display:none}.crm-workspace .conversation-top small{display:block}.crm-workspace .conversation-top .contact-avatar{display:flex}.crm-workspace .history-heading{gap:10px}}
@media(max-width:950px){.crm-app.crm-workspace main{height:100dvh;min-height:0;overflow:hidden;padding:0}.crm-workspace .conversation-workspace.with-inbox{display:grid;grid-template-columns:245px minmax(0,1fr);overflow:hidden}.crm-workspace .conversation-workspace.single-record{display:grid;grid-template-columns:minmax(0,1fr);overflow:hidden}.crm-workspace .inbox-panel{height:auto;min-height:0}.crm-workspace .conversation-panel{height:auto;min-height:0}.crm-workspace .conversation-top{height:70px;padding:0 16px}.crm-workspace .conversation-top .contact-avatar{display:none}.crm-workspace .conversation-top .outline-button{padding:7px 8px}.crm-workspace .conversation-tools{gap:4px}.crm-workspace .history-toolbar{padding:10px 16px}.crm-workspace .history-heading>.selected{display:none}.crm-workspace .history-toolbar label{max-width:145px}.crm-workspace .conversation-timeline{padding:14px 18px 18px}.crm-workspace .thread-actions{padding:0 16px}.crm-workspace .composer-wrap{padding:10px 16px 15px}.crm-workspace .message-bubble{max-width:90%}}
@media(max-width:760px){.crm-app.crm-workspace aside{width:64px;padding:16px 4px}.crm-app.crm-workspace aside nav a{font-size:10px;padding:10px 0}.crm-app.crm-workspace aside h2{font-size:10px}.crm-app.crm-workspace main{margin-left:64px}.crm-workspace .conversation-workspace.with-inbox{grid-template-columns:minmax(0,1fr)}.crm-workspace .with-inbox[data-record]:not([data-record="0"]) .inbox-panel{display:none}.crm-workspace .with-inbox[data-record="0"] .workspace-empty{display:none}.crm-workspace .with-inbox .chat-list-back{display:inline-flex;font-size:12px;color:#52708e}.crm-workspace .conversation-top{height:auto;min-height:68px;flex-wrap:wrap;padding:10px 12px;gap:7px}.crm-workspace .conversation-top strong{font-size:14px}.crm-workspace .conversation-top small{display:none}.crm-workspace .conversation-tools{margin-left:auto}.crm-workspace .conversation-tools [data-channels-toggle]{display:none}.crm-workspace .conversation-timeline{padding:10px 12px 16px}.crm-workspace .message-bubble{max-width:94%;min-width:0;padding:11px 13px}.crm-workspace .message-bubble>small{display:block;font-size:10px;margin-top:3px}.crm-workspace .message-bubble p{font-size:15px}.crm-workspace .thread-actions{padding:0 12px}.crm-workspace .thread-actions form>span{font-size:11px;min-width:100px}.crm-workspace .history-toolbar{padding:8px 12px;flex-wrap:wrap;gap:4px;min-height:42px}.crm-workspace .chat-sync-status{font-size:10px}.crm-workspace .history-toolbar label{max-width:140px}.crm-workspace .composer-wrap{padding:9px 12px 12px}.crm-workspace .message-composer>label{display:block;font-size:10px;margin-bottom:5px}.crm-workspace .message-composer select{font-size:12px;min-height:29px;padding-left:0}.crm-workspace .message-footer small{max-width:60%;font-size:10px}.crm-workspace .message-footer button{padding:8px 12px;font-size:12px}.crm-workspace .composer-top select{font-size:12px}.crm-workspace .message-composer textarea{min-height:76px}.crm-workspace .record-visible .record-panel{width:100%}.crm-workspace .inbox-bottom{display:flex}}
@media(prefers-reduced-motion:reduce){.crm-workspace *{scroll-behavior:auto!important}}

.crm-workspace .conversation-contact{display:flex;align-items:center;gap:11px;min-width:0}.crm-workspace .record-panel>.archive-record-button{margin:0;padding:0 20px 10px;background:#fff}.crm-workspace .record-panel>.archive-record-button button{font-size:11px;color:#8896a8;min-height:25px}

/* Reference styling is scoped to chat/card workspaces. Live unread data remains server-owned. */
body.crm-app.crm-workspace{font-family:"Segoe UI",Tahoma,Arial,sans-serif;font-weight:500;color:#293943}
.crm-workspace .conversation-workspace,.crm-workspace .conversation-panel{background:#f3f3f3}
.crm-workspace .inbox-caption{background:#f3f4f5;color:#42545f;font-weight:700}
.crm-workspace .inbox-filters button{font-weight:600;color:#42545f;background:#f1f4f6}
.crm-workspace .inbox-filters button.selected{background:#dcecf7;color:#14577f}
.crm-workspace .thread-item{background:#eef6fc;border-bottom-color:#dbe7ef;padding:14px 15px}
.crm-workspace .thread-item:hover{background:#dfedf8}
.crm-workspace .thread-title{color:#374550;font-weight:650;font-size:14px}
.crm-workspace .thread-client{color:#596a77;font-weight:500;font-size:12px}
.crm-workspace .thread-preview{color:#60707d;font-weight:500;font-size:14px;line-height:1.4;white-space:normal;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.crm-workspace .thread-meta{color:#526776;font-weight:500;font-size:12px;max-width:55px}
.crm-workspace .thread-item[data-unread="1"]{background:#cee3f2;box-shadow:inset 4px 0 #1e6599}
.crm-workspace .thread-item[data-unread="1"]:hover{background:#c2dced}
.crm-workspace .thread-item[data-unread="1"] .thread-title{color:#142b3c;font-weight:800}
.crm-workspace .thread-item[data-unread="1"] .thread-client,.crm-workspace .thread-item[data-unread="1"] .thread-preview,.crm-workspace .thread-item[data-unread="1"] .thread-meta{color:#203d52;font-weight:700}
.crm-workspace .unread-dot{color:#11649c;font-size:14px;line-height:20px;width:20px;height:20px;text-align:center;border-radius:50%;background:#fff;box-shadow:0 0 0 1px #b6d0e1}
.crm-workspace .thread-item.active{background:#4386e4;box-shadow:inset 4px 0 #296bc0}
.crm-workspace .thread-item.active:hover{background:#397bd5}
.crm-workspace .thread-item.active[data-unread="1"]{background:#2365ad;box-shadow:inset 4px 0 #123e6e}
.crm-workspace .thread-item.active[data-unread="1"]:hover{background:#1d5b9f}
.crm-workspace .thread-item.active .thread-title,.crm-workspace .thread-item.active .thread-client,.crm-workspace .thread-item.active .thread-preview,.crm-workspace .thread-item.active .thread-meta{color:#fff}
.crm-workspace .thread-item.active .thread-title{font-weight:750}
.crm-workspace .thread-item.active[data-unread="1"] .thread-title{font-weight:800}
.crm-workspace .thread-item.active .unread-dot{color:#fff;background:#124b7e;box-shadow:0 0 0 1px #9dc7ec}
.crm-workspace .record-heading{background:#203e4b;color:#fff;padding-top:18px}
.crm-workspace .record-heading h1{color:#fff;font-size:22px;font-weight:750}
.crm-workspace .record-back,.crm-workspace .record-switch,.crm-workspace .record-subtitle,.crm-workspace .record-pipeline{color:#d5e2e8;font-weight:500}
.crm-workspace .record-topline{margin-bottom:12px}
.crm-workspace .record-badge{color:#d7e7ed;background:transparent;border-color:#69828d}
.crm-workspace .record-pipeline{margin-top:14px}
.crm-workspace .stage-picker-toggle{color:#fff;background:transparent;border:0;border-radius:3px;padding:8px 0;font-weight:700}
.crm-workspace .stage-picker-toggle:hover{background:#2b4b5a}
.crm-workspace .stage-progress{padding-bottom:12px}
.crm-workspace .stage-progress span{background:#16323e}
.crm-workspace .stage-progress span.reached{background:#7397a8}
.crm-workspace .stage-progress span.current{background:#d0e5ec}
.crm-workspace .configure-card,.crm-workspace .record-panel>.archive-record-button{background:#203e4b;color:#d1e0e8}
.crm-workspace .record-panel>.archive-record-button button{color:#d1e0e8;font-weight:600}
.crm-workspace .record-tabs{background:#203e4b;border-color:#203e4b;gap:20px}
.crm-workspace .record-tabs button{color:#b5cbd6;font-weight:600;font-size:14px}
.crm-workspace .record-tabs button.selected{color:#fff;border-bottom-color:#fff;font-weight:750}
.crm-workspace .record-field>span:first-child{color:#566977;font-weight:500}
.crm-workspace .record-field input,.crm-workspace .record-field select{color:#263d4c;font-weight:500;font-size:14px}
.crm-workspace .record-divider,.crm-workspace .record-info{color:#526673}
.crm-workspace .conversation-top strong{color:#263d4c;font-weight:750}
.crm-workspace .conversation-top small,.crm-workspace .thread-actions form>span{color:#566b79;font-weight:500}
.crm-workspace .history-toolbar{background:#f3f3f3}
.crm-workspace .history-heading>.selected{color:#415762;font-weight:700}
.crm-workspace .chat-sync-status{color:#596c77;font-weight:500}
.crm-workspace .chat-sync-status[data-state=offline]{color:#8b571e}
.crm-workspace .timeline-day{background:#e7ebed;color:#4c616e;font-weight:600}
.crm-workspace .timeline-event,.crm-workspace .timeline-event small{color:#5c707c}
.crm-workspace .timeline-event strong{color:#3b5462;font-weight:650}
.crm-workspace .message-bubble{background:#fff;border:1px solid #d2d9de;border-radius:10px 10px 10px 2px;box-shadow:none;padding:11px 14px;margin:10px 0;max-width:min(82%,720px)}
.crm-workspace .message-bubble strong{font-size:12px;color:#3b5261;font-weight:650}
.crm-workspace .message-bubble>small{font-size:11px;color:#536b79;font-weight:500}
.crm-workspace .message-bubble p{font-size:15px;font-weight:500;line-height:1.5;color:#203746;margin:6px 0 8px}
.crm-workspace .message-bubble time{font-size:11px;font-weight:500;color:#526b7b}
.crm-workspace .message-bubble.own{background:#007da6;border-color:#007da6;border-radius:10px 10px 2px 10px;margin-left:auto}
.crm-workspace .message-bubble.own strong,.crm-workspace .message-bubble.own>small,.crm-workspace .message-bubble.own p,.crm-workspace .message-bubble.own time{color:#fff}
.crm-workspace .message-bubble.own strong{font-weight:700}
.crm-workspace .message-bubble.own p{font-weight:600}
.crm-workspace .note-bubble p{font-weight:500;color:#51462c}
.crm-workspace .composer-wrap{background:#f3f3f3;border-color:#d8dee2;padding:9px 18px 13px}
.crm-workspace .composer-top select{color:#1d526f;background:#e5edf2;font-weight:700;border-radius:4px}
.crm-workspace .message-composer>label{color:#536b79;font-size:12px;font-weight:500}
.crm-workspace .message-composer select{color:#24556f;font-weight:600;background:transparent;font-size:13px}
.crm-workspace .message-composer textarea,.crm-workspace .note-composer textarea{background:#fff;color:#233b4b;border-color:#c9d2d8;border-radius:5px;font-size:15px;font-weight:500;min-height:76px;line-height:1.5}
.crm-workspace .message-composer textarea::placeholder,.crm-workspace .note-composer textarea::placeholder{color:#70818d;font-weight:400}
.crm-workspace .message-footer small{color:#536a79;font-weight:500}
.crm-workspace .message-footer button,.crm-workspace .composer-bottom button{background:#007da6;color:#fff;border-radius:5px;font-weight:700}
.crm-workspace .message-footer button:hover,.crm-workspace .composer-bottom button:hover{background:#00698d}
@media(max-width:760px){.crm-workspace .message-bubble{max-width:94%;padding:10px 12px}.crm-workspace .composer-wrap{padding:9px 12px 12px}.crm-workspace .message-composer select{font-size:12px}.crm-workspace .thread-item{padding:14px 13px}}

/* v14: links, location cards and notification controls. */
.message-bubble p a,.note-bubble p a{color:#1763b9;text-decoration:underline;overflow-wrap:anywhere}.message-bubble.own p a{color:inherit;text-decoration:underline}
.chat-location{display:flex;gap:12px;max-width:340px;min-width:0;margin:10px 0 6px;padding:14px;border:1px solid #bad5cf;border-radius:12px;background:#f2faf6;color:#19473f!important;text-decoration:none!important;white-space:normal}.chat-location>span:last-child{display:grid;gap:5px;min-width:0}.chat-location strong,.chat-location span{overflow-wrap:anywhere}.chat-location small{color:#4d7067}.chat-location b{color:#146859;font-size:13px}.location-pin{font-size:30px}.location-unavailable{display:block;max-width:340px;color:#6c7789;white-space:normal}.notification-sound{font-size:12px;padding:8px 10px;white-space:nowrap;flex-shrink:0}.notification-sound[aria-pressed="true"]{background:#dcf3e6;color:#176547}.history-toolbar{flex-wrap:wrap}.header-account .notification-sound{margin-right:8px}
@media(max-width:600px){.history-toolbar{gap:8px}.history-toolbar>label{flex:1 1 150px}.chat-location{max-width:100%}.header-account{flex-wrap:wrap}.header-account .notification-sound{margin:0}.location-pin{font-size:24px}}
/* Leave a usable message history when the composer includes audio/templates. */
.crm-workspace .conversation-panel .composer-wrap{max-height:50dvh;overflow-y:auto;overscroll-behavior:contain}
@media(max-width:760px){.crm-workspace .conversation-panel .composer-wrap{max-height:40dvh!important}.crm-workspace .history-toolbar{padding-top:8px;padding-bottom:8px}}

.location-pin svg{width:28px;height:32px}.inbox-sound{padding:0 17px 12px}
@media(max-width:600px){.crm-app main>.app-header{flex-wrap:wrap}.header-account{min-width:0;max-width:100%}}

/* v16.1: slightly narrower chat rows, messages and notification blocks. */
.crm-workspace .message-bubble,.crm-workspace .note-bubble{min-width:140px;max-width:min(76%,620px);padding:8px 11px;margin-top:8px;margin-bottom:8px}
.crm-workspace .note-bubble{max-width:min(80%,640px)}
.crm-workspace .message-bubble p,.crm-workspace .note-bubble p{margin:4px 0 6px;line-height:1.45}
.crm-workspace .message-bubble>small{font-size:10px}
.crm-workspace .timeline-event{max-width:min(80%,640px);gap:8px;margin-bottom:16px}
.crm-workspace .timeline-event>div{min-width:0;overflow-wrap:anywhere}
.crm-workspace .timeline-day{margin-top:6px;margin-bottom:16px;padding:3px 8px}
.crm-workspace .new-messages-bar button{max-width:min(88%,360px);padding:6px 12px;line-height:1.35}
body.crm-app main>.notice,body.crm-app main>.error{max-width:960px;padding:10px 14px;margin-bottom:12px;line-height:1.45}
@media(min-width:901px){
 .crm-workspace .inbox-heading{padding:18px 16px 12px}.crm-workspace .inbox-caption{padding:8px 16px}
 .crm-workspace .thread-row .thread-item{padding:10px 38px 10px 12px;gap:9px}
 .crm-workspace .thread-item .contact-avatar{width:34px;height:34px;min-width:34px;font-size:14px}
 .crm-workspace .thread-preview{-webkit-line-clamp:1;font-size:13px;line-height:1.35}
 .crm-workspace .thread-meta{gap:3px}.crm-workspace .thread-row>.crm-favorite{top:7px;right:5px}
 .crm-workspace .conversation-top{height:68px}.crm-workspace .history-toolbar{min-height:44px;padding-top:8px;padding-bottom:8px}
 .crm-workspace .conversation-timeline,.crm-workspace .composer-wrap{width:100%;max-width:1120px;align-self:center}
 .crm-workspace .message-composer textarea,.crm-workspace .note-composer textarea{height:72px;min-height:64px;padding:10px 12px}
 .crm-workspace .composer-wrap{padding-top:7px;padding-bottom:10px}
}
@media(min-width:1281px) and (max-width:1399px){.crm-workspace .conversation-workspace.with-inbox{grid-template-columns:260px 330px minmax(0,1fr)}}
@media(min-width:1400px){.crm-workspace .conversation-workspace.with-inbox{grid-template-columns:280px 350px minmax(0,1fr)}}

/* Explicit contact choice is also available in the desktop deal editor. */
.client-mode-buttons{display:flex;gap:8px;margin:12px 0 16px}.client-mode-buttons button{flex:1;min-height:44px;padding:10px 12px;font-size:13px;border:1px solid #d5e2eb;background:#edf4f8;color:#315c76}.client-mode-buttons button[aria-pressed="true"]{background:#087fa5;border-color:#087fa5;color:white}.deal-client-section{border:1px solid #dce5ed;border-radius:10px;padding:14px;margin:16px 0}.deal-client-section>h3{margin:0 0 8px;font-size:16px}.deal-client-section .muted{font-size:12px;line-height:1.5}.deal-client-section input[type=tel]{width:100%}

/* Compact deal cards and editor spacing; fields remain legible. */
.crm-app .deal-card{padding:11px 12px;margin-bottom:8px}.crm-app .deal-card .deal-title{margin-bottom:7px;min-height:0;line-height:1.35}.crm-app .deal-amount{margin-bottom:7px;font-size:16px}.crm-app .deal-contact{margin-bottom:3px}.crm-app .deal-bottom{margin-top:8px}.crm-app .deal-owner{margin-top:7px;padding-top:6px}.crm-app .mobile-stage-change{margin-top:8px}
.crm-app .deal-editor .editor-header{margin-bottom:14px}.crm-app .deal-editor .editor-header h2{margin:3px 0;font-size:22px}.crm-app .deal-editor label{margin:9px 0;gap:5px}.crm-app .deal-editor .form-two{gap:10px}.crm-app .deal-editor .editor-section{margin:12px 0;padding:11px 12px}.crm-app .deal-editor .editor-section h3{margin:0 0 6px;font-size:15px}.crm-app .deal-editor .client-mode-buttons{margin:8px 0 10px}.crm-app .deal-editor .muted{margin:8px 0 0}.crm-app .deal-editor .editor-actions{margin-top:14px;padding-top:10px}
@media(min-width:901px){.crm-app .deal-editor{padding:22px}.crm-app .deal-editor input,.crm-app .deal-editor select{min-height:38px;padding:8px 10px}.crm-app .deal-editor .editor-actions{padding-bottom:0}}
@media(min-width:901px){.crm-app .deal-editor{inset:16px 16px auto auto;height:auto;max-height:calc(100dvh - 32px);border-radius:12px}}
