.chat-privacy{padding:12px 16px;border:1px solid var(--line);border-radius:11px;background:var(--surface-soft,var(--bg));color:var(--muted);font-size:12px;line-height:1.9;margin-bottom:20px}.chat-inbox-grid{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(290px,.8fr);gap:22px;align-items:start}.chat-conversations-panel,.chat-directory{min-width:0}.chat-search{display:flex;gap:8px;margin-bottom:18px}.chat-search input{min-width:0;flex:1}.chat-person{display:flex;align-items:center;gap:13px;padding:16px 5px;border-bottom:1px solid var(--line);color:var(--ink);text-decoration:none;transition:background .15s}.chat-person:last-child{border-bottom:0}.chat-person:hover{background:var(--surface-soft,var(--bg));border-radius:10px}.chat-person .avatar{width:42px;height:42px;flex:0 0 42px}.chat-person>span:nth-child(2){min-width:0}.chat-person strong{display:block;font-size:14px;color:var(--ink)}.chat-person small{display:block;font-size:11px;color:var(--muted);margin-top:4px}.chat-person .chat-preview{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;line-height:1.8;margin:3px 0 5px}.chat-open{margin-right:auto;color:var(--teal)}.chat-person-text{flex:1}.chat-unread strong{color:var(--teal)}.chat-unread-count{display:grid;place-items:center;min-width:24px;height:24px;border-radius:9px;background:var(--mint);color:var(--teal);font-size:12px}.chat-live-label{display:flex;align-items:center;gap:8px;font-size:10px;color:var(--muted);white-space:nowrap}.chat-live-label .live-dot{width:6px;height:6px;flex-shrink:0}.chat-status{font-size:11px;min-height:20px;line-height:1.9;color:var(--muted);margin:7px 0}.chat-pagination{display:flex;align-items:center;justify-content:center;gap:15px;margin-top:18px;font-size:12px;color:var(--muted)}.chat-room{padding:0;overflow:hidden}.chat-room-toolbar{display:flex;justify-content:space-between;align-items:center;padding:18px 23px;border-bottom:1px solid var(--line);background:var(--surface,#fff);gap:15px}.chat-room-toolbar>div{display:flex;align-items:center;gap:12px}.chat-room-toolbar strong{color:var(--ink)}.chat-room-toolbar .avatar{height:40px;width:40px}.chat-history-links{display:flex;justify-content:center;gap:10px;background:var(--surface-soft,var(--bg))}.chat-history-links:not(:empty){padding:12px 20px 0}.chat-messages{display:flex;flex-direction:column;align-items:flex-start;gap:14px;min-height:230px;height:clamp(240px,45vh,580px);overflow-y:auto;padding:22px;background:var(--surface-soft,var(--bg));scrollbar-width:thin;overscroll-behavior:contain}.chat-messages>.empty{margin:auto;text-align:center;align-self:center}.chat-message{width:fit-content;max-width:82%;padding:13px 17px;border:1px solid var(--line);border-radius:15px 15px 5px 15px;background:var(--surface,#fff);color:var(--ink);box-shadow:0 2px 4px #00000003;overflow-wrap:anywhere;min-width:180px}.chat-message.mine{align-self:flex-start;background:var(--mint);border-color:var(--line)}.chat-message.theirs{align-self:flex-end;border-radius:15px 15px 15px 5px}.chat-message-meta{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:7px 22px;font-size:10px;color:var(--muted);margin-bottom:8px}.chat-message-meta strong{font-size:11px;font-weight:500;color:var(--ink)}.chat-message-meta time{white-space:nowrap;direction:rtl}.chat-message-body{white-space:pre-wrap;font-size:13px;line-height:2;unicode-bidi:plaintext}.chat-attachments{list-style:none;margin:12px 0 0;padding:0;display:grid;gap:6px}.chat-attachments a{display:flex;align-items:center;gap:10px;color:var(--ink);text-decoration:none;background:var(--surface,#fff);border:1px solid var(--line);border-radius:8px;padding:9px 11px;font-size:12px}.chat-attachments a:hover{color:var(--teal)}.chat-attachments a>span:first-child{font-size:20px;color:var(--teal)}.chat-file-name{flex:1;min-width:0;overflow-wrap:anywhere;unicode-bidi:plaintext}.chat-attachments small{font-size:10px;white-space:nowrap;color:var(--muted)}.chat-room>.chat-status{padding:0 23px}.chat-compose{padding:12px 23px 23px;border-top:1px solid var(--line);background:var(--surface,#fff)}.chat-compose>label{display:block;font-size:12px;color:var(--muted);margin:5px 0 8px}.chat-compose textarea{width:100%;resize:vertical;min-height:85px;max-height:260px}.chat-compose-footer{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-top:12px}.chat-compose-footer .button{white-space:nowrap}.chat-file-field{flex:1;min-width:0;max-width:620px}.chat-file-field label{font-size:12px;color:var(--ink)}.chat-file-field input{display:block;max-width:100%;width:100%;margin:6px 0}.chat-file-field small{display:block;font-size:10px;line-height:1.9;color:var(--muted)}.chat-form-errors{font-size:12px;line-height:1.9;color:#ba4355}.chat-form-errors ul{padding-right:18px}.chat-clear{margin-top:21px;border:1px solid var(--line);border-radius:11px;padding:15px 20px;background:var(--surface,#fff);font-size:12px;color:var(--muted)}.chat-clear summary{cursor:pointer;width:max-content;max-width:100%;color:var(--ink)}.chat-clear p{max-width:750px;line-height:1.9}.chat-clear form{display:flex;flex-wrap:wrap;gap:15px 24px;align-items:center}.chat-clear label{display:flex;align-items:center;gap:8px}.chat-audit-room{max-width:1100px}.chat-audit-message{padding:20px 0;border-bottom:1px solid var(--line)}.chat-audit-message .chat-message{max-width:100%;margin-bottom:8px}.chat-audit-message>a{font-size:11px}.chat-danger{color:#b94453!important}.chat-delete-confirm{max-width:750px}.chat-delete-confirm h2{font-size:19px;color:var(--ink)}.chat-delete-confirm p{line-height:2;color:var(--muted);font-size:13px}.chat-delete-preview{background:var(--surface-soft,var(--bg));padding:17px;border-radius:9px;border:1px solid var(--line);margin:20px 0;overflow-wrap:anywhere}.chat-delete-preview small{color:var(--muted)}.chat-delete-confirm form>label{display:flex;gap:8px;align-items:center;font-size:13px;color:var(--ink);margin-top:20px}.chat-confirm-actions{display:flex;gap:12px;margin-top:20px}.sr-only{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
@media(max-width:1000px){.chat-inbox-grid{grid-template-columns:1fr}.chat-person{padding:13px 4px}.chat-directory{max-height:600px;overflow:auto}.chat-messages{height:45vh}}
@media(max-width:600px){.chat-room-toolbar{padding:14px}.chat-room-toolbar strong{font-size:13px}.chat-live-label{font-size:9px}.chat-message{max-width:95%;min-width:155px;padding:11px 13px}.chat-messages{padding:14px;min-height:230px;height:45vh;gap:11px}.chat-compose{padding:12px 14px 16px}.chat-compose-footer{flex-direction:column;align-items:stretch;gap:13px}.chat-compose-footer .button{align-self:flex-end}.chat-message-meta{gap:4px 14px}.chat-message-body{font-size:12px}.chat-room>.chat-status{padding:0 14px}.chat-privacy{font-size:11px}.chat-clear{padding:14px}.chat-attachments a{gap:7px;padding:8px}.chat-attachments small{font-size:9px}.chat-audit-room .panel-head{gap:10px;align-items:flex-start;flex-direction:column}.chat-audit-room .panel-head h2{font-size:17px}}
@media(prefers-reduced-motion:reduce){.chat-person{transition:none}}
