/* UI 127: scoped layout ownership. No business data, permissions or global theme changes. */
:root[data-design] body.ui127-active .server93{display:none!important}
:root[data-design] body.ui127-active .main{padding-right:0!important;min-width:0}
:root[data-design] body.ui127-active .main>#page{width:100%!important;max-width:none!important;margin:0!important;padding:24px 28px 16px!important;box-sizing:border-box}
:root[data-design] body.ui127-active #page .page-head{margin-bottom:22px;gap:20px;align-items:flex-start}
:root[data-design] body.ui127-active #page .page-head h1{font-size:28px!important;line-height:1.25!important;letter-spacing:-.5px;overflow-wrap:anywhere}
:root[data-design] body.ui127-active #page .page-head p{font-size:14px!important;line-height:1.5;margin-top:6px}
:root[data-design] body.ui127-active #page :is(button,input,textarea,select){font-family:inherit;box-sizing:border-box}
:root[data-design] body.ui127-active #page .u127-tabs{width:fit-content;max-width:100%;margin:0 0 16px;padding:4px;gap:4px;min-height:48px;border-radius:13px;background:var(--surface2)}
:root[data-design] body.ui127-active #page .u127-tabs button{min-height:38px;padding:9px 16px;font-size:14px!important;line-height:1.3;white-space:nowrap}
:root[data-design] body.ui127-active #page .chat-layout.u127-workspace{display:grid!important;grid-template-columns:minmax(280px,320px) minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr)!important;gap:0!important;height:var(--u127-space,65dvh)!important;max-height:none!important;min-height:0!important;width:100%!important;margin:0!important;padding:0!important;border:1px solid var(--line);border-radius:18px;overflow:hidden;background:var(--surface);box-shadow:var(--shadow)}
:root[data-design] body.ui127-active #page .u127-workspace>:is(.chat-main,.chat-list,.chat-side){position:relative!important;inset:auto!important;min-width:0!important;min-height:0!important;max-height:100%!important;height:100%!important;width:auto!important;margin:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;background:var(--surface)!important}
:root[data-design] body.ui127-active #page .u127-workspace>.chat-list{display:flex!important;flex-direction:column!important;padding:0!important;border-right:1px solid var(--line)!important;overflow:hidden!important}
:root[data-design] body.ui127-active #page .u127-search{display:block;padding:16px;border-bottom:1px solid var(--line)}
:root[data-design] body.ui127-active #page #chat-list-search{height:46px;min-height:46px;border:1px solid var(--line);border-radius:11px;padding:10px 12px;font-size:14px!important;background:var(--surface2)}
:root[data-design] body.ui127-active #page .chat-list .list{display:block!important;flex:1;min-height:0;margin:0!important;padding:8px!important;overflow:auto!important;overscroll-behavior:contain;scrollbar-gutter:stable}
:root[data-design] body.ui127-active #page .chat-list .u127-row{display:grid!important;grid-template-columns:42px minmax(0,1fr) auto!important;align-items:start!important;gap:10px!important;width:100%!important;min-width:0!important;max-width:100%!important;margin:0 0 3px!important;padding:13px 10px!important;min-height:96px!important;height:auto!important;border:0!important;border-radius:12px!important;text-align:left;white-space:normal;transform:none!important;background:transparent}
:root[data-design] body.ui127-active #page .chat-list .u127-row.active{background:var(--soft)!important;color:var(--ink)!important}
:root[data-design] body.ui127-active #page .u127-row .p8-dialog-avatar{width:42px!important;height:42px!important;min-width:42px!important;min-height:42px!important;flex:none;padding:0!important;border-radius:12px;overflow:hidden}
:root[data-design] body.ui127-active #page .u127-row .p8-dialog-copy{display:block!important;min-width:0!important;width:auto!important}
:root[data-design] body.ui127-active #page .u127-row .p8-dialog-copy b{display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:14px!important;line-height:1.4!important;font-weight:650;white-space:normal!important;overflow:hidden!important;overflow-wrap:anywhere}
:root[data-design] body.ui127-active #page .u127-row .p8-dialog-copy small{display:block;margin-top:5px;font-size:13px!important;line-height:1.4;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;color:var(--muted)}
:root[data-design] body.ui127-active #page .u127-row-meta{display:block;font-size:11px!important;line-height:1.45;margin-top:5px;color:var(--muted);overflow-wrap:anywhere}
:root[data-design] body.ui127-active #page .u127-row .p8-dialog-meta{min-width:0!important;display:flex;flex-direction:column;align-items:flex-end;gap:9px;font-size:11px;white-space:nowrap;padding-top:2px}
:root[data-design] body.ui127-active #page .p8-unread{min-width:20px;min-height:20px;display:grid;place-items:center;padding:2px 6px;border-radius:12px;background:var(--accent);color:white;font-size:11px}
:root[data-design] body.ui127-active #page .u127-workspace>.chat-main{display:flex!important;flex-direction:column!important;padding:0!important;overflow:hidden!important}
:root[data-design] body.ui127-active #page .u127-thread{display:flex;flex-direction:column;flex:1;min-width:0;min-height:0;height:100%;overflow:hidden}
:root[data-design] body.ui127-active #page .u127-head{display:flex!important;position:relative!important;inset:auto!important;flex:0 0 auto!important;gap:14px;align-items:center;min-height:76px!important;padding:14px 20px!important;border-bottom:1px solid var(--line);background:var(--surface)!important;z-index:2}
:root[data-design] body.ui127-active #page .u127-head>.u127-title{flex:1;min-width:0;display:block!important;padding:0!important;overflow:hidden}
:root[data-design] body.ui127-active #page .u127-head .p8-head-avatar{display:none!important}
:root[data-design] body.ui127-active #page .u127-title strong{display:block;font-size:16px!important;line-height:1.4!important;font-weight:650;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
:root[data-design] body.ui127-active #page .u127-title small{display:block!important;margin-top:4px!important;font-size:12px!important;line-height:1.4;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
:root[data-design] body.ui127-active #page .u127-head-actions{flex:0 0 auto;display:flex!important;gap:8px;min-width:0;align-items:center}
:root[data-design] body.ui127-active #page .u127-head-actions button{min-height:40px;white-space:nowrap;font-size:13px!important}
:root[data-design] body.ui127-active #page .u127-back{display:none!important}
:root[data-design] body.ui127-active #page .u127-workspace .chat-side{display:none!important}
:root[data-design] body.ui127-active.u127-info-open #page .u127-workspace{grid-template-columns:minmax(260px,300px) minmax(0,1fr) 300px!important}
:root[data-design] body.ui127-active.u127-info-open #page .u127-workspace>.chat-side{display:block!important;border-left:1px solid var(--line)!important;overflow:auto!important;padding:0 18px 20px!important}
:root[data-design] body.ui127-active #page .u127-inspector-head{display:flex;justify-content:space-between;align-items:center;position:sticky;top:0;z-index:2;padding:12px 0;gap:12px;background:var(--surface);border-bottom:1px solid var(--line);margin-bottom:20px}
:root[data-design] body.ui127-active #page .u127-inspector-head button{width:40px;min-height:40px;padding:8px}
:root[data-design] body.ui127-active #page :is(.u127-thread,.u127-workspace>.chat-main)>.messages{display:flex!important;flex-direction:column!important;flex:1 1 0!important;min-height:0!important;height:auto!important;max-height:none!important;overflow-y:auto!important;overflow-x:hidden!important;padding:24px!important;gap:18px!important;background:var(--surface2);overscroll-behavior:contain;scrollbar-gutter:stable}
:root[data-design] body.ui127-active #page .messages>.message{flex:none!important;display:block!important;max-width:min(84%,720px)!important;min-width:0!important;width:fit-content!important;align-self:flex-start;margin:0!important;overflow-wrap:anywhere}
:root[data-design] body.ui127-active #page .messages>.message.mine{align-self:flex-end!important;margin-left:auto!important}
:root[data-design] body.ui127-active #page .bubble{font-size:15px!important;line-height:1.55!important;padding:12px 15px!important;border:1px solid var(--line);border-radius:14px;white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal;background:var(--surface)}
:root[data-design] body.ui127-active #page .mine .bubble{background:var(--soft)!important}
:root[data-design] body.ui127-active #page :is(.u127-message-author,.a4-message-author){font-size:12px!important;line-height:1.4;color:var(--muted);margin:0 0 5px;font-weight:550}
:root[data-design] body.ui127-active #page .message>time{display:block;font-size:11px;color:var(--muted);line-height:1.5;margin-top:5px;text-align:right}
:root[data-design] body.ui127-active #page .u127-day{align-self:center;flex:none;position:static;font-size:12px;font-weight:600;color:var(--muted);padding:5px 11px;border:1px solid var(--line);background:var(--surface);border-radius:20px;box-shadow:0 1px 4px #0000000a}
:root[data-design] body.ui127-active #page .u127-chat-status{font-size:13px;line-height:1.45;padding:10px 16px;background:var(--soft);flex:0 0 auto;overflow-wrap:anywhere}
:root[data-design] body.ui127-active #page .u127-load-older{align-self:center;flex:0 0 auto;margin:8px;min-height:36px;font-size:12px}
:root[data-design] body.ui127-active #page .u127-compose{position:static!important;display:grid!important;grid-template-columns:minmax(0,1fr) 46px!important;align-items:end;flex:0 0 auto!important;gap:10px;padding:16px 20px!important;margin:0!important;border-top:1px solid var(--line);background:var(--surface);box-shadow:none!important}
:root[data-design] body.ui127-active #page .u127-compose textarea{width:100%;min-width:0;min-height:46px!important;max-height:120px!important;font-size:16px!important;line-height:22px!important;padding:11px 14px!important;margin:0!important;resize:none!important;border:1px solid var(--line);border-radius:12px;background:var(--surface2)}
:root[data-design] body.ui127-active #page .u127-compose button{height:46px!important;min-height:46px!important;width:46px!important;padding:12px!important;border-radius:12px;align-self:end}
:root[data-design] body.ui127-active #page #compose{position:static!important;flex:0 0 auto!important;display:grid!important;grid-template-columns:auto minmax(0,1fr) 46px!important;grid-template-areas:'reply reply reply' 'attachments attachments attachments' 'add input send';gap:0 10px!important;padding:16px 20px!important;margin:0!important;border-top:1px solid var(--line);background:var(--surface)!important;box-shadow:none!important}
:root[data-design] body.ui127-active #page #reply-strip{grid-area:reply;min-width:0}:root[data-design] body.ui127-active #page #attachment-strip{grid-area:attachments;min-width:0}
:root[data-design] body.ui127-active #page #message-text{grid-area:input;min-height:46px!important;max-height:120px!important;line-height:22px!important;font-size:16px!important;width:100%!important;margin:0!important;resize:none!important;border:1px solid var(--line)!important;border-radius:12px!important;padding:11px 14px!important;background:var(--surface2)!important}
:root[data-design] body.ui127-active #page #compose>.tools{display:contents!important}
:root[data-design] body.ui127-active #page #compose>.tools>.row{grid-area:add;align-self:end;display:flex!important;gap:2px!important}
:root[data-design] body.ui127-active #page #compose>.tools>button{grid-area:send;align-self:end;width:46px!important;height:46px!important;min-height:46px!important;margin:0!important;padding:12px!important;position:static!important;border-radius:12px}
:root[data-design] body.ui127-active #page #compose .tools .row>button{width:40px;height:46px;min-height:46px;padding:8px}
:root[data-design] body.ui127-active #page #compose .tools .row>:is([data-do=attach-photo],[data-do=attach-video]){display:none!important}
:root[data-design] body.ui127-active #page .u127-empty{margin:auto;text-align:center;padding:32px 24px;max-width:440px;line-height:1.55;color:var(--muted)}
:root[data-design] body.ui127-active #page .u127-empty strong{display:block;font-size:18px;font-weight:600;color:var(--ink);margin-bottom:8px}:root[data-design] body.ui127-active #page .u127-empty p{font-size:14px;margin:0}
:root[data-design] body.ui127-active #page .u127-person{display:flex;align-items:center;gap:14px;min-width:0;padding:18px 0;border-bottom:1px solid var(--line)}
:root[data-design] body.ui127-active #page .u127-person>.avatar{width:46px!important;height:46px!important;min-width:46px!important;flex:none!important;border-radius:50%;padding:0!important;overflow:hidden}
:root[data-design] body.ui127-active #page .u127-person>div{min-width:0;overflow-wrap:anywhere}:root[data-design] body.ui127-active #page .u127-person strong{display:block;font-size:15px;line-height:1.45;font-weight:600}
:root[data-design] body.ui127-active #page .u127-person :is(span:not(.avatar),small){display:block;font-size:12px;line-height:1.5;margin-top:4px;color:var(--muted)}
:root[data-design] body.ui127-active #page dl{margin:20px 0}:root[data-design] body.ui127-active #page dl>div{margin-bottom:18px}:root[data-design] body.ui127-active #page dt{font-size:12px;line-height:1.45;color:var(--muted);margin:0 0 5px}:root[data-design] body.ui127-active #page dd{font-size:15px;line-height:1.45;margin:0;overflow-wrap:anywhere}
:root[data-design] body.ui127-active #page .u127-task-info h3{font-size:16px;line-height:1.4;margin:20px 0 8px;overflow-wrap:anywhere}:root[data-design] body.ui127-active #page .u127-eyebrow{font-size:11px;color:var(--muted);letter-spacing:.04em}
:root[data-design] body.ui127-active #page .tw121-page{width:100%;max-width:1400px;min-height:0;height:auto;margin:0 auto;background:var(--surface);border:1px solid var(--line);border-radius:18px;overflow:hidden;display:block}
:root[data-design] body.ui127-active #page .tw121-tabs{display:flex;position:static!important;padding:10px 24px;gap:6px;overflow:auto;border-bottom:1px solid var(--line);background:var(--surface);min-height:62px}
:root[data-design] body.ui127-active #page .tw121-tabs button{min-height:42px;white-space:nowrap;font-size:14px!important;padding:10px 16px}
:root[data-design] body.ui127-active #page .tw121-page>[data-task-panel]{padding:28px!important;max-width:none;width:100%;margin:0;min-height:0;flex:initial;overflow:visible}
:root[data-design] body.ui127-active #page .u127-task-grid{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:40px;align-items:start}
:root[data-design] body.ui127-active #page .u127-task-grid>*{min-width:0}:root[data-design] body.ui127-active #page .u127-task-meta{padding:24px;background:var(--surface2);border:1px solid var(--line);border-radius:16px}
:root[data-design] body.ui127-active #page .u127-section-title{font-size:18px!important;line-height:1.4;font-weight:650;margin:26px 0 12px}
:root[data-design] body.ui127-active #page .tw121-desc{padding:0!important;font-size:15px!important;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere;max-width:80ch}
:root[data-design] body.ui127-active #page .u127-steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;padding-bottom:20px;border-bottom:1px solid var(--line)}
:root[data-design] body.ui127-active #page .u127-steps>span{display:flex;flex-direction:column;align-items:center;text-align:center;gap:8px;font-size:12px;line-height:1.4;color:var(--muted)}
:root[data-design] body.ui127-active #page .u127-steps i{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:var(--surface2);border:1px solid var(--line);font-style:normal}
:root[data-design] body.ui127-active #page .u127-steps .reached i{background:var(--soft);color:var(--accent);border-color:var(--accent)}:root[data-design] body.ui127-active #page .u127-steps .current{font-weight:650;color:var(--ink)}
:root[data-design] body.ui127-active #page .tw121-check label{display:flex;align-items:flex-start;gap:12px;padding:12px 0;font-size:15px;line-height:1.5;color:var(--ink)}:root[data-design] body.ui127-active #page .tw121-check input{flex:none;width:20px;height:20px;margin-top:2px}
:root[data-design] body.ui127-active #page .tw121-check progress{width:100%;height:6px;margin:8px 0 12px;accent-color:var(--accent)}:root[data-design] body.ui127-active #page .tw121-actions{display:grid;gap:12px;margin:24px 0 0}
:root[data-design] body.ui127-active #page .tw121-actions :is(button,select){width:100%!important;max-width:100%;min-width:0;min-height:44px;font-size:14px!important;line-height:1.4;white-space:normal}
:root[data-design] body.ui127-active #page .tw121-timeline{margin-top:28px;padding-top:0}:root[data-design] body.ui127-active #page .tw121-timeline p{font-size:14px;line-height:1.55;overflow-wrap:anywhere}
:root[data-design] body.ui127-active #page .u127-people-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 36px}
:root[data-design] body.ui127-active #page .tw121-page>[data-task-panel=chat]{padding:0!important;height:var(--u127-space,65dvh);max-height:none;display:flex;flex-direction:column;overflow:hidden}
:root[data-design] body.ui127-active #page [hidden]{display:none!important}
.u127-sr{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
@media(min-width:901px) and (max-width:1240px){:root[data-design] body.ui127-active #page .chat-layout.u127-workspace,:root[data-design] body.ui127-active.u127-info-open #page .chat-layout.u127-workspace{grid-template-columns:280px minmax(0,1fr)!important}:root[data-design] body.ui127-active.u127-info-open #page .u127-workspace>.chat-main{display:none!important}:root[data-design] body.ui127-active #page .u127-task-grid{grid-template-columns:minmax(0,1fr) 260px;gap:24px}}
@media(max-width:900px){
 :root[data-design] body.ui127-active .main>#page{padding:18px 14px 90px!important}
 :root[data-design] body.ui127-active #page .page-head{margin-bottom:16px;gap:12px}:root[data-design] body.ui127-active #page .page-head h1{font-size:24px!important}
 :root[data-design] body.ui127-active #page .page-head .actions{gap:8px}:root[data-design] body.ui127-active #page .page-head button{min-height:44px;flex:initial}
 :root[data-design] body.ui127-active #page .u127-tabs{width:100%;margin-bottom:12px}:root[data-design] body.ui127-active #page .u127-tabs button{flex:1;min-height:44px;font-size:14px!important}
 :root[data-design] body.ui127-active #page .chat-layout.u127-workspace{grid-template-columns:minmax(0,1fr)!important;min-height:0!important;border-radius:14px;height:var(--u127-space,65dvh)!important}
 :root[data-design] body.ui127-active #page .u127-workspace>.chat-main{display:none!important}:root[data-design] body.ui127-active #page .u127-workspace>.chat-list{border-right:0!important}
 :root[data-design] body.ui127-active #page #chat-list-search{font-size:16px!important}
 :root[data-design] body.ui127-active #page .u127-task-grid{grid-template-columns:minmax(0,1fr);gap:24px}:root[data-design] body.ui127-active #page .u127-task-meta{padding:18px}
 :root[data-design] body.ui127-active #page .tw121-page{margin:0;width:100%;height:auto;min-height:0;border-radius:14px}:root[data-design] body.ui127-active #page .tw121-page>[data-task-panel]{padding:18px!important}
 :root[data-design] body.ui127-active #page .tw121-tabs{padding:8px;gap:2px;min-height:58px}:root[data-design] body.ui127-active #page .tw121-tabs button{min-height:42px;padding:8px 10px;font-size:13px!important}
 :root[data-design] body.ui127-active #page .u127-people-grid{grid-template-columns:minmax(0,1fr);gap:0}
 :root[data-design] body.ui127-active.u127-open{overflow:hidden!important;overscroll-behavior:none}
 :root[data-design] body.ui127-active.u127-open .shell{display:block!important;position:fixed!important;top:var(--u127-top,0px)!important;left:0!important;right:0!important;bottom:auto!important;width:100%!important;height:var(--u127-height,100dvh)!important;max-height:var(--u127-height,100dvh)!important;min-height:0!important;margin:0!important;padding:0!important;overflow:hidden!important;background:var(--surface)}
 :root[data-design] body.ui127-active.u127-open .main{display:flex!important;flex-direction:column!important;min-height:0!important;height:100%!important;padding:0!important;overflow:hidden!important}
 :root[data-design] body.ui127-active.u127-open :is(.topbar,.a4-bottom-nav){display:none!important}
 :root[data-design] body.ui127-active.u127-open .main>#page{display:flex!important;flex-direction:column!important;width:100%!important;height:100%!important;min-height:0!important;max-height:100%!important;min-width:0!important;padding:0!important;margin:0!important;overflow:hidden!important}
 :root[data-design] body.ui127-active.u127-open #page>:is(.page-head,.u127-tabs){display:none!important}
 :root[data-design] body.ui127-active.u127-open #page .chat-layout.u127-workspace{display:flex!important;flex-direction:column!important;flex:1!important;height:100%!important;min-height:0!important;border:0!important;border-radius:0!important}
 :root[data-design] body.ui127-active.u127-open #page .u127-workspace>.chat-list{display:none!important}
 :root[data-design] body.ui127-active.u127-open #page .u127-workspace>.chat-main{display:flex!important;flex:1!important;height:100%!important;min-height:0!important}
 :root[data-design] body.ui127-active.u127-open.u127-info-open #page .u127-workspace>.chat-main{display:none!important}
 :root[data-design] body.ui127-active.u127-open.u127-info-open #page .u127-workspace>.chat-side{display:block!important;flex:1!important;height:100%!important;min-height:0!important;width:100%!important;max-width:none!important;padding:0 18px 18px!important;overflow:auto!important;border:0!important}
 :root[data-design] body.ui127-active.u127-open #page .tw121-page{display:flex!important;flex-direction:column!important;flex:1!important;height:100%!important;min-height:0!important;max-height:100%!important;border:0!important;border-radius:0!important}
 :root[data-design] body.ui127-active.u127-open #page .tw121-tabs{display:none!important}
 :root[data-design] body.ui127-active.u127-open #page .tw121-page>[data-task-panel=chat]{display:flex!important;flex:1!important;min-height:0!important;height:100%!important;padding:0!important;overflow:hidden!important}
 :root[data-design] body.ui127-active.u127-open #page .u127-back{display:inline-flex!important;flex:0 0 42px!important;width:42px!important;height:44px!important;min-height:44px!important;align-items:center;justify-content:center;padding:8px!important;border:0}
 :root[data-design] body.ui127-active.u127-open #page .u127-head{min-height:66px!important;padding:max(8px,env(safe-area-inset-top)) 10px 8px!important;gap:8px!important;flex-wrap:nowrap!important}
 :root[data-design] body.ui127-active.u127-open #page .u127-title strong{font-size:15px!important}:root[data-design] body.ui127-active.u127-open #page .u127-title small{font-size:11px!important}
 :root[data-design] body.ui127-active.u127-open #page .u127-head-actions button{width:40px;min-width:40px;min-height:44px;padding:8px}:root[data-design] body.ui127-active.u127-open #page .u127-open-task>span{display:none}
 :root[data-design] body.ui127-active #page :is(.u127-thread,.u127-workspace>.chat-main)>.messages{padding:16px 12px!important;gap:14px!important}:root[data-design] body.ui127-active #page .messages>.message{max-width:90%!important}
 :root[data-design] body.ui127-active #page :is(.u127-compose,#compose){padding:10px 12px max(10px,env(safe-area-inset-bottom))!important;gap:0 8px!important}:root[data-design] body.ui127-active.u127-keyboard #page :is(.u127-compose,#compose){padding-bottom:8px!important}
 :root[data-design] body.ui127-active #page #compose .tools .row>[data-do=emoji]{display:none!important}
 :root[data-design] body.ui127-active #page .u127-compose textarea{font-size:16px!important}
}
@media(min-width:901px){:root[data-design] body[data-crm-route=profile] .employee-profile{display:grid!important;grid-template-columns:320px minmax(0,1fr)!important;gap:28px!important;align-items:start}:root[data-design] body[data-crm-route=profile] .employee-profile>aside:first-child{grid-row:1 / span 2}:root[data-design] body[data-crm-route=profile] .employee-profile>main{grid-column:2}:root[data-design] body[data-crm-route=profile] .employee-profile>aside:last-child{grid-column:2;grid-row:auto}:root[data-design] body[data-crm-route=profile] .employee-profile .card{padding:24px!important}:root[data-design] body[data-crm-route=profile] .employee-profile .stack{gap:24px!important}}
/* Defeat the legacy #chat-side auto-show rule without affecting other screens. */
:root[data-design] body.ui127-active #page .u127-workspace>#chat-side{display:none!important}
:root[data-design] body.ui127-active.u127-info-open #page .u127-workspace>#chat-side{display:block!important}

/* Task chat gets exactly the remaining viewport, including its tabs. */
:root[data-design] body.ui127-task #page[data-task-tab=chat] .tw121-page{display:flex;flex-direction:column;height:var(--u127-space,65dvh);min-height:0}
:root[data-design] body.ui127-task #page[data-task-tab=chat] .tw121-tabs{flex:0 0 auto}
:root[data-design] body.ui127-task #page[data-task-tab=chat] .tw121-page>[data-task-panel=chat]{flex:1;min-height:0;height:auto!important}

@media(max-width:900px){
 :root[data-design] body.ui127-active.u127-open #page .u127-head.p8-search-open{display:grid!important;grid-template-columns:42px minmax(0,1fr) 40px 40px;gap:8px!important}
 :root[data-design] body.ui127-active #page .u127-head.p8-search-open>.u127-title{grid-column:2;grid-row:1}
 :root[data-design] body.ui127-active #page .u127-head.p8-search-open>.u127-back{grid-column:1;grid-row:1}
 :root[data-design] body.ui127-active #page .u127-head.p8-search-open .u127-head-actions{display:contents!important}
 :root[data-design] body.ui127-active #page .u127-head.p8-search-open #p8-chat-search{grid-column:3;grid-row:1}
 :root[data-design] body.ui127-active #page .u127-head.p8-search-open [data-do=chat-important]{grid-column:4;grid-row:1}
 :root[data-design] body.ui127-active #page .u127-head.p8-search-open #message-search{display:block!important;grid-column:1/-1;grid-row:2;position:static!important;inset:auto!important;width:100%!important;max-width:none!important;min-width:0!important;min-height:44px;font-size:16px!important}
}
@media(min-width:901px) and (max-width:1399px){:root[data-design] body[data-crm-route=profile] .employee-profile{grid-template-columns:minmax(0,1fr)!important}:root[data-design] body[data-crm-route=profile] .employee-profile>:is(main,aside){grid-column:1!important;grid-row:auto!important}}

/* UI 128: nonshrinking search row, compact mobile actions and task attachment cards. */
:root[data-design] body.ui127-chat #page .u127-search{position:relative!important;inset:auto!important;flex:0 0 auto!important;margin:0!important;background:var(--surface);z-index:1}
:root[data-design] body.ui127-chat #page .chat-list .list{flex:1 1 0!important;height:0!important;max-height:none!important;overflow-anchor:none;scroll-padding-top:8px}
:root[data-design] body.ui127-active #page .u128-message-files{display:grid;gap:10px;max-width:100%;margin-top:6px;white-space:normal}
:root[data-design] body.ui127-active #page .u128-file{width:min(350px,100%);min-width:0;max-width:100%;overflow:hidden;background:var(--surface);border:1px solid var(--line);border-radius:14px;white-space:normal;box-sizing:border-box}
:root[data-design] body.ui127-active #page .u128-file .u128-image{display:block;background:var(--surface2)}
:root[data-design] body.ui127-active #page .u128-file :is(img,video){display:block;width:100%;height:auto;aspect-ratio:4/3;max-height:250px;object-fit:contain;background:var(--surface2)}
:root[data-design] body.ui127-active #page .u128-file-icon{padding:16px 14px 0;color:var(--accent)}
:root[data-design] body.ui127-active #page .u128-file-copy{display:grid;gap:5px;padding:12px 14px;min-width:0}
:root[data-design] body.ui127-active #page .u128-file-copy strong{font-size:14px!important;line-height:1.45;overflow-wrap:anywhere;white-space:normal}
:root[data-design] body.ui127-active #page .u128-file-copy small{font-size:11px!important;line-height:1.4;color:var(--muted)}
:root[data-design] body.ui127-active #page .u128-file-actions{display:flex;flex-wrap:wrap;gap:8px;padding:0 12px 12px;align-items:center}
:root[data-design] body.ui127-active #page .u128-file-actions :is(a,button){display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:7px 10px;font-size:12px!important;line-height:1.35;border:1px solid var(--line);border-radius:8px;white-space:normal;text-align:center;text-decoration:none;background:var(--surface);color:var(--ink)}
:root[data-design] body.ui127-active #page .u128-file-actions [data-result128]{flex-basis:100%;color:var(--accent);background:var(--soft)}
:root[data-design] body.ui127-active #page .u128-result-badge{display:inline-flex;align-items:center;gap:5px;color:var(--accent);font-size:12px;line-height:1.4;font-weight:650}
:root[data-design] body.ui127-active #page .u128-result-badge .svg{width:16px;height:16px}
:root[data-design] body.ui127-active #page .u127-compose.u128-compose{grid-template-columns:minmax(0,1fr) 46px!important;grid-template-areas:'files files' 'status status' 'result result' 'tools tools' 'input send';gap:6px 10px!important;max-height:60%;overflow-y:auto}
:root[data-design] body.ui127-active #page .u128-compose>textarea{grid-area:input}
:root[data-design] body.ui127-active #page .u128-compose>button[type=submit]{grid-area:send}
:root[data-design] body.ui127-active #page .u128-upload-tools{grid-area:tools;display:flex;align-items:center;gap:4px;min-width:0}
:root[data-design] body.ui127-active #page .u128-upload-tools>button{flex:0 0 40px;width:40px!important;height:40px!important;min-height:40px!important;padding:8px!important;background:transparent;border:0;color:var(--muted)}
:root[data-design] body.ui127-active #page .u128-upload-tools .u128-limits{font-size:11px!important;line-height:1.35;margin-left:6px;color:var(--muted);min-width:0}
:root[data-design] body.ui127-active #page .u128-upload-status{grid-area:status;font-size:12px!important;line-height:1.45;margin:0;padding:8px 10px;background:var(--soft);border-radius:8px;white-space:pre-wrap;overflow-wrap:anywhere}
:root[data-design] body.ui127-active #page .u128-drafts{grid-area:files;display:grid;gap:6px;max-height:100px;overflow:auto;min-width:0}
:root[data-design] body.ui127-active #page .u128-draft{display:grid;grid-template-columns:24px minmax(0,1fr) 36px;gap:8px;align-items:center;border:1px solid var(--line);padding:6px 8px;border-radius:9px}
:root[data-design] body.ui127-active #page .u128-draft strong{display:block;font-size:12px!important;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
:root[data-design] body.ui127-active #page .u128-draft small{font-size:11px!important;color:var(--muted)}
:root[data-design] body.ui127-active #page .u128-draft>button{width:36px!important;height:36px!important;min-height:36px!important;padding:8px!important;border:0;background:transparent}
:root[data-design] body.ui127-active #page .u128-as-result{grid-area:result;display:flex;gap:8px;align-items:center;font-size:12px;color:var(--ink);line-height:1.4;padding:4px 0}
:root[data-design] body.ui127-active #page .u128-as-result input{width:18px!important;height:18px!important;min-height:18px!important;margin:0;flex:0 0 18px}
:root[data-design] body.ui127-active #page .u128-results{border-top:1px solid var(--line);margin-top:26px;padding-top:20px}
:root[data-design] body.ui127-active #page .u128-results-head{display:flex;align-items:flex-start;justify-content:space-between;flex-wrap:wrap;gap:12px;margin-bottom:16px}
:root[data-design] body.ui127-active #page .u128-results-head h2{font-size:18px!important;line-height:1.4;margin:0 0 6px}
:root[data-design] body.ui127-active #page .u128-results-head h2 span{font-size:13px;font-weight:500;color:var(--muted)}
:root[data-design] body.ui127-active #page .u128-results-head p{font-size:13px;line-height:1.5;color:var(--muted);margin:0}
:root[data-design] body.ui127-active #page .u128-results-head button{font-size:13px!important;min-height:40px}
:root[data-design] body.ui127-active #page .u128-results-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,245px),1fr));gap:16px}
:root[data-design] body.ui127-active #page .u128-result-item{min-width:0;max-width:100%}
:root[data-design] body.ui127-active #page .u128-result-item .u128-file{width:100%}
:root[data-design] body.ui127-active #page .u128-result-comment{font-size:13px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere;margin:10px 0}
@media(max-width:900px){
 :root[data-design] body.ui127-chat:not(.u127-open) .main>#page{padding:12px 12px 10px!important}
 :root[data-design] body.ui127-chat:not(.u127-open) #page>.page-head{display:grid!important;grid-template-columns:minmax(0,1fr) 42px 44px!important;align-items:center!important;gap:8px!important;margin:0 0 10px!important}
 :root[data-design] body.ui127-chat:not(.u127-open) #page>.page-head>div:first-child{grid-column:1;grid-row:1;min-width:0}
 :root[data-design] body.ui127-chat:not(.u127-open) #page>.page-head h1{font-size:23px!important;margin:0!important;line-height:1.25!important}
 :root[data-design] body.ui127-chat:not(.u127-open) #page>.page-head p{display:none!important}
 :root[data-design] body.ui127-chat:not(.u127-open) #page>.page-head>.actions{display:contents!important}
 :root[data-design] body.ui127-chat:not(.u127-open) #page>.page-head .actions>[data-do=secure-keys]{grid-column:2;grid-row:1;width:42px!important;min-width:42px!important;height:44px!important;min-height:44px!important;padding:10px!important}
 :root[data-design] body.ui127-chat:not(.u127-open) #page>.page-head .actions>[data-do=chat-new]{grid-column:3;grid-row:1;width:44px!important;min-width:44px!important;height:44px!important;min-height:44px!important;padding:10px!important}
 :root[data-design] body.ui127-chat:not(.u127-open) #page .u128-new-label{display:none!important}
 :root[data-design] body.ui127-chat:not(.u127-open) #page>.page-head .actions>#partners114-entry{grid-column:1/-1;grid-row:2;justify-self:start;width:auto!important;min-height:36px!important;font-size:13px!important;padding:6px 12px!important;margin:0!important}
 :root[data-design] body.ui127-chat:not(.u127-open) #page .u127-search{padding:12px!important}
 :root[data-design] body.ui127-chat:not(.u127-open) #page .u127-row{min-height:86px!important}
 :root[data-design] body.ui127-active #page .u128-upload-tools>button{width:40px!important;min-height:40px!important}
 :root[data-design] body.ui127-active #page .u128-drafts{max-height:78px}
 :root[data-design] body.ui127-active #page .u128-file-actions :is(button,a){min-height:40px}
}

/* Keep up to 100 attachment chips inside a scrollable composer area. */
:root[data-design] body.ui127-active #page #compose{grid-template-areas:'reply reply reply' 'attachments attachments attachments' 'upload upload upload' 'add input send'}
:root[data-design] body.ui127-active #page #attachment-strip{max-height:112px;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;align-content:start}
:root[data-design] body.ui127-active #page #attachment-strip>button{max-width:100%;overflow-wrap:anywhere;white-space:normal;text-align:left;min-height:44px;flex-shrink:0}
:root[data-design] body.ui127-active #page .chat-upload397{grid-area:upload;min-width:0;font-size:13px;line-height:1.4}
:root[data-design] body.ui127-active #page .chat-upload397[hidden]{display:none!important}
:root[data-design] body.ui127-active #page .chat-upload397 p{margin:4px 0 8px;overflow-wrap:anywhere}
:root[data-design] body.ui127-active #page .chat-upload-errors397{max-height:112px;overflow:auto;overscroll-behavior:contain}
:root[data-design] body.ui127-active #page .chat-upload-error397{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:4px 0}
:root[data-design] body.ui127-active #page .chat-upload-error397>span{flex:1 1 180px;min-width:0;overflow-wrap:anywhere}
:root[data-design] body.ui127-active #page .chat-upload-error397>button{min-height:44px;padding:8px 12px}
@media(max-width:900px){:root[data-design] body.ui127-active #page #attachment-strip,:root[data-design] body.ui127-active #page .chat-upload-errors397{max-height:80px}}
