.wa-fullscreen>.wa-web-inbox.crm-spaces-root{display:grid!important;grid-template-columns:60px minmax(0,1fr);grid-template-rows:minmax(0,1fr);height:100%!important;min-height:0}
.crm-spaces-nav{grid-column:1;grid-row:1;display:flex;flex-direction:column;gap:7px;padding:12px 4px;background:var(--cw-bg,#f0f2f5);border-right:1px solid var(--cw-border,#e9edef);min-height:0}
.crm-spaces-nav button{display:grid;place-items:center;gap:2px;min-height:55px;padding:5px 1px;border:0;border-radius:12px;background:transparent;color:var(--cw-muted,#54656f);cursor:pointer}
.crm-spaces-nav button>span{font:25px/1 system-ui}
.crm-spaces-nav button small{font:10px/1.3 "Segoe UI",sans-serif;color:inherit}
.crm-spaces-nav button[aria-pressed=true]{background:#d9f4e7;color:#006b58}
.crm-spaces-root>.wa-chat-section{grid-column:2;grid-row:1;min-height:0;min-width:0;height:100%!important}
.crm-spaces-root[data-space-mode=groups]>.wa-chat-section,.crm-spaces-root[data-space-mode=channels]>.wa-chat-section{display:none}
.crm-spaces-root[data-space-mode=chats]>.crm-spaces-view{display:none}
.crm-spaces-view{grid-column:2;grid-row:1;display:grid;grid-template-columns:minmax(250px,29%) minmax(0,1fr);min-height:0;min-width:0;overflow:hidden;color:var(--cw-text,#111b21);font:14px/1.4 "Segoe UI",system-ui,sans-serif;background:var(--cw-surface,#fff)}
.crm-space-list{min-height:0;display:flex;flex-direction:column;border-right:1px solid var(--cw-border,#e9edef);overflow:hidden}
.crm-space-list>header{display:flex;align-items:center;justify-content:space-between;padding:14px 15px 8px}
.crm-space-list h2{font:600 22px "Segoe UI",sans-serif;letter-spacing:-.5px;margin:0;color:inherit}
.crm-space-list>header button{border:0;border-radius:50%;width:34px;height:34px;background:transparent;color:inherit;font-size:24px;cursor:pointer}
.crm-space-search{padding:3px 12px 6px;margin:0}
.crm-space-search input{width:100%;height:36px;min-width:0;border:0;border-radius:9px;padding:8px 12px;font:13px "Segoe UI",sans-serif;background:var(--cw-bg,#f0f2f5);color:inherit}
.crm-space-connection{padding:4px 13px 9px;font-size:11px;color:var(--cw-muted,#667781)}
.crm-space-items{flex:1;min-height:0;overflow:auto}
.crm-space-item{display:flex;align-items:center;gap:10px;padding:12px;border:0;border-bottom:1px solid var(--cw-border,#edf1f2);background:transparent;color:inherit;cursor:pointer;width:100%;text-align:left}
.crm-space-item:hover,.crm-space-item.is-selected{background:var(--cw-bg,#edf4f0)}
.crm-space-avatar{display:grid;place-items:center;flex:0 0 40px;width:40px;height:40px;border-radius:50%;background:#d9ece2;color:#17664d;font-weight:600}
.crm-space-item>span:nth-child(2){min-width:0;flex:1}
.crm-space-item strong,.crm-space-item small,.crm-space-item em{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.crm-space-item strong{font-weight:600;font-size:14px}
.crm-space-item small,.crm-space-item em{font-size:11px;color:var(--cw-muted,#667781);font-style:normal;margin-top:3px}
.crm-space-item b{font-size:11px;background:#d9f4e7;border-radius:12px;padding:2px 6px;color:#006b58}
.crm-space-config{display:block;padding:11px 13px;font-size:12px;color:#087b65;border-top:1px solid var(--cw-border,#e9edef)}
.crm-space-configured{margin:12px;padding:12px;border:1px solid var(--cw-border,#e9edef);border-radius:10px;font-size:12px}
.crm-space-configured p{margin:6px 0;color:var(--cw-muted,#667781)}
.crm-space-configured a{color:#087b65;text-decoration:underline}
.crm-space-detail{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden;background:var(--cw-bg,#f0f2f5)}
.crm-space-header{display:flex;align-items:center;gap:8px;flex:0 0 auto;padding:10px 48px 10px 14px;min-height:60px;background:var(--cw-surface,#fff);border-bottom:1px solid var(--cw-border,#e9edef)}
.crm-space-header>div{flex:1;min-width:0}
.crm-space-header strong,.crm-space-header small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.crm-space-header small{font-size:11px;color:var(--cw-muted,#667781);margin-top:3px}
.crm-space-header button,.crm-space-thread-actions button{border:1px solid var(--cw-border,#dce5e7);border-radius:9px;background:var(--cw-surface,#fff);color:inherit;padding:7px 9px;font-size:12px;cursor:pointer}
.crm-space-back{display:none}
.crm-space-thread-actions{display:flex;gap:5px;flex-wrap:wrap;padding:6px 10px;background:var(--cw-surface,#fff);flex-shrink:0}
.crm-space-thread-actions button{font-size:11px;padding:5px 8px}
.crm-space-history{display:flex;flex-direction:column;flex:1 1 0;min-height:0;overflow:auto;gap:7px;padding:15px clamp(10px,3vw,45px);background:#efeae2;overscroll-behavior:contain}
.crm-space-history .wa-chat-bubble{flex-shrink:0;max-width:88%;padding:8px 12px;border-radius:9px;overflow-wrap:anywhere;color:#111b21;background:#fff}
.crm-space-history .wa-chat-outgoing{align-self:flex-end;background:#d9fdd3}
.crm-space-history .wa-chat-incoming{align-self:flex-start}
.crm-space-history p{margin:3px 0;white-space:pre-wrap;color:inherit;font-size:14px}
.crm-space-author{font-size:11px;color:#087b65;font-weight:600}
.crm-space-history small{display:block;text-align:right;font-size:10px;color:#667781}
.crm-space-notice{margin:0;padding:5px 12px;font-size:11px;color:var(--cw-muted,#54656f);flex-shrink:0}
.crm-space-notice:empty{display:none}
.crm-space-compose{display:flex;gap:8px;align-items:center;margin:0;padding:8px 10px max(8px,env(safe-area-inset-bottom));flex:0 0 auto}
.crm-space-compose textarea{flex:1;min-width:0;resize:vertical;height:42px;min-height:42px;max-height:120px;border:0;border-radius:10px;padding:10px 12px;background:var(--cw-surface,#fff);color:inherit;font:15px "Segoe UI",sans-serif}
.crm-space-compose button{border:0;border-radius:20px;padding:11px 17px;background:#008069;color:#fff;font-weight:600;cursor:pointer}
.crm-space-compose button:disabled{opacity:.5;cursor:default}
.crm-space-readonly{font-size:12px;color:var(--cw-muted,#54656f);padding:12px;margin:0}
.crm-space-welcome{margin:auto;text-align:center;max-width:420px;padding:24px}
.crm-space-welcome>span{font-size:56px;color:#008069}
.crm-space-welcome h2{font:500 24px "Segoe UI",sans-serif;margin:8px 0}
.crm-space-welcome p,.crm-space-empty p{font-size:13px;color:var(--cw-muted,#667781)}
.crm-space-empty{padding:20px 14px;font-size:13px}
.crm-space-dialog{width:min(470px,calc(100vw - 24px));max-height:calc(100dvh - 30px);overflow:auto;padding:18px;border:1px solid #dce5e7;border-radius:14px;background:#fff;color:#172a31;font:14px/1.4 "Segoe UI",sans-serif}
.crm-space-dialog::backdrop{background:#071c2670}
.crm-space-dialog header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.crm-space-dialog h2{font:600 19px "Segoe UI",sans-serif;margin:0}
.crm-space-dialog h3{font-size:14px}
.crm-space-dialog header button{border:0;border-radius:50%;width:32px;height:32px;font-size:24px;cursor:pointer}
.crm-space-edit{display:grid;gap:10px}
.crm-space-edit label{display:grid;gap:6px;font-size:12px}
.crm-space-edit input,.crm-space-edit textarea{font:14px "Segoe UI",sans-serif;border:1px solid #dce5e7;border-radius:8px;padding:10px;max-width:100%}
.crm-space-edit button{justify-self:start;border:0;border-radius:8px;background:#008069;color:#fff;padding:9px 12px;cursor:pointer}
.crm-space-dialog li{padding:5px 0;font-size:12px}
.crm-spaces-root [hidden]{display:none!important}
.crm-spaces-root button:focus-visible{outline:2px solid #008069;outline-offset:-2px}
.crm-spaces-root.crm-dark .crm-space-history{background:#0b141a}
.crm-spaces-root.crm-dark .crm-space-history .wa-chat-incoming{background:#202c33;color:#e9edef}
.crm-spaces-root.crm-dark .crm-space-history .wa-chat-outgoing{background:#005c4b;color:#e9edef}
@media(max-width:760px){
 .wa-fullscreen>.wa-web-inbox.crm-spaces-root{grid-template-columns:minmax(0,1fr);grid-template-rows:40px minmax(0,1fr)}
 .crm-spaces-nav{grid-column:1;grid-row:1;flex-direction:row;padding:3px 45px 3px 5px;gap:5px;border-right:0;border-bottom:1px solid var(--cw-border,#e9edef)}
 .crm-spaces-nav button{display:flex;gap:6px;padding:3px 11px;min-height:32px;border-radius:16px}
 .crm-spaces-nav button>span{font-size:20px}
 .crm-spaces-nav button small{font-size:12px}
 .crm-spaces-root>.wa-chat-section,.crm-spaces-view{grid-column:1;grid-row:2}
 .crm-spaces-view{grid-template-columns:minmax(0,1fr)}
 .crm-spaces-view>.crm-space-detail{display:none}
 .crm-spaces-root.crm-space-thread-open .crm-space-list{display:none}
 .crm-spaces-root.crm-space-thread-open .crm-space-detail{display:flex}
 .crm-space-header{padding:8px;gap:6px;min-height:55px}
 .crm-space-header button{font-size:11px;padding:6px}
 .crm-space-back{display:block}
 .crm-space-header strong{font-size:13px}
 .crm-space-thread-actions{padding:4px 6px}
}
