:root{--bg: #111215;--bg-panel: #1c1d21;--bg-panel-strong: linear-gradient(135deg, #1c1d21, #111215);--bg-card: rgba(255, 255, 255, .05);--bg-card-border: rgba(255, 255, 255, .08);--bg-card-out: rgba(255, 255, 255, .1);--bg-card-out-border: rgba(255, 255, 255, .14);--text-primary: #e5e7eb;--text-strong: #f7f8fa;--text-secondary: #c7cad1;--text-muted: #9aa0a6;--text-dark: #0f172a;--bubble-out: linear-gradient(135deg, #1b5247, #17453b);--bubble-in: #2d2d2d;--accent: #10a37f;--accent-strong: #0f9c78;--success: #22c55e;--warn: #f59e0b;--danger: #dc2626;--border-soft: rgba(255, 255, 255, .08);--input-bg: #1c1d21;--nav-bg: #111215}*{box-sizing:border-box}body{height:100%;margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Microsoft YaHei,sans-serif;background:radial-gradient(circle at 20% 20%,rgba(255,255,255,.03),transparent 25%),radial-gradient(circle at 80% 0%,rgba(255,255,255,.02),transparent 25%),var(--bg);color:var(--text-primary);-webkit-text-size-adjust:100%;touch-action:manipulation;max-width:100%;overflow:hidden;overscroll-behavior:none}html{height:100%;max-width:100%;overflow:hidden;overscroll-behavior:none}input,textarea,select{font-size:16px}.auth-wrapper{display:flex;justify-content:center;min-height:100vh;max-height:100vh;overflow-y:auto;background:radial-gradient(circle at 20% 20%,rgba(255,255,255,.03),transparent 25%),radial-gradient(circle at 80% 0%,rgba(255,255,255,.02),transparent 25%),var(--bg-panel-strong);color:var(--text-primary);position:relative;overflow:hidden}.auth-card input:-webkit-autofill,.auth-card input:-webkit-autofill:hover,.auth-card input:-webkit-autofill:focus{background-color:#fff!important;-webkit-box-shadow:0 0 0 1000px #ffffff inset!important;box-shadow:0 0 0 1000px #fff inset!important;-webkit-text-fill-color:#0f172a!important;caret-color:#0f172a;border-color:#d1d5db!important;transition:background-color 0s,color 0s}.auth-card input{-webkit-appearance:none;-moz-appearance:none;appearance:none}@-webkit-keyframes autofill-fix{to{background:#ffffff;color:#0f172a}}.auth-card input:-webkit-autofill,.auth-card input:-webkit-autofill:hover,.auth-card input:-webkit-autofill:focus{-webkit-text-fill-color:#0f172a!important;caret-color:#0f172a;background:#ffffff!important;border:1px solid #d1d5db!important;box-shadow:0 0 0 1000px #fff inset!important;-webkit-box-shadow:0 0 0 1000px #ffffff inset!important;-webkit-animation-name:autofill-fix;-webkit-animation-fill-mode:both}.auth-card input[type=password]:-webkit-autofill{-webkit-text-fill-color:#0f172a!important;background:#ffffff!important}.auth-wrapper:before{content:"";position:absolute;top:-20%;right:-20%;bottom:-20%;left:-20%;background:radial-gradient(circle at 25% 35%,rgba(59,130,246,.14),transparent 40%),radial-gradient(circle at 70% 20%,rgba(16,185,129,.12),transparent 38%),radial-gradient(circle at 50% 80%,rgba(236,72,153,.08),transparent 35%),repeating-linear-gradient(135deg,rgba(255,255,255,.05) 0 2px,transparent 2px 12px);filter:blur(12px);pointer-events:none}.auth-wrapper:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background:radial-gradient(circle at 15% 10%,rgba(255,255,255,.05),transparent 25%),radial-gradient(circle at 85% 75%,rgba(255,255,255,.03),transparent 22%);pointer-events:none}.hero-list{margin:0;padding-left:18px;color:#fffc;font-size:14px;line-height:1.6}.hero-meta{display:flex;gap:20px;margin-top:8px}.meta-number{font-size:20px;font-weight:700}.meta-label{font-size:12px;color:#ffffffbf}button{padding:10px 12px;border:none;border-radius:8px;cursor:pointer}button.primary{background:var(--accent);color:#fff}button.primary:hover{background:var(--accent-strong)}.status{color:var(--accent)}.error{color:var(--danger);margin-left:8px}.status-bar{display:flex;gap:8px;align-items:center}.conn-dot{width:10px;height:10px;border-radius:50%;display:inline-block}.conn-dot.online{background:var(--success)}.conn-dot.connecting{background:var(--warn)}.conn-dot.offline{background:#ef4444}.conn-text{color:var(--text-muted);font-size:13px}.status-tip{color:var(--accent);font-size:13px}.chat-subtitle{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--text-muted)}.chat-subtitle .tag-group{color:var(--text-primary);background:rgba(255,255,255,.08)}.tabs{display:flex;gap:8px}.tabs button{flex:1;background:rgba(255,255,255,.06);color:var(--text-primary)}.tabs button.active{background:rgba(255,255,255,.12);color:var(--text-primary)}.app{display:grid;grid-template-columns:320px 1fr;height:100vh;max-width:100vw}.app.mobile{grid-template-columns:1fr;overflow-x:hidden;position:relative;height:100vh}.sidebar,.chat{min-width:0}.app.mobile .sidebar,.app.mobile .chat{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;transition:transform .25s ease,opacity .25s ease}.app.mobile .sidebar.hidden{transform:translate(-110%);opacity:0;pointer-events:none;visibility:hidden}.app.mobile .chat.hidden{transform:translate(110%);opacity:0;pointer-events:none;visibility:hidden}.app.mobile .sidebar:not(.hidden),.app.mobile .chat:not(.hidden){transform:translate(0);opacity:1;visibility:visible}.sidebar{background:var(--bg-panel);color:var(--text-primary);display:flex;flex-direction:column}.sidebar-header{display:flex;justify-content:space-between;align-items:center;padding:12px 14px;border-bottom:1px solid rgba(255,255,255,.1)}.sidebar-actions{display:flex;gap:6px}.sidebar .secondary{background:#334155}.settings-btn{width:100%;display:flex;align-items:center;gap:8px;padding:8px 12px;border-radius:10px;border:1px solid rgba(255,255,255,.08);background:rgba(255,255,255,.06);color:#e2e8f0;font-weight:600;cursor:pointer}.settings-btn:hover{background:rgba(255,255,255,.1)}.settings-btn.active{background:rgba(255,255,255,.14)}.contacts{padding:10px 14px;border-bottom:1px solid rgba(255,255,255,.08);display:flex;flex-direction:column;gap:8px}.contacts-header{display:flex;justify-content:space-between;align-items:center;color:#e2e8f0;font-weight:600}.contacts input,.contacts select{width:100%;padding:8px;border-radius:6px;border:1px solid #334155;background:var(--input-bg);color:var(--text-primary)}.contact-list{display:flex;flex-direction:column;gap:6px;max-height:240px;overflow-y:auto}.contact-row{display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center;padding:6px 8px;border-radius:8px;cursor:pointer}.contact-row:hover{background:rgba(255,255,255,.06)}.avatar{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;font-weight:700;color:#fff}.contact-info{display:flex;flex-direction:column;gap:2px}.contact-name{color:var(--text-primary)}.contact-email{color:#e2e8f0b3;font-size:12px}.contact-action{background:rgba(255,255,255,.1);color:var(--text-primary);padding:6px 10px}.contact-action:hover{background:rgba(255,255,255,.2)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.55);display:flex;align-items:center;justify-content:center;z-index:1000}.modal{background:#fff;padding:0;border-radius:18px;width:min(540px,92vw);max-height:82vh;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 30px 70px #0f172a47;border:1px solid #e5e7eb;margin:auto}.modal .modal-inner{padding:24px 24px 20px}.modal-contact-list{max-height:320px;overflow-y:auto;border:1px solid #e5e7eb;padding:8px;border-radius:12px;display:flex;flex-direction:column;gap:6px;background:#f9fafb}.modal-contact{display:flex;gap:8px;align-items:center}.modal-actions{display:flex;justify-content:flex-end;gap:8px}.attachment-panel{background:var(--bg-panel);border-radius:18px;width:min(640px,92vw);max-height:86vh;display:flex;flex-direction:column;overflow:hidden;border:1px solid var(--border-soft);box-shadow:0 30px 70px #0f172a59}.attachment-panel-header{display:flex;align-items:center;justify-content:space-between;padding:20px 22px 12px;border-bottom:1px solid rgba(255,255,255,.06)}.attachment-title{font-size:18px;font-weight:700;color:var(--text-strong)}.attachment-subtitle{margin-top:4px;font-size:12px;color:var(--text-muted)}.attachment-close{border:none;background:rgba(255,255,255,.08);color:var(--text-primary);width:32px;height:32px;border-radius:50%;cursor:pointer}.attachment-close:hover{background:rgba(255,255,255,.16)}.attachment-tabs{display:flex;gap:8px;padding:12px 22px 8px;flex-wrap:wrap}.attachment-tab{border:1px solid rgba(255,255,255,.08);background:rgba(255,255,255,.04);color:var(--text-secondary);padding:6px 14px;border-radius:999px;font-size:12px;cursor:pointer}.attachment-tab.active{background:rgba(16,163,127,.2);border-color:#10a37f66;color:var(--text-strong)}.attachment-filters{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-end;padding:0 22px 12px}.attachment-filters label{display:flex;flex-direction:column;gap:6px;font-size:12px;color:var(--text-muted)}.attachment-filters input[type=date]{background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.08);border-radius:10px;color:var(--text-primary);padding:6px 10px;font-size:13px}.attachment-filters input[type=date].has-error{border-color:#ef4444bf;box-shadow:0 0 0 1px #ef444459}.attachment-filter-actions{display:flex;gap:8px;margin-left:auto}.attachment-filter-actions button{border:none;background:rgba(16,163,127,.25);color:var(--text-strong);padding:7px 14px;border-radius:10px;cursor:pointer}.attachment-filter-actions button:disabled{opacity:.6;cursor:not-allowed}.attachment-filter-actions button.ghost{background:rgba(255,255,255,.08);color:var(--text-secondary)}.attachment-filter-error{margin-left:auto;font-size:12px;color:#f87171f2}.attachment-list{flex:1;overflow-y:auto;padding:8px 18px 16px;display:flex;flex-direction:column;gap:10px}.attachment-row{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:14px;background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.05);cursor:pointer}.attachment-row:hover{background:rgba(255,255,255,.06)}.attachment-row:active{background:rgba(255,255,255,.08)}.attachment-row:focus-visible{outline:2px solid rgba(16,163,127,.4);outline-offset:2px}.attachment-thumb{width:44px;height:44px;border-radius:12px;display:grid;place-items:center;background:rgba(255,255,255,.08);color:var(--text-secondary);overflow:hidden}.attachment-thumb.image img{width:100%;height:100%;object-fit:cover}.attachment-meta{flex:1;min-width:0}.attachment-name{font-size:14px;color:var(--text-strong);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.attachment-sub{display:flex;gap:10px;font-size:12px;color:var(--text-muted)}.attachment-size{font-size:12px;color:var(--text-muted)}.attachment-loading,.attachment-empty,.attachment-error{text-align:center;font-size:13px;color:var(--text-muted);padding:12px 0}.attachment-error{color:var(--danger)}.attachment-footer{padding:10px 22px 18px;display:flex;justify-content:center}.attachment-footer button{border:none;background:rgba(255,255,255,.08);color:var(--text-secondary);padding:8px 18px;border-radius:999px;cursor:pointer}.attachment-footer button:disabled{opacity:.6;cursor:not-allowed}.conversation-list{overflow-y:auto;flex:1}.conversation{padding:10px 14px;border-bottom:1px solid rgba(255,255,255,.05);cursor:pointer}.conversation:hover{background:rgba(255,255,255,.05)}.conv-title{display:flex;justify-content:space-between;align-items:center;gap:6px;flex-wrap:wrap}.conv-title-main{display:inline-flex;align-items:center;gap:6px}.badge{background:#ef4444;color:#fff;padding:2px 8px;border-radius:999px;font-size:12px}.tag-group{background:rgba(255,255,255,.15);color:#e2e8f0;padding:2px 6px;border-radius:6px;font-size:12px}.conv-preview{display:flex;justify-content:space-between;color:#e2e8f0cc;font-size:12px}.conv-time{color:#e2e8f0b3;margin-left:8px}.conversation.active{background:#2d2d2d;border:1px solid rgba(255,255,255,.08);border-radius:14px}.chat{display:flex;flex-direction:column;height:100vh;background:var(--bg-panel);position:relative}.messages{flex:1;overflow-y:auto;padding:96px 24px 14px;display:flex;flex-direction:column;gap:10px;background-color:var(--bg);background-image:none;overscroll-behavior:contain}.call-bar{padding:8px 24px 0}.call-banner{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:6px;padding:10px 12px;border-radius:12px;background:rgba(51,65,85,.55);color:#e5e7eb}.call-banner.incoming{background:rgba(15,118,110,.45)}.call-banner.active{background:rgba(37,99,235,.28)}.call-banner .call-actions{display:flex;gap:8px}.call-toast{position:fixed;bottom:16px;left:12px;right:12px;z-index:20;display:flex;justify-content:center;pointer-events:none}.call-toast-body{pointer-events:auto;background:rgba(24,24,27,.92);border:1px solid rgba(255,255,255,.08);border-radius:14px;padding:12px 14px;width:100%;max-width:520px;display:flex;flex-direction:column;gap:10px;box-shadow:0 10px 30px #00000059}.call-toast-text{color:#e5e7eb;font-size:15px}.call-toast-actions{display:flex;justify-content:flex-end;gap:10px}.chat-header{position:sticky;top:0;z-index:5}.app.mobile .chat-header{position:fixed!important;top:0;left:0;right:0;border-radius:0 0 12px 12px;box-shadow:0 8px 24px #0f172a1f}.load-more{text-align:center}.load-more button{background:#e5e7eb;color:var(--text-dark);padding:6px 12px}.message-row{display:flex;flex-direction:column}.message-row.outgoing{align-items:flex-end}.message-row.incoming{align-items:flex-start}.message-row.highlight .message{box-shadow:0 0 0 2px #10a37f73,0 12px 26px #00000052;animation:message-highlight 1.4s ease}.message-row.highlight .message.bubble-out{box-shadow:0 0 0 2px #10a37f8c,0 12px 26px #00000052}@keyframes message-highlight{0%{transform:scale(1.01)}to{transform:scale(1)}}.message{background:var(--bubble-in);border-radius:14px;padding:10px 12px;box-shadow:0 10px 22px #00000042;max-width:72%;border:1px solid rgba(0,0,0,.03)}.bubble-out{background:var(--bubble-out);color:#fff}.bubble-in{background:var(--bubble-in);color:var(--text-primary)}.message-row.outgoing .message{box-shadow:0 12px 26px #0000004d}.bubble-out .meta{color:#f8fbff}.bubble-out .msg-status{color:#e5edff}.bubble-out .meta .author,.bubble-out .meta span{color:#f8fbff}.bubble-out .attachments a{color:#e0e7ff}.message-meta{font-size:12px;color:var(--text-secondary);display:flex;gap:8px;margin-bottom:4px;align-items:center}.message-meta .author{font-weight:600}.message-meta.meta-out{justify-content:flex-end}.message-meta.meta-in{justify-content:flex-start}.msg-status{font-weight:600}.msg-failed{margin-top:6px;color:#dc2626;font-size:13px}.link-btn{background:none;border:none;color:#2563eb;margin-left:6px;cursor:pointer;padding:0}.message .content{margin-top:4px;line-height:1.55;white-space:pre-wrap;word-break:break-word}.message .content .mention{color:var(--accent);font-weight:600}.attachments a{display:inline-block;margin-top:4px;color:var(--accent);font-size:14px}.message .attachments{display:flex;flex-direction:column;gap:8px}.file-card{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:12px;background:var(--bg-card);border:1px solid var(--bg-card-border);text-decoration:none;color:inherit;width:100%;max-width:100%}.file-card.out{background:var(--bg-card-out);border-color:var(--bg-card-out-border)}.file-card .file-type{color:var(--accent)}.file-card.out .file-type{color:#ffffffe6}.file-card .file-meta{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}.file-card .file-name{font-weight:700;color:#ffffffeb;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.file-card.out .file-name{color:#ffffffeb}.file-card .file-size{font-size:12px;color:var(--text-muted)}.file-card.out .file-size{color:#ffffffc7}.file-card .file-open{margin-left:auto;color:#94a3b8}.file-card.out .file-open{color:#ffffffd9}.audio-row{display:inline-flex;align-items:center;gap:8px;padding:8px 10px;border-radius:12px;background:var(--bg-card);border:1px solid var(--bg-card-border);min-width:180px}.audio-row.out{background:var(--bg-card-out);border-color:#ffffff1f}.audio-play{border:none;background:var(--accent);color:#fff;padding:6px 8px;border-radius:10px;cursor:pointer;font-weight:700;display:inline-flex;align-items:center;justify-content:center}.audio-row.out .audio-play{background:rgba(255,255,255,.22);color:#0f172a}.audio-duration{font-size:12px;color:#94a3b8}.audio-row.out .audio-duration{color:#ffffffd9}.audio-progress{position:relative;flex:1;height:4px;background:rgba(148,163,184,.35);border-radius:999px;overflow:hidden;min-width:80px}.audio-progress-fill{position:absolute;left:0;top:0;bottom:0;background:#2563eb;width:0%;transition:width .1s linear}.audio-row.out .audio-progress{background:rgba(255,255,255,.24)}.audio-row.out .audio-progress-fill{background:rgba(255,255,255,.8)}.reply-block{border-left:3px solid rgba(255,255,255,.35);padding-left:8px;margin-bottom:6px;font-size:13px}.reply-block .reply-author{font-weight:700;color:var(--text-primary)}.reply-block .reply-snippet{color:var(--text-secondary)}.bubble-out .reply-block{border-color:#fff9}.bubble-out .reply-block .reply-author,.bubble-out .reply-block .reply-snippet{color:#ffffffe6}.receipt-info{margin-top:6px;font-size:12px;color:#6b7280}.receipt-info.align-right{text-align:right}.receipt-info .read{color:#15803d}.receipt-info .read-name{position:relative;display:inline-block;margin-right:6px;padding-left:12px}.receipt-info .read-check{position:absolute;left:0;top:50%;transform:translateY(-50%);font-size:12px;line-height:1;color:#7bd88f;pointer-events:none}.receipt-info .read-text{position:relative;color:inherit}.receipt-info .unread{color:#4b5563}.receipt-info .unread-name{margin-right:6px}.message-row.outgoing .receipt-info{color:#ffffffd1}.message-row.outgoing .receipt-info .read{color:#fffffff2}.message-row.outgoing .receipt-info .read-check{color:#ffffffeb}.message-row.outgoing .receipt-info .unread{color:#8892a0}.day-divider{display:flex;align-items:center;gap:10px;color:var(--text-secondary);font-size:12px;margin:12px 0}.day-divider:before,.day-divider:after{content:"";flex:1;height:1px;background:rgba(255,255,255,.08)}.message-actions{margin-top:6px}.message-actions.align-right{text-align:right}.reply-btn{display:inline-flex;align-items:center;gap:4px;color:#fff}.message-row.outgoing .reply-btn{color:#ffffffe6}.reply-preview{background:#202124;border:1px solid #2e3034;border-radius:12px;padding:10px 12px;width:100%;box-shadow:0 4px 10px #0000003d}.reply-preview-top{display:flex;align-items:center;gap:8px;font-size:13px}.reply-preview .reply-label{color:#7bd88f;font-weight:700}.reply-preview .reply-author{color:#e5e7eb;font-weight:700}.reply-preview .link-btn{color:#9ca3af}.reply-preview-snippet{font-size:13px;color:#cbd5e1;margin-top:4px;line-height:1.5}.attachment-item img{max-width:200px;border-radius:8px;display:block;margin-top:6px;cursor:pointer}.attachment-item .audio-row{display:flex;align-items:center;gap:6px}.file-icon,.file-name{margin-right:4px}.file-size{color:#6b7280;font-size:12px}.composer{display:flex;flex-direction:column;gap:8px;padding:12px 16px;border-top:1px solid #1f2937;background:var(--bg-panel);box-shadow:0 -6px 20px #00000040}.composer input{flex:1;padding:12px;border-radius:12px;border:1px solid rgba(255,255,255,.12);background:var(--input-bg);color:var(--text-primary)}.composer input:focus{outline:none;border-color:#ffffff52}.record-tip{padding:0 16px 10px;font-size:12px;color:var(--text-muted)}.record-tip .record-error{color:var(--danger);margin-left:8px}.recording-pill .record-dot{width:8px;height:8px;border-radius:50%;background:var(--accent);display:inline-block}button:disabled{opacity:.5;cursor:not-allowed}.upload-btn{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:6px;border:1px solid #e5e7eb;background:#f8fafc;cursor:pointer;user-select:none;-webkit-user-select:none}.message .attachments img{max-width:200px;border-radius:8px;display:block;margin-top:6px}.image-preview{position:fixed;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.6);display:flex;align-items:center;justify-content:center;padding:16px;overflow:auto;-webkit-overflow-scrolling:touch;z-index:1200}.image-preview-close{position:fixed;top:14px;right:14px;width:38px;height:38px;border-radius:999px;border:1px solid rgba(255,255,255,.2);background:rgba(15,23,42,.55);color:#fff;font-size:26px;line-height:1;display:inline-flex;align-items:center;justify-content:center;padding:0;z-index:1201}.image-preview-inner{max-width:calc(100vw - 32px);max-height:calc(100dvh - 96px);display:flex;align-items:center;justify-content:center}.image-preview img{max-width:100%;max-height:100%;object-fit:contain;border-radius:8px;box-shadow:0 10px 40px #00000059}.app-footer{position:fixed;left:12px;bottom:10px;font-size:12px;color:#fff9;padding:4px 8px;border-radius:8px;background:rgba(15,23,42,.55);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);pointer-events:none}.bottom-nav{position:fixed;bottom:0;left:0;right:0;z-index:6;border-top:1px solid rgba(255,255,255,.08);padding:6px 0;box-sizing:border-box;background:var(--nav-bg);height:86px!important}.bottom-nav .MuiBottomNavigationAction-root{min-width:0;padding-top:12px;padding-bottom:12px}@media (max-width: 768px){.auth-wrapper{grid-template-columns:1fr;background:#0f172a;padding:24px 16px 32px;justify-content:flex-start;align-items:flex-start}.hero-pane{display:block;margin-top:-100px}.hero-extra{display:none!important}.auth-card{width:90%;max-width:360px;margin:32px auto 24px;padding:24px 20px 16px}.app{grid-template-columns:1fr;height:auto;min-height:100vh}.chat{height:100vh;height:100dvh}.sidebar{min-height:40vh}.chat{min-height:60vh}.composer{position:sticky;bottom:0}.messages{min-height:300px}.upload-btn{width:42px;height:42px}.conv-title span{max-width:70%;display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}
