/* Messages share the centered layout and surfaces used by the other member pages. */
.reference-theme .client-main.chat-mode{max-width:1260px;margin:0 auto;padding:24px 30px}
.reference-theme .chat-layout{grid-template-columns:310px minmax(0,1fr);height:calc(100dvh - 128px);min-height:480px;border:1px solid var(--line);border-radius:12px;background:var(--surface);margin:0}
.reference-theme .chat-layout .conversation-list{background:var(--surface);border-right:1px solid var(--line)}
.reference-theme .conversation-list .list-title{height:64px;padding:0 22px;border-bottom:0;background:var(--surface)}
.reference-theme .conversation-list .list-title strong{font-size:17px;color:var(--ink)}
.reference-theme .conversation-list .list-title button{color:var(--pink);font-size:13px}
.chat-layout .mobile-conversation-tabs{display:flex;gap:24px;padding:0 22px;border-bottom:1px solid var(--line);background:var(--surface)}
.chat-layout .mobile-conversation-tabs>button{position:relative;padding:0 0 14px;font-size:13px;color:var(--muted)}
.chat-layout .mobile-conversation-tabs>button.active{color:var(--ink);font-weight:600}
.chat-layout .mobile-conversation-tabs>button.active:after{content:'';position:absolute;left:0;right:0;bottom:0;height:3px;border-radius:3px;background:var(--pink)}
.reference-theme .chat-layout .conversation{min-height:88px;padding:16px 18px;border-left:3px solid transparent;border-bottom:1px solid var(--line);gap:12px;background:var(--surface)}
.reference-theme .chat-layout .conversation:hover{background:var(--surface-muted)}
.reference-theme .chat-layout .conversation.selected{background:var(--accent-soft);border-left-color:var(--pink)}
.reference-theme .chat-layout .conversation.conversation-unread{background:var(--accent-soft);border-left-color:var(--pink)}
.reference-theme .chat-layout .conversation .avatar{width:48px;height:48px;border-radius:10px;font-size:21px;flex-shrink:0}
.reference-theme .chat-layout .support-avatar{background:var(--accent-soft)!important;color:var(--pink)!important}
.reference-theme .chat-layout .system-avatar{background:#f2edf6;color:var(--purple)}
.reference-theme .chat-layout .pinned-label{border-color:var(--line);background:var(--surface-muted);color:var(--muted);font-size:11px}
.reference-theme .chat-layout .conversation-copy strong{max-width:none;font-size:14px;font-weight:600;color:var(--ink)}
.reference-theme .chat-layout .conversation-copy p{font-size:13px;color:var(--muted);margin-top:5px}
.reference-theme .chat-layout .conversation-copy time{font-size:11px;color:var(--muted)}
.conversation-item{position:relative}
.reference-theme .chat-layout .conversation-item .conversation{padding-right:46px}
.conversation-pin{font-size:10px;color:var(--pink);background:var(--accent-soft);border-radius:3px;padding:2px 4px;margin-right:5px}
.conversation-options{position:absolute;right:10px;top:24px;z-index:1}
.conversation-options[open]{z-index:5}
.conversation-options>summary{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:6px;list-style:none;cursor:pointer;font-size:22px;line-height:1;color:var(--muted)}
.conversation-options>summary::-webkit-details-marker{display:none}
.conversation-options>summary:hover,.conversation-options[open]>summary{background:var(--accent-soft);color:var(--pink)}
.conversation-options-menu{position:absolute;right:0;top:32px;min-width:120px;padding:5px;border:1px solid var(--line);border-radius:8px;background:var(--surface);box-shadow:0 6px 20px #25293518}
.conversation-options-menu>button{display:block;width:100%;padding:9px 12px;border-radius:5px;text-align:left;font-size:13px;white-space:nowrap}
.conversation-options-menu>button:hover{background:var(--surface-muted)}
.conversation-options-menu>.delete-conversation{color:var(--error)}
.reference-theme .chat-layout .chat-header{height:72px;padding:14px 22px;border-color:var(--line)}
.reference-theme .chat-layout .chat-header>.avatar{width:42px;height:42px;border-radius:10px;flex-shrink:0}
.reference-theme .chat-layout .chat-header strong{font-size:16px;color:var(--ink)}
.reference-theme .chat-layout .chat-header p,.reference-theme .chat-layout .chat-menu .text-button{color:var(--muted)}
.reference-theme .chat-layout .message-scroll{padding:24px;background:var(--surface-muted)}
.reference-theme .chat-layout .message-meta{color:var(--muted)}
.reference-theme .chat-layout .conversation-welcome{padding:16px 0}
.chat-layout .conversation-welcome .welcome-avatar{width:72px;height:72px;flex-shrink:0;font-size:28px}
.reference-theme .chat-layout .conversation-welcome h2{margin:16px 0 8px;color:var(--ink)}
.reference-theme .chat-layout .conversation-welcome p{margin:0 0 16px;color:var(--muted)}
.reference-theme .chat-layout .chat-placeholder{background:var(--surface-muted)}
.reference-theme .chat-layout .chat-placeholder h2{font-size:21px;font-weight:600;color:var(--ink);line-height:1.5}
.reference-theme .chat-layout .chat-placeholder p{font-size:14px;color:var(--muted)}
.reference-theme .chat-layout .button.blue{background:var(--pink);color:#fff}
.reference-theme .chat-layout .button.blue:hover{background:var(--accent-hover)}
.reference-theme .chat-layout .composer{padding:16px 22px;border-color:var(--line);box-shadow:none}
.chat-layout .chat-actions{border-color:var(--line);gap:8px;padding-bottom:8px;margin-bottom:8px;flex-wrap:wrap}
.chat-layout .chat-actions>button{background:var(--surface-muted);color:var(--ink);border:1px solid var(--line);border-radius:7px;padding:5px 8px;font-size:12px}
.chat-layout .chat-actions>button>span{font-size:17px;line-height:1.2}
.chat-layout .chat-actions>button:hover{background:var(--accent-soft);border-color:var(--accent-line);color:var(--accent-ink)}
.chat-layout .toolbar-balance,.reference-theme .chat-layout .composer-bottom{color:var(--muted)}
.reference-theme .chat-layout .composer textarea{height:66px;min-height:66px;border-color:var(--line);border-radius:8px}
.reference-theme .chat-layout .composer textarea:focus{border-color:var(--pink);box-shadow:0 0 0 3px #bd28581a}
.reference-theme .chat-layout .composer-toolbar select{background:var(--surface);border-color:var(--line);color:var(--ink)}
.reference-theme .chat-layout .composer-toolbar{margin-left:auto;margin-bottom:0;justify-content:flex-end;max-width:100%}
.reference-theme .chat-layout .composer-toolbar label{min-width:0;max-width:100%}
.reference-theme .chat-layout .composer-toolbar select{margin-top:0;min-width:0}
.reference-theme .chat-layout .composer-bottom>button{margin-left:auto}
.reference-theme .chat-layout .support-intro{border-color:var(--line);color:var(--ink);background:var(--surface)}
.reference-theme .chat-layout .system-notification{margin-left:0;margin-right:0;border-color:var(--line)}
@media(min-width:761px) and (max-width:1100px){
 .reference-theme .chat-layout{grid-template-columns:260px minmax(0,1fr)}
 .reference-theme .chat-layout .composer{padding:14px 16px}
 .chat-layout .chat-actions{flex-wrap:wrap}
 .reference-theme .chat-layout .composer-toolbar small{display:none}
}
@media(max-width:760px){
 .reference-theme .client-main.chat-mode{padding:18px 18px 20px}
 .reference-theme .chat-layout{display:block;height:calc(100dvh - 176px);min-height:300px;border-radius:10px}
 .reference-theme .chat-layout .conversation-list{border-right:0}
 .reference-theme .chat-layout .conversation-list .list-title{height:58px;padding:0 16px}
 .chat-layout .mobile-conversation-tabs{padding:0 16px}
 .reference-theme .chat-layout .conversation{padding:16px 13px;gap:11px}
 .reference-theme .chat-layout .chat-placeholder,.reference-theme .chat-layout .chat-panel{display:none}
 .reference-theme .chat-layout.has-chat{position:fixed;left:0;right:0;top:66px;bottom:72px;height:auto;min-height:0;border:0;border-radius:0;z-index:45}
 .reference-theme .chat-layout.has-chat .conversation-list{display:none}
 .reference-theme .chat-layout.has-chat .chat-panel{display:flex;height:100%}
 .reference-theme .chat-layout.has-chat .chat-header .mobile-only{display:flex;align-items:center;justify-content:center;flex-shrink:0}
 .reference-theme .conversation-view .desktop-nav{display:none}
 .reference-theme .conversation-view .mobile-nav{display:flex;height:72px}
 .reference-theme:has(.chat-layout.has-chat){overflow:hidden}
 .reference-theme .chat-layout .chat-header{height:66px;padding:12px 14px;gap:10px}
 .reference-theme .chat-layout .chat-header strong{font-size:15px}
 .reference-theme .chat-layout .chat-header>.avatar{width:36px;height:36px;border-radius:8px}
 .reference-theme .chat-layout .message-scroll{padding:18px 14px}
 .reference-theme .chat-layout .composer{padding:12px 14px}
 .reference-theme .chat-layout .composer textarea{height:52px;min-height:52px}
 .chat-layout .chat-actions{gap:5px;flex-wrap:wrap}
 .chat-layout .chat-actions>button{padding:4px 6px}
 .chat-layout .toolbar-balance{font-size:11px}
}
