/* Nachrichten owns its viewport. Other destinations retain their layout. */
body.messages-active{background:#f5f5f7;overflow:hidden;color-scheme:light}
.messages-active .topbar,.messages-active .app-footer{display:none}
.messages-active .app-shell{min-height:100dvh}
#main.messages-view{max-width:1600px;min-height:0;height:100dvh;padding:24px 28px;margin:auto;overflow:hidden}
.messages-view .mx-shell{height:100%;min-height:0}
.messages-view .workspace-layout{height:100%;min-height:0;display:grid;grid-template-columns:minmax(290px,350px) minmax(0,1fr);align-items:stretch;border:1px solid #e6e6eb;border-radius:24px;background:#fff;overflow:hidden;box-shadow:0 6px 30px #25253003}
.messages-view .workspace-cases{display:flex;flex-direction:column;min-height:0;max-height:none;overflow:hidden;background:#fff;border-right:1px solid #ececf0}
.mx-list-head{padding:26px 22px 18px;display:flex;align-items:center;justify-content:space-between;gap:8px;flex-shrink:0}
.mx-list-head>div{display:flex;align-items:center;gap:2px}.mx-list-head h1{font-size:27px;line-height:1.2;letter-spacing:-.045em;margin:0}
.mx-help{display:grid;place-items:center;width:40px;min-width:40px;height:44px;border:0;background:none;color:#706977;cursor:pointer}.mx-help span{display:grid;place-items:center;border:1px solid #cfcfd7;border-radius:50%;width:17px;height:17px;font:italic 12px Georgia,serif}
.mx-head-actions .icon-button{width:38px;min-width:38px;height:44px;background:none;color:#706977}.mx-head-actions svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7}
.mx-list-tools{padding:0 20px;flex-shrink:0}.mx-search{display:flex;gap:8px;align-items:center}.mx-search label{display:flex;align-items:center;gap:9px;min-width:0;flex:1;background:#f3f3f6;border:1px solid transparent;border-radius:12px;padding:0 13px}.mx-search label:focus-within{border-color:#65406d}.mx-search label svg{width:18px;height:18px;flex-shrink:0;color:#706977}.mx-search input{width:100%;min-width:0;min-height:44px;border:0;background:transparent;font:14px var(--sans);color:#292931;outline:none}.mx-search input::placeholder{color:#706977}
.mx-search>.icon-button{position:relative;border:1px solid #e8e8ed;min-width:44px;width:44px;min-height:44px;height:44px;border-radius:12px;color:#6d6d78;background:#fff}.mx-filter-dot{position:absolute;right:7px;top:7px;width:6px;height:6px;border-radius:50%;background:#65406d}
.mx-read-filter{display:flex;gap:20px;align-items:center;margin-top:12px;border-bottom:1px solid #ececf0}.mx-read-filter>button:not(.icon-button){font:600 13px var(--sans);padding:12px 0;min-height:44px;color:#706977;border:0;border-bottom:2px solid transparent;background:none;cursor:pointer}.mx-read-filter>button[aria-pressed="true"]{color:#65406d;border-bottom-color:#65406d}.mx-read-filter .icon-button{margin-left:auto;min-width:38px;min-height:40px;width:38px;height:40px;background:none;color:#706977}.mx-read-filter .icon-button svg{width:17px;height:17px}
.mx-active-filters{display:flex;align-items:center;gap:4px;border-radius:10px;background:var(--brand-soft);color:var(--brand);margin:12px 0 0;padding:2px 4px 2px 10px;font-size:11px}.mx-active-filters>span{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.mx-active-filters button{margin-left:auto;display:grid;place-items:center;width:36px;height:36px;flex-shrink:0;background:none;border:0;color:inherit;cursor:pointer}.mx-active-filters svg{width:15px;height:15px}
.mx-list-status{padding:13px 22px 8px;min-height:35px;flex-shrink:0}.messages-view .workspace-count{padding:0;border:0;color:#706977;font-size:10px;letter-spacing:.015em}
.mx-list-scroll{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#dedee5 transparent}.messages-view #workspace-more{padding:8px 20px}.messages-view #workspace-load-more{width:100%;justify-content:center;color:#706977;font-size:12px}
.messages-view .workspace-case{display:flex;gap:11px;align-items:flex-start;width:100%;padding:16px 19px;border:0;border-left:3px solid transparent;border-bottom:1px solid #f3f3f6;text-align:left;background:#fff;cursor:pointer;color:#25252c}.messages-view .workspace-case:hover{background:#faf9fb}.messages-view .workspace-case.selected{background:var(--brand-surface);border-left-color:#65406d}
.mx-avatar{display:grid;place-items:center;width:42px;height:42px;flex-shrink:0;border-radius:50%;background:#f0eef1;color:#8a727b;font-size:12px;font-weight:650;letter-spacing:.02em}.has-unread .mx-avatar{background:var(--brand-soft,#f2ecf4);color:var(--brand,#65406d)}
.mx-case-content{display:block;flex:1;min-width:0}.messages-view .workspace-case-head{gap:10px;align-items:center;line-height:1.3}.workspace-case-head strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:600}.has-unread .workspace-case-head strong{font-weight:750}.workspace-case-head time{font-size:10px;color:#706977;white-space:nowrap;flex-shrink:0;font-weight:400}
.messages-view .workspace-case-title{display:block;margin:5px 0 6px;color:#706977;font-size:11px;font-weight:400;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.35}.mx-preview-line{display:flex;gap:9px;align-items:center}.mx-preview{display:block;min-width:0;flex:1;color:#706977;font-size:12px;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.has-unread .mx-preview{color:#4a4a54}.mx-preview.is-draft{color:var(--brand)}.mx-preview b{font-weight:600}
.mx-preview-line .notification-badge{min-width:18px;height:18px;font-size:10px;line-height:18px;background:#65406d;flex-shrink:0;margin:0}.mx-case-note{display:block;margin-top:7px;color:#706977;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mx-case-note.is-due{color:#b3233b}
.mx-list-empty{padding:40px 22px;text-align:center;color:#706977}.mx-list-empty>span{display:grid;place-items:center;margin:0 auto 16px;background:#f5f3f5;border-radius:50%;width:48px;height:48px;color:#65406d}.mx-list-empty svg{width:22px;height:22px}.mx-list-empty h3{font-size:17px;color:#4d4d56;font-weight:600;margin:0 0 10px}.mx-list-empty p{font-size:12px;line-height:1.7;max-width:230px;margin:0 auto 14px}.mx-list-empty .text-button{font-size:12px;justify-content:center}
#workspace-load-error:not(:empty){margin:4px 20px 12px;padding:12px;background:#fff4f4;border:1px solid #f1dfe4;border-radius:12px;font-size:12px;color:#9d394b}#workspace-load-error p{margin:0;line-height:1.6}#workspace-load-error .text-button{font-size:12px}
.messages-view .workspace-detail{position:relative;display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden;background:#fff}
.mx-empty-conversation{display:flex;flex:1;align-items:center;justify-content:center;flex-direction:column;text-align:center;gap:0;padding:36px;background:radial-gradient(ellipse at 50% 40%,#fff 0%,#faf9fb 75%)}
.mx-empty-symbol{display:grid;place-items:center;width:78px;height:78px;border:1px solid var(--brand-soft);border-radius:24px;background:var(--brand-surface);color:var(--brand);margin:0 auto 28px;transform:rotate(-6deg)}.mx-empty-symbol svg{width:32px;height:32px;transform:rotate(6deg);stroke-width:1.4}
.mx-eyebrow{font-size:10px!important;font-weight:650;letter-spacing:.12em;text-transform:uppercase;color:#706977!important;margin:0 0 13px!important}.mx-empty-conversation h2{font-size:clamp(24px,2.5vw,32px);line-height:1.15;letter-spacing:-.045em;color:#373741;margin:0 0 14px;font-weight:650}.mx-empty-conversation>p{max-width:290px;font-size:13px;line-height:1.7;color:#706977;margin:0 0 26px}.mx-empty-conversation .button{font-size:12px;border-color:#e7e4e9;background:#fff;box-shadow:0 2px 8px #00000003}
.mx-auth{padding:42px 24px}.mx-auth h2{font-size:28px;line-height:1.15;margin:0 0 20px}.mx-auth p{font-size:14px;line-height:1.6;color:#706977;margin-bottom:20px}.mx-auth .mx-empty-symbol{margin:0 0 26px}
.messages-view .workspace-case-header{display:flex;align-items:center;flex-wrap:nowrap;gap:12px;min-height:88px;flex-shrink:0;padding:18px 74px 16px 22px;border-bottom:0;background:#fff}.messages-view #workspace-back{display:none;min-width:38px;width:38px;height:44px;background:none;color:#6f6f7b}.messages-view #workspace-back svg{width:21px;height:21px;transform:rotate(180deg)}.messages-view .workspace-case-header .mx-avatar{width:42px;height:42px}.messages-view .workspace-case-header h2{font-size:19px;font-weight:650;line-height:1.2;letter-spacing:-.025em;margin:0 0 5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.messages-view #workspace-chat-title:focus{outline:none}
.mx-listing-link{display:flex;align-items:center;gap:5px;max-width:100%;min-height:24px;font:11px var(--sans);color:#706977;border:0;background:none;text-align:left;cursor:pointer;padding:0}.mx-listing-link span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mx-listing-link svg{width:13px;height:13px;flex-shrink:0}.mx-listing-link:hover{color:#65406d}
.messages-view .workspace-case-tabs{display:flex;align-items:center;flex-wrap:nowrap;gap:22px;padding:0 22px;min-height:46px;border-bottom:1px solid #ececf0;background:#fff;flex-shrink:0}.messages-view .workspace-case-tabs>button:not(.mx-help){min-height:46px;font-size:12px;padding:0;border:0;border-bottom:2px solid transparent;color:#706977;white-space:nowrap;background:none}.messages-view .workspace-case-tabs>button.active{color:var(--brand);border-color:#65406d}.messages-view .workspace-case-tabs .mx-help{margin-left:auto}
.messages-view #workspace-case-body{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain}.messages-view #workspace-case-body[data-tab="messages"]{display:flex;overflow:hidden}.messages-view .workspace-detail .thread-panel{display:flex!important;flex:1;min-height:0;width:100%;border:0;border-radius:0;background:#fff;overflow:hidden}
.messages-view .thread-header{position:absolute;top:20px;right:18px;z-index:8;padding:0;border:0;background:transparent}.messages-view .thread-header>div,.messages-view .thread-back{display:none}.messages-view .thread-options{position:relative;margin:0;min-width:0;font-size:12px}.messages-view .thread-options>summary{display:grid;place-items:center;list-style:none;min-height:44px;width:44px;border:1px solid #eeeeF2;border-radius:50%;cursor:pointer;color:#7b7b86;background:#fff}.messages-view .thread-options>summary::-webkit-details-marker{display:none}.messages-view .thread-options>summary svg{width:22px;height:22px;fill:currentColor;stroke:none}.messages-view .thread-options>div{position:absolute;top:51px;right:0;width:245px;display:flex;flex-direction:column;align-items:stretch;gap:3px;padding:10px;background:#fff;border:1px solid #e9e9ef;border-radius:15px;box-shadow:0 10px 40px #2020301a}.messages-view .thread-options button{justify-content:flex-start;width:100%;border:0;background:#fff;border-radius:8px;padding:10px 12px;font-size:12px;color:#63636f}.messages-view .thread-options button:hover{background:#f6f5f8}.messages-view .composer-guidance{margin:4px 0 0;padding:6px 12px;border-top:1px solid #eeeef2;font-size:11px}.messages-view .composer-guidance p{font-size:11px;line-height:1.65;color:#706977}
.messages-view .thread-context{display:flex;align-items:center;gap:5px;background:#faf9fb;border:0;padding:10px 22px;color:#706977;font-size:10px;flex-shrink:0}.messages-view .thread-context svg{width:12px;height:12px;flex-shrink:0}.messages-view #thread-block-notice{font-size:12px;line-height:1.6;margin:10px 18px;flex-shrink:0}
.messages-view .workspace-detail .message-scroll{height:auto;max-height:none;min-height:0;flex:1;padding:16px 24px 24px;gap:12px;background:#faf9fb;scroll-behavior:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#dedee5 transparent}
.messages-view .message-bubble{max-width:80%;min-width:100px;padding:12px 14px 7px;background:#fff;border:1px solid #eeedf2;border-radius:17px 17px 17px 4px;color:#4b4852;box-shadow:0 2px 3px #20102502}.messages-view .message-bubble.mine{background:var(--brand-soft);border-color:var(--brand-soft);border-radius:17px 17px 4px 17px;color:var(--brand)}.messages-view .message-bubble>p{margin:0;font-size:14px;line-height:1.6}.messages-view .message-who{display:none}.messages-view .is-team .message-bubble:not(.mine) .message-who{display:block;font-size:10px;margin-bottom:6px;color:#706977}.messages-view .message-bubble video{border-radius:10px;max-height:300px;margin:0 0 8px}.messages-view .message-bubble audio{width:min(100%,300px)}.messages-view .message-bubble>small{font-size:10px;display:block;margin:4px 0;color:#706977}.messages-view .message-bubble footer{justify-content:flex-end;gap:7px;margin:5px 0 0;min-height:23px}.messages-view .message-bubble time{font-size:10px;color:#706977}.messages-view .message-bubble.mine time{color:var(--brand)}
.messages-view .message-actions{position:relative;margin:0}.messages-view .message-actions>summary{display:grid;place-items:center;min-width:32px;height:28px;list-style:none;cursor:pointer;color:var(--brand);font-size:15px;letter-spacing:1px;line-height:1}.messages-view .message-actions>summary::-webkit-details-marker{display:none}.messages-view .message-actions>button{position:absolute;right:0;bottom:32px;white-space:nowrap;min-height:44px;padding:10px 14px;border:1px solid var(--brand-border);border-radius:10px;background:#fff;color:var(--brand);font-size:12px;box-shadow:0 5px 20px #32142317;z-index:2}
.messages-view .message-day{align-self:center;color:#706977;font-size:10px;letter-spacing:.01em;padding:6px 12px;margin:6px 0 3px}.messages-view .message-day:first-child{margin-top:0}.messages-view .thread-empty{gap:10px;padding:30px 20px}.messages-view .thread-empty p{font-size:13px;color:#706977}
.messages-view .new-message-jump{position:relative;align-self:center;margin:-50px 0 10px;padding:9px 16px;min-height:38px;font-size:12px;border:1px solid var(--brand-border);border-radius:30px;background:#fff;box-shadow:0 3px 14px #3b1c2a12;z-index:3;flex-shrink:0}
.messages-view .workspace-detail .message-composer{margin:0;padding:14px 20px 12px!important;background:#fff;border-top:1px solid #eeedf2;flex-shrink:0;max-height:65%;overflow:auto}.messages-view .mx-compose-line{display:flex;align-items:flex-end;gap:9px}.messages-view .workspace-detail .message-composer textarea{display:block;flex:1;width:0;min-height:46px;max-height:120px;border:1px solid #e9e7ed;border-radius:14px;background:#f7f6f9;font:14px/1.5 var(--sans);padding:12px 14px;resize:none;overflow:auto;margin:0;color:#443e49}.messages-view .message-composer textarea::placeholder{color:#706977}
.messages-view .workspace-detail #send-message{display:flex;align-items:center;justify-content:center;gap:8px;background:#65406d;color:#fff;min-height:46px;min-width:46px;padding:12px 15px;border-radius:14px;font-size:12px;flex-shrink:0;margin:0}.messages-view #send-message svg{width:18px;height:18px}.messages-view #send-message:disabled{opacity:.55;cursor:wait}
.messages-view .workspace-detail .composer-actions{display:grid;grid-template-columns:1fr 1.25fr 1fr;align-items:center;gap:7px;margin-top:9px}.messages-view .composer-more{display:contents}.messages-view .workspace-detail .composer-actions .button{justify-content:center;position:relative;gap:6px;padding:7px 8px;min-height:38px;margin:0;width:auto;font-size:11px;color:#706977;background:#f8f6f9;border:1px solid transparent;border-radius:9px;overflow:hidden;cursor:pointer;white-space:nowrap}.messages-view .composer-actions svg{width:16px;height:16px;flex-shrink:0}.messages-view .video-reply-label input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}.messages-view .video-reply-label:focus-within{outline:3px solid #65406d;outline-offset:2px}.messages-view .composer-actions .button:has(input:disabled){opacity:.5;cursor:not-allowed}
.messages-view .message-composer #message-status{font-size:12px;line-height:1.5;margin:8px 0 0;color:#706977}.messages-view .reply-video-preview{display:flex;gap:12px;align-items:center;background:#f8f6f9;border:1px solid #eeebf1;border-radius:12px;padding:10px;margin:0 0 12px}.messages-view .reply-video-preview video{width:105px;height:82px;object-fit:contain;border-radius:8px;background:#19171c}.messages-view .reply-video-preview audio{width:100%;max-width:260px}.messages-view .reply-video-preview>div{display:flex;flex-direction:column;gap:4px;min-width:0}.messages-view .reply-video-preview strong{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.messages-view .reply-video-preview small{font-size:10px;color:#706977}.messages-view .reply-video-preview .text-button{font-size:11px;min-height:32px;margin:0}.messages-view .voice-recording{margin:0 0 12px;padding:12px;background:#fff1f3;border:1px solid #f4dee5;border-radius:12px;gap:8px}.messages-view .voice-recording strong{font-size:12px}.messages-view .voice-recording button{font-size:11px;min-height:40px}
.messages-view .workspace-summary{padding:30px;max-width:720px}.messages-view .workspace-summary h3{font-size:24px;margin:8px 0 18px;line-height:1.2}.messages-view .workspace-summary p{font-size:14px;color:#706977;line-height:1.7}.messages-view .workspace-summary label{color:#706977}.messages-view .workspace-summary select,.messages-view .workspace-summary textarea,.messages-view .workspace-summary input{border-color:#e5e1e9;border-radius:12px;background:#fff}.messages-view .workspace-summary .text-button{font-size:12px}.mx-summary-meta{display:flex;flex-wrap:wrap;gap:8px;margin:20px 0 28px;font-size:11px;color:#706977}.mx-summary-meta span{padding:6px 10px;border-radius:7px;background:#f8f5f8}.messages-view .mx-inserat-summary>.text-button{display:flex;margin-top:12px}.messages-view .appointment-panel{padding:28px}.messages-view .appointment-panel h3{font-size:24px}.messages-view .appointment-panel p{font-size:14px;color:#706977}.messages-view .case-internal form{margin-top:20px}
.mx-settings.info-dialog{width:min(520px,calc(100vw - 32px));padding:30px;border-radius:24px}.mx-settings .rr-kicker{font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:#706977;margin:0 0 6px}.mx-settings h2{font-size:28px;letter-spacing:-.04em;margin:0 35px 24px 0}.mx-filter-form label{display:block;margin:15px 0;font-size:12px;font-weight:550;color:#7f7483}.mx-filter-form select{display:block;width:100%;margin-top:7px;padding:12px;border:1px solid #e6e1e9;border-radius:11px;background:#fff;font:14px var(--sans);min-height:46px;color:#4b424e}.mx-filter-form p{font-size:11px!important;color:#706977!important}.mx-filter-actions{display:flex;align-items:center;justify-content:space-between;margin-top:24px;gap:12px}.mx-settings .push-settings{padding:0;background:none;border:0}.mx-settings .push-settings p{font-size:13px}
.messages-view :focus-visible{outline:3px solid #65406d;outline-offset:3px}
#main.messages-view:focus{outline:none}
.messages-view .workspace-layout.comments-open{grid-template-columns:minmax(0,1fr)}
.messages-view .comments-open .workspace-detail{display:none}
.messages-view .comments-open .workspace-cases{border-right:0}
.messages-view .comments-open .bs-activity-group{max-width:720px;margin-inline:auto}
.messages-view .mx-conversations{display:flex;flex-direction:column;flex:1;min-height:0}
.messages-view .mx-conversations[hidden],.messages-view .mx-comment-scroll[hidden],.messages-view #messages-filter[hidden]{display:none}
.messages-view .mx-channels{display:flex;gap:22px;border-bottom:1px solid #ececf0;margin:0 0 12px}
.messages-view .mx-channels>button{display:flex;align-items:center;gap:7px;min-height:44px;padding:0 0 10px;background:none;border:0;border-bottom:2px solid transparent;color:#706977;font:600 14px var(--sans);cursor:pointer}
.messages-view .mx-channels>button[aria-selected="true"]{color:var(--brand);border-bottom-color:var(--brand)}
.messages-view .mx-channels .notification-badge{position:static;min-width:18px;height:18px;font-size:10px;line-height:18px;padding:0 5px;border:0}
.messages-view .mx-comment-scroll{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:8px 18px 18px}
.messages-view .mx-avatar{position:relative;overflow:hidden}
.messages-view .mx-avatar img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.messages-view .mx-read-filter{margin-top:6px;gap:14px;border-bottom:0}
.messages-view .mx-read-filter>button:not(.icon-button){font-size:12px;min-height:36px;padding:8px 0;border-bottom:0}
.messages-view .mx-list-status{padding-top:0;min-height:25px}
.messages-view .mx-list-head{padding-top:18px;padding-bottom:10px}
@media(max-width:700px){
 .messages-view .mx-list-head{padding:calc(10px + env(safe-area-inset-top,0px)) 20px 8px}
 .messages-view .mx-list-head h1{font-size:27px}
 .messages-view .mx-read-filter>button:not(.icon-button){min-height:36px;font-size:12px}
 .messages-view .mx-list-status{padding-top:0}
}
@media(min-width:701px) and (max-width:1100px){#main.messages-view{padding:16px}.messages-view .workspace-layout{grid-template-columns:minmax(250px,40%) minmax(0,1fr)}.mx-list-head{padding:22px 15px 16px}.mx-list-head h1{font-size:24px}.mx-list-tools{padding:0 14px}.mx-head-actions .icon-button{min-width:32px;width:32px}.mx-list-head .mx-help{min-width:28px;width:28px}.messages-view .workspace-case{padding:15px 12px}.messages-view .workspace-case-tabs{gap:16px;padding:0 16px}.messages-view .composer-actions svg{display:none}.messages-view .message-bubble{max-width:92%}.messages-view .mx-send-label{display:none}}
@media(max-width:700px){
  .messages-active .app-shell{margin:0;height:100dvh;min-height:0}.messages-active .mobile-nav{z-index:30;background:#fff;border-top:1px solid #eeebf0}.messages-keyboard .mobile-nav{display:none}
  #main.messages-view{position:fixed;inset:var(--mx-top,0px) 0 auto 0;width:100%;height:calc(var(--mx-viewport,100dvh) - 70px - env(safe-area-inset-bottom,0px));padding:0;max-width:none;min-height:0;margin:0;background:#fff}.messages-keyboard #main.messages-view{height:var(--mx-viewport,100dvh)}
  .messages-view .workspace-layout{display:block;min-height:0;border:0;border-radius:0}.messages-view .workspace-cases{height:100%;max-height:none;min-height:0;border:0}.messages-view .workspace-detail{display:none;height:100%}.messages-view .workspace-layout.case-open .workspace-cases{display:none}.messages-view .workspace-layout.case-open .workspace-detail{display:flex}
  .mx-list-head{padding:calc(22px + env(safe-area-inset-top,0px)) 22px 18px}.mx-list-head h1{font-size:30px}.mx-head-actions .icon-button{width:42px;min-width:42px}.mx-head-actions svg{width:21px;height:21px}.mx-search input{font-size:16px}.mx-read-filter{gap:24px}.mx-read-filter>button:not(.icon-button){font-size:14px;min-height:48px}.mx-list-status{padding-top:12px}
  .messages-view .workspace-case{padding:18px 21px;gap:13px}.mx-avatar{width:46px;height:46px;font-size:13px}.workspace-case-head strong{font-size:15px}.workspace-case-head time{font-size:11px}.messages-view .workspace-case-title{font-size:12px;margin:5px 0 7px}.mx-preview{font-size:13px}.mx-case-note{font-size:11px}.messages-view .workspace-count{font-size:11px}
  .messages-view .workspace-case-header{min-height:80px;padding:calc(14px + env(safe-area-inset-top,0px)) 60px 12px 8px;gap:9px}.messages-view #workspace-back{display:grid;place-items:center}.messages-view .workspace-case-header .mx-avatar{width:37px;height:37px;font-size:11px}.messages-view .workspace-case-header h2{font-size:17px}.mx-listing-link{font-size:11px;min-height:26px}.messages-view .thread-header{top:calc(18px + env(safe-area-inset-top,0px));right:12px}.messages-view .thread-options>summary{width:40px;min-height:40px}.messages-view .workspace-case-tabs{padding:0 18px;gap:22px;min-height:44px}.messages-view .workspace-case-tabs>button:not(.mx-help){font-size:12px;min-height:44px}.messages-view .workspace-case-tabs .mx-help{width:28px;min-width:28px}
  .messages-view .thread-context{padding:8px 18px}.messages-view .workspace-detail .message-scroll{height:auto;max-height:none;min-height:0;padding:14px 16px 18px;gap:11px}.messages-view .message-bubble{max-width:88%;padding:11px 13px 6px}.messages-view .message-bubble>p{font-size:15px;line-height:1.5}.messages-view .message-bubble video{max-height:260px}.messages-view .message-bubble footer{margin-top:5px}.messages-view .message-bubble time{font-size:10px}.messages-view .message-actions>summary{height:30px;min-width:34px}
  .messages-view .workspace-detail .message-composer{padding:11px 14px 10px!important;max-height:65%}.messages-view .workspace-detail .message-composer textarea{font-size:16px;padding:11px 13px;min-height:46px}.messages-view .workspace-detail #send-message{padding:12px;min-width:46px;width:46px;min-height:46px}.messages-view .mx-send-label{position:absolute;clip:rect(0,0,0,0);width:1px;height:1px;overflow:hidden;white-space:nowrap}.messages-view .workspace-detail .composer-actions{gap:6px;margin-top:7px}.messages-view .workspace-detail .composer-actions .button{min-height:40px;font-size:11px;padding:7px 5px}.messages-view .composer-actions svg{width:15px;height:15px}
  .messages-view .workspace-summary,.messages-view .appointment-panel{padding:24px 20px}.messages-view .workspace-summary input,.messages-view .workspace-summary select,.messages-view .workspace-summary textarea{font-size:16px}.messages-view .reply-video-preview audio{max-width:180px}.messages-view .reply-video-preview video{width:90px;height:65px}.messages-view .voice-recording{padding:9px}.messages-view .voice-recording button{min-height:36px}.messages-view .voice-recording strong{font-size:11px}
  .mx-settings.info-dialog{position:fixed;inset:auto 0 0;margin:0;width:100%;max-width:100%;max-height:92dvh;padding:28px 24px calc(24px + env(safe-area-inset-bottom,0px));border-radius:24px 24px 0 0}.mx-filter-form select{font-size:16px}
}
@media(max-width:380px){.messages-view .composer-actions svg{display:none}.messages-view .workspace-case-tabs{gap:18px}.messages-view .workspace-case-header .mx-avatar{display:none}}
@media(prefers-reduced-motion:reduce){.messages-view *{scroll-behavior:auto!important;transition:none!important}}

/* Voice controls stay legible and tappable on narrow phones. */
.messages-view .workspace-detail .composer-actions{grid-template-columns:1fr 1fr}
.messages-view .workspace-detail #record-voice{grid-column:1 / -1;min-height:44px;color:var(--brand);background:var(--brand-surface);border-color:var(--brand-soft)}
.messages-view .voice-recording{display:flex;flex-wrap:wrap;align-items:center}
.messages-view .voice-recording strong{flex:1 0 100%;font-variant-numeric:tabular-nums}
.messages-view .voice-recording button{min-height:44px}
.messages-view .reply-video-preview:has(audio){flex-wrap:wrap}
.messages-view .reply-video-preview audio{flex:1 1 100%;width:100%;max-width:100%;min-width:0}

/* Inbox: one stable visual rhythm for people, context and unread state. */
.messages-view .workspace-case{align-items:center;gap:12px;padding:16px 14px}
.mx-listing-thumb{position:relative;display:grid;place-items:center;flex:none;width:48px;height:62px;border-radius:10px;overflow:hidden;background:#f2edf0;color:#9b8d96}
.mx-listing-thumb img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.mx-listing-thumb svg{width:22px;height:22px}
.messages-view .mx-avatar{border-radius:50%;width:44px;height:44px}
.messages-view .mx-case-content{flex:1;min-width:0}
.messages-view .workspace-case.has-unread{background:var(--brand-surface)}
:is(.bs-dialog,.messages-view) .bs-activity-body{background:#fff;padding:12px 12px calc(24px + env(safe-area-inset-bottom,0px))}
:is(.bs-dialog,.messages-view) .bs-activity-card{border:0;border-bottom:1px solid #f0eaed;border-radius:0;box-shadow:none;margin:0;padding:17px 10px;align-items:center;gap:12px}
:is(.bs-dialog,.messages-view) .bs-activity-card.is-new{background:var(--brand-surface);border-color:var(--brand-soft);border-radius:10px}
:is(.bs-dialog,.messages-view) .bs-activity-avatar{width:44px;height:44px;border-radius:50%}
:is(.bs-dialog,.messages-view) .bs-activity-quote{-webkit-line-clamp:2;margin:6px 0;font-size:13px;line-height:1.45}
:is(.bs-dialog,.messages-view) .bs-activity-open{margin-top:5px}
.bs-activity-thumb{position:relative;display:grid;place-items:center;flex:none;width:48px;height:62px;border-radius:10px;overflow:hidden;background:#f2edf0;color:#9b8d96}
.bs-activity-thumb img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.bs-activity-thumb svg{width:22px;height:22px}
.bs-activity-group h3{padding:6px 0;margin:0 8px 6px}
@media(min-width:701px){.messages-view .workspace-layout.comments-open{grid-template-columns:minmax(0,760px);justify-content:center}.messages-view .comments-open .workspace-cases{border-right:0}}
@media(max-width:370px){.mx-listing-thumb,.bs-activity-thumb{width:40px;height:54px}.messages-view .workspace-case{gap:9px;padding-inline:10px}:is(.bs-dialog,.messages-view) .bs-activity-card{gap:9px;padding-inline:8px}}

/* Chat: one compact composer, with secondary media choices on demand. */
.messages-view .mx-compose-line{gap:6px;align-items:flex-end}
.messages-view .mx-compose-line textarea{min-width:0}
.messages-view .mx-compose-line .icon-button{display:grid;place-items:center;width:44px;min-width:44px;min-height:46px;padding:10px;margin:0;border:0;border-radius:14px;background:#f6f3f7;color:#70616c}
.messages-view .mx-compose-line .composer-mic{color:var(--brand);background:var(--brand-surface)}
.messages-view .mx-compose-line .icon-button svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round}
.messages-view .mx-compose-line .icon-button:disabled{opacity:.5}
.messages-view .composer-attach[aria-expanded="true"]{background:var(--brand-soft);color:var(--brand)}
.messages-view .workspace-detail .composer-actions[hidden]{display:none}
.messages-view .workspace-detail .composer-actions{grid-template-columns:1fr 1fr}
.messages-view #message-status:empty{display:none}
.message-reactions{display:flex;flex-wrap:wrap;gap:5px;margin-top:7px}
.message-reactions:empty{display:none}
.message-reaction{display:inline-flex;align-items:center;gap:4px;min-height:32px;padding:3px 9px;background:#fff;border:1px solid #e8e2e9;border-radius:20px;font-size:16px;cursor:pointer;color:#665963}
.message-reaction span{font:11px var(--sans)}
.message-reaction.mine{background:var(--brand-soft);border-color:var(--brand);color:var(--brand)}
.message-reaction:disabled{cursor:wait;opacity:.6}
.message-react-picker{position:relative;margin-right:auto}
.message-react-picker>summary{list-style:none;display:grid;place-items:center;width:34px;min-height:32px;border-radius:50%;cursor:pointer;color:#967b88}
.message-react-picker>summary::-webkit-details-marker{display:none}
.message-react-picker>summary svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round}
.message-react-picker[open]>summary,.message-react-picker>summary:hover{background:var(--brand-soft);color:var(--brand)}
.message-react-picker>div{position:absolute;bottom:38px;left:-6px;z-index:10;display:flex;padding:5px;background:#fff;border:1px solid var(--brand-border);border-radius:25px;box-shadow:0 6px 24px #4c1b3426;width:max-content}
.message-bubble.mine .message-react-picker>div{left:auto;right:-65px}
.message-react-picker button{display:grid;place-items:center;width:36px;min-height:40px;padding:0;border:0;border-radius:50%;background:transparent;cursor:pointer;font-size:22px;transition:transform .12s}
.message-react-picker button:hover{transform:scale(1.15);background:var(--brand-surface)}
.message-react-picker button:disabled{opacity:.5;cursor:wait}
.messages-view .message-bubble{animation:chat-arrive .16s ease-out}
.voice-dot{color:#65406d;animation:voice-pulse 1.2s ease-in-out infinite}
@keyframes chat-arrive{from{opacity:.55;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}
@keyframes voice-pulse{50%{opacity:.35}}
@media(max-width:700px){.messages-view .workspace-detail .message-composer{padding:9px 10px!important}.messages-view .mx-compose-line{gap:4px}.messages-view .mx-compose-line .icon-button{width:38px;min-width:38px;padding:8px}.messages-view .reply-video-preview:has(audio){flex-wrap:wrap}.messages-view .reply-video-preview audio{max-width:100%;width:100%}.message-react-picker button{width:34px;min-height:44px}.message-react-picker>summary{min-height:36px}}
@media(prefers-reduced-motion:reduce){.messages-view .message-bubble,.voice-dot{animation:none}.message-react-picker button{transition:none}}

/* Attachments and reply context stay inside the conversation. */
.chat-history{align-self:center;min-height:36px;padding:6px 14px;margin:0;font-size:12px;color:var(--brand);background:#faf9fb;flex-shrink:0}
.chat-history[hidden],.chat-typing[hidden]{display:none}
.chat-typing{flex-shrink:0;min-height:25px;padding:4px 22px;color:#967484;font-size:12px;background:#faf9fb}
.chat-quote{display:block;width:100%;text-align:left;margin:0 0 9px;padding:8px 10px;border:0;border-left:3px solid var(--brand);border-radius:7px;background:var(--brand-soft);color:#68505e;cursor:pointer;overflow:hidden}
.chat-quote strong{display:block;font-size:11px;margin-bottom:3px}.chat-quote span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:12px;line-height:1.4;overflow-wrap:anywhere}.chat-quote:disabled{cursor:default;opacity:.7}
.chat-reply-draft{display:flex;align-items:center;justify-content:space-between;gap:8px;border-left:3px solid var(--brand);padding:8px 10px;margin-bottom:10px;background:var(--brand-surface);border-radius:8px}
.chat-reply-draft>div{min-width:0}.chat-reply-draft strong{font-size:11px;color:var(--brand)}.chat-reply-draft p{font-size:12px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin:4px 0 0}.chat-reply-draft .icon-button{flex-shrink:0;min-width:40px;min-height:40px}
.message-reply-button{border:0;border-radius:50%;width:34px;min-height:32px;background:transparent;color:#967b88;font-size:18px;cursor:pointer}.message-reply-button:hover{background:var(--brand-soft)}.message-reply-button:disabled{opacity:.4;cursor:default}
.chat-image{display:block;width:250px;max-width:100%;border-radius:12px;overflow:hidden;background:#eee9ef;margin:5px 0}.chat-image img{display:block;width:100%;height:220px;object-fit:contain}
.chat-file{display:flex;align-items:center;gap:10px;max-width:300px;min-width:0;text-decoration:none;color:inherit;padding:12px 4px}.chat-file>span:first-child,.chat-pdf-preview{display:grid;place-items:center;background:#fff;border:1px solid #e6dce3;border-radius:9px;padding:10px;font-size:12px;color:var(--brand);font-weight:700}.chat-file>span:nth-child(2){min-width:0;flex:1}.chat-file strong{display:block;font-size:13px;overflow-wrap:anywhere}.chat-file small{display:block;font-size:11px;margin-top:5px;color:#7e6773}.chat-file>span:last-child{font-size:22px}
.messages-view .reply-video-preview .chat-preview-image{width:110px;height:85px;object-fit:contain;border-radius:8px;background:#eee9ef}
.messages-view .composer-actions .video-reply-label{min-height:46px!important}
.chat-highlight{outline:2px solid var(--brand);outline-offset:3px}
@media(max-width:700px){.chat-typing{padding-left:16px}.chat-image{width:230px}.chat-image img{height:200px}.message-reply-button{min-height:36px}.messages-view .message-bubble{min-width:120px}.messages-view .composer-actions{max-height:210px;overflow:auto}}
