.pergold-chat{display:flex;flex-wrap:wrap;gap:18px;width:100%;font:inherit;color:#20282e;box-sizing:border-box}
.pergold-chat *{box-sizing:border-box}
.pergold-chat button,.pergold-chat input{font:inherit}
.pergold-chat button{cursor:pointer;border:1px solid #ccd6de;border-radius:7px;background:#f6f8fa;color:#20282e;padding:8px 12px;line-height:1.3;min-height:40px}
.pergold-chat button:hover:not(:disabled){background:#e8f1f9}
.pergold-chat button:disabled{opacity:.45;cursor:not-allowed}
.pergold-chat-main{flex:1 1 320px;min-width:0;max-width:1100px}
.pergold-chat-header{display:flex;gap:12px;align-items:center;margin:0 0 12px}
.pergold-chat-header img{width:48px;height:48px;object-fit:cover;border-radius:50%;flex-shrink:0}
.pergold-chat-heading{display:flex;flex-direction:column;gap:2px}
.pergold-chat-heading strong{font-size:1.1em}
.pergold-chat-status{font-size:12px;color:#546c78;line-height:1.4;overflow-wrap:anywhere}
.pergold-chat-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-bottom:10px}
.pergold-chat-window{height:330px;overflow-y:auto;border:1px solid #d4dbe1;padding:12px;margin-bottom:10px;background:#fafbfc;border-radius:8px}
.pergold-chat-message{display:flex;margin-bottom:12px;justify-content:flex-start}
.pergold-chat-message[data-role="user"]{justify-content:flex-end}
.pergold-chat-bubble{padding:9px 12px;max-width:min(85%,600px);border-radius:14px;white-space:pre-wrap;overflow-wrap:anywhere;background:#e8ebef;color:#172029;line-height:1.55}
.pergold-chat-message[data-role="user"] .pergold-chat-bubble{background:#086bc3;color:white}
.pergold-chat-controls{display:flex;gap:8px;flex-wrap:wrap}
.pergold-chat-controls input{min-width:170px;flex:1 1 250px;padding:9px 11px;min-height:43px;border:1px solid #b4c3ce;border-radius:7px;background:white;color:#20282e}
.pergold-chat-send{background:#0877cf!important;color:#fff!important;border-color:#0877cf!important}
.pergold-chat-cancel{background:#edf0f2!important}
.pergold-chat-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.pergold-chat-footnote{font-size:12px;color:#627581;margin-top:9px;line-height:1.5}
.pergold-chat-sidebar{flex:0 1 280px;min-width:min(250px,100%);max-width:100%}
.pergold-chat-history-toggle{width:100%;text-align:left;font-weight:700}
.pergold-chat-sessions{margin:8px 0 0;padding:0;max-height:300px;overflow-y:auto;list-style:none}
.pergold-chat-sessions li{display:flex;align-items:center;justify-content:space-between;gap:5px;padding:5px 0;border-bottom:1px solid #e4ebef}
.pergold-chat-sessions li .pergold-chat-session-name{border:0;background:transparent;text-align:left;flex:1;min-width:0;overflow-wrap:anywhere;font-size:13px;padding:5px}
.pergold-chat-sessions li .pergold-chat-session-action{padding:4px;min-height:32px;min-width:32px;border:0;background:transparent}
@media(max-width:640px){.pergold-chat-main,.pergold-chat-sidebar{flex-basis:100%}.pergold-chat-window{height:310px}.pergold-chat-controls .pergold-chat-input{flex-basis:100%}.pergold-chat-controls button{flex:1}.pergold-chat-sessions{max-height:210px}}
