.chat-page { margin:0; background:#f5f7fc; font-family:Roboto,system-ui,sans-serif; color:#19253c; }
.chat-main { box-sizing:border-box; width:100%; max-width:1400px; margin:36px auto; padding:0 24px; }
.chat-main h1 { font-size:34px; margin:0 0 8px; }
.chat-intro { color:#526580; margin:0 0 24px; line-height:1.6; }
.chat-status { color:#526580; line-height:1.5; }
.chat-status:empty { display:none; }
.chat-layout { display:grid; grid-template-columns:340px minmax(0,1fr); height: min(720px,calc(100dvh - 220px)); min-height:420px; border:1px solid #d7e1f3; background:white; border-radius:20px; overflow:hidden; box-shadow:0 8px 28px #18305208; }
.chat-sidebar { min-width:0; overflow-y:auto; border-right:1px solid #dce4f2; }
.chat-sidebar h2 { padding:20px; font-size:18px; margin:0; border-bottom:1px solid #e5eaf3; }
.chat-list { list-style:none; margin:0; padding:8px; }
.chat-thread { display:flex; gap:12px; align-items:center; width:100%; text-align:left; padding:16px 12px; border:1px solid transparent; border-radius:12px; background:white; color:inherit; cursor:pointer; font:inherit; }
.chat-thread:hover { background:#f5f8fe; }
.chat-thread[aria-current="true"] { background:#edf3ff; border-color:#c8d8ff; }
.chat-thread-copy { display:grid; min-width:0; gap:5px; flex:1; }
.chat-thread-copy strong,.chat-thread-copy span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.chat-thread-copy span { font-size:14px; color:#536783; }
.chat-avatar { width:44px; height:44px; border-radius:14px; background:#eaf0fe; color:#2153d4; object-fit:cover; display:grid; place-items:center; flex:none; font-weight:700; }
.chat-unread { background:#2458ed; color:white; padding:3px 7px; border-radius:20px; font-size:12px; }
.chat-empty { margin:auto; text-align:center; padding:32px; max-width:460px; color:#526580; line-height:1.7; }
.chat-empty strong { display:block; color:#19253c; font-size:23px; margin-bottom:8px; }
.chat-conversation { display:flex; flex-direction:column; min-height:0; min-width:0; position:relative; }
.chat-conversation[hidden],.chat-empty[hidden],[hidden] { display:none !important; }
.chat-header { display:flex; gap:12px; align-items:center; padding:18px 22px; border-bottom:1px solid #e1e7f2; }
.chat-person { min-width:0; flex:1; }
.chat-person a { font-weight:700; color:#1d2b45; text-decoration:none; }
.chat-person p { color:#586b86; font-size:13px; margin:6px 0 0; overflow-wrap:anywhere; }
.chat-btn { font:inherit; font-weight:500; border:1px solid #cbd8ef; color:#214bc3; background:white; border-radius:10px; padding:10px 14px; cursor:pointer; text-decoration:none; display:inline-block; }
.chat-btn:hover { background:#eff4ff; }
.chat-btn:disabled { cursor:wait; opacity:.65; }
.chat-btn:focus-visible,.chat-thread:focus-visible { outline:3px solid #2855ef; outline-offset:2px; }
.chat-back { display:none; }
.chat-history { flex:1; min-height:0; overflow-y:auto; overscroll-behavior:contain; padding:22px; background:#f7f9fd; }
.chat-older { display:block; margin:0 auto 18px; }
.chat-message { max-width:80%; width:fit-content; margin:0 0 16px; padding:12px 16px; border:1px solid #dde5f1; border-radius:15px 15px 15px 3px; background:white; }
.chat-message.is-mine { margin-left:auto; background:#eaf0ff; border-color:#d5e0ff; border-radius:15px 15px 3px 15px; }
.chat-message p { margin:0; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.55; }
.chat-message time { display:block; font-size:11px; color:#5b6e8b; text-align:right; margin-top:6px; }
.chat-composer { padding:16px 22px; border-top:1px solid #dce5f1; }
.chat-composer label { font-size:14px; font-weight:700; display:block; margin-bottom:8px; }
.chat-compose-row { display:flex; align-items:flex-end; gap:10px; }
.chat-composer textarea { box-sizing:border-box; resize:vertical; min-height:76px; max-height:180px; width:100%; padding:12px; border:1px solid #b9cbed; border-radius:12px; font:inherit; color:inherit; background:white; }
.chat-send { color:white; background:#2458ee; border-color:#2458ee; padding:13px 20px; }
.chat-send:hover { color:white; background:#1644d2; }
.chat-compose-hint { font-size:12px; color:#596d89; margin:8px 0 0; }
.chat-error { color:#a12332; font-size:14px; line-height:1.5; }
.chat-new { position:absolute; bottom:190px; left:50%; transform:translateX(-50%); box-shadow:0 3px 20px #19253c22; white-space:nowrap; }
.chat-block-note { margin:0; padding:12px 22px; background:#fff6e8; color:#734711; font-size:14px; line-height:1.5; }
@media(max-width:760px) {
 .chat-main { padding:0 12px; margin:22px auto; }
 .chat-main h1 { font-size:28px; }
 .chat-intro { font-size:14px; margin-bottom:16px; }
 .chat-layout { display:flex; height:calc(100dvh - 230px); min-height:400px; border-radius:14px; }
 .chat-sidebar { width:100%; border:0; }
 .chat-layout.has-thread .chat-sidebar { display:none; }
 .chat-layout:not(.has-thread) .chat-conversation,.chat-layout:not(.has-thread)>.chat-empty { display:none; }
 .chat-conversation { width:100%; }
 .chat-back { display:block; padding:8px; }
 .chat-header { padding:12px; gap:8px; flex-wrap:wrap; }
 .chat-header .chat-avatar { width:36px; height:36px; }
 .chat-header #chat-block { font-size:12px; padding:8px; }
 .chat-person { min-width:100px; }
 .chat-history { padding:16px 12px; }
 .chat-composer { padding:12px; }
 .chat-message { max-width:88%; }
 .chat-send { padding:12px; }
}

.chat-header{flex-wrap:wrap}.chat-report{min-height:40px;padding:8px 10px;border:1px solid #ccd9ef;border-radius:10px;background:#fff;color:#604051;font:inherit;cursor:pointer}
