/* Sigma Chat V1 — isolated WhatsApp-style internal messaging */
#sigmaChatLauncher{position:fixed;right:22px;bottom:22px;z-index:9000;width:58px;height:58px;border-radius:50%;border:0;background:#20b56b;color:#fff;font-size:24px;box-shadow:0 14px 34px rgba(0,0,0,.35);cursor:pointer;display:flex;align-items:center;justify-content:center}
#sigmaChatLauncher:hover{transform:translateY(-1px)}
#sigmaChatLauncher .sc-badge{position:absolute;right:-2px;top:-4px;min-width:20px;height:20px;padding:0 5px;border-radius:10px;background:#e53935;color:#fff;font-size:10px;font-weight:800;display:none;align-items:center;justify-content:center;border:2px solid #111}
#sigmaChatLauncher.has-unread .sc-badge{display:flex}
#sigmaChatShell{position:fixed;right:22px;bottom:92px;width:min(980px,calc(100vw - 44px));height:min(700px,calc(100vh - 130px));z-index:8999;background:#0d1117;border:1px solid #2a313b;border-radius:18px;box-shadow:0 24px 70px rgba(0,0,0,.55);overflow:hidden;display:none;color:#f5f7fa}
#sigmaChatShell.open{display:grid;grid-template-columns:330px 1fr}
#sigmaChatShell.open~#sigmaChatLauncher{visibility:hidden;pointer-events:none}
.sc-sidebar{background:#11161d;border-right:1px solid #252c35;min-width:0;min-height:0;display:flex;flex-direction:column}
.sc-side-head{padding:16px;border-bottom:1px solid #252c35;display:flex;align-items:center;justify-content:space-between;gap:10px}
.sc-title{font-weight:800;letter-spacing:.2px}.sc-sub{font-size:11px;color:#86909c;margin-top:2px}
.sc-icon-btn{border:1px solid #303946;background:#171d25;color:#fff;border-radius:10px;min-width:36px;height:36px;cursor:pointer}
.sc-search{padding:10px 12px;border-bottom:1px solid #252c35}.sc-search input{width:100%;box-sizing:border-box;background:#181f27;border:1px solid #303946;color:#fff;border-radius:10px;padding:10px 12px;outline:none}
.sc-room-list{overflow:auto;flex:1;min-height:0}.sc-room{display:flex;gap:10px;padding:12px 14px;border-bottom:1px solid #1c232c;cursor:pointer;align-items:center}.sc-room:hover,.sc-room.active{background:#1a222c}.sc-avatar{width:42px;height:42px;min-width:42px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#252e38;font-weight:800;color:#fff}.sc-avatar.green{background:#177d50}.sc-room-main{min-width:0;flex:1}.sc-room-top{display:flex;justify-content:space-between;gap:8px;align-items:center}.sc-room-name{font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sc-time{font-size:10px;color:#7f8b98;white-space:nowrap}.sc-preview{font-size:11px;color:#8c98a5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:3px}.sc-unread{background:#20b56b;color:#08110d;border-radius:999px;min-width:18px;height:18px;padding:0 5px;font-size:10px;font-weight:900;display:flex;align-items:center;justify-content:center}
.sc-main{min-width:0;min-height:0;display:flex;flex-direction:column;background:radial-gradient(circle at 30% 10%,rgba(42,56,69,.3),transparent 35%),#0b1016}.sc-empty{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:#7f8b98;padding:30px}.sc-empty .big{font-size:44px;margin-bottom:12px}
.sc-chat-head{height:68px;min-height:68px;box-sizing:border-box;padding:10px 14px;border-bottom:1px solid #252c35;background:#121820;display:flex;align-items:center;gap:10px}.sc-chat-head .meta{min-width:0;flex:1}.sc-chat-head .name{font-weight:800}.sc-chat-head .status{font-size:10px;color:#7f8b98;margin-top:3px}.sc-back{display:none}
.sc-messages{flex:1;min-height:0;overflow:auto;padding:18px 22px;display:flex;flex-direction:column;gap:7px}.sc-day{text-align:center;color:#7d8995;font-size:10px;margin:9px 0}.sc-msg{max-width:72%;padding:8px 10px 6px;border-radius:11px;background:#1b2530;align-self:flex-start;box-shadow:0 1px 2px rgba(0,0,0,.25)}.sc-msg.mine{align-self:flex-end;background:#164e3b}.sc-msg .sender{font-size:10px;font-weight:800;color:#72d5a3;margin-bottom:3px}.sc-msg.mine .sender{display:none}.sc-msg .body{font-size:13px;line-height:1.35;white-space:pre-wrap;overflow-wrap:anywhere}.sc-msg .foot{display:flex;justify-content:flex-end;align-items:center;gap:5px;margin-top:3px;color:#91a0ad;font-size:9px}.sc-ticks.read{color:#55baf7}
.sc-compose{padding:10px 12px;border-top:1px solid #252c35;background:#121820;display:flex;align-items:flex-end;gap:8px;flex-shrink:0}.sc-compose textarea{resize:none;max-height:120px;min-height:42px;flex:1;min-width:0;box-sizing:border-box;border:1px solid #303946;background:#1a212a;color:#fff;border-radius:14px;padding:11px 13px;outline:none;font:inherit;font-size:16px}.sc-send{width:44px;height:44px;min-width:44px;border-radius:50%;border:0;background:#20b56b;color:white;font-size:18px;cursor:pointer}
.sc-new-panel{position:absolute;left:0;top:0;bottom:0;width:330px;background:#11161d;z-index:3;transform:translateX(-101%);transition:transform .2s ease;border-right:1px solid #252c35;display:flex;flex-direction:column}.sc-new-panel.open{transform:translateX(0)}.sc-new-head{height:68px;box-sizing:border-box;display:flex;align-items:center;gap:10px;padding:12px 14px;border-bottom:1px solid #252c35}.sc-people{overflow:auto;flex:1}.sc-person{display:flex;gap:10px;align-items:center;padding:12px 14px;border-bottom:1px solid #1c232c;cursor:pointer}.sc-person:hover{background:#1a222c}.sc-person small{color:#7f8b98;display:block;margin-top:2px}
.sc-error{padding:10px 12px;color:#ff9b9b;font-size:11px}.sc-loading{padding:20px;color:#7f8b98;text-align:center;font-size:12px}
@media(max-width:760px){
html:has(#sigmaChatShell.open),body:has(#sigmaChatShell.open){overflow:hidden!important;overscroll-behavior:none}
#sigmaChatLauncher{right:14px;bottom:calc(14px + env(safe-area-inset-bottom));width:54px;height:54px}
#sigmaChatShell{position:fixed;inset:0!important;width:100%!important;max-width:none!important;height:100dvh!important;max-height:none!important;border:0!important;border-radius:0!important;box-shadow:none!important;z-index:10000}
#sigmaChatShell.open{display:grid;grid-template-columns:1fr;grid-template-rows:minmax(0,1fr)}
#sigmaChatShell.open~#sigmaChatLauncher{display:none!important}
.sc-sidebar{width:100%;height:100%;min-height:0;border-right:0;padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom)}
.sc-side-head{padding:12px 14px}.sc-search{padding:8px 12px}.sc-room{padding:11px 13px}.sc-avatar{width:40px;height:40px;min-width:40px}
.sc-main{display:none;min-height:0}.sc-main.mobile-open{display:flex;position:absolute;inset:0;z-index:2;width:100%;height:100%;min-height:0;overflow:hidden}
.sc-back{display:inline-flex;align-items:center;justify-content:center}
.sc-chat-head{height:auto;min-height:64px;padding:calc(8px + env(safe-area-inset-top)) 10px 8px}
.sc-chat-head .avatar{flex-shrink:0}.sc-chat-head .name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sc-messages{min-height:0;padding:12px 10px;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}.sc-msg{max-width:86%;font-size:14px}
.sc-compose{position:relative;z-index:5;width:100%;box-sizing:border-box;padding:8px 10px calc(8px + env(safe-area-inset-bottom));gap:7px}.sc-compose textarea{min-height:44px;max-height:104px;border-radius:20px;padding:11px 13px}.sc-send{width:44px;height:44px;min-width:44px}
.sc-new-panel{width:100%;height:100%;padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom);box-sizing:border-box}.sc-new-head{height:62px;min-height:62px}
}
@media(max-width:380px){.sc-side-head{padding-left:10px;padding-right:10px}.sc-chat-head{gap:7px;padding-left:7px;padding-right:7px}.sc-messages{padding-left:7px;padding-right:7px}.sc-compose{padding-left:7px;padding-right:7px}.sc-msg{max-width:90%}}
