/* Maqueta 3: desktop-only layer. Mobile styles and markup stay untouched. */
@media (min-width:1100px){
 html[data-theme="dark"] body{--dina-canvas:var(--dina-bg);--dina-panel:var(--dina-surface);--dina-subtle:var(--dina-surface-raised);--dina-line:var(--dina-border);--dina-text:var(--dina-text-main);--dina-secondary:var(--dina-text-secondary);--dina-faint:var(--dina-text-muted);--dina-accent:var(--dina-primary);--dina-accent-strong:var(--dina-primary-hover);--dina-focus:var(--dina-primary)}
 html[data-theme="dark"] body #app-view{background:var(--dina-canvas)}
 html[data-theme="dark"] body .topbar{background:var(--dina-sidebar);border-color:var(--dina-border);box-shadow:none}
 html[data-theme="dark"] body.crm-hierarchy-ready .topbar>.brand{position:static!important;left:auto!important;transform:none!important;margin-left:8px;max-width:200px!important}
 html[data-theme="dark"] body.crm-hierarchy-ready .topbar .brand-logo{width:185px!important;max-width:185px!important}
 html[data-theme="dark"] body.crm-hierarchy-ready #session-actions{background:var(--dina-sidebar);border:1px solid var(--dina-border);border-radius:10px}
 html[data-theme="dark"] body.crm-hierarchy-ready #crm-area-rail{background:var(--dina-sidebar);border-color:var(--dina-border)}
 html[data-theme="dark"] body.crm-hierarchy-ready .workspace{--m3-inbox-width:clamp(300px,25vw,344px);grid-template-columns:var(--m3-inbox-width) minmax(0,1fr);gap:8px;min-width:0}
 html[data-theme="dark"] body.crm-hierarchy-ready .inbox,html[data-theme="dark"] body.crm-hierarchy-ready .conversation{min-width:0;border:1px solid var(--dina-border);border-radius:9px;overflow:hidden;background:var(--dina-surface)}
 html[data-theme="dark"] body.crm-hierarchy-ready .inbox-toolbar{padding:8px 9px 6px;gap:6px;background:var(--dina-surface);border-color:var(--dina-border)}
 html[data-theme="dark"] body.crm-hierarchy-ready .inbox-mode-bar{min-height:31px}
 html[data-theme="dark"] body.crm-hierarchy-ready .inbox-search{min-height:32px;border-radius:7px;background:var(--dina-input)}
 html[data-theme="dark"] body.crm-hierarchy-ready .queue-tabs{display:flex;flex-wrap:nowrap;gap:4px;overflow-x:auto;grid-template-columns:none;scrollbar-width:thin;padding-bottom:3px}
 html[data-theme="dark"] body.crm-hierarchy-ready .queue-tabs>button{flex:0 0 auto;min-height:27px;padding:3px 6px;border:0;border-radius:6px;font-size:10px;white-space:nowrap;background:var(--dina-surface-raised)}
 html[data-theme="dark"] body.crm-hierarchy-ready .queue-tabs>button.active{background:var(--dina-primary);color:#172638}
 html[data-theme="dark"] body.crm-hierarchy-ready .queue-tabs>button span{width:auto;min-width:14px;height:auto;background:transparent;color:inherit}
 html[data-theme="dark"] body.crm-hierarchy-ready .queue-more{flex:0 0 auto;grid-column:auto}
 html[data-theme="dark"] body.crm-hierarchy-ready .inbox-item{border-color:var(--dina-border);background:var(--dina-surface)}
 html[data-theme="dark"] body.crm-hierarchy-ready .inbox-item:hover{background:var(--dina-hover)}
 html[data-theme="dark"] body.crm-hierarchy-ready .inbox-item.active{background:var(--dina-selected)}
 html[data-theme="dark"] body.crm-hierarchy-ready .inbox-open{min-height:68px;padding:6px 2px 6px 9px;gap:8px;grid-template-columns:36px minmax(0,1fr) auto}
 html[data-theme="dark"] body.crm-hierarchy-ready .inbox .contact-avatar{width:36px;height:36px}
 html[data-theme="dark"] body.crm-hierarchy-ready .inbox-copy{gap:3px}
 html[data-theme="dark"] body.crm-hierarchy-ready .inbox .inbox-name{font-size:12px}
 html[data-theme="dark"] body.crm-hierarchy-ready .inbox .preview{font-size:11px}
 html[data-theme="dark"] body.crm-hierarchy-ready .ticket-tags{height:18px;max-height:18px;flex-wrap:nowrap;overflow:hidden}
 html[data-theme="dark"] body.crm-hierarchy-ready .ticket-tags>.channel-tag{display:inline-block;max-width:70px}
 html[data-theme="dark"] body.crm-hierarchy-ready .ticket-tags>.inbox-label{font-size:9px;max-width:70px;padding:2px 5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 html[data-theme="dark"] body.crm-hierarchy-ready .ticket-tags>.inbox-label:nth-of-type(n+5){display:none}
 html[data-theme="dark"] body.crm-hierarchy-ready .ticket-tags>.assignee{font-size:9px;max-width:70px}
 html[data-theme="dark"] body.crm-hierarchy-ready .inbox-peek{width:26px;min-width:26px;margin-right:3px}
 html[data-theme="dark"] body.crm-hierarchy-ready .conversation-inner{min-width:0;min-height:0}
 html[data-theme="dark"] body.crm-hierarchy-ready .conversation-inner.contact-panel-open{grid-template-columns:minmax(0,1fr) clamp(280px,21vw,320px)}
 html[data-theme="dark"] body.crm-hierarchy-ready .contact-panel{position:relative;right:auto;top:auto;bottom:auto;width:auto;grid-column:2;grid-row:1/-1;box-shadow:none;z-index:7;border-left:1px solid var(--dina-border);background:var(--dina-surface)}
 html[data-theme="dark"] body.crm-hierarchy-ready .conversation-head{min-height:56px;padding:5px 9px;background:var(--dina-surface)}
 html[data-theme="dark"] body.crm-hierarchy-ready .conversation-head .contact-avatar{width:34px;height:34px}
 html[data-theme="dark"] body.crm-hierarchy-ready .conversation-head .contact-title h2{font-size:14px}
 html[data-theme="dark"] body.crm-hierarchy-ready .conversation-head .meta-row{font-size:10px}
 html[data-theme="dark"] body.crm-hierarchy-ready .chat-visible-labels{min-height:30px;padding:2px 9px;gap:4px;background:var(--dina-surface)}
 html[data-theme="dark"] body.crm-hierarchy-ready .chat-visible-labels .label-pill{min-height:20px;font-size:10px}
 html[data-theme="dark"] body.crm-hierarchy-ready .messages{min-height:0;padding:12px 16px;gap:8px;background-color:var(--dina-bg);background-image:linear-gradient(#1F2430ef,#1F2430ef),url('/chat-wallpaper.svg?v=3')}
 html[data-theme="dark"] body.crm-hierarchy-ready .message{max-width:min(76%,580px);border-radius:10px;font-size:12px;line-height:1.4}
 html[data-theme="dark"] body.crm-hierarchy-ready .message.INBOUND{background:var(--dina-surface-raised)}
 html[data-theme="dark"] body.crm-hierarchy-ready .message.OUTBOUND{background:var(--dina-selected)}
 html[data-theme="dark"] body.crm-hierarchy-ready .composer{gap:4px;padding:5px 9px 6px;background:var(--dina-surface)}
 html[data-theme="dark"] body.crm-hierarchy-ready .composer-tools{gap:3px;max-height:34px;overflow-x:auto;overflow-y:hidden;flex-wrap:nowrap}
 html[data-theme="dark"] body.crm-hierarchy-ready .composer-tool{min-height:28px;padding:3px 6px;font-size:10px;white-space:nowrap}
 html[data-theme="dark"] body.crm-hierarchy-ready .composer-main{align-items:center;gap:5px}
 html[data-theme="dark"] body.crm-hierarchy-ready .composer textarea{min-height:34px!important;max-height:100px;border-radius:8px;background:var(--dina-input);font-size:12px!important}
 html[data-theme="dark"] body.crm-hierarchy-ready .send-button{width:36px;height:36px;border-radius:8px;background:var(--dina-primary);color:#172638}
 html[data-theme="dark"] body.crm-hierarchy-ready .contact-panel-heading{padding:0 8px;min-height:38px;border-color:var(--dina-border)}
 html[data-theme="dark"] body.crm-hierarchy-ready .m3-tabs{display:flex;align-items:stretch;gap:0;overflow-x:auto;scrollbar-width:none}
 html[data-theme="dark"] body.crm-hierarchy-ready .m3-tabs button{flex:0 0 auto;min-height:38px;padding:3px 7px;border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;color:var(--dina-text-secondary);font-size:10px;cursor:pointer}
 html[data-theme="dark"] body.crm-hierarchy-ready .m3-tabs button[aria-selected="true"]{border-color:var(--dina-primary);color:var(--dina-primary-hover)}
 html[data-theme="dark"] body.crm-hierarchy-ready .m3-tab-panel[hidden]{display:none!important}
 html[data-theme="dark"] body.crm-hierarchy-ready .m3-contact-identity{display:flex;align-items:center;gap:8px;padding:10px 12px;border-bottom:1px solid var(--dina-border)}
 html[data-theme="dark"] body.crm-hierarchy-ready .m3-contact-avatar{display:grid;place-items:center;flex:0 0 34px;height:34px;border-radius:50%;background:var(--dina-selected);color:#f3fbff;font-size:11px;font-weight:700}
 html[data-theme="dark"] body.crm-hierarchy-ready .m3-contact-identity>div{display:grid;gap:2px;min-width:0}
 html[data-theme="dark"] body.crm-hierarchy-ready .m3-contact-identity strong{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 html[data-theme="dark"] body.crm-hierarchy-ready .m3-contact-identity small{font-size:10px;color:var(--dina-text-secondary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 html[data-theme="dark"] body.crm-hierarchy-ready .m3-tab-panel{padding:9px 12px;font-size:12px;color:var(--dina-text-main)}
 html[data-theme="dark"] body.crm-hierarchy-ready .m3-tab-panel :is(h3,p){margin:0 0 8px}
 html[data-theme="dark"] body.crm-hierarchy-ready .m3-entry{display:grid;gap:3px;padding:8px 0;border-bottom:1px solid var(--dina-border);overflow-wrap:anywhere}
 html[data-theme="dark"] body.crm-hierarchy-ready .m3-entry small{color:var(--dina-text-muted)}
 html[data-theme="dark"] body.crm-hierarchy-ready .m3-entry a{color:var(--dina-primary-hover)}
 html[data-theme="dark"] body.crm-hierarchy-ready .contact-summary{padding:8px 12px;gap:8px}
 html[data-theme="dark"] body.crm-hierarchy-ready .contact-summary dl>div{padding:5px 0}
 html[data-theme="dark"] body.crm-hierarchy-ready .contact-group-label{margin:4px 0 0}
 html[data-theme="dark"] body.crm-hierarchy-ready .contact-panel .conversation-labels{padding:8px 12px}
 html[data-theme="dark"] body.crm-hierarchy-ready #crm-module-list{scrollbar-width:thin}
 html[data-theme="dark"] body.crm-hierarchy-ready .m3-inbox-resize{position:absolute;inset:0 -4px 0 auto;width:8px;cursor:col-resize;z-index:8}
 html[data-theme="dark"] body.crm-hierarchy-ready .inbox{position:relative}
 html[data-theme="dark"] body.crm-hierarchy-ready .m3-inbox-resize:hover,html[data-theme="dark"] body.crm-hierarchy-ready .m3-inbox-resize:focus-visible{background:#9CCBFA55}
 html[data-theme="dark"] body.crm-hierarchy-ready .workspace{overflow:hidden}
}
@media (min-width:1100px) and (max-width:1399px){
 html[data-theme="dark"] body.crm-hierarchy-ready .conversation-inner.contact-panel-open{grid-template-columns:minmax(0,1fr) 280px}
 html[data-theme="dark"] body.crm-hierarchy-ready .workspace{--m3-inbox-width:300px}
}
@media (min-width:1100px){
 body.crm-hierarchy-ready .inbox{position:relative}
 body.crm-hierarchy-ready .m3-inbox-resize{position:absolute;inset:0 -4px 0 auto;width:8px;cursor:col-resize;z-index:8}
 body.crm-hierarchy-ready .m3-inbox-resize:focus-visible{outline:2px solid #19cda8}
 html:not([data-theme="dark"]) body.crm-hierarchy-ready .workspace{grid-template-columns:var(--m3-inbox-width,clamp(300px,25vw,344px)) minmax(0,1fr)!important}
 html:not([data-theme="dark"]) body.crm-hierarchy-ready .conversation-inner.contact-panel-open{grid-template-columns:minmax(0,1fr) clamp(280px,21vw,320px)}
 html:not([data-theme="dark"]) body.crm-hierarchy-ready .contact-panel{position:relative;right:auto;top:auto;bottom:auto;width:auto;grid-column:2;grid-row:1/-1;box-shadow:none}
 html:not([data-theme="dark"]) body.crm-hierarchy-ready .m3-tabs{display:flex;overflow-x:auto}
 html:not([data-theme="dark"]) body.crm-hierarchy-ready .m3-tabs button{border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;padding:6px;font-size:11px;cursor:pointer}
 html:not([data-theme="dark"]) body.crm-hierarchy-ready .m3-tabs button[aria-selected="true"]{border-color:#087f6c;color:#075d52}
 html:not([data-theme="dark"]) body.crm-hierarchy-ready .m3-contact-identity{display:flex;align-items:center;gap:8px;padding:10px 14px;border-bottom:1px solid var(--line)}
 html:not([data-theme="dark"]) body.crm-hierarchy-ready .m3-contact-avatar{display:grid;place-items:center;flex:0 0 34px;height:34px;border-radius:50%;background:#dbeafe;font-size:11px;font-weight:700}
 html:not([data-theme="dark"]) body.crm-hierarchy-ready .m3-contact-identity>div{display:grid;gap:2px;min-width:0}
 html:not([data-theme="dark"]) body.crm-hierarchy-ready .m3-contact-identity small{font-size:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 html:not([data-theme="dark"]) body.crm-hierarchy-ready .m3-tab-panel{padding:10px 14px}
 html:not([data-theme="dark"]) body.crm-hierarchy-ready .m3-tab-panel[hidden]{display:none!important}
 html:not([data-theme="dark"]) body.crm-hierarchy-ready .m3-entry{display:grid;gap:3px;padding:8px 0;border-bottom:1px solid var(--line)}
}
/* Conversation wallpaper and compact desktop inbox. */
@media (min-width:1100px){
 html[data-theme="dark"] body.crm-hierarchy-ready .messages{background-color:#111b20;background-image:linear-gradient(#111b2040,#111b2040),url('/chat-wallpaper.svg?v=3');background-size:auto,215px 215px;background-repeat:repeat;}
 html[data-theme="dark"] body.crm-hierarchy-ready .message{padding:7px 10px;border:0;box-shadow:0 1px 2px #0004;line-height:1.35}
 html[data-theme="dark"] body.crm-hierarchy-ready .message.INBOUND{background:#202c33;border-radius:3px 9px 9px 9px}
 html[data-theme="dark"] body.crm-hierarchy-ready .message.OUTBOUND{background:#005c4b;border-radius:9px 3px 9px 9px}
 html[data-theme="dark"] body.crm-hierarchy-ready .message small{color:#a6bbbe}
 html[data-theme="dark"] body.crm-hierarchy-ready .inbox-toolbar{padding:8px 10px;gap:7px}
 html[data-theme="dark"] body.crm-hierarchy-ready .inbox-actions{display:flex;flex-wrap:wrap;justify-content:space-between;gap:6px}
 html[data-theme="dark"] body.crm-hierarchy-ready .inbox-actions>*{min-width:0}
 html[data-theme="dark"] body.crm-hierarchy-ready .inbox-open{min-height:82px;padding:7px 3px 7px 9px;align-items:center;grid-template-columns:38px minmax(0,1fr) auto;gap:8px}
 html[data-theme="dark"] body.crm-hierarchy-ready .inbox .contact-avatar{width:38px;height:38px;align-self:center}
 html[data-theme="dark"] body.crm-hierarchy-ready .inbox-copy{display:grid;gap:2px;align-content:center;line-height:1.2}
 html[data-theme="dark"] body.crm-hierarchy-ready .inbox .inbox-name{font-size:12px!important;line-height:16px!important}
 html[data-theme="dark"] body.crm-hierarchy-ready .inbox .inbox-head time{font-size:10px;line-height:14px}
 html[data-theme="dark"] body.crm-hierarchy-ready .inbox .inbox-phone{font-size:10px!important;line-height:12px!important}
 html[data-theme="dark"] body.crm-hierarchy-ready .inbox .preview{font-size:11px!important;line-height:14px;white-space:nowrap;text-overflow:ellipsis}
 html[data-theme="dark"] body.crm-hierarchy-ready .ticket-tags{height:16px;max-height:16px;gap:3px}
 html[data-theme="dark"] body.crm-hierarchy-ready .ticket-tags>span{font-size:9px!important;line-height:13px;padding:1px 5px}
 html[data-theme="dark"] body.crm-hierarchy-ready .work-indicator{display:flex;align-items:center;gap:4px;min-height:15px;overflow:hidden;white-space:nowrap}
 html[data-theme="dark"] body.crm-hierarchy-ready .work-indicator>*{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 html[data-theme="dark"] body.crm-hierarchy-ready .inbox-peek{align-self:center}
 .m3-filter-popover[hidden]{display:none!important}
 .m3-filter-popover{position:fixed!important;z-index:1000;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;width:min(360px,calc(100vw - 24px));max-height:min(580px,calc(100dvh - 90px));overflow-y:auto;padding:12px!important;border:1px solid #42516a!important;border-radius:13px;background:#273142!important;box-shadow:0 20px 55px #0009;color:#eef4f9}
 .m3-filter-popover .m3-filter-header{order:-10;grid-column:1/-1;display:flex;justify-content:space-between;align-items:center;min-height:30px;padding-bottom:6px;border-bottom:1px solid #48566b}
 .m3-filter-popover .m3-filter-header strong{font-size:14px;color:#f4f7fb}
 .m3-filter-popover .m3-filter-close{width:30px;height:30px;border:0;border-radius:7px;background:transparent;color:#d9e4ee;font-size:24px;line-height:1;cursor:pointer}
 .m3-filter-popover .m3-filter-close:hover,.m3-filter-popover .m3-filter-close:focus-visible{background:#46536a;outline:2px solid #67d7c4}
 .m3-filter-popover label{color:#dae5ee!important;font-size:11px!important;font-weight:600!important}
 .m3-filter-popover label:has(#filter-label),.m3-filter-popover label:has(#filter-department),.m3-filter-popover label:has(#filter-connection),.m3-filter-popover label:has(#filter-responsible){grid-column:1/-1}
 .m3-filter-popover label:has(#filter-label){order:1}
 .m3-filter-popover label:has(#filter-department){order:2}
 .m3-filter-popover label:has(#filter-connection){order:3}
 .m3-filter-popover label:has(#filter-responsible){order:4}
 .m3-filter-popover label:has(#filter-from){order:5}
 .m3-filter-popover label:has(#filter-to){order:6}
 .m3-filter-popover #clear-filters{order:7;grid-column:1/-1;justify-self:stretch}
 .m3-filter-popover #export-contacts{order:8;grid-column:1/-1;justify-self:stretch}
 .m3-filter-popover input,.m3-filter-popover select{height:38px!important;border:1px solid #59667b!important;border-radius:7px!important;background:#384357!important;color:#f1f6fa!important;font-size:13px!important}
 .m3-filter-popover input:focus-visible,.m3-filter-popover select:focus-visible{outline:2px solid #52d5bb;outline-offset:1px}
 .m3-filter-popover .visually-hidden{position:absolute!important}
}
/* Roomier conversation rows and Whaticket-style status buttons. */
@media (min-width:1100px){
 html[data-theme="dark"] body.crm-hierarchy-ready .workspace{--m3-inbox-width:clamp(340px,24vw,400px)}
 html[data-theme="dark"] body.crm-hierarchy-ready .queue-tabs.m3-queue-buttons{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));align-items:stretch;gap:5px;overflow:visible;width:100%;padding:3px 0 0}
 html[data-theme="dark"] body.crm-hierarchy-ready .queue-tabs.m3-queue-buttons>button{display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0!important;width:auto!important;min-height:46px!important;padding:6px 2px!important;border:1px solid #30485a!important;border-radius:10px!important;background:#172d3d!important;color:#cbdde8!important;box-shadow:none;font-size:10px!important;line-height:1.1!important;white-space:normal!important;text-align:center;cursor:pointer}
 html[data-theme="dark"] body.crm-hierarchy-ready .queue-tabs.m3-queue-buttons>button:hover{border-color:#46a995!important;background:#1c3c49!important}
 html[data-theme="dark"] body.crm-hierarchy-ready .queue-tabs.m3-queue-buttons>button.active{border-color:#20d0a7!important;background:#087967!important;color:#fff!important;box-shadow:inset 0 -2px #24e2b8}
 html[data-theme="dark"] body.crm-hierarchy-ready .queue-tabs.m3-queue-buttons>button span{min-width:17px;height:16px;padding:1px 4px;border-radius:9px;background:#31495a!important;color:#e5f4f7!important;font-size:9px!important;line-height:14px}
 html[data-theme="dark"] body.crm-hierarchy-ready .queue-tabs.m3-queue-buttons>button.active span{background:#d9fff2!important;color:#075948!important}
 html[data-theme="dark"] body.crm-hierarchy-ready .queue-tabs.m3-queue-buttons>.queue-more{grid-column:1/-1;justify-self:end;margin-top:1px}
 html[data-theme="dark"] body.crm-hierarchy-ready .queue-tabs.m3-queue-buttons>.queue-more>summary{min-height:24px;padding:3px 8px;border:1px solid #30485a;border-radius:7px;background:#14293a;color:#bfd3dd;font-size:10px;cursor:pointer}
 html[data-theme="dark"] body.crm-hierarchy-ready .queue-tabs.m3-queue-buttons>.queue-more[open]>div{z-index:20;min-width:160px;padding:5px;border:1px solid #42576a;border-radius:9px;background:#253648;box-shadow:0 12px 28px #0008}
 html[data-theme="dark"] body.crm-hierarchy-ready .queue-tabs.m3-queue-buttons>.queue-more>div button{display:block;width:100%;min-height:31px;padding:5px 8px;border:0;border-radius:6px;background:transparent;color:#e6f2f7;text-align:left;font-size:11px;cursor:pointer}
 html[data-theme="dark"] body.crm-hierarchy-ready .queue-tabs.m3-queue-buttons>.queue-more>div button:hover,html[data-theme="dark"] body.crm-hierarchy-ready .queue-tabs.m3-queue-buttons>.queue-more>div button.active{background:#137765;color:#fff}
 html[data-theme="dark"] body.crm-hierarchy-ready .inbox-open{min-height:112px;padding:10px 5px 10px 10px;grid-template-columns:42px minmax(0,1fr) auto;gap:10px}
 html[data-theme="dark"] body.crm-hierarchy-ready .inbox .contact-avatar{width:42px;height:42px}
 html[data-theme="dark"] body.crm-hierarchy-ready .inbox-copy{gap:4px;line-height:1.25}
 html[data-theme="dark"] body.crm-hierarchy-ready .inbox .inbox-name{font-size:13px!important;line-height:18px!important}
 html[data-theme="dark"] body.crm-hierarchy-ready .inbox .inbox-phone{font-size:11px!important;line-height:14px!important}
 html[data-theme="dark"] body.crm-hierarchy-ready .inbox .preview{font-size:12px!important;line-height:16px}
 html[data-theme="dark"] body.crm-hierarchy-ready .ticket-tags{height:auto;max-height:42px;min-height:20px;flex-wrap:wrap;gap:4px 5px;margin-top:3px}
 html[data-theme="dark"] body.crm-hierarchy-ready .ticket-tags>span{font-size:10px!important;line-height:15px;padding:2px 6px}
 html[data-theme="dark"] body.crm-hierarchy-ready .ticket-tags>.channel-tag,html[data-theme="dark"] body.crm-hierarchy-ready .ticket-tags>.assignee{max-width:94px}
 html[data-theme="dark"] body.crm-hierarchy-ready .work-indicator{min-height:18px;margin-top:3px}
 html[data-theme="dark"] body.crm-hierarchy-ready .inbox-peek{margin-right:5px}
}
@media (min-width:1100px) and (max-width:1399px){
 html[data-theme="dark"] body.crm-hierarchy-ready .workspace{--m3-inbox-width:340px}
}
/* Keep desktop filters compact; follow-up notifications remain outside this panel. */
@media (min-width:1100px){
 .m3-filter-popover{width:min(420px,calc(100vw - 24px));gap:7px;padding:10px!important;align-content:start}
 .m3-filter-popover .m3-filter-header{min-height:27px;padding-bottom:4px}
 .m3-filter-popover .efficiency-views{order:-5;grid-column:1/-1;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:7px;min-width:0}
 .m3-filter-popover .efficiency-views label{min-width:0}
 .m3-filter-popover .efficiency-views button{min-height:34px;padding:5px 8px;white-space:nowrap;font-size:11px}
 .m3-filter-popover label:has(#filter-label),.m3-filter-popover label:has(#filter-department),.m3-filter-popover label:has(#filter-connection),.m3-filter-popover label:has(#filter-responsible){grid-column:auto}
 .m3-filter-popover label{gap:3px;font-size:10px!important}
 .m3-filter-popover input,.m3-filter-popover select{height:34px!important;padding:5px 8px!important;font-size:12px!important}
 .m3-filter-popover #clear-filters{grid-column:1;min-height:34px}
 .m3-filter-popover #export-contacts{grid-column:2;min-height:34px}
 .m3-filter-popover:has(#export-contacts[hidden]) #clear-filters{grid-column:1/-1}
}
/* Gray blue palette: desktop hierarchy uses the shared dark theme tokens. */
@media (min-width:1100px){
 html[data-theme="dark"] body.crm-hierarchy-ready{--dina-canvas:var(--dina-bg);--dina-panel:var(--dina-surface);--dina-subtle:var(--dina-input);--dina-line:var(--dina-border);--dina-text:#edf6f8;--dina-secondary:#b4ccd4;--dina-faint:#8caab6;--dina-accent:var(--dina-primary);--dina-accent-strong:var(--dina-primary-hover);--dina-focus:var(--dina-primary)}
 html[data-theme="dark"] body.crm-hierarchy-ready #app-view,html[data-theme="dark"] body.crm-hierarchy-ready .workspace{background:var(--dina-bg)}
 html[data-theme="dark"] body.crm-hierarchy-ready .topbar{background:var(--dina-bg);border-color:var(--dina-border)}
 html[data-theme="dark"] body.crm-hierarchy-ready #crm-area-rail{background:var(--dina-sidebar);border-color:var(--dina-border)}
 html[data-theme="dark"] body.crm-hierarchy-ready #session-actions{background:var(--dina-surface);border-color:var(--dina-border)}
 html[data-theme="dark"] body.crm-hierarchy-ready .inbox,html[data-theme="dark"] body.crm-hierarchy-ready .conversation{background:var(--dina-surface);border-color:var(--dina-border)}
 html[data-theme="dark"] body.crm-hierarchy-ready .inbox-toolbar,html[data-theme="dark"] body.crm-hierarchy-ready .conversation-head,html[data-theme="dark"] body.crm-hierarchy-ready .chat-visible-labels,html[data-theme="dark"] body.crm-hierarchy-ready .composer{background:var(--dina-surface);border-color:var(--dina-border)}
 html[data-theme="dark"] body.crm-hierarchy-ready .inbox-search{background:var(--dina-input);border-color:var(--dina-border)}
 html[data-theme="dark"] body.crm-hierarchy-ready .inbox-search:focus-within{background:var(--dina-input);border-color:var(--dina-primary);box-shadow:0 0 0 2px var(--dina-primary)40}
 html[data-theme="dark"] body.crm-hierarchy-ready .inbox-search input:focus,html[data-theme="dark"] body.crm-hierarchy-ready .inbox-search input:focus-visible{outline:none!important;outline-offset:0!important;box-shadow:none!important;border:0!important}
 html[data-theme="dark"] body.crm-hierarchy-ready .inbox-item{background:var(--dina-surface);border-color:var(--dina-border)}
 html[data-theme="dark"] body.crm-hierarchy-ready .inbox-item:hover{background:var(--dina-hover)}
 html[data-theme="dark"] body.crm-hierarchy-ready .inbox-item.active{background:var(--dina-selected)}
 html[data-theme="dark"] body.crm-hierarchy-ready .queue-tabs.m3-queue-buttons>button{background:var(--dina-surface-raised)!important;border-color:var(--dina-border)!important;color:var(--dina-text-secondary)!important}
 html[data-theme="dark"] body.crm-hierarchy-ready .queue-tabs.m3-queue-buttons>button:hover{background:var(--dina-hover)!important;border-color:var(--dina-primary)!important}
 html[data-theme="dark"] body.crm-hierarchy-ready .queue-tabs.m3-queue-buttons>button.active{background:var(--dina-primary)!important;border-color:var(--dina-primary)!important;color:var(--dina-primary-ink)!important;box-shadow:inset 0 -2px var(--dina-primary)}
 html[data-theme="dark"] body.crm-hierarchy-ready .queue-tabs.m3-queue-buttons>.queue-more>summary{background:var(--dina-surface-raised);border-color:var(--dina-border);color:var(--dina-text-secondary)}
 html[data-theme="dark"] body.crm-hierarchy-ready .queue-tabs.m3-queue-buttons>.queue-more[open]>div{background:var(--dina-surface-raised);border-color:var(--dina-border)}
 html[data-theme="dark"] body.crm-hierarchy-ready .contact-panel{background:var(--dina-surface);border-color:var(--dina-border)}
 html[data-theme="dark"] body.crm-hierarchy-ready .contact-panel-heading,html[data-theme="dark"] body.crm-hierarchy-ready .m3-contact-identity{border-color:var(--dina-border)}
 html[data-theme="dark"] body.crm-hierarchy-ready .m3-tabs button[aria-selected="true"]{border-color:var(--dina-primary);color:var(--dina-primary-hover)}
 html[data-theme="dark"] body.crm-hierarchy-ready .messages{background-color:var(--dina-bg)!important;background-image:linear-gradient(#1F243040,#1F243040),url('/chat-wallpaper.svg?v=3')}
 html[data-theme="dark"] body.crm-hierarchy-ready .message.OUTBOUND{background:var(--dina-selected)}
 html[data-theme="dark"] body.crm-hierarchy-ready .composer textarea{background:var(--dina-input);border-color:var(--dina-border)}
 html[data-theme="dark"] body.crm-hierarchy-ready .send-button{background:var(--dina-primary);color:var(--dina-primary-ink)}
 html[data-theme="dark"] body.crm-hierarchy-ready .send-button:hover{background:var(--dina-primary-hover)}
 html[data-theme="dark"] body.crm-hierarchy-ready .m3-filter-popover{background:var(--dina-surface)!important;border-color:var(--dina-border)!important}
 html[data-theme="dark"] body.crm-hierarchy-ready .m3-filter-popover input,html[data-theme="dark"] body.crm-hierarchy-ready .m3-filter-popover select{background:var(--dina-input)!important;border-color:var(--dina-border)!important}
}
