/* Fluid controls; do not hide horizontal overflow to mask broken layout. */
.sg-dialog{box-sizing:border-box;width:min(680px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);padding:20px;border:1px solid #dce1e8;border-radius:10px;color:#15233f;background:#fff;overflow-y:auto;overflow-wrap:anywhere}
.sg-dialog *{box-sizing:border-box;min-width:0}.sg-dialog header{display:flex;justify-content:space-between;align-items:center;gap:12px}.sg-dialog h2{font-size:22px;margin:0 0 16px}.sg-dialog label{display:grid;grid-template-columns:minmax(0,1fr);gap:6px;margin:12px 0}.sg-dialog input:not([type=checkbox]),.sg-dialog select{width:100%;min-height:44px;border:1px solid #dce1e8;border-radius:6px;padding:8px;font:inherit}.sg-dialog button,#sgOpen{min-height:44px;max-width:100%;white-space:normal;border-radius:6px;padding:8px 14px}.sg-dialog p{color:#4a5875;font-size:14px;line-height:1.6}.sg-dialog .sg-check{display:flex;align-items:center;gap:10px}.sg-check input{flex:0 0 auto}.sg-dialog :focus-visible{outline:2px solid #2167b4;outline-offset:2px}.sg-dialog .primary{background:#2167b4;color:white}.sg-dialog img{width:min(280px,100%);height:auto;display:block;margin:auto}.sg-record{padding:12px 0;border-bottom:1px solid #dce1e8}#sgError{color:#c23b2e}.sg-dialog[open]::backdrop{background:#10203d66}
@media(max-width:760px){.sg-dialog{padding:16px}.sg-dialog button{width:100%;margin:4px 0}.sg-dialog header button{width:auto}.sg-dialog h2{font-size:20px}}

.sg-dialog .sg-member{display:flex;align-items:center;gap:10px;min-height:44px;margin:4px 0;padding:6px;border-radius:6px;background:#f5f7fa}.sg-member input{flex:0 0 auto}.sg-member>span:last-child{flex:1;overflow-wrap:anywhere}.sg-dialog .sg-avatar{flex:0 0 36px;width:36px;height:36px;border-radius:50%;background:#dce7f4;display:grid;place-items:center;overflow:hidden}.sg-dialog .sg-avatar img{width:36px;height:36px;object-fit:cover}#sgChoices{max-height:240px;overflow-y:auto}#sgSelected{border-bottom:1px solid #dce1e8;padding-bottom:6px}.sg-dialog [hidden]{display:none!important}
/* 11-20: entries at the top of 聊天信息 */
.sg-entry-bar{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0 12px}.sg-entry-bar:not(:has(>:not([hidden]))){display:none}
.sg-entry-bar>button{min-height:36px;padding:0 14px}.sg-entry-bar>#sgOpen,.sg-entry-bar>#sgQrOpen,.sg-entry-bar>#sgPanelOpen,.sg-entry-bar>#sgPanelQr{border-color:#2167b4;color:#2167b4;font-weight:600}
.sg-entry-hint{flex-basis:100%;margin:0;font-size:13px;color:#7a869c;line-height:1.5}
.sg-panel-bar{margin:8px 0}.sg-panel-bar[hidden]{display:none}
/* 11-20: keep 建服务群/群二维码 right under the name although 业务线/标签 cards are inserted there later (flex column) */
body .v2 #contactPanel>.identity.identity{order:-2}body .v2 #contactPanel>#sgPanelBar.sg-panel-bar{order:-1}
/* 11-20 (boss: 顶部侧边栏错位溢出): a long group name pushed the name and the reload icon out of the panel */
.v2 #contactPanel>.identity>div:not(.avatar){min-width:0;flex:1 1 auto}.v2 #contactPanel>.identity>.avatar{flex:0 0 46px;min-width:46px}
.v2 #contactPanel>.identity #contactName{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body .v2 #contactPanel>#sgPanelBar.sg-panel-bar{padding:10px 12px;margin:0 0 8px}
/* 11-20 (boss: 服务群与群二维码界面样式错误): titled per flow, QR in a framed box, recipients as a list, button rows */
.sg-dialog header{align-items:flex-start;margin-bottom:8px}.sg-dialog header h2{margin:0}
.sg-dialog #sgSubtitle{margin:4px 0 0;font-size:13px;color:#7a869c;overflow-wrap:anywhere}
.sg-dialog .sg-muted,.sg-dialog #sgLineHint{margin:4px 0 8px;font-size:13px;color:#7a869c}
.sg-dialog #sgLineHint[hidden],.sg-dialog #sgTestMembers[hidden]{display:none}
.sg-dialog .sg-actions{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0 0}.sg-dialog .sg-actions>*{min-height:40px}
.sg-dialog #sgChoices{max-height:260px;overflow-y:auto}
.sg-dialog #sgStatus{margin:4px 0 8px;font-size:14px;color:#15233f}
.sg-dialog #sgSteps{margin:0 0 8px;padding-left:20px;font-size:13px;color:#4a5875}.sg-dialog #sgSteps[hidden]{display:none}
.sg-dialog #sgQr{display:grid;justify-items:center;gap:8px;margin:8px 0 4px}.sg-dialog #sgQr[hidden]{display:none}
.sg-dialog #sgQrImage{display:block;width:240px;height:240px;max-width:100%;object-fit:contain;padding:10px;border:1px solid #dce1e8;border-radius:10px;background:#fff}
.sg-dialog #sgExpiry{margin:0;font-size:12px;color:#7a869c;text-align:center}
.sg-dialog .sg-qr-actions{justify-content:center;margin:4px 0 0}
.sg-dialog #sgDownload{display:inline-flex;align-items:center;justify-content:center;padding:0 18px;border:1px solid #2167b4;border-radius:6px;color:#2167b4;background:#fff;font-weight:600;text-decoration:none}
.sg-dialog #sgDownload:hover{background:#e8f0fa}
.sg-dialog #sgRecipients{justify-self:stretch;display:grid;gap:2px;min-width:0;margin:12px 0 0;padding:10px 12px;border:1px solid #dce1e8;border-radius:8px;background:#f5f7fa}
.sg-dialog #sgRecipients[hidden]{display:none}
.sg-dialog #sgRecipients legend{padding:0 4px;font-size:13px;font-weight:600;color:#15233f}
.sg-dialog label.sg-check{display:flex;align-items:center;gap:8px;margin:0;min-height:36px;grid-template-columns:none}
.sg-dialog label.sg-check input{width:18px;height:18px;flex:0 0 18px;margin:0}
.sg-dialog #sgSend{justify-self:stretch;min-height:44px}.sg-dialog #sgSend[hidden]{display:none}
.sg-dialog #sgRefreshQr{margin-top:8px}
.sg-dialog #sgConfirm #sgSummary{line-height:1.7}.sg-dialog #sgWarning{color:#b45309;font-size:13px}
@media(max-width:760px){.sg-dialog .sg-actions>*{flex:1 1 auto}.sg-dialog #sgQrImage{width:220px;height:220px}}
.sg-dialog #sgSelected,.sg-dialog #sgChoices{display:grid;grid-template-columns:minmax(0,1fr);gap:4px}
.sg-dialog #sgSelected:not(:empty){padding-bottom:8px;margin-bottom:8px;border-bottom:1px solid #dce1e8}
.sg-dialog label.sg-member{display:flex;width:100%;margin:0;cursor:pointer}.sg-dialog label.sg-member input{width:18px;height:18px;margin:0}
/* 11-20 (boss: 字号过大): the 群二维码 reason is a quiet 12px note, like the other panel notes */
body .v2 #contactPanel #sgPanelHint.sg-entry-hint,body #sgQrHint.sg-entry-hint{font-size:12px;line-height:1.5;color:#7a869c;font-weight:400}
body .v2 #contactPanel>#sgPanelBar.sg-panel-bar:has(>#sgPanelHint:not([hidden])):not(:has(>button:not([hidden]))){padding:8px 12px}
/* 11-20 (boss: 发给/重新获取二维码样式有问题): heading inside the recipient box, 下载 and 重新获取 side by side under the code */
.sg-dialog #sgRecipients legend{float:left;width:100%;padding:0;margin:0 0 4px;font-size:13px;font-weight:600;color:#15233f}
.sg-dialog #sgRecipients>label{clear:both}
.sg-dialog .sg-qr-actions{gap:10px}
.sg-dialog .sg-qr-actions>#sgDownload,.sg-dialog .sg-qr-actions>#sgRefreshQr{min-height:36px;padding:0 16px;border-radius:6px;font-size:14px;margin:0}
.sg-dialog .sg-qr-actions>#sgRefreshQr{border:1px solid #dce1e8;background:#fff;color:#4a5875;font-weight:400}
.sg-dialog .sg-qr-actions>#sgRefreshQr:hover{background:#f5f7fa}
.sg-dialog #sgRefreshQr[hidden]{display:none}
@media(max-width:760px){.sg-dialog .sg-qr-actions>*{flex:1 1 0}}
.sg-dialog .sg-qr-actions>#sgDownload,.sg-dialog .sg-qr-actions>#sgRefreshQr{white-space:nowrap}
@media(max-width:760px){.sg-dialog .sg-qr-actions>#sgDownload,.sg-dialog .sg-qr-actions>#sgRefreshQr{width:auto;padding:0 10px}}
