:root{--bg-primary: #0d1117;--bg-secondary: #161b22;--bg-tertiary: #1c2128;--bg-hover: #21262d;--bg-active: #1a3a5c;--text-primary: #e6edf3;--text-secondary: #8b949e;--text-muted: #484f58;--accent: #4fc3f7;--accent-dark: #0288d1;--accent-light: #b3e5fc;--bubble-mine: #1a3a5c;--bubble-theirs: #21262d;--border: #30363d;--danger: #f85149;--success: #3fb950;--radius: 10px;--radius-lg: 16px}*{margin:0;padding:0;box-sizing:border-box}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;background:var(--bg-primary);color:var(--text-primary);height:100vh;overflow:hidden}#root{height:100vh}.loading-screen{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100vh;gap:16px;color:var(--text-secondary)}.loading-spinner{width:40px;height:40px;border:3px solid var(--border);border-top-color:var(--accent);border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.login-container{display:flex;align-items:center;justify-content:center;height:100vh;background:var(--bg-primary)}.login-card{background:var(--bg-secondary);border:1px solid var(--border);border-radius:var(--radius-lg);padding:48px 40px;width:100%;max-width:400px;text-align:center}.login-logo{margin-bottom:16px}.login-card h1{font-size:28px;font-weight:700;margin-bottom:4px;color:var(--text-primary)}.login-subtitle{color:var(--text-secondary);font-size:14px;margin-bottom:32px}.login-card form{display:flex;flex-direction:column;gap:12px;text-align:left}.login-card label{font-size:13px;font-weight:600;color:var(--text-secondary);margin-bottom:-4px}.login-card select,.login-card input{background:var(--bg-tertiary);border:1px solid var(--border);border-radius:var(--radius);padding:12px 14px;color:var(--text-primary);font-size:15px;outline:none;transition:border-color .15s}.login-card select:focus,.login-card input:focus{border-color:var(--accent)}.login-card button{margin-top:8px;background:var(--accent);color:#000;border:none;border-radius:var(--radius);padding:12px;font-size:15px;font-weight:600;cursor:pointer;transition:background .15s}.login-card button:hover:not(:disabled){background:var(--accent-light)}.login-card button:disabled{opacity:.5;cursor:not-allowed}.login-error{background:#f851491a;border:1px solid var(--danger);color:var(--danger);padding:10px 14px;border-radius:var(--radius);font-size:13px}.chat-container{display:flex;height:100vh}.sidebar{width:320px;min-width:320px;background:var(--bg-secondary);border-right:1px solid var(--border);display:flex;flex-direction:column}.sidebar-header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid var(--border)}.sidebar-header h2{font-size:20px;font-weight:700;color:var(--accent)}.sidebar-actions{display:flex;gap:8px}.icon-btn{background:var(--bg-tertiary);border:1px solid var(--border);color:var(--text-primary);width:34px;height:34px;border-radius:8px;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;transition:background .15s}.icon-btn:hover{background:var(--bg-hover)}.logout-btn{font-size:14px;color:var(--text-secondary)}.sidebar-user{display:flex;align-items:center;gap:10px;padding:12px 20px;border-bottom:1px solid var(--border);font-size:13px;color:var(--text-secondary)}.user-avatar{width:28px;height:28px;border-radius:50%;background:var(--accent-dark);color:var(--accent-light);display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:700}.conversation-list{flex:1;overflow-y:auto}.conversation-item{display:flex;align-items:center;gap:12px;padding:14px 20px;cursor:pointer;transition:background .1s;border-bottom:1px solid rgba(48,54,61,.4)}.conversation-item:hover{background:var(--bg-hover)}.conversation-item.active{background:var(--bg-active)}.conv-avatar{width:42px;height:42px;min-width:42px;border-radius:50%;background:var(--bg-tertiary);border:1px solid var(--border);display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:700;color:var(--accent)}.conv-details{flex:1;min-width:0}.conv-top-row{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:3px}.conv-name{font-size:14px;font-weight:600;color:var(--text-primary)}.conv-time{font-size:11px;color:var(--text-muted);white-space:nowrap}.conv-preview{font-size:13px;color:var(--text-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.empty-state{padding:40px 20px;text-align:center;color:var(--text-muted)}.empty-state p{margin-bottom:16px}.empty-state button{background:var(--accent);color:#000;border:none;border-radius:var(--radius);padding:10px 20px;font-size:14px;font-weight:600;cursor:pointer}.chat-main{flex:1;display:flex;flex-direction:column;background:var(--bg-primary)}.no-chat-selected{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--text-muted);gap:12px}.no-chat-selected h3{font-size:18px;color:var(--text-secondary)}.no-chat-selected p{font-size:14px}.chat-header{display:flex;align-items:center;gap:12px;padding:14px 24px;background:var(--bg-secondary);border-bottom:1px solid var(--border)}.chat-header-avatar{width:38px;height:38px;border-radius:50%;background:var(--bg-tertiary);border:1px solid var(--border);display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:700;color:var(--accent)}.chat-header-info h3{font-size:15px;font-weight:600}.chat-header-status{font-size:12px;color:var(--text-muted)}.messages-area{flex:1;overflow-y:auto;padding:20px 24px;display:flex;flex-direction:column;gap:6px}.message-row{display:flex}.message-row.mine{justify-content:flex-end}.message-row.theirs{justify-content:flex-start}.message-bubble{max-width:65%;padding:10px 14px;border-radius:16px;position:relative}.message-row.mine .message-bubble{background:var(--bubble-mine);border-bottom-right-radius:4px}.message-row.theirs .message-bubble{background:var(--bubble-theirs);border-bottom-left-radius:4px}.message-bubble p{font-size:14px;line-height:1.45;word-wrap:break-word}.message-time{display:block;text-align:right;font-size:11px;color:var(--text-muted);margin-top:4px}.compose-area{display:flex;gap:10px;padding:14px 24px;background:var(--bg-secondary);border-top:1px solid var(--border)}.compose-area input{flex:1;background:var(--bg-tertiary);border:1px solid var(--border);border-radius:24px;padding:12px 18px;color:var(--text-primary);font-size:14px;outline:none;transition:border-color .15s}.compose-area input:focus{border-color:var(--accent)}.compose-area input::placeholder{color:var(--text-muted)}.compose-area button{background:var(--accent);color:#000;border:none;border-radius:24px;padding:0 24px;font-size:14px;font-weight:600;cursor:pointer;transition:background .15s}.compose-area button:hover:not(:disabled){background:var(--accent-light)}.compose-area button:disabled{opacity:.4;cursor:not-allowed}.modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#0009;display:flex;align-items:center;justify-content:center;z-index:100}.modal{background:var(--bg-secondary);border:1px solid var(--border);border-radius:var(--radius-lg);padding:28px;width:100%;max-width:360px}.modal h3{margin-bottom:8px}.modal p{color:var(--text-secondary);font-size:14px;margin-bottom:16px}.account-list{display:flex;flex-direction:column;gap:8px;margin-bottom:16px}.account-btn{display:flex;align-items:center;gap:12px;background:var(--bg-tertiary);border:1px solid var(--border);border-radius:var(--radius);padding:12px 16px;color:var(--text-primary);font-size:14px;cursor:pointer;transition:background .15s}.account-btn:hover{background:var(--bg-hover)}.acct-avatar{width:32px;height:32px;border-radius:50%;background:var(--accent-dark);color:var(--accent-light);display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700}.modal-close{width:100%;background:var(--bg-tertiary);border:1px solid var(--border);border-radius:var(--radius);padding:10px;color:var(--text-secondary);font-size:14px;cursor:pointer;transition:background .15s}.modal-close:hover{background:var(--bg-hover)}::-webkit-scrollbar{width:6px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:var(--border);border-radius:3px}::-webkit-scrollbar-thumb:hover{background:var(--text-muted)}
