
:root{--pm-chat:#f7f8fb;--pm-panel:#fff;--pm-line:#e6e8ef;--pm-accent:#16a34a;--pm-in:#fff;--pm-out:#dcfce7;--pm-note:#fff7d6;--pm-text:#111827;--pm-muted:#6b7280}
.support-shell{display:grid;grid-template-columns:minmax(260px,340px) minmax(0,1fr) minmax(240px,300px);height:calc(100vh - 32px);min-height:620px;background:var(--pm-chat);border:1px solid var(--pm-line);border-radius:22px;overflow:hidden;box-shadow:0 18px 60px rgba(15,23,42,.10);color:var(--pm-text)}
.support-sidebar,.support-details{background:var(--pm-panel);min-width:0}.support-sidebar{border-right:1px solid var(--pm-line);display:flex;flex-direction:column}.support-details{border-left:1px solid var(--pm-line);padding:18px;overflow:auto}.support-main{display:flex;flex-direction:column;min-width:0;background:linear-gradient(180deg,#f5f6f8,#edf0f4)}
.support-top{padding:14px;border-bottom:1px solid var(--pm-line);background:rgba(255,255,255,.95);backdrop-filter:blur(10px)}.support-top h2{font-size:20px;margin:0}.support-search{display:flex;gap:8px;margin-top:10px}.support-search input,.support-composer textarea,.support-composer input,.support-top select{border:1px solid var(--pm-line);border-radius:12px;padding:10px 12px;background:#fff}
.support-filter-row{display:flex;gap:6px;overflow:auto;padding:8px 12px;border-bottom:1px solid var(--pm-line)}.support-filter-row button{white-space:nowrap;border:0;border-radius:999px;padding:7px 11px;background:#f1f5f9}.support-filter-row button.active{background:#dcfce7;color:#166534}
.support-list{overflow:auto;flex:1}.support-item{width:100%;display:grid;grid-template-columns:44px 1fr auto;gap:10px;padding:12px 14px;border:0;border-bottom:1px solid #f0f1f5;background:#fff;text-align:left}.support-item:hover,.support-item.active{background:#f0fdf4}.support-avatar{width:44px;height:44px;border-radius:50%;display:grid;place-items:center;background:#e2e8f0;font-weight:800}.support-item-main{min-width:0}.support-item-name{font-weight:750;display:flex;gap:6px;align-items:center}.support-preview{font-size:13px;color:var(--pm-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.support-item-meta{text-align:right;font-size:11px;color:var(--pm-muted)}.support-badge{display:inline-grid;place-items:center;min-width:20px;height:20px;border-radius:999px;background:var(--pm-accent);color:white;font-weight:800;padding:0 5px;margin-top:5px}.support-pin{font-size:11px}
.support-chat-head{display:flex;align-items:center;gap:10px;padding:12px 16px;background:#fff;border-bottom:1px solid var(--pm-line)}.support-chat-head .grow{flex:1;min-width:0}.support-chat-title{font-weight:800}.support-chat-sub{font-size:12px;color:var(--pm-muted)}.support-head-actions{display:flex;gap:6px}.support-head-actions button{border:1px solid var(--pm-line);background:#fff;border-radius:10px;padding:7px 9px}
.support-messages{flex:1;overflow:auto;padding:18px 5%;scroll-behavior:smooth}.support-date{text-align:center;margin:12px 0}.support-date span{font-size:11px;background:#fff;border:1px solid var(--pm-line);border-radius:999px;padding:5px 10px;color:var(--pm-muted)}
.support-row{display:flex;margin:5px 0}.support-row.mine{justify-content:flex-end}.support-row.system{justify-content:center}.support-bubble{max-width:min(76%,620px);padding:8px 11px 6px;border-radius:12px;background:var(--pm-in);box-shadow:0 1px 1px rgba(0,0,0,.06);position:relative}.support-row.mine .support-bubble{background:var(--pm-out)}.support-row.internal .support-bubble{background:var(--pm-note);border:1px dashed #eab308}.support-row.system .support-bubble{background:#e2e8f0;font-size:12px}.support-sender{font-size:11px;font-weight:800;color:#047857;margin-bottom:3px}.support-reply-quote{border-left:3px solid #22c55e;background:rgba(255,255,255,.55);padding:5px 7px;border-radius:6px;margin-bottom:5px;font-size:12px;color:#475569}.support-body{white-space:pre-wrap;overflow-wrap:anywhere}.support-message-foot{display:flex;justify-content:flex-end;gap:5px;font-size:10px;color:#64748b;margin-top:3px}.support-reactions{display:flex;gap:4px;flex-wrap:wrap;margin-top:5px}.support-reaction{font-size:12px;border:1px solid var(--pm-line);background:#fff;border-radius:999px;padding:2px 6px}.support-msg-actions{display:none;gap:4px;margin-top:5px}.support-bubble:hover .support-msg-actions{display:flex}.support-msg-actions button{font-size:11px;border:0;background:transparent;color:#475569;padding:2px 4px}
.support-attachment{display:block;margin-top:6px}.support-attachment img{max-width:260px;max-height:240px;border-radius:10px;object-fit:cover}.support-attachment audio{max-width:280px}.support-file{display:flex;align-items:center;gap:8px;border:1px solid var(--pm-line);border-radius:10px;background:rgba(255,255,255,.7);padding:9px;color:inherit;text-decoration:none}
.support-typing{height:22px;padding:2px 16px;font-size:12px;color:#16a34a}.support-replying{display:none;padding:7px 12px;background:#f8fafc;border-top:1px solid var(--pm-line);font-size:12px}.support-replying.show{display:flex}.support-replying .grow{flex:1}
.support-composer{background:#fff;border-top:1px solid var(--pm-line);padding:9px 10px}.support-compose-row{display:flex;gap:7px;align-items:flex-end}.support-compose-row textarea{flex:1;resize:none;min-height:43px;max-height:120px}.support-icon-btn,.support-send-btn{width:42px;height:42px;border-radius:50%;border:0;display:grid;place-items:center}.support-icon-btn{background:#f1f5f9}.support-send-btn{background:#16a34a;color:#fff}.support-mode{display:flex;gap:8px;align-items:center;margin-bottom:6px;font-size:12px}.support-mode select{border:1px solid var(--pm-line);border-radius:8px;padding:4px 7px}.support-file-input{display:none}
.support-empty{height:100%;display:grid;place-items:center;text-align:center;color:var(--pm-muted);padding:32px}.support-detail-card{border:1px solid var(--pm-line);border-radius:14px;padding:12px;margin-bottom:10px}.support-detail-card h4{font-size:14px;margin:0 0 8px}.support-kv{font-size:13px;display:grid;grid-template-columns:90px 1fr;gap:6px;margin:5px 0}.support-kv b{color:#475569}.support-status{display:flex;gap:6px;flex-wrap:wrap}.support-status button{border:1px solid var(--pm-line);background:#fff;border-radius:9px;padding:6px 8px;font-size:12px}.support-status button.active{background:#dcfce7;border-color:#86efac}.support-new-btn{border:0;background:#16a34a;color:#fff;border-radius:10px;padding:9px 12px;font-weight:700}
.support-float{position:fixed;right:18px;bottom:88px;z-index:1000;background:#16a34a;color:#fff!important;border-radius:999px;padding:12px 16px;text-decoration:none;box-shadow:0 10px 30px rgba(22,163,74,.35);font-weight:800}.support-float b{background:#fff;color:#16a34a;border-radius:999px;padding:1px 6px;margin-left:5px}
@media(max-width:980px){.support-shell{grid-template-columns:300px 1fr}.support-details{display:none}}
@media(max-width:720px){.support-shell{height:calc(100dvh - 10px);min-height:0;border-radius:0;border:0;grid-template-columns:1fr}.support-sidebar{display:flex}.support-main{display:none}.support-shell.chat-open .support-sidebar{display:none}.support-shell.chat-open .support-main{display:flex}.support-messages{padding:12px 10px}.support-bubble{max-width:88%}.support-chat-head{position:sticky;top:0;z-index:2}.support-composer{padding-bottom:max(10px,env(safe-area-inset-bottom))}.support-msg-actions{display:flex}}

.support-icon-btn.recording{background:#dc2626!important;color:#fff;width:auto;min-width:56px;padding:0 10px;border-radius:999px;animation:v217pulse 1s infinite}.support-voice-preview audio{height:38px}@keyframes v217pulse{50%{box-shadow:0 0 0 7px rgba(220,38,38,.12)}}

/* V22.1: WhatsApp-style fixed shell; only message timeline scrolls */
.support-shell{overflow:hidden!important}.support-main{min-height:0!important;overflow:hidden!important}.support-chat-head{flex:0 0 auto;position:sticky!important;top:0;z-index:20}.support-messages{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;overscroll-behavior:contain;scrollbar-gutter:stable}.support-composer{flex:0 0 auto;position:sticky!important;bottom:0;z-index:20}.support-avatar{font-weight:800;letter-spacing:.02em}

.support-ai-contact{display:flex;align-items:center;gap:10px;padding:11px 13px;border-bottom:1px solid var(--pm-line);cursor:pointer;background:linear-gradient(90deg,#faf5ff,#fff)}.support-ai-contact:hover{background:#f3e8ff}.support-ai-contact .grow{display:flex;flex-direction:column}.support-ai-contact small{color:#64748b;font-size:12px}

/* V22.2 unified immersive support/chat workspace */
body.support-conversation-open{overflow:hidden!important;padding:0!important;background:#0b141a!important}
.support-chat-head{position:relative;z-index:20;flex:0 0 auto}
.support-more-menu{position:absolute;right:10px;top:58px;z-index:80;background:#fff;border:1px solid var(--pm-line);border-radius:14px;box-shadow:0 18px 50px #0f172a30;padding:6px;min-width:160px}.support-more-menu button{display:block;width:100%;border:0;background:transparent;text-align:left;padding:10px;border-radius:9px}.support-more-menu button:hover{background:#f1f5f9}
.support-compact-mode{padding:0 10px 5px}.support-compact-mode select{max-width:180px;border:1px solid #d7dde2;border-radius:999px;padding:6px 10px;background:#fff}
.support-compose-row{align-items:flex-end}.support-compose-row textarea{min-height:44px;max-height:124px;border-radius:22px!important;resize:none}.support-compose-row>[data-attach],.support-compose-row>[data-camera],.support-compose-row>[data-voice]{flex:0 0 42px;width:42px;height:42px;border-radius:50%;display:grid;place-items:center}.support-send-btn{flex:0 0 44px;width:44px;height:44px;border-radius:50%!important;display:grid;place-items:center;padding:0!important}
.support-voice-preview{margin:0 8px 8px!important;background:#edf2f4!important;border-radius:18px!important}.support-voice-preview audio{width:min(100%,380px)!important;max-width:none!important}
.support-head-actions button{min-width:42px;height:42px;border-radius:50%!important;padding:0!important;font-size:20px!important}
.support-avatar{display:grid;place-items:center;overflow:hidden}.support-avatar img{width:100%;height:100%;object-fit:cover}
.support-messages{overscroll-behavior:contain;scrollbar-gutter:stable}.support-main{min-height:0}.support-composer{position:relative;z-index:21;flex:0 0 auto;background:rgba(248,250,252,.97);backdrop-filter:blur(16px);padding-bottom:max(8px,env(safe-area-inset-bottom,0px))}
@media(max-width:760px){
 html,body{height:100%;min-height:100%}.support-suite{max-width:none!important;margin:0!important;padding:0!important}.support-shell{height:100dvh!important;min-height:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;grid-template-columns:1fr!important}.support-sidebar{display:flex}.support-main{display:none;height:100dvh!important;min-height:0!important}.support-details{display:none!important}.support-shell.chat-open .support-sidebar{display:none!important}.support-shell.chat-open .support-main{display:flex!important;position:fixed!important;inset:0!important;z-index:6000!important}.support-shell.chat-open .support-chat-head{padding-top:max(8px,env(safe-area-inset-top,0px));min-height:62px;background:#111b21!important;color:#f7fafc!important}.support-shell.chat-open .support-chat-title,.support-shell.chat-open .support-chat-sub{color:inherit!important}.support-shell.chat-open .support-chat-sub{opacity:.72}.support-shell.chat-open .support-head-actions button,.support-shell.chat-open [data-back]{color:#fff!important;background:transparent!important;border:0!important}.support-shell.chat-open .support-messages{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;background:#efeae2!important}.support-shell.chat-open .support-composer{background:#f0f2f5!important}.support-shell.chat-open .support-compose-row{padding:7px 8px!important;gap:6px!important}.support-shell.chat-open .support-compose-row textarea{background:#fff!important}.support-shell.chat-open [data-back]{display:grid!important}.support-shell.chat-open~*{display:none!important}.support-suite.conversation-open>.support-suite-nav{display:none!important}.support-suite.conversation-open>.support-suite-panel:not([data-suite-panel="chats"]){display:none!important}.support-page-head{display:none!important}
 body.support-conversation-open .v13-topbar,body.support-conversation-open .market-header,body.support-conversation-open .market-bottom-nav,body.support-conversation-open .support-float,body.support-conversation-open [data-global-top-search],body.support-conversation-open .v21-top-module-bar,body.support-conversation-open .fixed-bottom-launcher,body.support-conversation-open .v22-global-topbar,body.support-conversation-open .v22-bottom-nav{display:none!important}
}
