
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: #0e1621; color: #fff; }
.header { background: #17212b; padding: 16px 24px; border-bottom: 1px solid #2b3945; position: sticky; top: 0; z-index: 10; position: relative; }
h1 { color: #6ab3f3; font-size: 20px; margin-bottom: 4px; }
.subtitle { color: #8899a6; font-size: 13px; }
.back-btn { color: #6ab3f3; text-decoration: none; font-size: 14px; display: inline-block; margin-bottom: 8px; }
.back-btn:hover { text-decoration: underline; }
.search { padding: 12px 24px; }
.search input { width: 100%; padding: 10px 16px; background: #242f3d; border: none; border-radius: 22px; color: #fff; font-size: 14px; outline: none; }
.search input::placeholder { color: #6d7f8e; }
.chat-list { }
.chat-item { display: flex; align-items: center; padding: 10px 24px; border-bottom: 1px solid #17212b; cursor: pointer; transition: background .15s; text-decoration: none; color: inherit; }
.chat-item:hover { background: #1e2c3a; }
.avatar { width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 600; color: #fff; flex-shrink: 0; margin-right: 14px; }
.av0{background:#cc5049} .av1{background:#d67722} .av2{background:#955cdb} .av3{background:#40a7e3} .av4{background:#26a569} .av5{background:#7c81cc}
.chat-info { flex: 1; min-width: 0; }
.chat-top { display: flex; justify-content: space-between; margin-bottom: 3px; }
.chat-name { font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 300px; }
.chat-time { font-size: 12px; color: #6d7f8e; flex-shrink: 0; }
.chat-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 4px; }
.chat-preview { font-size: 13px; color: #6d7f8e; }
.chat-badges { display: flex; gap: 4px; flex-wrap: wrap; }
.tag { font-size: 10px; padding: 2px 6px; border-radius: 8px; font-weight: 600; white-space: nowrap; }
.tag-red { background: #4a1c1c; color: #ff6b6b; }
.tag-yellow { background: #4a3c1c; color: #ffd93d; }
.tag-blue { background: #1c2e4a; color: #74b9ff; }
.tag-green { background: #1c4a2e; color: #6bff9e; }
.toolbar { padding: 10px 24px; background: #17212b; border-bottom: 1px solid #2b3945; display: flex; gap: 20px; font-size: 13px; color: #8899a6; align-items: center; flex-wrap: wrap; }
.toolbar label { cursor: pointer; display: flex; align-items: center; gap: 4px; }
.toolbar input[type=checkbox] { accent-color: #6ab3f3; }
.filter-btn { background: #242f3d; border: 1px solid #3e546a; color: #8ec8f8; padding: 4px 12px; border-radius: 14px; cursor: pointer; font-size: 12px; }
.filter-btn:hover { background: #2b5278; }
.filter-btn.active { background: #2b5278; border-color: #6ab3f3; }
.events-panel { margin: 10px 24px; padding: 12px 16px; background: #1a1a2e; border: 1px solid #3a1c1c; border-radius: 8px; }
.events-panel h3 { color: #ff6b6b; margin-bottom: 8px; font-size: 14px; }
.event-item { padding: 6px 0; border-bottom: 1px solid #2b2b3e; font-size: 13px; color: #ccc; }
.event-item b { color: #ff6b6b; }
.event-item small { color: #666; }
.messages { padding: 10px 24px 80px; }
.message { padding: 8px 14px; margin: 4px 0; background: #182533; border-radius: 12px; max-width: 80%; position: relative; }
.msg-out { margin-left: auto; background: #2b5278; }
.msg-deleted { background: #3a1c1c !important; border-left: 3px solid #e74c3c; opacity: 0.85; }
.msg-deleted .msg-text { font-style: italic; }
.msg-service { background: transparent; text-align: center; max-width: 100%; color: #6d7f8e; font-size: 13px; padding: 4px; }
.msg-service.msg-danger { color: #ff6b6b; font-weight: 600; }
.msg-header { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; flex-wrap: wrap; }
.msg-sender { font-size: 13px; font-weight: 600; color: #6ab3f3; }
.msg-time { font-size: 11px; color: #6d7f8e; }
.msg-tag { font-size: 10px; padding: 1px 6px; border-radius: 6px; }
.msg-text { font-size: 14px; line-height: 1.5; word-wrap: break-word; white-space: pre-wrap; }
.msg-id { font-size: 10px; color: #444; position: absolute; right: 8px; bottom: 2px; }
.gap-indicator { text-align: center; padding: 6px; margin: 8px 0; color: #e74c3c; font-size: 12px; border: 1px dashed #4a1c1c; border-radius: 8px; background: #1a0e0e; }
.stats-bar { display: flex; gap: 16px; padding: 8px 24px; background: #111b27; font-size: 12px; color: #6d7f8e; border-bottom: 1px solid #2b3945; }
.stats-bar .stat { display: flex; align-items: center; gap: 4px; }
.stats-bar .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-green { background: #26a569; }
.dot-red { background: #e74c3c; }
.dot-yellow { background: #f39c12; }
